@douyinfe/semi-ui 2.12.0 → 2.12.1-alpha.2

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 (206) hide show
  1. package/avatar/index.tsx +2 -2
  2. package/backtop/index.tsx +11 -7
  3. package/badge/index.tsx +1 -1
  4. package/banner/index.tsx +5 -5
  5. package/breadcrumb/index.tsx +5 -3
  6. package/button/Button.tsx +10 -8
  7. package/card/index.tsx +43 -41
  8. package/carousel/CarouselArrow.tsx +2 -0
  9. package/carousel/index.tsx +1 -0
  10. package/cascader/index.tsx +101 -123
  11. package/cascader/item.tsx +1 -1
  12. package/checkbox/checkbox.tsx +13 -2
  13. package/collapsible/index.tsx +8 -1
  14. package/datePicker/dateInput.tsx +1 -0
  15. package/datePicker/datePicker.tsx +13 -5
  16. package/dist/css/semi.css +40 -40
  17. package/dist/css/semi.min.css +1 -1
  18. package/dist/umd/semi-ui.js +491 -362
  19. package/dist/umd/semi-ui.js.map +1 -1
  20. package/dist/umd/semi-ui.min.js +1 -1
  21. package/dist/umd/semi-ui.min.js.map +1 -1
  22. package/divider/index.tsx +8 -4
  23. package/dropdown/index.tsx +1 -1
  24. package/empty/index.tsx +13 -5
  25. package/form/hoc/withField.tsx +1 -1
  26. package/form/label.tsx +1 -1
  27. package/grid/col.tsx +1 -1
  28. package/grid/row.tsx +1 -1
  29. package/iconButton/index.tsx +2 -1
  30. package/input/index.tsx +38 -11
  31. package/lib/cjs/avatar/index.js +4 -2
  32. package/lib/cjs/backtop/index.js +2 -1
  33. package/lib/cjs/badge/index.js +2 -1
  34. package/lib/cjs/banner/index.js +9 -4
  35. package/lib/cjs/breadcrumb/index.js +4 -3
  36. package/lib/cjs/button/Button.d.ts +1 -1
  37. package/lib/cjs/button/Button.js +13 -3
  38. package/lib/cjs/button/index.d.ts +1 -1
  39. package/lib/cjs/card/index.js +10 -5
  40. package/lib/cjs/carousel/CarouselArrow.js +6 -2
  41. package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
  42. package/lib/cjs/carousel/index.d.ts +1 -1
  43. package/lib/cjs/carousel/index.js +2 -1
  44. package/lib/cjs/cascader/index.js +9 -6
  45. package/lib/cjs/cascader/item.js +2 -1
  46. package/lib/cjs/checkbox/checkbox.js +8 -4
  47. package/lib/cjs/collapsible/index.js +2 -1
  48. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  49. package/lib/cjs/datePicker/dateInput.js +2 -1
  50. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  51. package/lib/cjs/datePicker/datePicker.js +4 -2
  52. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  53. package/lib/cjs/divider/index.js +2 -1
  54. package/lib/cjs/dropdown/index.js +2 -1
  55. package/lib/cjs/empty/index.js +8 -4
  56. package/lib/cjs/form/baseForm.d.ts +1 -1
  57. package/lib/cjs/form/field.d.ts +1 -1
  58. package/lib/cjs/form/hoc/withField.js +2 -1
  59. package/lib/cjs/form/label.js +2 -1
  60. package/lib/cjs/grid/col.js +2 -1
  61. package/lib/cjs/grid/row.js +2 -1
  62. package/lib/cjs/iconButton/index.js +3 -1
  63. package/lib/cjs/input/index.js +9 -5
  64. package/lib/cjs/list/index.js +6 -3
  65. package/lib/cjs/modal/ConfirmModal.js +2 -1
  66. package/lib/cjs/modal/Modal.js +6 -2
  67. package/lib/cjs/modal/ModalContent.js +13 -6
  68. package/lib/cjs/modal/confirm.d.ts +5 -5
  69. package/lib/cjs/notification/notice.js +6 -3
  70. package/lib/cjs/pagination/index.js +4 -2
  71. package/lib/cjs/popconfirm/index.js +6 -3
  72. package/lib/cjs/radio/radio.d.ts +1 -1
  73. package/lib/cjs/radio/radio.js +4 -2
  74. package/lib/cjs/radio/radioGroup.d.ts +1 -1
  75. package/lib/cjs/rating/item.js +2 -1
  76. package/lib/cjs/scrollList/index.js +6 -3
  77. package/lib/cjs/select/index.js +8 -4
  78. package/lib/cjs/select/option.js +2 -1
  79. package/lib/cjs/sideSheet/SideSheetContent.js +6 -3
  80. package/lib/cjs/skeleton/index.js +3 -1
  81. package/lib/cjs/space/index.js +2 -1
  82. package/lib/cjs/spin/index.js +7 -3
  83. package/lib/cjs/switch/index.js +6 -4
  84. package/lib/cjs/table/Table.d.ts +1 -1
  85. package/lib/cjs/table/Table.js +6 -3
  86. package/lib/cjs/tabs/TabBar.js +2 -1
  87. package/lib/cjs/tabs/TabPane.js +5 -2
  88. package/lib/cjs/tagInput/index.js +4 -2
  89. package/lib/cjs/timePicker/Combobox.js +3 -1
  90. package/lib/cjs/timePicker/TimePicker.d.ts +2 -2
  91. package/lib/cjs/timePicker/TimeShape.d.ts +1 -1
  92. package/lib/cjs/timePicker/index.d.ts +2 -2
  93. package/lib/cjs/toast/toast.js +6 -3
  94. package/lib/cjs/transfer/index.js +2 -1
  95. package/lib/cjs/tree/treeNode.js +2 -1
  96. package/lib/cjs/treeSelect/index.js +6 -3
  97. package/lib/cjs/typography/base.d.ts +1 -1
  98. package/lib/cjs/typography/base.js +2 -1
  99. package/lib/cjs/typography/paragraph.d.ts +1 -1
  100. package/lib/cjs/typography/text.d.ts +1 -1
  101. package/lib/cjs/typography/title.d.ts +2 -2
  102. package/lib/cjs/upload/index.d.ts +2 -2
  103. package/lib/cjs/upload/index.js +13 -6
  104. package/lib/es/avatar/index.js +4 -2
  105. package/lib/es/backtop/index.js +2 -1
  106. package/lib/es/badge/index.js +2 -1
  107. package/lib/es/banner/index.js +9 -4
  108. package/lib/es/breadcrumb/index.js +4 -3
  109. package/lib/es/button/Button.d.ts +1 -1
  110. package/lib/es/button/Button.js +11 -3
  111. package/lib/es/button/index.d.ts +1 -1
  112. package/lib/es/card/index.js +10 -5
  113. package/lib/es/carousel/CarouselArrow.js +6 -2
  114. package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
  115. package/lib/es/carousel/index.d.ts +1 -1
  116. package/lib/es/carousel/index.js +2 -1
  117. package/lib/es/cascader/index.js +9 -6
  118. package/lib/es/cascader/item.js +2 -1
  119. package/lib/es/checkbox/checkbox.js +8 -4
  120. package/lib/es/collapsible/index.js +2 -1
  121. package/lib/es/datePicker/dateInput.d.ts +1 -1
  122. package/lib/es/datePicker/dateInput.js +2 -1
  123. package/lib/es/datePicker/datePicker.d.ts +1 -1
  124. package/lib/es/datePicker/datePicker.js +4 -2
  125. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  126. package/lib/es/divider/index.js +2 -1
  127. package/lib/es/dropdown/index.js +2 -1
  128. package/lib/es/empty/index.js +8 -4
  129. package/lib/es/form/baseForm.d.ts +1 -1
  130. package/lib/es/form/field.d.ts +1 -1
  131. package/lib/es/form/hoc/withField.js +2 -1
  132. package/lib/es/form/label.js +2 -1
  133. package/lib/es/grid/col.js +2 -1
  134. package/lib/es/grid/row.js +2 -1
  135. package/lib/es/iconButton/index.js +3 -1
  136. package/lib/es/input/index.js +9 -5
  137. package/lib/es/list/index.js +6 -3
  138. package/lib/es/modal/ConfirmModal.js +2 -1
  139. package/lib/es/modal/Modal.js +6 -2
  140. package/lib/es/modal/ModalContent.js +13 -6
  141. package/lib/es/modal/confirm.d.ts +5 -5
  142. package/lib/es/notification/notice.js +6 -3
  143. package/lib/es/pagination/index.js +4 -2
  144. package/lib/es/popconfirm/index.js +6 -3
  145. package/lib/es/radio/radio.d.ts +1 -1
  146. package/lib/es/radio/radio.js +4 -2
  147. package/lib/es/radio/radioGroup.d.ts +1 -1
  148. package/lib/es/rating/item.js +2 -1
  149. package/lib/es/scrollList/index.js +6 -3
  150. package/lib/es/select/index.js +8 -4
  151. package/lib/es/select/option.js +2 -1
  152. package/lib/es/sideSheet/SideSheetContent.js +6 -3
  153. package/lib/es/skeleton/index.js +3 -1
  154. package/lib/es/space/index.js +2 -1
  155. package/lib/es/spin/index.js +7 -3
  156. package/lib/es/switch/index.js +6 -4
  157. package/lib/es/table/Table.d.ts +1 -1
  158. package/lib/es/table/Table.js +6 -3
  159. package/lib/es/tabs/TabBar.js +2 -1
  160. package/lib/es/tabs/TabPane.js +5 -2
  161. package/lib/es/tagInput/index.js +4 -2
  162. package/lib/es/timePicker/Combobox.js +3 -1
  163. package/lib/es/timePicker/TimePicker.d.ts +2 -2
  164. package/lib/es/timePicker/TimeShape.d.ts +1 -1
  165. package/lib/es/timePicker/index.d.ts +2 -2
  166. package/lib/es/toast/toast.js +6 -3
  167. package/lib/es/transfer/index.js +2 -1
  168. package/lib/es/tree/treeNode.js +2 -1
  169. package/lib/es/treeSelect/index.js +6 -3
  170. package/lib/es/typography/base.d.ts +1 -1
  171. package/lib/es/typography/base.js +2 -1
  172. package/lib/es/typography/paragraph.d.ts +1 -1
  173. package/lib/es/typography/text.d.ts +1 -1
  174. package/lib/es/typography/title.d.ts +2 -2
  175. package/lib/es/upload/index.d.ts +2 -2
  176. package/lib/es/upload/index.js +13 -6
  177. package/list/index.tsx +16 -4
  178. package/modal/ConfirmModal.tsx +1 -1
  179. package/modal/Modal.tsx +2 -0
  180. package/modal/ModalContent.tsx +27 -14
  181. package/notification/notice.tsx +16 -4
  182. package/package.json +9 -9
  183. package/pagination/index.tsx +16 -2
  184. package/popconfirm/index.tsx +11 -3
  185. package/radio/radio.tsx +10 -2
  186. package/rating/item.tsx +1 -1
  187. package/scrollList/index.tsx +19 -3
  188. package/select/index.tsx +12 -4
  189. package/select/option.tsx +5 -1
  190. package/sideSheet/SideSheetContent.tsx +3 -3
  191. package/skeleton/index.tsx +1 -1
  192. package/space/index.tsx +1 -1
  193. package/spin/index.tsx +15 -9
  194. package/switch/index.tsx +9 -14
  195. package/table/Table.tsx +5 -3
  196. package/tabs/TabBar.tsx +1 -1
  197. package/tabs/TabPane.tsx +9 -4
  198. package/tagInput/index.tsx +2 -2
  199. package/timePicker/Combobox.tsx +6 -1
  200. package/toast/toast.tsx +3 -3
  201. package/transfer/index.tsx +1 -0
  202. package/tree/treeNode.tsx +1 -1
  203. package/treeSelect/index.tsx +15 -3
  204. package/typography/base.tsx +1 -1
  205. package/upload/index.tsx +107 -38
  206. package/yarn-error.log +26235 -0
