@krosoft/react 0.0.111 → 0.0.113

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 (80) hide show
  1. package/dist/{AppActions-ouB1a_Wg.js → AppActions-po4LjUcM.js} +5 -5
  2. package/dist/{AppSubTitle-BU_yVwhx.js → AppSubTitle-CWrsJYFJ.js} +1 -1
  3. package/dist/{AppVerticalTabs-BLxthLeG.js → AppVerticalTabs-CdqoObXx.js} +4 -4
  4. package/dist/ConfirmationDialog-CkMyyh_3.js +221 -0
  5. package/dist/{DataTable-DUJgDKVR.js → DataTable-CUU_sTQd.js} +8 -8
  6. package/dist/{ErrorAlert-DYuVgrm3.js → ErrorAlert-C6BbHHRZ.js} +2 -2
  7. package/dist/ErrorState-vU8d4CwD.js +8 -0
  8. package/dist/{GenericForm-SLJH_-aT.js → GenericForm-CmwqEXiQ.js} +7 -7
  9. package/dist/{ImageInput-oz4cbfJY.js → ImageInput-C8HcxE8t.js} +5 -5
  10. package/dist/KpiCardsLayout-CETMpB7A.js +15 -0
  11. package/dist/LoadingState-PhGi7HXH.js +9 -0
  12. package/dist/MetricCard-C-ewNR_i.js +53 -0
  13. package/dist/{MultiSelect-DzbWINrY.js → MultiSelect-BoisW4Kn.js} +4 -4
  14. package/dist/{SearchInput-BcP8RQWX.js → SearchInput-DJ_F3emq.js} +5 -5
  15. package/dist/SkeletonCards-C5lXTSrB.js +57 -0
  16. package/dist/{TableFilter-Ax1CpXr1.js → TableFilter-DqDmlzhk.js} +8 -8
  17. package/dist/{ThemeSelector-C4W3_5jq.js → ThemeSelector--w3R6Ff3.js} +2 -2
  18. package/dist/{Topbar-CZ3OCeK_.js → Topbar-DFu_OdSs.js} +2 -2
  19. package/dist/{alert-BUwDmcbB.js → alert-B34E_4uH.js} +1 -1
  20. package/dist/{badge-AFnM0R9E.js → badge-CfWlt79h.js} +3 -3
  21. package/dist/components/core/cards/SkeletonCard.d.ts +3 -0
  22. package/dist/components/core/cards/SkeletonCard.d.ts.map +1 -0
  23. package/dist/components/core/cards/SkeletonCards.d.ts +7 -0
  24. package/dist/components/core/cards/SkeletonCards.d.ts.map +1 -0
  25. package/dist/components/core/cards/index.d.ts +2 -2
  26. package/dist/components/core/cards/index.d.ts.map +1 -1
  27. package/dist/components/core/cards/index.js +8 -7
  28. package/dist/components/core/dialogs/ConfirmationDialog.d.ts +6 -8
  29. package/dist/components/core/dialogs/ConfirmationDialog.d.ts.map +1 -1
  30. package/dist/components/core/dialogs/index.d.ts +0 -1
  31. package/dist/components/core/dialogs/index.d.ts.map +1 -1
  32. package/dist/components/core/dialogs/index.js +13 -14
  33. package/dist/components/core/filters/index.js +1 -1
  34. package/dist/components/core/forms/index.js +1 -1
  35. package/dist/components/core/index.js +55 -52
  36. package/dist/components/core/inputs/index.js +3 -3
  37. package/dist/components/core/layouts/KpiCardsLayout.d.ts +9 -0
  38. package/dist/components/core/layouts/KpiCardsLayout.d.ts.map +1 -0
  39. package/dist/components/core/layouts/index.d.ts +1 -0
  40. package/dist/components/core/layouts/index.d.ts.map +1 -1
  41. package/dist/components/core/layouts/index.js +8 -6
  42. package/dist/components/core/navbar/index.js +1 -1
  43. package/dist/components/core/states/index.js +4 -3
  44. package/dist/components/core/table/index.js +1 -1
  45. package/dist/components/core/tabs/index.js +1 -1
  46. package/dist/components/core/theme/index.js +1 -1
  47. package/dist/components/index.js +171 -168
  48. package/dist/components/ui/index.js +6 -6
  49. package/dist/createLucideIcon-MP_wDWjs.js +116 -0
  50. package/dist/{ellipsis-vertical-CgqKXU8e.js → ellipsis-vertical-kB5yFb-i.js} +1 -1
  51. package/dist/{grip-vertical-J6s3ddpf.js → grip-vertical-DGywJXzS.js} +1 -1
  52. package/dist/hooks/behavior/useConfirmDeleteDialog.d.ts.map +1 -1
  53. package/dist/hooks/behavior/useConfirmationDialog.d.ts +11 -0
  54. package/dist/hooks/behavior/useConfirmationDialog.d.ts.map +1 -0
  55. package/dist/hooks/behavior/useDialog.d.ts +13 -0
  56. package/dist/hooks/behavior/useDialog.d.ts.map +1 -0
  57. package/dist/hooks/index.d.ts +8 -4
  58. package/dist/hooks/index.d.ts.map +1 -1
  59. package/dist/hooks/index.js +109 -68
  60. package/dist/index-Be16PP7H.js +34 -0
  61. package/dist/{loader-circle-Cfo0gDyD.js → loader-circle-CKy7u7JW.js} +1 -1
  62. package/dist/{select-pm9O5uLm.js → select-DlQvLtI3.js} +2 -2
  63. package/dist/{toaster-BUmC1xwM.js → toaster-CKoOjjKr.js} +3 -3
  64. package/dist/{toggle-group-B2LRm0C5.js → toggle-group-wIgXZYDq.js} +84 -83
  65. package/dist/{tooltip-6vdhKg8V.js → tooltip-YhBPXbcJ.js} +20 -19
  66. package/dist/types/ConfirmDialogConfig.d.ts +5 -0
  67. package/dist/types/ConfirmDialogConfig.d.ts.map +1 -1
  68. package/dist/types/index.d.ts +1 -0
  69. package/dist/types/index.d.ts.map +1 -1
  70. package/package.json +1 -1
  71. package/dist/ConfirmationDialog-Dkc0wBS8.js +0 -257
  72. package/dist/LoadingState-B4M2grXs.js +0 -13
  73. package/dist/MetricCard-Doy9TRGz.js +0 -103
  74. package/dist/components/core/cards/CardSkeleton.d.ts +0 -3
  75. package/dist/components/core/cards/CardSkeleton.d.ts.map +0 -1
  76. package/dist/components/core/cards/CardsSkeleton.d.ts +0 -7
  77. package/dist/components/core/cards/CardsSkeleton.d.ts.map +0 -1
  78. package/dist/components/core/dialogs/ConfirmDeleteDialog.d.ts +0 -10
  79. package/dist/components/core/dialogs/ConfirmDeleteDialog.d.ts.map +0 -1
  80. package/dist/index-71PtBtHf.js +0 -147
