@krosoft/react 0.0.224 → 0.0.225

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.
Files changed (52) hide show
  1. package/dist/{AppActions-BSJrimRT.js → AppActions-QHJ6CP5w.js} +1 -1
  2. package/dist/{AppSubTitle-Equl_f9z.js → AppSubTitle-BlwAxtMX.js} +1 -1
  3. package/dist/{AppVerticalTabs-BFq6RKPC.js → AppVerticalTabs-C6MH4a0M.js} +31 -30
  4. package/dist/{ConfirmationDialog-DN6GePo-.js → ConfirmationDialog-CK65nSle.js} +10 -9
  5. package/dist/{DataTable-NyRTdROD.js → DataTable-DSrsTb_t.js} +6 -4
  6. package/dist/{ErrorAlert-BKC2JjNf.js → ErrorAlert-BIQ2Te6B.js} +5 -3
  7. package/dist/{ErrorState-C8pd098n.js → ErrorState-ZtWe5C0s.js} +8 -6
  8. package/dist/{GenericForm-BKePZqqI.js → GenericForm-B7L7NkrE.js} +34 -33
  9. package/dist/{ImageInput-BkmK7odp.js → ImageInput-CBDkCEho.js} +9 -7
  10. package/dist/{KpiCardsLayout-D44vxMHX.js → KpiCardsLayout-CUDfA-AP.js} +13 -12
  11. package/dist/{MultiSelect-D0WF96y6.js → MultiSelect-DWNOCqe1.js} +6 -4
  12. package/dist/{PieChart-DvJ9D4dB.js → PieChart-gP2QNrAQ.js} +50 -48
  13. package/dist/{SearchInput-pnwtB4jO.js → SearchInput-Y-iBtCCc.js} +95 -93
  14. package/dist/{SkeletonCards-DhsZyG9k.js → SkeletonCards-CQKcSQW3.js} +1 -1
  15. package/dist/{TableFilter-DXPRe6iE.js → TableFilter-CJrFjUod.js} +8 -6
  16. package/dist/{ThemeSelector-sn3tI4F7.js → ThemeSelector-BtQNjlYA.js} +15 -13
  17. package/dist/{Topbar-BkP4V9zD.js → Topbar-DYim779_.js} +12 -11
  18. package/dist/components/core/cards/index.js +1 -1
  19. package/dist/components/core/charts/index.js +1 -1
  20. package/dist/components/core/dialogs/index.js +2 -2
  21. package/dist/components/core/filters/index.js +1 -1
  22. package/dist/components/core/forms/index.js +1 -1
  23. package/dist/components/core/index.js +18 -18
  24. package/dist/components/core/inputs/DatePicker.d.ts.map +1 -1
  25. package/dist/components/core/inputs/DateRangePicker.d.ts.map +1 -1
  26. package/dist/components/core/inputs/index.js +3 -3
  27. package/dist/components/core/layouts/index.js +3 -3
  28. package/dist/components/core/navbar/index.js +1 -1
  29. package/dist/components/core/states/index.js +2 -2
  30. package/dist/components/core/table/index.js +1 -1
  31. package/dist/components/core/tabs/index.js +1 -1
  32. package/dist/components/core/theme/index.js +1 -1
  33. package/dist/components/index.js +18 -18
  34. package/dist/components/ui/index.js +1 -1
  35. package/dist/hooks/behavior/index.js +1 -1
  36. package/dist/hooks/index.js +2 -2
  37. package/dist/hooks/ui/index.js +1 -1
  38. package/dist/i18n/index.d.ts +1 -0
  39. package/dist/i18n/index.d.ts.map +1 -1
  40. package/dist/i18n/index.js +7 -4
  41. package/dist/i18n/krosoftLocales.d.ts +4 -0
  42. package/dist/i18n/krosoftLocales.d.ts.map +1 -1
  43. package/dist/i18n/useDateFnsLocale.d.ts +11 -0
  44. package/dist/i18n/useDateFnsLocale.d.ts.map +1 -0
  45. package/dist/providers/index.js +7 -6
  46. package/dist/{sheet-C_39QrG0.js → sheet-tuC_C3M3.js} +12 -10
  47. package/dist/useDateFnsLocale-C4oFFUWO.js +11 -0
  48. package/dist/useKrosoftTranslation-DtdbUewZ.js +43 -0
  49. package/dist/{usePage-C5RL0-WN.js → usePage-D3WXYmjl.js} +9 -7
  50. package/dist/{useTheme-CJVjqtt2.js → useTheme-DyeQyPDL.js} +8 -6
  51. package/package.json +1 -1
  52. package/dist/useKrosoftTranslation-C6AC_uCA.js +0 -43
@@ -5,7 +5,7 @@ import "@radix-ui/react-aspect-ratio";
5
5
  import { B as p } from "./tooltip-DVeqVwqV.js";
6
6
  import "./chart-DntJZGxB.js";
7
7
  import "@radix-ui/react-collapsible";
8
- import "./sheet-C_39QrG0.js";
8
+ import "./sheet-tuC_C3M3.js";
9
9
  import { MoreVerticalIcon as h } from "lucide-react";
10
10
  import "react-resizable-panels";
