@douyinfe/semi-ui 2.12.1-alpha.1 → 2.13.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 (221) hide show
  1. package/autoComplete/_story/autoComplete.stories.js +0 -1
  2. package/autoComplete/index.tsx +1 -1
  3. package/avatar/index.tsx +2 -2
  4. package/backtop/index.tsx +7 -11
  5. package/badge/index.tsx +1 -1
  6. package/banner/index.tsx +5 -5
  7. package/breadcrumb/index.tsx +3 -5
  8. package/button/Button.tsx +8 -10
  9. package/card/index.tsx +41 -43
  10. package/carousel/CarouselArrow.tsx +0 -2
  11. package/carousel/index.tsx +0 -1
  12. package/cascader/index.tsx +126 -102
  13. package/cascader/item.tsx +1 -1
  14. package/checkbox/checkbox.tsx +28 -20
  15. package/checkbox/checkboxInner.tsx +11 -1
  16. package/collapsible/index.tsx +1 -8
  17. package/datePicker/dateInput.tsx +0 -1
  18. package/datePicker/datePicker.tsx +5 -13
  19. package/dist/css/semi.css +31 -1
  20. package/dist/css/semi.min.css +1 -1
  21. package/dist/umd/semi-ui.js +5321 -3696
  22. package/dist/umd/semi-ui.js.map +1 -1
  23. package/dist/umd/semi-ui.min.js +1 -1
  24. package/dist/umd/semi-ui.min.js.map +1 -1
  25. package/divider/index.tsx +4 -8
  26. package/dropdown/index.tsx +1 -1
  27. package/empty/index.tsx +5 -13
  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/gulpfile.js +5 -5
  33. package/iconButton/index.tsx +1 -2
  34. package/input/index.tsx +11 -38
  35. package/inputNumber/__test__/inputNumber.test.js +2 -3
  36. package/inputNumber/_story/inputNumber.stories.js +53 -0
  37. package/inputNumber/index.tsx +0 -4
  38. package/lib/cjs/_base/base.css +22 -0
  39. package/lib/cjs/autoComplete/index.js +1 -1
  40. package/lib/cjs/avatar/index.js +2 -4
  41. package/lib/cjs/backtop/index.js +1 -2
  42. package/lib/cjs/badge/index.js +1 -2
  43. package/lib/cjs/banner/index.js +4 -9
  44. package/lib/cjs/breadcrumb/index.js +3 -4
  45. package/lib/cjs/button/Button.js +3 -13
  46. package/lib/cjs/card/index.js +5 -10
  47. package/lib/cjs/carousel/CarouselArrow.js +2 -6
  48. package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
  49. package/lib/cjs/carousel/index.d.ts +1 -1
  50. package/lib/cjs/carousel/index.js +1 -2
  51. package/lib/cjs/cascader/index.js +10 -11
  52. package/lib/cjs/cascader/item.js +1 -2
  53. package/lib/cjs/checkbox/checkbox.d.ts +3 -2
  54. package/lib/cjs/checkbox/checkbox.js +33 -15
  55. package/lib/cjs/checkbox/checkboxInner.d.ts +6 -0
  56. package/lib/cjs/checkbox/checkboxInner.js +14 -4
  57. package/lib/cjs/collapsible/index.js +1 -2
  58. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  59. package/lib/cjs/datePicker/dateInput.js +1 -2
  60. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  61. package/lib/cjs/datePicker/datePicker.js +2 -4
  62. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  63. package/lib/cjs/divider/index.js +1 -2
  64. package/lib/cjs/dropdown/index.js +1 -2
  65. package/lib/cjs/empty/index.js +4 -8
  66. package/lib/cjs/form/baseForm.d.ts +1 -1
  67. package/lib/cjs/form/field.d.ts +1 -1
  68. package/lib/cjs/form/hoc/withField.js +1 -2
  69. package/lib/cjs/form/label.js +1 -2
  70. package/lib/cjs/grid/col.js +1 -2
  71. package/lib/cjs/grid/row.js +1 -2
  72. package/lib/cjs/iconButton/index.js +1 -3
  73. package/lib/cjs/input/index.js +5 -9
  74. package/lib/cjs/inputNumber/index.js +0 -4
  75. package/lib/cjs/list/index.js +3 -6
  76. package/lib/cjs/modal/ConfirmModal.js +1 -2
  77. package/lib/cjs/modal/Modal.js +2 -6
  78. package/lib/cjs/modal/ModalContent.js +6 -13
  79. package/lib/cjs/notification/notice.js +3 -6
  80. package/lib/cjs/pagination/index.js +2 -4
  81. package/lib/cjs/popconfirm/index.js +3 -6
  82. package/lib/cjs/popover/index.d.ts +1 -0
  83. package/lib/cjs/radio/radio.d.ts +1 -1
  84. package/lib/cjs/radio/radio.js +2 -4
  85. package/lib/cjs/radio/radioGroup.d.ts +1 -1
  86. package/lib/cjs/rating/item.js +1 -2
  87. package/lib/cjs/scrollList/index.js +3 -6
  88. package/lib/cjs/select/index.js +4 -8
  89. package/lib/cjs/select/option.js +1 -2
  90. package/lib/cjs/sideSheet/SideSheetContent.js +3 -6
  91. package/lib/cjs/skeleton/index.js +1 -3
  92. package/lib/cjs/space/index.js +1 -2
  93. package/lib/cjs/spin/index.js +3 -7
  94. package/lib/cjs/switch/index.js +4 -6
  95. package/lib/cjs/table/Table.js +3 -6
  96. package/lib/cjs/tabs/TabBar.js +1 -2
  97. package/lib/cjs/tabs/TabPane.js +2 -5
  98. package/lib/cjs/tagInput/index.d.ts +6 -1
  99. package/lib/cjs/tagInput/index.js +50 -17
  100. package/lib/cjs/timePicker/Combobox.js +1 -3
  101. package/lib/cjs/timePicker/TimePicker.d.ts +2 -2
  102. package/lib/cjs/timePicker/TimeShape.d.ts +1 -1
  103. package/lib/cjs/timePicker/index.d.ts +2 -2
  104. package/lib/cjs/toast/toast.js +3 -6
  105. package/lib/cjs/transfer/index.js +1 -2
  106. package/lib/cjs/tree/treeNode.js +1 -2
  107. package/lib/cjs/treeSelect/index.js +3 -6
  108. package/lib/cjs/typography/base.js +1 -2
  109. package/lib/cjs/typography/title.d.ts +1 -1
  110. package/lib/cjs/upload/index.d.ts +2 -2
  111. package/lib/cjs/upload/index.js +6 -13
  112. package/lib/es/_base/base.css +22 -0
  113. package/lib/es/autoComplete/index.js +1 -1
  114. package/lib/es/avatar/index.js +2 -4
  115. package/lib/es/backtop/index.js +1 -2
  116. package/lib/es/badge/index.js +1 -2
  117. package/lib/es/banner/index.js +4 -9
  118. package/lib/es/breadcrumb/index.js +3 -4
  119. package/lib/es/button/Button.js +3 -11
  120. package/lib/es/card/index.js +5 -10
  121. package/lib/es/carousel/CarouselArrow.js +2 -6
  122. package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
  123. package/lib/es/carousel/index.d.ts +1 -1
  124. package/lib/es/carousel/index.js +1 -2
  125. package/lib/es/cascader/index.js +10 -11
  126. package/lib/es/cascader/item.js +1 -2
  127. package/lib/es/checkbox/checkbox.d.ts +3 -2
  128. package/lib/es/checkbox/checkbox.js +33 -15
  129. package/lib/es/checkbox/checkboxInner.d.ts +6 -0
  130. package/lib/es/checkbox/checkboxInner.js +14 -4
  131. package/lib/es/collapsible/index.js +1 -2
  132. package/lib/es/datePicker/dateInput.d.ts +1 -1
  133. package/lib/es/datePicker/dateInput.js +1 -2
  134. package/lib/es/datePicker/datePicker.d.ts +1 -1
  135. package/lib/es/datePicker/datePicker.js +2 -4
  136. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  137. package/lib/es/divider/index.js +1 -2
  138. package/lib/es/dropdown/index.js +1 -2
  139. package/lib/es/empty/index.js +4 -8
  140. package/lib/es/form/baseForm.d.ts +1 -1
  141. package/lib/es/form/field.d.ts +1 -1
  142. package/lib/es/form/hoc/withField.js +1 -2
  143. package/lib/es/form/label.js +1 -2
  144. package/lib/es/grid/col.js +1 -2
  145. package/lib/es/grid/row.js +1 -2
  146. package/lib/es/iconButton/index.js +1 -3
  147. package/lib/es/input/index.js +5 -9
  148. package/lib/es/inputNumber/index.js +0 -4
  149. package/lib/es/list/index.js +3 -6
  150. package/lib/es/modal/ConfirmModal.js +1 -2
  151. package/lib/es/modal/Modal.js +2 -6
  152. package/lib/es/modal/ModalContent.js +6 -13
  153. package/lib/es/notification/notice.js +3 -6
  154. package/lib/es/pagination/index.js +2 -4
  155. package/lib/es/popconfirm/index.js +3 -6
  156. package/lib/es/popover/index.d.ts +1 -0
  157. package/lib/es/radio/radio.d.ts +1 -1
  158. package/lib/es/radio/radio.js +2 -4
  159. package/lib/es/radio/radioGroup.d.ts +1 -1
  160. package/lib/es/rating/item.js +1 -2
  161. package/lib/es/scrollList/index.js +3 -6
  162. package/lib/es/select/index.js +4 -8
  163. package/lib/es/select/option.js +1 -2
  164. package/lib/es/sideSheet/SideSheetContent.js +3 -6
  165. package/lib/es/skeleton/index.js +1 -3
  166. package/lib/es/space/index.js +1 -2
  167. package/lib/es/spin/index.js +3 -7
  168. package/lib/es/switch/index.js +4 -6
  169. package/lib/es/table/Table.js +3 -6
  170. package/lib/es/tabs/TabBar.js +1 -2
  171. package/lib/es/tabs/TabPane.js +2 -5
  172. package/lib/es/tagInput/index.d.ts +6 -1
  173. package/lib/es/tagInput/index.js +47 -17
  174. package/lib/es/timePicker/Combobox.js +1 -3
  175. package/lib/es/timePicker/TimePicker.d.ts +2 -2
  176. package/lib/es/timePicker/TimeShape.d.ts +1 -1
  177. package/lib/es/timePicker/index.d.ts +2 -2
  178. package/lib/es/toast/toast.js +3 -6
  179. package/lib/es/transfer/index.js +1 -2
  180. package/lib/es/tree/treeNode.js +1 -2
  181. package/lib/es/treeSelect/index.js +3 -6
  182. package/lib/es/typography/base.js +1 -2
  183. package/lib/es/typography/title.d.ts +1 -1
  184. package/lib/es/upload/index.d.ts +2 -2
  185. package/lib/es/upload/index.js +6 -13
  186. package/list/index.tsx +4 -16
  187. package/modal/ConfirmModal.tsx +1 -1
  188. package/modal/Modal.tsx +0 -2
  189. package/modal/ModalContent.tsx +14 -27
  190. package/notification/notice.tsx +4 -16
  191. package/package.json +9 -9
  192. package/pagination/index.tsx +2 -16
  193. package/popconfirm/index.tsx +3 -11
  194. package/popover/index.tsx +1 -1
  195. package/radio/radio.tsx +2 -10
  196. package/rating/item.tsx +1 -1
  197. package/scrollList/index.tsx +3 -19
  198. package/select/_story/select.stories.js +11 -0
  199. package/select/index.tsx +4 -12
  200. package/select/option.tsx +1 -5
  201. package/sideSheet/SideSheetContent.tsx +3 -3
  202. package/skeleton/index.tsx +1 -1
  203. package/space/index.tsx +1 -1
  204. package/spin/index.tsx +9 -15
  205. package/switch/index.tsx +14 -9
  206. package/table/Table.tsx +3 -5
  207. package/table/_story/v2/FixedOnHeaderRow/index.jsx +3 -0
  208. package/tabs/TabBar.tsx +1 -1
  209. package/tabs/TabPane.tsx +4 -9
  210. package/tabs/_story/tabs.stories.js +36 -0
  211. package/tag/_story/tag.stories.js +1 -1
  212. package/tagInput/index.tsx +47 -22
  213. package/timePicker/Combobox.tsx +1 -6
  214. package/toast/toast.tsx +3 -3
  215. package/transfer/index.tsx +0 -1
  216. package/tree/treeNode.tsx +1 -1
  217. package/treeSelect/index.tsx +3 -15
  218. package/typography/base.tsx +1 -1
  219. package/upload/_story/upload.stories.js +152 -0
  220. package/upload/index.tsx +38 -107
  221. package/yarn-error.log +0 -26235
