@douyinfe/semi-ui 2.40.0-alpha.0 → 2.40.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 (243) hide show
  1. package/dist/css/semi.css +6 -40
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +280 -537
  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/_portal/index.d.ts +3 -2
  8. package/lib/cjs/_portal/index.js +33 -26
  9. package/lib/cjs/_utils/index.js +0 -3
  10. package/lib/cjs/autoComplete/index.js +0 -2
  11. package/lib/cjs/autoComplete/option.js +0 -2
  12. package/lib/cjs/avatar/avatarGroup.js +0 -1
  13. package/lib/cjs/avatar/index.js +0 -1
  14. package/lib/cjs/backtop/index.js +0 -1
  15. package/lib/cjs/badge/index.js +0 -1
  16. package/lib/cjs/banner/index.js +0 -3
  17. package/lib/cjs/breadcrumb/index.js +0 -3
  18. package/lib/cjs/button/Button.js +8 -14
  19. package/lib/cjs/calendar/dayCalendar.js +4 -9
  20. package/lib/cjs/calendar/dayCol.js +1 -1
  21. package/lib/cjs/calendar/monthCalendar.js +5 -12
  22. package/lib/cjs/calendar/rangeCalendar.js +0 -2
  23. package/lib/cjs/carousel/index.js +0 -2
  24. package/lib/cjs/checkbox/checkbox.js +0 -2
  25. package/lib/cjs/checkbox/checkboxGroup.js +0 -3
  26. package/lib/cjs/checkbox/checkboxInner.js +0 -2
  27. package/lib/cjs/collapse/index.js +0 -1
  28. package/lib/cjs/datePicker/dateInput.d.ts +1 -1
  29. package/lib/cjs/datePicker/dateInput.js +0 -3
  30. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  31. package/lib/cjs/datePicker/datePicker.js +1 -3
  32. package/lib/cjs/datePicker/month.js +0 -4
  33. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  34. package/lib/cjs/datePicker/monthsGrid.js +1 -5
  35. package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
  36. package/lib/cjs/datePicker/yearAndMonth.js +0 -2
  37. package/lib/cjs/form/arrayField.js +0 -2
  38. package/lib/cjs/form/baseForm.d.ts +0 -1
  39. package/lib/cjs/form/baseForm.js +5 -7
  40. package/lib/cjs/form/context.js +0 -2
  41. package/lib/cjs/form/errorMessage.js +0 -2
  42. package/lib/cjs/form/field.d.ts +0 -1
  43. package/lib/cjs/form/field.js +0 -2
  44. package/lib/cjs/form/group.js +0 -2
  45. package/lib/cjs/form/hoc/withField.js +2 -6
  46. package/lib/cjs/form/interface.d.ts +4 -4
  47. package/lib/cjs/form/interface.js +0 -3
  48. package/lib/cjs/form/section.js +0 -2
  49. package/lib/cjs/form/slot.js +0 -3
  50. package/lib/cjs/iconButton/index.js +0 -2
  51. package/lib/cjs/image/image.js +29 -34
  52. package/lib/cjs/image/interface.d.ts +4 -1
  53. package/lib/cjs/image/preview.js +5 -3
  54. package/lib/cjs/image/previewContext.d.ts +1 -0
  55. package/lib/cjs/image/previewFooter.d.ts +5 -1
  56. package/lib/cjs/image/previewFooter.js +66 -38
  57. package/lib/cjs/image/previewInner.d.ts +2 -2
  58. package/lib/cjs/image/previewInner.js +4 -2
  59. package/lib/cjs/input/index.js +0 -2
  60. package/lib/cjs/input/inputGroup.js +0 -3
  61. package/lib/cjs/input/textarea.js +0 -2
  62. package/lib/cjs/inputNumber/index.js +1 -5
  63. package/lib/cjs/modal/ConfirmModal.js +0 -2
  64. package/lib/cjs/modal/Modal.js +0 -2
  65. package/lib/cjs/modal/ModalContent.js +0 -5
  66. package/lib/cjs/modal/confirm.d.ts +12 -12
  67. package/lib/cjs/modal/confirm.js +0 -1
  68. package/lib/cjs/modal/useModal/HookModal.js +0 -1
  69. package/lib/cjs/modal/useModal/index.js +0 -2
  70. package/lib/cjs/navigation/Item.js +0 -3
  71. package/lib/cjs/navigation/SubNav.js +0 -3
  72. package/lib/cjs/navigation/index.js +0 -2
  73. package/lib/cjs/notification/notice.js +29 -35
  74. package/lib/cjs/notification/useNotification/index.js +1 -1
  75. package/lib/cjs/overflowList/index.js +0 -2
  76. package/lib/cjs/pagination/index.d.ts +2 -0
  77. package/lib/cjs/pagination/index.js +29 -13
  78. package/lib/cjs/popconfirm/index.js +0 -2
  79. package/lib/cjs/progress/index.js +0 -1
  80. package/lib/cjs/radio/radio.js +0 -2
  81. package/lib/cjs/rating/index.js +0 -1
  82. package/lib/cjs/resizeObserver/index.js +0 -1
  83. package/lib/cjs/scrollList/scrollItem.js +0 -3
  84. package/lib/cjs/select/index.d.ts +0 -1
  85. package/lib/cjs/select/index.js +3 -12
  86. package/lib/cjs/select/option.js +0 -2
  87. package/lib/cjs/select/utils.js +0 -2
  88. package/lib/cjs/sideSheet/index.js +0 -2
  89. package/lib/cjs/slider/index.js +0 -3
  90. package/lib/cjs/spin/icon.js +0 -2
  91. package/lib/cjs/switch/index.js +0 -2
  92. package/lib/cjs/table/Body/BaseRow.js +0 -2
  93. package/lib/cjs/table/Body/ExpandedRow.js +0 -3
  94. package/lib/cjs/table/Body/SectionRow.js +0 -3
  95. package/lib/cjs/table/Body/index.js +0 -8
  96. package/lib/cjs/table/ColGroup.js +0 -1
  97. package/lib/cjs/table/ColumnFilter.js +0 -3
  98. package/lib/cjs/table/ColumnSelection.js +0 -2
  99. package/lib/cjs/table/HeadTable.js +0 -2
  100. package/lib/cjs/table/ResizableTable.js +1 -4
  101. package/lib/cjs/table/Table.js +1 -10
  102. package/lib/cjs/table/TableCell.js +0 -4
  103. package/lib/cjs/table/TableHeader.js +0 -4
  104. package/lib/cjs/table/TableHeaderRow.js +0 -2
  105. package/lib/cjs/table/TablePagination.js +0 -2
  106. package/lib/cjs/table/table-context.js +0 -2
  107. package/lib/cjs/tabs/TabBar.js +0 -2
  108. package/lib/cjs/tag/index.js +1 -3
  109. package/lib/cjs/tagInput/index.js +0 -2
  110. package/lib/cjs/timePicker/Combobox.js +0 -4
  111. package/lib/cjs/timePicker/TimeInput.js +0 -2
  112. package/lib/cjs/timePicker/TimePicker.js +0 -2
  113. package/lib/cjs/toast/index.js +0 -2
  114. package/lib/cjs/toast/toast.js +0 -2
  115. package/lib/cjs/toast/useToast/index.js +0 -1
  116. package/lib/cjs/tooltip/index.js +0 -6
  117. package/lib/cjs/transfer/index.js +0 -3
  118. package/lib/cjs/tree/index.d.ts +2 -1
  119. package/lib/cjs/tree/index.js +11 -14
  120. package/lib/cjs/tree/treeNode.js +0 -3
  121. package/lib/cjs/treeSelect/index.js +0 -7
  122. package/lib/cjs/trigger/index.js +0 -2
  123. package/lib/cjs/typography/util.js +1 -3
  124. package/lib/cjs/upload/index.js +1 -6
  125. package/lib/es/_portal/index.d.ts +3 -2
  126. package/lib/es/_portal/index.js +33 -26
  127. package/lib/es/_utils/index.js +0 -2
  128. package/lib/es/autoComplete/index.js +0 -1
  129. package/lib/es/autoComplete/option.js +0 -1
  130. package/lib/es/avatar/avatarGroup.js +0 -1
  131. package/lib/es/avatar/index.js +0 -1
  132. package/lib/es/backtop/index.js +0 -1
  133. package/lib/es/badge/index.js +0 -1
  134. package/lib/es/banner/index.js +0 -2
  135. package/lib/es/breadcrumb/index.js +0 -2
  136. package/lib/es/button/Button.js +8 -13
  137. package/lib/es/calendar/dayCalendar.js +4 -9
  138. package/lib/es/calendar/dayCol.js +1 -1
  139. package/lib/es/calendar/monthCalendar.js +5 -11
  140. package/lib/es/calendar/rangeCalendar.js +0 -1
  141. package/lib/es/carousel/index.js +0 -1
  142. package/lib/es/checkbox/checkbox.js +0 -1
  143. package/lib/es/checkbox/checkboxGroup.js +0 -2
  144. package/lib/es/checkbox/checkboxInner.js +0 -1
  145. package/lib/es/collapse/index.js +0 -1
  146. package/lib/es/datePicker/dateInput.d.ts +1 -1
  147. package/lib/es/datePicker/dateInput.js +0 -3
  148. package/lib/es/datePicker/datePicker.d.ts +1 -1
  149. package/lib/es/datePicker/datePicker.js +0 -3
  150. package/lib/es/datePicker/month.js +0 -4
  151. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  152. package/lib/es/datePicker/monthsGrid.js +1 -5
  153. package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
  154. package/lib/es/datePicker/yearAndMonth.js +0 -1
  155. package/lib/es/form/arrayField.js +0 -1
  156. package/lib/es/form/baseForm.d.ts +0 -1
  157. package/lib/es/form/baseForm.js +5 -6
  158. package/lib/es/form/context.js +0 -1
  159. package/lib/es/form/errorMessage.js +0 -1
  160. package/lib/es/form/field.d.ts +0 -1
  161. package/lib/es/form/field.js +0 -1
  162. package/lib/es/form/group.js +0 -1
  163. package/lib/es/form/hoc/withField.js +2 -6
  164. package/lib/es/form/interface.d.ts +4 -4
  165. package/lib/es/form/interface.js +0 -2
  166. package/lib/es/form/section.js +0 -1
  167. package/lib/es/form/slot.js +0 -2
  168. package/lib/es/iconButton/index.js +0 -1
  169. package/lib/es/image/image.js +29 -34
  170. package/lib/es/image/interface.d.ts +4 -1
  171. package/lib/es/image/preview.js +5 -3
  172. package/lib/es/image/previewContext.d.ts +1 -0
  173. package/lib/es/image/previewFooter.d.ts +5 -1
  174. package/lib/es/image/previewFooter.js +66 -38
  175. package/lib/es/image/previewInner.d.ts +2 -2
  176. package/lib/es/image/previewInner.js +4 -1
  177. package/lib/es/input/index.js +0 -1
  178. package/lib/es/input/inputGroup.js +0 -2
  179. package/lib/es/input/textarea.js +0 -1
  180. package/lib/es/inputNumber/index.js +0 -5
  181. package/lib/es/modal/ConfirmModal.js +0 -2
  182. package/lib/es/modal/Modal.js +0 -1
  183. package/lib/es/modal/ModalContent.js +0 -3
  184. package/lib/es/modal/confirm.d.ts +12 -12
  185. package/lib/es/modal/confirm.js +0 -1
  186. package/lib/es/modal/useModal/HookModal.js +0 -1
  187. package/lib/es/modal/useModal/index.js +0 -2
  188. package/lib/es/navigation/Item.js +0 -2
  189. package/lib/es/navigation/SubNav.js +0 -2
  190. package/lib/es/navigation/index.js +0 -1
  191. package/lib/es/notification/notice.js +29 -34
  192. package/lib/es/notification/useNotification/index.js +1 -1
  193. package/lib/es/overflowList/index.js +0 -1
  194. package/lib/es/pagination/index.d.ts +2 -0
  195. package/lib/es/pagination/index.js +28 -13
  196. package/lib/es/popconfirm/index.js +0 -1
  197. package/lib/es/progress/index.js +0 -1
  198. package/lib/es/radio/radio.js +0 -1
  199. package/lib/es/rating/index.js +0 -1
  200. package/lib/es/resizeObserver/index.js +0 -1
  201. package/lib/es/scrollList/scrollItem.js +0 -3
  202. package/lib/es/select/index.d.ts +0 -1
  203. package/lib/es/select/index.js +3 -12
  204. package/lib/es/select/option.js +0 -1
  205. package/lib/es/select/utils.js +0 -2
  206. package/lib/es/sideSheet/index.js +0 -1
  207. package/lib/es/slider/index.js +0 -3
  208. package/lib/es/spin/icon.js +0 -1
  209. package/lib/es/switch/index.js +0 -1
  210. package/lib/es/table/Body/BaseRow.js +0 -2
  211. package/lib/es/table/Body/ExpandedRow.js +0 -2
  212. package/lib/es/table/Body/SectionRow.js +0 -3
  213. package/lib/es/table/Body/index.js +0 -8
  214. package/lib/es/table/ColGroup.js +0 -1
  215. package/lib/es/table/ColumnFilter.js +0 -2
  216. package/lib/es/table/ColumnSelection.js +0 -1
  217. package/lib/es/table/HeadTable.js +0 -1
  218. package/lib/es/table/ResizableTable.js +0 -4
  219. package/lib/es/table/Table.js +0 -10
  220. package/lib/es/table/TableCell.js +0 -3
  221. package/lib/es/table/TableHeader.js +0 -3
  222. package/lib/es/table/TableHeaderRow.js +0 -1
  223. package/lib/es/table/TablePagination.js +0 -1
  224. package/lib/es/table/table-context.js +0 -1
  225. package/lib/es/tabs/TabBar.js +0 -2
  226. package/lib/es/tag/index.js +1 -2
  227. package/lib/es/tagInput/index.js +0 -2
  228. package/lib/es/timePicker/Combobox.js +0 -3
  229. package/lib/es/timePicker/TimeInput.js +0 -1
  230. package/lib/es/timePicker/TimePicker.js +0 -1
  231. package/lib/es/toast/index.js +0 -1
  232. package/lib/es/toast/toast.js +0 -1
  233. package/lib/es/toast/useToast/index.js +0 -1
  234. package/lib/es/tooltip/index.js +0 -5
  235. package/lib/es/transfer/index.js +0 -3
  236. package/lib/es/tree/index.d.ts +2 -1
  237. package/lib/es/tree/index.js +11 -13
  238. package/lib/es/tree/treeNode.js +0 -3
  239. package/lib/es/treeSelect/index.js +0 -7
  240. package/lib/es/trigger/index.js +0 -2
  241. package/lib/es/typography/util.js +1 -3
  242. package/lib/es/upload/index.js +1 -5
  243. package/package.json +8 -8