@@ -1,14 +1,14 @@
1
1
  import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
- import { ax as p, aL as b, az as c, aG as g, aB as o } from "./toggle-group-B2LRm0C5.js";
3
- import "./alert-BUwDmcbB.js";
2
+ import { ax as p, aL as b, az as c, aG as g, aB as o } from "./toggle-group-wIgXZYDq.js";
3
+ import "./alert-B34E_4uH.js";
4
4
  import { c as i } from "./tailwind.helper-gWiv5-6R.js";
5
- import { B as u } from "./tooltip-6vdhKg8V.js";
6
- import "./select-pm9O5uLm.js";
5
+ import { B as u } from "./tooltip-YhBPXbcJ.js";
6
+ import "./select-DlQvLtI3.js";
7
7
  import "next-themes";
8
8
  import "react";
9
9
  import { u as h } from "./useMobile-DN1_OMDB.js";
10
10
  import { useTranslation as v } from "react-i18next";
11
- import { E as C } from "./ellipsis-vertical-CgqKXU8e.js";
11
+ import { E as C } from "./ellipsis-vertical-kB5yFb-i.js";
12
12
  function T({ actions: d, className: t }) {
13
13
  const { t: m } = v(), N = h();
14
14
  return !d || d.length === 0 ? null : N ? /* @__PURE__ */ n(p, { children: [
@@ -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-ouB1a_Wg.js";
3
+ import { A as m } from "./AppActions-po4LjUcM.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,12 +1,12 @@
1
1
  import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
- import { I as v, M as g, J as y, bX as N, bZ as w, b_ as b, bY as T, bA as S } from "./toggle-group-B2LRm0C5.js";
3
- import { A as C } from "./AppActions-ouB1a_Wg.js";
2
+ import { I as v, M as g, J as y, bX as N, bZ as w, b_ as b, bY as T, bA as S } from "./toggle-group-wIgXZYDq.js";
3
+ import { A as C } from "./AppActions-po4LjUcM.js";
4
4
  import { A as k } from "./AppTitle-CDxWr_0y.js";
5
5
  import { useTranslation as x } from "react-i18next";
6
6
  import { useSearchParams as f } from "react-router-dom";
7
7
  import { c as A } from "./tailwind.helper-gWiv5-6R.js";
8
- import { S as P, h as j, i as M, a as z, c as L } from "./select-pm9O5uLm.js";
9
- import { c as V } from "./index-71PtBtHf.js";
8
+ import { S as P, h as j, i as M, a as z, c as L } from "./select-DlQvLtI3.js";
9
+ import { c as V } from "./createLucideIcon-MP_wDWjs.js";
10
10
  /**
11
11
  * @license lucide-react v1.17.0 - ISC
12
12
  *
@@ -0,0 +1,221 @@
1
+ import { jsx as e, jsxs as a, Fragment as q } from "react/jsx-runtime";
2
+ import { D as G, b as K, P as V, e as B, h as R, c as W, m as X, p as J, s as M, t as Q, q as _, r as U, o as Y } from "./toggle-group-wIgXZYDq.js";
3
+ import { A as Z, a as L } from "./alert-B34E_4uH.js";
4
+ import { B as v } from "./tooltip-YhBPXbcJ.js";
5
+ import { X as j } from "./select-DlQvLtI3.js";
6
+ import "next-themes";
7
+ import { useState as w, useEffect as ee } from "react";
8
+ import { useTranslation as T } from "react-i18next";
9
+ import { c as A } from "./createLucideIcon-MP_wDWjs.js";
10
+ import { G as le } from "./GenericForm-CmwqEXiQ.js";
11
+ import { E as ie } from "./ErrorAlert-C6BbHHRZ.js";
12
+ /**
13
+ * @license lucide-react v1.17.0 - ISC
14
+ *
15
+ * This source code is licensed under the ISC license.
16
+ * See the LICENSE file in the root directory of this source tree.
17
+ */
18
+ const ae = [
19
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
20
+ ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
21
+ ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
22
+ ], re = A("circle-alert", ae);
23
+ /**
24
+ * @license lucide-react v1.17.0 - ISC
25
+ *
26
+ * This source code is licensed under the ISC license.
27
+ * See the LICENSE file in the root directory of this source tree.
28
+ */
29
+ const se = [
30
+ [
31
+ "path",
32
+ {
33
+ d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
34
+ key: "1a8usu"
35
+ }
36
+ ]
37
+ ], H = A("pen", se);
38
+ /**
39
+ * @license lucide-react v1.17.0 - ISC
40
+ *
41
+ * This source code is licensed under the ISC license.
42
+ * See the LICENSE file in the root directory of this source tree.
43
+ */
44
+ const te = [
45
+ [
46
+ "path",
47
+ {
48
+ d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
49
+ key: "1c8476"
50
+ }
51
+ ],
52
+ ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
53
+ ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
54
+ ], S = A("save", te);
55
+ function ne({ open: s, onOpenChange: m, config: l, isLoading: u, error: r, children: f }) {
56
+ const { t: i } = T(), { title: g, description: d, icon: p, maxWidth: b = "sm:max-w-xl", actions: n } = l;
57
+ return /* @__PURE__ */ e(G, { open: s, onOpenChange: m, children: /* @__PURE__ */ a(K, { className: `${b} max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden`, children: [
58
+ u === !0 ? /* @__PURE__ */ e("div", { className: "absolute top-0 left-0 right-0 z-10", children: /* @__PURE__ */ e(V, { indeterminate: !0, className: "h-1 rounded-none" }) }) : null,
59
+ /* @__PURE__ */ a(B, { className: "bg-gradient-to-r from-slate-900 to-purple-700 p-6 rounded-t-lg shrink-0", children: [
60
+ /* @__PURE__ */ a(R, { className: "text-2xl font-bold flex items-center gap-2 text-white", children: [
61
+ p !== void 0 ? /* @__PURE__ */ e("div", { className: "p-2 bg-white/20 rounded-lg", children: /* @__PURE__ */ e(p, { className: "size-4 text-white" }) }) : null,
62
+ i(g)
63
+ ] }),
64
+ d !== void 0 && d !== "" ? /* @__PURE__ */ e(W, { className: "text-indigo-100 text-base", children: i(d) }) : null
65
+ ] }),
66
+ r != null ? /* @__PURE__ */ e("div", { className: "px-6 ", children: /* @__PURE__ */ a(Z, { variant: "destructive", className: "max-w-full", children: [
67
+ /* @__PURE__ */ e(re, { className: "size-4" }),
68
+ /* @__PURE__ */ e(L, { className: "break-words overflow-wrap-anywhere max-w-full", children: r.message })
69
+ ] }) }) : null,
70
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-6 ", children: f }),
71
+ n !== void 0 && n.length > 0 ? /* @__PURE__ */ e("div", { className: "rounded-b-lg border-t border-gray-200 dark:border-gray-700 shrink-0 p-6 light:bg-gradient-to-r light:from-gray-50 light:to-gray-100 dark:bg-gray-950", children: /* @__PURE__ */ e("div", { className: "flex justify-end gap-3", children: n.map((t, k) => /* @__PURE__ */ a(v, { variant: t.variant ?? "default", onClick: t.onClick, disabled: t.disabled === !0 || u === !0, children: [
72
+ t.icon !== void 0 ? /* @__PURE__ */ e(t.icon, { className: "size-4" }) : null,
73
+ i(t.label)
74
+ ] }, k)) }) }) : null
75
+ ] }) });
76
+ }
77
+ function Ne({
78
+ open: s,
79
+ onOpenChange: m,
80
+ data: l,
81
+ title: u,
82
+ headerBadge: r,
83
+ schema: f,
84
+ onSave: i,
85
+ customFooter: g,
86
+ defaultEditing: d = !1,
87
+ footerActions: p = !0,
88
+ saveLabel: b = "Sauvegarder",
89
+ cancelLabel: n = "Annuler",
90
+ hideSaveIcon: t = !1,
91
+ maxWidth: k = "sm:max-w-4xl",
92
+ isLoading: h = !1
93
+ }) {
94
+ const [N, x] = w(d), [o, z] = w(!1), [y, I] = w(null);
95
+ if (ee(() => {
96
+ s && x(d);
97
+ }, [s, d]), l == null) return null;
98
+ const E = () => {
99
+ N ? i !== void 0 && y && y() : x(!0);
100
+ }, D = () => {
101
+ x(!1);
102
+ }, F = () => {
103
+ i !== void 0 && y && y();
104
+ }, O = async (c) => {
105
+ if (i) {
106
+ z(!0);
107
+ try {
108
+ await i(c), x(!1);
109
+ } catch ($) {
110
+ console.error($);
111
+ } finally {
112
+ z(!1);
113
+ }
114
+ }
115
+ }, C = [];
116
+ i !== void 0 && (N ? (n !== "" && C.push({
117
+ label: n,
118
+ onClick: D,
119
+ variant: "outline",
120
+ disabled: o || h,
121
+ icon: j
122
+ }), C.push({
123
+ label: o ? "Enregistrement..." : b,
124
+ onClick: F,
125
+ variant: "default",
126
+ disabled: o || h,
127
+ icon: t ? void 0 : S
128
+ })) : C.push({
129
+ label: "Modifier",
130
+ onClick: E,
131
+ variant: "outline",
132
+ icon: H
133
+ }));
134
+ const P = {
135
+ title: u(l),
136
+ maxWidth: k,
137
+ actions: p ? C : []
138
+ };
139
+ return /* @__PURE__ */ e(
140
+ ne,
141
+ {
142
+ open: s,
143
+ onOpenChange: (c) => {
144
+ m(c), c || D();
145
+ },
146
+ config: P,
147
+ isLoading: o || h,
148
+ children: /* @__PURE__ */ a("div", { className: "py-4", children: [
149
+ r !== void 0 ? /* @__PURE__ */ e("div", { className: "mb-4", children: r(l) }) : null,
150
+ /* @__PURE__ */ e(
151
+ le,
152
+ {
153
+ schema: f,
154
+ initialData: l,
155
+ disabled: !N,
156
+ onSubmit: (c) => {
157
+ O(c);
158
+ },
159
+ renderActions: !1,
160
+ onRegisterSubmit: (c) => {
161
+ I(() => c);
162
+ },
163
+ isLoading: o || h
164
+ }
165
+ ),
166
+ g !== void 0 ? g(l) : null,
167
+ i !== void 0 && !p ? /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 border-t pt-4 mt-6", children: N ? /* @__PURE__ */ a(q, { children: [
168
+ n !== "" ? /* @__PURE__ */ a(v, { onClick: D, variant: "outline", size: "sm", disabled: o || h, children: [
169
+ /* @__PURE__ */ e(j, { className: "size-4 mr-2" }),
170
+ n
171
+ ] }) : null,
172
+ /* @__PURE__ */ a(v, { onClick: F, size: "sm", disabled: o || h, className: "text-white", children: [
173
+ t ? null : /* @__PURE__ */ e(S, { className: "size-4 mr-2" }),
174
+ o ? "Enregistrement..." : b
175
+ ] })
176
+ ] }) : /* @__PURE__ */ a(v, { onClick: E, variant: "outline", size: "sm", children: [
177
+ /* @__PURE__ */ e(H, { className: "size-4 mr-2" }),
178
+ "Modifier"
179
+ ] }) }) : null
180
+ ] })
181
+ }
182
+ );
183
+ }
184
+ function xe({ isLoading: s, error: m, config: l, destructive: u = !1 }) {
185
+ const { t: r } = T();
186
+ if (!l) return null;
187
+ const f = (i) => {
188
+ !i && !s && l.onClose();
189
+ };
190
+ return /* @__PURE__ */ e(X, { open: l.isOpen, onOpenChange: f, children: /* @__PURE__ */ a(J, { children: [
191
+ /* @__PURE__ */ a(M, { children: [
192
+ /* @__PURE__ */ a(Q, { className: l.titleClassName, children: [
193
+ l.icon && /* @__PURE__ */ e(l.icon, { className: "size-4" }),
194
+ r(l.title)
195
+ ] }),
196
+ l.headerClassName && /* @__PURE__ */ e(M, { className: l.headerClassName }),
197
+ /* @__PURE__ */ e(_, { children: r(l.description) }),
198
+ l.itemName && /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e("span", { className: "font-semibold block my-2", children: l.itemName }) })
199
+ ] }),
200
+ /* @__PURE__ */ e(ie, { error: m instanceof Error ? null : m }),
201
+ /* @__PURE__ */ a(U, { children: [
202
+ /* @__PURE__ */ e(Y, { disabled: s, children: r("common.buttons.cancel") }),
203
+ /* @__PURE__ */ e(
204
+ v,
205
+ {
206
+ onClick: (i) => {
207
+ i.preventDefault(), l.onConfirm();
208
+ },
209
+ disabled: s,
210
+ className: u ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "",
211
+ children: s ? r(l.loadingKey || "common.buttons.loading") : l.confirmKey
212
+ }
213
+ )
214
+ ] })
215
+ ] }) });
216
+ }
217
+ export {
218
+ ne as A,
219
+ xe as C,
220
+ Ne as F
221
+ };
@@ -1,15 +1,15 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import { u as ae } from "./useDataTable-CxcA5S-s.js";
3
- import { ax as I, aL as $, az as B, aB as se, _ as L, cr as ie, cs as ne, ay as de } from "./toggle-group-B2LRm0C5.js";
4
- import "./alert-BUwDmcbB.js";
5
- import { B as k } from "./tooltip-6vdhKg8V.js";
6
- import "./select-pm9O5uLm.js";
3
+ import { ax as I, aL as $, az as B, aB as se, _ as L, cr as ie, cs as ne, ay as de } from "./toggle-group-wIgXZYDq.js";
4
+ import "./alert-B34E_4uH.js";
5
+ import { B as k } from "./tooltip-YhBPXbcJ.js";
6
+ import "./select-DlQvLtI3.js";
7
7
  import "next-themes";
