@dinofront/design_system 1.20.4 → 1.20.6
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/index.js +635 -627
- package/dist/index.js.map +1 -1
- package/dist/styles.css +0 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -661,11 +661,15 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
661
661
|
info: "bg-blue-600 text-white",
|
|
662
662
|
privacy: "bg-purple-500 text-white"
|
|
663
663
|
}, Pt = {
|
|
664
|
+
filled: jt,
|
|
665
|
+
outline: Mt,
|
|
666
|
+
accent: Nt
|
|
667
|
+
}, Ft = {
|
|
664
668
|
filled: "hover:brightness-95 active:brightness-90",
|
|
665
669
|
outline: "hover:bg-bg-subtle active:bg-bg-container",
|
|
666
670
|
accent: "hover:brightness-90 active:brightness-80"
|
|
667
|
-
},
|
|
668
|
-
let v =
|
|
671
|
+
}, It = a(function({ variant: e = "neutral", appearance: t = "filled", size: n = "md", shape: r = "rounded", leftIcon: i, rightIcon: a, onDismiss: o, dot: s = !1, withDot: c = !1, disabled: l = !1, interactive: u = !1, className: d, children: f, dataTestId: p, onClick: m, onKeyDown: h, ...g }, _) {
|
|
672
|
+
let v = Pt[t][e];
|
|
669
673
|
if (s) return /* @__PURE__ */ G("span", {
|
|
670
674
|
ref: _,
|
|
671
675
|
"data-test-id": p,
|
|
@@ -674,7 +678,9 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
674
678
|
className: X("inline-block shrink-0 rounded-full", kt[n], Nt[e], l && "opacity-50", d),
|
|
675
679
|
...g
|
|
676
680
|
});
|
|
677
|
-
let y = f == null && !c && !!(i || a), b = r === "pill" ? "rounded-full" : Ot[n]
|
|
681
|
+
let y = f == null && !c && !!(i || a), b = r === "pill" ? "rounded-full" : Ot[n], x = (e) => {
|
|
682
|
+
h?.(e), !(l || !m) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m(e));
|
|
683
|
+
}, S = Z(p);
|
|
678
684
|
return /* @__PURE__ */ K("span", {
|
|
679
685
|
ref: _,
|
|
680
686
|
"data-test-id": p,
|
|
@@ -682,10 +688,8 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
682
688
|
tabIndex: u && !l ? 0 : void 0,
|
|
683
689
|
"aria-disabled": u && l ? !0 : void 0,
|
|
684
690
|
onClick: l ? void 0 : m,
|
|
685
|
-
onKeyDown: u ?
|
|
686
|
-
|
|
687
|
-
} : h,
|
|
688
|
-
className: X("inline-flex items-center font-medium whitespace-nowrap select-none", Dt[n], b, v, y && At[n], u && !l && X("cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", Pt[t]), l && "opacity-50 cursor-not-allowed pointer-events-none", d),
|
|
691
|
+
onKeyDown: u ? x : h,
|
|
692
|
+
className: X("inline-flex items-center font-medium whitespace-nowrap select-none", Dt[n], b, v, y && At[n], u && !l && X("cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", Ft[t]), l && "opacity-50 cursor-not-allowed pointer-events-none", d),
|
|
689
693
|
...g,
|
|
690
694
|
children: [
|
|
691
695
|
c ? /* @__PURE__ */ G("span", {
|
|
@@ -702,6 +706,7 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
702
706
|
}),
|
|
703
707
|
o && /* @__PURE__ */ G("button", {
|
|
704
708
|
type: "button",
|
|
709
|
+
"data-test-id": S("dismiss_button"),
|
|
705
710
|
onClick: o,
|
|
706
711
|
disabled: l,
|
|
707
712
|
"aria-label": "Dismiss",
|
|
@@ -710,16 +715,16 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
710
715
|
})
|
|
711
716
|
]
|
|
712
717
|
});
|
|
713
|
-
}),
|
|
718
|
+
}), Lt = {
|
|
714
719
|
md: "text-p-sm",
|
|
715
720
|
sm: "text-p-xs"
|
|
716
|
-
},
|
|
721
|
+
}, Rt = "rounded-sm text-fg-tertiary transition-colors hover:text-fg-secondary outline-none focus-visible:ring-2 focus-visible:ring-brand-300", zt = a(function({ items: e, currentValue: n, onSelect: r, separator: i = "/", size: a = "md", className: o, dataTestId: s, ...c }, l) {
|
|
717
722
|
let u = n ?? e[e.length - 1]?.value;
|
|
718
723
|
return /* @__PURE__ */ G("nav", {
|
|
719
724
|
ref: l,
|
|
720
725
|
"aria-label": "Breadcrumb",
|
|
721
726
|
"data-test-id": s,
|
|
722
|
-
className: X(
|
|
727
|
+
className: X(Lt[a], o),
|
|
723
728
|
...c,
|
|
724
729
|
children: /* @__PURE__ */ G("ol", {
|
|
725
730
|
className: "flex items-center",
|
|
@@ -741,74 +746,74 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
741
746
|
}) : e.href ? /* @__PURE__ */ G("a", {
|
|
742
747
|
href: e.href,
|
|
743
748
|
onClick: () => r?.(e.value),
|
|
744
|
-
className:
|
|
749
|
+
className: Rt,
|
|
745
750
|
children: e.label
|
|
746
751
|
}) : /* @__PURE__ */ G("button", {
|
|
747
752
|
type: "button",
|
|
748
753
|
onClick: () => r?.(e.value),
|
|
749
|
-
className:
|
|
754
|
+
className: Rt,
|
|
750
755
|
children: e.label
|
|
751
756
|
})
|
|
752
757
|
})] }, e.value);
|
|
753
758
|
})
|
|
754
759
|
})
|
|
755
760
|
});
|
|
756
|
-
}),
|
|
761
|
+
}), Bt = {
|
|
757
762
|
horizontal: "flex-row [&>*]:rounded-none [&>*:first-child]:rounded-l-lg [&>*:last-child]:rounded-r-lg [&>*:not(:first-child)]:-ml-px",
|
|
758
763
|
vertical: "flex-col [&>*]:rounded-none [&>*:first-child]:rounded-t-lg [&>*:last-child]:rounded-b-lg [&>*:not(:first-child)]:-mt-px"
|
|
759
|
-
},
|
|
764
|
+
}, Vt = a(function({ orientation: e = "horizontal", className: t, children: n, dataTestId: r, ...i }, a) {
|
|
760
765
|
return /* @__PURE__ */ G("div", {
|
|
761
766
|
ref: a,
|
|
762
767
|
role: "group",
|
|
763
768
|
"data-test-id": r,
|
|
764
|
-
className: X("inline-flex isolate",
|
|
769
|
+
className: X("inline-flex isolate", Bt[e], "[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10", t),
|
|
765
770
|
...i,
|
|
766
771
|
children: n
|
|
767
772
|
});
|
|
768
|
-
}),
|
|
773
|
+
}), Ht = {
|
|
769
774
|
elevated: "bg-bg-default border border-border-default shadow-z1",
|
|
770
775
|
outlined: "bg-bg-default border border-border-default",
|
|
771
776
|
filled: "bg-bg-container border border-transparent"
|
|
772
|
-
},
|
|
777
|
+
}, Ut = {
|
|
773
778
|
none: "p-0",
|
|
774
779
|
sm: "p-4",
|
|
775
780
|
md: "p-5",
|
|
776
781
|
lg: "p-6"
|
|
777
|
-
},
|
|
782
|
+
}, Wt = a(function({ variant: e = "outlined", padding: t = "md", header: n, footer: r, interactive: i = !1, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
778
783
|
let u = n || r;
|
|
779
784
|
return /* @__PURE__ */ K("div", {
|
|
780
785
|
ref: l,
|
|
781
786
|
"data-test-id": s,
|
|
782
|
-
className: X("rounded-xl overflow-hidden",
|
|
787
|
+
className: X("rounded-xl overflow-hidden", Ht[e], i && "transition-all hover:border-brand-500 hover:shadow-z2", !u && Ut[t], a),
|
|
783
788
|
...c,
|
|
784
789
|
children: [
|
|
785
790
|
n && /* @__PURE__ */ G("div", {
|
|
786
|
-
className: X("border-b border-border-subtle",
|
|
791
|
+
className: X("border-b border-border-subtle", Ut[t]),
|
|
787
792
|
children: n
|
|
788
793
|
}),
|
|
789
794
|
u ? /* @__PURE__ */ G("div", {
|
|
790
|
-
className:
|
|
795
|
+
className: Ut[t],
|
|
791
796
|
children: o
|
|
792
797
|
}) : o,
|
|
793
798
|
r && /* @__PURE__ */ G("div", {
|
|
794
|
-
className: X("border-t border-border-subtle",
|
|
799
|
+
className: X("border-t border-border-subtle", Ut[t]),
|
|
795
800
|
children: r
|
|
796
801
|
})
|
|
797
802
|
]
|
|
798
803
|
});
|
|
799
|
-
}),
|
|
804
|
+
}), Gt = {
|
|
800
805
|
brand: "bg-bg-brand-lighter text-brand-800",
|
|
801
806
|
blue: "bg-bg-info-lighter text-blue-800",
|
|
802
807
|
purple: "bg-purple-50 text-purple-800 dark:bg-purple-900/30 dark:text-purple-200",
|
|
803
808
|
pink: "bg-pink-50 text-pink-800 dark:bg-pink-900/30 dark:text-pink-200",
|
|
804
809
|
yellow: "bg-bg-warning-lighter text-yellow-900",
|
|
805
810
|
gray: "bg-bg-subtle text-fg-secondary"
|
|
806
|
-
},
|
|
811
|
+
}, Kt = a(function({ title: e, header: t, children: n, noDivider: r = !1, className: i, dataTestId: a, ...o }, s) {
|
|
807
812
|
let c = e?.placement ?? "left", l = !!e && c !== "top", u = e && /* @__PURE__ */ G("div", {
|
|
808
|
-
className: X("flex shrink-0 items-center justify-center text-center text-label-md font-bold", l ? X("px-2 [writing-mode:vertical-rl]", c === "left" && "rotate-180") : "px-4 py-2",
|
|
813
|
+
className: X("flex shrink-0 items-center justify-center text-center text-label-md font-bold", l ? X("px-2 [writing-mode:vertical-rl]", c === "left" && "rotate-180") : "px-4 py-2", Gt[e.color ?? "gray"]),
|
|
809
814
|
children: e.text
|
|
810
815
|
});
|
|
811
|
-
return /* @__PURE__ */ G(
|
|
816
|
+
return /* @__PURE__ */ G(Wt, {
|
|
812
817
|
ref: s,
|
|
813
818
|
dataTestId: a,
|
|
814
819
|
variant: "outlined",
|
|
@@ -823,13 +828,13 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
823
828
|
})]
|
|
824
829
|
})
|
|
825
830
|
});
|
|
826
|
-
}),
|
|
831
|
+
}), qt = {
|
|
827
832
|
md: "h-5 w-5 rounded-sm",
|
|
828
833
|
sm: "h-4 w-4 rounded-sm"
|
|
829
|
-
},
|
|
834
|
+
}, Jt = {
|
|
830
835
|
md: "h-3.5 w-3.5",
|
|
831
836
|
sm: "h-3 w-3"
|
|
832
|
-
},
|
|
837
|
+
}, Yt = a(function({ size: e = "md", label: t, description: n, errorText: r, required: i, indeterminate: a = !1, error: o = !1, id: s, disabled: c, checked: l, defaultChecked: d, className: f, dataTestId: p, ...m }, h) {
|
|
833
838
|
let g = u(), _ = s ?? g, v = o || !!r, y = r ? `${_}-error` : void 0, x = Z(p);
|
|
834
839
|
return /* @__PURE__ */ K("label", {
|
|
835
840
|
htmlFor: _,
|
|
@@ -853,9 +858,9 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
853
858
|
"data-test-id": x("input"),
|
|
854
859
|
...m
|
|
855
860
|
}), /* @__PURE__ */ G("span", {
|
|
856
|
-
className: X("flex items-center justify-center border transition-colors",
|
|
861
|
+
className: X("flex items-center justify-center border transition-colors", qt[e], !a && "bg-bg-default", v ? "border-red-600" : a ? "border-brand-500" : "border-border-strong", !c && !a && (v ? "peer-hover:border-red-700" : "peer-hover:border-fg-tertiary"), "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", !a && "peer-checked:bg-brand-500 peer-checked:border-brand-500", a && "bg-brand-500", c && !a && "peer-checked:bg-bg-subtle peer-checked:border-border-strong", !a && "[&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100 [&_svg]:transition-opacity"),
|
|
857
862
|
children: G(a ? L : b, {
|
|
858
|
-
className: X(
|
|
863
|
+
className: X(Jt[e], "text-white"),
|
|
859
864
|
strokeWidth: 3,
|
|
860
865
|
"aria-hidden": !0
|
|
861
866
|
})
|
|
@@ -878,21 +883,21 @@ var Tt = a(function({ src: e, alt: t, name: n, size: r = "md", status: i, shape:
|
|
|
878
883
|
});
|
|
879
884
|
//#endregion
|
|
880
885
|
//#region src/lib/mergeRefs.ts
|
|
881
|
-
function
|
|
886
|
+
function Xt(...e) {
|
|
882
887
|
return (t) => {
|
|
883
888
|
for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
|
|
884
889
|
};
|
|
885
890
|
}
|
|
886
891
|
//#endregion
|
|
887
892
|
//#region src/lib/PortalContext.tsx
|
|
888
|
-
var
|
|
889
|
-
function
|
|
890
|
-
return c(
|
|
893
|
+
var Zt = r(null);
|
|
894
|
+
function Qt() {
|
|
895
|
+
return c(Zt) ?? (typeof document > "u" ? null : document.body);
|
|
891
896
|
}
|
|
892
897
|
//#endregion
|
|
893
898
|
//#region src/lib/useFloatingPosition.ts
|
|
894
|
-
var
|
|
895
|
-
function
|
|
899
|
+
var $t = 8, en = 10;
|
|
900
|
+
function tn({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center", offset: a = 8, flip: o = !0, shift: s = !0, matchAnchorWidth: c = !1, recomputeKey: l }) {
|
|
896
901
|
let [u, f] = m({
|
|
897
902
|
style: {
|
|
898
903
|
position: "fixed",
|
|
@@ -917,18 +922,18 @@ function en({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center"
|
|
|
917
922
|
r === "left" && e < u.width + a && t > e ? h = "right" : r === "right" && t < u.width + a && e > t && (h = "left");
|
|
918
923
|
}
|
|
919
924
|
let g = h === "top" || h === "bottom", _, v;
|
|
920
|
-
g ? (_ = h === "bottom" ? l.bottom + a : l.top - u.height - a, v = i === "start" ? l.left : i === "end" ? l.right - u.width : l.left + l.width / 2 - u.width / 2) : (v = h === "right" ? l.right + a : l.left - u.width - a, _ = i === "start" ? l.top : i === "end" ? l.bottom - u.height : l.top + l.height / 2 - u.height / 2), s && (g ? v = Math.min(Math.max(v,
|
|
925
|
+
g ? (_ = h === "bottom" ? l.bottom + a : l.top - u.height - a, v = i === "start" ? l.left : i === "end" ? l.right - u.width : l.left + l.width / 2 - u.width / 2) : (v = h === "right" ? l.right + a : l.left - u.width - a, _ = i === "start" ? l.top : i === "end" ? l.bottom - u.height : l.top + l.height / 2 - u.height / 2), s && (g ? v = Math.min(Math.max(v, $t), d - u.width - $t) : _ = Math.min(Math.max(_, $t), p - u.height - $t));
|
|
921
926
|
let y;
|
|
922
927
|
if (g) {
|
|
923
928
|
let e = l.left + l.width / 2;
|
|
924
929
|
y = {
|
|
925
|
-
left: Math.min(Math.max(e - v,
|
|
930
|
+
left: Math.min(Math.max(e - v, en), u.width - en),
|
|
926
931
|
[h === "bottom" ? "top" : "bottom"]: -8 / 2
|
|
927
932
|
};
|
|
928
933
|
} else {
|
|
929
934
|
let e = l.top + l.height / 2;
|
|
930
935
|
y = {
|
|
931
|
-
top: Math.min(Math.max(e - _,
|
|
936
|
+
top: Math.min(Math.max(e - _, en), u.height - en),
|
|
932
937
|
[h === "right" ? "left" : "right"]: -8 / 2
|
|
933
938
|
};
|
|
934
939
|
}
|
|
@@ -964,16 +969,16 @@ function en({ anchor: e, panel: t, open: n, side: r = "top", align: i = "center"
|
|
|
964
969
|
}
|
|
965
970
|
//#endregion
|
|
966
971
|
//#region src/components/Popover/Popover.tsx
|
|
967
|
-
var
|
|
972
|
+
var nn = {
|
|
968
973
|
bottom: "border-l border-t",
|
|
969
974
|
top: "border-b border-r",
|
|
970
975
|
left: "border-t border-r",
|
|
971
976
|
right: "border-b border-l"
|
|
972
977
|
};
|
|
973
|
-
function
|
|
978
|
+
function rn({ content: e, children: t, side: r = "top", align: i = "center", offset: a = 8, open: s, defaultOpen: c = !1, onOpenChange: d, flip: f = !0, showArrow: h = !0, closeOnScroll: g = !0, autoFocus: _ = !1, container: v, className: y, dataTestId: b }) {
|
|
974
979
|
let [x, S] = m(c), C = s !== void 0, w = C ? s : x, T = p(null), [E, D] = m(null), O = u(), k = (e) => {
|
|
975
980
|
C || S(e), d?.(e);
|
|
976
|
-
}, { style: A, arrowStyle: j, resolvedSide: M } =
|
|
981
|
+
}, { style: A, arrowStyle: j, resolvedSide: M } = tn({
|
|
977
982
|
anchor: T,
|
|
978
983
|
panel: E,
|
|
979
984
|
open: w,
|
|
@@ -981,7 +986,7 @@ function nn({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
981
986
|
align: i,
|
|
982
987
|
offset: a,
|
|
983
988
|
flip: f
|
|
984
|
-
}), N =
|
|
989
|
+
}), N = Qt();
|
|
985
990
|
if (l(() => {
|
|
986
991
|
if (!w) return;
|
|
987
992
|
let e = (e) => {
|
|
@@ -1016,7 +1021,7 @@ function nn({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
1016
1021
|
E
|
|
1017
1022
|
]), !o(t)) return t;
|
|
1018
1023
|
let ee = t.props ?? {}, te = t.ref, P = n(t, {
|
|
1019
|
-
ref:
|
|
1024
|
+
ref: Xt(T, te),
|
|
1020
1025
|
onClick: (e) => {
|
|
1021
1026
|
ee.onClick?.(e), e.defaultPrevented || k(!w);
|
|
1022
1027
|
},
|
|
@@ -1024,7 +1029,7 @@ function nn({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
1024
1029
|
"aria-expanded": w
|
|
1025
1030
|
}), F = v ?? N;
|
|
1026
1031
|
return /* @__PURE__ */ K(W, { children: [P, w && F && be(/* @__PURE__ */ K("div", {
|
|
1027
|
-
ref:
|
|
1032
|
+
ref: Xt(D),
|
|
1028
1033
|
id: O,
|
|
1029
1034
|
role: "dialog",
|
|
1030
1035
|
"aria-label": typeof e == "string" ? e : void 0,
|
|
@@ -1036,17 +1041,17 @@ function nn({ content: e, children: t, side: r = "top", align: i = "center", off
|
|
|
1036
1041
|
children: [e, h && /* @__PURE__ */ G("span", {
|
|
1037
1042
|
"aria-hidden": !0,
|
|
1038
1043
|
style: j,
|
|
1039
|
-
className: X("absolute size-2 rotate-45 bg-bg-default",
|
|
1044
|
+
className: X("absolute size-2 rotate-45 bg-bg-default", nn[M])
|
|
1040
1045
|
})]
|
|
1041
1046
|
}), F)] });
|
|
1042
1047
|
}
|
|
1043
1048
|
//#endregion
|
|
1044
1049
|
//#region src/components/Copy/Copy.tsx
|
|
1045
|
-
var
|
|
1050
|
+
var an = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to clipboard", timeout: r = 1500, icon: i, onCopy: a, onError: o, disabled: s, dataTestId: c, ...u }, d) {
|
|
1046
1051
|
let [f, h] = m(!1), g = p(null), _ = typeof navigator < "u" && typeof navigator.clipboard?.writeText == "function";
|
|
1047
1052
|
return l(() => () => {
|
|
1048
1053
|
g.current && clearTimeout(g.current);
|
|
1049
|
-
}, []), /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1054
|
+
}, []), /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(rn, {
|
|
1050
1055
|
open: f,
|
|
1051
1056
|
content: t,
|
|
1052
1057
|
side: "top",
|
|
@@ -1074,31 +1079,31 @@ var rn = a(function({ text: e, copiedLabel: t = "Copied", label: n = "Copy to cl
|
|
|
1074
1079
|
className: "sr-only",
|
|
1075
1080
|
children: f ? t : ""
|
|
1076
1081
|
})] });
|
|
1077
|
-
}),
|
|
1082
|
+
}), on = {
|
|
1078
1083
|
lg: "h-12 text-p-md",
|
|
1079
1084
|
md: "h-10 text-p-std",
|
|
1080
1085
|
sm: "h-8 text-p-sm"
|
|
1081
|
-
},
|
|
1086
|
+
}, sn = {
|
|
1082
1087
|
lg: "pl-10",
|
|
1083
1088
|
md: "pl-9",
|
|
1084
1089
|
sm: "pl-8"
|
|
1085
|
-
},
|
|
1090
|
+
}, cn = {
|
|
1086
1091
|
lg: "pr-10",
|
|
1087
1092
|
md: "pr-9",
|
|
1088
1093
|
sm: "pr-8"
|
|
1089
|
-
},
|
|
1094
|
+
}, ln = {
|
|
1090
1095
|
lg: "w-10",
|
|
1091
1096
|
md: "w-9",
|
|
1092
1097
|
sm: "w-8"
|
|
1093
1098
|
};
|
|
1094
|
-
function
|
|
1099
|
+
function un({ id: e, isError: t, children: n }) {
|
|
1095
1100
|
return /* @__PURE__ */ G("p", {
|
|
1096
1101
|
id: e,
|
|
1097
1102
|
className: X("text-p-sm", t ? "text-red-700" : "text-fg-secondary"),
|
|
1098
1103
|
children: n
|
|
1099
1104
|
});
|
|
1100
1105
|
}
|
|
1101
|
-
var
|
|
1106
|
+
var dn = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, size: i = "md", leftIcon: a, rightIcon: o, leftAddon: s, rightAddon: c, error: l = !1, id: d, disabled: f, className: p, wrapperClassName: m, required: g, dataTestId: _, ...v }, y) {
|
|
1102
1107
|
let b = u(), x = d ?? b, S = l || !!r, C = `${x}-${r ? "error" : "help"}`, w = r || n, T = w ? C : void 0, E = Z(_);
|
|
1103
1108
|
return /* @__PURE__ */ K("div", {
|
|
1104
1109
|
className: X("flex flex-col gap-1.5 w-full", m),
|
|
@@ -1116,7 +1121,7 @@ var un = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, siz
|
|
|
1116
1121
|
})]
|
|
1117
1122
|
}),
|
|
1118
1123
|
/* @__PURE__ */ K("div", {
|
|
1119
|
-
className: X("flex items-stretch w-full rounded-lg bg-bg-default transition-colors", "border", S ? "border-red-600" : "border-border-default", !f && !S && "hover:border-border-strong", "focus-within:ring-2 focus-within:ring-offset-0", S ? "focus-within:ring-red-300 focus-within:border-red-600" : "focus-within:ring-brand-300 focus-within:border-brand-500", f && "bg-bg-container border-border-default cursor-not-allowed",
|
|
1124
|
+
className: X("flex items-stretch w-full rounded-lg bg-bg-default transition-colors", "border", S ? "border-red-600" : "border-border-default", !f && !S && "hover:border-border-strong", "focus-within:ring-2 focus-within:ring-offset-0", S ? "focus-within:ring-red-300 focus-within:border-red-600" : "focus-within:ring-brand-300 focus-within:border-brand-500", f && "bg-bg-container border-border-default cursor-not-allowed", on[i]),
|
|
1120
1125
|
children: [
|
|
1121
1126
|
s && /* @__PURE__ */ G("span", {
|
|
1122
1127
|
className: "inline-flex items-center px-3 text-fg-secondary bg-bg-container border-r border-border-default rounded-l-lg whitespace-nowrap",
|
|
@@ -1127,7 +1132,7 @@ var un = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, siz
|
|
|
1127
1132
|
children: [
|
|
1128
1133
|
a && /* @__PURE__ */ G("span", {
|
|
1129
1134
|
"aria-hidden": !0,
|
|
1130
|
-
className: X("absolute inset-y-0 left-0 flex items-center justify-center text-fg-secondary pointer-events-none",
|
|
1135
|
+
className: X("absolute inset-y-0 left-0 flex items-center justify-center text-fg-secondary pointer-events-none", ln[i]),
|
|
1131
1136
|
children: a
|
|
1132
1137
|
}),
|
|
1133
1138
|
/* @__PURE__ */ G("input", {
|
|
@@ -1138,12 +1143,12 @@ var un = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, siz
|
|
|
1138
1143
|
"aria-invalid": S || void 0,
|
|
1139
1144
|
"aria-describedby": T,
|
|
1140
1145
|
"data-test-id": E("input"),
|
|
1141
|
-
className: X("w-full h-full bg-transparent outline-none", "placeholder:text-fg-tertiary text-fg-default", "disabled:cursor-not-allowed disabled:text-fg-disabled", a ?
|
|
1146
|
+
className: X("w-full h-full bg-transparent outline-none", "placeholder:text-fg-tertiary text-fg-default", "disabled:cursor-not-allowed disabled:text-fg-disabled", a ? sn[i] : "pl-3", o || S ? cn[i] : "pr-3", p),
|
|
1142
1147
|
...v
|
|
1143
1148
|
}),
|
|
1144
1149
|
(o || S) && /* @__PURE__ */ G("span", {
|
|
1145
1150
|
"aria-hidden": !0,
|
|
1146
|
-
className: X("absolute inset-y-0 right-0 flex items-center justify-center pointer-events-none",
|
|
1151
|
+
className: X("absolute inset-y-0 right-0 flex items-center justify-center pointer-events-none", ln[i], S ? "text-red-600" : "text-fg-secondary"),
|
|
1147
1152
|
children: S ? /* @__PURE__ */ G(h, { className: "h-4 w-4" }) : o
|
|
1148
1153
|
})
|
|
1149
1154
|
]
|
|
@@ -1154,14 +1159,14 @@ var un = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, siz
|
|
|
1154
1159
|
})
|
|
1155
1160
|
]
|
|
1156
1161
|
}),
|
|
1157
|
-
w && /* @__PURE__ */ G(
|
|
1162
|
+
w && /* @__PURE__ */ G(un, {
|
|
1158
1163
|
id: C,
|
|
1159
1164
|
isError: !!r,
|
|
1160
1165
|
children: w
|
|
1161
1166
|
})
|
|
1162
1167
|
]
|
|
1163
1168
|
});
|
|
1164
|
-
}),
|
|
1169
|
+
}), fn = "inline-flex items-center justify-center text-fg-secondary transition-colors hover:text-fg-default disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none", pn = a(function({ value: e, defaultValue: t = 0, onValueChange: n, min: r = 0, max: i = 2 ** 53 - 1, step: a = 1, size: o = "md", label: s, helperText: c, errorText: u, error: d, disabled: f, className: p, wrapperClassName: h, dataTestId: g, ..._ }, v) {
|
|
1165
1170
|
let y = e !== void 0, [b, x] = m(t), S = y ? e : b, [C, w] = m(String(S));
|
|
1166
1171
|
l(() => {
|
|
1167
1172
|
w(String(S));
|
|
@@ -1170,7 +1175,7 @@ var un = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, siz
|
|
|
1170
1175
|
let t = Math.min(i, Math.max(r, e));
|
|
1171
1176
|
return y || x(t), n?.(t), t;
|
|
1172
1177
|
};
|
|
1173
|
-
return /* @__PURE__ */ G(
|
|
1178
|
+
return /* @__PURE__ */ G(dn, {
|
|
1174
1179
|
ref: v,
|
|
1175
1180
|
type: "number",
|
|
1176
1181
|
min: r,
|
|
@@ -1201,7 +1206,7 @@ var un = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, siz
|
|
|
1201
1206
|
disabled: f || S <= r,
|
|
1202
1207
|
onClick: () => T(S - a),
|
|
1203
1208
|
"aria-label": "Decrease",
|
|
1204
|
-
className:
|
|
1209
|
+
className: fn,
|
|
1205
1210
|
children: /* @__PURE__ */ G(L, { className: "size-4" })
|
|
1206
1211
|
}),
|
|
1207
1212
|
rightAddon: /* @__PURE__ */ G("button", {
|
|
@@ -1209,29 +1214,29 @@ var un = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, siz
|
|
|
1209
1214
|
disabled: f || S >= i,
|
|
1210
1215
|
onClick: () => T(S + a),
|
|
1211
1216
|
"aria-label": "Increase",
|
|
1212
|
-
className:
|
|
1217
|
+
className: fn,
|
|
1213
1218
|
children: /* @__PURE__ */ G(ce, { className: "size-4" })
|
|
1214
1219
|
}),
|
|
1215
1220
|
className: X("text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", p),
|
|
1216
1221
|
..._
|
|
1217
1222
|
});
|
|
1218
|
-
}),
|
|
1223
|
+
}), mn = {
|
|
1219
1224
|
lg: "h-12 text-p-md px-3.5",
|
|
1220
1225
|
md: "h-10 text-p-std px-3",
|
|
1221
1226
|
sm: "h-8 text-p-sm px-2.5"
|
|
1222
|
-
},
|
|
1223
|
-
function
|
|
1227
|
+
}, hn = 4;
|
|
1228
|
+
function gn(e) {
|
|
1224
1229
|
try {
|
|
1225
1230
|
return new Intl.Locale(e), e;
|
|
1226
1231
|
} catch {
|
|
1227
1232
|
return "en";
|
|
1228
1233
|
}
|
|
1229
1234
|
}
|
|
1230
|
-
function
|
|
1235
|
+
function _n(e) {
|
|
1231
1236
|
let t = new Intl.DateTimeFormat(e, { month: "short" });
|
|
1232
1237
|
return Array.from({ length: 12 }, (e, n) => t.format(new Date(2e3, n, 1)));
|
|
1233
1238
|
}
|
|
1234
|
-
var
|
|
1239
|
+
var vn = [
|
|
1235
1240
|
"Mo",
|
|
1236
1241
|
"Tu",
|
|
1237
1242
|
"We",
|
|
@@ -1240,48 +1245,48 @@ var _n = [
|
|
|
1240
1245
|
"Sa",
|
|
1241
1246
|
"Su"
|
|
1242
1247
|
];
|
|
1243
|
-
function
|
|
1244
|
-
if (e.toLowerCase() === "en") return
|
|
1248
|
+
function yn(e) {
|
|
1249
|
+
if (e.toLowerCase() === "en") return vn;
|
|
1245
1250
|
let t = new Intl.DateTimeFormat(e, { weekday: "short" });
|
|
1246
1251
|
return Array.from({ length: 7 }, (e, n) => t.format(new Date(1970, 0, 5 + n)));
|
|
1247
1252
|
}
|
|
1248
|
-
function
|
|
1253
|
+
function bn(e) {
|
|
1249
1254
|
return new Date(e.getFullYear(), e.getMonth(), 1);
|
|
1250
1255
|
}
|
|
1251
|
-
function
|
|
1256
|
+
function xn(e, t) {
|
|
1252
1257
|
return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1253
1258
|
}
|
|
1254
|
-
function
|
|
1259
|
+
function Sn(e) {
|
|
1255
1260
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
1256
1261
|
}
|
|
1257
|
-
function
|
|
1258
|
-
let a =
|
|
1259
|
-
return t && a <
|
|
1262
|
+
function Cn(e, t, n, r, i) {
|
|
1263
|
+
let a = Sn(e).getTime();
|
|
1264
|
+
return t && a < Sn(t).getTime() || n && a > Sn(n).getTime() || r?.some((t) => xn(t, e)) ? !0 : !!i && !i(e);
|
|
1260
1265
|
}
|
|
1261
|
-
function
|
|
1266
|
+
function wn(e, t) {
|
|
1262
1267
|
let n = String(e.getDate()).padStart(2, "0"), r = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getFullYear());
|
|
1263
1268
|
return t.replace(/dd/g, n).replace(/MM/g, r).replace(/yyyy/g, i);
|
|
1264
1269
|
}
|
|
1265
|
-
function
|
|
1266
|
-
let t = (
|
|
1270
|
+
function Tn(e) {
|
|
1271
|
+
let t = (bn(e).getDay() + 6) % 7, n = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate(), r = [];
|
|
1267
1272
|
for (let e = 0; e < t; e++) r.push(null);
|
|
1268
1273
|
for (let t = 1; t <= n; t++) r.push(new Date(e.getFullYear(), e.getMonth(), t));
|
|
1269
1274
|
for (; r.length % 7 != 0;) r.push(null);
|
|
1270
1275
|
return r;
|
|
1271
1276
|
}
|
|
1272
|
-
function
|
|
1277
|
+
function En(e) {
|
|
1273
1278
|
if (!e) return;
|
|
1274
1279
|
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
1275
1280
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
1276
1281
|
}
|
|
1277
|
-
var
|
|
1278
|
-
let te = u(), P = A ?? te, [F, I] = m(!1), [L, ne] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [re, R] = m(null), [ie, z] = m(null), ae = p(null), oe = p(null), se =
|
|
1282
|
+
var Dn = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, rangeValue: i, onChangeRange: a, size: o = "md", locale: s = "en", format: c = "dd.MM.yyyy", label: d, required: h = !1, helperText: g, placeholder: _ = "Select date", fullWidth: v = !1, disabled: b = !1, minDate: x, maxDate: S, excludeDates: T, filterDate: E, menuPlacement: D = "auto", error: O = !1, errorText: k, id: A, className: j, wrapperClassName: M, dataTestId: N }, ee) {
|
|
1283
|
+
let te = u(), P = A ?? te, [F, I] = m(!1), [L, ne] = m(e ?? i?.start ?? /* @__PURE__ */ new Date()), [re, R] = m(null), [ie, z] = m(null), ae = p(null), oe = p(null), se = Qt(), { style: ce, resolvedSide: le } = tn({
|
|
1279
1284
|
anchor: oe,
|
|
1280
1285
|
panel: ie,
|
|
1281
1286
|
open: F,
|
|
1282
1287
|
side: D === "top" ? "top" : "bottom",
|
|
1283
1288
|
align: "start",
|
|
1284
|
-
offset:
|
|
1289
|
+
offset: hn,
|
|
1285
1290
|
flip: D === "auto",
|
|
1286
1291
|
recomputeKey: `${L.getFullYear()}-${L.getMonth()}-${r}`
|
|
1287
1292
|
}), ue = O || !!k, B = k ? `${P}-error` : g ? `${P}-help` : void 0;
|
|
@@ -1295,7 +1300,7 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1295
1300
|
};
|
|
1296
1301
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1297
1302
|
}, [F, ie]);
|
|
1298
|
-
let de = r ? i?.start ? `${
|
|
1303
|
+
let de = r ? i?.start ? `${wn(i.start, c)}${i.end ? ` – ${wn(i.end, c)}` : ""}` : "" : e ? wn(e, c) : "";
|
|
1299
1304
|
function fe(e) {
|
|
1300
1305
|
if (!r) {
|
|
1301
1306
|
t?.(e), I(!1);
|
|
@@ -1331,12 +1336,12 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1331
1336
|
}), R(null)) : t?.(null);
|
|
1332
1337
|
}
|
|
1333
1338
|
let { monthNames: me, weekdayNames: he } = f(() => {
|
|
1334
|
-
let e =
|
|
1339
|
+
let e = gn(s);
|
|
1335
1340
|
return {
|
|
1336
|
-
monthNames:
|
|
1337
|
-
weekdayNames:
|
|
1341
|
+
monthNames: _n(e),
|
|
1342
|
+
weekdayNames: yn(e)
|
|
1338
1343
|
};
|
|
1339
|
-
}, [s]), ge =
|
|
1344
|
+
}, [s]), ge = Tn(L), _e = Sn(/* @__PURE__ */ new Date()), V = Z(N), U = i ?? {
|
|
1340
1345
|
start: null,
|
|
1341
1346
|
end: null
|
|
1342
1347
|
}, ve = U.end ?? re;
|
|
@@ -1357,16 +1362,16 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1357
1362
|
ref: ee,
|
|
1358
1363
|
id: P,
|
|
1359
1364
|
"data-test-id": N,
|
|
1360
|
-
"data-value": r ? void 0 :
|
|
1361
|
-
"data-from": r ?
|
|
1362
|
-
"data-to": r ?
|
|
1365
|
+
"data-value": r ? void 0 : En(e),
|
|
1366
|
+
"data-from": r ? En(i?.start) : void 0,
|
|
1367
|
+
"data-to": r ? En(i?.end) : void 0,
|
|
1363
1368
|
type: "button",
|
|
1364
1369
|
disabled: b,
|
|
1365
1370
|
"aria-invalid": ue || void 0,
|
|
1366
1371
|
"aria-required": h || void 0,
|
|
1367
1372
|
"aria-describedby": B,
|
|
1368
1373
|
onClick: () => I((e) => !e),
|
|
1369
|
-
className: X("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", ue ? "border-red-600" : "border-border-default", !b && !ue && "hover:border-border-strong", ue ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", b && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", v ? "w-full min-w-0" : "min-w-[260px]",
|
|
1374
|
+
className: X("inline-flex items-center gap-2 rounded-lg border bg-bg-default text-left transition-colors focus-visible:outline-none focus-visible:ring-2", ue ? "border-red-600" : "border-border-default", !b && !ue && "hover:border-border-strong", ue ? "focus-visible:ring-red-300 focus-visible:border-red-600" : "focus-visible:ring-brand-300 focus-visible:border-brand-500", b && "bg-bg-container border-border-default cursor-not-allowed text-fg-disabled", v ? "w-full min-w-0" : "min-w-[260px]", mn[o], j),
|
|
1370
1375
|
children: [/* @__PURE__ */ G("span", {
|
|
1371
1376
|
className: X("flex-1 text-left truncate", b ? "text-fg-disabled" : de ? "text-fg-default" : "text-fg-tertiary"),
|
|
1372
1377
|
children: de || _
|
|
@@ -1424,13 +1429,13 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1424
1429
|
children: e
|
|
1425
1430
|
}, t)), ge.map((t, n) => {
|
|
1426
1431
|
if (!t) return /* @__PURE__ */ G("div", {}, n);
|
|
1427
|
-
let i =
|
|
1432
|
+
let i = Cn(t, x, S, T, E), a = !!T?.some((e) => xn(e, t)), o = xn(t, _e), s = !r && xn(t, e ?? null), c = r && xn(t, U.start), l = r && xn(t, ve), u = r && !!U.start && !!ve && t > U.start && t < ve, d = i ? "text-fg-disabled cursor-not-allowed" : s || c || l ? "bg-brand-500 text-white" : u ? "bg-bg-brand-lighter text-brand-700" : "text-fg-default hover:bg-bg-container", f = o && !(s || c || l) ? "ring-1 ring-inset ring-border-brand font-semibold" : void 0;
|
|
1428
1433
|
return /* @__PURE__ */ G("button", {
|
|
1429
1434
|
type: "button",
|
|
1430
1435
|
disabled: i,
|
|
1431
1436
|
"aria-disabled": i || void 0,
|
|
1432
1437
|
"data-test-id": V("day"),
|
|
1433
|
-
"data-date":
|
|
1438
|
+
"data-date": En(t),
|
|
1434
1439
|
"data-today": o || void 0,
|
|
1435
1440
|
"data-excluded": a || void 0,
|
|
1436
1441
|
"aria-current": o ? "date" : void 0,
|
|
@@ -1454,7 +1459,7 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1454
1459
|
}) : null
|
|
1455
1460
|
]
|
|
1456
1461
|
});
|
|
1457
|
-
}),
|
|
1462
|
+
}), On = {
|
|
1458
1463
|
brand: {
|
|
1459
1464
|
bg: "bg-bg-brand-lighter",
|
|
1460
1465
|
icon: "text-brand-700"
|
|
@@ -1491,7 +1496,7 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1491
1496
|
bg: "bg-bg-danger-lighter",
|
|
1492
1497
|
icon: "text-red-700"
|
|
1493
1498
|
}
|
|
1494
|
-
},
|
|
1499
|
+
}, kn = {
|
|
1495
1500
|
sm: {
|
|
1496
1501
|
box: "h-8 w-8",
|
|
1497
1502
|
icon: "h-4 w-4",
|
|
@@ -1512,8 +1517,8 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1512
1517
|
icon: "h-7 w-7",
|
|
1513
1518
|
radius: "rounded-xl"
|
|
1514
1519
|
}
|
|
1515
|
-
},
|
|
1516
|
-
let c =
|
|
1520
|
+
}, An = a(function({ icon: e, tone: t = "gray", size: n = "md", shape: r = "rounded", className: i, dataTestId: a, ...o }, s) {
|
|
1521
|
+
let c = On[t], l = kn[n];
|
|
1517
1522
|
return /* @__PURE__ */ G("div", {
|
|
1518
1523
|
ref: s,
|
|
1519
1524
|
"data-test-id": a,
|
|
@@ -1522,7 +1527,7 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1522
1527
|
...o,
|
|
1523
1528
|
children: /* @__PURE__ */ G(e, { className: X(l.icon, c.icon) })
|
|
1524
1529
|
});
|
|
1525
|
-
}),
|
|
1530
|
+
}), jn = {
|
|
1526
1531
|
"h-xl": "text-h-xl",
|
|
1527
1532
|
"h-lg": "text-h-lg",
|
|
1528
1533
|
"h-md": "text-h-md",
|
|
@@ -1540,12 +1545,12 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1540
1545
|
"label-sm": "text-label-sm",
|
|
1541
1546
|
"label-xs": "text-label-xs",
|
|
1542
1547
|
"label-xxs": "text-label-xxs"
|
|
1543
|
-
},
|
|
1548
|
+
}, Mn = {
|
|
1544
1549
|
normal: "font-normal",
|
|
1545
1550
|
medium: "font-medium",
|
|
1546
1551
|
semibold: "font-semibold",
|
|
1547
1552
|
bold: "font-bold"
|
|
1548
|
-
},
|
|
1553
|
+
}, Nn = {
|
|
1549
1554
|
default: "text-fg-default",
|
|
1550
1555
|
secondary: "text-fg-secondary",
|
|
1551
1556
|
tertiary: "text-fg-tertiary",
|
|
@@ -1556,7 +1561,7 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1556
1561
|
success: "text-fg-success",
|
|
1557
1562
|
warning: "text-fg-warning",
|
|
1558
1563
|
danger: "text-fg-danger"
|
|
1559
|
-
},
|
|
1564
|
+
}, Pn = {
|
|
1560
1565
|
"h-xl": "h1",
|
|
1561
1566
|
"h-lg": "h1",
|
|
1562
1567
|
"h-md": "h2",
|
|
@@ -1574,18 +1579,18 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1574
1579
|
"label-sm": "span",
|
|
1575
1580
|
"label-xs": "span",
|
|
1576
1581
|
"label-xxs": "span"
|
|
1577
|
-
},
|
|
1578
|
-
return i(r ??
|
|
1582
|
+
}, Fn = a(function({ variant: e = "p-std", weight: t, color: n = "default", as: r, truncate: a, clamp: o, style: s, className: c, children: l, dataTestId: u, ...d }, f) {
|
|
1583
|
+
return i(r ?? Pn[e], {
|
|
1579
1584
|
ref: f,
|
|
1580
1585
|
"data-test-id": u,
|
|
1581
|
-
className: X(
|
|
1586
|
+
className: X(jn[e], t && Mn[t], Nn[n], a && "truncate", o && !a && "overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]", c),
|
|
1582
1587
|
style: o && !a ? {
|
|
1583
1588
|
...s,
|
|
1584
1589
|
WebkitLineClamp: o
|
|
1585
1590
|
} : s,
|
|
1586
1591
|
...d
|
|
1587
1592
|
}, l);
|
|
1588
|
-
}),
|
|
1593
|
+
}), In = {
|
|
1589
1594
|
"en-US": {
|
|
1590
1595
|
mobile: {
|
|
1591
1596
|
title: "Mobile only",
|
|
@@ -1640,34 +1645,34 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1640
1645
|
description: "Այս էջը հասանելի է միայն մոբայլ և պլանշետ սարքերում։ Շարունակելու համար խնդրում ենք բացել այն ձեր հեռախոսում կամ պլանշետում։"
|
|
1641
1646
|
}
|
|
1642
1647
|
}
|
|
1643
|
-
},
|
|
1648
|
+
}, Ln = {
|
|
1644
1649
|
mobile: de,
|
|
1645
1650
|
tablet: me,
|
|
1646
1651
|
desktop: ne,
|
|
1647
1652
|
"mobile-tablet": he
|
|
1648
|
-
},
|
|
1649
|
-
let u =
|
|
1653
|
+
}, Rn = a(function({ type: e = "desktop", locale: t = "en-US", title: n, description: r, icon: i, fillHeight: a = !1, className: o, dataTestId: s, ...c }, l) {
|
|
1654
|
+
let u = In[t][e];
|
|
1650
1655
|
return /* @__PURE__ */ K("div", {
|
|
1651
1656
|
ref: l,
|
|
1652
1657
|
"data-test-id": s,
|
|
1653
1658
|
className: X("flex flex-col items-center justify-center text-center px-6 py-16", a && "h-full", o),
|
|
1654
1659
|
...c,
|
|
1655
1660
|
children: [
|
|
1656
|
-
i ?? /* @__PURE__ */ G(
|
|
1657
|
-
icon:
|
|
1661
|
+
i ?? /* @__PURE__ */ G(An, {
|
|
1662
|
+
icon: Ln[e],
|
|
1658
1663
|
tone: "gray",
|
|
1659
1664
|
shape: "rounded",
|
|
1660
1665
|
size: "xl",
|
|
1661
1666
|
className: "rounded-2xl"
|
|
1662
1667
|
}),
|
|
1663
|
-
/* @__PURE__ */ G(
|
|
1668
|
+
/* @__PURE__ */ G(Fn, {
|
|
1664
1669
|
as: "h3",
|
|
1665
1670
|
variant: "h-xs",
|
|
1666
1671
|
weight: "semibold",
|
|
1667
1672
|
className: "mt-6",
|
|
1668
1673
|
children: n ?? u.title
|
|
1669
1674
|
}),
|
|
1670
|
-
/* @__PURE__ */ G(
|
|
1675
|
+
/* @__PURE__ */ G(Fn, {
|
|
1671
1676
|
variant: "p-md",
|
|
1672
1677
|
color: "secondary",
|
|
1673
1678
|
className: "mt-2 max-w-105",
|
|
@@ -1675,7 +1680,7 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1675
1680
|
})
|
|
1676
1681
|
]
|
|
1677
1682
|
});
|
|
1678
|
-
}),
|
|
1683
|
+
}), zn = {
|
|
1679
1684
|
brand: "bg-brand-500",
|
|
1680
1685
|
blue: "bg-blue-500",
|
|
1681
1686
|
purple: "bg-purple-500",
|
|
@@ -1683,10 +1688,10 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1683
1688
|
yellow: "bg-yellow-500",
|
|
1684
1689
|
red: "bg-red-500",
|
|
1685
1690
|
gray: "bg-gray-400"
|
|
1686
|
-
},
|
|
1691
|
+
}, Bn = {
|
|
1687
1692
|
sm: "h-1",
|
|
1688
1693
|
lg: "h-2"
|
|
1689
|
-
},
|
|
1694
|
+
}, Vn = (e) => new Intl.NumberFormat().format(e), Hn = a(function({ segments: e, hideLegend: t = !1, formatValue: n = Vn, size: r = "lg", className: i, dataTestId: a, ...o }, s) {
|
|
1690
1695
|
let c = e.reduce((e, t) => e + t.value, 0);
|
|
1691
1696
|
return /* @__PURE__ */ K("div", {
|
|
1692
1697
|
ref: s,
|
|
@@ -1694,10 +1699,10 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1694
1699
|
className: X("flex flex-col gap-3", i),
|
|
1695
1700
|
...o,
|
|
1696
1701
|
children: [/* @__PURE__ */ G("div", {
|
|
1697
|
-
className: X("flex w-full overflow-hidden rounded-full bg-bg-subtle",
|
|
1702
|
+
className: X("flex w-full overflow-hidden rounded-full bg-bg-subtle", Bn[r]),
|
|
1698
1703
|
children: e.map((e, t) => /* @__PURE__ */ G("div", {
|
|
1699
1704
|
style: { flexBasis: `${c > 0 ? e.value / c * 100 : 0}%` },
|
|
1700
|
-
className: X("transition-[flex-basis] duration-700 ease-out",
|
|
1705
|
+
className: X("transition-[flex-basis] duration-700 ease-out", zn[e.color])
|
|
1701
1706
|
}, t))
|
|
1702
1707
|
}), !t && /* @__PURE__ */ G("ul", {
|
|
1703
1708
|
className: "flex flex-col [&>li:not(:last-child)]:border-b [&>li:not(:last-child)]:border-border-default",
|
|
@@ -1705,7 +1710,7 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1705
1710
|
className: "flex items-center justify-between gap-3 py-1.5",
|
|
1706
1711
|
children: [/* @__PURE__ */ K("span", {
|
|
1707
1712
|
className: "flex min-w-0 items-center gap-2",
|
|
1708
|
-
children: [/* @__PURE__ */ G("span", { className: X("size-2 shrink-0 rounded-full",
|
|
1713
|
+
children: [/* @__PURE__ */ G("span", { className: X("size-2 shrink-0 rounded-full", zn[e.color]) }), /* @__PURE__ */ G("span", {
|
|
1709
1714
|
className: "truncate text-p-sm text-fg-tertiary",
|
|
1710
1715
|
children: e.label
|
|
1711
1716
|
})]
|
|
@@ -1716,24 +1721,24 @@ var En = a(function({ value: e, onChange: t, clearable: n = !1, range: r = !1, r
|
|
|
1716
1721
|
}, t))
|
|
1717
1722
|
})]
|
|
1718
1723
|
});
|
|
1719
|
-
}),
|
|
1724
|
+
}), Un = {
|
|
1720
1725
|
fast: 150,
|
|
1721
1726
|
base: 200,
|
|
1722
1727
|
slow: 300
|
|
1723
1728
|
};
|
|
1724
|
-
function
|
|
1729
|
+
function Wn() {
|
|
1725
1730
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1726
1731
|
}
|
|
1727
1732
|
//#endregion
|
|
1728
1733
|
//#region src/lib/useMountTransition.ts
|
|
1729
|
-
function
|
|
1734
|
+
function Gn(e, t) {
|
|
1730
1735
|
let [n, r] = m(e), [i, a] = m(e ? "entered" : "closed"), o = p(null), s = p(null);
|
|
1731
1736
|
return l(() => {
|
|
1732
1737
|
o.current && clearTimeout(o.current), s.current && cancelAnimationFrame(s.current), e ? (r(!0), a("entering"), s.current = requestAnimationFrame(() => {
|
|
1733
1738
|
s.current = requestAnimationFrame(() => a("entered"));
|
|
1734
1739
|
})) : (() => {
|
|
1735
1740
|
a((e) => e === "closed" ? "closed" : "exiting");
|
|
1736
|
-
let e =
|
|
1741
|
+
let e = Wn() ? 0 : t;
|
|
1737
1742
|
e === 0 ? (r(!1), a("closed")) : o.current = setTimeout(() => {
|
|
1738
1743
|
r(!1), a("closed");
|
|
1739
1744
|
}, e);
|
|
@@ -1747,12 +1752,12 @@ function Wn(e, t) {
|
|
|
1747
1752
|
}
|
|
1748
1753
|
//#endregion
|
|
1749
1754
|
//#region src/hooks/useStepper.ts
|
|
1750
|
-
function
|
|
1755
|
+
function Kn(e, t) {
|
|
1751
1756
|
return t <= 0 ? 0 : Math.min(Math.max(e, 0), t - 1);
|
|
1752
1757
|
}
|
|
1753
|
-
function
|
|
1754
|
-
let [a, o] = m(() =>
|
|
1755
|
-
let n =
|
|
1758
|
+
function qn({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i = !1 }) {
|
|
1759
|
+
let [a, o] = m(() => Kn(t, e)), s = n !== void 0, c = s ? Kn(n, e) : a, l = (t) => {
|
|
1760
|
+
let n = Kn(t, e);
|
|
1756
1761
|
s || o(n), r?.(n);
|
|
1757
1762
|
};
|
|
1758
1763
|
return {
|
|
@@ -1780,37 +1785,37 @@ function Kn({ count: e, initialStep: t = 0, step: n, onStepChange: r, loop: i =
|
|
|
1780
1785
|
}
|
|
1781
1786
|
//#endregion
|
|
1782
1787
|
//#region src/hooks/useOnOutsideClick.ts
|
|
1783
|
-
var
|
|
1784
|
-
function
|
|
1785
|
-
let t =
|
|
1788
|
+
var Jn = [];
|
|
1789
|
+
function Yn(e) {
|
|
1790
|
+
let t = Jn.at(-1);
|
|
1786
1791
|
if (!t) return;
|
|
1787
1792
|
let { ref: n, callback: r, shouldRemoveCallback: i } = t;
|
|
1788
|
-
n && !n.contains(e.target) && (i &&
|
|
1793
|
+
n && !n.contains(e.target) && (i && Jn.splice(-1, 1), r(e));
|
|
1789
1794
|
}
|
|
1790
|
-
var
|
|
1795
|
+
var Xn = (e, t, n, r, i = !0) => {
|
|
1791
1796
|
l(() => {
|
|
1792
|
-
if (e && n && r) return
|
|
1797
|
+
if (e && n && r) return Jn.push({
|
|
1793
1798
|
ref: e,
|
|
1794
1799
|
callback: t,
|
|
1795
1800
|
uid: r,
|
|
1796
1801
|
shouldRemoveCallback: i
|
|
1797
|
-
}),
|
|
1798
|
-
|
|
1802
|
+
}), Jn.length === 1 && document.addEventListener("mousedown", Yn), () => {
|
|
1803
|
+
Jn.length === 0 && document.removeEventListener("mousedown", Yn);
|
|
1799
1804
|
};
|
|
1800
1805
|
}, [
|
|
1801
1806
|
e,
|
|
1802
1807
|
n,
|
|
1803
1808
|
r
|
|
1804
1809
|
]), l(() => {
|
|
1805
|
-
if (!n &&
|
|
1806
|
-
let e =
|
|
1807
|
-
e >= 0 &&
|
|
1810
|
+
if (!n && Jn.length > 0) {
|
|
1811
|
+
let e = Jn.findIndex((e) => e.uid === r);
|
|
1812
|
+
e >= 0 && Jn.splice(e, 1);
|
|
1808
1813
|
}
|
|
1809
1814
|
}, [n]);
|
|
1810
1815
|
};
|
|
1811
1816
|
//#endregion
|
|
1812
1817
|
//#region src/hooks/useEscapeKey.ts
|
|
1813
|
-
function
|
|
1818
|
+
function Zn(e, t = !0) {
|
|
1814
1819
|
l(() => {
|
|
1815
1820
|
if (!t) return;
|
|
1816
1821
|
let n = (t) => {
|
|
@@ -1821,18 +1826,18 @@ function Xn(e, t = !0) {
|
|
|
1821
1826
|
}
|
|
1822
1827
|
//#endregion
|
|
1823
1828
|
//#region src/hooks/useHideBodyScroll.ts
|
|
1824
|
-
var
|
|
1825
|
-
function
|
|
1829
|
+
var Qn = 0, $n = "";
|
|
1830
|
+
function er(e) {
|
|
1826
1831
|
l(() => {
|
|
1827
|
-
if (e) return
|
|
1828
|
-
--
|
|
1832
|
+
if (e) return Qn === 0 && ($n = document.body.style.overflow, document.body.style.overflow = "hidden"), Qn += 1, () => {
|
|
1833
|
+
--Qn, Qn === 0 && (document.body.style.overflow = $n);
|
|
1829
1834
|
};
|
|
1830
1835
|
}, [e]);
|
|
1831
1836
|
}
|
|
1832
1837
|
//#endregion
|
|
1833
1838
|
//#region src/hooks/useIsMobile.ts
|
|
1834
|
-
var
|
|
1835
|
-
function
|
|
1839
|
+
var tr = 768;
|
|
1840
|
+
function nr(e = tr) {
|
|
1836
1841
|
let [t, n] = m(!1);
|
|
1837
1842
|
return l(() => {
|
|
1838
1843
|
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
@@ -1842,58 +1847,58 @@ function tr(e = er) {
|
|
|
1842
1847
|
}
|
|
1843
1848
|
//#endregion
|
|
1844
1849
|
//#region src/lib/FormContext.ts
|
|
1845
|
-
var
|
|
1850
|
+
var rr = r(null);
|
|
1846
1851
|
//#endregion
|
|
1847
1852
|
//#region src/hooks/useFormContext.ts
|
|
1848
|
-
function
|
|
1849
|
-
let e = c(
|
|
1853
|
+
function ir() {
|
|
1854
|
+
let e = c(rr);
|
|
1850
1855
|
if (!e) throw Error("useFormContext must be used inside a FormContainer.");
|
|
1851
1856
|
return e;
|
|
1852
1857
|
}
|
|
1853
1858
|
//#endregion
|
|
1854
1859
|
//#region src/hooks/useFormProps.ts
|
|
1855
|
-
var
|
|
1860
|
+
var ar = () => void 0, or = {
|
|
1856
1861
|
errors: {},
|
|
1857
|
-
setValue:
|
|
1858
|
-
reset:
|
|
1859
|
-
clearErrors:
|
|
1860
|
-
setError:
|
|
1861
|
-
unregister:
|
|
1862
|
+
setValue: ar,
|
|
1863
|
+
reset: ar,
|
|
1864
|
+
clearErrors: ar,
|
|
1865
|
+
setError: ar,
|
|
1866
|
+
unregister: ar,
|
|
1862
1867
|
isDirty: !1,
|
|
1863
1868
|
isSubmitted: !1,
|
|
1864
1869
|
isSubmitting: !1,
|
|
1865
1870
|
isValid: !1,
|
|
1866
1871
|
dirtyFields: {},
|
|
1867
|
-
submit:
|
|
1872
|
+
submit: ar
|
|
1868
1873
|
};
|
|
1869
|
-
function
|
|
1870
|
-
return c(
|
|
1874
|
+
function sr() {
|
|
1875
|
+
return c(rr) ?? or;
|
|
1871
1876
|
}
|
|
1872
1877
|
//#endregion
|
|
1873
1878
|
//#region src/components/Drawer/Drawer.tsx
|
|
1874
|
-
var
|
|
1879
|
+
var cr = {
|
|
1875
1880
|
sm: "w-[320px]",
|
|
1876
1881
|
md: "w-[420px]",
|
|
1877
1882
|
lg: "w-[560px]",
|
|
1878
1883
|
xl: "w-[720px]"
|
|
1879
|
-
},
|
|
1884
|
+
}, lr = {
|
|
1880
1885
|
sm: "h-[240px]",
|
|
1881
1886
|
md: "h-[360px]",
|
|
1882
1887
|
lg: "h-[480px]",
|
|
1883
1888
|
xl: "h-[600px]"
|
|
1884
|
-
},
|
|
1889
|
+
}, ur = {
|
|
1885
1890
|
right: "inset-y-0 right-0 border-l",
|
|
1886
1891
|
left: "inset-y-0 left-0 border-r",
|
|
1887
1892
|
top: "inset-x-0 top-0 border-b",
|
|
1888
1893
|
bottom: "inset-x-0 bottom-0 border-t"
|
|
1889
|
-
},
|
|
1894
|
+
}, dr = {
|
|
1890
1895
|
right: "translate-x-full",
|
|
1891
1896
|
left: "-translate-x-full",
|
|
1892
1897
|
top: "-translate-y-full",
|
|
1893
1898
|
bottom: "translate-y-full"
|
|
1894
|
-
},
|
|
1895
|
-
let v = p(null), [y, b] = m(null), x = p(null), { mounted: S, state: C } =
|
|
1896
|
-
if (
|
|
1899
|
+
}, fr = a(function({ open: e, onClose: t, side: n = "right", size: r = "md", title: i, description: a, children: o, footer: s, closeOnOverlayClick: c = !0, showClose: u = !0, animated: d = !0, headerActions: f, className: h, dataTestId: g }, _) {
|
|
1900
|
+
let v = p(null), [y, b] = m(null), x = p(null), { mounted: S, state: C } = Gn(e, d ? Un.slow : 0), w = C === "entered";
|
|
1901
|
+
if (er(S), l(() => {
|
|
1897
1902
|
let e = v.current;
|
|
1898
1903
|
if (!(!S || !e || e.open)) return e.showModal(), x.current?.focus({ preventScroll: !0 }), () => {
|
|
1899
1904
|
e.open && e.close();
|
|
@@ -1903,8 +1908,8 @@ var sr = {
|
|
|
1903
1908
|
let t = document.activeElement;
|
|
1904
1909
|
return x.current?.focus({ preventScroll: !0 }), () => t?.focus?.();
|
|
1905
1910
|
}, [e]), !S) return null;
|
|
1906
|
-
let T = n === "left" || n === "right", E = T ?
|
|
1907
|
-
ref:
|
|
1911
|
+
let T = n === "left" || n === "right", E = T ? cr[r] : lr[r], D = /* @__PURE__ */ K("dialog", {
|
|
1912
|
+
ref: Xt(v, b),
|
|
1908
1913
|
onCancel: (e) => {
|
|
1909
1914
|
e.preventDefault(), t();
|
|
1910
1915
|
},
|
|
@@ -1918,9 +1923,9 @@ var sr = {
|
|
|
1918
1923
|
onClick: () => c && t(),
|
|
1919
1924
|
"aria-hidden": !0
|
|
1920
1925
|
}), /* @__PURE__ */ K("div", {
|
|
1921
|
-
ref:
|
|
1926
|
+
ref: Xt(_, x),
|
|
1922
1927
|
tabIndex: -1,
|
|
1923
|
-
className: X("absolute bg-bg-default shadow-z5 outline-none flex flex-col",
|
|
1928
|
+
className: X("absolute bg-bg-default shadow-z5 outline-none flex flex-col", ur[n], T ? `${E} h-full max-w-full` : `${E} w-full max-h-full`, "border-border-default", d && "transition-transform duration-300 ease-out motion-reduce:transition-none will-change-transform", w ? "translate-x-0 translate-y-0" : dr[n], h),
|
|
1924
1929
|
children: [
|
|
1925
1930
|
(i || u || f) && /* @__PURE__ */ K("div", {
|
|
1926
1931
|
className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4 border-b border-border-default",
|
|
@@ -1958,23 +1963,23 @@ var sr = {
|
|
|
1958
1963
|
]
|
|
1959
1964
|
})]
|
|
1960
1965
|
});
|
|
1961
|
-
return be(/* @__PURE__ */ G(
|
|
1966
|
+
return be(/* @__PURE__ */ G(Zt.Provider, {
|
|
1962
1967
|
value: y,
|
|
1963
1968
|
children: D
|
|
1964
1969
|
}), document.body);
|
|
1965
1970
|
});
|
|
1966
1971
|
//#endregion
|
|
1967
1972
|
//#region src/components/DropdownMenu/DropdownMenu.tsx
|
|
1968
|
-
function
|
|
1973
|
+
function pr(e) {
|
|
1969
1974
|
return e == null ? null : e instanceof HTMLElement ? e : e.current;
|
|
1970
1975
|
}
|
|
1971
|
-
var
|
|
1972
|
-
function
|
|
1973
|
-
let e = c(
|
|
1976
|
+
var mr = r(null);
|
|
1977
|
+
function hr() {
|
|
1978
|
+
let e = c(mr);
|
|
1974
1979
|
if (!e) throw Error("Dropdown parts must be used inside <DropdownMenu>");
|
|
1975
1980
|
return e;
|
|
1976
1981
|
}
|
|
1977
|
-
var
|
|
1982
|
+
var gr = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r, anchorRef: i, className: a, dataTestId: o, ...s }, c) {
|
|
1978
1983
|
let [u, d] = m(t), f = n !== void 0, h = f ? n : u, g = p(null), _ = (e) => {
|
|
1979
1984
|
f || d(e), r?.(e);
|
|
1980
1985
|
};
|
|
@@ -1984,7 +1989,7 @@ var hr = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r
|
|
|
1984
1989
|
e.key === "Escape" && _(!1);
|
|
1985
1990
|
};
|
|
1986
1991
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1987
|
-
}, [h]), /* @__PURE__ */ G(
|
|
1992
|
+
}, [h]), /* @__PURE__ */ G(mr.Provider, {
|
|
1988
1993
|
value: {
|
|
1989
1994
|
open: h,
|
|
1990
1995
|
setOpen: _,
|
|
@@ -2000,8 +2005,8 @@ var hr = a(function({ children: e, defaultOpen: t = !1, open: n, onOpenChange: r
|
|
|
2000
2005
|
})
|
|
2001
2006
|
});
|
|
2002
2007
|
});
|
|
2003
|
-
function
|
|
2004
|
-
let { open: t, setOpen: r, triggerRef: i } =
|
|
2008
|
+
function _r({ children: e }) {
|
|
2009
|
+
let { open: t, setOpen: r, triggerRef: i } = hr();
|
|
2005
2010
|
if (!o(e)) return e;
|
|
2006
2011
|
let a = e.props ?? {};
|
|
2007
2012
|
return n(e, {
|
|
@@ -2014,10 +2019,10 @@ function gr({ children: e }) {
|
|
|
2014
2019
|
"aria-expanded": t
|
|
2015
2020
|
});
|
|
2016
2021
|
}
|
|
2017
|
-
var
|
|
2018
|
-
let { open: y, setOpen: b, triggerRef: x, anchorRef: S } =
|
|
2019
|
-
return
|
|
2020
|
-
} }), [S, x]), D =
|
|
2022
|
+
var vr = "min-w-[200px] rounded-lg border border-border-default bg-bg-default shadow-z4 z-50 py-1", yr = a(function({ children: e, align: t = "start", strategy: n = "fixed", side: r = "bottom", sideOffset: i = 4, flip: a = !0, shift: o = !0, matchTriggerWidth: s = !1, closeOnScroll: c = !1, autoFocusFirstItem: u = !0, className: d, dataTestId: h, onClick: g, ..._ }, v) {
|
|
2023
|
+
let { open: y, setOpen: b, triggerRef: x, anchorRef: S } = hr(), C = p(null), [w, T] = m(null), E = f(() => ({ get current() {
|
|
2024
|
+
return pr(S) ?? x.current;
|
|
2025
|
+
} }), [S, x]), D = Qt(), { style: O, resolvedSide: k } = tn({
|
|
2021
2026
|
anchor: E,
|
|
2022
2027
|
panel: w,
|
|
2023
2028
|
open: y && n === "fixed",
|
|
@@ -2032,7 +2037,7 @@ var _r = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2032
2037
|
if (!y) return;
|
|
2033
2038
|
let e = (e) => {
|
|
2034
2039
|
let t = e.target;
|
|
2035
|
-
C.current?.contains(t) || x.current?.contains(t) ||
|
|
2040
|
+
C.current?.contains(t) || x.current?.contains(t) || pr(S)?.contains(t) || b(!1);
|
|
2036
2041
|
};
|
|
2037
2042
|
return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
|
|
2038
2043
|
}, [
|
|
@@ -2059,7 +2064,7 @@ var _r = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2059
2064
|
return () => cancelAnimationFrame(e);
|
|
2060
2065
|
}, [y, u]), !y) return null;
|
|
2061
2066
|
let A = /* @__PURE__ */ G("div", {
|
|
2062
|
-
ref:
|
|
2067
|
+
ref: Xt(v, C, n === "fixed" ? T : void 0),
|
|
2063
2068
|
role: "menu",
|
|
2064
2069
|
"data-test-id": h,
|
|
2065
2070
|
"data-side": n === "fixed" ? k : void 0,
|
|
@@ -2074,13 +2079,13 @@ var _r = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2074
2079
|
g?.(e), e.stopPropagation();
|
|
2075
2080
|
},
|
|
2076
2081
|
style: n === "fixed" ? O : void 0,
|
|
2077
|
-
className: X(
|
|
2082
|
+
className: X(vr, n === "absolute" && X("absolute top-full mt-1", t === "end" ? "right-0" : "left-0"), d),
|
|
2078
2083
|
..._,
|
|
2079
2084
|
children: e
|
|
2080
2085
|
});
|
|
2081
2086
|
return n === "fixed" ? be(A, D ?? document.body) : A;
|
|
2082
|
-
}),
|
|
2083
|
-
let { setOpen: p } =
|
|
2087
|
+
}), br = a(function({ children: e, onSelect: t, disabled: n, icon: r, shortcut: i, destructive: a, checked: o, meta: s, className: c, dataTestId: l, onClick: u, ...d }, f) {
|
|
2088
|
+
let { setOpen: p } = hr();
|
|
2084
2089
|
return /* @__PURE__ */ K("button", {
|
|
2085
2090
|
ref: f,
|
|
2086
2091
|
type: "button",
|
|
@@ -2117,14 +2122,14 @@ var _r = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2117
2122
|
})
|
|
2118
2123
|
]
|
|
2119
2124
|
});
|
|
2120
|
-
}),
|
|
2125
|
+
}), xr = a(function({ className: e, dataTestId: t, ...n }, r) {
|
|
2121
2126
|
return /* @__PURE__ */ G("hr", {
|
|
2122
2127
|
ref: r,
|
|
2123
2128
|
"data-test-id": t,
|
|
2124
2129
|
className: X("my-1 h-px border-0 bg-border-default", e),
|
|
2125
2130
|
...n
|
|
2126
2131
|
});
|
|
2127
|
-
}),
|
|
2132
|
+
}), Sr = a(function({ children: e, className: t, dataTestId: n, ...r }, i) {
|
|
2128
2133
|
return /* @__PURE__ */ G("div", {
|
|
2129
2134
|
ref: i,
|
|
2130
2135
|
"data-test-id": n,
|
|
@@ -2132,33 +2137,33 @@ var _r = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2132
2137
|
...r,
|
|
2133
2138
|
children: e
|
|
2134
2139
|
});
|
|
2135
|
-
}),
|
|
2140
|
+
}), Cr = {
|
|
2136
2141
|
lg: "py-20 px-6 gap-2",
|
|
2137
2142
|
sm: "py-10 px-4 gap-1"
|
|
2138
|
-
},
|
|
2143
|
+
}, wr = {
|
|
2139
2144
|
lg: "xl",
|
|
2140
2145
|
sm: "lg"
|
|
2141
|
-
},
|
|
2146
|
+
}, Tr = a(function({ size: e = "lg", title: t, description: n, illustration: r, action: i, className: a, dataTestId: o, ...s }, c) {
|
|
2142
2147
|
return /* @__PURE__ */ K("div", {
|
|
2143
2148
|
ref: c,
|
|
2144
2149
|
"data-test-id": o,
|
|
2145
|
-
className: X("flex flex-col items-center justify-center text-center",
|
|
2150
|
+
className: X("flex flex-col items-center justify-center text-center", Cr[e], a),
|
|
2146
2151
|
...s,
|
|
2147
2152
|
children: [
|
|
2148
|
-
r ?? /* @__PURE__ */ G(
|
|
2153
|
+
r ?? /* @__PURE__ */ G(An, {
|
|
2149
2154
|
icon: B,
|
|
2150
2155
|
tone: "gray",
|
|
2151
2156
|
shape: "circle",
|
|
2152
|
-
size:
|
|
2157
|
+
size: wr[e]
|
|
2153
2158
|
}),
|
|
2154
|
-
t && /* @__PURE__ */ G(
|
|
2159
|
+
t && /* @__PURE__ */ G(Fn, {
|
|
2155
2160
|
as: "h3",
|
|
2156
2161
|
variant: e === "lg" ? "h-sm" : "h-xs",
|
|
2157
2162
|
weight: "semibold",
|
|
2158
2163
|
className: "mt-2",
|
|
2159
2164
|
children: t
|
|
2160
2165
|
}),
|
|
2161
|
-
n && /* @__PURE__ */ G(
|
|
2166
|
+
n && /* @__PURE__ */ G(Fn, {
|
|
2162
2167
|
variant: e === "lg" ? "p-sm" : "p-xs",
|
|
2163
2168
|
color: "secondary",
|
|
2164
2169
|
className: "max-w-sm",
|
|
@@ -2170,17 +2175,17 @@ var _r = "min-w-[200px] rounded-lg border border-border-default bg-bg-default sh
|
|
|
2170
2175
|
})
|
|
2171
2176
|
]
|
|
2172
2177
|
});
|
|
2173
|
-
}),
|
|
2178
|
+
}), Er = {
|
|
2174
2179
|
lg: "h-10 px-3 text-p-std gap-2",
|
|
2175
2180
|
md: "h-9 px-2.5 text-p-std gap-1.5",
|
|
2176
2181
|
sm: "h-8 px-2 text-p-sm gap-1.5"
|
|
2177
2182
|
};
|
|
2178
|
-
function
|
|
2183
|
+
function Dr(...e) {
|
|
2179
2184
|
return (t) => {
|
|
2180
2185
|
for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
|
|
2181
2186
|
};
|
|
2182
2187
|
}
|
|
2183
|
-
var
|
|
2188
|
+
var Or = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabled: i, onClear: a, children: o, className: s, dataTestId: c, ...u }, d) {
|
|
2184
2189
|
let [f, h] = m(!1), g = p(null);
|
|
2185
2190
|
l(() => {
|
|
2186
2191
|
if (!f) return;
|
|
@@ -2191,7 +2196,7 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2191
2196
|
}, [f]);
|
|
2192
2197
|
let _ = n || t !== void 0;
|
|
2193
2198
|
return /* @__PURE__ */ K("div", {
|
|
2194
|
-
ref:
|
|
2199
|
+
ref: Dr(d, g),
|
|
2195
2200
|
"data-test-id": c,
|
|
2196
2201
|
className: X("relative inline-flex", s),
|
|
2197
2202
|
...u,
|
|
@@ -2201,7 +2206,7 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2201
2206
|
onClick: () => h((e) => !e),
|
|
2202
2207
|
"aria-haspopup": "dialog",
|
|
2203
2208
|
"aria-expanded": f,
|
|
2204
|
-
className: X("inline-flex items-center rounded-full border transition-colors outline-none",
|
|
2209
|
+
className: X("inline-flex items-center rounded-full border transition-colors outline-none", Er[r], _ ? "bg-brand-20 text-brand-800 border-brand-500" : "bg-bg-default text-fg-default border-border-default", !i && "hover:border-border-strong", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1", i && "bg-bg-container text-fg-disabled cursor-not-allowed"),
|
|
2205
2210
|
children: [
|
|
2206
2211
|
/* @__PURE__ */ G("span", {
|
|
2207
2212
|
className: "font-medium",
|
|
@@ -2237,7 +2242,7 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2237
2242
|
children: o
|
|
2238
2243
|
})]
|
|
2239
2244
|
});
|
|
2240
|
-
}),
|
|
2245
|
+
}), kr = a(function({ children: e, className: t, validationSchema: n, defaultValues: r, buttons: i, mode: a = "onChange", shouldUnregister: o, shouldFocusError: s = !0, formId: c, onSubmit: u, revalidateKey: d, dataTestId: f, ...p }, m) {
|
|
2241
2246
|
let { handleSubmit: h, register: g, setValue: _, control: v, formState: y, getValues: b, watch: x, reset: S, clearErrors: C, setError: w, trigger: T, getFieldState: E, unregister: D } = Ce({
|
|
2242
2247
|
mode: a,
|
|
2243
2248
|
resolver: we(n),
|
|
@@ -2278,7 +2283,7 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2278
2283
|
"data-test-id": f,
|
|
2279
2284
|
className: X("flex flex-col gap-4", t),
|
|
2280
2285
|
...p,
|
|
2281
|
-
children: /* @__PURE__ */ K(
|
|
2286
|
+
children: /* @__PURE__ */ K(rr.Provider, {
|
|
2282
2287
|
value: te,
|
|
2283
2288
|
children: [e, i && i.length > 0 && /* @__PURE__ */ G("div", {
|
|
2284
2289
|
className: "flex items-center gap-3",
|
|
@@ -2287,8 +2292,8 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2287
2292
|
})]
|
|
2288
2293
|
})
|
|
2289
2294
|
});
|
|
2290
|
-
}),
|
|
2291
|
-
let s = c(
|
|
2295
|
+
}), Ar = a(function({ name: e, defaultValue: t, render: n, className: r, dataTestId: i, ...a }, o) {
|
|
2296
|
+
let s = c(rr);
|
|
2292
2297
|
if (!s) throw Error("FormField must be rendered inside a FormContainer.");
|
|
2293
2298
|
return /* @__PURE__ */ G("div", {
|
|
2294
2299
|
ref: o,
|
|
@@ -2314,14 +2319,14 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2314
2319
|
})
|
|
2315
2320
|
})
|
|
2316
2321
|
});
|
|
2317
|
-
}),
|
|
2322
|
+
}), jr = a(function({ icon: e, iconTone: t = "brand", label: n, value: r, action: i, className: a, dataTestId: o, ...s }, c) {
|
|
2318
2323
|
return /* @__PURE__ */ K("div", {
|
|
2319
2324
|
ref: c,
|
|
2320
2325
|
"data-test-id": o,
|
|
2321
2326
|
className: X("flex items-start gap-3", a),
|
|
2322
2327
|
...s,
|
|
2323
2328
|
children: [
|
|
2324
|
-
/* @__PURE__ */ G(
|
|
2329
|
+
/* @__PURE__ */ G(An, {
|
|
2325
2330
|
icon: e,
|
|
2326
2331
|
tone: t,
|
|
2327
2332
|
size: "md"
|
|
@@ -2342,7 +2347,7 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2342
2347
|
})
|
|
2343
2348
|
]
|
|
2344
2349
|
});
|
|
2345
|
-
}),
|
|
2350
|
+
}), Mr = {
|
|
2346
2351
|
success: {
|
|
2347
2352
|
container: "bg-green-50 border-green-200",
|
|
2348
2353
|
iconColor: "text-green-600",
|
|
@@ -2368,8 +2373,8 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2368
2373
|
iconColor: "text-purple-700",
|
|
2369
2374
|
DefaultIcon: fe
|
|
2370
2375
|
}
|
|
2371
|
-
},
|
|
2372
|
-
let { container: u, iconColor: d, DefaultIcon: f } =
|
|
2376
|
+
}, Nr = a(function({ variant: e = "info", title: t, description: n, onDismiss: r, actions: i, icon: a, className: o, dataTestId: s, ...c }, l) {
|
|
2377
|
+
let { container: u, iconColor: d, DefaultIcon: f } = Mr[e];
|
|
2373
2378
|
return /* @__PURE__ */ K("div", {
|
|
2374
2379
|
ref: l,
|
|
2375
2380
|
role: "alert",
|
|
@@ -2410,13 +2415,13 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2410
2415
|
})
|
|
2411
2416
|
]
|
|
2412
2417
|
});
|
|
2413
|
-
}),
|
|
2418
|
+
}), Pr = a(function({ variant: e = "p-std", weight: t, color: n = "brand", underline: r = "hover", leftIcon: i, rightIcon: a, truncate: o, className: s, children: c, dataTestId: l, target: u, rel: d, ...f }, p) {
|
|
2414
2419
|
let m = {
|
|
2415
2420
|
...f,
|
|
2416
2421
|
target: u,
|
|
2417
2422
|
rel: d ?? (u === "_blank" ? "noopener noreferrer" : void 0)
|
|
2418
2423
|
};
|
|
2419
|
-
return /* @__PURE__ */ K(
|
|
2424
|
+
return /* @__PURE__ */ K(Fn, {
|
|
2420
2425
|
as: "a",
|
|
2421
2426
|
ref: p,
|
|
2422
2427
|
variant: e,
|
|
@@ -2438,15 +2443,15 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2438
2443
|
})
|
|
2439
2444
|
]
|
|
2440
2445
|
});
|
|
2441
|
-
}),
|
|
2446
|
+
}), Fr = {
|
|
2442
2447
|
sm: "max-w-sm",
|
|
2443
2448
|
md: "max-w-md",
|
|
2444
2449
|
lg: "max-w-lg",
|
|
2445
2450
|
xl: "max-w-2xl",
|
|
2446
2451
|
"2xl": "max-w-4xl"
|
|
2447
|
-
},
|
|
2452
|
+
}, Ir = a(function({ open: e, onClose: t, title: n, description: r, children: i, footer: a, size: o = "md", closeOnOverlayClick: s = !0, showClose: c = !0, className: u, dataTestId: d }, f) {
|
|
2448
2453
|
let h = p(null), [g, _] = m(null), v = p(null);
|
|
2449
|
-
if (
|
|
2454
|
+
if (er(e), l(() => {
|
|
2450
2455
|
let t = h.current;
|
|
2451
2456
|
if (!(!e || !t || t.open)) return t.showModal(), v.current?.focus(), () => {
|
|
2452
2457
|
t.open && t.close();
|
|
@@ -2457,7 +2462,7 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2457
2462
|
return v.current?.focus(), () => t?.focus?.();
|
|
2458
2463
|
}, [e]), !e) return null;
|
|
2459
2464
|
let y = /* @__PURE__ */ K("dialog", {
|
|
2460
|
-
ref:
|
|
2465
|
+
ref: Xt(h, _),
|
|
2461
2466
|
onCancel: (e) => {
|
|
2462
2467
|
e.preventDefault(), t();
|
|
2463
2468
|
},
|
|
@@ -2469,10 +2474,10 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2469
2474
|
onClick: () => s && t(),
|
|
2470
2475
|
"aria-hidden": !0
|
|
2471
2476
|
}), /* @__PURE__ */ K("div", {
|
|
2472
|
-
ref:
|
|
2477
|
+
ref: Xt(v, f),
|
|
2473
2478
|
tabIndex: -1,
|
|
2474
2479
|
"data-test-id": d,
|
|
2475
|
-
className: X("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]",
|
|
2480
|
+
className: X("relative w-full bg-bg-default rounded-xl shadow-z5 outline-none flex flex-col max-h-[90vh]", Fr[o], u),
|
|
2476
2481
|
children: [
|
|
2477
2482
|
(n || c) && /* @__PURE__ */ K("div", {
|
|
2478
2483
|
className: "flex items-start justify-between gap-4 px-6 pt-6 pb-4",
|
|
@@ -2507,33 +2512,33 @@ var Dr = a(function({ label: e, value: t, active: n = !1, size: r = "md", disabl
|
|
|
2507
2512
|
]
|
|
2508
2513
|
})]
|
|
2509
2514
|
});
|
|
2510
|
-
return be(/* @__PURE__ */ G(
|
|
2515
|
+
return be(/* @__PURE__ */ G(Zt.Provider, {
|
|
2511
2516
|
value: g,
|
|
2512
2517
|
children: y
|
|
2513
2518
|
}), document.body);
|
|
2514
|
-
}),
|
|
2519
|
+
}), Lr = {
|
|
2515
2520
|
brand: "bg-brand-500 text-white",
|
|
2516
2521
|
danger: "bg-red-600 text-white",
|
|
2517
2522
|
success: "bg-green-600 text-white",
|
|
2518
2523
|
warning: "bg-yellow-600 text-gray-900 dark:text-gray-900",
|
|
2519
2524
|
info: "bg-blue-600 text-white"
|
|
2520
|
-
},
|
|
2525
|
+
}, Rr = {
|
|
2521
2526
|
lg: "min-w-[18px] h-[18px] px-1 text-[11px]",
|
|
2522
2527
|
sm: "min-w-[14px] h-[14px] px-0.5 text-[10px]"
|
|
2523
|
-
},
|
|
2528
|
+
}, zr = {
|
|
2524
2529
|
lg: "h-2.5 w-2.5",
|
|
2525
2530
|
sm: "h-1.5 w-1.5"
|
|
2526
2531
|
};
|
|
2527
|
-
function
|
|
2532
|
+
function Br(e, t) {
|
|
2528
2533
|
return e > t ? `${t}+` : e >= 1e3 ? `${(e / 1e3).toFixed(0)}K` : String(e);
|
|
2529
2534
|
}
|
|
2530
|
-
var
|
|
2535
|
+
var Vr = a(function({ count: e = 0, max: t = 99, kind: n = "count", size: r = "lg", variant: i = "danger", children: a, showZero: o = !1, className: s, dataTestId: c, ...l }, u) {
|
|
2531
2536
|
let d = n === "dot" || e > 0 || o, f = a != null && a !== !1, p = d ? /* @__PURE__ */ G("span", {
|
|
2532
2537
|
ref: u,
|
|
2533
2538
|
"data-test-id": c,
|
|
2534
|
-
className: X("inline-flex items-center justify-center rounded-full font-semibold ring-2 ring-white",
|
|
2539
|
+
className: X("inline-flex items-center justify-center rounded-full font-semibold ring-2 ring-white", Lr[i], n === "count" ? Rr[r] : zr[r], f ? "absolute -top-1 -right-1" : "static", s),
|
|
2535
2540
|
...l,
|
|
2536
|
-
children: n === "count" &&
|
|
2541
|
+
children: n === "count" && Br(e, t)
|
|
2537
2542
|
}) : null;
|
|
2538
2543
|
return f ? /* @__PURE__ */ K("span", {
|
|
2539
2544
|
className: "relative inline-flex",
|
|
@@ -2542,7 +2547,7 @@ var Br = a(function({ count: e = 0, max: t = 99, kind: n = "count", size: r = "l
|
|
|
2542
2547
|
});
|
|
2543
2548
|
//#endregion
|
|
2544
2549
|
//#region src/components/Pagination/Pagination.tsx
|
|
2545
|
-
function
|
|
2550
|
+
function Hr(e, t, n, r) {
|
|
2546
2551
|
if (t <= n * 2 + 3 + r * 2) return Array.from({ length: t }, (e, t) => t + 1);
|
|
2547
2552
|
let i = Math.max(e - n, r + 2), a = Math.min(e + n, t - r - 1), o = i > r + 2, s = a < t - r - 1, c = Array.from({ length: r }, (e, t) => t + 1), l = Array.from({ length: r }, (e, n) => t - r + 1 + n), u = [];
|
|
2548
2553
|
if (o) {
|
|
@@ -2557,8 +2562,8 @@ function Vr(e, t, n, r) {
|
|
|
2557
2562
|
...l
|
|
2558
2563
|
];
|
|
2559
2564
|
}
|
|
2560
|
-
var
|
|
2561
|
-
let u =
|
|
2565
|
+
var Ur = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300", Wr = "text-fg-default hover:bg-bg-subtle disabled:text-fg-disabled disabled:hover:bg-transparent disabled:cursor-not-allowed", Gr = a(function({ page: e, pageCount: t, onPageChange: n, siblingCount: r = 1, boundaryCount: i = 1, className: a, dataTestId: o, "aria-label": s, ...c }, l) {
|
|
2566
|
+
let u = Hr(e, t, r, i), d = e <= 1, f = e >= t, p = Z(o);
|
|
2562
2567
|
return /* @__PURE__ */ K("nav", {
|
|
2563
2568
|
ref: l,
|
|
2564
2569
|
"aria-label": s ?? "Pagination",
|
|
@@ -2572,7 +2577,7 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2572
2577
|
disabled: d,
|
|
2573
2578
|
"data-test-id": p("pagination-prev-page"),
|
|
2574
2579
|
"aria-label": "Previous page",
|
|
2575
|
-
className: X(
|
|
2580
|
+
className: X(Ur, Wr),
|
|
2576
2581
|
children: /* @__PURE__ */ G(C, { className: "h-4 w-4" })
|
|
2577
2582
|
}),
|
|
2578
2583
|
u.map((t, r) => {
|
|
@@ -2588,7 +2593,7 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2588
2593
|
"aria-current": i ? "page" : void 0,
|
|
2589
2594
|
"data-test-id": p("pagination-page-link"),
|
|
2590
2595
|
"data-page": t,
|
|
2591
|
-
className: X(
|
|
2596
|
+
className: X(Ur, i ? "bg-brand-500 text-white font-semibold hover:bg-brand-600" : "text-fg-default hover:bg-bg-subtle"),
|
|
2592
2597
|
children: t
|
|
2593
2598
|
}, t);
|
|
2594
2599
|
}),
|
|
@@ -2598,12 +2603,12 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2598
2603
|
disabled: f,
|
|
2599
2604
|
"aria-label": "Next page",
|
|
2600
2605
|
"data-test-id": p("pagination-next-page"),
|
|
2601
|
-
className: X(
|
|
2606
|
+
className: X(Ur, Wr),
|
|
2602
2607
|
children: /* @__PURE__ */ G(w, { className: "h-4 w-4" })
|
|
2603
2608
|
})
|
|
2604
2609
|
]
|
|
2605
2610
|
});
|
|
2606
|
-
}),
|
|
2611
|
+
}), Kr = {
|
|
2607
2612
|
sm: {
|
|
2608
2613
|
padding: "px-3 py-2",
|
|
2609
2614
|
avatar: "sm",
|
|
@@ -2614,12 +2619,12 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2614
2619
|
avatar: "md",
|
|
2615
2620
|
gap: "gap-3"
|
|
2616
2621
|
}
|
|
2617
|
-
},
|
|
2622
|
+
}, qr = {
|
|
2618
2623
|
default: "border-border-default bg-bg-default hover:border-fg-tertiary/40",
|
|
2619
2624
|
highlight: "border-brand-500 bg-brand-200/15 dark:bg-brand-500/10 ring-1 ring-brand-500/40",
|
|
2620
2625
|
warning: "border-yellow-500 bg-yellow-50 dark:bg-yellow-900/20"
|
|
2621
|
-
},
|
|
2622
|
-
let d =
|
|
2626
|
+
}, Jr = a(function({ name: e, role: t, avatar: n, variant: r = "default", size: i = "md", badge: a, onClick: o, className: s, dataTestId: c, ...l }, u) {
|
|
2627
|
+
let d = Kr[i], f = qr[r], p = /* @__PURE__ */ K(W, { children: [
|
|
2623
2628
|
/* @__PURE__ */ G(Tt, {
|
|
2624
2629
|
src: n,
|
|
2625
2630
|
name: e,
|
|
@@ -2655,22 +2660,22 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2655
2660
|
...l,
|
|
2656
2661
|
children: p
|
|
2657
2662
|
});
|
|
2658
|
-
}),
|
|
2663
|
+
}), Yr = {
|
|
2659
2664
|
sm: 29,
|
|
2660
2665
|
lg: 45
|
|
2661
|
-
},
|
|
2666
|
+
}, Xr = {
|
|
2662
2667
|
sm: 2,
|
|
2663
2668
|
lg: 4
|
|
2664
|
-
},
|
|
2669
|
+
}, Zr = {
|
|
2665
2670
|
sm: "h-1",
|
|
2666
2671
|
lg: "h-2"
|
|
2667
|
-
},
|
|
2672
|
+
}, Qr = {
|
|
2668
2673
|
sm: "text-p-xs",
|
|
2669
2674
|
lg: "text-p-sm"
|
|
2670
|
-
},
|
|
2675
|
+
}, $r = a(function({ variant: e = "linear", size: t = "lg", percent: n = 0, stepCount: r, currentStep: i, hideLabel: a = !1, dimension: o, loop: s = !1, className: c, dataTestId: l, ...u }, d) {
|
|
2671
2676
|
let f = r && i ? i / r * 100 : n, p = Math.min(100, Math.max(0, f)), m = r ? `${i}/${r}` : `${Math.round(p)}%`;
|
|
2672
2677
|
if (e === "circular") {
|
|
2673
|
-
let e = o ??
|
|
2678
|
+
let e = o ?? Yr[t], n = e - 5, r = 2 * n * Math.PI, i = Xr[t];
|
|
2674
2679
|
return /* @__PURE__ */ K("div", {
|
|
2675
2680
|
ref: d,
|
|
2676
2681
|
role: "progressbar",
|
|
@@ -2709,7 +2714,7 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2709
2714
|
}
|
|
2710
2715
|
})]
|
|
2711
2716
|
}), !a && !s && /* @__PURE__ */ G("span", {
|
|
2712
|
-
className: X("absolute text-fg-secondary",
|
|
2717
|
+
className: X("absolute text-fg-secondary", Qr[t]),
|
|
2713
2718
|
"data-test-id": l ? `${l}-text` : void 0,
|
|
2714
2719
|
children: m
|
|
2715
2720
|
})]
|
|
@@ -2726,18 +2731,18 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2726
2731
|
className: X("flex w-full items-center gap-2", c),
|
|
2727
2732
|
...u,
|
|
2728
2733
|
children: [/* @__PURE__ */ G("div", {
|
|
2729
|
-
className: X("w-full overflow-hidden rounded-full bg-bg-subtle",
|
|
2734
|
+
className: X("w-full overflow-hidden rounded-full bg-bg-subtle", Zr[t]),
|
|
2730
2735
|
children: /* @__PURE__ */ G("div", {
|
|
2731
2736
|
className: "h-full rounded-full bg-brand-500 transition-all duration-300 ease-linear",
|
|
2732
2737
|
style: { width: `${p}%` }
|
|
2733
2738
|
})
|
|
2734
2739
|
}), !a && /* @__PURE__ */ G("span", {
|
|
2735
|
-
className: X("shrink-0 text-fg-secondary",
|
|
2740
|
+
className: X("shrink-0 text-fg-secondary", Qr[t]),
|
|
2736
2741
|
"data-test-id": l ? `${l}-text` : void 0,
|
|
2737
2742
|
children: m
|
|
2738
2743
|
})]
|
|
2739
2744
|
});
|
|
2740
|
-
}),
|
|
2745
|
+
}), ei = r(null), ti = a(function({ name: e, label: t, value: n, defaultValue: r, onChange: i, disabled: a, required: o, error: s, errorText: c, helperText: l, size: d = "md", orientation: f = "vertical", children: p, className: m, wrapperClassName: h, dataTestId: g }, _) {
|
|
2741
2746
|
let v = u(), y = e ?? v, b = `${v}-label`, x = s || !!c, S = c ? `${v}-error` : l ? `${v}-help` : void 0, C = /* @__PURE__ */ G("div", {
|
|
2742
2747
|
ref: _,
|
|
2743
2748
|
role: "radiogroup",
|
|
@@ -2749,7 +2754,7 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2749
2754
|
className: X("flex gap-3", f === "vertical" ? "flex-col" : "flex-row flex-wrap items-center gap-4", m),
|
|
2750
2755
|
children: p
|
|
2751
2756
|
});
|
|
2752
|
-
return /* @__PURE__ */ G(
|
|
2757
|
+
return /* @__PURE__ */ G(ei.Provider, {
|
|
2753
2758
|
value: {
|
|
2754
2759
|
name: y,
|
|
2755
2760
|
value: n,
|
|
@@ -2780,14 +2785,14 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2780
2785
|
]
|
|
2781
2786
|
}) : C
|
|
2782
2787
|
});
|
|
2783
|
-
}),
|
|
2788
|
+
}), ni = {
|
|
2784
2789
|
md: "h-5 w-5",
|
|
2785
2790
|
sm: "h-4 w-4"
|
|
2786
|
-
},
|
|
2791
|
+
}, ri = {
|
|
2787
2792
|
md: "h-2 w-2",
|
|
2788
2793
|
sm: "h-1.5 w-1.5"
|
|
2789
|
-
},
|
|
2790
|
-
let g = c(
|
|
2794
|
+
}, ii = a(function({ value: e, size: t, label: n, description: r, error: i = !1, id: a, disabled: o, checked: s, defaultChecked: l, onChange: d, className: f, dataTestId: p, ...m }, h) {
|
|
2795
|
+
let g = c(ei), _ = u(), v = a ?? _, y = t ?? g?.size ?? "md", b = o ?? g?.disabled, x = i || !!g?.error, S = g !== null, C = S && g.value !== void 0 ? $e(g.value, e) : void 0, w = S && g.defaultValue !== void 0 ? $e(g.defaultValue, e) : void 0, T = S ? C : s, E = S ? w : l;
|
|
2791
2796
|
return /* @__PURE__ */ K("label", {
|
|
2792
2797
|
htmlFor: v,
|
|
2793
2798
|
"data-test-id": p,
|
|
@@ -2810,8 +2815,8 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2810
2815
|
"aria-invalid": x || void 0,
|
|
2811
2816
|
...m
|
|
2812
2817
|
}), /* @__PURE__ */ G("span", {
|
|
2813
|
-
className: X("flex items-center justify-center rounded-full border bg-bg-default transition-colors",
|
|
2814
|
-
children: /* @__PURE__ */ G("span", { className: X("rounded-full bg-brand-500 transition-opacity",
|
|
2818
|
+
className: X("flex items-center justify-center rounded-full border bg-bg-default transition-colors", ni[y], x ? "border-red-600" : "border-border-strong", !b && !x && "peer-hover:border-fg-tertiary", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-1", "peer-checked:border-brand-500", b && "!bg-bg-subtle !border-border-default", "[&>span]:opacity-0 peer-checked:[&>span]:opacity-100"),
|
|
2819
|
+
children: /* @__PURE__ */ G("span", { className: X("rounded-full bg-brand-500 transition-opacity", ri[y], b && "!bg-fg-disabled") })
|
|
2815
2820
|
})]
|
|
2816
2821
|
}), (n || r) && /* @__PURE__ */ K("span", {
|
|
2817
2822
|
className: "flex flex-col gap-0.5",
|
|
@@ -2824,7 +2829,7 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2824
2829
|
})]
|
|
2825
2830
|
})]
|
|
2826
2831
|
});
|
|
2827
|
-
}),
|
|
2832
|
+
}), ai = a(function({ children: e, clamp: t = 3, collapsedContent: n, expandLabel: r = "Show more", collapseLabel: i = "Show less", defaultExpanded: a = !1, expanded: o, onExpandedChange: s, textProps: c, className: l, dataTestId: d, ...f }, p) {
|
|
2828
2833
|
let [h, g] = m(a), _ = o !== void 0, v = _ ? o : h, y = u(), b = () => {
|
|
2829
2834
|
let e = !v;
|
|
2830
2835
|
_ || g(e), s?.(e);
|
|
@@ -2834,7 +2839,7 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2834
2839
|
"data-test-id": d,
|
|
2835
2840
|
className: X("flex flex-col gap-1", l),
|
|
2836
2841
|
...f,
|
|
2837
|
-
children: [/* @__PURE__ */ G(
|
|
2842
|
+
children: [/* @__PURE__ */ G(Fn, {
|
|
2838
2843
|
id: y,
|
|
2839
2844
|
clamp: v ? void 0 : t,
|
|
2840
2845
|
...c,
|
|
@@ -2853,7 +2858,7 @@ var Hr = "inline-flex items-center justify-center min-w-9 h-9 px-2 text-p-std ro
|
|
|
2853
2858
|
});
|
|
2854
2859
|
//#endregion
|
|
2855
2860
|
//#region src/components/SelectV2/useVisibleTagCount.ts
|
|
2856
|
-
function
|
|
2861
|
+
function oi({ wrapperRef: e, measureRef: t, total: n, labelsKey: r, enabled: i }) {
|
|
2857
2862
|
let [a, o] = m(n);
|
|
2858
2863
|
return d(() => {
|
|
2859
2864
|
if (!i) return;
|
|
@@ -2897,7 +2902,7 @@ function ai({ wrapperRef: e, measureRef: t, total: n, labelsKey: r, enabled: i }
|
|
|
2897
2902
|
}
|
|
2898
2903
|
//#endregion
|
|
2899
2904
|
//#region src/components/SelectV2/SelectV2.i18n.ts
|
|
2900
|
-
var
|
|
2905
|
+
var si = {
|
|
2901
2906
|
"en-US": {
|
|
2902
2907
|
placeholder: "Select…",
|
|
2903
2908
|
noResults: "No results",
|
|
@@ -2925,25 +2930,25 @@ var oi = {
|
|
|
2925
2930
|
createLabel: (e) => `Ստեղծել «${e}»`,
|
|
2926
2931
|
saveSelectionLabel: "Պահպանել ձևանմուշը"
|
|
2927
2932
|
}
|
|
2928
|
-
},
|
|
2933
|
+
}, ci = {
|
|
2929
2934
|
lg: "min-h-12 text-p-md",
|
|
2930
2935
|
md: "min-h-10 text-p-std",
|
|
2931
2936
|
sm: "min-h-8 text-p-sm"
|
|
2932
|
-
},
|
|
2937
|
+
}, li = {
|
|
2933
2938
|
lg: "px-3.5 py-1.5",
|
|
2934
2939
|
md: "px-3 py-1",
|
|
2935
2940
|
sm: "px-2.5 py-0.5"
|
|
2936
|
-
},
|
|
2937
|
-
function
|
|
2941
|
+
}, ui = "flex items-center gap-1 rounded-md bg-bg-subtle pl-2 pr-1 py-0.5 max-w-full", di = "truncate text-p-sm text-fg-default", fi = "rounded-sm text-fg-secondary hover:bg-bg-container hover:text-fg-default cursor-pointer", pi = "flex items-center rounded-md bg-bg-info-lighter px-2 py-0.5 text-p-sm text-blue-800 dark:text-blue-300 shrink-0";
|
|
2942
|
+
function mi(e) {
|
|
2938
2943
|
return e.searchText ?? (typeof e.label == "string" ? e.label : String(e.value));
|
|
2939
2944
|
}
|
|
2940
|
-
function
|
|
2945
|
+
function hi(e, t) {
|
|
2941
2946
|
let n = t.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
2942
2947
|
if (n.length === 0) return !0;
|
|
2943
|
-
let r = `${
|
|
2948
|
+
let r = `${mi(e)} ${String(e.value)}`.toLowerCase();
|
|
2944
2949
|
return n.every((e) => r.includes(e));
|
|
2945
2950
|
}
|
|
2946
|
-
function
|
|
2951
|
+
function gi(e) {
|
|
2947
2952
|
try {
|
|
2948
2953
|
let t = window.localStorage.getItem(e);
|
|
2949
2954
|
return t === null ? void 0 : JSON.parse(t);
|
|
@@ -2951,41 +2956,41 @@ function hi(e) {
|
|
|
2951
2956
|
return;
|
|
2952
2957
|
}
|
|
2953
2958
|
}
|
|
2954
|
-
function
|
|
2959
|
+
function _i(e) {
|
|
2955
2960
|
try {
|
|
2956
2961
|
return window.localStorage.getItem(e) !== null;
|
|
2957
2962
|
} catch {
|
|
2958
2963
|
return !1;
|
|
2959
2964
|
}
|
|
2960
2965
|
}
|
|
2961
|
-
function
|
|
2966
|
+
function vi(e, t) {
|
|
2962
2967
|
try {
|
|
2963
2968
|
window.localStorage.setItem(e, JSON.stringify(t));
|
|
2964
2969
|
} catch {}
|
|
2965
2970
|
}
|
|
2966
|
-
function
|
|
2971
|
+
function yi(e) {
|
|
2967
2972
|
try {
|
|
2968
2973
|
window.localStorage.removeItem(e);
|
|
2969
2974
|
} catch {}
|
|
2970
2975
|
}
|
|
2971
|
-
function
|
|
2976
|
+
function bi(e, t, n) {
|
|
2972
2977
|
return {
|
|
2973
2978
|
container: () => "w-full",
|
|
2974
|
-
control: ({ isFocused: n, isDisabled: r }) => X("flex items-center rounded-lg border bg-bg-default transition-colors", r ? "cursor-not-allowed" : "cursor-text",
|
|
2975
|
-
valueContainer: () => X("flex flex-1 items-center gap-1 min-w-0 sv2-value-container", n ? "flex-nowrap! overflow-hidden" : "flex-wrap",
|
|
2979
|
+
control: ({ isFocused: n, isDisabled: r }) => X("flex items-center rounded-lg border bg-bg-default transition-colors", r ? "cursor-not-allowed" : "cursor-text", ci[e], t ? "border-red-600" : "border-border-default", !r && !t && "hover:border-border-strong", n && !t && "ring-2 ring-brand-300 border-brand-500", n && t && "ring-2 ring-red-300 border-red-600", r && "bg-bg-container border-border-default"),
|
|
2980
|
+
valueContainer: () => X("flex flex-1 items-center gap-1 min-w-0 sv2-value-container", n ? "flex-nowrap! overflow-hidden" : "flex-wrap", li[e]),
|
|
2976
2981
|
placeholder: () => "text-fg-tertiary truncate",
|
|
2977
2982
|
singleValue: () => "text-fg-default truncate min-w-0",
|
|
2978
2983
|
input: () => "text-fg-default",
|
|
2979
|
-
multiValue: () =>
|
|
2980
|
-
multiValueLabel: () =>
|
|
2981
|
-
multiValueRemove: () =>
|
|
2984
|
+
multiValue: () => ui,
|
|
2985
|
+
multiValueLabel: () => di,
|
|
2986
|
+
multiValueRemove: () => fi,
|
|
2982
2987
|
indicatorsContainer: () => "flex items-center gap-1 pr-2 shrink-0",
|
|
2983
2988
|
clearIndicator: () => "text-fg-secondary hover:text-fg-default cursor-pointer p-0.5",
|
|
2984
2989
|
dropdownIndicator: () => "text-fg-secondary p-0.5",
|
|
2985
2990
|
indicatorSeparator: () => "hidden",
|
|
2986
|
-
menu: ({ placement: e }) => X("rounded-lg border border-border-default bg-bg-default shadow-z4 overflow-hidden z-50
|
|
2991
|
+
menu: ({ placement: e }) => X("rounded-lg border border-border-default bg-bg-default shadow-z4 overflow-hidden z-50", e === "top" ? "mb-1" : "mt-1"),
|
|
2987
2992
|
menuList: () => "max-h-60 overflow-y-auto py-1",
|
|
2988
|
-
menuPortal: () => "z-50
|
|
2993
|
+
menuPortal: () => "z-50",
|
|
2989
2994
|
group: () => "py-1",
|
|
2990
2995
|
groupHeading: () => "px-3 pt-2 pb-1 text-label-sm font-medium uppercase tracking-wide text-fg-tertiary select-none",
|
|
2991
2996
|
option: ({ isFocused: e, isSelected: t, isDisabled: n }) => X("flex! items-center justify-between gap-2 px-3 py-2 cursor-pointer select-none", n && "opacity-50 cursor-not-allowed", e && !n && "bg-bg-subtle", t && "font-medium"),
|
|
@@ -2995,32 +3000,32 @@ function yi(e, t, n) {
|
|
|
2995
3000
|
}
|
|
2996
3001
|
//#endregion
|
|
2997
3002
|
//#region src/components/SelectV2/SelectV2.tsx
|
|
2998
|
-
var
|
|
2999
|
-
function
|
|
3003
|
+
var xi = 36;
|
|
3004
|
+
function Si(e, t) {
|
|
3000
3005
|
let { dataTestId: n } = e;
|
|
3001
3006
|
return Z(n)(t);
|
|
3002
3007
|
}
|
|
3003
|
-
function
|
|
3008
|
+
function Ci(e, t) {
|
|
3004
3009
|
return {
|
|
3005
3010
|
...e,
|
|
3006
3011
|
"data-test-id": t
|
|
3007
3012
|
};
|
|
3008
3013
|
}
|
|
3009
|
-
function
|
|
3014
|
+
function wi(e) {
|
|
3010
3015
|
return /* @__PURE__ */ G(q.Control, {
|
|
3011
3016
|
...e,
|
|
3012
|
-
innerProps:
|
|
3017
|
+
innerProps: Ci(e.innerProps, Si(e.selectProps, "trigger"))
|
|
3013
3018
|
});
|
|
3014
3019
|
}
|
|
3015
|
-
function
|
|
3016
|
-
let t = { "data-test-id":
|
|
3020
|
+
function Ti(e) {
|
|
3021
|
+
let t = { "data-test-id": Si(e.selectProps, "search") }, { inputValueControlled: n } = e.selectProps;
|
|
3017
3022
|
return /* @__PURE__ */ G(q.Input, {
|
|
3018
3023
|
...e,
|
|
3019
3024
|
...t,
|
|
3020
3025
|
isHidden: !n && e.isHidden
|
|
3021
3026
|
});
|
|
3022
3027
|
}
|
|
3023
|
-
function
|
|
3028
|
+
function Ei(e) {
|
|
3024
3029
|
let { dropdownIcon: t } = e.selectProps;
|
|
3025
3030
|
return /* @__PURE__ */ G(q.DropdownIndicator, {
|
|
3026
3031
|
...e,
|
|
@@ -3030,22 +3035,22 @@ function Ti(e) {
|
|
|
3030
3035
|
})
|
|
3031
3036
|
});
|
|
3032
3037
|
}
|
|
3033
|
-
function
|
|
3038
|
+
function Di(e) {
|
|
3034
3039
|
return /* @__PURE__ */ G(q.ClearIndicator, {
|
|
3035
3040
|
...e,
|
|
3036
|
-
innerProps:
|
|
3041
|
+
innerProps: Ci(e.innerProps, Si(e.selectProps, "clear")),
|
|
3037
3042
|
children: /* @__PURE__ */ G(H, {
|
|
3038
3043
|
className: "h-3.5 w-3.5",
|
|
3039
3044
|
"aria-hidden": !0
|
|
3040
3045
|
})
|
|
3041
3046
|
});
|
|
3042
3047
|
}
|
|
3043
|
-
function
|
|
3048
|
+
function Oi(e) {
|
|
3044
3049
|
return /* @__PURE__ */ G(q.MultiValueRemove, {
|
|
3045
3050
|
...e,
|
|
3046
3051
|
innerProps: {
|
|
3047
3052
|
...e.innerProps,
|
|
3048
|
-
"aria-label": `Remove ${
|
|
3053
|
+
"aria-label": `Remove ${mi(e.data)}`
|
|
3049
3054
|
},
|
|
3050
3055
|
children: /* @__PURE__ */ G(H, {
|
|
3051
3056
|
className: "h-3 w-3",
|
|
@@ -3053,43 +3058,43 @@ function Di(e) {
|
|
|
3053
3058
|
})
|
|
3054
3059
|
});
|
|
3055
3060
|
}
|
|
3056
|
-
function
|
|
3061
|
+
function ki(e) {
|
|
3057
3062
|
let { visibleTagCount: t } = e.selectProps;
|
|
3058
3063
|
return t === void 0 || e.index < t ? /* @__PURE__ */ G(q.MultiValue, { ...e }) : e.index === t ? /* @__PURE__ */ K("span", {
|
|
3059
|
-
className:
|
|
3064
|
+
className: pi,
|
|
3060
3065
|
children: ["+", (Array.isArray(e.selectProps.value) ? e.selectProps.value.length : 0) - t]
|
|
3061
3066
|
}) : null;
|
|
3062
3067
|
}
|
|
3063
|
-
function
|
|
3068
|
+
function Ai(e) {
|
|
3064
3069
|
return /* @__PURE__ */ K(q.Option, {
|
|
3065
3070
|
...e,
|
|
3066
|
-
innerProps:
|
|
3071
|
+
innerProps: Ci(e.innerProps, Si(e.selectProps, `option-${String(e.data.value)}`)),
|
|
3067
3072
|
children: [e.children, e.isSelected && /* @__PURE__ */ G(b, {
|
|
3068
3073
|
className: "h-4 w-4 text-fg-brand shrink-0",
|
|
3069
3074
|
"aria-hidden": !0
|
|
3070
3075
|
})]
|
|
3071
3076
|
});
|
|
3072
3077
|
}
|
|
3073
|
-
function
|
|
3078
|
+
function ji() {
|
|
3074
3079
|
return /* @__PURE__ */ G(F, {
|
|
3075
3080
|
className: "h-4 w-4 animate-spin text-fg-secondary",
|
|
3076
3081
|
"aria-hidden": !0
|
|
3077
3082
|
});
|
|
3078
3083
|
}
|
|
3079
|
-
function
|
|
3084
|
+
function Mi(e) {
|
|
3080
3085
|
let { selectAllState: t, onSelectAllToggle: n, saveSelectionState: r, onSaveSelectionToggle: i } = e.selectProps;
|
|
3081
3086
|
return /* @__PURE__ */ K(q.Menu, {
|
|
3082
3087
|
...e,
|
|
3083
|
-
innerProps:
|
|
3088
|
+
innerProps: Ci(e.innerProps, Si(e.selectProps, "content")),
|
|
3084
3089
|
children: [
|
|
3085
3090
|
t && /* @__PURE__ */ G("div", {
|
|
3086
|
-
"data-test-id":
|
|
3091
|
+
"data-test-id": Si(e.selectProps, "select-all"),
|
|
3087
3092
|
className: "border-b border-border-default px-3 py-2",
|
|
3088
3093
|
onMouseDown: (e) => e.preventDefault(),
|
|
3089
3094
|
onClick: (e) => {
|
|
3090
3095
|
e.preventDefault(), n?.();
|
|
3091
3096
|
},
|
|
3092
|
-
children: /* @__PURE__ */ G(
|
|
3097
|
+
children: /* @__PURE__ */ G(Yt, {
|
|
3093
3098
|
size: "sm",
|
|
3094
3099
|
checked: t.checked,
|
|
3095
3100
|
indeterminate: t.indeterminate,
|
|
@@ -3099,7 +3104,7 @@ function ji(e) {
|
|
|
3099
3104
|
}),
|
|
3100
3105
|
e.children,
|
|
3101
3106
|
r && /* @__PURE__ */ G("div", {
|
|
3102
|
-
"data-test-id":
|
|
3107
|
+
"data-test-id": Si(e.selectProps, "save_template"),
|
|
3103
3108
|
role: "button",
|
|
3104
3109
|
tabIndex: 0,
|
|
3105
3110
|
"aria-pressed": r.checked,
|
|
@@ -3111,7 +3116,7 @@ function ji(e) {
|
|
|
3111
3116
|
onKeyDown: (e) => {
|
|
3112
3117
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), i?.());
|
|
3113
3118
|
},
|
|
3114
|
-
children: /* @__PURE__ */ G(
|
|
3119
|
+
children: /* @__PURE__ */ G(Yt, {
|
|
3115
3120
|
size: "sm",
|
|
3116
3121
|
checked: r.checked,
|
|
3117
3122
|
label: r.label,
|
|
@@ -3121,16 +3126,16 @@ function ji(e) {
|
|
|
3121
3126
|
]
|
|
3122
3127
|
});
|
|
3123
3128
|
}
|
|
3124
|
-
function
|
|
3129
|
+
function Ni(t) {
|
|
3125
3130
|
let { children: n, innerRef: r, innerProps: i, maxHeight: a } = t, o = e.toArray(n), s = p(null), c = ke({
|
|
3126
3131
|
count: o.length,
|
|
3127
3132
|
getScrollElement: () => s.current,
|
|
3128
|
-
estimateSize: () =>
|
|
3133
|
+
estimateSize: () => xi,
|
|
3129
3134
|
overscan: 8
|
|
3130
3135
|
});
|
|
3131
3136
|
return /* @__PURE__ */ G("div", {
|
|
3132
3137
|
...i,
|
|
3133
|
-
ref:
|
|
3138
|
+
ref: Xt(r, s),
|
|
3134
3139
|
className: "overflow-y-auto py-1",
|
|
3135
3140
|
style: { maxHeight: a },
|
|
3136
3141
|
children: /* @__PURE__ */ G("div", {
|
|
@@ -3152,11 +3157,11 @@ function Mi(t) {
|
|
|
3152
3157
|
})
|
|
3153
3158
|
});
|
|
3154
3159
|
}
|
|
3155
|
-
var
|
|
3156
|
-
let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti: d, value: h, defaultValue: g, onChange: _, placeholder: v, label: y, labelAddons: b, dropdownIcon: x, helperText: S, errorText: C, error: w = !1, required: T = !0, loading: E = !1, clearable: D = !1, searchable: O, virtualized: k = !1, emptyText: A, locale: j = "en-US", storageKey: M, saveSelectionLabel: N, size: ee = "md", disabled: te = !1, id: P, className: F, wrapperClassName: I, dataTestId: L, inputValue: ne, onInputChange: re, ...R } = e, ie = e.isMulti ? !!e.singleLine : !1, z =
|
|
3160
|
+
var Pi = a(function(e, t) {
|
|
3161
|
+
let { options: n, loadOptions: r, defaultOptions: i, creatable: a = !1, onCreateOption: o, formatCreateLabel: c, isMulti: d, value: h, defaultValue: g, onChange: _, placeholder: v, label: y, labelAddons: b, dropdownIcon: x, helperText: S, errorText: C, error: w = !1, required: T = !0, loading: E = !1, clearable: D = !1, searchable: O, virtualized: k = !1, emptyText: A, locale: j = "en-US", storageKey: M, saveSelectionLabel: N, size: ee = "md", disabled: te = !1, id: P, className: F, wrapperClassName: I, dataTestId: L, inputValue: ne, onInputChange: re, ...R } = e, ie = e.isMulti ? !!e.singleLine : !1, z = si[j], ae = v ?? z.placeholder, oe = A ?? z.noResults, se = c ?? ((e) => z.createLabel(e)), ce = u(), le = P ?? ce, ue = w || !!C, B = h !== void 0, [de, fe] = m(() => {
|
|
3157
3162
|
if (!d) {
|
|
3158
3163
|
if (M && !B) {
|
|
3159
|
-
let e =
|
|
3164
|
+
let e = gi(M);
|
|
3160
3165
|
if (e !== void 0) return e;
|
|
3161
3166
|
}
|
|
3162
3167
|
return g;
|
|
@@ -3164,11 +3169,11 @@ var Ni = a(function(e, t) {
|
|
|
3164
3169
|
}), [pe, me] = m(() => {
|
|
3165
3170
|
if (!d) return [];
|
|
3166
3171
|
if (M && !B) {
|
|
3167
|
-
let e =
|
|
3172
|
+
let e = gi(M);
|
|
3168
3173
|
if (Array.isArray(e)) return e;
|
|
3169
3174
|
}
|
|
3170
3175
|
return g ?? [];
|
|
3171
|
-
}), [he, ge] = m(() => !!M &&
|
|
3176
|
+
}), [he, ge] = m(() => !!M && _i(M)), [_e, V] = m(() => {
|
|
3172
3177
|
let e = /* @__PURE__ */ new Map();
|
|
3173
3178
|
for (let t of n) e.set(String(t.value), t);
|
|
3174
3179
|
if (Array.isArray(i)) for (let t of i) e.set(String(t.value), t);
|
|
@@ -3224,15 +3229,15 @@ var Ni = a(function(e, t) {
|
|
|
3224
3229
|
U,
|
|
3225
3230
|
_,
|
|
3226
3231
|
o
|
|
3227
|
-
]), q = !!r, ke = O ?? (q || a ? !0 : n.length >= 10), Ae = q ? a ? Oe : Ee : a ? De : Te, je = f(() =>
|
|
3232
|
+
]), q = !!r, ke = O ?? (q || a ? !0 : n.length >= 10), Ae = q ? a ? Oe : Ee : a ? De : Te, je = f(() => bi(ee, ue, ie), [
|
|
3228
3233
|
ee,
|
|
3229
3234
|
ue,
|
|
3230
3235
|
ie
|
|
3231
|
-
]), Me = p(null), Ne = p(null), Pe = p(null), Fe = !!d && ie, Ie =
|
|
3236
|
+
]), Me = p(null), Ne = p(null), Pe = p(null), Fe = !!d && ie, Ie = oi({
|
|
3232
3237
|
wrapperRef: Me,
|
|
3233
3238
|
measureRef: Ne,
|
|
3234
3239
|
total: xe.length,
|
|
3235
|
-
labelsKey: xe.map(
|
|
3240
|
+
labelsKey: xe.map(mi).join("\0"),
|
|
3236
3241
|
enabled: Fe
|
|
3237
3242
|
}), Le = f(() => n.some((e) => !!e.description), [n]), Re = f(() => {
|
|
3238
3243
|
if (!n.some((e) => e.group)) return n;
|
|
@@ -3251,7 +3256,7 @@ var Ni = a(function(e, t) {
|
|
|
3251
3256
|
return t;
|
|
3252
3257
|
}, [n]), ze = !!d && !q, Be = d ? W : ye;
|
|
3253
3258
|
l(() => {
|
|
3254
|
-
!M || !he ||
|
|
3259
|
+
!M || !he || vi(M, Be);
|
|
3255
3260
|
}, [
|
|
3256
3261
|
M,
|
|
3257
3262
|
he,
|
|
@@ -3260,7 +3265,7 @@ var Ni = a(function(e, t) {
|
|
|
3260
3265
|
let Ve = s(() => {
|
|
3261
3266
|
M && ge((e) => {
|
|
3262
3267
|
let t = !e;
|
|
3263
|
-
return t ?
|
|
3268
|
+
return t ? vi(M, Be) : yi(M), t;
|
|
3264
3269
|
});
|
|
3265
3270
|
}, [M, Be]), He = f(() => M ? {
|
|
3266
3271
|
checked: he,
|
|
@@ -3272,7 +3277,7 @@ var Ni = a(function(e, t) {
|
|
|
3272
3277
|
z
|
|
3273
3278
|
]), [Ue, We] = m(""), J = ne ?? Ue, Ge = ze || ne !== void 0 || re !== void 0, Ke = s((e, t) => {
|
|
3274
3279
|
We(e), re?.(e, t);
|
|
3275
|
-
}, [re]), Y = f(() => ze ? n.filter((e) => !e.disabled &&
|
|
3280
|
+
}, [re]), Y = f(() => ze ? n.filter((e) => !e.disabled && hi(e, J)) : [], [
|
|
3276
3281
|
ze,
|
|
3277
3282
|
n,
|
|
3278
3283
|
J
|
|
@@ -3306,8 +3311,8 @@ var Ni = a(function(e, t) {
|
|
|
3306
3311
|
W,
|
|
3307
3312
|
U,
|
|
3308
3313
|
_
|
|
3309
|
-
]), Z =
|
|
3310
|
-
...q ? {} : { filterOption: (e, t) => e.data.__isNew__ === !0 ||
|
|
3314
|
+
]), Z = Qt(), Ye = {
|
|
3315
|
+
...q ? {} : { filterOption: (e, t) => e.data.__isNew__ === !0 || hi(e.data, t) },
|
|
3311
3316
|
...R,
|
|
3312
3317
|
dataTestId: L,
|
|
3313
3318
|
dropdownIcon: x,
|
|
@@ -3325,7 +3330,7 @@ var Ni = a(function(e, t) {
|
|
|
3325
3330
|
onCreateOption: a ? we : void 0,
|
|
3326
3331
|
formatCreateLabel: a ? se : void 0,
|
|
3327
3332
|
getOptionValue: (e) => String(e.value),
|
|
3328
|
-
getOptionLabel:
|
|
3333
|
+
getOptionLabel: mi,
|
|
3329
3334
|
formatOptionLabel: (e, t) => {
|
|
3330
3335
|
if (t.context === "value") return e.label;
|
|
3331
3336
|
let n = Le && e.description ? /* @__PURE__ */ K("span", {
|
|
@@ -3344,7 +3349,7 @@ var Ni = a(function(e, t) {
|
|
|
3344
3349
|
className: "min-w-0 flex-1 truncate",
|
|
3345
3350
|
children: n
|
|
3346
3351
|
}), /* @__PURE__ */ G("span", {
|
|
3347
|
-
"data-test-id":
|
|
3352
|
+
"data-test-id": Si({ dataTestId: L }, `option-${String(e.value)}-actions`),
|
|
3348
3353
|
className: "ml-auto inline-flex shrink-0 items-center",
|
|
3349
3354
|
onMouseDown: (e) => {
|
|
3350
3355
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -3385,17 +3390,17 @@ var Ni = a(function(e, t) {
|
|
|
3385
3390
|
menuPortalTarget: R.menuPortalTarget ?? Z ?? void 0,
|
|
3386
3391
|
menuPosition: R.menuPosition ?? "fixed",
|
|
3387
3392
|
components: {
|
|
3388
|
-
Control:
|
|
3389
|
-
Menu:
|
|
3390
|
-
...ke ? { Input:
|
|
3391
|
-
DropdownIndicator:
|
|
3392
|
-
ClearIndicator:
|
|
3393
|
-
MultiValueRemove:
|
|
3394
|
-
LoadingIndicator:
|
|
3393
|
+
Control: wi,
|
|
3394
|
+
Menu: Mi,
|
|
3395
|
+
...ke ? { Input: Ti } : {},
|
|
3396
|
+
DropdownIndicator: Ei,
|
|
3397
|
+
ClearIndicator: Di,
|
|
3398
|
+
MultiValueRemove: Oi,
|
|
3399
|
+
LoadingIndicator: ji,
|
|
3395
3400
|
IndicatorSeparator: () => null,
|
|
3396
|
-
...k ? { MenuList:
|
|
3397
|
-
...Fe ? { MultiValue:
|
|
3398
|
-
Option:
|
|
3401
|
+
...k ? { MenuList: Ni } : {},
|
|
3402
|
+
...Fe ? { MultiValue: ki } : {},
|
|
3403
|
+
Option: Ai
|
|
3399
3404
|
}
|
|
3400
3405
|
};
|
|
3401
3406
|
return /* @__PURE__ */ K("div", {
|
|
@@ -3415,7 +3420,7 @@ var Ni = a(function(e, t) {
|
|
|
3415
3420
|
})]
|
|
3416
3421
|
}),
|
|
3417
3422
|
/* @__PURE__ */ G(Ae, {
|
|
3418
|
-
ref:
|
|
3423
|
+
ref: Xt(t, Pe),
|
|
3419
3424
|
...Ye
|
|
3420
3425
|
}),
|
|
3421
3426
|
Fe && /* @__PURE__ */ K("div", {
|
|
@@ -3433,7 +3438,7 @@ var Ni = a(function(e, t) {
|
|
|
3433
3438
|
className: "flex items-center gap-1 rounded-md bg-bg-subtle pl-2 pr-1 py-0.5 max-w-full",
|
|
3434
3439
|
children: [/* @__PURE__ */ G("span", {
|
|
3435
3440
|
className: "truncate text-p-sm text-fg-default",
|
|
3436
|
-
children:
|
|
3441
|
+
children: mi(e)
|
|
3437
3442
|
}), /* @__PURE__ */ G("span", {
|
|
3438
3443
|
className: "rounded-sm text-fg-secondary hover:bg-bg-container hover:text-fg-default cursor-pointer",
|
|
3439
3444
|
children: /* @__PURE__ */ G(H, {
|
|
@@ -3457,19 +3462,19 @@ var Ni = a(function(e, t) {
|
|
|
3457
3462
|
}) : null
|
|
3458
3463
|
]
|
|
3459
3464
|
});
|
|
3460
|
-
}),
|
|
3461
|
-
function
|
|
3462
|
-
return c(
|
|
3465
|
+
}), Fi = r(null);
|
|
3466
|
+
function Ii() {
|
|
3467
|
+
return c(Fi) ?? {
|
|
3463
3468
|
collapsed: !1,
|
|
3464
3469
|
toggle: () => {}
|
|
3465
3470
|
};
|
|
3466
3471
|
}
|
|
3467
|
-
var
|
|
3472
|
+
var Li = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, children: r, className: i, logo: a, title: o, subtitle: s, dataTestId: c, ...l }, u) {
|
|
3468
3473
|
let [d, f] = m(e), p = t !== void 0, h = p ? t : d, g = () => {
|
|
3469
3474
|
let e = !h;
|
|
3470
3475
|
p || f(e), n?.(e);
|
|
3471
3476
|
};
|
|
3472
|
-
return /* @__PURE__ */ G(
|
|
3477
|
+
return /* @__PURE__ */ G(Fi.Provider, {
|
|
3473
3478
|
value: {
|
|
3474
3479
|
collapsed: h,
|
|
3475
3480
|
toggle: g
|
|
@@ -3510,8 +3515,8 @@ var Ii = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3510
3515
|
})]
|
|
3511
3516
|
})
|
|
3512
3517
|
});
|
|
3513
|
-
}),
|
|
3514
|
-
let { collapsed: d } =
|
|
3518
|
+
}), Ri = a(function({ icon: e, label: t, active: n, badge: r, children: i, onClick: a, href: o, className: s, dataTestId: c, ...l }, u) {
|
|
3519
|
+
let { collapsed: d } = Ii(), [f, p] = m(n ?? !1), h = !!i, g = /* @__PURE__ */ K(W, { children: [e && /* @__PURE__ */ G("span", {
|
|
3515
3520
|
className: "inline-flex shrink-0",
|
|
3516
3521
|
children: e
|
|
3517
3522
|
}), !d && /* @__PURE__ */ K(W, { children: [
|
|
@@ -3550,12 +3555,12 @@ var Ii = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3550
3555
|
className: "flex flex-col gap-0.5 pl-8",
|
|
3551
3556
|
children: i
|
|
3552
3557
|
})] });
|
|
3553
|
-
}),
|
|
3558
|
+
}), zi = {
|
|
3554
3559
|
text: "h-[1em] mb-[0.4em] origin-[0%_55%] scale-y-[0.6] rounded-sm",
|
|
3555
3560
|
circular: "size-10 rounded-full",
|
|
3556
3561
|
rectangular: "h-4 w-full",
|
|
3557
3562
|
rounded: "h-4 w-full rounded-md"
|
|
3558
|
-
},
|
|
3563
|
+
}, Bi = {
|
|
3559
3564
|
pulse: "animate-pulse",
|
|
3560
3565
|
wave: [
|
|
3561
3566
|
"relative overflow-hidden",
|
|
@@ -3565,15 +3570,15 @@ var Ii = a(function({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange:
|
|
|
3565
3570
|
].join(" "),
|
|
3566
3571
|
none: ""
|
|
3567
3572
|
};
|
|
3568
|
-
function
|
|
3573
|
+
function Vi(e) {
|
|
3569
3574
|
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
3570
3575
|
}
|
|
3571
|
-
var
|
|
3576
|
+
var Hi = a(function({ variant: e = "text", animation: t = "pulse", width: n, height: r, count: i = 1, children: a, style: o, className: s, dataTestId: c, ...l }, u) {
|
|
3572
3577
|
let d = a != null, f = Math.max(1, i), p = {
|
|
3573
|
-
...n === void 0 ? null : { width:
|
|
3574
|
-
...r === void 0 ? null : { height:
|
|
3578
|
+
...n === void 0 ? null : { width: Vi(n) },
|
|
3579
|
+
...r === void 0 ? null : { height: Vi(r) },
|
|
3575
3580
|
...o
|
|
3576
|
-
}, m = X("block bg-bg-subtle leading-none",
|
|
3581
|
+
}, m = X("block bg-bg-subtle leading-none", zi[e], Bi[t]);
|
|
3577
3582
|
return d ? /* @__PURE__ */ G("span", {
|
|
3578
3583
|
ref: u,
|
|
3579
3584
|
"data-test-id": c,
|
|
@@ -3606,7 +3611,7 @@ var Vi = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3606
3611
|
"aria-label": t === 0 ? "Loading" : void 0
|
|
3607
3612
|
}, t))
|
|
3608
3613
|
});
|
|
3609
|
-
}),
|
|
3614
|
+
}), Ui = {
|
|
3610
3615
|
success: {
|
|
3611
3616
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3612
3617
|
icon: x
|
|
@@ -3627,26 +3632,26 @@ var Vi = a(function({ variant: e = "text", animation: t = "pulse", width: n, hei
|
|
|
3627
3632
|
container: "bg-gray-900 dark:bg-gray-700 text-white",
|
|
3628
3633
|
icon: P
|
|
3629
3634
|
}
|
|
3630
|
-
},
|
|
3635
|
+
}, Wi = {
|
|
3631
3636
|
success: "text-green-400",
|
|
3632
3637
|
warning: "text-yellow-300",
|
|
3633
3638
|
danger: "text-red-400",
|
|
3634
3639
|
info: "text-blue-400",
|
|
3635
3640
|
neutral: "text-white/70"
|
|
3636
|
-
},
|
|
3641
|
+
}, Gi = {
|
|
3637
3642
|
"top-left": "top-6 left-4",
|
|
3638
3643
|
"top-center": "top-6 left-1/2 -translate-x-1/2",
|
|
3639
3644
|
"top-right": "top-6 right-4",
|
|
3640
3645
|
"bottom-left": "bottom-6 left-4",
|
|
3641
3646
|
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
3642
3647
|
"bottom-right": "bottom-6 right-4"
|
|
3643
|
-
},
|
|
3644
|
-
function
|
|
3645
|
-
let e = c(
|
|
3648
|
+
}, Ki = r(null);
|
|
3649
|
+
function qi() {
|
|
3650
|
+
let e = c(Ki);
|
|
3646
3651
|
if (!e) throw Error("useSnackbar must be used inside <SnackbarProvider>");
|
|
3647
3652
|
return e;
|
|
3648
3653
|
}
|
|
3649
|
-
function
|
|
3654
|
+
function Ji({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
3650
3655
|
let [r, i] = m([]), a = p(/* @__PURE__ */ new Map()), o = s((e) => {
|
|
3651
3656
|
i((t) => t.filter((t) => t.id !== e));
|
|
3652
3657
|
let t = a.current.get(e);
|
|
@@ -3669,25 +3674,25 @@ function qi({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
|
3669
3674
|
return () => {
|
|
3670
3675
|
e.forEach(clearTimeout), e.clear();
|
|
3671
3676
|
};
|
|
3672
|
-
}, []), /* @__PURE__ */ K(
|
|
3677
|
+
}, []), /* @__PURE__ */ K(Ki.Provider, {
|
|
3673
3678
|
value: {
|
|
3674
3679
|
show: c,
|
|
3675
3680
|
dismiss: o
|
|
3676
3681
|
},
|
|
3677
|
-
children: [e, be(/* @__PURE__ */ G(W, { children: Object.keys(
|
|
3682
|
+
children: [e, be(/* @__PURE__ */ G(W, { children: Object.keys(Gi).map((e) => {
|
|
3678
3683
|
let i = r.filter((t) => (t.position ?? n) === e);
|
|
3679
3684
|
return i.length === 0 ? null : /* @__PURE__ */ G("div", {
|
|
3680
3685
|
"data-test-id": t,
|
|
3681
|
-
className: X("fixed z-100 flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none",
|
|
3686
|
+
className: X("fixed z-100 flex flex-col gap-2 w-[min(400px,calc(100vw-2rem))] pointer-events-none", Gi[e]),
|
|
3682
3687
|
children: i.map((e) => {
|
|
3683
|
-
let { container: t, icon: n } =
|
|
3688
|
+
let { container: t, icon: n } = Ui[e.variant ?? "neutral"];
|
|
3684
3689
|
return /* @__PURE__ */ K("div", {
|
|
3685
3690
|
role: "status",
|
|
3686
3691
|
"data-test-id": e.dataTestId,
|
|
3687
3692
|
className: X("pointer-events-auto flex items-center gap-3 px-4 py-3 rounded-lg shadow-z4", t),
|
|
3688
3693
|
children: [
|
|
3689
3694
|
/* @__PURE__ */ G(n, {
|
|
3690
|
-
className: X("h-5 w-5 shrink-0",
|
|
3695
|
+
className: X("h-5 w-5 shrink-0", Wi[e.variant ?? "neutral"]),
|
|
3691
3696
|
"aria-hidden": !0
|
|
3692
3697
|
}),
|
|
3693
3698
|
/* @__PURE__ */ G("p", {
|
|
@@ -3718,15 +3723,15 @@ function qi({ children: e, dataTestId: t, position: n = "bottom-center" }) {
|
|
|
3718
3723
|
}
|
|
3719
3724
|
//#endregion
|
|
3720
3725
|
//#region src/components/Status/Status.tsx
|
|
3721
|
-
var
|
|
3726
|
+
var Yi = {
|
|
3722
3727
|
lg: "h-7 px-2.5 text-p-std gap-1.5",
|
|
3723
3728
|
md: "h-6 px-2 text-p-sm gap-1.5",
|
|
3724
3729
|
sm: "h-5 px-1.5 text-p-sm gap-1"
|
|
3725
|
-
},
|
|
3730
|
+
}, Xi = {
|
|
3726
3731
|
lg: "h-2 w-2",
|
|
3727
3732
|
md: "h-1.5 w-1.5",
|
|
3728
3733
|
sm: "h-1.5 w-1.5"
|
|
3729
|
-
},
|
|
3734
|
+
}, Zi = {
|
|
3730
3735
|
general: {
|
|
3731
3736
|
container: "bg-bg-subtle text-fg-default dark:text-fg-default",
|
|
3732
3737
|
dot: "bg-gray-600 dark:bg-gray-400"
|
|
@@ -3759,19 +3764,19 @@ var Ji = {
|
|
|
3759
3764
|
container: "bg-bg-subtle text-fg-disabled",
|
|
3760
3765
|
dot: "bg-border-strong"
|
|
3761
3766
|
}
|
|
3762
|
-
},
|
|
3763
|
-
let { container: u, dot: d } =
|
|
3767
|
+
}, Qi = a(function({ variant: e = "general", size: t = "md", leftIcon: n, rightIcon: r, dot: i = !0, className: a, children: o, dataTestId: s, ...c }, l) {
|
|
3768
|
+
let { container: u, dot: d } = Zi[e];
|
|
3764
3769
|
return /* @__PURE__ */ K("span", {
|
|
3765
3770
|
ref: l,
|
|
3766
3771
|
"data-test-id": s,
|
|
3767
|
-
className: X("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none",
|
|
3772
|
+
className: X("inline-flex items-center rounded-full font-medium whitespace-nowrap select-none", Yi[t], u, a),
|
|
3768
3773
|
...c,
|
|
3769
3774
|
children: [
|
|
3770
3775
|
n ? /* @__PURE__ */ G("span", {
|
|
3771
3776
|
className: "inline-flex shrink-0",
|
|
3772
3777
|
children: n
|
|
3773
3778
|
}) : i ? /* @__PURE__ */ G("span", {
|
|
3774
|
-
className: X("inline-block shrink-0 rounded-full",
|
|
3779
|
+
className: X("inline-block shrink-0 rounded-full", Xi[t], d),
|
|
3775
3780
|
"aria-hidden": !0
|
|
3776
3781
|
}) : null,
|
|
3777
3782
|
o,
|
|
@@ -3781,45 +3786,45 @@ var Ji = {
|
|
|
3781
3786
|
})
|
|
3782
3787
|
]
|
|
3783
3788
|
});
|
|
3784
|
-
}),
|
|
3789
|
+
}), $i = {
|
|
3785
3790
|
lg: "size-9",
|
|
3786
3791
|
sm: "size-6"
|
|
3787
|
-
},
|
|
3792
|
+
}, ea = {
|
|
3788
3793
|
lg: "h-9",
|
|
3789
3794
|
sm: "h-6"
|
|
3790
|
-
},
|
|
3795
|
+
}, ta = {
|
|
3791
3796
|
lg: "border-2",
|
|
3792
3797
|
sm: "border"
|
|
3793
|
-
},
|
|
3798
|
+
}, na = {
|
|
3794
3799
|
lg: "text-p-std",
|
|
3795
3800
|
sm: "text-p-xs"
|
|
3796
|
-
},
|
|
3801
|
+
}, ra = {
|
|
3797
3802
|
lg: "size-5",
|
|
3798
3803
|
sm: "size-3.5"
|
|
3799
|
-
},
|
|
3804
|
+
}, ia = {
|
|
3800
3805
|
lg: "size-3",
|
|
3801
3806
|
sm: "size-2"
|
|
3802
|
-
},
|
|
3807
|
+
}, aa = {
|
|
3803
3808
|
lg: "text-p-std",
|
|
3804
3809
|
sm: "text-p-sm"
|
|
3805
|
-
},
|
|
3810
|
+
}, oa = {
|
|
3806
3811
|
lg: "text-p-sm",
|
|
3807
3812
|
sm: "text-p-xs"
|
|
3808
|
-
},
|
|
3813
|
+
}, sa = {
|
|
3809
3814
|
upcoming: "bg-bg-default border-border-strong text-fg-tertiary",
|
|
3810
3815
|
active: "bg-bg-default border-brand-500 text-brand-700",
|
|
3811
3816
|
completed: "bg-brand-500 border-brand-500 text-fg-inverse",
|
|
3812
3817
|
rejected: "bg-red-700 border-red-800 text-fg-inverse"
|
|
3813
|
-
},
|
|
3818
|
+
}, ca = {
|
|
3814
3819
|
upcoming: "ring-4 ring-gray-100/80",
|
|
3815
3820
|
active: "ring-4 ring-brand-40/80",
|
|
3816
3821
|
completed: "ring-4 ring-brand-40/80",
|
|
3817
3822
|
rejected: "ring-4 ring-red-100/80"
|
|
3818
3823
|
};
|
|
3819
|
-
function
|
|
3820
|
-
return t === "completed" ? /* @__PURE__ */ G(E, { className:
|
|
3824
|
+
function la(e, t, n, r) {
|
|
3825
|
+
return t === "completed" ? /* @__PURE__ */ G(E, { className: ra[r] }) : t === "rejected" ? /* @__PURE__ */ G(D, { className: ra[r] }) : e === "number" ? n + 1 : e === "dot" ? /* @__PURE__ */ G("span", { className: X("rounded-full", ia[r], t === "active" ? "bg-brand-500" : "bg-transparent") }) : null;
|
|
3821
3826
|
}
|
|
3822
|
-
var
|
|
3827
|
+
var ua = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "number", orientation: i = "horizontal", size: a = "lg", className: o, dataTestId: s, ...c }, l) {
|
|
3823
3828
|
let u = i === "vertical", d = (e) => (e?.status ?? "upcoming") === "completed";
|
|
3824
3829
|
return /* @__PURE__ */ G("ol", {
|
|
3825
3830
|
ref: l,
|
|
@@ -3828,15 +3833,15 @@ var la = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3828
3833
|
...c,
|
|
3829
3834
|
children: e.map((i, o) => {
|
|
3830
3835
|
let s = i.status ?? "upcoming", c = o === 0, l = o === e.length - 1, f = !c && d(e[o - 1]), p = !l && d(i), m = /* @__PURE__ */ G("span", {
|
|
3831
|
-
className: X("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors",
|
|
3832
|
-
children:
|
|
3836
|
+
className: X("relative z-10 inline-flex shrink-0 items-center justify-center rounded-full font-semibold transition-colors", $i[a], ta[a], na[a], sa[s], i.highlighted && ca[s]),
|
|
3837
|
+
children: la(r, s, o, a)
|
|
3833
3838
|
}), h = /* @__PURE__ */ K("div", {
|
|
3834
3839
|
className: X("flex flex-col", u ? "gap-0.5 pb-6" : "mt-2 items-center gap-0.5 text-center"),
|
|
3835
3840
|
children: [/* @__PURE__ */ G("span", {
|
|
3836
|
-
className: X("font-medium text-fg-default",
|
|
3841
|
+
className: X("font-medium text-fg-default", aa[a]),
|
|
3837
3842
|
children: i.label
|
|
3838
3843
|
}), i.description && /* @__PURE__ */ G("span", {
|
|
3839
|
-
className: X("text-fg-secondary",
|
|
3844
|
+
className: X("text-fg-secondary", oa[a]),
|
|
3840
3845
|
children: i.description
|
|
3841
3846
|
})]
|
|
3842
3847
|
});
|
|
@@ -3844,7 +3849,7 @@ var la = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3844
3849
|
"aria-current": $e(i.value, t) ? "step" : void 0,
|
|
3845
3850
|
className: X("relative flex", u ? "flex-row gap-3" : "flex-1 basis-0 min-w-0 flex-col"),
|
|
3846
3851
|
children: [/* @__PURE__ */ K("div", {
|
|
3847
|
-
className: X("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : X("w-full items-center justify-center",
|
|
3852
|
+
className: X("relative flex shrink-0", u ? "w-9 flex-col items-center justify-center" : X("w-full items-center justify-center", ea[a])),
|
|
3848
3853
|
children: [
|
|
3849
3854
|
!c && /* @__PURE__ */ G("span", {
|
|
3850
3855
|
"aria-hidden": !0,
|
|
@@ -3866,13 +3871,13 @@ var la = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3866
3871
|
}, String(i.value));
|
|
3867
3872
|
})
|
|
3868
3873
|
});
|
|
3869
|
-
}),
|
|
3874
|
+
}), da = {
|
|
3870
3875
|
md: "h-6 w-11",
|
|
3871
3876
|
sm: "h-5 w-9"
|
|
3872
|
-
},
|
|
3877
|
+
}, fa = {
|
|
3873
3878
|
md: "h-5 w-5 peer-checked:translate-x-5",
|
|
3874
3879
|
sm: "h-4 w-4 peer-checked:translate-x-4"
|
|
3875
|
-
},
|
|
3880
|
+
}, pa = a(function({ size: e = "md", label: t, description: n, labelPosition: r = "right", id: i, disabled: a, checked: o, defaultChecked: s, className: c, dataTestId: l, ...d }, f) {
|
|
3876
3881
|
let p = u(), m = i ?? p, h = /* @__PURE__ */ K("span", {
|
|
3877
3882
|
className: "relative inline-flex shrink-0",
|
|
3878
3883
|
children: [
|
|
@@ -3888,8 +3893,8 @@ var la = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3888
3893
|
"data-test-id": Z(l)("input"),
|
|
3889
3894
|
...d
|
|
3890
3895
|
}),
|
|
3891
|
-
/* @__PURE__ */ G("span", { className: X("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors",
|
|
3892
|
-
/* @__PURE__ */ G("span", { className: X("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform",
|
|
3896
|
+
/* @__PURE__ */ G("span", { className: X("rounded-full bg-gray-300 dark:bg-gray-700 transition-colors", da[e], "peer-checked:bg-brand-500 dark:peer-checked:bg-brand-500", "peer-focus-visible:ring-2 peer-focus-visible:ring-brand-300 peer-focus-visible:ring-offset-2", a && "bg-bg-subtle!") }),
|
|
3897
|
+
/* @__PURE__ */ G("span", { className: X("absolute top-0.5 left-0.5 rounded-full bg-white dark:bg-white shadow-z1 transition-transform", fa[e]) })
|
|
3893
3898
|
]
|
|
3894
3899
|
});
|
|
3895
3900
|
return !t && !n ? /* @__PURE__ */ G("label", {
|
|
@@ -3915,11 +3920,11 @@ var la = a(function({ steps: e, activeValue: t, onStepSelect: n, marker: r = "nu
|
|
|
3915
3920
|
});
|
|
3916
3921
|
//#endregion
|
|
3917
3922
|
//#region src/components/TableV2/TableV2Filter.tsx
|
|
3918
|
-
function
|
|
3923
|
+
function ma({ column: e }) {
|
|
3919
3924
|
let t = e.columnDef.meta?.filterVariant;
|
|
3920
3925
|
if (!t) return null;
|
|
3921
3926
|
let n = e.getFilterValue();
|
|
3922
|
-
return t === "custom" ? /* @__PURE__ */ G(W, { children: e.columnDef.meta?.filterComponent?.(e) ?? null }) : t === "select" ? /* @__PURE__ */ G(
|
|
3927
|
+
return t === "custom" ? /* @__PURE__ */ G(W, { children: e.columnDef.meta?.filterComponent?.(e) ?? null }) : t === "select" ? /* @__PURE__ */ G(Pi, {
|
|
3923
3928
|
size: "sm",
|
|
3924
3929
|
searchable: !1,
|
|
3925
3930
|
required: !1,
|
|
@@ -3927,7 +3932,7 @@ function pa({ column: e }) {
|
|
|
3927
3932
|
placeholder: "All",
|
|
3928
3933
|
value: typeof n == "string" ? n : void 0,
|
|
3929
3934
|
onChange: (t) => e.setFilterValue(t || void 0)
|
|
3930
|
-
}) : /* @__PURE__ */ G(
|
|
3935
|
+
}) : /* @__PURE__ */ G(dn, {
|
|
3931
3936
|
size: "sm",
|
|
3932
3937
|
type: t === "date" ? "date" : "text",
|
|
3933
3938
|
"aria-label": `Filter by ${e.id}`,
|
|
@@ -3938,7 +3943,7 @@ function pa({ column: e }) {
|
|
|
3938
3943
|
}
|
|
3939
3944
|
//#endregion
|
|
3940
3945
|
//#region src/components/TableV2/TableV2Pagination.i18n.ts
|
|
3941
|
-
var
|
|
3946
|
+
var ha = {
|
|
3942
3947
|
"en-US": {
|
|
3943
3948
|
rowsPerPage: "Rows per page",
|
|
3944
3949
|
noResults: "No results",
|
|
@@ -3957,12 +3962,12 @@ var ma = {
|
|
|
3957
3962
|
};
|
|
3958
3963
|
//#endregion
|
|
3959
3964
|
//#region src/components/TableV2/TableV2Pagination.tsx
|
|
3960
|
-
function
|
|
3965
|
+
function ga({ table: e, pageSizeOptions: t = [
|
|
3961
3966
|
10,
|
|
3962
3967
|
20,
|
|
3963
3968
|
30
|
|
3964
3969
|
], locale: n = "en-US", dataTestId: r }) {
|
|
3965
|
-
let { pageIndex: i, pageSize: a } = e.getState().pagination, o = e.options.rowCount ?? e.getPrePaginationRowModel().rows.length, s = Math.max(1, e.getPageCount()), c = o === 0 ? 0 : i * a + 1, l = Math.min(o, (i + 1) * a), u =
|
|
3970
|
+
let { pageIndex: i, pageSize: a } = e.getState().pagination, o = e.options.rowCount ?? e.getPrePaginationRowModel().rows.length, s = Math.max(1, e.getPageCount()), c = o === 0 ? 0 : i * a + 1, l = Math.min(o, (i + 1) * a), u = ha[n], d = Z(r);
|
|
3966
3971
|
return /* @__PURE__ */ K("div", {
|
|
3967
3972
|
className: "flex flex-wrap items-center justify-between gap-3 p-3 border-t border-border-default",
|
|
3968
3973
|
children: [
|
|
@@ -3971,7 +3976,7 @@ function ha({ table: e, pageSizeOptions: t = [
|
|
|
3971
3976
|
children: [/* @__PURE__ */ G("span", {
|
|
3972
3977
|
className: "text-p-sm text-fg-secondary whitespace-nowrap",
|
|
3973
3978
|
children: u.rowsPerPage
|
|
3974
|
-
}), /* @__PURE__ */ G(
|
|
3979
|
+
}), /* @__PURE__ */ G(Pi, {
|
|
3975
3980
|
size: "sm",
|
|
3976
3981
|
menuPlacement: "top",
|
|
3977
3982
|
searchable: !1,
|
|
@@ -3992,7 +3997,7 @@ function ha({ table: e, pageSizeOptions: t = [
|
|
|
3992
3997
|
className: "text-p-sm text-fg-secondary whitespace-nowrap",
|
|
3993
3998
|
children: o === 0 ? u.noResults : u.rangeSummary(c, l, o)
|
|
3994
3999
|
}),
|
|
3995
|
-
/* @__PURE__ */ G(
|
|
4000
|
+
/* @__PURE__ */ G(Gr, {
|
|
3996
4001
|
page: i + 1,
|
|
3997
4002
|
pageCount: s,
|
|
3998
4003
|
onPageChange: (t) => e.setPageIndex(t - 1),
|
|
@@ -4003,14 +4008,14 @@ function ha({ table: e, pageSizeOptions: t = [
|
|
|
4003
4008
|
}
|
|
4004
4009
|
//#endregion
|
|
4005
4010
|
//#region src/components/TableV2/TableV2Skeleton.tsx
|
|
4006
|
-
function
|
|
4011
|
+
function _a({ columnCount: e, rowCount: t = 8, testIdPrefix: n }) {
|
|
4007
4012
|
let r = Z(n);
|
|
4008
4013
|
return /* @__PURE__ */ G(W, { children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ G("tr", {
|
|
4009
4014
|
"data-test-id": r(`skeleton-row-${n}`),
|
|
4010
4015
|
"aria-hidden": n > 0 || void 0,
|
|
4011
4016
|
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ G("td", {
|
|
4012
4017
|
className: "px-4 py-3",
|
|
4013
|
-
children: /* @__PURE__ */ G(
|
|
4018
|
+
children: /* @__PURE__ */ G(Hi, {
|
|
4014
4019
|
variant: "text",
|
|
4015
4020
|
width: t === 0 ? "70%" : "90%"
|
|
4016
4021
|
})
|
|
@@ -4019,24 +4024,24 @@ function ga({ columnCount: e, rowCount: t = 8, testIdPrefix: n }) {
|
|
|
4019
4024
|
}
|
|
4020
4025
|
//#endregion
|
|
4021
4026
|
//#region src/components/TableV2/TableV2ColumnVisibility.tsx
|
|
4022
|
-
function
|
|
4027
|
+
function va(e) {
|
|
4023
4028
|
let { header: t } = e.columnDef;
|
|
4024
4029
|
return typeof t == "string" ? t : e.id;
|
|
4025
4030
|
}
|
|
4026
|
-
function
|
|
4031
|
+
function ya({ table: e }) {
|
|
4027
4032
|
let t = e.getAllLeafColumns().filter((e) => e.getCanHide());
|
|
4028
|
-
return /* @__PURE__ */ K(
|
|
4033
|
+
return /* @__PURE__ */ K(gr, { children: [/* @__PURE__ */ G(_r, { children: /* @__PURE__ */ G(ut, {
|
|
4029
4034
|
variant: "secondary",
|
|
4030
4035
|
size: "sm",
|
|
4031
4036
|
leftIcon: /* @__PURE__ */ G(k, { className: "h-4 w-4" }),
|
|
4032
4037
|
children: "Columns"
|
|
4033
|
-
}) }), /* @__PURE__ */ G(
|
|
4038
|
+
}) }), /* @__PURE__ */ G(yr, {
|
|
4034
4039
|
align: "end",
|
|
4035
4040
|
children: t.map((e) => /* @__PURE__ */ G("div", {
|
|
4036
4041
|
className: "px-3 py-1.5 hover:bg-bg-subtle",
|
|
4037
|
-
children: /* @__PURE__ */ G(
|
|
4042
|
+
children: /* @__PURE__ */ G(Yt, {
|
|
4038
4043
|
size: "sm",
|
|
4039
|
-
label:
|
|
4044
|
+
label: va(e),
|
|
4040
4045
|
checked: e.getIsVisible(),
|
|
4041
4046
|
onChange: () => e.toggleVisibility()
|
|
4042
4047
|
})
|
|
@@ -4045,10 +4050,10 @@ function va({ table: e }) {
|
|
|
4045
4050
|
}
|
|
4046
4051
|
//#endregion
|
|
4047
4052
|
//#region src/components/TableV2/TableV2Toolbar.tsx
|
|
4048
|
-
function
|
|
4053
|
+
function ba({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, searchPlaceholder: r, onRefresh: i, onExport: a, actions: o }) {
|
|
4049
4054
|
return /* @__PURE__ */ K("div", {
|
|
4050
4055
|
className: "flex flex-wrap items-center gap-2 p-3 border-b border-border-default",
|
|
4051
|
-
children: [t && /* @__PURE__ */ G(
|
|
4056
|
+
children: [t && /* @__PURE__ */ G(dn, {
|
|
4052
4057
|
size: "sm",
|
|
4053
4058
|
leftIcon: /* @__PURE__ */ G(ue, { className: "h-4 w-4" }),
|
|
4054
4059
|
placeholder: r ?? "Search...",
|
|
@@ -4074,7 +4079,7 @@ function ya({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
4074
4079
|
onClick: a,
|
|
4075
4080
|
children: "Export"
|
|
4076
4081
|
}),
|
|
4077
|
-
n && /* @__PURE__ */ G(
|
|
4082
|
+
n && /* @__PURE__ */ G(ya, { table: e }),
|
|
4078
4083
|
o
|
|
4079
4084
|
]
|
|
4080
4085
|
})]
|
|
@@ -4082,15 +4087,15 @@ function ya({ table: e, enableGlobalFilter: t, enableColumnVisibility: n, search
|
|
|
4082
4087
|
}
|
|
4083
4088
|
//#endregion
|
|
4084
4089
|
//#region src/components/TableV2/useTableV2ColumnDnd.ts
|
|
4085
|
-
var
|
|
4090
|
+
var xa = ({ transform: e }) => ({
|
|
4086
4091
|
...e,
|
|
4087
4092
|
y: 0
|
|
4088
4093
|
});
|
|
4089
|
-
function
|
|
4094
|
+
function Sa({ columnOrder: e, onColumnOrderChange: t }) {
|
|
4090
4095
|
return {
|
|
4091
4096
|
sensors: Ve(Be(Re, { activationConstraint: { distance: 4 } }), Be(Le, { coordinateGetter: J })),
|
|
4092
4097
|
collisionDetection: ze,
|
|
4093
|
-
modifiers: [
|
|
4098
|
+
modifiers: [xa],
|
|
4094
4099
|
handleDragEnd: (n) => {
|
|
4095
4100
|
let { active: r, over: i } = n;
|
|
4096
4101
|
if (!i || r.id === i.id) return;
|
|
@@ -4099,7 +4104,7 @@ function xa({ columnOrder: e, onColumnOrderChange: t }) {
|
|
|
4099
4104
|
}
|
|
4100
4105
|
};
|
|
4101
4106
|
}
|
|
4102
|
-
function
|
|
4107
|
+
function Ca(e) {
|
|
4103
4108
|
let { attributes: t, listeners: n, setNodeRef: r, transform: i, transition: a, isDragging: o } = Ge({ id: e });
|
|
4104
4109
|
return {
|
|
4105
4110
|
setNodeRef: r,
|
|
@@ -4117,16 +4122,16 @@ function Sa(e) {
|
|
|
4117
4122
|
}
|
|
4118
4123
|
//#endregion
|
|
4119
4124
|
//#region src/components/TableV2/TableV2RowActions.tsx
|
|
4120
|
-
function
|
|
4121
|
-
return t.length === 0 ? null : /* @__PURE__ */ K(
|
|
4125
|
+
function wa({ row: e, actions: t }) {
|
|
4126
|
+
return t.length === 0 ? null : /* @__PURE__ */ K(gr, { children: [/* @__PURE__ */ G(_r, { children: /* @__PURE__ */ G(ut, {
|
|
4122
4127
|
variant: "tertiary",
|
|
4123
4128
|
size: "sm",
|
|
4124
4129
|
iconOnly: !0,
|
|
4125
4130
|
"aria-label": "Row actions",
|
|
4126
4131
|
leftIcon: /* @__PURE__ */ G(ie, { className: "h-4 w-4" })
|
|
4127
|
-
}) }), /* @__PURE__ */ G(
|
|
4132
|
+
}) }), /* @__PURE__ */ G(yr, {
|
|
4128
4133
|
align: "end",
|
|
4129
|
-
children: t.map((t, n) => /* @__PURE__ */ G(
|
|
4134
|
+
children: t.map((t, n) => /* @__PURE__ */ G(br, {
|
|
4130
4135
|
icon: t.icon,
|
|
4131
4136
|
destructive: t.destructive,
|
|
4132
4137
|
disabled: t.disabled?.(e),
|
|
@@ -4137,15 +4142,15 @@ function Ca({ row: e, actions: t }) {
|
|
|
4137
4142
|
}
|
|
4138
4143
|
//#endregion
|
|
4139
4144
|
//#region src/components/TableV2/TableV2.utils.tsx
|
|
4140
|
-
var
|
|
4145
|
+
var Ta = {
|
|
4141
4146
|
comfortable: "py-3",
|
|
4142
4147
|
compact: "py-2"
|
|
4143
|
-
},
|
|
4148
|
+
}, Ea = {
|
|
4144
4149
|
left: "text-left",
|
|
4145
4150
|
center: "text-center",
|
|
4146
4151
|
right: "text-right"
|
|
4147
4152
|
};
|
|
4148
|
-
function
|
|
4153
|
+
function Da() {
|
|
4149
4154
|
return {
|
|
4150
4155
|
id: "select",
|
|
4151
4156
|
size: 40,
|
|
@@ -4155,13 +4160,13 @@ function Ea() {
|
|
|
4155
4160
|
enableHiding: !1,
|
|
4156
4161
|
enableResizing: !1,
|
|
4157
4162
|
enableColumnFilter: !1,
|
|
4158
|
-
header: ({ table: e }) => /* @__PURE__ */ G(
|
|
4163
|
+
header: ({ table: e }) => /* @__PURE__ */ G(Yt, {
|
|
4159
4164
|
"aria-label": "Select all rows",
|
|
4160
4165
|
checked: e.getIsAllRowsSelected(),
|
|
4161
4166
|
indeterminate: e.getIsSomeRowsSelected() && !e.getIsAllRowsSelected(),
|
|
4162
4167
|
onChange: e.getToggleAllRowsSelectedHandler()
|
|
4163
4168
|
}),
|
|
4164
|
-
cell: ({ row: e }) => /* @__PURE__ */ G(
|
|
4169
|
+
cell: ({ row: e }) => /* @__PURE__ */ G(Yt, {
|
|
4165
4170
|
"aria-label": "Select row",
|
|
4166
4171
|
checked: e.getIsSelected(),
|
|
4167
4172
|
disabled: !e.getCanSelect(),
|
|
@@ -4170,7 +4175,7 @@ function Ea() {
|
|
|
4170
4175
|
})
|
|
4171
4176
|
};
|
|
4172
4177
|
}
|
|
4173
|
-
function
|
|
4178
|
+
function Oa(e, t) {
|
|
4174
4179
|
return {
|
|
4175
4180
|
id: "actions",
|
|
4176
4181
|
header: t?.header ?? "",
|
|
@@ -4178,13 +4183,13 @@ function Da(e, t) {
|
|
|
4178
4183
|
enableSorting: !1,
|
|
4179
4184
|
enableColumnFilter: !1,
|
|
4180
4185
|
enableResizing: !1,
|
|
4181
|
-
cell: ({ row: t }) => /* @__PURE__ */ G(
|
|
4186
|
+
cell: ({ row: t }) => /* @__PURE__ */ G(wa, {
|
|
4182
4187
|
row: t.original,
|
|
4183
4188
|
actions: e(t.original)
|
|
4184
4189
|
})
|
|
4185
4190
|
};
|
|
4186
4191
|
}
|
|
4187
|
-
function
|
|
4192
|
+
function ka(e) {
|
|
4188
4193
|
let t = e.getIsPinned();
|
|
4189
4194
|
return t ? {
|
|
4190
4195
|
position: "sticky",
|
|
@@ -4195,104 +4200,105 @@ function Oa(e) {
|
|
|
4195
4200
|
}
|
|
4196
4201
|
//#endregion
|
|
4197
4202
|
//#region src/components/TableV2/TableV2.tsx
|
|
4198
|
-
function
|
|
4203
|
+
function Aa(e, t, n) {
|
|
4199
4204
|
let [r, i] = m(n);
|
|
4200
|
-
return [e
|
|
4205
|
+
return [e ?? r, (e) => {
|
|
4201
4206
|
i((t) => typeof e == "function" ? e(t) : e), t?.(e);
|
|
4202
4207
|
}];
|
|
4203
4208
|
}
|
|
4204
|
-
var
|
|
4205
|
-
function
|
|
4206
|
-
let
|
|
4209
|
+
var ja = /* @__PURE__ */ new Set(["select", "actions"]);
|
|
4210
|
+
function Ma({ header: e, dataTestId: t, density: n, enableSorting: r, enableFiltering: i, enableColumnOrdering: a, enableColumnResizing: o, enablePinning: s, enableColumnVisibility: c }) {
|
|
4211
|
+
let l = e.column, u = ja.has(l.id), d = a && !u, f = Ca(l.id), p = l.columnDef.meta?.align ?? "left", m = l.getIsSorted(), h = !u && (s && l.getCanPin() || c && l.getCanHide()), g = Ae(l.columnDef.header, e.getContext());
|
|
4207
4212
|
return /* @__PURE__ */ K("th", {
|
|
4208
|
-
ref:
|
|
4213
|
+
ref: d ? f.setNodeRef : void 0,
|
|
4209
4214
|
colSpan: e.colSpan,
|
|
4210
4215
|
scope: "col",
|
|
4216
|
+
"data-test-id": t,
|
|
4211
4217
|
style: {
|
|
4212
|
-
width:
|
|
4213
|
-
...
|
|
4214
|
-
...
|
|
4218
|
+
width: o ? e.getSize() : void 0,
|
|
4219
|
+
...ka(l),
|
|
4220
|
+
...d ? f.style : null
|
|
4215
4221
|
},
|
|
4216
|
-
"aria-sort":
|
|
4217
|
-
className: X("relative px-4 whitespace-nowrap bg-bg-container",
|
|
4222
|
+
"aria-sort": m === "asc" ? "ascending" : m === "desc" ? "descending" : void 0,
|
|
4223
|
+
className: X("relative px-4 whitespace-nowrap bg-bg-container", Ta[n], Ea[p]),
|
|
4218
4224
|
children: [
|
|
4219
4225
|
/* @__PURE__ */ K("div", {
|
|
4220
4226
|
className: "flex items-center gap-1",
|
|
4221
4227
|
children: [
|
|
4222
|
-
|
|
4228
|
+
d && /* @__PURE__ */ G("button", {
|
|
4223
4229
|
type: "button",
|
|
4224
4230
|
className: "shrink-0 cursor-grab touch-none text-fg-tertiary hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 rounded-sm",
|
|
4225
|
-
"aria-label": `Reorder ${typeof
|
|
4226
|
-
...
|
|
4227
|
-
...
|
|
4231
|
+
"aria-label": `Reorder ${typeof g == "string" ? g : l.id} column`,
|
|
4232
|
+
...f.attributes,
|
|
4233
|
+
...f.listeners,
|
|
4228
4234
|
children: /* @__PURE__ */ G(te, { className: "h-3.5 w-3.5" })
|
|
4229
4235
|
}),
|
|
4230
|
-
|
|
4236
|
+
r && l.getCanSort() ? /* @__PURE__ */ K("button", {
|
|
4231
4237
|
type: "button",
|
|
4232
|
-
onClick:
|
|
4238
|
+
onClick: l.getToggleSortingHandler(),
|
|
4233
4239
|
className: "inline-flex items-center gap-1 hover:text-fg-default focus-visible:outline-none min-w-0",
|
|
4234
4240
|
children: [/* @__PURE__ */ G("span", {
|
|
4235
4241
|
className: "truncate",
|
|
4236
|
-
children:
|
|
4242
|
+
children: g
|
|
4237
4243
|
}), /* @__PURE__ */ G("span", {
|
|
4238
4244
|
className: "inline-flex shrink-0 text-fg-tertiary",
|
|
4239
|
-
children: G(
|
|
4245
|
+
children: G(m === "asc" ? v : m === "desc" ? _ : T, { className: "h-3.5 w-3.5" })
|
|
4240
4246
|
})]
|
|
4241
4247
|
}) : /* @__PURE__ */ G("span", {
|
|
4242
4248
|
className: "truncate",
|
|
4243
|
-
children:
|
|
4249
|
+
children: g
|
|
4244
4250
|
}),
|
|
4245
|
-
|
|
4251
|
+
h && /* @__PURE__ */ K(gr, { children: [/* @__PURE__ */ G(_r, { children: /* @__PURE__ */ G("button", {
|
|
4246
4252
|
type: "button",
|
|
4247
|
-
"aria-label": `${typeof
|
|
4253
|
+
"aria-label": `${typeof g == "string" ? g : l.id} column options`,
|
|
4248
4254
|
className: "ml-auto shrink-0 text-fg-tertiary hover:text-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 rounded-sm",
|
|
4249
4255
|
children: /* @__PURE__ */ G(R, { className: "h-3.5 w-3.5" })
|
|
4250
|
-
}) }), /* @__PURE__ */ K(
|
|
4256
|
+
}) }), /* @__PURE__ */ K(yr, {
|
|
4251
4257
|
align: "start",
|
|
4252
4258
|
children: [
|
|
4253
|
-
|
|
4254
|
-
|
|
4259
|
+
s && l.getCanPin() && /* @__PURE__ */ K(W, { children: [
|
|
4260
|
+
l.getIsPinned() !== "left" && /* @__PURE__ */ G(br, {
|
|
4255
4261
|
icon: /* @__PURE__ */ G(oe, { className: "h-4 w-4" }),
|
|
4256
|
-
onSelect: () =>
|
|
4262
|
+
onSelect: () => l.pin("left"),
|
|
4257
4263
|
children: "Pin left"
|
|
4258
4264
|
}),
|
|
4259
|
-
|
|
4265
|
+
l.getIsPinned() !== "right" && /* @__PURE__ */ G(br, {
|
|
4260
4266
|
icon: /* @__PURE__ */ G(oe, { className: "h-4 w-4" }),
|
|
4261
|
-
onSelect: () =>
|
|
4267
|
+
onSelect: () => l.pin("right"),
|
|
4262
4268
|
children: "Pin right"
|
|
4263
4269
|
}),
|
|
4264
|
-
|
|
4270
|
+
l.getIsPinned() && /* @__PURE__ */ G(br, {
|
|
4265
4271
|
icon: /* @__PURE__ */ G(se, { className: "h-4 w-4" }),
|
|
4266
|
-
onSelect: () =>
|
|
4272
|
+
onSelect: () => l.pin(!1),
|
|
4267
4273
|
children: "Unpin"
|
|
4268
4274
|
})
|
|
4269
4275
|
] }),
|
|
4270
|
-
|
|
4271
|
-
|
|
4276
|
+
s && l.getCanPin() && c && l.getCanHide() && /* @__PURE__ */ G(xr, {}),
|
|
4277
|
+
c && l.getCanHide() && /* @__PURE__ */ G(br, {
|
|
4272
4278
|
icon: /* @__PURE__ */ G(N, { className: "h-4 w-4" }),
|
|
4273
|
-
onSelect: () =>
|
|
4279
|
+
onSelect: () => l.toggleVisibility(!1),
|
|
4274
4280
|
children: "Hide column"
|
|
4275
4281
|
})
|
|
4276
4282
|
]
|
|
4277
4283
|
})] })
|
|
4278
4284
|
]
|
|
4279
4285
|
}),
|
|
4280
|
-
|
|
4286
|
+
i && l.getCanFilter() && /* @__PURE__ */ G("div", {
|
|
4281
4287
|
className: "mt-2 normal-case",
|
|
4282
4288
|
onClick: (e) => e.stopPropagation(),
|
|
4283
|
-
children: /* @__PURE__ */ G(
|
|
4289
|
+
children: /* @__PURE__ */ G(ma, { column: l })
|
|
4284
4290
|
}),
|
|
4285
|
-
|
|
4291
|
+
o && l.getCanResize() && /* @__PURE__ */ G("div", {
|
|
4286
4292
|
onMouseDown: e.getResizeHandler(),
|
|
4287
4293
|
onTouchStart: e.getResizeHandler(),
|
|
4288
|
-
"data-resizing":
|
|
4294
|
+
"data-resizing": l.getIsResizing() || void 0,
|
|
4289
4295
|
className: "absolute right-0 top-0 z-10 h-full w-1.5 cursor-col-resize touch-none select-none bg-transparent hover:bg-brand-300 data-[resizing]:bg-brand-500"
|
|
4290
4296
|
})
|
|
4291
4297
|
]
|
|
4292
4298
|
});
|
|
4293
4299
|
}
|
|
4294
|
-
function
|
|
4295
|
-
let n = e.getVisibleCells(), r = n.find((e) => !
|
|
4300
|
+
function Na({ row: e, onRowClick: t }) {
|
|
4301
|
+
let n = e.getVisibleCells(), r = n.find((e) => !ja.has(e.column.id)), i = n.find((e) => e.column.id === "select"), a = n.find((e) => e.column.id === "actions"), o = n.filter((e) => e !== r && !ja.has(e.column.id));
|
|
4296
4302
|
return /* @__PURE__ */ K("div", {
|
|
4297
4303
|
"data-selected": e.getIsSelected() || void 0,
|
|
4298
4304
|
onClick: t ? () => t(e.original) : void 0,
|
|
@@ -4327,26 +4333,26 @@ function Ma({ row: e, onRowClick: t }) {
|
|
|
4327
4333
|
})]
|
|
4328
4334
|
});
|
|
4329
4335
|
}
|
|
4330
|
-
function
|
|
4336
|
+
function Pa({ rowCount: e }) {
|
|
4331
4337
|
return /* @__PURE__ */ G("div", { children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ K("div", {
|
|
4332
4338
|
"aria-hidden": t > 0 || void 0,
|
|
4333
4339
|
className: "flex flex-col gap-2 border-b border-border-default p-4",
|
|
4334
|
-
children: [/* @__PURE__ */ G(
|
|
4340
|
+
children: [/* @__PURE__ */ G(Hi, {
|
|
4335
4341
|
variant: "text",
|
|
4336
4342
|
width: "60%"
|
|
4337
|
-
}), /* @__PURE__ */ G(
|
|
4343
|
+
}), /* @__PURE__ */ G(Hi, {
|
|
4338
4344
|
variant: "text",
|
|
4339
4345
|
width: "90%"
|
|
4340
4346
|
})]
|
|
4341
4347
|
}, t)) });
|
|
4342
4348
|
}
|
|
4343
|
-
function
|
|
4344
|
-
let { data: n, columns: r, loading: i = !1, error: a, emptyMessage: o = "No results", getRowId: s, enableSorting: c = !1, enableMultiSort: l = !1, sorting: u, onSortingChange: h, manualSorting: g = !1, enableFiltering: _ = !1, columnFilters: v, onColumnFiltersChange: y, manualFiltering: b = !1, enableGlobalFilter: x = !1, globalFilter: S, onGlobalFilterChange: C, enableRowSelection: w = !1, enableMultiRowSelection: T = !0, rowSelection: E, onRowSelectionChange: D, enableColumnVisibility: O = !1, columnVisibility: k, onColumnVisibilityChange: A, enableColumnOrdering: j = !1, columnOrder: M, onColumnOrderChange: N, enablePinning: ee = !1, columnPinning: te, onColumnPinningChange: P, enableColumnResizing: F = !1, columnResizeMode: I = "onChange", enablePagination: L = !1, pageSize: ne = 10, pageSizeOptions: re, pagination: R, onPaginationChange: ie, locale: z = "en-US", manualPagination: ae = !1, pageCount: oe, rowCount: se, enableVirtualization: ce = !1, estimatedRowHeight: le = 44, maxBodyHeight: ue = 480, onRowClick: B, toolbar: de = !1, toolbarActions: fe, searchPlaceholder: pe, onRefresh: me, onExport: he, density: ge = "comfortable", stickyHeader: _e = !1, fillHeight: V = !1, wrapperClassName: H, className: U, dataTestId: ve } = e, [ye, be] =
|
|
4349
|
+
function Fa(e, t) {
|
|
4350
|
+
let { data: n, columns: r, loading: i = !1, error: a, emptyMessage: o = "No results", getRowId: s, enableSorting: c = !1, enableMultiSort: l = !1, sorting: u, onSortingChange: h, manualSorting: g = !1, enableFiltering: _ = !1, columnFilters: v, onColumnFiltersChange: y, manualFiltering: b = !1, enableGlobalFilter: x = !1, globalFilter: S, onGlobalFilterChange: C, enableRowSelection: w = !1, enableMultiRowSelection: T = !0, rowSelection: E, onRowSelectionChange: D, enableColumnVisibility: O = !1, columnVisibility: k, onColumnVisibilityChange: A, enableColumnOrdering: j = !1, columnOrder: M, onColumnOrderChange: N, enablePinning: ee = !1, columnPinning: te, onColumnPinningChange: P, enableColumnResizing: F = !1, columnResizeMode: I = "onChange", enablePagination: L = !1, pageSize: ne = 10, pageSizeOptions: re, pagination: R, onPaginationChange: ie, locale: z = "en-US", manualPagination: ae = !1, pageCount: oe, rowCount: se, enableVirtualization: ce = !1, estimatedRowHeight: le = 44, maxBodyHeight: ue = 480, onRowClick: B, toolbar: de = !1, toolbarActions: fe, searchPlaceholder: pe, onRefresh: me, onExport: he, density: ge = "comfortable", stickyHeader: _e = !1, fillHeight: V = !1, wrapperClassName: H, className: U, dataTestId: ve } = e, [ye, be] = Aa(u, h, []), [xe, Se] = Aa(v, y, []), [Ce, we] = Aa(S, C, ""), [Te, q] = Aa(E, D, {}), [Ee, De] = Aa(k, A, {}), [Oe, Le] = Aa(M, N, []), [Re, ze] = Aa(te, P, {}), [Be, Ve] = Aa(R, ie, {
|
|
4345
4351
|
pageIndex: 0,
|
|
4346
4352
|
pageSize: ne
|
|
4347
4353
|
}), Ue = Fe({
|
|
4348
4354
|
data: n,
|
|
4349
|
-
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [
|
|
4355
|
+
columns: f(() => !w || r.some((e) => e.id === "select") ? r : [Da(), ...r], [r, w]),
|
|
4350
4356
|
getRowId: s,
|
|
4351
4357
|
state: {
|
|
4352
4358
|
sorting: ye,
|
|
@@ -4395,7 +4401,7 @@ function Pa(e, t) {
|
|
|
4395
4401
|
J,
|
|
4396
4402
|
Y
|
|
4397
4403
|
]);
|
|
4398
|
-
let Je = Y ?? le, Ye = L && !ce ? Math.max(0, Be.pageSize - J.length) * Je : 0, Xe = f(() => Oe.length > 0 ? Oe : Ue.getAllLeafColumns().map((e) => e.id), [Oe, Ue]), Ze =
|
|
4404
|
+
let Je = Y ?? le, Ye = L && !ce ? Math.max(0, Be.pageSize - J.length) * Je : 0, Xe = f(() => Oe.length > 0 ? Oe : Ue.getAllLeafColumns().map((e) => e.id), [Oe, Ue]), Ze = Sa({
|
|
4399
4405
|
columnOrder: Xe,
|
|
4400
4406
|
onColumnOrderChange: Le
|
|
4401
4407
|
}), Qe = (e) => Ze.handleDragEnd(e), $e = p(null), et = ke({
|
|
@@ -4416,14 +4422,15 @@ function Pa(e, t) {
|
|
|
4416
4422
|
className: X("group border-t border-border-default", B && "cursor-pointer"),
|
|
4417
4423
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ G("td", {
|
|
4418
4424
|
"data-test-id": rt(`cell-${e.column.id}`),
|
|
4419
|
-
style:
|
|
4420
|
-
className: X("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50",
|
|
4425
|
+
style: ka(e.column),
|
|
4426
|
+
className: X("bg-bg-default px-4 group-hover:bg-bg-container group-data-[selected]:bg-brand-50", Ta[ge], Ea[e.column.columnDef.meta?.align ?? "left"]),
|
|
4421
4427
|
children: Ae(e.column.columnDef.cell, e.getContext())
|
|
4422
4428
|
}, e.id))
|
|
4423
4429
|
}, e.id), ot = (e, t) => /* @__PURE__ */ G("tr", {
|
|
4424
4430
|
"data-test-id": rt(`header-row-${e}`),
|
|
4425
|
-
children: t.map((e) => /* @__PURE__ */ G(
|
|
4431
|
+
children: t.map((e) => /* @__PURE__ */ G(Ma, {
|
|
4426
4432
|
header: e,
|
|
4433
|
+
dataTestId: rt(`header-${e.column.id}`),
|
|
4427
4434
|
density: ge,
|
|
4428
4435
|
enableSorting: c,
|
|
4429
4436
|
enableFiltering: _,
|
|
@@ -4438,7 +4445,7 @@ function Pa(e, t) {
|
|
|
4438
4445
|
children: [/* @__PURE__ */ G("thead", {
|
|
4439
4446
|
className: X("text-p-sm font-semibold text-fg-secondary uppercase tracking-wider", (_e || V) && "sticky top-0 z-10"),
|
|
4440
4447
|
children: Ue.getHeaderGroups().map((e) => ot(e.id, e.headers))
|
|
4441
|
-
}), /* @__PURE__ */ G("tbody", { children: i ? /* @__PURE__ */ G(
|
|
4448
|
+
}), /* @__PURE__ */ G("tbody", { children: i ? /* @__PURE__ */ G(_a, {
|
|
4442
4449
|
columnCount: Ge,
|
|
4443
4450
|
rowCount: Be.pageSize,
|
|
4444
4451
|
testIdPrefix: ve
|
|
@@ -4447,7 +4454,7 @@ function Pa(e, t) {
|
|
|
4447
4454
|
children: /* @__PURE__ */ G("td", {
|
|
4448
4455
|
colSpan: Ge,
|
|
4449
4456
|
className: "p-0",
|
|
4450
|
-
children: /* @__PURE__ */ G(
|
|
4457
|
+
children: /* @__PURE__ */ G(Tr, {
|
|
4451
4458
|
size: "sm",
|
|
4452
4459
|
title: o
|
|
4453
4460
|
})
|
|
@@ -4488,7 +4495,7 @@ function Pa(e, t) {
|
|
|
4488
4495
|
"data-test-id": ve,
|
|
4489
4496
|
className: X("w-full rounded-lg border border-border-default bg-bg-default", V && "h-full flex flex-col", H, U),
|
|
4490
4497
|
children: [
|
|
4491
|
-
de === !1 ? null : de ?? /* @__PURE__ */ G(
|
|
4498
|
+
de === !1 ? null : de ?? /* @__PURE__ */ G(ba, {
|
|
4492
4499
|
table: Ue,
|
|
4493
4500
|
enableGlobalFilter: x,
|
|
4494
4501
|
enableColumnVisibility: O,
|
|
@@ -4499,7 +4506,7 @@ function Pa(e, t) {
|
|
|
4499
4506
|
}),
|
|
4500
4507
|
a ? /* @__PURE__ */ G("div", {
|
|
4501
4508
|
className: "p-4",
|
|
4502
|
-
children: /* @__PURE__ */ G(
|
|
4509
|
+
children: /* @__PURE__ */ G(Nr, {
|
|
4503
4510
|
variant: "danger",
|
|
4504
4511
|
title: "Couldn't load data",
|
|
4505
4512
|
description: a
|
|
@@ -4524,15 +4531,15 @@ function Pa(e, t) {
|
|
|
4524
4531
|
})
|
|
4525
4532
|
}), /* @__PURE__ */ G("div", {
|
|
4526
4533
|
className: "md:hidden",
|
|
4527
|
-
children: i ? /* @__PURE__ */ G(
|
|
4534
|
+
children: i ? /* @__PURE__ */ G(Pa, { rowCount: Be.pageSize }) : J.length === 0 ? /* @__PURE__ */ G(Tr, {
|
|
4528
4535
|
size: "sm",
|
|
4529
4536
|
title: o
|
|
4530
|
-
}) : J.map((e) => /* @__PURE__ */ G(
|
|
4537
|
+
}) : J.map((e) => /* @__PURE__ */ G(Na, {
|
|
4531
4538
|
row: e,
|
|
4532
4539
|
onRowClick: B
|
|
4533
4540
|
}, e.id))
|
|
4534
4541
|
})] }),
|
|
4535
|
-
L && !a && /* @__PURE__ */ G(
|
|
4542
|
+
L && !a && /* @__PURE__ */ G(ga, {
|
|
4536
4543
|
table: Ue,
|
|
4537
4544
|
pageSizeOptions: re,
|
|
4538
4545
|
locale: z,
|
|
@@ -4541,17 +4548,17 @@ function Pa(e, t) {
|
|
|
4541
4548
|
]
|
|
4542
4549
|
});
|
|
4543
4550
|
}
|
|
4544
|
-
var
|
|
4545
|
-
|
|
4551
|
+
var Ia = a(Fa);
|
|
4552
|
+
Ia.displayName = "TableV2";
|
|
4546
4553
|
//#endregion
|
|
4547
4554
|
//#region src/components/Tabs/Tabs.tsx
|
|
4548
|
-
var
|
|
4549
|
-
function
|
|
4550
|
-
let e = c(
|
|
4555
|
+
var La = r(null);
|
|
4556
|
+
function Ra() {
|
|
4557
|
+
let e = c(La);
|
|
4551
4558
|
if (!e) throw Error("Tab components must be used inside <Tabs>");
|
|
4552
4559
|
return e;
|
|
4553
4560
|
}
|
|
4554
|
-
function
|
|
4561
|
+
function za(t) {
|
|
4555
4562
|
let n = [];
|
|
4556
4563
|
e.forEach(t, (e) => {
|
|
4557
4564
|
o(e) && n.push(e);
|
|
@@ -4565,9 +4572,9 @@ function Ra(t) {
|
|
|
4565
4572
|
}
|
|
4566
4573
|
return "";
|
|
4567
4574
|
}
|
|
4568
|
-
var
|
|
4569
|
-
let [f, p] = m(() => e ??
|
|
4570
|
-
return /* @__PURE__ */ G(
|
|
4575
|
+
var Ba = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r = "underline", size: i = "md", disabled: a = !1, className: o, children: s, dataTestId: c, ...l }, d) {
|
|
4576
|
+
let [f, p] = m(() => e ?? za(s)), h = t !== void 0, g = h ? t : f, _ = u();
|
|
4577
|
+
return /* @__PURE__ */ G(La.Provider, {
|
|
4571
4578
|
value: {
|
|
4572
4579
|
value: g,
|
|
4573
4580
|
setValue: (e) => {
|
|
@@ -4586,10 +4593,10 @@ var za = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4586
4593
|
children: s
|
|
4587
4594
|
})
|
|
4588
4595
|
});
|
|
4589
|
-
}),
|
|
4590
|
-
let { variant: s } =
|
|
4596
|
+
}), Va = a(function({ children: e, scrollable: t = !1, className: n, dataTestId: r, onKeyDown: i, ...a }, o) {
|
|
4597
|
+
let { variant: s } = Ra(), c = p(null);
|
|
4591
4598
|
return /* @__PURE__ */ G("div", {
|
|
4592
|
-
ref:
|
|
4599
|
+
ref: Xt(o, c),
|
|
4593
4600
|
role: "tablist",
|
|
4594
4601
|
onKeyDown: (e) => {
|
|
4595
4602
|
i?.(e);
|
|
@@ -4609,12 +4616,12 @@ var za = a(function({ defaultValue: e, value: t, onValueChange: n, variant: r =
|
|
|
4609
4616
|
children: e
|
|
4610
4617
|
});
|
|
4611
4618
|
});
|
|
4612
|
-
|
|
4613
|
-
var
|
|
4619
|
+
Va.displayName = "TabList";
|
|
4620
|
+
var Ha = {
|
|
4614
4621
|
lg: "h-11 px-4 text-p-md",
|
|
4615
4622
|
md: "h-10 px-3 text-p-std",
|
|
4616
4623
|
sm: "h-8 px-2.5 text-p-sm"
|
|
4617
|
-
},
|
|
4624
|
+
}, Ua = {
|
|
4618
4625
|
underline: {
|
|
4619
4626
|
on: "bg-brand-500 text-white",
|
|
4620
4627
|
off: "bg-bg-subtle text-fg-secondary"
|
|
@@ -4627,8 +4634,8 @@ var Va = {
|
|
|
4627
4634
|
on: "bg-brand-500 text-white",
|
|
4628
4635
|
off: "bg-bg-subtle text-fg-secondary"
|
|
4629
4636
|
}
|
|
4630
|
-
},
|
|
4631
|
-
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } =
|
|
4637
|
+
}, Wa = a(function({ value: e, children: t, disabled: n, icon: r, badge: i, badgeProps: a, rightIcon: o, onRightIconClick: s, rightIconLabel: c, className: l, dataTestId: u, onClick: d, id: f, ...p }, m) {
|
|
4638
|
+
let { value: h, setValue: g, variant: _, size: v, tabsId: y, disabled: b } = Ra(), x = $e(h, e), S = b || n, C = i != null && i !== !1, w = f ?? `${y}-tab-${e}`, T = `${y}-panel-${e}`, E = Z(u), D = X("group relative inline-flex items-center justify-center gap-2 font-medium outline-none transition-colors", "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-1 focus-visible:rounded-md", Ha[v], S && "opacity-50 cursor-not-allowed"), O = _ === "underline" ? X("rounded-t-lg", x ? "text-fg-default" : "text-fg-secondary hover:text-fg-default hover:bg-bg-subtle/60") : _ === "pills" ? X("rounded-full", x ? "bg-bg-default text-fg-default shadow-z1" : "bg-transparent text-fg-secondary hover:text-fg-default") : X("border-r border-border-default last:border-r-0", x ? "bg-bg-default text-fg-default" : "bg-transparent text-fg-secondary hover:bg-bg-subtle"), k = /* @__PURE__ */ K("button", {
|
|
4632
4639
|
ref: m,
|
|
4633
4640
|
id: w,
|
|
4634
4641
|
type: "button",
|
|
@@ -4641,7 +4648,7 @@ var Va = {
|
|
|
4641
4648
|
onClick: (t) => {
|
|
4642
4649
|
S || (g(e), d?.(t));
|
|
4643
4650
|
},
|
|
4644
|
-
className: X(
|
|
4651
|
+
className: X(D, O, o && "pr-9", l),
|
|
4645
4652
|
...p,
|
|
4646
4653
|
children: [
|
|
4647
4654
|
r && /* @__PURE__ */ G("span", {
|
|
@@ -4652,23 +4659,24 @@ var Va = {
|
|
|
4652
4659
|
className: "truncate",
|
|
4653
4660
|
children: t
|
|
4654
4661
|
}),
|
|
4655
|
-
C && (a ? /* @__PURE__ */ G(
|
|
4662
|
+
C && (a ? /* @__PURE__ */ G(It, {
|
|
4656
4663
|
size: "xs",
|
|
4657
4664
|
...a,
|
|
4665
|
+
dataTestId: E("badge"),
|
|
4658
4666
|
children: i
|
|
4659
4667
|
}) : /* @__PURE__ */ G("span", {
|
|
4660
|
-
className: X("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-
|
|
4668
|
+
className: X("inline-flex items-center justify-center shrink-0 rounded-full px-1.5 h-5 min-w-5", "text-label-xs font-semibold tabular-nums leading-none transition-colors", x ? Ua[_].on : Ua[_].off),
|
|
4661
4669
|
children: i
|
|
4662
4670
|
})),
|
|
4663
4671
|
_ === "underline" && /* @__PURE__ */ G("span", {
|
|
4664
4672
|
"aria-hidden": !0,
|
|
4665
|
-
className: X("pointer-events-none absolute inset-x-0 -bottom-px h-
|
|
4673
|
+
className: X("pointer-events-none absolute inset-x-0 -bottom-px h-0.5 rounded-full bg-brand-500 transition-opacity duration-150", x ? "opacity-100" : "opacity-0")
|
|
4666
4674
|
})
|
|
4667
4675
|
]
|
|
4668
4676
|
});
|
|
4669
4677
|
return o ? /* @__PURE__ */ K("span", {
|
|
4670
4678
|
className: "relative inline-flex",
|
|
4671
|
-
children: [
|
|
4679
|
+
children: [k, /* @__PURE__ */ G("button", {
|
|
4672
4680
|
type: "button",
|
|
4673
4681
|
"aria-label": c,
|
|
4674
4682
|
disabled: S,
|
|
@@ -4678,9 +4686,9 @@ var Va = {
|
|
|
4678
4686
|
className: "absolute right-1.5 top-1/2 -translate-y-1/2 inline-flex items-center justify-center size-5 rounded text-fg-tertiary hover:text-fg-default hover:bg-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-300",
|
|
4679
4687
|
children: o
|
|
4680
4688
|
})]
|
|
4681
|
-
}) :
|
|
4682
|
-
}),
|
|
4683
|
-
let { value: c, tabsId: l } =
|
|
4689
|
+
}) : k;
|
|
4690
|
+
}), Ga = a(function({ value: e, children: t, className: n, dataTestId: r, id: i, keepMounted: a = !1, ...o }, s) {
|
|
4691
|
+
let { value: c, tabsId: l } = Ra(), u = $e(c, e);
|
|
4684
4692
|
return !u && !a ? null : /* @__PURE__ */ G("div", {
|
|
4685
4693
|
ref: s,
|
|
4686
4694
|
id: i ?? `${l}-panel-${e}`,
|
|
@@ -4692,7 +4700,7 @@ var Va = {
|
|
|
4692
4700
|
...o,
|
|
4693
4701
|
children: t
|
|
4694
4702
|
});
|
|
4695
|
-
}),
|
|
4703
|
+
}), Ka = a(function({ label: e, labelAddons: t, helperText: n, errorText: r, error: i = !1, id: a, disabled: o, required: s, maxLength: c, showCount: l = !1, className: d, wrapperClassName: f, value: p, defaultValue: h, rows: g = 4, dataTestId: _, onChange: v, ...y }, b) {
|
|
4696
4704
|
let x = u(), S = a ?? x, C = i || !!r, w = r ? `${S}-error` : n ? `${S}-help` : void 0, T = p !== void 0, E = l && !!c, [D, O] = m(() => String(h ?? "").length), k = T ? String(p).length : D;
|
|
4697
4705
|
return /* @__PURE__ */ K("div", {
|
|
4698
4706
|
className: X("flex flex-col gap-1.5 w-full", f),
|
|
@@ -4750,7 +4758,7 @@ var Va = {
|
|
|
4750
4758
|
})
|
|
4751
4759
|
]
|
|
4752
4760
|
});
|
|
4753
|
-
}),
|
|
4761
|
+
}), qa = a(function({ checked: e, label: t, id: n, disabled: r, className: i, dataTestId: a, ...o }, s) {
|
|
4754
4762
|
let c = u(), l = n ?? c;
|
|
4755
4763
|
return /* @__PURE__ */ K("label", {
|
|
4756
4764
|
htmlFor: l,
|
|
@@ -4790,81 +4798,81 @@ var Va = {
|
|
|
4790
4798
|
children: t
|
|
4791
4799
|
})]
|
|
4792
4800
|
});
|
|
4793
|
-
}),
|
|
4794
|
-
function Xa(e) {
|
|
4795
|
-
return `${Ya(Math.floor(e / 60))}:${Ya(e % 60)}`;
|
|
4796
|
-
}
|
|
4801
|
+
}), Ja = 1440, Ya = 15, Xa = (e) => String(e).padStart(2, "0");
|
|
4797
4802
|
function Za(e) {
|
|
4803
|
+
return `${Xa(Math.floor(e / 60))}:${Xa(e % 60)}`;
|
|
4804
|
+
}
|
|
4805
|
+
function Qa(e) {
|
|
4798
4806
|
let t = /^(\d{1,2}):(\d{2})$/.exec(e.trim());
|
|
4799
4807
|
if (!t) return null;
|
|
4800
4808
|
let n = Number(t[1]), r = Number(t[2]);
|
|
4801
4809
|
return n > 23 || r > 59 ? null : n * 60 + r;
|
|
4802
4810
|
}
|
|
4803
|
-
function Qa(e) {
|
|
4804
|
-
if (e == null) return null;
|
|
4805
|
-
let t = Za(e);
|
|
4806
|
-
return t === null ? null : Xa(t);
|
|
4807
|
-
}
|
|
4808
4811
|
function $a(e) {
|
|
4809
|
-
|
|
4812
|
+
if (e == null) return null;
|
|
4813
|
+
let t = Qa(e);
|
|
4814
|
+
return t === null ? null : Za(t);
|
|
4810
4815
|
}
|
|
4811
4816
|
function eo(e) {
|
|
4812
|
-
|
|
4813
|
-
|
|
4817
|
+
return e !== void 0 && Number.isFinite(e) && e >= 1 && e <= Ja ? Math.floor(e) : Ya;
|
|
4818
|
+
}
|
|
4819
|
+
function to(e) {
|
|
4820
|
+
let t = eo(e), n = [];
|
|
4821
|
+
for (let e = 0; e < Ja; e += t) n.push(Za(e));
|
|
4814
4822
|
return n;
|
|
4815
4823
|
}
|
|
4816
|
-
function
|
|
4817
|
-
let i =
|
|
4824
|
+
function no({ minTime: e, maxTime: t, excludeTimes: n, filterTime: r }) {
|
|
4825
|
+
let i = $a(e), a = $a(t), o = new Set((n ?? []).map($a).filter((e) => e !== null));
|
|
4818
4826
|
return (e) => i !== null && e < i || a !== null && e > a || o.has(e) || (r ? !r(e) : !1);
|
|
4819
4827
|
}
|
|
4820
|
-
var
|
|
4821
|
-
function
|
|
4828
|
+
var ro = (e) => e !== void 0 && Number(e) <= 5;
|
|
4829
|
+
function io(e) {
|
|
4822
4830
|
let t = e.trim().replace(".", ":");
|
|
4823
|
-
return /^\d{1,2}:\d{2}$/.test(t) ?
|
|
4831
|
+
return /^\d{1,2}:\d{2}$/.test(t) ? $a(t) : /^\d{3}$/.test(t) ? ro(t[1]) ? $a(`${t[0]}:${t.slice(1)}`) : null : /^\d{4}$/.test(t) ? $a(`${t.slice(0, 2)}:${t.slice(2)}`) : null;
|
|
4824
4832
|
}
|
|
4825
|
-
function
|
|
4833
|
+
function ao(e) {
|
|
4826
4834
|
return e.ctrlKey || e.metaKey || e.altKey || e.key.length > 1 ? !0 : /[\d:]/.test(e.key);
|
|
4827
4835
|
}
|
|
4828
|
-
function
|
|
4836
|
+
function oo(e) {
|
|
4829
4837
|
let t = e.trim().replace(".", ":");
|
|
4830
4838
|
if (t === "") return "";
|
|
4831
|
-
let n =
|
|
4839
|
+
let n = io(t);
|
|
4832
4840
|
if (n) return n;
|
|
4833
4841
|
let r = /^(\d{1,2}):(\d?)$/.exec(t);
|
|
4834
4842
|
if (r) {
|
|
4835
4843
|
let e = Number(r[1]), t = r[2] ?? "";
|
|
4836
|
-
return e > 23 || t !== "" && !
|
|
4844
|
+
return e > 23 || t !== "" && !ro(t) ? null : `${Xa(e)}:${t}`;
|
|
4837
4845
|
}
|
|
4838
|
-
return /^\d{1,3}$/.test(t) ? t.length === 1 ? Number(t) <= 2 ? t : `0${t}` : t.length === 2 ? Number(t) <= 23 ? `${t}:` :
|
|
4846
|
+
return /^\d{1,3}$/.test(t) ? t.length === 1 ? Number(t) <= 2 ? t : `0${t}` : t.length === 2 ? Number(t) <= 23 ? `${t}:` : ro(t[1]) ? `0${t[0]}:${t[1]}` : null : Number(t.slice(0, 2)) <= 23 && ro(t[2]) ? `${t.slice(0, 2)}:${t[2]}` : null : null;
|
|
4839
4847
|
}
|
|
4840
|
-
function
|
|
4841
|
-
let n =
|
|
4848
|
+
function so(e, t) {
|
|
4849
|
+
let n = oo(t);
|
|
4842
4850
|
return n !== null && e.startsWith(n);
|
|
4843
4851
|
}
|
|
4844
|
-
function
|
|
4845
|
-
let n =
|
|
4852
|
+
function co(e, t = /* @__PURE__ */ new Date()) {
|
|
4853
|
+
let n = Qa(e);
|
|
4846
4854
|
if (n === null) throw RangeError(`timeToDate: "${e}" is not a valid HH:mm time`);
|
|
4847
4855
|
let r = new Date(t.getTime());
|
|
4848
4856
|
return r.setHours(Math.floor(n / 60), n % 60, 0, 0), r;
|
|
4849
4857
|
}
|
|
4850
|
-
function
|
|
4851
|
-
return `${
|
|
4858
|
+
function lo(e) {
|
|
4859
|
+
return `${Xa(e.getHours())}:${Xa(e.getMinutes())}`;
|
|
4852
4860
|
}
|
|
4853
4861
|
//#endregion
|
|
4854
4862
|
//#region src/components/TimePicker/TimePickerDesktop.tsx
|
|
4855
|
-
function
|
|
4863
|
+
function uo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, searchable: a = !0, size: o = "md", label: s, required: c = !1, helperText: l, placeholder: u = "Select time", disabled: d = !1, menuPlacement: p = "auto", error: h = !1, errorText: g, id: _, className: v, dataTestId: y }) {
|
|
4856
4864
|
let b = f(() => n.map((e) => ({
|
|
4857
4865
|
value: e,
|
|
4858
4866
|
label: e,
|
|
4859
4867
|
disabled: r(e)
|
|
4860
4868
|
})), [n, r]), x = f(() => new Set(n), [n]), S = (e) => {
|
|
4861
|
-
let t =
|
|
4869
|
+
let t = io(e);
|
|
4862
4870
|
return t && !x.has(t) && !r(t) ? t : null;
|
|
4863
4871
|
}, [C, w] = m(null), T = a && !d, E = T ? C ?? e ?? "" : "", D = (n) => {
|
|
4864
|
-
let i =
|
|
4872
|
+
let i = io(n.target.value);
|
|
4865
4873
|
i && !r(i) && i !== e && t(i);
|
|
4866
4874
|
}, k = (e) => {
|
|
4867
|
-
if (!
|
|
4875
|
+
if (!ao(e)) {
|
|
4868
4876
|
e.preventDefault();
|
|
4869
4877
|
return;
|
|
4870
4878
|
}
|
|
@@ -4875,15 +4883,15 @@ function lo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, sear
|
|
|
4875
4883
|
e.key === "Home" ? e.shiftKey ? t.setSelectionRange(0, t.selectionEnd ?? n, "backward") : t.setSelectionRange(0, 0) : e.shiftKey ? t.setSelectionRange(t.selectionStart ?? 0, n, "forward") : t.setSelectionRange(n, n);
|
|
4876
4884
|
}
|
|
4877
4885
|
}, A = (t) => t === e ? "" : t;
|
|
4878
|
-
return /* @__PURE__ */ G(
|
|
4886
|
+
return /* @__PURE__ */ G(Pi, {
|
|
4879
4887
|
options: b,
|
|
4880
4888
|
value: e,
|
|
4881
4889
|
onChange: (e) => {
|
|
4882
|
-
w(null), t(e == null ? null :
|
|
4890
|
+
w(null), t(e == null ? null : $a(String(e)) ?? io(String(e)));
|
|
4883
4891
|
},
|
|
4884
4892
|
inputValue: T ? E : void 0,
|
|
4885
4893
|
onInputChange: T ? (e, t) => w(t.action === "input-change" ? e : null) : void 0,
|
|
4886
|
-
filterOption: (e, t) => e.data.__isNew__ === !0 ||
|
|
4894
|
+
filterOption: (e, t) => e.data.__isNew__ === !0 || so(e.value, A(t)),
|
|
4887
4895
|
dropdownIcon: /* @__PURE__ */ G(O, {
|
|
4888
4896
|
className: "h-4 w-4",
|
|
4889
4897
|
"aria-hidden": !0
|
|
@@ -4913,30 +4921,30 @@ function lo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, sear
|
|
|
4913
4921
|
}
|
|
4914
4922
|
//#endregion
|
|
4915
4923
|
//#region src/components/TimePicker/TimePickerMobile.tsx
|
|
4916
|
-
var
|
|
4924
|
+
var fo = {
|
|
4917
4925
|
lg: "min-h-12 px-3.5 text-p-md",
|
|
4918
4926
|
md: "min-h-10 px-3 text-p-std",
|
|
4919
4927
|
sm: "min-h-8 px-2.5 text-p-sm"
|
|
4920
|
-
},
|
|
4921
|
-
optionItem: X(
|
|
4928
|
+
}, po = Array.from({ length: 24 }, (e, t) => Xa(t)), mo = Array.from({ length: 60 }, (e, t) => Xa(t)), ho = "text-p-md font-medium text-fg-tertiary data-[disabled]:opacity-40", go = "text-p-lg font-semibold text-fg-default data-[disabled]:opacity-40", _o = {
|
|
4929
|
+
optionItem: X(ho, "justify-end pr-5"),
|
|
4922
4930
|
highlightWrapper: "bg-bg-subtle rounded-l-lg",
|
|
4923
|
-
highlightItem: X(
|
|
4924
|
-
},
|
|
4925
|
-
optionItem: X(
|
|
4931
|
+
highlightItem: X(go, "justify-end pr-5")
|
|
4932
|
+
}, vo = {
|
|
4933
|
+
optionItem: X(ho, "justify-start pl-5"),
|
|
4926
4934
|
highlightWrapper: "bg-bg-subtle rounded-r-lg",
|
|
4927
|
-
highlightItem: X(
|
|
4935
|
+
highlightItem: X(go, "justify-start pl-5")
|
|
4928
4936
|
};
|
|
4929
|
-
function
|
|
4930
|
-
let x = u(), S = v ?? x, C = Z(b), w = p || !!h, [T, E] = m(!1), [D, k] = m("00"), [A, j] = m("00"), M = (e, t) => !r(`${e}:${t}`), N = f(() =>
|
|
4937
|
+
function yo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size: a = "md", label: o, required: s = !1, helperText: c, placeholder: l = "Select time", disabled: d = !1, error: p = !1, errorText: h, mobileTitle: g, mobileApplyText: _ = "Apply", id: v, className: y, dataTestId: b }) {
|
|
4938
|
+
let x = u(), S = v ?? x, C = Z(b), w = p || !!h, [T, E] = m(!1), [D, k] = m("00"), [A, j] = m("00"), M = (e, t) => !r(`${e}:${t}`), N = f(() => po.map((e) => ({
|
|
4931
4939
|
value: e,
|
|
4932
4940
|
label: e,
|
|
4933
|
-
disabled: !
|
|
4934
|
-
})), [r]), ee = f(() =>
|
|
4941
|
+
disabled: !mo.some((t) => !r(`${e}:${t}`))
|
|
4942
|
+
})), [r]), ee = f(() => mo.map((e) => ({
|
|
4935
4943
|
value: e,
|
|
4936
4944
|
label: e,
|
|
4937
4945
|
disabled: r(`${D}:${e}`)
|
|
4938
|
-
})), [D, r]), te = (e) =>
|
|
4939
|
-
let t =
|
|
4946
|
+
})), [D, r]), te = (e) => mo.find((t) => M(e, t)), P = () => {
|
|
4947
|
+
let t = lo(/* @__PURE__ */ new Date()), [i = "00", a = "00"] = (e ?? (r(t) ? n.find((e) => !r(e)) ?? t : t)).split(":");
|
|
4940
4948
|
k(i), j(a), E(!0);
|
|
4941
4949
|
}, F = (e) => {
|
|
4942
4950
|
k(e), M(e, A) || j(te(e) ?? A);
|
|
@@ -4960,7 +4968,7 @@ function vo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size
|
|
|
4960
4968
|
"aria-describedby": h ? `${S}-error` : c ? `${S}-help` : void 0,
|
|
4961
4969
|
"data-test-id": C("trigger"),
|
|
4962
4970
|
onClick: P,
|
|
4963
|
-
className: X("flex w-full items-center justify-between gap-2 rounded-lg border bg-bg-default text-left transition-colors", "focus-visible:outline-none",
|
|
4971
|
+
className: X("flex w-full items-center justify-between gap-2 rounded-lg border bg-bg-default text-left transition-colors", "focus-visible:outline-none", fo[a], w ? "border-red-600" : "border-border-default", !d && !w && "hover:border-border-strong", T && !w && "ring-2 ring-brand-300 border-brand-500", !w && "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:border-brand-500", w && "focus-visible:ring-2 focus-visible:ring-red-300", d && "cursor-not-allowed border-border-default bg-bg-container hover:border-border-default", y),
|
|
4964
4972
|
children: [/* @__PURE__ */ G("span", {
|
|
4965
4973
|
className: X("truncate tabular-nums", e ? "text-fg-default" : "text-fg-tertiary"),
|
|
4966
4974
|
children: e ?? l
|
|
@@ -4978,7 +4986,7 @@ function vo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size
|
|
|
4978
4986
|
className: "text-p-sm text-fg-secondary",
|
|
4979
4987
|
children: c
|
|
4980
4988
|
}) : null,
|
|
4981
|
-
/* @__PURE__ */ G(
|
|
4989
|
+
/* @__PURE__ */ G(Ir, {
|
|
4982
4990
|
open: T,
|
|
4983
4991
|
onClose: () => E(!1),
|
|
4984
4992
|
title: g ?? o ?? "Select time",
|
|
@@ -5014,13 +5022,13 @@ function vo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size
|
|
|
5014
5022
|
onValueChange: F,
|
|
5015
5023
|
options: N,
|
|
5016
5024
|
infinite: !0,
|
|
5017
|
-
classNames:
|
|
5025
|
+
classNames: _o
|
|
5018
5026
|
}), /* @__PURE__ */ G(Y, {
|
|
5019
5027
|
value: A,
|
|
5020
5028
|
onValueChange: j,
|
|
5021
5029
|
options: ee,
|
|
5022
5030
|
infinite: !0,
|
|
5023
|
-
classNames:
|
|
5031
|
+
classNames: vo
|
|
5024
5032
|
})]
|
|
5025
5033
|
})
|
|
5026
5034
|
})
|
|
@@ -5030,10 +5038,10 @@ function vo({ value: e, onCommit: t, times: n, isDisabled: r, clearable: i, size
|
|
|
5030
5038
|
}
|
|
5031
5039
|
//#endregion
|
|
5032
5040
|
//#region src/components/TimePicker/TimePicker.tsx
|
|
5033
|
-
var
|
|
5034
|
-
let g =
|
|
5041
|
+
var bo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 15, minTime: i, maxTime: a, excludeTimes: o, filterTime: s, mobile: c, fullWidth: l = !1, clearable: u = !0, wrapperClassName: d, ...p }, h) {
|
|
5042
|
+
let g = nr(), _ = c ?? g, [v, y] = m(() => $a(t)), b = e !== void 0, x = b ? $a(e) : v, S = (e) => {
|
|
5035
5043
|
b || y(e), n?.(e);
|
|
5036
|
-
}, C =
|
|
5044
|
+
}, C = eo(r), w = f(() => to(C), [C]), T = o?.join(","), E = f(() => no({
|
|
5037
5045
|
minTime: i,
|
|
5038
5046
|
maxTime: a,
|
|
5039
5047
|
excludeTimes: T ? T.split(",") : void 0,
|
|
@@ -5054,28 +5062,28 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5054
5062
|
return /* @__PURE__ */ G("div", {
|
|
5055
5063
|
ref: h,
|
|
5056
5064
|
className: X(l ? "w-full" : "w-fit min-w-[260px]", d),
|
|
5057
|
-
children: G(_ ?
|
|
5065
|
+
children: G(_ ? yo : uo, { ...D })
|
|
5058
5066
|
});
|
|
5059
|
-
}),
|
|
5067
|
+
}), xo = {
|
|
5060
5068
|
lg: "px-3 py-2 text-p-std",
|
|
5061
5069
|
sm: "px-2 py-1 text-p-sm"
|
|
5062
|
-
},
|
|
5070
|
+
}, So = {
|
|
5063
5071
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5064
5072
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
5065
5073
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
5066
5074
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
5067
|
-
},
|
|
5075
|
+
}, Co = {
|
|
5068
5076
|
top: "top-full left-1/2 -translate-x-1/2 border-t-fg-default border-x-transparent border-b-transparent",
|
|
5069
5077
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-fg-default border-x-transparent border-t-transparent",
|
|
5070
5078
|
left: "left-full top-1/2 -translate-y-1/2 border-l-fg-default border-y-transparent border-r-transparent",
|
|
5071
5079
|
right: "right-full top-1/2 -translate-y-1/2 border-r-fg-default border-y-transparent border-l-transparent"
|
|
5072
|
-
},
|
|
5080
|
+
}, wo = {
|
|
5073
5081
|
top: "border-t-fg-default border-x-transparent border-b-transparent",
|
|
5074
5082
|
bottom: "border-b-fg-default border-x-transparent border-t-transparent",
|
|
5075
5083
|
left: "border-l-fg-default border-y-transparent border-r-transparent",
|
|
5076
5084
|
right: "border-r-fg-default border-y-transparent border-l-transparent"
|
|
5077
|
-
},
|
|
5078
|
-
let [f, h] = m(!1), [g, _] = m(null), v = p(null), y = p(null), b = u(), { style: x, arrowStyle: S, resolvedSide: C } =
|
|
5085
|
+
}, To = a(function({ content: e, children: t, side: r = "top", size: i = "sm", delay: a = 150, portalTarget: s, className: c, dataTestId: l }, d) {
|
|
5086
|
+
let [f, h] = m(!1), [g, _] = m(null), v = p(null), y = p(null), b = u(), { style: x, arrowStyle: S, resolvedSide: C } = tn({
|
|
5079
5087
|
anchor: y,
|
|
5080
5088
|
panel: g,
|
|
5081
5089
|
open: f && !!s,
|
|
@@ -5098,40 +5106,40 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5098
5106
|
role: "tooltip",
|
|
5099
5107
|
id: b,
|
|
5100
5108
|
style: s ? x : void 0,
|
|
5101
|
-
className: X("z-50 whitespace-pre-wrap w-max rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none",
|
|
5109
|
+
className: X("z-50 whitespace-pre-wrap w-max rounded-md bg-fg-default text-bg-default shadow-z3 pointer-events-none select-none", xo[i], !s && ["absolute", So[r]], c),
|
|
5102
5110
|
children: [e, s ? /* @__PURE__ */ G("span", {
|
|
5103
5111
|
"aria-hidden": !0,
|
|
5104
5112
|
style: S,
|
|
5105
|
-
className: X("absolute h-0 w-0 border-4",
|
|
5113
|
+
className: X("absolute h-0 w-0 border-4", wo[C])
|
|
5106
5114
|
}) : /* @__PURE__ */ G("span", {
|
|
5107
5115
|
"aria-hidden": !0,
|
|
5108
|
-
className: X("absolute h-0 w-0 border-4",
|
|
5116
|
+
className: X("absolute h-0 w-0 border-4", Co[r])
|
|
5109
5117
|
})]
|
|
5110
5118
|
});
|
|
5111
5119
|
return /* @__PURE__ */ K("span", {
|
|
5112
|
-
ref:
|
|
5120
|
+
ref: Xt(d, y),
|
|
5113
5121
|
"data-test-id": l,
|
|
5114
5122
|
className: X("inline-flex", !s && "relative"),
|
|
5115
5123
|
children: [D, f && (s ? be(O, s) : O)]
|
|
5116
5124
|
});
|
|
5117
|
-
}),
|
|
5125
|
+
}), Eo = "We'll be back soon", Do = "We're currently performing scheduled maintenance to make your experience even better. Please check back shortly.", Oo = {
|
|
5118
5126
|
lg: "xl",
|
|
5119
5127
|
sm: "lg"
|
|
5120
|
-
},
|
|
5121
|
-
return /* @__PURE__ */ G(
|
|
5128
|
+
}, ko = a(function({ size: e = "lg", title: t, description: n, illustration: r, ...i }, a) {
|
|
5129
|
+
return /* @__PURE__ */ G(Tr, {
|
|
5122
5130
|
ref: a,
|
|
5123
5131
|
size: e,
|
|
5124
|
-
title: t ??
|
|
5125
|
-
description: n ??
|
|
5126
|
-
illustration: r ?? /* @__PURE__ */ G(
|
|
5132
|
+
title: t ?? Eo,
|
|
5133
|
+
description: n ?? Do,
|
|
5134
|
+
illustration: r ?? /* @__PURE__ */ G(An, {
|
|
5127
5135
|
icon: A,
|
|
5128
5136
|
tone: "brand",
|
|
5129
5137
|
shape: "circle",
|
|
5130
|
-
size:
|
|
5138
|
+
size: Oo[e]
|
|
5131
5139
|
}),
|
|
5132
5140
|
...i
|
|
5133
5141
|
});
|
|
5134
|
-
}),
|
|
5142
|
+
}), Ao = {
|
|
5135
5143
|
900: "#31531C",
|
|
5136
5144
|
800: "#416E26",
|
|
5137
5145
|
700: "#518A2F",
|
|
@@ -5157,7 +5165,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5157
5165
|
100: "#f2f5f8",
|
|
5158
5166
|
50: "#f5f7fa",
|
|
5159
5167
|
20: "#f7f9fc"
|
|
5160
|
-
},
|
|
5168
|
+
}, jo = "#FEFEFE", Mo = {
|
|
5161
5169
|
900: "#0b4627",
|
|
5162
5170
|
800: "#0f5c33",
|
|
5163
5171
|
700: "#3D8B46",
|
|
@@ -5168,7 +5176,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5168
5176
|
200: "#aeeacb",
|
|
5169
5177
|
100: "#d0f5e1",
|
|
5170
5178
|
50: "#e0faec"
|
|
5171
|
-
},
|
|
5179
|
+
}, No = {
|
|
5172
5180
|
900: "#2443B8",
|
|
5173
5181
|
800: "#2E63D6",
|
|
5174
5182
|
700: "#3475E8",
|
|
@@ -5179,7 +5187,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5179
5187
|
200: "#9ACAFA",
|
|
5180
5188
|
100: "#C1DEFC",
|
|
5181
5189
|
50: "#E6F2FE"
|
|
5182
|
-
},
|
|
5190
|
+
}, Po = {
|
|
5183
5191
|
900: "#081FA6",
|
|
5184
5192
|
800: "#0E2AB2",
|
|
5185
5193
|
700: "#2431B9",
|
|
@@ -5191,7 +5199,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5191
5199
|
100: "#CBC4ED",
|
|
5192
5200
|
50: "#EAE7F7",
|
|
5193
5201
|
20: "#F5F3FB"
|
|
5194
|
-
},
|
|
5202
|
+
}, Fo = {
|
|
5195
5203
|
900: "#4A0A20",
|
|
5196
5204
|
800: "#79012F",
|
|
5197
5205
|
700: "#A2023F",
|
|
@@ -5202,7 +5210,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5202
5210
|
200: "#FE7DAF",
|
|
5203
5211
|
100: "#FEA8C9",
|
|
5204
5212
|
50: "#FFD4E4"
|
|
5205
|
-
},
|
|
5213
|
+
}, Io = {
|
|
5206
5214
|
900: "#8b1822",
|
|
5207
5215
|
800: "#ad1f2b",
|
|
5208
5216
|
700: "#d02533",
|
|
@@ -5214,7 +5222,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5214
5222
|
100: "#ffd5d8",
|
|
5215
5223
|
50: "#ffebec",
|
|
5216
5224
|
20: "#fff4f4"
|
|
5217
|
-
},
|
|
5225
|
+
}, Lo = {
|
|
5218
5226
|
900: "#EB7520",
|
|
5219
5227
|
800: "#ED912A",
|
|
5220
5228
|
700: "#EEA02F",
|
|
@@ -5225,47 +5233,47 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5225
5233
|
200: "#F7DE8E",
|
|
5226
5234
|
100: "#FAEBB9",
|
|
5227
5235
|
50: "#FDF7E4"
|
|
5228
|
-
}, Lo = {
|
|
5229
|
-
brand: ko,
|
|
5230
|
-
gray: $,
|
|
5231
|
-
green: jo,
|
|
5232
|
-
blue: Mo,
|
|
5233
|
-
purple: No,
|
|
5234
|
-
pink: Po,
|
|
5235
|
-
red: Fo,
|
|
5236
|
-
yellow: Io
|
|
5237
5236
|
}, Ro = {
|
|
5238
|
-
|
|
5237
|
+
brand: Ao,
|
|
5238
|
+
gray: $,
|
|
5239
|
+
green: Mo,
|
|
5240
|
+
blue: No,
|
|
5241
|
+
purple: Po,
|
|
5242
|
+
pink: Fo,
|
|
5243
|
+
red: Io,
|
|
5244
|
+
yellow: Lo
|
|
5245
|
+
}, zo = {
|
|
5246
|
+
bgDefault: jo,
|
|
5239
5247
|
bgContainer: $[50],
|
|
5240
5248
|
bgSubtle: $[100],
|
|
5241
|
-
bgBrandLighter:
|
|
5242
|
-
bgInfoLighter:
|
|
5243
|
-
bgSuccessLighter:
|
|
5244
|
-
bgWarningLighter:
|
|
5245
|
-
bgDangerLighter:
|
|
5249
|
+
bgBrandLighter: Ao[20],
|
|
5250
|
+
bgInfoLighter: No[50],
|
|
5251
|
+
bgSuccessLighter: Mo[50],
|
|
5252
|
+
bgWarningLighter: Lo[50],
|
|
5253
|
+
bgDangerLighter: Io[50],
|
|
5246
5254
|
fgDefault: $[900],
|
|
5247
5255
|
fgSecondary: $[600],
|
|
5248
5256
|
fgTertiary: $[500],
|
|
5249
5257
|
fgDisabled: $[400],
|
|
5250
|
-
fgInverse:
|
|
5251
|
-
fgBrand:
|
|
5252
|
-
fgInfo:
|
|
5253
|
-
fgSuccess:
|
|
5254
|
-
fgWarning:
|
|
5255
|
-
fgDanger:
|
|
5258
|
+
fgInverse: jo,
|
|
5259
|
+
fgBrand: Ao[500],
|
|
5260
|
+
fgInfo: No[600],
|
|
5261
|
+
fgSuccess: Mo[600],
|
|
5262
|
+
fgWarning: Lo[800],
|
|
5263
|
+
fgDanger: Io[600],
|
|
5256
5264
|
borderDefault: $[200],
|
|
5257
5265
|
borderSubtle: $[100],
|
|
5258
5266
|
borderStrong: $[300],
|
|
5259
|
-
borderBrand:
|
|
5267
|
+
borderBrand: Ao[500],
|
|
5260
5268
|
iconPrimary: $[900],
|
|
5261
5269
|
iconSecondary: $[600],
|
|
5262
|
-
iconInverse:
|
|
5263
|
-
iconBrand:
|
|
5264
|
-
iconInfo:
|
|
5265
|
-
iconDanger:
|
|
5266
|
-
iconWarning:
|
|
5267
|
-
},
|
|
5268
|
-
...
|
|
5270
|
+
iconInverse: jo,
|
|
5271
|
+
iconBrand: Ao[500],
|
|
5272
|
+
iconInfo: No[600],
|
|
5273
|
+
iconDanger: Io[800],
|
|
5274
|
+
iconWarning: Lo[800]
|
|
5275
|
+
}, Bo = {
|
|
5276
|
+
...zo,
|
|
5269
5277
|
bgDefault: "#0B1120",
|
|
5270
5278
|
bgContainer: "#0F172A",
|
|
5271
5279
|
bgSubtle: "#121C30",
|
|
@@ -5274,17 +5282,17 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5274
5282
|
bgSuccessLighter: "rgba(31, 193, 107, 0.15)",
|
|
5275
5283
|
bgWarningLighter: "rgba(237, 145, 42, 0.15)",
|
|
5276
5284
|
bgDangerLighter: "rgba(230, 27, 0, 0.15)",
|
|
5277
|
-
fgDefault:
|
|
5285
|
+
fgDefault: jo,
|
|
5278
5286
|
fgSecondary: $[400],
|
|
5279
5287
|
fgTertiary: $[500],
|
|
5280
5288
|
fgDisabled: $[600],
|
|
5281
|
-
fgDanger:
|
|
5289
|
+
fgDanger: Io[600],
|
|
5282
5290
|
borderDefault: "rgba(255, 255, 255, 0.05)",
|
|
5283
5291
|
borderSubtle: "rgba(255, 255, 255, 0.03)",
|
|
5284
5292
|
borderStrong: "rgba(255, 255, 255, 0.10)",
|
|
5285
|
-
iconPrimary:
|
|
5293
|
+
iconPrimary: jo,
|
|
5286
5294
|
iconSecondary: $[400]
|
|
5287
|
-
},
|
|
5295
|
+
}, Vo = {
|
|
5288
5296
|
ps: [
|
|
5289
5297
|
"Noto Sans Armenian",
|
|
5290
5298
|
"Noto Sans",
|
|
@@ -5299,7 +5307,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5299
5307
|
"system-ui",
|
|
5300
5308
|
"sans-serif"
|
|
5301
5309
|
]
|
|
5302
|
-
},
|
|
5310
|
+
}, Ho = {
|
|
5303
5311
|
xl: {
|
|
5304
5312
|
fontSize: "64px",
|
|
5305
5313
|
lineHeight: "72px"
|
|
@@ -5324,7 +5332,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5324
5332
|
fontSize: "24px",
|
|
5325
5333
|
lineHeight: "32px"
|
|
5326
5334
|
}
|
|
5327
|
-
},
|
|
5335
|
+
}, Uo = {
|
|
5328
5336
|
lg: {
|
|
5329
5337
|
fontSize: "20px",
|
|
5330
5338
|
lineHeight: "28px"
|
|
@@ -5345,7 +5353,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5345
5353
|
fontSize: "10px",
|
|
5346
5354
|
lineHeight: "14px"
|
|
5347
5355
|
}
|
|
5348
|
-
},
|
|
5356
|
+
}, Wo = {
|
|
5349
5357
|
lg: {
|
|
5350
5358
|
fontSize: "20px",
|
|
5351
5359
|
lineHeight: "28px"
|
|
@@ -5370,19 +5378,19 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5370
5378
|
fontSize: "6px",
|
|
5371
5379
|
lineHeight: "6px"
|
|
5372
5380
|
}
|
|
5373
|
-
}, Wo = {
|
|
5374
|
-
headline: Vo,
|
|
5375
|
-
paragraph: Ho,
|
|
5376
|
-
label: Uo
|
|
5377
5381
|
}, Go = {
|
|
5382
|
+
headline: Ho,
|
|
5383
|
+
paragraph: Uo,
|
|
5384
|
+
label: Wo
|
|
5385
|
+
}, Ko = {
|
|
5378
5386
|
sm: "2rem",
|
|
5379
5387
|
md: "2.5rem",
|
|
5380
5388
|
lg: "3rem"
|
|
5381
|
-
},
|
|
5389
|
+
}, qo = {
|
|
5382
5390
|
sm: "0.875rem",
|
|
5383
5391
|
md: "1rem",
|
|
5384
5392
|
lg: "1.25rem"
|
|
5385
|
-
},
|
|
5393
|
+
}, Jo = {
|
|
5386
5394
|
xs: "2px",
|
|
5387
5395
|
sm: "4px",
|
|
5388
5396
|
md: "8px",
|
|
@@ -5391,7 +5399,7 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5391
5399
|
"2xl": "20px",
|
|
5392
5400
|
"3xl": "24px",
|
|
5393
5401
|
full: "9999px"
|
|
5394
|
-
},
|
|
5402
|
+
}, Yo = {
|
|
5395
5403
|
z1: "0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
5396
5404
|
z2: "0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04)",
|
|
5397
5405
|
z3: "0 4px 8px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04)",
|
|
@@ -5399,6 +5407,6 @@ var yo = a(function({ value: e, defaultValue: t = null, onChange: n, step: r = 1
|
|
|
5399
5407
|
z5: "0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12)"
|
|
5400
5408
|
};
|
|
5401
5409
|
//#endregion
|
|
5402
|
-
export { rt as Accordion, it as AccordionItem, Tt as Avatar, Et as AvatarGroup,
|
|
5410
|
+
export { rt as Accordion, it as AccordionItem, Tt as Avatar, Et as AvatarGroup, It as Badge, zt as Breadcrumb, ut as Button, Vt as ButtonGroup, Wt as Card, Kt as CardGroup, Yt as Checkbox, an as Copy, pn as Counter, Dn as DatePicker, Rn as DeviceRestriction, Hn as DistributionBar, Qe as Divider, fr as Drawer, yr as DropdownContent, br as DropdownItem, Sr as DropdownLabel, gr as DropdownMenu, xr as DropdownSeparator, _r as DropdownTrigger, Tr as Empty, Or as Filter, kr as FormContainer, Ar as FormField, An as IconTile, jr as InfoField, Nr as InlineAlert, dn as Input, Pr as Link, Ir as Modal, Vr as NotificationBadge, Gr as Pagination, Jr as PersonCard, rn as Popover, $r as Progress, ii as Radio, ti as RadioGroup, ai as ReadMore, Pi as SelectV2, Li as Sidebar, Ri as SidebarItem, Hi as Skeleton, Ji as SnackbarProvider, Qi as Status, ua as StepIndicator, pa as Switch, Wa as Tab, Va as TabList, Ga as TabPanel, Ia as TableV2, ma as TableV2ColumnFilter, ya as TableV2ColumnVisibilityMenu, ga as TableV2Pagination, wa as TableV2RowActionsMenu, _a as TableV2Skeleton, ba as TableV2Toolbar, Ba as Tabs, Fn as Text, Ka as TextArea, qa as ThemeSwitch, bo as TimePicker, To as Tooltip, ko as UnderConstruction, ht as Upload, _t as UploadItem, No as blue, Ao as brand, X as cn, Ro as colorPrimitives, Ko as controlHeight, Oa as createRowActionsColumn, Da as createSelectionColumn, Bo as darkTheme, lo as dateToTime, Vo as fontFamily, ka as getPinnedStyles, $ as gray, Mo as green, Ho as headline, qo as iconSize, Wo as label, zo as lightTheme, Uo as paragraph, Fo as pink, Po as purple, Jo as radius, Io as red, Yo as shadows, co as timeToDate, Go as typography, Zn as useEscapeKey, Se as useFieldArray, ir as useFormContext, sr as useFormProps, er as useHideBodyScroll, nr as useIsMobile, Xn as useOnOutsideClick, qi as useSnackbar, qn as useStepper, mt as validateSingleFile, jo as white, Lo as yellow };
|
|
5403
5411
|
|
|
5404
5412
|
//# sourceMappingURL=index.js.map
|