@@ -22,7 +22,7 @@ declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
22
22
  indicatorPosition: PropTypes.Requireable<"left" | "right" | "center">;
23
23
  indicatorSize: PropTypes.Requireable<"small" | "medium">;
24
24
  indicatorType: PropTypes.Requireable<"line" | "dot" | "columnar">;
25
- theme: PropTypes.Requireable<"primary" | "dark" | "light">;
25
+ theme: PropTypes.Requireable<"dark" | "light" | "primary">;
26
26
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  arrowType: PropTypes.Requireable<"hover" | "always">;
28
28
  showArrow: PropTypes.Requireable<boolean>;
@@ -263,7 +263,8 @@ class Carousel extends BaseComponent {
263
263
  className: cls([_concatInstanceProperty(_context2 = "".concat(cssClasses.CAROUSEL_CONTENT, "-")).call(_context2, animation)], {
264
264
  ["".concat(cssClasses.CAROUSEL_CONTENT)]: true,
265
265
  ["".concat(cssClasses.CAROUSEL_CONTENT, "-reverse")]: slideDirection === 'left' ? isReverse : !isReverse
266
- })
266
+ }),
267
+ "x-semi-prop": "children"
267
268
  }, this.renderChildren()), this.renderIndicator(), this.renderArrow());
