@douyinfe/semi-ui 2.19.0-alpha.1 → 2.19.0-alpha.4

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.
Files changed (50) hide show
  1. package/checkbox/_story/checkbox.stories.js +2 -0
  2. package/checkbox/checkbox.tsx +22 -19
  3. package/checkbox/checkboxGroup.tsx +0 -2
  4. package/dist/css/semi.css +16 -10
  5. package/dist/css/semi.min.css +1 -1
  6. package/dist/umd/semi-ui.js +144 -78
  7. package/dist/umd/semi-ui.js.map +1 -1
  8. package/dist/umd/semi-ui.min.js +1 -1
  9. package/dist/umd/semi-ui.min.js.map +1 -1
  10. package/form/baseForm.tsx +0 -1
  11. package/lib/cjs/checkbox/checkbox.js +18 -10
  12. package/lib/cjs/checkbox/checkboxGroup.js +2 -4
  13. package/lib/cjs/form/baseForm.d.ts +1 -1
  14. package/lib/cjs/form/baseForm.js +0 -1
  15. package/lib/cjs/form/field.d.ts +1 -1
  16. package/lib/cjs/popconfirm/index.d.ts +4 -2
  17. package/lib/cjs/popconfirm/index.js +49 -31
  18. package/lib/cjs/radio/radioGroup.js +2 -4
  19. package/lib/cjs/table/ColumnFilter.js +4 -2
  20. package/lib/cjs/table/ColumnSorter.d.ts +1 -0
  21. package/lib/cjs/table/ColumnSorter.js +9 -6
  22. package/lib/cjs/table/Table.js +11 -4
  23. package/lib/cjs/tabs/TabBar.js +5 -1
  24. package/lib/cjs/transfer/index.js +7 -2
  25. package/lib/cjs/typography/title.d.ts +1 -1
  26. package/lib/es/checkbox/checkbox.js +18 -10
  27. package/lib/es/checkbox/checkboxGroup.js +2 -4
  28. package/lib/es/form/baseForm.d.ts +1 -1
  29. package/lib/es/form/baseForm.js +0 -1
  30. package/lib/es/form/field.d.ts +1 -1
  31. package/lib/es/popconfirm/index.d.ts +4 -2
  32. package/lib/es/popconfirm/index.js +49 -31
  33. package/lib/es/radio/radioGroup.js +2 -4
  34. package/lib/es/table/ColumnFilter.js +4 -2
  35. package/lib/es/table/ColumnSorter.d.ts +1 -0
  36. package/lib/es/table/ColumnSorter.js +9 -6
  37. package/lib/es/table/Table.js +10 -4
  38. package/lib/es/tabs/TabBar.js +5 -1
  39. package/lib/es/transfer/index.js +7 -2
  40. package/lib/es/typography/title.d.ts +1 -1
  41. package/package.json +7 -7
  42. package/popconfirm/_story/popconfirm.stories.js +37 -1
  43. package/popconfirm/index.tsx +14 -6
  44. package/radio/radioGroup.tsx +0 -2
  45. package/table/ColumnFilter.tsx +2 -1
  46. package/table/ColumnSorter.tsx +16 -10
  47. package/table/Table.tsx +7 -4
  48. package/tabs/TabBar.tsx +7 -1
  49. package/transfer/index.tsx +7 -2
  50. package/webpack.config.js +3 -1
