@douyinfe/semi-ui 2.39.0 → 2.39.1

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 (207) hide show
  1. package/dist/umd/semi-ui.js +88 -419
  2. package/dist/umd/semi-ui.js.map +1 -1
  3. package/dist/umd/semi-ui.min.js +1 -1
  4. package/dist/umd/semi-ui.min.js.map +1 -1
  5. package/lib/cjs/_utils/index.js +0 -3
  6. package/lib/cjs/autoComplete/index.js +0 -2
  7. package/lib/cjs/autoComplete/option.js +0 -2
  8. package/lib/cjs/avatar/avatarGroup.js +0 -1
  9. package/lib/cjs/avatar/index.js +0 -1
  10. package/lib/cjs/backtop/index.js +0 -1
  11. package/lib/cjs/badge/index.js +0 -1
  12. package/lib/cjs/banner/index.js +0 -3
  13. package/lib/cjs/breadcrumb/index.js +0 -3
  14. package/lib/cjs/button/Button.js +8 -14
  15. package/lib/cjs/calendar/dayCalendar.js +4 -9
  16. package/lib/cjs/calendar/dayCol.js +1 -1
  17. package/lib/cjs/calendar/monthCalendar.js +5 -12
  18. package/lib/cjs/calendar/rangeCalendar.js +0 -2
  19. package/lib/cjs/carousel/index.js +0 -2
  20. package/lib/cjs/checkbox/checkbox.js +0 -2
  21. package/lib/cjs/checkbox/checkboxGroup.js +0 -3
  22. package/lib/cjs/checkbox/checkboxInner.js +0 -2
  23. package/lib/cjs/collapse/index.js +0 -1
  24. package/lib/cjs/datePicker/dateInput.js +0 -3
  25. package/lib/cjs/datePicker/datePicker.js +1 -3
  26. package/lib/cjs/datePicker/month.js +0 -4
  27. package/lib/cjs/datePicker/monthsGrid.js +1 -5
  28. package/lib/cjs/datePicker/yearAndMonth.js +0 -2
  29. package/lib/cjs/form/arrayField.js +0 -2
  30. package/lib/cjs/form/baseForm.js +0 -2
  31. package/lib/cjs/form/context.js +0 -2
  32. package/lib/cjs/form/errorMessage.js +0 -2
  33. package/lib/cjs/form/field.js +0 -2
  34. package/lib/cjs/form/group.js +0 -2
  35. package/lib/cjs/form/hoc/withField.js +2 -6
  36. package/lib/cjs/form/interface.js +0 -3
  37. package/lib/cjs/form/section.js +0 -2
  38. package/lib/cjs/form/slot.js +0 -3
  39. package/lib/cjs/iconButton/index.js +0 -2
  40. package/lib/cjs/image/image.js +25 -32
  41. package/lib/cjs/image/interface.d.ts +2 -1
  42. package/lib/cjs/image/previewInner.d.ts +2 -2
  43. package/lib/cjs/image/previewInner.js +0 -2
  44. package/lib/cjs/input/index.js +0 -2
  45. package/lib/cjs/input/inputGroup.js +0 -3
  46. package/lib/cjs/input/textarea.js +0 -2
  47. package/lib/cjs/inputNumber/index.js +1 -5
  48. package/lib/cjs/modal/ConfirmModal.js +0 -2
  49. package/lib/cjs/modal/Modal.js +0 -2
  50. package/lib/cjs/modal/ModalContent.js +0 -5
  51. package/lib/cjs/modal/confirm.js +0 -1
  52. package/lib/cjs/modal/useModal/HookModal.js +0 -1
  53. package/lib/cjs/modal/useModal/index.js +0 -2
  54. package/lib/cjs/navigation/Item.js +0 -3
  55. package/lib/cjs/navigation/SubNav.js +0 -3
  56. package/lib/cjs/navigation/index.js +0 -2
  57. package/lib/cjs/notification/notice.js +29 -35
  58. package/lib/cjs/notification/useNotification/index.js +1 -1
  59. package/lib/cjs/overflowList/index.js +0 -2
  60. package/lib/cjs/pagination/index.js +1 -1
  61. package/lib/cjs/popconfirm/index.js +0 -2
  62. package/lib/cjs/progress/index.js +0 -1
  63. package/lib/cjs/radio/radio.js +0 -2
  64. package/lib/cjs/rating/index.js +0 -1
  65. package/lib/cjs/resizeObserver/index.js +0 -1
  66. package/lib/cjs/scrollList/scrollItem.js +0 -3
  67. package/lib/cjs/select/index.js +0 -6
  68. package/lib/cjs/select/option.js +0 -2
  69. package/lib/cjs/select/utils.js +0 -2
  70. package/lib/cjs/sideSheet/index.js +0 -2
  71. package/lib/cjs/slider/index.js +0 -3
  72. package/lib/cjs/spin/icon.js +0 -2
  73. package/lib/cjs/switch/index.js +0 -2
  74. package/lib/cjs/table/Body/BaseRow.js +0 -2
  75. package/lib/cjs/table/Body/ExpandedRow.js +0 -3
  76. package/lib/cjs/table/Body/SectionRow.js +0 -3
  77. package/lib/cjs/table/Body/index.js +0 -8
  78. package/lib/cjs/table/ColGroup.js +0 -1
  79. package/lib/cjs/table/ColumnFilter.js +0 -3
  80. package/lib/cjs/table/ColumnSelection.js +0 -2
  81. package/lib/cjs/table/HeadTable.js +0 -2
  82. package/lib/cjs/table/ResizableTable.js +1 -4
  83. package/lib/cjs/table/Table.js +1 -10
  84. package/lib/cjs/table/TableCell.js +0 -4
  85. package/lib/cjs/table/TableHeader.js +0 -4
  86. package/lib/cjs/table/TableHeaderRow.js +0 -2
  87. package/lib/cjs/table/TablePagination.js +0 -2
  88. package/lib/cjs/table/table-context.js +0 -2
  89. package/lib/cjs/tabs/TabBar.js +0 -2
  90. package/lib/cjs/tag/index.js +1 -3
  91. package/lib/cjs/tagInput/index.js +0 -2
  92. package/lib/cjs/timePicker/Combobox.js +0 -4
  93. package/lib/cjs/timePicker/TimeInput.js +0 -2
  94. package/lib/cjs/timePicker/TimePicker.js +0 -2
  95. package/lib/cjs/toast/index.js +0 -2
  96. package/lib/cjs/toast/toast.js +0 -2
  97. package/lib/cjs/toast/useToast/index.js +0 -1
  98. package/lib/cjs/tooltip/index.js +0 -6
  99. package/lib/cjs/transfer/index.js +0 -3
  100. package/lib/cjs/tree/index.js +0 -3
  101. package/lib/cjs/tree/treeNode.js +0 -3
  102. package/lib/cjs/treeSelect/index.js +0 -7
  103. package/lib/cjs/trigger/index.js +0 -2
  104. package/lib/cjs/typography/util.js +1 -3
  105. package/lib/cjs/upload/index.js +0 -2
  106. package/lib/es/_utils/index.js +0 -2
  107. package/lib/es/autoComplete/index.js +0 -1
  108. package/lib/es/autoComplete/option.js +0 -1
  109. package/lib/es/avatar/avatarGroup.js +0 -1
  110. package/lib/es/avatar/index.js +0 -1
  111. package/lib/es/backtop/index.js +0 -1
  112. package/lib/es/badge/index.js +0 -1
  113. package/lib/es/banner/index.js +0 -2
  114. package/lib/es/breadcrumb/index.js +0 -2
  115. package/lib/es/button/Button.js +8 -13
  116. package/lib/es/calendar/dayCalendar.js +4 -9
  117. package/lib/es/calendar/dayCol.js +1 -1
  118. package/lib/es/calendar/monthCalendar.js +5 -11
  119. package/lib/es/calendar/rangeCalendar.js +0 -1
  120. package/lib/es/carousel/index.js +0 -1
  121. package/lib/es/checkbox/checkbox.js +0 -1
  122. package/lib/es/checkbox/checkboxGroup.js +0 -2
  123. package/lib/es/checkbox/checkboxInner.js +0 -1
  124. package/lib/es/collapse/index.js +0 -1
  125. package/lib/es/datePicker/dateInput.js +0 -3
  126. package/lib/es/datePicker/datePicker.js +0 -3
  127. package/lib/es/datePicker/month.js +0 -4
  128. package/lib/es/datePicker/monthsGrid.js +1 -5
  129. package/lib/es/datePicker/yearAndMonth.js +0 -1
  130. package/lib/es/form/arrayField.js +0 -1
  131. package/lib/es/form/baseForm.js +0 -1
  132. package/lib/es/form/context.js +0 -1
  133. package/lib/es/form/errorMessage.js +0 -1
  134. package/lib/es/form/field.js +0 -1
  135. package/lib/es/form/group.js +0 -1
  136. package/lib/es/form/hoc/withField.js +2 -6
  137. package/lib/es/form/interface.js +0 -2
  138. package/lib/es/form/section.js +0 -1
  139. package/lib/es/form/slot.js +0 -2
  140. package/lib/es/iconButton/index.js +0 -1
  141. package/lib/es/image/image.js +25 -32
  142. package/lib/es/image/interface.d.ts +2 -1
  143. package/lib/es/image/previewInner.d.ts +2 -2
  144. package/lib/es/image/previewInner.js +0 -1
  145. package/lib/es/input/index.js +0 -1
  146. package/lib/es/input/inputGroup.js +0 -2
  147. package/lib/es/input/textarea.js +0 -1
  148. package/lib/es/inputNumber/index.js +0 -5
  149. package/lib/es/modal/ConfirmModal.js +0 -2
  150. package/lib/es/modal/Modal.js +0 -1
  151. package/lib/es/modal/ModalContent.js +0 -3
  152. package/lib/es/modal/confirm.js +0 -1
  153. package/lib/es/modal/useModal/HookModal.js +0 -1
  154. package/lib/es/modal/useModal/index.js +0 -2
  155. package/lib/es/navigation/Item.js +0 -2
  156. package/lib/es/navigation/SubNav.js +0 -2
  157. package/lib/es/navigation/index.js +0 -1
  158. package/lib/es/notification/notice.js +29 -34
  159. package/lib/es/notification/useNotification/index.js +1 -1
  160. package/lib/es/overflowList/index.js +0 -1
  161. package/lib/es/pagination/index.js +0 -1
  162. package/lib/es/popconfirm/index.js +0 -1
  163. package/lib/es/progress/index.js +0 -1
  164. package/lib/es/radio/radio.js +0 -1
  165. package/lib/es/rating/index.js +0 -1
  166. package/lib/es/resizeObserver/index.js +0 -1
  167. package/lib/es/scrollList/scrollItem.js +0 -3
  168. package/lib/es/select/index.js +0 -6
  169. package/lib/es/select/option.js +0 -1
  170. package/lib/es/select/utils.js +0 -2
  171. package/lib/es/sideSheet/index.js +0 -1
  172. package/lib/es/slider/index.js +0 -3
  173. package/lib/es/spin/icon.js +0 -1
  174. package/lib/es/switch/index.js +0 -1
  175. package/lib/es/table/Body/BaseRow.js +0 -2
  176. package/lib/es/table/Body/ExpandedRow.js +0 -2
  177. package/lib/es/table/Body/SectionRow.js +0 -3
  178. package/lib/es/table/Body/index.js +0 -8
  179. package/lib/es/table/ColGroup.js +0 -1
  180. package/lib/es/table/ColumnFilter.js +0 -2
  181. package/lib/es/table/ColumnSelection.js +0 -1
  182. package/lib/es/table/HeadTable.js +0 -1
  183. package/lib/es/table/ResizableTable.js +0 -4
  184. package/lib/es/table/Table.js +0 -10
  185. package/lib/es/table/TableCell.js +0 -3
  186. package/lib/es/table/TableHeader.js +0 -3
  187. package/lib/es/table/TableHeaderRow.js +0 -1
  188. package/lib/es/table/TablePagination.js +0 -1
  189. package/lib/es/table/table-context.js +0 -1
  190. package/lib/es/tabs/TabBar.js +0 -2
  191. package/lib/es/tag/index.js +1 -2
  192. package/lib/es/tagInput/index.js +0 -2
  193. package/lib/es/timePicker/Combobox.js +0 -3
  194. package/lib/es/timePicker/TimeInput.js +0 -1
  195. package/lib/es/timePicker/TimePicker.js +0 -1
  196. package/lib/es/toast/index.js +0 -1
  197. package/lib/es/toast/toast.js +0 -1
  198. package/lib/es/toast/useToast/index.js +0 -1
  199. package/lib/es/tooltip/index.js +0 -5
  200. package/lib/es/transfer/index.js +0 -3
  201. package/lib/es/tree/index.js +0 -2
  202. package/lib/es/tree/treeNode.js +0 -3
  203. package/lib/es/treeSelect/index.js +0 -7
  204. package/lib/es/trigger/index.js +0 -2
  205. package/lib/es/typography/util.js +1 -3
  206. package/lib/es/upload/index.js +0 -1
  207. package/package.json +8 -8
