Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
DaiQiangReal committed Jul 12, 2024
2 parents e0ff36d + a65aac2 commit eb700e8
Show file tree
Hide file tree
Showing 217 changed files with 44,246 additions and 7,490 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ module.exports = {
'jsx-a11y/mouse-events-have-key-events': ['warn'],
'object-curly-spacing': ['error', 'always'],
'space-before-blocks': ['error', 'always'],
"space-infix-ops": "error",
'max-len': 'off',
'react/forbid-foreign-prop-types': ['error', { "allowInPropTypes": true }]

},
globals: {
"sinon": "readonly",
Expand Down Expand Up @@ -117,7 +117,9 @@ module.exports = {
'object-curly-spacing': ['error', 'always'],
'prefer-const': 'off',
'semi-design/no-import': 'error',
"space-infix-ops": ["error", { "int32Hint": false }],
'space-before-blocks': ['error', 'always'],
"space-infix-ops": "error",
"@typescript-eslint/type-annotation-spacing": ['error', {"after": true}],
"@typescript-eslint/member-delimiter-style": [
"error",
Expand Down
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
'@babel/preset-typescript'
],
plugins: [
"@babel/plugin-transform-numeric-separator",
'@babel/plugin-transform-runtime',
[
'@babel/plugin-proposal-decorators',
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/banner/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 70
order: 73
category: Feedback
title: Banner
subTitle: Banner
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/banner/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 70
order: 73
category: 反馈类
title: Banner 通知横幅
icon: doc-banner
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/notification/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 71
order: 74
category: Feedback
title: Notification
subTitle: Notification
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/notification/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 71
order: 74
category: 反馈类
title: Notification 通知
icon: doc-notification
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/popconfirm/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 72
order: 75
category: Feedback
title: Popconfirm
subTitle: Popconfirm
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/popconfirm/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 72
order: 75
category: 反馈类
title: Popconfirm 气泡确认框
icon: doc-popconfirm
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/progress/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 73
order: 76
category: Feedback
title: Progress
subTitle: Progress
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/progress/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 73
order: 76
category: 反馈类
title: Progress 进度条
icon: doc-progress
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/skeleton/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 74
order: 77
category: Feedback
title: Skeleton
subTitle: Skeleton
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/skeleton/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 74
order: 77
category: 反馈类
title: Skeleton 骨架屏
icon: doc-skeleton
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/spin/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 75
order: 78
category: Feedback
title: Spin
subTitle: Spin
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/spin/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 75
order: 78
category: 反馈类
title: Spin 加载器
icon: doc-spin
Expand Down
11 changes: 6 additions & 5 deletions content/feedback/toast/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 76
order: 79
category: Feedback
title: Toast
subTitle: Toast
Expand All @@ -13,6 +13,9 @@ brief: Toast component is used to give timely feedback to user's operations. It

### How to import

Calling Toast's related methods to show timely feedback to user's operations.
It is recommended to set the `stack` property to apply the stacking style to multiple Toasts on the same screen, and expand them by hovering, which can effectively prevent multiple parallel Toasts at one time. (this API is supported after v2.42.0)

```jsx
import { Toast } from '@douyinfe/semi-ui';
```
Expand All @@ -28,6 +31,7 @@ function Demo() {
const opts = {
content: 'Hi, Bytedance dance dance',
duration: 3,
stack: true,
};

const handleClose = () => {
Expand All @@ -37,6 +41,7 @@ function Demo() {
content: 'Hi, Bytedance dance dance',
duration: 10,
onClose: handleClose,
stack: true,
};
const throttled = throttle(() => Toast.info(throttleOpts), 10000, { trailing: false });

Expand All @@ -52,10 +57,6 @@ function Demo() {
render(Demo);
```

<Notice>
If there are scenarios in your website where multiple Toasts pop up at the same time, such as a request failure interceptor, it is recommended to use the stacking function below.
</Notice>

### Other Types

Use different methods to show different Toast including success, warning, error and info.
Expand Down
30 changes: 5 additions & 25 deletions content/feedback/toast/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 76
order: 79
category: 反馈类
title: Toast 提示
icon: doc-toast
Expand All @@ -18,7 +18,8 @@ import { Toast } from '@douyinfe/semi-ui';

### 普通提示

信息提醒反馈
通过调用 Toast的相关 method 可以实现弹出提示。
推荐设置 stack 属性应用堆叠样式到同屏多个 Toast,Hover 展开,可有效防止一次性弹出多个并列 Toast 对用户造成干扰 (该 API在 v2.42.0 后支持)

```jsx live=true noInline=true
import React from 'react';
Expand All @@ -29,6 +30,7 @@ function Demo() {
const opts = {
content: 'Hi, Bytedance dance dance',
duration: 3,
stack: true,
};

const handleClose = () => {
Expand All @@ -38,6 +40,7 @@ function Demo() {
content: 'Hi, Bytedance dance dance',
duration: 10,
onClose: handleClose,
stack: true,
};
const throttled = throttle(() => Toast.info(throttleOpts), 10000, { trailing: false });

Expand All @@ -53,29 +56,6 @@ function Demo() {
render(Demo);
```

<Notice>
如果你在请求拦截器等场景中,使用 Toast 来做请求状态结果提示,你可能会在短时间内弹出多个 Toast ,该类场景我们更推荐使用你开启堆叠功能,防止同一时间展示过多元素对用户造成干扰
</Notice>

### 堆叠样式
可以通过 stack 属性应用堆叠样式到同屏多个 Toast,Hover 展开,该 API在 v2.42.0 后支持

```jsx live=true
import { Toast, Typography, Button } from '@douyinfe/semi-ui';

() => {
const opts = {
content: 'Hi, Bytedance dance dance',
duration: 10,
stack: true,
};

return <Button onClick={() => {
Toast.info(opts)
}}>Click multiple times</Button>
}

```

### 其他提示类型

Expand Down
2 changes: 1 addition & 1 deletion content/input/autocomplete/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 22
order: 24
category: Input
title: AutoComplete
icon: doc-autocomplete
Expand Down
2 changes: 1 addition & 1 deletion content/input/autocomplete/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 22
order: 24
category: 输入类
title: AutoComplete 自动完成
icon: doc-autocomplete
Expand Down
2 changes: 1 addition & 1 deletion content/input/cascader/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 23
order: 25
category: Input
title: Cascader
subTitle: Cascade
Expand Down
2 changes: 1 addition & 1 deletion content/input/cascader/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 23
order: 25
category: 输入类
title: Cascader 级联选择
icon: doc-cascader
Expand Down
2 changes: 1 addition & 1 deletion content/input/checkbox/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 24
order: 26
category: Input
title: Checkbox
subTitle: Checkbox
Expand Down
2 changes: 1 addition & 1 deletion content/input/checkbox/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 24
order: 26
category: 输入类
title: Checkbox 复选框
icon: doc-checkbox
Expand Down
2 changes: 1 addition & 1 deletion content/input/datepicker/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 25
order: 27
category: Input
title: DatePicker
subTitle: Date Selector
Expand Down
2 changes: 1 addition & 1 deletion content/input/datepicker/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 25
order: 27
category: 输入类
title: DatePicker 日期选择器
icon: doc-datepicker
Expand Down
2 changes: 1 addition & 1 deletion content/input/form/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 26
order: 28
category: Input
title: Form
subTitle: Form
Expand Down
2 changes: 1 addition & 1 deletion content/input/form/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 26
order: 28
category: 输入类
title: Form 表单
icon: doc-form
Expand Down
2 changes: 1 addition & 1 deletion content/input/input/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 27
order: 29
category: Input
title: Input
subTitle: Input
Expand Down
2 changes: 1 addition & 1 deletion content/input/input/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 27
order: 29
category: 输入类
title: Input 输入框
icon: doc-input
Expand Down
2 changes: 1 addition & 1 deletion content/input/inputnumber/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 28
order: 30
category: Input
title: InputNumber
subTitle: InputNumber
Expand Down
2 changes: 1 addition & 1 deletion content/input/inputnumber/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 28
order: 30
category: 输入类
title: InputNumber 数字输入框
icon: doc-inputnumber
Expand Down
Loading

0 comments on commit eb700e8

Please sign in to comment.