@krosoft/react 0.0.124 → 0.0.125
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.
- package/dist/{AppActions-po4LjUcM.js → AppActions-BbAnhStS.js} +22 -18
- package/dist/{AppSubTitle-CWrsJYFJ.js → AppSubTitle-lg3d5NWc.js} +1 -1
- package/dist/{AppTitle-CDxWr_0y.js → AppTitle-uboDuil4.js} +1 -1
- package/dist/{AppVerticalTabs-CdqoObXx.js → AppVerticalTabs-CBijkDF_.js} +33 -49
- package/dist/ConfirmationDialog-Co5yl0yA.js +184 -0
- package/dist/{DataTable-CrJoeR_0.js → DataTable-DSIgTHZS.js} +174 -218
- package/dist/ErrorAlert-DH1onuyt.js +17 -0
- package/dist/GenericForm-QoeireeW.js +339 -0
- package/dist/ImageInput-DLTYJMwr.js +65 -0
- package/dist/KpiCardsLayout-C3LmSeL1.js +22 -0
- package/dist/{LoadingState-PhGi7HXH.js → LoadingState-BN0YaPSs.js} +3 -3
- package/dist/{MetricCard-C-ewNR_i.js → MetricCard-CPw-fiNS.js} +6 -6
- package/dist/{MultiSelect-BoisW4Kn.js → MultiSelect-CX051kfk.js} +32 -27
- package/dist/SearchInput-D6LmcOjp.js +249 -0
- package/dist/SkeletonCards-BIEnyOuZ.js +62 -0
- package/dist/{TableFilter-CLjQU36k.js → TableFilter-Wh_Womy4.js} +114 -123
- package/dist/{ThemeSelector--w3R6Ff3.js → ThemeSelector-Qv8QBlYq.js} +2 -2
- package/dist/{Topbar-DFu_OdSs.js → Topbar-DVww-tU8.js} +49 -59
- package/dist/{alert-B34E_4uH.js → alert-B78CiTYe.js} +2 -2
- package/dist/components/core/cards/index.js +2 -2
- package/dist/components/core/dialogs/index.js +2 -2
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.js +19 -19
- package/dist/components/core/inputs/index.js +3 -3
- package/dist/components/core/layouts/index.js +4 -4
- package/dist/components/core/navbar/index.js +1 -1
- package/dist/components/core/states/index.js +2 -2
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/core/tabs/index.js +1 -1
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +270 -270
- package/dist/components/ui/index.js +213 -213
- package/dist/helpers/index.js +1 -1
- package/dist/hooks/behavior/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/select-MWzbMBAS.js +106 -0
- package/dist/tailwind.helper-B6yFEsav.js +8 -0
- package/dist/toaster-DTC8Duvh.js +75 -0
- package/dist/toggle-group-CSdAiS44.js +1694 -0
- package/dist/tooltip-BWyFpIxo.js +56 -0
- package/dist/useConfirmDeleteDialog-CiBQmRxg.js +65 -0
- package/package.json +2 -2
- package/dist/ConfirmationDialog-CkMyyh_3.js +0 -221
- package/dist/ErrorAlert-C6BbHHRZ.js +0 -33
- package/dist/GenericForm-CmwqEXiQ.js +0 -11410
- package/dist/ImageInput-C8HcxE8t.js +0 -82
- package/dist/KpiCardsLayout-CETMpB7A.js +0 -15
- package/dist/SearchInput-DJ_F3emq.js +0 -586
- package/dist/SkeletonCards-C5lXTSrB.js +0 -57
- package/dist/badge-CfWlt79h.js +0 -26
- package/dist/createLucideIcon-MP_wDWjs.js +0 -116
- package/dist/ellipsis-vertical-kB5yFb-i.js +0 -15
- package/dist/grip-vertical-DGywJXzS.js +0 -18
- package/dist/index-Be16PP7H.js +0 -34
- package/dist/loader-circle-CKy7u7JW.js +0 -11
- package/dist/select-DlQvLtI3.js +0 -1763
- package/dist/tailwind.helper-gWiv5-6R.js +0 -2278
- package/dist/toaster-CKoOjjKr.js +0 -134
- package/dist/toggle-group-wIgXZYDq.js +0 -29086
- package/dist/tooltip-YhBPXbcJ.js +0 -2477
- 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
|
|
3
|
-
import {
|
|
4
|
-
import "./alert-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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:
|
|
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(
|
|
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
|
|
93
|
-
isLoading:
|
|
94
|
-
colSpanCount:
|
|
48
|
+
function fe({
|
|
49
|
+
isLoading: l,
|
|
50
|
+
colSpanCount: n,
|
|
95
51
|
noDataMessage: t,
|
|
96
52
|
paginatedData: a,
|
|
97
53
|
getRowId: c,
|
|
98
|
-
onRowClick:
|
|
54
|
+
onRowClick: s,
|
|
99
55
|
hasBulkActions: p,
|
|
100
56
|
selectedRows: f,
|
|
101
|
-
toggleRowSelection:
|
|
57
|
+
toggleRowSelection: h,
|
|
102
58
|
visibleColumnsArray: o,
|
|
103
|
-
columnWidths:
|
|
104
|
-
hasActions:
|
|
59
|
+
columnWidths: v,
|
|
60
|
+
hasActions: w,
|
|
105
61
|
actions: y,
|
|
106
62
|
columns: z,
|
|
107
63
|
bordered: N = !1
|
|
108
64
|
}) {
|
|
109
|
-
const D = (
|
|
110
|
-
const i = z.find((
|
|
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(
|
|
113
|
-
const x =
|
|
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
|
|
117
|
-
/* @__PURE__ */ e(
|
|
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:
|
|
120
|
-
const g = c(
|
|
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 ${
|
|
125
|
-
onClick: () =>
|
|
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
|
-
|
|
92
|
+
$,
|
|
137
93
|
{
|
|
138
94
|
checked: f.includes(g),
|
|
139
95
|
onCheckedChange: () => {
|
|
140
|
-
|
|
96
|
+
h(g);
|
|
141
97
|
}
|
|
142
98
|
}
|
|
143
99
|
) })
|
|
144
100
|
}
|
|
145
101
|
) : null,
|
|
146
102
|
o.map((i, x) => {
|
|
147
|
-
const
|
|
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 && !
|
|
152
|
-
style: { width:
|
|
153
|
-
children: /* @__PURE__ */ e("div", { className: "w-full h-full", children: D(
|
|
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
|
-
|
|
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(
|
|
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
|
|
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
|
-
|
|
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
|
|
139
|
+
const s = a.icon;
|
|
184
140
|
return /* @__PURE__ */ r(
|
|
185
|
-
|
|
141
|
+
C,
|
|
186
142
|
{
|
|
187
143
|
variant: "outline",
|
|
188
144
|
size: "sm",
|
|
189
145
|
onClick: () => {
|
|
190
|
-
a.onClick(
|
|
191
|
-
|
|
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
|
-
|
|
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
|
-
|
|
161
|
+
C,
|
|
206
162
|
{
|
|
207
163
|
variant: "ghost",
|
|
208
164
|
size: "sm",
|
|
209
165
|
onClick: () => {
|
|
210
|
-
|
|
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
|
|
219
|
-
hasBulkActions:
|
|
220
|
-
selectedRows:
|
|
174
|
+
function be({
|
|
175
|
+
hasBulkActions: l,
|
|
176
|
+
selectedRows: n,
|
|
221
177
|
totalItems: t,
|
|
222
178
|
toggleSelectAll: a,
|
|
223
179
|
visibleColumnsArray: c,
|
|
224
|
-
draggableColumns:
|
|
180
|
+
draggableColumns: s,
|
|
225
181
|
resizableColumns: p,
|
|
226
182
|
columnWidths: f,
|
|
227
|
-
sortColumn:
|
|
183
|
+
sortColumn: h,
|
|
228
184
|
sortDirection: o,
|
|
229
|
-
handleSort:
|
|
230
|
-
handleDragStart:
|
|
185
|
+
handleSort: v,
|
|
186
|
+
handleDragStart: w,
|
|
231
187
|
handleDragOver: y,
|
|
232
188
|
handleDrop: z,
|
|
233
189
|
handleMouseDown: N,
|
|
234
190
|
hasActions: D,
|
|
235
|
-
settingsNode:
|
|
191
|
+
settingsNode: m,
|
|
236
192
|
bordered: g = !1
|
|
237
193
|
}) {
|
|
238
194
|
let i = !1;
|
|
239
|
-
|
|
240
|
-
const x = (
|
|
241
|
-
const S =
|
|
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[
|
|
206
|
+
style: { width: f[d.key] },
|
|
251
207
|
draggable: S,
|
|
252
208
|
onClick: () => {
|
|
253
|
-
|
|
209
|
+
v(d.key);
|
|
254
210
|
},
|
|
255
211
|
onDragStart: (u) => {
|
|
256
|
-
S ?
|
|
212
|
+
S ? w(u, d.key) : u.preventDefault();
|
|
257
213
|
},
|
|
258
214
|
onDragOver: (u) => {
|
|
259
|
-
y(u,
|
|
215
|
+
y(u, d.key);
|
|
260
216
|
},
|
|
261
217
|
onDrop: (u) => {
|
|
262
|
-
z(u,
|
|
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(
|
|
268
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
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(
|
|
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,
|
|
233
|
+
N(u, d.key);
|
|
278
234
|
}
|
|
279
235
|
}
|
|
280
236
|
) : null
|
|
281
237
|
]
|
|
282
238
|
},
|
|
283
|
-
|
|
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
|
-
|
|
288
|
-
c.map((
|
|
289
|
-
D ||
|
|
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
|
|
293
|
-
totalItems:
|
|
294
|
-
startIndex:
|
|
248
|
+
function ve({
|
|
249
|
+
totalItems: l,
|
|
250
|
+
startIndex: n,
|
|
295
251
|
endIndex: t,
|
|
296
252
|
pageSize: a,
|
|
297
253
|
setPageSize: c,
|
|
298
|
-
currentPage:
|
|
254
|
+
currentPage: s,
|
|
299
255
|
setCurrentPage: p,
|
|
300
256
|
pageSizeOptions: f,
|
|
301
|
-
totalPages:
|
|
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
|
-
|
|
261
|
+
l === 0 ? "0" : `${String(n + 1)} - ${String(t)}`,
|
|
306
262
|
" sur ",
|
|
307
|
-
|
|
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
|
-
|
|
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:
|
|
335
|
-
children: /* @__PURE__ */ e(
|
|
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
|
-
|
|
296
|
+
s,
|
|
341
297
|
" sur ",
|
|
342
|
-
|
|
298
|
+
h
|
|
343
299
|
] }),
|
|
344
300
|
/* @__PURE__ */ e(
|
|
345
|
-
|
|
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(
|
|
307
|
+
p((o) => Math.min(h, o + 1));
|
|
352
308
|
},
|
|
353
|
-
disabled:
|
|
354
|
-
children: /* @__PURE__ */ e(
|
|
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
|
|
362
|
-
return /* @__PURE__ */ r(
|
|
363
|
-
/* @__PURE__ */ e(
|
|
364
|
-
/* @__PURE__ */ e(B, { align: "end", className: "w-56", children:
|
|
365
|
-
|
|
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:
|
|
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
|
|
378
|
-
data:
|
|
379
|
-
columns:
|
|
333
|
+
function Le({
|
|
334
|
+
data: l,
|
|
335
|
+
columns: n,
|
|
380
336
|
getRowId: t,
|
|
381
337
|
onRowClick: a,
|
|
382
338
|
actions: c,
|
|
383
|
-
bulkActions:
|
|
339
|
+
bulkActions: s,
|
|
384
340
|
draggableColumns: p = !0,
|
|
385
341
|
resizableColumns: f = !0,
|
|
386
|
-
columnVisibility:
|
|
342
|
+
columnVisibility: h = !0,
|
|
387
343
|
isLoading: o = !1,
|
|
388
|
-
bordered:
|
|
389
|
-
noDataMessage:
|
|
390
|
-
defaultPageSize: y =
|
|
391
|
-
pageSizeOptions: z =
|
|
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:
|
|
350
|
+
pageSize: m,
|
|
395
351
|
onPageChange: g,
|
|
396
352
|
onPageSizeChange: i,
|
|
397
353
|
sortColumn: x,
|
|
398
|
-
sortDirection:
|
|
399
|
-
onSortChange:
|
|
354
|
+
sortDirection: b,
|
|
355
|
+
onSortChange: d
|
|
400
356
|
}) {
|
|
401
357
|
const {
|
|
402
|
-
sortColumn:
|
|
358
|
+
sortColumn: I,
|
|
403
359
|
sortDirection: S,
|
|
404
360
|
selectedRows: k,
|
|
405
361
|
setSelectedRows: u,
|
|
406
|
-
visibleColumns:
|
|
407
|
-
columnWidths:
|
|
408
|
-
safeCurrentPage:
|
|
409
|
-
totalPages:
|
|
410
|
-
startIndex:
|
|
411
|
-
endIndex:
|
|
412
|
-
tableRef:
|
|
413
|
-
hasActions:
|
|
414
|
-
hasBulkActions:
|
|
415
|
-
visibleColumnsArray:
|
|
416
|
-
colSpanCount:
|
|
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:
|
|
424
|
-
toggleRowSelection:
|
|
425
|
-
toggleSelectAll:
|
|
426
|
-
pageSize:
|
|
427
|
-
setPageSize:
|
|
428
|
-
setCurrentPage:
|
|
429
|
-
} =
|
|
430
|
-
data:
|
|
431
|
-
columns:
|
|
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:
|
|
436
|
-
columnVisibility:
|
|
391
|
+
bulkActions: s,
|
|
392
|
+
columnVisibility: h,
|
|
437
393
|
totalRows: N,
|
|
438
394
|
currentPage: D,
|
|
439
|
-
pageSize:
|
|
395
|
+
pageSize: m,
|
|
440
396
|
onPageChange: g,
|
|
441
397
|
onPageSizeChange: i,
|
|
442
398
|
sortColumn: x,
|
|
443
|
-
sortDirection:
|
|
444
|
-
onSortChange:
|
|
399
|
+
sortDirection: b,
|
|
400
|
+
onSortChange: d
|
|
445
401
|
});
|
|
446
402
|
return /* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
447
|
-
k.length > 0 &&
|
|
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:
|
|
405
|
+
/* @__PURE__ */ e("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r("table", { ref: q, className: "w-full", children: [
|
|
450
406
|
/* @__PURE__ */ e(
|
|
451
|
-
|
|
407
|
+
be,
|
|
452
408
|
{
|
|
453
|
-
hasBulkActions:
|
|
409
|
+
hasBulkActions: T,
|
|
454
410
|
selectedRows: k,
|
|
455
|
-
totalItems:
|
|
456
|
-
toggleSelectAll:
|
|
457
|
-
visibleColumnsArray:
|
|
411
|
+
totalItems: l.length,
|
|
412
|
+
toggleSelectAll: R,
|
|
413
|
+
visibleColumnsArray: W,
|
|
458
414
|
draggableColumns: p,
|
|
459
415
|
resizableColumns: f,
|
|
460
|
-
columnWidths:
|
|
461
|
-
sortColumn:
|
|
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:
|
|
469
|
-
bordered:
|
|
470
|
-
settingsNode:
|
|
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
|
-
|
|
430
|
+
fe,
|
|
475
431
|
{
|
|
476
|
-
bordered:
|
|
432
|
+
bordered: v,
|
|
477
433
|
isLoading: o,
|
|
478
|
-
colSpanCount:
|
|
479
|
-
noDataMessage:
|
|
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:
|
|
486
|
-
visibleColumnsArray:
|
|
487
|
-
columnWidths:
|
|
488
|
-
hasActions:
|
|
441
|
+
toggleRowSelection: K,
|
|
442
|
+
visibleColumnsArray: W,
|
|
443
|
+
columnWidths: j,
|
|
444
|
+
hasActions: M || h,
|
|
489
445
|
actions: c,
|
|
490
|
-
columns:
|
|
446
|
+
columns: n
|
|
491
447
|
}
|
|
492
448
|
)
|
|
493
449
|
] }) }),
|
|
494
450
|
/* @__PURE__ */ e(
|
|
495
|
-
|
|
451
|
+
ve,
|
|
496
452
|
{
|
|
497
|
-
totalItems: N ??
|
|
498
|
-
startIndex:
|
|
499
|
-
endIndex:
|
|
500
|
-
pageSize:
|
|
501
|
-
setPageSize:
|
|
502
|
-
currentPage:
|
|
503
|
-
setCurrentPage:
|
|
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:
|
|
461
|
+
totalPages: U
|
|
506
462
|
}
|
|
507
463
|
)
|
|
508
464
|
] })
|
|
509
465
|
] });
|
|
510
466
|
}
|
|
511
467
|
export {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
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
|
};
|