zhangyong
2023-08-22 1353e87cb21a4032d585d7404bae9042f2ebcf08
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@use 'sass:map';
 
@use 'mixins/mixins' as *;
@use 'mixins/utils' as *;
@use 'common/var' as *;
 
@include b(autocomplete) {
  position: relative;
  display: inline-block;
 
  @include e(popper) {
    @include picker-popper(
      getCssVar('bg-color', 'overlay'),
      1px solid getCssVar('border-color', 'light'),
      getCssVar('box-shadow', 'light')
    );
  }
}
 
@include b(autocomplete-suggestion) {
  border-radius: getCssVar('border-radius', 'base');
  box-sizing: border-box;
 
  @include e(wrap) {
    max-height: 280px;
    padding: 10px 0;
    box-sizing: border-box;
  }
 
  @include e(list) {
    margin: 0;
    padding: 0;
  }
 
  & li {
    padding: 0 20px;
    margin: 0;
    line-height: 34px;
    cursor: pointer;
    color: getCssVar('text-color', 'regular');
    font-size: getCssVar('font-size', 'base');
    list-style: none;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
 
    &:hover {
      background-color: map.get($select-option, 'hover-background');
    }
 
    &.highlighted {
      background-color: map.get($select-option, 'hover-background');
    }
 
    &.divider {
      margin-top: 6px;
      border-top: 1px solid getCssVar('color', 'black');
    }
 
    &.divider:last-child {
      margin-bottom: -6px;
    }
  }
 
  @include when(loading) {
    li {
      text-align: center;
      height: 100px;
      line-height: 100px;
      font-size: 20px;
      color: getCssVar('text-color', 'secondary');
      @include utils-vertical-center;
 
      &:hover {
        background-color: getCssVar('bg-color', 'overlay');
      }
    }
 
    & .#{$namespace}-icon-loading {
      vertical-align: middle;
    }
  }
}