@versini/ui-table 3.0.1 → 3.0.3
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/index.js +127 -131
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx as
|
|
1
|
+
import s from "clsx";
|
|
2
|
+
import { jsx as i, jsxs as y, Fragment as j } from "react/jsx-runtime";
|
|
3
3
|
import T, { useContext as p } from "react";
|
|
4
4
|
/*!
|
|
5
|
-
@versini/ui-table v3.0.
|
|
5
|
+
@versini/ui-table v3.0.3
|
|
6
6
|
© 2025 gizmette.com
|
|
7
7
|
*/
|
|
8
8
|
try {
|
|
9
9
|
window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
|
|
10
|
-
version: "3.0.
|
|
11
|
-
buildTime: "01/
|
|
10
|
+
version: "3.0.3",
|
|
11
|
+
buildTime: "01/04/2025 01:33 PM EST",
|
|
12
12
|
homepage: "https://github.com/aversini/ui-components",
|
|
13
13
|
license: "MIT"
|
|
14
14
|
});
|
|
@@ -17,14 +17,14 @@ try {
|
|
|
17
17
|
const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
18
18
|
ASC: "asc",
|
|
19
19
|
DESC: "desc"
|
|
20
|
-
},
|
|
20
|
+
}, A = ({
|
|
21
21
|
mode: e,
|
|
22
22
|
className: a,
|
|
23
23
|
wrapperClassName: t,
|
|
24
24
|
stickyHeader: r,
|
|
25
25
|
stickyFooter: o
|
|
26
26
|
}) => ({
|
|
27
|
-
wrapper:
|
|
27
|
+
wrapper: s(
|
|
28
28
|
"not-prose relative w-full rounded-lg shadow-md",
|
|
29
29
|
{
|
|
30
30
|
"overflow-x-auto": !r && !o,
|
|
@@ -40,23 +40,23 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
40
40
|
},
|
|
41
41
|
t
|
|
42
42
|
),
|
|
43
|
-
table:
|
|
43
|
+
table: s("my-0 w-full text-left text-sm", a, {
|
|
44
44
|
"text-copy-light": e === "dark",
|
|
45
45
|
"text-copy-dark": e === "light",
|
|
46
46
|
"text-copy-light dark:text-copy-dark": e === "system",
|
|
47
47
|
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
48
48
|
}),
|
|
49
|
-
caption:
|
|
49
|
+
caption: s("py-2 text-sm font-bold", {
|
|
50
50
|
"text-copy-light": e === "dark",
|
|
51
51
|
"text-copy-dark": e === "light",
|
|
52
52
|
"text-copy-light dark:text-copy-dark": e === "system",
|
|
53
53
|
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
54
54
|
})
|
|
55
|
-
}),
|
|
55
|
+
}), W = ({
|
|
56
56
|
className: e,
|
|
57
57
|
stickyHeader: a,
|
|
58
58
|
mode: t
|
|
59
|
-
}) =>
|
|
59
|
+
}) => s(
|
|
60
60
|
{
|
|
61
61
|
"sticky top-0 z-10": a,
|
|
62
62
|
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": a && t === "dark",
|
|
@@ -69,7 +69,7 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
69
69
|
className: e,
|
|
70
70
|
stickyFooter: a,
|
|
71
71
|
mode: t
|
|
72
|
-
}) =>
|
|
72
|
+
}) => s(
|
|
73
73
|
{
|
|
74
74
|
"sticky bottom-0 z-10": a,
|
|
75
75
|
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": a && t === "dark",
|
|
@@ -82,7 +82,7 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
82
82
|
mode: e,
|
|
83
83
|
className: a,
|
|
84
84
|
cellWrapper: t
|
|
85
|
-
}) => t === _ || t === C ?
|
|
85
|
+
}) => t === _ || t === C ? s(
|
|
86
86
|
{
|
|
87
87
|
"bg-table-head-dark": e === "dark" || e === "system",
|
|
88
88
|
"bg-table-head-light": e === "light" || e === "alt-system",
|
|
@@ -90,7 +90,7 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
90
90
|
"dark:bg-table-head-dark": e === "alt-system"
|
|
91
91
|
},
|
|
92
92
|
a
|
|
93
|
-
) :
|
|
93
|
+
) : s(
|
|
94
94
|
"border-b last:border-0",
|
|
95
95
|
{
|
|
96
96
|
"border-table-dark": e === "dark" || e === "system",
|
|
@@ -110,12 +110,12 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
110
110
|
mode: r,
|
|
111
111
|
align: o
|
|
112
112
|
}) => ({
|
|
113
|
-
alignClasses:
|
|
113
|
+
alignClasses: s({
|
|
114
114
|
"flex justify-start text-left": o === "left",
|
|
115
115
|
"flex justify-center text-center": o === "center",
|
|
116
116
|
"flex justify-end text-right": o === "right"
|
|
117
117
|
}),
|
|
118
|
-
mainClasses:
|
|
118
|
+
mainClasses: s(
|
|
119
119
|
{
|
|
120
120
|
"text-copy-light": r === "dark" || r === "system",
|
|
121
121
|
"text-copy-dark": r === "light" || r === "alt-system",
|
|
@@ -129,24 +129,24 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
129
129
|
)
|
|
130
130
|
}), Y = ({
|
|
131
131
|
buttonClassName: e
|
|
132
|
-
}) =>
|
|
132
|
+
}) => s("rounded-none text-sm", e), I = "av-button", B = "icon", S = "button", N = "link", q = ({
|
|
133
133
|
type: e,
|
|
134
134
|
size: a,
|
|
135
135
|
labelRight: t,
|
|
136
136
|
labelLeft: r,
|
|
137
137
|
align: o
|
|
138
138
|
}) => {
|
|
139
|
-
const l = "max-h-8 py-0 px-2",
|
|
139
|
+
const l = "max-h-8 py-0 px-2", c = "max-h-9 py-1 px-3", d = "max-h-12 py-2 px-4";
|
|
140
140
|
switch (e) {
|
|
141
141
|
case S:
|
|
142
142
|
case N:
|
|
143
|
-
return
|
|
143
|
+
return s({
|
|
144
144
|
[l]: a === "small",
|
|
145
|
-
[
|
|
146
|
-
[
|
|
145
|
+
[c]: a === "medium",
|
|
146
|
+
[d]: a === "large"
|
|
147
147
|
});
|
|
148
148
|
case B:
|
|
149
|
-
return
|
|
149
|
+
return s("inline-flex items-center", {
|
|
150
150
|
"justify-center": o === "center",
|
|
151
151
|
"justify-start": o === "left",
|
|
152
152
|
"justify-end": o === "right",
|
|
@@ -164,21 +164,21 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
164
164
|
labelRight: t,
|
|
165
165
|
labelLeft: r
|
|
166
166
|
}) => {
|
|
167
|
-
const o = "text-sm font-medium", l = "text-base font-medium",
|
|
167
|
+
const o = "text-sm font-medium", l = "text-base font-medium", c = "text-lg font-medium";
|
|
168
168
|
switch (e) {
|
|
169
169
|
case S:
|
|
170
170
|
case N:
|
|
171
|
-
return
|
|
171
|
+
return s({
|
|
172
172
|
"text-center": e === N,
|
|
173
173
|
[o]: a === "small",
|
|
174
174
|
[l]: a === "medium",
|
|
175
|
-
[
|
|
175
|
+
[c]: a === "large"
|
|
176
176
|
});
|
|
177
177
|
case B:
|
|
178
|
-
return
|
|
178
|
+
return s({
|
|
179
179
|
[o]: a === "small" && (t || r),
|
|
180
180
|
[l]: a === "medium" && (t || r),
|
|
181
|
-
[
|
|
181
|
+
[c]: a === "large" && (t || r)
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
}, K = ({
|
|
@@ -190,36 +190,32 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
190
190
|
if (a)
|
|
191
191
|
return "not-prose";
|
|
192
192
|
if (r === "primary")
|
|
193
|
-
return
|
|
193
|
+
return s("not-prose", {
|
|
194
194
|
truncate: !t,
|
|
195
|
-
"text-copy-light": e === "dark",
|
|
196
|
-
"text-copy-lighter": e === "light",
|
|
197
|
-
"
|
|
198
|
-
"
|
|
195
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
196
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
197
|
+
"dark:text-copy-lighter": e === "system",
|
|
198
|
+
"dark:text-copy-light": e === "alt-system"
|
|
199
199
|
});
|
|
200
200
|
if (r === "secondary")
|
|
201
|
-
return
|
|
201
|
+
return s("not-prose", {
|
|
202
202
|
truncate: !t,
|
|
203
|
-
"text-copy-light": e === "light",
|
|
204
|
-
"text-copy-lighter": e === "dark",
|
|
205
|
-
"
|
|
206
|
-
"
|
|
203
|
+
"text-copy-light": e === "light" || e === "system",
|
|
204
|
+
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
205
|
+
"dark:text-copy-lighter": e === "alt-system",
|
|
206
|
+
"dark:text-copy-light": e === "system"
|
|
207
207
|
});
|
|
208
208
|
if (r === "danger")
|
|
209
|
-
return
|
|
209
|
+
return s("not-prose", {
|
|
210
210
|
truncate: !t,
|
|
211
|
-
"text-copy-light": e === "dark",
|
|
212
|
-
"text-copy-lighter": e === "light",
|
|
213
|
-
"
|
|
214
|
-
"
|
|
211
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
212
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
213
|
+
"dark:text-copy-lighter": e === "system",
|
|
214
|
+
"dark:text-copy-light": e === "alt-system"
|
|
215
215
|
});
|
|
216
216
|
if (r === "selected")
|
|
217
|
-
return
|
|
218
|
-
truncate: !t
|
|
219
|
-
"text-copy-light": e === "dark",
|
|
220
|
-
"text-copy-lighter": e === "light",
|
|
221
|
-
"text-copy-light dark:text-copy-lighter": e === "system",
|
|
222
|
-
"text-copy-lighter dark:text-copy-light": e === "alt-system"
|
|
217
|
+
return s("not-prose text-copy-lighter", {
|
|
218
|
+
truncate: !t
|
|
223
219
|
});
|
|
224
220
|
}, Q = ({
|
|
225
221
|
mode: e,
|
|
@@ -228,21 +224,21 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
228
224
|
}) => {
|
|
229
225
|
if (!a) {
|
|
230
226
|
if (t === "primary")
|
|
231
|
-
return
|
|
227
|
+
return s({
|
|
232
228
|
"bg-action-dark": e === "dark",
|
|
233
229
|
"bg-action-light": e === "light",
|
|
234
230
|
"bg-action-dark dark:bg-action-light": e === "system",
|
|
235
231
|
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
236
232
|
});
|
|
237
233
|
if (t === "secondary")
|
|
238
|
-
return
|
|
234
|
+
return s({
|
|
239
235
|
"bg-action-dark": e === "light",
|
|
240
236
|
"bg-action-light": e === "dark",
|
|
241
237
|
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
242
238
|
"bg-action-light dark:bg-action-dark": e === "system"
|
|
243
239
|
});
|
|
244
240
|
if (t === "danger")
|
|
245
|
-
return
|
|
241
|
+
return s({
|
|
246
242
|
"bg-action-danger-dark": e === "dark",
|
|
247
243
|
"bg-action-danger-light": e === "light",
|
|
248
244
|
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
@@ -253,7 +249,7 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
253
249
|
}
|
|
254
250
|
}, X = ({
|
|
255
251
|
radius: e
|
|
256
|
-
}) =>
|
|
252
|
+
}) => s({
|
|
257
253
|
"rounded-full": e === "large",
|
|
258
254
|
"rounded-md": e === "medium",
|
|
259
255
|
"rounded-sm": e === "small"
|
|
@@ -265,21 +261,21 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
265
261
|
if (a)
|
|
266
262
|
return "";
|
|
267
263
|
if (t === "primary")
|
|
268
|
-
return
|
|
264
|
+
return s("hover:text-copy-light-hover", {
|
|
269
265
|
"hover:bg-action-dark-hover": e === "dark",
|
|
270
266
|
"hover:bg-action-light-hover": e === "light",
|
|
271
267
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
272
268
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
273
269
|
});
|
|
274
270
|
if (t === "secondary")
|
|
275
|
-
return
|
|
271
|
+
return s("hover:text-copy-light-hover", {
|
|
276
272
|
"hover:bg-action-dark-hover": e === "light",
|
|
277
273
|
"hover:bg-action-light-hover": e === "dark",
|
|
278
274
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
279
275
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
280
276
|
});
|
|
281
277
|
if (t === "danger")
|
|
282
|
-
return
|
|
278
|
+
return s("hover:text-copy-light-hover", {
|
|
283
279
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
284
280
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
285
281
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
@@ -295,21 +291,21 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
295
291
|
if (a)
|
|
296
292
|
return "";
|
|
297
293
|
if (t === "primary")
|
|
298
|
-
return
|
|
294
|
+
return s("active:text-copy-light-active", {
|
|
299
295
|
"active:bg-action-dark-active": e === "dark",
|
|
300
296
|
"active:bg-action-light-active": e === "light",
|
|
301
297
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
302
298
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
303
299
|
});
|
|
304
300
|
if (t === "secondary")
|
|
305
|
-
return
|
|
301
|
+
return s("active:text-copy-light-active", {
|
|
306
302
|
"active:bg-action-dark-active": e === "light",
|
|
307
303
|
"active:bg-action-light-active": e === "dark",
|
|
308
304
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
309
305
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
310
306
|
});
|
|
311
307
|
if (t === "danger")
|
|
312
|
-
return
|
|
308
|
+
return s("active:text-copy-lighter-active", {
|
|
313
309
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
314
310
|
"active:bg-action-danger-light-active": e === "light",
|
|
315
311
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
@@ -325,21 +321,21 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
325
321
|
if (a)
|
|
326
322
|
return "border border-transparent";
|
|
327
323
|
if (t === "primary")
|
|
328
|
-
return
|
|
324
|
+
return s("border", {
|
|
329
325
|
"border-border-dark": e === "dark",
|
|
330
326
|
"border-border-accent": e === "light",
|
|
331
327
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
332
328
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
333
329
|
});
|
|
334
330
|
if (t === "secondary")
|
|
335
|
-
return
|
|
331
|
+
return s("border", {
|
|
336
332
|
"border-border-dark": e === "light",
|
|
337
333
|
"border-border-accent": e === "dark",
|
|
338
334
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
339
335
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
340
336
|
});
|
|
341
337
|
if (t === "danger")
|
|
342
|
-
return
|
|
338
|
+
return s("border", {
|
|
343
339
|
"border-border-danger-dark": e === "dark",
|
|
344
340
|
"border-border-danger-medium": e === "light",
|
|
345
341
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
@@ -349,7 +345,7 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
349
345
|
return "border border-border-selected-dark";
|
|
350
346
|
}, te = ({
|
|
351
347
|
focusMode: e
|
|
352
|
-
}) =>
|
|
348
|
+
}) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
353
349
|
"focus:outline-focus-dark": e === "dark",
|
|
354
350
|
"focus:outline-focus-light": e === "light",
|
|
355
351
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -361,8 +357,8 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
361
357
|
mode: r,
|
|
362
358
|
focusMode: o,
|
|
363
359
|
disabled: l,
|
|
364
|
-
fullWidth:
|
|
365
|
-
size:
|
|
360
|
+
fullWidth: c,
|
|
361
|
+
size: d,
|
|
366
362
|
noBorder: n,
|
|
367
363
|
labelRight: g,
|
|
368
364
|
labelLeft: b,
|
|
@@ -371,7 +367,7 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
371
367
|
noTruncate: v,
|
|
372
368
|
align: x,
|
|
373
369
|
radius: w
|
|
374
|
-
}) => (h || (h = "primary"), t ?
|
|
370
|
+
}) => (h || (h = "primary"), t ? s(I, a) : s(
|
|
375
371
|
I,
|
|
376
372
|
K({
|
|
377
373
|
mode: r,
|
|
@@ -383,18 +379,18 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
383
379
|
X({ radius: w }),
|
|
384
380
|
q({
|
|
385
381
|
type: e,
|
|
386
|
-
size:
|
|
382
|
+
size: d,
|
|
387
383
|
labelRight: g,
|
|
388
384
|
labelLeft: b,
|
|
389
385
|
align: x
|
|
390
386
|
}),
|
|
391
|
-
J({ type: e, size:
|
|
387
|
+
J({ type: e, size: d, labelRight: g, labelLeft: b }),
|
|
392
388
|
ee({ mode: r, variant: h, noBorder: n }),
|
|
393
389
|
te({ focusMode: o }),
|
|
394
390
|
Z({ mode: r, variant: h, disabled: l }),
|
|
395
391
|
$({ mode: r, variant: h, disabled: l }),
|
|
396
392
|
{
|
|
397
|
-
"w-full":
|
|
393
|
+
"w-full": c,
|
|
398
394
|
"disabled:cursor-not-allowed disabled:opacity-50": l
|
|
399
395
|
},
|
|
400
396
|
a
|
|
@@ -403,7 +399,7 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
403
399
|
!a && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((r = e == null ? void 0 : e.currentTarget) == null ? void 0 : r.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
404
400
|
}, E = T.forwardRef((e, a) => {
|
|
405
401
|
const { onClick: t, noInternalClick: r = !1, ...o } = e;
|
|
406
|
-
return /* @__PURE__ */
|
|
402
|
+
return /* @__PURE__ */ i(
|
|
407
403
|
"button",
|
|
408
404
|
{
|
|
409
405
|
ref: a,
|
|
@@ -416,13 +412,13 @@ const _ = "thead", C = "tfoot", u = "tbody", f = {
|
|
|
416
412
|
});
|
|
417
413
|
E.displayName = "BaseButton";
|
|
418
414
|
/*!
|
|
419
|
-
@versini/ui-button v4.0.
|
|
415
|
+
@versini/ui-button v4.0.2
|
|
420
416
|
© 2025 gizmette.com
|
|
421
417
|
*/
|
|
422
418
|
try {
|
|
423
419
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
424
|
-
version: "4.0.
|
|
425
|
-
buildTime: "01/
|
|
420
|
+
version: "4.0.2",
|
|
421
|
+
buildTime: "01/04/2025 01:33 PM EST",
|
|
426
422
|
homepage: "https://github.com/aversini/ui-components",
|
|
427
423
|
license: "MIT"
|
|
428
424
|
});
|
|
@@ -436,8 +432,8 @@ const R = T.forwardRef(
|
|
|
436
432
|
focusMode: r = "system",
|
|
437
433
|
fullWidth: o = !1,
|
|
438
434
|
className: l,
|
|
439
|
-
type:
|
|
440
|
-
raw:
|
|
435
|
+
type: c = "button",
|
|
436
|
+
raw: d = !1,
|
|
441
437
|
noBorder: n = !1,
|
|
442
438
|
"aria-label": g,
|
|
443
439
|
label: b,
|
|
@@ -449,14 +445,14 @@ const R = T.forwardRef(
|
|
|
449
445
|
active: V = !1,
|
|
450
446
|
radius: L = "large",
|
|
451
447
|
...M
|
|
452
|
-
},
|
|
453
|
-
const
|
|
448
|
+
}, H) => {
|
|
449
|
+
const U = ae({
|
|
454
450
|
type: B,
|
|
455
451
|
mode: t,
|
|
456
452
|
focusMode: r,
|
|
457
453
|
fullWidth: o,
|
|
458
454
|
disabled: a,
|
|
459
|
-
raw:
|
|
455
|
+
raw: d,
|
|
460
456
|
className: l,
|
|
461
457
|
noBorder: n,
|
|
462
458
|
size: m,
|
|
@@ -465,12 +461,12 @@ const R = T.forwardRef(
|
|
|
465
461
|
noBackground: x,
|
|
466
462
|
align: w,
|
|
467
463
|
radius: L
|
|
468
|
-
}),
|
|
469
|
-
"text-copy-accent-dark": t === "light" && !
|
|
470
|
-
"text-copy-light": t === "dark" && !
|
|
471
|
-
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !
|
|
472
|
-
"text-copy-light dark:text-copy-accent-dark": t === "system" && !
|
|
473
|
-
}),
|
|
464
|
+
}), O = s({
|
|
465
|
+
"text-copy-accent-dark": t === "light" && !d,
|
|
466
|
+
"text-copy-light": t === "dark" && !d,
|
|
467
|
+
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !d,
|
|
468
|
+
"text-copy-light dark:text-copy-accent-dark": t === "system" && !d
|
|
469
|
+
}), P = V ? s(
|
|
474
470
|
"relative",
|
|
475
471
|
"focus-within:static",
|
|
476
472
|
"focus-within:after:border-transparent",
|
|
@@ -487,19 +483,19 @@ const R = T.forwardRef(
|
|
|
487
483
|
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
488
484
|
}
|
|
489
485
|
) : "";
|
|
490
|
-
return /* @__PURE__ */
|
|
486
|
+
return /* @__PURE__ */ i("div", { className: P, children: /* @__PURE__ */ y(
|
|
491
487
|
E,
|
|
492
488
|
{
|
|
493
|
-
ref:
|
|
494
|
-
className:
|
|
489
|
+
ref: H,
|
|
490
|
+
className: U,
|
|
495
491
|
disabled: a,
|
|
496
|
-
type:
|
|
492
|
+
type: c,
|
|
497
493
|
"aria-label": g || b,
|
|
498
494
|
...M,
|
|
499
495
|
children: [
|
|
500
|
-
v && /* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
h && /* @__PURE__ */
|
|
496
|
+
v && /* @__PURE__ */ i("span", { className: "pr-2", children: v }),
|
|
497
|
+
/* @__PURE__ */ i("div", { className: O, children: e }),
|
|
498
|
+
h && /* @__PURE__ */ i("span", { className: "pl-2", children: h })
|
|
503
499
|
]
|
|
504
500
|
}
|
|
505
501
|
) });
|
|
@@ -513,13 +509,13 @@ const z = ({
|
|
|
513
509
|
className: r,
|
|
514
510
|
defaultViewBox: o,
|
|
515
511
|
size: l,
|
|
516
|
-
title:
|
|
517
|
-
semantic:
|
|
512
|
+
title: c,
|
|
513
|
+
semantic: d = !1,
|
|
518
514
|
...n
|
|
519
515
|
}) => {
|
|
520
|
-
const g =
|
|
516
|
+
const g = s(l, r);
|
|
521
517
|
return /* @__PURE__ */ y(j, { children: [
|
|
522
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ i(
|
|
523
519
|
"svg",
|
|
524
520
|
{
|
|
525
521
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -527,13 +523,13 @@ const z = ({
|
|
|
527
523
|
viewBox: t || o,
|
|
528
524
|
fill: a || "currentColor",
|
|
529
525
|
role: "img",
|
|
530
|
-
"aria-hidden": !
|
|
526
|
+
"aria-hidden": !d,
|
|
531
527
|
focusable: !1,
|
|
532
528
|
...n,
|
|
533
529
|
children: e
|
|
534
530
|
}
|
|
535
531
|
),
|
|
536
|
-
|
|
532
|
+
c && d && /* @__PURE__ */ i("span", { className: "sr-only", children: c })
|
|
537
533
|
] });
|
|
538
534
|
};
|
|
539
535
|
/*!
|
|
@@ -543,7 +539,7 @@ const z = ({
|
|
|
543
539
|
try {
|
|
544
540
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
545
541
|
version: "4.0.0",
|
|
546
|
-
buildTime: "01/
|
|
542
|
+
buildTime: "01/04/2025 01:33 PM EST",
|
|
547
543
|
homepage: "https://github.com/aversini/ui-components",
|
|
548
544
|
license: "MIT"
|
|
549
545
|
});
|
|
@@ -565,17 +561,17 @@ const oe = ({
|
|
|
565
561
|
title: t || "Sort",
|
|
566
562
|
...o,
|
|
567
563
|
children: [
|
|
568
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ i(
|
|
569
565
|
"path",
|
|
570
566
|
{
|
|
571
567
|
opacity: r ? "1" : "0.4",
|
|
572
568
|
d: "M393.4 41.4c12.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 0L448 141.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V141.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96z"
|
|
573
569
|
}
|
|
574
570
|
),
|
|
575
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ i("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 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
|
|
576
572
|
]
|
|
577
573
|
}
|
|
578
|
-
),
|
|
574
|
+
), se = ({
|
|
579
575
|
className: e,
|
|
580
576
|
viewBox: a,
|
|
581
577
|
title: t,
|
|
@@ -591,17 +587,17 @@ const oe = ({
|
|
|
591
587
|
title: t || "Sort Down",
|
|
592
588
|
...o,
|
|
593
589
|
children: [
|
|
594
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ i(
|
|
595
591
|
"path",
|
|
596
592
|
{
|
|
597
593
|
opacity: r ? "1" : "0.4",
|
|
598
594
|
d: "M288 448c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32z"
|
|
599
595
|
}
|
|
600
596
|
),
|
|
601
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ i("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-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
|
|
602
598
|
]
|
|
603
599
|
}
|
|
604
|
-
),
|
|
600
|
+
), ie = ({
|
|
605
601
|
className: e,
|
|
606
602
|
viewBox: a,
|
|
607
603
|
title: t,
|
|
@@ -617,25 +613,25 @@ const oe = ({
|
|
|
617
613
|
title: t || "Sort Up",
|
|
618
614
|
...o,
|
|
619
615
|
children: [
|
|
620
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ i(
|
|
621
617
|
"path",
|
|
622
618
|
{
|
|
623
619
|
opacity: r ? "1" : "0.4",
|
|
624
620
|
d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32z"
|
|
625
621
|
}
|
|
626
622
|
),
|
|
627
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ i("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.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z" })
|
|
628
624
|
]
|
|
629
625
|
}
|
|
630
626
|
);
|
|
631
627
|
/*!
|
|
632
|
-
@versini/ui-icons v4.
|
|
628
|
+
@versini/ui-icons v4.1.0
|
|
633
629
|
© 2025 gizmette.com
|
|
634
630
|
*/
|
|
635
631
|
try {
|
|
636
632
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
637
|
-
version: "4.
|
|
638
|
-
buildTime: "01/
|
|
633
|
+
version: "4.1.0",
|
|
634
|
+
buildTime: "01/04/2025 01:33 PM EST",
|
|
639
635
|
homepage: "https://github.com/aversini/ui-components",
|
|
640
636
|
license: "MIT"
|
|
641
637
|
});
|
|
@@ -654,32 +650,32 @@ const k = T.createContext({
|
|
|
654
650
|
compact: r,
|
|
655
651
|
summary: o,
|
|
656
652
|
className: l,
|
|
657
|
-
wrapperClassName:
|
|
658
|
-
maxHeight:
|
|
653
|
+
wrapperClassName: c,
|
|
654
|
+
maxHeight: d,
|
|
659
655
|
stickyHeader: n,
|
|
660
656
|
stickyFooter: g,
|
|
661
657
|
...b
|
|
662
658
|
}) => {
|
|
663
|
-
const m =
|
|
659
|
+
const m = A({
|
|
664
660
|
mode: a,
|
|
665
661
|
className: l,
|
|
666
|
-
wrapperClassName:
|
|
662
|
+
wrapperClassName: c,
|
|
667
663
|
stickyHeader: n,
|
|
668
664
|
stickyFooter: g
|
|
669
665
|
});
|
|
670
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ i(
|
|
671
667
|
k.Provider,
|
|
672
668
|
{
|
|
673
669
|
value: { mode: a, stickyHeader: n, stickyFooter: g, compact: r },
|
|
674
|
-
children: /* @__PURE__ */
|
|
670
|
+
children: /* @__PURE__ */ i(
|
|
675
671
|
"div",
|
|
676
672
|
{
|
|
677
673
|
className: m.wrapper,
|
|
678
|
-
...
|
|
679
|
-
style: { maxHeight:
|
|
674
|
+
...d && {
|
|
675
|
+
style: { maxHeight: d }
|
|
680
676
|
},
|
|
681
677
|
children: /* @__PURE__ */ y("table", { className: m.table, summary: o, ...b, children: [
|
|
682
|
-
t && /* @__PURE__ */
|
|
678
|
+
t && /* @__PURE__ */ i("caption", { className: m.caption, children: t }),
|
|
683
679
|
e
|
|
684
680
|
] })
|
|
685
681
|
}
|
|
@@ -693,12 +689,12 @@ const k = T.createContext({
|
|
|
693
689
|
}) => {
|
|
694
690
|
const r = p(k);
|
|
695
691
|
r.cellWrapper = _;
|
|
696
|
-
const o =
|
|
692
|
+
const o = W({
|
|
697
693
|
className: a,
|
|
698
694
|
mode: r.mode,
|
|
699
695
|
stickyHeader: r.stickyHeader
|
|
700
696
|
});
|
|
701
|
-
return /* @__PURE__ */
|
|
697
|
+
return /* @__PURE__ */ i("thead", { className: o, ...t, children: e });
|
|
702
698
|
}, be = ({
|
|
703
699
|
children: e,
|
|
704
700
|
className: a,
|
|
@@ -711,10 +707,10 @@ const k = T.createContext({
|
|
|
711
707
|
mode: r.mode,
|
|
712
708
|
stickyFooter: r.stickyFooter
|
|
713
709
|
});
|
|
714
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ i("tfoot", { className: o, ...t, children: e });
|
|
715
711
|
}, me = ({ children: e, ...a }) => {
|
|
716
712
|
const t = p(k);
|
|
717
|
-
return t.cellWrapper = u, /* @__PURE__ */
|
|
713
|
+
return t.cellWrapper = u, /* @__PURE__ */ i("tbody", { ...a, children: e });
|
|
718
714
|
}, ue = ({
|
|
719
715
|
children: e,
|
|
720
716
|
className: a,
|
|
@@ -725,7 +721,7 @@ const k = T.createContext({
|
|
|
725
721
|
cellWrapper: r.cellWrapper,
|
|
726
722
|
className: a
|
|
727
723
|
});
|
|
728
|
-
return /* @__PURE__ */
|
|
724
|
+
return /* @__PURE__ */ i("tr", { className: o, ...t, children: e });
|
|
729
725
|
}, le = ({
|
|
730
726
|
children: e,
|
|
731
727
|
component: a,
|
|
@@ -733,14 +729,14 @@ const k = T.createContext({
|
|
|
733
729
|
align: r,
|
|
734
730
|
...o
|
|
735
731
|
}) => {
|
|
736
|
-
const l = p(k),
|
|
732
|
+
const l = p(k), c = a || (l.cellWrapper === _ ? "th" : "td"), { mainClasses: d, alignClasses: n } = G({
|
|
737
733
|
cellWrapper: l.cellWrapper,
|
|
738
734
|
className: t,
|
|
739
735
|
mode: l.mode,
|
|
740
736
|
compact: l.compact,
|
|
741
737
|
align: r
|
|
742
738
|
});
|
|
743
|
-
return r ? /* @__PURE__ */
|
|
739
|
+
return r ? /* @__PURE__ */ i(c, { className: d, ...o, children: /* @__PURE__ */ i("div", { className: n, children: e }) }) : /* @__PURE__ */ i(c, { className: d, ...o, children: e });
|
|
744
740
|
}, ye = ({
|
|
745
741
|
align: e,
|
|
746
742
|
children: a,
|
|
@@ -748,15 +744,15 @@ const k = T.createContext({
|
|
|
748
744
|
className: r,
|
|
749
745
|
component: o,
|
|
750
746
|
focusMode: l = "alt-system",
|
|
751
|
-
mode:
|
|
752
|
-
onClick:
|
|
747
|
+
mode: c = "alt-system",
|
|
748
|
+
onClick: d,
|
|
753
749
|
sortDirection: n,
|
|
754
750
|
sortedCell: g,
|
|
755
751
|
cellId: b,
|
|
756
752
|
...m
|
|
757
753
|
}) => {
|
|
758
754
|
const h = Y({ buttonClassName: t });
|
|
759
|
-
return /* @__PURE__ */
|
|
755
|
+
return /* @__PURE__ */ i(
|
|
760
756
|
le,
|
|
761
757
|
{
|
|
762
758
|
component: o,
|
|
@@ -764,19 +760,19 @@ const k = T.createContext({
|
|
|
764
760
|
role: "columnheader",
|
|
765
761
|
"aria-sort": n === f.ASC && g === b ? "ascending" : n === f.DESC && g === b ? "descending" : "other",
|
|
766
762
|
...m,
|
|
767
|
-
children: /* @__PURE__ */
|
|
763
|
+
children: /* @__PURE__ */ i(
|
|
768
764
|
R,
|
|
769
765
|
{
|
|
770
766
|
active: g === b,
|
|
771
767
|
className: h,
|
|
772
|
-
onClick:
|
|
768
|
+
onClick: d,
|
|
773
769
|
align: e,
|
|
774
770
|
noBorder: !0,
|
|
775
771
|
focusMode: l,
|
|
776
|
-
mode:
|
|
772
|
+
mode: c,
|
|
777
773
|
fullWidth: !0,
|
|
778
774
|
labelRight: a,
|
|
779
|
-
children: n === f.ASC && g === b ? /* @__PURE__ */
|
|
775
|
+
children: n === f.ASC && g === b ? /* @__PURE__ */ i(ie, { className: "size-4", monotone: !0 }) : n === f.DESC && g === b ? /* @__PURE__ */ i(se, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ i(oe, { className: "size-4", monotone: !0 })
|
|
780
776
|
}
|
|
781
777
|
)
|
|
782
778
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-table",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@tailwindcss/typography": "0.5.15",
|
|
42
|
-
"@versini/ui-button": "4.0.
|
|
43
|
-
"@versini/ui-icons": "4.
|
|
42
|
+
"@versini/ui-button": "4.0.2",
|
|
43
|
+
"@versini/ui-icons": "4.1.0",
|
|
44
44
|
"@versini/ui-types": "4.0.0",
|
|
45
45
|
"clsx": "2.1.1",
|
|
46
46
|
"tailwindcss": "3.4.17"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"sideEffects": [
|
|
49
49
|
"**/*.css"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "bf6b0d285a70c47a5efc225f32756b95cb963a49"
|
|
52
52
|
}
|