@douyinfe/semi-ui 2.36.0 → 2.37.0-beta.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 (175) hide show
  1. package/dist/css/semi.css +39 -1
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +831 -501
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/_base/baseComponent.d.ts +1 -0
  8. package/lib/cjs/_base/baseComponent.js +4 -0
  9. package/lib/cjs/anchor/index.js +2 -2
  10. package/lib/cjs/autoComplete/index.js +2 -2
  11. package/lib/cjs/banner/index.js +2 -2
  12. package/lib/cjs/breadcrumb/index.js +2 -2
  13. package/lib/cjs/breadcrumb/item.js +1 -1
  14. package/lib/cjs/calendar/dayCalendar.js +2 -2
  15. package/lib/cjs/calendar/monthCalendar.js +2 -2
  16. package/lib/cjs/calendar/rangeCalendar.js +2 -2
  17. package/lib/cjs/calendar/weekCalendar.d.ts +1 -1
  18. package/lib/cjs/calendar/weekCalendar.js +2 -2
  19. package/lib/cjs/carousel/index.js +2 -2
  20. package/lib/cjs/cascader/index.js +1 -1
  21. package/lib/cjs/checkbox/checkbox.js +2 -2
  22. package/lib/cjs/checkbox/checkboxGroup.js +2 -2
  23. package/lib/cjs/collapse/index.js +2 -2
  24. package/lib/cjs/collapsible/index.js +2 -2
  25. package/lib/cjs/datePicker/dateInput.d.ts +1 -0
  26. package/lib/cjs/datePicker/dateInput.js +10 -6
  27. package/lib/cjs/datePicker/datePicker.js +23 -11
  28. package/lib/cjs/datePicker/quickControl.d.ts +2 -0
  29. package/lib/cjs/datePicker/quickControl.js +5 -3
  30. package/lib/cjs/descriptions/index.js +22 -11
  31. package/lib/cjs/descriptions/item.js +22 -11
  32. package/lib/cjs/empty/index.js +23 -13
  33. package/lib/cjs/input/index.d.ts +2 -1
  34. package/lib/cjs/input/index.js +4 -15
  35. package/lib/cjs/list/index.js +30 -20
  36. package/lib/cjs/list/item.js +18 -15
  37. package/lib/cjs/locale/interface.d.ts +1 -0
  38. package/lib/cjs/locale/source/ar.js +1 -0
  39. package/lib/cjs/locale/source/de.js +1 -0
  40. package/lib/cjs/locale/source/en_GB.js +1 -0
  41. package/lib/cjs/locale/source/en_US.js +1 -0
  42. package/lib/cjs/locale/source/es.js +1 -0
  43. package/lib/cjs/locale/source/fr.js +1 -0
  44. package/lib/cjs/locale/source/id_ID.js +1 -0
  45. package/lib/cjs/locale/source/it.js +1 -0
  46. package/lib/cjs/locale/source/ja_JP.js +1 -0
  47. package/lib/cjs/locale/source/ko_KR.js +1 -0
  48. package/lib/cjs/locale/source/ms_MY.js +1 -0
  49. package/lib/cjs/locale/source/nl_NL.js +1 -0
  50. package/lib/cjs/locale/source/pl_PL.js +1 -0
  51. package/lib/cjs/locale/source/pt_BR.js +1 -0
  52. package/lib/cjs/locale/source/ro.d.ts +1 -0
  53. package/lib/cjs/locale/source/ro.js +1 -0
  54. package/lib/cjs/locale/source/ru_RU.js +1 -0
  55. package/lib/cjs/locale/source/sv_SE.js +1 -0
  56. package/lib/cjs/locale/source/th_TH.js +1 -0
  57. package/lib/cjs/locale/source/tr_TR.js +1 -0
  58. package/lib/cjs/locale/source/vi_VN.js +1 -0
  59. package/lib/cjs/locale/source/zh_CN.js +1 -0
  60. package/lib/cjs/locale/source/zh_TW.js +1 -0
  61. package/lib/cjs/modal/ModalContent.js +12 -9
  62. package/lib/cjs/navigation/index.js +34 -24
  63. package/lib/cjs/pagination/index.d.ts +3 -0
  64. package/lib/cjs/pagination/index.js +73 -39
  65. package/lib/cjs/progress/index.js +44 -31
  66. package/lib/cjs/radio/radio.js +27 -17
  67. package/lib/cjs/radio/radioGroup.js +24 -14
  68. package/lib/cjs/rating/index.js +21 -11
  69. package/lib/cjs/scrollList/index.js +21 -11
  70. package/lib/cjs/select/index.js +30 -21
  71. package/lib/cjs/sideSheet/SideSheetContent.js +27 -7
  72. package/lib/cjs/slider/index.js +20 -11
  73. package/lib/cjs/spin/index.js +19 -9
  74. package/lib/cjs/steps/basicSteps.js +24 -14
  75. package/lib/cjs/steps/fillSteps.js +22 -12
  76. package/lib/cjs/steps/navSteps.js +21 -11
  77. package/lib/cjs/switch/index.js +23 -13
  78. package/lib/cjs/table/Table.d.ts +1 -0
  79. package/lib/cjs/table/Table.js +3 -2
  80. package/lib/cjs/tabs/index.js +1 -2
  81. package/lib/cjs/tagInput/index.js +20 -10
  82. package/lib/cjs/timeline/index.js +20 -9
  83. package/lib/cjs/timeline/item.js +24 -13
  84. package/lib/cjs/toast/index.d.ts +4 -0
  85. package/lib/cjs/tooltip/index.js +3 -1
  86. package/lib/cjs/transfer/index.js +19 -9
  87. package/lib/cjs/tree/index.js +32 -22
  88. package/lib/cjs/treeSelect/index.js +29 -19
  89. package/lib/cjs/typography/title.d.ts +1 -1
  90. package/lib/cjs/upload/index.js +28 -18
  91. package/lib/es/_base/baseComponent.d.ts +1 -0
  92. package/lib/es/_base/baseComponent.js +4 -0
  93. package/lib/es/anchor/index.js +2 -2
  94. package/lib/es/autoComplete/index.js +2 -2
  95. package/lib/es/banner/index.js +2 -2
  96. package/lib/es/breadcrumb/index.js +2 -2
  97. package/lib/es/breadcrumb/item.js +1 -1
  98. package/lib/es/calendar/dayCalendar.js +2 -2
  99. package/lib/es/calendar/monthCalendar.js +2 -2
  100. package/lib/es/calendar/rangeCalendar.js +2 -2
  101. package/lib/es/calendar/weekCalendar.d.ts +1 -1
  102. package/lib/es/calendar/weekCalendar.js +2 -2
  103. package/lib/es/carousel/index.js +2 -2
  104. package/lib/es/cascader/index.js +1 -1
  105. package/lib/es/checkbox/checkbox.js +2 -2
  106. package/lib/es/checkbox/checkboxGroup.js +2 -2
  107. package/lib/es/collapse/index.js +2 -2
  108. package/lib/es/collapsible/index.js +2 -2
  109. package/lib/es/datePicker/dateInput.d.ts +1 -0
  110. package/lib/es/datePicker/dateInput.js +10 -6
  111. package/lib/es/datePicker/datePicker.js +23 -10
  112. package/lib/es/datePicker/quickControl.d.ts +2 -0
  113. package/lib/es/datePicker/quickControl.js +5 -3
  114. package/lib/es/descriptions/index.js +22 -11
  115. package/lib/es/descriptions/item.js +22 -11
  116. package/lib/es/empty/index.js +23 -13
  117. package/lib/es/input/index.d.ts +2 -1
  118. package/lib/es/input/index.js +4 -15
  119. package/lib/es/list/index.js +30 -20
  120. package/lib/es/list/item.js +18 -15
  121. package/lib/es/locale/interface.d.ts +1 -0
  122. package/lib/es/locale/source/ar.js +1 -0
  123. package/lib/es/locale/source/de.js +1 -0
  124. package/lib/es/locale/source/en_GB.js +1 -0
  125. package/lib/es/locale/source/en_US.js +1 -0
  126. package/lib/es/locale/source/es.js +1 -0
  127. package/lib/es/locale/source/fr.js +1 -0
  128. package/lib/es/locale/source/id_ID.js +1 -0
  129. package/lib/es/locale/source/it.js +1 -0
  130. package/lib/es/locale/source/ja_JP.js +1 -0
  131. package/lib/es/locale/source/ko_KR.js +1 -0
  132. package/lib/es/locale/source/ms_MY.js +1 -0
  133. package/lib/es/locale/source/nl_NL.js +1 -0
  134. package/lib/es/locale/source/pl_PL.js +1 -0
  135. package/lib/es/locale/source/pt_BR.js +1 -0
  136. package/lib/es/locale/source/ro.d.ts +1 -0
  137. package/lib/es/locale/source/ro.js +1 -0
  138. package/lib/es/locale/source/ru_RU.js +1 -0
  139. package/lib/es/locale/source/sv_SE.js +1 -0
  140. package/lib/es/locale/source/th_TH.js +1 -0
  141. package/lib/es/locale/source/tr_TR.js +1 -0
  142. package/lib/es/locale/source/vi_VN.js +1 -0
  143. package/lib/es/locale/source/zh_CN.js +1 -0
  144. package/lib/es/locale/source/zh_TW.js +1 -0
  145. package/lib/es/modal/ModalContent.js +12 -9
  146. package/lib/es/navigation/index.js +34 -24
  147. package/lib/es/pagination/index.d.ts +3 -0
  148. package/lib/es/pagination/index.js +73 -38
  149. package/lib/es/progress/index.js +44 -31
  150. package/lib/es/radio/radio.js +27 -17
  151. package/lib/es/radio/radioGroup.js +24 -14
  152. package/lib/es/rating/index.js +21 -11
  153. package/lib/es/scrollList/index.js +21 -11
  154. package/lib/es/select/index.js +30 -20
  155. package/lib/es/sideSheet/SideSheetContent.js +27 -7
  156. package/lib/es/slider/index.js +20 -10
  157. package/lib/es/spin/index.js +19 -9
  158. package/lib/es/steps/basicSteps.js +24 -14
  159. package/lib/es/steps/fillSteps.js +22 -12
  160. package/lib/es/steps/navSteps.js +21 -11
  161. package/lib/es/switch/index.js +23 -13
  162. package/lib/es/table/Table.d.ts +1 -0
  163. package/lib/es/table/Table.js +3 -2
  164. package/lib/es/tabs/index.js +1 -2
  165. package/lib/es/tagInput/index.js +20 -10
  166. package/lib/es/timeline/index.js +20 -9
  167. package/lib/es/timeline/item.js +24 -13
  168. package/lib/es/toast/index.d.ts +4 -0
  169. package/lib/es/tooltip/index.js +3 -1
  170. package/lib/es/transfer/index.js +19 -9
  171. package/lib/es/tree/index.js +32 -22
  172. package/lib/es/treeSelect/index.js +29 -19
  173. package/lib/es/typography/title.d.ts +1 -1
  174. package/lib/es/upload/index.js +28 -18
  175. package/package.json +8 -8
