tom-select-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +26 -0
  4. data/Rakefile +3 -0
  5. data/lib/tom-select-rails/engine.rb +8 -0
  6. data/lib/tom-select-rails/version.rb +5 -0
  7. data/lib/tom-select-rails.rb +7 -0
  8. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js +4887 -0
  9. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.complete.js.map +1 -0
  10. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js +4085 -0
  11. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.js.map +1 -0
  12. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js +4337 -0
  13. data/vendor/assets/javascripts/tom-select-rails/cjs/tom-select.popular.js.map +1 -0
  14. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js +196 -0
  15. data/vendor/assets/javascripts/tom-select-rails/cjs/utils.js.map +1 -0
  16. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js +162 -0
  17. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/caret_position/plugin.js.map +1 -0
  18. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js +50 -0
  19. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/change_listener/plugin.js.map +1 -0
  20. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js +172 -0
  21. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/checkbox_options/plugin.js.map +1 -0
  22. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js +91 -0
  23. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/clear_button/plugin.js.map +1 -0
  24. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js +62 -0
  25. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/drag_drop/plugin.js.map +1 -0
  26. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js +118 -0
  27. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_header/plugin.js.map +1 -0
  28. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js +230 -0
  29. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/dropdown_input/plugin.js.map +1 -0
  30. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js +80 -0
  31. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/input_autogrow/plugin.js.map +1 -0
  32. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js +25 -0
  33. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_active_items/plugin.js.map +1 -0
  34. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js +32 -0
  35. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/no_backspace_delete/plugin.js.map +1 -0
  36. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js +108 -0
  37. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/optgroup_columns/plugin.js.map +1 -0
  38. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js +146 -0
  39. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/remove_button/plugin.js.map +1 -0
  40. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js +43 -0
  41. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/restore_on_backspace/plugin.js.map +1 -0
  42. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js +261 -0
  43. data/vendor/assets/javascripts/tom-select-rails/esm/plugins/virtual_scroll/plugin.js.map +1 -0
  44. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js +4885 -0
  45. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.complete.js.map +1 -0
  46. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js +4083 -0
  47. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.js.map +1 -0
  48. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js +4335 -0
  49. data/vendor/assets/javascripts/tom-select-rails/esm/tom-select.popular.js.map +1 -0
  50. data/vendor/assets/javascripts/tom-select-rails/esm/utils.js +181 -0
  51. data/vendor/assets/javascripts/tom-select-rails/esm/utils.js.map +1 -0
  52. data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js +170 -0
  53. data/vendor/assets/javascripts/tom-select-rails/js/plugins/caret_position.js.map +1 -0
  54. data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js +58 -0
  55. data/vendor/assets/javascripts/tom-select-rails/js/plugins/change_listener.js.map +1 -0
  56. data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js +180 -0
  57. data/vendor/assets/javascripts/tom-select-rails/js/plugins/checkbox_options.js.map +1 -0
  58. data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js +99 -0
  59. data/vendor/assets/javascripts/tom-select-rails/js/plugins/clear_button.js.map +1 -0
  60. data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js +70 -0
  61. data/vendor/assets/javascripts/tom-select-rails/js/plugins/drag_drop.js.map +1 -0
  62. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js +126 -0
  63. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_header.js.map +1 -0
  64. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js +238 -0
  65. data/vendor/assets/javascripts/tom-select-rails/js/plugins/dropdown_input.js.map +1 -0
  66. data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js +88 -0
  67. data/vendor/assets/javascripts/tom-select-rails/js/plugins/input_autogrow.js.map +1 -0
  68. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js +33 -0
  69. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_active_items.js.map +1 -0
  70. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js +40 -0
  71. data/vendor/assets/javascripts/tom-select-rails/js/plugins/no_backspace_delete.js.map +1 -0
  72. data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js +116 -0
  73. data/vendor/assets/javascripts/tom-select-rails/js/plugins/optgroup_columns.js.map +1 -0
  74. data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js +154 -0
  75. data/vendor/assets/javascripts/tom-select-rails/js/plugins/remove_button.js.map +1 -0
  76. data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js +51 -0
  77. data/vendor/assets/javascripts/tom-select-rails/js/plugins/restore_on_backspace.js.map +1 -0
  78. data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js +269 -0
  79. data/vendor/assets/javascripts/tom-select-rails/js/plugins/virtual_scroll.js.map +1 -0
  80. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js +4092 -0
  81. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.js.map +1 -0
  82. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js +303 -0
  83. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.base.min.js.map +1 -0
  84. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js +4894 -0
  85. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.js.map +1 -0
  86. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js +362 -0
  87. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.complete.min.js.map +1 -0
  88. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js +4344 -0
  89. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.js.map +1 -0
  90. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js +324 -0
  91. data/vendor/assets/javascripts/tom-select-rails/js/tom-select.popular.min.js.map +1 -0
  92. data/vendor/assets/javascripts/tom-select-rails/types/constants.d.ts +12 -0
  93. data/vendor/assets/javascripts/tom-select-rails/types/contrib/highlight.d.ts +13 -0
  94. data/vendor/assets/javascripts/tom-select-rails/types/contrib/microevent.d.ts +20 -0
  95. data/vendor/assets/javascripts/tom-select-rails/types/contrib/microplugin.d.ts +71 -0
  96. data/vendor/assets/javascripts/tom-select-rails/types/defaults.d.ts +51 -0
  97. data/vendor/assets/javascripts/tom-select-rails/types/getSettings.d.ts +3 -0
  98. data/vendor/assets/javascripts/tom-select-rails/types/plugins/caret_position/plugin.d.ts +16 -0
  99. data/vendor/assets/javascripts/tom-select-rails/types/plugins/change_listener/plugin.d.ts +16 -0
  100. data/vendor/assets/javascripts/tom-select-rails/types/plugins/checkbox_options/plugin.d.ts +16 -0
  101. data/vendor/assets/javascripts/tom-select-rails/types/plugins/clear_button/plugin.d.ts +17 -0
  102. data/vendor/assets/javascripts/tom-select-rails/types/plugins/clear_button/types.d.ts +5 -0
  103. data/vendor/assets/javascripts/tom-select-rails/types/plugins/drag_drop/plugin.d.ts +16 -0
  104. data/vendor/assets/javascripts/tom-select-rails/types/plugins/dropdown_header/plugin.d.ts +17 -0
  105. data/vendor/assets/javascripts/tom-select-rails/types/plugins/dropdown_header/types.d.ts +8 -0
  106. data/vendor/assets/javascripts/tom-select-rails/types/plugins/dropdown_input/plugin.d.ts +16 -0
  107. data/vendor/assets/javascripts/tom-select-rails/types/plugins/input_autogrow/plugin.d.ts +15 -0
  108. data/vendor/assets/javascripts/tom-select-rails/types/plugins/no_active_items/plugin.d.ts +15 -0
  109. data/vendor/assets/javascripts/tom-select-rails/types/plugins/no_backspace_delete/plugin.d.ts +15 -0
  110. data/vendor/assets/javascripts/tom-select-rails/types/plugins/optgroup_columns/plugin.d.ts +16 -0
  111. data/vendor/assets/javascripts/tom-select-rails/types/plugins/remove_button/plugin.d.ts +17 -0
  112. data/vendor/assets/javascripts/tom-select-rails/types/plugins/remove_button/types.d.ts +6 -0
  113. data/vendor/assets/javascripts/tom-select-rails/types/plugins/restore_on_backspace/plugin.d.ts +21 -0
  114. data/vendor/assets/javascripts/tom-select-rails/types/plugins/virtual_scroll/plugin.d.ts +16 -0
  115. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.complete.d.ts +2 -0
  116. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.d.ts +579 -0
  117. data/vendor/assets/javascripts/tom-select-rails/types/tom-select.popular.d.ts +2 -0
  118. data/vendor/assets/javascripts/tom-select-rails/types/types/core.d.ts +44 -0
  119. data/vendor/assets/javascripts/tom-select-rails/types/types/index.d.ts +2 -0
  120. data/vendor/assets/javascripts/tom-select-rails/types/types/settings.d.ts +81 -0
  121. data/vendor/assets/javascripts/tom-select-rails/types/utils.d.ts +76 -0
  122. data/vendor/assets/javascripts/tom-select-rails/types/vanilla.d.ts +76 -0
  123. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css +548 -0
  124. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css.map +1 -0
  125. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css +2 -0
  126. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css.map +1 -0
  127. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css +592 -0
  128. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css.map +1 -0
  129. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css +2 -0
  130. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css.map +1 -0
  131. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css +391 -0
  132. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css.map +1 -0
  133. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css +476 -0
  134. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css.map +1 -0
  135. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css +2 -0
  136. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css.map +1 -0
  137. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css +2 -0
  138. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css.map +1 -0
  139. data/vendor/assets/stylesheets/tom-select-rails/scss/_dropdown.scss +104 -0
  140. data/vendor/assets/stylesheets/tom-select-rails/scss/_items.scss +115 -0
  141. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/checkbox_options.scss +5 -0
  142. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/clear_button.scss +30 -0
  143. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/drag_drop.scss +16 -0
  144. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/dropdown_header.scss +23 -0
  145. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/dropdown_input.scss +47 -0
  146. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/input_autogrow.scss +18 -0
  147. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/optgroup_columns.scss +23 -0
  148. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/remove_button.scss +44 -0
  149. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.bootstrap4.scss +219 -0
  150. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.bootstrap5.scss +274 -0
  151. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.default.scss +87 -0
  152. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.scss +175 -0
  153. metadata +195 -0
