@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,257 +0,0 @@
1
- import { jsx as e, jsxs as l, Fragment as W } from "react/jsx-runtime";
2
- import { D as X, b as J, P as K, e as Q, h as U, c as Y, m as H, p as V, s as z, t as $, q as M, r as I, o as O, u as Z, n as L } from "./toggle-group-B2LRm0C5.js";
3
- import { A as ee, a as le } from "./alert-BUwDmcbB.js";
4
- import { B as g } from "./tooltip-6vdhKg8V.js";
5
- import { X as j } from "./select-pm9O5uLm.js";
6
- import "next-themes";
7
- import { useState as w, useEffect as ie } from "react";
8
- import { useTranslation as P } from "react-i18next";
9
- import { c as C } from "./index-71PtBtHf.js";
10
- import { G as re } from "./GenericForm-SLJH_-aT.js";
11
- import { E as ae } from "./ErrorAlert-DYuVgrm3.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 te = [
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
- ], se = C("circle-alert", te);
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 ne = [
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
- ], S = C("pen", ne);
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 oe = [
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
- ], T = C("save", oe);
55
- /**
56
- * @license lucide-react v1.17.0 - ISC
57
- *
58
- * This source code is licensed under the ISC license.
59
- * See the LICENSE file in the root directory of this source tree.
60
- */
61
- const ce = [
62
- ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
63
- ["path", { d: "M3 6h18", key: "d0wm0j" }],
64
- ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
65
- ], de = C("trash", ce);
66
- function me({ open: r, onOpenChange: c, config: i, isLoading: t, error: s, children: n }) {
67
- const { t: a } = P(), { title: v, description: u, icon: p, maxWidth: b = "sm:max-w-xl", actions: d } = i;
68
- return /* @__PURE__ */ e(X, { open: r, onOpenChange: c, children: /* @__PURE__ */ l(J, { className: `${b} max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden`, children: [
69
- t === !0 ? /* @__PURE__ */ e("div", { className: "absolute top-0 left-0 right-0 z-10", children: /* @__PURE__ */ e(K, { indeterminate: !0, className: "h-1 rounded-none" }) }) : null,
70
- /* @__PURE__ */ l(Q, { className: "bg-gradient-to-r from-slate-900 to-purple-700 p-6 rounded-t-lg shrink-0", children: [
71
- /* @__PURE__ */ l(U, { className: "text-2xl font-bold flex items-center gap-2 text-white", children: [
72
- p !== void 0 ? /* @__PURE__ */ e("div", { className: "p-2 bg-white/20 rounded-lg", children: /* @__PURE__ */ e(p, { className: "size-4 text-white" }) }) : null,
73
- a(v)
74
- ] }),
75
- u !== void 0 && u !== "" ? /* @__PURE__ */ e(Y, { className: "text-indigo-100 text-base", children: a(u) }) : null
76
- ] }),
77
- s != null ? /* @__PURE__ */ e("div", { className: "px-6 ", children: /* @__PURE__ */ l(ee, { variant: "destructive", className: "max-w-full", children: [
78
- /* @__PURE__ */ e(se, { className: "size-4" }),
79
- /* @__PURE__ */ e(le, { className: "break-words overflow-wrap-anywhere max-w-full", children: s.message })
80
- ] }) }) : null,
81
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-6 ", children: n }),
82
- d !== void 0 && d.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: d.map((o, D) => /* @__PURE__ */ l(g, { variant: o.variant ?? "default", onClick: o.onClick, disabled: o.disabled === !0 || t === !0, children: [
83
- o.icon !== void 0 ? /* @__PURE__ */ e(o.icon, { className: "size-4" }) : null,
84
- a(o.label)
85
- ] }, D)) }) }) : null
86
- ] }) });
87
- }
88
- function Ce({
89
- open: r,
90
- onOpenChange: c,
91
- data: i,
92
- title: t,
93
- headerBadge: s,
94
- schema: n,
95
- onSave: a,
96
- customFooter: v,
97
- defaultEditing: u = !1,
98
- footerActions: p = !0,
99
- saveLabel: b = "Sauvegarder",
100
- cancelLabel: d = "Annuler",
101
- hideSaveIcon: o = !1,
102
- maxWidth: D = "sm:max-w-4xl",
103
- isLoading: f = !1
104
- }) {
105
- const [x, N] = w(u), [m, _] = w(!1), [y, q] = w(null);
106
- if (ie(() => {
107
- r && N(u);
108
- }, [r, u]), i == null) return null;
109
- const E = () => {
110
- x ? a !== void 0 && y && y() : N(!0);
111
- }, A = () => {
112
- N(!1);
113
- }, F = () => {
114
- a !== void 0 && y && y();
115
- }, G = async (h) => {
116
- if (a) {
117
- _(!0);
118
- try {
119
- await a(h), N(!1);
120
- } catch (R) {
121
- console.error(R);
122
- } finally {
123
- _(!1);
124
- }
125
- }
126
- }, k = [];
127
- a !== void 0 && (x ? (d !== "" && k.push({
128
- label: d,
129
- onClick: A,
130
- variant: "outline",
131
- disabled: m || f,
132
- icon: j
133
- }), k.push({
134
- label: m ? "Enregistrement..." : b,
135
- onClick: F,
136
- variant: "default",
137
- disabled: m || f,
138
- icon: o ? void 0 : T
139
- })) : k.push({
140
- label: "Modifier",
141
- onClick: E,
142
- variant: "outline",
143
- icon: S
144
- }));
145
- const B = {
146
- title: t(i),
147
- maxWidth: D,
148
- actions: p ? k : []
149
- };
150
- return /* @__PURE__ */ e(
151
- me,
152
- {
153
- open: r,
154
- onOpenChange: (h) => {
155
- c(h), h || A();
156
- },
157
- config: B,
158
- isLoading: m || f,
159
- children: /* @__PURE__ */ l("div", { className: "py-4", children: [
160
- s !== void 0 ? /* @__PURE__ */ e("div", { className: "mb-4", children: s(i) }) : null,
161
- /* @__PURE__ */ e(
162
- re,
163
- {
164
- schema: n,
165
- initialData: i,
166
- disabled: !x,
167
- onSubmit: (h) => {
168
- G(h);
169
- },
170
- renderActions: !1,
171
- onRegisterSubmit: (h) => {
172
- q(() => h);
173
- },
174
- isLoading: m || f
175
- }
176
- ),
177
- v !== void 0 ? v(i) : null,
178
- a !== void 0 && !p ? /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 border-t pt-4 mt-6", children: x ? /* @__PURE__ */ l(W, { children: [
179
- d !== "" ? /* @__PURE__ */ l(g, { onClick: A, variant: "outline", size: "sm", disabled: m || f, children: [
180
- /* @__PURE__ */ e(j, { className: "size-4 mr-2" }),
181
- d
182
- ] }) : null,
183
- /* @__PURE__ */ l(g, { onClick: F, size: "sm", disabled: m || f, className: "text-white", children: [
184
- o ? null : /* @__PURE__ */ e(T, { className: "size-4 mr-2" }),
185
- m ? "Enregistrement..." : b
186
- ] })
187
- ] }) : /* @__PURE__ */ l(g, { onClick: E, variant: "outline", size: "sm", children: [
188
- /* @__PURE__ */ e(S, { className: "size-4 mr-2" }),
189
- "Modifier"
190
- ] }) }) : null
191
- ] })
192
- }
193
- );
194
- }
195
- const De = ({ isLoading: r, error: c, config: i }) => {
196
- const { t } = P(), s = (n) => {
197
- !n && !r && i.onClose();
198
- };
199
- return /* @__PURE__ */ e(H, { open: i.isOpen, onOpenChange: s, children: /* @__PURE__ */ l(V, { children: [
200
- /* @__PURE__ */ l(z, { children: [
201
- /* @__PURE__ */ l($, { className: "flex items-center gap-2 text-destructive", children: [
202
- /* @__PURE__ */ e(de, { className: "size-4" }),
203
- t(i.title)
204
- ] }),
205
- /* @__PURE__ */ e(z, { className: "bg-gradient-to-r from-slate-900 to-purple-700 rounded-t-lg shrink-0" }),
206
- /* @__PURE__ */ e(M, { children: t(i.description) }),
207
- /* @__PURE__ */ e(M, { children: i.itemName && /* @__PURE__ */ e("span", { className: "font-semibold block my-2", children: i.itemName }) })
208
- ] }),
209
- /* @__PURE__ */ e(ae, { error: c instanceof Error ? null : c }),
210
- /* @__PURE__ */ l(I, { children: [
211
- /* @__PURE__ */ l(O, { disabled: r, children: [
212
- " ",
213
- t("common.buttons.cancel")
214
- ] }),
215
- /* @__PURE__ */ e(
216
- g,
217
- {
218
- onClick: (n) => {
219
- n.preventDefault(), i.onConfirm();
220
- },
221
- disabled: r,
222
- className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
223
- children: r ? "Suppression..." : "Supprimer"
224
- }
225
- )
226
- ] })
227
- ] }) });
228
- };
229
- function Ae({
230
- children: r,
231
- title: c,
232
- description: i,
233
- confirmText: t = "Confirmer",
234
- cancelText: s = "Annuler",
235
- onConfirm: n,
236
- destructive: a = !1
237
- }) {
238
- return /* @__PURE__ */ l(H, { children: [
239
- /* @__PURE__ */ e(Z, { asChild: !0, children: r }),
240
- /* @__PURE__ */ l(V, { children: [
241
- /* @__PURE__ */ l(z, { children: [
242
- /* @__PURE__ */ e($, { children: c }),
243
- /* @__PURE__ */ e(M, { children: i })
244
- ] }),
245
- /* @__PURE__ */ l(I, { children: [
246
- /* @__PURE__ */ e(O, { children: s }),
247
- /* @__PURE__ */ e(L, { onClick: n, className: a ? "bg-red-600 hover:bg-red-700" : "", children: t })
248
- ] })
249
- ] })
250
- ] });
251
- }
252
- export {
253
- me as A,
254
- De as C,
255
- Ce as F,
256
- Ae as a
257
- };
@@ -1,13 +0,0 @@
1
- import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { L as i } from "./loader-circle-Cfo0gDyD.js";
3
- const d = ({ message: e }) => /* @__PURE__ */ r("div", { className: "p-6 border border-destructive bg-destructive/10 text-destructive rounded-md animate-fade-in", children: [
4
- /* @__PURE__ */ t("p", { className: "font-semibold mb-2", children: "Une erreur est survenue." }),
5
- e !== void 0 && e !== "" ? /* @__PURE__ */ t("p", { className: "text-sm opacity-80", children: e }) : null
6
- ] }), s = ({ message: e }) => /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center p-12 text-muted-foreground animate-fade-in", children: [
7
- /* @__PURE__ */ t(i, { className: "size-8 animate-spin mb-4 text-primary" }),
8
- e !== void 0 && e !== "" ? /* @__PURE__ */ t("p", { className: "font-semibold text-sm", children: e }) : null
9
- ] });
10
- export {
11
- d as E,
12
- s as L
13
- };
@@ -1,103 +0,0 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { I as l, M as p, J as m, N as x } from "./toggle-group-B2LRm0C5.js";
3
- import { c } from "./tailwind.helper-gWiv5-6R.js";
4
- import { useTranslation as f } from "react-i18next";
5
- import { formatNumber as b } from "@krosoft/core/helpers";
6
- import "./alert-BUwDmcbB.js";
7
- import "./tooltip-6vdhKg8V.js";
8
- import "./select-pm9O5uLm.js";
9
- import "next-themes";
10
- import "react";
11
- const v = () => /* @__PURE__ */ s(l, { className: "animate-pulse", children: [
12
- /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e("div", { className: "h-6 bg-muted rounded w-1/4" }) }),
13
- /* @__PURE__ */ e(m, { children: /* @__PURE__ */ s("div", { className: "space-y-2", children: [
14
- /* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded" }),
15
- /* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded w-3/4" })
16
- ] }) })
17
- ] }), H = ({ count: t = 1 }) => /* @__PURE__ */ e("div", { className: "grid gap-6", style: { gridTemplateColumns: `repeat(${t}, minmax(0, 1fr))` }, children: Array.from({ length: t }).map((r, a) => /* @__PURE__ */ e(v, {}, a)) }), J = ({ titleKey: t, icon: r, className: a, children: i }) => {
18
- const { t: n } = f();
19
- return /* @__PURE__ */ s(l, { className: c("bg-gray-50 dark:bg-gray-950", a), children: [
20
- /* @__PURE__ */ e(p, { children: /* @__PURE__ */ s(x, { className: "flex items-center gap-2", children: [
21
- r && /* @__PURE__ */ e(r, { className: "mr-2 size-4" }),
22
- /* @__PURE__ */ e("span", { children: n(t) })
23
- ] }) }),
24
- /* @__PURE__ */ e(m, { children: i })
25
- ] });
26
- }, C = ({
27
- titleKey: t,
28
- value: r,
29
- valueClassName: a,
30
- icon: i,
31
- iconClassName: n,
32
- description: g,
33
- descriptionClassName: d,
34
- onClick: o
35
- }) => {
36
- const { t: u } = f();
37
- return /* @__PURE__ */ s(l, { className: c(o !== void 0 ? "hover:border-primary cursor-pointer" : ""), onClick: o, children: [
38
- /* @__PURE__ */ s(p, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
39
- /* @__PURE__ */ e(x, { className: "text-sm font-medium", children: u(t) }),
40
- /* @__PURE__ */ e(i, { className: c("size-6 text-muted-foreground", n) })
41
- ] }),
42
- /* @__PURE__ */ s(m, { children: [
43
- /* @__PURE__ */ e("div", { className: c("text-2xl font-bold", a), children: b(r) }),
44
- /* @__PURE__ */ e("p", { className: c("text-xs text-muted-foreground", d), children: g })
45
- ] })
46
- ] });
47
- }, _ = ({ stats: t }) => /* @__PURE__ */ e("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: t.map((r) => /* @__PURE__ */ e(
48
- C,
49
- {
50
- titleKey: r.titleKey,
51
- value: r.value,
52
- valueClassName: r.valueClassName,
53
- icon: r.icon,
54
- iconClassName: r.iconClassName,
55
- description: r.description,
56
- descriptionClassName: r.descriptionClassName,
57
- onClick: r.onClick
58
- },
59
- r.titleKey
60
- )) }), w = {
61
- blue: "bg-gradient-to-br from-blue-500 to-cyan-500 text-white",
62
- green: "bg-gradient-to-br from-green-500 to-emerald-500 text-white",
63
- orange: "bg-gradient-to-br from-orange-500 to-yellow-500 text-white",
64
- red: "bg-gradient-to-br from-red-500 to-pink-500 text-white",
65
- purple: "bg-gradient-to-br from-purple-500 to-indigo-500 text-white",
66
- accent: "bg-accent/10 text-accent",
67
- success: "bg-success/10 text-success",
68
- info: "bg-info/10 text-info",
69
- warning: "bg-warning/10 text-warning",
70
- destructive: "bg-destructive/10 text-destructive"
71
- }, y = {
72
- sm: "size-4",
73
- md: "size-5",
74
- lg: "size-6"
75
- }, z = (t) => t === "up" ? "↑" : t === "down" ? "↓" : "", K = (t) => t === "up" ? "text-green-600" : t === "down" ? "text-red-600" : "text-muted-foreground", q = ({ title: t, value: r, unit: a, subtitle: i, icon: n, iconSize: g = "md", trend: d, trendValue: o, color: u = "blue", children: h }) => {
76
- const N = n;
77
- return /* @__PURE__ */ e(l, { className: "relative overflow-hidden bg-card border shadow-lg hover:shadow-xl transition-all duration-300", children: /* @__PURE__ */ s(m, { className: "pt-6", children: [
78
- /* @__PURE__ */ s("div", { className: "flex items-start justify-between", children: [
79
- /* @__PURE__ */ s("div", { children: [
80
- /* @__PURE__ */ e(x, { className: "text-sm font-medium text-muted-foreground", children: t }),
81
- /* @__PURE__ */ s("div", { className: "flex items-baseline space-x-2 mt-1", children: [
82
- /* @__PURE__ */ e("div", { className: "text-2xl font-bold text-card-foreground", children: typeof r == "number" ? r.toFixed(1) : r }),
83
- a && /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground font-medium", children: a })
84
- ] }),
85
- i && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children: i }),
86
- d && o && /* @__PURE__ */ s("div", { className: `flex items-center space-x-1 mt-2 text-xs ${K(d)}`, children: [
87
- /* @__PURE__ */ e("span", { children: z(d) }),
88
- /* @__PURE__ */ e("span", { children: o })
89
- ] })
90
- ] }),
91
- /* @__PURE__ */ e("div", { className: `p-2 rounded-lg ${w[u]} shadow-lg`, children: /* @__PURE__ */ e(N, { className: y[g] }) })
92
- ] }),
93
- h && /* @__PURE__ */ e("div", { className: "mt-4", children: h })
94
- ] }) });
95
- };
96
- export {
97
- v as C,
98
- J as D,
99
- C as K,
100
- q as M,
101
- H as a,
102
- _ as b
103
- };
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- export declare const CardSkeleton: () => React.JSX.Element;
3
- //# sourceMappingURL=CardSkeleton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CardSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/CardSkeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,YAAY,QAAO,KAAK,CAAC,GAAG,CAAC,OAczC,CAAC"}
@@ -1,7 +0,0 @@
1
- import * as React from "react";
2
- interface CardsSkeletonProps {
3
- count?: number;
4
- }
5
- export declare const CardsSkeleton: ({ count }: CardsSkeletonProps) => React.JSX.Element;
6
- export {};
7
- //# sourceMappingURL=CardsSkeleton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CardsSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/CardsSkeleton.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,10 +0,0 @@
1
- import { ConfirmDialogConfig } from "@/types/ConfirmDialogConfig";
2
- import { ErrorHttp } from "@krosoft/core/types";
3
- interface ConfirmDeleteDialogProps {
4
- isLoading: boolean;
5
- error: ErrorHttp | Error | null;
6
- config: ConfirmDialogConfig;
7
- }
8
- export declare const ConfirmDeleteDialog: ({ isLoading, error, config }: ConfirmDeleteDialogProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
10
- //# sourceMappingURL=ConfirmDeleteDialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConfirmDeleteDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/core/dialogs/ConfirmDeleteDialog.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIhD,UAAU,wBAAwB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,eAAO,MAAM,mBAAmB,GAAI,8BAA8B,wBAAwB,4CAuCzF,CAAC"}
@@ -1,147 +0,0 @@
1
- import { useContext as W, createContext as g, forwardRef as A, createElement as k } from "react";
2
- import { a as L } from "./tailwind.helper-gWiv5-6R.js";
3
- /**
4
- * @license lucide-react v1.17.0 - ISC
5
- *
6
- * This source code is licensed under the ISC license.
7
- * See the LICENSE file in the root directory of this source tree.
8
- */
9
- const N = (...o) => o.filter((e, t, r) => !!e && e.trim() !== "" && r.indexOf(e) === t).join(" ").trim();
10
- /**
11
- * @license lucide-react v1.17.0 - ISC
12
- *
13
- * This source code is licensed under the ISC license.
14
- * See the LICENSE file in the root directory of this source tree.
15
- */
16
- const V = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
17
- /**
18
- * @license lucide-react v1.17.0 - ISC
19
- *
20
- * This source code is licensed under the ISC license.
21
- * See the LICENSE file in the root directory of this source tree.
22
- */
23
- const S = (o) => o.replace(
24
- /^([A-Z])|[\s-_]+(\w)/g,
25
- (e, t, r) => r ? r.toUpperCase() : t.toLowerCase()
26
- );
27
- /**
28
- * @license lucide-react v1.17.0 - ISC
29
- *
30
- * This source code is licensed under the ISC license.
31
- * See the LICENSE file in the root directory of this source tree.
32
- */
33
- const y = (o) => {
34
- const e = S(o);
35
- return e.charAt(0).toUpperCase() + e.slice(1);
36
- };
37
- /**
38
- * @license lucide-react v1.17.0 - ISC
39
- *
40
- * This source code is licensed under the ISC license.
41
- * See the LICENSE file in the root directory of this source tree.
42
- */
43
- var x = {
44
- xmlns: "http://www.w3.org/2000/svg",
45
- width: 24,
46
- height: 24,
47
- viewBox: "0 0 24 24",
48
- fill: "none",
49
- stroke: "currentColor",
50
- strokeWidth: 2,
51
- strokeLinecap: "round",
52
- strokeLinejoin: "round"
53
- };
54
- /**
55
- * @license lucide-react v1.17.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */
60
- const j = (o) => {
61
- for (const e in o)
62
- if (e.startsWith("aria-") || e === "role" || e === "title")
63
- return !0;
64
- return !1;
65
- }, O = g({}), $ = () => W(O), P = A(
66
- ({ color: o, size: e, strokeWidth: t, absoluteStrokeWidth: r, className: c = "", children: a, iconNode: m, ...u }, C) => {
67
- const {
68
- size: n = 24,
69
- strokeWidth: s = 2,
70
- absoluteStrokeWidth: i = !1,
71
- color: l = "currentColor",
72
- className: h = ""
73
- } = $() ?? {}, f = r ?? i ? Number(t ?? s) * 24 / Number(e ?? n) : t ?? s;
74
- return k(
75
- "svg",
76
- {
77
- ref: C,
78
- ...x,
79
- width: e ?? n ?? x.width,
80
- height: e ?? n ?? x.height,
81
- stroke: o ?? l,
82
- strokeWidth: f,
83
- className: N("lucide", h, c),
84
- ...!a && !j(u) && { "aria-hidden": "true" },
85
- ...u
86
- },
87
- [
88
- ...m.map(([v, d]) => k(v, d)),
89
- ...Array.isArray(a) ? a : [a]
90
- ]
91
- );
92
- }
93
- );
94
- /**
95
- * @license lucide-react v1.17.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */
100
- const B = (o, e) => {
101
- const t = A(
102
- ({ className: r, ...c }, a) => k(P, {
103
- ref: a,
104
- iconNode: e,
105
- className: N(
106
- `lucide-${V(y(o))}`,
107
- `lucide-${o}`,
108
- r
109
- ),
110
- ...c
111
- })
112
- );
113
- return t.displayName = y(o), t;
114
- }, w = (o) => typeof o == "boolean" ? `${o}` : o === 0 ? "0" : o, b = L, I = (o, e) => (t) => {
115
- var r;
116
- if ((e == null ? void 0 : e.variants) == null) return b(o, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
117
- const { variants: c, defaultVariants: a } = e, m = Object.keys(c).map((n) => {
118
- const s = t == null ? void 0 : t[n], i = a == null ? void 0 : a[n];
119
- if (s === null) return null;
120
- const l = w(s) || w(i);
121
- return c[n][l];
122
- }), u = t && Object.entries(t).reduce((n, s) => {
123
- let [i, l] = s;
124
- return l === void 0 || (n[i] = l), n;
125
- }, {}), C = e == null || (r = e.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((n, s) => {
126
- let { class: i, className: l, ...h } = s;
127
- return Object.entries(h).every((f) => {
128
- let [v, d] = f;
129
- return Array.isArray(d) ? d.includes({
130
- ...a,
131
- ...u
132
- }[v]) : {
133
- ...a,
134
- ...u
135
- }[v] === d;
136
- }) ? [
137
- ...n,
138
- i,
139
- l
140
- ] : n;
141
- }, []);
142
- return b(o, m, C, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
143
- };
144
- export {
145
- I as a,
146
- B as c
147
- };