@douyinfe/semi-ui 2.19.0-alpha.6 → 2.19.0-alpha.9
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/avatar/index.tsx +3 -1
- package/button/buttonGroup.tsx +38 -4
- package/button/index.tsx +2 -0
- package/checkbox/_story/checkbox.stories.js +2 -0
- package/checkbox/checkbox.tsx +25 -20
- package/checkbox/checkboxGroup.tsx +1 -0
- package/dist/css/semi.css +64 -55
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +422 -311
- 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/form/baseForm.tsx +0 -1
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/avatar/index.d.ts +1 -0
- package/lib/cjs/avatar/index.js +2 -1
- package/lib/cjs/button/Button.d.ts +2 -2
- package/lib/cjs/button/buttonGroup.d.ts +2 -1
- package/lib/cjs/button/buttonGroup.js +52 -3
- package/lib/cjs/button/index.d.ts +2 -1
- package/lib/cjs/button/index.js +1 -0
- package/lib/cjs/carousel/CarouselIndicator.d.ts +2 -2
- package/lib/cjs/carousel/index.d.ts +3 -3
- package/lib/cjs/cascader/index.d.ts +1 -1
- package/lib/cjs/cascader/item.d.ts +1 -1
- package/lib/cjs/checkbox/checkbox.d.ts +1 -0
- package/lib/cjs/checkbox/checkbox.js +19 -10
- package/lib/cjs/checkbox/checkboxGroup.js +10 -9
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +3 -3
- package/lib/cjs/datePicker/monthsGrid.d.ts +3 -3
- package/lib/cjs/datePicker/quickControl.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/baseForm.js +0 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/popconfirm/index.d.ts +4 -2
- package/lib/cjs/popconfirm/index.js +49 -31
- package/lib/cjs/popover/index.d.ts +2 -2
- package/lib/cjs/radio/radio.d.ts +2 -1
- package/lib/cjs/radio/radio.js +1 -0
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/tabs/TabBar.js +5 -1
- package/lib/cjs/tag/index.d.ts +1 -1
- package/lib/cjs/tag/index.js +1 -1
- 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/tooltip/index.d.ts +2 -2
- package/lib/cjs/transfer/index.js +7 -2
- package/lib/cjs/typography/base.d.ts +1 -1
- 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 +1 -1
- package/lib/cjs/upload/index.d.ts +1 -1
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/avatar/index.d.ts +1 -0
- package/lib/es/avatar/index.js +2 -1
- package/lib/es/button/Button.d.ts +2 -2
- package/lib/es/button/buttonGroup.d.ts +2 -1
- package/lib/es/button/buttonGroup.js +50 -3
- package/lib/es/button/index.d.ts +2 -1
- package/lib/es/button/index.js +1 -0
- package/lib/es/carousel/CarouselIndicator.d.ts +2 -2
- package/lib/es/carousel/index.d.ts +3 -3
- package/lib/es/cascader/index.d.ts +1 -1
- package/lib/es/cascader/item.d.ts +1 -1
- package/lib/es/checkbox/checkbox.d.ts +1 -0
- package/lib/es/checkbox/checkbox.js +19 -10
- package/lib/es/checkbox/checkboxGroup.js +8 -7
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +3 -3
- package/lib/es/datePicker/monthsGrid.d.ts +3 -3
- package/lib/es/datePicker/quickControl.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/baseForm.js +0 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/popconfirm/index.d.ts +4 -2
- package/lib/es/popconfirm/index.js +49 -31
- package/lib/es/popover/index.d.ts +2 -2
- package/lib/es/radio/radio.d.ts +2 -1
- package/lib/es/radio/radio.js +1 -0
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/select/index.d.ts +1 -1
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/tabs/TabBar.js +5 -1
- package/lib/es/tag/index.d.ts +1 -1
- package/lib/es/tag/index.js +1 -1
- 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/tooltip/index.d.ts +2 -2
- package/lib/es/transfer/index.js +7 -2
- package/lib/es/typography/base.d.ts +1 -1
- 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 +1 -1
- package/lib/es/upload/index.d.ts +1 -1
- package/package.json +7 -7
- package/popconfirm/_story/popconfirm.stories.js +37 -1
- package/popconfirm/index.tsx +14 -6
- package/radio/radio.tsx +2 -0
- package/tabs/TabBar.tsx +7 -1
- package/tag/index.tsx +1 -1
- package/transfer/_story/transfer.stories.js +2 -2
- package/transfer/index.tsx +7 -2
- package/treeSelect/_story/treeSelect.stories.js +3 -0
|
@@ -72,6 +72,8 @@ class Popconfirm extends _baseComponent.default {
|
|
|
72
72
|
this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
|
|
73
73
|
|
|
74
74
|
this.state = {
|
|
75
|
+
cancelLoading: false,
|
|
76
|
+
confirmLoading: false,
|
|
75
77
|
visible: props.defaultVisible || false
|
|
76
78
|
};
|
|
77
79
|
this.foundation = new _popconfirmFoundation.default(this.adapter);
|
|
@@ -95,6 +97,12 @@ class Popconfirm extends _baseComponent.default {
|
|
|
95
97
|
setVisible: visible => this.setState({
|
|
96
98
|
visible
|
|
97
99
|
}),
|
|
100
|
+
updateConfirmLoading: loading => this.setState({
|
|
101
|
+
confirmLoading: loading
|
|
102
|
+
}),
|
|
103
|
+
updateCancelLoading: loading => this.setState({
|
|
104
|
+
cancelLoading: loading
|
|
105
|
+
}),
|
|
98
106
|
notifyConfirm: e => this.props.onConfirm(e),
|
|
99
107
|
notifyCancel: e => this.props.onCancel(e),
|
|
100
108
|
notifyVisibleChange: visible => this.props.onVisibleChange(visible),
|
|
@@ -111,15 +119,21 @@ class Popconfirm extends _baseComponent.default {
|
|
|
111
119
|
cancelButtonProps,
|
|
112
120
|
okButtonProps
|
|
113
121
|
} = this.props;
|
|
122
|
+
const {
|
|
123
|
+
cancelLoading,
|
|
124
|
+
confirmLoading
|
|
125
|
+
} = this.state;
|
|
114
126
|
return /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
|
|
115
127
|
componentName: "Popconfirm"
|
|
116
128
|
}, (locale, localeCode) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_button.default, (0, _assign.default)({
|
|
117
129
|
type: cancelType,
|
|
118
|
-
onClick: this.handleCancel
|
|
130
|
+
onClick: this.handleCancel,
|
|
131
|
+
loading: cancelLoading
|
|
119
132
|
}, cancelButtonProps), cancelText || (0, _get2.default)(locale, 'cancel')), /*#__PURE__*/_react.default.createElement(_button.default, (0, _assign.default)({
|
|
120
133
|
type: okType,
|
|
121
134
|
theme: "solid",
|
|
122
|
-
onClick: this.handleConfirm
|
|
135
|
+
onClick: this.handleConfirm,
|
|
136
|
+
loading: confirmLoading
|
|
123
137
|
}, okButtonProps), okText || (0, _get2.default)(locale, 'confirm'))));
|
|
124
138
|
}
|
|
125
139
|
|
|
@@ -141,35 +155,39 @@ class Popconfirm extends _baseComponent.default {
|
|
|
141
155
|
});
|
|
142
156
|
const showTitle = title !== null && typeof title !== 'undefined';
|
|
143
157
|
const showContent = content !== null || typeof content !== 'undefined';
|
|
144
|
-
return
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
158
|
+
return (
|
|
159
|
+
/*#__PURE__*/
|
|
160
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
161
|
+
_react.default.createElement("div", {
|
|
162
|
+
className: popCardCls,
|
|
163
|
+
onClick: this.stopImmediatePropagation,
|
|
164
|
+
style: style
|
|
165
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
166
|
+
className: "".concat(prefixCls, "-inner")
|
|
167
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
168
|
+
className: "".concat(prefixCls, "-header")
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
170
|
+
className: "".concat(prefixCls, "-header-icon"),
|
|
171
|
+
"x-semi-prop": "icon"
|
|
172
|
+
}, /*#__PURE__*/_react.default.isValidElement(icon) ? icon : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
173
|
+
className: "".concat(prefixCls, "-header-body")
|
|
174
|
+
}, showTitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
+
className: "".concat(prefixCls, "-header-title"),
|
|
176
|
+
"x-semi-prop": "title"
|
|
177
|
+
}, title) : null, showContent ? /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
+
className: "".concat(prefixCls, "-header-content"),
|
|
179
|
+
"x-semi-prop": "content"
|
|
180
|
+
}, content) : null), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
181
|
+
className: "".concat(prefixCls, "-btn-close"),
|
|
182
|
+
icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, null),
|
|
183
|
+
size: "small",
|
|
184
|
+
theme: 'borderless',
|
|
185
|
+
type: cancelType,
|
|
186
|
+
onClick: this.handleCancel
|
|
187
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
188
|
+
className: "".concat(prefixCls, "-footer")
|
|
189
|
+
}, this.renderControls())))
|
|
190
|
+
);
|
|
173
191
|
}
|
|
174
192
|
|
|
175
193
|
render() {
|
|
@@ -52,10 +52,10 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
52
52
|
visible: PropTypes.Requireable<boolean>;
|
|
53
53
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
54
54
|
motion: PropTypes.Requireable<boolean | object>;
|
|
55
|
-
position: PropTypes.Requireable<"
|
|
55
|
+
position: PropTypes.Requireable<"bottom" | "left" | "right" | "top" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
56
56
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
57
57
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
58
|
-
trigger: PropTypes.Validator<"
|
|
58
|
+
trigger: PropTypes.Validator<"click" | "focus" | "custom" | "hover">;
|
|
59
59
|
contentClassName: PropTypes.Requireable<string | any[]>;
|
|
60
60
|
onVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
61
|
onClickOutSide: PropTypes.Requireable<(...args: any[]) => any>;
|
package/lib/cjs/radio/radio.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
66
66
|
preventScroll: PropTypes.Requireable<boolean>;
|
|
67
67
|
};
|
|
68
68
|
static defaultProps: Partial<RadioProps>;
|
|
69
|
+
static elementType: string;
|
|
69
70
|
radioEntity: RadioInner;
|
|
70
71
|
context: RadioContextValue;
|
|
71
72
|
foundation: RadioFoundation;
|
|
@@ -81,7 +82,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
81
82
|
prefixCls?: string;
|
|
82
83
|
name?: string;
|
|
83
84
|
onChange?: (e: RadioChangeEvent) => void;
|
|
84
|
-
buttonSize?: "small" | "
|
|
85
|
+
buttonSize?: "small" | "large" | "middle";
|
|
85
86
|
isCardRadio?: boolean;
|
|
86
87
|
isPureCardRadio?: boolean;
|
|
87
88
|
};
|
package/lib/cjs/radio/radio.js
CHANGED
|
@@ -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" | "large" | "middle">;
|
|
52
52
|
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
53
53
|
value: PropTypes.Requireable<any>;
|
|
54
54
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -168,7 +168,7 @@ declare class Select extends BaseComponent<SelectProps, SelectState> {
|
|
|
168
168
|
emptyContent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
169
169
|
onDropdownVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
170
170
|
zIndex: PropTypes.Requireable<number>;
|
|
171
|
-
position: PropTypes.Requireable<"
|
|
171
|
+
position: PropTypes.Requireable<"bottom" | "left" | "right" | "top" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
172
172
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
173
173
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
174
174
|
dropdownClassName: PropTypes.Requireable<string>;
|
package/lib/cjs/table/Table.d.ts
CHANGED
|
@@ -280,7 +280,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
280
280
|
* Combine pagination and table paging processing functions
|
|
281
281
|
*/
|
|
282
282
|
mergePagination: (pagination: TablePaginationProps) => {
|
|
283
|
-
position?: "
|
|
283
|
+
position?: "bottom" | "top" | "both";
|
|
284
284
|
formatPageText?: import("./interface").FormatPageText;
|
|
285
285
|
style?: React.CSSProperties;
|
|
286
286
|
className?: string;
|
|
@@ -300,7 +300,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
300
300
|
showSizeChanger?: boolean;
|
|
301
301
|
showQuickJumper?: boolean;
|
|
302
302
|
popoverZIndex?: number;
|
|
303
|
-
popoverPosition?: "
|
|
303
|
+
popoverPosition?: "bottom" | "left" | "right" | "top" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
304
304
|
hideOnSinglePage?: boolean;
|
|
305
305
|
hoverShowPageSelect?: boolean;
|
|
306
306
|
};
|
package/lib/cjs/tabs/TabBar.js
CHANGED
|
@@ -151,7 +151,11 @@ class TabBar extends _react.default.Component {
|
|
|
151
151
|
var _context5, _context6;
|
|
152
152
|
|
|
153
153
|
if ((0, _isEmpty2.default)(items)) {
|
|
154
|
-
return
|
|
154
|
+
return /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
155
|
+
disabled: true,
|
|
156
|
+
icon: icon,
|
|
157
|
+
theme: "borderless"
|
|
158
|
+
});
|
|
155
159
|
}
|
|
156
160
|
|
|
157
161
|
const {
|
package/lib/cjs/tag/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export default class Tag extends Component<TagProps, TagState> {
|
|
|
10
10
|
static defaultProps: TagProps;
|
|
11
11
|
static propTypes: {
|
|
12
12
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
13
|
-
tagKey: PropTypes.Requireable<
|
|
13
|
+
tagKey: PropTypes.Requireable<string | number>;
|
|
14
14
|
size: PropTypes.Requireable<string>;
|
|
15
15
|
color: PropTypes.Requireable<string>;
|
|
16
16
|
type: PropTypes.Requireable<string>;
|
package/lib/cjs/tag/index.js
CHANGED
|
@@ -255,7 +255,7 @@ Tag.defaultProps = {
|
|
|
255
255
|
};
|
|
256
256
|
Tag.propTypes = {
|
|
257
257
|
children: _propTypes.default.node,
|
|
258
|
-
tagKey: _propTypes.default.
|
|
258
|
+
tagKey: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
259
259
|
size: _propTypes.default.oneOf(tagSize),
|
|
260
260
|
color: _propTypes.default.oneOf(tagColors),
|
|
261
261
|
type: _propTypes.default.oneOf(tagType),
|
|
@@ -99,11 +99,11 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
|
|
|
99
99
|
'aria-required': PropTypes.Requireable<boolean>;
|
|
100
100
|
prefixCls: PropTypes.Requireable<string>;
|
|
101
101
|
clearText: PropTypes.Requireable<string>;
|
|
102
|
-
value: PropTypes.Requireable<string | number | string[] | number[] | Date
|
|
102
|
+
value: PropTypes.Requireable<string | number | string[] | Date | number[] | Date[]>;
|
|
103
103
|
inputReadOnly: PropTypes.Requireable<boolean>;
|
|
104
104
|
disabled: PropTypes.Requireable<boolean>;
|
|
105
105
|
showClear: PropTypes.Requireable<boolean>;
|
|
106
|
-
defaultValue: PropTypes.Requireable<string | number | string[] | number[] | Date
|
|
106
|
+
defaultValue: PropTypes.Requireable<string | number | string[] | Date | number[] | Date[]>;
|
|
107
107
|
open: PropTypes.Requireable<boolean>;
|
|
108
108
|
defaultOpen: PropTypes.Requireable<boolean>;
|
|
109
109
|
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[] | number[] | Date
|
|
9
|
+
declare const TimeShape: PropTypes.Requireable<string | number | string[] | Date | number[] | Date[]>;
|
|
10
10
|
export { TimeShape };
|
|
@@ -19,11 +19,11 @@ export default class LocaleTimePicker extends React.PureComponent<LocalePickerPr
|
|
|
19
19
|
'aria-required': import("prop-types").Requireable<boolean>;
|
|
20
20
|
prefixCls: import("prop-types").Requireable<string>;
|
|
21
21
|
clearText: import("prop-types").Requireable<string>;
|
|
22
|
-
value: import("prop-types").Requireable<string | number | string[] | number[] | Date
|
|
22
|
+
value: import("prop-types").Requireable<string | number | string[] | Date | number[] | Date[]>;
|
|
23
23
|
inputReadOnly: import("prop-types").Requireable<boolean>;
|
|
24
24
|
disabled: import("prop-types").Requireable<boolean>;
|
|
25
25
|
showClear: import("prop-types").Requireable<boolean>;
|
|
26
|
-
defaultValue: import("prop-types").Requireable<string | number | string[] | number[] | Date
|
|
26
|
+
defaultValue: import("prop-types").Requireable<string | number | string[] | Date | number[] | Date[]>;
|
|
27
27
|
open: import("prop-types").Requireable<boolean>;
|
|
28
28
|
defaultOpen: import("prop-types").Requireable<boolean>;
|
|
29
29
|
onOpenChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
@@ -80,11 +80,11 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
|
|
|
80
80
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
81
81
|
motion: PropTypes.Requireable<boolean | object>;
|
|
82
82
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
83
|
-
position: PropTypes.Requireable<"
|
|
83
|
+
position: PropTypes.Requireable<"bottom" | "left" | "right" | "top" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
84
84
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
85
85
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
86
86
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
87
|
-
trigger: PropTypes.Validator<"
|
|
87
|
+
trigger: PropTypes.Validator<"click" | "focus" | "custom" | "hover">;
|
|
88
88
|
className: PropTypes.Requireable<string>;
|
|
89
89
|
wrapperClassName: PropTypes.Requireable<string>;
|
|
90
90
|
clickToHide: PropTypes.Requireable<boolean>;
|
|
@@ -322,7 +322,8 @@ class Transfer extends _baseComponent.default {
|
|
|
322
322
|
const noMatch = inSearchMode && searchResult.size === 0;
|
|
323
323
|
const emptySearch = emptyContent.search ? emptyContent.search : locale.emptySearch;
|
|
324
324
|
const emptyLeft = emptyContent.left ? emptyContent.left : locale.emptyLeft;
|
|
325
|
-
const
|
|
325
|
+
const emptyDataCom = this.renderEmpty('left', emptyLeft);
|
|
326
|
+
const emptySearchCom = this.renderEmpty('left', emptySearch);
|
|
326
327
|
|
|
327
328
|
const loadingCom = /*#__PURE__*/_react.default.createElement(_spin.default, null);
|
|
328
329
|
|
|
@@ -334,7 +335,11 @@ class Transfer extends _baseComponent.default {
|
|
|
334
335
|
break;
|
|
335
336
|
|
|
336
337
|
case noMatch:
|
|
337
|
-
content =
|
|
338
|
+
content = emptySearchCom;
|
|
339
|
+
break;
|
|
340
|
+
|
|
341
|
+
case data.length === 0:
|
|
342
|
+
content = emptyDataCom;
|
|
338
343
|
break;
|
|
339
344
|
|
|
340
345
|
case type === _constants.strings.TYPE_TREE_TO_LIST:
|
|
@@ -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" | "secondary" | "tertiary" | "danger" | "quaternary">;
|
|
68
68
|
style: PropTypes.Requireable<object>;
|
|
69
69
|
className: PropTypes.Requireable<string>;
|
|
70
70
|
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -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" | "secondary" | "tertiary" | "danger" | "quaternary">;
|
|
33
33
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
34
34
|
spacing: PropTypes.Requireable<"normal" | "extended">;
|
|
35
35
|
style: PropTypes.Requireable<object>;
|
|
@@ -32,7 +32,7 @@ export default class Text extends PureComponent<TextProps> {
|
|
|
32
32
|
underline: PropTypes.Requireable<boolean>;
|
|
33
33
|
link: PropTypes.Requireable<boolean | object>;
|
|
34
34
|
strong: PropTypes.Requireable<boolean>;
|
|
35
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
35
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
|
|
36
36
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
37
37
|
style: PropTypes.Requireable<object>;
|
|
38
38
|
className: PropTypes.Requireable<string>;
|
|
@@ -36,7 +36,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
36
36
|
link: PropTypes.Requireable<boolean | object>;
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
39
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "tertiary" | "danger" | "quaternary">;
|
|
40
40
|
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 5 | 6>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
@@ -126,7 +126,7 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
|
|
|
126
126
|
onSuccess: PropTypes.Requireable<(...args: any[]) => any>;
|
|
127
127
|
previewFile: PropTypes.Requireable<(...args: any[]) => any>;
|
|
128
128
|
prompt: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
129
|
-
promptPosition: PropTypes.Requireable<"
|
|
129
|
+
promptPosition: PropTypes.Requireable<"bottom" | "left" | "right">;
|
|
130
130
|
renderFileItem: PropTypes.Requireable<(...args: any[]) => any>;
|
|
131
131
|
renderPicPreviewIcon: PropTypes.Requireable<(...args: any[]) => any>;
|
|
132
132
|
renderFileOperation: PropTypes.Requireable<(...args: any[]) => any>;
|
package/lib/es/anchor/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
|
|
|
46
46
|
offsetTop: PropTypes.Requireable<number>;
|
|
47
47
|
targetOffset: PropTypes.Requireable<number>;
|
|
48
48
|
showTooltip: PropTypes.Requireable<boolean>;
|
|
49
|
-
position: PropTypes.Requireable<"
|
|
49
|
+
position: PropTypes.Requireable<"bottom" | "left" | "right" | "top" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
50
50
|
maxWidth: PropTypes.Requireable<string | number>;
|
|
51
51
|
maxHeight: PropTypes.Requireable<string | number>;
|
|
52
52
|
getContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -113,7 +113,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
113
113
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
114
114
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
115
115
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
116
|
-
position: PropTypes.Requireable<"
|
|
116
|
+
position: PropTypes.Requireable<"bottom" | "left" | "right" | "top" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
117
117
|
placeholder: PropTypes.Requireable<string>;
|
|
118
118
|
prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
119
119
|
onChangeWithObject: PropTypes.Requireable<boolean>;
|
package/lib/es/avatar/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export default class Avatar extends BaseComponent<AvatarProps, AvatarState> {
|
|
|
20
20
|
onMouseEnter: typeof noop;
|
|
21
21
|
onMouseLeave: typeof noop;
|
|
22
22
|
};
|
|
23
|
+
static elementType: string;
|
|
23
24
|
static propTypes: {
|
|
24
25
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
25
26
|
color: PropTypes.Requireable<string>;
|
package/lib/es/avatar/index.js
CHANGED
|
@@ -48,14 +48,14 @@ export default class Button extends PureComponent<ButtonProps> {
|
|
|
48
48
|
prefixCls: PropTypes.Requireable<string>;
|
|
49
49
|
style: PropTypes.Requireable<object>;
|
|
50
50
|
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
51
|
-
type: PropTypes.Requireable<"warning" | "primary" | "
|
|
51
|
+
type: PropTypes.Requireable<"warning" | "primary" | "secondary" | "tertiary" | "danger">;
|
|
52
52
|
block: PropTypes.Requireable<boolean>;
|
|
53
53
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
54
|
onMouseDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
55
55
|
circle: PropTypes.Requireable<boolean>;
|
|
56
56
|
loading: PropTypes.Requireable<boolean>;
|
|
57
57
|
htmlType: PropTypes.Requireable<"button" | "reset" | "submit">;
|
|
58
|
-
theme: PropTypes.Requireable<"solid" | "
|
|
58
|
+
theme: PropTypes.Requireable<"solid" | "borderless" | "light">;
|
|
59
59
|
className: PropTypes.Requireable<string>;
|
|
60
60
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
61
61
|
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -19,11 +19,12 @@ export default class ButtonGroup extends BaseComponent<ButtonGroupProps> {
|
|
|
19
19
|
disabled: PropTypes.Requireable<boolean>;
|
|
20
20
|
type: PropTypes.Requireable<string>;
|
|
21
21
|
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
22
|
-
theme: PropTypes.Requireable<"solid" | "
|
|
22
|
+
theme: PropTypes.Requireable<"solid" | "borderless" | "light">;
|
|
23
23
|
'aria-label': PropTypes.Requireable<string>;
|
|
24
24
|
};
|
|
25
25
|
static defaultProps: {
|
|
26
26
|
size: string;
|
|
27
27
|
};
|
|
28
|
+
getInnerWithLine(inner: any): any;
|
|
28
29
|
render(): JSX.Element;
|
|
29
30
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import _get from "lodash/get";
|
|
1
2
|
import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
|
|
2
3
|
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
4
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
5
|
+
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
6
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
3
7
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
4
8
|
import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
|
|
5
9
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
@@ -24,6 +28,47 @@ import '@douyinfe/semi-foundation/lib/es/button/button.css';
|
|
|
24
28
|
const prefixCls = cssClasses.PREFIX;
|
|
25
29
|
const btnSizes = strings.sizes;
|
|
26
30
|
export default class ButtonGroup extends BaseComponent {
|
|
31
|
+
getInnerWithLine(inner) {
|
|
32
|
+
const innerWithLine = [];
|
|
33
|
+
let lineCls = "".concat(prefixCls, "-group-line");
|
|
34
|
+
|
|
35
|
+
if (inner.length > 1) {
|
|
36
|
+
var _context;
|
|
37
|
+
|
|
38
|
+
_forEachInstanceProperty(_context = _sliceInstanceProperty(inner).call(inner, 0, -1)).call(_context, item => {
|
|
39
|
+
const isButtonType = _get(item, 'type.elementType') === 'Button';
|
|
40
|
+
|
|
41
|
+
const buttonProps = _get(item, 'props');
|
|
42
|
+
|
|
43
|
+
if (buttonProps) {
|
|
44
|
+
var _context2, _context3;
|
|
45
|
+
|
|
46
|
+
const {
|
|
47
|
+
type,
|
|
48
|
+
theme,
|
|
49
|
+
disabled
|
|
50
|
+
} = buttonProps;
|
|
51
|
+
lineCls = classNames("".concat(prefixCls, "-group-line"), _concatInstanceProperty(_context2 = "".concat(prefixCls, "-group-line-")).call(_context2, theme !== null && theme !== void 0 ? theme : 'light'), _concatInstanceProperty(_context3 = "".concat(prefixCls, "-group-line-")).call(_context3, type !== null && type !== void 0 ? type : 'primary'), {
|
|
52
|
+
["".concat(prefixCls, "-group-line-disabled")]: disabled
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (isButtonType) {
|
|
57
|
+
innerWithLine.push(item, /*#__PURE__*/React.createElement("span", {
|
|
58
|
+
className: lineCls
|
|
59
|
+
}));
|
|
60
|
+
} else {
|
|
61
|
+
innerWithLine.push(item);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
innerWithLine.push(_sliceInstanceProperty(inner).call(inner, -1));
|
|
66
|
+
return innerWithLine;
|
|
67
|
+
} else {
|
|
68
|
+
return inner;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
27
72
|
render() {
|
|
28
73
|
const _a = this.props,
|
|
29
74
|
{
|
|
@@ -37,25 +82,27 @@ export default class ButtonGroup extends BaseComponent {
|
|
|
37
82
|
rest = __rest(_a, ["children", "disabled", "size", "type", "className", 'aria-label']);
|
|
38
83
|
|
|
39
84
|
let inner;
|
|
85
|
+
let innerWithLine = [];
|
|
40
86
|
const cls = classNames("".concat(prefixCls, "-group"), className);
|
|
41
87
|
|
|
42
88
|
if (children) {
|
|
43
|
-
var
|
|
89
|
+
var _context4;
|
|
44
90
|
|
|
45
|
-
inner = _mapInstanceProperty(
|
|
91
|
+
inner = _mapInstanceProperty(_context4 = _Array$isArray(children) ? children : [children]).call(_context4, (itm, index) => /*#__PURE__*/isValidElement(itm) ? /*#__PURE__*/cloneElement(itm, _Object$assign(_Object$assign(_Object$assign({
|
|
46
92
|
disabled,
|
|
47
93
|
size,
|
|
48
94
|
type
|
|
49
95
|
}, itm.props), rest), {
|
|
50
96
|
key: index
|
|
51
97
|
})) : itm);
|
|
98
|
+
innerWithLine = this.getInnerWithLine(inner);
|
|
52
99
|
}
|
|
53
100
|
|
|
54
101
|
return /*#__PURE__*/React.createElement("div", {
|
|
55
102
|
className: cls,
|
|
56
103
|
role: "group",
|
|
57
104
|
"aria-label": ariaLabel
|
|
58
|
-
},
|
|
105
|
+
}, innerWithLine);
|
|
59
106
|
}
|
|
60
107
|
|
|
61
108
|
}
|
package/lib/es/button/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
|
|
|
23
23
|
onMouseLeave: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
24
24
|
disabled: import("prop-types").Requireable<boolean>;
|
|
25
25
|
size: import("prop-types").Requireable<"default" | "small" | "large">;
|
|
26
|
-
type: import("prop-types").Requireable<"warning" | "primary" | "
|
|
26
|
+
type: import("prop-types").Requireable<"warning" | "primary" | "secondary" | "tertiary" | "danger">;
|
|
27
27
|
block: import("prop-types").Requireable<boolean>;
|
|
28
28
|
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
29
29
|
onMouseDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
@@ -31,6 +31,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
|
|
|
31
31
|
htmlType: import("prop-types").Requireable<"button" | "reset" | "submit">;
|
|
32
32
|
'aria-label': import("prop-types").Requireable<string>;
|
|
33
33
|
};
|
|
34
|
+
static elementType: string;
|
|
34
35
|
constructor(props?: {});
|
|
35
36
|
render(): JSX.Element;
|
|
36
37
|
}
|
package/lib/es/button/index.js
CHANGED
|
@@ -8,11 +8,11 @@ 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<"primary" | "
|
|
11
|
+
theme: PropTypes.Requireable<"primary" | "light" | "dark">;
|
|
12
12
|
total: PropTypes.Requireable<number>;
|
|
13
13
|
onIndicatorChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
14
|
type: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
15
|
-
trigger: PropTypes.Requireable<"
|
|
15
|
+
trigger: PropTypes.Requireable<"click" | "hover">;
|
|
16
16
|
};
|
|
17
17
|
onIndicatorChange: (activeIndex: number) => void;
|
|
18
18
|
handleIndicatorClick: (activeIndex: number) => void;
|
|
@@ -22,15 +22,15 @@ 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<"primary" | "
|
|
25
|
+
theme: PropTypes.Requireable<"primary" | "light" | "dark">;
|
|
26
26
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
arrowType: PropTypes.Requireable<"
|
|
27
|
+
arrowType: PropTypes.Requireable<"always" | "hover">;
|
|
28
28
|
showArrow: PropTypes.Requireable<boolean>;
|
|
29
29
|
showIndicator: PropTypes.Requireable<boolean>;
|
|
30
30
|
slideDirection: PropTypes.Requireable<"left" | "right">;
|
|
31
31
|
speed: PropTypes.Requireable<number>;
|
|
32
32
|
style: PropTypes.Requireable<object>;
|
|
33
|
-
trigger: PropTypes.Requireable<"
|
|
33
|
+
trigger: PropTypes.Requireable<"click" | "hover">;
|
|
34
34
|
};
|
|
35
35
|
static defaultProps: CarouselProps;
|
|
36
36
|
foundation: CarouselFoundation;
|
|
@@ -107,7 +107,7 @@ declare class Cascader extends BaseComponent<CascaderProps, CascaderState> {
|
|
|
107
107
|
zIndex: PropTypes.Requireable<number>;
|
|
108
108
|
value: PropTypes.Requireable<string | number | any[]>;
|
|
109
109
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
110
|
-
showNext: PropTypes.Requireable<"
|
|
110
|
+
showNext: PropTypes.Requireable<"click" | "hover">;
|
|
111
111
|
stopPropagation: PropTypes.Requireable<string | boolean>;
|
|
112
112
|
showClear: PropTypes.Requireable<boolean>;
|
|
113
113
|
defaultOpen: PropTypes.Requireable<boolean>;
|
|
@@ -48,7 +48,7 @@ export default class Item extends PureComponent<CascaderItemProps> {
|
|
|
48
48
|
onItemClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
49
|
onItemHover: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
50
|
multiple: PropTypes.Requireable<boolean>;
|
|
51
|
-
showNext: PropTypes.Requireable<"
|
|
51
|
+
showNext: PropTypes.Requireable<"click" | "hover">;
|
|
52
52
|
checkedKeys: PropTypes.Requireable<object>;
|
|
53
53
|
halfCheckedKeys: PropTypes.Requireable<object>;
|
|
54
54
|
onItemCheckboxClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -67,6 +67,7 @@ declare class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
|
67
67
|
onMouseLeave: (...args: any[]) => void;
|
|
68
68
|
type: string;
|
|
69
69
|
};
|
|
70
|
+
static elementType: string;
|
|
70
71
|
checkboxEntity: CheckboxInner;
|
|
71
72
|
context: CheckboxContextType;
|
|
72
73
|
get adapter(): CheckboxAdapter<CheckboxProps, CheckboxState>;
|