@starasia/admin 1.4.2 → 1.4.3

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
@@ -20,9 +20,9 @@ import { searchParamsToObject as kA } from "@starasia/http";
20
20
  export * from "@starasia/http";
21
21
  import { Input as EA } from "@starasia/input";
22
22
  export * from "@starasia/input";
23
- import { Menu as ce, MenuButton as LA, MenuLists as ge, MenuHeading as Se, MenuBody as se, MenuFooter as Le } from "@starasia/menu";
23
+ import { Menu as ce, MenuButton as bA, MenuLists as ge, MenuHeading as Se, MenuBody as se, MenuFooter as be } from "@starasia/menu";
24
24
  export * from "@starasia/menu";
25
- import { Pagination as be } from "@starasia/pagination";
25
+ import { Pagination as Le } from "@starasia/pagination";
26
26
  export * from "@starasia/pagination";
27
27
  export * from "@starasia/storage";
28
28
  import { Tr as uA, Td as BA, Table as ae, Thead as Ge, Th as VA, Tbody as Oe } from "@starasia/table";
@@ -54,7 +54,7 @@ export * from "@starasia/story-record";
54
54
  import { Skeleton as sA } from "@starasia/skeleton";
55
55
  export * from "@starasia/skeleton";
56
56
  import { jsx as A, jsxs as s, Fragment as U } from "react/jsx-runtime";
57
- import aA, { createContext as Be, useState as L, useContext as we, useCallback as QA, useMemo as cA, memo as AA, useEffect as R, useRef as iA, useLayoutEffect as qA, isValidElement as de, forwardRef as RA, Children as Ne, useImperativeHandle as ze } from "react";
57
+ import aA, { createContext as Be, useState as b, useContext as we, useCallback as QA, useMemo as cA, memo as AA, useEffect as R, useRef as iA, useLayoutEffect as qA, isValidElement as de, forwardRef as RA, Children as Ne, useImperativeHandle as ze } from "react";
58
58
  import "@starasia/css/dist/style.css";
59
59
  import { useSearchParams as MA, useNavigate as vA, useLocation as mA, Outlet as $A, Link as Ke, useParams as Qe } from "react-router";
60
60
  import Ze from "react-easy-crop";
