@krosoft/react 0.0.101 → 0.0.102

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