@@ -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" | "large" | "middle";
78
+ buttonSize?: "small" | "middle" | "large";
79
79
  isCardRadio?: boolean;
80
80
  isPureCardRadio?: boolean;
81
81
  };
@@ -165,12 +165,10 @@ 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: this.addonId,
169
- "x-semi-prop": "children"
168
+ id: addonId
170
169
  }, children) : null, extra && !isButtonRadio ? /*#__PURE__*/React.createElement("div", {
171
170
  className: "".concat(prefix, "-extra"),
172
- id: this.extraId,
173
- "x-semi-prop": "extra"
171
+ id: extraId
174
172
  }, extra) : null);
175
173
 
176
174
  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" | "large" | "middle">;
51
+ buttonSize: PropTypes.Requireable<"small" | "middle" | "large">;
52
52
  type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
53
53
  value: PropTypes.Requireable<any>;
54
54
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
@@ -98,8 +98,7 @@ export default class Item extends PureComponent {
98
98
  width: "".concat(firstWidth * 100, "%")
99
99
  }
100
100
  }, content), /*#__PURE__*/React.createElement("div", {
101
- className: "".concat(prefixCls, "-second"),
102
- "x-semi-prop": "character"
101
+ className: "".concat(prefixCls, "-second")
103
102
  }, content)));
