@krosoft/react 0.0.124 → 0.0.126

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 (62) hide show
  1. package/dist/{AppActions-po4LjUcM.js → AppActions-BbAnhStS.js} +22 -18
  2. package/dist/{AppSubTitle-CWrsJYFJ.js → AppSubTitle-lg3d5NWc.js} +1 -1
  3. package/dist/{AppTitle-CDxWr_0y.js → AppTitle-uboDuil4.js} +1 -1
  4. package/dist/{AppVerticalTabs-CdqoObXx.js → AppVerticalTabs-CBijkDF_.js} +33 -49
  5. package/dist/ConfirmationDialog-Co5yl0yA.js +184 -0
  6. package/dist/{DataTable-CrJoeR_0.js → DataTable-DSIgTHZS.js} +174 -218
  7. package/dist/ErrorAlert-DH1onuyt.js +17 -0
  8. package/dist/GenericForm-QoeireeW.js +339 -0
  9. package/dist/ImageInput-DLTYJMwr.js +65 -0
  10. package/dist/KpiCardsLayout-C3LmSeL1.js +22 -0
  11. package/dist/{LoadingState-PhGi7HXH.js → LoadingState-BN0YaPSs.js} +3 -3
  12. package/dist/{MetricCard-C-ewNR_i.js → MetricCard-CPw-fiNS.js} +6 -6
  13. package/dist/{MultiSelect-BoisW4Kn.js → MultiSelect-CX051kfk.js} +32 -27
  14. package/dist/SearchInput-D6LmcOjp.js +249 -0
  15. package/dist/SkeletonCards-BIEnyOuZ.js +62 -0
  16. package/dist/{TableFilter-CLjQU36k.js → TableFilter-Wh_Womy4.js} +114 -123
  17. package/dist/{ThemeSelector--w3R6Ff3.js → ThemeSelector-Qv8QBlYq.js} +2 -2
  18. package/dist/{Topbar-DFu_OdSs.js → Topbar-DVww-tU8.js} +49 -59
  19. package/dist/{alert-B34E_4uH.js → alert-B78CiTYe.js} +2 -2
  20. package/dist/components/core/cards/index.js +2 -2
  21. package/dist/components/core/dialogs/index.js +2 -2
  22. package/dist/components/core/filters/index.js +1 -1
  23. package/dist/components/core/forms/index.js +1 -1
  24. package/dist/components/core/index.js +19 -19
  25. package/dist/components/core/inputs/index.js +3 -3
  26. package/dist/components/core/layouts/index.js +4 -4
  27. package/dist/components/core/navbar/index.js +1 -1
  28. package/dist/components/core/states/index.js +2 -2
  29. package/dist/components/core/table/index.js +1 -1
  30. package/dist/components/core/tabs/index.js +1 -1
  31. package/dist/components/core/theme/index.js +1 -1
  32. package/dist/components/index.js +270 -270
  33. package/dist/components/ui/index.js +213 -213
  34. package/dist/helpers/index.js +1 -1
  35. package/dist/hooks/behavior/index.js +1 -1
  36. package/dist/hooks/index.js +1 -1
  37. package/dist/select-MWzbMBAS.js +106 -0
  38. package/dist/tailwind.helper-B6yFEsav.js +8 -0
  39. package/dist/toaster-DTC8Duvh.js +75 -0
  40. package/dist/toggle-group-CSdAiS44.js +1694 -0
  41. package/dist/tooltip-BWyFpIxo.js +56 -0
  42. package/dist/useConfirmDeleteDialog-CiBQmRxg.js +65 -0
  43. package/package.json +4 -4
  44. package/dist/ConfirmationDialog-CkMyyh_3.js +0 -221
  45. package/dist/ErrorAlert-C6BbHHRZ.js +0 -33
  46. package/dist/GenericForm-CmwqEXiQ.js +0 -11410
  47. package/dist/ImageInput-C8HcxE8t.js +0 -82
  48. package/dist/KpiCardsLayout-CETMpB7A.js +0 -15
  49. package/dist/SearchInput-DJ_F3emq.js +0 -586
  50. package/dist/SkeletonCards-C5lXTSrB.js +0 -57
  51. package/dist/badge-CfWlt79h.js +0 -26
  52. package/dist/createLucideIcon-MP_wDWjs.js +0 -116
  53. package/dist/ellipsis-vertical-kB5yFb-i.js +0 -15
  54. package/dist/grip-vertical-DGywJXzS.js +0 -18
  55. package/dist/index-Be16PP7H.js +0 -34
  56. package/dist/loader-circle-CKy7u7JW.js +0 -11
  57. package/dist/select-DlQvLtI3.js +0 -1763
  58. package/dist/tailwind.helper-gWiv5-6R.js +0 -2278
  59. package/dist/toaster-CKoOjjKr.js +0 -134
  60. package/dist/toggle-group-wIgXZYDq.js +0 -29086
  61. package/dist/tooltip-YhBPXbcJ.js +0 -2477
  62. package/dist/useConfirmDeleteDialog-BOb3XFpz.js +0 -75
