073533d4390de61d580bf378bb0303c4f0eac919ca51a7a278e37da6d151b44899176196a26524d2059986a15b817f174a786f714588973ef7a27378ee6eeb 1.9 KB

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