@douyinfe/semi-foundation 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 (225) hide show
  1. package/anchor/foundation.ts +0 -2
  2. package/anchor/linkFoundation.ts +0 -1
  3. package/autoComplete/foundation.ts +0 -1
  4. package/autoComplete/optionFoundation.ts +0 -2
  5. package/avatar/constants.ts +21 -4
  6. package/avatar/foundation.ts +3 -3
  7. package/base/foundation.ts +0 -1
  8. package/breadcrumb/foundation.ts +0 -1
  9. package/button/button.scss +0 -1
  10. package/calendar/eventUtil.ts +0 -2
  11. package/calendar/foundation.ts +0 -1
  12. package/cascader/foundation.ts +0 -5
  13. package/checkbox/checkbox.scss +0 -1
  14. package/checkbox/checkboxFoundation.ts +1 -2
  15. package/checkbox/checkboxGroupFoundation.ts +0 -1
  16. package/datePicker/foundation.ts +1 -4
  17. package/datePicker/inputFoundation.ts +0 -3
  18. package/datePicker/monthFoundation.ts +0 -1
  19. package/datePicker/monthsGridFoundation.ts +0 -2
  20. package/datePicker/yearAndMonthFoundation.ts +0 -2
  21. package/form/foundation.ts +12 -10
  22. package/form/interface.ts +4 -5
  23. package/form/utils.ts +0 -3
  24. package/image/image.scss +8 -4
  25. package/image/previewImageFoundation.ts +1 -1
  26. package/image/previewInnerFoundation.ts +11 -7
  27. package/image/variables.scss +1 -1
  28. package/input/foundation.ts +0 -2
  29. package/input/textareaFoundation.ts +0 -2
  30. package/inputNumber/foundation.ts +0 -5
  31. package/lib/cjs/anchor/foundation.js +0 -2
  32. package/lib/cjs/anchor/linkFoundation.js +0 -1
  33. package/lib/cjs/autoComplete/foundation.js +0 -2
  34. package/lib/cjs/autoComplete/optionFoundation.js +0 -2
  35. package/lib/cjs/avatar/constants.js +0 -1
  36. package/lib/cjs/avatar/foundation.js +2 -2
  37. package/lib/cjs/breadcrumb/foundation.js +0 -2
  38. package/lib/cjs/button/button.css +0 -1
  39. package/lib/cjs/button/button.scss +0 -1
  40. package/lib/cjs/calendar/eventUtil.js +0 -2
  41. package/lib/cjs/calendar/foundation.js +0 -1
  42. package/lib/cjs/cascader/foundation.js +0 -5
  43. package/lib/cjs/checkbox/checkbox.css +0 -1
  44. package/lib/cjs/checkbox/checkbox.scss +0 -1
  45. package/lib/cjs/checkbox/checkboxFoundation.js +0 -1
  46. package/lib/cjs/checkbox/checkboxGroupFoundation.js +0 -1
  47. package/lib/cjs/datePicker/foundation.js +0 -5
  48. package/lib/cjs/datePicker/inputFoundation.js +0 -4
  49. package/lib/cjs/datePicker/monthFoundation.js +0 -1
  50. package/lib/cjs/datePicker/monthsGridFoundation.js +0 -3
  51. package/lib/cjs/datePicker/yearAndMonthFoundation.js +0 -2
  52. package/lib/cjs/form/foundation.d.ts +4 -4
  53. package/lib/cjs/form/foundation.js +9 -8
  54. package/lib/cjs/form/interface.d.ts +4 -4
  55. package/lib/cjs/form/utils.js +0 -3
  56. package/lib/cjs/image/image.css +3 -1
  57. package/lib/cjs/image/image.scss +8 -4
  58. package/lib/cjs/image/previewInnerFoundation.d.ts +4 -2
  59. package/lib/cjs/image/previewInnerFoundation.js +2 -1
  60. package/lib/cjs/image/variables.scss +1 -1
  61. package/lib/cjs/input/foundation.js +0 -2
  62. package/lib/cjs/input/textareaFoundation.js +0 -2
  63. package/lib/cjs/inputNumber/foundation.js +0 -6
  64. package/lib/cjs/navigation/NavItem.js +0 -2
  65. package/lib/cjs/navigation/foundation.js +1 -4
  66. package/lib/cjs/navigation/itemFoundation.js +0 -1
  67. package/lib/cjs/navigation/subNavFoundation.js +1 -2
  68. package/lib/cjs/notification/notificationListFoundation.js +0 -2
  69. package/lib/cjs/pagination/foundation.d.ts +2 -0
  70. package/lib/cjs/pagination/foundation.js +16 -4
  71. package/lib/cjs/popconfirm/popconfirmFoundation.js +0 -2
  72. package/lib/cjs/radio/radio.css +1 -0
  73. package/lib/cjs/radio/radio.scss +1 -0
  74. package/lib/cjs/radio/radioGroupFoundation.js +0 -1
  75. package/lib/cjs/radio/radioInnerFoundation.js +0 -1
  76. package/lib/cjs/radio/variables.scss +1 -0
  77. package/lib/cjs/rating/foundation.js +0 -2
  78. package/lib/cjs/select/foundation.js +0 -5
  79. package/lib/cjs/select/optionFoundation.js +0 -2
  80. package/lib/cjs/select/select.css +0 -35
  81. package/lib/cjs/select/select.scss +11 -63
  82. package/lib/cjs/select/variables.scss +0 -10
  83. package/lib/cjs/skeleton/skeleton.css +2 -2
  84. package/lib/cjs/skeleton/variables.scss +2 -2
  85. package/lib/cjs/slider/foundation.js +0 -8
  86. package/lib/cjs/switch/foundation.js +0 -1
  87. package/lib/cjs/table/bodyFoundation.js +0 -1
  88. package/lib/cjs/table/constants.js +0 -2
  89. package/lib/cjs/table/foundation.js +0 -9
  90. package/lib/cjs/table/tableRowFoundation.js +0 -1
  91. package/lib/cjs/table/utils.js +0 -4
  92. package/lib/cjs/tag/constants.js +0 -2
  93. package/lib/cjs/tagInput/foundation.js +0 -2
  94. package/lib/cjs/timePicker/foundation.js +6 -8
  95. package/lib/cjs/timePicker/inputFoundation.js +0 -2
  96. package/lib/cjs/timePicker/utils/index.js +2 -2
  97. package/lib/cjs/tooltip/foundation.js +0 -11
  98. package/lib/cjs/transfer/foundation.js +0 -1
  99. package/lib/cjs/tree/foundation.js +0 -1
  100. package/lib/cjs/tree/treeUtil.js +0 -9
  101. package/lib/cjs/treeSelect/foundation.js +0 -1
  102. package/lib/cjs/upload/foundation.js +3 -1
  103. package/lib/cjs/utils/Event.js +0 -1
  104. package/lib/cjs/utils/date-fns-extra.js +0 -3
  105. package/lib/cjs/utils/function.js +0 -1
  106. package/lib/cjs/utils/object.js +0 -4
  107. package/lib/es/anchor/foundation.js +0 -2
  108. package/lib/es/anchor/linkFoundation.js +0 -1
  109. package/lib/es/autoComplete/foundation.js +0 -1
  110. package/lib/es/autoComplete/optionFoundation.js +0 -2
  111. package/lib/es/avatar/constants.js +0 -1
  112. package/lib/es/avatar/foundation.js +2 -2
  113. package/lib/es/breadcrumb/foundation.js +0 -1
  114. package/lib/es/button/button.css +0 -1
  115. package/lib/es/button/button.scss +0 -1
  116. package/lib/es/calendar/eventUtil.js +0 -2
  117. package/lib/es/calendar/foundation.js +0 -1
  118. package/lib/es/cascader/foundation.js +0 -5
  119. package/lib/es/checkbox/checkbox.css +0 -1
  120. package/lib/es/checkbox/checkbox.scss +0 -1
  121. package/lib/es/checkbox/checkboxFoundation.js +0 -1
  122. package/lib/es/checkbox/checkboxGroupFoundation.js +0 -1
  123. package/lib/es/datePicker/foundation.js +0 -4
  124. package/lib/es/datePicker/inputFoundation.js +0 -3
  125. package/lib/es/datePicker/monthFoundation.js +0 -1
  126. package/lib/es/datePicker/monthsGridFoundation.js +0 -2
  127. package/lib/es/datePicker/yearAndMonthFoundation.js +0 -2
  128. package/lib/es/form/foundation.d.ts +4 -4
  129. package/lib/es/form/foundation.js +9 -7
  130. package/lib/es/form/interface.d.ts +4 -4
  131. package/lib/es/form/utils.js +0 -3
  132. package/lib/es/image/image.css +3 -1
  133. package/lib/es/image/image.scss +8 -4
  134. package/lib/es/image/previewInnerFoundation.d.ts +4 -2
  135. package/lib/es/image/previewInnerFoundation.js +2 -1
  136. package/lib/es/image/variables.scss +1 -1
  137. package/lib/es/input/foundation.js +0 -2
  138. package/lib/es/input/textareaFoundation.js +0 -2
  139. package/lib/es/inputNumber/foundation.js +0 -5
  140. package/lib/es/navigation/NavItem.js +0 -2
  141. package/lib/es/navigation/foundation.js +1 -3
  142. package/lib/es/navigation/itemFoundation.js +0 -1
  143. package/lib/es/navigation/subNavFoundation.js +1 -2
  144. package/lib/es/notification/notificationListFoundation.js +0 -1
  145. package/lib/es/pagination/foundation.d.ts +2 -0
  146. package/lib/es/pagination/foundation.js +16 -3
  147. package/lib/es/popconfirm/popconfirmFoundation.js +0 -1
  148. package/lib/es/radio/radio.css +1 -0
  149. package/lib/es/radio/radio.scss +1 -0
  150. package/lib/es/radio/radioGroupFoundation.js +0 -1
  151. package/lib/es/radio/radioInnerFoundation.js +0 -1
  152. package/lib/es/radio/variables.scss +1 -0
  153. package/lib/es/rating/foundation.js +0 -1
  154. package/lib/es/select/foundation.js +0 -5
  155. package/lib/es/select/optionFoundation.js +0 -2
  156. package/lib/es/select/select.css +0 -35
  157. package/lib/es/select/select.scss +11 -63
  158. package/lib/es/select/variables.scss +0 -10
  159. package/lib/es/skeleton/skeleton.css +2 -2
  160. package/lib/es/skeleton/variables.scss +2 -2
  161. package/lib/es/slider/foundation.js +0 -7
  162. package/lib/es/switch/foundation.js +0 -1
  163. package/lib/es/table/bodyFoundation.js +0 -1
  164. package/lib/es/table/constants.js +0 -1
  165. package/lib/es/table/foundation.js +0 -8
  166. package/lib/es/table/tableRowFoundation.js +0 -1
  167. package/lib/es/table/utils.js +0 -3
  168. package/lib/es/tag/constants.js +0 -1
  169. package/lib/es/tagInput/foundation.js +0 -2
  170. package/lib/es/timePicker/foundation.js +6 -7
  171. package/lib/es/timePicker/inputFoundation.js +0 -2
  172. package/lib/es/timePicker/utils/index.js +2 -1
  173. package/lib/es/tooltip/foundation.js +0 -10
  174. package/lib/es/transfer/foundation.js +0 -1
  175. package/lib/es/tree/foundation.js +0 -1
  176. package/lib/es/tree/treeUtil.js +0 -9
  177. package/lib/es/treeSelect/foundation.js +0 -1
  178. package/lib/es/upload/foundation.js +3 -1
  179. package/lib/es/utils/Event.js +0 -1
  180. package/lib/es/utils/date-fns-extra.js +0 -2
  181. package/lib/es/utils/function.js +0 -1
  182. package/lib/es/utils/object.js +0 -3
  183. package/modal/modalFoundation.ts +3 -4
  184. package/navigation/NavItem.ts +0 -2
  185. package/navigation/foundation.ts +1 -3
  186. package/navigation/itemFoundation.ts +0 -1
  187. package/navigation/subNavFoundation.ts +1 -2
  188. package/notification/notificationListFoundation.ts +0 -2
  189. package/package.json +3 -3
  190. package/pagination/foundation.ts +13 -3
  191. package/popconfirm/popconfirmFoundation.ts +0 -1
  192. package/radio/radio.scss +1 -0
  193. package/radio/radioGroupFoundation.ts +0 -1
  194. package/radio/radioInnerFoundation.ts +0 -1
  195. package/radio/variables.scss +1 -0
  196. package/rating/foundation.ts +0 -1
  197. package/select/foundation.ts +0 -5
  198. package/select/optionFoundation.ts +0 -2
  199. package/select/select.scss +11 -63
  200. package/select/variables.scss +0 -10
  201. package/skeleton/variables.scss +2 -2
  202. package/slider/foundation.ts +0 -7
  203. package/switch/foundation.ts +0 -1
  204. package/table/bodyFoundation.ts +0 -1
  205. package/table/constants.ts +0 -1
  206. package/table/foundation.ts +0 -8
  207. package/table/tableRowFoundation.ts +0 -1
  208. package/table/utils.ts +0 -3
  209. package/tag/constants.ts +19 -2
  210. package/tagInput/foundation.ts +0 -2
  211. package/timePicker/foundation.ts +7 -8
  212. package/timePicker/inputFoundation.ts +0 -2
  213. package/timePicker/utils/index.ts +2 -1
  214. package/toast/toastFoundation.ts +1 -4
  215. package/toast/toastListFoundation.ts +0 -1
  216. package/tooltip/foundation.ts +0 -10
  217. package/transfer/foundation.ts +0 -1
  218. package/tree/foundation.ts +0 -1
  219. package/tree/treeUtil.ts +1 -10
  220. package/treeSelect/foundation.ts +0 -1
  221. package/upload/foundation.ts +3 -1
  222. package/utils/Event.ts +0 -1
  223. package/utils/date-fns-extra.ts +0 -2
  224. package/utils/function.ts +0 -1
  225. package/utils/object.ts +0 -3
