@krosoft/react 0.0.75 → 0.0.76

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 (79) hide show
  1. package/dist/Combination-CzdDhqdB.js +564 -0
  2. package/dist/DataTable-CjFA9p4V.js +2216 -0
  3. package/dist/{DateRangePicker-BAn4LMHi.js → DateRangePicker-rrXXEYz8.js} +19 -16
  4. package/dist/LoadingState-CqRLmkxn.js +29 -0
  5. package/dist/{MetricCard-H--Bf1Ib.js → MetricCard-88djqC4o.js} +22 -20
  6. package/dist/{ThemeSelector-DQmkKmzE.js → ThemeSelector-sTd9T2OD.js} +8 -8
  7. package/dist/{Topbar-CFALRIJn.js → Topbar-BqC05zWP.js} +27 -26
  8. package/dist/{badge-C4pCH7IL.js → badge-kADcbb2Y.js} +1 -1
  9. package/dist/{calendar-cHag6u-j.js → calendar-BMReToKR.js} +771 -802
  10. package/dist/card-7XPLAra3.js +23 -0
  11. package/dist/checkbox-BI6Lm_p-.js +358 -0
  12. package/dist/chevron-down-ki5-dwtL.js +11 -0
  13. package/dist/components/core/cards/index.js +1 -1
  14. package/dist/components/core/index.d.ts +1 -0
  15. package/dist/components/core/index.d.ts.map +1 -1
  16. package/dist/components/core/index.js +25 -14
  17. package/dist/components/core/inputs/index.js +1 -1
  18. package/dist/components/core/navbar/index.js +1 -1
  19. package/dist/components/core/states/CardSkeleton.d.ts +3 -0
  20. package/dist/components/core/states/CardSkeleton.d.ts.map +1 -0
  21. package/dist/components/core/states/CardsSkeleton.d.ts +7 -0
  22. package/dist/components/core/states/CardsSkeleton.d.ts.map +1 -0
  23. package/dist/components/core/states/index.d.ts +2 -0
  24. package/dist/components/core/states/index.d.ts.map +1 -1
  25. package/dist/components/core/states/index.js +5 -3
  26. package/dist/components/core/table/DataTable.d.ts +5 -0
  27. package/dist/components/core/table/DataTable.d.ts.map +1 -0
  28. package/dist/components/core/table/TableActions.d.ts +8 -0
  29. package/dist/components/core/table/TableActions.d.ts.map +1 -0
  30. package/dist/components/core/table/TableBody.d.ts +21 -0
  31. package/dist/components/core/table/TableBody.d.ts.map +1 -0
  32. package/dist/components/core/table/TableBulkActions.d.ts +9 -0
  33. package/dist/components/core/table/TableBulkActions.d.ts.map +1 -0
  34. package/dist/components/core/table/TableHeader.d.ts +23 -0
  35. package/dist/components/core/table/TableHeader.d.ts.map +1 -0
  36. package/dist/components/core/table/TablePagination.d.ts +14 -0
  37. package/dist/components/core/table/TablePagination.d.ts.map +1 -0
  38. package/dist/components/core/table/TableSettings.d.ts +9 -0
  39. package/dist/components/core/table/TableSettings.d.ts.map +1 -0
  40. package/dist/components/core/table/index.d.ts +10 -0
  41. package/dist/components/core/table/index.d.ts.map +1 -0
  42. package/dist/components/core/table/index.js +11 -0
  43. package/dist/components/core/theme/index.js +1 -1
  44. package/dist/components/index.js +62 -48
  45. package/dist/components/ui/checkbox.d.ts +5 -0
  46. package/dist/components/ui/checkbox.d.ts.map +1 -0
  47. package/dist/components/ui/dropdown-menu.d.ts +28 -0
  48. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  49. package/dist/components/ui/index.d.ts +1 -0
  50. package/dist/components/ui/index.d.ts.map +1 -1
  51. package/dist/components/ui/index.js +33 -30
  52. package/dist/components/ui/select.d.ts +1 -1
  53. package/dist/components/ui/select.d.ts.map +1 -1
  54. package/dist/constants/datatable.d.ts +3 -0
  55. package/dist/constants/datatable.d.ts.map +1 -0
  56. package/dist/{index-BQOmHRsD.js → floating-ui.react-dom-BPCyLQfI.js} +315 -323
  57. package/dist/hooks/ui/useDataTable.d.ts +4 -0
  58. package/dist/hooks/ui/useDataTable.d.ts.map +1 -0
  59. package/dist/loader-circle-BhJXKs31.js +11 -0
  60. package/dist/select-B-hcmC3K.js +1468 -0
  61. package/dist/{tooltip-Dep8OR3c.js → tooltip-gI1Mp9DG.js} +1 -1
  62. package/dist/types/BulkAction.d.ts +8 -0
  63. package/dist/types/BulkAction.d.ts.map +1 -0
  64. package/dist/types/ColumnDef.d.ts +11 -0
  65. package/dist/types/ColumnDef.d.ts.map +1 -0
  66. package/dist/types/DataTableProps.d.ts +19 -0
  67. package/dist/types/DataTableProps.d.ts.map +1 -0
  68. package/dist/types/RowAction.d.ts +8 -0
  69. package/dist/types/RowAction.d.ts.map +1 -0
  70. package/dist/types/UseDataTableProps.d.ts +13 -0
  71. package/dist/types/UseDataTableProps.d.ts.map +1 -0
  72. package/dist/types/UseDataTableResult.d.ts +34 -0
  73. package/dist/types/UseDataTableResult.d.ts.map +1 -0
  74. package/dist/types/index.d.ts +7 -0
  75. package/dist/types/index.d.ts.map +1 -0
  76. package/dist/types/index.js +1 -0
  77. package/package.json +3 -1
  78. package/dist/LoadingState-C0uS6aGT.js +0 -19
  79. package/dist/select-Dv9bdUCB.js +0 -2023
