cattle-care-ui 0.1.39 → 0.1.40
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/components/MenuItem.d.ts +3 -1
- package/dist/index.css +1 -1
- package/dist/index.js +429 -418
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -287,7 +287,7 @@ function z(e, t = [], n = []) {
|
|
|
287
287
|
}
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region node_modules/lucide-react/dist/esm/icons/archive.mjs
|
|
290
|
-
var
|
|
290
|
+
var te = {
|
|
291
291
|
name: "archive",
|
|
292
292
|
size: 24,
|
|
293
293
|
node: [
|
|
@@ -309,8 +309,8 @@ var B = {
|
|
|
309
309
|
}]
|
|
310
310
|
]
|
|
311
311
|
};
|
|
312
|
-
|
|
313
|
-
var
|
|
312
|
+
te.node;
|
|
313
|
+
var ne = z(te), B = {
|
|
314
314
|
name: "check",
|
|
315
315
|
size: 24,
|
|
316
316
|
node: [["path", {
|
|
@@ -318,8 +318,8 @@ var te = z(B), ne = {
|
|
|
318
318
|
key: "1gmf2c"
|
|
319
319
|
}]]
|
|
320
320
|
};
|
|
321
|
-
|
|
322
|
-
var re = z(
|
|
321
|
+
B.node;
|
|
322
|
+
var re = z(B), ie = {
|
|
323
323
|
name: "chevron-down",
|
|
324
324
|
size: 24,
|
|
325
325
|
node: [["path", {
|
|
@@ -369,7 +369,7 @@ var le = z(ce), ue = {
|
|
|
369
369
|
]
|
|
370
370
|
};
|
|
371
371
|
ue.node;
|
|
372
|
-
var de = z(ue),
|
|
372
|
+
var de = z(ue), fe = {
|
|
373
373
|
name: "eye",
|
|
374
374
|
size: 24,
|
|
375
375
|
node: [["path", {
|
|
@@ -382,8 +382,8 @@ var de = z(ue), V = {
|
|
|
382
382
|
key: "1v7zrd"
|
|
383
383
|
}]]
|
|
384
384
|
};
|
|
385
|
-
|
|
386
|
-
var
|
|
385
|
+
fe.node;
|
|
386
|
+
var pe = z(fe), me = {
|
|
387
387
|
name: "lock",
|
|
388
388
|
size: 24,
|
|
389
389
|
node: [["rect", {
|
|
@@ -399,8 +399,8 @@ var fe = z(V), pe = {
|
|
|
399
399
|
key: "fwvmzm"
|
|
400
400
|
}]]
|
|
401
401
|
};
|
|
402
|
-
|
|
403
|
-
var
|
|
402
|
+
me.node;
|
|
403
|
+
var V = z(me), H = {
|
|
404
404
|
name: "play",
|
|
405
405
|
size: 24,
|
|
406
406
|
node: [["path", {
|
|
@@ -408,8 +408,8 @@ var me = z(pe), he = {
|
|
|
408
408
|
key: "10ikf1"
|
|
409
409
|
}]]
|
|
410
410
|
};
|
|
411
|
-
|
|
412
|
-
var
|
|
411
|
+
H.node;
|
|
412
|
+
var he = z(H), ge = {
|
|
413
413
|
name: "search",
|
|
414
414
|
size: 24,
|
|
415
415
|
node: [["path", {
|
|
@@ -422,8 +422,8 @@ var ge = z(he), _e = {
|
|
|
422
422
|
key: "4ej97u"
|
|
423
423
|
}]]
|
|
424
424
|
};
|
|
425
|
-
|
|
426
|
-
var
|
|
425
|
+
ge.node;
|
|
426
|
+
var _e = z(ge), ve = {
|
|
427
427
|
name: "user",
|
|
428
428
|
size: 24,
|
|
429
429
|
node: [["path", {
|
|
@@ -436,8 +436,8 @@ var ve = z(_e), ye = {
|
|
|
436
436
|
key: "17ys0d"
|
|
437
437
|
}]]
|
|
438
438
|
};
|
|
439
|
-
|
|
440
|
-
var
|
|
439
|
+
ve.node;
|
|
440
|
+
var ye = z(ve), be = {
|
|
441
441
|
name: "x",
|
|
442
442
|
size: 24,
|
|
443
443
|
node: [["path", {
|
|
@@ -448,8 +448,8 @@ var be = z(ye), xe = {
|
|
|
448
448
|
key: "d8bk6v"
|
|
449
449
|
}]]
|
|
450
450
|
};
|
|
451
|
-
|
|
452
|
-
var
|
|
451
|
+
be.node;
|
|
452
|
+
var xe = z(be), U = {
|
|
453
453
|
neutral: "_neutral_13wj2_1",
|
|
454
454
|
pill: "_pill_13wj2_2",
|
|
455
455
|
accent: "_accent_13wj2_3",
|
|
@@ -467,53 +467,53 @@ var Se = z(xe), H = {
|
|
|
467
467
|
main: "_main_13wj2_161",
|
|
468
468
|
remove: "_remove_13wj2_162",
|
|
469
469
|
removable: "_removable_13wj2_189"
|
|
470
|
-
},
|
|
470
|
+
}, Se = {
|
|
471
471
|
chip: "_chip_1vf29_5",
|
|
472
472
|
disabled: "_disabled_1vf29_15",
|
|
473
473
|
selected: "_selected_1vf29_28"
|
|
474
474
|
};
|
|
475
475
|
//#endregion
|
|
476
476
|
//#region src/components/Tag.tsx
|
|
477
|
-
function
|
|
477
|
+
function Ce(...e) {
|
|
478
478
|
return e.filter(Boolean).join(" ");
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function we(e) {
|
|
481
481
|
if (e.variant === "count") {
|
|
482
482
|
let { variant: t, children: n, ...r } = e;
|
|
483
483
|
return /* @__PURE__ */ _("span", {
|
|
484
|
-
className:
|
|
484
|
+
className: U[t],
|
|
485
485
|
...r,
|
|
486
486
|
children: n
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
|
-
let { variant: t = "neutral", children: n, onClick: r, pressed: i, disabled: a, leading: o, onRemove: s, removeLabel: c, ...l } = e, u = !!r, d = !!s, f = t === "chip", p = u && i === !0, m =
|
|
490
|
-
className:
|
|
489
|
+
let { variant: t = "neutral", children: n, onClick: r, pressed: i, disabled: a, leading: o, onRemove: s, removeLabel: c, ...l } = e, u = !!r, d = !!s, f = t === "chip", p = u && i === !0, m = Ce(U[t], f && Se.chip, f && p && Se.selected, f && a && Se.disabled, (u || d) && U.interactive, p && U.pressed, a && U.disabled, (o != null || d) && U.slots), h = /* @__PURE__ */ v(g, { children: [o != null && /* @__PURE__ */ _("span", {
|
|
490
|
+
className: U.leading,
|
|
491
491
|
children: o
|
|
492
492
|
}), n] });
|
|
493
493
|
return d ? /* @__PURE__ */ v("span", {
|
|
494
|
-
className:
|
|
494
|
+
className: Ce(m, U.removable),
|
|
495
495
|
...l,
|
|
496
496
|
children: [u ? /* @__PURE__ */ _("button", {
|
|
497
497
|
type: "button",
|
|
498
|
-
className:
|
|
498
|
+
className: Ce(U.main, U.slots),
|
|
499
499
|
"aria-pressed": i,
|
|
500
500
|
disabled: a,
|
|
501
501
|
onClick: r,
|
|
502
502
|
children: h
|
|
503
503
|
}) : h, /* @__PURE__ */ _("button", {
|
|
504
504
|
type: "button",
|
|
505
|
-
className:
|
|
505
|
+
className: U.remove,
|
|
506
506
|
"aria-label": c,
|
|
507
507
|
disabled: a,
|
|
508
508
|
onClick: () => s(),
|
|
509
|
-
children: /* @__PURE__ */ _(
|
|
509
|
+
children: /* @__PURE__ */ _(xe, {
|
|
510
510
|
size: 12,
|
|
511
511
|
"aria-hidden": "true"
|
|
512
512
|
})
|
|
513
513
|
})]
|
|
514
514
|
}) : u ? /* @__PURE__ */ _("button", {
|
|
515
515
|
type: "button",
|
|
516
|
-
className:
|
|
516
|
+
className: Ce(m, U.button),
|
|
517
517
|
"aria-pressed": i,
|
|
518
518
|
disabled: a,
|
|
519
519
|
onClick: r,
|
|
@@ -525,20 +525,20 @@ function Te(e) {
|
|
|
525
525
|
children: h
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
var
|
|
528
|
+
var Te = {
|
|
529
529
|
group: "_group_rrzc7_1",
|
|
530
530
|
sm: "_sm_rrzc7_9",
|
|
531
531
|
chip: "_chip_rrzc7_13 _chip_1vf29_5",
|
|
532
532
|
base: "_base_rrzc7_28",
|
|
533
533
|
selected: "_selected_rrzc7_44 _selected_1vf29_28"
|
|
534
|
-
},
|
|
534
|
+
}, Ee = {
|
|
535
535
|
group: "_group_16vyf_1",
|
|
536
536
|
groupLabel: "_groupLabel_16vyf_7"
|
|
537
|
-
},
|
|
537
|
+
}, De = { label: "_label_tef1a_1" };
|
|
538
538
|
//#endregion
|
|
539
539
|
//#region src/components/FieldLabel.tsx
|
|
540
|
-
function
|
|
541
|
-
let r = `${
|
|
540
|
+
function W({ children: e, htmlFor: t, className: n }) {
|
|
541
|
+
let r = `${De.label} ${n ?? ""}`.trim();
|
|
542
542
|
return t ? /* @__PURE__ */ _("label", {
|
|
543
543
|
className: r,
|
|
544
544
|
htmlFor: t,
|
|
@@ -550,36 +550,36 @@ function U({ children: e, htmlFor: t, className: n }) {
|
|
|
550
550
|
}
|
|
551
551
|
//#endregion
|
|
552
552
|
//#region src/components/TagGroup.tsx
|
|
553
|
-
function
|
|
553
|
+
function Oe({ items: e, value: t, onChange: n, size: r = "base", disabled: i = !1, label: a, ...o }) {
|
|
554
554
|
function s(e) {
|
|
555
555
|
n(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
556
556
|
}
|
|
557
557
|
let c = /* @__PURE__ */ _("div", {
|
|
558
558
|
role: "group",
|
|
559
559
|
"aria-label": a ? void 0 : o["aria-label"],
|
|
560
|
-
className: `${
|
|
560
|
+
className: `${Te.group} ${Te[r]}`,
|
|
561
561
|
children: e.map((e) => {
|
|
562
562
|
let n = t.includes(e.value), r = i || e.disabled;
|
|
563
563
|
return /* @__PURE__ */ _("button", {
|
|
564
564
|
type: "button",
|
|
565
565
|
"aria-pressed": n,
|
|
566
566
|
disabled: r,
|
|
567
|
-
className: [
|
|
567
|
+
className: [Te.chip, n && Te.selected].filter(Boolean).join(" "),
|
|
568
568
|
onClick: () => !r && s(e.value),
|
|
569
569
|
children: e.label
|
|
570
570
|
}, e.value);
|
|
571
571
|
})
|
|
572
572
|
});
|
|
573
573
|
return a ? /* @__PURE__ */ v("div", {
|
|
574
|
-
className:
|
|
574
|
+
className: Ee.group,
|
|
575
575
|
...o,
|
|
576
|
-
children: [/* @__PURE__ */ _(
|
|
577
|
-
className:
|
|
576
|
+
children: [/* @__PURE__ */ _(W, {
|
|
577
|
+
className: Ee.groupLabel,
|
|
578
578
|
children: a
|
|
579
579
|
}), c]
|
|
580
580
|
}) : c;
|
|
581
581
|
}
|
|
582
|
-
var
|
|
582
|
+
var ke = {
|
|
583
583
|
toolbar: "_toolbar_17vse_1",
|
|
584
584
|
searchWrap: "_searchWrap_17vse_14",
|
|
585
585
|
searchIcon: "_searchIcon_17vse_33",
|
|
@@ -589,7 +589,7 @@ var Ae = {
|
|
|
589
589
|
};
|
|
590
590
|
//#endregion
|
|
591
591
|
//#region src/components/Toolbar.tsx
|
|
592
|
-
function
|
|
592
|
+
function Ae({ searchValue: e, onSearchChange: t, placeholder: n = "Search…", shortcutLabel: r = "⌘K", shortcutKey: i = "k", children: a }) {
|
|
593
593
|
let o = p(null);
|
|
594
594
|
return l(() => {
|
|
595
595
|
function e(e) {
|
|
@@ -597,36 +597,36 @@ function je({ searchValue: e, onSearchChange: t, placeholder: n = "Search…", s
|
|
|
597
597
|
}
|
|
598
598
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
599
599
|
}, [i]), /* @__PURE__ */ v("div", {
|
|
600
|
-
className:
|
|
600
|
+
className: ke.toolbar,
|
|
601
601
|
children: [/* @__PURE__ */ v("div", {
|
|
602
|
-
className:
|
|
602
|
+
className: ke.searchWrap,
|
|
603
603
|
children: [
|
|
604
604
|
/* @__PURE__ */ _("span", {
|
|
605
|
-
className:
|
|
606
|
-
children: /* @__PURE__ */ _(
|
|
605
|
+
className: ke.searchIcon,
|
|
606
|
+
children: /* @__PURE__ */ _(_e, {})
|
|
607
607
|
}),
|
|
608
608
|
/* @__PURE__ */ _("input", {
|
|
609
609
|
ref: o,
|
|
610
610
|
type: "text",
|
|
611
|
-
className:
|
|
611
|
+
className: ke.search,
|
|
612
612
|
placeholder: n,
|
|
613
613
|
autoComplete: "off",
|
|
614
614
|
value: e,
|
|
615
615
|
onChange: (e) => t?.(e.target.value)
|
|
616
616
|
}),
|
|
617
617
|
r && /* @__PURE__ */ _("span", {
|
|
618
|
-
className:
|
|
618
|
+
className: ke.searchShortcut,
|
|
619
619
|
"aria-hidden": "true",
|
|
620
620
|
children: r
|
|
621
621
|
})
|
|
622
622
|
]
|
|
623
623
|
}), a && /* @__PURE__ */ _("div", {
|
|
624
|
-
className:
|
|
624
|
+
className: ke.controls,
|
|
625
625
|
children: a
|
|
626
626
|
})]
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
|
-
var
|
|
629
|
+
var je = {
|
|
630
630
|
anchor: "_anchor_bty8b_3",
|
|
631
631
|
sentinel: "_sentinel_bty8b_8",
|
|
632
632
|
header: "_header_bty8b_17",
|
|
@@ -634,8 +634,8 @@ var Me = {
|
|
|
634
634
|
animated: "_animated_bty8b_57",
|
|
635
635
|
left: "_left_bty8b_66",
|
|
636
636
|
right: "_right_bty8b_67"
|
|
637
|
-
},
|
|
638
|
-
function
|
|
637
|
+
}, Me = 16;
|
|
638
|
+
function Ne(e) {
|
|
639
639
|
let t = e.parentElement;
|
|
640
640
|
for (; t && t !== document.body && t !== document.documentElement;) {
|
|
641
641
|
let { overflowY: e } = getComputedStyle(t);
|
|
@@ -644,7 +644,7 @@ function Pe(e) {
|
|
|
644
644
|
}
|
|
645
645
|
return null;
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function Pe({ left: e, right: t, children: n, scrollRoot: r, threshold: i = Me, onStateChange: a, className: o, "data-testid": s = "header" }) {
|
|
648
648
|
let c = p(null), [u, d] = m("top"), [f, h] = m(!1), y = p(a);
|
|
649
649
|
l(() => {
|
|
650
650
|
y.current = a;
|
|
@@ -656,7 +656,7 @@ function Fe({ left: e, right: t, children: n, scrollRoot: r, threshold: i = Ne,
|
|
|
656
656
|
let e = c.current;
|
|
657
657
|
if (!e) return;
|
|
658
658
|
let t, n, i = !0, a = 0, o = () => {
|
|
659
|
-
let o = r === void 0 ?
|
|
659
|
+
let o = r === void 0 ? Ne(e) : r;
|
|
660
660
|
t && o === n || (t?.disconnect(), n = o, t = new IntersectionObserver((e) => {
|
|
661
661
|
let t = e[e.length - 1];
|
|
662
662
|
d(t.isIntersecting ? "top" : "floating"), i && (i = !1, a = requestAnimationFrame(() => h(!0)));
|
|
@@ -667,35 +667,35 @@ function Fe({ left: e, right: t, children: n, scrollRoot: r, threshold: i = Ne,
|
|
|
667
667
|
};
|
|
668
668
|
}, [r, i]);
|
|
669
669
|
let x = [
|
|
670
|
-
|
|
671
|
-
f ?
|
|
670
|
+
je.card,
|
|
671
|
+
f ? je.animated : "",
|
|
672
672
|
o
|
|
673
673
|
].filter(Boolean).join(" ");
|
|
674
674
|
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
|
|
675
|
-
className:
|
|
675
|
+
className: je.anchor,
|
|
676
676
|
"aria-hidden": "true",
|
|
677
677
|
children: /* @__PURE__ */ _("div", {
|
|
678
678
|
ref: c,
|
|
679
|
-
className:
|
|
679
|
+
className: je.sentinel,
|
|
680
680
|
style: { top: i }
|
|
681
681
|
})
|
|
682
682
|
}), /* @__PURE__ */ _("header", {
|
|
683
|
-
className:
|
|
683
|
+
className: je.header,
|
|
684
684
|
"data-testid": s,
|
|
685
685
|
children: /* @__PURE__ */ _("div", {
|
|
686
686
|
className: x,
|
|
687
687
|
"data-state": u,
|
|
688
688
|
children: n ?? /* @__PURE__ */ v(g, { children: [e && /* @__PURE__ */ _("div", {
|
|
689
|
-
className:
|
|
689
|
+
className: je.left,
|
|
690
690
|
children: e
|
|
691
691
|
}), t && /* @__PURE__ */ _("div", {
|
|
692
|
-
className:
|
|
692
|
+
className: je.right,
|
|
693
693
|
children: t
|
|
694
694
|
})] })
|
|
695
695
|
})
|
|
696
696
|
})] });
|
|
697
697
|
}
|
|
698
|
-
var
|
|
698
|
+
var Fe = {
|
|
699
699
|
checkbox: "_checkbox_fknu2_1",
|
|
700
700
|
control: "_control_fknu2_8",
|
|
701
701
|
labelText: "_labelText_fknu2_17",
|
|
@@ -706,15 +706,15 @@ var Ie = {
|
|
|
706
706
|
};
|
|
707
707
|
//#endregion
|
|
708
708
|
//#region src/components/Checkbox.tsx
|
|
709
|
-
function
|
|
709
|
+
function Ie({ checked: e, onChange: t, onBlur: n, name: r, label: i, ariaLabel: a, disabled: o, className: s, ref: c }) {
|
|
710
710
|
return /* @__PURE__ */ v("label", {
|
|
711
|
-
className: `${
|
|
711
|
+
className: `${Fe.checkbox} ${s ?? ""}`,
|
|
712
712
|
children: [/* @__PURE__ */ v("span", {
|
|
713
|
-
className:
|
|
713
|
+
className: Fe.control,
|
|
714
714
|
children: [/* @__PURE__ */ _("input", {
|
|
715
715
|
ref: c,
|
|
716
716
|
type: "checkbox",
|
|
717
|
-
className:
|
|
717
|
+
className: Fe.input,
|
|
718
718
|
checked: e,
|
|
719
719
|
onChange: t,
|
|
720
720
|
onBlur: n,
|
|
@@ -722,46 +722,46 @@ function Le({ checked: e, onChange: t, onBlur: n, name: r, label: i, ariaLabel:
|
|
|
722
722
|
"aria-label": a,
|
|
723
723
|
disabled: o
|
|
724
724
|
}), /* @__PURE__ */ _("span", {
|
|
725
|
-
className:
|
|
725
|
+
className: Fe.box,
|
|
726
726
|
children: /* @__PURE__ */ _("svg", {
|
|
727
|
-
className:
|
|
727
|
+
className: Fe.icon,
|
|
728
728
|
viewBox: "0 0 17 18",
|
|
729
729
|
"aria-hidden": "true",
|
|
730
730
|
children: /* @__PURE__ */ _("polyline", { points: "1 9 7 14 15 4" })
|
|
731
731
|
})
|
|
732
732
|
})]
|
|
733
733
|
}), i && /* @__PURE__ */ _("span", {
|
|
734
|
-
className:
|
|
734
|
+
className: Fe.labelText,
|
|
735
735
|
children: i
|
|
736
736
|
})]
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Le({ checked: e, disabled: t }) {
|
|
740
740
|
return /* @__PURE__ */ _("span", {
|
|
741
|
-
className: `${
|
|
741
|
+
className: `${Fe.box} ${Fe.indicator}`,
|
|
742
742
|
"data-checked": e,
|
|
743
743
|
"data-disabled": t || void 0,
|
|
744
744
|
"aria-hidden": "true",
|
|
745
745
|
children: /* @__PURE__ */ _("svg", {
|
|
746
|
-
className:
|
|
746
|
+
className: Fe.icon,
|
|
747
747
|
viewBox: "0 0 17 18",
|
|
748
748
|
"aria-hidden": "true",
|
|
749
749
|
children: /* @__PURE__ */ _("polyline", { points: "1 9 7 14 15 4" })
|
|
750
750
|
})
|
|
751
751
|
});
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function Re({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
754
754
|
function o(e) {
|
|
755
755
|
r(n.includes(e) ? n.filter((t) => t !== e) : [...n, e]);
|
|
756
756
|
}
|
|
757
757
|
return /* @__PURE__ */ v("div", {
|
|
758
758
|
role: "group",
|
|
759
759
|
"aria-label": e ? void 0 : a["aria-label"],
|
|
760
|
-
className:
|
|
761
|
-
children: [e && /* @__PURE__ */ _(
|
|
762
|
-
className:
|
|
760
|
+
className: Ee.group,
|
|
761
|
+
children: [e && /* @__PURE__ */ _(W, {
|
|
762
|
+
className: Ee.groupLabel,
|
|
763
763
|
children: e
|
|
764
|
-
}), t.map((e) => /* @__PURE__ */ _(
|
|
764
|
+
}), t.map((e) => /* @__PURE__ */ _(Ie, {
|
|
765
765
|
checked: n.includes(e.value),
|
|
766
766
|
onChange: () => o(e.value),
|
|
767
767
|
label: e.label,
|
|
@@ -769,7 +769,7 @@ function ze({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
|
769
769
|
}, e.value))]
|
|
770
770
|
});
|
|
771
771
|
}
|
|
772
|
-
var
|
|
772
|
+
var ze = {
|
|
773
773
|
radio: "_radio_46a3j_1",
|
|
774
774
|
control: "_control_46a3j_8",
|
|
775
775
|
labelText: "_labelText_46a3j_17",
|
|
@@ -779,15 +779,15 @@ var Be = {
|
|
|
779
779
|
};
|
|
780
780
|
//#endregion
|
|
781
781
|
//#region src/components/RadioButton.tsx
|
|
782
|
-
function
|
|
782
|
+
function Be({ checked: e, onChange: t, onBlur: n, name: r, value: i, label: a, ariaLabel: o, disabled: s, className: c, ref: l }) {
|
|
783
783
|
return /* @__PURE__ */ v("label", {
|
|
784
|
-
className: `${
|
|
784
|
+
className: `${ze.radio} ${c ?? ""}`,
|
|
785
785
|
children: [/* @__PURE__ */ v("span", {
|
|
786
|
-
className:
|
|
786
|
+
className: ze.control,
|
|
787
787
|
children: [/* @__PURE__ */ _("input", {
|
|
788
788
|
ref: l,
|
|
789
789
|
type: "radio",
|
|
790
|
-
className:
|
|
790
|
+
className: ze.input,
|
|
791
791
|
checked: e,
|
|
792
792
|
onChange: t,
|
|
793
793
|
onBlur: n,
|
|
@@ -796,24 +796,24 @@ function Ve({ checked: e, onChange: t, onBlur: n, name: r, value: i, label: a, a
|
|
|
796
796
|
"aria-label": o,
|
|
797
797
|
disabled: s
|
|
798
798
|
}), /* @__PURE__ */ _("span", {
|
|
799
|
-
className:
|
|
800
|
-
children: /* @__PURE__ */ _("span", { className:
|
|
799
|
+
className: ze.circle,
|
|
800
|
+
children: /* @__PURE__ */ _("span", { className: ze.dot })
|
|
801
801
|
})]
|
|
802
802
|
}), a && /* @__PURE__ */ _("span", {
|
|
803
|
-
className:
|
|
803
|
+
className: ze.labelText,
|
|
804
804
|
children: a
|
|
805
805
|
})]
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function Ve({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, ...o }) {
|
|
809
809
|
return /* @__PURE__ */ v("div", {
|
|
810
810
|
role: "radiogroup",
|
|
811
811
|
"aria-label": e ? void 0 : o["aria-label"],
|
|
812
|
-
className:
|
|
813
|
-
children: [e && /* @__PURE__ */ _(
|
|
814
|
-
className:
|
|
812
|
+
className: Ee.group,
|
|
813
|
+
children: [e && /* @__PURE__ */ _(W, {
|
|
814
|
+
className: Ee.groupLabel,
|
|
815
815
|
children: e
|
|
816
|
-
}), n.map((e) => /* @__PURE__ */ _(
|
|
816
|
+
}), n.map((e) => /* @__PURE__ */ _(Be, {
|
|
817
817
|
name: t,
|
|
818
818
|
value: e.value,
|
|
819
819
|
checked: r === e.value,
|
|
@@ -823,7 +823,7 @@ function He({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, .
|
|
|
823
823
|
}, e.value))]
|
|
824
824
|
});
|
|
825
825
|
}
|
|
826
|
-
var
|
|
826
|
+
var He = {
|
|
827
827
|
switch: "_switch_2mkka_1",
|
|
828
828
|
input: "_input_2mkka_7",
|
|
829
829
|
control: "_control_2mkka_10",
|
|
@@ -835,30 +835,30 @@ var Ue = {
|
|
|
835
835
|
};
|
|
836
836
|
//#endregion
|
|
837
837
|
//#region src/components/Switch.tsx
|
|
838
|
-
function
|
|
838
|
+
function Ue({ checked: e, onChange: t, size: n = "base", label: r, ariaLabel: i, disabled: a, className: o }) {
|
|
839
839
|
return /* @__PURE__ */ v("label", {
|
|
840
|
-
className: `${
|
|
840
|
+
className: `${He.switch} ${o ?? ""}`,
|
|
841
841
|
children: [/* @__PURE__ */ v("span", {
|
|
842
|
-
className: `${
|
|
842
|
+
className: `${He.control} ${He[n]}`,
|
|
843
843
|
children: [/* @__PURE__ */ _("input", {
|
|
844
844
|
type: "checkbox",
|
|
845
845
|
role: "switch",
|
|
846
|
-
className:
|
|
846
|
+
className: He.input,
|
|
847
847
|
checked: e,
|
|
848
848
|
onChange: t,
|
|
849
849
|
"aria-label": i,
|
|
850
850
|
disabled: a
|
|
851
851
|
}), /* @__PURE__ */ _("span", {
|
|
852
|
-
className:
|
|
853
|
-
children: /* @__PURE__ */ _("span", { className:
|
|
852
|
+
className: He.track,
|
|
853
|
+
children: /* @__PURE__ */ _("span", { className: He.thumb })
|
|
854
854
|
})]
|
|
855
855
|
}), r && /* @__PURE__ */ _("span", {
|
|
856
|
-
className:
|
|
856
|
+
className: He.labelText,
|
|
857
857
|
children: r
|
|
858
858
|
})]
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
|
-
var
|
|
861
|
+
var G = {
|
|
862
862
|
field: "_field_f8lam_1",
|
|
863
863
|
inputWrap: "_inputWrap_f8lam_6",
|
|
864
864
|
input: "_input_f8lam_6",
|
|
@@ -873,42 +873,42 @@ var W = {
|
|
|
873
873
|
pickerInput: "_pickerInput_f8lam_165",
|
|
874
874
|
shortcut: "_shortcut_f8lam_173",
|
|
875
875
|
kbd: "_kbd_f8lam_181"
|
|
876
|
-
},
|
|
876
|
+
}, We = () => typeof navigator < "u" && /mac|iphone|ipad/i.test(navigator.platform), Ge = {
|
|
877
877
|
alt: "⌥",
|
|
878
878
|
shift: "⇧",
|
|
879
879
|
ctrl: "Ctrl",
|
|
880
880
|
enter: "↵",
|
|
881
881
|
esc: "Esc"
|
|
882
882
|
};
|
|
883
|
-
function
|
|
884
|
-
let t =
|
|
885
|
-
return a.push(
|
|
883
|
+
function Ke(e) {
|
|
884
|
+
let t = We(), n = e.toLowerCase().split("+").map((e) => e.trim()), r = n[n.length - 1], i = new Set(n.slice(0, -1)), a = [...i].map((e) => e === "mod" ? t ? "⌘" : "Ctrl" : Ge[e] ?? e);
|
|
885
|
+
return a.push(Ge[r] ?? r.toUpperCase()), {
|
|
886
886
|
key: r,
|
|
887
887
|
mods: i,
|
|
888
888
|
mac: t,
|
|
889
889
|
labels: a
|
|
890
890
|
};
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function qe({ label: e, helperText: t, error: n, size: r = "base", variant: i = "default", leadingIcon: a, shortcut: o, id: s, className: c, ref: d, ...f }) {
|
|
893
893
|
let m = u(), h = s ?? m, g = p(null);
|
|
894
894
|
return l(() => {
|
|
895
895
|
if (!o) return;
|
|
896
|
-
let { key: e, mods: t, mac: n } =
|
|
896
|
+
let { key: e, mods: t, mac: n } = Ke(o), r = (r) => {
|
|
897
897
|
r.key.toLowerCase() === e && (n ? r.metaKey : r.ctrlKey) === (t.has("mod") || !n && t.has("ctrl")) && r.altKey === t.has("alt") && r.shiftKey === t.has("shift") && (r.preventDefault(), g.current?.focus());
|
|
898
898
|
};
|
|
899
899
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
900
900
|
}, [o]), /* @__PURE__ */ v("div", {
|
|
901
|
-
className: [
|
|
901
|
+
className: [G.field, c].filter(Boolean).join(" "),
|
|
902
902
|
children: [
|
|
903
|
-
e && /* @__PURE__ */ _(
|
|
903
|
+
e && /* @__PURE__ */ _(W, {
|
|
904
904
|
htmlFor: h,
|
|
905
905
|
children: e
|
|
906
906
|
}),
|
|
907
907
|
/* @__PURE__ */ v("div", {
|
|
908
|
-
className: `${
|
|
908
|
+
className: `${G.inputWrap} ${G[i]} ${G[r]} ${n ? G.errorWrap : ""}`,
|
|
909
909
|
children: [
|
|
910
910
|
a && /* @__PURE__ */ _("span", {
|
|
911
|
-
className:
|
|
911
|
+
className: G.icon,
|
|
912
912
|
children: a
|
|
913
913
|
}),
|
|
914
914
|
/* @__PURE__ */ _("input", {
|
|
@@ -916,30 +916,30 @@ function Je({ label: e, helperText: t, error: n, size: r = "base", variant: i =
|
|
|
916
916
|
g.current = e, typeof d == "function" ? d(e) : d && (d.current = e);
|
|
917
917
|
},
|
|
918
918
|
id: h,
|
|
919
|
-
className:
|
|
919
|
+
className: G.input,
|
|
920
920
|
...f
|
|
921
921
|
}),
|
|
922
922
|
o && /* @__PURE__ */ _("span", {
|
|
923
|
-
className:
|
|
923
|
+
className: G.shortcut,
|
|
924
924
|
"aria-hidden": "true",
|
|
925
|
-
children:
|
|
926
|
-
className:
|
|
925
|
+
children: Ke(o).labels.map((e) => /* @__PURE__ */ _("kbd", {
|
|
926
|
+
className: G.kbd,
|
|
927
927
|
children: e
|
|
928
928
|
}, e))
|
|
929
929
|
})
|
|
930
930
|
]
|
|
931
931
|
}),
|
|
932
932
|
n ? /* @__PURE__ */ _("span", {
|
|
933
|
-
className:
|
|
933
|
+
className: G.errorText,
|
|
934
934
|
children: n
|
|
935
935
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
936
|
-
className:
|
|
936
|
+
className: G.helperText,
|
|
937
937
|
children: t
|
|
938
938
|
}) : null
|
|
939
939
|
]
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
|
-
var
|
|
942
|
+
var K = {
|
|
943
943
|
field: "_field_9sqb4_3",
|
|
944
944
|
wrap: "_wrap_9sqb4_1",
|
|
945
945
|
readOnly: "_readOnly_9sqb4_14",
|
|
@@ -959,10 +959,10 @@ var G = {
|
|
|
959
959
|
};
|
|
960
960
|
//#endregion
|
|
961
961
|
//#region src/components/TextArea.tsx
|
|
962
|
-
function
|
|
962
|
+
function Je(e, t) {
|
|
963
963
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function Ye({ label: e, helperText: t, error: n, size: r = "base", resize: i = "vertical", autoResize: a = !1, maxRows: o = 8, showCount: c = !1, id: l, className: f, ref: h, rows: g = 3, value: y, defaultValue: b, maxLength: x, disabled: S, readOnly: C, onChange: w, onInput: T, "aria-describedby": E, ...D }) {
|
|
966
966
|
let O = u(), k = l ?? O, A = p(null), j = y !== void 0, [M, N] = m(() => String(b ?? "").length), P = j ? String(y).length : M, F = s(() => {
|
|
967
967
|
let e = A.current;
|
|
968
968
|
if (!e || !a) return;
|
|
@@ -993,21 +993,21 @@ function Xe({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
993
993
|
j || N(e.target.value.length), w?.(e);
|
|
994
994
|
}, I = (e) => {
|
|
995
995
|
j || (N(e.currentTarget.value.length), F()), T?.(e);
|
|
996
|
-
}, L = `${k}-helper`, R = `${k}-error`, z = `${k}-count`,
|
|
996
|
+
}, L = `${k}-helper`, R = `${k}-error`, z = `${k}-count`, te = [
|
|
997
997
|
E,
|
|
998
998
|
n ? R : t ? L : null,
|
|
999
999
|
c ? z : null
|
|
1000
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
n ?
|
|
1004
|
-
S ?
|
|
1005
|
-
C ?
|
|
1000
|
+
].filter(Boolean).join(" ") || void 0, ne = x ? P / x : 0, B = ne >= 1 ? K.countLimit : ne >= .9 ? K.countNear : "", re = [
|
|
1001
|
+
K.wrap,
|
|
1002
|
+
K[r],
|
|
1003
|
+
n ? K.errorWrap : "",
|
|
1004
|
+
S ? K.disabled : "",
|
|
1005
|
+
C ? K.readOnly : ""
|
|
1006
1006
|
].filter(Boolean).join(" "), ie = a ? "none" : i;
|
|
1007
1007
|
return /* @__PURE__ */ v("div", {
|
|
1008
|
-
className: [
|
|
1008
|
+
className: [K.field, f].filter(Boolean).join(" "),
|
|
1009
1009
|
children: [
|
|
1010
|
-
e && /* @__PURE__ */ _(
|
|
1010
|
+
e && /* @__PURE__ */ _(W, {
|
|
1011
1011
|
htmlFor: k,
|
|
1012
1012
|
children: e
|
|
1013
1013
|
}),
|
|
@@ -1016,10 +1016,10 @@ function Xe({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1016
1016
|
children: /* @__PURE__ */ _("textarea", {
|
|
1017
1017
|
...D,
|
|
1018
1018
|
ref: (e) => {
|
|
1019
|
-
A.current = e,
|
|
1019
|
+
A.current = e, Je(h, e);
|
|
1020
1020
|
},
|
|
1021
1021
|
id: k,
|
|
1022
|
-
className: `${
|
|
1022
|
+
className: `${K.textarea} ${K[`resize-${ie}`]}`,
|
|
1023
1023
|
rows: g,
|
|
1024
1024
|
value: y,
|
|
1025
1025
|
defaultValue: b,
|
|
@@ -1027,24 +1027,24 @@ function Xe({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1027
1027
|
disabled: S,
|
|
1028
1028
|
readOnly: C,
|
|
1029
1029
|
"aria-invalid": n ? !0 : D["aria-invalid"],
|
|
1030
|
-
"aria-describedby":
|
|
1030
|
+
"aria-describedby": te,
|
|
1031
1031
|
onChange: ee,
|
|
1032
1032
|
onInput: I
|
|
1033
1033
|
})
|
|
1034
1034
|
}),
|
|
1035
1035
|
(n || t || c) && /* @__PURE__ */ v("div", {
|
|
1036
|
-
className:
|
|
1036
|
+
className: K.footer,
|
|
1037
1037
|
children: [n ? /* @__PURE__ */ _("span", {
|
|
1038
1038
|
id: R,
|
|
1039
|
-
className:
|
|
1039
|
+
className: K.errorText,
|
|
1040
1040
|
children: n
|
|
1041
1041
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
1042
1042
|
id: L,
|
|
1043
|
-
className:
|
|
1043
|
+
className: K.helperText,
|
|
1044
1044
|
children: t
|
|
1045
1045
|
}) : null, c && /* @__PURE__ */ _("span", {
|
|
1046
1046
|
id: z,
|
|
1047
|
-
className: `${
|
|
1047
|
+
className: `${K.count} ${B}`,
|
|
1048
1048
|
children: x ? `${P} / ${x}` : P
|
|
1049
1049
|
})]
|
|
1050
1050
|
})
|
|
@@ -1053,41 +1053,41 @@ function Xe({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1053
1053
|
}
|
|
1054
1054
|
//#endregion
|
|
1055
1055
|
//#region src/components/PasswordField.tsx
|
|
1056
|
-
function
|
|
1056
|
+
function Xe({ label: e, helperText: t, error: n, size: r = "base", showLabel: i = "Show password", hideLabel: a = "Hide password", defaultVisible: o = !1, id: s, className: c, ref: l, disabled: d, ...f }) {
|
|
1057
1057
|
let p = u(), h = s ?? p, [g, y] = m(o);
|
|
1058
1058
|
return /* @__PURE__ */ v("div", {
|
|
1059
|
-
className: [
|
|
1059
|
+
className: [G.field, c].filter(Boolean).join(" "),
|
|
1060
1060
|
children: [
|
|
1061
|
-
e && /* @__PURE__ */ _(
|
|
1061
|
+
e && /* @__PURE__ */ _(W, {
|
|
1062
1062
|
htmlFor: h,
|
|
1063
1063
|
children: e
|
|
1064
1064
|
}),
|
|
1065
1065
|
/* @__PURE__ */ v("div", {
|
|
1066
|
-
className: `${
|
|
1066
|
+
className: `${G.inputWrap} ${G.default} ${G[r]} ${n ? G.errorWrap : ""}`,
|
|
1067
1067
|
children: [/* @__PURE__ */ _("input", {
|
|
1068
1068
|
ref: l,
|
|
1069
1069
|
id: h,
|
|
1070
|
-
className:
|
|
1070
|
+
className: G.input,
|
|
1071
1071
|
type: g ? "text" : "password",
|
|
1072
1072
|
autoComplete: "off",
|
|
1073
1073
|
disabled: d,
|
|
1074
1074
|
...f
|
|
1075
1075
|
}), /* @__PURE__ */ _("button", {
|
|
1076
1076
|
type: "button",
|
|
1077
|
-
className:
|
|
1077
|
+
className: G.trailing,
|
|
1078
1078
|
"aria-label": g ? a : i,
|
|
1079
1079
|
"aria-pressed": g,
|
|
1080
1080
|
"aria-controls": h,
|
|
1081
1081
|
disabled: d,
|
|
1082
1082
|
onClick: () => y((e) => !e),
|
|
1083
|
-
children: _(g ? de :
|
|
1083
|
+
children: _(g ? de : pe, {})
|
|
1084
1084
|
})]
|
|
1085
1085
|
}),
|
|
1086
1086
|
n ? /* @__PURE__ */ _("span", {
|
|
1087
|
-
className:
|
|
1087
|
+
className: G.errorText,
|
|
1088
1088
|
children: n
|
|
1089
1089
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
1090
|
-
className:
|
|
1090
|
+
className: G.helperText,
|
|
1091
1091
|
children: t
|
|
1092
1092
|
}) : null
|
|
1093
1093
|
]
|
|
@@ -1095,25 +1095,25 @@ function Ze({ label: e, helperText: t, error: n, size: r = "base", showLabel: i
|
|
|
1095
1095
|
}
|
|
1096
1096
|
//#endregion
|
|
1097
1097
|
//#region src/components/DateField.tsx
|
|
1098
|
-
function
|
|
1098
|
+
function Ze({ label: e, helperText: t, error: n, size: r = "base", openLabel: i = "Open calendar", id: a, className: o, ref: s, onClick: c, disabled: l, ...d }) {
|
|
1099
1099
|
let f = u(), m = a ?? f, h = p(null);
|
|
1100
1100
|
function g(e) {
|
|
1101
1101
|
h.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
1102
1102
|
}
|
|
1103
1103
|
return /* @__PURE__ */ v("div", {
|
|
1104
|
-
className: [
|
|
1104
|
+
className: [G.field, o].filter(Boolean).join(" "),
|
|
1105
1105
|
children: [
|
|
1106
|
-
e && /* @__PURE__ */ _(
|
|
1106
|
+
e && /* @__PURE__ */ _(W, {
|
|
1107
1107
|
htmlFor: m,
|
|
1108
1108
|
children: e
|
|
1109
1109
|
}),
|
|
1110
1110
|
/* @__PURE__ */ v("div", {
|
|
1111
|
-
className: `${
|
|
1111
|
+
className: `${G.inputWrap} ${G.default} ${G[r]} ${n ? G.errorWrap : ""}`,
|
|
1112
1112
|
children: [/* @__PURE__ */ _("input", {
|
|
1113
1113
|
...d,
|
|
1114
1114
|
ref: g,
|
|
1115
1115
|
id: m,
|
|
1116
|
-
className: `${
|
|
1116
|
+
className: `${G.input} ${G.pickerInput}`,
|
|
1117
1117
|
inputMode: "none",
|
|
1118
1118
|
readOnly: !0,
|
|
1119
1119
|
disabled: l,
|
|
@@ -1121,7 +1121,7 @@ function Qe({ label: e, helperText: t, error: n, size: r = "base", openLabel: i
|
|
|
1121
1121
|
}), /* @__PURE__ */ _("button", {
|
|
1122
1122
|
type: "button",
|
|
1123
1123
|
tabIndex: -1,
|
|
1124
|
-
className:
|
|
1124
|
+
className: G.trailing,
|
|
1125
1125
|
"aria-label": i,
|
|
1126
1126
|
disabled: l,
|
|
1127
1127
|
onClick: () => h.current?.click(),
|
|
@@ -1129,10 +1129,10 @@ function Qe({ label: e, helperText: t, error: n, size: r = "base", openLabel: i
|
|
|
1129
1129
|
})]
|
|
1130
1130
|
}),
|
|
1131
1131
|
n ? /* @__PURE__ */ _("span", {
|
|
1132
|
-
className:
|
|
1132
|
+
className: G.errorText,
|
|
1133
1133
|
children: n
|
|
1134
1134
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
1135
|
-
className:
|
|
1135
|
+
className: G.helperText,
|
|
1136
1136
|
children: t
|
|
1137
1137
|
}) : null
|
|
1138
1138
|
]
|
|
@@ -1140,44 +1140,44 @@ function Qe({ label: e, helperText: t, error: n, size: r = "base", openLabel: i
|
|
|
1140
1140
|
}
|
|
1141
1141
|
//#endregion
|
|
1142
1142
|
//#region src/utils/date.ts
|
|
1143
|
-
function
|
|
1143
|
+
function Qe(e) {
|
|
1144
1144
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function $e(e, t) {
|
|
1147
1147
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1149
|
+
function et(e, t) {
|
|
1150
1150
|
return new Date(e, t + 1, 0).getDate();
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1153
|
-
let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = Math.min(e.getDate(),
|
|
1152
|
+
function tt(e, t) {
|
|
1153
|
+
let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = Math.min(e.getDate(), et(n.getFullYear(), n.getMonth()));
|
|
1154
1154
|
return new Date(n.getFullYear(), n.getMonth(), r);
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1156
|
+
function nt(e, t) {
|
|
1157
1157
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1159
|
+
function rt(e, t) {
|
|
1160
1160
|
return e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate();
|
|
1161
1161
|
}
|
|
1162
|
+
function it(e, t, n) {
|
|
1163
|
+
return !!(t && rt(e, t) < 0 || n && rt(e, n) > 0);
|
|
1164
|
+
}
|
|
1162
1165
|
function at(e, t, n) {
|
|
1163
|
-
return
|
|
1166
|
+
return t && rt(e, t) < 0 ? Qe(t) : n && rt(e, n) > 0 ? Qe(n) : Qe(e);
|
|
1164
1167
|
}
|
|
1165
|
-
function ot(e, t
|
|
1166
|
-
return
|
|
1168
|
+
function ot(e, t) {
|
|
1169
|
+
return $e(e, -((e.getDay() - t + 7) % 7));
|
|
1167
1170
|
}
|
|
1168
1171
|
function st(e, t) {
|
|
1169
|
-
return
|
|
1172
|
+
return $e(ot(e, t), 6);
|
|
1170
1173
|
}
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
function ut(e, t, n) {
|
|
1176
|
-
let r = st(new Date(e, t, 1), n), i = [];
|
|
1177
|
-
for (let e = 0; e < lt; e++) {
|
|
1174
|
+
var ct = 6;
|
|
1175
|
+
function lt(e, t, n) {
|
|
1176
|
+
let r = ot(new Date(e, t, 1), n), i = [];
|
|
1177
|
+
for (let e = 0; e < ct; e++) {
|
|
1178
1178
|
let n = [];
|
|
1179
1179
|
for (let i = 0; i < 7; i++) {
|
|
1180
|
-
let a =
|
|
1180
|
+
let a = $e(r, e * 7 + i);
|
|
1181
1181
|
n.push({
|
|
1182
1182
|
date: a,
|
|
1183
1183
|
inMonth: a.getMonth() === t
|
|
@@ -1187,7 +1187,7 @@ function ut(e, t, n) {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
return i;
|
|
1189
1189
|
}
|
|
1190
|
-
var
|
|
1190
|
+
var q = {
|
|
1191
1191
|
calendar: "_calendar_12ign_1",
|
|
1192
1192
|
header: "_header_12ign_7",
|
|
1193
1193
|
navButton: "_navButton_12ign_13",
|
|
@@ -1200,22 +1200,22 @@ var K = {
|
|
|
1200
1200
|
disabled: "_disabled_12ign_61",
|
|
1201
1201
|
outside: "_outside_12ign_68",
|
|
1202
1202
|
today: "_today_12ign_71"
|
|
1203
|
-
},
|
|
1204
|
-
function
|
|
1203
|
+
}, ut = (e) => `${e.getFullYear()}-${e.getMonth() + 1}-${e.getDate()}`;
|
|
1204
|
+
function dt(e, t) {
|
|
1205
1205
|
return e.charAt(0).toLocaleUpperCase(t) + e.slice(1);
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1208
|
-
let [h, g] = m(() =>
|
|
1209
|
-
y !== b && (x(y), e && g(
|
|
1207
|
+
function ft({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", weekStartsOn: a = 0, autoFocus: o, previousMonthLabel: s = "Previous month", nextMonthLabel: c = "Next month", className: d }) {
|
|
1208
|
+
let [h, g] = m(() => at(e ?? /* @__PURE__ */ new Date(), n, r)), y = e ? ut(e) : null, [b, x] = m(y);
|
|
1209
|
+
y !== b && (x(y), e && g(at(e, n, r)));
|
|
1210
1210
|
let S = p(null), C = p(!!o), T = u();
|
|
1211
1211
|
l(() => {
|
|
1212
|
-
C.current && (C.current = !1, S.current?.querySelector(`[data-date="${
|
|
1212
|
+
C.current && (C.current = !1, S.current?.querySelector(`[data-date="${ut(h)}"]`)?.focus());
|
|
1213
1213
|
}, [h]);
|
|
1214
|
-
let E = h.getFullYear(), D = h.getMonth(), O = f(() =>
|
|
1214
|
+
let E = h.getFullYear(), D = h.getMonth(), O = f(() => lt(E, D, a), [
|
|
1215
1215
|
E,
|
|
1216
1216
|
D,
|
|
1217
1217
|
a
|
|
1218
|
-
]), k =
|
|
1218
|
+
]), k = Qe(/* @__PURE__ */ new Date()), A = f(() => ({
|
|
1219
1219
|
title: new Intl.DateTimeFormat(i, {
|
|
1220
1220
|
month: "long",
|
|
1221
1221
|
year: "numeric"
|
|
@@ -1224,57 +1224,57 @@ function pt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1224
1224
|
long: new Intl.DateTimeFormat(i, { weekday: "long" }),
|
|
1225
1225
|
full: new Intl.DateTimeFormat(i, { dateStyle: "full" })
|
|
1226
1226
|
}), [i]), j = O[0].map(({ date: e }) => ({
|
|
1227
|
-
short:
|
|
1227
|
+
short: dt(A.short.format(e), i).slice(0, 2),
|
|
1228
1228
|
long: A.long.format(e)
|
|
1229
|
-
})), M = (e) => !!n && new Date(e.getFullYear(), e.getMonth(), 0) <
|
|
1229
|
+
})), M = (e) => !!n && new Date(e.getFullYear(), e.getMonth(), 0) < Qe(n), N = (e) => !!r && new Date(e.getFullYear(), e.getMonth() + 1, 1) > Qe(r), P = M(h), F = N(h);
|
|
1230
1230
|
function ee(e) {
|
|
1231
|
-
C.current = !0, g(
|
|
1231
|
+
C.current = !0, g(at(e, n, r));
|
|
1232
1232
|
}
|
|
1233
1233
|
function I(e) {
|
|
1234
|
-
let t =
|
|
1234
|
+
let t = at(tt(h, e), n, r);
|
|
1235
1235
|
C.current = e < 0 ? M(t) : N(t), g(t);
|
|
1236
1236
|
}
|
|
1237
1237
|
function L(e) {
|
|
1238
1238
|
let t = null;
|
|
1239
1239
|
switch (e.key) {
|
|
1240
1240
|
case "ArrowLeft":
|
|
1241
|
-
t =
|
|
1241
|
+
t = $e(h, -1);
|
|
1242
1242
|
break;
|
|
1243
1243
|
case "ArrowRight":
|
|
1244
|
-
t =
|
|
1244
|
+
t = $e(h, 1);
|
|
1245
1245
|
break;
|
|
1246
1246
|
case "ArrowUp":
|
|
1247
|
-
t =
|
|
1247
|
+
t = $e(h, -7);
|
|
1248
1248
|
break;
|
|
1249
1249
|
case "ArrowDown":
|
|
1250
|
-
t =
|
|
1250
|
+
t = $e(h, 7);
|
|
1251
1251
|
break;
|
|
1252
1252
|
case "PageUp":
|
|
1253
|
-
t =
|
|
1253
|
+
t = tt(h, -1);
|
|
1254
1254
|
break;
|
|
1255
1255
|
case "PageDown":
|
|
1256
|
-
t =
|
|
1256
|
+
t = tt(h, 1);
|
|
1257
1257
|
break;
|
|
1258
1258
|
case "Home":
|
|
1259
|
-
t =
|
|
1259
|
+
t = ot(h, a);
|
|
1260
1260
|
break;
|
|
1261
|
-
case "End": t =
|
|
1261
|
+
case "End": t = st(h, a);
|
|
1262
1262
|
}
|
|
1263
1263
|
t && (e.preventDefault(), ee(t));
|
|
1264
1264
|
}
|
|
1265
1265
|
function R(e) {
|
|
1266
|
-
let n =
|
|
1266
|
+
let n = Qe(e);
|
|
1267
1267
|
g(n), t(n);
|
|
1268
1268
|
}
|
|
1269
1269
|
return /* @__PURE__ */ v("div", {
|
|
1270
|
-
className: [
|
|
1270
|
+
className: [q.calendar, d].filter(Boolean).join(" "),
|
|
1271
1271
|
children: [/* @__PURE__ */ v("div", {
|
|
1272
|
-
className:
|
|
1272
|
+
className: q.header,
|
|
1273
1273
|
children: [
|
|
1274
1274
|
/* @__PURE__ */ _(w, {
|
|
1275
1275
|
variant: "tertiary",
|
|
1276
1276
|
size: "sm",
|
|
1277
|
-
className:
|
|
1277
|
+
className: q.navButton,
|
|
1278
1278
|
leadingIcon: /* @__PURE__ */ _(se, {}),
|
|
1279
1279
|
"aria-label": s,
|
|
1280
1280
|
disabled: P,
|
|
@@ -1282,14 +1282,14 @@ function pt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1282
1282
|
}),
|
|
1283
1283
|
/* @__PURE__ */ _("div", {
|
|
1284
1284
|
id: T,
|
|
1285
|
-
className:
|
|
1285
|
+
className: q.title,
|
|
1286
1286
|
"aria-live": "polite",
|
|
1287
|
-
children:
|
|
1287
|
+
children: dt(A.title.format(h), i)
|
|
1288
1288
|
}),
|
|
1289
1289
|
/* @__PURE__ */ _(w, {
|
|
1290
1290
|
variant: "tertiary",
|
|
1291
1291
|
size: "sm",
|
|
1292
|
-
className:
|
|
1292
|
+
className: q.navButton,
|
|
1293
1293
|
leadingIcon: /* @__PURE__ */ _(le, {}),
|
|
1294
1294
|
"aria-label": c,
|
|
1295
1295
|
disabled: F,
|
|
@@ -1300,63 +1300,63 @@ function pt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1300
1300
|
ref: S,
|
|
1301
1301
|
role: "grid",
|
|
1302
1302
|
"aria-labelledby": T,
|
|
1303
|
-
className:
|
|
1303
|
+
className: q.grid,
|
|
1304
1304
|
onKeyDown: L,
|
|
1305
1305
|
children: [/* @__PURE__ */ _("div", {
|
|
1306
1306
|
role: "row",
|
|
1307
|
-
className:
|
|
1307
|
+
className: q.row,
|
|
1308
1308
|
children: j.map((e) => /* @__PURE__ */ _("span", {
|
|
1309
1309
|
role: "columnheader",
|
|
1310
1310
|
"aria-label": e.long,
|
|
1311
|
-
className:
|
|
1311
|
+
className: q.weekday,
|
|
1312
1312
|
children: e.short
|
|
1313
1313
|
}, e.long))
|
|
1314
1314
|
}), O.map((t) => /* @__PURE__ */ _("div", {
|
|
1315
1315
|
role: "row",
|
|
1316
|
-
className:
|
|
1316
|
+
className: q.row,
|
|
1317
1317
|
children: t.map(({ date: t, inMonth: i }) => {
|
|
1318
|
-
let a =
|
|
1318
|
+
let a = it(t, n, r), o = !!e && nt(t, e), s = nt(t, k);
|
|
1319
1319
|
return /* @__PURE__ */ _("button", {
|
|
1320
1320
|
type: "button",
|
|
1321
1321
|
role: "gridcell",
|
|
1322
|
-
"data-date":
|
|
1323
|
-
tabIndex:
|
|
1322
|
+
"data-date": ut(t),
|
|
1323
|
+
tabIndex: nt(t, h) ? 0 : -1,
|
|
1324
1324
|
"aria-selected": o,
|
|
1325
1325
|
"aria-disabled": a || void 0,
|
|
1326
1326
|
"aria-current": s ? "date" : void 0,
|
|
1327
1327
|
"aria-label": A.full.format(t),
|
|
1328
1328
|
className: [
|
|
1329
|
-
|
|
1330
|
-
!i &&
|
|
1331
|
-
s &&
|
|
1332
|
-
o &&
|
|
1333
|
-
a &&
|
|
1329
|
+
q.day,
|
|
1330
|
+
!i && q.outside,
|
|
1331
|
+
s && q.today,
|
|
1332
|
+
o && q.selected,
|
|
1333
|
+
a && q.disabled
|
|
1334
1334
|
].filter(Boolean).join(" "),
|
|
1335
1335
|
onMouseDown: a ? (e) => e.preventDefault() : void 0,
|
|
1336
1336
|
onClick: a ? void 0 : () => R(t),
|
|
1337
1337
|
children: t.getDate()
|
|
1338
|
-
},
|
|
1338
|
+
}, ut(t));
|
|
1339
1339
|
})
|
|
1340
|
-
},
|
|
1340
|
+
}, ut(t[0].date)))]
|
|
1341
1341
|
})]
|
|
1342
1342
|
});
|
|
1343
1343
|
}
|
|
1344
|
-
var
|
|
1345
|
-
function
|
|
1344
|
+
var pt = { popup: "_popup_hem3z_1" }, mt = "(max-width: 480px)", ht = 4, gt = 8;
|
|
1345
|
+
function _t({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale: a = "en", weekStartsOn: o = 0, formatValue: c, placement: y = "bottom-start", label: b, helperText: x, error: S, size: C, openLabel: w, placeholder: T, dialogLabel: E = "Choose date", className: D, id: O }) {
|
|
1346
1346
|
let [k, A] = m(!1), j = p(null), M = p(null), N = u(), P = k && !i, F = f(() => new Intl.DateTimeFormat(a, {
|
|
1347
1347
|
month: "short",
|
|
1348
1348
|
day: "2-digit"
|
|
1349
1349
|
}), [a]), ee = e ? c ? c(e) : F.format(e) : "", I = s(() => j.current?.parentElement ?? j.current, []), L = s(() => {
|
|
1350
1350
|
let e = M.current, t = I();
|
|
1351
1351
|
if (!e || !t) return;
|
|
1352
|
-
if (window.matchMedia(
|
|
1352
|
+
if (window.matchMedia(mt).matches) {
|
|
1353
1353
|
e.style.left = "", e.style.top = "";
|
|
1354
1354
|
return;
|
|
1355
1355
|
}
|
|
1356
1356
|
let n = t.getBoundingClientRect(), r = e.offsetWidth, i = e.offsetHeight, a = document.documentElement.clientWidth, o = window.innerHeight, s = y === "bottom-end" ? n.right - r : n.left;
|
|
1357
|
-
s = Math.max(
|
|
1358
|
-
let c = n.bottom +
|
|
1359
|
-
!l && u && (c = n.top -
|
|
1357
|
+
s = Math.max(gt, Math.min(s, a - r - gt));
|
|
1358
|
+
let c = n.bottom + ht, l = c + i <= o - gt, u = n.top - ht - i >= gt;
|
|
1359
|
+
!l && u && (c = n.top - ht - i), e.style.left = `${s}px`, e.style.top = `${c}px`;
|
|
1360
1360
|
}, [I, y]);
|
|
1361
1361
|
d(() => {
|
|
1362
1362
|
if (P) return L(), window.addEventListener("resize", L), window.addEventListener("scroll", L, !0), () => {
|
|
@@ -1397,7 +1397,7 @@ function vt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1397
1397
|
function z(e) {
|
|
1398
1398
|
t(e), A(!1), j.current?.focus();
|
|
1399
1399
|
}
|
|
1400
|
-
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(
|
|
1400
|
+
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Ze, {
|
|
1401
1401
|
ref: j,
|
|
1402
1402
|
id: O,
|
|
1403
1403
|
className: D,
|
|
@@ -1420,8 +1420,8 @@ function vt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1420
1420
|
id: N,
|
|
1421
1421
|
role: "dialog",
|
|
1422
1422
|
"aria-label": E,
|
|
1423
|
-
className:
|
|
1424
|
-
children: /* @__PURE__ */ _(
|
|
1423
|
+
className: pt.popup,
|
|
1424
|
+
children: /* @__PURE__ */ _(ft, {
|
|
1425
1425
|
autoFocus: !0,
|
|
1426
1426
|
value: e,
|
|
1427
1427
|
onChange: z,
|
|
@@ -1432,7 +1432,7 @@ function vt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1432
1432
|
})
|
|
1433
1433
|
}), document.body)] });
|
|
1434
1434
|
}
|
|
1435
|
-
var
|
|
1435
|
+
var vt = {
|
|
1436
1436
|
field: "_field_j9nb8_1",
|
|
1437
1437
|
inputWrap: "_inputWrap_j9nb8_6",
|
|
1438
1438
|
errorWrap: "_errorWrap_j9nb8_19",
|
|
@@ -1446,386 +1446,397 @@ var yt = {
|
|
|
1446
1446
|
};
|
|
1447
1447
|
//#endregion
|
|
1448
1448
|
//#region src/components/NumberField.tsx
|
|
1449
|
-
function
|
|
1449
|
+
function yt({ label: e, helperText: t, error: n, size: r = "base", prefix: i, suffix: a, id: o, ...s }) {
|
|
1450
1450
|
let c = u(), l = o ?? c;
|
|
1451
1451
|
return /* @__PURE__ */ v("div", {
|
|
1452
|
-
className:
|
|
1452
|
+
className: vt.field,
|
|
1453
1453
|
children: [
|
|
1454
|
-
e && /* @__PURE__ */ _(
|
|
1454
|
+
e && /* @__PURE__ */ _(W, {
|
|
1455
1455
|
htmlFor: l,
|
|
1456
1456
|
children: e
|
|
1457
1457
|
}),
|
|
1458
1458
|
/* @__PURE__ */ v("div", {
|
|
1459
|
-
className: `${
|
|
1459
|
+
className: `${vt.inputWrap} ${vt[r]} ${n ? vt.errorWrap : ""}`,
|
|
1460
1460
|
children: [
|
|
1461
1461
|
i && /* @__PURE__ */ _("span", {
|
|
1462
|
-
className:
|
|
1462
|
+
className: vt.prefix,
|
|
1463
1463
|
children: i
|
|
1464
1464
|
}),
|
|
1465
1465
|
/* @__PURE__ */ _("input", {
|
|
1466
1466
|
id: l,
|
|
1467
|
-
className:
|
|
1467
|
+
className: vt.input,
|
|
1468
1468
|
...s
|
|
1469
1469
|
}),
|
|
1470
1470
|
a && /* @__PURE__ */ _("span", {
|
|
1471
|
-
className:
|
|
1471
|
+
className: vt.suffix,
|
|
1472
1472
|
children: a
|
|
1473
1473
|
})
|
|
1474
1474
|
]
|
|
1475
1475
|
}),
|
|
1476
1476
|
n ? /* @__PURE__ */ _("span", {
|
|
1477
|
-
className:
|
|
1477
|
+
className: vt.errorText,
|
|
1478
1478
|
children: n
|
|
1479
1479
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
1480
|
-
className:
|
|
1480
|
+
className: vt.helperText,
|
|
1481
1481
|
children: t
|
|
1482
1482
|
}) : null
|
|
1483
1483
|
]
|
|
1484
1484
|
});
|
|
1485
1485
|
}
|
|
1486
|
-
var
|
|
1486
|
+
var bt = {
|
|
1487
1487
|
menu: "_menu_471l2_1",
|
|
1488
1488
|
divider: "_divider_471l2_15"
|
|
1489
1489
|
};
|
|
1490
1490
|
//#endregion
|
|
1491
1491
|
//#region src/components/Menu.tsx
|
|
1492
|
-
function
|
|
1492
|
+
function xt({ children: e, ...t }) {
|
|
1493
1493
|
return /* @__PURE__ */ _("div", {
|
|
1494
1494
|
role: "menu",
|
|
1495
|
-
className:
|
|
1495
|
+
className: bt.menu,
|
|
1496
1496
|
...t,
|
|
1497
1497
|
children: e
|
|
1498
1498
|
});
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function St() {
|
|
1501
1501
|
return /* @__PURE__ */ _("div", {
|
|
1502
|
-
className:
|
|
1502
|
+
className: bt.divider,
|
|
1503
1503
|
role: "separator"
|
|
1504
1504
|
});
|
|
1505
1505
|
}
|
|
1506
|
-
var
|
|
1507
|
-
item: "
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1506
|
+
var Ct = {
|
|
1507
|
+
item: "_item_1uq1n_1",
|
|
1508
|
+
base: "_base_1uq1n_21",
|
|
1509
|
+
icon: "_icon_1uq1n_28",
|
|
1510
|
+
check: "_check_1uq1n_29",
|
|
1511
|
+
leading: "_leading_1uq1n_43",
|
|
1512
|
+
label: "_label_1uq1n_63",
|
|
1513
|
+
trailing: "_trailing_1uq1n_70",
|
|
1514
|
+
selected: "_selected_1uq1n_78",
|
|
1515
|
+
destructive: "_destructive_1uq1n_103"
|
|
1515
1516
|
};
|
|
1516
1517
|
//#endregion
|
|
1517
1518
|
//#region src/components/MenuItem.tsx
|
|
1518
|
-
function
|
|
1519
|
-
let
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1519
|
+
function wt({ leading: e, icon: t, trailing: n, selected: r, destructive: i, size: a = "sm", children: o, ...s }) {
|
|
1520
|
+
let c = [
|
|
1521
|
+
Ct.item,
|
|
1522
|
+
a === "base" && Ct.base,
|
|
1523
|
+
r && Ct.selected,
|
|
1524
|
+
i && Ct.destructive
|
|
1523
1525
|
].filter(Boolean).join(" ");
|
|
1524
1526
|
return /* @__PURE__ */ v("button", {
|
|
1525
1527
|
type: "button",
|
|
1526
1528
|
role: "menuitem",
|
|
1527
|
-
className:
|
|
1528
|
-
...
|
|
1529
|
+
className: c,
|
|
1530
|
+
...s,
|
|
1529
1531
|
children: [
|
|
1530
1532
|
e && /* @__PURE__ */ _("span", {
|
|
1531
|
-
className:
|
|
1533
|
+
className: Ct.leading,
|
|
1532
1534
|
children: e
|
|
1533
1535
|
}),
|
|
1534
1536
|
t && /* @__PURE__ */ _("span", {
|
|
1535
|
-
className:
|
|
1537
|
+
className: Ct.icon,
|
|
1536
1538
|
children: t
|
|
1537
1539
|
}),
|
|
1538
1540
|
/* @__PURE__ */ _("span", {
|
|
1539
|
-
className:
|
|
1540
|
-
children:
|
|
1541
|
+
className: Ct.label,
|
|
1542
|
+
children: o
|
|
1541
1543
|
}),
|
|
1542
1544
|
n && /* @__PURE__ */ _("span", {
|
|
1543
|
-
className:
|
|
1545
|
+
className: Ct.trailing,
|
|
1544
1546
|
children: n
|
|
1545
1547
|
}),
|
|
1546
1548
|
r && /* @__PURE__ */ _("span", {
|
|
1547
|
-
className:
|
|
1549
|
+
className: Ct.check,
|
|
1548
1550
|
children: /* @__PURE__ */ _(re, {})
|
|
1549
1551
|
})
|
|
1550
1552
|
]
|
|
1551
1553
|
});
|
|
1552
1554
|
}
|
|
1553
|
-
var
|
|
1554
|
-
field: "
|
|
1555
|
-
fieldInline: "
|
|
1556
|
-
trigger: "
|
|
1557
|
-
errorWrap: "
|
|
1558
|
-
sm: "
|
|
1559
|
-
base: "
|
|
1560
|
-
icon: "
|
|
1561
|
-
value: "
|
|
1562
|
-
placeholder: "
|
|
1563
|
-
chevron: "
|
|
1564
|
-
chevronOpen: "
|
|
1565
|
-
menuWrap: "
|
|
1566
|
-
menuIn: "
|
|
1567
|
-
menuWrapAuto: "
|
|
1568
|
-
menuWrapEnd: "
|
|
1569
|
-
menuWrapUp: "
|
|
1570
|
-
menuWrapClosing: "
|
|
1571
|
-
menuOut: "
|
|
1572
|
-
list: "
|
|
1573
|
-
itemIn: "
|
|
1574
|
-
highlight: "
|
|
1575
|
-
highlightInstant: "
|
|
1576
|
-
pillChevron: "
|
|
1577
|
-
buttonChevron: "
|
|
1578
|
-
pillTrigger: "
|
|
1579
|
-
pillIcon: "
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1555
|
+
var J = {
|
|
1556
|
+
field: "_field_7dhvb_1",
|
|
1557
|
+
fieldInline: "_fieldInline_7dhvb_2",
|
|
1558
|
+
trigger: "_trigger_7dhvb_19",
|
|
1559
|
+
errorWrap: "_errorWrap_7dhvb_43",
|
|
1560
|
+
sm: "_sm_7dhvb_62",
|
|
1561
|
+
base: "_base_7dhvb_70",
|
|
1562
|
+
icon: "_icon_7dhvb_79",
|
|
1563
|
+
value: "_value_7dhvb_93",
|
|
1564
|
+
placeholder: "_placeholder_7dhvb_101",
|
|
1565
|
+
chevron: "_chevron_7dhvb_104",
|
|
1566
|
+
chevronOpen: "_chevronOpen_7dhvb_119",
|
|
1567
|
+
menuWrap: "_menuWrap_7dhvb_123",
|
|
1568
|
+
menuIn: "_menuIn_7dhvb_1",
|
|
1569
|
+
menuWrapAuto: "_menuWrapAuto_7dhvb_134",
|
|
1570
|
+
menuWrapEnd: "_menuWrapEnd_7dhvb_141",
|
|
1571
|
+
menuWrapUp: "_menuWrapUp_7dhvb_146",
|
|
1572
|
+
menuWrapClosing: "_menuWrapClosing_7dhvb_158",
|
|
1573
|
+
menuOut: "_menuOut_7dhvb_1",
|
|
1574
|
+
list: "_list_7dhvb_182",
|
|
1575
|
+
itemIn: "_itemIn_7dhvb_1",
|
|
1576
|
+
highlight: "_highlight_7dhvb_199",
|
|
1577
|
+
highlightInstant: "_highlightInstant_7dhvb_212",
|
|
1578
|
+
pillChevron: "_pillChevron_7dhvb_237",
|
|
1579
|
+
buttonChevron: "_buttonChevron_7dhvb_238",
|
|
1580
|
+
pillTrigger: "_pillTrigger_7dhvb_244",
|
|
1581
|
+
pillIcon: "_pillIcon_7dhvb_280",
|
|
1582
|
+
buttonTriggerBase: "_buttonTriggerBase_7dhvb_292",
|
|
1583
|
+
listScrolling: "_listScrolling_7dhvb_324",
|
|
1584
|
+
search: "_search_7dhvb_330",
|
|
1585
|
+
noResults: "_noResults_7dhvb_348",
|
|
1586
|
+
helperText: "_helperText_7dhvb_353",
|
|
1587
|
+
errorText: "_errorText_7dhvb_358",
|
|
1588
|
+
prefix: "_prefix_7dhvb_363",
|
|
1589
|
+
menuWrapMultiple: "_menuWrapMultiple_7dhvb_367"
|
|
1586
1590
|
};
|
|
1587
1591
|
//#endregion
|
|
1588
1592
|
//#region src/components/Dropdown.tsx
|
|
1589
|
-
function
|
|
1593
|
+
function Tt(e) {
|
|
1590
1594
|
return e.searchText === void 0 ? typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : "" : e.searchText;
|
|
1591
1595
|
}
|
|
1592
|
-
function
|
|
1596
|
+
function Et(e) {
|
|
1593
1597
|
return typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : e.searchText;
|
|
1594
1598
|
}
|
|
1595
|
-
var
|
|
1596
|
-
function
|
|
1597
|
-
let { variant: t = "field", triggerLabel: n, menuAlign: r = "start", label: i, helperText: a, error: o, size: s = "base", placeholder: c = "Select…", options: f, disabled: h, searchable: y, searchPlaceholder: b = "Search…", noResultsText: x = "No matches", defaultOpen: S = !1, autoFocus: C, className: T, labelClassName: E, "aria-label": D, "data-testid": O } = e, k = e.multiple === !0, [A, j] = m(S), [M, N] = m(S), [P, F] = m(""), [ee, I] = m(!1), [L, R] = m(null), z = p(
|
|
1598
|
-
function
|
|
1599
|
+
var Dt = (e) => `and ${e} more`;
|
|
1600
|
+
function Ot(e) {
|
|
1601
|
+
let { variant: t = "field", triggerLabel: n, menuAlign: r = "start", label: i, helperText: a, error: o, size: s = "base", placeholder: c = "Select…", options: f, disabled: h, searchable: y, searchPlaceholder: b = "Search…", noResultsText: x = "No matches", defaultOpen: S = !1, autoFocus: C, className: T, labelClassName: E, "aria-label": D, "data-testid": O } = e, k = e.multiple === !0, [A, j] = m(S), [M, N] = m(S), [P, F] = m(""), [ee, I] = m(!1), [L, R] = m(null), [z, te] = m(!1), ne = p(void 0), B = p(null), re = p(null), ie = p(null), oe = p(null), se = u(), ce = u(), le = e.multiple ? void 0 : e.value, ue = e.multiple && e.value || [], de = ue.map((e) => f.find((t) => t.value === e)).filter((e) => e !== void 0), fe = k ? void 0 : f.find((e) => e.value === le), pe = P.trim().toLowerCase(), me = y && pe ? f.filter((e) => Tt(e).toLowerCase().includes(pe)) : f, V = me.filter((e) => !e.disabled).map((e) => e.value), H = t === "field";
|
|
1602
|
+
function he() {
|
|
1599
1603
|
N(!0), j(!0);
|
|
1600
1604
|
}
|
|
1601
|
-
function
|
|
1605
|
+
function ge() {
|
|
1602
1606
|
j(!1), F("");
|
|
1603
1607
|
}
|
|
1604
1608
|
l(() => {
|
|
1605
1609
|
if (!A) return;
|
|
1606
1610
|
if (y) {
|
|
1607
|
-
|
|
1611
|
+
oe.current?.focus();
|
|
1608
1612
|
return;
|
|
1609
1613
|
}
|
|
1610
|
-
let e = (k ?
|
|
1611
|
-
(
|
|
1614
|
+
let e = (k ? de.find((e) => !e.disabled)?.value : le) ?? V[0];
|
|
1615
|
+
(B.current?.querySelector(`[data-value="${e}"]`))?.focus();
|
|
1612
1616
|
}, [A]), d(() => {
|
|
1613
|
-
if (!A || !
|
|
1614
|
-
let e =
|
|
1617
|
+
if (!A || !ie.current || !B.current) return;
|
|
1618
|
+
let e = B.current.getBoundingClientRect(), t = ie.current.offsetHeight, n = window.innerHeight - e.bottom, r = e.top;
|
|
1615
1619
|
I(n < t + 8 && r > n);
|
|
1616
1620
|
}, [A]), l(() => {
|
|
1617
1621
|
if (!A) return;
|
|
1618
1622
|
function e(e) {
|
|
1619
|
-
|
|
1623
|
+
B.current?.contains(e.target) || ge();
|
|
1620
1624
|
}
|
|
1621
1625
|
function t(e) {
|
|
1622
|
-
e.key === "Escape" && (
|
|
1626
|
+
e.key === "Escape" && (ge(), re.current?.focus()), e.key === "Tab" && k && ge();
|
|
1623
1627
|
}
|
|
1624
1628
|
return window.addEventListener("pointerdown", e), window.addEventListener("keydown", t), () => {
|
|
1625
1629
|
window.removeEventListener("pointerdown", e), window.removeEventListener("keydown", t);
|
|
1626
1630
|
};
|
|
1627
1631
|
}, [A, k]);
|
|
1628
|
-
function
|
|
1629
|
-
e !== void 0 &&
|
|
1632
|
+
function _e(e) {
|
|
1633
|
+
e !== void 0 && B.current?.querySelector(`[data-value="${e}"]`)?.focus();
|
|
1630
1634
|
}
|
|
1631
|
-
function
|
|
1632
|
-
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1635
|
+
function ve(e) {
|
|
1636
|
+
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), he());
|
|
1633
1637
|
}
|
|
1634
|
-
function
|
|
1635
|
-
e.key === "ArrowDown" && (e.preventDefault(),
|
|
1638
|
+
function ye(e) {
|
|
1639
|
+
e.key === "ArrowDown" && (e.preventDefault(), _e(V[0])), e.key === "Enter" && V.length === 1 && (e.preventDefault(), Se(V[0]));
|
|
1636
1640
|
}
|
|
1637
|
-
function
|
|
1641
|
+
function be(e, t) {
|
|
1638
1642
|
let n = V.indexOf(t);
|
|
1639
1643
|
if (n === -1) return;
|
|
1640
1644
|
let r = null;
|
|
1641
1645
|
if (e.key === "ArrowDown" && (r = (n + 1) % V.length), e.key === "ArrowUp") {
|
|
1642
1646
|
if (y && n === 0) {
|
|
1643
|
-
e.preventDefault(),
|
|
1647
|
+
e.preventDefault(), oe.current?.focus();
|
|
1644
1648
|
return;
|
|
1645
1649
|
}
|
|
1646
1650
|
r = (n - 1 + V.length) % V.length;
|
|
1647
1651
|
}
|
|
1648
|
-
e.key === "Home" && (r = 0), e.key === "End" && (r = V.length - 1), r !== null && (e.preventDefault(),
|
|
1652
|
+
e.key === "Home" && (r = 0), e.key === "End" && (r = V.length - 1), r !== null && (e.preventDefault(), _e(V[r]));
|
|
1649
1653
|
}
|
|
1650
|
-
function
|
|
1654
|
+
function xe() {
|
|
1655
|
+
te(!0), window.clearTimeout(ne.current), ne.current = window.setTimeout(() => te(!1), 700);
|
|
1656
|
+
}
|
|
1657
|
+
l(() => () => window.clearTimeout(ne.current), []);
|
|
1658
|
+
function U(e) {
|
|
1651
1659
|
R((t) => ({
|
|
1652
1660
|
top: e.offsetTop,
|
|
1653
1661
|
height: e.offsetHeight,
|
|
1654
1662
|
instant: !t
|
|
1655
1663
|
}));
|
|
1656
1664
|
}
|
|
1657
|
-
function
|
|
1665
|
+
function Se(t) {
|
|
1658
1666
|
if (e.multiple) {
|
|
1659
1667
|
let n = e.value ?? [];
|
|
1660
1668
|
e.onChange(n.includes(t) ? n.filter((e) => e !== t) : [...n, t]);
|
|
1661
1669
|
return;
|
|
1662
1670
|
}
|
|
1663
|
-
e.onChange(t),
|
|
1671
|
+
e.onChange(t), ge(), re.current?.focus();
|
|
1664
1672
|
}
|
|
1665
|
-
function
|
|
1666
|
-
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(
|
|
1667
|
-
let t =
|
|
1668
|
-
if (
|
|
1669
|
-
let n =
|
|
1670
|
-
return n === void 0 ? `${
|
|
1673
|
+
function Ce() {
|
|
1674
|
+
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(de);
|
|
1675
|
+
let t = de[0];
|
|
1676
|
+
if (de.length === 1) return t.label;
|
|
1677
|
+
let n = Et(t);
|
|
1678
|
+
return n === void 0 ? `${de.length} selected` : `${n} ${(e.multiple && e.moreText || Dt)(de.length - 1)}`;
|
|
1671
1679
|
}
|
|
1672
|
-
let
|
|
1673
|
-
className:
|
|
1680
|
+
let we = n === void 0 && (k ? de.length === 0 : !fe), Te = k && e.triggerPrefix ? /* @__PURE__ */ v("span", {
|
|
1681
|
+
className: J.prefix,
|
|
1674
1682
|
children: [e.triggerPrefix, " "]
|
|
1675
|
-
}) : null,
|
|
1683
|
+
}) : null, Ee = n ?? (we ? c : k ? Ce() : fe?.label), De = /* @__PURE__ */ v(g, { children: [Te, Ee] }), Oe = {
|
|
1676
1684
|
"aria-haspopup": "listbox",
|
|
1677
1685
|
"aria-expanded": A,
|
|
1678
|
-
"aria-controls": A ?
|
|
1686
|
+
"aria-controls": A ? ce : void 0,
|
|
1679
1687
|
"aria-label": i ? void 0 : D,
|
|
1680
1688
|
autoFocus: C,
|
|
1681
1689
|
disabled: h,
|
|
1682
|
-
onClick: () => A ?
|
|
1683
|
-
onKeyDown:
|
|
1690
|
+
onClick: () => A ? ge() : he(),
|
|
1691
|
+
onKeyDown: ve
|
|
1684
1692
|
};
|
|
1685
1693
|
return /* @__PURE__ */ v("div", {
|
|
1686
|
-
className: [
|
|
1687
|
-
ref:
|
|
1694
|
+
className: [H ? J.field : J.fieldInline, T].filter(Boolean).join(" "),
|
|
1695
|
+
ref: B,
|
|
1688
1696
|
"data-testid": O,
|
|
1689
1697
|
children: [
|
|
1690
|
-
|
|
1691
|
-
htmlFor:
|
|
1698
|
+
H && i && /* @__PURE__ */ _(W, {
|
|
1699
|
+
htmlFor: se,
|
|
1692
1700
|
className: E,
|
|
1693
1701
|
children: i
|
|
1694
1702
|
}),
|
|
1695
|
-
|
|
1696
|
-
ref:
|
|
1697
|
-
id:
|
|
1703
|
+
H ? /* @__PURE__ */ v("button", {
|
|
1704
|
+
ref: re,
|
|
1705
|
+
id: se,
|
|
1698
1706
|
type: "button",
|
|
1699
1707
|
role: "combobox",
|
|
1700
|
-
className: `${
|
|
1701
|
-
...
|
|
1708
|
+
className: `${J.trigger} ${J[s]} ${o ? J.errorWrap : ""}`,
|
|
1709
|
+
...Oe,
|
|
1702
1710
|
children: [
|
|
1703
|
-
|
|
1704
|
-
className:
|
|
1705
|
-
children:
|
|
1711
|
+
fe?.icon && /* @__PURE__ */ _("span", {
|
|
1712
|
+
className: J.icon,
|
|
1713
|
+
children: fe.icon
|
|
1706
1714
|
}),
|
|
1707
1715
|
/* @__PURE__ */ _("span", {
|
|
1708
|
-
className: `${
|
|
1709
|
-
children:
|
|
1716
|
+
className: `${J.value} ${we ? J.placeholder : ""}`,
|
|
1717
|
+
children: De
|
|
1710
1718
|
}),
|
|
1711
1719
|
/* @__PURE__ */ _("span", {
|
|
1712
|
-
className: `${
|
|
1720
|
+
className: `${J.chevron} ${A ? J.chevronOpen : ""}`,
|
|
1713
1721
|
children: /* @__PURE__ */ _(ae, {})
|
|
1714
1722
|
})
|
|
1715
1723
|
]
|
|
1716
1724
|
}) : t === "pill" ? /* @__PURE__ */ v("button", {
|
|
1717
|
-
ref:
|
|
1718
|
-
id:
|
|
1725
|
+
ref: re,
|
|
1726
|
+
id: se,
|
|
1719
1727
|
type: "button",
|
|
1720
|
-
className:
|
|
1721
|
-
...
|
|
1728
|
+
className: J.pillTrigger,
|
|
1729
|
+
...Oe,
|
|
1722
1730
|
children: [
|
|
1723
|
-
|
|
1724
|
-
className:
|
|
1725
|
-
children:
|
|
1731
|
+
fe?.icon && /* @__PURE__ */ _("span", {
|
|
1732
|
+
className: J.pillIcon,
|
|
1733
|
+
children: fe.icon
|
|
1726
1734
|
}),
|
|
1727
|
-
|
|
1735
|
+
De,
|
|
1728
1736
|
/* @__PURE__ */ _("span", {
|
|
1729
|
-
className: `${
|
|
1737
|
+
className: `${J.pillChevron} ${A ? J.chevronOpen : ""}`,
|
|
1730
1738
|
children: /* @__PURE__ */ _(ae, {})
|
|
1731
1739
|
})
|
|
1732
1740
|
]
|
|
1733
1741
|
}) : /* @__PURE__ */ _(w, {
|
|
1734
|
-
ref:
|
|
1735
|
-
id:
|
|
1742
|
+
ref: re,
|
|
1743
|
+
id: se,
|
|
1736
1744
|
variant: t,
|
|
1737
1745
|
size: s,
|
|
1738
|
-
|
|
1746
|
+
className: s === "base" ? J.buttonTriggerBase : void 0,
|
|
1747
|
+
leadingIcon: fe?.icon,
|
|
1739
1748
|
trailingIcon: /* @__PURE__ */ _("span", {
|
|
1740
|
-
className: `${
|
|
1749
|
+
className: `${J.buttonChevron} ${A ? J.chevronOpen : ""}`,
|
|
1741
1750
|
children: /* @__PURE__ */ _(ae, {})
|
|
1742
1751
|
}),
|
|
1743
|
-
...
|
|
1744
|
-
children:
|
|
1752
|
+
...Oe,
|
|
1753
|
+
children: De
|
|
1745
1754
|
}),
|
|
1746
1755
|
M && /* @__PURE__ */ _("div", {
|
|
1747
|
-
ref:
|
|
1756
|
+
ref: ie,
|
|
1748
1757
|
className: [
|
|
1749
|
-
|
|
1750
|
-
!
|
|
1751
|
-
!
|
|
1752
|
-
!
|
|
1753
|
-
ee &&
|
|
1754
|
-
!A &&
|
|
1758
|
+
J.menuWrap,
|
|
1759
|
+
!H && J.menuWrapAuto,
|
|
1760
|
+
!H && k && J.menuWrapMultiple,
|
|
1761
|
+
!H && r === "end" && J.menuWrapEnd,
|
|
1762
|
+
ee && J.menuWrapUp,
|
|
1763
|
+
!A && J.menuWrapClosing
|
|
1755
1764
|
].filter(Boolean).join(" "),
|
|
1756
1765
|
onAnimationEnd: (e) => {
|
|
1757
1766
|
A || e.target !== e.currentTarget || (N(!1), I(!1));
|
|
1758
1767
|
},
|
|
1759
|
-
children: /* @__PURE__ */ v(
|
|
1768
|
+
children: /* @__PURE__ */ v(xt, {
|
|
1760
1769
|
role: "presentation",
|
|
1761
|
-
style:
|
|
1770
|
+
style: H ? { width: "100%" } : void 0,
|
|
1762
1771
|
children: [y && /* @__PURE__ */ _("input", {
|
|
1763
|
-
ref:
|
|
1772
|
+
ref: oe,
|
|
1764
1773
|
type: "text",
|
|
1765
|
-
className:
|
|
1774
|
+
className: J.search,
|
|
1766
1775
|
value: P,
|
|
1767
1776
|
placeholder: b,
|
|
1768
1777
|
"aria-label": b,
|
|
1769
|
-
"aria-controls":
|
|
1778
|
+
"aria-controls": ce,
|
|
1770
1779
|
autoComplete: "off",
|
|
1771
1780
|
spellCheck: !1,
|
|
1772
1781
|
onChange: (e) => {
|
|
1773
1782
|
F(e.target.value), R(null);
|
|
1774
1783
|
},
|
|
1775
|
-
onKeyDown:
|
|
1784
|
+
onKeyDown: ye
|
|
1776
1785
|
}), /* @__PURE__ */ v("div", {
|
|
1777
|
-
id:
|
|
1786
|
+
id: ce,
|
|
1778
1787
|
role: "listbox",
|
|
1779
1788
|
"aria-multiselectable": k || void 0,
|
|
1780
1789
|
"aria-label": i ?? D,
|
|
1781
|
-
className:
|
|
1790
|
+
className: `${J.list} ${z ? J.listScrolling : ""}`,
|
|
1791
|
+
onScroll: xe,
|
|
1782
1792
|
onMouseLeave: () => R(null),
|
|
1783
1793
|
onBlur: (e) => {
|
|
1784
1794
|
e.currentTarget.contains(e.relatedTarget) || R(null);
|
|
1785
1795
|
},
|
|
1786
|
-
children: [L &&
|
|
1796
|
+
children: [L && me.length > 0 && /* @__PURE__ */ _("span", {
|
|
1787
1797
|
"aria-hidden": "true",
|
|
1788
|
-
className: `${
|
|
1798
|
+
className: `${J.highlight} ${L.instant ? J.highlightInstant : ""}`,
|
|
1789
1799
|
style: {
|
|
1790
1800
|
transform: `translateY(${L.top}px)`,
|
|
1791
1801
|
height: L.height
|
|
1792
1802
|
}
|
|
1793
|
-
}),
|
|
1794
|
-
className:
|
|
1803
|
+
}), me.length === 0 ? /* @__PURE__ */ _("div", {
|
|
1804
|
+
className: J.noResults,
|
|
1795
1805
|
role: "presentation",
|
|
1796
1806
|
children: x
|
|
1797
|
-
}) :
|
|
1798
|
-
style: { "--i": Math.min(
|
|
1807
|
+
}) : me.map((e, n) => /* @__PURE__ */ _(wt, {
|
|
1808
|
+
style: { "--i": Math.min(n, 8) },
|
|
1799
1809
|
"data-value": e.value,
|
|
1800
1810
|
role: "option",
|
|
1801
|
-
"aria-selected": k ?
|
|
1811
|
+
"aria-selected": k ? ue.includes(e.value) : e.value === le,
|
|
1812
|
+
size: t === "pill" ? "sm" : s,
|
|
1802
1813
|
icon: e.icon,
|
|
1803
|
-
leading: k ? /* @__PURE__ */ _(
|
|
1804
|
-
checked:
|
|
1814
|
+
leading: k ? /* @__PURE__ */ _(Le, {
|
|
1815
|
+
checked: ue.includes(e.value),
|
|
1805
1816
|
disabled: e.disabled
|
|
1806
1817
|
}) : void 0,
|
|
1807
|
-
selected: !k && e.value ===
|
|
1818
|
+
selected: !k && e.value === le,
|
|
1808
1819
|
disabled: e.disabled,
|
|
1809
|
-
onClick: () =>
|
|
1810
|
-
onMouseEnter: (t) => !e.disabled &&
|
|
1811
|
-
onFocus: (e) =>
|
|
1812
|
-
onKeyDown: (t) =>
|
|
1820
|
+
onClick: () => Se(e.value),
|
|
1821
|
+
onMouseEnter: (t) => !e.disabled && U(t.currentTarget),
|
|
1822
|
+
onFocus: (e) => U(e.currentTarget),
|
|
1823
|
+
onKeyDown: (t) => be(t, e.value),
|
|
1813
1824
|
children: e.label
|
|
1814
1825
|
}, e.value))]
|
|
1815
1826
|
})]
|
|
1816
1827
|
})
|
|
1817
1828
|
}),
|
|
1818
|
-
|
|
1819
|
-
className:
|
|
1829
|
+
H && o ? /* @__PURE__ */ _("span", {
|
|
1830
|
+
className: J.errorText,
|
|
1820
1831
|
children: o
|
|
1821
|
-
}) :
|
|
1822
|
-
className:
|
|
1832
|
+
}) : H && a ? /* @__PURE__ */ _("span", {
|
|
1833
|
+
className: J.helperText,
|
|
1823
1834
|
children: a
|
|
1824
1835
|
}) : null
|
|
1825
1836
|
]
|
|
1826
1837
|
});
|
|
1827
1838
|
}
|
|
1828
|
-
var
|
|
1839
|
+
var kt = {
|
|
1829
1840
|
item: "_item_stzme_2",
|
|
1830
1841
|
active: "_active_stzme_38",
|
|
1831
1842
|
inList: "_inList_stzme_41",
|
|
@@ -1839,9 +1850,9 @@ var J = {
|
|
|
1839
1850
|
}, At = "data-nav-item", jt = r(!1);
|
|
1840
1851
|
function Mt({ icon: e, trailing: t, active: n, as: r, href: i, className: a, children: o, ...s }) {
|
|
1841
1852
|
let l = c(jt), u = r ?? (i === void 0 ? "button" : "a"), d = u === "button", f = [
|
|
1842
|
-
|
|
1843
|
-
n &&
|
|
1844
|
-
l &&
|
|
1853
|
+
kt.item,
|
|
1854
|
+
n && kt.active,
|
|
1855
|
+
l && kt.inList,
|
|
1845
1856
|
a
|
|
1846
1857
|
].filter(Boolean).join(" ");
|
|
1847
1858
|
return /* @__PURE__ */ v(u, {
|
|
@@ -1853,16 +1864,16 @@ function Mt({ icon: e, trailing: t, active: n, as: r, href: i, className: a, chi
|
|
|
1853
1864
|
...s,
|
|
1854
1865
|
children: [
|
|
1855
1866
|
e && /* @__PURE__ */ _("span", {
|
|
1856
|
-
className:
|
|
1867
|
+
className: kt.icon,
|
|
1857
1868
|
"aria-hidden": !0,
|
|
1858
1869
|
children: e
|
|
1859
1870
|
}),
|
|
1860
1871
|
/* @__PURE__ */ _("span", {
|
|
1861
|
-
className:
|
|
1872
|
+
className: kt.label,
|
|
1862
1873
|
children: o
|
|
1863
1874
|
}),
|
|
1864
1875
|
t && /* @__PURE__ */ _("span", {
|
|
1865
|
-
className:
|
|
1876
|
+
className: kt.trailing,
|
|
1866
1877
|
children: t
|
|
1867
1878
|
})
|
|
1868
1879
|
]
|
|
@@ -1888,7 +1899,7 @@ function Nt({ children: e, className: t, ...n }) {
|
|
|
1888
1899
|
value: !0,
|
|
1889
1900
|
children: /* @__PURE__ */ v("div", {
|
|
1890
1901
|
ref: r,
|
|
1891
|
-
className: [
|
|
1902
|
+
className: [kt.list, t].filter(Boolean).join(" "),
|
|
1892
1903
|
onMouseOver: (e) => f(e.target),
|
|
1893
1904
|
onMouseLeave: () => c(!1),
|
|
1894
1905
|
onFocus: (e) => e.target.matches(":focus-visible") && f(e.target),
|
|
@@ -1897,9 +1908,9 @@ function Nt({ children: e, className: t, ...n }) {
|
|
|
1897
1908
|
children: [/* @__PURE__ */ _("span", {
|
|
1898
1909
|
"aria-hidden": !0,
|
|
1899
1910
|
className: [
|
|
1900
|
-
|
|
1901
|
-
l &&
|
|
1902
|
-
o &&
|
|
1911
|
+
kt.glide,
|
|
1912
|
+
l && kt.glideAnimated,
|
|
1913
|
+
o && kt.glideVisible
|
|
1903
1914
|
].filter(Boolean).join(" "),
|
|
1904
1915
|
style: i ? {
|
|
1905
1916
|
translate: `0 ${i.top}px`,
|
|
@@ -2088,7 +2099,7 @@ function Ht({ label: e, options: t, optionLabel: n, activeSet: r, onToggle: i, o
|
|
|
2088
2099
|
children: [u.length === 0 && /* @__PURE__ */ _("div", {
|
|
2089
2100
|
className: Vt.empty,
|
|
2090
2101
|
children: "No match"
|
|
2091
|
-
}), u.map((e) => /* @__PURE__ */ _(
|
|
2102
|
+
}), u.map((e) => /* @__PURE__ */ _(Ie, {
|
|
2092
2103
|
className: Vt.option,
|
|
2093
2104
|
checked: r.has(e),
|
|
2094
2105
|
onChange: () => i(e),
|
|
@@ -2321,7 +2332,7 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2321
2332
|
}, [e]), l(() => {
|
|
2322
2333
|
!E && F.current && (F.current.focus?.(), F.current = null);
|
|
2323
2334
|
}, [E]);
|
|
2324
|
-
let
|
|
2335
|
+
let te = s(() => {
|
|
2325
2336
|
if (!a || ee.current) return;
|
|
2326
2337
|
ee.current = !0, k(!1);
|
|
2327
2338
|
let e = N ? 0 : Jt;
|
|
@@ -2332,7 +2343,7 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2332
2343
|
let e = L.current;
|
|
2333
2344
|
d && en.push(e);
|
|
2334
2345
|
let t = (t) => {
|
|
2335
|
-
t.key === "Escape" && en[en.length - 1] === e && (t.preventDefault(),
|
|
2346
|
+
t.key === "Escape" && en[en.length - 1] === e && (t.preventDefault(), te());
|
|
2336
2347
|
};
|
|
2337
2348
|
document.addEventListener("keydown", t);
|
|
2338
2349
|
let { body: n } = document, r = n.style.overflow, i = n.style.paddingRight, a = window.innerWidth - document.documentElement.clientWidth;
|
|
@@ -2344,9 +2355,9 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2344
2355
|
}, [
|
|
2345
2356
|
E,
|
|
2346
2357
|
d,
|
|
2347
|
-
|
|
2358
|
+
te
|
|
2348
2359
|
]);
|
|
2349
|
-
let
|
|
2360
|
+
let ne = (e) => {
|
|
2350
2361
|
if (e.key !== "Tab" || !P.current) return;
|
|
2351
2362
|
let t = Array.from(P.current.querySelectorAll(Zt));
|
|
2352
2363
|
if (t.length === 0) {
|
|
@@ -2357,7 +2368,7 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2357
2368
|
e.shiftKey && (i === n || i === P.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
2358
2369
|
};
|
|
2359
2370
|
if (!w || !E) return null;
|
|
2360
|
-
let
|
|
2371
|
+
let B = document.querySelector(c) ?? document.body, re = [
|
|
2361
2372
|
Z.modal,
|
|
2362
2373
|
Z[n],
|
|
2363
2374
|
Z[r],
|
|
@@ -2372,7 +2383,7 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2372
2383
|
tabIndex: -1,
|
|
2373
2384
|
className: re,
|
|
2374
2385
|
"data-testid": v,
|
|
2375
|
-
onKeyDown:
|
|
2386
|
+
onKeyDown: ne
|
|
2376
2387
|
}, ae = {
|
|
2377
2388
|
layout: n,
|
|
2378
2389
|
titleId: g ?? S,
|
|
@@ -2380,7 +2391,7 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2380
2391
|
isMobile: M,
|
|
2381
2392
|
dismissible: a,
|
|
2382
2393
|
setHasDescription: j,
|
|
2383
|
-
requestClose:
|
|
2394
|
+
requestClose: te
|
|
2384
2395
|
};
|
|
2385
2396
|
return h(/* @__PURE__ */ _(Qt.Provider, {
|
|
2386
2397
|
value: ae,
|
|
@@ -2390,7 +2401,7 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2390
2401
|
I.current = e.target !== e.currentTarget;
|
|
2391
2402
|
},
|
|
2392
2403
|
onClick: (e) => {
|
|
2393
|
-
e.target === e.currentTarget && !I.current &&
|
|
2404
|
+
e.target === e.currentTarget && !I.current && te(), I.current = !1;
|
|
2394
2405
|
},
|
|
2395
2406
|
children: i ? /* @__PURE__ */ _("form", {
|
|
2396
2407
|
ref: P,
|
|
@@ -2403,7 +2414,7 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2403
2414
|
children: b
|
|
2404
2415
|
})
|
|
2405
2416
|
})
|
|
2406
|
-
}),
|
|
2417
|
+
}), B);
|
|
2407
2418
|
}
|
|
2408
2419
|
function nn({ children: e, onClose: t }) {
|
|
2409
2420
|
let { requestClose: n, dismissible: r } = $t("Modal.Cover");
|
|
@@ -2411,7 +2422,7 @@ function nn({ children: e, onClose: t }) {
|
|
|
2411
2422
|
className: Z.cover,
|
|
2412
2423
|
children: [e, t && /* @__PURE__ */ _(w, {
|
|
2413
2424
|
variant: "tertiary",
|
|
2414
|
-
leadingIcon: /* @__PURE__ */ _(
|
|
2425
|
+
leadingIcon: /* @__PURE__ */ _(xe, {}),
|
|
2415
2426
|
"aria-label": "Close",
|
|
2416
2427
|
"data-testid": "modal-close",
|
|
2417
2428
|
className: Z.closeButton,
|
|
@@ -2698,12 +2709,12 @@ function Cn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2698
2709
|
}
|
|
2699
2710
|
}) : /* @__PURE__ */ _("div", {
|
|
2700
2711
|
className: `${$.tile} ${t === "play" ? $.tilePlay : ""}`,
|
|
2701
|
-
children: t === "play" ? /* @__PURE__ */ _(
|
|
2712
|
+
children: t === "play" ? /* @__PURE__ */ _(he, {
|
|
2702
2713
|
size: 20,
|
|
2703
2714
|
"aria-hidden": "true"
|
|
2704
2715
|
}) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
|
|
2705
2716
|
className: $.icon,
|
|
2706
|
-
children: _(t === "archived" ?
|
|
2717
|
+
children: _(t === "archived" ? ne : V, {
|
|
2707
2718
|
size: 12,
|
|
2708
2719
|
strokeWidth: 1,
|
|
2709
2720
|
"aria-hidden": "true"
|
|
@@ -2759,7 +2770,7 @@ function Cn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2759
2770
|
}) : /* @__PURE__ */ _("div", {
|
|
2760
2771
|
className: `${$.photo} ${$.emptyPhoto}`,
|
|
2761
2772
|
"aria-hidden": "true",
|
|
2762
|
-
children: /* @__PURE__ */ _(
|
|
2773
|
+
children: /* @__PURE__ */ _(ye, { size: 20 })
|
|
2763
2774
|
}), /* @__PURE__ */ v("div", {
|
|
2764
2775
|
className: $.workerText,
|
|
2765
2776
|
children: [/* @__PURE__ */ _("div", {
|
|
@@ -2833,6 +2844,6 @@ function Dn(e, t) {
|
|
|
2833
2844
|
return `${i(n)}:${i(r)}:${i(t)}`;
|
|
2834
2845
|
}
|
|
2835
2846
|
//#endregion
|
|
2836
|
-
export { w as Button,
|
|
2847
|
+
export { w as Button, ft as Calendar, E as Card, Ie as Checkbox, Re as CheckboxGroup, dn as ConfirmDialog, Ze as DateField, _t as DatePicker, Ot as Dropdown, hn as EmptyState, W as FieldLabel, Ht as FilterSection, Bt as HighlightText, Lt as LanguageSwitch, Pt as Logo, xt as Menu, St as MenuDivider, wt as MenuItem, Q as Modal, Mt as NavItem, Nt as NavList, yt as NumberField, Xe as PasswordField, xn as PhotoPreview, Be as RadioButton, Ve as RadioGroup, Ft as Sidebar, It as SidebarFooter, pn as Skeleton, qt as Spinner, Ue as Switch, Ut as Tabs, we as Tag, Oe as TagGroup, Ye as TextArea, qe as TextField, Gt as Toggle, Ae as Toolbar, Pe as ToolbarAdaptive, S as Tooltip, Tn as VideoCard, En as formatDuration, Dn as formatDurationHMS };
|
|
2837
2848
|
|
|
2838
2849
|
//# sourceMappingURL=index.js.map
|