package/form/baseForm.tsx CHANGED
@@ -151,7 +151,6 @@ class Form extends BaseComponent<BaseFormProps, BaseFormState> {
151
151
 
152
152
  componentWillUnmount() {
153
153
  this.foundation.destroy();
154
- this.formApi = null;
155
154
  }
156
155
 
157
156
  get adapter(): BaseFormAdapter<BaseFormProps, BaseFormState> {
@@ -211,15 +211,23 @@ class Checkbox extends _baseComponent.default {
211
211
  const name = inGroup && this.context.checkboxGroup.name;
212
212
  const xSemiPropChildren = this.props['x-semi-children-alias'] || 'children';
213
213
 
214
- const renderContent = () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children ? /*#__PURE__*/_react.default.createElement("span", {
215
- id: addonId,
216
- className: "".concat(prefix, "-addon"),
217
- "x-semi-prop": xSemiPropChildren
218
- }, children) : null, extra ? /*#__PURE__*/_react.default.createElement("div", {
219
- id: extraId,
220
- className: extraCls,
221
- "x-semi-prop": "extra"
222
- }, extra) : null);
214
+ const renderContent = () => {
215
+ if (!children && !extra) {
216
+ return null;
217
+ }
218
+
219
+ return /*#__PURE__*/_react.default.createElement("div", {
220
+ className: "".concat(prefix, "-content")
221
+ }, children ? /*#__PURE__*/_react.default.createElement("span", {
222
+ id: addonId,
223
+ className: "".concat(prefix, "-addon"),
224
+ "x-semi-prop": xSemiPropChildren
225
+ }, children) : null, extra ? /*#__PURE__*/_react.default.createElement("div", {
226
+ id: extraId,
227
+ className: extraCls,
228
+ "x-semi-prop": "extra"
229
+ }, extra) : null);
230
+ };
223
231
 
224
232
  return (
225
233
  /*#__PURE__*/
@@ -245,7 +253,7 @@ class Checkbox extends _baseComponent.default {
245
253
  focusInner: focusVisible && !focusOuter,
246
254
  onInputFocus: this.handleFocusVisible,
247
255
  onInputBlur: this.handleBlur
248
- })), props.isCardType ? /*#__PURE__*/_react.default.createElement("div", null, renderContent()) : renderContent())
256
+ })), renderContent())
249
257
  );
250
258
  }
251
259
 
@@ -118,8 +118,7 @@ class CheckboxGroup extends _baseComponent.default {
118
118
  key: index,
119
119
  disabled: this.props.disabled,
120
120
  value: option,
121
- prefixCls: prefixCls,
122
- type: type
121
+ prefixCls: prefixCls
123
122
  }, option);
124
123
  } else {
125
124
  return /*#__PURE__*/_react.default.createElement(_checkbox.default, {
@@ -131,8 +130,7 @@ class CheckboxGroup extends _baseComponent.default {
131
130
  extra: option.extra,
132
131
  className: option.className,
133
132
  style: option.style,
134
- onChange: option.onChange,
135
- type: type
133
+ onChange: option.onChange
136
134
  }, option.label);
137
135
  }
138
136
  });
@@ -126,7 +126,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
126
126
  onListScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
127
127
  children?: React.ReactNode;
128
128
  preventScroll?: boolean;