@@ -1,12 +1,15 @@
1
1
  import { jsxs as D, jsx as u } from "react/jsx-runtime";
2
- import { o as G, p as I, q as W, r as vt, I as gt, X as Ce, C as Pt, s as Z } from "./calendar-cHag6u-j.js";
3
- import { a as Ne, u as x, d as yt, e as M, f as U, q as Ae, g as bt, h as wt, o as Et, s as Ct, l as Nt, i as At, j as Ot, k as Mt, m as xt, n as Rt, p as H, v as St, t as Tt, B as j } from "./index-BQOmHRsD.js";
2
+ import { i as G, j as I, k as W, l as vt, I as gt, X as Ce, C as Pt, m as Z } from "./calendar-BMReToKR.js";
3
+ import "./checkbox-BI6Lm_p-.js";
4
+ import { d as Ne, u as x, i as yt, f as M, j as U, h as Ae, g as bt, k as wt, o as Et, s as Ct, l as Nt, m as At, n as Ot, p as Mt, q as xt, r as Rt, a as H, e as St, v as Tt, B as j } from "./floating-ui.react-dom-BPCyLQfI.js";
5
+ import "./card-7XPLAra3.js";
4
6
  import { c as Y } from "./index-gWiv5-6R.js";
5
- import { h as _t, R as Dt, u as Ft } from "./select-Dv9bdUCB.js";
7
+ import "./select-B-hcmC3K.js";
6
8
  import { c as Oe } from "./createLucideIcon-CRdjzt2A.js";
7
9
  import * as i from "react";
8
- import * as Lt from "react-dom";
9
- import kt from "react-dom";
10
+ import * as _t from "react-dom";
11
+ import Dt from "react-dom";
12
+ import { h as Ft, R as Lt, a as kt } from "./Combination-CzdDhqdB.js";
10
13
  /**
11
14
  * @license lucide-react v1.16.0 - ISC
12
15
  *
@@ -360,7 +363,7 @@ const jt = [
360
363
  weekStartsOn: 1,
361
364
  firstWeekContainsDate: 4
362
365
  }
363
- }, vr = ({
366
+ }, yr = ({
364
367
  searchQuery: e,
365
368
  search: t,
366
369
  placeholder: n = "Rechercher...",
@@ -415,7 +418,7 @@ var gn = [
415
418
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
416
419
  }, {});
417
420
  function Pn(e, t) {
418
- e && Lt.flushSync(() => e.dispatchEvent(t));
421
+ e && _t.flushSync(() => e.dispatchEvent(t));
419
422
  }
420
423
  var yn = "DismissableLayer", ne = "dismissableLayer.update", bn = "dismissableLayer.pointerDownOutside", wn = "dismissableLayer.focusOutside", ge, Me = i.createContext({
421
424
  layers: /* @__PURE__ */ new Set(),
