tom-select-rails 2.2.1 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tom-select-rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js +691 -859
  4. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js.map +1 -1
  5. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js +487 -723
  6. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js.map +1 -1
  7. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js +512 -743
  8. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js.map +1 -1
  9. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js +32 -28
  10. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js.map +1 -1
  11. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js +67 -23
  12. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js.map +1 -1
  13. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js +4 -3
  14. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js.map +1 -1
  15. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js +103 -41
  16. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js.map +1 -1
  17. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js +59 -20
  18. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js.map +1 -1
  19. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js +249 -29
  20. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js.map +1 -1
  21. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js +59 -18
  22. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js.map +1 -1
  23. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js +72 -32
  24. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js.map +1 -1
  25. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js +5 -7
  26. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js.map +1 -1
  27. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js +2 -1
  28. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js.map +1 -1
  29. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js +2 -2
  30. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js.map +1 -1
  31. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js +59 -22
  32. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js.map +1 -1
  33. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js +68 -23
  34. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js.map +1 -1
  35. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js +2 -3
  36. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js.map +1 -1
  37. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js +97 -57
  38. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js.map +1 -1
  39. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js +691 -859
  40. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js.map +1 -1
  41. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js +487 -723
  42. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js.map +1 -1
  43. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js +512 -743
  44. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js.map +1 -1
  45. data/vendor/assets/javascripts/tom-select-rails/esm/utils.js +32 -27
  46. data/vendor/assets/javascripts/tom-select-rails/esm/utils.js.map +1 -1
  47. data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js +67 -23
  48. data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js.map +1 -1
  49. data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js +4 -3
  50. data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js.map +1 -1
  51. data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js +103 -41
  52. data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js.map +1 -1
  53. data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js +59 -20
  54. data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js.map +1 -1
  55. data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js +249 -29
  56. data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js.map +1 -1
  57. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js +59 -18
  58. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js.map +1 -1
  59. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js +72 -32
  60. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js.map +1 -1
  61. data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js +5 -7
  62. data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js.map +1 -1
  63. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js +2 -1
  64. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js.map +1 -1
  65. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js +2 -2
  66. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js.map +1 -1
  67. data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js +59 -22
  68. data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js.map +1 -1
  69. data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js +68 -23
  70. data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js.map +1 -1
  71. data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js +2 -3
  72. data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js.map +1 -1
  73. data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js +97 -57
  74. data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js.map +1 -1
  75. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js +487 -723
  76. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js.map +1 -1
  77. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js +168 -160
  78. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js.map +1 -1
  79. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js +691 -859
  80. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js.map +1 -1
  81. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js +208 -190
  82. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js.map +1 -1
  83. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js +512 -743
  84. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js.map +1 -1
  85. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js +180 -172
  86. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js.map +1 -1
  87. data/vendor/assets/javascripts/tom-select-rails/types/contrib/microevent.d.ts +1 -1
  88. data/vendor/assets/javascripts/tom-select-rails/types/contrib/microplugin.d.ts +4 -4
  89. data/vendor/assets/javascripts/tom-select-rails/types/defaults.d.ts +1 -0
  90. data/vendor/assets/javascripts/tom-select-rails/types/getSettings.d.ts +2 -2
  91. data/vendor/assets/javascripts/tom-select-rails/types/plugins/checkbox_options/plugin.d.ts +3 -2
  92. data/vendor/assets/javascripts/tom-select-rails/types/plugins/checkbox_options/types.d.ts +14 -0
  93. data/vendor/assets/javascripts/tom-select-rails/types/plugins/clear_button/types.d.ts +1 -1
  94. data/vendor/assets/javascripts/tom-select-rails/types/plugins/dropdown_header/types.d.ts +1 -1
  95. data/vendor/assets/javascripts/tom-select-rails/types/plugins/remove_button/types.d.ts +1 -1
  96. data/vendor/assets/javascripts/tom-select-rails/types/plugins/restore_on_backspace/plugin.d.ts +1 -1
  97. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.d.ts +12 -14
  98. data/vendor/assets/javascripts/tom-select-rails/types/types/core.d.ts +16 -12
  99. data/vendor/assets/javascripts/tom-select-rails/types/types/settings.d.ts +3 -2
  100. data/vendor/assets/javascripts/tom-select-rails/types/utils.d.ts +8 -1
  101. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css +224 -216
  102. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css.map +1 -1
  103. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css +1 -1
  104. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css.map +1 -1
  105. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css +245 -252
  106. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css.map +1 -1
  107. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css +1 -1
  108. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css.map +1 -1
  109. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css +213 -210
  110. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css.map +1 -1
  111. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css +223 -215
  112. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css.map +1 -1
  113. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css +1 -1
  114. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css.map +1 -1
  115. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css +1 -1
  116. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css.map +1 -1
  117. data/vendor/assets/stylesheets/tom-select-rails/scss/_dropdown.scss +7 -10
  118. data/vendor/assets/stylesheets/tom-select-rails/scss/_items.scss +2 -5
  119. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/checkbox_options.scss +8 -2
  120. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/clear_button.scss +16 -14
  121. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/drag_drop.scss +6 -12
  122. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/dropdown_header.scss +3 -2
  123. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/dropdown_input.scss +7 -11
  124. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/input_autogrow.scss +0 -3
  125. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/optgroup_columns.scss +7 -5
  126. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/remove_button.scss +20 -20
  127. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.bootstrap4.scss +33 -39
  128. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.bootstrap5.scss +54 -80
  129. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.default.scss +16 -14
  130. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.scss +52 -57
  131. metadata +8 -7
