cattle-care-ui 0.1.37 → 0.1.39
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/ToolbarAdaptive.d.ts +24 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +422 -353
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -253,7 +253,7 @@ function F(e, t = {}) {
|
|
|
253
253
|
var ee = (e) => {
|
|
254
254
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
255
255
|
return !1;
|
|
256
|
-
}, I = r({}), L = () => c(I),
|
|
256
|
+
}, I = r({}), L = () => c(I), R = a(({ color: e, size: t, width: n, height: r, strokeWidth: a, absoluteStrokeWidth: o, nonScalingStroke: s, className: c = "", children: l, iconNode: u = [], icon: d = {
|
|
257
257
|
node: u,
|
|
258
258
|
aliases: [],
|
|
259
259
|
size: 24
|
|
@@ -276,8 +276,8 @@ var ee = (e) => {
|
|
|
276
276
|
});
|
|
277
277
|
//#endregion
|
|
278
278
|
//#region node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
279
|
-
function
|
|
280
|
-
let r = typeof e == "string" ? O(e, t, n) : e, o = a(({ className: e, ...t }, n) => i(
|
|
279
|
+
function z(e, t = [], n = []) {
|
|
280
|
+
let r = typeof e == "string" ? O(e, t, n) : e, o = a(({ className: e, ...t }, n) => i(R, {
|
|
281
281
|
ref: n,
|
|
282
282
|
icon: r,
|
|
283
283
|
className: e,
|
|
@@ -287,7 +287,7 @@ function R(e, t = [], n = []) {
|
|
|
287
287
|
}
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region node_modules/lucide-react/dist/esm/icons/archive.mjs
|
|
290
|
-
var
|
|
290
|
+
var B = {
|
|
291
291
|
name: "archive",
|
|
292
292
|
size: 24,
|
|
293
293
|
node: [
|
|
@@ -309,8 +309,8 @@ var z = {
|
|
|
309
309
|
}]
|
|
310
310
|
]
|
|
311
311
|
};
|
|
312
|
-
|
|
313
|
-
var
|
|
312
|
+
B.node;
|
|
313
|
+
var te = z(B), ne = {
|
|
314
314
|
name: "check",
|
|
315
315
|
size: 24,
|
|
316
316
|
node: [["path", {
|
|
@@ -318,8 +318,8 @@ var ne = R(z), re = {
|
|
|
318
318
|
key: "1gmf2c"
|
|
319
319
|
}]]
|
|
320
320
|
};
|
|
321
|
-
|
|
322
|
-
var
|
|
321
|
+
ne.node;
|
|
322
|
+
var re = z(ne), ie = {
|
|
323
323
|
name: "chevron-down",
|
|
324
324
|
size: 24,
|
|
325
325
|
node: [["path", {
|
|
@@ -327,8 +327,8 @@ var ie = R(re), ae = {
|
|
|
327
327
|
key: "qrunsl"
|
|
328
328
|
}]]
|
|
329
329
|
};
|
|
330
|
-
|
|
331
|
-
var
|
|
330
|
+
ie.node;
|
|
331
|
+
var ae = z(ie), oe = {
|
|
332
332
|
name: "chevron-left",
|
|
333
333
|
size: 24,
|
|
334
334
|
node: [["path", {
|
|
@@ -336,8 +336,8 @@ var oe = R(ae), se = {
|
|
|
336
336
|
key: "1wnfg3"
|
|
337
337
|
}]]
|
|
338
338
|
};
|
|
339
|
-
|
|
340
|
-
var
|
|
339
|
+
oe.node;
|
|
340
|
+
var se = z(oe), ce = {
|
|
341
341
|
name: "chevron-right",
|
|
342
342
|
size: 24,
|
|
343
343
|
node: [["path", {
|
|
@@ -345,8 +345,8 @@ var ce = R(se), le = {
|
|
|
345
345
|
key: "mthhwq"
|
|
346
346
|
}]]
|
|
347
347
|
};
|
|
348
|
-
|
|
349
|
-
var
|
|
348
|
+
ce.node;
|
|
349
|
+
var le = z(ce), ue = {
|
|
350
350
|
name: "eye-off",
|
|
351
351
|
size: 24,
|
|
352
352
|
node: [
|
|
@@ -368,8 +368,8 @@ var ue = R(le), de = {
|
|
|
368
368
|
}]
|
|
369
369
|
]
|
|
370
370
|
};
|
|
371
|
-
|
|
372
|
-
var
|
|
371
|
+
ue.node;
|
|
372
|
+
var de = z(ue), V = {
|
|
373
373
|
name: "eye",
|
|
374
374
|
size: 24,
|
|
375
375
|
node: [["path", {
|
|
@@ -382,8 +382,8 @@ var fe = R(de), B = {
|
|
|
382
382
|
key: "1v7zrd"
|
|
383
383
|
}]]
|
|
384
384
|
};
|
|
385
|
-
|
|
386
|
-
var
|
|
385
|
+
V.node;
|
|
386
|
+
var fe = z(V), pe = {
|
|
387
387
|
name: "lock",
|
|
388
388
|
size: 24,
|
|
389
389
|
node: [["rect", {
|
|
@@ -400,7 +400,7 @@ var V = R(B), pe = {
|
|
|
400
400
|
}]]
|
|
401
401
|
};
|
|
402
402
|
pe.node;
|
|
403
|
-
var me =
|
|
403
|
+
var me = z(pe), he = {
|
|
404
404
|
name: "play",
|
|
405
405
|
size: 24,
|
|
406
406
|
node: [["path", {
|
|
@@ -409,7 +409,7 @@ var me = R(pe), he = {
|
|
|
409
409
|
}]]
|
|
410
410
|
};
|
|
411
411
|
he.node;
|
|
412
|
-
var ge =
|
|
412
|
+
var ge = z(he), _e = {
|
|
413
413
|
name: "search",
|
|
414
414
|
size: 24,
|
|
415
415
|
node: [["path", {
|
|
@@ -423,7 +423,7 @@ var ge = R(he), _e = {
|
|
|
423
423
|
}]]
|
|
424
424
|
};
|
|
425
425
|
_e.node;
|
|
426
|
-
var ve =
|
|
426
|
+
var ve = z(_e), ye = {
|
|
427
427
|
name: "user",
|
|
428
428
|
size: 24,
|
|
429
429
|
node: [["path", {
|
|
@@ -437,7 +437,7 @@ var ve = R(_e), ye = {
|
|
|
437
437
|
}]]
|
|
438
438
|
};
|
|
439
439
|
ye.node;
|
|
440
|
-
var be =
|
|
440
|
+
var be = z(ye), xe = {
|
|
441
441
|
name: "x",
|
|
442
442
|
size: 24,
|
|
443
443
|
node: [["path", {
|
|
@@ -449,7 +449,7 @@ var be = R(ye), xe = {
|
|
|
449
449
|
}]]
|
|
450
450
|
};
|
|
451
451
|
xe.node;
|
|
452
|
-
var Se =
|
|
452
|
+
var Se = z(xe), H = {
|
|
453
453
|
neutral: "_neutral_13wj2_1",
|
|
454
454
|
pill: "_pill_13wj2_2",
|
|
455
455
|
accent: "_accent_13wj2_3",
|
|
@@ -627,6 +627,75 @@ function je({ searchValue: e, onSearchChange: t, placeholder: n = "Search…", s
|
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
629
|
var Me = {
|
|
630
|
+
anchor: "_anchor_bty8b_3",
|
|
631
|
+
sentinel: "_sentinel_bty8b_8",
|
|
632
|
+
header: "_header_bty8b_17",
|
|
633
|
+
card: "_card_bty8b_30",
|
|
634
|
+
animated: "_animated_bty8b_57",
|
|
635
|
+
left: "_left_bty8b_66",
|
|
636
|
+
right: "_right_bty8b_67"
|
|
637
|
+
}, Ne = 16;
|
|
638
|
+
function Pe(e) {
|
|
639
|
+
let t = e.parentElement;
|
|
640
|
+
for (; t && t !== document.body && t !== document.documentElement;) {
|
|
641
|
+
let { overflowY: e } = getComputedStyle(t);
|
|
642
|
+
if (e === "auto" || e === "scroll") return t;
|
|
643
|
+
t = t.parentElement;
|
|
644
|
+
}
|
|
645
|
+
return null;
|
|
646
|
+
}
|
|
647
|
+
function Fe({ left: e, right: t, children: n, scrollRoot: r, threshold: i = Ne, onStateChange: a, className: o, "data-testid": s = "header" }) {
|
|
648
|
+
let c = p(null), [u, d] = m("top"), [f, h] = m(!1), y = p(a);
|
|
649
|
+
l(() => {
|
|
650
|
+
y.current = a;
|
|
651
|
+
});
|
|
652
|
+
let b = p("top");
|
|
653
|
+
l(() => {
|
|
654
|
+
b.current !== u && (b.current = u, y.current?.(u));
|
|
655
|
+
}, [u]), l(() => {
|
|
656
|
+
let e = c.current;
|
|
657
|
+
if (!e) return;
|
|
658
|
+
let t, n, i = !0, a = 0, o = () => {
|
|
659
|
+
let o = r === void 0 ? Pe(e) : r;
|
|
660
|
+
t && o === n || (t?.disconnect(), n = o, t = new IntersectionObserver((e) => {
|
|
661
|
+
let t = e[e.length - 1];
|
|
662
|
+
d(t.isIntersecting ? "top" : "floating"), i && (i = !1, a = requestAnimationFrame(() => h(!0)));
|
|
663
|
+
}, { root: o }), t.observe(e));
|
|
664
|
+
};
|
|
665
|
+
return o(), window.addEventListener("resize", o), () => {
|
|
666
|
+
window.removeEventListener("resize", o), cancelAnimationFrame(a), t?.disconnect();
|
|
667
|
+
};
|
|
668
|
+
}, [r, i]);
|
|
669
|
+
let x = [
|
|
670
|
+
Me.card,
|
|
671
|
+
f ? Me.animated : "",
|
|
672
|
+
o
|
|
673
|
+
].filter(Boolean).join(" ");
|
|
674
|
+
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
|
|
675
|
+
className: Me.anchor,
|
|
676
|
+
"aria-hidden": "true",
|
|
677
|
+
children: /* @__PURE__ */ _("div", {
|
|
678
|
+
ref: c,
|
|
679
|
+
className: Me.sentinel,
|
|
680
|
+
style: { top: i }
|
|
681
|
+
})
|
|
682
|
+
}), /* @__PURE__ */ _("header", {
|
|
683
|
+
className: Me.header,
|
|
684
|
+
"data-testid": s,
|
|
685
|
+
children: /* @__PURE__ */ _("div", {
|
|
686
|
+
className: x,
|
|
687
|
+
"data-state": u,
|
|
688
|
+
children: n ?? /* @__PURE__ */ v(g, { children: [e && /* @__PURE__ */ _("div", {
|
|
689
|
+
className: Me.left,
|
|
690
|
+
children: e
|
|
691
|
+
}), t && /* @__PURE__ */ _("div", {
|
|
692
|
+
className: Me.right,
|
|
693
|
+
children: t
|
|
694
|
+
})] })
|
|
695
|
+
})
|
|
696
|
+
})] });
|
|
697
|
+
}
|
|
698
|
+
var Ie = {
|
|
630
699
|
checkbox: "_checkbox_fknu2_1",
|
|
631
700
|
control: "_control_fknu2_8",
|
|
632
701
|
labelText: "_labelText_fknu2_17",
|
|
@@ -637,15 +706,15 @@ var Me = {
|
|
|
637
706
|
};
|
|
638
707
|
//#endregion
|
|
639
708
|
//#region src/components/Checkbox.tsx
|
|
640
|
-
function
|
|
709
|
+
function Le({ checked: e, onChange: t, onBlur: n, name: r, label: i, ariaLabel: a, disabled: o, className: s, ref: c }) {
|
|
641
710
|
return /* @__PURE__ */ v("label", {
|
|
642
|
-
className: `${
|
|
711
|
+
className: `${Ie.checkbox} ${s ?? ""}`,
|
|
643
712
|
children: [/* @__PURE__ */ v("span", {
|
|
644
|
-
className:
|
|
713
|
+
className: Ie.control,
|
|
645
714
|
children: [/* @__PURE__ */ _("input", {
|
|
646
715
|
ref: c,
|
|
647
716
|
type: "checkbox",
|
|
648
|
-
className:
|
|
717
|
+
className: Ie.input,
|
|
649
718
|
checked: e,
|
|
650
719
|
onChange: t,
|
|
651
720
|
onBlur: n,
|
|
@@ -653,35 +722,35 @@ function Ne({ checked: e, onChange: t, onBlur: n, name: r, label: i, ariaLabel:
|
|
|
653
722
|
"aria-label": a,
|
|
654
723
|
disabled: o
|
|
655
724
|
}), /* @__PURE__ */ _("span", {
|
|
656
|
-
className:
|
|
725
|
+
className: Ie.box,
|
|
657
726
|
children: /* @__PURE__ */ _("svg", {
|
|
658
|
-
className:
|
|
727
|
+
className: Ie.icon,
|
|
659
728
|
viewBox: "0 0 17 18",
|
|
660
729
|
"aria-hidden": "true",
|
|
661
730
|
children: /* @__PURE__ */ _("polyline", { points: "1 9 7 14 15 4" })
|
|
662
731
|
})
|
|
663
732
|
})]
|
|
664
733
|
}), i && /* @__PURE__ */ _("span", {
|
|
665
|
-
className:
|
|
734
|
+
className: Ie.labelText,
|
|
666
735
|
children: i
|
|
667
736
|
})]
|
|
668
737
|
});
|
|
669
738
|
}
|
|
670
|
-
function
|
|
739
|
+
function Re({ checked: e, disabled: t }) {
|
|
671
740
|
return /* @__PURE__ */ _("span", {
|
|
672
|
-
className: `${
|
|
741
|
+
className: `${Ie.box} ${Ie.indicator}`,
|
|
673
742
|
"data-checked": e,
|
|
674
743
|
"data-disabled": t || void 0,
|
|
675
744
|
"aria-hidden": "true",
|
|
676
745
|
children: /* @__PURE__ */ _("svg", {
|
|
677
|
-
className:
|
|
746
|
+
className: Ie.icon,
|
|
678
747
|
viewBox: "0 0 17 18",
|
|
679
748
|
"aria-hidden": "true",
|
|
680
749
|
children: /* @__PURE__ */ _("polyline", { points: "1 9 7 14 15 4" })
|
|
681
750
|
})
|
|
682
751
|
});
|
|
683
752
|
}
|
|
684
|
-
function
|
|
753
|
+
function ze({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
685
754
|
function o(e) {
|
|
686
755
|
r(n.includes(e) ? n.filter((t) => t !== e) : [...n, e]);
|
|
687
756
|
}
|
|
@@ -692,7 +761,7 @@ function Fe({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
|
692
761
|
children: [e && /* @__PURE__ */ _(U, {
|
|
693
762
|
className: De.groupLabel,
|
|
694
763
|
children: e
|
|
695
|
-
}), t.map((e) => /* @__PURE__ */ _(
|
|
764
|
+
}), t.map((e) => /* @__PURE__ */ _(Le, {
|
|
696
765
|
checked: n.includes(e.value),
|
|
697
766
|
onChange: () => o(e.value),
|
|
698
767
|
label: e.label,
|
|
@@ -700,7 +769,7 @@ function Fe({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
|
700
769
|
}, e.value))]
|
|
701
770
|
});
|
|
702
771
|
}
|
|
703
|
-
var
|
|
772
|
+
var Be = {
|
|
704
773
|
radio: "_radio_46a3j_1",
|
|
705
774
|
control: "_control_46a3j_8",
|
|
706
775
|
labelText: "_labelText_46a3j_17",
|
|
@@ -710,15 +779,15 @@ var Ie = {
|
|
|
710
779
|
};
|
|
711
780
|
//#endregion
|
|
712
781
|
//#region src/components/RadioButton.tsx
|
|
713
|
-
function
|
|
782
|
+
function Ve({ checked: e, onChange: t, onBlur: n, name: r, value: i, label: a, ariaLabel: o, disabled: s, className: c, ref: l }) {
|
|
714
783
|
return /* @__PURE__ */ v("label", {
|
|
715
|
-
className: `${
|
|
784
|
+
className: `${Be.radio} ${c ?? ""}`,
|
|
716
785
|
children: [/* @__PURE__ */ v("span", {
|
|
717
|
-
className:
|
|
786
|
+
className: Be.control,
|
|
718
787
|
children: [/* @__PURE__ */ _("input", {
|
|
719
788
|
ref: l,
|
|
720
789
|
type: "radio",
|
|
721
|
-
className:
|
|
790
|
+
className: Be.input,
|
|
722
791
|
checked: e,
|
|
723
792
|
onChange: t,
|
|
724
793
|
onBlur: n,
|
|
@@ -727,16 +796,16 @@ function Le({ checked: e, onChange: t, onBlur: n, name: r, value: i, label: a, a
|
|
|
727
796
|
"aria-label": o,
|
|
728
797
|
disabled: s
|
|
729
798
|
}), /* @__PURE__ */ _("span", {
|
|
730
|
-
className:
|
|
731
|
-
children: /* @__PURE__ */ _("span", { className:
|
|
799
|
+
className: Be.circle,
|
|
800
|
+
children: /* @__PURE__ */ _("span", { className: Be.dot })
|
|
732
801
|
})]
|
|
733
802
|
}), a && /* @__PURE__ */ _("span", {
|
|
734
|
-
className:
|
|
803
|
+
className: Be.labelText,
|
|
735
804
|
children: a
|
|
736
805
|
})]
|
|
737
806
|
});
|
|
738
807
|
}
|
|
739
|
-
function
|
|
808
|
+
function He({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, ...o }) {
|
|
740
809
|
return /* @__PURE__ */ v("div", {
|
|
741
810
|
role: "radiogroup",
|
|
742
811
|
"aria-label": e ? void 0 : o["aria-label"],
|
|
@@ -744,7 +813,7 @@ function Re({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, .
|
|
|
744
813
|
children: [e && /* @__PURE__ */ _(U, {
|
|
745
814
|
className: De.groupLabel,
|
|
746
815
|
children: e
|
|
747
|
-
}), n.map((e) => /* @__PURE__ */ _(
|
|
816
|
+
}), n.map((e) => /* @__PURE__ */ _(Ve, {
|
|
748
817
|
name: t,
|
|
749
818
|
value: e.value,
|
|
750
819
|
checked: r === e.value,
|
|
@@ -754,7 +823,7 @@ function Re({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, .
|
|
|
754
823
|
}, e.value))]
|
|
755
824
|
});
|
|
756
825
|
}
|
|
757
|
-
var
|
|
826
|
+
var Ue = {
|
|
758
827
|
switch: "_switch_2mkka_1",
|
|
759
828
|
input: "_input_2mkka_7",
|
|
760
829
|
control: "_control_2mkka_10",
|
|
@@ -766,25 +835,25 @@ var ze = {
|
|
|
766
835
|
};
|
|
767
836
|
//#endregion
|
|
768
837
|
//#region src/components/Switch.tsx
|
|
769
|
-
function
|
|
838
|
+
function We({ checked: e, onChange: t, size: n = "base", label: r, ariaLabel: i, disabled: a, className: o }) {
|
|
770
839
|
return /* @__PURE__ */ v("label", {
|
|
771
|
-
className: `${
|
|
840
|
+
className: `${Ue.switch} ${o ?? ""}`,
|
|
772
841
|
children: [/* @__PURE__ */ v("span", {
|
|
773
|
-
className: `${
|
|
842
|
+
className: `${Ue.control} ${Ue[n]}`,
|
|
774
843
|
children: [/* @__PURE__ */ _("input", {
|
|
775
844
|
type: "checkbox",
|
|
776
845
|
role: "switch",
|
|
777
|
-
className:
|
|
846
|
+
className: Ue.input,
|
|
778
847
|
checked: e,
|
|
779
848
|
onChange: t,
|
|
780
849
|
"aria-label": i,
|
|
781
850
|
disabled: a
|
|
782
851
|
}), /* @__PURE__ */ _("span", {
|
|
783
|
-
className:
|
|
784
|
-
children: /* @__PURE__ */ _("span", { className:
|
|
852
|
+
className: Ue.track,
|
|
853
|
+
children: /* @__PURE__ */ _("span", { className: Ue.thumb })
|
|
785
854
|
})]
|
|
786
855
|
}), r && /* @__PURE__ */ _("span", {
|
|
787
|
-
className:
|
|
856
|
+
className: Ue.labelText,
|
|
788
857
|
children: r
|
|
789
858
|
})]
|
|
790
859
|
});
|
|
@@ -804,27 +873,27 @@ var W = {
|
|
|
804
873
|
pickerInput: "_pickerInput_f8lam_165",
|
|
805
874
|
shortcut: "_shortcut_f8lam_173",
|
|
806
875
|
kbd: "_kbd_f8lam_181"
|
|
807
|
-
},
|
|
876
|
+
}, Ge = () => typeof navigator < "u" && /mac|iphone|ipad/i.test(navigator.platform), Ke = {
|
|
808
877
|
alt: "⌥",
|
|
809
878
|
shift: "⇧",
|
|
810
879
|
ctrl: "Ctrl",
|
|
811
880
|
enter: "↵",
|
|
812
881
|
esc: "Esc"
|
|
813
882
|
};
|
|
814
|
-
function
|
|
815
|
-
let t =
|
|
816
|
-
return a.push(
|
|
883
|
+
function qe(e) {
|
|
884
|
+
let t = Ge(), 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" : Ke[e] ?? e);
|
|
885
|
+
return a.push(Ke[r] ?? r.toUpperCase()), {
|
|
817
886
|
key: r,
|
|
818
887
|
mods: i,
|
|
819
888
|
mac: t,
|
|
820
889
|
labels: a
|
|
821
890
|
};
|
|
822
891
|
}
|
|
823
|
-
function
|
|
892
|
+
function Je({ label: e, helperText: t, error: n, size: r = "base", variant: i = "default", leadingIcon: a, shortcut: o, id: s, className: c, ref: d, ...f }) {
|
|
824
893
|
let m = u(), h = s ?? m, g = p(null);
|
|
825
894
|
return l(() => {
|
|
826
895
|
if (!o) return;
|
|
827
|
-
let { key: e, mods: t, mac: n } =
|
|
896
|
+
let { key: e, mods: t, mac: n } = qe(o), r = (r) => {
|
|
828
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());
|
|
829
898
|
};
|
|
830
899
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
@@ -853,7 +922,7 @@ function We({ label: e, helperText: t, error: n, size: r = "base", variant: i =
|
|
|
853
922
|
o && /* @__PURE__ */ _("span", {
|
|
854
923
|
className: W.shortcut,
|
|
855
924
|
"aria-hidden": "true",
|
|
856
|
-
children:
|
|
925
|
+
children: qe(o).labels.map((e) => /* @__PURE__ */ _("kbd", {
|
|
857
926
|
className: W.kbd,
|
|
858
927
|
children: e
|
|
859
928
|
}, e))
|
|
@@ -890,10 +959,10 @@ var G = {
|
|
|
890
959
|
};
|
|
891
960
|
//#endregion
|
|
892
961
|
//#region src/components/TextArea.tsx
|
|
893
|
-
function
|
|
962
|
+
function Ye(e, t) {
|
|
894
963
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
895
964
|
}
|
|
896
|
-
function
|
|
965
|
+
function Xe({ 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 }) {
|
|
897
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(() => {
|
|
898
967
|
let e = A.current;
|
|
899
968
|
if (!e || !a) return;
|
|
@@ -924,17 +993,17 @@ function Ke({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
924
993
|
j || N(e.target.value.length), w?.(e);
|
|
925
994
|
}, I = (e) => {
|
|
926
995
|
j || (N(e.currentTarget.value.length), F()), T?.(e);
|
|
927
|
-
}, L = `${k}-helper`,
|
|
996
|
+
}, L = `${k}-helper`, R = `${k}-error`, z = `${k}-count`, B = [
|
|
928
997
|
E,
|
|
929
|
-
n ?
|
|
930
|
-
c ?
|
|
931
|
-
].filter(Boolean).join(" ") || void 0,
|
|
998
|
+
n ? R : t ? L : null,
|
|
999
|
+
c ? z : null
|
|
1000
|
+
].filter(Boolean).join(" ") || void 0, te = x ? P / x : 0, ne = te >= 1 ? G.countLimit : te >= .9 ? G.countNear : "", re = [
|
|
932
1001
|
G.wrap,
|
|
933
1002
|
G[r],
|
|
934
1003
|
n ? G.errorWrap : "",
|
|
935
1004
|
S ? G.disabled : "",
|
|
936
1005
|
C ? G.readOnly : ""
|
|
937
|
-
].filter(Boolean).join(" "),
|
|
1006
|
+
].filter(Boolean).join(" "), ie = a ? "none" : i;
|
|
938
1007
|
return /* @__PURE__ */ v("div", {
|
|
939
1008
|
className: [G.field, f].filter(Boolean).join(" "),
|
|
940
1009
|
children: [
|
|
@@ -943,14 +1012,14 @@ function Ke({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
943
1012
|
children: e
|
|
944
1013
|
}),
|
|
945
1014
|
/* @__PURE__ */ _("div", {
|
|
946
|
-
className:
|
|
1015
|
+
className: re,
|
|
947
1016
|
children: /* @__PURE__ */ _("textarea", {
|
|
948
1017
|
...D,
|
|
949
1018
|
ref: (e) => {
|
|
950
|
-
A.current = e,
|
|
1019
|
+
A.current = e, Ye(h, e);
|
|
951
1020
|
},
|
|
952
1021
|
id: k,
|
|
953
|
-
className: `${G.textarea} ${G[`resize-${
|
|
1022
|
+
className: `${G.textarea} ${G[`resize-${ie}`]}`,
|
|
954
1023
|
rows: g,
|
|
955
1024
|
value: y,
|
|
956
1025
|
defaultValue: b,
|
|
@@ -958,7 +1027,7 @@ function Ke({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
958
1027
|
disabled: S,
|
|
959
1028
|
readOnly: C,
|
|
960
1029
|
"aria-invalid": n ? !0 : D["aria-invalid"],
|
|
961
|
-
"aria-describedby":
|
|
1030
|
+
"aria-describedby": B,
|
|
962
1031
|
onChange: ee,
|
|
963
1032
|
onInput: I
|
|
964
1033
|
})
|
|
@@ -966,7 +1035,7 @@ function Ke({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
966
1035
|
(n || t || c) && /* @__PURE__ */ v("div", {
|
|
967
1036
|
className: G.footer,
|
|
968
1037
|
children: [n ? /* @__PURE__ */ _("span", {
|
|
969
|
-
id:
|
|
1038
|
+
id: R,
|
|
970
1039
|
className: G.errorText,
|
|
971
1040
|
children: n
|
|
972
1041
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
@@ -974,8 +1043,8 @@ function Ke({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
974
1043
|
className: G.helperText,
|
|
975
1044
|
children: t
|
|
976
1045
|
}) : null, c && /* @__PURE__ */ _("span", {
|
|
977
|
-
id:
|
|
978
|
-
className: `${G.count} ${
|
|
1046
|
+
id: z,
|
|
1047
|
+
className: `${G.count} ${ne}`,
|
|
979
1048
|
children: x ? `${P} / ${x}` : P
|
|
980
1049
|
})]
|
|
981
1050
|
})
|
|
@@ -984,7 +1053,7 @@ function Ke({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
984
1053
|
}
|
|
985
1054
|
//#endregion
|
|
986
1055
|
//#region src/components/PasswordField.tsx
|
|
987
|
-
function
|
|
1056
|
+
function Ze({ 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 }) {
|
|
988
1057
|
let p = u(), h = s ?? p, [g, y] = m(o);
|
|
989
1058
|
return /* @__PURE__ */ v("div", {
|
|
990
1059
|
className: [W.field, c].filter(Boolean).join(" "),
|
|
@@ -1011,7 +1080,7 @@ function qe({ label: e, helperText: t, error: n, size: r = "base", showLabel: i
|
|
|
1011
1080
|
"aria-controls": h,
|
|
1012
1081
|
disabled: d,
|
|
1013
1082
|
onClick: () => y((e) => !e),
|
|
1014
|
-
children: _(g ?
|
|
1083
|
+
children: _(g ? de : fe, {})
|
|
1015
1084
|
})]
|
|
1016
1085
|
}),
|
|
1017
1086
|
n ? /* @__PURE__ */ _("span", {
|
|
@@ -1026,7 +1095,7 @@ function qe({ label: e, helperText: t, error: n, size: r = "base", showLabel: i
|
|
|
1026
1095
|
}
|
|
1027
1096
|
//#endregion
|
|
1028
1097
|
//#region src/components/DateField.tsx
|
|
1029
|
-
function
|
|
1098
|
+
function Qe({ label: e, helperText: t, error: n, size: r = "base", openLabel: i = "Open calendar", id: a, className: o, ref: s, onClick: c, disabled: l, ...d }) {
|
|
1030
1099
|
let f = u(), m = a ?? f, h = p(null);
|
|
1031
1100
|
function g(e) {
|
|
1032
1101
|
h.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
@@ -1056,7 +1125,7 @@ function Je({ label: e, helperText: t, error: n, size: r = "base", openLabel: i
|
|
|
1056
1125
|
"aria-label": i,
|
|
1057
1126
|
disabled: l,
|
|
1058
1127
|
onClick: () => h.current?.click(),
|
|
1059
|
-
children: /* @__PURE__ */ _(
|
|
1128
|
+
children: /* @__PURE__ */ _(ae, {})
|
|
1060
1129
|
})]
|
|
1061
1130
|
}),
|
|
1062
1131
|
n ? /* @__PURE__ */ _("span", {
|
|
@@ -1071,44 +1140,44 @@ function Je({ label: e, helperText: t, error: n, size: r = "base", openLabel: i
|
|
|
1071
1140
|
}
|
|
1072
1141
|
//#endregion
|
|
1073
1142
|
//#region src/utils/date.ts
|
|
1074
|
-
function
|
|
1143
|
+
function $e(e) {
|
|
1075
1144
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
1076
1145
|
}
|
|
1077
|
-
function
|
|
1146
|
+
function et(e, t) {
|
|
1078
1147
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
|
|
1079
1148
|
}
|
|
1080
|
-
function
|
|
1149
|
+
function tt(e, t) {
|
|
1081
1150
|
return new Date(e, t + 1, 0).getDate();
|
|
1082
1151
|
}
|
|
1083
|
-
function
|
|
1084
|
-
let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = Math.min(e.getDate(),
|
|
1152
|
+
function nt(e, t) {
|
|
1153
|
+
let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = Math.min(e.getDate(), tt(n.getFullYear(), n.getMonth()));
|
|
1085
1154
|
return new Date(n.getFullYear(), n.getMonth(), r);
|
|
1086
1155
|
}
|
|
1087
|
-
function
|
|
1156
|
+
function rt(e, t) {
|
|
1088
1157
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1089
1158
|
}
|
|
1090
|
-
function
|
|
1159
|
+
function it(e, t) {
|
|
1091
1160
|
return e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate();
|
|
1092
1161
|
}
|
|
1093
|
-
function
|
|
1094
|
-
return !!(t &&
|
|
1162
|
+
function at(e, t, n) {
|
|
1163
|
+
return !!(t && it(e, t) < 0 || n && it(e, n) > 0);
|
|
1095
1164
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return t &&
|
|
1165
|
+
function ot(e, t, n) {
|
|
1166
|
+
return t && it(e, t) < 0 ? $e(t) : n && it(e, n) > 0 ? $e(n) : $e(e);
|
|
1098
1167
|
}
|
|
1099
|
-
function
|
|
1100
|
-
return
|
|
1168
|
+
function st(e, t) {
|
|
1169
|
+
return et(e, -((e.getDay() - t + 7) % 7));
|
|
1101
1170
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return
|
|
1171
|
+
function ct(e, t) {
|
|
1172
|
+
return et(st(e, t), 6);
|
|
1104
1173
|
}
|
|
1105
|
-
var
|
|
1106
|
-
function
|
|
1107
|
-
let r =
|
|
1108
|
-
for (let e = 0; e <
|
|
1174
|
+
var lt = 6;
|
|
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++) {
|
|
1109
1178
|
let n = [];
|
|
1110
1179
|
for (let i = 0; i < 7; i++) {
|
|
1111
|
-
let a =
|
|
1180
|
+
let a = et(r, e * 7 + i);
|
|
1112
1181
|
n.push({
|
|
1113
1182
|
date: a,
|
|
1114
1183
|
inMonth: a.getMonth() === t
|
|
@@ -1131,22 +1200,22 @@ var K = {
|
|
|
1131
1200
|
disabled: "_disabled_12ign_61",
|
|
1132
1201
|
outside: "_outside_12ign_68",
|
|
1133
1202
|
today: "_today_12ign_71"
|
|
1134
|
-
},
|
|
1135
|
-
function
|
|
1203
|
+
}, dt = (e) => `${e.getFullYear()}-${e.getMonth() + 1}-${e.getDate()}`;
|
|
1204
|
+
function ft(e, t) {
|
|
1136
1205
|
return e.charAt(0).toLocaleUpperCase(t) + e.slice(1);
|
|
1137
1206
|
}
|
|
1138
|
-
function
|
|
1139
|
-
let [h, g] = m(() =>
|
|
1140
|
-
y !== b && (x(y), e && g(
|
|
1207
|
+
function pt({ 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(() => ot(e ?? /* @__PURE__ */ new Date(), n, r)), y = e ? dt(e) : null, [b, x] = m(y);
|
|
1209
|
+
y !== b && (x(y), e && g(ot(e, n, r)));
|
|
1141
1210
|
let S = p(null), C = p(!!o), T = u();
|
|
1142
1211
|
l(() => {
|
|
1143
|
-
C.current && (C.current = !1, S.current?.querySelector(`[data-date="${
|
|
1212
|
+
C.current && (C.current = !1, S.current?.querySelector(`[data-date="${dt(h)}"]`)?.focus());
|
|
1144
1213
|
}, [h]);
|
|
1145
|
-
let E = h.getFullYear(), D = h.getMonth(), O = f(() =>
|
|
1214
|
+
let E = h.getFullYear(), D = h.getMonth(), O = f(() => ut(E, D, a), [
|
|
1146
1215
|
E,
|
|
1147
1216
|
D,
|
|
1148
1217
|
a
|
|
1149
|
-
]), k =
|
|
1218
|
+
]), k = $e(/* @__PURE__ */ new Date()), A = f(() => ({
|
|
1150
1219
|
title: new Intl.DateTimeFormat(i, {
|
|
1151
1220
|
month: "long",
|
|
1152
1221
|
year: "numeric"
|
|
@@ -1155,46 +1224,46 @@ function lt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1155
1224
|
long: new Intl.DateTimeFormat(i, { weekday: "long" }),
|
|
1156
1225
|
full: new Intl.DateTimeFormat(i, { dateStyle: "full" })
|
|
1157
1226
|
}), [i]), j = O[0].map(({ date: e }) => ({
|
|
1158
|
-
short:
|
|
1227
|
+
short: ft(A.short.format(e), i).slice(0, 2),
|
|
1159
1228
|
long: A.long.format(e)
|
|
1160
|
-
})), M = (e) => !!n && new Date(e.getFullYear(), e.getMonth(), 0) <
|
|
1229
|
+
})), M = (e) => !!n && new Date(e.getFullYear(), e.getMonth(), 0) < $e(n), N = (e) => !!r && new Date(e.getFullYear(), e.getMonth() + 1, 1) > $e(r), P = M(h), F = N(h);
|
|
1161
1230
|
function ee(e) {
|
|
1162
|
-
C.current = !0, g(
|
|
1231
|
+
C.current = !0, g(ot(e, n, r));
|
|
1163
1232
|
}
|
|
1164
1233
|
function I(e) {
|
|
1165
|
-
let t = nt(
|
|
1234
|
+
let t = ot(nt(h, e), n, r);
|
|
1166
1235
|
C.current = e < 0 ? M(t) : N(t), g(t);
|
|
1167
1236
|
}
|
|
1168
1237
|
function L(e) {
|
|
1169
1238
|
let t = null;
|
|
1170
1239
|
switch (e.key) {
|
|
1171
1240
|
case "ArrowLeft":
|
|
1172
|
-
t =
|
|
1241
|
+
t = et(h, -1);
|
|
1173
1242
|
break;
|
|
1174
1243
|
case "ArrowRight":
|
|
1175
|
-
t =
|
|
1244
|
+
t = et(h, 1);
|
|
1176
1245
|
break;
|
|
1177
1246
|
case "ArrowUp":
|
|
1178
|
-
t =
|
|
1247
|
+
t = et(h, -7);
|
|
1179
1248
|
break;
|
|
1180
1249
|
case "ArrowDown":
|
|
1181
|
-
t =
|
|
1250
|
+
t = et(h, 7);
|
|
1182
1251
|
break;
|
|
1183
1252
|
case "PageUp":
|
|
1184
|
-
t =
|
|
1253
|
+
t = nt(h, -1);
|
|
1185
1254
|
break;
|
|
1186
1255
|
case "PageDown":
|
|
1187
|
-
t =
|
|
1256
|
+
t = nt(h, 1);
|
|
1188
1257
|
break;
|
|
1189
1258
|
case "Home":
|
|
1190
|
-
t =
|
|
1259
|
+
t = st(h, a);
|
|
1191
1260
|
break;
|
|
1192
|
-
case "End": t =
|
|
1261
|
+
case "End": t = ct(h, a);
|
|
1193
1262
|
}
|
|
1194
1263
|
t && (e.preventDefault(), ee(t));
|
|
1195
1264
|
}
|
|
1196
|
-
function
|
|
1197
|
-
let n =
|
|
1265
|
+
function R(e) {
|
|
1266
|
+
let n = $e(e);
|
|
1198
1267
|
g(n), t(n);
|
|
1199
1268
|
}
|
|
1200
1269
|
return /* @__PURE__ */ v("div", {
|
|
@@ -1206,7 +1275,7 @@ function lt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1206
1275
|
variant: "tertiary",
|
|
1207
1276
|
size: "sm",
|
|
1208
1277
|
className: K.navButton,
|
|
1209
|
-
leadingIcon: /* @__PURE__ */ _(
|
|
1278
|
+
leadingIcon: /* @__PURE__ */ _(se, {}),
|
|
1210
1279
|
"aria-label": s,
|
|
1211
1280
|
disabled: P,
|
|
1212
1281
|
onClick: () => I(-1)
|
|
@@ -1215,13 +1284,13 @@ function lt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1215
1284
|
id: T,
|
|
1216
1285
|
className: K.title,
|
|
1217
1286
|
"aria-live": "polite",
|
|
1218
|
-
children:
|
|
1287
|
+
children: ft(A.title.format(h), i)
|
|
1219
1288
|
}),
|
|
1220
1289
|
/* @__PURE__ */ _(w, {
|
|
1221
1290
|
variant: "tertiary",
|
|
1222
1291
|
size: "sm",
|
|
1223
1292
|
className: K.navButton,
|
|
1224
|
-
leadingIcon: /* @__PURE__ */ _(
|
|
1293
|
+
leadingIcon: /* @__PURE__ */ _(le, {}),
|
|
1225
1294
|
"aria-label": c,
|
|
1226
1295
|
disabled: F,
|
|
1227
1296
|
onClick: () => I(1)
|
|
@@ -1246,12 +1315,12 @@ function lt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1246
1315
|
role: "row",
|
|
1247
1316
|
className: K.row,
|
|
1248
1317
|
children: t.map(({ date: t, inMonth: i }) => {
|
|
1249
|
-
let a =
|
|
1318
|
+
let a = at(t, n, r), o = !!e && rt(t, e), s = rt(t, k);
|
|
1250
1319
|
return /* @__PURE__ */ _("button", {
|
|
1251
1320
|
type: "button",
|
|
1252
1321
|
role: "gridcell",
|
|
1253
|
-
"data-date":
|
|
1254
|
-
tabIndex:
|
|
1322
|
+
"data-date": dt(t),
|
|
1323
|
+
tabIndex: rt(t, h) ? 0 : -1,
|
|
1255
1324
|
"aria-selected": o,
|
|
1256
1325
|
"aria-disabled": a || void 0,
|
|
1257
1326
|
"aria-current": s ? "date" : void 0,
|
|
@@ -1264,30 +1333,30 @@ function lt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1264
1333
|
a && K.disabled
|
|
1265
1334
|
].filter(Boolean).join(" "),
|
|
1266
1335
|
onMouseDown: a ? (e) => e.preventDefault() : void 0,
|
|
1267
|
-
onClick: a ? void 0 : () =>
|
|
1336
|
+
onClick: a ? void 0 : () => R(t),
|
|
1268
1337
|
children: t.getDate()
|
|
1269
|
-
},
|
|
1338
|
+
}, dt(t));
|
|
1270
1339
|
})
|
|
1271
|
-
},
|
|
1340
|
+
}, dt(t[0].date)))]
|
|
1272
1341
|
})]
|
|
1273
1342
|
});
|
|
1274
1343
|
}
|
|
1275
|
-
var
|
|
1276
|
-
function
|
|
1344
|
+
var mt = { popup: "_popup_hem3z_1" }, ht = "(max-width: 480px)", gt = 4, _t = 8;
|
|
1345
|
+
function vt({ 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 }) {
|
|
1277
1346
|
let [k, A] = m(!1), j = p(null), M = p(null), N = u(), P = k && !i, F = f(() => new Intl.DateTimeFormat(a, {
|
|
1278
1347
|
month: "short",
|
|
1279
1348
|
day: "2-digit"
|
|
1280
1349
|
}), [a]), ee = e ? c ? c(e) : F.format(e) : "", I = s(() => j.current?.parentElement ?? j.current, []), L = s(() => {
|
|
1281
1350
|
let e = M.current, t = I();
|
|
1282
1351
|
if (!e || !t) return;
|
|
1283
|
-
if (window.matchMedia(
|
|
1352
|
+
if (window.matchMedia(ht).matches) {
|
|
1284
1353
|
e.style.left = "", e.style.top = "";
|
|
1285
1354
|
return;
|
|
1286
1355
|
}
|
|
1287
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;
|
|
1288
|
-
s = Math.max(
|
|
1289
|
-
let c = n.bottom +
|
|
1290
|
-
!l && u && (c = n.top -
|
|
1357
|
+
s = Math.max(_t, Math.min(s, a - r - _t));
|
|
1358
|
+
let c = n.bottom + gt, l = c + i <= o - _t, u = n.top - gt - i >= _t;
|
|
1359
|
+
!l && u && (c = n.top - gt - i), e.style.left = `${s}px`, e.style.top = `${c}px`;
|
|
1291
1360
|
}, [I, y]);
|
|
1292
1361
|
d(() => {
|
|
1293
1362
|
if (P) return L(), window.addEventListener("resize", L), window.addEventListener("scroll", L, !0), () => {
|
|
@@ -1322,13 +1391,13 @@ function mt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1322
1391
|
window.removeEventListener("pointerdown", t), window.removeEventListener("keydown", n);
|
|
1323
1392
|
};
|
|
1324
1393
|
}, [P, I]);
|
|
1325
|
-
function
|
|
1394
|
+
function R(e) {
|
|
1326
1395
|
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), i || A(!0));
|
|
1327
1396
|
}
|
|
1328
|
-
function
|
|
1397
|
+
function z(e) {
|
|
1329
1398
|
t(e), A(!1), j.current?.focus();
|
|
1330
1399
|
}
|
|
1331
|
-
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(
|
|
1400
|
+
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Qe, {
|
|
1332
1401
|
ref: j,
|
|
1333
1402
|
id: O,
|
|
1334
1403
|
className: D,
|
|
@@ -1345,17 +1414,17 @@ function mt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1345
1414
|
"aria-expanded": P,
|
|
1346
1415
|
"aria-controls": P ? N : void 0,
|
|
1347
1416
|
onClick: () => !i && A((e) => !e),
|
|
1348
|
-
onKeyDown:
|
|
1417
|
+
onKeyDown: R
|
|
1349
1418
|
}), P && h(/* @__PURE__ */ _("div", {
|
|
1350
1419
|
ref: M,
|
|
1351
1420
|
id: N,
|
|
1352
1421
|
role: "dialog",
|
|
1353
1422
|
"aria-label": E,
|
|
1354
|
-
className:
|
|
1355
|
-
children: /* @__PURE__ */ _(
|
|
1423
|
+
className: mt.popup,
|
|
1424
|
+
children: /* @__PURE__ */ _(pt, {
|
|
1356
1425
|
autoFocus: !0,
|
|
1357
1426
|
value: e,
|
|
1358
|
-
onChange:
|
|
1427
|
+
onChange: z,
|
|
1359
1428
|
minDate: n,
|
|
1360
1429
|
maxDate: r,
|
|
1361
1430
|
locale: a,
|
|
@@ -1363,7 +1432,7 @@ function mt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1363
1432
|
})
|
|
1364
1433
|
}), document.body)] });
|
|
1365
1434
|
}
|
|
1366
|
-
var
|
|
1435
|
+
var yt = {
|
|
1367
1436
|
field: "_field_j9nb8_1",
|
|
1368
1437
|
inputWrap: "_inputWrap_j9nb8_6",
|
|
1369
1438
|
errorWrap: "_errorWrap_j9nb8_19",
|
|
@@ -1377,64 +1446,64 @@ var ht = {
|
|
|
1377
1446
|
};
|
|
1378
1447
|
//#endregion
|
|
1379
1448
|
//#region src/components/NumberField.tsx
|
|
1380
|
-
function
|
|
1449
|
+
function bt({ label: e, helperText: t, error: n, size: r = "base", prefix: i, suffix: a, id: o, ...s }) {
|
|
1381
1450
|
let c = u(), l = o ?? c;
|
|
1382
1451
|
return /* @__PURE__ */ v("div", {
|
|
1383
|
-
className:
|
|
1452
|
+
className: yt.field,
|
|
1384
1453
|
children: [
|
|
1385
1454
|
e && /* @__PURE__ */ _(U, {
|
|
1386
1455
|
htmlFor: l,
|
|
1387
1456
|
children: e
|
|
1388
1457
|
}),
|
|
1389
1458
|
/* @__PURE__ */ v("div", {
|
|
1390
|
-
className: `${
|
|
1459
|
+
className: `${yt.inputWrap} ${yt[r]} ${n ? yt.errorWrap : ""}`,
|
|
1391
1460
|
children: [
|
|
1392
1461
|
i && /* @__PURE__ */ _("span", {
|
|
1393
|
-
className:
|
|
1462
|
+
className: yt.prefix,
|
|
1394
1463
|
children: i
|
|
1395
1464
|
}),
|
|
1396
1465
|
/* @__PURE__ */ _("input", {
|
|
1397
1466
|
id: l,
|
|
1398
|
-
className:
|
|
1467
|
+
className: yt.input,
|
|
1399
1468
|
...s
|
|
1400
1469
|
}),
|
|
1401
1470
|
a && /* @__PURE__ */ _("span", {
|
|
1402
|
-
className:
|
|
1471
|
+
className: yt.suffix,
|
|
1403
1472
|
children: a
|
|
1404
1473
|
})
|
|
1405
1474
|
]
|
|
1406
1475
|
}),
|
|
1407
1476
|
n ? /* @__PURE__ */ _("span", {
|
|
1408
|
-
className:
|
|
1477
|
+
className: yt.errorText,
|
|
1409
1478
|
children: n
|
|
1410
1479
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
1411
|
-
className:
|
|
1480
|
+
className: yt.helperText,
|
|
1412
1481
|
children: t
|
|
1413
1482
|
}) : null
|
|
1414
1483
|
]
|
|
1415
1484
|
});
|
|
1416
1485
|
}
|
|
1417
|
-
var
|
|
1486
|
+
var xt = {
|
|
1418
1487
|
menu: "_menu_471l2_1",
|
|
1419
1488
|
divider: "_divider_471l2_15"
|
|
1420
1489
|
};
|
|
1421
1490
|
//#endregion
|
|
1422
1491
|
//#region src/components/Menu.tsx
|
|
1423
|
-
function
|
|
1492
|
+
function St({ children: e, ...t }) {
|
|
1424
1493
|
return /* @__PURE__ */ _("div", {
|
|
1425
1494
|
role: "menu",
|
|
1426
|
-
className:
|
|
1495
|
+
className: xt.menu,
|
|
1427
1496
|
...t,
|
|
1428
1497
|
children: e
|
|
1429
1498
|
});
|
|
1430
1499
|
}
|
|
1431
|
-
function
|
|
1500
|
+
function Ct() {
|
|
1432
1501
|
return /* @__PURE__ */ _("div", {
|
|
1433
|
-
className:
|
|
1502
|
+
className: xt.divider,
|
|
1434
1503
|
role: "separator"
|
|
1435
1504
|
});
|
|
1436
1505
|
}
|
|
1437
|
-
var
|
|
1506
|
+
var wt = {
|
|
1438
1507
|
item: "_item_1gkvo_1",
|
|
1439
1508
|
icon: "_icon_1gkvo_25",
|
|
1440
1509
|
check: "_check_1gkvo_26",
|
|
@@ -1446,11 +1515,11 @@ var bt = {
|
|
|
1446
1515
|
};
|
|
1447
1516
|
//#endregion
|
|
1448
1517
|
//#region src/components/MenuItem.tsx
|
|
1449
|
-
function
|
|
1518
|
+
function Tt({ leading: e, icon: t, trailing: n, selected: r, destructive: i, children: a, ...o }) {
|
|
1450
1519
|
let s = [
|
|
1451
|
-
|
|
1452
|
-
r &&
|
|
1453
|
-
i &&
|
|
1520
|
+
wt.item,
|
|
1521
|
+
r && wt.selected,
|
|
1522
|
+
i && wt.destructive
|
|
1454
1523
|
].filter(Boolean).join(" ");
|
|
1455
1524
|
return /* @__PURE__ */ v("button", {
|
|
1456
1525
|
type: "button",
|
|
@@ -1459,24 +1528,24 @@ function xt({ leading: e, icon: t, trailing: n, selected: r, destructive: i, chi
|
|
|
1459
1528
|
...o,
|
|
1460
1529
|
children: [
|
|
1461
1530
|
e && /* @__PURE__ */ _("span", {
|
|
1462
|
-
className:
|
|
1531
|
+
className: wt.leading,
|
|
1463
1532
|
children: e
|
|
1464
1533
|
}),
|
|
1465
1534
|
t && /* @__PURE__ */ _("span", {
|
|
1466
|
-
className:
|
|
1535
|
+
className: wt.icon,
|
|
1467
1536
|
children: t
|
|
1468
1537
|
}),
|
|
1469
1538
|
/* @__PURE__ */ _("span", {
|
|
1470
|
-
className:
|
|
1539
|
+
className: wt.label,
|
|
1471
1540
|
children: a
|
|
1472
1541
|
}),
|
|
1473
1542
|
n && /* @__PURE__ */ _("span", {
|
|
1474
|
-
className:
|
|
1543
|
+
className: wt.trailing,
|
|
1475
1544
|
children: n
|
|
1476
1545
|
}),
|
|
1477
1546
|
r && /* @__PURE__ */ _("span", {
|
|
1478
|
-
className:
|
|
1479
|
-
children: /* @__PURE__ */ _(
|
|
1547
|
+
className: wt.check,
|
|
1548
|
+
children: /* @__PURE__ */ _(re, {})
|
|
1480
1549
|
})
|
|
1481
1550
|
]
|
|
1482
1551
|
});
|
|
@@ -1517,15 +1586,15 @@ var q = {
|
|
|
1517
1586
|
};
|
|
1518
1587
|
//#endregion
|
|
1519
1588
|
//#region src/components/Dropdown.tsx
|
|
1520
|
-
function
|
|
1589
|
+
function Et(e) {
|
|
1521
1590
|
return e.searchText === void 0 ? typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : "" : e.searchText;
|
|
1522
1591
|
}
|
|
1523
|
-
function
|
|
1592
|
+
function Dt(e) {
|
|
1524
1593
|
return typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : e.searchText;
|
|
1525
1594
|
}
|
|
1526
|
-
var
|
|
1527
|
-
function
|
|
1528
|
-
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,
|
|
1595
|
+
var Ot = (e) => `and ${e} more`;
|
|
1596
|
+
function kt(e) {
|
|
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(null), B = p(null), te = p(null), ne = p(null), re = u(), ie = u(), oe = e.multiple ? void 0 : e.value, se = e.multiple && e.value || [], ce = se.map((e) => f.find((t) => t.value === e)).filter((e) => e !== void 0), le = k ? void 0 : f.find((e) => e.value === oe), ue = P.trim().toLowerCase(), de = y && ue ? f.filter((e) => Et(e).toLowerCase().includes(ue)) : f, V = de.filter((e) => !e.disabled).map((e) => e.value), fe = t === "field";
|
|
1529
1598
|
function pe() {
|
|
1530
1599
|
N(!0), j(!0);
|
|
1531
1600
|
}
|
|
@@ -1535,51 +1604,51 @@ function Tt(e) {
|
|
|
1535
1604
|
l(() => {
|
|
1536
1605
|
if (!A) return;
|
|
1537
1606
|
if (y) {
|
|
1538
|
-
|
|
1607
|
+
ne.current?.focus();
|
|
1539
1608
|
return;
|
|
1540
1609
|
}
|
|
1541
|
-
let e = (k ?
|
|
1542
|
-
(
|
|
1610
|
+
let e = (k ? ce.find((e) => !e.disabled)?.value : oe) ?? V[0];
|
|
1611
|
+
(z.current?.querySelector(`[data-value="${e}"]`))?.focus();
|
|
1543
1612
|
}, [A]), d(() => {
|
|
1544
|
-
if (!A || !
|
|
1545
|
-
let e =
|
|
1613
|
+
if (!A || !te.current || !z.current) return;
|
|
1614
|
+
let e = z.current.getBoundingClientRect(), t = te.current.offsetHeight, n = window.innerHeight - e.bottom, r = e.top;
|
|
1546
1615
|
I(n < t + 8 && r > n);
|
|
1547
1616
|
}, [A]), l(() => {
|
|
1548
1617
|
if (!A) return;
|
|
1549
1618
|
function e(e) {
|
|
1550
|
-
|
|
1619
|
+
z.current?.contains(e.target) || me();
|
|
1551
1620
|
}
|
|
1552
1621
|
function t(e) {
|
|
1553
|
-
e.key === "Escape" && (me(),
|
|
1622
|
+
e.key === "Escape" && (me(), B.current?.focus()), e.key === "Tab" && k && me();
|
|
1554
1623
|
}
|
|
1555
1624
|
return window.addEventListener("pointerdown", e), window.addEventListener("keydown", t), () => {
|
|
1556
1625
|
window.removeEventListener("pointerdown", e), window.removeEventListener("keydown", t);
|
|
1557
1626
|
};
|
|
1558
1627
|
}, [A, k]);
|
|
1559
1628
|
function he(e) {
|
|
1560
|
-
e !== void 0 &&
|
|
1629
|
+
e !== void 0 && z.current?.querySelector(`[data-value="${e}"]`)?.focus();
|
|
1561
1630
|
}
|
|
1562
1631
|
function ge(e) {
|
|
1563
1632
|
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), pe());
|
|
1564
1633
|
}
|
|
1565
1634
|
function _e(e) {
|
|
1566
|
-
e.key === "ArrowDown" && (e.preventDefault(), he(
|
|
1635
|
+
e.key === "ArrowDown" && (e.preventDefault(), he(V[0])), e.key === "Enter" && V.length === 1 && (e.preventDefault(), be(V[0]));
|
|
1567
1636
|
}
|
|
1568
1637
|
function ve(e, t) {
|
|
1569
|
-
let n =
|
|
1638
|
+
let n = V.indexOf(t);
|
|
1570
1639
|
if (n === -1) return;
|
|
1571
1640
|
let r = null;
|
|
1572
|
-
if (e.key === "ArrowDown" && (r = (n + 1) %
|
|
1641
|
+
if (e.key === "ArrowDown" && (r = (n + 1) % V.length), e.key === "ArrowUp") {
|
|
1573
1642
|
if (y && n === 0) {
|
|
1574
|
-
e.preventDefault(),
|
|
1643
|
+
e.preventDefault(), ne.current?.focus();
|
|
1575
1644
|
return;
|
|
1576
1645
|
}
|
|
1577
|
-
r = (n - 1 +
|
|
1646
|
+
r = (n - 1 + V.length) % V.length;
|
|
1578
1647
|
}
|
|
1579
|
-
e.key === "Home" && (r = 0), e.key === "End" && (r =
|
|
1648
|
+
e.key === "Home" && (r = 0), e.key === "End" && (r = V.length - 1), r !== null && (e.preventDefault(), he(V[r]));
|
|
1580
1649
|
}
|
|
1581
1650
|
function ye(e) {
|
|
1582
|
-
|
|
1651
|
+
R((t) => ({
|
|
1583
1652
|
top: e.offsetTop,
|
|
1584
1653
|
height: e.offsetHeight,
|
|
1585
1654
|
instant: !t
|
|
@@ -1591,22 +1660,22 @@ function Tt(e) {
|
|
|
1591
1660
|
e.onChange(n.includes(t) ? n.filter((e) => e !== t) : [...n, t]);
|
|
1592
1661
|
return;
|
|
1593
1662
|
}
|
|
1594
|
-
e.onChange(t), me(),
|
|
1663
|
+
e.onChange(t), me(), B.current?.focus();
|
|
1595
1664
|
}
|
|
1596
1665
|
function xe() {
|
|
1597
|
-
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(
|
|
1598
|
-
let t =
|
|
1599
|
-
if (
|
|
1600
|
-
let n =
|
|
1601
|
-
return n === void 0 ? `${
|
|
1666
|
+
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(ce);
|
|
1667
|
+
let t = ce[0];
|
|
1668
|
+
if (ce.length === 1) return t.label;
|
|
1669
|
+
let n = Dt(t);
|
|
1670
|
+
return n === void 0 ? `${ce.length} selected` : `${n} ${(e.multiple && e.moreText || Ot)(ce.length - 1)}`;
|
|
1602
1671
|
}
|
|
1603
|
-
let Se = n === void 0 && (k ?
|
|
1672
|
+
let Se = n === void 0 && (k ? ce.length === 0 : !le), H = k && e.triggerPrefix ? /* @__PURE__ */ v("span", {
|
|
1604
1673
|
className: q.prefix,
|
|
1605
1674
|
children: [e.triggerPrefix, " "]
|
|
1606
|
-
}) : null, Ce = n ?? (Se ? c : k ? xe() :
|
|
1675
|
+
}) : null, Ce = n ?? (Se ? c : k ? xe() : le?.label), we = /* @__PURE__ */ v(g, { children: [H, Ce] }), Te = {
|
|
1607
1676
|
"aria-haspopup": "listbox",
|
|
1608
1677
|
"aria-expanded": A,
|
|
1609
|
-
"aria-controls": A ?
|
|
1678
|
+
"aria-controls": A ? ie : void 0,
|
|
1610
1679
|
"aria-label": i ? void 0 : D,
|
|
1611
1680
|
autoFocus: C,
|
|
1612
1681
|
disabled: h,
|
|
@@ -1614,26 +1683,26 @@ function Tt(e) {
|
|
|
1614
1683
|
onKeyDown: ge
|
|
1615
1684
|
};
|
|
1616
1685
|
return /* @__PURE__ */ v("div", {
|
|
1617
|
-
className: [
|
|
1618
|
-
ref:
|
|
1686
|
+
className: [fe ? q.field : q.fieldInline, T].filter(Boolean).join(" "),
|
|
1687
|
+
ref: z,
|
|
1619
1688
|
"data-testid": O,
|
|
1620
1689
|
children: [
|
|
1621
|
-
|
|
1622
|
-
htmlFor:
|
|
1690
|
+
fe && i && /* @__PURE__ */ _(U, {
|
|
1691
|
+
htmlFor: re,
|
|
1623
1692
|
className: E,
|
|
1624
1693
|
children: i
|
|
1625
1694
|
}),
|
|
1626
|
-
|
|
1627
|
-
ref:
|
|
1628
|
-
id:
|
|
1695
|
+
fe ? /* @__PURE__ */ v("button", {
|
|
1696
|
+
ref: B,
|
|
1697
|
+
id: re,
|
|
1629
1698
|
type: "button",
|
|
1630
1699
|
role: "combobox",
|
|
1631
1700
|
className: `${q.trigger} ${q[s]} ${o ? q.errorWrap : ""}`,
|
|
1632
1701
|
...Te,
|
|
1633
1702
|
children: [
|
|
1634
|
-
|
|
1703
|
+
le?.icon && /* @__PURE__ */ _("span", {
|
|
1635
1704
|
className: q.icon,
|
|
1636
|
-
children:
|
|
1705
|
+
children: le.icon
|
|
1637
1706
|
}),
|
|
1638
1707
|
/* @__PURE__ */ _("span", {
|
|
1639
1708
|
className: `${q.value} ${Se ? q.placeholder : ""}`,
|
|
@@ -1641,101 +1710,101 @@ function Tt(e) {
|
|
|
1641
1710
|
}),
|
|
1642
1711
|
/* @__PURE__ */ _("span", {
|
|
1643
1712
|
className: `${q.chevron} ${A ? q.chevronOpen : ""}`,
|
|
1644
|
-
children: /* @__PURE__ */ _(
|
|
1713
|
+
children: /* @__PURE__ */ _(ae, {})
|
|
1645
1714
|
})
|
|
1646
1715
|
]
|
|
1647
1716
|
}) : t === "pill" ? /* @__PURE__ */ v("button", {
|
|
1648
|
-
ref:
|
|
1649
|
-
id:
|
|
1717
|
+
ref: B,
|
|
1718
|
+
id: re,
|
|
1650
1719
|
type: "button",
|
|
1651
1720
|
className: q.pillTrigger,
|
|
1652
1721
|
...Te,
|
|
1653
1722
|
children: [
|
|
1654
|
-
|
|
1723
|
+
le?.icon && /* @__PURE__ */ _("span", {
|
|
1655
1724
|
className: q.pillIcon,
|
|
1656
|
-
children:
|
|
1725
|
+
children: le.icon
|
|
1657
1726
|
}),
|
|
1658
1727
|
we,
|
|
1659
1728
|
/* @__PURE__ */ _("span", {
|
|
1660
1729
|
className: `${q.pillChevron} ${A ? q.chevronOpen : ""}`,
|
|
1661
|
-
children: /* @__PURE__ */ _(
|
|
1730
|
+
children: /* @__PURE__ */ _(ae, {})
|
|
1662
1731
|
})
|
|
1663
1732
|
]
|
|
1664
1733
|
}) : /* @__PURE__ */ _(w, {
|
|
1665
|
-
ref:
|
|
1666
|
-
id:
|
|
1734
|
+
ref: B,
|
|
1735
|
+
id: re,
|
|
1667
1736
|
variant: t,
|
|
1668
1737
|
size: s,
|
|
1669
|
-
leadingIcon:
|
|
1738
|
+
leadingIcon: le?.icon,
|
|
1670
1739
|
trailingIcon: /* @__PURE__ */ _("span", {
|
|
1671
1740
|
className: `${q.buttonChevron} ${A ? q.chevronOpen : ""}`,
|
|
1672
|
-
children: /* @__PURE__ */ _(
|
|
1741
|
+
children: /* @__PURE__ */ _(ae, {})
|
|
1673
1742
|
}),
|
|
1674
1743
|
...Te,
|
|
1675
1744
|
children: we
|
|
1676
1745
|
}),
|
|
1677
1746
|
M && /* @__PURE__ */ _("div", {
|
|
1678
|
-
ref:
|
|
1747
|
+
ref: te,
|
|
1679
1748
|
className: [
|
|
1680
1749
|
q.menuWrap,
|
|
1681
|
-
!
|
|
1682
|
-
!
|
|
1683
|
-
!
|
|
1750
|
+
!fe && q.menuWrapAuto,
|
|
1751
|
+
!fe && k && q.menuWrapMultiple,
|
|
1752
|
+
!fe && r === "end" && q.menuWrapEnd,
|
|
1684
1753
|
ee && q.menuWrapUp,
|
|
1685
1754
|
!A && q.menuWrapClosing
|
|
1686
1755
|
].filter(Boolean).join(" "),
|
|
1687
1756
|
onAnimationEnd: (e) => {
|
|
1688
1757
|
A || e.target !== e.currentTarget || (N(!1), I(!1));
|
|
1689
1758
|
},
|
|
1690
|
-
children: /* @__PURE__ */ v(
|
|
1759
|
+
children: /* @__PURE__ */ v(St, {
|
|
1691
1760
|
role: "presentation",
|
|
1692
|
-
style:
|
|
1761
|
+
style: fe ? { width: "100%" } : void 0,
|
|
1693
1762
|
children: [y && /* @__PURE__ */ _("input", {
|
|
1694
|
-
ref:
|
|
1763
|
+
ref: ne,
|
|
1695
1764
|
type: "text",
|
|
1696
1765
|
className: q.search,
|
|
1697
1766
|
value: P,
|
|
1698
1767
|
placeholder: b,
|
|
1699
1768
|
"aria-label": b,
|
|
1700
|
-
"aria-controls":
|
|
1769
|
+
"aria-controls": ie,
|
|
1701
1770
|
autoComplete: "off",
|
|
1702
1771
|
spellCheck: !1,
|
|
1703
1772
|
onChange: (e) => {
|
|
1704
|
-
F(e.target.value),
|
|
1773
|
+
F(e.target.value), R(null);
|
|
1705
1774
|
},
|
|
1706
1775
|
onKeyDown: _e
|
|
1707
1776
|
}), /* @__PURE__ */ v("div", {
|
|
1708
|
-
id:
|
|
1777
|
+
id: ie,
|
|
1709
1778
|
role: "listbox",
|
|
1710
1779
|
"aria-multiselectable": k || void 0,
|
|
1711
1780
|
"aria-label": i ?? D,
|
|
1712
1781
|
className: q.list,
|
|
1713
|
-
onMouseLeave: () =>
|
|
1782
|
+
onMouseLeave: () => R(null),
|
|
1714
1783
|
onBlur: (e) => {
|
|
1715
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
1784
|
+
e.currentTarget.contains(e.relatedTarget) || R(null);
|
|
1716
1785
|
},
|
|
1717
|
-
children: [L &&
|
|
1786
|
+
children: [L && de.length > 0 && /* @__PURE__ */ _("span", {
|
|
1718
1787
|
"aria-hidden": "true",
|
|
1719
1788
|
className: `${q.highlight} ${L.instant ? q.highlightInstant : ""}`,
|
|
1720
1789
|
style: {
|
|
1721
1790
|
transform: `translateY(${L.top}px)`,
|
|
1722
1791
|
height: L.height
|
|
1723
1792
|
}
|
|
1724
|
-
}),
|
|
1793
|
+
}), de.length === 0 ? /* @__PURE__ */ _("div", {
|
|
1725
1794
|
className: q.noResults,
|
|
1726
1795
|
role: "presentation",
|
|
1727
1796
|
children: x
|
|
1728
|
-
}) :
|
|
1797
|
+
}) : de.map((e, t) => /* @__PURE__ */ _(Tt, {
|
|
1729
1798
|
style: { "--i": Math.min(t, 8) },
|
|
1730
1799
|
"data-value": e.value,
|
|
1731
1800
|
role: "option",
|
|
1732
|
-
"aria-selected": k ?
|
|
1801
|
+
"aria-selected": k ? se.includes(e.value) : e.value === oe,
|
|
1733
1802
|
icon: e.icon,
|
|
1734
|
-
leading: k ? /* @__PURE__ */ _(
|
|
1735
|
-
checked:
|
|
1803
|
+
leading: k ? /* @__PURE__ */ _(Re, {
|
|
1804
|
+
checked: se.includes(e.value),
|
|
1736
1805
|
disabled: e.disabled
|
|
1737
1806
|
}) : void 0,
|
|
1738
|
-
selected: !k && e.value ===
|
|
1807
|
+
selected: !k && e.value === oe,
|
|
1739
1808
|
disabled: e.disabled,
|
|
1740
1809
|
onClick: () => be(e.value),
|
|
1741
1810
|
onMouseEnter: (t) => !e.disabled && ye(t.currentTarget),
|
|
@@ -1746,10 +1815,10 @@ function Tt(e) {
|
|
|
1746
1815
|
})]
|
|
1747
1816
|
})
|
|
1748
1817
|
}),
|
|
1749
|
-
|
|
1818
|
+
fe && o ? /* @__PURE__ */ _("span", {
|
|
1750
1819
|
className: q.errorText,
|
|
1751
1820
|
children: o
|
|
1752
|
-
}) :
|
|
1821
|
+
}) : fe && a ? /* @__PURE__ */ _("span", {
|
|
1753
1822
|
className: q.helperText,
|
|
1754
1823
|
children: a
|
|
1755
1824
|
}) : null
|
|
@@ -1767,9 +1836,9 @@ var J = {
|
|
|
1767
1836
|
glide: "_glide_stzme_115",
|
|
1768
1837
|
glideAnimated: "_glideAnimated_stzme_128",
|
|
1769
1838
|
glideVisible: "_glideVisible_stzme_134"
|
|
1770
|
-
},
|
|
1771
|
-
function
|
|
1772
|
-
let l = c(
|
|
1839
|
+
}, At = "data-nav-item", jt = r(!1);
|
|
1840
|
+
function Mt({ icon: e, trailing: t, active: n, as: r, href: i, className: a, children: o, ...s }) {
|
|
1841
|
+
let l = c(jt), u = r ?? (i === void 0 ? "button" : "a"), d = u === "button", f = [
|
|
1773
1842
|
J.item,
|
|
1774
1843
|
n && J.active,
|
|
1775
1844
|
l && J.inList,
|
|
@@ -1778,7 +1847,7 @@ function Ot({ icon: e, trailing: t, active: n, as: r, href: i, className: a, chi
|
|
|
1778
1847
|
return /* @__PURE__ */ v(u, {
|
|
1779
1848
|
...d ? { type: "button" } : {},
|
|
1780
1849
|
...i === void 0 ? {} : { href: i },
|
|
1781
|
-
[
|
|
1850
|
+
[At]: "",
|
|
1782
1851
|
"aria-current": n ? "page" : void 0,
|
|
1783
1852
|
className: f,
|
|
1784
1853
|
...s,
|
|
@@ -1799,9 +1868,9 @@ function Ot({ icon: e, trailing: t, active: n, as: r, href: i, className: a, chi
|
|
|
1799
1868
|
]
|
|
1800
1869
|
});
|
|
1801
1870
|
}
|
|
1802
|
-
function
|
|
1871
|
+
function Nt({ children: e, className: t, ...n }) {
|
|
1803
1872
|
let r = p(null), [i, a] = m(null), [o, c] = m(!1), [l, u] = m(!1), f = s((e) => {
|
|
1804
|
-
let t = r.current, n = e instanceof Element ? e.closest(`[${
|
|
1873
|
+
let t = r.current, n = e instanceof Element ? e.closest(`[${At}]`) : null;
|
|
1805
1874
|
if (!t || !n || !t.contains(n)) return;
|
|
1806
1875
|
if (n.matches(":disabled, [aria-disabled=\"true\"], [hidden]")) {
|
|
1807
1876
|
c(!1);
|
|
@@ -1815,7 +1884,7 @@ function kt({ children: e, className: t, ...n }) {
|
|
|
1815
1884
|
}, [o]);
|
|
1816
1885
|
return d(() => {
|
|
1817
1886
|
o || u(!1);
|
|
1818
|
-
}, [o]), /* @__PURE__ */ _(
|
|
1887
|
+
}, [o]), /* @__PURE__ */ _(jt.Provider, {
|
|
1819
1888
|
value: !0,
|
|
1820
1889
|
children: /* @__PURE__ */ v("div", {
|
|
1821
1890
|
ref: r,
|
|
@@ -1842,7 +1911,7 @@ function kt({ children: e, className: t, ...n }) {
|
|
|
1842
1911
|
}
|
|
1843
1912
|
//#endregion
|
|
1844
1913
|
//#region src/components/Logo.tsx
|
|
1845
|
-
function
|
|
1914
|
+
function Pt({ size: e = 40, "aria-label": t, ...n }) {
|
|
1846
1915
|
return /* @__PURE__ */ v("svg", {
|
|
1847
1916
|
width: e,
|
|
1848
1917
|
height: e,
|
|
@@ -1884,7 +1953,7 @@ var Y = {
|
|
|
1884
1953
|
};
|
|
1885
1954
|
//#endregion
|
|
1886
1955
|
//#region src/components/Sidebar.tsx
|
|
1887
|
-
function
|
|
1956
|
+
function Ft({ header: e, switcher: t, children: n, footer: r, switcherLayout: i = "inset", "aria-label": a, className: o }) {
|
|
1888
1957
|
return /* @__PURE__ */ v("aside", {
|
|
1889
1958
|
className: [Y.root, o].filter(Boolean).join(" "),
|
|
1890
1959
|
children: [
|
|
@@ -1910,7 +1979,7 @@ function jt({ header: e, switcher: t, children: n, footer: r, switcherLayout: i
|
|
|
1910
1979
|
]
|
|
1911
1980
|
});
|
|
1912
1981
|
}
|
|
1913
|
-
function
|
|
1982
|
+
function It({ title: e, subtitle: t, action: n }) {
|
|
1914
1983
|
return /* @__PURE__ */ v("div", {
|
|
1915
1984
|
className: Y.footerRow,
|
|
1916
1985
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -1928,7 +1997,7 @@ function Mt({ title: e, subtitle: t, action: n }) {
|
|
|
1928
1997
|
})]
|
|
1929
1998
|
});
|
|
1930
1999
|
}
|
|
1931
|
-
function
|
|
2000
|
+
function Lt({ items: e, value: t, onChange: n, "aria-label": r }) {
|
|
1932
2001
|
return /* @__PURE__ */ _("div", {
|
|
1933
2002
|
role: "group",
|
|
1934
2003
|
"aria-label": r,
|
|
@@ -1954,21 +2023,21 @@ function Nt({ items: e, value: t, onChange: n, "aria-label": r }) {
|
|
|
1954
2023
|
}, e.value))
|
|
1955
2024
|
});
|
|
1956
2025
|
}
|
|
1957
|
-
var
|
|
2026
|
+
var Rt = { highlight: "_highlight_1anli_1" };
|
|
1958
2027
|
//#endregion
|
|
1959
2028
|
//#region src/components/HighlightText.tsx
|
|
1960
|
-
function
|
|
2029
|
+
function zt(e) {
|
|
1961
2030
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1962
2031
|
}
|
|
1963
|
-
function
|
|
2032
|
+
function Bt({ text: e, query: n }) {
|
|
1964
2033
|
if (!n) return /* @__PURE__ */ _(g, { children: e });
|
|
1965
|
-
let r = e.split(RegExp(`(${
|
|
2034
|
+
let r = e.split(RegExp(`(${zt(n)})`, "ig"));
|
|
1966
2035
|
return /* @__PURE__ */ _(g, { children: r.map((e, r) => e.toLowerCase() === n.toLowerCase() ? /* @__PURE__ */ _("mark", {
|
|
1967
|
-
className:
|
|
2036
|
+
className: Rt.highlight,
|
|
1968
2037
|
children: e
|
|
1969
2038
|
}, r) : /* @__PURE__ */ _(t, { children: e }, r)) });
|
|
1970
2039
|
}
|
|
1971
|
-
var
|
|
2040
|
+
var Vt = {
|
|
1972
2041
|
group: "_group_1rvgf_1",
|
|
1973
2042
|
btn: "_btn_1rvgf_4",
|
|
1974
2043
|
caret: "_caret_1rvgf_29",
|
|
@@ -1990,24 +2059,24 @@ var Lt = {
|
|
|
1990
2059
|
};
|
|
1991
2060
|
//#endregion
|
|
1992
2061
|
//#region src/components/FilterSection.tsx
|
|
1993
|
-
function
|
|
2062
|
+
function Ht({ label: e, options: t, optionLabel: n, activeSet: r, onToggle: i, onSetAll: a, searchable: o }) {
|
|
1994
2063
|
let [s, c] = m(""), l = s.trim().toLowerCase(), u = l ? t.filter((e) => n(e).toLowerCase().includes(l)) : t, d = t.length > 0 && r.size === t.length;
|
|
1995
2064
|
return /* @__PURE__ */ v("div", { children: [
|
|
1996
2065
|
/* @__PURE__ */ v("div", {
|
|
1997
|
-
className:
|
|
2066
|
+
className: Vt.sectionHeader,
|
|
1998
2067
|
children: [/* @__PURE__ */ _("div", {
|
|
1999
|
-
className:
|
|
2068
|
+
className: Vt.sectionLabel,
|
|
2000
2069
|
children: e
|
|
2001
2070
|
}), a && /* @__PURE__ */ _("button", {
|
|
2002
2071
|
type: "button",
|
|
2003
|
-
className:
|
|
2072
|
+
className: Vt.allToggle,
|
|
2004
2073
|
onClick: () => a(d ? [] : t),
|
|
2005
2074
|
children: d ? "Deselect all" : "Select all"
|
|
2006
2075
|
})]
|
|
2007
2076
|
}),
|
|
2008
2077
|
o && /* @__PURE__ */ _("input", {
|
|
2009
2078
|
type: "text",
|
|
2010
|
-
className:
|
|
2079
|
+
className: Vt.search,
|
|
2011
2080
|
placeholder: `Search ${e.toLowerCase()}…`,
|
|
2012
2081
|
autoComplete: "off",
|
|
2013
2082
|
value: s,
|
|
@@ -2015,12 +2084,12 @@ function Rt({ label: e, options: t, optionLabel: n, activeSet: r, onToggle: i, o
|
|
|
2015
2084
|
onChange: (e) => c(e.target.value)
|
|
2016
2085
|
}),
|
|
2017
2086
|
/* @__PURE__ */ v("div", {
|
|
2018
|
-
className:
|
|
2087
|
+
className: Vt.optionsList,
|
|
2019
2088
|
children: [u.length === 0 && /* @__PURE__ */ _("div", {
|
|
2020
|
-
className:
|
|
2089
|
+
className: Vt.empty,
|
|
2021
2090
|
children: "No match"
|
|
2022
|
-
}), u.map((e) => /* @__PURE__ */ _(
|
|
2023
|
-
className:
|
|
2091
|
+
}), u.map((e) => /* @__PURE__ */ _(Le, {
|
|
2092
|
+
className: Vt.option,
|
|
2024
2093
|
checked: r.has(e),
|
|
2025
2094
|
onChange: () => i(e),
|
|
2026
2095
|
label: n(e)
|
|
@@ -2044,7 +2113,7 @@ var X = {
|
|
|
2044
2113
|
};
|
|
2045
2114
|
//#endregion
|
|
2046
2115
|
//#region src/components/Tabs.tsx
|
|
2047
|
-
function
|
|
2116
|
+
function Ut({ items: e, value: t, onChange: n, variant: r = "line", size: i = "base", ...a }) {
|
|
2048
2117
|
let o = e.filter((e) => !e.disabled).map((e) => e.value), s = p(null), c = p(/* @__PURE__ */ new Map()), l = p(t), [u, f] = m(null), [h, g] = m("idle");
|
|
2049
2118
|
d(() => {
|
|
2050
2119
|
let e = c.current.get(t);
|
|
@@ -2128,21 +2197,21 @@ function zt({ items: e, value: t, onChange: n, variant: r = "line", size: i = "b
|
|
|
2128
2197
|
})]
|
|
2129
2198
|
});
|
|
2130
2199
|
}
|
|
2131
|
-
var
|
|
2200
|
+
var Wt = {
|
|
2132
2201
|
root: "_root_1605f_1",
|
|
2133
2202
|
label: "_label_1605f_7"
|
|
2134
2203
|
};
|
|
2135
2204
|
//#endregion
|
|
2136
2205
|
//#region src/components/Toggle.tsx
|
|
2137
|
-
function
|
|
2206
|
+
function Gt({ items: e, value: t, onChange: n, label: r, "aria-label": i }) {
|
|
2138
2207
|
let a = u();
|
|
2139
2208
|
return /* @__PURE__ */ v("div", {
|
|
2140
|
-
className:
|
|
2209
|
+
className: Wt.root,
|
|
2141
2210
|
children: [r && /* @__PURE__ */ _("span", {
|
|
2142
2211
|
id: a,
|
|
2143
|
-
className:
|
|
2212
|
+
className: Wt.label,
|
|
2144
2213
|
children: r
|
|
2145
|
-
}), /* @__PURE__ */ _(
|
|
2214
|
+
}), /* @__PURE__ */ _(Ut, {
|
|
2146
2215
|
items: e,
|
|
2147
2216
|
value: t,
|
|
2148
2217
|
onChange: n,
|
|
@@ -2153,7 +2222,7 @@ function Vt({ items: e, value: t, onChange: n, label: r, "aria-label": i }) {
|
|
|
2153
2222
|
})]
|
|
2154
2223
|
});
|
|
2155
2224
|
}
|
|
2156
|
-
var
|
|
2225
|
+
var Kt = {
|
|
2157
2226
|
spinner: "_spinner_9jjxr_3",
|
|
2158
2227
|
inner: "_inner_9jjxr_11",
|
|
2159
2228
|
outer: "_outer_9jjxr_12",
|
|
@@ -2164,10 +2233,10 @@ var Ht = {
|
|
|
2164
2233
|
};
|
|
2165
2234
|
//#endregion
|
|
2166
2235
|
//#region src/components/Spinner.tsx
|
|
2167
|
-
function
|
|
2236
|
+
function qt({ variant: e = "default", size: t = 64, label: n = "Loading", className: r, "data-testid": i }) {
|
|
2168
2237
|
let a = [
|
|
2169
|
-
|
|
2170
|
-
|
|
2238
|
+
Kt.spinner,
|
|
2239
|
+
Kt[e],
|
|
2171
2240
|
r
|
|
2172
2241
|
].filter(Boolean).join(" ");
|
|
2173
2242
|
return /* @__PURE__ */ v("div", {
|
|
@@ -2180,7 +2249,7 @@ function Ut({ variant: e = "default", size: t = 64, label: n = "Loading", classN
|
|
|
2180
2249
|
},
|
|
2181
2250
|
"data-testid": i,
|
|
2182
2251
|
children: [/* @__PURE__ */ _("svg", {
|
|
2183
|
-
className:
|
|
2252
|
+
className: Kt.inner,
|
|
2184
2253
|
width: t,
|
|
2185
2254
|
height: t,
|
|
2186
2255
|
viewBox: "0 0 64 64",
|
|
@@ -2188,7 +2257,7 @@ function Ut({ variant: e = "default", size: t = 64, label: n = "Loading", classN
|
|
|
2188
2257
|
"aria-hidden": "true",
|
|
2189
2258
|
children: /* @__PURE__ */ _("path", { d: "M45.4273 17.5099C45.5053 17.5796 45.5088 17.6535 45.4377 17.7316L38.8829 24.8071C38.8634 24.828 38.8365 24.8404 38.8079 24.8416C38.7793 24.8428 38.7514 24.8326 38.7303 24.8134C36.6569 22.9045 34.221 22.0275 31.4225 22.1823C29.9153 22.2659 28.5572 22.6333 27.3483 23.2845C25.0295 24.5352 23.4428 26.4155 22.588 28.9253C20.717 34.4308 24.3708 40.1612 29.8184 41.6584C30.8097 41.9302 31.99 41.9735 33.3593 41.788C35.158 41.5433 36.8709 40.5854 38.3412 39.5627C38.4022 39.5203 38.4764 39.5014 38.5502 39.5094C38.6241 39.5175 38.6925 39.552 38.7428 39.6066L45.1742 46.6069C45.1803 46.6137 45.185 46.6217 45.188 46.6303C45.191 46.639 45.1923 46.6482 45.1917 46.6573C45.1911 46.6665 45.1887 46.6754 45.1846 46.6836C45.1805 46.6918 45.1748 46.6992 45.1679 46.7052C44.4401 47.3033 43.6502 47.8855 42.7982 48.4516C39.8799 50.3897 36.6339 51.4633 33.0602 51.6725C29.3847 51.8872 25.9031 51.1106 22.6152 49.3425C19.7917 47.8227 17.4903 45.764 15.7112 43.1663C14.4132 41.2707 13.4349 39.3097 12.8667 37.0717C11.973 33.5775 11.9925 30.1014 12.9253 26.6435C13.1679 25.7483 13.5465 24.8469 13.8414 23.9412C14.6703 21.4035 16.9915 18.887 18.9133 17.1899C26.3467 10.6186 38.1184 10.8908 45.4273 17.5099Z" })
|
|
2190
2259
|
}), /* @__PURE__ */ _("svg", {
|
|
2191
|
-
className:
|
|
2260
|
+
className: Kt.outer,
|
|
2192
2261
|
width: t,
|
|
2193
2262
|
height: t,
|
|
2194
2263
|
viewBox: "0 0 64 64",
|
|
@@ -2220,14 +2289,14 @@ var Z = {
|
|
|
2220
2289
|
sheet: "_sheet_g9q2m_206",
|
|
2221
2290
|
fullscreen: "_fullscreen_g9q2m_212",
|
|
2222
2291
|
instant: "_instant_g9q2m_222"
|
|
2223
|
-
},
|
|
2224
|
-
function
|
|
2225
|
-
let t = c(
|
|
2292
|
+
}, Jt = 200, Yt = "(max-width: 639px)", Xt = "(prefers-reduced-motion: reduce)", Zt = "a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Qt = r(null);
|
|
2293
|
+
function $t(e) {
|
|
2294
|
+
let t = c(Qt);
|
|
2226
2295
|
if (!t) throw Error(`${e} must be rendered inside <Modal>`);
|
|
2227
2296
|
return t;
|
|
2228
2297
|
}
|
|
2229
|
-
var
|
|
2230
|
-
function
|
|
2298
|
+
var en = [];
|
|
2299
|
+
function tn(e) {
|
|
2231
2300
|
let [t, n] = m(() => typeof window < "u" && window.matchMedia(e).matches);
|
|
2232
2301
|
return l(() => {
|
|
2233
2302
|
let t = window.matchMedia(e), r = () => n(t.matches);
|
|
@@ -2235,11 +2304,11 @@ function Zt(e) {
|
|
|
2235
2304
|
}, [e]), t;
|
|
2236
2305
|
}
|
|
2237
2306
|
function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", onSubmit: i, dismissible: a = !0, instantInitialOpen: o = !1, portalSelector: c = "#container", isTop: d = !0, role: f = "dialog", "aria-labelledby": g, "data-testid": v, className: y, children: b }) {
|
|
2238
|
-
let x = u(), S = `${x}-title`, C = `${x}-description`, [w, T] = m(!1), [E, D] = m(e), [O, k] = m(e && o), [A, j] = m(!1), M =
|
|
2239
|
-
|
|
2307
|
+
let x = u(), S = `${x}-title`, C = `${x}-description`, [w, T] = m(!1), [E, D] = m(e), [O, k] = m(e && o), [A, j] = m(!1), M = tn(Yt), N = tn(Xt), P = p(null), F = p(null), ee = p(!1), I = p(!1), L = p(Symbol("modal")), R = p(e), z = p(t);
|
|
2308
|
+
z.current = t, l(() => T(!0), []), l(() => {
|
|
2240
2309
|
if (e) {
|
|
2241
2310
|
if (ee.current) return;
|
|
2242
|
-
if (F.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, D(!0),
|
|
2311
|
+
if (F.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, D(!0), R.current && o) {
|
|
2243
2312
|
k(!0);
|
|
2244
2313
|
return;
|
|
2245
2314
|
}
|
|
@@ -2247,39 +2316,39 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2247
2316
|
return () => cancelAnimationFrame(e);
|
|
2248
2317
|
}
|
|
2249
2318
|
if (ee.current = !1, k(!1), !E) return;
|
|
2250
|
-
let t = setTimeout(() => D(!1), N ? 0 :
|
|
2319
|
+
let t = setTimeout(() => D(!1), N ? 0 : Jt);
|
|
2251
2320
|
return () => clearTimeout(t);
|
|
2252
2321
|
}, [e]), l(() => {
|
|
2253
2322
|
!E && F.current && (F.current.focus?.(), F.current = null);
|
|
2254
2323
|
}, [E]);
|
|
2255
|
-
let
|
|
2324
|
+
let B = s(() => {
|
|
2256
2325
|
if (!a || ee.current) return;
|
|
2257
2326
|
ee.current = !0, k(!1);
|
|
2258
|
-
let e = N ? 0 :
|
|
2259
|
-
window.setTimeout(() =>
|
|
2327
|
+
let e = N ? 0 : Jt;
|
|
2328
|
+
window.setTimeout(() => z.current(), e);
|
|
2260
2329
|
}, [a, N]);
|
|
2261
2330
|
l(() => {
|
|
2262
2331
|
if (!E) return;
|
|
2263
2332
|
let e = L.current;
|
|
2264
|
-
d &&
|
|
2333
|
+
d && en.push(e);
|
|
2265
2334
|
let t = (t) => {
|
|
2266
|
-
t.key === "Escape" &&
|
|
2335
|
+
t.key === "Escape" && en[en.length - 1] === e && (t.preventDefault(), B());
|
|
2267
2336
|
};
|
|
2268
2337
|
document.addEventListener("keydown", t);
|
|
2269
2338
|
let { body: n } = document, r = n.style.overflow, i = n.style.paddingRight, a = window.innerWidth - document.documentElement.clientWidth;
|
|
2270
2339
|
return n.style.overflow = "hidden", a > 0 && (n.style.paddingRight = `${a}px`), P.current?.focus({ preventScroll: !0 }), () => {
|
|
2271
2340
|
document.removeEventListener("keydown", t);
|
|
2272
|
-
let a =
|
|
2273
|
-
a !== -1 &&
|
|
2341
|
+
let a = en.indexOf(e);
|
|
2342
|
+
a !== -1 && en.splice(a, 1), n.style.overflow = r, n.style.paddingRight = i;
|
|
2274
2343
|
};
|
|
2275
2344
|
}, [
|
|
2276
2345
|
E,
|
|
2277
2346
|
d,
|
|
2278
|
-
|
|
2347
|
+
B
|
|
2279
2348
|
]);
|
|
2280
|
-
let
|
|
2349
|
+
let te = (e) => {
|
|
2281
2350
|
if (e.key !== "Tab" || !P.current) return;
|
|
2282
|
-
let t = Array.from(P.current.querySelectorAll(
|
|
2351
|
+
let t = Array.from(P.current.querySelectorAll(Zt));
|
|
2283
2352
|
if (t.length === 0) {
|
|
2284
2353
|
e.preventDefault();
|
|
2285
2354
|
return;
|
|
@@ -2288,56 +2357,56 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2288
2357
|
e.shiftKey && (i === n || i === P.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
2289
2358
|
};
|
|
2290
2359
|
if (!w || !E) return null;
|
|
2291
|
-
let
|
|
2360
|
+
let ne = document.querySelector(c) ?? document.body, re = [
|
|
2292
2361
|
Z.modal,
|
|
2293
2362
|
Z[n],
|
|
2294
2363
|
Z[r],
|
|
2295
2364
|
O && Z.visible,
|
|
2296
2365
|
o && Z.instant,
|
|
2297
2366
|
y
|
|
2298
|
-
].filter(Boolean).join(" "),
|
|
2367
|
+
].filter(Boolean).join(" "), ie = {
|
|
2299
2368
|
role: f,
|
|
2300
2369
|
"aria-modal": !0,
|
|
2301
2370
|
"aria-labelledby": g ?? S,
|
|
2302
2371
|
"aria-describedby": A ? C : void 0,
|
|
2303
2372
|
tabIndex: -1,
|
|
2304
|
-
className:
|
|
2373
|
+
className: re,
|
|
2305
2374
|
"data-testid": v,
|
|
2306
|
-
onKeyDown:
|
|
2307
|
-
},
|
|
2375
|
+
onKeyDown: te
|
|
2376
|
+
}, ae = {
|
|
2308
2377
|
layout: n,
|
|
2309
2378
|
titleId: g ?? S,
|
|
2310
2379
|
descriptionId: C,
|
|
2311
2380
|
isMobile: M,
|
|
2312
2381
|
dismissible: a,
|
|
2313
2382
|
setHasDescription: j,
|
|
2314
|
-
requestClose:
|
|
2383
|
+
requestClose: B
|
|
2315
2384
|
};
|
|
2316
|
-
return h(/* @__PURE__ */ _(
|
|
2317
|
-
value:
|
|
2385
|
+
return h(/* @__PURE__ */ _(Qt.Provider, {
|
|
2386
|
+
value: ae,
|
|
2318
2387
|
children: /* @__PURE__ */ _("div", {
|
|
2319
2388
|
className: `${Z.backdrop} ${O ? Z.visible : ""} ${o ? Z.instant : ""}`.trim(),
|
|
2320
2389
|
onPointerDown: (e) => {
|
|
2321
2390
|
I.current = e.target !== e.currentTarget;
|
|
2322
2391
|
},
|
|
2323
2392
|
onClick: (e) => {
|
|
2324
|
-
e.target === e.currentTarget && !I.current &&
|
|
2393
|
+
e.target === e.currentTarget && !I.current && B(), I.current = !1;
|
|
2325
2394
|
},
|
|
2326
2395
|
children: i ? /* @__PURE__ */ _("form", {
|
|
2327
2396
|
ref: P,
|
|
2328
2397
|
onSubmit: i,
|
|
2329
|
-
...
|
|
2398
|
+
...ie,
|
|
2330
2399
|
children: b
|
|
2331
2400
|
}) : /* @__PURE__ */ _("div", {
|
|
2332
2401
|
ref: P,
|
|
2333
|
-
...
|
|
2402
|
+
...ie,
|
|
2334
2403
|
children: b
|
|
2335
2404
|
})
|
|
2336
2405
|
})
|
|
2337
|
-
}),
|
|
2406
|
+
}), ne);
|
|
2338
2407
|
}
|
|
2339
|
-
function
|
|
2340
|
-
let { requestClose: n, dismissible: r } =
|
|
2408
|
+
function nn({ children: e, onClose: t }) {
|
|
2409
|
+
let { requestClose: n, dismissible: r } = $t("Modal.Cover");
|
|
2341
2410
|
return /* @__PURE__ */ v("div", {
|
|
2342
2411
|
className: Z.cover,
|
|
2343
2412
|
children: [e, t && /* @__PURE__ */ _(w, {
|
|
@@ -2353,7 +2422,7 @@ function Qt({ children: e, onClose: t }) {
|
|
|
2353
2422
|
})]
|
|
2354
2423
|
});
|
|
2355
2424
|
}
|
|
2356
|
-
function
|
|
2425
|
+
function rn({ children: t }) {
|
|
2357
2426
|
let n = e.toArray(t), r = n.filter((e) => o(e) && e.type.isModalIcon === !0), i = n.filter((e) => !r.includes(e));
|
|
2358
2427
|
return /* @__PURE__ */ v("div", {
|
|
2359
2428
|
className: Z.message,
|
|
@@ -2363,52 +2432,52 @@ function $t({ children: t }) {
|
|
|
2363
2432
|
})]
|
|
2364
2433
|
});
|
|
2365
2434
|
}
|
|
2366
|
-
function
|
|
2435
|
+
function an({ children: e, tone: t = "neutral" }) {
|
|
2367
2436
|
return /* @__PURE__ */ _("div", {
|
|
2368
2437
|
className: `${Z.icon} ${Z[`tone-${t}`]}`,
|
|
2369
2438
|
"aria-hidden": "true",
|
|
2370
2439
|
children: e
|
|
2371
2440
|
});
|
|
2372
2441
|
}
|
|
2373
|
-
function
|
|
2374
|
-
let { titleId: n } =
|
|
2442
|
+
function on({ children: e, id: t }) {
|
|
2443
|
+
let { titleId: n } = $t("Modal.Title");
|
|
2375
2444
|
return /* @__PURE__ */ _("h2", {
|
|
2376
2445
|
id: t ?? n,
|
|
2377
2446
|
className: Z.title,
|
|
2378
2447
|
children: e
|
|
2379
2448
|
});
|
|
2380
2449
|
}
|
|
2381
|
-
function
|
|
2382
|
-
let { descriptionId: t, setHasDescription: n } =
|
|
2450
|
+
function sn({ children: e }) {
|
|
2451
|
+
let { descriptionId: t, setHasDescription: n } = $t("Modal.Description");
|
|
2383
2452
|
return l(() => (n(!0), () => n(!1)), [n]), /* @__PURE__ */ _("p", {
|
|
2384
2453
|
id: t,
|
|
2385
2454
|
className: Z.description,
|
|
2386
2455
|
children: e
|
|
2387
2456
|
});
|
|
2388
2457
|
}
|
|
2389
|
-
function
|
|
2458
|
+
function cn({ children: e }) {
|
|
2390
2459
|
return /* @__PURE__ */ _("p", {
|
|
2391
2460
|
className: Z.hint,
|
|
2392
2461
|
children: e
|
|
2393
2462
|
});
|
|
2394
2463
|
}
|
|
2395
|
-
function
|
|
2464
|
+
function ln({ children: e }) {
|
|
2396
2465
|
return /* @__PURE__ */ _("div", {
|
|
2397
2466
|
className: Z.body,
|
|
2398
2467
|
children: e
|
|
2399
2468
|
});
|
|
2400
2469
|
}
|
|
2401
|
-
function
|
|
2402
|
-
let { isMobile: r } =
|
|
2470
|
+
function un({ children: t }) {
|
|
2471
|
+
let { isMobile: r } = $t("Modal.Footer"), i = r ? e.map(t, (e) => o(e) && e.type === w ? n(e, { size: "base" }) : e) : t;
|
|
2403
2472
|
return /* @__PURE__ */ _("div", {
|
|
2404
2473
|
className: Z.footer,
|
|
2405
2474
|
children: i
|
|
2406
2475
|
});
|
|
2407
2476
|
}
|
|
2408
|
-
Q.Cover =
|
|
2477
|
+
Q.Cover = nn, Q.Message = rn, an.isModalIcon = !0, Q.Icon = an, Q.Title = on, Q.Description = sn, Q.Hint = cn, Q.Body = ln, Q.Footer = un;
|
|
2409
2478
|
//#endregion
|
|
2410
2479
|
//#region src/components/ConfirmDialog.tsx
|
|
2411
|
-
function
|
|
2480
|
+
function dn({ open: e, onClose: t, onConfirm: n, title: r, description: i, icon: a, confirmLabel: o, cancelLabel: s = "Cancel", tone: c = "default", loading: l = !1, "data-testid": u }) {
|
|
2412
2481
|
let d = c === "dangerous";
|
|
2413
2482
|
return /* @__PURE__ */ v(Q, {
|
|
2414
2483
|
open: e,
|
|
@@ -2437,7 +2506,7 @@ function sn({ open: e, onClose: t, onConfirm: n, title: r, description: i, icon:
|
|
|
2437
2506
|
})] })]
|
|
2438
2507
|
});
|
|
2439
2508
|
}
|
|
2440
|
-
var
|
|
2509
|
+
var fn = {
|
|
2441
2510
|
skeleton: "_skeleton_3os3v_2",
|
|
2442
2511
|
rect: "_rect_3os3v_7",
|
|
2443
2512
|
text: "_text_3os3v_13",
|
|
@@ -2447,11 +2516,11 @@ var cn = {
|
|
|
2447
2516
|
};
|
|
2448
2517
|
//#endregion
|
|
2449
2518
|
//#region src/components/Skeleton.tsx
|
|
2450
|
-
function
|
|
2519
|
+
function pn({ variant: e = "rect", width: t, height: n, size: r, animated: i = !0, className: a, "data-testid": o }) {
|
|
2451
2520
|
let s = [
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
i &&
|
|
2521
|
+
fn.skeleton,
|
|
2522
|
+
fn[e],
|
|
2523
|
+
i && fn.animated,
|
|
2455
2524
|
a
|
|
2456
2525
|
].filter(Boolean).join(" "), c = {};
|
|
2457
2526
|
return e === "circle" && r !== void 0 && (c.width = r, c.height = r), t !== void 0 && (c.width = t), n !== void 0 && (c.height = n), /* @__PURE__ */ _("div", {
|
|
@@ -2461,7 +2530,7 @@ function ln({ variant: e = "rect", width: t, height: n, size: r, animated: i = !
|
|
|
2461
2530
|
"data-testid": o
|
|
2462
2531
|
});
|
|
2463
2532
|
}
|
|
2464
|
-
var
|
|
2533
|
+
var mn = {
|
|
2465
2534
|
root: "_root_1h55m_1",
|
|
2466
2535
|
success: "_success_1h55m_11",
|
|
2467
2536
|
warning: "_warning_1h55m_17",
|
|
@@ -2474,45 +2543,45 @@ var un = {
|
|
|
2474
2543
|
};
|
|
2475
2544
|
//#endregion
|
|
2476
2545
|
//#region src/components/EmptyState.tsx
|
|
2477
|
-
function
|
|
2546
|
+
function hn({ tone: e = "neutral", icon: t, title: n, children: r, action: i, ...a }) {
|
|
2478
2547
|
return /* @__PURE__ */ v("div", {
|
|
2479
|
-
className: `${
|
|
2548
|
+
className: `${mn.root} ${e === "neutral" ? "" : mn[e]}`,
|
|
2480
2549
|
...a,
|
|
2481
2550
|
children: [t != null && /* @__PURE__ */ _("div", {
|
|
2482
|
-
className:
|
|
2551
|
+
className: mn.icon,
|
|
2483
2552
|
"aria-hidden": "true",
|
|
2484
2553
|
children: t
|
|
2485
2554
|
}), /* @__PURE__ */ v("div", {
|
|
2486
|
-
className:
|
|
2555
|
+
className: mn.body,
|
|
2487
2556
|
children: [
|
|
2488
2557
|
/* @__PURE__ */ _("p", {
|
|
2489
|
-
className:
|
|
2558
|
+
className: mn.title,
|
|
2490
2559
|
children: n
|
|
2491
2560
|
}),
|
|
2492
2561
|
r != null && /* @__PURE__ */ _("div", {
|
|
2493
|
-
className:
|
|
2562
|
+
className: mn.text,
|
|
2494
2563
|
children: r
|
|
2495
2564
|
}),
|
|
2496
2565
|
i != null && /* @__PURE__ */ _("div", {
|
|
2497
|
-
className:
|
|
2566
|
+
className: mn.action,
|
|
2498
2567
|
children: i
|
|
2499
2568
|
})
|
|
2500
2569
|
]
|
|
2501
2570
|
})]
|
|
2502
2571
|
});
|
|
2503
2572
|
}
|
|
2504
|
-
var
|
|
2505
|
-
function
|
|
2573
|
+
var gn = { photoPreview: "_photoPreview_zsbn2_2" }, _n = 120, vn = 12, yn = 8;
|
|
2574
|
+
function bn(e, t, n = _n) {
|
|
2506
2575
|
let r = (e, t) => {
|
|
2507
|
-
let r = e +
|
|
2508
|
-
return Math.max(
|
|
2576
|
+
let r = e + vn, i = r + n + yn > t ? e - vn - n : r;
|
|
2577
|
+
return Math.max(yn, i);
|
|
2509
2578
|
};
|
|
2510
2579
|
return {
|
|
2511
2580
|
left: r(e, window.innerWidth),
|
|
2512
2581
|
top: r(t, window.innerHeight)
|
|
2513
2582
|
};
|
|
2514
2583
|
}
|
|
2515
|
-
function
|
|
2584
|
+
function xn({ src: e, size: t = _n, children: r }) {
|
|
2516
2585
|
let [i, a] = m(null), [o, s] = m(), c = i !== null;
|
|
2517
2586
|
if (l(() => {
|
|
2518
2587
|
if (!c) return;
|
|
@@ -2538,14 +2607,14 @@ function _n({ src: e, size: t = pn, children: r }) {
|
|
|
2538
2607
|
}
|
|
2539
2608
|
});
|
|
2540
2609
|
return /* @__PURE__ */ v(g, { children: [f, i && h(/* @__PURE__ */ _("img", {
|
|
2541
|
-
className:
|
|
2610
|
+
className: gn.photoPreview,
|
|
2542
2611
|
src: e,
|
|
2543
2612
|
alt: "",
|
|
2544
2613
|
"aria-hidden": "true",
|
|
2545
2614
|
style: {
|
|
2546
2615
|
width: t,
|
|
2547
2616
|
height: t,
|
|
2548
|
-
...
|
|
2617
|
+
...bn(i.x, i.y, t)
|
|
2549
2618
|
},
|
|
2550
2619
|
onError: () => {
|
|
2551
2620
|
s(e), a(null);
|
|
@@ -2582,7 +2651,7 @@ var $ = {
|
|
|
2582
2651
|
pending: "_pending_kvx36_211",
|
|
2583
2652
|
actions: "_actions_kvx36_217",
|
|
2584
2653
|
srOnly: "_srOnly_kvx36_228"
|
|
2585
|
-
},
|
|
2654
|
+
}, Sn = {
|
|
2586
2655
|
worker: "Worker:",
|
|
2587
2656
|
comment: "Comment:",
|
|
2588
2657
|
pending: "Card still in progress",
|
|
@@ -2590,9 +2659,9 @@ var $ = {
|
|
|
2590
2659
|
archived: "Archived",
|
|
2591
2660
|
new: "New"
|
|
2592
2661
|
};
|
|
2593
|
-
function
|
|
2662
|
+
function Cn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n, previewAlt: r, dateTime: i, title: a, description: o, meta: s, worker: c, comment: l, viewed: u = !1, current: d, onClick: f, hoverable: p, actions: h, labels: y, "aria-label": b, className: x, "data-testid": S }) {
|
|
2594
2663
|
let C = {
|
|
2595
|
-
...
|
|
2664
|
+
...Sn,
|
|
2596
2665
|
...y
|
|
2597
2666
|
}, [w, T] = m(), [E, D] = m(), O = !!e && w !== e, k = c?.photo, A = !!k && E !== k, j = !!c && (c.pending || !A), M = !!f, N = (e) => {
|
|
2598
2667
|
e.target === e.currentTarget && (e.key === "Enter" ? f?.() : e.key === " " && (e.preventDefault(), f?.()));
|
|
@@ -2634,7 +2703,7 @@ function yn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2634
2703
|
"aria-hidden": "true"
|
|
2635
2704
|
}) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
|
|
2636
2705
|
className: $.icon,
|
|
2637
|
-
children: _(t === "archived" ?
|
|
2706
|
+
children: _(t === "archived" ? te : me, {
|
|
2638
2707
|
size: 12,
|
|
2639
2708
|
strokeWidth: 1,
|
|
2640
2709
|
"aria-hidden": "true"
|
|
@@ -2677,7 +2746,7 @@ function yn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2677
2746
|
children: C.worker
|
|
2678
2747
|
}), /* @__PURE__ */ v("div", {
|
|
2679
2748
|
className: $.workerRow,
|
|
2680
|
-
children: [A ? /* @__PURE__ */ _(
|
|
2749
|
+
children: [A ? /* @__PURE__ */ _(xn, {
|
|
2681
2750
|
src: k,
|
|
2682
2751
|
children: /* @__PURE__ */ _("img", {
|
|
2683
2752
|
className: $.photo,
|
|
@@ -2719,14 +2788,14 @@ function yn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2719
2788
|
]
|
|
2720
2789
|
});
|
|
2721
2790
|
}
|
|
2722
|
-
function
|
|
2791
|
+
function wn({ className: e, "data-testid": t }) {
|
|
2723
2792
|
return /* @__PURE__ */ v("div", {
|
|
2724
2793
|
className: `${$.root} ${e ?? ""}`,
|
|
2725
2794
|
"data-testid": t,
|
|
2726
2795
|
"aria-hidden": "true",
|
|
2727
2796
|
children: [/* @__PURE__ */ _("div", {
|
|
2728
2797
|
className: $.side,
|
|
2729
|
-
children: /* @__PURE__ */ _(
|
|
2798
|
+
children: /* @__PURE__ */ _(pn, {
|
|
2730
2799
|
width: 72,
|
|
2731
2800
|
height: 48
|
|
2732
2801
|
})
|
|
@@ -2735,15 +2804,15 @@ function bn({ className: e, "data-testid": t }) {
|
|
|
2735
2804
|
children: /* @__PURE__ */ v("div", {
|
|
2736
2805
|
className: $.info,
|
|
2737
2806
|
children: [
|
|
2738
|
-
/* @__PURE__ */ _(
|
|
2807
|
+
/* @__PURE__ */ _(pn, {
|
|
2739
2808
|
variant: "text",
|
|
2740
2809
|
width: "40%"
|
|
2741
2810
|
}),
|
|
2742
|
-
/* @__PURE__ */ _(
|
|
2811
|
+
/* @__PURE__ */ _(pn, {
|
|
2743
2812
|
variant: "text",
|
|
2744
2813
|
width: "65%"
|
|
2745
2814
|
}),
|
|
2746
|
-
/* @__PURE__ */ _(
|
|
2815
|
+
/* @__PURE__ */ _(pn, {
|
|
2747
2816
|
variant: "text",
|
|
2748
2817
|
width: "90%"
|
|
2749
2818
|
})
|
|
@@ -2752,18 +2821,18 @@ function bn({ className: e, "data-testid": t }) {
|
|
|
2752
2821
|
})]
|
|
2753
2822
|
});
|
|
2754
2823
|
}
|
|
2755
|
-
var
|
|
2824
|
+
var Tn = Object.assign(Cn, { Skeleton: wn });
|
|
2756
2825
|
//#endregion
|
|
2757
2826
|
//#region src/utils/format.ts
|
|
2758
|
-
function
|
|
2827
|
+
function En(e) {
|
|
2759
2828
|
let t = Math.floor(e / 60), n = e % 60;
|
|
2760
2829
|
return `${t}h:${String(n).padStart(2, "0")}m`;
|
|
2761
2830
|
}
|
|
2762
|
-
function
|
|
2831
|
+
function Dn(e, t) {
|
|
2763
2832
|
let n = Math.floor(e / 60), r = e % 60, i = (e) => String(e).padStart(2, "0");
|
|
2764
2833
|
return `${i(n)}:${i(r)}:${i(t)}`;
|
|
2765
2834
|
}
|
|
2766
2835
|
//#endregion
|
|
2767
|
-
export { w as Button,
|
|
2836
|
+
export { w as Button, pt as Calendar, E as Card, Le as Checkbox, ze as CheckboxGroup, dn as ConfirmDialog, Qe as DateField, vt as DatePicker, kt as Dropdown, hn as EmptyState, U as FieldLabel, Ht as FilterSection, Bt as HighlightText, Lt as LanguageSwitch, Pt as Logo, St as Menu, Ct as MenuDivider, Tt as MenuItem, Q as Modal, Mt as NavItem, Nt as NavList, bt as NumberField, Ze as PasswordField, xn as PhotoPreview, Ve as RadioButton, He as RadioGroup, Ft as Sidebar, It as SidebarFooter, pn as Skeleton, qt as Spinner, We as Switch, Ut as Tabs, Te as Tag, ke as TagGroup, Xe as TextArea, Je as TextField, Gt as Toggle, je as Toolbar, Fe as ToolbarAdaptive, S as Tooltip, Tn as VideoCard, En as formatDuration, Dn as formatDurationHMS };
|
|
2768
2837
|
|
|
2769
2838
|
//# sourceMappingURL=index.js.map
|