@krosoft/react 0.0.261 → 0.0.262

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 (106) hide show
  1. package/dist/AppActions-D8KKXpq-.js +60 -0
  2. package/dist/{AppSubTitle-C8zoMJo_.js → AppSubTitle-CVhjWRBp.js} +7 -7
  3. package/dist/{AppTitle-BR4JFZfp.js → AppTitle-DBGJRsjU.js} +6 -6
  4. package/dist/{ErrorAlert-DClCk3Ey.js → ErrorAlert-6ECy_Dox.js} +5 -5
  5. package/dist/{GenericForm-JqObtUCQ.js → GenericForm-C86_Jk7X.js} +104 -105
  6. package/dist/{ImageInput-BLIo5LYH.js → ImageInput-DvHgBYsy.js} +5 -5
  7. package/dist/{MultiSelect-B0Ke0cfS.js → MultiSelect-TGu_k3KM.js} +7 -7
  8. package/dist/{SearchInput-CXZd2rSc.js → SearchInput-Csflv8Az.js} +31 -31
  9. package/dist/{behavior-DDtrNBAq.js → behavior-C4WdfbR1.js} +1 -1
  10. package/dist/{cards-Ct4wFYa8.js → cards-nqZOcSkh.js} +42 -42
  11. package/dist/{charts-CwT9AFWj.js → charts-BfeSrTmX.js} +1 -1
  12. package/dist/components/core/cards/index.js +1 -1
  13. package/dist/components/core/charts/index.js +1 -1
  14. package/dist/components/core/dialogs/index.js +3 -3
  15. package/dist/components/core/filters/ActiveFilters.d.ts +2 -2
  16. package/dist/components/core/filters/ActiveFilters.d.ts.map +1 -1
  17. package/dist/components/core/filters/SearchableFilterPill.d.ts +2 -2
  18. package/dist/components/core/filters/SearchableFilterPill.d.ts.map +1 -1
  19. package/dist/components/core/filters/TableFilter.d.ts.map +1 -1
  20. package/dist/components/core/filters/index.js +127 -127
  21. package/dist/components/core/forms/GenericForm.d.ts.map +1 -1
  22. package/dist/components/core/forms/index.js +1 -1
  23. package/dist/components/core/index.js +19 -19
  24. package/dist/components/core/inputs/index.js +4 -4
  25. package/dist/components/core/language/index.js +1 -1
  26. package/dist/components/core/layouts/index.js +26 -26
  27. package/dist/components/core/navbar/NotificationsBell.d.ts +8 -2
  28. package/dist/components/core/navbar/NotificationsBell.d.ts.map +1 -1
  29. package/dist/components/core/navbar/index.js +1 -1
  30. package/dist/components/core/states/index.js +2 -2
  31. package/dist/components/core/table/DataTable.d.ts +4 -19
  32. package/dist/components/core/table/DataTable.d.ts.map +1 -1
  33. package/dist/components/core/table/TableActions.d.ts +2 -2
  34. package/dist/components/core/table/TableActions.d.ts.map +1 -1
  35. package/dist/components/core/table/TableBody.d.ts +6 -6
  36. package/dist/components/core/table/TableBody.d.ts.map +1 -1
  37. package/dist/components/core/table/TableBulkActions.d.ts +2 -2
  38. package/dist/components/core/table/TableBulkActions.d.ts.map +1 -1
  39. package/dist/components/core/table/TableHeader.d.ts +2 -2
  40. package/dist/components/core/table/TableHeader.d.ts.map +1 -1
  41. package/dist/components/core/table/TablePagination.d.ts.map +1 -1
  42. package/dist/components/core/table/TableSettings.d.ts +2 -2
  43. package/dist/components/core/table/TableSettings.d.ts.map +1 -1
  44. package/dist/components/core/table/index.js +1 -1
  45. package/dist/components/core/tabs/AppVerticalTabs.d.ts.map +1 -1
  46. package/dist/components/core/tabs/index.js +39 -40
  47. package/dist/components/core/theme/index.js +1 -1
  48. package/dist/components/index.js +19 -19
  49. package/dist/components/ui/index.js +2 -2
  50. package/dist/constants/datatable.d.ts +1 -1
  51. package/dist/dialogs-BiPcEbRx.js +207 -0
  52. package/dist/helpers/table.helper.d.ts +4 -4
  53. package/dist/helpers/table.helper.d.ts.map +1 -1
  54. package/dist/hooks/behavior/index.js +1 -1
  55. package/dist/hooks/index.js +6 -6
  56. package/dist/hooks/ui/index.js +5 -5
  57. package/dist/hooks/ui/useDataTable.d.ts +1 -1
  58. package/dist/hooks/ui/useDataTable.d.ts.map +1 -1
  59. package/dist/i18n/index.js +1 -1
  60. package/dist/i18n/krosoftLocales.d.ts +22 -0
  61. package/dist/i18n/krosoftLocales.d.ts.map +1 -1
  62. package/dist/i18n/useKrosoftTranslation.d.ts +9 -6
  63. package/dist/i18n/useKrosoftTranslation.d.ts.map +1 -1
  64. package/dist/{i18n-DW5zKBEK.js → i18n-CevI9Cgk.js} +35 -13
  65. package/dist/{inputs-CNDApo_M.js → inputs-BUXmTc40.js} +3 -3
  66. package/dist/{language-CK_kDejF.js → language-DeQC57bX.js} +9 -9
  67. package/dist/{navbar-UsCqs4DK.js → navbar-Cl4welok.js} +75 -62
  68. package/dist/pwa/index.js +4 -4
  69. package/dist/{sheet-_rrCMue7.js → sheet-RYwa4-Nl.js} +7 -7
  70. package/dist/{states-BusGNKku.js → states-C6lWnADN.js} +2 -2
  71. package/dist/{table-CZ5Ogd4w.js → table-BWEBIVqj.js} +235 -242
  72. package/dist/{theme-QayeX440.js → theme-Dwc4zNXG.js} +9 -9
  73. package/dist/types/AppAction.d.ts +1 -1
  74. package/dist/types/AppAction.d.ts.map +1 -1
  75. package/dist/types/{BulkAction.d.ts → DataTableBulkAction.d.ts} +3 -3
  76. package/dist/types/DataTableBulkAction.d.ts.map +1 -0
  77. package/dist/types/{ColumnDef.d.ts → DataTableColumn.d.ts} +3 -3
  78. package/dist/types/DataTableColumn.d.ts.map +1 -0
  79. package/dist/types/DataTableConfig.d.ts +21 -5
  80. package/dist/types/DataTableConfig.d.ts.map +1 -1
  81. package/dist/types/{RowAction.d.ts → DataTableRowAction.d.ts} +3 -3
  82. package/dist/types/DataTableRowAction.d.ts.map +1 -0
  83. package/dist/types/DataTableServerState.d.ts +20 -0
  84. package/dist/types/DataTableServerState.d.ts.map +1 -0
  85. package/dist/types/FilterFieldConfig.d.ts +2 -2
  86. package/dist/types/FilterFieldConfig.d.ts.map +1 -1
  87. package/dist/types/FilterSection.d.ts +1 -1
  88. package/dist/types/FilterSection.d.ts.map +1 -1
  89. package/dist/types/UseDataTableProps.d.ts +10 -16
  90. package/dist/types/UseDataTableProps.d.ts.map +1 -1
  91. package/dist/types/UseDataTableResult.d.ts +3 -3
  92. package/dist/types/UseDataTableResult.d.ts.map +1 -1
  93. package/dist/types/index.d.ts +4 -3
  94. package/dist/types/index.d.ts.map +1 -1
  95. package/dist/{ui-hnbBp9RZ.js → ui-D7YSs2kF.js} +1 -1
  96. package/dist/{ui-Dg7lq9J8.js → ui-IEH46J4v.js} +4 -4
  97. package/dist/{useDocumentTitle-D7MywIeB.js → useDocumentTitle-C5TsEDqh.js} +4 -4
  98. package/dist/{useFixedColumns-DnzqhbfT.js → useFixedColumns-BVZs3wbh.js} +27 -27
  99. package/dist/{useLanguage-B1dusDJk.js → useLanguage-DdVIzhME.js} +1 -1
  100. package/dist/{useTheme-D1APOG9I.js → useTheme-ZzPZl0MM.js} +1 -1
  101. package/package.json +1 -1
  102. package/dist/AppActions-CcU3ClFS.js +0 -60
  103. package/dist/dialogs-BDtZIxQa.js +0 -208
  104. package/dist/types/BulkAction.d.ts.map +0 -1
  105. package/dist/types/ColumnDef.d.ts.map +0 -1
  106. package/dist/types/RowAction.d.ts.map +0 -1
