@starasia/admin 1.2.6 → 1.2.7

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
@@ -35,7 +35,7 @@ export * from "@starasia/theme";
35
35
  export * from "@starasia/toast";
36
36
  import { Toggle as ee } from "@starasia/toggle";
37
37
  export * from "@starasia/toggle";
38
- import { Tooltip as eA } from "@starasia/tooltip";
38
+ import { Tooltip as iA } from "@starasia/tooltip";
39
39
  export * from "@starasia/tooltip";
40
40
  import { Checkbox as FA } from "@starasia/checkbox";
41
41
  export * from "@starasia/checkbox";
@@ -54,7 +54,7 @@ export * from "@starasia/story-record";
54
54
  import { Skeleton as lA } from "@starasia/skeleton";
55
55
  export * from "@starasia/skeleton";
56
56
  import { jsx as A, jsxs as g, Fragment as W } from "react/jsx-runtime";
57
- import cA, { createContext as Ee, useState as p, useContext as me, memo as _, useRef as iA, useEffect as v, useLayoutEffect as zA, useMemo as oA, isValidElement as ie, forwardRef as HA, useCallback as JA, Children as ye, useImperativeHandle as xe } from "react";
57
+ import cA, { createContext as Ee, useState as b, useContext as me, memo as _, useRef as AA, useEffect as R, useLayoutEffect as zA, useMemo as oA, isValidElement as ie, forwardRef as HA, useCallback as JA, Children as ye, useImperativeHandle as xe } from "react";
58
58
  import "@starasia/css/dist/style.css";
59
59
  import { useSearchParams as uA, useNavigate as te, useLocation as SA, Outlet as WA, Link as fe, useParams as re } from "react-router";
60
60
  import Se from "react-easy-crop";