@@ -156,6 +156,7 @@ export declare function withError(props: ModalReactProps): {
156
156
  visible?: boolean;
157
157
  content?: React.ReactNode;
158
158
  icon: string | number | boolean | React.ReactFragment | JSX.Element;
159
+ onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
159
160
  zIndex?: number;
160
161
  closeOnEsc?: boolean;
161
162
  preventScroll?: boolean;
@@ -163,7 +164,6 @@ export declare function withError(props: ModalReactProps): {
163
164
  keepDOM?: boolean;
164
165
  cancelText?: string;
165
166
  okText?: string;
166
- onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
167
167
  closeIcon?: React.ReactNode;
168
168
  bodyStyle?: React.CSSProperties;
169
169
  closable?: boolean;
@@ -211,12 +211,22 @@ export declare function withError(props: ModalReactProps): {
211
211
  hidden?: boolean;
212
212
  color?: string;
213
213
  content?: string;
214
+ onChange?: React.FormEventHandler<HTMLButtonElement>;
215
+ defaultChecked?: boolean;
214
216
  defaultValue?: string | number | readonly string[];
217
+ suppressContentEditableWarning?: boolean;
218
+ suppressHydrationWarning?: boolean;
215
219
  accessKey?: string;
220
+ autoFocus?: boolean;
221
+ formAction?: string;
222
+ formEncType?: string;
223
+ formMethod?: string;
224
+ formNoValidate?: boolean;
225
+ formTarget?: string;
216
226
  dir?: string;
217
227
  draggable?: boolean | "false" | "true";
218
228
  lang?: string;
219
- translate?: "yes" | "no";
229
+ translate?: "no" | "yes";
220
230
  prefix?: string;
221
231
  role?: React.AriaRole;
222
232
  contentEditable?: "inherit" | (boolean | "false" | "true");
@@ -232,10 +242,6 @@ export declare function withError(props: ModalReactProps): {
232
242
  'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "false" | "true" | "tree";
233
243
  'aria-controls'?: string;
234
244
  'aria-describedby'?: string;
235
- defaultChecked?: boolean;
236
- suppressContentEditableWarning?: boolean;
237
- suppressHydrationWarning?: boolean;
238
- autoFocus?: boolean;
239
245
  contextMenu?: string;
240
246
  placeholder?: string;
241
247
  spellCheck?: boolean | "false" | "true";
@@ -321,7 +327,6 @@ export declare function withError(props: ModalReactProps): {
321
327
  onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLButtonElement>;
322
328
  onFocusCapture?: React.FocusEventHandler<HTMLButtonElement>;
323
329
  onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
324
- onChange?: React.FormEventHandler<HTMLButtonElement>;
325
330
  onChangeCapture?: React.FormEventHandler<HTMLButtonElement>;
326
331
  onBeforeInput?: React.FormEventHandler<HTMLButtonElement>;
327
332
  onBeforeInputCapture?: React.FormEventHandler<HTMLButtonElement>;
@@ -458,11 +463,6 @@ export declare function withError(props: ModalReactProps): {
458
463
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
459
464
  onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
460
465
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
461
- formAction?: string;
462
- formEncType?: string;
463
- formMethod?: string;
464
- formNoValidate?: boolean;
465
- formTarget?: string;
466
466
  };
467
467
  };
468
468
  export declare function withConfirm(props: ModalReactProps): {
@@ -29,7 +29,6 @@ function confirm(props) {
29
29
  }
30
30
  for (let i = 0; i < _Modal.destroyFns.length; i++) {
31
31
  const fn = _Modal.destroyFns[i];
32
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
33
32
  if (fn === close) {
34
33
  _Modal.destroyFns.splice(i, 1);
35
34
  break;
@@ -15,7 +15,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
15
15
  }
16
16
  return t;
17
17
  };
18
- // eslint-disable-next-line max-len
19
18
  const HookModal = (_a, ref) => {
20
19
  var {
21
20
  afterClose,
@@ -21,12 +21,10 @@ function usePatchElement() {
21
21
  }
22
22
  function useModal() {
23
23
  const [elements, patchElement] = usePatchElement();
24
- // eslint-disable-next-line max-len
25
24
  function getConfirmFunc(withFunc) {
26
25
  return function hookConfirm(config) {
27
26
  uuid += 1;
28
27
  const modalRef = /*#__PURE__*/_react.default.createRef();
29
- // eslint-disable-next-line prefer-const
30
28
  let closeFunc;
31
29
  const modal = /*#__PURE__*/_react.default.createElement(_HookModal.default, {
32
30
  key: `semi-modal-${uuid}`,
@@ -18,9 +18,6 @@ var _tooltip = _interopRequireDefault(require("../tooltip"));
18
18
  var _navContext = _interopRequireDefault(require("./nav-context"));
19
19
  var _dropdown = _interopRequireDefault(require("../dropdown"));
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
- /* eslint-disable max-len */
22
- /* eslint-disable no-nested-ternary */
23
-
24
21
  const clsPrefix = `${_constants.cssClasses.PREFIX}-item`;
25
22
  class NavItem extends _baseComponent.default {
26
23
  constructor(props) {
@@ -21,9 +21,6 @@ var _navContext = _interopRequireDefault(require("./nav-context"));
21
21
  var _collapsible = _interopRequireDefault(require("../collapsible"));
22
22
  var _cssAnimation = _interopRequireDefault(require("../_cssAnimation"));
23
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
- /* eslint-disable max-len */
25
- /* eslint-disable no-nested-ternary */
26
-
27
24
  class SubNav extends _baseComponent.default {
28
25
  constructor(props) {
29
26
  super(props);
@@ -31,8 +31,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
31
31
  }
32
32
  return t;
33
33
  };
34
- /* eslint-disable max-lines-per-function */
35
-
36
34
  function createAddKeysFn(context, keyName) {
37
35
  return function addKeys() {
38
36
  const handleKeys = new Set(context.state[keyName]);
@@ -25,8 +25,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
25
25
  }
26
26
  return t;
27
27
  };
28
- /* eslint-disable no-unreachable */
29
-
30
28
  const prefixCls = _constants.cssClasses.NOTICE;
31
29
  const {
32
30
  duration
@@ -136,39 +134,35 @@ class Notice extends _baseComponent.default {
136
134
  [`${prefixCls}-rtl`]: direction === 'rtl'
137
135
  });
138
136
  const titleID = (0, _uuid.getUuidShort)({});
139
- return (
140
- /*#__PURE__*/
141
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
142
- _react.default.createElement("div", {
143
- className: wrapper,
144
- style: style,
145
- onMouseEnter: this.clearCloseTimer,
146
- onMouseLeave: this.startCloseTimer,
147
- onClick: this.notifyClick,
148
- "aria-labelledby": titleID,
149
- role: 'alert',
150
- onAnimationEnd: this.props.onAnimationEnd,
151
- onAnimationStart: this.props.onAnimationStart
152
- }, /*#__PURE__*/_react.default.createElement("div", null, this.renderTypeIcon()), /*#__PURE__*/_react.default.createElement("div", {
153
- className: `${prefixCls}-inner`
154
- }, /*#__PURE__*/_react.default.createElement("div", {
155
- className: `${prefixCls}-content-wrapper`
156
- }, title ? /*#__PURE__*/_react.default.createElement("div", {
157
- id: titleID,
158
- className: `${prefixCls}-title`,
159
- "x-semi-prop": "title"
160
- }, title) : '', content ? /*#__PURE__*/_react.default.createElement("div", {
161
- className: `${prefixCls}-content`,
162
- "x-semi-prop": "content"
163
- }, content) : ''), showClose && /*#__PURE__*/_react.default.createElement(_iconButton.default, {
164
- className: `${prefixCls}-icon-close`,
165
- type: "tertiary",
166
- icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, null),
167
- theme: "borderless",
168
- size: "small",
169
- onClick: this.close
170
- })))
171
- );
137
+ return /*#__PURE__*/_react.default.createElement("div", {
138
+ className: wrapper,
139
+ style: style,
140
+ onMouseEnter: this.clearCloseTimer,
141
+ onMouseLeave: this.startCloseTimer,
142
+ onClick: this.notifyClick,
143
+ "aria-labelledby": titleID,
144
+ role: 'alert',
145
+ onAnimationEnd: this.props.onAnimationEnd,
146
+ onAnimationStart: this.props.onAnimationStart
147
+ }, /*#__PURE__*/_react.default.createElement("div", null, this.renderTypeIcon()), /*#__PURE__*/_react.default.createElement("div", {
148
+ className: `${prefixCls}-inner`
149
+ }, /*#__PURE__*/_react.default.createElement("div", {
150
+ className: `${prefixCls}-content-wrapper`
151
+ }, title ? /*#__PURE__*/_react.default.createElement("div", {
152
+ id: titleID,
153
+ className: `${prefixCls}-title`,
154
+ "x-semi-prop": "title"
155
+ }, title) : '', content ? /*#__PURE__*/_react.default.createElement("div", {
156
+ className: `${prefixCls}-content`,
157
+ "x-semi-prop": "content"
158
+ }, content) : ''), showClose && /*#__PURE__*/_react.default.createElement(_iconButton.default, {
159
+ className: `${prefixCls}-icon-close`,
160
+ type: "tertiary",
161
+ icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, null),
162
+ theme: "borderless",
163
+ size: "small",
164
+ onClick: this.close
165
+ })));
172
166
  }
173
167
  }
174
168
  Notice.contextType = _context.default;
@@ -61,6 +61,7 @@ function usePatchElement() {
61
61
  const pos = obj[0];
62
62
  const notices = obj[1];
63
63
  // @ts-ignore
64
+ // eslint-disable-next-line react/no-unknown-property
64
65
  return Array.isArray(notices) && notices.length ? /*#__PURE__*/_react.default.createElement("div", {
65
66
  key: pos,
66
67
  className: (0, _classnames.default)(_constants.cssClasses.LIST),
@@ -78,7 +79,6 @@ function useNotification() {
78
79
  const mergeConfig = Object.assign(Object.assign({}, config), {
79
80
  id
80
81
  });
81
- // eslint-disable-next-line prefer-const
82
82
  let closeFunc;
83
83
  const ref = ele => {
84
84
  noticeRef.set(id, ele);
@@ -18,8 +18,6 @@ var _foundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/
18
18
  require("@douyinfe/semi-foundation/lib/cjs/overflowList/overflowList.css");
19
19
  var _utils = require("../_utils");
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
- /* eslint-disable arrow-body-style */
22
-
23
21
  const prefixCls = _constants.cssClasses.PREFIX;
24
22
  const Boundary = _constants.strings.BOUNDARY_MAP;
25
23
  const OverflowDirection = _constants.strings.OVERFLOW_DIR;
@@ -40,6 +40,7 @@ export interface PaginationState {
40
40
  nextDisabled: boolean;
41
41
  restLeftPageList: number[];
42
42
  restRightPageList: number[];
43
+ allPageNumbers: number[];
43
44
  }
44
45
  export type PaginationLocale = Locale['Pagination'];
45
46
  export type PopoverPosition = Position;
@@ -98,6 +99,7 @@ export default class Pagination extends BaseComponent<PaginationProps, Paginatio
98
99
  renderQuickJump(locale: PaginationLocale): JSX.Element;
99
100
  renderPageList(): JSX.Element[];
100
101
  renderRestPageList(restList: ('...' | number)[]): JSX.Element;
102
+ renderSmallPageSelect(content: React.ReactNode): JSX.Element;
101
103
  renderSmallPage(locale: PaginationLocale): JSX.Element;
102
104
  renderDefaultPage(locale: PaginationLocale): JSX.Element;
103
105
  render(): JSX.Element;
@@ -30,8 +30,8 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
30
30
  }
31
31
  return t;
32
32
  };
33
- /* eslint-disable max-len */
34
33
  /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
34
+
35
35
  const prefixCls = _constants.cssClasses.PREFIX;
36
36
  const {
37
37
  Option
@@ -39,18 +39,25 @@ const {
39
39
  class Pagination extends _baseComponent.default {
40
40
  constructor(props) {
41
41
  super(props);
42
+ const total = props.total;
43
+ const pageSize = props.pageSize || props.pageSizeOpts[0] || _constants.numbers.DEFAULT_PAGE_SIZE; // Use pageSize first, use the first of pageSizeOpts when not, use the default value when none
44
+ const shouldFillAllNumber = props.size === 'small' && props.hoverShowPageSelect && !props.disabled;
42
45
  this.state = {
43
- total: props.total,
46
+ total,
44
47
  showTotal: props.showTotal,
45
48
  currentPage: props.currentPage || props.defaultCurrentPage,
46
- pageSize: props.pageSize || props.pageSizeOpts[0] || _constants.numbers.DEFAULT_PAGE_SIZE,
49
+ pageSize,
47
50
  pageList: [],
48
51
  prevDisabled: false,
49
52
  nextDisabled: false,
50
53
  restLeftPageList: [],
51
54
  restRightPageList: [],
52
- quickJumpPage: ''
55
+ quickJumpPage: '',
56
+ allPageNumbers: shouldFillAllNumber ? Array.from({
57
+ length: Math.ceil(total / pageSize)
58
+ }, (v, i) => i + 1) : [] // only need to count in smallPage mode, when props.size = small
53
59
  };
60
+
54
61
  this.foundation = new _foundation.default(this.adapter);
55
62
  this.renderDefaultPage = this.renderDefaultPage.bind(this);
56
63
  this.renderSmallPage = this.renderSmallPage.bind(this);
@@ -85,7 +92,9 @@ class Pagination extends _baseComponent.default {
85
92
  updateQuickJumpPage: quickJumpPage => this.setState({
86
93
  quickJumpPage
87
94
  }),
88
- // updateRestPageList: () => {},
95
+ updateAllPageNumbers: allPageNumbers => this.setState({
96
+ allPageNumbers
97
+ }),
89
98
  setCurrentPage: pageIndex => {
90
99
  this.setState({
91
100
  currentPage: pageIndex
@@ -121,6 +130,7 @@ class Pagination extends _baseComponent.default {
121
130
  pageSize: this.props.pageSize
122
131
  };
123
132
  let pagerHasChanged = false;
133
+ let allPageNumberNeedUpdate = false;
124
134
  if (prevProps.currentPage !== this.props.currentPage) {
125
135
  pagerHasChanged = true;
126
136
  // this.foundation.updatePage(this.props.currentPage);
@@ -128,13 +138,18 @@ class Pagination extends _baseComponent.default {
128
138
 
129
139
  if (prevProps.total !== this.props.total) {
130
140
  pagerHasChanged = true;
141
+ allPageNumberNeedUpdate = true;
131
142
  }
132
143
  if (prevProps.pageSize !== this.props.pageSize) {
133
144
  pagerHasChanged = true;
145
+ allPageNumberNeedUpdate = true;
134
146
  }
135
147
  if (pagerHasChanged) {
136
148
  this.foundation.updatePage(pagerProps.currentPage, pagerProps.total, pagerProps.pageSize);
137
149
  }
150
+ if (allPageNumberNeedUpdate) {
151
+ this.foundation.updateAllPageNumbers(pagerProps.total, pagerProps.pageSize);
152
+ }
138
153
  }
139
154
  renderPrevBtn() {
140
155
  const {
@@ -337,6 +352,13 @@ class Pagination extends _baseComponent.default {
337
352
  }, row)
338
353
  );
339
354
  }
355
+ renderSmallPageSelect(content) {
356
+ const allPageNumbers = this.state.allPageNumbers;
357
+ const pageList = this.renderRestPageList(allPageNumbers);
358
+ return /*#__PURE__*/_react.default.createElement(_index3.default, {
359
+ content: pageList
360
+ }, content);
361
+ }
340
362
  renderSmallPage(locale) {
341
363
  const _a = this.props,
342
364
  {
@@ -360,24 +382,18 @@ class Pagination extends _baseComponent.default {
360
382
  if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
361
383
  return null;
362
384
  }
363
- const pageNumbers = Array.from({
364
- length: Math.ceil(total / pageSize)
365
- }, (v, i) => i + 1);
366
- const pageList = this.renderRestPageList(pageNumbers);
367
385
  const pageCls = (0, _classnames.default)({
368
386
  [`${prefixCls}-item`]: true,
369
387
  [`${prefixCls}-item-small`]: true,
370
388
  [`${prefixCls}-item-all-disabled`]: disabled
371
389
  });
372
- const page = /*#__PURE__*/_react.default.createElement("div", {
390
+ const content = /*#__PURE__*/_react.default.createElement("div", {
373
391
  className: pageCls
374
392
  }, currentPage, "/", totalPageNum, " ");
375
393
  return /*#__PURE__*/_react.default.createElement("div", Object.assign({
376
394
  className: paginationCls,
377
395
  style: style
378
- }, this.getDataAttr(rest)), this.renderPrevBtn(), hoverShowPageSelect && !disabled ? /*#__PURE__*/_react.default.createElement(_index3.default, {
379
- content: pageList
380
- }, page) : page, this.renderNextBtn(), this.renderQuickJump(locale));
396
+ }, this.getDataAttr(rest)), this.renderPrevBtn(), hoverShowPageSelect && !disabled ? this.renderSmallPageSelect(content) : content, this.renderNextBtn(), this.renderQuickJump(locale));
381
397
  }
382
398
  renderDefaultPage(locale) {
383
399
  const {
@@ -29,8 +29,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
29
29
  }
30
30
  return t;
31
31
  };
32
- /* eslint-disable max-len */
33
-
34
32
  class Popconfirm extends _baseComponent.default {
35
33
  constructor(props) {
36
34
  super(props);
@@ -41,7 +41,6 @@ class Progress extends _react.Component {
41
41
  }
42
42
  if (prevProps.percent !== this.props.percent) {
43
43
  if (!this.props.motion) {
44
- // eslint-disable-next-line
45
44
  this.setState({
46
45
  percentNumber: this.props.percent
47
46
  });
@@ -26,8 +26,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
26
26
  }
27
27
  return t;
28
28
  };
29
- /* eslint-disable prefer-destructuring */
30
-
31
29
  class Radio extends _baseComponent.default {
32
30
  constructor(props) {
33
31
  super(props);
@@ -179,7 +179,6 @@ class Rating extends _baseComponent.default {
179
179
  },
180
180
  getStarDOM: index => {
181
181
  const instance = this.stars && this.stars[index];
182
- // eslint-disable-next-line react/no-find-dom-node
183
182
  return _reactDom.default.findDOMNode(instance);
184
183
  },
185
184
  notifyHoverChange: (hoverValue, clearedValue) => {
@@ -18,7 +18,6 @@ class ReactResizeObserver extends _baseComponent.default {
18
18
  // using findDOMNode for two reasons:
19
19
  // 1. cloning to insert a ref is unwieldy and not performant.
20
20
  // 2. ensure that we resolve to an actual DOM node (instead of any JSX ref instance).
21
- // eslint-disable-next-line
22
21
  return (0, _reactDom.findDOMNode)(this.childNode || this);
23
22
  } catch (error) {
24
23
  // swallow error if findDOMNode is run on unmounted component.
@@ -126,7 +126,6 @@ class ScrollItem extends _baseComponent.default {
126
126
  this.scrollToIndex = (selectedIndex, duration) => {
127
127
  // move to selected item
128
128
  duration = typeof duration === 'number' ? duration : _constants.numbers.DEFAULT_SCROLL_DURATION;
129
- // eslint-disable-next-line
130
129
  selectedIndex = selectedIndex == null ? this.props.selectedIndex : selectedIndex;
131
130
  // this.isWheelMode() && this.addClassToNode();
132
131
  this.scrollToNode(this.selectedNode, duration);
@@ -232,11 +231,9 @@ class ScrollItem extends _baseComponent.default {
232
231
  if (typeof transform === 'function') {
233
232
  text = transform(item.value, item.text);
234
233
  } else {
235
- // eslint-disable-next-line
236
234
  text = item.text == null ? item.value : item.text;
237
235
  }
238
236
  } else {
239
- // eslint-disable-next-line
240
237
  text = item.text == null ? item.value : item.text;
241
238
  }
242
239
  const events = {};
@@ -85,7 +85,6 @@ export type SelectProps = {
85
85
  autoClearSearchValue?: boolean;
86
86
  arrowIcon?: React.ReactNode;
87
87
  borderless?: boolean;
88
- showArrowInBorderless?: boolean;
89
88
  clearIcon?: React.ReactNode;
90
89
  defaultValue?: string | number | any[] | Record<string, any>;
91
90
  value?: string | number | any[] | Record<string, any>;
@@ -50,8 +50,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
50
50
  }
51
51
  return t;
52
52
  };
53
- /* eslint-disable max-len */
54
- /* eslint-disable max-lines-per-function */
55
53
  const prefixcls = _constants.cssClasses.PREFIX;
56
54
  const key = 0;
57
55
  // Notes: Use the label of the option as the identifier, that is, the option in Select, the value is allowed to be the same, but the label must be unique
@@ -164,7 +162,6 @@ class Select extends _baseComponent.default {
164
162
  focusIndex
165
163
  });
166
164
  },
167
- // eslint-disable-next-line @typescript-eslint/no-empty-function
168
165
  scrollToFocusOption: () => {}
169
166
  };
170
167
  const filterAdapter = {
@@ -198,7 +195,6 @@ class Select extends _baseComponent.default {
198
195
  const clickOutsideHandler = e => {
199
196
  const optionInstance = this.optionsRef && this.optionsRef.current;
200
197
  const triggerDom = this.triggerRef && this.triggerRef.current;
201
- // eslint-disable-next-line react/no-find-dom-node
202
198
  const optionsDom = _reactDom.default.findDOMNode(optionInstance);
203
199
  // let isInPanel = optionsDom && optionsDom.contains(e.target);
204
200
  // let isInTrigger = triggerDom && triggerDom.contains(e.target);
@@ -371,14 +367,12 @@ class Select extends _baseComponent.default {
371
367
  return this.state.isFocusInContainer;
372
368
  },
373
369
  updateScrollTop: index => {
374
- // eslint-disable-next-line max-len
375
370
  let optionClassName = `.${prefixcls}-option-selected`;
376
371
  if (index !== undefined) {
377
372
  optionClassName = `.${prefixcls}-option:nth-child(${index})`;
378
373
  }
379
374
  let destNode = document.querySelector(`#${prefixcls}-${this.selectOptionListID} ${optionClassName}`);
380
375
  if (Array.isArray(destNode)) {
381
- // eslint-disable-next-line prefer-destructuring
382
376
  destNode = destNode[0];
383
377
  }
384
378
  if (destNode) {
@@ -1056,10 +1050,9 @@ class Select extends _baseComponent.default {
1056
1050
  triggerRender,
1057
1051
  arrowIcon,
1058
1052
  clearIcon,
1059
- borderless,
1060
- showArrowInBorderless
1053
+ borderless
1061
1054
  } = _a,
1062
- rest = __rest(_a, ["disabled", "multiple", "filter", "style", "id", "size", "className", "validateStatus", "showArrow", "suffix", "prefix", "insetLabel", "placeholder", "triggerRender", "arrowIcon", "clearIcon", "borderless", "showArrowInBorderless"]);
1055
+ rest = __rest(_a, ["disabled", "multiple", "filter", "style", "id", "size", "className", "validateStatus", "showArrow", "suffix", "prefix", "insetLabel", "placeholder", "triggerRender", "arrowIcon", "clearIcon", "borderless"]);
1063
1056
  const {
1064
1057
  selections,
1065
1058
  isOpen,
@@ -1074,7 +1067,6 @@ class Select extends _baseComponent.default {
1074
1067
  const filterable = Boolean(filter); // filter(boolean || function)
1075
1068
  const selectionCls = useCustomTrigger ? (0, _classnames.default)(className) : (0, _classnames.default)(prefixcls, className, {
1076
1069
  [`${prefixcls}-borderless`]: borderless,
1077
- [`${prefixcls}-borderless-arrow`]: showArrowInBorderless,
1078
1070
  [`${prefixcls}-open`]: isOpen,
1079
1071
  [`${prefixcls}-focus`]: isFocus,
1080
1072
  [`${prefixcls}-disabled`]: disabled,
@@ -1341,8 +1333,7 @@ Select.defaultProps = {
1341
1333
  showRestTagsPopover: false,
1342
1334
  restTagsPopoverProps: {},
1343
1335
  expandRestTagsOnClick: false,
1344
- ellipsisTrigger: false,
1345
- showArrowInBorderless: false
1336
+ ellipsisTrigger: false
1346
1337
  // Radio selection is different from the default renderSelectedItem for multiple selection, so it is not declared here
1347
1338
  // renderSelectedItem: (optionNode) => optionNode.label,
1348
1339
  // The default creator rendering is related to i18, so it is not declared here
@@ -23,8 +23,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
23
23
  }
24
24
  return t;
25
25
  };
26
- /* eslint-disable max-len */
27
-
28
26
  class Option extends _react.PureComponent {
29
27
  onClick(_a, event) {
30
28
  var {
@@ -42,7 +42,6 @@ const getOptionsFromGroup = selectChildren => {
42
42
  _show: false
43
43
  };
44
44
  // avoid null
45
- // eslint-disable-next-line max-len
46
45
  let childNodes = _react.default.Children.toArray(selectChildren);
47
46
  childNodes = childNodes.filter(childNode => childNode && childNode.props);
48
47
  let type = '';
@@ -57,7 +56,6 @@ const getOptionsFromGroup = selectChildren => {
57
56
  } else if (child.type.isSelectOptionGroup) {
58
57
  type = 'group';
59
58
  // Avoid saving children (reactNode) by... removing other props from the group except children, causing performance problems
60
- // eslint-disable-next-line prefer-const
61
59
  let _a = child.props,
62
60
  {
63
61
  children
@@ -25,8 +25,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
25
25
  }
26
26
  return t;
27
27
  };
28
- /* eslint-disable no-nested-ternary */
29
-
30
28
  const prefixCls = _constants.cssClasses.PREFIX;
31
29
  const defaultWidthList = _constants.strings.WIDTH;
32
30
  const defaultHeight = _constants.strings.HEIGHT;
@@ -24,8 +24,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
24
24
  }
25
25
  return t;
26
26
  };
27
- /* eslint-disable max-lines-per-function */
28
- /* eslint-disable react/no-find-dom-node */
29
27
  const prefixCls = _constants.cssClasses.PREFIX;
30
28
  function domIsInRenderTree(e) {
31
29
  if (!e) {
@@ -337,7 +335,6 @@ class Slider extends _baseComponent.default {
337
335
  value = this.props.defaultValue;
338
336
  }
339
337
  this.state = {
340
- // eslint-disable-next-line no-nested-ternary
341
338
  currentValue: value ? value : this.props.range ? [0, 0] : 0,
342
339
  min: this.props.min || 0,
343
340
  max: this.props.max || 0,
@@ -15,8 +15,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
15
15
  }
16
16
  return t;
17
17
  };
18
- /* eslint-disable no-unused-vars */
19
-
20
18
  let _id = -1;
21
19
  function Icon() {
22
20
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -22,8 +22,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
22
22
  }
23
23
  return t;
24
24
  };
25
- /* eslint-disable max-len */
26
-
27
25
  class Switch extends _baseComponent.default {
28
26
  constructor(props) {
29
27
  super(props);
@@ -31,8 +31,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
31
31
  }
32
32
  return t;
33
33
  };
34
- /* eslint-disable max-len */
35
- /* eslint-disable eqeqeq */
36
34
  class TableRow extends _baseComponent.default {
37
35
  get adapter() {
38
36
  var _this = this;
@@ -26,8 +26,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
26
26
  }
27
27
  return t;
28
28
  };
29
- /* eslint-disable max-len */
30
-
31
29
  /**
32
30
  * Render expanded row
33
31
  */
@@ -63,7 +61,6 @@ class TableExpandedRow extends _react.PureComponent {
63
61
  } else if ( /*#__PURE__*/(0, _react.isValidElement)(cell)) {
64
62
  children = cell;
65
63
  } else if (cell && Object.prototype.toString.call(cell) === '[object Object]') {
66
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
64
  const _a = cell,
68
65
  {
69
66
  children: cellChildren,
@@ -24,9 +24,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
24
24
  }
25
25
  return t;
26
26
  };
27
- /* eslint-disable max-len */
28
- /* eslint-disable @typescript-eslint/ban-types */
29
- /* eslint-disable eqeqeq */
30
27
  /**
31
28
  * Grouping component title row
32
29
  */