268
269
  }
269
270
 
@@ -285,7 +285,8 @@ class Cascader extends BaseComponent {
285
285
  ["".concat(prefixcls, "-suffix-icon")]: isSemiIcon(suffix)
286
286
  });
287
287
  return /*#__PURE__*/React.createElement("div", {
288
- className: suffixWrapperCls
288
+ className: suffixWrapperCls,
289
+ "x-semi-prop": "suffix"
289
290
  }, suffix);
290
291
  };
291
292
 
@@ -305,7 +306,8 @@ class Cascader extends BaseComponent {
305
306
  });
306
307
  return /*#__PURE__*/React.createElement("div", {
307
308
  className: prefixWrapperCls,
308
- id: insetLabelId
309
+ id: insetLabelId,
310
+ "x-semi-prop": "prefix,insetLabel"
309
311
  }, labelNode);
310
312
  };
311
313
 
@@ -395,7 +397,7 @@ class Cascader extends BaseComponent {
395
397
  className: clearCls,
396
398
  onClick: this.handleClear,
397
399
  onKeyPress: this.handleClearEnterPress,
398
- role: 'button',
400
+ role: "button",
399
401
  tabIndex: 0
400
402
  }, /*#__PURE__*/React.createElement(IconClear, null));
401
403
  }
@@ -414,7 +416,8 @@ class Cascader extends BaseComponent {
414
416
  }
415
417
 
416
418
  return arrowIcon ? /*#__PURE__*/React.createElement("div", {
417
- className: cls("".concat(prefixcls, "-arrow"))
419
+ className: cls("".concat(prefixcls, "-arrow")),
420
+ "x-semi-prop": "arrowIcon"
418
421
  }, arrowIcon) : null;
419
422
  };
420
423
 
@@ -489,12 +492,12 @@ class Cascader extends BaseComponent {
489
492
  "aria-errormessage": this.props['aria-errormessage'],
490
493
  "aria-label": this.props['aria-label'],
491
494
  "aria-labelledby": this.props['aria-labelledby'],
492
- "aria-describedby": this.props["aria-describedby"],
495
+ "aria-describedby": this.props['aria-describedby'],
493
496
  "aria-required": this.props['aria-required'],
494
497
  id: id
495
498
  }, mouseEvent, {
496
499
  // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
497
- role: 'combobox',
500
+ role: "combobox",
498
501
  tabIndex: 0
499
502
  }), inner);