@@ -1,19 +1,17 @@
1
1
  /**
2
- * Tom Select bootstrap 4
2
+ * Tom Select Bootstrap 4
3
3
  */
4
4
 
5
- //Import Boostrap 4 functions and variables
6
-
5
+ // Import Bootstrap 4 functions and variables
7
6
  $state-valid: map-get($form-validation-states,'valid') !default;
8
7
  $state-invalid: map-get($form-validation-states,'invalid') !default;
9
-
10
8
  $enable-shadows: true !default;
11
9
  $select-font-family: inherit !default;
12
10
  $select-font-size: inherit !default;
13
- $select-line-height: $input-btn-line-height !default; //formerly line-height-computed
11
+ $select-line-height: $input-btn-line-height !default; // formerly line-height-computed
14
12
 
15
- $select-color-text: gray("800") !default; //$gray-800
16
- $select-color-highlight: rgba(255,237,40,0.4) !default;
13
+ $select-color-text: gray("800") !default; // $gray-800
14
+ $select-color-highlight: rgba(255, 237, 40, 40%) !default;
17
15
  $select-color-input: $input-bg !default;
18
16
  $select-color-input-full: $input-bg !default;
19
17
  $select-color-input-error: map-get($state-invalid,'color') !default;
@@ -23,21 +21,19 @@ $select-color-item: #efefef !default;
23
21
  $select-color-item-border: $border-color !default;
24
22
  $select-color-item-active: $component-active-bg !default;
25
23
  $select-color-item-active-text: #fff !default;
26
- $select-color-item-active-border: rgba(0,0,0,0) !default;
24
+ $select-color-item-active-border: rgba(0, 0, 0, 0%) !default;
27
25
  $select-color-optgroup: $dropdown-bg !default;
28
26
  $select-color-optgroup-text: $dropdown-header-color !default;
29
27
  $select-color-optgroup-border: $dropdown-divider-bg !default;
30
28
  $select-color-dropdown: $dropdown-bg !default;
31
- $select-color-dropdown-border-top: mix($input-border-color, $input-bg, 0.8) !default;
29
+ $select-color-dropdown-border-top: mix($input-border-color, $input-bg, 80%) !default;
32
30
  $select-color-dropdown-item-active: $dropdown-link-hover-bg !default;
33
31
  $select-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
34
32
  $select-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
35
33
  $select-opacity-disabled: 0.5 !default;
36
-
37
34
  $select-border: 1px solid $input-border-color !default;
38
35
  $select-border-radius: $input-border-radius !default;
39
-
40
- $select-width-item-border: 0px !default;
36
+ $select-width-item-border: 0 !default;
41
37
  $select-padding-x: $input-btn-padding-x !default;
42
38
  $select-padding-y: $input-btn-padding-y !default;
43
39
  $select-padding-dropdown-item-x: $input-btn-padding-x !default;
@@ -46,17 +42,15 @@ $select-padding-item-x: 5px !default;
46
42
  $select-padding-item-y: 1px !default;
47
43
  $select-margin-item-x: 3px !default;
48
44
  $select-margin-item-y: 3px !default;
