@krosoft/react 0.0.92 → 0.0.94

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