@indxsearch/systm 2.14.1 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/components/Slider/Slider.d.ts +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +313 -298
- package/dist/systm.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -557,15 +557,15 @@ function le({ label: t, error: n, className: r = "", isValid: i = !0, variant: a
|
|
|
557
557
|
]
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var ue = {
|
|
561
561
|
radioWrapper: "_radioWrapper_1faq0_1",
|
|
562
562
|
radioInput: "_radioInput_1faq0_9",
|
|
563
563
|
customRadio: "_customRadio_1faq0_23",
|
|
564
564
|
labelText: "_labelText_1faq0_57",
|
|
565
565
|
disabled: "_disabled_1faq0_63"
|
|
566
|
-
},
|
|
566
|
+
}, de = ({ id: e, name: t, value: n, label: r, checked: i = !1, onChange: a, disabled: o = !1, "aria-label": s }) => /* @__PURE__ */ d("label", {
|
|
567
567
|
htmlFor: e,
|
|
568
|
-
className: `${
|
|
568
|
+
className: `${ue.radioWrapper} ${o ? ue.disabled : ""} ${o ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
569
569
|
children: [
|
|
570
570
|
/* @__PURE__ */ u("input", {
|
|
571
571
|
id: e,
|
|
@@ -576,24 +576,24 @@ var z = {
|
|
|
576
576
|
onChange: a,
|
|
577
577
|
disabled: o,
|
|
578
578
|
"aria-label": s,
|
|
579
|
-
className:
|
|
579
|
+
className: ue.radioInput
|
|
580
580
|
}),
|
|
581
|
-
/* @__PURE__ */ u("span", { className:
|
|
581
|
+
/* @__PURE__ */ u("span", { className: ue.customRadio }),
|
|
582
582
|
/* @__PURE__ */ u("span", {
|
|
583
|
-
className:
|
|
583
|
+
className: ue.labelText,
|
|
584
584
|
children: r
|
|
585
585
|
})
|
|
586
586
|
]
|
|
587
|
-
}),
|
|
587
|
+
}), fe = {
|
|
588
588
|
switch: "_switch_1xsea_1",
|
|
589
589
|
slider: "_slider_1xsea_23",
|
|
590
590
|
label: "_label_1xsea_28",
|
|
591
591
|
disabled: "_disabled_1xsea_43"
|
|
592
|
-
},
|
|
592
|
+
}, pe = ({ id: t, checked: n, onChange: r, disabled: i = !1, label: a, "aria-label": o }) => {
|
|
593
593
|
let s = e.useId(), c = t || s;
|
|
594
594
|
return /* @__PURE__ */ d("label", {
|
|
595
595
|
htmlFor: c,
|
|
596
|
-
className: `${
|
|
596
|
+
className: `${fe.switch} ${i ? fe.disabled : ""} ${i ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
597
597
|
children: [
|
|
598
598
|
/* @__PURE__ */ u("input", {
|
|
599
599
|
id: c,
|
|
@@ -606,90 +606,104 @@ var z = {
|
|
|
606
606
|
disabled: i
|
|
607
607
|
}),
|
|
608
608
|
/* @__PURE__ */ u("span", {
|
|
609
|
-
className:
|
|
609
|
+
className: fe.slider,
|
|
610
610
|
"aria-hidden": "true"
|
|
611
611
|
}),
|
|
612
612
|
a && /* @__PURE__ */ u("span", {
|
|
613
|
-
className:
|
|
613
|
+
className: fe.label,
|
|
614
614
|
children: a
|
|
615
615
|
})
|
|
616
616
|
]
|
|
617
617
|
});
|
|
618
|
-
},
|
|
619
|
-
label: "
|
|
620
|
-
basetrack: "
|
|
621
|
-
selectedtrack: "
|
|
622
|
-
livetrack: "
|
|
623
|
-
livetrackFaceted: "
|
|
624
|
-
livetrackDefault: "
|
|
625
|
-
thumbs: "
|
|
626
|
-
disabled: "
|
|
627
|
-
|
|
628
|
-
|
|
618
|
+
}, z = {
|
|
619
|
+
label: "_label_1o3ls_1",
|
|
620
|
+
basetrack: "_basetrack_1o3ls_8",
|
|
621
|
+
selectedtrack: "_selectedtrack_1o3ls_36",
|
|
622
|
+
livetrack: "_livetrack_1o3ls_43",
|
|
623
|
+
livetrackFaceted: "_livetrackFaceted_1o3ls_49",
|
|
624
|
+
livetrackDefault: "_livetrackDefault_1o3ls_52",
|
|
625
|
+
thumbs: "_thumbs_1o3ls_55",
|
|
626
|
+
disabled: "_disabled_1o3ls_89",
|
|
627
|
+
stepmarks: "_stepmarks_1o3ls_94",
|
|
628
|
+
stepmark: "_stepmark_1o3ls_94",
|
|
629
|
+
stepmarksInline: "_stepmarksInline_1o3ls_113",
|
|
630
|
+
stepmarksBelow: "_stepmarksBelow_1o3ls_120",
|
|
631
|
+
basetrackStepsBelow: "_basetrackStepsBelow_1o3ls_125"
|
|
632
|
+
}, me = 50, he = (t) => {
|
|
633
|
+
let { min: n, max: r, step: i = 1, disabled: a = !1, className: o, activeMin: s, activeMax: c, isFaceted: l = !1, highlightFaceted: f = !0, stepMarks: p, onChange: m, onFinalChange: h, label: g, "aria-label": _, id: v } = t, y = e.useId(), b = v || y;
|
|
629
634
|
if (!(Number.isFinite(n) && Number.isFinite(r) && r > n)) return /* @__PURE__ */ d("div", {
|
|
630
635
|
className: o,
|
|
631
|
-
children: [
|
|
632
|
-
className:
|
|
633
|
-
children:
|
|
636
|
+
children: [g && /* @__PURE__ */ u("span", {
|
|
637
|
+
className: z.label,
|
|
638
|
+
children: g
|
|
634
639
|
}), /* @__PURE__ */ u("div", {
|
|
635
|
-
className: `${
|
|
640
|
+
className: `${z.basetrack} ${z.disabled}`,
|
|
636
641
|
"aria-hidden": "true"
|
|
637
642
|
})]
|
|
638
643
|
});
|
|
644
|
+
let x = i > 0 ? Math.round((r - n) / i) : 0, S = !!p && x > 0 && x <= me, C = S && p === "below" ? `${z.basetrack} ${z.basetrackStepsBelow}` : z.basetrack, w = S ? /* @__PURE__ */ u("div", {
|
|
645
|
+
className: `${z.stepmarks} ${p === "below" ? z.stepmarksBelow : z.stepmarksInline}`,
|
|
646
|
+
"aria-hidden": "true",
|
|
647
|
+
children: Array.from({ length: x + 1 }, (e, t) => /* @__PURE__ */ u("span", {
|
|
648
|
+
className: z.stepmark,
|
|
649
|
+
style: { left: `${Math.min(t * i, r - n) / (r - n) * 100}%` }
|
|
650
|
+
}, t))
|
|
651
|
+
}) : null;
|
|
639
652
|
if ("isRange" in t && t.isRange) {
|
|
640
|
-
let e = t.value, [f,
|
|
653
|
+
let e = t.value, [f, p] = e;
|
|
641
654
|
return /* @__PURE__ */ d("div", {
|
|
642
655
|
className: o,
|
|
643
|
-
children: [
|
|
644
|
-
htmlFor:
|
|
645
|
-
className:
|
|
646
|
-
children:
|
|
656
|
+
children: [g && /* @__PURE__ */ u("label", {
|
|
657
|
+
htmlFor: b,
|
|
658
|
+
className: z.label,
|
|
659
|
+
children: g
|
|
647
660
|
}), /* @__PURE__ */ u(E, {
|
|
648
661
|
step: i,
|
|
649
662
|
min: n,
|
|
650
663
|
max: r,
|
|
651
664
|
values: e,
|
|
652
|
-
onChange: (e) =>
|
|
653
|
-
onFinalChange: (e) =>
|
|
665
|
+
onChange: (e) => m(e),
|
|
666
|
+
onFinalChange: (e) => h?.(e),
|
|
654
667
|
disabled: a,
|
|
655
668
|
renderTrack: ({ props: e, children: t }) => {
|
|
656
|
-
let { key: i, ...a } = e, o = r - n,
|
|
657
|
-
return v && (
|
|
669
|
+
let { key: i, ...a } = e, o = r - n, m = (f - n) / o * 100, h = (p - f) / o * 100, g = 0, _ = 0, v = typeof s == "number" && typeof c == "number" && c > s && (s > n || c < r);
|
|
670
|
+
return v && (g = (s - n) / o * 100, _ = (c - s) / o * 100), /* @__PURE__ */ d("div", {
|
|
658
671
|
...a,
|
|
659
|
-
className:
|
|
672
|
+
className: C,
|
|
660
673
|
style: { ...a.style },
|
|
661
674
|
children: [
|
|
662
675
|
!v && /* @__PURE__ */ u("div", {
|
|
663
|
-
className:
|
|
676
|
+
className: z.selectedtrack,
|
|
664
677
|
style: {
|
|
665
|
-
left: `${
|
|
666
|
-
width: `${
|
|
678
|
+
left: `${m}%`,
|
|
679
|
+
width: `${h}%`,
|
|
667
680
|
zIndex: "1"
|
|
668
681
|
}
|
|
669
682
|
}),
|
|
670
683
|
v && /* @__PURE__ */ u("div", {
|
|
671
|
-
className: `${
|
|
684
|
+
className: `${z.livetrack} ${l ? z.livetrackFaceted : z.livetrackDefault}`,
|
|
672
685
|
style: {
|
|
673
|
-
left: `${
|
|
674
|
-
width: `${
|
|
686
|
+
left: `${g}%`,
|
|
687
|
+
width: `${_}%`,
|
|
675
688
|
zIndex: "2"
|
|
676
689
|
}
|
|
677
690
|
}),
|
|
691
|
+
w,
|
|
678
692
|
t
|
|
679
693
|
]
|
|
680
694
|
}, i);
|
|
681
695
|
},
|
|
682
696
|
renderThumb: ({ props: e, index: t }) => {
|
|
683
|
-
let { key: i, ...o } = e, s = t === 0 ? f :
|
|
697
|
+
let { key: i, ...o } = e, s = t === 0 ? f : p;
|
|
684
698
|
return /* @__PURE__ */ u("div", {
|
|
685
699
|
...o,
|
|
686
|
-
id: t === 0 ?
|
|
687
|
-
className: `${
|
|
700
|
+
id: t === 0 ? b : void 0,
|
|
701
|
+
className: `${z.thumbs} ${a ? z.disabled : ""} ${a ? "cursor-not-allowed" : "cursor-resize-col"}`,
|
|
688
702
|
style: {
|
|
689
703
|
...o.style,
|
|
690
704
|
zIndex: "3"
|
|
691
705
|
},
|
|
692
|
-
"aria-label":
|
|
706
|
+
"aria-label": _ || (t === 0 ? "Minimum value" : "Maximum value"),
|
|
693
707
|
"aria-valuemin": n,
|
|
694
708
|
"aria-valuemax": r,
|
|
695
709
|
"aria-valuenow": s
|
|
@@ -701,27 +715,27 @@ var z = {
|
|
|
701
715
|
let e = t.value;
|
|
702
716
|
return /* @__PURE__ */ d("div", {
|
|
703
717
|
className: o,
|
|
704
|
-
children: [
|
|
705
|
-
htmlFor:
|
|
706
|
-
className:
|
|
707
|
-
children:
|
|
718
|
+
children: [g && /* @__PURE__ */ u("label", {
|
|
719
|
+
htmlFor: b,
|
|
720
|
+
className: z.label,
|
|
721
|
+
children: g
|
|
708
722
|
}), /* @__PURE__ */ u(E, {
|
|
709
723
|
step: i,
|
|
710
724
|
min: n,
|
|
711
725
|
max: r,
|
|
712
726
|
values: [e],
|
|
713
|
-
onChange: (e) =>
|
|
714
|
-
onFinalChange: (e) =>
|
|
727
|
+
onChange: (e) => m(e[0]),
|
|
728
|
+
onFinalChange: (e) => h?.(e[0]),
|
|
715
729
|
disabled: a,
|
|
716
730
|
renderTrack: ({ props: t, children: i }) => {
|
|
717
731
|
let { key: a, ...o } = t, f = r - n, p = (e - n) / f * 100, m = 0, h = 0, g = typeof s == "number" && typeof c == "number" && c > s && (s > n || c < r);
|
|
718
732
|
return g && (m = (s - n) / f * 100, h = (c - s) / f * 100), /* @__PURE__ */ d("div", {
|
|
719
733
|
...o,
|
|
720
|
-
className:
|
|
734
|
+
className: C,
|
|
721
735
|
style: { ...o.style },
|
|
722
736
|
children: [
|
|
723
737
|
!g && /* @__PURE__ */ u("div", {
|
|
724
|
-
className:
|
|
738
|
+
className: z.selectedtrack,
|
|
725
739
|
style: {
|
|
726
740
|
left: "0%",
|
|
727
741
|
width: `${p}%`,
|
|
@@ -729,13 +743,14 @@ var z = {
|
|
|
729
743
|
}
|
|
730
744
|
}),
|
|
731
745
|
g && /* @__PURE__ */ u("div", {
|
|
732
|
-
className: `${
|
|
746
|
+
className: `${z.livetrack} ${l ? z.livetrackFaceted : z.livetrackDefault}`,
|
|
733
747
|
style: {
|
|
734
748
|
left: `${m}%`,
|
|
735
749
|
width: `${h}%`,
|
|
736
750
|
zIndex: "2"
|
|
737
751
|
}
|
|
738
752
|
}),
|
|
753
|
+
w,
|
|
739
754
|
i
|
|
740
755
|
]
|
|
741
756
|
}, a);
|
|
@@ -744,13 +759,13 @@ var z = {
|
|
|
744
759
|
let { key: i, ...o } = t;
|
|
745
760
|
return /* @__PURE__ */ u("div", {
|
|
746
761
|
...o,
|
|
747
|
-
id:
|
|
748
|
-
className: `${
|
|
762
|
+
id: b,
|
|
763
|
+
className: `${z.thumbs} ${a ? z.disabled : ""} ${a ? "cursor-not-allowed" : "cursor-resize-col"}`,
|
|
749
764
|
style: {
|
|
750
765
|
...o.style,
|
|
751
766
|
zIndex: "3"
|
|
752
767
|
},
|
|
753
|
-
"aria-label":
|
|
768
|
+
"aria-label": _,
|
|
754
769
|
"aria-valuemin": n,
|
|
755
770
|
"aria-valuemax": r,
|
|
756
771
|
"aria-valuenow": e
|
|
@@ -759,7 +774,7 @@ var z = {
|
|
|
759
774
|
})]
|
|
760
775
|
});
|
|
761
776
|
}
|
|
762
|
-
},
|
|
777
|
+
}, B = {
|
|
763
778
|
wrapper: "_wrapper_15fsv_1",
|
|
764
779
|
label: "_label_15fsv_7",
|
|
765
780
|
trigger: "_trigger_15fsv_12",
|
|
@@ -771,14 +786,14 @@ var z = {
|
|
|
771
786
|
viewport: "_viewport_15fsv_76",
|
|
772
787
|
item: "_item_15fsv_82",
|
|
773
788
|
itemIndicator: "_itemIndicator_15fsv_105"
|
|
774
|
-
},
|
|
789
|
+
}, ge = ({ value: t, onValueChange: n, options: r, placeholder: i = "Select...", className: a = "", disabled: o = !1, label: s, size: c = "default", "aria-label": l, id: f }) => {
|
|
775
790
|
let p = e.useId(), g = f || p, _ = `${g}-label`, v = r.find((e) => e.value === t), y = /* @__PURE__ */ d(D.Root, {
|
|
776
791
|
value: t,
|
|
777
792
|
onValueChange: n,
|
|
778
793
|
disabled: o,
|
|
779
794
|
children: [/* @__PURE__ */ d(D.Trigger, {
|
|
780
795
|
id: g,
|
|
781
|
-
className: `${
|
|
796
|
+
className: `${B.trigger} ${B[c]} ${a} cursor-pointer`,
|
|
782
797
|
...s ? { "aria-labelledby": _ } : l ? { "aria-label": l } : {},
|
|
783
798
|
children: [/* @__PURE__ */ d("span", {
|
|
784
799
|
style: {
|
|
@@ -788,7 +803,7 @@ var z = {
|
|
|
788
803
|
},
|
|
789
804
|
children: [v?.icon, /* @__PURE__ */ u(D.Value, { placeholder: i })]
|
|
790
805
|
}), /* @__PURE__ */ u(D.Icon, {
|
|
791
|
-
className:
|
|
806
|
+
className: B.icon,
|
|
792
807
|
"aria-hidden": "true",
|
|
793
808
|
children: /* @__PURE__ */ u(h, {
|
|
794
809
|
size: c === "large" ? 21 : 14,
|
|
@@ -796,16 +811,16 @@ var z = {
|
|
|
796
811
|
})
|
|
797
812
|
})]
|
|
798
813
|
}), /* @__PURE__ */ u(D.Portal, { children: /* @__PURE__ */ u(D.Content, {
|
|
799
|
-
className:
|
|
814
|
+
className: B.content,
|
|
800
815
|
position: "popper",
|
|
801
816
|
side: "bottom",
|
|
802
817
|
align: "start",
|
|
803
818
|
sideOffset: 4,
|
|
804
819
|
children: /* @__PURE__ */ u(D.Viewport, {
|
|
805
|
-
className:
|
|
820
|
+
className: B.viewport,
|
|
806
821
|
children: r.map((e) => /* @__PURE__ */ d(D.Item, {
|
|
807
822
|
value: e.value,
|
|
808
|
-
className:
|
|
823
|
+
className: B.item,
|
|
809
824
|
children: [/* @__PURE__ */ d("span", {
|
|
810
825
|
style: {
|
|
811
826
|
display: "inline-flex",
|
|
@@ -814,7 +829,7 @@ var z = {
|
|
|
814
829
|
},
|
|
815
830
|
children: [e.icon, /* @__PURE__ */ u(D.ItemText, { children: e.label })]
|
|
816
831
|
}), /* @__PURE__ */ u(D.ItemIndicator, {
|
|
817
|
-
className:
|
|
832
|
+
className: B.itemIndicator,
|
|
818
833
|
children: /* @__PURE__ */ u(m, {
|
|
819
834
|
size: 12,
|
|
820
835
|
color: "currentColor"
|
|
@@ -825,22 +840,22 @@ var z = {
|
|
|
825
840
|
}) })]
|
|
826
841
|
});
|
|
827
842
|
return s ? /* @__PURE__ */ d("div", {
|
|
828
|
-
className:
|
|
843
|
+
className: B.wrapper,
|
|
829
844
|
children: [/* @__PURE__ */ u("label", {
|
|
830
845
|
id: _,
|
|
831
846
|
htmlFor: g,
|
|
832
|
-
className:
|
|
847
|
+
className: B.label,
|
|
833
848
|
children: s
|
|
834
849
|
}), y]
|
|
835
850
|
}) : y;
|
|
836
|
-
},
|
|
851
|
+
}, _e = { content: "_content_1qahr_1" }, ve = ({ trigger: e, children: t, open: n, onOpenChange: r, align: i = "end", side: a = "bottom", sideOffset: o = 5, className: s = "", "aria-label": c, "aria-describedby": l }) => /* @__PURE__ */ d(O.Root, {
|
|
837
852
|
open: n,
|
|
838
853
|
onOpenChange: r,
|
|
839
854
|
children: [/* @__PURE__ */ u(O.Trigger, {
|
|
840
855
|
asChild: !0,
|
|
841
856
|
children: e
|
|
842
857
|
}), /* @__PURE__ */ u(O.Portal, { children: /* @__PURE__ */ u(O.Content, {
|
|
843
|
-
className: `${
|
|
858
|
+
className: `${_e.content} ${s}`,
|
|
844
859
|
align: i,
|
|
845
860
|
side: a,
|
|
846
861
|
sideOffset: o,
|
|
@@ -848,7 +863,7 @@ var z = {
|
|
|
848
863
|
"aria-describedby": l,
|
|
849
864
|
children: t
|
|
850
865
|
}) })]
|
|
851
|
-
}),
|
|
866
|
+
}), V = {
|
|
852
867
|
table: "_table_j6zqj_1",
|
|
853
868
|
caption: "_caption_j6zqj_8",
|
|
854
869
|
headerRow: "_headerRow_j6zqj_25",
|
|
@@ -864,17 +879,17 @@ var z = {
|
|
|
864
879
|
};
|
|
865
880
|
//#endregion
|
|
866
881
|
//#region src/components/Table/Table.tsx
|
|
867
|
-
function
|
|
882
|
+
function ye({ children: e, caption: t, "aria-label": n, scrollable: r = !1, stickyFirstColumn: i = !1, bleedEnd: a }) {
|
|
868
883
|
let o = /* @__PURE__ */ d("table", {
|
|
869
|
-
className: `${
|
|
884
|
+
className: `${V.table} ${r && i ? V.stickyFirst : ""}`,
|
|
870
885
|
"aria-label": n,
|
|
871
886
|
children: [t && /* @__PURE__ */ u("caption", {
|
|
872
|
-
className:
|
|
887
|
+
className: V.caption,
|
|
873
888
|
children: t
|
|
874
889
|
}), e]
|
|
875
890
|
});
|
|
876
891
|
return r ? /* @__PURE__ */ u("div", {
|
|
877
|
-
className: `${
|
|
892
|
+
className: `${V.scroll} ${a === void 0 ? "" : V.bleedEnd}`,
|
|
878
893
|
style: a === void 0 ? void 0 : { "--table-bleed": typeof a == "number" ? `${a}px` : a },
|
|
879
894
|
role: "region",
|
|
880
895
|
"aria-label": n ?? t,
|
|
@@ -884,27 +899,27 @@ function _e({ children: e, caption: t, "aria-label": n, scrollable: r = !1, stic
|
|
|
884
899
|
}
|
|
885
900
|
//#endregion
|
|
886
901
|
//#region src/components/Table/TableHeader.tsx
|
|
887
|
-
function
|
|
902
|
+
function be({ children: t }) {
|
|
888
903
|
let n = e.Children.map(t, (t) => e.isValidElement(t) && t.type === "td" ? /* @__PURE__ */ u("th", {
|
|
889
904
|
scope: "col",
|
|
890
905
|
...t.props
|
|
891
906
|
}) : t);
|
|
892
907
|
return /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", {
|
|
893
|
-
className:
|
|
908
|
+
className: V.headerRow,
|
|
894
909
|
children: n
|
|
895
910
|
}) });
|
|
896
911
|
}
|
|
897
912
|
//#endregion
|
|
898
913
|
//#region src/components/Table/TableRow.tsx
|
|
899
|
-
function
|
|
914
|
+
function xe({ children: e }) {
|
|
900
915
|
return /* @__PURE__ */ u("tr", {
|
|
901
|
-
className:
|
|
916
|
+
className: V.dataRow,
|
|
902
917
|
children: e
|
|
903
918
|
});
|
|
904
919
|
}
|
|
905
920
|
//#endregion
|
|
906
921
|
//#region src/components/Table/TableCell.tsx
|
|
907
|
-
function
|
|
922
|
+
function Se({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
908
923
|
let a = n ? "th" : "td", o = {
|
|
909
924
|
...n && r ? { scope: r } : {},
|
|
910
925
|
...i ? { colSpan: i } : {}
|
|
@@ -912,12 +927,12 @@ function be({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
|
912
927
|
return e || t ? /* @__PURE__ */ u(a, {
|
|
913
928
|
...o,
|
|
914
929
|
children: /* @__PURE__ */ d("div", {
|
|
915
|
-
className:
|
|
930
|
+
className: V.cellInner,
|
|
916
931
|
children: [e && /* @__PURE__ */ u("span", {
|
|
917
|
-
className:
|
|
932
|
+
className: V.cellLabel,
|
|
918
933
|
children: e
|
|
919
934
|
}), t && /* @__PURE__ */ u("div", {
|
|
920
|
-
className:
|
|
935
|
+
className: V.cellContent,
|
|
921
936
|
children: t
|
|
922
937
|
})]
|
|
923
938
|
})
|
|
@@ -928,18 +943,18 @@ function be({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
|
928
943
|
}
|
|
929
944
|
//#endregion
|
|
930
945
|
//#region src/components/Table/TableValue.tsx
|
|
931
|
-
function
|
|
946
|
+
function Ce({ children: e }) {
|
|
932
947
|
return /* @__PURE__ */ u("span", {
|
|
933
|
-
className:
|
|
948
|
+
className: V.value,
|
|
934
949
|
children: e
|
|
935
950
|
});
|
|
936
951
|
}
|
|
937
952
|
//#endregion
|
|
938
953
|
//#region src/components/Table/TableIcon.tsx
|
|
939
|
-
function
|
|
954
|
+
function we({ children: t, "aria-label": n }) {
|
|
940
955
|
let r = !n;
|
|
941
956
|
return /* @__PURE__ */ u("span", {
|
|
942
|
-
className:
|
|
957
|
+
className: V.icon,
|
|
943
958
|
"aria-hidden": r ? "true" : void 0,
|
|
944
959
|
"aria-label": n,
|
|
945
960
|
children: e.cloneElement(t, {
|
|
@@ -948,7 +963,7 @@ function Se({ children: t, "aria-label": n }) {
|
|
|
948
963
|
})
|
|
949
964
|
});
|
|
950
965
|
}
|
|
951
|
-
var
|
|
966
|
+
var H = {
|
|
952
967
|
tabs: "_tabs_5w265_1",
|
|
953
968
|
scrollable: "_scrollable_5w265_16",
|
|
954
969
|
tab: "_tab_5w265_1",
|
|
@@ -963,23 +978,23 @@ var U = {
|
|
|
963
978
|
};
|
|
964
979
|
//#endregion
|
|
965
980
|
//#region src/components/Tabs/Tabs.tsx
|
|
966
|
-
function
|
|
981
|
+
function Te(e, t) {
|
|
967
982
|
if (!e || !t) return;
|
|
968
983
|
let n = parseFloat(getComputedStyle(e).paddingInlineStart) || 32, r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
969
984
|
i.left < r.left + n ? e.scrollLeft -= r.left + n - i.left : i.right > r.right - n && (e.scrollLeft += i.right - (r.right - n));
|
|
970
985
|
}
|
|
971
|
-
var
|
|
986
|
+
var Ee = {
|
|
972
987
|
micro: 14,
|
|
973
988
|
default: 14,
|
|
974
989
|
large: 21
|
|
975
990
|
};
|
|
976
|
-
function
|
|
991
|
+
function De({ items: e, value: r, onValueChange: o, size: c = "default", variant: f = "underline", scrollable: p = !1, bleed: m, getPanelId: h, "aria-label": g, renderLink: _ }) {
|
|
977
992
|
let v = s(null), y = s(/* @__PURE__ */ new Map()), b = a(), x = Math.max(e.findIndex((e) => e.value === r), 0), S = e.some((e) => e.href !== void 0), C = (t) => {
|
|
978
993
|
let n = e[t];
|
|
979
994
|
if (!n) return;
|
|
980
995
|
o(n.value);
|
|
981
996
|
let r = y.current.get(n.value);
|
|
982
|
-
r?.focus({ preventScroll: !0 }), p &&
|
|
997
|
+
r?.focus({ preventScroll: !0 }), p && Te(v.current, r);
|
|
983
998
|
}, w = (t, n) => {
|
|
984
999
|
for (let r = 1; r <= e.length; r++) {
|
|
985
1000
|
let i = (t + n * r + e.length * r) % e.length;
|
|
@@ -1026,27 +1041,27 @@ function Te({ items: e, value: r, onValueChange: o, size: c = "default", variant
|
|
|
1026
1041
|
m,
|
|
1027
1042
|
e.length
|
|
1028
1043
|
]), i(() => {
|
|
1029
|
-
p &&
|
|
1044
|
+
p && Te(v.current, y.current.get(r));
|
|
1030
1045
|
}, [p, r]), /* @__PURE__ */ u("div", {
|
|
1031
1046
|
ref: v,
|
|
1032
|
-
className: `${
|
|
1047
|
+
className: `${H.tabs} ${f === "button" ? H.buttonVariant : ""} ${p ? H.scrollable : ""} ${p && m !== void 0 ? H.bleed : ""}`,
|
|
1033
1048
|
style: p && m !== void 0 ? { "--tabs-bleed": typeof m == "number" ? `${m}px` : m } : void 0,
|
|
1034
1049
|
role: S ? "navigation" : "tablist",
|
|
1035
1050
|
"aria-label": g,
|
|
1036
1051
|
children: e.map((e, r) => {
|
|
1037
1052
|
let i = r === x, a = /* @__PURE__ */ d(l, { children: [
|
|
1038
1053
|
e.icon ? /* @__PURE__ */ u("span", {
|
|
1039
|
-
className:
|
|
1054
|
+
className: H.icon,
|
|
1040
1055
|
"aria-hidden": "true",
|
|
1041
|
-
children: n(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size:
|
|
1056
|
+
children: n(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size: Ee[c] }) : e.icon
|
|
1042
1057
|
}) : null,
|
|
1043
1058
|
e.label,
|
|
1044
1059
|
e.badge != null && e.badge !== !1 ? /* @__PURE__ */ u("span", {
|
|
1045
|
-
className:
|
|
1060
|
+
className: H.badge,
|
|
1046
1061
|
title: e.badgeTitle,
|
|
1047
1062
|
children: e.badge
|
|
1048
1063
|
}) : null
|
|
1049
|
-
] }), s = `${
|
|
1064
|
+
] }), s = `${H.tab} ${H[c]} ${i ? H.active : ""}`;
|
|
1050
1065
|
if (e.href !== void 0) {
|
|
1051
1066
|
let t = {
|
|
1052
1067
|
id: `${b}-tab-${e.value}`,
|
|
@@ -1088,7 +1103,7 @@ function Te({ items: e, value: r, onValueChange: o, size: c = "default", variant
|
|
|
1088
1103
|
})
|
|
1089
1104
|
});
|
|
1090
1105
|
}
|
|
1091
|
-
var
|
|
1106
|
+
var U = {
|
|
1092
1107
|
root: "_root_wrjxq_1",
|
|
1093
1108
|
micro: "_micro_wrjxq_2",
|
|
1094
1109
|
default: "_default_wrjxq_3",
|
|
@@ -1108,106 +1123,106 @@ var W = {
|
|
|
1108
1123
|
};
|
|
1109
1124
|
//#endregion
|
|
1110
1125
|
//#region src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
1111
|
-
function
|
|
1126
|
+
function Oe(t) {
|
|
1112
1127
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
1113
1128
|
size: "14px",
|
|
1114
1129
|
color: "currentColor"
|
|
1115
1130
|
}) : t;
|
|
1116
1131
|
}
|
|
1117
|
-
var
|
|
1132
|
+
var ke = "\0action", Ae = ({ items: e, size: t = "default", overflow: n = "wrap", className: r = "", separator: i = /* @__PURE__ */ u(_, {
|
|
1118
1133
|
size: 14,
|
|
1119
1134
|
color: "currentColor"
|
|
1120
1135
|
}), renderLink: a, "aria-label": o = "Breadcrumb" }) => /* @__PURE__ */ u("nav", {
|
|
1121
1136
|
"aria-label": o,
|
|
1122
|
-
className: `${
|
|
1137
|
+
className: `${U.root} ${U[t]} ${n === "truncate" ? U.truncate : ""} ${r}`,
|
|
1123
1138
|
children: /* @__PURE__ */ u("ol", {
|
|
1124
|
-
className:
|
|
1139
|
+
className: U.list,
|
|
1125
1140
|
children: e.map((t, r) => /* @__PURE__ */ d("li", {
|
|
1126
|
-
className:
|
|
1141
|
+
className: U.item,
|
|
1127
1142
|
children: [r > 0 && /* @__PURE__ */ u("span", {
|
|
1128
|
-
className:
|
|
1143
|
+
className: U.separator,
|
|
1129
1144
|
"aria-hidden": "true",
|
|
1130
1145
|
children: i
|
|
1131
1146
|
}), /* @__PURE__ */ d("div", {
|
|
1132
|
-
className: `${
|
|
1147
|
+
className: `${U.step} ${t.switcher ? U.switchable : ""}`,
|
|
1133
1148
|
children: [t.href ? (() => {
|
|
1134
1149
|
let i = {
|
|
1135
|
-
className:
|
|
1150
|
+
className: U.label,
|
|
1136
1151
|
href: t.href,
|
|
1137
1152
|
title: n === "truncate" ? t.label : void 0,
|
|
1138
1153
|
onClick: t.onClick,
|
|
1139
1154
|
"aria-current": r === e.length - 1 ? "page" : void 0,
|
|
1140
1155
|
children: /* @__PURE__ */ d(l, { children: [t.icon && /* @__PURE__ */ u("span", {
|
|
1141
|
-
className:
|
|
1156
|
+
className: U.icon,
|
|
1142
1157
|
"aria-hidden": "true",
|
|
1143
|
-
children:
|
|
1158
|
+
children: Oe(t.icon)
|
|
1144
1159
|
}), /* @__PURE__ */ u("span", {
|
|
1145
|
-
className:
|
|
1160
|
+
className: U.text,
|
|
1146
1161
|
children: t.label
|
|
1147
1162
|
})] })
|
|
1148
1163
|
};
|
|
1149
1164
|
return a ? a(t, i) : /* @__PURE__ */ u("a", { ...i });
|
|
1150
1165
|
})() : /* @__PURE__ */ d("span", {
|
|
1151
|
-
className:
|
|
1166
|
+
className: U.label,
|
|
1152
1167
|
title: n === "truncate" ? t.label : void 0,
|
|
1153
1168
|
"aria-current": r === e.length - 1 ? "page" : void 0,
|
|
1154
1169
|
children: [t.icon && /* @__PURE__ */ u("span", {
|
|
1155
|
-
className:
|
|
1170
|
+
className: U.icon,
|
|
1156
1171
|
"aria-hidden": "true",
|
|
1157
|
-
children:
|
|
1172
|
+
children: Oe(t.icon)
|
|
1158
1173
|
}), /* @__PURE__ */ u("span", {
|
|
1159
|
-
className:
|
|
1174
|
+
className: U.text,
|
|
1160
1175
|
children: t.label
|
|
1161
1176
|
})]
|
|
1162
1177
|
}), t.switcher && /* @__PURE__ */ d(D.Root, {
|
|
1163
1178
|
value: t.switcher.value,
|
|
1164
|
-
onValueChange: (e) => e ===
|
|
1179
|
+
onValueChange: (e) => e === ke ? t.switcher.action?.onSelect() : t.switcher.onValueChange(e),
|
|
1165
1180
|
disabled: t.switcher.disabled || t.switcher.options.length === 0 && !t.switcher.action,
|
|
1166
1181
|
children: [/* @__PURE__ */ u(D.Trigger, {
|
|
1167
|
-
className:
|
|
1182
|
+
className: U.trigger,
|
|
1168
1183
|
"aria-label": `${t.switcher.label}: ${t.label}`,
|
|
1169
1184
|
children: /* @__PURE__ */ u(D.Icon, {
|
|
1170
1185
|
"aria-hidden": "true",
|
|
1171
|
-
className:
|
|
1186
|
+
className: U.icon,
|
|
1172
1187
|
children: /* @__PURE__ */ u(y, {
|
|
1173
1188
|
size: 14,
|
|
1174
1189
|
color: "currentColor"
|
|
1175
1190
|
})
|
|
1176
1191
|
})
|
|
1177
1192
|
}), /* @__PURE__ */ u(D.Portal, { children: /* @__PURE__ */ u(D.Content, {
|
|
1178
|
-
className: `${
|
|
1193
|
+
className: `${B.content} ${U.menu}`,
|
|
1179
1194
|
position: "popper",
|
|
1180
1195
|
align: "end",
|
|
1181
1196
|
sideOffset: 4,
|
|
1182
1197
|
collisionPadding: 8,
|
|
1183
1198
|
children: /* @__PURE__ */ d(D.Viewport, {
|
|
1184
|
-
className:
|
|
1199
|
+
className: B.viewport,
|
|
1185
1200
|
children: [t.switcher.options.map((e) => /* @__PURE__ */ d(D.Item, {
|
|
1186
1201
|
value: e.value,
|
|
1187
|
-
className:
|
|
1202
|
+
className: B.item,
|
|
1188
1203
|
textValue: e.label,
|
|
1189
1204
|
children: [/* @__PURE__ */ d("span", {
|
|
1190
|
-
className:
|
|
1205
|
+
className: U.option,
|
|
1191
1206
|
children: [e.icon && /* @__PURE__ */ u("span", {
|
|
1192
|
-
className:
|
|
1207
|
+
className: U.icon,
|
|
1193
1208
|
"aria-hidden": "true",
|
|
1194
1209
|
children: e.icon
|
|
1195
1210
|
}), /* @__PURE__ */ u(D.ItemText, { children: e.label })]
|
|
1196
1211
|
}), /* @__PURE__ */ u(D.ItemIndicator, {
|
|
1197
|
-
className:
|
|
1212
|
+
className: B.itemIndicator,
|
|
1198
1213
|
children: /* @__PURE__ */ u(m, {
|
|
1199
1214
|
size: 12,
|
|
1200
1215
|
color: "currentColor"
|
|
1201
1216
|
})
|
|
1202
1217
|
})]
|
|
1203
|
-
}, e.value)), t.switcher.action && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(D.Separator, { className:
|
|
1204
|
-
value:
|
|
1205
|
-
className:
|
|
1218
|
+
}, e.value)), t.switcher.action && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(D.Separator, { className: U.menuDivider }), /* @__PURE__ */ u(D.Item, {
|
|
1219
|
+
value: ke,
|
|
1220
|
+
className: B.item,
|
|
1206
1221
|
textValue: t.switcher.action.label,
|
|
1207
1222
|
children: /* @__PURE__ */ d("span", {
|
|
1208
|
-
className:
|
|
1223
|
+
className: U.option,
|
|
1209
1224
|
children: [/* @__PURE__ */ u("span", {
|
|
1210
|
-
className:
|
|
1225
|
+
className: U.icon,
|
|
1211
1226
|
"aria-hidden": "true",
|
|
1212
1227
|
children: /* @__PURE__ */ u(x, {
|
|
1213
1228
|
size: 14,
|
|
@@ -1222,7 +1237,7 @@ var De = "\0action", Oe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1222
1237
|
})]
|
|
1223
1238
|
}, t.id))
|
|
1224
1239
|
})
|
|
1225
|
-
}),
|
|
1240
|
+
}), je = {
|
|
1226
1241
|
wrapper: "_wrapper_1a9jo_1",
|
|
1227
1242
|
track: "_track_1a9jo_8",
|
|
1228
1243
|
fill: "_fill_1a9jo_36",
|
|
@@ -1230,42 +1245,42 @@ var De = "\0action", Oe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1230
1245
|
};
|
|
1231
1246
|
//#endregion
|
|
1232
1247
|
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
1233
|
-
function
|
|
1248
|
+
function Me({ value: e, showLabel: t = !1, fulfilledColor: n = !1, className: r = "" }) {
|
|
1234
1249
|
let i = Math.min(100, Math.max(0, e)), a = `${Math.round(i)}%`, o = n && i >= 100 ? "var(--CPureBlue)" : void 0;
|
|
1235
1250
|
return /* @__PURE__ */ d("div", {
|
|
1236
|
-
className: `${
|
|
1251
|
+
className: `${je.wrapper} ${r}`,
|
|
1237
1252
|
role: "progressbar",
|
|
1238
1253
|
"aria-valuenow": i,
|
|
1239
1254
|
"aria-valuemin": 0,
|
|
1240
1255
|
"aria-valuemax": 100,
|
|
1241
1256
|
children: [/* @__PURE__ */ u("div", {
|
|
1242
|
-
className:
|
|
1257
|
+
className: je.track,
|
|
1243
1258
|
children: /* @__PURE__ */ u("div", {
|
|
1244
|
-
className:
|
|
1259
|
+
className: je.fill,
|
|
1245
1260
|
style: {
|
|
1246
1261
|
width: `${i}%`,
|
|
1247
1262
|
backgroundColor: o
|
|
1248
1263
|
}
|
|
1249
1264
|
})
|
|
1250
1265
|
}), t && /* @__PURE__ */ u("span", {
|
|
1251
|
-
className:
|
|
1266
|
+
className: je.label,
|
|
1252
1267
|
"aria-hidden": "true",
|
|
1253
1268
|
children: a
|
|
1254
1269
|
})]
|
|
1255
1270
|
});
|
|
1256
1271
|
}
|
|
1257
|
-
var
|
|
1272
|
+
var Ne = {
|
|
1258
1273
|
chip: "_chip_iaxe0_1",
|
|
1259
1274
|
large: "_large_iaxe0_14"
|
|
1260
1275
|
};
|
|
1261
1276
|
//#endregion
|
|
1262
1277
|
//#region src/components/Chip/Chip.tsx
|
|
1263
|
-
function
|
|
1278
|
+
function Pe({ children: t, color: n, textColor: r, className: i, icon: a, size: o = "default" }) {
|
|
1264
1279
|
let s = {};
|
|
1265
1280
|
return n && (s.backgroundColor = n), r && (s.color = r), /* @__PURE__ */ d("span", {
|
|
1266
1281
|
className: [
|
|
1267
|
-
|
|
1268
|
-
o === "large" &&
|
|
1282
|
+
Ne.chip,
|
|
1283
|
+
o === "large" && Ne.large,
|
|
1269
1284
|
i
|
|
1270
1285
|
].filter(Boolean).join(" "),
|
|
1271
1286
|
style: s,
|
|
@@ -1275,7 +1290,7 @@ function Me({ children: t, color: n, textColor: r, className: i, icon: a, size:
|
|
|
1275
1290
|
}), t]
|
|
1276
1291
|
});
|
|
1277
1292
|
}
|
|
1278
|
-
var
|
|
1293
|
+
var W = {
|
|
1279
1294
|
root: "_root_ok48u_3",
|
|
1280
1295
|
icon: "_icon_ok48u_16",
|
|
1281
1296
|
body: "_body_ok48u_17",
|
|
@@ -1286,63 +1301,63 @@ var G = {
|
|
|
1286
1301
|
success: "_success_ok48u_24",
|
|
1287
1302
|
warning: "_warning_ok48u_25",
|
|
1288
1303
|
destructive: "_destructive_ok48u_26"
|
|
1289
|
-
},
|
|
1304
|
+
}, Fe = {
|
|
1290
1305
|
success: /* @__PURE__ */ u(m, {}),
|
|
1291
1306
|
warning: /* @__PURE__ */ u(w, {}),
|
|
1292
1307
|
destructive: /* @__PURE__ */ u(w, {})
|
|
1293
1308
|
};
|
|
1294
|
-
function
|
|
1309
|
+
function Ie(t) {
|
|
1295
1310
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
1296
1311
|
size: 16,
|
|
1297
1312
|
color: "currentColor"
|
|
1298
1313
|
}) : t;
|
|
1299
1314
|
}
|
|
1300
|
-
var
|
|
1301
|
-
let a = t === void 0 ?
|
|
1315
|
+
var Le = ({ variant: e = "default", icon: t, className: n = "", children: r, role: i }) => {
|
|
1316
|
+
let a = t === void 0 ? Fe[e] : t;
|
|
1302
1317
|
return /* @__PURE__ */ d("div", {
|
|
1303
1318
|
role: i ?? (e === "destructive" || e === "warning" ? "alert" : "status"),
|
|
1304
|
-
className: `${
|
|
1319
|
+
className: `${W.root} ${W[e]} ${n}`,
|
|
1305
1320
|
children: [a && /* @__PURE__ */ u("span", {
|
|
1306
|
-
className:
|
|
1321
|
+
className: W.icon,
|
|
1307
1322
|
"aria-hidden": "true",
|
|
1308
|
-
children:
|
|
1323
|
+
children: Ie(a)
|
|
1309
1324
|
}), /* @__PURE__ */ u("div", {
|
|
1310
|
-
className:
|
|
1325
|
+
className: W.body,
|
|
1311
1326
|
children: r
|
|
1312
1327
|
})]
|
|
1313
1328
|
});
|
|
1314
|
-
},
|
|
1315
|
-
className: `${
|
|
1329
|
+
}, Re = ({ children: e, className: t = "" }) => /* @__PURE__ */ u("div", {
|
|
1330
|
+
className: `${W.title} ${t}`,
|
|
1316
1331
|
children: e
|
|
1317
|
-
}),
|
|
1318
|
-
className: `${
|
|
1332
|
+
}), ze = ({ children: e, className: t = "" }) => /* @__PURE__ */ u("div", {
|
|
1333
|
+
className: `${W.description} ${t}`,
|
|
1319
1334
|
children: e
|
|
1320
|
-
}),
|
|
1321
|
-
root: "
|
|
1322
|
-
main: "
|
|
1323
|
-
aside: "
|
|
1324
|
-
message: "
|
|
1325
|
-
},
|
|
1335
|
+
}), Be = {
|
|
1336
|
+
root: "_root_1aak8_10",
|
|
1337
|
+
main: "_main_1aak8_33",
|
|
1338
|
+
aside: "_aside_1aak8_34",
|
|
1339
|
+
message: "_message_1aak8_41"
|
|
1340
|
+
}, Ve = ({ visible: e = !0, message: t, aside: n, children: r, className: i = "", "aria-label": a = "Unsaved changes" }) => e ? /* @__PURE__ */ d("div", {
|
|
1326
1341
|
role: "region",
|
|
1327
1342
|
"aria-label": a,
|
|
1328
|
-
className: `${
|
|
1343
|
+
className: `${Be.root} ${i}`,
|
|
1329
1344
|
children: [/* @__PURE__ */ d("div", {
|
|
1330
|
-
className:
|
|
1345
|
+
className: Be.main,
|
|
1331
1346
|
children: [r, t && /* @__PURE__ */ u("span", {
|
|
1332
|
-
className:
|
|
1347
|
+
className: Be.message,
|
|
1333
1348
|
children: t
|
|
1334
1349
|
})]
|
|
1335
1350
|
}), n && /* @__PURE__ */ u("div", {
|
|
1336
|
-
className:
|
|
1351
|
+
className: Be.aside,
|
|
1337
1352
|
children: n
|
|
1338
1353
|
})]
|
|
1339
|
-
}) : null,
|
|
1354
|
+
}) : null, He = {
|
|
1340
1355
|
tooltip: "_tooltip_1de7z_1",
|
|
1341
1356
|
arrow: "_arrow_1de7z_13"
|
|
1342
1357
|
};
|
|
1343
1358
|
//#endregion
|
|
1344
1359
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
1345
|
-
function
|
|
1360
|
+
function Ue({ content: e, position: t = "top", children: n, className: r }) {
|
|
1346
1361
|
return /* @__PURE__ */ u(k.Provider, {
|
|
1347
1362
|
delayDuration: 80,
|
|
1348
1363
|
children: /* @__PURE__ */ d(k.Root, { children: [/* @__PURE__ */ u(k.Trigger, {
|
|
@@ -1351,12 +1366,12 @@ function Ve({ content: e, position: t = "top", children: n, className: r }) {
|
|
|
1351
1366
|
}), /* @__PURE__ */ u(k.Portal, { children: /* @__PURE__ */ d(k.Content, {
|
|
1352
1367
|
side: t,
|
|
1353
1368
|
sideOffset: 7,
|
|
1354
|
-
className: [
|
|
1355
|
-
children: [e, /* @__PURE__ */ u(k.Arrow, { className:
|
|
1369
|
+
className: [He.tooltip, r].filter(Boolean).join(" "),
|
|
1370
|
+
children: [e, /* @__PURE__ */ u(k.Arrow, { className: He.arrow })]
|
|
1356
1371
|
}) })] })
|
|
1357
1372
|
});
|
|
1358
1373
|
}
|
|
1359
|
-
var
|
|
1374
|
+
var G = {
|
|
1360
1375
|
wrapper: "_wrapper_1w5vh_1",
|
|
1361
1376
|
chart: "_chart_1w5vh_8",
|
|
1362
1377
|
svg: "_svg_1w5vh_33",
|
|
@@ -1370,11 +1385,11 @@ var K = {
|
|
|
1370
1385
|
legendItem: "_legendItem_1w5vh_90",
|
|
1371
1386
|
legendMark: "_legendMark_1w5vh_96",
|
|
1372
1387
|
legendLabel: "_legendLabel_1w5vh_102"
|
|
1373
|
-
},
|
|
1374
|
-
function
|
|
1388
|
+
}, We = "var(--lv4)", K = 12, Ge = 20, Ke = 8, qe = 28, q = 20;
|
|
1389
|
+
function Je(e) {
|
|
1375
1390
|
return Number.isInteger(e) ? String(e) : e.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
1376
1391
|
}
|
|
1377
|
-
function
|
|
1392
|
+
function Ye({ series: e, labels: t, type: n = "line", height: a = 200, showLegend: o = !0, className: l }) {
|
|
1378
1393
|
let f = s(null), [p, m] = c(0), [h, g] = c(null);
|
|
1379
1394
|
i(() => {
|
|
1380
1395
|
let e = f.current;
|
|
@@ -1382,18 +1397,18 @@ function qe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1382
1397
|
let t = new ResizeObserver(([e]) => m(e.contentRect.width));
|
|
1383
1398
|
return t.observe(e), m(e.clientWidth), () => t.disconnect();
|
|
1384
1399
|
}, []);
|
|
1385
|
-
let _ = t?.length ?
|
|
1400
|
+
let _ = t?.length ? qe : Ke, v = Math.max(p - q - Ge, 0), y = Math.max(a - K - _, 0), b = e.flatMap((e) => e.data.filter(Number.isFinite)), x = b.length ? Math.max(...b, 0) : 1, S = n === "bar" ? 0 : Math.min(...b, 0), C = x - S || 1, w = Math.max(...e.map((e) => e.data.length), 0), T = (e) => K + (1 - (e - S) / C) * y, E = (e) => w <= 1 ? q + v / 2 : q + e / (w - 1) * v, D = r((e) => {
|
|
1386
1401
|
if (w === 0) return;
|
|
1387
1402
|
let t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left, i = e.clientY - t.top;
|
|
1388
1403
|
if (n === "line") {
|
|
1389
|
-
let e = Math.round((r -
|
|
1404
|
+
let e = Math.round((r - q) / v * (w - 1));
|
|
1390
1405
|
g({
|
|
1391
1406
|
index: Math.max(0, Math.min(w - 1, e)),
|
|
1392
1407
|
x: r,
|
|
1393
1408
|
y: i
|
|
1394
1409
|
});
|
|
1395
1410
|
} else {
|
|
1396
|
-
let e = v / w, t = Math.floor((r -
|
|
1411
|
+
let e = v / w, t = Math.floor((r - q) / e);
|
|
1397
1412
|
g({
|
|
1398
1413
|
index: Math.max(0, Math.min(w - 1, t)),
|
|
1399
1414
|
x: r,
|
|
@@ -1405,31 +1420,31 @@ function qe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1405
1420
|
w,
|
|
1406
1421
|
v
|
|
1407
1422
|
]), O = r(() => g(null), []), k = /* @__PURE__ */ u("line", {
|
|
1408
|
-
x1:
|
|
1409
|
-
y1:
|
|
1410
|
-
x2:
|
|
1411
|
-
y2:
|
|
1423
|
+
x1: q,
|
|
1424
|
+
y1: K + y * .5,
|
|
1425
|
+
x2: q + v,
|
|
1426
|
+
y2: K + y * .5,
|
|
1412
1427
|
stroke: "var(--chart-midline)",
|
|
1413
1428
|
strokeWidth: "0.5"
|
|
1414
1429
|
}), A = /* @__PURE__ */ u("line", {
|
|
1415
|
-
x1:
|
|
1416
|
-
y1:
|
|
1417
|
-
x2:
|
|
1418
|
-
y2:
|
|
1430
|
+
x1: q,
|
|
1431
|
+
y1: K + y,
|
|
1432
|
+
x2: q + v,
|
|
1433
|
+
y2: K + y,
|
|
1419
1434
|
stroke: "var(--chart-baseline)",
|
|
1420
1435
|
strokeWidth: "1"
|
|
1421
1436
|
}), j = h && n === "bar" ? (() => {
|
|
1422
1437
|
let e = v / w;
|
|
1423
1438
|
return /* @__PURE__ */ u("rect", {
|
|
1424
|
-
x:
|
|
1425
|
-
y:
|
|
1439
|
+
x: q + h.index * e,
|
|
1440
|
+
y: K,
|
|
1426
1441
|
width: e,
|
|
1427
1442
|
height: y,
|
|
1428
1443
|
fill: "var(--chart-column-hover)"
|
|
1429
1444
|
});
|
|
1430
1445
|
})() : null, M = () => e.map((e, t) => {
|
|
1431
1446
|
if (!e.data.length) return null;
|
|
1432
|
-
let n = e.color ??
|
|
1447
|
+
let n = e.color ?? We;
|
|
1433
1448
|
return /* @__PURE__ */ d("g", { children: [/* @__PURE__ */ u("polyline", {
|
|
1434
1449
|
points: e.data.map((e, t) => `${E(t).toFixed(2)},${T(e).toFixed(2)}`).join(" "),
|
|
1435
1450
|
fill: "none",
|
|
@@ -1449,9 +1464,9 @@ function qe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1449
1464
|
})] }, t);
|
|
1450
1465
|
}), ee = () => {
|
|
1451
1466
|
if (!w) return null;
|
|
1452
|
-
let t = e.length, n = v / w, r = Math.max((n - 2 * (t + 1)) / t, 2), i =
|
|
1467
|
+
let t = e.length, n = v / w, r = Math.max((n - 2 * (t + 1)) / t, 2), i = K + y;
|
|
1453
1468
|
return e.map((e, t) => e.data.map((a, o) => {
|
|
1454
|
-
let s =
|
|
1469
|
+
let s = q + o * n + 2 + t * (r + 2), c = T(a);
|
|
1455
1470
|
return /* @__PURE__ */ u("rect", {
|
|
1456
1471
|
x: s,
|
|
1457
1472
|
y: c,
|
|
@@ -1462,9 +1477,9 @@ function qe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1462
1477
|
}));
|
|
1463
1478
|
}, te = () => {
|
|
1464
1479
|
if (!t?.length) return null;
|
|
1465
|
-
let e =
|
|
1480
|
+
let e = K + y + 18;
|
|
1466
1481
|
return t.map((t, r) => /* @__PURE__ */ u("text", {
|
|
1467
|
-
x: n === "line" ? E(r) :
|
|
1482
|
+
x: n === "line" ? E(r) : q + (r + .5) * (v / w),
|
|
1468
1483
|
y: e,
|
|
1469
1484
|
textAnchor: "middle",
|
|
1470
1485
|
fill: "var(--lv4)",
|
|
@@ -1473,16 +1488,16 @@ function qe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1473
1488
|
}, r));
|
|
1474
1489
|
}, ne = h && n === "line" ? /* @__PURE__ */ u("line", {
|
|
1475
1490
|
x1: E(h.index),
|
|
1476
|
-
y1:
|
|
1491
|
+
y1: K,
|
|
1477
1492
|
x2: E(h.index),
|
|
1478
|
-
y2:
|
|
1493
|
+
y2: K + y,
|
|
1479
1494
|
stroke: "var(--chart-crosshair)",
|
|
1480
1495
|
strokeWidth: "1",
|
|
1481
1496
|
strokeDasharray: "3 3"
|
|
1482
1497
|
}) : null, N = h ? (() => {
|
|
1483
1498
|
let n = t?.[h.index] ?? String(h.index + 1), r = Math.min(Math.max(h.x, 60), p - 60);
|
|
1484
1499
|
return /* @__PURE__ */ d("div", {
|
|
1485
|
-
className:
|
|
1500
|
+
className: G.tooltip,
|
|
1486
1501
|
style: h.y < 80 ? {
|
|
1487
1502
|
left: r,
|
|
1488
1503
|
top: h.y + 12,
|
|
@@ -1493,37 +1508,37 @@ function qe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1493
1508
|
transform: "translate(-50%, -100%)"
|
|
1494
1509
|
},
|
|
1495
1510
|
children: [/* @__PURE__ */ u("div", {
|
|
1496
|
-
className:
|
|
1511
|
+
className: G.tooltipLabel,
|
|
1497
1512
|
children: n
|
|
1498
1513
|
}), e.map((e, t) => /* @__PURE__ */ d("div", {
|
|
1499
|
-
className:
|
|
1514
|
+
className: G.tooltipRow,
|
|
1500
1515
|
children: [
|
|
1501
1516
|
/* @__PURE__ */ u("span", {
|
|
1502
|
-
className:
|
|
1503
|
-
style: { background: e.color ??
|
|
1517
|
+
className: G.tooltipDot,
|
|
1518
|
+
style: { background: e.color ?? We }
|
|
1504
1519
|
}),
|
|
1505
1520
|
/* @__PURE__ */ u("span", {
|
|
1506
|
-
className:
|
|
1521
|
+
className: G.tooltipName,
|
|
1507
1522
|
children: e.label
|
|
1508
1523
|
}),
|
|
1509
1524
|
/* @__PURE__ */ u("span", {
|
|
1510
|
-
className:
|
|
1511
|
-
children:
|
|
1525
|
+
className: G.tooltipValue,
|
|
1526
|
+
children: Je(e.data[h.index] ?? 0)
|
|
1512
1527
|
})
|
|
1513
1528
|
]
|
|
1514
1529
|
}, t))]
|
|
1515
1530
|
});
|
|
1516
1531
|
})() : null;
|
|
1517
1532
|
return /* @__PURE__ */ d("div", {
|
|
1518
|
-
className: [
|
|
1533
|
+
className: [G.wrapper, l].filter(Boolean).join(" "),
|
|
1519
1534
|
children: [/* @__PURE__ */ d("div", {
|
|
1520
1535
|
ref: f,
|
|
1521
|
-
className:
|
|
1536
|
+
className: G.chart,
|
|
1522
1537
|
style: { height: a },
|
|
1523
1538
|
children: [p > 0 && /* @__PURE__ */ d("svg", {
|
|
1524
1539
|
width: p,
|
|
1525
1540
|
height: a,
|
|
1526
|
-
className:
|
|
1541
|
+
className: G.svg,
|
|
1527
1542
|
onMouseMove: D,
|
|
1528
1543
|
onMouseLeave: O,
|
|
1529
1544
|
children: [
|
|
@@ -1536,21 +1551,21 @@ function qe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1536
1551
|
]
|
|
1537
1552
|
}), N]
|
|
1538
1553
|
}), o && e.length > 1 && /* @__PURE__ */ u("div", {
|
|
1539
|
-
className:
|
|
1554
|
+
className: G.legend,
|
|
1540
1555
|
children: e.map((e, t) => /* @__PURE__ */ d("div", {
|
|
1541
|
-
className:
|
|
1556
|
+
className: G.legendItem,
|
|
1542
1557
|
children: [/* @__PURE__ */ u("div", {
|
|
1543
|
-
className:
|
|
1544
|
-
style: { background: e.color ??
|
|
1558
|
+
className: G.legendMark,
|
|
1559
|
+
style: { background: e.color ?? We }
|
|
1545
1560
|
}), /* @__PURE__ */ u("span", {
|
|
1546
|
-
className:
|
|
1561
|
+
className: G.legendLabel,
|
|
1547
1562
|
children: e.label
|
|
1548
1563
|
})]
|
|
1549
1564
|
}, t))
|
|
1550
1565
|
})]
|
|
1551
1566
|
});
|
|
1552
1567
|
}
|
|
1553
|
-
var
|
|
1568
|
+
var J = {
|
|
1554
1569
|
wrapper: "_wrapper_17ws4_1",
|
|
1555
1570
|
label: "_label_17ws4_7",
|
|
1556
1571
|
textarea: "_textarea_17ws4_12",
|
|
@@ -1559,14 +1574,14 @@ var Y = {
|
|
|
1559
1574
|
};
|
|
1560
1575
|
//#endregion
|
|
1561
1576
|
//#region src/components/Textarea/Textarea.tsx
|
|
1562
|
-
function
|
|
1577
|
+
function Xe({ label: t, error: n, className: r = "", isValid: i = !0, id: a, rows: o = 4, ...s }) {
|
|
1563
1578
|
let c = e.useId(), l = a || c, f = `${l}-error`, p = n || !i;
|
|
1564
1579
|
return /* @__PURE__ */ d("div", {
|
|
1565
|
-
className: `${
|
|
1580
|
+
className: `${J.wrapper} ${r}`,
|
|
1566
1581
|
children: [
|
|
1567
1582
|
t && /* @__PURE__ */ d("label", {
|
|
1568
1583
|
htmlFor: l,
|
|
1569
|
-
className:
|
|
1584
|
+
className: J.label,
|
|
1570
1585
|
children: [t, s.required && /* @__PURE__ */ u("span", {
|
|
1571
1586
|
"aria-label": "required",
|
|
1572
1587
|
children: " *"
|
|
@@ -1575,46 +1590,46 @@ function Je({ label: t, error: n, className: r = "", isValid: i = !0, id: a, row
|
|
|
1575
1590
|
/* @__PURE__ */ u("textarea", {
|
|
1576
1591
|
id: l,
|
|
1577
1592
|
rows: o,
|
|
1578
|
-
className: `${
|
|
1593
|
+
className: `${J.textarea} ${p ? J.error : ""}`,
|
|
1579
1594
|
"aria-invalid": p ? "true" : "false",
|
|
1580
1595
|
"aria-describedby": n ? f : void 0,
|
|
1581
1596
|
...s
|
|
1582
1597
|
}),
|
|
1583
1598
|
n && /* @__PURE__ */ u("span", {
|
|
1584
1599
|
id: f,
|
|
1585
|
-
className:
|
|
1600
|
+
className: J.errorText,
|
|
1586
1601
|
role: "alert",
|
|
1587
1602
|
children: n
|
|
1588
1603
|
})
|
|
1589
1604
|
]
|
|
1590
1605
|
});
|
|
1591
1606
|
}
|
|
1592
|
-
var
|
|
1607
|
+
var Y = {
|
|
1593
1608
|
overlay: "_overlay_xud7c_1",
|
|
1594
1609
|
content: "_content_xud7c_8",
|
|
1595
1610
|
title: "_title_xud7c_26",
|
|
1596
1611
|
description: "_description_xud7c_34",
|
|
1597
1612
|
close: "_close_xud7c_40",
|
|
1598
1613
|
srOnly: "_srOnly_xud7c_62"
|
|
1599
|
-
},
|
|
1614
|
+
}, Ze = ({ trigger: e, children: t, open: n, onOpenChange: r, title: i, description: a, className: o = "", showClose: s = !0 }) => /* @__PURE__ */ d(A.Root, {
|
|
1600
1615
|
open: n,
|
|
1601
1616
|
onOpenChange: r,
|
|
1602
1617
|
children: [e && /* @__PURE__ */ u(A.Trigger, {
|
|
1603
1618
|
asChild: !0,
|
|
1604
1619
|
children: e
|
|
1605
|
-
}), /* @__PURE__ */ d(A.Portal, { children: [/* @__PURE__ */ u(A.Overlay, { className:
|
|
1606
|
-
className: `${
|
|
1620
|
+
}), /* @__PURE__ */ d(A.Portal, { children: [/* @__PURE__ */ u(A.Overlay, { className: Y.overlay }), /* @__PURE__ */ d(A.Content, {
|
|
1621
|
+
className: `${Y.content} ${o}`,
|
|
1607
1622
|
children: [
|
|
1608
1623
|
/* @__PURE__ */ u(A.Title, {
|
|
1609
|
-
className: i ?
|
|
1624
|
+
className: i ? Y.title : Y.srOnly,
|
|
1610
1625
|
children: i || "Dialog"
|
|
1611
1626
|
}),
|
|
1612
1627
|
a && /* @__PURE__ */ u(A.Description, {
|
|
1613
|
-
className:
|
|
1628
|
+
className: Y.description,
|
|
1614
1629
|
children: a
|
|
1615
1630
|
}),
|
|
1616
1631
|
s && /* @__PURE__ */ u(A.Close, {
|
|
1617
|
-
className:
|
|
1632
|
+
className: Y.close,
|
|
1618
1633
|
"aria-label": "Close",
|
|
1619
1634
|
children: /* @__PURE__ */ u(T, {
|
|
1620
1635
|
size: 16,
|
|
@@ -1624,7 +1639,7 @@ var X = {
|
|
|
1624
1639
|
t
|
|
1625
1640
|
]
|
|
1626
1641
|
})] })]
|
|
1627
|
-
}),
|
|
1642
|
+
}), X = {
|
|
1628
1643
|
wrapper: "_wrapper_aimna_1",
|
|
1629
1644
|
label: "_label_aimna_7",
|
|
1630
1645
|
trigger: "_trigger_aimna_12",
|
|
@@ -1643,7 +1658,7 @@ var X = {
|
|
|
1643
1658
|
today: "_today_aimna_131",
|
|
1644
1659
|
selected: "_selected_aimna_136",
|
|
1645
1660
|
errorText: "_errorText_aimna_142"
|
|
1646
|
-
},
|
|
1661
|
+
}, Qe = [
|
|
1647
1662
|
"Mo",
|
|
1648
1663
|
"Tu",
|
|
1649
1664
|
"We",
|
|
@@ -1651,7 +1666,7 @@ var X = {
|
|
|
1651
1666
|
"Fr",
|
|
1652
1667
|
"Sa",
|
|
1653
1668
|
"Su"
|
|
1654
|
-
],
|
|
1669
|
+
], $e = [
|
|
1655
1670
|
"January",
|
|
1656
1671
|
"February",
|
|
1657
1672
|
"March",
|
|
@@ -1665,19 +1680,19 @@ var X = {
|
|
|
1665
1680
|
"November",
|
|
1666
1681
|
"December"
|
|
1667
1682
|
];
|
|
1668
|
-
function
|
|
1683
|
+
function Z(e) {
|
|
1669
1684
|
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
1670
1685
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
1671
1686
|
}
|
|
1672
|
-
function
|
|
1687
|
+
function et(e, t) {
|
|
1673
1688
|
return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1674
1689
|
}
|
|
1675
|
-
function
|
|
1690
|
+
function tt(e, t) {
|
|
1676
1691
|
let n = (new Date(e, t, 1).getDay() + 6) % 7, r = [];
|
|
1677
1692
|
for (let i = 0; i < 42; i++) r.push(new Date(e, t, 1 - n + i));
|
|
1678
1693
|
return r;
|
|
1679
1694
|
}
|
|
1680
|
-
var
|
|
1695
|
+
var nt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", error: a, isValid: o = !0, disabled: s = !1, className: l = "", formatDate: f = Z }) => {
|
|
1681
1696
|
let p = e.useId(), m = `${p}-error`, v = !!a || !o, [y, b] = c(!1), x = /* @__PURE__ */ new Date(), S = t ?? x, [C, w] = c(S.getFullYear()), [T, E] = c(S.getMonth()), [D, k] = c(S), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1), M = (e) => {
|
|
1682
1697
|
if (e) {
|
|
1683
1698
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
@@ -1686,7 +1701,7 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1686
1701
|
b(e);
|
|
1687
1702
|
};
|
|
1688
1703
|
e.useEffect(() => {
|
|
1689
|
-
j.current &&= (A.current.get(
|
|
1704
|
+
j.current &&= (A.current.get(Z(D))?.focus(), !1);
|
|
1690
1705
|
}, [D]);
|
|
1691
1706
|
let ee = (e, t) => {
|
|
1692
1707
|
let n = new Date(t), r = {
|
|
@@ -1713,13 +1728,13 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1713
1728
|
T === 11 ? (E(0), w(C + 1)) : E(T + 1);
|
|
1714
1729
|
}, N = (e) => {
|
|
1715
1730
|
n?.(e), b(!1);
|
|
1716
|
-
}, P =
|
|
1731
|
+
}, P = tt(C, T);
|
|
1717
1732
|
return /* @__PURE__ */ d("div", {
|
|
1718
|
-
className: `${
|
|
1733
|
+
className: `${X.wrapper} ${l}`,
|
|
1719
1734
|
children: [
|
|
1720
1735
|
r && /* @__PURE__ */ u("span", {
|
|
1721
1736
|
id: `${p}-label`,
|
|
1722
|
-
className:
|
|
1737
|
+
className: X.label,
|
|
1723
1738
|
children: r
|
|
1724
1739
|
}),
|
|
1725
1740
|
/* @__PURE__ */ d(O.Root, {
|
|
@@ -1729,14 +1744,14 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1729
1744
|
asChild: !0,
|
|
1730
1745
|
children: /* @__PURE__ */ d("button", {
|
|
1731
1746
|
type: "button",
|
|
1732
|
-
className: `${
|
|
1747
|
+
className: `${X.trigger} ${v ? X.error : ""}`,
|
|
1733
1748
|
disabled: s,
|
|
1734
1749
|
"aria-labelledby": r ? `${p}-label ${p}-value` : void 0,
|
|
1735
1750
|
"aria-invalid": v ? "true" : "false",
|
|
1736
1751
|
"aria-describedby": a ? m : void 0,
|
|
1737
1752
|
children: [/* @__PURE__ */ u("span", {
|
|
1738
1753
|
id: `${p}-value`,
|
|
1739
|
-
className: t ?
|
|
1754
|
+
className: t ? X.valueText : X.placeholder,
|
|
1740
1755
|
children: t ? f(t) : i
|
|
1741
1756
|
}), /* @__PURE__ */ u(h, {
|
|
1742
1757
|
size: 14,
|
|
@@ -1744,20 +1759,20 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1744
1759
|
})]
|
|
1745
1760
|
})
|
|
1746
1761
|
}), /* @__PURE__ */ u(O.Portal, { children: /* @__PURE__ */ d(O.Content, {
|
|
1747
|
-
className:
|
|
1762
|
+
className: X.calendar,
|
|
1748
1763
|
align: "start",
|
|
1749
1764
|
sideOffset: 5,
|
|
1750
1765
|
"aria-label": r ? `${r} calendar` : "Choose a date",
|
|
1751
1766
|
onOpenAutoFocus: (e) => {
|
|
1752
|
-
e.preventDefault(), A.current.get(
|
|
1767
|
+
e.preventDefault(), A.current.get(Z(D))?.focus();
|
|
1753
1768
|
},
|
|
1754
1769
|
children: [
|
|
1755
1770
|
/* @__PURE__ */ d("div", {
|
|
1756
|
-
className:
|
|
1771
|
+
className: X.header,
|
|
1757
1772
|
children: [
|
|
1758
1773
|
/* @__PURE__ */ u("button", {
|
|
1759
1774
|
type: "button",
|
|
1760
|
-
className:
|
|
1775
|
+
className: X.navButton,
|
|
1761
1776
|
onClick: te,
|
|
1762
1777
|
"aria-label": "Previous month",
|
|
1763
1778
|
children: /* @__PURE__ */ u(g, {
|
|
@@ -1766,16 +1781,16 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1766
1781
|
})
|
|
1767
1782
|
}),
|
|
1768
1783
|
/* @__PURE__ */ d("span", {
|
|
1769
|
-
className:
|
|
1784
|
+
className: X.monthLabel,
|
|
1770
1785
|
children: [
|
|
1771
|
-
|
|
1786
|
+
$e[T],
|
|
1772
1787
|
" ",
|
|
1773
1788
|
C
|
|
1774
1789
|
]
|
|
1775
1790
|
}),
|
|
1776
1791
|
/* @__PURE__ */ u("button", {
|
|
1777
1792
|
type: "button",
|
|
1778
|
-
className:
|
|
1793
|
+
className: X.navButton,
|
|
1779
1794
|
onClick: ne,
|
|
1780
1795
|
"aria-label": "Next month",
|
|
1781
1796
|
children: /* @__PURE__ */ u(_, {
|
|
@@ -1786,27 +1801,27 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1786
1801
|
]
|
|
1787
1802
|
}),
|
|
1788
1803
|
/* @__PURE__ */ u("div", {
|
|
1789
|
-
className:
|
|
1790
|
-
children:
|
|
1791
|
-
className:
|
|
1804
|
+
className: X.weekdays,
|
|
1805
|
+
children: Qe.map((e) => /* @__PURE__ */ u("span", {
|
|
1806
|
+
className: X.weekday,
|
|
1792
1807
|
children: e
|
|
1793
1808
|
}, e))
|
|
1794
1809
|
}),
|
|
1795
1810
|
/* @__PURE__ */ u("div", {
|
|
1796
|
-
className:
|
|
1811
|
+
className: X.grid,
|
|
1797
1812
|
children: P.map((e) => {
|
|
1798
|
-
let n = e.getMonth() !== T, r =
|
|
1813
|
+
let n = e.getMonth() !== T, r = et(e, t), i = et(e, x);
|
|
1799
1814
|
return /* @__PURE__ */ u("button", {
|
|
1800
1815
|
type: "button",
|
|
1801
1816
|
className: [
|
|
1802
|
-
|
|
1803
|
-
n ?
|
|
1804
|
-
r ?
|
|
1805
|
-
i && !r ?
|
|
1817
|
+
X.day,
|
|
1818
|
+
n ? X.outside : "",
|
|
1819
|
+
r ? X.selected : "",
|
|
1820
|
+
i && !r ? X.today : ""
|
|
1806
1821
|
].filter(Boolean).join(" "),
|
|
1807
1822
|
onClick: () => N(e),
|
|
1808
1823
|
ref: (t) => {
|
|
1809
|
-
t ? A.current.set(
|
|
1824
|
+
t ? A.current.set(Z(e), t) : A.current.delete(Z(e));
|
|
1810
1825
|
},
|
|
1811
1826
|
"aria-label": e.toLocaleDateString(void 0, {
|
|
1812
1827
|
weekday: "long",
|
|
@@ -1816,7 +1831,7 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1816
1831
|
}),
|
|
1817
1832
|
"aria-pressed": r,
|
|
1818
1833
|
"aria-current": i ? "date" : void 0,
|
|
1819
|
-
tabIndex:
|
|
1834
|
+
tabIndex: et(e, D) || D.getMonth() !== T && e.getDate() === 1 && !n ? 0 : -1,
|
|
1820
1835
|
onKeyDown: (t) => ee(t, e),
|
|
1821
1836
|
children: e.getDate()
|
|
1822
1837
|
}, e.toISOString());
|
|
@@ -1827,7 +1842,7 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1827
1842
|
}),
|
|
1828
1843
|
a && /* @__PURE__ */ u("span", {
|
|
1829
1844
|
id: m,
|
|
1830
|
-
className:
|
|
1845
|
+
className: X.errorText,
|
|
1831
1846
|
role: "alert",
|
|
1832
1847
|
children: a
|
|
1833
1848
|
})
|
|
@@ -1849,13 +1864,13 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1849
1864
|
panelTrigger: "_panelTrigger_biiv1_77",
|
|
1850
1865
|
viewport: "_viewport_biiv1_60",
|
|
1851
1866
|
content: "_content_biiv1_110"
|
|
1852
|
-
},
|
|
1867
|
+
}, rt = {
|
|
1853
1868
|
micro: 14,
|
|
1854
1869
|
default: 14,
|
|
1855
1870
|
large: 21
|
|
1856
|
-
},
|
|
1871
|
+
}, it = e.createContext("default"), at = typeof window > "u" ? e.useEffect : e.useLayoutEffect, ot = e.forwardRef(({ size: t = "default", align: n = "start", panelAlign: r = "trigger", panelWidth: i, className: a = "", style: o, children: s, "aria-label": c = "Main navigation", ...l }, f) => {
|
|
1857
1872
|
let p = e.useRef(null), m = e.useRef(!1);
|
|
1858
|
-
|
|
1873
|
+
at(() => {
|
|
1859
1874
|
let e = p.current;
|
|
1860
1875
|
if (!e || r !== "trigger") return;
|
|
1861
1876
|
let t = () => {
|
|
@@ -1885,7 +1900,7 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1885
1900
|
...o,
|
|
1886
1901
|
...i === void 0 ? {} : { "--panel-width": typeof i == "number" ? `${i}px` : i }
|
|
1887
1902
|
}, g = r === "trigger" ? Q.panelTrigger : r === "end" ? Q.alignEnd : "";
|
|
1888
|
-
return /* @__PURE__ */ u(
|
|
1903
|
+
return /* @__PURE__ */ u(it.Provider, {
|
|
1889
1904
|
value: t,
|
|
1890
1905
|
children: /* @__PURE__ */ d(j.Root, {
|
|
1891
1906
|
...l,
|
|
@@ -1902,59 +1917,59 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1902
1917
|
})
|
|
1903
1918
|
});
|
|
1904
1919
|
});
|
|
1905
|
-
|
|
1906
|
-
var
|
|
1920
|
+
ot.displayName = "NavigationMenu";
|
|
1921
|
+
var st = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ u(j.List, {
|
|
1907
1922
|
...t,
|
|
1908
1923
|
ref: n,
|
|
1909
1924
|
className: `${Q.list} ${e}`
|
|
1910
1925
|
}));
|
|
1911
|
-
|
|
1912
|
-
var
|
|
1913
|
-
function
|
|
1914
|
-
let n = e.useContext(
|
|
1926
|
+
st.displayName = "NavigationMenuList";
|
|
1927
|
+
var ct = j.Item;
|
|
1928
|
+
function lt({ icon: t }) {
|
|
1929
|
+
let n = e.useContext(it);
|
|
1915
1930
|
return t ? /* @__PURE__ */ u("span", {
|
|
1916
1931
|
className: Q.icon,
|
|
1917
1932
|
"aria-hidden": "true",
|
|
1918
1933
|
children: e.cloneElement(t, {
|
|
1919
|
-
size:
|
|
1934
|
+
size: rt[n],
|
|
1920
1935
|
color: "currentColor"
|
|
1921
1936
|
})
|
|
1922
1937
|
}) : null;
|
|
1923
1938
|
}
|
|
1924
|
-
var
|
|
1925
|
-
let o = e.useContext(
|
|
1939
|
+
var ut = e.forwardRef(({ className: t = "", icon: n, children: r, ...i }, a) => {
|
|
1940
|
+
let o = e.useContext(it);
|
|
1926
1941
|
return /* @__PURE__ */ d(j.Trigger, {
|
|
1927
1942
|
...i,
|
|
1928
1943
|
ref: a,
|
|
1929
1944
|
className: `${Q.control} ${t}`,
|
|
1930
1945
|
children: [
|
|
1931
|
-
/* @__PURE__ */ u(
|
|
1946
|
+
/* @__PURE__ */ u(lt, { icon: n }),
|
|
1932
1947
|
r,
|
|
1933
1948
|
/* @__PURE__ */ u("span", {
|
|
1934
1949
|
className: Q.caret,
|
|
1935
1950
|
"aria-hidden": "true",
|
|
1936
1951
|
children: /* @__PURE__ */ u(h, {
|
|
1937
|
-
size:
|
|
1952
|
+
size: rt[o],
|
|
1938
1953
|
color: "currentColor"
|
|
1939
1954
|
})
|
|
1940
1955
|
})
|
|
1941
1956
|
]
|
|
1942
1957
|
});
|
|
1943
1958
|
});
|
|
1944
|
-
|
|
1945
|
-
var
|
|
1959
|
+
ut.displayName = "NavigationMenuTrigger";
|
|
1960
|
+
var dt = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ u(j.Content, {
|
|
1946
1961
|
...t,
|
|
1947
1962
|
ref: n,
|
|
1948
1963
|
className: `${Q.content} ${e}`
|
|
1949
1964
|
}));
|
|
1950
|
-
|
|
1951
|
-
var
|
|
1965
|
+
dt.displayName = "NavigationMenuContent";
|
|
1966
|
+
var ft = e.forwardRef(({ variant: e = "panel", icon: t, className: n = "", children: r, ...i }, a) => /* @__PURE__ */ u(j.Link, {
|
|
1952
1967
|
...i,
|
|
1953
1968
|
ref: a,
|
|
1954
1969
|
className: `${e === "navigation" ? Q.control : Q.link} ${n}`,
|
|
1955
|
-
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(
|
|
1970
|
+
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(lt, { icon: t }), r] }) : r
|
|
1956
1971
|
}));
|
|
1957
|
-
|
|
1972
|
+
ft.displayName = "NavigationMenuLink";
|
|
1958
1973
|
var $ = {
|
|
1959
1974
|
panel: "_panel_1hiss_6",
|
|
1960
1975
|
header: "_header_1hiss_14",
|
|
@@ -1986,18 +2001,18 @@ var $ = {
|
|
|
1986
2001
|
};
|
|
1987
2002
|
//#endregion
|
|
1988
2003
|
//#region src/components/Chat/ChatPanel.tsx
|
|
1989
|
-
function
|
|
2004
|
+
function pt({ children: e }) {
|
|
1990
2005
|
return /* @__PURE__ */ u("kbd", {
|
|
1991
2006
|
className: $.kbd,
|
|
1992
2007
|
children: e
|
|
1993
2008
|
});
|
|
1994
2009
|
}
|
|
1995
|
-
var
|
|
1996
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1997
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1998
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
2010
|
+
var mt = /* @__PURE__ */ d(l, { children: [
|
|
2011
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(pt, { children: "↵" }), " send"] }),
|
|
2012
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(pt, { children: "⇧↵" }), " new line"] }),
|
|
2013
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(pt, { children: "esc" }), " close"] })
|
|
1999
2014
|
] });
|
|
2000
|
-
function
|
|
2015
|
+
function ht({ header: e, children: t, composer: n, hints: r = mt, className: i = "", threadRef: a, "aria-label": o }) {
|
|
2001
2016
|
return /* @__PURE__ */ d("div", {
|
|
2002
2017
|
className: `${$.panel} ${i}`,
|
|
2003
2018
|
"aria-label": o,
|
|
@@ -2026,7 +2041,7 @@ function mt({ header: e, children: t, composer: n, hints: r = pt, className: i =
|
|
|
2026
2041
|
}
|
|
2027
2042
|
//#endregion
|
|
2028
2043
|
//#region src/components/Chat/Message.tsx
|
|
2029
|
-
function
|
|
2044
|
+
function gt({ children: e, className: t = "" }) {
|
|
2030
2045
|
return /* @__PURE__ */ u("div", {
|
|
2031
2046
|
className: $.userRow,
|
|
2032
2047
|
children: /* @__PURE__ */ u("div", {
|
|
@@ -2035,7 +2050,7 @@ function ht({ children: e, className: t = "" }) {
|
|
|
2035
2050
|
})
|
|
2036
2051
|
});
|
|
2037
2052
|
}
|
|
2038
|
-
function
|
|
2053
|
+
function _t({ label: e = "Assistant", icon: t, children: n, className: r = "" }) {
|
|
2039
2054
|
return /* @__PURE__ */ d("div", {
|
|
2040
2055
|
className: `${$.assistant} ${r}`,
|
|
2041
2056
|
children: [/* @__PURE__ */ d("div", {
|
|
@@ -2052,13 +2067,13 @@ function gt({ label: e = "Assistant", icon: t, children: n, className: r = "" })
|
|
|
2052
2067
|
}
|
|
2053
2068
|
//#endregion
|
|
2054
2069
|
//#region src/components/Chat/Composer.tsx
|
|
2055
|
-
var
|
|
2070
|
+
var vt = 18, yt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onStop: a, streaming: c = !1, placeholder: l = "Ask a question…", disabled: m = !1, autoFocus: h = !1, icon: g, maxLines: _ = 6, className: v = "", "aria-label": y = "Message" }, b) {
|
|
2056
2071
|
let x = s(null);
|
|
2057
2072
|
o(b, () => ({ focus: () => x.current?.focus() }), []), i(() => {
|
|
2058
2073
|
let e = x.current;
|
|
2059
2074
|
if (!e) return;
|
|
2060
2075
|
e.style.height = "auto";
|
|
2061
|
-
let t =
|
|
2076
|
+
let t = vt * _ + 12;
|
|
2062
2077
|
e.style.height = `${Math.min(e.scrollHeight, t)}px`;
|
|
2063
2078
|
}, [e, _]);
|
|
2064
2079
|
let S = !c && !m && e.trim().length > 0, w = r(() => {
|
|
@@ -2114,7 +2129,7 @@ var _t = 18, vt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
2114
2129
|
});
|
|
2115
2130
|
//#endregion
|
|
2116
2131
|
//#region src/components/Chat/Citation.tsx
|
|
2117
|
-
function
|
|
2132
|
+
function bt({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
2118
2133
|
let a = `${$.ref} ${i}`;
|
|
2119
2134
|
return t ? /* @__PURE__ */ u("a", {
|
|
2120
2135
|
href: t,
|
|
@@ -2132,7 +2147,7 @@ function yt({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
|
2132
2147
|
children: e
|
|
2133
2148
|
});
|
|
2134
2149
|
}
|
|
2135
|
-
function
|
|
2150
|
+
function xt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
2136
2151
|
return e.length === 0 ? null : /* @__PURE__ */ d("div", {
|
|
2137
2152
|
className: `${$.stack} ${n}`,
|
|
2138
2153
|
children: [/* @__PURE__ */ u("div", {
|
|
@@ -2141,7 +2156,7 @@ function bt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
2141
2156
|
}), /* @__PURE__ */ u("div", {
|
|
2142
2157
|
className: $.wrap,
|
|
2143
2158
|
children: e.map((e) => {
|
|
2144
|
-
let t = /* @__PURE__ */ d(
|
|
2159
|
+
let t = /* @__PURE__ */ d(Pe, {
|
|
2145
2160
|
icon: e.icon,
|
|
2146
2161
|
children: [
|
|
2147
2162
|
/* @__PURE__ */ u("span", {
|
|
@@ -2169,7 +2184,7 @@ function bt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
2169
2184
|
}
|
|
2170
2185
|
//#endregion
|
|
2171
2186
|
//#region src/components/Chat/StreamStatus.tsx
|
|
2172
|
-
function
|
|
2187
|
+
function St({ children: e, className: t = "" }) {
|
|
2173
2188
|
return /* @__PURE__ */ d("div", {
|
|
2174
2189
|
className: `${$.status} ${t}`,
|
|
2175
2190
|
role: "status",
|
|
@@ -2181,7 +2196,7 @@ function xt({ children: e, className: t = "" }) {
|
|
|
2181
2196
|
}
|
|
2182
2197
|
//#endregion
|
|
2183
2198
|
//#region src/components/Chat/Suggestions.tsx
|
|
2184
|
-
function
|
|
2199
|
+
function Ct({ items: e, onPick: t, label: n = "Try asking", className: r = "" }) {
|
|
2185
2200
|
return /* @__PURE__ */ d("div", {
|
|
2186
2201
|
className: `${$.suggestions} ${r}`,
|
|
2187
2202
|
children: [/* @__PURE__ */ u("div", {
|
|
@@ -2200,7 +2215,7 @@ function St({ items: e, onPick: t, label: n = "Try asking", className: r = "" })
|
|
|
2200
2215
|
}
|
|
2201
2216
|
//#endregion
|
|
2202
2217
|
//#region src/components/Chat/AnswerActions.tsx
|
|
2203
|
-
function
|
|
2218
|
+
function wt({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask a follow-up", className: i = "" }) {
|
|
2204
2219
|
return /* @__PURE__ */ d("div", {
|
|
2205
2220
|
className: `${$.actions} ${i}`,
|
|
2206
2221
|
children: [
|
|
@@ -2222,21 +2237,21 @@ function Ct({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask
|
|
|
2222
2237
|
]
|
|
2223
2238
|
});
|
|
2224
2239
|
}
|
|
2225
|
-
var
|
|
2240
|
+
var Tt = {
|
|
2226
2241
|
truncate: "_truncate_za4sm_1",
|
|
2227
2242
|
start: "_start_za4sm_13"
|
|
2228
2243
|
};
|
|
2229
2244
|
//#endregion
|
|
2230
2245
|
//#region src/components/Truncate/Truncate.tsx
|
|
2231
|
-
function
|
|
2246
|
+
function Et({ children: e, side: t = "end", title: n, className: r = "" }) {
|
|
2232
2247
|
let i = n ?? (typeof e == "string" ? e : void 0);
|
|
2233
2248
|
return /* @__PURE__ */ u("span", {
|
|
2234
|
-
className: `${
|
|
2249
|
+
className: `${Tt.truncate} ${t === "start" ? Tt.start : ""} ${r}`,
|
|
2235
2250
|
title: i,
|
|
2236
2251
|
children: t === "start" ? /* @__PURE__ */ u("bdi", { children: e }) : e
|
|
2237
2252
|
});
|
|
2238
2253
|
}
|
|
2239
|
-
var
|
|
2254
|
+
var Dt = {
|
|
2240
2255
|
disclosure: "_disclosure_94bgy_1",
|
|
2241
2256
|
trigger: "_trigger_94bgy_7",
|
|
2242
2257
|
summary: "_summary_94bgy_31",
|
|
@@ -2245,24 +2260,24 @@ var Et = {
|
|
|
2245
2260
|
};
|
|
2246
2261
|
//#endregion
|
|
2247
2262
|
//#region src/components/Disclosure/Disclosure.tsx
|
|
2248
|
-
function
|
|
2263
|
+
function Ot({ summary: t, children: n, open: r, defaultOpen: i = !1, onOpenChange: a, className: o = "" }) {
|
|
2249
2264
|
let [s, c] = e.useState(i), l = r ?? s, f = e.useId();
|
|
2250
2265
|
return /* @__PURE__ */ d("div", {
|
|
2251
|
-
className: `${
|
|
2266
|
+
className: `${Dt.disclosure} ${o}`,
|
|
2252
2267
|
"data-state": l ? "open" : "closed",
|
|
2253
2268
|
children: [/* @__PURE__ */ d("button", {
|
|
2254
2269
|
type: "button",
|
|
2255
|
-
className:
|
|
2270
|
+
className: Dt.trigger,
|
|
2256
2271
|
"aria-expanded": l,
|
|
2257
2272
|
"aria-controls": l ? f : void 0,
|
|
2258
2273
|
onClick: () => {
|
|
2259
2274
|
r === void 0 && c(!l), a?.(!l);
|
|
2260
2275
|
},
|
|
2261
2276
|
children: [/* @__PURE__ */ u("span", {
|
|
2262
|
-
className:
|
|
2277
|
+
className: Dt.summary,
|
|
2263
2278
|
children: t
|
|
2264
2279
|
}), /* @__PURE__ */ u("span", {
|
|
2265
|
-
className:
|
|
2280
|
+
className: Dt.chevron,
|
|
2266
2281
|
"aria-hidden": "true",
|
|
2267
2282
|
children: u(l ? h : _, {
|
|
2268
2283
|
size: 14,
|
|
@@ -2271,10 +2286,10 @@ function Dt({ summary: t, children: n, open: r, defaultOpen: i = !1, onOpenChang
|
|
|
2271
2286
|
})]
|
|
2272
2287
|
}), l && /* @__PURE__ */ u("div", {
|
|
2273
2288
|
id: f,
|
|
2274
|
-
className:
|
|
2289
|
+
className: Dt.content,
|
|
2275
2290
|
children: n
|
|
2276
2291
|
})]
|
|
2277
2292
|
});
|
|
2278
2293
|
}
|
|
2279
2294
|
//#endregion
|
|
2280
|
-
export {
|
|
2295
|
+
export { Le as Alert, ze as AlertDescription, Re as AlertTitle, wt as AnswerActions, _t as AssistantMessage, ae as Base, Ae as Breadcrumbs, P as Button, Ye as Chart, ht as ChatPanel, re as Checkbox, Pe as Chip, xt as CitationList, bt as CitationRef, yt as Composer, nt as DatePicker, Ot as Disclosure, oe as FilterPanelBase, le as InputField, pt as Kbd, Ze as Modal, ot as NavigationMenu, dt as NavigationMenuContent, ct as NavigationMenuItem, ft as NavigationMenuLink, st as NavigationMenuList, ut as NavigationMenuTrigger, ve as Popover, Me as ProgressBar, de as RadioButton, Ve as SaveBar, ce as SearchField, ge as Select, he as Slider, N as Spinner, St as StreamStatus, Ct as Suggestions, ye as Table, Se as TableCell, be as TableHeader, we as TableIcon, xe as TableRow, Ce as TableValue, De as Tabs, Xe as Textarea, pe as ToggleSwitch, Ue as Tooltip, Et as Truncate, gt as UserMessage, mt as defaultChatHints, ne as spinnerNames };
|