104
103
  }
105
104
 
@@ -35,19 +35,16 @@ class ScrollList extends BaseComponent {
35
35
  }, header ? /*#__PURE__*/React.createElement("div", {
36
36
  className: clsHeader
37
37
  }, /*#__PURE__*/React.createElement("div", {
38
- className: "".concat(clsHeader, "-title"),
39
- "x-semi-prop": this.props['x-semi-header-alias'] || "header"
38
+ className: "".concat(clsHeader, "-title")
40
39
  }, header), /*#__PURE__*/React.createElement("div", {
41
40
  className: "".concat(clsWrapper, "-line")
42
41
  })) : null, /*#__PURE__*/React.createElement("div", {
43
42
  className: "".concat(clsWrapper, "-body"),
44
43
  style: {
45
44
  height: bodyHeight ? bodyHeight : ''
46
- },
47
- "x-semi-prop": "children"
45
+ }
48
46
  }, children), footer ? /*#__PURE__*/React.createElement("div", {
49
- className: "".concat(clsWrapper, "-footer"),
50
- "x-semi-prop": this.props['x-semi-footer-alias'] || "footer"
47
+ className: "".concat(clsWrapper, "-footer")
51
48
  }, footer) : null);
52
49
  }
53
50
 
@@ -663,8 +663,7 @@ class Select extends BaseComponent {
663
663
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
664
664
  className: contentWrapperCls
665
665
  }, /*#__PURE__*/React.createElement("span", {
666
- className: spanCls,
667
- "x-semi-prop": "placeholder"
666
+ className: spanCls
668
667
  }, renderText || renderText === 0 ? renderText : placeholder), filterable && showInput ? this.renderInput() : null));
669
668
  }
670
669
 
@@ -826,8 +825,7 @@ class Select extends BaseComponent {
826
825
  ["".concat(prefixcls, "-suffix-icon")]: isSemiIcon(suffix)
827
826
  });
828
827
  return /*#__PURE__*/React.createElement("div", {
829
- className: suffixWrapperCls,
830
- "x-semi-prop": "suffix"
828
+ className: suffixWrapperCls
831
829
  }, suffix);