500
503
  };
@@ -296,7 +296,8 @@ export default class Item extends PureComponent {
296
296
  className: _concatInstanceProperty(_context6 = "".concat(prefixcls, " ")).call(_context6, prefixcls, "-empty"),
297
297
  key: 'empty-list'
298
298
  }, /*#__PURE__*/React.createElement("span", {
299
- className: "".concat(prefixcls, "-label")
299
+ className: "".concat(prefixcls, "-label"),
300
+ "x-semi-prop": "emptyContent"
300
301
  }, emptyContent || locale.emptyText));
301
302
  });
302
303
  }
@@ -157,13 +157,17 @@ class Checkbox extends BaseComponent {
157
157
  const extraCls = classnames("".concat(prefix, "-extra"), {
158
158
  ["".concat(prefix, "-cardType_extra_noChildren")]: props.isCardType && !children
159
159
  });
160
+ const name = inGroup && this.context.checkboxGroup.name;
161
+ const xSemiPropChildren = this.props['x-semi-children-alias'] || 'children';
160
162
 
161
163
  const renderContent = () => /*#__PURE__*/React.createElement(React.Fragment, null, children ? /*#__PURE__*/React.createElement("span", {
162
- id: addonId,
163
- className: "".concat(prefix, "-addon")
164
+ id: this.addonId,
165
+ className: "".concat(prefix, "-addon"),
166
+ "x-semi-prop": xSemiPropChildren
164
167
  }, children) : null, extra ? /*#__PURE__*/React.createElement("div", {
165
- id: extraId,
166
- className: extraCls
168
+ id: this.extraId,
169
+ className: extraCls,
170
+ "x-semi-prop": "extra"
167
171
  }, extra) : null);
168
172
 
169
173
  return (
@@ -89,7 +89,8 @@ const Collapsible = props => {
89
89
  style: {
90
90
  overflow: 'hidden'
91
91
  },
92
- id: id
92
+ id: id,
93
+ "x-semi-prop": "children"
93
94
  }, children));
94
95
  };
95
96
 
@@ -26,7 +26,7 @@ export default class DateInput extends BaseComponent<DateInputProps, {}> {
26
26
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
27
27
  value: PropTypes.Requireable<any[]>;
28
28
  disabled: PropTypes.Requireable<boolean>;
29
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
29
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
30
30
  showClear: PropTypes.Requireable<boolean>;
31
31
  format: PropTypes.Requireable<string>;
32
32
  inputStyle: PropTypes.Requireable<object>;
@@ -153,7 +153,8 @@ export default class DateInput extends BaseComponent {
153
153
  const labelNode = prefix || insetLabel;
154
154
  return labelNode ? /*#__PURE__*/React.createElement("div", {
155
155
  className: "".concat(prefixCls, "-range-input-prefix"),
156
- onClick: e => !disabled && !rangeInputFocus && this.handleRangeStartFocus(e)
156
+ onClick: e => !disabled && !rangeInputFocus && this.handleRangeStartFocus(e),
157
+ "x-semi-prop": "prefix,insetLabel"
157
158
  }, labelNode) : null;
158
159
  }
159
160
 
@@ -41,7 +41,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
41
41
  'aria-invalid': PropTypes.Requireable<boolean>;
42
42
  'aria-labelledby': PropTypes.Requireable<string>;
43
43
  'aria-required': PropTypes.Requireable<boolean>;
44
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
44
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
45
45
  size: PropTypes.Requireable<"default" | "small" | "large">;
46
46
  density: PropTypes.Requireable<"default" | "compact">;
47
47
  defaultValue: PropTypes.Requireable<string | number | object>;
@@ -182,11 +182,13 @@ export default class DatePicker extends BaseComponent {
182
182
  className: wrapCls,
183
183
  style: dropdownStyle
184
184
  }, topSlot && /*#__PURE__*/React.createElement("div", {
185
- className: "".concat(cssClasses.PREFIX, "-topSlot")
185
+ className: "".concat(cssClasses.PREFIX, "-topSlot"),
186
+ "x-semi-prop": "topSlot"
186
187
  }, topSlot), insetInput && /*#__PURE__*/React.createElement(DateInput, _Object$assign({}, insetInputProps, {
187
188
  insetInput: true
188
189
  })), this.adapter.typeIsYearOrMonth() ? this.renderYearMonthPanel(locale, localeCode) : this.renderMonthGrid(locale, localeCode, dateFnsLocale), this.renderQuickControls(), bottomSlot && /*#__PURE__*/React.createElement("div", {
189
- className: "".concat(cssClasses.PREFIX, "-bottomSlot")
190
+ className: "".concat(cssClasses.PREFIX, "-bottomSlot"),
191
+ "x-semi-prop": "bottomSlot"
190
192
  }, bottomSlot), this.renderFooter(locale, localeCode));
191
193
  };
192
194
 