11
11
  import { c as i } from "./tailwind.helper-B6yFEsav.js";
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
- import { A as m } from "./AppActions-BSJrimRT.js";
3
+ import { A as m } from "./AppActions-QHJ6CP5w.js";
4
4
  function f({ titleKey: s, actions: t, className: o }) {
5
5
  const { t: r } = l();
6
6
  return /* @__PURE__ */ i("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4", children: [
@@ -1,6 +1,6 @@
1
- import { jsxs as r, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
2
  import { C as w, d as S, a as T } from "./chart-DntJZGxB.js";
3
- import { A as b } from "./AppActions-BSJrimRT.js";
3
+ import { A as b } from "./AppActions-QHJ6CP5w.js";
4
4
  import { A as C } from "./AppTitle-D15YXeMx.js";
5
5
  import { bi as A, bk as P, bl as k, bj as j, b5 as z } from "./toggle-group-DLLrEwv2.js";
6
6
  import { useRef as K, useEffect as V } from "react";
@@ -9,34 +9,35 @@ import { useSearchParams as y } from "react-router-dom";
9
9
  import { c as R } from "./tailwind.helper-B6yFEsav.js";
10
10
  import { S as q, h as I, i as L, a as H, c as U } from "./select-BpjFWqAY.js";
11
11
  import { ConstructionIcon as v } from "lucide-react";
12
- import { u as D } from "./useKrosoftTranslation-C6AC_uCA.js";
12
+ import "date-fns/locale";
13
+ import { u as D } from "./useKrosoftTranslation-DtdbUewZ.js";
13
14
  function E({ titleKey: s, descriptionKey: t, actions: c = [], className: l }) {
14
- return /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
15
+ return /* @__PURE__ */ n("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
15
16
  /* @__PURE__ */ a(C, { titleKey: s, descriptionKey: t, isSubTitle: !0 }),
16
17
  /* @__PURE__ */ a(b, { actions: c, className: l })
17
18
  ] });
18
19
  }
19
- function _({ titleKey: s, descriptionKey: t, actions: c = [], className: l, children: o, isSubTitle: p }) {
20
- return /* @__PURE__ */ r(w, { children: [
20
+ function ee({ titleKey: s, descriptionKey: t, actions: c = [], className: l, children: o, isSubTitle: p }) {
21
+ return /* @__PURE__ */ n(w, { children: [
21
22
  /* @__PURE__ */ a(S, { children: /* @__PURE__ */ a(E, { titleKey: s, descriptionKey: t, actions: c, className: l }) }),
22
23
  /* @__PURE__ */ a(T, { className: "space-y-4", children: o })
23
24
  ] });
24
25
  }
25
- function ee({ tabs: s, itemId: t, item: c, fit: l }) {
26
+ function ae({ tabs: s, itemId: t, item: c, fit: l }) {
26
27
  var d, u;
27
28
  const { t: o } = g(), [p, f] = y(), i = p.get("tab"), m = ((d = s.find((e) => e.value === i)) == null ? void 0 : d.value) ?? ((u = s[0]) == null ? void 0 : u.value), x = (e) => {
28
- const n = new URLSearchParams();
29
- n.set("tab", e), f(n);
29
+ const r = new URLSearchParams();
30
+ r.set("tab", e), f(r);
30
31
  }, h = K(null);
31
32
  return V(() => {
32
- var n, N;
33
- const e = (n = h.current) == null ? void 0 : n.querySelector('[data-state="active"]');
33
+ var r, N;
34
+ const e = (r = h.current) == null ? void 0 : r.querySelector('[data-state="active"]');
34
35
  (N = e == null ? void 0 : e.scrollIntoView) == null || N.call(e, { behavior: "smooth", block: "nearest", inline: "nearest" });
35
- }, [m]), /* @__PURE__ */ r(A, { value: m, onValueChange: x, children: [
36
- /* @__PURE__ */ a(P, { ref: h, className: R("w-full justify-start", l && "sm:w-fit"), children: s.map((e) => /* @__PURE__ */ r(k, { value: e.value, className: "gap-2", disabled: e.disabled, children: [
36
+ }, [m]), /* @__PURE__ */ n(A, { value: m, onValueChange: x, children: [
37
+ /* @__PURE__ */ a(P, { ref: h, className: R("w-full justify-start", l && "sm:w-fit"), children: s.map((e) => /* @__PURE__ */ n(k, { value: e.value, className: "gap-2", disabled: e.disabled, children: [
37
38
  e.icon ? /* @__PURE__ */ a("span", { className: "hidden sm:inline", children: /* @__PURE__ */ a(e.icon, { className: "size-4" }) }) : null,
38
39
  /* @__PURE__ */ a("span", { className: "text-xs sm:text-sm", children: o(e.titleKey) ?? "" }),
39
- e.count ? /* @__PURE__ */ r("span", { className: "text-gray-500 text-xs", children: [
40
+ e.count ? /* @__PURE__ */ n("span", { className: "text-gray-500 text-xs", children: [
40
41
  "(",
41
42
  e.count(c),
42
43
  ")"
@@ -45,21 +46,21 @@ function ee({ tabs: s, itemId: t, item: c, fit: l }) {
45
46
  s.map((e) => /* @__PURE__ */ a(j, { value: e.value, className: "mt-4", children: e.component ? e.component(t) : null }, e.value))
46
47
  ] });
47
48
  }
48
- const ae = ({ tabs: s, item: t }) => {
49
+ const se = ({ tabs: s, item: t }) => {
49
50
  var d, u;
50
51
  const { t: c } = g(), { t: l } = D(), [o, p] = y(), f = o.get("tab"), i = ((d = s.find((e) => e.value === f)) == null ? void 0 : d.value) ?? ((u = s[0]) == null ? void 0 : u.value), m = (e) => {
51
- const n = new URLSearchParams();
52
- n.set("tab", e), p(n);
52
+ const r = new URLSearchParams();
53
+ r.set("tab", e), p(r);
53
54
  }, x = () => {
54
- const e = s.find((n) => n.value === i);
55
+ const e = s.find((r) => r.value === i);
55
56
  return e ? e.component ? e.component() : h() : null;
56
- }, h = () => /* @__PURE__ */ a("div", { className: "p-4 lg:p-6", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center h-64 text-gray-500", children: /* @__PURE__ */ r("div", { className: "text-center", children: [
57
+ }, h = () => /* @__PURE__ */ a("div", { className: "p-4 lg:p-6", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center h-64 text-gray-500", children: /* @__PURE__ */ n("div", { className: "text-center", children: [
57
58
  /* @__PURE__ */ a(v, { className: "h-12 w-12 mx-auto mb-4 text-amber-500" }),
58
59
  /* @__PURE__ */ a("p", { className: "text-lg font-medium", children: l("states.underConstruction") }),
59
60
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-400", children: l("states.comingSoon") })
60
61
  ] }) }) });
61
- return /* @__PURE__ */ r("div", { className: "flex flex-col md:flex-row h-full min-w-0 ", children: [
62
- /* @__PURE__ */ a("div", { className: "w-64 lg:w-80 flex-shrink-0 hidden md:block border-r border-gray-200 dark:border-gray-700 pr-4", children: /* @__PURE__ */ a(z, { className: "h-full", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: s.map((e, n) => /* @__PURE__ */ r(
62
+ return /* @__PURE__ */ n("div", { className: "flex flex-col md:flex-row h-full min-w-0 ", children: [
63
+ /* @__PURE__ */ a("div", { className: "w-64 lg:w-80 flex-shrink-0 hidden md:block border-r border-gray-200 dark:border-gray-700 pr-4", children: /* @__PURE__ */ a(z, { className: "h-full", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: s.map((e, r) => /* @__PURE__ */ n(
63
64
  "div",
64
65
  {
65
66
  className: `px-2 py-2 rounded-control text-sm transition-colors flex items-center gap-2 ${e.disabled ? "text-gray-400 cursor-not-allowed opacity-50" : i === e.value ? "crm-color-styled font-medium cursor-pointer" : "text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700 cursor-pointer"}`,
@@ -67,7 +68,7 @@ const ae = ({ tabs: s, item: t }) => {
67
68
  children: [
68
69
  e.icon && /* @__PURE__ */ a(e.icon, { className: "size-4" }),
69
70
  /* @__PURE__ */ a("span", { className: "flex-1", children: c(e.titleKey) }),
70
- e.count && /* @__PURE__ */ r("span", { className: "text-xs text-gray-500", children: [
71
+ e.count && /* @__PURE__ */ n("span", { className: "text-xs text-gray-500", children: [
71
72
  "(",
72
73
  e.count(t),
73
74
  ")"
@@ -75,27 +76,27 @@ const ae = ({ tabs: s, item: t }) => {
75
76
  !e.component && /* @__PURE__ */ a(v, { className: "size-4 text-amber-500" })
76
77
  ]
77
78
  },
78
- n
79
+ r
79
80
  )) }) }) }),
80
- /* @__PURE__ */ a("div", { className: "md:hidden w-full border-b pb-4 mb-4", children: /* @__PURE__ */ r(q, { value: i, onValueChange: m, children: [
81
+ /* @__PURE__ */ a("div", { className: "md:hidden w-full border-b pb-4 mb-4", children: /* @__PURE__ */ n(q, { value: i, onValueChange: m, children: [
81
82
  /* @__PURE__ */ a(I, { className: "w-full", children: /* @__PURE__ */ a(L, { placeholder: l("select.section") }) }),
82
- /* @__PURE__ */ a(H, { children: s.map((e, n) => /* @__PURE__ */ a(U, { value: e.value, disabled: e.disabled, children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
83
+ /* @__PURE__ */ a(H, { children: s.map((e, r) => /* @__PURE__ */ a(U, { value: e.value, disabled: e.disabled, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
83
84
  e.icon && /* @__PURE__ */ a(e.icon, { className: "size-4" }),
84
85
  /* @__PURE__ */ a("span", { children: c(e.titleKey) }),
85
- e.count && /* @__PURE__ */ r("span", { className: "text-xs text-gray-500", children: [
86
+ e.count && /* @__PURE__ */ n("span", { className: "text-xs text-gray-500", children: [
86
87
  "(",
87
88
  e.count(t),
88
89
  ")"
89
90
  ] }),
90
91
  !e.component && /* @__PURE__ */ a(v, { className: "size-4 text-amber-500" })
91
- ] }) }, n)) })
92
+ ] }) }, r)) })
92
93
  ] }) }),
93
94
  /* @__PURE__ */ a("div", { className: "flex-1 md:px-4 min-w-0 overflow-auto", children: x() })
94
95
  ] });
95
96
  };
96
97
  export {
97
- _ as A,
98
+ ee as A,
98
99
  E as a,
99
- ee as b,
100
- ae as c
100
+ ae as b,
101
+ se as c
101
102
  };
@@ -1,12 +1,14 @@
1
1
  import { jsx as e, jsxs as r, Fragment as M } from "react/jsx-runtime";
2
- import { u as R } from "./useKrosoftTranslation-C6AC_uCA.js";
2
+ import "date-fns/locale";
3
+ import { useTranslation as O } from "react-i18next";
4
+ import { u as R } from "./useKrosoftTranslation-DtdbUewZ.js";
3
5
  import { P as W, d as X, g as $, j, k as q, h as T, i as J, f as Q } from "./toggle-group-DLLrEwv2.js";
4
6
  import { A as U, a as V } from "./alert-B9F1N9Qk.js";
5
7
  import "@radix-ui/react-aspect-ratio";
6
8
  import { B as v } from "./tooltip-DVeqVwqV.js";
7
9
  import "./chart-DntJZGxB.js";
8
10
  import "@radix-ui/react-collapsible";
9
- import { D as Y, b as Z, e as _, h as L, c as ee } from "./sheet-C_39QrG0.js";
11
+ import { D as Y, b as Z, e as _, h as L, c as ee } from "./sheet-tuC_C3M3.js";
10
12
  import { AlertCircleIcon as le, X as S, Save as I, Pen as K } from "lucide-react";
11
13
  import "react-resizable-panels";
12
14
  import "clsx";
@@ -15,9 +17,8 @@ import "./select-BpjFWqAY.js";
15
17
  import "next-themes";
16
18
  import "sonner";
17
19
  import { useState as A, useEffect as ie } from "react";
18
- import { useTranslation as O } from "react-i18next";
19
- import { G as re } from "./GenericForm-BKePZqqI.js";
20
- import { E as se } from "./ErrorAlert-BKC2JjNf.js";
20
+ import { G as re } from "./GenericForm-B7L7NkrE.js";
21
+ import { E as se } from "./ErrorAlert-BIQ2Te6B.js";
21
22
  function te({ open: t, onOpenChange: d, config: l, isLoading: u, error: s, children: p }) {
22
23
  const { t: i } = O(), { title: b, description: c, icon: f, maxWidth: g = "sm:max-w-xl", actions: n } = l;
23
24
  return /* @__PURE__ */ e(Y, { open: t, onOpenChange: d, children: /* @__PURE__ */ r(Z, { className: `${g} max-h-[100dvh] sm:max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden`, children: [
@@ -40,7 +41,7 @@ function te({ open: t, onOpenChange: d, config: l, isLoading: u, error: s, child
40
41
  ] }, k)) }) }) : null
41
42
  ] }) });
42
43
  }
43
- function Ae({
44
+ function ze({
44
45
  open: t,
45
46
  onOpenChange: d,
46
47
  data: l,
@@ -147,7 +148,7 @@ function Ae({
147
148
  }
148
149
  );
149
150
  }
150
- function ze({ isLoading: t, error: d, config: l, destructive: u = !1 }) {
151
+ function Ee({ isLoading: t, error: d, config: l, destructive: u = !1 }) {
151
152
  const { t: s } = O();
152
153
  if (!l) return null;
153
154
  const p = (i) => {
@@ -182,6 +183,6 @@ function ze({ isLoading: t, error: d, config: l, destructive: u = !1 }) {
182
183
  }
183
184
  export {
184
185
  te as A,
185
- ze as C,
186
- Ae as F
186
+ Ee as C,
187
+ ze as F
187
188
  };
@@ -1,13 +1,15 @@
1
1
  import { jsxs as n, jsx as e, Fragment as le } from "react/jsx-runtime";
2
2
  import { u as de } from "./useDataTable-CxcA5S-s.js";
3
- import { u as B } from "./useKrosoftTranslation-C6AC_uCA.js";
3
+ import "date-fns/locale";
4
+ import "react-i18next";
5
+ import { u as B } from "./useKrosoftTranslation-DtdbUewZ.js";
4
6
  import { a3 as L, ah as V, a5 as O, a7 as ce, E as H, a4 as oe } from "./toggle-group-DLLrEwv2.js";
5
7
  import "./alert-B9F1N9Qk.js";
6
8
  import "@radix-ui/react-aspect-ratio";
7
9
  import { B as b } from "./tooltip-DVeqVwqV.js";
8
10
  import "./chart-DntJZGxB.js";
9
11
  import "@radix-ui/react-collapsible";
10
- import "./sheet-C_39QrG0.js";
12
+ import "./sheet-tuC_C3M3.js";
11
13
  import { MoreVerticalIcon as he, Loader2Icon as me, AlertTriangleIcon as ge, GripVerticalIcon as ue, ArrowUpIcon as fe, ArrowDownIcon as pe, ArrowUpDownIcon as xe, ChevronLeftIcon as ve, ChevronRightIcon as ye, SettingsIcon as be } from "lucide-react";
12
14
  import "react-resizable-panels";
13
15
  import "clsx";
@@ -397,7 +399,7 @@ function $e({ columns: l, visibleColumns: a, toggleColumnVisibility: s }) {
397
399
  )) })
398
400
  ] });
399
401
  }
400
- function Ye({
402
+ function er({
401
403
  data: l,
402
404
  columns: a,
403
405
  getRowId: s,
@@ -541,7 +543,7 @@ function Ye({
541
543
  );
542
544
  }
543
545
  export {
544
- Ye as D,
546
+ er as D,
545
547
  De as T,
546
548
  Ie as a,
547
549
  je as b,
@@ -1,8 +1,10 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { u as a } from "./useKrosoftTranslation-C6AC_uCA.js";
2
+ import "date-fns/locale";
3
+ import "react-i18next";
4
+ import { u as a } from "./useKrosoftTranslation-DtdbUewZ.js";
3
5
  import { A as n, a as c } from "./alert-B9F1N9Qk.js";
4
6
  import { AlertTriangle as o } from "lucide-react";
5
- const h = ({ error: s }) => {
7
+ const x = ({ error: s }) => {
6
8
  const { t: i } = a();
7
9
  return s ? /* @__PURE__ */ r(n, { variant: "destructive", children: [
8
10
  /* @__PURE__ */ e(o, { className: "size-4" }),
@@ -17,5 +19,5 @@ const h = ({ error: s }) => {
17
19
  ] }) : null;
18
20
  };
19
21
  export {
20
- h as E
22
+ x as E
21
23
  };
@@ -1,12 +1,14 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { u as o } from "./useKrosoftTranslation-C6AC_uCA.js";
3
- const d = ({ message: r }) => {
4
- const { t: e } = o();
5
- return /* @__PURE__ */ s("div", { className: "p-6 border border-destructive bg-destructive/10 text-destructive rounded-surface animate-fade-in", children: [
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import "date-fns/locale";
3
+ import "react-i18next";
4
+ import { u as s } from "./useKrosoftTranslation-DtdbUewZ.js";
5
+ const n = ({ message: r }) => {
6
+ const { t: e } = s();
7
+ return /* @__PURE__ */ o("div", { className: "p-6 border border-destructive bg-destructive/10 text-destructive rounded-surface animate-fade-in", children: [
6
8
  /* @__PURE__ */ t("p", { className: "font-semibold mb-2", children: e("states.error") }),
7
9
  r !== void 0 && r !== "" ? /* @__PURE__ */ t("p", { className: "text-sm opacity-80", children: r }) : null
8
10
  ] });
9
11
  };
10
12
  export {
11
- d as E
13
+ n as E
12
14
  };
@@ -1,28 +1,29 @@
1
1
  import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
- import { u as q } from "./useKrosoftTranslation-C6AC_uCA.js";
3
- import { I as D } from "./ImageInput-BkmK7odp.js";
4
- import { A as V } from "./AppSubTitle-Equl_f9z.js";
5
- import { M as J } from "./MultiSelect-D0WF96y6.js";
6
- import { ai as L, al as Q, am as X, an as Y, aj as j, ao as $, bm as F, E as ee } from "./toggle-group-DLLrEwv2.js";
2
+ import "date-fns/locale";
3
+ import { useTranslation as q } from "react-i18next";
4
+ import { u as D } from "./useKrosoftTranslation-DtdbUewZ.js";
5
+ import { I as J } from "./ImageInput-CBDkCEho.js";
6
+ import { A as V } from "./AppSubTitle-BlwAxtMX.js";
7
+ import { M as L } from "./MultiSelect-DWNOCqe1.js";
8
+ import { ai as Q, al as X, am as Y, an as $, aj as j, ao as F, bm as ee, E as te } from "./toggle-group-DLLrEwv2.js";
7
9
  import "./alert-B9F1N9Qk.js";
8
10
  import "@radix-ui/react-aspect-ratio";
9
11
  import { B as P } from "./tooltip-DVeqVwqV.js";
10
- import { C as te, d as ae, a as re } from "./chart-DntJZGxB.js";
12
+ import { C as ae, d as re, a as se } from "./chart-DntJZGxB.js";
11
13
  import "@radix-ui/react-collapsible";
12
- import { I as C } from "./sheet-C_39QrG0.js";
14
+ import { I as C } from "./sheet-tuC_C3M3.js";
13
15
  import "lucide-react";
14
16
  import "react-resizable-panels";
15
17
  import { c as i } from "./tailwind.helper-B6yFEsav.js";
16
- import { S as se, h as ne, i as le, a as oe, c as ce } from "./select-BpjFWqAY.js";
18
+ import { S as ne, h as le, i as oe, a as ce, c as ie } from "./select-BpjFWqAY.js";
17
19
  import "next-themes";
18
20
  import "sonner";
19
- import { u as ie } from "./useToast-BFTk4lWz.js";
20
- import { zodResolver as ue } from "@hookform/resolvers/zod";
21
+ import { u as ue } from "./useToast-BFTk4lWz.js";
22
+ import { zodResolver as me } from "@hookform/resolvers/zod";
21
23
  import { useState as f } from "react";
22
- import { useForm as me } from "react-hook-form";
23
- import { useTranslation as de } from "react-i18next";
24
+ import { useForm as de } from "react-hook-form";
24
25
  import { z as y } from "zod";
25
- const Ze = ({
26
+ const _e = ({
26
27
  schema: v,
27
28
  isLoading: S,
28
29
  error: N,
@@ -34,7 +35,7 @@ const Ze = ({
34
35
  onRegisterSubmit: w,
35
36
  defaultCols: B = 4
36
37
  }) => {
37
- const { t: p } = de(), { t: h } = q(), { toast: E } = ie(), [k, T] = f(!1), [pe, I] = f({});
38
+ const { t: p } = q(), { t: h } = D(), { toast: E } = ue(), [k, T] = f(!1), [pe, I] = f({});
38
39
  if (!v) return null;
39
40
  const O = (e) => {
40
41
  switch (e) {
@@ -75,8 +76,8 @@ const Ze = ({
75
76
  }
76
77
  });
77
78
  }), y.object(e);
78
- })(), m = me({
79
- resolver: ue(R),
79
+ })(), m = de({
80
+ resolver: me(R),
80
81
  defaultValues: g || Object.fromEntries(v.sections.flatMap((e) => e.fields.map((t) => [t.key, t.defaultValue ?? null])))
81
82
  });
82
83
  f(() => {
@@ -152,7 +153,7 @@ const Ze = ({
152
153
  case "image": {
153
154
  const n = e, o = n.value !== void 0 ? n.value : t.value;
154
155
  return /* @__PURE__ */ r(
155
- D,
156
+ J,
156
157
  {
157
158
  value: o ?? "",
158
159
  onChange: (l) => {
@@ -196,7 +197,7 @@ const Ze = ({
196
197
  case "checkbox":
197
198
  return /* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
198
199
  /* @__PURE__ */ r(
199
- ee,
200
+ te,
200
201
  {
201
202
  id: e.key,
202
203
  checked: t.value === !0,
@@ -211,7 +212,7 @@ const Ze = ({
211
212
  ] }, e.key);
212
213
  case "textarea":
213
214
  return /* @__PURE__ */ r(
214
- F,
215
+ ee,
215
216
  {
216
217
  ...t,
217
218
  placeholder: e.placeholderKey ? p(e.placeholderKey) : "",
@@ -242,21 +243,21 @@ const Ze = ({
242
243
  }
243
244
  case "select": {
244
245
  const n = e, o = _(e.rules), l = t.value === null || t.value === void 0 ? "" : t.value, d = n.options, b = d.find((u) => u.value === l);
245
- return /* @__PURE__ */ c(se, { value: l, onValueChange: t.onChange, disabled: s, children: [
246
+ return /* @__PURE__ */ c(ne, { value: l, onValueChange: t.onChange, disabled: s, children: [
246
247
  /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(
247
- ne,
248
+ le,
248
249
  {
249
250
  className: i(a && "border-destructive"),
250
251
  onClear: o && l ? (u) => {
251
252
  u.preventDefault(), u.stopPropagation(), t.onChange(null);
252
253
  } : void 0,
253
- children: /* @__PURE__ */ r(le, { placeholder: e.placeholderKey ? p(e.placeholderKey) : "", children: b ? /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
254
+ children: /* @__PURE__ */ r(oe, { placeholder: e.placeholderKey ? p(e.placeholderKey) : "", children: b ? /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
254
255
  b.color && /* @__PURE__ */ r("div", { className: "w-4 h-4 rounded-full", style: { backgroundColor: b.color } }),
255
256
  b.label
256
257
  ] }) : void 0 })
257
258
  }
258
259
  ) }),
259
- /* @__PURE__ */ r(oe, { children: d.map((u, W) => /* @__PURE__ */ r(ce, { value: u.value, children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
260
+ /* @__PURE__ */ r(ce, { children: d.map((u, W) => /* @__PURE__ */ r(ie, { value: u.value, children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
260
261
  u.color && /* @__PURE__ */ r("div", { className: "w-4 h-4 rounded-full", style: { backgroundColor: u.color } }),
261
262
  u.label
262
263
  ] }) }, W)) })
@@ -265,7 +266,7 @@ const Ze = ({
265
266
  case "multiSelect": {
266
267
  const n = e, o = t.value ?? [];
267
268
  return /* @__PURE__ */ r(
268
- J,
269
+ L,
269
270
  {
270
271
  options: n.options,
271
272
  selected: o,
@@ -291,19 +292,19 @@ const Ze = ({
291
292
  }
292
293
  }, U = (e, t) => {
293
294
  const a = /* @__PURE__ */ r("div", { className: i("grid grid-cols-4 gap-4"), children: e.fields.map((s) => /* @__PURE__ */ r(
294
- Q,
295
+ X,
295
296
  {
296
297
  control: m.control,
297
298
  name: s.key,
298
299
  render: ({ field: n }) => {
299
300
  var o;
300
- return /* @__PURE__ */ c(X, { className: i(O(((o = s.layout) == null ? void 0 : o.cols) ?? B)), children: [
301
- s.type !== "checkbox" && s.type !== "html" && /* @__PURE__ */ c(Y, { children: [
301
+ return /* @__PURE__ */ c(Y, { className: i(O(((o = s.layout) == null ? void 0 : o.cols) ?? B)), children: [
302
+ s.type !== "checkbox" && s.type !== "html" && /* @__PURE__ */ c($, { children: [
302
303
  p(s.labelKey),
303
304
  G(s.rules) && /* @__PURE__ */ r("span", { className: "text-destructive ml-1", children: "*" })
304
305
  ] }),
305
306
  /* @__PURE__ */ r(j, { children: H(s, n) }),
306
- /* @__PURE__ */ r($, {})
307
+ /* @__PURE__ */ r(F, {})
307
308
  ] });
308
309
  }
309
310
  },
@@ -312,12 +313,12 @@ const Ze = ({
312
313
  return v.useCards === !1 ? /* @__PURE__ */ c("div", { className: "space-y-4 mb-6", children: [
313
314
  e.titleKey && /* @__PURE__ */ r(V, { titleKey: e.titleKey }),
314
315
  a
315
- ] }, t) : /* @__PURE__ */ c(te, { className: "mb-6", children: [
316
- e.titleKey && /* @__PURE__ */ r(ae, { children: /* @__PURE__ */ r(V, { titleKey: e.titleKey }) }),
317
- /* @__PURE__ */ r(re, { children: a })
316
+ ] }, t) : /* @__PURE__ */ c(ae, { className: "mb-6", children: [
317
+ e.titleKey && /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(V, { titleKey: e.titleKey }) }),
318
+ /* @__PURE__ */ r(se, { children: a })
318
319
  ] }, t);
319
320
  };
320
- return /* @__PURE__ */ r(L, { ...m, children: /* @__PURE__ */ c(
321
+ return /* @__PURE__ */ r(Q, { ...m, children: /* @__PURE__ */ c(
321
322
  "form",
322
323
  {
323
324
  onSubmit: (e) => {
@@ -338,5 +339,5 @@ const Ze = ({
338
339
  ) });
339
340
  };
340
341
  export {
341
- Ze as G
342
+ _e as G
342
343
  };
@@ -1,12 +1,14 @@
1
1
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
- import { u as x } from "./useKrosoftTranslation-C6AC_uCA.js";
2
+ import "date-fns/locale";
3
+ import "react-i18next";
4
+ import { u as x } from "./useKrosoftTranslation-DtdbUewZ.js";
3
5
  import "./toggle-group-DLLrEwv2.js";
4
6
  import "./alert-B9F1N9Qk.js";
5
7
  import "@radix-ui/react-aspect-ratio";
6
8
  import { B as N } from "./tooltip-DVeqVwqV.js";
7
9
  import "./chart-DntJZGxB.js";
8
10
  import "@radix-ui/react-collapsible";
9
- import "./sheet-C_39QrG0.js";
11
+ import "./sheet-tuC_C3M3.js";
10
12
  import { XIcon as w, ImageIcon as y, UploadIcon as I } from "lucide-react";
11
13
  import "react-resizable-panels";
12
14
  import { c as p } from "./tailwind.helper-B6yFEsav.js";
@@ -16,12 +18,12 @@ import "sonner";
16
18
  import { forwardRef as j, useRef as T } from "react";
17
19
  import { u as R } from "./useNotifications-zbUhCvF_.js";
18
20
  const P = j(
19
- ({ value: a, onChange: n, accept: m = "image/jpeg,image/png,image/webp", maxSizeMB: i = 2, disabled: l = !1, className: f = "", hint: c = "JPG, PNG, WEBP" }, h) => {
21
+ ({ value: a, onChange: m, accept: n = "image/jpeg,image/png,image/webp", maxSizeMB: i = 2, disabled: l = !1, className: f = "", hint: c = "JPG, PNG, WEBP" }, h) => {
20
22
  const { t } = x(), { showError: d } = R(), r = T(null), g = (b) => {
21
23
  var u;
22
24
  const o = (u = b.target.files) == null ? void 0 : u[0];
23
25
  if (!o) return;
24
- if (!m.split(",").map((v) => v.trim()).includes(o.type)) {
26
+ if (!n.split(",").map((v) => v.trim()).includes(o.type)) {
25
27
  d(t("states.errorTitle"), t("image.invalidType", { types: c })), r.current && (r.current.value = "");
26
28
  return;
27
29
  }
@@ -29,12 +31,12 @@ const P = j(
29
31
  d(t("states.errorTitle"), t("image.tooLarge", { size: i })), r.current && (r.current.value = "");
30
32
  return;
31
33
  }
32
- n(o), r.current && (r.current.value = "");
34
+ m(o), r.current && (r.current.value = "");
33
35
  };
34
36
  return /* @__PURE__ */ e("div", { ref: h, className: f, children: a ? /* @__PURE__ */ s("div", { className: "relative w-32 h-32 rounded-surface overflow-hidden border-2 border-border", children: [
35
37
  /* @__PURE__ */ e("img", { src: a, alt: "Preview", className: "w-full h-full object-cover" }),
36
38
  !l && /* @__PURE__ */ e(N, { type: "button", variant: "destructive", size: "sm", className: "absolute top-1 right-1 h-6 w-6 p-0", onClick: () => {
37
- n(null);
39
+ m(null);
38
40
  }, children: /* @__PURE__ */ e(w, { className: "h-4 w-4" }) })
39
41
  ] }) : l ? /* @__PURE__ */ s("div", { className: p("flex flex-col items-center justify-center w-full h-32", "border-2 border-dashed border-border rounded-surface", "bg-muted/30"), children: [
40
42
  /* @__PURE__ */ e(y, { className: "h-8 w-8 text-muted-foreground/50 mb-2" }),
@@ -56,7 +58,7 @@ const P = j(
56
58
  i,
57
59
  "MB)"
58
60
  ] }),
59
- /* @__PURE__ */ e("input", { ref: r, type: "file", className: "hidden", accept: m, onChange: g })
61
+ /* @__PURE__ */ e("input", { ref: r, type: "file", className: "hidden", accept: n, onChange: g })
60
62
  ]
61
63
  }
62
64
  ) });
@@ -5,7 +5,7 @@ import "@radix-ui/react-aspect-ratio";
5
5
  import { B as c } from "./tooltip-DVeqVwqV.js";
6
6
  import "./chart-DntJZGxB.js";
7
7
  import "@radix-ui/react-collapsible";
8
- import "./sheet-C_39QrG0.js";
8
+ import "./sheet-tuC_C3M3.js";
9
9
  import { ArrowLeftIcon as l } from "lucide-react";
10
10
  import "react-resizable-panels";
11
11
  import "clsx";
@@ -14,28 +14,29 @@ import "./select-BpjFWqAY.js";
14
14
  import "next-themes";
15
15
  import "sonner";
16
16
  import "react";
17
- import { A as f } from "./AppActions-BSJrimRT.js";
17
+ import { A as f } from "./AppActions-QHJ6CP5w.js";
18
18
  import { A as d } from "./AppTitle-D15YXeMx.js";
19
19
  import { u } from "./useDocumentTitle-WNwdPz-I.js";
20
20
  import { useTranslation as g } from "react-i18next";
21
21
  import "@krosoft/core/helpers";
22
- import { b as h, a as x } from "./SkeletonCards-DhsZyG9k.js";
23
- import { E as A } from "./ErrorState-C8pd098n.js";
24
- function O({
22
+ import { b as h, a as x } from "./SkeletonCards-CQKcSQW3.js";
23
+ import "date-fns/locale";
24
+ import { E as A } from "./ErrorState-ZtWe5C0s.js";
25
+ function P({
25
26
  icon: t,
26
- titleKey: e,
27
- descriptionKey: i,
27
+ titleKey: i,
28
+ descriptionKey: e,
28
29
  actions: a,
29
30
  onBack: o,
30
31
  renderPreActions: s,
31
32
  className: p
32
33
  }) {
33
34
  const { t: n } = g();
34
- return u(n(e)), /* @__PURE__ */ m("div", { className: "flex flex-row items-center justify-between gap-3 md:gap-4", children: [
35
+ return u(n(i)), /* @__PURE__ */ m("div", { className: "flex flex-row items-center justify-between gap-3 md:gap-4", children: [
35
36
  /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
36
37
  o && /* @__PURE__ */ r(c, { variant: "ghost", size: "icon", className: "shrink-0", onClick: o, children: /* @__PURE__ */ r(l, { className: "h-4 w-4" }) }),
37
38
  t && /* @__PURE__ */ r("div", { className: "size-12 shrink-0 bg-blue-100 rounded-control flex items-center justify-center", children: /* @__PURE__ */ r(t, { className: "h-6 w-6 text-blue-600" }) }),
38
- /* @__PURE__ */ r(d, { titleKey: e, descriptionKey: i })
39
+ /* @__PURE__ */ r(d, { titleKey: i, descriptionKey: e })
39
40
  ] }),
40
41
  /* @__PURE__ */ m("div", { className: "flex shrink-0 items-center gap-2 md:gap-4", children: [
41
42
  s && s(),
@@ -43,8 +44,8 @@ function O({
43
44
  ] })
44
45
  ] });
45
46
  }
46
- const P = ({ stats: t, isLoading: e, error: i }) => e ? /* @__PURE__ */ r(h, { count: 4 }) : i ? /* @__PURE__ */ r(A, { message: i.message }) : /* @__PURE__ */ r(x, { stats: t });
47
+ const Q = ({ stats: t, isLoading: i, error: e }) => i ? /* @__PURE__ */ r(h, { count: 4 }) : e ? /* @__PURE__ */ r(A, { message: e.message }) : /* @__PURE__ */ r(x, { stats: t });
47
48
  export {
48
- O as A,
49
- P as K
49
+ P as A,
50
+ Q as K
50
51
  };
@@ -1,5 +1,7 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import { u as O } from "./useKrosoftTranslation-C6AC_uCA.js";
2
+ import "date-fns/locale";
3
+ import "react-i18next";
4
+ import { u as O } from "./useKrosoftTranslation-DtdbUewZ.js";
3
5
  import { useState as L, useRef as T, useMemo as x, useEffect as z } from "react";
4
6
  import { E as I } from "./toggle-group-DLLrEwv2.js";
5
7
  import "./alert-B9F1N9Qk.js";
@@ -7,14 +9,14 @@ import "@radix-ui/react-aspect-ratio";
7
9
  import { f as P } from "./tooltip-DVeqVwqV.js";
8
10
  import "./chart-DntJZGxB.js";
9
11
  import "@radix-ui/react-collapsible";
10
- import "./sheet-C_39QrG0.js";
12
+ import "./sheet-tuC_C3M3.js";
11
13
  import { XIcon as q, ChevronDownIcon as S, SearchIcon as F } from "lucide-react";
12
14
  import "react-resizable-panels";
13
15
  import { c as R } from "./tailwind.helper-B6yFEsav.js";
14
16
  import "./select-BpjFWqAY.js";
15
17
  import "next-themes";
16
18
  import "sonner";
17
- const te = ({
19
+ const ne = ({
18
20
  options: a,
19
21
  selected: t,
20
22
  onToggle: N,
@@ -143,5 +145,5 @@ const te = ({
143
145
  ] });
144
146
  };
145
147
  export {
146
- te as M
148
+ ne as M
147
149
  };