49
-
50
45
  $select-arrow-size: 5px !default;
51
46
  $select-arrow-color: $select-color-text !default;
52
47
  $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
53
48
 
54
-
55
49
  @import "tom-select";
56
- @include ts-caret();
50
+ @include ts-caret;
57
51
 
58
52
  .#{$select-ns}-wrapper.form-control,
59
- .#{$select-ns}-wrapper.form-select{
53
+ .#{$select-ns}-wrapper.form-select {
60
54
  padding:0 !important;
61
55
  }
62
56
 
@@ -66,9 +60,9 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
66
60
  padding: 0;
67
61
  z-index: $zindex-dropdown;
68
62
  background: $select-color-dropdown;
69
- border: 1px solid $dropdown-border-color; //$dropdown-fallback-border
63
+ border: 1px solid $dropdown-border-color; // $dropdown-fallback-border
70
64
  border-radius: $border-radius;
71
- box-shadow: 0 6px 12px rgba(0,0,0,.175);
65
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 17.5%);
72
66
  }
73
67
 
74
68
  .#{$select-ns}-dropdown {
@@ -76,10 +70,12 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
76
70
  font-size: $font-size-sm;
77
71
  line-height: $line-height-base;
78
72
  }
79
- .optgroup:first-child:before {
73
+
74
+ .optgroup:first-child::before {
80
75
  display: none;
81
76
  }
82
- .optgroup:before {
77
+
78
+ .optgroup::before {
83
79
  content: ' ';
84
80
  display: block;
85
81
  height: 0;
@@ -103,6 +99,7 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
103
99
  min-height: $input-height;
104
100
  @include box-shadow($input-box-shadow);
105
101
  @include transition($input-transition);
102
+
106
103
  display:flex;
107
104
  align-items: center;
108
105
 
@@ -127,9 +124,8 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
127
124
  }
128
125
  }
129
126
 
130
- .is-valid .#{$select-ns}-control{
127
+ .is-valid .#{$select-ns}-control {
131
128
  $_color: map-get($state-valid,'color');
132
- //$_icon: map-get($state-valid,'icon');
133
129
 
134
130
  border-color: $_color;
135
131
 
@@ -140,41 +136,41 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
140
136
  }
141
137
 
142
138
  .#{$select-ns}-wrapper {
143
-
144
139
  .input-group-sm > &,
145
- &.form-control-sm{
140
+ &.form-control-sm {
146
141
 
147
- .#{$select-ns}-control{
142
+ .#{$select-ns}-control {
148
143
  min-height: $input-height-sm;
149
144
  padding: 0 .75rem;
150
- //padding: $input-padding-y-sm $input-padding-x-sm;
145
+
146
+ // padding: $input-padding-y-sm $input-padding-x-sm;
151
147
  @include border-radius($input-border-radius-sm);
152
148
  @include font-size($input-font-size-sm);
153
149
  }
154
150
 
155
- &.has-items .#{$select-ns}-control{
151
+ &.has-items .#{$select-ns}-control {
156
152
  min-height: $input-height-sm !important;
157
153
  font-size: $input-font-size-sm;
158
154
  padding-bottom: 0;
159
155
  }
160
156
  }
161
157
 
162
-
163
158
  .input-group-sm > &.multi.has-items,