8
8
  import "react";
9
- import { E as le } from "./ellipsis-vertical-CgqKXU8e.js";
10
- import { L as oe } from "./loader-circle-Cfo0gDyD.js";
11
- import { G as ce } from "./grip-vertical-J6s3ddpf.js";
12
- import { c as D } from "./index-71PtBtHf.js";
9
+ import { E as le } from "./ellipsis-vertical-kB5yFb-i.js";
10
+ import { L as oe } from "./loader-circle-CKy7u7JW.js";
11
+ import { G as ce } from "./grip-vertical-DGywJXzS.js";
12
+ import { c as D } from "./createLucideIcon-MP_wDWjs.js";
13
13
  /**
14
14
  * @license lucide-react v1.17.0 - ISC
15
15
  *
@@ -1,6 +1,6 @@
1
1
  import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
- import { A as t, a as l } from "./alert-BUwDmcbB.js";
3
- import { c as n } from "./index-71PtBtHf.js";
2
+ import { A as t, a as l } from "./alert-B34E_4uH.js";
3
+ import { c as n } from "./createLucideIcon-MP_wDWjs.js";
4
4
  /**
5
5
  * @license lucide-react v1.17.0 - ISC
6
6
  *
@@ -0,0 +1,8 @@
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ const s = ({ message: e }) => /* @__PURE__ */ t("div", { className: "p-6 border border-destructive bg-destructive/10 text-destructive rounded-md animate-fade-in", children: [
3
+ /* @__PURE__ */ r("p", { className: "font-semibold mb-2", children: "Une erreur est survenue." }),
4
+ e !== void 0 && e !== "" ? /* @__PURE__ */ r("p", { className: "text-sm opacity-80", children: e }) : null
5
+ ] });
6
+ export {
7
+ s as E
8
+ };
@@ -1,12 +1,12 @@
1
1
  import { jsx as j, jsxs as te } from "react/jsx-runtime";
