@idds/react 1.6.18 → 1.6.20
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.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.es.js +320 -305
- package/dist/types/components/Breadcrumb.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -254,7 +254,7 @@ const mr = {
|
|
|
254
254
|
"primary-700": "var(--ina-primary-700, #083575)",
|
|
255
255
|
"primary-800": "var(--ina-primary-800, #022a5b)",
|
|
256
256
|
"primary-900": "var(--ina-primary-900, #041225)",
|
|
257
|
-
"primary-primary": "var(--ina-primary-primary, #
|
|
257
|
+
"primary-primary": "var(--ina-primary-primary, #196bcd)",
|
|
258
258
|
// Secondary/Accent colors
|
|
259
259
|
"accent-100": "var(--ina-accent-100, #ffffff)",
|
|
260
260
|
"accent-200": "var(--ina-accent-200, #fff5ee)",
|
|
@@ -263,6 +263,16 @@ const mr = {
|
|
|
263
263
|
"accent-500": "var(--ina-accent-500, #edb98a)",
|
|
264
264
|
"accent-600": "var(--ina-accent-600, #d39663)",
|
|
265
265
|
"accent-700": "var(--ina-accent-700, #cc1515)",
|
|
266
|
+
// Secondary colors
|
|
267
|
+
"secondary-25": "var(--ina-secondary-25, #ffffff)",
|
|
268
|
+
"secondary-50": "var(--ina-secondary-50, #ffffff)",
|
|
269
|
+
"secondary-100": "var(--ina-secondary-100, #ffffff)",
|
|
270
|
+
"secondary-200": "var(--ina-secondary-200, #fff5ee)",
|
|
271
|
+
"secondary-300": "var(--ina-secondary-300, #ffe8cc)",
|
|
272
|
+
"secondary-400": "var(--ina-secondary-400, #ffd2a6)",
|
|
273
|
+
"secondary-500": "var(--ina-secondary-500, #edb98a)",
|
|
274
|
+
"secondary-600": "var(--ina-secondary-600, #d39663)",
|
|
275
|
+
"secondary-700": "var(--ina-secondary-700, #cc1515)",
|
|
266
276
|
// Interactive hover
|
|
267
277
|
"brand-hover": "var(--ina-brand-hover, #588cd7)",
|
|
268
278
|
"neutral-hover": "var(--ina-neutral-hover, #edeff5)"
|
|
@@ -589,7 +599,7 @@ const _a = Tt(
|
|
|
589
599
|
function ja() {
|
|
590
600
|
return Vt(_a);
|
|
591
601
|
}
|
|
592
|
-
function
|
|
602
|
+
function Er(e) {
|
|
593
603
|
const {
|
|
594
604
|
multiple: a,
|
|
595
605
|
multipleOpen: t = !1,
|
|
@@ -607,7 +617,7 @@ function Ar(e) {
|
|
|
607
617
|
return b.current.set(k, f), _ && u((T) => c ? T.includes(f) ? T : [...T, f] : T.length === 0 ? [f] : T), f;
|
|
608
618
|
},
|
|
609
619
|
[c]
|
|
610
|
-
),
|
|
620
|
+
), E = me((k) => {
|
|
611
621
|
const _ = b.current.get(k);
|
|
612
622
|
if (_ !== void 0) {
|
|
613
623
|
b.current.delete(k), u(($) => $.filter((B) => B !== _).map((B) => B > _ ? B - 1 : B));
|
|
@@ -617,7 +627,7 @@ function Ar(e) {
|
|
|
617
627
|
f.set(Y, T), T++;
|
|
618
628
|
}), b.current = f;
|
|
619
629
|
}
|
|
620
|
-
}, []),
|
|
630
|
+
}, []), A = me(
|
|
621
631
|
(k, _) => {
|
|
622
632
|
u((f) => {
|
|
623
633
|
let T;
|
|
@@ -630,8 +640,8 @@ function Ar(e) {
|
|
|
630
640
|
multiple: c,
|
|
631
641
|
multipleOpen: c,
|
|
632
642
|
registerItem: I,
|
|
633
|
-
unregisterItem:
|
|
634
|
-
handleItemToggle:
|
|
643
|
+
unregisterItem: E,
|
|
644
|
+
handleItemToggle: A,
|
|
635
645
|
isItemOpen: F,
|
|
636
646
|
version: M
|
|
637
647
|
// Include version untuk trigger re-render
|
|
@@ -639,15 +649,15 @@ function Ar(e) {
|
|
|
639
649
|
[
|
|
640
650
|
c,
|
|
641
651
|
I,
|
|
642
|
-
A,
|
|
643
652
|
E,
|
|
653
|
+
A,
|
|
644
654
|
F,
|
|
645
655
|
M
|
|
646
656
|
]
|
|
647
657
|
);
|
|
648
658
|
return /* @__PURE__ */ n(_a.Provider, { value: N, children: /* @__PURE__ */ n("div", { className: S("ina-accordion-group", s), children: l }) });
|
|
649
659
|
}
|
|
650
|
-
function
|
|
660
|
+
function Ar(e) {
|
|
651
661
|
const {
|
|
652
662
|
title: a,
|
|
653
663
|
children: t,
|
|
@@ -656,18 +666,18 @@ function Er(e) {
|
|
|
656
666
|
onToggle: s,
|
|
657
667
|
disabled: l = !1,
|
|
658
668
|
className: c
|
|
659
|
-
} = e, [b, h] = Z(r), u = ja(), M = ma().replace(/:/g, "-"), m = le(`accordion-${M}`), [p, I] = Z(-1),
|
|
660
|
-
|
|
661
|
-
const { registerItem:
|
|
669
|
+
} = e, [b, h] = Z(r), u = ja(), M = ma().replace(/:/g, "-"), m = le(`accordion-${M}`), [p, I] = Z(-1), E = le(r);
|
|
670
|
+
E.current = r;
|
|
671
|
+
const { registerItem: A, unregisterItem: F } = u || {};
|
|
662
672
|
oe(() => {
|
|
663
|
-
if (
|
|
664
|
-
const B =
|
|
673
|
+
if (A) {
|
|
674
|
+
const B = A(m.current, E.current);
|
|
665
675
|
I(B);
|
|
666
676
|
}
|
|
667
677
|
return () => {
|
|
668
678
|
F && (F(m.current), I(-1));
|
|
669
679
|
};
|
|
670
|
-
}, [
|
|
680
|
+
}, [A, F]);
|
|
671
681
|
const N = u !== null, k = i !== void 0 || N, _ = Fe(() => N && p >= 0 && u ? u.isItemOpen(p) : i !== void 0 ? i : b, [N, p, u, i, b]), f = Fe(() => `accordion-header-${m.current}`, []), T = Fe(() => `accordion-content-${m.current}`, []), $ = () => {
|
|
672
682
|
if (l) return;
|
|
673
683
|
const B = !_;
|
|
@@ -774,14 +784,14 @@ function Sr({
|
|
|
774
784
|
}) {
|
|
775
785
|
const [l, c] = Z(r), b = t !== void 0, h = b ? t : l, u = le(null), [M, m] = Z("0px");
|
|
776
786
|
oe(() => {
|
|
777
|
-
const
|
|
778
|
-
if (
|
|
787
|
+
const E = u.current;
|
|
788
|
+
if (E)
|
|
779
789
|
if (h) {
|
|
780
|
-
const
|
|
781
|
-
m(`${
|
|
790
|
+
const A = E.scrollHeight;
|
|
791
|
+
m(`${A}px`);
|
|
782
792
|
} else {
|
|
783
|
-
const
|
|
784
|
-
m(`${
|
|
793
|
+
const A = E.scrollHeight;
|
|
794
|
+
m(`${A}px`), requestAnimationFrame(() => {
|
|
785
795
|
m("0px");
|
|
786
796
|
});
|
|
787
797
|
}
|
|
@@ -789,8 +799,8 @@ function Sr({
|
|
|
789
799
|
const p = () => {
|
|
790
800
|
h && m("auto");
|
|
791
801
|
}, I = () => {
|
|
792
|
-
const
|
|
793
|
-
b || c(
|
|
802
|
+
const E = !h;
|
|
803
|
+
b || c(E), i == null || i(E);
|
|
794
804
|
};
|
|
795
805
|
return /* @__PURE__ */ w("div", { className: S("ina-accordion-card", s), children: [
|
|
796
806
|
/* @__PURE__ */ w("div", { onClick: I, className: "ina-accordion-card__header", children: [
|
|
@@ -848,10 +858,10 @@ const Ya = ha(
|
|
|
848
858
|
"ina-action-dropdown",
|
|
849
859
|
c === "full" && "w-full",
|
|
850
860
|
i
|
|
851
|
-
),
|
|
861
|
+
), E = S(
|
|
852
862
|
"ina-action-dropdown__trigger",
|
|
853
863
|
l
|
|
854
|
-
),
|
|
864
|
+
), A = S(
|
|
855
865
|
"ina-action-dropdown__menu",
|
|
856
866
|
`ina-action-dropdown__menu--${t}`,
|
|
857
867
|
`ina-action-dropdown__menu--width-${c}`,
|
|
@@ -872,7 +882,7 @@ const Ya = ha(
|
|
|
872
882
|
{
|
|
873
883
|
ref: m,
|
|
874
884
|
type: "button",
|
|
875
|
-
className:
|
|
885
|
+
className: E,
|
|
876
886
|
onClick: () => !b && M(!u),
|
|
877
887
|
disabled: b,
|
|
878
888
|
children: [
|
|
@@ -881,7 +891,7 @@ const Ya = ha(
|
|
|
881
891
|
]
|
|
882
892
|
}
|
|
883
893
|
),
|
|
884
|
-
/* @__PURE__ */ n("div", { className:
|
|
894
|
+
/* @__PURE__ */ n("div", { className: A, children: /* @__PURE__ */ n("ul", { className: "ina-action-dropdown__list", children: a.map((N, k) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ w(
|
|
885
895
|
"button",
|
|
886
896
|
{
|
|
887
897
|
type: "button",
|
|
@@ -1204,8 +1214,8 @@ function $r({
|
|
|
1204
1214
|
showHeader: m = !0,
|
|
1205
1215
|
hoverable: p = !1,
|
|
1206
1216
|
clickable: I = !1,
|
|
1207
|
-
className:
|
|
1208
|
-
children:
|
|
1217
|
+
className: E = "",
|
|
1218
|
+
children: A
|
|
1209
1219
|
}) {
|
|
1210
1220
|
const N = (() => {
|
|
1211
1221
|
if (a)
|
|
@@ -1229,7 +1239,7 @@ function $r({
|
|
|
1229
1239
|
"ina-card--clickable": I,
|
|
1230
1240
|
"ina-card--with-header": m
|
|
1231
1241
|
},
|
|
1232
|
-
|
|
1242
|
+
E
|
|
1233
1243
|
), _ = () => /* @__PURE__ */ n("div", { className: "ina-card__media", children: l ? /* @__PURE__ */ n("img", { src: l, alt: c || "Card media" }) : null });
|
|
1234
1244
|
return /* @__PURE__ */ w("div", { className: k, children: [
|
|
1235
1245
|
e === "basic" && N === "top" && _(),
|
|
@@ -1241,7 +1251,7 @@ function $r({
|
|
|
1241
1251
|
i && /* @__PURE__ */ n("h3", { className: "ina-card__title", children: i }),
|
|
1242
1252
|
s && /* @__PURE__ */ n("p", { className: "ina-card__description", children: s })
|
|
1243
1253
|
] }),
|
|
1244
|
-
|
|
1254
|
+
A && A,
|
|
1245
1255
|
b && h && /* @__PURE__ */ n("div", { className: "ina-card__button", children: /* @__PURE__ */ n(
|
|
1246
1256
|
ct,
|
|
1247
1257
|
{
|
|
@@ -1297,7 +1307,7 @@ function Rr({
|
|
|
1297
1307
|
var l;
|
|
1298
1308
|
if (s.key === "ArrowRight" || s.key === "ArrowLeft") {
|
|
1299
1309
|
const c = Array.from(
|
|
1300
|
-
s.currentTarget.querySelectorAll('a
|
|
1310
|
+
s.currentTarget.querySelectorAll('a.ina-breadcrumb__link:not([tabindex="-1"])')
|
|
1301
1311
|
);
|
|
1302
1312
|
if (!c.length) return;
|
|
1303
1313
|
const b = c.indexOf(
|
|
@@ -1313,7 +1323,7 @@ function Rr({
|
|
|
1313
1323
|
children: /* @__PURE__ */ n("ol", { className: "ina-breadcrumb__list", children: e.map((s, l) => {
|
|
1314
1324
|
const c = l === e.length - 1, b = c, h = i(s.label, c);
|
|
1315
1325
|
return /* @__PURE__ */ w("li", { className: "ina-breadcrumb__item", children: [
|
|
1316
|
-
s.href && !b ? /* @__PURE__ */ w(
|
|
1326
|
+
(s.href || s.onClick) && !b ? /* @__PURE__ */ w(
|
|
1317
1327
|
"a",
|
|
1318
1328
|
{
|
|
1319
1329
|
href: s.href,
|
|
@@ -1322,7 +1332,9 @@ function Rr({
|
|
|
1322
1332
|
b && "ina-breadcrumb__link--active",
|
|
1323
1333
|
s.disabled && "ina-breadcrumb__link--disabled"
|
|
1324
1334
|
),
|
|
1325
|
-
tabIndex: s.disabled ? -1 : void 0,
|
|
1335
|
+
tabIndex: s.disabled ? -1 : s.href ? void 0 : 0,
|
|
1336
|
+
role: s.href ? void 0 : "button",
|
|
1337
|
+
style: !s.href && s.onClick && !s.disabled ? { cursor: "pointer" } : void 0,
|
|
1326
1338
|
onClick: (u) => {
|
|
1327
1339
|
if (s.disabled) {
|
|
1328
1340
|
u.preventDefault();
|
|
@@ -1330,6 +1342,9 @@ function Rr({
|
|
|
1330
1342
|
}
|
|
1331
1343
|
s.onClick && (u.preventDefault(), s.onClick());
|
|
1332
1344
|
},
|
|
1345
|
+
onKeyDown: (u) => {
|
|
1346
|
+
!s.href && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), !s.disabled && s.onClick && s.onClick());
|
|
1347
|
+
},
|
|
1333
1348
|
children: [
|
|
1334
1349
|
s.icon && /* @__PURE__ */ n("span", { className: "ina-breadcrumb__icon", children: s.icon }),
|
|
1335
1350
|
/* @__PURE__ */ n("span", { className: "ina-breadcrumb__text", children: h })
|
|
@@ -1435,8 +1450,8 @@ function Br({
|
|
|
1435
1450
|
className: s = "",
|
|
1436
1451
|
name: l
|
|
1437
1452
|
}) {
|
|
1438
|
-
const c = a !== void 0, [b, h] = ge.useState(t), u = le([]), M = c ? a : b, m = (I,
|
|
1439
|
-
i ||
|
|
1453
|
+
const c = a !== void 0, [b, h] = ge.useState(t), u = le([]), M = c ? a : b, m = (I, E) => {
|
|
1454
|
+
i || E || (c || h(I), r && r(I));
|
|
1440
1455
|
}, p = S(
|
|
1441
1456
|
"ina-button-group",
|
|
1442
1457
|
{
|
|
@@ -1444,19 +1459,19 @@ function Br({
|
|
|
1444
1459
|
},
|
|
1445
1460
|
s
|
|
1446
1461
|
);
|
|
1447
|
-
return /* @__PURE__ */ n("div", { className: p, role: "group", "aria-label": "Button group", children: e.map((I,
|
|
1448
|
-
const
|
|
1449
|
-
"ina-button-group__button--selected":
|
|
1462
|
+
return /* @__PURE__ */ n("div", { className: p, role: "group", "aria-label": "Button group", children: e.map((I, E) => {
|
|
1463
|
+
const A = M === I.value, F = i || I.disabled, N = S("ina-button-group__button", {
|
|
1464
|
+
"ina-button-group__button--selected": A,
|
|
1450
1465
|
"ina-button-group__button--disabled": F
|
|
1451
1466
|
});
|
|
1452
1467
|
return /* @__PURE__ */ n(
|
|
1453
1468
|
"button",
|
|
1454
1469
|
{
|
|
1455
|
-
ref: (k) => u.current[
|
|
1470
|
+
ref: (k) => u.current[E] = k,
|
|
1456
1471
|
type: "button",
|
|
1457
1472
|
className: N,
|
|
1458
1473
|
disabled: F,
|
|
1459
|
-
tabIndex:
|
|
1474
|
+
tabIndex: A ? 0 : -1,
|
|
1460
1475
|
onClick: () => m(I.value, I.disabled),
|
|
1461
1476
|
onKeyDown: (k) => {
|
|
1462
1477
|
var f, T;
|
|
@@ -1465,22 +1480,22 @@ function Br({
|
|
|
1465
1480
|
if (k.key === "Enter" || k.key === " ")
|
|
1466
1481
|
k.preventDefault(), m(I.value, I.disabled);
|
|
1467
1482
|
else if (k.key === "ArrowRight" || k.key === "ArrowDown") {
|
|
1468
|
-
for (k.preventDefault(), _ = (
|
|
1483
|
+
for (k.preventDefault(), _ = (E + 1) % e.length; e[_].disabled && _ !== E; )
|
|
1469
1484
|
_ = (_ + 1) % e.length;
|
|
1470
1485
|
(f = u.current[_]) == null || f.focus();
|
|
1471
1486
|
} else if (k.key === "ArrowLeft" || k.key === "ArrowUp") {
|
|
1472
|
-
for (k.preventDefault(), _ = (
|
|
1487
|
+
for (k.preventDefault(), _ = (E - 1 + e.length) % e.length; e[_].disabled && _ !== E; )
|
|
1473
1488
|
_ = (_ - 1 + e.length) % e.length;
|
|
1474
1489
|
(T = u.current[_]) == null || T.focus();
|
|
1475
1490
|
}
|
|
1476
1491
|
},
|
|
1477
|
-
"aria-pressed":
|
|
1492
|
+
"aria-pressed": A,
|
|
1478
1493
|
"aria-disabled": F,
|
|
1479
1494
|
name: l,
|
|
1480
1495
|
value: I.value,
|
|
1481
1496
|
children: /* @__PURE__ */ n("span", { className: "ina-button-group__button-content", children: I.label })
|
|
1482
1497
|
},
|
|
1483
|
-
`${I.value}-${
|
|
1498
|
+
`${I.value}-${E}`
|
|
1484
1499
|
);
|
|
1485
1500
|
}) });
|
|
1486
1501
|
}
|
|
@@ -1578,15 +1593,15 @@ function Wt({
|
|
|
1578
1593
|
};
|
|
1579
1594
|
let I = null;
|
|
1580
1595
|
i ? I = /* @__PURE__ */ n(Xa, { className: "ina-checkbox__icon", size: 10 }) : r && (I = /* @__PURE__ */ n(at, { className: "ina-checkbox__icon", size: 10 }));
|
|
1581
|
-
let
|
|
1582
|
-
r ?
|
|
1583
|
-
const
|
|
1596
|
+
let E = "";
|
|
1597
|
+
r ? E = "ina-checkbox__box--checked" : i ? E = "ina-checkbox__box--indeterminate" : E = "ina-checkbox__box--unchecked", h && !r && !i && !l && (E += " ina-checkbox__box--invalid");
|
|
1598
|
+
const A = S(
|
|
1584
1599
|
"ina-checkbox",
|
|
1585
1600
|
{ "ina-checkbox--disabled": l },
|
|
1586
1601
|
{ "ina-checkbox--with-subtext": t },
|
|
1587
1602
|
c
|
|
1588
1603
|
);
|
|
1589
|
-
return /* @__PURE__ */ w("label", { htmlFor: e, className:
|
|
1604
|
+
return /* @__PURE__ */ w("label", { htmlFor: e, className: A, children: [
|
|
1590
1605
|
/* @__PURE__ */ n(
|
|
1591
1606
|
"input",
|
|
1592
1607
|
{
|
|
@@ -1600,7 +1615,7 @@ function Wt({
|
|
|
1600
1615
|
...u
|
|
1601
1616
|
}
|
|
1602
1617
|
),
|
|
1603
|
-
/* @__PURE__ */ n("div", { className: S("ina-checkbox__box",
|
|
1618
|
+
/* @__PURE__ */ n("div", { className: S("ina-checkbox__box", E), children: I }),
|
|
1604
1619
|
/* @__PURE__ */ w("div", { className: "ina-checkbox__content", children: [
|
|
1605
1620
|
/* @__PURE__ */ n("span", { className: "ina-checkbox__label", children: a }),
|
|
1606
1621
|
t && /* @__PURE__ */ n("span", { className: "ina-checkbox__subtext", children: t })
|
|
@@ -1621,7 +1636,7 @@ function Hr({
|
|
|
1621
1636
|
}) {
|
|
1622
1637
|
const u = Array.isArray(a) ? a : a ? [a] : [], M = u.filter(
|
|
1623
1638
|
(V) => !e.some((G) => G.value === V) && V !== ""
|
|
1624
|
-
), m = M.length > 0, p = M[M.length - 1] || "", [I,
|
|
1639
|
+
), m = M.length > 0, p = M[M.length - 1] || "", [I, E] = Z(!1), [A, F] = Z(p), N = () => {
|
|
1625
1640
|
if (u.length > 0) {
|
|
1626
1641
|
if (m && l)
|
|
1627
1642
|
return e.length;
|
|
@@ -1635,7 +1650,7 @@ function Hr({
|
|
|
1635
1650
|
oe(() => {
|
|
1636
1651
|
_(N());
|
|
1637
1652
|
}, [a, e, m]), oe(() => {
|
|
1638
|
-
m ? F(p) : (
|
|
1653
|
+
m ? F(p) : (E(!1), F(""));
|
|
1639
1654
|
}, [a, m]);
|
|
1640
1655
|
const T = (V) => {
|
|
1641
1656
|
if (V)
|
|
@@ -1645,13 +1660,13 @@ function Hr({
|
|
|
1645
1660
|
} else
|
|
1646
1661
|
u.includes(V) ? s == null || s("") : s == null || s(V);
|
|
1647
1662
|
}, $ = () => {
|
|
1648
|
-
const V =
|
|
1663
|
+
const V = A.trim();
|
|
1649
1664
|
if (t) {
|
|
1650
1665
|
let G = [...u];
|
|
1651
1666
|
m && p && (G = G.filter((O) => O !== p)), V && (G.includes(V) || G.push(V)), s == null || s(G);
|
|
1652
1667
|
} else
|
|
1653
1668
|
s == null || s(V);
|
|
1654
|
-
|
|
1669
|
+
E(!1);
|
|
1655
1670
|
}, Y = l ? [...e, { label: c, value: c }] : e, B = S("ina-chip", h);
|
|
1656
1671
|
return /* @__PURE__ */ w("div", { className: B, children: [
|
|
1657
1672
|
/* @__PURE__ */ n("div", { className: "ina-chip__list", children: Y.map((V, G) => {
|
|
@@ -1664,7 +1679,7 @@ function Hr({
|
|
|
1664
1679
|
tabIndex: G === k && !V.disabled ? 0 : -1,
|
|
1665
1680
|
disabled: V.disabled,
|
|
1666
1681
|
onClick: () => {
|
|
1667
|
-
V.disabled || (_(G), O ? (
|
|
1682
|
+
V.disabled || (_(G), O ? (E(!0), F(!t && !m ? "" : p)) : T(V.value));
|
|
1668
1683
|
},
|
|
1669
1684
|
onKeyDown: (ae) => {
|
|
1670
1685
|
var ue, te, X, H, K;
|
|
@@ -1702,7 +1717,7 @@ function Hr({
|
|
|
1702
1717
|
"input",
|
|
1703
1718
|
{
|
|
1704
1719
|
type: "text",
|
|
1705
|
-
value:
|
|
1720
|
+
value: A,
|
|
1706
1721
|
onChange: (V) => F(V.target.value),
|
|
1707
1722
|
onBlur: () => {
|
|
1708
1723
|
$();
|
|
@@ -1714,7 +1729,7 @@ function Hr({
|
|
|
1714
1729
|
placeholder: "Masukkan data yang Anda inginkan"
|
|
1715
1730
|
}
|
|
1716
1731
|
),
|
|
1717
|
-
|
|
1732
|
+
A && /* @__PURE__ */ n(
|
|
1718
1733
|
"button",
|
|
1719
1734
|
{
|
|
1720
1735
|
type: "button",
|
|
@@ -1817,7 +1832,7 @@ function Gr({
|
|
|
1817
1832
|
triggerClassName: b = "",
|
|
1818
1833
|
disabled: h = !1
|
|
1819
1834
|
}) {
|
|
1820
|
-
const [u, M] = Z(r), m = t !== void 0, p = m ? t : u, I = le(null),
|
|
1835
|
+
const [u, M] = Z(r), m = t !== void 0, p = m ? t : u, I = le(null), E = le(null), A = le(null), F = (f) => {
|
|
1821
1836
|
m || M(f), i == null || i(f);
|
|
1822
1837
|
}, N = (f) => {
|
|
1823
1838
|
f.stopPropagation(), !h && F(!p);
|
|
@@ -1839,7 +1854,7 @@ function Gr({
|
|
|
1839
1854
|
/* @__PURE__ */ n(
|
|
1840
1855
|
"div",
|
|
1841
1856
|
{
|
|
1842
|
-
ref:
|
|
1857
|
+
ref: E,
|
|
1843
1858
|
className: S("ina-basic-dropdown__trigger", b),
|
|
1844
1859
|
onClick: N,
|
|
1845
1860
|
tabIndex: _ ? -1 : 0,
|
|
@@ -1875,7 +1890,7 @@ function Gr({
|
|
|
1875
1890
|
p && !h && /* @__PURE__ */ n(
|
|
1876
1891
|
"div",
|
|
1877
1892
|
{
|
|
1878
|
-
ref:
|
|
1893
|
+
ref: A,
|
|
1879
1894
|
className: S(
|
|
1880
1895
|
"ina-basic-dropdown__panel",
|
|
1881
1896
|
`ina-basic-dropdown__panel--${s}`,
|
|
@@ -2373,14 +2388,14 @@ function Wr({
|
|
|
2373
2388
|
onRemove: p,
|
|
2374
2389
|
...I
|
|
2375
2390
|
}) {
|
|
2376
|
-
const
|
|
2391
|
+
const E = le(null), [A, F] = Z([]), [N, k] = Z(!1), [_, f] = Z([]), [T, $] = Z(!1), Y = me(() => {
|
|
2377
2392
|
var H;
|
|
2378
|
-
u || (H =
|
|
2393
|
+
u || (H = E.current) == null || H.click();
|
|
2379
2394
|
}, [u]), B = me(
|
|
2380
2395
|
async (H) => {
|
|
2381
2396
|
const K = [], P = [], se = [];
|
|
2382
2397
|
if (i && c) {
|
|
2383
|
-
const j =
|
|
2398
|
+
const j = A.length;
|
|
2384
2399
|
if (j + H.length > c) {
|
|
2385
2400
|
const Q = c - j;
|
|
2386
2401
|
if (Q <= 0) {
|
|
@@ -2395,7 +2410,7 @@ function Wr({
|
|
|
2395
2410
|
}
|
|
2396
2411
|
}
|
|
2397
2412
|
if (i && b) {
|
|
2398
|
-
const j =
|
|
2413
|
+
const j = A.reduce((ce, _e) => ce + _e.file.size, 0), Q = H.reduce((ce, _e) => ce + _e.size, 0), ee = b * 1024 * 1024;
|
|
2399
2414
|
if (j + Q > ee) {
|
|
2400
2415
|
se.push({
|
|
2401
2416
|
isValid: !1,
|
|
@@ -2457,14 +2472,14 @@ function Wr({
|
|
|
2457
2472
|
});
|
|
2458
2473
|
}
|
|
2459
2474
|
F(i ? (j) => [...j, ...P] : P.slice(0, 1)), f(se);
|
|
2460
|
-
const q = i ? [...
|
|
2475
|
+
const q = i ? [...A, ...P].map((j) => j.file) : P.map((j) => j.file);
|
|
2461
2476
|
m == null || m(q, se);
|
|
2462
2477
|
},
|
|
2463
2478
|
[
|
|
2464
2479
|
r,
|
|
2465
2480
|
s,
|
|
2466
2481
|
i,
|
|
2467
|
-
|
|
2482
|
+
A,
|
|
2468
2483
|
m,
|
|
2469
2484
|
l,
|
|
2470
2485
|
c,
|
|
@@ -2474,7 +2489,7 @@ function Wr({
|
|
|
2474
2489
|
), V = me(
|
|
2475
2490
|
async (H) => {
|
|
2476
2491
|
const K = Array.from(H.target.files || []);
|
|
2477
|
-
await B(K),
|
|
2492
|
+
await B(K), E.current && (E.current.value = "");
|
|
2478
2493
|
},
|
|
2479
2494
|
[B]
|
|
2480
2495
|
), G = me(
|
|
@@ -2495,13 +2510,13 @@ function Wr({
|
|
|
2495
2510
|
), ae = me(
|
|
2496
2511
|
(H) => {
|
|
2497
2512
|
if (u) return;
|
|
2498
|
-
const K =
|
|
2513
|
+
const K = A[H], P = A.filter((se, q) => q !== H);
|
|
2499
2514
|
F(P), p == null || p(K.file, H), m == null || m(
|
|
2500
2515
|
P.map((se) => se.file),
|
|
2501
2516
|
_
|
|
2502
2517
|
);
|
|
2503
2518
|
},
|
|
2504
|
-
[u,
|
|
2519
|
+
[u, A, _, p, m]
|
|
2505
2520
|
), ue = me(
|
|
2506
2521
|
(H, K, P, se) => {
|
|
2507
2522
|
F(
|
|
@@ -2532,7 +2547,7 @@ function Wr({
|
|
|
2532
2547
|
"input",
|
|
2533
2548
|
{
|
|
2534
2549
|
...I,
|
|
2535
|
-
ref:
|
|
2550
|
+
ref: E,
|
|
2536
2551
|
type: "file",
|
|
2537
2552
|
accept: r,
|
|
2538
2553
|
multiple: i,
|
|
@@ -2563,9 +2578,9 @@ function Wr({
|
|
|
2563
2578
|
]
|
|
2564
2579
|
}
|
|
2565
2580
|
),
|
|
2566
|
-
|
|
2567
|
-
/* @__PURE__ */ n("div", { className: "ina-file-upload__files", children: (i &&
|
|
2568
|
-
const K =
|
|
2581
|
+
A.length > 0 && /* @__PURE__ */ w(Ye, { children: [
|
|
2582
|
+
/* @__PURE__ */ n("div", { className: "ina-file-upload__files", children: (i && A.length > 5 && !T ? A.slice(0, 5) : A).map((H) => {
|
|
2583
|
+
const K = A.findIndex(
|
|
2569
2584
|
(P) => P.file.name === H.file.name && P.file.size === H.file.size && P.status === H.status
|
|
2570
2585
|
);
|
|
2571
2586
|
return /* @__PURE__ */ w(
|
|
@@ -2655,7 +2670,7 @@ function Wr({
|
|
|
2655
2670
|
`${H.file.name}-${K}`
|
|
2656
2671
|
);
|
|
2657
2672
|
}) }),
|
|
2658
|
-
i &&
|
|
2673
|
+
i && A.length > 5 && /* @__PURE__ */ w(
|
|
2659
2674
|
"button",
|
|
2660
2675
|
{
|
|
2661
2676
|
type: "button",
|
|
@@ -2776,7 +2791,7 @@ function jr({
|
|
|
2776
2791
|
onRemove: M,
|
|
2777
2792
|
...m
|
|
2778
2793
|
}) {
|
|
2779
|
-
const p = le(null), [I,
|
|
2794
|
+
const p = le(null), [I, E] = Z(null), [A, F] = Z(0), [N, k] = Z("idle"), [_, f] = Z(!1), T = b !== void 0 ? b : A, $ = h !== void 0 ? h : N, Y = me(() => {
|
|
2780
2795
|
var K;
|
|
2781
2796
|
l || I || (K = p.current) == null || K.click();
|
|
2782
2797
|
}, [l, I]), B = me(
|
|
@@ -2790,7 +2805,7 @@ function jr({
|
|
|
2790
2805
|
error: "Nama file mengandung karakter yang tidak diizinkan",
|
|
2791
2806
|
file: P
|
|
2792
2807
|
};
|
|
2793
|
-
|
|
2808
|
+
E(null), k("error"), u == null || u(null, Q), p.current && (p.current.value = "");
|
|
2794
2809
|
return;
|
|
2795
2810
|
}
|
|
2796
2811
|
if (i && i.length > 0) {
|
|
@@ -2801,7 +2816,7 @@ function jr({
|
|
|
2801
2816
|
error: `Ekstensi file harus: ${i.join(", ")}`,
|
|
2802
2817
|
file: P
|
|
2803
2818
|
};
|
|
2804
|
-
|
|
2819
|
+
E(null), k("error"), u == null || u(null, ce), p.current && (p.current.value = "");
|
|
2805
2820
|
return;
|
|
2806
2821
|
}
|
|
2807
2822
|
}
|
|
@@ -2811,7 +2826,7 @@ function jr({
|
|
|
2811
2826
|
validateExtension: !0
|
|
2812
2827
|
});
|
|
2813
2828
|
if (!q.isValid) {
|
|
2814
|
-
|
|
2829
|
+
E(null), k("error"), u == null || u(null, q), p.current && (p.current.value = "");
|
|
2815
2830
|
return;
|
|
2816
2831
|
}
|
|
2817
2832
|
if (s && P.type) {
|
|
@@ -2825,15 +2840,15 @@ function jr({
|
|
|
2825
2840
|
error: Q.error || "File signature tidak valid",
|
|
2826
2841
|
file: P
|
|
2827
2842
|
};
|
|
2828
|
-
|
|
2843
|
+
E(null), k("error"), u == null || u(null, ee), p.current && (p.current.value = "");
|
|
2829
2844
|
return;
|
|
2830
2845
|
}
|
|
2831
2846
|
}
|
|
2832
|
-
|
|
2847
|
+
E(P), k("success"), u == null || u(P, null), p.current && (p.current.value = "");
|
|
2833
2848
|
},
|
|
2834
2849
|
[t, r, i, s, u]
|
|
2835
2850
|
), V = me(() => {
|
|
2836
|
-
|
|
2851
|
+
E(null), F(0), k("idle"), f(!1), p.current && (p.current.value = ""), M == null || M(), u == null || u(null, null);
|
|
2837
2852
|
}, [M, u]), G = me(() => {
|
|
2838
2853
|
l || I || Y();
|
|
2839
2854
|
}, [l, I, Y]), O = me(() => {
|
|
@@ -2862,7 +2877,7 @@ function jr({
|
|
|
2862
2877
|
error: "Nama file mengandung karakter yang tidak diizinkan",
|
|
2863
2878
|
file: P
|
|
2864
2879
|
};
|
|
2865
|
-
|
|
2880
|
+
E(null), k("error"), u == null || u(null, j);
|
|
2866
2881
|
return;
|
|
2867
2882
|
}
|
|
2868
2883
|
if (i && i.length > 0) {
|
|
@@ -2873,7 +2888,7 @@ function jr({
|
|
|
2873
2888
|
error: `Ekstensi file harus: ${i.join(", ")}`,
|
|
2874
2889
|
file: P
|
|
2875
2890
|
};
|
|
2876
|
-
|
|
2891
|
+
E(null), k("error"), u == null || u(null, ee);
|
|
2877
2892
|
return;
|
|
2878
2893
|
}
|
|
2879
2894
|
}
|
|
@@ -2883,7 +2898,7 @@ function jr({
|
|
|
2883
2898
|
validateExtension: !0
|
|
2884
2899
|
});
|
|
2885
2900
|
if (!q.isValid) {
|
|
2886
|
-
|
|
2901
|
+
E(null), k("error"), u == null || u(null, q);
|
|
2887
2902
|
return;
|
|
2888
2903
|
}
|
|
2889
2904
|
if (s && P.type) {
|
|
@@ -2897,11 +2912,11 @@ function jr({
|
|
|
2897
2912
|
error: j.error || "File signature tidak valid",
|
|
2898
2913
|
file: P
|
|
2899
2914
|
};
|
|
2900
|
-
|
|
2915
|
+
E(null), k("error"), u == null || u(null, Q);
|
|
2901
2916
|
return;
|
|
2902
2917
|
}
|
|
2903
2918
|
}
|
|
2904
|
-
|
|
2919
|
+
E(P), k("success"), u == null || u(P, null);
|
|
2905
2920
|
},
|
|
2906
2921
|
[
|
|
2907
2922
|
l,
|
|
@@ -3088,9 +3103,9 @@ const mn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ w(
|
|
|
3088
3103
|
}
|
|
3089
3104
|
);
|
|
3090
3105
|
function hn(e, a, t, r) {
|
|
3091
|
-
var i = this, s = le(null), l = le(0), c = le(0), b = le(null), h = le([]), u = le(), M = le(), m = le(e), p = le(!0), I = le(),
|
|
3106
|
+
var i = this, s = le(null), l = le(0), c = le(0), b = le(null), h = le([]), u = le(), M = le(), m = le(e), p = le(!0), I = le(), E = le();
|
|
3092
3107
|
m.current = e;
|
|
3093
|
-
var
|
|
3108
|
+
var A = typeof window < "u", F = !a && a !== 0 && A;
|
|
3094
3109
|
if (typeof e != "function") throw new TypeError("Expected a function");
|
|
3095
3110
|
a = +a || 0;
|
|
3096
3111
|
var N = !!(t = t || {}).leading, k = !("trailing" in t) || !!t.trailing, _ = !!t.flushOnExit && k, f = "maxWait" in t, T = "debounceOnServer" in t && !!t.debounceOnServer, $ = f ? Math.max(+t.maxWait || 0, a) : null, Y = Fe(function() {
|
|
@@ -3115,11 +3130,11 @@ function hn(e, a, t, r) {
|
|
|
3115
3130
|
}, ae = function() {
|
|
3116
3131
|
r && r({});
|
|
3117
3132
|
}, ue = function() {
|
|
3118
|
-
if (
|
|
3133
|
+
if (A || T) {
|
|
3119
3134
|
var te, X = Date.now(), H = G(X);
|
|
3120
3135
|
if (h.current = [].slice.call(arguments), u.current = i, s.current = X, _ && !I.current && (I.current = function() {
|
|
3121
3136
|
var K;
|
|
3122
|
-
((K = global.document) == null ? void 0 : K.visibilityState) === "hidden" &&
|
|
3137
|
+
((K = global.document) == null ? void 0 : K.visibilityState) === "hidden" && E.current.flush();
|
|
3123
3138
|
}, (te = global.document) == null || te.addEventListener == null || te.addEventListener("visibilitychange", I.current)), H) {
|
|
3124
3139
|
if (!b.current && p.current) return l.current = s.current, V(W, a), N ? B(s.current) : M.current;
|
|
3125
3140
|
if (f) return V(W, a), B(s.current);
|
|
@@ -3135,11 +3150,11 @@ function hn(e, a, t, r) {
|
|
|
3135
3150
|
}, ue.flush = function() {
|
|
3136
3151
|
return b.current ? O(Date.now()) : M.current;
|
|
3137
3152
|
}, ue;
|
|
3138
|
-
}, [N, f, a, $, k, _, F,
|
|
3139
|
-
return
|
|
3153
|
+
}, [N, f, a, $, k, _, F, A, T, r]);
|
|
3154
|
+
return E.current = Y, oe(function() {
|
|
3140
3155
|
return p.current = !0, function() {
|
|
3141
3156
|
var B;
|
|
3142
|
-
_ &&
|
|
3157
|
+
_ && E.current.flush(), I.current && ((B = global.document) == null || B.removeEventListener == null || B.removeEventListener("visibilitychange", I.current), I.current = null), p.current = !1;
|
|
3143
3158
|
};
|
|
3144
3159
|
}, [_]), Y;
|
|
3145
3160
|
}
|
|
@@ -3217,7 +3232,7 @@ function es({
|
|
|
3217
3232
|
}, [m, i]), oe(() => {
|
|
3218
3233
|
M(t || "");
|
|
3219
3234
|
}, [t]);
|
|
3220
|
-
const I = le(null),
|
|
3235
|
+
const I = le(null), E = S("ina-input-search"), A = S(
|
|
3221
3236
|
"ina-input-search__wrapper",
|
|
3222
3237
|
h && "ina-input-search__wrapper--disabled",
|
|
3223
3238
|
e
|
|
@@ -3225,7 +3240,7 @@ function es({
|
|
|
3225
3240
|
"ina-input-search__clear-button",
|
|
3226
3241
|
!u && "ina-input-search__clear-button--hidden"
|
|
3227
3242
|
);
|
|
3228
|
-
return /* @__PURE__ */ w("div", { className:
|
|
3243
|
+
return /* @__PURE__ */ w("div", { className: E, children: [
|
|
3229
3244
|
a && /* @__PURE__ */ w(
|
|
3230
3245
|
"label",
|
|
3231
3246
|
{
|
|
@@ -3241,7 +3256,7 @@ function es({
|
|
|
3241
3256
|
]
|
|
3242
3257
|
}
|
|
3243
3258
|
),
|
|
3244
|
-
/* @__PURE__ */ w("div", { className:
|
|
3259
|
+
/* @__PURE__ */ w("div", { className: A, children: [
|
|
3245
3260
|
/* @__PURE__ */ n(mn, { className: "ina-input-search__search-icon", size: 20 }),
|
|
3246
3261
|
/* @__PURE__ */ n(
|
|
3247
3262
|
"input",
|
|
@@ -3283,16 +3298,16 @@ function yn({
|
|
|
3283
3298
|
paddingBody: b = "16px 24px",
|
|
3284
3299
|
closeLabel: h = "Tutup dialog"
|
|
3285
3300
|
}) {
|
|
3286
|
-
const [u, M] = Z(!1), [m, p] = Z(!1), [I,
|
|
3301
|
+
const [u, M] = Z(!1), [m, p] = Z(!1), [I, E] = Z(!1), A = le(null), F = le(`modal-title-${Math.random().toString(36).slice(2)}`), N = le(null), k = le(!1);
|
|
3287
3302
|
if (oe(() => M(!0), []), oe(() => {
|
|
3288
3303
|
if (e)
|
|
3289
3304
|
p(!0), N.current = document.activeElement, requestAnimationFrame(() => {
|
|
3290
3305
|
requestAnimationFrame(() => {
|
|
3291
|
-
|
|
3306
|
+
E(!0);
|
|
3292
3307
|
});
|
|
3293
3308
|
});
|
|
3294
3309
|
else {
|
|
3295
|
-
|
|
3310
|
+
E(!1), N.current && (N.current.focus(), N.current = null);
|
|
3296
3311
|
const B = setTimeout(() => {
|
|
3297
3312
|
p(!1);
|
|
3298
3313
|
}, 300);
|
|
@@ -3328,7 +3343,7 @@ function yn({
|
|
|
3328
3343
|
if (I && !k.current) {
|
|
3329
3344
|
const B = setTimeout(() => {
|
|
3330
3345
|
var V;
|
|
3331
|
-
(V =
|
|
3346
|
+
(V = A.current) == null || V.focus(), k.current = !0;
|
|
3332
3347
|
}, 50);
|
|
3333
3348
|
return () => clearTimeout(B);
|
|
3334
3349
|
}
|
|
@@ -3373,7 +3388,7 @@ function yn({
|
|
|
3373
3388
|
/* @__PURE__ */ n(
|
|
3374
3389
|
"button",
|
|
3375
3390
|
{
|
|
3376
|
-
ref:
|
|
3391
|
+
ref: A,
|
|
3377
3392
|
onClick: a,
|
|
3378
3393
|
"aria-label": h,
|
|
3379
3394
|
className: "ina-modal__close-button",
|
|
@@ -3495,9 +3510,9 @@ function wn({
|
|
|
3495
3510
|
},
|
|
3496
3511
|
f
|
|
3497
3512
|
);
|
|
3498
|
-
}, A = (f) => {
|
|
3499
|
-
f.preventDefault(), !l && e > 1 && i(1);
|
|
3500
3513
|
}, E = (f) => {
|
|
3514
|
+
f.preventDefault(), !l && e > 1 && i(1);
|
|
3515
|
+
}, A = (f) => {
|
|
3501
3516
|
f.preventDefault(), !l && e > 1 && i(e - 1);
|
|
3502
3517
|
}, F = (f) => {
|
|
3503
3518
|
f.preventDefault(), !l && e < a && i(e + 1);
|
|
@@ -3568,7 +3583,7 @@ function wn({
|
|
|
3568
3583
|
/* @__PURE__ */ n(
|
|
3569
3584
|
"button",
|
|
3570
3585
|
{
|
|
3571
|
-
onClick:
|
|
3586
|
+
onClick: E,
|
|
3572
3587
|
disabled: l || e === 1,
|
|
3573
3588
|
className: S(
|
|
3574
3589
|
"ina-pagination__nav-button",
|
|
@@ -3581,7 +3596,7 @@ function wn({
|
|
|
3581
3596
|
/* @__PURE__ */ n(
|
|
3582
3597
|
"button",
|
|
3583
3598
|
{
|
|
3584
|
-
onClick:
|
|
3599
|
+
onClick: A,
|
|
3585
3600
|
disabled: l || e === 1,
|
|
3586
3601
|
className: S(
|
|
3587
3602
|
"ina-pagination__nav-button",
|
|
@@ -3800,8 +3815,8 @@ function as({
|
|
|
3800
3815
|
placeholder: m,
|
|
3801
3816
|
disabled: p = !1,
|
|
3802
3817
|
className: I = "",
|
|
3803
|
-
onBlur:
|
|
3804
|
-
...
|
|
3818
|
+
onBlur: E,
|
|
3819
|
+
...A
|
|
3805
3820
|
}) {
|
|
3806
3821
|
const [F, N] = Z(e), [k, _] = Z(!1), [f] = ht(F, t), T = le(!0);
|
|
3807
3822
|
oe(() => {
|
|
@@ -3813,10 +3828,10 @@ function as({
|
|
|
3813
3828
|
const ae = W.target.value;
|
|
3814
3829
|
u != null && ae.length > u || (N(ae), a(ae));
|
|
3815
3830
|
}, Y = (W) => {
|
|
3816
|
-
|
|
3831
|
+
E == null || E(W);
|
|
3817
3832
|
}, B = () => {
|
|
3818
3833
|
N(""), a(""), r && r("");
|
|
3819
|
-
}, V = c !== "neutral" && b != null ? b : l, G = (
|
|
3834
|
+
}, V = c !== "neutral" && b != null ? b : l, G = (A == null ? void 0 : A.id) || (A == null ? void 0 : A.name) || String(s).toLowerCase(), O = `${G}-status`;
|
|
3820
3835
|
return /* @__PURE__ */ w("div", { className: S("ina-password-input", I), children: [
|
|
3821
3836
|
s && /* @__PURE__ */ w(
|
|
3822
3837
|
"label",
|
|
@@ -3825,7 +3840,7 @@ function as({
|
|
|
3825
3840
|
htmlFor: String(G),
|
|
3826
3841
|
children: [
|
|
3827
3842
|
s,
|
|
3828
|
-
|
|
3843
|
+
A.required && /* @__PURE__ */ n("span", { className: "ina-text-field__required", children: "*" })
|
|
3829
3844
|
]
|
|
3830
3845
|
}
|
|
3831
3846
|
),
|
|
@@ -3843,7 +3858,7 @@ function as({
|
|
|
3843
3858
|
/* @__PURE__ */ n(
|
|
3844
3859
|
"input",
|
|
3845
3860
|
{
|
|
3846
|
-
...
|
|
3861
|
+
...A,
|
|
3847
3862
|
id: String(G),
|
|
3848
3863
|
type: k ? "text" : "password",
|
|
3849
3864
|
className: "ina-password-input__input",
|
|
@@ -4476,11 +4491,11 @@ function rs({
|
|
|
4476
4491
|
defaultCountry: m = "ID",
|
|
4477
4492
|
countries: p = xn,
|
|
4478
4493
|
allowClear: I = !0,
|
|
4479
|
-
className:
|
|
4480
|
-
id:
|
|
4494
|
+
className: E,
|
|
4495
|
+
id: A,
|
|
4481
4496
|
...F
|
|
4482
4497
|
}) {
|
|
4483
|
-
const N = Fe(() =>
|
|
4498
|
+
const N = Fe(() => A || `phone-input-${Math.random().toString(36).substr(2, 9)}`, [A]), [k, _] = Z(a), [f, T] = Z(!1), [$, Y] = Z(""), [B, V] = Z(
|
|
4484
4499
|
p.find((ee) => ee.code === m) || p[0]
|
|
4485
4500
|
), G = le(null), O = le(null), W = le(null), ae = Fe(() => `${N}-helper`, [N]), ue = (ee) => {
|
|
4486
4501
|
const ce = ee.replace(/\D/g, "");
|
|
@@ -4533,7 +4548,7 @@ function rs({
|
|
|
4533
4548
|
}, P = S(
|
|
4534
4549
|
"ina-phone-input",
|
|
4535
4550
|
h && "ina-phone-input--disabled",
|
|
4536
|
-
|
|
4551
|
+
E
|
|
4537
4552
|
), se = () => {
|
|
4538
4553
|
var ee;
|
|
4539
4554
|
_(""), t == null || t(`${B.dialCode}`), (ee = G.current) == null || ee.focus();
|
|
@@ -4775,9 +4790,9 @@ const is = ({
|
|
|
4775
4790
|
prefixNode: m,
|
|
4776
4791
|
width: p = "100%",
|
|
4777
4792
|
panelWidth: I,
|
|
4778
|
-
panelHeight:
|
|
4793
|
+
panelHeight: E = 600,
|
|
4779
4794
|
// default 600px
|
|
4780
|
-
hasMore:
|
|
4795
|
+
hasMore: A = !1,
|
|
4781
4796
|
loading: F = !1,
|
|
4782
4797
|
currentPage: N = 1,
|
|
4783
4798
|
onLoadMore: k,
|
|
@@ -5078,7 +5093,7 @@ const is = ({
|
|
|
5078
5093
|
style: {
|
|
5079
5094
|
// width is now 100% via CSS, but we can override if panelWidth is provided
|
|
5080
5095
|
width: I ? wt(I) : void 0,
|
|
5081
|
-
maxHeight: wt(
|
|
5096
|
+
maxHeight: wt(E)
|
|
5082
5097
|
},
|
|
5083
5098
|
children: [
|
|
5084
5099
|
G && Ie() !== null && /* @__PURE__ */ n("div", { className: "ina-select-dropdown__preview", children: Ie() }),
|
|
@@ -5089,7 +5104,7 @@ const is = ({
|
|
|
5089
5104
|
className: "ina-select-dropdown__options",
|
|
5090
5105
|
onScroll: (v) => {
|
|
5091
5106
|
const g = v.currentTarget;
|
|
5092
|
-
g.scrollHeight - g.scrollTop - g.clientHeight < 50 && !F &&
|
|
5107
|
+
g.scrollHeight - g.scrollTop - g.clientHeight < 50 && !F && A && k && !V && k(N + 1);
|
|
5093
5108
|
},
|
|
5094
5109
|
children: [
|
|
5095
5110
|
te && /* @__PURE__ */ n("div", { className: "ina-select-dropdown__selection-title", children: te }),
|
|
@@ -5212,7 +5227,7 @@ function ls({
|
|
|
5212
5227
|
), I = S(
|
|
5213
5228
|
"ina-drawer__footer",
|
|
5214
5229
|
t !== "top" && "ina-drawer__footer--hidden"
|
|
5215
|
-
),
|
|
5230
|
+
), E = S("ina-drawer__close-button"), A = S("ina-drawer__close-icon"), F = [
|
|
5216
5231
|
"sm",
|
|
5217
5232
|
"md",
|
|
5218
5233
|
"lg",
|
|
@@ -5252,9 +5267,9 @@ function ls({
|
|
|
5252
5267
|
{
|
|
5253
5268
|
type: "button",
|
|
5254
5269
|
onClick: a,
|
|
5255
|
-
className:
|
|
5270
|
+
className: E,
|
|
5256
5271
|
"aria-label": c,
|
|
5257
|
-
children: /* @__PURE__ */ n(Te, { className:
|
|
5272
|
+
children: /* @__PURE__ */ n(Te, { className: A, size: 20 })
|
|
5258
5273
|
}
|
|
5259
5274
|
)
|
|
5260
5275
|
] }),
|
|
@@ -5264,9 +5279,9 @@ function ls({
|
|
|
5264
5279
|
{
|
|
5265
5280
|
type: "button",
|
|
5266
5281
|
onClick: a,
|
|
5267
|
-
className:
|
|
5282
|
+
className: E,
|
|
5268
5283
|
"aria-label": c,
|
|
5269
|
-
children: /* @__PURE__ */ n(Te, { className:
|
|
5284
|
+
children: /* @__PURE__ */ n(Te, { className: A, size: 20 })
|
|
5270
5285
|
}
|
|
5271
5286
|
) })
|
|
5272
5287
|
]
|
|
@@ -5345,7 +5360,7 @@ function cs({
|
|
|
5345
5360
|
] })
|
|
5346
5361
|
] });
|
|
5347
5362
|
}
|
|
5348
|
-
function
|
|
5363
|
+
function En({
|
|
5349
5364
|
value: e,
|
|
5350
5365
|
onChange: a,
|
|
5351
5366
|
onInput: t,
|
|
@@ -5361,8 +5376,8 @@ function An({
|
|
|
5361
5376
|
maxLength: m,
|
|
5362
5377
|
showCharCount: p = !1,
|
|
5363
5378
|
showClearButton: I = !0,
|
|
5364
|
-
onClear:
|
|
5365
|
-
placeholder:
|
|
5379
|
+
onClear: E,
|
|
5380
|
+
placeholder: A,
|
|
5366
5381
|
disabled: F = !1,
|
|
5367
5382
|
className: N = "",
|
|
5368
5383
|
securityConfig: k = Da,
|
|
@@ -5395,7 +5410,7 @@ function An({
|
|
|
5395
5410
|
}, O = (K) => {
|
|
5396
5411
|
_ == null || _(K);
|
|
5397
5412
|
}, W = () => {
|
|
5398
|
-
Y(""), a(""), i && i(""),
|
|
5413
|
+
Y(""), a(""), i && i(""), E == null || E();
|
|
5399
5414
|
}, ae = S(
|
|
5400
5415
|
"ina-text-field__wrapper",
|
|
5401
5416
|
`ina-text-field__wrapper--size-${M}`,
|
|
@@ -5429,7 +5444,7 @@ function An({
|
|
|
5429
5444
|
value: $,
|
|
5430
5445
|
onChange: G,
|
|
5431
5446
|
onBlur: O,
|
|
5432
|
-
placeholder:
|
|
5447
|
+
placeholder: A,
|
|
5433
5448
|
disabled: F,
|
|
5434
5449
|
maxLength: m,
|
|
5435
5450
|
"aria-describedby": te ? H : void 0
|
|
@@ -5460,7 +5475,7 @@ function An({
|
|
|
5460
5475
|
] })
|
|
5461
5476
|
] });
|
|
5462
5477
|
}
|
|
5463
|
-
const
|
|
5478
|
+
const An = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ w(
|
|
5464
5479
|
"svg",
|
|
5465
5480
|
{
|
|
5466
5481
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5518,8 +5533,8 @@ function ds({
|
|
|
5518
5533
|
onSelectionChange: m,
|
|
5519
5534
|
editableColumns: p = [],
|
|
5520
5535
|
onRowUpdate: I,
|
|
5521
|
-
rowKey:
|
|
5522
|
-
showSearch:
|
|
5536
|
+
rowKey: E = "id",
|
|
5537
|
+
showSearch: A = !1,
|
|
5523
5538
|
rowClickable: F = !1,
|
|
5524
5539
|
onRowClick: N,
|
|
5525
5540
|
lastColumnSticky: k = !1,
|
|
@@ -5558,12 +5573,12 @@ function ds({
|
|
|
5558
5573
|
const we = () => {
|
|
5559
5574
|
const g = !J, U = {};
|
|
5560
5575
|
$.forEach((re) => {
|
|
5561
|
-
U[re[
|
|
5576
|
+
U[re[E]] = g;
|
|
5562
5577
|
}), ie(U), m == null || m(g ? [...$] : []);
|
|
5563
5578
|
}, ke = (g) => {
|
|
5564
5579
|
ie((U) => {
|
|
5565
5580
|
const re = { ...U, [g]: !U[g] };
|
|
5566
|
-
return m == null || m($.filter((de) => re[de[
|
|
5581
|
+
return m == null || m($.filter((de) => re[de[E]]).map((de) => de)), re;
|
|
5567
5582
|
});
|
|
5568
5583
|
}, Ne = (g, U, re, de) => {
|
|
5569
5584
|
de.stopPropagation(), fe((ye) => ({
|
|
@@ -5603,15 +5618,15 @@ function ds({
|
|
|
5603
5618
|
"ina-table--sticky-last-column": k
|
|
5604
5619
|
}), d = S(
|
|
5605
5620
|
"ina-table__search",
|
|
5606
|
-
!
|
|
5621
|
+
!A && "ina-table__search--hidden"
|
|
5607
5622
|
), D = S(
|
|
5608
5623
|
"ina-table__container",
|
|
5609
5624
|
G && "ina-table--loading"
|
|
5610
5625
|
), x = S("ina-table__header"), v = S("ina-table__body");
|
|
5611
5626
|
return /* @__PURE__ */ w("div", { className: z, children: [
|
|
5612
|
-
|
|
5627
|
+
A && /* @__PURE__ */ n("div", { className: d, children: /* @__PURE__ */ w("div", { className: "ina-table__search-controls", children: [
|
|
5613
5628
|
/* @__PURE__ */ n(
|
|
5614
|
-
|
|
5629
|
+
En,
|
|
5615
5630
|
{
|
|
5616
5631
|
value: ee,
|
|
5617
5632
|
onChange: y,
|
|
@@ -5675,7 +5690,7 @@ function ds({
|
|
|
5675
5690
|
role: "button",
|
|
5676
5691
|
"aria-label": `Urutkan ${g.header} menaik`,
|
|
5677
5692
|
children: /* @__PURE__ */ n(
|
|
5678
|
-
|
|
5693
|
+
An,
|
|
5679
5694
|
{
|
|
5680
5695
|
size: 16,
|
|
5681
5696
|
stroke: re && se === "asc" ? 3 : 2
|
|
@@ -5718,7 +5733,7 @@ function ds({
|
|
|
5718
5733
|
children: f
|
|
5719
5734
|
}
|
|
5720
5735
|
) }) : $.map((g, U) => {
|
|
5721
|
-
const re = String(g[
|
|
5736
|
+
const re = String(g[E]);
|
|
5722
5737
|
return /* @__PURE__ */ w(
|
|
5723
5738
|
"tr",
|
|
5724
5739
|
{
|
|
@@ -5826,8 +5841,8 @@ function us({
|
|
|
5826
5841
|
showClearButton: m = !0,
|
|
5827
5842
|
minRows: p = 3,
|
|
5828
5843
|
maxRows: I,
|
|
5829
|
-
placeholder:
|
|
5830
|
-
disabled:
|
|
5844
|
+
placeholder: E,
|
|
5845
|
+
disabled: A = !1,
|
|
5831
5846
|
className: F = "",
|
|
5832
5847
|
securityConfig: N = Da,
|
|
5833
5848
|
onBlur: k,
|
|
@@ -5870,7 +5885,7 @@ function us({
|
|
|
5870
5885
|
}, te = S("ina-text-area", F), X = S(
|
|
5871
5886
|
"ina-text-area__wrapper",
|
|
5872
5887
|
`ina-text-area__wrapper--status-${b}`,
|
|
5873
|
-
|
|
5888
|
+
A && "ina-text-area__wrapper--disabled"
|
|
5874
5889
|
), H = S(
|
|
5875
5890
|
"ina-text-area__helper-text",
|
|
5876
5891
|
`ina-text-area__helper-text--${b}`
|
|
@@ -5900,13 +5915,13 @@ function us({
|
|
|
5900
5915
|
value: T,
|
|
5901
5916
|
onChange: W,
|
|
5902
5917
|
onBlur: ae,
|
|
5903
|
-
placeholder:
|
|
5904
|
-
disabled:
|
|
5918
|
+
placeholder: E,
|
|
5919
|
+
disabled: A,
|
|
5905
5920
|
maxLength: u,
|
|
5906
5921
|
"aria-describedby": K ? se : void 0
|
|
5907
5922
|
}
|
|
5908
5923
|
),
|
|
5909
|
-
m && T !== "" && !
|
|
5924
|
+
m && T !== "" && !A && /* @__PURE__ */ n(
|
|
5910
5925
|
"button",
|
|
5911
5926
|
{
|
|
5912
5927
|
type: "button",
|
|
@@ -5990,9 +6005,9 @@ function fs({
|
|
|
5990
6005
|
m.current[Y] && m.current[Y].focus();
|
|
5991
6006
|
}
|
|
5992
6007
|
}));
|
|
5993
|
-
},
|
|
6008
|
+
}, E = (N) => {
|
|
5994
6009
|
m.current[N] && m.current[N].select();
|
|
5995
|
-
},
|
|
6010
|
+
}, A = () => {
|
|
5996
6011
|
}, F = (N) => {
|
|
5997
6012
|
N.preventDefault();
|
|
5998
6013
|
const _ = N.clipboardData.getData("text").replace(/\D/g, "").slice(0, t);
|
|
@@ -6021,8 +6036,8 @@ function fs({
|
|
|
6021
6036
|
value: _,
|
|
6022
6037
|
onChange: (f) => p(k, f),
|
|
6023
6038
|
onKeyDown: (f) => I(k, f),
|
|
6024
|
-
onFocus: () =>
|
|
6025
|
-
onBlur:
|
|
6039
|
+
onFocus: () => E(k),
|
|
6040
|
+
onBlur: A,
|
|
6026
6041
|
onPaste: F,
|
|
6027
6042
|
disabled: c,
|
|
6028
6043
|
readOnly: b,
|
|
@@ -6083,8 +6098,8 @@ const Vn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ w(
|
|
|
6083
6098
|
className: m = "",
|
|
6084
6099
|
use12Hours: p = !1,
|
|
6085
6100
|
showSecond: I = !1,
|
|
6086
|
-
allowClear:
|
|
6087
|
-
prefixIcon:
|
|
6101
|
+
allowClear: E = !0,
|
|
6102
|
+
prefixIcon: A,
|
|
6088
6103
|
suffixIcon: F,
|
|
6089
6104
|
disabledBackTime: N = !1,
|
|
6090
6105
|
disabledTimeBefore: k,
|
|
@@ -6322,7 +6337,7 @@ const Vn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ w(
|
|
|
6322
6337
|
"ina-time-picker__input",
|
|
6323
6338
|
`ina-time-picker__input--size-${c}`,
|
|
6324
6339
|
"ina-time-picker__input--with-prefix",
|
|
6325
|
-
(F ||
|
|
6340
|
+
(F || E) && "ina-time-picker__input--with-suffix"
|
|
6326
6341
|
);
|
|
6327
6342
|
return /* @__PURE__ */ w("div", { ref: P, className: Ve, children: [
|
|
6328
6343
|
T && /* @__PURE__ */ w("label", { className: "ina-time-picker__label", children: [
|
|
@@ -6345,7 +6360,7 @@ const Vn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ w(
|
|
|
6345
6360
|
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), Ce());
|
|
6346
6361
|
},
|
|
6347
6362
|
children: [
|
|
6348
|
-
/* @__PURE__ */ n("div", { className: "ina-time-picker__prefix-icon", children:
|
|
6363
|
+
/* @__PURE__ */ n("div", { className: "ina-time-picker__prefix-icon", children: A || /* @__PURE__ */ n(Vn, { size: 16 }) }),
|
|
6349
6364
|
/* @__PURE__ */ n(
|
|
6350
6365
|
"input",
|
|
6351
6366
|
{
|
|
@@ -6368,7 +6383,7 @@ const Vn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ w(
|
|
|
6368
6383
|
...Y
|
|
6369
6384
|
}
|
|
6370
6385
|
),
|
|
6371
|
-
|
|
6386
|
+
E && O && !a && /* @__PURE__ */ n(
|
|
6372
6387
|
"button",
|
|
6373
6388
|
{
|
|
6374
6389
|
type: "button",
|
|
@@ -6388,7 +6403,7 @@ const Vn = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ w(
|
|
|
6388
6403
|
{
|
|
6389
6404
|
className: "ina-time-picker__suffix-icon",
|
|
6390
6405
|
style: {
|
|
6391
|
-
visibility:
|
|
6406
|
+
visibility: E && O && !a ? "hidden" : "visible"
|
|
6392
6407
|
},
|
|
6393
6408
|
children: F
|
|
6394
6409
|
}
|
|
@@ -6509,7 +6524,7 @@ function $n({
|
|
|
6509
6524
|
position: b = "top-right",
|
|
6510
6525
|
className: h = ""
|
|
6511
6526
|
}) {
|
|
6512
|
-
const [u, M] = Z(!1), [m, p] = Z(!1), [I,
|
|
6527
|
+
const [u, M] = Z(!1), [m, p] = Z(!1), [I, E] = Z(!1), A = le(), F = le(null), N = Ln[s];
|
|
6513
6528
|
oe(() => {
|
|
6514
6529
|
M(!0);
|
|
6515
6530
|
}, []), oe(() => {
|
|
@@ -6519,10 +6534,10 @@ function $n({
|
|
|
6519
6534
|
};
|
|
6520
6535
|
}, [u, b]), oe(() => {
|
|
6521
6536
|
if (u)
|
|
6522
|
-
return e && (p(!0), requestAnimationFrame(() =>
|
|
6537
|
+
return e && (p(!0), requestAnimationFrame(() => E(!0)), A.current = setTimeout(() => k(), c)), () => clearTimeout(A.current);
|
|
6523
6538
|
}, [e, c, u]);
|
|
6524
6539
|
function k() {
|
|
6525
|
-
|
|
6540
|
+
E(!1), setTimeout(() => {
|
|
6526
6541
|
p(!1), a(), F.current && Zt(F.current);
|
|
6527
6542
|
}, 300);
|
|
6528
6543
|
}
|
|
@@ -6570,9 +6585,9 @@ function ps({
|
|
|
6570
6585
|
}) {
|
|
6571
6586
|
const [m, p] = Z(!1), I = () => {
|
|
6572
6587
|
p(!0), b && b();
|
|
6573
|
-
}, A = () => {
|
|
6574
|
-
p(!0), h && h();
|
|
6575
6588
|
}, E = () => {
|
|
6589
|
+
p(!0), h && h();
|
|
6590
|
+
}, A = () => {
|
|
6576
6591
|
m && p(!1);
|
|
6577
6592
|
}, F = S(
|
|
6578
6593
|
"ina-tooltip",
|
|
@@ -6588,7 +6603,7 @@ function ps({
|
|
|
6588
6603
|
"ina-tooltip--variant-dark": s === "dark",
|
|
6589
6604
|
"ina-tooltip--variant-media": s === "media"
|
|
6590
6605
|
});
|
|
6591
|
-
return /* @__PURE__ */ w("div", { className: F, onMouseEnter:
|
|
6606
|
+
return /* @__PURE__ */ w("div", { className: F, onMouseEnter: A, children: [
|
|
6592
6607
|
i,
|
|
6593
6608
|
/* @__PURE__ */ n("div", { className: N, role: "tooltip", children: u && r ? r : s === "basic" ? /* @__PURE__ */ n("div", { className: "ina-tooltip__bubble ina-tooltip__bubble--basic", children: e }) : /* @__PURE__ */ w("div", { className: `ina-tooltip__card ina-tooltip__card--${s}`, children: [
|
|
6594
6609
|
b && /* @__PURE__ */ n(
|
|
@@ -6645,7 +6660,7 @@ function ps({
|
|
|
6645
6660
|
type: "button",
|
|
6646
6661
|
className: "ina-tooltip__action ina-tooltip__action--next",
|
|
6647
6662
|
onClick: (_) => {
|
|
6648
|
-
_.stopPropagation(),
|
|
6663
|
+
_.stopPropagation(), E();
|
|
6649
6664
|
},
|
|
6650
6665
|
children: "Lanjut"
|
|
6651
6666
|
}
|
|
@@ -6739,9 +6754,9 @@ function ms({
|
|
|
6739
6754
|
)
|
|
6740
6755
|
] });
|
|
6741
6756
|
}
|
|
6742
|
-
const
|
|
6757
|
+
const Ea = Tt({
|
|
6743
6758
|
confirm: () => Promise.resolve(!1)
|
|
6744
|
-
}), hs = () => Vt(
|
|
6759
|
+
}), hs = () => Vt(Ea), Bn = (e, a, t, r, i) => /* @__PURE__ */ w("div", { className: "ina-modal-confirmation__footer", children: [
|
|
6745
6760
|
/* @__PURE__ */ n(
|
|
6746
6761
|
ct,
|
|
6747
6762
|
{
|
|
@@ -6786,7 +6801,7 @@ const Aa = Tt({
|
|
|
6786
6801
|
))
|
|
6787
6802
|
}), i({ resolve: b });
|
|
6788
6803
|
});
|
|
6789
|
-
return /* @__PURE__ */ w(
|
|
6804
|
+
return /* @__PURE__ */ w(Ea.Provider, { value: { confirm: l }, children: [
|
|
6790
6805
|
e,
|
|
6791
6806
|
a && /* @__PURE__ */ n(
|
|
6792
6807
|
yn,
|
|
@@ -6803,17 +6818,17 @@ const Aa = Tt({
|
|
|
6803
6818
|
}
|
|
6804
6819
|
)
|
|
6805
6820
|
] });
|
|
6806
|
-
},
|
|
6821
|
+
}, Aa = Tt({
|
|
6807
6822
|
toast: () => {
|
|
6808
6823
|
}
|
|
6809
|
-
}), gs = () => Vt(
|
|
6824
|
+
}), gs = () => Vt(Aa), ys = ({ children: e }) => {
|
|
6810
6825
|
const [a, t] = Z([]), r = (s) => {
|
|
6811
6826
|
const l = `${Date.now()}-${Math.random()}`;
|
|
6812
6827
|
t((c) => [...c, { id: l, ...s }]);
|
|
6813
6828
|
}, i = (s) => {
|
|
6814
6829
|
t((l) => l.filter((c) => c.id !== s));
|
|
6815
6830
|
};
|
|
6816
|
-
return /* @__PURE__ */ w(
|
|
6831
|
+
return /* @__PURE__ */ w(Aa.Provider, { value: { toast: r }, children: [
|
|
6817
6832
|
e,
|
|
6818
6833
|
a.map((s, l) => /* @__PURE__ */ n(
|
|
6819
6834
|
$n,
|
|
@@ -6839,7 +6854,7 @@ var Se = (e) => !Be(e) && !Array.isArray(e) && Sa(e) && !qe(e), Va = (e) => Se(e
|
|
|
6839
6854
|
const a = e.constructor && e.constructor.prototype;
|
|
6840
6855
|
return Se(a) && a.hasOwnProperty("isPrototypeOf");
|
|
6841
6856
|
}, Ft = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
6842
|
-
function
|
|
6857
|
+
function Ee(e) {
|
|
6843
6858
|
if (e instanceof Date)
|
|
6844
6859
|
return new Date(e);
|
|
6845
6860
|
const a = typeof FileList < "u" && e instanceof FileList;
|
|
@@ -6850,7 +6865,7 @@ function Ae(e) {
|
|
|
6850
6865
|
return e;
|
|
6851
6866
|
const r = t ? [] : Object.create(Object.getPrototypeOf(e));
|
|
6852
6867
|
for (const i in e)
|
|
6853
|
-
Object.prototype.hasOwnProperty.call(e, i) && (r[i] =
|
|
6868
|
+
Object.prototype.hasOwnProperty.call(e, i) && (r[i] = Ee(e[i]));
|
|
6854
6869
|
return r;
|
|
6855
6870
|
}
|
|
6856
6871
|
var vt = (e) => /^\w*$/.test(e), xe = (e) => e === void 0, $t = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Rt = (e) => $t(e.replace(/["|']|\]/g, "").split(/\.|\[/)), ne = (e, a, t) => {
|
|
@@ -6933,9 +6948,9 @@ function On(e) {
|
|
|
6933
6948
|
b.current.isValid && t._setValid(!0);
|
|
6934
6949
|
}, [t]), ge.useMemo(() => La(l, t, b.current, !1), [l, t]);
|
|
6935
6950
|
}
|
|
6936
|
-
var He = (e) => typeof e == "string", It = (e, a, t, r, i) => He(e) ? (r && a.watch.add(e), ne(t, e, i)) : Array.isArray(e) ? e.map((s) => (r && a.watch.add(s), ne(t, s))) : (r && (a.watchAll = !0), t),
|
|
6951
|
+
var He = (e) => typeof e == "string", It = (e, a, t, r, i) => He(e) ? (r && a.watch.add(e), ne(t, e, i)) : Array.isArray(e) ? e.map((s) => (r && a.watch.add(s), ne(t, s))) : (r && (a.watchAll = !0), t), Et = (e) => Be(e) || !Sa(e);
|
|
6937
6952
|
function Ue(e, a, t = /* @__PURE__ */ new WeakSet()) {
|
|
6938
|
-
if (
|
|
6953
|
+
if (Et(e) || Et(a))
|
|
6939
6954
|
return Object.is(e, a);
|
|
6940
6955
|
if (qe(e) && qe(a))
|
|
6941
6956
|
return Object.is(e.getTime(), a.getTime());
|
|
@@ -6963,10 +6978,10 @@ function Un(e) {
|
|
|
6963
6978
|
const [p, I] = ge.useState(() => {
|
|
6964
6979
|
const _ = t._getWatch(r, b.current);
|
|
6965
6980
|
return h.current ? h.current(_) : _;
|
|
6966
|
-
}),
|
|
6981
|
+
}), E = ge.useCallback((_) => {
|
|
6967
6982
|
const f = It(r, t._names, _ || t._formValues, !1, b.current);
|
|
6968
6983
|
return h.current ? h.current(f) : f;
|
|
6969
|
-
}, [t._formValues, t._names, r]),
|
|
6984
|
+
}, [t._formValues, t._names, r]), A = ge.useCallback((_) => {
|
|
6970
6985
|
if (!s) {
|
|
6971
6986
|
const f = It(r, t._names, _ || t._formValues, !1, b.current);
|
|
6972
6987
|
if (h.current) {
|
|
@@ -6976,22 +6991,22 @@ function Un(e) {
|
|
|
6976
6991
|
I(f);
|
|
6977
6992
|
}
|
|
6978
6993
|
}, [t._formValues, t._names, s, r]);
|
|
6979
|
-
Pt(() => ((M.current !== t || !Ue(m.current, r)) && (M.current = t, m.current = r,
|
|
6994
|
+
Pt(() => ((M.current !== t || !Ue(m.current, r)) && (M.current = t, m.current = r, A()), t._subscribe({
|
|
6980
6995
|
name: r,
|
|
6981
6996
|
formState: {
|
|
6982
6997
|
values: !0
|
|
6983
6998
|
},
|
|
6984
6999
|
exact: l,
|
|
6985
7000
|
callback: (_) => {
|
|
6986
|
-
|
|
7001
|
+
A(_.values);
|
|
6987
7002
|
}
|
|
6988
|
-
})), [t, l, r,
|
|
7003
|
+
})), [t, l, r, A]), ge.useEffect(() => t._removeUnmounted());
|
|
6989
7004
|
const F = M.current !== t, N = m.current, k = ge.useMemo(() => {
|
|
6990
7005
|
if (s)
|
|
6991
7006
|
return null;
|
|
6992
7007
|
const _ = !F && !Ue(N, r);
|
|
6993
|
-
return F || _ ?
|
|
6994
|
-
}, [s, F, r, N,
|
|
7008
|
+
return F || _ ? E() : null;
|
|
7009
|
+
}, [s, F, r, N, E]);
|
|
6995
7010
|
return k !== null ? k : p;
|
|
6996
7011
|
}
|
|
6997
7012
|
function Gn(e) {
|
|
@@ -7010,7 +7025,7 @@ function Gn(e) {
|
|
|
7010
7025
|
...Pe(e.disabled) ? { disabled: e.disabled } : {}
|
|
7011
7026
|
}));
|
|
7012
7027
|
m.current = e;
|
|
7013
|
-
const
|
|
7028
|
+
const E = ge.useMemo(() => Object.defineProperties({}, {
|
|
7014
7029
|
invalid: {
|
|
7015
7030
|
enumerable: !0,
|
|
7016
7031
|
get: () => !!ne(M.errors, t)
|
|
@@ -7031,7 +7046,7 @@ function Gn(e) {
|
|
|
7031
7046
|
enumerable: !0,
|
|
7032
7047
|
get: () => ne(M.errors, t)
|
|
7033
7048
|
}
|
|
7034
|
-
}), [M, t]),
|
|
7049
|
+
}), [M, t]), A = ge.useCallback((_) => I.current.onChange({
|
|
7035
7050
|
target: {
|
|
7036
7051
|
value: Va(_),
|
|
7037
7052
|
name: t
|
|
@@ -7055,10 +7070,10 @@ function Gn(e) {
|
|
|
7055
7070
|
name: t,
|
|
7056
7071
|
value: u,
|
|
7057
7072
|
...Pe(r) || M.disabled ? { disabled: M.disabled || r } : {},
|
|
7058
|
-
onChange:
|
|
7073
|
+
onChange: A,
|
|
7059
7074
|
onBlur: F,
|
|
7060
7075
|
ref: N
|
|
7061
|
-
}), [t, r, M.disabled,
|
|
7076
|
+
}), [t, r, M.disabled, A, F, N, u]);
|
|
7062
7077
|
return ge.useEffect(() => {
|
|
7063
7078
|
const _ = i._options.shouldUnregister || s, f = p.current;
|
|
7064
7079
|
f && f !== t && !b && i.unregister(f), i.register(t, {
|
|
@@ -7070,7 +7085,7 @@ function Gn(e) {
|
|
|
7070
7085
|
B && B._f && (B._f.mount = Y);
|
|
7071
7086
|
};
|
|
7072
7087
|
if (T(t, !0), _) {
|
|
7073
|
-
const $ =
|
|
7088
|
+
const $ = Ee(ne(i._options.defaultValues, t, m.current.defaultValue));
|
|
7074
7089
|
Me(i._defaultValues, t, $), xe(ne(i._formValues, t)) && Me(i._formValues, t, $);
|
|
7075
7090
|
}
|
|
7076
7091
|
return !b && i.register(t), p.current = t, () => {
|
|
@@ -7084,13 +7099,13 @@ function Gn(e) {
|
|
|
7084
7099
|
}, [r, t, i]), ge.useMemo(() => ({
|
|
7085
7100
|
field: k,
|
|
7086
7101
|
formState: M,
|
|
7087
|
-
fieldState:
|
|
7088
|
-
}), [k, M,
|
|
7102
|
+
fieldState: E
|
|
7103
|
+
}), [k, M, E]);
|
|
7089
7104
|
}
|
|
7090
7105
|
const Kn = (e) => e.render(Gn(e)), Fa = ge.createContext(null);
|
|
7091
7106
|
Fa.displayName = "HookFormContext";
|
|
7092
7107
|
const Wn = (e) => {
|
|
7093
|
-
const { children: a, watch: t, getValues: r, getFieldState: i, setError: s, clearErrors: l, setValue: c, trigger: b, formState: h, resetField: u, reset: M, handleSubmit: m, unregister: p, control: I, register:
|
|
7108
|
+
const { children: a, watch: t, getValues: r, getFieldState: i, setError: s, clearErrors: l, setValue: c, trigger: b, formState: h, resetField: u, reset: M, handleSubmit: m, unregister: p, control: I, register: E, setFocus: A, subscribe: F } = e;
|
|
7094
7109
|
return ge.createElement(
|
|
7095
7110
|
Fa.Provider,
|
|
7096
7111
|
{ value: ge.useMemo(() => ({
|
|
@@ -7107,8 +7122,8 @@ const Wn = (e) => {
|
|
|
7107
7122
|
handleSubmit: m,
|
|
7108
7123
|
unregister: p,
|
|
7109
7124
|
control: I,
|
|
7110
|
-
register:
|
|
7111
|
-
setFocus:
|
|
7125
|
+
register: E,
|
|
7126
|
+
setFocus: A,
|
|
7112
7127
|
subscribe: F
|
|
7113
7128
|
}), [
|
|
7114
7129
|
l,
|
|
@@ -7117,11 +7132,11 @@ const Wn = (e) => {
|
|
|
7117
7132
|
i,
|
|
7118
7133
|
r,
|
|
7119
7134
|
m,
|
|
7120
|
-
|
|
7135
|
+
E,
|
|
7121
7136
|
M,
|
|
7122
7137
|
u,
|
|
7123
7138
|
s,
|
|
7124
|
-
|
|
7139
|
+
A,
|
|
7125
7140
|
c,
|
|
7126
7141
|
F,
|
|
7127
7142
|
b,
|
|
@@ -7188,9 +7203,9 @@ function Jn(e) {
|
|
|
7188
7203
|
return !1;
|
|
7189
7204
|
return !0;
|
|
7190
7205
|
}
|
|
7191
|
-
function
|
|
7206
|
+
function Ae(e, a) {
|
|
7192
7207
|
const t = Array.isArray(a) ? a : vt(a) ? [a] : Rt(a), r = t.length === 1 ? e : qn(e, t), i = t.length - 1, s = t[i];
|
|
7193
|
-
return r && delete r[s], i !== 0 && (Se(r) && $e(r) || Array.isArray(r) && Jn(r)) &&
|
|
7208
|
+
return r && delete r[s], i !== 0 && (Se(r) && $e(r) || Array.isArray(r) && Jn(r)) && Ae(e, t.slice(0, -1)), e;
|
|
7194
7209
|
}
|
|
7195
7210
|
var Zn = (e) => {
|
|
7196
7211
|
for (const a in e)
|
|
@@ -7201,19 +7216,19 @@ var Zn = (e) => {
|
|
|
7201
7216
|
function za(e) {
|
|
7202
7217
|
return Array.isArray(e) || Se(e) && !Zn(e);
|
|
7203
7218
|
}
|
|
7204
|
-
function
|
|
7219
|
+
function At(e, a = {}) {
|
|
7205
7220
|
for (const t in e) {
|
|
7206
7221
|
const r = e[t];
|
|
7207
|
-
za(r) ? (a[t] = Array.isArray(r) ? [] : {},
|
|
7222
|
+
za(r) ? (a[t] = Array.isArray(r) ? [] : {}, At(r, a[t])) : xe(r) || (a[t] = !0);
|
|
7208
7223
|
}
|
|
7209
7224
|
return a;
|
|
7210
7225
|
}
|
|
7211
7226
|
function Ze(e, a, t) {
|
|
7212
|
-
t || (t =
|
|
7227
|
+
t || (t = At(a));
|
|
7213
7228
|
for (const r in e) {
|
|
7214
7229
|
const i = e[r];
|
|
7215
7230
|
if (za(i))
|
|
7216
|
-
xe(a) ||
|
|
7231
|
+
xe(a) || Et(t[r]) ? t[r] = At(i, Array.isArray(i) ? [] : {}) : Ze(i, Be(a) ? {} : a[r], t[r]);
|
|
7217
7232
|
else {
|
|
7218
7233
|
const s = a[r];
|
|
7219
7234
|
t[r] = !Ue(i, s);
|
|
@@ -7320,7 +7335,7 @@ var tr = (e, a, t, r) => {
|
|
|
7320
7335
|
t(e);
|
|
7321
7336
|
const { name: i, ...s } = e;
|
|
7322
7337
|
return $e(s) || Object.keys(s).length >= Object.keys(a).length || Object.keys(s).find((l) => a[l] === (!r || Oe.all));
|
|
7323
|
-
}, ar = (e, a, t) => !e || !a || e === a || et(e).some((r) => r && (t ? r === a : r.startsWith(a) || a.startsWith(r))), nr = (e, a, t, r, i) => i.isOnAll ? !1 : !t && i.isOnTouch ? !(a || e) : (t ? r.isOnBlur : i.isOnBlur) ? !e : (t ? r.isOnChange : i.isOnChange) ? e : !0, rr = (e, a) => !$t(ne(e, a)).length &&
|
|
7338
|
+
}, ar = (e, a, t) => !e || !a || e === a || et(e).some((r) => r && (t ? r === a : r.startsWith(a) || a.startsWith(r))), nr = (e, a, t, r, i) => i.isOnAll ? !1 : !t && i.isOnTouch ? !(a || e) : (t ? r.isOnBlur : i.isOnBlur) ? !e : (t ? r.isOnChange : i.isOnChange) ? e : !0, rr = (e, a) => !$t(ne(e, a)).length && Ae(e, a), sr = (e, a, t) => {
|
|
7324
7339
|
const r = et(ne(e, t));
|
|
7325
7340
|
return Me(r, "root", a[t]), Me(e, t, r), e;
|
|
7326
7341
|
};
|
|
@@ -7336,14 +7351,14 @@ var Je = (e) => Se(e) && !mt(e) ? e : {
|
|
|
7336
7351
|
value: e,
|
|
7337
7352
|
message: ""
|
|
7338
7353
|
}, oa = async (e, a, t, r, i, s) => {
|
|
7339
|
-
const { ref: l, refs: c, required: b, maxLength: h, minLength: u, min: M, max: m, pattern: p, validate: I, name:
|
|
7340
|
-
if (!F || a.has(
|
|
7354
|
+
const { ref: l, refs: c, required: b, maxLength: h, minLength: u, min: M, max: m, pattern: p, validate: I, name: E, valueAsNumber: A, mount: F } = e._f, N = ne(t, E);
|
|
7355
|
+
if (!F || a.has(E))
|
|
7341
7356
|
return {};
|
|
7342
7357
|
const k = c ? c[0] : l, _ = (O) => {
|
|
7343
7358
|
i && k.reportValidity && (k.setCustomValidity(Pe(O) ? "" : O || ""), k.reportValidity());
|
|
7344
|
-
}, f = {}, T = Ot(l), $ = st(l), Y = T || $, B = (
|
|
7359
|
+
}, f = {}, T = Ot(l), $ = st(l), Y = T || $, B = (A || Ht(l)) && xe(l.value) && xe(N) || pt(l) && l.value === "" || N === "" || Array.isArray(N) && !N.length, V = jn.bind(null, E, r, f), G = (O, W, ae, ue = We.maxLength, te = We.minLength) => {
|
|
7345
7360
|
const X = O ? W : ae;
|
|
7346
|
-
f[
|
|
7361
|
+
f[E] = {
|
|
7347
7362
|
type: O ? ue : te,
|
|
7348
7363
|
message: X,
|
|
7349
7364
|
ref: l,
|
|
@@ -7352,7 +7367,7 @@ var Je = (e) => Se(e) && !mt(e) ? e : {
|
|
|
7352
7367
|
};
|
|
7353
7368
|
if (s ? !Array.isArray(N) || !N.length : b && (!Y && (B || Be(N)) || Pe(N) && !N || $ && !Ba(c).isValid || T && !Ha(c).isValid)) {
|
|
7354
7369
|
const { value: O, message: W } = He(b) ? { value: !!b, message: b } : Je(b);
|
|
7355
|
-
if (O && (f[
|
|
7370
|
+
if (O && (f[E] = {
|
|
7356
7371
|
type: We.required,
|
|
7357
7372
|
message: W,
|
|
7358
7373
|
ref: k,
|
|
@@ -7371,16 +7386,16 @@ var Je = (e) => Se(e) && !mt(e) ? e : {
|
|
|
7371
7386
|
He(ae.value) && N && (O = H ? X(N) > X(ae.value) : K ? N > ae.value : te > new Date(ae.value)), He(ue.value) && N && (W = H ? X(N) < X(ue.value) : K ? N < ue.value : te < new Date(ue.value));
|
|
7372
7387
|
}
|
|
7373
7388
|
if ((O || W) && (G(!!O, ae.message, ue.message, We.max, We.min), !r))
|
|
7374
|
-
return _(f[
|
|
7389
|
+
return _(f[E].message), f;
|
|
7375
7390
|
}
|
|
7376
7391
|
if ((h || u) && !B && (He(N) || s && Array.isArray(N))) {
|
|
7377
7392
|
const O = Je(h), W = Je(u), ae = !Be(O.value) && N.length > +O.value, ue = !Be(W.value) && N.length < +W.value;
|
|
7378
7393
|
if ((ae || ue) && (G(ae, O.message, W.message), !r))
|
|
7379
|
-
return _(f[
|
|
7394
|
+
return _(f[E].message), f;
|
|
7380
7395
|
}
|
|
7381
7396
|
if (p && !B && He(N)) {
|
|
7382
7397
|
const { value: O, message: W } = Je(p);
|
|
7383
|
-
if (mt(O) && !N.match(O) && (f[
|
|
7398
|
+
if (mt(O) && !N.match(O) && (f[E] = {
|
|
7384
7399
|
type: We.pattern,
|
|
7385
7400
|
message: W,
|
|
7386
7401
|
ref: l,
|
|
@@ -7391,7 +7406,7 @@ var Je = (e) => Se(e) && !mt(e) ? e : {
|
|
|
7391
7406
|
if (I) {
|
|
7392
7407
|
if (Re(I)) {
|
|
7393
7408
|
const O = await I(N, t), W = la(O, k);
|
|
7394
|
-
if (W && (f[
|
|
7409
|
+
if (W && (f[E] = {
|
|
7395
7410
|
...W,
|
|
7396
7411
|
...V(We.validate, W.message)
|
|
7397
7412
|
}, !r))
|
|
@@ -7405,9 +7420,9 @@ var Je = (e) => Se(e) && !mt(e) ? e : {
|
|
|
7405
7420
|
ae && (O = {
|
|
7406
7421
|
...ae,
|
|
7407
7422
|
...V(W, ae.message)
|
|
7408
|
-
}, _(ae.message), r && (f[
|
|
7423
|
+
}, _(ae.message), r && (f[E] = O));
|
|
7409
7424
|
}
|
|
7410
|
-
if (!$e(O) && (f[
|
|
7425
|
+
if (!$e(O) && (f[E] = {
|
|
7411
7426
|
ref: k,
|
|
7412
7427
|
...O
|
|
7413
7428
|
}, !r))
|
|
@@ -7440,7 +7455,7 @@ function lr(e = {}) {
|
|
|
7440
7455
|
validatingFields: {},
|
|
7441
7456
|
errors: a.errors || {},
|
|
7442
7457
|
disabled: a.disabled || !1
|
|
7443
|
-
}, r = {}, i = Se(a.defaultValues) || Se(a.values) ?
|
|
7458
|
+
}, r = {}, i = Se(a.defaultValues) || Se(a.values) ? Ee(a.defaultValues || a.values) || {} : {}, s = a.shouldUnregister ? {} : Ee(i), l = {
|
|
7444
7459
|
action: !1,
|
|
7445
7460
|
mount: !1,
|
|
7446
7461
|
watch: !1,
|
|
@@ -7469,9 +7484,9 @@ function lr(e = {}) {
|
|
|
7469
7484
|
const p = {
|
|
7470
7485
|
array: Xt(),
|
|
7471
7486
|
state: Xt()
|
|
7472
|
-
}, I = a.criteriaMode === Oe.all,
|
|
7487
|
+
}, I = a.criteriaMode === Oe.all, E = (o) => (y) => {
|
|
7473
7488
|
clearTimeout(h), h = setTimeout(o, y);
|
|
7474
|
-
},
|
|
7489
|
+
}, A = async (o) => {
|
|
7475
7490
|
if (!l.keepIsValid && !a.disabled && (M.isValid || m.isValid || o)) {
|
|
7476
7491
|
let y;
|
|
7477
7492
|
a.resolver ? (y = $e((await Y()).errors), F()) : y = await V(r, !0), y !== t.isValid && p.state.next({
|
|
@@ -7480,7 +7495,7 @@ function lr(e = {}) {
|
|
|
7480
7495
|
}
|
|
7481
7496
|
}, F = (o, y) => {
|
|
7482
7497
|
!a.disabled && (M.isValidating || M.validatingFields || m.isValidating || m.validatingFields) && ((o || Array.from(c.mount)).forEach((C) => {
|
|
7483
|
-
C && (y ? Me(t.validatingFields, C, y) :
|
|
7498
|
+
C && (y ? Me(t.validatingFields, C, y) : Ae(t.validatingFields, C));
|
|
7484
7499
|
}), p.state.next({
|
|
7485
7500
|
validatingFields: t.validatingFields,
|
|
7486
7501
|
isValidating: !$e(t.validatingFields)
|
|
@@ -7521,7 +7536,7 @@ function lr(e = {}) {
|
|
|
7521
7536
|
const L = ne(r, o);
|
|
7522
7537
|
if (L) {
|
|
7523
7538
|
const z = ne(s, o, xe(C) ? ne(i, o) : C);
|
|
7524
|
-
xe(z) || R && R.defaultChecked || y ? Me(s, o, y ? z : aa(L._f)) : ue(o, z), l.mount && !l.action &&
|
|
7539
|
+
xe(z) || R && R.defaultChecked || y ? Me(s, o, y ? z : aa(L._f)) : ue(o, z), l.mount && !l.action && A();
|
|
7525
7540
|
}
|
|
7526
7541
|
}, T = (o, y, C, R, L) => {
|
|
7527
7542
|
let z = !1, d = !1;
|
|
@@ -7532,7 +7547,7 @@ function lr(e = {}) {
|
|
|
7532
7547
|
if (!C || R) {
|
|
7533
7548
|
(M.isDirty || m.isDirty) && (d = t.isDirty, t.isDirty = D.isDirty = O(), z = d !== D.isDirty);
|
|
7534
7549
|
const x = Ue(ne(i, o), y);
|
|
7535
|
-
d = !!ne(t.dirtyFields, o), x ?
|
|
7550
|
+
d = !!ne(t.dirtyFields, o), x ? Ae(t.dirtyFields, o) : Me(t.dirtyFields, o, !0), D.dirtyFields = t.dirtyFields, z = z || (M.dirtyFields || m.dirtyFields) && d !== !x;
|
|
7536
7551
|
}
|
|
7537
7552
|
if (C) {
|
|
7538
7553
|
const x = ne(t.touchedFields, o);
|
|
@@ -7543,7 +7558,7 @@ function lr(e = {}) {
|
|
|
7543
7558
|
return z ? D : {};
|
|
7544
7559
|
}, $ = (o, y, C, R) => {
|
|
7545
7560
|
const L = ne(t.errors, o), z = (M.isValid || m.isValid) && Pe(y) && t.isValid !== y;
|
|
7546
|
-
if (a.delayError && C ? (b =
|
|
7561
|
+
if (a.delayError && C ? (b = E(() => k(o, C)), b(a.delayError)) : (clearTimeout(h), b = null, C ? Me(t.errors, o, C) : Ae(t.errors, o)), (C ? !Ue(L, C) : L) || !$e(R) || z) {
|
|
7547
7562
|
const d = {
|
|
7548
7563
|
...R,
|
|
7549
7564
|
...z && Pe(y) ? { isValid: y } : {},
|
|
@@ -7560,7 +7575,7 @@ function lr(e = {}) {
|
|
|
7560
7575
|
if (F(o), o)
|
|
7561
7576
|
for (const C of o) {
|
|
7562
7577
|
const R = ne(y, C);
|
|
7563
|
-
R ? Me(t.errors, C, R) :
|
|
7578
|
+
R ? Me(t.errors, C, R) : Ae(t.errors, C);
|
|
7564
7579
|
}
|
|
7565
7580
|
else
|
|
7566
7581
|
t.errors = y;
|
|
@@ -7578,7 +7593,7 @@ function lr(e = {}) {
|
|
|
7578
7593
|
const v = await oa(L, c.disabled, s, I, a.shouldUseNativeValidation && !y, D);
|
|
7579
7594
|
if (x && M.validatingFields && F([z.name]), v[z.name] && (C.valid = !1, y || e.shouldUseNativeValidation))
|
|
7580
7595
|
break;
|
|
7581
|
-
!y && (ne(v, z.name) ? D ? sr(t.errors, v, z.name) : Me(t.errors, z.name, v[z.name]) :
|
|
7596
|
+
!y && (ne(v, z.name) ? D ? sr(t.errors, v, z.name) : Me(t.errors, z.name, v[z.name]) : Ae(t.errors, z.name));
|
|
7582
7597
|
}
|
|
7583
7598
|
!$e(d) && await V(d, y, C);
|
|
7584
7599
|
}
|
|
@@ -7601,7 +7616,7 @@ function lr(e = {}) {
|
|
|
7601
7616
|
(!d.defaultChecked || !d.disabled) && (Array.isArray(L) ? d.checked = !!L.find((D) => D === d.value) : d.checked = L === d.value || !!L);
|
|
7602
7617
|
}) : z.refs.forEach((d) => d.checked = d.value === L) : Ht(z.ref) ? z.ref.value = "" : (z.ref.value = L, z.ref.type || p.state.next({
|
|
7603
7618
|
name: o,
|
|
7604
|
-
values:
|
|
7619
|
+
values: Ee(s)
|
|
7605
7620
|
})));
|
|
7606
7621
|
}
|
|
7607
7622
|
(C.shouldDirty || C.shouldTouch) && T(o, L, C.shouldTouch, C.shouldDirty, !0), C.shouldValidate && P(o);
|
|
@@ -7613,10 +7628,10 @@ function lr(e = {}) {
|
|
|
7613
7628
|
(c.array.has(o) || Se(L) || d && !d._f) && !qe(L) ? te(z, L, C) : ue(z, L, C);
|
|
7614
7629
|
}
|
|
7615
7630
|
}, X = (o, y, C = {}) => {
|
|
7616
|
-
const R = ne(r, o), L = c.array.has(o), z =
|
|
7631
|
+
const R = ne(r, o), L = c.array.has(o), z = Ee(y);
|
|
7617
7632
|
Me(s, o, z), L ? (p.array.next({
|
|
7618
7633
|
name: o,
|
|
7619
|
-
values:
|
|
7634
|
+
values: Ee(s)
|
|
7620
7635
|
}), (M.isDirty || M.dirtyFields || m.isDirty || m.dirtyFields) && C.shouldDirty && p.state.next({
|
|
7621
7636
|
name: o,
|
|
7622
7637
|
dirtyFields: Ze(i, s),
|
|
@@ -7624,10 +7639,10 @@ function lr(e = {}) {
|
|
|
7624
7639
|
})) : R && !R._f && !Be(z) ? te(o, z, C) : ue(o, z, C), sa(o, c) ? p.state.next({
|
|
7625
7640
|
...t,
|
|
7626
7641
|
name: o,
|
|
7627
|
-
values:
|
|
7642
|
+
values: Ee(s)
|
|
7628
7643
|
}) : p.state.next({
|
|
7629
7644
|
name: l.mount ? o : void 0,
|
|
7630
|
-
values:
|
|
7645
|
+
values: Ee(s)
|
|
7631
7646
|
});
|
|
7632
7647
|
}, H = async (o) => {
|
|
7633
7648
|
l.mount = !0;
|
|
@@ -7644,9 +7659,9 @@ function lr(e = {}) {
|
|
|
7644
7659
|
if (!U && p.state.next({
|
|
7645
7660
|
name: C,
|
|
7646
7661
|
type: o.type,
|
|
7647
|
-
values:
|
|
7662
|
+
values: Ee(s)
|
|
7648
7663
|
}), re)
|
|
7649
|
-
return (M.isValid || m.isValid) && (a.mode === "onBlur" ? U &&
|
|
7664
|
+
return (M.isValid || m.isValid) && (a.mode === "onBlur" ? U && A() : U || A()), De && p.state.next({ name: C, ...de ? {} : ye });
|
|
7650
7665
|
if (!U && de && p.state.next({ ...t }), a.resolver) {
|
|
7651
7666
|
const { errors: je } = await Y([C]);
|
|
7652
7667
|
if (F([C]), z(g), R) {
|
|
@@ -7669,7 +7684,7 @@ function lr(e = {}) {
|
|
|
7669
7684
|
} else o ? (R = (await Promise.all(L.map(async (z) => {
|
|
7670
7685
|
const d = ne(r, z);
|
|
7671
7686
|
return await V(d && d._f ? { [z]: d } : d);
|
|
7672
|
-
}))).every(Boolean), !(!R && !t.isValid) &&
|
|
7687
|
+
}))).every(Boolean), !(!R && !t.isValid) && A()) : R = C = await V(r);
|
|
7673
7688
|
return p.state.next({
|
|
7674
7689
|
...!He(o) || (M.isValid || m.isValid) && C !== t.isValid ? {} : { name: o },
|
|
7675
7690
|
...a.resolver || !o ? { isValid: C } : {},
|
|
@@ -7687,7 +7702,7 @@ function lr(e = {}) {
|
|
|
7687
7702
|
isValidating: !!ne(t.validatingFields, o),
|
|
7688
7703
|
isTouched: !!ne((y || t).touchedFields, o)
|
|
7689
7704
|
}), j = (o) => {
|
|
7690
|
-
o && et(o).forEach((y) =>
|
|
7705
|
+
o && et(o).forEach((y) => Ae(t.errors, y)), p.state.next({
|
|
7691
7706
|
errors: o ? t.errors : {}
|
|
7692
7707
|
});
|
|
7693
7708
|
}, Q = (o, y, C) => {
|
|
@@ -7723,17 +7738,17 @@ function lr(e = {}) {
|
|
|
7723
7738
|
}
|
|
7724
7739
|
})), ie = (o, y = {}) => {
|
|
7725
7740
|
for (const C of o ? et(o) : c.mount)
|
|
7726
|
-
c.mount.delete(C), c.array.delete(C), y.keepValue || (
|
|
7741
|
+
c.mount.delete(C), c.array.delete(C), y.keepValue || (Ae(r, C), Ae(s, C)), !y.keepError && Ae(t.errors, C), !y.keepDirty && Ae(t.dirtyFields, C), !y.keepTouched && Ae(t.touchedFields, C), !y.keepIsValidating && Ae(t.validatingFields, C), !a.shouldUnregister && !y.keepDefaultValue && Ae(i, C);
|
|
7727
7742
|
p.state.next({
|
|
7728
|
-
values:
|
|
7743
|
+
values: Ee(s)
|
|
7729
7744
|
}), p.state.next({
|
|
7730
7745
|
...t,
|
|
7731
7746
|
...y.keepDirty ? { isDirty: O() } : {}
|
|
7732
|
-
}), !y.keepIsValid &&
|
|
7747
|
+
}), !y.keepIsValid && A();
|
|
7733
7748
|
}, J = ({ disabled: o, name: y }) => {
|
|
7734
7749
|
if (Pe(o) && l.mount || o || c.disabled.has(y)) {
|
|
7735
7750
|
const L = c.disabled.has(y) !== !!o;
|
|
7736
|
-
o ? c.disabled.add(y) : c.disabled.delete(y), L && l.mount && !l.action &&
|
|
7751
|
+
o ? c.disabled.add(y) : c.disabled.delete(y), L && l.mount && !l.action && A();
|
|
7737
7752
|
}
|
|
7738
7753
|
}, he = (o, y = {}) => {
|
|
7739
7754
|
let C = ne(r, o);
|
|
@@ -7795,18 +7810,18 @@ function lr(e = {}) {
|
|
|
7795
7810
|
}, pe = (o, y) => async (C) => {
|
|
7796
7811
|
let R;
|
|
7797
7812
|
C && (C.preventDefault && C.preventDefault(), C.persist && C.persist());
|
|
7798
|
-
let L =
|
|
7813
|
+
let L = Ee(s);
|
|
7799
7814
|
if (p.state.next({
|
|
7800
7815
|
isSubmitting: !0
|
|
7801
7816
|
}), a.resolver) {
|
|
7802
7817
|
const { errors: z, values: d } = await Y();
|
|
7803
|
-
F(), t.errors = z, L =
|
|
7818
|
+
F(), t.errors = z, L = Ee(d);
|
|
7804
7819
|
} else
|
|
7805
7820
|
await V(r);
|
|
7806
7821
|
if (c.disabled.size)
|
|
7807
7822
|
for (const z of c.disabled)
|
|
7808
|
-
|
|
7809
|
-
if (
|
|
7823
|
+
Ae(L, z);
|
|
7824
|
+
if (Ae(t.errors, "root"), $e(t.errors)) {
|
|
7810
7825
|
p.state.next({
|
|
7811
7826
|
errors: {}
|
|
7812
7827
|
});
|
|
@@ -7826,9 +7841,9 @@ function lr(e = {}) {
|
|
|
7826
7841
|
}), R)
|
|
7827
7842
|
throw R;
|
|
7828
7843
|
}, Ce = (o, y = {}) => {
|
|
7829
|
-
ne(r, o) && (xe(y.defaultValue) ? X(o,
|
|
7844
|
+
ne(r, o) && (xe(y.defaultValue) ? X(o, Ee(ne(i, o))) : (X(o, y.defaultValue), Me(i, o, Ee(y.defaultValue))), y.keepTouched || Ae(t.touchedFields, o), y.keepDirty || (Ae(t.dirtyFields, o), t.isDirty = y.defaultValue ? O(o, Ee(ne(i, o))) : O()), y.keepError || (Ae(t.errors, o), M.isValid && A()), p.state.next({ ...t }));
|
|
7830
7845
|
}, be = (o, y = {}) => {
|
|
7831
|
-
const C = o ?
|
|
7846
|
+
const C = o ? Ee(o) : i, R = Ee(C), L = $e(o), z = L ? i : R;
|
|
7832
7847
|
if (y.keepDefaultValues || (i = C), !y.keepValues) {
|
|
7833
7848
|
if (y.keepDirtyValues) {
|
|
7834
7849
|
const d = /* @__PURE__ */ new Set([
|
|
@@ -7860,7 +7875,7 @@ function lr(e = {}) {
|
|
|
7860
7875
|
else
|
|
7861
7876
|
r = {};
|
|
7862
7877
|
}
|
|
7863
|
-
s = a.shouldUnregister ? y.keepDefaultValues ?
|
|
7878
|
+
s = a.shouldUnregister ? y.keepDefaultValues ? Ee(i) : {} : Ee(z), p.array.next({
|
|
7864
7879
|
values: { ...z }
|
|
7865
7880
|
}), p.state.next({
|
|
7866
7881
|
values: { ...z }
|
|
@@ -7911,7 +7926,7 @@ function lr(e = {}) {
|
|
|
7911
7926
|
_focusError: ve,
|
|
7912
7927
|
_getWatch: W,
|
|
7913
7928
|
_getDirty: O,
|
|
7914
|
-
_setValid:
|
|
7929
|
+
_setValid: A,
|
|
7915
7930
|
_setFieldArray: N,
|
|
7916
7931
|
_setDisabledField: J,
|
|
7917
7932
|
_setErrors: _,
|
|
@@ -8105,8 +8120,8 @@ function ca({
|
|
|
8105
8120
|
disabledFutureYear: m = !1,
|
|
8106
8121
|
disabledYearBefore: p,
|
|
8107
8122
|
disabledYearAfter: I,
|
|
8108
|
-
showIcon:
|
|
8109
|
-
showClearButton:
|
|
8123
|
+
showIcon: E = !1,
|
|
8124
|
+
showClearButton: A = !1,
|
|
8110
8125
|
onClear: F,
|
|
8111
8126
|
size: N = "md"
|
|
8112
8127
|
}) {
|
|
@@ -8247,9 +8262,9 @@ function ca({
|
|
|
8247
8262
|
J.key === "Enter" || J.key === " " ? (J.preventDefault(), q()) : J.key === "Escape" && $ && (J.preventDefault(), j());
|
|
8248
8263
|
},
|
|
8249
8264
|
children: [
|
|
8250
|
-
|
|
8265
|
+
E && /* @__PURE__ */ n(Ut, { size: 16, className: "ina-year-picker__icon" }),
|
|
8251
8266
|
/* @__PURE__ */ n("span", { className: "ina-year-picker__trigger-text", children: k }),
|
|
8252
|
-
|
|
8267
|
+
A && (e !== void 0 || a !== void 0) && /* @__PURE__ */ n(
|
|
8253
8268
|
"button",
|
|
8254
8269
|
{
|
|
8255
8270
|
type: "button",
|
|
@@ -8413,8 +8428,8 @@ function da({
|
|
|
8413
8428
|
disabledMonthAfter: m,
|
|
8414
8429
|
showIcon: p = !1,
|
|
8415
8430
|
showClearButton: I = !1,
|
|
8416
|
-
onClear:
|
|
8417
|
-
size:
|
|
8431
|
+
onClear: E,
|
|
8432
|
+
size: A = "md"
|
|
8418
8433
|
}) {
|
|
8419
8434
|
const F = Fe(() => b === "id" ? [
|
|
8420
8435
|
"Jan",
|
|
@@ -8469,9 +8484,9 @@ function da({
|
|
|
8469
8484
|
_(!1), c == null || c(!1);
|
|
8470
8485
|
}, [c]), H = me(
|
|
8471
8486
|
(q) => {
|
|
8472
|
-
q.stopPropagation(),
|
|
8487
|
+
q.stopPropagation(), E ? E() : t == null || t((/* @__PURE__ */ new Date()).getMonth());
|
|
8473
8488
|
},
|
|
8474
|
-
[
|
|
8489
|
+
[E, t]
|
|
8475
8490
|
);
|
|
8476
8491
|
oe(() => {
|
|
8477
8492
|
if (k && O.current) {
|
|
@@ -8516,7 +8531,7 @@ function da({
|
|
|
8516
8531
|
}, [k, X]);
|
|
8517
8532
|
const K = S("ina-month-picker", r), P = S(
|
|
8518
8533
|
"ina-month-picker__trigger",
|
|
8519
|
-
`ina-month-picker__trigger--size-${
|
|
8534
|
+
`ina-month-picker__trigger--size-${A}`,
|
|
8520
8535
|
i && "ina-month-picker__trigger--disabled",
|
|
8521
8536
|
s && "ina-month-picker__trigger--readonly"
|
|
8522
8537
|
), se = S(
|
|
@@ -8678,31 +8693,31 @@ const Oa = [
|
|
|
8678
8693
|
if (!e) return null;
|
|
8679
8694
|
const t = ["/", "-", ".", " "];
|
|
8680
8695
|
let r = [], i = "";
|
|
8681
|
-
for (const
|
|
8682
|
-
if (e.includes(
|
|
8683
|
-
r = e.split(
|
|
8696
|
+
for (const A of t)
|
|
8697
|
+
if (e.includes(A)) {
|
|
8698
|
+
r = e.split(A), i = A;
|
|
8684
8699
|
break;
|
|
8685
8700
|
}
|
|
8686
8701
|
if (r.length !== 3)
|
|
8687
8702
|
return null;
|
|
8688
8703
|
const s = a.split(i || "/");
|
|
8689
8704
|
let l = -1, c = -1, b = -1;
|
|
8690
|
-
if (s.forEach((
|
|
8691
|
-
|
|
8705
|
+
if (s.forEach((A, F) => {
|
|
8706
|
+
A.includes("dd") || A.includes("DD") ? l = F : A.includes("MM") && !A.includes("MMM") ? c = F : A.includes("yyyy") || A.includes("YYYY") ? b = F : (A.includes("MMMM") || A.includes("MMM")) && (c = F);
|
|
8692
8707
|
}), l === -1 || c === -1 || b === -1) {
|
|
8693
|
-
const
|
|
8708
|
+
const A = parseInt(r[0], 10), F = parseInt(r[1], 10) - 1, N = parseInt(r[2], 10), k = new Date(N, F, A);
|
|
8694
8709
|
return isNaN(k.getTime()) ? null : k;
|
|
8695
8710
|
}
|
|
8696
8711
|
const h = parseInt(r[l], 10), u = parseInt(r[b], 10);
|
|
8697
8712
|
let M;
|
|
8698
8713
|
const m = r[c], p = Oa.findIndex(
|
|
8699
|
-
(
|
|
8714
|
+
(A) => A.toLowerCase() === m.toLowerCase()
|
|
8700
8715
|
), I = Ua.findIndex(
|
|
8701
|
-
(
|
|
8716
|
+
(A) => A.toLowerCase() === m.toLowerCase()
|
|
8702
8717
|
);
|
|
8703
8718
|
p !== -1 ? M = p : I !== -1 ? M = I : M = parseInt(m, 10) - 1;
|
|
8704
|
-
const
|
|
8705
|
-
return isNaN(
|
|
8719
|
+
const E = new Date(u, M, h);
|
|
8720
|
+
return isNaN(E.getTime()) ? null : E;
|
|
8706
8721
|
}, Le = (e, a) => e.getDate() === a.getDate() && e.getMonth() === a.getMonth() && e.getFullYear() === a.getFullYear(), ua = (e, a) => a.some((t) => Le(t, e)), fa = ["Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"];
|
|
8707
8722
|
function ks({
|
|
8708
8723
|
mode: e = "range",
|
|
@@ -8720,8 +8735,8 @@ function ks({
|
|
|
8720
8735
|
disabledFutureDate: m = !1,
|
|
8721
8736
|
disabledDateBefore: p,
|
|
8722
8737
|
disabledDateAfter: I,
|
|
8723
|
-
disabled:
|
|
8724
|
-
readonly:
|
|
8738
|
+
disabled: E = !1,
|
|
8739
|
+
readonly: A = !1,
|
|
8725
8740
|
size: F = "md",
|
|
8726
8741
|
label: N,
|
|
8727
8742
|
required: k,
|
|
@@ -9171,7 +9186,7 @@ function ks({
|
|
|
9171
9186
|
ref: P,
|
|
9172
9187
|
className: S(
|
|
9173
9188
|
"ina-date-picker",
|
|
9174
|
-
|
|
9189
|
+
E && "ina-date-picker--disabled",
|
|
9175
9190
|
_ && "ina-date-picker--panel-only",
|
|
9176
9191
|
l
|
|
9177
9192
|
),
|
|
@@ -9188,7 +9203,7 @@ function ks({
|
|
|
9188
9203
|
ref: se,
|
|
9189
9204
|
type: "button",
|
|
9190
9205
|
onClick: () => {
|
|
9191
|
-
|
|
9206
|
+
E || A || (f || document.querySelectorAll(".ina-date-picker").forEach((D) => {
|
|
9192
9207
|
if (D !== P.current) {
|
|
9193
9208
|
const x = new CustomEvent("closeDatePicker", {
|
|
9194
9209
|
detail: { exclude: P.current }
|
|
@@ -9200,15 +9215,15 @@ function ks({
|
|
|
9200
9215
|
className: S(
|
|
9201
9216
|
"ina-date-picker__trigger",
|
|
9202
9217
|
`ina-date-picker__trigger--size-${F}`,
|
|
9203
|
-
|
|
9204
|
-
|
|
9218
|
+
E && "ina-date-picker__trigger--disabled",
|
|
9219
|
+
A && "ina-date-picker__trigger--readonly",
|
|
9205
9220
|
u
|
|
9206
9221
|
),
|
|
9207
9222
|
id: K.current,
|
|
9208
9223
|
"aria-haspopup": "grid",
|
|
9209
9224
|
"aria-expanded": f,
|
|
9210
9225
|
style: { width: ue },
|
|
9211
|
-
disabled:
|
|
9226
|
+
disabled: E,
|
|
9212
9227
|
children: [
|
|
9213
9228
|
/* @__PURE__ */ n(Ut, { size: 20, className: "ina-date-picker__trigger-icon" }),
|
|
9214
9229
|
/* @__PURE__ */ n(
|
|
@@ -9224,7 +9239,7 @@ function ks({
|
|
|
9224
9239
|
]
|
|
9225
9240
|
}
|
|
9226
9241
|
),
|
|
9227
|
-
we() && !
|
|
9242
|
+
we() && !E && !A && /* @__PURE__ */ n(
|
|
9228
9243
|
"button",
|
|
9229
9244
|
{
|
|
9230
9245
|
type: "button",
|
|
@@ -9240,7 +9255,7 @@ function ks({
|
|
|
9240
9255
|
}
|
|
9241
9256
|
)
|
|
9242
9257
|
] }),
|
|
9243
|
-
(f || _) && !
|
|
9258
|
+
(f || _) && !E && !A && /* @__PURE__ */ n(
|
|
9244
9259
|
"div",
|
|
9245
9260
|
{
|
|
9246
9261
|
ref: q,
|
|
@@ -9305,8 +9320,8 @@ function ks({
|
|
|
9305
9320
|
value: $.getMonth(),
|
|
9306
9321
|
onChange: (d) => Ce(d),
|
|
9307
9322
|
locale: "id",
|
|
9308
|
-
disabled:
|
|
9309
|
-
readonly:
|
|
9323
|
+
disabled: E,
|
|
9324
|
+
readonly: A,
|
|
9310
9325
|
size: "sm"
|
|
9311
9326
|
}
|
|
9312
9327
|
) }),
|
|
@@ -9321,8 +9336,8 @@ function ks({
|
|
|
9321
9336
|
minYear: 1900,
|
|
9322
9337
|
maxYear: 2100,
|
|
9323
9338
|
decadeSize: 20,
|
|
9324
|
-
disabled:
|
|
9325
|
-
readonly:
|
|
9339
|
+
disabled: E,
|
|
9340
|
+
readonly: A,
|
|
9326
9341
|
size: "sm"
|
|
9327
9342
|
}
|
|
9328
9343
|
) })
|
|
@@ -9428,8 +9443,8 @@ function ks({
|
|
|
9428
9443
|
value: B.getMonth(),
|
|
9429
9444
|
onChange: (d) => Ce(d, !0),
|
|
9430
9445
|
locale: "id",
|
|
9431
|
-
disabled:
|
|
9432
|
-
readonly:
|
|
9446
|
+
disabled: E,
|
|
9447
|
+
readonly: A,
|
|
9433
9448
|
size: "sm"
|
|
9434
9449
|
}
|
|
9435
9450
|
) }),
|
|
@@ -9444,8 +9459,8 @@ function ks({
|
|
|
9444
9459
|
minYear: 1900,
|
|
9445
9460
|
maxYear: 2100,
|
|
9446
9461
|
decadeSize: 20,
|
|
9447
|
-
disabled:
|
|
9448
|
-
readonly:
|
|
9462
|
+
disabled: E,
|
|
9463
|
+
readonly: A,
|
|
9449
9464
|
size: "sm"
|
|
9450
9465
|
}
|
|
9451
9466
|
) })
|
|
@@ -9543,15 +9558,15 @@ function Ns({
|
|
|
9543
9558
|
(m, p) => {
|
|
9544
9559
|
if (s) return;
|
|
9545
9560
|
const I = t.filter(
|
|
9546
|
-
(
|
|
9561
|
+
(E) => E.rowId !== m
|
|
9547
9562
|
);
|
|
9548
9563
|
I.push({ rowId: m, columnId: p }), r == null || r(I);
|
|
9549
9564
|
},
|
|
9550
9565
|
[t, r, s]
|
|
9551
9566
|
), u = me(
|
|
9552
9567
|
(m) => {
|
|
9553
|
-
const { name: p, value: I } = m.target,
|
|
9554
|
-
h(
|
|
9568
|
+
const { name: p, value: I } = m.target, E = p.replace(`${l}-`, "");
|
|
9569
|
+
h(E, I);
|
|
9555
9570
|
},
|
|
9556
9571
|
[l, h]
|
|
9557
9572
|
), M = me(
|
|
@@ -9623,18 +9638,18 @@ function Cs({
|
|
|
9623
9638
|
color: M,
|
|
9624
9639
|
...m
|
|
9625
9640
|
}) {
|
|
9626
|
-
const p = e !== void 0, [I,
|
|
9641
|
+
const p = e !== void 0, [I, E] = Z(a), A = p ? e : I, F = me(
|
|
9627
9642
|
(T) => {
|
|
9628
9643
|
if (t) return;
|
|
9629
9644
|
const $ = T.target.checked;
|
|
9630
|
-
p ||
|
|
9645
|
+
p || E($), i && i($);
|
|
9631
9646
|
},
|
|
9632
9647
|
[t, i, p]
|
|
9633
9648
|
), N = S(
|
|
9634
9649
|
"ina-toggle",
|
|
9635
9650
|
`ina-toggle--size-${r}`,
|
|
9636
9651
|
{
|
|
9637
|
-
"ina-toggle--checked":
|
|
9652
|
+
"ina-toggle--checked": A,
|
|
9638
9653
|
"ina-toggle--disabled": t
|
|
9639
9654
|
},
|
|
9640
9655
|
s
|
|
@@ -9642,17 +9657,17 @@ function Cs({
|
|
|
9642
9657
|
"ina-toggle__track",
|
|
9643
9658
|
`ina-toggle__track--size-${r}`,
|
|
9644
9659
|
{
|
|
9645
|
-
"ina-toggle__track--checked":
|
|
9660
|
+
"ina-toggle__track--checked": A,
|
|
9646
9661
|
"ina-toggle__track--disabled": t
|
|
9647
9662
|
}
|
|
9648
9663
|
), _ = S(
|
|
9649
9664
|
"ina-toggle__thumb",
|
|
9650
9665
|
`ina-toggle__thumb--size-${r}`,
|
|
9651
9666
|
{
|
|
9652
|
-
"ina-toggle__thumb--checked":
|
|
9667
|
+
"ina-toggle__thumb--checked": A,
|
|
9653
9668
|
"ina-toggle__thumb--disabled": t
|
|
9654
9669
|
}
|
|
9655
|
-
), f =
|
|
9670
|
+
), f = A && M && !t ? { backgroundColor: M, borderColor: M } : {};
|
|
9656
9671
|
return /* @__PURE__ */ w("div", { className: N, children: [
|
|
9657
9672
|
/* @__PURE__ */ n(
|
|
9658
9673
|
"input",
|
|
@@ -9662,7 +9677,7 @@ function Cs({
|
|
|
9662
9677
|
id: b,
|
|
9663
9678
|
name: h,
|
|
9664
9679
|
value: u,
|
|
9665
|
-
checked:
|
|
9680
|
+
checked: A,
|
|
9666
9681
|
disabled: t,
|
|
9667
9682
|
onChange: F,
|
|
9668
9683
|
"aria-label": l,
|
|
@@ -9697,7 +9712,7 @@ function Ms({
|
|
|
9697
9712
|
var k;
|
|
9698
9713
|
const [m, p] = Z(
|
|
9699
9714
|
t || ((k = e[0]) == null ? void 0 : k.value) || ""
|
|
9700
|
-
), I = a !== void 0 ? a : m,
|
|
9715
|
+
), I = a !== void 0 ? a : m, E = le([]), A = me(
|
|
9701
9716
|
(_, f) => {
|
|
9702
9717
|
b || f || (a === void 0 && p(_), r == null || r(_));
|
|
9703
9718
|
},
|
|
@@ -9728,7 +9743,7 @@ function Ms({
|
|
|
9728
9743
|
return /* @__PURE__ */ n(
|
|
9729
9744
|
"button",
|
|
9730
9745
|
{
|
|
9731
|
-
ref: (B) =>
|
|
9746
|
+
ref: (B) => E.current[f] = B,
|
|
9732
9747
|
type: "button",
|
|
9733
9748
|
role: "tab",
|
|
9734
9749
|
"aria-selected": T,
|
|
@@ -9736,21 +9751,21 @@ function Ms({
|
|
|
9736
9751
|
disabled: $,
|
|
9737
9752
|
tabIndex: T ? 0 : -1,
|
|
9738
9753
|
className: Y,
|
|
9739
|
-
onClick: () =>
|
|
9754
|
+
onClick: () => A(_.value, _.disabled),
|
|
9740
9755
|
onKeyDown: (B) => {
|
|
9741
9756
|
var G, O;
|
|
9742
9757
|
if ($) return;
|
|
9743
9758
|
let V;
|
|
9744
9759
|
if (B.key === "Enter" || B.key === " ")
|
|
9745
|
-
B.preventDefault(),
|
|
9760
|
+
B.preventDefault(), A(_.value, _.disabled);
|
|
9746
9761
|
else if (B.key === "ArrowRight") {
|
|
9747
9762
|
for (B.preventDefault(), V = (f + 1) % e.length; e[V].disabled && V !== f; )
|
|
9748
9763
|
V = (V + 1) % e.length;
|
|
9749
|
-
(G =
|
|
9764
|
+
(G = E.current[V]) == null || G.focus();
|
|
9750
9765
|
} else if (B.key === "ArrowLeft") {
|
|
9751
9766
|
for (B.preventDefault(), V = (f - 1 + e.length) % e.length; e[V].disabled && V !== f; )
|
|
9752
9767
|
V = (V - 1 + e.length) % e.length;
|
|
9753
|
-
(O =
|
|
9768
|
+
(O = E.current[V]) == null || O.focus();
|
|
9754
9769
|
}
|
|
9755
9770
|
},
|
|
9756
9771
|
children: _.label
|
|
@@ -9776,7 +9791,7 @@ function xs({
|
|
|
9776
9791
|
var _;
|
|
9777
9792
|
const [m, p] = Z(
|
|
9778
9793
|
t || ((_ = e[0]) == null ? void 0 : _.value) || ""
|
|
9779
|
-
), I = a !== void 0 ? a : m,
|
|
9794
|
+
), I = a !== void 0 ? a : m, E = le([]), A = me(
|
|
9780
9795
|
(f, T) => {
|
|
9781
9796
|
c || T || (a === void 0 && p(f), r == null || r(f));
|
|
9782
9797
|
},
|
|
@@ -9806,7 +9821,7 @@ function xs({
|
|
|
9806
9821
|
return /* @__PURE__ */ n(
|
|
9807
9822
|
"button",
|
|
9808
9823
|
{
|
|
9809
|
-
ref: (V) =>
|
|
9824
|
+
ref: (V) => E.current[T] = V,
|
|
9810
9825
|
type: "button",
|
|
9811
9826
|
role: "tab",
|
|
9812
9827
|
"aria-selected": $,
|
|
@@ -9814,21 +9829,21 @@ function xs({
|
|
|
9814
9829
|
disabled: Y,
|
|
9815
9830
|
tabIndex: $ ? 0 : -1,
|
|
9816
9831
|
className: B,
|
|
9817
|
-
onClick: () =>
|
|
9832
|
+
onClick: () => A(f.value, f.disabled),
|
|
9818
9833
|
onKeyDown: (V) => {
|
|
9819
9834
|
var O, W;
|
|
9820
9835
|
if (Y) return;
|
|
9821
9836
|
let G;
|
|
9822
9837
|
if (V.key === "Enter" || V.key === " ")
|
|
9823
|
-
V.preventDefault(),
|
|
9838
|
+
V.preventDefault(), A(f.value, f.disabled);
|
|
9824
9839
|
else if (V.key === "ArrowDown") {
|
|
9825
9840
|
for (V.preventDefault(), G = (T + 1) % e.length; e[G].disabled && G !== T; )
|
|
9826
9841
|
G = (G + 1) % e.length;
|
|
9827
|
-
(O =
|
|
9842
|
+
(O = E.current[G]) == null || O.focus();
|
|
9828
9843
|
} else if (V.key === "ArrowUp") {
|
|
9829
9844
|
for (V.preventDefault(), G = (T - 1 + e.length) % e.length; e[G].disabled && G !== T; )
|
|
9830
9845
|
G = (G - 1 + e.length) % e.length;
|
|
9831
|
-
(W =
|
|
9846
|
+
(W = E.current[G]) == null || W.focus();
|
|
9832
9847
|
}
|
|
9833
9848
|
},
|
|
9834
9849
|
children: f.label
|
|
@@ -9861,10 +9876,10 @@ function Is() {
|
|
|
9861
9876
|
function Ga(e) {
|
|
9862
9877
|
gt.includes(e) ? Ke = { name: e } : Ke = { name: "default" }, Gt();
|
|
9863
9878
|
}
|
|
9864
|
-
function
|
|
9879
|
+
function Es(e) {
|
|
9865
9880
|
Ke = e, Gt();
|
|
9866
9881
|
}
|
|
9867
|
-
function
|
|
9882
|
+
function As() {
|
|
9868
9883
|
return Ke;
|
|
9869
9884
|
}
|
|
9870
9885
|
function Ss() {
|
|
@@ -9916,9 +9931,9 @@ function Ts(e) {
|
|
|
9916
9931
|
typeof window < "u" && dr();
|
|
9917
9932
|
export {
|
|
9918
9933
|
Ca as ALLOWED_MIME_TYPES,
|
|
9919
|
-
|
|
9934
|
+
Ar as Accordion,
|
|
9920
9935
|
Sr as AccordionCard,
|
|
9921
|
-
|
|
9936
|
+
Er as AccordionGroup,
|
|
9922
9937
|
Ya as ActionDropdown,
|
|
9923
9938
|
Vr as Alert,
|
|
9924
9939
|
Tr as Avatar,
|
|
@@ -9935,7 +9950,7 @@ export {
|
|
|
9935
9950
|
Hr as Chip,
|
|
9936
9951
|
Pr as CircleProgressBar,
|
|
9937
9952
|
Or as Collapse,
|
|
9938
|
-
|
|
9953
|
+
Ea as ConfirmationContext,
|
|
9939
9954
|
vs as ConfirmationProvider,
|
|
9940
9955
|
jt as DANGEROUS_MIME_TYPES,
|
|
9941
9956
|
Da as DEFAULT_SECURITY_CONFIG,
|
|
@@ -9975,11 +9990,11 @@ export {
|
|
|
9975
9990
|
ds as Table,
|
|
9976
9991
|
Nn as TableProgressBar,
|
|
9977
9992
|
us as TextArea,
|
|
9978
|
-
|
|
9993
|
+
En as TextField,
|
|
9979
9994
|
ms as ThemeToggle,
|
|
9980
9995
|
Tn as TimePicker,
|
|
9981
9996
|
$n as Toast,
|
|
9982
|
-
|
|
9997
|
+
Aa as ToastContext,
|
|
9983
9998
|
ys as ToastProvider,
|
|
9984
9999
|
Cs as Toggle,
|
|
9985
10000
|
ps as Tooltip,
|
|
@@ -9995,7 +10010,7 @@ export {
|
|
|
9995
10010
|
Ss as getAvailableBrands,
|
|
9996
10011
|
Zr as getCookie,
|
|
9997
10012
|
Qr as getCurrentLocation,
|
|
9998
|
-
|
|
10013
|
+
As as getCurrentTheme,
|
|
9999
10014
|
Dn as getFlag,
|
|
10000
10015
|
Ds as getThemeMode,
|
|
10001
10016
|
mr as iddsColorTokens,
|
|
@@ -10013,7 +10028,7 @@ export {
|
|
|
10013
10028
|
dt as sanitizeFileName,
|
|
10014
10029
|
cn as sanitizeInput,
|
|
10015
10030
|
Ga as setBrandTheme,
|
|
10016
|
-
|
|
10031
|
+
Es as setCustomTheme,
|
|
10017
10032
|
St as setThemeMode,
|
|
10018
10033
|
Is as toggleThemeMode,
|
|
10019
10034
|
ja as useAccordionGroup,
|