@@ -17,7 +17,7 @@ export interface MonthsGridProps extends MonthsGridFoundationProps, BaseProps {
17
17
  export declare type MonthsGridState = MonthsGridFoundationState;
18
18
  export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGridState> {
19
19
  static propTypes: {
20
- type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
20
+ type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "dateTimeRange">;
21
21
  defaultValue: PropTypes.Requireable<string | number | object>;
22
22
  defaultPickerValue: PropTypes.Requireable<string | number | object>;
23
23
  multiple: PropTypes.Requireable<boolean>;
@@ -61,7 +61,8 @@ const Divider = props => {
61
61
  className: dividerClassNames,
62
62
  style: _Object$assign(_Object$assign({}, overrideDefaultStyle), style)
63
63
  }), children && layout === 'horizontal' ? typeof children === 'string' ? /*#__PURE__*/React.createElement("span", {
64
- className: "".concat(prefixCls, "-divider_inner-text")
64
+ className: "".concat(prefixCls, "-divider_inner-text"),
65
+ "x-semi-prop": "children"
65
66
  }, children) : children : null);
66
67
  };
67
68
 
@@ -86,7 +86,8 @@ class Dropdown extends BaseComponent {
86
86
  className: className,
87
87
  style: style
88
88
  }, /*#__PURE__*/React.createElement("div", {
89
- className: "".concat(prefixCls, "-content")
89
+ className: "".concat(prefixCls, "-content"),
90
+ "x-semi-prop": "render"
90
91
  }, content)));
91
92
  }
92
93
 
@@ -101,15 +101,19 @@ export default class Empty extends BaseComponent {
101
101
  style: style
102
102
  }, /*#__PURE__*/React.createElement("div", {
103
103
  className: "".concat(prefixCls, "-image"),
104
- style: imageStyle
104
+ style: imageStyle,
105
+ "x-semi-prop": "image,darkModeImage"
105
106
  }, imageNode), /*#__PURE__*/React.createElement("div", {
106
107
  className: "".concat(prefixCls, "-content")
107
108
  }, title ? /*#__PURE__*/React.createElement(Typography.Title, _Object$assign({}, titleProps, {
108
- className: "".concat(prefixCls, "-title")
109
+ className: "".concat(prefixCls, "-title"),
110
+ "x-semi-prop": "title"
109
111
  }), title) : null, description ? /*#__PURE__*/React.createElement("div", {
110
- className: "".concat(prefixCls, "-description")
112
+ className: "".concat(prefixCls, "-description"),
113
+ "x-semi-prop": "description"
111
114
  }, description) : null, children ? /*#__PURE__*/React.createElement("div", {
112
- className: "".concat(prefixCls, "-footer")
115
+ className: "".concat(prefixCls, "-footer"),
116
+ "x-semi-prop": "children"
113
117
  }, children) : null));
114
118
  }
115
119
 
@@ -125,7 +125,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
125
125
  onBlur?: (e: React.FocusEvent<Element, Element>) => void;
126
126
  onListScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
127
127
  children?: React.ReactNode;
128
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
128
+ } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
129
129
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
130
130
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
131
131
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -73,7 +73,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
73
73
  onBlur?: (e: import("react").FocusEvent<Element, Element>) => void;
74
74
  onListScroll?: (e: import("react").UIEvent<HTMLDivElement, UIEvent>) => void;
75
75
  children?: import("react").ReactNode;
76
- } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
76
+ } & 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
77
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
78
78
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
79
79
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
@@ -426,7 +426,8 @@ function withField(Component, opts) {
426
426
  });
427
427
  const extraContent = extraText ? /*#__PURE__*/React.createElement("div", {
428
428
  className: extraCls,
429
- id: extraTextId
429
+ id: extraTextId,
430
+ "x-semi-prop": "extraText"
430
431
  }, extraText) : null;
431
432
 
432
433
  let newProps = _Object$assign(_Object$assign({
@@ -29,7 +29,8 @@ export default class Label extends PureComponent {
29
29
  const labelStyle = style ? style : {};
30
30
  width ? labelStyle.width = width : null;
31
31
  const textContent = /*#__PURE__*/React.createElement("div", {
32
- className: "".concat(prefixCls, "-field-label-text")
32
+ className: "".concat(prefixCls, "-field-label-text"),
33
+ "x-semi-prop": "label"
33
34
  }, typeof text !== 'undefined' ? text : children);
34
35
  const contentWithExtra = /*#__PURE__*/React.createElement(React.Fragment, null, textContent, /*#__PURE__*/React.createElement("div", {
35
36
  className: "".concat(prefixCls, "-field-label-extra")
@@ -97,7 +97,8 @@ class Col extends React.Component {
97
97
  } : {}), style);
98
98
  return /*#__PURE__*/React.createElement("div", _Object$assign({}, others, {
99
99
  style: style,
100
- className: classes
100
+ className: classes,
101
+ "x-semi-prop": "children"
101
102
  }), children);
102
103
  }
103
104
 
@@ -157,7 +157,8 @@ class Row extends React.Component {
157
157
  }
158
158
  }, /*#__PURE__*/React.createElement("div", _Object$assign({}, otherProps, {
159
159
  className: classes,
160
- style: rowStyle
160
+ style: rowStyle,
161
+ "x-semi-prop": "children"
161
162
  }), children));
162
163
  }
163
164
 
@@ -71,8 +71,10 @@ class IconButton extends PureComponent {
71
71
  ["".concat(prefixCls, "-content-left")]: iconPosition === 'right',
72
72
  ["".concat(prefixCls, "-content-right")]: iconPosition === 'left'
73
73
  });
