@vlalg-nimbus/nb-selects 1.0.1 → 1.0.3
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/nb-selects.js +827 -1082
- package/dist/nb-selects.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/nb-selects.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
1
|
+
import { useCssVars as Ue, unref as e, onMounted as Ge, onUnmounted as Bt, toRefs as Je, ref as ee, computed as o, watch as be, openBlock as H, createElementBlock as $, normalizeClass as R, normalizeStyle as Re, createElementVNode as w, mergeProps as Qe, createTextVNode as nt, toDisplayString as ge, createCommentVNode as Se, withModifiers as y, withKeys as B, Fragment as ct, renderList as vt, renderSlot as pt, nextTick as Y, withDirectives as lt, vModelCheckbox as at } from "vue";
|
|
2
|
+
const Ze = (t, C) => {
|
|
3
|
+
const g = t.__vccOpts || t;
|
|
4
|
+
for (const [U, x] of C)
|
|
5
|
+
g[U] = x;
|
|
6
|
+
return g;
|
|
7
|
+
}, wt = ["id"], Vt = ["for"], Ht = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "component__label--required"
|
|
10
|
-
},
|
|
10
|
+
}, $t = ["tabindex"], At = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "component__dropdown-placeholder"
|
|
13
13
|
}, Dt = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "component__dropdown-selected"
|
|
16
|
-
}, It = ["tabindex", "aria-selected"], Nt = { class: "component__option-label" }, Et = ["data-option-index-single", "tabindex", "aria-selected", "onClick", "onKeydown"], Lt = { class: "component__option-label" },
|
|
16
|
+
}, It = ["tabindex", "aria-selected"], Nt = { class: "component__option-label" }, Et = ["data-option-index-single", "tabindex", "aria-selected", "onClick", "onKeydown"], Lt = { class: "component__option-label" }, Rt = ["tabindex"], Wt = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "component__dropdown-placeholder"
|
|
19
|
-
},
|
|
19
|
+
}, zt = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "component__dropdown-selected"
|
|
22
|
-
}, Kt = ["data-option-index-multiple", "tabindex", "aria-selected", "onClick", "onKeydown"],
|
|
22
|
+
}, Kt = ["data-option-index-multiple", "tabindex", "aria-selected", "onClick", "onKeydown"], Ft = ["value", "checked", "disabled"], jt = { class: "component__checkbox-label" }, Xt = /* @__PURE__ */ Object.assign({
|
|
23
23
|
name: "NbSelect",
|
|
24
24
|
inheritAttrs: !1
|
|
25
25
|
}, {
|
|
@@ -32,9 +32,9 @@ const qe = (e, h) => {
|
|
|
32
32
|
display: {
|
|
33
33
|
type: String,
|
|
34
34
|
default: "b",
|
|
35
|
-
validator: (
|
|
36
|
-
const
|
|
37
|
-
return ["b", "ib"].includes(
|
|
35
|
+
validator: (t = "b") => {
|
|
36
|
+
const C = t.toLowerCase();
|
|
37
|
+
return ["b", "ib"].includes(C);
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
textColor: {
|
|
@@ -44,12 +44,12 @@ const qe = (e, h) => {
|
|
|
44
44
|
theme: {
|
|
45
45
|
type: String,
|
|
46
46
|
default: "light",
|
|
47
|
-
validator: (
|
|
47
|
+
validator: (t) => ["dark", "light"].indexOf(t) !== -1
|
|
48
48
|
},
|
|
49
49
|
hasBorderRadius: {
|
|
50
50
|
type: Boolean,
|
|
51
51
|
default: !1,
|
|
52
|
-
validator: (
|
|
52
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
53
53
|
},
|
|
54
54
|
borderRadius: {
|
|
55
55
|
type: Number,
|
|
@@ -58,7 +58,7 @@ const qe = (e, h) => {
|
|
|
58
58
|
disabled: {
|
|
59
59
|
type: Boolean,
|
|
60
60
|
default: !1,
|
|
61
|
-
validator: (
|
|
61
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
62
62
|
},
|
|
63
63
|
fontFamily: {
|
|
64
64
|
type: String,
|
|
@@ -67,17 +67,17 @@ const qe = (e, h) => {
|
|
|
67
67
|
fontSize: {
|
|
68
68
|
type: String,
|
|
69
69
|
default: "1.6em",
|
|
70
|
-
validator: (
|
|
70
|
+
validator: (t) => t || "1.6em"
|
|
71
71
|
},
|
|
72
72
|
fontWeight: {
|
|
73
73
|
type: Number,
|
|
74
74
|
default: 400,
|
|
75
|
-
validator: (
|
|
75
|
+
validator: (t) => t || 700
|
|
76
76
|
},
|
|
77
77
|
textAlign: {
|
|
78
78
|
type: String,
|
|
79
79
|
default: "left",
|
|
80
|
-
validator: (
|
|
80
|
+
validator: (t) => ["center", "left", "right"].indexOf(t) !== -1
|
|
81
81
|
},
|
|
82
82
|
selectWidth: {
|
|
83
83
|
type: Number,
|
|
@@ -86,7 +86,7 @@ const qe = (e, h) => {
|
|
|
86
86
|
inputStyle: {
|
|
87
87
|
type: String,
|
|
88
88
|
default: "background",
|
|
89
|
-
validator: (
|
|
89
|
+
validator: (t) => ["background", "line", "border"].indexOf(t) !== -1
|
|
90
90
|
},
|
|
91
91
|
selectName: {
|
|
92
92
|
type: String,
|
|
@@ -95,7 +95,7 @@ const qe = (e, h) => {
|
|
|
95
95
|
required: {
|
|
96
96
|
type: Boolean,
|
|
97
97
|
default: !1,
|
|
98
|
-
validator: (
|
|
98
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
99
99
|
},
|
|
100
100
|
options: {
|
|
101
101
|
type: Array,
|
|
@@ -108,7 +108,7 @@ const qe = (e, h) => {
|
|
|
108
108
|
selectedOptionMultiple: {
|
|
109
109
|
type: Array,
|
|
110
110
|
default: () => [],
|
|
111
|
-
validator: (
|
|
111
|
+
validator: (t) => t === null || Array.isArray(t)
|
|
112
112
|
},
|
|
113
113
|
textKey: {
|
|
114
114
|
type: String,
|
|
@@ -121,12 +121,12 @@ const qe = (e, h) => {
|
|
|
121
121
|
multiple: {
|
|
122
122
|
type: Boolean,
|
|
123
123
|
default: !1,
|
|
124
|
-
validator: (
|
|
124
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
125
125
|
},
|
|
126
126
|
hasEmptyOption: {
|
|
127
127
|
type: Boolean,
|
|
128
128
|
default: !0,
|
|
129
|
-
validator: (
|
|
129
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
130
130
|
},
|
|
131
131
|
emptyOptionText: {
|
|
132
132
|
type: String,
|
|
@@ -143,7 +143,7 @@ const qe = (e, h) => {
|
|
|
143
143
|
hasLabel: {
|
|
144
144
|
type: Boolean,
|
|
145
145
|
default: !1,
|
|
146
|
-
validator: (
|
|
146
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
147
147
|
},
|
|
148
148
|
labelText: {
|
|
149
149
|
type: String,
|
|
@@ -265,139 +265,139 @@ const qe = (e, h) => {
|
|
|
265
265
|
}
|
|
266
266
|
},
|
|
267
267
|
emits: ["clicked", "changed", "user-changed"],
|
|
268
|
-
setup(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
})),
|
|
296
|
-
|
|
268
|
+
setup(t, { emit: C }) {
|
|
269
|
+
Ue((a) => ({
|
|
270
|
+
"4b760063": Ye.value,
|
|
271
|
+
"1d6f4658": e(A),
|
|
272
|
+
"00d7b95f": e(_e),
|
|
273
|
+
"448e543c": e(J),
|
|
274
|
+
"96fd917c": e(Be),
|
|
275
|
+
"03577dcc": e(Te),
|
|
276
|
+
"57c0ed52": e(we),
|
|
277
|
+
"25b755fc": e(T),
|
|
278
|
+
"359cf496": e(me),
|
|
279
|
+
"5dfec5cc": e(O),
|
|
280
|
+
54298857: e(ie),
|
|
281
|
+
a98ac998: e(I),
|
|
282
|
+
"09c9ec3a": e(De),
|
|
283
|
+
24439812: e(se),
|
|
284
|
+
"6ea8fd5a": e(Ie),
|
|
285
|
+
"24f8aa04": e(W),
|
|
286
|
+
"041cdea6": e(Z),
|
|
287
|
+
"4235afba": e(Oe),
|
|
288
|
+
"14658faa": e(oe),
|
|
289
|
+
"7f56fef4": a.styleButtonColor,
|
|
290
|
+
"28861ace": Me.value,
|
|
291
|
+
f5f79fc0: e(Q),
|
|
292
|
+
"046260ce": e(f),
|
|
293
|
+
"4f5401d0": e(He),
|
|
294
|
+
b59f3ade: e(z)
|
|
295
|
+
})), Ge(() => {
|
|
296
|
+
de.value ? V.value = G.value || [] : s.value = ae.value, document.addEventListener("click", ut), document.addEventListener("nbselect:close-all", it), Ne.value = !0;
|
|
297
297
|
}), Bt(() => {
|
|
298
|
-
document.removeEventListener("click", ut), document.removeEventListener("nbselect:close-all",
|
|
298
|
+
document.removeEventListener("click", ut), document.removeEventListener("nbselect:close-all", it);
|
|
299
299
|
});
|
|
300
|
-
const
|
|
300
|
+
const g = C, U = t, {
|
|
301
301
|
display: x,
|
|
302
|
-
textColor:
|
|
302
|
+
textColor: re,
|
|
303
303
|
theme: he,
|
|
304
304
|
hasBorderRadius: F,
|
|
305
|
-
borderRadius:
|
|
306
|
-
disabled:
|
|
307
|
-
fontFamily:
|
|
308
|
-
fontSize:
|
|
309
|
-
fontWeight:
|
|
310
|
-
textAlign:
|
|
311
|
-
selectWidth:
|
|
305
|
+
borderRadius: ve,
|
|
306
|
+
disabled: d,
|
|
307
|
+
fontFamily: h,
|
|
308
|
+
fontSize: pe,
|
|
309
|
+
fontWeight: M,
|
|
310
|
+
textAlign: ue,
|
|
311
|
+
selectWidth: te,
|
|
312
312
|
inputStyle: le,
|
|
313
|
-
selectName:
|
|
314
|
-
required:
|
|
315
|
-
options:
|
|
316
|
-
selectedOptionOnly:
|
|
317
|
-
selectedOptionMultiple:
|
|
318
|
-
textKey:
|
|
319
|
-
valueKey:
|
|
320
|
-
multiple:
|
|
321
|
-
hasEmptyOption:
|
|
322
|
-
emptyOptionValue:
|
|
323
|
-
dropdownScrollClass:
|
|
324
|
-
hasLabel:
|
|
325
|
-
labelText:
|
|
326
|
-
emptyOptionText:
|
|
327
|
-
lightBgColor:
|
|
328
|
-
lightBgColorFocus:
|
|
313
|
+
selectName: ye,
|
|
314
|
+
required: Ce,
|
|
315
|
+
options: k,
|
|
316
|
+
selectedOptionOnly: ae,
|
|
317
|
+
selectedOptionMultiple: G,
|
|
318
|
+
textKey: j,
|
|
319
|
+
valueKey: c,
|
|
320
|
+
multiple: de,
|
|
321
|
+
hasEmptyOption: m,
|
|
322
|
+
emptyOptionValue: S,
|
|
323
|
+
dropdownScrollClass: q,
|
|
324
|
+
hasLabel: _,
|
|
325
|
+
labelText: N,
|
|
326
|
+
emptyOptionText: D,
|
|
327
|
+
lightBgColor: J,
|
|
328
|
+
lightBgColorFocus: T,
|
|
329
329
|
lightBorderColor: me,
|
|
330
|
-
lightBorderColorFocus:
|
|
331
|
-
lightDisabledBgColor:
|
|
332
|
-
lightTextColor:
|
|
330
|
+
lightBorderColorFocus: Oe,
|
|
331
|
+
lightDisabledBgColor: Q,
|
|
332
|
+
lightTextColor: A,
|
|
333
333
|
lightDisabledBorderColor: f,
|
|
334
|
-
lightOptionTextColor:
|
|
335
|
-
lightOptionTextColorSelected:
|
|
336
|
-
lightOptionBgColorSelected:
|
|
337
|
-
lightPlaceholderColor:
|
|
338
|
-
darkBgColor:
|
|
339
|
-
darkBgColorFocus:
|
|
340
|
-
darkBorderColor:
|
|
341
|
-
darkBorderColorFocus:
|
|
342
|
-
darkDisabledBgColor:
|
|
343
|
-
darkTextColor:
|
|
344
|
-
darkDisabledBorderColor:
|
|
345
|
-
darkOptionTextColor:
|
|
346
|
-
darkOptionTextColorSelected:
|
|
347
|
-
darkOptionBgColorSelected:
|
|
348
|
-
darkPlaceholderColor:
|
|
334
|
+
lightOptionTextColor: _e,
|
|
335
|
+
lightOptionTextColorSelected: Te,
|
|
336
|
+
lightOptionBgColorSelected: Be,
|
|
337
|
+
lightPlaceholderColor: we,
|
|
338
|
+
darkBgColor: I,
|
|
339
|
+
darkBgColorFocus: W,
|
|
340
|
+
darkBorderColor: Z,
|
|
341
|
+
darkBorderColorFocus: oe,
|
|
342
|
+
darkDisabledBgColor: He,
|
|
343
|
+
darkTextColor: O,
|
|
344
|
+
darkDisabledBorderColor: z,
|
|
345
|
+
darkOptionTextColor: ie,
|
|
346
|
+
darkOptionTextColorSelected: se,
|
|
347
|
+
darkOptionBgColorSelected: De,
|
|
348
|
+
darkPlaceholderColor: Ie,
|
|
349
349
|
tabindex: $e,
|
|
350
|
-
tabIndex:
|
|
350
|
+
tabIndex: ke,
|
|
351
351
|
hasTabIndexEnter: fe,
|
|
352
|
-
hasTabIndexSpace:
|
|
352
|
+
hasTabIndexSpace: ce,
|
|
353
353
|
ariaLabel: l,
|
|
354
|
-
ariaAttrs:
|
|
355
|
-
} =
|
|
356
|
-
get: () => Array.isArray(
|
|
354
|
+
ariaAttrs: v
|
|
355
|
+
} = Je(U), s = ee(null), V = ee([]), Ne = ee(!1), b = ee(!1), p = ee(!1), Ee = ee(null), Ve = ee(!1), E = ee(null), X = ee(null), L = ee(-1), P = ee(-1), ne = o({
|
|
356
|
+
get: () => Array.isArray(V.value) ? V.value : [],
|
|
357
357
|
set: (a) => {
|
|
358
|
-
|
|
358
|
+
V.value = Array.isArray(a) ? a : [];
|
|
359
359
|
}
|
|
360
|
-
}),
|
|
361
|
-
const a =
|
|
360
|
+
}), xe = o(() => {
|
|
361
|
+
const a = d.value ? "component-disabled" : "", n = x.value !== "b" ? "inline-block" : "block", r = re.value ? re.value : "#ffffff", i = h.value ? h.value : "'Lato', sans-serif", u = pe.value ? pe.value : "1.6rem", K = M.value !== 0 && !M.value || M.value < 0 ? 100 : M.value, xt = te.value !== 0 && !te.value || te.value < 0 ? 200 : te.value, kt = ve.value !== 0 && !ve.value || ve.value < 0 ? 0 : ve.value, St = F.value ? F.value : !1, _t = !ue.value || !["center", "left", "right"].includes(ue.value) ? "left" : ue.value, Tt = !le.value || !["background", "line", "border"].includes(le.value) ? "background" : le.value;
|
|
362
362
|
return {
|
|
363
363
|
disabled: a,
|
|
364
364
|
display: n,
|
|
365
|
-
font:
|
|
366
|
-
fontSize:
|
|
367
|
-
fontWeight:
|
|
368
|
-
textColor:
|
|
369
|
-
selectWidth:
|
|
370
|
-
borderRadius:
|
|
371
|
-
hasBorderRadius:
|
|
365
|
+
font: i,
|
|
366
|
+
fontSize: u,
|
|
367
|
+
fontWeight: K,
|
|
368
|
+
textColor: r,
|
|
369
|
+
selectWidth: xt,
|
|
370
|
+
borderRadius: kt,
|
|
371
|
+
hasBorderRadius: St,
|
|
372
372
|
textAlign: _t,
|
|
373
373
|
inputStyle: Tt
|
|
374
374
|
};
|
|
375
|
-
}),
|
|
376
|
-
display:
|
|
377
|
-
})),
|
|
378
|
-
const a =
|
|
375
|
+
}), Fe = o(() => xe.value.disabled), je = o(() => ({
|
|
376
|
+
display: xe.value.display
|
|
377
|
+
})), Xe = o(() => {
|
|
378
|
+
const a = xe.value;
|
|
379
379
|
return {
|
|
380
380
|
color: a.textColor,
|
|
381
381
|
fontSize: a.fontSize,
|
|
382
382
|
fontWeight: a.fontWeight,
|
|
383
383
|
textAlign: a.textAlign
|
|
384
384
|
};
|
|
385
|
-
}),
|
|
386
|
-
const a =
|
|
385
|
+
}), Ye = o(() => xe.value.font), Me = o(() => xe.value.textColor), We = o(() => {
|
|
386
|
+
const a = xe.value;
|
|
387
387
|
return a.display === "block" ? { width: "100%" } : {
|
|
388
388
|
width: `${a.selectWidth}px`
|
|
389
389
|
};
|
|
390
|
-
}),
|
|
391
|
-
const a =
|
|
390
|
+
}), Le = o(() => {
|
|
391
|
+
const a = xe.value;
|
|
392
392
|
return a.inputStyle !== "line" && a.hasBorderRadius ? { borderRadius: `${a.borderRadius}rem` } : {};
|
|
393
|
-
}),
|
|
393
|
+
}), qe = o(() => {
|
|
394
394
|
switch (he.value) {
|
|
395
395
|
case "dark":
|
|
396
396
|
return "component__theme--dark";
|
|
397
397
|
default:
|
|
398
398
|
return "component__theme--light";
|
|
399
399
|
}
|
|
400
|
-
}),
|
|
400
|
+
}), Pe = o(() => {
|
|
401
401
|
switch (le.value) {
|
|
402
402
|
case "line":
|
|
403
403
|
return "component__input--line";
|
|
@@ -406,387 +406,387 @@ const qe = (e, h) => {
|
|
|
406
406
|
default:
|
|
407
407
|
return "component__input--background";
|
|
408
408
|
}
|
|
409
|
-
}),
|
|
410
|
-
const n =
|
|
411
|
-
value:
|
|
412
|
-
disabled:
|
|
413
|
-
index:
|
|
409
|
+
}), Ae = (a) => {
|
|
410
|
+
const n = k.value.map((u, K) => ({
|
|
411
|
+
value: u[c.value],
|
|
412
|
+
disabled: u.disabled || d.value,
|
|
413
|
+
index: K
|
|
414
414
|
}));
|
|
415
|
-
if (n.filter((
|
|
415
|
+
if (n.filter((u) => !u.disabled).length === 0)
|
|
416
416
|
return;
|
|
417
|
-
let
|
|
418
|
-
if (
|
|
419
|
-
let
|
|
420
|
-
for (; n[
|
|
421
|
-
|
|
422
|
-
n[
|
|
417
|
+
let i = P.value;
|
|
418
|
+
if (i < 0 && k.value.length > 0 && (i = 0), a === "down") {
|
|
419
|
+
let u = (i + 1) % n.length, K = 0;
|
|
420
|
+
for (; n[u].disabled && K < n.length; )
|
|
421
|
+
u = (u + 1) % n.length, K++;
|
|
422
|
+
n[u].disabled || (i = u);
|
|
423
423
|
} else if (a === "up") {
|
|
424
|
-
let
|
|
425
|
-
for (; n[
|
|
426
|
-
|
|
427
|
-
n[
|
|
424
|
+
let u = i <= 0 ? n.length - 1 : i - 1, K = 0;
|
|
425
|
+
for (; n[u].disabled && K < n.length; )
|
|
426
|
+
u = u <= 0 ? n.length - 1 : u - 1, K++;
|
|
427
|
+
n[u].disabled || (i = u);
|
|
428
428
|
}
|
|
429
|
-
|
|
430
|
-
const
|
|
431
|
-
|
|
429
|
+
P.value = i, Y(() => {
|
|
430
|
+
const u = document.querySelector(`[data-option-index-multiple="${i}"]`);
|
|
431
|
+
u && u.focus();
|
|
432
432
|
});
|
|
433
|
-
},
|
|
434
|
-
if (!
|
|
433
|
+
}, et = (a) => {
|
|
434
|
+
if (!d.value) {
|
|
435
435
|
a.stopPropagation();
|
|
436
|
-
const n =
|
|
437
|
-
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
}))) :
|
|
436
|
+
const n = b.value;
|
|
437
|
+
b.value = !b.value, !n && b.value ? (dt(), k.value.length > 0 && (P.value = 0, Y(() => {
|
|
438
|
+
const r = document.querySelector(`[data-option-index-multiple="${P.value}"]`);
|
|
439
|
+
r && r.focus();
|
|
440
|
+
}))) : b.value || (P.value = -1);
|
|
441
441
|
}
|
|
442
442
|
}, ut = (a) => {
|
|
443
|
-
a.target.closest(".component__dropdown") || (
|
|
443
|
+
a.target.closest(".component__dropdown") || (b.value = !1, p.value = !1);
|
|
444
444
|
}, gt = (a) => {
|
|
445
445
|
var n;
|
|
446
|
-
(
|
|
447
|
-
var
|
|
448
|
-
|
|
449
|
-
Z.value && Z.value.focus();
|
|
450
|
-
})), b.value && (b.value = !1, Y.value = -1, ee(() => {
|
|
446
|
+
(b.value || p.value) && !((n = Ee.value) != null && n.contains(a.relatedTarget)) && setTimeout(() => {
|
|
447
|
+
var r;
|
|
448
|
+
Ve.value || (r = Ee.value) != null && r.contains(document.activeElement) || (b.value && (b.value = !1, P.value = -1, Y(() => {
|
|
451
449
|
X.value && X.value.focus();
|
|
450
|
+
})), p.value && (p.value = !1, L.value = -1, Y(() => {
|
|
451
|
+
E.value && E.value.focus();
|
|
452
452
|
})));
|
|
453
453
|
}, 100);
|
|
454
454
|
}, dt = () => {
|
|
455
455
|
document.dispatchEvent(new CustomEvent("nbselect:close-all", {
|
|
456
|
-
detail: { excludeId:
|
|
456
|
+
detail: { excludeId: U.nbId }
|
|
457
457
|
}));
|
|
458
|
-
},
|
|
458
|
+
}, it = (a) => {
|
|
459
459
|
var n;
|
|
460
|
-
((n = a.detail) == null ? void 0 : n.excludeId) !==
|
|
461
|
-
},
|
|
460
|
+
((n = a.detail) == null ? void 0 : n.excludeId) !== U.nbId && (b.value && (b.value = !1), p.value && (p.value = !1));
|
|
461
|
+
}, ze = (a) => {
|
|
462
462
|
const n = [];
|
|
463
|
-
if (
|
|
464
|
-
value:
|
|
465
|
-
disabled:
|
|
466
|
-
index:
|
|
467
|
-
}))), n.filter((
|
|
463
|
+
if (m.value && n.push({ value: S.value, disabled: d.value, index: 0 }), n.push(...k.value.map((u, K) => ({
|
|
464
|
+
value: u[c.value],
|
|
465
|
+
disabled: u.disabled || d.value,
|
|
466
|
+
index: m.value ? K + 1 : K
|
|
467
|
+
}))), n.filter((u) => !u.disabled).length === 0)
|
|
468
468
|
return;
|
|
469
|
-
let
|
|
470
|
-
if (
|
|
471
|
-
let
|
|
472
|
-
for (; n[
|
|
473
|
-
|
|
474
|
-
n[
|
|
469
|
+
let i = L.value;
|
|
470
|
+
if (i < 0 && (i = m.value || k.value.length > 0 ? 0 : -1), a === "down") {
|
|
471
|
+
let u = (i + 1) % n.length, K = 0;
|
|
472
|
+
for (; n[u].disabled && K < n.length; )
|
|
473
|
+
u = (u + 1) % n.length, K++;
|
|
474
|
+
n[u].disabled || (i = u);
|
|
475
475
|
} else if (a === "up") {
|
|
476
|
-
let
|
|
477
|
-
for (; n[
|
|
478
|
-
|
|
479
|
-
n[
|
|
476
|
+
let u = i <= 0 ? n.length - 1 : i - 1, K = 0;
|
|
477
|
+
for (; n[u].disabled && K < n.length; )
|
|
478
|
+
u = u <= 0 ? n.length - 1 : u - 1, K++;
|
|
479
|
+
n[u].disabled || (i = u);
|
|
480
480
|
}
|
|
481
|
-
|
|
482
|
-
const
|
|
483
|
-
|
|
481
|
+
L.value = i, Y(() => {
|
|
482
|
+
const u = document.querySelector(`[data-option-index-single="${i}"]`);
|
|
483
|
+
u && u.focus();
|
|
484
484
|
});
|
|
485
|
-
},
|
|
486
|
-
!
|
|
487
|
-
|
|
485
|
+
}, st = () => {
|
|
486
|
+
!d.value && p.value && (p.value = !1, L.value = -1, Y(() => {
|
|
487
|
+
E.value && E.value.focus();
|
|
488
488
|
}));
|
|
489
489
|
}, bt = () => {
|
|
490
|
-
!
|
|
491
|
-
|
|
490
|
+
!d.value && b.value && (b.value = !1, P.value = -1, Y(() => {
|
|
491
|
+
X.value && X.value.focus();
|
|
492
492
|
}));
|
|
493
|
-
},
|
|
494
|
-
if (!
|
|
493
|
+
}, tt = (a) => {
|
|
494
|
+
if (!d.value) {
|
|
495
495
|
a.stopPropagation();
|
|
496
|
-
const n =
|
|
497
|
-
|
|
498
|
-
const
|
|
499
|
-
|
|
500
|
-
})) :
|
|
496
|
+
const n = p.value;
|
|
497
|
+
p.value = !p.value, !n && p.value ? (dt(), L.value = m.value ? 0 : -1, !m.value && k.value.length > 0 && (L.value = 0), Y(() => {
|
|
498
|
+
const r = document.querySelector(`[data-option-index-single="${L.value}"]`);
|
|
499
|
+
r && r.focus();
|
|
500
|
+
})) : p.value || (L.value = -1);
|
|
501
501
|
}
|
|
502
502
|
}, Ke = (a) => {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
503
|
+
d.value || (Ve.value = !0, s.value = a, p.value = !1, L.value = -1, ft(a), setTimeout(() => {
|
|
504
|
+
Ve.value = !1, Y(() => {
|
|
505
|
+
E.value && E.value.focus();
|
|
506
506
|
});
|
|
507
507
|
}, 150));
|
|
508
508
|
}, ht = () => {
|
|
509
|
-
if (!
|
|
510
|
-
return
|
|
511
|
-
const a =
|
|
512
|
-
(n) => n[
|
|
509
|
+
if (!s.value || s.value === S.value)
|
|
510
|
+
return D.value;
|
|
511
|
+
const a = k.value.find(
|
|
512
|
+
(n) => n[c.value] === s.value
|
|
513
513
|
);
|
|
514
|
-
return a ? a[
|
|
514
|
+
return a ? a[j.value] : D.value;
|
|
515
515
|
}, yt = () => {
|
|
516
|
-
const a =
|
|
517
|
-
(n) =>
|
|
516
|
+
const a = k.value.filter(
|
|
517
|
+
(n) => ne.value.includes(n[c.value])
|
|
518
518
|
);
|
|
519
|
-
return a.length === 0 ?
|
|
519
|
+
return a.length === 0 ? D.value : a.length === 1 ? a[0][j.value] : `${a.length} itens selecionados`;
|
|
520
520
|
}, ot = (a) => {
|
|
521
|
-
if (
|
|
521
|
+
if (d.value)
|
|
522
522
|
return;
|
|
523
|
-
|
|
524
|
-
const n = [...
|
|
523
|
+
Ve.value = !0;
|
|
524
|
+
const n = [...ne.value];
|
|
525
525
|
if (n.includes(a)) {
|
|
526
|
-
const
|
|
527
|
-
|
|
526
|
+
const r = n.filter((i) => i !== a);
|
|
527
|
+
ne.value = r;
|
|
528
528
|
} else
|
|
529
|
-
|
|
530
|
-
ft(
|
|
531
|
-
|
|
529
|
+
ne.value = [...n, a];
|
|
530
|
+
ft(ne.value), setTimeout(() => {
|
|
531
|
+
Ve.value = !1;
|
|
532
532
|
}, 150);
|
|
533
533
|
}, ft = (a) => {
|
|
534
|
-
|
|
534
|
+
g("user-changed", a);
|
|
535
535
|
}, Ct = o(() => {
|
|
536
536
|
const a = {};
|
|
537
|
-
|
|
537
|
+
v.value && Object.keys(v.value).forEach((i) => a[`aria-${i}`] = v.value[i]);
|
|
538
538
|
const n = {
|
|
539
539
|
"aria-label": l.value,
|
|
540
|
-
"aria-disabled":
|
|
540
|
+
"aria-disabled": d.value,
|
|
541
541
|
...a
|
|
542
542
|
};
|
|
543
543
|
return Object.fromEntries(
|
|
544
|
-
Object.entries(n).filter(([
|
|
544
|
+
Object.entries(n).filter(([r, i]) => i != null)
|
|
545
545
|
);
|
|
546
546
|
}), mt = (a) => {
|
|
547
|
-
if (!
|
|
548
|
-
if (
|
|
547
|
+
if (!d.value) {
|
|
548
|
+
if (p.value)
|
|
549
549
|
switch (a.key) {
|
|
550
550
|
case "ArrowDown":
|
|
551
|
-
a.preventDefault(),
|
|
551
|
+
a.preventDefault(), ze("down");
|
|
552
552
|
return;
|
|
553
553
|
case "ArrowUp":
|
|
554
|
-
a.preventDefault(),
|
|
554
|
+
a.preventDefault(), ze("up");
|
|
555
555
|
return;
|
|
556
556
|
}
|
|
557
557
|
switch (a.key) {
|
|
558
558
|
case "Enter":
|
|
559
|
-
fe.value && (a.preventDefault(),
|
|
560
|
-
|
|
561
|
-
})) :
|
|
559
|
+
fe.value && (a.preventDefault(), p.value ? (p.value = !1, L.value = -1, Y(() => {
|
|
560
|
+
E.value && E.value.focus();
|
|
561
|
+
})) : tt(a));
|
|
562
562
|
break;
|
|
563
563
|
case " ":
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
})) :
|
|
564
|
+
ce.value && (a.preventDefault(), p.value ? (p.value = !1, L.value = -1, Y(() => {
|
|
565
|
+
E.value && E.value.focus();
|
|
566
|
+
})) : tt(a));
|
|
567
567
|
break;
|
|
568
568
|
case "Escape":
|
|
569
|
-
|
|
570
|
-
|
|
569
|
+
p.value && (a.preventDefault(), p.value = !1, L.value = -1, Y(() => {
|
|
570
|
+
E.value && E.value.focus();
|
|
571
571
|
}));
|
|
572
572
|
break;
|
|
573
573
|
case "ArrowDown":
|
|
574
|
-
a.preventDefault(),
|
|
574
|
+
a.preventDefault(), p.value || tt(a);
|
|
575
575
|
break;
|
|
576
576
|
case "ArrowUp":
|
|
577
|
-
a.preventDefault(),
|
|
578
|
-
|
|
577
|
+
a.preventDefault(), p.value && (p.value = !1, L.value = -1, Y(() => {
|
|
578
|
+
E.value && E.value.focus();
|
|
579
579
|
}));
|
|
580
580
|
break;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
},
|
|
584
|
-
if (!
|
|
585
|
-
if (
|
|
583
|
+
}, Ot = (a) => {
|
|
584
|
+
if (!d.value) {
|
|
585
|
+
if (b.value)
|
|
586
586
|
switch (a.key) {
|
|
587
587
|
case "ArrowDown":
|
|
588
|
-
a.preventDefault(),
|
|
588
|
+
a.preventDefault(), Ae("down");
|
|
589
589
|
return;
|
|
590
590
|
case "ArrowUp":
|
|
591
|
-
a.preventDefault(),
|
|
591
|
+
a.preventDefault(), Ae("up");
|
|
592
592
|
return;
|
|
593
593
|
}
|
|
594
594
|
switch (a.key) {
|
|
595
595
|
case "Enter":
|
|
596
|
-
fe.value && (a.preventDefault(),
|
|
597
|
-
|
|
598
|
-
})) :
|
|
596
|
+
fe.value && (a.preventDefault(), b.value ? (b.value = !1, P.value = -1, Y(() => {
|
|
597
|
+
X.value && X.value.focus();
|
|
598
|
+
})) : et(a));
|
|
599
599
|
break;
|
|
600
600
|
case " ":
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
})) :
|
|
601
|
+
ce.value && (a.preventDefault(), b.value ? (b.value = !1, P.value = -1, Y(() => {
|
|
602
|
+
X.value && X.value.focus();
|
|
603
|
+
})) : et(a));
|
|
604
604
|
break;
|
|
605
605
|
case "Escape":
|
|
606
|
-
|
|
607
|
-
|
|
606
|
+
b.value && (a.preventDefault(), b.value = !1, P.value = -1, Y(() => {
|
|
607
|
+
X.value && X.value.focus();
|
|
608
608
|
}));
|
|
609
609
|
break;
|
|
610
610
|
case "ArrowDown":
|
|
611
|
-
a.preventDefault(),
|
|
611
|
+
a.preventDefault(), b.value || et(a);
|
|
612
612
|
break;
|
|
613
613
|
case "ArrowUp":
|
|
614
|
-
a.preventDefault(),
|
|
615
|
-
|
|
614
|
+
a.preventDefault(), b.value && (b.value = !1, P.value = -1, Y(() => {
|
|
615
|
+
X.value && X.value.focus();
|
|
616
616
|
}));
|
|
617
617
|
break;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
};
|
|
621
|
-
return be(
|
|
622
|
-
|
|
623
|
-
}), be(
|
|
624
|
-
a !== n && (
|
|
625
|
-
}), be(
|
|
626
|
-
|
|
627
|
-
}), be(
|
|
628
|
-
a !== n && (
|
|
629
|
-
}), (a, n) =>
|
|
621
|
+
return be(s, (a, n) => {
|
|
622
|
+
Ne.value && a !== n && g("changed", a);
|
|
623
|
+
}), be(ae, (a, n) => {
|
|
624
|
+
a !== n && (s.value = a);
|
|
625
|
+
}), be(V, (a, n) => {
|
|
626
|
+
Ne.value && a !== n && g("changed", a);
|
|
627
|
+
}), be(G, (a, n) => {
|
|
628
|
+
a !== n && (V.value = a || []);
|
|
629
|
+
}), (a, n) => t.nbId ? (H(), $("div", {
|
|
630
630
|
key: 0,
|
|
631
631
|
ref_key: "wrapperRef",
|
|
632
|
-
ref:
|
|
633
|
-
class: R(["nb-wrapper",
|
|
634
|
-
style:
|
|
632
|
+
ref: Ee,
|
|
633
|
+
class: R(["nb-wrapper", Fe.value]),
|
|
634
|
+
style: Re([je.value, We.value]),
|
|
635
635
|
onFocusout: gt
|
|
636
636
|
}, [
|
|
637
|
-
|
|
638
|
-
id:
|
|
639
|
-
ref:
|
|
640
|
-
class: ["nb-reset", "component",
|
|
641
|
-
style: [
|
|
637
|
+
w("div", Qe({
|
|
638
|
+
id: t.nbId,
|
|
639
|
+
ref: t.nbId,
|
|
640
|
+
class: ["nb-reset", "component", qe.value, Pe.value],
|
|
641
|
+
style: [Xe.value, We.value, Le.value]
|
|
642
642
|
}, Ct.value), [
|
|
643
|
-
|
|
643
|
+
e(_) ? (H(), $("label", {
|
|
644
644
|
key: 0,
|
|
645
|
-
for:
|
|
645
|
+
for: e(ye),
|
|
646
646
|
class: "component__label"
|
|
647
647
|
}, [
|
|
648
|
-
nt(ge(
|
|
649
|
-
|
|
650
|
-
], 8,
|
|
651
|
-
|
|
648
|
+
nt(ge(e(N)), 1),
|
|
649
|
+
e(Ce) ? (H(), $("span", Ht, "*")) : Se("", !0)
|
|
650
|
+
], 8, Vt)) : Se("", !0),
|
|
651
|
+
e(de) ? (H(), $("div", {
|
|
652
652
|
key: 2,
|
|
653
|
-
class: R(["component__dropdown", { open:
|
|
653
|
+
class: R(["component__dropdown", { open: b.value, disabled: e(d) }])
|
|
654
654
|
}, [
|
|
655
|
-
|
|
655
|
+
w("div", {
|
|
656
656
|
ref_key: "dropdownFieldMultipleRef",
|
|
657
|
-
ref:
|
|
658
|
-
class: R(["component__dropdown-field", { "has-selection":
|
|
659
|
-
style:
|
|
660
|
-
tabindex:
|
|
661
|
-
onClick:
|
|
662
|
-
onKeydown:
|
|
657
|
+
ref: X,
|
|
658
|
+
class: R(["component__dropdown-field", { "has-selection": ne.value.length > 0 }]),
|
|
659
|
+
style: Re([Le.value]),
|
|
660
|
+
tabindex: e(d) ? -1 : e(ke) >= 0 ? e(ke) : e($e),
|
|
661
|
+
onClick: et,
|
|
662
|
+
onKeydown: Ot
|
|
663
663
|
}, [
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
class: R(["component__dropdown-arrow", { open:
|
|
664
|
+
ne.value.length === 0 ? (H(), $("span", Wt, ge(e(D)), 1)) : (H(), $("span", zt, ge(yt()), 1)),
|
|
665
|
+
w("span", {
|
|
666
|
+
class: R(["component__dropdown-arrow", { open: b.value }])
|
|
667
667
|
}, "▼", 2)
|
|
668
|
-
], 46,
|
|
669
|
-
|
|
668
|
+
], 46, Rt),
|
|
669
|
+
b.value ? (H(), $("div", {
|
|
670
670
|
key: 0,
|
|
671
|
-
class: R(["component__checkbox-group",
|
|
671
|
+
class: R(["component__checkbox-group", e(q)]),
|
|
672
672
|
role: "listbox"
|
|
673
673
|
}, [
|
|
674
|
-
(
|
|
675
|
-
key:
|
|
676
|
-
"data-option-index-multiple":
|
|
674
|
+
(H(!0), $(ct, null, vt(e(k), (r, i) => (H(), $("label", {
|
|
675
|
+
key: i,
|
|
676
|
+
"data-option-index-multiple": i,
|
|
677
677
|
class: R(["component__checkbox-option", {
|
|
678
|
-
disabled:
|
|
679
|
-
selected:
|
|
678
|
+
disabled: r.disabled || e(d),
|
|
679
|
+
selected: ne.value.includes(r[e(c)])
|
|
680
680
|
}]),
|
|
681
|
-
tabindex:
|
|
681
|
+
tabindex: r.disabled || e(d) ? -1 : P.value === i ? 0 : -1,
|
|
682
682
|
role: "option",
|
|
683
|
-
"aria-selected":
|
|
684
|
-
onClick:
|
|
683
|
+
"aria-selected": ne.value.includes(r[e(c)]),
|
|
684
|
+
onClick: y((u) => !r.disabled && !e(d) && ot(r[e(c)]), ["prevent"]),
|
|
685
685
|
onKeydown: [
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
686
|
+
B(y((u) => !r.disabled && !e(d) && e(fe) && ot(r[e(c)]), ["prevent"]), ["enter"]),
|
|
687
|
+
B(y((u) => !r.disabled && !e(d) && e(ce) && ot(r[e(c)]), ["prevent"]), ["space"]),
|
|
688
|
+
B(y((u) => !r.disabled && !e(d) && Ae("down"), ["prevent"]), ["arrow-down"]),
|
|
689
|
+
B(y((u) => !r.disabled && !e(d) && Ae("up"), ["prevent"]), ["arrow-up"]),
|
|
690
|
+
B(y((u) => !r.disabled && !e(d) && bt(), ["prevent"]), ["escape"])
|
|
691
691
|
]
|
|
692
692
|
}, [
|
|
693
|
-
|
|
693
|
+
w("input", {
|
|
694
694
|
type: "checkbox",
|
|
695
|
-
value:
|
|
696
|
-
checked:
|
|
697
|
-
disabled:
|
|
698
|
-
onClick: n[6] || (n[6] =
|
|
695
|
+
value: r[e(c)],
|
|
696
|
+
checked: ne.value.includes(r[e(c)]),
|
|
697
|
+
disabled: r.disabled || e(d),
|
|
698
|
+
onClick: n[6] || (n[6] = y(() => {
|
|
699
699
|
}, ["stop"]))
|
|
700
|
-
}, null, 8,
|
|
701
|
-
|
|
700
|
+
}, null, 8, Ft),
|
|
701
|
+
w("span", jt, [
|
|
702
702
|
pt(a.$slots, "slot-select-item", {
|
|
703
|
-
propRow:
|
|
704
|
-
propIndex:
|
|
703
|
+
propRow: r,
|
|
704
|
+
propIndex: i
|
|
705
705
|
}, () => [
|
|
706
|
-
nt(ge(
|
|
706
|
+
nt(ge(r[e(j)]), 1)
|
|
707
707
|
], !0)
|
|
708
708
|
])
|
|
709
709
|
], 42, Kt))), 128))
|
|
710
|
-
], 2)) :
|
|
711
|
-
], 2)) : (
|
|
710
|
+
], 2)) : Se("", !0)
|
|
711
|
+
], 2)) : (H(), $("div", {
|
|
712
712
|
key: 1,
|
|
713
|
-
class: R(["component__dropdown", { open:
|
|
713
|
+
class: R(["component__dropdown", { open: p.value, disabled: e(d) }])
|
|
714
714
|
}, [
|
|
715
|
-
|
|
715
|
+
w("div", {
|
|
716
716
|
ref_key: "dropdownFieldSingleRef",
|
|
717
|
-
ref:
|
|
718
|
-
class: R(["component__dropdown-field", { "has-selection":
|
|
719
|
-
style:
|
|
720
|
-
tabindex:
|
|
721
|
-
onClick:
|
|
717
|
+
ref: E,
|
|
718
|
+
class: R(["component__dropdown-field", { "has-selection": s.value !== null && s.value !== e(S) }]),
|
|
719
|
+
style: Re([Le.value]),
|
|
720
|
+
tabindex: e(d) ? -1 : e(ke) >= 0 ? e(ke) : e($e),
|
|
721
|
+
onClick: tt,
|
|
722
722
|
onKeydown: mt
|
|
723
723
|
}, [
|
|
724
|
-
!
|
|
725
|
-
|
|
726
|
-
class: R(["component__dropdown-arrow", { open:
|
|
724
|
+
!s.value || s.value === e(S) ? (H(), $("span", At, ge(e(D)), 1)) : (H(), $("span", Dt, ge(ht()), 1)),
|
|
725
|
+
w("span", {
|
|
726
|
+
class: R(["component__dropdown-arrow", { open: p.value }])
|
|
727
727
|
}, "▼", 2)
|
|
728
|
-
], 46,
|
|
729
|
-
|
|
728
|
+
], 46, $t),
|
|
729
|
+
p.value ? (H(), $("div", {
|
|
730
730
|
key: 0,
|
|
731
|
-
class: R(["component__option-group",
|
|
731
|
+
class: R(["component__option-group", e(q)]),
|
|
732
732
|
role: "listbox"
|
|
733
733
|
}, [
|
|
734
|
-
|
|
734
|
+
e(m) ? (H(), $("div", {
|
|
735
735
|
key: 0,
|
|
736
736
|
"data-option-index-single": "0",
|
|
737
737
|
class: R(["component__option-item", {
|
|
738
|
-
disabled:
|
|
739
|
-
selected: !
|
|
738
|
+
disabled: e(d),
|
|
739
|
+
selected: !s.value || s.value === e(S)
|
|
740
740
|
}]),
|
|
741
|
-
tabindex:
|
|
741
|
+
tabindex: e(d) ? -1 : L.value === 0 ? 0 : -1,
|
|
742
742
|
role: "option",
|
|
743
|
-
"aria-selected": !
|
|
744
|
-
onClick: n[0] || (n[0] =
|
|
743
|
+
"aria-selected": !s.value || s.value === e(S),
|
|
744
|
+
onClick: n[0] || (n[0] = y((r) => !e(d) && Ke(e(S)), ["prevent"])),
|
|
745
745
|
onKeydown: [
|
|
746
|
-
n[1] || (n[1] =
|
|
747
|
-
n[2] || (n[2] =
|
|
748
|
-
n[3] || (n[3] =
|
|
749
|
-
n[4] || (n[4] =
|
|
750
|
-
n[5] || (n[5] =
|
|
746
|
+
n[1] || (n[1] = B(y((r) => !e(d) && e(fe) && Ke(e(S)), ["prevent"]), ["enter"])),
|
|
747
|
+
n[2] || (n[2] = B(y((r) => !e(d) && e(ce) && Ke(e(S)), ["prevent"]), ["space"])),
|
|
748
|
+
n[3] || (n[3] = B(y((r) => !e(d) && ze("down"), ["prevent"]), ["arrow-down"])),
|
|
749
|
+
n[4] || (n[4] = B(y((r) => !e(d) && ze("up"), ["prevent"]), ["arrow-up"])),
|
|
750
|
+
n[5] || (n[5] = B(y((r) => !e(d) && st(), ["prevent"]), ["escape"]))
|
|
751
751
|
]
|
|
752
752
|
}, [
|
|
753
|
-
|
|
754
|
-
], 42, It)) :
|
|
755
|
-
(
|
|
756
|
-
key:
|
|
757
|
-
"data-option-index-single":
|
|
753
|
+
w("span", Nt, ge(e(D)), 1)
|
|
754
|
+
], 42, It)) : Se("", !0),
|
|
755
|
+
(H(!0), $(ct, null, vt(e(k), (r, i) => (H(), $("div", {
|
|
756
|
+
key: i,
|
|
757
|
+
"data-option-index-single": e(m) ? i + 1 : i,
|
|
758
758
|
class: R(["component__option-item", {
|
|
759
|
-
disabled:
|
|
760
|
-
selected:
|
|
759
|
+
disabled: r.disabled || e(d),
|
|
760
|
+
selected: s.value === r[e(c)]
|
|
761
761
|
}]),
|
|
762
|
-
tabindex:
|
|
762
|
+
tabindex: r.disabled || e(d) ? -1 : L.value === (e(m) ? i + 1 : i) ? 0 : -1,
|
|
763
763
|
role: "option",
|
|
764
|
-
"aria-selected":
|
|
765
|
-
onClick:
|
|
764
|
+
"aria-selected": s.value === r[e(c)],
|
|
765
|
+
onClick: y((u) => !r.disabled && !e(d) && Ke(r[e(c)]), ["prevent"]),
|
|
766
766
|
onKeydown: [
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
767
|
+
B(y((u) => !r.disabled && !e(d) && e(fe) && Ke(r[e(c)]), ["prevent"]), ["enter"]),
|
|
768
|
+
B(y((u) => !r.disabled && !e(d) && e(ce) && Ke(r[e(c)]), ["prevent"]), ["space"]),
|
|
769
|
+
B(y((u) => !r.disabled && !e(d) && ze("down"), ["prevent"]), ["arrow-down"]),
|
|
770
|
+
B(y((u) => !r.disabled && !e(d) && ze("up"), ["prevent"]), ["arrow-up"]),
|
|
771
|
+
B(y((u) => !r.disabled && !e(d) && st(), ["prevent"]), ["escape"])
|
|
772
772
|
]
|
|
773
773
|
}, [
|
|
774
|
-
|
|
774
|
+
w("span", Lt, [
|
|
775
775
|
pt(a.$slots, "slot-select-item", {
|
|
776
|
-
propRow:
|
|
777
|
-
propIndex:
|
|
776
|
+
propRow: r,
|
|
777
|
+
propIndex: i
|
|
778
778
|
}, () => [
|
|
779
|
-
nt(ge(
|
|
779
|
+
nt(ge(r[e(j)]), 1)
|
|
780
780
|
], !0)
|
|
781
781
|
])
|
|
782
782
|
], 42, Et))), 128))
|
|
783
|
-
], 2)) :
|
|
783
|
+
], 2)) : Se("", !0)
|
|
784
784
|
], 2))
|
|
785
|
-
], 16,
|
|
786
|
-
], 38)) :
|
|
785
|
+
], 16, wt)
|
|
786
|
+
], 38)) : Se("", !0);
|
|
787
787
|
}
|
|
788
|
-
}), Yt = /* @__PURE__ */
|
|
789
|
-
const
|
|
788
|
+
}), Yt = /* @__PURE__ */ Ze(Xt, [["__scopeId", "data-v-45c313f1"]]);
|
|
789
|
+
const Mt = ["id"], qt = ["for", "tabindex"], Pt = ["id", "disabled"], Ut = ["id"], Gt = /* @__PURE__ */ Object.assign({
|
|
790
790
|
name: "NbToggle",
|
|
791
791
|
inheritAttrs: !1
|
|
792
792
|
}, {
|
|
@@ -799,20 +799,20 @@ const qt = ["id"], Mt = ["for", "tabindex"], Ut = ["id", "disabled"], Pt = ["id"
|
|
|
799
799
|
value: {
|
|
800
800
|
type: Boolean,
|
|
801
801
|
default: !1,
|
|
802
|
-
validator: (
|
|
802
|
+
validator: (t) => [!0, !1].includes(t)
|
|
803
803
|
},
|
|
804
804
|
display: {
|
|
805
805
|
type: String,
|
|
806
806
|
default: "ib",
|
|
807
|
-
validator: (
|
|
808
|
-
const
|
|
809
|
-
return ["b", "ib"].includes(
|
|
807
|
+
validator: (t = "ib") => {
|
|
808
|
+
const C = t ? t.toLowerCase() : "";
|
|
809
|
+
return ["b", "ib"].includes(C);
|
|
810
810
|
}
|
|
811
811
|
},
|
|
812
812
|
disabled: {
|
|
813
813
|
type: Boolean,
|
|
814
814
|
default: !1,
|
|
815
|
-
validator: (
|
|
815
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
816
816
|
},
|
|
817
817
|
tabIndex: {
|
|
818
818
|
type: Number,
|
|
@@ -837,9 +837,9 @@ const qt = ["id"], Mt = ["for", "tabindex"], Ut = ["id", "disabled"], Pt = ["id"
|
|
|
837
837
|
theme: {
|
|
838
838
|
type: String,
|
|
839
839
|
default: "light",
|
|
840
|
-
validator: (
|
|
841
|
-
const
|
|
842
|
-
return ["light", "dark"].includes(
|
|
840
|
+
validator: (t) => {
|
|
841
|
+
const C = t ? t.toLowerCase() : "";
|
|
842
|
+
return ["light", "dark"].includes(C);
|
|
843
843
|
}
|
|
844
844
|
},
|
|
845
845
|
// Cores do tema light
|
|
@@ -886,108 +886,108 @@ const qt = ["id"], Mt = ["for", "tabindex"], Ut = ["id", "disabled"], Pt = ["id"
|
|
|
886
886
|
}
|
|
887
887
|
},
|
|
888
888
|
emits: ["changed", "current-value", "clicked"],
|
|
889
|
-
setup(
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
a80063b0:
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
e917ec32:
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
889
|
+
setup(t, { emit: C }) {
|
|
890
|
+
Ue((I) => ({
|
|
891
|
+
36168618: D.value,
|
|
892
|
+
a80063b0: T.value,
|
|
893
|
+
"517ca11a": J.value,
|
|
894
|
+
"6cfafb4e": me.value,
|
|
895
|
+
e917ec32: Oe.value,
|
|
896
|
+
"7f1dd87e": Q.value,
|
|
897
|
+
"4de0195e": f.value,
|
|
898
|
+
"957d25b8": A.value,
|
|
899
|
+
"7a70f3f8": _e.value,
|
|
900
|
+
"6d305071": Te.value
|
|
901
901
|
}));
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
|
|
902
|
+
const g = C, U = t;
|
|
903
|
+
Ge(() => {
|
|
904
|
+
m.value = U.value, g("current-value", U.value);
|
|
905
905
|
});
|
|
906
906
|
const {
|
|
907
907
|
nbId: x,
|
|
908
|
-
value:
|
|
908
|
+
value: re,
|
|
909
909
|
display: he,
|
|
910
910
|
disabled: F,
|
|
911
|
-
tabIndex:
|
|
912
|
-
hasTabIndexEnter:
|
|
913
|
-
hasTabIndexSpace:
|
|
914
|
-
ariaLabel:
|
|
915
|
-
ariaAttrs:
|
|
916
|
-
theme:
|
|
917
|
-
lightSwitchColor:
|
|
911
|
+
tabIndex: ve,
|
|
912
|
+
hasTabIndexEnter: d,
|
|
913
|
+
hasTabIndexSpace: h,
|
|
914
|
+
ariaLabel: pe,
|
|
915
|
+
ariaAttrs: M,
|
|
916
|
+
theme: ue,
|
|
917
|
+
lightSwitchColor: te,
|
|
918
918
|
lightSwitchColorActive: le,
|
|
919
|
-
lightThumbColor:
|
|
920
|
-
lightThumbColorActive:
|
|
921
|
-
lightDisabledBgColor:
|
|
922
|
-
darkSwitchColor:
|
|
923
|
-
darkSwitchColorActive:
|
|
924
|
-
darkThumbColor:
|
|
925
|
-
darkThumbColorActive:
|
|
926
|
-
darkDisabledBgColor:
|
|
927
|
-
} =
|
|
928
|
-
const
|
|
919
|
+
lightThumbColor: ye,
|
|
920
|
+
lightThumbColorActive: Ce,
|
|
921
|
+
lightDisabledBgColor: k,
|
|
922
|
+
darkSwitchColor: ae,
|
|
923
|
+
darkSwitchColorActive: G,
|
|
924
|
+
darkThumbColor: j,
|
|
925
|
+
darkThumbColorActive: c,
|
|
926
|
+
darkDisabledBgColor: de
|
|
927
|
+
} = Je(U), m = ee(!1), S = o(() => {
|
|
928
|
+
const I = F.value ? "component-disabled" : "", W = he.value !== "b" ? "inline-block" : "block";
|
|
929
929
|
return {
|
|
930
|
-
disabled:
|
|
931
|
-
display:
|
|
930
|
+
disabled: I,
|
|
931
|
+
display: W
|
|
932
932
|
};
|
|
933
|
-
}),
|
|
934
|
-
display:
|
|
935
|
-
})),
|
|
936
|
-
const
|
|
937
|
-
|
|
938
|
-
const
|
|
939
|
-
"aria-label":
|
|
933
|
+
}), q = o(() => S.value.disabled), _ = o(() => ({
|
|
934
|
+
display: S.value.display
|
|
935
|
+
})), N = o(() => ue.value === "dark" ? "component__theme--dark" : "component__theme--light"), D = o(() => te.value), J = o(() => le.value), T = o(() => ye.value), me = o(() => Ce.value), Oe = o(() => k.value), Q = o(() => ae.value), A = o(() => G.value), f = o(() => j.value), _e = o(() => c.value), Te = o(() => de.value), Be = o(() => {
|
|
936
|
+
const I = {};
|
|
937
|
+
M.value && Object.keys(M.value).forEach((oe) => I[`aria-${oe}`] = M.value[oe]);
|
|
938
|
+
const W = {
|
|
939
|
+
"aria-label": pe.value,
|
|
940
940
|
"aria-disabled": F.value,
|
|
941
|
-
"aria-checked":
|
|
942
|
-
...
|
|
941
|
+
"aria-checked": m.value,
|
|
942
|
+
...I
|
|
943
943
|
};
|
|
944
944
|
return Object.fromEntries(
|
|
945
|
-
Object.entries(
|
|
945
|
+
Object.entries(W).filter(([Z, oe]) => oe != null)
|
|
946
946
|
);
|
|
947
|
-
}),
|
|
948
|
-
|
|
947
|
+
}), we = () => {
|
|
948
|
+
g("changed", m.value), g("current-value", m.value), g("clicked");
|
|
949
949
|
};
|
|
950
|
-
return be(
|
|
951
|
-
|
|
952
|
-
}), be(
|
|
953
|
-
|
|
954
|
-
}), (
|
|
950
|
+
return be(re, (I) => {
|
|
951
|
+
m.value = I;
|
|
952
|
+
}), be(m, (I) => {
|
|
953
|
+
g("current-value", I);
|
|
954
|
+
}), (I, W) => e(x) ? (H(), $("div", {
|
|
955
955
|
key: 0,
|
|
956
|
-
class: R(["nb-wrapper",
|
|
957
|
-
style:
|
|
956
|
+
class: R(["nb-wrapper", q.value]),
|
|
957
|
+
style: Re([_.value])
|
|
958
958
|
}, [
|
|
959
|
-
|
|
960
|
-
id:
|
|
961
|
-
class: ["nb-reset", "component", "component-toggle",
|
|
962
|
-
},
|
|
963
|
-
|
|
964
|
-
for: `toggle-input-${
|
|
959
|
+
w("div", Qe({
|
|
960
|
+
id: e(x),
|
|
961
|
+
class: ["nb-reset", "component", "component-toggle", N.value]
|
|
962
|
+
}, Be.value), [
|
|
963
|
+
w("label", {
|
|
964
|
+
for: `toggle-input-${e(x)}`,
|
|
965
965
|
class: "component-toggle__button",
|
|
966
|
-
tabindex:
|
|
966
|
+
tabindex: e(F) ? -1 : e(ve),
|
|
967
967
|
onKeydown: [
|
|
968
|
-
|
|
969
|
-
|
|
968
|
+
W[1] || (W[1] = B(y((Z) => !e(F) && e(d) && Z.target.click(), ["prevent"]), ["enter"])),
|
|
969
|
+
W[2] || (W[2] = B(y((Z) => !e(F) && e(h) && Z.target.click(), ["prevent"]), ["space"]))
|
|
970
970
|
]
|
|
971
971
|
}, [
|
|
972
|
-
|
|
973
|
-
id: `toggle-input-${
|
|
974
|
-
"onUpdate:modelValue":
|
|
972
|
+
lt(w("input", {
|
|
973
|
+
id: `toggle-input-${e(x)}`,
|
|
974
|
+
"onUpdate:modelValue": W[0] || (W[0] = (Z) => m.value = Z),
|
|
975
975
|
type: "checkbox",
|
|
976
|
-
disabled:
|
|
976
|
+
disabled: e(F),
|
|
977
977
|
class: "component-toggle__checkbox",
|
|
978
|
-
onChange:
|
|
979
|
-
}, null, 40,
|
|
980
|
-
[
|
|
978
|
+
onChange: we
|
|
979
|
+
}, null, 40, Pt), [
|
|
980
|
+
[at, m.value]
|
|
981
981
|
]),
|
|
982
|
-
|
|
983
|
-
id: `toggle-switch-${
|
|
982
|
+
w("div", {
|
|
983
|
+
id: `toggle-switch-${e(x)}`,
|
|
984
984
|
class: "component-toggle__switch"
|
|
985
|
-
}, null, 8,
|
|
986
|
-
], 40,
|
|
987
|
-
], 16,
|
|
988
|
-
], 6)) :
|
|
985
|
+
}, null, 8, Ut)
|
|
986
|
+
], 40, qt)
|
|
987
|
+
], 16, Mt)
|
|
988
|
+
], 6)) : Se("", !0);
|
|
989
989
|
}
|
|
990
|
-
}), Jt = /* @__PURE__ */
|
|
990
|
+
}), Jt = /* @__PURE__ */ Ze(Gt, [["__scopeId", "data-v-b08aed8b"]]);
|
|
991
991
|
const Qt = ["tabIndex"], Zt = ["id"], el = ["id", "disabled"], tl = ["for"], ll = {
|
|
992
992
|
key: 0,
|
|
993
993
|
class: "component-label-text"
|
|
@@ -1031,9 +1031,9 @@ const Qt = ["tabIndex"], Zt = ["id"], el = ["id", "disabled"], tl = ["for"], ll
|
|
|
1031
1031
|
theme: {
|
|
1032
1032
|
type: String,
|
|
1033
1033
|
default: "light",
|
|
1034
|
-
validator: (
|
|
1035
|
-
const
|
|
1036
|
-
return ["light", "dark"].includes(
|
|
1034
|
+
validator: (t) => {
|
|
1035
|
+
const C = t ? t.toLowerCase() : "";
|
|
1036
|
+
return ["light", "dark"].includes(C);
|
|
1037
1037
|
}
|
|
1038
1038
|
},
|
|
1039
1039
|
// Cores do tema light
|
|
@@ -1069,22 +1069,22 @@ const Qt = ["tabIndex"], Zt = ["id"], el = ["id", "disabled"], tl = ["for"], ll
|
|
|
1069
1069
|
width: {
|
|
1070
1070
|
type: Number,
|
|
1071
1071
|
default: 55,
|
|
1072
|
-
validator: (
|
|
1072
|
+
validator: (t) => t || 55
|
|
1073
1073
|
},
|
|
1074
1074
|
paddingX: {
|
|
1075
1075
|
type: Number,
|
|
1076
1076
|
default: 1,
|
|
1077
|
-
validator: (
|
|
1077
|
+
validator: (t) => t || 1
|
|
1078
1078
|
},
|
|
1079
1079
|
paddingY: {
|
|
1080
1080
|
type: Number,
|
|
1081
1081
|
default: 0.2,
|
|
1082
|
-
validator: (
|
|
1082
|
+
validator: (t) => t || 0.2
|
|
1083
1083
|
},
|
|
1084
1084
|
disabled: {
|
|
1085
1085
|
type: Boolean,
|
|
1086
1086
|
default: !1,
|
|
1087
|
-
validator: (
|
|
1087
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
1088
1088
|
},
|
|
1089
1089
|
fontFamily: {
|
|
1090
1090
|
type: String,
|
|
@@ -1093,17 +1093,17 @@ const Qt = ["tabIndex"], Zt = ["id"], el = ["id", "disabled"], tl = ["for"], ll
|
|
|
1093
1093
|
fontSize: {
|
|
1094
1094
|
type: String,
|
|
1095
1095
|
default: "1.6em",
|
|
1096
|
-
validator: (
|
|
1096
|
+
validator: (t) => t || "1.6em"
|
|
1097
1097
|
},
|
|
1098
1098
|
fontWeight: {
|
|
1099
1099
|
type: Number,
|
|
1100
1100
|
default: 200,
|
|
1101
|
-
validator: (
|
|
1101
|
+
validator: (t) => t || 200
|
|
1102
1102
|
},
|
|
1103
1103
|
hasAnimation: {
|
|
1104
1104
|
type: Boolean,
|
|
1105
1105
|
default: !1,
|
|
1106
|
-
validator: (
|
|
1106
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
1107
1107
|
},
|
|
1108
1108
|
textEnable: {
|
|
1109
1109
|
type: String,
|
|
@@ -1119,393 +1119,138 @@ const Qt = ["tabIndex"], Zt = ["id"], el = ["id", "disabled"], tl = ["for"], ll
|
|
|
1119
1119
|
}
|
|
1120
1120
|
},
|
|
1121
1121
|
emits: ["clicked", "current-value"],
|
|
1122
|
-
setup(
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1122
|
+
setup(t, { emit: C }) {
|
|
1123
|
+
Ue((O) => ({
|
|
1124
|
+
"66c1e5c7": me.value,
|
|
1125
|
+
"9ec62328": we.value,
|
|
1126
|
+
c236ac8a: I.value,
|
|
1127
|
+
"7a161959": Q.value,
|
|
1128
|
+
"47fd1498": A.value,
|
|
1129
|
+
"08265a94": f.value,
|
|
1130
|
+
d81636b2: _e.value,
|
|
1131
|
+
"0d4ab4fc": Te.value,
|
|
1132
|
+
"257f8a62": Be.value
|
|
1133
1133
|
}));
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1136
|
-
|
|
1134
|
+
const g = C;
|
|
1135
|
+
Ge(() => {
|
|
1136
|
+
He();
|
|
1137
1137
|
});
|
|
1138
|
-
const
|
|
1138
|
+
const U = t, {
|
|
1139
1139
|
nbId: x,
|
|
1140
|
-
value:
|
|
1140
|
+
value: re,
|
|
1141
1141
|
textEnable: he,
|
|
1142
1142
|
textDisable: F,
|
|
1143
|
-
hasAnimation:
|
|
1144
|
-
ariaLabel:
|
|
1145
|
-
ariaAttrs:
|
|
1146
|
-
theme:
|
|
1147
|
-
lightTextColor:
|
|
1148
|
-
lightButtonColor:
|
|
1149
|
-
lightTextBgColor:
|
|
1143
|
+
hasAnimation: ve,
|
|
1144
|
+
ariaLabel: d,
|
|
1145
|
+
ariaAttrs: h,
|
|
1146
|
+
theme: pe,
|
|
1147
|
+
lightTextColor: M,
|
|
1148
|
+
lightButtonColor: ue,
|
|
1149
|
+
lightTextBgColor: te,
|
|
1150
1150
|
darkTextColor: le,
|
|
1151
|
-
darkButtonColor:
|
|
1152
|
-
darkTextBgColor:
|
|
1153
|
-
borderRadius:
|
|
1154
|
-
width:
|
|
1155
|
-
paddingX:
|
|
1156
|
-
paddingY:
|
|
1157
|
-
disabled:
|
|
1158
|
-
fontFamily:
|
|
1159
|
-
fontSize:
|
|
1160
|
-
fontWeight:
|
|
1161
|
-
buttonSize:
|
|
1162
|
-
} =
|
|
1163
|
-
const
|
|
1151
|
+
darkButtonColor: ye,
|
|
1152
|
+
darkTextBgColor: Ce,
|
|
1153
|
+
borderRadius: k,
|
|
1154
|
+
width: ae,
|
|
1155
|
+
paddingX: G,
|
|
1156
|
+
paddingY: j,
|
|
1157
|
+
disabled: c,
|
|
1158
|
+
fontFamily: de,
|
|
1159
|
+
fontSize: m,
|
|
1160
|
+
fontWeight: S,
|
|
1161
|
+
buttonSize: q
|
|
1162
|
+
} = Je(U), _ = ee(!1), N = o(() => {
|
|
1163
|
+
const O = c.value ? "component-disabled" : "", z = "inline-block", ie = k.value !== 0 && !k.value || k.value < 0 ? 0 : k.value, se = !ae.value || ae.value < 55 ? 55 : ae.value, De = G.value !== 0 && !G.value || G.value < 0 ? 1 : G.value, Ie = j.value !== 0 && !j.value || j.value < 0 ? 0.2 : j.value, $e = de.value ? de.value : "'Lato', sans-serif", ke = m.value ? m.value : "1.6em", fe = S.value !== 0 && !S.value || S.value < 0 ? 200 : S.value, ce = q.value !== 0 && !q.value || q.value < 0 || q.value > 50 ? 30 : q.value;
|
|
1164
1164
|
return {
|
|
1165
|
-
disabled:
|
|
1166
|
-
display:
|
|
1167
|
-
borderRadius:
|
|
1168
|
-
width:
|
|
1169
|
-
paddingX:
|
|
1170
|
-
paddingY:
|
|
1165
|
+
disabled: O,
|
|
1166
|
+
display: z,
|
|
1167
|
+
borderRadius: ie,
|
|
1168
|
+
width: se,
|
|
1169
|
+
paddingX: De,
|
|
1170
|
+
paddingY: Ie,
|
|
1171
1171
|
font: $e,
|
|
1172
|
-
fontSize:
|
|
1172
|
+
fontSize: ke,
|
|
1173
1173
|
fontWeight: fe,
|
|
1174
|
-
buttonSize:
|
|
1174
|
+
buttonSize: ce
|
|
1175
1175
|
};
|
|
1176
|
-
}),
|
|
1177
|
-
display:
|
|
1178
|
-
})),
|
|
1179
|
-
const
|
|
1176
|
+
}), D = o(() => N.value.disabled), J = o(() => ({
|
|
1177
|
+
display: N.value.display
|
|
1178
|
+
})), T = o(() => {
|
|
1179
|
+
const O = N.value;
|
|
1180
1180
|
return {
|
|
1181
1181
|
minWidth: "33px",
|
|
1182
|
-
width: `${
|
|
1182
|
+
width: `${O.width}px`,
|
|
1183
1183
|
// padding: `${defaultValues.paddingY}rem ${defaultValues.paddingX}rem`,
|
|
1184
1184
|
lineHeight: "1.42857143",
|
|
1185
|
-
fontSize:
|
|
1186
|
-
fontWeight:
|
|
1185
|
+
fontSize: O.fontSize,
|
|
1186
|
+
fontWeight: O.fontWeight
|
|
1187
1187
|
};
|
|
1188
|
-
}), me = o(() =>
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1191
|
-
const
|
|
1192
|
-
"aria-label":
|
|
1193
|
-
"aria-checked":
|
|
1194
|
-
"aria-disabled":
|
|
1195
|
-
...
|
|
1188
|
+
}), me = o(() => N.value.font), Oe = o(() => pe.value === "dark" ? "component__theme--dark" : "component__theme--light"), Q = o(() => M.value), A = o(() => ue.value), f = o(() => te.value), _e = o(() => le.value), Te = o(() => ye.value), Be = o(() => Ce.value), we = o(() => `${N.value.buttonSize}%`), I = o(() => `${N.value.borderRadius}rem`), W = o(() => {
|
|
1189
|
+
const O = {};
|
|
1190
|
+
h.value && Object.keys(h.value).forEach((se) => O[`aria-${se}`] = h.value[se]);
|
|
1191
|
+
const z = {
|
|
1192
|
+
"aria-label": d.value,
|
|
1193
|
+
"aria-checked": _.value,
|
|
1194
|
+
"aria-disabled": c.value,
|
|
1195
|
+
...O
|
|
1196
1196
|
};
|
|
1197
1197
|
return Object.fromEntries(
|
|
1198
|
-
Object.entries(
|
|
1198
|
+
Object.entries(z).filter(([ie, se]) => se != null)
|
|
1199
1199
|
);
|
|
1200
|
-
}),
|
|
1201
|
-
|
|
1202
|
-
},
|
|
1203
|
-
|
|
1204
|
-
},
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1200
|
+
}), Z = () => {
|
|
1201
|
+
c.value || g("clicked");
|
|
1202
|
+
}, oe = () => {
|
|
1203
|
+
c.value || (_.value = !_.value, g("clicked"));
|
|
1204
|
+
}, He = () => {
|
|
1205
|
+
const O = re.value;
|
|
1206
|
+
_.value = O, g("current-value", O);
|
|
1207
1207
|
};
|
|
1208
|
-
return be(
|
|
1209
|
-
|
|
1210
|
-
}), be(
|
|
1211
|
-
|
|
1212
|
-
}), (
|
|
1208
|
+
return be(_, (O) => {
|
|
1209
|
+
g("current-value", O);
|
|
1210
|
+
}), be(re, () => {
|
|
1211
|
+
He();
|
|
1212
|
+
}), (O, z) => e(x) ? (H(), $("div", Qe({
|
|
1213
1213
|
key: 0,
|
|
1214
|
-
class: ["nb-wrapper",
|
|
1215
|
-
style: [
|
|
1216
|
-
tabIndex:
|
|
1214
|
+
class: ["nb-wrapper", D.value],
|
|
1215
|
+
style: [J.value],
|
|
1216
|
+
tabIndex: e(c) ? -1 : t.tabIndex,
|
|
1217
1217
|
role: "button"
|
|
1218
|
-
},
|
|
1218
|
+
}, W.value, {
|
|
1219
1219
|
onKeydown: [
|
|
1220
|
-
|
|
1221
|
-
|
|
1220
|
+
z[1] || (z[1] = B(y((ie) => !e(c) && t.hasTabIndexEnter && oe(), ["prevent"]), ["enter"])),
|
|
1221
|
+
z[2] || (z[2] = B(y((ie) => !e(c) && t.hasTabIndexSpace && oe(), ["prevent"]), ["space"]))
|
|
1222
1222
|
]
|
|
1223
1223
|
}), [
|
|
1224
|
-
|
|
1225
|
-
id:
|
|
1226
|
-
class: R(["nb-reset", "component",
|
|
1227
|
-
style:
|
|
1224
|
+
w("div", {
|
|
1225
|
+
id: e(x),
|
|
1226
|
+
class: R(["nb-reset", "component", Oe.value]),
|
|
1227
|
+
style: Re([T.value])
|
|
1228
1228
|
}, [
|
|
1229
|
-
|
|
1230
|
-
id: `${
|
|
1231
|
-
"onUpdate:modelValue":
|
|
1229
|
+
lt(w("input", {
|
|
1230
|
+
id: `${e(x)}-input`,
|
|
1231
|
+
"onUpdate:modelValue": z[0] || (z[0] = (ie) => _.value = ie),
|
|
1232
1232
|
type: "checkbox",
|
|
1233
|
-
disabled:
|
|
1233
|
+
disabled: e(c),
|
|
1234
1234
|
class: "component-input",
|
|
1235
|
-
onChange:
|
|
1235
|
+
onChange: Z
|
|
1236
1236
|
}, null, 40, el), [
|
|
1237
|
-
[
|
|
1237
|
+
[at, _.value]
|
|
1238
1238
|
]),
|
|
1239
|
-
|
|
1240
|
-
for: `${
|
|
1239
|
+
w("label", {
|
|
1240
|
+
for: `${e(x)}-input`,
|
|
1241
1241
|
class: R(["component-label", [
|
|
1242
|
-
|
|
1243
|
-
|
|
1242
|
+
_.value ? "component-button--left" : "component-button--right",
|
|
1243
|
+
e(ve) ? "component-label-text-animation" : ""
|
|
1244
1244
|
]])
|
|
1245
1245
|
}, [
|
|
1246
|
-
|
|
1247
|
-
|
|
1246
|
+
z[3] || (z[3] = w("div", { class: "component-label-button" }, null, -1)),
|
|
1247
|
+
_.value ? (H(), $("span", ll, ge(e(he)), 1)) : (H(), $("span", al, ge(e(F)), 1))
|
|
1248
1248
|
], 10, tl)
|
|
1249
1249
|
], 14, Zt)
|
|
1250
|
-
], 16, Qt)) :
|
|
1250
|
+
], 16, Qt)) : Se("", !0);
|
|
1251
1251
|
}
|
|
1252
|
-
}), nl = /* @__PURE__ */
|
|
1253
|
-
const rl = ["tabIndex"], ul = ["id"], dl = ["id", "disabled"],
|
|
1254
|
-
key: 0,
|
|
1255
|
-
class: "component-label-text"
|
|
1256
|
-
}, fl = {
|
|
1257
|
-
key: 1,
|
|
1258
|
-
class: "component-label-text"
|
|
1259
|
-
}, cl = /* @__PURE__ */ Object.assign({
|
|
1260
|
-
name: "NbToggleSlim",
|
|
1261
|
-
inheritAttrs: !1
|
|
1262
|
-
}, {
|
|
1263
|
-
__name: "NbToggleSlim",
|
|
1264
|
-
props: {
|
|
1265
|
-
nbId: {
|
|
1266
|
-
type: String,
|
|
1267
|
-
required: !0
|
|
1268
|
-
},
|
|
1269
|
-
value: {
|
|
1270
|
-
type: Boolean,
|
|
1271
|
-
default: !1
|
|
1272
|
-
},
|
|
1273
|
-
tabIndex: {
|
|
1274
|
-
type: Number,
|
|
1275
|
-
default: 0
|
|
1276
|
-
},
|
|
1277
|
-
hasTabIndexEnter: {
|
|
1278
|
-
type: Boolean,
|
|
1279
|
-
default: !0
|
|
1280
|
-
},
|
|
1281
|
-
hasTabIndexSpace: {
|
|
1282
|
-
type: Boolean,
|
|
1283
|
-
default: !0
|
|
1284
|
-
},
|
|
1285
|
-
ariaLabel: {
|
|
1286
|
-
type: String,
|
|
1287
|
-
default: "Alternate Text Button"
|
|
1288
|
-
},
|
|
1289
|
-
ariaAttrs: {
|
|
1290
|
-
type: Object,
|
|
1291
|
-
default: () => ({})
|
|
1292
|
-
},
|
|
1293
|
-
theme: {
|
|
1294
|
-
type: String,
|
|
1295
|
-
default: "light",
|
|
1296
|
-
validator: (e) => {
|
|
1297
|
-
const h = e ? e.toLowerCase() : "";
|
|
1298
|
-
return ["light", "dark"].includes(h);
|
|
1299
|
-
}
|
|
1300
|
-
},
|
|
1301
|
-
// Cores do tema light
|
|
1302
|
-
lightTextColor: {
|
|
1303
|
-
type: String,
|
|
1304
|
-
default: "#8e8e8e"
|
|
1305
|
-
},
|
|
1306
|
-
lightButtonColor: {
|
|
1307
|
-
type: String,
|
|
1308
|
-
default: "#eaeaea"
|
|
1309
|
-
},
|
|
1310
|
-
lightTextBgColor: {
|
|
1311
|
-
type: String,
|
|
1312
|
-
default: "#f8f8f2"
|
|
1313
|
-
},
|
|
1314
|
-
// Cores do tema dark
|
|
1315
|
-
darkTextColor: {
|
|
1316
|
-
type: String,
|
|
1317
|
-
default: "#e0e0e0"
|
|
1318
|
-
},
|
|
1319
|
-
darkButtonColor: {
|
|
1320
|
-
type: String,
|
|
1321
|
-
default: "#2d2d2d"
|
|
1322
|
-
},
|
|
1323
|
-
darkTextBgColor: {
|
|
1324
|
-
type: String,
|
|
1325
|
-
default: "#3d3d3d"
|
|
1326
|
-
},
|
|
1327
|
-
borderRadius: {
|
|
1328
|
-
type: Number,
|
|
1329
|
-
default: 0
|
|
1330
|
-
},
|
|
1331
|
-
width: {
|
|
1332
|
-
type: Number,
|
|
1333
|
-
default: 55,
|
|
1334
|
-
validator: (e) => e || 55
|
|
1335
|
-
},
|
|
1336
|
-
paddingX: {
|
|
1337
|
-
type: Number,
|
|
1338
|
-
default: 1,
|
|
1339
|
-
validator: (e) => e || 1
|
|
1340
|
-
},
|
|
1341
|
-
paddingY: {
|
|
1342
|
-
type: Number,
|
|
1343
|
-
default: 0.2,
|
|
1344
|
-
validator: (e) => e || 0.2
|
|
1345
|
-
},
|
|
1346
|
-
disabled: {
|
|
1347
|
-
type: Boolean,
|
|
1348
|
-
default: !1,
|
|
1349
|
-
validator: (e) => typeof e == "boolean" && [!0, !1].includes(e)
|
|
1350
|
-
},
|
|
1351
|
-
fontFamily: {
|
|
1352
|
-
type: String,
|
|
1353
|
-
default: "'Lato', sans-serif"
|
|
1354
|
-
},
|
|
1355
|
-
fontSize: {
|
|
1356
|
-
type: String,
|
|
1357
|
-
default: "1.6em",
|
|
1358
|
-
validator: (e) => e || "1.6em"
|
|
1359
|
-
},
|
|
1360
|
-
fontWeight: {
|
|
1361
|
-
type: Number,
|
|
1362
|
-
default: 200,
|
|
1363
|
-
validator: (e) => e || 200
|
|
1364
|
-
},
|
|
1365
|
-
textEnable: {
|
|
1366
|
-
type: String,
|
|
1367
|
-
default: "On"
|
|
1368
|
-
},
|
|
1369
|
-
textDisable: {
|
|
1370
|
-
type: String,
|
|
1371
|
-
default: "Off"
|
|
1372
|
-
},
|
|
1373
|
-
buttonSize: {
|
|
1374
|
-
type: Number,
|
|
1375
|
-
default: 30
|
|
1376
|
-
}
|
|
1377
|
-
},
|
|
1378
|
-
emits: ["clicked", "current-value"],
|
|
1379
|
-
setup(e, { emit: h }) {
|
|
1380
|
-
je((S) => ({
|
|
1381
|
-
v213ce03b: H.value,
|
|
1382
|
-
v7de0a378: Te.value,
|
|
1383
|
-
v2a0f4bc7: Be.value,
|
|
1384
|
-
v35bf2f36: xe.value,
|
|
1385
|
-
a4979c80: se.value,
|
|
1386
|
-
v4c4dd2c0: N.value,
|
|
1387
|
-
v6e1e841b: f.value,
|
|
1388
|
-
v20cb9014: ke.value,
|
|
1389
|
-
v1bbf1cd6: _e.value
|
|
1390
|
-
}));
|
|
1391
|
-
const p = h;
|
|
1392
|
-
Fe(() => {
|
|
1393
|
-
Q();
|
|
1394
|
-
});
|
|
1395
|
-
const G = e, {
|
|
1396
|
-
nbId: x,
|
|
1397
|
-
value: te,
|
|
1398
|
-
textEnable: he,
|
|
1399
|
-
textDisable: F,
|
|
1400
|
-
ariaLabel: ye,
|
|
1401
|
-
ariaAttrs: r,
|
|
1402
|
-
theme: y,
|
|
1403
|
-
lightTextColor: ce,
|
|
1404
|
-
lightButtonColor: J,
|
|
1405
|
-
lightTextBgColor: re,
|
|
1406
|
-
darkTextColor: ve,
|
|
1407
|
-
darkButtonColor: le,
|
|
1408
|
-
darkTextBgColor: Ce,
|
|
1409
|
-
borderRadius: ue,
|
|
1410
|
-
width: B,
|
|
1411
|
-
paddingX: q,
|
|
1412
|
-
paddingY: M,
|
|
1413
|
-
disabled: w,
|
|
1414
|
-
fontFamily: v,
|
|
1415
|
-
fontSize: ae,
|
|
1416
|
-
fontWeight: C,
|
|
1417
|
-
buttonSize: _
|
|
1418
|
-
} = Xe(G), $ = ne(!1), k = o(() => {
|
|
1419
|
-
const S = w.value ? "component-disabled" : "", i = "inline-block", V = !ue.value || ue.value < 0 ? 0 : ue.value, z = !B.value || B.value < 55 ? 55 : B.value, ie = !q.value || q.value < 0 ? 1 : q.value, He = !M.value || M.value < 0 ? 0.2 : M.value, Ae = v.value ? v.value : "'Lato', sans-serif", $e = ae.value ? ae.value : "1.6em", Oe = !C.value || C.value < 0 ? 200 : C.value, fe = !_.value || _.value < 0 || _.value > 50 ? 30 : _.value;
|
|
1420
|
-
return {
|
|
1421
|
-
disabled: S,
|
|
1422
|
-
display: i,
|
|
1423
|
-
borderRadius: V,
|
|
1424
|
-
width: z,
|
|
1425
|
-
paddingX: ie,
|
|
1426
|
-
paddingY: He,
|
|
1427
|
-
font: Ae,
|
|
1428
|
-
fontSize: $e,
|
|
1429
|
-
fontWeight: Oe,
|
|
1430
|
-
buttonSize: fe
|
|
1431
|
-
};
|
|
1432
|
-
}), W = o(() => k.value.disabled), K = o(() => ({
|
|
1433
|
-
display: k.value.display
|
|
1434
|
-
})), de = o(() => {
|
|
1435
|
-
const S = k.value;
|
|
1436
|
-
return {
|
|
1437
|
-
minWidth: "33px",
|
|
1438
|
-
width: `${S.width}px`,
|
|
1439
|
-
// padding: `${defaultValues.paddingY}rem ${defaultValues.paddingX}rem`,
|
|
1440
|
-
lineHeight: "1.42857143",
|
|
1441
|
-
fontSize: S.fontSize,
|
|
1442
|
-
fontWeight: S.fontWeight
|
|
1443
|
-
};
|
|
1444
|
-
}), H = o(() => k.value.font), me = o(() => y.value === "dark" ? "component__theme--dark" : "component__theme--light"), xe = o(() => ce.value), se = o(() => J.value), N = o(() => re.value), f = o(() => ve.value), ke = o(() => le.value), _e = o(() => Ce.value), Te = o(() => `${k.value.buttonSize}%`), Be = o(() => `${k.value.borderRadius}rem`), E = o(() => {
|
|
1445
|
-
const S = {};
|
|
1446
|
-
r.value && Object.keys(r.value).forEach((z) => S[`aria-${z}`] = r.value[z]);
|
|
1447
|
-
const i = {
|
|
1448
|
-
"aria-label": ye.value,
|
|
1449
|
-
"aria-checked": $.value,
|
|
1450
|
-
"aria-disabled": w.value,
|
|
1451
|
-
...S
|
|
1452
|
-
};
|
|
1453
|
-
return Object.fromEntries(
|
|
1454
|
-
Object.entries(i).filter(([V, z]) => z != null)
|
|
1455
|
-
);
|
|
1456
|
-
}), j = () => {
|
|
1457
|
-
w.value || p("clicked");
|
|
1458
|
-
}, U = () => {
|
|
1459
|
-
w.value || ($.value = !$.value, p("clicked"));
|
|
1460
|
-
}, Q = () => {
|
|
1461
|
-
const S = te.value;
|
|
1462
|
-
$.value = S, p("current-value", S);
|
|
1463
|
-
};
|
|
1464
|
-
return be($, (S) => {
|
|
1465
|
-
p("current-value", S);
|
|
1466
|
-
}), be(te, () => {
|
|
1467
|
-
Q();
|
|
1468
|
-
}), (S, i) => t(x) ? (A(), D("div", Ye({
|
|
1469
|
-
key: 0,
|
|
1470
|
-
class: ["nb-wrapper", W.value],
|
|
1471
|
-
style: [K.value],
|
|
1472
|
-
tabIndex: t(w) ? -1 : e.tabIndex,
|
|
1473
|
-
role: "button"
|
|
1474
|
-
}, E.value, {
|
|
1475
|
-
onKeydown: [
|
|
1476
|
-
i[1] || (i[1] = I(O((V) => !t(w) && e.hasTabIndexEnter && U(), ["prevent"]), ["enter"])),
|
|
1477
|
-
i[2] || (i[2] = I(O((V) => !t(w) && e.hasTabIndexSpace && U(), ["prevent"]), ["space"]))
|
|
1478
|
-
]
|
|
1479
|
-
}), [
|
|
1480
|
-
T("div", {
|
|
1481
|
-
id: t(x),
|
|
1482
|
-
class: R(["nb-reset", "component", me.value]),
|
|
1483
|
-
style: Ne([de.value])
|
|
1484
|
-
}, [
|
|
1485
|
-
et(T("input", {
|
|
1486
|
-
id: `${t(x)}-input`,
|
|
1487
|
-
"onUpdate:modelValue": i[0] || (i[0] = (V) => $.value = V),
|
|
1488
|
-
type: "checkbox",
|
|
1489
|
-
disabled: t(w),
|
|
1490
|
-
class: "component-input",
|
|
1491
|
-
onChange: j
|
|
1492
|
-
}, null, 40, dl), [
|
|
1493
|
-
[tt, $.value]
|
|
1494
|
-
]),
|
|
1495
|
-
T("label", {
|
|
1496
|
-
for: `${t(x)}-input`,
|
|
1497
|
-
class: R(["component-label", [
|
|
1498
|
-
$.value ? "component-button--left" : "component-button--right"
|
|
1499
|
-
]])
|
|
1500
|
-
}, [
|
|
1501
|
-
i[3] || (i[3] = T("div", { class: "component-label-button" }, null, -1)),
|
|
1502
|
-
$.value ? (A(), D("span", il, ge(t(he)), 1)) : (A(), D("span", fl, ge(t(F)), 1))
|
|
1503
|
-
], 10, sl)
|
|
1504
|
-
], 14, ul)
|
|
1505
|
-
], 16, rl)) : we("", !0);
|
|
1506
|
-
}
|
|
1507
|
-
}), vl = /* @__PURE__ */ qe(cl, [["__scopeId", "data-v-61896c9f"]]);
|
|
1508
|
-
const pl = ["tabIndex"], gl = ["id"], bl = ["id", "disabled"], hl = ["for", "data-tg-off", "data-tg-on"], yl = /* @__PURE__ */ Object.assign({
|
|
1252
|
+
}), nl = /* @__PURE__ */ Ze(ol, [["__scopeId", "data-v-18844377"]]);
|
|
1253
|
+
const rl = ["tabIndex"], ul = ["id"], dl = ["id", "disabled"], il = ["for", "data-tg-off", "data-tg-on"], sl = /* @__PURE__ */ Object.assign({
|
|
1509
1254
|
name: "NbToggleFlip",
|
|
1510
1255
|
inheritAttrs: !1
|
|
1511
1256
|
}, {
|
|
@@ -1542,9 +1287,9 @@ const pl = ["tabIndex"], gl = ["id"], bl = ["id", "disabled"], hl = ["for", "dat
|
|
|
1542
1287
|
theme: {
|
|
1543
1288
|
type: String,
|
|
1544
1289
|
default: "light",
|
|
1545
|
-
validator: (
|
|
1546
|
-
const
|
|
1547
|
-
return ["light", "dark"].includes(
|
|
1290
|
+
validator: (t) => {
|
|
1291
|
+
const C = t ? t.toLowerCase() : "";
|
|
1292
|
+
return ["light", "dark"].includes(C);
|
|
1548
1293
|
}
|
|
1549
1294
|
},
|
|
1550
1295
|
// Cores do tema light
|
|
@@ -1620,22 +1365,22 @@ const pl = ["tabIndex"], gl = ["id"], bl = ["id", "disabled"], hl = ["for", "dat
|
|
|
1620
1365
|
width: {
|
|
1621
1366
|
type: Number,
|
|
1622
1367
|
default: 86,
|
|
1623
|
-
validator: (
|
|
1368
|
+
validator: (t) => t || 86
|
|
1624
1369
|
},
|
|
1625
1370
|
paddingX: {
|
|
1626
1371
|
type: Number,
|
|
1627
1372
|
default: 1,
|
|
1628
|
-
validator: (
|
|
1373
|
+
validator: (t) => t || 1
|
|
1629
1374
|
},
|
|
1630
1375
|
paddingY: {
|
|
1631
1376
|
type: Number,
|
|
1632
1377
|
default: 0.2,
|
|
1633
|
-
validator: (
|
|
1378
|
+
validator: (t) => t || 0.2
|
|
1634
1379
|
},
|
|
1635
1380
|
disabled: {
|
|
1636
1381
|
type: Boolean,
|
|
1637
1382
|
default: !1,
|
|
1638
|
-
validator: (
|
|
1383
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
1639
1384
|
},
|
|
1640
1385
|
fontFamily: {
|
|
1641
1386
|
type: String,
|
|
@@ -1644,12 +1389,12 @@ const pl = ["tabIndex"], gl = ["id"], bl = ["id", "disabled"], hl = ["for", "dat
|
|
|
1644
1389
|
fontSize: {
|
|
1645
1390
|
type: String,
|
|
1646
1391
|
default: "1.6em",
|
|
1647
|
-
validator: (
|
|
1392
|
+
validator: (t) => t || "1.6em"
|
|
1648
1393
|
},
|
|
1649
1394
|
fontWeight: {
|
|
1650
1395
|
type: Number,
|
|
1651
1396
|
default: 400,
|
|
1652
|
-
validator: (
|
|
1397
|
+
validator: (t) => t || 200
|
|
1653
1398
|
},
|
|
1654
1399
|
textEnable: {
|
|
1655
1400
|
type: String,
|
|
@@ -1661,88 +1406,88 @@ const pl = ["tabIndex"], gl = ["id"], bl = ["id", "disabled"], hl = ["for", "dat
|
|
|
1661
1406
|
}
|
|
1662
1407
|
},
|
|
1663
1408
|
emits: ["clicked", "current-value"],
|
|
1664
|
-
setup(
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1409
|
+
setup(t, { emit: C }) {
|
|
1410
|
+
Ue((l) => ({
|
|
1411
|
+
"3a607faa": we.value,
|
|
1412
|
+
c937f50a: Z.value,
|
|
1413
|
+
"67ce84b4": W.value,
|
|
1414
|
+
"588dd2fa": ie.value,
|
|
1415
|
+
"13a7ed5d": O.value,
|
|
1416
|
+
"000bd262": De.value,
|
|
1417
|
+
"29a67b66": z.value,
|
|
1418
|
+
e9750430: Ie.value,
|
|
1419
|
+
"1274f1c2": oe.value,
|
|
1420
|
+
"3c2947a2": He.value,
|
|
1421
|
+
"8da6e898": se.value
|
|
1677
1422
|
}));
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1680
|
-
|
|
1423
|
+
const g = C;
|
|
1424
|
+
Ge(() => {
|
|
1425
|
+
ce();
|
|
1681
1426
|
});
|
|
1682
|
-
const
|
|
1427
|
+
const U = t, {
|
|
1683
1428
|
nbId: x,
|
|
1684
|
-
value:
|
|
1429
|
+
value: re,
|
|
1685
1430
|
textEnable: he,
|
|
1686
1431
|
textDisable: F,
|
|
1687
|
-
ariaLabel:
|
|
1688
|
-
ariaAttrs:
|
|
1689
|
-
theme:
|
|
1690
|
-
lightButtonColorOn:
|
|
1691
|
-
lightButtonColorOff:
|
|
1692
|
-
lightButtonColorOnHover:
|
|
1693
|
-
lightButtonColorOffHover:
|
|
1432
|
+
ariaLabel: ve,
|
|
1433
|
+
ariaAttrs: d,
|
|
1434
|
+
theme: h,
|
|
1435
|
+
lightButtonColorOn: pe,
|
|
1436
|
+
lightButtonColorOff: M,
|
|
1437
|
+
lightButtonColorOnHover: ue,
|
|
1438
|
+
lightButtonColorOffHover: te,
|
|
1694
1439
|
lightTextColorOn: le,
|
|
1695
|
-
lightTextColorOff:
|
|
1696
|
-
lightTextColorOnHover:
|
|
1697
|
-
lightTextColorOffHover:
|
|
1698
|
-
darkButtonColorOn:
|
|
1699
|
-
darkButtonColorOff:
|
|
1700
|
-
darkButtonColorOnHover:
|
|
1701
|
-
darkButtonColorOffHover:
|
|
1702
|
-
darkTextColorOn:
|
|
1703
|
-
darkTextColorOff:
|
|
1704
|
-
darkTextColorOnHover:
|
|
1705
|
-
darkTextColorOffHover:
|
|
1706
|
-
borderRadius:
|
|
1707
|
-
width:
|
|
1708
|
-
paddingX:
|
|
1709
|
-
paddingY:
|
|
1710
|
-
disabled:
|
|
1440
|
+
lightTextColorOff: ye,
|
|
1441
|
+
lightTextColorOnHover: Ce,
|
|
1442
|
+
lightTextColorOffHover: k,
|
|
1443
|
+
darkButtonColorOn: ae,
|
|
1444
|
+
darkButtonColorOff: G,
|
|
1445
|
+
darkButtonColorOnHover: j,
|
|
1446
|
+
darkButtonColorOffHover: c,
|
|
1447
|
+
darkTextColorOn: de,
|
|
1448
|
+
darkTextColorOff: m,
|
|
1449
|
+
darkTextColorOnHover: S,
|
|
1450
|
+
darkTextColorOffHover: q,
|
|
1451
|
+
borderRadius: _,
|
|
1452
|
+
width: N,
|
|
1453
|
+
paddingX: D,
|
|
1454
|
+
paddingY: J,
|
|
1455
|
+
disabled: T,
|
|
1711
1456
|
fontFamily: me,
|
|
1712
|
-
fontSize:
|
|
1713
|
-
fontWeight:
|
|
1714
|
-
} =
|
|
1715
|
-
const l =
|
|
1457
|
+
fontSize: Oe,
|
|
1458
|
+
fontWeight: Q
|
|
1459
|
+
} = Je(U), A = ee(!1), f = o(() => {
|
|
1460
|
+
const l = T.value ? "component-disabled" : "", v = "inline-block", s = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, V = !N.value || N.value < 86 ? 86 : N.value, Ne = D.value !== 0 && !D.value || D.value < 0 ? 1 : D.value, b = J.value !== 0 && !J.value || J.value < 0 ? 0.2 : J.value, p = me.value ? me.value : "'Lato', sans-serif", Ee = Oe.value ? Oe.value : "1.6em", Ve = Q.value !== 0 && !Q.value || Q.value < 0 ? 200 : Q.value, E = pe.value ? pe.value : "#f8f8f2", X = M.value ? M.value : "#d5d5d5", L = ue.value ? ue.value : "#e8e8e2", P = te.value ? te.value : "#c0c0c0", ne = le.value ? le.value : "#4a4a4a", xe = ye.value ? ye.value : "#909090", Fe = Ce.value ? Ce.value : "#3a3a3a", je = k.value ? k.value : "#707070", Xe = ae.value ? ae.value : "#3d3d3d", Ye = G.value ? G.value : "#1d1d1d", Me = j.value ? j.value : "#4d4d4d", We = c.value ? c.value : "#2d2d2d", Le = de.value ? de.value : "#f8f8f8", qe = m.value ? m.value : "#909090", Pe = S.value ? S.value : "#ffffff", Ae = q.value ? q.value : "#b0b0b0";
|
|
1716
1461
|
return {
|
|
1717
1462
|
disabled: l,
|
|
1718
|
-
display:
|
|
1719
|
-
lightButtonColorOn:
|
|
1720
|
-
lightButtonColorOff:
|
|
1721
|
-
lightButtonColorOnHover:
|
|
1722
|
-
lightButtonColorOffHover:
|
|
1723
|
-
lightTextColorOn:
|
|
1724
|
-
lightTextColorOff:
|
|
1725
|
-
lightTextColorOnHover:
|
|
1726
|
-
lightTextColorOffHover:
|
|
1727
|
-
darkButtonColorOn:
|
|
1728
|
-
darkButtonColorOff:
|
|
1729
|
-
darkButtonColorOnHover:
|
|
1730
|
-
darkButtonColorOffHover:
|
|
1731
|
-
darkTextColorOn:
|
|
1732
|
-
darkTextColorOff:
|
|
1733
|
-
darkTextColorOnHover:
|
|
1734
|
-
darkTextColorOffHover:
|
|
1735
|
-
borderRadius:
|
|
1736
|
-
width:
|
|
1737
|
-
paddingX:
|
|
1738
|
-
paddingY:
|
|
1739
|
-
font:
|
|
1740
|
-
fontSize:
|
|
1741
|
-
fontWeight:
|
|
1463
|
+
display: v,
|
|
1464
|
+
lightButtonColorOn: E,
|
|
1465
|
+
lightButtonColorOff: X,
|
|
1466
|
+
lightButtonColorOnHover: L,
|
|
1467
|
+
lightButtonColorOffHover: P,
|
|
1468
|
+
lightTextColorOn: ne,
|
|
1469
|
+
lightTextColorOff: xe,
|
|
1470
|
+
lightTextColorOnHover: Fe,
|
|
1471
|
+
lightTextColorOffHover: je,
|
|
1472
|
+
darkButtonColorOn: Xe,
|
|
1473
|
+
darkButtonColorOff: Ye,
|
|
1474
|
+
darkButtonColorOnHover: Me,
|
|
1475
|
+
darkButtonColorOffHover: We,
|
|
1476
|
+
darkTextColorOn: Le,
|
|
1477
|
+
darkTextColorOff: qe,
|
|
1478
|
+
darkTextColorOnHover: Pe,
|
|
1479
|
+
darkTextColorOffHover: Ae,
|
|
1480
|
+
borderRadius: s,
|
|
1481
|
+
width: V,
|
|
1482
|
+
paddingX: Ne,
|
|
1483
|
+
paddingY: b,
|
|
1484
|
+
font: p,
|
|
1485
|
+
fontSize: Ee,
|
|
1486
|
+
fontWeight: Ve
|
|
1742
1487
|
};
|
|
1743
|
-
}),
|
|
1488
|
+
}), _e = o(() => f.value.disabled), Te = o(() => ({
|
|
1744
1489
|
display: f.value.display
|
|
1745
|
-
})),
|
|
1490
|
+
})), Be = o(() => {
|
|
1746
1491
|
const l = f.value;
|
|
1747
1492
|
return {
|
|
1748
1493
|
minWidth: "33px",
|
|
@@ -1751,95 +1496,95 @@ const pl = ["tabIndex"], gl = ["id"], bl = ["id", "disabled"], hl = ["for", "dat
|
|
|
1751
1496
|
fontSize: l.fontSize,
|
|
1752
1497
|
fontWeight: l.fontWeight
|
|
1753
1498
|
};
|
|
1754
|
-
}),
|
|
1499
|
+
}), we = o(() => f.value.font), I = o(() => h.value === "dark" ? "component__theme--dark" : "component__theme--light"), W = o(() => `${f.value.borderRadius}rem`), Z = o(() => {
|
|
1755
1500
|
const l = f.value;
|
|
1756
1501
|
return `${l.paddingY}rem ${l.paddingX}rem`;
|
|
1757
|
-
}),
|
|
1502
|
+
}), oe = o(() => {
|
|
1758
1503
|
const l = f.value;
|
|
1759
|
-
return
|
|
1760
|
-
}),
|
|
1761
|
-
const l = f.value;
|
|
1762
|
-
return y.value === "light" ? l.lightTextColorOff : l.darkTextColorOff;
|
|
1763
|
-
}), i = o(() => {
|
|
1504
|
+
return h.value === "light" ? l.lightTextColorOn : l.darkTextColorOn;
|
|
1505
|
+
}), He = o(() => {
|
|
1764
1506
|
const l = f.value;
|
|
1765
|
-
return
|
|
1766
|
-
}),
|
|
1507
|
+
return h.value === "light" ? l.lightTextColorOff : l.darkTextColorOff;
|
|
1508
|
+
}), O = o(() => {
|
|
1767
1509
|
const l = f.value;
|
|
1768
|
-
return
|
|
1510
|
+
return h.value === "light" ? l.lightTextColorOnHover : l.darkTextColorOnHover;
|
|
1769
1511
|
}), z = o(() => {
|
|
1770
1512
|
const l = f.value;
|
|
1771
|
-
return
|
|
1513
|
+
return h.value === "light" ? l.lightTextColorOffHover : l.darkTextColorOffHover;
|
|
1772
1514
|
}), ie = o(() => {
|
|
1773
1515
|
const l = f.value;
|
|
1774
|
-
return
|
|
1775
|
-
}),
|
|
1516
|
+
return h.value === "light" ? l.lightButtonColorOn : l.darkButtonColorOn;
|
|
1517
|
+
}), se = o(() => {
|
|
1776
1518
|
const l = f.value;
|
|
1777
|
-
return
|
|
1778
|
-
}),
|
|
1519
|
+
return h.value === "light" ? l.lightButtonColorOff : l.darkButtonColorOff;
|
|
1520
|
+
}), De = o(() => {
|
|
1779
1521
|
const l = f.value;
|
|
1780
|
-
return
|
|
1522
|
+
return h.value === "light" ? l.lightButtonColorOnHover : l.darkButtonColorOnHover;
|
|
1523
|
+
}), Ie = o(() => {
|
|
1524
|
+
const l = f.value;
|
|
1525
|
+
return h.value === "light" ? l.lightButtonColorOffHover : l.darkButtonColorOffHover;
|
|
1781
1526
|
}), $e = o(() => {
|
|
1782
1527
|
const l = {};
|
|
1783
|
-
|
|
1784
|
-
const
|
|
1785
|
-
"aria-label":
|
|
1786
|
-
"aria-disabled":
|
|
1528
|
+
d.value && Object.keys(d.value).forEach((V) => l[`aria-${V}`] = d.value[V]);
|
|
1529
|
+
const v = {
|
|
1530
|
+
"aria-label": ve.value,
|
|
1531
|
+
"aria-disabled": T.value,
|
|
1787
1532
|
...l
|
|
1788
1533
|
};
|
|
1789
1534
|
return Object.fromEntries(
|
|
1790
|
-
Object.entries(
|
|
1535
|
+
Object.entries(v).filter(([s, V]) => V != null)
|
|
1791
1536
|
);
|
|
1792
|
-
}),
|
|
1793
|
-
|
|
1537
|
+
}), ke = () => {
|
|
1538
|
+
T.value || g("clicked");
|
|
1794
1539
|
}, fe = () => {
|
|
1795
|
-
|
|
1796
|
-
},
|
|
1797
|
-
const l =
|
|
1798
|
-
|
|
1540
|
+
T.value || (A.value = !A.value, g("clicked"));
|
|
1541
|
+
}, ce = () => {
|
|
1542
|
+
const l = re.value;
|
|
1543
|
+
A.value = l, g("current-value", l);
|
|
1799
1544
|
};
|
|
1800
|
-
return be(
|
|
1801
|
-
|
|
1802
|
-
}), be(
|
|
1803
|
-
|
|
1804
|
-
}), (l,
|
|
1545
|
+
return be(A, (l) => {
|
|
1546
|
+
g("current-value", l);
|
|
1547
|
+
}), be(re, () => {
|
|
1548
|
+
ce();
|
|
1549
|
+
}), (l, v) => e(x) ? (H(), $("div", Qe({
|
|
1805
1550
|
key: 0,
|
|
1806
|
-
class: ["nb-wrapper",
|
|
1807
|
-
style: [
|
|
1808
|
-
tabIndex:
|
|
1551
|
+
class: ["nb-wrapper", _e.value],
|
|
1552
|
+
style: [Te.value],
|
|
1553
|
+
tabIndex: e(T) ? -1 : t.tabIndex,
|
|
1809
1554
|
role: "button"
|
|
1810
1555
|
}, $e.value, {
|
|
1811
|
-
onClick:
|
|
1556
|
+
onClick: v[1] || (v[1] = (...s) => l.interacted && l.interacted(...s)),
|
|
1812
1557
|
onKeydown: [
|
|
1813
|
-
|
|
1814
|
-
|
|
1558
|
+
v[2] || (v[2] = B(y((s) => !e(T) && t.hasTabIndexEnter && fe(), ["prevent"]), ["enter"])),
|
|
1559
|
+
v[3] || (v[3] = B(y((s) => !e(T) && t.hasTabIndexSpace && fe(), ["prevent"]), ["space"]))
|
|
1815
1560
|
]
|
|
1816
1561
|
}), [
|
|
1817
|
-
|
|
1818
|
-
id:
|
|
1819
|
-
class: R(["nb-reset", "component",
|
|
1820
|
-
style:
|
|
1562
|
+
w("div", {
|
|
1563
|
+
id: e(x),
|
|
1564
|
+
class: R(["nb-reset", "component", I.value]),
|
|
1565
|
+
style: Re([Be.value])
|
|
1821
1566
|
}, [
|
|
1822
|
-
|
|
1823
|
-
id: `${
|
|
1824
|
-
"onUpdate:modelValue":
|
|
1567
|
+
lt(w("input", {
|
|
1568
|
+
id: `${e(x)}-input`,
|
|
1569
|
+
"onUpdate:modelValue": v[0] || (v[0] = (s) => A.value = s),
|
|
1825
1570
|
type: "checkbox",
|
|
1826
|
-
disabled:
|
|
1571
|
+
disabled: e(T),
|
|
1827
1572
|
class: R(["component__input", "component__input--flip"]),
|
|
1828
|
-
onChange:
|
|
1829
|
-
}, null, 40,
|
|
1830
|
-
[
|
|
1573
|
+
onChange: ke
|
|
1574
|
+
}, null, 40, dl), [
|
|
1575
|
+
[at, A.value]
|
|
1831
1576
|
]),
|
|
1832
|
-
|
|
1833
|
-
for: `${
|
|
1577
|
+
w("label", {
|
|
1578
|
+
for: `${e(x)}-input`,
|
|
1834
1579
|
class: "component__button",
|
|
1835
|
-
"data-tg-off":
|
|
1836
|
-
"data-tg-on":
|
|
1837
|
-
}, ge(
|
|
1838
|
-
], 14,
|
|
1839
|
-
], 16,
|
|
1580
|
+
"data-tg-off": e(F),
|
|
1581
|
+
"data-tg-on": e(he)
|
|
1582
|
+
}, ge(A.value ? e(he) : e(F)), 9, il)
|
|
1583
|
+
], 14, ul)
|
|
1584
|
+
], 16, rl)) : Se("", !0);
|
|
1840
1585
|
}
|
|
1841
|
-
}),
|
|
1842
|
-
const
|
|
1586
|
+
}), fl = /* @__PURE__ */ Ze(sl, [["__scopeId", "data-v-2baeb465"]]);
|
|
1587
|
+
const cl = ["tabIndex"], vl = ["id"], pl = ["id", "disabled"], gl = ["for", "data-tg-off", "data-tg-on"], bl = /* @__PURE__ */ Object.assign({
|
|
1843
1588
|
name: "NbToggleSkewed",
|
|
1844
1589
|
inheritAttrs: !1
|
|
1845
1590
|
}, {
|
|
@@ -1876,9 +1621,9 @@ const ml = ["tabIndex"], xl = ["id"], Sl = ["id", "disabled"], Ol = ["for", "dat
|
|
|
1876
1621
|
theme: {
|
|
1877
1622
|
type: String,
|
|
1878
1623
|
default: "light",
|
|
1879
|
-
validator: (
|
|
1880
|
-
const
|
|
1881
|
-
return ["light", "dark"].includes(
|
|
1624
|
+
validator: (t) => {
|
|
1625
|
+
const C = t ? t.toLowerCase() : "";
|
|
1626
|
+
return ["light", "dark"].includes(C);
|
|
1882
1627
|
}
|
|
1883
1628
|
},
|
|
1884
1629
|
// Cores do tema light
|
|
@@ -1954,22 +1699,22 @@ const ml = ["tabIndex"], xl = ["id"], Sl = ["id", "disabled"], Ol = ["for", "dat
|
|
|
1954
1699
|
width: {
|
|
1955
1700
|
type: Number,
|
|
1956
1701
|
default: 86,
|
|
1957
|
-
validator: (
|
|
1702
|
+
validator: (t) => t || 86
|
|
1958
1703
|
},
|
|
1959
1704
|
paddingX: {
|
|
1960
1705
|
type: Number,
|
|
1961
1706
|
default: 1,
|
|
1962
|
-
validator: (
|
|
1707
|
+
validator: (t) => t || 1
|
|
1963
1708
|
},
|
|
1964
1709
|
paddingY: {
|
|
1965
1710
|
type: Number,
|
|
1966
1711
|
default: 0.2,
|
|
1967
|
-
validator: (
|
|
1712
|
+
validator: (t) => t || 0.2
|
|
1968
1713
|
},
|
|
1969
1714
|
disabled: {
|
|
1970
1715
|
type: Boolean,
|
|
1971
1716
|
default: !1,
|
|
1972
|
-
validator: (
|
|
1717
|
+
validator: (t) => typeof t == "boolean" && [!0, !1].includes(t)
|
|
1973
1718
|
},
|
|
1974
1719
|
fontFamily: {
|
|
1975
1720
|
type: String,
|
|
@@ -1978,12 +1723,12 @@ const ml = ["tabIndex"], xl = ["id"], Sl = ["id", "disabled"], Ol = ["for", "dat
|
|
|
1978
1723
|
fontSize: {
|
|
1979
1724
|
type: String,
|
|
1980
1725
|
default: "1.6em",
|
|
1981
|
-
validator: (
|
|
1726
|
+
validator: (t) => t || "1.6em"
|
|
1982
1727
|
},
|
|
1983
1728
|
fontWeight: {
|
|
1984
1729
|
type: Number,
|
|
1985
1730
|
default: 400,
|
|
1986
|
-
validator: (
|
|
1731
|
+
validator: (t) => t || 200
|
|
1987
1732
|
},
|
|
1988
1733
|
textEnable: {
|
|
1989
1734
|
type: String,
|
|
@@ -1995,88 +1740,88 @@ const ml = ["tabIndex"], xl = ["id"], Sl = ["id", "disabled"], Ol = ["for", "dat
|
|
|
1995
1740
|
}
|
|
1996
1741
|
},
|
|
1997
1742
|
emits: ["clicked", "current-value"],
|
|
1998
|
-
setup(
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1743
|
+
setup(t, { emit: C }) {
|
|
1744
|
+
Ue((l) => ({
|
|
1745
|
+
"8438e198": we.value,
|
|
1746
|
+
"496829f6": Z.value,
|
|
1747
|
+
"9ceaf52c": W.value,
|
|
1748
|
+
"4651e904": ie.value,
|
|
1749
|
+
af141ad0: De.value,
|
|
1750
|
+
"2968a313": O.value,
|
|
1751
|
+
f829922c: se.value,
|
|
1752
|
+
"2ba75ce5": He.value,
|
|
1753
|
+
"1fc1371c": Ie.value,
|
|
1754
|
+
e4fa7952: z.value,
|
|
1755
|
+
e468d0ae: oe.value
|
|
2011
1756
|
}));
|
|
2012
|
-
const
|
|
2013
|
-
|
|
2014
|
-
|
|
1757
|
+
const g = C;
|
|
1758
|
+
Ge(() => {
|
|
1759
|
+
ce();
|
|
2015
1760
|
});
|
|
2016
|
-
const
|
|
1761
|
+
const U = t, {
|
|
2017
1762
|
nbId: x,
|
|
2018
|
-
value:
|
|
1763
|
+
value: re,
|
|
2019
1764
|
textEnable: he,
|
|
2020
1765
|
textDisable: F,
|
|
2021
|
-
ariaLabel:
|
|
2022
|
-
ariaAttrs:
|
|
2023
|
-
theme:
|
|
2024
|
-
lightButtonColorOn:
|
|
2025
|
-
lightButtonColorOff:
|
|
2026
|
-
lightButtonColorOnHover:
|
|
2027
|
-
lightButtonColorOffHover:
|
|
1766
|
+
ariaLabel: ve,
|
|
1767
|
+
ariaAttrs: d,
|
|
1768
|
+
theme: h,
|
|
1769
|
+
lightButtonColorOn: pe,
|
|
1770
|
+
lightButtonColorOff: M,
|
|
1771
|
+
lightButtonColorOnHover: ue,
|
|
1772
|
+
lightButtonColorOffHover: te,
|
|
2028
1773
|
lightTextColorOn: le,
|
|
2029
|
-
lightTextColorOff:
|
|
2030
|
-
lightTextColorOnHover:
|
|
2031
|
-
lightTextColorOffHover:
|
|
2032
|
-
darkButtonColorOn:
|
|
2033
|
-
darkButtonColorOff:
|
|
2034
|
-
darkButtonColorOnHover:
|
|
2035
|
-
darkButtonColorOffHover:
|
|
2036
|
-
darkTextColorOn:
|
|
2037
|
-
darkTextColorOff:
|
|
2038
|
-
darkTextColorOnHover:
|
|
2039
|
-
darkTextColorOffHover:
|
|
2040
|
-
borderRadius:
|
|
2041
|
-
width:
|
|
2042
|
-
paddingX:
|
|
2043
|
-
paddingY:
|
|
2044
|
-
disabled:
|
|
1774
|
+
lightTextColorOff: ye,
|
|
1775
|
+
lightTextColorOnHover: Ce,
|
|
1776
|
+
lightTextColorOffHover: k,
|
|
1777
|
+
darkButtonColorOn: ae,
|
|
1778
|
+
darkButtonColorOff: G,
|
|
1779
|
+
darkButtonColorOnHover: j,
|
|
1780
|
+
darkButtonColorOffHover: c,
|
|
1781
|
+
darkTextColorOn: de,
|
|
1782
|
+
darkTextColorOff: m,
|
|
1783
|
+
darkTextColorOnHover: S,
|
|
1784
|
+
darkTextColorOffHover: q,
|
|
1785
|
+
borderRadius: _,
|
|
1786
|
+
width: N,
|
|
1787
|
+
paddingX: D,
|
|
1788
|
+
paddingY: J,
|
|
1789
|
+
disabled: T,
|
|
2045
1790
|
fontFamily: me,
|
|
2046
|
-
fontSize:
|
|
2047
|
-
fontWeight:
|
|
2048
|
-
} =
|
|
2049
|
-
const l =
|
|
1791
|
+
fontSize: Oe,
|
|
1792
|
+
fontWeight: Q
|
|
1793
|
+
} = Je(U), A = ee(!1), f = o(() => {
|
|
1794
|
+
const l = T.value ? "component-disabled" : "", v = "inline-block", s = _.value !== 0 && !_.value || _.value < 0 ? 0 : _.value, V = N.value !== 0 && !N.value || N.value < 86 ? 86 : N.value, Ne = D.value !== 0 && !D.value || D.value < 0 ? 1 : D.value, b = J.value !== 0 && !J.value || J.value < 0 ? 0.2 : J.value, p = me.value ? me.value : "'Lato', sans-serif", Ee = Oe.value ? Oe.value : "1.6em", Ve = Q.value !== 0 && !Q.value || Q.value < 0 ? 200 : Q.value, E = pe.value ? pe.value : "#f8f8f2", X = M.value ? M.value : "#d5d5d5", L = ue.value ? ue.value : "#e8e8e2", P = te.value ? te.value : "#c0c0c0", ne = le.value ? le.value : "#4a4a4a", xe = ye.value ? ye.value : "#909090", Fe = Ce.value ? Ce.value : "#3a3a3a", je = k.value ? k.value : "#707070", Xe = ae.value ? ae.value : "#3d3d3d", Ye = G.value ? G.value : "#1d1d1d", Me = j.value ? j.value : "#4d4d4d", We = c.value ? c.value : "#2d2d2d", Le = de.value ? de.value : "#f8f8f8", qe = m.value ? m.value : "#909090", Pe = S.value ? S.value : "#ffffff", Ae = q.value ? q.value : "#b0b0b0";
|
|
2050
1795
|
return {
|
|
2051
1796
|
disabled: l,
|
|
2052
|
-
display:
|
|
2053
|
-
lightButtonColorOn:
|
|
2054
|
-
lightButtonColorOff:
|
|
2055
|
-
lightButtonColorOnHover:
|
|
2056
|
-
lightButtonColorOffHover:
|
|
2057
|
-
lightTextColorOn:
|
|
2058
|
-
lightTextColorOff:
|
|
2059
|
-
lightTextColorOnHover:
|
|
2060
|
-
lightTextColorOffHover:
|
|
2061
|
-
darkButtonColorOn:
|
|
2062
|
-
darkButtonColorOff:
|
|
2063
|
-
darkButtonColorOnHover:
|
|
2064
|
-
darkButtonColorOffHover:
|
|
2065
|
-
darkTextColorOn:
|
|
2066
|
-
darkTextColorOff:
|
|
2067
|
-
darkTextColorOnHover:
|
|
2068
|
-
darkTextColorOffHover:
|
|
2069
|
-
borderRadius:
|
|
2070
|
-
width:
|
|
2071
|
-
paddingX:
|
|
2072
|
-
paddingY:
|
|
2073
|
-
font:
|
|
2074
|
-
fontSize:
|
|
2075
|
-
fontWeight:
|
|
1797
|
+
display: v,
|
|
1798
|
+
lightButtonColorOn: E,
|
|
1799
|
+
lightButtonColorOff: X,
|
|
1800
|
+
lightButtonColorOnHover: L,
|
|
1801
|
+
lightButtonColorOffHover: P,
|
|
1802
|
+
lightTextColorOn: ne,
|
|
1803
|
+
lightTextColorOff: xe,
|
|
1804
|
+
lightTextColorOnHover: Fe,
|
|
1805
|
+
lightTextColorOffHover: je,
|
|
1806
|
+
darkButtonColorOn: Xe,
|
|
1807
|
+
darkButtonColorOff: Ye,
|
|
1808
|
+
darkButtonColorOnHover: Me,
|
|
1809
|
+
darkButtonColorOffHover: We,
|
|
1810
|
+
darkTextColorOn: Le,
|
|
1811
|
+
darkTextColorOff: qe,
|
|
1812
|
+
darkTextColorOnHover: Pe,
|
|
1813
|
+
darkTextColorOffHover: Ae,
|
|
1814
|
+
borderRadius: s,
|
|
1815
|
+
width: V,
|
|
1816
|
+
paddingX: Ne,
|
|
1817
|
+
paddingY: b,
|
|
1818
|
+
font: p,
|
|
1819
|
+
fontSize: Ee,
|
|
1820
|
+
fontWeight: Ve
|
|
2076
1821
|
};
|
|
2077
|
-
}),
|
|
1822
|
+
}), _e = o(() => f.value.disabled), Te = o(() => ({
|
|
2078
1823
|
display: f.value.display
|
|
2079
|
-
})),
|
|
1824
|
+
})), Be = o(() => {
|
|
2080
1825
|
const l = f.value;
|
|
2081
1826
|
return {
|
|
2082
1827
|
minWidth: "33px",
|
|
@@ -2085,102 +1830,102 @@ const ml = ["tabIndex"], xl = ["id"], Sl = ["id", "disabled"], Ol = ["for", "dat
|
|
|
2085
1830
|
fontSize: l.fontSize,
|
|
2086
1831
|
fontWeight: l.fontWeight
|
|
2087
1832
|
};
|
|
2088
|
-
}),
|
|
1833
|
+
}), we = o(() => f.value.font), I = o(() => h.value === "dark" ? "component__theme--dark" : "component__theme--light"), W = o(() => `${f.value.borderRadius}rem`), Z = o(() => {
|
|
2089
1834
|
const l = f.value;
|
|
2090
1835
|
return `${l.paddingY}rem ${l.paddingX}rem`;
|
|
2091
|
-
}),
|
|
2092
|
-
const l = f.value;
|
|
2093
|
-
return y.value === "light" ? l.lightTextColorOn : l.darkTextColorOn;
|
|
2094
|
-
}), S = o(() => {
|
|
1836
|
+
}), oe = o(() => {
|
|
2095
1837
|
const l = f.value;
|
|
2096
|
-
return
|
|
2097
|
-
}),
|
|
1838
|
+
return h.value === "light" ? l.lightTextColorOn : l.darkTextColorOn;
|
|
1839
|
+
}), He = o(() => {
|
|
2098
1840
|
const l = f.value;
|
|
2099
|
-
return
|
|
2100
|
-
}),
|
|
1841
|
+
return h.value === "light" ? l.lightTextColorOff : l.darkTextColorOff;
|
|
1842
|
+
}), O = o(() => {
|
|
2101
1843
|
const l = f.value;
|
|
2102
|
-
return
|
|
1844
|
+
return h.value === "light" ? l.lightTextColorOnHover : l.darkTextColorOnHover;
|
|
2103
1845
|
}), z = o(() => {
|
|
2104
1846
|
const l = f.value;
|
|
2105
|
-
return
|
|
1847
|
+
return h.value === "light" ? l.lightTextColorOffHover : l.darkTextColorOffHover;
|
|
2106
1848
|
}), ie = o(() => {
|
|
2107
1849
|
const l = f.value;
|
|
2108
|
-
return
|
|
2109
|
-
}),
|
|
1850
|
+
return h.value === "light" ? l.lightButtonColorOn : l.darkButtonColorOn;
|
|
1851
|
+
}), se = o(() => {
|
|
1852
|
+
const l = f.value;
|
|
1853
|
+
return h.value === "light" ? l.lightButtonColorOff : l.darkButtonColorOff;
|
|
1854
|
+
}), De = o(() => {
|
|
2110
1855
|
const l = f.value;
|
|
2111
|
-
return
|
|
2112
|
-
}),
|
|
1856
|
+
return h.value === "light" ? l.lightButtonColorOnHover : l.darkButtonColorOnHover;
|
|
1857
|
+
}), Ie = o(() => {
|
|
2113
1858
|
const l = f.value;
|
|
2114
|
-
return
|
|
1859
|
+
return h.value === "light" ? l.lightButtonColorOffHover : l.darkButtonColorOffHover;
|
|
2115
1860
|
}), $e = o(() => {
|
|
2116
1861
|
const l = {};
|
|
2117
|
-
|
|
2118
|
-
const
|
|
2119
|
-
"aria-label":
|
|
2120
|
-
"aria-disabled":
|
|
1862
|
+
d.value && Object.keys(d.value).forEach((V) => l[`aria-${V}`] = d.value[V]);
|
|
1863
|
+
const v = {
|
|
1864
|
+
"aria-label": ve.value,
|
|
1865
|
+
"aria-disabled": T.value,
|
|
2121
1866
|
...l
|
|
2122
1867
|
};
|
|
2123
1868
|
return Object.fromEntries(
|
|
2124
|
-
Object.entries(
|
|
1869
|
+
Object.entries(v).filter(([s, V]) => V != null)
|
|
2125
1870
|
);
|
|
2126
|
-
}),
|
|
2127
|
-
|
|
1871
|
+
}), ke = () => {
|
|
1872
|
+
T.value || g("clicked");
|
|
2128
1873
|
}, fe = () => {
|
|
2129
|
-
|
|
2130
|
-
},
|
|
2131
|
-
const l =
|
|
2132
|
-
|
|
1874
|
+
T.value || (A.value = !A.value, g("clicked"));
|
|
1875
|
+
}, ce = () => {
|
|
1876
|
+
const l = re.value;
|
|
1877
|
+
A.value = l, g("current-value", l);
|
|
2133
1878
|
};
|
|
2134
|
-
return be(
|
|
2135
|
-
|
|
2136
|
-
}), be(
|
|
2137
|
-
|
|
2138
|
-
}), (l,
|
|
1879
|
+
return be(A, (l) => {
|
|
1880
|
+
g("current-value", l);
|
|
1881
|
+
}), be(re, () => {
|
|
1882
|
+
ce();
|
|
1883
|
+
}), (l, v) => e(x) ? (H(), $("div", Qe({
|
|
2139
1884
|
key: 0,
|
|
2140
|
-
class: ["nb-wrapper",
|
|
2141
|
-
style: [
|
|
2142
|
-
tabIndex:
|
|
1885
|
+
class: ["nb-wrapper", _e.value],
|
|
1886
|
+
style: [Te.value],
|
|
1887
|
+
tabIndex: e(T) ? -1 : t.tabIndex,
|
|
2143
1888
|
role: "button"
|
|
2144
1889
|
}, $e.value, {
|
|
2145
|
-
onClick:
|
|
1890
|
+
onClick: v[1] || (v[1] = (...s) => l.interacted && l.interacted(...s)),
|
|
2146
1891
|
onKeydown: [
|
|
2147
|
-
|
|
2148
|
-
|
|
1892
|
+
v[2] || (v[2] = B(y((s) => !e(T) && t.hasTabIndexEnter && fe(), ["prevent"]), ["enter"])),
|
|
1893
|
+
v[3] || (v[3] = B(y((s) => !e(T) && t.hasTabIndexSpace && fe(), ["prevent"]), ["space"]))
|
|
2149
1894
|
]
|
|
2150
1895
|
}), [
|
|
2151
|
-
|
|
2152
|
-
id:
|
|
2153
|
-
class: R(["nb-reset", "component",
|
|
2154
|
-
style:
|
|
1896
|
+
w("div", {
|
|
1897
|
+
id: e(x),
|
|
1898
|
+
class: R(["nb-reset", "component", I.value]),
|
|
1899
|
+
style: Re([Be.value])
|
|
2155
1900
|
}, [
|
|
2156
|
-
|
|
2157
|
-
id: `${
|
|
2158
|
-
"onUpdate:modelValue":
|
|
1901
|
+
lt(w("input", {
|
|
1902
|
+
id: `${e(x)}-input`,
|
|
1903
|
+
"onUpdate:modelValue": v[0] || (v[0] = (s) => A.value = s),
|
|
2159
1904
|
type: "checkbox",
|
|
2160
|
-
disabled:
|
|
1905
|
+
disabled: e(T),
|
|
2161
1906
|
class: R(["component__input", "component__input--skewed"]),
|
|
2162
|
-
onChange:
|
|
2163
|
-
}, null, 40,
|
|
2164
|
-
[
|
|
1907
|
+
onChange: ke
|
|
1908
|
+
}, null, 40, pl), [
|
|
1909
|
+
[at, A.value]
|
|
2165
1910
|
]),
|
|
2166
|
-
|
|
2167
|
-
for: `${
|
|
1911
|
+
w("label", {
|
|
1912
|
+
for: `${e(x)}-input`,
|
|
2168
1913
|
class: "component__button",
|
|
2169
|
-
"data-tg-off":
|
|
2170
|
-
"data-tg-on":
|
|
2171
|
-
}, ge(
|
|
2172
|
-
], 14,
|
|
2173
|
-
], 16,
|
|
1914
|
+
"data-tg-off": e(F),
|
|
1915
|
+
"data-tg-on": e(he)
|
|
1916
|
+
}, ge(A.value ? e(he) : e(F)), 9, gl)
|
|
1917
|
+
], 14, vl)
|
|
1918
|
+
], 16, cl)) : Se("", !0);
|
|
2174
1919
|
}
|
|
2175
|
-
}),
|
|
2176
|
-
install(
|
|
2177
|
-
for (const
|
|
2178
|
-
if (Object.prototype.hasOwnProperty.call(rt,
|
|
2179
|
-
const
|
|
2180
|
-
|
|
1920
|
+
}), hl = /* @__PURE__ */ Ze(bl, [["__scopeId", "data-v-f66db036"]]), rt = { NbSelect: Yt, NbToggle: Jt, NbToggleLight: nl, NbToggleFlip: fl, NbToggleSkewed: hl }, Cl = {
|
|
1921
|
+
install(t) {
|
|
1922
|
+
for (const C in rt)
|
|
1923
|
+
if (Object.prototype.hasOwnProperty.call(rt, C)) {
|
|
1924
|
+
const g = rt[C];
|
|
1925
|
+
t.component(g.name, g);
|
|
2181
1926
|
}
|
|
2182
1927
|
}
|
|
2183
1928
|
};
|
|
2184
1929
|
export {
|
|
2185
|
-
|
|
1930
|
+
Cl as default
|
|
2186
1931
|
};
|