@douyinfe/semi-ui 2.11.0 → 2.12.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/README.md +1 -1
  2. package/avatar/index.tsx +2 -2
  3. package/backtop/index.tsx +11 -7
  4. package/badge/index.tsx +1 -1
  5. package/banner/index.tsx +5 -5
  6. package/breadcrumb/index.tsx +5 -3
  7. package/button/Button.tsx +10 -8
  8. package/card/index.tsx +43 -41
  9. package/carousel/CarouselArrow.tsx +2 -0
  10. package/carousel/index.tsx +1 -0
  11. package/cascader/index.tsx +101 -123
  12. package/cascader/item.tsx +1 -1
  13. package/checkbox/checkbox.tsx +13 -2
  14. package/collapsible/index.tsx +8 -1
  15. package/datePicker/dateInput.tsx +1 -0
  16. package/datePicker/datePicker.tsx +13 -5
  17. package/dist/css/semi.css +33 -0
  18. package/dist/css/semi.min.css +1 -1
  19. package/dist/umd/semi-ui.js +694 -384
  20. package/dist/umd/semi-ui.js.map +1 -1
  21. package/dist/umd/semi-ui.min.js +1 -1
  22. package/dist/umd/semi-ui.min.js.map +1 -1
  23. package/divider/index.tsx +8 -4
  24. package/dropdown/index.tsx +1 -1
  25. package/empty/index.tsx +13 -5
  26. package/form/_story/FormSubmit/index.tsx +45 -0
  27. package/form/_story/form.stories.js +2 -1
  28. package/form/hoc/withField.tsx +1 -1
  29. package/form/label.tsx +1 -1
  30. package/grid/col.tsx +1 -1
  31. package/grid/row.tsx +1 -1
  32. package/iconButton/index.tsx +2 -1
  33. package/input/index.tsx +38 -11
  34. package/lib/cjs/avatar/index.js +4 -2
  35. package/lib/cjs/backtop/index.js +2 -1
  36. package/lib/cjs/badge/index.js +2 -1
  37. package/lib/cjs/banner/index.js +9 -4
  38. package/lib/cjs/breadcrumb/index.js +4 -3
  39. package/lib/cjs/button/Button.js +13 -3
  40. package/lib/cjs/card/index.js +10 -5
  41. package/lib/cjs/carousel/CarouselArrow.js +6 -2
  42. package/lib/cjs/carousel/index.js +2 -1
  43. package/lib/cjs/cascader/index.js +9 -6
  44. package/lib/cjs/cascader/item.js +2 -1
  45. package/lib/cjs/checkbox/checkbox.js +8 -4
  46. package/lib/cjs/collapsible/index.js +2 -1
  47. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  48. package/lib/cjs/datePicker/dateInput.js +2 -1
  49. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  50. package/lib/cjs/datePicker/datePicker.js +4 -2
  51. package/lib/cjs/datePicker/monthsGrid.d.ts +2 -2
  52. package/lib/cjs/divider/index.js +2 -1
  53. package/lib/cjs/dropdown/index.js +2 -1
  54. package/lib/cjs/empty/index.js +8 -4
  55. package/lib/cjs/form/baseForm.d.ts +1 -1
  56. package/lib/cjs/form/field.d.ts +1 -1
  57. package/lib/cjs/form/hoc/withField.js +2 -1
  58. package/lib/cjs/form/label.js +2 -1
  59. package/lib/cjs/grid/col.js +2 -1
  60. package/lib/cjs/grid/row.js +2 -1
  61. package/lib/cjs/iconButton/index.js +3 -1
  62. package/lib/cjs/input/index.js +9 -5
  63. package/lib/cjs/list/index.js +6 -3
  64. package/lib/cjs/modal/ConfirmModal.js +2 -1
  65. package/lib/cjs/modal/Modal.js +6 -2
  66. package/lib/cjs/modal/ModalContent.js +13 -6
  67. package/lib/cjs/navigation/Item.d.ts +1 -1
  68. package/lib/cjs/notification/notice.js +6 -3
  69. package/lib/cjs/pagination/index.js +4 -2
  70. package/lib/cjs/popconfirm/index.js +6 -3
  71. package/lib/cjs/radio/radio.d.ts +1 -1
  72. package/lib/cjs/radio/radio.js +4 -2
  73. package/lib/cjs/radio/radioGroup.d.ts +1 -1
  74. package/lib/cjs/rating/item.js +2 -1
  75. package/lib/cjs/scrollList/index.js +6 -3
  76. package/lib/cjs/select/index.js +9 -5
  77. package/lib/cjs/select/option.js +2 -1
  78. package/lib/cjs/sideSheet/SideSheetContent.js +6 -3
  79. package/lib/cjs/skeleton/index.js +3 -1
  80. package/lib/cjs/slider/index.js +9 -5
  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.d.ts +1 -0
  87. package/lib/cjs/tabs/TabBar.js +10 -2
  88. package/lib/cjs/tabs/TabPane.js +7 -3
  89. package/lib/cjs/tabs/index.js +2 -1
  90. package/lib/cjs/tabs/interface.d.ts +1 -0
  91. package/lib/cjs/tag/index.d.ts +2 -0
  92. package/lib/cjs/tag/index.js +60 -11
  93. package/lib/cjs/tag/interface.d.ts +1 -0
  94. package/lib/cjs/tagInput/index.js +7 -4
  95. package/lib/cjs/timePicker/Combobox.js +3 -1
  96. package/lib/cjs/toast/toast.js +6 -3
  97. package/lib/cjs/transfer/index.js +2 -1
  98. package/lib/cjs/tree/treeNode.js +2 -1
  99. package/lib/cjs/treeSelect/index.js +9 -6
  100. package/lib/cjs/typography/base.js +2 -1
  101. package/lib/cjs/typography/title.d.ts +1 -1
  102. package/lib/cjs/upload/index.d.ts +1 -1
  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.js +11 -3
  110. package/lib/es/card/index.js +10 -5
  111. package/lib/es/carousel/CarouselArrow.js +6 -2
  112. package/lib/es/carousel/index.js +2 -1
  113. package/lib/es/cascader/index.js +9 -6
  114. package/lib/es/cascader/item.js +2 -1
  115. package/lib/es/checkbox/checkbox.js +8 -4
  116. package/lib/es/collapsible/index.js +2 -1
  117. package/lib/es/datePicker/dateInput.d.ts +1 -1
  118. package/lib/es/datePicker/dateInput.js +2 -1
  119. package/lib/es/datePicker/datePicker.d.ts +1 -1
  120. package/lib/es/datePicker/datePicker.js +4 -2
  121. package/lib/es/datePicker/monthsGrid.d.ts +2 -2
  122. package/lib/es/divider/index.js +2 -1
  123. package/lib/es/dropdown/index.js +2 -1
  124. package/lib/es/empty/index.js +8 -4
  125. package/lib/es/form/baseForm.d.ts +1 -1
  126. package/lib/es/form/field.d.ts +1 -1
  127. package/lib/es/form/hoc/withField.js +2 -1
  128. package/lib/es/form/label.js +2 -1
  129. package/lib/es/grid/col.js +2 -1
  130. package/lib/es/grid/row.js +2 -1
  131. package/lib/es/iconButton/index.js +3 -1
  132. package/lib/es/input/index.js +9 -5
  133. package/lib/es/list/index.js +6 -3
  134. package/lib/es/modal/ConfirmModal.js +2 -1
  135. package/lib/es/modal/Modal.js +6 -2
  136. package/lib/es/modal/ModalContent.js +13 -6
  137. package/lib/es/navigation/Item.d.ts +1 -1
  138. package/lib/es/notification/notice.js +6 -3
  139. package/lib/es/pagination/index.js +4 -2
  140. package/lib/es/popconfirm/index.js +6 -3
  141. package/lib/es/radio/radio.d.ts +1 -1
  142. package/lib/es/radio/radio.js +4 -2
  143. package/lib/es/radio/radioGroup.d.ts +1 -1
  144. package/lib/es/rating/item.js +2 -1
  145. package/lib/es/scrollList/index.js +6 -3
  146. package/lib/es/select/index.js +9 -5
  147. package/lib/es/select/option.js +2 -1
  148. package/lib/es/sideSheet/SideSheetContent.js +6 -3
  149. package/lib/es/skeleton/index.js +3 -1
  150. package/lib/es/slider/index.js +9 -5
  151. package/lib/es/space/index.js +2 -1
  152. package/lib/es/spin/index.js +7 -3
  153. package/lib/es/switch/index.js +6 -4
  154. package/lib/es/table/Table.d.ts +1 -1
  155. package/lib/es/table/Table.js +6 -3
  156. package/lib/es/tabs/TabBar.d.ts +1 -0
  157. package/lib/es/tabs/TabBar.js +10 -2
  158. package/lib/es/tabs/TabPane.js +7 -3
  159. package/lib/es/tabs/index.js +2 -1
  160. package/lib/es/tabs/interface.d.ts +1 -0
  161. package/lib/es/tag/index.d.ts +2 -0
  162. package/lib/es/tag/index.js +56 -9
  163. package/lib/es/tag/interface.d.ts +1 -0
  164. package/lib/es/tagInput/index.js +7 -4
  165. package/lib/es/timePicker/Combobox.js +3 -1
  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 +8 -5
  170. package/lib/es/typography/base.js +2 -1
  171. package/lib/es/typography/title.d.ts +1 -1
  172. package/lib/es/upload/index.d.ts +1 -1
  173. package/lib/es/upload/index.js +13 -6
  174. package/list/index.tsx +16 -4
  175. package/modal/ConfirmModal.tsx +1 -1
  176. package/modal/Modal.tsx +2 -0
  177. package/modal/ModalContent.tsx +33 -21
  178. package/navigation/Item.tsx +1 -1
  179. package/notification/notice.tsx +16 -4
  180. package/package.json +9 -9
  181. package/pagination/index.tsx +16 -2
  182. package/popconfirm/index.tsx +11 -3
  183. package/radio/radio.tsx +10 -2
  184. package/rating/item.tsx +1 -1
  185. package/scrollList/index.tsx +19 -3
  186. package/select/index.tsx +13 -6
  187. package/select/option.tsx +5 -1
  188. package/sideSheet/SideSheetContent.tsx +3 -3
  189. package/skeleton/index.tsx +1 -1
  190. package/slider/index.tsx +5 -3
  191. package/space/index.tsx +1 -1
  192. package/spin/index.tsx +15 -9
  193. package/switch/index.tsx +9 -14
  194. package/table/Table.tsx +5 -3
  195. package/table/_story/v2/index.js +2 -1
  196. package/table/_story/v2/radioRowSelection.tsx +107 -0
  197. package/tabs/TabBar.tsx +8 -1
  198. package/tabs/TabPane.tsx +10 -4
  199. package/tabs/index.tsx +2 -1
  200. package/tabs/interface.ts +1 -0
  201. package/tag/index.tsx +32 -2
  202. package/tag/interface.ts +1 -0
  203. package/tagInput/index.tsx +3 -2
  204. package/timePicker/Combobox.tsx +6 -1
  205. package/toast/toast.tsx +3 -3
  206. package/transfer/index.tsx +1 -0
  207. package/tree/treeNode.tsx +1 -1
  208. package/treeSelect/index.tsx +16 -4
  209. package/typography/base.tsx +1 -1
  210. package/upload/index.tsx +107 -38