@@ -1,66 +1,22 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { u as se } from "./useDataTable-CxcA5S-s.js";
3
- import { ax as I, aL as $, az as B, aB as ne, _ as L, cr as ie, cs as de, ay as le } from "./toggle-group-wIgXZYDq.js";
4
- import "./alert-B34E_4uH.js";
5
- import { B as w } from "./tooltip-YhBPXbcJ.js";
6
- import "./select-DlQvLtI3.js";
2
+ import { u as ae } from "./useDataTable-CxcA5S-s.js";
3
+ import { ay as A, aM as P, aA as B, aC as ne, $, az as se } from "./toggle-group-CSdAiS44.js";
4
+ import "./alert-B78CiTYe.js";
5
+ import "@radix-ui/react-aspect-ratio";
6
+ import { B as C } from "./tooltip-BWyFpIxo.js";
7
+ import "@radix-ui/react-collapsible";
8
+ import { MoreVerticalIcon as ie, Loader2Icon as le, GripVerticalIcon as de, ArrowUpIcon as oe, ArrowDownIcon as ce, ArrowUpDownIcon as me, ChevronLeftIcon as he, ChevronRightIcon as ge, SettingsIcon as ue } from "lucide-react";
9
+ import "react-resizable-panels";
10
+ import "clsx";
11
+ import "tailwind-merge";
12
+ import "./select-MWzbMBAS.js";
7
13
  import "next-themes";
14
+ import "sonner";
8
15
  import "react";