129
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
129
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
130
130
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
131
131
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
132
132
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -106,7 +106,6 @@ class Form extends _baseComponent.default {
106
106
 
107
107
  componentWillUnmount() {
108
108
  this.foundation.destroy();
109
- this.formApi = null;
110
109
  }
111
110
 
112
111
  get adapter() {
@@ -74,7 +74,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
74
74
  onListScroll?: (e: import("react").UIEvent<HTMLDivElement, UIEvent>) => void;
75
75
  children?: import("react").ReactNode;
76
76
  preventScroll?: boolean;
77
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
77
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
78
78
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
79
79
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
80
80
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
@@ -27,13 +27,15 @@ export interface PopconfirmProps extends PopoverProps {
27
27
  zIndex?: number;
28
28
  trigger?: Trigger;
29
29
  position?: Position;
30
- onCancel?: (e: React.MouseEvent) => void;
31
- onConfirm?: (e: React.MouseEvent) => void;
30
+ onCancel?: (e: React.MouseEvent) => Promise<any> | void;
31
+ onConfirm?: (e: React.MouseEvent) => Promise<any> | void;
32
32
  onVisibleChange?: (visible: boolean) => void;
33
33
  onClickOutSide?: (e: React.MouseEvent) => void;
34
34
  }
35
35
  export interface PopconfirmState {
36
36
  visible: boolean;
37
+ cancelLoading: boolean;
38
+ confirmLoading: boolean;
37
39
  }
38
40
  export default class Popconfirm extends BaseComponent<PopconfirmProps, PopconfirmState> {
39
41
  static contextType: React.Context<ContextValue>;
@@ -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 /*#__PURE__*/_react.default.createElement("div", {
145
- className: popCardCls,
146
- onClick: this.stopImmediatePropagation,
147
- style: style
148
- }, /*#__PURE__*/_react.default.createElement("div", {
149
- className: "".concat(prefixCls, "-inner")
150
- }, /*#__PURE__*/_react.default.createElement("div", {
151
- className: "".concat(prefixCls, "-header")
152
- }, /*#__PURE__*/_react.default.createElement("i", {
153
- className: "".concat(prefixCls, "-header-icon"),
154
- "x-semi-prop": "icon"
155
- }, /*#__PURE__*/_react.default.isValidElement(icon) ? icon : null), /*#__PURE__*/_react.default.createElement("div", {
156
- className: "".concat(prefixCls, "-header-body")
157
- }, showTitle ? /*#__PURE__*/_react.default.createElement("div", {
158
- className: "".concat(prefixCls, "-header-title"),
159
- "x-semi-prop": "title"
160
- }, title) : null, showContent ? /*#__PURE__*/_react.default.createElement("div", {
161
- className: "".concat(prefixCls, "-header-content"),
162
- "x-semi-prop": "content"
163
- }, content) : null), /*#__PURE__*/_react.default.createElement(_button.default, {
164
- className: "".concat(prefixCls, "-btn-close"),
165
- icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, null),
166
- size: "small",
167
- theme: 'borderless',
168
- type: cancelType,
169
- onClick: this.handleCancel
170
- })), /*#__PURE__*/_react.default.createElement("div", {
171
- className: "".concat(prefixCls, "-footer")
172
- }, this.renderControls())));
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() {
@@ -124,8 +124,7 @@ class RadioGroup extends _baseComponent.default {
124
124
  return /*#__PURE__*/_react.default.createElement(_radio.default, {
125
125
  key: index,
126
126
  disabled: this.props.disabled,
127
- value: option,
128
- type: type
127
+ value: option
129
128
  }, option);
130
129
  } else {
131
130
  return /*#__PURE__*/_react.default.createElement(_radio.default, {
@@ -134,8 +133,7 @@ class RadioGroup extends _baseComponent.default {
134
133
  value: option.value,
135
134
  extra: option.extra,
136
135
  className: option.className,
137
- style: option.style,
138
- type: type
136
+ style: option.style
139
137
  }, option.label);
140
138
  }
141
139
  });
@@ -179,12 +179,14 @@ function ColumnFilter() {
179
179
  } else {
180
180
  iconElem = /*#__PURE__*/_react.default.createElement("div", {
181
181
  className: finalCls
182
- }, /*#__PURE__*/_react.default.createElement(_semiIcons.IconFilter, {
182
+ }, '\u200b'
183
+ /* ZWSP(zero-width space) */
184
+ , /*#__PURE__*/_react.default.createElement(_semiIcons.IconFilter, {
183
185
  role: "button",
184
186
  "aria-label": "Filter data with this column",
185
187
  "aria-haspopup": "listbox",
186
188
  tabIndex: -1,
187
- size: "small"
189
+ size: "default"
188
190
  }));
189
191
  }
190
192
 
@@ -7,6 +7,7 @@ export interface ColumnSorterProps {
7
7
  onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
8
8
  prefixCls?: string;
9
9
  sortOrder?: SortOrder;
10
+ title?: React.ReactNode;
10
11
  }
11
12
  export default class ColumnSorter extends PureComponent<ColumnSorterProps> {
12
13
  static propTypes: {
@@ -40,9 +40,10 @@ class ColumnSorter extends _react.PureComponent {
40
40
  prefixCls,
41
41
  onClick,
42
42
  sortOrder,
43
- style
43
+ style,
44
+ title
44
45
  } = this.props;
45
- const iconBtnSize = 'small';
46
+ const iconBtnSize = 'default';
46
47
  const upCls = (0, _classnames.default)("".concat(prefixCls, "-column-sorter-up"), {
47
48
  on: sortOrder === _constants.strings.SORT_DIRECTIONS[0]
48
49
  });
@@ -61,11 +62,13 @@ class ColumnSorter extends _react.PureComponent {
61
62
  role: 'button'
62
63
  }, ariaProps, {
63
64
  tabIndex: -1,
64
- style: style,
65
- className: "".concat(prefixCls, "-column-sorter"),
65
+ className: "".concat(prefixCls, "-column-sorter-wrapper"),
66
66
  onClick: onClick,
67
67
  onKeyPress: e => (0, _isEnterPress.default)(e) && onClick(e)
68
- }), /*#__PURE__*/_react.default.createElement("span", {
68
+ }), title, /*#__PURE__*/_react.default.createElement("div", {
69
+ style: style,
70
+ className: "".concat(prefixCls, "-column-sorter")
71
+ }, /*#__PURE__*/_react.default.createElement("span", {
69
72
  className: "".concat(upCls)
70
73
  }, /*#__PURE__*/_react.default.createElement(_semiIcons.IconCaretup, {
71
74
  size: iconBtnSize
@@ -73,7 +76,7 @@ class ColumnSorter extends _react.PureComponent {
73
76
  className: "".concat(downCls)
74
77
  }, /*#__PURE__*/_react.default.createElement(_semiIcons.IconCaretdown, {
75
78
  size: iconBtnSize
76
- })));
79
+ }))));
77
80
  }