@@ -71,7 +71,8 @@ export default class Badge extends PureComponent {
71
71
  className: prefixCls
72
72
  }, rest), children, /*#__PURE__*/React.createElement("span", {
73
73
  className: wrapper,
74
- style: style
74
+ style: style,
75
+ "x-semi-prop": "count"
75
76
  }, dot ? null : content));
76
77
  }
77
78
 
@@ -68,6 +68,7 @@ export default class Banner extends BaseComponent {
68
68
  className: "".concat(prefixCls, "-close"),
69
69
  onClick: this.remove,
70
70
  icon: closeIcon || /*#__PURE__*/React.createElement(IconClose, {
71
+ "x-semi-prop": "closeIcon",
71
72
  "aria-hidden": true
72
73
  }),
73
74
  theme: "borderless",
@@ -113,7 +114,8 @@ export default class Banner extends BaseComponent {
113
114
 
114
115
  if (iconType) {
115
116
  return /*#__PURE__*/React.createElement("div", {
116
- className: iconCls
117
+ className: iconCls,
118
+ "x-semi-prop": "icon"
117
119
  }, iconType);
118
120
  }
119
121
 
@@ -155,12 +157,15 @@ export default class Banner extends BaseComponent {
155
157
  }, title ? /*#__PURE__*/React.createElement(Typography.Title, {
156
158
  heading: 5,
157
159
  className: "".concat(prefixCls, "-title"),
158
- component: "div"
160
+ component: "div",
161
+ "x-semi-prop": "title"
159
162
  }, title) : null, description ? /*#__PURE__*/React.createElement(Typography.Paragraph, {
160
163
  className: "".concat(prefixCls, "-description"),
161
- component: "div"
164
+ component: "div",
165
+ "x-semi-prop": "description"
162
166
  }, description) : null)), this.renderCloser()), children ? /*#__PURE__*/React.createElement("div", {
163
- className: "".concat(prefixCls, "-extra")
167
+ className: "".concat(prefixCls, "-extra"),
168
+ "x-semi-prop": "children"
164
169
  }, children) : null) : null;
