@versini/ui-table 4.0.18 → 5.0.0
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/components/Table/Table.js +887 -198
- package/dist/index.js +3 -3
- package/package.json +7 -7
|
@@ -1,268 +1,957 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as o, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import z, { useRef as w, useLayoutEffect as q, useEffect as W, useState as ce, useMemo as K, useCallback as ne, useContext as B } from "react";
|
|
3
|
+
import l from "clsx";
|
|
4
|
+
import { TableCellSortDirections as R } from "../TableConstants/TableConstants.js";
|
|
5
|
+
const Y = "av-button", P = "icon", Q = "button", U = "link", de = ({
|
|
6
|
+
type: e,
|
|
7
|
+
size: r,
|
|
8
|
+
labelRight: t,
|
|
9
|
+
labelLeft: a,
|
|
10
|
+
align: s,
|
|
11
|
+
animated: i
|
|
12
|
+
}) => {
|
|
13
|
+
const c = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", n = "max-h-12 py-2 px-4";
|
|
14
|
+
switch (e) {
|
|
15
|
+
case Q:
|
|
16
|
+
case U:
|
|
17
|
+
return l({
|
|
18
|
+
[c]: r === "small",
|
|
19
|
+
[d]: r === "medium",
|
|
20
|
+
[n]: r === "large"
|
|
21
|
+
});
|
|
22
|
+
case P:
|
|
23
|
+
return l("flex items-center", {
|
|
24
|
+
"justify-center": s === "center",
|
|
25
|
+
"justify-start": s === "left",
|
|
26
|
+
"justify-end": s === "right",
|
|
27
|
+
"h-6 w-6 p-0": r === "small" && !i && !(t || a),
|
|
28
|
+
"h-6 px-1 sm:px-2": r === "small" && !i && (t || a),
|
|
29
|
+
"h-8 w-8 p-1": r === "medium" && !i && !(t || a),
|
|
30
|
+
"h-8 px-3": r === "medium" && !i && (t || a),
|
|
31
|
+
"h-12 w-12 p-2": r === "large" && !i && !(t || a),
|
|
32
|
+
"h-12 px-4": r === "large" && !i && (t || a),
|
|
33
|
+
"h-6 py-0": r === "small" && i && !(t || a),
|
|
34
|
+
"h-6": r === "small" && i && (t || a),
|
|
35
|
+
"h-8 py-1": r === "medium" && i && !(t || a),
|
|
36
|
+
"h-8": r === "medium" && i && (t || a),
|
|
37
|
+
"h-12 py-2": r === "large" && i && !(t || a),
|
|
38
|
+
"h-12": r === "large" && i && (t || a)
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}, he = ({
|
|
42
|
+
type: e,
|
|
43
|
+
size: r,
|
|
44
|
+
labelRight: t,
|
|
45
|
+
labelLeft: a
|
|
46
|
+
}) => {
|
|
47
|
+
const s = "text-sm font-medium", i = "text-base font-medium", c = "text-lg font-medium";
|
|
48
|
+
switch (e) {
|
|
49
|
+
case Q:
|
|
50
|
+
case U:
|
|
51
|
+
return l({
|
|
52
|
+
"text-center": e === U,
|
|
53
|
+
[s]: r === "small",
|
|
54
|
+
[i]: r === "medium",
|
|
55
|
+
[c]: r === "large"
|
|
56
|
+
});
|
|
57
|
+
case P:
|
|
58
|
+
return l({
|
|
59
|
+
[s]: r === "small" && (t || a),
|
|
60
|
+
[i]: r === "medium" && (t || a),
|
|
61
|
+
[c]: r === "large" && (t || a)
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}, ge = ({
|
|
65
|
+
mode: e,
|
|
66
|
+
noBackground: r,
|
|
67
|
+
truncate: t,
|
|
68
|
+
variant: a
|
|
69
|
+
}) => {
|
|
70
|
+
if (r)
|
|
71
|
+
return "not-prose";
|
|
72
|
+
if (a === "primary")
|
|
73
|
+
return l("not-prose", {
|
|
74
|
+
truncate: t,
|
|
75
|
+
"text-copy-dark": e === "dark" || e === "system",
|
|
76
|
+
"text-copy-light": e === "light" || e === "alt-system",
|
|
77
|
+
"dark:text-copy-light": e === "system",
|
|
78
|
+
"dark:text-copy-dark": e === "alt-system"
|
|
79
|
+
});
|
|
80
|
+
if (a === "secondary")
|
|
81
|
+
return l("not-prose", {
|
|
82
|
+
truncate: t,
|
|
83
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
84
|
+
"text-copy-dark": e === "light" || e === "alt-system",
|
|
85
|
+
"dark:text-copy-dark": e === "system",
|
|
86
|
+
"dark:text-copy-light": e === "alt-system"
|
|
87
|
+
});
|
|
88
|
+
if (a === "danger")
|
|
89
|
+
return l("not-prose", {
|
|
90
|
+
truncate: t,
|
|
91
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
92
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
93
|
+
"dark:text-copy-lighter": e === "system",
|
|
94
|
+
"dark:text-copy-light": e === "alt-system"
|
|
95
|
+
});
|
|
96
|
+
if (a === "selected")
|
|
97
|
+
return l("not-prose text-copy-lighter", {
|
|
98
|
+
truncate: t
|
|
99
|
+
});
|
|
100
|
+
}, me = ({
|
|
101
|
+
mode: e,
|
|
102
|
+
noBackground: r,
|
|
103
|
+
variant: t
|
|
104
|
+
}) => {
|
|
105
|
+
if (!r) {
|
|
106
|
+
if (t === "primary")
|
|
107
|
+
return l({
|
|
108
|
+
"bg-action-light": e === "dark",
|
|
109
|
+
"bg-action-dark": e === "light",
|
|
110
|
+
"bg-action-light dark:bg-action-dark": e === "system",
|
|
111
|
+
"bg-action-dark dark:bg-action-light": e === "alt-system"
|
|
112
|
+
});
|
|
113
|
+
if (t === "secondary")
|
|
114
|
+
return l({
|
|
115
|
+
"bg-action-light": e === "light",
|
|
116
|
+
"bg-action-dark": e === "dark",
|
|
117
|
+
"bg-action-light dark:bg-action-dark": e === "alt-system",
|
|
118
|
+
"bg-action-dark dark:bg-action-light": e === "system"
|
|
119
|
+
});
|
|
120
|
+
if (t === "danger")
|
|
121
|
+
return l({
|
|
122
|
+
"bg-action-danger-dark": e === "dark",
|
|
123
|
+
"bg-action-danger-light": e === "light",
|
|
124
|
+
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
125
|
+
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
126
|
+
});
|
|
127
|
+
if (t === "selected")
|
|
128
|
+
return "bg-action-selected-dark";
|
|
129
|
+
}
|
|
130
|
+
}, be = ({
|
|
131
|
+
radius: e
|
|
132
|
+
}) => l({
|
|
133
|
+
"rounded-full": e === "large",
|
|
134
|
+
"rounded-md": e === "medium",
|
|
135
|
+
"rounded-xs": e === "small"
|
|
136
|
+
}), ue = ({
|
|
137
|
+
mode: e,
|
|
138
|
+
disabled: r,
|
|
139
|
+
variant: t
|
|
140
|
+
}) => {
|
|
141
|
+
if (r)
|
|
142
|
+
return "";
|
|
143
|
+
if (t === "primary")
|
|
144
|
+
return l({
|
|
145
|
+
"hover:text-copy-dark-hover": e === "dark" || e === "system",
|
|
146
|
+
"hover:text-copy-light-hover": e === "light" || e === "alt-system",
|
|
147
|
+
"dark:hover:text-copy-light-hover": e === "system",
|
|
148
|
+
"dark:hover:text-copy-dark-hover": e === "alt-system",
|
|
149
|
+
"hover:bg-action-light-hover": e === "dark",
|
|
150
|
+
"hover:bg-action-dark-hover": e === "light",
|
|
151
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system",
|
|
152
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system"
|
|
153
|
+
});
|
|
154
|
+
if (t === "secondary")
|
|
155
|
+
return l({
|
|
156
|
+
"hover:text-copy-light-hover": e === "dark" || e === "system",
|
|
157
|
+
"hover:text-copy-dark-hover": e === "light" || e === "alt-system",
|
|
158
|
+
"dark:hover:text-copy-dark-hover": e === "system",
|
|
159
|
+
"dark:hover:text-copy-light-hover": e === "alt-system",
|
|
160
|
+
"hover:bg-action-light-hover": e === "light",
|
|
161
|
+
"hover:bg-action-dark-hover": e === "dark",
|
|
162
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system",
|
|
163
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system"
|
|
164
|
+
});
|
|
165
|
+
if (t === "danger")
|
|
166
|
+
return l("hover:text-copy-light-hover", {
|
|
167
|
+
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
168
|
+
"hover:bg-action-danger-light-hover": e === "light",
|
|
169
|
+
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
170
|
+
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
171
|
+
});
|
|
172
|
+
if (t === "selected")
|
|
173
|
+
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
174
|
+
}, ye = ({
|
|
175
|
+
mode: e,
|
|
176
|
+
disabled: r,
|
|
177
|
+
variant: t
|
|
178
|
+
}) => {
|
|
179
|
+
if (r)
|
|
180
|
+
return "";
|
|
181
|
+
if (t === "primary")
|
|
182
|
+
return l({
|
|
183
|
+
"active:text-copy-dark-active": e === "dark" || e === "system",
|
|
184
|
+
"active:text-copy-light-active": e === "light" || e === "alt-system",
|
|
185
|
+
"dark:active:text-copy-light-active": e === "system",
|
|
186
|
+
"dark:active:text-copy-dark-active": e === "alt-system",
|
|
187
|
+
"active:bg-action-light-active": e === "dark",
|
|
188
|
+
"active:bg-action-dark-active": e === "light",
|
|
189
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system",
|
|
190
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system"
|
|
191
|
+
});
|
|
192
|
+
if (t === "secondary")
|
|
193
|
+
return l({
|
|
194
|
+
"active:text-copy-light-active": e === "dark" || e === "system",
|
|
195
|
+
"active:text-copy-dark-active": e === "light" || e === "alt-system",
|
|
196
|
+
"dark:active:text-copy-dark-active": e === "system",
|
|
197
|
+
"dark:active:text-copy-light-active": e === "alt-system",
|
|
198
|
+
"active:bg-action-light-active": e === "light",
|
|
199
|
+
"active:bg-action-dark-active": e === "dark",
|
|
200
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system",
|
|
201
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system"
|
|
202
|
+
});
|
|
203
|
+
if (t === "danger")
|
|
204
|
+
return l("active:text-copy-lighter-active", {
|
|
205
|
+
"active:bg-action-danger-dark-active": e === "dark",
|
|
206
|
+
"active:bg-action-danger-light-active": e === "light",
|
|
207
|
+
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
208
|
+
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
209
|
+
});
|
|
210
|
+
if (t === "selected")
|
|
211
|
+
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
212
|
+
}, ke = ({
|
|
213
|
+
mode: e,
|
|
214
|
+
noBorder: r,
|
|
215
|
+
variant: t
|
|
216
|
+
}) => {
|
|
217
|
+
if (r)
|
|
218
|
+
return "border border-transparent";
|
|
219
|
+
if (t === "primary")
|
|
220
|
+
return l("border", {
|
|
221
|
+
"border-border-medium": e === "dark",
|
|
222
|
+
"border-border-accent": e === "light",
|
|
223
|
+
"border-border-medium dark:border-border-accent": e === "system",
|
|
224
|
+
"border-border-accent dark:border-border-medium": e === "alt-system"
|
|
225
|
+
});
|
|
226
|
+
if (t === "secondary")
|
|
227
|
+
return l("border", {
|
|
228
|
+
"border-border-medium": e === "light",
|
|
229
|
+
"border-border-accent": e === "dark",
|
|
230
|
+
"border-border-medium dark:border-border-accent": e === "alt-system",
|
|
231
|
+
"border-border-accent dark:border-border-medium": e === "system"
|
|
232
|
+
});
|
|
233
|
+
if (t === "danger")
|
|
234
|
+
return l("border", {
|
|
235
|
+
"border-border-danger-dark": e === "dark",
|
|
236
|
+
"border-border-danger-medium": e === "light",
|
|
237
|
+
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
238
|
+
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
239
|
+
});
|
|
240
|
+
if (t === "selected")
|
|
241
|
+
return "border border-border-selected-dark";
|
|
242
|
+
}, ve = ({
|
|
243
|
+
focusMode: e
|
|
244
|
+
}) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
245
|
+
"focus:outline-focus-dark": e === "dark",
|
|
246
|
+
"focus:outline-focus-light": e === "light",
|
|
247
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
248
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
249
|
+
}), pe = ({
|
|
250
|
+
mode: e,
|
|
251
|
+
raw: r,
|
|
252
|
+
iconClassName: t,
|
|
253
|
+
variant: a = "primary"
|
|
254
|
+
}) => {
|
|
255
|
+
if (r)
|
|
256
|
+
return "";
|
|
257
|
+
let s = {};
|
|
258
|
+
return a === "primary" ? s = {
|
|
259
|
+
"text-copy-dark": e === "dark" || e === "system",
|
|
260
|
+
"text-copy-light": e === "light" || e === "alt-system",
|
|
261
|
+
"dark:text-copy-light": e === "system",
|
|
262
|
+
"dark:text-copy-dark": e === "alt-system"
|
|
263
|
+
} : a === "secondary" ? s = {
|
|
264
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
265
|
+
"text-copy-dark": e === "light" || e === "alt-system",
|
|
266
|
+
"dark:text-copy-dark": e === "system",
|
|
267
|
+
"dark:text-copy-light": e === "alt-system"
|
|
268
|
+
} : a === "danger" ? s = {
|
|
269
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
270
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
271
|
+
"dark:text-copy-lighter": e === "system",
|
|
272
|
+
"dark:text-copy-light": e === "alt-system"
|
|
273
|
+
} : a === "selected" && (s = {
|
|
274
|
+
"text-copy-lighter": !0
|
|
275
|
+
}), l(s, t);
|
|
276
|
+
}, fe = ({
|
|
277
|
+
animated: e
|
|
278
|
+
}) => l({
|
|
279
|
+
"transition-opacity duration-300 ease-in-out": e
|
|
280
|
+
}), xe = ({
|
|
281
|
+
type: e,
|
|
282
|
+
className: r,
|
|
283
|
+
raw: t,
|
|
284
|
+
mode: a,
|
|
285
|
+
focusMode: s,
|
|
286
|
+
disabled: i,
|
|
287
|
+
fullWidth: c,
|
|
288
|
+
size: d,
|
|
289
|
+
noBorder: n,
|
|
290
|
+
labelRight: g,
|
|
291
|
+
labelLeft: b,
|
|
292
|
+
noBackground: h,
|
|
293
|
+
variant: m,
|
|
294
|
+
truncate: p,
|
|
295
|
+
align: L,
|
|
296
|
+
radius: M,
|
|
297
|
+
animated: T
|
|
298
|
+
}) => (m || (m = "primary"), t ? l(Y, r) : l(
|
|
299
|
+
Y,
|
|
300
|
+
ge({
|
|
301
|
+
mode: a,
|
|
302
|
+
variant: m,
|
|
303
|
+
noBackground: h,
|
|
304
|
+
truncate: p
|
|
305
|
+
}),
|
|
306
|
+
me({ mode: a, noBackground: h, variant: m }),
|
|
307
|
+
be({ radius: M }),
|
|
308
|
+
de({
|
|
309
|
+
type: e,
|
|
310
|
+
size: d,
|
|
311
|
+
labelRight: g,
|
|
312
|
+
labelLeft: b,
|
|
313
|
+
align: L,
|
|
314
|
+
animated: T
|
|
315
|
+
}),
|
|
316
|
+
he({ type: e, size: d, labelRight: g, labelLeft: b }),
|
|
317
|
+
ke({ mode: a, variant: m, noBorder: n }),
|
|
318
|
+
ve({ focusMode: s }),
|
|
319
|
+
ue({ mode: a, variant: m, disabled: i }),
|
|
320
|
+
ye({ mode: a, variant: m, disabled: i }),
|
|
321
|
+
{
|
|
322
|
+
"w-full": c,
|
|
323
|
+
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
324
|
+
},
|
|
325
|
+
l({
|
|
326
|
+
"transition-[width] duration-300 ease-in": T
|
|
327
|
+
}),
|
|
328
|
+
r
|
|
329
|
+
)), _e = (e, r, t) => {
|
|
330
|
+
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
331
|
+
}, X = z.forwardRef((e, r) => {
|
|
332
|
+
const { onClick: t, noInternalClick: a = !1, ...s } = e;
|
|
333
|
+
return /* @__PURE__ */ o(
|
|
334
|
+
"button",
|
|
335
|
+
{
|
|
336
|
+
ref: r,
|
|
337
|
+
onClick: (i) => {
|
|
338
|
+
_e(i, a, t);
|
|
339
|
+
},
|
|
340
|
+
...s
|
|
341
|
+
}
|
|
342
|
+
);
|
|
343
|
+
});
|
|
344
|
+
X.displayName = "BaseButton";
|
|
345
|
+
function we() {
|
|
346
|
+
const e = w(!1);
|
|
347
|
+
return W(() => (e.current = !0, () => {
|
|
348
|
+
e.current = !1;
|
|
349
|
+
}), []), ne(() => e.current, []);
|
|
350
|
+
}
|
|
351
|
+
function Ne(e) {
|
|
352
|
+
return K(() => e.every((r) => r == null) ? () => {
|
|
353
|
+
} : (r) => {
|
|
354
|
+
e.forEach((t) => {
|
|
355
|
+
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
356
|
+
});
|
|
357
|
+
}, [...e]);
|
|
358
|
+
}
|
|
359
|
+
const Ce = {
|
|
360
|
+
x: 0,
|
|
361
|
+
y: 0,
|
|
362
|
+
width: 0,
|
|
363
|
+
height: 0,
|
|
364
|
+
top: 0,
|
|
365
|
+
left: 0,
|
|
366
|
+
bottom: 0,
|
|
367
|
+
right: 0
|
|
368
|
+
};
|
|
369
|
+
function j(e) {
|
|
370
|
+
const r = we(), t = w(0), a = w(null), [s, i] = ce(Ce), c = K(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
371
|
+
const n = d[0];
|
|
372
|
+
n && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
373
|
+
a.current && r() && i(n.contentRect);
|
|
374
|
+
}));
|
|
375
|
+
}), [r]);
|
|
376
|
+
return W(() => (a.current && c?.observe(a.current, e), () => {
|
|
377
|
+
c?.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
378
|
+
}), [c, e]), [a, s];
|
|
379
|
+
}
|
|
380
|
+
const E = {
|
|
381
|
+
small: 24,
|
|
382
|
+
// w-6
|
|
383
|
+
medium: 32,
|
|
384
|
+
// w-8
|
|
385
|
+
large: 48
|
|
386
|
+
// w-12
|
|
387
|
+
}, Be = {
|
|
388
|
+
small: 16,
|
|
389
|
+
// px-2 x 2
|
|
390
|
+
medium: 24,
|
|
391
|
+
// px-3 x 2
|
|
392
|
+
large: 32
|
|
393
|
+
// px-4 x 2
|
|
394
|
+
}, Te = 2, Ie = 300, Z = z.forwardRef(
|
|
395
|
+
({
|
|
396
|
+
children: e,
|
|
397
|
+
disabled: r = !1,
|
|
398
|
+
mode: t = "system",
|
|
399
|
+
focusMode: a = "system",
|
|
400
|
+
fullWidth: s = !1,
|
|
401
|
+
className: i,
|
|
402
|
+
type: c = "button",
|
|
403
|
+
raw: d = !1,
|
|
404
|
+
noBorder: n = !1,
|
|
405
|
+
"aria-label": g,
|
|
406
|
+
label: b,
|
|
407
|
+
size: h = "medium",
|
|
408
|
+
labelRight: m,
|
|
409
|
+
labelLeft: p,
|
|
410
|
+
noBackground: L = !1,
|
|
411
|
+
align: M = "center",
|
|
412
|
+
radius: T = "large",
|
|
413
|
+
variant: D = "secondary",
|
|
414
|
+
iconClassName: te,
|
|
415
|
+
animated: k = !1,
|
|
416
|
+
...re
|
|
417
|
+
}, ae) => {
|
|
418
|
+
const se = xe({
|
|
419
|
+
type: P,
|
|
420
|
+
mode: t,
|
|
421
|
+
focusMode: a,
|
|
422
|
+
fullWidth: s,
|
|
423
|
+
disabled: r,
|
|
424
|
+
raw: d,
|
|
425
|
+
className: i,
|
|
426
|
+
noBorder: n,
|
|
427
|
+
size: h,
|
|
428
|
+
labelRight: m,
|
|
429
|
+
labelLeft: p,
|
|
430
|
+
noBackground: L,
|
|
431
|
+
align: M,
|
|
432
|
+
radius: T,
|
|
433
|
+
variant: D,
|
|
434
|
+
animated: k
|
|
435
|
+
}), le = pe({ mode: t, raw: d, iconClassName: te, variant: D }), F = fe({ animated: k }), ie = "flex items-center justify-center relative w-full h-full overflow-hidden", [u, V] = j(), [y, O] = j(), [I, G] = j(), A = w(0), v = w(null), f = w(null), oe = Ne([ae, v]);
|
|
436
|
+
return q(() => {
|
|
437
|
+
I && I.current && k && (A.current = G.width + Be[h] + (n ? 0 : Te), v.current && !v.current.style.width && (v.current.style.width = `${E[h]}px`));
|
|
438
|
+
}, [G, I, h, n, k]), q(() => {
|
|
439
|
+
if (v && v.current && k) {
|
|
440
|
+
let x = E[h];
|
|
441
|
+
m && u && V.width > 0 ? x = V.width + A.current : p && y && O.width > 0 && (x = O.width + A.current), f.current && clearTimeout(f.current), x !== parseInt(v.current.style.width || "0", 10) && (u.current && (u.current.style.opacity = "0"), y.current && (y.current.style.opacity = "0"), v.current.style.width = `${x}px`, x > E[h] && (f.current = setTimeout(() => {
|
|
442
|
+
u.current && m && (u.current.style.opacity = "1"), y.current && p && (y.current.style.opacity = "1"), f.current = null;
|
|
443
|
+
}, Ie * 0.8))), x === E[h] && (u.current && (u.current.style.opacity = "0"), y.current && (y.current.style.opacity = "0"));
|
|
444
|
+
}
|
|
445
|
+
}, [
|
|
446
|
+
V,
|
|
447
|
+
m,
|
|
448
|
+
u,
|
|
449
|
+
O,
|
|
450
|
+
p,
|
|
451
|
+
y,
|
|
452
|
+
h,
|
|
453
|
+
k
|
|
454
|
+
]), W(() => () => {
|
|
455
|
+
f.current && clearTimeout(f.current);
|
|
456
|
+
}, []), /* @__PURE__ */ o(
|
|
457
|
+
X,
|
|
458
|
+
{
|
|
459
|
+
ref: oe,
|
|
460
|
+
className: se,
|
|
461
|
+
disabled: r,
|
|
462
|
+
type: c,
|
|
463
|
+
"aria-label": g || b,
|
|
464
|
+
...re,
|
|
465
|
+
children: /* @__PURE__ */ N("div", { className: ie, children: [
|
|
466
|
+
/* @__PURE__ */ o(
|
|
467
|
+
J,
|
|
468
|
+
{
|
|
469
|
+
label: p,
|
|
470
|
+
labelRef: y,
|
|
471
|
+
labelClass: F,
|
|
472
|
+
labelInnerClass: "pr-2",
|
|
473
|
+
initiallyHidden: k
|
|
474
|
+
}
|
|
475
|
+
),
|
|
476
|
+
/* @__PURE__ */ o("span", { ref: I, className: le, children: e }),
|
|
477
|
+
/* @__PURE__ */ o(
|
|
478
|
+
J,
|
|
479
|
+
{
|
|
480
|
+
label: m,
|
|
481
|
+
labelRef: u,
|
|
482
|
+
labelClass: F,
|
|
483
|
+
labelInnerClass: "pl-2",
|
|
484
|
+
initiallyHidden: k
|
|
485
|
+
}
|
|
486
|
+
)
|
|
487
|
+
] })
|
|
488
|
+
}
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
), J = ({
|
|
492
|
+
labelRef: e,
|
|
493
|
+
labelClass: r,
|
|
494
|
+
label: t,
|
|
495
|
+
labelInnerClass: a,
|
|
496
|
+
initiallyHidden: s = !1
|
|
497
|
+
}) => /* @__PURE__ */ o(
|
|
498
|
+
"span",
|
|
499
|
+
{
|
|
500
|
+
ref: e,
|
|
501
|
+
className: r,
|
|
502
|
+
style: s ? { opacity: 0 } : void 0,
|
|
503
|
+
children: t && /* @__PURE__ */ o("span", { className: a, children: t })
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
Z.displayName = "ButtonIcon";
|
|
507
|
+
/*!
|
|
508
|
+
@versini/ui-button v8.0.0
|
|
509
|
+
© 2025 gizmette.com
|
|
510
|
+
*/
|
|
511
|
+
try {
|
|
512
|
+
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
513
|
+
version: "8.0.0",
|
|
514
|
+
buildTime: "09/01/2025 03:17 PM EDT",
|
|
515
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
516
|
+
license: "MIT"
|
|
517
|
+
});
|
|
518
|
+
} catch {
|
|
519
|
+
}
|
|
520
|
+
const ee = z.forwardRef(
|
|
521
|
+
({
|
|
522
|
+
children: e,
|
|
523
|
+
mode: r = "system",
|
|
524
|
+
className: t,
|
|
525
|
+
active: a = !1,
|
|
526
|
+
...s
|
|
527
|
+
}, i) => {
|
|
528
|
+
const c = a ? l(
|
|
529
|
+
"relative",
|
|
530
|
+
"focus-within:static",
|
|
531
|
+
"focus-within:after:border-transparent",
|
|
532
|
+
"after:absolute",
|
|
533
|
+
"after:content-['']",
|
|
534
|
+
"after:border-b-2",
|
|
535
|
+
"after:bottom-[-4px]",
|
|
536
|
+
"after:left-0",
|
|
537
|
+
"after:right-0",
|
|
538
|
+
{
|
|
539
|
+
"after:border-table-dark": r === "dark",
|
|
540
|
+
"after:border-table-light": r === "light",
|
|
541
|
+
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
542
|
+
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
543
|
+
}
|
|
544
|
+
) : "";
|
|
545
|
+
return /* @__PURE__ */ o("div", { className: c, children: /* @__PURE__ */ o(
|
|
546
|
+
Z,
|
|
547
|
+
{
|
|
548
|
+
className: t,
|
|
549
|
+
ref: i,
|
|
550
|
+
mode: r,
|
|
551
|
+
radius: "small",
|
|
552
|
+
size: "small",
|
|
553
|
+
align: "center",
|
|
554
|
+
...s,
|
|
555
|
+
children: e
|
|
556
|
+
}
|
|
557
|
+
) });
|
|
558
|
+
}
|
|
559
|
+
);
|
|
560
|
+
ee.displayName = "ButtonSort";
|
|
561
|
+
const $ = ({
|
|
562
|
+
children: e,
|
|
563
|
+
fill: r,
|
|
564
|
+
viewBox: t,
|
|
565
|
+
className: a,
|
|
566
|
+
defaultViewBox: s,
|
|
567
|
+
size: i,
|
|
568
|
+
title: c,
|
|
569
|
+
semantic: d = !1,
|
|
570
|
+
...n
|
|
571
|
+
}) => {
|
|
572
|
+
const g = l(i, a);
|
|
573
|
+
return /* @__PURE__ */ N(
|
|
574
|
+
"svg",
|
|
575
|
+
{
|
|
576
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
577
|
+
className: g,
|
|
578
|
+
viewBox: t || s,
|
|
579
|
+
fill: r || "currentColor",
|
|
580
|
+
role: "img",
|
|
581
|
+
"aria-hidden": !d,
|
|
582
|
+
focusable: !1,
|
|
583
|
+
...n,
|
|
584
|
+
children: [
|
|
585
|
+
c && d && /* @__PURE__ */ o("title", { children: c }),
|
|
586
|
+
e
|
|
587
|
+
]
|
|
588
|
+
}
|
|
589
|
+
);
|
|
590
|
+
};
|
|
591
|
+
/*!
|
|
592
|
+
@versini/ui-svgicon v4.2.1
|
|
593
|
+
© 2025 gizmette.com
|
|
594
|
+
*/
|
|
595
|
+
try {
|
|
596
|
+
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
597
|
+
version: "4.2.1",
|
|
598
|
+
buildTime: "08/27/2025 08:27 AM EDT",
|
|
599
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
600
|
+
license: "MIT"
|
|
601
|
+
});
|
|
602
|
+
} catch {
|
|
603
|
+
}
|
|
604
|
+
const Re = ({
|
|
605
|
+
className: e,
|
|
606
|
+
viewBox: r,
|
|
607
|
+
title: t,
|
|
608
|
+
monotone: a,
|
|
609
|
+
...s
|
|
610
|
+
}) => /* @__PURE__ */ N(
|
|
611
|
+
$,
|
|
612
|
+
{
|
|
613
|
+
defaultViewBox: "0 0 576 512",
|
|
614
|
+
size: "size-5",
|
|
615
|
+
viewBox: r,
|
|
616
|
+
className: e,
|
|
617
|
+
title: t || "Sort",
|
|
618
|
+
...s,
|
|
619
|
+
children: [
|
|
620
|
+
/* @__PURE__ */ o(
|
|
621
|
+
"path",
|
|
622
|
+
{
|
|
623
|
+
d: "M297.4 137.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l41.3-41.4V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.3l41.4 41.4c12.5 12.5 32.8 12.5 45.3 0 6.2-6.2 9.4-14.4 9.4-22.6s-3.1-16.4-9.4-22.6l-96-96c-6.3-6.4-14.5-9.5-22.7-9.5s-16.4 3.1-22.6 9.4z",
|
|
624
|
+
opacity: a ? "1" : "0.4"
|
|
625
|
+
}
|
|
626
|
+
),
|
|
627
|
+
/* @__PURE__ */ o("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v306.7l-41.4-41.3c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
), Ee = ({
|
|
631
|
+
className: e,
|
|
632
|
+
viewBox: r,
|
|
633
|
+
title: t,
|
|
634
|
+
monotone: a,
|
|
635
|
+
...s
|
|
636
|
+
}) => /* @__PURE__ */ N(
|
|
637
|
+
$,
|
|
638
|
+
{
|
|
639
|
+
defaultViewBox: "0 0 576 512",
|
|
640
|
+
size: "size-5",
|
|
641
|
+
viewBox: r,
|
|
642
|
+
className: e,
|
|
643
|
+
title: t || "Sort Down",
|
|
644
|
+
...s,
|
|
645
|
+
children: [
|
|
646
|
+
/* @__PURE__ */ o(
|
|
647
|
+
"path",
|
|
648
|
+
{
|
|
649
|
+
d: "M288 64c0-17.7 14.3-32 32-32h224c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h160c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32h-96c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32h-32c-17.7 0-32-14.3-32-32",
|
|
650
|
+
opacity: a ? "1" : "0.4"
|
|
651
|
+
}
|
|
652
|
+
),
|
|
653
|
+
/* @__PURE__ */ o("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32S96 46.3 96 64v301.7l-32.4-35.3c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96c6.1 6.6 14.6 10.4 23.6 10.4" })
|
|
654
|
+
]
|
|
655
|
+
}
|
|
656
|
+
), ze = ({
|
|
657
|
+
className: e,
|
|
658
|
+
viewBox: r,
|
|
659
|
+
title: t,
|
|
660
|
+
monotone: a,
|
|
661
|
+
...s
|
|
662
|
+
}) => /* @__PURE__ */ N(
|
|
663
|
+
$,
|
|
664
|
+
{
|
|
665
|
+
defaultViewBox: "0 0 576 512",
|
|
666
|
+
size: "size-5",
|
|
667
|
+
viewBox: r,
|
|
668
|
+
className: e,
|
|
669
|
+
title: t || "Sort Up",
|
|
670
|
+
...s,
|
|
671
|
+
children: [
|
|
672
|
+
/* @__PURE__ */ o(
|
|
673
|
+
"path",
|
|
674
|
+
{
|
|
675
|
+
d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32h-32c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32h-96c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h160c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h224c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32",
|
|
676
|
+
opacity: a ? "1" : "0.4"
|
|
677
|
+
}
|
|
678
|
+
),
|
|
679
|
+
/* @__PURE__ */ o("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3l-32.4 35.3c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32" })
|
|
680
|
+
]
|
|
681
|
+
}
|
|
682
|
+
);
|
|
683
|
+
/*!
|
|
684
|
+
@versini/ui-icons v4.11.0
|
|
685
|
+
© 2025 gizmette.com
|
|
686
|
+
*/
|
|
687
|
+
try {
|
|
688
|
+
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
689
|
+
version: "4.11.0",
|
|
690
|
+
buildTime: "08/27/2025 08:28 AM EDT",
|
|
691
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
692
|
+
license: "MIT"
|
|
693
|
+
});
|
|
694
|
+
} catch {
|
|
695
|
+
}
|
|
696
|
+
const C = z.createContext({
|
|
8
697
|
mode: "light",
|
|
9
698
|
cellWrapper: "thead",
|
|
10
699
|
stickyHeader: !1,
|
|
11
700
|
stickyFooter: !1,
|
|
12
701
|
compact: !1
|
|
13
|
-
}),
|
|
14
|
-
mode:
|
|
15
|
-
className:
|
|
16
|
-
wrapperClassName:
|
|
17
|
-
stickyHeader:
|
|
702
|
+
}), S = "thead", H = "tfoot", _ = "tbody", Se = ({
|
|
703
|
+
mode: e,
|
|
704
|
+
className: r,
|
|
705
|
+
wrapperClassName: t,
|
|
706
|
+
stickyHeader: a,
|
|
18
707
|
stickyFooter: s
|
|
19
708
|
}) => ({
|
|
20
|
-
wrapper:
|
|
709
|
+
wrapper: l(
|
|
21
710
|
"not-prose relative w-full rounded-lg shadow-md",
|
|
22
711
|
{
|
|
23
|
-
"overflow-x-auto": !
|
|
24
|
-
"overflow-y-scroll":
|
|
25
|
-
"bg-surface-darker":
|
|
26
|
-
"bg-surface-light":
|
|
27
|
-
"dark:bg-surface-light":
|
|
28
|
-
"dark:bg-surface-darker":
|
|
29
|
-
"text-copy-light":
|
|
30
|
-
"text-copy-dark":
|
|
31
|
-
"text-copy-light dark:text-copy-dark":
|
|
32
|
-
"text-copy-dark dark:text-copy-light":
|
|
712
|
+
"overflow-x-auto": !a && !s,
|
|
713
|
+
"overflow-y-scroll": a || s,
|
|
714
|
+
"bg-surface-darker": e === "dark" || e === "system",
|
|
715
|
+
"bg-surface-light": e === "light" || e === "alt-system",
|
|
716
|
+
"dark:bg-surface-light": e === "system",
|
|
717
|
+
"dark:bg-surface-darker": e === "alt-system",
|
|
718
|
+
"text-copy-light": e === "dark",
|
|
719
|
+
"text-copy-dark": e === "light",
|
|
720
|
+
"text-copy-light dark:text-copy-dark": e === "system",
|
|
721
|
+
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
33
722
|
},
|
|
34
|
-
|
|
723
|
+
t
|
|
35
724
|
),
|
|
36
|
-
table:
|
|
37
|
-
"text-copy-light":
|
|
38
|
-
"text-copy-dark":
|
|
39
|
-
"text-copy-light dark:text-copy-dark":
|
|
40
|
-
"text-copy-dark dark:text-copy-light":
|
|
725
|
+
table: l("my-0 w-full text-left text-sm", r, {
|
|
726
|
+
"text-copy-light": e === "dark",
|
|
727
|
+
"text-copy-dark": e === "light",
|
|
728
|
+
"text-copy-light dark:text-copy-dark": e === "system",
|
|
729
|
+
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
41
730
|
}),
|
|
42
|
-
caption:
|
|
43
|
-
"text-copy-light":
|
|
44
|
-
"text-copy-dark":
|
|
45
|
-
"text-copy-light dark:text-copy-dark":
|
|
46
|
-
"text-copy-dark dark:text-copy-light":
|
|
731
|
+
caption: l("py-2 text-sm font-bold", {
|
|
732
|
+
"text-copy-light": e === "dark",
|
|
733
|
+
"text-copy-dark": e === "light",
|
|
734
|
+
"text-copy-light dark:text-copy-dark": e === "system",
|
|
735
|
+
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
47
736
|
})
|
|
48
|
-
}),
|
|
49
|
-
className:
|
|
50
|
-
stickyHeader:
|
|
51
|
-
mode:
|
|
52
|
-
}) =>
|
|
737
|
+
}), Le = ({
|
|
738
|
+
className: e,
|
|
739
|
+
stickyHeader: r,
|
|
740
|
+
mode: t
|
|
741
|
+
}) => l(
|
|
53
742
|
{
|
|
54
|
-
"sticky top-0 z-10":
|
|
55
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]":
|
|
56
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]":
|
|
57
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]":
|
|
58
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]":
|
|
743
|
+
"sticky top-0 z-10": r,
|
|
744
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "dark",
|
|
745
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "system",
|
|
746
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "light",
|
|
747
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "alt-system"
|
|
59
748
|
},
|
|
60
|
-
|
|
61
|
-
),
|
|
62
|
-
className:
|
|
63
|
-
stickyFooter:
|
|
64
|
-
mode:
|
|
65
|
-
}) =>
|
|
749
|
+
e
|
|
750
|
+
), Me = ({
|
|
751
|
+
className: e,
|
|
752
|
+
stickyFooter: r,
|
|
753
|
+
mode: t
|
|
754
|
+
}) => l(
|
|
66
755
|
{
|
|
67
|
-
"sticky bottom-0 z-10":
|
|
68
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]":
|
|
69
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]":
|
|
70
|
-
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]":
|
|
71
|
-
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]":
|
|
756
|
+
"sticky bottom-0 z-10": r,
|
|
757
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "dark",
|
|
758
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "system",
|
|
759
|
+
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "light",
|
|
760
|
+
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "alt-system"
|
|
72
761
|
},
|
|
73
|
-
|
|
74
|
-
),
|
|
75
|
-
mode:
|
|
76
|
-
className:
|
|
77
|
-
cellWrapper:
|
|
78
|
-
}) =>
|
|
762
|
+
e
|
|
763
|
+
), Ve = ({
|
|
764
|
+
mode: e,
|
|
765
|
+
className: r,
|
|
766
|
+
cellWrapper: t
|
|
767
|
+
}) => t === S || t === H ? l(
|
|
79
768
|
{
|
|
80
|
-
"bg-table-head-dark":
|
|
81
|
-
"bg-table-head-light":
|
|
82
|
-
"dark:bg-table-head-light":
|
|
83
|
-
"dark:bg-table-head-dark":
|
|
769
|
+
"bg-table-head-dark": e === "dark" || e === "system",
|
|
770
|
+
"bg-table-head-light": e === "light" || e === "alt-system",
|
|
771
|
+
"dark:bg-table-head-light": e === "system",
|
|
772
|
+
"dark:bg-table-head-dark": e === "alt-system"
|
|
84
773
|
},
|
|
85
|
-
|
|
86
|
-
) :
|
|
774
|
+
r
|
|
775
|
+
) : l(
|
|
87
776
|
"border-b last:border-0",
|
|
88
777
|
{
|
|
89
|
-
"border-table-dark":
|
|
90
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even":
|
|
91
|
-
"border-table-light":
|
|
92
|
-
"odd:bg-table-light-odd even:bg-table-light-even":
|
|
93
|
-
"dark:border-table-light":
|
|
94
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even":
|
|
95
|
-
"dark:border-table-dark":
|
|
96
|
-
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even":
|
|
778
|
+
"border-table-dark": e === "dark" || e === "system",
|
|
779
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even": t === _ && e === "dark",
|
|
780
|
+
"border-table-light": e === "light" || e === "alt-system",
|
|
781
|
+
"odd:bg-table-light-odd even:bg-table-light-even": t === _ && e === "light",
|
|
782
|
+
"dark:border-table-light": e === "system",
|
|
783
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === _ && e === "system",
|
|
784
|
+
"dark:border-table-dark": e === "alt-system",
|
|
785
|
+
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === _ && e === "alt-system"
|
|
97
786
|
},
|
|
98
|
-
|
|
99
|
-
),
|
|
100
|
-
cellWrapper:
|
|
101
|
-
className:
|
|
102
|
-
compact:
|
|
103
|
-
mode:
|
|
787
|
+
r
|
|
788
|
+
), Oe = ({
|
|
789
|
+
cellWrapper: e,
|
|
790
|
+
className: r,
|
|
791
|
+
compact: t,
|
|
792
|
+
mode: a,
|
|
104
793
|
align: s
|
|
105
794
|
}) => ({
|
|
106
|
-
alignClasses:
|
|
795
|
+
alignClasses: l({
|
|
107
796
|
"flex justify-start text-left": s === "left",
|
|
108
797
|
"flex justify-center text-center": s === "center",
|
|
109
798
|
"flex justify-end text-right": s === "right"
|
|
110
799
|
}),
|
|
111
|
-
mainClasses:
|
|
800
|
+
mainClasses: l(
|
|
112
801
|
{
|
|
113
|
-
"text-copy-light":
|
|
114
|
-
"text-copy-dark":
|
|
115
|
-
"dark:text-copy-dark":
|
|
116
|
-
"dark:text-copy-light":
|
|
117
|
-
"px-4 py-3": !
|
|
118
|
-
"p-4": !
|
|
119
|
-
"px-2 py-1.5":
|
|
802
|
+
"text-copy-light": a === "dark" || a === "system",
|
|
803
|
+
"text-copy-dark": a === "light" || a === "alt-system",
|
|
804
|
+
"dark:text-copy-dark": a === "system",
|
|
805
|
+
"dark:text-copy-light": a === "alt-system",
|
|
806
|
+
"px-4 py-3": !t && (e === S || e === H),
|
|
807
|
+
"p-4": !t && e === _,
|
|
808
|
+
"px-2 py-1.5": t
|
|
120
809
|
},
|
|
121
|
-
|
|
810
|
+
r
|
|
122
811
|
)
|
|
123
|
-
}),
|
|
124
|
-
buttonClassName:
|
|
125
|
-
}) =>
|
|
126
|
-
children:
|
|
127
|
-
mode:
|
|
128
|
-
caption:
|
|
129
|
-
compact:
|
|
812
|
+
}), Ae = ({
|
|
813
|
+
buttonClassName: e
|
|
814
|
+
}) => l("rounded-none text-sm", e), He = ({
|
|
815
|
+
children: e,
|
|
816
|
+
mode: r = "system",
|
|
817
|
+
caption: t,
|
|
818
|
+
compact: a,
|
|
130
819
|
summary: s,
|
|
131
|
-
className:
|
|
132
|
-
wrapperClassName:
|
|
133
|
-
maxHeight:
|
|
820
|
+
className: i,
|
|
821
|
+
wrapperClassName: c,
|
|
822
|
+
maxHeight: d,
|
|
134
823
|
stickyHeader: n,
|
|
135
|
-
stickyFooter:
|
|
136
|
-
...
|
|
824
|
+
stickyFooter: g,
|
|
825
|
+
...b
|
|
137
826
|
}) => {
|
|
138
|
-
const
|
|
139
|
-
mode:
|
|
140
|
-
className:
|
|
141
|
-
wrapperClassName:
|
|
827
|
+
const h = Se({
|
|
828
|
+
mode: r,
|
|
829
|
+
className: i,
|
|
830
|
+
wrapperClassName: c,
|
|
142
831
|
stickyHeader: n,
|
|
143
|
-
stickyFooter:
|
|
832
|
+
stickyFooter: g
|
|
144
833
|
});
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
|
|
834
|
+
return /* @__PURE__ */ o(
|
|
835
|
+
C.Provider,
|
|
147
836
|
{
|
|
148
|
-
value: { mode:
|
|
149
|
-
children: /* @__PURE__ */
|
|
837
|
+
value: { mode: r, stickyHeader: n, stickyFooter: g, compact: a },
|
|
838
|
+
children: /* @__PURE__ */ o(
|
|
150
839
|
"div",
|
|
151
840
|
{
|
|
152
|
-
className:
|
|
153
|
-
...
|
|
154
|
-
style: { maxHeight:
|
|
841
|
+
className: h.wrapper,
|
|
842
|
+
...d && {
|
|
843
|
+
style: { maxHeight: d }
|
|
155
844
|
},
|
|
156
|
-
children: /* @__PURE__ */
|
|
157
|
-
|
|
158
|
-
|
|
845
|
+
children: /* @__PURE__ */ N("table", { className: h.table, summary: s, ...b, children: [
|
|
846
|
+
t && /* @__PURE__ */ o("caption", { className: h.caption, children: t }),
|
|
847
|
+
e
|
|
159
848
|
] })
|
|
160
849
|
}
|
|
161
850
|
)
|
|
162
851
|
}
|
|
163
852
|
);
|
|
164
|
-
},
|
|
165
|
-
children:
|
|
166
|
-
className:
|
|
167
|
-
...
|
|
853
|
+
}, De = ({
|
|
854
|
+
children: e,
|
|
855
|
+
className: r,
|
|
856
|
+
...t
|
|
168
857
|
}) => {
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
const s =
|
|
172
|
-
className:
|
|
173
|
-
mode:
|
|
174
|
-
stickyHeader:
|
|
858
|
+
const a = B(C);
|
|
859
|
+
a.cellWrapper = S;
|
|
860
|
+
const s = Le({
|
|
861
|
+
className: r,
|
|
862
|
+
mode: a.mode,
|
|
863
|
+
stickyHeader: a.stickyHeader
|
|
175
864
|
});
|
|
176
|
-
return /* @__PURE__ */
|
|
177
|
-
},
|
|
178
|
-
children:
|
|
179
|
-
className:
|
|
180
|
-
...
|
|
865
|
+
return /* @__PURE__ */ o("thead", { className: s, ...t, children: e });
|
|
866
|
+
}, Fe = ({
|
|
867
|
+
children: e,
|
|
868
|
+
className: r,
|
|
869
|
+
...t
|
|
181
870
|
}) => {
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
const s =
|
|
185
|
-
className:
|
|
186
|
-
mode:
|
|
187
|
-
stickyFooter:
|
|
871
|
+
const a = B(C);
|
|
872
|
+
a.cellWrapper = H;
|
|
873
|
+
const s = Me({
|
|
874
|
+
className: r,
|
|
875
|
+
mode: a.mode,
|
|
876
|
+
stickyFooter: a.stickyFooter
|
|
188
877
|
});
|
|
189
|
-
return /* @__PURE__ */
|
|
190
|
-
},
|
|
191
|
-
const
|
|
192
|
-
return
|
|
193
|
-
},
|
|
194
|
-
children:
|
|
195
|
-
className:
|
|
196
|
-
...
|
|
878
|
+
return /* @__PURE__ */ o("tfoot", { className: s, ...t, children: e });
|
|
879
|
+
}, Ge = ({ children: e, ...r }) => {
|
|
880
|
+
const t = B(C);
|
|
881
|
+
return t.cellWrapper = _, /* @__PURE__ */ o("tbody", { ...r, children: e });
|
|
882
|
+
}, qe = ({
|
|
883
|
+
children: e,
|
|
884
|
+
className: r,
|
|
885
|
+
...t
|
|
197
886
|
}) => {
|
|
198
|
-
const
|
|
199
|
-
mode:
|
|
200
|
-
cellWrapper:
|
|
201
|
-
className:
|
|
887
|
+
const a = B(C), s = Ve({
|
|
888
|
+
mode: a.mode,
|
|
889
|
+
cellWrapper: a.cellWrapper,
|
|
890
|
+
className: r
|
|
202
891
|
});
|
|
203
|
-
return /* @__PURE__ */
|
|
204
|
-
},
|
|
205
|
-
children:
|
|
206
|
-
component:
|
|
207
|
-
className:
|
|
208
|
-
align:
|
|
892
|
+
return /* @__PURE__ */ o("tr", { className: s, ...t, children: e });
|
|
893
|
+
}, je = ({
|
|
894
|
+
children: e,
|
|
895
|
+
component: r,
|
|
896
|
+
className: t,
|
|
897
|
+
align: a,
|
|
209
898
|
...s
|
|
210
899
|
}) => {
|
|
211
|
-
const
|
|
212
|
-
cellWrapper:
|
|
213
|
-
className:
|
|
214
|
-
mode:
|
|
215
|
-
compact:
|
|
216
|
-
align:
|
|
900
|
+
const i = B(C), c = r || (i.cellWrapper === S ? "th" : "td"), { mainClasses: d, alignClasses: n } = Oe({
|
|
901
|
+
cellWrapper: i.cellWrapper,
|
|
902
|
+
className: t,
|
|
903
|
+
mode: i.mode,
|
|
904
|
+
compact: i.compact,
|
|
905
|
+
align: a
|
|
217
906
|
});
|
|
218
|
-
return
|
|
219
|
-
},
|
|
220
|
-
align:
|
|
221
|
-
children:
|
|
222
|
-
buttonClassName:
|
|
223
|
-
className:
|
|
907
|
+
return a ? /* @__PURE__ */ o(c, { className: d, ...s, children: /* @__PURE__ */ o("div", { className: n, children: e }) }) : /* @__PURE__ */ o(c, { className: d, ...s, children: e });
|
|
908
|
+
}, Ye = ({
|
|
909
|
+
align: e,
|
|
910
|
+
children: r,
|
|
911
|
+
buttonClassName: t,
|
|
912
|
+
className: a,
|
|
224
913
|
component: s,
|
|
225
|
-
focusMode:
|
|
226
|
-
mode:
|
|
227
|
-
onClick:
|
|
914
|
+
focusMode: i = "alt-system",
|
|
915
|
+
mode: c = "alt-system",
|
|
916
|
+
onClick: d,
|
|
228
917
|
sortDirection: n,
|
|
229
|
-
sortedCell:
|
|
230
|
-
cellId:
|
|
231
|
-
...
|
|
918
|
+
sortedCell: g,
|
|
919
|
+
cellId: b,
|
|
920
|
+
...h
|
|
232
921
|
}) => {
|
|
233
|
-
const
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
|
|
922
|
+
const m = Ae({ buttonClassName: t });
|
|
923
|
+
return /* @__PURE__ */ o(
|
|
924
|
+
je,
|
|
236
925
|
{
|
|
237
926
|
component: s,
|
|
238
|
-
className:
|
|
927
|
+
className: a,
|
|
239
928
|
role: "columnheader",
|
|
240
|
-
"aria-sort": n ===
|
|
241
|
-
...
|
|
242
|
-
children: /* @__PURE__ */
|
|
243
|
-
|
|
929
|
+
"aria-sort": n === R.ASC && g === b ? "ascending" : n === R.DESC && g === b ? "descending" : "other",
|
|
930
|
+
...h,
|
|
931
|
+
children: /* @__PURE__ */ o(
|
|
932
|
+
ee,
|
|
244
933
|
{
|
|
245
|
-
active:
|
|
246
|
-
className:
|
|
247
|
-
onClick:
|
|
248
|
-
align:
|
|
934
|
+
active: g === b,
|
|
935
|
+
className: m,
|
|
936
|
+
onClick: d,
|
|
937
|
+
align: e,
|
|
249
938
|
noBorder: !0,
|
|
250
|
-
focusMode:
|
|
251
|
-
mode:
|
|
939
|
+
focusMode: i,
|
|
940
|
+
mode: c,
|
|
252
941
|
fullWidth: !0,
|
|
253
|
-
labelRight:
|
|
254
|
-
children: n ===
|
|
942
|
+
labelRight: r,
|
|
943
|
+
children: n === R.ASC && g === b ? /* @__PURE__ */ o(ze, { className: "size-4", monotone: !0 }) : n === R.DESC && g === b ? /* @__PURE__ */ o(Ee, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ o(Re, { className: "size-4", monotone: !0 })
|
|
255
944
|
}
|
|
256
945
|
)
|
|
257
946
|
}
|
|
258
947
|
);
|
|
259
948
|
};
|
|
260
949
|
export {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
950
|
+
He as Table,
|
|
951
|
+
Ge as TableBody,
|
|
952
|
+
je as TableCell,
|
|
953
|
+
Ye as TableCellSort,
|
|
954
|
+
Fe as TableFooter,
|
|
955
|
+
De as TableHead,
|
|
956
|
+
qe as TableRow
|
|
268
957
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Table as r, TableBody as i, TableCell as T, TableCellSort as a, TableFooter as t, TableHead as _, TableRow as b } from "./components/Table/Table.js";
|
|
2
2
|
import { TableCellSortDirections as I } from "./components/TableConstants/TableConstants.js";
|
|
3
3
|
/*!
|
|
4
|
-
@versini/ui-table
|
|
4
|
+
@versini/ui-table v5.0.0
|
|
5
5
|
© 2025 gizmette.com
|
|
6
6
|
*/
|
|
7
7
|
try {
|
|
8
8
|
window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
|
|
9
|
-
version: "
|
|
10
|
-
buildTime: "09/01/2025
|
|
9
|
+
version: "5.0.0",
|
|
10
|
+
buildTime: "09/01/2025 03:18 PM EDT",
|
|
11
11
|
homepage: "https://github.com/aversini/ui-components",
|
|
12
12
|
license: "MIT"
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -51,22 +51,22 @@
|
|
|
51
51
|
"test": "vitest run"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"react": "^
|
|
55
|
-
"react-dom": "^
|
|
54
|
+
"react": "^19.0.0",
|
|
55
|
+
"react-dom": "^19.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@testing-library/jest-dom": "6.8.0",
|
|
59
|
-
"@versini/ui-types": "
|
|
59
|
+
"@versini/ui-types": "6.0.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@tailwindcss/typography": "0.5.16",
|
|
63
|
-
"@versini/ui-button": "
|
|
64
|
-
"@versini/ui-icons": "4.
|
|
63
|
+
"@versini/ui-button": "8.0.0",
|
|
64
|
+
"@versini/ui-icons": "4.11.0",
|
|
65
65
|
"clsx": "2.1.1",
|
|
66
66
|
"tailwindcss": "4.1.12"
|
|
67
67
|
},
|
|
68
68
|
"sideEffects": [
|
|
69
69
|
"**/*.css"
|
|
70
70
|
],
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "70a47e9e30172dbb7b36306773fe9511e437fba6"
|
|
72
72
|
}
|