@idds/react 1.6.33 → 1.6.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as _, jsx as n, Fragment as tt } from "react/jsx-runtime";
|
|
2
2
|
import pe, { useRef as ce, useState as J, useCallback as ye, useMemo as Pe, useContext as zt, createContext as Bt, useId as ba, useEffect as de, forwardRef as wa, useImperativeHandle as ka, Fragment as en } from "react";
|
|
3
3
|
import { createPortal as Pt } from "react-dom";
|
|
4
4
|
const xr = {
|
|
@@ -478,7 +478,7 @@ function Lr({
|
|
|
478
478
|
className: s = "",
|
|
479
479
|
...i
|
|
480
480
|
}) {
|
|
481
|
-
return /* @__PURE__ */
|
|
481
|
+
return /* @__PURE__ */ _(
|
|
482
482
|
"ul",
|
|
483
483
|
{
|
|
484
484
|
className: `
|
|
@@ -554,7 +554,7 @@ function zr({
|
|
|
554
554
|
className: t = "",
|
|
555
555
|
...r
|
|
556
556
|
}) {
|
|
557
|
-
return /* @__PURE__ */
|
|
557
|
+
return /* @__PURE__ */ _("div", { className: `ina-list-item-text ${t}`, ...r, children: [
|
|
558
558
|
/* @__PURE__ */ n("span", { className: "ina-list-item-text__primary", children: e }),
|
|
559
559
|
a && /* @__PURE__ */ n("span", { className: "ina-list-item-text__secondary", children: a })
|
|
560
560
|
] });
|
|
@@ -607,31 +607,31 @@ function Pr(e) {
|
|
|
607
607
|
onChange: s,
|
|
608
608
|
className: i,
|
|
609
609
|
children: l
|
|
610
|
-
} = e, c = t || a || !1, v = ce(/* @__PURE__ */ new Map()), [
|
|
610
|
+
} = e, c = t || a || !1, v = ce(/* @__PURE__ */ new Map()), [p, u] = J(
|
|
611
611
|
r !== void 0 ? [r] : []
|
|
612
|
-
), [k, g] = J(0), m = ce(
|
|
613
|
-
m.current =
|
|
612
|
+
), [k, g] = J(0), m = ce(p);
|
|
613
|
+
m.current = p;
|
|
614
614
|
const C = ye(
|
|
615
|
-
(b,
|
|
616
|
-
const
|
|
617
|
-
return v.current.set(b,
|
|
615
|
+
(b, y) => {
|
|
616
|
+
const f = v.current.size;
|
|
617
|
+
return v.current.set(b, f), y && u((T) => c ? T.includes(f) ? T : [...T, f] : T.length === 0 ? [f] : T), f;
|
|
618
618
|
},
|
|
619
619
|
[c]
|
|
620
620
|
), I = ye((b) => {
|
|
621
|
-
const
|
|
622
|
-
if (
|
|
623
|
-
v.current.delete(b), u((S) => S.filter((B) => B !==
|
|
624
|
-
const
|
|
621
|
+
const y = v.current.get(b);
|
|
622
|
+
if (y !== void 0) {
|
|
623
|
+
v.current.delete(b), u((S) => S.filter((B) => B !== y).map((B) => B > y ? B - 1 : B));
|
|
624
|
+
const f = /* @__PURE__ */ new Map();
|
|
625
625
|
let T = 0;
|
|
626
626
|
v.current.forEach((S, q) => {
|
|
627
|
-
|
|
628
|
-
}), v.current =
|
|
627
|
+
f.set(q, T), T++;
|
|
628
|
+
}), v.current = f;
|
|
629
629
|
}
|
|
630
630
|
}, []), D = ye(
|
|
631
|
-
(b,
|
|
632
|
-
u((
|
|
631
|
+
(b, y) => {
|
|
632
|
+
u((f) => {
|
|
633
633
|
let T;
|
|
634
|
-
return c ?
|
|
634
|
+
return c ? y ? f.includes(b) ? T = f : T = [...f, b] : T = f.filter((S) => S !== b) : y ? T = [b] : T = [], g((S) => S + 1), s == null || s(T), T;
|
|
635
635
|
});
|
|
636
636
|
},
|
|
637
637
|
[c, s]
|
|
@@ -666,7 +666,7 @@ function Hr(e) {
|
|
|
666
666
|
onToggle: i,
|
|
667
667
|
disabled: l = !1,
|
|
668
668
|
className: c
|
|
669
|
-
} = e, [v,
|
|
669
|
+
} = e, [v, p] = J(r), u = tn(), k = ba().replace(/:/g, "-"), g = ce(`accordion-${k}`), [m, C] = J(-1), I = ce(r);
|
|
670
670
|
I.current = r;
|
|
671
671
|
const { registerItem: D, unregisterItem: E } = u || {};
|
|
672
672
|
de(() => {
|
|
@@ -678,20 +678,20 @@ function Hr(e) {
|
|
|
678
678
|
E && (E(g.current), C(-1));
|
|
679
679
|
};
|
|
680
680
|
}, [D, E]);
|
|
681
|
-
const x = u !== null, b = s !== void 0 || x,
|
|
681
|
+
const x = u !== null, b = s !== void 0 || x, y = Pe(() => x && m >= 0 && u ? u.isItemOpen(m) : s !== void 0 ? s : v, [x, m, u, s, v]), f = Pe(() => `accordion-header-${g.current}`, []), T = Pe(() => `accordion-content-${g.current}`, []), S = () => {
|
|
682
682
|
if (l) return;
|
|
683
|
-
const B = !
|
|
684
|
-
x && m >= 0 && u ? u.handleItemToggle(m, B) : b ||
|
|
683
|
+
const B = !y;
|
|
684
|
+
x && m >= 0 && u ? u.handleItemToggle(m, B) : b || p(B), i == null || i(B);
|
|
685
685
|
}, q = A("ina-accordion", c, {
|
|
686
686
|
"ina-accordion--disabled": l,
|
|
687
|
-
"ina-accordion--open":
|
|
687
|
+
"ina-accordion--open": y
|
|
688
688
|
});
|
|
689
|
-
return /* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
689
|
+
return /* @__PURE__ */ _("div", { className: q, children: [
|
|
690
|
+
/* @__PURE__ */ _(
|
|
691
691
|
"button",
|
|
692
692
|
{
|
|
693
693
|
type: "button",
|
|
694
|
-
id:
|
|
694
|
+
id: f,
|
|
695
695
|
onClick: S,
|
|
696
696
|
onKeyDown: (B) => {
|
|
697
697
|
var $;
|
|
@@ -713,7 +713,7 @@ function Hr(e) {
|
|
|
713
713
|
}
|
|
714
714
|
},
|
|
715
715
|
className: "ina-accordion__toggle",
|
|
716
|
-
"aria-expanded":
|
|
716
|
+
"aria-expanded": y,
|
|
717
717
|
"aria-controls": T,
|
|
718
718
|
disabled: l,
|
|
719
719
|
children: [
|
|
@@ -722,7 +722,7 @@ function Hr(e) {
|
|
|
722
722
|
"svg",
|
|
723
723
|
{
|
|
724
724
|
className: A("ina-accordion__icon", {
|
|
725
|
-
"ina-accordion__icon--open":
|
|
725
|
+
"ina-accordion__icon--open": y
|
|
726
726
|
}),
|
|
727
727
|
viewBox: "0 0 24 24",
|
|
728
728
|
fill: "none",
|
|
@@ -747,15 +747,15 @@ function Hr(e) {
|
|
|
747
747
|
{
|
|
748
748
|
id: T,
|
|
749
749
|
className: A("ina-accordion__content", {
|
|
750
|
-
"ina-accordion__content--open":
|
|
750
|
+
"ina-accordion__content--open": y
|
|
751
751
|
}),
|
|
752
|
-
"aria-labelledby":
|
|
752
|
+
"aria-labelledby": f,
|
|
753
753
|
children: /* @__PURE__ */ n("div", { className: "ina-accordion__body", children: t })
|
|
754
754
|
}
|
|
755
755
|
)
|
|
756
756
|
] });
|
|
757
757
|
}
|
|
758
|
-
const Ma = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
758
|
+
const Ma = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
759
759
|
"svg",
|
|
760
760
|
{
|
|
761
761
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -782,11 +782,11 @@ function Or({
|
|
|
782
782
|
onToggle: s,
|
|
783
783
|
className: i = ""
|
|
784
784
|
}) {
|
|
785
|
-
const [l, c] = J(r), v = t !== void 0,
|
|
785
|
+
const [l, c] = J(r), v = t !== void 0, p = v ? t : l, u = ce(null), [k, g] = J("0px");
|
|
786
786
|
de(() => {
|
|
787
787
|
const I = u.current;
|
|
788
788
|
if (I)
|
|
789
|
-
if (
|
|
789
|
+
if (p) {
|
|
790
790
|
const D = I.scrollHeight;
|
|
791
791
|
g(`${D}px`);
|
|
792
792
|
} else {
|
|
@@ -795,21 +795,21 @@ function Or({
|
|
|
795
795
|
g("0px");
|
|
796
796
|
});
|
|
797
797
|
}
|
|
798
|
-
}, [
|
|
798
|
+
}, [p]);
|
|
799
799
|
const m = () => {
|
|
800
|
-
|
|
800
|
+
p && g("auto");
|
|
801
801
|
}, C = () => {
|
|
802
|
-
const I = !
|
|
802
|
+
const I = !p;
|
|
803
803
|
v || c(I), s == null || s(I);
|
|
804
804
|
};
|
|
805
|
-
return /* @__PURE__ */
|
|
806
|
-
/* @__PURE__ */
|
|
805
|
+
return /* @__PURE__ */ _("div", { className: A("ina-accordion-card", i), children: [
|
|
806
|
+
/* @__PURE__ */ _("div", { onClick: C, className: "ina-accordion-card__header", children: [
|
|
807
807
|
/* @__PURE__ */ n("div", { className: "ina-accordion-card__icon", children: /* @__PURE__ */ n(
|
|
808
808
|
Ma,
|
|
809
809
|
{
|
|
810
810
|
size: 20,
|
|
811
811
|
className: A("ina-accordion-card__chevron", {
|
|
812
|
-
"ina-accordion-card__chevron--open":
|
|
812
|
+
"ina-accordion-card__chevron--open": p
|
|
813
813
|
})
|
|
814
814
|
}
|
|
815
815
|
) }),
|
|
@@ -840,9 +840,9 @@ const an = wa(
|
|
|
840
840
|
triggerClassName: l,
|
|
841
841
|
width: c = "auto",
|
|
842
842
|
disabled: v = !1
|
|
843
|
-
},
|
|
843
|
+
}, p) => {
|
|
844
844
|
const [u, k] = J(!1), g = ce(null), m = ce(null);
|
|
845
|
-
ka(
|
|
845
|
+
ka(p, () => ({
|
|
846
846
|
open: () => k(!0),
|
|
847
847
|
close: () => k(!1),
|
|
848
848
|
toggle: () => k((x) => !x)
|
|
@@ -871,13 +871,13 @@ const an = wa(
|
|
|
871
871
|
var b;
|
|
872
872
|
x.disabled || ((b = x.onClick) == null || b.call(x), k(!1));
|
|
873
873
|
};
|
|
874
|
-
return /* @__PURE__ */
|
|
874
|
+
return /* @__PURE__ */ _(
|
|
875
875
|
"div",
|
|
876
876
|
{
|
|
877
877
|
className: C,
|
|
878
878
|
ref: m,
|
|
879
879
|
children: [
|
|
880
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ _(
|
|
881
881
|
"button",
|
|
882
882
|
{
|
|
883
883
|
ref: g,
|
|
@@ -891,7 +891,7 @@ const an = wa(
|
|
|
891
891
|
]
|
|
892
892
|
}
|
|
893
893
|
),
|
|
894
|
-
/* @__PURE__ */ n("div", { className: D, children: /* @__PURE__ */ n("ul", { className: "ina-action-dropdown__list", children: a.map((x, b) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ n("div", { className: D, children: /* @__PURE__ */ n("ul", { className: "ina-action-dropdown__list", children: a.map((x, b) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ _(
|
|
895
895
|
"button",
|
|
896
896
|
{
|
|
897
897
|
type: "button",
|
|
@@ -914,7 +914,7 @@ const an = wa(
|
|
|
914
914
|
}
|
|
915
915
|
);
|
|
916
916
|
an.displayName = "ActionDropdown";
|
|
917
|
-
const ot = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
917
|
+
const ot = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
918
918
|
"svg",
|
|
919
919
|
{
|
|
920
920
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -932,7 +932,7 @@ const ot = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
932
932
|
/* @__PURE__ */ n("path", { d: "M5 12l5 5l10 -10" })
|
|
933
933
|
]
|
|
934
934
|
}
|
|
935
|
-
), Da = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
935
|
+
), Da = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
936
936
|
"svg",
|
|
937
937
|
{
|
|
938
938
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -952,7 +952,7 @@ const ot = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
952
952
|
/* @__PURE__ */ n("path", { d: "M11 12h1v4h1" })
|
|
953
953
|
]
|
|
954
954
|
}
|
|
955
|
-
), nn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
955
|
+
), nn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
956
956
|
"svg",
|
|
957
957
|
{
|
|
958
958
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -972,7 +972,7 @@ const ot = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
972
972
|
/* @__PURE__ */ n("path", { d: "M12 16h.01" })
|
|
973
973
|
]
|
|
974
974
|
}
|
|
975
|
-
), ze = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
975
|
+
), ze = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
976
976
|
"svg",
|
|
977
977
|
{
|
|
978
978
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -991,7 +991,7 @@ const ot = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
991
991
|
/* @__PURE__ */ n("path", { d: "M6 6l12 12" })
|
|
992
992
|
]
|
|
993
993
|
}
|
|
994
|
-
), Ia = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
994
|
+
), Ia = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
995
995
|
"svg",
|
|
996
996
|
{
|
|
997
997
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1011,7 +1011,7 @@ const ot = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
1011
1011
|
/* @__PURE__ */ n("path", { d: "M12 16h.01" })
|
|
1012
1012
|
]
|
|
1013
1013
|
}
|
|
1014
|
-
), rn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
1014
|
+
), rn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
1015
1015
|
"svg",
|
|
1016
1016
|
{
|
|
1017
1017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1064,9 +1064,9 @@ function Ur(e) {
|
|
|
1064
1064
|
},
|
|
1065
1065
|
v
|
|
1066
1066
|
);
|
|
1067
|
-
return /* @__PURE__ */
|
|
1067
|
+
return /* @__PURE__ */ _("div", { className: g, role: "alert", children: [
|
|
1068
1068
|
k && /* @__PURE__ */ n("div", { className: "ina-alert__icon", children: u }),
|
|
1069
|
-
/* @__PURE__ */ n("div", { className: "ina-alert__content", children: /* @__PURE__ */
|
|
1069
|
+
/* @__PURE__ */ n("div", { className: "ina-alert__content", children: /* @__PURE__ */ _("div", { className: "ina-alert__text-section", children: [
|
|
1070
1070
|
t && /* @__PURE__ */ n("div", { className: "ina-alert__title", children: t }),
|
|
1071
1071
|
r && /* @__PURE__ */ n("div", { className: "ina-alert__description", children: r })
|
|
1072
1072
|
] }) }),
|
|
@@ -1124,7 +1124,7 @@ function Gr({
|
|
|
1124
1124
|
`ina-badge--rounded-${r}`,
|
|
1125
1125
|
c
|
|
1126
1126
|
);
|
|
1127
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ _("span", { className: v, children: [
|
|
1128
1128
|
s && /* @__PURE__ */ n("span", { className: "ina-badge__prefix-icon", children: s }),
|
|
1129
1129
|
/* @__PURE__ */ n("span", { children: l }),
|
|
1130
1130
|
i && /* @__PURE__ */ n("span", { className: "ina-badge__suffix-icon", children: i })
|
|
@@ -1137,39 +1137,39 @@ function Kr({
|
|
|
1137
1137
|
children: r = /* @__PURE__ */ n(tt, {})
|
|
1138
1138
|
}) {
|
|
1139
1139
|
const s = ce(null), i = Pe(() => {
|
|
1140
|
-
const
|
|
1141
|
-
return e ||
|
|
1140
|
+
const p = ["bottom-sheet-dropdown"];
|
|
1141
|
+
return e || p.push("bottom-sheet-dropdown--closing"), p.join(" ");
|
|
1142
1142
|
}, [e]), l = ye(
|
|
1143
|
-
(
|
|
1144
|
-
|
|
1143
|
+
(p) => {
|
|
1144
|
+
p.preventDefault(), a || t(p);
|
|
1145
1145
|
},
|
|
1146
1146
|
[a, t]
|
|
1147
1147
|
), c = ye(
|
|
1148
|
-
(
|
|
1148
|
+
(p) => {
|
|
1149
1149
|
const { current: u } = s;
|
|
1150
|
-
|
|
1150
|
+
p.target === u && !a && t(p);
|
|
1151
1151
|
},
|
|
1152
1152
|
[a, t]
|
|
1153
1153
|
), v = ye(() => {
|
|
1154
|
-
const { current:
|
|
1155
|
-
e ||
|
|
1154
|
+
const { current: p } = s;
|
|
1155
|
+
e || p.close();
|
|
1156
1156
|
}, [e]);
|
|
1157
1157
|
return de(() => {
|
|
1158
|
-
const { current:
|
|
1159
|
-
e &&
|
|
1158
|
+
const { current: p } = s;
|
|
1159
|
+
e && p.showModal();
|
|
1160
1160
|
}, [e]), /* @__PURE__ */ n(
|
|
1161
1161
|
"dialog",
|
|
1162
1162
|
{
|
|
1163
1163
|
ref: s,
|
|
1164
1164
|
className: i,
|
|
1165
|
-
onClose: (
|
|
1166
|
-
t(
|
|
1165
|
+
onClose: (p) => {
|
|
1166
|
+
t(p);
|
|
1167
1167
|
},
|
|
1168
|
-
onCancel: (
|
|
1169
|
-
l(
|
|
1168
|
+
onCancel: (p) => {
|
|
1169
|
+
l(p);
|
|
1170
1170
|
},
|
|
1171
|
-
onClick: (
|
|
1172
|
-
c(
|
|
1171
|
+
onClick: (p) => {
|
|
1172
|
+
c(p);
|
|
1173
1173
|
},
|
|
1174
1174
|
onAnimationEnd: v,
|
|
1175
1175
|
children: r
|
|
@@ -1186,14 +1186,14 @@ const ct = pe.forwardRef(
|
|
|
1186
1186
|
children: l,
|
|
1187
1187
|
disabled: c = !1,
|
|
1188
1188
|
className: v = "",
|
|
1189
|
-
...
|
|
1189
|
+
...p
|
|
1190
1190
|
} = e, u = A(
|
|
1191
1191
|
"ina-button",
|
|
1192
1192
|
`ina-button--${t}`,
|
|
1193
1193
|
`ina-button--${r}`,
|
|
1194
1194
|
v
|
|
1195
1195
|
);
|
|
1196
|
-
return /* @__PURE__ */
|
|
1196
|
+
return /* @__PURE__ */ _("button", { ref: a, className: u, disabled: c, ...p, children: [
|
|
1197
1197
|
s && /* @__PURE__ */ n("span", { className: "ina-button__prefix-icon", children: s }),
|
|
1198
1198
|
l,
|
|
1199
1199
|
i && /* @__PURE__ */ n("span", { className: "ina-button__suffix-icon", children: i })
|
|
@@ -1211,7 +1211,7 @@ function jr({
|
|
|
1211
1211
|
mediaSrc: l,
|
|
1212
1212
|
mediaAlt: c,
|
|
1213
1213
|
showButton: v = !1,
|
|
1214
|
-
buttonText:
|
|
1214
|
+
buttonText: p,
|
|
1215
1215
|
buttonHierarchy: u = "primary",
|
|
1216
1216
|
onButtonClick: k,
|
|
1217
1217
|
showHeader: g = !0,
|
|
@@ -1243,30 +1243,30 @@ function jr({
|
|
|
1243
1243
|
"ina-card--with-header": g
|
|
1244
1244
|
},
|
|
1245
1245
|
I
|
|
1246
|
-
),
|
|
1247
|
-
return /* @__PURE__ */
|
|
1248
|
-
e === "basic" && x === "top" &&
|
|
1249
|
-
e === "overlay" &&
|
|
1250
|
-
e === "horizontal" && x === "left" &&
|
|
1251
|
-
/* @__PURE__ */
|
|
1246
|
+
), y = () => /* @__PURE__ */ n("div", { className: "ina-card__media", children: l ? /* @__PURE__ */ n("img", { src: l, alt: c || "Card media" }) : null });
|
|
1247
|
+
return /* @__PURE__ */ _("div", { className: b, children: [
|
|
1248
|
+
e === "basic" && x === "top" && y(),
|
|
1249
|
+
e === "overlay" && y(),
|
|
1250
|
+
e === "horizontal" && x === "left" && y(),
|
|
1251
|
+
/* @__PURE__ */ _("div", { className: "ina-card__content", children: [
|
|
1252
1252
|
t && /* @__PURE__ */ n("div", { className: "ina-card__avatar", children: /* @__PURE__ */ n("img", { src: t, alt: r || "Avatar" }) }),
|
|
1253
|
-
(s || i) && /* @__PURE__ */
|
|
1253
|
+
(s || i) && /* @__PURE__ */ _("div", { children: [
|
|
1254
1254
|
s && /* @__PURE__ */ n("h3", { className: "ina-card__title", children: s }),
|
|
1255
1255
|
i && /* @__PURE__ */ n("p", { className: "ina-card__description", children: i })
|
|
1256
1256
|
] }),
|
|
1257
1257
|
D && D,
|
|
1258
|
-
v &&
|
|
1258
|
+
v && p && /* @__PURE__ */ n("div", { className: "ina-card__button", children: /* @__PURE__ */ n(
|
|
1259
1259
|
ct,
|
|
1260
1260
|
{
|
|
1261
1261
|
hierarchy: u,
|
|
1262
1262
|
size: "md",
|
|
1263
1263
|
onClick: k,
|
|
1264
|
-
children:
|
|
1264
|
+
children: p
|
|
1265
1265
|
}
|
|
1266
1266
|
) })
|
|
1267
1267
|
] }),
|
|
1268
|
-
e === "basic" && x === "bottom" &&
|
|
1269
|
-
e === "horizontal" && x === "right" &&
|
|
1268
|
+
e === "basic" && x === "bottom" && y(),
|
|
1269
|
+
e === "horizontal" && x === "right" && y()
|
|
1270
1270
|
] });
|
|
1271
1271
|
}
|
|
1272
1272
|
const sn = ({
|
|
@@ -1275,7 +1275,7 @@ const sn = ({
|
|
|
1275
1275
|
...t
|
|
1276
1276
|
}) => /* @__PURE__ */ n("div", { className: A("ina-card-plain", a), ...t, children: e });
|
|
1277
1277
|
sn.displayName = "CardPlain";
|
|
1278
|
-
const dt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
1278
|
+
const dt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
1279
1279
|
"svg",
|
|
1280
1280
|
{
|
|
1281
1281
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1318,15 +1318,15 @@ function Yr({
|
|
|
1318
1318
|
);
|
|
1319
1319
|
if (v >= 0) {
|
|
1320
1320
|
i.preventDefault();
|
|
1321
|
-
const
|
|
1322
|
-
(l = c[
|
|
1321
|
+
const p = i.key === "ArrowRight" ? (v + 1) % c.length : (v - 1 + c.length) % c.length;
|
|
1322
|
+
(l = c[p]) == null || l.focus();
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
1325
|
},
|
|
1326
1326
|
children: /* @__PURE__ */ n("ol", { className: "ina-breadcrumb__list", children: e.map((i, l) => {
|
|
1327
|
-
const c = l === e.length - 1, v = c,
|
|
1328
|
-
return /* @__PURE__ */
|
|
1329
|
-
(i.href || i.onClick) && !v ? /* @__PURE__ */
|
|
1327
|
+
const c = l === e.length - 1, v = c, p = s(i.label, c);
|
|
1328
|
+
return /* @__PURE__ */ _("li", { className: "ina-breadcrumb__item", children: [
|
|
1329
|
+
(i.href || i.onClick) && !v ? /* @__PURE__ */ _(
|
|
1330
1330
|
"a",
|
|
1331
1331
|
{
|
|
1332
1332
|
href: i.href,
|
|
@@ -1350,10 +1350,10 @@ function Yr({
|
|
|
1350
1350
|
},
|
|
1351
1351
|
children: [
|
|
1352
1352
|
i.icon && /* @__PURE__ */ n("span", { className: "ina-breadcrumb__icon", children: i.icon }),
|
|
1353
|
-
/* @__PURE__ */ n("span", { className: "ina-breadcrumb__text", children:
|
|
1353
|
+
/* @__PURE__ */ n("span", { className: "ina-breadcrumb__text", children: p })
|
|
1354
1354
|
]
|
|
1355
1355
|
}
|
|
1356
|
-
) : /* @__PURE__ */
|
|
1356
|
+
) : /* @__PURE__ */ _(
|
|
1357
1357
|
"span",
|
|
1358
1358
|
{
|
|
1359
1359
|
className: A(
|
|
@@ -1363,7 +1363,7 @@ function Yr({
|
|
|
1363
1363
|
),
|
|
1364
1364
|
children: [
|
|
1365
1365
|
i.icon && /* @__PURE__ */ n("span", { className: "ina-breadcrumb__icon", children: i.icon }),
|
|
1366
|
-
/* @__PURE__ */ n("span", { className: "ina-breadcrumb__text", children:
|
|
1366
|
+
/* @__PURE__ */ n("span", { className: "ina-breadcrumb__text", children: p })
|
|
1367
1367
|
]
|
|
1368
1368
|
}
|
|
1369
1369
|
),
|
|
@@ -1394,13 +1394,13 @@ function qr({
|
|
|
1394
1394
|
r
|
|
1395
1395
|
),
|
|
1396
1396
|
children: e.map((c, v) => {
|
|
1397
|
-
const
|
|
1398
|
-
return /* @__PURE__ */
|
|
1399
|
-
/* @__PURE__ */
|
|
1397
|
+
const p = v < a, u = v === a, k = c.disabled, g = i.includes(v);
|
|
1398
|
+
return /* @__PURE__ */ _(en, { children: [
|
|
1399
|
+
/* @__PURE__ */ _(
|
|
1400
1400
|
"div",
|
|
1401
1401
|
{
|
|
1402
1402
|
className: A("ina-stepper__item", {
|
|
1403
|
-
"ina-stepper__item--completed":
|
|
1403
|
+
"ina-stepper__item--completed": p && !g,
|
|
1404
1404
|
"ina-stepper__item--active": u && !g,
|
|
1405
1405
|
"ina-stepper__item--error": g,
|
|
1406
1406
|
"ina-stepper__item--disabled": k,
|
|
@@ -1408,7 +1408,7 @@ function qr({
|
|
|
1408
1408
|
}),
|
|
1409
1409
|
onClick: () => !k && (s == null ? void 0 : s(v)),
|
|
1410
1410
|
children: [
|
|
1411
|
-
/* @__PURE__ */ n("div", { className: "ina-stepper__icon-wrapper", children:
|
|
1411
|
+
/* @__PURE__ */ n("div", { className: "ina-stepper__icon-wrapper", children: p ? /* @__PURE__ */ _(
|
|
1412
1412
|
"svg",
|
|
1413
1413
|
{
|
|
1414
1414
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1435,7 +1435,7 @@ function qr({
|
|
|
1435
1435
|
"div",
|
|
1436
1436
|
{
|
|
1437
1437
|
className: A("ina-stepper__separator", {
|
|
1438
|
-
"ina-stepper__separator--completed":
|
|
1438
|
+
"ina-stepper__separator--completed": p && !g
|
|
1439
1439
|
})
|
|
1440
1440
|
}
|
|
1441
1441
|
)
|
|
@@ -1453,8 +1453,8 @@ function Jr({
|
|
|
1453
1453
|
className: i = "",
|
|
1454
1454
|
name: l
|
|
1455
1455
|
}) {
|
|
1456
|
-
const c = a !== void 0, [v,
|
|
1457
|
-
s || I || (c ||
|
|
1456
|
+
const c = a !== void 0, [v, p] = pe.useState(t), u = ce([]), k = c ? a : v, g = (C, I) => {
|
|
1457
|
+
s || I || (c || p(C), r && r(C));
|
|
1458
1458
|
}, m = A(
|
|
1459
1459
|
"ina-button-group",
|
|
1460
1460
|
{
|
|
@@ -1477,19 +1477,19 @@ function Jr({
|
|
|
1477
1477
|
tabIndex: D ? 0 : -1,
|
|
1478
1478
|
onClick: () => g(C.value, C.disabled),
|
|
1479
1479
|
onKeyDown: (b) => {
|
|
1480
|
-
var
|
|
1480
|
+
var f, T;
|
|
1481
1481
|
if (E) return;
|
|
1482
|
-
let
|
|
1482
|
+
let y;
|
|
1483
1483
|
if (b.key === "Enter" || b.key === " ")
|
|
1484
1484
|
b.preventDefault(), g(C.value, C.disabled);
|
|
1485
1485
|
else if (b.key === "ArrowRight" || b.key === "ArrowDown") {
|
|
1486
|
-
for (b.preventDefault(),
|
|
1487
|
-
|
|
1488
|
-
(
|
|
1486
|
+
for (b.preventDefault(), y = (I + 1) % e.length; e[y].disabled && y !== I; )
|
|
1487
|
+
y = (y + 1) % e.length;
|
|
1488
|
+
(f = u.current[y]) == null || f.focus();
|
|
1489
1489
|
} else if (b.key === "ArrowLeft" || b.key === "ArrowUp") {
|
|
1490
|
-
for (b.preventDefault(),
|
|
1491
|
-
|
|
1492
|
-
(T = u.current[
|
|
1490
|
+
for (b.preventDefault(), y = (I - 1 + e.length) % e.length; e[y].disabled && y !== I; )
|
|
1491
|
+
y = (y - 1 + e.length) % e.length;
|
|
1492
|
+
(T = u.current[y]) == null || T.focus();
|
|
1493
1493
|
}
|
|
1494
1494
|
},
|
|
1495
1495
|
"aria-pressed": D,
|
|
@@ -1510,7 +1510,7 @@ function Zr({
|
|
|
1510
1510
|
trackColor: s = "#EAECF0",
|
|
1511
1511
|
className: i
|
|
1512
1512
|
}) {
|
|
1513
|
-
const l = Math.min(100, Math.max(0, e)), c = r.startsWith("#"), v = a / 2,
|
|
1513
|
+
const l = Math.min(100, Math.max(0, e)), c = r.startsWith("#"), v = a / 2, p = (a - t) / 2, u = 2 * Math.PI * p, k = u - l / 100 * u, g = A(
|
|
1514
1514
|
"ina-circle-progress-bar",
|
|
1515
1515
|
!c && `ina-circle-progress-bar--${r}`,
|
|
1516
1516
|
i
|
|
@@ -1519,7 +1519,7 @@ function Zr({
|
|
|
1519
1519
|
...s && { "--ina-circle-progress-track-color": s },
|
|
1520
1520
|
...c && { "--ina-circle-progress-color": r }
|
|
1521
1521
|
};
|
|
1522
|
-
return /* @__PURE__ */ n("div", { className: g, style: m, children: /* @__PURE__ */
|
|
1522
|
+
return /* @__PURE__ */ n("div", { className: g, style: m, children: /* @__PURE__ */ _(
|
|
1523
1523
|
"svg",
|
|
1524
1524
|
{
|
|
1525
1525
|
className: "ina-circle-progress-bar__svg",
|
|
@@ -1535,7 +1535,7 @@ function Zr({
|
|
|
1535
1535
|
className: "ina-circle-progress-bar__track",
|
|
1536
1536
|
cx: v,
|
|
1537
1537
|
cy: v,
|
|
1538
|
-
r:
|
|
1538
|
+
r: p,
|
|
1539
1539
|
strokeWidth: t
|
|
1540
1540
|
}
|
|
1541
1541
|
),
|
|
@@ -1545,7 +1545,7 @@ function Zr({
|
|
|
1545
1545
|
className: "ina-circle-progress-bar__progress",
|
|
1546
1546
|
cx: v,
|
|
1547
1547
|
cy: v,
|
|
1548
|
-
r:
|
|
1548
|
+
r: p,
|
|
1549
1549
|
strokeWidth: t,
|
|
1550
1550
|
strokeDasharray: u,
|
|
1551
1551
|
strokeDashoffset: k
|
|
@@ -1555,7 +1555,7 @@ function Zr({
|
|
|
1555
1555
|
}
|
|
1556
1556
|
) });
|
|
1557
1557
|
}
|
|
1558
|
-
const ln = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
1558
|
+
const ln = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
1559
1559
|
"svg",
|
|
1560
1560
|
{
|
|
1561
1561
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1582,7 +1582,7 @@ const ln = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
1582
1582
|
indeterminate: l = !1,
|
|
1583
1583
|
onChange: c,
|
|
1584
1584
|
disabled: v = !1,
|
|
1585
|
-
className:
|
|
1585
|
+
className: p = "",
|
|
1586
1586
|
invalid: u = !1,
|
|
1587
1587
|
...k
|
|
1588
1588
|
} = e, g = ce(null), m = (x) => {
|
|
@@ -1602,9 +1602,9 @@ const ln = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
1602
1602
|
"ina-checkbox",
|
|
1603
1603
|
{ "ina-checkbox--disabled": v },
|
|
1604
1604
|
{ "ina-checkbox--with-subtext": s },
|
|
1605
|
-
|
|
1605
|
+
p
|
|
1606
1606
|
);
|
|
1607
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ _("label", { htmlFor: t, className: E, children: [
|
|
1608
1608
|
/* @__PURE__ */ n(
|
|
1609
1609
|
"input",
|
|
1610
1610
|
{
|
|
@@ -1619,7 +1619,7 @@ const ln = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
1619
1619
|
}
|
|
1620
1620
|
),
|
|
1621
1621
|
/* @__PURE__ */ n("div", { className: A("ina-checkbox__box", D), children: I }),
|
|
1622
|
-
/* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ _("div", { className: "ina-checkbox__content", children: [
|
|
1623
1623
|
/* @__PURE__ */ n("span", { className: "ina-checkbox__label", children: r }),
|
|
1624
1624
|
s && /* @__PURE__ */ n("span", { className: "ina-checkbox__subtext", children: s })
|
|
1625
1625
|
] })
|
|
@@ -1636,7 +1636,7 @@ function Xr({
|
|
|
1636
1636
|
showCustomization: l = !1,
|
|
1637
1637
|
customizationLabel: c = "Kustomisasi",
|
|
1638
1638
|
customizationComponent: v,
|
|
1639
|
-
className:
|
|
1639
|
+
className: p = "",
|
|
1640
1640
|
selectedColor: u,
|
|
1641
1641
|
optionColor: k,
|
|
1642
1642
|
selectedChipClassName: g,
|
|
@@ -1644,7 +1644,7 @@ function Xr({
|
|
|
1644
1644
|
}) {
|
|
1645
1645
|
const C = Array.isArray(a) ? a : a ? [a] : [], I = C.filter(
|
|
1646
1646
|
(U) => !e.some((ee) => ee.value === U) && U !== ""
|
|
1647
|
-
), D = I.length > 0, E = I[I.length - 1] || "", [x, b] = J(!1), [
|
|
1647
|
+
), D = I.length > 0, E = I[I.length - 1] || "", [x, b] = J(!1), [y, f] = J(E), T = () => {
|
|
1648
1648
|
if (C.length > 0) {
|
|
1649
1649
|
if (D && l)
|
|
1650
1650
|
return e.length;
|
|
@@ -1658,7 +1658,7 @@ function Xr({
|
|
|
1658
1658
|
de(() => {
|
|
1659
1659
|
q(T());
|
|
1660
1660
|
}, [a, e, D]), de(() => {
|
|
1661
|
-
D ?
|
|
1661
|
+
D ? f(E) : (b(!1), f(""));
|
|
1662
1662
|
}, [a, D]);
|
|
1663
1663
|
const $ = (U) => {
|
|
1664
1664
|
if (U)
|
|
@@ -1668,15 +1668,15 @@ function Xr({
|
|
|
1668
1668
|
} else
|
|
1669
1669
|
C.includes(U) ? i == null || i("") : i == null || i(U);
|
|
1670
1670
|
}, ae = () => {
|
|
1671
|
-
const U =
|
|
1671
|
+
const U = y.trim();
|
|
1672
1672
|
if (t) {
|
|
1673
1673
|
let ee = [...C];
|
|
1674
1674
|
D && E && (ee = ee.filter((se) => se !== E)), U && (ee.includes(U) || ee.push(U)), i == null || i(ee);
|
|
1675
1675
|
} else
|
|
1676
1676
|
i == null || i(U);
|
|
1677
1677
|
b(!1);
|
|
1678
|
-
}, H = l ? [...e, { label: c, value: c }] : e, O = A("ina-chip",
|
|
1679
|
-
return /* @__PURE__ */
|
|
1678
|
+
}, H = l ? [...e, { label: c, value: c }] : e, O = A("ina-chip", p);
|
|
1679
|
+
return /* @__PURE__ */ _("div", { className: O, children: [
|
|
1680
1680
|
/* @__PURE__ */ n("div", { className: "ina-chip__list", children: H.map((U, ee) => {
|
|
1681
1681
|
const se = l && U.value === c, ne = se ? D : C.includes(U.value);
|
|
1682
1682
|
return /* @__PURE__ */ n(
|
|
@@ -1687,7 +1687,7 @@ function Xr({
|
|
|
1687
1687
|
tabIndex: ee === S && !U.disabled ? 0 : -1,
|
|
1688
1688
|
disabled: U.disabled,
|
|
1689
1689
|
onClick: () => {
|
|
1690
|
-
U.disabled || (q(ee), se ? (b(!0),
|
|
1690
|
+
U.disabled || (q(ee), se ? (b(!0), f(!t && !D ? "" : E)) : $(U.value));
|
|
1691
1691
|
},
|
|
1692
1692
|
onKeyDown: (L) => {
|
|
1693
1693
|
var P, W, fe, te, G;
|
|
@@ -1726,13 +1726,13 @@ function Xr({
|
|
|
1726
1726
|
`${U.label}-${ee}`
|
|
1727
1727
|
);
|
|
1728
1728
|
}) }),
|
|
1729
|
-
l && x && /* @__PURE__ */ n("div", { className: "ina-chip__custom-field", children: v ?? /* @__PURE__ */
|
|
1729
|
+
l && x && /* @__PURE__ */ n("div", { className: "ina-chip__custom-field", children: v ?? /* @__PURE__ */ _("div", { className: "ina-chip__input-wrapper", children: [
|
|
1730
1730
|
/* @__PURE__ */ n(
|
|
1731
1731
|
"input",
|
|
1732
1732
|
{
|
|
1733
1733
|
type: "text",
|
|
1734
|
-
value:
|
|
1735
|
-
onChange: (U) =>
|
|
1734
|
+
value: y,
|
|
1735
|
+
onChange: (U) => f(U.target.value),
|
|
1736
1736
|
onBlur: () => {
|
|
1737
1737
|
ae();
|
|
1738
1738
|
},
|
|
@@ -1743,14 +1743,14 @@ function Xr({
|
|
|
1743
1743
|
placeholder: "Masukkan data yang Anda inginkan"
|
|
1744
1744
|
}
|
|
1745
1745
|
),
|
|
1746
|
-
|
|
1746
|
+
y && /* @__PURE__ */ n(
|
|
1747
1747
|
"button",
|
|
1748
1748
|
{
|
|
1749
1749
|
type: "button",
|
|
1750
1750
|
className: "ina-chip__clear-button",
|
|
1751
1751
|
"aria-label": "Clear input",
|
|
1752
|
-
onClick: () =>
|
|
1753
|
-
children: /* @__PURE__ */
|
|
1752
|
+
onClick: () => f(""),
|
|
1753
|
+
children: /* @__PURE__ */ _(
|
|
1754
1754
|
"svg",
|
|
1755
1755
|
{
|
|
1756
1756
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1815,7 +1815,7 @@ function es({
|
|
|
1815
1815
|
);
|
|
1816
1816
|
return /* @__PURE__ */ n("hr", { className: i });
|
|
1817
1817
|
}
|
|
1818
|
-
const Aa = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
1818
|
+
const Aa = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
1819
1819
|
"svg",
|
|
1820
1820
|
{
|
|
1821
1821
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1844,43 +1844,43 @@ function ts({
|
|
|
1844
1844
|
className: l = "",
|
|
1845
1845
|
panelClassName: c = "",
|
|
1846
1846
|
triggerClassName: v = "",
|
|
1847
|
-
disabled:
|
|
1847
|
+
disabled: p = !1
|
|
1848
1848
|
}) {
|
|
1849
|
-
const [u, k] = J(r), g = t !== void 0, m = g ? t : u, C = ce(null), I = ce(null), D = ce(null), E = (
|
|
1850
|
-
g || k(
|
|
1851
|
-
}, x = (
|
|
1852
|
-
|
|
1853
|
-
}, b = (
|
|
1854
|
-
|
|
1849
|
+
const [u, k] = J(r), g = t !== void 0, m = g ? t : u, C = ce(null), I = ce(null), D = ce(null), E = (f) => {
|
|
1850
|
+
g || k(f), s == null || s(f);
|
|
1851
|
+
}, x = (f) => {
|
|
1852
|
+
f.stopPropagation(), !p && E(!m);
|
|
1853
|
+
}, b = (f) => {
|
|
1854
|
+
p || (f.key === "Enter" || f.key === " ") && (f.preventDefault(), E(!m));
|
|
1855
1855
|
};
|
|
1856
1856
|
de(() => {
|
|
1857
|
-
const
|
|
1857
|
+
const f = (S) => {
|
|
1858
1858
|
C.current && !C.current.contains(S.target) && m && E(!1);
|
|
1859
1859
|
}, T = (S) => {
|
|
1860
1860
|
S.key === "Escape" && m && E(!1);
|
|
1861
1861
|
};
|
|
1862
|
-
return document.addEventListener("mousedown",
|
|
1863
|
-
document.removeEventListener("mousedown",
|
|
1862
|
+
return document.addEventListener("mousedown", f), document.addEventListener("touchstart", f), document.addEventListener("keydown", T), () => {
|
|
1863
|
+
document.removeEventListener("mousedown", f), document.removeEventListener("touchstart", f), document.removeEventListener("keydown", T);
|
|
1864
1864
|
};
|
|
1865
1865
|
}, [m, s]);
|
|
1866
|
-
const
|
|
1867
|
-
return /* @__PURE__ */
|
|
1866
|
+
const y = typeof e == "string" || typeof e == "number";
|
|
1867
|
+
return /* @__PURE__ */ _("div", { ref: C, className: A("ina-basic-dropdown", l), children: [
|
|
1868
1868
|
/* @__PURE__ */ n(
|
|
1869
1869
|
"div",
|
|
1870
1870
|
{
|
|
1871
1871
|
ref: I,
|
|
1872
1872
|
className: A("ina-basic-dropdown__trigger", v),
|
|
1873
1873
|
onClick: x,
|
|
1874
|
-
tabIndex:
|
|
1875
|
-
role:
|
|
1876
|
-
"aria-haspopup":
|
|
1877
|
-
"aria-expanded":
|
|
1878
|
-
onKeyDown:
|
|
1879
|
-
children:
|
|
1874
|
+
tabIndex: y ? -1 : 0,
|
|
1875
|
+
role: y ? void 0 : "button",
|
|
1876
|
+
"aria-haspopup": y ? void 0 : "true",
|
|
1877
|
+
"aria-expanded": y ? void 0 : m,
|
|
1878
|
+
onKeyDown: y ? void 0 : b,
|
|
1879
|
+
children: y ? /* @__PURE__ */ _(
|
|
1880
1880
|
"button",
|
|
1881
1881
|
{
|
|
1882
1882
|
type: "button",
|
|
1883
|
-
disabled:
|
|
1883
|
+
disabled: p,
|
|
1884
1884
|
"aria-haspopup": "true",
|
|
1885
1885
|
"aria-expanded": m,
|
|
1886
1886
|
className: A(
|
|
@@ -1901,7 +1901,7 @@ function ts({
|
|
|
1901
1901
|
) : e
|
|
1902
1902
|
}
|
|
1903
1903
|
),
|
|
1904
|
-
m && !
|
|
1904
|
+
m && !p && /* @__PURE__ */ n(
|
|
1905
1905
|
"div",
|
|
1906
1906
|
{
|
|
1907
1907
|
ref: D,
|
|
@@ -1910,13 +1910,13 @@ function ts({
|
|
|
1910
1910
|
`ina-basic-dropdown__panel--${i}`,
|
|
1911
1911
|
c
|
|
1912
1912
|
),
|
|
1913
|
-
onClick: (
|
|
1913
|
+
onClick: (f) => f.stopPropagation(),
|
|
1914
1914
|
children: a
|
|
1915
1915
|
}
|
|
1916
1916
|
)
|
|
1917
1917
|
] });
|
|
1918
1918
|
}
|
|
1919
|
-
const At = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
1919
|
+
const At = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
1920
1920
|
"svg",
|
|
1921
1921
|
{
|
|
1922
1922
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1936,7 +1936,7 @@ const At = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
1936
1936
|
/* @__PURE__ */ n("path", { d: "M12 4l0 12" })
|
|
1937
1937
|
]
|
|
1938
1938
|
}
|
|
1939
|
-
), mt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
1939
|
+
), mt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
1940
1940
|
"svg",
|
|
1941
1941
|
{
|
|
1942
1942
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2133,7 +2133,7 @@ async function St(e, a) {
|
|
|
2133
2133
|
});
|
|
2134
2134
|
return;
|
|
2135
2135
|
}
|
|
2136
|
-
const
|
|
2136
|
+
const p = new Uint8Array(v), u = pn(p, a);
|
|
2137
2137
|
s(u ? { isValid: !0 } : {
|
|
2138
2138
|
isValid: !1,
|
|
2139
2139
|
error: "File signature tidak sesuai dengan tipe file yang diharapkan"
|
|
@@ -2327,7 +2327,7 @@ function ht(e) {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
return a = a.replace(/^[\s.]+|[\s.]+$/g, ""), a || "file";
|
|
2329
2329
|
}
|
|
2330
|
-
const Tt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
2330
|
+
const Tt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
2331
2331
|
"svg",
|
|
2332
2332
|
{
|
|
2333
2333
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2345,7 +2345,7 @@ const Tt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
2345
2345
|
/* @__PURE__ */ n("path", { d: "M4.05 11a8 8 0 1 1 .5 4m-.5 5v-5h5" })
|
|
2346
2346
|
]
|
|
2347
2347
|
}
|
|
2348
|
-
), yn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
2348
|
+
), yn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
2349
2349
|
"svg",
|
|
2350
2350
|
{
|
|
2351
2351
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2364,7 +2364,7 @@ const Tt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
2364
2364
|
/* @__PURE__ */ n("path", { d: "M10 10l4 4m0 -4l-4 4" })
|
|
2365
2365
|
]
|
|
2366
2366
|
}
|
|
2367
|
-
), Lt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
2367
|
+
), Lt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
2368
2368
|
"svg",
|
|
2369
2369
|
{
|
|
2370
2370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2394,7 +2394,7 @@ function ns({
|
|
|
2394
2394
|
allowedExtensions: l,
|
|
2395
2395
|
maxFiles: c,
|
|
2396
2396
|
maxTotalSizeMB: v,
|
|
2397
|
-
validateMagicNumber:
|
|
2397
|
+
validateMagicNumber: p = !0,
|
|
2398
2398
|
// Default: true sesuai rekomendasi OWASP
|
|
2399
2399
|
disabled: u = !1,
|
|
2400
2400
|
className: k = "",
|
|
@@ -2402,7 +2402,7 @@ function ns({
|
|
|
2402
2402
|
onRemove: m,
|
|
2403
2403
|
...C
|
|
2404
2404
|
}) {
|
|
2405
|
-
const I = ce(null), [D, E] = J([]), [x, b] = J(!1), [
|
|
2405
|
+
const I = ce(null), [D, E] = J([]), [x, b] = J(!1), [y, f] = J([]), [T, S] = J(!1), q = ye(() => {
|
|
2406
2406
|
var L;
|
|
2407
2407
|
u || (L = I.current) == null || L.click();
|
|
2408
2408
|
}, [u]), B = ye(
|
|
@@ -2417,7 +2417,7 @@ function ns({
|
|
|
2417
2417
|
isValid: !1,
|
|
2418
2418
|
error: `Maksimal ${c} file yang dapat diupload`,
|
|
2419
2419
|
file: L[0]
|
|
2420
|
-
}),
|
|
2420
|
+
}), f(fe), g == null || g([], fe);
|
|
2421
2421
|
return;
|
|
2422
2422
|
}
|
|
2423
2423
|
L = L.slice(0, Z);
|
|
@@ -2430,7 +2430,7 @@ function ns({
|
|
|
2430
2430
|
isValid: !1,
|
|
2431
2431
|
error: `Ukuran total file maksimal ${v} MB`,
|
|
2432
2432
|
file: L[0]
|
|
2433
|
-
}),
|
|
2433
|
+
}), f(fe), g == null || g([], fe);
|
|
2434
2434
|
return;
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
@@ -2459,7 +2459,7 @@ function ns({
|
|
|
2459
2459
|
fe.push(Z), P.push(Z);
|
|
2460
2460
|
continue;
|
|
2461
2461
|
}
|
|
2462
|
-
if (
|
|
2462
|
+
if (p && G.type) {
|
|
2463
2463
|
const Q = await St(
|
|
2464
2464
|
G,
|
|
2465
2465
|
G.type
|
|
@@ -2485,7 +2485,7 @@ function ns({
|
|
|
2485
2485
|
file: G
|
|
2486
2486
|
});
|
|
2487
2487
|
}
|
|
2488
|
-
E(s ? (G) => [...G, ...W] : W.slice(0, 1)),
|
|
2488
|
+
E(s ? (G) => [...G, ...W] : W.slice(0, 1)), f(fe);
|
|
2489
2489
|
const te = s ? [...D, ...W].map((G) => G.file) : W.map((G) => G.file);
|
|
2490
2490
|
g == null || g(te, fe);
|
|
2491
2491
|
},
|
|
@@ -2498,7 +2498,7 @@ function ns({
|
|
|
2498
2498
|
l,
|
|
2499
2499
|
c,
|
|
2500
2500
|
v,
|
|
2501
|
-
|
|
2501
|
+
p
|
|
2502
2502
|
]
|
|
2503
2503
|
), $ = ye(
|
|
2504
2504
|
async (L) => {
|
|
@@ -2527,10 +2527,10 @@ function ns({
|
|
|
2527
2527
|
const P = D[L], W = D.filter((fe, te) => te !== L);
|
|
2528
2528
|
E(W), m == null || m(P.file, L), g == null || g(
|
|
2529
2529
|
W.map((fe) => fe.file),
|
|
2530
|
-
|
|
2530
|
+
y
|
|
2531
2531
|
);
|
|
2532
2532
|
},
|
|
2533
|
-
[u, D,
|
|
2533
|
+
[u, D, y, m, g]
|
|
2534
2534
|
), ee = ye(
|
|
2535
2535
|
(L, P, W, fe) => {
|
|
2536
2536
|
E(
|
|
@@ -2546,9 +2546,9 @@ function ns({
|
|
|
2546
2546
|
"ina-file-upload__dropzone--drag-over": x,
|
|
2547
2547
|
"ina-file-upload__dropzone--disabled": u
|
|
2548
2548
|
});
|
|
2549
|
-
return /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ _("div", { className: se, children: [
|
|
2550
2550
|
e && /* @__PURE__ */ n("div", { className: "ina-file-upload__label", children: e }),
|
|
2551
|
-
/* @__PURE__ */
|
|
2551
|
+
/* @__PURE__ */ _(
|
|
2552
2552
|
"div",
|
|
2553
2553
|
{
|
|
2554
2554
|
className: ne,
|
|
@@ -2570,9 +2570,9 @@ function ns({
|
|
|
2570
2570
|
onChange: $
|
|
2571
2571
|
}
|
|
2572
2572
|
),
|
|
2573
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ _("div", { className: "ina-file-upload__content", children: [
|
|
2574
2574
|
/* @__PURE__ */ n("div", { className: "ina-file-upload__icon", children: /* @__PURE__ */ n(At, { size: 24 }) }),
|
|
2575
|
-
/* @__PURE__ */
|
|
2575
|
+
/* @__PURE__ */ _("div", { className: "ina-file-upload__text", children: [
|
|
2576
2576
|
/* @__PURE__ */ n("div", { className: "ina-file-upload__title", children: a }),
|
|
2577
2577
|
/* @__PURE__ */ n("div", { className: "ina-file-upload__description", children: t })
|
|
2578
2578
|
] }),
|
|
@@ -2592,12 +2592,12 @@ function ns({
|
|
|
2592
2592
|
]
|
|
2593
2593
|
}
|
|
2594
2594
|
),
|
|
2595
|
-
D.length > 0 && /* @__PURE__ */
|
|
2595
|
+
D.length > 0 && /* @__PURE__ */ _(tt, { children: [
|
|
2596
2596
|
/* @__PURE__ */ n("div", { className: "ina-file-upload__files", children: (s && D.length > 5 && !T ? D.slice(0, 5) : D).map((L) => {
|
|
2597
2597
|
const P = D.findIndex(
|
|
2598
2598
|
(W) => W.file.name === L.file.name && W.file.size === L.file.size && W.status === L.status
|
|
2599
2599
|
);
|
|
2600
|
-
return /* @__PURE__ */
|
|
2600
|
+
return /* @__PURE__ */ _(
|
|
2601
2601
|
"div",
|
|
2602
2602
|
{
|
|
2603
2603
|
className: A("ina-file-upload__file", {
|
|
@@ -2606,7 +2606,7 @@ function ns({
|
|
|
2606
2606
|
"ina-file-upload__file--uploading": L.status === "uploading"
|
|
2607
2607
|
}),
|
|
2608
2608
|
children: [
|
|
2609
|
-
/* @__PURE__ */
|
|
2609
|
+
/* @__PURE__ */ _("div", { className: "ina-file-upload__file-indicator", children: [
|
|
2610
2610
|
L.status === "uploading" && /* @__PURE__ */ n("div", { className: "ina-file-upload__file-icon-wrapper ina-file-upload__file-icon-wrapper--uploading", children: /* @__PURE__ */ n(
|
|
2611
2611
|
Tt,
|
|
2612
2612
|
{
|
|
@@ -2618,13 +2618,13 @@ function ns({
|
|
|
2618
2618
|
L.status === "error" && /* @__PURE__ */ n("div", { className: "ina-file-upload__file-icon-wrapper ina-file-upload__file-icon-wrapper--error", children: /* @__PURE__ */ n(yn, { size: 20, stroke: "2" }) }),
|
|
2619
2619
|
L.status === "idle" && /* @__PURE__ */ n("div", { className: "ina-file-upload__file-icon-wrapper ina-file-upload__file-icon-wrapper--success", children: /* @__PURE__ */ n(Lt, { size: 20, stroke: "2" }) })
|
|
2620
2620
|
] }),
|
|
2621
|
-
/* @__PURE__ */
|
|
2621
|
+
/* @__PURE__ */ _("div", { className: "ina-file-upload__file-info", children: [
|
|
2622
2622
|
/* @__PURE__ */ n("div", { className: "ina-file-upload__file-name", children: ht(L.file.name) }),
|
|
2623
2623
|
/* @__PURE__ */ n("div", { className: "ina-file-upload__file-size", children: un(L.file.size) }),
|
|
2624
2624
|
L.error && /* @__PURE__ */ n("div", { className: "ina-file-upload__file-error", children: L.error })
|
|
2625
2625
|
] }),
|
|
2626
|
-
/* @__PURE__ */
|
|
2627
|
-
L.status === "error" && /* @__PURE__ */
|
|
2626
|
+
/* @__PURE__ */ _("div", { className: "ina-file-upload__file-actions", children: [
|
|
2627
|
+
L.status === "error" && /* @__PURE__ */ _(tt, { children: [
|
|
2628
2628
|
/* @__PURE__ */ n(
|
|
2629
2629
|
"button",
|
|
2630
2630
|
{
|
|
@@ -2684,7 +2684,7 @@ function ns({
|
|
|
2684
2684
|
`${L.file.name}-${P}`
|
|
2685
2685
|
);
|
|
2686
2686
|
}) }),
|
|
2687
|
-
s && D.length > 5 && /* @__PURE__ */
|
|
2687
|
+
s && D.length > 5 && /* @__PURE__ */ _(
|
|
2688
2688
|
"button",
|
|
2689
2689
|
{
|
|
2690
2690
|
type: "button",
|
|
@@ -2719,14 +2719,14 @@ function ns({
|
|
|
2719
2719
|
}
|
|
2720
2720
|
)
|
|
2721
2721
|
] }),
|
|
2722
|
-
|
|
2722
|
+
y.length > 0 && /* @__PURE__ */ n("div", { className: "ina-file-upload__errors", children: y.map((L, P) => /* @__PURE__ */ _("div", { className: "ina-file-upload__error-message", children: [
|
|
2723
2723
|
ht(L.file.name),
|
|
2724
2724
|
": ",
|
|
2725
2725
|
L.error
|
|
2726
2726
|
] }, P)) })
|
|
2727
2727
|
] });
|
|
2728
2728
|
}
|
|
2729
|
-
const _n = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
2729
|
+
const _n = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
2730
2730
|
"svg",
|
|
2731
2731
|
{
|
|
2732
2732
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2745,7 +2745,7 @@ const _n = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
2745
2745
|
/* @__PURE__ */ n("path", { d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" })
|
|
2746
2746
|
]
|
|
2747
2747
|
}
|
|
2748
|
-
), bn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
2748
|
+
), bn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
2749
2749
|
"svg",
|
|
2750
2750
|
{
|
|
2751
2751
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2768,7 +2768,7 @@ const _n = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
2768
2768
|
/* @__PURE__ */ n("path", { d: "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" })
|
|
2769
2769
|
]
|
|
2770
2770
|
}
|
|
2771
|
-
), wn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
2771
|
+
), wn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
2772
2772
|
"svg",
|
|
2773
2773
|
{
|
|
2774
2774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2800,12 +2800,12 @@ function rs({
|
|
|
2800
2800
|
disabled: l = !1,
|
|
2801
2801
|
className: c = "",
|
|
2802
2802
|
progress: v,
|
|
2803
|
-
status:
|
|
2803
|
+
status: p,
|
|
2804
2804
|
onChange: u,
|
|
2805
2805
|
onRemove: k,
|
|
2806
2806
|
...g
|
|
2807
2807
|
}) {
|
|
2808
|
-
const m = ce(null), [C, I] = J(null), [D, E] = J(0), [x, b] = J("idle"), [
|
|
2808
|
+
const m = ce(null), [C, I] = J(null), [D, E] = J(0), [x, b] = J("idle"), [y, f] = J(!1), T = v !== void 0 ? v : D, S = p !== void 0 ? p : x, q = ye(() => {
|
|
2809
2809
|
var P;
|
|
2810
2810
|
l || C || (P = m.current) == null || P.click();
|
|
2811
2811
|
}, [l, C]), B = ye(
|
|
@@ -2862,27 +2862,27 @@ function rs({
|
|
|
2862
2862
|
},
|
|
2863
2863
|
[t, r, s, i, u]
|
|
2864
2864
|
), $ = ye(() => {
|
|
2865
|
-
I(null), E(0), b("idle"),
|
|
2865
|
+
I(null), E(0), b("idle"), f(!1), m.current && (m.current.value = ""), k == null || k(), u == null || u(null, null);
|
|
2866
2866
|
}, [k, u]), ae = ye(() => {
|
|
2867
2867
|
l || C || q();
|
|
2868
2868
|
}, [l, C, q]), H = ye(() => {
|
|
2869
|
-
l || C ||
|
|
2869
|
+
l || C || f(!0);
|
|
2870
2870
|
}, [l, C]), O = ye(() => {
|
|
2871
|
-
|
|
2871
|
+
f(!1);
|
|
2872
2872
|
}, []), U = ye(
|
|
2873
2873
|
(P) => {
|
|
2874
|
-
l || C || (P.preventDefault(), P.stopPropagation(),
|
|
2874
|
+
l || C || (P.preventDefault(), P.stopPropagation(), f(!0));
|
|
2875
2875
|
},
|
|
2876
2876
|
[l, C]
|
|
2877
2877
|
), ee = ye(
|
|
2878
2878
|
(P) => {
|
|
2879
|
-
l || C || (P.preventDefault(), P.stopPropagation(),
|
|
2879
|
+
l || C || (P.preventDefault(), P.stopPropagation(), f(!1));
|
|
2880
2880
|
},
|
|
2881
2881
|
[l, C]
|
|
2882
2882
|
), se = ye(
|
|
2883
2883
|
async (P) => {
|
|
2884
2884
|
if (l || C) return;
|
|
2885
|
-
P.preventDefault(), P.stopPropagation(),
|
|
2885
|
+
P.preventDefault(), P.stopPropagation(), f(!1);
|
|
2886
2886
|
const W = P.dataTransfer.files[0];
|
|
2887
2887
|
if (!W) return;
|
|
2888
2888
|
if (ht(W.name) !== W.name) {
|
|
@@ -2946,10 +2946,10 @@ function rs({
|
|
|
2946
2946
|
const P = C.type, W = C.name.toLowerCase();
|
|
2947
2947
|
return P === "application/pdf" || W.endsWith(".pdf") ? /* @__PURE__ */ n(bn, { size: 16 }) : P.startsWith("image/") ? /* @__PURE__ */ n(wn, { size: 16 }) : /* @__PURE__ */ n(_n, { size: 16 });
|
|
2948
2948
|
}, L = A("ina-single-file-upload__container", {
|
|
2949
|
-
"ina-single-file-upload__container--active":
|
|
2949
|
+
"ina-single-file-upload__container--active": y && !l && !C,
|
|
2950
2950
|
"ina-single-file-upload__container--disabled": l
|
|
2951
2951
|
});
|
|
2952
|
-
return /* @__PURE__ */
|
|
2952
|
+
return /* @__PURE__ */ _("div", { className: A("ina-single-file-upload", c), children: [
|
|
2953
2953
|
/* @__PURE__ */ n(
|
|
2954
2954
|
"input",
|
|
2955
2955
|
{
|
|
@@ -2962,7 +2962,7 @@ function rs({
|
|
|
2962
2962
|
onChange: B
|
|
2963
2963
|
}
|
|
2964
2964
|
),
|
|
2965
|
-
/* @__PURE__ */
|
|
2965
|
+
/* @__PURE__ */ _(
|
|
2966
2966
|
"div",
|
|
2967
2967
|
{
|
|
2968
2968
|
className: L,
|
|
@@ -2976,16 +2976,16 @@ function rs({
|
|
|
2976
2976
|
role: "button",
|
|
2977
2977
|
"aria-label": C ? `File: ${C.name}` : "Upload file",
|
|
2978
2978
|
children: [
|
|
2979
|
-
!C && S === "idle" && /* @__PURE__ */
|
|
2979
|
+
!C && S === "idle" && /* @__PURE__ */ _(tt, { children: [
|
|
2980
2980
|
/* @__PURE__ */ n("div", { className: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--default", children: /* @__PURE__ */ n(At, { size: 24 }) }),
|
|
2981
|
-
/* @__PURE__ */
|
|
2981
|
+
/* @__PURE__ */ _("div", { className: "ina-single-file-upload__content", children: [
|
|
2982
2982
|
/* @__PURE__ */ n("div", { className: "ina-single-file-upload__title", children: e }),
|
|
2983
2983
|
/* @__PURE__ */ n("div", { className: "ina-single-file-upload__description", children: a })
|
|
2984
2984
|
] })
|
|
2985
2985
|
] }),
|
|
2986
|
-
!C && S === "uploading" && /* @__PURE__ */
|
|
2986
|
+
!C && S === "uploading" && /* @__PURE__ */ _(tt, { children: [
|
|
2987
2987
|
/* @__PURE__ */ n("div", { className: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--default", children: /* @__PURE__ */ n(At, { size: 24 }) }),
|
|
2988
|
-
/* @__PURE__ */
|
|
2988
|
+
/* @__PURE__ */ _("div", { className: "ina-single-file-upload__progress", children: [
|
|
2989
2989
|
/* @__PURE__ */ n("div", { className: "ina-single-file-upload__progress-bar", children: /* @__PURE__ */ n(
|
|
2990
2990
|
"div",
|
|
2991
2991
|
{
|
|
@@ -2993,16 +2993,16 @@ function rs({
|
|
|
2993
2993
|
style: { width: `${T}%` }
|
|
2994
2994
|
}
|
|
2995
2995
|
) }),
|
|
2996
|
-
/* @__PURE__ */
|
|
2996
|
+
/* @__PURE__ */ _("div", { className: "ina-single-file-upload__progress-text", children: [
|
|
2997
2997
|
"Uploading... ",
|
|
2998
2998
|
T,
|
|
2999
2999
|
"%"
|
|
3000
3000
|
] })
|
|
3001
3001
|
] })
|
|
3002
3002
|
] }),
|
|
3003
|
-
C && S === "success" && /* @__PURE__ */
|
|
3003
|
+
C && S === "success" && /* @__PURE__ */ _(tt, { children: [
|
|
3004
3004
|
/* @__PURE__ */ n("div", { className: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--file", children: ne() }),
|
|
3005
|
-
/* @__PURE__ */
|
|
3005
|
+
/* @__PURE__ */ _("div", { className: "ina-single-file-upload__content", children: [
|
|
3006
3006
|
/* @__PURE__ */ n("div", { className: "ina-single-file-upload__title", children: C.name }),
|
|
3007
3007
|
/* @__PURE__ */ n("div", { className: "ina-single-file-upload__description", children: a })
|
|
3008
3008
|
] }),
|
|
@@ -3032,13 +3032,13 @@ function ss({
|
|
|
3032
3032
|
placeholder: s = "",
|
|
3033
3033
|
className: i = ""
|
|
3034
3034
|
}) {
|
|
3035
|
-
const l = (
|
|
3036
|
-
|
|
3037
|
-
}, c = (
|
|
3038
|
-
a(
|
|
3035
|
+
const l = (p) => {
|
|
3036
|
+
p.key === "Enter" && (p.preventDefault(), t == null || t()), p.key === "Escape" && (p.preventDefault(), r());
|
|
3037
|
+
}, c = (p) => {
|
|
3038
|
+
a(p.target.value);
|
|
3039
3039
|
}, v = A("ina-field-input-table", i);
|
|
3040
|
-
return /* @__PURE__ */
|
|
3041
|
-
/* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ _("div", { className: v, children: [
|
|
3041
|
+
/* @__PURE__ */ _("div", { className: "ina-field-input-table__wrapper", children: [
|
|
3042
3042
|
/* @__PURE__ */ n(
|
|
3043
3043
|
"label",
|
|
3044
3044
|
{
|
|
@@ -3060,7 +3060,7 @@ function ss({
|
|
|
3060
3060
|
}
|
|
3061
3061
|
)
|
|
3062
3062
|
] }),
|
|
3063
|
-
/* @__PURE__ */
|
|
3063
|
+
/* @__PURE__ */ _("div", { className: "ina-field-input-table__actions", children: [
|
|
3064
3064
|
/* @__PURE__ */ n(
|
|
3065
3065
|
"button",
|
|
3066
3066
|
{
|
|
@@ -3096,7 +3096,7 @@ function ss({
|
|
|
3096
3096
|
] })
|
|
3097
3097
|
] });
|
|
3098
3098
|
}
|
|
3099
|
-
const kn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
3099
|
+
const kn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
3100
3100
|
"svg",
|
|
3101
3101
|
{
|
|
3102
3102
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3117,28 +3117,28 @@ const kn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
3117
3117
|
}
|
|
3118
3118
|
);
|
|
3119
3119
|
function Nn(e, a, t, r) {
|
|
3120
|
-
var s = this, i = ce(null), l = ce(0), c = ce(0), v = ce(null),
|
|
3120
|
+
var s = this, i = ce(null), l = ce(0), c = ce(0), v = ce(null), p = ce([]), u = ce(), k = ce(), g = ce(e), m = ce(!0), C = ce(), I = ce();
|
|
3121
3121
|
g.current = e;
|
|
3122
3122
|
var D = typeof window < "u", E = !a && a !== 0 && D;
|
|
3123
3123
|
if (typeof e != "function") throw new TypeError("Expected a function");
|
|
3124
3124
|
a = +a || 0;
|
|
3125
|
-
var x = !!(t = t || {}).leading, b = !("trailing" in t) || !!t.trailing,
|
|
3125
|
+
var x = !!(t = t || {}).leading, b = !("trailing" in t) || !!t.trailing, y = !!t.flushOnExit && b, f = "maxWait" in t, T = "debounceOnServer" in t && !!t.debounceOnServer, S = f ? Math.max(+t.maxWait || 0, a) : null, q = Pe(function() {
|
|
3126
3126
|
var B = function(se) {
|
|
3127
|
-
var ne =
|
|
3128
|
-
return
|
|
3127
|
+
var ne = p.current, L = u.current;
|
|
3128
|
+
return p.current = u.current = null, l.current = se, c.current = c.current || se, k.current = g.current.apply(L, ne);
|
|
3129
3129
|
}, $ = function(se, ne) {
|
|
3130
3130
|
E && cancelAnimationFrame(v.current), v.current = E ? requestAnimationFrame(se) : setTimeout(se, ne);
|
|
3131
3131
|
}, ae = function(se) {
|
|
3132
3132
|
if (!m.current) return !1;
|
|
3133
3133
|
var ne = se - i.current;
|
|
3134
|
-
return !i.current || ne >= a || ne < 0 ||
|
|
3134
|
+
return !i.current || ne >= a || ne < 0 || f && se - l.current >= S;
|
|
3135
3135
|
}, H = function(se) {
|
|
3136
|
-
return v.current = null, b &&
|
|
3136
|
+
return v.current = null, b && p.current ? B(se) : (p.current = u.current = null, k.current);
|
|
3137
3137
|
}, O = function se() {
|
|
3138
3138
|
var ne = Date.now();
|
|
3139
3139
|
if (x && c.current === l.current && U(), ae(ne)) return H(ne);
|
|
3140
3140
|
if (m.current) {
|
|
3141
|
-
var L = a - (ne - i.current), P =
|
|
3141
|
+
var L = a - (ne - i.current), P = f ? Math.min(L, S - (ne - l.current)) : L;
|
|
3142
3142
|
$(se, P);
|
|
3143
3143
|
}
|
|
3144
3144
|
}, U = function() {
|
|
@@ -3146,31 +3146,31 @@ function Nn(e, a, t, r) {
|
|
|
3146
3146
|
}, ee = function() {
|
|
3147
3147
|
if (D || T) {
|
|
3148
3148
|
var se, ne = Date.now(), L = ae(ne);
|
|
3149
|
-
if (
|
|
3149
|
+
if (p.current = [].slice.call(arguments), u.current = s, i.current = ne, y && !C.current && (C.current = function() {
|
|
3150
3150
|
var P;
|
|
3151
3151
|
((P = global.document) == null ? void 0 : P.visibilityState) === "hidden" && I.current.flush();
|
|
3152
3152
|
}, (se = global.document) == null || se.addEventListener == null || se.addEventListener("visibilitychange", C.current)), L) {
|
|
3153
3153
|
if (!v.current && m.current) return l.current = i.current, $(O, a), x ? B(i.current) : k.current;
|
|
3154
|
-
if (
|
|
3154
|
+
if (f) return $(O, a), B(i.current);
|
|
3155
3155
|
}
|
|
3156
3156
|
return v.current || $(O, a), k.current;
|
|
3157
3157
|
}
|
|
3158
3158
|
};
|
|
3159
3159
|
return ee.cancel = function() {
|
|
3160
3160
|
var se = v.current;
|
|
3161
|
-
se && (E ? cancelAnimationFrame(v.current) : clearTimeout(v.current)), l.current = 0,
|
|
3161
|
+
se && (E ? cancelAnimationFrame(v.current) : clearTimeout(v.current)), l.current = 0, p.current = i.current = u.current = v.current = null, se && r && r({});
|
|
3162
3162
|
}, ee.isPending = function() {
|
|
3163
3163
|
return !!v.current;
|
|
3164
3164
|
}, ee.flush = function() {
|
|
3165
3165
|
return v.current ? H(Date.now()) : k.current;
|
|
3166
3166
|
}, ee;
|
|
3167
|
-
}, [x,
|
|
3167
|
+
}, [x, f, a, S, b, y, E, D, T, r]);
|
|
3168
3168
|
return I.current = q, de(function() {
|
|
3169
3169
|
return m.current = !0, function() {
|
|
3170
3170
|
var B;
|
|
3171
|
-
|
|
3171
|
+
y && I.current.flush(), C.current && ((B = global.document) == null || B.removeEventListener == null || B.removeEventListener("visibilitychange", C.current), C.current = null), m.current = !1;
|
|
3172
3172
|
};
|
|
3173
|
-
}, [
|
|
3173
|
+
}, [y]), q;
|
|
3174
3174
|
}
|
|
3175
3175
|
function Cn(e, a) {
|
|
3176
3176
|
return e === a;
|
|
@@ -3235,7 +3235,7 @@ function us({
|
|
|
3235
3235
|
placeholder: l = "",
|
|
3236
3236
|
required: c = !1,
|
|
3237
3237
|
debounce: v = 0,
|
|
3238
|
-
disabled:
|
|
3238
|
+
disabled: p = !1
|
|
3239
3239
|
}) {
|
|
3240
3240
|
const [u, k] = J(t), [g] = bt(u, v), m = (x) => {
|
|
3241
3241
|
const { value: b } = x.target;
|
|
@@ -3248,14 +3248,14 @@ function us({
|
|
|
3248
3248
|
}, [t]);
|
|
3249
3249
|
const C = ce(null), I = A("ina-input-search"), D = A(
|
|
3250
3250
|
"ina-input-search__wrapper",
|
|
3251
|
-
|
|
3251
|
+
p && "ina-input-search__wrapper--disabled",
|
|
3252
3252
|
e
|
|
3253
3253
|
), E = A(
|
|
3254
3254
|
"ina-input-search__clear-button",
|
|
3255
3255
|
!u && "ina-input-search__clear-button--hidden"
|
|
3256
3256
|
);
|
|
3257
|
-
return /* @__PURE__ */
|
|
3258
|
-
a && /* @__PURE__ */
|
|
3257
|
+
return /* @__PURE__ */ _("div", { className: I, children: [
|
|
3258
|
+
a && /* @__PURE__ */ _(
|
|
3259
3259
|
"label",
|
|
3260
3260
|
{
|
|
3261
3261
|
className: A(
|
|
@@ -3270,7 +3270,7 @@ function us({
|
|
|
3270
3270
|
]
|
|
3271
3271
|
}
|
|
3272
3272
|
),
|
|
3273
|
-
/* @__PURE__ */
|
|
3273
|
+
/* @__PURE__ */ _("div", { className: D, children: [
|
|
3274
3274
|
/* @__PURE__ */ n(kn, { className: "ina-input-search__search-icon", size: 20 }),
|
|
3275
3275
|
/* @__PURE__ */ n(
|
|
3276
3276
|
"input",
|
|
@@ -3284,7 +3284,7 @@ function us({
|
|
|
3284
3284
|
onFocus: i,
|
|
3285
3285
|
onBlur: r,
|
|
3286
3286
|
ref: C,
|
|
3287
|
-
disabled:
|
|
3287
|
+
disabled: p
|
|
3288
3288
|
}
|
|
3289
3289
|
),
|
|
3290
3290
|
/* @__PURE__ */ n(
|
|
@@ -3310,10 +3310,10 @@ function Mn({
|
|
|
3310
3310
|
dialogClassname: l,
|
|
3311
3311
|
size: c = "",
|
|
3312
3312
|
paddingBody: v = "16px 24px",
|
|
3313
|
-
closeLabel:
|
|
3313
|
+
closeLabel: p = "Tutup dialog",
|
|
3314
3314
|
hideHeader: u = !1
|
|
3315
3315
|
}) {
|
|
3316
|
-
const [k, g] = J(!1), [m, C] = J(!1), [I, D] = J(!1), E = ce(null), x = ce(`modal-title-${Math.random().toString(36).slice(2)}`), b = ce(null),
|
|
3316
|
+
const [k, g] = J(!1), [m, C] = J(!1), [I, D] = J(!1), E = ce(null), x = ce(`modal-title-${Math.random().toString(36).slice(2)}`), b = ce(null), y = ce(!1);
|
|
3317
3317
|
if (de(() => g(!0), []), de(() => {
|
|
3318
3318
|
if (e)
|
|
3319
3319
|
C(!0), b.current = document.activeElement, requestAnimationFrame(() => {
|
|
@@ -3355,16 +3355,16 @@ function Mn({
|
|
|
3355
3355
|
};
|
|
3356
3356
|
return document.addEventListener("keydown", $), () => document.removeEventListener("keydown", $);
|
|
3357
3357
|
}, [m, I, k, a]), de(() => {
|
|
3358
|
-
if (I && !
|
|
3358
|
+
if (I && !y.current) {
|
|
3359
3359
|
const $ = setTimeout(() => {
|
|
3360
3360
|
var ae;
|
|
3361
|
-
(ae = E.current) == null || ae.focus(),
|
|
3361
|
+
(ae = E.current) == null || ae.focus(), y.current = !0;
|
|
3362
3362
|
}, 50);
|
|
3363
3363
|
return () => clearTimeout($);
|
|
3364
3364
|
}
|
|
3365
|
-
e || (
|
|
3365
|
+
e || (y.current = !1);
|
|
3366
3366
|
}, [I, e]), !m || !k) return null;
|
|
3367
|
-
const
|
|
3367
|
+
const f = i ?? document.body, T = A(
|
|
3368
3368
|
"ina-modal",
|
|
3369
3369
|
I ? "ina-modal--enter-active" : "ina-modal--enter"
|
|
3370
3370
|
), S = A(
|
|
@@ -3374,7 +3374,7 @@ function Mn({
|
|
|
3374
3374
|
), q = A(
|
|
3375
3375
|
"ina-modal__header",
|
|
3376
3376
|
t ? "ina-modal__header--with-title" : "ina-modal__header--no-border"
|
|
3377
|
-
), B = /* @__PURE__ */
|
|
3377
|
+
), B = /* @__PURE__ */ _(
|
|
3378
3378
|
"div",
|
|
3379
3379
|
{
|
|
3380
3380
|
className: T,
|
|
@@ -3391,21 +3391,21 @@ function Mn({
|
|
|
3391
3391
|
}
|
|
3392
3392
|
}
|
|
3393
3393
|
),
|
|
3394
|
-
/* @__PURE__ */ n("div", { className: "ina-modal__container", children: /* @__PURE__ */
|
|
3394
|
+
/* @__PURE__ */ n("div", { className: "ina-modal__container", children: /* @__PURE__ */ _(
|
|
3395
3395
|
"div",
|
|
3396
3396
|
{
|
|
3397
3397
|
className: S,
|
|
3398
3398
|
onClick: ($) => $.stopPropagation(),
|
|
3399
3399
|
tabIndex: -1,
|
|
3400
3400
|
children: [
|
|
3401
|
-
!u && /* @__PURE__ */
|
|
3401
|
+
!u && /* @__PURE__ */ _("div", { className: q, children: [
|
|
3402
3402
|
t && /* @__PURE__ */ n("div", { className: "ina-modal__title", children: typeof t == "string" ? /* @__PURE__ */ n("h2", { id: x.current, children: t }) : t }),
|
|
3403
3403
|
/* @__PURE__ */ n(
|
|
3404
3404
|
"button",
|
|
3405
3405
|
{
|
|
3406
3406
|
ref: E,
|
|
3407
3407
|
onClick: a,
|
|
3408
|
-
"aria-label":
|
|
3408
|
+
"aria-label": p,
|
|
3409
3409
|
className: "ina-modal__close-button",
|
|
3410
3410
|
children: /* @__PURE__ */ n(ze, { size: 24, className: "ina-modal__close-icon" })
|
|
3411
3411
|
}
|
|
@@ -3418,9 +3418,9 @@ function Mn({
|
|
|
3418
3418
|
]
|
|
3419
3419
|
}
|
|
3420
3420
|
);
|
|
3421
|
-
return Pt(B,
|
|
3421
|
+
return Pt(B, f);
|
|
3422
3422
|
}
|
|
3423
|
-
const gt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
3423
|
+
const gt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
3424
3424
|
"svg",
|
|
3425
3425
|
{
|
|
3426
3426
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3438,7 +3438,7 @@ const gt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
3438
3438
|
/* @__PURE__ */ n("path", { d: "M15 6l-6 6l6 6" })
|
|
3439
3439
|
]
|
|
3440
3440
|
}
|
|
3441
|
-
), Dn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
3441
|
+
), Dn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
3442
3442
|
"svg",
|
|
3443
3443
|
{
|
|
3444
3444
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3457,7 +3457,7 @@ const gt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
3457
3457
|
/* @__PURE__ */ n("path", { d: "M17 7l-5 5l5 5" })
|
|
3458
3458
|
]
|
|
3459
3459
|
}
|
|
3460
|
-
), In = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
3460
|
+
), In = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
3461
3461
|
"svg",
|
|
3462
3462
|
{
|
|
3463
3463
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3487,32 +3487,32 @@ function An({
|
|
|
3487
3487
|
disabled: l = !1,
|
|
3488
3488
|
fullWidth: c = !1,
|
|
3489
3489
|
className: v,
|
|
3490
|
-
...
|
|
3490
|
+
...p
|
|
3491
3491
|
}) {
|
|
3492
3492
|
const [u, k] = J(e.toString());
|
|
3493
3493
|
de(() => {
|
|
3494
3494
|
k(e.toString());
|
|
3495
3495
|
}, [e]);
|
|
3496
3496
|
const g = () => {
|
|
3497
|
-
let
|
|
3498
|
-
isNaN(
|
|
3497
|
+
let f = parseInt(u, 10);
|
|
3498
|
+
isNaN(f) || f < 1 ? f = 1 : f > a && (f = a), k(f.toString()), f !== e && !l && s(f);
|
|
3499
3499
|
};
|
|
3500
3500
|
if (a <= 0) return null;
|
|
3501
3501
|
function m() {
|
|
3502
|
-
const
|
|
3502
|
+
const f = [];
|
|
3503
3503
|
let T, S;
|
|
3504
3504
|
e === 1 ? (T = 1, S = Math.min(3, a)) : e === a ? (T = Math.max(1, a - 2), S = a) : (T = e - 1, S = e + 1);
|
|
3505
3505
|
for (let q = T; q <= S; q++)
|
|
3506
|
-
|
|
3507
|
-
return
|
|
3506
|
+
f.push(C(q));
|
|
3507
|
+
return f;
|
|
3508
3508
|
}
|
|
3509
|
-
const C = (
|
|
3510
|
-
const T =
|
|
3509
|
+
const C = (f) => {
|
|
3510
|
+
const T = f === e;
|
|
3511
3511
|
return /* @__PURE__ */ n(
|
|
3512
3512
|
"button",
|
|
3513
3513
|
{
|
|
3514
3514
|
onClick: () => {
|
|
3515
|
-
!l &&
|
|
3515
|
+
!l && f !== e && s(f);
|
|
3516
3516
|
},
|
|
3517
3517
|
disabled: l,
|
|
3518
3518
|
className: A(
|
|
@@ -3521,28 +3521,28 @@ function An({
|
|
|
3521
3521
|
!l && !T && "ina-pagination__page-button--enabled",
|
|
3522
3522
|
l && "ina-pagination__page-button--disabled"
|
|
3523
3523
|
),
|
|
3524
|
-
children:
|
|
3524
|
+
children: f
|
|
3525
3525
|
},
|
|
3526
|
-
|
|
3526
|
+
f
|
|
3527
3527
|
);
|
|
3528
|
-
}, I = (
|
|
3529
|
-
|
|
3530
|
-
}, D = (
|
|
3531
|
-
|
|
3532
|
-
}, E = (
|
|
3533
|
-
|
|
3534
|
-
}, x = (
|
|
3535
|
-
|
|
3536
|
-
}, b = (
|
|
3537
|
-
const T = parseInt(
|
|
3528
|
+
}, I = (f) => {
|
|
3529
|
+
f.preventDefault(), !l && e > 1 && s(1);
|
|
3530
|
+
}, D = (f) => {
|
|
3531
|
+
f.preventDefault(), !l && e > 1 && s(e - 1);
|
|
3532
|
+
}, E = (f) => {
|
|
3533
|
+
f.preventDefault(), !l && e < a && s(e + 1);
|
|
3534
|
+
}, x = (f) => {
|
|
3535
|
+
f.preventDefault(), !l && e < a && s(a);
|
|
3536
|
+
}, b = (f) => {
|
|
3537
|
+
const T = parseInt(f.target.value, 10);
|
|
3538
3538
|
l || i(T);
|
|
3539
|
-
},
|
|
3539
|
+
}, y = A(
|
|
3540
3540
|
"ina-pagination",
|
|
3541
3541
|
c && "ina-pagination--full-width"
|
|
3542
3542
|
);
|
|
3543
|
-
return /* @__PURE__ */
|
|
3544
|
-
/* @__PURE__ */
|
|
3545
|
-
/* @__PURE__ */
|
|
3543
|
+
return /* @__PURE__ */ _("nav", { className: y, "aria-label": "Pagination", ...p, children: [
|
|
3544
|
+
/* @__PURE__ */ _("div", { className: "ina-pagination__nav-container", children: [
|
|
3545
|
+
/* @__PURE__ */ _("div", { className: "ina-pagination__page-info", children: [
|
|
3546
3546
|
"Halaman",
|
|
3547
3547
|
/* @__PURE__ */ n(
|
|
3548
3548
|
"input",
|
|
@@ -3551,10 +3551,10 @@ function An({
|
|
|
3551
3551
|
min: 1,
|
|
3552
3552
|
max: a,
|
|
3553
3553
|
value: u,
|
|
3554
|
-
onChange: (
|
|
3554
|
+
onChange: (f) => k(f.target.value),
|
|
3555
3555
|
onBlur: g,
|
|
3556
|
-
onKeyDown: (
|
|
3557
|
-
|
|
3556
|
+
onKeyDown: (f) => {
|
|
3557
|
+
f.key === "Enter" && g();
|
|
3558
3558
|
},
|
|
3559
3559
|
disabled: l,
|
|
3560
3560
|
className: A(
|
|
@@ -3570,28 +3570,28 @@ function An({
|
|
|
3570
3570
|
"dari ",
|
|
3571
3571
|
a
|
|
3572
3572
|
] }),
|
|
3573
|
-
/* @__PURE__ */
|
|
3573
|
+
/* @__PURE__ */ _(
|
|
3574
3574
|
"div",
|
|
3575
3575
|
{
|
|
3576
3576
|
className: "ina-pagination__nav-buttons",
|
|
3577
|
-
onKeyDown: (
|
|
3577
|
+
onKeyDown: (f) => {
|
|
3578
3578
|
var T;
|
|
3579
|
-
if (
|
|
3579
|
+
if (f.key === "ArrowRight" || f.key === "ArrowLeft") {
|
|
3580
3580
|
const S = Array.from(
|
|
3581
|
-
|
|
3581
|
+
f.currentTarget.querySelectorAll("button:not([disabled])")
|
|
3582
3582
|
);
|
|
3583
3583
|
if (!S.length) return;
|
|
3584
3584
|
const q = S.indexOf(
|
|
3585
3585
|
document.activeElement
|
|
3586
3586
|
);
|
|
3587
3587
|
if (q >= 0) {
|
|
3588
|
-
|
|
3589
|
-
const B =
|
|
3588
|
+
f.preventDefault();
|
|
3589
|
+
const B = f.key === "ArrowRight" ? (q + 1) % S.length : (q - 1 + S.length) % S.length;
|
|
3590
3590
|
(T = S[B]) == null || T.focus();
|
|
3591
3591
|
}
|
|
3592
|
-
} else if (
|
|
3592
|
+
} else if (f.key === "Enter" || f.key === " ") {
|
|
3593
3593
|
const S = document.activeElement;
|
|
3594
|
-
S && S.tagName === "BUTTON" && (
|
|
3594
|
+
S && S.tagName === "BUTTON" && (f.preventDefault(), S.click());
|
|
3595
3595
|
}
|
|
3596
3596
|
},
|
|
3597
3597
|
children: [
|
|
@@ -3652,7 +3652,7 @@ function An({
|
|
|
3652
3652
|
}
|
|
3653
3653
|
)
|
|
3654
3654
|
] }),
|
|
3655
|
-
/* @__PURE__ */
|
|
3655
|
+
/* @__PURE__ */ _("div", { className: "ina-pagination__page-size-container", children: [
|
|
3656
3656
|
/* @__PURE__ */ n("span", { className: "ina-pagination__page-size-label", children: "Baris per halaman" }),
|
|
3657
3657
|
/* @__PURE__ */ n(
|
|
3658
3658
|
"select",
|
|
@@ -3664,7 +3664,7 @@ function An({
|
|
|
3664
3664
|
"ina-pagination__page-size-select",
|
|
3665
3665
|
l && "ina-pagination__page-size-select--disabled"
|
|
3666
3666
|
),
|
|
3667
|
-
children: r.map((
|
|
3667
|
+
children: r.map((f, T) => /* @__PURE__ */ n("option", { value: f, children: f }, `${f}-${T}`))
|
|
3668
3668
|
}
|
|
3669
3669
|
)
|
|
3670
3670
|
] })
|
|
@@ -3688,11 +3688,11 @@ function En({
|
|
|
3688
3688
|
), v = A(
|
|
3689
3689
|
"ina-progress-bar__fill",
|
|
3690
3690
|
`ina-progress-bar__fill--${r}`
|
|
3691
|
-
),
|
|
3691
|
+
), p = A(
|
|
3692
3692
|
"ina-progress-bar__indicator",
|
|
3693
3693
|
`ina-progress-bar__indicator--${r}`
|
|
3694
3694
|
);
|
|
3695
|
-
return /* @__PURE__ */
|
|
3695
|
+
return /* @__PURE__ */ _("div", { className: c, children: [
|
|
3696
3696
|
/* @__PURE__ */ n(
|
|
3697
3697
|
"div",
|
|
3698
3698
|
{
|
|
@@ -3707,7 +3707,7 @@ function En({
|
|
|
3707
3707
|
/* @__PURE__ */ n(
|
|
3708
3708
|
"div",
|
|
3709
3709
|
{
|
|
3710
|
-
className:
|
|
3710
|
+
className: p,
|
|
3711
3711
|
style: {
|
|
3712
3712
|
left: `${Math.min(100, Math.max(0, a))}%`,
|
|
3713
3713
|
transform: "translateX(-100%)",
|
|
@@ -3747,10 +3747,10 @@ function Sn({
|
|
|
3747
3747
|
if (de(() => {
|
|
3748
3748
|
if (a) {
|
|
3749
3749
|
c(!0), i(0);
|
|
3750
|
-
const
|
|
3750
|
+
const p = setInterval(() => {
|
|
3751
3751
|
i((u) => u >= 90 ? u : u + Math.random() * 15);
|
|
3752
3752
|
}, 200);
|
|
3753
|
-
return () => clearInterval(
|
|
3753
|
+
return () => clearInterval(p);
|
|
3754
3754
|
} else
|
|
3755
3755
|
i(100), setTimeout(() => {
|
|
3756
3756
|
c(!1), i(0);
|
|
@@ -3774,7 +3774,7 @@ function Sn({
|
|
|
3774
3774
|
}
|
|
3775
3775
|
) });
|
|
3776
3776
|
}
|
|
3777
|
-
const Tn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
3777
|
+
const Tn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
3778
3778
|
"svg",
|
|
3779
3779
|
{
|
|
3780
3780
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3793,7 +3793,7 @@ const Tn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
3793
3793
|
/* @__PURE__ */ n("path", { d: "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" })
|
|
3794
3794
|
]
|
|
3795
3795
|
}
|
|
3796
|
-
), Ln = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
3796
|
+
), Ln = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
3797
3797
|
"svg",
|
|
3798
3798
|
{
|
|
3799
3799
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3824,7 +3824,7 @@ function ps({
|
|
|
3824
3824
|
helperText: l,
|
|
3825
3825
|
status: c = "neutral",
|
|
3826
3826
|
statusMessage: v,
|
|
3827
|
-
size:
|
|
3827
|
+
size: p = "md",
|
|
3828
3828
|
maxLength: u,
|
|
3829
3829
|
showCharCount: k = !1,
|
|
3830
3830
|
placeholder: g,
|
|
@@ -3833,12 +3833,12 @@ function ps({
|
|
|
3833
3833
|
onBlur: I,
|
|
3834
3834
|
...D
|
|
3835
3835
|
}) {
|
|
3836
|
-
const [E, x] = J(e), [b,
|
|
3836
|
+
const [E, x] = J(e), [b, y] = J(!1), [f] = bt(E, t), T = ce(!0);
|
|
3837
3837
|
de(() => {
|
|
3838
3838
|
x(e);
|
|
3839
3839
|
}, [e]), de(() => {
|
|
3840
|
-
T.current ? T.current = !1 : t > 0 && r && r(
|
|
3841
|
-
}, [
|
|
3840
|
+
T.current ? T.current = !1 : t > 0 && r && r(f);
|
|
3841
|
+
}, [f, t, r]);
|
|
3842
3842
|
const S = (O) => {
|
|
3843
3843
|
const U = O.target.value;
|
|
3844
3844
|
u != null && U.length > u || (x(U), a(U));
|
|
@@ -3847,8 +3847,8 @@ function ps({
|
|
|
3847
3847
|
}, B = () => {
|
|
3848
3848
|
x(""), a(""), r && r("");
|
|
3849
3849
|
}, $ = c !== "neutral" && v != null ? v : l, ae = (D == null ? void 0 : D.id) || (D == null ? void 0 : D.name) || String(i).toLowerCase(), H = `${ae}-status`;
|
|
3850
|
-
return /* @__PURE__ */
|
|
3851
|
-
i && /* @__PURE__ */
|
|
3850
|
+
return /* @__PURE__ */ _("div", { className: A("ina-password-input", C), children: [
|
|
3851
|
+
i && /* @__PURE__ */ _(
|
|
3852
3852
|
"label",
|
|
3853
3853
|
{
|
|
3854
3854
|
className: "ina-password-input__label",
|
|
@@ -3859,12 +3859,12 @@ function ps({
|
|
|
3859
3859
|
]
|
|
3860
3860
|
}
|
|
3861
3861
|
),
|
|
3862
|
-
/* @__PURE__ */
|
|
3862
|
+
/* @__PURE__ */ _(
|
|
3863
3863
|
"div",
|
|
3864
3864
|
{
|
|
3865
3865
|
className: A(
|
|
3866
3866
|
"ina-password-input__wrapper",
|
|
3867
|
-
`ina-password-input__wrapper--size-${
|
|
3867
|
+
`ina-password-input__wrapper--size-${p}`,
|
|
3868
3868
|
c !== "neutral" && `ina-password-input__wrapper--${c}`,
|
|
3869
3869
|
m && "ina-password-input__wrapper--disabled"
|
|
3870
3870
|
),
|
|
@@ -3904,9 +3904,9 @@ function ps({
|
|
|
3904
3904
|
{
|
|
3905
3905
|
type: "button",
|
|
3906
3906
|
className: "ina-password-input__toggle-button",
|
|
3907
|
-
onClick: () =>
|
|
3907
|
+
onClick: () => y((O) => !O),
|
|
3908
3908
|
onKeyDown: (O) => {
|
|
3909
|
-
(O.key === "Enter" || O.key === " ") && (O.preventDefault(),
|
|
3909
|
+
(O.key === "Enter" || O.key === " ") && (O.preventDefault(), y((U) => !U));
|
|
3910
3910
|
},
|
|
3911
3911
|
"aria-label": b ? "Sembunyikan password" : "Tampilkan password",
|
|
3912
3912
|
children: b ? /* @__PURE__ */ n(Ln, { size: 20 }) : /* @__PURE__ */ n(Tn, { size: 20 })
|
|
@@ -3915,7 +3915,7 @@ function ps({
|
|
|
3915
3915
|
]
|
|
3916
3916
|
}
|
|
3917
3917
|
),
|
|
3918
|
-
$ && /* @__PURE__ */
|
|
3918
|
+
$ && /* @__PURE__ */ _("div", { id: H, className: "ina-password-input__status-area", children: [
|
|
3919
3919
|
/* @__PURE__ */ n(
|
|
3920
3920
|
"div",
|
|
3921
3921
|
{
|
|
@@ -3926,7 +3926,7 @@ function ps({
|
|
|
3926
3926
|
children: $
|
|
3927
3927
|
}
|
|
3928
3928
|
),
|
|
3929
|
-
k && u != null && /* @__PURE__ */
|
|
3929
|
+
k && u != null && /* @__PURE__ */ _("div", { className: "ina-password-input__character-count", children: [
|
|
3930
3930
|
E.length,
|
|
3931
3931
|
"/",
|
|
3932
3932
|
u
|
|
@@ -4500,7 +4500,7 @@ function hs({
|
|
|
4500
4500
|
status: l = "neutral",
|
|
4501
4501
|
statusMessage: c,
|
|
4502
4502
|
helperText: v,
|
|
4503
|
-
disabled:
|
|
4503
|
+
disabled: p = !1,
|
|
4504
4504
|
readonly: u = !1,
|
|
4505
4505
|
required: k = !1,
|
|
4506
4506
|
defaultCountry: g = "ID",
|
|
@@ -4510,7 +4510,7 @@ function hs({
|
|
|
4510
4510
|
id: D,
|
|
4511
4511
|
...E
|
|
4512
4512
|
}) {
|
|
4513
|
-
const x = Pe(() => D || `phone-input-${Math.random().toString(36).substr(2, 9)}`, [D]), [b,
|
|
4513
|
+
const x = Pe(() => D || `phone-input-${Math.random().toString(36).substr(2, 9)}`, [D]), [b, y] = J(a), [f, T] = J(!1), [S, q] = J(""), [B, $] = J(
|
|
4514
4514
|
m.find((Q) => Q.code === g) || m[0]
|
|
4515
4515
|
), ae = ce(null), H = ce(null), O = ce(null), U = Pe(() => `${x}-helper`, [x]), ee = (Q) => {
|
|
4516
4516
|
const Y = Q.replace(/\D/g, "");
|
|
@@ -4518,12 +4518,12 @@ function hs({
|
|
|
4518
4518
|
};
|
|
4519
4519
|
de(() => {
|
|
4520
4520
|
if (!a) {
|
|
4521
|
-
|
|
4521
|
+
y("");
|
|
4522
4522
|
return;
|
|
4523
4523
|
}
|
|
4524
4524
|
const Q = B.dialCode;
|
|
4525
4525
|
let Y = a;
|
|
4526
|
-
a.startsWith(Q) && (Y = a.substring(Q.length)),
|
|
4526
|
+
a.startsWith(Q) && (Y = a.substring(Q.length)), y(ee(Y));
|
|
4527
4527
|
}, [a, B.dialCode]), de(() => {
|
|
4528
4528
|
const Q = (Y) => {
|
|
4529
4529
|
O.current && !O.current.contains(Y.target) && T(!1);
|
|
@@ -4539,7 +4539,7 @@ function hs({
|
|
|
4539
4539
|
(Y) => Y.name.toLowerCase().includes(Q) || Y.dialCode.includes(Q) || Y.code.toLowerCase().includes(Q)
|
|
4540
4540
|
);
|
|
4541
4541
|
}, [m, S]), ne = () => {
|
|
4542
|
-
|
|
4542
|
+
p || u || T((Q) => {
|
|
4543
4543
|
const Y = !Q;
|
|
4544
4544
|
return Y && (q(""), setTimeout(() => {
|
|
4545
4545
|
var le;
|
|
@@ -4557,43 +4557,43 @@ function hs({
|
|
|
4557
4557
|
}, 0);
|
|
4558
4558
|
}, P = (Q) => {
|
|
4559
4559
|
const le = Q.target.value.replace(/\D/g, ""), ie = ee(le);
|
|
4560
|
-
|
|
4560
|
+
y(ie);
|
|
4561
4561
|
let K = le;
|
|
4562
4562
|
K.startsWith("0") && (K = K.substring(1)), t == null || t(`${B.dialCode}${K}`), r == null || r(Q);
|
|
4563
4563
|
}, W = A(
|
|
4564
4564
|
"ina-phone-input",
|
|
4565
|
-
|
|
4565
|
+
p && "ina-phone-input--disabled",
|
|
4566
4566
|
I
|
|
4567
4567
|
), fe = () => {
|
|
4568
4568
|
var Q;
|
|
4569
|
-
|
|
4569
|
+
y(""), t == null || t(`${B.dialCode}`), (Q = ae.current) == null || Q.focus();
|
|
4570
4570
|
}, te = A(
|
|
4571
4571
|
"ina-phone-input__wrapper",
|
|
4572
4572
|
`ina-phone-input__wrapper--size-${i}`,
|
|
4573
|
-
|
|
4573
|
+
p && "ina-phone-input__wrapper--disabled",
|
|
4574
4574
|
l !== "neutral" && `ina-phone-input__wrapper--status-${l}`
|
|
4575
4575
|
), G = A(
|
|
4576
4576
|
"ina-phone-input__helper-text",
|
|
4577
4577
|
l === "error" && "ina-phone-input__helper-text--error",
|
|
4578
4578
|
l === "warning" && "ina-phone-input__helper-text--warning"
|
|
4579
4579
|
), Z = l !== "neutral" && c ? c : c || v;
|
|
4580
|
-
return /* @__PURE__ */
|
|
4581
|
-
e && /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ _("div", { className: W, children: [
|
|
4581
|
+
e && /* @__PURE__ */ _("label", { htmlFor: x, className: "ina-phone-input__label", children: [
|
|
4582
4582
|
e,
|
|
4583
4583
|
k && /* @__PURE__ */ n("span", { className: "ina-text-field__required", children: "*" })
|
|
4584
4584
|
] }),
|
|
4585
|
-
/* @__PURE__ */
|
|
4586
|
-
/* @__PURE__ */
|
|
4587
|
-
/* @__PURE__ */
|
|
4585
|
+
/* @__PURE__ */ _("div", { className: te, children: [
|
|
4586
|
+
/* @__PURE__ */ _("div", { className: "ina-phone-input__country-selector", ref: O, children: [
|
|
4587
|
+
/* @__PURE__ */ _(
|
|
4588
4588
|
"button",
|
|
4589
4589
|
{
|
|
4590
4590
|
type: "button",
|
|
4591
4591
|
className: "ina-phone-input__country-button",
|
|
4592
4592
|
onClick: ne,
|
|
4593
|
-
disabled:
|
|
4593
|
+
disabled: p || u,
|
|
4594
4594
|
"aria-label": "Pilih negara",
|
|
4595
4595
|
"aria-haspopup": "listbox",
|
|
4596
|
-
"aria-expanded":
|
|
4596
|
+
"aria-expanded": f,
|
|
4597
4597
|
children: [
|
|
4598
4598
|
/* @__PURE__ */ n(
|
|
4599
4599
|
ta,
|
|
@@ -4611,7 +4611,7 @@ function hs({
|
|
|
4611
4611
|
{
|
|
4612
4612
|
className: A(
|
|
4613
4613
|
"ina-phone-input__country-chevron",
|
|
4614
|
-
|
|
4614
|
+
f && "ina-phone-input__country-chevron--open"
|
|
4615
4615
|
),
|
|
4616
4616
|
width: "16",
|
|
4617
4617
|
height: "16",
|
|
@@ -4633,7 +4633,7 @@ function hs({
|
|
|
4633
4633
|
]
|
|
4634
4634
|
}
|
|
4635
4635
|
),
|
|
4636
|
-
|
|
4636
|
+
f && /* @__PURE__ */ _("div", { className: "ina-phone-input__country-dropdown", children: [
|
|
4637
4637
|
/* @__PURE__ */ n("div", { className: "ina-phone-input__country-search", children: /* @__PURE__ */ n(
|
|
4638
4638
|
"input",
|
|
4639
4639
|
{
|
|
@@ -4645,7 +4645,7 @@ function hs({
|
|
|
4645
4645
|
className: "ina-phone-input__country-search-input"
|
|
4646
4646
|
}
|
|
4647
4647
|
) }),
|
|
4648
|
-
/* @__PURE__ */ n("div", { className: "ina-phone-input__country-list", role: "listbox", children: se.map((Q) => /* @__PURE__ */
|
|
4648
|
+
/* @__PURE__ */ n("div", { className: "ina-phone-input__country-list", role: "listbox", children: se.map((Q) => /* @__PURE__ */ _(
|
|
4649
4649
|
"button",
|
|
4650
4650
|
{
|
|
4651
4651
|
type: "button",
|
|
@@ -4667,7 +4667,7 @@ function hs({
|
|
|
4667
4667
|
height: "18"
|
|
4668
4668
|
}
|
|
4669
4669
|
),
|
|
4670
|
-
/* @__PURE__ */
|
|
4670
|
+
/* @__PURE__ */ _("span", { className: "ina-phone-input__country-name", children: [
|
|
4671
4671
|
Q.name,
|
|
4672
4672
|
" (",
|
|
4673
4673
|
Q.code,
|
|
@@ -4690,14 +4690,14 @@ function hs({
|
|
|
4690
4690
|
value: b,
|
|
4691
4691
|
type: "tel",
|
|
4692
4692
|
placeholder: s,
|
|
4693
|
-
disabled:
|
|
4693
|
+
disabled: p,
|
|
4694
4694
|
readOnly: u,
|
|
4695
4695
|
className: "ina-phone-input__input",
|
|
4696
4696
|
onChange: P,
|
|
4697
4697
|
"aria-describedby": Z ? U : void 0
|
|
4698
4698
|
}
|
|
4699
4699
|
),
|
|
4700
|
-
C && b && !
|
|
4700
|
+
C && b && !p && !u && /* @__PURE__ */ n(
|
|
4701
4701
|
"button",
|
|
4702
4702
|
{
|
|
4703
4703
|
type: "button",
|
|
@@ -4723,29 +4723,29 @@ const $n = pe.forwardRef((e, a) => {
|
|
|
4723
4723
|
disabled: l = !1,
|
|
4724
4724
|
size: c = "md",
|
|
4725
4725
|
orientation: v = "vertical",
|
|
4726
|
-
required:
|
|
4726
|
+
required: p = !1,
|
|
4727
4727
|
error: u = !1,
|
|
4728
4728
|
helperText: k,
|
|
4729
4729
|
className: g = "",
|
|
4730
4730
|
...m
|
|
4731
4731
|
} = e;
|
|
4732
|
-
return /* @__PURE__ */
|
|
4732
|
+
return /* @__PURE__ */ _(
|
|
4733
4733
|
"fieldset",
|
|
4734
4734
|
{
|
|
4735
4735
|
className: `ina-radio-input ina-radio-input--size-${c} ina-radio-input--orientation-${v} ${u ? "ina-radio-input--error" : ""} ${g}`,
|
|
4736
4736
|
disabled: l,
|
|
4737
4737
|
...m,
|
|
4738
4738
|
children: [
|
|
4739
|
-
/* @__PURE__ */
|
|
4739
|
+
/* @__PURE__ */ _("div", { className: "ina-radio-input__group", children: [
|
|
4740
4740
|
/* @__PURE__ */ n(
|
|
4741
4741
|
"label",
|
|
4742
4742
|
{
|
|
4743
|
-
className: `ina-radio-input__main-label ${
|
|
4743
|
+
className: `ina-radio-input__main-label ${p ? "ina-radio-input__main-label--required" : ""}`,
|
|
4744
4744
|
htmlFor: t,
|
|
4745
4745
|
children: t
|
|
4746
4746
|
}
|
|
4747
4747
|
),
|
|
4748
|
-
s.map((C, I) => /* @__PURE__ */
|
|
4748
|
+
s.map((C, I) => /* @__PURE__ */ _(
|
|
4749
4749
|
"div",
|
|
4750
4750
|
{
|
|
4751
4751
|
className: `ina-radio-input__option ${l ? "ina-radio-input__option--disabled" : ""}`,
|
|
@@ -4802,7 +4802,7 @@ const gs = ({
|
|
|
4802
4802
|
panelClassName: l = "",
|
|
4803
4803
|
renderOptionLabel: c,
|
|
4804
4804
|
indicator: v = "check",
|
|
4805
|
-
multiple:
|
|
4805
|
+
multiple: p = !1,
|
|
4806
4806
|
className: u = "",
|
|
4807
4807
|
onClose: k,
|
|
4808
4808
|
prefixNode: g,
|
|
@@ -4814,8 +4814,8 @@ const gs = ({
|
|
|
4814
4814
|
loading: E = !1,
|
|
4815
4815
|
currentPage: x = 1,
|
|
4816
4816
|
onLoadMore: b,
|
|
4817
|
-
onSearch:
|
|
4818
|
-
searchDebounceMs:
|
|
4817
|
+
onSearch: y,
|
|
4818
|
+
searchDebounceMs: f = 300,
|
|
4819
4819
|
renderSelectedPreview: T,
|
|
4820
4820
|
onRemoveSelected: S,
|
|
4821
4821
|
searchValue: q,
|
|
@@ -4831,11 +4831,11 @@ const gs = ({
|
|
|
4831
4831
|
}) => {
|
|
4832
4832
|
var he;
|
|
4833
4833
|
const [L, P] = J(!1), [W, fe] = J(""), [te, G] = J(-1), Z = ce(null), Q = ce(null), Y = ce([]), le = ce(null), ie = ce(/* @__PURE__ */ new Map()), K = q !== void 0, be = K ? q : W;
|
|
4834
|
-
de(() => (le.current && clearTimeout(le.current),
|
|
4835
|
-
|
|
4836
|
-
},
|
|
4834
|
+
de(() => (le.current && clearTimeout(le.current), y && be !== "" ? le.current = setTimeout(() => {
|
|
4835
|
+
y(be);
|
|
4836
|
+
}, f) : y && be === "" && y(""), () => {
|
|
4837
4837
|
le.current && clearTimeout(le.current);
|
|
4838
|
-
}), [be,
|
|
4838
|
+
}), [be, y, f]), de(() => {
|
|
4839
4839
|
K && q !== W && fe(q);
|
|
4840
4840
|
}, [q, K, W]), de(() => {
|
|
4841
4841
|
const d = (w) => {
|
|
@@ -4845,7 +4845,7 @@ const gs = ({
|
|
|
4845
4845
|
}, [k, K, B]), de(() => () => {
|
|
4846
4846
|
le.current && clearTimeout(le.current);
|
|
4847
4847
|
}, []);
|
|
4848
|
-
const ve =
|
|
4848
|
+
const ve = p && Array.isArray(a) ? a : [], me = p ? null : a, Ae = (d) => {
|
|
4849
4849
|
if (ie.current.has(d))
|
|
4850
4850
|
return ie.current.get(d) || null;
|
|
4851
4851
|
const w = e.find((M) => M.value === d);
|
|
@@ -4857,7 +4857,7 @@ const gs = ({
|
|
|
4857
4857
|
de(() => {
|
|
4858
4858
|
if (O) {
|
|
4859
4859
|
let d = null;
|
|
4860
|
-
if (
|
|
4860
|
+
if (p) {
|
|
4861
4861
|
if (ve.length > 0) {
|
|
4862
4862
|
const w = ve.map((M) => we(M)).filter((M) => M !== null);
|
|
4863
4863
|
d = w.length > 0 ? w : null;
|
|
@@ -4866,14 +4866,14 @@ const gs = ({
|
|
|
4866
4866
|
me != null && me !== "" && (d = we(me));
|
|
4867
4867
|
O(d);
|
|
4868
4868
|
}
|
|
4869
|
-
}, [a,
|
|
4869
|
+
}, [a, p, e]), de(() => {
|
|
4870
4870
|
const d = ie.current;
|
|
4871
4871
|
e.forEach((w) => {
|
|
4872
4872
|
d.has(w.value) && d.set(w.value, w.label);
|
|
4873
4873
|
});
|
|
4874
4874
|
}, [e]), de(() => {
|
|
4875
4875
|
const d = ie.current;
|
|
4876
|
-
if (
|
|
4876
|
+
if (p && Array.isArray(a))
|
|
4877
4877
|
a.forEach((w) => {
|
|
4878
4878
|
if (!d.has(w)) {
|
|
4879
4879
|
const M = e.find((z) => z.value === w);
|
|
@@ -4889,9 +4889,9 @@ const gs = ({
|
|
|
4889
4889
|
}
|
|
4890
4890
|
} else
|
|
4891
4891
|
d.clear();
|
|
4892
|
-
}, [a,
|
|
4892
|
+
}, [a, p, e]);
|
|
4893
4893
|
let Ce;
|
|
4894
|
-
if (
|
|
4894
|
+
if (p)
|
|
4895
4895
|
if (!ve.length) Ce = r;
|
|
4896
4896
|
else if (ve.length > 3)
|
|
4897
4897
|
Ce = `${ve.length} data terpilih`;
|
|
@@ -4901,7 +4901,7 @@ const gs = ({
|
|
|
4901
4901
|
}
|
|
4902
4902
|
else
|
|
4903
4903
|
Ce = Ae(me) || r;
|
|
4904
|
-
const De =
|
|
4904
|
+
const De = y ? e : H ? e.filter(
|
|
4905
4905
|
(d) => d.label.toLowerCase().includes(be.toLowerCase())
|
|
4906
4906
|
) : e;
|
|
4907
4907
|
de(() => {
|
|
@@ -4920,9 +4920,9 @@ const gs = ({
|
|
|
4920
4920
|
if (ie.current.delete(d), S)
|
|
4921
4921
|
S(d);
|
|
4922
4922
|
else {
|
|
4923
|
-
if (ne && (
|
|
4923
|
+
if (ne && (p && ve.length <= 1 || !p))
|
|
4924
4924
|
return;
|
|
4925
|
-
if (
|
|
4925
|
+
if (p) {
|
|
4926
4926
|
const M = (Array.isArray(a) ? [...a] : []).filter((z) => z !== d);
|
|
4927
4927
|
t(M);
|
|
4928
4928
|
} else
|
|
@@ -4931,11 +4931,11 @@ const gs = ({
|
|
|
4931
4931
|
}, Me = () => {
|
|
4932
4932
|
if (T || ne)
|
|
4933
4933
|
return ne ? null : T == null ? void 0 : T(a);
|
|
4934
|
-
if (
|
|
4935
|
-
return /* @__PURE__ */
|
|
4934
|
+
if (p && ve.length > 0)
|
|
4935
|
+
return /* @__PURE__ */ _("div", { className: "ina-select-dropdown__preview-content", children: [
|
|
4936
4936
|
ve.slice(0, 3).map((d, w) => {
|
|
4937
4937
|
const z = Ae(d) || d;
|
|
4938
|
-
return /* @__PURE__ */
|
|
4938
|
+
return /* @__PURE__ */ _(
|
|
4939
4939
|
"div",
|
|
4940
4940
|
{
|
|
4941
4941
|
className: "ina-select-dropdown__preview-item ina-select-dropdown__preview-item--multiple",
|
|
@@ -4959,15 +4959,15 @@ const gs = ({
|
|
|
4959
4959
|
w
|
|
4960
4960
|
);
|
|
4961
4961
|
}),
|
|
4962
|
-
ve.length > 3 && /* @__PURE__ */
|
|
4962
|
+
ve.length > 3 && /* @__PURE__ */ _("span", { className: "ina-select-dropdown__preview-more", children: [
|
|
4963
4963
|
"+",
|
|
4964
4964
|
ve.length - 3,
|
|
4965
4965
|
" more"
|
|
4966
4966
|
] })
|
|
4967
4967
|
] });
|
|
4968
|
-
if (!
|
|
4968
|
+
if (!p && me !== null && me !== void 0 && me !== "") {
|
|
4969
4969
|
const w = Ae(me) || me;
|
|
4970
|
-
return /* @__PURE__ */ n("div", { className: "ina-select-dropdown__preview-content", children: /* @__PURE__ */
|
|
4970
|
+
return /* @__PURE__ */ n("div", { className: "ina-select-dropdown__preview-content", children: /* @__PURE__ */ _("div", { className: "ina-select-dropdown__preview-item ina-select-dropdown__preview-item--single", children: [
|
|
4971
4971
|
/* @__PURE__ */ n("span", { className: "ina-select-dropdown__preview-item-text", children: w }),
|
|
4972
4972
|
!$ && /* @__PURE__ */ n(
|
|
4973
4973
|
"button",
|
|
@@ -4999,7 +4999,7 @@ const gs = ({
|
|
|
4999
4999
|
), N = A(
|
|
5000
5000
|
"ina-select-dropdown__trigger-icon",
|
|
5001
5001
|
$ && "ina-select-dropdown__trigger-icon--disabled"
|
|
5002
|
-
), F = () =>
|
|
5002
|
+
), F = () => p || L ? be : me != null && me !== "" && Ae(me) || "", V = () => {
|
|
5003
5003
|
var w;
|
|
5004
5004
|
!L && !$ && P(!0);
|
|
5005
5005
|
const d = (w = Z.current) == null ? void 0 : w.querySelector("input");
|
|
@@ -5009,7 +5009,7 @@ const gs = ({
|
|
|
5009
5009
|
}, X = (d) => {
|
|
5010
5010
|
var w, M;
|
|
5011
5011
|
if (!($ || d.disabled))
|
|
5012
|
-
if (
|
|
5012
|
+
if (p) {
|
|
5013
5013
|
const z = Array.isArray(a) ? [...a] : [], j = z.includes(d.value) ? z.filter((Le) => Le !== d.value) : [...z, d.value];
|
|
5014
5014
|
if (z.includes(d.value)) {
|
|
5015
5015
|
if (ne && ve.length <= 1) {
|
|
@@ -5039,18 +5039,18 @@ const gs = ({
|
|
|
5039
5039
|
(w) => w < De.length - 1 ? w + 1 : w
|
|
5040
5040
|
) : (P(!0), G(0))) : d.key === "ArrowUp" ? (d.preventDefault(), G((w) => w > 0 ? w - 1 : w)) : d.key === "Enter" ? (d.preventDefault(), L && te >= 0 && te < De.length && X(De[te])) : d.key === "Escape" && (d.preventDefault(), P(!1), G(-1));
|
|
5041
5041
|
};
|
|
5042
|
-
return /* @__PURE__ */
|
|
5042
|
+
return /* @__PURE__ */ _(
|
|
5043
5043
|
"div",
|
|
5044
5044
|
{
|
|
5045
5045
|
ref: Z,
|
|
5046
5046
|
style: { width: Mt(m) },
|
|
5047
5047
|
className: o,
|
|
5048
5048
|
children: [
|
|
5049
|
-
U && /* @__PURE__ */
|
|
5049
|
+
U && /* @__PURE__ */ _("label", { className: "ina-select-dropdown__label", children: [
|
|
5050
5050
|
U,
|
|
5051
5051
|
ee && /* @__PURE__ */ n("span", { className: "ina-select-dropdown__required", children: "*" })
|
|
5052
5052
|
] }),
|
|
5053
|
-
/* @__PURE__ */
|
|
5053
|
+
/* @__PURE__ */ _(
|
|
5054
5054
|
"div",
|
|
5055
5055
|
{
|
|
5056
5056
|
onClick: V,
|
|
@@ -5104,7 +5104,7 @@ const gs = ({
|
|
|
5104
5104
|
]
|
|
5105
5105
|
}
|
|
5106
5106
|
),
|
|
5107
|
-
L && !$ && /* @__PURE__ */
|
|
5107
|
+
L && !$ && /* @__PURE__ */ _(
|
|
5108
5108
|
"div",
|
|
5109
5109
|
{
|
|
5110
5110
|
className: A("ina-select-dropdown__panel", l),
|
|
@@ -5115,7 +5115,7 @@ const gs = ({
|
|
|
5115
5115
|
},
|
|
5116
5116
|
children: [
|
|
5117
5117
|
ae && Me() !== null && /* @__PURE__ */ n("div", { className: "ina-select-dropdown__preview", children: Me() }),
|
|
5118
|
-
/* @__PURE__ */
|
|
5118
|
+
/* @__PURE__ */ _(
|
|
5119
5119
|
"div",
|
|
5120
5120
|
{
|
|
5121
5121
|
ref: Q,
|
|
@@ -5127,9 +5127,9 @@ const gs = ({
|
|
|
5127
5127
|
children: [
|
|
5128
5128
|
se && /* @__PURE__ */ n("div", { className: "ina-select-dropdown__selection-title", children: se }),
|
|
5129
5129
|
De.map((d, w) => {
|
|
5130
|
-
const M =
|
|
5130
|
+
const M = p ? ve.includes(d.value) : d.value === me, z = c ? c(d) : /* @__PURE__ */ n("span", { className: "ina-select-dropdown__option-label", children: d.label });
|
|
5131
5131
|
let j = null;
|
|
5132
|
-
return
|
|
5132
|
+
return p ? j = /* @__PURE__ */ n(
|
|
5133
5133
|
"div",
|
|
5134
5134
|
{
|
|
5135
5135
|
className: A(
|
|
@@ -5153,7 +5153,7 @@ const gs = ({
|
|
|
5153
5153
|
),
|
|
5154
5154
|
children: M && /* @__PURE__ */ n("div", { className: "ina-select-dropdown__option-radio-dot" })
|
|
5155
5155
|
}
|
|
5156
|
-
)), /* @__PURE__ */
|
|
5156
|
+
)), /* @__PURE__ */ _(
|
|
5157
5157
|
"button",
|
|
5158
5158
|
{
|
|
5159
5159
|
ref: (ge) => {
|
|
@@ -5167,8 +5167,8 @@ const gs = ({
|
|
|
5167
5167
|
disabled: $ || d.disabled,
|
|
5168
5168
|
className: A(
|
|
5169
5169
|
"ina-select-dropdown__option",
|
|
5170
|
-
!
|
|
5171
|
-
|
|
5170
|
+
!p && M && "ina-select-dropdown__option--selected-single",
|
|
5171
|
+
p && M && "ina-select-dropdown__option--selected-multiple",
|
|
5172
5172
|
($ || d.disabled) && "ina-select-dropdown__option--disabled",
|
|
5173
5173
|
w === te && "ina-select-dropdown__option--focused"
|
|
5174
5174
|
),
|
|
@@ -5181,7 +5181,7 @@ const gs = ({
|
|
|
5181
5181
|
);
|
|
5182
5182
|
}),
|
|
5183
5183
|
De.length === 0 && !E && /* @__PURE__ */ n("div", { className: "ina-select-dropdown__empty", children: "No results" }),
|
|
5184
|
-
E && /* @__PURE__ */
|
|
5184
|
+
E && /* @__PURE__ */ _("div", { className: "ina-select-dropdown__loading", children: [
|
|
5185
5185
|
/* @__PURE__ */ n("div", { className: "ina-select-dropdown__loading-spinner", children: /* @__PURE__ */ n(
|
|
5186
5186
|
Tt,
|
|
5187
5187
|
{
|
|
@@ -5207,23 +5207,24 @@ function vs({
|
|
|
5207
5207
|
position: t = "right",
|
|
5208
5208
|
closeOnBackdrop: r = !0,
|
|
5209
5209
|
className: s = "",
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5210
|
+
panelClassName: i = "",
|
|
5211
|
+
width: l = "sm",
|
|
5212
|
+
title: c,
|
|
5213
|
+
closeLabel: v = "Tutup panel",
|
|
5214
|
+
children: p
|
|
5214
5215
|
}) {
|
|
5215
|
-
const [
|
|
5216
|
-
if (de(() =>
|
|
5217
|
-
if (
|
|
5216
|
+
const [u, k] = J(!1);
|
|
5217
|
+
if (de(() => k(!0), []), de(() => {
|
|
5218
|
+
if (u)
|
|
5218
5219
|
return document.body.style.overflow = e ? "hidden" : "", () => {
|
|
5219
5220
|
document.body.style.overflow = "";
|
|
5220
5221
|
};
|
|
5221
|
-
}, [e,
|
|
5222
|
-
const
|
|
5222
|
+
}, [e, u]), !e || !u) return null;
|
|
5223
|
+
const g = A(
|
|
5223
5224
|
"ina-drawer",
|
|
5224
5225
|
`ina-drawer--position-${t}`,
|
|
5225
5226
|
s
|
|
5226
|
-
),
|
|
5227
|
+
), m = A(
|
|
5227
5228
|
"ina-drawer__panel",
|
|
5228
5229
|
// Only add width class if it's a predefined variant
|
|
5229
5230
|
[
|
|
@@ -5238,14 +5239,15 @@ function vs({
|
|
|
5238
5239
|
"60vw",
|
|
5239
5240
|
"70vw",
|
|
5240
5241
|
"80vw"
|
|
5241
|
-
].includes(
|
|
5242
|
-
|
|
5242
|
+
].includes(l) ? `ina-drawer__panel--width-${l}` : null,
|
|
5243
|
+
i
|
|
5244
|
+
), C = A(
|
|
5243
5245
|
"ina-drawer__header",
|
|
5244
5246
|
t === "top" && "ina-drawer__header--hidden"
|
|
5245
|
-
),
|
|
5247
|
+
), I = A(
|
|
5246
5248
|
"ina-drawer__footer",
|
|
5247
5249
|
t !== "top" && "ina-drawer__footer--hidden"
|
|
5248
|
-
),
|
|
5250
|
+
), D = A("ina-drawer__close-button"), E = A("ina-drawer__close-icon"), x = [
|
|
5249
5251
|
"sm",
|
|
5250
5252
|
"md",
|
|
5251
5253
|
"lg",
|
|
@@ -5257,49 +5259,49 @@ function vs({
|
|
|
5257
5259
|
"60vw",
|
|
5258
5260
|
"70vw",
|
|
5259
5261
|
"80vw"
|
|
5260
|
-
].includes(
|
|
5261
|
-
width: t === "top" || t === "bottom" ? "100vw" :
|
|
5262
|
-
minWidth: t === "top" || t === "bottom" ? "100vw" :
|
|
5263
|
-
maxWidth: t === "top" || t === "bottom" ? "100vw" :
|
|
5262
|
+
].includes(l) ? {} : {
|
|
5263
|
+
width: t === "top" || t === "bottom" ? "100vw" : l,
|
|
5264
|
+
minWidth: t === "top" || t === "bottom" ? "100vw" : l,
|
|
5265
|
+
maxWidth: t === "top" || t === "bottom" ? "100vw" : l,
|
|
5264
5266
|
height: t === "top" || t === "bottom" ? "60vh" : "100vh",
|
|
5265
5267
|
maxHeight: t === "top" || t === "bottom" ? "60vh" : "100vh"
|
|
5266
5268
|
};
|
|
5267
|
-
return Pt(/* @__PURE__ */
|
|
5269
|
+
return Pt(/* @__PURE__ */ _(
|
|
5268
5270
|
"div",
|
|
5269
5271
|
{
|
|
5270
|
-
className:
|
|
5272
|
+
className: g,
|
|
5271
5273
|
onClick: () => r && a(),
|
|
5272
5274
|
children: [
|
|
5273
5275
|
/* @__PURE__ */ n("div", { className: "ina-drawer__backdrop" }),
|
|
5274
|
-
/* @__PURE__ */
|
|
5276
|
+
/* @__PURE__ */ _(
|
|
5275
5277
|
"div",
|
|
5276
5278
|
{
|
|
5277
|
-
onClick: (
|
|
5278
|
-
className:
|
|
5279
|
-
style:
|
|
5279
|
+
onClick: (y) => y.stopPropagation(),
|
|
5280
|
+
className: m,
|
|
5281
|
+
style: x,
|
|
5280
5282
|
children: [
|
|
5281
|
-
t !== "top" && /* @__PURE__ */
|
|
5282
|
-
|
|
5283
|
+
t !== "top" && /* @__PURE__ */ _("div", { className: C, children: [
|
|
5284
|
+
c && /* @__PURE__ */ n("h2", { className: "ina-drawer__title", children: c }),
|
|
5283
5285
|
/* @__PURE__ */ n(
|
|
5284
5286
|
"button",
|
|
5285
5287
|
{
|
|
5286
5288
|
type: "button",
|
|
5287
5289
|
onClick: a,
|
|
5288
|
-
className:
|
|
5289
|
-
"aria-label":
|
|
5290
|
-
children: /* @__PURE__ */ n(ze, { className:
|
|
5290
|
+
className: D,
|
|
5291
|
+
"aria-label": v,
|
|
5292
|
+
children: /* @__PURE__ */ n(ze, { className: E, size: 20 })
|
|
5291
5293
|
}
|
|
5292
5294
|
)
|
|
5293
5295
|
] }),
|
|
5294
|
-
/* @__PURE__ */ n("div", { className: "ina-drawer__content", children:
|
|
5295
|
-
t === "top" && /* @__PURE__ */ n("div", { className:
|
|
5296
|
+
/* @__PURE__ */ n("div", { className: "ina-drawer__content", children: p }),
|
|
5297
|
+
t === "top" && /* @__PURE__ */ n("div", { className: I, children: /* @__PURE__ */ n(
|
|
5296
5298
|
"button",
|
|
5297
5299
|
{
|
|
5298
5300
|
type: "button",
|
|
5299
5301
|
onClick: a,
|
|
5300
|
-
className:
|
|
5301
|
-
"aria-label":
|
|
5302
|
-
children: /* @__PURE__ */ n(ze, { className:
|
|
5302
|
+
className: D,
|
|
5303
|
+
"aria-label": v,
|
|
5304
|
+
children: /* @__PURE__ */ n(ze, { className: E, size: 20 })
|
|
5303
5305
|
}
|
|
5304
5306
|
) })
|
|
5305
5307
|
]
|
|
@@ -5350,7 +5352,7 @@ function _s({
|
|
|
5350
5352
|
const c = `${e}px`, v = A(
|
|
5351
5353
|
"ina-spinner",
|
|
5352
5354
|
l && "ina-spinner--spinner-only"
|
|
5353
|
-
),
|
|
5355
|
+
), p = A(
|
|
5354
5356
|
"ina-spinner__element",
|
|
5355
5357
|
e <= 16 && "ina-spinner__element--size-xs",
|
|
5356
5358
|
e <= 24 && "ina-spinner__element--size-sm",
|
|
@@ -5361,18 +5363,18 @@ function _s({
|
|
|
5361
5363
|
`ina-spinner__element--track-${t}`,
|
|
5362
5364
|
`ina-spinner__element--border-${a}`
|
|
5363
5365
|
);
|
|
5364
|
-
return /* @__PURE__ */
|
|
5366
|
+
return /* @__PURE__ */ _("div", { className: v, children: [
|
|
5365
5367
|
/* @__PURE__ */ n(
|
|
5366
5368
|
"div",
|
|
5367
5369
|
{
|
|
5368
|
-
className:
|
|
5370
|
+
className: p,
|
|
5369
5371
|
style: {
|
|
5370
5372
|
width: c,
|
|
5371
5373
|
height: c
|
|
5372
5374
|
}
|
|
5373
5375
|
}
|
|
5374
5376
|
),
|
|
5375
|
-
!l && /* @__PURE__ */
|
|
5377
|
+
!l && /* @__PURE__ */ _(tt, { children: [
|
|
5376
5378
|
/* @__PURE__ */ n("div", { className: "ina-spinner__title", children: s }),
|
|
5377
5379
|
/* @__PURE__ */ n("div", { className: "ina-spinner__subtitle", children: i })
|
|
5378
5380
|
] })
|
|
@@ -5388,7 +5390,7 @@ function zn({
|
|
|
5388
5390
|
suffixIcon: l,
|
|
5389
5391
|
label: c,
|
|
5390
5392
|
helperText: v,
|
|
5391
|
-
status:
|
|
5393
|
+
status: p = "neutral",
|
|
5392
5394
|
statusMessage: u,
|
|
5393
5395
|
size: k = "md",
|
|
5394
5396
|
maxLength: g,
|
|
@@ -5399,8 +5401,8 @@ function zn({
|
|
|
5399
5401
|
disabled: E = !1,
|
|
5400
5402
|
className: x = "",
|
|
5401
5403
|
securityConfig: b = La,
|
|
5402
|
-
onBlur:
|
|
5403
|
-
...
|
|
5404
|
+
onBlur: y,
|
|
5405
|
+
...f
|
|
5404
5406
|
}) {
|
|
5405
5407
|
const T = () => b != null && b.enableXssProtection ? rt(e).sanitized : e, [S, q] = J(T()), [B] = bt(S, r), $ = ce(!0);
|
|
5406
5408
|
de(() => {
|
|
@@ -5426,31 +5428,31 @@ function zn({
|
|
|
5426
5428
|
q(W), a(W, P), t == null || t(P);
|
|
5427
5429
|
}
|
|
5428
5430
|
}, H = (P) => {
|
|
5429
|
-
|
|
5431
|
+
y == null || y(P);
|
|
5430
5432
|
}, O = () => {
|
|
5431
5433
|
q(""), a(""), s && s(""), I == null || I();
|
|
5432
5434
|
}, U = A(
|
|
5433
5435
|
"ina-text-field__wrapper",
|
|
5434
5436
|
`ina-text-field__wrapper--size-${k}`,
|
|
5435
|
-
`ina-text-field__wrapper--status-${
|
|
5437
|
+
`ina-text-field__wrapper--status-${p}`,
|
|
5436
5438
|
E && "ina-text-field__wrapper--disabled"
|
|
5437
5439
|
), ee = A(
|
|
5438
5440
|
"ina-text-field__helper-text",
|
|
5439
|
-
`ina-text-field__helper-text--${
|
|
5440
|
-
), se =
|
|
5441
|
-
return /* @__PURE__ */
|
|
5442
|
-
c && /* @__PURE__ */
|
|
5441
|
+
`ina-text-field__helper-text--${p}`
|
|
5442
|
+
), se = p !== "neutral" && u != null ? u : v, ne = (f == null ? void 0 : f.id) || (f == null ? void 0 : f.name) || String(c).toLowerCase(), L = `${ne}-status`;
|
|
5443
|
+
return /* @__PURE__ */ _("div", { className: A("ina-text-field", x), children: [
|
|
5444
|
+
c && /* @__PURE__ */ _("label", { className: "ina-text-field__label", htmlFor: String(ne), children: [
|
|
5443
5445
|
c,
|
|
5444
|
-
|
|
5446
|
+
f.required && /* @__PURE__ */ n("span", { className: "ina-text-field__required", children: "*" })
|
|
5445
5447
|
] }),
|
|
5446
|
-
/* @__PURE__ */
|
|
5448
|
+
/* @__PURE__ */ _("div", { className: U, children: [
|
|
5447
5449
|
i && /* @__PURE__ */ n("div", { className: "ina-text-field__prefix-icon", children: i }),
|
|
5448
5450
|
/* @__PURE__ */ n(
|
|
5449
5451
|
"input",
|
|
5450
5452
|
{
|
|
5451
|
-
...
|
|
5453
|
+
...f,
|
|
5452
5454
|
id: String(ne),
|
|
5453
|
-
type:
|
|
5455
|
+
type: f.type ?? "text",
|
|
5454
5456
|
className: "ina-text-field__input",
|
|
5455
5457
|
value: S,
|
|
5456
5458
|
onChange: ae,
|
|
@@ -5476,9 +5478,9 @@ function zn({
|
|
|
5476
5478
|
),
|
|
5477
5479
|
l && /* @__PURE__ */ n("div", { className: "ina-text-field__suffix-icon", children: l })
|
|
5478
5480
|
] }),
|
|
5479
|
-
/* @__PURE__ */
|
|
5481
|
+
/* @__PURE__ */ _("div", { className: "ina-text-field__bottom-area", children: [
|
|
5480
5482
|
se && /* @__PURE__ */ n("div", { id: L, className: ee, children: se }),
|
|
5481
|
-
m && g != null && /* @__PURE__ */
|
|
5483
|
+
m && g != null && /* @__PURE__ */ _("div", { className: "ina-text-field__char-count", children: [
|
|
5482
5484
|
S.length,
|
|
5483
5485
|
"/",
|
|
5484
5486
|
g
|
|
@@ -5486,7 +5488,7 @@ function zn({
|
|
|
5486
5488
|
] })
|
|
5487
5489
|
] });
|
|
5488
5490
|
}
|
|
5489
|
-
const Bn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
5491
|
+
const Bn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
5490
5492
|
"svg",
|
|
5491
5493
|
{
|
|
5492
5494
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5506,7 +5508,7 @@ const Bn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
5506
5508
|
/* @__PURE__ */ n("path", { d: "M8 9l4 -4" })
|
|
5507
5509
|
]
|
|
5508
5510
|
}
|
|
5509
|
-
), Pn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
5511
|
+
), Pn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
5510
5512
|
"svg",
|
|
5511
5513
|
{
|
|
5512
5514
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5538,7 +5540,7 @@ function bs({
|
|
|
5538
5540
|
placeholderSearch: c,
|
|
5539
5541
|
// Deprecated: use searchPlaceholder instead
|
|
5540
5542
|
searchPlaceholder: v = c || "Input pencarian",
|
|
5541
|
-
buttonSearchLabel:
|
|
5543
|
+
buttonSearchLabel: p = "Cari",
|
|
5542
5544
|
className: u = "",
|
|
5543
5545
|
selectable: k = !1,
|
|
5544
5546
|
onSelectionChange: g,
|
|
@@ -5549,8 +5551,8 @@ function bs({
|
|
|
5549
5551
|
rowClickable: E = !1,
|
|
5550
5552
|
onRowClick: x,
|
|
5551
5553
|
lastColumnSticky: b = !1,
|
|
5552
|
-
renderSortIndicator:
|
|
5553
|
-
emptyState:
|
|
5554
|
+
renderSortIndicator: y,
|
|
5555
|
+
emptyState: f = "No data found",
|
|
5554
5556
|
showPagination: T = !0,
|
|
5555
5557
|
loading: S,
|
|
5556
5558
|
data: q,
|
|
@@ -5647,8 +5649,8 @@ function bs({
|
|
|
5647
5649
|
L && "ina-table--loading",
|
|
5648
5650
|
ae && "ina-table--variant-striped"
|
|
5649
5651
|
), He = A("ina-table__header"), Se = A("ina-table__body");
|
|
5650
|
-
return /* @__PURE__ */
|
|
5651
|
-
D && /* @__PURE__ */ n("div", { className: ge, children: /* @__PURE__ */
|
|
5652
|
+
return /* @__PURE__ */ _("div", { className: j, children: [
|
|
5653
|
+
D && /* @__PURE__ */ n("div", { className: ge, children: /* @__PURE__ */ _("div", { className: "ina-table__search-controls", children: [
|
|
5652
5654
|
/* @__PURE__ */ n(
|
|
5653
5655
|
zn,
|
|
5654
5656
|
{
|
|
@@ -5659,7 +5661,7 @@ function bs({
|
|
|
5659
5661
|
disabled: L
|
|
5660
5662
|
}
|
|
5661
5663
|
),
|
|
5662
|
-
/* @__PURE__ */ n(ct, { onClick: M, disabled: L, children:
|
|
5664
|
+
/* @__PURE__ */ n(ct, { onClick: M, disabled: L, children: p })
|
|
5663
5665
|
] }) }),
|
|
5664
5666
|
/* @__PURE__ */ n(
|
|
5665
5667
|
Sn,
|
|
@@ -5670,8 +5672,8 @@ function bs({
|
|
|
5670
5672
|
className: "ina-table__progress-bar"
|
|
5671
5673
|
}
|
|
5672
5674
|
),
|
|
5673
|
-
/* @__PURE__ */
|
|
5674
|
-
/* @__PURE__ */ n("thead", { className: He, children: /* @__PURE__ */
|
|
5675
|
+
/* @__PURE__ */ _("table", { ref: fe, className: Le, children: [
|
|
5676
|
+
/* @__PURE__ */ n("thead", { className: He, children: /* @__PURE__ */ _("tr", { children: [
|
|
5675
5677
|
k && /* @__PURE__ */ n("th", { className: "ina-table__header-cell", children: /* @__PURE__ */ n(
|
|
5676
5678
|
It,
|
|
5677
5679
|
{
|
|
@@ -5694,9 +5696,9 @@ function bs({
|
|
|
5694
5696
|
),
|
|
5695
5697
|
style: oe.width ? { width: oe.width } : void 0,
|
|
5696
5698
|
"aria-sort": oe.sortable ? Ne ? K === "asc" ? "ascending" : "descending" : "none" : void 0,
|
|
5697
|
-
children: /* @__PURE__ */
|
|
5699
|
+
children: /* @__PURE__ */ _("div", { className: "ina-table__sort-controls", children: [
|
|
5698
5700
|
oe.header,
|
|
5699
|
-
oe.sortable && (
|
|
5701
|
+
oe.sortable && (y ? y({
|
|
5700
5702
|
column: oe,
|
|
5701
5703
|
index: xe,
|
|
5702
5704
|
isSorted: Ne,
|
|
@@ -5738,11 +5740,11 @@ function bs({
|
|
|
5738
5740
|
{
|
|
5739
5741
|
colSpan: k ? e.length + 1 : e.length,
|
|
5740
5742
|
className: "ina-table__empty-cell",
|
|
5741
|
-
children:
|
|
5743
|
+
children: f
|
|
5742
5744
|
}
|
|
5743
5745
|
) }) : P.map((oe, xe) => {
|
|
5744
5746
|
const Ne = String(oe[I]);
|
|
5745
|
-
return /* @__PURE__ */
|
|
5747
|
+
return /* @__PURE__ */ _(
|
|
5746
5748
|
"tr",
|
|
5747
5749
|
{
|
|
5748
5750
|
className: A(
|
|
@@ -5843,7 +5845,7 @@ const Hn = pe.forwardRef(
|
|
|
5843
5845
|
onChangeDebounced: l,
|
|
5844
5846
|
prefixIcon: c,
|
|
5845
5847
|
suffixIcon: v,
|
|
5846
|
-
label:
|
|
5848
|
+
label: p,
|
|
5847
5849
|
helperText: u,
|
|
5848
5850
|
status: k = "neutral",
|
|
5849
5851
|
statusMessage: g,
|
|
@@ -5854,22 +5856,22 @@ const Hn = pe.forwardRef(
|
|
|
5854
5856
|
maxRows: E,
|
|
5855
5857
|
placeholder: x,
|
|
5856
5858
|
disabled: b = !1,
|
|
5857
|
-
className:
|
|
5858
|
-
securityConfig:
|
|
5859
|
+
className: y = "",
|
|
5860
|
+
securityConfig: f = La,
|
|
5859
5861
|
onBlur: T,
|
|
5860
5862
|
...S
|
|
5861
|
-
} = e, q = () =>
|
|
5863
|
+
} = e, q = () => f != null && f.enableXssProtection ? rt(t).sanitized : t, [B, $] = J(q()), [ae] = bt(B, i), H = ce(!0), O = ce(null), [U, ee] = J(D);
|
|
5862
5864
|
de(() => {
|
|
5863
5865
|
let Y = t;
|
|
5864
|
-
if (
|
|
5866
|
+
if (f != null && f.enableXssProtection) {
|
|
5865
5867
|
const le = rt(t);
|
|
5866
|
-
le.isValid || (
|
|
5868
|
+
le.isValid || (f.logViolations && console.warn(
|
|
5867
5869
|
"TextArea security violation on value change:",
|
|
5868
5870
|
le.threats
|
|
5869
|
-
),
|
|
5871
|
+
), f.onSecurityViolation && f.onSecurityViolation(le.threats, t), Y = le.sanitized);
|
|
5870
5872
|
}
|
|
5871
5873
|
$(Y);
|
|
5872
|
-
}, [t,
|
|
5874
|
+
}, [t, f]), de(() => {
|
|
5873
5875
|
H.current ? H.current = !1 : i > 0 && l && l(ae);
|
|
5874
5876
|
}, [ae, i, l]), de(() => {
|
|
5875
5877
|
const Y = O.current;
|
|
@@ -5882,9 +5884,9 @@ const Hn = pe.forwardRef(
|
|
|
5882
5884
|
const se = (Y) => {
|
|
5883
5885
|
let le = Y.target.value;
|
|
5884
5886
|
if (!(m != null && le.length > m)) {
|
|
5885
|
-
if (
|
|
5887
|
+
if (f != null && f.enableXssProtection) {
|
|
5886
5888
|
const ie = rt(le);
|
|
5887
|
-
ie.isValid || (
|
|
5889
|
+
ie.isValid || (f.logViolations && console.warn("TextArea security violation:", ie.threats), f.onSecurityViolation && f.onSecurityViolation(ie.threats, le), le = ie.sanitized);
|
|
5888
5890
|
}
|
|
5889
5891
|
$(le), r(le, Y), s == null || s(Y);
|
|
5890
5892
|
}
|
|
@@ -5894,20 +5896,20 @@ const Hn = pe.forwardRef(
|
|
|
5894
5896
|
$(""), r(""), l && l("");
|
|
5895
5897
|
}, P = (Y) => {
|
|
5896
5898
|
O.current = Y, typeof a == "function" ? a(Y) : a && (a.current = Y);
|
|
5897
|
-
}, W = A("ina-text-area",
|
|
5899
|
+
}, W = A("ina-text-area", y), fe = A(
|
|
5898
5900
|
"ina-text-area__wrapper",
|
|
5899
5901
|
`ina-text-area__wrapper--status-${k}`,
|
|
5900
5902
|
b && "ina-text-area__wrapper--disabled"
|
|
5901
5903
|
), te = A(
|
|
5902
5904
|
"ina-text-area__helper-text",
|
|
5903
5905
|
`ina-text-area__helper-text--${k}`
|
|
5904
|
-
), G = k !== "neutral" && g != null ? g : u, Z = (S == null ? void 0 : S.id) || (S == null ? void 0 : S.name) || String(
|
|
5905
|
-
return /* @__PURE__ */
|
|
5906
|
-
|
|
5907
|
-
|
|
5906
|
+
), G = k !== "neutral" && g != null ? g : u, Z = (S == null ? void 0 : S.id) || (S == null ? void 0 : S.name) || String(p).toLowerCase(), Q = `${Z}-status`;
|
|
5907
|
+
return /* @__PURE__ */ _("div", { className: W, children: [
|
|
5908
|
+
p && /* @__PURE__ */ _("label", { className: "ina-text-area__label", htmlFor: String(Z), children: [
|
|
5909
|
+
p,
|
|
5908
5910
|
S.required && /* @__PURE__ */ n("span", { className: "ina-text-field__required", children: "*" })
|
|
5909
5911
|
] }),
|
|
5910
|
-
/* @__PURE__ */
|
|
5912
|
+
/* @__PURE__ */ _("div", { className: fe, children: [
|
|
5911
5913
|
c && /* @__PURE__ */ n("div", { className: "ina-text-area__prefix-icon", children: c }),
|
|
5912
5914
|
/* @__PURE__ */ n(
|
|
5913
5915
|
"textarea",
|
|
@@ -5943,7 +5945,7 @@ const Hn = pe.forwardRef(
|
|
|
5943
5945
|
v && /* @__PURE__ */ n("div", { className: "ina-text-area__suffix-icon", children: v })
|
|
5944
5946
|
] }),
|
|
5945
5947
|
G && /* @__PURE__ */ n("div", { id: Q, className: te, children: G }),
|
|
5946
|
-
C && m != null && /* @__PURE__ */
|
|
5948
|
+
C && m != null && /* @__PURE__ */ _("div", { className: "ina-text-area__char-count", children: [
|
|
5947
5949
|
B.length,
|
|
5948
5950
|
"/",
|
|
5949
5951
|
m
|
|
@@ -5962,7 +5964,7 @@ function ws({
|
|
|
5962
5964
|
error: l = !1,
|
|
5963
5965
|
disabled: c = !1,
|
|
5964
5966
|
readonly: v = !1,
|
|
5965
|
-
className:
|
|
5967
|
+
className: p = "",
|
|
5966
5968
|
onComplete: u,
|
|
5967
5969
|
autoFocus: k = !1
|
|
5968
5970
|
}) {
|
|
@@ -5981,18 +5983,18 @@ function ws({
|
|
|
5981
5983
|
e && e.length === t && u && u(e);
|
|
5982
5984
|
}, [e, t, u]);
|
|
5983
5985
|
const m = (x, b) => {
|
|
5984
|
-
const
|
|
5985
|
-
if (
|
|
5986
|
+
const y = b.target.value;
|
|
5987
|
+
if (y && !/^\d$/.test(y))
|
|
5986
5988
|
return;
|
|
5987
|
-
const
|
|
5988
|
-
|
|
5989
|
-
const T =
|
|
5990
|
-
if (a(T),
|
|
5989
|
+
const f = e.split("");
|
|
5990
|
+
f[x] = y;
|
|
5991
|
+
const T = f.join("").slice(0, t);
|
|
5992
|
+
if (a(T), y && x < t - 1) {
|
|
5991
5993
|
const S = x + 1;
|
|
5992
5994
|
g.current[S] && g.current[S].focus();
|
|
5993
5995
|
}
|
|
5994
5996
|
}, C = (x, b) => {
|
|
5995
|
-
var
|
|
5997
|
+
var y, f;
|
|
5996
5998
|
if (b.key === "Backspace")
|
|
5997
5999
|
if (!(e || "")[x] && x > 0) {
|
|
5998
6000
|
const S = x - 1;
|
|
@@ -6005,7 +6007,7 @@ function ws({
|
|
|
6005
6007
|
const S = e.split("");
|
|
6006
6008
|
S[x] = "", a(S.join(""));
|
|
6007
6009
|
}
|
|
6008
|
-
b.key === "ArrowLeft" && x > 0 && (b.preventDefault(), (
|
|
6010
|
+
b.key === "ArrowLeft" && x > 0 && (b.preventDefault(), (y = g.current[x - 1]) == null || y.focus()), b.key === "ArrowRight" && x < t - 1 && (b.preventDefault(), (f = g.current[x + 1]) == null || f.focus()), (b.ctrlKey || b.metaKey) && b.key === "v" && (b.preventDefault(), navigator.clipboard.readText().then((T) => {
|
|
6009
6011
|
const S = T.replace(/\D/g, "").slice(0, t);
|
|
6010
6012
|
if (S) {
|
|
6011
6013
|
a(S);
|
|
@@ -6018,32 +6020,32 @@ function ws({
|
|
|
6018
6020
|
}, D = () => {
|
|
6019
6021
|
}, E = (x) => {
|
|
6020
6022
|
x.preventDefault();
|
|
6021
|
-
const
|
|
6022
|
-
if (
|
|
6023
|
-
a(
|
|
6024
|
-
const
|
|
6023
|
+
const y = x.clipboardData.getData("text").replace(/\D/g, "").slice(0, t);
|
|
6024
|
+
if (y) {
|
|
6025
|
+
a(y);
|
|
6026
|
+
const f = Math.min(y.length - 1, t - 1);
|
|
6025
6027
|
setTimeout(() => {
|
|
6026
|
-
g.current[
|
|
6028
|
+
g.current[f] && g.current[f].focus();
|
|
6027
6029
|
}, 0);
|
|
6028
6030
|
}
|
|
6029
6031
|
};
|
|
6030
|
-
return /* @__PURE__ */
|
|
6032
|
+
return /* @__PURE__ */ _("div", { className: A("ina-one-time-password", p), children: [
|
|
6031
6033
|
r && /* @__PURE__ */ n("div", { className: "ina-one-time-password__title", children: r }),
|
|
6032
6034
|
s && /* @__PURE__ */ n("div", { className: "ina-one-time-password__description", children: s }),
|
|
6033
6035
|
/* @__PURE__ */ n("div", { className: "ina-one-time-password__container", children: Array.from({ length: t }).map((x, b) => {
|
|
6034
|
-
const
|
|
6036
|
+
const y = e[b] || "";
|
|
6035
6037
|
return /* @__PURE__ */ n(
|
|
6036
6038
|
"input",
|
|
6037
6039
|
{
|
|
6038
|
-
ref: (
|
|
6039
|
-
g.current[b] =
|
|
6040
|
+
ref: (f) => {
|
|
6041
|
+
g.current[b] = f;
|
|
6040
6042
|
},
|
|
6041
6043
|
type: "text",
|
|
6042
6044
|
inputMode: "numeric",
|
|
6043
6045
|
maxLength: 1,
|
|
6044
|
-
value:
|
|
6045
|
-
onChange: (
|
|
6046
|
-
onKeyDown: (
|
|
6046
|
+
value: y,
|
|
6047
|
+
onChange: (f) => m(b, f),
|
|
6048
|
+
onKeyDown: (f) => C(b, f),
|
|
6047
6049
|
onFocus: () => I(b),
|
|
6048
6050
|
onBlur: D,
|
|
6049
6051
|
onPaste: E,
|
|
@@ -6070,7 +6072,7 @@ function ws({
|
|
|
6070
6072
|
)
|
|
6071
6073
|
] });
|
|
6072
6074
|
}
|
|
6073
|
-
const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
6075
|
+
const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
6074
6076
|
"svg",
|
|
6075
6077
|
{
|
|
6076
6078
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6100,7 +6102,7 @@ const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
6100
6102
|
placeholder: l = "Select time",
|
|
6101
6103
|
size: c = "md",
|
|
6102
6104
|
status: v = "neutral",
|
|
6103
|
-
value:
|
|
6105
|
+
value: p,
|
|
6104
6106
|
onChange: u,
|
|
6105
6107
|
onOpenChange: k,
|
|
6106
6108
|
className: g = "",
|
|
@@ -6111,14 +6113,14 @@ const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
6111
6113
|
suffixIcon: E,
|
|
6112
6114
|
disabledBackTime: x = !1,
|
|
6113
6115
|
disabledTimeBefore: b,
|
|
6114
|
-
disabledTimeAfter:
|
|
6115
|
-
showNowButton:
|
|
6116
|
+
disabledTimeAfter: y,
|
|
6117
|
+
showNowButton: f = !1,
|
|
6116
6118
|
label: T,
|
|
6117
6119
|
required: S,
|
|
6118
6120
|
...q
|
|
6119
6121
|
}, B) => {
|
|
6120
6122
|
const [$, ae] = J(!1), [H, O] = J(
|
|
6121
|
-
e ||
|
|
6123
|
+
e || p || ""
|
|
6122
6124
|
), [U, ee] = J(null), [se, ne] = J(null), [L, P] = J(!1), W = ce(null), fe = ce(null), te = ce(null);
|
|
6123
6125
|
ka(B, () => ({
|
|
6124
6126
|
focus: () => {
|
|
@@ -6168,8 +6170,8 @@ const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
6168
6170
|
if (X < ue)
|
|
6169
6171
|
return !0;
|
|
6170
6172
|
}
|
|
6171
|
-
if (
|
|
6172
|
-
const ue = Q(
|
|
6173
|
+
if (y && !V.ignoreAfter) {
|
|
6174
|
+
const ue = Q(y);
|
|
6173
6175
|
if (X > ue)
|
|
6174
6176
|
return !0;
|
|
6175
6177
|
}
|
|
@@ -6238,8 +6240,8 @@ const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
6238
6240
|
O(""), u == null || u("");
|
|
6239
6241
|
};
|
|
6240
6242
|
de(() => {
|
|
6241
|
-
|
|
6242
|
-
}, [
|
|
6243
|
+
p !== void 0 && p !== H && O(p);
|
|
6244
|
+
}, [p]), de(() => {
|
|
6243
6245
|
const o = (h) => {
|
|
6244
6246
|
W.current && !W.current.contains(h.target) && me();
|
|
6245
6247
|
};
|
|
@@ -6347,12 +6349,12 @@ const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
6347
6349
|
"ina-time-picker__input--with-prefix",
|
|
6348
6350
|
(E || I) && "ina-time-picker__input--with-suffix"
|
|
6349
6351
|
);
|
|
6350
|
-
return /* @__PURE__ */
|
|
6351
|
-
T && /* @__PURE__ */
|
|
6352
|
+
return /* @__PURE__ */ _("div", { ref: W, className: Ve, children: [
|
|
6353
|
+
T && /* @__PURE__ */ _("label", { className: "ina-time-picker__label", children: [
|
|
6352
6354
|
T,
|
|
6353
6355
|
S && /* @__PURE__ */ n("span", { className: "ina-time-picker__required", children: "*" })
|
|
6354
6356
|
] }),
|
|
6355
|
-
/* @__PURE__ */
|
|
6357
|
+
/* @__PURE__ */ _(
|
|
6356
6358
|
"div",
|
|
6357
6359
|
{
|
|
6358
6360
|
className: "ina-time-picker__wrapper",
|
|
@@ -6419,8 +6421,8 @@ const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
6419
6421
|
]
|
|
6420
6422
|
}
|
|
6421
6423
|
),
|
|
6422
|
-
$ && /* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6424
|
+
$ && /* @__PURE__ */ _("div", { ref: te, className: "ina-time-picker__panel", children: [
|
|
6425
|
+
/* @__PURE__ */ _("div", { className: "ina-time-picker__content", children: [
|
|
6424
6426
|
Ie(
|
|
6425
6427
|
"hour",
|
|
6426
6428
|
K,
|
|
@@ -6463,8 +6465,8 @@ const On = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
6463
6465
|
}
|
|
6464
6466
|
)
|
|
6465
6467
|
] }),
|
|
6466
|
-
/* @__PURE__ */
|
|
6467
|
-
|
|
6468
|
+
/* @__PURE__ */ _("div", { className: "ina-time-picker__actions", children: [
|
|
6469
|
+
f && /* @__PURE__ */ n(
|
|
6468
6470
|
"button",
|
|
6469
6471
|
{
|
|
6470
6472
|
type: "button",
|
|
@@ -6530,7 +6532,7 @@ function Kn({
|
|
|
6530
6532
|
style: l = "solid",
|
|
6531
6533
|
duration: c = 5e3,
|
|
6532
6534
|
position: v = "top-right",
|
|
6533
|
-
className:
|
|
6535
|
+
className: p = ""
|
|
6534
6536
|
}) {
|
|
6535
6537
|
const [u, k] = J(!1), [g, m] = J(!1), [C, I] = J(!1), D = ce(), E = ce(null), x = Wn[i];
|
|
6536
6538
|
de(() => {
|
|
@@ -6550,17 +6552,17 @@ function Kn({
|
|
|
6550
6552
|
}, 300);
|
|
6551
6553
|
}
|
|
6552
6554
|
if (!u || !g || !E.current) return null;
|
|
6553
|
-
const
|
|
6555
|
+
const y = A(
|
|
6554
6556
|
"ina-toast",
|
|
6555
6557
|
`ina-toast--state-${i}`,
|
|
6556
6558
|
`ina-toast--style-${l}`,
|
|
6557
6559
|
`ina-toast--${C ? "visible" : "hidden"}`,
|
|
6558
|
-
|
|
6560
|
+
p
|
|
6559
6561
|
);
|
|
6560
|
-
return Pt(/* @__PURE__ */ n("div", { className: "ina-toast-item", children: /* @__PURE__ */
|
|
6562
|
+
return Pt(/* @__PURE__ */ n("div", { className: "ina-toast-item", children: /* @__PURE__ */ _("div", { className: y, children: [
|
|
6561
6563
|
/* @__PURE__ */ n("div", { className: "ina-toast__icon", children: x }),
|
|
6562
|
-
/* @__PURE__ */
|
|
6563
|
-
/* @__PURE__ */
|
|
6564
|
+
/* @__PURE__ */ _("div", { className: "ina-toast__content", children: [
|
|
6565
|
+
/* @__PURE__ */ _("div", { className: "ina-toast__text-area", children: [
|
|
6564
6566
|
/* @__PURE__ */ n("p", { className: "ina-toast__title", children: t }),
|
|
6565
6567
|
r && /* @__PURE__ */ n("p", { className: "ina-toast__description", children: r })
|
|
6566
6568
|
] }),
|
|
@@ -6587,14 +6589,14 @@ function ks({
|
|
|
6587
6589
|
placement: l = "top",
|
|
6588
6590
|
showArrow: c = !0,
|
|
6589
6591
|
onClose: v,
|
|
6590
|
-
onNext:
|
|
6592
|
+
onNext: p,
|
|
6591
6593
|
customContent: u = !1,
|
|
6592
6594
|
className: k = ""
|
|
6593
6595
|
}) {
|
|
6594
6596
|
const [g, m] = J(!1), C = () => {
|
|
6595
6597
|
m(!0), v && v();
|
|
6596
6598
|
}, I = () => {
|
|
6597
|
-
m(!0),
|
|
6599
|
+
m(!0), p && p();
|
|
6598
6600
|
}, D = () => {
|
|
6599
6601
|
g && m(!1);
|
|
6600
6602
|
}, E = A(
|
|
@@ -6611,16 +6613,16 @@ function ks({
|
|
|
6611
6613
|
"ina-tooltip--variant-dark": i === "dark",
|
|
6612
6614
|
"ina-tooltip--variant-media": i === "media"
|
|
6613
6615
|
});
|
|
6614
|
-
return /* @__PURE__ */
|
|
6616
|
+
return /* @__PURE__ */ _("div", { className: E, onMouseEnter: D, children: [
|
|
6615
6617
|
s,
|
|
6616
|
-
/* @__PURE__ */ n("div", { className: x, role: "tooltip", children: u && r ? r : i === "basic" ? /* @__PURE__ */ n("div", { className: "ina-tooltip__bubble ina-tooltip__bubble--basic", children: e }) : /* @__PURE__ */
|
|
6618
|
+
/* @__PURE__ */ n("div", { className: x, role: "tooltip", children: u && r ? r : i === "basic" ? /* @__PURE__ */ n("div", { className: "ina-tooltip__bubble ina-tooltip__bubble--basic", children: e }) : /* @__PURE__ */ _("div", { className: `ina-tooltip__card ina-tooltip__card--${i}`, children: [
|
|
6617
6619
|
v && /* @__PURE__ */ n(
|
|
6618
6620
|
"button",
|
|
6619
6621
|
{
|
|
6620
6622
|
type: "button",
|
|
6621
6623
|
className: "ina-tooltip__close",
|
|
6622
|
-
onClick: (
|
|
6623
|
-
|
|
6624
|
+
onClick: (y) => {
|
|
6625
|
+
y.stopPropagation(), C();
|
|
6624
6626
|
},
|
|
6625
6627
|
"aria-label": "Close tooltip",
|
|
6626
6628
|
children: /* @__PURE__ */ n(
|
|
@@ -6646,29 +6648,29 @@ function ks({
|
|
|
6646
6648
|
}
|
|
6647
6649
|
),
|
|
6648
6650
|
i === "media" && t && /* @__PURE__ */ n("div", { className: "ina-tooltip__image", children: typeof t == "string" ? /* @__PURE__ */ n("img", { src: t, alt: "" }) : t }),
|
|
6649
|
-
/* @__PURE__ */
|
|
6651
|
+
/* @__PURE__ */ _("div", { className: "ina-tooltip__content-section", children: [
|
|
6650
6652
|
e && /* @__PURE__ */ n("div", { className: "ina-tooltip__title", children: e }),
|
|
6651
6653
|
a && /* @__PURE__ */ n("div", { className: "ina-tooltip__description", children: a }),
|
|
6652
6654
|
r && /* @__PURE__ */ n("div", { className: "ina-tooltip__custom-content", children: r }),
|
|
6653
|
-
(v ||
|
|
6655
|
+
(v || p) && /* @__PURE__ */ _("div", { className: "ina-tooltip__actions", children: [
|
|
6654
6656
|
v && /* @__PURE__ */ n(
|
|
6655
6657
|
"button",
|
|
6656
6658
|
{
|
|
6657
6659
|
type: "button",
|
|
6658
6660
|
className: "ina-tooltip__action ina-tooltip__action--close",
|
|
6659
|
-
onClick: (
|
|
6660
|
-
|
|
6661
|
+
onClick: (y) => {
|
|
6662
|
+
y.stopPropagation(), C();
|
|
6661
6663
|
},
|
|
6662
6664
|
children: "Tutup"
|
|
6663
6665
|
}
|
|
6664
6666
|
),
|
|
6665
|
-
|
|
6667
|
+
p && /* @__PURE__ */ n(
|
|
6666
6668
|
"button",
|
|
6667
6669
|
{
|
|
6668
6670
|
type: "button",
|
|
6669
6671
|
className: "ina-tooltip__action ina-tooltip__action--next",
|
|
6670
|
-
onClick: (
|
|
6671
|
-
|
|
6672
|
+
onClick: (y) => {
|
|
6673
|
+
y.stopPropagation(), I();
|
|
6672
6674
|
},
|
|
6673
6675
|
children: "Lanjut"
|
|
6674
6676
|
}
|
|
@@ -6678,7 +6680,7 @@ function ks({
|
|
|
6678
6680
|
] }) })
|
|
6679
6681
|
] });
|
|
6680
6682
|
}
|
|
6681
|
-
const jn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
6683
|
+
const jn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
6682
6684
|
"svg",
|
|
6683
6685
|
{
|
|
6684
6686
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6697,7 +6699,7 @@ const jn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ y(
|
|
|
6697
6699
|
/* @__PURE__ */ n("path", { d: "M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7" })
|
|
6698
6700
|
]
|
|
6699
6701
|
}
|
|
6700
|
-
), Yn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
6702
|
+
), Yn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
6701
6703
|
"svg",
|
|
6702
6704
|
{
|
|
6703
6705
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6727,8 +6729,8 @@ function Ns({
|
|
|
6727
6729
|
s(u), document.documentElement.setAttribute("data-theme", u), localStorage.setItem("ina-theme", u);
|
|
6728
6730
|
}, []);
|
|
6729
6731
|
const i = () => {
|
|
6730
|
-
const
|
|
6731
|
-
s(
|
|
6732
|
+
const p = r === "light" ? "dark" : "light";
|
|
6733
|
+
s(p), document.documentElement.setAttribute("data-theme", p), localStorage.setItem("ina-theme", p);
|
|
6732
6734
|
}, l = A(
|
|
6733
6735
|
"ina-theme-toggle",
|
|
6734
6736
|
`ina-theme-toggle--size-${a}`,
|
|
@@ -6741,12 +6743,12 @@ function Ns({
|
|
|
6741
6743
|
"ina-theme-toggle__icon",
|
|
6742
6744
|
`ina-theme-toggle__icon--${r}`
|
|
6743
6745
|
);
|
|
6744
|
-
return /* @__PURE__ */
|
|
6745
|
-
t && /* @__PURE__ */
|
|
6746
|
+
return /* @__PURE__ */ _("div", { className: l, children: [
|
|
6747
|
+
t && /* @__PURE__ */ _("span", { className: "ina-theme-toggle__label", children: [
|
|
6746
6748
|
r === "light" ? "Light" : "Dark",
|
|
6747
6749
|
" Mode"
|
|
6748
6750
|
] }),
|
|
6749
|
-
/* @__PURE__ */
|
|
6751
|
+
/* @__PURE__ */ _(
|
|
6750
6752
|
"button",
|
|
6751
6753
|
{
|
|
6752
6754
|
type: "button",
|
|
@@ -6764,7 +6766,7 @@ function Ns({
|
|
|
6764
6766
|
}
|
|
6765
6767
|
const Fa = Bt({
|
|
6766
6768
|
confirm: () => Promise.resolve(!1)
|
|
6767
|
-
}), Cs = () => zt(Fa), qn = (e, a, t, r, s) => /* @__PURE__ */
|
|
6769
|
+
}), Cs = () => zt(Fa), qn = (e, a, t, r, s) => /* @__PURE__ */ _("div", { className: "ina-modal-confirmation__footer", children: [
|
|
6768
6770
|
/* @__PURE__ */ n(
|
|
6769
6771
|
ct,
|
|
6770
6772
|
{
|
|
@@ -6791,17 +6793,17 @@ const Fa = Bt({
|
|
|
6791
6793
|
const [a, t] = J(null), [r, s] = J(null), i = (c) => {
|
|
6792
6794
|
r && r.resolve(c), t(null), s(null);
|
|
6793
6795
|
}, l = (c) => new Promise((v) => {
|
|
6794
|
-
const
|
|
6796
|
+
const p = "ina-modal-confirmation__cancel", u = "ina-modal-confirmation__confirm", k = c.cancelText ?? "Batal", g = c.confirmText ?? "Ya";
|
|
6795
6797
|
t({
|
|
6796
6798
|
title: c.title ?? "Confirmation",
|
|
6797
6799
|
message: c.message,
|
|
6798
6800
|
confirmText: g,
|
|
6799
6801
|
cancelText: k,
|
|
6800
|
-
cancelClassName: c.cancelClassName ??
|
|
6802
|
+
cancelClassName: c.cancelClassName ?? p,
|
|
6801
6803
|
confirmClassName: c.confirmClassName ?? u,
|
|
6802
6804
|
dialogClassname: c.dialogClassname ?? "ina-modal-confirmation",
|
|
6803
6805
|
footerActions: c.footerActions ?? ((m) => qn(
|
|
6804
|
-
c.cancelClassName ??
|
|
6806
|
+
c.cancelClassName ?? p,
|
|
6805
6807
|
c.confirmClassName ?? u,
|
|
6806
6808
|
k,
|
|
6807
6809
|
g,
|
|
@@ -6809,7 +6811,7 @@ const Fa = Bt({
|
|
|
6809
6811
|
))
|
|
6810
6812
|
}), s({ resolve: v });
|
|
6811
6813
|
});
|
|
6812
|
-
return /* @__PURE__ */
|
|
6814
|
+
return /* @__PURE__ */ _(Fa.Provider, { value: { confirm: l }, children: [
|
|
6813
6815
|
e,
|
|
6814
6816
|
a && /* @__PURE__ */ n(
|
|
6815
6817
|
Mn,
|
|
@@ -6819,7 +6821,7 @@ const Fa = Bt({
|
|
|
6819
6821
|
closeOnBackdrop: !0,
|
|
6820
6822
|
dialogClassname: a.dialogClassname,
|
|
6821
6823
|
title: a.title,
|
|
6822
|
-
children: /* @__PURE__ */
|
|
6824
|
+
children: /* @__PURE__ */ _("div", { className: "ina-modal-confirmation__body", children: [
|
|
6823
6825
|
/* @__PURE__ */ n("div", { children: a.message }),
|
|
6824
6826
|
typeof a.footerActions == "function" ? a.footerActions(i) : a.footerActions
|
|
6825
6827
|
] })
|
|
@@ -6836,7 +6838,7 @@ const Fa = Bt({
|
|
|
6836
6838
|
}, s = (i) => {
|
|
6837
6839
|
t((l) => l.filter((c) => c.id !== i));
|
|
6838
6840
|
};
|
|
6839
|
-
return /* @__PURE__ */
|
|
6841
|
+
return /* @__PURE__ */ _($a.Provider, { value: { toast: r }, children: [
|
|
6840
6842
|
e,
|
|
6841
6843
|
a.map((i, l) => /* @__PURE__ */ n(
|
|
6842
6844
|
Kn,
|
|
@@ -6888,8 +6890,8 @@ var wt = (e) => /^\w*$/.test(e), Te = (e) => e === void 0, Ot = (e) => Array.isA
|
|
|
6888
6890
|
const c = s[r];
|
|
6889
6891
|
let v = t;
|
|
6890
6892
|
if (r !== l) {
|
|
6891
|
-
const
|
|
6892
|
-
v = Re(
|
|
6893
|
+
const p = e[c];
|
|
6894
|
+
v = Re(p) || Array.isArray(p) ? p : isNaN(+s[r + 1]) ? {} : [];
|
|
6893
6895
|
}
|
|
6894
6896
|
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
6895
6897
|
return;
|
|
@@ -6946,10 +6948,10 @@ function Xn(e) {
|
|
|
6946
6948
|
name: s,
|
|
6947
6949
|
formState: v.current,
|
|
6948
6950
|
exact: i,
|
|
6949
|
-
callback: (
|
|
6951
|
+
callback: (p) => {
|
|
6950
6952
|
!r && c({
|
|
6951
6953
|
...t._formState,
|
|
6952
|
-
...
|
|
6954
|
+
...p
|
|
6953
6955
|
});
|
|
6954
6956
|
}
|
|
6955
6957
|
}), [s, r, i]), pe.useEffect(() => {
|
|
@@ -6981,22 +6983,22 @@ function qe(e, a, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
6981
6983
|
return !0;
|
|
6982
6984
|
}
|
|
6983
6985
|
function Qn(e) {
|
|
6984
|
-
const a = Gt(), { control: t = a, name: r, defaultValue: s, disabled: i, exact: l, compute: c } = e || {}, v = pe.useRef(s),
|
|
6985
|
-
|
|
6986
|
+
const a = Gt(), { control: t = a, name: r, defaultValue: s, disabled: i, exact: l, compute: c } = e || {}, v = pe.useRef(s), p = pe.useRef(c), u = pe.useRef(void 0), k = pe.useRef(t), g = pe.useRef(r);
|
|
6987
|
+
p.current = c;
|
|
6986
6988
|
const [m, C] = pe.useState(() => {
|
|
6987
|
-
const
|
|
6988
|
-
return
|
|
6989
|
-
}), I = pe.useCallback((
|
|
6990
|
-
const
|
|
6991
|
-
return
|
|
6992
|
-
}, [t._formValues, t._names, r]), D = pe.useCallback((
|
|
6989
|
+
const y = t._getWatch(r, v.current);
|
|
6990
|
+
return p.current ? p.current(y) : y;
|
|
6991
|
+
}), I = pe.useCallback((y) => {
|
|
6992
|
+
const f = Vt(r, t._names, y || t._formValues, !1, v.current);
|
|
6993
|
+
return p.current ? p.current(f) : f;
|
|
6994
|
+
}, [t._formValues, t._names, r]), D = pe.useCallback((y) => {
|
|
6993
6995
|
if (!i) {
|
|
6994
|
-
const
|
|
6995
|
-
if (
|
|
6996
|
-
const T =
|
|
6996
|
+
const f = Vt(r, t._names, y || t._formValues, !1, v.current);
|
|
6997
|
+
if (p.current) {
|
|
6998
|
+
const T = p.current(f);
|
|
6997
6999
|
qe(T, u.current) || (C(T), u.current = T);
|
|
6998
7000
|
} else
|
|
6999
|
-
C(
|
|
7001
|
+
C(f);
|
|
7000
7002
|
}
|
|
7001
7003
|
}, [t._formValues, t._names, i, r]);
|
|
7002
7004
|
Kt(() => ((k.current !== t || !qe(g.current, r)) && (k.current = t, g.current = r, D()), t._subscribe({
|
|
@@ -7005,23 +7007,23 @@ function Qn(e) {
|
|
|
7005
7007
|
values: !0
|
|
7006
7008
|
},
|
|
7007
7009
|
exact: l,
|
|
7008
|
-
callback: (
|
|
7009
|
-
D(
|
|
7010
|
+
callback: (y) => {
|
|
7011
|
+
D(y.values);
|
|
7010
7012
|
}
|
|
7011
7013
|
})), [t, l, r, D]), pe.useEffect(() => t._removeUnmounted());
|
|
7012
7014
|
const E = k.current !== t, x = g.current, b = pe.useMemo(() => {
|
|
7013
7015
|
if (i)
|
|
7014
7016
|
return null;
|
|
7015
|
-
const
|
|
7016
|
-
return E ||
|
|
7017
|
+
const y = !E && !qe(x, r);
|
|
7018
|
+
return E || y ? I() : null;
|
|
7017
7019
|
}, [i, E, r, x, I]);
|
|
7018
7020
|
return b !== null ? b : m;
|
|
7019
7021
|
}
|
|
7020
7022
|
function er(e) {
|
|
7021
|
-
const a = Gt(), { name: t, disabled: r, control: s = a, shouldUnregister: i, defaultValue: l, exact: c = !0 } = e, v = Ba(s._names.array, t),
|
|
7023
|
+
const a = Gt(), { name: t, disabled: r, control: s = a, shouldUnregister: i, defaultValue: l, exact: c = !0 } = e, v = Ba(s._names.array, t), p = pe.useMemo(() => re(s._formValues, t, re(s._defaultValues, t, l)), [s, t, l]), u = Qn({
|
|
7022
7024
|
control: s,
|
|
7023
7025
|
name: t,
|
|
7024
|
-
defaultValue:
|
|
7026
|
+
defaultValue: p,
|
|
7025
7027
|
exact: c
|
|
7026
7028
|
}), k = Xn({
|
|
7027
7029
|
control: s,
|
|
@@ -7054,9 +7056,9 @@ function er(e) {
|
|
|
7054
7056
|
enumerable: !0,
|
|
7055
7057
|
get: () => re(k.errors, t)
|
|
7056
7058
|
}
|
|
7057
|
-
}), [k, t]), D = pe.useCallback((
|
|
7059
|
+
}), [k, t]), D = pe.useCallback((y) => C.current.onChange({
|
|
7058
7060
|
target: {
|
|
7059
|
-
value: za(
|
|
7061
|
+
value: za(y),
|
|
7060
7062
|
name: t
|
|
7061
7063
|
},
|
|
7062
7064
|
type: vt.CHANGE
|
|
@@ -7066,13 +7068,13 @@ function er(e) {
|
|
|
7066
7068
|
name: t
|
|
7067
7069
|
},
|
|
7068
7070
|
type: vt.BLUR
|
|
7069
|
-
}), [t, s._formValues]), x = pe.useCallback((
|
|
7070
|
-
const
|
|
7071
|
-
|
|
7072
|
-
focus: () => Ue(
|
|
7073
|
-
select: () => Ue(
|
|
7074
|
-
setCustomValidity: (T) => Ue(
|
|
7075
|
-
reportValidity: () => Ue(
|
|
7071
|
+
}), [t, s._formValues]), x = pe.useCallback((y) => {
|
|
7072
|
+
const f = re(s._fields, t);
|
|
7073
|
+
f && f._f && y && (f._f.ref = {
|
|
7074
|
+
focus: () => Ue(y.focus) && y.focus(),
|
|
7075
|
+
select: () => Ue(y.select) && y.select(),
|
|
7076
|
+
setCustomValidity: (T) => Ue(y.setCustomValidity) && y.setCustomValidity(T),
|
|
7077
|
+
reportValidity: () => Ue(y.reportValidity) && y.reportValidity()
|
|
7076
7078
|
});
|
|
7077
7079
|
}, [s._fields, t]), b = pe.useMemo(() => ({
|
|
7078
7080
|
name: t,
|
|
@@ -7083,8 +7085,8 @@ function er(e) {
|
|
|
7083
7085
|
ref: x
|
|
7084
7086
|
}), [t, r, k.disabled, D, E, x, u]);
|
|
7085
7087
|
return pe.useEffect(() => {
|
|
7086
|
-
const
|
|
7087
|
-
|
|
7088
|
+
const y = s._options.shouldUnregister || i, f = m.current;
|
|
7089
|
+
f && f !== t && !v && s.unregister(f), s.register(t, {
|
|
7088
7090
|
...g.current.rules,
|
|
7089
7091
|
...Ke(g.current.disabled) ? { disabled: g.current.disabled } : {}
|
|
7090
7092
|
});
|
|
@@ -7092,12 +7094,12 @@ function er(e) {
|
|
|
7092
7094
|
const B = re(s._fields, S);
|
|
7093
7095
|
B && B._f && (B._f.mount = q);
|
|
7094
7096
|
};
|
|
7095
|
-
if (T(t, !0),
|
|
7097
|
+
if (T(t, !0), y) {
|
|
7096
7098
|
const S = Fe(re(s._options.defaultValues, t, g.current.defaultValue));
|
|
7097
7099
|
Ee(s._defaultValues, t, S), Te(re(s._formValues, t)) && Ee(s._formValues, t, S);
|
|
7098
7100
|
}
|
|
7099
7101
|
return !v && s.register(t), m.current = t, () => {
|
|
7100
|
-
(v ?
|
|
7102
|
+
(v ? y && !s._state.action : y) ? s.unregister(t) : T(t, !1);
|
|
7101
7103
|
};
|
|
7102
7104
|
}, [t, s, v, i]), pe.useEffect(() => {
|
|
7103
7105
|
s._setDisabledField({
|
|
@@ -7113,7 +7115,7 @@ function er(e) {
|
|
|
7113
7115
|
const tr = (e) => e.render(er(e)), Ha = pe.createContext(null);
|
|
7114
7116
|
Ha.displayName = "HookFormContext";
|
|
7115
7117
|
const ar = (e) => {
|
|
7116
|
-
const { children: a, watch: t, getValues: r, getFieldState: s, setError: i, clearErrors: l, setValue: c, trigger: v, formState:
|
|
7118
|
+
const { children: a, watch: t, getValues: r, getFieldState: s, setError: i, clearErrors: l, setValue: c, trigger: v, formState: p, resetField: u, reset: k, handleSubmit: g, unregister: m, control: C, register: I, setFocus: D, subscribe: E } = e;
|
|
7117
7119
|
return pe.createElement(
|
|
7118
7120
|
Ha.Provider,
|
|
7119
7121
|
{ value: pe.useMemo(() => ({
|
|
@@ -7124,7 +7126,7 @@ const ar = (e) => {
|
|
|
7124
7126
|
clearErrors: l,
|
|
7125
7127
|
setValue: c,
|
|
7126
7128
|
trigger: v,
|
|
7127
|
-
formState:
|
|
7129
|
+
formState: p,
|
|
7128
7130
|
resetField: u,
|
|
7129
7131
|
reset: k,
|
|
7130
7132
|
handleSubmit: g,
|
|
@@ -7136,7 +7138,7 @@ const ar = (e) => {
|
|
|
7136
7138
|
}), [
|
|
7137
7139
|
l,
|
|
7138
7140
|
C,
|
|
7139
|
-
|
|
7141
|
+
p,
|
|
7140
7142
|
s,
|
|
7141
7143
|
r,
|
|
7142
7144
|
g,
|
|
@@ -7359,14 +7361,14 @@ var at = (e) => Re(e) && !_t(e) ? e : {
|
|
|
7359
7361
|
value: e,
|
|
7360
7362
|
message: ""
|
|
7361
7363
|
}, ma = async (e, a, t, r, s, i) => {
|
|
7362
|
-
const { ref: l, refs: c, required: v, maxLength:
|
|
7364
|
+
const { ref: l, refs: c, required: v, maxLength: p, minLength: u, min: k, max: g, pattern: m, validate: C, name: I, valueAsNumber: D, mount: E } = e._f, x = re(t, I);
|
|
7363
7365
|
if (!E || a.has(I))
|
|
7364
7366
|
return {};
|
|
7365
|
-
const b = c ? c[0] : l,
|
|
7367
|
+
const b = c ? c[0] : l, y = (H) => {
|
|
7366
7368
|
s && b.reportValidity && (b.setCustomValidity(Ke(H) ? "" : H || ""), b.reportValidity());
|
|
7367
|
-
},
|
|
7369
|
+
}, f = {}, T = Yt(l), S = ft(l), q = T || S, B = (D || jt(l)) && Te(l.value) && Te(x) || yt(l) && l.value === "" || x === "" || Array.isArray(x) && !x.length, $ = nr.bind(null, I, r, f), ae = (H, O, U, ee = Xe.maxLength, se = Xe.minLength) => {
|
|
7368
7370
|
const ne = H ? O : U;
|
|
7369
|
-
|
|
7371
|
+
f[I] = {
|
|
7370
7372
|
type: H ? ee : se,
|
|
7371
7373
|
message: ne,
|
|
7372
7374
|
ref: l,
|
|
@@ -7375,13 +7377,13 @@ var at = (e) => Re(e) && !_t(e) ? e : {
|
|
|
7375
7377
|
};
|
|
7376
7378
|
if (i ? !Array.isArray(x) || !x.length : v && (!q && (B || Ge(x)) || Ke(x) && !x || S && !Ga(c).isValid || T && !ja(c).isValid)) {
|
|
7377
7379
|
const { value: H, message: O } = je(v) ? { value: !!v, message: v } : at(v);
|
|
7378
|
-
if (H && (
|
|
7380
|
+
if (H && (f[I] = {
|
|
7379
7381
|
type: Xe.required,
|
|
7380
7382
|
message: O,
|
|
7381
7383
|
ref: b,
|
|
7382
7384
|
...$(Xe.required, O)
|
|
7383
7385
|
}, !r))
|
|
7384
|
-
return
|
|
7386
|
+
return y(O), f;
|
|
7385
7387
|
}
|
|
7386
7388
|
if (!B && (!Ge(k) || !Ge(g))) {
|
|
7387
7389
|
let H, O;
|
|
@@ -7394,31 +7396,31 @@ var at = (e) => Re(e) && !_t(e) ? e : {
|
|
|
7394
7396
|
je(U.value) && x && (H = L ? ne(x) > ne(U.value) : P ? x > U.value : se > new Date(U.value)), je(ee.value) && x && (O = L ? ne(x) < ne(ee.value) : P ? x < ee.value : se < new Date(ee.value));
|
|
7395
7397
|
}
|
|
7396
7398
|
if ((H || O) && (ae(!!H, U.message, ee.message, Xe.max, Xe.min), !r))
|
|
7397
|
-
return
|
|
7399
|
+
return y(f[I].message), f;
|
|
7398
7400
|
}
|
|
7399
|
-
if ((
|
|
7400
|
-
const H = at(
|
|
7401
|
+
if ((p || u) && !B && (je(x) || i && Array.isArray(x))) {
|
|
7402
|
+
const H = at(p), O = at(u), U = !Ge(H.value) && x.length > +H.value, ee = !Ge(O.value) && x.length < +O.value;
|
|
7401
7403
|
if ((U || ee) && (ae(U, H.message, O.message), !r))
|
|
7402
|
-
return
|
|
7404
|
+
return y(f[I].message), f;
|
|
7403
7405
|
}
|
|
7404
7406
|
if (m && !B && je(x)) {
|
|
7405
7407
|
const { value: H, message: O } = at(m);
|
|
7406
|
-
if (_t(H) && !x.match(H) && (
|
|
7408
|
+
if (_t(H) && !x.match(H) && (f[I] = {
|
|
7407
7409
|
type: Xe.pattern,
|
|
7408
7410
|
message: O,
|
|
7409
7411
|
ref: l,
|
|
7410
7412
|
...$(Xe.pattern, O)
|
|
7411
7413
|
}, !r))
|
|
7412
|
-
return
|
|
7414
|
+
return y(O), f;
|
|
7413
7415
|
}
|
|
7414
7416
|
if (C) {
|
|
7415
7417
|
if (Ue(C)) {
|
|
7416
7418
|
const H = await C(x, t), O = pa(H, b);
|
|
7417
|
-
if (O && (
|
|
7419
|
+
if (O && (f[I] = {
|
|
7418
7420
|
...O,
|
|
7419
7421
|
...$(Xe.validate, O.message)
|
|
7420
7422
|
}, !r))
|
|
7421
|
-
return
|
|
7423
|
+
return y(O.message), f;
|
|
7422
7424
|
} else if (Re(C)) {
|
|
7423
7425
|
let H = {};
|
|
7424
7426
|
for (const O in C) {
|
|
@@ -7428,16 +7430,16 @@ var at = (e) => Re(e) && !_t(e) ? e : {
|
|
|
7428
7430
|
U && (H = {
|
|
7429
7431
|
...U,
|
|
7430
7432
|
...$(O, U.message)
|
|
7431
|
-
},
|
|
7433
|
+
}, y(U.message), r && (f[I] = H));
|
|
7432
7434
|
}
|
|
7433
|
-
if (!Oe(H) && (
|
|
7435
|
+
if (!Oe(H) && (f[I] = {
|
|
7434
7436
|
ref: b,
|
|
7435
7437
|
...H
|
|
7436
7438
|
}, !r))
|
|
7437
|
-
return
|
|
7439
|
+
return f;
|
|
7438
7440
|
}
|
|
7439
7441
|
}
|
|
7440
|
-
return
|
|
7442
|
+
return y(!0), f;
|
|
7441
7443
|
};
|
|
7442
7444
|
const gr = {
|
|
7443
7445
|
mode: Ye.onSubmit,
|
|
@@ -7474,7 +7476,7 @@ function vr(e = {}) {
|
|
|
7474
7476
|
unMount: /* @__PURE__ */ new Set(),
|
|
7475
7477
|
array: /* @__PURE__ */ new Set(),
|
|
7476
7478
|
watch: /* @__PURE__ */ new Set()
|
|
7477
|
-
}, v,
|
|
7479
|
+
}, v, p = 0;
|
|
7478
7480
|
const u = {
|
|
7479
7481
|
isDirty: !1,
|
|
7480
7482
|
dirtyFields: !1,
|
|
@@ -7493,7 +7495,7 @@ function vr(e = {}) {
|
|
|
7493
7495
|
array: ra(),
|
|
7494
7496
|
state: ra()
|
|
7495
7497
|
}, C = a.criteriaMode === Ye.all, I = (o) => (h) => {
|
|
7496
|
-
clearTimeout(
|
|
7498
|
+
clearTimeout(p), p = setTimeout(o, h);
|
|
7497
7499
|
}, D = async (o) => {
|
|
7498
7500
|
if (!l.keepIsValid && !a.disabled && (k.isValid || g.isValid || o)) {
|
|
7499
7501
|
let h;
|
|
@@ -7535,12 +7537,12 @@ function vr(e = {}) {
|
|
|
7535
7537
|
Ee(t.errors, o, h), m.state.next({
|
|
7536
7538
|
errors: t.errors
|
|
7537
7539
|
});
|
|
7538
|
-
},
|
|
7540
|
+
}, y = (o) => {
|
|
7539
7541
|
t.errors = o, m.state.next({
|
|
7540
7542
|
errors: t.errors,
|
|
7541
7543
|
isValid: !1
|
|
7542
7544
|
});
|
|
7543
|
-
},
|
|
7545
|
+
}, f = (o, h, N, F) => {
|
|
7544
7546
|
const V = re(r, o);
|
|
7545
7547
|
if (V) {
|
|
7546
7548
|
const R = re(i, o, Te(N) ? re(s, o) : N);
|
|
@@ -7566,7 +7568,7 @@ function vr(e = {}) {
|
|
|
7566
7568
|
return R ? ue : {};
|
|
7567
7569
|
}, S = (o, h, N, F) => {
|
|
7568
7570
|
const V = re(t.errors, o), R = (k.isValid || g.isValid) && Ke(h) && t.isValid !== h;
|
|
7569
|
-
if (a.delayError && N ? (v = I(() => b(o, N)), v(a.delayError)) : (clearTimeout(
|
|
7571
|
+
if (a.delayError && N ? (v = I(() => b(o, N)), v(a.delayError)) : (clearTimeout(p), v = null, N ? Ee(t.errors, o, N) : $e(t.errors, o)), (N ? !qe(V, N) : V) || !Oe(F) || R) {
|
|
7570
7572
|
const X = {
|
|
7571
7573
|
...F,
|
|
7572
7574
|
...R && Ke(h) ? { isValid: h } : {},
|
|
@@ -7772,7 +7774,7 @@ function vr(e = {}) {
|
|
|
7772
7774
|
}), c.mount.add(o), N ? K({
|
|
7773
7775
|
disabled: Ke(h.disabled) ? h.disabled : a.disabled,
|
|
7774
7776
|
name: o
|
|
7775
|
-
}) :
|
|
7777
|
+
}) : f(o, !0, h.value), {
|
|
7776
7778
|
...F ? { disabled: h.disabled || a.disabled } : {},
|
|
7777
7779
|
...a.progressive ? {
|
|
7778
7780
|
required: !!h.required,
|
|
@@ -7803,7 +7805,7 @@ function vr(e = {}) {
|
|
|
7803
7805
|
ref: { type: R.type, name: o }
|
|
7804
7806
|
} : { ref: R }
|
|
7805
7807
|
}
|
|
7806
|
-
}),
|
|
7808
|
+
}), f(o, !1, void 0, R);
|
|
7807
7809
|
} else
|
|
7808
7810
|
N = re(r, o, {}), N._f && (N._f.mount = !1), (a.shouldUnregister || h.shouldUnregister) && !(Ba(c.array, o) && l.action) && c.unMount.add(o);
|
|
7809
7811
|
}
|
|
@@ -7937,7 +7939,7 @@ function vr(e = {}) {
|
|
|
7937
7939
|
_setValid: D,
|
|
7938
7940
|
_setFieldArray: x,
|
|
7939
7941
|
_setDisabledField: K,
|
|
7940
|
-
_setErrors:
|
|
7942
|
+
_setErrors: y,
|
|
7941
7943
|
_getFieldArray: U,
|
|
7942
7944
|
_reset: we,
|
|
7943
7945
|
_resetDefaultValues: () => Ue(a.defaultValues) && a.defaultValues().then((o) => {
|
|
@@ -8088,7 +8090,7 @@ function Es({
|
|
|
8088
8090
|
}
|
|
8089
8091
|
);
|
|
8090
8092
|
}
|
|
8091
|
-
const qt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */
|
|
8093
|
+
const qt = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ _(
|
|
8092
8094
|
"svg",
|
|
8093
8095
|
{
|
|
8094
8096
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8122,7 +8124,7 @@ function ha({
|
|
|
8122
8124
|
className: l = "",
|
|
8123
8125
|
disabled: c = !1,
|
|
8124
8126
|
readonly: v = !1,
|
|
8125
|
-
open:
|
|
8127
|
+
open: p = !1,
|
|
8126
8128
|
onOpenChange: u,
|
|
8127
8129
|
disabledBackYear: k = !1,
|
|
8128
8130
|
disabledFutureYear: g = !1,
|
|
@@ -8139,14 +8141,14 @@ function ha({
|
|
|
8139
8141
|
return (/* @__PURE__ */ new Date()).getFullYear();
|
|
8140
8142
|
const be = typeof K == "string" ? parseInt(K, 10) : K;
|
|
8141
8143
|
return isNaN(be) ? (/* @__PURE__ */ new Date()).getFullYear() : be;
|
|
8142
|
-
}, [e, a]), [
|
|
8144
|
+
}, [e, a]), [y, f] = J(i);
|
|
8143
8145
|
de(() => {
|
|
8144
8146
|
const K = () => {
|
|
8145
|
-
|
|
8147
|
+
f(window.innerWidth <= 639 ? 9 : i);
|
|
8146
8148
|
};
|
|
8147
8149
|
return K(), window.addEventListener("resize", K), () => window.removeEventListener("resize", K);
|
|
8148
8150
|
}, [i]);
|
|
8149
|
-
const T = Pe(() => Math.floor(b /
|
|
8151
|
+
const T = Pe(() => Math.floor(b / y) * y, [b, y]), [S, q] = J(p), [B, $] = J(null), [ae, H] = J(!1), [O, U] = J({}), ee = ce(null), se = ce(null), ne = ce(null), L = ye(
|
|
8150
8152
|
(K) => {
|
|
8151
8153
|
const be = (/* @__PURE__ */ new Date()).getFullYear();
|
|
8152
8154
|
if (k && K < be || g && K > be)
|
|
@@ -8170,19 +8172,19 @@ function ha({
|
|
|
8170
8172
|
C
|
|
8171
8173
|
]
|
|
8172
8174
|
), P = Pe(() => {
|
|
8173
|
-
const K = [], be = T, _e = Math.min(T +
|
|
8175
|
+
const K = [], be = T, _e = Math.min(T + y - 1, s);
|
|
8174
8176
|
for (let ve = be; ve <= _e; ve++)
|
|
8175
8177
|
ve >= r && K.push(ve);
|
|
8176
8178
|
return K;
|
|
8177
|
-
}, [T,
|
|
8179
|
+
}, [T, y, r, s]), W = ye(
|
|
8178
8180
|
(K) => {
|
|
8179
|
-
const be = K === "prev" ? Math.max(T -
|
|
8180
|
-
T +
|
|
8181
|
-
s -
|
|
8181
|
+
const be = K === "prev" ? Math.max(T - y, r) : Math.min(
|
|
8182
|
+
T + y,
|
|
8183
|
+
s - y + 1
|
|
8182
8184
|
), _e = Math.max(be, r);
|
|
8183
8185
|
t == null || t(_e);
|
|
8184
8186
|
},
|
|
8185
|
-
[T,
|
|
8187
|
+
[T, y, r, s, t]
|
|
8186
8188
|
), fe = ye(
|
|
8187
8189
|
(K) => {
|
|
8188
8190
|
t == null || t(K), q(!1), u == null || u(!1);
|
|
@@ -8242,7 +8244,7 @@ function ha({
|
|
|
8242
8244
|
return document.addEventListener("mousedown", K), () => document.removeEventListener("mousedown", K);
|
|
8243
8245
|
}, [S, G]);
|
|
8244
8246
|
const Q = `${T} - ${Math.min(
|
|
8245
|
-
T +
|
|
8247
|
+
T + y - 1,
|
|
8246
8248
|
s
|
|
8247
8249
|
)}`, Y = A("ina-year-picker", l), le = A(
|
|
8248
8250
|
"ina-year-picker__trigger",
|
|
@@ -8254,9 +8256,9 @@ function ha({
|
|
|
8254
8256
|
S && "ina-year-picker__panel--open"
|
|
8255
8257
|
);
|
|
8256
8258
|
return de(() => {
|
|
8257
|
-
q(
|
|
8258
|
-
}, [
|
|
8259
|
-
/* @__PURE__ */
|
|
8259
|
+
q(p);
|
|
8260
|
+
}, [p]), /* @__PURE__ */ _("div", { ref: ee, className: Y, children: [
|
|
8261
|
+
/* @__PURE__ */ _(
|
|
8260
8262
|
"button",
|
|
8261
8263
|
{
|
|
8262
8264
|
ref: se,
|
|
@@ -8310,7 +8312,7 @@ function ha({
|
|
|
8310
8312
|
]
|
|
8311
8313
|
}
|
|
8312
8314
|
),
|
|
8313
|
-
S && /* @__PURE__ */
|
|
8315
|
+
S && /* @__PURE__ */ _(
|
|
8314
8316
|
"div",
|
|
8315
8317
|
{
|
|
8316
8318
|
ref: ne,
|
|
@@ -8320,7 +8322,7 @@ function ha({
|
|
|
8320
8322
|
),
|
|
8321
8323
|
style: O,
|
|
8322
8324
|
children: [
|
|
8323
|
-
/* @__PURE__ */
|
|
8325
|
+
/* @__PURE__ */ _("div", { className: "ina-year-picker__header", children: [
|
|
8324
8326
|
/* @__PURE__ */ n(
|
|
8325
8327
|
"button",
|
|
8326
8328
|
{
|
|
@@ -8351,7 +8353,7 @@ function ha({
|
|
|
8351
8353
|
(K.key === "Enter" || K.key === " ") && (K.preventDefault(), W("next"));
|
|
8352
8354
|
},
|
|
8353
8355
|
className: "ina-year-picker__nav-button",
|
|
8354
|
-
disabled: T +
|
|
8356
|
+
disabled: T + y > s,
|
|
8355
8357
|
"aria-label": "Next decade",
|
|
8356
8358
|
children: /* @__PURE__ */ n(
|
|
8357
8359
|
dt,
|
|
@@ -8390,13 +8392,13 @@ function ha({
|
|
|
8390
8392
|
we.preventDefault();
|
|
8391
8393
|
const Me = Array.from(
|
|
8392
8394
|
((Ce = we.currentTarget.parentElement) == null ? void 0 : Ce.children) || []
|
|
8393
|
-
)[be + (
|
|
8395
|
+
)[be + (y === 9 ? 3 : 4)];
|
|
8394
8396
|
Me && Me.focus();
|
|
8395
8397
|
} else if (we.key === "ArrowUp") {
|
|
8396
8398
|
we.preventDefault();
|
|
8397
8399
|
const Me = Array.from(
|
|
8398
8400
|
((De = we.currentTarget.parentElement) == null ? void 0 : De.children) || []
|
|
8399
|
-
)[be - (
|
|
8401
|
+
)[be - (y === 9 ? 3 : 4)];
|
|
8400
8402
|
Me && Me.focus();
|
|
8401
8403
|
}
|
|
8402
8404
|
}
|
|
@@ -8430,7 +8432,7 @@ function ga({
|
|
|
8430
8432
|
open: l = !1,
|
|
8431
8433
|
onOpenChange: c,
|
|
8432
8434
|
locale: v = "id",
|
|
8433
|
-
disabledBackMonth:
|
|
8435
|
+
disabledBackMonth: p = !1,
|
|
8434
8436
|
disabledFutureMonth: u = !1,
|
|
8435
8437
|
disabledMonthBefore: k,
|
|
8436
8438
|
disabledMonthAfter: g,
|
|
@@ -8468,28 +8470,28 @@ function ga({
|
|
|
8468
8470
|
], [v]), x = Pe(() => {
|
|
8469
8471
|
const te = e ?? a ?? (/* @__PURE__ */ new Date()).getMonth();
|
|
8470
8472
|
return te == null || isNaN(te) ? (/* @__PURE__ */ new Date()).getMonth() : te;
|
|
8471
|
-
}, [e, a]), [b,
|
|
8473
|
+
}, [e, a]), [b, y] = J(l), [f, T] = J(null), [S, q] = J(!1), [B, $] = J({}), ae = ce(null), H = ce(null), O = ce(null), U = ye(
|
|
8472
8474
|
(te) => {
|
|
8473
8475
|
const G = (/* @__PURE__ */ new Date()).getMonth();
|
|
8474
|
-
return !!(
|
|
8476
|
+
return !!(p && te < G || u && te > G || k !== void 0 && te < k || g !== void 0 && te > g);
|
|
8475
8477
|
},
|
|
8476
8478
|
[
|
|
8477
|
-
|
|
8479
|
+
p,
|
|
8478
8480
|
u,
|
|
8479
8481
|
k,
|
|
8480
8482
|
g
|
|
8481
8483
|
]
|
|
8482
8484
|
), ee = ye(
|
|
8483
8485
|
(te) => {
|
|
8484
|
-
t == null || t(te),
|
|
8486
|
+
t == null || t(te), y(!1), c == null || c(!1);
|
|
8485
8487
|
},
|
|
8486
8488
|
[t, c]
|
|
8487
8489
|
), se = ye(() => {
|
|
8488
8490
|
if (s) return;
|
|
8489
8491
|
const te = !b;
|
|
8490
|
-
|
|
8492
|
+
y(te), c == null || c(te);
|
|
8491
8493
|
}, [s, b, c]), ne = ye(() => {
|
|
8492
|
-
|
|
8494
|
+
y(!1), c == null || c(!1);
|
|
8493
8495
|
}, [c]), L = ye(
|
|
8494
8496
|
(te) => {
|
|
8495
8497
|
te.stopPropagation(), I ? I() : t == null || t((/* @__PURE__ */ new Date()).getMonth());
|
|
@@ -8547,9 +8549,9 @@ function ga({
|
|
|
8547
8549
|
b && "ina-month-picker__panel--open"
|
|
8548
8550
|
);
|
|
8549
8551
|
return de(() => {
|
|
8550
|
-
|
|
8551
|
-
}, [l]), /* @__PURE__ */
|
|
8552
|
-
/* @__PURE__ */
|
|
8552
|
+
y(l);
|
|
8553
|
+
}, [l]), /* @__PURE__ */ _("div", { ref: ae, className: P, children: [
|
|
8554
|
+
/* @__PURE__ */ _(
|
|
8553
8555
|
"button",
|
|
8554
8556
|
{
|
|
8555
8557
|
ref: H,
|
|
@@ -8613,7 +8615,7 @@ function ga({
|
|
|
8613
8615
|
),
|
|
8614
8616
|
style: B,
|
|
8615
8617
|
children: /* @__PURE__ */ n("div", { className: "ina-month-picker__grid", children: E.map((te, G) => {
|
|
8616
|
-
const Z = G === x, Q = G ===
|
|
8618
|
+
const Z = G === x, Q = G === f, Y = U(G);
|
|
8617
8619
|
return /* @__PURE__ */ n(
|
|
8618
8620
|
"button",
|
|
8619
8621
|
{
|
|
@@ -8716,7 +8718,7 @@ const Ya = [
|
|
|
8716
8718
|
const D = parseInt(r[0], 10), E = parseInt(r[1], 10) - 1, x = parseInt(r[2], 10), b = new Date(x, E, D);
|
|
8717
8719
|
return isNaN(b.getTime()) ? null : b;
|
|
8718
8720
|
}
|
|
8719
|
-
const
|
|
8721
|
+
const p = parseInt(r[l], 10), u = parseInt(r[v], 10);
|
|
8720
8722
|
let k;
|
|
8721
8723
|
const g = r[c], m = Ya.findIndex(
|
|
8722
8724
|
(D) => D.toLowerCase() === g.toLowerCase()
|
|
@@ -8724,7 +8726,7 @@ const Ya = [
|
|
|
8724
8726
|
(D) => D.toLowerCase() === g.toLowerCase()
|
|
8725
8727
|
);
|
|
8726
8728
|
m !== -1 ? k = m : C !== -1 ? k = C : k = parseInt(g, 10) - 1;
|
|
8727
|
-
const I = new Date(u, k,
|
|
8729
|
+
const I = new Date(u, k, p);
|
|
8728
8730
|
return isNaN(I.getTime()) ? null : I;
|
|
8729
8731
|
}, Be = (e, a) => e.getDate() === a.getDate() && e.getMonth() === a.getMonth() && e.getFullYear() === a.getFullYear(), va = (e, a) => a.some((t) => Be(t, e)), ya = ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"], _r = pe.forwardRef(
|
|
8730
8732
|
(e, a) => {
|
|
@@ -8736,7 +8738,7 @@ const Ya = [
|
|
|
8736
8738
|
popperPlacement: l = "bottom-start",
|
|
8737
8739
|
dateFormat: c = "dd/MM/yyyy",
|
|
8738
8740
|
className: v = "",
|
|
8739
|
-
triggerWidth:
|
|
8741
|
+
triggerWidth: p = "",
|
|
8740
8742
|
panelMaxHeight: u,
|
|
8741
8743
|
panelClassName: k = "",
|
|
8742
8744
|
triggerClassname: g = "",
|
|
@@ -8747,13 +8749,13 @@ const Ya = [
|
|
|
8747
8749
|
disabled: E = !1,
|
|
8748
8750
|
readonly: x = !1,
|
|
8749
8751
|
size: b = "md",
|
|
8750
|
-
label:
|
|
8751
|
-
required:
|
|
8752
|
+
label: y,
|
|
8753
|
+
required: f,
|
|
8752
8754
|
panelOnly: T = !1
|
|
8753
8755
|
} = e, [S, q] = J(!1), [B, $] = J(/* @__PURE__ */ new Date()), [ae, H] = J(() => {
|
|
8754
8756
|
const d = /* @__PURE__ */ new Date();
|
|
8755
8757
|
return d.setMonth(d.getMonth() + 1), d;
|
|
8756
|
-
}), [O, U] = J(null), [ee, se] = J(!1), [ne, L] = J(
|
|
8758
|
+
}), [O, U] = J(null), [ee, se] = J(!1), [ne, L] = J(p), [P, W] = J(null), fe = ce(`datepicker-${Math.random().toString(36).slice(2)}`), te = ce(null), G = ce(null), Z = ce(null), Q = (d) => {
|
|
8757
8759
|
G.current = d, typeof a == "function" ? a(d) : a && (a.current = d);
|
|
8758
8760
|
}, Y = () => {
|
|
8759
8761
|
if (t === "single") {
|
|
@@ -8804,30 +8806,30 @@ const Ya = [
|
|
|
8804
8806
|
const z = G.current.parentElement.getBoundingClientRect().width;
|
|
8805
8807
|
M = Math.min(w, z);
|
|
8806
8808
|
}
|
|
8807
|
-
if (typeof
|
|
8808
|
-
if (
|
|
8809
|
-
parseFloat(
|
|
8809
|
+
if (typeof p == "string") {
|
|
8810
|
+
if (p.includes("%")) {
|
|
8811
|
+
parseFloat(p.replace("%", "")) > 100 ? L("100%") : L(p);
|
|
8810
8812
|
return;
|
|
8811
|
-
} else if (
|
|
8812
|
-
const j = parseInt(
|
|
8813
|
-
isNaN(j) ? L(
|
|
8813
|
+
} else if (p.includes("px")) {
|
|
8814
|
+
const j = parseInt(p.replace("px", ""), 10);
|
|
8815
|
+
isNaN(j) ? L(p) : L(`${Math.min(j, M)}px`);
|
|
8814
8816
|
return;
|
|
8815
|
-
} else if (
|
|
8816
|
-
const ge = parseFloat(
|
|
8817
|
+
} else if (p.includes("rem")) {
|
|
8818
|
+
const ge = parseFloat(p.replace("rem", "")) * 16;
|
|
8817
8819
|
L(`${Math.min(ge, M)}px`);
|
|
8818
8820
|
return;
|
|
8819
|
-
} else if (
|
|
8820
|
-
L(
|
|
8821
|
+
} else if (p === "100%" || p === "auto") {
|
|
8822
|
+
L(p);
|
|
8821
8823
|
return;
|
|
8822
8824
|
}
|
|
8823
|
-
const z = parseFloat(
|
|
8824
|
-
isNaN(z) ? L(
|
|
8825
|
-
} else L(typeof
|
|
8825
|
+
const z = parseFloat(p);
|
|
8826
|
+
isNaN(z) ? L(p) : L(`${Math.min(z, M)}px`);
|
|
8827
|
+
} else L(typeof p == "number" ? `${Math.min(p, M)}px` : p);
|
|
8826
8828
|
};
|
|
8827
8829
|
return d(), window.addEventListener("resize", d), () => {
|
|
8828
8830
|
window.removeEventListener("resize", d);
|
|
8829
8831
|
};
|
|
8830
|
-
}, [
|
|
8832
|
+
}, [p]);
|
|
8831
8833
|
const ie = ye(() => {
|
|
8832
8834
|
if (I) {
|
|
8833
8835
|
const d = We(I, c);
|
|
@@ -9190,7 +9192,7 @@ const Ya = [
|
|
|
9190
9192
|
() => _e(ae),
|
|
9191
9193
|
[ae, _e]
|
|
9192
9194
|
);
|
|
9193
|
-
return /* @__PURE__ */
|
|
9195
|
+
return /* @__PURE__ */ _(
|
|
9194
9196
|
"div",
|
|
9195
9197
|
{
|
|
9196
9198
|
ref: te,
|
|
@@ -9202,12 +9204,12 @@ const Ya = [
|
|
|
9202
9204
|
),
|
|
9203
9205
|
style: { width: ne },
|
|
9204
9206
|
children: [
|
|
9205
|
-
!T &&
|
|
9206
|
-
|
|
9207
|
-
|
|
9207
|
+
!T && y && /* @__PURE__ */ _("label", { className: "ina-date-picker__label", htmlFor: fe.current, children: [
|
|
9208
|
+
y,
|
|
9209
|
+
f && /* @__PURE__ */ n("span", { className: "ina-date-picker__required", children: "*" })
|
|
9208
9210
|
] }),
|
|
9209
|
-
!T && /* @__PURE__ */
|
|
9210
|
-
/* @__PURE__ */
|
|
9211
|
+
!T && /* @__PURE__ */ _("div", { className: "ina-date-picker__trigger-wrapper", children: [
|
|
9212
|
+
/* @__PURE__ */ _(
|
|
9211
9213
|
"button",
|
|
9212
9214
|
{
|
|
9213
9215
|
ref: Q,
|
|
@@ -9296,7 +9298,7 @@ const Ya = [
|
|
|
9296
9298
|
marginLeft: "4px"
|
|
9297
9299
|
}
|
|
9298
9300
|
},
|
|
9299
|
-
children: /* @__PURE__ */
|
|
9301
|
+
children: /* @__PURE__ */ _(
|
|
9300
9302
|
"div",
|
|
9301
9303
|
{
|
|
9302
9304
|
className: A(
|
|
@@ -9306,8 +9308,8 @@ const Ya = [
|
|
|
9306
9308
|
(t === "range" || t === "multiple") && "ina-date-picker__panel-content--dual"
|
|
9307
9309
|
),
|
|
9308
9310
|
children: [
|
|
9309
|
-
/* @__PURE__ */
|
|
9310
|
-
/* @__PURE__ */
|
|
9311
|
+
/* @__PURE__ */ _("div", { className: "ina-date-picker__calendar-container", children: [
|
|
9312
|
+
/* @__PURE__ */ _("div", { className: "ina-date-picker__calendar-header", children: [
|
|
9311
9313
|
/* @__PURE__ */ n(
|
|
9312
9314
|
"button",
|
|
9313
9315
|
{
|
|
@@ -9323,7 +9325,7 @@ const Ya = [
|
|
|
9323
9325
|
)
|
|
9324
9326
|
}
|
|
9325
9327
|
),
|
|
9326
|
-
/* @__PURE__ */
|
|
9328
|
+
/* @__PURE__ */ _("div", { className: "ina-date-picker__header-controls", children: [
|
|
9327
9329
|
/* @__PURE__ */ n("div", { className: "ina-date-picker__dropdown-container", children: /* @__PURE__ */ n(
|
|
9328
9330
|
ga,
|
|
9329
9331
|
{
|
|
@@ -9371,7 +9373,7 @@ const Ya = [
|
|
|
9371
9373
|
}
|
|
9372
9374
|
)
|
|
9373
9375
|
] }),
|
|
9374
|
-
/* @__PURE__ */
|
|
9376
|
+
/* @__PURE__ */ _("div", { className: "ina-date-picker__calendar-grid", role: "grid", children: [
|
|
9375
9377
|
ya.map((d) => /* @__PURE__ */ n(
|
|
9376
9378
|
"div",
|
|
9377
9379
|
{
|
|
@@ -9429,8 +9431,8 @@ const Ya = [
|
|
|
9429
9431
|
})
|
|
9430
9432
|
] })
|
|
9431
9433
|
] }),
|
|
9432
|
-
(t === "range" || t === "multiple") && /* @__PURE__ */
|
|
9433
|
-
/* @__PURE__ */
|
|
9434
|
+
(t === "range" || t === "multiple") && /* @__PURE__ */ _("div", { className: "ina-date-picker__calendar", children: [
|
|
9435
|
+
/* @__PURE__ */ _("div", { className: "ina-date-picker__next-month-header", children: [
|
|
9434
9436
|
/* @__PURE__ */ n(
|
|
9435
9437
|
"button",
|
|
9436
9438
|
{
|
|
@@ -9446,7 +9448,7 @@ const Ya = [
|
|
|
9446
9448
|
)
|
|
9447
9449
|
}
|
|
9448
9450
|
),
|
|
9449
|
-
/* @__PURE__ */
|
|
9451
|
+
/* @__PURE__ */ _("div", { className: "ina-date-picker__next-month-controls", children: [
|
|
9450
9452
|
/* @__PURE__ */ n("div", { className: "ina-date-picker__dropdown-container", children: /* @__PURE__ */ n(
|
|
9451
9453
|
ga,
|
|
9452
9454
|
{
|
|
@@ -9491,7 +9493,7 @@ const Ya = [
|
|
|
9491
9493
|
}
|
|
9492
9494
|
)
|
|
9493
9495
|
] }),
|
|
9494
|
-
/* @__PURE__ */
|
|
9496
|
+
/* @__PURE__ */ _("div", { className: "ina-date-picker__calendar-grid", role: "grid", children: [
|
|
9495
9497
|
ya.map((d) => /* @__PURE__ */ n(
|
|
9496
9498
|
"div",
|
|
9497
9499
|
{
|
|
@@ -9566,7 +9568,7 @@ function Ss({
|
|
|
9566
9568
|
disabled: i = !1,
|
|
9567
9569
|
name: l = "multiple-choice-grid"
|
|
9568
9570
|
}) {
|
|
9569
|
-
const c = [...e].sort((g, m) => g.order - m.order), v = [...a].sort((g, m) => g.order - m.order),
|
|
9571
|
+
const c = [...e].sort((g, m) => g.order - m.order), v = [...a].sort((g, m) => g.order - m.order), p = ye(
|
|
9570
9572
|
(g, m) => {
|
|
9571
9573
|
if (i) return;
|
|
9572
9574
|
const C = t.filter(
|
|
@@ -9578,17 +9580,17 @@ function Ss({
|
|
|
9578
9580
|
), u = ye(
|
|
9579
9581
|
(g) => {
|
|
9580
9582
|
const { name: m, value: C } = g.target, I = m.replace(`${l}-`, "");
|
|
9581
|
-
|
|
9583
|
+
p(I, C);
|
|
9582
9584
|
},
|
|
9583
|
-
[l,
|
|
9585
|
+
[l, p]
|
|
9584
9586
|
), k = ye(
|
|
9585
9587
|
(g, m) => t.some(
|
|
9586
9588
|
(C) => C.rowId === g && C.columnId === m
|
|
9587
9589
|
),
|
|
9588
9590
|
[t]
|
|
9589
9591
|
);
|
|
9590
|
-
return /* @__PURE__ */
|
|
9591
|
-
/* @__PURE__ */
|
|
9592
|
+
return /* @__PURE__ */ _("div", { className: A("ina-multiple-choice-grid", s), children: [
|
|
9593
|
+
/* @__PURE__ */ _("div", { className: "ina-multiple-choice-grid__header", children: [
|
|
9592
9594
|
/* @__PURE__ */ n("div", { className: "ina-multiple-choice-grid__header-cell ina-multiple-choice-grid__header-cell--empty" }),
|
|
9593
9595
|
c.map((g) => /* @__PURE__ */ n(
|
|
9594
9596
|
"div",
|
|
@@ -9599,13 +9601,13 @@ function Ss({
|
|
|
9599
9601
|
g.id
|
|
9600
9602
|
))
|
|
9601
9603
|
] }),
|
|
9602
|
-
v.map((g) => /* @__PURE__ */
|
|
9604
|
+
v.map((g) => /* @__PURE__ */ _("div", { className: "ina-multiple-choice-grid__row", children: [
|
|
9603
9605
|
/* @__PURE__ */ n("div", { className: "ina-multiple-choice-grid__row-label", children: g.label }),
|
|
9604
9606
|
c.map((m) => /* @__PURE__ */ n(
|
|
9605
9607
|
"div",
|
|
9606
9608
|
{
|
|
9607
9609
|
className: "ina-multiple-choice-grid__cell",
|
|
9608
|
-
children: /* @__PURE__ */
|
|
9610
|
+
children: /* @__PURE__ */ _(
|
|
9609
9611
|
"label",
|
|
9610
9612
|
{
|
|
9611
9613
|
className: "ina-multiple-choice-grid__radio-label",
|
|
@@ -9645,7 +9647,7 @@ function Ts({
|
|
|
9645
9647
|
"aria-label": l,
|
|
9646
9648
|
"aria-describedby": c,
|
|
9647
9649
|
id: v,
|
|
9648
|
-
name:
|
|
9650
|
+
name: p,
|
|
9649
9651
|
value: u,
|
|
9650
9652
|
color: k,
|
|
9651
9653
|
...g
|
|
@@ -9672,22 +9674,22 @@ function Ts({
|
|
|
9672
9674
|
"ina-toggle__track--checked": D,
|
|
9673
9675
|
"ina-toggle__track--disabled": t
|
|
9674
9676
|
}
|
|
9675
|
-
),
|
|
9677
|
+
), y = A(
|
|
9676
9678
|
"ina-toggle__thumb",
|
|
9677
9679
|
`ina-toggle__thumb--size-${r}`,
|
|
9678
9680
|
{
|
|
9679
9681
|
"ina-toggle__thumb--checked": D,
|
|
9680
9682
|
"ina-toggle__thumb--disabled": t
|
|
9681
9683
|
}
|
|
9682
|
-
),
|
|
9683
|
-
return /* @__PURE__ */
|
|
9684
|
+
), f = D && k && !t ? { backgroundColor: k, borderColor: k } : {};
|
|
9685
|
+
return /* @__PURE__ */ _("div", { className: x, children: [
|
|
9684
9686
|
/* @__PURE__ */ n(
|
|
9685
9687
|
"input",
|
|
9686
9688
|
{
|
|
9687
9689
|
...g,
|
|
9688
9690
|
type: "checkbox",
|
|
9689
9691
|
id: v,
|
|
9690
|
-
name:
|
|
9692
|
+
name: p,
|
|
9691
9693
|
value: u,
|
|
9692
9694
|
checked: D,
|
|
9693
9695
|
disabled: t,
|
|
@@ -9701,8 +9703,8 @@ function Ts({
|
|
|
9701
9703
|
"div",
|
|
9702
9704
|
{
|
|
9703
9705
|
className: b,
|
|
9704
|
-
style: { pointerEvents: "none", ...
|
|
9705
|
-
children: /* @__PURE__ */ n("div", { className:
|
|
9706
|
+
style: { pointerEvents: "none", ...f },
|
|
9707
|
+
children: /* @__PURE__ */ n("div", { className: y })
|
|
9706
9708
|
}
|
|
9707
9709
|
)
|
|
9708
9710
|
] });
|
|
@@ -9717,7 +9719,7 @@ function Ls({
|
|
|
9717
9719
|
fullWidth: l = !1,
|
|
9718
9720
|
useBrandColor: c = !1,
|
|
9719
9721
|
disabled: v = !1,
|
|
9720
|
-
className:
|
|
9722
|
+
className: p = "",
|
|
9721
9723
|
containerClassName: u = "",
|
|
9722
9724
|
tabClassName: k = ""
|
|
9723
9725
|
}) {
|
|
@@ -9725,8 +9727,8 @@ function Ls({
|
|
|
9725
9727
|
const [g, m] = J(
|
|
9726
9728
|
t || ((b = e[0]) == null ? void 0 : b.value) || ""
|
|
9727
9729
|
), C = a !== void 0 ? a : g, I = ce([]), D = ye(
|
|
9728
|
-
(
|
|
9729
|
-
v ||
|
|
9730
|
+
(y, f) => {
|
|
9731
|
+
v || f || (a === void 0 && m(y), r == null || r(y));
|
|
9730
9732
|
},
|
|
9731
9733
|
[v, a, r]
|
|
9732
9734
|
), E = A(
|
|
@@ -9736,14 +9738,14 @@ function Ls({
|
|
|
9736
9738
|
l && "ina-tab-horizontal--full-width",
|
|
9737
9739
|
c && "ina-tab-horizontal--use-brand-color",
|
|
9738
9740
|
v && "ina-tab-horizontal--disabled",
|
|
9739
|
-
|
|
9741
|
+
p
|
|
9740
9742
|
), x = A(
|
|
9741
9743
|
"ina-tab-horizontal__container",
|
|
9742
9744
|
l && "ina-tab-horizontal__container--full-width",
|
|
9743
9745
|
u
|
|
9744
9746
|
);
|
|
9745
|
-
return /* @__PURE__ */ n("div", { className: E, children: /* @__PURE__ */ n("div", { className: x, role: "tablist", children: e.map((
|
|
9746
|
-
const T = C ===
|
|
9747
|
+
return /* @__PURE__ */ n("div", { className: E, children: /* @__PURE__ */ n("div", { className: x, role: "tablist", children: e.map((y, f) => {
|
|
9748
|
+
const T = C === y.value, S = v || y.disabled, q = A(
|
|
9747
9749
|
"ina-tab-horizontal__tab",
|
|
9748
9750
|
`ina-tab-horizontal__tab--size-${s}`,
|
|
9749
9751
|
`ina-tab-horizontal__tab--variant-${i}`,
|
|
@@ -9755,7 +9757,7 @@ function Ls({
|
|
|
9755
9757
|
return /* @__PURE__ */ n(
|
|
9756
9758
|
"button",
|
|
9757
9759
|
{
|
|
9758
|
-
ref: (B) => I.current[
|
|
9760
|
+
ref: (B) => I.current[f] = B,
|
|
9759
9761
|
type: "button",
|
|
9760
9762
|
role: "tab",
|
|
9761
9763
|
"aria-selected": T,
|
|
@@ -9763,26 +9765,26 @@ function Ls({
|
|
|
9763
9765
|
disabled: S,
|
|
9764
9766
|
tabIndex: T ? 0 : -1,
|
|
9765
9767
|
className: q,
|
|
9766
|
-
onClick: () => D(
|
|
9768
|
+
onClick: () => D(y.value, y.disabled),
|
|
9767
9769
|
onKeyDown: (B) => {
|
|
9768
9770
|
var ae, H;
|
|
9769
9771
|
if (S) return;
|
|
9770
9772
|
let $;
|
|
9771
9773
|
if (B.key === "Enter" || B.key === " ")
|
|
9772
|
-
B.preventDefault(), D(
|
|
9774
|
+
B.preventDefault(), D(y.value, y.disabled);
|
|
9773
9775
|
else if (B.key === "ArrowRight") {
|
|
9774
|
-
for (B.preventDefault(), $ = (
|
|
9776
|
+
for (B.preventDefault(), $ = (f + 1) % e.length; e[$].disabled && $ !== f; )
|
|
9775
9777
|
$ = ($ + 1) % e.length;
|
|
9776
9778
|
(ae = I.current[$]) == null || ae.focus();
|
|
9777
9779
|
} else if (B.key === "ArrowLeft") {
|
|
9778
|
-
for (B.preventDefault(), $ = (
|
|
9780
|
+
for (B.preventDefault(), $ = (f - 1 + e.length) % e.length; e[$].disabled && $ !== f; )
|
|
9779
9781
|
$ = ($ - 1 + e.length) % e.length;
|
|
9780
9782
|
(H = I.current[$]) == null || H.focus();
|
|
9781
9783
|
}
|
|
9782
9784
|
},
|
|
9783
|
-
children:
|
|
9785
|
+
children: y.label
|
|
9784
9786
|
},
|
|
9785
|
-
|
|
9787
|
+
y.value
|
|
9786
9788
|
);
|
|
9787
9789
|
}) }) });
|
|
9788
9790
|
}
|
|
@@ -9796,16 +9798,16 @@ function Vs({
|
|
|
9796
9798
|
useBrandColor: l = !1,
|
|
9797
9799
|
disabled: c = !1,
|
|
9798
9800
|
className: v = "",
|
|
9799
|
-
containerClassName:
|
|
9801
|
+
containerClassName: p = "",
|
|
9800
9802
|
tabClassName: u = "",
|
|
9801
9803
|
width: k = "200px"
|
|
9802
9804
|
}) {
|
|
9803
|
-
var
|
|
9805
|
+
var y;
|
|
9804
9806
|
const [g, m] = J(
|
|
9805
|
-
t || ((
|
|
9807
|
+
t || ((y = e[0]) == null ? void 0 : y.value) || ""
|
|
9806
9808
|
), C = a !== void 0 ? a : g, I = ce([]), D = ye(
|
|
9807
|
-
(
|
|
9808
|
-
c || T || (a === void 0 && m(
|
|
9809
|
+
(f, T) => {
|
|
9810
|
+
c || T || (a === void 0 && m(f), r == null || r(f));
|
|
9809
9811
|
},
|
|
9810
9812
|
[c, a, r]
|
|
9811
9813
|
), E = A(
|
|
@@ -9817,12 +9819,12 @@ function Vs({
|
|
|
9817
9819
|
v
|
|
9818
9820
|
), x = A(
|
|
9819
9821
|
"ina-tab-vertical__container",
|
|
9820
|
-
|
|
9822
|
+
p
|
|
9821
9823
|
), b = {
|
|
9822
9824
|
width: typeof k == "number" ? `${k}px` : k
|
|
9823
9825
|
};
|
|
9824
|
-
return /* @__PURE__ */ n("div", { className: E, style: b, children: /* @__PURE__ */ n("div", { className: x, role: "tablist", children: e.map((
|
|
9825
|
-
const S = C ===
|
|
9826
|
+
return /* @__PURE__ */ n("div", { className: E, style: b, children: /* @__PURE__ */ n("div", { className: x, role: "tablist", children: e.map((f, T) => {
|
|
9827
|
+
const S = C === f.value, q = c || f.disabled, B = A(
|
|
9826
9828
|
"ina-tab-vertical__tab",
|
|
9827
9829
|
`ina-tab-vertical__tab--size-${s}`,
|
|
9828
9830
|
`ina-tab-vertical__tab--variant-${i}`,
|
|
@@ -9841,13 +9843,13 @@ function Vs({
|
|
|
9841
9843
|
disabled: q,
|
|
9842
9844
|
tabIndex: S ? 0 : -1,
|
|
9843
9845
|
className: B,
|
|
9844
|
-
onClick: () => D(
|
|
9846
|
+
onClick: () => D(f.value, f.disabled),
|
|
9845
9847
|
onKeyDown: ($) => {
|
|
9846
9848
|
var H, O;
|
|
9847
9849
|
if (q) return;
|
|
9848
9850
|
let ae;
|
|
9849
9851
|
if ($.key === "Enter" || $.key === " ")
|
|
9850
|
-
$.preventDefault(), D(
|
|
9852
|
+
$.preventDefault(), D(f.value, f.disabled);
|
|
9851
9853
|
else if ($.key === "ArrowDown") {
|
|
9852
9854
|
for ($.preventDefault(), ae = (T + 1) % e.length; e[ae].disabled && ae !== T; )
|
|
9853
9855
|
ae = (ae + 1) % e.length;
|
|
@@ -9858,9 +9860,9 @@ function Vs({
|
|
|
9858
9860
|
(O = I.current[ae]) == null || O.focus();
|
|
9859
9861
|
}
|
|
9860
9862
|
},
|
|
9861
|
-
children:
|
|
9863
|
+
children: f.label
|
|
9862
9864
|
},
|
|
9863
|
-
|
|
9865
|
+
f.value
|
|
9864
9866
|
);
|
|
9865
9867
|
}) }) });
|
|
9866
9868
|
}
|