165
170
  return banner;
166
171
  }
@@ -47,14 +47,15 @@ class Breadcrumb extends BaseComponent {
47
47
  }, /*#__PURE__*/React.createElement("span", {
48
48
  className: "".concat(clsPrefix, "-item-wrap")
49
49
  }, /*#__PURE__*/React.createElement("span", {
50
- role: 'button',
50
+ role: "button",
51
51
  tabIndex: 0,
52
- "aria-label": 'Expand breadcrumb items',
52
+ "aria-label": "Expand breadcrumb items",
53
53
  className: _concatInstanceProperty(_context = "".concat(clsPrefix, "-item ")).call(_context, clsPrefix, "-item-more"),
54
54
  onClick: item => this.foundation.handleExpand(item),
55
55
  onKeyPress: e => this.foundation.handleExpandEnterPress(e)
56
56
  }, hasRenderMore && renderMore(restItem), !hasRenderMore && moreType === 'default' && /*#__PURE__*/React.createElement(IconMore, null), !hasRenderMore && moreType === 'popover' && this.renderPopoverMore(restItem)), /*#__PURE__*/React.createElement("span", {
57
- className: "".concat(clsPrefix, "-separator")
57
+ className: "".concat(clsPrefix, "-separator"),
58
+ "x-semi-prop": "separator"
58
59
  }, this.props.separator)));