2
- import { I as td } from "./ImageInput-oz4cbfJY.js";
3
- import { A as xi } from "./AppSubTitle-BU_yVwhx.js";
4
- import { M as rd } from "./MultiSelect-DzbWINrY.js";
5
- import { ct as St, cu as kt, cv as ro, cw as id, aM as od, aP as ad, aQ as cd, aR as ud, aN as ji, aS as ld, I as sd, M as dd, J as md, aW as gn, b$ as fd, _ as vd } from "./toggle-group-B2LRm0C5.js";
6
- import "./alert-BUwDmcbB.js";
2
+ import { I as td } from "./ImageInput-C8HcxE8t.js";
3
+ import { A as xi } from "./AppSubTitle-CWrsJYFJ.js";
4
+ import { M as rd } from "./MultiSelect-BoisW4Kn.js";
5
+ import { ct as St, cu as kt, cv as ro, cw as id, aM as od, aP as ad, aQ as cd, aR as ud, aN as ji, aS as ld, I as sd, M as dd, J as md, aW as gn, b$ as fd, _ as vd } from "./toggle-group-wIgXZYDq.js";
6
+ import "./alert-B34E_4uH.js";
7
7
  import { c as re } from "./tailwind.helper-gWiv5-6R.js";
8
- import { B as Ui } from "./tooltip-6vdhKg8V.js";
9
- import { S as pd, h as gd, i as hd, a as $d, c as _d } from "./select-pm9O5uLm.js";
8
+ import { B as Ui } from "./tooltip-YhBPXbcJ.js";
9
+ import { S as pd, h as gd, i as hd, a as $d, c as _d } from "./select-DlQvLtI3.js";
10
10
  import "next-themes";
