@douyinfe/semi-foundation 2.20.3 → 2.21.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ interface KeyboardAdapter<P = Record<string, any>, S = Record<string, any>> exte
8
8
  registerKeyDown: (callback: (event: any) => void) => void;
9
9
  unregisterKeyDown: (callback: (event: any) => void) => void;
10
10
  updateFocusIndex: (focusIndex: number) => void;
11
+ notifyKeyDown: (e: any) => void;
11
12
  }
12
13
 
13
14
  export interface DataItem {
@@ -336,6 +337,7 @@ class AutoCompleteFoundation<P = Record<string, any>, S = Record<string, any>> e
336
337
  default:
337
338
  break;
338
339
  }
340
+ this._adapter.notifyKeyDown(event);
339
341
  }
340
342
 
341
343
  _getEnableFocusIndex(offset: number) {
@@ -43,6 +43,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
43
43
  &-extra-extra-small {
44
44
  width: $width-avatar_extra_extra_small;
45
45
  height: $width-avatar_extra_extra_small;
46
+ border-radius: $radius-avatar_extra_extra_small;
46
47
 
47
48
  .#{$module}-content {
48
49
  transform-origin: center;
@@ -58,6 +59,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
58
59
  &-extra-small {
59
60
  width: $width-avatar_extra_small;
60
61
  height: $width-avatar_extra_small;
62
+ border-radius: $radius-avatar_extra_small;
61
63
 
62
64
  .#{$module}-content {
63
65
  transform-origin: center;
@@ -73,6 +75,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
73
75
  &-small {
74
76
  width: $width-avatar_small;
75
77
  height: $width-avatar_small;
78
+ border-radius: $radius-avatar_small;
76
79
 
77
80
  .#{$module}-label {
78
81
  @include font-size-small;
@@ -82,6 +85,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
82
85
  &-default {
83
86
  width: $width-avatar_default;
84
87
  height: $width-avatar_default;
88
+ border-radius: $radius-avatar_default;
85
89
 
86
90
  .#{$module}-label {
87
91
  @include font-size-header-5;
@@ -91,6 +95,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
91
95
  &-medium {
92
96
  width: $width-avatar_medium;
93
97
  height: $width-avatar_medium;
98
+ border-radius: $radius-avatar_medium;
94
99
 
95
100
  .#{$module}-label {
96
101
  @include font-size-header-4;
@@ -100,6 +105,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
100
105
  &-large {
101
106
  width: $width-avatar_large;
102
107
  height: $width-avatar_large;
108
+ border-radius: $radius-avatar_large;
103
109
 
104
110
  .#{$module}-label {
105
111
  @include font-size-header-1;
@@ -109,6 +115,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
109
115
  &-extra-large {
110
116
  width: $width-avatar_extra_large;
111
117
  height: $width-avatar_extra_large;
118
+ border-radius: $radius-avatar_extra_large;
112
119
 
113
120
  .#{$module}-label {
114
121
  font-size: $font-avatar_extra_large-size;
@@ -45,4 +45,13 @@ $spacing-avatar_extra_small-marginLeft: -10px; // 头像左侧外边距 - 超小
45
45
  $width-avatar_extra_extra_small-border: 1px; // 头像描边尺寸 - 极小
46
46
  $spacing-avatar_extra_extra_small-marginLeft: -4px; // 头像左侧外边距 - 极小
47
47
 
48
- $width-avatar-outline: 2px; //头像聚焦轮廓宽度
48
+ $width-avatar-outline: 2px; //头像聚焦轮廓宽度
49
+
50
+ // radius
51
+ $radius-avatar_extra_extra_small: 3px; // 极小尺寸头像的圆角
52
+ $radius-avatar_extra_small: 3px; // 超小尺寸头像的圆角
53
+ $radius-avatar_small: 3px; // 小尺寸头像的圆角
54
+ $radius-avatar_default: 3px; // 默认尺寸头像的圆角
55
+ $radius-avatar_medium: 3px; // 中尺寸头像的圆角
56
+ $radius-avatar_large: 6px; // 大尺寸头像的圆角
57
+ $radius-avatar_extra_large: 12px; // 超大尺寸头像的圆角
@@ -47,6 +47,7 @@ class CarouselFoundation<P = Record<string, any>, S = Record<string, any>> exten
47
47
  }
48
48
 
49
49
  next(): void {
50
+ this.stop();
50
51
  const { activeIndex: stateActiveIndex } = this.getStates();
51
52
  const targetIndex = this.getValidIndex(stateActiveIndex + 1);
52
53
  this._adapter.setIsReverse(false);
@@ -56,9 +57,11 @@ class CarouselFoundation<P = Record<string, any>, S = Record<string, any>> exten
56
57
  this._notifyChange(targetIndex);
57
58
  this.handleNewActiveIndex(targetIndex);
58
59
  }
60
+ this.handleAutoPlay();
59
61
  }
60
62
 
61
63
  prev(): void {
64
+ this.stop();
62
65
  const { activeIndex: stateActiveIndex } = this.getStates();
63
66
  const targetIndex = this.getValidIndex(stateActiveIndex - 1);
64
67
  this._adapter.setIsReverse(true);
@@ -68,6 +71,7 @@ class CarouselFoundation<P = Record<string, any>, S = Record<string, any>> exten
68
71
  this._notifyChange(targetIndex);
69
72
  this.handleNewActiveIndex(targetIndex);
70
73
  }
74
+ this.handleAutoPlay();
71
75
  }
72
76
 
73
77
  destroy(): void {
@@ -190,7 +190,7 @@ export default class InputFoundation extends BaseFoundation<DateInputAdapter> {
190
190
  const { valuePath, insetInputValue, format } = options;
191
191
  const { type, defaultPickerValue, dateFnsLocale } = this._adapter.getProps();
192
192
  const insetInputValueWithTime = cloneDeep(insetInputValue);
193
- const { nowDate, nextDate } = getDefaultPickerDate({ defaultPickerValue, format, dateFnsLocale });
193
+ const { nowDate, nextDate } = getDefaultPickerDate({ defaultPickerValue, format, dateFnsLocale });
194
194
 
195
195
  if (type.includes('Time')) {
196
196
  let timeStr = '';
@@ -3,6 +3,7 @@ interface KeyboardAdapter<P = Record<string, any>, S = Record<string, any>> exte
3
3
  registerKeyDown: (callback: (event: any) => void) => void;
4
4
  unregisterKeyDown: (callback: (event: any) => void) => void;
5
5
  updateFocusIndex: (focusIndex: number) => void;
6
+ notifyKeyDown: (e: any) => void;
6
7
  }
7
8
  export interface DataItem {
8
9
  [x: string]: any;
@@ -395,6 +395,8 @@ class AutoCompleteFoundation extends _foundation.default {
395
395
  default:
396
396
  break;
397
397
  }
398
+
399
+ this._adapter.notifyKeyDown(event);
398
400
  }
399
401
 
400
402
  _getEnableFocusIndex(offset) {
@@ -34,6 +34,7 @@
34
34
  .semi-avatar-extra-extra-small {
35
35
  width: 20px;
36
36
  height: 20px;
37
+ border-radius: 3px;
37
38
  }
38
39
  .semi-avatar-extra-extra-small .semi-avatar-content {
39
40
  transform-origin: center;
@@ -46,6 +47,7 @@
46
47
  .semi-avatar-extra-small {
47
48
  width: 24px;
48
49
  height: 24px;
50
+ border-radius: 3px;
49
51
  }
50
52
  .semi-avatar-extra-small .semi-avatar-content {
51
53
  transform-origin: center;
@@ -58,6 +60,7 @@
58
60
  .semi-avatar-small {
59
61
  width: 32px;
60
62
  height: 32px;
63
+ border-radius: 3px;
61
64
  }
62
65
  .semi-avatar-small .semi-avatar-label {
63
66
  font-size: 12px;
@@ -67,6 +70,7 @@
67
70
  .semi-avatar-default {
68
71
  width: 40px;
69
72
  height: 40px;
73
+ border-radius: 3px;
70
74
  }
71
75
  .semi-avatar-default .semi-avatar-label {
72
76
  font-size: 18px;
@@ -76,6 +80,7 @@
76
80
  .semi-avatar-medium {
77
81
  width: 48px;
78
82
  height: 48px;
83
+ border-radius: 3px;
79
84
  }
80
85
  .semi-avatar-medium .semi-avatar-label {
81
86
  font-size: 20px;
@@ -85,6 +90,7 @@
85
90
  .semi-avatar-large {
86
91
  width: 72px;
87
92
  height: 72px;
93
+ border-radius: 6px;
88
94
  }
89
95
  .semi-avatar-large .semi-avatar-label {
90
96
  font-size: 32px;
@@ -94,6 +100,7 @@
94
100
  .semi-avatar-extra-large {
95
101
  width: 128px;
96
102
  height: 128px;
103
+ border-radius: 12px;
97
104
  }
98
105
  .semi-avatar-extra-large .semi-avatar-label {
99
106
  font-size: 64px;
@@ -43,6 +43,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
43
43
  &-extra-extra-small {
44
44
  width: $width-avatar_extra_extra_small;
45
45
  height: $width-avatar_extra_extra_small;
46
+ border-radius: $radius-avatar_extra_extra_small;
46
47
 
47
48
  .#{$module}-content {
48
49
  transform-origin: center;
@@ -58,6 +59,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
58
59
  &-extra-small {
59
60
  width: $width-avatar_extra_small;
60
61
  height: $width-avatar_extra_small;
62
+ border-radius: $radius-avatar_extra_small;
61
63
 
62
64
  .#{$module}-content {
63
65
  transform-origin: center;
@@ -73,6 +75,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
73
75
  &-small {
74
76
  width: $width-avatar_small;
75
77
  height: $width-avatar_small;
78
+ border-radius: $radius-avatar_small;
76
79
 
77
80
  .#{$module}-label {
78
81
  @include font-size-small;
@@ -82,6 +85,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
82
85
  &-default {
83
86
  width: $width-avatar_default;
84
87
  height: $width-avatar_default;
88
+ border-radius: $radius-avatar_default;
85
89
 
86
90
  .#{$module}-label {
87
91
  @include font-size-header-5;
@@ -91,6 +95,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
91
95
  &-medium {
92
96
  width: $width-avatar_medium;
93
97
  height: $width-avatar_medium;
98
+ border-radius: $radius-avatar_medium;
94
99
 
95
100
  .#{$module}-label {
96
101
  @include font-size-header-4;
@@ -100,6 +105,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
100
105
  &-large {
101
106
  width: $width-avatar_large;
102
107
  height: $width-avatar_large;
108
+ border-radius: $radius-avatar_large;
103
109
 
104
110
  .#{$module}-label {
105
111
  @include font-size-header-1;
@@ -109,6 +115,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
109
115
  &-extra-large {
110
116
  width: $width-avatar_extra_large;
111
117
  height: $width-avatar_extra_large;
118
+ border-radius: $radius-avatar_extra_large;
112
119
 
113
120
  .#{$module}-label {
114
121
  font-size: $font-avatar_extra_large-size;
@@ -45,4 +45,13 @@ $spacing-avatar_extra_small-marginLeft: -10px; // 头像左侧外边距 - 超小
45
45
  $width-avatar_extra_extra_small-border: 1px; // 头像描边尺寸 - 极小
46
46
  $spacing-avatar_extra_extra_small-marginLeft: -4px; // 头像左侧外边距 - 极小
47
47
 
48
- $width-avatar-outline: 2px; //头像聚焦轮廓宽度
48
+ $width-avatar-outline: 2px; //头像聚焦轮廓宽度
49
+
50
+ // radius
51
+ $radius-avatar_extra_extra_small: 3px; // 极小尺寸头像的圆角
52
+ $radius-avatar_extra_small: 3px; // 超小尺寸头像的圆角
53
+ $radius-avatar_small: 3px; // 小尺寸头像的圆角
54
+ $radius-avatar_default: 3px; // 默认尺寸头像的圆角
55
+ $radius-avatar_medium: 3px; // 中尺寸头像的圆角
56
+ $radius-avatar_large: 6px; // 大尺寸头像的圆角
57
+ $radius-avatar_extra_large: 12px; // 超大尺寸头像的圆角
@@ -55,6 +55,7 @@ class CarouselFoundation extends _foundation.default {
55
55
  }
56
56
 
57
57
  next() {
58
+ this.stop();
58
59
  const {
59
60
  activeIndex: stateActiveIndex
60
61
  } = this.getStates();
@@ -69,9 +70,12 @@ class CarouselFoundation extends _foundation.default {
69
70
 
70
71
  this.handleNewActiveIndex(targetIndex);
71
72
  }
73
+
74
+ this.handleAutoPlay();
72
75
  }
73
76
 
74
77
  prev() {
78
+ this.stop();
75
79
  const {
76
80
  activeIndex: stateActiveIndex
77
81
  } = this.getStates();
@@ -86,6 +90,8 @@ class CarouselFoundation extends _foundation.default {
86
90
 
87
91
  this.handleNewActiveIndex(targetIndex);
88
92
  }
93
+
94
+ this.handleAutoPlay();
89
95
  }
90
96
 
91
97
  destroy() {
@@ -669,24 +669,30 @@ class SelectFoundation extends _foundation.default {
669
669
  }
670
670
 
671
671
  clearInput() {
672
- this._adapter.updateInputValue('');
672
+ const {
673
+ inputValue
674
+ } = this.getStates(); // only when input is not null, select should notifySearch and updateOptions
673
675
 
674
- this._adapter.notifySearch(''); // reset options filter
676
+ if (inputValue !== '') {
677
+ this._adapter.updateInputValue('');
675
678
 
679
+ this._adapter.notifySearch(''); // reset options filter
676
680
 
677
- const {
678
- options
679
- } = this.getStates();
680
- const {
681
- remote
682
- } = this.getProps();
683
- let optionsAfterFilter = options;
684
681
 
685
- if (!remote) {
686
- optionsAfterFilter = this._filterOption(options, '');
687
- }
682
+ const {
683
+ options
684
+ } = this.getStates();
685
+ const {
686
+ remote
687
+ } = this.getProps();
688
+ let optionsAfterFilter = options;
688
689
 
689
- this._adapter.updateOptions(optionsAfterFilter);
690
+ if (!remote) {
691
+ optionsAfterFilter = this._filterOption(options, '');
692
+ }
693
+
694
+ this._adapter.updateOptions(optionsAfterFilter);
695
+ }
690
696
  }
691
697
 
692
698
  focusInput() {
@@ -81,6 +81,13 @@
81
81
  background-color: transparent;
82
82
  border-bottom: 2px solid var(--semi-color-border);
83
83
  }
84
+ .semi-table-header-sticky {
85
+ position: sticky;
86
+ z-index: 102;
87
+ }
88
+ .semi-table-header-sticky .semi-table-thead > .semi-table-row > .semi-table-row-head {
89
+ background-color: var(--semi-color-bg-2);
90
+ }
84
91
  .semi-table-body {
85
92
  overflow: auto;
86
93
  width: 100%;
@@ -64,6 +64,15 @@ $module: #{$prefix}-table;
64
64
  border-bottom: $width-table_header_border $border-table_base-borderStyle $color-table_th-border-default;
65
65
  }
66
66
  scrollbar-base-color: transparent;
67
+
68
+ &-sticky {
69
+ position: sticky;
70
+ z-index: $z-table_fixed_column + 1;
71
+
72
+ .semi-table-thead > .semi-table-row > .semi-table-row-head {
73
+ background-color: $color-table-bg-default;
74
+ }
75
+ }
67
76
  }
68
77
 
69
78
  &-body {
@@ -3,6 +3,7 @@ interface KeyboardAdapter<P = Record<string, any>, S = Record<string, any>> exte
3
3
  registerKeyDown: (callback: (event: any) => void) => void;
4
4
  unregisterKeyDown: (callback: (event: any) => void) => void;
5
5
  updateFocusIndex: (focusIndex: number) => void;
6
+ notifyKeyDown: (e: any) => void;
6
7
  }
7
8
  export interface DataItem {
8
9
  [x: string]: any;
@@ -381,6 +381,8 @@ class AutoCompleteFoundation extends BaseFoundation {
381
381
  default:
382
382
  break;
383
383
  }
384
+
385
+ this._adapter.notifyKeyDown(event);
384
386
  }
385
387
 
386
388
  _getEnableFocusIndex(offset) {
@@ -34,6 +34,7 @@
34
34
  .semi-avatar-extra-extra-small {
35
35
  width: 20px;
36
36
  height: 20px;
37
+ border-radius: 3px;
37
38
  }
38
39
  .semi-avatar-extra-extra-small .semi-avatar-content {
39
40
  transform-origin: center;
@@ -46,6 +47,7 @@
46
47
  .semi-avatar-extra-small {
47
48
  width: 24px;
48
49
  height: 24px;
50
+ border-radius: 3px;
49
51
  }
50
52
  .semi-avatar-extra-small .semi-avatar-content {
51
53
  transform-origin: center;
@@ -58,6 +60,7 @@
58
60
  .semi-avatar-small {
59
61
  width: 32px;
60
62
  height: 32px;
63
+ border-radius: 3px;
61
64
  }
62
65
  .semi-avatar-small .semi-avatar-label {
63
66
  font-size: 12px;
@@ -67,6 +70,7 @@
67
70
  .semi-avatar-default {
68
71
  width: 40px;
69
72
  height: 40px;
73
+ border-radius: 3px;
70
74
  }
71
75
  .semi-avatar-default .semi-avatar-label {
72
76
  font-size: 18px;
@@ -76,6 +80,7 @@
76
80
  .semi-avatar-medium {
77
81
  width: 48px;
78
82
  height: 48px;
83
+ border-radius: 3px;
79
84
  }
80
85
  .semi-avatar-medium .semi-avatar-label {
81
86
  font-size: 20px;
@@ -85,6 +90,7 @@
85
90
  .semi-avatar-large {
86
91
  width: 72px;
87
92
  height: 72px;
93
+ border-radius: 6px;
88
94
  }
89
95
  .semi-avatar-large .semi-avatar-label {
90
96
  font-size: 32px;
@@ -94,6 +100,7 @@
94
100
  .semi-avatar-extra-large {
95
101
  width: 128px;
96
102
  height: 128px;
103
+ border-radius: 12px;
97
104
  }
98
105
  .semi-avatar-extra-large .semi-avatar-label {
99
106
  font-size: 64px;
@@ -43,6 +43,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
43
43
  &-extra-extra-small {
44
44
  width: $width-avatar_extra_extra_small;
45
45
  height: $width-avatar_extra_extra_small;
46
+ border-radius: $radius-avatar_extra_extra_small;
46
47
 
47
48
  .#{$module}-content {
48
49
  transform-origin: center;
@@ -58,6 +59,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
58
59
  &-extra-small {
59
60
  width: $width-avatar_extra_small;
60
61
  height: $width-avatar_extra_small;
62
+ border-radius: $radius-avatar_extra_small;
61
63
 
62
64
  .#{$module}-content {
63
65
  transform-origin: center;
@@ -73,6 +75,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
73
75
  &-small {
74
76
  width: $width-avatar_small;
75
77
  height: $width-avatar_small;
78
+ border-radius: $radius-avatar_small;
76
79
 
77
80
  .#{$module}-label {
78
81
  @include font-size-small;
@@ -82,6 +85,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
82
85
  &-default {
83
86
  width: $width-avatar_default;
84
87
  height: $width-avatar_default;
88
+ border-radius: $radius-avatar_default;
85
89
 
86
90
  .#{$module}-label {
87
91
  @include font-size-header-5;
@@ -91,6 +95,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
91
95
  &-medium {
92
96
  width: $width-avatar_medium;
93
97
  height: $width-avatar_medium;
98
+ border-radius: $radius-avatar_medium;
94
99
 
95
100
  .#{$module}-label {
96
101
  @include font-size-header-4;
@@ -100,6 +105,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
100
105
  &-large {
101
106
  width: $width-avatar_large;
102
107
  height: $width-avatar_large;
108
+ border-radius: $radius-avatar_large;
103
109
 
104
110
  .#{$module}-label {
105
111
  @include font-size-header-1;
@@ -109,6 +115,7 @@ $colors: 'amber', 'blue', 'cyan', 'green', 'grey', 'indigo', 'light-blue', 'ligh
109
115
  &-extra-large {
110
116
  width: $width-avatar_extra_large;
111
117
  height: $width-avatar_extra_large;
118
+ border-radius: $radius-avatar_extra_large;
112
119
 
113
120
  .#{$module}-label {
114
121
  font-size: $font-avatar_extra_large-size;
@@ -45,4 +45,13 @@ $spacing-avatar_extra_small-marginLeft: -10px; // 头像左侧外边距 - 超小
45
45
  $width-avatar_extra_extra_small-border: 1px; // 头像描边尺寸 - 极小
46
46
  $spacing-avatar_extra_extra_small-marginLeft: -4px; // 头像左侧外边距 - 极小
47
47
 
48
- $width-avatar-outline: 2px; //头像聚焦轮廓宽度
48
+ $width-avatar-outline: 2px; //头像聚焦轮廓宽度
49
+
50
+ // radius
51
+ $radius-avatar_extra_extra_small: 3px; // 极小尺寸头像的圆角
52
+ $radius-avatar_extra_small: 3px; // 超小尺寸头像的圆角
53
+ $radius-avatar_small: 3px; // 小尺寸头像的圆角
54
+ $radius-avatar_default: 3px; // 默认尺寸头像的圆角
55
+ $radius-avatar_medium: 3px; // 中尺寸头像的圆角
56
+ $radius-avatar_large: 6px; // 大尺寸头像的圆角
57
+ $radius-avatar_extra_large: 12px; // 超大尺寸头像的圆角
@@ -43,6 +43,7 @@ class CarouselFoundation extends BaseFoundation {
43
43
  }
44
44
 
45
45
  next() {
46
+ this.stop();
46
47
  const {
47
48
  activeIndex: stateActiveIndex
48
49
  } = this.getStates();
@@ -57,9 +58,12 @@ class CarouselFoundation extends BaseFoundation {
57
58
 
58
59
  this.handleNewActiveIndex(targetIndex);
59
60
  }
61
+
62
+ this.handleAutoPlay();
60
63
  }
61
64
 
62
65
  prev() {
66
+ this.stop();
63
67
  const {
64
68
  activeIndex: stateActiveIndex
65
69
  } = this.getStates();
@@ -74,6 +78,8 @@ class CarouselFoundation extends BaseFoundation {
74
78
 
75
79
  this.handleNewActiveIndex(targetIndex);
76
80
  }
81
+
82
+ this.handleAutoPlay();
77
83
  }
78
84
 
79
85
  destroy() {
@@ -647,24 +647,30 @@ export default class SelectFoundation extends BaseFoundation {
647
647
  }
648
648
 
649
649
  clearInput() {
650
- this._adapter.updateInputValue('');
650
+ const {
651
+ inputValue
652
+ } = this.getStates(); // only when input is not null, select should notifySearch and updateOptions
651
653
 
652
- this._adapter.notifySearch(''); // reset options filter
654
+ if (inputValue !== '') {
655
+ this._adapter.updateInputValue('');
653
656
 
657
+ this._adapter.notifySearch(''); // reset options filter
654
658
 
655
- const {
656
- options
657
- } = this.getStates();
658
- const {
659
- remote
660
- } = this.getProps();
661
- let optionsAfterFilter = options;
662
659
 
663
- if (!remote) {
664
- optionsAfterFilter = this._filterOption(options, '');
665
- }
660
+ const {
661
+ options
662
+ } = this.getStates();
663
+ const {
664
+ remote
665
+ } = this.getProps();
666
+ let optionsAfterFilter = options;
666
667
 
667
- this._adapter.updateOptions(optionsAfterFilter);
668
+ if (!remote) {
669
+ optionsAfterFilter = this._filterOption(options, '');
670
+ }
671
+
672
+ this._adapter.updateOptions(optionsAfterFilter);
673
+ }
668
674
  }
669
675
 
670
676
  focusInput() {
@@ -81,6 +81,13 @@
81
81
  background-color: transparent;
82
82
  border-bottom: 2px solid var(--semi-color-border);
83
83
  }
84
+ .semi-table-header-sticky {
85
+ position: sticky;
86
+ z-index: 102;
87
+ }
88
+ .semi-table-header-sticky .semi-table-thead > .semi-table-row > .semi-table-row-head {
89
+ background-color: var(--semi-color-bg-2);
90
+ }
84
91
  .semi-table-body {
85
92
  overflow: auto;
86
93
  width: 100%;
@@ -64,6 +64,15 @@ $module: #{$prefix}-table;
64
64
  border-bottom: $width-table_header_border $border-table_base-borderStyle $color-table_th-border-default;
65
65
  }
66
66
  scrollbar-base-color: transparent;
67
+
68
+ &-sticky {
69
+ position: sticky;
70
+ z-index: $z-table_fixed_column + 1;
71
+
72
+ .semi-table-thead > .semi-table-row > .semi-table-row-head {
73
+ background-color: $color-table-bg-default;
74
+ }
75
+ }
67
76
  }
68
77
 
69
78
  &-body {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.20.3",
3
+ "version": "2.21.0-beta.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "f3c92641b8e004623a6e644af93eb0718290956d",
26
+ "gitHead": "83a02f240c306ad1602926f9a020e5e96530720b",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -126,7 +126,7 @@ export default class RatingFoundation<P = Record<string, any>, S = Record<string
126
126
  let tempValue: number;
127
127
  let newValue: number;
128
128
  if (key === 'ArrowRight' || key === 'ArrowUp') {
129
- tempValue = value + (reverse ? - step : step);
129
+ tempValue = value + (reverse ? - step : step);
130
130
  } else if (key === 'ArrowLeft' || key === 'ArrowDown') {
131
131
  tempValue = value + (reverse ? step : - step);
132
132
  }
@@ -523,16 +523,20 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
523
523
  }
524
524
 
525
525
  clearInput() {
526
- this._adapter.updateInputValue('');
527
- this._adapter.notifySearch('');
528
- // reset options filter
529
- const { options } = this.getStates();
530
- const { remote } = this.getProps();
531
- let optionsAfterFilter = options;
532
- if (!remote) {
533
- optionsAfterFilter = this._filterOption(options, '');
526
+ const { inputValue } = this.getStates();
527
+ // only when input is not null, select should notifySearch and updateOptions
528
+ if (inputValue !== ''){
529
+ this._adapter.updateInputValue('');
530
+ this._adapter.notifySearch('');
531
+ // reset options filter
532
+ const { options } = this.getStates();
533
+ const { remote } = this.getProps();
534
+ let optionsAfterFilter = options;
535
+ if (!remote) {
536
+ optionsAfterFilter = this._filterOption(options, '');
537
+ }
538
+ this._adapter.updateOptions(optionsAfterFilter);
534
539
  }
535
- this._adapter.updateOptions(optionsAfterFilter);
536
540
  }
537
541
 
538
542
  focusInput() {
package/table/table.scss CHANGED
@@ -64,6 +64,15 @@ $module: #{$prefix}-table;
64
64
  border-bottom: $width-table_header_border $border-table_base-borderStyle $color-table_th-border-default;
65
65
  }
66
66
  scrollbar-base-color: transparent;
67
+
68
+ &-sticky {
69
+ position: sticky;
70
+ z-index: $z-table_fixed_column + 1;
71
+
72
+ .semi-table-thead > .semi-table-row > .semi-table-row-head {
73
+ background-color: $color-table-bg-default;
74
+ }
75
+ }
67
76
  }
68
77
 
69
78
  &-body {
@@ -116,12 +116,12 @@ class TabsFoundation<P = Record<string, any>, S = Record<string, any>> extends B
116
116
  const isVertical = tabPosition === 'left';
117
117
 
118
118
  if (isVertical) {
119
- if (event.key === "ArrowUp" || event.key === "ArrowDown") {
119
+ if (event.key === "ArrowUp" || event.key === "ArrowDown") {
120
120
  this.switchTabOnArrowPress(event, tabs);
121
121
  this.handlePrevent(event);
122
122
  }
123
123
  } else {
124
- if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
124
+ if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
125
125
  this.switchTabOnArrowPress(event, tabs);
126
126
  this.handlePrevent(event);
127
127
  }
@@ -158,7 +158,7 @@ class TabsFoundation<P = Record<string, any>, S = Record<string, any>> extends B
158
158
  tabs[index+ direction[event.key]].focus({ preventScroll });
159
159
  } else if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
160
160
  tabs[tabs.length - 1].focus({ preventScroll }); // focus last tab
161
- } else if (event.key === "ArrowRight" || event.key == "ArrowDown") {
161
+ } else if (event.key === "ArrowRight" || event.key == "ArrowDown") {
162
162
  tabs[0].focus({ preventScroll }); // focus first tab
163
163
  }
164
164
  }
@@ -27,7 +27,7 @@ export interface MergeMotionProps {
27
27
  * @param { props: Object }
28
28
  * @returns { motion: Object }
29
29
  */
30
- export default function getMotionObjFromProps(props: MergeMotionProps) {
30
+ export default function getMotionObjFromProps(props: MergeMotionProps) {
31
31
  if (typeof props !== 'object' || props === null) {
32
32
  throw new TypeError(`props should be object type, got ${typeof props}`);
33
33
  }