164
- &.form-control-sm.multi.has-items{
165
- .#{$select-ns}-control{
159
+ &.form-control-sm.multi.has-items {
160
+ .#{$select-ns}-control {
166
161
  // padding-top = ($input-height-sm - border-width - item-height) / 2;
167
162
  // item-height = ($select-line-height * $input-font-size-sm) + ($select-padding-item-y * 2)
168
163
  $border-and-padding: add($input-border-width,$select-padding-item-y) * 2;
169
164
  $ts-select-padding-sm: calc( (#{$input-height-sm} - (#{$select-line-height} * #{$input-font-size-sm}) - #{$border-and-padding})/2);
165
+
170
166
  padding-top: $ts-select-padding-sm !important;
171
167
  }
172
168
  }
173
169
 
174
-
175
170
  &.multi {
176
171
  &.has-items .#{$select-ns}-control {
177
172
  padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
173
+
178
174
  --ts-pr-min: calc(#{$select-padding-x} - #{$select-padding-item-x});
179
175
  }
180
176
  .#{$select-ns}-control > div {
@@ -183,8 +179,8 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
183
179
  }
184
180
 
185
181
  .input-group-lg > & >,
186
- &.form-control-lg{
187
- .#{$select-ns}-control{
182
+ &.form-control-lg {
183
+ .#{$select-ns}-control {
188
184
  min-height: $input-height-lg;
189
185
  @include border-radius($input-border-radius-lg);
190
186
  @include font-size($input-font-size-lg);
@@ -197,22 +193,20 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
197
193
  height: auto;
198
194
  border: none;
199
195
  background: none;
200
- //box-shadow: none;
201
196
  border-radius: 0;
202
197
  }
203
198
 
204
- .input-group{
205
-
206
- & > .#{$select-ns}-wrapper{
199
+ .input-group {
200
+ & > .#{$select-ns}-wrapper {
207
201
  flex-grow: 1;
208
202
  }
209
203
 
210
- & > .#{$select-ns}-wrapper:not(:nth-child(2)) > .#{$select-ns}-control{
204
+ & > .#{$select-ns}-wrapper:not(:nth-child(2)) > .#{$select-ns}-control {
211
205
  border-top-left-radius: 0;
212
206
  border-bottom-left-radius: 0;
213
207
  }
214
208
 
215
- & > .#{$select-ns}-wrapper:not(:last-child) > .#{$select-ns}-control{
209
+ & > .#{$select-ns}-wrapper:not(:last-child) > .#{$select-ns}-control {
216
210
  border-top-right-radius: 0;
217
211
  border-bottom-right-radius: 0;
218
212
  }
@@ -1,43 +1,37 @@
1
1
  /**
2
- * Tom Select bootstrap 5
2
+ * Tom Select Bootstrap 5
3
3
  */
4
4
 
5
- //Import Boostrap 5 functions and variables
5
+ // Import Bootstrap 5 functions and variables
6
6
  $state-valid: map-get($form-validation-states,'valid') !default;
7
7
  $state-invalid: map-get($form-validation-states,'invalid') !default;
8
-
9
-
10
8
  $enable-shadows: true !default;
11
9
  $select-font-family: inherit !default;
12
10
  $select-font-size: inherit !default;
13
- $select-line-height: $input-btn-line-height !default; //formerly line-height-computed
11
+ $select-line-height: $input-btn-line-height !default; // formerly line-height-computed
14
12
 
15
13
  $select-color-text: $gray-800 !default;
16
- $select-color-highlight: rgba(255,237,40,0.4) !default;
14
+ $select-color-highlight: rgba(255, 237, 40, 40%) !default;
17
15
  $select-color-input: $input-bg !default;
18
16
  $select-color-input-full: $input-bg !default;
19
-
20
-
21
17
  $select-color-disabled: $input-disabled-bg !default;
22
18
  $select-color-item: #efefef !default;
23
19
  $select-color-item-border: $border-color !default;
24
20
  $select-color-item-active: $component-active-bg !default;
25
21
  $select-color-item-active-text: #fff !default;
26
- $select-color-item-active-border: rgba(0,0,0,0) !default;
22
+ $select-color-item-active-border: rgba(0, 0, 0, 0%) !default;
27
23
  $select-color-optgroup: $dropdown-bg !default;
28
24
  $select-color-optgroup-text: $dropdown-header-color !default;
29
25
  $select-color-optgroup-border: $dropdown-divider-bg !default;
30
26
  $select-color-dropdown: $dropdown-bg !default;
31
- $select-color-dropdown-border-top: mix($input-border-color, $input-bg, 0.8) !default;
27
+ $select-color-dropdown-border-top: color-mix($input-border-color, $input-bg, 80%) !default;
32
28
  $select-color-dropdown-item-active: $dropdown-link-hover-bg !default;
33
29
  $select-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
34
30
  $select-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
35
31
  $select-opacity-disabled: 0.5 !default;
36
-
37
32
  $select-border: 1px solid $input-border-color !default;
38
33
  $select-border-radius: $input-border-radius !default;
39
-
40
- $select-width-item-border: 0px !default;
34
+ $select-width-item-border: 0 !default;
41
35
  $select-padding-x: $input-padding-x !default;
42
36
  $select-padding-y: $input-padding-y !default;
43
37
  $select-padding-dropdown-item-x: $input-btn-padding-x !default;
@@ -46,69 +40,55 @@ $select-padding-item-x: 5px !default;
46
40
  $select-padding-item-y: 1px !default;
47
41
  $select-margin-item-x: 3px !default;
48
42
  $select-margin-item-y: 3px !default;
49
-
50
43
  $select-arrow-size: 5px !default;
51
44
  $select-arrow-color: $select-color-text !default;
52
45
  $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
53
46
 
54
-
55
47
  @import "tom-select";
56
48
 
57
-
58
49
  @mixin ts-form-validation-state-selector($state) {
59
-
60
50
  $state-map: map-get($form-validation-states,$state);
61
51
 
62
52
  .#{$select-ns}-wrapper.is-#{$state},
63
53
  .was-validated .#{$state},
64
- .was-validated :#{$state} + .#{$select-ns}-wrapper{
65
-
54
+ .was-validated :#{$state} + .#{$select-ns}-wrapper {
66
55
  $color: map-get($state-map,'color');
67
56
  $icon: map-get($state-map,'icon');
68
57
 
69
58
  border-color: $color;
70
59
 
71
- &:not(.single){
60
+ &:not(.single) {
72
61
  background-image: escape-svg($icon);
73
62
  background-position: right $input-height-inner-quarter center;
74
63
  background-size: $input-height-inner-half $input-height-inner-half;
75
64
  background-repeat: no-repeat;
76
65
  }
77
66
 
78
- &.single{
67
+ &.single {
79
68
  background-image: escape-svg($form-select-indicator), escape-svg($icon);
80
69
  background-position: $form-select-bg-position, $form-select-feedback-icon-position;
81
70
  background-size: $form-select-bg-size, $form-select-feedback-icon-size;
82
71
  background-repeat: no-repeat;
83
72
  }
84
73
 
85
- &.focus .#{$select-ns}-control{
74
+ &.focus .#{$select-ns}-control {
86
75
  border-color: $color;
87
- box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity);
76
+ box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity);
88
77
  }
89
-
90
78
  }
91
79
  }
