@douyinfe/semi-foundation 2.62.1 → 2.63.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 (114) hide show
  1. package/button/button.scss +1 -2
  2. package/cascader/cascader.scss +3 -2
  3. package/cascader/variables.scss +1 -0
  4. package/chat/chat.scss +598 -0
  5. package/chat/chatBoxActionFoundation.ts +64 -0
  6. package/chat/constants.ts +68 -0
  7. package/chat/foundation.ts +306 -0
  8. package/chat/inputboxFoundation.ts +98 -0
  9. package/chat/rtl.scss +22 -0
  10. package/chat/variables.scss +125 -0
  11. package/checkbox/checkbox.scss +1 -2
  12. package/datePicker/datePicker.scss +1 -2
  13. package/dropdown/dropdown.scss +3 -2
  14. package/form/form.scss +5 -4
  15. package/form/interface.ts +2 -0
  16. package/grid/grid.scss +1 -1
  17. package/input/input.scss +4 -4
  18. package/input/textareaFoundation.ts +5 -0
  19. package/lib/cjs/button/button.scss +1 -2
  20. package/lib/cjs/cascader/cascader.css +1 -0
  21. package/lib/cjs/cascader/cascader.scss +3 -2
  22. package/lib/cjs/cascader/variables.scss +1 -0
  23. package/lib/cjs/chat/chat.css +484 -0
  24. package/lib/cjs/chat/chat.scss +598 -0
  25. package/lib/cjs/chat/chatBoxActionFoundation.d.ts +24 -0
  26. package/lib/cjs/chat/chatBoxActionFoundation.js +49 -0
  27. package/lib/cjs/chat/constants.d.ts +41 -0
  28. package/lib/cjs/chat/constants.js +56 -0
  29. package/lib/cjs/chat/foundation.d.ts +76 -0
  30. package/lib/cjs/chat/foundation.js +275 -0
  31. package/lib/cjs/chat/inputboxFoundation.d.ts +20 -0
  32. package/lib/cjs/chat/inputboxFoundation.js +118 -0
  33. package/lib/cjs/chat/rtl.scss +22 -0
  34. package/lib/cjs/chat/variables.scss +125 -0
  35. package/lib/cjs/checkbox/checkbox.scss +1 -2
  36. package/lib/cjs/datePicker/datePicker.scss +1 -2
  37. package/lib/cjs/dropdown/dropdown.scss +3 -2
  38. package/lib/cjs/form/form.scss +5 -4
  39. package/lib/cjs/form/interface.d.ts +2 -0
  40. package/lib/cjs/grid/grid.css +2 -2
  41. package/lib/cjs/grid/grid.scss +1 -1
  42. package/lib/cjs/input/input.scss +4 -4
  43. package/lib/cjs/input/textareaFoundation.js +7 -0
  44. package/lib/cjs/navigation/navigation.css +3 -1
  45. package/lib/cjs/navigation/navigation.scss +3 -1
  46. package/lib/cjs/popconfirm/popconfirm.scss +2 -1
  47. package/lib/cjs/radio/radio.scss +6 -6
  48. package/lib/cjs/select/select.scss +1 -2
  49. package/lib/cjs/steps/bacisSteps.scss +3 -3
  50. package/lib/cjs/switch/switch.scss +5 -5
  51. package/lib/cjs/table/table.scss +1 -1
  52. package/lib/cjs/tabs/tabs.scss +3 -5
  53. package/lib/cjs/tag/tag.scss +1 -2
  54. package/lib/cjs/timePicker/utils/index.js +1 -0
  55. package/lib/cjs/tree/tree.scss +4 -2
  56. package/lib/cjs/upload/foundation.d.ts +1 -0
  57. package/lib/cjs/upload/foundation.js +3 -1
  58. package/lib/cjs/upload/upload.css +1 -1
  59. package/lib/cjs/upload/upload.scss +2 -3
  60. package/lib/es/button/button.scss +1 -2
  61. package/lib/es/cascader/cascader.css +1 -0
  62. package/lib/es/cascader/cascader.scss +3 -2
  63. package/lib/es/cascader/variables.scss +1 -0
  64. package/lib/es/chat/chat.css +484 -0
  65. package/lib/es/chat/chat.scss +598 -0
  66. package/lib/es/chat/chatBoxActionFoundation.d.ts +24 -0
  67. package/lib/es/chat/chatBoxActionFoundation.js +41 -0
  68. package/lib/es/chat/constants.d.ts +41 -0
  69. package/lib/es/chat/constants.js +51 -0
  70. package/lib/es/chat/foundation.d.ts +76 -0
  71. package/lib/es/chat/foundation.js +267 -0
  72. package/lib/es/chat/inputboxFoundation.d.ts +20 -0
  73. package/lib/es/chat/inputboxFoundation.js +110 -0
  74. package/lib/es/chat/rtl.scss +22 -0
  75. package/lib/es/chat/variables.scss +125 -0
  76. package/lib/es/checkbox/checkbox.scss +1 -2
  77. package/lib/es/datePicker/datePicker.scss +1 -2
  78. package/lib/es/dropdown/dropdown.scss +3 -2
  79. package/lib/es/form/form.scss +5 -4
  80. package/lib/es/form/interface.d.ts +2 -0
  81. package/lib/es/grid/grid.css +2 -2
  82. package/lib/es/grid/grid.scss +1 -1
  83. package/lib/es/input/input.scss +4 -4
  84. package/lib/es/input/textareaFoundation.js +7 -0
  85. package/lib/es/navigation/navigation.css +3 -1
  86. package/lib/es/navigation/navigation.scss +3 -1
  87. package/lib/es/popconfirm/popconfirm.scss +2 -1
  88. package/lib/es/radio/radio.scss +6 -6
  89. package/lib/es/select/select.scss +1 -2
  90. package/lib/es/steps/bacisSteps.scss +3 -3
  91. package/lib/es/switch/switch.scss +5 -5
  92. package/lib/es/table/table.scss +1 -1
  93. package/lib/es/tabs/tabs.scss +3 -5
  94. package/lib/es/tag/tag.scss +1 -2
  95. package/lib/es/timePicker/utils/index.js +1 -0
  96. package/lib/es/tree/tree.scss +4 -2
  97. package/lib/es/upload/foundation.d.ts +1 -0
  98. package/lib/es/upload/foundation.js +3 -1
  99. package/lib/es/upload/upload.css +1 -1
  100. package/lib/es/upload/upload.scss +2 -3
  101. package/navigation/navigation.scss +3 -1
  102. package/package.json +3 -3
  103. package/popconfirm/popconfirm.scss +2 -1
  104. package/radio/radio.scss +6 -6
  105. package/select/select.scss +1 -2
  106. package/steps/bacisSteps.scss +3 -3
  107. package/switch/switch.scss +5 -5
  108. package/table/table.scss +1 -1
  109. package/tabs/tabs.scss +3 -5
  110. package/tag/tag.scss +1 -2
  111. package/timePicker/utils/index.ts +2 -0
  112. package/tree/tree.scss +4 -2
  113. package/upload/foundation.ts +4 -2
  114. package/upload/upload.scss +2 -3
