@danielgindi/selectbox 2.0.66 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,130 +1,150 @@
1
- # @danielgindi/selectbox
2
-
3
- A full featured selectbox and drop down.
4
-
5
- * Virtual list (can show a list with millions of items)
6
- * Live search right there in the box
7
- * Single or multi mode
8
- * Tags (items in the search box)
9
- * Custom item rendering
10
- * Variable height items
11
- * Highly configurable
12
- * No dependency on any ui framework
13
- * Can work in any framework or in vanilla js
14
- * Has existing Vue bindings
15
- * The droplist part can be used separately for floating menus etc.
16
-
17
- This is a real good component, which is the product of evolution over years. Until I sat down one day and refactored it into one cool thing.
18
- I really hope to get this documented so everyone can enjoy it.
19
-
20
- ### Installing
21
-
22
- * adding to package.json: `npm i --save @danielgindi/selectbox`
23
- * vanilla js:
24
- ```js
25
- import { SelectBox, DropList } from '@danielgindi/selectbox';
26
- ```
27
- * vuejs:
28
- ```js
29
- import { SelectBox, DropList } from '@danielgindi/selectbox/vue';
30
- ```
31
- * add the scss:
32
- ```scss
33
- @import '@danielgindi/selectbox/scss/droplist';
34
- @import '@danielgindi/selectbox/scss/selectbox'; /* depends on droplist css */
35
- ```
36
- * or the compiled css:
37
- ```css
38
- @import '@danielgindi/selectbox/css/droplist';
39
- @import '@danielgindi/selectbox/css/selectbox'; /* depends on droplist css */
40
- ```
41
-
42
- ## Example
43
-
44
- You are welcome to open a PR and add examples, docs, and demo pages :-)
45
-
46
- ## Api
47
-
48
- You are welcome to open a PR and add some api docs :-)
49
-
50
- ### Managing z-index
51
-
52
- A `DropList` (standalone, or owned by a `SelectBox`) can have its z-index set by the `zIndex` option:
53
- a fixed number/string, or a function resolved every time the list is shown.
54
- Set it globally on `DropListDefaultOptions`, so it applies everywhere - including the lists of `SelectBox`es:
55
-
56
- ```js
57
- import { DropListDefaultOptions } from '@danielgindi/selectbox';
58
-
59
- DropListDefaultOptions.zIndex = ({ owner, selectBox, dropList, positionOptions }) => {
60
- // `owner` is the SelectBox's element for a SelectBox's list,
61
- // otherwise the `target` of the position options (or `null`).
62
- // `selectBox` is the owning SelectBox instance, or `null`.
63
- const popup = owner?.closest('.popup');
64
- if (popup)
65
- return Number(getComputedStyle(popup).zIndex) + 1;
66
- return null; // keep the CSS z-index
67
- };
68
- ```
69
-
70
- * Per instance: `new DropList({ zIndex })`, `new SelectBox({ listOptions: { zIndex } })`,
71
- `dropList.setZIndex(zIndex)`, `selectBox.setListZIndex(zIndex)`.
72
- * Vue: `<DropList :z-index="...">`, `<SelectBox :list-z-index="...">`.
73
- * Call `dropList.updateZIndex()` to re-resolve while the list is open.
74
- * Sub-item lists inherit their parent list's z-index.
75
- * Returning `null`/`undefined` leaves the CSS z-index (`10000` in `droplist.scss`) in effect.
76
-
77
- ## Vite
78
-
79
- When using with Vite - you'll need to add this `optimizeDeps to` `vite.config.js`:
80
- ```
81
- optimizeDeps: {
82
- include: [
83
- 'fast-deep-equal',
84
- ],
85
- },
86
- ```
87
-
88
- Otherwise, Vite will complain about `fast-deep-equal` entry point.
89
-
90
- ## Me
91
- * Hi! I am Daniel Cohen Gindi. Or in short- Daniel.
92
- * danielgindi@gmail.com is my email address.
93
- * That's all you need to know.
94
-
95
- ## Help
96
-
97
- If you want to help, you could:
98
- * Actually code, and issue pull requests
99
- * Test the library under different conditions and browsers
100
- * Create more demo pages
101
- * Spread the word
102
- * [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=45T5QNATLCPS2)
103
-
104
-
105
- ## License
106
-
107
- All the code here is under MIT license. Which means you could do virtually anything with the code.
108
- I will appreciate it very much if you keep an attribution where appropriate.
109
-
110
- The MIT License (MIT)
111
-
112
- Copyright (c) 2013 Daniel Cohen Gindi (danielgindi@gmail.com)
113
-
114
- Permission is hereby granted, free of charge, to any person obtaining a copy
115
- of this software and associated documentation files (the "Software"), to deal
116
- in the Software without restriction, including without limitation the rights
117
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
118
- copies of the Software, and to permit persons to whom the Software is
119
- furnished to do so, subject to the following conditions:
120
-
121
- The above copyright notice and this permission notice shall be included in all
122
- copies or substantial portions of the Software.
123
-
124
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
125
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
126
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
127
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
128
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
129
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
130
- SOFTWARE.
1
+ # @danielgindi/selectbox
2
+
3
+ A full featured selectbox and drop down.
4
+
5
+ * Virtual list (can show a list with millions of items)
6
+ * Live search right there in the box
7
+ * Single or multi mode
8
+ * Tags (items in the search box)
9
+ * Custom item rendering
10
+ * Variable height items
11
+ * Highly configurable
12
+ * No dependency on any ui framework
13
+ * Can work in any framework or in vanilla js
14
+ * Has existing Vue 3 bindings
15
+ * The droplist part can be used separately for floating menus etc.
16
+
17
+ This is a real good component, which is the product of evolution over years. Until I sat down one day and refactored it into one cool thing.
18
+ I really hope to get this documented so everyone can enjoy it.
19
+
20
+ ### Installing
21
+
22
+ * adding to package.json: `npm i --save @danielgindi/selectbox`
23
+ * vanilla js:
24
+ ```js
25
+ import { SelectBox, DropList } from '@danielgindi/selectbox';
26
+ ```
27
+ * vuejs:
28
+ ```js
29
+ import { SelectBox, DropList } from '@danielgindi/selectbox/vue';
30
+ ```
31
+ * add the scss:
32
+ ```scss
33
+ @import '@danielgindi/selectbox/scss/droplist';
34
+ @import '@danielgindi/selectbox/scss/selectbox'; /* depends on droplist css */
35
+ ```
36
+ * or the compiled css:
37
+ ```css
38
+ @import '@danielgindi/selectbox/css/droplist';
39
+ @import '@danielgindi/selectbox/css/selectbox'; /* depends on droplist css */
40
+ ```
41
+
42
+ ## Docs & examples
43
+
44
+ The docs page (`example/`) demonstrates every feature, section by section, each with its source code:
45
+
46
+ ```bash
47
+ npm run example # serve it locally
48
+ npm run example:build # build a static copy into dist-docs/
49
+ ```
50
+
51
+ Every demo lives in `example/demos/` as a plain module; the page runs it and shows that same file as the source.
52
+
53
+ ## Development
54
+
55
+ ```bash
56
+ npm test # unit tests (Node) + integration tests (real Chromium, via Vitest browser mode)
57
+ npm run test:watch
58
+ npm run test:coverage
59
+ npm run lint && npm run typecheck
60
+ ```
61
+
62
+ The integration tests drive the real components in a browser - clicking, typing and pressing keys like a user -
63
+ because the widgets depend on layout (measuring, positioning, virtualization).
64
+ Run `npx playwright install chromium` once before the first run.
65
+
66
+ ## Api
67
+
68
+ You are welcome to open a PR and add some api docs :-)
69
+
70
+ ### Managing z-index
71
+
72
+ A `DropList` (standalone, or owned by a `SelectBox`) can have its z-index set by the `zIndex` option:
73
+ a fixed number/string, or a function resolved every time the list is shown.
74
+ Set it globally on `DropListDefaultOptions`, so it applies everywhere - including the lists of `SelectBox`es:
75
+
76
+ ```js
77
+ import { DropListDefaultOptions } from '@danielgindi/selectbox';
78
+
79
+ DropListDefaultOptions.zIndex = ({ owner, selectBox, dropList, positionOptions }) => {
80
+ // `owner` is the SelectBox's element for a SelectBox's list,
81
+ // otherwise the `target` of the position options (or `null`).
82
+ // `selectBox` is the owning SelectBox instance, or `null`.
83
+ const popup = owner?.closest('.popup');
84
+ if (popup)
85
+ return Number(getComputedStyle(popup).zIndex) + 1;
86
+ return null; // keep the CSS z-index
87
+ };
88
+ ```
89
+
90
+ * Per instance: `new DropList({ zIndex })`, `new SelectBox({ listOptions: { zIndex } })`,
91
+ `dropList.setZIndex(zIndex)`, `selectBox.setListZIndex(zIndex)`.
92
+ * Vue: `<DropList :z-index="...">`, `<SelectBox :list-z-index="...">`.
93
+ * Call `dropList.updateZIndex()` to re-resolve while the list is open.
94
+ * Sub-item lists inherit their parent list's z-index.
95
+ * Returning `null`/`undefined` leaves the CSS z-index (`10000` in `droplist.scss`) in effect.
96
+
97
+ ## Vite
98
+
99
+ When using with Vite - you'll need to add this `optimizeDeps to` `vite.config.js`:
100
+ ```
101
+ optimizeDeps: {
102
+ include: [
103
+ 'fast-deep-equal',
104
+ ],
105
+ },
106
+ ```
107
+
108
+ Otherwise, Vite will complain about `fast-deep-equal` entry point.
109
+
110
+ ## Me
111
+ * Hi! I am Daniel Cohen Gindi. Or in short- Daniel.
112
+ * danielgindi@gmail.com is my email address.
113
+ * That's all you need to know.
114
+
115
+ ## Help
116
+
117
+ If you want to help, you could:
118
+ * Actually code, and issue pull requests
119
+ * Test the library under different conditions and browsers
120
+ * Create more demo pages
121
+ * Spread the word
122
+ * [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=45T5QNATLCPS2)
123
+
124
+
125
+ ## License
126
+
127
+ All the code here is under MIT license. Which means you could do virtually anything with the code.
128
+ I will appreciate it very much if you keep an attribution where appropriate.
129
+
130
+ The MIT License (MIT)
131
+
132
+ Copyright (c) 2013 Daniel Cohen Gindi (danielgindi@gmail.com)
133
+
134
+ Permission is hereby granted, free of charge, to any person obtaining a copy
135
+ of this software and associated documentation files (the "Software"), to deal
136
+ in the Software without restriction, including without limitation the rights
137
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
138
+ copies of the Software, and to permit persons to whom the Software is
139
+ furnished to do so, subject to the following conditions:
140
+
141
+ The above copyright notice and this permission notice shall be included in all
142
+ copies or substantial portions of the Software.
143
+
144
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
145
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
146
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
147
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
148
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
149
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
150
+ SOFTWARE.
package/css/droplist.css CHANGED
@@ -1,3 +1,3 @@
1
- .droplist_wrapper{--droplist-border-radius: 5px;--droplist-border-above-below-radius: 0px;--droplist-above-margin: 1px;--droplist-below-margin: -1px;--droplist-item-height: 1.77em;--droplist-item-top-padding: 0.23em;--droplist-item-bottom-padding: 0.23em;--droplist-item-start-padding: 0.85em;--droplist-item-end-padding: 0.85em;--droplist-item-child-start-padding: 1.85em;--droplist-item-multi-top-padding: 0.077em;--droplist-item-multi-bottom-padding: 0.154em;--droplist-item-multi-start-padding: 0.154em;--droplist-item-multi-end-padding: 0.462em;--droplist-item-multi-label-top-padding: 0.077em;--droplist-item-multi-label-start-padding: 1.85em;--droplist-item-multi-child-start-padding: 1.15em;--droplist-item-remove-spacing: 2px;--droplist-checkbox-start: 6px;box-sizing:border-box;z-index:10000;float:left;margin:0;padding:0;border:1px solid #b1b1b1;outline:0;border-radius:var(--droplist-border-radius);background:#fff;max-height:300px;max-width:100%;line-height:1.3}.droplist_wrapper .droplist_header,.droplist_wrapper .droplist_footer{position:relative;padding:.5em;box-sizing:inherit}.droplist_wrapper .droplist_header input[type=search]{box-sizing:inherit;width:100%}.droplist_wrapper.droplist__is_above{margin-top:var(--droplist-above-margin)}.droplist_wrapper.droplist__is_above,.droplist_wrapper.droplist__is_above ul{border-bottom-left-radius:var(--droplist-border-above-below-radius);border-bottom-right-radius:var(--droplist-border-above-below-radius)}.droplist_wrapper.droplist__is_below{margin-top:var(--droplist-below-margin)}.droplist_wrapper.droplist__is_below,.droplist_wrapper.droplist__is_below ul{border-top-left-radius:var(--droplist-border-above-below-radius);border-top-right-radius:var(--droplist-border-above-below-radius)}.droplist_wrapper ul{border-radius:var(--droplist-border-radius);position:relative;list-style:none;margin:0;padding:0;border:0;overflow-y:auto;overflow-x:hidden;max-height:100%;max-width:100%;background:none}.droplist_wrapper ul li{box-sizing:border-box;position:relative;margin:0;padding-top:var(--droplist-item-top-padding);padding-bottom:var(--droplist-item-bottom-padding);padding-left:var(--droplist-item-start-padding);padding-right:var(--droplist-item-end-padding);height:var(--droplist-item-height);color:#3e3f48;white-space:nowrap;cursor:pointer;width:100%;overflow:hidden}.droplist_wrapper ul li.droplist__item_focus{background-color:#c7c7c7}.droplist_wrapper ul li.droplist__item_selected{background-color:#3e3f48;color:#fff}.droplist_wrapper ul li.droplist__item_selected.droplist__item_focus{background-color:#2e3038;color:#fff}.droplist_wrapper ul li .checkbox{position:absolute;top:50%;transform:translateY(-50%);left:var(--droplist-checkbox-start);display:block;width:16px;height:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23dae7f1;'%3E%3C/rect%3E%3C/svg%3E");background-size:100% 100%}.droplist_wrapper ul li:not(:active):hover .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23fff;'%3E%3C/rect%3E%3C/svg%3E")}.droplist_wrapper ul li:active .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %23396d93; fill: %23b5cfe3;'%3E%3C/rect%3E%3C/svg%3E")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23dae7f1;'%3E%3C/rect%3E%3Cpath fill='%236ca1c6' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:not(:active):hover .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %236ca1c6; fill: %23fff;'%3E%3C/rect%3E%3Cpath fill='%236ca1c6' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:active .checkbox{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Crect x='14' y='14' width='420' height='420' rx='84' style='stroke-width: 28px; stroke: %23396d93; fill: %23b5cfe3;'%3E%3C/rect%3E%3Cpath fill='%23396d93' d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E%0A")}.droplist_wrapper ul li.droplist__item_single.droplist__item_checked{opacity:.5}.droplist_wrapper ul li.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-top:var(--droplist-item-multi-top-padding);padding-bottom:var(--droplist-item-multi-bottom-padding);padding-left:var(--droplist-item-multi-start-padding);padding-right:var(--droplist-item-multi-end-padding)}.droplist_wrapper ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label{display:block;margin-top:var(--droplist-item-multi-label-top-padding);margin-left:var(--droplist-item-multi-label-start-padding)}.droplist_wrapper ul li.droplist__item_group{font-weight:bold}.droplist_wrapper ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-left:var(--droplist-item-multi-child-start-padding)}.droplist_wrapper ul li.droplist__item_child.droplist__item_single,.droplist_wrapper ul li.droplist__item_child.droplist__item_multi_nocheck{padding-left:var(--droplist-item-child-start-padding)}.droplist_wrapper ul li.droplist__item_nointeraction{cursor:default}.droplist_wrapper ul .droplist__no_results_content{text-align:center}.droplist_wrapper ul li .remove{display:none;position:absolute;top:0;right:var(--droplist-item-remove-spacing);width:34px;height:20px;padding:0;border:0;background:none;line-height:20px;vertical-align:middle;text-align:center;direction:ltr;font-size:15px;cursor:pointer}.droplist_wrapper ul li .remove:before{display:inline-block;content:"x";color:#fff}.droplist_wrapper ul .droplist__item_focus .remove{display:block}.droplist_wrapper.droplist__rtl,[dir=rtl] .droplist_wrapper:not(.droplist__ltr){direction:rtl}.droplist_wrapper.droplist__rtl ul li .checkbox,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li .checkbox{left:auto;right:var(--droplist-checkbox-start)}.droplist_wrapper.droplist__rtl ul li.droplist__item_multi:not(.droplist__item_multi_nocheck),[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-left:var(--droplist-item-multi-end-padding);padding-right:var(--droplist-item-multi-start-padding)}.droplist_wrapper.droplist__rtl ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label{margin-left:0;margin-right:var(--droplist-item-multi-label-start-padding)}.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck),[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-left:var(--droplist-item-multi-end-padding);padding-right:var(--droplist-item-multi-child-start-padding)}.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_single,.droplist_wrapper.droplist__rtl ul li.droplist__item_child.droplist__item_multi_nocheck,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_single,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li.droplist__item_child.droplist__item_multi_nocheck{padding-left:var(--droplist-item-end-padding);padding-right:var(--droplist-item-child-start-padding)}.droplist_wrapper.droplist__rtl ul li .remove,[dir=rtl] .droplist_wrapper:not(.droplist__ltr) ul li .remove{right:auto;left:var(--droplist-item-remove-spacing)}.droplist_wrapper.droplist_disabled_no_interaction ul li.droplist__item_nointeraction{opacity:.5}
1
+ .droplist_wrapper{--droplist-border-radius: 5px;--droplist-border-above-below-radius: 0px;--droplist-above-margin: 1px;--droplist-below-margin: -1px;--droplist-item-height: 1.77em;--droplist-item-top-padding: 0.23em;--droplist-item-bottom-padding: 0.23em;--droplist-item-start-padding: 0.85em;--droplist-item-end-padding: 0.85em;--droplist-item-child-start-padding: 1.85em;--droplist-item-multi-top-padding: 0.077em;--droplist-item-multi-bottom-padding: 0.154em;--droplist-item-multi-start-padding: 0.154em;--droplist-item-multi-end-padding: 0.462em;--droplist-item-multi-label-top-padding: 0.077em;--droplist-item-multi-label-start-padding: 1.85em;--droplist-item-multi-child-start-padding: 1.15em;--droplist-item-remove-spacing: 2px;--droplist-checkbox-start: 6px;--droplist-background-color: #fff;--droplist-border-color: #b1b1b1;--droplist-item-text-color: #3e3f48;--droplist-item-focus-background-color: #c7c7c7;--droplist-item-focus-text-color: var(--droplist-item-text-color);--droplist-item-selected-background-color: #3e3f48;--droplist-item-selected-text-color: #fff;--droplist-item-selected-focus-background-color: #2e3038;--droplist-item-selected-focus-color: #fff;--droplist-item-remove-color: #fff;--droplist-checkbox-border-color: #6ca1c6;--droplist-checkbox-background-color: #dae7f1;--droplist-checkbox-hover-background-color: #fff;--droplist-checkbox-active-border-color: #396d93;--droplist-checkbox-active-background-color: #b5cfe3;box-sizing:border-box;z-index:10000;float:left;margin:0;padding:0;border:1px solid var(--droplist-border-color);outline:0;border-radius:var(--droplist-border-radius);background:var(--droplist-background-color);max-height:300px;max-width:100%;line-height:1.3}.droplist_wrapper .droplist_header,.droplist_wrapper .droplist_footer{position:relative;padding:.5em;box-sizing:inherit}.droplist_wrapper .droplist_header input[type=search]{box-sizing:inherit;width:100%}.droplist_wrapper.droplist__is_above{margin-top:var(--droplist-above-margin)}.droplist_wrapper.droplist__is_above,.droplist_wrapper.droplist__is_above ul{border-bottom-left-radius:var(--droplist-border-above-below-radius);border-bottom-right-radius:var(--droplist-border-above-below-radius)}.droplist_wrapper.droplist__is_below{margin-top:var(--droplist-below-margin)}.droplist_wrapper.droplist__is_below,.droplist_wrapper.droplist__is_below ul{border-top-left-radius:var(--droplist-border-above-below-radius);border-top-right-radius:var(--droplist-border-above-below-radius)}.droplist_wrapper ul{border-radius:var(--droplist-border-radius);position:relative;list-style:none;margin:0;padding:0;border:0;overflow-y:auto;overflow-x:hidden;max-height:100%;max-width:100%;background:none}.droplist_wrapper ul li{box-sizing:border-box;position:relative;margin:0;padding-top:var(--droplist-item-top-padding);padding-bottom:var(--droplist-item-bottom-padding);padding-inline-start:var(--droplist-item-start-padding);padding-inline-end:var(--droplist-item-end-padding);height:var(--droplist-item-height);color:var(--droplist-item-text-color);white-space:nowrap;cursor:pointer;width:100%;overflow:hidden}.droplist_wrapper ul li.droplist__item_focus{background-color:var(--droplist-item-focus-background-color);color:var(--droplist-item-focus-text-color)}.droplist_wrapper ul li.droplist__item_selected{background-color:var(--droplist-item-selected-background-color);color:var(--droplist-item-selected-text-color)}.droplist_wrapper ul li.droplist__item_selected.droplist__item_focus{background-color:var(--droplist-item-selected-focus-background-color);color:var(--droplist-item-selected-focus-color)}.droplist_wrapper ul li .checkbox{position:absolute;top:50%;transform:translateY(-50%);inset-inline-start:var(--droplist-checkbox-start);display:block;box-sizing:border-box;width:16px;height:16px;border:1px solid var(--droplist-checkbox-border-color);border-radius:3.5px;background-color:var(--droplist-checkbox-background-color)}.droplist_wrapper ul li:not(:active):hover .checkbox{background-color:var(--droplist-checkbox-hover-background-color)}.droplist_wrapper ul li:active .checkbox{border-color:var(--droplist-checkbox-active-border-color);background-color:var(--droplist-checkbox-active-background-color)}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked .checkbox::after{content:"";position:absolute;inset:-1px;background-color:var(--droplist-checkbox-border-color);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 448'%3E%3Cpath d='m364.136 158.276-172.589 171.204c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z'/%3E%3C/svg%3E") center/100% 100% no-repeat}.droplist_wrapper ul li.droplist__item_multi.droplist__item_checked:active .checkbox::after{background-color:var(--droplist-checkbox-active-border-color)}.droplist_wrapper ul li.droplist__item_single.droplist__item_checked{opacity:.5}.droplist_wrapper ul li.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-top:var(--droplist-item-multi-top-padding);padding-bottom:var(--droplist-item-multi-bottom-padding);padding-inline-start:var(--droplist-item-multi-start-padding);padding-inline-end:var(--droplist-item-multi-end-padding)}.droplist_wrapper ul li.droplist__item_multi:not(.droplist__item_multi_nocheck) .droplist__item_label{display:block;margin-top:var(--droplist-item-multi-label-top-padding);margin-inline-start:var(--droplist-item-multi-label-start-padding)}.droplist_wrapper ul li.droplist__item_group{font-weight:bold}.droplist_wrapper ul li.droplist__item_child.droplist__item_multi:not(.droplist__item_multi_nocheck){padding-inline-start:var(--droplist-item-multi-child-start-padding)}.droplist_wrapper ul li.droplist__item_child.droplist__item_single,.droplist_wrapper ul li.droplist__item_child.droplist__item_multi_nocheck{padding-inline-start:var(--droplist-item-child-start-padding)}.droplist_wrapper ul li.droplist__item_nointeraction{cursor:default}.droplist_wrapper ul .droplist__no_results_content{text-align:center}.droplist_wrapper ul li .remove{display:none;position:absolute;top:0;right:var(--droplist-item-remove-spacing);width:34px;height:20px;padding:0;border:0;background:none;line-height:20px;vertical-align:middle;text-align:center;direction:ltr;font-size:15px;cursor:pointer}.droplist_wrapper ul li .remove:before{display:inline-block;content:"x";color:var(--droplist-item-remove-color)}.droplist_wrapper ul .droplist__item_focus .remove{display:block}.droplist_wrapper.droplist__rtl{direction:rtl}.droplist_wrapper.droplist__ltr{direction:ltr}.droplist_wrapper:where(.droplist__rtl,:dir(rtl):not(.droplist__ltr)) ul li .remove{right:auto;left:var(--droplist-item-remove-spacing)}.droplist_wrapper.droplist_disabled_no_interaction ul li.droplist__item_nointeraction{opacity:.5}
2
2
 
3
3
  /*# sourceMappingURL=droplist.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../scss/droplist.scss"],"names":[],"mappings":"AAAA,kBACC,8BACA,0CACA,6BACA,8BACA,+BACA,oCACA,uCACA,sCACA,oCACA,4CACA,2CACA,8CACA,6CACA,2CACA,iDACA,kDACA,kDACA,oCACA,+BAEA,sBACA,cACA,WACA,SACA,UACA,yBACA,UACA,4CACA,gBACA,iBACA,eACA,gBAEA,sEAEC,kBACA,aACA,mBAIA,sDACC,mBACA,WAIF,qCACC,wCAEA,6EACC,oEACA,qEAIF,qCACC,wCAEA,6EACC,iEACA,kEAIF,qBACC,4CACA,kBACA,gBACA,SACA,UACA,SACA,gBACA,kBACA,gBACA,eACA,gBAEA,wBACC,sBACA,kBACA,SACA,6CACA,mDACA,gDACA,+CACA,mCACA,cACA,mBACA,eAIA,WACA,gBAEA,6CACC,yBAED,gDACC,yBACA,WAED,qEACC,yBACA,WAKD,kCACC,kBACA,QACA,2BACA,oCACA,cACA,WACA,YAGA,4PACA,0BAGD,qDAEC,yPAGD,yCAEC,4PAKD,8EAEC,+jBAGD,iGAEC,4jBAGD,qFAEC,+jBAIF,qEACC,WAGD,gFACC,mDACA,yDACA,sDACA,qDAEA,sGACC,cACA,wDACA,2DAIF,6CACC,iBAGD,qGACC,4DAGD,6IAEC,sDAGD,qDACC,eAGD,mDACC,kBAGD,gCACC,aACA,kBACA,MACA,0CACA,WACA,YACA,UACA,SACA,gBACA,iBACA,sBACA,kBACA,cACA,eACA,eAEA,uCACC,qBACA,YACA,WAIF,mDACC,cAIF,gFAEC,cAMC,gHACC,UACA,qCAIF,4MACC,oDACA,uDAEA,wPACC,cACA,4DAIF,sPACC,oDACA,6DAGD,kXAEC,8CACA,uDAGD,4GACC,WACA,yCAKH,sFACC"}
1
+ {"version":3,"sourceRoot":"","sources":["../scss/droplist.scss"],"names":[],"mappings":"AAAA,kBACC,8BACA,0CACA,6BACA,8BACA,+BACA,oCACA,uCACA,sCACA,oCACA,4CACA,2CACA,8CACA,6CACA,2CACA,iDACA,kDACA,kDACA,oCACA,+BAEA,kCACA,iCACA,oCACA,gDACA,kEACA,mDACA,0CACA,yDACA,2CACA,mCACA,0CACA,8CACA,iDACA,iDACA,qDAEA,sBACA,cACA,WACA,SACA,UACA,8CACA,UACA,4CACA,4CACA,iBACA,eACA,gBAEA,sEAEC,kBACA,aACA,mBAIA,sDACC,mBACA,WAIF,qCACC,wCAEA,6EACC,oEACA,qEAIF,qCACC,wCAEA,6EACC,iEACA,kEAIF,qBACC,4CACA,kBACA,gBACA,SACA,UACA,SACA,gBACA,kBACA,gBACA,eACA,gBAEA,wBACC,sBACA,kBACA,SACA,6CACA,mDACA,wDACA,oDACA,mCACA,sCACA,mBACA,eAIA,WACA,gBAEA,6CACC,6DACA,4CAED,gDACC,gEACA,+CAED,qEACC,sEACA,gDAKD,kCACC,kBACA,QACA,2BACA,kDACA,cACA,sBACA,WACA,YACA,uDACA,oBACA,2DAGD,qDACC,iEAGD,yCACC,0DACA,kEAKD,qFAEC,WACA,kBACA,WACA,uDACA,sbAGD,4FACC,8DAIF,qEACC,WAGD,gFACC,mDACA,yDACA,8DACA,0DAEA,sGACC,cACA,wDACA,mEAIF,6CACC,iBAGD,qGACC,oEAGD,6IAEC,8DAGD,qDACC,eAGD,mDACC,kBAGD,gCACC,aACA,kBACA,MACA,0CACA,WACA,YACA,UACA,SACA,gBACA,iBACA,sBACA,kBACA,cACA,eACA,eAEA,uCACC,qBACA,YACA,wCAIF,mDACC,cAMF,gCACC,cAGD,gCACC,cAMD,oFACC,WACA,yCAIF,sFACC"}
package/css/selectbox.css CHANGED
@@ -1,3 +1,3 @@
1
- .selectbox{--selectbox-border-radius: 4px;--selectbox-open-indicator-spacing: 0.25em;--selectbox-open-indicator-width: 1.2em;--selectbox-spinner-spacing: 0.125em;--selectbox-spinner-width: 1.2em;--selectbox-clear-spacing: 0.125em;--selectbox-clear-width: 1.2em;--selectbox-horz-padding: 0.5em;--selectbox-single-top-padding: 0.1667em;--selectbox-single-bottom-padding: 0.3334em;--selectbox-multi-vert-padding: 0.357em;--selectbox-multi-item-border-width: 1px;--selectbox-multi-item-border-radius: 4px;--selectbox-multi-item-horz-spacing: 0.416em;--selectbox-multi-item-vert-spacing: 0.416em;--selectbox-multi-item-horz-padding: 0.416em;--selectbox-multi-item-top-padding: 0px;--selectbox-multi-item-remove-spacing: 0.153em;--selectbox-multi-item-bottom-padding: 0.2em;--selectbox-multi-search-top-offset: 0px;position:relative;box-sizing:border-box;display:inline-block;cursor:default;outline:0;line-height:1.2;user-select:none;-webkit-user-select:none;color:#000;background-color:#fff;border-radius:var(--selectbox-border-radius);border:solid #aaa 1px}.selectbox.selectbox__rtl{direction:rtl}.selectbox.selectbox__searchable{cursor:text}.selectbox[aria-disabled=true]{border:solid #aaa 1px;background-color:#eee;cursor:default}.selectbox[aria-disabled=true] *{cursor:default}.selectbox[aria-readonly=true]{cursor:default}.selectbox[aria-readonly=true] *{cursor:default}.selectbox.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.selectbox.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}.selectbox.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:var(--selectbox-open-indicator-width)}.selectbox.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-open-indicator-width)}.selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner){padding-right:var(--selectbox-clear-width)}.selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-clear-width)}.selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:var(--selectbox-spinner-width)}.selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-clear-width)}.selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear){padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width))}.selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:calc(var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner.selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__multi{padding-top:var(--selectbox-multi-vert-padding);padding-bottom:var(--selectbox-multi-vert-padding)}.selectbox__focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.selectbox__list{box-sizing:border-box;list-style:none none;display:inline-block;vertical-align:top;width:100%;margin:calc(0px - var(--selectbox-multi-item-vert-spacing)) 0 0;padding:0 var(--selectbox-horz-padding);text-overflow:ellipsis;white-space:nowrap}.selectbox__rtl .selectbox__list::before,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__list::before{float:left}.selectbox__open_indicator{position:absolute;right:var(--selectbox-open-indicator-spacing);top:50%;transform:translateY(-50%);z-index:2;font-size:1em;width:1em;height:.5em;overflow:hidden;direction:ltr;text-align:left;cursor:pointer}.selectbox__open_indicator::before{border-style:solid;border-color:#9d9d9d;border-width:1.5px 1.5px 0 0;content:"";display:inline-block;height:.45em;left:.2em;position:relative;top:-0.18em;transform:rotate(135deg);vertical-align:top;width:.45em;transition:transform 150ms cubic-bezier(1, -0.115, 0.975, 0.855)}.selectbox__open_list .selectbox__open_indicator::before{transform:translateY(50%) rotate(-45deg)}.selectbox__rtl .selectbox__open_indicator,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__open_indicator{right:auto;left:var(--selectbox-open-indicator-spacing)}.selectbox__rtl .selectbox__open_indicator::before,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__open_indicator::before{transform:rotate(-225deg)}.selectbox__rtl.selectbox__open_list .selectbox__open_indicator::before,[dir=rtl] .selectbox.selectbox__open_list:not(.selectbox__ltr) .selectbox__open_indicator::before{transform:translateY(50%) rotate(315deg)}.selectbox__clear{position:absolute;right:var(--selectbox-clear-spacing);top:50%;transform:translateY(-50%);z-index:2}.selectbox__clear>button{box-sizing:border-box;display:block;cursor:pointer;font-weight:bold;width:26px;text-align:center;font-size:13px;line-height:1.4;margin:0;padding:0;border:0;background:none}.selectbox__clear>button:before{content:"×"}.selectbox__clear>button:focus{outline:none;color:red}.selectbox__rtl .selectbox__clear,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__clear{right:auto;left:var(--selectbox-clear-spacing)}.selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:calc(var(--selectbox-clear-spacing) + var(--selectbox-open-indicator-width))}.selectbox__has_open_indicator.selectbox__has_clear.selectbox__rtl .selectbox__clear,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__ltr) .selectbox__clear{right:auto;left:calc(var(--selectbox-clear-spacing) + var(--selectbox-open-indicator-width))}.selectbox[aria-disabled=true]>.selectbox__clear,.selectbox[aria-readonly=true]>.selectbox__clear{display:none}.selectbox__spinner{position:absolute;right:var(--selectbox-spinner-spacing);top:50%;transform:translateY(-50%);z-index:2}.selectbox__spinner::before{content:"";display:block;font-size:1em;width:1em;height:1em;text-indent:-9999em;overflow:hidden;border-top:.3em solid rgba(100,100,100,.1);border-right:.3em solid rgba(100,100,100,.1);border-bottom:.3em solid rgba(100,100,100,.1);border-left:.3em solid rgba(60,60,60,.45);border-radius:50%;transform:translateZ(0);animation:selectbox__spinner_anim 1.1s infinite linear;transition:opacity .1s}.selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__spinner{right:auto;left:var(--selectbox-spinner-spacing)}.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear) .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-open-indicator-width))}.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator) .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width))}.selectbox__has_spinner.selectbox__has_open_indicator.selectbox__has_clear .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width) + var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear).selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__ltr) .selectbox__spinner{right:auto;left:calc(var(--selectbox-spinner-spacing) + var(--selectbox-open-indicator-width))}.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator).selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__ltr) .selectbox__spinner{right:auto;left:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width))}.selectbox__has_spinner.selectbox__has_clear.selectbox__has_open_indicator.selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_clearselectbox__has_open_indicator:not(.selectbox__ltr) .selectbox__spinner{right:auto;left:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width) + var(--selectbox-open-indicator-width))}.selectbox__item{box-sizing:border-box;float:left;cursor:default;background-color:#e4e4e4;border:var(--selectbox-multi-item-border-width) solid #aaa;border-radius:var(--selectbox-multi-item-border-radius);margin-left:0;margin-right:var(--selectbox-multi-item-horz-spacing);margin-top:var(--selectbox-multi-item-vert-spacing);padding:var(--selectbox-multi-item-top-padding) var(--selectbox-multi-item-horz-padding) var(--selectbox-multi-item-bottom-padding);line-height:inherit}.selectbox__item span{vertical-align:top}.selectbox__item:focus{background-color:#ccc;outline:0}.selectbox__rtl .selectbox__item,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__item{float:right;margin-left:var(--selectbox-multi-item-horz-spacing);margin-right:0}.selectbox__item_remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-top:.2em;font-size:13px}.selectbox__item_remove:before{content:"×"}.selectbox__item_remove:first-child{margin-right:var(--selectbox-multi-item-remove-spacing)}.selectbox__item_remove:last-child{margin-left:var(--selectbox-multi-item-remove-spacing)}.selectbox__rtl .selectbox__item_remove:first-child,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__item_remove:first-child{margin-left:var(--selectbox-multi-item-remove-spacing);margin-right:0}.selectbox__rtl .selectbox__item_remove:last-child,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__item_remove:last-child{margin-right:var(--selectbox-multi-item-remove-spacing);margin-left:0}.selectbox__single_wrapper{position:relative;min-height:1em;max-width:100%;margin:0;padding:var(--selectbox-single-top-padding) var(--selectbox-horz-padding) var(--selectbox-single-bottom-padding) var(--selectbox-horz-padding);color:currentColor}.selectbox__single_wrapper:empty::after{content:"​"}.selectbox__empty_selection .selectbox__single_wrapper{width:12em}.selectbox__has_selection.selectbox__has_input .selectbox__single_wrapper{opacity:0}.selectbox__has_selection.selectbox__empty_input.has_droplist .selectbox__single_wrapper,.selectbox__has_selection.selectbox__empty_input.selectbox__focus .selectbox__single_wrapper{opacity:.5}.selectbox__search_wrapper{max-width:100%}.selectbox__multi .selectbox__search_wrapper{float:left;margin-top:calc(var(--selectbox-multi-item-vert-spacing) + var(--selectbox-multi-item-border-width) + var(--selectbox-multi-item-top-padding) + var(--selectbox-multi-search-top-offset))}.selectbox__single .selectbox__search_wrapper{position:absolute;z-index:1;left:0;top:var(--selectbox-single-top-padding)}.selectbox__multi.selectbox__rtl .selectbox__search_wrapper,[dir=rtl] .selectbox.selectbox__multi:not(.selectbox__ltr) .selectbox__search_wrapper{float:right}.selectbox__single.selectbox__rtl .selectbox__search_wrapper,[dir=rtl] .selectbox.selectbox__single:not(.selectbox__ltr) .selectbox__search_wrapper{right:0;left:auto}input.selectbox__search_field{box-sizing:border-box;display:inline-block;height:auto;max-width:100%;cursor:inherit;color:currentColor;-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);box-shadow:none;border:none;border-radius:0;outline:0;margin:0;padding:0;font-family:inherit;font-size:1em;line-height:normal}input.selectbox__search_field::-webkit-search-decoration,input.selectbox__search_field::-webkit-search-cancel-button,input.selectbox__search_field::-webkit-search-results-button,input.selectbox__search_field::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field::-ms-clear{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field:focus{outline:0 !important;border:0 !important;box-shadow:none !important}.selectbox__single input.selectbox__search_field{padding:0 var(--selectbox-horz-padding)}.selectbox__multi input.selectbox__search_field{padding:0}.selectbox.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.selectbox.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}@-webkit-keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
1
+ .selectbox{--selectbox-border-radius: 4px;--selectbox-open-indicator-spacing: 0.25em;--selectbox-open-indicator-width: 1.2em;--selectbox-spinner-spacing: 0.125em;--selectbox-spinner-width: 1.2em;--selectbox-clear-spacing: 0.125em;--selectbox-clear-width: 1.2em;--selectbox-horz-padding: 0.5em;--selectbox-single-top-padding: 0.1667em;--selectbox-single-bottom-padding: 0.3334em;--selectbox-multi-vert-padding: 0.357em;--selectbox-multi-item-border-width: 1px;--selectbox-multi-item-border-radius: 4px;--selectbox-multi-item-horz-spacing: 0.416em;--selectbox-multi-item-vert-spacing: 0.416em;--selectbox-multi-item-horz-padding: 0.416em;--selectbox-multi-item-top-padding: 0px;--selectbox-multi-item-remove-spacing: 0.153em;--selectbox-multi-item-bottom-padding: 0.2em;--selectbox-multi-search-top-offset: 0px;--selectbox-text-color: #000;--selectbox-background-color: #fff;--selectbox-border-color: #aaa;--selectbox-disabled-background-color: #eee;--selectbox-disabled-border-color: #aaa;--selectbox-focus-border-color: #66afe9;--selectbox-focus-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);--selectbox-open-indicator-color: #9d9d9d;--selectbox-clear-color: buttontext;--selectbox-clear-focus-color: red;--selectbox-spinner-color: rgba(60, 60, 60, 0.45);--selectbox-spinner-track-color: rgba(100, 100, 100, 0.1);--selectbox-multi-item-background-color: #e4e4e4;--selectbox-multi-item-border-color: #aaa;--selectbox-multi-item-focus-background-color: #ccc;--selectbox-multi-item-remove-color: #999;position:relative;box-sizing:border-box;display:inline-flex;align-items:center;cursor:default;outline:0;line-height:1.2;user-select:none;-webkit-user-select:none;color:var(--selectbox-text-color);background-color:var(--selectbox-background-color);border-radius:var(--selectbox-border-radius);border:solid var(--selectbox-border-color) 1px}.selectbox.selectbox__rtl{direction:rtl}.selectbox.selectbox__ltr{direction:ltr}.selectbox.selectbox__searchable{cursor:text}.selectbox[aria-disabled=true]{border:solid var(--selectbox-disabled-border-color) 1px;background-color:var(--selectbox-disabled-background-color);cursor:default}.selectbox[aria-disabled=true] *{cursor:default}.selectbox[aria-readonly=true]{cursor:default}.selectbox[aria-readonly=true] *{cursor:default}.selectbox.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.selectbox.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}.selectbox.selectbox__multi{padding-top:var(--selectbox-multi-vert-padding);padding-bottom:var(--selectbox-multi-vert-padding)}.selectbox__focus{border-color:var(--selectbox-focus-border-color);outline:0;box-shadow:var(--selectbox-focus-shadow)}.selectbox__list{box-sizing:border-box;list-style:none none;display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--selectbox-multi-item-vert-spacing) var(--selectbox-multi-item-horz-spacing);flex:1 1 auto;min-width:0;margin:0;padding:0 var(--selectbox-horz-padding);text-overflow:ellipsis;white-space:nowrap}.selectbox__controls{flex:none;display:flex;align-items:center;height:0;position:relative;z-index:2}.selectbox__controls:empty{display:none}.selectbox__open_indicator,.selectbox__clear,.selectbox__spinner{flex:none;box-sizing:border-box}.selectbox__clear,.selectbox__spinner{display:flex;justify-content:flex-end}.selectbox__open_indicator{padding-inline-start:max(0px,var(--selectbox-open-indicator-width) - 1em - var(--selectbox-open-indicator-spacing));margin-inline-end:var(--selectbox-open-indicator-spacing);font-size:1em;box-sizing:content-box;width:1em;height:.5em;overflow:hidden;text-align:left;cursor:pointer}.selectbox__open_indicator::before{border-style:solid;border-color:var(--selectbox-open-indicator-color);border-width:1.5px 1.5px 0 0;content:"";display:inline-block;height:.45em;left:.2em;position:relative;top:-0.18em;transform:translateY(0) rotate(135deg);vertical-align:top;width:.45em;transition:transform 150ms cubic-bezier(1, -0.115, 0.975, 0.855)}.selectbox__open_list .selectbox__open_indicator::before{transform:translateY(50%) rotate(-45deg)}.selectbox.selectbox__open_list:where(.selectbox__rtl,:dir(rtl):not(.selectbox__ltr)) .selectbox__open_indicator::before{transform:translateY(50%) rotate(315deg)}.selectbox__clear{min-width:var(--selectbox-clear-width);padding-inline-end:var(--selectbox-clear-spacing)}.selectbox__clear>button{box-sizing:border-box;display:block;cursor:pointer;font-weight:bold;width:26px;text-align:center;font-size:13px;line-height:1.4;margin:0;padding:0;border:0;background:none;color:var(--selectbox-clear-color)}.selectbox__clear>button:before{content:"×"}.selectbox__clear>button:focus{outline:none;color:var(--selectbox-clear-focus-color)}.selectbox[aria-disabled=true]>.selectbox__controls>.selectbox__clear,.selectbox[aria-readonly=true]>.selectbox__controls>.selectbox__clear{display:none}.selectbox__spinner{min-width:var(--selectbox-spinner-width);padding-inline-end:var(--selectbox-spinner-spacing)}.selectbox__spinner::before{content:"";display:block;font-size:1em;width:1em;height:1em;text-indent:-9999em;overflow:hidden;border-top:.3em solid var(--selectbox-spinner-track-color);border-right:.3em solid var(--selectbox-spinner-track-color);border-bottom:.3em solid var(--selectbox-spinner-track-color);border-left:.3em solid var(--selectbox-spinner-color);border-radius:50%;transform:translateZ(0);animation:selectbox__spinner_anim 1.1s infinite linear;transition:opacity .1s}.selectbox__item{box-sizing:border-box;cursor:default;background-color:var(--selectbox-multi-item-background-color);border:var(--selectbox-multi-item-border-width) solid var(--selectbox-multi-item-border-color);border-radius:var(--selectbox-multi-item-border-radius);overflow:hidden;text-overflow:ellipsis;margin:0;padding:var(--selectbox-multi-item-top-padding) var(--selectbox-multi-item-horz-padding) var(--selectbox-multi-item-bottom-padding);line-height:inherit}.selectbox__item span{vertical-align:top}.selectbox__item:focus{background-color:var(--selectbox-multi-item-focus-background-color);outline:0}.selectbox__item_remove{color:var(--selectbox-multi-item-remove-color);cursor:pointer;display:inline-block;font-weight:bold;margin-top:.2em;font-size:13px}.selectbox__item_remove:before{content:"×"}.selectbox__item_remove:first-child{margin-inline-end:var(--selectbox-multi-item-remove-spacing)}.selectbox__item_remove:last-child{margin-inline-start:var(--selectbox-multi-item-remove-spacing)}.selectbox__single_wrapper{position:relative;flex:1 1 auto;min-width:0;min-height:1em;max-width:100%;margin:0;padding:var(--selectbox-single-top-padding) var(--selectbox-horz-padding) var(--selectbox-single-bottom-padding) var(--selectbox-horz-padding);color:currentColor}.selectbox__single_wrapper:empty::after{content:"​"}.selectbox__empty_selection .selectbox__single_wrapper{width:12em}.selectbox__has_selection.selectbox__has_input .selectbox__single_wrapper{opacity:0}.selectbox__has_selection.selectbox__empty_input.has_droplist .selectbox__single_wrapper,.selectbox__has_selection.selectbox__empty_input.selectbox__focus .selectbox__single_wrapper{opacity:.5}.selectbox__search_wrapper{max-width:100%}.selectbox__multi .selectbox__search_wrapper{flex:0 1 auto;min-width:0;margin-top:calc(var(--selectbox-multi-item-border-width) + var(--selectbox-multi-item-top-padding) + var(--selectbox-multi-search-top-offset))}.selectbox__multi .selectbox__search_wrapper:first-child{flex-grow:1}.selectbox__single .selectbox__search_wrapper{position:absolute;z-index:1;inset-inline-start:0;top:var(--selectbox-single-top-padding)}input.selectbox__search_field{box-sizing:border-box;display:inline-block;height:auto;max-width:100%;cursor:inherit;color:currentColor;-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);box-shadow:none;border:none;border-radius:0;outline:0;margin:0;padding:0;font-family:inherit;font-size:1em;line-height:normal}input.selectbox__search_field::-webkit-search-decoration,input.selectbox__search_field::-webkit-search-cancel-button,input.selectbox__search_field::-webkit-search-results-button,input.selectbox__search_field::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field::-ms-clear{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field:focus{outline:0 !important;border:0 !important;box-shadow:none !important}.selectbox__single input.selectbox__search_field{padding:0 var(--selectbox-horz-padding)}.selectbox__multi input.selectbox__search_field{padding:0}.selectbox__multi .selectbox__search_wrapper:first-child input.selectbox__search_field{width:100%}.selectbox.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.selectbox.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}@-webkit-keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
2
2
 
3
3
  /*# sourceMappingURL=selectbox.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../scss/selectbox.scss"],"names":[],"mappings":"CAeA,WACI,+BACA,2CACA,wCACA,qCACA,iCACA,mCACA,+BACA,gCAEA,yCACA,4CAEA,wCACA,yCACA,0CACA,6CACA,6CACA,6CACA,wCACA,+CACA,6CACA,yCAEA,kBACA,sBACA,qBACA,eACA,UACA,gBAEA,iBACA,yBAEA,WACA,sBACA,6CACA,sBAEA,0BACI,cAGJ,iCACI,YAGP,+BACC,sBACA,sBACA,eAEA,iCACC,eAIF,+BACC,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,iGACI,oDAvFJ,gPA0FQ,gBACA,mDAIR,iGACI,2CAhGJ,gPAmGQ,gBACA,0CAIR,iGACI,6CAzGJ,gPA4GQ,gBACA,0CAIR,2FACI,2FAlHJ,oOAqHQ,gBACA,0FAIR,2FACI,yFA3HJ,oOA8HQ,gBACA,wFAIR,2FACI,kFApIJ,oOAuIQ,gBACA,iFAIR,qFACI,0HA7IJ,wNAgJQ,gBACA,yHAIR,4BACI,gDACA,mDAIR,kBACI,qBACA,UAEA,WADM,8DAIV,iBACI,sBACA,qBACA,qBACA,mBAEA,WACA,gEACA,wCAEA,uBACA,mBAGI,4GACI,WAKZ,2BACI,kBACA,8CACA,QACA,2BACA,UACA,cACA,UACA,YACA,gBACA,cACA,gBACA,eAEA,mCACI,mBACA,qBACA,6BACA,WACA,qBACA,aACA,UACA,kBACA,YACA,yBACA,mBACA,YACA,iEAGJ,yDACI,yCAGJ,gHACI,WACA,6CAEA,gIACI,0BAKJ,0KACI,yCAKZ,kBACI,kBACA,qCACA,QACA,2BACA,UAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,UACA,SACA,gBAEA,gCACI,YAGJ,+BACI,aACA,UA7PR,8FAkQI,WACA,oCAGJ,sEACI,mFAGJ,oMAEI,WACA,kFAGJ,kGACI,aAIR,oBACI,kBACA,uCACA,QACA,2BACA,UAEA,4BACI,WACA,cACA,cACA,UACA,WACA,oBACA,gBACA,2CACA,6CACA,8CACA,0CACA,kBACA,wBACA,uDACA,uBA3SJ,kGA+SI,WACA,sCAGJ,qGACI,qFAGJ,qGACI,4EAGJ,+FACI,qJAGJ,kQAEI,WACA,oFAGJ,kQAEI,WACA,2EAGJ,qPAEI,WACA,mHAIR,iBACI,sBACA,WACA,eAEA,yBACA,2DACA,wDAEA,cACA,sDACA,oDACA,oIACA,oBAEH,sBACC,mBAGD,uBACC,sBACA,UAvWE,4FA2WI,YACA,qDACA,eAIR,wBACI,WACA,eACA,qBACA,iBACA,gBACH,eAEA,+BACC,YAGE,oCACI,wDAGJ,mCACI,uDAIA,kIACI,uDACA,eAGJ,gIACI,wDACA,cAKZ,2BACI,kBACA,eACA,eACA,SACA,+IACA,mBAEA,oDAEA,uDACI,WAGJ,0EACI,UAIR,sLAEI,WAGJ,2BACC,eAEG,6CACI,WACA,0LAMJ,8CACI,kBACA,UACA,OACA,wCAGJ,kJAEI,YAGJ,oJAEI,QACA,UAIR,8BACI,sBACH,qBACG,YACH,eACG,eACA,mBAEA,wBACA,gBACH,yBACG,gBACA,YACA,gBACA,UACA,SACA,UAEA,oBACA,cACA,mBAEA,mPAII,gBACA,wBACA,QACA,SACA,SACA,UAGJ,yCACI,gBACA,wBACA,QACA,SACA,SACA,UAGP,oCACC,qBACA,oBACA,2BAIF,iDACI,wCAGJ,gDACI,UAGJ,8BACI,yBACA,0BAGJ,8BACI,4BACA,6BAGJ,2CACI,GACI,uBAEJ,KACI,0BAIR,mCACI,GACI,uBAEJ,KACI"}
1
+ {"version":3,"sourceRoot":"","sources":["../scss/selectbox.scss"],"names":[],"mappings":"CA2BA,WACI,+BACA,2CACA,wCACA,qCACA,iCACA,mCACA,+BACA,gCAEA,yCACA,4CAEA,wCACA,yCACA,0CACA,6CACA,6CACA,6CACA,wCACA,+CACA,6CACA,yCAEA,6BACA,mCACA,+BACA,4CACA,wCACA,wCACA,iGACA,0CACA,oCACA,mCACA,kDACA,0DACA,iDACA,0CACA,oDACA,0CAIA,kBACA,sBACA,oBACA,mBACA,eACA,UACA,gBAEA,iBACA,yBAEA,kCACA,mDACA,6CACA,+CAEA,0BACI,cAGJ,0BACI,cAGJ,iCACI,YAGP,+BACC,wDACA,4DACA,eAEA,iCACC,eAIF,+BACC,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,4BACI,gDACA,mDAIR,kBACI,iDACA,UACA,yCAGJ,iBACI,sBACA,qBACA,aACA,eACA,uBACA,sFAEA,cACA,YACA,SACA,wCAEA,uBACA,mBAMJ,qBACI,UACA,aACA,mBACA,SACA,kBACA,UAEA,2BACI,aAIR,iEAGI,UACA,sBAGJ,sCAEI,aACA,yBAGJ,2BAEI,oHACA,0DACA,cACA,uBACA,UACA,YACA,gBACA,gBACA,eAEA,mCACI,mBACA,mDACA,6BACA,WACA,qBACA,aACA,UACA,kBACA,YAGA,uCACA,mBACA,YACA,iEAGJ,yDACI,yCAKA,yHACI,yCAKZ,kBACI,uCACA,kDAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,UACA,SACA,gBACA,mCAEA,gCACI,YAGJ,+BACI,aACA,yCAIR,4IAEI,aAIR,oBACI,yCACA,oDAEA,4BACI,WACA,cACA,cACA,UACA,WACA,oBACA,gBACA,2DACA,6DACA,8DACA,sDACA,kBACA,wBACA,uDACA,uBAIR,iBACI,sBACA,eAEA,8DACA,+FACA,wDAEA,gBACA,uBACA,SACA,oIACA,oBAEH,sBACC,mBAGD,uBACC,oEACA,UAIF,wBACI,+CACA,eACA,qBACA,iBACA,gBACH,eAEA,+BACC,YAGE,oCACI,6DAGJ,mCACI,+DAIR,2BACI,kBACA,cACA,YACA,eACA,eACA,SACA,+IACA,mBAEA,oDAEA,uDACI,WAGJ,0EACI,UAIR,sLAEI,WAGJ,2BACC,eAEG,6CACI,cACA,YACA,+IAIA,yDACI,YAIR,8CACI,kBACA,UACA,qBACA,wCAIR,8BACI,sBACH,qBACG,YACH,eACG,eACA,mBAEA,wBACA,gBACH,yBACG,gBACA,YACA,gBACA,UACA,SACA,UAEA,oBACA,cACA,mBAEA,mPAII,gBACA,wBACA,QACA,SACA,SACA,UAGJ,yCACI,gBACA,wBACA,QACA,SACA,SACA,UAGP,oCACC,qBACA,oBACA,2BAIF,iDACI,wCAGJ,gDACI,UAGJ,uFACI,WAGJ,8BACI,yBACA,0BAGJ,8BACI,4BACA,6BAGJ,2CACI,GACI,uBAEJ,KACI,0BAIR,mCACI,GACI,uBAEJ,KACI"}