@@ -67,7 +67,7 @@ const He = {
67
67
  setUserData: () => {
68
68
  }
69
69
  }, he = Be(He), ue = () => we(he), Je = (e) => {
70
- const [i, t] = L(
70
+ const [i, t] = b(
71
71
  (e == null ? void 0 : e.initialUserData) || null
72
72
  );
73
73
  return {
@@ -83,7 +83,7 @@ const He = {
83
83
  clearBadge: () => {
84
84
  }
85
85
  }), qe = ({ children: e }) => {
86
- const [i, t] = L({}), o = QA(
86
+ const [i, t] = b({}), o = QA(
87
87
  (c) => {
88
88
  t(
89
89
  (g) => typeof c == "function" ? c(g) : c
@@ -186,7 +186,7 @@ function Re(e) {
186
186
  typeof window > "u" || (e === null ? window.localStorage.removeItem(YA) : window.localStorage.setItem(YA, String(e)), window.dispatchEvent(new CustomEvent(TA, { detail: e })));
187
187
  }
188
188
  function Ie() {
189
- const [e, i] = L(
189
+ const [e, i] = b(
190
190
  () => Ae()
191
191
  );
192
192
  return R(() => {
@@ -235,7 +235,7 @@ function er({
235
235
  profileMenuItems: w,
236
236
  logoutButton: B
237
237
  }) {
238
- const [k] = MA(), b = k.get("embed") === "true", h = ue(), { badges: p } = Te(), z = vA(), Z = mA(), E = !$("md"), [D, W] = L(!1), [f, V] = L(!1), [P, K] = L(!1), [M, G] = L(/* @__PURE__ */ new Set()), { selectedGroupId: I, setSelectedGroupId: u } = Ie(), j = iA(null), q = iA(null);
238
+ const [E] = MA(), L = E.get("embed") === "true", h = ue(), { badges: N } = Te(), K = vA(), Z = mA(), k = !$("md"), [D, W] = b(!1), [f, P] = b(!1), [X, p] = b(!1), [M, G] = b(/* @__PURE__ */ new Set()), { selectedGroupId: I, setSelectedGroupId: u } = Ie(), j = iA(null), q = iA(null);
239
239
  R(() => {
240
240
  const x = j.current;
241
241
  if (!x) return;
@@ -244,20 +244,20 @@ function er({
244
244
  };
245
245
  return x.addEventListener("scroll", S), () => x.removeEventListener("scroll", S);
246
246
  }, []);
247
- const N = () => {
247
+ const z = () => {
248
248
  const x = j.current;
249
249
  x && fA > 0 && (CA = !0, x.scrollTop = fA, requestAnimationFrame(() => {
250
250
  CA = !1;
251
251
  }));
252
252
  };
253
253
  qA(() => {
254
- CA = !0, N();
254
+ CA = !0, z();
255
255
  const x = setTimeout(() => {
256
256
  CA = !1;
257
257
  }, 300);
258
258
  return () => clearTimeout(x);
259
259
  }, []), qA(() => {
260
- h.menus.length > 0 && (fA > 0 ? N() : requestAnimationFrame(() => {
260
+ h.menus.length > 0 && (fA > 0 ? z() : requestAnimationFrame(() => {
261
261
  var S;
262
262
  const x = (S = j.current) == null ? void 0 : S.querySelector(
263
263
  "[data-menu-active='true']"
@@ -265,8 +265,8 @@ function er({
265
265
  x && x.scrollIntoView({ block: "center", behavior: "instant" });
266
266
  }));
267
267
  }, [h.menus]), R(() => {
268
- CA = !0, N();
269
- const x = setTimeout(N, 0), S = setTimeout(N, 50), F = setTimeout(N, 100), _ = setTimeout(N, 200), oA = setTimeout(() => {
268
+ CA = !0, z();
269
+ const x = setTimeout(z, 0), S = setTimeout(z, 50), F = setTimeout(z, 100), _ = setTimeout(z, 200), oA = setTimeout(() => {
270
270
  CA = !1;
271
271
  }, 300);
272
272
  return () => {
@@ -275,10 +275,10 @@ function er({
275
275
  }, [Z.pathname]), R(() => {
276
276
  q.current && (q.current.scrollTop = 0);
277
277
  }, [Z.pathname]), R(() => {
278
- E && K(!1);
279
- }, [Z.pathname, E]), R(() => {
280
- E && V(!0);
281
- }, [E]);
278
+ k && p(!1);
279
+ }, [Z.pathname, k]), R(() => {
280
+ k && P(!0);
281
+ }, [k]);
282
282
  const y = () => {
283
283
  W(!0);
284
284
  }, eA = () => {
@@ -326,7 +326,7 @@ function er({
326
326
  { id: 18, name: "Pengaturan", items: S, parentGroupId: void 0 }
327
327
  ];
328
328
  }, [h.menus, I]);
329
- return b ? /* @__PURE__ */ A("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "#f9fafb" }, children: e || /* @__PURE__ */ A($A, {}) }) : /* @__PURE__ */ s(U, { children: [
329
+ return L ? /* @__PURE__ */ A("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "#f9fafb" }, children: e || /* @__PURE__ */ A($A, {}) }) : /* @__PURE__ */ s(U, { children: [
330
330
  /* @__PURE__ */ s(
331
331
  "div",
332
332
  {
@@ -335,11 +335,11 @@ function er({
335
335
  height: "100vh",
336
336
  // backgroundColor: "#f9fafb",
337
337
  position: "relative",
338
- "--app-sidebar-width": E ? "0px" : f ? "4rem" : "16rem",
339
- "--app-footer-zindex": E && P ? "40" : "999"
338
+ "--app-sidebar-width": k ? "0px" : f ? "4rem" : "16rem",
339
+ "--app-footer-zindex": k && X ? "40" : "999"
340
340
  },
341
341
  children: [
342
- E && /* @__PURE__ */ A(
342
+ k && /* @__PURE__ */ A(
343
343
  "div",
344
344
  {
345
345
  style: {
@@ -347,30 +347,30 @@ function er({
347
347
  inset: 0,
348
348
  backgroundColor: "rgba(0, 0, 0, 0.5)",
349
349
  zIndex: 40,
350
- opacity: P ? 0.5 : 0,
351
- pointerEvents: P ? "auto" : "none",
350
+ opacity: X ? 0.5 : 0,
351
+ pointerEvents: X ? "auto" : "none",
352
352
  transition: "opacity 0.3s"
353
353
  },
354
- onClick: () => K(!1)
354
+ onClick: () => p(!1)
355
355
  }
356
356
  ),
357
357
  /* @__PURE__ */ s(
358
358
  "aside",
359
359
  {
360
360
  style: {
361
- width: E ? "16rem" : f ? "4rem" : "16rem",
362
- position: E ? "fixed" : "relative",
363
- ...E && {
361
+ width: k ? "16rem" : f ? "4rem" : "16rem",
362
+ position: k ? "fixed" : "relative",
363
+ ...k && {
364
364
  inset: 0,
365
365
  zIndex: 50,
366
- transform: P ? "translateX(0)" : "translateX(-100%)"
366
+ transform: X ? "translateX(0)" : "translateX(-100%)"
367
367
  },
368
368
  backgroundColor: "#F8F8F8",
369
369
  borderRight: "1px solid #e5e7eb",
370
370
  display: "flex",
371
371
  flexDirection: "column",
372
372
  transition: "all 0.3s ease-in-out",
373
- flexShrink: E ? void 0 : 0
373
+ flexShrink: k ? void 0 : 0
374
374
  },
375
375
  children: [
376
376
  /* @__PURE__ */ s(
@@ -407,7 +407,7 @@ function er({
407
407
  }
408
408
  }
409
409
  ),
410
- (!f || P) && /* @__PURE__ */ A(
410
+ (!f || X) && /* @__PURE__ */ A(
411
411
  "span",
412
412
  {
413
413
  style: {
@@ -422,10 +422,10 @@ function er({
422
422
  ]
423
423
  }
424
424
  ),
425
- E && /* @__PURE__ */ A(
425
+ k && /* @__PURE__ */ A(
426
426
  "button",
427
427
  {
428
- onClick: () => K(!1),
428
+ onClick: () => p(!1),
429
429
  style: {
430
430
  padding: "0.375rem",
431
431
  borderRadius: "0.5rem",
@@ -458,10 +458,10 @@ function er({
458
458
  ]
459
459
  }
460
460
  ),
461
- !E && /* @__PURE__ */ A(
461
+ !k && /* @__PURE__ */ A(
462
462
  "button",
463
463
  {
464
- onClick: () => V(!f),
464
+ onClick: () => P(!f),
465
465
  style: {
466
466
  position: "absolute",
467
467
  top: "1.5rem",
@@ -539,7 +539,7 @@ function er({
539
539
  c && /* @__PURE__ */ A(
540
540
  We,
541
541
  {
542
- collapsed: E ? !1 : f,
542
+ collapsed: k ? !1 : f,
543
543
  children: c
544
544
  }
545
545
  ),
@@ -554,7 +554,7 @@ function er({
554
554
  paddingBottom: "0.5rem"
555
555
  },
556
556
  children: ye.map((x) => /* @__PURE__ */ s("div", { style: { marginBottom: "1rem" }, children: [
557
- (!f || E) && /* @__PURE__ */ A(
557
+ (!f || k) && /* @__PURE__ */ A(
558
558
  "div",
559
559
  {
560
560
  style: {
@@ -573,25 +573,25 @@ function er({
573
573
  }
574
574
  ),
575
575
  /* @__PURE__ */ A("div", { style: { paddingLeft: "0.5rem", paddingRight: "0.5rem", display: "flex", flexDirection: "column", gap: "var(--starasia-ui-spacing-xs)" }, children: x.items.map((S) => {
576
- const F = S.children && S.children.length > 0, _ = M.has(S.id), oA = F ? S.children.some((X) => lA(X.to)) : lA(S.to), xA = _A(
576
+ const F = S.children && S.children.length > 0, _ = M.has(S.id), oA = F ? S.children.some((V) => lA(V.to)) : lA(S.to), xA = _A(
577
577
  S.badge,
578
- p[S.id]
579
- ), xe = !!xA && f && !E;
578
+ N[S.id]
579
+ ), xe = !!xA && f && !k;
580
580
  return /* @__PURE__ */ s("div", { "data-menu-active": oA || void 0, children: [
581
581
  /* @__PURE__ */ s(
582
582
  "button",
583
583
  {
584
584
  onClick: () => {
585
- F ? me(S.id) : z(S.to);
585
+ F ? me(S.id) : K(S.to);
586
586
  },
587
587
  style: {
588
588
  width: "100%",
589
589
  display: "flex",
590
590
  alignItems: "center",
591
- justifyContent: f && !E ? "center" : void 0,
591
+ justifyContent: f && !k ? "center" : void 0,
592
592
  gap: "0.75rem",
593
- paddingLeft: f && !E ? "0" : "0.75rem",
594
- paddingRight: f && !E ? "0" : "0.75rem",
593
+ paddingLeft: f && !k ? "0" : "0.75rem",
594
+ paddingRight: f && !k ? "0" : "0.75rem",
595
595
  paddingTop: "0.5rem",
596
596
  paddingBottom: "0.5rem",
597
597
  borderRadius: "var(--starasia-ui-radii-md)",
@@ -602,12 +602,12 @@ function er({
602
602
  // transition: "all 0.2s",
603
603
  cursor: "pointer"
604
604
  },
605
- title: f && !E ? S.title : void 0,
606
- onMouseEnter: (X) => {
607
- oA || (X.currentTarget.style.backgroundColor = "#f3f4f6");
605
+ title: f && !k ? S.title : void 0,
606
+ onMouseEnter: (V) => {
607
+ oA || (V.currentTarget.style.backgroundColor = "#f3f4f6");
608
608
  },
609
- onMouseLeave: (X) => {
610
- oA || (X.currentTarget.style.backgroundColor = "transparent");
609
+ onMouseLeave: (V) => {
610
+ oA || (V.currentTarget.style.backgroundColor = "transparent");
611
611
  },
612
612
  children: [
613
613
  /* @__PURE__ */ s(
@@ -639,7 +639,7 @@ function er({
639
639
  ]
640
640
  }
641
641
  ),
642
- (!f || E) && /* @__PURE__ */ s(U, { children: [
642
+ (!f || k) && /* @__PURE__ */ s(U, { children: [
643
643
  /* @__PURE__ */ A(
644
644
  "span",
645
645
  {
@@ -690,7 +690,7 @@ function er({
690
690
  ]
691
691
  }
692
692
  ),
693
- F && (!f || E) && /* @__PURE__ */ A(
693
+ F && (!f || k) && /* @__PURE__ */ A(
694
694
  "div",
695
695
  {
696
696
  style: {
@@ -703,15 +703,15 @@ function er({
703
703
  opacity: _ ? 1 : 0,
704
704
  marginTop: _ ? "0.25rem" : "0px"
705
705
  },
706
- children: S.children.map((X) => {
706
+ children: S.children.map((V) => {
707
707
  const NA = _A(
708
- X.badge,
709
- p[X.id]
708
+ V.badge,
709
+ N[V.id]
710
710
  );
711
711
  return /* @__PURE__ */ s(
712
712
  "button",
713
713
  {
714
- onClick: () => z(X.to),
714
+ onClick: () => K(V.to),
715
715
  style: {
716
716
  width: "100%",
717
717
  display: "flex",
@@ -723,23 +723,23 @@ function er({
723
723
  paddingBottom: "0.5rem",
724
724
  borderRadius: "var(--starasia-ui-radii-md)",
725
725
  textAlign: "left",
726
- backgroundColor: lA(X.to) ? "#FFFFFF" : "transparent",
727
- color: lA(X.to) ? "#292A2E" : "#505258",
726
+ backgroundColor: lA(V.to) ? "#FFFFFF" : "transparent",
727
+ color: lA(V.to) ? "#292A2E" : "#505258",
728
728
  // transition: "all 0.2s",
729
729
  cursor: "pointer",
730
- border: lA(X.to) ? "1px solid rgba(11, 18, 14, 0.1412)" : "1px solid transparent"
730
+ border: lA(V.to) ? "1px solid rgba(11, 18, 14, 0.1412)" : "1px solid transparent"
731
731
  },
732
732
  onMouseEnter: (zA) => {
733
- lA(X.to) || (zA.currentTarget.style.backgroundColor = "#f3f4f6");
733
+ lA(V.to) || (zA.currentTarget.style.backgroundColor = "#f3f4f6");
734
734
  },
735
735
  onMouseLeave: (zA) => {
736
- lA(X.to) || (zA.currentTarget.style.backgroundColor = "transparent");
736
+ lA(V.to) || (zA.currentTarget.style.backgroundColor = "transparent");
737
737
  },
738
738
  children: [
739
739
  /* @__PURE__ */ A(
740
740
  m,
741
741
  {
742
- name: X.icon,
742
+ name: V.icon,
743
743
  size: "sm",
744
744
  style: { flexShrink: 0 }
745
745
  }
@@ -753,7 +753,7 @@ function er({
753
753
  whiteSpace: "nowrap",
754
754
  flex: 1
755
755
  },
756
- children: X.title
756
+ children: V.title
757
757
  }
758
758
  ),
759
759
  NA && /* @__PURE__ */ A(
@@ -767,7 +767,7 @@ function er({
767
767
  )
768
768
  ]
769
769
  },
770
- X.id
770
+ V.id
771
771
  );
772
772
  })
773
773
  }
@@ -797,10 +797,10 @@ function er({
797
797
  },
798
798
  children: [
799
799
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "1rem" }, children: [
800
- E && /* @__PURE__ */ A(
800
+ k && /* @__PURE__ */ A(
801
801
  "button",
802
802
  {
803
- onClick: () => K(!0),
803
+ onClick: () => p(!0),
804
804
  style: {
805
805
  padding: "0.375rem",
806
806
  borderRadius: "0.5rem",
@@ -834,7 +834,7 @@ function er({
834
834
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
835
835
  g,
836
836
  /* @__PURE__ */ s(ce, { position: "bottom-right", children: [
837
- /* @__PURE__ */ A(LA, { children: /* @__PURE__ */ s(
837
+ /* @__PURE__ */ A(bA, { children: /* @__PURE__ */ s(
838
838
  "div",
839
839
  {
840
840
  style: {
@@ -998,7 +998,7 @@ function er({
998
998
  }
999
999
  ) }),
1000
1000
  (d && d.length > 0 || w) && /* @__PURE__ */ s(se, { children: [
1001
- d == null ? void 0 : d.map((x, S) => /* @__PURE__ */ A(LA, { children: /* @__PURE__ */ s(
1001
+ d == null ? void 0 : d.map((x, S) => /* @__PURE__ */ A(bA, { children: /* @__PURE__ */ s(
1002
1002
  "button",
1003
1003
  {
1004
1004
  type: "button",
@@ -1018,7 +1018,7 @@ function er({
1018
1018
  ) }, `${x.label}-${S}`)),
1019
1019
  w
1020
1020
  ] }),
1021
- B ?? /* @__PURE__ */ A(Le, { children: /* @__PURE__ */ A(LA, { children: /* @__PURE__ */ s(
1021
+ B ?? /* @__PURE__ */ A(be, { children: /* @__PURE__ */ A(bA, { children: /* @__PURE__ */ s(
1022
1022
  "button",
1023
1023
  {
1024
1024
  type: "button",
@@ -1246,10 +1246,10 @@ function ir({
1246
1246
  onSelect: e,
1247
1247
  "aria-label": i = "Pilih module"
1248
1248
  } = {}) {
1249
- const t = ue(), o = vA(), { selectedGroupId: r, setSelectedGroupId: n } = Ie(), [l, c] = L(!1), g = (a) => {
1249
+ const t = ue(), o = vA(), { selectedGroupId: r, setSelectedGroupId: n } = Ie(), [l, c] = b(!1), g = (a) => {
1250
1250
  var d;
1251
1251
  if (n(a), a !== null) {
1252
- const w = t.menus.find((k) => k.id === a), B = (d = w == null ? void 0 : w.items[0]) == null ? void 0 : d.to;
1252
+ const w = t.menus.find((E) => E.id === a), B = (d = w == null ? void 0 : w.items[0]) == null ? void 0 : d.to;
1253
1253
  B && o(B);
1254
1254
  }
1255
1255
  e == null || e(a);
@@ -1557,7 +1557,7 @@ const tr = AA(
1557
1557
  children: e
1558
1558
  }
1559
1559
  ), wA = AA($e), _e = ({ backButton: e }) => {
1560
- const [i, t] = L(!1), o = (e == null ? void 0 : e.iconColor) ?? "var(--starasia-ui-color-gray-500)", r = (e == null ? void 0 : e.textColor) ?? "rgba(120, 134, 127, 1)", n = (e == null ? void 0 : e.hoverIconColor) ?? "var(--starasia-ui-color-gray-700)", l = (e == null ? void 0 : e.hoverTextColor) ?? "rgba(60, 67, 64, 1)";
1560
+ const [i, t] = b(!1), o = (e == null ? void 0 : e.iconColor) ?? "var(--starasia-ui-color-gray-500)", r = (e == null ? void 0 : e.textColor) ?? "rgba(120, 134, 127, 1)", n = (e == null ? void 0 : e.hoverIconColor) ?? "var(--starasia-ui-color-gray-700)", l = (e == null ? void 0 : e.hoverTextColor) ?? "rgba(60, 67, 64, 1)";
1561
1561
  return /* @__PURE__ */ s(
1562
1562
  C,
1563
1563
  {
@@ -1605,20 +1605,20 @@ const tr = AA(
1605
1605
  containerProps: c,
1606
1606
  headerProps: g
1607
1607
  }) => {
1608
- const a = $("lg"), d = vA(), w = mA(), B = e == null ? void 0 : e.show, k = () => {
1608
+ const a = $("lg"), d = vA(), w = mA(), B = e == null ? void 0 : e.show, E = () => {
1609
1609
  if (typeof (e == null ? void 0 : e.onClick) == "function") {
1610
1610
  e.onClick();
1611
1611
  return;
1612
1612
  }
1613
1613
  d(-1, { replace: !0 });
1614
- }, b = () => n ? de(n) ? n : /* @__PURE__ */ A(C, { direction: "row", gap: "lg", children: n.map(
1615
- ({ title: Z, icon: v, buttonProps: E, onClick: D }, W) => !Z && !v ? null : /* @__PURE__ */ A(
1614
+ }, L = () => n ? de(n) ? n : /* @__PURE__ */ A(C, { direction: "row", gap: "lg", children: n.map(
1615
+ ({ title: Z, icon: v, buttonProps: k, onClick: D }, W) => !Z && !v ? null : /* @__PURE__ */ A(
1616
1616
  O,
1617
1617
  {
1618
1618
  fullWidth: !a,
1619
1619
  iconLeft: v ? /* @__PURE__ */ A(m, { name: v, size: "md" }) : void 0,
1620
1620
  onClick: D,
1621
- ...E,
1621
+ ...k,
1622
1622
  children: Z
1623
1623
  },
1624
1624
  `action-${W}`
@@ -1633,8 +1633,8 @@ const tr = AA(
1633
1633
  style: { textDecoration: "none" },
1634
1634
  children: Z
1635
1635
  }
1636
- ) }) : /* @__PURE__ */ A(C, { direction: "row", children: /* @__PURE__ */ A(wA, { onClick: k, children: Z }) });
1637
- }, p = () => /* @__PURE__ */ s(
1636
+ ) }) : /* @__PURE__ */ A(C, { direction: "row", children: /* @__PURE__ */ A(wA, { onClick: E, children: Z }) });
1637
+ }, N = () => /* @__PURE__ */ s(
1638
1638
  C,
1639
1639
  {
1640
1640
  gap: "xs",
@@ -1655,13 +1655,13 @@ const tr = AA(
1655
1655
  /* @__PURE__ */ A(Q, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: i }),
1656
1656
  t && /* @__PURE__ */ A(GA, { border: !0, size: "lg", text: t, ...l })
1657
1657
  ] }) : i,
1658
- b()
1658
+ L()
1659
1659
  ]
1660
1660
  }
1661
1661
  )
1662
1662
  ]
1663
1663
  }
1664
- ), z = () => o;
1664
+ ), K = () => o;
1665
1665
  return /* @__PURE__ */ s(
1666
1666
  C,
1667
1667
  {
@@ -1674,8 +1674,8 @@ const tr = AA(
1674
1674
  animation: "pageLayoutEnter 280ms cubic-bezier(0.16, 1, 0.3, 1) both"
1675
1675
  },
1676
1676
  children: [
1677
- r && p(),
1678
- z()
1677
+ r && N(),
1678
+ K()
1679
1679
  ]
1680
1680
  },
1681
1681
  w.pathname
@@ -1756,9 +1756,9 @@ const tr = AA(
1756
1756
  C,
1757
1757
  {
1758
1758
  id: "asdasd",
1759
- padding: t ? "lg" : "spacing-0",
1760
- paddingLeft: t ? o ? "xl" : "lg" : "spacing-0",
1761
- paddingRight: t ? o ? "xl" : "lg" : "spacing-0",
1759
+ padding: t ? "md" : "spacing-0",
1760
+ paddingLeft: t ? o ? "lg" : "md" : "spacing-0",
1761
+ paddingRight: t ? o ? "lg" : "md" : "spacing-0",
1762
1762
  style: i ? {
1763
1763
  borderBottom: "1px solid var(--starasia-ui-color-border)"
1764
1764
  } : void 0,
@@ -1771,9 +1771,9 @@ const tr = AA(
1771
1771
  return /* @__PURE__ */ A(
1772
1772
  C,
1773
1773
  {
1774
- padding: "lg",
1775
- paddingLeft: i ? "xl" : "lg",
1776
- paddingRight: i ? "xl" : "lg",
1774
+ padding: "md",
1775
+ paddingLeft: i ? "lg" : "md",
1776
+ paddingRight: i ? "lg" : "md",
1777
1777
  children: e
1778
1778
  }
1779
1779
  );
@@ -1792,36 +1792,41 @@ const tr = AA(
1792
1792
  searchHighlightPlaceholder: d = "CTRL + K",
1793
1793
  filterContainer: w,
1794
1794
  actionContainer: B,
1795
- headerProps: k = { borderBottom: !0 },
1796
- variantTag: b = "info"
1795
+ containerProps: E,
1796
+ headerProps: L = { borderBottom: !0 },
1797
+ variantTag: h = "info"
1797
1798
  }) => {
1798
- const h = $("lg"), [p, z] = MA(), Z = p.get(g), v = kA(p.toString()), E = QA(
1799
- ({ target: { value: P } }) => {
1800
- c && c(P), g && z({ ...v, [g]: P });
1799
+ const N = $("lg"), [K, Z] = MA(), v = K.get(g), k = kA(K.toString()), D = QA(
1800
+ ({ target: { value: p } }) => {
1801
+ c && c(p), g && Z({ ...k, [g]: p });
1801
1802
  },
1802
- [g, c, z, v]
1803
- ), D = () => /* @__PURE__ */ A(
1803
+ [g, c, Z, k]
1804
+ ), W = () => /* @__PURE__ */ A(
1804
1805
  EA,
1805
1806
  {
1806
1807
  placeholder: a,
1807
1808
  highlightPlaceholder: d,
1808
1809
  leftIcon: /* @__PURE__ */ A(m, { name: "Search", width: 20, height: 20 }),
1809
- onChange: E,
1810
+ onChange: D,
1810
1811
  style: { width: "100%" },
1811
- value: Z || ""
1812
+ value: v || ""
1812
1813
  }
1813
- ), W = () => t ? /* @__PURE__ */ s(C, { direction: "row", gap: "sm", align: "center", children: [
1814
+ ), f = () => t ? /* @__PURE__ */ s(C, { direction: "row", gap: "sm", align: "center", children: [
1814
1815
  /* @__PURE__ */ A(Q, { fontWeight: "medium", children: i }),
1815
- /* @__PURE__ */ A(GA, { border: !0, text: t, variant: b })
1816
+ /* @__PURE__ */ A(GA, { border: !0, text: t, variant: h })
1816
1817
  ] }) : /* @__PURE__ */ A(Q, { fontWeight: "medium", children: i });
1817
1818
  return /* @__PURE__ */ s(
1818
1819
  C,
1819
1820
  {
1820
- bg: "accent-dark-tertiary",
1821
- borderRadius: "rounded-md",
1821
+ bg: "white",
1822
+ borderRadius: "rounded-xs",
1822
1823
  variant: "section",
1824
+ borderWidth: "border",
1825
+ borderStyle: "border-solid",
1826
+ borderColor: "border-base",
1827
+ ...E,
1823
1828
  children: [
1824
- l !== null && !!(l || i || r || o || n) ? /* @__PURE__ */ A(ii, { ...k, children: l || /* @__PURE__ */ s(
1829
+ l !== null && !!(l || i || r || o || n) ? /* @__PURE__ */ A(ii, { ...L, children: l || /* @__PURE__ */ s(
1825
1830
  C,
1826
1831
  {
1827
1832
  direction: "row",
@@ -1829,13 +1834,13 @@ const tr = AA(
1829
1834
  align: "flex-start",
1830
1835
  gap: "lg",
1831
1836
  children: [
1832
- /* @__PURE__ */ A(C, { ...w, children: r || (i ? W() : null) }),
1837
+ /* @__PURE__ */ A(C, { ...w, children: r || (i ? f() : null) }),
1833
1838
  /* @__PURE__ */ A(
1834
1839
  C,
1835
1840
  {
1836
- style: h ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
1841
+ style: N ? { width: "100%", maxWidth: "19.313rem" } : { flex: 1 },
1837
1842
  ...B,
1838
- children: o || (n ? D() : null)
1843
+ children: o || (n ? W() : null)
1839
1844
  }
1840
1845
  )
1841
1846
  ]
@@ -1847,7 +1852,7 @@ const tr = AA(
1847
1852
  );
1848
1853
  }
1849
1854
  ), ri = "#E6E9FB", oi = ({ children: e, onClick: i }) => {
1850
- const [t, o] = L("");
1855
+ const [t, o] = b("");
1851
1856
  return /* @__PURE__ */ A(
1852
1857
  wA,
1853
1858
  {
@@ -1888,7 +1893,7 @@ const tr = AA(
1888
1893
  [r]
1889
1894
  );
1890
1895
  return /* @__PURE__ */ s(ce, { position: n, style: t, children: [
1891
- /* @__PURE__ */ A(LA, { style: o, children: /* @__PURE__ */ A(O, { size: "sm", secondary: !0, ...l, children: /* @__PURE__ */ A(m, { name: e, ...c }) }) }),
1896
+ /* @__PURE__ */ A(bA, { style: o, children: /* @__PURE__ */ A(O, { size: "sm", secondary: !0, ...l, children: /* @__PURE__ */ A(m, { name: e, ...c }) }) }),
1892
1897
  /* @__PURE__ */ A(ge, { style: a, children: i.map((d, w) => g === "outline-button" ? /* @__PURE__ */ A(se, { children: /* @__PURE__ */ s(
1893
1898
  O,
1894
1899
  {
@@ -2022,15 +2027,15 @@ const tr = AA(
2022
2027
  onSearch: d,
2023
2028
  value: w,
2024
2029
  dateFilter: B,
2025
- enableInputDate: k,
2026
- withSearchParam: b,
2030
+ enableInputDate: E,
2031
+ withSearchParam: L,
2027
2032
  // disabled,
2028
2033
  rangedDate: h,
2029
- disabled: p,
2030
- inputTextType: z = "text",
2034
+ disabled: N,
2035
+ inputTextType: K = "text",
2031
2036
  min: Z,
2032
2037
  max: v
2033
- }, E) => {
2038
+ }, k) => {
2034
2039
  const D = r == null ? void 0 : r.length;
2035
2040
  let W;
2036
2041
  const f = () => {
@@ -2043,7 +2048,7 @@ const tr = AA(
2043
2048
  multiSelect: g,
2044
2049
  searchAble: a,
2045
2050
  placeholder: n,
2046
- onChange: (K) => o == null ? void 0 : o({ value: K, name: c, type: i }),
2051
+ onChange: (p) => o == null ? void 0 : o({ value: p, name: c, type: i }),
2047
2052
  dropdownLists: t || [],
2048
2053
  defaultValue: w || te()
2049
2054
  }
@@ -2052,12 +2057,12 @@ const tr = AA(
2052
2057
  return /* @__PURE__ */ A(
2053
2058
  ne,
2054
2059
  {
2055
- input: k,
2060
+ input: E,
2056
2061
  filter: B,
2057
2062
  value: si(w || W, h),
2058
- onChange: (K) => o == null ? void 0 : o({ value: K, name: c, type: i }),
2063
+ onChange: (p) => o == null ? void 0 : o({ value: p, name: c, type: i }),
2059
2064
  rangedDate: h,
2060
- ref: E
2065
+ ref: k
2061
2066
  }
2062
2067
  );
2063
2068
  case "select-button":
@@ -2066,7 +2071,7 @@ const tr = AA(
2066
2071
  {
2067
2072
  multiple: g,
2068
2073
  value: w || te(),
2069
- onChange: (K) => o == null ? void 0 : o({ value: K, name: c, type: i }),
2074
+ onChange: (p) => o == null ? void 0 : o({ value: p, name: c, type: i }),
2070
2075
  options: t
2071
2076
  }
2072
2077
  );
@@ -2074,47 +2079,47 @@ const tr = AA(
2074
2079
  return /* @__PURE__ */ A(
2075
2080
  EA,
2076
2081
  {
2077
- onChange: ({ target: { value: K } }) => o == null ? void 0 : o({ value: K, name: c, type: i }),
2082
+ onChange: ({ target: { value: p } }) => o == null ? void 0 : o({ value: p, name: c, type: i }),
2078
2083
  value: w || W,
2079
2084
  placeholder: n,
2080
- disabled: p,
2081
- type: z,
2085
+ disabled: N,
2086
+ type: K,
2082
2087
  name: c,
2083
- ...z === "number" && { min: Z, max: v },
2084
- ...(!z || z === "text") && {
2088
+ ...K === "number" && { min: Z, max: v },
2089
+ ...(!K || K === "text") && {
2085
2090
  minLength: Z,
2086
2091
  maxLength: v
2087
2092
  }
2088
2093
  }
2089
2094
  );
2090
2095
  case "checkbox":
2091
- return /* @__PURE__ */ A(C, { children: t == null ? void 0 : t.map((K) => {
2092
- const M = Array.isArray(w) && w.includes(K.value);
2096
+ return /* @__PURE__ */ A(C, { children: t == null ? void 0 : t.map((p) => {
2097
+ const M = Array.isArray(w) && w.includes(p.value);
2093
2098
  return /* @__PURE__ */ A(
2094
2099
  OA,
2095
2100
  {
2096
- label: K.label,
2101
+ label: p.label,
2097
2102
  checked: M,
2098
2103
  sizes: "sm",
2099
2104
  onChange: (G) => {
2100
- const I = Array.isArray(w) ? w : [], u = G.target.checked ? [...I, K.value] : I.filter((j) => j !== K.value);
2105
+ const I = Array.isArray(w) ? w : [], u = G.target.checked ? [...I, p.value] : I.filter((j) => j !== p.value);
2101
2106
  o == null || o({ value: u, name: c, type: i });
2102
2107
  }
2103
2108
  },
2104
- K.value
2109
+ p.value
2105
2110
  );
2106
2111
  }) });
2107
2112
  default:
2108
2113
  return null;
2109
2114
  }
2110
2115
  };
2111
- return D ? /* @__PURE__ */ A(C, { marginBottom: "lg", children: r == null ? void 0 : r.map((K, M) => /* @__PURE__ */ A(
2116
+ return D ? /* @__PURE__ */ A(C, { marginBottom: "lg", children: r == null ? void 0 : r.map((p, M) => /* @__PURE__ */ A(
2112
2117
  Ee,
2113
2118
  {
2114
- ref: E,
2119
+ ref: k,
2115
2120
  onChange: o,
2116
- ...K,
2117
- withSearchParam: b
2121
+ ...p,
2122
+ withSearchParam: L
2118
2123
  },
2119
2124
  M
2120
2125
  )) }) : /* @__PURE__ */ s(C, { marginBottom: "sm", children: [
@@ -2134,9 +2139,9 @@ const tr = AA(
2134
2139
  onHide: n,
2135
2140
  resetting: l
2136
2141
  }) => {
2137
- const [c, g] = L(!1), a = iA(null), d = ({ value: B, name: k, type: b }) => {
2142
+ const [c, g] = b(!1), a = iA(null), d = ({ value: B, name: E, type: L }) => {
2138
2143
  if (o)
2139
- switch (b) {
2144
+ switch (L) {
2140
2145
  case "date":
2141
2146
  gi(B);
2142
2147
  break;
@@ -2163,16 +2168,16 @@ const tr = AA(
2163
2168
  ref: a,
2164
2169
  children: [
2165
2170
  /* @__PURE__ */ A(ai, { title: i, resetButton: { onClick: w } }),
2166
- c || l ? null : /* @__PURE__ */ A(C, { children: t == null ? void 0 : t.map((B, k) => /* @__PURE__ */ A(
2171
+ c || l ? null : /* @__PURE__ */ A(C, { children: t == null ? void 0 : t.map((B, E) => /* @__PURE__ */ A(
2167
2172
  Ee,
2168
2173
  {
2169
- borderBottom: k !== t.length - 1,
2174
+ borderBottom: E !== t.length - 1,
2170
2175
  onChange: d,
2171
2176
  withSearchParam: o,
2172
2177
  ...B,
2173
2178
  ref: a
2174
2179
  },
2175
- k
2180
+ E
2176
2181
  )) })
2177
2182
  ]
2178
2183
  }
@@ -2213,7 +2218,7 @@ const tr = AA(
2213
2218
  function gr(e) {
2214
2219
  return e.split(" ").map((i) => i[0]).join("").slice(0, 2).toUpperCase();
2215
2220
  }
2216
- const bA = (e) => {
2221
+ const LA = (e) => {
2217
2222
  const i = {
2218
2223
  day: "2-digit",
2219
2224
  month: "short",
@@ -2389,16 +2394,16 @@ const yr = (e) => {
2389
2394
  }), t;
2390
2395
  }, fr = (e) => {
2391
2396
  var v;
2392
- const i = cA(() => ({ ...Di, ...e }), [e]), [t, o] = L(!1), [r, n] = L(!1), [l] = L(void 0), c = () => n(!0), g = () => n(!1), a = r ? g : c, d = () => {
2397
+ const i = cA(() => ({ ...Di, ...e }), [e]), [t, o] = b(!1), [r, n] = b(!1), [l] = b(void 0), c = () => n(!0), g = () => n(!1), a = r ? g : c, d = () => {
2393
2398
  o(!0);
2394
- }, w = (E) => {
2395
- o(E);
2396
- }, B = l ? Ii(l) : void 0, k = !!(B && ((v = Object.values(B)) == null ? void 0 : v.length) > 0), b = () => B ? Object.keys(B).map((E) => {
2397
- var K, M, G;
2398
- const D = UA(E, i.fields), W = [];
2399
+ }, w = (k) => {
2400
+ o(k);
2401
+ }, B = l ? Ii(l) : void 0, E = !!(B && ((v = Object.values(B)) == null ? void 0 : v.length) > 0), L = () => B ? Object.keys(B).map((k) => {
2402
+ var p, M, G;
2403
+ const D = UA(k, i.fields), W = [];
2399
2404
  let f = "";
2400
- const V = (K = D == null ? void 0 : D.childrenKey) == null ? void 0 : K.length, P = D == null ? void 0 : D.parentKey;
2401
- switch (V && ((M = D == null ? void 0 : D.childrenKey) == null || M.forEach((I) => {
2405
+ const P = (p = D == null ? void 0 : D.childrenKey) == null ? void 0 : p.length, X = D == null ? void 0 : D.parentKey;
2406
+ switch (P && ((M = D == null ? void 0 : D.childrenKey) == null || M.forEach((I) => {
2402
2407
  const u = UA(I, i.fields);
2403
2408
  u && W.push({
2404
2409
  name: u == null ? void 0 : u.name,
@@ -2408,11 +2413,11 @@ const yr = (e) => {
2408
2413
  })), D == null ? void 0 : D.type) {
2409
2414
  case "dropdown":
2410
2415
  case "select-button":
2411
- const I = B[E] && typeof B[E] != "string" ? B[E] : [], u = (I == null ? void 0 : I.length) > 0 ? (G = I.map((y) => y.label)) == null ? void 0 : G.join(",") : B[E];
2416
+ const I = B[k] && typeof B[k] != "string" ? B[k] : [], u = (I == null ? void 0 : I.length) > 0 ? (G = I.map((y) => y.label)) == null ? void 0 : G.join(",") : B[k];
2412
2417
  f = `${D == null ? void 0 : D.label}: ${u}`;
2413
2418
  break;
2414
2419
  case "checkbox":
2415
- const q = (Array.isArray(B[E]) ? B[E] : []).map(
2420
+ const q = (Array.isArray(B[k]) ? B[k] : []).map(
2416
2421
  (y) => {
2417
2422
  var eA, tA;
2418
2423
  return ((tA = (eA = D == null ? void 0 : D.options) == null ? void 0 : eA.find((hA) => hA.value === y)) == null ? void 0 : tA.label) || y;
@@ -2422,49 +2427,49 @@ const yr = (e) => {
2422
2427
  break;
2423
2428
  case "date":
2424
2429
  if (D.rangedDate) {
2425
- const y = B[E], eA = (D == null ? void 0 : D.dateValueFormatText) === "indonesian" ? bA(new Date(y == null ? void 0 : y.from)) : y == null ? void 0 : y.from, tA = (D == null ? void 0 : D.dateValueFormatText) === "indonesian" ? bA(new Date(y == null ? void 0 : y.to)) : y == null ? void 0 : y.to;
2430
+ const y = B[k], eA = (D == null ? void 0 : D.dateValueFormatText) === "indonesian" ? LA(new Date(y == null ? void 0 : y.from)) : y == null ? void 0 : y.from, tA = (D == null ? void 0 : D.dateValueFormatText) === "indonesian" ? LA(new Date(y == null ? void 0 : y.to)) : y == null ? void 0 : y.to;
2426
2431
  f = `${D == null ? void 0 : D.label}: ${eA || ""} ~ ${tA || ""}`;
2427
2432
  break;
2428
2433
  }
2429
- const N = (D == null ? void 0 : D.dateValueFormatText) === "indonesian" ? bA(new Date(B[E])) : B[E];
2430
- f = `${D == null ? void 0 : D.label}: ${N || ""}`;
2434
+ const z = (D == null ? void 0 : D.dateValueFormatText) === "indonesian" ? LA(new Date(B[k])) : B[k];
2435
+ f = `${D == null ? void 0 : D.label}: ${z || ""}`;
2431
2436
  break;
2432
2437
  default:
2433
- f = `${D == null ? void 0 : D.label}: ${B[E]}`;
2438
+ f = `${D == null ? void 0 : D.label}: ${B[k]}`;
2434
2439
  break;
2435
2440
  }
2436
- if (V && W.length > 0) {
2441
+ if (P && W.length > 0) {
2437
2442
  let I = W.map((u) => {
2438
2443
  var j, q;
2439
- return u != null && u.value && typeof u.value != "string" ? (q = (j = u == null ? void 0 : u.value) == null ? void 0 : j.map((N) => N == null ? void 0 : N.label)) == null ? void 0 : q.join(",") : u.value;
2444
+ return u != null && u.value && typeof u.value != "string" ? (q = (j = u == null ? void 0 : u.value) == null ? void 0 : j.map((z) => z == null ? void 0 : z.label)) == null ? void 0 : q.join(",") : u.value;
2440
2445
  });
2441
2446
  I = I.filter(
2442
2447
  (u) => typeof u < "u" && u !== "" && u !== null
2443
2448
  ), I && I.length > 0 && (f = `${f} ${D.relationLabelChip || "by"} ${I}`);
2444
2449
  }
2445
- return P && (f = ""), {
2450
+ return X && (f = ""), {
2446
2451
  name: D == null ? void 0 : D.name,
2447
2452
  label: D == null ? void 0 : D.label,
2448
- value: B[E],
2453
+ value: B[k],
2449
2454
  valueText: f,
2450
2455
  children: W
2451
2456
  };
2452
- }) : [], h = (E) => {
2453
- E != null && E.name && o(!0);
2454
- }, p = b();
2457
+ }) : [], h = (k) => {
2458
+ k != null && k.name && o(!0);
2459
+ }, N = L();
2455
2460
  return {
2456
2461
  value: B,
2457
2462
  open: c,
2458
2463
  close: g,
2459
2464
  toggle: a,
2460
2465
  reset: d,
2461
- chips: p,
2466
+ chips: N,
2462
2467
  toggleConfig: {
2463
- active: k,
2468
+ active: E,
2464
2469
  onClick: a
2465
2470
  },
2466
2471
  chipsConfig: {
2467
- items: p,
2472
+ items: N,
2468
2473
  onClose: h
2469
2474
  },
2470
2475
  config: {
@@ -2480,7 +2485,7 @@ const yr = (e) => {
2480
2485
  Toggle: wi,
2481
2486
  Chips: ci,
2482
2487
  Chip: ke
2483
- }, ki = (e) => /* @__PURE__ */ A(Q, { variant: "h1", children: e.children, ...e.props }), Ei = (e) => /* @__PURE__ */ A(Q, { variant: "h2", children: e.children, ...e.props }), Mi = (e) => /* @__PURE__ */ A(Q, { variant: "h3", children: e.children, ...e.props }), mi = (e) => /* @__PURE__ */ A(Q, { variant: "h4", children: e.children, ...e.props }), yi = (e) => /* @__PURE__ */ A(Q, { variant: "h5", children: e.children, ...e.props }), xi = (e) => /* @__PURE__ */ A(Q, { variant: "h6", children: e.children, ...e.props }), fi = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h1", children: e.children, ...e.props }), Si = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h2", children: e.children, ...e.props }), Li = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h3", children: e.children, ...e.props }), bi = (e) => /* @__PURE__ */ A(Q, { variant: "body-1", children: e.children, ...e.props }), Gi = (e) => /* @__PURE__ */ A(Q, { variant: "body-2", children: e.children, ...e.props }), Oi = (e) => /* @__PURE__ */ A(Q, { variant: "body-3", children: e.children, ...e.props }), J = {
2488
+ }, ki = (e) => /* @__PURE__ */ A(Q, { variant: "h1", children: e.children, ...e.props }), Ei = (e) => /* @__PURE__ */ A(Q, { variant: "h2", children: e.children, ...e.props }), Mi = (e) => /* @__PURE__ */ A(Q, { variant: "h3", children: e.children, ...e.props }), mi = (e) => /* @__PURE__ */ A(Q, { variant: "h4", children: e.children, ...e.props }), yi = (e) => /* @__PURE__ */ A(Q, { variant: "h5", children: e.children, ...e.props }), xi = (e) => /* @__PURE__ */ A(Q, { variant: "h6", children: e.children, ...e.props }), fi = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h1", children: e.children, ...e.props }), Si = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h2", children: e.children, ...e.props }), bi = (e) => /* @__PURE__ */ A(Q, { variant: "sub-h3", children: e.children, ...e.props }), Li = (e) => /* @__PURE__ */ A(Q, { variant: "body-1", children: e.children, ...e.props }), Gi = (e) => /* @__PURE__ */ A(Q, { variant: "body-2", children: e.children, ...e.props }), Oi = (e) => /* @__PURE__ */ A(Q, { variant: "body-3", children: e.children, ...e.props }), J = {
2484
2489
  H1: ki,
2485
2490
  H2: Ei,
2486
2491
  H3: Mi,
@@ -2489,8 +2494,8 @@ const yr = (e) => {
2489
2494
  H6: xi,
2490
2495
  SubH1: fi,
2491
2496
  SubH2: Si,
2492
- SubH3: Li,
2493
- Body1: bi,
2497
+ SubH3: bi,
2498
+ Body1: Li,
2494
2499
  Body2: Gi,
2495
2500
  Body3: Oi
2496
2501
  }, PA = () => {
@@ -2554,15 +2559,15 @@ const yr = (e) => {
2554
2559
  [i]: a
2555
2560
  }, B = { ...n };
2556
2561
  l && typeof l == "string" && delete B[l], delete B[g];
2557
- const k = {
2562
+ const E = {
2558
2563
  ...B,
2559
2564
  [c]: JSON.stringify(w)
2560
- }, b = new URLSearchParams(n).toString(), h = new URLSearchParams(
2561
- k
2565
+ }, L = new URLSearchParams(n).toString(), h = new URLSearchParams(
2566
+ E
2562
2567
  ).toString();
2563
- if (b === h)
2568
+ if (L === h)
2564
2569
  return;
2565
- r(k);
2570
+ r(E);
2566
2571
  }
2567
2572
  }
2568
2573
  }, KA = ({
@@ -2573,7 +2578,7 @@ const yr = (e) => {
2573
2578
  }) => {
2574
2579
  const r = t.get(i) || void 0, n = r && typeof r == "string" ? JSON.parse(r) : void 0, l = n ? n[e] : void 0;
2575
2580
  return o === "label" && l ? JSON.parse(l)[0].label : o === "value" && l ? JSON.parse(l)[0].value : l;
2576
- }, Lr = ({
2581
+ }, br = ({
2577
2582
  name: e,
2578
2583
  filterKey: i = "filter",
2579
2584
  searchParams: t,
@@ -2581,7 +2586,7 @@ const yr = (e) => {
2581
2586
  }) => {
2582
2587
  const r = t.get(i) || void 0, n = r && typeof r == "string" ? JSON.parse(r) : void 0, l = n ? n[e] : void 0;
2583
2588
  return o === "label" && l ? JSON.parse(l).map((c) => c.label) : o === "value" && l ? JSON.parse(l).map((c) => c.value) : o === "array" && l ? JSON.parse(l) : l;
2584
- }, br = ({
2589
+ }, Lr = ({
2585
2590
  name: e,
2586
2591
  filterKey: i = "filter",
2587
2592
  searchParams: t,
@@ -2623,25 +2628,25 @@ const yr = (e) => {
2623
2628
  pageKey: o,
2624
2629
  filters: r
2625
2630
  }) => {
2626
- const { searchParams: n, setSearchParams: l, searchQueries: c } = PA(), [g, a] = L({}), d = () => {
2631
+ const { searchParams: n, setSearchParams: l, searchQueries: c } = PA(), [g, a] = b({}), d = () => {
2627
2632
  n.delete(t || "filter"), l(n);
2628
- }, w = (B, k) => {
2633
+ }, w = (B, E) => {
2629
2634
  switch (B.type) {
2630
2635
  case "radio": {
2631
- const { show: b = !0 } = B;
2632
- return b && /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, k);
2636
+ const { show: L = !0 } = B;
2637
+ return L && /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, E);
2633
2638
  }
2634
2639
  case "dropdown": {
2635
- const { show: b = !0 } = B;
2636
- return b && /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, k);
2640
+ const { show: L = !0 } = B;
2641
+ return L && /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, E);
2637
2642
  }
2638
2643
  case "date-range":
2639
- return /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, k);
2644
+ return /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, E);
2640
2645
  case "date":
2641
- return /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, k);
2646
+ return /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, E);
2642
2647
  case "dropdown-multiple": {
2643
- const { show: b = !0 } = B;
2644
- return b && /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, k);
2648
+ const { show: L = !0 } = B;
2649
+ return L && /* @__PURE__ */ A(C, { children: /* @__PURE__ */ A(C, { children: B.title }) }, E);
2645
2650
  }
2646
2651
  default:
2647
2652
  return null;
@@ -2659,7 +2664,7 @@ const yr = (e) => {
2659
2664
  }
2660
2665
  )
2661
2666
  ] }),
2662
- r == null ? void 0 : r.map((B, k) => w(B, k))
2667
+ r == null ? void 0 : r.map((B, E) => w(B, E))
2663
2668
  ] }) });
2664
2669
  }, Hi = ({
2665
2670
  searchKey: e = "q",
@@ -2675,13 +2680,13 @@ const yr = (e) => {
2675
2680
  handleOnReset: d,
2676
2681
  filterConfigs: w,
2677
2682
  buttonToggleProps: B,
2678
- position: k = "right",
2679
- titleSearchLabel: b = "Work Order",
2683
+ position: E = "right",
2684
+ titleSearchLabel: L = "Work Order",
2680
2685
  withTitleLabels: h = !1
2681
2686
  }) => {
2682
- const z = (B == null ? void 0 : B.isShowLabel) ?? !0, [Z, v] = L(!1), [E, D] = L(0), W = () => {
2687
+ const K = (B == null ? void 0 : B.isShowLabel) ?? !0, [Z, v] = b(!1), [k, D] = b(0), W = () => {
2683
2688
  D((y) => y + 1);
2684
- }, { searchParams: f, setSearchParams: V, getQueryParam: P } = PA(), K = kA(f.toString()), M = Ki(e, f, c) || "", [G, I] = L(M), u = P(c), q = !!(u && !(() => {
2689
+ }, { searchParams: f, setSearchParams: P, getQueryParam: X } = PA(), p = kA(f.toString()), M = Ki(e, f, c) || "", [G, I] = b(M), u = X(c), q = !!(u && !(() => {
2685
2690
  if (u)
2686
2691
  try {
2687
2692
  const y = JSON.parse(u);
@@ -2690,7 +2695,7 @@ const yr = (e) => {
2690
2695
  console.error("Filter parameter is not a valid JSON:", y);
2691
2696
  }
2692
2697
  return !1;
2693
- })()), N = $("md");
2698
+ })()), z = $("md");
2694
2699
  return R(() => {
2695
2700
  I(M);
2696
2701
  }, [M]), R(() => {
@@ -2701,8 +2706,8 @@ const yr = (e) => {
2701
2706
  value: G,
2702
2707
  name: e,
2703
2708
  type: "search",
2704
- searchQueries: K,
2705
- setSearchParams: V,
2709
+ searchQueries: p,
2710
+ setSearchParams: P,
2706
2711
  filterKey: c,
2707
2712
  pageKey: g
2708
2713
  });
@@ -2714,8 +2719,8 @@ const yr = (e) => {
2714
2719
  G,
2715
2720
  M,
2716
2721
  e,
2717
- K,
2718
- V,
2722
+ p,
2723
+ P,
2719
2724
  c,
2720
2725
  g
2721
2726
  ]), /* @__PURE__ */ s(
@@ -2723,7 +2728,7 @@ const yr = (e) => {
2723
2728
  {
2724
2729
  gap: "md",
2725
2730
  style: {
2726
- flexDirection: N && k === "left" ? "row" : N && k === "right" ? "row-reverse" : "column"
2731
+ flexDirection: z && E === "left" ? "row" : z && E === "right" ? "row-reverse" : "column"
2727
2732
  },
2728
2733
  align: "flex-end",
2729
2734
  children: [
@@ -2732,7 +2737,7 @@ const yr = (e) => {
2732
2737
  {
2733
2738
  onClick: () => {
2734
2739
  const y = new URLSearchParams(f);
2735
- y.delete(c), V(y), I(""), W(), d && d();
2740
+ y.delete(c), P(y), I(""), W(), d && d();
2736
2741
  },
2737
2742
  secondary: !0,
2738
2743
  children: /* @__PURE__ */ A(Q, { color: "error", fontWeight: "semibold", children: "Reset" })
@@ -2751,7 +2756,7 @@ const yr = (e) => {
2751
2756
  eA
2752
2757
  ]
2753
2758
  },
2754
- `extended-filter-${lA}-${E}`
2759
+ `extended-filter-${lA}-${k}`
2755
2760
  )),
2756
2761
  !!(w != null && w.length) && /* @__PURE__ */ A(
2757
2762
  O,
@@ -2768,9 +2773,9 @@ const yr = (e) => {
2768
2773
  }
2769
2774
  }
2770
2775
  ),
2771
- fullWidth: !N,
2776
+ fullWidth: !z,
2772
2777
  onClick: () => v(!0),
2773
- children: z ? "Filter" : void 0
2778
+ children: K ? "Filter" : void 0
2774
2779
  }
2775
2780
  ),
2776
2781
  l && /* @__PURE__ */ s(
@@ -2820,13 +2825,13 @@ const yr = (e) => {
2820
2825
  value: y,
2821
2826
  name: i,
2822
2827
  type: "dropdown",
2823
- searchQueries: K,
2824
- setSearchParams: V,
2828
+ searchQueries: p,
2829
+ setSearchParams: P,
2825
2830
  filterKey: c
2826
2831
  }),
2827
2832
  placeholder: h ? "All" : "All Status"
2828
2833
  },
2829
- E
2834
+ k
2830
2835
  )
2831
2836
  ]
2832
2837
  }
@@ -2836,12 +2841,12 @@ const yr = (e) => {
2836
2841
  {
2837
2842
  gap: "sm",
2838
2843
  style: {
2839
- width: a && N ? a : N ? "310px" : ""
2844
+ width: a && z ? a : z ? "310px" : ""
2840
2845
  },
2841
2846
  children: [
2842
2847
  h && /* @__PURE__ */ s(J.SubH3, { children: [
2843
2848
  "Search for ",
2844
- b
2849
+ L
2845
2850
  ] }),
2846
2851
  /* @__PURE__ */ A(
2847
2852
  EA,
@@ -2852,7 +2857,7 @@ const yr = (e) => {
2852
2857
  value: G,
2853
2858
  fullWidth: !0
2854
2859
  },
2855
- E + 1 + c
2860
+ k + 1 + c
2856
2861
  )
2857
2862
  ]
2858
2863
  }
@@ -2871,7 +2876,7 @@ const yr = (e) => {
2871
2876
  }
2872
2877
  );
2873
2878
  }, Ji = ({ children: e, borderRadius: i }) => {
2874
- const t = iA(null), [o, r] = L("100vh");
2879
+ const t = iA(null), [o, r] = b("100vh");
2875
2880
  return R(() => {
2876
2881
  const n = () => {
2877
2882
  if (t.current) {
@@ -2992,15 +2997,15 @@ const yr = (e) => {
2992
2997
  showPagination: r = !0,
2993
2998
  totalData: n
2994
2999
  }) => {
2995
- const { searchQueries: l, setSearchParams: c, searchParams: g } = PA(), a = g.get(t), d = (b) => {
2996
- c({ ...l, [i]: String(b) });
2997
- }, w = (b) => {
3000
+ const { searchQueries: l, setSearchParams: c, searchParams: g } = PA(), a = g.get(t), d = (L) => {
3001
+ c({ ...l, [i]: String(L) });
3002
+ }, w = (L) => {
2998
3003
  c({
2999
3004
  ...l,
3000
- [t]: b,
3005
+ [t]: L,
3001
3006
  [i]: "1"
3002
3007
  });
3003
- }, B = (e == null ? void 0 : e.rangeStart) ?? (((e == null ? void 0 : e.currentPage) || 0) > 1 ? (((e == null ? void 0 : e.currentPage) || 0) - 1) * ((e == null ? void 0 : e.perPage) || 0) + 1 : 1), k = (e == null ? void 0 : e.rangeEnd) ?? ((e == null ? void 0 : e.totalCurrentPage) !== (e == null ? void 0 : e.perPage) ? e == null ? void 0 : e.totalData : ((e == null ? void 0 : e.currentPage) || 1) * ((e == null ? void 0 : e.totalCurrentPage) || 0));
3008
+ }, B = (e == null ? void 0 : e.rangeStart) ?? (((e == null ? void 0 : e.currentPage) || 0) > 1 ? (((e == null ? void 0 : e.currentPage) || 0) - 1) * ((e == null ? void 0 : e.perPage) || 0) + 1 : 1), E = (e == null ? void 0 : e.rangeEnd) ?? ((e == null ? void 0 : e.totalCurrentPage) !== (e == null ? void 0 : e.perPage) ? e == null ? void 0 : e.totalData : ((e == null ? void 0 : e.currentPage) || 1) * ((e == null ? void 0 : e.totalCurrentPage) || 0));
3004
3009
  return /* @__PURE__ */ A(
3005
3010
  C,
3006
3011
  {
@@ -3030,16 +3035,16 @@ const yr = (e) => {
3030
3035
  { label: "50", value: "50" },
3031
3036
  { label: "100", value: "100" }
3032
3037
  ],
3033
- onChange: (b) => {
3034
- w(b[0].value);
3038
+ onChange: (L) => {
3039
+ w(L[0].value);
3035
3040
  },
3036
3041
  defaultValue: a ? [{ label: `${a} per row`, value: a }] : [{ label: `${o} per row`, value: `${o}` }]
3037
3042
  }
3038
3043
  ),
3039
- /* @__PURE__ */ A(Q, { children: `${B}-${k} of ${(e == null ? void 0 : e.totalData) || 0}` })
3044
+ /* @__PURE__ */ A(Q, { children: `${B}-${E} of ${(e == null ? void 0 : e.totalData) || 0}` })
3040
3045
  ] }),
3041
3046
  /* @__PURE__ */ A(
3042
- be,
3047
+ Le,
3043
3048
  {
3044
3049
  currentPage: e != null && e.currentPage ? Number(e == null ? void 0 : e.currentPage) : 1,
3045
3050
  totalCount: e != null && e.totalPage ? Number(e == null ? void 0 : e.totalPage) : 1,
@@ -3057,15 +3062,15 @@ const yr = (e) => {
3057
3062
  }
3058
3063
  );
3059
3064
  }, Wi = ({ filter: e, columnTitle: i }) => {
3060
- const [t, o] = L(!1), r = iA(null), n = iA(null), l = iA(null), [c, g] = L(""), [a, d] = L({ top: 0, left: 0 }), w = e.selectedValues, B = cA(() => c ? e.options.filter(
3065
+ const [t, o] = b(!1), r = iA(null), n = iA(null), l = iA(null), [c, g] = b(""), [a, d] = b({ top: 0, left: 0 }), w = e.selectedValues, B = cA(() => c ? e.options.filter(
3061
3066
  (h) => h.label.toLowerCase().includes(c.toLowerCase())
3062
3067
  ) : e.options, [e.options, c]);
3063
3068
  R(() => {
3064
3069
  if (t && n.current) {
3065
- const h = n.current.getBoundingClientRect(), p = 280, z = {
3070
+ const h = n.current.getBoundingClientRect(), N = 280, K = {
3066
3071
  top: h.bottom + 8
3067
3072
  };
3068
- e.position === "left" || h.left + p > window.innerWidth ? z.right = window.innerWidth - h.right : z.left = h.left, d(z);
3073
+ e.position === "left" || h.left + N > window.innerWidth ? K.right = window.innerWidth - h.right : K.left = h.left, d(K);
3069
3074
  }
3070
3075
  }, [t, e.position]), R(() => {
3071
3076
  t && l.current ? setTimeout(() => {
@@ -3073,15 +3078,15 @@ const yr = (e) => {
3073
3078
  return (h = l.current) == null ? void 0 : h.focus();
3074
3079
  }, 50) : g("");
3075
3080
  }, [t]), R(() => {
3076
- const h = (p) => {
3077
- r.current && !r.current.contains(p.target) && n.current && !n.current.contains(p.target) && o(!1);
3081
+ const h = (N) => {
3082
+ r.current && !r.current.contains(N.target) && n.current && !n.current.contains(N.target) && o(!1);
3078
3083
  };
3079
3084
  return t && document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
3080
3085
  }, [t]);
3081
- const k = (h) => {
3082
- const p = w.includes(h) ? w.filter((z) => z !== h) : [...w, h];
3083
- e.onFilterChange(p);
3084
- }, b = () => e.onFilterChange([]);
3086
+ const E = (h) => {
3087
+ const N = w.includes(h) ? w.filter((K) => K !== h) : [...w, h];
3088
+ e.onFilterChange(N);
3089
+ }, L = () => e.onFilterChange([]);
3085
3090
  return /* @__PURE__ */ s(C, { style: { position: "relative" }, children: [
3086
3091
  /* @__PURE__ */ A(
3087
3092
  C,
@@ -3094,8 +3099,8 @@ const yr = (e) => {
3094
3099
  cursor: "pointer"
3095
3100
  },
3096
3101
  onClick: (h) => {
3097
- var p;
3098
- h.stopPropagation(), t || (p = e.onOpen) == null || p.call(e), o((z) => !z);
3102
+ var N;
3103
+ h.stopPropagation(), t || (N = e.onOpen) == null || N.call(e), o((K) => !K);
3099
3104
  },
3100
3105
  children: /* @__PURE__ */ A(
3101
3106
  m,
@@ -3154,7 +3159,7 @@ const yr = (e) => {
3154
3159
  color: "primary",
3155
3160
  fontWeight: "semibold",
3156
3161
  onClick: (h) => {
3157
- h.stopPropagation(), b();
3162
+ h.stopPropagation(), L();
3158
3163
  },
3159
3164
  children: "CLEAR"
3160
3165
  }
@@ -3245,14 +3250,14 @@ const yr = (e) => {
3245
3250
  transition: "all 0.2s ease",
3246
3251
  backgroundColor: w.includes(h.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent"
3247
3252
  },
3248
- onClick: (p) => {
3249
- p.stopPropagation(), k(h.value);
3253
+ onClick: (N) => {
3254
+ N.stopPropagation(), E(h.value);
3250
3255
  },
3251
- onMouseEnter: (p) => {
3252
- w.includes(h.value) || (p.currentTarget.style.backgroundColor = "rgb(var(--starasia-ui-raw-color-gray-50))"), p.currentTarget.style.transform = "translateX(2px)";
3256
+ onMouseEnter: (N) => {
3257
+ w.includes(h.value) || (N.currentTarget.style.backgroundColor = "rgb(var(--starasia-ui-raw-color-gray-50))"), N.currentTarget.style.transform = "translateX(2px)";
3253
3258
  },
3254
- onMouseLeave: (p) => {
3255
- p.currentTarget.style.backgroundColor = w.includes(h.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent", p.currentTarget.style.transform = "translateX(0)";
3259
+ onMouseLeave: (N) => {
3260
+ N.currentTarget.style.backgroundColor = w.includes(h.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent", N.currentTarget.style.transform = "translateX(0)";
3256
3261
  },
3257
3262
  children: [
3258
3263
  /* @__PURE__ */ A(
@@ -3378,24 +3383,24 @@ const yr = (e) => {
3378
3383
  scrollParentRef: d,
3379
3384
  frozenCount: w = 0,
3380
3385
  onFrozenCountChange: B,
3381
- customActions: k,
3382
- actionsOrder: b = ["detail", "update", "delete", "custom"],
3386
+ customActions: E,
3387
+ actionsOrder: L = ["detail", "update", "delete", "custom"],
3383
3388
  customEmptyState: h
3384
3389
  }) => {
3385
- const z = [t, o, r].filter((M) => M !== void 0).length, Z = !!k, v = z === 3 ? Z ? "178px" : "140px" : z === 2 ? Z ? "140px" : "102px" : z === 1 ? Z ? "112px" : "74px" : Z ? "74px" : "", E = (M, G) => {
3390
+ const K = [t, o, r].filter((M) => M !== void 0).length, Z = !!E, v = K === 3 ? Z ? "178px" : "140px" : K === 2 ? Z ? "140px" : "102px" : K === 1 ? Z ? "112px" : "74px" : Z ? "74px" : "", k = (M, G) => {
3386
3391
  if (!G) return M;
3387
3392
  if (typeof G == "function") return G(M);
3388
3393
  if (typeof G == "string") return M[G];
3389
- }, [D, W] = L(!1);
3394
+ }, [D, W] = b(!1);
3390
3395
  R(() => {
3391
3396
  if (!(d != null && d.current)) return;
3392
3397
  const M = d.current;
3393
3398
  W(M.scrollHeight > M.clientHeight);
3394
3399
  }, [i, d]);
3395
- const f = iA(null), [V, P] = L([]);
3400
+ const f = iA(null), [P, X] = b([]);
3396
3401
  qA(() => {
3397
3402
  if (!w || !f.current) {
3398
- P([]);
3403
+ X([]);
3399
3404
  return;
3400
3405
  }
3401
3406
  const M = Array.from(
@@ -3404,9 +3409,9 @@ const yr = (e) => {
3404
3409
  let I = 0;
3405
3410
  M.forEach((u, j) => {
3406
3411
  G[j] = I, j < w && (I += u.offsetWidth);
3407
- }), P(G);
3412
+ }), X(G);
3408
3413
  }, [w, e, i]);
3409
- const K = (M) => {
3414
+ const p = (M) => {
3410
3415
  B && B(M < w ? M : M + 1);
3411
3416
  };
3412
3417
  return /* @__PURE__ */ A("div", { ref: f, children: /* @__PURE__ */ s(ae, { fullWidth: !0, children: [
@@ -3420,7 +3425,7 @@ const yr = (e) => {
3420
3425
  children: /* @__PURE__ */ s(uA, { children: [
3421
3426
  e.map((M, G) => {
3422
3427
  var j;
3423
- const I = w > 0 && G < w, u = V[G] ?? 0;
3428
+ const I = w > 0 && G < w, u = P[G] ?? 0;
3424
3429
  return /* @__PURE__ */ A(
3425
3430
  VA,
3426
3431
  {
@@ -3458,7 +3463,7 @@ const yr = (e) => {
3458
3463
  B && /* @__PURE__ */ A(
3459
3464
  "button",
3460
3465
  {
3461
- onClick: () => K(G),
3466
+ onClick: () => p(G),
3462
3467
  title: I ? "Unfreeze column" : "Freeze column",
3463
3468
  style: {
3464
3469
  background: "none",
@@ -3482,7 +3487,7 @@ const yr = (e) => {
3482
3487
  `table-head-${G}`
3483
3488
  );
3484
3489
  }),
3485
- t || o || r || k ? /* @__PURE__ */ A(
3490
+ t || o || r || E ? /* @__PURE__ */ A(
3486
3491
  VA,
3487
3492
  {
3488
3493
  style: {
@@ -3530,13 +3535,13 @@ const yr = (e) => {
3530
3535
  },
3531
3536
  children: [
3532
3537
  e.map((I, u) => {
3533
- const j = I.render ? I.render(M, G, i) : E(M, I.accessor), q = w > 0 && u < w, N = V[u] ?? 0;
3538
+ const j = I.render ? I.render(M, G, i) : k(M, I.accessor), q = w > 0 && u < w, z = P[u] ?? 0;
3534
3539
  return /* @__PURE__ */ A(
3535
3540
  BA,
3536
3541
  {
3537
3542
  style: {
3538
3543
  position: q ? "sticky" : void 0,
3539
- left: q ? N : void 0,
3544
+ left: q ? z : void 0,
3540
3545
  zIndex: q ? 1 : void 0,
3541
3546
  backgroundColor: q ? SA : void 0,
3542
3547
  paddingLeft: u === 0 ? "12px" : "",
@@ -3561,13 +3566,13 @@ const yr = (e) => {
3561
3566
  `row-${G}-col-${u}`
3562
3567
  );
3563
3568
  }),
3564
- t || o || r || k ? /* @__PURE__ */ A(BA, { style: {
3569
+ t || o || r || E ? /* @__PURE__ */ A(BA, { style: {
3565
3570
  width: v,
3566
3571
  position: "sticky",
3567
3572
  right: 0,
3568
3573
  zIndex: 1,
3569
3574
  backgroundColor: SA
3570
- }, children: /* @__PURE__ */ A(T, { direction: "row", align: "center", justify: "center", gap: "sm", children: b.map((I) => {
3575
+ }, children: /* @__PURE__ */ A(T, { direction: "row", align: "center", justify: "center", gap: "sm", children: L.map((I) => {
3571
3576
  const u = G === i.length - 1 ? "top" : "bottom";
3572
3577
  return I === "detail" && t && (g == null ? void 0 : g(M)) !== !1 ? /* @__PURE__ */ A(rA, { label: "Detail", position: u, children: /* @__PURE__ */ A(
3573
3578
  O,
@@ -3593,7 +3598,7 @@ const yr = (e) => {
3593
3598
  onClick: () => r(M.id, M),
3594
3599
  iconLeft: /* @__PURE__ */ A(m, { name: "Trash1", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-red-600))" } })
3595
3600
  }
3596
- ) }, "delete") : I === "custom" ? /* @__PURE__ */ A(aA.Fragment, { children: k == null ? void 0 : k(M) }, "custom") : null;
3601
+ ) }, "delete") : I === "custom" ? /* @__PURE__ */ A(aA.Fragment, { children: E == null ? void 0 : E(M) }, "custom") : null;
3597
3602
  }) }) }) : null
3598
3603
  ]
3599
3604
  },
@@ -3607,7 +3612,7 @@ const yr = (e) => {
3607
3612
  footerProps: o
3608
3613
  }) => {
3609
3614
  var w;
3610
- const r = iA(null), [n, l] = L(
3615
+ const r = iA(null), [n, l] = b(
3611
3616
  (i == null ? void 0 : i.defaultFrozenCount) ?? 0
3612
3617
  ), c = (t == null ? void 0 : t.show) ?? !0, g = iA(null), a = (w = i == null ? void 0 : i.pagination) == null ? void 0 : w.totalData;
3613
3618
  typeof a == "number" && (g.current = a);
@@ -3958,12 +3963,12 @@ const pr = Vi(Pi), yA = ({
3958
3963
  JA,
3959
3964
  {
3960
3965
  dataApps: (w = (d = l.data) == null ? void 0 : d.organizations) == null ? void 0 : w.map((B) => {
3961
- var k;
3966
+ var E;
3962
3967
  return {
3963
3968
  ...B,
3964
3969
  id: B.id,
3965
3970
  isTenant: !0,
3966
- applicationKey: ((k = l.data) == null ? void 0 : k.applicationKey) || ""
3971
+ applicationKey: ((E = l.data) == null ? void 0 : E.applicationKey) || ""
3967
3972
  };
3968
3973
  }),
3969
3974
  handleSwitch: o,
@@ -4026,7 +4031,7 @@ const pr = Vi(Pi), yA = ({
4026
4031
  variant: l = "single-api",
4027
4032
  isLoading: c
4028
4033
  }) => {
4029
- const [g, a] = L(!1), [d, w] = L("");
4034
+ const [g, a] = b(!1), [d, w] = b("");
4030
4035
  return /* @__PURE__ */ s(U, { children: [
4031
4036
  /* @__PURE__ */ s(
4032
4037
  C,
@@ -4344,7 +4349,7 @@ const pr = Vi(Pi), yA = ({
4344
4349
  );
4345
4350
  }, it = (e, i) => typeof e == "string" && e || i === "error" ? "var(--starasia-ui-color-error)" : "var(--starasia-ui-text-disable)", tt = (e) => {
4346
4351
  var c;
4347
- const [i, t] = L(!1), o = (g) => {
4352
+ const [i, t] = b(!1), o = (g) => {
4348
4353
  g.preventDefault(), g.stopPropagation();
4349
4354
  }, r = (g) => {
4350
4355
  g.preventDefault(), g.stopPropagation(), g.dataTransfer && e.handleOnFileChange(g.dataTransfer.files.item(0));
@@ -4485,7 +4490,7 @@ const nt = (e) => {
4485
4490
  style: {
4486
4491
  textWrap: "nowrap"
4487
4492
  },
4488
- children: e.fileDate ? e.fileDate : bA(/* @__PURE__ */ new Date())
4493
+ children: e.fileDate ? e.fileDate : LA(/* @__PURE__ */ new Date())
4489
4494
  }
4490
4495
  )
4491
4496
  ] })
@@ -4753,7 +4758,7 @@ const nt = (e) => {
4753
4758
  name: B.name,
4754
4759
  value: B.id,
4755
4760
  checked: B.isChecked,
4756
- onChange: (k) => n.onChecked(k.target.value, B),
4761
+ onChange: (E) => n.onChecked(E.target.value, B),
4757
4762
  label: B.name,
4758
4763
  description: B.description
4759
4764
  }
@@ -4767,7 +4772,7 @@ const nt = (e) => {
4767
4772
  name: B.name,
4768
4773
  value: B.id,
4769
4774
  checked: B.isChecked,
4770
- onChange: (k) => n.onChecked(k.target.value, B),
4775
+ onChange: (E) => n.onChecked(E.target.value, B),
4771
4776
  label: B.name,
4772
4777
  description: B.description
4773
4778
  }
@@ -5029,9 +5034,9 @@ const nt = (e) => {
5029
5034
  ...t
5030
5035
  }) => {
5031
5036
  const o = WA(), r = (l) => {
5032
- var g, a, d, w, B, k;
5037
+ var g, a, d, w, B, E;
5033
5038
  if (!l) return;
5034
- const c = t.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary" ? "var(--starasia-ui-text-color-secondary)" : e === "secondary-danger" ? (a = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.red) == null ? void 0 : a[600] : e === "secondary-primary" ? (w = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.blue) == null ? void 0 : w[700] : (k = (B = o == null ? void 0 : o.computed) == null ? void 0 : B.gray) == null ? void 0 : k[50];
5039
+ const c = t.disabled ? "var(--starasia-ui-text-color-primary-disable)" : e === "secondary" ? "var(--starasia-ui-text-color-secondary)" : e === "secondary-danger" ? (a = (g = o == null ? void 0 : o.computed) == null ? void 0 : g.red) == null ? void 0 : a[600] : e === "secondary-primary" ? (w = (d = o == null ? void 0 : o.computed) == null ? void 0 : d.blue) == null ? void 0 : w[700] : (E = (B = o == null ? void 0 : o.computed) == null ? void 0 : B.gray) == null ? void 0 : E[50];
5035
5040
  return /* @__PURE__ */ A(m, { name: l, size: i, style: { color: c } });
5036
5041
  }, n = () => {
5037
5042
  var c, g, a, d;
@@ -5216,34 +5221,34 @@ const oe = {
5216
5221
  maxFileSize: g = 2,
5217
5222
  onError: a
5218
5223
  }, d) => {
5219
- const w = $("md"), [B, k] = L(!1), [b, h] = L(null), [p, z] = L(!1), [Z, v] = L({ x: 0, y: 0 }), [E, D] = L(1), [W, f] = L(null);
5224
+ const w = $("md"), [B, E] = b(!1), [L, h] = b(null), [N, K] = b(!1), [Z, v] = b({ x: 0, y: 0 }), [k, D] = b(1), [W, f] = b(null);
5220
5225
  R(() => {
5221
5226
  i === null && r(null);
5222
5227
  }, [i]);
5223
- const V = QA(
5224
- (N, y) => {
5228
+ const P = QA(
5229
+ (z, y) => {
5225
5230
  f(y);
5226
5231
  },
5227
5232
  []
5228
- ), P = (N) => {
5233
+ ), X = (z) => {
5229
5234
  var tA;
5230
- const y = (tA = N.target.files) == null ? void 0 : tA[0];
5235
+ const y = (tA = z.target.files) == null ? void 0 : tA[0];
5231
5236
  if (!y) return;
5232
5237
  const eA = new FileReader();
5233
5238
  eA.onload = () => {
5234
- h(eA.result), z(!0);
5239
+ h(eA.result), K(!0);
5235
5240
  }, eA.readAsDataURL(y);
5236
- }, K = async () => {
5237
- if (!(!b || !W))
5241
+ }, p = async () => {
5242
+ if (!(!L || !W))
5238
5243
  try {
5239
- const N = await Qt(b, W);
5240
- if (g && N.size > g * 1024 * 1024) {
5244
+ const z = await Qt(L, W);
5245
+ if (g && z.size > g * 1024 * 1024) {
5241
5246
  a == null || a(`Ukuran file maksimal ${g}MB`);
5242
5247
  return;
5243
5248
  }
5244
- e == null || e(N);
5245
- const y = URL.createObjectURL(N);
5246
- r(y, N), z(!1);
5249
+ e == null || e(z);
5250
+ const y = URL.createObjectURL(z);
5251
+ r(y, z), K(!1);
5247
5252
  } catch {
5248
5253
  a == null || a("Gagal memproses gambar");
5249
5254
  }
@@ -5252,8 +5257,8 @@ const oe = {
5252
5257
  };
5253
5258
  ze(d, () => ({
5254
5259
  openFileDialog: () => {
5255
- var N;
5256
- (N = M.current) == null || N.click();
5260
+ var z;
5261
+ (z = M.current) == null || z.click();
5257
5262
  }
5258
5263
  }));
5259
5264
  const I = parseInt(n, 10), u = oe[l];
@@ -5277,8 +5282,8 @@ const oe = {
5277
5282
  aspectRatio: u,
5278
5283
  flexShrink: 0
5279
5284
  },
5280
- onMouseEnter: () => k(!0),
5281
- onMouseLeave: () => k(!1),
5285
+ onMouseEnter: () => E(!0),
5286
+ onMouseLeave: () => E(!1),
5282
5287
  children: [
5283
5288
  o || i ? /* @__PURE__ */ A(
5284
5289
  "img",
@@ -5334,7 +5339,7 @@ const oe = {
5334
5339
  ref: M,
5335
5340
  type: "file",
5336
5341
  accept: "image/*",
5337
- onChange: P,
5342
+ onChange: X,
5338
5343
  disabled: t,
5339
5344
  style: { display: "none" }
5340
5345
  }
@@ -5390,8 +5395,8 @@ const oe = {
5390
5395
  /* @__PURE__ */ s(
5391
5396
  DA,
5392
5397
  {
5393
- isShow: p,
5394
- onHide: () => z(!1),
5398
+ isShow: N,
5399
+ onHide: () => K(!1),
5395
5400
  style: {
5396
5401
  minWidth: w ? l === "1:1" ? "20rem" : j * 2 : "100%"
5397
5402
  },
@@ -5405,16 +5410,16 @@ const oe = {
5405
5410
  height: "20rem",
5406
5411
  backgroundColor: "gray-100"
5407
5412
  },
5408
- children: b && /* @__PURE__ */ A(
5413
+ children: L && /* @__PURE__ */ A(
5409
5414
  Ze,
5410
5415
  {
5411
- image: b,
5416
+ image: L,
5412
5417
  crop: Z,
5413
- zoom: E,
5418
+ zoom: k,
5414
5419
  aspect: l ? oe[l] : void 0,
5415
5420
  onCropChange: v,
5416
5421
  onZoomChange: D,
5417
- onCropComplete: V,
5422
+ onCropComplete: P,
5418
5423
  objectFit: "contain",
5419
5424
  minZoom: 0.5,
5420
5425
  restrictPosition: !1
@@ -5423,8 +5428,8 @@ const oe = {
5423
5428
  }
5424
5429
  ) }),
5425
5430
  /* @__PURE__ */ A(pA, { children: /* @__PURE__ */ s(C, { justify: "flex-end", direction: "row", gap: "sm", children: [
5426
- /* @__PURE__ */ A(O, { size: "xs", secondary: !0, onClick: () => z(!1), children: "Cancel" }),
5427
- /* @__PURE__ */ A(O, { size: "xs", primary: !0, onClick: K, children: "Crop" })
5431
+ /* @__PURE__ */ A(O, { size: "xs", secondary: !0, onClick: () => K(!1), children: "Cancel" }),
5432
+ /* @__PURE__ */ A(O, { size: "xs", primary: !0, onClick: p, children: "Crop" })
5428
5433
  ] }) })
5429
5434
  ]
5430
5435
  }
@@ -5590,7 +5595,7 @@ const oe = {
5590
5595
  disabled: n = !1
5591
5596
  }) => {
5592
5597
  var d;
5593
- const [l, c] = L([]);
5598
+ const [l, c] = b([]);
5594
5599
  R(() => {
5595
5600
  e && c([...e.map((w) => ({ id: w.id, isActive: w.isActive }))]);
5596
5601
  }, [e]);
@@ -5632,7 +5637,7 @@ const oe = {
5632
5637
  InputImgFile: ut,
5633
5638
  Custom: Dt
5634
5639
  }, It = ({ customBottom: e }) => {
5635
- const [i, t] = L(!1), o = () => {
5640
+ const [i, t] = b(!1), o = () => {
5636
5641
  window.scrollY > window.screenY ? t(!0) : t(!1);
5637
5642
  }, r = () => {
5638
5643
  window.scrollTo({ top: 0, behavior: "smooth" });
@@ -7228,7 +7233,7 @@ const Ur = (e) => {
7228
7233
  paddingInline: r = "spacing-0",
7229
7234
  paddingBlock: n = "spacing-0"
7230
7235
  }) => {
7231
- const l = iA(null), [c, g] = L("100vh");
7236
+ const l = iA(null), [c, g] = b("100vh");
7232
7237
  return R(() => {
7233
7238
  const a = () => {
7234
7239
  if (l.current) {
@@ -7314,14 +7319,14 @@ function Vr(e) {
7314
7319
  var g, a;
7315
7320
  const n = ((a = (g = i == null ? void 0 : i.access) == null ? void 0 : g.role) == null ? void 0 : a.code) ?? "", l = Object.keys(e.role).reduce(
7316
7321
  (d, w) => {
7317
- const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (k) => k.replace("_", "").toUpperCase())}`;
7322
+ const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (E) => E.replace("_", "").toUpperCase())}`;
7318
7323
  return { ...d, [B]: !1 };
7319
7324
  },
7320
7325
  {}
7321
7326
  );
7322
7327
  return {
7323
7328
  ...Object.keys(e.role).reduce((d, w) => {
7324
- const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (k) => k.replace("_", "").toUpperCase())}`;
7329
+ const B = `is${w.toLowerCase().replace(/(^\w|_\w)/g, (E) => E.replace("_", "").toUpperCase())}`;
7325
7330
  return {
7326
7331
  ...d,
7327
7332
  [B]: n === e.role[w]
@@ -7380,13 +7385,13 @@ export {
7380
7385
  wr as cssVars,
7381
7386
  hr as formHasChanged,
7382
7387
  Br as formatDate,
7383
- bA as formatDateToIndonesian,
7388
+ LA as formatDateToIndonesian,
7384
7389
  ar as formatRupiah,
7385
7390
  Or as getDateFilterValue,
7386
7391
  Gr as getDateRangeFilterValue,
7387
7392
  Cr as getInitials,
7388
- Lr as getValueDropdownMultipleFilter,
7389
- br as getValueRadioFilter,
7393
+ br as getValueDropdownMultipleFilter,
7394
+ Lr as getValueRadioFilter,
7390
7395
  Ki as getValueSearch,
7391
7396
  KA as getValuesFilter,
7392
7397
  re as handleChangeFilter,