92
80
 
93
81
 
94
- .#{$select-ns}-wrapper.form-control,
95
- .#{$select-ns}-wrapper.form-select{
96
- padding:0 !important;
97
- height: auto;
98
- box-shadow: none;
99
- display: flex;
100
- }
101
-
102
82
  .#{$select-ns}-dropdown,
103
83
  .#{$select-ns}-dropdown.form-control,
104
- .#{$select-ns}-dropdown.form-select{
84
+ .#{$select-ns}-dropdown.form-select {
105
85
  height: auto;
106
86
  padding: 0;
107
87
  z-index: $zindex-dropdown;
108
88
  background: $select-color-dropdown;
109
- border: 1px solid $dropdown-border-color; //$dropdown-fallback-border
89
+ border: 1px solid $dropdown-border-color; // $dropdown-fallback-border
110
90
  border-radius: $border-radius;
111
- box-shadow: 0 6px 12px rgba(0,0,0,.175);
91
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 17.5%);
112
92
  }
113
93
 
114
94
  .#{$select-ns}-dropdown {
@@ -116,10 +96,12 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
116
96
  font-size: $font-size-sm;
117
97
  line-height: $line-height-base;
118
98
  }
119
- .optgroup:first-child:before {
99
+
100
+ .optgroup:first-child::before {
120
101
  display: none;
121
102
  }
122
- .optgroup:before {
103
+
104
+ .optgroup::before {
123
105
  content: ' ';
124
106
  display: block;
125
107
  height: 0;
@@ -142,14 +124,11 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
142
124
  .#{$select-ns}-control {
143
125
  @include box-shadow($input-box-shadow);
144
126
  @include transition($input-transition);
127
+
145
128
  display:flex;
146
129
  align-items: center;
147
130
 
148
- &.dropdown -active {
149
- border-radius: $select-border-radius;
150
- }
151
-
152
- .focus &{
131
+ .focus & {
153
132
  border-color: $input-focus-border-color;
154
133
  outline: 0;
155
134
  @if $enable-shadows {
@@ -159,55 +138,52 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
159
138
  }
160
139
  }
161
140
 
162
- .item{
141
+ .item {
163
142
  display: flex;
164
143
  align-items: center;
165
144
  }
166
145
  }
167
146
 
168
-
169
147
  @include ts-form-validation-state-selector('invalid');
170
148
  @include ts-form-validation-state-selector('valid');
171
149
 
172
-
173
150
  .#{$select-ns}-wrapper {
174
151
  min-height: $input-height;
175
152
  display:flex;
176
-
153
+
177
154
  .input-group-sm > &,
178
155
  &.form-select-sm,
179
- &.form-control-sm{
156
+ &.form-control-sm {
180
157
  min-height: $input-height-sm;
181
158
 
182
- .#{$select-ns}-control{
183
- //padding: $input-padding-y-sm $input-padding-x-sm;
159
+ .#{$select-ns}-control {
184
160
  @include border-radius($input-border-radius-sm);
185
161
  @include font-size($input-font-size-sm);
186
162
  }
187
163
 
188
- &.has-items .#{$select-ns}-control{
164
+ &.has-items .#{$select-ns}-control {
189
165
  font-size: $input-font-size-sm;
190
166
  padding-bottom: 0;
191
167
  }
192
168
  }
193
169
 
194
-
195
170
  .input-group-sm > &.multi.has-items,
196
171
  &.form-select-sm.multi.has-items,
197
- &.form-control-sm.multi.has-items{
198
- .#{$select-ns}-control{
172
+ &.form-control-sm.multi.has-items {
173
+ .#{$select-ns}-control {
199
174
  // padding-top = ($input-height-sm - border-width - item-height) / 2;
200
175
  // item-height = ($select-line-height * $input-font-size-sm) + ($select-padding-item-y * 2)
201
- $border-and-padding: add($input-border-width,$select-padding-item-y) * 2;
202
- $ts-select-padding-sm: calc( (#{$input-height-sm} - (#{$select-line-height} * #{$input-font-size-sm}) - #{$border-and-padding})/2);
176
+ $border-and-padding: calc(($input-border-width + $select-padding-item-y) * 2);
177
+ $ts-select-padding-sm: calc((#{$input-height-sm} - (#{$select-line-height} * #{$input-font-size-sm}) - #{$border-and-padding})/2);
178
+
203
179
  padding-top: $ts-select-padding-sm !important;
204
180
  }
205
181
  }
206
182
 
207
-
208
183
  &.multi {
209
184
  &.has-items .#{$select-ns}-control {
210
185
  padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
186
+
211
187
  --ts-pr-min: calc(#{$select-padding-x} - #{$select-padding-item-x});
212
188
  }
213
189
  .#{$select-ns}-control > div {
@@ -217,26 +193,22 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
217
193
 
218
194
  .input-group-lg > &,
219
195
  &.form-control-lg,
220
- &.form-select-lg{
196
+ &.form-select-lg {
221
197
  min-height: $input-height-lg;
222
198
  .#{$select-ns}-control{
223
199
  @include border-radius($input-border-radius-lg);
224
200
  @include font-size($input-font-size-lg);
225
201
  }
226
202
  }
227
- }
228
-
229
203
 
230
- .#{$select-ns}-wrapper{
231
-
232
- &:not(.form-control):not(.form-select){
204
+ &:not(.form-control, .form-select) {
233
205
  padding: 0;
234
206
  border: none;
235
207
  height: auto;
236
208
  box-shadow: none;
237
209
  background: none;
238
210
 
239
- &.single .#{$select-ns}-control{
211
+ &.single .#{$select-ns}-control {
240
212
  background-image: escape-svg($form-select-indicator);
241
213
  background-repeat: no-repeat;
242
214
  background-position: $form-select-bg-position;
@@ -245,39 +217,41 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
245
217
  }
246
218
 
247
219
  &.form-select,
248
- &.single{
220
+ &.single {
249
221
  --ts-pr-caret: #{$form-select-indicator-padding};
250
222
  }
251
223
 
252
- }
253
-
254
- .#{$select-ns}-wrapper.form-control,
255
- .#{$select-ns}-wrapper.form-select{
224
+ &.form-control,
225
+ &.form-select {
226
+ padding:0 !important;
227
+ height: auto;
228
+ box-shadow: none;
229
+ display: flex;
256
230
 
257
- .#{$select-ns}-control,
258
- &.single.input-active .#{$select-ns}-control{
259
- border: none !important;
260
- }
231
+ .#{$select-ns}-control,
232
+ &.single.input-active .#{$select-ns}-control {
233
+ border: none !important;
234
+ }
261
235
 
262
- &:not(.disabled) .#{$select-ns}-control,
263
- &:not(.disabled).single.input-active .#{$select-ns}-control{
264
- background: transparent !important; // let the background of .form-select show through
236
+ &:not(.disabled) .#{$select-ns}-control,
237
+ &:not(.disabled).single.input-active .#{$select-ns}-control {
238
+ background: transparent !important; // let the background of .form-select show through
239
+ }
265
240
  }
266
-
267
241
  }
268
242
 
269
243
  .input-group{
270
-
271
- & > .#{$select-ns}-wrapper{
244
+ & > .#{$select-ns}-wrapper {
272
245
  flex-grow: 1;
246
+ width: 1%;
273
247
  }
274
248
 
275
- & > .#{$select-ns}-wrapper:not(:nth-child(2)) > .#{$select-ns}-control{
249
+ & > .#{$select-ns}-wrapper:not(:nth-child(2)) > .#{$select-ns}-control {
276
250
  border-top-left-radius: 0;
277
251
  border-bottom-left-radius: 0;
278
252
  }
279
253
 
280
- & > .#{$select-ns}-wrapper:not(:last-child) > .#{$select-ns}-control{
254
+ & > .#{$select-ns}-wrapper:not(:last-child) > .#{$select-ns}-control {
281
255
  border-top-right-radius: 0;
282
256
  border-bottom-right-radius: 0;
283
257
  }
@@ -1,38 +1,37 @@
1
-
2
-
3
1
  $select-color-item: #1da7ee;
4
- $select-color-item-text: #fff;
2
+ $select-color-item-text: #fff;
5
3
  $select-color-item-active-text: #fff;
6
4
  $select-color-item-border: #0073bb;
7
5
  $select-color-item-active: #92c836;
8
6
  $select-color-item-active-border: #00578d;
9
7
  $select-width-item-border: 1px;
10
-
11
- $select-shadow-input: inset 0 1px 1px rgba(0,0,0,0.1) !default;
12
- $select-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15) !default;
13
-
8
+ $select-shadow-input: inset 0 1px 1px rgba(0, 0, 0, 10%) !default;
9
+ $select-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, 15%) !default;
14
10
 