@@ -5,6 +5,7 @@ export interface PaginationAdapter<P = Record<string, any>, S = Record<string, a
5
5
  updateTotal: (total: number) => void;
6
6
  updatePageSize: (pageSize: number) => void;
7
7
  updateQuickJumpPage: (quickJumpPage: string | number) => void;
8
+ updateAllPageNumbers: (allPageNumbers: number[]) => void;
8
9
  setCurrentPage: (pageIndex: number) => void;
9
10
  registerKeyDownHandler: (handler: KeyDownHandler) => void;
10
11
  unregisterKeyDownHandler: (handler: KeyDownHandler) => void;
@@ -33,6 +34,7 @@ declare class PaginationFoundation<P = Record<string, any>, S = Record<string, a
33
34
  }): void;
34
35
  goPage(targetPageIndex: number | '...'): void;
35
36
  updatePage(targetPageIndex?: number, total?: number, pageSize?: number): void;
37
+ updateAllPageNumbers(total: number, pageSize: number): void;
36
38
  goPrev(): void;
37
39
  goNext(): void;
38
40
  _updatePageList(pageListInfo: {
@@ -1,5 +1,3 @@
1
- /* eslint-disable max-len */
2
- /* eslint-disable no-param-reassign */
3
1
  import BaseFoundation from '../base/foundation';
4
2
  import { numbers } from './constants';
5
3
  class PaginationFoundation extends BaseFoundation {
@@ -98,6 +96,22 @@ class PaginationFoundation extends BaseFoundation {
98
96
  this._adapter.setCurrentPage(targetPageIndex);
99
97
  this._adapter.updatePageSize(pageSize);
100
98
  }
99
+ updateAllPageNumbers(total, pageSize) {
100
+ // only need to update in small size
101
+ const {
102
+ size,
103
+ hoverShowPageSelect,
104
+ disabled
105
+ } = this.getProps();
106
+ if (size !== 'small' || !hoverShowPageSelect || disabled) {
107
+ return;
108
+ } else {
109
+ const pageNumbers = Array.from({
110
+ length: Math.ceil(total / pageSize)
111
+ }, (v, i) => i + 1);
112
+ this._adapter.updateAllPageNumbers(pageNumbers);
113
+ }
114
+ }
101
115
  goPrev() {
102
116
  const {
103
117
  currentPage
@@ -227,7 +241,6 @@ class PaginationFoundation extends BaseFoundation {
227
241
  this._adapter.notifyChange(newCurrentPage, newPageSize);
228
242
  }
229
243
  // TODO handle tab/enter events
230
- // eslint-disable-next-line @typescript-eslint/no-empty-function
231
244
  handleKeyDown() {}
232
245
  // If pageSize is not in the Opts array, insert it
233
246
  pageSizeInOpts() {
@@ -1,5 +1,4 @@
1
1
  import _get from "lodash/get";
2
- /* eslint-disable @typescript-eslint/no-empty-function */
3
2
  import BaseFoundation from '../base/foundation';
4
3
  import isPromise from '../utils/isPromise';
5
4
  export default class PopConfirmFoundation extends BaseFoundation {
@@ -175,6 +175,7 @@
175
175
  .semi-radio-content {
176
176
  display: flex;
177
177
  flex-direction: column;
178
+ row-gap: 4px;
178
179
  }
179
180
  .semi-radio:hover .semi-radio-inner-display {
180
181
  background: var(--semi-color-fill-0);
@@ -241,6 +241,7 @@ $inner-width: $width-icon-medium;
241
241
  &-content {
242
242
  display: flex;
243
243
  flex-direction: column;
244
+ row-gap: $spacing-radio_content-rowGap;
244
245
  }
245
246
 
246
247
  &:hover {
@@ -54,6 +54,5 @@ export default class RadioGroupFoundation extends BaseFoundation {
54
54
  _setValue(value) {
55
55
  this._adapter.setValue(value);
56
56
  }
57
- // eslint-disable-next-line @typescript-eslint/no-empty-function
58
57
  destroy() {}
59
58
  }
@@ -39,6 +39,5 @@ export default class RadioInnerFoundation extends BaseFoundation {
39
39
  this._adapter.notifyChange(cbValue);
40
40
  }
41
41
  }
42
- // eslint-disable-next-line @typescript-eslint/no-empty-function
43
42
  destroy() {}
44
43
  }
@@ -77,6 +77,7 @@ $spacing-radio_addon_buttonRadio_middle-paddingX: $spacing-base; // 中尺寸按
77
77
  $spacing-radio_addon_buttonRadio_middle-paddingY: $spacing-extra-tight; // 中尺寸按钮式单选按钮垂直内边距
78
78
  $spacing-radio_addon_buttonRadio_marginLeft: $spacing-none; // 按钮式单选按钮左侧外边距
79
79
  $spacing-radio_extra-paddingLeft: $width-radio_inner + $spacing-tight; // 单选副标题左侧内边距
80
+ $spacing-radio_content-rowGap: 4px; // 内容行间距
80
81
 
81
82
  $spacing-radio_group_vertical-marginBottom: $spacing-base-tight; // 垂直布局单选框组底部外边距
82
83
  $spacing-radio_card_group_vertical-marginBottom: $spacing-base; // 垂直布局卡片式单选框组底部外边距
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-param-reassign */
2
1
  import BaseFoundation from '../base/foundation';
3
2
  import warning from '../utils/warning';
4
3
  export default class RatingFoundation extends BaseFoundation {
@@ -10,8 +10,6 @@ var __rest = this && this.__rest || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- /* argus-disable unPkgSensitiveInfo */
14
- /* eslint-disable max-len */
15
13
  import BaseFoundation from '../base/foundation';
16
14
  import KeyCode, { ENTER_KEY } from '../utils/keyCode';
17
15
  import warning from '../utils/warning';
@@ -22,7 +20,6 @@ export default class SelectFoundation extends BaseFoundation {
22
20
  constructor(adapter) {
23
21
  super(Object.assign({}, adapter));
24
22
  // keyboard event listner
25
- // eslint-disable-next-line @typescript-eslint/member-ordering
26
23
  this._keydownHandler = null;
27
24
  }
28
25
  init() {
@@ -891,7 +888,6 @@ export default class SelectFoundation extends BaseFoundation {
891
888
  index = index - 1;
892
889
  targetLabel = keys[index];
893
890
  targetItem = selections.get(targetLabel);
894
- // eslint-disable-next-line
895
891
  if (index == 0 && targetItem.disabled) {
896
892
  isAllDisabled = true;
897
893
  }
@@ -931,7 +927,6 @@ export default class SelectFoundation extends BaseFoundation {
931
927
  }
932
928
  }
933
929
  _removeInternalKey(option) {
934
- // eslint-disable-next-line
935
930
  let newOption = Object.assign({}, option);
936
931
  delete newOption._parentGroup;
937
932
  delete newOption._show;
@@ -3,9 +3,7 @@ export default class OptionFoundation extends BaseFoundation {
3
3
  constructor(adapter) {
4
4
  super(Object.assign({}, adapter));
5
5
  }
6
- // eslint-disable-next-line @typescript-eslint/no-empty-function
7
6
  init() {}
8
- // eslint-disable-next-line @typescript-eslint/no-empty-function
9
7
  destroy() {}
10
8
  onOptionClick(option) {
11
9
  const isDisabled = this._isDisabled();
@@ -445,44 +445,9 @@
445
445
  .semi-select-borderless:not(:focus-within):not(:hover) .semi-select-arrow {
446
446
  opacity: 0;
447
447
  }
448
- .semi-select-borderless:not(:focus-within):not(:hover).semi-select-borderless-arrow .semi-select-arrow {
449
- opacity: 1;
450
- }
451
- .semi-select-borderless:hover {
452
- background-color: var(--semi-color-fill-1);
453
- border: 1px solid transparent;
454
- }
455
- .semi-select-borderless:focus {
456
- border: 1px solid var(--semi-color-focus-border);
457
- background-color: var(--semi-color-fill-0);
458
- outline: 0;
459
- }
460
- .semi-select-borderless:active {
461
- background-color: var(--semi-color-fill-2);
462
- }
463
448
  .semi-select-borderless:focus-within:not(:active) {
464
449
  background-color: transparent;
465
450
  }
466
- .semi-select-borderless.semi-select-disabled {
467
- background-color: var(--semi-color-disabled-fill);
468
- }
469
- .semi-select-borderless.semi-select-disabled:hover {
470
- background-color: var(--semi-color-disabled-fill);
471
- }
472
- .semi-select-borderless.semi-select-disabled .semi-select-selection,
473
- .semi-select-borderless.semi-select-disabled .semi-select-selection-placeholder {
474
- color: var(--semi-color-disabled-text);
475
- }
476
- .semi-select-borderless.semi-select-disabled .semi-select-prefix,
477
- .semi-select-borderless.semi-select-disabled .semi-select-suffix {
478
- color: var(--semi-color-disabled-text);
479
- }
480
- .semi-select-borderless.semi-select-disabled .semi-select-arrow {
481
- color: var(--semi-color-disabled-text);
482
- }
483
- .semi-select-borderless.semi-select-disabled .semi-tag {
484
- color: var(--semi-color-disabled-text);
485
- }
486
451
  .semi-select-borderless.semi-select-error:not(:focus-within) {
487
452
  border-color: var(--semi-color-danger);
488
453
  }
@@ -40,7 +40,7 @@ $overflowList: #{$prefix}-overflow-list;
40
40
  outline: 0;
41
41
  }
42
42
 
43
- &:active {
43
+ &:active{
44
44
  background-color: $color-select-bg-active;
45
45
  }
46
46
 
@@ -52,7 +52,6 @@ $overflowList: #{$prefix}-overflow-list;
52
52
  &-large {
53
53
  min-height: $height-select_large;
54
54
  line-height: $height-select_large;
55
-
56
55
  .#{$module}-selection {
57
56
  @include font-size-header-6;
58
57
  }
@@ -197,7 +196,6 @@ $overflowList: #{$prefix}-overflow-list;
197
196
 
198
197
  .#{$prefix}-tag-group {
199
198
  height: inherit;
200
-
201
199
  .#{$prefix}-tag {
202
200
  @include select-tag-margin;
203
201
  }
@@ -328,7 +326,6 @@ $overflowList: #{$prefix}-overflow-list;
328
326
  width: $width-select_clear-icon;
329
327
  color: $color-select_clearBtn-text-default;
330
328
  flex-shrink: 0;
331
-
332
329
  &:hover {
333
330
  color: $color-select_clearBtn-text-hover;
334
331
  }
@@ -438,7 +435,6 @@ $overflowList: #{$prefix}-overflow-list;
438
435
  .#{$module}-option-list {
439
436
  overflow-x: hidden;
440
437
  overflow-y: auto;
441
-
442
438
  &-chosen {
443
439
  .#{$module}-option-icon {
444
440
  display: flex;
@@ -479,84 +475,36 @@ $overflowList: #{$prefix}-overflow-list;
479
475
 
480
476
  .#{$module}-borderless {
481
477
 
482
- &:not(:focus-within):not(:hover) {
483
- background-color: $color-select_borderless-bg-default;
484
- border-color: $color-select_borderless-border-default;
485
-
478
+ &:not(:focus-within):not(:hover){
479
+ background-color:transparent;
480
+ border-color: transparent;
486
481
  .#{$module}-arrow {
487
482
  opacity: 0;
488
483
  }
489
-
490
- &.#{$module}-borderless-arrow {
491
- .#{$module}-arrow {
492
- opacity: 1;
493
- }
494
- }
495
484
  }
496
485
 
497
- &:hover {
498
- background-color: $color-select_borderless-bg-hover;
499
- border: $width-select-border-hover solid $color-select_borderless-border-hover;
500
- }
501
-
502
- &:focus {
503
- border: $width-select-border-focus solid $color-select_borderless-border-focus;
504
- background-color: $color-select_borderless-bg-focus;
505
- outline: 0;
506
- }
507
-
508
- &:active {
509
- background-color: $color-select_borderless-bg-active;
510
- }
511
-
512
- &:focus-within:not(:active) {
513
- background-color: transparent;
514
- }
515
-
516
- &.#{$module}-disabled {
517
- background-color: $color-select_borderless_input_disabled-bg;
518
-
519
- &:hover {
520
- background-color: $color-select_borderless_input_disabled-bg;
521
- }
522
-
523
- .#{$module}-selection,
524
- .#{$module}-selection-placeholder {
525
- color: $color-select_borderless_input_disabled-text;
526
- }
527
-
528
- .#{$module}-prefix,
529
- .#{$module}-suffix {
530
- color: $color-select_borderless_input_disabled-text;
531
- }
532
-
533
- .#{$module}-arrow {
534
- color: $color-select_borderless_input_disabled-text;
535
- }
536
-
537
- .#{$prefix}-tag {
538
- color: $color-select_borderless_input_disabled-text;
539
- }
486
+ &:focus-within:not(:active){
487
+ background-color:transparent;
540
488
  }
541
489
 
542
490
  // split style into not and normal to avoid style override
543
- &.#{$module}-error:not(:focus-within) {
491
+ &.#{$module}-error:not(:focus-within){
544
492
  border-color: $color-select_danger-border-focus;
545
493
  }
546
494
 
547
- &.#{$module}-warning:not(:focus-within) {
495
+ &.#{$module}-warning:not(:focus-within){
548
496
  border-color: $color-select_warning-border-focus;
549
497
  }
550
498
 
551
- &.#{$module}-error:focus-within {
499
+ &.#{$module}-error:focus-within{
552
500
  border-color: $color-select_danger-border-focus;
553
501
  }
554
502
 
555
- &.#{$module}-warning:focus-within {
503
+ &.#{$module}-warning:focus-within{
556
504
  border-color: $color-select_warning-border-focus;
557
505
  }
558
506
 
559
507
  }
560
508
 
561
509
 
562
- @import './rtl.scss';
510
+ @import './rtl.scss';
@@ -47,16 +47,6 @@ $color-select_option-border-default: var(--semi-color-border); // 分组选择
47
47
  $color-select_inset_label-text: var(--semi-color-text-2); // 分组选择器菜单项辅助文本颜色
48
48
  $color-select_create_tips-text: var(--semi-color-text-2); // 分组选择器菜单项提示文本颜色
49
49
  $color-select_group-text: var(--semi-color-text-2); // 分组选择器菜单项分组标题文本颜色
50
- $color-select_borderless-bg-default: transparent; // borderless 选择器输入框背景色 - 默认态
51
- $color-select_borderless-bg-hover: var(--semi-color-fill-1); // borderless 选择器输入框背景色 - 悬停态
52
- $color-select_borderless-bg-active: var(--semi-color-fill-2); // borderless 选择器输入框背景色 - 按下态
53
- $color-select_borderless-bg-focus: var(--semi-color-fill-0); // borderless 选择器输入框背景色 - 聚焦态
54
- $color-select_borderless-border-default: transparent; // borderless 选择器输入框边框颜色 - 默认态
55
- $color-select_borderless-border-hover: $color-select-border-default; // borderless 选择器输入框边框颜色 - 悬停态
56
- $color-select_borderless-border-active: var(--semi-color-focus-border); // borderless 选择器输入框边框颜色 - 按下态
57
- $color-select_borderless-border-focus: $color-select-border-active; // borderless 选择器输入框边框颜色 - 聚焦态
58
- $color-select_borderless_input_disabled-text: var(--semi-color-disabled-text); // borderless 选择器输入框文本颜色 - 禁用态
59
- $color-select_borderless_input_disabled-bg: var(--semi-color-disabled-fill); // borderless 禁用选择器输入框背景色 - 禁用态
60
50
 
61
51
  // Width/Height
62
52
  $width-select_icon_right: ($width-icon-medium + $spacing-tight * 2); // 选择器右侧图标大小
@@ -3,7 +3,7 @@
3
3
  /* spacing */
4
4
  .semi-skeleton-avatar, .semi-skeleton-image, .semi-skeleton-title, .semi-skeleton-button {
5
5
  background: var(--semi-color-fill-0);
6
- border-radius: 4px;
6
+ border-radius: var(--semi-border-radius-small);
7
7
  }
8
8
  .semi-skeleton-avatar-circle {
9
9
  border-radius: 50%;
@@ -39,7 +39,7 @@
39
39
  }
40
40
  .semi-skeleton-paragraph li {
41
41
  background: var(--semi-color-fill-0);
42
- border-radius: 4px;
42
+ border-radius: var(--semi-border-radius-small);
43
43
  width: 100%;
44
44
  height: 16px;
45
45
  margin-bottom: 10px;
@@ -15,6 +15,6 @@ $height-skeleton_button: $height-control-default; // 按钮骨架屏高度
15
15
 
16
16
  $spacing-skeleton_li-marginBottom: 10px; // 按钮骨架屏高度
17
17
 
18
- $radius-skeleton_item: 4px; // 骨架屏圆角
19
- $radius-skeleton_li: 4px; // 骨架屏圆角
18
+ $radius-skeleton_item: var(--semi-border-radius-small); // 骨架屏圆角
19
+ $radius-skeleton_li: var(--semi-border-radius-small); // 骨架屏圆角
20
20
 
@@ -1,6 +1,3 @@
1
- /* eslint-disable no-param-reassign */
2
- /* eslint-disable max-len */
3
- /* eslint-disable no-nested-ternary */
4
1
  import BaseFoundation from '../base/foundation';
5
2
  import touchEventPolyfill from '../utils/touchPolyfill';
6
3
  import warning from '../utils/warning';
@@ -157,7 +154,6 @@ export default class SliderFoundation extends BaseFoundation {
157
154
  startPos = vertical ? sliderY : sliderX;
158
155
  }
159
156
  // startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos;
160
- // eslint-disable-next-line one-var
161
157
  let endPos;
162
158
  if (vertical && verticalReverse) {
163
159
  endPos = sliderY;
@@ -213,8 +209,6 @@ export default class SliderFoundation extends BaseFoundation {
213
209
  } else {
214
210
  stepValue = (pos - startPos) / len * (max - min) + min;
215
211
  }
216
- // debugger
217
- // eslint-disable-next-line one-var
218
212
  let compareValue;
219
213
  if (range) {
220
214
  compareValue = isMin ? currentValue[0] : currentValue[1];
@@ -617,7 +611,6 @@ export default class SliderFoundation extends BaseFoundation {
617
611
  handlePrevent(event);
618
612
  }
619
613
  };
620
- // eslint-disable-next-line @typescript-eslint/no-empty-function
621
614
  this.onFocus = (e, handler) => {
622
615
  handlePrevent(e);
623
616
  const {
@@ -41,6 +41,5 @@ export default class SwitchFoundation extends BaseFoundation {
41
41
  this._adapter.notifyChange(checked, e);
42
42
  }
43
43
  }
44
- // eslint-disable-next-line @typescript-eslint/no-empty-function
45
44
  destroy() {}
46
45
  }
@@ -23,7 +23,6 @@ export default class TableBodyFoundation extends BaseFoundation {
23
23
  this._adapter.setCachedExpandBtnShouldInRow(cachedExpandBtnShouldInRow);
24
24
  if (!_isObject(newExpandRelatedProps) && !newExpandRelatedProps) {
25
25
  const expandRelatedProps = strings.EXPAND_RELATED_PROPS;
26
- // eslint-disable-next-line no-param-reassign
27
26
  newExpandRelatedProps = expandRelatedProps.map(key => _get(props, key, undefined));
28
27
  }
29
28
  this._adapter.setCachedExpandRelatedProps(newExpandRelatedProps);
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-len */
2
1
  import { BASE_CLASS_PREFIX } from '../base/constants';
3
2
  const cssClasses = {
4
3
  PREFIX: `${BASE_CLASS_PREFIX}-table`,
@@ -11,13 +11,6 @@ import _each from "lodash/each";
11
11
  import _isFunction from "lodash/isFunction";
12
12
  import _merge from "lodash/merge";
13
13
  import _get from "lodash/get";
14
- /* eslint-disable prefer-destructuring */
15
- /* eslint-disable max-depth */
16
- /* eslint-disable max-nested-callbacks */
17
- /* eslint-disable max-len */
18
- /* eslint-disable no-param-reassign */
19
- /* eslint-disable eqeqeq */
20
- /* eslint-disable @typescript-eslint/no-empty-function */
21
14
  import memoizeOne from 'memoize-one';
22
15
  import BaseFoundation from '../base/foundation';
23
16
  import { strings, numbers } from './constants';
@@ -832,7 +825,6 @@ class TableFoundation extends BaseFoundation {
832
825
  toggleShowFilter(dataIndex, visible) {
833
826
  let filterObj = this.getQuery(dataIndex);
834
827
  const filterDropdownVisible = visible;
835
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
836
828
  filterObj = Object.assign(Object.assign({}, filterObj), {
837
829
  filterDropdownVisible
838
830
  });
@@ -1,5 +1,4 @@
1
1
  import BaseFoundation from '../base/foundation';
2
- // eslint-disable-next-line max-len
3
2
  export default class TableRowFoundation extends BaseFoundation {
4
3
  handleClick(e) {
5
4
  const {
@@ -8,9 +8,6 @@ import _find from "lodash/find";
8
8
  import _filter from "lodash/filter";
9
9
  import _get from "lodash/get";
10
10
  import _isEqualWith from "lodash/isEqualWith";
11
- /* eslint-disable max-len */
12
- /* eslint-disable no-param-reassign */
13
- /* eslint-disable eqeqeq */
14
11
  import { strings, numbers } from './constants';
15
12
  import isNullOrUndefined from '../utils/isNullOrUndefined';
16
13
  import Logger from '../utils/Logger';
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-len */
2
1
  import { BASE_CLASS_PREFIX } from '../base/constants';
3
2
  const cssClasses = {
4
3
  PREFIX: `${BASE_CLASS_PREFIX}-tag`
@@ -89,10 +89,8 @@ class TagInputFoundation extends BaseFoundation {
89
89
  const maxLen = Math.max(valueArr.length, inputArr.length);
90
90
  for (let i = 0; i < maxLen; i++) {
91
91
  // When the input length is increasing
92
- // eslint-disable-next-line max-len
93
92
  if (!_isUndefined(valueArr[i]) && (_isUndefined(inputArr[i]) || valueArr[i].length > inputArr[i].length)) {
94
93
  // When the input length exceeds maxLength
95
- // eslint-disable-next-line max-depth
96
94
  if (valueArr[i].length > maxLength) {
97
95
  allowChange = false;
98
96
  _isFunction(onInputExceed) && onInputExceed(value);
@@ -1,6 +1,5 @@
1
1
  import _isUndefined from "lodash/isUndefined";
2
2
  import _split from "lodash/split";
3
- /* eslint-disable max-len */
4
3
  import { strings } from './constants';
5
4
  import BaseFoundation from '../base/foundation';
6
5
  import { formatToString, parseToDate, hourIsDisabled, minuteIsDisabled, secondIsDisabled, transformToArray, isTimeFormatLike } from './utils';
@@ -159,13 +158,13 @@ class TimePickerFoundation extends BaseFoundation {
159
158
  if (this.isValidTimeZone(timeZone)) {
160
159
  dates = dates.map(date => utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
161
160
  }
162
- const inputValue = this.formatValue(dates);
163
- this.setState({
164
- value: dates,
165
- invalid,
166
- inputValue
167
- });
168
161
  }
162
+ const inputValue = this.formatValue(dates);
163
+ this.setState({
164
+ value: dates,
165
+ invalid,
166
+ inputValue
167
+ });
169
168
  }
170
169
  handleFocus(e) {
171
170
  if (!this.getState('open')) {
@@ -4,9 +4,7 @@ class TimePickerFoundation extends BaseFoundation {
4
4
  constructor(adapter) {
5
5
  super(Object.assign({}, adapter));
6
6
  }
7
- // eslint-disable-next-line @typescript-eslint/no-empty-function
8
7
  init() {}
9
- // eslint-disable-next-line @typescript-eslint/no-empty-function
10
8
  destroy() {}
11
9
  handleFocus(e) {
12
10
  this.storeCursor();
@@ -1,5 +1,4 @@
1
1
  import _toNumber from "lodash/toNumber";
2
- /* eslint-disable max-len */
3
2
  import { format, parse } from 'date-fns';
4
3
  import { strings } from '../constants';
5
4
  import isNullOrUndefined from '../../utils/isNullOrUndefined';
@@ -26,6 +25,8 @@ export const parseToDate = function (input) {
26
25
  });
27
26
  // console.log(curDate, formatToken);
28
27
  return curDate;
28
+ } else if (typeof input === 'undefined') {
29
+ return undefined;
29
30
  }
30
31
  return new Date();
31
32
  };
@@ -1,8 +1,5 @@
1
1
  import _isEmpty from "lodash/isEmpty";
2
2
  import _get from "lodash/get";
3
- /* eslint-disable no-param-reassign */
4
- /* eslint-disable prefer-destructuring, max-lines-per-function, one-var, max-len, @typescript-eslint/restrict-plus-operands */
5
- /* argus-disable unPkgSensitiveInfo */
6
3
  import BaseFoundation from '../base/foundation';
7
4
  import { handlePrevent } from '../utils/a11y';
8
5
  const REGS = {
@@ -78,7 +75,6 @@ export default class Tooltip extends BaseFoundation {
78
75
  top: -9999
79
76
  }); // offscreen rendering
80
77
  if (trigger === 'custom') {
81
- // eslint-disable-next-line
82
78
  this._adapter.registerClickOutsideHandler(() => {});
83
79
  }
84
80
  /**
@@ -396,7 +392,6 @@ export default class Tooltip extends BaseFoundation {
396
392
  return pixel;
397
393
  }
398
394
  calcTransformOrigin(position, triggerRect, translateX, translateY) {
399
- // eslint-disable-next-line
400
395
  if (position && triggerRect && translateX != null && translateY != null) {
401
396
  if (this.getProp('transformFromCenter')) {
402
397
  if (['topLeft', 'bottomLeft'].includes(position)) {
@@ -427,9 +422,7 @@ export default class Tooltip extends BaseFoundation {
427
422
  const triggerRect = (_isEmpty(props.triggerRect) ? props.triggerRect : this._adapter.getTriggerBounding()) || Object.assign({}, defaultRect);
428
423
  const containerRect = (_isEmpty(props.containerRect) ? props.containerRect : this._adapter.getPopupContainerRect()) || Object.assign({}, defaultRect);
429
424
  const wrapperRect = (_isEmpty(props.wrapperRect) ? props.wrapperRect : this._adapter.getWrapperBounding()) || Object.assign({}, defaultRect);
430
- // eslint-disable-next-line
431
425
  const position = props.position != null ? props.position : this.getProp('position');
432
- // eslint-disable-next-line
433
426
  const SPACING = spacing != null ? spacing : this.getProp('spacing');
434
427
  const {
435
428
  arrowPointAtCenter,
@@ -607,7 +600,6 @@ export default class Tooltip extends BaseFoundation {
607
600
  top: this._roundPixel(top)
608
601
  };
609
602
  let transform = '';
610
- // eslint-disable-next-line
611
603
  if (translateX != null) {
612
604
  transform += `translateX(${translateX * 100}%) `;
613
605
  Object.defineProperty(style, 'translateX', {
@@ -615,7 +607,6 @@ export default class Tooltip extends BaseFoundation {
615
607
  value: translateX
616
608
  });
617
609
  }
618
- // eslint-disable-next-line
619
610
  if (translateY != null) {
620
611
  transform += `translateY(${translateY * 100}%) `;
621
612
  Object.defineProperty(style, 'translateY', {
@@ -623,7 +614,6 @@ export default class Tooltip extends BaseFoundation {
623
614
  value: translateY
624
615
  });
625
616
  }
626
- // eslint-disable-next-line
627
617
  if (transformOrigin != null) {
628
618
  style.transformOrigin = transformOrigin;
629
619
  }
@@ -3,7 +3,6 @@ import BaseFoundation from '../base/foundation';
3
3
  import { strings } from './constants';
4
4
  import { _generateGroupedData, _generateTreeData } from './transferUtils';
5
5
  import arrayMove from '../utils/arrayMove';
6
- // eslint-disable-next-line max-len
7
6
  export default class TransferFoundation extends BaseFoundation {
8
7
  constructor(adapter) {
9
8
  super(Object.assign({}, adapter));
@@ -405,7 +405,6 @@ export default class TreeFoundation extends BaseFoundation {
405
405
  node: data
406
406
  });
407
407
  }
408
- // eslint-disable-next-line max-len
409
408
  handleNodeLoad(loadedKeys, loadingKeys, data, resolve) {
410
409
  const {
411
410
  loadData,