@@ -881,7 +884,7 @@ var Hn = ke, ze = We, $n = je, zn = He, Jn = "Portal", Je = i.forwardRef((e, t)
881
884
  const { container: n, ...r } = e, [o, a] = i.useState(!1);
882
885
  H(() => a(!0), []);
883
886
  const c = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
884
- return c ? kt.createPortal(/* @__PURE__ */ u(A.div, { ...r, ref: t }), c) : null;
887
+ return c ? Dt.createPortal(/* @__PURE__ */ u(A.div, { ...r, ref: t }), c) : null;
885
888
  });
886
889
  Je.displayName = Jn;
887
890
  function Bn(e, t) {
@@ -1028,8 +1031,8 @@ var Zn = Ne("PopoverContent.RemoveScroll"), Qn = i.forwardRef(
1028
1031
  const n = R(F, e.__scopePopover), r = i.useRef(null), o = x(t, r), a = i.useRef(!1);
1029
1032
  return i.useEffect(() => {
1030
1033
  const c = r.current;
1031
- if (c) return _t(c);
1032
- }, []), /* @__PURE__ */ u(Dt, { as: Zn, allowPinchZoom: !0, children: /* @__PURE__ */ u(
1034
+ if (c) return Ft(c);
1035
+ }, []), /* @__PURE__ */ u(Lt, { as: Zn, allowPinchZoom: !0, children: /* @__PURE__ */ u(
1033
1036
  Ze,
1034
1037
  {
1035
1038
  ...e,
@@ -1093,7 +1096,7 @@ var Zn = Ne("PopoverContent.RemoveScroll"), Qn = i.forwardRef(
1093
1096
  onInteractOutside: m,
1094
1097
  ...v
1095
1098
  } = e, h = R(F, n), f = $(n);
1096
- return Ft(), /* @__PURE__ */ u(
1099
+ return kt(), /* @__PURE__ */ u(
1097
1100
  Se,
1098
1101
  {
1099
1102
  asChild: !0,
@@ -1177,7 +1180,7 @@ const ir = or, cr = ar, nt = i.forwardRef(
1177
1180
  ) })
1178
1181
  );
1179
1182
  nt.displayName = tt.displayName;
1180
- const gr = ({ value: e, onChange: t, placeholder: n = "Selectionner une periode", className: r }) => {
1183
+ const br = ({ value: e, onChange: t, placeholder: n = "Selectionner une periode", className: r }) => {
1181
1184
  const [o, a] = i.useState(!1), [c, s] = i.useState(e);
1182
1185
  i.useEffect(() => {
1183
1186
  o && s(e);
@@ -1193,7 +1196,7 @@ const gr = ({ value: e, onChange: t, placeholder: n = "Selectionner une periode"
1193
1196
  }, h = (f) => f != null && f.from ? !f.to || f.from.getTime() === f.to.getTime() ? Z(f.from, "dd MMM yyyy", { locale: Q }) : `${Z(f.from, "dd MMM yyyy", { locale: Q })} - ${Z(f.to, "dd MMM yyyy", { locale: Q })}` : n;
1194
1197
  return /* @__PURE__ */ u("div", { className: Y("grid gap-2", r), children: /* @__PURE__ */ D(ir, { open: o, onOpenChange: a, children: [
1195
1198
  /* @__PURE__ */ u(cr, { asChild: !0, children: /* @__PURE__ */ D(j, { id: "date", variant: "outline", className: Y("w-[300px] justify-start text-left font-normal", !(e != null && e.from) && "text-muted-foreground"), children: [
1196
- /* @__PURE__ */ u(Wt, { className: "mr-2 h-4 w-4" }),
1199
+ /* @__PURE__ */ u(Wt, { className: "mr-2 size-4" }),
1197
1200
  h(e),
1198
1201
  (e == null ? void 0 : e.from) && /* @__PURE__ */ u(
1199
1202
  j,
@@ -1204,7 +1207,7 @@ const gr = ({ value: e, onChange: t, placeholder: n = "Selectionner une periode"
1204
1207
  "aria-label": "Effacer la periode selectionnee",
1205
1208
  className: "ml-auto h-5 w-5 opacity-50 hover:opacity-100",
1206
1209
  onClick: l,
1207
- children: /* @__PURE__ */ u(Ce, { className: "h-4 w-4" })
1210
+ children: /* @__PURE__ */ u(Ce, { className: "size-4" })
1208
1211
  }
1209
1212
  )
1210
1213
  ] }) }),
@@ -1232,6 +1235,6 @@ const gr = ({ value: e, onChange: t, placeholder: n = "Selectionner une periode"
1232
1235
  ] }) });
1233
1236
  };
1234
1237
  export {
1235
- gr as D,
1236
- vr as S
1238
+ br as D,
1239
+ yr as S
1237
1240
  };
@@ -0,0 +1,29 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { C as s, d, a as n } from "./card-7XPLAra3.js";
3
+ import { L as i } from "./loader-circle-BhJXKs31.js";
4
+ const l = () => /* @__PURE__ */ a(s, { className: "animate-pulse", children: [
5
+ /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e("div", { className: "h-6 bg-muted rounded w-1/4" }) }),
6
+ /* @__PURE__ */ e(n, { children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
7
+ /* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded" }),
8
+ /* @__PURE__ */ e("div", { className: "h-4 bg-muted rounded w-3/4" })
9
+ ] }) })
10
+ ] }), p = ({ count: r = 1 }) => /* @__PURE__ */ e(
11
+ "div",
12
+ {
13
+ className: "grid gap-6",
14
+ style: { gridTemplateColumns: `repeat(${r}, minmax(0, 1fr))` },
15
+ children: Array.from({ length: r }).map((m, t) => /* @__PURE__ */ e(l, {}, t))
16
+ }
17
+ ), h = ({ message: r }) => /* @__PURE__ */ a("div", { className: "p-6 border border-destructive bg-destructive/10 text-destructive rounded-md animate-fade-in", children: [
18
+ /* @__PURE__ */ e("p", { className: "font-semibold mb-2", children: "Une erreur est survenue." }),
19
+ r ? /* @__PURE__ */ e("p", { className: "text-sm opacity-80", children: r }) : null
20
+ ] }), f = ({ message: r }) => /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center p-12 text-muted-foreground animate-fade-in", children: [
21
+ /* @__PURE__ */ e(i, { className: "size-8 animate-spin mb-4 text-primary" }),
22
+ r ? /* @__PURE__ */ e("p", { className: "font-semibold text-sm", children: r }) : null
23
+ ] });
24
+ export {
25
+ l as C,
26
+ h as E,
27
+ f as L,
28
+ p as a
29
+ };
@@ -1,26 +1,28 @@
1
1
  import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { c as m, g as u, h as f, d as p } from "./calendar-cHag6u-j.js";
3
- import "./index-BQOmHRsD.js";
2
+ import "./calendar-BMReToKR.js";
3
+ import "./checkbox-BI6Lm_p-.js";
4
+ import "./floating-ui.react-dom-BPCyLQfI.js";
5
+ import { C as m, d as p, e as u, a as f } from "./card-7XPLAra3.js";
4
6
  import { c as n } from "./index-gWiv5-6R.js";
5
- import "./select-Dv9bdUCB.js";
7
+ import "./select-B-hcmC3K.js";
6
8
  import g from "react";
7
- import { formatNumber as h } from "@krosoft/core/helpers";
8
- import { useTranslation as N } from "react-i18next";
9
+ import { formatNumber as N } from "@krosoft/core/helpers";
10
+ import { useTranslation as h } from "react-i18next";
9
11
  const b = ({ titleKey: t, value: e, valueClassName: i, icon: d, iconClassName: s, description: l, descriptionClassName: c, onClick: a }) => {
10
- const { t: x } = N();
12
+ const { t: x } = h();
11
13
  return /* @__PURE__ */ o(m, { className: n(a ? "hover:border-primary cursor-pointer" : ""), onClick: a, children: [
12
- /* @__PURE__ */ o(u, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
13
- /* @__PURE__ */ r(f, { className: "text-sm font-medium", children: x(t) }),
14
+ /* @__PURE__ */ o(p, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
15
+ /* @__PURE__ */ r(u, { className: "text-sm font-medium", children: x(t) }),
14
16
  g.createElement(d, {
15
17
  className: n("size-6 text-muted-foreground", s)
16
18
  })
17
19
  ] }),
18
- /* @__PURE__ */ o(p, { children: [
19
- /* @__PURE__ */ r("div", { className: n("text-2xl font-bold", i), children: h(e) }),
20
+ /* @__PURE__ */ o(f, { children: [
21
+ /* @__PURE__ */ r("div", { className: n("text-2xl font-bold", i), children: N(e) }),
20
22
  /* @__PURE__ */ r("p", { className: n("text-xs text-muted-foreground", c), children: l })
21
23
  ] })
22
24
  ] });
23
- }, $ = ({ stats: t }) => /* @__PURE__ */ r("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: t.map((e) => /* @__PURE__ */ r(
25
+ }, F = ({ stats: t }) => /* @__PURE__ */ r("div", { className: "grid gap-6 md:grid-cols-2 lg:grid-cols-4", children: t.map((e) => /* @__PURE__ */ r(
24
26
  b,
25
27
  {
26
28
  titleKey: e.titleKey,
@@ -33,25 +35,25 @@ const b = ({ titleKey: t, value: e, valueClassName: i, icon: d, iconClassName: s
33
35
  onClick: e.onClick
34
36
  },
35
37
  e.titleKey
36
- )) }), v = {
38
+ )) }), C = {
37
39
  blue: "from-blue-500 to-cyan-500",
38
40
  green: "from-green-500 to-emerald-500",
39
41
  orange: "from-orange-500 to-yellow-500",
40
42
  red: "from-red-500 to-pink-500",
41
43
  purple: "from-purple-500 to-indigo-500"
42
- }, C = (t) => t === "up" ? "↗" : t === "down" ? "↘" : "→", w = (t) => t === "up" ? "text-green-600" : t === "down" ? "text-red-600" : "text-muted-foreground", E = ({ title: t, value: e, unit: i, icon: d, trend: s, trendValue: l, color: c = "blue", children: a }) => /* @__PURE__ */ o(m, { className: "relative overflow-hidden bg-card border shadow-lg hover:shadow-xl transition-all duration-300", children: [
44
+ }, v = (t) => t === "up" ? "↗" : t === "down" ? "↘" : "→", w = (t) => t === "up" ? "text-green-600" : t === "down" ? "text-red-600" : "text-muted-foreground", H = ({ title: t, value: e, unit: i, icon: d, trend: s, trendValue: l, color: c = "blue", children: a }) => /* @__PURE__ */ o(m, { className: "relative overflow-hidden bg-card border shadow-lg hover:shadow-xl transition-all duration-300", children: [
43
45
  /* @__PURE__ */ r("div", { className: "absolute inset-0 bg-white/5" }),
44
- /* @__PURE__ */ o(u, { className: "flex flex-row items-center justify-between space-y-0 pb-2 relative z-10", children: [
45
- /* @__PURE__ */ r(f, { className: "text-sm font-medium text-muted-foreground", children: t }),
46
- /* @__PURE__ */ r("div", { className: `p-2 rounded-lg bg-gradient-to-br ${v[c]} shadow-lg`, children: /* @__PURE__ */ r(d, { className: "h-4 w-4 text-white" }) })
46
+ /* @__PURE__ */ o(p, { className: "flex flex-row items-center justify-between space-y-0 pb-2 relative z-10", children: [
47
+ /* @__PURE__ */ r(u, { className: "text-sm font-medium text-muted-foreground", children: t }),
48
+ /* @__PURE__ */ r("div", { className: `p-2 rounded-lg bg-gradient-to-br ${C[c]} shadow-lg`, children: /* @__PURE__ */ r(d, { className: "size-4 text-white" }) })
47
49
  ] }),
48
- /* @__PURE__ */ o(p, { className: "relative z-10", children: [
50
+ /* @__PURE__ */ o(f, { className: "relative z-10", children: [
49
51
  /* @__PURE__ */ o("div", { className: "flex items-baseline space-x-2", children: [
50
52
  /* @__PURE__ */ r("div", { className: "text-2xl font-bold text-card-foreground", children: typeof e == "number" ? e.toFixed(1) : e }),
51
53
  i && /* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground font-medium", children: i })
52
54
  ] }),
53
55
  s && l && /* @__PURE__ */ o("div", { className: `flex items-center space-x-1 mt-2 text-xs ${w(s)}`, children: [
54
- /* @__PURE__ */ r("span", { children: C(s) }),
56
+ /* @__PURE__ */ r("span", { children: v(s) }),
55
57
  /* @__PURE__ */ r("span", { children: l })
56
58
  ] }),
57
59
  a && /* @__PURE__ */ r("div", { className: "mt-4", children: a })
@@ -59,6 +61,6 @@ const b = ({ titleKey: t, value: e, valueClassName: i, icon: d, iconClassName: s
59
61
  ] });
60
62
  export {
61
63
  b as K,
62
- E as M,
63
- $ as a
64
+ H as M,
65
+ F as a
64
66
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
- import { B as m } from "./index-BQOmHRsD.js";
3
- import { S as h, f as u, g, a as f, c as v } from "./select-Dv9bdUCB.js";
4
- import { T as b, a as N, b as S, c as x } from "./tooltip-Dep8OR3c.js";
2
+ import { B as m } from "./floating-ui.react-dom-BPCyLQfI.js";
3
+ import { S as h, f as u, g, a as f, c as v } from "./select-B-hcmC3K.js";
4
+ import { T as b, a as N, b as S, c as x } from "./tooltip-gI1Mp9DG.js";
5
5
  import { u as C } from "./useTheme-D__o7mLN.js";
6
6
  function j({ themeOptions: c, variant: t = "select" }) {
7
- const { theme: n, handleThemeChange: o, currentThemeOption: e, nextThemeOption: r, cycleTheme: i } = C(c);
7
+ const { theme: i, handleThemeChange: n, currentThemeOption: e, nextThemeOption: r, cycleTheme: o } = C(c);
8
8
  if (t === "mini") {
9
9
  const l = e == null ? void 0 : e.icon;
10
10
  return /* @__PURE__ */ a(b, { children: /* @__PURE__ */ s(N, { children: [
@@ -13,10 +13,10 @@ function j({ themeOptions: c, variant: t = "select" }) {
13
13
  {
14
14
  variant: "ghost",
15
15
  size: "icon",
16
- onClick: i,
16
+ onClick: o,
17
17
  className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
18
18
  children: [
19
- l && /* @__PURE__ */ a(l, { className: "h-4 w-4" }),
19
+ l && /* @__PURE__ */ a(l, { className: "size-4" }),
20
20
  /* @__PURE__ */ s("span", { className: "sr-only", children: [
21
21
  "Thème actuel : ",
22
22
  e == null ? void 0 : e.label
@@ -31,12 +31,12 @@ function j({ themeOptions: c, variant: t = "select" }) {
31
31
  ] }) });
32
32
  }
33
33
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
34
- /* @__PURE__ */ s(h, { value: n, onValueChange: o, children: [
34
+ /* @__PURE__ */ s(h, { value: i, onValueChange: n, children: [
35
35
  /* @__PURE__ */ a(u, { className: "w-full", children: /* @__PURE__ */ a(g, { placeholder: "Sélectionner un thème" }) }),
36
36
  /* @__PURE__ */ a(f, { children: c.map((l) => {
37
37
  const d = l.icon;
38
38
  return /* @__PURE__ */ a(v, { value: l.value, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
39
- /* @__PURE__ */ a(d, { className: "h-4 w-4" }),
39
+ /* @__PURE__ */ a(d, { className: "size-4" }),
40
40
  l.label
41
41
  ] }) }, l.value);
42
42
  }) })
@@ -1,8 +1,9 @@
1
- import { jsxs as i, jsx as e, Fragment as y } from "react/jsx-runtime";
2
- import { a as k, b as C, c as j, T } from "./tooltip-Dep8OR3c.js";
1
+ import { jsxs as a, jsx as e, Fragment as y } from "react/jsx-runtime";
2
+ import { a as k, b as C, c as j, T } from "./tooltip-gI1Mp9DG.js";
3
3
  import { c as l } from "./index-gWiv5-6R.js";
4
4
  import * as z from "react";
5
- import { C as S, B as D } from "./index-BQOmHRsD.js";
5
+ import { C as S } from "./chevron-down-ki5-dwtL.js";
6
+ import { B as D } from "./floating-ui.react-dom-BPCyLQfI.js";
6
7
  import { c as W } from "./createLucideIcon-CRdjzt2A.js";
7
8
  /**
8
9
  * @license lucide-react v1.16.0 - ISC
@@ -20,17 +21,17 @@ const $ = [
20
21
  icon: n,
21
22
  label: h,
22
23
  badge: d,
23
- subItems: a,
24
+ subItems: i,
24
25
  currentPath: s,
25
26
  collapsed: o,
26
27
  onItemClick: m
27
28
  }) => {
28
- const [f, x] = z.useState((a == null ? void 0 : a.some((r) => s === r.path || s.startsWith(`${r.path}/`))) || !1), p = t ? s === t || t !== "/" && s.startsWith(`${t}/`) : !1, b = a == null ? void 0 : a.some((r) => s === r.path || s.startsWith(`${r.path}/`)), g = /* @__PURE__ */ i(
29
+ const [f, x] = z.useState((i == null ? void 0 : i.some((r) => s === r.path || s.startsWith(`${r.path}/`))) || !1), p = t ? s === t || t !== "/" && s.startsWith(`${t}/`) : !1, b = i == null ? void 0 : i.some((r) => s === r.path || s.startsWith(`${r.path}/`)), g = /* @__PURE__ */ a(
29
30
  "a",
30
31
  {
31
32
  href: t || "#",
32
33
  onClick: (r) => {
33
- r.preventDefault(), a && a.length > 0 ? o || x(!f) : t && m(t);
34
+ r.preventDefault(), i && i.length > 0 ? o || x(!f) : t && m(t);
34
35
  },
35
36
  className: l(
36
37
  "flex items-center gap-3 rounded-2xl cursor-pointer mb-2 transition-all duration-200 group",
@@ -39,16 +40,16 @@ const $ = [
39
40
  ),
40
41
  children: [
41
42
  /* @__PURE__ */ e("div", { className: l("flex-shrink-0 transition-transform group-hover:scale-110", o ? "flex items-center justify-center" : ""), children: /* @__PURE__ */ e(n, { className: "size-4" }) }),
42
- !o && /* @__PURE__ */ i(y, { children: [
43
+ !o && /* @__PURE__ */ a(y, { children: [
43
44
  /* @__PURE__ */ e("span", { className: "flex-grow transition-opacity duration-150 font-medium", children: h }),
44
45
  d !== void 0 && /* @__PURE__ */ e("span", { className: "bg-red-500 text-white text-xs rounded-full py-1 min-w-[20px] text-center px-2 font-semibold", children: d }),
45
- a && a.length > 0 && /* @__PURE__ */ e(S, { className: l("size-4 transition-transform duration-200", f ? "rotate-180" : "") })
46
+ i && i.length > 0 && /* @__PURE__ */ e(S, { className: l("size-4 transition-transform duration-200", f ? "rotate-180" : "") })
46
47
  ] })
47
48
  ]
48
49
  }
49
50
  );
50
- return /* @__PURE__ */ i(y, { children: [
51
- o ? /* @__PURE__ */ i(k, { children: [
51
+ return /* @__PURE__ */ a(y, { children: [
52
+ o ? /* @__PURE__ */ a(k, { children: [
52
53
  /* @__PURE__ */ e(C, { asChild: !0, children: g }),
53
54
  /* @__PURE__ */ e(
54
55
  j,
@@ -56,9 +57,9 @@ const $ = [
56
57
  side: "right",
57
58
  sideOffset: 6,
58
59
  className: "rounded-xl z-[99999] flex gap-2 bg-sidebar text-sidebar-foreground border border-sidebar-border py-2 text-sm shadow-lg",
59
- children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
60
+ children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
60
61
  /* @__PURE__ */ e("p", { className: "font-semibold", children: h }),
61
- d !== void 0 && /* @__PURE__ */ i("span", { className: "ml-1 text-xs", children: [
62
+ d !== void 0 && /* @__PURE__ */ a("span", { className: "ml-1 text-xs", children: [
62
63
  "(",
63
64
  d,
64
65
  ")"
@@ -67,9 +68,9 @@ const $ = [
67
68
  }
68
69
  )
69
70
  ] }) : g,
70
- !o && a && a.length > 0 && f && /* @__PURE__ */ e("div", { className: "flex flex-col gap-1 mb-2 ml-4 pl-4 border-l-2 border-sidebar-border/50 animate-in slide-in-from-top-2 fade-in duration-200", children: a.map((r, v) => {
71
+ !o && i && i.length > 0 && f && /* @__PURE__ */ e("div", { className: "flex flex-col gap-1 mb-2 ml-4 pl-4 border-l-2 border-sidebar-border/50 animate-in slide-in-from-top-2 fade-in duration-200", children: i.map((r, v) => {
71
72
  const u = s === r.path || r.path !== "/" && s.startsWith(`${r.path}/`);
72
- return /* @__PURE__ */ i(
73
+ return /* @__PURE__ */ a(
73
74
  "a",
74
75
  {
75
76
  href: r.path,
@@ -89,12 +90,12 @@ const $ = [
89
90
  );
90
91
  }) })
91
92
  ] });
92
- }, R = ({
93
+ }, q = ({
93
94
  groups: t,
94
95
  collapsed: n,
95
96
  mobileOpen: h,
96
97
  isMobile: d,
97
- onMobileClose: a,
98
+ onMobileClose: i,
98
99
  onItemClick: s,
99
100
  currentPath: o,
100
101
  appName: m = "appname",
@@ -104,9 +105,9 @@ const $ = [
104
105
  footerNode: b
105
106
  }) => {
106
107
  const N = (c) => {
107
- s(c), d && a();
108
+ s(c), d && i();
108
109
  };
109
- return /* @__PURE__ */ e(T, { delayDuration: 0, children: /* @__PURE__ */ i(
110
+ return /* @__PURE__ */ e(T, { delayDuration: 0, children: /* @__PURE__ */ a(
110
111
  "aside",
111
112
  {
112
113
  className: l(
@@ -119,14 +120,14 @@ const $ = [
119
120
  "--navbar-width-icon": "5rem"
120
121
  },
121
122
  children: [
122
- p || /* @__PURE__ */ i("div", { className: l("flex items-center h-16 md:h-20 flex-shrink-0 gap-3 px-4", n ? "justify-center" : ""), children: [
123
+ p || /* @__PURE__ */ a("div", { className: l("flex items-center h-16 md:h-20 flex-shrink-0 gap-3 px-4", n ? "justify-center" : ""), children: [
123
124
  x !== void 0 && /* @__PURE__ */ e("div", { className: "flex-shrink-0 text-sidebar-foreground", children: /* @__PURE__ */ e(x, { className: "size-6" }) }),
124
- !n && /* @__PURE__ */ i("div", { className: "flex flex-col", children: [
125
+ !n && /* @__PURE__ */ a("div", { className: "flex flex-col", children: [
125
126
  /* @__PURE__ */ e("h1", { className: "font-bold text-lg text-sidebar-foreground leading-tight", children: m }),
126
127
  /* @__PURE__ */ e("span", { className: "text-xs text-sidebar-muted font-medium", children: f })
127
128
  ] })
128
129
  ] }),
129
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto py-4 px-2 scrollbar-modern", children: t.map((c, g) => /* @__PURE__ */ i("div", { className: "mb-6", children: [
130
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto py-4 px-2 scrollbar-modern", children: t.map((c, g) => /* @__PURE__ */ a("div", { className: "mb-6", children: [
130
131
  !n && c.title !== void 0 && c.title !== "" && /* @__PURE__ */ e("h3", { className: "px-4 mb-2 text-xs uppercase tracking-wider font-semibold text-sidebar-muted", children: c.title }),
131
132
  /* @__PURE__ */ e("nav", { className: "flex flex-col gap-1", children: c.items.map((r, v) => /* @__PURE__ */ e(O, { ...r, currentPath: o, collapsed: n, onItemClick: N }, v)) })
132
133
  ] }, g)) }),
@@ -134,7 +135,7 @@ const $ = [
134
135
  ]
135
136
  }
136
137
  ) });
137
- }, q = ({ collapsed: t, isMobile: n, onToggleSidebar: h, actionsNode: d, userMenuNode: a }) => /* @__PURE__ */ i(
138
+ }, E = ({ collapsed: t, isMobile: n, onToggleSidebar: h, actionsNode: d, userMenuNode: i }) => /* @__PURE__ */ a(
138
139
  "header",
139
140
  {
140
141
  className: l(
@@ -155,14 +156,14 @@ const $ = [
155
156
  children: /* @__PURE__ */ e(A, { className: "size-4" })
156
157
  }
157
158
  ) }),
158
- /* @__PURE__ */ i("div", { className: "flex items-center gap-2 md:gap-4 flex-shrink-0", children: [
159
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2 md:gap-4 flex-shrink-0", children: [
159
160
  d,
160
- a
161
+ i
161
162
  ] })
162
163
  ]
163
164
  }
164
165
  );
165
166
  export {
166
- R as S,
167
- q as T
167
+ q as S,
168
+ E as T
168
169
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { c as n } from "./index-BQOmHRsD.js";
2
+ import { c as n } from "./floating-ui.react-dom-BPCyLQfI.js";
3
3
  import { c as a } from "./index-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",