@@ -1,16 +1,16 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { i as t, n, r, s as i, t as a } from "./tooltip-BmZ9Bfou.js";
3
- import { t as o } from "./i18n-DW5zKBEK.js";
4
- import { C as s, S as c, b as l, d as u, g as d, h as f, i as p, l as m, m as h, p as g, r as _, t as v, v as y, x as b, y as x } from "./sheet-_rrCMue7.js";
2
+ import { t } from "./i18n-CevI9Cgk.js";
3
+ import { i as n, n as r, r as i, s as a, t as o } from "./tooltip-BmZ9Bfou.js";
4
+ import { C as s, S as c, b as l, d as u, g as d, h as f, i as p, l as m, m as h, p as g, r as _, t as v, v as y, x as b, y as x } from "./sheet-RYwa4-Nl.js";
5
5
  import { t as S } from "./skeleton-D6Ga4BLw.js";
6
- import { c as C } from "./behavior-DDtrNBAq.js";
6
+ import { c as C } from "./behavior-C4WdfbR1.js";
7
7
  import "./hooks/index.js";
8
8
  import * as w from "react";
9
9
  import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
10
10
  import { BellIcon as O, ChevronDownIcon as k, LoaderCircleIcon as A, MenuIcon as j, SearchIcon as M, Trash2Icon as N } from "lucide-react";
