@webority/ui-react 0.13.4 → 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/AppDataTable.d.ts +4 -1
- package/dist/types/components/AppFilePicker.d.ts +2 -1
- 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 +625 -549
- 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 &&
|
|
2580
|
+
}), m && m.total > 0 && /* @__PURE__ */ E(Yt, {
|
|
2515
2581
|
page: m.page,
|
|
2516
2582
|
totalPages: m.totalPages,
|
|
2517
2583
|
pageSize: m.pageSize,
|
|
@@ -2519,12 +2585,14 @@ function Gt({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
2519
2585
|
firstRow: m.firstRow,
|
|
2520
2586
|
lastRow: m.lastRow,
|
|
2521
2587
|
onPageChange: m.setPage,
|
|
2522
|
-
onPageSizeChange: m.setPageSize
|
|
2588
|
+
onPageSizeChange: m.setPageSize,
|
|
2589
|
+
pageSizes: m.pageSizes,
|
|
2590
|
+
mode: m.mode
|
|
2523
2591
|
})] });
|
|
2524
2592
|
}
|
|
2525
2593
|
//#endregion
|
|
2526
2594
|
//#region src/components/AppDatePicker.jsx
|
|
2527
|
-
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) {
|
|
2528
2596
|
U("AppDatePicker", v);
|
|
2529
2597
|
let b = s(), x = m || b, { setRef: S } = Q({
|
|
2530
2598
|
ref: y,
|
|
@@ -2568,7 +2636,7 @@ var Kt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
2568
2636
|
})
|
|
2569
2637
|
]
|
|
2570
2638
|
});
|
|
2571
|
-
}),
|
|
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) {
|
|
2572
2640
|
U("AppDateRangePicker", x);
|
|
2573
2641
|
let C = s(), w = _ || C, { setRef: T, innerRef: O } = Q({
|
|
2574
2642
|
ref: S,
|
|
@@ -2629,7 +2697,7 @@ var Kt = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
2629
2697
|
});
|
|
2630
2698
|
//#endregion
|
|
2631
2699
|
//#region src/components/AppDescriptions.jsx
|
|
2632
|
-
function
|
|
2700
|
+
function tn({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, title: i, className: a = "", ...o }) {
|
|
2633
2701
|
return U("AppDescriptions", o), /* @__PURE__ */ D("div", {
|
|
2634
2702
|
className: [
|
|
2635
2703
|
"descs",
|
|
@@ -2645,7 +2713,7 @@ function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
2645
2713
|
}), /* @__PURE__ */ E("dl", {
|
|
2646
2714
|
className: "descs-list",
|
|
2647
2715
|
children: e.map((e, t) => {
|
|
2648
|
-
let n =
|
|
2716
|
+
let n = Et(e.value), r = e.span ?? 1, i = e.key ?? `${e.label}-${t}`;
|
|
2649
2717
|
return /* @__PURE__ */ D("div", {
|
|
2650
2718
|
className: "descs-item",
|
|
2651
2719
|
style: { "--descs-span": r },
|
|
@@ -2663,18 +2731,18 @@ function Jt({ items: e = [], columns: t = 2, size: n = "md", bordered: r = !1, t
|
|
|
2663
2731
|
}
|
|
2664
2732
|
//#endregion
|
|
2665
2733
|
//#region src/components/AppDropdown.jsx
|
|
2666
|
-
var
|
|
2667
|
-
function
|
|
2734
|
+
var nn = !1;
|
|
2735
|
+
function rn() {
|
|
2668
2736
|
let e = !0;
|
|
2669
2737
|
try {
|
|
2670
2738
|
e = process.env.NODE_ENV !== "production";
|
|
2671
2739
|
} catch {
|
|
2672
2740
|
e = !0;
|
|
2673
2741
|
}
|
|
2674
|
-
!e ||
|
|
2742
|
+
!e || nn || (nn = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
2675
2743
|
}
|
|
2676
|
-
function
|
|
2677
|
-
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();
|
|
2678
2746
|
let m = n ?? (d ? "wui-dropdown-trigger" : "topbar-icon-btn"), [h, g] = f(!1);
|
|
2679
2747
|
return o(() => {
|
|
2680
2748
|
if (!h) return;
|
|
@@ -2691,7 +2759,7 @@ function Zt({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
2691
2759
|
onToggle: (e) => g(e),
|
|
2692
2760
|
...p,
|
|
2693
2761
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
2694
|
-
as:
|
|
2762
|
+
as: on,
|
|
2695
2763
|
icon: e,
|
|
2696
2764
|
iconSize: t,
|
|
2697
2765
|
btnClassName: m,
|
|
@@ -2727,7 +2795,7 @@ function Zt({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i,
|
|
|
2727
2795
|
})]
|
|
2728
2796
|
});
|
|
2729
2797
|
}
|
|
2730
|
-
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) {
|
|
2731
2799
|
return /* @__PURE__ */ E("button", {
|
|
2732
2800
|
ref: s,
|
|
2733
2801
|
type: "button",
|
|
@@ -2742,16 +2810,16 @@ var Qt = i(function({ icon: e, iconSize: t = 20, btnClassName: n = "topbar-icon-
|
|
|
2742
2810
|
});
|
|
2743
2811
|
//#endregion
|
|
2744
2812
|
//#region src/lib/fileItem.js
|
|
2745
|
-
function
|
|
2813
|
+
function sn(e) {
|
|
2746
2814
|
return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
|
|
2747
2815
|
}
|
|
2748
|
-
function
|
|
2816
|
+
function cn(e) {
|
|
2749
2817
|
return e instanceof File ? e.name : e?.name;
|
|
2750
2818
|
}
|
|
2751
|
-
function
|
|
2819
|
+
function ln(e) {
|
|
2752
2820
|
return e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
|
|
2753
2821
|
}
|
|
2754
|
-
function
|
|
2822
|
+
function un(e, t) {
|
|
2755
2823
|
let [n, r] = f(null);
|
|
2756
2824
|
return o(() => {
|
|
2757
2825
|
if (!t) {
|
|
@@ -2767,8 +2835,8 @@ function nn(e, t) {
|
|
|
2767
2835
|
}
|
|
2768
2836
|
//#endregion
|
|
2769
2837
|
//#region src/lib/FileItemRow.jsx
|
|
2770
|
-
function
|
|
2771
|
-
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);
|
|
2772
2840
|
return /* @__PURE__ */ D("div", {
|
|
2773
2841
|
className: "attach-item",
|
|
2774
2842
|
children: [
|
|
@@ -2807,17 +2875,17 @@ function rn({ item: e, isImage: t, onRemove: n, noun: r = "attachment" }) {
|
|
|
2807
2875
|
}
|
|
2808
2876
|
//#endregion
|
|
2809
2877
|
//#region src/components/AppFileAttachment.jsx
|
|
2810
|
-
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 }) {
|
|
2811
2879
|
U("AppFileAttachment", p);
|
|
2812
|
-
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 =
|
|
2813
|
-
function
|
|
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);
|
|
2881
|
+
function C(e) {
|
|
2814
2882
|
let n = Array.from(e.target.files || []);
|
|
2815
2883
|
if (e.target.value = "", !n.length) return;
|
|
2816
2884
|
let s = [], c = "";
|
|
2817
2885
|
for (let e of n) {
|
|
2818
2886
|
let t = l ? I(e, {
|
|
2819
2887
|
accept: a,
|
|
2820
|
-
maxSizeMb:
|
|
2888
|
+
maxSizeMb: o
|
|
2821
2889
|
}) : null;
|
|
2822
2890
|
if (t) {
|
|
2823
2891
|
c ||= t;
|
|
@@ -2826,14 +2894,14 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2826
2894
|
s.push(e);
|
|
2827
2895
|
}
|
|
2828
2896
|
if (_(c), s.length) if (i) {
|
|
2829
|
-
let e = Array.isArray(t) ? t : t ? [t] : [], n = new Set(e.map(
|
|
2830
|
-
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)))));
|
|
2831
2899
|
} else r(s[0]);
|
|
2832
2900
|
}
|
|
2833
|
-
function
|
|
2901
|
+
function w(e) {
|
|
2834
2902
|
_(""), r(i ? v.filter((t, n) => n !== e) : null);
|
|
2835
2903
|
}
|
|
2836
|
-
let
|
|
2904
|
+
let O = u || g, j = O ? `${h}-error` : void 0, M = i || v.length === 0, N = y ? "image" : "file", L = i ? `Add ${N}s` : `Add ${y ? "an" : "a"} ${N}`;
|
|
2837
2905
|
return /* @__PURE__ */ D("div", {
|
|
2838
2906
|
className: "field",
|
|
2839
2907
|
children: [
|
|
@@ -2845,7 +2913,7 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2845
2913
|
children: " (optional)"
|
|
2846
2914
|
})]
|
|
2847
2915
|
}),
|
|
2848
|
-
|
|
2916
|
+
M && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ D("label", {
|
|
2849
2917
|
className: "attach-drop",
|
|
2850
2918
|
htmlFor: h,
|
|
2851
2919
|
children: [
|
|
@@ -2860,10 +2928,10 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2860
2928
|
className: "attach-drop-copy",
|
|
2861
2929
|
children: [/* @__PURE__ */ E("span", {
|
|
2862
2930
|
className: "attach-drop-title",
|
|
2863
|
-
children:
|
|
2864
|
-
}),
|
|
2931
|
+
children: L
|
|
2932
|
+
}), S && /* @__PURE__ */ E("span", {
|
|
2865
2933
|
className: "attach-drop-hint",
|
|
2866
|
-
children:
|
|
2934
|
+
children: S
|
|
2867
2935
|
})]
|
|
2868
2936
|
}),
|
|
2869
2937
|
/* @__PURE__ */ E("span", {
|
|
@@ -2878,36 +2946,36 @@ function an({ label: e = "Attachment", value: t, name: n, onChange: r, multiple:
|
|
|
2878
2946
|
name: n,
|
|
2879
2947
|
accept: a || void 0,
|
|
2880
2948
|
multiple: i || void 0,
|
|
2881
|
-
"aria-describedby":
|
|
2882
|
-
onChange:
|
|
2949
|
+
"aria-describedby": j,
|
|
2950
|
+
onChange: C,
|
|
2883
2951
|
...p
|
|
2884
2952
|
})] }),
|
|
2885
|
-
x ? /* @__PURE__ */ E(
|
|
2953
|
+
x ? /* @__PURE__ */ E(mn, {
|
|
2886
2954
|
item: v[0],
|
|
2887
2955
|
isImage: !0,
|
|
2888
|
-
onRemove: () =>
|
|
2956
|
+
onRemove: () => w(0)
|
|
2889
2957
|
}) : v.length > 0 && /* @__PURE__ */ E("div", {
|
|
2890
2958
|
className: "attach-list",
|
|
2891
|
-
children: v.map((e, t) => /* @__PURE__ */ E(
|
|
2959
|
+
children: v.map((e, t) => /* @__PURE__ */ E(dn, {
|
|
2892
2960
|
item: e,
|
|
2893
2961
|
isImage: b(e),
|
|
2894
|
-
onRemove: () =>
|
|
2895
|
-
},
|
|
2962
|
+
onRemove: () => w(t)
|
|
2963
|
+
}, sn(e)))
|
|
2896
2964
|
}),
|
|
2897
|
-
|
|
2965
|
+
O && /* @__PURE__ */ E("div", {
|
|
2898
2966
|
className: "field-error",
|
|
2899
2967
|
id: `${h}-error`,
|
|
2900
|
-
children:
|
|
2968
|
+
children: O
|
|
2901
2969
|
})
|
|
2902
2970
|
]
|
|
2903
2971
|
});
|
|
2904
2972
|
}
|
|
2905
|
-
function
|
|
2973
|
+
function pn(e, t) {
|
|
2906
2974
|
let n = e?.trim() ? j(e) : "", r = t > 0 ? `up to ${t} MB` : "";
|
|
2907
2975
|
return n && r ? `${n}, ${r}` : r ? `Up to ${t} MB` : n;
|
|
2908
2976
|
}
|
|
2909
|
-
function
|
|
2910
|
-
let r =
|
|
2977
|
+
function mn({ item: e, isImage: t, onRemove: n }) {
|
|
2978
|
+
let r = un(e, t), i = cn(e), a = ln(e);
|
|
2911
2979
|
return /* @__PURE__ */ D("div", {
|
|
2912
2980
|
className: "attach-preview",
|
|
2913
2981
|
children: [/* @__PURE__ */ D("div", {
|
|
@@ -2939,7 +3007,7 @@ function sn({ item: e, isImage: t, onRemove: n }) {
|
|
|
2939
3007
|
}
|
|
2940
3008
|
//#endregion
|
|
2941
3009
|
//#region src/components/AppFilePicker.jsx
|
|
2942
|
-
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 }) {
|
|
2943
3011
|
U("AppFilePicker", b);
|
|
2944
3012
|
let [x, S] = f(null), [C, w] = f(!1), [T, O] = f(""), k = d(null), M = s(), N = r || M;
|
|
2945
3013
|
o(() => {
|
|
@@ -2958,7 +3026,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
2958
3026
|
}, ce = (e) => {
|
|
2959
3027
|
let n = Array.from(e || []);
|
|
2960
3028
|
if (!n.length) return;
|
|
2961
|
-
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 = [];
|
|
2962
3030
|
for (let e of n) {
|
|
2963
3031
|
let t = I(e, {
|
|
2964
3032
|
accept: l,
|
|
@@ -2968,7 +3036,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
2968
3036
|
o ||= t;
|
|
2969
3037
|
continue;
|
|
2970
3038
|
}
|
|
2971
|
-
a.has(
|
|
3039
|
+
a.has(sn(e)) || (a.add(sn(e)), s.push(e));
|
|
2972
3040
|
}
|
|
2973
3041
|
let d = r.concat(s);
|
|
2974
3042
|
c && d.length > c && (d = d.slice(0, c), o ||= `Up to ${c} files.`), O(o), i(d);
|
|
@@ -3103,14 +3171,9 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3103
3171
|
children: "Click to upload"
|
|
3104
3172
|
}), " or drag & drop"]
|
|
3105
3173
|
}),
|
|
3106
|
-
/* @__PURE__ */
|
|
3174
|
+
/* @__PURE__ */ E("span", {
|
|
3107
3175
|
className: "file-input-text",
|
|
3108
|
-
children:
|
|
3109
|
-
j(l),
|
|
3110
|
-
" · up to ",
|
|
3111
|
-
u,
|
|
3112
|
-
" MB"
|
|
3113
|
-
]
|
|
3176
|
+
children: u > 0 ? `${j(l)} · up to ${u} MB` : j(l)
|
|
3114
3177
|
})
|
|
3115
3178
|
]
|
|
3116
3179
|
}),
|
|
@@ -3118,12 +3181,12 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3118
3181
|
fe,
|
|
3119
3182
|
a && L.length > 0 && /* @__PURE__ */ E("div", {
|
|
3120
3183
|
className: "attach-list",
|
|
3121
|
-
children: L.map((e, t) => /* @__PURE__ */ E(
|
|
3184
|
+
children: L.map((e, t) => /* @__PURE__ */ E(dn, {
|
|
3122
3185
|
item: e,
|
|
3123
3186
|
isImage: e instanceof File ? P(e) : V || P(e),
|
|
3124
3187
|
noun: "file",
|
|
3125
3188
|
onRemove: () => ue(t)
|
|
3126
|
-
},
|
|
3189
|
+
}, sn(e)))
|
|
3127
3190
|
})
|
|
3128
3191
|
]
|
|
3129
3192
|
}),
|
|
@@ -3141,7 +3204,7 @@ function cn({ label: e, value: t, name: n, id: r, onPick: i, multiple: a = !1, m
|
|
|
3141
3204
|
}
|
|
3142
3205
|
//#endregion
|
|
3143
3206
|
//#region src/components/AppFloatingDock.jsx
|
|
3144
|
-
function
|
|
3207
|
+
function gn({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation", magnify: r = !0, maxScale: i, radius: a, className: o = "", ...s }) {
|
|
3145
3208
|
return U("AppFloatingDock", s), /* @__PURE__ */ E("wui-dock", {
|
|
3146
3209
|
role: "navigation",
|
|
3147
3210
|
"aria-label": n,
|
|
@@ -3183,7 +3246,7 @@ function ln({ items: e = [], linkComponent: t, ariaLabel: n = "Quick navigation"
|
|
|
3183
3246
|
}
|
|
3184
3247
|
//#endregion
|
|
3185
3248
|
//#region src/components/AppFormActions.jsx
|
|
3186
|
-
function
|
|
3249
|
+
function _n({ children: e, sticky: t = !1, align: n = "end", className: r = "", ...i }) {
|
|
3187
3250
|
return U("AppFormActions", i), /* @__PURE__ */ E("div", {
|
|
3188
3251
|
className: [
|
|
3189
3252
|
"form-actions",
|
|
@@ -3197,7 +3260,7 @@ function un({ children: e, sticky: t = !1, align: n = "end", className: r = "",
|
|
|
3197
3260
|
}
|
|
3198
3261
|
//#endregion
|
|
3199
3262
|
//#region src/components/AppFormRow.jsx
|
|
3200
|
-
function
|
|
3263
|
+
function vn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
3201
3264
|
U("AppFormRow", r);
|
|
3202
3265
|
let { style: i, ...a } = r;
|
|
3203
3266
|
return /* @__PURE__ */ E("div", {
|
|
@@ -3212,7 +3275,7 @@ function dn({ children: e, columns: t = 2, className: n = "", ...r }) {
|
|
|
3212
3275
|
}
|
|
3213
3276
|
//#endregion
|
|
3214
3277
|
//#region src/components/AppFormSection.jsx
|
|
3215
|
-
function
|
|
3278
|
+
function yn({ children: e, title: t, description: n, className: r = "", ...i }) {
|
|
3216
3279
|
return U("AppFormSection", i), /* @__PURE__ */ D("section", {
|
|
3217
3280
|
className: ["form-section", r].filter(Boolean).join(" "),
|
|
3218
3281
|
...i,
|
|
@@ -3233,12 +3296,12 @@ function fn({ children: e, title: t, description: n, className: r = "", ...i })
|
|
|
3233
3296
|
}
|
|
3234
3297
|
//#endregion
|
|
3235
3298
|
//#region src/components/AppInfoList.jsx
|
|
3236
|
-
function
|
|
3299
|
+
function bn({ items: e = [], className: t = "", ...n }) {
|
|
3237
3300
|
return U("AppInfoList", n), /* @__PURE__ */ E("div", {
|
|
3238
3301
|
className: `info-list${t ? ` ${t}` : ""}`,
|
|
3239
3302
|
...n,
|
|
3240
3303
|
children: e.map((e, t) => {
|
|
3241
|
-
let n =
|
|
3304
|
+
let n = Et(e.value), r = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
3242
3305
|
className: "info-icon",
|
|
3243
3306
|
children: X(e.icon, { size: 16 })
|
|
3244
3307
|
}), /* @__PURE__ */ D("span", {
|
|
@@ -3264,23 +3327,23 @@ function pn({ items: e = [], className: t = "", ...n }) {
|
|
|
3264
3327
|
}
|
|
3265
3328
|
//#endregion
|
|
3266
3329
|
//#region src/components/AppKpiTile.jsx
|
|
3267
|
-
var
|
|
3268
|
-
function
|
|
3269
|
-
if (!e || e.length < 2) return `0,${
|
|
3270
|
-
let t = Math.min(...e), n = Math.max(...e) - t, r =
|
|
3271
|
-
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(" ");
|
|
3272
3335
|
}
|
|
3273
|
-
function
|
|
3336
|
+
function wn(e) {
|
|
3274
3337
|
if (typeof e != "string") return "flat";
|
|
3275
3338
|
let t = e.trim();
|
|
3276
3339
|
return t.startsWith("+") ? "up" : t.startsWith("-") || t.startsWith("−") ? "down" : "flat";
|
|
3277
3340
|
}
|
|
3278
|
-
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 }) {
|
|
3279
3342
|
U("AppKpiTile", C);
|
|
3280
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 ? {
|
|
3281
3344
|
...g,
|
|
3282
3345
|
"--wui-kpi-value-size": `${u}px`
|
|
3283
|
-
} : g, O = o ??
|
|
3346
|
+
} : g, O = o ?? wn(a), k = O === "up" ? "arrow-up" : O === "down" ? "arrow-down" : null, A = {};
|
|
3284
3347
|
return p != null && (A = m ? {
|
|
3285
3348
|
as: m,
|
|
3286
3349
|
to: p
|
|
@@ -3318,12 +3381,12 @@ function vn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3318
3381
|
}),
|
|
3319
3382
|
s && s.length > 0 && /* @__PURE__ */ E("svg", {
|
|
3320
3383
|
className: `kpi-sparkline${S ? ` ${S}` : ""}`,
|
|
3321
|
-
width:
|
|
3322
|
-
height:
|
|
3323
|
-
viewBox: `0 0 ${
|
|
3384
|
+
width: xn,
|
|
3385
|
+
height: Sn,
|
|
3386
|
+
viewBox: `0 0 ${xn} ${Sn}`,
|
|
3324
3387
|
"aria-hidden": "true",
|
|
3325
3388
|
children: /* @__PURE__ */ E("polyline", {
|
|
3326
|
-
points:
|
|
3389
|
+
points: Cn(s),
|
|
3327
3390
|
stroke: "currentColor",
|
|
3328
3391
|
fill: "none"
|
|
3329
3392
|
})
|
|
@@ -3333,11 +3396,11 @@ function vn({ label: e, value: t, caption: n, icon: r, iconTone: i, delta: a, de
|
|
|
3333
3396
|
}
|
|
3334
3397
|
//#endregion
|
|
3335
3398
|
//#region src/components/AppLink.jsx
|
|
3336
|
-
var
|
|
3399
|
+
var En = {
|
|
3337
3400
|
sm: 13,
|
|
3338
3401
|
md: 15,
|
|
3339
3402
|
lg: 18
|
|
3340
|
-
},
|
|
3403
|
+
}, Dn = [
|
|
3341
3404
|
"underline",
|
|
3342
3405
|
"underline-center",
|
|
3343
3406
|
"static",
|
|
@@ -3351,35 +3414,35 @@ var yn = {
|
|
|
3351
3414
|
"shine",
|
|
3352
3415
|
"none"
|
|
3353
3416
|
];
|
|
3354
|
-
function
|
|
3417
|
+
function On(e, t, n) {
|
|
3355
3418
|
if (!e) return null;
|
|
3356
3419
|
let r = `wui-link__ic wui-link__ic--${t}`;
|
|
3357
3420
|
return typeof e == "string" ? /* @__PURE__ */ E("span", {
|
|
3358
3421
|
className: r,
|
|
3359
3422
|
children: /* @__PURE__ */ E(Y, {
|
|
3360
3423
|
name: e,
|
|
3361
|
-
size:
|
|
3424
|
+
size: En[n] ?? En.md
|
|
3362
3425
|
})
|
|
3363
3426
|
}) : /* @__PURE__ */ E("span", {
|
|
3364
3427
|
className: r,
|
|
3365
3428
|
children: e
|
|
3366
3429
|
});
|
|
3367
3430
|
}
|
|
3368
|
-
function
|
|
3369
|
-
U("AppLink", d), W("AppLink", "animation", r,
|
|
3370
|
-
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 = [
|
|
3371
3434
|
"wui-link",
|
|
3372
3435
|
`wui-link--${f}`,
|
|
3373
3436
|
o === "md" ? "" : `wui-link--${o}`,
|
|
3374
3437
|
c ? "is-disabled" : "",
|
|
3375
3438
|
u
|
|
3376
3439
|
].filter(Boolean).join(" "), h = /* @__PURE__ */ D(T, { children: [
|
|
3377
|
-
|
|
3440
|
+
On(i, "left", o),
|
|
3378
3441
|
/* @__PURE__ */ E("span", {
|
|
3379
3442
|
className: "wui-link__label",
|
|
3380
3443
|
children: e ?? t
|
|
3381
3444
|
}),
|
|
3382
|
-
|
|
3445
|
+
On(p, "right", o)
|
|
3383
3446
|
] });
|
|
3384
3447
|
return c ? /* @__PURE__ */ E("span", {
|
|
3385
3448
|
className: m,
|
|
@@ -3402,13 +3465,13 @@ function Sn({ children: e, label: t, href: n, animation: r = "underline", leftIc
|
|
|
3402
3465
|
}
|
|
3403
3466
|
//#endregion
|
|
3404
3467
|
//#region src/components/AppLogoPicker.jsx
|
|
3405
|
-
var
|
|
3468
|
+
var An = {
|
|
3406
3469
|
sm: 72,
|
|
3407
3470
|
md: 120,
|
|
3408
3471
|
lg: 160
|
|
3409
3472
|
};
|
|
3410
|
-
function
|
|
3411
|
-
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));
|
|
3412
3475
|
let j = d(null), M = s(), [N, P] = f(null), [F, L] = f(""), [R, z] = f(!1), [ee, B] = f(!1);
|
|
3413
3476
|
o(() => () => N && URL.revokeObjectURL(N), [N]), o(() => {
|
|
3414
3477
|
P(null), z(!1);
|
|
@@ -3434,7 +3497,7 @@ function wn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3434
3497
|
t && oe(t);
|
|
3435
3498
|
}, G = () => {
|
|
3436
3499
|
P(null), L(""), z(!1), j.current && (j.current.value = ""), i?.();
|
|
3437
|
-
}, 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 = [
|
|
3438
3501
|
"set-uploader",
|
|
3439
3502
|
C === "avatar" ? "set-uploader--avatar" : "",
|
|
3440
3503
|
T === "rounded" ? "set-uploader--rounded" : T === "square" ? "set-uploader--square" : "",
|
|
@@ -3564,27 +3627,27 @@ function wn({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
|
|
|
3564
3627
|
}
|
|
3565
3628
|
//#endregion
|
|
3566
3629
|
//#region src/components/AppMeter.jsx
|
|
3567
|
-
var
|
|
3630
|
+
var Mn = [
|
|
3568
3631
|
"info",
|
|
3569
3632
|
"success",
|
|
3570
3633
|
"warning",
|
|
3571
3634
|
"danger",
|
|
3572
3635
|
"neutral"
|
|
3573
3636
|
];
|
|
3574
|
-
function
|
|
3637
|
+
function Nn(e, t, n) {
|
|
3575
3638
|
let r = n - t;
|
|
3576
3639
|
if (!(r > 0)) return 0;
|
|
3577
3640
|
let i = Math.min(100, Math.max(0, (e - t) / r * 100));
|
|
3578
3641
|
return Number(i.toFixed(2));
|
|
3579
3642
|
}
|
|
3580
|
-
function
|
|
3643
|
+
function Pn(e, t, n, r, i) {
|
|
3581
3644
|
if (t == null && n == null) return i;
|
|
3582
3645
|
let a = "mid";
|
|
3583
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";
|
|
3584
3647
|
}
|
|
3585
|
-
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 }) {
|
|
3586
3649
|
U("AppMeter", d);
|
|
3587
|
-
let f =
|
|
3650
|
+
let f = Pn(e, a, o, i, Mn.includes(r) ? r : "info"), p = Nn(e, t, n);
|
|
3588
3651
|
return /* @__PURE__ */ E("div", {
|
|
3589
3652
|
className: `progress${s === "sm" ? " progress-sm" : ""}${u ? ` ${u}` : ""}`,
|
|
3590
3653
|
role: "meter",
|
|
@@ -3602,20 +3665,20 @@ function On({ value: e = 0, min: t = 0, max: n = 100, tone: r = "info", optimum:
|
|
|
3602
3665
|
}
|
|
3603
3666
|
//#endregion
|
|
3604
3667
|
//#region src/components/AppMultiSelect.jsx
|
|
3605
|
-
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) {
|
|
3606
3669
|
U("AppMultiSelect", T);
|
|
3607
3670
|
let k = s(), A = _ || k, { setRef: j, innerRef: M } = Q({
|
|
3608
3671
|
ref: O,
|
|
3609
3672
|
value: e,
|
|
3610
3673
|
onChange: t,
|
|
3611
|
-
readValue:
|
|
3612
|
-
writeValue:
|
|
3674
|
+
readValue: Ze,
|
|
3675
|
+
writeValue: Qe
|
|
3613
3676
|
});
|
|
3614
3677
|
return o(() => {
|
|
3615
3678
|
let e = M.current;
|
|
3616
3679
|
if (!e) return;
|
|
3617
3680
|
let t = n || [];
|
|
3618
|
-
|
|
3681
|
+
Xe(t, e.options) || (e.options = t);
|
|
3619
3682
|
}, [n, M]), o(() => {
|
|
3620
3683
|
let e = M.current;
|
|
3621
3684
|
e && (e.validateCustom = p ?? null);
|
|
@@ -3628,7 +3691,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3628
3691
|
children: [
|
|
3629
3692
|
v,
|
|
3630
3693
|
x && /* @__PURE__ */ E(Z, {}),
|
|
3631
|
-
S && /* @__PURE__ */ E(
|
|
3694
|
+
S && /* @__PURE__ */ E(Ke, {
|
|
3632
3695
|
label: C,
|
|
3633
3696
|
children: S
|
|
3634
3697
|
})
|
|
@@ -3665,7 +3728,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3665
3728
|
}) : null
|
|
3666
3729
|
]
|
|
3667
3730
|
});
|
|
3668
|
-
}),
|
|
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) {
|
|
3669
3732
|
U("AppNumberInput", C);
|
|
3670
3733
|
let T = s(), O = _ || T, k = (e) => {
|
|
3671
3734
|
if (m === 0) return Math.round(e);
|
|
@@ -3770,7 +3833,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3770
3833
|
children: [
|
|
3771
3834
|
e,
|
|
3772
3835
|
t && /* @__PURE__ */ E(Z, {}),
|
|
3773
|
-
i && /* @__PURE__ */ E(
|
|
3836
|
+
i && /* @__PURE__ */ E(Ke, {
|
|
3774
3837
|
label: a,
|
|
3775
3838
|
children: i
|
|
3776
3839
|
})
|
|
@@ -3788,7 +3851,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3788
3851
|
}) : null
|
|
3789
3852
|
]
|
|
3790
3853
|
});
|
|
3791
|
-
}),
|
|
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) {
|
|
3792
3855
|
U("AppOtpInput", h);
|
|
3793
3856
|
let _ = s(), v = f || _, y = l ? `${v}-error` : void 0, b = c ? `${v}-hint` : void 0, x = y || b, { setRef: S } = Q({
|
|
3794
3857
|
ref: g,
|
|
@@ -3833,7 +3896,7 @@ var kn = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
|
|
|
3833
3896
|
});
|
|
3834
3897
|
//#endregion
|
|
3835
3898
|
//#region src/components/AppPageHeader.jsx
|
|
3836
|
-
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 }) {
|
|
3837
3900
|
U("AppPageHeader", p);
|
|
3838
3901
|
let m = [
|
|
3839
3902
|
"page-header",
|
|
@@ -3892,9 +3955,9 @@ function Mn({ title: e, subtitle: t, eyebrow: n, icon: r, tone: i = "primary", s
|
|
|
3892
3955
|
}
|
|
3893
3956
|
//#endregion
|
|
3894
3957
|
//#region src/components/AppPagination.jsx
|
|
3895
|
-
function
|
|
3958
|
+
function Bn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "md", ariaLabel: a = "Pagination", className: o, ...s }) {
|
|
3896
3959
|
if (U("AppPagination", s), t <= 1) return null;
|
|
3897
|
-
let c =
|
|
3960
|
+
let c = Kt(e, t, { siblingCount: r });
|
|
3898
3961
|
return /* @__PURE__ */ E("nav", {
|
|
3899
3962
|
className: [
|
|
3900
3963
|
"pagination-nav",
|
|
@@ -3952,7 +4015,7 @@ function Nn({ page: e, totalPages: t, onChange: n, siblings: r = 1, size: i = "m
|
|
|
3952
4015
|
}
|
|
3953
4016
|
//#endregion
|
|
3954
4017
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3955
|
-
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) {
|
|
3956
4019
|
U("AppPhoneNumberInput", h);
|
|
3957
4020
|
let _ = s(), v = a || _, y = u && v ? `${v}-error` : void 0, { setRef: b } = Q({
|
|
3958
4021
|
ref: g,
|
|
@@ -3993,7 +4056,7 @@ var Pn = i(function({ value: e, onChange: t, country: n, disabled: r = !1, name:
|
|
|
3993
4056
|
});
|
|
3994
4057
|
//#endregion
|
|
3995
4058
|
//#region src/components/AppPricingCard.jsx
|
|
3996
|
-
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 }) {
|
|
3997
4060
|
return U("AppPricingCard", u), /* @__PURE__ */ D("div", {
|
|
3998
4061
|
className: [
|
|
3999
4062
|
"plan-card",
|
|
@@ -4047,21 +4110,21 @@ function Fn({ name: e, price: t, unit: n, tagline: r, features: i = [], cta: a,
|
|
|
4047
4110
|
}
|
|
4048
4111
|
//#endregion
|
|
4049
4112
|
//#region src/components/AppProgress.jsx
|
|
4050
|
-
var
|
|
4113
|
+
var Un = [
|
|
4051
4114
|
"info",
|
|
4052
4115
|
"success",
|
|
4053
4116
|
"warning",
|
|
4054
4117
|
"danger",
|
|
4055
4118
|
"neutral"
|
|
4056
4119
|
];
|
|
4057
|
-
function
|
|
4120
|
+
function Wn(e, t) {
|
|
4058
4121
|
if (!(t > 0)) return 0;
|
|
4059
4122
|
let n = Math.min(100, Math.max(0, e / t * 100));
|
|
4060
4123
|
return Number(n.toFixed(2));
|
|
4061
4124
|
}
|
|
4062
|
-
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 }) {
|
|
4063
4126
|
U("AppProgress", u);
|
|
4064
|
-
let d =
|
|
4127
|
+
let d = Un.includes(n) ? n : "info", f = Wn(e, t), p = `progress${r === "sm" ? " progress-sm" : ""}${l ? ` ${l}` : ""}`, m = [
|
|
4065
4128
|
"progress-bar",
|
|
4066
4129
|
`wui-progress-${d}`,
|
|
4067
4130
|
o || s ? "progress-bar-striped" : "",
|
|
@@ -4085,8 +4148,8 @@ function Rn({ value: e = 0, max: t = 100, tone: n = "info", size: r = "md", labe
|
|
|
4085
4148
|
}
|
|
4086
4149
|
//#endregion
|
|
4087
4150
|
//#region src/components/AppRadio.jsx
|
|
4088
|
-
var
|
|
4089
|
-
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, {
|
|
4090
4153
|
ref: s,
|
|
4091
4154
|
label: e,
|
|
4092
4155
|
id: t,
|
|
@@ -4101,27 +4164,27 @@ var zn = i(function({ label: e, id: t, name: n, error: r, hint: i, className: a
|
|
|
4101
4164
|
});
|
|
4102
4165
|
//#endregion
|
|
4103
4166
|
//#region src/components/AppRepeater.jsx
|
|
4104
|
-
function
|
|
4105
|
-
U("AppRepeater",
|
|
4106
|
-
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;
|
|
4107
4170
|
return /* @__PURE__ */ D("div", {
|
|
4108
|
-
className: `repeater${
|
|
4109
|
-
...
|
|
4171
|
+
className: `repeater${f ? ` ${f}` : ""}`,
|
|
4172
|
+
...p,
|
|
4110
4173
|
children: [
|
|
4111
|
-
e.length === 0 &&
|
|
4174
|
+
e.length === 0 && c && /* @__PURE__ */ E("div", {
|
|
4112
4175
|
className: "repeater-empty",
|
|
4113
|
-
children:
|
|
4176
|
+
children: c
|
|
4114
4177
|
}),
|
|
4115
4178
|
e.map((e, r) => {
|
|
4116
4179
|
let a = n ? n(e, r) : null;
|
|
4117
4180
|
return /* @__PURE__ */ D("div", {
|
|
4118
4181
|
className: "repeater-row",
|
|
4119
4182
|
children: [
|
|
4120
|
-
(!!a ||
|
|
4183
|
+
(!!a || h) && /* @__PURE__ */ E("span", {
|
|
4121
4184
|
className: "repeater-row-label",
|
|
4122
4185
|
children: a
|
|
4123
4186
|
}),
|
|
4124
|
-
|
|
4187
|
+
d && /* @__PURE__ */ E("span", {
|
|
4125
4188
|
className: "repeater-index",
|
|
4126
4189
|
children: r + 1
|
|
4127
4190
|
}),
|
|
@@ -4129,9 +4192,9 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4129
4192
|
className: "repeater-body",
|
|
4130
4193
|
children: t(e, r)
|
|
4131
4194
|
}),
|
|
4132
|
-
|
|
4195
|
+
h && /* @__PURE__ */ E(Ae, {
|
|
4133
4196
|
icon: "trash-2",
|
|
4134
|
-
label: `${
|
|
4197
|
+
label: `${s} ${r + 1}`,
|
|
4135
4198
|
danger: !0,
|
|
4136
4199
|
className: "repeater-remove",
|
|
4137
4200
|
onClick: () => i(r)
|
|
@@ -4139,12 +4202,12 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4139
4202
|
]
|
|
4140
4203
|
}, e.id ?? r);
|
|
4141
4204
|
}),
|
|
4142
|
-
/* @__PURE__ */ E(
|
|
4143
|
-
variant:
|
|
4205
|
+
/* @__PURE__ */ E(ze, {
|
|
4206
|
+
variant: o,
|
|
4144
4207
|
size: "sm",
|
|
4145
4208
|
leftIcon: "plus",
|
|
4146
4209
|
className: "repeater-add",
|
|
4147
|
-
disabled:
|
|
4210
|
+
disabled: m,
|
|
4148
4211
|
onClick: r,
|
|
4149
4212
|
children: a
|
|
4150
4213
|
})
|
|
@@ -4153,7 +4216,7 @@ function Bn({ rows: e = [], renderRow: t, rowLabel: n, onAdd: r, onRemove: i, ad
|
|
|
4153
4216
|
}
|
|
4154
4217
|
//#endregion
|
|
4155
4218
|
//#region src/components/AppResourceCard.jsx
|
|
4156
|
-
function
|
|
4219
|
+
function Jn({ icon: e, title: t, text: n, href: r, external: i = !1, linkComponent: a, className: o = "", ...s }) {
|
|
4157
4220
|
U("AppResourceCard", s);
|
|
4158
4221
|
let c = /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
4159
4222
|
className: "res-card-icon",
|
|
@@ -4187,7 +4250,7 @@ function Vn({ icon: e, title: t, text: n, href: r, external: i = !1, linkCompone
|
|
|
4187
4250
|
}
|
|
4188
4251
|
//#endregion
|
|
4189
4252
|
//#region src/components/AppResult.jsx
|
|
4190
|
-
var
|
|
4253
|
+
var Yn = {
|
|
4191
4254
|
success: {
|
|
4192
4255
|
icon: "check-circle",
|
|
4193
4256
|
tone: "success"
|
|
@@ -4208,9 +4271,9 @@ var Hn = {
|
|
|
4208
4271
|
404: { tone: "muted" },
|
|
4209
4272
|
500: { tone: "muted" }
|
|
4210
4273
|
};
|
|
4211
|
-
function
|
|
4212
|
-
U("AppResult", s), W("AppResult", "status", e, Object.keys(
|
|
4213
|
-
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);
|
|
4214
4277
|
return /* @__PURE__ */ D("div", {
|
|
4215
4278
|
className: [
|
|
4216
4279
|
"result",
|
|
@@ -4248,7 +4311,7 @@ function Un({ status: e = "info", title: t, subtitle: n, icon: r, actions: i, ch
|
|
|
4248
4311
|
}
|
|
4249
4312
|
//#endregion
|
|
4250
4313
|
//#region src/components/AppScrollbar.jsx
|
|
4251
|
-
function
|
|
4314
|
+
function Zn({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
4252
4315
|
return U("AppScrollbar", i), /* @__PURE__ */ E("div", {
|
|
4253
4316
|
className: t ? `wui-scroll ${t}` : "wui-scroll",
|
|
4254
4317
|
style: n == null ? r : {
|
|
@@ -4261,7 +4324,7 @@ function Wn({ children: e, className: t = "", maxHeight: n, style: r, ...i }) {
|
|
|
4261
4324
|
}
|
|
4262
4325
|
//#endregion
|
|
4263
4326
|
//#region src/components/AppSearch.jsx
|
|
4264
|
-
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 }) {
|
|
4265
4328
|
U("AppSearch", u);
|
|
4266
4329
|
let d = t || n;
|
|
4267
4330
|
return /* @__PURE__ */ D("div", {
|
|
@@ -4308,7 +4371,7 @@ function Gn({ value: e, onChange: t, onValueChange: n, placeholder: r = "Search
|
|
|
4308
4371
|
}
|
|
4309
4372
|
//#endregion
|
|
4310
4373
|
//#region src/components/AppSegmented.jsx
|
|
4311
|
-
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 }) {
|
|
4312
4375
|
U("AppSegmented", p);
|
|
4313
4376
|
let m = s(), h = i || m, g = d(null), _ = d(null), v = [
|
|
4314
4377
|
"segmented",
|
|
@@ -4382,80 +4445,93 @@ function Kn({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
4382
4445
|
}
|
|
4383
4446
|
//#endregion
|
|
4384
4447
|
//#region src/components/AppSelect.jsx
|
|
4385
|
-
var
|
|
4386
|
-
U("AppSelect",
|
|
4387
|
-
let
|
|
4388
|
-
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,
|
|
4389
4452
|
value: e ?? "",
|
|
4390
4453
|
onChange: t
|
|
4391
4454
|
});
|
|
4392
4455
|
o(() => {
|
|
4393
|
-
let e =
|
|
4456
|
+
let e = P.current;
|
|
4394
4457
|
if (!e) return;
|
|
4395
4458
|
let t = n.map((e) => ({
|
|
4396
4459
|
value: e.value,
|
|
4397
|
-
label:
|
|
4460
|
+
label: er(e),
|
|
4398
4461
|
icon: e.icon
|
|
4399
4462
|
}));
|
|
4400
|
-
|
|
4401
|
-
}, [n,
|
|
4402
|
-
let
|
|
4403
|
-
"aria-label":
|
|
4404
|
-
"aria-labelledby":
|
|
4405
|
-
"aria-describedby":
|
|
4406
|
-
"aria-invalid":
|
|
4407
|
-
ref:
|
|
4408
|
-
id:
|
|
4409
|
-
name:
|
|
4410
|
-
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,
|
|
4411
4474
|
"search-placeholder": i,
|
|
4412
4475
|
searchable: a ? "" : void 0,
|
|
4413
4476
|
clearable: c ? "" : void 0,
|
|
4414
4477
|
size: l || void 0,
|
|
4415
4478
|
icon: u || void 0,
|
|
4416
|
-
disabled:
|
|
4417
|
-
required:
|
|
4418
|
-
className:
|
|
4419
|
-
...
|
|
4420
|
-
})
|
|
4421
|
-
|
|
4422
|
-
className: ["field", S].filter(Boolean).join(" "),
|
|
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",
|
|
4423
4485
|
children: [
|
|
4424
|
-
|
|
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(" "),
|
|
4499
|
+
children: [
|
|
4500
|
+
h && !I && /* @__PURE__ */ D("label", {
|
|
4425
4501
|
className: "label",
|
|
4426
|
-
htmlFor:
|
|
4502
|
+
htmlFor: F,
|
|
4427
4503
|
children: [
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
label:
|
|
4432
|
-
children:
|
|
4504
|
+
h,
|
|
4505
|
+
g && /* @__PURE__ */ E(Z, {}),
|
|
4506
|
+
y && /* @__PURE__ */ E(Ke, {
|
|
4507
|
+
label: b,
|
|
4508
|
+
children: y
|
|
4433
4509
|
})
|
|
4434
4510
|
]
|
|
4435
4511
|
}),
|
|
4436
|
-
|
|
4512
|
+
I ? /* @__PURE__ */ D("div", {
|
|
4437
4513
|
className: "field-float",
|
|
4438
|
-
children: [
|
|
4514
|
+
children: [z, /* @__PURE__ */ D("label", {
|
|
4439
4515
|
className: "float-label",
|
|
4440
|
-
htmlFor:
|
|
4441
|
-
children: [
|
|
4516
|
+
htmlFor: F,
|
|
4517
|
+
children: [h, g && /* @__PURE__ */ E(Z, {})]
|
|
4442
4518
|
})]
|
|
4443
|
-
}) :
|
|
4444
|
-
|
|
4519
|
+
}) : ee,
|
|
4520
|
+
_ ? /* @__PURE__ */ E("div", {
|
|
4445
4521
|
className: "field-error",
|
|
4446
|
-
id:
|
|
4447
|
-
children:
|
|
4448
|
-
}) :
|
|
4522
|
+
id: L,
|
|
4523
|
+
children: _
|
|
4524
|
+
}) : v ? /* @__PURE__ */ E("div", {
|
|
4449
4525
|
className: "field-hint",
|
|
4450
|
-
id:
|
|
4451
|
-
children:
|
|
4526
|
+
id: R,
|
|
4527
|
+
children: v
|
|
4452
4528
|
}) : null
|
|
4453
4529
|
]
|
|
4454
4530
|
});
|
|
4455
4531
|
});
|
|
4456
4532
|
//#endregion
|
|
4457
4533
|
//#region src/components/AppShell.jsx
|
|
4458
|
-
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 = "", ..._ }) {
|
|
4459
4535
|
U("AppShell", _);
|
|
4460
4536
|
let [v, y] = f(!1), [b, x] = f(!1), [S, C] = f(!1), w = u ?? v, T = () => {
|
|
4461
4537
|
let e = !w;
|
|
@@ -4503,7 +4579,7 @@ function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4503
4579
|
children: [e.label && /* @__PURE__ */ E("div", {
|
|
4504
4580
|
className: "app-nav-group-label",
|
|
4505
4581
|
children: e.label
|
|
4506
|
-
}), e.items.map((e) => /* @__PURE__ */ E(
|
|
4582
|
+
}), e.items.map((e) => /* @__PURE__ */ E(rr, {
|
|
4507
4583
|
item: e,
|
|
4508
4584
|
linkComponent: h,
|
|
4509
4585
|
onNavigate: () => x(!1)
|
|
@@ -4570,7 +4646,7 @@ function Yn({ groups: e = [], brand: t, sidebarStart: n, sidebarStartCompact: r,
|
|
|
4570
4646
|
]
|
|
4571
4647
|
});
|
|
4572
4648
|
}
|
|
4573
|
-
function
|
|
4649
|
+
function rr({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
4574
4650
|
let i = Array.isArray(e.children) && e.children.length > 0, a = i && e.children.some((e) => e.active), [s, c] = f(a);
|
|
4575
4651
|
o(() => {
|
|
4576
4652
|
a && !s && c(!0);
|
|
@@ -4612,7 +4688,7 @@ function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4612
4688
|
"aria-hidden": !s || void 0,
|
|
4613
4689
|
children: /* @__PURE__ */ E("div", {
|
|
4614
4690
|
className: "app-nav-sub-inner",
|
|
4615
|
-
children: e.children.map((e) => /* @__PURE__ */ E(
|
|
4691
|
+
children: e.children.map((e) => /* @__PURE__ */ E(rr, {
|
|
4616
4692
|
item: e,
|
|
4617
4693
|
linkComponent: t,
|
|
4618
4694
|
onNavigate: n,
|
|
@@ -4653,7 +4729,7 @@ function Xn({ item: e, linkComponent: t, onNavigate: n, sub: r = !1 }) {
|
|
|
4653
4729
|
}
|
|
4654
4730
|
//#endregion
|
|
4655
4731
|
//#region src/components/AppSidebarMenu.jsx
|
|
4656
|
-
var
|
|
4732
|
+
var ir = {
|
|
4657
4733
|
left: "start",
|
|
4658
4734
|
right: "end",
|
|
4659
4735
|
start: "start",
|
|
@@ -4661,9 +4737,9 @@ var Zn = {
|
|
|
4661
4737
|
top: "top",
|
|
4662
4738
|
bottom: "bottom"
|
|
4663
4739
|
};
|
|
4664
|
-
function
|
|
4665
|
-
U("AppSidebarMenu", v), W("AppSidebarMenu", "side", n, Object.keys(
|
|
4666
|
-
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 ? {
|
|
4667
4743
|
...c && { "--asm-width": c },
|
|
4668
4744
|
...l && { "--asm-max-width": l },
|
|
4669
4745
|
...y
|
|
@@ -4692,7 +4768,7 @@ function Qn({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
4692
4768
|
size: 18
|
|
4693
4769
|
})
|
|
4694
4770
|
}), r]
|
|
4695
|
-
}), p && /* @__PURE__ */ E(
|
|
4771
|
+
}), p && /* @__PURE__ */ E(ze, {
|
|
4696
4772
|
variant: "ghost",
|
|
4697
4773
|
className: "btn-icon",
|
|
4698
4774
|
onClick: t,
|
|
@@ -4716,14 +4792,14 @@ function Qn({ show: e, onHide: t, side: n = "right", title: r, titleIcon: i, hea
|
|
|
4716
4792
|
}
|
|
4717
4793
|
//#endregion
|
|
4718
4794
|
//#region src/components/AppSlider.jsx
|
|
4719
|
-
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) {
|
|
4720
4796
|
U("AppSlider", T);
|
|
4721
4797
|
let k = s(), A = x || k, j = r, { setRef: M, innerRef: N } = Q({
|
|
4722
4798
|
ref: O,
|
|
4723
4799
|
value: j ? void 0 : e,
|
|
4724
4800
|
onChange: i,
|
|
4725
|
-
readValue: j ?
|
|
4726
|
-
writeValue: j ? void 0 :
|
|
4801
|
+
readValue: j ? $e : void 0,
|
|
4802
|
+
writeValue: j ? void 0 : et
|
|
4727
4803
|
});
|
|
4728
4804
|
o(() => {
|
|
4729
4805
|
if (!j) return;
|
|
@@ -4777,14 +4853,14 @@ var $n = i(function({ value: e, start: t, end: n, range: r = !1, onChange: i, la
|
|
|
4777
4853
|
})
|
|
4778
4854
|
]
|
|
4779
4855
|
});
|
|
4780
|
-
}),
|
|
4856
|
+
}), sr = {
|
|
4781
4857
|
sm: 44,
|
|
4782
4858
|
md: 56,
|
|
4783
4859
|
lg: 72
|
|
4784
4860
|
};
|
|
4785
|
-
function
|
|
4786
|
-
U("AppSplash", c), W("AppSplash", "size", typeof a == "string" ? a : null, Object.keys(
|
|
4787
|
-
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", {
|
|
4788
4864
|
className: "splash-ring",
|
|
4789
4865
|
"aria-hidden": "true"
|
|
4790
4866
|
}) : i === "dots" ? /* @__PURE__ */ D("span", {
|
|
@@ -4831,7 +4907,7 @@ function tr({ logo: e, initials: t, text: n, subtext: r, variant: i = "bar", siz
|
|
|
4831
4907
|
}
|
|
4832
4908
|
//#endregion
|
|
4833
4909
|
//#region src/components/AppStatusBadge.jsx
|
|
4834
|
-
function
|
|
4910
|
+
function lr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tooltipPlacement: i, ...a }) {
|
|
4835
4911
|
return U("AppStatusBadge", a), e == null || e === "" ? "-" : K(/* @__PURE__ */ E("span", {
|
|
4836
4912
|
className: `status-label ${t}${n ? ` ${n}` : ""}`,
|
|
4837
4913
|
...a,
|
|
@@ -4840,7 +4916,7 @@ function nr({ label: e, tone: t = "neutral", className: n = "", tooltip: r, tool
|
|
|
4840
4916
|
}
|
|
4841
4917
|
//#endregion
|
|
4842
4918
|
//#region src/components/AppStepper.jsx
|
|
4843
|
-
function
|
|
4919
|
+
function ur({ steps: e = [], variant: t = "steps", orientation: n = "horizontal", activeStep: r, onStepClick: i, label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4844
4920
|
U("AppStepper", c);
|
|
4845
4921
|
let l = t === "journey";
|
|
4846
4922
|
return /* @__PURE__ */ E("nav", {
|
|
@@ -4853,7 +4929,7 @@ function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4853
4929
|
"aria-label": a,
|
|
4854
4930
|
...c,
|
|
4855
4931
|
children: e.map((t, n) => {
|
|
4856
|
-
let a = t.status ||
|
|
4932
|
+
let a = t.status || dr(n, r), s = `step${a === "pending" ? "" : ` ${a}`}`, c;
|
|
4857
4933
|
c = a === "done" ? /* @__PURE__ */ E(Y, {
|
|
4858
4934
|
name: "check",
|
|
4859
4935
|
size: 14
|
|
@@ -4917,13 +4993,13 @@ function rr({ steps: e = [], variant: t = "steps", orientation: n = "horizontal"
|
|
|
4917
4993
|
})
|
|
4918
4994
|
});
|
|
4919
4995
|
}
|
|
4920
|
-
function
|
|
4996
|
+
function dr(e, t) {
|
|
4921
4997
|
return typeof t == "number" ? e < t ? "done" : e === t ? "active" : "pending" : "pending";
|
|
4922
4998
|
}
|
|
4923
4999
|
//#endregion
|
|
4924
5000
|
//#region src/components/AppSwitch.jsx
|
|
4925
|
-
var
|
|
4926
|
-
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, {
|
|
4927
5003
|
ref: c,
|
|
4928
5004
|
label: e,
|
|
4929
5005
|
id: t,
|
|
@@ -4938,7 +5014,7 @@ var ar = i(function({ label: e, id: t, name: n, error: r, hint: i, shape: a = "p
|
|
|
4938
5014
|
});
|
|
4939
5015
|
//#endregion
|
|
4940
5016
|
//#region src/components/AppTableEmptyState.jsx
|
|
4941
|
-
function
|
|
5017
|
+
function pr({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
4942
5018
|
return U("AppTableEmptyState", i), /* @__PURE__ */ D("div", {
|
|
4943
5019
|
className: "tbl-empty",
|
|
4944
5020
|
...i,
|
|
@@ -4964,8 +5040,8 @@ function or({ icon: e, title: t, text: n, action: r, ...i }) {
|
|
|
4964
5040
|
}
|
|
4965
5041
|
//#endregion
|
|
4966
5042
|
//#region src/components/AppTabs.jsx
|
|
4967
|
-
var
|
|
4968
|
-
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, ..._ }) {
|
|
4969
5045
|
U("AppTabs", _);
|
|
4970
5046
|
let v = d(null), y = d(null), b = s === "vertical", [x, S] = f(t);
|
|
4971
5047
|
o(() => {
|
|
@@ -4977,7 +5053,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
4977
5053
|
let e = v.current, t = y.current;
|
|
4978
5054
|
if (!e || !t || b) return;
|
|
4979
5055
|
let n = e.scrollWidth - e.clientWidth;
|
|
4980
|
-
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);
|
|
4981
5057
|
}, [b]), M = a(() => {
|
|
4982
5058
|
let n = v.current;
|
|
4983
5059
|
if (!n) return;
|
|
@@ -4993,7 +5069,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
4993
5069
|
if (!e || b) return;
|
|
4994
5070
|
let t = e.querySelector(".app-tab.active");
|
|
4995
5071
|
if (!t) return;
|
|
4996
|
-
let n =
|
|
5072
|
+
let n = hr, r = t.offsetLeft, i = r + t.offsetWidth;
|
|
4997
5073
|
r - n < e.scrollLeft ? e.scrollLeft = Math.max(0, r - n) : i + n > e.scrollLeft + e.clientWidth && (e.scrollLeft = i + n - e.clientWidth);
|
|
4998
5074
|
}, [b]);
|
|
4999
5075
|
l(() => {
|
|
@@ -5028,7 +5104,7 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5028
5104
|
}
|
|
5029
5105
|
let I = (e) => {
|
|
5030
5106
|
let t = v.current;
|
|
5031
|
-
t && t.scrollBy({ left: e * t.clientWidth *
|
|
5107
|
+
t && t.scrollBy({ left: e * t.clientWidth * gr });
|
|
5032
5108
|
}, L = [
|
|
5033
5109
|
"app-tabs",
|
|
5034
5110
|
i === "pills" ? "app-tabs-pills" : "",
|
|
@@ -5141,14 +5217,14 @@ function ur({ tabs: e, value: t, onChange: n, linkComponent: r, variant: i = "un
|
|
|
5141
5217
|
}
|
|
5142
5218
|
//#endregion
|
|
5143
5219
|
//#region src/components/AppTagInput.jsx
|
|
5144
|
-
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) {
|
|
5145
5221
|
U("AppTagInput", y);
|
|
5146
5222
|
let x = s(), S = p || x, { setRef: C } = Q({
|
|
5147
5223
|
ref: b,
|
|
5148
5224
|
value: e,
|
|
5149
5225
|
onChange: t,
|
|
5150
|
-
readValue:
|
|
5151
|
-
writeValue:
|
|
5226
|
+
readValue: Ze,
|
|
5227
|
+
writeValue: Qe
|
|
5152
5228
|
});
|
|
5153
5229
|
return /* @__PURE__ */ D("div", {
|
|
5154
5230
|
className: `field${g ? ` ${g}` : ""}`,
|
|
@@ -5159,7 +5235,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5159
5235
|
children: [
|
|
5160
5236
|
i,
|
|
5161
5237
|
c && /* @__PURE__ */ E(Z, {}),
|
|
5162
|
-
_ && /* @__PURE__ */ E(
|
|
5238
|
+
_ && /* @__PURE__ */ E(Ke, {
|
|
5163
5239
|
label: v,
|
|
5164
5240
|
children: _
|
|
5165
5241
|
})
|
|
@@ -5192,7 +5268,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5192
5268
|
}) : null
|
|
5193
5269
|
]
|
|
5194
5270
|
});
|
|
5195
|
-
}),
|
|
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) {
|
|
5196
5272
|
U("AppTextarea", x);
|
|
5197
5273
|
let C = s(), w = u || C, T = [
|
|
5198
5274
|
"textarea",
|
|
@@ -5228,7 +5304,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5228
5304
|
children: [
|
|
5229
5305
|
e,
|
|
5230
5306
|
t && /* @__PURE__ */ E(Z, {}),
|
|
5231
|
-
i && /* @__PURE__ */ E(
|
|
5307
|
+
i && /* @__PURE__ */ E(Ke, {
|
|
5232
5308
|
label: c,
|
|
5233
5309
|
children: i
|
|
5234
5310
|
})
|
|
@@ -5263,7 +5339,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5263
5339
|
})
|
|
5264
5340
|
]
|
|
5265
5341
|
});
|
|
5266
|
-
}),
|
|
5342
|
+
}), br = {
|
|
5267
5343
|
done: "check",
|
|
5268
5344
|
current: "clock",
|
|
5269
5345
|
"on-hold": "lock",
|
|
@@ -5272,7 +5348,7 @@ var dr = i(function({ values: e, onChange: t, placeholder: n = "Add…", name: r
|
|
|
5272
5348
|
skipped: "arrow-right",
|
|
5273
5349
|
upcoming: null
|
|
5274
5350
|
};
|
|
5275
|
-
function
|
|
5351
|
+
function xr({ items: e = [], variant: t = "feed", orientation: n = "vertical", size: r, className: i = "", style: a, ...o }) {
|
|
5276
5352
|
U("AppTimeline", o);
|
|
5277
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;
|
|
5278
5354
|
return /* @__PURE__ */ E("ol", {
|
|
@@ -5283,7 +5359,7 @@ function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5283
5359
|
} : a,
|
|
5284
5360
|
...o,
|
|
5285
5361
|
children: e.map((e, t) => {
|
|
5286
|
-
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";
|
|
5287
5363
|
return /* @__PURE__ */ D("li", {
|
|
5288
5364
|
className: `timeline-item${r}${i}`,
|
|
5289
5365
|
children: [/* @__PURE__ */ E("span", {
|
|
@@ -5353,7 +5429,7 @@ function mr({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
5353
5429
|
}
|
|
5354
5430
|
//#endregion
|
|
5355
5431
|
//#region src/components/AppTimePicker.jsx
|
|
5356
|
-
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) {
|
|
5357
5433
|
U("AppTimePicker", y);
|
|
5358
5434
|
let x = s(), S = h || o || x, { setRef: C } = Q({
|
|
5359
5435
|
ref: b,
|
|
@@ -5398,35 +5474,35 @@ var hr = i(function({ value: e, onChange: t, label: n, required: r = !1, hint: i
|
|
|
5398
5474
|
})
|
|
5399
5475
|
]
|
|
5400
5476
|
});
|
|
5401
|
-
}),
|
|
5402
|
-
function
|
|
5403
|
-
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($);
|
|
5404
5480
|
}
|
|
5405
|
-
function
|
|
5406
|
-
let t =
|
|
5407
|
-
t !== void 0 && (clearTimeout(t),
|
|
5481
|
+
function kr(e) {
|
|
5482
|
+
let t = Tr.get(e);
|
|
5483
|
+
t !== void 0 && (clearTimeout(t), Tr.delete(e));
|
|
5408
5484
|
}
|
|
5409
|
-
function
|
|
5410
|
-
if (e.length <=
|
|
5485
|
+
function Ar(e, t) {
|
|
5486
|
+
if (e.length <= Cr) return e;
|
|
5411
5487
|
let n = [...e], r = [];
|
|
5412
|
-
for (; n.length >
|
|
5488
|
+
for (; n.length > Cr;) {
|
|
5413
5489
|
let e = n.findIndex((e) => e.id !== t && e.duration !== 0);
|
|
5414
5490
|
r.push(n.splice(e === -1 ? n.findIndex((e) => e.id !== t) : e, 1)[0]);
|
|
5415
5491
|
}
|
|
5416
|
-
for (let e of r)
|
|
5492
|
+
for (let e of r) kr(e.id), Er.delete(e.id);
|
|
5417
5493
|
return n;
|
|
5418
5494
|
}
|
|
5419
|
-
function
|
|
5420
|
-
return
|
|
5421
|
-
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)));
|
|
5422
5498
|
};
|
|
5423
5499
|
}
|
|
5424
|
-
function
|
|
5500
|
+
function Mr(e, t, n = {}) {
|
|
5425
5501
|
let r = n.id, i = r || typeof e != "string" ? void 0 : `${t}:${e}`;
|
|
5426
5502
|
if (r) {
|
|
5427
5503
|
let i = $.find((e) => e.externalId === r);
|
|
5428
5504
|
if (i) {
|
|
5429
|
-
|
|
5505
|
+
kr(i.id);
|
|
5430
5506
|
let r = n.duration === void 0 ? 5e3 : n.duration;
|
|
5431
5507
|
$ = $.map((a) => a.id === i.id ? {
|
|
5432
5508
|
...a,
|
|
@@ -5439,12 +5515,12 @@ function Tr(e, t, n = {}) {
|
|
|
5439
5515
|
shape: n.shape,
|
|
5440
5516
|
surface: n.surface,
|
|
5441
5517
|
progress: n.progress
|
|
5442
|
-
} : a),
|
|
5518
|
+
} : a), Or(), r > 0 && !Er.has(i.id) && Tr.set(i.id, setTimeout(() => Pr(i.id), r));
|
|
5443
5519
|
return;
|
|
5444
5520
|
}
|
|
5445
5521
|
} else if (i && $.some((e) => e.key === i)) return;
|
|
5446
|
-
let a = ++
|
|
5447
|
-
$ =
|
|
5522
|
+
let a = ++Dr, o = n.duration === void 0 ? 5e3 : n.duration;
|
|
5523
|
+
$ = Ar([...$, {
|
|
5448
5524
|
id: a,
|
|
5449
5525
|
externalId: r,
|
|
5450
5526
|
message: e,
|
|
@@ -5457,25 +5533,25 @@ function Tr(e, t, n = {}) {
|
|
|
5457
5533
|
surface: n.surface,
|
|
5458
5534
|
progress: n.progress,
|
|
5459
5535
|
key: i
|
|
5460
|
-
}], a),
|
|
5536
|
+
}], a), Or(), o > 0 && Tr.set(a, setTimeout(() => Pr(a), o));
|
|
5461
5537
|
}
|
|
5462
|
-
function
|
|
5463
|
-
|
|
5538
|
+
function Nr(e) {
|
|
5539
|
+
kr(e), Er.add(e);
|
|
5464
5540
|
}
|
|
5465
|
-
function
|
|
5466
|
-
|
|
5541
|
+
function Pr(e) {
|
|
5542
|
+
kr(e), Er.delete(e);
|
|
5467
5543
|
let t = $.filter((t) => t.id !== e);
|
|
5468
|
-
t.length !== $.length && ($ = t,
|
|
5544
|
+
t.length !== $.length && ($ = t, Or());
|
|
5469
5545
|
}
|
|
5470
|
-
function
|
|
5471
|
-
if (!($.length === 0 &&
|
|
5472
|
-
for (let e of
|
|
5473
|
-
|
|
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());
|
|
5474
5550
|
}
|
|
5475
5551
|
}
|
|
5476
5552
|
//#endregion
|
|
5477
5553
|
//#region src/components/AppToast.jsx
|
|
5478
|
-
var
|
|
5554
|
+
var Ir = {
|
|
5479
5555
|
success: {
|
|
5480
5556
|
icon: "check-circle",
|
|
5481
5557
|
assertive: !1
|
|
@@ -5492,7 +5568,7 @@ var kr = {
|
|
|
5492
5568
|
icon: "alert-circle",
|
|
5493
5569
|
assertive: !0
|
|
5494
5570
|
}
|
|
5495
|
-
},
|
|
5571
|
+
}, Lr = {
|
|
5496
5572
|
"top-start": "top-0 start-0",
|
|
5497
5573
|
"top-center": "top-0 start-50 translate-middle-x",
|
|
5498
5574
|
"top-end": "top-0 end-0",
|
|
@@ -5500,21 +5576,21 @@ var kr = {
|
|
|
5500
5576
|
"bottom-start": "bottom-0 start-0",
|
|
5501
5577
|
"bottom-center": "bottom-0 start-50 translate-middle-x",
|
|
5502
5578
|
"bottom-end": "bottom-0 end-0"
|
|
5503
|
-
},
|
|
5579
|
+
}, Rr = 64, zr = /* @__PURE__ */ new Set([
|
|
5504
5580
|
"rise",
|
|
5505
5581
|
"organic",
|
|
5506
5582
|
"jelly",
|
|
5507
5583
|
"spring"
|
|
5508
|
-
]),
|
|
5584
|
+
]), Br = /* @__PURE__ */ new Set([
|
|
5509
5585
|
"rounded",
|
|
5510
5586
|
"pill",
|
|
5511
5587
|
"sharp"
|
|
5512
|
-
]),
|
|
5513
|
-
function
|
|
5514
|
-
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);
|
|
5515
5591
|
let [c, l] = f([]);
|
|
5516
|
-
o(() =>
|
|
5517
|
-
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"];
|
|
5518
5594
|
return /* @__PURE__ */ D("div", {
|
|
5519
5595
|
...s,
|
|
5520
5596
|
className: `wui-toast-container toast-container position-fixed ${p} p-3 ${a}`.trim(),
|
|
@@ -5526,7 +5602,7 @@ function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5526
5602
|
u,
|
|
5527
5603
|
" more"
|
|
5528
5604
|
]
|
|
5529
|
-
}), d.map((e) => /* @__PURE__ */ E(
|
|
5605
|
+
}), d.map((e) => /* @__PURE__ */ E(Ur, {
|
|
5530
5606
|
toast: e,
|
|
5531
5607
|
defaultAnimation: n,
|
|
5532
5608
|
defaultShape: r,
|
|
@@ -5534,14 +5610,14 @@ function Fr({ position: e = "bottom-end", maxVisible: t = 4, animation: n = "ris
|
|
|
5534
5610
|
}, e.id))]
|
|
5535
5611
|
});
|
|
5536
5612
|
}
|
|
5537
|
-
function
|
|
5538
|
-
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);
|
|
5539
5615
|
o(() => {
|
|
5540
5616
|
if (e.duration === 0) return;
|
|
5541
|
-
|
|
5617
|
+
Nr(e.id);
|
|
5542
5618
|
let t = y.current, n = t == null ? "" : getComputedStyle(t).animationName;
|
|
5543
5619
|
if (t != null && (typeof t.getAnimations == "function" ? t.getAnimations().length > 0 : n !== "" && n !== "none")) return;
|
|
5544
|
-
let r = setTimeout(() =>
|
|
5620
|
+
let r = setTimeout(() => Pr(e.id), e.duration);
|
|
5545
5621
|
return () => clearTimeout(r);
|
|
5546
5622
|
}, [e.id, e.duration]);
|
|
5547
5623
|
let b = (e) => {
|
|
@@ -5553,7 +5629,7 @@ function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5553
5629
|
}, C = (e) => {
|
|
5554
5630
|
if (_.current === null) return;
|
|
5555
5631
|
let t = e.clientX - _.current;
|
|
5556
|
-
if (Math.abs(t) >
|
|
5632
|
+
if (Math.abs(t) > Rr) {
|
|
5557
5633
|
v();
|
|
5558
5634
|
return;
|
|
5559
5635
|
}
|
|
@@ -5637,7 +5713,7 @@ function Ir({ toast: e, defaultAnimation: t = "rise", defaultShape: n = "rounded
|
|
|
5637
5713
|
}
|
|
5638
5714
|
//#endregion
|
|
5639
5715
|
//#region src/components/AppToolbar.jsx
|
|
5640
|
-
function
|
|
5716
|
+
function Wr({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelect: i, label: a, name: o, disabled: c = !1, className: l = "", ...u }) {
|
|
5641
5717
|
U("AppToolbar", u);
|
|
5642
5718
|
let d = s(), p = o || d, [m, h] = f(r), g = n === void 0 ? m : n;
|
|
5643
5719
|
return /* @__PURE__ */ D("div", {
|
|
@@ -5695,7 +5771,7 @@ function Lr({ items: e = [], actions: t = [], value: n, defaultValue: r, onSelec
|
|
|
5695
5771
|
}
|
|
5696
5772
|
//#endregion
|
|
5697
5773
|
//#region src/components/AppWizard.jsx
|
|
5698
|
-
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) {
|
|
5699
5775
|
U("AppWizard", T);
|
|
5700
5776
|
let O = d(null), k = (e) => {
|
|
5701
5777
|
O.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
@@ -5747,13 +5823,13 @@ var Rr = i(function({ steps: t = [], children: n, active: r, defaultActive: i =
|
|
|
5747
5823
|
children: A[t]
|
|
5748
5824
|
}, e.key ?? `${e.label}-${t}`))
|
|
5749
5825
|
});
|
|
5750
|
-
}),
|
|
5826
|
+
}), Kr = /* @__PURE__ */ new Set([
|
|
5751
5827
|
"ArrowUp",
|
|
5752
5828
|
"ArrowDown",
|
|
5753
5829
|
"ArrowLeft",
|
|
5754
5830
|
"ArrowRight"
|
|
5755
5831
|
]);
|
|
5756
|
-
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, ..._ }) {
|
|
5757
5833
|
let { onToggle: y, ...b } = _;
|
|
5758
5834
|
U("AppWorkspaceSwitcher", b);
|
|
5759
5835
|
let [x, S] = f(""), [C, w] = f(!1), T = d(null), O = (e, t) => {
|
|
@@ -5773,7 +5849,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5773
5849
|
let e = T.current;
|
|
5774
5850
|
if (!e) return;
|
|
5775
5851
|
let t = (e) => {
|
|
5776
|
-
if (
|
|
5852
|
+
if (Kr.has(e.key)) {
|
|
5777
5853
|
e.stopPropagation();
|
|
5778
5854
|
return;
|
|
5779
5855
|
}
|
|
@@ -5791,7 +5867,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5791
5867
|
onToggle: O,
|
|
5792
5868
|
...b,
|
|
5793
5869
|
children: [/* @__PURE__ */ E(v.Toggle, {
|
|
5794
|
-
as:
|
|
5870
|
+
as: Zr,
|
|
5795
5871
|
compact: m,
|
|
5796
5872
|
tenant: k,
|
|
5797
5873
|
"aria-label": M
|
|
@@ -5826,7 +5902,7 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5826
5902
|
className: `workspace-switcher-option${e.id === k?.id ? " is-active" : ""}`,
|
|
5827
5903
|
onClick: () => n?.(e),
|
|
5828
5904
|
children: [
|
|
5829
|
-
/* @__PURE__ */ E(
|
|
5905
|
+
/* @__PURE__ */ E(Yr, { tenant: e }),
|
|
5830
5906
|
/* @__PURE__ */ E("span", {
|
|
5831
5907
|
className: "workspace-switcher-option-name",
|
|
5832
5908
|
children: e.name
|
|
@@ -5858,17 +5934,17 @@ function Br({ tenants: e = [], currentId: t, onSelect: n, menuLabel: r, footerAc
|
|
|
5858
5934
|
}) : null,
|
|
5859
5935
|
i ? /* @__PURE__ */ E("div", {
|
|
5860
5936
|
className: "workspace-switcher-footer",
|
|
5861
|
-
children:
|
|
5937
|
+
children: Xr(i, a)
|
|
5862
5938
|
}) : null
|
|
5863
5939
|
]
|
|
5864
5940
|
})]
|
|
5865
5941
|
});
|
|
5866
5942
|
}
|
|
5867
|
-
function
|
|
5943
|
+
function Jr(e) {
|
|
5868
5944
|
let t = String(e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
5869
5945
|
return t.length === 0 ? "" : (t[0][0] + (t.length > 1 ? t[t.length - 1][0] : "")).toUpperCase();
|
|
5870
5946
|
}
|
|
5871
|
-
function
|
|
5947
|
+
function Yr({ tenant: e }) {
|
|
5872
5948
|
return e?.logoUrl ? /* @__PURE__ */ E("img", {
|
|
5873
5949
|
className: "workspace-switcher-mark",
|
|
5874
5950
|
src: e.logoUrl,
|
|
@@ -5876,10 +5952,10 @@ function Hr({ tenant: e }) {
|
|
|
5876
5952
|
loading: "lazy"
|
|
5877
5953
|
}) : /* @__PURE__ */ E("span", {
|
|
5878
5954
|
className: "workspace-switcher-mark",
|
|
5879
|
-
children:
|
|
5955
|
+
children: Jr(e?.name)
|
|
5880
5956
|
});
|
|
5881
5957
|
}
|
|
5882
|
-
function
|
|
5958
|
+
function Xr(e, t) {
|
|
5883
5959
|
if (typeof e != "object" || !e || !("label" in e)) return e;
|
|
5884
5960
|
let { label: n, icon: r, href: i } = e;
|
|
5885
5961
|
return /* @__PURE__ */ D(i ? t ?? "a" : "button", {
|
|
@@ -5891,7 +5967,7 @@ function Ur(e, t) {
|
|
|
5891
5967
|
}) : null, n]
|
|
5892
5968
|
});
|
|
5893
5969
|
}
|
|
5894
|
-
var
|
|
5970
|
+
var Zr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i }, a) {
|
|
5895
5971
|
return /* @__PURE__ */ D("button", {
|
|
5896
5972
|
ref: a,
|
|
5897
5973
|
type: "button",
|
|
@@ -5899,7 +5975,7 @@ var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5899
5975
|
"aria-haspopup": "true",
|
|
5900
5976
|
"aria-label": n,
|
|
5901
5977
|
...i,
|
|
5902
|
-
children: [/* @__PURE__ */ E(
|
|
5978
|
+
children: [/* @__PURE__ */ E(Yr, { tenant: t }), e ? null : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
5903
5979
|
className: "workspace-switcher-trigger-name",
|
|
5904
5980
|
children: t?.name
|
|
5905
5981
|
}), /* @__PURE__ */ E(Y, {
|
|
@@ -5911,36 +5987,36 @@ var Wr = i(function({ compact: e, tenant: t, "aria-label": n, className: r, ...i
|
|
|
5911
5987
|
});
|
|
5912
5988
|
//#endregion
|
|
5913
5989
|
//#region src/components/toast.js
|
|
5914
|
-
function
|
|
5915
|
-
|
|
5990
|
+
function Qr() {
|
|
5991
|
+
Fr();
|
|
5916
5992
|
}
|
|
5917
|
-
var
|
|
5993
|
+
var $r = /* @__PURE__ */ new Set([
|
|
5918
5994
|
"success",
|
|
5919
5995
|
"info",
|
|
5920
5996
|
"warning",
|
|
5921
5997
|
"danger"
|
|
5922
5998
|
]);
|
|
5923
|
-
function
|
|
5999
|
+
function ei(e, t = "info") {
|
|
5924
6000
|
let n = "info", r = {};
|
|
5925
|
-
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);
|
|
5926
6002
|
}
|
|
5927
|
-
function
|
|
5928
|
-
|
|
6003
|
+
function ti(e, t = {}) {
|
|
6004
|
+
Mr(e, "danger", t);
|
|
5929
6005
|
}
|
|
5930
|
-
|
|
6006
|
+
ei.promise = (e, t, n = {}) => {
|
|
5931
6007
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
5932
|
-
return
|
|
6008
|
+
return ei(t.loading || "Loading...", {
|
|
5933
6009
|
...n,
|
|
5934
6010
|
variant: "info",
|
|
5935
6011
|
id: r,
|
|
5936
6012
|
duration: 0
|
|
5937
|
-
}), e.then((e) => (
|
|
6013
|
+
}), e.then((e) => (ei((typeof t.success == "function" ? t.success(e) : t.success) || "Done", {
|
|
5938
6014
|
...n,
|
|
5939
6015
|
variant: "success",
|
|
5940
6016
|
id: r,
|
|
5941
6017
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
5942
6018
|
}), e)).catch((e) => {
|
|
5943
|
-
throw
|
|
6019
|
+
throw ei((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
5944
6020
|
...n,
|
|
5945
6021
|
variant: "danger",
|
|
5946
6022
|
id: r,
|
|
@@ -5950,7 +6026,7 @@ qr.promise = (e, t, n = {}) => {
|
|
|
5950
6026
|
};
|
|
5951
6027
|
//#endregion
|
|
5952
6028
|
//#region src/lib/usePagination.js
|
|
5953
|
-
function
|
|
6029
|
+
function ni(e, t = 10) {
|
|
5954
6030
|
let [n, r] = f(1), [i, a] = f(t), s = e.length, c = Math.max(1, Math.ceil(s / i));
|
|
5955
6031
|
o(() => {
|
|
5956
6032
|
n > c && r(c);
|
|
@@ -5976,4 +6052,4 @@ function Yr(e, t = 10) {
|
|
|
5976
6052
|
};
|
|
5977
6053
|
}
|
|
5978
6054
|
//#endregion
|
|
5979
|
-
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 };
|