11
11
  import { u as bd } from "./useToast-BFTk4lWz.js";
12
12
  import { useState as hn } from "react";
@@ -1,13 +1,13 @@
1
1
  import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
- import "./toggle-group-B2LRm0C5.js";
3
- import "./alert-BUwDmcbB.js";
2
+ import "./toggle-group-wIgXZYDq.js";
3
+ import "./alert-B34E_4uH.js";
4
4
  import { c as u } from "./tailwind.helper-gWiv5-6R.js";
5
- import { B as v } from "./tooltip-6vdhKg8V.js";
6
- import { X as y } from "./select-pm9O5uLm.js";
5
+ import { B as v } from "./tooltip-YhBPXbcJ.js";
6
+ import { X as y } from "./select-DlQvLtI3.js";
7
7
  import "next-themes";
8
8
  import { forwardRef as N, useRef as w } from "react";
9
9
  import { u as j } from "./useNotifications-zbUhCvF_.js";
10
- import { c as p } from "./index-71PtBtHf.js";
10
+ import { c as p } from "./createLucideIcon-MP_wDWjs.js";
11
11
  /**
12
12
  * @license lucide-react v1.17.0 - ISC
13
13
  *
@@ -0,0 +1,15 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import "./toggle-group-wIgXZYDq.js";
3
+ import "react-i18next";
4
+ import "@krosoft/core/helpers";
5
+ import "./alert-B34E_4uH.js";
6
+ import "./tooltip-YhBPXbcJ.js";
7
+ import "./select-DlQvLtI3.js";
8
+ import "next-themes";
9
+ import "react";
10
+ import { b as i, a as p } from "./SkeletonCards-C5lXTSrB.js";
11
+ import { E as s } from "./ErrorState-vU8d4CwD.js";
12
+ const E = ({ stats: o, isLoading: m, error: t }) => m ? /* @__PURE__ */ r(i, { count: 4 }) : t ? /* @__PURE__ */ r(s, { message: t.message }) : /* @__PURE__ */ r(p, { stats: o });
13
+ export {
14
+ E as K
15
+ };
@@ -0,0 +1,9 @@
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { L as r } from "./loader-circle-CKy7u7JW.js";
3
+ const o = ({ message: e }) => /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center p-12 text-muted-foreground animate-fade-in", children: [
4
+ /* @__PURE__ */ t(r, { className: "size-8 animate-spin mb-4 text-primary" }),
5
+ e !== void 0 && e !== "" ? /* @__PURE__ */ t("p", { className: "font-semibold text-sm", children: e }) : null
6
+ ] });
7
+ export {
8
+ o as L
9
+ };
@@ -0,0 +1,53 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { I as l, M as h, N as m, J as g } from "./toggle-group-wIgXZYDq.js";
3
+ import { c as b } from "./tailwind.helper-gWiv5-6R.js";
4
+ import { useTranslation as p } from "react-i18next";
5
+ const M = ({ titleKey: t, icon: s, className: n, children: a }) => {
6
+ const { t: i } = p();
7
+ return /* @__PURE__ */ r(l, { className: b("bg-gray-50 dark:bg-gray-950", n), children: [
8
+ /* @__PURE__ */ e(h, { children: /* @__PURE__ */ r(m, { className: "flex items-center gap-2", children: [
9
+ s && /* @__PURE__ */ e(s, { className: "mr-2 size-4" }),
10
+ /* @__PURE__ */ e("span", { children: i(t) })
11
+ ] }) }),
12
+ /* @__PURE__ */ e(g, { children: a })
13
+ ] });
14
+ }, w = {
15
+ blue: "bg-gradient-to-br from-blue-500 to-cyan-500 text-white",
16
+ green: "bg-gradient-to-br from-green-500 to-emerald-500 text-white",
17
+ orange: "bg-gradient-to-br from-orange-500 to-yellow-500 text-white",
18
+ red: "bg-gradient-to-br from-red-500 to-pink-500 text-white",
19
+ purple: "bg-gradient-to-br from-purple-500 to-indigo-500 text-white",
20
+ accent: "bg-accent/10 text-accent",
21
+ success: "bg-success/10 text-success",
22
+ info: "bg-info/10 text-info",
23
+ warning: "bg-warning/10 text-warning",
24
+ destructive: "bg-destructive/10 text-destructive"
25
+ }, N = {
26
+ sm: "size-4",
27
+ md: "size-5",
28
+ lg: "size-6"
29
+ }, v = (t) => t === "up" ? "↑" : t === "down" ? "↓" : "", C = (t) => t === "up" ? "text-green-600" : t === "down" ? "text-red-600" : "text-muted-foreground", k = ({ title: t, value: s, unit: n, subtitle: a, icon: i, iconSize: x = "md", trend: o, trendValue: d, color: u = "blue", children: c }) => {
30
+ const f = i;
31
+ return /* @__PURE__ */ e(l, { className: "relative overflow-hidden bg-card border shadow-lg hover:shadow-xl transition-all duration-300", children: /* @__PURE__ */ r(g, { className: "pt-6", children: [
32
+ /* @__PURE__ */ r("div", { className: "flex items-start justify-between", children: [
33
+ /* @__PURE__ */ r("div", { children: [
34
+ /* @__PURE__ */ e(m, { className: "text-sm font-medium text-muted-foreground", children: t }),
35
+ /* @__PURE__ */ r("div", { className: "flex items-baseline space-x-2 mt-1", children: [
36
+ /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-card-foreground", children: typeof s == "number" ? s.toFixed(1) : s }),
37
+ n && /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground font-medium", children: n })
38
+ ] }),
39
+ a && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children: a }),
40
+ o && d && /* @__PURE__ */ r("div", { className: `flex items-center space-x-1 mt-2 text-xs ${C(o)}`, children: [
41
+ /* @__PURE__ */ e("span", { children: v(o) }),
42
+ /* @__PURE__ */ e("span", { children: d })
43
+ ] })
44
+ ] }),
45
+ /* @__PURE__ */ e("div", { className: `p-2 rounded-lg ${w[u]} shadow-lg`, children: /* @__PURE__ */ e(f, { className: N[x] }) })
46
+ ] }),
47
+ c && /* @__PURE__ */ e("div", { className: "mt-4", children: c })
48
+ ] }) });
49
+ };
50
+ export {
51
+ M as D,
52
+ k as M
53
+ };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as w, useRef as k, useMemo as N, useEffect as y } from "react";
3
- import { ce as R, _ as C } from "./toggle-group-B2LRm0C5.js";
4
- import "./alert-BUwDmcbB.js";
3
+ import { ce as R, _ as C } from "./toggle-group-wIgXZYDq.js";
4
+ import "./alert-B34E_4uH.js";
5
5
  import { c as E } from "./tailwind.helper-gWiv5-6R.js";