@@ -319,6 +319,7 @@ $module-list: #{$prefix}-scrolllist;
319
319
  @include font-size-small;
320
320
  font-weight: $font-weight-bold;
321
321
  color: $color-datepicker_day-text-default;
322
+ border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
322
323
 
323
324
  &-item {
324
325
  width: $width-datepicker_day;
@@ -327,8 +328,6 @@ $module-list: #{$prefix}-scrolllist;
327
328
  text-align: center;
328
329
  display: inline-block;
329
330
  }
330
-
331
- border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
332
331
  }
333
332
 
334
333
  // 月面板-月周
@@ -33,11 +33,12 @@ $module: #{$prefix}-dropdown;
33
33
  padding-bottom: $spacing-dropdown_title-paddingBottom;
34
34
  padding-left: $spacing-dropdown_title-paddingLeft;
35
35
  padding-right: $spacing-dropdown_title-paddingRight;
36
+ @include font-size-small;
37
+ cursor: default;
38
+
36
39
  &-withTick {
37
40
  padding-left: $spacing-dropdown_title_withTick-paddingLeft;
38
41
  }
39
- @include font-size-small;
40
- cursor: default;
41
42
  }
42
43
  &-item {
43
44
  padding: $spacing-dropdown_item-paddingY $spacing-dropdown_item-paddingX;
@@ -263,15 +263,16 @@ $rating: #{$prefix}-rating;
263
263
 
264
264
  .#{$form}-vertical {
265
265
  .#{$form}-field-group {
266
- .#{$field} {
267
- margin-top: 0;
268
- margin-bottom: 0;
269
- }
270
266
  margin-top: 0;