15
11
  @import "tom-select";
16
- @include ts-caret();
12
+ @include ts-caret;
17
13
 
18
14
  .#{$select-ns}-wrapper {
19
15
  display:flex;
20
16
  min-height:$select-line-height + ($select-padding-y*2) + ($select-border-width *2);
21
17
 
22
18
  &.multi {
23
-
24
19
  &.has-items .#{$select-ns}-control {
25
20
  $padding-x: $select-padding-x - 3px;
21
+
26
22
  padding-left: $padding-x;
27
- --ts-pr-min:$padding-x;
23
+
24
+ --ts-pr-min: $padding-x;
28
25
  }
29
26
 
30
27
  .#{$select-ns}-control {
31
28
  [data-value] {
32
- text-shadow: 0 1px 0 rgba(0,51,83,0.3);
29
+ text-shadow: 0 1px 0 rgba(0, 51, 83, 30%);
33
30
  border-radius: 3px;
34
31
  @include selectize-vertical-gradient(#1da7ee, #178ee9);
35
- box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
32
+
33
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 20%),inset 0 1px rgba(255, 255, 255, 3%);
34
+
36
35
  &.active {
37
36
  @include selectize-vertical-gradient(#008fd8, #0075cf);
38
37
  }
@@ -48,15 +47,16 @@ $select-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15) !default;
48
47
  &, .remove {
49
48
  border-color: #e6e6e6;
50
49
  }
50
+
51
51
  .remove {
52
52
  background: none;
53
53
  }
54
54
  }
55
-
56
55
  }
56
+
57
57
  &.single {
58
58
  .#{$select-ns}-control {
59
- box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
59
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 5%), inset 0 1px 0 rgba(255, 255, 255, 80%);
60
60
  @include selectize-vertical-gradient(#fefefe, #f2f2f2);
61
61
  }
62
62
  }
@@ -78,8 +78,10 @@ $select-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15) !default;
78
78
  font-weight: bold;
79
79
  font-size: 0.85em;
80
80
  }
81
+
81
82
  .optgroup {
82
83
  border-top: 1px solid $select-color-dropdown-border-top;
84
+
83
85
  &:first-child {
84
86
  border-top: 0 none;
85
87
  }