832
830
  }
833
831
 
@@ -846,8 +844,7 @@ class Select extends BaseComponent {
846
844
  });
847
845
  return /*#__PURE__*/React.createElement("div", {
848
846
  className: prefixWrapperCls,
849
- id: insetLabelId,
850
- "x-semi-prop": "prefix,insetLabel"
847
+ id: insetLabelId
851
848
  }, labelNode);
852
849
  }
853
850
 
@@ -899,8 +896,7 @@ class Select extends BaseComponent {
899
896
  });
900
897
  const showClear = this.props.showClear && (selections.size || inputValue) && !disabled && (isHovering || isOpen);
901
898
  const arrowContent = showArrow ? /*#__PURE__*/React.createElement("div", {
902
- className: "".concat(prefixcls, "-arrow"),
903
- "x-semi-prop": "arrowIcon"
899
+ className: "".concat(prefixcls, "-arrow")
904
900
  }, arrowIcon) : /*#__PURE__*/React.createElement("div", {
905
901
  className: "".concat(prefixcls, "-arrow-empty")
906
902
  });
@@ -100,8 +100,7 @@ class Option extends PureComponent {
100
100
  return /*#__PURE__*/React.createElement(LocaleConsumer, {
101
101
  componentName: "Select"
102
102
  }, locale => /*#__PURE__*/React.createElement("div", {
103
- className: optionClassName,
104
- "x-semi-prop": "emptyContent"
103
+ className: optionClassName
105
104
  }, emptyContent || locale.emptyText));
106
105
  } // Since there are empty, locale and other logic, the custom renderOptionItem is directly converged to the internal option instead of being placed in Select/index
107
106
 
@@ -79,8 +79,7 @@ export default class SideSheetContent extends React.PureComponent {
79
79
 
80
80
  if (title) {
81
81
  header = /*#__PURE__*/React.createElement("div", {
82
- className: "".concat(prefixCls, "-title"),
83
- "x-semi-prop": "title"
82
+ className: "".concat(prefixCls, "-title")
84
83
  }, this.props.title);
85
84
  }
86
85
 
@@ -135,11 +134,9 @@ export default class SideSheetContent extends React.PureComponent {
135
134
  className: "".concat(prefixCls, "-content")
136
135
  }, header, /*#__PURE__*/React.createElement("div", {
137
136
  className: "".concat(prefixCls, "-body"),
138
- style: props.bodyStyle,
139
- "x-semi-prop": "children"
137
+ style: props.bodyStyle
140
138
  }, props.children), props.footer ? /*#__PURE__*/React.createElement("div", {
141
- className: "".concat(prefixCls, "-footer"),
142
- "x-semi-prop": "footer"
139
+ className: "".concat(prefixCls, "-footer")
143
140
  }, props.footer) : null));
144
141
  return dialogElement;
145
142
  }
@@ -43,9 +43,7 @@ class Skeleton extends PureComponent {
43
43
  content = /*#__PURE__*/React.createElement("div", _Object$assign({
44
44
  className: skCls,
45
45
  style: style
46
- }, others, {
47
- "x-semi-prop": "placeholder"
48
- }), placeholder);
46
+ }, others), placeholder);
49
47
  } else {
50
48
  content = children;
51
49
  }
@@ -66,8 +66,7 @@ class Space extends PureComponent {
66
66
  const childrenNodes = flatten(children);
67
67
  return /*#__PURE__*/React.createElement("div", {
68
68
  className: classNames,
69
- style: realStyle,
70
- "x-semi-prop": "children"
69
+ style: realStyle
71
70
  }, childrenNodes);
72
71
  }
73
72
 
@@ -67,11 +67,8 @@ class Spin extends BaseComponent {
67
67
  return loading ? /*#__PURE__*/React.createElement("div", {
68
68
  className: "".concat(prefixCls, "-wrapper")
69
69
  }, indicator ? /*#__PURE__*/React.createElement("div", {
70
- className: spinIconCls,
71
- "x-semi-prop": "indicator"
72
- }, indicator) : /*#__PURE__*/React.createElement(SpinIcon, null), tip ? /*#__PURE__*/React.createElement("div", {
73
- "x-semi-prop": "tip"
74
- }, tip) : null) : null;
70
+ className: spinIconCls
71
+ }, indicator) : /*#__PURE__*/React.createElement(SpinIcon, null), tip ? /*#__PURE__*/React.createElement("div", null, tip) : null) : null;
75
72
  }
76
73
 
77
74
  render() {
@@ -98,8 +95,7 @@ class Spin extends BaseComponent {
98
95
  style: style
99
96
  }, this.renderSpin(), /*#__PURE__*/React.createElement("div", {
100
97
  className: "".concat(prefixCls, "-children"),
101
- style: childStyle,
102
- "x-semi-prop": "children"
98
+ style: childStyle
103
99
  }, children));
104
100
  }
105
101
 
