tom-select-rails 0.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) 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 +761 -273
  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 +756 -272
  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 +753 -269
  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 +1 -1
  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 +9 -5
  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 +1 -1
  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 +12 -7
  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 +13 -8
  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 +1 -1
  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 +12 -7
  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 +12 -8
  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 +1 -1
  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 +1 -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 +1 -1
  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 +9 -4
  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 +12 -7
  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 +1 -1
  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 +16 -8
  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 +761 -273
  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 +756 -272
  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 +753 -269
  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 +1 -1
  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 +164 -160
  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 +1 -1
  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 +12 -7
  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 +94 -89
  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 +1 -1
  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 +121 -116
  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 +234 -230
  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 +1 -1
  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 +1 -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 +1 -1
  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 +112 -107
  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 +149 -144
  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 +1 -1
  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 +277 -269
  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 +756 -272
  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 +329 -272
  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 +761 -273
  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 +268 -209
  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 +753 -269
  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 +348 -291
  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/tom-select.d.ts +6 -6
  88. data/vendor/assets/javascripts/tom-select-rails/types/types/settings.d.ts +19 -22
  89. data/vendor/assets/javascripts/tom-select-rails/types/utils.d.ts +5 -5
  90. data/vendor/assets/javascripts/tom-select-rails/types/vanilla.d.ts +2 -2
  91. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css +41 -19
  92. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.css.map +1 -1
  93. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css +1 -1
  94. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap4.min.css.map +1 -1
  95. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css +61 -34
  96. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.css.map +1 -1
  97. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css +1 -1
  98. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.bootstrap5.min.css.map +1 -1
  99. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css +39 -17
  100. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.css.map +1 -1
  101. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css +41 -19
  102. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.css.map +1 -1
  103. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css +1 -1
  104. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.default.min.css.map +1 -1
  105. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css +1 -1
  106. data/vendor/assets/stylesheets/tom-select-rails/css/tom-select.min.css.map +1 -1
  107. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/clear_button.scss +11 -10
  108. data/vendor/assets/stylesheets/tom-select-rails/scss/plugins/remove_button.scss +34 -8
  109. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.bootstrap4.scss +1 -1
  110. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.bootstrap5.scss +20 -10
  111. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.default.scss +1 -1
  112. data/vendor/assets/stylesheets/tom-select-rails/scss/tom-select.scss +11 -2
  113. metadata +3 -3