78
81
 
79
82
  }
@@ -555,15 +555,24 @@ class Table extends _baseComponent.default {
555
555
  const defaultSortOrder = (0, _get2.default)(curQuery, 'defaultSortOrder', false);
556
556
  const sortOrder = _this.foundation.isSortOrderValid(stateSortOrder) ? stateSortOrder : defaultSortOrder;
557
557
 
558
+ const TitleNode = typeof rawTitle !== 'function' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
559
+ key: _constants.strings.DEFAULT_KEY_COLUMN_TITLE
560
+ }, rawTitle);
561
+
558
562
  if (typeof column.sorter === 'function' || column.sorter === true) {
563
+ // In order to increase the click hot area of ​​sorting, when sorting is required & useFullRender is false,
564
+ // both the title and sorting areas are used as the click hot area for sorting。
559
565
  const sorter = /*#__PURE__*/_react.default.createElement(_ColumnSorter.default, {
560
566
  key: _constants.strings.DEFAULT_KEY_COLUMN_SORTER,
561
567
  sortOrder: sortOrder,
562
- onClick: e => _this.foundation.handleSort(column, e)
568
+ onClick: e => _this.foundation.handleSort(column, e),
569
+ title: TitleNode
563
570
  });
564
571
 
565
572
  useFullRender && (titleMap.sorter = sorter);
566
573
  titleArr.push(sorter);
574
+ } else {
575
+ titleArr.push(TitleNode);
567
576
  }
568
577
 
569
578
  const stateFilteredValue = (0, _get2.default)(curQuery, 'filteredValue');
@@ -583,9 +592,7 @@ class Table extends _baseComponent.default {
583
592
  titleArr.push(filter);
584
593
  }
585
594
 
586
- const newTitle = typeof rawTitle === 'function' ? () => rawTitle(titleMap) : titleArr.unshift( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
587
- key: _constants.strings.DEFAULT_KEY_COLUMN_TITLE
588
- }, rawTitle)) && titleArr;
595
+ const newTitle = typeof rawTitle === 'function' ? () => rawTitle(titleMap) : titleArr;
589
596
  column = (0, _assign.default)((0, _assign.default)({}, column), {
590
597
  title: newTitle
591
598
  });