271
267
  margin-bottom: 0;
272
268
  padding-top: $spacing-form_field_group_vertical-paddingTop;
273
269
  padding-bottom: $spacing-form_field_group_vertical-paddingBottom;
274
270
  overflow: hidden;
271
+
272
+ .#{$field} {
273
+ margin-top: 0;
274
+ margin-bottom: 0;
275
+ }
275
276
  }
276
277
  }
277
278
 
@@ -58,6 +58,8 @@ export interface BaseFormApi<T extends object = any> {
58
58
  getFieldExist: <K extends keyof T>(field: K) => boolean;
59
59
  /** get formState of form */
60
60
  getFormState: () => FormState<T extends object ? T : object>;
61
+ /** get formProps of form */
62
+ getFormProps: (keys?: Array<string>) => ComponentProps;
61
63
  /** submit form manual */
62
64
  submitForm: () => void;
63
65
  /** reset form manual */
@@ -2,13 +2,13 @@
2
2
  /* sizing */
3
3
  /* spacing */
4
4
  .semi-row {
5
+ display: block;
6
+ box-sizing: border-box;
5
7
  position: relative;
6
8
  height: auto;
7
9
  margin-right: 0;
8
10
  margin-left: 0;
9
11
  zoom: 1;
10
- display: block;
11
- box-sizing: border-box;
12
12
  }
13
13
  .semi-row::before, .semi-row::after {
14
14
  display: table;
@@ -4,9 +4,9 @@
4
4
  $module: #{$prefix};
5
5
 
6
6
  .#{$module}-row {
7
- @include make-row();
8
7
  display: block;
9
8
  box-sizing: border-box;
9
+ @include make-row();
10
10
  }
11
11
 
12
12
  .#{$module}-row-flex {
@@ -562,14 +562,13 @@ $module: #{$prefix}-input;
562
562
 
563
563
  background-color: $color-input_default-bg-default;
564
564
  color: $color-input_prefix-text-default;
565
+ @include font-size-regular;
566
+ flex-shrink: 0;
565
567
 
566
568
  &-icon,
567
569
  &-text {
568
570
  padding: $spacing-input_prepend-paddingY $spacing-input_prepend-paddingX;
569
571
  }
570
-
571
- @include font-size-regular;
572
- flex-shrink: 0;
573
572
  }
574
573
 