@@ -67,7 +67,7 @@ const Le = {
67
67
  setUserData: () => {
68
68
  }
69
69
  }, oe = Ee(Le), be = () => me(oe), Ge = (e) => {
70
- const [i, r] = p(
70
+ const [i, r] = b(
71
71
  (e == null ? void 0 : e.initialUserData) || null
72
72
  );
73
73
  return {
@@ -288,8 +288,8 @@ function Zt({
288
288
  sidebarHeaderContent: c,
289
289
  showModuleSwitcher: s = !0
290
290
  }) {
291
- const [C] = uA(), Q = C.get("embed") === "true", w = be(), B = te(), u = SA(), D = !V("md"), [G, O] = p(!1), [F, U] = p(!1), [Y, k] = p(!1), [Z, H] = p(/* @__PURE__ */ new Set()), [P, X] = p(!1), [q, E] = p(!1), [f, M] = p(null), h = iA(null), N = iA(null);
292
- v(() => {
291
+ const [C] = uA(), Q = C.get("embed") === "true", w = be(), B = te(), u = SA(), D = !V("md"), [O, Y] = b(!1), [F, U] = b(!1), [p, k] = b(!1), [Z, H] = b(/* @__PURE__ */ new Set()), [P, X] = b(!1), [q, E] = b(!1), [f, M] = b(null), h = AA(null), N = AA(null);
292
+ R(() => {
293
293
  const I = h.current;
294
294
  if (!I) return;
295
295
  const y = () => {
@@ -317,44 +317,44 @@ function Zt({
317
317
  );
318
318
  I && I.scrollIntoView({ block: "center", behavior: "instant" });
319
319
  }));
320
- }, [w.menus]), v(() => {
320
+ }, [w.menus]), R(() => {
321
321
  gA = !0, x();
322
- const I = setTimeout(x, 0), y = setTimeout(x, 50), S = setTimeout(x, 100), R = setTimeout(x, 200), AA = setTimeout(() => {
322
+ const I = setTimeout(x, 0), y = setTimeout(x, 50), S = setTimeout(x, 100), v = setTimeout(x, 200), eA = setTimeout(() => {
323
323
  gA = !1;
324
324
  }, 300);
325
325
  return () => {
326
- clearTimeout(I), clearTimeout(y), clearTimeout(S), clearTimeout(R), clearTimeout(AA);
326
+ clearTimeout(I), clearTimeout(y), clearTimeout(S), clearTimeout(v), clearTimeout(eA);
327
327
  };
328
- }, [u.pathname]), v(() => {
328
+ }, [u.pathname]), R(() => {
329
329
  N.current && (N.current.scrollTop = 0);
330
- }, [u.pathname]), v(() => {
330
+ }, [u.pathname]), R(() => {
331
331
  D && k(!1);
332
- }, [u.pathname, D]), v(() => {
332
+ }, [u.pathname, D]), R(() => {
333
333
  D && U(!0);
334
334
  }, [D]);
335
335
  const T = () => {
336
- O(!0);
336
+ Y(!0);
337
337
  }, tA = () => {
338
- O(!1);
338
+ Y(!1);
339
339
  }, wA = () => {
340
- O(!1), t();
340
+ Y(!1), t();
341
341
  }, MA = w.menus.flatMap(
342
342
  (I) => I.items.flatMap((y) => {
343
343
  const S = [y.to];
344
- return y.children && S.push(...y.children.map((R) => R.to)), S;
344
+ return y.children && S.push(...y.children.map((v) => v.to)), S;
345
345
  })
346
346
  ), CA = (I) => {
347
347
  if (!u.pathname.startsWith(I)) return !1;
348
- const y = MA.filter((S) => u.pathname.startsWith(S)).sort((S, R) => R.length - S.length)[0];
348
+ const y = MA.filter((S) => u.pathname.startsWith(S)).sort((S, v) => v.length - S.length)[0];
349
349
  return I === y;
350
350
  };
351
- v(() => {
351
+ R(() => {
352
352
  w.menus.forEach((I) => {
353
353
  I.items.forEach((y) => {
354
354
  var S;
355
- (S = y.children) != null && S.some((R) => u.pathname.startsWith(R.to)) && H((R) => {
356
- const AA = new Set(R);
357
- return AA.add(y.id), AA;
355
+ (S = y.children) != null && S.some((v) => u.pathname.startsWith(v.to)) && H((v) => {
356
+ const eA = new Set(v);
357
+ return eA.add(y.id), eA;
358
358
  });
359
359
  });
360
360
  });
@@ -365,11 +365,11 @@ function Zt({
365
365
  return S.has(I) ? S.delete(I) : S.add(I), S;
366
366
  });
367
367
  };
368
- v(() => {
368
+ R(() => {
369
369
  if (w.menus.length === 0) return;
370
370
  const I = localStorage.getItem("moduleSwitcherGroupId");
371
371
  if (I !== null) {
372
- const y = Number(I), S = w.menus.some((R) => R.id === y);
372
+ const y = Number(I), S = w.menus.some((v) => v.id === y);
373
373
  M(S ? y : null);
374
374
  }
375
375
  }, [w.menus]);
@@ -379,8 +379,8 @@ function Zt({
379
379
  localStorage.removeItem("moduleSwitcherGroupId");
380
380
  else {
381
381
  localStorage.setItem("moduleSwitcherGroupId", String(I));
382
- const S = w.menus.find((AA) => AA.id === I), R = (y = S == null ? void 0 : S.items[0]) == null ? void 0 : y.to;
383
- R && B(R);
382
+ const S = w.menus.find((eA) => eA.id === I), v = (y = S == null ? void 0 : S.items[0]) == null ? void 0 : y.to;
383
+ v && B(v);
384
384
  }
385
385
  }, bA = oA(() => {
386
386
  if (f !== null)
@@ -396,9 +396,9 @@ function Zt({
396
396
  () => bA.filter((I) => I.parentGroupId !== void 0 || I.id === 18).flatMap((I) => I.items),
397
397
  [bA]
398
398
  );
399
- return v(() => {
399
+ return R(() => {
400
400
  X(!1);
401
- }, [u.pathname]), v(() => {
401
+ }, [u.pathname]), R(() => {
402
402
  s || E(!1);
403
403
  }, [s]), Q ? /* @__PURE__ */ A("main", { style: { height: "100vh", overflowY: "auto", backgroundColor: "#f9fafb" }, children: e || /* @__PURE__ */ A(WA, {}) }) : /* @__PURE__ */ g(W, { children: [
404
404
  /* @__PURE__ */ g(
@@ -419,8 +419,8 @@ function Zt({
419
419
  inset: 0,
420
420
  backgroundColor: "rgba(0, 0, 0, 0.5)",
421
421
  zIndex: 40,
422
- opacity: Y ? 0.5 : 0,
423
- pointerEvents: Y ? "auto" : "none",
422
+ opacity: p ? 0.5 : 0,
423
+ pointerEvents: p ? "auto" : "none",
424
424
  transition: "opacity 0.3s"
425
425
  },
426
426
  onClick: () => k(!1)
@@ -435,7 +435,7 @@ function Zt({
435
435
  ...D && {
436
436
  inset: 0,
437
437
  zIndex: 50,
438
- transform: Y ? "translateX(0)" : "translateX(-100%)"
438
+ transform: p ? "translateX(0)" : "translateX(-100%)"
439
439
  },
440
440
  backgroundColor: "white",
441
441
  borderRight: "1px solid #e5e7eb",
@@ -479,7 +479,7 @@ function Zt({
479
479
  }
480
480
  }
481
481
  ),
482
- (!F || Y) && /* @__PURE__ */ A(
482
+ (!F || p) && /* @__PURE__ */ A(
483
483
  "span",
484
484
  {
485
485
  style: {
@@ -645,8 +645,8 @@ function Zt({
645
645
  }
646
646
  ),
647
647
  /* @__PURE__ */ A("div", { style: { paddingLeft: "0.5rem", paddingRight: "0.5rem" }, children: I.items.map((y) => {
648
- const S = y.children && y.children.length > 0, R = Z.has(y.id), AA = S ? y.children.some(($) => CA($.to)) : CA(y.to);
649
- return /* @__PURE__ */ g("div", { "data-menu-active": AA || void 0, children: [
648
+ const S = y.children && y.children.length > 0, v = Z.has(y.id), eA = S ? y.children.some(($) => CA($.to)) : CA(y.to);
649
+ return /* @__PURE__ */ g("div", { "data-menu-active": eA || void 0, children: [
650
650
  /* @__PURE__ */ g(
651
651
  "button",
652
652
  {
@@ -665,17 +665,17 @@ function Zt({
665
665
  borderRadius: "0.5rem",
666
666
  textAlign: "left",
667
667
  border: "none",
668
- backgroundColor: AA ? "#dbeafe" : "transparent",
669
- color: AA ? "#1e40af" : "#374151",
668
+ backgroundColor: eA ? "#dbeafe" : "transparent",
669
+ color: eA ? "#1e40af" : "#374151",
670
670
  transition: "all 0.2s",
671
671
  cursor: "pointer"
672
672
  },
673
673
  title: F && !D ? y.title : void 0,
674
674
  onMouseEnter: ($) => {
675
- AA || ($.currentTarget.style.backgroundColor = "#f3f4f6");
675
+ eA || ($.currentTarget.style.backgroundColor = "#f3f4f6");
676
676
  },
677
677
  onMouseLeave: ($) => {
678
- AA || ($.currentTarget.style.backgroundColor = "transparent");
678
+ eA || ($.currentTarget.style.backgroundColor = "transparent");
679
679
  },
680
680
  children: [
681
681
  /* @__PURE__ */ A(m, { name: y.icon, size: "sm", style: { flexShrink: 0 } }),
@@ -701,7 +701,7 @@ function Zt({
701
701
  height: "1rem",
702
702
  flexShrink: 0,
703
703
  transition: "transform 0.2s",
704
- transform: R ? "rotate(180deg)" : "rotate(0deg)"
704
+ transform: v ? "rotate(180deg)" : "rotate(0deg)"
705
705
  },
706
706
  fill: "none",
707
707
  stroke: "currentColor",
@@ -730,9 +730,9 @@ function Zt({
730
730
  borderLeft: "1px solid #e5e7eb",
731
731
  overflow: "hidden",
732
732
  transition: "all 0.3s ease-in-out",
733
- maxHeight: R ? `${y.children.length * 44}px` : "0px",
734
- opacity: R ? 1 : 0,
735
- marginTop: R ? "0.25rem" : "0px"
733
+ maxHeight: v ? `${y.children.length * 44}px` : "0px",
734
+ opacity: v ? 1 : 0,
735
+ marginTop: v ? "0.25rem" : "0px"
736
736
  },
737
737
  children: y.children.map(($) => /* @__PURE__ */ g(
738
738
  "button",
@@ -1089,7 +1089,7 @@ function Zt({
1089
1089
  onSelect: se
1090
1090
  }
1091
1091
  ),
1092
- /* @__PURE__ */ g(dA, { isShow: G, onHide: tA, children: [
1092
+ /* @__PURE__ */ g(dA, { isShow: O, onHide: tA, children: [
1093
1093
  /* @__PURE__ */ A(BA, { children: "Confirmation Logout" }),
1094
1094
  /* @__PURE__ */ A(hA, { children: "Are you sure you want to end the session and exit the page?" }),
1095
1095
  /* @__PURE__ */ A(xA, { children: /* @__PURE__ */ A(a, { display: "flex", align: "flex-end", justify: "center", children: /* @__PURE__ */ g(J, { direction: "row", gap: "sm", align: "center", children: [
@@ -1363,14 +1363,14 @@ const Ht = _(
1363
1363
  }
1364
1364
  Q(-1, { replace: !0 });
1365
1365
  }, u = () => n ? ie(n) ? n : /* @__PURE__ */ A(a, { direction: "row", gap: "lg", children: n.map(
1366
- ({ title: O, icon: F, buttonProps: U, onClick: Y }, k) => !O && !F ? null : /* @__PURE__ */ A(
1366
+ ({ title: Y, icon: F, buttonProps: U, onClick: p }, k) => !Y && !F ? null : /* @__PURE__ */ A(
1367
1367
  L,
1368
1368
  {
1369
1369
  fullWidth: !C,
1370
1370
  iconLeft: F ? /* @__PURE__ */ A(m, { name: F, size: "md" }) : void 0,
1371
- onClick: Y,
1371
+ onClick: p,
1372
1372
  ...U,
1373
- children: O
1373
+ children: Y
1374
1374
  },
1375
1375
  `action-${k}`
1376
1376
  )
@@ -1439,17 +1439,17 @@ const Ht = _(
1439
1439
  align: "center",
1440
1440
  children: [
1441
1441
  typeof i == "string" ? /* @__PURE__ */ g(a, { direction: "row", gap: "lg", align: "center", children: [
1442
- /* @__PURE__ */ A(d, { fontSize: "4xl", fontWeight: "semibold", fontFamily: "Poppins", children: i }),
1442
+ /* @__PURE__ */ A(d, { variant: "h2", fontWeight: "semibold", fontFamily: "Poppins", children: i }),
1443
1443
  r && /* @__PURE__ */ A(XA, { border: !0, size: "lg", text: r, ...l })
1444
1444
  ] }) : i,
1445
1445
  u()
1446
1446
  ]
1447
1447
  }
1448
1448
  )
1449
- ] }), G = () => o;
1449
+ ] }), O = () => o;
1450
1450
  return /* @__PURE__ */ g(a, { gap: "lg", variant: "main", ...c, children: [
1451
1451
  t && D(),
1452
- G()
1452
+ O()
1453
1453
  ] });
1454
1454
  }, Tt = _(Ke), Ze = {
1455
1455
  icon: "Cross",
@@ -1566,18 +1566,18 @@ const Ht = _(
1566
1566
  headerProps: u = { borderBottom: !0 },
1567
1567
  variantTag: j = "info"
1568
1568
  }) => {
1569
- const D = V("lg"), [G, O] = uA(), F = G.get(s), U = DA(G.toString()), Y = JA(
1569
+ const D = V("lg"), [O, Y] = uA(), F = O.get(s), U = DA(O.toString()), p = JA(
1570
1570
  ({ target: { value: P } }) => {
1571
- c && c(P), s && O({ ...U, [s]: P });
1571
+ c && c(P), s && Y({ ...U, [s]: P });
1572
1572
  },
1573
- [s, c, O, U]
1573
+ [s, c, Y, U]
1574
1574
  ), k = () => /* @__PURE__ */ A(
1575
1575
  IA,
1576
1576
  {
1577
1577
  placeholder: C,
1578
1578
  highlightPlaceholder: Q,
1579
1579
  leftIcon: /* @__PURE__ */ A(m, { name: "Search", width: 20, height: 20 }),
1580
- onChange: Y,
1580
+ onChange: p,
1581
1581
  style: { width: "100%" },
1582
1582
  value: F || ""
1583
1583
  }
@@ -1618,7 +1618,7 @@ const Ht = _(
1618
1618
  );
1619
1619
  }
1620
1620
  ), qe = "#E6E9FB", Te = ({ children: e, onClick: i }) => {
1621
- const [r, o] = p("");
1621
+ const [r, o] = b("");
1622
1622
  return /* @__PURE__ */ A(
1623
1623
  aA,
1624
1624
  {
@@ -1797,11 +1797,11 @@ const Ht = _(
1797
1797
  withSearchParam: j,
1798
1798
  // disabled,
1799
1799
  rangedDate: D,
1800
- disabled: G,
1801
- inputTextType: O = "text",
1800
+ disabled: O,
1801
+ inputTextType: Y = "text",
1802
1802
  min: F,
1803
1803
  max: U
1804
- }, Y) => {
1804
+ }, p) => {
1805
1805
  const k = t == null ? void 0 : t.length;
1806
1806
  let Z;
1807
1807
  const H = () => {
@@ -1828,7 +1828,7 @@ const Ht = _(
1828
1828
  value: Pe(w || Z, D),
1829
1829
  onChange: (q) => o == null ? void 0 : o({ value: q, name: c, type: i }),
1830
1830
  rangedDate: D,
1831
- ref: Y
1831
+ ref: p
1832
1832
  }
1833
1833
  );
1834
1834
  case "select-button":
@@ -1848,11 +1848,11 @@ const Ht = _(
1848
1848
  onChange: ({ target: { value: q } }) => o == null ? void 0 : o({ value: q, name: c, type: i }),
1849
1849
  value: w || Z,
1850
1850
  placeholder: n,
1851
- disabled: G,
1852
- type: O,
1851
+ disabled: O,
1852
+ type: Y,
1853
1853
  name: c,
1854
- ...O === "number" && { min: F, max: U },
1855
- ...(!O || O === "text") && {
1854
+ ...Y === "number" && { min: F, max: U },
1855
+ ...(!Y || Y === "text") && {
1856
1856
  minLength: F,
1857
1857
  maxLength: U
1858
1858
  }
@@ -1865,7 +1865,7 @@ const Ht = _(
1865
1865
  return k ? /* @__PURE__ */ A(a, { marginBottom: "lg", children: t == null ? void 0 : t.map((q, E) => /* @__PURE__ */ A(
1866
1866
  le,
1867
1867
  {
1868
- ref: Y,
1868
+ ref: p,
1869
1869
  onChange: o,
1870
1870
  ...q,
1871
1871
  withSearchParam: j
@@ -1888,7 +1888,7 @@ const Ht = _(
1888
1888
  onHide: n,
1889
1889
  resetting: l
1890
1890
  }) => {
1891
- const [c, s] = p(!1), C = iA(null), Q = ({ value: B, name: u, type: j }) => {
1891
+ const [c, s] = b(!1), C = AA(null), Q = ({ value: B, name: u, type: j }) => {
1892
1892
  if (o)
1893
1893
  switch (j) {
1894
1894
  case "date":
@@ -1904,7 +1904,7 @@ const Ht = _(
1904
1904
  }, w = () => {
1905
1905
  s(!0), t == null || t(!0);
1906
1906
  };
1907
- return v(() => {
1907
+ return R(() => {
1908
1908
  (c || l) && (s(!1), t == null || t(!1));
1909
1909
  }, [c, l]), /* @__PURE__ */ A(W, { children: /* @__PURE__ */ g(
1910
1910
  LA,
@@ -2143,13 +2143,13 @@ const gr = (e) => {
2143
2143
  }), r;
2144
2144
  }, ar = (e) => {
2145
2145
  var U;
2146
- const i = oA(() => ({ ...ri, ...e }), [e]), [r, o] = p(!1), [t, n] = p(!1), [l] = p(void 0), c = () => n(!0), s = () => n(!1), C = t ? s : c, Q = () => {
2146
+ const i = oA(() => ({ ...ri, ...e }), [e]), [r, o] = b(!1), [t, n] = b(!1), [l] = b(void 0), c = () => n(!0), s = () => n(!1), C = t ? s : c, Q = () => {
2147
2147
  o(!0);
2148
- }, w = (Y) => {
2149
- o(Y);
2150
- }, B = l ? oi(l) : void 0, u = !!(B && ((U = Object.values(B)) == null ? void 0 : U.length) > 0), j = () => B ? Object.keys(B).map((Y) => {
2148
+ }, w = (p) => {
2149
+ o(p);
2150
+ }, B = l ? oi(l) : void 0, u = !!(B && ((U = Object.values(B)) == null ? void 0 : U.length) > 0), j = () => B ? Object.keys(B).map((p) => {
2151
2151
  var q, E, f;
2152
- const k = KA(Y, i.fields), Z = [];
2152
+ const k = KA(p, i.fields), Z = [];
2153
2153
  let H = "";
2154
2154
  const P = (q = k == null ? void 0 : k.childrenKey) == null ? void 0 : q.length, X = k == null ? void 0 : k.parentKey;
2155
2155
  switch (P && ((E = k == null ? void 0 : k.childrenKey) == null || E.forEach((M) => {
@@ -2162,20 +2162,20 @@ const gr = (e) => {
2162
2162
  })), k == null ? void 0 : k.type) {
2163
2163
  case "dropdown":
2164
2164
  case "select-button":
2165
- const M = B[Y] && typeof B[Y] != "string" ? B[Y] : [], h = (M == null ? void 0 : M.length) > 0 ? (f = M.map((x) => x.label)) == null ? void 0 : f.join(",") : B[Y];
2165
+ const M = B[p] && typeof B[p] != "string" ? B[p] : [], h = (M == null ? void 0 : M.length) > 0 ? (f = M.map((x) => x.label)) == null ? void 0 : f.join(",") : B[p];
2166
2166
  H = `${k == null ? void 0 : k.label}: ${h}`;
2167
2167
  break;
2168
2168
  case "date":
2169
2169
  if (k.rangedDate) {
2170
- const x = B[Y], T = (k == null ? void 0 : k.dateValueFormatText) === "indonesian" ? yA(new Date(x == null ? void 0 : x.from)) : x == null ? void 0 : x.from, tA = (k == null ? void 0 : k.dateValueFormatText) === "indonesian" ? yA(new Date(x == null ? void 0 : x.to)) : x == null ? void 0 : x.to;
2170
+ const x = B[p], T = (k == null ? void 0 : k.dateValueFormatText) === "indonesian" ? yA(new Date(x == null ? void 0 : x.from)) : x == null ? void 0 : x.from, tA = (k == null ? void 0 : k.dateValueFormatText) === "indonesian" ? yA(new Date(x == null ? void 0 : x.to)) : x == null ? void 0 : x.to;
2171
2171
  H = `${k == null ? void 0 : k.label}: ${T || ""} ~ ${tA || ""}`;
2172
2172
  break;
2173
2173
  }
2174
- const N = (k == null ? void 0 : k.dateValueFormatText) === "indonesian" ? yA(new Date(B[Y])) : B[Y];
2174
+ const N = (k == null ? void 0 : k.dateValueFormatText) === "indonesian" ? yA(new Date(B[p])) : B[p];
2175
2175
  H = `${k == null ? void 0 : k.label}: ${N || ""}`;
2176
2176
  break;
2177
2177
  default:
2178
- H = `${k == null ? void 0 : k.label}: ${B[Y]}`;
2178
+ H = `${k == null ? void 0 : k.label}: ${B[p]}`;
2179
2179
  break;
2180
2180
  }
2181
2181
  if (P && Z.length > 0) {
@@ -2190,26 +2190,26 @@ const gr = (e) => {
2190
2190
  return X && (H = ""), {
2191
2191
  name: k == null ? void 0 : k.name,
2192
2192
  label: k == null ? void 0 : k.label,
2193
- value: B[Y],
2193
+ value: B[p],
2194
2194
  valueText: H,
2195
2195
  children: Z
2196
2196
  };
2197
- }) : [], D = (Y) => {
2198
- Y != null && Y.name && o(!0);
2199
- }, G = j();
2197
+ }) : [], D = (p) => {
2198
+ p != null && p.name && o(!0);
2199
+ }, O = j();
2200
2200
  return {
2201
2201
  value: B,
2202
2202
  open: c,
2203
2203
  close: s,
2204
2204
  toggle: C,
2205
2205
  reset: Q,
2206
- chips: G,
2206
+ chips: O,
2207
2207
  toggleConfig: {
2208
2208
  active: u,
2209
2209
  onClick: C
2210
2210
  },
2211
2211
  chipsConfig: {
2212
- items: G,
2212
+ items: O,
2213
2213
  onClose: D
2214
2214
  },
2215
2215
  config: {
@@ -2364,7 +2364,7 @@ const gr = (e) => {
2364
2364
  pageKey: o,
2365
2365
  filters: t
2366
2366
  }) => {
2367
- const { searchParams: n, setSearchParams: l, searchQueries: c } = qA(), [s, C] = p({}), Q = () => {
2367
+ const { searchParams: n, setSearchParams: l, searchQueries: c } = qA(), [s, C] = b({}), Q = () => {
2368
2368
  n.delete(r || "filter"), l(n);
2369
2369
  }, w = (B, u) => {
2370
2370
  switch (B.type) {
@@ -2420,8 +2420,8 @@ const gr = (e) => {
2420
2420
  titleSearchLabel: j = "Work Order",
2421
2421
  withTitleLabels: D = !1
2422
2422
  }) => {
2423
- const G = (B == null ? void 0 : B.isShowLabel) ?? !0, [O, F] = p(!1), [U, Y] = p(0), k = () => {
2424
- Y(U + 1);
2423
+ const O = (B == null ? void 0 : B.isShowLabel) ?? !0, [Y, F] = b(!1), [U, p] = b(0), k = () => {
2424
+ p(U + 1);
2425
2425
  }, { searchParams: Z, setSearchParams: H, getQueryParam: P } = qA(), X = DA(Z.toString()), q = P(c), f = !!(q && !(() => {
2426
2426
  if (q)
2427
2427
  try {
@@ -2468,7 +2468,7 @@ const gr = (e) => {
2468
2468
  ),
2469
2469
  fullWidth: !M,
2470
2470
  onClick: () => F(!0),
2471
- children: G ? "Filter" : void 0
2471
+ children: O ? "Filter" : void 0
2472
2472
  }
2473
2473
  ),
2474
2474
  l && /* @__PURE__ */ g(
@@ -2581,7 +2581,7 @@ const gr = (e) => {
2581
2581
  /* @__PURE__ */ A(
2582
2582
  yi,
2583
2583
  {
2584
- isOpen: O,
2584
+ isOpen: Y,
2585
2585
  onClose: () => F(!1),
2586
2586
  filterKey: c,
2587
2587
  filters: w,
@@ -2592,8 +2592,8 @@ const gr = (e) => {
2592
2592
  }
2593
2593
  );
2594
2594
  }, fi = ({ children: e, borderRadius: i }) => {
2595
- const r = iA(null), [o, t] = p("100vh");
2596
- return v(() => {
2595
+ const r = AA(null), [o, t] = b("100vh");
2596
+ return R(() => {
2597
2597
  const n = () => {
2598
2598
  if (r.current) {
2599
2599
  const l = r.current.getBoundingClientRect().top;
@@ -2777,30 +2777,30 @@ const gr = (e) => {
2777
2777
  }
2778
2778
  );
2779
2779
  }, Gi = ({ filter: e, columnTitle: i }) => {
2780
- const [r, o] = p(!1), t = iA(null), n = iA(null), l = iA(null), [c, s] = p(""), [C, Q] = p({ top: 0, left: 0 }), w = e.selectedValues, B = oA(() => c ? e.options.filter(
2780
+ const [r, o] = b(!1), t = AA(null), n = AA(null), l = AA(null), [c, s] = b(""), [C, Q] = b({ top: 0, left: 0 }), w = e.selectedValues, B = oA(() => c ? e.options.filter(
2781
2781
  (D) => D.label.toLowerCase().includes(c.toLowerCase())
2782
2782
  ) : e.options, [e.options, c]);
2783
- v(() => {
2783
+ R(() => {
2784
2784
  if (r && n.current) {
2785
- const D = n.current.getBoundingClientRect(), G = 280, O = {
2785
+ const D = n.current.getBoundingClientRect(), O = 280, Y = {
2786
2786
  top: D.bottom + 8
2787
2787
  };
2788
- e.position === "left" || D.left + G > window.innerWidth ? O.right = window.innerWidth - D.right : O.left = D.left, Q(O);
2788
+ e.position === "left" || D.left + O > window.innerWidth ? Y.right = window.innerWidth - D.right : Y.left = D.left, Q(Y);
2789
2789
  }
2790
- }, [r, e.position]), v(() => {
2790
+ }, [r, e.position]), R(() => {
2791
2791
  r && l.current ? setTimeout(() => {
2792
2792
  var D;
2793
2793
  return (D = l.current) == null ? void 0 : D.focus();
2794
2794
  }, 50) : s("");
2795
- }, [r]), v(() => {
2796
- const D = (G) => {
2797
- t.current && !t.current.contains(G.target) && n.current && !n.current.contains(G.target) && o(!1);
2795
+ }, [r]), R(() => {
2796
+ const D = (O) => {
2797
+ t.current && !t.current.contains(O.target) && n.current && !n.current.contains(O.target) && o(!1);
2798
2798
  };
2799
2799
  return r && document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
2800
2800
  }, [r]);
2801
2801
  const u = (D) => {
2802
- const G = w.includes(D) ? w.filter((O) => O !== D) : [...w, D];
2803
- e.onFilterChange(G);
2802
+ const O = w.includes(D) ? w.filter((Y) => Y !== D) : [...w, D];
2803
+ e.onFilterChange(O);
2804
2804
  }, j = () => e.onFilterChange([]);
2805
2805
  return /* @__PURE__ */ g(a, { style: { position: "relative" }, children: [
2806
2806
  /* @__PURE__ */ A(
@@ -2814,8 +2814,8 @@ const gr = (e) => {
2814
2814
  cursor: "pointer"
2815
2815
  },
2816
2816
  onClick: (D) => {
2817
- var G;
2818
- D.stopPropagation(), r || (G = e.onOpen) == null || G.call(e), o((O) => !O);
2817
+ var O;
2818
+ D.stopPropagation(), r || (O = e.onOpen) == null || O.call(e), o((Y) => !Y);
2819
2819
  },
2820
2820
  children: /* @__PURE__ */ A(
2821
2821
  m,
@@ -2965,14 +2965,14 @@ const gr = (e) => {
2965
2965
  transition: "all 0.2s ease",
2966
2966
  backgroundColor: w.includes(D.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent"
2967
2967
  },
2968
- onClick: (G) => {
2969
- G.stopPropagation(), u(D.value);
2968
+ onClick: (O) => {
2969
+ O.stopPropagation(), u(D.value);
2970
2970
  },
2971
- onMouseEnter: (G) => {
2972
- w.includes(D.value) || (G.currentTarget.style.backgroundColor = "rgb(var(--starasia-ui-raw-color-gray-50))"), G.currentTarget.style.transform = "translateX(2px)";
2971
+ onMouseEnter: (O) => {
2972
+ w.includes(D.value) || (O.currentTarget.style.backgroundColor = "rgb(var(--starasia-ui-raw-color-gray-50))"), O.currentTarget.style.transform = "translateX(2px)";
2973
2973
  },
2974
- onMouseLeave: (G) => {
2975
- G.currentTarget.style.backgroundColor = w.includes(D.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent", G.currentTarget.style.transform = "translateX(0)";
2974
+ onMouseLeave: (O) => {
2975
+ O.currentTarget.style.backgroundColor = w.includes(D.value) ? "rgb(var(--starasia-ui-raw-color-blue-50))" : "transparent", O.currentTarget.style.transform = "translateX(0)";
2976
2976
  },
2977
2977
  children: [
2978
2978
  /* @__PURE__ */ A(
@@ -3102,17 +3102,17 @@ const gr = (e) => {
3102
3102
  actionsOrder: j = ["detail", "update", "delete", "custom"],
3103
3103
  customEmptyState: D
3104
3104
  }) => {
3105
- const O = [r, o, t].filter((E) => E !== void 0).length, F = !!u, U = O === 3 ? F ? "178px" : "140px" : O === 2 ? F ? "140px" : "102px" : O === 1 ? F ? "112px" : "74px" : F ? "74px" : "", Y = (E, f) => {
3105
+ const Y = [r, o, t].filter((E) => E !== void 0).length, F = !!u, U = Y === 3 ? F ? "178px" : "140px" : Y === 2 ? F ? "140px" : "102px" : Y === 1 ? F ? "112px" : "74px" : F ? "74px" : "", p = (E, f) => {
3106
3106
  if (!f) return E;
3107
3107
  if (typeof f == "function") return f(E);
3108
3108
  if (typeof f == "string") return E[f];
3109
- }, [k, Z] = p(!1);
3110
- v(() => {
3109
+ }, [k, Z] = b(!1);
3110
+ R(() => {
3111
3111
  if (!(Q != null && Q.current)) return;
3112
3112
  const E = Q.current;
3113
3113
  Z(E.scrollHeight > E.clientHeight);
3114
3114
  }, [i, Q]);
3115
- const H = iA(null), [P, X] = p([]);
3115
+ const H = AA(null), [P, X] = b([]);
3116
3116
  zA(() => {
3117
3117
  if (!w || !H.current) {
3118
3118
  X([]);
@@ -3250,7 +3250,7 @@ const gr = (e) => {
3250
3250
  },
3251
3251
  children: [
3252
3252
  e.map((M, h) => {
3253
- const N = M.render ? M.render(E, f, i) : Y(E, M.accessor), x = w > 0 && h < w, T = P[h] ?? 0;
3253
+ const N = M.render ? M.render(E, f, i) : p(E, M.accessor), x = w > 0 && h < w, T = P[h] ?? 0;
3254
3254
  return /* @__PURE__ */ A(
3255
3255
  sA,
3256
3256
  {
@@ -3289,7 +3289,7 @@ const gr = (e) => {
3289
3289
  backgroundColor: mA
3290
3290
  }, children: /* @__PURE__ */ A(J, { direction: "row", align: "center", justify: "center", gap: "sm", children: j.map((M) => {
3291
3291
  const h = f === i.length - 1 ? "top" : "bottom";
3292
- return M === "detail" && r && (s == null ? void 0 : s(E)) !== !1 ? /* @__PURE__ */ A(eA, { label: "Detail", position: h, children: /* @__PURE__ */ A(
3292
+ return M === "detail" && r && (s == null ? void 0 : s(E)) !== !1 ? /* @__PURE__ */ A(iA, { label: "Detail", position: h, children: /* @__PURE__ */ A(
3293
3293
  L,
3294
3294
  {
3295
3295
  size: "xs",
@@ -3297,7 +3297,7 @@ const gr = (e) => {
3297
3297
  onClick: () => r(E.id, E),
3298
3298
  iconLeft: /* @__PURE__ */ A(m, { name: "DocumentClean", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-gray-600))" } })
3299
3299
  }
3300
- ) }, "detail") : M === "update" && o && (c == null ? void 0 : c(E)) !== !1 ? /* @__PURE__ */ A(eA, { label: "Update", position: h, children: /* @__PURE__ */ A(
3300
+ ) }, "detail") : M === "update" && o && (c == null ? void 0 : c(E)) !== !1 ? /* @__PURE__ */ A(iA, { label: "Update", position: h, children: /* @__PURE__ */ A(
3301
3301
  L,
3302
3302
  {
3303
3303
  size: "xs",
@@ -3305,7 +3305,7 @@ const gr = (e) => {
3305
3305
  onClick: () => o(E),
3306
3306
  iconLeft: /* @__PURE__ */ A(m, { name: "Edit1", size: "sm", style: { color: "rgb(var(--starasia-ui-raw-color-gray-600))" } })
3307
3307
  }
3308
- ) }, "update") : M === "delete" && t && (l == null ? void 0 : l(E)) !== !1 ? /* @__PURE__ */ A(eA, { label: "Delete", position: h, children: /* @__PURE__ */ A(
3308
+ ) }, "update") : M === "delete" && t && (l == null ? void 0 : l(E)) !== !1 ? /* @__PURE__ */ A(iA, { label: "Delete", position: h, children: /* @__PURE__ */ A(
3309
3309
  L,
3310
3310
  {
3311
3311
  size: "xs",
@@ -3327,9 +3327,9 @@ const gr = (e) => {
3327
3327
  footerProps: o
3328
3328
  }) => {
3329
3329
  var w;
3330
- const t = iA(null), [n, l] = p(
3330
+ const t = AA(null), [n, l] = b(
3331
3331
  (i == null ? void 0 : i.defaultFrozenCount) ?? 0
3332
- ), c = (r == null ? void 0 : r.show) ?? !0, s = iA(null), C = (w = i == null ? void 0 : i.pagination) == null ? void 0 : w.totalData;
3332
+ ), c = (r == null ? void 0 : r.show) ?? !0, s = AA(null), C = (w = i == null ? void 0 : i.pagination) == null ? void 0 : w.totalData;
3333
3333
  typeof C == "number" && (s.current = C);
3334
3334
  const Q = (o == null ? void 0 : o.showFooter) ?? (C === void 0 ? s.current !== 0 : C !== 0);
3335
3335
  return /* @__PURE__ */ g(fi, { ...e, children: [
@@ -3375,7 +3375,7 @@ function ji(e) {
3375
3375
  const Dr = ji(pi), kA = ({
3376
3376
  of: e,
3377
3377
  render: i
3378
- }) => ye.toArray(e == null ? void 0 : e.map((r, o, t) => i(r, o, t))), b = ({
3378
+ }) => ye.toArray(e == null ? void 0 : e.map((r, o, t) => i(r, o, t))), G = ({
3379
3379
  condition: e,
3380
3380
  fallback: i,
3381
3381
  children: r,
@@ -3427,7 +3427,7 @@ const Dr = ji(pi), kA = ({
3427
3427
  ),
3428
3428
  children: [
3429
3429
  /* @__PURE__ */ A(
3430
- b,
3430
+ G,
3431
3431
  {
3432
3432
  condition: !!e.role && !e.isTenant || t,
3433
3433
  fallback: /* @__PURE__ */ A(K.Body1, { children: e.name }),
@@ -3445,7 +3445,7 @@ const Dr = ji(pi), kA = ({
3445
3445
  ] })
3446
3446
  }
3447
3447
  ),
3448
- /* @__PURE__ */ A(b, { condition: e.isTenant && o, children: /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(m, { name: "ChevronRight", size: "md" }) }) })
3448
+ /* @__PURE__ */ A(G, { condition: e.isTenant && o, children: /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(m, { name: "ChevronRight", size: "md" }) }) })
3449
3449
  ]
3450
3450
  }
3451
3451
  );
@@ -3526,7 +3526,7 @@ const Dr = ji(pi), kA = ({
3526
3526
  }
3527
3527
  ),
3528
3528
  /* @__PURE__ */ A(
3529
- b,
3529
+ G,
3530
3530
  {
3531
3531
  condition: !!(o != null && o.length),
3532
3532
  isLoading: c,
@@ -3671,7 +3671,7 @@ const Dr = ji(pi), kA = ({
3671
3671
  }
3672
3672
  ),
3673
3673
  /* @__PURE__ */ A(
3674
- b,
3674
+ G,
3675
3675
  {
3676
3676
  condition: !!((C = (s = l.data) == null ? void 0 : s.organizations) != null && C.length),
3677
3677
  children: /* @__PURE__ */ A(
@@ -3746,7 +3746,7 @@ const Dr = ji(pi), kA = ({
3746
3746
  variant: l = "single-api",
3747
3747
  isLoading: c
3748
3748
  }) => {
3749
- const [s, C] = p(!1), [Q, w] = p("");
3749
+ const [s, C] = b(!1), [Q, w] = b("");
3750
3750
  return /* @__PURE__ */ g(W, { children: [
3751
3751
  /* @__PURE__ */ g(
3752
3752
  a,
@@ -3796,7 +3796,7 @@ const Dr = ji(pi), kA = ({
3796
3796
  }
3797
3797
  ),
3798
3798
  /* @__PURE__ */ A(
3799
- b,
3799
+ G,
3800
3800
  {
3801
3801
  condition: l === "single-api",
3802
3802
  fallback: /* @__PURE__ */ A(
@@ -3903,7 +3903,7 @@ const Dr = ji(pi), kA = ({
3903
3903
  ...t.containerProps,
3904
3904
  children: [
3905
3905
  t.title && /* @__PURE__ */ A(
3906
- b,
3906
+ G,
3907
3907
  {
3908
3908
  condition: !!t.inputProps.required,
3909
3909
  fallback: /* @__PURE__ */ g(
@@ -3928,8 +3928,8 @@ const Dr = ji(pi), kA = ({
3928
3928
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
3929
3929
  /* @__PURE__ */ A(z, { fontSize: e, children: t.title }),
3930
3930
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
3931
- /* @__PURE__ */ A(b, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
3932
- eA,
3931
+ /* @__PURE__ */ A(G, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
3932
+ iA,
3933
3933
  {
3934
3934
  label: (s = t.tooltip) == null ? void 0 : s.label,
3935
3935
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -3948,7 +3948,7 @@ const Dr = ji(pi), kA = ({
3948
3948
  }
3949
3949
  ) })
3950
3950
  ] }),
3951
- /* @__PURE__ */ A(b, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
3951
+ /* @__PURE__ */ A(G, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
3952
3952
  ]
3953
3953
  }
3954
3954
  )
@@ -3988,7 +3988,7 @@ const Dr = ji(pi), kA = ({
3988
3988
  onClick: t.onClickContainer,
3989
3989
  children: [
3990
3990
  t.title && /* @__PURE__ */ A(
3991
- b,
3991
+ G,
3992
3992
  {
3993
3993
  condition: !!t.inputProps.required,
3994
3994
  fallback: /* @__PURE__ */ g(
@@ -4013,8 +4013,8 @@ const Dr = ji(pi), kA = ({
4013
4013
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
4014
4014
  /* @__PURE__ */ A(z, { fontSize: e, children: t.title }),
4015
4015
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
4016
- /* @__PURE__ */ A(b, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4017
- eA,
4016
+ /* @__PURE__ */ A(G, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4017
+ iA,
4018
4018
  {
4019
4019
  label: (s = t.tooltip) == null ? void 0 : s.label,
4020
4020
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4033,7 +4033,7 @@ const Dr = ji(pi), kA = ({
4033
4033
  }
4034
4034
  ) })
4035
4035
  ] }),
4036
- /* @__PURE__ */ A(b, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
4036
+ /* @__PURE__ */ A(G, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
4037
4037
  ]
4038
4038
  }
4039
4039
  )
@@ -4064,7 +4064,7 @@ const Dr = ji(pi), kA = ({
4064
4064
  );
4065
4065
  }, Hi = (e, i) => typeof e == "string" && e || i === "error" ? "var(--starasia-ui-color-error)" : "var(--starasia-ui-text-disable)", Ji = (e) => {
4066
4066
  var c;
4067
- const [i, r] = p(!1), o = (s) => {
4067
+ const [i, r] = b(!1), o = (s) => {
4068
4068
  s.preventDefault(), s.stopPropagation();
4069
4069
  }, t = (s) => {
4070
4070
  s.preventDefault(), s.stopPropagation(), s.dataTransfer && e.handleOnFileChange(s.dataTransfer.files.item(0));
@@ -4236,7 +4236,7 @@ const Ui = (e) => {
4236
4236
  );
4237
4237
  }, Wi = ({ status: e = "default", ...i }) => {
4238
4238
  var n;
4239
- const r = iA(null), o = () => {
4239
+ const r = AA(null), o = () => {
4240
4240
  if (i.defaultUrl) {
4241
4241
  window.open(i.defaultUrl);
4242
4242
  return;
@@ -4313,7 +4313,7 @@ const Ui = (e) => {
4313
4313
  ...t.containerProps,
4314
4314
  children: [
4315
4315
  t.title && /* @__PURE__ */ A(
4316
- b,
4316
+ G,
4317
4317
  {
4318
4318
  condition: !!t.inputProps.required,
4319
4319
  fallback: /* @__PURE__ */ g(
@@ -4338,8 +4338,8 @@ const Ui = (e) => {
4338
4338
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
4339
4339
  /* @__PURE__ */ A(z, { fontSize: e, children: t.title }),
4340
4340
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
4341
- /* @__PURE__ */ A(b, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4342
- eA,
4341
+ /* @__PURE__ */ A(G, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4342
+ iA,
4343
4343
  {
4344
4344
  label: (s = t.tooltip) == null ? void 0 : s.label,
4345
4345
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4358,7 +4358,7 @@ const Ui = (e) => {
4358
4358
  }
4359
4359
  ) })
4360
4360
  ] }),
4361
- /* @__PURE__ */ A(b, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
4361
+ /* @__PURE__ */ A(G, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
4362
4362
  ]
4363
4363
  }
4364
4364
  )
@@ -4395,7 +4395,7 @@ const Ui = (e) => {
4395
4395
  ...n.containerProps,
4396
4396
  children: [
4397
4397
  n.title && /* @__PURE__ */ A(
4398
- b,
4398
+ G,
4399
4399
  {
4400
4400
  condition: !!t,
4401
4401
  fallback: /* @__PURE__ */ g(
@@ -4420,8 +4420,8 @@ const Ui = (e) => {
4420
4420
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
4421
4421
  /* @__PURE__ */ A(z, { fontSize: e, children: n.title }),
4422
4422
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
4423
- /* @__PURE__ */ A(b, { condition: !!((s = n.tooltip) != null && s.label), children: /* @__PURE__ */ A(
4424
- eA,
4423
+ /* @__PURE__ */ A(G, { condition: !!((s = n.tooltip) != null && s.label), children: /* @__PURE__ */ A(
4424
+ iA,
4425
4425
  {
4426
4426
  label: (C = n.tooltip) == null ? void 0 : C.label,
4427
4427
  arrowPosition: (Q = n.tooltip) == null ? void 0 : Q.arrowPosition,
@@ -4440,7 +4440,7 @@ const Ui = (e) => {
4440
4440
  }
4441
4441
  ) })
4442
4442
  ] }),
4443
- /* @__PURE__ */ A(b, { condition: !!n.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: n.description }) })
4443
+ /* @__PURE__ */ A(G, { condition: !!n.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: n.description }) })
4444
4444
  ]
4445
4445
  }
4446
4446
  )
@@ -4514,7 +4514,7 @@ const Ui = (e) => {
4514
4514
  gap: e === "horizontal-inline" || e === "horizontal-block" ? "spacing-96" : "sm",
4515
4515
  direction: e === "horizontal-inline" || e === "horizontal-block" ? "row" : "column",
4516
4516
  children: [
4517
- /* @__PURE__ */ A(b, { condition: !!o.description || !!o.title, children: /* @__PURE__ */ g(
4517
+ /* @__PURE__ */ A(G, { condition: !!o.description || !!o.title, children: /* @__PURE__ */ g(
4518
4518
  a,
4519
4519
  {
4520
4520
  direction: "column",
@@ -4522,7 +4522,7 @@ const Ui = (e) => {
4522
4522
  fullWidth: r,
4523
4523
  children: [
4524
4524
  o.title && /* @__PURE__ */ A(z, { children: o.title }),
4525
- /* @__PURE__ */ A(b, { condition: !!o.description, children: /* @__PURE__ */ A(d, { color: "gray-500", children: o.description }) })
4525
+ /* @__PURE__ */ A(G, { condition: !!o.description, children: /* @__PURE__ */ A(d, { color: "gray-500", children: o.description }) })
4526
4526
  ]
4527
4527
  }
4528
4528
  ) }),
@@ -4595,7 +4595,7 @@ const Ui = (e) => {
4595
4595
  ...t.containerProps,
4596
4596
  children: [
4597
4597
  t.title && /* @__PURE__ */ A(
4598
- b,
4598
+ G,
4599
4599
  {
4600
4600
  condition: !!t.inputProps.required,
4601
4601
  fallback: /* @__PURE__ */ g(
@@ -4620,8 +4620,8 @@ const Ui = (e) => {
4620
4620
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
4621
4621
  /* @__PURE__ */ A(z, { fontSize: e, children: t.title }),
4622
4622
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
4623
- /* @__PURE__ */ A(b, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4624
- eA,
4623
+ /* @__PURE__ */ A(G, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4624
+ iA,
4625
4625
  {
4626
4626
  label: (s = t.tooltip) == null ? void 0 : s.label,
4627
4627
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4640,7 +4640,7 @@ const Ui = (e) => {
4640
4640
  }
4641
4641
  ) })
4642
4642
  ] }),
4643
- /* @__PURE__ */ A(b, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
4643
+ /* @__PURE__ */ A(G, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
4644
4644
  ]
4645
4645
  }
4646
4646
  )
@@ -4679,7 +4679,7 @@ const Ui = (e) => {
4679
4679
  ...n.containerProps,
4680
4680
  children: [
4681
4681
  n.title && /* @__PURE__ */ A(
4682
- b,
4682
+ G,
4683
4683
  {
4684
4684
  condition: o,
4685
4685
  fallback: /* @__PURE__ */ g(
@@ -4704,8 +4704,8 @@ const Ui = (e) => {
4704
4704
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
4705
4705
  /* @__PURE__ */ A(z, { fontSize: e, children: n.title }),
4706
4706
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
4707
- /* @__PURE__ */ A(b, { condition: !!((c = n.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4708
- eA,
4707
+ /* @__PURE__ */ A(G, { condition: !!((c = n.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4708
+ iA,
4709
4709
  {
4710
4710
  label: (s = n.tooltip) == null ? void 0 : s.label,
4711
4711
  arrowPosition: (C = n.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4724,7 +4724,7 @@ const Ui = (e) => {
4724
4724
  }
4725
4725
  ) })
4726
4726
  ] }),
4727
- /* @__PURE__ */ A(b, { condition: !!n.titleDescription, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: n.titleDescription }) })
4727
+ /* @__PURE__ */ A(G, { condition: !!n.titleDescription, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: n.titleDescription }) })
4728
4728
  ]
4729
4729
  }
4730
4730
  )
@@ -4813,7 +4813,7 @@ const Ui = (e) => {
4813
4813
  onClick: t.onClickContainer,
4814
4814
  children: [
4815
4815
  t.title && /* @__PURE__ */ A(
4816
- b,
4816
+ G,
4817
4817
  {
4818
4818
  condition: !!t.inputProps.required,
4819
4819
  fallback: /* @__PURE__ */ g(
@@ -4838,8 +4838,8 @@ const Ui = (e) => {
4838
4838
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
4839
4839
  /* @__PURE__ */ A(z, { fontSize: e, children: t.title }),
4840
4840
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
4841
- /* @__PURE__ */ A(b, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4842
- eA,
4841
+ /* @__PURE__ */ A(G, { condition: !!((c = t.tooltip) != null && c.label), children: /* @__PURE__ */ A(
4842
+ iA,
4843
4843
  {
4844
4844
  label: (s = t.tooltip) == null ? void 0 : s.label,
4845
4845
  arrowPosition: (C = t.tooltip) == null ? void 0 : C.arrowPosition,
@@ -4858,7 +4858,7 @@ const Ui = (e) => {
4858
4858
  }
4859
4859
  ) })
4860
4860
  ] }),
4861
- /* @__PURE__ */ A(b, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
4861
+ /* @__PURE__ */ A(G, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
4862
4862
  ]
4863
4863
  }
4864
4864
  )
@@ -4936,8 +4936,8 @@ const VA = {
4936
4936
  maxFileSize: s = 2,
4937
4937
  onError: C
4938
4938
  }, Q) => {
4939
- const w = V("md"), [B, u] = p(!1), [j, D] = p(null), [G, O] = p(!1), [F, U] = p({ x: 0, y: 0 }), [Y, k] = p(1), [Z, H] = p(null);
4940
- v(() => {
4939
+ const w = V("md"), [B, u] = b(!1), [j, D] = b(null), [O, Y] = b(!1), [F, U] = b({ x: 0, y: 0 }), [p, k] = b(1), [Z, H] = b(null);
4940
+ R(() => {
4941
4941
  i === null && t(null);
4942
4942
  }, [i]);
4943
4943
  const P = JA(
@@ -4951,7 +4951,7 @@ const VA = {
4951
4951
  if (!tA) return;
4952
4952
  const wA = new FileReader();
4953
4953
  wA.onload = () => {
4954
- D(wA.result), O(!0);
4954
+ D(wA.result), Y(!0);
4955
4955
  }, wA.readAsDataURL(tA);
4956
4956
  }, q = async () => {
4957
4957
  if (!(!j || !Z))
@@ -4963,11 +4963,11 @@ const VA = {
4963
4963
  }
4964
4964
  e == null || e(T);
4965
4965
  const tA = URL.createObjectURL(T);
4966
- t(tA, T), O(!1);
4966
+ t(tA, T), Y(!1);
4967
4967
  } catch {
4968
4968
  C == null || C("Gagal memproses gambar");
4969
4969
  }
4970
- }, E = iA(null), f = () => {
4970
+ }, E = AA(null), f = () => {
4971
4971
  E.current && E.current.click();
4972
4972
  };
4973
4973
  xe(Q, () => ({
@@ -5067,7 +5067,7 @@ const VA = {
5067
5067
  style: { color: "var(--starasia-ui-color-gray-50)" }
5068
5068
  }
5069
5069
  ),
5070
- /* @__PURE__ */ A(b, { condition: n.toNumber() > 80, children: /* @__PURE__ */ A(
5070
+ /* @__PURE__ */ A(G, { condition: n.toNumber() > 80, children: /* @__PURE__ */ A(
5071
5071
  d,
5072
5072
  {
5073
5073
  color: "gray-50",
@@ -5110,8 +5110,8 @@ const VA = {
5110
5110
  /* @__PURE__ */ g(
5111
5111
  dA,
5112
5112
  {
5113
- isShow: G,
5114
- onHide: () => O(!1),
5113
+ isShow: O,
5114
+ onHide: () => Y(!1),
5115
5115
  style: {
5116
5116
  minWidth: w ? l === "1:1" ? "20rem" : N * 2 : "100%"
5117
5117
  },
@@ -5130,7 +5130,7 @@ const VA = {
5130
5130
  {
5131
5131
  image: j,
5132
5132
  crop: F,
5133
- zoom: Y,
5133
+ zoom: p,
5134
5134
  aspect: l ? VA[l] : void 0,
5135
5135
  onCropChange: U,
5136
5136
  onZoomChange: k,
@@ -5143,7 +5143,7 @@ const VA = {
5143
5143
  }
5144
5144
  ) }),
5145
5145
  /* @__PURE__ */ A(xA, { children: /* @__PURE__ */ g(a, { justify: "flex-end", direction: "row", gap: "sm", children: [
5146
- /* @__PURE__ */ A(L, { size: "xs", secondary: !0, onClick: () => O(!1), children: "Cancel" }),
5146
+ /* @__PURE__ */ A(L, { size: "xs", secondary: !0, onClick: () => Y(!1), children: "Cancel" }),
5147
5147
  /* @__PURE__ */ A(L, { size: "xs", primary: !0, onClick: q, children: "Crop" })
5148
5148
  ] }) })
5149
5149
  ]
@@ -5171,7 +5171,7 @@ const VA = {
5171
5171
  ...n.containerProps,
5172
5172
  children: [
5173
5173
  n.title && /* @__PURE__ */ A(
5174
- b,
5174
+ G,
5175
5175
  {
5176
5176
  condition: !!t,
5177
5177
  fallback: /* @__PURE__ */ g(
@@ -5196,8 +5196,8 @@ const VA = {
5196
5196
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
5197
5197
  /* @__PURE__ */ A(z, { fontSize: e, children: n.title }),
5198
5198
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
5199
- /* @__PURE__ */ A(b, { condition: !!((s = n.tooltip) != null && s.label), children: /* @__PURE__ */ A(
5200
- eA,
5199
+ /* @__PURE__ */ A(G, { condition: !!((s = n.tooltip) != null && s.label), children: /* @__PURE__ */ A(
5200
+ iA,
5201
5201
  {
5202
5202
  label: (C = n.tooltip) == null ? void 0 : C.label,
5203
5203
  arrowPosition: (Q = n.tooltip) == null ? void 0 : Q.arrowPosition,
@@ -5216,7 +5216,7 @@ const VA = {
5216
5216
  }
5217
5217
  ) })
5218
5218
  ] }),
5219
- /* @__PURE__ */ A(b, { condition: !!n.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: n.description }) })
5219
+ /* @__PURE__ */ A(G, { condition: !!n.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: n.description }) })
5220
5220
  ]
5221
5221
  }
5222
5222
  )
@@ -5246,7 +5246,7 @@ const VA = {
5246
5246
  ...t.containerProps,
5247
5247
  children: [
5248
5248
  t.title && /* @__PURE__ */ A(
5249
- b,
5249
+ G,
5250
5250
  {
5251
5251
  condition: !!t.inputProps.required,
5252
5252
  fallback: /* @__PURE__ */ g(
@@ -5271,8 +5271,8 @@ const VA = {
5271
5271
  /* @__PURE__ */ g(J, { direction: "row", gap: "xs", align: "center", children: [
5272
5272
  /* @__PURE__ */ A(z, { fontSize: e, children: t.title }),
5273
5273
  /* @__PURE__ */ A(z, { color: "error", fontSize: e, children: r }),
5274
- /* @__PURE__ */ A(b, { condition: !!((l = t.tooltip) != null && l.label), children: /* @__PURE__ */ A(
5275
- eA,
5274
+ /* @__PURE__ */ A(G, { condition: !!((l = t.tooltip) != null && l.label), children: /* @__PURE__ */ A(
5275
+ iA,
5276
5276
  {
5277
5277
  label: (c = t.tooltip) == null ? void 0 : c.label,
5278
5278
  arrowPosition: (s = t.tooltip) == null ? void 0 : s.arrowPosition,
@@ -5291,7 +5291,7 @@ const VA = {
5291
5291
  }
5292
5292
  ) })
5293
5293
  ] }),
5294
- /* @__PURE__ */ A(b, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
5294
+ /* @__PURE__ */ A(G, { condition: !!t.description, children: /* @__PURE__ */ A(d, { fontSize: e, color: "gray-500", children: t.description }) })
5295
5295
  ]
5296
5296
  }
5297
5297
  )
@@ -5310,8 +5310,8 @@ const VA = {
5310
5310
  disabled: n = !1
5311
5311
  }) => {
5312
5312
  var Q;
5313
- const [l, c] = p([]);
5314
- v(() => {
5313
+ const [l, c] = b([]);
5314
+ R(() => {
5315
5315
  e && c([...e.map((w) => ({ id: w.id, isActive: w.isActive }))]);
5316
5316
  }, [e]);
5317
5317
  const s = (Q = l.find((w) => w.id === i)) == null ? void 0 : Q.isActive, C = JA(() => {
@@ -5352,12 +5352,12 @@ const VA = {
5352
5352
  InputImgFile: tt,
5353
5353
  Custom: rt
5354
5354
  }, ot = ({ customBottom: e }) => {
5355
- const [i, r] = p(!1), o = () => {
5355
+ const [i, r] = b(!1), o = () => {
5356
5356
  window.scrollY > window.screenY ? r(!0) : r(!1);
5357
5357
  }, t = () => {
5358
5358
  window.scrollTo({ top: 0, behavior: "smooth" });
5359
5359
  };
5360
- return v(() => (window.addEventListener("scroll", o), () => {
5360
+ return R(() => (window.addEventListener("scroll", o), () => {
5361
5361
  window.removeEventListener("scroll", o);
5362
5362
  }), []), /* @__PURE__ */ A(
5363
5363
  a,
@@ -6939,7 +6939,41 @@ const Lr = (e) => {
6939
6939
  },
6940
6940
  e.key
6941
6941
  );
6942
- }, br = (e) => {
6942
+ }, br = _(
6943
+ ({
6944
+ children: e,
6945
+ height: i,
6946
+ minHeight: r,
6947
+ customHeight: o,
6948
+ paddingInline: t = "spacing-24"
6949
+ }) => {
6950
+ const n = AA(null), [l, c] = b("100vh");
6951
+ return R(() => {
6952
+ const s = () => {
6953
+ if (n.current) {
6954
+ const C = n.current.getBoundingClientRect().top;
6955
+ c(`calc(100vh - ${C + 16}px)`);
6956
+ }
6957
+ };
6958
+ return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
6959
+ }, []), /* @__PURE__ */ A(
6960
+ a,
6961
+ {
6962
+ ref: n,
6963
+ height: i,
6964
+ customMinHeight: r,
6965
+ customHeight: o,
6966
+ paddingBlock: "xl",
6967
+ paddingInline: t,
6968
+ style: {
6969
+ backgroundColor: "var(--hsd-ui-color-gray-50)",
6970
+ height: l
6971
+ },
6972
+ children: e
6973
+ }
6974
+ );
6975
+ }
6976
+ ), Gr = (e) => {
6943
6977
  const { defaultTab: i = 0, paramKey: r = "tab" } = e || {}, [o, t] = uA(), n = DA(o.toString());
6944
6978
  return {
6945
6979
  activeTab: n[r] ? parseInt(n[r]) : i,
@@ -6952,13 +6986,13 @@ const Lr = (e) => {
6952
6986
  searchQueries: n
6953
6987
  };
6954
6988
  };
6955
- function Gr({
6989
+ function Or({
6956
6990
  appName: e,
6957
6991
  menuConfig: i,
6958
6992
  formatTitle: r
6959
6993
  }) {
6960
6994
  const o = SA();
6961
- v(() => {
6995
+ R(() => {
6962
6996
  let t = null, n = null;
6963
6997
  for (const s of i) {
6964
6998
  const C = s.items.find((Q) => Q.to ? Q.to === "/" ? o.pathname === "/" : !!(Q.to === o.pathname || o.pathname.startsWith(Q.to + "/")) : !1);
@@ -6973,7 +7007,7 @@ function Gr({
6973
7007
  document.title = (r || c)(l, e);
6974
7008
  }, [o.pathname]);
6975
7009
  }
6976
- const Or = () => {
7010
+ const Yr = () => {
6977
7011
  const [e, i] = uA(), r = DA(e.toString()), o = re(), t = SA(), n = o.id;
6978
7012
  return {
6979
7013
  // query params
@@ -6992,7 +7026,7 @@ const Or = () => {
6992
7026
  hasId: !!n
6993
7027
  };
6994
7028
  };
6995
- function Yr(e) {
7029
+ function pr(e) {
6996
7030
  var o, t;
6997
7031
  const i = e.decodedAccessToken;
6998
7032
  return oA(() => {
@@ -7030,13 +7064,14 @@ export {
7030
7064
  Gi as ColumnFilterDropdown,
7031
7065
  Lr as ConfirmationDialog,
7032
7066
  Yi as DataTable,
7033
- b as DecisionWrapper,
7067
+ G as DecisionWrapper,
7034
7068
  kA as EachUtils,
7035
7069
  yr as EmptyStatePage,
7036
7070
  yi as FilterDrawer,
7037
7071
  Er as FloatingFooter,
7038
7072
  fr as ForbiddenPage,
7039
7073
  kr as Form,
7074
+ br as FullSection,
7040
7075
  Jt as HorizontalField,
7041
7076
  Wi as InputFile,
7042
7077
  it as InputImage,
@@ -7092,9 +7127,9 @@ export {
7092
7127
  ar as useAdvanceFilter,
7093
7128
  be as useApp,
7094
7129
  Ge as useAppState,
7095
- Yr as useAuthRole,
7096
- Gr as useDynamicTitle,
7130
+ pr as useAuthRole,
7131
+ Or as useDynamicTitle,
7097
7132
  qA as useRouteInfo,
7098
- Or as useRouteParams,
7099
- br as useTabState
7133
+ Yr as useRouteParams,
7134
+ Gr as useTabState
7100
7135
  };