@douyinfe/semi-ui 2.12.1-alpha.2 → 2.13.0-beta.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 +123 -101
- 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 +9 -1
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +5372 -3695
- 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/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/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.d.ts +1 -1
- package/lib/cjs/button/Button.js +3 -13
- package/lib/cjs/button/index.d.ts +1 -1
- 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 +6 -9
- 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 +42 -10
- 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.d.ts +1 -1
- package/lib/cjs/typography/base.js +1 -2
- package/lib/cjs/typography/paragraph.d.ts +1 -1
- package/lib/cjs/typography/text.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +2 -2
- package/lib/cjs/upload/index.d.ts +2 -2
- package/lib/cjs/upload/index.js +6 -13
- 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.d.ts +1 -1
- package/lib/es/button/Button.js +3 -11
- package/lib/es/button/index.d.ts +1 -1
- 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 +6 -9
- 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 +41 -10
- 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.d.ts +1 -1
- package/lib/es/typography/base.js +1 -2
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +2 -2
- 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/tabs/TabBar.tsx +1 -1
- package/tabs/TabPane.tsx +4 -9
- package/tagInput/index.tsx +38 -11
- 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/index.tsx +38 -107
- package/yarn-error.log +0 -26235
|
@@ -188,8 +188,7 @@ class Pagination extends _baseComponent.default {
|
|
|
188
188
|
"aria-disabled": prevDisabled ? true : false,
|
|
189
189
|
"aria-label": "Previous",
|
|
190
190
|
onClick: e => !prevDisabled && this.foundation.goPrev(e),
|
|
191
|
-
className: preClassName
|
|
192
|
-
"x-semi-prop": "prevText"
|
|
191
|
+
className: preClassName
|
|
193
192
|
}, prevText || /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronLeft, {
|
|
194
193
|
size: "large"
|
|
195
194
|
}));
|
|
@@ -212,8 +211,7 @@ class Pagination extends _baseComponent.default {
|
|
|
212
211
|
"aria-disabled": nextDisabled ? true : false,
|
|
213
212
|
"aria-label": "Next",
|
|
214
213
|
onClick: e => !nextDisabled && this.foundation.goNext(e),
|
|
215
|
-
className: nextClassName
|
|
216
|
-
"x-semi-prop": "prevText"
|
|
214
|
+
className: nextClassName
|
|
217
215
|
}, nextText || /*#__PURE__*/_react.default.createElement(_semiIcons.IconChevronRight, {
|
|
218
216
|
size: "large"
|
|
219
217
|
}));
|
|
@@ -150,16 +150,13 @@ class Popconfirm extends _baseComponent.default {
|
|
|
150
150
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
151
151
|
className: "".concat(prefixCls, "-header")
|
|
152
152
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
153
|
-
className: "".concat(prefixCls, "-header-icon")
|
|
154
|
-
"x-semi-prop": "icon"
|
|
153
|
+
className: "".concat(prefixCls, "-header-icon")
|
|
155
154
|
}, /*#__PURE__*/_react.default.isValidElement(icon) ? icon : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
156
155
|
className: "".concat(prefixCls, "-header-body")
|
|
157
156
|
}, showTitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
-
className: "".concat(prefixCls, "-header-title")
|
|
159
|
-
"x-semi-prop": "title"
|
|
157
|
+
className: "".concat(prefixCls, "-header-title")
|
|
160
158
|
}, title) : null, showContent ? /*#__PURE__*/_react.default.createElement("div", {
|
|
161
|
-
className: "".concat(prefixCls, "-header-content")
|
|
162
|
-
"x-semi-prop": "content"
|
|
159
|
+
className: "".concat(prefixCls, "-header-content")
|
|
163
160
|
}, content) : null), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
164
161
|
className: "".concat(prefixCls, "-btn-close"),
|
|
165
162
|
icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, null),
|
|
@@ -38,6 +38,7 @@ export interface PopoverProps extends BaseProps {
|
|
|
38
38
|
guardFocus?: TooltipProps['guardFocus'];
|
|
39
39
|
returnFocusOnClose?: TooltipProps['returnFocusOnClose'];
|
|
40
40
|
onEscKeyDown?: TooltipProps['onEscKeyDown'];
|
|
41
|
+
clickToHide?: TooltipProps['clickToHide'];
|
|
41
42
|
}
|
|
42
43
|
export interface PopoverState {
|
|
43
44
|
popConfirmVisible: boolean;
|
package/lib/cjs/radio/radio.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
75
75
|
prefixCls?: string;
|
|
76
76
|
name?: string;
|
|
77
77
|
onChange?: (e: RadioChangeEvent) => void;
|
|
78
|
-
buttonSize?: "small" | "
|
|
78
|
+
buttonSize?: "small" | "middle" | "large";
|
|
79
79
|
isCardRadio?: boolean;
|
|
80
80
|
isPureCardRadio?: boolean;
|
|
81
81
|
};
|
package/lib/cjs/radio/radio.js
CHANGED
|
@@ -188,12 +188,10 @@ class Radio extends _baseComponent.default {
|
|
|
188
188
|
const renderContent = () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children ? /*#__PURE__*/_react.default.createElement("span", {
|
|
189
189
|
className: addonCls,
|
|
190
190
|
style: addonStyle,
|
|
191
|
-
id:
|
|
192
|
-
"x-semi-prop": "children"
|
|
191
|
+
id: addonId
|
|
193
192
|
}, children) : null, extra && !isButtonRadio ? /*#__PURE__*/_react.default.createElement("div", {
|
|
194
193
|
className: "".concat(prefix, "-extra"),
|
|
195
|
-
id:
|
|
196
|
-
"x-semi-prop": "extra"
|
|
194
|
+
id: extraId
|
|
197
195
|
}, extra) : null);
|
|
198
196
|
|
|
199
197
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
@@ -48,7 +48,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
|
|
|
48
48
|
disabled: PropTypes.Requireable<boolean>;
|
|
49
49
|
name: PropTypes.Requireable<string>;
|
|
50
50
|
options: PropTypes.Requireable<any[]>;
|
|
51
|
-
buttonSize: PropTypes.Requireable<"small" | "
|
|
51
|
+
buttonSize: PropTypes.Requireable<"small" | "middle" | "large">;
|
|
52
52
|
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
53
53
|
value: PropTypes.Requireable<any>;
|
|
54
54
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
package/lib/cjs/rating/item.js
CHANGED
|
@@ -126,8 +126,7 @@ class Item extends _react.PureComponent {
|
|
|
126
126
|
width: "".concat(firstWidth * 100, "%")
|
|
127
127
|
}
|
|
128
128
|
}, content), /*#__PURE__*/_react.default.createElement("div", {
|
|
129
|
-
className: "".concat(prefixCls, "-second")
|
|
130
|
-
"x-semi-prop": "character"
|
|
129
|
+
className: "".concat(prefixCls, "-second")
|
|
131
130
|
}, content)));
|
|
132
131
|
}
|
|
133
132
|
|
|
@@ -55,19 +55,16 @@ class ScrollList extends _baseComponent.default {
|
|
|
55
55
|
}, header ? /*#__PURE__*/_react.default.createElement("div", {
|
|
56
56
|
className: clsHeader
|
|
57
57
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
-
className: "".concat(clsHeader, "-title")
|
|
59
|
-
"x-semi-prop": this.props['x-semi-header-alias'] || "header"
|
|
58
|
+
className: "".concat(clsHeader, "-title")
|
|
60
59
|
}, header), /*#__PURE__*/_react.default.createElement("div", {
|
|
61
60
|
className: "".concat(clsWrapper, "-line")
|
|
62
61
|
})) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
63
62
|
className: "".concat(clsWrapper, "-body"),
|
|
64
63
|
style: {
|
|
65
64
|
height: bodyHeight ? bodyHeight : ''
|
|
66
|
-
}
|
|
67
|
-
"x-semi-prop": "children"
|
|
65
|
+
}
|
|
68
66
|
}, children), footer ? /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
-
className: "".concat(clsWrapper, "-footer")
|
|
70
|
-
"x-semi-prop": this.props['x-semi-footer-alias'] || "footer"
|
|
67
|
+
className: "".concat(clsWrapper, "-footer")
|
|
71
68
|
}, footer) : null);
|
|
72
69
|
}
|
|
73
70
|
|
package/lib/cjs/select/index.js
CHANGED
|
@@ -718,8 +718,7 @@ class Select extends _baseComponent.default {
|
|
|
718
718
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
719
719
|
className: contentWrapperCls
|
|
720
720
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
721
|
-
className: spanCls
|
|
722
|
-
"x-semi-prop": "placeholder"
|
|
721
|
+
className: spanCls
|
|
723
722
|
}, renderText || renderText === 0 ? renderText : placeholder), filterable && showInput ? this.renderInput() : null));
|
|
724
723
|
}
|
|
725
724
|
|
|
@@ -878,8 +877,7 @@ class Select extends _baseComponent.default {
|
|
|
878
877
|
["".concat(prefixcls, "-suffix-icon")]: (0, _utils2.isSemiIcon)(suffix)
|
|
879
878
|
});
|
|
880
879
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
881
|
-
className: suffixWrapperCls
|
|
882
|
-
"x-semi-prop": "suffix"
|
|
880
|
+
className: suffixWrapperCls
|
|
883
881
|
}, suffix);
|
|
884
882
|
}
|
|
885
883
|
|
|
@@ -898,8 +896,7 @@ class Select extends _baseComponent.default {
|
|
|
898
896
|
});
|
|
899
897
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
900
898
|
className: prefixWrapperCls,
|
|
901
|
-
id: insetLabelId
|
|
902
|
-
"x-semi-prop": "prefix,insetLabel"
|
|
899
|
+
id: insetLabelId
|
|
903
900
|
}, labelNode);
|
|
904
901
|
}
|
|
905
902
|
|
|
@@ -951,8 +948,7 @@ class Select extends _baseComponent.default {
|
|
|
951
948
|
});
|
|
952
949
|
const showClear = this.props.showClear && (selections.size || inputValue) && !disabled && (isHovering || isOpen);
|
|
953
950
|
const arrowContent = showArrow ? /*#__PURE__*/_react.default.createElement("div", {
|
|
954
|
-
className: "".concat(prefixcls, "-arrow")
|
|
955
|
-
"x-semi-prop": "arrowIcon"
|
|
951
|
+
className: "".concat(prefixcls, "-arrow")
|
|
956
952
|
}, arrowIcon) : /*#__PURE__*/_react.default.createElement("div", {
|
|
957
953
|
className: "".concat(prefixcls, "-arrow-empty")
|
|
958
954
|
});
|
package/lib/cjs/select/option.js
CHANGED
|
@@ -129,8 +129,7 @@ class Option extends _react.PureComponent {
|
|
|
129
129
|
return /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
130
130
|
componentName: "Select"
|
|
131
131
|
}, locale => /*#__PURE__*/_react.default.createElement("div", {
|
|
132
|
-
className: optionClassName
|
|
133
|
-
"x-semi-prop": "emptyContent"
|
|
132
|
+
className: optionClassName
|
|
134
133
|
}, emptyContent || locale.emptyText));
|
|
135
134
|
} // Since there are empty, locale and other logic, the custom renderOptionItem is directly converged to the internal option instead of being placed in Select/index
|
|
136
135
|
|
|
@@ -102,8 +102,7 @@ class SideSheetContent extends _react.default.PureComponent {
|
|
|
102
102
|
|
|
103
103
|
if (title) {
|
|
104
104
|
header = /*#__PURE__*/_react.default.createElement("div", {
|
|
105
|
-
className: "".concat(prefixCls, "-title")
|
|
106
|
-
"x-semi-prop": "title"
|
|
105
|
+
className: "".concat(prefixCls, "-title")
|
|
107
106
|
}, this.props.title);
|
|
108
107
|
}
|
|
109
108
|
|
|
@@ -159,11 +158,9 @@ class SideSheetContent extends _react.default.PureComponent {
|
|
|
159
158
|
className: "".concat(prefixCls, "-content")
|
|
160
159
|
}, header, /*#__PURE__*/_react.default.createElement("div", {
|
|
161
160
|
className: "".concat(prefixCls, "-body"),
|
|
162
|
-
style: props.bodyStyle
|
|
163
|
-
"x-semi-prop": "children"
|
|
161
|
+
style: props.bodyStyle
|
|
164
162
|
}, props.children), props.footer ? /*#__PURE__*/_react.default.createElement("div", {
|
|
165
|
-
className: "".concat(prefixCls, "-footer")
|
|
166
|
-
"x-semi-prop": "footer"
|
|
163
|
+
className: "".concat(prefixCls, "-footer")
|
|
167
164
|
}, props.footer) : null));
|
|
168
165
|
|
|
169
166
|
return dialogElement;
|
|
@@ -71,9 +71,7 @@ class Skeleton extends _react.PureComponent {
|
|
|
71
71
|
content = /*#__PURE__*/_react.default.createElement("div", (0, _assign.default)({
|
|
72
72
|
className: skCls,
|
|
73
73
|
style: style
|
|
74
|
-
}, others,
|
|
75
|
-
"x-semi-prop": "placeholder"
|
|
76
|
-
}), placeholder);
|
|
74
|
+
}, others), placeholder);
|
|
77
75
|
} else {
|
|
78
76
|
content = children;
|
|
79
77
|
}
|
package/lib/cjs/space/index.js
CHANGED
|
@@ -95,8 +95,7 @@ class Space extends _react.PureComponent {
|
|
|
95
95
|
const childrenNodes = (0, _utils.flatten)(children);
|
|
96
96
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
97
97
|
className: classNames,
|
|
98
|
-
style: realStyle
|
|
99
|
-
"x-semi-prop": "children"
|
|
98
|
+
style: realStyle
|
|
100
99
|
}, childrenNodes);
|
|
101
100
|
}
|
|
102
101
|
|
package/lib/cjs/spin/index.js
CHANGED
|
@@ -89,11 +89,8 @@ class Spin extends _baseComponent.default {
|
|
|
89
89
|
return loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
90
90
|
className: "".concat(prefixCls, "-wrapper")
|
|
91
91
|
}, indicator ? /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
-
className: spinIconCls
|
|
93
|
-
|
|
94
|
-
}, indicator) : /*#__PURE__*/_react.default.createElement(_icon.default, null), tip ? /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
-
"x-semi-prop": "tip"
|
|
96
|
-
}, tip) : null) : null;
|
|
92
|
+
className: spinIconCls
|
|
93
|
+
}, indicator) : /*#__PURE__*/_react.default.createElement(_icon.default, null), tip ? /*#__PURE__*/_react.default.createElement("div", null, tip) : null) : null;
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
render() {
|
|
@@ -120,8 +117,7 @@ class Spin extends _baseComponent.default {
|
|
|
120
117
|
style: style
|
|
121
118
|
}, this.renderSpin(), /*#__PURE__*/_react.default.createElement("div", {
|
|
122
119
|
className: "".concat(prefixCls, "-children"),
|
|
123
|
-
style: childStyle
|
|
124
|
-
"x-semi-prop": "children"
|
|
120
|
+
style: childStyle
|
|
125
121
|
}, children));
|
|
126
122
|
}
|
|
127
123
|
|
package/lib/cjs/switch/index.js
CHANGED
|
@@ -139,21 +139,19 @@ class Switch extends _baseComponent.default {
|
|
|
139
139
|
className: _constants.cssClasses.KNOB,
|
|
140
140
|
"aria-hidden": true
|
|
141
141
|
}), showCheckedText ? /*#__PURE__*/_react.default.createElement("div", {
|
|
142
|
-
className: _constants.cssClasses.CHECKED_TEXT
|
|
143
|
-
"x-semi-prop": "checkedText"
|
|
142
|
+
className: _constants.cssClasses.CHECKED_TEXT
|
|
144
143
|
}, checkedText) : null, showUncheckedText ? /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
-
className: _constants.cssClasses.UNCHECKED_TEXT
|
|
146
|
-
"x-semi-prop": "uncheckedText"
|
|
144
|
+
className: _constants.cssClasses.UNCHECKED_TEXT
|
|
147
145
|
}, uncheckedText) : null, /*#__PURE__*/_react.default.createElement("input", (0, _assign.default)({}, switchProps, {
|
|
148
146
|
ref: this.switchRef,
|
|
149
147
|
id: id,
|
|
150
|
-
role:
|
|
148
|
+
role: 'switch',
|
|
151
149
|
"aria-checked": nativeControlChecked,
|
|
152
150
|
"aria-invalid": this.props['aria-invalid'],
|
|
153
151
|
"aria-errormessage": this.props['aria-errormessage'],
|
|
154
152
|
"aria-label": this.props['aria-label'],
|
|
155
153
|
"aria-labelledby": this.props['aria-labelledby'],
|
|
156
|
-
"aria-describedby": this.props[
|
|
154
|
+
"aria-describedby": this.props["aria-describedby"],
|
|
157
155
|
"aria-disabled": this.props['disabled'],
|
|
158
156
|
onChange: e => this.foundation.handleChange(e.target.checked, e),
|
|
159
157
|
onFocus: e => this.handleFocusVisible(e),
|
package/lib/cjs/table/Table.js
CHANGED
|
@@ -642,8 +642,7 @@ class Table extends _baseComponent.default {
|
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
return /*#__PURE__*/(0, _react.isValidElement)(title) || typeof title === 'string' ? /*#__PURE__*/_react.default.createElement("div", {
|
|
645
|
-
className: "".concat(prefixCls, "-title")
|
|
646
|
-
"x-semi-prop": "title"
|
|
645
|
+
className: "".concat(prefixCls, "-title")
|
|
647
646
|
}, title) : null;
|
|
648
647
|
};
|
|
649
648
|
|
|
@@ -668,8 +667,7 @@ class Table extends _baseComponent.default {
|
|
|
668
667
|
}, (locale, localeCode) => /*#__PURE__*/_react.default.createElement("div", {
|
|
669
668
|
className: wrapCls
|
|
670
669
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
671
|
-
className: "".concat(prefixCls, "-empty")
|
|
672
|
-
"x-semi-prop": "empty"
|
|
670
|
+
className: "".concat(prefixCls, "-empty")
|
|
673
671
|
}, empty || locale.emptyText)));
|
|
674
672
|
};
|
|
675
673
|
|
|
@@ -689,8 +687,7 @@ class Table extends _baseComponent.default {
|
|
|
689
687
|
|
|
690
688
|
return /*#__PURE__*/(0, _react.isValidElement)(footer) || typeof footer === 'string' ? /*#__PURE__*/_react.default.createElement("div", {
|
|
691
689
|
className: "".concat(prefixCls, "-footer"),
|
|
692
|
-
key: "footer"
|
|
693
|
-
"x-semi-prop": "footer"
|
|
690
|
+
key: "footer"
|
|
694
691
|
}, footer) : null;
|
|
695
692
|
};
|
|
696
693
|
|
package/lib/cjs/tabs/TabBar.js
CHANGED
|
@@ -271,8 +271,7 @@ class TabBar extends _react.default.Component {
|
|
|
271
271
|
const tabBarStyle = (0, _assign.default)((0, _assign.default)({}, tabBarExtraContentDefaultStyle), tabBarExtraContentStyle);
|
|
272
272
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
273
273
|
className: extraCls,
|
|
274
|
-
style: tabBarStyle
|
|
275
|
-
"x-semi-prop": "tabBarExtraContent"
|
|
274
|
+
style: tabBarStyle
|
|
276
275
|
}, tabBarExtraContent);
|
|
277
276
|
}
|
|
278
277
|
|
package/lib/cjs/tabs/TabPane.js
CHANGED
|
@@ -143,17 +143,14 @@ class TabPane extends _react.PureComponent {
|
|
|
143
143
|
style: style,
|
|
144
144
|
"aria-hidden": active ? 'false' : 'true',
|
|
145
145
|
tabIndex: 0
|
|
146
|
-
}, (0, _getDataAttr.default)(restProps), {
|
|
147
|
-
"x-semi-prop": "children"
|
|
148
|
-
}), motion ? /*#__PURE__*/_react.default.createElement(_TabPaneTransition.default, {
|
|
146
|
+
}, (0, _getDataAttr.default)(restProps)), motion ? /*#__PURE__*/_react.default.createElement(_TabPaneTransition.default, {
|
|
149
147
|
direction: this.getDirection(this.context.activeKey, itemKey, this.context.panes),
|
|
150
148
|
motion: motion,
|
|
151
149
|
mode: tabPosition === 'top' ? 'horizontal' : 'vertical',
|
|
152
150
|
state: active ? 'enter' : 'leave'
|
|
153
151
|
}, transitionStyle => /*#__PURE__*/_react.default.createElement("div", {
|
|
154
152
|
className: "".concat(_constants.cssClasses.TABS_PANE_MOTION_OVERLAY),
|
|
155
|
-
style: (0, _assign.default)({}, transitionStyle)
|
|
156
|
-
"x-semi-prop": "children"
|
|
153
|
+
style: (0, _assign.default)({}, transitionStyle)
|
|
157
154
|
}, shouldRender ? children : null)) : shouldRender ? children : null);
|
|
158
155
|
}
|
|
159
156
|
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { strings } from '@douyinfe/semi-foundation/lib/cjs/tagInput/constants';
|
|
4
4
|
import '@douyinfe/semi-foundation/lib/cjs/tagInput/tagInput.css';
|
|
5
|
-
import { TagInputAdapter } from '@douyinfe/semi-foundation/lib/cjs/tagInput/foundation';
|
|
5
|
+
import TagInputFoundation, { TagInputAdapter } from '@douyinfe/semi-foundation/lib/cjs/tagInput/foundation';
|
|
6
6
|
import { ArrayElement } from '../_base/base';
|
|
7
7
|
import BaseComponent from '../_base/baseComponent';
|
|
8
8
|
import { PopoverProps } from '../popover';
|
|
@@ -32,6 +32,8 @@ export interface TagInputProps {
|
|
|
32
32
|
onKeyDown?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
33
33
|
onRemove?: (removedValue: string, idx: number) => void;
|
|
34
34
|
placeholder?: string;
|
|
35
|
+
insetLabel?: React.ReactNode;
|
|
36
|
+
insetLabelId?: string;
|
|
35
37
|
prefix?: React.ReactNode;
|
|
36
38
|
renderTagItem?: (value: string, index: number) => React.ReactNode;
|
|
37
39
|
separator?: string | string[] | null;
|
|
@@ -108,6 +110,7 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
|
108
110
|
onKeyDown: (...args: any[]) => void;
|
|
109
111
|
};
|
|
110
112
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
113
|
+
foundation: TagInputFoundation;
|
|
111
114
|
constructor(props: TagInputProps);
|
|
112
115
|
static getDerivedStateFromProps(nextProps: TagInputProps, prevState: TagInputState): {
|
|
113
116
|
tagsArray: string[];
|
|
@@ -124,6 +127,8 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
|
124
127
|
handleTagClose: (idx: number) => void;
|
|
125
128
|
handleInputMouseLeave: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
126
129
|
handleInputMouseEnter: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
130
|
+
handleClickPrefixOrSuffix: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
131
|
+
handlePreventMouseDown: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
127
132
|
renderClearBtn(): JSX.Element;
|
|
128
133
|
renderPrefix(): JSX.Element;
|
|
129
134
|
renderSuffix(): JSX.Element;
|
|
@@ -40,6 +40,8 @@ require("@douyinfe/semi-foundation/lib/cjs/tagInput/tagInput.css");
|
|
|
40
40
|
|
|
41
41
|
var _foundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/tagInput/foundation"));
|
|
42
42
|
|
|
43
|
+
var _utils = require("../_utils");
|
|
44
|
+
|
|
43
45
|
var _baseComponent = _interopRequireDefault(require("../_base/baseComponent"));
|
|
44
46
|
|
|
45
47
|
var _tag = _interopRequireDefault(require("../tag"));
|
|
@@ -94,6 +96,14 @@ class TagInput extends _baseComponent.default {
|
|
|
94
96
|
this.foundation.handleInputMouseEnter();
|
|
95
97
|
};
|
|
96
98
|
|
|
99
|
+
this.handleClickPrefixOrSuffix = e => {
|
|
100
|
+
this.foundation.handleClickPrefixOrSuffix(e);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
this.handlePreventMouseDown = e => {
|
|
104
|
+
this.foundation.handlePreventMouseDown(e);
|
|
105
|
+
};
|
|
106
|
+
|
|
97
107
|
this.foundation = new _foundation.default(this.adapter);
|
|
98
108
|
this.state = {
|
|
99
109
|
tagsArray: props.defaultValue || [],
|
|
@@ -145,6 +155,19 @@ class TagInput extends _baseComponent.default {
|
|
|
145
155
|
focusing
|
|
146
156
|
});
|
|
147
157
|
},
|
|
158
|
+
toggleFocusing: isFocus => {
|
|
159
|
+
const input = this.inputRef && this.inputRef.current;
|
|
160
|
+
|
|
161
|
+
if (isFocus) {
|
|
162
|
+
input && input.focus();
|
|
163
|
+
} else {
|
|
164
|
+
input && input.blur();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
this.setState({
|
|
168
|
+
focusing: isFocus
|
|
169
|
+
});
|
|
170
|
+
},
|
|
148
171
|
setHovering: hovering => {
|
|
149
172
|
this.setState({
|
|
150
173
|
hovering
|
|
@@ -215,22 +238,29 @@ class TagInput extends _baseComponent.default {
|
|
|
215
238
|
|
|
216
239
|
renderPrefix() {
|
|
217
240
|
const {
|
|
218
|
-
prefix
|
|
241
|
+
prefix,
|
|
242
|
+
insetLabel,
|
|
243
|
+
insetLabelId
|
|
219
244
|
} = this.props;
|
|
245
|
+
const labelNode = prefix || insetLabel;
|
|
220
246
|
|
|
221
|
-
if ((0, _isNull2.default)(
|
|
247
|
+
if ((0, _isNull2.default)(labelNode) || (0, _isUndefined2.default)(labelNode)) {
|
|
222
248
|
return null;
|
|
223
249
|
}
|
|
224
250
|
|
|
225
251
|
const prefixWrapperCls = (0, _classnames.default)("".concat(prefixCls, "-prefix"), {
|
|
226
|
-
["".concat(prefixCls, "-
|
|
252
|
+
["".concat(prefixCls, "-inset-label")]: insetLabel,
|
|
253
|
+
["".concat(prefixCls, "-prefix-text")]: labelNode && (0, _isString2.default)(labelNode),
|
|
227
254
|
// eslint-disable-next-line max-len
|
|
228
|
-
["".concat(prefixCls, "-prefix-icon")]:
|
|
229
|
-
});
|
|
255
|
+
["".concat(prefixCls, "-prefix-icon")]: (0, _utils.isSemiIcon)(labelNode)
|
|
256
|
+
}); // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
|
|
257
|
+
|
|
230
258
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
231
259
|
className: prefixWrapperCls,
|
|
232
|
-
|
|
233
|
-
|
|
260
|
+
onMouseDown: this.handlePreventMouseDown,
|
|
261
|
+
onClick: this.handleClickPrefixOrSuffix,
|
|
262
|
+
id: insetLabelId
|
|
263
|
+
}, labelNode);
|
|
234
264
|
}
|
|
235
265
|
|
|
236
266
|
renderSuffix() {
|
|
@@ -245,11 +275,13 @@ class TagInput extends _baseComponent.default {
|
|
|
245
275
|
const suffixWrapperCls = (0, _classnames.default)("".concat(prefixCls, "-suffix"), {
|
|
246
276
|
["".concat(prefixCls, "-suffix-text")]: suffix && (0, _isString2.default)(suffix),
|
|
247
277
|
// eslint-disable-next-line max-len
|
|
248
|
-
["".concat(prefixCls, "-suffix-icon")]:
|
|
249
|
-
});
|
|
278
|
+
["".concat(prefixCls, "-suffix-icon")]: (0, _utils.isSemiIcon)(suffix)
|
|
279
|
+
}); // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
280
|
+
|
|
250
281
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
251
282
|
className: suffixWrapperCls,
|
|
252
|
-
|
|
283
|
+
onMouseDown: this.handlePreventMouseDown,
|
|
284
|
+
onClick: this.handleClickPrefixOrSuffix
|
|
253
285
|
}, suffix);
|
|
254
286
|
}
|
|
255
287
|
|
|
@@ -311,9 +311,7 @@ class Combobox extends _baseComponent.default {
|
|
|
311
311
|
componentName: "TimePicker"
|
|
312
312
|
}, (locale, localeCode) => /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
313
313
|
header: panelHeader,
|
|
314
|
-
footer: panelFooter
|
|
315
|
-
"x-semi-header-alias": "panelHeader",
|
|
316
|
-
"x-semi-footer-alias": "panelFooter"
|
|
314
|
+
footer: panelFooter
|
|
317
315
|
}, this.renderAMPMSelect(locale, localeCode), this.renderHourSelect(value.getHours(), locale), this.renderMinuteSelect(value.getMinutes(), locale), this.renderSecondSelect(value.getSeconds(), locale)));
|
|
318
316
|
}
|
|
319
317
|
|
|
@@ -97,11 +97,11 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
|
|
|
97
97
|
'aria-required': PropTypes.Requireable<boolean>;
|
|
98
98
|
prefixCls: PropTypes.Requireable<string>;
|
|
99
99
|
clearText: PropTypes.Requireable<string>;
|
|
100
|
-
value: PropTypes.Requireable<string | number | string[] |
|
|
100
|
+
value: PropTypes.Requireable<string | number | string[] | number[] | Date | Date[]>;
|
|
101
101
|
inputReadOnly: PropTypes.Requireable<boolean>;
|
|
102
102
|
disabled: PropTypes.Requireable<boolean>;
|
|
103
103
|
showClear: PropTypes.Requireable<boolean>;
|
|
104
|
-
defaultValue: PropTypes.Requireable<string | number | string[] |
|
|
104
|
+
defaultValue: PropTypes.Requireable<string | number | string[] | number[] | Date | Date[]>;
|
|
105
105
|
open: PropTypes.Requireable<boolean>;
|
|
106
106
|
defaultOpen: PropTypes.Requireable<boolean>;
|
|
107
107
|
onOpenChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -6,5 +6,5 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
* - \[12:00:12, 12:21:12]
|
|
7
7
|
* - \[[12:00:12, 12:21:12], [12:11:12, 12:32:12]]
|
|
8
8
|
*/
|
|
9
|
-
declare const TimeShape: PropTypes.Requireable<string | number | string[] |
|
|
9
|
+
declare const TimeShape: PropTypes.Requireable<string | number | string[] | number[] | Date | Date[]>;
|
|
10
10
|
export { TimeShape };
|
|
@@ -18,11 +18,11 @@ export default class LocaleTimePicker extends React.PureComponent<LocalePickerPr
|
|
|
18
18
|
'aria-required': import("prop-types").Requireable<boolean>;
|
|
19
19
|
prefixCls: import("prop-types").Requireable<string>;
|
|
20
20
|
clearText: import("prop-types").Requireable<string>;
|
|
21
|
-
value: import("prop-types").Requireable<string | number | string[] |
|
|
21
|
+
value: import("prop-types").Requireable<string | number | string[] | number[] | Date | Date[]>;
|
|
22
22
|
inputReadOnly: import("prop-types").Requireable<boolean>;
|
|
23
23
|
disabled: import("prop-types").Requireable<boolean>;
|
|
24
24
|
showClear: import("prop-types").Requireable<boolean>;
|
|
25
|
-
defaultValue: import("prop-types").Requireable<string | number | string[] |
|
|
25
|
+
defaultValue: import("prop-types").Requireable<string | number | string[] | number[] | Date | Date[]>;
|
|
26
26
|
open: import("prop-types").Requireable<boolean>;
|
|
27
27
|
defaultOpen: import("prop-types").Requireable<boolean>;
|
|
28
28
|
onOpenChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
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
|
|
|
@@ -64,7 +64,7 @@ export default class Base extends Component<BaseTypographyProps, BaseTypographyS
|
|
|
64
64
|
spacing: PropTypes.Requireable<"normal" | "extended">;
|
|
65
65
|
strong: PropTypes.Requireable<boolean>;
|
|
66
66
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
67
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
67
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
68
68
|
style: PropTypes.Requireable<object>;
|
|
69
69
|
className: PropTypes.Requireable<string>;
|
|
70
70
|
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -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);
|
|
@@ -29,7 +29,7 @@ export default class Paragraph extends PureComponent<ParagraphProps> {
|
|
|
29
29
|
link: PropTypes.Requireable<boolean | object>;
|
|
30
30
|
underline: PropTypes.Requireable<boolean>;
|
|
31
31
|
strong: PropTypes.Requireable<boolean>;
|
|
32
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
32
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
33
33
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
34
34
|
spacing: PropTypes.Requireable<"normal" | "extended">;
|
|
35
35
|
style: PropTypes.Requireable<object>;
|