@douyinfe/semi-ui 2.40.0-alpha.0 → 2.40.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 (243) hide show
  1. package/dist/css/semi.css +3 -36
  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
@@ -7,10 +7,35 @@ import ConfigContext from '../configProvider/context';
7
7
  import '@douyinfe/semi-foundation/lib/es/_portal/portal.css';
8
8
  const defaultGetContainer = () => document.body;
9
9
  class Portal extends PureComponent {
10
- constructor(props) {
10
+ constructor(props, context) {
11
11
  var _this;
12
12
  super(props);
13
13
  _this = this;
14
+ this.initContainer = function (context) {
15
+ let catchError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
16
+ var _a, _b;
17
+ let container = undefined;
18
+ if (!_this.el) {
19
+ _this.el = document.createElement('div');
20
+ }
21
+ if (!((_a = _this.state) === null || _a === void 0 ? void 0 : _a.container)) {
22
+ try {
23
+ _this.el = document.createElement('div');
24
+ const getContainer = _this.props.getPopupContainer || context.getPopupContainer || defaultGetContainer;
25
+ const portalContainer = getContainer();
26
+ portalContainer.appendChild(_this.el);
27
+ _this.addStyle(_this.props.style);
28
+ _this.addClass(_this.props.prefixCls, context, _this.props.className);
29
+ container = portalContainer;
30
+ return container;
31
+ } catch (e) {
32
+ if (!catchError) {
33
+ throw e;
34
+ }
35
+ }
36
+ }
37
+ return (_b = _this.state) === null || _b === void 0 ? void 0 : _b.container;
38
+ };
14
39
  this.addStyle = function () {
15
40
  let style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
16
41
  if (_this.el) {
@@ -20,11 +45,12 @@ class Portal extends PureComponent {
20
45
  }
21
46
  };
22
47
  this.addClass = function (prefixCls) {
48
+ let context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.context;
23
49
  const {
24
50
  direction
25
- } = _this.context;
26
- for (var _len = arguments.length, classNames = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
27
- classNames[_key - 1] = arguments[_key];
51
+ } = context;
52
+ for (var _len = arguments.length, classNames = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
53
+ classNames[_key - 2] = arguments[_key];
28
54
  }
29
55
  const cls = classnames(prefixCls, ...classNames, {
30
56
  [`${prefixCls}-rtl`]: direction === 'rtl'
@@ -33,32 +59,13 @@ class Portal extends PureComponent {
33
59
  _this.el.className = cls;
34
60
  }
35
61
  };
36
- try {
37
- this.el = document.createElement('div');
38
- } catch (e) {}
39
62
  this.state = {
40
- container: undefined
63
+ container: this.initContainer(context, true)
41
64
  };
42
65
  }
43
66
  componentDidMount() {
44
- if (!this.el) {
45
- this.el = document.createElement('div');
46
- }
47
- const {
48
- state,
49
- props,
50
- context
51
- } = this;
52
- const getContainer = props.getPopupContainer || context.getPopupContainer || defaultGetContainer;
53
- const container = getContainer();
54
- if (container !== state.container) {
55
- // const computedStyle = window.getComputedStyle(container);
56
- // if (computedStyle.position !== 'relative') {
57
- // container.style.position = 'relative';
58
- // }
59
- container.appendChild(this.el);
60
- this.addStyle(props.style);
61
- this.addClass(props.prefixCls, props.className);
67
+ const container = this.initContainer(this.context);
68
+ if (container !== this.state.container) {
62
69
  this.setState({
63
70
  container
64
71
  });
@@ -1,8 +1,6 @@
1
1
  import _get from "lodash/get";
2
2
  import _set from "lodash/set";
3
3
  import _cloneDeepWith from "lodash/cloneDeepWith";
4
- /* eslint-disable max-len */
5
- /* argus-disable unPkgSensitiveInfo */
6
4
  import React from 'react';
7
5
  import warning from '@douyinfe/semi-foundation/lib/es/utils/warning';
8
6
  import { findAll } from '@douyinfe/semi-foundation/lib/es/utils/getHighlight';
@@ -1,6 +1,5 @@
1
1
  import _noop from "lodash/noop";
2
2
  import _isEqual from "lodash/isEqual";
3
- /* eslint-disable @typescript-eslint/ban-types, max-len */
4
3
  import React from 'react';
5
4
  import PropTypes from 'prop-types';
6
5
  import cls from 'classnames';
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable max-len */
11
10
  import React, { PureComponent } from 'react';
12
11
  import classNames from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -73,7 +73,6 @@ export default class AvatarGroup extends PureComponent {
73
73
  return moreAvatar;
74
74
  }
75
75
  render() {
76
- // eslint-disable-next-line no-unused-vars
77
76
  const _a = this.props,
78
77
  {
79
78
  children,
@@ -187,7 +187,6 @@ export default class Avatar extends BaseComponent {
187
187
  }
188
188
  }
189
189
  render() {
190
- // eslint-disable-next-line max-len, no-unused-vars
191
190
  const _a = this.props,
192
191
  {
193
192
  shape,
@@ -63,7 +63,6 @@ export default class BackTop extends BaseComponent {
63
63
  });
64
64
  }
65
65
  render() {
66
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
66
  const _a = this.props,
68
67
  {
69
68
  children,
@@ -23,7 +23,6 @@ export default class Badge extends PureComponent {
23
23
  } = this.context;
24
24
  // DefaultPosition here, static can't get this
25
25
  const defaultPosition = direction === 'rtl' ? 'leftTop' : 'rightTop';
26
- // eslint-disable-next-line max-len
27
26
  const _a = this.props,
28
27
  {
29
28
  count,
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-len */
2
1
  import React from 'react';
3
2
  import cls from 'classnames';
4
3
  import PropTypes from 'prop-types';
@@ -169,7 +168,6 @@ Banner.propTypes = {
169
168
  bordered: PropTypes.bool
170
169
  };
171
170
  Banner.defaultProps = {
172
- // eslint-disable-next-line @typescript-eslint/no-empty-function
173
171
  onClose: () => {},
174
172
  type: 'info',
175
173
  fullMode: true
@@ -1,5 +1,4 @@
1
1
  import _isFunction from "lodash/isFunction";
2
- /* eslint-disable max-len */
3
2
  import React from 'react';
4
3
  import cls from 'classnames';
5
4
  import propTypes from 'prop-types';
@@ -59,7 +58,6 @@ class Breadcrumb extends BaseComponent {
59
58
  key: key,
60
59
  active: idx === items.length - 1,
61
60
  route: route._origin,
62
- // eslint-disable-next-line max-len
63
61
  shouldRenderSeparator: !(shouldCollapse && (hasRenderMore || moreTypeIsPopover) && inCollapseArea)
64
62
  }), renderItem ? renderItem(route._origin) : route.name);
65
63
  });
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable react/destructuring-assignment */
11
10
  import React, { PureComponent } from 'react';
12
11
  import classNames from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -60,18 +59,14 @@ export default class Button extends PureComponent {
60
59
  if (!(className && className.includes('-with-icon'))) {
61
60
  xSemiProps['x-semi-prop'] = this.props['x-semi-children-alias'] || 'children';
62
61
  }
63
- return (
64
- /*#__PURE__*/
65
- // eslint-disable-next-line react/button-has-type
66
- React.createElement("button", Object.assign({}, baseProps, {
67
- onClick: this.props.onClick,
68
- onMouseDown: this.props.onMouseDown,
69
- style: style
70
- }), /*#__PURE__*/React.createElement("span", Object.assign({
71
- className: `${prefixCls}-content`,
72
- onClick: e => disabled && e.stopPropagation()
73
- }, xSemiProps), children))
74
- );
62
+ return /*#__PURE__*/React.createElement("button", Object.assign({}, baseProps, {
63
+ onClick: this.props.onClick,
64
+ onMouseDown: this.props.onMouseDown,
65
+ style: style
66
+ }), /*#__PURE__*/React.createElement("span", Object.assign({
67
+ className: `${prefixCls}-content`,
68
+ onClick: e => disabled && e.stopPropagation()
69
+ }, xSemiProps), children));
75
70
  }
76
71
  }
77
72
  Button.defaultProps = {
@@ -24,14 +24,10 @@ export default class DayCalendar extends BaseComponent {
24
24
  children,
25
25
  key
26
26
  } = event;
27
- return (
28
- /*#__PURE__*/
29
- // eslint-disable-next-line max-len
30
- React.createElement("li", {
31
- className: `${cssClasses.PREFIX}-event-item ${cssClasses.PREFIX}-event-allday`,
32
- key: key || `allDay-${ind}`
33
- }, children)
34
- );
27
+ return /*#__PURE__*/React.createElement("li", {
28
+ className: `${cssClasses.PREFIX}-event-item ${cssClasses.PREFIX}-event-allday`,
29
+ key: key || `allDay-${ind}`
30
+ }, children);
35
31
  });
36
32
  return list;
37
33
  };
@@ -112,7 +108,6 @@ export default class DayCalendar extends BaseComponent {
112
108
  this.foundation.destroy();
113
109
  }
114
110
  render() {
115
- // eslint-disable-next-line max-len
116
111
  const {
117
112
  dateGridRender,
118
113
  displayValue,
@@ -1,4 +1,4 @@
1
- /* eslint-disable max-len */
1
+ /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
2
2
  import React from 'react';
3
3
  import cls from 'classnames';
4
4
  import PropTypes from 'prop-types';
@@ -5,7 +5,6 @@ import ReactDOM from 'react-dom';
5
5
  import cls from 'classnames';
6
6
  import PropTypes from 'prop-types';
7
7
  import { IconClose } from '@douyinfe/semi-icons';
8
- // eslint-disable-next-line max-len
9
8
  import CalendarFoundation from '@douyinfe/semi-foundation/lib/es/calendar/foundation';
10
9
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/calendar/constants';
11
10
  import LocaleConsumer from '../locale/localeConsumer';
@@ -180,15 +179,11 @@ export default class monthCalendar extends BaseComponent {
180
179
  className: `${cssClasses.PREFIX}-today-date`
181
180
  }, "\u00A0", date), locale.datestring));
182
181
  }
183
- return (
184
- /*#__PURE__*/
185
- // eslint-disable-next-line max-len
186
- React.createElement("span", {
187
- className: `${prefixCls}-date`
188
- }, /*#__PURE__*/React.createElement("span", {
189
- className: `${cssClasses.PREFIX}-today-date`
190
- }, date))
191
- );
182
+ return /*#__PURE__*/React.createElement("span", {
183
+ className: `${prefixCls}-date`
184
+ }, /*#__PURE__*/React.createElement("span", {
185
+ className: `${cssClasses.PREFIX}-today-date`
186
+ }, date));
192
187
  };
193
188
  this.renderCusDateGrid = date => {
194
189
  const {
@@ -279,7 +274,6 @@ export default class monthCalendar extends BaseComponent {
279
274
  registerClickOutsideHandler: (key, cb) => {
280
275
  const clickOutsideHandler = e => {
281
276
  const cardInstance = this.cardRef && this.cardRef.get(key);
282
- // eslint-disable-next-line react/no-find-dom-node
283
277
  const cardDom = ReactDOM.findDOMNode(cardInstance);
284
278
  if (cardDom && !cardDom.contains(e.target)) {
285
279
  cb();
@@ -2,7 +2,6 @@ import _isEqual from "lodash/isEqual";
2
2
  import React, { Fragment } from 'react';
3
3
  import cls from 'classnames';
4
4
  import PropTypes from 'prop-types';
5
- // eslint-disable-next-line max-len
6
5
  import CalendarFoundation from '@douyinfe/semi-foundation/lib/es/calendar/foundation';
7
6
  import LocaleConsumer from '../locale/localeConsumer';
8
7
  import localeContext from '../locale/context';
@@ -1,6 +1,5 @@
1
1
  import _isEqual from "lodash/isEqual";
2
2
  import _debounce from "lodash/debounce";
3
- /* eslint-disable jsx-a11y/no-static-element-interactions */
4
3
  import React, { Children, isValidElement } from 'react';
5
4
  import cls from 'classnames';
6
5
  import PropTypes from 'prop-types';
@@ -1,7 +1,6 @@
1
1
  import _noop from "lodash/noop";
2
2
  import _isBoolean from "lodash/isBoolean";
3
3
  import _isUndefined from "lodash/isUndefined";
4
- /* eslint-disable max-len */
5
4
  import React from 'react';
6
5
  import PropTypes from 'prop-types';
7
6
  import classnames from 'classnames';
@@ -1,5 +1,4 @@
1
1
  import _isEqual from "lodash/isEqual";
2
- /* eslint-disable max-len */
3
2
  import React from 'react';
4
3
  import PropTypes from 'prop-types';
5
4
  import classnames from 'classnames';
@@ -140,7 +139,6 @@ CheckboxGroup.propTypes = {
140
139
  };
141
140
  CheckboxGroup.defaultProps = {
142
141
  disabled: false,
143
- // eslint-disable-next-line @typescript-eslint/no-empty-function
144
142
  onChange: () => {},
145
143
  type: strings.TYPE_DEFAULT,
146
144
  defaultValue: [],
@@ -1,5 +1,4 @@
1
1
  import _noop from "lodash/noop";
2
- /* eslint-disable no-nested-ternary */
3
2
  import React, { PureComponent } from 'react';
4
3
  import classnames from 'classnames';
5
4
  import PropTypes from 'prop-types';
@@ -55,7 +55,6 @@ class Collapse extends BaseComponent {
55
55
  this.foundation.destroy();
56
56
  }
57
57
  render() {
58
- // eslint-disable-next-line max-len
59
58
  const _a = this.props,
60
59
  {
61
60
  defaultActiveKey,
@@ -31,7 +31,7 @@ export default class DateInput extends BaseComponent<DateInputProps, {}> {
31
31
  onFocus: PropTypes.Requireable<(...args: any[]) => any>;
32
32
  value: PropTypes.Requireable<any[]>;
33
33
  disabled: PropTypes.Requireable<boolean>;
34
- type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
34
+ type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
35
35
  showClear: PropTypes.Requireable<boolean>;
36
36
  format: PropTypes.Requireable<string>;
37
37
  inputStyle: PropTypes.Requireable<object>;
@@ -9,8 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  };
10
10
  /* eslint-disable jsx-a11y/click-events-have-key-events */
11
11
  /* eslint-disable jsx-a11y/no-static-element-interactions */
12
- /* eslint-disable max-lines-per-function */
13
- /* eslint-disable no-unused-vars */
14
12
  import React from 'react';
15
13
  import cls from 'classnames';
16
14
  import PropTypes from 'prop-types';
@@ -104,7 +102,6 @@ export default class DateInput extends BaseComponent {
104
102
  this.foundation.destroy();
105
103
  }
106
104
  formatText(value) {
107
- // eslint-disable-next-line max-len
108
105
  return value && value.length ? this.foundation.formatShowText(value) : '';
109
106
  }
110
107
  renderRangePrefix() {
@@ -58,7 +58,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
58
58
  'aria-labelledby': PropTypes.Requireable<string>;
59
59
  'aria-required': PropTypes.Requireable<boolean>;
60
60
  borderless: PropTypes.Requireable<boolean>;
61
- type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
61
+ type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
62
62
  size: PropTypes.Requireable<"default" | "small" | "large">;
63
63
  clearIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
64
64
  density: PropTypes.Requireable<"default" | "compact">;
@@ -14,9 +14,6 @@ var __rest = this && this.__rest || function (s, e) {
14
14
  return t;
15
15
  };
16
16
  /* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/interactive-supports-focus */
17
- /* eslint-disable max-len */
18
- /* eslint-disable jsx-a11y/click-events-have-key-events */
19
- /* eslint-disable jsx-a11y/no-static-element-interactions */
20
17
  import React from 'react';
21
18
  import classnames from 'classnames';
22
19
  import PropTypes from 'prop-types';
@@ -2,7 +2,6 @@ import _isFunction from "lodash/isFunction";
2
2
  import _stubFalse from "lodash/stubFalse";
3
3
  import _noop from "lodash/noop";
4
4
  /* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions */
5
- /* eslint-disable max-len */
6
5
  import React from 'react';
7
6
  import classNames from 'classnames';
8
7
  import PropTypes from 'prop-types';
@@ -112,7 +111,6 @@ export default class Month extends BaseComponent {
112
111
  // The range selects the hover date, and the normal hover is .semi-datepicker-main: hover
113
112
  const _isHoverDay = isSameDay(hoverDay, fullDate);
114
113
  // When one is selected
115
- // eslint-disable-next-line one-var
116
114
  let _isHoverAfterStart, _isHoverBeforeEnd, isSelectedStart, isSelectedEnd, isHoverDayAroundOneSelected;
117
115
  if (rangeStart) {
118
116
  isSelectedStart = isSameDay(fullDate, rangeStart);
@@ -135,13 +133,11 @@ export default class Month extends BaseComponent {
135
133
  if (!_isDateRangeSelected && _isDateRangeAnySelected) {
136
134
  isHoverDayAroundOneSelected = _isHoverDay;
137
135
  }
138
- // eslint-disable-next-line one-var
139
136
  let isHover;
140
137
  if (!_isOffsetDateRangeAnyExist) {
141
138
  isHover = _isHoverAfterStart || _isHoverBeforeEnd || _isHoverDay;
142
139
  }
143
140
  // Select all
144
- // eslint-disable-next-line one-var
145
141
  let isInRange, isSelectedStartAfterHover, isSelectedEndBeforeHover, isHoverDayInStartSelection, isHoverDayInEndSelection, isHoverDayInRange;
146
142
  if (_isDateRangeSelected) {
147
143
  isInRange = isBetween(fullDate, {
@@ -19,7 +19,7 @@ export interface MonthsGridProps extends MonthsGridFoundationProps, BaseProps {
19
19
  export type MonthsGridState = MonthsGridFoundationState;
20
20
  export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGridState> {
21
21
  static propTypes: {
22
- type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
22
+ type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
23
23
  defaultValue: PropTypes.Requireable<any[]>;
24
24
  defaultPickerValue: PropTypes.Requireable<NonNullable<string | number | object>>;
25
25
  multiple: PropTypes.Requireable<boolean>;
@@ -1,10 +1,6 @@
1
1
  import _stubFalse from "lodash/stubFalse";
2
2
  import _noop from "lodash/noop";
3
- /* eslint-disable jsx-a11y/interactive-supports-focus,jsx-a11y/click-events-have-key-events */
4
- /* eslint-disable jsx-a11y/no-static-element-interactions */
5
- /* eslint-disable react/no-did-update-set-state */
6
- /* eslint-disable max-len */
7
- /* eslint-disable no-nested-ternary */
3
+ /* eslint-disable jsx-a11y/interactive-supports-focus */
8
4
  import React from 'react';
9
5
  import classnames from 'classnames';
10
6
  import PropTypes from 'prop-types';
@@ -24,7 +24,7 @@ declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonth
24
24
  presetPosition: PropTypes.Requireable<"left" | "top" | "right" | "bottom">;
25
25
  renderQuickControls: PropTypes.Requireable<PropTypes.ReactNodeLike>;
26
26
  renderDateInput: PropTypes.Requireable<PropTypes.ReactNodeLike>;
27
- type: PropTypes.Requireable<"date" | "month" | "dateTime" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
27
+ type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
28
28
  startYear: PropTypes.Requireable<number>;
29
29
  endYear: PropTypes.Requireable<number>;
30
30
  };
@@ -1,7 +1,6 @@
1
1
  import _isEqual from "lodash/isEqual";
2
2
  import _stubFalse from "lodash/stubFalse";
3
3
  import _noop from "lodash/noop";
4
- /* eslint-disable max-len */
5
4
  import React from 'react';
6
5
  import PropTypes from 'prop-types';
7
6
  import YearAndMonthFoundation from '@douyinfe/semi-foundation/lib/es/datePicker/yearAndMonthFoundation';
@@ -1,6 +1,5 @@
1
1
  import _isUndefined from "lodash/isUndefined";
2
2
  import _cloneDeep from "lodash/cloneDeep";
3
- /* eslint-disable react/destructuring-assignment */
4
3
  import React, { Component } from 'react';
5
4
  import { getUuidv4 } from '@douyinfe/semi-foundation/lib/es/utils/uuid';
6
5
  import { FormUpdaterContext, ArrayFieldContext } from './context';
@@ -65,7 +65,6 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
65
65
  autoClearSearchValue?: boolean;
66
66
  arrowIcon?: React.ReactNode;
67
67
  borderless?: boolean;
68
- showArrowInBorderless?: boolean;
69
68
  clearIcon?: React.ReactNode;
70
69
  defaultValue?: string | number | any[] | Record<string, any>;
71
70
  value?: string | number | any[] | Record<string, any>;
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable prefer-template, max-len, @typescript-eslint/no-unused-vars */
11
10
  import React from 'react';
12
11
  import classNames from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -54,11 +53,11 @@ class Form extends BaseComponent {
54
53
  get adapter() {
55
54
  return Object.assign(Object.assign({}, super.adapter), {
56
55
  cloneDeep,
57
- notifySubmit: values => {
58
- this.props.onSubmit(values);
56
+ notifySubmit: (values, e) => {
57
+ this.props.onSubmit(values, e);
59
58
  },
60
- notifySubmitFail: (errors, values) => {
61
- this.props.onSubmitFail(errors, values);
59
+ notifySubmitFail: (errors, values, e) => {
60
+ this.props.onSubmitFail(errors, values, e);
62
61
  },
63
62
  forceUpdate: callback => {
64
63
  this.forceUpdate(callback);
@@ -129,7 +128,7 @@ class Form extends BaseComponent {
129
128
  }
130
129
  submit(e) {
131
130
  e.preventDefault();
132
- this.foundation.submit();
131
+ this.foundation.submit(e);
133
132
  }
134
133
  reset(e) {
135
134
  e.preventDefault();
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-empty-function */
2
1
  import React from 'react';
3
2
  const FormStateContext = /*#__PURE__*/React.createContext({});
4
3
  FormStateContext.displayName = 'FormState';
@@ -1,4 +1,3 @@
1
- /* eslint-disable prefer-template */
2
1
  import React, { PureComponent } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import PropTypes from 'prop-types';
@@ -13,7 +13,6 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
13
13
  autoClearSearchValue?: boolean;
14
14
  arrowIcon?: import("react").ReactNode;
15
15
  borderless?: boolean;
16
- showArrowInBorderless?: boolean;
17
16
  clearIcon?: import("react").ReactNode;
18
17
  defaultValue?: string | number | any[] | Record<string, any>;
19
18
  value?: string | number | any[] | Record<string, any>;
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-len */
2
1
  import withField from './hoc/withField';
3
2
  // Basic component
4
3
  import Input from '../input/index';
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable react/destructuring-assignment */
11
10
  import React, { Component } from 'react';
12
11
  import classNames from 'classnames';
13
12
  import { isValid } from '@douyinfe/semi-foundation/lib/es/form/utils';
@@ -1,4 +1,4 @@
1
- /* eslint-disable max-lines-per-function, react-hooks/rules-of-hooks, prefer-const, max-len */
1
+ /* eslint-disable react-hooks/rules-of-hooks */
2
2
  import React, { useState, useLayoutEffect, useEffect, useMemo, useRef, forwardRef } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/form/constants';
@@ -151,9 +151,7 @@ function withField(Component, opts) {
151
151
  const rootPromise = new Promise((resolve, reject) => {
152
152
  validator.validate(model, {
153
153
  first: stopValidateWithError
154
- },
155
- // eslint-disable-next-line @typescript-eslint/no-empty-function
156
- (errors, fields) => {}).then(res => {
154
+ }, (errors, fields) => {}).then(res => {
157
155
  if (validatePromise.current !== rootPromise) {
158
156
  return;
159
157
  }
@@ -172,7 +170,6 @@ function withField(Component, opts) {
172
170
  if (errors && fields) {
173
171
  let messages = errors.map(e => e.message);
174
172
  if (messages.length === 1) {
175
- // eslint-disable-next-line prefer-destructuring
176
173
  messages = messages[0];
177
174
  }
178
175
  updateError(messages, callOpts);
@@ -349,7 +346,6 @@ function withField(Component, opts) {
349
346
  useIsomorphicEffect(() => {
350
347
  // register
351
348
  if (typeof field === 'undefined') {
352
- // eslint-disable-next-line @typescript-eslint/no-empty-function
353
349
  return () => {};
354
350
  }
355
351
  // log('register: ' + field);
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Subtract } from 'utility-types';
3
3
  import type { RuleItem } from 'async-validator';
4
- import type { Options as scrollIntoViewOptions } from 'scroll-into-view-if-needed';
4
+ import type { Options as ScrollIntoViewOptions } from 'scroll-into-view-if-needed';
5
5
  import type { BaseFormApi as FormApi, FormState, WithFieldOption, AllErrors } from '@douyinfe/semi-foundation/lib/es/form/interface';
6
6
  import type { SelectProps } from '../select/index';
7
7
  import Option from '../select/option';
@@ -83,8 +83,8 @@ export interface FormFCChild<K extends Record<string, any> = any> {
83
83
  }
84
84
  export interface BaseFormProps<Values extends Record<string, any> = any> extends Omit<React.FormHTMLAttributes<HTMLFormElement>, 'children' | 'onChange' | 'onSubmit' | 'onReset'> {
85
85
  'aria-label'?: React.AriaAttributes['aria-label'];
86
- onSubmit?: (values: Values) => void;
87
- onSubmitFail?: (errors: Record<keyof Values, FieldError>, values: Partial<Values>) => void;
86
+ onSubmit?: (values: Values, e?: React.FormEvent<HTMLFormElement>) => void;
87
+ onSubmitFail?: (errors: Record<keyof Values, FieldError>, values: Partial<Values>, e?: React.FormEvent<HTMLFormElement>) => void;
88
88
  onReset?: () => void;
89
89
  onValueChange?: (values: Values, changedValue: Partial<Values>) => void;
90
90
  onChange?: (formState: FormState<Values>) => void;
@@ -106,7 +106,7 @@ export interface BaseFormProps<Values extends Record<string, any> = any> extends
106
106
  render?: (internalProps: FormFCChild) => React.ReactNode;
107
107
  component?: React.FC<any> | React.ComponentClass<any>;
108
108
  children?: React.ReactNode | ((internalProps: FormFCChild) => React.ReactNode);
109
- autoScrollToError?: boolean | scrollIntoViewOptions;
109
+ autoScrollToError?: boolean | ScrollIntoViewOptions;
110
110
  disabled?: boolean;
111
111
  showValidateIcon?: boolean;
112
112
  extraTextPosition?: 'middle' | 'bottom';
@@ -1,5 +1,3 @@
1
- /* eslint-disable one-var */
2
- /* eslint-disable react/prefer-stateless-function, max-len */
3
1
  import * as React from 'react';
4
2
  export class FormSelect extends React.Component {}
5
3
  export class Field extends React.Component {}
@@ -1,4 +1,3 @@
1
- /* eslint-disable prefer-template */
2
1
  import React, { PureComponent } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import PropTypes from 'prop-types';