575
574
  &-append {
@@ -692,6 +691,8 @@ $module: #{$prefix}-input;
692
691
 
693
692
  .#{$module}-only_border{
694
693
  background: transparent;
694
+ border-color: $color_input-default-border-only_border-default;
695
+
695
696
  &:hover{
696
697
  background: transparent;
697
698
  border-color: $color_input-default-border-only_border-hover;
@@ -699,7 +700,6 @@ $module: #{$prefix}-input;
699
700
  &:focus-within{
700
701
  background: transparent;
701
702
  }
702
- border-color: $color_input-default-border-only_border-default;
703
703
 
704
704
  }
705
705
 
@@ -178,6 +178,13 @@ export default class TextAreaFoundation extends BaseFoundation {
178
178
  this._adapter.notifyBlur(realValue, e);
179
179
  }
180
180
  handleKeyDown(e) {
181
+ const {
182
+ disabledEnterStartNewLine
183
+ } = this.getProps();
184
+ if (disabledEnterStartNewLine && e.key === 'Enter' && !e.shiftKey) {
185
+ // Prevent default line wrapping behavior
186
+ e.preventDefault();
187
+ }
181
188
  this._adapter.notifyKeyDown(e);
182
189
  if (e.keyCode === 13) {
183
190
  this._adapter.notifyPressEnter(e);
@@ -401,11 +401,13 @@
401
401
  font-weight: 600;
402
402
  background-color: var(--semi-color-primary-light-default);
403
403
  color: var(--semi-color-text-0);
404
- background-color: transparent;
405
404
  }
406
405
  .semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title-selected .semi-navigation-item-icon:first-child {
407
406
  color: var(--semi-color-primary);
408
407
  }
408
+ .semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title-selected {
409
+ background-color: transparent;
410
+ }
409
411
  .semi-navigation-vertical .semi-navigation-list > .semi-navigation-sub-wrap > .semi-navigation-sub-title-selected.semi-navigation-sub-title-disabled {
410
412
  background-color: transparent;
411
413
  color: var(--semi-color-primary-disabled);
@@ -438,7 +438,9 @@ $module: #{$prefix}-navigation;
438
438
  &-selected {
439
439
  font-weight: $font-navigation_sub_selected-fontWeight;
440
440
  @include item-selected;
441
- background-color: $color-navigation_itemL1-bg-default;
441
+ & {
442
+ background-color: $color-navigation_itemL1-bg-default;
443
+ }
442
444
 
443
445
  &.#{$module}-sub-title-disabled {
444
446
  @include item-disabled-selected;
@@ -46,10 +46,11 @@ $module: #{$prefix}-popconfirm;
46
46
  }
47
47
 
48
48
  &-body {
49
+ color: $color-popconfirm_body-text;
50
+
49
51
  &-withIcon {
50
52
  margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
51
53
  }
52
- color: $color-popconfirm_body-text;
53
54
 
54
55
  & > p {
55
56
  margin: $spacing-popconfirm_body_p-margin;
@@ -13,17 +13,16 @@ $inner-width: $width-icon-medium;
13
13
  column-gap: $spacing-radio_addon-paddingLeft;
14
14
  transition: background-color $transition_duration-radio-bg $transition_function-radio-bg $transition_delay-radio-bg,
15
15
  border $transition_duration-radio-border $transition_function-radio-border $transition_delay-radio-border;
16
-
17
- &.#{$module}-vertical {
18
- display: block;
19
- }
20
-
21
16
  min-height: $height-radio_inner_min;
22
17
  min-width: $width-radio_inner;
23
18
  cursor: pointer;
24
19
  vertical-align: bottom;
25
20
  text-align: left;
26
21
 
22
+ &.#{$module}-vertical {
23
+ display: block;
24
+ }
25
+
27
26
  input[type="checkbox"],
28
27
  input[type="radio"] {
29
28
  position: absolute;
@@ -114,10 +113,11 @@ $inner-width: $width-icon-medium;
114
113
  border $transition_duration-radio-border $transition_function-radio-border $transition_delay-radio-border;
115
114
 
116
115
  .#{$module}-inner {
116
+ flex-shrink: 0;
117
+
117
118
  &-display {
118
119
  background: $color-radio_card-bg-default;
119
120
  }
120
- flex-shrink: 0;
121
121
  }
122
122
 
123
123
  .#{$module}-addon {
@@ -185,12 +185,11 @@ $overflowList: #{$prefix}-overflow-list;
185
185
  }
186
186
 
187
187
  .#{$prefix}-tag {
188
+ @include select-tag-margin;
188
189
 
189
190
  &:nth-of-type(1) {
190
191
  margin-left: 0;
191
192
  }
192
-
193
- @include select-tag-margin;
194
193
  }
195
194
 
196
195
  .#{$prefix}-tag-group {
@@ -5,6 +5,9 @@ $basicType: #{$module}-basic;
5
5
  .#{$basicType} {
6
6
 
7
7
  &.#{$module}-horizontal {
8
+ display: flex;
9
+ flex-flow: row nowrap;
10
+
8
11
  &.#{$module}-hasline {
9
12
  .#{$item}-title {
10
13
 
@@ -21,9 +24,6 @@ $basicType: #{$module}-basic;
21
24
  }
22
25
  }
23
26
 
24
- display: flex;
25
- flex-flow: row nowrap;
26
-
27
27
  .#{$item} {
28
28
  padding-left: $spacing-steps_basic_item-paddingLeft;
29
29
 
@@ -116,11 +116,6 @@ $module: #{$prefix}-switch;
116
116
  }
117
117
 