@@ -0,0 +1,274 @@
1
+ /**
2
+ * Tom Select bootstrap 5
3
+ */
4
+
5
+ //Import Boostrap 5 functions and variables
6
+ $state-valid: map-get($form-validation-states,'valid') !default;
7
+ $state-invalid: map-get($form-validation-states,'invalid') !default;
8
+
9
+
10
+ $enable-shadows: true !default;
11
+ $select-font-family: inherit !default;
12
+ $select-font-size: inherit !default;
13
+ $select-line-height: $input-btn-line-height !default; //formerly line-height-computed
14
+
15
+ $select-color-text: $gray-800 !default;
16
+ $select-color-highlight: rgba(255,237,40,0.4) !default;
17
+ $select-color-input: $input-bg !default;
18
+ $select-color-input-full: $input-bg !default;
19
+
20
+
21
+ $select-color-disabled: $input-disabled-bg !default;
22
+ $select-color-item: #efefef !default;
23
+ $select-color-item-border: $border-color !default;
24
+ $select-color-item-active: $component-active-bg !default;
25
+ $select-color-item-active-text: #fff !default;
26
+ $select-color-item-active-border: rgba(0,0,0,0) !default;
27
+ $select-color-optgroup: $dropdown-bg !default;
28
+ $select-color-optgroup-text: $dropdown-header-color !default;
29
+ $select-color-optgroup-border: $dropdown-divider-bg !default;
30
+ $select-color-dropdown: $dropdown-bg !default;
31
+ $select-color-dropdown-border-top: mix($input-border-color, $input-bg, 0.8) !default;
32
+ $select-color-dropdown-item-active: $dropdown-link-hover-bg !default;
33
+ $select-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
34
+ $select-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
35
+ $select-opacity-disabled: 0.5 !default;
36
+
37
+ $select-border: 1px solid $input-border-color !default;
38
+ $select-border-radius: $input-border-radius !default;
39
+
40
+ $select-width-item-border: 0px !default;
41
+ $select-padding-x: $input-padding-x !default;
42
+ $select-padding-y: $input-padding-y !default;
43
+ $select-padding-dropdown-item-x: $input-btn-padding-x !default;
44
+ $select-padding-dropdown-item-y: 3px !default;
45
+ $select-padding-item-x: 5px !default;
46
+ $select-padding-item-y: 1px !default;
47
+ $select-margin-item-x: 3px !default;
48
+ $select-margin-item-y: 3px !default;
49
+
50
+ $select-arrow-size: 5px !default;
51
+ $select-arrow-color: $select-color-text !default;
52
+ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
53
+
54
+
55
+ @import "tom-select";
56
+
57
+
58
+ @mixin ts-form-validation-state-selector($state) {
59
+
60
+ $state-map: map-get($form-validation-states,$state);
61
+
62
+ .#{$select-ns}-wrapper.is-#{$state},
63
+ .was-validated .#{$state},
64
+ .was-validated :#{$state} + .#{$select-ns}-wrapper{
65
+
66
+ $color: map-get($state-map,'color');
67
+ $icon: map-get($state-map,'icon');
68
+
69
+ border-color: $color;
70
+
71
+ &:not(.single){
72
+ background-image: escape-svg($icon);
73
+ background-position: right $input-height-inner-quarter center;
74
+ background-size: $input-height-inner-half $input-height-inner-half;
75
+ background-repeat: no-repeat;
76
+ }
77
+
78
+ &.single{
79
+ background-image: escape-svg($form-select-indicator), escape-svg($icon);
80
+ background-position: $form-select-bg-position, $form-select-feedback-icon-position;
81
+ background-size: $form-select-bg-size, $form-select-feedback-icon-size;
82
+ background-repeat: no-repeat;
83
+ }
84
+
85
+ &.focus .#{$select-ns}-control{
86
+ border-color: $color;
87
+ box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity);
88
+ }
89
+
90
+ }
91
+ }
92
+
93
+
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
+ .#{$select-ns}-dropdown,
103
+ .#{$select-ns}-dropdown.form-control,
104
+ .#{$select-ns}-dropdown.form-select{
105
+ height: auto;
106
+ padding: 0;
107
+ z-index: $zindex-dropdown;
108
+ background: $select-color-dropdown;
109
+ border: 1px solid $dropdown-border-color; //$dropdown-fallback-border
110
+ border-radius: $border-radius;
111
+ box-shadow: 0 6px 12px rgba(0,0,0,.175);
112
+ }
113
+
114
+ .#{$select-ns}-dropdown {
115
+ .optgroup-header {
116
+ font-size: $font-size-sm;
117
+ line-height: $line-height-base;
118
+ }
119
+ .optgroup:first-child:before {
120
+ display: none;
121
+ }
122
+ .optgroup:before {
123
+ content: ' ';
124
+ display: block;
125
+ height: 0;
126
+ margin: $dropdown-divider-margin-y 0;
127
+ overflow: hidden;
128
+ border-top: 1px solid $dropdown-divider-bg;
129
+ margin-left: $select-padding-dropdown-item-x * -1;
130
+ margin-right: $select-padding-dropdown-item-x * -1;
131
+ }
132
+
133
+ .create {
134
+ padding-left: $select-padding-dropdown-item-x;
135
+ }
136
+ }
137
+
138
+ .#{$select-ns}-dropdown-content {
139
+ padding: 5px 0;
140
+ }
141
+
142
+ .#{$select-ns}-control {
143
+ @include box-shadow($input-box-shadow);
144
+ @include transition($input-transition);
145
+ display:flex;
146
+ align-items: center;
147
+
148
+ &.dropdown -active {
149
+ border-radius: $select-border-radius;
150
+ }
151
+
152
+ .focus &{
153
+ border-color: $input-focus-border-color;
154
+ outline: 0;
155
+ @if $enable-shadows {
156
+ box-shadow: $input-box-shadow, $input-focus-box-shadow;
157
+ } @else {
158
+ box-shadow: $input-focus-box-shadow;
159
+ }
160
+ }
161
+
162
+ .item{
163
+ display: flex;
164
+ align-items: center;
165
+ }
166
+ }
167
+
168
+
169
+ @include ts-form-validation-state-selector('invalid');
170
+ @include ts-form-validation-state-selector('valid');
171
+
172
+
173
+ .#{$select-ns}-wrapper {
174
+ min-height: $input-height;
175
+ display:flex;
176
+
177
+ .input-group-sm > &,
178
+ &.form-select-sm,
179
+ &.form-control-sm{
180
+ min-height: $input-height-sm;
181
+
182
+ .#{$select-ns}-control{
183
+ padding: 0 .75rem;
184
+ //padding: $input-padding-y-sm $input-padding-x-sm;
185
+ @include border-radius($input-border-radius-sm);
186
+ @include font-size($input-font-size-sm);
187
+ }
188
+
189
+ &.has-items .#{$select-ns}-control{
190
+ font-size: $input-font-size-sm;
191
+ padding-bottom: 0;
192
+ }
193
+ }
194
+
195
+
196
+ .input-group-sm > &.multi.has-items,
197
+ &.form-select-sm.multi.has-items,
198
+ &.form-control-sm.multi.has-items{
199
+ .#{$select-ns}-control{
200
+ // padding-top = ($input-height-sm - border-width - item-height) / 2;
201
+ // item-height = ($select-line-height * $input-font-size-sm) + ($select-padding-item-y * 2)
202
+ $border-and-padding: add($input-border-width,$select-padding-item-y) * 2;
203
+ $ts-select-padding-sm: calc( (#{$input-height-sm} - (#{$select-line-height} * #{$input-font-size-sm}) - #{$border-and-padding})/2);
204
+ padding-top: $ts-select-padding-sm !important;
205
+ }
206
+ }
207
+
208
+
209
+ &.multi {
210
+ &.has-items .#{$select-ns}-control {
211
+ padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
212
+ padding-right: calc(#{$select-padding-x} - #{$select-padding-item-x});
213
+ }
214
+ .#{$select-ns}-control > div {
215
+ border-radius: calc(#{$select-border-radius} - 1px);
216
+ }
217
+ }
218
+
219
+ .input-group-lg > &,
220
+ &.form-control-lg,
221
+ &.form-select-lg{
222
+ min-height: $input-height-lg;
223
+ .#{$select-ns}-control{
224
+ @include border-radius($input-border-radius-lg);
225
+ @include font-size($input-font-size-lg);
226
+ }
227
+ }
228
+ }
229
+
230
+
231
+ .#{$select-ns}-wrapper:not(.form-control):not(.form-select){
232
+ padding: 0;
233
+ border: none;
234
+ height: auto;
235
+ box-shadow: none;
236
+ background: none;
237
+
238
+ &.single .#{$select-ns}-control{
239
+ background-image: escape-svg($form-select-indicator);
240
+ background-repeat: no-repeat;
241
+ background-position: $form-select-bg-position;
242
+ background-size: $form-select-bg-size;
243
+ padding-right: 2rem;
244
+ }
245
+
246
+ }
247
+
248
+ .#{$select-ns}-wrapper.form-control,
249
+ .#{$select-ns}-wrapper.form-select{
250
+
251
+ .#{$select-ns}-control,
252
+ &.single.input-active .#{$select-ns}-control{
253
+ border: none !important;
254
+ background: transparent !important; // let the background of .form-select show through
255
+ }
256
+
257
+ }
258
+
259
+ .input-group{
260
+
261
+ & > .#{$select-ns}-wrapper{
262
+ flex-grow: 1;
263
+ }
264
+
265
+ & > .#{$select-ns}-wrapper:not(:nth-child(2)) > .#{$select-ns}-control{
266
+ border-top-left-radius: 0;
267
+ border-bottom-left-radius: 0;
268
+ }
269
+
270
+ & > .#{$select-ns}-wrapper:not(:last-child) > .#{$select-ns}-control{
271
+ border-top-right-radius: 0;
272
+ border-bottom-right-radius: 0;
273
+ }
274
+ }
@@ -0,0 +1,87 @@
1
+
2
+
3
+ $select-color-item: #1da7ee;
4
+ $select-color-item-text: #fff;
5
+ $select-color-item-active-text: #fff;
6
+ $select-color-item-border: #0073bb;
7
+ $select-color-item-active: #92c836;
8
+ $select-color-item-active-border: #00578d;
9
+ $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
+
14
+
15
+ @import "tom-select";
16
+ @include ts-caret();
17
+
18
+ .#{$select-ns}-wrapper {
19
+ display:flex;
20
+ min-height:$select-line-height + ($select-padding-y*2) + ($select-border-width *2);
21
+
22
+ &.multi {
23
+
24
+ &.has-items .#{$select-ns}-control {
25
+ $padding-x: $select-padding-x - 3px;
26
+ padding-left: $padding-x;
27
+ padding-right: $padding-x;
28
+ }
29
+
30
+ .#{$select-ns}-control {
31
+ [data-value] {
32
+ text-shadow: 0 1px 0 rgba(0,51,83,0.3);
33
+ border-radius: 3px;
34
+ @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);
36
+ &.active {
37
+ @include selectize-vertical-gradient(#008fd8, #0075cf);
38
+ }
39
+ }
40
+ }
41
+
42
+ &.disabled .#{$select-ns}-control [data-value] {
43
+ color: #999;
44
+ text-shadow: none;
45
+ background: none;
46
+ box-shadow: none;
47
+
48
+ &, .remove {
49
+ border-color: #e6e6e6;
50
+ }
51
+ .remove {
52
+ background: none;
53
+ }
54
+ }
55
+
56
+ }
57
+ &.single {
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);
60
+ @include selectize-vertical-gradient(#fefefe, #f2f2f2);
61
+ }
62
+ }
63
+ }
64
+
65
+ .#{$select-ns}-wrapper.single .#{$select-ns}-control, .#{$select-ns}-dropdown.single {
66
+ border-color: #b8b8b8;
67
+ }
68
+
69
+ .#{$select-ns}-control {
70
+ .dropdown-active & {
71
+ border-radius: $select-border-radius $select-border-radius 0 0;
72
+ }
73
+ }
74
+
75
+ .#{$select-ns}-dropdown {
76
+ .optgroup-header {
77
+ padding-top: $select-padding-dropdown-item-y + 2px;
78
+ font-weight: bold;
79
+ font-size: 0.85em;
80
+ }
81
+ .optgroup {
82
+ border-top: 1px solid $select-color-dropdown-border-top;
83
+ &:first-child {
84
+ border-top: 0 none;
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,175 @@
1
+ /**
2
+ * tom-select.css (v2.0.3)
3
+ * Copyright (c) contributors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
6
+ * file except in compliance with the License. You may obtain a copy of the License at:
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ * ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ *
14
+ */
15
+
16
+
17
+ // base styles
18
+ $select-ns: 'ts' !default;
19
+ $select-font-family: inherit !default;
20
+ $select-font-smoothing: inherit !default;
21
+ $select-font-size: 13px !default;
22
+ $select-line-height: 18px !default;
23
+
24
+ $select-color-text: #303030 !default;
25
+ $select-color-border: #d0d0d0 !default;
26
+ $select-color-highlight: rgba(125,168,208,0.2) !default;
27
+ $select-color-input: #fff !default;
28
+ $select-color-input-full: $select-color-input !default;
29
+ $select-color-disabled: #fafafa !default;
30
+ $select-color-item: #f2f2f2 !default;
31
+ $select-color-item-text: $select-color-text !default;
32
+ $select-color-item-border: #d0d0d0 !default;
33
+ $select-color-item-active: #e8e8e8 !default;
34
+ $select-color-item-active-text: $select-color-text !default;
35
+ $select-color-item-active-border: #cacaca !default;
36
+ $select-color-dropdown: #fff !default;
37
+ $select-color-dropdown-border: $select-color-border !default;
38
+ $select-color-dropdown-border-top: #f0f0f0 !default;
39
+ $select-color-dropdown-item-active: #f5fafd !default;
40
+ $select-color-dropdown-item-active-text: #495c68 !default;
41
+ $select-color-dropdown-item-create-text: rgba(red($select-color-text), green($select-color-text), blue($select-color-text), 0.5) !default;
42
+ $select-color-dropdown-item-create-active-text: $select-color-dropdown-item-active-text !default;
43
+ $select-color-optgroup: $select-color-dropdown !default;
44
+ $select-color-optgroup-text: $select-color-text !default;
45
+ $select-lighten-disabled-item: 30% !default;
46
+ $select-lighten-disabled-item-text: 30% !default;
47
+ $select-lighten-disabled-item-border: 30% !default;
48
+ $select-opacity-disabled: 0.5 !default;
49
+
50
+ $select-shadow-input: none !default;
51
+ $select-shadow-input-focus: none !default;
52
+ $select-border-width: 1px !default;
53
+ $select-border: $select-border-width solid $select-color-border !default;
54
+ $select-dropdown-border: 1px solid $select-color-dropdown-border !default;
55
+ $select-border-radius: 3px !default;
56
+
57
+ $select-width-item-border: 0 !default;
58
+ $select-max-height-dropdown: 200px !default;
59
+
60
+ $select-padding-x: 8px !default;
61
+ $select-padding-y: 8px !default;
62
+ $select-padding-item-x: 6px !default;
63
+ $select-padding-item-y: 2px !default;
64
+ $select-padding-dropdown-item-x: $select-padding-x !default;
65
+ $select-padding-dropdown-item-y: 5px !default;
66
+ $select-margin-item-x: 3px !default;
67
+ $select-margin-item-y: 3px !default;
68
+
69
+ $select-arrow-size: 5px !default;
70
+ $select-arrow-color: #808080 !default;
71
+ $select-arrow-offset: 15px !default;
72
+
73
+ $select-caret-margin: 0 4px !default;
74
+ $select-caret-margin-rtl: 0 4px 0 -2px !default;
75
+
76
+ $select-spinner-size: 30px !default;
77
+ $select-spinner-border-size: 5px !default;
78
+ $select-spinner-border-color: $select-color-border !default;
79
+
80
+ @mixin selectize-vertical-gradient($color-top, $color-bottom) {
81
+ background-color: mix($color-top, $color-bottom, 60%);
82
+ background-image: linear-gradient(to bottom, $color-top, $color-bottom);
83
+ background-repeat: repeat-x;
84
+ }
85
+
86
+
87
+ .#{$select-ns}-wrapper.single{
88
+ .#{$select-ns}-control {
89
+ &, input {
90
+ cursor: pointer;
91
+ }
92
+ }
93
+ }
94
+
95
+
96
+ @mixin ts-caret(){
97
+
98
+ .#{$select-ns}-wrapper.single{
99
+
100
+ .#{$select-ns}-control {
101
+ padding-right: 2rem;
102
+
103
+ &:after {
104
+ content: ' ';
105
+ display: block;
106
+ position: absolute;
107
+ top: 50%;
108
+ right: $select-arrow-offset;
109
+ margin-top: round(-0.5 * $select-arrow-size);
110
+ width: 0;
111
+ height: 0;
112
+ border-style: solid;
113
+ border-width: $select-arrow-size $select-arrow-size 0 $select-arrow-size;
114
+ border-color: $select-arrow-color transparent transparent transparent;
115
+ }
116
+ }
117
+
118
+ &.dropdown-active .#{$select-ns}-control::after {
119
+ margin-top: $select-arrow-size * -0.8;
120
+ border-width: 0 $select-arrow-size $select-arrow-size $select-arrow-size;
121
+ border-color: transparent transparent $select-arrow-color transparent;
122
+ }
123
+
124
+ &.input-active .#{$select-ns}-control,
125
+ &.input-active .#{$select-ns}-control input {
126
+ cursor: text;
127
+ }
128
+
129
+ }
130
+ }
131
+
132
+ @import "./plugins/drag_drop.scss";
133
+ @import "./plugins/checkbox_options.scss";
134
+ @import "./plugins/clear_button.scss";
135
+ @import "./plugins/dropdown_header.scss";
136
+ @import "./plugins/dropdown_input.scss";
137
+ @import "./plugins/input_autogrow.scss";
138
+ @import "./plugins/optgroup_columns.scss";
139
+ @import "./plugins/remove_button.scss";
140
+
141
+
142
+ .#{$select-ns}-wrapper {
143
+ position: relative;
144
+ }
145
+
146
+ .#{$select-ns}-dropdown,
147
+ .#{$select-ns}-control,
148
+ .#{$select-ns}-control input {
149
+ color: $select-color-text;
150
+ font-family: $select-font-family;
151
+ font-size: $select-font-size;
152
+ line-height: $select-line-height;
153
+ font-smoothing: $select-font-smoothing;
154
+ }
155
+
156
+ .#{$select-ns}-control,
157
+ .#{$select-ns}-wrapper.single.input-active .#{$select-ns}-control {
158
+ background: $select-color-input;
159
+ cursor: text;
160
+ }
161
+
162
+ @import 'items';
163
+ @import 'dropdown';
164
+
165
+ .ts-hidden-accessible{
166
+ border: 0 !important;
167
+ clip: rect(0 0 0 0) !important;
168
+ clip-path: inset(50%) !important;
169
+ //height: 1px !important;
170
+ overflow: hidden !important;
171
+ padding: 0 !important;
172
+ position: absolute !important;
173
+ width: 1px !important;
174
+ white-space: nowrap !important;
175
+ }