@versini/ui-table 3.1.0 → 3.1.1
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 +335 -332
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import o from "clsx";
|
|
2
|
-
import { jsx as i, jsxs as
|
|
3
|
-
import
|
|
2
|
+
import { jsx as i, jsxs as N, Fragment as ie } from "react/jsx-runtime";
|
|
3
|
+
import R, { useRef as T, useLayoutEffect as $, useMemo as q, useState as ne, useEffect as Y, useCallback as le, useContext as B } from "react";
|
|
4
4
|
/*!
|
|
5
|
-
@versini/ui-table v3.1.
|
|
5
|
+
@versini/ui-table v3.1.1
|
|
6
6
|
© 2025 gizmette.com
|
|
7
7
|
*/
|
|
8
8
|
try {
|
|
9
9
|
window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
|
|
10
|
-
version: "3.1.
|
|
11
|
-
buildTime: "01/
|
|
10
|
+
version: "3.1.1",
|
|
11
|
+
buildTime: "01/26/2025 05:19 PM EST",
|
|
12
12
|
homepage: "https://github.com/aversini/ui-components",
|
|
13
13
|
license: "MIT"
|
|
14
14
|
});
|
|
15
15
|
} catch {
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const z = "thead", U = "tfoot", w = "tbody", S = {
|
|
18
18
|
ASC: "asc",
|
|
19
19
|
DESC: "desc"
|
|
20
|
-
},
|
|
20
|
+
}, ce = ({
|
|
21
21
|
mode: e,
|
|
22
|
-
className:
|
|
22
|
+
className: r,
|
|
23
23
|
wrapperClassName: t,
|
|
24
|
-
stickyHeader:
|
|
24
|
+
stickyHeader: a,
|
|
25
25
|
stickyFooter: s
|
|
26
26
|
}) => ({
|
|
27
27
|
wrapper: o(
|
|
28
28
|
"not-prose relative w-full rounded-lg shadow-md",
|
|
29
29
|
{
|
|
30
|
-
"overflow-x-auto": !
|
|
31
|
-
"overflow-y-scroll":
|
|
30
|
+
"overflow-x-auto": !a && !s,
|
|
31
|
+
"overflow-y-scroll": a || s,
|
|
32
32
|
"bg-surface-darker": e === "dark" || e === "system",
|
|
33
33
|
"bg-surface-light": e === "light" || e === "alt-system",
|
|
34
34
|
"dark:bg-surface-light": e === "system",
|
|
@@ -40,7 +40,7 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
40
40
|
},
|
|
41
41
|
t
|
|
42
42
|
),
|
|
43
|
-
table: o("my-0 w-full text-left text-sm",
|
|
43
|
+
table: o("my-0 w-full text-left text-sm", r, {
|
|
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",
|
|
@@ -52,62 +52,62 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
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
|
+
}), de = ({
|
|
56
56
|
className: e,
|
|
57
|
-
stickyHeader:
|
|
57
|
+
stickyHeader: r,
|
|
58
58
|
mode: t
|
|
59
59
|
}) => o(
|
|
60
60
|
{
|
|
61
|
-
"sticky top-0 z-10":
|
|
62
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]":
|
|
63
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]":
|
|
64
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]":
|
|
65
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]":
|
|
61
|
+
"sticky top-0 z-10": r,
|
|
62
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "dark",
|
|
63
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "system",
|
|
64
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "light",
|
|
65
|
+
"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"
|
|
66
66
|
},
|
|
67
67
|
e
|
|
68
|
-
),
|
|
68
|
+
), ge = ({
|
|
69
69
|
className: e,
|
|
70
|
-
stickyFooter:
|
|
70
|
+
stickyFooter: r,
|
|
71
71
|
mode: t
|
|
72
72
|
}) => o(
|
|
73
73
|
{
|
|
74
|
-
"sticky bottom-0 z-10":
|
|
75
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]":
|
|
76
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]":
|
|
77
|
-
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]":
|
|
78
|
-
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]":
|
|
74
|
+
"sticky bottom-0 z-10": r,
|
|
75
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "dark",
|
|
76
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "system",
|
|
77
|
+
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "light",
|
|
78
|
+
"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"
|
|
79
79
|
},
|
|
80
80
|
e
|
|
81
|
-
),
|
|
81
|
+
), he = ({
|
|
82
82
|
mode: e,
|
|
83
|
-
className:
|
|
83
|
+
className: r,
|
|
84
84
|
cellWrapper: t
|
|
85
|
-
}) => t ===
|
|
85
|
+
}) => t === z || t === U ? o(
|
|
86
86
|
{
|
|
87
87
|
"bg-table-head-dark": e === "dark" || e === "system",
|
|
88
88
|
"bg-table-head-light": e === "light" || e === "alt-system",
|
|
89
89
|
"dark:bg-table-head-light": e === "system",
|
|
90
90
|
"dark:bg-table-head-dark": e === "alt-system"
|
|
91
91
|
},
|
|
92
|
-
|
|
92
|
+
r
|
|
93
93
|
) : o(
|
|
94
94
|
"border-b last:border-0",
|
|
95
95
|
{
|
|
96
96
|
"border-table-dark": e === "dark" || e === "system",
|
|
97
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even": t ===
|
|
97
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even": t === w && e === "dark",
|
|
98
98
|
"border-table-light": e === "light" || e === "alt-system",
|
|
99
|
-
"odd:bg-table-light-odd even:bg-table-light-even": t ===
|
|
99
|
+
"odd:bg-table-light-odd even:bg-table-light-even": t === w && e === "light",
|
|
100
100
|
"dark:border-table-light": e === "system",
|
|
101
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t ===
|
|
101
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === w && e === "system",
|
|
102
102
|
"dark:border-table-dark": e === "alt-system",
|
|
103
|
-
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t ===
|
|
103
|
+
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === w && e === "alt-system"
|
|
104
104
|
},
|
|
105
|
-
|
|
106
|
-
),
|
|
105
|
+
r
|
|
106
|
+
), be = ({
|
|
107
107
|
cellWrapper: e,
|
|
108
|
-
className:
|
|
108
|
+
className: r,
|
|
109
109
|
compact: t,
|
|
110
|
-
mode:
|
|
110
|
+
mode: a,
|
|
111
111
|
align: s
|
|
112
112
|
}) => ({
|
|
113
113
|
alignClasses: o({
|
|
@@ -117,79 +117,79 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
117
117
|
}),
|
|
118
118
|
mainClasses: o(
|
|
119
119
|
{
|
|
120
|
-
"text-copy-light":
|
|
121
|
-
"text-copy-dark":
|
|
122
|
-
"dark:text-copy-dark":
|
|
123
|
-
"dark:text-copy-light":
|
|
124
|
-
"px-4 py-3": !t && (e ===
|
|
125
|
-
"p-4": !t && e ===
|
|
120
|
+
"text-copy-light": a === "dark" || a === "system",
|
|
121
|
+
"text-copy-dark": a === "light" || a === "alt-system",
|
|
122
|
+
"dark:text-copy-dark": a === "system",
|
|
123
|
+
"dark:text-copy-light": a === "alt-system",
|
|
124
|
+
"px-4 py-3": !t && (e === z || e === U),
|
|
125
|
+
"p-4": !t && e === w,
|
|
126
126
|
"px-2 py-1.5": t
|
|
127
127
|
},
|
|
128
|
-
|
|
128
|
+
r
|
|
129
129
|
)
|
|
130
|
-
}),
|
|
130
|
+
}), me = ({
|
|
131
131
|
buttonClassName: e
|
|
132
|
-
}) => o("rounded-none text-sm", e),
|
|
132
|
+
}) => o("rounded-none text-sm", e), F = "av-button", M = "icon", Z = "button", P = "link", ue = ({
|
|
133
133
|
type: e,
|
|
134
|
-
size:
|
|
134
|
+
size: r,
|
|
135
135
|
labelRight: t,
|
|
136
|
-
labelLeft:
|
|
136
|
+
labelLeft: a,
|
|
137
137
|
align: s
|
|
138
138
|
}) => {
|
|
139
|
-
const n = "max-h-8 py-0 px-2", l = "max-h-9 h-8 px-3",
|
|
139
|
+
const n = "max-h-8 py-0 px-2", l = "max-h-9 h-8 px-3", d = "max-h-12 py-2 px-4";
|
|
140
140
|
switch (e) {
|
|
141
|
-
case
|
|
142
|
-
case
|
|
141
|
+
case Z:
|
|
142
|
+
case P:
|
|
143
143
|
return o({
|
|
144
|
-
[n]:
|
|
145
|
-
[l]:
|
|
146
|
-
[
|
|
144
|
+
[n]: r === "small",
|
|
145
|
+
[l]: r === "medium",
|
|
146
|
+
[d]: r === "large"
|
|
147
147
|
});
|
|
148
|
-
case
|
|
148
|
+
case M:
|
|
149
149
|
return o("inline-flex items-center", {
|
|
150
150
|
"justify-center": s === "center",
|
|
151
151
|
"justify-start": s === "left",
|
|
152
152
|
"justify-end": s === "right",
|
|
153
|
-
"h-6 py-0":
|
|
154
|
-
"h-6":
|
|
155
|
-
"h-8 py-1":
|
|
156
|
-
"h-8":
|
|
157
|
-
"h-12 py-2":
|
|
158
|
-
"h-12":
|
|
153
|
+
"h-6 py-0": r === "small" && !(t || a),
|
|
154
|
+
"h-6": r === "small" && (t || a),
|
|
155
|
+
"h-8 py-1": r === "medium" && !(t || a),
|
|
156
|
+
"h-8": r === "medium" && (t || a),
|
|
157
|
+
"h-12 py-2": r === "large" && !(t || a),
|
|
158
|
+
"h-12": r === "large" && (t || a)
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, ye = ({
|
|
162
162
|
type: e,
|
|
163
|
-
size:
|
|
163
|
+
size: r,
|
|
164
164
|
labelRight: t,
|
|
165
|
-
labelLeft:
|
|
165
|
+
labelLeft: a
|
|
166
166
|
}) => {
|
|
167
167
|
const s = "text-sm font-medium", n = "text-base font-medium", l = "text-lg font-medium";
|
|
168
168
|
switch (e) {
|
|
169
|
-
case
|
|
170
|
-
case
|
|
169
|
+
case Z:
|
|
170
|
+
case P:
|
|
171
171
|
return o({
|
|
172
|
-
"text-center": e ===
|
|
173
|
-
[s]:
|
|
174
|
-
[n]:
|
|
175
|
-
[l]:
|
|
172
|
+
"text-center": e === P,
|
|
173
|
+
[s]: r === "small",
|
|
174
|
+
[n]: r === "medium",
|
|
175
|
+
[l]: r === "large"
|
|
176
176
|
});
|
|
177
|
-
case
|
|
177
|
+
case M:
|
|
178
178
|
return o({
|
|
179
|
-
[s]:
|
|
180
|
-
[n]:
|
|
181
|
-
[l]:
|
|
179
|
+
[s]: r === "small" && (t || a),
|
|
180
|
+
[n]: r === "medium" && (t || a),
|
|
181
|
+
[l]: r === "large" && (t || a)
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
},
|
|
184
|
+
}, fe = ({
|
|
185
185
|
mode: e,
|
|
186
|
-
noBackground:
|
|
186
|
+
noBackground: r,
|
|
187
187
|
noTruncate: t,
|
|
188
|
-
variant:
|
|
188
|
+
variant: a
|
|
189
189
|
}) => {
|
|
190
|
-
if (
|
|
190
|
+
if (r)
|
|
191
191
|
return "not-prose";
|
|
192
|
-
if (
|
|
192
|
+
if (a === "primary")
|
|
193
193
|
return o("not-prose", {
|
|
194
194
|
truncate: !t,
|
|
195
195
|
"text-copy-light": e === "dark" || e === "system",
|
|
@@ -197,7 +197,7 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
197
197
|
"dark:text-copy-lighter": e === "system",
|
|
198
198
|
"dark:text-copy-light": e === "alt-system"
|
|
199
199
|
});
|
|
200
|
-
if (
|
|
200
|
+
if (a === "secondary")
|
|
201
201
|
return o("not-prose", {
|
|
202
202
|
truncate: !t,
|
|
203
203
|
"text-copy-light": e === "light" || e === "system",
|
|
@@ -205,7 +205,7 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
205
205
|
"dark:text-copy-lighter": e === "alt-system",
|
|
206
206
|
"dark:text-copy-light": e === "system"
|
|
207
207
|
});
|
|
208
|
-
if (
|
|
208
|
+
if (a === "danger")
|
|
209
209
|
return o("not-prose", {
|
|
210
210
|
truncate: !t,
|
|
211
211
|
"text-copy-light": e === "dark" || e === "system",
|
|
@@ -213,16 +213,16 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
213
213
|
"dark:text-copy-lighter": e === "system",
|
|
214
214
|
"dark:text-copy-light": e === "alt-system"
|
|
215
215
|
});
|
|
216
|
-
if (
|
|
216
|
+
if (a === "selected")
|
|
217
217
|
return o("not-prose text-copy-lighter", {
|
|
218
218
|
truncate: !t
|
|
219
219
|
});
|
|
220
|
-
},
|
|
220
|
+
}, ke = ({
|
|
221
221
|
mode: e,
|
|
222
|
-
noBackground:
|
|
222
|
+
noBackground: r,
|
|
223
223
|
variant: t
|
|
224
224
|
}) => {
|
|
225
|
-
if (!
|
|
225
|
+
if (!r) {
|
|
226
226
|
if (t === "primary")
|
|
227
227
|
return o({
|
|
228
228
|
"bg-action-dark": e === "dark",
|
|
@@ -247,18 +247,18 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
247
247
|
if (t === "selected")
|
|
248
248
|
return "bg-action-selected-dark";
|
|
249
249
|
}
|
|
250
|
-
},
|
|
250
|
+
}, ve = ({
|
|
251
251
|
radius: e
|
|
252
252
|
}) => o({
|
|
253
253
|
"rounded-full": e === "large",
|
|
254
254
|
"rounded-md": e === "medium",
|
|
255
255
|
"rounded-sm": e === "small"
|
|
256
|
-
}),
|
|
256
|
+
}), pe = ({
|
|
257
257
|
mode: e,
|
|
258
|
-
disabled:
|
|
258
|
+
disabled: r,
|
|
259
259
|
variant: t
|
|
260
260
|
}) => {
|
|
261
|
-
if (
|
|
261
|
+
if (r)
|
|
262
262
|
return "";
|
|
263
263
|
if (t === "primary")
|
|
264
264
|
return o("hover:text-copy-light-hover", {
|
|
@@ -283,12 +283,12 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
283
283
|
});
|
|
284
284
|
if (t === "selected")
|
|
285
285
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
286
|
-
},
|
|
286
|
+
}, _e = ({
|
|
287
287
|
mode: e,
|
|
288
|
-
disabled:
|
|
288
|
+
disabled: r,
|
|
289
289
|
variant: t
|
|
290
290
|
}) => {
|
|
291
|
-
if (
|
|
291
|
+
if (r)
|
|
292
292
|
return "";
|
|
293
293
|
if (t === "primary")
|
|
294
294
|
return o("active:text-copy-light-active", {
|
|
@@ -313,12 +313,12 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
313
313
|
});
|
|
314
314
|
if (t === "selected")
|
|
315
315
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
316
|
-
},
|
|
316
|
+
}, xe = ({
|
|
317
317
|
mode: e,
|
|
318
|
-
noBorder:
|
|
318
|
+
noBorder: r,
|
|
319
319
|
variant: t
|
|
320
320
|
}) => {
|
|
321
|
-
if (
|
|
321
|
+
if (r)
|
|
322
322
|
return "border border-transparent";
|
|
323
323
|
if (t === "primary")
|
|
324
324
|
return o("border", {
|
|
@@ -343,18 +343,18 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
343
343
|
});
|
|
344
344
|
if (t === "selected")
|
|
345
345
|
return "border border-border-selected-dark";
|
|
346
|
-
},
|
|
346
|
+
}, we = ({
|
|
347
347
|
focusMode: e
|
|
348
348
|
}) => o("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
349
349
|
"focus:outline-focus-dark": e === "dark",
|
|
350
350
|
"focus:outline-focus-light": e === "light",
|
|
351
351
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
352
352
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
353
|
-
}),
|
|
353
|
+
}), Ne = ({
|
|
354
354
|
mode: e,
|
|
355
|
-
raw:
|
|
355
|
+
raw: r,
|
|
356
356
|
iconClassName: t
|
|
357
|
-
}) =>
|
|
357
|
+
}) => r ? "" : o(
|
|
358
358
|
{
|
|
359
359
|
"text-copy-accent-dark": e === "light" || e === "alt-system",
|
|
360
360
|
"text-copy-light": e === "dark" || e === "system",
|
|
@@ -362,90 +362,90 @@ const B = "thead", O = "tfoot", v = "tbody", C = {
|
|
|
362
362
|
"dark:text-copy-accent-dark": e === "system"
|
|
363
363
|
},
|
|
364
364
|
t
|
|
365
|
-
),
|
|
365
|
+
), Ce = ({
|
|
366
366
|
animated: e
|
|
367
367
|
}) => o({
|
|
368
368
|
"transition-opacity duration-300 ease-in": e
|
|
369
|
-
}),
|
|
369
|
+
}), Te = ({
|
|
370
370
|
type: e,
|
|
371
|
-
className:
|
|
371
|
+
className: r,
|
|
372
372
|
raw: t,
|
|
373
|
-
mode:
|
|
373
|
+
mode: a,
|
|
374
374
|
focusMode: s,
|
|
375
375
|
disabled: n,
|
|
376
376
|
fullWidth: l,
|
|
377
|
-
size:
|
|
378
|
-
noBorder:
|
|
379
|
-
labelRight:
|
|
377
|
+
size: d,
|
|
378
|
+
noBorder: c,
|
|
379
|
+
labelRight: h,
|
|
380
380
|
labelLeft: m,
|
|
381
|
-
noBackground:
|
|
382
|
-
variant:
|
|
383
|
-
noTruncate:
|
|
384
|
-
align:
|
|
385
|
-
radius:
|
|
386
|
-
animated:
|
|
387
|
-
}) => (
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
mode:
|
|
391
|
-
variant:
|
|
392
|
-
noBackground:
|
|
393
|
-
noTruncate:
|
|
381
|
+
noBackground: g,
|
|
382
|
+
variant: b,
|
|
383
|
+
noTruncate: f,
|
|
384
|
+
align: V,
|
|
385
|
+
radius: L,
|
|
386
|
+
animated: A
|
|
387
|
+
}) => (b || (b = "primary"), t ? o(F, r) : o(
|
|
388
|
+
F,
|
|
389
|
+
fe({
|
|
390
|
+
mode: a,
|
|
391
|
+
variant: b,
|
|
392
|
+
noBackground: g,
|
|
393
|
+
noTruncate: f
|
|
394
394
|
}),
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
395
|
+
ke({ mode: a, noBackground: g, variant: b }),
|
|
396
|
+
ve({ radius: L }),
|
|
397
|
+
ue({
|
|
398
398
|
type: e,
|
|
399
|
-
size:
|
|
400
|
-
labelRight:
|
|
399
|
+
size: d,
|
|
400
|
+
labelRight: h,
|
|
401
401
|
labelLeft: m,
|
|
402
|
-
align:
|
|
402
|
+
align: V
|
|
403
403
|
}),
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
404
|
+
ye({ type: e, size: d, labelRight: h, labelLeft: m }),
|
|
405
|
+
xe({ mode: a, variant: b, noBorder: c }),
|
|
406
|
+
we({ focusMode: s }),
|
|
407
|
+
pe({ mode: a, variant: b, disabled: n }),
|
|
408
|
+
_e({ mode: a, variant: b, disabled: n }),
|
|
409
409
|
{
|
|
410
410
|
"w-full": l,
|
|
411
411
|
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
412
412
|
},
|
|
413
413
|
o({
|
|
414
|
-
"transition-[width] duration-300 ease-in-out": e ===
|
|
414
|
+
"transition-[width] duration-300 ease-in-out": e === M && A
|
|
415
415
|
}),
|
|
416
|
-
|
|
417
|
-
)),
|
|
418
|
-
var
|
|
419
|
-
!
|
|
420
|
-
},
|
|
421
|
-
const { onClick: t, noInternalClick:
|
|
416
|
+
r
|
|
417
|
+
)), Be = (e, r, t) => {
|
|
418
|
+
var a;
|
|
419
|
+
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
420
|
+
}, J = R.forwardRef((e, r) => {
|
|
421
|
+
const { onClick: t, noInternalClick: a = !1, ...s } = e;
|
|
422
422
|
return /* @__PURE__ */ i(
|
|
423
423
|
"button",
|
|
424
424
|
{
|
|
425
|
-
ref:
|
|
425
|
+
ref: r,
|
|
426
426
|
onClick: (n) => {
|
|
427
|
-
|
|
427
|
+
Be(n, a, t);
|
|
428
428
|
},
|
|
429
429
|
...s
|
|
430
430
|
}
|
|
431
431
|
);
|
|
432
432
|
});
|
|
433
|
-
|
|
434
|
-
function
|
|
435
|
-
const e =
|
|
436
|
-
return
|
|
433
|
+
J.displayName = "BaseButton";
|
|
434
|
+
function Ee() {
|
|
435
|
+
const e = T(!1);
|
|
436
|
+
return Y(() => (e.current = !0, () => {
|
|
437
437
|
e.current = !1;
|
|
438
|
-
}), []),
|
|
438
|
+
}), []), le(() => e.current, []);
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
return
|
|
442
|
-
} : (
|
|
440
|
+
function Ie(e) {
|
|
441
|
+
return q(() => e.every((r) => r == null) ? () => {
|
|
442
|
+
} : (r) => {
|
|
443
443
|
e.forEach((t) => {
|
|
444
|
-
typeof t == "function" ? t(
|
|
444
|
+
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
445
445
|
});
|
|
446
446
|
}, e);
|
|
447
447
|
}
|
|
448
|
-
const
|
|
448
|
+
const Se = {
|
|
449
449
|
x: 0,
|
|
450
450
|
y: 0,
|
|
451
451
|
width: 0,
|
|
@@ -455,126 +455,129 @@ const Be = {
|
|
|
455
455
|
bottom: 0,
|
|
456
456
|
right: 0
|
|
457
457
|
};
|
|
458
|
-
function
|
|
459
|
-
const
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
|
|
458
|
+
function O(e) {
|
|
459
|
+
const r = Ee(), t = T(0), a = T(null), [s, n] = ne(Se), l = q(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
460
|
+
const c = d[0];
|
|
461
|
+
c && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
462
|
+
a.current && r() && n(c.contentRect);
|
|
463
463
|
}));
|
|
464
|
-
}), [
|
|
465
|
-
return
|
|
464
|
+
}), [r]);
|
|
465
|
+
return Y(() => (a.current && (l == null || l.observe(a.current, e)), () => {
|
|
466
466
|
l == null || l.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
467
|
-
}), [l, e]), [
|
|
467
|
+
}), [l, e]), [a, s];
|
|
468
468
|
}
|
|
469
|
-
const
|
|
469
|
+
const H = {
|
|
470
470
|
small: 24,
|
|
471
471
|
// w-6
|
|
472
472
|
medium: 32,
|
|
473
473
|
// w-8
|
|
474
474
|
large: 48
|
|
475
475
|
// w-12
|
|
476
|
-
},
|
|
476
|
+
}, D = {
|
|
477
477
|
small: 8 * 2,
|
|
478
478
|
// px-2 x 2
|
|
479
479
|
medium: 12 * 2,
|
|
480
480
|
// px-3 x 2
|
|
481
481
|
large: 16 * 2
|
|
482
482
|
// px-4 x 2
|
|
483
|
-
},
|
|
483
|
+
}, G = 2, K = R.forwardRef(
|
|
484
484
|
({
|
|
485
485
|
children: e,
|
|
486
|
-
disabled:
|
|
486
|
+
disabled: r = !1,
|
|
487
487
|
mode: t = "system",
|
|
488
|
-
focusMode:
|
|
488
|
+
focusMode: a = "system",
|
|
489
489
|
fullWidth: s = !1,
|
|
490
490
|
className: n,
|
|
491
491
|
type: l = "button",
|
|
492
|
-
raw:
|
|
493
|
-
noBorder:
|
|
494
|
-
"aria-label":
|
|
492
|
+
raw: d = !1,
|
|
493
|
+
noBorder: c = !1,
|
|
494
|
+
"aria-label": h,
|
|
495
495
|
label: m,
|
|
496
|
-
size:
|
|
497
|
-
labelRight:
|
|
498
|
-
labelLeft:
|
|
499
|
-
noBackground:
|
|
500
|
-
align:
|
|
501
|
-
radius:
|
|
502
|
-
variant:
|
|
503
|
-
iconClassName:
|
|
504
|
-
animated:
|
|
505
|
-
...
|
|
506
|
-
},
|
|
507
|
-
const
|
|
508
|
-
type:
|
|
496
|
+
size: g = "medium",
|
|
497
|
+
labelRight: b,
|
|
498
|
+
labelLeft: f,
|
|
499
|
+
noBackground: V = !1,
|
|
500
|
+
align: L = "center",
|
|
501
|
+
radius: A = "large",
|
|
502
|
+
variant: X = "primary",
|
|
503
|
+
iconClassName: ee,
|
|
504
|
+
animated: y = !1,
|
|
505
|
+
...te
|
|
506
|
+
}, re) => {
|
|
507
|
+
const ae = Te({
|
|
508
|
+
type: M,
|
|
509
509
|
mode: t,
|
|
510
|
-
focusMode:
|
|
510
|
+
focusMode: a,
|
|
511
511
|
fullWidth: s,
|
|
512
|
-
disabled:
|
|
513
|
-
raw:
|
|
512
|
+
disabled: r,
|
|
513
|
+
raw: d,
|
|
514
514
|
className: n,
|
|
515
|
-
noBorder:
|
|
516
|
-
size:
|
|
517
|
-
labelRight:
|
|
518
|
-
labelLeft:
|
|
519
|
-
noBackground:
|
|
520
|
-
align:
|
|
521
|
-
radius:
|
|
522
|
-
variant:
|
|
523
|
-
animated:
|
|
524
|
-
}),
|
|
525
|
-
return
|
|
526
|
-
|
|
527
|
-
}, [
|
|
528
|
-
|
|
515
|
+
noBorder: c,
|
|
516
|
+
size: g,
|
|
517
|
+
labelRight: b,
|
|
518
|
+
labelLeft: f,
|
|
519
|
+
noBackground: V,
|
|
520
|
+
align: L,
|
|
521
|
+
radius: A,
|
|
522
|
+
variant: X,
|
|
523
|
+
animated: y
|
|
524
|
+
}), se = Ne({ mode: t, raw: d, iconClassName: ee }), W = Ce({ animated: y }), [k, v] = O(), [p, _] = O(), [E, I] = O(), x = T(0), u = T(null), oe = Ie([re, u]);
|
|
525
|
+
return $(() => {
|
|
526
|
+
y || (x.current = I.width + D[g] + (c ? 0 : G), u && u.current && (v.width > 0 ? u.current.style.width = `${v.width + x.current}px` : _.width > 0 ? u.current.style.width = `${_.width + x.current}px` : u.current.style.width = `${H[g]}px`));
|
|
527
|
+
}, [y, I, g, c, v, _]), $(() => {
|
|
528
|
+
E && E.current && y && (x.current = I.width + D[g] + (c ? 0 : G));
|
|
529
|
+
}, [I, E, g, c, y]), $(() => {
|
|
530
|
+
u && u.current && y && (b && k && v.width > 0 ? (k.current && (k.current.style.opacity = "100"), u.current.style.width = `${v.width + x.current}px`) : f && _.width > 0 ? (p.current && (p.current.style.opacity = "100"), u.current.style.width = `${_.width + x.current}px`) : (k.current && (k.current.style.opacity = "0"), p.current && (p.current.style.opacity = "0"), u.current.style.width = `${H[g]}px`));
|
|
529
531
|
}, [
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
y,
|
|
533
|
-
V,
|
|
534
|
-
u,
|
|
532
|
+
v,
|
|
533
|
+
b,
|
|
535
534
|
k,
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
535
|
+
_,
|
|
536
|
+
f,
|
|
537
|
+
p,
|
|
538
|
+
g,
|
|
539
|
+
y
|
|
540
|
+
]), /* @__PURE__ */ N(
|
|
541
|
+
J,
|
|
539
542
|
{
|
|
540
|
-
ref:
|
|
541
|
-
className:
|
|
542
|
-
disabled:
|
|
543
|
+
ref: oe,
|
|
544
|
+
className: ae,
|
|
545
|
+
disabled: r,
|
|
543
546
|
type: l,
|
|
544
|
-
"aria-label":
|
|
545
|
-
...
|
|
547
|
+
"aria-label": h || m,
|
|
548
|
+
...te,
|
|
546
549
|
children: [
|
|
547
|
-
/* @__PURE__ */ i("span", { ref:
|
|
548
|
-
/* @__PURE__ */ i("span", { ref:
|
|
549
|
-
/* @__PURE__ */ i("span", { ref:
|
|
550
|
+
/* @__PURE__ */ i("span", { ref: p, className: W, children: f && /* @__PURE__ */ i("span", { className: "pr-2", children: f }) }),
|
|
551
|
+
/* @__PURE__ */ i("span", { ref: E, className: se, children: e }),
|
|
552
|
+
/* @__PURE__ */ i("span", { ref: k, className: W, children: b && /* @__PURE__ */ i("span", { className: "pl-2", children: b }) })
|
|
550
553
|
]
|
|
551
554
|
}
|
|
552
555
|
);
|
|
553
556
|
}
|
|
554
557
|
);
|
|
555
|
-
|
|
558
|
+
K.displayName = "ButtonIcon";
|
|
556
559
|
/*!
|
|
557
|
-
@versini/ui-button v4.2.
|
|
560
|
+
@versini/ui-button v4.2.1
|
|
558
561
|
© 2025 gizmette.com
|
|
559
562
|
*/
|
|
560
563
|
try {
|
|
561
564
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
562
|
-
version: "4.2.
|
|
563
|
-
buildTime: "01/
|
|
565
|
+
version: "4.2.1",
|
|
566
|
+
buildTime: "01/26/2025 05:19 PM EST",
|
|
564
567
|
homepage: "https://github.com/aversini/ui-components",
|
|
565
568
|
license: "MIT"
|
|
566
569
|
});
|
|
567
570
|
} catch {
|
|
568
571
|
}
|
|
569
|
-
const
|
|
572
|
+
const Q = R.forwardRef(
|
|
570
573
|
({
|
|
571
574
|
children: e,
|
|
572
|
-
mode:
|
|
575
|
+
mode: r = "system",
|
|
573
576
|
className: t,
|
|
574
|
-
active:
|
|
577
|
+
active: a = !1,
|
|
575
578
|
...s
|
|
576
579
|
}, n) => {
|
|
577
|
-
const l =
|
|
580
|
+
const l = a ? o(
|
|
578
581
|
"relative",
|
|
579
582
|
"focus-within:static",
|
|
580
583
|
"focus-within:after:border-transparent",
|
|
@@ -585,18 +588,18 @@ const Y = T.forwardRef(
|
|
|
585
588
|
"after:left-0",
|
|
586
589
|
"after:right-0",
|
|
587
590
|
{
|
|
588
|
-
"after:border-table-dark":
|
|
589
|
-
"after:border-table-light":
|
|
590
|
-
"after:border-table-dark dark:after:border-table-light":
|
|
591
|
-
"after:border-table-light dark:after:border-table-dark":
|
|
591
|
+
"after:border-table-dark": r === "dark",
|
|
592
|
+
"after:border-table-light": r === "light",
|
|
593
|
+
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
594
|
+
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
592
595
|
}
|
|
593
596
|
) : "";
|
|
594
597
|
return /* @__PURE__ */ i("div", { className: l, children: /* @__PURE__ */ i(
|
|
595
|
-
|
|
598
|
+
K,
|
|
596
599
|
{
|
|
597
600
|
className: o("justify-center", t),
|
|
598
601
|
ref: n,
|
|
599
|
-
mode:
|
|
602
|
+
mode: r,
|
|
600
603
|
radius: "small",
|
|
601
604
|
...s,
|
|
602
605
|
children: e
|
|
@@ -604,35 +607,35 @@ const Y = T.forwardRef(
|
|
|
604
607
|
) });
|
|
605
608
|
}
|
|
606
609
|
);
|
|
607
|
-
|
|
608
|
-
const
|
|
610
|
+
Q.displayName = "ButtonSort";
|
|
611
|
+
const j = ({
|
|
609
612
|
children: e,
|
|
610
|
-
fill:
|
|
613
|
+
fill: r,
|
|
611
614
|
viewBox: t,
|
|
612
|
-
className:
|
|
615
|
+
className: a,
|
|
613
616
|
defaultViewBox: s,
|
|
614
617
|
size: n,
|
|
615
618
|
title: l,
|
|
616
|
-
semantic:
|
|
617
|
-
...
|
|
619
|
+
semantic: d = !1,
|
|
620
|
+
...c
|
|
618
621
|
}) => {
|
|
619
|
-
const
|
|
620
|
-
return /* @__PURE__ */
|
|
622
|
+
const h = o(n, a);
|
|
623
|
+
return /* @__PURE__ */ N(ie, { children: [
|
|
621
624
|
/* @__PURE__ */ i(
|
|
622
625
|
"svg",
|
|
623
626
|
{
|
|
624
627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
625
|
-
className:
|
|
628
|
+
className: h,
|
|
626
629
|
viewBox: t || s,
|
|
627
|
-
fill:
|
|
630
|
+
fill: r || "currentColor",
|
|
628
631
|
role: "img",
|
|
629
|
-
"aria-hidden": !
|
|
632
|
+
"aria-hidden": !d,
|
|
630
633
|
focusable: !1,
|
|
631
|
-
...
|
|
634
|
+
...c,
|
|
632
635
|
children: e
|
|
633
636
|
}
|
|
634
637
|
),
|
|
635
|
-
l &&
|
|
638
|
+
l && d && /* @__PURE__ */ i("span", { className: "sr-only", children: l })
|
|
636
639
|
] });
|
|
637
640
|
};
|
|
638
641
|
/*!
|
|
@@ -648,18 +651,18 @@ try {
|
|
|
648
651
|
});
|
|
649
652
|
} catch {
|
|
650
653
|
}
|
|
651
|
-
const
|
|
654
|
+
const Re = ({
|
|
652
655
|
className: e,
|
|
653
|
-
viewBox:
|
|
656
|
+
viewBox: r,
|
|
654
657
|
title: t,
|
|
655
|
-
monotone:
|
|
658
|
+
monotone: a,
|
|
656
659
|
...s
|
|
657
|
-
}) => /* @__PURE__ */
|
|
658
|
-
|
|
660
|
+
}) => /* @__PURE__ */ N(
|
|
661
|
+
j,
|
|
659
662
|
{
|
|
660
663
|
defaultViewBox: "0 0 576 512",
|
|
661
664
|
size: "size-5",
|
|
662
|
-
viewBox:
|
|
665
|
+
viewBox: r,
|
|
663
666
|
className: e,
|
|
664
667
|
title: t || "Sort",
|
|
665
668
|
...s,
|
|
@@ -668,7 +671,7 @@ const Ee = ({
|
|
|
668
671
|
"path",
|
|
669
672
|
{
|
|
670
673
|
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",
|
|
671
|
-
opacity:
|
|
674
|
+
opacity: a ? "1" : "0.4"
|
|
672
675
|
}
|
|
673
676
|
),
|
|
674
677
|
/* @__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 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" })
|
|
@@ -676,16 +679,16 @@ const Ee = ({
|
|
|
676
679
|
}
|
|
677
680
|
), ze = ({
|
|
678
681
|
className: e,
|
|
679
|
-
viewBox:
|
|
682
|
+
viewBox: r,
|
|
680
683
|
title: t,
|
|
681
|
-
monotone:
|
|
684
|
+
monotone: a,
|
|
682
685
|
...s
|
|
683
|
-
}) => /* @__PURE__ */
|
|
684
|
-
|
|
686
|
+
}) => /* @__PURE__ */ N(
|
|
687
|
+
j,
|
|
685
688
|
{
|
|
686
689
|
defaultViewBox: "0 0 576 512",
|
|
687
690
|
size: "size-5",
|
|
688
|
-
viewBox:
|
|
691
|
+
viewBox: r,
|
|
689
692
|
className: e,
|
|
690
693
|
title: t || "Sort Down",
|
|
691
694
|
...s,
|
|
@@ -694,24 +697,24 @@ const Ee = ({
|
|
|
694
697
|
"path",
|
|
695
698
|
{
|
|
696
699
|
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",
|
|
697
|
-
opacity:
|
|
700
|
+
opacity: a ? "1" : "0.4"
|
|
698
701
|
}
|
|
699
702
|
),
|
|
700
703
|
/* @__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-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" })
|
|
701
704
|
]
|
|
702
705
|
}
|
|
703
|
-
),
|
|
706
|
+
), Me = ({
|
|
704
707
|
className: e,
|
|
705
|
-
viewBox:
|
|
708
|
+
viewBox: r,
|
|
706
709
|
title: t,
|
|
707
|
-
monotone:
|
|
710
|
+
monotone: a,
|
|
708
711
|
...s
|
|
709
|
-
}) => /* @__PURE__ */
|
|
710
|
-
|
|
712
|
+
}) => /* @__PURE__ */ N(
|
|
713
|
+
j,
|
|
711
714
|
{
|
|
712
715
|
defaultViewBox: "0 0 576 512",
|
|
713
716
|
size: "size-5",
|
|
714
|
-
viewBox:
|
|
717
|
+
viewBox: r,
|
|
715
718
|
className: e,
|
|
716
719
|
title: t || "Sort Up",
|
|
717
720
|
...s,
|
|
@@ -720,7 +723,7 @@ const Ee = ({
|
|
|
720
723
|
"path",
|
|
721
724
|
{
|
|
722
725
|
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",
|
|
723
|
-
opacity:
|
|
726
|
+
opacity: a ? "1" : "0.4"
|
|
724
727
|
}
|
|
725
728
|
),
|
|
726
729
|
/* @__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.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" })
|
|
@@ -740,45 +743,45 @@ try {
|
|
|
740
743
|
});
|
|
741
744
|
} catch {
|
|
742
745
|
}
|
|
743
|
-
const
|
|
746
|
+
const C = R.createContext({
|
|
744
747
|
mode: "light",
|
|
745
748
|
cellWrapper: "thead",
|
|
746
749
|
stickyHeader: !1,
|
|
747
750
|
stickyFooter: !1,
|
|
748
751
|
compact: !1
|
|
749
|
-
}),
|
|
752
|
+
}), Oe = ({
|
|
750
753
|
children: e,
|
|
751
|
-
mode:
|
|
754
|
+
mode: r = "system",
|
|
752
755
|
caption: t,
|
|
753
|
-
compact:
|
|
756
|
+
compact: a,
|
|
754
757
|
summary: s,
|
|
755
758
|
className: n,
|
|
756
759
|
wrapperClassName: l,
|
|
757
|
-
maxHeight:
|
|
758
|
-
stickyHeader:
|
|
759
|
-
stickyFooter:
|
|
760
|
+
maxHeight: d,
|
|
761
|
+
stickyHeader: c,
|
|
762
|
+
stickyFooter: h,
|
|
760
763
|
...m
|
|
761
764
|
}) => {
|
|
762
|
-
const
|
|
763
|
-
mode:
|
|
765
|
+
const g = ce({
|
|
766
|
+
mode: r,
|
|
764
767
|
className: n,
|
|
765
768
|
wrapperClassName: l,
|
|
766
|
-
stickyHeader:
|
|
767
|
-
stickyFooter:
|
|
769
|
+
stickyHeader: c,
|
|
770
|
+
stickyFooter: h
|
|
768
771
|
});
|
|
769
772
|
return /* @__PURE__ */ i(
|
|
770
|
-
|
|
773
|
+
C.Provider,
|
|
771
774
|
{
|
|
772
|
-
value: { mode:
|
|
775
|
+
value: { mode: r, stickyHeader: c, stickyFooter: h, compact: a },
|
|
773
776
|
children: /* @__PURE__ */ i(
|
|
774
777
|
"div",
|
|
775
778
|
{
|
|
776
|
-
className:
|
|
777
|
-
...
|
|
778
|
-
style: { maxHeight:
|
|
779
|
+
className: g.wrapper,
|
|
780
|
+
...d && {
|
|
781
|
+
style: { maxHeight: d }
|
|
779
782
|
},
|
|
780
|
-
children: /* @__PURE__ */
|
|
781
|
-
t && /* @__PURE__ */ i("caption", { className:
|
|
783
|
+
children: /* @__PURE__ */ N("table", { className: g.table, summary: s, ...m, children: [
|
|
784
|
+
t && /* @__PURE__ */ i("caption", { className: g.caption, children: t }),
|
|
782
785
|
e
|
|
783
786
|
] })
|
|
784
787
|
}
|
|
@@ -787,107 +790,107 @@ const _ = T.createContext({
|
|
|
787
790
|
);
|
|
788
791
|
}, Pe = ({
|
|
789
792
|
children: e,
|
|
790
|
-
className:
|
|
793
|
+
className: r,
|
|
791
794
|
...t
|
|
792
795
|
}) => {
|
|
793
|
-
const
|
|
794
|
-
|
|
795
|
-
const s =
|
|
796
|
-
className:
|
|
797
|
-
mode:
|
|
798
|
-
stickyHeader:
|
|
796
|
+
const a = B(C);
|
|
797
|
+
a.cellWrapper = z;
|
|
798
|
+
const s = de({
|
|
799
|
+
className: r,
|
|
800
|
+
mode: a.mode,
|
|
801
|
+
stickyHeader: a.stickyHeader
|
|
799
802
|
});
|
|
800
803
|
return /* @__PURE__ */ i("thead", { className: s, ...t, children: e });
|
|
801
|
-
},
|
|
804
|
+
}, Ue = ({
|
|
802
805
|
children: e,
|
|
803
|
-
className:
|
|
806
|
+
className: r,
|
|
804
807
|
...t
|
|
805
808
|
}) => {
|
|
806
|
-
const
|
|
807
|
-
|
|
808
|
-
const s =
|
|
809
|
-
className:
|
|
810
|
-
mode:
|
|
811
|
-
stickyFooter:
|
|
809
|
+
const a = B(C);
|
|
810
|
+
a.cellWrapper = U;
|
|
811
|
+
const s = ge({
|
|
812
|
+
className: r,
|
|
813
|
+
mode: a.mode,
|
|
814
|
+
stickyFooter: a.stickyFooter
|
|
812
815
|
});
|
|
813
816
|
return /* @__PURE__ */ i("tfoot", { className: s, ...t, children: e });
|
|
814
|
-
},
|
|
815
|
-
const t =
|
|
816
|
-
return t.cellWrapper =
|
|
817
|
-
},
|
|
817
|
+
}, je = ({ children: e, ...r }) => {
|
|
818
|
+
const t = B(C);
|
|
819
|
+
return t.cellWrapper = w, /* @__PURE__ */ i("tbody", { ...r, children: e });
|
|
820
|
+
}, We = ({
|
|
818
821
|
children: e,
|
|
819
|
-
className:
|
|
822
|
+
className: r,
|
|
820
823
|
...t
|
|
821
824
|
}) => {
|
|
822
|
-
const
|
|
823
|
-
mode:
|
|
824
|
-
cellWrapper:
|
|
825
|
-
className:
|
|
825
|
+
const a = B(C), s = he({
|
|
826
|
+
mode: a.mode,
|
|
827
|
+
cellWrapper: a.cellWrapper,
|
|
828
|
+
className: r
|
|
826
829
|
});
|
|
827
830
|
return /* @__PURE__ */ i("tr", { className: s, ...t, children: e });
|
|
828
|
-
},
|
|
831
|
+
}, Ve = ({
|
|
829
832
|
children: e,
|
|
830
|
-
component:
|
|
833
|
+
component: r,
|
|
831
834
|
className: t,
|
|
832
|
-
align:
|
|
835
|
+
align: a,
|
|
833
836
|
...s
|
|
834
837
|
}) => {
|
|
835
|
-
const n =
|
|
838
|
+
const n = B(C), l = r || (n.cellWrapper === z ? "th" : "td"), { mainClasses: d, alignClasses: c } = be({
|
|
836
839
|
cellWrapper: n.cellWrapper,
|
|
837
840
|
className: t,
|
|
838
841
|
mode: n.mode,
|
|
839
842
|
compact: n.compact,
|
|
840
|
-
align:
|
|
843
|
+
align: a
|
|
841
844
|
});
|
|
842
|
-
return
|
|
843
|
-
},
|
|
845
|
+
return a ? /* @__PURE__ */ i(l, { className: d, ...s, children: /* @__PURE__ */ i("div", { className: c, children: e }) }) : /* @__PURE__ */ i(l, { className: d, ...s, children: e });
|
|
846
|
+
}, Fe = ({
|
|
844
847
|
align: e,
|
|
845
|
-
children:
|
|
848
|
+
children: r,
|
|
846
849
|
buttonClassName: t,
|
|
847
|
-
className:
|
|
850
|
+
className: a,
|
|
848
851
|
component: s,
|
|
849
852
|
focusMode: n = "alt-system",
|
|
850
853
|
mode: l = "alt-system",
|
|
851
|
-
onClick:
|
|
852
|
-
sortDirection:
|
|
853
|
-
sortedCell:
|
|
854
|
+
onClick: d,
|
|
855
|
+
sortDirection: c,
|
|
856
|
+
sortedCell: h,
|
|
854
857
|
cellId: m,
|
|
855
|
-
...
|
|
858
|
+
...g
|
|
856
859
|
}) => {
|
|
857
|
-
const
|
|
860
|
+
const b = me({ buttonClassName: t });
|
|
858
861
|
return /* @__PURE__ */ i(
|
|
859
|
-
|
|
862
|
+
Ve,
|
|
860
863
|
{
|
|
861
864
|
component: s,
|
|
862
|
-
className:
|
|
865
|
+
className: a,
|
|
863
866
|
role: "columnheader",
|
|
864
|
-
"aria-sort":
|
|
865
|
-
...
|
|
867
|
+
"aria-sort": c === S.ASC && h === m ? "ascending" : c === S.DESC && h === m ? "descending" : "other",
|
|
868
|
+
...g,
|
|
866
869
|
children: /* @__PURE__ */ i(
|
|
867
|
-
|
|
870
|
+
Q,
|
|
868
871
|
{
|
|
869
|
-
active:
|
|
870
|
-
className:
|
|
871
|
-
onClick:
|
|
872
|
+
active: h === m,
|
|
873
|
+
className: b,
|
|
874
|
+
onClick: d,
|
|
872
875
|
align: e,
|
|
873
876
|
noBorder: !0,
|
|
874
877
|
focusMode: n,
|
|
875
878
|
mode: l,
|
|
876
879
|
fullWidth: !0,
|
|
877
|
-
labelRight:
|
|
878
|
-
children:
|
|
880
|
+
labelRight: r,
|
|
881
|
+
children: c === S.ASC && h === m ? /* @__PURE__ */ i(Me, { className: "size-4", monotone: !0 }) : c === S.DESC && h === m ? /* @__PURE__ */ i(ze, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ i(Re, { className: "size-4", monotone: !0 })
|
|
879
882
|
}
|
|
880
883
|
)
|
|
881
884
|
}
|
|
882
885
|
);
|
|
883
886
|
};
|
|
884
887
|
export {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
888
|
+
Oe as Table,
|
|
889
|
+
je as TableBody,
|
|
890
|
+
Ve as TableCell,
|
|
891
|
+
Fe as TableCellSort,
|
|
892
|
+
S as TableCellSortDirections,
|
|
893
|
+
Ue as TableFooter,
|
|
891
894
|
Pe as TableHead,
|
|
892
|
-
|
|
895
|
+
We as TableRow
|
|
893
896
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-table",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@tailwindcss/typography": "0.5.16",
|
|
46
|
-
"@versini/ui-button": "4.2.
|
|
46
|
+
"@versini/ui-button": "4.2.1",
|
|
47
47
|
"@versini/ui-icons": "4.6.0",
|
|
48
48
|
"clsx": "2.1.1",
|
|
49
49
|
"tailwindcss": "3.4.17"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"sideEffects": [
|
|
52
52
|
"**/*.css"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2afa12a4fcc5da2231f908342e8e18524126274b"
|
|
55
55
|
}
|