59
60
 
60
61
  _spliceInstanceProperty(template).call(template, 1, itemsLen - maxItemCount, spread);
@@ -1,7 +1,9 @@
1
+ import _omit from "lodash/omit";
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";
3
4
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
4
5
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
6
+ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
5
7
 
6
8
  var __rest = this && this.__rest || function (s, e) {
7
9
  var t = {};
@@ -52,7 +54,7 @@ export default class Button extends PureComponent {
52
54
 
53
55
  const baseProps = _Object$assign(_Object$assign({
54
56
  disabled
55
- }, attr), {
57
+ }, _omit(attr, ['x-semi-children-alias'])), {
56
58
  className: classNames(prefixCls, {
57
59
  [_concatInstanceProperty(_context = "".concat(prefixCls, "-")).call(_context, type)]: !disabled && type,
58
60
  ["".concat(prefixCls, "-disabled")]: disabled,
@@ -68,6 +70,12 @@ export default class Button extends PureComponent {
68
70
  'aria-disabled': disabled
69
71
  });
70
72
 
73
+ const xSemiProps = {};
74
+
75
+ if (!(className && _includesInstanceProperty(className).call(className, '-with-icon'))) {
76
+ xSemiProps['x-semi-prop'] = this.props['x-semi-children-alias'] || 'children';
77
+ }
78
+
71
79
  return (
72
80
  /*#__PURE__*/
73
81
  // eslint-disable-next-line react/button-has-type
@@ -75,10 +83,10 @@ export default class Button extends PureComponent {
75
83
  onClick: this.props.onClick,
76
84
  onMouseDown: this.props.onMouseDown,
77
85
  style: style
78
- }), /*#__PURE__*/React.createElement("span", {
86
+ }), /*#__PURE__*/React.createElement("span", _Object$assign({
79
87
  className: "".concat(prefixCls, "-content"),
80
88
  onClick: e => disabled && e.stopPropagation()
81
- }, children))
89
+ }, xSemiProps), children))
82
90
  );
83
91
  }
84
92
 
@@ -59,7 +59,8 @@ class Card extends PureComponent {
59
59
  React.createElement("div", {
60
60
  className: headerWrapperCls
61
61
  }, headerExtraContent && /*#__PURE__*/React.createElement("div", {
62
- className: "".concat(prefixcls, "-header-wrapper-extra")
62
+ className: "".concat(prefixcls, "-header-wrapper-extra"),
63
+ "x-semi-prop": "headerExtraContent"
63
64
  }, headerExtraContent), title && /*#__PURE__*/React.createElement("div", {
64
65
  className: titleCls
65
66
  }, _isString(title) ? /*#__PURE__*/React.createElement(Typography.Title, {
@@ -67,7 +68,8 @@ class Card extends PureComponent {
67
68
  ellipsis: {
68
69
  showTooltip: true,
69
70
  rows: 1
70
- }
71
+ },
72
+ "x-semi-prop": "title"
71
73
  }, title) : title)));