118
118
  &-native-control {
119
-
120
- &[type="checkbox"] {
121
- width: inherit;
122
- height: inherit;
123
- }
124
119
  width: 100%;
125
120
  height: 100%;
126
121
  opacity: 0;
@@ -130,6 +125,11 @@ $module: #{$prefix}-switch;
130
125
  position: absolute;
131
126
  top: 0;
132
127
  left: 0;
128
+
129
+ &[type="checkbox"] {
130
+ width: inherit;
131
+ height: inherit;
132
+ }
133
133
  }
134
134
 
135
135
  &-checked-text,
@@ -66,12 +66,12 @@ $module: #{$prefix}-table;
66
66
 
67
67
  &-header {
68
68
  overflow: hidden;
69
+ scrollbar-base-color: transparent;
69
70
 
70
71
  &::-webkit-scrollbar {
71
72
  background-color: transparent;
72
73
  border-bottom: $width-table_header_border $border-table_base-borderStyle $color-table_th-border-default;
73
74
  }
74
- scrollbar-base-color: transparent;
75
75
 
76
76
  &-sticky {
77
77
  position: sticky;
@@ -326,13 +326,12 @@ $ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix
326
326
  padding: $spacing-tabs_bar_line_tab-paddingTop $spacing-tabs_bar_line_tab-paddingRight $spacing-tabs_bar_line_tab-paddingBottom $spacing-tabs_bar_line_tab-paddingLeft;
327
327
  transition: border-bottom-color $transition_duration-tabs_tab_line-border $transition_function-tabs_tab_line-border $transition_delay-tabs_tab_line-border,
328
328
  color $transition_duration-tabs_tab_line-text $transition_function-tabs_tab_line-text $transition_delay-tabs_tab_line-text; //线条式tabs的border-color 的 transition
329
-
329
+ border-bottom: $width-tabs_bar_line_tab-border solid transparent;
330
+
330
331
  &:nth-of-type(1) {
331
332
  padding-left: 0;
332
333
  }
333
334
 
334
- border-bottom: $width-tabs_bar_line_tab-border solid transparent;
335
-
336
335
  &:hover {
337
336
  border-bottom: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_default-border-hover;
338
337
  }
@@ -694,13 +693,12 @@ $ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix
694
693
  padding: $spacing-tabs_bar_line_tab-paddingTop $spacing-tabs_bar_line_tab-paddingRight $spacing-tabs_bar_line_tab-paddingBottom $spacing-tabs_bar_line_tab-paddingLeft;
695
694
  transition: border-bottom-color $transition_duration-tabs_tab_line-border $transition_function-tabs_tab_line-border $transition_delay-tabs_tab_line-border,
696
695
  color $transition_duration-tabs_tab_line-text $transition_function-tabs_tab_line-text $transition_delay-tabs_tab_line-text; //线条式tabs的border-color 的 transition
696
+ border-bottom: $width-tabs_bar_line_tab-border solid transparent;
697
697
 
698
698
  &:nth-of-type(1) {
699
699
  padding-left: 0;
700
700
  }
701
701
 
702
- border-bottom: $width-tabs_bar_line_tab-border solid transparent;
703
-
704
702
  &:hover {
705
703
  border-bottom: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_default-border-hover;
706
704
  }
@@ -159,14 +159,13 @@ $types: "ghost", "solid", "light";
159
159
 
160
160
  .#{$module}-group {
161
161
  display: block;
162
+ height: auto;
162
163
 
163
164
  .#{$module} {
164
165
  margin-bottom: $spacing-tag_group-marginBottom;
165
166
  margin-right: $spacing-tag_group-marginRight;
166
167
  }
167
168
 
168
- height: auto;
169
-
170
169
  &-max.#{$module}-group-small {
171
170
  height: ($height-tag_small + 2);
172
171
  }