9
- import { E as oe } from "./ellipsis-vertical-kB5yFb-i.js";
10
- import { L as ce } from "./loader-circle-CKy7u7JW.js";
11
- import { G as he } from "./grip-vertical-DGywJXzS.js";
12
- import { c as j } from "./createLucideIcon-MP_wDWjs.js";
13
- /**
14
- * @license lucide-react v1.17.0 - ISC
15
- *
16
- * This source code is licensed under the ISC license.
17
- * See the LICENSE file in the root directory of this source tree.
18
- */
19
- const me = [
20
- ["path", { d: "M12 5v14", key: "s699le" }],
21
- ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
22
- ], ge = j("arrow-down", me);
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 ue = [
30
- ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
31
- ["path", { d: "M17 20V4", key: "1ejh1v" }],
32
- ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
33
- ["path", { d: "M7 4v16", key: "1glfcx" }]
34
- ], pe = j("arrow-up-down", ue);
35
- /**
36
- * @license lucide-react v1.17.0 - ISC
37
- *
38
- * This source code is licensed under the ISC license.
39
- * See the LICENSE file in the root directory of this source tree.
40
- */
41
- const xe = [
42
- ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
43
- ["path", { d: "M12 19V5", key: "x0mq9r" }]
44
- ], fe = j("arrow-up", xe);
45
- /**
46
- * @license lucide-react v1.17.0 - ISC
47
- *
48
- * This source code is licensed under the ISC license.
49
- * See the LICENSE file in the root directory of this source tree.
50
- */
51
- const ye = [
52
- [
53
- "path",
54
- {
55
- d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
56
- key: "1i5ecw"
57
- }
58
- ],
59
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
60
- ], ve = j("settings", ye), P = [5, 10, 30, 50, 100], be = P[1];
61
- function Ne({ actions: d, row: s }) {
62
- return /* @__PURE__ */ r(I, { children: [
63
- /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "ghost", size: "icon", className: "h-7 w-7 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ e(oe, { className: "size-3.5" }) }) }),
16
+ const L = [5, 10, 30, 50, 100], pe = L[1];
17
+ function xe({ actions: l, row: n }) {
18
+ return /* @__PURE__ */ r(A, { children: [
19
+ /* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ e(C, { variant: "ghost", size: "icon", className: "h-7 w-7 text-muted-foreground hover:text-foreground", children: /* @__PURE__ */ e(ie, { className: "size-3.5" }) }) }),
64
20
  /* @__PURE__ */ e(
65
21
  B,
66
22
  {
@@ -68,13 +24,13 @@ function Ne({ actions: d, row: s }) {
68
24
  onClick: (t) => {
69
25
  t.stopPropagation();
70
26
  },
71
- children: d.map((t, a) => {
27
+ children: l.map((t, a) => {
72
28
  const c = t.icon;
73
29
  return /* @__PURE__ */ r(
74
30
  ne,
75
31
  {
76
32
  onClick: () => {
77
- t.onClick(s);
33
+ t.onClick(n);
78
34
  },
79
35
  className: t.className,
80
36
  children: [
@@ -89,40 +45,40 @@ function Ne({ actions: d, row: s }) {
89
45
  )
90
46
  ] });
91
47
  }
92
- function ke({
93
- isLoading: d,
94
- colSpanCount: s,
48
+ function fe({
49
+ isLoading: l,
50
+ colSpanCount: n,
95
51
  noDataMessage: t,
96
52
  paginatedData: a,
97
53
  getRowId: c,
98
- onRowClick: n,
54
+ onRowClick: s,
99
55
  hasBulkActions: p,
100
56
  selectedRows: f,
101
- toggleRowSelection: m,
57
+ toggleRowSelection: h,
102
58
  visibleColumnsArray: o,
103
- columnWidths: b,
104
- hasActions: C,
59
+ columnWidths: v,
60
+ hasActions: w,
105
61
  actions: y,
106
62
  columns: z,
107
63
  bordered: N = !1
108
64
  }) {
109
- const D = (h, g) => {
110
- const i = z.find((v) => v.key === g);
65
+ const D = (m, g) => {
66
+ const i = z.find((b) => b.key === g);
111
67
  if ((i == null ? void 0 : i.renderCell) !== void 0)
112
- return i.renderCell(h);
113
- const x = h[g];
68
+ return i.renderCell(m);
69
+ const x = m[g];
114
70
  return /* @__PURE__ */ e("span", { className: "text-sm truncate", children: x != null ? String(x) : "-" });
115
71
  };
116
- return d ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: s, className: "py-8 text-center", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center gap-2 text-muted-foreground", children: [
117
- /* @__PURE__ */ e(ce, { className: "h-6 w-6 animate-spin text-primary" }),
72
+ return l ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: n, className: "py-8 text-center", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center gap-2 text-muted-foreground", children: [
73
+ /* @__PURE__ */ e(le, { className: "h-6 w-6 animate-spin text-primary" }),
118
74
  /* @__PURE__ */ e("span", { className: "text-sm", children: "Chargement..." })
119
- ] }) }) }) }) : a.length === 0 ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: s, className: "py-8 text-center text-sm text-muted-foreground", children: t }) }) }) : /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: a.map((h) => {
120
- const g = c(h);
75
+ ] }) }) }) }) : a.length === 0 ? /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: n, className: "py-8 text-center text-sm text-muted-foreground", children: t }) }) }) : /* @__PURE__ */ e("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-800", children: a.map((m) => {
76
+ const g = c(m);
121
77
  return /* @__PURE__ */ r(
122
78
  "tr",
123
79
  {
124
- className: `group hover:bg-muted/50 dark:hover:bg-gray-900/50 transition-colors ${n !== void 0 ? "cursor-pointer" : ""}`,
125
- onClick: () => n == null ? void 0 : n(h),
80
+ className: `group hover:bg-muted/50 dark:hover:bg-gray-900/50 transition-colors ${s !== void 0 ? "cursor-pointer" : ""}`,
81
+ onClick: () => s == null ? void 0 : s(m),
126
82
  children: [
127
83
  p ? /* @__PURE__ */ e(
128
84
  "td",
@@ -133,29 +89,29 @@ function ke({
133
89
  i.stopPropagation();
134
90
  },
135
91
  children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(
136
- L,
92
+ $,
137
93
  {
138
94
  checked: f.includes(g),
139
95
  onCheckedChange: () => {
140
- m(g);
96
+ h(g);
141
97
  }
142
98
  }
143
99
  ) })
144
100
  }
145
101
  ) : null,
146
102
  o.map((i, x) => {
147
- const v = x === o.length - 1;
103
+ const b = x === o.length - 1;
148
104
  return /* @__PURE__ */ e(
149
105
  "td",
150
106
  {
151
- className: `px-2 py-2 relative ${N && !v ? "border-r border-gray-100 dark:border-gray-800" : ""}`,
152
- style: { width: b[i.key] },
153
- children: /* @__PURE__ */ e("div", { className: "w-full h-full", children: D(h, i.key) })
107
+ className: `px-2 py-2 relative ${N && !b ? "border-r border-gray-100 dark:border-gray-800" : ""}`,
108
+ style: { width: v[i.key] },
109
+ children: /* @__PURE__ */ e("div", { className: "w-full h-full", children: D(m, i.key) })
154
110
  },
155
111
  i.key
156
112
  );
157
113
  }),
158
- C ? /* @__PURE__ */ e(
114
+ w ? /* @__PURE__ */ e(
159
115
  "td",
160
116
  {
161
117
  className: "p-1 text-center align-middle",
@@ -163,7 +119,7 @@ function ke({
163
119
  onClick: (i) => {
164
120
  i.stopPropagation();
165
121
  },
166
- children: y !== void 0 && y.length > 0 ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(Ne, { actions: y, row: h }) }) : null
122
+ children: y !== void 0 && y.length > 0 ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(xe, { actions: y, row: m }) }) : null
167
123
  }
168
124
  ) : null
169
125
  ]
@@ -172,28 +128,28 @@ function ke({
172
128
  );
173
129
  }) });