72
74
  }
73
75
 
@@ -80,7 +82,8 @@ class Card extends PureComponent {
80
82
  } = this.props;
81
83
  const coverCls = cls("".concat(prefixcls, "-cover"));
82
84
  return cover && /*#__PURE__*/React.createElement("div", {
83
- className: coverCls
85
+ className: coverCls,
86
+ "x-semi-prop": "cover"
84
87
  }, cover);
85
88
  };
86
89
 
@@ -110,7 +113,8 @@ class Card extends PureComponent {
110
113
  spacing: 12
111
114
  }, _mapInstanceProperty(actions).call(actions, (item, idx) => /*#__PURE__*/React.createElement("div", {
112
115
  key: idx,
113
- className: actionsItemCls
116
+ className: actionsItemCls,
117
+ "x-semi-prop": "actions.".concat(idx)
114
118
  }, item)))));
115
119
  };
116
120
 
@@ -125,7 +129,8 @@ class Card extends PureComponent {
125
129
  });
126
130
  return footer && /*#__PURE__*/React.createElement("div", {
127
131
  style: footerStyle,
128
- className: footerCls
132
+ className: footerCls,
133
+ "x-semi-prop": "footer"
129
134
  }, footer);
130
135
  };
131
136
  }
@@ -57,12 +57,16 @@ class CarouselArrow extends React.PureComponent {
57
57
  // role='button'
58
58
  className: leftClassNames,
59
59
  onClick: prev
60
- }, _get(this.props, 'arrowProps.leftArrow.props')), this.renderLeftIcon()), /*#__PURE__*/React.createElement("div", _Object$assign({
60
+ }, _get(this.props, 'arrowProps.leftArrow.props'), {
61
+ "x-semi-prop": "arrowProps.leftArrow.children"
62
+ }), this.renderLeftIcon()), /*#__PURE__*/React.createElement("div", _Object$assign({
61
63
  // role='button'
62
64
  // tabIndex={0}
63
65
  className: rightClassNames,
64
66
  onClick: next
65
- }, _get(this.props, 'arrowProps.rightArrow.props')), this.renderRightIcon()));
67
+ }, _get(this.props, 'arrowProps.rightArrow.props'), {
68
+ "x-semi-prop": "arrowProps.rightArrow.children"
69
+ }), this.renderRightIcon()));
66
70
  }
67
71
 
68
72
  }
@@ -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" | "dateTime" | "month" | "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" | "dateTime" | "month" | "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" | "dateTime" | "month" | "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>;
@@ -82,7 +82,7 @@ export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGri
82
82
  renderMonth(month: Date, panelType: PanelType): JSX.Element;
83
83
  handleWeeksRowNumChange: (weeksRowNum: number, panelType: PanelType) => void;
84
84
  reselect: () => void;
85
- getYAMOpenType: () => "left" | "right" | "none" | "both";
85
+ getYAMOpenType: () => "none" | "both" | "left" | "right";
86
86
  renderTimePicker(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
87
87
  renderYearAndMonth(panelType: PanelType, panelDetail: MonthInfo): JSX.Element;
88
88
  renderSwitch(panelType: PanelType): JSX.Element;
@@ -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, "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "getPopupContainer" | "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, "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "getPopupContainer" | "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
 
@@ -79,7 +79,9 @@ class Modal extends BaseComponent {
79
79
  onClick: this.handleCancel,
80
80
  loading: cancelLoading,
81
81
  type: "tertiary"
82
- }, this.props.cancelButtonProps), cancelText || locale.cancel);
82
+ }, this.props.cancelButtonProps, {
83
+ "x-semi-children-alias": "cancelText"
84
+ }), cancelText || locale.cancel);
83
85
  }
84
86
  };
85
87
 
@@ -91,7 +93,9 @@ class Modal extends BaseComponent {
91
93
  theme: "solid",
92
94
  loading: confirmLoading,
93
95
  onClick: this.handleOk
94
- }, this.props.okButtonProps), okText || locale.confirm)));
96
+ }, this.props.okButtonProps, {
97
+ "x-semi-children-alias": "okText"
98
+ }), okText || locale.confirm)));
95
99
  }; // getDialog = () => {
96
100
  // const {
97
101
  // footer,