@@ -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,
@@ -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() {
@@ -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, {
@@ -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';
@@ -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';
@@ -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';
@@ -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';
@@ -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,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';
@@ -9,7 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- /* eslint-disable max-lines-per-function, prefer-destructuring, prefer-const, @typescript-eslint/no-unused-vars */
13
12
  import React, { useContext } from 'react';
14
13
  import classNames from 'classnames';
15
14
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/form/constants';
@@ -30,7 +29,6 @@ const FormSlot = props => {
30
29
  labelAlign = formProps.labelAlign;
31
30
  labelPosition = formProps.labelPosition ? formProps.labelPosition : labelPosition;
32
31
  } catch (error) {}
33
- // eslint-disable-next-line react/destructuring-assignment
34
32
  props.labelPosition ? labelPosition = props.labelPosition : null;
35
33
  let {
36
34
  children,
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable eqeqeq */
11
10
  import React, { PureComponent } from 'react';
12
11
  import classNames from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -9,8 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- /* eslint-disable jsx-a11y/click-events-have-key-events */
13
- /* eslint-disable jsx-a11y/no-static-element-interactions */
14
12
  import React from "react";
15
13
  import BaseComponent from "../_base/baseComponent";
16
14
  import PropTypes from "prop-types";
@@ -174,36 +172,31 @@ export default class Image extends BaseComponent {
174
172
  const showPreviewCursor = preview && loadStatus === "success";
175
173
  const previewSrc = _isObject(preview) ? (_a = preview.src) !== null && _a !== void 0 ? _a : src : src;
176
174
  const previewProps = _isObject(preview) ? preview : {};
177
- return (
178
- /*#__PURE__*/
179
- // eslint-disable jsx-a11y/no-static-element-interactions
180
- // eslint-disable jsx-a11y/click-events-have-key-events
181
- React.createElement("div", {
182
- style: outerStyle,
183
- className: outerCls,
184
- onClick: this.handleClick
185
- }, /*#__PURE__*/React.createElement("img", Object.assign({
186
- ref: this.imgRef
187
- }, restProps, {
188
- src: this.isInGroup() && this.isLazyLoad() ? undefined : src,
189
- "data-src": src,
190
- alt: alt,
191
- className: cls(`${prefixCls}-img`, {
192
- [`${prefixCls}-img-preview`]: showPreviewCursor,
193
- [`${prefixCls}-img-error`]: loadStatus === "error"
194
- }),
195
- width: width,
196
- height: height,
197
- crossOrigin: crossOrigin,
198
- onError: this.handleError,
199
- onLoad: this.handleLoaded
200
- })), loadStatus !== "success" && this.renderExtra(), canPreview && /*#__PURE__*/React.createElement(PreviewInner, Object.assign({}, previewProps, {
201
- src: previewSrc,
202
- visible: previewVisible,
203
- onVisibleChange: this.handlePreviewVisibleChange,
204
- crossOrigin: !_isUndefined(crossOrigin) ? crossOrigin : previewProps === null || previewProps === void 0 ? void 0 : previewProps.crossOrigin
205
- })))
206
- );
175
+ return /*#__PURE__*/React.createElement("div", {
176
+ style: outerStyle,
177
+ className: outerCls,
178
+ onClick: this.handleClick
179
+ }, /*#__PURE__*/React.createElement("img", Object.assign({
180
+ ref: this.imgRef
181
+ }, restProps, {
182
+ src: this.isInGroup() && this.isLazyLoad() ? undefined : src,
183
+ "data-src": src,
184
+ alt: alt,
185
+ className: cls(`${prefixCls}-img`, {
186
+ [`${prefixCls}-img-preview`]: showPreviewCursor,
187
+ [`${prefixCls}-img-error`]: loadStatus === "error"
188
+ }),
189
+ width: width,
190
+ height: height,
191
+ crossOrigin: crossOrigin,
192
+ onError: this.handleError,
193
+ onLoad: this.handleLoaded
194
+ })), loadStatus !== "success" && this.renderExtra(), canPreview && /*#__PURE__*/React.createElement(PreviewInner, Object.assign({}, previewProps, {
195
+ src: previewSrc,
196
+ visible: previewVisible,
197
+ onVisibleChange: this.handlePreviewVisibleChange,
198
+ crossOrigin: !_isUndefined(crossOrigin) ? crossOrigin : previewProps === null || previewProps === void 0 ? void 0 : previewProps.crossOrigin
199
+ })));
207
200
  }
208
201
  }
209
202
  Image.isSemiImage = true;
@@ -1,6 +1,8 @@
1
1
  import { ReactNode } from "react";
2
2
  import { BaseProps } from "_base/baseComponent";
3
+ import { RatioType } from '@douyinfe/semi-foundation/lib/es/image/previewInnerFoundation';
3
4
  import React from "react";
5
+ export type { RatioType };
4
6
  export interface ImageStates {
5
7
  src: string;
6
8
  loadStatus: "loading" | "success" | "error";
@@ -84,7 +86,6 @@ export interface MenuProps {
84
86
  onRotateLeft?: () => void;
85
87
  onRotateRight?: () => void;
86
88
  }
87
- export type RatioType = "adaptation" | "realSize";
88
89
  export interface PreviewInnerStates {
89
90
  imgSrc?: string[];
90
91
  imgLoadStatus?: Map<string, boolean>;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import BaseComponent from "../_base/baseComponent";
3
3
  import { PreviewProps as PreviewInnerProps, PreviewInnerStates } from "./interface";
4
4
  import PropTypes from "prop-types";
5
- import PreviewInnerFoundation, { PreviewInnerAdapter } from '@douyinfe/semi-foundation/lib/es/image/previewInnerFoundation';
5
+ import PreviewInnerFoundation, { PreviewInnerAdapter, RatioType } from '@douyinfe/semi-foundation/lib/es/image/previewInnerFoundation';
6
6
  import { PreviewContextProps } from "./previewContext";
7
7
  export default class PreviewInner extends BaseComponent<PreviewInnerProps, PreviewInnerStates> {
8
8
  static contextType: React.Context<PreviewContextProps>;
@@ -77,7 +77,7 @@ export default class PreviewInner extends BaseComponent<PreviewInnerProps, Previ
77
77
  handleSwitchImage: (direction: string) => void;
78
78
  handleDownload: () => void;
79
79
  handlePreviewClose: () => void;
80
- handleAdjustRatio: (type: string) => void;
80
+ handleAdjustRatio: (type: RatioType) => void;
81
81
  handleRotateImage: (direction: any) => void;
82
82
  handleZoomImage: (newZoom: number) => void;
83
83
  handleMouseUp: (e: any) => void;
@@ -1,6 +1,5 @@
1
1
  import _isFunction from "lodash/isFunction";
2
2
  import _isEqual from "lodash/isEqual";
3
- /* eslint-disable jsx-a11y/no-static-element-interactions */
4
3
  import React from "react";
5
4
  import BaseComponent from "../_base/baseComponent";
6
5
  import PropTypes from "prop-types";
@@ -10,7 +10,6 @@ var __rest = this && this.__rest || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- /* eslint-disable no-unused-vars, max-len, @typescript-eslint/no-unused-vars */
14
13
  import React from 'react';
15
14
  import cls from 'classnames';
16
15
  import PropTypes from 'prop-types';
@@ -8,7 +8,6 @@ var __rest = this && this.__rest || function (s, e) {
8
8
  }
9
9
  return t;
10
10
  };
11
- /* eslint-disable max-len */
12
11
  import React from 'react';
13
12
  import cls from 'classnames';
14
13
  import PropTypes from 'prop-types';
@@ -20,7 +19,6 @@ const prefixCls = cssClasses.PREFIX;
20
19
  const sizeSet = strings.SIZE;
21
20
  export default class inputGroup extends BaseComponent {
22
21
  renderGroupWithLabel(inner) {
23
- // eslint-disable-next-line no-unused-vars
24
22
  const _a = this.props,
25
23
  {
26
24
  size,
@@ -9,7 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- /* eslint-disable no-unused-vars */
13
12
  import React from 'react';
14
13
  import cls from 'classnames';
15
14
  import PropTypes from 'prop-types';
@@ -10,11 +10,6 @@ var __rest = this && this.__rest || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  /* eslint-disable jsx-a11y/no-static-element-interactions */
13
- /* eslint-disable @typescript-eslint/no-unused-vars */
14
- /* eslint-disable no-unused-vars */
15
- /* eslint-disable max-depth */
16
- /* eslint-disable react/no-did-update-set-state */
17
- /* eslint-disable max-len */
18
13
  import React from 'react';
19
14
  import PropTypes from 'prop-types';
20
15
  import classnames from 'classnames';
@@ -6,8 +6,6 @@ var __rest = this && this.__rest || function (s, e) {
6
6
  }
7
7
  return t;
8
8
  };
9
- /* eslint-disable react/destructuring-assignment */
10
- /* eslint-disable eqeqeq */
11
9
  import React, { useState, useCallback } from 'react';
12
10
  import cls from 'classnames';
13
11
  import { cssClasses } from '@douyinfe/semi-foundation/lib/es/modal/constants';
@@ -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, prefer-const, @typescript-eslint/no-unused-vars */
11
10
  import React from 'react';
12
11
  import { cssClasses, strings } from '@douyinfe/semi-foundation/lib/es/modal/constants';
13
12
  import Button from '../button';
@@ -9,7 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- /* eslint-disable eqeqeq */
13
12
  import React from 'react';
14
13
  import PropTypes from 'prop-types';
15
14
  import cls from 'classnames';
@@ -18,7 +17,6 @@ import ConfigContext from '../configProvider/context';
18
17
  import Button from '../iconButton';
19
18
  import Typography from '../typography';
20
19
  import BaseComponent from '../_base/baseComponent';
21
- // eslint-disable-next-line max-len
22
20
  import ModalContentFoundation from '@douyinfe/semi-foundation/lib/es/modal/modalContentFoundation';
23
21
  import { IconClose } from '@douyinfe/semi-icons';
24
22
  import FocusTrapHandle from '@douyinfe/semi-foundation/lib/es/utils/FocusHandle';
@@ -308,7 +306,6 @@ export default class ModalContent extends BaseComponent {
308
306
  onClick: maskClosable ? this.onMaskClick : null,
309
307
  onMouseUp: maskClosable ? this.onMaskMouseUp : null
310
308
  }, this.props.contentExtraProps), this.getDialogElement()));
311
- // eslint-disable-next-line max-len
312
309
  return containerContext && containerContext.Provider ? /*#__PURE__*/React.createElement(containerContext.Provider, {
313
310
  value: containerContext.value
314
311
  }, elem) : elem;
@@ -17,7 +17,6 @@ export default function confirm(props) {
17
17
  }
18
18
  for (let i = 0; i < destroyFns.length; i++) {
19
19
  const fn = destroyFns[i];
20
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
21
20
  if (fn === close) {
22
21
  destroyFns.splice(i, 1);
23
22
  break;
@@ -8,7 +8,6 @@ var __rest = this && this.__rest || function (s, e) {
8
8
  };
9
9
  import React from 'react';
10
10
  import ConfirmModal from '../ConfirmModal';
11
- // eslint-disable-next-line max-len
12
11
  const HookModal = (_a, ref) => {
13
12
  var {
14
13
  afterClose,
@@ -14,12 +14,10 @@ function usePatchElement() {
14
14
  }
15
15
  export default function useModal() {
16
16
  const [elements, patchElement] = usePatchElement();
17
- // eslint-disable-next-line max-len
18
17
  function getConfirmFunc(withFunc) {
19
18
  return function hookConfirm(config) {
20
19
  uuid += 1;
21
20
  const modalRef = /*#__PURE__*/React.createRef();
22
- // eslint-disable-next-line prefer-const
23
21
  let closeFunc;
24
22
  const modal = /*#__PURE__*/React.createElement(HookModal, {
25
23
  key: `semi-modal-${uuid}`,
@@ -1,7 +1,5 @@
1
1
  import _times from "lodash/times";
2
2
  import _noop from "lodash/noop";
3
- /* eslint-disable max-len */
4
- /* eslint-disable no-nested-ternary */
5
3
  import BaseComponent from '../_base/baseComponent';
6
4
  import React from 'react';
7
5
  import PropTypes from 'prop-types';
@@ -1,7 +1,5 @@
1
1
  import _get from "lodash/get";
2
2
  import _times from "lodash/times";
3
- /* eslint-disable max-len */
4
- /* eslint-disable no-nested-ternary */
5
3
  import BaseComponent from '../_base/baseComponent';
6
4
  import React from 'react';
7
5
  import PropTypes from 'prop-types';
@@ -9,7 +9,6 @@ var __rest = this && this.__rest || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- /* eslint-disable max-lines-per-function */
13
12
  import BaseComponent from '../_base/baseComponent';
14
13
  import React, { Children } from 'react';
15
14
  import PropTypes from 'prop-types';
@@ -7,7 +7,6 @@ var __rest = this && this.__rest || function (s, e) {
7
7
  }
8
8
  return t;
9
9
  };
10
- /* eslint-disable no-unreachable */
11
10
  import React from 'react';
12
11
  import cls from 'classnames';
13
12
  import PropTypes from 'prop-types';
@@ -128,39 +127,35 @@ class Notice extends BaseComponent {
128
127
  [`${prefixCls}-rtl`]: direction === 'rtl'
129
128
  });
130
129
  const titleID = getUuidShort({});
131
- return (
132
- /*#__PURE__*/
133
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
134
- React.createElement("div", {
135
- className: wrapper,
136
- style: style,
137
- onMouseEnter: this.clearCloseTimer,
138
- onMouseLeave: this.startCloseTimer,
139
- onClick: this.notifyClick,
140
- "aria-labelledby": titleID,
141
- role: 'alert',
142
- onAnimationEnd: this.props.onAnimationEnd,
143
- onAnimationStart: this.props.onAnimationStart
144
- }, /*#__PURE__*/React.createElement("div", null, this.renderTypeIcon()), /*#__PURE__*/React.createElement("div", {
145
- className: `${prefixCls}-inner`
146
- }, /*#__PURE__*/React.createElement("div", {
147
- className: `${prefixCls}-content-wrapper`
148
- }, title ? /*#__PURE__*/React.createElement("div", {
149
- id: titleID,
150
- className: `${prefixCls}-title`,
151
- "x-semi-prop": "title"
152
- }, title) : '', content ? /*#__PURE__*/React.createElement("div", {
153
- className: `${prefixCls}-content`,
154
- "x-semi-prop": "content"
155
- }, content) : ''), showClose && /*#__PURE__*/React.createElement(Button, {
156
- className: `${prefixCls}-icon-close`,
157
- type: "tertiary",
158
- icon: /*#__PURE__*/React.createElement(IconClose, null),
159
- theme: "borderless",
160
- size: "small",
161
- onClick: this.close
162
- })))
163
- );
130
+ return /*#__PURE__*/React.createElement("div", {
131
+ className: wrapper,
132
+ style: style,
133
+ onMouseEnter: this.clearCloseTimer,
134
+ onMouseLeave: this.startCloseTimer,
135
+ onClick: this.notifyClick,
136
+ "aria-labelledby": titleID,
137
+ role: 'alert',
138
+ onAnimationEnd: this.props.onAnimationEnd,
139
+ onAnimationStart: this.props.onAnimationStart
140
+ }, /*#__PURE__*/React.createElement("div", null, this.renderTypeIcon()), /*#__PURE__*/React.createElement("div", {
141
+ className: `${prefixCls}-inner`
142
+ }, /*#__PURE__*/React.createElement("div", {
143
+ className: `${prefixCls}-content-wrapper`
144
+ }, title ? /*#__PURE__*/React.createElement("div", {
145
+ id: titleID,
146
+ className: `${prefixCls}-title`,
147
+ "x-semi-prop": "title"
148
+ }, title) : '', content ? /*#__PURE__*/React.createElement("div", {
149
+ className: `${prefixCls}-content`,
150
+ "x-semi-prop": "content"
151
+ }, content) : ''), showClose && /*#__PURE__*/React.createElement(Button, {
152
+ className: `${prefixCls}-icon-close`,
153
+ type: "tertiary",
154
+ icon: /*#__PURE__*/React.createElement(IconClose, null),
155
+ theme: "borderless",
156
+ size: "small",
157
+ onClick: this.close
158
+ })));
164
159
  }
165
160
  }
166
161
  Notice.contextType = ConfigContext;
@@ -52,6 +52,7 @@ function usePatchElement() {
52
52
  const pos = obj[0];
53
53
  const notices = obj[1];
54
54
  // @ts-ignore
55
+ // eslint-disable-next-line react/no-unknown-property
55
56
  return Array.isArray(notices) && notices.length ? /*#__PURE__*/React.createElement("div", {
56
57
  key: pos,
57
58
  className: cls(cssClasses.LIST),
@@ -69,7 +70,6 @@ export default function useNotification() {
69
70
  const mergeConfig = Object.assign(Object.assign({}, config), {
70
71
  id
71
72
  });
72
- // eslint-disable-next-line prefer-const
73
73
  let closeFunc;
74
74
  const ref = ele => {
75
75
  noticeRef.set(id, ele);
@@ -1,7 +1,6 @@
1
1
  import _get from "lodash/get";
2
2
  import _isFunction from "lodash/isFunction";
3
3
  import _isEqual from "lodash/isEqual";
4
- /* eslint-disable arrow-body-style */
5
4
  import React from 'react';
6
5
  import cls from 'classnames';
7
6
  import BaseComponent from '../_base/baseComponent';
@@ -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
  /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
12
11
  import React from 'react';
13
12
  import classNames from 'classnames';
@@ -10,7 +10,6 @@ var __rest = this && this.__rest || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- /* eslint-disable max-len */
14
13
  import React from 'react';
15
14
  import cls from 'classnames';
16
15
  import PropTypes from 'prop-types';