174
130
  }
175
- function we({ selectedRows: d, setSelectedRows: s, bulkActions: t }) {
131
+ function ye({ selectedRows: l, setSelectedRows: n, bulkActions: t }) {
176
132
  return /* @__PURE__ */ r("div", { className: "bg-muted/60 dark:bg-gray-900/60 border border-border px-3 py-1.5 flex items-center justify-between rounded-lg", children: [
177
133
  /* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: [
178
134
  /* @__PURE__ */ r("span", { className: "text-sm font-medium text-primary ml-1", children: [
179
- d.length,
135
+ l.length,
180
136
  " sélectionné(s)"
181
137
  ] }),
182
138
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: t.map((a, c) => {
183
- const n = a.icon;
139
+ const s = a.icon;
184
140
  return /* @__PURE__ */ r(
185
- w,
141
+ C,
186
142
  {
187
143
  variant: "outline",
188
144
  size: "sm",
189
145
  onClick: () => {
190
- a.onClick(d, () => {
191
- s([]);
146
+ a.onClick(l, () => {
147
+ n([]);
192
148
  });
193
149
  },
194
150
  className: `h-7 bg-background shadow-sm text-xs px-2.5 ${a.variant === "destructive" ? "text-destructive border-destructive/30 hover:bg-destructive/10 hover:text-destructive" : "text-foreground"}`,
195
151
  children: [
196
- n !== void 0 && /* @__PURE__ */ e("span", { className: "mr-1.5 flex items-center justify-center", children: /* @__PURE__ */ e(n, { className: "h-3.5 w-3.5" }) }),
152
+ s !== void 0 && /* @__PURE__ */ e("span", { className: "mr-1.5 flex items-center justify-center", children: /* @__PURE__ */ e(s, { className: "h-3.5 w-3.5" }) }),
197
153
  a.label
198
154
  ]
199
155
  },
@@ -202,12 +158,12 @@ function we({ selectedRows: d, setSelectedRows: s, bulkActions: t }) {
202
158
  }) })
203
159
  ] }),
204
160
  /* @__PURE__ */ e(
205
- w,
161
+ C,
206
162
  {
207
163
  variant: "ghost",
208
164
  size: "sm",
209
165
  onClick: () => {
210
- s([]);
166
+ n([]);
211
167
  },
212
168
  className: "text-xs text-muted-foreground hover:text-foreground h-7 px-2",
213
169
  children: "Désélectionner"
@@ -215,30 +171,30 @@ function we({ selectedRows: d, setSelectedRows: s, bulkActions: t }) {
215
171
  )
216
172
  ] });
217
173
  }
218
- function Ce({
219
- hasBulkActions: d,
220
- selectedRows: s,
174
+ function be({
175
+ hasBulkActions: l,
176
+ selectedRows: n,
221
177
  totalItems: t,
222
178
  toggleSelectAll: a,
223
179
  visibleColumnsArray: c,
224
- draggableColumns: n,
180
+ draggableColumns: s,
225
181
  resizableColumns: p,
226
182
  columnWidths: f,
227
- sortColumn: m,
183
+ sortColumn: h,
228
184
  sortDirection: o,
229
- handleSort: b,
230
- handleDragStart: C,
185
+ handleSort: v,
186
+ handleDragStart: w,
231
187
  handleDragOver: y,
232
188
  handleDrop: z,
233
189
  handleMouseDown: N,
234
190
  hasActions: D,
235
- settingsNode: h,
191
+ settingsNode: m,
236
192
  bordered: g = !1
237
193
  }) {
238
194
  let i = !1;
239
- s.length === t && t > 0 ? i = !0 : s.length > 0 && (i = "indeterminate");
240
- const x = (l) => l.sortable !== !0 ? null : m === l.key ? o === "asc" ? /* @__PURE__ */ e(fe, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(ge, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(pe, { className: "size-3.5 text-muted-foreground/50 group-hover:text-muted-foreground transition-colors" }), v = (l, M) => {
241
- const S = M !== !1, k = l.sortable === !0;
195
+ n.length === t && t > 0 ? i = !0 : n.length > 0 && (i = "indeterminate");
196
+ const x = (d) => d.sortable !== !0 ? null : h === d.key ? o === "asc" ? /* @__PURE__ */ e(oe, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(ce, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ e(me, { className: "size-3.5 text-muted-foreground/50 group-hover:text-muted-foreground transition-colors" }), b = (d, I) => {
197
+ const S = I !== !1, k = d.sortable === !0;
242
198
  return /* @__PURE__ */ r(
243
199
  "th",
244
200
  {
@@ -247,64 +203,64 @@ function Ce({
247
203
  g ? "border-r border-gray-200 dark:border-gray-800" : "",
248
204
  k ? "cursor-pointer select-none" : ""
249
205
  ].filter(Boolean).join(" "),
250
- style: { width: f[l.key] },
206
+ style: { width: f[d.key] },
251
207
  draggable: S,
252
208
  onClick: () => {
253
- b(l.key);
209
+ v(d.key);
254
210
  },
255
211
  onDragStart: (u) => {
256
- S ? C(u, l.key) : u.preventDefault();
212
+ S ? w(u, d.key) : u.preventDefault();
257
213
  },
258
214
  onDragOver: (u) => {
259
- y(u, l.key);
215
+ y(u, d.key);
260
216
  },
261
217
  onDrop: (u) => {
262
- z(u, l.key);
218
+ z(u, d.key);
263
219
  },
264
220
  children: [
265
221
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between pr-2", children: [
266
222
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
267
- S ? /* @__PURE__ */ e(he, { className: "size-4 text-gray-400 cursor-grab dark:text-gray-300 shrink-0" }) : null,
268
- /* @__PURE__ */ e("span", { className: "truncate", children: l.label })
223
+ S ? /* @__PURE__ */ e(de, { className: "size-4 text-gray-400 cursor-grab dark:text-gray-300 shrink-0" }) : null,
224
+ /* @__PURE__ */ e("span", { className: "truncate", children: d.label })
269
225
  ] }),
270
- /* @__PURE__ */ e("div", { className: "ml-1 shrink-0", children: x(l) })
226
+ /* @__PURE__ */ e("div", { className: "ml-1 shrink-0", children: x(d) })
271
227
  ] }),
272
228
  p ? /* @__PURE__ */ e(
273
229
  "div",
274
230
  {
275
231
  className: "absolute right-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-blue-500 opacity-0 group-hover:opacity-50 transition-opacity",
276
232
  onMouseDown: (u) => {
277
- N(u, l.key);
233
+ N(u, d.key);
278
234
  }
279
235
  }
280
236
  ) : null
281
237
  ]
282
238
  },
283
- l.key
239
+ d.key
284
240
  );
285
241
  };
286
242
  return /* @__PURE__ */ e("thead", { className: "bg-muted/50 dark:bg-gray-900/50 border-b border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ r("tr", { children: [
287
- d ? /* @__PURE__ */ e("th", { className: "p-1 flex-shrink-0 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(L, { checked: i, onCheckedChange: a }) }) }) : null,
288
- c.map((l) => v(l, n)),
289
- D || h !== void 0 ? /* @__PURE__ */ e("th", { className: "p-1 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: h }) : null
243
+ l ? /* @__PURE__ */ e("th", { className: "p-1 flex-shrink-0 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e($, { checked: i, onCheckedChange: a }) }) }) : null,
244
+ c.map((d) => b(d, s)),
245
+ D || m !== void 0 ? /* @__PURE__ */ e("th", { className: "p-1 text-center align-middle", style: { width: "32px", minWidth: "32px", maxWidth: "32px" }, children: m }) : null
290
246
  ] }) });
291
247
  }
292
- function ze({
293
- totalItems: d,
294
- startIndex: s,
248
+ function ve({
249
+ totalItems: l,
250
+ startIndex: n,
295
251
  endIndex: t,
296
252
  pageSize: a,
297
253
  setPageSize: c,
298
- currentPage: n,
254
+ currentPage: s,
299
255
  setCurrentPage: p,
300
256
  pageSizeOptions: f,
301
- totalPages: m
257
+ totalPages: h
302
258
  }) {
303
259
  return /* @__PURE__ */ r("div", { className: "px-4 py-2 border-t border-gray-200 dark:border-gray-800 flex items-center justify-between bg-muted/50 dark:bg-gray-900/50 flex-wrap gap-2", children: [
304
260
  /* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground", children: [
305
- d === 0 ? "0" : `${String(s + 1)} - ${String(t)}`,
261
+ l === 0 ? "0" : `${String(n + 1)} - ${String(t)}`,
306
262
  " sur ",
307
- d
263
+ l
308
264
  ] }),
309
265
  /* @__PURE__ */ r("div", { className: "flex items-center gap-4", children: [
310
266
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
@@ -323,7 +279,7 @@ function ze({
323
279
  ] }),
324
280
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
325
281
  /* @__PURE__ */ e(
326
- w,
282
+ C,
327
283
  {
328
284
  variant: "outline",
329
285
  size: "sm",
@@ -331,40 +287,40 @@ function ze({
331
287
  onClick: () => {
332
288
  p((o) => Math.max(1, o - 1));
333
289
  },
334
- disabled: n === 1,
335
- children: /* @__PURE__ */ e(ie, { className: "size-4" })
290
+ disabled: s === 1,
291
+ children: /* @__PURE__ */ e(he, { className: "size-4" })
336
292
  }
337
293
  ),
338
294
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
339
295
  "Page ",
340
- n,
296
+ s,
341
297
  " sur ",
342
- m
298
+ h
343
299
  ] }),
344
300
  /* @__PURE__ */ e(
345
- w,
301
+ C,
346
302
  {
347
303
  variant: "outline",
348
304
  size: "sm",
349
305
  className: "h-8 w-8 p-0",
350
306
  onClick: () => {
351
- p((o) => Math.min(m, o + 1));
307
+ p((o) => Math.min(h, o + 1));
352
308
  },
353
- disabled: n === m,
354
- children: /* @__PURE__ */ e(de, { className: "size-4" })
309
+ disabled: s === h,
310
+ children: /* @__PURE__ */ e(ge, { className: "size-4" })
355
311
  }
356
312
  )
357
313
  ] })
358
314
  ] })
359
315
  ] });
360
316
  }
361
- function De({ columns: d, visibleColumns: s, toggleColumnVisibility: t }) {
362
- return /* @__PURE__ */ r(I, { children: [
363
- /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(w, { variant: "outline", size: "sm", className: "size-7 p-0 bg-white hover:bg-gray-100 dark:bg-gray-900 shadow-sm border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ e(ve, { className: "size-3.5 text-gray-600 dark:text-gray-300" }) }) }),
364
- /* @__PURE__ */ e(B, { align: "end", className: "w-56", children: d.map((a) => /* @__PURE__ */ e(
365
- le,
317
+ function Ne({ columns: l, visibleColumns: n, toggleColumnVisibility: t }) {
318
+ return /* @__PURE__ */ r(A, { children: [
319
+ /* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ e(C, { variant: "outline", size: "sm", className: "size-7 p-0 bg-white hover:bg-gray-100 dark:bg-gray-900 shadow-sm border-gray-200 dark:border-gray-800", children: /* @__PURE__ */ e(ue, { className: "size-3.5 text-gray-600 dark:text-gray-300" }) }) }),
320
+ /* @__PURE__ */ e(B, { align: "end", className: "w-56", children: l.map((a) => /* @__PURE__ */ e(
321
+ se,
366
322
  {
367
- checked: s.has(a.key),
323
+ checked: n.has(a.key),
368
324
  onCheckedChange: () => {
369
325
  t(a.key);
370
326
  },
@@ -374,146 +330,146 @@ function De({ columns: d, visibleColumns: s, toggleColumnVisibility: t }) {
374
330
  )) })
375
331
  ] });
376
332
  }
377
- function Ve({
378
- data: d,
379
- columns: s,
333
+ function Le({
334
+ data: l,
335
+ columns: n,
380
336
  getRowId: t,
381
337
  onRowClick: a,
382
338
  actions: c,
383
- bulkActions: n,
339
+ bulkActions: s,
384
340
  draggableColumns: p = !0,
385
341
  resizableColumns: f = !0,
386
- columnVisibility: m = !0,
342
+ columnVisibility: h = !0,
387
343
  isLoading: o = !1,
388
- bordered: b = !1,
389
- noDataMessage: C = "Aucun résultat",
390
- defaultPageSize: y = be,
391
- pageSizeOptions: z = P,
344
+ bordered: v = !1,
345
+ noDataMessage: w = "Aucun résultat",
346
+ defaultPageSize: y = pe,
347
+ pageSizeOptions: z = L,
392
348
  totalRows: N,
393
349
  currentPage: D,
394
- pageSize: h,
350
+ pageSize: m,
395
351
  onPageChange: g,
396
352
  onPageSizeChange: i,
397
353
  sortColumn: x,
398
- sortDirection: v,
399
- onSortChange: l
354
+ sortDirection: b,
355
+ onSortChange: d
400
356
  }) {
401
357
  const {
402
- sortColumn: M,
358
+ sortColumn: I,
403
359
  sortDirection: S,
404
360
  selectedRows: k,
405
361
  setSelectedRows: u,
406
- visibleColumns: V,
407
- columnWidths: T,
408
- safeCurrentPage: q,
409
- totalPages: E,
410
- startIndex: G,
411
- endIndex: H,
412
- tableRef: O,
413
- hasActions: W,
414
- hasBulkActions: _,
415
- visibleColumnsArray: A,
416
- colSpanCount: U,
362
+ visibleColumns: H,
363
+ columnWidths: j,
364
+ safeCurrentPage: O,
365
+ totalPages: U,
366
+ startIndex: V,
367
+ endIndex: G,
368
+ tableRef: q,
369
+ hasActions: M,
370
+ hasBulkActions: T,
371
+ visibleColumnsArray: W,
372
+ colSpanCount: E,
417
373
  paginatedData: F,
418
374
  handleSort: J,
419
375
  handleMouseDown: Q,
420
376
  handleDragStart: X,
421
377
  handleDragOver: Y,
422
378
  handleDrop: Z,
423
- toggleColumnVisibility: K,
424
- toggleRowSelection: R,
425
- toggleSelectAll: ee,
426
- pageSize: re,
427
- setPageSize: te,
428
- setCurrentPage: ae
429
- } = se({
430
- data: d,
431
- columns: s,
379
+ toggleColumnVisibility: _,
380
+ toggleRowSelection: K,
381
+ toggleSelectAll: R,
382
+ pageSize: ee,
383
+ setPageSize: re,
384
+ setCurrentPage: te
385
+ } = ae({
386
+ data: l,
387
+ columns: n,
432
388
  getRowId: t,
433
389
  defaultPageSize: y,
434
390
  actions: c,
435
- bulkActions: n,
436
- columnVisibility: m,
391
+ bulkActions: s,
392
+ columnVisibility: h,
437
393
  totalRows: N,
438
394
  currentPage: D,
439
- pageSize: h,
395
+ pageSize: m,
440
396
  onPageChange: g,
441
397
  onPageSizeChange: i,
442
398
  sortColumn: x,
443
- sortDirection: v,
444
- onSortChange: l
399
+ sortDirection: b,
400
+ onSortChange: d
445
401
  });
446
402
  return /* @__PURE__ */ r("div", { className: "space-y-4", children: [
447
- k.length > 0 && n !== void 0 && n.length > 0 && /* @__PURE__ */ e(we, { selectedRows: k, setSelectedRows: u, bulkActions: n }),
403
+ k.length > 0 && s !== void 0 && s.length > 0 && /* @__PURE__ */ e(ye, { selectedRows: k, setSelectedRows: u, bulkActions: s }),
448
404
  /* @__PURE__ */ r("div", { className: "w-full bg-card dark:bg-gray-950 rounded-md border border-gray-200 dark:border-gray-800 overflow-hidden", children: [
449
- /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r("table", { ref: O, className: "w-full", children: [
405
+ /* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r("table", { ref: q, className: "w-full", children: [
450
406
  /* @__PURE__ */ e(
451
- Ce,
407
+ be,
452
408
  {
453
- hasBulkActions: _,
409
+ hasBulkActions: T,
454
410
  selectedRows: k,
455
- totalItems: d.length,
456
- toggleSelectAll: ee,
457
- visibleColumnsArray: A,
411
+ totalItems: l.length,
412
+ toggleSelectAll: R,
413
+ visibleColumnsArray: W,
458
414
  draggableColumns: p,
459
415
  resizableColumns: f,
460
- columnWidths: T,
461
- sortColumn: M,
416
+ columnWidths: j,
417
+ sortColumn: I,
462
418
  sortDirection: S,
463
419
  handleSort: J,
464
420
  handleDragStart: X,
465
421
  handleDragOver: Y,
466
422
  handleDrop: Z,
467
423
  handleMouseDown: Q,
468
- hasActions: W,
469
- bordered: b,
470
- settingsNode: m ? /* @__PURE__ */ e(De, { columns: s, visibleColumns: V, toggleColumnVisibility: K }) : void 0
424
+ hasActions: M,
425
+ bordered: v,
426
+ settingsNode: h ? /* @__PURE__ */ e(Ne, { columns: n, visibleColumns: H, toggleColumnVisibility: _ }) : void 0
471
427
  }
472
428
  ),
473
429
  /* @__PURE__ */ e(
474
- ke,
430
+ fe,
475
431
  {
476
- bordered: b,
432
+ bordered: v,
477
433
  isLoading: o,
478
- colSpanCount: U,
479
- noDataMessage: C,
434
+ colSpanCount: E,
435
+ noDataMessage: w,
480
436
  paginatedData: F,
481
437
  getRowId: t,
482
438
  onRowClick: a,
483
- hasBulkActions: _,
439
+ hasBulkActions: T,
484
440
  selectedRows: k,
485
- toggleRowSelection: R,
486
- visibleColumnsArray: A,
487
- columnWidths: T,
488
- hasActions: W || m,
441
+ toggleRowSelection: K,
442
+ visibleColumnsArray: W,
443
+ columnWidths: j,
444
+ hasActions: M || h,
489
445
  actions: c,
490
- columns: s
446
+ columns: n
491
447
  }
492
448
  )
493
449
  ] }) }),
494
450
  /* @__PURE__ */ e(
495
- ze,
451
+ ve,
496
452
  {
497
- totalItems: N ?? d.length,
498
- startIndex: G,
499
- endIndex: H,
500
- pageSize: re,
501
- setPageSize: te,
502
- currentPage: q,
503
- setCurrentPage: ae,
453
+ totalItems: N ?? l.length,
454
+ startIndex: V,
455
+ endIndex: G,
456
+ pageSize: ee,
457
+ setPageSize: re,
458
+ currentPage: O,
459
+ setCurrentPage: te,
504
460
  pageSizeOptions: z,
505
- totalPages: E
461
+ totalPages: U
506
462
  }
507
463
  )
508
464
  ] })
509
465
  ] });
510
466
  }
511
467
  export {
512
- Ve as D,
513
- Ne as T,
514
- ke as a,
515
- we as b,
516
- Ce as c,
517
- ze as d,
518
- De as e
468
+ Le as D,
469
+ xe as T,
470
+ fe as a,
471
+ ye as b,
472
+ be as c,
473
+ ve as d,
474
+ Ne as e
519
475
  };