@@ -18,6 +18,7 @@ export const parseToDate = function (input) {
18
18
  } else if (typeof input === 'number') {
19
19
  return new Date(_toNumber(input));
20
20
  } else if (typeof input === 'string') {
21
+ if (input === '') return undefined;
21
22
  let curDate = new Date();
22
23
  // console.log(input, formatToken);
23
24
  curDate = parse(input, formatToken, curDate, {
@@ -211,11 +211,12 @@ $module: #{$prefix}-tree;
211
211
 
212
212
  &-drag-over.#{$module}-option-draggable,
213
213
  &-drag-over.#{$module}-option-fullLabel-draggable {
214
+ border: $width-tree_option_draggable-border solid $color-tree_option_draggable_insert-border-default;
215
+
214
216
  .#{$module}-option-label {
215
217
  border-top: 0;
216
218
  border-bottom: 0;
217
219
  }
218
- border: $width-tree_option_draggable-border solid $color-tree_option_draggable_insert-border-default;
219
220
 
220
221
  // selected solid background will overlap with drag over border-bottom
221
222
  // add an extra border to complement
@@ -397,11 +398,12 @@ $module: #{$prefix}-tree;
397
398
  &-spin-icon {
398
399
  display: flex;
399
400
  line-height: 0; // make the spin icon in the center
401
+ color: $color-tree_option_loading-icon-default;
402
+
400
403
  & svg {
401
404
  width: $width-tree_spinIcon;
402
405
  height: $width-tree_spinIcon;
403
406
  }
404
- color: $color-tree_option_loading-icon-default;
405
407
  }
406
408
 
407
409
  &-selected {
@@ -40,6 +40,7 @@ export interface AfterUploadResult {
40
40
  status?: string;
41
41
  validateMessage?: unknown;
42
42
  name?: string;
43
+ url?: string;
43
44
  }
44
45
  export interface UploadAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
45
46
  notifyFileSelect: (files: Array<CustomFile>) => void;
@@ -688,7 +688,8 @@ class UploadFoundation extends BaseFoundation {
688
688
  autoRemove,
689
689
  status,
690
690
  validateMessage,
691
- name
691
+ name,
692
+ url
692
693
  } = this._adapter.notifyAfterUpload({
693
694
  response: body,
694
695
  file: newFileList[index],
@@ -697,6 +698,7 @@ class UploadFoundation extends BaseFoundation {
697
698
  status ? newFileList[index].status = status : null;
698
699
  validateMessage ? newFileList[index].validateMessage = validateMessage : null;
699
700
  name ? newFileList[index].name = name : null;
701
+ url ? newFileList[index].url = url : null;
700
702
  autoRemove ? newFileList.splice(index, 1) : null;
701
703
  }
702
704
  this._adapter.notifySuccess(body, fileInstance, newFileList);
@@ -206,7 +206,7 @@
206
206
  width: 24px;
207
207
  flex-shrink: 0;
208
208
  }
209
- .semi-upload-file-card-icon-loading, .semi-upload-file-card-icon-error {
209
+ .semi-upload-file-card-icon-loading, .semi-upload-file-card-icon-error.semi-icon {
210
210
  font-size: 11px;
211
211
  margin-right: 2px;
212
212
  }
@@ -109,6 +109,7 @@ $module: #{$prefix}-upload;
109
109
  &-title {
110
110
  @include font-size-small;
111
111
  color: $color-upload_assist-text;
112
+ margin-bottom: $spacing-upload_title-marginBottom;
112
113
 
113
114
  &-choosen {
114
115
  margin-right: $spacing-upload_title_choosen-marginRight;
@@ -118,8 +119,6 @@ $module: #{$prefix}-upload;
118
119
  cursor: pointer;
119
120
  color: $color-upload_clear-text;
120
121
  }
121
-
122
- margin-bottom: $spacing-upload_title-marginBottom;
123
122
  }
124
123
  }
125
124
 
@@ -247,7 +246,7 @@ $module: #{$prefix}-upload;
247
246
 
248
247
  &-icon {
249
248
  &-loading,
250
- &-error {
249
+ &-error.#{$prefix}-icon {
251
250
  font-size: $width-upload_file_card-icon;
252
251
  margin-right: $spacing-upload_file_card_icon-marginRight;
253
252
  }
@@ -438,7 +438,9 @@ $module: #{$prefix}-navigation;
438
438
  &-selected {
439
439
  font-weight: $font-navigation_sub_selected-fontWeight;
440
440
  @include item-selected;
441
- background-color: $color-navigation_itemL1-bg-default;
441
+ & {
442
+ background-color: $color-navigation_itemL1-bg-default;
443
+ }
442
444
 
443
445
  &.#{$module}-sub-title-disabled {
444
446
  @include item-disabled-selected;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.62.1",
3
+ "version": "2.63.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
7
7
  "prepublishOnly": "npm run build:lib"
8
8
  },
9
9
  "dependencies": {
10
- "@douyinfe/semi-animation": "2.62.1",
10
+ "@douyinfe/semi-animation": "2.63.0",
11
11
  "@mdx-js/mdx": "^3.0.1",
12
12
  "async-validator": "^3.5.0",
13
13
  "classnames": "^2.2.6",
@@ -28,7 +28,7 @@
28
28
  "*.scss",
29
29
  "*.css"
30
30
  ],
31
- "gitHead": "99b473508df61ea87098d68db7d0d8a07c8c42b8",
31
+ "gitHead": "1016b6bee4b1837a3971d3c446132b1f49adff08",
32
32
  "devDependencies": {
33
33
  "@babel/plugin-transform-runtime": "^7.15.8",
34
34
  "@babel/preset-env": "^7.15.8",
@@ -46,10 +46,11 @@ $module: #{$prefix}-popconfirm;
46
46
  }
47
47
 
48
48
  &-body {
49
+ color: $color-popconfirm_body-text;
50
+
49
51
  &-withIcon {
50
52
  margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
51
53
  }
52
- color: $color-popconfirm_body-text;
53
54
 
54
55
  & > p {
55
56
  margin: $spacing-popconfirm_body_p-margin;
package/radio/radio.scss CHANGED
@@ -13,17 +13,16 @@ $inner-width: $width-icon-medium;
13
13
  column-gap: $spacing-radio_addon-paddingLeft;
14
14
  transition: background-color $transition_duration-radio-bg $transition_function-radio-bg $transition_delay-radio-bg,
15
15
  border $transition_duration-radio-border $transition_function-radio-border $transition_delay-radio-border;
16
-
17
- &.#{$module}-vertical {
18
- display: block;
19
- }
20
-
21
16
  min-height: $height-radio_inner_min;
22
17
  min-width: $width-radio_inner;
23
18
  cursor: pointer;
24
19
  vertical-align: bottom;
25
20
  text-align: left;
26
21
 
22
+ &.#{$module}-vertical {
23
+ display: block;
24
+ }
25
+
27
26
  input[type="checkbox"],
28
27
  input[type="radio"] {
29
28
  position: absolute;
@@ -114,10 +113,11 @@ $inner-width: $width-icon-medium;
114
113
  border $transition_duration-radio-border $transition_function-radio-border $transition_delay-radio-border;
115
114
 
116
115
  .#{$module}-inner {
116
+ flex-shrink: 0;
117
+
117
118
  &-display {
118
119
  background: $color-radio_card-bg-default;
119
120
  }
120
- flex-shrink: 0;
121
121
  }
122
122
 
123
123
  .#{$module}-addon {
@@ -185,12 +185,11 @@ $overflowList: #{$prefix}-overflow-list;
185
185
  }
186
186
 
187
187
  .#{$prefix}-tag {
188
+ @include select-tag-margin;
188
189
 
189
190
  &:nth-of-type(1) {
190
191
  margin-left: 0;
191
192
  }
192
-
193
- @include select-tag-margin;
194
193
  }
195
194
 
196
195
  .#{$prefix}-tag-group {
@@ -5,6 +5,9 @@ $basicType: #{$module}-basic;
5
5
  .#{$basicType} {
6
6
 
7
7
  &.#{$module}-horizontal {
8
+ display: flex;
9
+ flex-flow: row nowrap;
10
+
8
11
  &.#{$module}-hasline {
9
12
  .#{$item}-title {
10
13
 
@@ -21,9 +24,6 @@ $basicType: #{$module}-basic;
21
24
  }
22
25
  }
23
26
 
24
- display: flex;
25
- flex-flow: row nowrap;
26
-
27
27
  .#{$item} {
28
28
  padding-left: $spacing-steps_basic_item-paddingLeft;
29
29
 
@@ -116,11 +116,6 @@ $module: #{$prefix}-switch;
116
116
  }