6
- import { C as T } from "./tooltip-6vdhKg8V.js";
7
- import { X as D } from "./select-pm9O5uLm.js";
6
+ import { C as T } from "./tooltip-YhBPXbcJ.js";
7
+ import { X as D } from "./select-DlQvLtI3.js";
8
8
  import "next-themes";
9
9
  const V = ({
10
10
  options: i,
@@ -1,13 +1,13 @@
1
1
  import { jsxs as m, jsx as a } from "react/jsx-runtime";
2
2
  import * as k from "react";
3
3
  import { useState as N, useRef as j, useEffect as W, useMemo as T } from "react";
4
- import { cm as C, cn as g, co as y, cp as E, cq as M, H as D, bv as H, bx as R, bw as A, ce as S, aW as F } from "./toggle-group-B2LRm0C5.js";
5
- import "./alert-BUwDmcbB.js";
4
+ import { cm as C, cn as g, co as y, cp as E, cq as M, H as D, bv as H, bx as R, bw as A, ce as S, aW as F } from "./toggle-group-wIgXZYDq.js";
5
+ import "./alert-B34E_4uH.js";
6
6
  import { c as h } from "./tailwind.helper-gWiv5-6R.js";
7
- import { B as p, C as q } from "./tooltip-6vdhKg8V.js";
8
- import { X as z, C as X } from "./select-pm9O5uLm.js";
7
+ import { B as p, C as q } from "./tooltip-YhBPXbcJ.js";
8
+ import { X as z, C as X } from "./select-DlQvLtI3.js";
9
9
  import "next-themes";
10
- import { c as V } from "./index-71PtBtHf.js";
10
+ import { c as V } from "./createLucideIcon-MP_wDWjs.js";
11
11
  /**
12
12
  * @license lucide-react v1.17.0 - ISC
13
13
  *
@@ -0,0 +1,57 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { formatNumber as h } from "@krosoft/core/helpers";
3
+ import { useTranslation as C } from "react-i18next";
4
+ import { c as i } from "./tailwind.helper-gWiv5-6R.js";
5
+ import { I as m, M as o, N as f, J as n } from "./toggle-group-wIgXZYDq.js";
6
+ import "./alert-B34E_4uH.js";
7
+ import "./tooltip-YhBPXbcJ.js";
8
+ import "./select-DlQvLtI3.js";
9
+ import "next-themes";
10
+ import "react";
11
+ const g = ({
12
+ titleKey: a,
13
+ value: r,
14
+ valueClassName: d,
15
+ icon: c,
16
+ iconClassName: t,
17
+ description: p,
18
+ descriptionClassName: u,
19
+ onClick: l
20
+ }) => {
21
+ const { t: N } = C();
22
+ return /* @__PURE__ */ s(m, { className: i(l !== void 0 ? "hover:border-primary cursor-pointer" : ""), onClick: l, children: [
23
+ /* @__PURE__ */ s(o, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
24
+ /* @__PURE__ */ e(f, { className: "text-sm font-medium", children: N(a) }),
25
+ /* @__PURE__ */ e(c, { className: i("size-6 text-muted-foreground", t) })
26
+ ] }),
27
+ /* @__PURE__ */ s(n, { children: [
28
+ /* @__PURE__ */ e("div", { className: i("text-2xl font-bold", d), children: h(r) }),
29
+ /* @__PURE__ */ e("p", { className: i("text-xs text-muted-foreground", u), children: p })
30
+ ] })
31
+ ] });
32
+ }, A = ({ stats: a }) => /* @__PURE__ */ e("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: a.map((r) => /* @__PURE__ */ e(
33
+ g,
34
+ {
35
+ titleKey: r.titleKey,
36
+ value: r.value,
37
+ valueClassName: r.valueClassName,
38
+ icon: r.icon,
39
+ iconClassName: r.iconClassName,
40
+ description: r.description,
41
+ descriptionClassName: r.descriptionClassName,
42
+ onClick: r.onClick
43
+ },
44
+ r.titleKey
45
+ )) }), v = () => /* @__PURE__ */ s(m, { className: "animate-pulse", children: [
46
+ /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e("div", { className: "h-6 bg-muted rounded w-1/4" }) }),
47
+ /* @__PURE__ */ e(n, { children: /* @__PURE__ */ s("div", { className: "space-y-2", children: [
48
+ /* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded" }),
49
+ /* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded w-3/4" })
50
+ ] }) })
51
+ ] }), H = ({ count: a = 1 }) => /* @__PURE__ */ e("div", { className: "grid gap-6", style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` }, children: Array.from({ length: a }).map((r, d) => /* @__PURE__ */ e(v, {}, d)) });
52
+ export {
53
+ g as K,
54
+ v as S,
55
+ A as a,
56
+ H as b
57
+ };
@@ -1,15 +1,15 @@
1
1
  import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as k, useEffect as M, useMemo as A } from "react";
3
- import { a as $, D as O, b as _, S as I } from "./SearchInput-BcP8RQWX.js";
4
- import { aW as C, bD as j, bM as z, bF as R, bI as B, bL as Q, a$ as V, bH as H, bv as W, bx as X, bw as G, ce as J, _ as P } from "./toggle-group-B2LRm0C5.js";
5
- import "./alert-BUwDmcbB.js";
6
- import { B as w, C as K } from "./tooltip-6vdhKg8V.js";
7
- import { X as E, S as U, h as Y, i as Z, a as q, c as ee } from "./select-pm9O5uLm.js";
3
+ import { a as $, D as O, b as _, S as I } from "./SearchInput-DJ_F3emq.js";
4
+ import { aW as C, bD as j, bM as z, bF as R, bI as B, bL as Q, a$ as V, bH as H, bv as W, bx as X, bw as G, ce as J, _ as P } from "./toggle-group-wIgXZYDq.js";
5
+ import "./alert-B34E_4uH.js";
6
+ import { B as w, C as K } from "./tooltip-YhBPXbcJ.js";
7
+ import { X as E, S as U, h as Y, i as Z, a as q, c as ee } from "./select-DlQvLtI3.js";
8
8
  import "next-themes";
9
- import { B as L } from "./badge-AFnM0R9E.js";
9
+ import { B as L } from "./badge-CfWlt79h.js";
10
10
  import { c as re } from "./tailwind.helper-gWiv5-6R.js";
11
- import { M as te } from "./MultiSelect-DzbWINrY.js";
12
- import { c as le } from "./index-71PtBtHf.js";
11
+ import { M as te } from "./MultiSelect-BoisW4Kn.js";
12
+ import { c as le } from "./createLucideIcon-MP_wDWjs.js";
13
13
  /**
14
14
  * @license lucide-react v1.17.0 - ISC
15
15
  *
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
- import { b as m, T as h, c as u, B as g, a as f } from "./tooltip-6vdhKg8V.js";
3
- import { S as v, h as b, i as N, a as S, c as x } from "./select-pm9O5uLm.js";
2
+ import { b as m, T as h, c as u, B as g, a as f } from "./tooltip-YhBPXbcJ.js";
3
+ import { S as v, h as b, i as N, a as S, c as x } from "./select-DlQvLtI3.js";
4
4
  import { u as C } from "./useTheme-B0Bxda3I.js";
5
5
  function I({ themeOptions: r, variant: i = "select" }) {
6
6
  const { theme: n, handleThemeChange: t, currentThemeOption: e, nextThemeOption: c, cycleTheme: o } = C(r);
@@ -1,8 +1,8 @@
1
1
  import { jsxs as i, jsx as e, Fragment as y } from "react/jsx-runtime";
2
- import { C as k, T as C, c as j, a as T, b as z, B as S } from "./tooltip-6vdhKg8V.js";
2
+ import { C as k, T as C, c as j, a as T, b as z, B as S } from "./tooltip-YhBPXbcJ.js";
3
3
  import { c as o } from "./tailwind.helper-gWiv5-6R.js";
4
4
  import * as D from "react";
5
- import { c as W } from "./index-71PtBtHf.js";
5
+ import { c as W } from "./createLucideIcon-MP_wDWjs.js";
6
6
  /**
7
7
  * @license lucide-react v1.17.0 - ISC
8
8
  *
@@ -1,6 +1,6 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { a as l } from "./index-71PtBtHf.js";
3
+ import { c as l } from "./index-Be16PP7H.js";
4
4
  import { c as i } from "./tailwind.helper-gWiv5-6R.js";
5
5
  const d = l(
6
6
  "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { a as n } from "./index-71PtBtHf.js";
2
+ import { c as n } from "./index-Be16PP7H.js";
3
3
  import { c as a } from "./tailwind.helper-gWiv5-6R.js";
4
4
  const s = n(
5
5
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
@@ -17,10 +17,10 @@ const s = n(
17
17
  }
18
18
  }
19
19
  );
20
- function c({ className: r, variant: e, ...t }) {
20
+ function u({ className: r, variant: e, ...t }) {
21
21
  return /* @__PURE__ */ o("div", { className: a(s({ variant: e }), r), ...t });
22
22
  }
23
23
  export {
24
- c as B,
24
+ u as B,
25
25
  s as b
26
26
  };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ export declare const SkeletonCard: () => React.JSX.Element;
3
+ //# sourceMappingURL=SkeletonCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkeletonCard.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/SkeletonCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,YAAY,QAAO,KAAK,CAAC,GAAG,CAAC,OAczC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ interface SkeletonCardsProps {
3
+ count?: number;
4
+ }
5
+ export declare const SkeletonCards: ({ count }: SkeletonCardsProps) => React.JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=SkeletonCards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkeletonCards.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/SkeletonCards.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,GAAI,WAAe,kBAAkB,KAAG,KAAK,CAAC,GAAG,CAAC,OAQ3E,CAAC"}
@@ -1,9 +1,9 @@
1
- export { CardSkeleton } from "./CardSkeleton";
2
- export { CardsSkeleton } from "./CardsSkeleton";
3
1
  export { DashboardCard } from "./DashboardCard";
4
2
  export { KpiCard } from "./KpiCard";
5
3
  export type { KpiCardProps } from "./KpiCard";
6
4
  export { KpiCards } from "./KpiCards";
7
5
  export { MetricCard } from "./MetricCard";
8
6
  export type { MetricCardColor, MetricCardProps } from "./MetricCard";
7
+ export { SkeletonCard } from "./SkeletonCard";
8
+ export { SkeletonCards } from "./SkeletonCards";
9
9
  //# sourceMappingURL=index.d.ts.map