74
+ const xSemiProp = this.props['x-semi-children-alias'] || 'children';
74
75
  const children = originChildren != null ? /*#__PURE__*/React.createElement("span", {
75
- className: btnTextCls
76
+ className: btnTextCls,
77
+ "x-semi-prop": xSemiProp
76
78
  }, originChildren) : null;
77
79
 
78
80
  if (iconPosition === 'left') {
@@ -183,7 +183,8 @@ class Input extends BaseComponent {
183
183
  ["".concat(prefixCls, "-prepend-icon")]: isSemiIcon(addonBefore)
184
184
  });
185
185
  return /*#__PURE__*/React.createElement("div", {
186
- className: prefixWrapperCls
186
+ className: prefixWrapperCls,
187
+ "x-semi-prop": "addonBefore"
187
188
  }, addonBefore);
188
189
  }
189
190
 
@@ -202,7 +203,8 @@ class Input extends BaseComponent {
202
203
  ["".concat(prefixCls, "-append-icon")]: isSemiIcon(addonAfter)
203
204
  });
204
205
  return /*#__PURE__*/React.createElement("div", {
205
- className: prefixWrapperCls
206
+ className: prefixWrapperCls,
207
+ "x-semi-prop": "addonAfter"
206
208
  }, addonAfter);
207
209
  }
208
210
 
@@ -282,7 +284,8 @@ class Input extends BaseComponent {
282
284
  className: prefixWrapperCls,
283
285
  onMouseDown: this.handlePreventMouseDown,
284
286
  onClick: this.handleClickPrefixOrSuffix,
285
- id: insetLabelId
287
+ id: insetLabelId,
288
+ "x-semi-prop": "prefix,insetLabel"
286
289
  }, labelNode);
287
290
  }
288
291
 
@@ -319,7 +322,8 @@ class Input extends BaseComponent {
319
322
  return /*#__PURE__*/React.createElement("div", {
320
323
  className: suffixWrapperCls,
321
324
  onMouseDown: this.handlePreventMouseDown,
322
- onClick: this.handleClickPrefixOrSuffix
325
+ onClick: this.handleClickPrefixOrSuffix,
326
+ "x-semi-prop": "suffix"
323
327
  }, suffix);
324
328
  }
325
329
 
@@ -421,7 +425,7 @@ class Input extends BaseComponent {
421
425
  }
422
426
 
423
427
  if (validateStatus === 'error') {
424
- inputProps['aria-invalid'] = "true";
428
+ inputProps['aria-invalid'] = 'true';
425
429
  }
426
430
 
427
431
  return (
@@ -27,7 +27,8 @@ class List extends BaseComponent {
27
27
 
28
28
  if (emptyContent) {
29
29
  return /*#__PURE__*/React.createElement("div", {
30
- className: "".concat(cssClasses.PREFIX, "-empty")
30
+ className: "".concat(cssClasses.PREFIX, "-empty"),
31
+ "x-semi-prop": "emptyContent"
31
32
  }, emptyContent);
32
33
  } else {
33
34
  return /*#__PURE__*/React.createElement(LocaleConsumer, {
@@ -115,7 +116,8 @@ class List extends BaseComponent {
115
116
  className: wrapperCls,
116
117
  style: style
117
118
  }, header ? /*#__PURE__*/React.createElement("div", {
118
- className: "".concat(cssClasses.PREFIX, "-header")
119
+ className: "".concat(cssClasses.PREFIX, "-header"),
120
+ "x-semi-prop": "header"
119
121
  }, header) : null, /*#__PURE__*/React.createElement(ListContext.Provider, {
120
122
  value: {
121
123
  grid,
@@ -126,7 +128,8 @@ class List extends BaseComponent {
126
128
  spinning: loading,
127
129
  size: "large"
128
130
  }, this.wrapChildren(childrenList, children))), footer ? /*#__PURE__*/React.createElement("div", {
129
- className: "".concat(cssClasses.PREFIX, "-footer")
131
+ className: "".concat(cssClasses.PREFIX, "-footer"),
132
+ "x-semi-prop": "footer"
130
133
  }, footer) : null, loadMore ? loadMore : null);
131
134
  }
132
135
 
@@ -101,7 +101,8 @@ const ConfirmModal = props => {
101
101
  icon: iconNode,
102
102
  visible: visible
103
103
  }, rest), /*#__PURE__*/React.createElement("div", {
104
- className: contentCls
104
+ className: contentCls,
105
+ "x-semi-prop": "content"
105
106
  }, content));
106
107
  };
107
108
 
@@ -80,7 +80,9 @@ class Modal extends BaseComponent {
80
80
  loading: cancelLoading,
81
81
  type: "tertiary",
82
82
  autoFocus: true
83
- }, this.props.cancelButtonProps), cancelText || locale.cancel);
83
+ }, this.props.cancelButtonProps, {
84
+ "x-semi-children-alias": "cancelText"
85
+ }), cancelText || locale.cancel);
84
86
  }
85
87
  };
86
88
 
@@ -92,7 +94,9 @@ class Modal extends BaseComponent {
92
94
  theme: "solid",
93
95
  loading: confirmLoading,
94
96
  onClick: this.handleOk
95
- }, this.props.okButtonProps), okText || locale.confirm)));
97
+ }, this.props.okButtonProps, {
98
+ "x-semi-children-alias": "okText"
99
+ }), okText || locale.confirm)));
96
100
  }; // getDialog = () => {
