@vlalg-nimbus/nb-selects 1.0.2 → 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 +443 -443
- 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,8 +1,8 @@
|
|
|
1
|
-
import { useCssVars as Ue, unref as e, onMounted as Ge, onUnmounted as Bt, toRefs as Je, ref as
|
|
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
2
|
const Ze = (t, C) => {
|
|
3
3
|
const g = t.__vccOpts || t;
|
|
4
|
-
for (const [
|
|
5
|
-
g[
|
|
4
|
+
for (const [U, x] of C)
|
|
5
|
+
g[U] = x;
|
|
6
6
|
return g;
|
|
7
7
|
}, wt = ["id"], Vt = ["for"], Ht = {
|
|
8
8
|
key: 0,
|
|
@@ -267,98 +267,98 @@ const Ze = (t, C) => {
|
|
|
267
267
|
emits: ["clicked", "changed", "user-changed"],
|
|
268
268
|
setup(t, { emit: C }) {
|
|
269
269
|
Ue((a) => ({
|
|
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
|
-
|
|
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
295
|
})), Ge(() => {
|
|
296
|
-
|
|
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
298
|
document.removeEventListener("click", ut), document.removeEventListener("nbselect:close-all", it);
|
|
299
299
|
});
|
|
300
|
-
const g = C,
|
|
300
|
+
const g = C, U = t, {
|
|
301
301
|
display: x,
|
|
302
|
-
textColor:
|
|
303
|
-
theme:
|
|
302
|
+
textColor: re,
|
|
303
|
+
theme: he,
|
|
304
304
|
hasBorderRadius: F,
|
|
305
|
-
borderRadius:
|
|
305
|
+
borderRadius: ve,
|
|
306
306
|
disabled: d,
|
|
307
307
|
fontFamily: h,
|
|
308
|
-
fontSize:
|
|
309
|
-
fontWeight:
|
|
310
|
-
textAlign:
|
|
311
|
-
selectWidth:
|
|
312
|
-
inputStyle:
|
|
308
|
+
fontSize: pe,
|
|
309
|
+
fontWeight: M,
|
|
310
|
+
textAlign: ue,
|
|
311
|
+
selectWidth: te,
|
|
312
|
+
inputStyle: le,
|
|
313
313
|
selectName: ye,
|
|
314
314
|
required: Ce,
|
|
315
|
-
options:
|
|
316
|
-
selectedOptionOnly:
|
|
317
|
-
selectedOptionMultiple:
|
|
318
|
-
textKey:
|
|
315
|
+
options: k,
|
|
316
|
+
selectedOptionOnly: ae,
|
|
317
|
+
selectedOptionMultiple: G,
|
|
318
|
+
textKey: j,
|
|
319
319
|
valueKey: c,
|
|
320
|
-
multiple:
|
|
320
|
+
multiple: de,
|
|
321
321
|
hasEmptyOption: m,
|
|
322
|
-
emptyOptionValue:
|
|
323
|
-
dropdownScrollClass:
|
|
324
|
-
hasLabel:
|
|
325
|
-
labelText:
|
|
326
|
-
emptyOptionText:
|
|
327
|
-
lightBgColor:
|
|
328
|
-
lightBgColorFocus:
|
|
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
330
|
lightBorderColorFocus: Oe,
|
|
331
|
-
lightDisabledBgColor:
|
|
331
|
+
lightDisabledBgColor: Q,
|
|
332
332
|
lightTextColor: A,
|
|
333
333
|
lightDisabledBorderColor: f,
|
|
334
334
|
lightOptionTextColor: _e,
|
|
335
335
|
lightOptionTextColorSelected: Te,
|
|
336
336
|
lightOptionBgColorSelected: Be,
|
|
337
337
|
lightPlaceholderColor: we,
|
|
338
|
-
darkBgColor:
|
|
338
|
+
darkBgColor: I,
|
|
339
339
|
darkBgColorFocus: W,
|
|
340
|
-
darkBorderColor:
|
|
341
|
-
darkBorderColorFocus:
|
|
340
|
+
darkBorderColor: Z,
|
|
341
|
+
darkBorderColorFocus: oe,
|
|
342
342
|
darkDisabledBgColor: He,
|
|
343
343
|
darkTextColor: O,
|
|
344
344
|
darkDisabledBorderColor: z,
|
|
345
|
-
darkOptionTextColor:
|
|
346
|
-
darkOptionTextColorSelected:
|
|
345
|
+
darkOptionTextColor: ie,
|
|
346
|
+
darkOptionTextColorSelected: se,
|
|
347
347
|
darkOptionBgColorSelected: De,
|
|
348
348
|
darkPlaceholderColor: Ie,
|
|
349
349
|
tabindex: $e,
|
|
350
350
|
tabIndex: ke,
|
|
351
|
-
hasTabIndexEnter:
|
|
352
|
-
hasTabIndexSpace:
|
|
351
|
+
hasTabIndexEnter: fe,
|
|
352
|
+
hasTabIndexSpace: ce,
|
|
353
353
|
ariaLabel: l,
|
|
354
354
|
ariaAttrs: v
|
|
355
|
-
} = Je(
|
|
356
|
-
get: () => Array.isArray(
|
|
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
360
|
}), xe = o(() => {
|
|
361
|
-
const a = d.value ? "component-disabled" : "", n = x.value !== "b" ? "inline-block" : "block", r =
|
|
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,
|
|
@@ -391,14 +391,14 @@ const Ze = (t, C) => {
|
|
|
391
391
|
const a = xe.value;
|
|
392
392
|
return a.inputStyle !== "line" && a.hasBorderRadius ? { borderRadius: `${a.borderRadius}rem` } : {};
|
|
393
393
|
}), qe = o(() => {
|
|
394
|
-
switch (
|
|
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
|
-
switch (
|
|
401
|
+
switch (le.value) {
|
|
402
402
|
case "line":
|
|
403
403
|
return "component__input--line";
|
|
404
404
|
case "border":
|
|
@@ -407,15 +407,15 @@ const Ze = (t, C) => {
|
|
|
407
407
|
return "component__input--background";
|
|
408
408
|
}
|
|
409
409
|
}), Ae = (a) => {
|
|
410
|
-
const n =
|
|
410
|
+
const n = k.value.map((u, K) => ({
|
|
411
411
|
value: u[c.value],
|
|
412
412
|
disabled: u.disabled || d.value,
|
|
413
413
|
index: K
|
|
414
414
|
}));
|
|
415
415
|
if (n.filter((u) => !u.disabled).length === 0)
|
|
416
416
|
return;
|
|
417
|
-
let i =
|
|
418
|
-
if (i < 0 &&
|
|
417
|
+
let i = P.value;
|
|
418
|
+
if (i < 0 && k.value.length > 0 && (i = 0), a === "down") {
|
|
419
419
|
let u = (i + 1) % n.length, K = 0;
|
|
420
420
|
for (; n[u].disabled && K < n.length; )
|
|
421
421
|
u = (u + 1) % n.length, K++;
|
|
@@ -426,7 +426,7 @@ const Ze = (t, C) => {
|
|
|
426
426
|
u = u <= 0 ? n.length - 1 : u - 1, K++;
|
|
427
427
|
n[u].disabled || (i = u);
|
|
428
428
|
}
|
|
429
|
-
|
|
429
|
+
P.value = i, Y(() => {
|
|
430
430
|
const u = document.querySelector(`[data-option-index-multiple="${i}"]`);
|
|
431
431
|
u && u.focus();
|
|
432
432
|
});
|
|
@@ -434,10 +434,10 @@ const Ze = (t, C) => {
|
|
|
434
434
|
if (!d.value) {
|
|
435
435
|
a.stopPropagation();
|
|
436
436
|
const n = b.value;
|
|
437
|
-
b.value = !b.value, !n && b.value ? (dt(),
|
|
438
|
-
const r = document.querySelector(`[data-option-index-multiple="${
|
|
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
439
|
r && r.focus();
|
|
440
|
-
}))) : b.value || (
|
|
440
|
+
}))) : b.value || (P.value = -1);
|
|
441
441
|
}
|
|
442
442
|
}, ut = (a) => {
|
|
443
443
|
a.target.closest(".component__dropdown") || (b.value = !1, p.value = !1);
|
|
@@ -445,29 +445,29 @@ const Ze = (t, C) => {
|
|
|
445
445
|
var n;
|
|
446
446
|
(b.value || p.value) && !((n = Ee.value) != null && n.contains(a.relatedTarget)) && setTimeout(() => {
|
|
447
447
|
var r;
|
|
448
|
-
Ve.value || (r = Ee.value) != null && r.contains(document.activeElement) || (b.value && (b.value = !1,
|
|
449
|
-
|
|
450
|
-
})), p.value && (p.value = !1,
|
|
451
|
-
|
|
448
|
+
Ve.value || (r = Ee.value) != null && r.contains(document.activeElement) || (b.value && (b.value = !1, P.value = -1, Y(() => {
|
|
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) !==
|
|
460
|
+
((n = a.detail) == null ? void 0 : n.excludeId) !== U.nbId && (b.value && (b.value = !1), p.value && (p.value = !1));
|
|
461
461
|
}, ze = (a) => {
|
|
462
462
|
const n = [];
|
|
463
|
-
if (m.value && n.push({ value:
|
|
463
|
+
if (m.value && n.push({ value: S.value, disabled: d.value, index: 0 }), n.push(...k.value.map((u, K) => ({
|
|
464
464
|
value: u[c.value],
|
|
465
465
|
disabled: u.disabled || d.value,
|
|
466
466
|
index: m.value ? K + 1 : K
|
|
467
467
|
}))), n.filter((u) => !u.disabled).length === 0)
|
|
468
468
|
return;
|
|
469
|
-
let i =
|
|
470
|
-
if (i < 0 && (i = m.value ||
|
|
469
|
+
let i = L.value;
|
|
470
|
+
if (i < 0 && (i = m.value || k.value.length > 0 ? 0 : -1), a === "down") {
|
|
471
471
|
let u = (i + 1) % n.length, K = 0;
|
|
472
472
|
for (; n[u].disabled && K < n.length; )
|
|
473
473
|
u = (u + 1) % n.length, K++;
|
|
@@ -478,56 +478,56 @@ const Ze = (t, C) => {
|
|
|
478
478
|
u = u <= 0 ? n.length - 1 : u - 1, K++;
|
|
479
479
|
n[u].disabled || (i = u);
|
|
480
480
|
}
|
|
481
|
-
|
|
481
|
+
L.value = i, Y(() => {
|
|
482
482
|
const u = document.querySelector(`[data-option-index-single="${i}"]`);
|
|
483
483
|
u && u.focus();
|
|
484
484
|
});
|
|
485
485
|
}, st = () => {
|
|
486
|
-
!d.value && p.value && (p.value = !1,
|
|
487
|
-
|
|
486
|
+
!d.value && p.value && (p.value = !1, L.value = -1, Y(() => {
|
|
487
|
+
E.value && E.value.focus();
|
|
488
488
|
}));
|
|
489
489
|
}, bt = () => {
|
|
490
|
-
!d.value && b.value && (b.value = !1,
|
|
491
|
-
|
|
490
|
+
!d.value && b.value && (b.value = !1, P.value = -1, Y(() => {
|
|
491
|
+
X.value && X.value.focus();
|
|
492
492
|
}));
|
|
493
493
|
}, tt = (a) => {
|
|
494
494
|
if (!d.value) {
|
|
495
495
|
a.stopPropagation();
|
|
496
496
|
const n = p.value;
|
|
497
|
-
p.value = !p.value, !n && p.value ? (dt(),
|
|
498
|
-
const r = document.querySelector(`[data-option-index-single="${
|
|
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
499
|
r && r.focus();
|
|
500
|
-
})) : p.value || (
|
|
500
|
+
})) : p.value || (L.value = -1);
|
|
501
501
|
}
|
|
502
502
|
}, Ke = (a) => {
|
|
503
|
-
d.value || (Ve.value = !0, s.value = a, p.value = !1,
|
|
504
|
-
Ve.value = !1,
|
|
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 (!s.value || s.value ===
|
|
510
|
-
return
|
|
511
|
-
const a =
|
|
509
|
+
if (!s.value || s.value === S.value)
|
|
510
|
+
return D.value;
|
|
511
|
+
const a = k.value.find(
|
|
512
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
521
|
if (d.value)
|
|
522
522
|
return;
|
|
523
523
|
Ve.value = !0;
|
|
524
|
-
const n = [...
|
|
524
|
+
const n = [...ne.value];
|
|
525
525
|
if (n.includes(a)) {
|
|
526
526
|
const r = n.filter((i) => i !== a);
|
|
527
|
-
|
|
527
|
+
ne.value = r;
|
|
528
528
|
} else
|
|
529
|
-
|
|
530
|
-
ft(
|
|
529
|
+
ne.value = [...n, a];
|
|
530
|
+
ft(ne.value), setTimeout(() => {
|
|
531
531
|
Ve.value = !1;
|
|
532
532
|
}, 150);
|
|
533
533
|
}, ft = (a) => {
|
|
@@ -556,26 +556,26 @@ const Ze = (t, C) => {
|
|
|
556
556
|
}
|
|
557
557
|
switch (a.key) {
|
|
558
558
|
case "Enter":
|
|
559
|
-
|
|
560
|
-
|
|
559
|
+
fe.value && (a.preventDefault(), p.value ? (p.value = !1, L.value = -1, Y(() => {
|
|
560
|
+
E.value && E.value.focus();
|
|
561
561
|
})) : tt(a));
|
|
562
562
|
break;
|
|
563
563
|
case " ":
|
|
564
|
-
|
|
565
|
-
|
|
564
|
+
ce.value && (a.preventDefault(), p.value ? (p.value = !1, L.value = -1, Y(() => {
|
|
565
|
+
E.value && E.value.focus();
|
|
566
566
|
})) : tt(a));
|
|
567
567
|
break;
|
|
568
568
|
case "Escape":
|
|
569
|
-
p.value && (a.preventDefault(), p.value = !1,
|
|
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
574
|
a.preventDefault(), p.value || tt(a);
|
|
575
575
|
break;
|
|
576
576
|
case "ArrowUp":
|
|
577
|
-
a.preventDefault(), p.value && (p.value = !1,
|
|
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
|
}
|
|
@@ -593,190 +593,190 @@ const Ze = (t, C) => {
|
|
|
593
593
|
}
|
|
594
594
|
switch (a.key) {
|
|
595
595
|
case "Enter":
|
|
596
|
-
|
|
597
|
-
|
|
596
|
+
fe.value && (a.preventDefault(), b.value ? (b.value = !1, P.value = -1, Y(() => {
|
|
597
|
+
X.value && X.value.focus();
|
|
598
598
|
})) : et(a));
|
|
599
599
|
break;
|
|
600
600
|
case " ":
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
ce.value && (a.preventDefault(), b.value ? (b.value = !1, P.value = -1, Y(() => {
|
|
602
|
+
X.value && X.value.focus();
|
|
603
603
|
})) : et(a));
|
|
604
604
|
break;
|
|
605
605
|
case "Escape":
|
|
606
|
-
b.value && (a.preventDefault(), b.value = !1,
|
|
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
611
|
a.preventDefault(), b.value || et(a);
|
|
612
612
|
break;
|
|
613
613
|
case "ArrowUp":
|
|
614
|
-
a.preventDefault(), b.value && (b.value = !1,
|
|
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
|
|
621
|
+
return be(s, (a, n) => {
|
|
622
622
|
Ne.value && a !== n && g("changed", a);
|
|
623
|
-
}),
|
|
623
|
+
}), be(ae, (a, n) => {
|
|
624
624
|
a !== n && (s.value = a);
|
|
625
|
-
}),
|
|
625
|
+
}), be(V, (a, n) => {
|
|
626
626
|
Ne.value && a !== n && g("changed", a);
|
|
627
|
-
}),
|
|
628
|
-
a !== n && (
|
|
629
|
-
}), (a, n) => t.nbId ? (
|
|
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
632
|
ref: Ee,
|
|
633
|
-
class:
|
|
633
|
+
class: R(["nb-wrapper", Fe.value]),
|
|
634
634
|
style: Re([je.value, We.value]),
|
|
635
635
|
onFocusout: gt
|
|
636
636
|
}, [
|
|
637
|
-
|
|
637
|
+
w("div", Qe({
|
|
638
638
|
id: t.nbId,
|
|
639
639
|
ref: t.nbId,
|
|
640
640
|
class: ["nb-reset", "component", qe.value, Pe.value],
|
|
641
641
|
style: [Xe.value, We.value, Le.value]
|
|
642
642
|
}, Ct.value), [
|
|
643
|
-
e(
|
|
643
|
+
e(_) ? (H(), $("label", {
|
|
644
644
|
key: 0,
|
|
645
645
|
for: e(ye),
|
|
646
646
|
class: "component__label"
|
|
647
647
|
}, [
|
|
648
|
-
nt(
|
|
649
|
-
e(Ce) ? (
|
|
648
|
+
nt(ge(e(N)), 1),
|
|
649
|
+
e(Ce) ? (H(), $("span", Ht, "*")) : Se("", !0)
|
|
650
650
|
], 8, Vt)) : Se("", !0),
|
|
651
|
-
e(
|
|
651
|
+
e(de) ? (H(), $("div", {
|
|
652
652
|
key: 2,
|
|
653
|
-
class:
|
|
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:
|
|
657
|
+
ref: X,
|
|
658
|
+
class: R(["component__dropdown-field", { "has-selection": ne.value.length > 0 }]),
|
|
659
659
|
style: Re([Le.value]),
|
|
660
660
|
tabindex: e(d) ? -1 : e(ke) >= 0 ? e(ke) : e($e),
|
|
661
661
|
onClick: et,
|
|
662
662
|
onKeydown: Ot
|
|
663
663
|
}, [
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
class:
|
|
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
668
|
], 46, Rt),
|
|
669
|
-
b.value ? (
|
|
669
|
+
b.value ? (H(), $("div", {
|
|
670
670
|
key: 0,
|
|
671
|
-
class:
|
|
671
|
+
class: R(["component__checkbox-group", e(q)]),
|
|
672
672
|
role: "listbox"
|
|
673
673
|
}, [
|
|
674
|
-
(
|
|
674
|
+
(H(!0), $(ct, null, vt(e(k), (r, i) => (H(), $("label", {
|
|
675
675
|
key: i,
|
|
676
676
|
"data-option-index-multiple": i,
|
|
677
|
-
class:
|
|
677
|
+
class: R(["component__checkbox-option", {
|
|
678
678
|
disabled: r.disabled || e(d),
|
|
679
|
-
selected:
|
|
679
|
+
selected: ne.value.includes(r[e(c)])
|
|
680
680
|
}]),
|
|
681
|
-
tabindex: r.disabled || e(d) ? -1 :
|
|
681
|
+
tabindex: r.disabled || e(d) ? -1 : P.value === i ? 0 : -1,
|
|
682
682
|
role: "option",
|
|
683
|
-
"aria-selected":
|
|
683
|
+
"aria-selected": ne.value.includes(r[e(c)]),
|
|
684
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
695
|
value: r[e(c)],
|
|
696
|
-
checked:
|
|
696
|
+
checked: ne.value.includes(r[e(c)]),
|
|
697
697
|
disabled: r.disabled || e(d),
|
|
698
698
|
onClick: n[6] || (n[6] = y(() => {
|
|
699
699
|
}, ["stop"]))
|
|
700
700
|
}, null, 8, Ft),
|
|
701
|
-
|
|
701
|
+
w("span", jt, [
|
|
702
702
|
pt(a.$slots, "slot-select-item", {
|
|
703
703
|
propRow: r,
|
|
704
704
|
propIndex: i
|
|
705
705
|
}, () => [
|
|
706
|
-
nt(
|
|
706
|
+
nt(ge(r[e(j)]), 1)
|
|
707
707
|
], !0)
|
|
708
708
|
])
|
|
709
709
|
], 42, Kt))), 128))
|
|
710
710
|
], 2)) : Se("", !0)
|
|
711
|
-
], 2)) : (
|
|
711
|
+
], 2)) : (H(), $("div", {
|
|
712
712
|
key: 1,
|
|
713
|
-
class:
|
|
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:
|
|
717
|
+
ref: E,
|
|
718
|
+
class: R(["component__dropdown-field", { "has-selection": s.value !== null && s.value !== e(S) }]),
|
|
719
719
|
style: Re([Le.value]),
|
|
720
720
|
tabindex: e(d) ? -1 : e(ke) >= 0 ? e(ke) : e($e),
|
|
721
721
|
onClick: tt,
|
|
722
722
|
onKeydown: mt
|
|
723
723
|
}, [
|
|
724
|
-
!s.value || s.value === e(
|
|
725
|
-
|
|
726
|
-
class:
|
|
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
728
|
], 46, $t),
|
|
729
|
-
p.value ? (
|
|
729
|
+
p.value ? (H(), $("div", {
|
|
730
730
|
key: 0,
|
|
731
|
-
class:
|
|
731
|
+
class: R(["component__option-group", e(q)]),
|
|
732
732
|
role: "listbox"
|
|
733
733
|
}, [
|
|
734
|
-
e(m) ? (
|
|
734
|
+
e(m) ? (H(), $("div", {
|
|
735
735
|
key: 0,
|
|
736
736
|
"data-option-index-single": "0",
|
|
737
|
-
class:
|
|
737
|
+
class: R(["component__option-item", {
|
|
738
738
|
disabled: e(d),
|
|
739
|
-
selected: !s.value || s.value === e(
|
|
739
|
+
selected: !s.value || s.value === e(S)
|
|
740
740
|
}]),
|
|
741
|
-
tabindex: e(d) ? -1 :
|
|
741
|
+
tabindex: e(d) ? -1 : L.value === 0 ? 0 : -1,
|
|
742
742
|
role: "option",
|
|
743
|
-
"aria-selected": !s.value || s.value === e(
|
|
744
|
-
onClick: n[0] || (n[0] = y((r) => !e(d) && Ke(e(
|
|
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
|
-
|
|
753
|
+
w("span", Nt, ge(e(D)), 1)
|
|
754
754
|
], 42, It)) : Se("", !0),
|
|
755
|
-
(
|
|
755
|
+
(H(!0), $(ct, null, vt(e(k), (r, i) => (H(), $("div", {
|
|
756
756
|
key: i,
|
|
757
757
|
"data-option-index-single": e(m) ? i + 1 : i,
|
|
758
|
-
class:
|
|
758
|
+
class: R(["component__option-item", {
|
|
759
759
|
disabled: r.disabled || e(d),
|
|
760
760
|
selected: s.value === r[e(c)]
|
|
761
761
|
}]),
|
|
762
|
-
tabindex: r.disabled || e(d) ? -1 :
|
|
762
|
+
tabindex: r.disabled || e(d) ? -1 : L.value === (e(m) ? i + 1 : i) ? 0 : -1,
|
|
763
763
|
role: "option",
|
|
764
764
|
"aria-selected": s.value === r[e(c)],
|
|
765
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
776
|
propRow: r,
|
|
777
777
|
propIndex: i
|
|
778
778
|
}, () => [
|
|
779
|
-
nt(
|
|
779
|
+
nt(ge(r[e(j)]), 1)
|
|
780
780
|
], !0)
|
|
781
781
|
])
|
|
782
782
|
], 42, Et))), 128))
|
|
@@ -785,7 +785,7 @@ const Ze = (t, C) => {
|
|
|
785
785
|
], 16, wt)
|
|
786
786
|
], 38)) : Se("", !0);
|
|
787
787
|
}
|
|
788
|
-
}), Yt = /* @__PURE__ */ Ze(Xt, [["__scopeId", "data-v-
|
|
788
|
+
}), Yt = /* @__PURE__ */ Ze(Xt, [["__scopeId", "data-v-45c313f1"]]);
|
|
789
789
|
const Mt = ["id"], qt = ["for", "tabindex"], Pt = ["id", "disabled"], Ut = ["id"], Gt = /* @__PURE__ */ Object.assign({
|
|
790
790
|
name: "NbToggle",
|
|
791
791
|
inheritAttrs: !1
|
|
@@ -887,91 +887,91 @@ const Mt = ["id"], qt = ["for", "tabindex"], Pt = ["id", "disabled"], Ut = ["id"
|
|
|
887
887
|
},
|
|
888
888
|
emits: ["changed", "current-value", "clicked"],
|
|
889
889
|
setup(t, { emit: C }) {
|
|
890
|
-
Ue((
|
|
891
|
-
|
|
892
|
-
a80063b0:
|
|
893
|
-
|
|
894
|
-
|
|
890
|
+
Ue((I) => ({
|
|
891
|
+
36168618: D.value,
|
|
892
|
+
a80063b0: T.value,
|
|
893
|
+
"517ca11a": J.value,
|
|
894
|
+
"6cfafb4e": me.value,
|
|
895
895
|
e917ec32: Oe.value,
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
896
|
+
"7f1dd87e": Q.value,
|
|
897
|
+
"4de0195e": f.value,
|
|
898
|
+
"957d25b8": A.value,
|
|
899
|
+
"7a70f3f8": _e.value,
|
|
900
|
+
"6d305071": Te.value
|
|
901
901
|
}));
|
|
902
|
-
const g = C,
|
|
902
|
+
const g = C, U = t;
|
|
903
903
|
Ge(() => {
|
|
904
|
-
m.value =
|
|
904
|
+
m.value = U.value, g("current-value", U.value);
|
|
905
905
|
});
|
|
906
906
|
const {
|
|
907
907
|
nbId: x,
|
|
908
|
-
value:
|
|
909
|
-
display:
|
|
908
|
+
value: re,
|
|
909
|
+
display: he,
|
|
910
910
|
disabled: F,
|
|
911
|
-
tabIndex:
|
|
911
|
+
tabIndex: ve,
|
|
912
912
|
hasTabIndexEnter: d,
|
|
913
913
|
hasTabIndexSpace: h,
|
|
914
|
-
ariaLabel:
|
|
915
|
-
ariaAttrs:
|
|
916
|
-
theme:
|
|
917
|
-
lightSwitchColor:
|
|
918
|
-
lightSwitchColorActive:
|
|
914
|
+
ariaLabel: pe,
|
|
915
|
+
ariaAttrs: M,
|
|
916
|
+
theme: ue,
|
|
917
|
+
lightSwitchColor: te,
|
|
918
|
+
lightSwitchColorActive: le,
|
|
919
919
|
lightThumbColor: ye,
|
|
920
920
|
lightThumbColorActive: Ce,
|
|
921
|
-
lightDisabledBgColor:
|
|
922
|
-
darkSwitchColor:
|
|
923
|
-
darkSwitchColorActive:
|
|
924
|
-
darkThumbColor:
|
|
921
|
+
lightDisabledBgColor: k,
|
|
922
|
+
darkSwitchColor: ae,
|
|
923
|
+
darkSwitchColorActive: G,
|
|
924
|
+
darkThumbColor: j,
|
|
925
925
|
darkThumbColorActive: c,
|
|
926
|
-
darkDisabledBgColor:
|
|
927
|
-
} = Je(
|
|
928
|
-
const
|
|
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:
|
|
930
|
+
disabled: I,
|
|
931
931
|
display: W
|
|
932
932
|
};
|
|
933
|
-
}),
|
|
934
|
-
display:
|
|
935
|
-
})),
|
|
936
|
-
const
|
|
937
|
-
|
|
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
938
|
const W = {
|
|
939
|
-
"aria-label":
|
|
939
|
+
"aria-label": pe.value,
|
|
940
940
|
"aria-disabled": F.value,
|
|
941
941
|
"aria-checked": m.value,
|
|
942
|
-
...
|
|
942
|
+
...I
|
|
943
943
|
};
|
|
944
944
|
return Object.fromEntries(
|
|
945
|
-
Object.entries(W).filter(([
|
|
945
|
+
Object.entries(W).filter(([Z, oe]) => oe != null)
|
|
946
946
|
);
|
|
947
947
|
}), we = () => {
|
|
948
948
|
g("changed", m.value), g("current-value", m.value), g("clicked");
|
|
949
949
|
};
|
|
950
|
-
return
|
|
951
|
-
m.value =
|
|
952
|
-
}),
|
|
953
|
-
g("current-value",
|
|
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:
|
|
957
|
-
style: Re([
|
|
956
|
+
class: R(["nb-wrapper", q.value]),
|
|
957
|
+
style: Re([_.value])
|
|
958
958
|
}, [
|
|
959
|
-
|
|
959
|
+
w("div", Qe({
|
|
960
960
|
id: e(x),
|
|
961
|
-
class: ["nb-reset", "component", "component-toggle",
|
|
961
|
+
class: ["nb-reset", "component", "component-toggle", N.value]
|
|
962
962
|
}, Be.value), [
|
|
963
|
-
|
|
963
|
+
w("label", {
|
|
964
964
|
for: `toggle-input-${e(x)}`,
|
|
965
965
|
class: "component-toggle__button",
|
|
966
|
-
tabindex: e(F) ? -1 : e(
|
|
966
|
+
tabindex: e(F) ? -1 : e(ve),
|
|
967
967
|
onKeydown: [
|
|
968
|
-
W[1] || (W[1] =
|
|
969
|
-
W[2] || (W[2] =
|
|
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
|
-
lt(
|
|
972
|
+
lt(w("input", {
|
|
973
973
|
id: `toggle-input-${e(x)}`,
|
|
974
|
-
"onUpdate:modelValue": W[0] || (W[0] = (
|
|
974
|
+
"onUpdate:modelValue": W[0] || (W[0] = (Z) => m.value = Z),
|
|
975
975
|
type: "checkbox",
|
|
976
976
|
disabled: e(F),
|
|
977
977
|
class: "component-toggle__checkbox",
|
|
@@ -979,7 +979,7 @@ const Mt = ["id"], qt = ["for", "tabindex"], Pt = ["id", "disabled"], Ut = ["id"
|
|
|
979
979
|
}, null, 40, Pt), [
|
|
980
980
|
[at, m.value]
|
|
981
981
|
]),
|
|
982
|
-
|
|
982
|
+
w("div", {
|
|
983
983
|
id: `toggle-switch-${e(x)}`,
|
|
984
984
|
class: "component-toggle__switch"
|
|
985
985
|
}, null, 8, Ut)
|
|
@@ -1121,62 +1121,62 @@ const Qt = ["tabIndex"], Zt = ["id"], el = ["id", "disabled"], tl = ["for"], ll
|
|
|
1121
1121
|
emits: ["clicked", "current-value"],
|
|
1122
1122
|
setup(t, { emit: C }) {
|
|
1123
1123
|
Ue((O) => ({
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
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
1134
|
const g = C;
|
|
1135
1135
|
Ge(() => {
|
|
1136
1136
|
He();
|
|
1137
1137
|
});
|
|
1138
|
-
const
|
|
1138
|
+
const U = t, {
|
|
1139
1139
|
nbId: x,
|
|
1140
|
-
value:
|
|
1141
|
-
textEnable:
|
|
1140
|
+
value: re,
|
|
1141
|
+
textEnable: he,
|
|
1142
1142
|
textDisable: F,
|
|
1143
|
-
hasAnimation:
|
|
1143
|
+
hasAnimation: ve,
|
|
1144
1144
|
ariaLabel: d,
|
|
1145
1145
|
ariaAttrs: h,
|
|
1146
|
-
theme:
|
|
1147
|
-
lightTextColor:
|
|
1148
|
-
lightButtonColor:
|
|
1149
|
-
lightTextBgColor:
|
|
1150
|
-
darkTextColor:
|
|
1146
|
+
theme: pe,
|
|
1147
|
+
lightTextColor: M,
|
|
1148
|
+
lightButtonColor: ue,
|
|
1149
|
+
lightTextBgColor: te,
|
|
1150
|
+
darkTextColor: le,
|
|
1151
1151
|
darkButtonColor: ye,
|
|
1152
1152
|
darkTextBgColor: Ce,
|
|
1153
|
-
borderRadius:
|
|
1154
|
-
width:
|
|
1155
|
-
paddingX:
|
|
1156
|
-
paddingY:
|
|
1153
|
+
borderRadius: k,
|
|
1154
|
+
width: ae,
|
|
1155
|
+
paddingX: G,
|
|
1156
|
+
paddingY: j,
|
|
1157
1157
|
disabled: c,
|
|
1158
|
-
fontFamily:
|
|
1158
|
+
fontFamily: de,
|
|
1159
1159
|
fontSize: m,
|
|
1160
|
-
fontWeight:
|
|
1161
|
-
buttonSize:
|
|
1162
|
-
} = Je(
|
|
1163
|
-
const O = c.value ? "component-disabled" : "", z = "inline-block",
|
|
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
1165
|
disabled: O,
|
|
1166
1166
|
display: z,
|
|
1167
|
-
borderRadius:
|
|
1168
|
-
width:
|
|
1167
|
+
borderRadius: ie,
|
|
1168
|
+
width: se,
|
|
1169
1169
|
paddingX: De,
|
|
1170
1170
|
paddingY: Ie,
|
|
1171
1171
|
font: $e,
|
|
1172
1172
|
fontSize: ke,
|
|
1173
|
-
fontWeight:
|
|
1174
|
-
buttonSize:
|
|
1173
|
+
fontWeight: fe,
|
|
1174
|
+
buttonSize: ce
|
|
1175
1175
|
};
|
|
1176
|
-
}),
|
|
1177
|
-
display:
|
|
1178
|
-
})),
|
|
1179
|
-
const O =
|
|
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
1182
|
width: `${O.width}px`,
|
|
@@ -1185,71 +1185,71 @@ const Qt = ["tabIndex"], Zt = ["id"], el = ["id", "disabled"], tl = ["for"], ll
|
|
|
1185
1185
|
fontSize: O.fontSize,
|
|
1186
1186
|
fontWeight: O.fontWeight
|
|
1187
1187
|
};
|
|
1188
|
-
}), me = o(() =>
|
|
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
1189
|
const O = {};
|
|
1190
|
-
h.value && Object.keys(h.value).forEach((
|
|
1190
|
+
h.value && Object.keys(h.value).forEach((se) => O[`aria-${se}`] = h.value[se]);
|
|
1191
1191
|
const z = {
|
|
1192
1192
|
"aria-label": d.value,
|
|
1193
|
-
"aria-checked":
|
|
1193
|
+
"aria-checked": _.value,
|
|
1194
1194
|
"aria-disabled": c.value,
|
|
1195
1195
|
...O
|
|
1196
1196
|
};
|
|
1197
1197
|
return Object.fromEntries(
|
|
1198
|
-
Object.entries(z).filter(([
|
|
1198
|
+
Object.entries(z).filter(([ie, se]) => se != null)
|
|
1199
1199
|
);
|
|
1200
|
-
}),
|
|
1200
|
+
}), Z = () => {
|
|
1201
1201
|
c.value || g("clicked");
|
|
1202
|
-
},
|
|
1203
|
-
c.value || (
|
|
1202
|
+
}, oe = () => {
|
|
1203
|
+
c.value || (_.value = !_.value, g("clicked"));
|
|
1204
1204
|
}, He = () => {
|
|
1205
|
-
const O =
|
|
1206
|
-
|
|
1205
|
+
const O = re.value;
|
|
1206
|
+
_.value = O, g("current-value", O);
|
|
1207
1207
|
};
|
|
1208
|
-
return
|
|
1208
|
+
return be(_, (O) => {
|
|
1209
1209
|
g("current-value", O);
|
|
1210
|
-
}),
|
|
1210
|
+
}), be(re, () => {
|
|
1211
1211
|
He();
|
|
1212
|
-
}), (O, z) => e(x) ? (
|
|
1212
|
+
}), (O, z) => e(x) ? (H(), $("div", Qe({
|
|
1213
1213
|
key: 0,
|
|
1214
|
-
class: ["nb-wrapper",
|
|
1215
|
-
style: [
|
|
1214
|
+
class: ["nb-wrapper", D.value],
|
|
1215
|
+
style: [J.value],
|
|
1216
1216
|
tabIndex: e(c) ? -1 : t.tabIndex,
|
|
1217
1217
|
role: "button"
|
|
1218
1218
|
}, W.value, {
|
|
1219
1219
|
onKeydown: [
|
|
1220
|
-
z[1] || (z[1] =
|
|
1221
|
-
z[2] || (z[2] =
|
|
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
|
-
|
|
1224
|
+
w("div", {
|
|
1225
1225
|
id: e(x),
|
|
1226
|
-
class:
|
|
1227
|
-
style: Re([
|
|
1226
|
+
class: R(["nb-reset", "component", Oe.value]),
|
|
1227
|
+
style: Re([T.value])
|
|
1228
1228
|
}, [
|
|
1229
|
-
lt(
|
|
1229
|
+
lt(w("input", {
|
|
1230
1230
|
id: `${e(x)}-input`,
|
|
1231
|
-
"onUpdate:modelValue": z[0] || (z[0] = (
|
|
1231
|
+
"onUpdate:modelValue": z[0] || (z[0] = (ie) => _.value = ie),
|
|
1232
1232
|
type: "checkbox",
|
|
1233
1233
|
disabled: e(c),
|
|
1234
1234
|
class: "component-input",
|
|
1235
|
-
onChange:
|
|
1235
|
+
onChange: Z
|
|
1236
1236
|
}, null, 40, el), [
|
|
1237
|
-
[at,
|
|
1237
|
+
[at, _.value]
|
|
1238
1238
|
]),
|
|
1239
|
-
|
|
1239
|
+
w("label", {
|
|
1240
1240
|
for: `${e(x)}-input`,
|
|
1241
|
-
class:
|
|
1242
|
-
|
|
1243
|
-
e(
|
|
1241
|
+
class: R(["component-label", [
|
|
1242
|
+
_.value ? "component-button--left" : "component-button--right",
|
|
1243
|
+
e(ve) ? "component-label-text-animation" : ""
|
|
1244
1244
|
]])
|
|
1245
1245
|
}, [
|
|
1246
|
-
z[3] || (z[3] =
|
|
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
1250
|
], 16, Qt)) : Se("", !0);
|
|
1251
1251
|
}
|
|
1252
|
-
}), nl = /* @__PURE__ */ Ze(ol, [["__scopeId", "data-v-
|
|
1252
|
+
}), nl = /* @__PURE__ */ Ze(ol, [["__scopeId", "data-v-18844377"]]);
|
|
1253
1253
|
const rl = ["tabIndex"], ul = ["id"], dl = ["id", "disabled"], il = ["for", "data-tg-off", "data-tg-on"], sl = /* @__PURE__ */ Object.assign({
|
|
1254
1254
|
name: "NbToggleFlip",
|
|
1255
1255
|
inheritAttrs: !1
|
|
@@ -1408,64 +1408,64 @@ const rl = ["tabIndex"], ul = ["id"], dl = ["id", "disabled"], il = ["for", "dat
|
|
|
1408
1408
|
emits: ["clicked", "current-value"],
|
|
1409
1409
|
setup(t, { emit: C }) {
|
|
1410
1410
|
Ue((l) => ({
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
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
|
|
1422
1422
|
}));
|
|
1423
1423
|
const g = C;
|
|
1424
1424
|
Ge(() => {
|
|
1425
|
-
|
|
1425
|
+
ce();
|
|
1426
1426
|
});
|
|
1427
|
-
const
|
|
1427
|
+
const U = t, {
|
|
1428
1428
|
nbId: x,
|
|
1429
|
-
value:
|
|
1430
|
-
textEnable:
|
|
1429
|
+
value: re,
|
|
1430
|
+
textEnable: he,
|
|
1431
1431
|
textDisable: F,
|
|
1432
|
-
ariaLabel:
|
|
1432
|
+
ariaLabel: ve,
|
|
1433
1433
|
ariaAttrs: d,
|
|
1434
1434
|
theme: h,
|
|
1435
|
-
lightButtonColorOn:
|
|
1436
|
-
lightButtonColorOff:
|
|
1437
|
-
lightButtonColorOnHover:
|
|
1438
|
-
lightButtonColorOffHover:
|
|
1439
|
-
lightTextColorOn:
|
|
1435
|
+
lightButtonColorOn: pe,
|
|
1436
|
+
lightButtonColorOff: M,
|
|
1437
|
+
lightButtonColorOnHover: ue,
|
|
1438
|
+
lightButtonColorOffHover: te,
|
|
1439
|
+
lightTextColorOn: le,
|
|
1440
1440
|
lightTextColorOff: ye,
|
|
1441
1441
|
lightTextColorOnHover: Ce,
|
|
1442
|
-
lightTextColorOffHover:
|
|
1443
|
-
darkButtonColorOn:
|
|
1444
|
-
darkButtonColorOff:
|
|
1445
|
-
darkButtonColorOnHover:
|
|
1442
|
+
lightTextColorOffHover: k,
|
|
1443
|
+
darkButtonColorOn: ae,
|
|
1444
|
+
darkButtonColorOff: G,
|
|
1445
|
+
darkButtonColorOnHover: j,
|
|
1446
1446
|
darkButtonColorOffHover: c,
|
|
1447
|
-
darkTextColorOn:
|
|
1447
|
+
darkTextColorOn: de,
|
|
1448
1448
|
darkTextColorOff: m,
|
|
1449
|
-
darkTextColorOnHover:
|
|
1450
|
-
darkTextColorOffHover:
|
|
1451
|
-
borderRadius:
|
|
1452
|
-
width:
|
|
1453
|
-
paddingX:
|
|
1454
|
-
paddingY:
|
|
1455
|
-
disabled:
|
|
1449
|
+
darkTextColorOnHover: S,
|
|
1450
|
+
darkTextColorOffHover: q,
|
|
1451
|
+
borderRadius: _,
|
|
1452
|
+
width: N,
|
|
1453
|
+
paddingX: D,
|
|
1454
|
+
paddingY: J,
|
|
1455
|
+
disabled: T,
|
|
1456
1456
|
fontFamily: me,
|
|
1457
1457
|
fontSize: Oe,
|
|
1458
|
-
fontWeight:
|
|
1459
|
-
} = Je(
|
|
1460
|
-
const l =
|
|
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";
|
|
1461
1461
|
return {
|
|
1462
1462
|
disabled: l,
|
|
1463
1463
|
display: v,
|
|
1464
|
-
lightButtonColorOn:
|
|
1465
|
-
lightButtonColorOff:
|
|
1466
|
-
lightButtonColorOnHover:
|
|
1467
|
-
lightButtonColorOffHover:
|
|
1468
|
-
lightTextColorOn:
|
|
1464
|
+
lightButtonColorOn: E,
|
|
1465
|
+
lightButtonColorOff: X,
|
|
1466
|
+
lightButtonColorOnHover: L,
|
|
1467
|
+
lightButtonColorOffHover: P,
|
|
1468
|
+
lightTextColorOn: ne,
|
|
1469
1469
|
lightTextColorOff: xe,
|
|
1470
1470
|
lightTextColorOnHover: Fe,
|
|
1471
1471
|
lightTextColorOffHover: je,
|
|
@@ -1478,7 +1478,7 @@ const rl = ["tabIndex"], ul = ["id"], dl = ["id", "disabled"], il = ["for", "dat
|
|
|
1478
1478
|
darkTextColorOnHover: Pe,
|
|
1479
1479
|
darkTextColorOffHover: Ae,
|
|
1480
1480
|
borderRadius: s,
|
|
1481
|
-
width:
|
|
1481
|
+
width: V,
|
|
1482
1482
|
paddingX: Ne,
|
|
1483
1483
|
paddingY: b,
|
|
1484
1484
|
font: p,
|
|
@@ -1496,10 +1496,10 @@ const rl = ["tabIndex"], ul = ["id"], dl = ["id", "disabled"], il = ["for", "dat
|
|
|
1496
1496
|
fontSize: l.fontSize,
|
|
1497
1497
|
fontWeight: l.fontWeight
|
|
1498
1498
|
};
|
|
1499
|
-
}), we = o(() => f.value.font),
|
|
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(() => {
|
|
1500
1500
|
const l = f.value;
|
|
1501
1501
|
return `${l.paddingY}rem ${l.paddingX}rem`;
|
|
1502
|
-
}),
|
|
1502
|
+
}), oe = o(() => {
|
|
1503
1503
|
const l = f.value;
|
|
1504
1504
|
return h.value === "light" ? l.lightTextColorOn : l.darkTextColorOn;
|
|
1505
1505
|
}), He = o(() => {
|
|
@@ -1511,10 +1511,10 @@ const rl = ["tabIndex"], ul = ["id"], dl = ["id", "disabled"], il = ["for", "dat
|
|
|
1511
1511
|
}), z = o(() => {
|
|
1512
1512
|
const l = f.value;
|
|
1513
1513
|
return h.value === "light" ? l.lightTextColorOffHover : l.darkTextColorOffHover;
|
|
1514
|
-
}),
|
|
1514
|
+
}), ie = o(() => {
|
|
1515
1515
|
const l = f.value;
|
|
1516
1516
|
return h.value === "light" ? l.lightButtonColorOn : l.darkButtonColorOn;
|
|
1517
|
-
}),
|
|
1517
|
+
}), se = o(() => {
|
|
1518
1518
|
const l = f.value;
|
|
1519
1519
|
return h.value === "light" ? l.lightButtonColorOff : l.darkButtonColorOff;
|
|
1520
1520
|
}), De = o(() => {
|
|
@@ -1525,65 +1525,65 @@ const rl = ["tabIndex"], ul = ["id"], dl = ["id", "disabled"], il = ["for", "dat
|
|
|
1525
1525
|
return h.value === "light" ? l.lightButtonColorOffHover : l.darkButtonColorOffHover;
|
|
1526
1526
|
}), $e = o(() => {
|
|
1527
1527
|
const l = {};
|
|
1528
|
-
d.value && Object.keys(d.value).forEach((
|
|
1528
|
+
d.value && Object.keys(d.value).forEach((V) => l[`aria-${V}`] = d.value[V]);
|
|
1529
1529
|
const v = {
|
|
1530
|
-
"aria-label":
|
|
1531
|
-
"aria-disabled":
|
|
1530
|
+
"aria-label": ve.value,
|
|
1531
|
+
"aria-disabled": T.value,
|
|
1532
1532
|
...l
|
|
1533
1533
|
};
|
|
1534
1534
|
return Object.fromEntries(
|
|
1535
|
-
Object.entries(v).filter(([s,
|
|
1535
|
+
Object.entries(v).filter(([s, V]) => V != null)
|
|
1536
1536
|
);
|
|
1537
1537
|
}), ke = () => {
|
|
1538
|
-
|
|
1539
|
-
}, se = () => {
|
|
1540
|
-
k.value || (A.value = !A.value, g("clicked"));
|
|
1538
|
+
T.value || g("clicked");
|
|
1541
1539
|
}, fe = () => {
|
|
1542
|
-
|
|
1540
|
+
T.value || (A.value = !A.value, g("clicked"));
|
|
1541
|
+
}, ce = () => {
|
|
1542
|
+
const l = re.value;
|
|
1543
1543
|
A.value = l, g("current-value", l);
|
|
1544
1544
|
};
|
|
1545
|
-
return
|
|
1545
|
+
return be(A, (l) => {
|
|
1546
1546
|
g("current-value", l);
|
|
1547
|
-
}),
|
|
1548
|
-
|
|
1549
|
-
}), (l, v) => e(x) ? (
|
|
1547
|
+
}), be(re, () => {
|
|
1548
|
+
ce();
|
|
1549
|
+
}), (l, v) => e(x) ? (H(), $("div", Qe({
|
|
1550
1550
|
key: 0,
|
|
1551
1551
|
class: ["nb-wrapper", _e.value],
|
|
1552
1552
|
style: [Te.value],
|
|
1553
|
-
tabIndex: e(
|
|
1553
|
+
tabIndex: e(T) ? -1 : t.tabIndex,
|
|
1554
1554
|
role: "button"
|
|
1555
1555
|
}, $e.value, {
|
|
1556
1556
|
onClick: v[1] || (v[1] = (...s) => l.interacted && l.interacted(...s)),
|
|
1557
1557
|
onKeydown: [
|
|
1558
|
-
v[2] || (v[2] =
|
|
1559
|
-
v[3] || (v[3] =
|
|
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"]))
|
|
1560
1560
|
]
|
|
1561
1561
|
}), [
|
|
1562
|
-
|
|
1562
|
+
w("div", {
|
|
1563
1563
|
id: e(x),
|
|
1564
|
-
class:
|
|
1564
|
+
class: R(["nb-reset", "component", I.value]),
|
|
1565
1565
|
style: Re([Be.value])
|
|
1566
1566
|
}, [
|
|
1567
|
-
lt(
|
|
1567
|
+
lt(w("input", {
|
|
1568
1568
|
id: `${e(x)}-input`,
|
|
1569
1569
|
"onUpdate:modelValue": v[0] || (v[0] = (s) => A.value = s),
|
|
1570
1570
|
type: "checkbox",
|
|
1571
|
-
disabled: e(
|
|
1572
|
-
class:
|
|
1571
|
+
disabled: e(T),
|
|
1572
|
+
class: R(["component__input", "component__input--flip"]),
|
|
1573
1573
|
onChange: ke
|
|
1574
1574
|
}, null, 40, dl), [
|
|
1575
1575
|
[at, A.value]
|
|
1576
1576
|
]),
|
|
1577
|
-
|
|
1577
|
+
w("label", {
|
|
1578
1578
|
for: `${e(x)}-input`,
|
|
1579
1579
|
class: "component__button",
|
|
1580
1580
|
"data-tg-off": e(F),
|
|
1581
|
-
"data-tg-on": e(
|
|
1582
|
-
},
|
|
1581
|
+
"data-tg-on": e(he)
|
|
1582
|
+
}, ge(A.value ? e(he) : e(F)), 9, il)
|
|
1583
1583
|
], 14, ul)
|
|
1584
1584
|
], 16, rl)) : Se("", !0);
|
|
1585
1585
|
}
|
|
1586
|
-
}), fl = /* @__PURE__ */ Ze(sl, [["__scopeId", "data-v-
|
|
1586
|
+
}), fl = /* @__PURE__ */ Ze(sl, [["__scopeId", "data-v-2baeb465"]]);
|
|
1587
1587
|
const cl = ["tabIndex"], vl = ["id"], pl = ["id", "disabled"], gl = ["for", "data-tg-off", "data-tg-on"], bl = /* @__PURE__ */ Object.assign({
|
|
1588
1588
|
name: "NbToggleSkewed",
|
|
1589
1589
|
inheritAttrs: !1
|
|
@@ -1742,64 +1742,64 @@ const cl = ["tabIndex"], vl = ["id"], pl = ["id", "disabled"], gl = ["for", "dat
|
|
|
1742
1742
|
emits: ["clicked", "current-value"],
|
|
1743
1743
|
setup(t, { emit: C }) {
|
|
1744
1744
|
Ue((l) => ({
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
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
|
|
1756
1756
|
}));
|
|
1757
1757
|
const g = C;
|
|
1758
1758
|
Ge(() => {
|
|
1759
|
-
|
|
1759
|
+
ce();
|
|
1760
1760
|
});
|
|
1761
|
-
const
|
|
1761
|
+
const U = t, {
|
|
1762
1762
|
nbId: x,
|
|
1763
|
-
value:
|
|
1764
|
-
textEnable:
|
|
1763
|
+
value: re,
|
|
1764
|
+
textEnable: he,
|
|
1765
1765
|
textDisable: F,
|
|
1766
|
-
ariaLabel:
|
|
1766
|
+
ariaLabel: ve,
|
|
1767
1767
|
ariaAttrs: d,
|
|
1768
1768
|
theme: h,
|
|
1769
|
-
lightButtonColorOn:
|
|
1770
|
-
lightButtonColorOff:
|
|
1771
|
-
lightButtonColorOnHover:
|
|
1772
|
-
lightButtonColorOffHover:
|
|
1773
|
-
lightTextColorOn:
|
|
1769
|
+
lightButtonColorOn: pe,
|
|
1770
|
+
lightButtonColorOff: M,
|
|
1771
|
+
lightButtonColorOnHover: ue,
|
|
1772
|
+
lightButtonColorOffHover: te,
|
|
1773
|
+
lightTextColorOn: le,
|
|
1774
1774
|
lightTextColorOff: ye,
|
|
1775
1775
|
lightTextColorOnHover: Ce,
|
|
1776
|
-
lightTextColorOffHover:
|
|
1777
|
-
darkButtonColorOn:
|
|
1778
|
-
darkButtonColorOff:
|
|
1779
|
-
darkButtonColorOnHover:
|
|
1776
|
+
lightTextColorOffHover: k,
|
|
1777
|
+
darkButtonColorOn: ae,
|
|
1778
|
+
darkButtonColorOff: G,
|
|
1779
|
+
darkButtonColorOnHover: j,
|
|
1780
1780
|
darkButtonColorOffHover: c,
|
|
1781
|
-
darkTextColorOn:
|
|
1781
|
+
darkTextColorOn: de,
|
|
1782
1782
|
darkTextColorOff: m,
|
|
1783
|
-
darkTextColorOnHover:
|
|
1784
|
-
darkTextColorOffHover:
|
|
1785
|
-
borderRadius:
|
|
1786
|
-
width:
|
|
1787
|
-
paddingX:
|
|
1788
|
-
paddingY:
|
|
1789
|
-
disabled:
|
|
1783
|
+
darkTextColorOnHover: S,
|
|
1784
|
+
darkTextColorOffHover: q,
|
|
1785
|
+
borderRadius: _,
|
|
1786
|
+
width: N,
|
|
1787
|
+
paddingX: D,
|
|
1788
|
+
paddingY: J,
|
|
1789
|
+
disabled: T,
|
|
1790
1790
|
fontFamily: me,
|
|
1791
1791
|
fontSize: Oe,
|
|
1792
|
-
fontWeight:
|
|
1793
|
-
} = Je(
|
|
1794
|
-
const l =
|
|
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";
|
|
1795
1795
|
return {
|
|
1796
1796
|
disabled: l,
|
|
1797
1797
|
display: v,
|
|
1798
|
-
lightButtonColorOn:
|
|
1799
|
-
lightButtonColorOff:
|
|
1800
|
-
lightButtonColorOnHover:
|
|
1801
|
-
lightButtonColorOffHover:
|
|
1802
|
-
lightTextColorOn:
|
|
1798
|
+
lightButtonColorOn: E,
|
|
1799
|
+
lightButtonColorOff: X,
|
|
1800
|
+
lightButtonColorOnHover: L,
|
|
1801
|
+
lightButtonColorOffHover: P,
|
|
1802
|
+
lightTextColorOn: ne,
|
|
1803
1803
|
lightTextColorOff: xe,
|
|
1804
1804
|
lightTextColorOnHover: Fe,
|
|
1805
1805
|
lightTextColorOffHover: je,
|
|
@@ -1812,7 +1812,7 @@ const cl = ["tabIndex"], vl = ["id"], pl = ["id", "disabled"], gl = ["for", "dat
|
|
|
1812
1812
|
darkTextColorOnHover: Pe,
|
|
1813
1813
|
darkTextColorOffHover: Ae,
|
|
1814
1814
|
borderRadius: s,
|
|
1815
|
-
width:
|
|
1815
|
+
width: V,
|
|
1816
1816
|
paddingX: Ne,
|
|
1817
1817
|
paddingY: b,
|
|
1818
1818
|
font: p,
|
|
@@ -1830,10 +1830,10 @@ const cl = ["tabIndex"], vl = ["id"], pl = ["id", "disabled"], gl = ["for", "dat
|
|
|
1830
1830
|
fontSize: l.fontSize,
|
|
1831
1831
|
fontWeight: l.fontWeight
|
|
1832
1832
|
};
|
|
1833
|
-
}), we = o(() => f.value.font),
|
|
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(() => {
|
|
1834
1834
|
const l = f.value;
|
|
1835
1835
|
return `${l.paddingY}rem ${l.paddingX}rem`;
|
|
1836
|
-
}),
|
|
1836
|
+
}), oe = o(() => {
|
|
1837
1837
|
const l = f.value;
|
|
1838
1838
|
return h.value === "light" ? l.lightTextColorOn : l.darkTextColorOn;
|
|
1839
1839
|
}), He = o(() => {
|
|
@@ -1845,10 +1845,10 @@ const cl = ["tabIndex"], vl = ["id"], pl = ["id", "disabled"], gl = ["for", "dat
|
|
|
1845
1845
|
}), z = o(() => {
|
|
1846
1846
|
const l = f.value;
|
|
1847
1847
|
return h.value === "light" ? l.lightTextColorOffHover : l.darkTextColorOffHover;
|
|
1848
|
-
}),
|
|
1848
|
+
}), ie = o(() => {
|
|
1849
1849
|
const l = f.value;
|
|
1850
1850
|
return h.value === "light" ? l.lightButtonColorOn : l.darkButtonColorOn;
|
|
1851
|
-
}),
|
|
1851
|
+
}), se = o(() => {
|
|
1852
1852
|
const l = f.value;
|
|
1853
1853
|
return h.value === "light" ? l.lightButtonColorOff : l.darkButtonColorOff;
|
|
1854
1854
|
}), De = o(() => {
|
|
@@ -1859,65 +1859,65 @@ const cl = ["tabIndex"], vl = ["id"], pl = ["id", "disabled"], gl = ["for", "dat
|
|
|
1859
1859
|
return h.value === "light" ? l.lightButtonColorOffHover : l.darkButtonColorOffHover;
|
|
1860
1860
|
}), $e = o(() => {
|
|
1861
1861
|
const l = {};
|
|
1862
|
-
d.value && Object.keys(d.value).forEach((
|
|
1862
|
+
d.value && Object.keys(d.value).forEach((V) => l[`aria-${V}`] = d.value[V]);
|
|
1863
1863
|
const v = {
|
|
1864
|
-
"aria-label":
|
|
1865
|
-
"aria-disabled":
|
|
1864
|
+
"aria-label": ve.value,
|
|
1865
|
+
"aria-disabled": T.value,
|
|
1866
1866
|
...l
|
|
1867
1867
|
};
|
|
1868
1868
|
return Object.fromEntries(
|
|
1869
|
-
Object.entries(v).filter(([s,
|
|
1869
|
+
Object.entries(v).filter(([s, V]) => V != null)
|
|
1870
1870
|
);
|
|
1871
1871
|
}), ke = () => {
|
|
1872
|
-
|
|
1873
|
-
}, se = () => {
|
|
1874
|
-
k.value || (A.value = !A.value, g("clicked"));
|
|
1872
|
+
T.value || g("clicked");
|
|
1875
1873
|
}, fe = () => {
|
|
1876
|
-
|
|
1874
|
+
T.value || (A.value = !A.value, g("clicked"));
|
|
1875
|
+
}, ce = () => {
|
|
1876
|
+
const l = re.value;
|
|
1877
1877
|
A.value = l, g("current-value", l);
|
|
1878
1878
|
};
|
|
1879
|
-
return
|
|
1879
|
+
return be(A, (l) => {
|
|
1880
1880
|
g("current-value", l);
|
|
1881
|
-
}),
|
|
1882
|
-
|
|
1883
|
-
}), (l, v) => e(x) ? (
|
|
1881
|
+
}), be(re, () => {
|
|
1882
|
+
ce();
|
|
1883
|
+
}), (l, v) => e(x) ? (H(), $("div", Qe({
|
|
1884
1884
|
key: 0,
|
|
1885
1885
|
class: ["nb-wrapper", _e.value],
|
|
1886
1886
|
style: [Te.value],
|
|
1887
|
-
tabIndex: e(
|
|
1887
|
+
tabIndex: e(T) ? -1 : t.tabIndex,
|
|
1888
1888
|
role: "button"
|
|
1889
1889
|
}, $e.value, {
|
|
1890
1890
|
onClick: v[1] || (v[1] = (...s) => l.interacted && l.interacted(...s)),
|
|
1891
1891
|
onKeydown: [
|
|
1892
|
-
v[2] || (v[2] =
|
|
1893
|
-
v[3] || (v[3] =
|
|
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"]))
|
|
1894
1894
|
]
|
|
1895
1895
|
}), [
|
|
1896
|
-
|
|
1896
|
+
w("div", {
|
|
1897
1897
|
id: e(x),
|
|
1898
|
-
class:
|
|
1898
|
+
class: R(["nb-reset", "component", I.value]),
|
|
1899
1899
|
style: Re([Be.value])
|
|
1900
1900
|
}, [
|
|
1901
|
-
lt(
|
|
1901
|
+
lt(w("input", {
|
|
1902
1902
|
id: `${e(x)}-input`,
|
|
1903
1903
|
"onUpdate:modelValue": v[0] || (v[0] = (s) => A.value = s),
|
|
1904
1904
|
type: "checkbox",
|
|
1905
|
-
disabled: e(
|
|
1906
|
-
class:
|
|
1905
|
+
disabled: e(T),
|
|
1906
|
+
class: R(["component__input", "component__input--skewed"]),
|
|
1907
1907
|
onChange: ke
|
|
1908
1908
|
}, null, 40, pl), [
|
|
1909
1909
|
[at, A.value]
|
|
1910
1910
|
]),
|
|
1911
|
-
|
|
1911
|
+
w("label", {
|
|
1912
1912
|
for: `${e(x)}-input`,
|
|
1913
1913
|
class: "component__button",
|
|
1914
1914
|
"data-tg-off": e(F),
|
|
1915
|
-
"data-tg-on": e(
|
|
1916
|
-
},
|
|
1915
|
+
"data-tg-on": e(he)
|
|
1916
|
+
}, ge(A.value ? e(he) : e(F)), 9, gl)
|
|
1917
1917
|
], 14, vl)
|
|
1918
1918
|
], 16, cl)) : Se("", !0);
|
|
1919
1919
|
}
|
|
1920
|
-
}), hl = /* @__PURE__ */ Ze(bl, [["__scopeId", "data-v-
|
|
1920
|
+
}), hl = /* @__PURE__ */ Ze(bl, [["__scopeId", "data-v-f66db036"]]), rt = { NbSelect: Yt, NbToggle: Jt, NbToggleLight: nl, NbToggleFlip: fl, NbToggleSkewed: hl }, Cl = {
|
|
1921
1921
|
install(t) {
|
|
1922
1922
|
for (const C in rt)
|
|
1923
1923
|
if (Object.prototype.hasOwnProperty.call(rt, C)) {
|