@douyinfe/semi-foundation 2.38.2 → 2.40.0-alpha.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.
- package/anchor/foundation.ts +7 -4
- package/lib/cjs/anchor/foundation.js +8 -3
- package/lib/cjs/select/select.css +35 -0
- package/lib/cjs/select/select.scss +63 -11
- package/lib/cjs/select/variables.scss +10 -0
- package/lib/cjs/switch/switch.css +6 -0
- package/lib/cjs/switch/switch.scss +8 -2
- package/lib/cjs/treeSelect/treeSelect.css +8 -1
- package/lib/cjs/treeSelect/treeSelect.scss +9 -1
- package/lib/es/anchor/foundation.js +8 -3
- package/lib/es/select/select.css +35 -0
- package/lib/es/select/select.scss +63 -11
- package/lib/es/select/variables.scss +10 -0
- package/lib/es/switch/switch.css +6 -0
- package/lib/es/switch/switch.scss +8 -2
- package/lib/es/treeSelect/treeSelect.css +8 -1
- package/lib/es/treeSelect/treeSelect.scss +9 -1
- package/package.json +3 -3
- package/select/select.scss +63 -11
- package/select/variables.scss +10 -0
- package/switch/switch.scss +8 -2
- package/treeSelect/treeSelect.scss +9 -1
package/anchor/foundation.ts
CHANGED
|
@@ -171,7 +171,7 @@ export default class AnchorFoundation<P = Record<string, any>, S = Record<string
|
|
|
171
171
|
* 2. There is a scroll axis (clientHeight < scrollHeight | | clientWidth < scrollWidth)
|
|
172
172
|
* 3.overflowX or overflowY has a value and is not visible or clip
|
|
173
173
|
* For details, please see https://github.com/stipsan/compute-scroll-into-view
|
|
174
|
-
*
|
|
174
|
+
*
|
|
175
175
|
* behavior定义滚动行为
|
|
176
176
|
* - 可选 'auto' | 'smooth' | Function
|
|
177
177
|
* - Function 自定义滚动行为
|
|
@@ -184,9 +184,12 @@ export default class AnchorFoundation<P = Record<string, any>, S = Record<string
|
|
|
184
184
|
*/
|
|
185
185
|
behavior: actions => {
|
|
186
186
|
// We just need to scroll the innermost target container
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
const verticalScrollAction = actions.find(action => {
|
|
188
|
+
const { el } = action;
|
|
189
|
+
return el.scrollHeight > el.clientHeight;
|
|
190
|
+
});
|
|
191
|
+
const el = get(verticalScrollAction, 'el');
|
|
192
|
+
const top = get(verticalScrollAction, 'top');
|
|
190
193
|
if (el) {
|
|
191
194
|
const offsetTop = top - targetOffset;
|
|
192
195
|
if (el.scroll && canSmoothScroll) {
|
|
@@ -165,9 +165,14 @@ class AnchorFoundation extends _foundation.default {
|
|
|
165
165
|
*/
|
|
166
166
|
behavior: actions => {
|
|
167
167
|
// We just need to scroll the innermost target container
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
const verticalScrollAction = actions.find(action => {
|
|
169
|
+
const {
|
|
170
|
+
el
|
|
171
|
+
} = action;
|
|
172
|
+
return el.scrollHeight > el.clientHeight;
|
|
173
|
+
});
|
|
174
|
+
const el = (0, _get2.default)(verticalScrollAction, 'el');
|
|
175
|
+
const top = (0, _get2.default)(verticalScrollAction, 'top');
|
|
171
176
|
if (el) {
|
|
172
177
|
const offsetTop = top - targetOffset;
|
|
173
178
|
if (el.scroll && canSmoothScroll) {
|
|
@@ -445,9 +445,44 @@
|
|
|
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
|
+
}
|
|
448
463
|
.semi-select-borderless:focus-within:not(:active) {
|
|
449
464
|
background-color: transparent;
|
|
450
465
|
}
|
|
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
|
+
}
|
|
451
486
|
.semi-select-borderless.semi-select-error:not(:focus-within) {
|
|
452
487
|
border-color: var(--semi-color-danger);
|
|
453
488
|
}
|
|
@@ -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,6 +52,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
52
52
|
&-large {
|
|
53
53
|
min-height: $height-select_large;
|
|
54
54
|
line-height: $height-select_large;
|
|
55
|
+
|
|
55
56
|
.#{$module}-selection {
|
|
56
57
|
@include font-size-header-6;
|
|
57
58
|
}
|
|
@@ -196,6 +197,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
196
197
|
|
|
197
198
|
.#{$prefix}-tag-group {
|
|
198
199
|
height: inherit;
|
|
200
|
+
|
|
199
201
|
.#{$prefix}-tag {
|
|
200
202
|
@include select-tag-margin;
|
|
201
203
|
}
|
|
@@ -326,6 +328,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
326
328
|
width: $width-select_clear-icon;
|
|
327
329
|
color: $color-select_clearBtn-text-default;
|
|
328
330
|
flex-shrink: 0;
|
|
331
|
+
|
|
329
332
|
&:hover {
|
|
330
333
|
color: $color-select_clearBtn-text-hover;
|
|
331
334
|
}
|
|
@@ -435,6 +438,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
435
438
|
.#{$module}-option-list {
|
|
436
439
|
overflow-x: hidden;
|
|
437
440
|
overflow-y: auto;
|
|
441
|
+
|
|
438
442
|
&-chosen {
|
|
439
443
|
.#{$module}-option-icon {
|
|
440
444
|
display: flex;
|
|
@@ -475,36 +479,84 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
475
479
|
|
|
476
480
|
.#{$module}-borderless {
|
|
477
481
|
|
|
478
|
-
&:not(:focus-within):not(:hover){
|
|
479
|
-
background-color:
|
|
480
|
-
border-color:
|
|
482
|
+
&:not(:focus-within):not(:hover) {
|
|
483
|
+
background-color: $color-select_borderless-bg-default;
|
|
484
|
+
border-color: $color-select_borderless-border-default;
|
|
485
|
+
|
|
481
486
|
.#{$module}-arrow {
|
|
482
487
|
opacity: 0;
|
|
483
488
|
}
|
|
489
|
+
|
|
490
|
+
&.#{$module}-borderless-arrow {
|
|
491
|
+
.#{$module}-arrow {
|
|
492
|
+
opacity: 1;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
484
495
|
}
|
|
485
496
|
|
|
486
|
-
&:
|
|
487
|
-
background-color:
|
|
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
|
+
}
|
|
488
540
|
}
|
|
489
541
|
|
|
490
542
|
// split style into not and normal to avoid style override
|
|
491
|
-
&.#{$module}-error:not(:focus-within){
|
|
543
|
+
&.#{$module}-error:not(:focus-within) {
|
|
492
544
|
border-color: $color-select_danger-border-focus;
|
|
493
545
|
}
|
|
494
546
|
|
|
495
|
-
&.#{$module}-warning:not(:focus-within){
|
|
547
|
+
&.#{$module}-warning:not(:focus-within) {
|
|
496
548
|
border-color: $color-select_warning-border-focus;
|
|
497
549
|
}
|
|
498
550
|
|
|
499
|
-
&.#{$module}-error:focus-within{
|
|
551
|
+
&.#{$module}-error:focus-within {
|
|
500
552
|
border-color: $color-select_danger-border-focus;
|
|
501
553
|
}
|
|
502
554
|
|
|
503
|
-
&.#{$module}-warning:focus-within{
|
|
555
|
+
&.#{$module}-warning:focus-within {
|
|
504
556
|
border-color: $color-select_warning-border-focus;
|
|
505
557
|
}
|
|
506
558
|
|
|
507
559
|
}
|
|
508
560
|
|
|
509
561
|
|
|
510
|
-
|
|
562
|
+
@import './rtl.scss';
|
|
@@ -47,6 +47,16 @@ $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 禁用选择器输入框背景色 - 禁用态
|
|
50
60
|
|
|
51
61
|
// Width/Height
|
|
52
62
|
$width-select_icon_right: ($width-icon-medium + $spacing-tight * 2); // 选择器右侧图标大小
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
.semi-switch-disabled:active {
|
|
52
52
|
background-color: transparent;
|
|
53
53
|
}
|
|
54
|
+
.semi-switch-disabled:active .semi-switch-knob {
|
|
55
|
+
width: 18px;
|
|
56
|
+
}
|
|
54
57
|
.semi-switch-disabled .semi-switch-knob {
|
|
55
58
|
cursor: not-allowed;
|
|
56
59
|
box-shadow: none;
|
|
@@ -64,6 +67,9 @@
|
|
|
64
67
|
border-color: transparent;
|
|
65
68
|
background-color: var(--semi-color-success-disabled);
|
|
66
69
|
}
|
|
70
|
+
.semi-switch-disabled.semi-switch-checked:active .semi-switch-knob {
|
|
71
|
+
transform: translateX(18px);
|
|
72
|
+
}
|
|
67
73
|
.semi-switch-disabled.semi-switch-checked .semi-switch-knob {
|
|
68
74
|
box-shadow: none;
|
|
69
75
|
border: none;
|
|
@@ -25,9 +25,7 @@ $module: #{$prefix}-switch;
|
|
|
25
25
|
|
|
26
26
|
&:active {
|
|
27
27
|
border: $border-thickness-control $color-switch_default-bg-active solid;
|
|
28
|
-
|
|
29
28
|
.#{$module}-knob {
|
|
30
|
-
// width: $knob-size + $knob-active-expand;
|
|
31
29
|
width: $width-switch_knob_active;
|
|
32
30
|
}
|
|
33
31
|
}
|
|
@@ -69,6 +67,9 @@ $module: #{$prefix}-switch;
|
|
|
69
67
|
|
|
70
68
|
&:active {
|
|
71
69
|
background-color: $color-switch_disabled-bg-active;
|
|
70
|
+
.#{$module}-knob {
|
|
71
|
+
width: $width-switch_knob_default;
|
|
72
|
+
}
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
.#{$module}-knob {
|
|
@@ -85,6 +86,11 @@ $module: #{$prefix}-switch;
|
|
|
85
86
|
&.#{$module}-checked {
|
|
86
87
|
border-color: $color-switch_checked_disabled-border-default;
|
|
87
88
|
background-color: $color-switch_checked_disabled-bg-default;
|
|
89
|
+
&:active {
|
|
90
|
+
.#{$module}-knob {
|
|
91
|
+
transform: translateX($spacing-switch_checked-translateX);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
88
94
|
.#{$module}-knob {
|
|
89
95
|
@include shadow-0;
|
|
90
96
|
border: none;
|
|
@@ -108,11 +108,14 @@
|
|
|
108
108
|
padding-right: 0;
|
|
109
109
|
cursor: pointer;
|
|
110
110
|
color: var(--semi-color-text-0);
|
|
111
|
+
position: relative;
|
|
111
112
|
}
|
|
112
|
-
.semi-tree-select-selection-
|
|
113
|
+
.semi-tree-select-selection-content {
|
|
113
114
|
overflow: hidden;
|
|
114
115
|
white-space: nowrap;
|
|
115
116
|
text-overflow: ellipsis;
|
|
117
|
+
}
|
|
118
|
+
.semi-tree-select-selection-placeholder {
|
|
116
119
|
color: var(--semi-color-text-2);
|
|
117
120
|
}
|
|
118
121
|
.semi-tree-select-selection .semi-tag-group {
|
|
@@ -126,6 +129,10 @@
|
|
|
126
129
|
}
|
|
127
130
|
.semi-tree-select-selection-TriggerSearchItem {
|
|
128
131
|
position: absolute;
|
|
132
|
+
max-width: calc(100% - 12px);
|
|
133
|
+
text-overflow: ellipsis;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
white-space: nowrap;
|
|
129
136
|
}
|
|
130
137
|
.semi-tree-select-selection-TriggerSearchItem-placeholder {
|
|
131
138
|
opacity: 0.6;
|
|
@@ -133,11 +133,15 @@ $module: #{$prefix}-tree-select;
|
|
|
133
133
|
padding-right: 0;
|
|
134
134
|
cursor: pointer;
|
|
135
135
|
color: $color-treeSelect_selection-text-default;
|
|
136
|
+
position: relative;
|
|
136
137
|
|
|
137
|
-
&-
|
|
138
|
+
&-content {
|
|
138
139
|
overflow: hidden;
|
|
139
140
|
white-space: nowrap;
|
|
140
141
|
text-overflow: ellipsis;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&-placeholder {
|
|
141
145
|
color: $color-treeSelect_input_placeholder-text-default;
|
|
142
146
|
}
|
|
143
147
|
|
|
@@ -154,6 +158,10 @@ $module: #{$prefix}-tree-select;
|
|
|
154
158
|
|
|
155
159
|
&-TriggerSearchItem {
|
|
156
160
|
position: absolute;
|
|
161
|
+
max-width: calc(100% - $spacing-treeSelect_selection-paddingLeft);
|
|
162
|
+
text-overflow: ellipsis;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
white-space: nowrap;
|
|
157
165
|
|
|
158
166
|
&-placeholder {
|
|
159
167
|
opacity: .6;
|
|
@@ -158,9 +158,14 @@ export default class AnchorFoundation extends BaseFoundation {
|
|
|
158
158
|
*/
|
|
159
159
|
behavior: actions => {
|
|
160
160
|
// We just need to scroll the innermost target container
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
const verticalScrollAction = actions.find(action => {
|
|
162
|
+
const {
|
|
163
|
+
el
|
|
164
|
+
} = action;
|
|
165
|
+
return el.scrollHeight > el.clientHeight;
|
|
166
|
+
});
|
|
167
|
+
const el = _get(verticalScrollAction, 'el');
|
|
168
|
+
const top = _get(verticalScrollAction, 'top');
|
|
164
169
|
if (el) {
|
|
165
170
|
const offsetTop = top - targetOffset;
|
|
166
171
|
if (el.scroll && canSmoothScroll) {
|
package/lib/es/select/select.css
CHANGED
|
@@ -445,9 +445,44 @@
|
|
|
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
|
+
}
|
|
448
463
|
.semi-select-borderless:focus-within:not(:active) {
|
|
449
464
|
background-color: transparent;
|
|
450
465
|
}
|
|
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
|
+
}
|
|
451
486
|
.semi-select-borderless.semi-select-error:not(:focus-within) {
|
|
452
487
|
border-color: var(--semi-color-danger);
|
|
453
488
|
}
|
|
@@ -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,6 +52,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
52
52
|
&-large {
|
|
53
53
|
min-height: $height-select_large;
|
|
54
54
|
line-height: $height-select_large;
|
|
55
|
+
|
|
55
56
|
.#{$module}-selection {
|
|
56
57
|
@include font-size-header-6;
|
|
57
58
|
}
|
|
@@ -196,6 +197,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
196
197
|
|
|
197
198
|
.#{$prefix}-tag-group {
|
|
198
199
|
height: inherit;
|
|
200
|
+
|
|
199
201
|
.#{$prefix}-tag {
|
|
200
202
|
@include select-tag-margin;
|
|
201
203
|
}
|
|
@@ -326,6 +328,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
326
328
|
width: $width-select_clear-icon;
|
|
327
329
|
color: $color-select_clearBtn-text-default;
|
|
328
330
|
flex-shrink: 0;
|
|
331
|
+
|
|
329
332
|
&:hover {
|
|
330
333
|
color: $color-select_clearBtn-text-hover;
|
|
331
334
|
}
|
|
@@ -435,6 +438,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
435
438
|
.#{$module}-option-list {
|
|
436
439
|
overflow-x: hidden;
|
|
437
440
|
overflow-y: auto;
|
|
441
|
+
|
|
438
442
|
&-chosen {
|
|
439
443
|
.#{$module}-option-icon {
|
|
440
444
|
display: flex;
|
|
@@ -475,36 +479,84 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
475
479
|
|
|
476
480
|
.#{$module}-borderless {
|
|
477
481
|
|
|
478
|
-
&:not(:focus-within):not(:hover){
|
|
479
|
-
background-color:
|
|
480
|
-
border-color:
|
|
482
|
+
&:not(:focus-within):not(:hover) {
|
|
483
|
+
background-color: $color-select_borderless-bg-default;
|
|
484
|
+
border-color: $color-select_borderless-border-default;
|
|
485
|
+
|
|
481
486
|
.#{$module}-arrow {
|
|
482
487
|
opacity: 0;
|
|
483
488
|
}
|
|
489
|
+
|
|
490
|
+
&.#{$module}-borderless-arrow {
|
|
491
|
+
.#{$module}-arrow {
|
|
492
|
+
opacity: 1;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
484
495
|
}
|
|
485
496
|
|
|
486
|
-
&:
|
|
487
|
-
background-color:
|
|
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
|
+
}
|
|
488
540
|
}
|
|
489
541
|
|
|
490
542
|
// split style into not and normal to avoid style override
|
|
491
|
-
&.#{$module}-error:not(:focus-within){
|
|
543
|
+
&.#{$module}-error:not(:focus-within) {
|
|
492
544
|
border-color: $color-select_danger-border-focus;
|
|
493
545
|
}
|
|
494
546
|
|
|
495
|
-
&.#{$module}-warning:not(:focus-within){
|
|
547
|
+
&.#{$module}-warning:not(:focus-within) {
|
|
496
548
|
border-color: $color-select_warning-border-focus;
|
|
497
549
|
}
|
|
498
550
|
|
|
499
|
-
&.#{$module}-error:focus-within{
|
|
551
|
+
&.#{$module}-error:focus-within {
|
|
500
552
|
border-color: $color-select_danger-border-focus;
|
|
501
553
|
}
|
|
502
554
|
|
|
503
|
-
&.#{$module}-warning:focus-within{
|
|
555
|
+
&.#{$module}-warning:focus-within {
|
|
504
556
|
border-color: $color-select_warning-border-focus;
|
|
505
557
|
}
|
|
506
558
|
|
|
507
559
|
}
|
|
508
560
|
|
|
509
561
|
|
|
510
|
-
|
|
562
|
+
@import './rtl.scss';
|
|
@@ -47,6 +47,16 @@ $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 禁用选择器输入框背景色 - 禁用态
|
|
50
60
|
|
|
51
61
|
// Width/Height
|
|
52
62
|
$width-select_icon_right: ($width-icon-medium + $spacing-tight * 2); // 选择器右侧图标大小
|
package/lib/es/switch/switch.css
CHANGED
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
.semi-switch-disabled:active {
|
|
52
52
|
background-color: transparent;
|
|
53
53
|
}
|
|
54
|
+
.semi-switch-disabled:active .semi-switch-knob {
|
|
55
|
+
width: 18px;
|
|
56
|
+
}
|
|
54
57
|
.semi-switch-disabled .semi-switch-knob {
|
|
55
58
|
cursor: not-allowed;
|
|
56
59
|
box-shadow: none;
|
|
@@ -64,6 +67,9 @@
|
|
|
64
67
|
border-color: transparent;
|
|
65
68
|
background-color: var(--semi-color-success-disabled);
|
|
66
69
|
}
|
|
70
|
+
.semi-switch-disabled.semi-switch-checked:active .semi-switch-knob {
|
|
71
|
+
transform: translateX(18px);
|
|
72
|
+
}
|
|
67
73
|
.semi-switch-disabled.semi-switch-checked .semi-switch-knob {
|
|
68
74
|
box-shadow: none;
|
|
69
75
|
border: none;
|
|
@@ -25,9 +25,7 @@ $module: #{$prefix}-switch;
|
|
|
25
25
|
|
|
26
26
|
&:active {
|
|
27
27
|
border: $border-thickness-control $color-switch_default-bg-active solid;
|
|
28
|
-
|
|
29
28
|
.#{$module}-knob {
|
|
30
|
-
// width: $knob-size + $knob-active-expand;
|
|
31
29
|
width: $width-switch_knob_active;
|
|
32
30
|
}
|
|
33
31
|
}
|
|
@@ -69,6 +67,9 @@ $module: #{$prefix}-switch;
|
|
|
69
67
|
|
|
70
68
|
&:active {
|
|
71
69
|
background-color: $color-switch_disabled-bg-active;
|
|
70
|
+
.#{$module}-knob {
|
|
71
|
+
width: $width-switch_knob_default;
|
|
72
|
+
}
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
.#{$module}-knob {
|
|
@@ -85,6 +86,11 @@ $module: #{$prefix}-switch;
|
|
|
85
86
|
&.#{$module}-checked {
|
|
86
87
|
border-color: $color-switch_checked_disabled-border-default;
|
|
87
88
|
background-color: $color-switch_checked_disabled-bg-default;
|
|
89
|
+
&:active {
|
|
90
|
+
.#{$module}-knob {
|
|
91
|
+
transform: translateX($spacing-switch_checked-translateX);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
88
94
|
.#{$module}-knob {
|
|
89
95
|
@include shadow-0;
|
|
90
96
|
border: none;
|
|
@@ -108,11 +108,14 @@
|
|
|
108
108
|
padding-right: 0;
|
|
109
109
|
cursor: pointer;
|
|
110
110
|
color: var(--semi-color-text-0);
|
|
111
|
+
position: relative;
|
|
111
112
|
}
|
|
112
|
-
.semi-tree-select-selection-
|
|
113
|
+
.semi-tree-select-selection-content {
|
|
113
114
|
overflow: hidden;
|
|
114
115
|
white-space: nowrap;
|
|
115
116
|
text-overflow: ellipsis;
|
|
117
|
+
}
|
|
118
|
+
.semi-tree-select-selection-placeholder {
|
|
116
119
|
color: var(--semi-color-text-2);
|
|
117
120
|
}
|
|
118
121
|
.semi-tree-select-selection .semi-tag-group {
|
|
@@ -126,6 +129,10 @@
|
|
|
126
129
|
}
|
|
127
130
|
.semi-tree-select-selection-TriggerSearchItem {
|
|
128
131
|
position: absolute;
|
|
132
|
+
max-width: calc(100% - 12px);
|
|
133
|
+
text-overflow: ellipsis;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
white-space: nowrap;
|
|
129
136
|
}
|
|
130
137
|
.semi-tree-select-selection-TriggerSearchItem-placeholder {
|
|
131
138
|
opacity: 0.6;
|
|
@@ -133,11 +133,15 @@ $module: #{$prefix}-tree-select;
|
|
|
133
133
|
padding-right: 0;
|
|
134
134
|
cursor: pointer;
|
|
135
135
|
color: $color-treeSelect_selection-text-default;
|
|
136
|
+
position: relative;
|
|
136
137
|
|
|
137
|
-
&-
|
|
138
|
+
&-content {
|
|
138
139
|
overflow: hidden;
|
|
139
140
|
white-space: nowrap;
|
|
140
141
|
text-overflow: ellipsis;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&-placeholder {
|
|
141
145
|
color: $color-treeSelect_input_placeholder-text-default;
|
|
142
146
|
}
|
|
143
147
|
|
|
@@ -154,6 +158,10 @@ $module: #{$prefix}-tree-select;
|
|
|
154
158
|
|
|
155
159
|
&-TriggerSearchItem {
|
|
156
160
|
position: absolute;
|
|
161
|
+
max-width: calc(100% - $spacing-treeSelect_selection-paddingLeft);
|
|
162
|
+
text-overflow: ellipsis;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
white-space: nowrap;
|
|
157
165
|
|
|
158
166
|
&-placeholder {
|
|
159
167
|
opacity: .6;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.40.0-alpha.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.
|
|
10
|
+
"@douyinfe/semi-animation": "2.40.0-alpha.0",
|
|
11
11
|
"async-validator": "^3.5.0",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"date-fns": "^2.29.3",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "3c30c680ff8335f275dce40e16c8994af178ca78",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/select/select.scss
CHANGED
|
@@ -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,6 +52,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
52
52
|
&-large {
|
|
53
53
|
min-height: $height-select_large;
|
|
54
54
|
line-height: $height-select_large;
|
|
55
|
+
|
|
55
56
|
.#{$module}-selection {
|
|
56
57
|
@include font-size-header-6;
|
|
57
58
|
}
|
|
@@ -196,6 +197,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
196
197
|
|
|
197
198
|
.#{$prefix}-tag-group {
|
|
198
199
|
height: inherit;
|
|
200
|
+
|
|
199
201
|
.#{$prefix}-tag {
|
|
200
202
|
@include select-tag-margin;
|
|
201
203
|
}
|
|
@@ -326,6 +328,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
326
328
|
width: $width-select_clear-icon;
|
|
327
329
|
color: $color-select_clearBtn-text-default;
|
|
328
330
|
flex-shrink: 0;
|
|
331
|
+
|
|
329
332
|
&:hover {
|
|
330
333
|
color: $color-select_clearBtn-text-hover;
|
|
331
334
|
}
|
|
@@ -435,6 +438,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
435
438
|
.#{$module}-option-list {
|
|
436
439
|
overflow-x: hidden;
|
|
437
440
|
overflow-y: auto;
|
|
441
|
+
|
|
438
442
|
&-chosen {
|
|
439
443
|
.#{$module}-option-icon {
|
|
440
444
|
display: flex;
|
|
@@ -475,36 +479,84 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
475
479
|
|
|
476
480
|
.#{$module}-borderless {
|
|
477
481
|
|
|
478
|
-
&:not(:focus-within):not(:hover){
|
|
479
|
-
background-color:
|
|
480
|
-
border-color:
|
|
482
|
+
&:not(:focus-within):not(:hover) {
|
|
483
|
+
background-color: $color-select_borderless-bg-default;
|
|
484
|
+
border-color: $color-select_borderless-border-default;
|
|
485
|
+
|
|
481
486
|
.#{$module}-arrow {
|
|
482
487
|
opacity: 0;
|
|
483
488
|
}
|
|
489
|
+
|
|
490
|
+
&.#{$module}-borderless-arrow {
|
|
491
|
+
.#{$module}-arrow {
|
|
492
|
+
opacity: 1;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
484
495
|
}
|
|
485
496
|
|
|
486
|
-
&:
|
|
487
|
-
background-color:
|
|
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
|
+
}
|
|
488
540
|
}
|
|
489
541
|
|
|
490
542
|
// split style into not and normal to avoid style override
|
|
491
|
-
&.#{$module}-error:not(:focus-within){
|
|
543
|
+
&.#{$module}-error:not(:focus-within) {
|
|
492
544
|
border-color: $color-select_danger-border-focus;
|
|
493
545
|
}
|
|
494
546
|
|
|
495
|
-
&.#{$module}-warning:not(:focus-within){
|
|
547
|
+
&.#{$module}-warning:not(:focus-within) {
|
|
496
548
|
border-color: $color-select_warning-border-focus;
|
|
497
549
|
}
|
|
498
550
|
|
|
499
|
-
&.#{$module}-error:focus-within{
|
|
551
|
+
&.#{$module}-error:focus-within {
|
|
500
552
|
border-color: $color-select_danger-border-focus;
|
|
501
553
|
}
|
|
502
554
|
|
|
503
|
-
&.#{$module}-warning:focus-within{
|
|
555
|
+
&.#{$module}-warning:focus-within {
|
|
504
556
|
border-color: $color-select_warning-border-focus;
|
|
505
557
|
}
|
|
506
558
|
|
|
507
559
|
}
|
|
508
560
|
|
|
509
561
|
|
|
510
|
-
|
|
562
|
+
@import './rtl.scss';
|
package/select/variables.scss
CHANGED
|
@@ -47,6 +47,16 @@ $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 禁用选择器输入框背景色 - 禁用态
|
|
50
60
|
|
|
51
61
|
// Width/Height
|
|
52
62
|
$width-select_icon_right: ($width-icon-medium + $spacing-tight * 2); // 选择器右侧图标大小
|
package/switch/switch.scss
CHANGED
|
@@ -25,9 +25,7 @@ $module: #{$prefix}-switch;
|
|
|
25
25
|
|
|
26
26
|
&:active {
|
|
27
27
|
border: $border-thickness-control $color-switch_default-bg-active solid;
|
|
28
|
-
|
|
29
28
|
.#{$module}-knob {
|
|
30
|
-
// width: $knob-size + $knob-active-expand;
|
|
31
29
|
width: $width-switch_knob_active;
|
|
32
30
|
}
|
|
33
31
|
}
|
|
@@ -69,6 +67,9 @@ $module: #{$prefix}-switch;
|
|
|
69
67
|
|
|
70
68
|
&:active {
|
|
71
69
|
background-color: $color-switch_disabled-bg-active;
|
|
70
|
+
.#{$module}-knob {
|
|
71
|
+
width: $width-switch_knob_default;
|
|
72
|
+
}
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
.#{$module}-knob {
|
|
@@ -85,6 +86,11 @@ $module: #{$prefix}-switch;
|
|
|
85
86
|
&.#{$module}-checked {
|
|
86
87
|
border-color: $color-switch_checked_disabled-border-default;
|
|
87
88
|
background-color: $color-switch_checked_disabled-bg-default;
|
|
89
|
+
&:active {
|
|
90
|
+
.#{$module}-knob {
|
|
91
|
+
transform: translateX($spacing-switch_checked-translateX);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
88
94
|
.#{$module}-knob {
|
|
89
95
|
@include shadow-0;
|
|
90
96
|
border: none;
|
|
@@ -133,11 +133,15 @@ $module: #{$prefix}-tree-select;
|
|
|
133
133
|
padding-right: 0;
|
|
134
134
|
cursor: pointer;
|
|
135
135
|
color: $color-treeSelect_selection-text-default;
|
|
136
|
+
position: relative;
|
|
136
137
|
|
|
137
|
-
&-
|
|
138
|
+
&-content {
|
|
138
139
|
overflow: hidden;
|
|
139
140
|
white-space: nowrap;
|
|
140
141
|
text-overflow: ellipsis;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&-placeholder {
|
|
141
145
|
color: $color-treeSelect_input_placeholder-text-default;
|
|
142
146
|
}
|
|
143
147
|
|
|
@@ -154,6 +158,10 @@ $module: #{$prefix}-tree-select;
|
|
|
154
158
|
|
|
155
159
|
&-TriggerSearchItem {
|
|
156
160
|
position: absolute;
|
|
161
|
+
max-width: calc(100% - $spacing-treeSelect_selection-paddingLeft);
|
|
162
|
+
text-overflow: ellipsis;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
white-space: nowrap;
|
|
157
165
|
|
|
158
166
|
&-placeholder {
|
|
159
167
|
opacity: .6;
|