_Select.scss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. max-width: 600px;
  58. }
  59. .tag-filter .gf-form-select-box__menu {
  60. width: 100%;
  61. }
  62. /* .gf-form-select-box__single-value { */
  63. /* } */
  64. .gf-form-select-box__multi-value {
  65. display: inline;
  66. }
  67. .gf-form-select-box__option {
  68. border-left: 2px solid transparent;
  69. white-space: nowrap;
  70. background-color: $input-bg;
  71. &.gf-form-select-box__option--is-focused {
  72. color: $dropdownLinkColorHover;
  73. background: $menu-dropdown-hover-bg;
  74. @include left-brand-border-gradient();
  75. }
  76. &.gf-form-select-box__option--is-selected {
  77. .fa {
  78. color: $input-color-select-arrow;
  79. }
  80. }
  81. }
  82. .gf-form-select-box__control--is-focused .gf-form-select-box__placeholder {
  83. display: none;
  84. }
  85. .gf-form-select-box__value-container {
  86. display: table-cell;
  87. padding: 6px 10px;
  88. > div {
  89. display: inline-block;
  90. }
  91. }
  92. .gf-form-select-box__indicators {
  93. display: table-cell;
  94. vertical-align: middle;
  95. text-align: right;
  96. padding-right: 10px;
  97. width: 20px;
  98. }
  99. .gf-form-select-box__select-arrow {
  100. border-color: $input-color-select-arrow transparent transparent;
  101. border-style: solid;
  102. border-width: 4px 4px 2.5px;
  103. display: inline-block;
  104. height: 0;
  105. width: 0;
  106. position: relative;
  107. &.gf-form-select-box__select-arrow--reversed {
  108. border-color: transparent transparent $input-color-select-arrow;
  109. top: -2px;
  110. border-width: 0 4px 4px;
  111. }
  112. }
  113. .gf-form-input--form-dropdown {
  114. padding: 0;
  115. border: 0;
  116. overflow: visible;
  117. position: relative;
  118. }
  119. .gf-form--has-input-icon {
  120. .gf-form-select-box__value-container {
  121. padding-left: 30px;
  122. }
  123. }
  124. .gf-form-select-box__desc-option {
  125. display: flex;
  126. align-items: center;
  127. justify-content: flex-start;
  128. justify-items: center;
  129. cursor: pointer;
  130. padding: 7px 10px;
  131. width: 100%;
  132. }
  133. .gf-form-select-box__desc-option__body {
  134. display: flex;
  135. flex-direction: column;
  136. flex-grow: 1;
  137. padding-right: 10px;
  138. font-weight: 500;
  139. }
  140. .gf-form-select-box__desc-option__desc {
  141. font-weight: normal;
  142. font-size: $font-size-sm;
  143. color: $text-muted;
  144. }
  145. .gf-form-select-box__desc-option__img {
  146. width: 16px;
  147. margin-right: 10px;
  148. }
  149. .gf-form-select-box__option-group__header {
  150. display: flex;
  151. align-items: center;
  152. justify-content: flex-start;
  153. justify-items: center;
  154. cursor: pointer;
  155. padding: 7px 10px;
  156. width: 100%;
  157. border-bottom: 1px solid $hr-border-color;
  158. text-transform: capitalize;
  159. .fa {
  160. padding-right: 2px;
  161. }
  162. }