11
11
  //#region src/components/core/navbar/GlobalSearch.tsx
12
- var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open: d, onOpenChange: f, trigger: p = !0, triggerLabel: m, shortcut: h = !0, shortcutLabel: g = "Ctrl+K", placeholder: _, emptyLabel: v, loadingLabel: S, title: C, description: O, hint: k, className: j }) => {
13
- let { t: N } = o(), [P, F] = w.useState(!1), I = d !== void 0, L = I ? d : P, R = w.useCallback((e) => {
12
+ var P = ({ groups: n, search: r, onSearch: i, onSelect: o, loading: u = !1, open: d, onOpenChange: f, trigger: p = !0, triggerLabel: m, shortcut: h = !0, shortcutLabel: g = "Ctrl+K", placeholder: _, emptyLabel: v, loadingLabel: S, title: C, description: O, hint: k, className: j }) => {
13
+ let { t: N } = t(), [P, F] = w.useState(!1), I = d !== void 0, L = I ? d : P, R = w.useCallback((e) => {
14
14
  I || F(e), f?.(e);
15
15
  }, [I, f]);
16
16
  w.useEffect(() => {
@@ -27,9 +27,9 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
27
27
  R
28
28
  ]);
29
29
  let z = (e) => {
30
- R(!1), r(""), a(e);
31
- }, B = t.some((e) => e.items.length > 0);
32
- return /* @__PURE__ */ D(T, { children: [p && /* @__PURE__ */ E(i, {
30
+ R(!1), i(""), o(e);
31
+ }, B = n.some((e) => e.items.length > 0);
32
+ return /* @__PURE__ */ D(T, { children: [p && /* @__PURE__ */ E(a, {
33
33
  variant: "ghost",
34
34
  size: "icon",
35
35
  "aria-label": m ?? N("search.trigger"),
@@ -48,8 +48,8 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
48
48
  className: j,
49
49
  children: [
50
50
  /* @__PURE__ */ E(b, {
51
- value: n,
52
- onValueChange: r,
51
+ value: r,
52
+ onValueChange: i,
53
53
  placeholder: _ ?? N("search.placeholder")
54
54
  }),
55
55
  /* @__PURE__ */ D(s, { children: [
@@ -58,7 +58,7 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
58
58
  children: [/* @__PURE__ */ E(A, { className: "size-4 animate-spin" }), S ?? N("search.loading")]
59
59
  }),
60
60
  !B && !u && /* @__PURE__ */ E(x, { children: v ?? N("states.noResultDot") }),
61
- t.map((t) => t.items.length === 0 ? null : /* @__PURE__ */ E(l, {
61
+ n.map((t) => t.items.length === 0 ? null : /* @__PURE__ */ E(l, {
62
62
  heading: t.heading,
63
63
  children: t.items.map((t) => {
64
64
  let n = t.icon;
@@ -91,68 +91,68 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
91
91
  })
92
92
  ]
93
93
  })] });
94
- }, F = 9, I = ({ items: t, onSelect: n, onMarkAllAsRead: r, onRemove: a, loading: s = !1, unreadCount: c, maxBadgeCount: l = F, open: d, onOpenChange: p, triggerLabel: m, title: _, emptyLabel: v, loadingLabel: y, markAllAsReadLabel: b, removeLabel: x, className: S, contentClassName: C, badgeClassName: T, itemClassName: k, unreadItemClassName: A }) => {
95
- let { t: j } = o(), [M, P] = w.useState(!1), I = d !== void 0, L = I ? d : M, R = (e) => {
96
- I || P(e), p?.(e);
97
- }, z = c ?? t.filter((e) => !e.read).length, B = m ?? j("notifications.trigger"), V = (e) => {
98
- R(!1), n?.(e);
94
+ }, F = 9, I = ({ items: n, onSelect: r, onMarkAllAsRead: i, onRemove: o, onSeeAll: s, isLoading: c = !1, unreadCount: l, maxBadgeCount: d = F, open: p, onOpenChange: m, triggerLabel: _, title: v, emptyLabel: y, loadingLabel: b, markAllAsReadLabel: x, removeLabel: S, seeAllLabel: C, className: T, contentClassName: k, badgeClassName: A, itemClassName: j, unreadItemClassName: M }) => {
95
+ let { t: P } = t(), [I, L] = w.useState(!1), R = p !== void 0, z = R ? p : I, B = (e) => {
96
+ R || L(e), m?.(e);
97
+ }, V = l ?? n.filter((e) => !e.read).length, H = _ ?? P("notifications.trigger"), U = (e) => {
98
+ B(!1), r?.(e);
99
99
  };
100
100
  return /* @__PURE__ */ D(g, {
101
- open: L,
102
- onOpenChange: R,
101
+ open: z,
102
+ onOpenChange: B,
103
103
  children: [/* @__PURE__ */ E(f, {
104
104
  asChild: !0,
105
- children: /* @__PURE__ */ D(i, {
105
+ children: /* @__PURE__ */ D(a, {
106
106
  type: "button",
107
107
  variant: "ghost",
108
108
  size: "icon",
109
- className: e("relative rounded-control", S),
110
- "aria-label": z > 0 ? `${B} (${String(z)})` : B,
111
- title: B,
112
- children: [/* @__PURE__ */ E(O, { className: "size-4" }), z > 0 && /* @__PURE__ */ E("span", {
113
- className: e("absolute right-1 top-1 flex size-4 items-center justify-center rounded-full bg-primary text-[10px] font-bold leading-none text-primary-foreground", T),
114
- children: z > l ? `${String(l)}+` : z
109
+ className: e("relative rounded-control", T),
110
+ "aria-label": V > 0 ? `${H} (${String(V)})` : H,
111
+ title: H,
112
+ children: [/* @__PURE__ */ E(O, { className: "size-4" }), V > 0 && /* @__PURE__ */ E("span", {
113
+ className: e("absolute right-1 top-1 flex size-4 items-center justify-center rounded-full bg-primary text-[10px] font-bold leading-none text-primary-foreground", A),
114
+ children: V > d ? `${String(d)}+` : V
115
115
  })]
116
116
  })
117
117
  }), /* @__PURE__ */ D(h, {
118
118
  align: "end",
119
- className: e("w-80 p-0", C),
119
+ className: e("w-80 p-0", k),
120
120
  children: [
121
121
  /* @__PURE__ */ D("div", {
122
122
  className: "flex items-center justify-between gap-2 border-b px-3 py-2",
123
123
  children: [/* @__PURE__ */ E("span", {
124
124
  className: "text-sm font-medium",
125
- children: _ ?? j("notifications.title")
126
- }), r && z > 0 && /* @__PURE__ */ E(i, {
125
+ children: v ?? P("notifications.title")
126
+ }), i && V > 0 && /* @__PURE__ */ E(a, {
127
127
  type: "button",
128
128
  variant: "ghost",
129
129
  size: "sm",
130
130
  className: "h-7 text-xs",
131
- onClick: r,
132
- children: b ?? j("notifications.markAllAsRead")
131
+ onClick: i,
132
+ children: x ?? P("notifications.markAllAsRead")
133
133
  })]
134
134
  }),
135
- s && /* @__PURE__ */ E("p", {
135
+ c && /* @__PURE__ */ E("p", {
136
136
  className: "px-3 py-6 text-center text-sm text-muted-foreground",
137
- children: y ?? j("states.loading")
137
+ children: b ?? P("states.loading")
138
138
  }),
139
- !s && t.length === 0 && /* @__PURE__ */ E("p", {
139
+ !c && n.length === 0 && /* @__PURE__ */ E("p", {
140
140
  className: "px-3 py-6 text-center text-sm text-muted-foreground",
141
- children: v ?? j("notifications.empty")
141
+ children: y ?? P("notifications.empty")
142
142
  }),
143
- !s && t.length > 0 && /* @__PURE__ */ E(u, {
143
+ !c && n.length > 0 && /* @__PURE__ */ E(u, {
144
144
  className: "max-h-96",
145
145
  children: /* @__PURE__ */ E("ul", {
146
146
  className: "divide-y",
147
- children: t.map((t) => {
147
+ children: n.map((t) => {
148
148
  let n = t.icon;
149
149
  return /* @__PURE__ */ D("li", {
150
- className: e("flex items-start gap-2 px-3 py-2", !t.read && (A ?? "bg-accent/40"), k),
150
+ className: e("flex items-start gap-2 px-3 py-2", !t.read && (M ?? "bg-accent/40"), j),
151
151
  children: [/* @__PURE__ */ D("button", {
152
152
  type: "button",
153
153
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-sm text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
154
154
  onClick: () => {
155
- V(t);
155
+ U(t);
156
156
  },
157
157
  children: [n && /* @__PURE__ */ E("span", {
158
158
  className: e("mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground", t.iconClassName),
@@ -180,30 +180,43 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
180
180
  })
181
181
  ]
182
182
  })]
183
- }), a && /* @__PURE__ */ E(i, {
183
+ }), o && /* @__PURE__ */ E(a, {
184
184
  type: "button",
185
185
  variant: "ghost",
186
186
  size: "icon",
187
187
  className: "size-7 shrink-0 text-muted-foreground hover:text-destructive",
188
188
  onClick: () => {
189
- a(t);
189
+ o(t);
190
190
  },
191
- "aria-label": x ?? j("notifications.remove"),
192
- title: x ?? j("notifications.remove"),
191
+ "aria-label": S ?? P("notifications.remove"),
192
+ title: S ?? P("notifications.remove"),
193
193
  children: /* @__PURE__ */ E(N, { className: "size-3.5" })
194
194
  })]
195
195
  }, t.key);
196
196
  })
197
197
  })
198
+ }),
199
+ s && /* @__PURE__ */ E("div", {
200
+ className: "border-t p-1",
201
+ children: /* @__PURE__ */ E(a, {
202
+ type: "button",
203
+ variant: "ghost",
204
+ size: "sm",
205
+ className: "h-8 w-full justify-center text-xs font-medium",
206
+ onClick: () => {
207
+ B(!1), s?.();
208
+ },
209
+ children: C ?? P("notifications.seeAll")
210
+ })
198
211
  })
199
212
  ]
200
213
  })]
201
214
  });
202
- }, L = (e, t, n) => t === e ? !0 : e === "/" || !t.startsWith(`${e}/`) ? !1 : !n.some((n) => n !== e && n.startsWith(`${e}/`) && (t === n || t.startsWith(`${n}/`))), R = ({ path: r, icon: i, label: o, badge: s, subItems: c, currentPath: l, collapsed: u, dense: d = !1, onItemClick: f }) => {
203
- let p = c?.map((e) => e.path) ?? [], [m, h] = w.useState(c?.some((e) => L(e.path, l, p)) ?? !1), g = r ? l === r || r !== "/" && l.startsWith(`${r}/`) : !1, _ = c?.some((e) => L(e.path, l, p)), v = /* @__PURE__ */ D("a", {
204
- href: r ?? "#",
215
+ }, L = (e, t, n) => t === e ? !0 : e === "/" || !t.startsWith(`${e}/`) ? !1 : !n.some((n) => n !== e && n.startsWith(`${e}/`) && (t === n || t.startsWith(`${n}/`))), R = ({ path: t, icon: i, label: a, badge: s, subItems: c, currentPath: l, collapsed: u, dense: d = !1, onItemClick: f }) => {
216
+ let p = c?.map((e) => e.path) ?? [], [m, h] = w.useState(c?.some((e) => L(e.path, l, p)) ?? !1), g = t ? l === t || t !== "/" && l.startsWith(`${t}/`) : !1, _ = c?.some((e) => L(e.path, l, p)), v = /* @__PURE__ */ D("a", {
217
+ href: t ?? "#",
205
218
  onClick: (e) => {
206
- e.ctrlKey || e.metaKey || e.button === 1 || (e.preventDefault(), c && c.length > 0 ? u || h(!m) : r && f(r));
219
+ e.ctrlKey || e.metaKey || e.button === 1 || (e.preventDefault(), c && c.length > 0 ? u || h(!m) : t && f(t));
207
220
  },
208
221
  className: e("flex items-center cursor-pointer transition-all duration-200 group rounded-control", d ? "gap-2.5 mb-0.5" : "gap-3 mb-1", u ? d ? "justify-center p-2 h-9 w-9 mx-auto" : "justify-center p-3 h-12 w-12 mx-auto" : d ? "px-3 py-1.5 h-9" : "px-4 py-3 h-12", g || !u && _ ? d ? "bg-sidebar-primary text-sidebar-primary-foreground" : "bg-sidebar-primary text-sidebar-primary-foreground shadow-lg" : "hover:bg-sidebar-accent text-sidebar-foreground hover:text-sidebar-accent-foreground"),
209
222
  children: [/* @__PURE__ */ E("div", {
@@ -212,7 +225,7 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
212
225
  }), !u && /* @__PURE__ */ D(T, { children: [
213
226
  /* @__PURE__ */ E("span", {
214
227
  className: e("flex-grow transition-opacity duration-150 font-medium", d ? "text-sm" : ""),
215
- children: o
228
+ children: a
216
229
  }),
217
230
  s !== void 0 && /* @__PURE__ */ E("span", {
218
231
  className: "bg-red-500 text-white text-xs rounded-full py-1 min-w-[20px] text-center px-2 font-semibold",
@@ -221,10 +234,10 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
221
234
  c && c.length > 0 && /* @__PURE__ */ E(k, { className: e("size-4 transition-transform duration-200", m ? "rotate-180" : "") })
222
235
  ] })]
223
236
  });
224
- return /* @__PURE__ */ D(T, { children: [u ? /* @__PURE__ */ D(a, { children: [/* @__PURE__ */ E(t, {
237
+ return /* @__PURE__ */ D(T, { children: [u ? /* @__PURE__ */ D(o, { children: [/* @__PURE__ */ E(n, {
225
238
  asChild: !0,
226
239
  children: v
227
- }), /* @__PURE__ */ E(n, {
240
+ }), /* @__PURE__ */ E(r, {
228
241
  side: "right",
229
242
  sideOffset: 6,
230
243
  className: "rounded-surface z-[99999] flex gap-2 bg-sidebar text-sidebar-foreground border border-sidebar-border py-2 text-sm shadow-lg",
@@ -234,7 +247,7 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
234
247
  className: "flex items-center gap-2",
235
248
  children: [/* @__PURE__ */ E("p", {
236
249
  className: "font-semibold",
237
- children: o
250
+ children: a
238
251
  }), s !== void 0 && /* @__PURE__ */ D("span", {
239
252
  className: "ml-1 text-xs",
240
253
  children: [
@@ -262,10 +275,10 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
262
275
  }, n);
263
276
  })
264
277
  })] });
265
- }, z = ({ groups: t, currentPath: n, onItemClick: i, slots: a, search: s, dense: c = !1, loading: l = !1 }) => {
266
- let { t: u } = o(), { enabled: f = !1, placeholder: h } = s ?? {}, { header: g, footer: y } = a ?? {}, { collapsed: b, isMobile: x, setCollapsed: T } = C(), [O, k] = w.useState(""), A = !x && b, j = !b, N = (e) => {
267
- i(e), x && T(!0);
268
- }, P = O.trim().toLowerCase(), F = P === "" ? t : t.map((e) => ({
278
+ }, z = ({ groups: n, currentPath: r, onItemClick: a, slots: o, search: s, dense: c = !1, loading: l = !1 }) => {
279
+ let { t: u } = t(), { enabled: f = !1, placeholder: h } = s ?? {}, { header: g, footer: y } = o ?? {}, { collapsed: b, isMobile: x, setCollapsed: T } = C(), [O, k] = w.useState(""), A = !x && b, j = !b, N = (e) => {
280
+ a(e), x && T(!0);
281
+ }, P = O.trim().toLowerCase(), F = P === "" ? n : n.map((e) => ({
269
282
  ...e,
270
283
  items: e.items.filter((e) => e.label.toLowerCase().includes(P) || (e.subItems?.some((e) => e.label.toLowerCase().includes(P)) ?? !1))
271
284
  })).filter((e) => e.items.length > 0), I = /* @__PURE__ */ D("div", {
@@ -292,7 +305,7 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
292
305
  children: l ? Array.from({ length: 5 }).map((t, n) => /* @__PURE__ */ D("div", {
293
306
  className: e("flex items-center gap-3", c ? "mb-1 h-9" : "mb-2 h-12", A ? "justify-center px-3" : "px-4"),
294
307
  children: [/* @__PURE__ */ E(S, { className: "size-5 flex-shrink-0 rounded-control" }), !A && /* @__PURE__ */ E(S, { className: "h-4 flex-1" })]
295
- }, n)) : F.map((t, r) => /* @__PURE__ */ D("div", {
308
+ }, n)) : F.map((t, n) => /* @__PURE__ */ D("div", {
296
309
  className: c ? "mb-3" : "mb-6",
297
310
  children: [!A && t.title !== void 0 && t.title !== "" && /* @__PURE__ */ E("h3", {
298
311
  className: e("px-4 text-xs uppercase tracking-wider font-semibold text-sidebar-muted", c ? "mb-1" : "mb-2"),
@@ -301,13 +314,13 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
301
314
  className: e("flex flex-col", c ? "gap-0.5" : "gap-1"),
302
315
  children: t.items.map((e, t) => /* @__PURE__ */ E(R, {
303
316
  ...e,
304
- currentPath: n,
317
+ currentPath: r,
305
318
  collapsed: A,
306
319
  dense: c,
307
320
  onItemClick: N
308
321
  }, t))
309
322
  })]
310
- }, r))
323
+ }, n))
311
324
  }),
312
325
  y && /* @__PURE__ */ E("div", {
313
326
  className: e("border-t border-sidebar-border", c ? "p-2" : "p-4", A ? "flex justify-center" : ""),
@@ -335,7 +348,7 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
335
348
  I
336
349
  ]
337
350
  })
338
- }) : /* @__PURE__ */ E(r, {
351
+ }) : /* @__PURE__ */ E(i, {
339
352
  delayDuration: 0,
340
353
  children: /* @__PURE__ */ E("aside", {
341
354
  className: e("flex flex-col bg-sidebar h-screen border-r border-sidebar-border transition-all duration-300", A ? "w-[--navbar-width-icon]" : "w-[--navbar-width]", "flex"),
@@ -364,12 +377,12 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
364
377
  })]
365
378
  })]
366
379
  });
367
- }, V = ({ collapsed: t, isMobile: n, onToggleSidebar: r, actionsNode: a, userMenuNode: o }) => /* @__PURE__ */ D("header", {
380
+ }, V = ({ collapsed: t, isMobile: n, onToggleSidebar: r, actionsNode: i, userMenuNode: o }) => /* @__PURE__ */ D("header", {
368
381
  className: e("fixed top-0 right-0 z-[60] h-16 md:h-20 bg-topbar text-topbar-foreground flex items-center justify-between px-4 transition-all duration-300", n && "left-0", !n && t && "left-[5rem]", !n && !t && "left-[16rem]"),
369
382
  tabIndex: -1,
370
383
  children: [/* @__PURE__ */ E("div", {
371
384
  className: "flex items-center min-w-0 flex-1",
372
- children: /* @__PURE__ */ E(i, {
385
+ children: /* @__PURE__ */ E(a, {
373
386
  variant: "ghost",
374
387
  size: "icon",
375
388
  onClick: r,
@@ -378,7 +391,7 @@ var P = ({ groups: t, search: n, onSearch: r, onSelect: a, loading: u = !1, open
378
391
  })
379
392
  }), /* @__PURE__ */ D("div", {
380
393
  className: "flex items-center gap-2 md:gap-4 flex-shrink-0",
381
- children: [a, o]
394
+ children: [i, o]
382
395
  })]
383
396
  });
384
397
  //#endregion
package/dist/pwa/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { useEffect as e } from "react";
2
- import { useTranslation as t } from "react-i18next";
1
+ import { t as e } from "../i18n-CevI9Cgk.js";
2
+ import { useEffect as t } from "react";
3
3
  import { toast as n } from "sonner";
4
4
  import { useRegisterSW as r } from "virtual:pwa-register/react";
5
5
  //#region src/pwa/PwaUpdater.tsx
6
6
  var i = 36e5, a = ({ checkIntervalMs: a = i } = {}) => {
7
- let { t: o } = t(), { needRefresh: [s, c], updateServiceWorker: l } = r({ onRegisteredSW(e, t) {
7
+ let { t: o } = e(), { needRefresh: [s, c], updateServiceWorker: l } = r({ onRegisteredSW(e, t) {
8
8
  t && setInterval(() => void t.update(), a);
9
9
  } });
10
- return e(() => {
10
+ return t(() => {
11
11
  s && n(o("pwa.updateAvailable"), {
12
12
  duration: Infinity,
13
13
  closeButton: !0,
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
2
  import "./helpers/index.js";
3
- import { a as t } from "./tooltip-BmZ9Bfou.js";
4
- import { t as n } from "./i18n-DW5zKBEK.js";
3
+ import { t } from "./i18n-CevI9Cgk.js";
4
+ import { a as n } from "./tooltip-BmZ9Bfou.js";
5
5
  import * as r from "react";
6
6
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
7
  import { SearchIcon as o, X as s } from "lucide-react";
@@ -60,8 +60,8 @@ var w = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i(l, {
60
60
  ...n
61
61
  }));
62
62
  w.displayName = l.displayName;
63
- var T = ({ title: t, description: r, shouldFilter: o, className: s, children: c, ...l }) => {
64
- let { t: u } = n();
63
+ var T = ({ title: n, description: r, shouldFilter: o, className: s, children: c, ...l }) => {
64
+ let { t: u } = t();
65
65
  return /* @__PURE__ */ i(p, {
66
66
  ...l,
67
67
  children: /* @__PURE__ */ a(y, {
@@ -69,7 +69,7 @@ var T = ({ title: t, description: r, shouldFilter: o, className: s, children: c,
69
69
  children: [
70
70
  /* @__PURE__ */ i(S, {
71
71
  className: "sr-only",
72
- children: t ?? u("search.commandTitle")
72
+ children: n ?? u("search.commandTitle")
73
73
  }),
74
74
  /* @__PURE__ */ i(C, {
75
75
  className: "sr-only",
@@ -130,9 +130,9 @@ var M = ({ className: t, ...n }) => /* @__PURE__ */ i("span", {
130
130
  M.displayName = "CommandShortcut";
131
131
  //#endregion
132
132
  //#region src/components/ui/input.tsx
133
- var N = r.forwardRef(({ className: n, type: r, ...a }, o) => /* @__PURE__ */ i("input", {
133
+ var N = r.forwardRef(({ className: t, type: r, ...a }, o) => /* @__PURE__ */ i("input", {
134
134
  type: r,
135
- className: e(t, "flex w-full text-base file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 md:text-sm", n),
135
+ className: e(n, "flex w-full text-base file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 md:text-sm", t),
136
136
  ref: o,
137
137
  ...a
138
138
  }));
@@ -1,5 +1,5 @@
1
- import { t as e } from "./i18n-DW5zKBEK.js";
2
- import "./ErrorAlert-DClCk3Ey.js";
1
+ import { t as e } from "./i18n-CevI9Cgk.js";
2
+ import "./ErrorAlert-6ECy_Dox.js";
3
3
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
4
  import { Loader2Icon as r } from "lucide-react";
5
5
  //#region src/components/core/states/ErrorState.tsx