jb-select 6.1.0 → 6.3.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/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.br +0 -0
- package/dist/index.cjs.js.gz +0 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/dist/index.umd.js.map +1 -1
- package/dist/jb-select.d.ts.map +1 -1
- package/lib/jb-select.scss +35 -41
- package/lib/jb-select.ts +29 -27
- package/lib/variables.css +28 -0
- package/package.json +3 -2
package/lib/jb-select.scss
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
@use "~jb-core/styles/medias.scss" as *;
|
|
2
|
+
@use './variables.css';
|
|
2
3
|
|
|
3
4
|
:host {
|
|
4
|
-
|
|
5
|
-
--p-middle-div-height: var(--jb-select-middle-div-height, 0px);
|
|
6
|
-
--p-p-color: #1e2832;
|
|
7
|
-
--p-border-bottom-width: var(--jb-select-border-bottom-width, var(--jb-select-border-width, 3px));
|
|
8
|
-
--p-base-z-index: 1;
|
|
9
|
-
--p-mobile-modal-z-index: 900;
|
|
10
|
-
--p-mobile-modal-height: var(--jb-select-mobile-modal-height, 100vh);
|
|
5
|
+
|
|
11
6
|
}
|
|
12
7
|
|
|
13
8
|
.jb-select-web-component {
|
|
@@ -22,24 +17,24 @@
|
|
|
22
17
|
bottom: 0;
|
|
23
18
|
top: initial;
|
|
24
19
|
left: 0;
|
|
25
|
-
background-color: var(--
|
|
20
|
+
background-color: var(--overlay-bg-color);
|
|
26
21
|
width: 100vw;
|
|
27
|
-
height: var(--
|
|
22
|
+
height: var(--mobile-modal-height);
|
|
28
23
|
border-radius: var(--jb-select-mobile-modal-border-radius, 0) var(--jb-select-mobile-modal-border-radius, 0) 0 0;
|
|
29
24
|
margin: 0;
|
|
30
25
|
padding: 16px 8px;
|
|
31
|
-
z-index: var(--
|
|
26
|
+
z-index: var(--mobile-modal-z-index);
|
|
32
27
|
}
|
|
33
28
|
|
|
34
29
|
.select-box {
|
|
35
30
|
@include mobile-tablet {
|
|
36
31
|
height: var(--jb-select-mobile-search-input-height, var(--jb-select-height, 40px));
|
|
37
|
-
background-color: var(--jb-select-mobile-input-bgcolor,
|
|
32
|
+
background-color: var(--jb-select-mobile-input-bgcolor, var(--select-box-bg-color));
|
|
38
33
|
border-width: var(--jb-select-mobile-search-border-width, var(--jb-select-border-width, 1px));
|
|
39
|
-
border-color: var(--jb-select-mobile-search-border-color, var(--
|
|
34
|
+
border-color: var(--jb-select-mobile-search-border-color, var(--border-color));
|
|
40
35
|
border-bottom-width: var(--jb-select-mobile-search-border-bottom-width, var(--p-border-bottom-width));
|
|
41
36
|
border-bottom-color: var(--jb-select-mobile-search-border-bottom-color,
|
|
42
|
-
var(--jb-select-border-bottom-color, var(--
|
|
37
|
+
var(--jb-select-border-bottom-color, var(--border-color)));
|
|
43
38
|
border-radius: var(--jb-select-mobile-search-border-radius, var(--jb-select-border-radius, 16px));
|
|
44
39
|
}
|
|
45
40
|
|
|
@@ -84,7 +79,7 @@
|
|
|
84
79
|
|
|
85
80
|
label {
|
|
86
81
|
@include mobile-tablet {
|
|
87
|
-
color:
|
|
82
|
+
color: var(--modal-label-color);
|
|
88
83
|
font-size: 1.5em;
|
|
89
84
|
display: flex;
|
|
90
85
|
align-items: center;
|
|
@@ -100,15 +95,15 @@
|
|
|
100
95
|
height: 48px;
|
|
101
96
|
justify-content: center;
|
|
102
97
|
align-items: center;
|
|
103
|
-
color:
|
|
98
|
+
color: var(--modal-close-color);
|
|
104
99
|
|
|
105
100
|
.close-btn-svg-bg {
|
|
106
101
|
opacity: var(--jb-select-close-bg-opacity, 0.4);
|
|
107
|
-
fill: var(--
|
|
102
|
+
fill: var(--close-bg-color);
|
|
108
103
|
}
|
|
109
104
|
|
|
110
105
|
.close-btn-svg-path {
|
|
111
|
-
fill: var(--
|
|
106
|
+
fill: var(--modal-close-color);
|
|
112
107
|
}
|
|
113
108
|
}
|
|
114
109
|
}
|
|
@@ -119,12 +114,11 @@
|
|
|
119
114
|
|
|
120
115
|
//if user select a option and value is setted and not null
|
|
121
116
|
.select-box {
|
|
122
|
-
border-color: var(--jb-select-border-color-selected,
|
|
123
|
-
background-color: var(--jb-select-bgcolor-selected,
|
|
124
|
-
|
|
117
|
+
border-color: var(--jb-select-border-color-selected, var(--border-color));
|
|
118
|
+
background-color: var(--jb-select-bgcolor-selected, var(--select-box-bg-color));
|
|
125
119
|
@include mobile-tablet {
|
|
126
120
|
&:focus-within {
|
|
127
|
-
background-color: var(--jb-select-mobile-input-bgcolor,
|
|
121
|
+
background-color: var(--jb-select-mobile-input-bgcolor, var(--select-box-bg-color));
|
|
128
122
|
}
|
|
129
123
|
}
|
|
130
124
|
}
|
|
@@ -137,7 +131,7 @@
|
|
|
137
131
|
display: block;
|
|
138
132
|
font-size: var(--jb-select-label-font-size, 0.8em);
|
|
139
133
|
font-weight: var(--jb-select-label-font-weight, normal);
|
|
140
|
-
color: var(--
|
|
134
|
+
color: var(--label-color);
|
|
141
135
|
|
|
142
136
|
&.--hide {
|
|
143
137
|
display: none;
|
|
@@ -153,10 +147,10 @@
|
|
|
153
147
|
width: 100%;
|
|
154
148
|
box-sizing: border-box;
|
|
155
149
|
height: var(--jb-select-height, 2.5rem);
|
|
156
|
-
border: solid var(--jb-select-border-width, 1px) var(--
|
|
157
|
-
border-bottom: solid var(--p-border-bottom-width) var(--
|
|
150
|
+
border: solid var(--jb-select-border-width, 1px) var(--border-color);
|
|
151
|
+
border-bottom: solid var(--p-border-bottom-width) var(--border-color);
|
|
158
152
|
border-radius: var(--jb-select-border-radius, 1rem);
|
|
159
|
-
background-color: var(--
|
|
153
|
+
background-color: var(--select-box-bg-color);
|
|
160
154
|
margin: var(--jb-select-select-box-margin, 4px 0px 0px 0px);
|
|
161
155
|
overflow: hidden;
|
|
162
156
|
display: flex;
|
|
@@ -165,8 +159,8 @@
|
|
|
165
159
|
align-items: center;
|
|
166
160
|
|
|
167
161
|
&:focus-within {
|
|
168
|
-
border-color: var(--jb-select-border-color, var(--
|
|
169
|
-
border-bottom-color: var(--jb-select-border-color, var(--
|
|
162
|
+
border-color: var(--jb-select-border-color, var(--border-color));
|
|
163
|
+
border-bottom-color: var(--jb-select-border-color, var(--border-color));
|
|
170
164
|
border-radius: var(--jb-select-border-radius, 1rem) var(--jb-select-border-radius, 1rem) 0 0;
|
|
171
165
|
|
|
172
166
|
@include mobile-tablet {
|
|
@@ -211,7 +205,7 @@
|
|
|
211
205
|
display: block;
|
|
212
206
|
font-family: inherit;
|
|
213
207
|
font-size: var(--jb-select-selected-value-font-size, 1.1em);
|
|
214
|
-
color: var(--
|
|
208
|
+
color: var(--value-color);
|
|
215
209
|
margin: 0;
|
|
216
210
|
border-radius: 0;
|
|
217
211
|
display: flex;
|
|
@@ -239,7 +233,7 @@
|
|
|
239
233
|
display: block;
|
|
240
234
|
font-family: inherit;
|
|
241
235
|
font-size: var(--jb-select-value-font-size, 1.1rem);
|
|
242
|
-
color: var(--
|
|
236
|
+
color: var(--value-color);
|
|
243
237
|
margin: 0;
|
|
244
238
|
border-radius: 0;
|
|
245
239
|
|
|
@@ -248,7 +242,7 @@
|
|
|
248
242
|
}
|
|
249
243
|
|
|
250
244
|
&::placeholder {
|
|
251
|
-
color: var(--
|
|
245
|
+
color: var(--placeholder-color);
|
|
252
246
|
font-size: var(--jb-select-placeholder-font-size, 1.1em);
|
|
253
247
|
}
|
|
254
248
|
}
|
|
@@ -275,9 +269,9 @@
|
|
|
275
269
|
position: relative;
|
|
276
270
|
z-index: calc(var(--p-base-z-index) + 3);
|
|
277
271
|
width: 100%;
|
|
278
|
-
height: var(--
|
|
279
|
-
background-color: var(--jb-select-middle-div-color, var(--
|
|
280
|
-
margin: var(--jb-select-middle-div-margin, calc(-1 * var(--
|
|
272
|
+
height: var(--middle-div-height);
|
|
273
|
+
background-color: var(--jb-select-middle-div-color, var(--border-color));
|
|
274
|
+
margin: var(--jb-select-middle-div-margin, calc(-1 * var(--border-bottom-width)) 0);
|
|
281
275
|
border-radius: var(--jb-select-middle-div-radius, 0px);
|
|
282
276
|
}
|
|
283
277
|
|
|
@@ -285,7 +279,7 @@
|
|
|
285
279
|
font-size: var(--jb-select-message-font-size, 0.7em);
|
|
286
280
|
font-weight: var(--jb-select-message-font-weight, normal);
|
|
287
281
|
padding: 4px 8px;
|
|
288
|
-
color: var(--
|
|
282
|
+
color: var(--message-color);
|
|
289
283
|
|
|
290
284
|
&:empty {
|
|
291
285
|
padding: 0;
|
|
@@ -303,14 +297,14 @@
|
|
|
303
297
|
height: auto;
|
|
304
298
|
overflow: hidden;
|
|
305
299
|
width: 100%;
|
|
306
|
-
background-color: var(--
|
|
300
|
+
background-color: var(--select-box-bg-color);
|
|
307
301
|
border-radius: 0 0 var(--jb-select-border-radius, 16px) var(--jb-select-border-radius, 16px);
|
|
308
|
-
border: solid var(--jb-select-list-border-width, 1px) var(--
|
|
302
|
+
border: solid var(--jb-select-list-border-width, 1px) var(--border-color);
|
|
309
303
|
border-top: none;
|
|
310
|
-
border-bottom: solid var(--p-border-bottom-width) var(--
|
|
304
|
+
border-bottom: solid var(--p-border-bottom-width) var(--border-color);
|
|
311
305
|
box-shadow: var(--jb-select-list-box-shadow);
|
|
312
306
|
box-sizing: border-box;
|
|
313
|
-
z-index: calc(var(--
|
|
307
|
+
z-index: calc(var(--base-z-index) + 2);
|
|
314
308
|
|
|
315
309
|
&.--show {
|
|
316
310
|
display: block;
|
|
@@ -329,7 +323,7 @@
|
|
|
329
323
|
|
|
330
324
|
|
|
331
325
|
@include mobile-tablet {
|
|
332
|
-
max-height: calc(var(--p-mobile-modal-height) -
|
|
326
|
+
max-height: calc(var(--p-mobile-modal-height) - 15rem);
|
|
333
327
|
}
|
|
334
328
|
|
|
335
329
|
/* option style places */
|
|
@@ -340,7 +334,7 @@
|
|
|
340
334
|
}
|
|
341
335
|
|
|
342
336
|
&::-webkit-scrollbar-thumb {
|
|
343
|
-
background-color: var(--
|
|
337
|
+
background-color: var(--list-scroll-color);
|
|
344
338
|
border-radius: var(--jb-select-list-scroll-border-radius, 4px);
|
|
345
339
|
}
|
|
346
340
|
}
|
|
@@ -348,7 +342,7 @@
|
|
|
348
342
|
.empty-list-placeholder {
|
|
349
343
|
display: none;
|
|
350
344
|
text-align: center;
|
|
351
|
-
color:
|
|
345
|
+
color: var(--empty-list-placeholder-color);
|
|
352
346
|
font-style: italic;
|
|
353
347
|
padding: 8px 0;
|
|
354
348
|
|
package/lib/jb-select.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { isMobile } from "jb-core";
|
|
|
10
10
|
import { JBFormInputStandards } from 'jb-form';
|
|
11
11
|
// eslint-disable-next-line no-duplicate-imports
|
|
12
12
|
import { JBOptionWebComponent } from "./jb-option/jb-option";
|
|
13
|
+
import { defineColors } from 'jb-core/theme';
|
|
13
14
|
|
|
14
15
|
//TODO: add IncludeInputInList or freeSolo so user can select item that he wrote without even it exist in select list
|
|
15
16
|
//TODO: handleHomeEndKeys to move focus inside the popup with the Home and End keys.
|
|
@@ -164,6 +165,7 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
164
165
|
mode: "open",
|
|
165
166
|
delegatesFocus: true,
|
|
166
167
|
});
|
|
168
|
+
defineColors();
|
|
167
169
|
const html = `<style>${CSS}</style>` + "\n" + HTML;
|
|
168
170
|
const element = document.createElement("template");
|
|
169
171
|
element.innerHTML = html;
|
|
@@ -202,7 +204,7 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
202
204
|
//events to work with options
|
|
203
205
|
this.addEventListener("select", this.#onOptionSelect.bind(this));
|
|
204
206
|
this.addEventListener("jb-option-connected", this.#onOptionConnected.bind(this));
|
|
205
|
-
this.elements.optionListSlot.addEventListener("slotchange",this.#onOptionSlotChange.bind(this));
|
|
207
|
+
this.elements.optionListSlot.addEventListener("slotchange", this.#onOptionSlotChange.bind(this));
|
|
206
208
|
|
|
207
209
|
}
|
|
208
210
|
|
|
@@ -262,15 +264,15 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
262
264
|
/**
|
|
263
265
|
* will check option list and if select has no option it will show empty list placeholder
|
|
264
266
|
*/
|
|
265
|
-
#updateListEmptyPlaceholder(){
|
|
266
|
-
const isAnyOptionVisible = Array.from(this.#optionList).some(x=>x.hidden==false);
|
|
267
|
-
if(isAnyOptionVisible){
|
|
267
|
+
#updateListEmptyPlaceholder() {
|
|
268
|
+
const isAnyOptionVisible = Array.from(this.#optionList).some(x => x.hidden == false);
|
|
269
|
+
if (isAnyOptionVisible) {
|
|
268
270
|
this.elements.emptyListPlaceholder.classList.remove("--show");
|
|
269
|
-
}else{
|
|
271
|
+
} else {
|
|
270
272
|
this.elements.emptyListPlaceholder.classList.add("--show");
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
|
-
#onOptionSlotChange(e:Event){
|
|
275
|
+
#onOptionSlotChange(e: Event) {
|
|
274
276
|
this.#setValueOnOptionListChanged();
|
|
275
277
|
this.#updateListEmptyPlaceholder();
|
|
276
278
|
}
|
|
@@ -291,11 +293,11 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
291
293
|
}
|
|
292
294
|
//when user set value by attribute or value prop directly we call this function
|
|
293
295
|
#setValueFromOutside(value: TValue): boolean {
|
|
294
|
-
if(value === null || value === undefined){
|
|
295
|
-
this.#setValue(null,null);
|
|
296
|
+
if (value === null || value === undefined) {
|
|
297
|
+
this.#setValue(null, null);
|
|
296
298
|
return true;
|
|
297
299
|
}
|
|
298
|
-
let matchedOption:JBOptionWebComponent<TValue
|
|
300
|
+
let matchedOption: JBOptionWebComponent<TValue> | null = null;
|
|
299
301
|
this.#optionList.forEach((option) => {
|
|
300
302
|
// if we have value mapper we set selected value by object that match mapper
|
|
301
303
|
if (option.value == value) {
|
|
@@ -303,7 +305,7 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
303
305
|
}
|
|
304
306
|
});
|
|
305
307
|
if (matchedOption) {
|
|
306
|
-
this.#setValue(matchedOption.value,matchedOption);
|
|
308
|
+
this.#setValue(matchedOption.value, matchedOption);
|
|
307
309
|
return true;
|
|
308
310
|
} else {
|
|
309
311
|
this.#notFoundedValue = value;
|
|
@@ -311,14 +313,14 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
311
313
|
}
|
|
312
314
|
}
|
|
313
315
|
//null option mean deselect all
|
|
314
|
-
#changeSelectedOption(option:JBOptionWebComponent<TValue
|
|
315
|
-
this.#optionList.forEach((x)=>x.selected = false);
|
|
316
|
-
if(option){
|
|
316
|
+
#changeSelectedOption(option: JBOptionWebComponent<TValue> | null) {
|
|
317
|
+
this.#optionList.forEach((x) => x.selected = false);
|
|
318
|
+
if (option) {
|
|
317
319
|
option.selected = true;
|
|
318
320
|
this.#selectedOption = option;
|
|
319
321
|
}
|
|
320
322
|
}
|
|
321
|
-
#setValue(value: TValue,option:JBOptionWebComponent<TValue
|
|
323
|
+
#setValue(value: TValue, option: JBOptionWebComponent<TValue> | null) {
|
|
322
324
|
this.#notFoundedValue = null;
|
|
323
325
|
this.#value = value;
|
|
324
326
|
if (value === null || value === undefined) {
|
|
@@ -495,12 +497,12 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
495
497
|
const target = (e.composedPath()[0] as JBOptionWebComponent<TValue>);
|
|
496
498
|
if (target instanceof JBOptionWebComponent) {
|
|
497
499
|
const value = target.value;
|
|
498
|
-
this.#selectOption(value,target);
|
|
500
|
+
this.#selectOption(value, target);
|
|
499
501
|
this.blur();
|
|
500
502
|
const dispatchedEvent = this.#dispatchOnChangeEvent();
|
|
501
503
|
if (dispatchedEvent.defaultPrevented) {
|
|
502
504
|
e.preventDefault();
|
|
503
|
-
this.#selectOption(prevValue,prevOption);
|
|
505
|
+
this.#selectOption(prevValue, prevOption);
|
|
504
506
|
}
|
|
505
507
|
}
|
|
506
508
|
|
|
@@ -509,26 +511,26 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
509
511
|
#onOptionConnected(e: CustomEvent) {
|
|
510
512
|
e.stopPropagation();
|
|
511
513
|
const target = (e.composedPath()[0] as JBOptionWebComponent<TValue>);
|
|
512
|
-
target.addEventListener("jb-option-disconnected",this.#onOptionDisconnected.bind(this),{once:true,passive:true});
|
|
514
|
+
target.addEventListener("jb-option-disconnected", this.#onOptionDisconnected.bind(this), { once: true, passive: true });
|
|
513
515
|
target.setSelectElement(this);
|
|
514
516
|
this.#optionList.add(target);
|
|
515
|
-
if(this.#notFoundedValue){
|
|
517
|
+
if (this.#notFoundedValue) {
|
|
516
518
|
this.#setValueOnOptionListChanged();
|
|
517
519
|
}
|
|
518
520
|
this.#updateListEmptyPlaceholder();
|
|
519
521
|
}
|
|
520
|
-
#onOptionDisconnected(e:CustomEvent){
|
|
522
|
+
#onOptionDisconnected(e: CustomEvent) {
|
|
521
523
|
e.stopPropagation();
|
|
522
524
|
const target = e.target as JBOptionWebComponent<TValue>;
|
|
523
525
|
this.#optionList.delete(target);
|
|
524
526
|
this.#updateListEmptyPlaceholder();
|
|
525
|
-
if(target.value == this.#value){
|
|
527
|
+
if (target.value == this.#value) {
|
|
526
528
|
this.#setValueOnOptionListChanged();
|
|
527
529
|
}
|
|
528
530
|
}
|
|
529
531
|
|
|
530
|
-
#selectOption(value: TValue, optionDom:JBOptionWebComponent<TValue>) {
|
|
531
|
-
this.#setValue(value,optionDom);
|
|
532
|
+
#selectOption(value: TValue, optionDom: JBOptionWebComponent<TValue>) {
|
|
533
|
+
this.#setValue(value, optionDom);
|
|
532
534
|
this.#checkValidity(true);
|
|
533
535
|
}
|
|
534
536
|
/**
|
|
@@ -560,25 +562,25 @@ export class JBSelectWebComponent<TValue = any> extends HTMLElement implements W
|
|
|
560
562
|
}
|
|
561
563
|
#createSelectedValueDom(value: TValue) {
|
|
562
564
|
if (typeof this.callbacks.getSelectedValueDOM == "function") {
|
|
563
|
-
return this.callbacks.getSelectedValueDOM(value,this.#selectedOption);
|
|
565
|
+
return this.callbacks.getSelectedValueDOM(value, this.#selectedOption);
|
|
564
566
|
} else {
|
|
565
567
|
return this.#createDefaultSelectedValueDom();
|
|
566
568
|
}
|
|
567
569
|
}
|
|
568
570
|
#createDefaultSelectedValueDom() {
|
|
569
571
|
//TODO: put some backup way for when we have value but no option provided
|
|
570
|
-
let contentNodes:Node[] = [];
|
|
571
|
-
if(this.#selectedOption){
|
|
572
|
+
let contentNodes: Node[] = [];
|
|
573
|
+
if (this.#selectedOption) {
|
|
572
574
|
contentNodes = this.#selectedOption.optionContent;
|
|
573
575
|
}
|
|
574
576
|
const selectedOptionDom = document.createElement("div");
|
|
575
577
|
selectedOptionDom.classList.add("selected-value");
|
|
576
|
-
selectedOptionDom.append(...contentNodes.map(n=>n.cloneNode()));
|
|
578
|
+
selectedOptionDom.append(...contentNodes.map(n => n.cloneNode()));
|
|
577
579
|
return selectedOptionDom;
|
|
578
580
|
}
|
|
579
581
|
#getInsideValidation() {
|
|
580
582
|
const validationList: ValidationItem<ValidationValue<TValue>>[] = [];
|
|
581
|
-
if(this.getAttribute("error") !== null && this.getAttribute("error").trim().length > 0){
|
|
583
|
+
if (this.getAttribute("error") !== null && this.getAttribute("error").trim().length > 0) {
|
|
582
584
|
validationList.push({
|
|
583
585
|
validator: undefined,
|
|
584
586
|
message: this.getAttribute("error"),
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--middle-div-height: var(--jb-select-middle-div-height, 0px);
|
|
3
|
+
--border-bottom-width: var(--jb-select-border-bottom-width, var(--jb-select-border-width, 3px));
|
|
4
|
+
--base-z-index: 1;
|
|
5
|
+
--mobile-modal-z-index: 900;
|
|
6
|
+
--mobile-modal-height: var(--jb-select-mobile-modal-height, 100vh);
|
|
7
|
+
/**/
|
|
8
|
+
--border-color: var(--jb-select-border-color, var(--jb-neutral-10));
|
|
9
|
+
--message-color: var(--jb-select-message-color, var(--jb-text-secondary));
|
|
10
|
+
--label-color: var(--jb-select-label-color, var(--jb-text-primary));
|
|
11
|
+
--value-color: var(--jb-select-value-color, var(--jb-text-primary));
|
|
12
|
+
--placeholder-color: var(--jb-select-placeholder-color, var(--jb-neutral-6));
|
|
13
|
+
--select-box-bg-color: var(--jb-select-bgcolor, var(--jb-neutral-10));
|
|
14
|
+
--overlay-bg-color:var(--jb-select-overlay-bg-color, oklch(from var(--jb-neutral) l c h / calc(alpha - 0.5)));
|
|
15
|
+
--modal-label-color:var(--jb-select-modal-label-color, var(--jb-text-contrast));
|
|
16
|
+
--modal-close-color:var(--jb-select-modal-close-color, var(--jb-white));
|
|
17
|
+
--close-bg-color:var(--jb-select-close-bg-color, var(--jb-neutral-2));
|
|
18
|
+
--list-scroll-color:var(--jb-select-list-scroll-color, oklch(from var(--select-box-bg-color) calc(l - 0.2) c h));
|
|
19
|
+
--empty-list-placeholder-color:var(--jb-select-empty-list-placeholder-color, var(--jb-text-secondary))
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host(:state(invalid)) {
|
|
23
|
+
--message-color: var(--jb-select-message-error-color, var(--jb-red));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host(:focus-within) {
|
|
27
|
+
--border-color: var(--jb-select-border-color-focus, var(--jb-neutral));
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
"select",
|
|
13
13
|
"autocomplete",
|
|
14
14
|
"dropdown",
|
|
15
|
+
"select box",
|
|
15
16
|
"web component",
|
|
16
17
|
"react component"
|
|
17
18
|
],
|
|
18
|
-
"version": "6.
|
|
19
|
+
"version": "6.3.0",
|
|
19
20
|
"bugs": "https://github.com/javadbat/jb-select/issues",
|
|
20
21
|
"license": "MIT",
|
|
21
22
|
"files": [
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"jb-validation": ">=0.4.0",
|
|
37
|
-
"jb-core":">=0.
|
|
38
|
+
"jb-core":">=0.8.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"jb-form":">=0.6.10"
|