@@ -119,21 +119,19 @@ class Switch extends BaseComponent {
119
119
  className: cssClasses.KNOB,
120
120
  "aria-hidden": true
121
121
  }), showCheckedText ? /*#__PURE__*/React.createElement("div", {
122
- className: cssClasses.CHECKED_TEXT,
123
- "x-semi-prop": "checkedText"
122
+ className: cssClasses.CHECKED_TEXT
124
123
  }, checkedText) : null, showUncheckedText ? /*#__PURE__*/React.createElement("div", {
125
- className: cssClasses.UNCHECKED_TEXT,
126
- "x-semi-prop": "uncheckedText"
124
+ className: cssClasses.UNCHECKED_TEXT
127
125
  }, uncheckedText) : null, /*#__PURE__*/React.createElement("input", _Object$assign({}, switchProps, {
128
126
  ref: this.switchRef,
129
127
  id: id,
130
- role: "switch",
128
+ role: 'switch',
131
129
  "aria-checked": nativeControlChecked,
132
130
  "aria-invalid": this.props['aria-invalid'],
133
131
  "aria-errormessage": this.props['aria-errormessage'],
134
132
  "aria-label": this.props['aria-label'],
135
133
  "aria-labelledby": this.props['aria-labelledby'],
136
- "aria-describedby": this.props['aria-describedby'],
134
+ "aria-describedby": this.props["aria-describedby"],
137
135
  "aria-disabled": this.props['disabled'],
138
136
  onChange: e => this.foundation.handleChange(e.target.checked, e),
139
137
  onFocus: e => this.handleFocusVisible(e),
@@ -582,8 +582,7 @@ class Table extends BaseComponent {
582
582
  }
583
583
 
584
584
  return /*#__PURE__*/isValidElement(title) || typeof title === 'string' ? /*#__PURE__*/React.createElement("div", {
585
- className: "".concat(prefixCls, "-title"),
586
- "x-semi-prop": "title"
585
+ className: "".concat(prefixCls, "-title")
587
586
  }, title) : null;
588
587
  };
589
588
 
@@ -608,8 +607,7 @@ class Table extends BaseComponent {
608
607
  }, (locale, localeCode) => /*#__PURE__*/React.createElement("div", {
609
608
  className: wrapCls
610
609
  }, /*#__PURE__*/React.createElement("div", {
611
- className: "".concat(prefixCls, "-empty"),
612
- "x-semi-prop": "empty"
610
+ className: "".concat(prefixCls, "-empty")
613
611
  }, empty || locale.emptyText)));
614
612
  };
615
613
 
@@ -629,8 +627,7 @@ class Table extends BaseComponent {
629
627
 
630
628
  return /*#__PURE__*/isValidElement(footer) || typeof footer === 'string' ? /*#__PURE__*/React.createElement("div", {
631
629
  className: "".concat(prefixCls, "-footer"),
632
- key: "footer",
633
- "x-semi-prop": "footer"
630
+ key: "footer"
634
631
  }, footer) : null;
635
632
  };
636
633
 
@@ -246,8 +246,7 @@ class TabBar extends React.Component {
246
246
 
247
247
  return /*#__PURE__*/React.createElement("div", {
248
248
  className: extraCls,
249
- style: tabBarStyle,
250
- "x-semi-prop": "tabBarExtraContent"
249
+ style: tabBarStyle
251
250
  }, tabBarExtraContent);
252
251
  }
253
252
 
@@ -116,17 +116,14 @@ class TabPane extends PureComponent {
116
116
  style: style,
117
117
  "aria-hidden": active ? 'false' : 'true',
118
118
  tabIndex: 0
119
- }, getDataAttr(restProps), {
120
- "x-semi-prop": "children"
121
- }), motion ? /*#__PURE__*/React.createElement(TabPaneTransition, {
119
+ }, getDataAttr(restProps)), motion ? /*#__PURE__*/React.createElement(TabPaneTransition, {
122
120
  direction: this.getDirection(this.context.activeKey, itemKey, this.context.panes),
123
121
  motion: motion,
124
122
  mode: tabPosition === 'top' ? 'horizontal' : 'vertical',
125
123
  state: active ? 'enter' : 'leave'
126
124
  }, transitionStyle => /*#__PURE__*/React.createElement("div", {
127
125
  className: "".concat(cssClasses.TABS_PANE_MOTION_OVERLAY),
128
- style: _Object$assign({}, transitionStyle),
129
- "x-semi-prop": "children"
126
+ style: _Object$assign({}, transitionStyle)
130
127
  }, shouldRender ? children : null)) : shouldRender ? children : null);
131
128
  }
132
129
 
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { strings } from '@douyinfe/semi-foundation/lib/es/tagInput/constants';
4
4
  import '@douyinfe/semi-foundation/lib/es/tagInput/tagInput.css';
5
- import { TagInputAdapter } from '@douyinfe/semi-foundation/lib/es/tagInput/foundation';
5
+ import TagInputFoundation, { TagInputAdapter } from '@douyinfe/semi-foundation/lib/es/tagInput/foundation';
6
6
  import { ArrayElement } from '../_base/base';
7
7
  import BaseComponent from '../_base/baseComponent';
8
8
  import { PopoverProps } from '../popover';
@@ -32,6 +32,8 @@ export interface TagInputProps {
32
32
  onKeyDown?: (e: React.MouseEvent<HTMLInputElement>) => void;
33
33
  onRemove?: (removedValue: string, idx: number) => void;
34
34
  placeholder?: string;
35
+ insetLabel?: React.ReactNode;
36
+ insetLabelId?: string;
35
37
  prefix?: React.ReactNode;
36
38
  renderTagItem?: (value: string, index: number) => React.ReactNode;
37
39
  separator?: string | string[] | null;
@@ -108,6 +110,7 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
108
110
  onKeyDown: (...args: any[]) => void;
109
111
  };
110
112
  inputRef: React.RefObject<HTMLInputElement>;
