@webority/ui-react 0.13.5 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/AppActionIcon.d.ts +5 -1
- package/dist/types/components/AppAlert.d.ts +21 -4
- package/dist/types/components/AppChoiceCard.d.ts +13 -3
- package/dist/types/components/AppConfirmDialog.d.ts +4 -1
- package/dist/types/components/AppCountrySelect.d.ts +14 -0
- package/dist/types/components/AppInfoTip.d.ts +2 -1
- package/dist/types/components/AppRepeater.d.ts +4 -1
- package/dist/types/components/AppSelect.d.ts +3 -0
- package/dist/types/components/ModalIcons.d.ts +6 -0
- package/dist/types/components/renderIconProp.d.ts +4 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/ui-react.js +606 -527
- package/package.json +3 -3
- package/dist/types/components/AppCallout.d.ts +0 -38
package/dist/ui-react.js
CHANGED
|
@@ -579,57 +579,81 @@ function Oe({ items: e = [], multiple: t = !1, id: n, className: r = "", ...i })
|
|
|
579
579
|
}
|
|
580
580
|
//#endregion
|
|
581
581
|
//#region src/components/renderIconProp.js
|
|
582
|
-
function X(e, { size: t = 16, className: n } = {}) {
|
|
582
|
+
function X(e, { size: t = 16, className: n, variant: i } = {}) {
|
|
583
583
|
return e == null || e === !1 ? null : typeof e == "string" ? r(Y, {
|
|
584
584
|
name: e,
|
|
585
585
|
size: t,
|
|
586
|
-
className: n
|
|
586
|
+
className: n,
|
|
587
|
+
variant: i
|
|
587
588
|
}) : e;
|
|
588
589
|
}
|
|
589
590
|
//#endregion
|
|
590
591
|
//#region src/components/AppActionIcon.jsx
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
592
|
+
var ke = [
|
|
593
|
+
"linear",
|
|
594
|
+
"outline",
|
|
595
|
+
"bold",
|
|
596
|
+
"bulk",
|
|
597
|
+
"broken",
|
|
598
|
+
"twotone"
|
|
599
|
+
];
|
|
600
|
+
function Ae({ icon: e, iconVariant: t, label: n, tooltipPlacement: r = "auto", danger: i = !1, disabled: a = !1, size: o = 20, onClick: s, className: c = "", as: l, href: u, ...d }) {
|
|
601
|
+
U("AppActionIcon", d), W("AppActionIcon", "iconVariant", t, ke);
|
|
602
|
+
let f = [
|
|
594
603
|
"u-action",
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
].filter(Boolean).join(" "), { style:
|
|
598
|
-
"--wui-action-size": `${
|
|
599
|
-
...
|
|
600
|
-
},
|
|
601
|
-
return K(/* @__PURE__ */ E(
|
|
602
|
-
type:
|
|
603
|
-
href:
|
|
604
|
-
className:
|
|
605
|
-
style:
|
|
606
|
-
"aria-label":
|
|
607
|
-
disabled:
|
|
608
|
-
"aria-disabled": !
|
|
609
|
-
role: !
|
|
610
|
-
tabIndex: !
|
|
604
|
+
i ? "danger" : "",
|
|
605
|
+
c
|
|
606
|
+
].filter(Boolean).join(" "), { style: p, ...m } = d, h = {
|
|
607
|
+
"--wui-action-size": `${o + 16}px`,
|
|
608
|
+
...p
|
|
609
|
+
}, g = l ?? (u ? "a" : "button"), _ = g === "button";
|
|
610
|
+
return K(/* @__PURE__ */ E(g, {
|
|
611
|
+
type: _ ? "button" : void 0,
|
|
612
|
+
href: _ || a ? void 0 : u,
|
|
613
|
+
className: f,
|
|
614
|
+
style: h,
|
|
615
|
+
"aria-label": n,
|
|
616
|
+
disabled: _ ? a : void 0,
|
|
617
|
+
"aria-disabled": !_ && a ? "true" : void 0,
|
|
618
|
+
role: !_ && a ? "link" : void 0,
|
|
619
|
+
tabIndex: !_ && a ? -1 : void 0,
|
|
611
620
|
onClick: (e) => {
|
|
612
|
-
if (
|
|
621
|
+
if (a) {
|
|
613
622
|
e.preventDefault(), e.stopPropagation();
|
|
614
623
|
return;
|
|
615
624
|
}
|
|
616
|
-
|
|
625
|
+
s?.(e);
|
|
617
626
|
},
|
|
618
|
-
...
|
|
619
|
-
children: X(e, {
|
|
620
|
-
|
|
627
|
+
...m,
|
|
628
|
+
children: X(e, {
|
|
629
|
+
size: o,
|
|
630
|
+
variant: t
|
|
631
|
+
})
|
|
632
|
+
}), n, r);
|
|
621
633
|
}
|
|
622
634
|
//#endregion
|
|
623
635
|
//#region src/components/AppAlert.jsx
|
|
624
|
-
var
|
|
636
|
+
var je = {
|
|
625
637
|
info: "info",
|
|
626
638
|
success: "check",
|
|
627
639
|
warning: "alert-triangle",
|
|
628
640
|
danger: "x"
|
|
629
|
-
}
|
|
630
|
-
|
|
641
|
+
}, Me = [
|
|
642
|
+
"sm",
|
|
643
|
+
"md",
|
|
644
|
+
"lg"
|
|
645
|
+
], Ne = [
|
|
646
|
+
"alert",
|
|
647
|
+
"status",
|
|
648
|
+
"none"
|
|
649
|
+
];
|
|
650
|
+
function Pe(e, t, n, r, i) {
|
|
631
651
|
return n ? /* @__PURE__ */ E("span", {
|
|
632
652
|
className: "alert-icon alert-icon-image",
|
|
653
|
+
style: i > 0 ? {
|
|
654
|
+
width: i,
|
|
655
|
+
height: i
|
|
656
|
+
} : void 0,
|
|
633
657
|
children: /* @__PURE__ */ E("img", {
|
|
634
658
|
src: n,
|
|
635
659
|
alt: r
|
|
@@ -645,34 +669,45 @@ function je(e, t, n, r) {
|
|
|
645
669
|
children: e
|
|
646
670
|
}) : null;
|
|
647
671
|
}
|
|
648
|
-
function
|
|
649
|
-
U("AppAlert",
|
|
650
|
-
let
|
|
672
|
+
function Fe({ variant: e = "info", children: t, title: n, icon: r, image: i, imageAlt: a = "", imageSize: o, className: s = "", onClose: c, dismissible: l, bordered: u = !0, accent: d = !1, size: f = "md", action: m, role: h = "alert", ...g }) {
|
|
673
|
+
U("AppAlert", g), W("AppAlert", "size", f, Me), W("AppAlert", "role", h, Ne);
|
|
674
|
+
let _ = r === void 0 ? je[e] : r === "none" ? null : r, v = !!i || !!_, y = m != null && m !== !1, b = n ? /* @__PURE__ */ E("div", {
|
|
651
675
|
className: "alert-heading",
|
|
652
676
|
children: n
|
|
653
|
-
}) : null,
|
|
677
|
+
}) : null, x = v && !!b && !!t, S = f === "lg" ? x ? 17 : 15 : x ? 13 : 11;
|
|
654
678
|
return /* @__PURE__ */ E(p, {
|
|
655
679
|
variant: e,
|
|
656
680
|
className: [
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
681
|
+
v ? "alert-has-icon" : "",
|
|
682
|
+
y ? "alert-has-action" : "",
|
|
683
|
+
x ? "alert-stack" : "",
|
|
684
|
+
u ? "" : "alert-borderless",
|
|
685
|
+
d ? "alert-accent" : "",
|
|
686
|
+
f === "sm" ? "alert-sm" : "",
|
|
687
|
+
f === "lg" ? "alert-lg" : "",
|
|
688
|
+
s
|
|
661
689
|
].filter(Boolean).join(" ") || void 0,
|
|
662
|
-
onClose:
|
|
663
|
-
dismissible:
|
|
690
|
+
onClose: c,
|
|
691
|
+
dismissible: l ?? typeof c == "function",
|
|
664
692
|
transition: !1,
|
|
665
|
-
role:
|
|
666
|
-
...
|
|
667
|
-
children:
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
693
|
+
role: h === "none" ? void 0 : h,
|
|
694
|
+
...g,
|
|
695
|
+
children: v || y ? /* @__PURE__ */ D(T, { children: [
|
|
696
|
+
v && Pe(_, S, i, a, o),
|
|
697
|
+
/* @__PURE__ */ D("div", {
|
|
698
|
+
className: "alert-content",
|
|
699
|
+
children: [b, t]
|
|
700
|
+
}),
|
|
701
|
+
y && /* @__PURE__ */ E("div", {
|
|
702
|
+
className: "alert-action",
|
|
703
|
+
children: m
|
|
704
|
+
})
|
|
705
|
+
] }) : /* @__PURE__ */ D(T, { children: [b, t] })
|
|
671
706
|
});
|
|
672
707
|
}
|
|
673
708
|
//#endregion
|
|
674
709
|
//#region src/components/AppButton.jsx
|
|
675
|
-
var
|
|
710
|
+
var Ie = {
|
|
676
711
|
primary: "primary",
|
|
677
712
|
secondary: "secondary",
|
|
678
713
|
outline: "outline-primary",
|
|
@@ -685,28 +720,28 @@ var Ne = {
|
|
|
685
720
|
warning: "warning",
|
|
686
721
|
subtle: "subtle",
|
|
687
722
|
"outline-light": "outline-light"
|
|
688
|
-
},
|
|
723
|
+
}, Le = {
|
|
689
724
|
sm: 14,
|
|
690
725
|
md: 16,
|
|
691
726
|
lg: 20
|
|
692
727
|
};
|
|
693
|
-
function
|
|
728
|
+
function Re(e, t, n) {
|
|
694
729
|
if (!e) return null;
|
|
695
730
|
let r = t === "left" ? "me-2" : "ms-2";
|
|
696
731
|
return typeof e == "string" ? /* @__PURE__ */ E(Y, {
|
|
697
732
|
name: e,
|
|
698
|
-
size:
|
|
733
|
+
size: Le[n] ?? Le.md,
|
|
699
734
|
className: r
|
|
700
735
|
}) : /* @__PURE__ */ E("span", {
|
|
701
736
|
className: `d-inline-flex ${r}`,
|
|
702
737
|
children: e
|
|
703
738
|
});
|
|
704
739
|
}
|
|
705
|
-
function
|
|
706
|
-
if (U("AppButton", m), W("AppButton", "variant", t, Object.keys(
|
|
740
|
+
function ze({ children: e, variant: t = "primary", size: n = "md", type: r = "button", loading: i = !1, disabled: a = !1, block: o = !1, leftIcon: s = null, rightIcon: c = null, href: l, static: u = !1, tooltip: d, tooltipPlacement: f, className: p = "", ...m }) {
|
|
741
|
+
if (U("AppButton", m), W("AppButton", "variant", t, Object.keys(Ie)), W("AppButton", "size", n, Object.keys(Le)), u) return K(/* @__PURE__ */ D("span", {
|
|
707
742
|
className: [
|
|
708
743
|
"btn",
|
|
709
|
-
`btn-${
|
|
744
|
+
`btn-${Ie[t] ?? "primary"}`,
|
|
710
745
|
n === "sm" ? "btn-sm" : n === "lg" ? "btn-lg" : "",
|
|
711
746
|
o ? "w-100" : "",
|
|
712
747
|
"btn-static",
|
|
@@ -714,9 +749,9 @@ function Ie({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
714
749
|
].filter(Boolean).join(" "),
|
|
715
750
|
...m,
|
|
716
751
|
children: [
|
|
717
|
-
|
|
752
|
+
Re(s, "left", n),
|
|
718
753
|
e,
|
|
719
|
-
|
|
754
|
+
Re(c, "right", n)
|
|
720
755
|
]
|
|
721
756
|
}), d, f);
|
|
722
757
|
let h = [
|
|
@@ -727,7 +762,7 @@ function Ie({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
727
762
|
return K(/* @__PURE__ */ D(g, {
|
|
728
763
|
type: (m.as === void 0 || m.as === "button") && l === void 0 ? r : void 0,
|
|
729
764
|
href: l,
|
|
730
|
-
variant:
|
|
765
|
+
variant: Ie[t] ?? "primary",
|
|
731
766
|
size: n === "md" ? void 0 : n,
|
|
732
767
|
disabled: a || i,
|
|
733
768
|
"aria-busy": i || void 0,
|
|
@@ -738,15 +773,15 @@ function Ie({ children: e, variant: t = "primary", size: n = "md", type: r = "bu
|
|
|
738
773
|
className: "spinner-border spinner-border-sm me-2",
|
|
739
774
|
"aria-hidden": "true"
|
|
740
775
|
}),
|
|
741
|
-
!i &&
|
|
776
|
+
!i && Re(s, "left", n),
|
|
742
777
|
e,
|
|
743
|
-
!i &&
|
|
778
|
+
!i && Re(c, "right", n)
|
|
744
779
|
]
|
|
745
780
|
}), d, f);
|
|
746
781
|
}
|
|
747
782
|
//#endregion
|
|
748
783
|
//#region src/components/AppEmptyState.jsx
|
|
749
|
-
function
|
|
784
|
+
function Be({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, action: a, className: o = "", style: s, ...c }) {
|
|
750
785
|
return U("AppEmptyState", c), /* @__PURE__ */ D("div", {
|
|
751
786
|
className: [
|
|
752
787
|
"empty-state",
|
|
@@ -777,7 +812,7 @@ function Le({ icon: e, iconSize: t = 24, size: n = "md", title: r, text: i, acti
|
|
|
777
812
|
}
|
|
778
813
|
//#endregion
|
|
779
814
|
//#region src/components/AppSpinner.jsx
|
|
780
|
-
function
|
|
815
|
+
function Ve({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
781
816
|
U("AppSpinner", r);
|
|
782
817
|
let { style: i, ...a } = r, o = Number(e), s = Number.isFinite(o) && o > 0;
|
|
783
818
|
return /* @__PURE__ */ E("span", {
|
|
@@ -795,7 +830,7 @@ function Re({ size: e = "md", label: t = "Loading", className: n = "", ...r }) {
|
|
|
795
830
|
}
|
|
796
831
|
//#endregion
|
|
797
832
|
//#region src/components/AppAsyncBlock.jsx
|
|
798
|
-
function
|
|
833
|
+
function He({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRetry: i, skeleton: a, className: o = "", ...s }) {
|
|
799
834
|
U("AppAsyncBlock", s);
|
|
800
835
|
let c = `async-block${o ? ` ${o}` : ""}`;
|
|
801
836
|
return e ? /* @__PURE__ */ E("div", {
|
|
@@ -804,17 +839,17 @@ function ze({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
804
839
|
...s,
|
|
805
840
|
children: a ?? /* @__PURE__ */ E("div", {
|
|
806
841
|
className: "d-flex align-items-center justify-content-center py-5",
|
|
807
|
-
children: /* @__PURE__ */ E(
|
|
842
|
+
children: /* @__PURE__ */ E(Ve, { label: "Loading" })
|
|
808
843
|
})
|
|
809
844
|
}) : t ? /* @__PURE__ */ E("div", {
|
|
810
845
|
className: c,
|
|
811
846
|
"data-state": "error",
|
|
812
847
|
...s,
|
|
813
|
-
children: /* @__PURE__ */ E(
|
|
848
|
+
children: /* @__PURE__ */ E(Be, {
|
|
814
849
|
icon: "alert-circle",
|
|
815
850
|
title: "Something went wrong",
|
|
816
851
|
text: t,
|
|
817
|
-
action: i ? /* @__PURE__ */ E(
|
|
852
|
+
action: i ? /* @__PURE__ */ E(ze, {
|
|
818
853
|
variant: "secondary",
|
|
819
854
|
onClick: i,
|
|
820
855
|
children: "Retry"
|
|
@@ -824,7 +859,7 @@ function ze({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
824
859
|
className: c,
|
|
825
860
|
"data-state": "empty",
|
|
826
861
|
...s,
|
|
827
|
-
children: /* @__PURE__ */ E(
|
|
862
|
+
children: /* @__PURE__ */ E(Be, {
|
|
828
863
|
icon: "inbox",
|
|
829
864
|
title: "Nothing to show yet"
|
|
830
865
|
})
|
|
@@ -837,14 +872,14 @@ function ze({ loading: e = !1, error: t = null, empty: n = !1, children: r, onRe
|
|
|
837
872
|
}
|
|
838
873
|
//#endregion
|
|
839
874
|
//#region src/components/AppPopover.jsx
|
|
840
|
-
var
|
|
875
|
+
var Ue = {
|
|
841
876
|
start: "left",
|
|
842
877
|
end: "right",
|
|
843
878
|
top: "top",
|
|
844
879
|
bottom: "bottom",
|
|
845
880
|
auto: "auto"
|
|
846
881
|
};
|
|
847
|
-
function
|
|
882
|
+
function We({ trigger: e, children: t, title: r, placement: i = "bottom", triggerType: a = "click", onToggle: o, className: c = "", ...l }) {
|
|
848
883
|
U("AppPopover", l);
|
|
849
884
|
let u = s(), [d, p] = f(!1), m = (e) => {
|
|
850
885
|
p(e), o?.(e);
|
|
@@ -866,7 +901,7 @@ function Ve({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
866
901
|
}), T = a === "click", O = a === "hover" || Array.isArray(a) && a.includes("hover");
|
|
867
902
|
return /* @__PURE__ */ E(S, {
|
|
868
903
|
trigger: a,
|
|
869
|
-
placement:
|
|
904
|
+
placement: Ue[i] || i,
|
|
870
905
|
overlay: h,
|
|
871
906
|
rootClose: T,
|
|
872
907
|
delay: O ? {
|
|
@@ -879,13 +914,19 @@ function Ve({ trigger: e, children: t, title: r, placement: i = "bottom", trigge
|
|
|
879
914
|
}
|
|
880
915
|
//#endregion
|
|
881
916
|
//#region src/components/AppInfoTip.jsx
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
917
|
+
var Ge = {
|
|
918
|
+
sm: " infotip-popover-sm",
|
|
919
|
+
md: "",
|
|
920
|
+
lg: " infotip-popover-lg",
|
|
921
|
+
xl: " infotip-popover-xl"
|
|
922
|
+
};
|
|
923
|
+
function Ke({ label: e, children: t, placement: n = "auto", width: r = "md", className: i = "", ...a }) {
|
|
924
|
+
U("AppInfoTip", a), W("AppInfoTip", "width", r, Object.keys(Ge));
|
|
925
|
+
let [o, s] = f(!1), c = !!e;
|
|
926
|
+
return !c && !t ? null : /* @__PURE__ */ E("span", {
|
|
927
|
+
className: `infotip${i ? ` ${i}` : ""}`,
|
|
928
|
+
...a,
|
|
929
|
+
children: /* @__PURE__ */ E(We, {
|
|
889
930
|
trigger: /* @__PURE__ */ E("button", {
|
|
890
931
|
type: "button",
|
|
891
932
|
className: "infotip-btn",
|
|
@@ -895,11 +936,12 @@ function He({ label: e, children: t, placement: n = "auto", className: r = "", .
|
|
|
895
936
|
size: 16
|
|
896
937
|
})
|
|
897
938
|
}),
|
|
898
|
-
title:
|
|
939
|
+
title: c ? e : void 0,
|
|
899
940
|
placement: n,
|
|
900
941
|
triggerType: ["hover", "focus"],
|
|
901
|
-
|
|
902
|
-
|
|
942
|
+
className: `infotip-popover${Ge[r] ?? ""}`,
|
|
943
|
+
onToggle: s,
|
|
944
|
+
"aria-expanded": o,
|
|
903
945
|
children: t
|
|
904
946
|
})
|
|
905
947
|
});
|
|
@@ -915,8 +957,8 @@ function Z() {
|
|
|
915
957
|
}
|
|
916
958
|
//#endregion
|
|
917
959
|
//#region src/components/useWuiControl.js
|
|
918
|
-
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s =
|
|
919
|
-
let u = d(null), f = r ??
|
|
960
|
+
function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events: s = qe, on: l } = {}) {
|
|
961
|
+
let u = d(null), f = r ?? Je, p = i ?? Ye, m = (s || qe).join("\0"), h = Object.keys(l ?? {}).join("\0"), g = d(null);
|
|
920
962
|
g.current === null && (g.current = {
|
|
921
963
|
ref: e,
|
|
922
964
|
value: t,
|
|
@@ -944,7 +986,7 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
944
986
|
_.current = null;
|
|
945
987
|
}
|
|
946
988
|
}, []), y = a((e) => {
|
|
947
|
-
let t = g.current.eventKey ? g.current.eventKey.split("\0") :
|
|
989
|
+
let t = g.current.eventKey ? g.current.eventKey.split("\0") : qe, n = Object.keys(g.current.on ?? {}), r = {
|
|
948
990
|
el: e,
|
|
949
991
|
names: t,
|
|
950
992
|
extraNames: n,
|
|
@@ -970,7 +1012,7 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
970
1012
|
n && !Object.is(t, n.last) && (n.last = void 0);
|
|
971
1013
|
}, [t, p]), o(() => {
|
|
972
1014
|
let e = u.current, t = _.current;
|
|
973
|
-
!e || !t || (t.names.join("\0") !== (m ||
|
|
1015
|
+
!e || !t || (t.names.join("\0") !== (m || qe.join("\0")) || t.extraNames.join("\0") !== h) && (v(), y(e));
|
|
974
1016
|
}, [
|
|
975
1017
|
m,
|
|
976
1018
|
h,
|
|
@@ -981,15 +1023,15 @@ function Q({ ref: e, value: t, onChange: n, readValue: r, writeValue: i, events:
|
|
|
981
1023
|
innerRef: u
|
|
982
1024
|
};
|
|
983
1025
|
}
|
|
984
|
-
var
|
|
985
|
-
function
|
|
1026
|
+
var qe = ["change"];
|
|
1027
|
+
function Je(e) {
|
|
986
1028
|
return e.value;
|
|
987
1029
|
}
|
|
988
|
-
function
|
|
1030
|
+
function Ye(e, t) {
|
|
989
1031
|
let n = t ?? "";
|
|
990
1032
|
String(e.value ?? "") !== String(n) && (e.value = n);
|
|
991
1033
|
}
|
|
992
|
-
function
|
|
1034
|
+
function Xe(e, t) {
|
|
993
1035
|
let n = e || [], r = t || [];
|
|
994
1036
|
return n.length === r.length && n.every((e, t) => {
|
|
995
1037
|
let n = r[t];
|
|
@@ -999,27 +1041,27 @@ function Ke(e, t) {
|
|
|
999
1041
|
return i.length === Object.keys(n).length && i.every((t) => Object.is(e[t], n[t]));
|
|
1000
1042
|
});
|
|
1001
1043
|
}
|
|
1002
|
-
function
|
|
1044
|
+
function Ze(e) {
|
|
1003
1045
|
return e.values;
|
|
1004
1046
|
}
|
|
1005
|
-
function
|
|
1047
|
+
function Qe(e, t) {
|
|
1006
1048
|
let n = t || [], r = e.values || [];
|
|
1007
1049
|
(n.length !== r.length || !n.every((e, t) => e === r[t])) && (e.values = n);
|
|
1008
1050
|
}
|
|
1009
|
-
function
|
|
1051
|
+
function $e(e) {
|
|
1010
1052
|
return {
|
|
1011
1053
|
start: e.start,
|
|
1012
1054
|
end: e.end
|
|
1013
1055
|
};
|
|
1014
1056
|
}
|
|
1015
|
-
function
|
|
1057
|
+
function et(e, t) {
|
|
1016
1058
|
if (t === void 0) return;
|
|
1017
1059
|
let n = Number.parseFloat(t);
|
|
1018
1060
|
Number.isFinite(n) && e.value !== n && (e.value = n);
|
|
1019
1061
|
}
|
|
1020
1062
|
//#endregion
|
|
1021
1063
|
//#region src/components/AppAutocomplete.jsx
|
|
1022
|
-
var
|
|
1064
|
+
var tt = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeholder: i = "Search…", minChars: a, debounce: c, disabled: l = !1, size: u, allowCustom: d = !1, name: f, id: p, label: m, error: h, hint: g, required: _ = !1, help: v, helpLabel: y = "More information", fieldClassName: b = "", ...x }, S) {
|
|
1023
1065
|
U("AppAutocomplete", x);
|
|
1024
1066
|
let C = typeof r == "function", w = s(), T = p || w, { setRef: O, innerRef: k } = Q({
|
|
1025
1067
|
ref: S,
|
|
@@ -1030,7 +1072,7 @@ var Ze = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
1030
1072
|
let e = k.current;
|
|
1031
1073
|
if (!e || C) return;
|
|
1032
1074
|
let t = n || [];
|
|
1033
|
-
|
|
1075
|
+
Xe(t, e.options) || (e.options = t);
|
|
1034
1076
|
}, [
|
|
1035
1077
|
n,
|
|
1036
1078
|
C,
|
|
@@ -1066,7 +1108,7 @@ var Ze = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
1066
1108
|
children: [
|
|
1067
1109
|
m,
|
|
1068
1110
|
_ && /* @__PURE__ */ E(Z, {}),
|
|
1069
|
-
v && /* @__PURE__ */ E(
|
|
1111
|
+
v && /* @__PURE__ */ E(Ke, {
|
|
1070
1112
|
label: y,
|
|
1071
1113
|
children: v
|
|
1072
1114
|
})
|
|
@@ -1100,14 +1142,14 @@ var Ze = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
1100
1142
|
}) : null
|
|
1101
1143
|
]
|
|
1102
1144
|
});
|
|
1103
|
-
}),
|
|
1145
|
+
}), nt = /* @__PURE__ */ new Set([
|
|
1104
1146
|
"xs",
|
|
1105
1147
|
"sm",
|
|
1106
1148
|
"md",
|
|
1107
1149
|
"lg",
|
|
1108
1150
|
"xl",
|
|
1109
1151
|
"2xl"
|
|
1110
|
-
]),
|
|
1152
|
+
]), rt = {
|
|
1111
1153
|
xs: 20,
|
|
1112
1154
|
sm: 24,
|
|
1113
1155
|
md: 32,
|
|
@@ -1115,30 +1157,30 @@ var Ze = i(function({ value: e, onChange: t, options: n, loadOptions: r, placeho
|
|
|
1115
1157
|
xl: 64,
|
|
1116
1158
|
"2xl": 96
|
|
1117
1159
|
};
|
|
1118
|
-
function
|
|
1160
|
+
function it(e) {
|
|
1119
1161
|
let t = (e || "").trim();
|
|
1120
1162
|
if (!t) return "?";
|
|
1121
1163
|
let n = t.split(/\s+/).filter(Boolean);
|
|
1122
1164
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
1123
1165
|
}
|
|
1124
|
-
function
|
|
1166
|
+
function at(e) {
|
|
1125
1167
|
let t = e || "", n = 0;
|
|
1126
1168
|
for (let e = 0; e < t.length; e += 1) n = Math.imul(n, 31) + t.charCodeAt(e) >>> 0;
|
|
1127
1169
|
return n % 360;
|
|
1128
1170
|
}
|
|
1129
|
-
function
|
|
1171
|
+
function ot(e) {
|
|
1130
1172
|
if (typeof e == "number") return e;
|
|
1131
|
-
if (
|
|
1173
|
+
if (rt[e] != null) return rt[e];
|
|
1132
1174
|
let t = Number.parseInt(e, 10);
|
|
1133
1175
|
return Number.isNaN(t) ? 32 : t;
|
|
1134
1176
|
}
|
|
1135
|
-
function
|
|
1177
|
+
function st({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "primary", status: a = "none", ring: s = !1, label: c, icon: l, badge: u, href: d, onClick: p, linkComponent: m, tooltip: h, tooltipPlacement: g, className: _ = "", ...v }) {
|
|
1136
1178
|
U("AppAvatar", v);
|
|
1137
1179
|
let { style: y, ...b } = v, [x, S] = f(!1);
|
|
1138
1180
|
o(() => {
|
|
1139
1181
|
S(!1);
|
|
1140
1182
|
}, [t]);
|
|
1141
|
-
let C = typeof n == "string" &&
|
|
1183
|
+
let C = typeof n == "string" && nt.has(n), w = C ? null : typeof n == "number" || /^\d+$/.test(n) ? `${n}px` : n, O = d != null || p != null, k = t != null && t !== "" && !x, A = [
|
|
1142
1184
|
"avatar",
|
|
1143
1185
|
C && n !== "md" ? `avatar-${n}` : "",
|
|
1144
1186
|
r === "circle" ? "" : `avatar-${r}`,
|
|
@@ -1147,16 +1189,16 @@ function rt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
1147
1189
|
O ? "avatar-clickable" : "",
|
|
1148
1190
|
_
|
|
1149
1191
|
].filter(Boolean).join(" "), j = {};
|
|
1150
|
-
w && (j["--avatar-size"] = w), i === "auto" && (j["--avatar-hue"] =
|
|
1192
|
+
w && (j["--avatar-size"] = w), i === "auto" && (j["--avatar-hue"] = at(e));
|
|
1151
1193
|
let M = Object.keys(j).length || y ? {
|
|
1152
1194
|
...j,
|
|
1153
1195
|
...y
|
|
1154
1196
|
} : void 0, N = /* @__PURE__ */ E("span", {
|
|
1155
1197
|
className: "avatar-face",
|
|
1156
1198
|
"aria-hidden": "true",
|
|
1157
|
-
children: l == null ?
|
|
1199
|
+
children: l == null ? it(e) : /* @__PURE__ */ E(Y, {
|
|
1158
1200
|
name: l,
|
|
1159
|
-
size: Math.round(
|
|
1201
|
+
size: Math.round(ot(n) * .55)
|
|
1160
1202
|
})
|
|
1161
1203
|
}), P = /* @__PURE__ */ D(T, { children: [
|
|
1162
1204
|
a !== "none" && /* @__PURE__ */ E("span", {
|
|
@@ -1218,7 +1260,7 @@ function rt({ name: e, src: t, size: n = "md", shape: r = "circle", tone: i = "p
|
|
|
1218
1260
|
}
|
|
1219
1261
|
//#endregion
|
|
1220
1262
|
//#region src/components/AppAvatarGroup.jsx
|
|
1221
|
-
var
|
|
1263
|
+
var ct = {
|
|
1222
1264
|
xs: 20,
|
|
1223
1265
|
sm: 24,
|
|
1224
1266
|
md: 32,
|
|
@@ -1226,16 +1268,16 @@ var it = {
|
|
|
1226
1268
|
xl: 64,
|
|
1227
1269
|
"2xl": 96
|
|
1228
1270
|
};
|
|
1229
|
-
function
|
|
1230
|
-
return e == null ? null : typeof e == "number" ? `${e}px` :
|
|
1271
|
+
function lt(e) {
|
|
1272
|
+
return e == null ? null : typeof e == "number" ? `${e}px` : ct[e] == null ? /^\d+$/.test(e) ? `${e}px` : e : `${ct[e]}px`;
|
|
1231
1273
|
}
|
|
1232
|
-
function
|
|
1274
|
+
function ut({ children: e, size: t, spacing: n = "normal", overflow: r, className: i = "", ...a }) {
|
|
1233
1275
|
U("AppAvatarGroup", a);
|
|
1234
1276
|
let { style: o, ...s } = a, c = [
|
|
1235
1277
|
"avatar-group",
|
|
1236
1278
|
n === "normal" ? "" : `avatar-group-${n}`,
|
|
1237
1279
|
i
|
|
1238
|
-
].filter(Boolean).join(" "), l =
|
|
1280
|
+
].filter(Boolean).join(" "), l = lt(t), u = l ? {
|
|
1239
1281
|
"--avatar-size": l,
|
|
1240
1282
|
...o
|
|
1241
1283
|
} : o, d = typeof r == "string" ? Number.parseInt(r, 10) : r;
|
|
@@ -1253,7 +1295,7 @@ function ot({ children: e, size: t, spacing: n = "normal", overflow: r, classNam
|
|
|
1253
1295
|
}
|
|
1254
1296
|
//#endregion
|
|
1255
1297
|
//#region src/components/AppBadge.jsx
|
|
1256
|
-
function
|
|
1298
|
+
function dt({ children: e, tone: t, dot: n = !1, tooltip: r, tooltipPlacement: i, className: a = "", ...o }) {
|
|
1257
1299
|
return U("AppBadge", o), K(/* @__PURE__ */ E(m, {
|
|
1258
1300
|
bg: !1,
|
|
1259
1301
|
className: [
|
|
@@ -1267,18 +1309,18 @@ function st({ children: e, tone: t, dot: n = !1, tooltip: r, tooltipPlacement: i
|
|
|
1267
1309
|
}
|
|
1268
1310
|
//#endregion
|
|
1269
1311
|
//#region src/components/AppBanner.jsx
|
|
1270
|
-
var
|
|
1312
|
+
var ft = [
|
|
1271
1313
|
"info",
|
|
1272
1314
|
"success",
|
|
1273
1315
|
"warning",
|
|
1274
1316
|
"danger",
|
|
1275
1317
|
"neutral"
|
|
1276
1318
|
];
|
|
1277
|
-
function
|
|
1319
|
+
function pt({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "", ...o }) {
|
|
1278
1320
|
U("AppBanner", o);
|
|
1279
1321
|
let [s, c] = f(!0);
|
|
1280
1322
|
if (!s) return null;
|
|
1281
|
-
let l =
|
|
1323
|
+
let l = ft.includes(e) ? e : "info", u = () => {
|
|
1282
1324
|
c(!1), i?.();
|
|
1283
1325
|
};
|
|
1284
1326
|
return /* @__PURE__ */ D("div", {
|
|
@@ -1309,7 +1351,7 @@ function lt({ tone: e = "info", icon: t, children: n, dismissible: r = !1, onDis
|
|
|
1309
1351
|
}
|
|
1310
1352
|
//#endregion
|
|
1311
1353
|
//#region src/components/AppBreadcrumbs.jsx
|
|
1312
|
-
function
|
|
1354
|
+
function mt({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
1313
1355
|
return U("AppBreadcrumbs", r), /* @__PURE__ */ E(h, {
|
|
1314
1356
|
className: n || void 0,
|
|
1315
1357
|
...r,
|
|
@@ -1327,74 +1369,14 @@ function ut({ items: e = [], linkComponent: t, className: n = "", ...r }) {
|
|
|
1327
1369
|
});
|
|
1328
1370
|
}
|
|
1329
1371
|
//#endregion
|
|
1330
|
-
//#region src/components/AppCallout.jsx
|
|
1331
|
-
var dt = {
|
|
1332
|
-
info: "info",
|
|
1333
|
-
success: "check",
|
|
1334
|
-
warning: "alert-triangle",
|
|
1335
|
-
danger: "x"
|
|
1336
|
-
};
|
|
1337
|
-
function ft({ children: e, tone: t = "info", title: n, icon: r, image: i, imageAlt: a = "", size: o = "md", bordered: s = !0, action: c, dismissible: l = !1, onDismiss: u, className: d = "", ...p }) {
|
|
1338
|
-
U("AppCallout", p);
|
|
1339
|
-
let [m, h] = f(!0);
|
|
1340
|
-
if (!m) return null;
|
|
1341
|
-
let g = r === void 0 ? dt[t] : r === "none" ? null : r, _ = !!i, v = _ || !!g, y = v && !!n && e != null && e !== !1 && e !== "", b = y ? 13 : 11;
|
|
1342
|
-
return /* @__PURE__ */ D("div", {
|
|
1343
|
-
className: [
|
|
1344
|
-
"info-callout",
|
|
1345
|
-
`tone-${t}`,
|
|
1346
|
-
o === "sm" ? "info-callout-sm" : "",
|
|
1347
|
-
y ? "info-callout-stack" : "",
|
|
1348
|
-
s ? "" : "info-callout-borderless",
|
|
1349
|
-
d
|
|
1350
|
-
].filter(Boolean).join(" "),
|
|
1351
|
-
...p,
|
|
1352
|
-
children: [
|
|
1353
|
-
v && /* @__PURE__ */ E("span", {
|
|
1354
|
-
className: `info-callout-icon${_ ? " info-callout-icon-image" : ""}`,
|
|
1355
|
-
children: _ ? /* @__PURE__ */ E("img", {
|
|
1356
|
-
src: i,
|
|
1357
|
-
alt: a
|
|
1358
|
-
}) : typeof g == "string" ? /* @__PURE__ */ E(Y, {
|
|
1359
|
-
name: g,
|
|
1360
|
-
size: b
|
|
1361
|
-
}) : g
|
|
1362
|
-
}),
|
|
1363
|
-
/* @__PURE__ */ D("div", {
|
|
1364
|
-
className: "info-callout-content",
|
|
1365
|
-
children: [n && /* @__PURE__ */ E("div", {
|
|
1366
|
-
className: "info-callout-heading",
|
|
1367
|
-
children: n
|
|
1368
|
-
}), e]
|
|
1369
|
-
}),
|
|
1370
|
-
c ? /* @__PURE__ */ E("div", {
|
|
1371
|
-
className: "info-callout-action",
|
|
1372
|
-
children: c
|
|
1373
|
-
}) : null,
|
|
1374
|
-
l && /* @__PURE__ */ E("button", {
|
|
1375
|
-
type: "button",
|
|
1376
|
-
className: "info-callout-close",
|
|
1377
|
-
"aria-label": "Dismiss",
|
|
1378
|
-
onClick: () => {
|
|
1379
|
-
h(!1), u?.();
|
|
1380
|
-
},
|
|
1381
|
-
children: /* @__PURE__ */ E(Y, {
|
|
1382
|
-
name: "x",
|
|
1383
|
-
size: 18
|
|
1384
|
-
})
|
|
1385
|
-
})
|
|
1386
|
-
]
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
//#endregion
|
|
1390
1372
|
//#region src/components/AppCard.jsx
|
|
1391
|
-
var
|
|
1373
|
+
var ht = {
|
|
1392
1374
|
xs: 320,
|
|
1393
1375
|
sm: 420,
|
|
1394
1376
|
md: 560,
|
|
1395
1377
|
lg: 720
|
|
1396
1378
|
};
|
|
1397
|
-
function
|
|
1379
|
+
function gt({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", header: i, headerExtra: a, headerActions: o, footer: s, media: c, children: l, variant: u = "default", tone: d = "primary", padding: f = "md", maxWidth: p, className: m = "", bodyClassName: h = "", headerClassName: g = "", body: v = !0, lifted: y = !1, href: b, onClick: x, linkComponent: S, ...C }) {
|
|
1398
1380
|
U("AppCard", C);
|
|
1399
1381
|
let { style: w, ...O } = C, k = b != null || x != null, A = [
|
|
1400
1382
|
u && u !== "default" ? `card-${u}` : "",
|
|
@@ -1404,7 +1386,7 @@ function mt({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
1404
1386
|
p == null ? "" : "card-constrained",
|
|
1405
1387
|
k ? "card-clickable" : "",
|
|
1406
1388
|
m
|
|
1407
|
-
].filter(Boolean).join(" ") || void 0, j = p == null ? void 0 :
|
|
1389
|
+
].filter(Boolean).join(" ") || void 0, j = p == null ? void 0 : ht[p] == null ? typeof p == "number" ? `${p}px` : p : `${ht[p]}px`, M = j ? {
|
|
1408
1390
|
"--card-max-width": j,
|
|
1409
1391
|
...w
|
|
1410
1392
|
} : w, N = {};
|
|
@@ -1475,7 +1457,7 @@ function mt({ title: e, subtitle: t, headerIcon: n, titleClassName: r = "", head
|
|
|
1475
1457
|
}
|
|
1476
1458
|
//#endregion
|
|
1477
1459
|
//#region src/lib/CheckField.jsx
|
|
1478
|
-
var
|
|
1460
|
+
var _t = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", rest: o = {}, inputType: c, wrapperClass: l }, u) {
|
|
1479
1461
|
let d = s(), f = t || d, p = r ? `${f}-error` : void 0, m = i ? `${f}-hint` : void 0;
|
|
1480
1462
|
return /* @__PURE__ */ D("div", {
|
|
1481
1463
|
className: `${l}${a ? ` ${a}` : ""}`,
|
|
@@ -1506,8 +1488,8 @@ var ht = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
1506
1488
|
}) : null
|
|
1507
1489
|
]
|
|
1508
1490
|
});
|
|
1509
|
-
}),
|
|
1510
|
-
return U("AppCheckbox", o), /* @__PURE__ */ E(
|
|
1491
|
+
}), vt = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
1492
|
+
return U("AppCheckbox", o), /* @__PURE__ */ E(_t, {
|
|
1511
1493
|
ref: s,
|
|
1512
1494
|
label: e,
|
|
1513
1495
|
id: t,
|
|
@@ -1522,7 +1504,7 @@ var ht = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
1522
1504
|
});
|
|
1523
1505
|
//#endregion
|
|
1524
1506
|
//#region src/components/AppChip.jsx
|
|
1525
|
-
function
|
|
1507
|
+
function yt({ label: e, children: t, tone: n = "neutral", variant: r = "soft", size: i = "md", leadingIcon: a, avatar: o, onRemove: s, onClick: c, disabled: l = !1, removeLabel: u, className: d = "", ...f }) {
|
|
1526
1508
|
U("AppChip", f);
|
|
1527
1509
|
let p = e ?? t, m = [
|
|
1528
1510
|
"chip",
|
|
@@ -1576,10 +1558,24 @@ function _t({ label: e, children: t, tone: n = "neutral", variant: r = "soft", s
|
|
|
1576
1558
|
}
|
|
1577
1559
|
//#endregion
|
|
1578
1560
|
//#region src/components/AppChoiceCard.jsx
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1561
|
+
var bt = {
|
|
1562
|
+
sm: " wui-struct-card-sm",
|
|
1563
|
+
md: "",
|
|
1564
|
+
lg: " wui-struct-card-lg"
|
|
1565
|
+
}, xt = {
|
|
1566
|
+
inline: "",
|
|
1567
|
+
stacked: " wui-struct-card-stacked"
|
|
1568
|
+
}, St = {
|
|
1569
|
+
sm: 16,
|
|
1570
|
+
md: 18,
|
|
1571
|
+
lg: 22
|
|
1572
|
+
};
|
|
1573
|
+
function Ct({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon: a, iconNode: o, iconSize: s, image: c, imageAlt: l = "", children: u, title: d, description: f, checkIcon: p = "check", checkSize: m = 18, hideCheck: h = !1, size: g = "md", layout: _ = "inline", className: v = "", ...y }) {
|
|
1574
|
+
U("AppChoiceCard", y), W("AppChoiceCard", "size", g, Object.keys(bt)), W("AppChoiceCard", "layout", _, Object.keys(xt));
|
|
1575
|
+
let b = bt[g] ?? "", x = xt[_] ?? "", S = s ?? St[g] ?? St.md;
|
|
1576
|
+
return /* @__PURE__ */ D("label", {
|
|
1577
|
+
className: `struct-card${c ? " struct-card-img-card" : ""}${b}${x}${h ? " wui-struct-card-no-check" : ""}${r ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
1578
|
+
...y,
|
|
1583
1579
|
children: [
|
|
1584
1580
|
/* @__PURE__ */ E("input", {
|
|
1585
1581
|
type: t ? "checkbox" : "radio",
|
|
@@ -1600,7 +1596,8 @@ function vt({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
1600
1596
|
className: "struct-card-ic",
|
|
1601
1597
|
children: o || /* @__PURE__ */ E(Y, {
|
|
1602
1598
|
name: a,
|
|
1603
|
-
size:
|
|
1599
|
+
size: S,
|
|
1600
|
+
variant: r ? "bold" : void 0
|
|
1604
1601
|
})
|
|
1605
1602
|
}) : null,
|
|
1606
1603
|
/* @__PURE__ */ E("span", {
|
|
@@ -1613,7 +1610,7 @@ function vt({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
1613
1610
|
children: f
|
|
1614
1611
|
})] })
|
|
1615
1612
|
}),
|
|
1616
|
-
/* @__PURE__ */ E("span", {
|
|
1613
|
+
!h && /* @__PURE__ */ E("span", {
|
|
1617
1614
|
className: "struct-card-check",
|
|
1618
1615
|
children: /* @__PURE__ */ E(Y, {
|
|
1619
1616
|
name: p,
|
|
@@ -1625,7 +1622,7 @@ function vt({ name: e, multiple: t = !1, value: n, checked: r, onChange: i, icon
|
|
|
1625
1622
|
}
|
|
1626
1623
|
//#endregion
|
|
1627
1624
|
//#region src/components/AppChoiceChip.jsx
|
|
1628
|
-
function
|
|
1625
|
+
function wt({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChange: a, children: o, count: s, size: c = "md", className: l = "", ...u }) {
|
|
1629
1626
|
return U("AppChoiceChip", u), /* @__PURE__ */ D("label", {
|
|
1630
1627
|
className: `choice-chip${i ? " checked" : ""}${c === "sm" ? " choice-chip-sm" : c === "lg" ? " choice-chip-lg" : ""}${l ? ` ${l}` : ""}`,
|
|
1631
1628
|
...u,
|
|
@@ -1647,7 +1644,7 @@ function yt({ multiple: e = !0, label: t, name: n, value: r, checked: i, onChang
|
|
|
1647
1644
|
}
|
|
1648
1645
|
//#endregion
|
|
1649
1646
|
//#region src/components/AppColorField.jsx
|
|
1650
|
-
function
|
|
1647
|
+
function Tt({ value: e = "#000000", onChange: t, label: n, required: r = !1, error: i, hint: a, name: o, id: c, disabled: l = !1, size: u = "md", className: d = "", fieldClassName: f = "", ...p }) {
|
|
1651
1648
|
U("AppColorField", p);
|
|
1652
1649
|
let m = s(), h = c || m, g = i ? `${h}-error` : a ? `${h}-hint` : void 0, _ = (e) => /^#[0-9a-f]{6}$/i.test(e), v = u === "sm" ? " color-field-sm" : u === "lg" ? " color-field-lg" : "", y = u === "sm" ? " input-sm" : u === "lg" ? " input-lg" : "";
|
|
1653
1650
|
return /* @__PURE__ */ D("div", {
|
|
@@ -1699,12 +1696,12 @@ function bt({ value: e = "#000000", onChange: t, label: n, required: r = !1, err
|
|
|
1699
1696
|
}
|
|
1700
1697
|
//#endregion
|
|
1701
1698
|
//#region src/lib/emptyValue.js
|
|
1702
|
-
function
|
|
1699
|
+
function Et(e) {
|
|
1703
1700
|
return e == null || e === "";
|
|
1704
1701
|
}
|
|
1705
1702
|
//#endregion
|
|
1706
1703
|
//#region src/components/AppCompareTable.jsx
|
|
1707
|
-
function
|
|
1704
|
+
function Dt({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i }) {
|
|
1708
1705
|
U("AppCompareTable", i);
|
|
1709
1706
|
let a = (e) => e === !0 ? /* @__PURE__ */ E("span", {
|
|
1710
1707
|
className: "compare-yes",
|
|
@@ -1741,7 +1738,7 @@ function St({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
|
|
|
1741
1738
|
}
|
|
1742
1739
|
//#endregion
|
|
1743
1740
|
//#region src/components/AppInput.jsx
|
|
1744
|
-
var
|
|
1741
|
+
var Ot = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: u, rightIcon: p, onRightIconClick: m, rightIconLabel: h, unit: g, id: _, name: v, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: T, prefix: O, suffix: k, action: A, floatingLabel: j = !1, variant: M, passwordRequirements: P = !1, requirementsPlacement: F = "auto", ...I }, L) {
|
|
1745
1742
|
U("AppInput", I);
|
|
1746
1743
|
let [R, z] = f(!1), ee = s(), B = _ || ee, V = c === "password", te = V && R ? "text" : c, H = d(null), ne = (e) => {
|
|
1747
1744
|
H.current = e, typeof L == "function" ? L(e) : L && (L.current = e);
|
|
@@ -1893,7 +1890,7 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1893
1890
|
})
|
|
1894
1891
|
]
|
|
1895
1892
|
});
|
|
1896
|
-
J = G ? /* @__PURE__ */ E(
|
|
1893
|
+
J = G ? /* @__PURE__ */ E(We, {
|
|
1897
1894
|
trigger: e,
|
|
1898
1895
|
triggerType: "focus",
|
|
1899
1896
|
placement: F,
|
|
@@ -1947,7 +1944,7 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1947
1944
|
children: [
|
|
1948
1945
|
e,
|
|
1949
1946
|
t && /* @__PURE__ */ E(Z, {}),
|
|
1950
|
-
i && /* @__PURE__ */ E(
|
|
1947
|
+
i && /* @__PURE__ */ E(Ke, {
|
|
1951
1948
|
label: a,
|
|
1952
1949
|
children: i
|
|
1953
1950
|
})
|
|
@@ -1969,34 +1966,34 @@ var Ct = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
|
|
|
1969
1966
|
})
|
|
1970
1967
|
]
|
|
1971
1968
|
});
|
|
1972
|
-
}),
|
|
1969
|
+
}), kt = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", At = {
|
|
1973
1970
|
sm: 380,
|
|
1974
1971
|
md: 440,
|
|
1975
1972
|
lg: 640,
|
|
1976
1973
|
xl: 880
|
|
1977
|
-
},
|
|
1978
|
-
function
|
|
1974
|
+
}, jt = !1;
|
|
1975
|
+
function Mt() {
|
|
1979
1976
|
let e = !0;
|
|
1980
1977
|
try {
|
|
1981
1978
|
e = process.env.NODE_ENV !== "production";
|
|
1982
1979
|
} catch {
|
|
1983
1980
|
e = !0;
|
|
1984
1981
|
}
|
|
1985
|
-
!e ||
|
|
1982
|
+
!e || jt || (jt = !0, console.warn("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."));
|
|
1986
1983
|
}
|
|
1987
|
-
function
|
|
1988
|
-
U("AppModal", v), W("AppModal", "size", typeof u == "string" ? u : null, Object.keys(
|
|
1984
|
+
function Nt({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a = "default", dismissible: s = !0, onClose: c, footer: l, size: u = "md", placement: f = "center", hideHeader: p = !1, staticBackdrop: m = !1, ariaLabel: h, className: g = "", children: _, ...v }) {
|
|
1985
|
+
U("AppModal", v), W("AppModal", "size", typeof u == "string" ? u : null, Object.keys(At));
|
|
1989
1986
|
let { style: y, ...x } = v;
|
|
1990
|
-
p && !h && typeof n != "string" &&
|
|
1987
|
+
p && !h && typeof n != "string" && Mt();
|
|
1991
1988
|
let S = d(null);
|
|
1992
1989
|
o(() => {
|
|
1993
1990
|
if (!e) return;
|
|
1994
1991
|
let t = S.current?.closest(".modal-content");
|
|
1995
1992
|
if (!t) return;
|
|
1996
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
1993
|
+
let n = () => Array.from(t.querySelectorAll(kt));
|
|
1997
1994
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
|
|
1998
1995
|
}, [e]);
|
|
1999
|
-
let C = typeof u == "number" ? u :
|
|
1996
|
+
let C = typeof u == "number" ? u : At[u] ?? At.md, w = [
|
|
2000
1997
|
"wui-modal",
|
|
2001
1998
|
a === "default" ? "" : `tone-${a}`,
|
|
2002
1999
|
g
|
|
@@ -2081,51 +2078,52 @@ function Ot({ open: e, eyebrow: t, title: n, subtitle: r, headerIcon: i, tone: a
|
|
|
2081
2078
|
}
|
|
2082
2079
|
//#endregion
|
|
2083
2080
|
//#region src/components/ModalIcons.jsx
|
|
2084
|
-
var
|
|
2081
|
+
var Pt = (e) => function({ size: t = 72 }) {
|
|
2085
2082
|
return /* @__PURE__ */ E("wui-status-icon", {
|
|
2086
2083
|
tone: e,
|
|
2087
2084
|
size: t
|
|
2088
2085
|
});
|
|
2089
|
-
},
|
|
2090
|
-
success:
|
|
2091
|
-
error:
|
|
2092
|
-
warning:
|
|
2093
|
-
info:
|
|
2094
|
-
delete:
|
|
2086
|
+
}, Ft = {
|
|
2087
|
+
success: Pt("success"),
|
|
2088
|
+
error: Pt("error"),
|
|
2089
|
+
warning: Pt("warning"),
|
|
2090
|
+
info: Pt("info"),
|
|
2091
|
+
delete: Pt("delete"),
|
|
2092
|
+
primary: Pt("primary")
|
|
2095
2093
|
};
|
|
2096
2094
|
//#endregion
|
|
2097
2095
|
//#region src/components/AppConfirmDialog.jsx
|
|
2098
|
-
function
|
|
2099
|
-
U("AppConfirmDialog",
|
|
2100
|
-
let [
|
|
2096
|
+
function It({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, image: c, iconSize: l, confirmPhrase: u, onConfirm: d, onClose: p, loading: m = !1, staticBackdrop: h = !1, placement: g = "center", size: _ = "md", className: v = "", ...y }) {
|
|
2097
|
+
U("AppConfirmDialog", y);
|
|
2098
|
+
let [b, x] = f("");
|
|
2101
2099
|
if (o(() => {
|
|
2102
|
-
e ||
|
|
2100
|
+
e || x("");
|
|
2103
2101
|
}, [e]), !e) return null;
|
|
2104
|
-
let
|
|
2105
|
-
|
|
2102
|
+
let S = !!u && b.trim() !== u, C = c ? null : Ft[s || (a ? "delete" : "info")], w = l > 0 ? { "--wui-confirm-icon-size": `${l}px` } : void 0, O = () => {
|
|
2103
|
+
m || p?.();
|
|
2106
2104
|
};
|
|
2107
|
-
return /* @__PURE__ */ E(
|
|
2108
|
-
...
|
|
2105
|
+
return /* @__PURE__ */ E(Nt, {
|
|
2106
|
+
...y,
|
|
2109
2107
|
open: e,
|
|
2110
2108
|
hideHeader: !0,
|
|
2111
2109
|
title: t,
|
|
2112
|
-
onClose:
|
|
2113
|
-
staticBackdrop:
|
|
2114
|
-
placement:
|
|
2115
|
-
size:
|
|
2116
|
-
className: ["wui-confirm",
|
|
2110
|
+
onClose: O,
|
|
2111
|
+
staticBackdrop: h,
|
|
2112
|
+
placement: g,
|
|
2113
|
+
size: _,
|
|
2114
|
+
className: ["wui-confirm", v].filter(Boolean).join(" "),
|
|
2117
2115
|
footer: /* @__PURE__ */ D("div", {
|
|
2118
2116
|
className: "wui-confirm-actions",
|
|
2119
|
-
children: [/* @__PURE__ */ E(
|
|
2117
|
+
children: [/* @__PURE__ */ E(ze, {
|
|
2120
2118
|
variant: "secondary",
|
|
2121
|
-
disabled:
|
|
2122
|
-
onClick:
|
|
2119
|
+
disabled: m,
|
|
2120
|
+
onClick: O,
|
|
2123
2121
|
children: i
|
|
2124
|
-
}), /* @__PURE__ */ E(
|
|
2122
|
+
}), /* @__PURE__ */ E(ze, {
|
|
2125
2123
|
variant: a ? "danger" : "primary",
|
|
2126
|
-
disabled:
|
|
2127
|
-
loading:
|
|
2128
|
-
onClick:
|
|
2124
|
+
disabled: S,
|
|
2125
|
+
loading: m,
|
|
2126
|
+
onClick: d,
|
|
2129
2127
|
children: r
|
|
2130
2128
|
})]
|
|
2131
2129
|
}),
|
|
@@ -2134,14 +2132,16 @@ function jt({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
2134
2132
|
children: [
|
|
2135
2133
|
c ? /* @__PURE__ */ E("span", {
|
|
2136
2134
|
className: "wui-confirm-icon",
|
|
2135
|
+
style: w,
|
|
2137
2136
|
children: /* @__PURE__ */ E("img", {
|
|
2138
2137
|
src: c,
|
|
2139
2138
|
alt: "",
|
|
2140
2139
|
"aria-hidden": "true"
|
|
2141
2140
|
})
|
|
2142
|
-
}) :
|
|
2141
|
+
}) : C && /* @__PURE__ */ E("span", {
|
|
2143
2142
|
className: "wui-confirm-icon",
|
|
2144
|
-
|
|
2143
|
+
style: w,
|
|
2144
|
+
children: /* @__PURE__ */ E(C, { size: 80 })
|
|
2145
2145
|
}),
|
|
2146
2146
|
/* @__PURE__ */ E("h3", {
|
|
2147
2147
|
className: "wui-confirm-title",
|
|
@@ -2153,17 +2153,17 @@ function jt({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
2153
2153
|
className: "wui-confirm-msg",
|
|
2154
2154
|
children: n
|
|
2155
2155
|
}),
|
|
2156
|
-
|
|
2156
|
+
u && /* @__PURE__ */ E(Ot, {
|
|
2157
2157
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
2158
2158
|
label: /* @__PURE__ */ D(T, { children: [
|
|
2159
2159
|
"Type ",
|
|
2160
|
-
/* @__PURE__ */ E("strong", { children:
|
|
2160
|
+
/* @__PURE__ */ E("strong", { children: u }),
|
|
2161
2161
|
" to confirm"
|
|
2162
2162
|
] }),
|
|
2163
|
-
value:
|
|
2164
|
-
onChange: (e) =>
|
|
2165
|
-
"aria-label": `Type ${
|
|
2166
|
-
disabled:
|
|
2163
|
+
value: b,
|
|
2164
|
+
onChange: (e) => x(e.target.value),
|
|
2165
|
+
"aria-label": `Type ${u} to confirm`,
|
|
2166
|
+
disabled: m
|
|
2167
2167
|
})
|
|
2168
2168
|
]
|
|
2169
2169
|
})
|
|
@@ -2171,9 +2171,9 @@ function jt({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
2171
2171
|
}
|
|
2172
2172
|
//#endregion
|
|
2173
2173
|
//#region src/components/AppConsentBanner.jsx
|
|
2174
|
-
var
|
|
2175
|
-
function
|
|
2176
|
-
U("AppConsentBanner", f), W("AppConsentBanner", "position", c,
|
|
2174
|
+
var Lt = ["bottom-left", "bottom-right"];
|
|
2175
|
+
function Rt({ heading: e, description: t, policyHref: n, policyLabel: r, analyticsDescription: i, functionalDescription: a, marketingDescription: s, position: c = "bottom-left", standalone: l = !1, className: u = "", style: d, ...f }) {
|
|
2176
|
+
U("AppConsentBanner", f), W("AppConsentBanner", "position", c, Lt);
|
|
2177
2177
|
let { setRef: p, innerRef: m } = Q({ on: { "wui-consent-save": (e) => {
|
|
2178
2178
|
R(e.detail), m.current && (m.current.preferences = L());
|
|
2179
2179
|
} } });
|
|
@@ -2200,26 +2200,26 @@ function Nt({ heading: e, description: t, policyHref: n, policyLabel: r, analyti
|
|
|
2200
2200
|
}
|
|
2201
2201
|
//#endregion
|
|
2202
2202
|
//#region src/components/AppCopyButton.jsx
|
|
2203
|
-
var
|
|
2203
|
+
var zt = {
|
|
2204
2204
|
sm: 14,
|
|
2205
2205
|
md: 16,
|
|
2206
2206
|
lg: 20
|
|
2207
2207
|
};
|
|
2208
|
-
function
|
|
2209
|
-
U("AppCopyButton", m), W("AppCopyButton", "size", i, Object.keys(
|
|
2208
|
+
function Bt({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r = !1, size: i = "md", variant: s = "ghost", onCopied: c, className: l = "", tooltip: u, tooltipPlacement: p, ...m }) {
|
|
2209
|
+
U("AppCopyButton", m), W("AppCopyButton", "size", i, Object.keys(zt));
|
|
2210
2210
|
let [h, g] = f(!1), _ = d(null);
|
|
2211
2211
|
o(() => () => clearTimeout(_.current), []);
|
|
2212
2212
|
let v = a(async () => {
|
|
2213
2213
|
await M(e) && (g(!0), clearTimeout(_.current), _.current = setTimeout(() => g(!1), O), c?.());
|
|
2214
2214
|
}, [e, c]), y = h ? n : t, b = h ? "check" : "files";
|
|
2215
|
-
return K(r ? /* @__PURE__ */ E(
|
|
2215
|
+
return K(r ? /* @__PURE__ */ E(Ae, {
|
|
2216
2216
|
icon: b,
|
|
2217
2217
|
label: y,
|
|
2218
|
-
size:
|
|
2218
|
+
size: zt[i] ?? zt.md,
|
|
2219
2219
|
onClick: v,
|
|
2220
2220
|
className: l,
|
|
2221
2221
|
...m
|
|
2222
|
-
}) : /* @__PURE__ */ E(
|
|
2222
|
+
}) : /* @__PURE__ */ E(ze, {
|
|
2223
2223
|
leftIcon: b,
|
|
2224
2224
|
variant: s,
|
|
2225
2225
|
size: i,
|
|
@@ -2231,8 +2231,74 @@ function Ft({ text: e, label: t = "Copy", copiedLabel: n = "Copied", iconOnly: r
|
|
|
2231
2231
|
}), u, p);
|
|
2232
2232
|
}
|
|
2233
2233
|
//#endregion
|
|
2234
|
+
//#region src/components/AppCountrySelect.jsx
|
|
2235
|
+
var Vt = [
|
|
2236
|
+
"sm",
|
|
2237
|
+
"md",
|
|
2238
|
+
"lg"
|
|
2239
|
+
], Ht = i(function({ value: e, onChange: t, countries: n, placeholder: r = "Select country", searchPlaceholder: i = "Search countries...", searchable: a = !0, clearable: o = !1, size: c = "md", floatingLabel: l = !1, disabled: u, label: d, required: f = !1, error: p, hint: m, help: h, helpLabel: g = "More information", id: _, name: v, className: y = "", fieldClassName: b = "", "aria-label": x, "aria-labelledby": S, "aria-describedby": C, ...w }, T) {
|
|
2240
|
+
U("AppCountrySelect", w), W("AppCountrySelect", "size", c, Vt);
|
|
2241
|
+
let O = s(), { setRef: k } = Q({
|
|
2242
|
+
ref: T,
|
|
2243
|
+
value: e ?? "",
|
|
2244
|
+
onChange: t
|
|
2245
|
+
}), A = _ || O, j = l && d, M = p && A ? `${A}-error` : void 0, N = m && A ? `${A}-hint` : void 0, P = /* @__PURE__ */ E("wui-country-select", {
|
|
2246
|
+
"aria-label": x || (typeof d == "string" ? d : void 0),
|
|
2247
|
+
"aria-labelledby": S || void 0,
|
|
2248
|
+
"aria-describedby": M || N || C || void 0,
|
|
2249
|
+
"aria-invalid": p ? "true" : void 0,
|
|
2250
|
+
ref: k,
|
|
2251
|
+
id: A,
|
|
2252
|
+
name: v,
|
|
2253
|
+
countries: Array.isArray(n) ? n.join(",") : void 0,
|
|
2254
|
+
placeholder: j ? " " : r,
|
|
2255
|
+
"search-placeholder": i,
|
|
2256
|
+
searchable: a ? "" : void 0,
|
|
2257
|
+
clearable: o ? "" : void 0,
|
|
2258
|
+
size: c === "sm" || c === "lg" ? c : void 0,
|
|
2259
|
+
disabled: u ? "" : void 0,
|
|
2260
|
+
required: f ? "" : void 0,
|
|
2261
|
+
className: y || void 0,
|
|
2262
|
+
...w
|
|
2263
|
+
});
|
|
2264
|
+
return !d && !p && !m ? P : /* @__PURE__ */ D("div", {
|
|
2265
|
+
className: ["field", b].filter(Boolean).join(" "),
|
|
2266
|
+
children: [
|
|
2267
|
+
d && !j && /* @__PURE__ */ D("label", {
|
|
2268
|
+
className: "label",
|
|
2269
|
+
htmlFor: A,
|
|
2270
|
+
children: [
|
|
2271
|
+
d,
|
|
2272
|
+
f && /* @__PURE__ */ E(Z, {}),
|
|
2273
|
+
h && /* @__PURE__ */ E(Ke, {
|
|
2274
|
+
label: g,
|
|
2275
|
+
children: h
|
|
2276
|
+
})
|
|
2277
|
+
]
|
|
2278
|
+
}),
|
|
2279
|
+
j ? /* @__PURE__ */ D("div", {
|
|
2280
|
+
className: "field-float",
|
|
2281
|
+
children: [P, /* @__PURE__ */ D("label", {
|
|
2282
|
+
className: "float-label",
|
|
2283
|
+
htmlFor: A,
|
|
2284
|
+
children: [d, f && /* @__PURE__ */ E(Z, {})]
|
|
2285
|
+
})]
|
|
2286
|
+
}) : P,
|
|
2287
|
+
p ? /* @__PURE__ */ E("div", {
|
|
2288
|
+
className: "field-error",
|
|
2289
|
+
id: M,
|
|
2290
|
+
children: p
|
|
2291
|
+
}) : m ? /* @__PURE__ */ E("div", {
|
|
2292
|
+
className: "field-hint",
|
|
2293
|
+
id: N,
|
|
2294
|
+
children: m
|
|
2295
|
+
}) : null
|
|
2296
|
+
]
|
|
2297
|
+
});
|
|
2298
|
+
});
|
|
2299
|
+
//#endregion
|
|
2234
2300
|
//#region src/components/AppSkeleton.jsx
|
|
2235
|
-
function
|
|
2301
|
+
function Ut({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "", style: i, ...a }) {
|
|
2236
2302
|
return U("AppSkeleton", a), /* @__PURE__ */ E("span", {
|
|
2237
2303
|
className: `skeleton${r ? ` ${r}` : ""}`,
|
|
2238
2304
|
"aria-hidden": "true",
|
|
@@ -2245,28 +2311,28 @@ function It({ width: e = "100%", height: t = 14, radius: n = 6, className: r = "
|
|
|
2245
2311
|
...a
|
|
2246
2312
|
});
|
|
2247
2313
|
}
|
|
2248
|
-
function
|
|
2249
|
-
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ E("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E(
|
|
2314
|
+
function Wt({ rows: e = 4, cols: t = 5 }) {
|
|
2315
|
+
return Array.from({ length: e }).map((e, n) => /* @__PURE__ */ E("tr", { children: Array.from({ length: t }).map((e, t) => /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E(Ut, {
|
|
2250
2316
|
width: t === 0 ? "70%" : "50%",
|
|
2251
2317
|
height: 12
|
|
2252
2318
|
}) }, `col-${t}`)) }, `row-${n}`));
|
|
2253
2319
|
}
|
|
2254
2320
|
//#endregion
|
|
2255
2321
|
//#region src/lib/pageWindow.js
|
|
2256
|
-
var
|
|
2322
|
+
var Gt = (e, t) => {
|
|
2257
2323
|
let n = [];
|
|
2258
2324
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
2259
2325
|
return n;
|
|
2260
2326
|
};
|
|
2261
|
-
function
|
|
2327
|
+
function Kt(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
|
|
2262
2328
|
let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
|
|
2263
|
-
if (i <= n * 2 + 3 + r * 2) return
|
|
2264
|
-
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u =
|
|
2265
|
-
return u.push(...c ? ["ellipsis-left"] :
|
|
2329
|
+
if (i <= n * 2 + 3 + r * 2) return Gt(1, i);
|
|
2330
|
+
let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = Gt(1, r);
|
|
2331
|
+
return u.push(...c ? ["ellipsis-left"] : Gt(r + 1, o - 1)), u.push(...Gt(o, s)), u.push(...l ? ["ellipsis-right"] : Gt(s + 1, i - r)), u.push(...Gt(i - r + 1, i)), u;
|
|
2266
2332
|
}
|
|
2267
2333
|
//#endregion
|
|
2268
2334
|
//#region src/components/AppSelectMini.jsx
|
|
2269
|
-
function
|
|
2335
|
+
function qt({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", name: i, ariaLabel: a, id: s, disabled: c, size: l, icon: u, prefix: d, className: f, ...p }) {
|
|
2270
2336
|
U("AppSelectMini", p);
|
|
2271
2337
|
let { setRef: m, innerRef: h } = Q({
|
|
2272
2338
|
value: e ?? "",
|
|
@@ -2280,7 +2346,7 @@ function Bt({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
2280
2346
|
label: e.label ?? e.text ?? "",
|
|
2281
2347
|
icon: e.icon
|
|
2282
2348
|
}));
|
|
2283
|
-
|
|
2349
|
+
Xe(t, e.options) || (e.options = t);
|
|
2284
2350
|
}, [n, h]), o(() => {
|
|
2285
2351
|
let e = h.current;
|
|
2286
2352
|
if (e) for (let [t, n] of [["icon", u], ["prefix", d]]) n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
@@ -2303,22 +2369,22 @@ function Bt({ value: e, onChange: t, options: n = [], placeholder: r = "Select..
|
|
|
2303
2369
|
}
|
|
2304
2370
|
//#endregion
|
|
2305
2371
|
//#region src/components/AppTablePagination.jsx
|
|
2306
|
-
var
|
|
2372
|
+
var Jt = [
|
|
2307
2373
|
5,
|
|
2308
2374
|
10,
|
|
2309
2375
|
25,
|
|
2310
2376
|
50
|
|
2311
2377
|
];
|
|
2312
|
-
function
|
|
2378
|
+
function Yt({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRow: a, onPageChange: o, onPageSizeChange: s, pageSizes: c = Jt, mode: l = "prev-next", showPageSize: u = !0, className: d = "", ...f }) {
|
|
2313
2379
|
U("AppTablePagination", f);
|
|
2314
|
-
let p = l === "numbered", m = p ?
|
|
2380
|
+
let p = l === "numbered", m = p ? Kt(e, t) : null;
|
|
2315
2381
|
return /* @__PURE__ */ D("div", {
|
|
2316
2382
|
className: `table-pagination${d ? ` ${d}` : ""}`,
|
|
2317
2383
|
...f,
|
|
2318
2384
|
children: [
|
|
2319
2385
|
u && /* @__PURE__ */ D("span", {
|
|
2320
2386
|
className: "tpg-rows",
|
|
2321
|
-
children: ["Rows per page:", /* @__PURE__ */ E(
|
|
2387
|
+
children: ["Rows per page:", /* @__PURE__ */ E(qt, {
|
|
2322
2388
|
value: n,
|
|
2323
2389
|
onChange: (e) => s(Number(e)),
|
|
2324
2390
|
ariaLabel: "Rows per page",
|
|
@@ -2382,13 +2448,13 @@ function Ht({ page: e, totalPages: t, pageSize: n, total: r, firstRow: i, lastRo
|
|
|
2382
2448
|
}
|
|
2383
2449
|
//#endregion
|
|
2384
2450
|
//#region src/components/AppDataTable.jsx
|
|
2385
|
-
function
|
|
2451
|
+
function Xt(e) {
|
|
2386
2452
|
return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
2387
2453
|
}
|
|
2388
|
-
function
|
|
2454
|
+
function Zt(e) {
|
|
2389
2455
|
return e == null || e === "" ? "-" : typeof e == "boolean" ? String(e) : e;
|
|
2390
2456
|
}
|
|
2391
|
-
function
|
|
2457
|
+
function Qt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a, loading: o = !1, skeletonRows: s = 5, empty: c = "No records found.", emptyFiltered: l, sourceCount: u, rowActions: d, rowActionsLabel: p, pagination: m, ariaLabel: h, className: g = "", wrapperClassName: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, renderExpanded: S, ...C }) {
|
|
2392
2458
|
U("AppDataTable", C);
|
|
2393
2459
|
let w = typeof S == "function", [O, k] = f(() => /* @__PURE__ */ new Set()), A = (e) => k((t) => {
|
|
2394
2460
|
let n = new Set(t);
|
|
@@ -2425,7 +2491,7 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2425
2491
|
e.map((e, t) => {
|
|
2426
2492
|
let n = !!(e.sortable && a), r = i && i.key === e.key;
|
|
2427
2493
|
return /* @__PURE__ */ D("th", {
|
|
2428
|
-
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") +
|
|
2494
|
+
className: (n ? "sortable " : "") + (t === 0 ? "wui-name-cell " : "") + Xt(e.align),
|
|
2429
2495
|
style: e.width ? { width: e.width } : void 0,
|
|
2430
2496
|
tabIndex: n ? 0 : void 0,
|
|
2431
2497
|
"aria-sort": r ? i.dir === "asc" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
@@ -2452,7 +2518,7 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2452
2518
|
children: "Actions"
|
|
2453
2519
|
})
|
|
2454
2520
|
}))
|
|
2455
|
-
] }) }), /* @__PURE__ */ E("tbody", { children: o ? /* @__PURE__ */ E(
|
|
2521
|
+
] }) }), /* @__PURE__ */ E("tbody", { children: o ? /* @__PURE__ */ E(Wt, {
|
|
2456
2522
|
rows: s,
|
|
2457
2523
|
cols: j
|
|
2458
2524
|
}) : n?.length ? n.map((n, i) => {
|
|
@@ -2486,9 +2552,9 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2486
2552
|
})
|
|
2487
2553
|
}),
|
|
2488
2554
|
e.map((e, t) => /* @__PURE__ */ E("td", {
|
|
2489
|
-
className: (t === 0 ? "wui-name-cell " : "") +
|
|
2555
|
+
className: (t === 0 ? "wui-name-cell " : "") + Xt(e.align) + (e.cellClassName ? ` ${e.cellClassName}` : ""),
|
|
2490
2556
|
style: e.cellStyle,
|
|
2491
|
-
children: e.render ? e.render(n) :
|
|
2557
|
+
children: e.render ? e.render(n) : Zt(n[e.key])
|
|
2492
2558
|
}, e.key)),
|
|
2493
2559
|
d && /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E("div", {
|
|
2494
2560
|
className: "u-row-actions",
|
|
@@ -2511,7 +2577,7 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2511
2577
|
children: I
|
|
2512
2578
|
}) : I
|
|
2513
2579
|
})]
|
|
2514
|
-
}), m && m.total > 0 && /* @__PURE__ */ E(
|
|
2580
|
+
}), m && m.total > 0 && /* @__PURE__ */ E(Yt, {
|
|
2515
2581
|
page: m.page,
|
|
2516
2582
|
totalPages: m.totalPages,
|
|
2517
2583
|
pageSize: m.pageSize,
|
|
@@ -2526,7 +2592,7 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2526
2592
|
}
|
|
2527
2593
|
//#endregion
|
|
2528
2594
|
//#region src/components/AppDatePicker.jsx
|
|
2529
|
-
var
|
|
2595
|
+
var $t = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, placeholder: u = "Enter Date", disabled: d, size: f, firstDay: p, id: m, ariaLabel: h, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
2530
2596
|
U("AppDatePicker", v);
|
|
2531
2597
|
let b = s(), x = m || b, { setRef: S } = Q({
|
|
2532
2598
|
ref: y,
|
|
@@ -2570,7 +2636,7 @@ var Kt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
2570
2636
|
})
|
|
2571
2637
|
]
|
|
2572
2638
|
});
|
|
2573
|
-
}),
|
|
2639
|
+
}), en = i(function({ start: e, end: t, onChange: n, label: r, required: i = !1, hint: a, error: c, startName: l, endName: u, min: d, max: f, placeholder: p = "Start – End", disabled: m, size: h, firstDay: g, id: _, ariaLabel: v, className: y = "", fieldClassName: b = "", ...x }, S) {
|
|
2574
2640
|
U("AppDateRangePicker", x);
|
|
2575
2641
|
let C = s(), w = _ || C, { setRef: T, innerRef: O } = Q({
|
|
2576
2642
|
ref: S,
|
|
@@ -2631,7 +2697,7 @@ var Kt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
2631
2697
|
});
|
|
2632
2698
|
//#endregion
|
|
2633
2699
|
//#region src/components/AppDescriptions.jsx
|
|
2634
|
-
function
|
|
2700
|
+
function tn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
2635
2701
|
return U("AppDescriptions", o), /* @__PURE__ */ D("div", {
|
|
2636
2702
|
className: [
|
|
2637
2703
|
"descs",
|
|
@@ -2647,7 +2713,7 @@ function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
2647
2713
|
}), /* @__PURE__ */ E("dl", {
|
|
2648
2714
|
className: "descs-list",
|
|
2649
2715
|
children: e.map((e, t) => {
|
|
2650
|
-
let n =
|
|
2716
|
+
let n = Et(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
2651
2717
|
return /* @__PURE__ */ D("div", {
|
|
2652
2718
|
className: "descs-item",
|
|
2653
2719
|
style: { "--descs-span": r },
|
|
@@ -2665,18 +2731,18 @@ function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
2665
2731
|
}
|
|
2666
2732
|
//#endregion
|
|
2667
2733
|
//#region src/components/AppDropdown.jsx
|
|
2668
|
-
var
|
|
2669
|
-
function
|
|
2734
|
+
var nn = !1;
|
|
2735
|
+
function rn() {
|
|
2670
2736
|
let e = !0;
|
|
2671
2737
|
try {
|
|
2672
2738
|
e = process.env.NODE_ENV !== "production";
|
|
2673
2739
|
} catch {
|
|
2674
2740
|
e = !0;
|
|
2675
2741
|
}
|
|
2676
|
-
!e ||
|
|
2742
|
+
!e || nn || (nn = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
2677
2743
|
}
|
|
2678
|
-
function
|
|
2679
|
-
U("AppDropdown", p), !d && !i && !r &&
|
|
2744
|
+
function an({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items: s = [], menuClassName: c = "", linkComponent: l, children: u, trigger: d, ...p }) {
|
|
2745
|
+
U("AppDropdown", p), !d && !i && !r && rn();
|
|
2680
2746
|
let m = n ?? (d ? "wui-dropdown-trigger" : "topbar-icon-btn"), [h, g] = f(!1);
|
|
2681
2747
|
return o(() => {
|
|
2682
2748
|
if (!h) return;
|
|
@@ -2693,7 +2759,7 @@ function Zt({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
2693
2759
|
onToggle: (e) => g(e),
|
|
2694
2760
|
...p,
|
|
2695
2761
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
2696
|
-
as:
|
|
2762
|
+
as: on,
|
|
2697
2763
|
icon: e,
|
|
2698
2764
|
iconSize: t,
|
|
2699
2765
|
btnClassName: m,
|
|
@@ -2729,7 +2795,7 @@ function Zt({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
2729
2795
|
})]
|
|
2730
2796
|
});
|
|
2731
2797
|
}
|
|
2732
|
-
var
|
|
2798
|
+
var on = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-btn", trigger: r, "aria-label": i, className: a, ...o }, s) {
|
|
2733
2799
|
return /* @__PURE__ */ E("button", {
|
|
2734
2800
|
ref: s,
|
|
2735
2801
|
type: "button",
|
|
@@ -2744,16 +2810,16 @@ var Qt = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
2744
2810
|
});
|
|
2745
2811
|
//#endregion
|
|
2746
2812
|
//#region src/lib/fileItem.js
|
|
2747
|
-
function
|
|
2813
|
+
function sn(e) {
|
|
2748
2814
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
2749
2815
|
}
|
|
2750
|
-
function
|
|
2816
|
+
function cn(e) {
|
|
2751
2817
|
return e instanceof File ? e.name : e?.name;
|
|
2752
2818
|
}
|
|
2753
|
-
function
|
|
2819
|
+
function ln(e) {
|
|
2754
2820
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
2755
2821
|
}
|
|
2756
|
-
function
|
|
2822
|
+
function un(e, t) {
|
|
2757
2823
|
let [n, r] = f(null);
|
|
2758
2824
|
return o(() => {
|
|
2759
2825
|
if (!t) {
|
|
@@ -2769,8 +2835,8 @@ function nn(e, t) {
|
|
|
2769
2835
|
}
|
|
2770
2836
|
//#endregion
|
|
2771
2837
|
//#region src/lib/FileItemRow.jsx
|
|
2772
|
-
function
|
|
2773
|
-
let i =
|
|
2838
|
+
function dn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
2839
|
+
let i = un(e, t), a = cn(e), o = ln(e);
|
|
2774
2840
|
return /* @__PURE__ */ D("div", {
|
|
2775
2841
|
className: "attach-item",
|
|
2776
2842
|
children: [
|
|
@@ -2809,9 +2875,9 @@ function rn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
2809
2875
|
}
|
|
2810
2876
|
//#endregion
|
|
2811
2877
|
//#region src/components/AppFileAttachment.jsx
|
|
2812
|
-
function
|
|
2878
|
+
function fn({ label: e = "Attachment", value: t, name: n, onChange: r, multiple: i = !1, accept: a = k, maxSizeMb: o = A, optional: c = !1, validate: l = !0, error: u, id: d, ...p }) {
|
|
2813
2879
|
U("AppFileAttachment", p);
|
|
2814
|
-
let m = s(), h = d || m, [g, _] = f(""), v = i && Array.isArray(t) ? t : t ? [t] : [], y = F(a), b = (e) => e instanceof File ? P(e) : y || P(e), x = !i && v.length === 1 && b(v[0]), S =
|
|
2880
|
+
let m = s(), h = d || m, [g, _] = f(""), v = i && Array.isArray(t) ? t : t ? [t] : [], y = F(a), b = (e) => e instanceof File ? P(e) : y || P(e), x = !i && v.length === 1 && b(v[0]), S = pn(a, o);
|
|
2815
2881
|
function C(e) {
|
|
2816
2882
|
let n = Array.from(e.target.files || []);
|
|
2817
2883
|
if (e.target.value = "", !n.length) return;
|
|
@@ -2828,8 +2894,8 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2828
2894
|
s.push(e);
|
|
2829
2895
|
}
|
|
2830
2896
|
if (_(c), s.length) if (i) {
|
|
2831
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
2832
|
-
r(e.concat(s.filter((e) => !n.has(
|
|
2897
|
+
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(sn));
|
|
2898
|
+
r(e.concat(s.filter((e) => !n.has(sn(e)))));
|
|
2833
2899
|
} else r(s[0]);
|
|
2834
2900
|
}
|
|
2835
2901
|
function w(e) {
|
|
@@ -2884,17 +2950,17 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2884
2950
|
onChange: C,
|
|
2885
2951
|
...p
|
|
2886
2952
|
})] }),
|
|
2887
|
-
x ? /* @__PURE__ */ E(
|
|
2953
|
+
x ? /* @__PURE__ */ E(mn, {
|
|
2888
2954
|
item: v[0],
|
|
2889
2955
|
isImage: !0,
|
|
2890
2956
|
onRemove: () => w(0)
|
|
2891
2957
|
}) : v.length > 0 && /* @__PURE__ */ E("div", {
|
|
2892
2958
|
className: "attach-list",
|
|
2893
|
-
children: v.map((e, t) => /* @__PURE__ */ E(
|
|
2959
|
+
children: v.map((e, t) => /* @__PURE__ */ E(dn, {
|
|
2894
2960
|
item: e,
|
|
2895
2961
|
isImage: b(e),
|
|
2896
2962
|
onRemove: () => w(t)
|
|
2897
|
-
},
|
|
2963
|
+
}, sn(e)))
|
|
2898
2964
|
}),
|
|
2899
2965
|
O && /* @__PURE__ */ E("div", {
|
|
2900
2966
|
className: "field-error",
|
|
@@ -2904,12 +2970,12 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2904
2970
|
]
|
|
2905
2971
|
});
|
|
2906
2972
|
}
|
|
2907
|
-
function
|
|
2973
|
+
function pn(e, t) {
|
|
2908
2974
|
let n = e?.trim() ? j(e) : "", r = t > 0 ? `up to ${t} MB` : "";
|
|
2909
2975
|
return n && r ? `${n}, ${r}` : r ? `Up to ${t} MB` : n;
|
|
2910
2976
|
}
|
|
2911
|
-
function
|
|
2912
|
-
let r =
|
|
2977
|
+
function mn({ item: e, isImage: t, onRemove: n }) {
|
|
2978
|
+
let r = un(e, t), i = cn(e), a = ln(e);
|
|
2913
2979
|
return /* @__PURE__ */ D("div", {
|
|
2914
2980
|
className: "attach-preview",
|
|
2915
2981
|
children: [/* @__PURE__ */ D("div", {
|
|
@@ -2941,7 +3007,7 @@ function sn({ item: e, isImage: t, onRemove: n }) {
|
|
|
2941
3007
|
}
|
|
2942
3008
|
//#endregion
|
|
2943
3009
|
//#region src/components/AppFilePicker.jsx
|
|
2944
|
-
function
|
|
3010
|
+
function hn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, maxFiles: c, accept: l = ".jpg,.jpeg,.png", maxSizeMb: u = A, required: p, error: m, hint: h, loading: g = !1, className: _ = "", fieldClassName: v = "", style: y, ...b }) {
|
|
2945
3011
|
U("AppFilePicker", b);
|
|
2946
3012
|
let [x, S] = f(null), [C, w] = f(!1), [T, O] = f(""), k = d(null), M = s(), N = r || M;
|
|
2947
3013
|
o(() => {
|
|
@@ -2960,7 +3026,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
2960
3026
|
}, ce = (e) => {
|
|
2961
3027
|
let n = Array.from(e || []);
|
|
2962
3028
|
if (!n.length) return;
|
|
2963
|
-
let r = Array.isArray(t) ? t : t ? [t] : [], a = new Set(r.map(
|
|
3029
|
+
let r = Array.isArray(t) ? t : t ? [t] : [], a = new Set(r.map(sn)), o = "", s = [];
|
|
2964
3030
|
for (let e of n) {
|
|
2965
3031
|
let t = I(e, {
|
|
2966
3032
|
accept: l,
|
|
@@ -2970,7 +3036,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
2970
3036
|
o ||= t;
|
|
2971
3037
|
continue;
|
|
2972
3038
|
}
|
|
2973
|
-
a.has(
|
|
3039
|
+
a.has(sn(e)) || (a.add(sn(e)), s.push(e));
|
|
2974
3040
|
}
|
|
2975
3041
|
let d = r.concat(s);
|
|
2976
3042
|
c && d.length > c && (d = d.slice(0, c), o ||= `Up to ${c} files.`), O(o), i(d);
|
|
@@ -3115,12 +3181,12 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3115
3181
|
fe,
|
|
3116
3182
|
a && L.length > 0 && /* @__PURE__ */ E("div", {
|
|
3117
3183
|
className: "attach-list",
|
|
3118
|
-
children: L.map((e, t) => /* @__PURE__ */ E(
|
|
3184
|
+
children: L.map((e, t) => /* @__PURE__ */ E(dn, {
|
|
3119
3185
|
item: e,
|
|
3120
3186
|
isImage: e instanceof File ? P(e) : V || P(e),
|
|
3121
3187
|
noun: "file",
|
|
3122
3188
|
onRemove: () => ue(t)
|
|
3123
|
-
},
|
|
3189
|
+
}, sn(e)))
|
|
3124
3190
|
})
|
|
3125
3191
|
]
|
|
3126
3192
|
}),
|
|
@@ -3138,7 +3204,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3138
3204
|
}
|
|
3139
3205
|
//#endregion
|
|
3140
3206
|
//#region src/components/AppFloatingDock.jsx
|
|
3141
|
-
function
|
|
3207
|
+
function gn({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
3142
3208
|
return U("AppFloatingDock", s), /* @__PURE__ */ E("wui-dock", {
|
|
3143
3209
|
role: "navigation",
|
|
3144
3210
|
"aria-label": n,
|
|
@@ -3180,7 +3246,7 @@ function ln({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
3180
3246
|
}
|
|
3181
3247
|
//#endregion
|
|
3182
3248
|
//#region src/components/AppFormActions.jsx
|
|
3183
|
-
function
|
|
3249
|
+
function _n({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
3184
3250
|
return U("AppFormActions", i), /* @__PURE__ */ E("div", {
|
|
3185
3251
|
className: [
|
|
3186
3252
|
"form-actions",
|
|
@@ -3194,7 +3260,7 @@ function un({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
3194
3260
|
}
|
|
3195
3261
|
//#endregion
|
|
3196
3262
|
//#region src/components/AppFormRow.jsx
|
|
3197
|
-
function
|
|
3263
|
+
function vn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
3198
3264
|
U("AppFormRow", r);
|
|
3199
3265
|
let { style: i, ...a } = r;
|
|
3200
3266
|
return /* @__PURE__ */ E("div", {
|
|
@@ -3209,7 +3275,7 @@ function dn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
3209
3275
|
}
|
|
3210
3276
|
//#endregion
|
|
3211
3277
|
//#region src/components/AppFormSection.jsx
|
|
3212
|
-
function
|
|
3278
|
+
function yn({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
3213
3279
|
return U("AppFormSection", i), /* @__PURE__ */ D("section", {
|
|
3214
3280
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
3215
3281
|
...i,
|
|
@@ -3230,12 +3296,12 @@ function fn({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
3230
3296
|
}
|
|
3231
3297
|
//#endregion
|
|
3232
3298
|
//#region src/components/AppInfoList.jsx
|
|
3233
|
-
function
|
|
3299
|
+
function bn({ items: e = [], className: t = "", ...n }) {
|
|
3234
3300
|
return U("AppInfoList", n), /* @__PURE__ */ E("div", {
|
|
3235
3301
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
3236
3302
|
...n,
|
|
3237
3303
|
children: e.map((e, t) => {
|
|
3238
|
-
let n =
|
|
3304
|
+
let n = Et(e.value), r = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
3239
3305
|
className: "info-icon",
|
|
3240
3306
|
children: X(e.icon, { size: 16 })
|
|
3241
3307
|
}), /* @__PURE__ */ D("span", {
|
|
@@ -3261,23 +3327,23 @@ function pn({ items: e = [], className: t = "", ...n }) {
|
|
|
3261
3327
|
}
|
|
3262
3328
|
//#endregion
|
|
3263
3329
|
//#region src/components/AppKpiTile.jsx
|
|
3264
|
-
var
|
|
3265
|
-
function
|
|
3266
|
-
if (!e || e.length < 2) return `0,${
|
|
3267
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
3268
|
-
return e.map((e, i) => `${i * r},${n === 0 ?
|
|
3330
|
+
var xn = 48, Sn = 16;
|
|
3331
|
+
function Cn(e) {
|
|
3332
|
+
if (!e || e.length < 2) return `0,${Sn / 2} ${xn},${Sn / 2}`;
|
|
3333
|
+
let t = Math.min(...e), n = Math.max(...e) - t, r = xn / (e.length - 1);
|
|
3334
|
+
return e.map((e, i) => `${i * r},${n === 0 ? Sn / 2 : Sn - (e - t) / n * Sn}`).join(" ");
|
|
3269
3335
|
}
|
|
3270
|
-
function
|
|
3336
|
+
function wn(e) {
|
|
3271
3337
|
if (typeof e != "string") return "flat";
|
|
3272
3338
|
let t = e.trim();
|
|
3273
3339
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
3274
3340
|
}
|
|
3275
|
-
function
|
|
3341
|
+
function Tn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, deltaDirection: o, sparkline: s, variant: c = "plain", size: l = "md", valueSize: u, inline: d = !1, attention: f = !1, href: p, linkComponent: m, className: h = "", style: g, iconClassName: _ = "", labelClassName: v = "", valueClassName: y = "", captionClassName: b = "", deltaClassName: x = "", sparklineClassName: S = "", ...C }) {
|
|
3276
3342
|
U("AppKpiTile", C);
|
|
3277
3343
|
let w = `kpi${d ? " kpi-inline" : ""}${c === "filled" ? " kpi-filled" : c === "accent" ? " kpi-accent" : c === "spotlight" ? " kpi-spotlight" : ""}${l === "lg" ? " kpi-lg" : l === "sm" ? " kpi-sm" : ""}${f ? " kpi-attention" : ""}${h ? ` ${h}` : ""}`, T = typeof u == "number" && u > 0 ? {
|
|
3278
3344
|
...g,
|
|
3279
3345
|
"--wui-kpi-value-size": `${u}px`
|
|
3280
|
-
} : g, O = o ??
|
|
3346
|
+
} : g, O = o ?? wn(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
3281
3347
|
return p != null && (A = m ? {
|
|
3282
3348
|
as: m,
|
|
3283
3349
|
to: p
|
|
@@ -3315,12 +3381,12 @@ function vn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3315
3381
|
}),
|
|
3316
3382
|
s && s.length > 0 && /* @__PURE__ */ E("svg", {
|
|
3317
3383
|
className: `kpi-sparkline${S ? ` ${S}` : ""}`,
|
|
3318
|
-
width:
|
|
3319
|
-
height:
|
|
3320
|
-
viewBox: `0 0 ${
|
|
3384
|
+
width: xn,
|
|
3385
|
+
height: Sn,
|
|
3386
|
+
viewBox: `0 0 ${xn} ${Sn}`,
|
|
3321
3387
|
"aria-hidden": "true",
|
|
3322
3388
|
children: /* @__PURE__ */ E("polyline", {
|
|
3323
|
-
points:
|
|
3389
|
+
points: Cn(s),
|
|
3324
3390
|
stroke: "currentColor",
|
|
3325
3391
|
fill: "none"
|
|
3326
3392
|
})
|
|
@@ -3330,11 +3396,11 @@ function vn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3330
3396
|
}
|
|
3331
3397
|
//#endregion
|
|
3332
3398
|
//#region src/components/AppLink.jsx
|
|
3333
|
-
var
|
|
3399
|
+
var En = {
|
|
3334
3400
|
sm: 13,
|
|
3335
3401
|
md: 15,
|
|
3336
3402
|
lg: 18
|
|
3337
|
-
},
|
|
3403
|
+
}, Dn = [
|
|
3338
3404
|
"underline",
|
|
3339
3405
|
"underline-center",
|
|
3340
3406
|
"static",
|
|
@@ -3348,35 +3414,35 @@ var yn = {
|
|
|
3348
3414
|
"shine",
|
|
3349
3415
|
"none"
|
|
3350
3416
|
];
|
|
3351
|
-
function
|
|
3417
|
+
function On(e, t, n) {
|
|
3352
3418
|
if (!e) return null;
|
|
3353
3419
|
let r = `wui-link__ic wui-link__ic--${t}`;
|
|
3354
3420
|
return typeof e == "string" ? /* @__PURE__ */ E("span", {
|
|
3355
3421
|
className: r,
|
|
3356
3422
|
children: /* @__PURE__ */ E(Y, {
|
|
3357
3423
|
name: e,
|
|
3358
|
-
size:
|
|
3424
|
+
size: En[n] ?? En.md
|
|
3359
3425
|
})
|
|
3360
3426
|
}) : /* @__PURE__ */ E("span", {
|
|
3361
3427
|
className: r,
|
|
3362
3428
|
children: e
|
|
3363
3429
|
});
|
|
3364
3430
|
}
|
|
3365
|
-
function
|
|
3366
|
-
U("AppLink", d), W("AppLink", "animation", r,
|
|
3367
|
-
let f =
|
|
3431
|
+
function kn({ children: e, label: t, href: n, animation: r = "underline", leftIcon: i = null, rightIcon: a = null, size: o = "md", external: s = !1, disabled: c = !1, linkComponent: l, className: u = "", ...d }) {
|
|
3432
|
+
U("AppLink", d), W("AppLink", "animation", r, Dn), W("AppLink", "size", o, Object.keys(En));
|
|
3433
|
+
let f = Dn.includes(r) ? r : "underline", p = f === "icon" && !a && !i ? "arrow-right" : a, m = [
|
|
3368
3434
|
"wui-link",
|
|
3369
3435
|
`wui-link--${f}`,
|
|
3370
3436
|
o === "md" ? "" : `wui-link--${o}`,
|
|
3371
3437
|
c ? "is-disabled" : "",
|
|
3372
3438
|
u
|
|
3373
3439
|
].filter(Boolean).join(" "), h = /* @__PURE__ */ D(T, { children: [
|
|
3374
|
-
|
|
3440
|
+
On(i, "left", o),
|
|
3375
3441
|
/* @__PURE__ */ E("span", {
|
|
3376
3442
|
className: "wui-link__label",
|
|
3377
3443
|
children: e ?? t
|
|
3378
3444
|
}),
|
|
3379
|
-
|
|
3445
|
+
On(p, "right", o)
|
|
3380
3446
|
] });
|
|
3381
3447
|
return c ? /* @__PURE__ */ E("span", {
|
|
3382
3448
|
className: m,
|
|
@@ -3399,13 +3465,13 @@ function Sn({ children: e, label: t, href: n, animation: r = "underline", leftIc
|
|
|
3399
3465
|
}
|
|
3400
3466
|
//#endregion
|
|
3401
3467
|
//#region src/components/AppLogoPicker.jsx
|
|
3402
|
-
var
|
|
3468
|
+
var An = {
|
|
3403
3469
|
sm: 72,
|
|
3404
3470
|
md: 120,
|
|
3405
3471
|
lg: 160
|
|
3406
3472
|
};
|
|
3407
|
-
function
|
|
3408
|
-
U("AppLogoPicker", k), W("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(
|
|
3473
|
+
function jn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a = !1, disabled: c = !1, accept: l = "image/png,image/jpeg,image/webp", maxSizeMb: u = A, overlayIcon: p = "image", overlayLabel: m = "Update photo", ariaLabel: h = "Upload photo", label: g, hint: _, error: v, layout: y = "stacked", title: b, subtitle: x, required: S = !1, variant: C = "initials", size: w = "md", shape: T = "circle", className: O = "", ...k }) {
|
|
3474
|
+
U("AppLogoPicker", k), W("AppLogoPicker", "size", typeof w == "string" ? w : null, Object.keys(An));
|
|
3409
3475
|
let j = d(null), M = s(), [N, P] = f(null), [F, L] = f(""), [R, z] = f(!1), [ee, B] = f(!1);
|
|
3410
3476
|
o(() => () => N && URL.revokeObjectURL(N), [N]), o(() => {
|
|
3411
3477
|
P(null), z(!1);
|
|
@@ -3431,7 +3497,7 @@ function wn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3431
3497
|
t && oe(t);
|
|
3432
3498
|
}, G = () => {
|
|
3433
3499
|
P(null), L(""), z(!1), j.current && (j.current.value = ""), i?.();
|
|
3434
|
-
}, le = typeof w == "number" ? w :
|
|
3500
|
+
}, le = typeof w == "number" ? w : An[w] ?? An.md, ue = Math.max(14, Math.round(le * .18)), de = Math.round(le * .5), fe = [
|
|
3435
3501
|
"set-uploader",
|
|
3436
3502
|
C === "avatar" ? "set-uploader--avatar" : "",
|
|
3437
3503
|
T === "rounded" ? "set-uploader--rounded" : T === "square" ? "set-uploader--square" : "",
|
|
@@ -3561,27 +3627,27 @@ function wn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3561
3627
|
}
|
|
3562
3628
|
//#endregion
|
|
3563
3629
|
//#region src/components/AppMeter.jsx
|
|
3564
|
-
var
|
|
3630
|
+
var Mn = [
|
|
3565
3631
|
"info",
|
|
3566
3632
|
"success",
|
|
3567
3633
|
"warning",
|
|
3568
3634
|
"danger",
|
|
3569
3635
|
"neutral"
|
|
3570
3636
|
];
|
|
3571
|
-
function
|
|
3637
|
+
function Nn(e, t, n) {
|
|
3572
3638
|
let r = n - t;
|
|
3573
3639
|
if (!(r > 0)) return 0;
|
|
3574
3640
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
3575
3641
|
return Number(i.toFixed(2));
|
|
3576
3642
|
}
|
|
3577
|
-
function
|
|
3643
|
+
function Pn(e, t, n, r, i) {
|
|
3578
3644
|
if (t == null && n == null) return i;
|
|
3579
3645
|
let a = "mid";
|
|
3580
3646
|
return t != null && e <= t ? a = "low" : n != null && e >= n && (a = "high"), r === "low" ? a === "low" ? "success" : a === "high" ? "danger" : "warning" : a === "high" ? "success" : a === "low" ? "danger" : "warning";
|
|
3581
3647
|
}
|
|
3582
|
-
function
|
|
3648
|
+
function Fn({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum: i = "high", low: a, high: o, size: s = "md", label: c, showLabel: l = !1, className: u = "", ...d }) {
|
|
3583
3649
|
U("AppMeter", d);
|
|
3584
|
-
let f =
|
|
3650
|
+
let f = Pn(e, a, o, i, Mn.includes(r) ? r : "info"), p = Nn(e, t, n);
|
|
3585
3651
|
return /* @__PURE__ */ E("div", {
|
|
3586
3652
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
3587
3653
|
role: "meter",
|
|
@@ -3599,20 +3665,20 @@ function On({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
3599
3665
|
}
|
|
3600
3666
|
//#endregion
|
|
3601
3667
|
//#region src/components/AppMultiSelect.jsx
|
|
3602
|
-
var
|
|
3668
|
+
var In = i(function({ values: e, onChange: t, options: n, placeholder: r = "Select…", searchPlaceholder: i = "Search…", searchable: a = !0, disabled: c = !1, icon: l, size: u, collapseChips: d = !1, allowCustom: f = !1, validateCustom: p, customPattern: m, customInvalidMessage: h, name: g, id: _, label: v, error: y, hint: b, required: x = !1, help: S, helpLabel: C = "More information", fieldClassName: w = "", ...T }, O) {
|
|
3603
3669
|
U("AppMultiSelect", T);
|
|
3604
3670
|
let k = s(), A = _ || k, { setRef: j, innerRef: M } = Q({
|
|
3605
3671
|
ref: O,
|
|
3606
3672
|
value: e,
|
|
3607
3673
|
onChange: t,
|
|
3608
|
-
readValue:
|
|
3609
|
-
writeValue:
|
|
3674
|
+
readValue: Ze,
|
|
3675
|
+
writeValue: Qe
|
|
3610
3676
|
});
|
|
3611
3677
|
return o(() => {
|
|
3612
3678
|
let e = M.current;
|
|
3613
3679
|
if (!e) return;
|
|
3614
3680
|
let t = n || [];
|
|
3615
|
-
|
|
3681
|
+
Xe(t, e.options) || (e.options = t);
|
|
3616
3682
|
}, [n, M]), o(() => {
|
|
3617
3683
|
let e = M.current;
|
|
3618
3684
|
e && (e.validateCustom = p ?? null);
|
|
@@ -3625,7 +3691,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3625
3691
|
children: [
|
|
3626
3692
|
v,
|
|
3627
3693
|
x && /* @__PURE__ */ E(Z, {}),
|
|
3628
|
-
S && /* @__PURE__ */ E(
|
|
3694
|
+
S && /* @__PURE__ */ E(Ke, {
|
|
3629
3695
|
label: C,
|
|
3630
3696
|
children: S
|
|
3631
3697
|
})
|
|
@@ -3662,7 +3728,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3662
3728
|
}) : null
|
|
3663
3729
|
]
|
|
3664
3730
|
});
|
|
3665
|
-
}),
|
|
3731
|
+
}), Ln = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", value: c, onChange: l, min: u, max: d, step: p = 1, precision: m = 0, unit: h, size: g = "md", id: _, name: v, className: b = "", fieldClassName: x = "", disabled: S = !1, ...C }, w) {
|
|
3666
3732
|
U("AppNumberInput", C);
|
|
3667
3733
|
let T = s(), O = _ || T, k = (e) => {
|
|
3668
3734
|
if (m === 0) return Math.round(e);
|
|
@@ -3767,7 +3833,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3767
3833
|
children: [
|
|
3768
3834
|
e,
|
|
3769
3835
|
t && /* @__PURE__ */ E(Z, {}),
|
|
3770
|
-
i && /* @__PURE__ */ E(
|
|
3836
|
+
i && /* @__PURE__ */ E(Ke, {
|
|
3771
3837
|
label: a,
|
|
3772
3838
|
children: i
|
|
3773
3839
|
})
|
|
@@ -3785,7 +3851,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3785
3851
|
}) : null
|
|
3786
3852
|
]
|
|
3787
3853
|
});
|
|
3788
|
-
}),
|
|
3854
|
+
}), Rn = i(function({ value: e, onChange: t, onComplete: n, length: r = 6, mode: i = "numeric", label: a, required: o = !1, hint: c, error: l, disabled: u = !1, name: d, id: f, className: p = "", fieldClassName: m = "", ...h }, g) {
|
|
3789
3855
|
U("AppOtpInput", h);
|
|
3790
3856
|
let _ = s(), v = f || _, y = l ? `${v}-error` : void 0, b = c ? `${v}-hint` : void 0, x = y || b, { setRef: S } = Q({
|
|
3791
3857
|
ref: g,
|
|
@@ -3830,7 +3896,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3830
3896
|
});
|
|
3831
3897
|
//#endregion
|
|
3832
3898
|
//#region src/components/AppPageHeader.jsx
|
|
3833
|
-
function
|
|
3899
|
+
function zn({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", status: a, breadcrumbs: o, actions: s, size: c = "md", align: l = "start", divider: u = !1, sticky: d = !1, className: f = "", ...p }) {
|
|
3834
3900
|
U("AppPageHeader", p);
|
|
3835
3901
|
let m = [
|
|
3836
3902
|
"page-header",
|
|
@@ -3889,9 +3955,9 @@ function Mn({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
3889
3955
|
}
|
|
3890
3956
|
//#endregion
|
|
3891
3957
|
//#region src/components/AppPagination.jsx
|
|
3892
|
-
function
|
|
3958
|
+
function Bn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
3893
3959
|
if (U("AppPagination", s), t <= 1) return null;
|
|
3894
|
-
let c =
|
|
3960
|
+
let c = Kt(e, t, { siblingCount: r });
|
|
3895
3961
|
return /* @__PURE__ */ E("nav", {
|
|
3896
3962
|
className: [
|
|
3897
3963
|
"pagination-nav",
|
|
@@ -3949,7 +4015,7 @@ function Nn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
3949
4015
|
}
|
|
3950
4016
|
//#endregion
|
|
3951
4017
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3952
|
-
var
|
|
4018
|
+
var Vn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name: i, id: a, label: o = "Phone number", placeholder: c, required: l = !1, error: u, showFlag: d = !0, showDialCode: f = !0, size: p = "md", fieldClassName: m = "", ...h }, g) {
|
|
3953
4019
|
U("AppPhoneNumberInput", h);
|
|
3954
4020
|
let _ = s(), v = a || _, y = u && v ? `${v}-error` : void 0, { setRef: b } = Q({
|
|
3955
4021
|
ref: g,
|
|
@@ -3990,7 +4056,7 @@ var Pn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
3990
4056
|
});
|
|
3991
4057
|
//#endregion
|
|
3992
4058
|
//#region src/components/AppPricingCard.jsx
|
|
3993
|
-
function
|
|
4059
|
+
function Hn({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a, featured: o = !1, current: s = !1, badge: c = "Most popular", className: l = "", ...u }) {
|
|
3994
4060
|
return U("AppPricingCard", u), /* @__PURE__ */ D("div", {
|
|
3995
4061
|
className: [
|
|
3996
4062
|
"plan-card",
|
|
@@ -4044,21 +4110,21 @@ function Fn({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
4044
4110
|
}
|
|
4045
4111
|
//#endregion
|
|
4046
4112
|
//#region src/components/AppProgress.jsx
|
|
4047
|
-
var
|
|
4113
|
+
var Un = [
|
|
4048
4114
|
"info",
|
|
4049
4115
|
"success",
|
|
4050
4116
|
"warning",
|
|
4051
4117
|
"danger",
|
|
4052
4118
|
"neutral"
|
|
4053
4119
|
];
|
|
4054
|
-
function
|
|
4120
|
+
function Wn(e, t) {
|
|
4055
4121
|
if (!(t > 0)) return 0;
|
|
4056
4122
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
4057
4123
|
return Number(n.toFixed(2));
|
|
4058
4124
|
}
|
|
4059
|
-
function
|
|
4125
|
+
function Gn({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", label: i, showLabel: a = !1, striped: o = !1, animated: s = !1, indeterminate: c = !1, className: l = "", ...u }) {
|
|
4060
4126
|
U("AppProgress", u);
|
|
4061
|
-
let d =
|
|
4127
|
+
let d = Un.includes(n) ? n : "info", f = Wn(e, t), p = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, m = [
|
|
4062
4128
|
"progress-bar",
|
|
4063
4129
|
`wui-progress-${d}`,
|
|
4064
4130
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -4082,8 +4148,8 @@ function Rn({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
4082
4148
|
}
|
|
4083
4149
|
//#endregion
|
|
4084
4150
|
//#region src/components/AppRadio.jsx
|
|
4085
|
-
var
|
|
4086
|
-
return U("AppRadio", o), /* @__PURE__ */ E(
|
|
4151
|
+
var Kn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a = "", ...o }, s) {
|
|
4152
|
+
return U("AppRadio", o), /* @__PURE__ */ E(_t, {
|
|
4087
4153
|
ref: s,
|
|
4088
4154
|
label: e,
|
|
4089
4155
|
id: t,
|
|
@@ -4098,27 +4164,27 @@ var zn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
4098
4164
|
});
|
|
4099
4165
|
//#endregion
|
|
4100
4166
|
//#region src/components/AppRepeater.jsx
|
|
4101
|
-
function
|
|
4102
|
-
U("AppRepeater",
|
|
4103
|
-
let
|
|
4167
|
+
function qn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, addLabel: a = "Add another", addVariant: o = "secondary", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
|
|
4168
|
+
U("AppRepeater", p);
|
|
4169
|
+
let m = typeof u == "number" && e.length >= u, h = !!i && e.length > l;
|
|
4104
4170
|
return /* @__PURE__ */ D("div", {
|
|
4105
|
-
className: `repeater${
|
|
4106
|
-
...
|
|
4171
|
+
className: `repeater${f ? ` ${f}` : ""}`,
|
|
4172
|
+
...p,
|
|
4107
4173
|
children: [
|
|
4108
|
-
e.length === 0 &&
|
|
4174
|
+
e.length === 0 && c && /* @__PURE__ */ E("div", {
|
|
4109
4175
|
className: "repeater-empty",
|
|
4110
|
-
children:
|
|
4176
|
+
children: c
|
|
4111
4177
|
}),
|
|
4112
4178
|
e.map((e, r) => {
|
|
4113
4179
|
let a = n ? n(e, r) : null;
|
|
4114
4180
|
return /* @__PURE__ */ D("div", {
|
|
4115
4181
|
className: "repeater-row",
|
|
4116
4182
|
children: [
|
|
4117
|
-
(!!a ||
|
|
4183
|
+
(!!a || h) && /* @__PURE__ */ E("span", {
|
|
4118
4184
|
className: "repeater-row-label",
|
|
4119
4185
|
children: a
|
|
4120
4186
|
}),
|
|
4121
|
-
|
|
4187
|
+
d && /* @__PURE__ */ E("span", {
|
|
4122
4188
|
className: "repeater-index",
|
|
4123
4189
|
children: r + 1
|
|
4124
4190
|
}),
|
|
@@ -4126,9 +4192,9 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4126
4192
|
className: "repeater-body",
|
|
4127
4193
|
children: t(e, r)
|
|
4128
4194
|
}),
|
|
4129
|
-
|
|
4195
|
+
h && /* @__PURE__ */ E(Ae, {
|
|
4130
4196
|
icon: "trash-2",
|
|
4131
|
-
label: `${
|
|
4197
|
+
label: `${s} ${r + 1}`,
|
|
4132
4198
|
danger: !0,
|
|
4133
4199
|
className: "repeater-remove",
|
|
4134
4200
|
onClick: () => i(r)
|
|
@@ -4136,12 +4202,12 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4136
4202
|
]
|
|
4137
4203
|
}, e.id ?? r);
|
|
4138
4204
|
}),
|
|
4139
|
-
/* @__PURE__ */ E(
|
|
4140
|
-
variant:
|
|
4205
|
+
/* @__PURE__ */ E(ze, {
|
|
4206
|
+
variant: o,
|
|
4141
4207
|
size: "sm",
|
|
4142
4208
|
leftIcon: "plus",
|
|
4143
4209
|
className: "repeater-add",
|
|
4144
|
-
disabled:
|
|
4210
|
+
disabled: m,
|
|
4145
4211
|
onClick: r,
|
|
4146
4212
|
children: a
|
|
4147
4213
|
})
|
|
@@ -4150,7 +4216,7 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4150
4216
|
}
|
|
4151
4217
|
//#endregion
|
|
4152
4218
|
//#region src/components/AppResourceCard.jsx
|
|
4153
|
-
function
|
|
4219
|
+
function Jn({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
4154
4220
|
U("AppResourceCard", s);
|
|
4155
4221
|
let c = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
4156
4222
|
className: "res-card-icon",
|
|
@@ -4184,7 +4250,7 @@ function Vn({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
4184
4250
|
}
|
|
4185
4251
|
//#endregion
|
|
4186
4252
|
//#region src/components/AppResult.jsx
|
|
4187
|
-
var
|
|
4253
|
+
var Yn = {
|
|
4188
4254
|
success: {
|
|
4189
4255
|
icon: "check-circle",
|
|
4190
4256
|
tone: "success"
|
|
@@ -4205,9 +4271,9 @@ var Hn = {
|
|
|
4205
4271
|
404: { tone: "muted" },
|
|
4206
4272
|
500: { tone: "muted" }
|
|
4207
4273
|
};
|
|
4208
|
-
function
|
|
4209
|
-
U("AppResult", s), W("AppResult", "status", e, Object.keys(
|
|
4210
|
-
let c =
|
|
4274
|
+
function Xn({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, children: a, className: o = "", ...s }) {
|
|
4275
|
+
U("AppResult", s), W("AppResult", "status", e, Object.keys(Yn));
|
|
4276
|
+
let c = Yn[e] || Yn.info, l = c.tone, u = /^\d+$/.test(e), d = r ?? (u ? null : c.icon);
|
|
4211
4277
|
return /* @__PURE__ */ D("div", {
|
|
4212
4278
|
className: [
|
|
4213
4279
|
"result",
|
|
@@ -4245,7 +4311,7 @@ function Un({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
4245
4311
|
}
|
|
4246
4312
|
//#endregion
|
|
4247
4313
|
//#region src/components/AppScrollbar.jsx
|
|
4248
|
-
function
|
|
4314
|
+
function Zn({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
4249
4315
|
return U("AppScrollbar", i), /* @__PURE__ */ E("div", {
|
|
4250
4316
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
4251
4317
|
style: n == null ? r : {
|
|
@@ -4258,7 +4324,7 @@ function Wn({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
4258
4324
|
}
|
|
4259
4325
|
//#endregion
|
|
4260
4326
|
//#region src/components/AppSearch.jsx
|
|
4261
|
-
function
|
|
4327
|
+
function Qn({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search…", ariaLabel: i, iconSize: a = 18, size: o, loading: s = !1, disabled: c = !1, className: l = "", ...u }) {
|
|
4262
4328
|
U("AppSearch", u);
|
|
4263
4329
|
let d = t || n;
|
|
4264
4330
|
return /* @__PURE__ */ D("div", {
|
|
@@ -4305,7 +4371,7 @@ function Gn({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
4305
4371
|
}
|
|
4306
4372
|
//#endregion
|
|
4307
4373
|
//#region src/components/AppSegmented.jsx
|
|
4308
|
-
function
|
|
4374
|
+
function $n({ options: e = [], value: t, onChange: n, label: r, name: i, size: a = "md", fullWidth: c = !1, disabled: u = !1, className: f = "", ...p }) {
|
|
4309
4375
|
U("AppSegmented", p);
|
|
4310
4376
|
let m = s(), h = i || m, g = d(null), _ = d(null), v = [
|
|
4311
4377
|
"segmented",
|
|
@@ -4379,80 +4445,93 @@ function Kn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4379
4445
|
}
|
|
4380
4446
|
//#endregion
|
|
4381
4447
|
//#region src/components/AppSelect.jsx
|
|
4382
|
-
var
|
|
4383
|
-
U("AppSelect",
|
|
4384
|
-
let
|
|
4385
|
-
ref:
|
|
4448
|
+
var er = (e) => e == null ? "" : e.label ?? e.text ?? "", tr = i(function({ value: e, onChange: t, options: n = [], placeholder: r = "Select...", searchPlaceholder: i = "Search...", searchable: a = !1, clearable: c = !1, size: l, icon: u, prefix: d, suffix: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": O, "aria-describedby": k, ...A }, j) {
|
|
4449
|
+
U("AppSelect", A);
|
|
4450
|
+
let M = s(), { setRef: N, innerRef: P } = Q({
|
|
4451
|
+
ref: j,
|
|
4386
4452
|
value: e ?? "",
|
|
4387
4453
|
onChange: t
|
|
4388
4454
|
});
|
|
4389
4455
|
o(() => {
|
|
4390
|
-
let e =
|
|
4456
|
+
let e = P.current;
|
|
4391
4457
|
if (!e) return;
|
|
4392
4458
|
let t = n.map((e) => ({
|
|
4393
4459
|
value: e.value,
|
|
4394
|
-
label:
|
|
4460
|
+
label: er(e),
|
|
4395
4461
|
icon: e.icon
|
|
4396
4462
|
}));
|
|
4397
|
-
|
|
4398
|
-
}, [n,
|
|
4399
|
-
let
|
|
4400
|
-
"aria-label":
|
|
4401
|
-
"aria-labelledby":
|
|
4402
|
-
"aria-describedby":
|
|
4403
|
-
"aria-invalid":
|
|
4404
|
-
ref:
|
|
4405
|
-
id:
|
|
4406
|
-
name:
|
|
4407
|
-
placeholder:
|
|
4463
|
+
Xe(t, e.options) || (e.options = t);
|
|
4464
|
+
}, [n, P]);
|
|
4465
|
+
let F = x || M, I = p && h, L = _ && F ? `${F}-error` : void 0, R = v && F ? `${F}-hint` : void 0, z = /* @__PURE__ */ E("wui-select", {
|
|
4466
|
+
"aria-label": T || (typeof h == "string" ? h : void 0),
|
|
4467
|
+
"aria-labelledby": O || void 0,
|
|
4468
|
+
"aria-describedby": L || R || k || void 0,
|
|
4469
|
+
"aria-invalid": _ ? "true" : void 0,
|
|
4470
|
+
ref: N,
|
|
4471
|
+
id: F,
|
|
4472
|
+
name: S,
|
|
4473
|
+
placeholder: p && h ? " " : r,
|
|
4408
4474
|
"search-placeholder": i,
|
|
4409
4475
|
searchable: a ? "" : void 0,
|
|
4410
4476
|
clearable: c ? "" : void 0,
|
|
4411
4477
|
size: l || void 0,
|
|
4412
4478
|
icon: u || void 0,
|
|
4413
|
-
disabled:
|
|
4414
|
-
required:
|
|
4415
|
-
className:
|
|
4416
|
-
...
|
|
4417
|
-
})
|
|
4418
|
-
|
|
4419
|
-
|
|
4479
|
+
disabled: m ? "" : void 0,
|
|
4480
|
+
required: g ? "" : void 0,
|
|
4481
|
+
className: C || void 0,
|
|
4482
|
+
...A
|
|
4483
|
+
}), ee = !I && (d != null || f != null) ? /* @__PURE__ */ D("div", {
|
|
4484
|
+
className: "input-affixed",
|
|
4485
|
+
children: [
|
|
4486
|
+
d != null && /* @__PURE__ */ E("span", {
|
|
4487
|
+
className: "affix affix-pre",
|
|
4488
|
+
children: d
|
|
4489
|
+
}),
|
|
4490
|
+
z,
|
|
4491
|
+
f != null && /* @__PURE__ */ E("span", {
|
|
4492
|
+
className: "affix affix-suf",
|
|
4493
|
+
children: f
|
|
4494
|
+
})
|
|
4495
|
+
]
|
|
4496
|
+
}) : z;
|
|
4497
|
+
return !h && !_ && !v ? ee : /* @__PURE__ */ D("div", {
|
|
4498
|
+
className: ["field", w].filter(Boolean).join(" "),
|
|
4420
4499
|
children: [
|
|
4421
|
-
|
|
4500
|
+
h && !I && /* @__PURE__ */ D("label", {
|
|
4422
4501
|
className: "label",
|
|
4423
|
-
htmlFor:
|
|
4502
|
+
htmlFor: F,
|
|
4424
4503
|
children: [
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
label:
|
|
4429
|
-
children:
|
|
4504
|
+
h,
|
|
4505
|
+
g && /* @__PURE__ */ E(Z, {}),
|
|
4506
|
+
y && /* @__PURE__ */ E(Ke, {
|
|
4507
|
+
label: b,
|
|
4508
|
+
children: y
|
|
4430
4509
|
})
|
|
4431
4510
|
]
|
|
4432
4511
|
}),
|
|
4433
|
-
|
|
4512
|
+
I ? /* @__PURE__ */ D("div", {
|
|
4434
4513
|
className: "field-float",
|
|
4435
|
-
children: [
|
|
4514
|
+
children: [z, /* @__PURE__ */ D("label", {
|
|
4436
4515
|
className: "float-label",
|
|
4437
|
-
htmlFor:
|
|
4438
|
-
children: [
|
|
4516
|
+
htmlFor: F,
|
|
4517
|
+
children: [h, g && /* @__PURE__ */ E(Z, {})]
|
|
4439
4518
|
})]
|
|
4440
|
-
}) :
|
|
4441
|
-
|
|
4519
|
+
}) : ee,
|
|
4520
|
+
_ ? /* @__PURE__ */ E("div", {
|
|
4442
4521
|
className: "field-error",
|
|
4443
|
-
id:
|
|
4444
|
-
children:
|
|
4445
|
-
}) :
|
|
4522
|
+
id: L,
|
|
4523
|
+
children: _
|
|
4524
|
+
}) : v ? /* @__PURE__ */ E("div", {
|
|
4446
4525
|
className: "field-hint",
|
|
4447
|
-
id:
|
|
4448
|
-
children:
|
|
4526
|
+
id: R,
|
|
4527
|
+
children: v
|
|
4449
4528
|
}) : null
|
|
4450
4529
|
]
|
|
4451
4530
|
});
|
|
4452
4531
|
});
|
|
4453
4532
|
//#endregion
|
|
4454
4533
|
//#region src/components/AppShell.jsx
|
|
4455
|
-
function
|
|
4534
|
+
function nr({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r, sidebarFooter: i, topbarStart: a, topbarEnd: s, footer: c, children: l, collapsed: u, onCollapsedChange: d, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
|
|
4456
4535
|
U("AppShell", _);
|
|
4457
4536
|
let [v, y] = f(!1), [b, x] = f(!1), [S, C] = f(!1), w = u ?? v, T = () => {
|
|
4458
4537
|
let e = !w;
|
|
@@ -4500,7 +4579,7 @@ function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4500
4579
|
children: [e.label && /* @__PURE__ */ E("div", {
|
|
4501
4580
|
className: "app-nav-group-label",
|
|
4502
4581
|
children: e.label
|
|
4503
|
-
}), e.items.map((e) => /* @__PURE__ */ E(
|
|
4582
|
+
}), e.items.map((e) => /* @__PURE__ */ E(rr, {
|
|
4504
4583
|
item: e,
|
|
4505
4584
|
linkComponent: h,
|
|
4506
4585
|
onNavigate: () => x(!1)
|
|
@@ -4567,7 +4646,7 @@ function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4567
4646
|
]
|
|
4568
4647
|
});
|
|
4569
4648
|
}
|
|
4570
|
-
function
|
|
4649
|
+
function rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
4571
4650
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = f(a);
|
|
4572
4651
|
o(() => {
|
|
4573
4652
|
a && !s && c(!0);
|
|
@@ -4609,7 +4688,7 @@ function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4609
4688
|
"aria-hidden": !s || void 0,
|
|
4610
4689
|
children: /* @__PURE__ */ E("div", {
|
|
4611
4690
|
className: "app-nav-sub-inner",
|
|
4612
|
-
children: e.children.map((e) => /* @__PURE__ */ E(
|
|
4691
|
+
children: e.children.map((e) => /* @__PURE__ */ E(rr, {
|
|
4613
4692
|
item: e,
|
|
4614
4693
|
linkComponent: t,
|
|
4615
4694
|
onNavigate: n,
|
|
@@ -4650,7 +4729,7 @@ function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4650
4729
|
}
|
|
4651
4730
|
//#endregion
|
|
4652
4731
|
//#region src/components/AppSidebarMenu.jsx
|
|
4653
|
-
var
|
|
4732
|
+
var ir = {
|
|
4654
4733
|
left: "start",
|
|
4655
4734
|
right: "end",
|
|
4656
4735
|
start: "start",
|
|
@@ -4658,9 +4737,9 @@ var Zn = {
|
|
|
4658
4737
|
top: "top",
|
|
4659
4738
|
bottom: "bottom"
|
|
4660
4739
|
};
|
|
4661
|
-
function
|
|
4662
|
-
U("AppSidebarMenu", v), W("AppSidebarMenu", "side", n, Object.keys(
|
|
4663
|
-
let { style: y, ...b } = v, S =
|
|
4740
|
+
function ar({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, header: a, children: o, footer: s, width: c, maxWidth: l, backdrop: u = !0, scroll: d = !1, keyboard: f = !0, closeButton: p = !0, responsive: m, className: h = "", bodyClassName: g = "", ariaLabel: _, ...v }) {
|
|
4741
|
+
U("AppSidebarMenu", v), W("AppSidebarMenu", "side", n, Object.keys(ir));
|
|
4742
|
+
let { style: y, ...b } = v, S = ir[n] || "end", C = c || l || y ? {
|
|
4664
4743
|
...c && { "--asm-width": c },
|
|
4665
4744
|
...l && { "--asm-max-width": l },
|
|
4666
4745
|
...y
|
|
@@ -4689,7 +4768,7 @@ function Qn({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
4689
4768
|
size: 18
|
|
4690
4769
|
})
|
|
4691
4770
|
}), r]
|
|
4692
|
-
}), p && /* @__PURE__ */ E(
|
|
4771
|
+
}), p && /* @__PURE__ */ E(ze, {
|
|
4693
4772
|
variant: "ghost",
|
|
4694
4773
|
className: "btn-icon",
|
|
4695
4774
|
onClick: t,
|
|
@@ -4713,14 +4792,14 @@ function Qn({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
4713
4792
|
}
|
|
4714
4793
|
//#endregion
|
|
4715
4794
|
//#region src/components/AppSlider.jsx
|
|
4716
|
-
var
|
|
4795
|
+
var or = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, label: a, required: c = !1, hint: l, error: u, name: d, startName: f, endName: p, min: m = 0, max: h = 100, step: g = 1, disabled: _, size: v, showValue: y, unit: b, id: x, ariaLabel: S, className: C = "", fieldClassName: w = "", ...T }, O) {
|
|
4717
4796
|
U("AppSlider", T);
|
|
4718
4797
|
let k = s(), A = x || k, j = r, { setRef: M, innerRef: N } = Q({
|
|
4719
4798
|
ref: O,
|
|
4720
4799
|
value: j ? void 0 : e,
|
|
4721
4800
|
onChange: i,
|
|
4722
|
-
readValue: j ?
|
|
4723
|
-
writeValue: j ? void 0 :
|
|
4801
|
+
readValue: j ? $e : void 0,
|
|
4802
|
+
writeValue: j ? void 0 : et
|
|
4724
4803
|
});
|
|
4725
4804
|
o(() => {
|
|
4726
4805
|
if (!j) return;
|
|
@@ -4774,14 +4853,14 @@ var $n = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
4774
4853
|
})
|
|
4775
4854
|
]
|
|
4776
4855
|
});
|
|
4777
|
-
}),
|
|
4856
|
+
}), sr = {
|
|
4778
4857
|
sm: 44,
|
|
4779
4858
|
md: 56,
|
|
4780
4859
|
lg: 72
|
|
4781
4860
|
};
|
|
4782
|
-
function
|
|
4783
|
-
U("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(
|
|
4784
|
-
let { style: l, ...u } = c, d = typeof a == "number" ? a :
|
|
4861
|
+
function cr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", size: a = "md", label: o = "Loading", className: s = "", ...c }) {
|
|
4862
|
+
U("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(sr));
|
|
4863
|
+
let { style: l, ...u } = c, d = typeof a == "number" ? a : sr[a] ?? sr.md, f = i === "ring" ? /* @__PURE__ */ E("span", {
|
|
4785
4864
|
className: "splash-ring",
|
|
4786
4865
|
"aria-hidden": "true"
|
|
4787
4866
|
}) : i === "dots" ? /* @__PURE__ */ D("span", {
|
|
@@ -4828,7 +4907,7 @@ function tr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
4828
4907
|
}
|
|
4829
4908
|
//#endregion
|
|
4830
4909
|
//#region src/components/AppStatusBadge.jsx
|
|
4831
|
-
function
|
|
4910
|
+
function lr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tooltipPlacement: i, ...a }) {
|
|
4832
4911
|
return U("AppStatusBadge", a), e == null || e === "" ? "-" : K(/* @__PURE__ */ E("span", {
|
|
4833
4912
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
4834
4913
|
...a,
|
|
@@ -4837,7 +4916,7 @@ function nr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tool
|
|
|
4837
4916
|
}
|
|
4838
4917
|
//#endregion
|
|
4839
4918
|
//#region src/components/AppStepper.jsx
|
|
4840
|
-
function
|
|
4919
|
+
function ur({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4841
4920
|
U("AppStepper", c);
|
|
4842
4921
|
let l = t === "journey";
|
|
4843
4922
|
return /* @__PURE__ */ E("nav", {
|
|
@@ -4850,7 +4929,7 @@ function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4850
4929
|
"aria-label": a,
|
|
4851
4930
|
...c,
|
|
4852
4931
|
children: e.map((t, n) => {
|
|
4853
|
-
let a = t.status ||
|
|
4932
|
+
let a = t.status || dr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
4854
4933
|
c = a === "done" ? /* @__PURE__ */ E(Y, {
|
|
4855
4934
|
name: "check",
|
|
4856
4935
|
size: 14
|
|
@@ -4914,13 +4993,13 @@ function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4914
4993
|
})
|
|
4915
4994
|
});
|
|
4916
4995
|
}
|
|
4917
|
-
function
|
|
4996
|
+
function dr(e, t) {
|
|
4918
4997
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
4919
4998
|
}
|
|
4920
4999
|
//#endregion
|
|
4921
5000
|
//#region src/components/AppSwitch.jsx
|
|
4922
|
-
var
|
|
4923
|
-
return U("AppSwitch", s), /* @__PURE__ */ E(
|
|
5001
|
+
var fr = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "pill", className: o = "", ...s }, c) {
|
|
5002
|
+
return U("AppSwitch", s), /* @__PURE__ */ E(_t, {
|
|
4924
5003
|
ref: c,
|
|
4925
5004
|
label: e,
|
|
4926
5005
|
id: t,
|
|
@@ -4935,7 +5014,7 @@ var ar = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
4935
5014
|
});
|
|
4936
5015
|
//#endregion
|
|
4937
5016
|
//#region src/components/AppTableEmptyState.jsx
|
|
4938
|
-
function
|
|
5017
|
+
function pr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
4939
5018
|
return U("AppTableEmptyState", i), /* @__PURE__ */ D("div", {
|
|
4940
5019
|
className: "tbl-empty",
|
|
4941
5020
|
...i,
|
|
@@ -4961,8 +5040,8 @@ function or({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
4961
5040
|
}
|
|
4962
5041
|
//#endregion
|
|
4963
5042
|
//#region src/components/AppTabs.jsx
|
|
4964
|
-
var
|
|
4965
|
-
function
|
|
5043
|
+
var mr = 1, hr = 28, gr = .7;
|
|
5044
|
+
function _r({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "underline", orientation: s = "horizontal", size: c = "md", fitted: u = !1, activation: p = "automatic", ariaLabel: m, className: h = "", style: g, ..._ }) {
|
|
4966
5045
|
U("AppTabs", _);
|
|
4967
5046
|
let v = d(null), y = d(null), b = s === "vertical", [x, S] = f(t);
|
|
4968
5047
|
o(() => {
|
|
@@ -4974,7 +5053,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
4974
5053
|
let e = v.current, t = y.current;
|
|
4975
5054
|
if (!e || !t || b) return;
|
|
4976
5055
|
let n = e.scrollWidth - e.clientWidth;
|
|
4977
|
-
t.classList.toggle("is-overflow-start", e.scrollLeft >
|
|
5056
|
+
t.classList.toggle("is-overflow-start", e.scrollLeft > mr), t.classList.toggle("is-overflow-end", n > mr && e.scrollLeft < n - mr);
|
|
4978
5057
|
}, [b]), M = a(() => {
|
|
4979
5058
|
let n = v.current;
|
|
4980
5059
|
if (!n) return;
|
|
@@ -4990,7 +5069,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
4990
5069
|
if (!e || b) return;
|
|
4991
5070
|
let t = e.querySelector(".app-tab.active");
|
|
4992
5071
|
if (!t) return;
|
|
4993
|
-
let n =
|
|
5072
|
+
let n = hr, r = t.offsetLeft, i = r + t.offsetWidth;
|
|
4994
5073
|
r - n < e.scrollLeft ? e.scrollLeft = Math.max(0, r - n) : i + n > e.scrollLeft + e.clientWidth && (e.scrollLeft = i + n - e.clientWidth);
|
|
4995
5074
|
}, [b]);
|
|
4996
5075
|
l(() => {
|
|
@@ -5025,7 +5104,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5025
5104
|
}
|
|
5026
5105
|
let I = (e) => {
|
|
5027
5106
|
let t = v.current;
|
|
5028
|
-
t && t.scrollBy({ left: e * t.clientWidth *
|
|
5107
|
+
t && t.scrollBy({ left: e * t.clientWidth * gr });
|
|
5029
5108
|
}, L = [
|
|
5030
5109
|
"app-tabs",
|
|
5031
5110
|
i === "pills" ? "app-tabs-pills" : "",
|
|
@@ -5138,14 +5217,14 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5138
5217
|
}
|
|
5139
5218
|
//#endregion
|
|
5140
5219
|
//#region src/components/AppTagInput.jsx
|
|
5141
|
-
var
|
|
5220
|
+
var vr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r, label: i, error: a, hint: o, required: c = !1, size: l, maxTags: u, allowDuplicates: d = !1, disabled: f = !1, id: p, ariaLabel: m, className: h = "", fieldClassName: g = "", help: _, helpLabel: v = "More information", ...y }, b) {
|
|
5142
5221
|
U("AppTagInput", y);
|
|
5143
5222
|
let x = s(), S = p || x, { setRef: C } = Q({
|
|
5144
5223
|
ref: b,
|
|
5145
5224
|
value: e,
|
|
5146
5225
|
onChange: t,
|
|
5147
|
-
readValue:
|
|
5148
|
-
writeValue:
|
|
5226
|
+
readValue: Ze,
|
|
5227
|
+
writeValue: Qe
|
|
5149
5228
|
});
|
|
5150
5229
|
return /* @__PURE__ */ D("div", {
|
|
5151
5230
|
className: `field${g ? ` ${g}` : ""}`,
|
|
@@ -5156,7 +5235,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5156
5235
|
children: [
|
|
5157
5236
|
i,
|
|
5158
5237
|
c && /* @__PURE__ */ E(Z, {}),
|
|
5159
|
-
_ && /* @__PURE__ */ E(
|
|
5238
|
+
_ && /* @__PURE__ */ E(Ke, {
|
|
5160
5239
|
label: v,
|
|
5161
5240
|
children: _
|
|
5162
5241
|
})
|
|
@@ -5189,7 +5268,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5189
5268
|
}) : null
|
|
5190
5269
|
]
|
|
5191
5270
|
});
|
|
5192
|
-
}),
|
|
5271
|
+
}), yr = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: c = "More information", id: u, name: p, rows: m = 4, autoGrow: h = !1, showCount: g = !1, maxLength: _, className: v = "", fieldClassName: b = "", ...x }, S) {
|
|
5193
5272
|
U("AppTextarea", x);
|
|
5194
5273
|
let C = s(), w = u || C, T = [
|
|
5195
5274
|
"textarea",
|
|
@@ -5225,7 +5304,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5225
5304
|
children: [
|
|
5226
5305
|
e,
|
|
5227
5306
|
t && /* @__PURE__ */ E(Z, {}),
|
|
5228
|
-
i && /* @__PURE__ */ E(
|
|
5307
|
+
i && /* @__PURE__ */ E(Ke, {
|
|
5229
5308
|
label: c,
|
|
5230
5309
|
children: i
|
|
5231
5310
|
})
|
|
@@ -5260,7 +5339,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5260
5339
|
})
|
|
5261
5340
|
]
|
|
5262
5341
|
});
|
|
5263
|
-
}),
|
|
5342
|
+
}), br = {
|
|
5264
5343
|
done: "check",
|
|
5265
5344
|
current: "clock",
|
|
5266
5345
|
"on-hold": "lock",
|
|
@@ -5269,7 +5348,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5269
5348
|
skipped: "arrow-right",
|
|
5270
5349
|
upcoming: null
|
|
5271
5350
|
};
|
|
5272
|
-
function
|
|
5351
|
+
function xr({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
5273
5352
|
U("AppTimeline", o);
|
|
5274
5353
|
let s = t === "progress", c = `timeline${s ? " timeline--progress" : ""}${n === "horizontal" ? " timeline--horizontal" : ""}${i ? ` ${i}` : ""}`, l = typeof r == "number" && r > 0 ? r : void 0, u = l ? Math.round(l * .54) : s ? 13 : 12;
|
|
5275
5354
|
return /* @__PURE__ */ E("ol", {
|
|
@@ -5280,7 +5359,7 @@ function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5280
5359
|
} : a,
|
|
5281
5360
|
...o,
|
|
5282
5361
|
children: e.map((e, t) => {
|
|
5283
|
-
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ?
|
|
5362
|
+
let n = s ? e.status : void 0, r = n ? ` is-${n}` : "", i = e.tone && e.tone !== "neutral" ? ` ${e.tone}` : "", a = s ? e.icon ?? (n ? br[n] : void 0) : e.icon || "circle";
|
|
5284
5363
|
return /* @__PURE__ */ D("li", {
|
|
5285
5364
|
className: `timeline-item${r}${i}`,
|
|
5286
5365
|
children: [/* @__PURE__ */ E("span", {
|
|
@@ -5350,7 +5429,7 @@ function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5350
5429
|
}
|
|
5351
5430
|
//#endregion
|
|
5352
5431
|
//#region src/components/AppTimePicker.jsx
|
|
5353
|
-
var
|
|
5432
|
+
var Sr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i, error: a, name: o, min: c, max: l, step: u, format: d = "24", placeholder: f = "Select time", disabled: p, size: m, id: h, ariaLabel: g, className: _ = "", fieldClassName: v = "", ...y }, b) {
|
|
5354
5433
|
U("AppTimePicker", y);
|
|
5355
5434
|
let x = s(), S = h || o || x, { setRef: C } = Q({
|
|
5356
5435
|
ref: b,
|
|
@@ -5395,35 +5474,35 @@ var hr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
5395
5474
|
})
|
|
5396
5475
|
]
|
|
5397
5476
|
});
|
|
5398
|
-
}),
|
|
5399
|
-
function
|
|
5400
|
-
for (let e of
|
|
5477
|
+
}), Cr = 6, $ = [], wr = /* @__PURE__ */ new Set(), Tr = /* @__PURE__ */ new Map(), Er = /* @__PURE__ */ new Set(), Dr = 0;
|
|
5478
|
+
function Or() {
|
|
5479
|
+
for (let e of wr) e($);
|
|
5401
5480
|
}
|
|
5402
|
-
function
|
|
5403
|
-
let t =
|
|
5404
|
-
t !== void 0 && (clearTimeout(t),
|
|
5481
|
+
function kr(e) {
|
|
5482
|
+
let t = Tr.get(e);
|
|
5483
|
+
t !== void 0 && (clearTimeout(t), Tr.delete(e));
|
|
5405
5484
|
}
|
|
5406
|
-
function
|
|
5407
|
-
if (e.length <=
|
|
5485
|
+
function Ar(e, t) {
|
|
5486
|
+
if (e.length <= Cr) return e;
|
|
5408
5487
|
let n = [...e], r = [];
|
|
5409
|
-
for (; n.length >
|
|
5488
|
+
for (; n.length > Cr;) {
|
|
5410
5489
|
let e = n.findIndex((e) => e.id !== t && e.duration !== 0);
|
|
5411
5490
|
r.push(n.splice(e === -1 ? n.findIndex((e) => e.id !== t) : e, 1)[0]);
|
|
5412
5491
|
}
|
|
5413
|
-
for (let e of r)
|
|
5492
|
+
for (let e of r) kr(e.id), Er.delete(e.id);
|
|
5414
5493
|
return n;
|
|
5415
5494
|
}
|
|
5416
|
-
function
|
|
5417
|
-
return
|
|
5418
|
-
if (
|
|
5495
|
+
function jr(e) {
|
|
5496
|
+
return wr.add(e), e($), () => {
|
|
5497
|
+
if (wr.delete(e), wr.size === 0) for (let e of $) e.duration > 0 && !Tr.has(e.id) && (Er.delete(e.id), Tr.set(e.id, setTimeout(() => Pr(e.id), e.duration)));
|
|
5419
5498
|
};
|
|
5420
5499
|
}
|
|
5421
|
-
function
|
|
5500
|
+
function Mr(e, t, n = {}) {
|
|
5422
5501
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
5423
5502
|
if (r) {
|
|
5424
5503
|
let i = $.find((e) => e.externalId === r);
|
|
5425
5504
|
if (i) {
|
|
5426
|
-
|
|
5505
|
+
kr(i.id);
|
|
5427
5506
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
5428
5507
|
$ = $.map((a) => a.id === i.id ? {
|
|
5429
5508
|
...a,
|
|
@@ -5436,12 +5515,12 @@ function Tr(e, t, n = {}) {
|
|
|
5436
5515
|
shape: n.shape,
|
|
5437
5516
|
surface: n.surface,
|
|
5438
5517
|
progress: n.progress
|
|
5439
|
-
} : a),
|
|
5518
|
+
} : a), Or(), r > 0 && !Er.has(i.id) && Tr.set(i.id, setTimeout(() => Pr(i.id), r));
|
|
5440
5519
|
return;
|
|
5441
5520
|
}
|
|
5442
5521
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
5443
|
-
let a = ++
|
|
5444
|
-
$ =
|
|
5522
|
+
let a = ++Dr, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
5523
|
+
$ = Ar([...$, {
|
|
5445
5524
|
id: a,
|
|
5446
5525
|
externalId: r,
|
|
5447
5526
|
message: e,
|
|
@@ -5454,25 +5533,25 @@ function Tr(e, t, n = {}) {
|
|
|
5454
5533
|
surface: n.surface,
|
|
5455
5534
|
progress: n.progress,
|
|
5456
5535
|
key: i
|
|
5457
|
-
}], a),
|
|
5536
|
+
}], a), Or(), o > 0 && Tr.set(a, setTimeout(() => Pr(a), o));
|
|
5458
5537
|
}
|
|
5459
|
-
function
|
|
5460
|
-
|
|
5538
|
+
function Nr(e) {
|
|
5539
|
+
kr(e), Er.add(e);
|
|
5461
5540
|
}
|
|
5462
|
-
function
|
|
5463
|
-
|
|
5541
|
+
function Pr(e) {
|
|
5542
|
+
kr(e), Er.delete(e);
|
|
5464
5543
|
let t = $.filter((t) => t.id !== e);
|
|
5465
|
-
t.length !== $.length && ($ = t,
|
|
5544
|
+
t.length !== $.length && ($ = t, Or());
|
|
5466
5545
|
}
|
|
5467
|
-
function
|
|
5468
|
-
if (!($.length === 0 &&
|
|
5469
|
-
for (let e of
|
|
5470
|
-
|
|
5546
|
+
function Fr() {
|
|
5547
|
+
if (!($.length === 0 && Tr.size === 0 && Er.size === 0)) {
|
|
5548
|
+
for (let e of Tr.values()) clearTimeout(e);
|
|
5549
|
+
Tr.clear(), Er.clear(), $.length !== 0 && ($ = [], Or());
|
|
5471
5550
|
}
|
|
5472
5551
|
}
|
|
5473
5552
|
//#endregion
|
|
5474
5553
|
//#region src/components/AppToast.jsx
|
|
5475
|
-
var
|
|
5554
|
+
var Ir = {
|
|
5476
5555
|
success: {
|
|
5477
5556
|
icon: "check-circle",
|
|
5478
5557
|
assertive: !1
|
|
@@ -5489,7 +5568,7 @@ var kr = {
|
|
|
5489
5568
|
icon: "alert-circle",
|
|
5490
5569
|
assertive: !0
|
|
5491
5570
|
}
|
|
5492
|
-
},
|
|
5571
|
+
}, Lr = {
|
|
5493
5572
|
"top-start": "top-0 start-0",
|
|
5494
5573
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
5495
5574
|
"top-end": "top-0 end-0",
|
|
@@ -5497,21 +5576,21 @@ var kr = {
|
|
|
5497
5576
|
"bottom-start": "bottom-0 start-0",
|
|
5498
5577
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
5499
5578
|
"bottom-end": "bottom-0 end-0"
|
|
5500
|
-
},
|
|
5579
|
+
}, Rr = 64, zr = /* @__PURE__ */ new Set([
|
|
5501
5580
|
"rise",
|
|
5502
5581
|
"organic",
|
|
5503
5582
|
"jelly",
|
|
5504
5583
|
"spring"
|
|
5505
|
-
]),
|
|
5584
|
+
]), Br = /* @__PURE__ */ new Set([
|
|
5506
5585
|
"rounded",
|
|
5507
5586
|
"pill",
|
|
5508
5587
|
"sharp"
|
|
5509
|
-
]),
|
|
5510
|
-
function
|
|
5511
|
-
U("AppToast", s), W("AppToast", "position", e, Object.keys(
|
|
5588
|
+
]), Vr = /* @__PURE__ */ new Set(["auto", "inverse"]);
|
|
5589
|
+
function Hr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "rise", shape: r = "rounded", surface: i = "auto", className: a = "", ...s }) {
|
|
5590
|
+
U("AppToast", s), W("AppToast", "position", e, Object.keys(Lr)), W("AppToast", "animation", n, zr), W("AppToast", "shape", r, Br), W("AppToast", "surface", i, Vr);
|
|
5512
5591
|
let [c, l] = f([]);
|
|
5513
|
-
o(() =>
|
|
5514
|
-
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p =
|
|
5592
|
+
o(() => jr(l), []);
|
|
5593
|
+
let u = Math.max(0, c.length - t), d = u ? c.slice(u) : c, p = Lr[e] ?? Lr["bottom-end"];
|
|
5515
5594
|
return /* @__PURE__ */ D("div", {
|
|
5516
5595
|
...s,
|
|
5517
5596
|
className: `wui-toast-container toast-container position-fixed ${p} p-3 ${a}`.trim(),
|
|
@@ -5523,7 +5602,7 @@ function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5523
5602
|
u,
|
|
5524
5603
|
" more"
|
|
5525
5604
|
]
|
|
5526
|
-
}), d.map((e) => /* @__PURE__ */ E(
|
|
5605
|
+
}), d.map((e) => /* @__PURE__ */ E(Ur, {
|
|
5527
5606
|
toast: e,
|
|
5528
5607
|
defaultAnimation: n,
|
|
5529
5608
|
defaultShape: r,
|
|
@@ -5531,14 +5610,14 @@ function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5531
5610
|
}, e.id))]
|
|
5532
5611
|
});
|
|
5533
5612
|
}
|
|
5534
|
-
function
|
|
5535
|
-
let i =
|
|
5613
|
+
function Ur({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded", defaultSurface: r = "auto" }) {
|
|
5614
|
+
let i = Ir[e.variant] ?? Ir.success, a = zr.has(e.animation) ? e.animation : t, s = Br.has(e.shape) ? e.shape : n, c = Vr.has(e.surface) ? e.surface : r, l = (a !== "rise" && zr.has(a) ? ` wui-toast--anim-${a}` : "") + (s !== "rounded" && Br.has(s) ? ` wui-toast--shape-${s}` : "") + (c === "inverse" ? " wui-toast--surface-inverse" : ""), u = e.duration === 0, [p, m] = f(0), [h, g] = f(!1), _ = d(null), v = () => Pr(e.id), y = d(null);
|
|
5536
5615
|
o(() => {
|
|
5537
5616
|
if (e.duration === 0) return;
|
|
5538
|
-
|
|
5617
|
+
Nr(e.id);
|
|
5539
5618
|
let t = y.current, n = t == null ? "" : getComputedStyle(t).animationName;
|
|
5540
5619
|
if (t != null && (typeof t.getAnimations == "function" ? t.getAnimations().length > 0 : n !== "" && n !== "none")) return;
|
|
5541
|
-
let r = setTimeout(() =>
|
|
5620
|
+
let r = setTimeout(() => Pr(e.id), e.duration);
|
|
5542
5621
|
return () => clearTimeout(r);
|
|
5543
5622
|
}, [e.id, e.duration]);
|
|
5544
5623
|
let b = (e) => {
|
|
@@ -5550,7 +5629,7 @@ function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5550
5629
|
}, C = (e) => {
|
|
5551
5630
|
if (_.current === null) return;
|
|
5552
5631
|
let t = e.clientX - _.current;
|
|
5553
|
-
if (Math.abs(t) >
|
|
5632
|
+
if (Math.abs(t) > Rr) {
|
|
5554
5633
|
v();
|
|
5555
5634
|
return;
|
|
5556
5635
|
}
|
|
@@ -5634,7 +5713,7 @@ function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5634
5713
|
}
|
|
5635
5714
|
//#endregion
|
|
5636
5715
|
//#region src/components/AppToolbar.jsx
|
|
5637
|
-
function
|
|
5716
|
+
function Wr({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
5638
5717
|
U("AppToolbar", u);
|
|
5639
5718
|
let d = s(), p = o || d, [m, h] = f(r), g = n === void 0 ? m : n;
|
|
5640
5719
|
return /* @__PURE__ */ D("div", {
|
|
@@ -5692,7 +5771,7 @@ function Lr({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
5692
5771
|
}
|
|
5693
5772
|
//#endregion
|
|
5694
5773
|
//#region src/components/AppWizard.jsx
|
|
5695
|
-
var
|
|
5774
|
+
var Gr = i(function({ steps: t = [], children: n, active: r, defaultActive: i = 0, onStepChange: a, onFinish: s, onSkip: c, beforeNext: l, onInvalid: u, variant: f = "steps", tone: p, orientation: m = "horizontal", skippable: h = !1, nonLinear: g = !1, hideStepper: _ = !1, disabled: v = !1, label: y = "Progress", backLabel: b = "Back", nextLabel: x = "Next", skipLabel: S = "Skip", finishLabel: C = "Finish", className: w = "", ...T }, D) {
|
|
5696
5775
|
U("AppWizard", T);
|
|
5697
5776
|
let O = d(null), k = (e) => {
|
|
5698
5777
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -5744,13 +5823,13 @@ var Rr = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
5744
5823
|
children: A[t]
|
|
5745
5824
|
}, e.key ?? `${e.label}-${t}`))
|
|
5746
5825
|
});
|
|
5747
|
-
}),
|
|
5826
|
+
}), Kr = /* @__PURE__ */ new Set([
|
|
5748
5827
|
"ArrowUp",
|
|
5749
5828
|
"ArrowDown",
|
|
5750
5829
|
"ArrowLeft",
|
|
5751
5830
|
"ArrowRight"
|
|
5752
5831
|
]);
|
|
5753
|
-
function
|
|
5832
|
+
function qr({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAction: i, linkComponent: a, searchable: s = !1, onCreate: c, canCreate: l = !1, createLabel: p = "Create workspace", compact: m = !1, size: h = "md", ariaLabel: g, ..._ }) {
|
|
5754
5833
|
let { onToggle: y, ...b } = _;
|
|
5755
5834
|
U("AppWorkspaceSwitcher", b);
|
|
5756
5835
|
let [x, S] = f(""), [C, w] = f(!1), T = d(null), O = (e, t) => {
|
|
@@ -5770,7 +5849,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5770
5849
|
let e = T.current;
|
|
5771
5850
|
if (!e) return;
|
|
5772
5851
|
let t = (e) => {
|
|
5773
|
-
if (
|
|
5852
|
+
if (Kr.has(e.key)) {
|
|
5774
5853
|
e.stopPropagation();
|
|
5775
5854
|
return;
|
|
5776
5855
|
}
|
|
@@ -5788,7 +5867,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5788
5867
|
onToggle: O,
|
|
5789
5868
|
...b,
|
|
5790
5869
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
5791
|
-
as:
|
|
5870
|
+
as: Zr,
|
|
5792
5871
|
compact: m,
|
|
5793
5872
|
tenant: k,
|
|
5794
5873
|
"aria-label": M
|
|
@@ -5823,7 +5902,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5823
5902
|
className: `workspace-switcher-option${e.id === k?.id ? " is-active" : ""}`,
|
|
5824
5903
|
onClick: () => n?.(e),
|
|
5825
5904
|
children: [
|
|
5826
|
-
/* @__PURE__ */ E(
|
|
5905
|
+
/* @__PURE__ */ E(Yr, { tenant: e }),
|
|
5827
5906
|
/* @__PURE__ */ E("span", {
|
|
5828
5907
|
className: "workspace-switcher-option-name",
|
|
5829
5908
|
children: e.name
|
|
@@ -5855,17 +5934,17 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5855
5934
|
}) : null,
|
|
5856
5935
|
i ? /* @__PURE__ */ E("div", {
|
|
5857
5936
|
className: "workspace-switcher-footer",
|
|
5858
|
-
children:
|
|
5937
|
+
children: Xr(i, a)
|
|
5859
5938
|
}) : null
|
|
5860
5939
|
]
|
|
5861
5940
|
})]
|
|
5862
5941
|
});
|
|
5863
5942
|
}
|
|
5864
|
-
function
|
|
5943
|
+
function Jr(e) {
|
|
5865
5944
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
5866
5945
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
5867
5946
|
}
|
|
5868
|
-
function
|
|
5947
|
+
function Yr({ tenant: e }) {
|
|
5869
5948
|
return e?.logoUrl ? /* @__PURE__ */ E("img", {
|
|
5870
5949
|
className: "workspace-switcher-mark",
|
|
5871
5950
|
src: e.logoUrl,
|
|
@@ -5873,10 +5952,10 @@ function Hr({ tenant: e }) {
|
|
|
5873
5952
|
loading: "lazy"
|
|
5874
5953
|
}) : /* @__PURE__ */ E("span", {
|
|
5875
5954
|
className: "workspace-switcher-mark",
|
|
5876
|
-
children:
|
|
5955
|
+
children: Jr(e?.name)
|
|
5877
5956
|
});
|
|
5878
5957
|
}
|
|
5879
|
-
function
|
|
5958
|
+
function Xr(e, t) {
|
|
5880
5959
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
5881
5960
|
let { label: n, icon: r, href: i } = e;
|
|
5882
5961
|
return /* @__PURE__ */ D(i ? t ?? "a" : "button", {
|
|
@@ -5888,7 +5967,7 @@ function Ur(e, t) {
|
|
|
5888
5967
|
}) : null, n]
|
|
5889
5968
|
});
|
|
5890
5969
|
}
|
|
5891
|
-
var
|
|
5970
|
+
var Zr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
5892
5971
|
return /* @__PURE__ */ D("button", {
|
|
5893
5972
|
ref: a,
|
|
5894
5973
|
type: "button",
|
|
@@ -5896,7 +5975,7 @@ var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5896
5975
|
"aria-haspopup": "true",
|
|
5897
5976
|
"aria-label": n,
|
|
5898
5977
|
...i,
|
|
5899
|
-
children: [/* @__PURE__ */ E(
|
|
5978
|
+
children: [/* @__PURE__ */ E(Yr, { tenant: t }), e ? null : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
5900
5979
|
className: "workspace-switcher-trigger-name",
|
|
5901
5980
|
children: t?.name
|
|
5902
5981
|
}), /* @__PURE__ */ E(Y, {
|
|
@@ -5908,36 +5987,36 @@ var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5908
5987
|
});
|
|
5909
5988
|
//#endregion
|
|
5910
5989
|
//#region src/components/toast.js
|
|
5911
|
-
function
|
|
5912
|
-
|
|
5990
|
+
function Qr() {
|
|
5991
|
+
Fr();
|
|
5913
5992
|
}
|
|
5914
|
-
var
|
|
5993
|
+
var $r = /* @__PURE__ */ new Set([
|
|
5915
5994
|
"success",
|
|
5916
5995
|
"info",
|
|
5917
5996
|
"warning",
|
|
5918
5997
|
"danger"
|
|
5919
5998
|
]);
|
|
5920
|
-
function
|
|
5999
|
+
function ei(e, t = "info") {
|
|
5921
6000
|
let n = "info", r = {};
|
|
5922
|
-
typeof t == "string" ? n =
|
|
6001
|
+
typeof t == "string" ? n = $r.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = $r.has(r.variant) ? r.variant : "info"), Mr(e, n, r);
|
|
5923
6002
|
}
|
|
5924
|
-
function
|
|
5925
|
-
|
|
6003
|
+
function ti(e, t = {}) {
|
|
6004
|
+
Mr(e, "danger", t);
|
|
5926
6005
|
}
|
|
5927
|
-
|
|
6006
|
+
ei.promise = (e, t, n = {}) => {
|
|
5928
6007
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
5929
|
-
return
|
|
6008
|
+
return ei(t.loading || "Loading...", {
|
|
5930
6009
|
...n,
|
|
5931
6010
|
variant: "info",
|
|
5932
6011
|
id: r,
|
|
5933
6012
|
duration: 0
|
|
5934
|
-
}), e.then((e) => (
|
|
6013
|
+
}), e.then((e) => (ei((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
5935
6014
|
...n,
|
|
5936
6015
|
variant: "success",
|
|
5937
6016
|
id: r,
|
|
5938
6017
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
5939
6018
|
}), e)).catch((e) => {
|
|
5940
|
-
throw
|
|
6019
|
+
throw ei((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
5941
6020
|
...n,
|
|
5942
6021
|
variant: "danger",
|
|
5943
6022
|
id: r,
|
|
@@ -5947,7 +6026,7 @@ qr.promise = (e, t, n = {}) => {
|
|
|
5947
6026
|
};
|
|
5948
6027
|
//#endregion
|
|
5949
6028
|
//#region src/lib/usePagination.js
|
|
5950
|
-
function
|
|
6029
|
+
function ni(e, t = 10) {
|
|
5951
6030
|
let [n, r] = f(1), [i, a] = f(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
5952
6031
|
o(() => {
|
|
5953
6032
|
n > c && r(c);
|
|
@@ -5973,4 +6052,4 @@ function Yr(e, t = 10) {
|
|
|
5973
6052
|
};
|
|
5974
6053
|
}
|
|
5975
6054
|
//#endregion
|
|
5976
|
-
export { Oe as AppAccordion,
|
|
6055
|
+
export { Oe as AppAccordion, Ae as AppActionIcon, Fe as AppAlert, He as AppAsyncBlock, tt as AppAutocomplete, st as AppAvatar, ut as AppAvatarGroup, dt as AppBadge, pt as AppBanner, mt as AppBreadcrumbs, ze as AppButton, gt as AppCard, vt as AppCheckbox, yt as AppChip, Ct as AppChoiceCard, wt as AppChoiceChip, Tt as AppColorField, Dt as AppCompareTable, It as AppConfirmDialog, Rt as AppConsentBanner, Bt as AppCopyButton, Ht as AppCountrySelect, Qt as AppDataTable, $t as AppDatePicker, en as AppDateRangePicker, tn as AppDescriptions, an as AppDropdown, Be as AppEmptyState, fn as AppFileAttachment, hn as AppFilePicker, gn as AppFloatingDock, _n as AppFormActions, vn as AppFormRow, yn as AppFormSection, Y as AppIcon, bn as AppInfoList, Ke as AppInfoTip, Ot as AppInput, Tn as AppKpiTile, kn as AppLink, jn as AppLogoPicker, Fn as AppMeter, Nt as AppModal, In as AppMultiSelect, Ln as AppNumberInput, Rn as AppOtpInput, zn as AppPageHeader, Bn as AppPagination, Vn as AppPhoneNumberInput, We as AppPopover, Hn as AppPricingCard, Gn as AppProgress, Kn as AppRadio, qn as AppRepeater, Z as AppRequiredMark, Jn as AppResourceCard, Xn as AppResult, Zn as AppScrollbar, Qn as AppSearch, $n as AppSegmented, tr as AppSelect, qt as AppSelectMini, nr as AppShell, ar as AppSidebarMenu, Ut as AppSkeleton, Wt as AppSkeletonRows, or as AppSlider, Ve as AppSpinner, cr as AppSplash, lr as AppStatusBadge, ur as AppStepper, fr as AppSwitch, pr as AppTableEmptyState, Yt as AppTablePagination, _r as AppTabs, vr as AppTagInput, yr as AppTextarea, Sr as AppTimePicker, xr as AppTimeline, Hr as AppToast, Wr as AppToolbar, G as AppTooltip, Gr as AppWizard, qr as AppWorkspaceSwitcher, Ft as MODAL_ICONS, Qr as dismissAll, ti as errorToast, Te as iconNames, De as registerIcons, ei as toast, ni as usePagination };
|