_form_select_box.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. $select-input-height: 35px;
  2. $select-input-bg-disabled: $input-bg-disabled;
  3. @mixin select-control() {
  4. width: 100%;
  5. margin-right: $gf-form-margin;
  6. @include border-radius($input-border-radius-sm);
  7. background-color: $input-bg;
  8. }
  9. @mixin select-control-focus() {
  10. border-color: $input-border-focus;
  11. outline: none;
  12. $shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px $input-box-shadow-focus;
  13. @include box-shadow($shadow);
  14. }
  15. .gf-form-select-box__control {
  16. @include select-control();
  17. border: 1px solid $input-border-color;
  18. color: $input-color;
  19. cursor: default;
  20. display: table;
  21. border-spacing: 0;
  22. border-collapse: separate;
  23. height: $select-input-height;
  24. outline: none;
  25. overflow: hidden;
  26. position: relative;
  27. }
  28. .gf-form-select-box__control--is-focused {
  29. background-color: $input-bg;
  30. @include select-control-focus();
  31. }
  32. .gf-form-select-box__control--is-disabled {
  33. background-color: $select-input-bg-disabled;
  34. }
  35. .gf-form-select-box__control--menu-right {
  36. .gf-form-select-box__menu {
  37. right: 0;
  38. left: unset;
  39. }
  40. }
  41. .gf-form-select-box__input {
  42. padding-left: 5px;
  43. input {
  44. line-height: inherit;
  45. }
  46. }
  47. .gf-form-select-box__menu {
  48. background: $input-bg;
  49. box-shadow: $menu-dropdown-shadow;
  50. position: absolute;
  51. z-index: $zindex-dropdown;
  52. min-width: 100%;
  53. }
  54. .gf-form-select-box__menu-list {
  55. overflow-y: auto;
  56. max-height: 300px;
  57. }
  58. .tag-filter .gf-form-select-box__menu {
  59. width: 100%;
  60. }
  61. /* .gf-form-select-box__single-value { */
  62. /* } */
  63. .gf-form-select-box__multi-value {
  64. display: inline;
  65. }
  66. .gf-form-select-box__option {
  67. border-left: 2px solid transparent;
  68. white-space: nowrap;
  69. &.gf-form-select-box__option--is-focused {
  70. color: $dropdownLinkColorHover;
  71. background: $menu-dropdown-hover-bg;
  72. @include left-brand-border-gradient();
  73. }
  74. &.gf-form-select-box__option--is-selected {
  75. .fa {
  76. color: $input-color-select-arrow;
  77. }
  78. }
  79. }
  80. .gf-form-select-box__control--is-focused .gf-form-select-box__placeholder {
  81. display: none;
  82. }
  83. .gf-form-select-box__value-container {
  84. display: table-cell;
  85. padding: 6px 10px;
  86. > div {
  87. display: inline-block;
  88. }
  89. }
  90. .gf-form-select-box__indicators {
  91. display: table-cell;
  92. vertical-align: middle;
  93. text-align: right;
  94. padding-right: 10px;
  95. width: 20px;
  96. }
  97. .gf-form-select-box__select-arrow {
  98. border-color: $input-color-select-arrow transparent transparent;
  99. border-style: solid;
  100. border-width: 4px 4px 2.5px;
  101. display: inline-block;
  102. height: 0;
  103. width: 0;
  104. position: relative;
  105. &.gf-form-select-box__select-arrow--reversed {
  106. border-color: transparent transparent $input-color-select-arrow;
  107. top: -2px;
  108. border-width: 0 4px 4px;
  109. }
  110. }
  111. .gf-form-input--form-dropdown {
  112. padding: 0;
  113. border: 0;
  114. overflow: visible;
  115. position: relative;
  116. }
  117. .gf-form--has-input-icon {
  118. .gf-form-select-box__value-container {
  119. padding-left: 30px;
  120. }
  121. }
  122. .gf-form-select-box__desc-option {
  123. display: flex;
  124. align-items: center;
  125. justify-content: flex-start;
  126. justify-items: center;
  127. cursor: pointer;
  128. padding: 7px 10px;
  129. width: 100%;
  130. }
  131. .gf-form-select-box__desc-option__body {
  132. display: flex;
  133. flex-direction: column;
  134. flex-grow: 1;
  135. padding-right: 10px;
  136. font-weight: 500;
  137. }
  138. .gf-form-select-box__desc-option__desc {
  139. font-weight: normal;
  140. font-size: $font-size-sm;
  141. color: $text-muted;
  142. }
  143. .gf-form-select-box__desc-option__img {
  144. width: 16px;
  145. margin-right: 10px;
  146. }