@@ -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 null;
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 {
@@ -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 emptyCom = this.renderEmpty('left', inputValue ? emptySearch : emptyLeft);
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 = emptyCom;
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:
@@ -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<4 | 2 | 1 | 3 | 5 | 6>;
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>;
@@ -187,15 +187,23 @@ class Checkbox extends BaseComponent {
187
187
  const name = inGroup && this.context.checkboxGroup.name;
188
188
  const xSemiPropChildren = this.props['x-semi-children-alias'] || 'children';
189
189
 
190
- const renderContent = () => /*#__PURE__*/React.createElement(React.Fragment, null, children ? /*#__PURE__*/React.createElement("span", {
191
- id: addonId,
192
- className: "".concat(prefix, "-addon"),
193
- "x-semi-prop": xSemiPropChildren
194
- }, children) : null, extra ? /*#__PURE__*/React.createElement("div", {
195
- id: extraId,
196
- className: extraCls,
197
- "x-semi-prop": "extra"
198
- }, extra) : null);
190
+ const renderContent = () => {
191
+ if (!children && !extra) {
192
+ return null;
193
+ }
194
+
195
+ return /*#__PURE__*/React.createElement("div", {
196
+ className: "".concat(prefix, "-content")
197
+ }, children ? /*#__PURE__*/React.createElement("span", {
198
+ id: addonId,
199
+ className: "".concat(prefix, "-addon"),
200
+ "x-semi-prop": xSemiPropChildren
201
+ }, children) : null, extra ? /*#__PURE__*/React.createElement("div", {
202
+ id: extraId,
203
+ className: extraCls,
204
+ "x-semi-prop": "extra"
205
+ }, extra) : null);
206
+ };
199
207
 
200
208
  return (
201
209
  /*#__PURE__*/
@@ -221,7 +229,7 @@ class Checkbox extends BaseComponent {
221
229
  focusInner: focusVisible && !focusOuter,
222
230
  onInputFocus: this.handleFocusVisible,
223
231
  onInputBlur: this.handleBlur
224
- })), props.isCardType ? /*#__PURE__*/React.createElement("div", null, renderContent()) : renderContent())
232
+ })), renderContent())
225
233
  );
226
234
  }
227
235
 
@@ -96,8 +96,7 @@ class CheckboxGroup extends BaseComponent {
96
96
  key: index,
97
97
  disabled: this.props.disabled,
98
98
  value: option,
99
- prefixCls: prefixCls,
100
- type: type
99
+ prefixCls: prefixCls
101
100
  }, option);
102
101
  } else {
103
102
  return /*#__PURE__*/React.createElement(Checkbox, {
@@ -109,8 +108,7 @@ class CheckboxGroup extends BaseComponent {
109
108
  extra: option.extra,
110
109
  className: option.className,
111
110
  style: option.style,
112
- onChange: option.onChange,
113
- type: type
111
+ onChange: option.onChange
114
112
  }, option.label);
115
113
  }
116
114
  });
@@ -126,7 +126,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
126
126
  onListScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
127
127
  children?: React.ReactNode;
128
128
  preventScroll?: boolean;
129
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
129
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
130
130
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
131
131
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
132
132
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -68,7 +68,6 @@ class Form extends BaseComponent {
68
68
 
69
69
  componentWillUnmount() {
70
70
  this.foundation.destroy();
71
- this.formApi = null;
72
71
  }
73
72
 
74
73
  get adapter() {
@@ -74,7 +74,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
74
74
  onListScroll?: (e: import("react").UIEvent<HTMLDivElement, UIEvent>) => void;
75
75
  children?: import("react").ReactNode;
76
76
  preventScroll?: boolean;
77
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
77
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
78
78
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
79
79
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
80
80
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
@@ -27,13 +27,15 @@ export interface PopconfirmProps extends PopoverProps {
27
27
  zIndex?: number;
28
28
  trigger?: Trigger;
29
29
  position?: Position;
30
- onCancel?: (e: React.MouseEvent) => void;
31
- onConfirm?: (e: React.MouseEvent) => void;
30
+ onCancel?: (e: React.MouseEvent) => Promise<any> | void;
31
+ onConfirm?: (e: React.MouseEvent) => Promise<any> | void;
32
32
  onVisibleChange?: (visible: boolean) => void;
33
33
  onClickOutSide?: (e: React.MouseEvent) => void;
34
34
  }
35
35
  export interface PopconfirmState {
36
36
  visible: boolean;
37
+ cancelLoading: boolean;
38
+ confirmLoading: boolean;
37
39
  }
38
40
  export default class Popconfirm extends BaseComponent<PopconfirmProps, PopconfirmState> {
39
41
  static contextType: React.Context<ContextValue>;