113
+ foundation: TagInputFoundation;
111
114
  constructor(props: TagInputProps);
112
115
  static getDerivedStateFromProps(nextProps: TagInputProps, prevState: TagInputState): {
113
116
  tagsArray: string[];
@@ -124,6 +127,8 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
124
127
  handleTagClose: (idx: number) => void;
125
128
  handleInputMouseLeave: (e: React.MouseEvent<HTMLDivElement>) => void;
126
129
  handleInputMouseEnter: (e: React.MouseEvent<HTMLDivElement>) => void;
130
+ handleClickPrefixOrSuffix: (e: React.MouseEvent<HTMLInputElement>) => void;
131
+ handlePreventMouseDown: (e: React.MouseEvent<HTMLInputElement>) => void;
127
132
  renderClearBtn(): JSX.Element;
128
133
  renderPrefix(): JSX.Element;
129
134
  renderSuffix(): JSX.Element;
@@ -13,6 +13,7 @@ import PropTypes from 'prop-types';
13
13
  import { cssClasses, strings } from '@douyinfe/semi-foundation/lib/es/tagInput/constants';
14
14
  import '@douyinfe/semi-foundation/lib/es/tagInput/tagInput.css';
15
15
  import TagInputFoundation from '@douyinfe/semi-foundation/lib/es/tagInput/foundation';
16
+ import { isSemiIcon } from '../_utils';
16
17
  import BaseComponent from '../_base/baseComponent';
17
18
  import Tag from '../tag';
18
19
  import Input from '../input';
@@ -61,6 +62,14 @@ class TagInput extends BaseComponent {
61
62
  this.foundation.handleInputMouseEnter();
62
63
  };
63
64
 
65
+ this.handleClickPrefixOrSuffix = e => {
66
+ this.foundation.handleClickPrefixOrSuffix(e);
67
+ };
68
+
69
+ this.handlePreventMouseDown = e => {
70
+ this.foundation.handlePreventMouseDown(e);
71
+ };
72
+
64
73
  this.foundation = new TagInputFoundation(this.adapter);
65
74
  this.state = {
66
75
  tagsArray: props.defaultValue || [],
@@ -112,6 +121,19 @@ class TagInput extends BaseComponent {
112
121
  focusing
113
122
  });
114
123
  },
124
+ toggleFocusing: isFocus => {
125
+ const input = this.inputRef && this.inputRef.current;
126
+
127
+ if (isFocus) {
128
+ input && input.focus();
129
+ } else {
130
+ input && input.blur();
131
+ }
132
+
133
+ this.setState({
134
+ focusing: isFocus
135
+ });
136
+ },
115
137
  setHovering: hovering => {
116
138
  this.setState({
117
139
  hovering
@@ -182,22 +204,29 @@ class TagInput extends BaseComponent {
182
204
 
183
205
  renderPrefix() {
184
206
  const {
185
- prefix
207
+ prefix,
208
+ insetLabel,
209
+ insetLabelId
186
210
  } = this.props;
211
+ const labelNode = prefix || insetLabel;
187
212
 
188
- if (_isNull(prefix) || _isUndefined(prefix)) {
213
+ if (_isNull(labelNode) || _isUndefined(labelNode)) {
189
214
  return null;
190
215
  }
191
216
 
192
217
  const prefixWrapperCls = cls("".concat(prefixCls, "-prefix"), {
193
- ["".concat(prefixCls, "-prefix-text")]: prefix && _isString(prefix),
218
+ ["".concat(prefixCls, "-inset-label")]: insetLabel,
219
+ ["".concat(prefixCls, "-prefix-text")]: labelNode && _isString(labelNode),
194
220
  // eslint-disable-next-line max-len
195
- ["".concat(prefixCls, "-prefix-icon")]: /*#__PURE__*/React.isValidElement(prefix) && !(prefix && _isString(prefix))
196
- });
221
+ ["".concat(prefixCls, "-prefix-icon")]: isSemiIcon(labelNode)
222
+ }); // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
223
+
197
224
  return /*#__PURE__*/React.createElement("div", {
198
225
  className: prefixWrapperCls,
199
- "x-semi-prop": "prefix"
200
- }, prefix);
226
+ onMouseDown: this.handlePreventMouseDown,
227
+ onClick: this.handleClickPrefixOrSuffix,
228
+ id: insetLabelId
229
+ }, labelNode);
201
230
  }
202
231
 
203
232
  renderSuffix() {
@@ -212,11 +241,13 @@ class TagInput extends BaseComponent {
212
241
  const suffixWrapperCls = cls("".concat(prefixCls, "-suffix"), {
213
242
  ["".concat(prefixCls, "-suffix-text")]: suffix && _isString(suffix),
214
243
  // eslint-disable-next-line max-len
215
- ["".concat(prefixCls, "-suffix-icon")]: /*#__PURE__*/React.isValidElement(suffix) && !(suffix && _isString(suffix))
216
- });
244
+ ["".concat(prefixCls, "-suffix-icon")]: isSemiIcon(suffix)
245
+ }); // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
246
+
217
247
  return /*#__PURE__*/React.createElement("div", {
218
248
  className: suffixWrapperCls,
219
- "x-semi-prop": "suffix"
249
+ onMouseDown: this.handlePreventMouseDown,
250
+ onClick: this.handleClickPrefixOrSuffix
220
251
  }, suffix);
221
252
  }
222
253
 