@@ -1,14 +1,11 @@
1
-
2
1
  .plugin-clear_button{
3
-
4
- .#{$select-ns}-control{
5
- padding-right: calc( 1em + (3 * #{$select-padding-item-x}) ) !important;
6
- }
2
+ --ts-pr-clear-button: 1em;
7
3
 
8
4
  .clear-button{
9
5
  opacity: 0;
10
6
  position: absolute;
11
- top: $select-padding-y;
7
+ top: 50%;
8
+ transform: translateY(-50%);
12
9
  right: calc(#{$select-padding-x} - #{$select-padding-item-x});
13
10
  margin-right: 0 !important;
14
11
  background: transparent !important;
@@ -16,15 +13,19 @@
16
13
  cursor: pointer;
17
14
  }
18
15
 
16
+ &.form-select .clear-button,
19
17
  &.single .clear-button{
20
- right: calc(#{$select-padding-x} - #{$select-padding-item-x} + 2rem);
18
+
19
+ @if variable-exists(select-padding-dropdown-item-x) {
20
+ right: Max( var(--ts-pr-caret), #{$select-padding-dropdown-item-x});
21
+ }
22
+ @else{
23
+ right: Max( var(--ts-pr-caret), calc(#{$select-padding-x} - #{$select-padding-item-x}) );
24
+ }
21
25
  }
22
26
 
23
27
  &.focus.has-items .clear-button,
24
28
  &:not(.disabled):hover.has-items .clear-button{
25
29
  opacity: 1;
26
30
  }
27
-
28
-
29
-
30
31
  }
@@ -12,27 +12,19 @@
12
12
  vertical-align: middle;
13
13
  display: inline-block;
14
14
  padding: 0 $select-padding-item-x;
15
- border-left: 1px solid $select-color-item-border;
16
15
  border-radius: 0 2px 2px 0;
17
16
  box-sizing: border-box;
18
- margin-left: $select-padding-item-x;
19
17
  }
20
18
 
21
19
  .item .remove:hover {
22
20
  background: rgba(0,0,0,0.05);
23
21
  }
24
22
 
25
- .item.active .remove {
26
- border-left-color: $select-color-item-active-border;
27
- }
28
23
 
29
24
  &.disabled .item .remove:hover {
30
25
  background: none;
31
26
  }
32
27
 
33
- &.disabled .item .remove {
34
- border-left-color: lighten(desaturate($select-color-item-border, 100%), $select-lighten-disabled-item-border);
35
- }
36
28
 
37
29
  .remove-single {
38
30
  position: absolute;
@@ -42,3 +34,37 @@
42
34
  }
43
35
 
44
36
  }
37
+
38
+ .#{$select-ns}-wrapper.plugin-remove_button:not(.rtl){
39
+
40
+ .item .remove {
41
+ border-left: 1px solid $select-color-item-border;
42
+ margin-left: $select-padding-item-x;
43
+ }
44
+
45
+ .item.active .remove {
46
+ border-left-color: $select-color-item-active-border;
47
+ }
48
+
49
+ &.disabled .item .remove {
50
+ border-left-color: lighten(desaturate($select-color-item-border, 100%), $select-lighten-disabled-item-border);
51
+ }
52
+
53
+ }
54
+
55
+ .#{$select-ns}-wrapper.plugin-remove_button.rtl {
56
+
57
+ .item .remove {
58
+ border-right: 1px solid $select-color-item-border;
59
+ margin-right: $select-padding-item-x;
60
+ }
61
+
62
+ .item.active .remove {
63
+ border-right-color: $select-color-item-active-border;
64
+ }
65
+
66
+ &.disabled .item .remove {
67
+ border-right-color: lighten(desaturate($select-color-item-border, 100%), $select-lighten-disabled-item-border);
68
+ }
69
+
70
+ }
@@ -175,7 +175,7 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
175
175
  &.multi {
176
176
  &.has-items .#{$select-ns}-control {
177
177
  padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
178
- padding-right: calc(#{$select-padding-x} - #{$select-padding-item-x});
178
+ --ts-pr-min: calc(#{$select-padding-x} - #{$select-padding-item-x});
179
179
  }
180
180
  .#{$select-ns}-control > div {
181
181
  border-radius: calc(#{$select-border-radius} - 1px);
@@ -180,7 +180,6 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
180
180
  min-height: $input-height-sm;
181
181
 
182
182
  .#{$select-ns}-control{
183
- padding: 0 .75rem;
184
183
  //padding: $input-padding-y-sm $input-padding-x-sm;
185
184
  @include border-radius($input-border-radius-sm);
186
185
  @include font-size($input-font-size-sm);
@@ -209,7 +208,7 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
209
208
  &.multi {
210
209
  &.has-items .#{$select-ns}-control {
211
210
  padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
212
- padding-right: calc(#{$select-padding-x} - #{$select-padding-item-x});
211
+ --ts-pr-min: calc(#{$select-padding-x} - #{$select-padding-item-x});
213
212
  }
214
213
  .#{$select-ns}-control > div {
215
214
  border-radius: calc(#{$select-border-radius} - 1px);
@@ -228,19 +227,26 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
228
227
  }
229
228
 
230
229
 
231
- .#{$select-ns}-wrapper:not(.form-control):not(.form-select){
232
- padding: 0;
230
+ .#{$select-ns}-wrapper{
231
+
232
+ &:not(.form-control):not(.form-select){
233
+ padding: 0;
233
234
  border: none;
234
235
  height: auto;
235
236
  box-shadow: none;
236
237
  background: none;
237
238
 
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;
239
+ &.single .#{$select-ns}-control{
240
+ background-image: escape-svg($form-select-indicator);
241
+ background-repeat: no-repeat;
242
+ background-position: $form-select-bg-position;
243
+ background-size: $form-select-bg-size;
244
+ }
245
+ }
246
+
247
+ &.form-select,
248
+ &.single{
249
+ --ts-pr-caret: #{$form-select-indicator-padding};
244
250
  }
245
251
 
246
252
  }
@@ -251,6 +257,10 @@ $select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
251
257
  .#{$select-ns}-control,
252
258
  &.single.input-active .#{$select-ns}-control{
253
259
  border: none !important;
260
+ }
261
+
262
+ &:not(.disabled) .#{$select-ns}-control,
263
+ &:not(.disabled).single.input-active .#{$select-ns}-control{
254
264
  background: transparent !important; // let the background of .form-select show through
255
265
  }
256
266
 
@@ -24,7 +24,7 @@ $select-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15) !default;
24
24
  &.has-items .#{$select-ns}-control {
25
25
  $padding-x: $select-padding-x - 3px;
26
26
  padding-left: $padding-x;
27
- padding-right: $padding-x;
27
+ --ts-pr-min:$padding-x;
28
28
  }
29
29
 
30
30
  .#{$select-ns}-control {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tom-select.css (v2.1.0)
2
+ * tom-select.css (v2.2.1)
3
3
  * Copyright (c) contributors
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
@@ -77,6 +77,12 @@ $select-spinner-size: 30px !default;
77
77
  $select-spinner-border-size: 5px !default;
78
78
  $select-spinner-border-color: $select-color-border !default;
79
79
 
80
+ :root{
81
+ --ts-pr-clear-button: 0;
82
+ --ts-pr-caret: 0;
83
+ --ts-pr-min: .75rem;
84
+ }
85
+
80
86
  @mixin selectize-vertical-gradient($color-top, $color-bottom) {
81
87
  background-color: mix($color-top, $color-bottom, 60%);
82
88
  background-image: linear-gradient(to bottom, $color-top, $color-bottom);
@@ -92,13 +98,16 @@ $select-spinner-border-color: $select-color-border !default;
92
98
  }
93
99
  }
94
100
 
101
+ .#{$select-ns}-control {
102
+ padding-right: Max( var(--ts-pr-min), calc( var(--ts-pr-clear-button) + var(--ts-pr-caret)) ) !important;
103
+ }
95
104
 
96
105
  @mixin ts-caret(){
97
106
 
98
107
  .#{$select-ns}-wrapper.single{
99
108
 
100
109
  .#{$select-ns}-control {
101
- padding-right: 2rem;
110
+ --ts-pr-caret: 2rem;
102
111
 
103
112
  &:after {
104
113
  content: ' ';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tom-select-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyson Gach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2022-11-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: tyson@tysongach.com
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubygems_version: 3.3.15
191
+ rubygems_version: 3.1.6
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: Integrate Tom Select with the asset pipeline in Rails.