@@ -1,6 +1,14 @@
1
1
  import _isBoolean from "lodash/isBoolean";
2
2
  import _isUndefined from "lodash/isUndefined";
3
3
  import _noop from "lodash/noop";
4
+ var __rest = this && this.__rest || function (s, e) {
5
+ var t = {};
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
7
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
4
12
  /* eslint-disable prefer-destructuring */
5
13
  import React from 'react';
6
14
  import PropTypes from 'prop-types';
@@ -104,21 +112,23 @@ class Radio extends BaseComponent {
104
112
  this.radioEntity.blur();
105
113
  }
106
114
  render() {
107
- const {
108
- addonClassName,
109
- addonStyle,
110
- disabled,
111
- style,
112
- className,
113
- prefixCls,
114
- displayMode,
115
- children,
116
- extra,
117
- mode,
118
- type,
119
- value: propValue,
120
- name
121
- } = this.props;
115
+ const _a = this.props,
116
+ {
117
+ addonClassName,
118
+ addonStyle,
119
+ disabled,
120
+ style,
121
+ className,
122
+ prefixCls,
123
+ displayMode,
124
+ children,
125
+ extra,
126
+ mode,
127
+ type,
128
+ value: propValue,
129
+ name
130
+ } = _a,
131
+ rest = __rest(_a, ["addonClassName", "addonStyle", "disabled", "style", "className", "prefixCls", "displayMode", "children", "extra", "mode", "type", "value", "name"]);
122
132
  let realChecked, isDisabled, realMode, isButtonRadioGroup, isCardRadioGroup, isPureCardRadioGroup, isButtonRadioComponent, buttonSize, realPrefixCls;
123
133
  const {
124
134
  hover: isHover,
@@ -199,12 +209,12 @@ class Radio extends BaseComponent {
199
209
  "x-semi-prop": "extra"
200
210
  }, extra) : null);
201
211
  };
