@douyinfe/semi-ui 2.12.1-alpha.1 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autoComplete/_story/autoComplete.stories.js +0 -1
- package/autoComplete/index.tsx +1 -1
- package/avatar/index.tsx +2 -2
- package/backtop/index.tsx +7 -11
- package/badge/index.tsx +1 -1
- package/banner/index.tsx +5 -5
- package/breadcrumb/index.tsx +3 -5
- package/button/Button.tsx +8 -10
- package/card/index.tsx +41 -43
- package/carousel/CarouselArrow.tsx +0 -2
- package/carousel/index.tsx +0 -1
- package/cascader/index.tsx +126 -102
- package/cascader/item.tsx +1 -1
- package/checkbox/checkbox.tsx +28 -20
- package/checkbox/checkboxInner.tsx +11 -1
- package/collapsible/index.tsx +1 -8
- package/datePicker/dateInput.tsx +0 -1
- package/datePicker/datePicker.tsx +5 -13
- package/dist/css/semi.css +31 -1
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +5321 -3696
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/divider/index.tsx +4 -8
- package/dropdown/index.tsx +1 -1
- package/empty/index.tsx +5 -13
- package/form/hoc/withField.tsx +1 -1
- package/form/label.tsx +1 -1
- package/grid/col.tsx +1 -1
- package/grid/row.tsx +1 -1
- package/gulpfile.js +5 -5
- package/iconButton/index.tsx +1 -2
- package/input/index.tsx +11 -38
- package/inputNumber/__test__/inputNumber.test.js +2 -3
- package/inputNumber/_story/inputNumber.stories.js +53 -0
- package/inputNumber/index.tsx +0 -4
- package/lib/cjs/_base/base.css +22 -0
- package/lib/cjs/autoComplete/index.js +1 -1
- package/lib/cjs/avatar/index.js +2 -4
- package/lib/cjs/backtop/index.js +1 -2
- package/lib/cjs/badge/index.js +1 -2
- package/lib/cjs/banner/index.js +4 -9
- package/lib/cjs/breadcrumb/index.js +3 -4
- package/lib/cjs/button/Button.js +3 -13
- package/lib/cjs/card/index.js +5 -10
- package/lib/cjs/carousel/CarouselArrow.js +2 -6
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/carousel/index.js +1 -2
- package/lib/cjs/cascader/index.js +10 -11
- package/lib/cjs/cascader/item.js +1 -2
- package/lib/cjs/checkbox/checkbox.d.ts +3 -2
- package/lib/cjs/checkbox/checkbox.js +33 -15
- package/lib/cjs/checkbox/checkboxInner.d.ts +6 -0
- package/lib/cjs/checkbox/checkboxInner.js +14 -4
- package/lib/cjs/collapsible/index.js +1 -2
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/dateInput.js +1 -2
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.js +2 -4
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/divider/index.js +1 -2
- package/lib/cjs/dropdown/index.js +1 -2
- package/lib/cjs/empty/index.js +4 -8
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/form/hoc/withField.js +1 -2
- package/lib/cjs/form/label.js +1 -2
- package/lib/cjs/grid/col.js +1 -2
- package/lib/cjs/grid/row.js +1 -2
- package/lib/cjs/iconButton/index.js +1 -3
- package/lib/cjs/input/index.js +5 -9
- package/lib/cjs/inputNumber/index.js +0 -4
- package/lib/cjs/list/index.js +3 -6
- package/lib/cjs/modal/ConfirmModal.js +1 -2
- package/lib/cjs/modal/Modal.js +2 -6
- package/lib/cjs/modal/ModalContent.js +6 -13
- package/lib/cjs/notification/notice.js +3 -6
- package/lib/cjs/pagination/index.js +2 -4
- package/lib/cjs/popconfirm/index.js +3 -6
- package/lib/cjs/popover/index.d.ts +1 -0
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radio.js +2 -4
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/rating/item.js +1 -2
- package/lib/cjs/scrollList/index.js +3 -6
- package/lib/cjs/select/index.js +4 -8
- package/lib/cjs/select/option.js +1 -2
- package/lib/cjs/sideSheet/SideSheetContent.js +3 -6
- package/lib/cjs/skeleton/index.js +1 -3
- package/lib/cjs/space/index.js +1 -2
- package/lib/cjs/spin/index.js +3 -7
- package/lib/cjs/switch/index.js +4 -6
- package/lib/cjs/table/Table.js +3 -6
- package/lib/cjs/tabs/TabBar.js +1 -2
- package/lib/cjs/tabs/TabPane.js +2 -5
- package/lib/cjs/tagInput/index.d.ts +6 -1
- package/lib/cjs/tagInput/index.js +50 -17
- package/lib/cjs/timePicker/Combobox.js +1 -3
- package/lib/cjs/timePicker/TimePicker.d.ts +2 -2
- package/lib/cjs/timePicker/TimeShape.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +2 -2
- package/lib/cjs/toast/toast.js +3 -6
- package/lib/cjs/transfer/index.js +1 -2
- package/lib/cjs/tree/treeNode.js +1 -2
- package/lib/cjs/treeSelect/index.js +3 -6
- package/lib/cjs/typography/base.js +1 -2
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/cjs/upload/index.d.ts +2 -2
- package/lib/cjs/upload/index.js +6 -13
- package/lib/es/_base/base.css +22 -0
- package/lib/es/autoComplete/index.js +1 -1
- package/lib/es/avatar/index.js +2 -4
- package/lib/es/backtop/index.js +1 -2
- package/lib/es/badge/index.js +1 -2
- package/lib/es/banner/index.js +4 -9
- package/lib/es/breadcrumb/index.js +3 -4
- package/lib/es/button/Button.js +3 -11
- package/lib/es/card/index.js +5 -10
- package/lib/es/carousel/CarouselArrow.js +2 -6
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/carousel/index.js +1 -2
- package/lib/es/cascader/index.js +10 -11
- package/lib/es/cascader/item.js +1 -2
- package/lib/es/checkbox/checkbox.d.ts +3 -2
- package/lib/es/checkbox/checkbox.js +33 -15
- package/lib/es/checkbox/checkboxInner.d.ts +6 -0
- package/lib/es/checkbox/checkboxInner.js +14 -4
- package/lib/es/collapsible/index.js +1 -2
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/dateInput.js +1 -2
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/datePicker.js +2 -4
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/divider/index.js +1 -2
- package/lib/es/dropdown/index.js +1 -2
- package/lib/es/empty/index.js +4 -8
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/form/hoc/withField.js +1 -2
- package/lib/es/form/label.js +1 -2
- package/lib/es/grid/col.js +1 -2
- package/lib/es/grid/row.js +1 -2
- package/lib/es/iconButton/index.js +1 -3
- package/lib/es/input/index.js +5 -9
- package/lib/es/inputNumber/index.js +0 -4
- package/lib/es/list/index.js +3 -6
- package/lib/es/modal/ConfirmModal.js +1 -2
- package/lib/es/modal/Modal.js +2 -6
- package/lib/es/modal/ModalContent.js +6 -13
- package/lib/es/notification/notice.js +3 -6
- package/lib/es/pagination/index.js +2 -4
- package/lib/es/popconfirm/index.js +3 -6
- package/lib/es/popover/index.d.ts +1 -0
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radio.js +2 -4
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/rating/item.js +1 -2
- package/lib/es/scrollList/index.js +3 -6
- package/lib/es/select/index.js +4 -8
- package/lib/es/select/option.js +1 -2
- package/lib/es/sideSheet/SideSheetContent.js +3 -6
- package/lib/es/skeleton/index.js +1 -3
- package/lib/es/space/index.js +1 -2
- package/lib/es/spin/index.js +3 -7
- package/lib/es/switch/index.js +4 -6
- package/lib/es/table/Table.js +3 -6
- package/lib/es/tabs/TabBar.js +1 -2
- package/lib/es/tabs/TabPane.js +2 -5
- package/lib/es/tagInput/index.d.ts +6 -1
- package/lib/es/tagInput/index.js +47 -17
- package/lib/es/timePicker/Combobox.js +1 -3
- package/lib/es/timePicker/TimePicker.d.ts +2 -2
- package/lib/es/timePicker/TimeShape.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +2 -2
- package/lib/es/toast/toast.js +3 -6
- package/lib/es/transfer/index.js +1 -2
- package/lib/es/tree/treeNode.js +1 -2
- package/lib/es/treeSelect/index.js +3 -6
- package/lib/es/typography/base.js +1 -2
- package/lib/es/typography/title.d.ts +1 -1
- package/lib/es/upload/index.d.ts +2 -2
- package/lib/es/upload/index.js +6 -13
- package/list/index.tsx +4 -16
- package/modal/ConfirmModal.tsx +1 -1
- package/modal/Modal.tsx +0 -2
- package/modal/ModalContent.tsx +14 -27
- package/notification/notice.tsx +4 -16
- package/package.json +9 -9
- package/pagination/index.tsx +2 -16
- package/popconfirm/index.tsx +3 -11
- package/popover/index.tsx +1 -1
- package/radio/radio.tsx +2 -10
- package/rating/item.tsx +1 -1
- package/scrollList/index.tsx +3 -19
- package/select/_story/select.stories.js +11 -0
- package/select/index.tsx +4 -12
- package/select/option.tsx +1 -5
- package/sideSheet/SideSheetContent.tsx +3 -3
- package/skeleton/index.tsx +1 -1
- package/space/index.tsx +1 -1
- package/spin/index.tsx +9 -15
- package/switch/index.tsx +14 -9
- package/table/Table.tsx +3 -5
- package/table/_story/v2/FixedOnHeaderRow/index.jsx +3 -0
- package/tabs/TabBar.tsx +1 -1
- package/tabs/TabPane.tsx +4 -9
- package/tabs/_story/tabs.stories.js +36 -0
- package/tag/_story/tag.stories.js +1 -1
- package/tagInput/index.tsx +47 -22
- package/timePicker/Combobox.tsx +1 -6
- package/toast/toast.tsx +3 -3
- package/transfer/index.tsx +0 -1
- package/tree/treeNode.tsx +1 -1
- package/treeSelect/index.tsx +3 -15
- package/typography/base.tsx +1 -1
- package/upload/_story/upload.stories.js +152 -0
- package/upload/index.tsx +38 -107
- package/yarn-error.log +0 -26235
package/lib/cjs/toast/toast.js
CHANGED
|
@@ -135,7 +135,7 @@ class Toast extends _baseComponent.default {
|
|
|
135
135
|
const btnTheme = 'borderless';
|
|
136
136
|
const btnSize = 'small';
|
|
137
137
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
-
role:
|
|
138
|
+
role: 'alert',
|
|
139
139
|
"aria-label": "".concat(type ? type : 'default', " type"),
|
|
140
140
|
className: toastCls,
|
|
141
141
|
style: style,
|
|
@@ -145,16 +145,13 @@ class Toast extends _baseComponent.default {
|
|
|
145
145
|
className: "".concat(prefixCls, "-content")
|
|
146
146
|
}, this.renderIcon(), /*#__PURE__*/_react.default.createElement("span", {
|
|
147
147
|
className: "".concat(prefixCls, "-content-text"),
|
|
148
|
-
style: textStyle
|
|
149
|
-
"x-semi-prop": "content"
|
|
148
|
+
style: textStyle
|
|
150
149
|
}, content), showClose && /*#__PURE__*/_react.default.createElement("div", {
|
|
151
150
|
className: "".concat(prefixCls, "-close-button")
|
|
152
151
|
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
153
152
|
onClick: e => this.close(e),
|
|
154
153
|
type: "tertiary",
|
|
155
|
-
icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose,
|
|
156
|
-
"x-semi-prop": "icon"
|
|
157
|
-
}),
|
|
154
|
+
icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, null),
|
|
158
155
|
theme: btnTheme,
|
|
159
156
|
size: btnSize
|
|
160
157
|
}))));
|
|
@@ -279,8 +279,7 @@ class Transfer extends _baseComponent.default {
|
|
|
279
279
|
className: leftItemCls,
|
|
280
280
|
checked: checked,
|
|
281
281
|
role: "listitem",
|
|
282
|
-
onChange: () => this.onSelectOrRemove(item)
|
|
283
|
-
"x-semi-children-alias": "dataSource[".concat(index, "].label")
|
|
282
|
+
onChange: () => this.onSelectOrRemove(item)
|
|
284
283
|
}, item.label);
|
|
285
284
|
}
|
|
286
285
|
|
package/lib/cjs/tree/treeNode.js
CHANGED
|
@@ -410,8 +410,7 @@ class TreeNode extends _react.PureComponent {
|
|
|
410
410
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
411
411
|
className: wrapperCls
|
|
412
412
|
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
413
|
-
className: (0, _concat.default)(_context2 = "".concat(prefixcls, "-label ")).call(_context2, prefixcls, "-label-empty")
|
|
414
|
-
"x-semi-prop": "emptyContent"
|
|
413
|
+
className: (0, _concat.default)(_context2 = "".concat(prefixcls, "-label ")).call(_context2, prefixcls, "-label-empty")
|
|
415
414
|
}, emptyContent));
|
|
416
415
|
} // eslint-disable-next-line max-lines-per-function
|
|
417
416
|
|
|
@@ -120,8 +120,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
120
120
|
["".concat(prefixcls, "-suffix-icon")]: (0, _utils.isSemiIcon)(suffix)
|
|
121
121
|
});
|
|
122
122
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
-
className: suffixWrapperCls
|
|
124
|
-
"x-semi-prop": "suffix"
|
|
123
|
+
className: suffixWrapperCls
|
|
125
124
|
}, suffix);
|
|
126
125
|
};
|
|
127
126
|
|
|
@@ -141,8 +140,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
141
140
|
});
|
|
142
141
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
143
142
|
className: prefixWrapperCls,
|
|
144
|
-
id: insetLabelId
|
|
145
|
-
"x-semi-prop": "prefix,insetLabel"
|
|
143
|
+
id: insetLabelId
|
|
146
144
|
}, labelNode);
|
|
147
145
|
};
|
|
148
146
|
|
|
@@ -396,8 +394,7 @@ class TreeSelect extends _baseComponent.default {
|
|
|
396
394
|
}
|
|
397
395
|
|
|
398
396
|
return arrowIcon ? /*#__PURE__*/_react.default.createElement("div", {
|
|
399
|
-
className: (0, _classnames.default)("".concat(prefixcls, "-arrow"))
|
|
400
|
-
"x-semi-prop": "arrowIcon"
|
|
397
|
+
className: (0, _classnames.default)("".concat(prefixcls, "-arrow"))
|
|
401
398
|
}, arrowIcon) : null;
|
|
402
399
|
};
|
|
403
400
|
|
|
@@ -571,8 +571,7 @@ class Base extends _react.Component {
|
|
|
571
571
|
|
|
572
572
|
const iconSize = size === 'small' ? 'small' : 'default';
|
|
573
573
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
574
|
-
className: "".concat(prefixCls, "-icon")
|
|
575
|
-
"x-semi-prop": "icon"
|
|
574
|
+
className: "".concat(prefixCls, "-icon")
|
|
576
575
|
}, (0, _utils.isSemiIcon)(icon) ? /*#__PURE__*/_react.default.cloneElement(icon, {
|
|
577
576
|
size: iconSize
|
|
578
577
|
}) : icon);
|
|
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
39
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
40
|
-
heading: PropTypes.Requireable<
|
|
40
|
+
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 5 | 6>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
|
@@ -6,7 +6,7 @@ import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
|
|
|
6
6
|
import { FileItem, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError } from './interface';
|
|
7
7
|
import { Locale } from '../locale/interface';
|
|
8
8
|
import '@douyinfe/semi-foundation/lib/cjs/upload/upload.css';
|
|
9
|
-
export { FileItem, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError, BeforeUploadObjectResult, AfterUploadResult
|
|
9
|
+
export { FileItem, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError, BeforeUploadObjectResult, AfterUploadResult };
|
|
10
10
|
export interface UploadProps {
|
|
11
11
|
accept?: string;
|
|
12
12
|
action: string;
|
|
@@ -140,7 +140,7 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
|
|
|
140
140
|
style: PropTypes.Requireable<object>;
|
|
141
141
|
timeout: PropTypes.Requireable<number>;
|
|
142
142
|
transformFile: PropTypes.Requireable<(...args: any[]) => any>;
|
|
143
|
-
uploadTrigger: PropTypes.Requireable<"
|
|
143
|
+
uploadTrigger: PropTypes.Requireable<"auto" | "custom">;
|
|
144
144
|
validateMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
145
145
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
146
146
|
withCredentials: PropTypes.Requireable<boolean>;
|
package/lib/cjs/upload/index.js
CHANGED
|
@@ -256,9 +256,7 @@ class Upload extends _baseComponent.default {
|
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
const addContent = /*#__PURE__*/_react.default.createElement("div", (0, _assign.default)({}, addContentProps,
|
|
260
|
-
"x-semi-prop": "children"
|
|
261
|
-
}), children);
|
|
259
|
+
const addContent = /*#__PURE__*/_react.default.createElement("div", (0, _assign.default)({}, addContentProps), children);
|
|
262
260
|
|
|
263
261
|
if (!showUploadList || !fileList.length) {
|
|
264
262
|
if (showAddTriggerInList) {
|
|
@@ -391,18 +389,15 @@ class Upload extends _baseComponent.default {
|
|
|
391
389
|
onDragEnter: this.onDragEnter,
|
|
392
390
|
onClick: this.onClick
|
|
393
391
|
}, children ? children : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
394
|
-
className: "".concat(dragAreaBaseCls, "-icon")
|
|
395
|
-
"x-semi-prop": "dragIcon"
|
|
392
|
+
className: "".concat(dragAreaBaseCls, "-icon")
|
|
396
393
|
}, dragIcon || /*#__PURE__*/_react.default.createElement(_semiIcons.IconUpload, {
|
|
397
394
|
size: "extra-large"
|
|
398
395
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
399
396
|
className: "".concat(dragAreaBaseCls, "-text")
|
|
400
397
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
401
|
-
className: "".concat(dragAreaBaseCls, "-main-text")
|
|
402
|
-
"x-semi-prop": "dragMainText"
|
|
398
|
+
className: "".concat(dragAreaBaseCls, "-main-text")
|
|
403
399
|
}, dragMainText || locale.mainText), /*#__PURE__*/_react.default.createElement("div", {
|
|
404
|
-
className: "".concat(dragAreaBaseCls, "-sub-text")
|
|
405
|
-
"x-semi-prop": "dragSubText"
|
|
400
|
+
className: "".concat(dragAreaBaseCls, "-sub-text")
|
|
406
401
|
}, dragSubText), /*#__PURE__*/_react.default.createElement("div", {
|
|
407
402
|
className: "".concat(dragAreaBaseCls, "-tips")
|
|
408
403
|
}, dragAreaStatus === _constants.strings.DRAG_AREA_LEGAL && /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -588,11 +583,9 @@ class Upload extends _baseComponent.default {
|
|
|
588
583
|
className: inputReplaceCls,
|
|
589
584
|
ref: this.replaceInputRef
|
|
590
585
|
}), this.renderAddContent(), prompt ? /*#__PURE__*/_react.default.createElement("div", {
|
|
591
|
-
className: promptCls
|
|
592
|
-
"x-semi-prop": "prompt"
|
|
586
|
+
className: promptCls
|
|
593
587
|
}, prompt) : null, validateMessage ? /*#__PURE__*/_react.default.createElement("div", {
|
|
594
|
-
className: validateMsgCls
|
|
595
|
-
"x-semi-prop": "validateMessage"
|
|
588
|
+
className: validateMsgCls
|
|
596
589
|
}, validateMessage) : null, this.renderFileList());
|
|
597
590
|
}
|
|
598
591
|
|
package/lib/es/_base/base.css
CHANGED
|
@@ -507,4 +507,26 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
507
507
|
--semi-border-radius-large: 12px;
|
|
508
508
|
--semi-border-radius-circle: 50%;
|
|
509
509
|
--semi-border-radius-full: 9999px;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.semi-light-scrollbar::-webkit-scrollbar, .semi-light-scrollbar *::-webkit-scrollbar {
|
|
513
|
+
width: 8px;
|
|
514
|
+
height: 8px;
|
|
515
|
+
}
|
|
516
|
+
.semi-light-scrollbar::-webkit-scrollbar-track, .semi-light-scrollbar *::-webkit-scrollbar-track {
|
|
517
|
+
background: rgba(0, 0, 0, 0);
|
|
518
|
+
}
|
|
519
|
+
.semi-light-scrollbar::-webkit-scrollbar-corner, .semi-light-scrollbar *::-webkit-scrollbar-corner {
|
|
520
|
+
background-color: rgba(0, 0, 0, 0);
|
|
521
|
+
}
|
|
522
|
+
.semi-light-scrollbar::-webkit-scrollbar-thumb, .semi-light-scrollbar *::-webkit-scrollbar-thumb {
|
|
523
|
+
border-radius: 6px;
|
|
524
|
+
background: transparent;
|
|
525
|
+
transition: all 1s;
|
|
526
|
+
}
|
|
527
|
+
.semi-light-scrollbar:hover::-webkit-scrollbar-thumb, .semi-light-scrollbar *:hover::-webkit-scrollbar-thumb {
|
|
528
|
+
background: var(--semi-color-fill-2);
|
|
529
|
+
}
|
|
530
|
+
.semi-light-scrollbar::-webkit-scrollbar-thumb:hover, .semi-light-scrollbar *::-webkit-scrollbar-thumb:hover {
|
|
531
|
+
background: var(--semi-color-fill-1);
|
|
510
532
|
}
|
|
@@ -404,7 +404,7 @@ AutoComplete.defaultProps = {
|
|
|
404
404
|
onChange: _noop,
|
|
405
405
|
onSelectWithObject: false,
|
|
406
406
|
onDropdownVisibleChange: _noop,
|
|
407
|
-
defaultActiveFirstOption:
|
|
407
|
+
defaultActiveFirstOption: false,
|
|
408
408
|
dropdownMatchSelectWidth: true,
|
|
409
409
|
loading: false,
|
|
410
410
|
maxHeight: 300,
|
package/lib/es/avatar/index.js
CHANGED
|
@@ -156,8 +156,7 @@ export default class Avatar extends BaseComponent {
|
|
|
156
156
|
}, className);
|
|
157
157
|
let content = children;
|
|
158
158
|
const hoverRender = hoverContent ? /*#__PURE__*/React.createElement("div", {
|
|
159
|
-
className: "".concat(prefixCls, "-hover")
|
|
160
|
-
"x-semi-prop": "hoverContent"
|
|
159
|
+
className: "".concat(prefixCls, "-hover")
|
|
161
160
|
}, hoverContent) : null;
|
|
162
161
|
|
|
163
162
|
if (isImg) {
|
|
@@ -171,8 +170,7 @@ export default class Avatar extends BaseComponent {
|
|
|
171
170
|
content = /*#__PURE__*/React.createElement("span", {
|
|
172
171
|
className: "".concat(prefixCls, "-content")
|
|
173
172
|
}, /*#__PURE__*/React.createElement("span", {
|
|
174
|
-
className: "".concat(prefixCls, "-label")
|
|
175
|
-
"x-semi-prop": "children"
|
|
173
|
+
className: "".concat(prefixCls, "-label")
|
|
176
174
|
}, children));
|
|
177
175
|
}
|
|
178
176
|
|
package/lib/es/backtop/index.js
CHANGED
|
@@ -98,8 +98,7 @@ export default class BackTop extends BaseComponent {
|
|
|
98
98
|
const content = visible ? /*#__PURE__*/React.createElement("div", _Object$assign({}, others, {
|
|
99
99
|
className: preCls,
|
|
100
100
|
style: style,
|
|
101
|
-
onClick: e => this.handleClick(e)
|
|
102
|
-
"x-semi-prop": "children"
|
|
101
|
+
onClick: e => this.handleClick(e)
|
|
103
102
|
}), backtopBtn) : null;
|
|
104
103
|
return content;
|
|
105
104
|
}
|
package/lib/es/badge/index.js
CHANGED
|
@@ -71,8 +71,7 @@ export default class Badge extends PureComponent {
|
|
|
71
71
|
className: prefixCls
|
|
72
72
|
}, rest), children, /*#__PURE__*/React.createElement("span", {
|
|
73
73
|
className: wrapper,
|
|
74
|
-
style: style
|
|
75
|
-
"x-semi-prop": "count"
|
|
74
|
+
style: style
|
|
76
75
|
}, dot ? null : content));
|
|
77
76
|
}
|
|
78
77
|
|
package/lib/es/banner/index.js
CHANGED
|
@@ -68,7 +68,6 @@ export default class Banner extends BaseComponent {
|
|
|
68
68
|
className: "".concat(prefixCls, "-close"),
|
|
69
69
|
onClick: this.remove,
|
|
70
70
|
icon: closeIcon || /*#__PURE__*/React.createElement(IconClose, {
|
|
71
|
-
"x-semi-prop": "closeIcon",
|
|
72
71
|
"aria-hidden": true
|
|
73
72
|
}),
|
|
74
73
|
theme: "borderless",
|
|
@@ -114,8 +113,7 @@ export default class Banner extends BaseComponent {
|
|
|
114
113
|
|
|
115
114
|
if (iconType) {
|
|
116
115
|
return /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
className: iconCls
|
|
118
|
-
"x-semi-prop": "icon"
|
|
116
|
+
className: iconCls
|
|
119
117
|
}, iconType);
|
|
120
118
|
}
|
|
121
119
|
|
|
@@ -157,15 +155,12 @@ export default class Banner extends BaseComponent {
|
|
|
157
155
|
}, title ? /*#__PURE__*/React.createElement(Typography.Title, {
|
|
158
156
|
heading: 5,
|
|
159
157
|
className: "".concat(prefixCls, "-title"),
|
|
160
|
-
component: "div"
|
|
161
|
-
"x-semi-prop": "title"
|
|
158
|
+
component: "div"
|
|
162
159
|
}, title) : null, description ? /*#__PURE__*/React.createElement(Typography.Paragraph, {
|
|
163
160
|
className: "".concat(prefixCls, "-description"),
|
|
164
|
-
component: "div"
|
|
165
|
-
"x-semi-prop": "description"
|
|
161
|
+
component: "div"
|
|
166
162
|
}, description) : null)), this.renderCloser()), children ? /*#__PURE__*/React.createElement("div", {
|
|
167
|
-
className: "".concat(prefixCls, "-extra")
|
|
168
|
-
"x-semi-prop": "children"
|
|
163
|
+
className: "".concat(prefixCls, "-extra")
|
|
169
164
|
}, children) : null) : null;
|
|
170
165
|
return banner;
|
|
171
166
|
}
|
|
@@ -47,15 +47,14 @@ class Breadcrumb extends BaseComponent {
|
|
|
47
47
|
}, /*#__PURE__*/React.createElement("span", {
|
|
48
48
|
className: "".concat(clsPrefix, "-item-wrap")
|
|
49
49
|
}, /*#__PURE__*/React.createElement("span", {
|
|
50
|
-
role:
|
|
50
|
+
role: 'button',
|
|
51
51
|
tabIndex: 0,
|
|
52
|
-
"aria-label":
|
|
52
|
+
"aria-label": 'Expand breadcrumb items',
|
|
53
53
|
className: _concatInstanceProperty(_context = "".concat(clsPrefix, "-item ")).call(_context, clsPrefix, "-item-more"),
|
|
54
54
|
onClick: item => this.foundation.handleExpand(item),
|
|
55
55
|
onKeyPress: e => this.foundation.handleExpandEnterPress(e)
|
|
56
56
|
}, hasRenderMore && renderMore(restItem), !hasRenderMore && moreType === 'default' && /*#__PURE__*/React.createElement(IconMore, null), !hasRenderMore && moreType === 'popover' && this.renderPopoverMore(restItem)), /*#__PURE__*/React.createElement("span", {
|
|
57
|
-
className: "".concat(clsPrefix, "-separator")
|
|
58
|
-
"x-semi-prop": "separator"
|
|
57
|
+
className: "".concat(clsPrefix, "-separator")
|
|
59
58
|
}, this.props.separator)));
|
|
60
59
|
|
|
61
60
|
_spliceInstanceProperty(template).call(template, 1, itemsLen - maxItemCount, spread);
|
package/lib/es/button/Button.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import _omit from "lodash/omit";
|
|
2
1
|
import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
|
|
3
2
|
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
4
3
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
5
4
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
6
|
-
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
7
5
|
|
|
8
6
|
var __rest = this && this.__rest || function (s, e) {
|
|
9
7
|
var t = {};
|
|
@@ -54,7 +52,7 @@ export default class Button extends PureComponent {
|
|
|
54
52
|
|
|
55
53
|
const baseProps = _Object$assign(_Object$assign({
|
|
56
54
|
disabled
|
|
57
|
-
},
|
|
55
|
+
}, attr), {
|
|
58
56
|
className: classNames(prefixCls, {
|
|
59
57
|
[_concatInstanceProperty(_context = "".concat(prefixCls, "-")).call(_context, type)]: !disabled && type,
|
|
60
58
|
["".concat(prefixCls, "-disabled")]: disabled,
|
|
@@ -70,12 +68,6 @@ export default class Button extends PureComponent {
|
|
|
70
68
|
'aria-disabled': disabled
|
|
71
69
|
});
|
|
72
70
|
|
|
73
|
-
const xSemiProps = {};
|
|
74
|
-
|
|
75
|
-
if (!(className && _includesInstanceProperty(className).call(className, '-with-icon'))) {
|
|
76
|
-
xSemiProps['x-semi-prop'] = this.props['x-semi-children-alias'] || 'children';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
71
|
return (
|
|
80
72
|
/*#__PURE__*/
|
|
81
73
|
// eslint-disable-next-line react/button-has-type
|
|
@@ -83,10 +75,10 @@ export default class Button extends PureComponent {
|
|
|
83
75
|
onClick: this.props.onClick,
|
|
84
76
|
onMouseDown: this.props.onMouseDown,
|
|
85
77
|
style: style
|
|
86
|
-
}), /*#__PURE__*/React.createElement("span",
|
|
78
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
87
79
|
className: "".concat(prefixCls, "-content"),
|
|
88
80
|
onClick: e => disabled && e.stopPropagation()
|
|
89
|
-
},
|
|
81
|
+
}, children))
|
|
90
82
|
);
|
|
91
83
|
}
|
|
92
84
|
|
package/lib/es/card/index.js
CHANGED
|
@@ -59,8 +59,7 @@ class Card extends PureComponent {
|
|
|
59
59
|
React.createElement("div", {
|
|
60
60
|
className: headerWrapperCls
|
|
61
61
|
}, headerExtraContent && /*#__PURE__*/React.createElement("div", {
|
|
62
|
-
className: "".concat(prefixcls, "-header-wrapper-extra")
|
|
63
|
-
"x-semi-prop": "headerExtraContent"
|
|
62
|
+
className: "".concat(prefixcls, "-header-wrapper-extra")
|
|
64
63
|
}, headerExtraContent), title && /*#__PURE__*/React.createElement("div", {
|
|
65
64
|
className: titleCls
|
|
66
65
|
}, _isString(title) ? /*#__PURE__*/React.createElement(Typography.Title, {
|
|
@@ -68,8 +67,7 @@ class Card extends PureComponent {
|
|
|
68
67
|
ellipsis: {
|
|
69
68
|
showTooltip: true,
|
|
70
69
|
rows: 1
|
|
71
|
-
}
|
|
72
|
-
"x-semi-prop": "title"
|
|
70
|
+
}
|
|
73
71
|
}, title) : title)));
|
|
74
72
|
}
|
|
75
73
|
|
|
@@ -82,8 +80,7 @@ class Card extends PureComponent {
|
|
|
82
80
|
} = this.props;
|
|
83
81
|
const coverCls = cls("".concat(prefixcls, "-cover"));
|
|
84
82
|
return cover && /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: coverCls
|
|
86
|
-
"x-semi-prop": "cover"
|
|
83
|
+
className: coverCls
|
|
87
84
|
}, cover);
|
|
88
85
|
};
|
|
89
86
|
|
|
@@ -113,8 +110,7 @@ class Card extends PureComponent {
|
|
|
113
110
|
spacing: 12
|
|
114
111
|
}, _mapInstanceProperty(actions).call(actions, (item, idx) => /*#__PURE__*/React.createElement("div", {
|
|
115
112
|
key: idx,
|
|
116
|
-
className: actionsItemCls
|
|
117
|
-
"x-semi-prop": "actions.".concat(idx)
|
|
113
|
+
className: actionsItemCls
|
|
118
114
|
}, item)))));
|
|
119
115
|
};
|
|
120
116
|
|
|
@@ -129,8 +125,7 @@ class Card extends PureComponent {
|
|
|
129
125
|
});
|
|
130
126
|
return footer && /*#__PURE__*/React.createElement("div", {
|
|
131
127
|
style: footerStyle,
|
|
132
|
-
className: footerCls
|
|
133
|
-
"x-semi-prop": "footer"
|
|
128
|
+
className: footerCls
|
|
134
129
|
}, footer);
|
|
135
130
|
};
|
|
136
131
|
}
|
|
@@ -57,16 +57,12 @@ class CarouselArrow extends React.PureComponent {
|
|
|
57
57
|
// role='button'
|
|
58
58
|
className: leftClassNames,
|
|
59
59
|
onClick: prev
|
|
60
|
-
}, _get(this.props, 'arrowProps.leftArrow.props'), {
|
|
61
|
-
"x-semi-prop": "arrowProps.leftArrow.children"
|
|
62
|
-
}), this.renderLeftIcon()), /*#__PURE__*/React.createElement("div", _Object$assign({
|
|
60
|
+
}, _get(this.props, 'arrowProps.leftArrow.props')), this.renderLeftIcon()), /*#__PURE__*/React.createElement("div", _Object$assign({
|
|
63
61
|
// role='button'
|
|
64
62
|
// tabIndex={0}
|
|
65
63
|
className: rightClassNames,
|
|
66
64
|
onClick: next
|
|
67
|
-
}, _get(this.props, 'arrowProps.rightArrow.props'),
|
|
68
|
-
"x-semi-prop": "arrowProps.rightArrow.children"
|
|
69
|
-
}), this.renderRightIcon()));
|
|
65
|
+
}, _get(this.props, 'arrowProps.rightArrow.props')), this.renderRightIcon()));
|
|
70
66
|
}
|
|
71
67
|
|
|
72
68
|
}
|
|
@@ -8,7 +8,7 @@ declare class CarouselIndicator extends React.PureComponent<CarouselIndicatorPro
|
|
|
8
8
|
position: PropTypes.Requireable<"left" | "right" | "center">;
|
|
9
9
|
size: PropTypes.Requireable<"small" | "medium">;
|
|
10
10
|
style: PropTypes.Requireable<object>;
|
|
11
|
-
theme: PropTypes.Requireable<"
|
|
11
|
+
theme: PropTypes.Requireable<"primary" | "dark" | "light">;
|
|
12
12
|
total: PropTypes.Requireable<number>;
|
|
13
13
|
onIndicatorChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
14
|
type: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
@@ -22,7 +22,7 @@ declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
|
|
|
22
22
|
indicatorPosition: PropTypes.Requireable<"left" | "right" | "center">;
|
|
23
23
|
indicatorSize: PropTypes.Requireable<"small" | "medium">;
|
|
24
24
|
indicatorType: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
25
|
-
theme: PropTypes.Requireable<"
|
|
25
|
+
theme: PropTypes.Requireable<"primary" | "dark" | "light">;
|
|
26
26
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
27
|
arrowType: PropTypes.Requireable<"hover" | "always">;
|
|
28
28
|
showArrow: PropTypes.Requireable<boolean>;
|
package/lib/es/carousel/index.js
CHANGED
|
@@ -263,8 +263,7 @@ class Carousel extends BaseComponent {
|
|
|
263
263
|
className: cls([_concatInstanceProperty(_context2 = "".concat(cssClasses.CAROUSEL_CONTENT, "-")).call(_context2, animation)], {
|
|
264
264
|
["".concat(cssClasses.CAROUSEL_CONTENT)]: true,
|
|
265
265
|
["".concat(cssClasses.CAROUSEL_CONTENT, "-reverse")]: slideDirection === 'left' ? isReverse : !isReverse
|
|
266
|
-
})
|
|
267
|
-
"x-semi-prop": "children"
|
|
266
|
+
})
|
|
268
267
|
}, this.renderChildren()), this.renderIndicator(), this.renderArrow());
|
|
269
268
|
}
|
|
270
269
|
|
package/lib/es/cascader/index.js
CHANGED
|
@@ -285,8 +285,7 @@ class Cascader extends BaseComponent {
|
|
|
285
285
|
["".concat(prefixcls, "-suffix-icon")]: isSemiIcon(suffix)
|
|
286
286
|
});
|
|
287
287
|
return /*#__PURE__*/React.createElement("div", {
|
|
288
|
-
className: suffixWrapperCls
|
|
289
|
-
"x-semi-prop": "suffix"
|
|
288
|
+
className: suffixWrapperCls
|
|
290
289
|
}, suffix);
|
|
291
290
|
};
|
|
292
291
|
|
|
@@ -306,8 +305,7 @@ class Cascader extends BaseComponent {
|
|
|
306
305
|
});
|
|
307
306
|
return /*#__PURE__*/React.createElement("div", {
|
|
308
307
|
className: prefixWrapperCls,
|
|
309
|
-
id: insetLabelId
|
|
310
|
-
"x-semi-prop": "prefix,insetLabel"
|
|
308
|
+
id: insetLabelId
|
|
311
309
|
}, labelNode);
|
|
312
310
|
};
|
|
313
311
|
|
|
@@ -397,7 +395,7 @@ class Cascader extends BaseComponent {
|
|
|
397
395
|
className: clearCls,
|
|
398
396
|
onClick: this.handleClear,
|
|
399
397
|
onKeyPress: this.handleClearEnterPress,
|
|
400
|
-
role:
|
|
398
|
+
role: 'button',
|
|
401
399
|
tabIndex: 0
|
|
402
400
|
}, /*#__PURE__*/React.createElement(IconClear, null));
|
|
403
401
|
}
|
|
@@ -416,8 +414,7 @@ class Cascader extends BaseComponent {
|
|
|
416
414
|
}
|
|
417
415
|
|
|
418
416
|
return arrowIcon ? /*#__PURE__*/React.createElement("div", {
|
|
419
|
-
className: cls("".concat(prefixcls, "-arrow"))
|
|
420
|
-
"x-semi-prop": "arrowIcon"
|
|
417
|
+
className: cls("".concat(prefixcls, "-arrow"))
|
|
421
418
|
}, arrowIcon) : null;
|
|
422
419
|
};
|
|
423
420
|
|
|
@@ -492,12 +489,12 @@ class Cascader extends BaseComponent {
|
|
|
492
489
|
"aria-errormessage": this.props['aria-errormessage'],
|
|
493
490
|
"aria-label": this.props['aria-label'],
|
|
494
491
|
"aria-labelledby": this.props['aria-labelledby'],
|
|
495
|
-
"aria-describedby": this.props[
|
|
492
|
+
"aria-describedby": this.props["aria-describedby"],
|
|
496
493
|
"aria-required": this.props['aria-required'],
|
|
497
494
|
id: id
|
|
498
495
|
}, mouseEvent, {
|
|
499
496
|
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
500
|
-
role:
|
|
497
|
+
role: 'combobox',
|
|
501
498
|
tabIndex: 0
|
|
502
499
|
}), inner);
|
|
503
500
|
};
|
|
@@ -744,14 +741,16 @@ class Cascader extends BaseComponent {
|
|
|
744
741
|
if (_Array$isArray(realValue)) {
|
|
745
742
|
normallizedValue = _Array$isArray(realValue[0]) ? realValue : [realValue];
|
|
746
743
|
} else {
|
|
747
|
-
|
|
744
|
+
if (realValue !== undefined) {
|
|
745
|
+
normallizedValue = [[realValue]];
|
|
746
|
+
}
|
|
748
747
|
} // formatValuePath is used to save value of valuePath
|
|
749
748
|
|
|
750
749
|
|
|
751
750
|
const formatValuePath = [];
|
|
752
751
|
|
|
753
752
|
_forEachInstanceProperty(normallizedValue).call(normallizedValue, valueItem => {
|
|
754
|
-
const formatItem = onChangeWithObject ? _mapInstanceProperty(valueItem).call(valueItem, i => i.value) : valueItem;
|
|
753
|
+
const formatItem = onChangeWithObject ? _mapInstanceProperty(valueItem).call(valueItem, i => i === null || i === void 0 ? void 0 : i.value) : valueItem;
|
|
755
754
|
formatValuePath.push(formatItem);
|
|
756
755
|
}); // formatKeys is used to save key of value
|
|
757
756
|
|
package/lib/es/cascader/item.js
CHANGED
|
@@ -296,8 +296,7 @@ export default class Item extends PureComponent {
|
|
|
296
296
|
className: _concatInstanceProperty(_context6 = "".concat(prefixcls, " ")).call(_context6, prefixcls, "-empty"),
|
|
297
297
|
key: 'empty-list'
|
|
298
298
|
}, /*#__PURE__*/React.createElement("span", {
|
|
299
|
-
className: "".concat(prefixcls, "-label")
|
|
300
|
-
"x-semi-prop": "emptyContent"
|
|
299
|
+
className: "".concat(prefixcls, "-label")
|
|
301
300
|
}, emptyContent || locale.emptyText));
|
|
302
301
|
});
|
|
303
302
|
}
|
|
@@ -29,6 +29,7 @@ interface CheckboxState {
|
|
|
29
29
|
checked: boolean;
|
|
30
30
|
addonId?: string;
|
|
31
31
|
extraId?: string;
|
|
32
|
+
focusVisible?: boolean;
|
|
32
33
|
}
|
|
33
34
|
declare class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
34
35
|
static contextType: React.Context<CheckboxContextType>;
|
|
@@ -65,8 +66,6 @@ declare class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
|
65
66
|
context: CheckboxContextType;
|
|
66
67
|
get adapter(): CheckboxAdapter<CheckboxProps, CheckboxState>;
|
|
67
68
|
foundation: CheckboxFoundation;
|
|
68
|
-
addonId: string;
|
|
69
|
-
extraId: string;
|
|
70
69
|
constructor(props: CheckboxProps);
|
|
71
70
|
componentDidUpdate(prevProps: CheckboxProps): void;
|
|
72
71
|
isInGroup(): boolean;
|
|
@@ -74,6 +73,8 @@ declare class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
|
74
73
|
blur(): void;
|
|
75
74
|
handleChange: React.MouseEventHandler<HTMLSpanElement>;
|
|
76
75
|
handleEnterPress: (e: React.KeyboardEvent<HTMLSpanElement>) => void;
|
|
76
|
+
handleFocusVisible: (event: React.FocusEvent) => void;
|
|
77
|
+
handleBlur: (event: React.FocusEvent) => void;
|
|
77
78
|
render(): JSX.Element;
|
|
78
79
|
}
|
|
79
80
|
export default Checkbox;
|