@douyinfe/semi-foundation 2.39.0-beta.0 → 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.
@@ -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:transparent;
480
- border-color: transparent;
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
- &:focus-within:not(:active){
487
- background-color:transparent;
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
- @import './rtl.scss';
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;
@@ -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:transparent;
480
- border-color: transparent;
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
- &:focus-within:not(:active){
487
- background-color:transparent;
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
- @import './rtl.scss';
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;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.39.0-beta.0",
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.39.0-beta.0",
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": "18bd0485b9985b913d849000edab0ab2b5f3c232",
26
+ "gitHead": "3c30c680ff8335f275dce40e16c8994af178ca78",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -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:transparent;
480
- border-color: transparent;
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
- &:focus-within:not(:active){
487
- background-color:transparent;
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
- @import './rtl.scss';
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); // 选择器右侧图标大小
@@ -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;