@@ -241,7 +272,7 @@ class TagInput extends BaseComponent {
241
272
  const typoCls = cls("".concat(prefixCls, "-wrapper-typo"), {
242
273
  ["".concat(prefixCls, "-wrapper-typo-disabled")]: disabled
243
274
  });
244
- const spanNotWithPopoverCls = cls("".concat(prefixCls, "-wrapper-n"), {
275
+ const restTagsCls = cls("".concat(prefixCls, "-wrapper-n"), {
245
276
  ["".concat(prefixCls, "-wrapper-n-disabled")]: disabled
246
277
  });
247
278
  const restTags = [];
@@ -283,17 +314,16 @@ class TagInput extends BaseComponent {
283
314
  }
284
315
  });
285
316
 
286
- return /*#__PURE__*/React.createElement(React.Fragment, null, tags, restTags.length > 0 && (showRestTagsPopover && !disabled ? /*#__PURE__*/React.createElement(Popover, _Object$assign({
317
+ const restTagsContent = /*#__PURE__*/React.createElement("span", {
318
+ className: restTagsCls
319
+ }, "+", tagsArray.length - maxTagCount);
320
+ return /*#__PURE__*/React.createElement(React.Fragment, null, tags, restTags.length > 0 && (showRestTagsPopover ? /*#__PURE__*/React.createElement(Popover, _Object$assign({
287
321
  content: restTags,
288
322
  showArrow: true,
289
323
  trigger: "hover",
290
324
  position: "top",
291
325
  autoAdjustOverflow: true
292
- }, restTagsPopoverProps), /*#__PURE__*/React.createElement("span", {
293
- className: cls("".concat(prefixCls, "-wrapper-n"))
294
- }, "+", tagsArray.length - maxTagCount)) : /*#__PURE__*/React.createElement("span", {
295
- className: spanNotWithPopoverCls
296
- }, "+".concat(tagsArray.length - maxTagCount))));
326
+ }, restTagsPopoverProps), restTagsContent) : restTagsContent));
297
327
  }
298
328
 
299
329
  blur() {
@@ -278,9 +278,7 @@ class Combobox extends BaseComponent {
278
278
  componentName: "TimePicker"
279
279
  }, (locale, localeCode) => /*#__PURE__*/React.createElement(ScrollList, {
280
280
  header: panelHeader,
281
- footer: panelFooter,
282
- "x-semi-header-alias": "panelHeader",
283
- "x-semi-footer-alias": "panelFooter"
281
+ footer: panelFooter
284
282
  }, this.renderAMPMSelect(locale, localeCode), this.renderHourSelect(value.getHours(), locale), this.renderMinuteSelect(value.getMinutes(), locale), this.renderSecondSelect(value.getSeconds(), locale)));
285
283
  }
286
284
 
@@ -97,11 +97,11 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
97
97
  'aria-required': PropTypes.Requireable<boolean>;
98
98
  prefixCls: PropTypes.Requireable<string>;
99
99
  clearText: PropTypes.Requireable<string>;
100
- value: PropTypes.Requireable<string | number | string[] | Date | number[] | Date[]>;
100
+ value: PropTypes.Requireable<string | number | string[] | number[] | Date | Date[]>;
101
101
  inputReadOnly: PropTypes.Requireable<boolean>;
102
102
  disabled: PropTypes.Requireable<boolean>;
103
103
  showClear: PropTypes.Requireable<boolean>;
104
- defaultValue: PropTypes.Requireable<string | number | string[] | Date | number[] | Date[]>;
104
+ defaultValue: PropTypes.Requireable<string | number | string[] | number[] | Date | Date[]>;
105
105
  open: PropTypes.Requireable<boolean>;
106
106
  defaultOpen: PropTypes.Requireable<boolean>;
107
107
  onOpenChange: PropTypes.Requireable<(...args: any[]) => any>;
@@ -6,5 +6,5 @@ import PropTypes from 'prop-types';
6
6
  * - \[12:00:12, 12:21:12]
7
7
  * - \[[12:00:12, 12:21:12], [12:11:12, 12:32:12]]
8
8
  */
9
- declare const TimeShape: PropTypes.Requireable<string | number | string[] | Date | number[] | Date[]>;
9
+ declare const TimeShape: PropTypes.Requireable<string | number | string[] | number[] | Date | Date[]>;
10
10
  export { TimeShape };
@@ -18,11 +18,11 @@ export default class LocaleTimePicker extends React.PureComponent<LocalePickerPr
18
18
  'aria-required': import("prop-types").Requireable<boolean>;
19
19
  prefixCls: import("prop-types").Requireable<string>;
20
20
  clearText: import("prop-types").Requireable<string>;
21
- value: import("prop-types").Requireable<string | number | string[] | Date | number[] | Date[]>;
21
+ value: import("prop-types").Requireable<string | number | string[] | number[] | Date | Date[]>;
22
22
  inputReadOnly: import("prop-types").Requireable<boolean>;
23
23
  disabled: import("prop-types").Requireable<boolean>;
24
24
  showClear: import("prop-types").Requireable<boolean>;
25
- defaultValue: import("prop-types").Requireable<string | number | string[] | Date | number[] | Date[]>;
25
+ defaultValue: import("prop-types").Requireable<string | number | string[] | number[] | Date | Date[]>;
26
26
  open: import("prop-types").Requireable<boolean>;
27
27
  defaultOpen: import("prop-types").Requireable<boolean>;
28
28
  onOpenChange: import("prop-types").Requireable<(...args: any[]) => any>;
