@krosoft/react 0.0.91 → 0.0.93

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 (30) hide show
  1. package/dist/{AppSubTitle-CvJlatS9.js → AppSubTitle-CrQq4gjE.js} +1 -1
  2. package/dist/{AppTitle-LIQCjpo5.js → AppTitle-Cdnl1Ep3.js} +19 -18
  3. package/dist/{AppVerticalTabs-BHrad7wu.js → AppVerticalTabs-tg4OMyaw.js} +3 -3
  4. package/dist/{ConfirmationDialog-BlRXnFH5.js → ConfirmationDialog-ClYOz40y.js} +55 -54
  5. package/dist/{MetricCard-BGT2QRn0.js → MetricCard-mB38b3Mw.js} +7 -6
  6. package/dist/{SearchInput-DpOuKSIf.js → SearchInput-DaMu6Bni.js} +19 -18
  7. package/dist/{TableFilter-DFtN_-Bg.js → TableFilter-Bq5bpUoa.js} +12 -11
  8. package/dist/{TableSettings-m2q3s0wU.js → TableSettings-DbTxUWk3.js} +13 -12
  9. package/dist/{ThemeSelector-D9KTJAWz.js → ThemeSelector-Bzxc7UEq.js} +1 -1
  10. package/dist/components/core/cards/index.js +1 -1
  11. package/dist/components/core/dialogs/index.js +2 -2
  12. package/dist/components/core/filters/index.js +1 -1
  13. package/dist/components/core/index.js +10 -10
  14. package/dist/components/core/inputs/index.js +1 -1
  15. package/dist/components/core/layouts/index.js +2 -2
  16. package/dist/components/core/table/index.js +1 -1
  17. package/dist/components/core/tabs/index.js +1 -1
  18. package/dist/components/core/theme/index.js +1 -1
  19. package/dist/components/index.js +97 -95
  20. package/dist/components/ui/index.d.ts +1 -0
  21. package/dist/components/ui/index.d.ts.map +1 -1
  22. package/dist/components/ui/index.js +54 -52
  23. package/dist/components/ui/select.d.ts +3 -1
  24. package/dist/components/ui/select.d.ts.map +1 -1
  25. package/dist/{select-D6_XPD6x.js → select-zzSnHs9S.js} +481 -456
  26. package/dist/toaster-Cjk453ai.js +134 -0
  27. package/dist/toggle-group-5ImQF6h-.js +20235 -0
  28. package/package.json +9 -8
  29. package/dist/toaster-D6ND7OTk.js +0 -113
  30. package/dist/toggle-group-VJoGbVQm.js +0 -19987
@@ -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 "./AppTitle-LIQCjpo5.js";
3
+ import { A as m } from "./AppTitle-Cdnl1Ep3.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,25 +1,26 @@
1
1
  import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
- import { ar as c, aF as b, at as f, aA as h, av as u } from "./toggle-group-VJoGbVQm.js";
2
+ import { ar as c, aF as b, at as f, aA as h, av as u } from "./toggle-group-5ImQF6h-.js";
3
3
  import "./card-Bn3Y7DHQ.js";
4
- import { c as d } from "./index-gWiv5-6R.js";
4
+ import { c as m } from "./index-gWiv5-6R.js";
5
5
  import { B as p } from "./tooltip-CAu4DEhc.js";
6
- import "./select-D6_XPD6x.js";
6
+ import "./select-zzSnHs9S.js";
7
+ import "next-themes";
7
8
  import "react";
8
9
  import { u as v } from "./useMobile-DN1_OMDB.js";
9
10
  import { useTranslation as N } from "react-i18next";
10
11
  import { E as x } from "./ellipsis-vertical-BVxSFNOa.js";
