_form_select_box.scss 3.8 KB

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