@@ -111,7 +111,7 @@ class Toast extends BaseComponent {
111
111
  const btnTheme = 'borderless';
112
112
  const btnSize = 'small';
113
113
  return /*#__PURE__*/React.createElement("div", {
114
- role: "alert",
114
+ role: 'alert',
115
115
  "aria-label": "".concat(type ? type : 'default', " type"),
116
116
  className: toastCls,
117
117
  style: style,
@@ -121,16 +121,13 @@ class Toast extends BaseComponent {
121
121
  className: "".concat(prefixCls, "-content")
122
122
  }, this.renderIcon(), /*#__PURE__*/React.createElement("span", {
123
123
  className: "".concat(prefixCls, "-content-text"),
124
- style: textStyle,
125
- "x-semi-prop": "content"
124
+ style: textStyle
126
125
  }, content), showClose && /*#__PURE__*/React.createElement("div", {
127
126
  className: "".concat(prefixCls, "-close-button")
128
127
  }, /*#__PURE__*/React.createElement(Button, {
129
128
  onClick: e => this.close(e),
130
129
  type: "tertiary",
131
- icon: /*#__PURE__*/React.createElement(IconClose, {
132
- "x-semi-prop": "icon"
133
- }),
130
+ icon: /*#__PURE__*/React.createElement(IconClose, null),
134
131
  theme: btnTheme,
135
132
  size: btnSize
136
133
  }))));
@@ -237,8 +237,7 @@ class Transfer extends BaseComponent {
237
237
  className: leftItemCls,
238
238
  checked: checked,
239
239
  role: "listitem",
240
- onChange: () => this.onSelectOrRemove(item),
241
- "x-semi-children-alias": "dataSource[".concat(index, "].label")
240
+ onChange: () => this.onSelectOrRemove(item)
242
241
  }, item.label);
243
242
  }
244
243
 
@@ -373,8 +373,7 @@ export default class TreeNode extends PureComponent {
373
373
  return /*#__PURE__*/React.createElement("ul", {
374
374
  className: wrapperCls
375
375
  }, /*#__PURE__*/React.createElement("li", {
376
- className: _concatInstanceProperty(_context2 = "".concat(prefixcls, "-label ")).call(_context2, prefixcls, "-label-empty"),
377
- "x-semi-prop": "emptyContent"
376
+ className: _concatInstanceProperty(_context2 = "".concat(prefixcls, "-label ")).call(_context2, prefixcls, "-label-empty")
378
377
  }, emptyContent));
379
378
  } // eslint-disable-next-line max-lines-per-function
380
379
 
@@ -59,8 +59,7 @@ class TreeSelect extends BaseComponent {
59
59
  ["".concat(prefixcls, "-suffix-icon")]: isSemiIcon(suffix)
60
60
  });
61
61
  return /*#__PURE__*/React.createElement("div", {
62
- className: suffixWrapperCls,
63
- "x-semi-prop": "suffix"
62
+ className: suffixWrapperCls
64
63
  }, suffix);
65
64
  };
66
65
 
@@ -80,8 +79,7 @@ class TreeSelect extends BaseComponent {
80
79
  });
81
80
  return /*#__PURE__*/React.createElement("div", {
82
81
  className: prefixWrapperCls,
83
- id: insetLabelId,
84
- "x-semi-prop": "prefix,insetLabel"
82
+ id: insetLabelId
85
83
  }, labelNode);
86
84
  };
87
85
 
@@ -338,8 +336,7 @@ class TreeSelect extends BaseComponent {
338
336
  }
339
337
 
340
338
  return arrowIcon ? /*#__PURE__*/React.createElement("div", {
341
- className: cls("".concat(prefixcls, "-arrow")),
342
- "x-semi-prop": "arrowIcon"
339
+ className: cls("".concat(prefixcls, "-arrow"))
343
340
  }, arrowIcon) : null;
344
341
  };
345
342
 
@@ -536,8 +536,7 @@ export default class Base extends Component {
536
536
 
537
537
  const iconSize = size === 'small' ? 'small' : 'default';
538
538
  return /*#__PURE__*/React.createElement("span", {
539
- className: "".concat(prefixCls, "-icon"),
540
- "x-semi-prop": "icon"
539
+ className: "".concat(prefixCls, "-icon")
541
540
  }, isSemiIcon(icon) ? /*#__PURE__*/React.cloneElement(icon, {
542
541
  size: iconSize
543
542
  }) : icon);
@@ -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 | 6 | 5>;
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>;
@@ -6,7 +6,7 @@ import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
6
6
  import { FileItem, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError } from './interface';
7
7
  import { Locale } from '../locale/interface';
8
8
  import '@douyinfe/semi-foundation/lib/es/upload/upload.css';
9
- export { FileItem, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError, BeforeUploadObjectResult, AfterUploadResult, };
9
+ export { FileItem, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError, BeforeUploadObjectResult, AfterUploadResult };
10
10
  export interface UploadProps {
11
11
  accept?: string;
12
12
  action: string;
@@ -140,7 +140,7 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
140
140
  style: PropTypes.Requireable<object>;
141
141
  timeout: PropTypes.Requireable<number>;
142
142
  transformFile: PropTypes.Requireable<(...args: any[]) => any>;
143
- uploadTrigger: PropTypes.Requireable<"custom" | "auto">;
143
+ uploadTrigger: PropTypes.Requireable<"auto" | "custom">;
144
144
  validateMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
145
145
  validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
146
146
  withCredentials: PropTypes.Requireable<boolean>;