117
117
 
118
118
  &-native-control {
119
-
120
- &[type="checkbox"] {
121
- width: inherit;
122
- height: inherit;
123
- }
124
119
  width: 100%;
125
120
  height: 100%;
126
121
  opacity: 0;
@@ -130,6 +125,11 @@ $module: #{$prefix}-switch;
130
125
  position: absolute;
131
126
  top: 0;
132
127
  left: 0;
128
+
129
+ &[type="checkbox"] {
130
+ width: inherit;
131
+ height: inherit;
132
+ }
133
133
  }
134
134
 
135
135
  &-checked-text,
package/table/table.scss CHANGED
@@ -66,12 +66,12 @@ $module: #{$prefix}-table;
66
66
 
67
67
  &-header {
68
68
  overflow: hidden;
69
+ scrollbar-base-color: transparent;
69
70
 
70
71
  &::-webkit-scrollbar {
71
72
  background-color: transparent;
72
73
  border-bottom: $width-table_header_border $border-table_base-borderStyle $color-table_th-border-default;
73
74
  }
74
- scrollbar-base-color: transparent;
75
75
 
76
76
  &-sticky {
77
77
  position: sticky;
package/tabs/tabs.scss CHANGED
@@ -326,13 +326,12 @@ $ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix
326
326
  padding: $spacing-tabs_bar_line_tab-paddingTop $spacing-tabs_bar_line_tab-paddingRight $spacing-tabs_bar_line_tab-paddingBottom $spacing-tabs_bar_line_tab-paddingLeft;
327
327
  transition: border-bottom-color $transition_duration-tabs_tab_line-border $transition_function-tabs_tab_line-border $transition_delay-tabs_tab_line-border,
328
328
  color $transition_duration-tabs_tab_line-text $transition_function-tabs_tab_line-text $transition_delay-tabs_tab_line-text; //线条式tabs的border-color 的 transition
329
-
329
+ border-bottom: $width-tabs_bar_line_tab-border solid transparent;
330
+
330
331
  &:nth-of-type(1) {
331
332
  padding-left: 0;
332
333
  }
333
334
 
334
- border-bottom: $width-tabs_bar_line_tab-border solid transparent;
335
-
336
335
  &:hover {
337
336
  border-bottom: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_default-border-hover;
338
337
  }
@@ -694,13 +693,12 @@ $ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix
694
693
  padding: $spacing-tabs_bar_line_tab-paddingTop $spacing-tabs_bar_line_tab-paddingRight $spacing-tabs_bar_line_tab-paddingBottom $spacing-tabs_bar_line_tab-paddingLeft;
695
694
  transition: border-bottom-color $transition_duration-tabs_tab_line-border $transition_function-tabs_tab_line-border $transition_delay-tabs_tab_line-border,
696
695
  color $transition_duration-tabs_tab_line-text $transition_function-tabs_tab_line-text $transition_delay-tabs_tab_line-text; //线条式tabs的border-color 的 transition
696
+ border-bottom: $width-tabs_bar_line_tab-border solid transparent;
697
697
 
698
698
  &:nth-of-type(1) {
699
699
  padding-left: 0;
700
700
  }
701
701
 
702
- border-bottom: $width-tabs_bar_line_tab-border solid transparent;
703
-
704
702
  &:hover {
705
703
  border-bottom: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_default-border-hover;
706
704
  }
package/tag/tag.scss CHANGED
@@ -159,14 +159,13 @@ $types: "ghost", "solid", "light";
159
159
 
160
160
  .#{$module}-group {
161
161
  display: block;
162
+ height: auto;
162
163
 
163
164
  .#{$module} {
164
165
  margin-bottom: $spacing-tag_group-marginBottom;
165
166
  margin-right: $spacing-tag_group-marginRight;
166
167
  }
167
168
 
168
- height: auto;
169
-
170
169
  &-max.#{$module}-group-small {
171
170
  height: ($height-tag_small + 2);
172
171
  }
@@ -17,6 +17,8 @@ export const parseToDate = (input: string | Date | number, formatToken = strings
17
17
  } else if (typeof input === 'number') {
18
18
  return new Date(toNumber(input));
19
19
  } else if (typeof input === 'string') {
20
+ if (input === '') return undefined;
21
+
20
22
  let curDate = new Date();
21
23
 
22
24
  // console.log(input, formatToken);