202
- return /*#__PURE__*/React.createElement("label", {
212
+ return /*#__PURE__*/React.createElement("label", Object.assign({
203
213
  style: style,
204
214
  className: wrapper,
205
215
  onMouseEnter: this.handleMouseEnter,
206
216
  onMouseLeave: this.handleMouseLeave
207
- }, /*#__PURE__*/React.createElement(RadioInner, Object.assign({}, this.props, props, {
217
+ }, this.getDataAttr(rest)), /*#__PURE__*/React.createElement(RadioInner, Object.assign({}, this.props, props, {
208
218
  mode: realMode,
209
219
  name: name !== null && name !== void 0 ? name : groupName,
210
220
  isButtonRadio: isButtonRadio,
@@ -1,4 +1,12 @@
1
1
  import _noop from "lodash/noop";
2
+ var __rest = this && this.__rest || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
6
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
7
+ }
8
+ return t;
9
+ };
2
10
  import React from 'react';
3
11
  import PropTypes from 'prop-types';
4
12
  import classnames from 'classnames';
@@ -50,18 +58,20 @@ class RadioGroup extends BaseComponent {
50
58
  });
51
59
  }
52
60
  render() {
53
- const {
54
- children,
55
- options,
56
- mode,
57
- prefixCls,
58
- className,
59
- style,
60
- direction,
61
- type,
62
- buttonSize,
63
- id
64
- } = this.props;
61
+ const _a = this.props,
62
+ {
63
+ children,
64
+ options,
65
+ mode,
66
+ prefixCls,
67
+ className,
68
+ style,
69
+ direction,
70
+ type,
71
+ buttonSize,
72
+ id
73
+ } = _a,
74
+ rest = __rest(_a, ["children", "options", "mode", "prefixCls", "className", "style", "direction", "type", "buttonSize", "id"]);
65
75
  const isButtonRadio = type === strings.TYPE_BUTTON;
66
76
  const isPureCardRadio = type === strings.TYPE_PURECARD;
67
77
  const isCardRadio = type === strings.TYPE_CARD || isPureCardRadio;
@@ -101,7 +111,7 @@ class RadioGroup extends BaseComponent {
101
111
  key: index
102
112
  }) : null);
103
113
  }
104
- return /*#__PURE__*/React.createElement("div", {
114
+ return /*#__PURE__*/React.createElement("div", Object.assign({
105
115
  className: prefixClsDisplay,
106
116
  style: style,
107
117
  id: id,
@@ -111,7 +121,7 @@ class RadioGroup extends BaseComponent {
111
121
  "aria-labelledby": this.props['aria-labelledby'],
112
122
  "aria-describedby": this.props['aria-describedby'],
113
123
  "aria-required": this.props['aria-required']
114
- }, /*#__PURE__*/React.createElement(Context.Provider, {
124
+ }, this.getDataAttr(rest)), /*#__PURE__*/React.createElement(Context.Provider, {
115
125
  value: {
116
126
  radioGroup: {
117
127
  onChange: this.onChange,
@@ -1,3 +1,11 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
1
9
  import React from 'react';
2
10
  import ReactDOM from 'react-dom';
3
11
  import BaseComponent from '../_base/baseComponent';
@@ -234,15 +242,17 @@ export default class Rating extends BaseComponent {
234
242
  this.foundation.destroy();
235
243
  }
236
244
  render() {
237
- const {
238
- style,
239
- prefixCls,
240
- disabled,
241
- className,
242
- id,
243
- count,
244
- tabIndex
245
- } = this.props;
245
+ const _a = this.props,
246
+ {
247
+ style,
248
+ prefixCls,
249
+ disabled,
250
+ className,
251
+ id,
252
+ count,
253
+ tabIndex
254
+ } = _a,
255
+ rest = __rest(_a, ["style", "prefixCls", "disabled", "className", "id", "count", "tabIndex"]);
246
256
  const {
247
257
  value,
248
258
  emptyStarFocusVisible
@@ -257,7 +267,7 @@ export default class Rating extends BaseComponent {
257
267
  return (
258
268
  /*#__PURE__*/
259
269
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
260
- React.createElement("ul", {
270
+ React.createElement("ul", Object.assign({
261
271
  "aria-label": ariaLabel,
262
272
  "aria-labelledby": this.props['aria-labelledby'],
263
273
  "aria-describedby": this.props['aria-describedby'],
@@ -270,7 +280,7 @@ export default class Rating extends BaseComponent {
270
280
  onKeyDown: disabled ? noop : this.onKeyDown,
271
281
  ref: this.saveRate,
272
282
  id: id
273
- }, itemList)
283
+ }, this.getDataAttr(rest)), itemList)
274
284
  );
275
285
  }
276
286
  }
@@ -1,3 +1,11 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
1
9
  import React from 'react';
2
10
  import BaseComponent from '../_base/baseComponent';
3
11
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/scrollList/constants';
@@ -13,25 +21,27 @@ class ScrollList extends BaseComponent {
13
21
  this.foundation = new Foundation(this.adapter);
14
22
  }
15
23
  render() {
16
- const {
17
- children,
18
- header,
19
- footer,
20
- prefixCls,
21
- bodyHeight,
22
- className,
23
- style
24
- } = this.props;
24
+ const _a = this.props,
25
+ {
26
+ children,
27
+ header,
28
+ footer,
29
+ prefixCls,
30
+ bodyHeight,
31
+ className,
32
+ style
33
+ } = _a,
34
+ rest = __rest(_a, ["children", "header", "footer", "prefixCls", "bodyHeight", "className", "style"]);
25
35
  const clsWrapper = classnames(className, {
26
36
  [prefixCls || cssClasses.PREFIX]: true
27
37
  });
28
38
  const clsHeader = classnames({
29
39
  [`${prefixCls || cssClasses.PREFIX}-header`]: true
30
40
  });
31
- return /*#__PURE__*/React.createElement("div", {
41
+ return /*#__PURE__*/React.createElement("div", Object.assign({
32
42
  className: clsWrapper,
33
43
  style: style
34
- }, header ? /*#__PURE__*/React.createElement("div", {
44
+ }, this.getDataAttr(rest)), header ? /*#__PURE__*/React.createElement("div", {
35
45
  className: clsHeader
36
46
  }, /*#__PURE__*/React.createElement("div", {
37
47
  className: `${clsHeader}-title`,
@@ -4,6 +4,14 @@ import _get from "lodash/get";
4
4
  import _noop from "lodash/noop";
5
5
  import _isString from "lodash/isString";
6
6
  import _isEqual from "lodash/isEqual";
7
+ var __rest = this && this.__rest || function (s, e) {
8
+ var t = {};
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
10
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
11
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
12
+ }
13
+ return t;
14
+ };
7
15
  /* eslint-disable max-len */
8
16
  /* eslint-disable max-lines-per-function */
9
17
  import React, { Fragment } from 'react';
@@ -1021,25 +1029,27 @@ class Select extends BaseComponent {
1021
1029
  }, labelNode);
1022
1030
  }
1023
1031
  renderSelection() {
1024
- const {
1025
- disabled,
1026
- multiple,
1027
- filter,
1028
- style,
1029
- id,
1030
- size,
1031
- className,
1032
- validateStatus,
1033
- showArrow,
1034
- suffix,
1035
- prefix,
1036
- insetLabel,
1037
- placeholder,
1038
- triggerRender,
1039
- arrowIcon,
1040
- clearIcon,
1041
- borderless
1042
- } = this.props;
1032
+ const _a = this.props,
1033
+ {
1034
+ disabled,
1035
+ multiple,
1036
+ filter,
1037
+ style,
1038
+ id,
1039
+ size,
1040
+ className,
1041
+ validateStatus,
1042
+ showArrow,
1043
+ suffix,
1044
+ prefix,
1045
+ insetLabel,
1046
+ placeholder,
1047
+ triggerRender,
1048
+ arrowIcon,
1049
+ clearIcon,
1050
+ borderless
1051
+ } = _a,
1052
+ rest = __rest(_a, ["disabled", "multiple", "filter", "style", "id", "size", "className", "validateStatus", "showArrow", "suffix", "prefix", "insetLabel", "placeholder", "triggerRender", "arrowIcon", "clearIcon", "borderless"]);
1043
1053
  const {
1044
1054
  selections,
1045
1055
  isOpen,
@@ -1139,7 +1149,7 @@ class Select extends BaseComponent {
1139
1149
  onFocus: e => this.foundation.handleTriggerFocus(e),
1140
1150
  onBlur: e => this.foundation.handleTriggerBlur(e),
1141
1151
  onKeyPress: this.onKeyPress
1142
- }, keyboardEventSet), inner)
1152
+ }, keyboardEventSet, this.getDataAttr(rest)), inner)
1143
1153
  );
1144
1154
  }
1145
1155
  render() {
@@ -13,6 +13,7 @@ import cls from 'classnames';
13
13
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/sideSheet/constants';
14
14
  import Button from '../iconButton';
15
15
  import { IconClose } from '@douyinfe/semi-icons';
16
+ import getDataAttr from '@douyinfe/semi-foundation/lib/es/utils/getDataAttr';
16
17
  let uuid = 0;
17
18
  const prefixCls = cssClasses.PREFIX;
18
19
  export default class SideSheetContent extends React.PureComponent {
@@ -120,11 +121,29 @@ export default class SideSheetContent extends React.PureComponent {
120
121
  return dialogElement;
121
122
  }
122
123
  render() {
123
- const {
124
- mask,
125
- className,
126
- width
127
- } = this.props;
124
+ const _a = this.props,
125
+ {
126
+ mask,
127
+ className,
128
+ width,
129
+ onClose,
130
+ maskStyle,
131
+ maskClosable,
132
+ maskClassName,
133
+ title,
134
+ closable,
135
+ headerStyle,
136
+ height,
137
+ style,
138
+ size,
139
+ bodyStyle,
140
+ dialogClassName,
141
+ children,
142
+ footer,
143
+ maskExtraProps,
144
+ wrapperExtraProps
145
+ } = _a,
146
+ rest = __rest(_a, ["mask", "className", "width", "onClose", "maskStyle", "maskClosable", "maskClassName", "title", "closable", "headerStyle", "height", "style", "size", "bodyStyle", "dialogClassName", "children", "footer", "maskExtraProps", "wrapperExtraProps"]);
128
147
  const wrapperCls = cls(className, {
129
148
  [`${prefixCls}-fixed`]: !mask,
130
149
  [`${prefixCls}-size-${this.props.size}`]: !mask
@@ -133,10 +152,11 @@ export default class SideSheetContent extends React.PureComponent {
133
152
  if (!mask && width) {
134
153
  wrapperStyle.width = width;
135
154
  }
136
- return /*#__PURE__*/React.createElement("div", {
155
+ const dataAttr = getDataAttr(rest);
156
+ return /*#__PURE__*/React.createElement("div", Object.assign({
137
157
  className: wrapperCls,
138
158
  style: wrapperStyle
139
- }, this.getMaskElement(), this.getDialogElement());
159
+ }, dataAttr), this.getMaskElement(), this.getDialogElement());
140
160
  }
141
161
  }
142
162
  SideSheetContent.propTypes = {
@@ -1,5 +1,13 @@
1
1
  import _noop from "lodash/noop";
2
2
  import _isEqual from "lodash/isEqual";
3
+ var __rest = this && this.__rest || function (s, e) {
4
+ var t = {};
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
+ }
9
+ return t;
10
+ };
3
11
  /* eslint-disable max-lines-per-function */
4
12
  /* eslint-disable react/no-find-dom-node */
5
13
  import React from 'react';
@@ -538,14 +546,16 @@ export default class Slider extends BaseComponent {
538
546
  min,
539
547
  max
540
548
  } = this.state;
541
- const {
542
- vertical,
543
- verticalReverse,
544
- style,
545
- railStyle,
546
- range,
547
- className
548
- } = this.props;
549
+ const _a = this.props,
550
+ {
551
+ vertical,
552
+ verticalReverse,
553
+ style,
554
+ railStyle,
555
+ range,
556
+ className
557
+ } = _a,
558
+ rest = __rest(_a, ["vertical", "verticalReverse", "style", "railStyle", "range", "className"]);
549
559
  const wrapperClass = cls(`${prefixCls}-wrapper`, {
550
560
  [`${prefixCls}-disabled`]: disabled,
551
561
  [`${cssClasses.VERTICAL}-wrapper`]: vertical,
@@ -559,14 +569,14 @@ export default class Slider extends BaseComponent {
559
569
  [cssClasses.VERTICAL]: vertical
560
570
  });
561
571
  const ariaLabel = range ? `Range: ${this._getAriaValueText(currentValue[0], 0)} to ${this._getAriaValueText(currentValue[1], 1)}` : undefined;
562
- const slider = /*#__PURE__*/React.createElement("div", {
572
+ const slider = /*#__PURE__*/React.createElement("div", Object.assign({
563
573
  className: wrapperClass,
564
574
  style: style,
565
575
  ref: this.sliderEl,
566
576
  "aria-label": ariaLabel,
567
577
  onMouseEnter: () => this.foundation.handleWrapperEnter(),
568
578
  onMouseLeave: () => this.foundation.handleWrapperLeave()
569
- }, /*#__PURE__*/React.createElement("div", {
579
+ }, this.getDataAttr(rest)), /*#__PURE__*/React.createElement("div", {
570
580
  className: `${prefixCls}-rail`,
571
581
  onClick: this.foundation.handleWrapClick,
572
582
  style: railStyle
@@ -1,3 +1,11 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
1
9
  import React from 'react';
2
10
  import PropTypes from 'prop-types';
3
11
  import cls from 'classnames';
@@ -63,13 +71,15 @@ class Spin extends BaseComponent {
63
71
  }
64
72
  render() {
65
73
  this.foundation.updateLoadingIfNeedDelay();
66
- const {
67
- children,
68
- style,
69
- wrapperClassName,
70
- childStyle,
71
- size
72
- } = this.props;
74
+ const _a = this.props,
75
+ {
76
+ children,
77
+ style,
78
+ wrapperClassName,
79
+ childStyle,
80
+ size
81
+ } = _a,
82
+ rest = __rest(_a, ["children", "style", "wrapperClassName", "childStyle", "size"]);
73
83
  const {
74
84
  loading
75
85
  } = this.state;
@@ -78,10 +88,10 @@ class Spin extends BaseComponent {
78
88
  [`${prefixCls}-block`]: children,
79
89
  [`${prefixCls}-hidden`]: !loading
80
90
  });
81
- return /*#__PURE__*/React.createElement("div", {
91
+ return /*#__PURE__*/React.createElement("div", Object.assign({
82
92
  className: spinCls,
83
93
  style: style
84
- }, this.renderSpin(), /*#__PURE__*/React.createElement("div", {
94
+ }, this.getDataAttr(rest)), this.renderSpin(), /*#__PURE__*/React.createElement("div", {
85
95
  className: `${prefixCls}-children`,
86
96
  style: childStyle,
87
97
  "x-semi-prop": "children"
@@ -1,21 +1,31 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
1
9
  import React, { cloneElement, Children, useMemo, isValidElement } from 'react';
2
10
  import PropTypes from 'prop-types';
3
11
  import cls from 'classnames';
4
12
  import { stepsClasses as css } from '@douyinfe/semi-foundation/lib/es/steps/constants';
13
+ import getDataAttr from '@douyinfe/semi-foundation/lib/es/utils/getDataAttr';
5
14
  const Steps = props => {
6
15
  const {
7
- size,
8
- current,
9
- status,
10
- children,
11
- prefixCls,
12
- initial,
13
- direction,
14
- className,
15
- style,
16
- hasLine,
17
- onChange
18
- } = props;
16
+ size,
17
+ current,
18
+ status,
19
+ children,
20
+ prefixCls,
21
+ initial,
22
+ direction,
23
+ className,
24
+ style,
25
+ hasLine,
26
+ onChange
27
+ } = props,
28
+ rest = __rest(props, ["size", "current", "status", "children", "prefixCls", "initial", "direction", "className", "style", "hasLine", "onChange"]);
19
29
  const inner = useMemo(() => {
20
30
  const filteredChildren = Children.toArray(children).filter(c => /*#__PURE__*/isValidElement(c));
21
31
  const content = Children.map(filteredChildren, (child, index) => {
@@ -56,11 +66,11 @@ const Steps = props => {
56
66
  [`${prefixCls}-${size}`]: size !== 'default',
57
67
  [`${prefixCls}-hasline`]: hasLine
58
68
  });
59
- return /*#__PURE__*/React.createElement("div", {
69
+ return /*#__PURE__*/React.createElement("div", Object.assign({
60
70
  "aria-label": props["aria-label"],
61
71
  className: wrapperCls,
62
72
  style: style
63
- }, inner);
73
+ }, getDataAttr(rest)), inner);
64
74
  };
65
75
  Steps.propTypes = {
66
76
  prefixCls: PropTypes.string,
@@ -1,20 +1,30 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
1
9
  import React, { cloneElement, Children, useMemo, isValidElement } from 'react';
2
10
  import PropTypes from 'prop-types';
3
11
  import cls from 'classnames';
4
12
  import { stepsClasses as css } from '@douyinfe/semi-foundation/lib/es/steps/constants';
13
+ import getDataAttr from '@douyinfe/semi-foundation/lib/es/utils/getDataAttr';
5
14
  import { Row, Col } from '../grid';
6
15
  const Steps = props => {
7
16
  const {
8
- current,
9
- status,
10
- children,
11
- prefixCls,
12
- initial,
13
- direction,
14
- className,
15
- style,
16
- onChange
17
- } = props;
17
+ current,
18
+ status,
19
+ children,
20
+ prefixCls,
21
+ initial,
22
+ direction,
23
+ className,
24
+ style,
25
+ onChange
26
+ } = props,
27
+ rest = __rest(props, ["current", "status", "children", "prefixCls", "initial", "direction", "className", "style", "onChange"]);
18
28
  const inner = useMemo(() => {
19
29
  const filteredChildren = Children.toArray(children).filter(c => /*#__PURE__*/isValidElement(c));
20
30
  const colStyle = direction === 'vertical' ? null : {
@@ -56,11 +66,11 @@ const Steps = props => {
56
66
  [prefixCls]: true,
57
67
  [`${prefixCls}-${direction}`]: true
58
68
  });
59
- return /*#__PURE__*/React.createElement("div", {
69
+ return /*#__PURE__*/React.createElement("div", Object.assign({
60
70
  className: wrapperCls,
61
71
  style: style,
62
72
  "aria-label": props["aria-label"]
63
- }, /*#__PURE__*/React.createElement(Row, {
73
+ }, getDataAttr(rest)), /*#__PURE__*/React.createElement(Row, {
64
74
  type: "flex",
65
75
  justify: "start"
66
76
  }, inner));
@@ -1,18 +1,28 @@
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
8
+ };
1
9
  import React, { cloneElement, Children, useMemo, isValidElement } from 'react';
2
10
  import PropTypes from 'prop-types';
11
+ import getDataAttr from '@douyinfe/semi-foundation/lib/es/utils/getDataAttr';
3
12
  import cls from 'classnames';
4
13
  import { stepsClasses as css } from '@douyinfe/semi-foundation/lib/es/steps/constants';
5
14
  const Steps = props => {
6
15
  const {
7
- size,
8
- current,
9
- initial,
10
- children,
11
- prefixCls,
12
- className,
13
- style,
14
- onChange
15
- } = props;
16
+ size,
17
+ current,
18
+ initial,
19
+ children,
20
+ prefixCls,
21
+ className,
22
+ style,
23
+ onChange
24
+ } = props,
25
+ rest = __rest(props, ["size", "current", "initial", "children", "prefixCls", "className", "style", "onChange"]);
16
26
  const inner = useMemo(() => {
17
27
  const filteredChildren = Children.toArray(children).filter(c => /*#__PURE__*/isValidElement(c));
18
28
  const total = filteredChildren.length;
@@ -38,11 +48,11 @@ const Steps = props => {
38
48
  [`${prefixCls}-nav`]: true,
39
49
  [`${prefixCls}-${size}`]: size !== 'default'
40
50
  });
41
- return /*#__PURE__*/React.createElement("div", {
51
+ return /*#__PURE__*/React.createElement("div", Object.assign({
42
52
  "aria-label": props["aria-label"],
43
53
  className: wrapperCls,
44
54
  style: style
45
- }, inner);
55
+ }, getDataAttr(rest)), inner);
46
56
  };
47
57
  Steps.propTypes = {
48
58
  prefixCls: PropTypes.string,