97
101
  // const {
98
102
  // footer,
@@ -90,7 +90,9 @@ export default class ModalContent extends BaseComponent {
90
90
  let closer;
91
91
 
92
92
  if (closable) {
93
- const iconType = closeIcon || /*#__PURE__*/React.createElement(IconClose, null);
93
+ const iconType = closeIcon || /*#__PURE__*/React.createElement(IconClose, {
94
+ "x-semi-prop": "closeIcon"
95
+ });
94
96
  closer = /*#__PURE__*/React.createElement(Button, {
95
97
  "aria-label": "close",
96
98
  className: "".concat(cssClasses.DIALOG, "-close"),
@@ -111,7 +113,8 @@ export default class ModalContent extends BaseComponent {
111
113
  icon
112
114
  } = this.props;
113
115
  return icon ? /*#__PURE__*/React.createElement("span", {
114
- className: "".concat(cssClasses.DIALOG, "-icon-wrapper")
116
+ className: "".concat(cssClasses.DIALOG, "-icon-wrapper"),
117
+ "x-semi-prop": "icon"
115
118
  }, icon) : null;
116
119
  };
117
120
 
@@ -130,7 +133,8 @@ export default class ModalContent extends BaseComponent {
130
133
  }, icon, /*#__PURE__*/React.createElement(Typography.Title, {
131
134
  heading: 5,
132
135
  className: "".concat(cssClasses.DIALOG, "-title"),
133
- id: "".concat(cssClasses.DIALOG, "-title")
136
+ id: "".concat(cssClasses.DIALOG, "-title"),
137
+ "x-semi-prop": "title"
134
138
  }, title), closer);
135
139
  };
136
140
 
@@ -149,12 +153,14 @@ export default class ModalContent extends BaseComponent {
149
153
  return hasHeader ? /*#__PURE__*/React.createElement("div", {
150
154
  className: bodyCls,
151
155
  id: "".concat(cssClasses.DIALOG, "-body"),
152
- style: bodyStyle
156
+ style: bodyStyle,
157
+ "x-semi-prop": "children"
153
158
  }, children) : /*#__PURE__*/React.createElement("div", {
154
159
  className: "".concat(cssClasses.DIALOG, "-body-wrapper")
155
160
  }, icon, /*#__PURE__*/React.createElement("div", {
156
161
  className: bodyCls,
157
- style: bodyStyle
162
+ style: bodyStyle,
163
+ "x-semi-prop": "children"
158
164
  }, children), closer);
159
165
  };
160
166
 
@@ -186,7 +192,8 @@ export default class ModalContent extends BaseComponent {
186
192
  const body = this.renderBody();
187
193
  const header = this.renderHeader();
188
194
  const footer = props.footer ? /*#__PURE__*/React.createElement("div", {
189
- className: "".concat(cssClasses.DIALOG, "-footer")
195
+ className: "".concat(cssClasses.DIALOG, "-footer"),
196
+ "x-semi-prop": "footer"
190
197
  }, props.footer) : null;
191
198
  const dialogElement =
192
199
  /*#__PURE__*/
@@ -17,7 +17,7 @@ export declare function withInfo(props: ModalReactProps): {
17
17
  bodyStyle?: React.CSSProperties;
18
18
  maskStyle?: React.CSSProperties;
19
19
  style?: React.CSSProperties;
20
- icon: string | number | boolean | React.ReactFragment | JSX.Element;
20
+ icon: React.ReactNode | JSX.Element;
21
21
  closeIcon?: React.ReactNode;
22
22
  title?: React.ReactNode;
23
23
  content?: React.ReactNode;
@@ -59,7 +59,7 @@ export declare function withSuccess(props: ModalReactProps): {
59
59
  bodyStyle?: React.CSSProperties;
60
60
  maskStyle?: React.CSSProperties;
61
61
  style?: React.CSSProperties;
62
- icon: string | number | boolean | React.ReactFragment | JSX.Element;
62
+ icon: React.ReactNode | JSX.Element;
63
63
  closeIcon?: React.ReactNode;
64
64
  title?: React.ReactNode;
65
65
  content?: React.ReactNode;
@@ -101,7 +101,7 @@ export declare function withWarning(props: ModalReactProps): {
101
101
  bodyStyle?: React.CSSProperties;
102
102
  maskStyle?: React.CSSProperties;
103
103
  style?: React.CSSProperties;
104
- icon: string | number | boolean | React.ReactFragment | JSX.Element;
104
+ icon: React.ReactNode | JSX.Element;
105
105
  closeIcon?: React.ReactNode;
106
106
  title?: React.ReactNode;
107
107
  content?: React.ReactNode;
@@ -143,7 +143,7 @@ export declare function withError(props: ModalReactProps): {
143
143
  bodyStyle?: React.CSSProperties;
144
144
  maskStyle?: React.CSSProperties;
145
145
  style?: React.CSSProperties;
146
- icon: string | number | boolean | React.ReactFragment | JSX.Element;
146
+ icon: React.ReactNode | JSX.Element;
147
147
  closeIcon?: React.ReactNode;
148
148
  title?: React.ReactNode;
149
149
  content?: React.ReactNode;
@@ -185,7 +185,7 @@ export declare function withConfirm(props: ModalReactProps): {
185
185
  bodyStyle?: React.CSSProperties;
186
186
  maskStyle?: React.CSSProperties;
187
187
  style?: React.CSSProperties;
188
- icon: string | number | boolean | React.ReactFragment | JSX.Element;
188
+ icon: React.ReactNode | JSX.Element;
189
189
  closeIcon?: React.ReactNode;
190
190
  title?: React.ReactNode;
191
191
  content?: React.ReactNode;
@@ -115,7 +115,8 @@ class Notice extends BaseComponent {
115
115
 
116
116
  if (iconType) {
117
117
  return /*#__PURE__*/React.createElement("div", {
118
- className: iconCls
118
+ className: iconCls,
119
+ "x-semi-prop": "icon"
119
120
  }, isSemiIcon(iconType) ? /*#__PURE__*/React.cloneElement(iconType, {
120
121
  size: iconType.props.size || 'large'
121
122
  }) : iconType);
@@ -173,9 +174,11 @@ class Notice extends BaseComponent {
173
174
  className: "".concat(prefixCls, "-content-wrapper")
174
175
  }, title ? /*#__PURE__*/React.createElement("div", {
175
176
  id: titleID,
176
- className: "".concat(prefixCls, "-title")
177
+ className: "".concat(prefixCls, "-title"),
178
+ "x-semi-prop": "title"
177
179
  }, title) : '', content ? /*#__PURE__*/React.createElement("div", {
178
- className: "".concat(prefixCls, "-content")
180
+ className: "".concat(prefixCls, "-content"),
181
+ "x-semi-prop": "content"
179
182
  }, content) : ''), showClose && /*#__PURE__*/React.createElement(Button, {
180
183
  className: "".concat(prefixCls, "-icon-close"),
181
184
  type: "tertiary",
@@ -154,7 +154,8 @@ export default class Pagination extends BaseComponent {
154
154
  "aria-disabled": prevDisabled ? true : false,
155
155
  "aria-label": "Previous",
156
156
  onClick: e => !prevDisabled && this.foundation.goPrev(e),
157
- className: preClassName
157
+ className: preClassName,
158
+ "x-semi-prop": "prevText"
158
159
  }, prevText || /*#__PURE__*/React.createElement(IconChevronLeft, {
159
160
  size: "large"
160
161
  }));
@@ -177,7 +178,8 @@ export default class Pagination extends BaseComponent {
177
178
  "aria-disabled": nextDisabled ? true : false,
178
179
  "aria-label": "Next",
179
180
  onClick: e => !nextDisabled && this.foundation.goNext(e),
180
- className: nextClassName
181
+ className: nextClassName,
182
+ "x-semi-prop": "prevText"
181
183
  }, nextText || /*#__PURE__*/React.createElement(IconChevronRight, {
182
184
  size: "large"
183
185
  }));
@@ -122,13 +122,16 @@ export default class Popconfirm extends BaseComponent {
122
122
  }, /*#__PURE__*/React.createElement("div", {
123
123
  className: "".concat(prefixCls, "-header")
124
124
  }, /*#__PURE__*/React.createElement("i", {
125
- className: "".concat(prefixCls, "-header-icon")
125
+ className: "".concat(prefixCls, "-header-icon"),
126
+ "x-semi-prop": "icon"
126
127
  }, /*#__PURE__*/React.isValidElement(icon) ? icon : null), /*#__PURE__*/React.createElement("div", {
127
128
  className: "".concat(prefixCls, "-header-body")
128
129
  }, showTitle ? /*#__PURE__*/React.createElement("div", {
129
- className: "".concat(prefixCls, "-header-title")
130
+ className: "".concat(prefixCls, "-header-title"),
131
+ "x-semi-prop": "title"
130
132
  }, title) : null, showContent ? /*#__PURE__*/React.createElement("div", {
131
- className: "".concat(prefixCls, "-header-content")
133
+ className: "".concat(prefixCls, "-header-content"),
134
+ "x-semi-prop": "content"
132
135
  }, content) : null), /*#__PURE__*/React.createElement(Button, {
133
136
  className: "".concat(prefixCls, "-btn-close"),
134
137
  icon: /*#__PURE__*/React.createElement(IconClose, null),
@@ -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" | "middle" | "large";
78
+ buttonSize?: "small" | "large" | "middle";
79
79
  isCardRadio?: boolean;
80
80
  isPureCardRadio?: boolean;
81
81
  };
@@ -165,10 +165,12 @@ class Radio extends BaseComponent {
165
165
  const renderContent = () => /*#__PURE__*/React.createElement(React.Fragment, null, children ? /*#__PURE__*/React.createElement("span", {
166
166
  className: addonCls,
167
167
  style: addonStyle,
168
- id: addonId
168
+ id: this.addonId,
169
+ "x-semi-prop": "children"
169
170
  }, children) : null, extra && !isButtonRadio ? /*#__PURE__*/React.createElement("div", {
170
171
  className: "".concat(prefix, "-extra"),
171
- id: extraId
172
+ id: this.extraId,
173
+ "x-semi-prop": "extra"
172
174
  }, extra) : null);
173
175
 
174
176
  return /*#__PURE__*/React.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" | "middle" | "large">;
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>;