11
- function E({ actions: m, className: o }) {
12
+ function T({ actions: d, className: o }) {
12
13
  const { t: i } = N(), t = v();
13
- return !m || m.length === 0 ? null : t ? /* @__PURE__ */ n(c, { children: [
14
+ return !d || d.length === 0 ? null : t ? /* @__PURE__ */ n(c, { children: [
14
15
  /* @__PURE__ */ l(b, { asChild: !0, children: /* @__PURE__ */ l(p, { variant: "outline", size: "icon", children: /* @__PURE__ */ l(x, { className: "size-4" }) }) }),
15
- /* @__PURE__ */ l(f, { align: "end", className: "min-w-48", children: m.map((r, e) => r ? r.children && r.children.length > 0 ? /* @__PURE__ */ n("div", { children: [
16
+ /* @__PURE__ */ l(f, { align: "end", className: "min-w-48", children: d.map((r, e) => r ? r.children && r.children.length > 0 ? /* @__PURE__ */ n("div", { children: [
16
17
  e > 0 && /* @__PURE__ */ l(h, {}),
17
18
  r.children.map((s, a) => s ? /* @__PURE__ */ n(
18
19
  u,
19
20
  {
20
21
  onClick: () => void s.onClick(),
21
22
  disabled: s.disabled,
22
- className: d("gap-2", s.className),
23
+ className: m("gap-2", s.className),
23
24
  children: [
24
25
  s.icon && /* @__PURE__ */ l(s.icon, { className: "size-4" }),
25
26
  s.labelKey && i(s.labelKey)
@@ -27,12 +28,12 @@ function E({ actions: m, className: o }) {
27
28
  },
28
29
  a
29
30
  ) : null)
30
- ] }, e) : /* @__PURE__ */ n(u, { onClick: () => void r.onClick(), disabled: r.disabled, className: d("gap-2", r.className), children: [
31
+ ] }, e) : /* @__PURE__ */ n(u, { onClick: () => void r.onClick(), disabled: r.disabled, className: m("gap-2", r.className), children: [
31
32
  r.icon && /* @__PURE__ */ l(r.icon, { className: "size-4" }),
32
33
  r.labelKey && i(r.labelKey)
33
34
  ] }, e) : null) })
34
- ] }) : ((r) => /* @__PURE__ */ l("div", { className: d("flex gap-2", o), children: r.map((e, s) => e ? e.children && e.children.length > 0 ? /* @__PURE__ */ n(c, { children: [
35
- /* @__PURE__ */ l(b, { asChild: !0, children: /* @__PURE__ */ n(p, { variant: e.variant, disabled: e.disabled, className: d("gap-2", e.className), children: [
35
+ ] }) : ((r) => /* @__PURE__ */ l("div", { className: m("flex gap-2", o), children: r.map((e, s) => e ? e.children && e.children.length > 0 ? /* @__PURE__ */ n(c, { children: [
36
+ /* @__PURE__ */ l(b, { asChild: !0, children: /* @__PURE__ */ n(p, { variant: e.variant, disabled: e.disabled, className: m("gap-2", e.className), children: [
36
37
  e.icon && /* @__PURE__ */ l(e.icon, { className: "size-4" }),
37
38
  e.labelKey && i(e.labelKey)
38
39
  ] }) }),
@@ -41,7 +42,7 @@ function E({ actions: m, className: o }) {
41
42
  {
42
43
  onClick: () => void a.onClick(),
43
44
  disabled: a.disabled,
44
- className: d("gap-2", a.className),
45
+ className: m("gap-2", a.className),
45
46
  children: [
46
47
  a.icon && /* @__PURE__ */ l(a.icon, { className: "size-4" }),
47
48
  a.labelKey && i(a.labelKey)
@@ -55,23 +56,23 @@ function E({ actions: m, className: o }) {
55
56
  variant: e.variant,
56
57
  onClick: () => void e.onClick(),
57
58
  disabled: e.disabled,
58
- className: d("gap-2", e.className),
59
+ className: m("gap-2", e.className),
59
60
  children: [
60
61
  e.icon && /* @__PURE__ */ l(e.icon, { className: "size-4" }),
61
62
  e.labelKey && i(e.labelKey)
62
63
  ]
63
64
  },
64
65
  s
65
- ) : null) }))(m);
66
+ ) : null) }))(d);
66
67
  }
67
- function T({ titleKey: m, descriptionKey: o, isSubTitle: i }) {
68
+ function F({ titleKey: d, descriptionKey: o, isSubTitle: i }) {
68
69
  const { t } = N();
69
70
  return /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
70
- /* @__PURE__ */ l("h1", { className: i ? "text-xl md:text-2xl font-semibold" : "text-xl md:text-3xl font-bold", children: t(m) ?? "" }),
71
- o ? /* @__PURE__ */ l("p", { className: d("text-muted-foreground", i && "text-sm"), children: t(o) }) : null
71
+ /* @__PURE__ */ l("h1", { className: i ? "text-xl md:text-2xl font-semibold" : "text-xl md:text-3xl font-bold", children: t(d) ?? "" }),
72
+ o ? /* @__PURE__ */ l("p", { className: m("text-muted-foreground", i && "text-sm"), children: t(o) }) : null
72
73
  ] });
73
74
  }
74
75
  export {
75
- E as A,
76
- T as a
76
+ T as A,
77
+ F as a
77
78
  };
@@ -1,11 +1,11 @@
1
1
  import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
2
  import { C as v, f as g, c as y } from "./card-Bn3Y7DHQ.js";
3
- import { a as N, A as w } from "./AppTitle-LIQCjpo5.js";
4
- import { bR as T, bT as b, bU as S, bS as C, bu as k } from "./toggle-group-VJoGbVQm.js";
3
+ import { a as N, A as w } from "./AppTitle-Cdnl1Ep3.js";
4
+ import { bR as T, bT as b, bU as S, bS as C, bu as k } from "./toggle-group-5ImQF6h-.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 "./index-gWiv5-6R.js";
8
- import { S as P, h as j, i as z, a as M, c as L } from "./select-D6_XPD6x.js";
8
+ import { S as P, h as j, i as z, a as M, c as L } from "./select-zzSnHs9S.js";
9
9
  import { c as V } from "./index-DSyPHOLE.js";
10
10
  /**
11
11
  * @license lucide-react v1.16.0 - ISC
@@ -1,12 +1,13 @@
1
1
  import { jsx as e, jsxs as i, Fragment as U } from "react/jsx-runtime";
2
- import { D as Y, b as Z, P as L, e as ee, h as re, c as le, c7 as $, aV as ie, aQ as ae, m as q, p as J, s as S, t as W, q as F, r as B, o as Q, u as ne, n as te } from "./toggle-group-VJoGbVQm.js";
2
+ import { D as Y, b as Z, P as L, e as ee, h as re, c as le, aV as ie, aQ as ae, m as q, p as J, s as S, t as W, q as F, r as B, o as Q, u as te, n as ne } from "./toggle-group-5ImQF6h-.js";
3
3
  import { A as se, a as oe } from "./card-Bn3Y7DHQ.js";
4
4
  import { B as k } from "./tooltip-CAu4DEhc.js";
5
- import "./select-D6_XPD6x.js";
6
- import { useState as _, useEffect as ce } from "react";
5
+ import { X as $ } from "./select-zzSnHs9S.js";
6
+ import "next-themes";
7
+ import { useState as _, useEffect as de } from "react";
7
8
  import { useTranslation as X } from "react-i18next";
8
9
  import { c as j } from "./index-DSyPHOLE.js";
9
- import { E as de } from "./ErrorAlert-BITMD2I5.js";
10
+ import { E as ce } from "./ErrorAlert-BITMD2I5.js";
10
11
  /**
11
12
  * @license lucide-react v1.16.0 - ISC
12
13
  *
@@ -61,36 +62,36 @@ const pe = [
61
62
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
62
63
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
63
64
  ], fe = j("trash", pe);
64
- function ve({ open: s, onOpenChange: h, config: l, isLoading: o, error: c, children: d }) {
65
- const { t } = X(), { title: C, description: g, icon: v, maxWidth: D = "sm:max-w-xl", actions: u } = l;
65
+ function ve({ open: s, onOpenChange: h, config: l, isLoading: o, error: d, children: c }) {
66
+ const { t: n } = X(), { title: C, description: g, icon: v, maxWidth: D = "sm:max-w-xl", actions: u } = l;
66
67
  return /* @__PURE__ */ e(Y, { open: s, onOpenChange: h, children: /* @__PURE__ */ i(Z, { className: `${D} max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden`, children: [
67
68
  o === !0 ? /* @__PURE__ */ e("div", { className: "absolute top-0 left-0 right-0 z-10", children: /* @__PURE__ */ e(L, { indeterminate: !0, className: "h-1 rounded-none" }) }) : null,
68
69
  /* @__PURE__ */ i(ee, { className: "bg-gradient-to-r from-slate-900 to-purple-700 p-6 rounded-t-lg shrink-0", children: [
69
70
  /* @__PURE__ */ i(re, { className: "text-2xl font-bold flex items-center gap-2 text-white", children: [
70
71
  v !== void 0 ? /* @__PURE__ */ e("div", { className: "p-2 bg-white/20 rounded-lg", children: /* @__PURE__ */ e(v, { className: "size-4 text-white" }) }) : null,
71
- t(C)
72
+ n(C)
72
73
  ] }),
73
- g !== void 0 && g !== "" ? /* @__PURE__ */ e(le, { className: "text-indigo-100 text-base", children: t(g) }) : null
74
+ g !== void 0 && g !== "" ? /* @__PURE__ */ e(le, { className: "text-indigo-100 text-base", children: n(g) }) : null
74
75
  ] }),
75
- c != null ? /* @__PURE__ */ e("div", { className: "px-6 ", children: /* @__PURE__ */ i(se, { variant: "destructive", className: "max-w-full", children: [
76
+ d != null ? /* @__PURE__ */ e("div", { className: "px-6 ", children: /* @__PURE__ */ i(se, { variant: "destructive", className: "max-w-full", children: [
76
77
  /* @__PURE__ */ e(he, { className: "size-4" }),
77
- /* @__PURE__ */ e(oe, { className: "break-words overflow-wrap-anywhere max-w-full", children: c.message })
78
+ /* @__PURE__ */ e(oe, { className: "break-words overflow-wrap-anywhere max-w-full", children: d.message })
78
79
  ] }) }) : null,
79
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-6 ", children: d }),
80
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-6 ", children: c }),
80
81
  u !== void 0 && u.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: u.map((m, z) => /* @__PURE__ */ i(k, { variant: m.variant ?? "default", onClick: m.onClick, disabled: m.disabled === !0 || o === !0, children: [
81
82
  m.icon !== void 0 ? /* @__PURE__ */ e(m.icon, { className: "size-4" }) : null,
82
- t(m.label)
83
+ n(m.label)
83
84
  ] }, z)) }) }) : null
84
85
  ] }) });
85
86
  }
86
- function Ee({
87
+ function Ve({
87
88
  open: s,
88
89
  onOpenChange: h,
89
90
  data: l,
90
91
  title: o,
91
- headerBadge: c,
92
- sections: d,
93
- onSave: t,
92
+ headerBadge: d,
93
+ sections: c,
94
+ onSave: n,
94
95
  customFooter: C,
95
96
  defaultEditing: g = !1,
96
97
  footerActions: v = !0,
@@ -100,15 +101,15 @@ function Ee({
100
101
  maxWidth: z = "sm:max-w-4xl"
101
102
  }) {
102
103
  const [w, y] = _(g), [b, N] = _({}), [p, A] = _(!1);
103
- if (ce(() => {
104
+ if (de(() => {
104
105
  s && y(g);
105
106
  }, [s, g]), l == null) return null;
106
107
  const T = async () => {
107
108
  if (w) {
108
- if (t !== void 0) {
109
+ if (n !== void 0) {
109
110
  A(!0);
110
111
  try {
111
- await t(b), y(!1), N({});
112
+ await n(b), y(!1), N({});
112
113
  } catch (r) {
113
114
  console.error(r);
114
115
  } finally {
@@ -120,10 +121,10 @@ function Ee({
120
121
  }, M = () => {
121
122
  y(!1), N({});
122
123
  }, H = async () => {
123
- if (t !== void 0) {
124
+ if (n !== void 0) {
124
125
  A(!0);
125
126
  try {
126
- await t(b), y(!1), N({});
127
+ await n(b), y(!1), N({});
127
128
  } catch (r) {
128
129
  console.error(r);
129
130
  } finally {
@@ -133,10 +134,10 @@ function Ee({
133
134
  }, O = (r, a) => {
134
135
  N((f) => ({ ...f, [r]: a }));
135
136
  }, G = (r) => {
136
- if (w && t !== void 0) {
137
+ if (w && n !== void 0) {
137
138
  if (r.renderEdit !== void 0)
138
- return r.renderEdit(l, b, (n) => {
139
- O(r.key, n);
139
+ return r.renderEdit(l, b, (t) => {
140
+ O(r.key, t);
140
141
  });
141
142
  let x = "";
142
143
  if (b[r.key] !== void 0)
@@ -144,15 +145,15 @@ function Ee({
144
145
  else if (r.getEditValue !== void 0)
145
146
  x = r.getEditValue(l);
146
147
  else {
147
- const n = l[r.key];
148
- x = n != null && String(n) !== "" ? String(n) : "";
148
+ const t = l[r.key];
149
+ x = t != null && String(t) !== "" ? String(t) : "";
149
150
  }
150
151
  return /* @__PURE__ */ e(
151
152
  ae,
152
153
  {
153
154
  value: x,
154
- onChange: (n) => {
155
- O(r.key, n.target.value);
155
+ onChange: (t) => {
156
+ O(r.key, t.target.value);
156
157
  }
157
158
  }
158
159
  );
@@ -161,18 +162,18 @@ function Ee({
161
162
  return r.renderView(l);
162
163
  const a = l[r.key];
163
164
  let f = "Non renseigné";
164
- return Array.isArray(a) ? a.length > 0 && (f = a.map((n) => {
165
- if (typeof n == "object" && n !== null) {
166
- const V = n;
167
- return typeof V.name == "string" ? V.name : typeof V.label == "string" ? V.label : JSON.stringify(n);
165
+ return Array.isArray(a) ? a.length > 0 && (f = a.map((t) => {
166
+ if (typeof t == "object" && t !== null) {
167
+ const V = t;
168
+ return typeof V.name == "string" ? V.name : typeof V.label == "string" ? V.label : JSON.stringify(t);
168
169
  }
169
- return String(n);
170
+ return String(t);
170
171
  }).join(", ")) : typeof a == "object" && a !== null ? f = JSON.stringify(a) : (typeof a == "string" || typeof a == "number" || typeof a == "boolean") && (f = String(a)), /* @__PURE__ */ e("div", { className: "p-2 bg-gray-50 dark:bg-gray-900 rounded border border-transparent min-h-[36px] flex items-center", children: f });
171
172
  }, K = (r) => /* @__PURE__ */ i("div", { className: `col-span-1 ${r.fullWidth === !0 ? "md:col-span-2" : ""}`, children: [
172
173
  /* @__PURE__ */ e(ie, { className: "mb-1 block text-sm font-medium", children: r.label }),
173
174
  G(r)
174
175
  ] }, r.key), E = [];
175
- t !== void 0 && (w ? (u !== "" && E.push({
176
+ n !== void 0 && (w ? (u !== "" && E.push({
176
177
  label: u,
177
178
  onClick: M,
178
179
  variant: "outline",
@@ -209,8 +210,8 @@ function Ee({
209
210
  config: R,
210
211
  isLoading: p,
211
212
  children: /* @__PURE__ */ i("div", { className: "py-4", children: [
212
- c !== void 0 ? /* @__PURE__ */ e("div", { className: "mb-4", children: c(l) }) : null,
213
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 items-start", children: d.map((r, a) => /* @__PURE__ */ i("div", { className: "space-y-4", children: [
213
+ d !== void 0 ? /* @__PURE__ */ e("div", { className: "mb-4", children: d(l) }) : null,
214
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 items-start", children: c.map((r, a) => /* @__PURE__ */ i("div", { className: "space-y-4", children: [
214
215
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
215
216
  r.icon,
216
217
  /* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children: r.title })
@@ -218,7 +219,7 @@ function Ee({
218
219
  /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4", children: r.fields.map(K) })
219
220
  ] }, a)) }),
220
221
  C !== void 0 ? C(l) : null,
221
- t !== void 0 && !v ? /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 border-t pt-4 mt-6", children: w ? /* @__PURE__ */ i(U, { children: [
222
+ n !== void 0 && !v ? /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 border-t pt-4 mt-6", children: w ? /* @__PURE__ */ i(U, { children: [
222
223
  u !== "" ? /* @__PURE__ */ i(k, { onClick: M, variant: "outline", size: "sm", disabled: p, children: [
223
224
  /* @__PURE__ */ e($, { className: "h-4 w-4 mr-2" }),
224
225
  u
@@ -256,11 +257,11 @@ function Ee({
256
257
  }
257
258
  );
258
259
  }
259
- const Ve = ({ isLoading: s, error: h, config: l }) => {
260
- const { t: o } = X(), c = (d) => {
261
- !d && !s && l.onClose();
260
+ const je = ({ isLoading: s, error: h, config: l }) => {
261
+ const { t: o } = X(), d = (c) => {
262
+ !c && !s && l.onClose();
262
263
  };
263
- return /* @__PURE__ */ e(q, { open: l.isOpen, onOpenChange: c, children: /* @__PURE__ */ i(J, { children: [
264
+ return /* @__PURE__ */ e(q, { open: l.isOpen, onOpenChange: d, children: /* @__PURE__ */ i(J, { children: [
264
265
  /* @__PURE__ */ i(S, { children: [
265
266
  /* @__PURE__ */ i(W, { className: "flex items-center gap-2 text-destructive", children: [
266
267
  /* @__PURE__ */ e(fe, { className: "size-4" }),
@@ -270,7 +271,7 @@ const Ve = ({ isLoading: s, error: h, config: l }) => {
270
271
  /* @__PURE__ */ e(F, { children: o(l.description) }),
271
272
  /* @__PURE__ */ e(F, { children: l.itemName && /* @__PURE__ */ e("span", { className: "font-semibold block my-2", children: l.itemName }) })
272
273
  ] }),
273
- /* @__PURE__ */ e(de, { error: h instanceof Error ? null : h }),
274
+ /* @__PURE__ */ e(ce, { error: h instanceof Error ? null : h }),
274
275
  /* @__PURE__ */ i(B, { children: [
275
276
  /* @__PURE__ */ i(Q, { disabled: s, children: [
276
277
  " ",
@@ -279,8 +280,8 @@ const Ve = ({ isLoading: s, error: h, config: l }) => {
279
280
  /* @__PURE__ */ e(
280
281
  k,
281
282
  {
282
- onClick: (d) => {
283
- d.preventDefault(), l.onConfirm();
283
+ onClick: (c) => {
284
+ c.preventDefault(), l.onConfirm();
284
285
  },
285
286
  disabled: s,
286
287
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
@@ -290,32 +291,32 @@ const Ve = ({ isLoading: s, error: h, config: l }) => {
290
291
  ] })
291
292
  ] }) });
292
293
  };
293
- function je({
294
+ function ze({
294
295
  children: s,
295
296
  title: h,
296
297
  description: l,
297
298
  confirmText: o = "Confirmer",
298
- cancelText: c = "Annuler",
299
- onConfirm: d,
300
- destructive: t = !1
299
+ cancelText: d = "Annuler",
300
+ onConfirm: c,
301
+ destructive: n = !1
301
302
  }) {
302
303
  return /* @__PURE__ */ i(q, { children: [
303
- /* @__PURE__ */ e(ne, { asChild: !0, children: s }),
304
+ /* @__PURE__ */ e(te, { asChild: !0, children: s }),
304
305
  /* @__PURE__ */ i(J, { children: [
305
306
  /* @__PURE__ */ i(S, { children: [
306
307
  /* @__PURE__ */ e(W, { children: h }),
307
308
  /* @__PURE__ */ e(F, { children: l })
308
309
  ] }),
309
310
  /* @__PURE__ */ i(B, { children: [
310
- /* @__PURE__ */ e(Q, { children: c }),
311
- /* @__PURE__ */ e(te, { onClick: d, className: t ? "bg-red-600 hover:bg-red-700" : "", children: o })
311
+ /* @__PURE__ */ e(Q, { children: d }),
312
+ /* @__PURE__ */ e(ne, { onClick: c, className: n ? "bg-red-600 hover:bg-red-700" : "", children: o })
312
313
  ] })
313
314
  ] })
314
315
  ] });
315
316
  }
316
317
  export {
317
318
  ve as A,
318
- Ve as C,
319
- Ee as F,
320
- je as a
319
+ je as C,
320
+ Ve as F,
321
+ ze as a
321
322
  };
@@ -2,10 +2,11 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import { formatNumber as h } from "@krosoft/core/helpers";
3
3
  import { useTranslation as b } from "react-i18next";
4
4
  import { c as d } from "./index-gWiv5-6R.js";
5
- import "./toggle-group-VJoGbVQm.js";
5
+ import "./toggle-group-5ImQF6h-.js";
6
6
  import { C as u, f as N, g as x, c as f } from "./card-Bn3Y7DHQ.js";
7
7
  import "./tooltip-CAu4DEhc.js";
8
- import "./select-D6_XPD6x.js";
8
+ import "./select-zzSnHs9S.js";
9
+ import "next-themes";
9
10
  import "react";
10
11
  const v = ({
11
12
  titleKey: r,
@@ -28,7 +29,7 @@ const v = ({
28
29
  /* @__PURE__ */ e("p", { className: d("text-xs text-muted-foreground", i), children: l })
29
30
  ] })
30
31
  ] });
31
- }, S = ({ stats: r }) => /* @__PURE__ */ e("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: r.map((t) => /* @__PURE__ */ e(
32
+ }, q = ({ stats: r }) => /* @__PURE__ */ e("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: r.map((t) => /* @__PURE__ */ e(
32
33
  v,
33
34
  {
34
35
  titleKey: t.titleKey,
@@ -56,7 +57,7 @@ const v = ({
56
57
  sm: "size-4",
57
58
  md: "size-5",
58
59
  lg: "size-6"
59
- }, y = (r) => r === "up" ? "↑" : r === "down" ? "↓" : "", K = (r) => r === "up" ? "text-green-600" : r === "down" ? "text-red-600" : "text-muted-foreground", q = ({ title: r, value: t, unit: n, subtitle: a, icon: c, iconSize: l = "md", trend: i, trendValue: o, color: m = "blue", children: g }) => {
60
+ }, y = (r) => r === "up" ? "↑" : r === "down" ? "↓" : "", K = (r) => r === "up" ? "text-green-600" : r === "down" ? "text-red-600" : "text-muted-foreground", A = ({ title: r, value: t, unit: n, subtitle: a, icon: c, iconSize: l = "md", trend: i, trendValue: o, color: m = "blue", children: g }) => {
60
61
  const p = c;
61
62
  return /* @__PURE__ */ e(u, { className: "relative overflow-hidden bg-card border shadow-lg hover:shadow-xl transition-all duration-300", children: /* @__PURE__ */ s(f, { className: "pt-6", children: [
62
63
  /* @__PURE__ */ s("div", { className: "flex items-start justify-between", children: [
@@ -79,6 +80,6 @@ const v = ({
79
80
  };
80
81
  export {
81
82
  v as K,
82
- q as M,
83
- S as a
83
+ A as M,
84
+ q as a
84
85
  };
@@ -1,11 +1,12 @@
1
1
  import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
2
  import * as L from "react";
3
3
  import { useState as P, useRef as j, useEffect as T, useMemo as z } from "react";
4
- import { ch as D, ci as C, cj as k, ck as q, cl as S, H as R, bp as F, br as X, c7 as E, bq as V, c8 as J, U as O, aQ as _ } from "./toggle-group-VJoGbVQm.js";
4
+ import { ci as D, cj as C, ck as k, cl as q, cm as S, H as R, bp as F, br as X, bq as V, c8 as E, U as O, aQ as _ } from "./toggle-group-5ImQF6h-.js";
5
5
  import "./card-Bn3Y7DHQ.js";
6
6
  import { c as b } from "./index-gWiv5-6R.js";
7
7
  import { B as y, C as A } from "./tooltip-CAu4DEhc.js";
8
- import { C as I } from "./select-D6_XPD6x.js";
8
+ import { X as J, C as I } from "./select-zzSnHs9S.js";
9
+ import "next-themes";
9
10
  import { c as Q } from "./index-DSyPHOLE.js";
10
11
  /**
11
12
  * @license lucide-react v1.16.0 - ISC
@@ -350,7 +351,7 @@ const Y = [
350
351
  weekStartsOn: 1,
351
352
  firstWeekContainsDate: 4
352
353
  }
353
- }, Le = ({ date: e, onDateChange: t, placeholder: s }) => {
354
+ }, De = ({ date: e, onDateChange: t, placeholder: s }) => {
354
355
  const [r, o] = P(!1), l = j(null);
355
356
  T(() => {
356
357
  if (!r) return;
@@ -386,7 +387,7 @@ const Y = [
386
387
  ),
387
388
  r ? /* @__PURE__ */ n("div", { className: "absolute left-0 top-[calc(100%+4px)] z-[100] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2", children: /* @__PURE__ */ n(R, { mode: "single", selected: e, onSelect: c }) }) : null
388
389
  ] });
389
- }, De = ({ value: e, onChange: t, placeholder: s = "Selectionner une periode", className: r }) => {
390
+ }, Ee = ({ value: e, onChange: t, placeholder: s = "Selectionner une periode", className: r }) => {
390
391
  const [o, l] = L.useState(!1), [m, c] = L.useState(e);
391
392
  L.useEffect(() => {
392
393
  o && c(e);
@@ -413,7 +414,7 @@ const Y = [
413
414
  "aria-label": "Effacer la periode selectionnee",
414
415
  className: "ml-auto h-5 w-5 opacity-50 hover:opacity-100",
415
416
  onClick: u,
416
- children: /* @__PURE__ */ n(E, { className: "size-4" })
417
+ children: /* @__PURE__ */ n(J, { className: "size-4" })
417
418
  }
418
419
  )
419
420
  ] }) }),
@@ -439,7 +440,7 @@ const Y = [
439
440
  ] })
440
441
  ] })
441
442
  ] }) });
442
- }, Ee = ({
443
+ }, Je = ({
443
444
  options: e,
444
445
  selected: t,
445
446
  onToggle: s,
@@ -505,7 +506,7 @@ const Y = [
505
506
  a.stopPropagation(), r();
506
507
  },
507
508
  className: "rounded-full p-0.5 opacity-50 transition-opacity hover:opacity-100",
508
- children: /* @__PURE__ */ n(E, { className: "h-3.5 w-3.5" })
509
+ children: /* @__PURE__ */ n(J, { className: "h-3.5 w-3.5" })
509
510
  }
510
511
  ),
511
512
  /* @__PURE__ */ n(A, { className: b("h-4 w-4 opacity-50 transition-transform", p && "rotate-180") })
@@ -515,7 +516,7 @@ const Y = [
515
516
  ),
516
517
  p ? /* @__PURE__ */ d("div", { className: "absolute left-0 right-0 top-[calc(100%+4px)] z-[100] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2", children: [
517
518
  m ? /* @__PURE__ */ n("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ d("div", { className: "relative", children: [
518
- /* @__PURE__ */ n(J, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
519
+ /* @__PURE__ */ n(E, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
519
520
  /* @__PURE__ */ n(
520
521
  "input",
521
522
  {
@@ -559,7 +560,7 @@ const Y = [
559
560
  ) })
560
561
  ] }) : null
561
562
  ] });
562
- }, Je = ({
563
+ }, Oe = ({
563
564
  options: e,
564
565
  value: t,
565
566
  onChange: s,
@@ -610,7 +611,7 @@ const Y = [
610
611
  ),
611
612
  c ? /* @__PURE__ */ d("div", { className: "absolute left-0 right-0 top-[calc(100%+4px)] z-[100] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2", children: [
612
613
  /* @__PURE__ */ n("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ d("div", { className: "relative", children: [
613
- /* @__PURE__ */ n(J, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
614
+ /* @__PURE__ */ n(E, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
614
615
  /* @__PURE__ */ n(
615
616
  "input",
616
617
  {
@@ -647,7 +648,7 @@ const Y = [
647
648
  ] })
648
649
  ] }) : null
649
650
  ] });
650
- }, Oe = ({
651
+ }, Re = ({
651
652
  searchQuery: e,
652
653
  search: t,
653
654
  placeholder: s = "Rechercher...",
@@ -660,7 +661,7 @@ const Y = [
660
661
  r(""), l !== void 0 && l();
661
662
  };
662
663
  return /* @__PURE__ */ d("div", { className: b("relative h-fit w-full md:w-64", m), children: [
663
- /* @__PURE__ */ n(J, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
664
+ /* @__PURE__ */ n(E, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
664
665
  /* @__PURE__ */ n(
665
666
  _,
666
667
  {
@@ -675,13 +676,13 @@ const Y = [
675
676
  }
676
677
  }
677
678
  ),
678
- c !== "" ? /* @__PURE__ */ n("button", { onClick: u, className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700", type: "button", children: /* @__PURE__ */ n(E, { className: "size-4" }) }) : null
679
+ c !== "" ? /* @__PURE__ */ n("button", { onClick: u, className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700", type: "button", children: /* @__PURE__ */ n(J, { className: "size-4" }) }) : null
679
680
  ] });
680
681
  };
681
682
  export {
682
- Le as D,
683
- Ee as M,
684
- Oe as S,
685
- De as a,
686
- Je as b
683
+ De as D,
684
+ Je as M,
685
+ Re as S,
686
+ Ee as a,
687
+ Oe as b
687
688
  };
@@ -1,10 +1,11 @@
1
1
  import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as k, useEffect as M, useMemo as A } from "react";
3
- import { M as O, a as $, D as z, b as _, S as j } from "./SearchInput-DpOuKSIf.js";
4
- import { c7 as C, aQ as P, bx as B, bG as I, bz as Q, bC as R, bF as V, aV as H, bB as G, bp as U, br as X, bq as J, c8 as K, U as E } from "./toggle-group-VJoGbVQm.js";
3
+ import { M as O, a as $, D as z, b as _, S as j } from "./SearchInput-DaMu6Bni.js";
4
+ import { aQ as C, bx as B, bG as I, bz as Q, bC as R, bF as V, aV as H, bB as G, bp as U, br as X, bq as J, c8 as K, U as P } from "./toggle-group-5ImQF6h-.js";
5
5
  import "./card-Bn3Y7DHQ.js";
6
6
  import { B as w, C as W } from "./tooltip-CAu4DEhc.js";
7
- import { S as Y, h as Z, i as q, a as ee, c as re } from "./select-D6_XPD6x.js";
7
+ import { X as E, S as Y, h as Z, i as q, a as ee, c as re } from "./select-zzSnHs9S.js";
8
+ import "next-themes";
8
9
  import { B as L } from "./badge-C09fRxvd.js";
9
10
  import { c as te } from "./index-gWiv5-6R.js";
10
11
  import { c as le } from "./index-DSyPHOLE.js";
@@ -53,7 +54,7 @@ function ce({ filters: s, onRemoveFilter: l, onClearAll: a, filterLabels: o = {}
53
54
  l(n, v);
54
55
  },
55
56
  className: "ml-1 hover:bg-blue-200 rounded-full p-0.5",
56
- children: /* @__PURE__ */ r(C, { className: "size-4" })
57
+ children: /* @__PURE__ */ r(E, { className: "size-4" })
57
58
  }
58
59
  )
59
60
  ]
@@ -73,7 +74,7 @@ function ce({ filters: s, onRemoveFilter: l, onClearAll: a, filterLabels: o = {}
73
74
  l(n);
74
75
  },
75
76
  className: "ml-1 hover:bg-blue-200 rounded-full p-0.5",
76
- children: /* @__PURE__ */ r(C, { className: "size-4" })
77
+ children: /* @__PURE__ */ r(E, { className: "size-4" })
77
78
  }
78
79
  )
79
80
  ] }, n);
@@ -86,7 +87,7 @@ const ne = ({ field: s, value: l, onChange: a, onToggleMultiSelect: o }) => {
86
87
  switch (s.type) {
87
88
  case "text":
88
89
  return /* @__PURE__ */ r(
89
- P,
90
+ C,
90
91
  {
91
92
  placeholder: s.placeholder,
92
93
  value: l ?? "",
@@ -97,7 +98,7 @@ const ne = ({ field: s, value: l, onChange: a, onToggleMultiSelect: o }) => {
97
98
  );
98
99
  case "number":
99
100
  return /* @__PURE__ */ r(
100
- P,
101
+ C,
101
102
  {
102
103
  type: "number",
103
104
  placeholder: s.placeholder,
@@ -265,13 +266,13 @@ function ie({
265
266
  ] }) }) : null,
266
267
  /* @__PURE__ */ p("div", { className: "flex flex-col gap-0.5 max-h-56 overflow-y-auto p-1.5", children: [
267
268
  b.length > 0 && /* @__PURE__ */ p("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
268
- /* @__PURE__ */ r(E, { checked: N, onCheckedChange: g }),
269
+ /* @__PURE__ */ r(P, { checked: N, onCheckedChange: g }),
269
270
  "Tout sélectionner"
270
271
  ] }),
271
272
  b.length === 0 && /* @__PURE__ */ r("p", { className: "px-2 py-3 text-center text-xs text-muted-foreground", children: "Aucun résultat" }),
272
273
  b.map((t) => /* @__PURE__ */ p("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
273
274
  /* @__PURE__ */ r(
274
- E,
275
+ P,
275
276
  {
276
277
  checked: a.includes(t.value),
277
278
  onCheckedChange: () => {
@@ -299,7 +300,7 @@ function ie({
299
300
  }
300
301
  );
301
302
  }
302
- function ye({
303
+ function Ne({
303
304
  searchQuery: s,
304
305
  onSearchChange: l,
305
306
  searchPlaceholder: a = "Rechercher...",
@@ -402,6 +403,6 @@ export {
402
403
  ce as A,
403
404
  ne as F,
404
405
  ie as S,
405
- ye as T,
406
+ Ne as T,
406
407
  oe as a
407
408
  };