@versini/ui-table 6.4.0 → 6.4.2
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 +154 -149
- package/dist/index.js +3 -3
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as _, jsx as l, Fragment as w } from "react/jsx-runtime";
|
|
2
2
|
import { ButtonSort_private as C } from "@versini/ui-button/private";
|
|
3
|
-
import
|
|
4
|
-
import N, { useContext as
|
|
5
|
-
import { TableCellSortDirections as
|
|
3
|
+
import o from "clsx";
|
|
4
|
+
import N, { useContext as y } from "react";
|
|
5
|
+
import { TableCellSortDirections as k } from "../TableConstants/TableConstants.js";
|
|
6
6
|
/*!
|
|
7
7
|
@versini/ui-icons v4.15.1
|
|
8
8
|
© 2025 gizmette.com
|
|
@@ -29,30 +29,30 @@ try {
|
|
|
29
29
|
});
|
|
30
30
|
} catch {
|
|
31
31
|
}
|
|
32
|
-
const x = ({ children:
|
|
33
|
-
const h =
|
|
34
|
-
return /* @__PURE__ */
|
|
32
|
+
const x = ({ children: t, fill: r, viewBox: e, className: a, defaultViewBox: s, size: n, title: c, semantic: b = !1, ...i }) => {
|
|
33
|
+
const h = o(n, a);
|
|
34
|
+
return /* @__PURE__ */ _("svg", {
|
|
35
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36
36
|
className: h,
|
|
37
|
-
viewBox:
|
|
37
|
+
viewBox: e || s,
|
|
38
38
|
fill: r || "currentColor",
|
|
39
39
|
role: "img",
|
|
40
40
|
"aria-hidden": !b,
|
|
41
41
|
focusable: !1,
|
|
42
42
|
...i,
|
|
43
43
|
children: [
|
|
44
|
-
|
|
45
|
-
children:
|
|
44
|
+
c && b && /* @__PURE__ */ l("title", {
|
|
45
|
+
children: c
|
|
46
46
|
}),
|
|
47
|
-
|
|
47
|
+
t
|
|
48
48
|
]
|
|
49
49
|
});
|
|
50
|
-
}, S = ({ className:
|
|
50
|
+
}, S = ({ className: t, viewBox: r, title: e, monotone: a, ...s }) => /* @__PURE__ */ _(x, {
|
|
51
51
|
defaultViewBox: "0 0 576 512",
|
|
52
52
|
size: "size-5",
|
|
53
53
|
viewBox: r,
|
|
54
|
-
className:
|
|
55
|
-
title:
|
|
54
|
+
className: t,
|
|
55
|
+
title: e || "Sort",
|
|
56
56
|
...s,
|
|
57
57
|
children: [
|
|
58
58
|
/* @__PURE__ */ l("path", {
|
|
@@ -63,12 +63,12 @@ const x = ({ children: e, fill: r, viewBox: t, className: a, defaultViewBox: s,
|
|
|
63
63
|
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"
|
|
64
64
|
})
|
|
65
65
|
]
|
|
66
|
-
}), T = ({ className:
|
|
66
|
+
}), T = ({ className: t, viewBox: r, title: e, monotone: a, ...s }) => /* @__PURE__ */ _(x, {
|
|
67
67
|
defaultViewBox: "0 0 576 512",
|
|
68
68
|
size: "size-5",
|
|
69
69
|
viewBox: r,
|
|
70
|
-
className:
|
|
71
|
-
title:
|
|
70
|
+
className: t,
|
|
71
|
+
title: e || "Sort Down",
|
|
72
72
|
...s,
|
|
73
73
|
children: [
|
|
74
74
|
/* @__PURE__ */ l("path", {
|
|
@@ -79,12 +79,12 @@ const x = ({ children: e, fill: r, viewBox: t, className: a, defaultViewBox: s,
|
|
|
79
79
|
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"
|
|
80
80
|
})
|
|
81
81
|
]
|
|
82
|
-
}), I = ({ className:
|
|
82
|
+
}), I = ({ className: t, viewBox: r, title: e, monotone: a, ...s }) => /* @__PURE__ */ _(x, {
|
|
83
83
|
defaultViewBox: "0 0 576 512",
|
|
84
84
|
size: "size-5",
|
|
85
85
|
viewBox: r,
|
|
86
|
-
className:
|
|
87
|
-
title:
|
|
86
|
+
className: t,
|
|
87
|
+
title: e || "Sort Up",
|
|
88
88
|
...s,
|
|
89
89
|
children: [
|
|
90
90
|
/* @__PURE__ */ l("path", {
|
|
@@ -95,179 +95,184 @@ const x = ({ children: e, fill: r, viewBox: t, className: a, defaultViewBox: s,
|
|
|
95
95
|
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"
|
|
96
96
|
})
|
|
97
97
|
]
|
|
98
|
-
}),
|
|
98
|
+
}), g = N.createContext({
|
|
99
99
|
mode: "light",
|
|
100
100
|
cellWrapper: "thead",
|
|
101
101
|
stickyHeader: !1,
|
|
102
102
|
stickyFooter: !1,
|
|
103
103
|
compact: !1
|
|
104
|
-
}),
|
|
104
|
+
}), u = "thead", v = "tfoot", f = "tbody", z = ({ mode: t }) => o(
|
|
105
105
|
"size-8",
|
|
106
106
|
"align-[-0.125em]",
|
|
107
107
|
"border-4",
|
|
108
108
|
"inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]",
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
{
|
|
110
|
+
"text-copy-dark": t === "light",
|
|
111
|
+
"text-copy-light": t === "dark",
|
|
112
|
+
"text-copy-dark dark:text-copy-light": t === "alt-system",
|
|
113
|
+
"text-copy-light dark:text-copy-dark": t === "system"
|
|
114
|
+
}
|
|
115
|
+
), E = ({ mode: t }) => ({
|
|
111
116
|
inner: "relative",
|
|
112
|
-
overlay:
|
|
117
|
+
overlay: o(
|
|
113
118
|
"absolute inset-0 z-20 cursor-not-allowed",
|
|
114
|
-
"backdrop-blur-
|
|
119
|
+
"backdrop-blur-xs bg-white/30 dark:bg-black/30"
|
|
115
120
|
),
|
|
116
|
-
spinnerWrapper:
|
|
121
|
+
spinnerWrapper: o(
|
|
117
122
|
"absolute z-30 top-0 left-0 right-0 h-[min(100%,100vh)]",
|
|
118
123
|
"flex items-center justify-center",
|
|
119
124
|
"pointer-events-none"
|
|
120
125
|
),
|
|
121
|
-
spinner: z()
|
|
126
|
+
spinner: z({ mode: t })
|
|
122
127
|
}), R = ({
|
|
123
|
-
mode:
|
|
128
|
+
mode: t,
|
|
124
129
|
className: r,
|
|
125
|
-
wrapperClassName:
|
|
130
|
+
wrapperClassName: e,
|
|
126
131
|
stickyHeader: a,
|
|
127
132
|
stickyFooter: s,
|
|
128
133
|
disabled: n
|
|
129
134
|
}) => {
|
|
130
|
-
const
|
|
135
|
+
const c = n ? E({ mode: t }) : null;
|
|
131
136
|
return {
|
|
132
|
-
overlay:
|
|
133
|
-
inner:
|
|
134
|
-
spinnerWrapper:
|
|
135
|
-
spinner:
|
|
136
|
-
wrapper:
|
|
137
|
+
overlay: c?.overlay ?? "",
|
|
138
|
+
inner: c?.inner ?? "",
|
|
139
|
+
spinnerWrapper: c?.spinnerWrapper ?? "",
|
|
140
|
+
spinner: c?.spinner ?? "",
|
|
141
|
+
wrapper: o(
|
|
137
142
|
"not-prose relative w-full rounded-lg shadow-md",
|
|
138
143
|
{
|
|
139
144
|
"overflow-x-auto": !a && !s && !n,
|
|
140
145
|
"overflow-y-scroll": (a || s) && !n,
|
|
141
146
|
"overflow-hidden": n,
|
|
142
|
-
"bg-surface-darker":
|
|
143
|
-
"bg-surface-light":
|
|
144
|
-
"dark:bg-surface-light":
|
|
145
|
-
"dark:bg-surface-darker":
|
|
146
|
-
"text-copy-light":
|
|
147
|
-
"text-copy-dark":
|
|
148
|
-
"text-copy-light dark:text-copy-dark":
|
|
149
|
-
"text-copy-dark dark:text-copy-light":
|
|
147
|
+
"bg-surface-darker": t === "dark" || t === "system",
|
|
148
|
+
"bg-surface-light": t === "light" || t === "alt-system",
|
|
149
|
+
"dark:bg-surface-light": t === "system",
|
|
150
|
+
"dark:bg-surface-darker": t === "alt-system",
|
|
151
|
+
"text-copy-light": t === "dark",
|
|
152
|
+
"text-copy-dark": t === "light",
|
|
153
|
+
"text-copy-light dark:text-copy-dark": t === "system",
|
|
154
|
+
"text-copy-dark dark:text-copy-light": t === "alt-system"
|
|
150
155
|
},
|
|
151
|
-
|
|
156
|
+
e
|
|
152
157
|
),
|
|
153
|
-
table:
|
|
154
|
-
"text-copy-light":
|
|
155
|
-
"text-copy-dark":
|
|
156
|
-
"text-copy-light dark:text-copy-dark":
|
|
157
|
-
"text-copy-dark dark:text-copy-light":
|
|
158
|
+
table: o("my-0 w-full text-left text-sm", r, {
|
|
159
|
+
"text-copy-light": t === "dark",
|
|
160
|
+
"text-copy-dark": t === "light",
|
|
161
|
+
"text-copy-light dark:text-copy-dark": t === "system",
|
|
162
|
+
"text-copy-dark dark:text-copy-light": t === "alt-system"
|
|
158
163
|
}),
|
|
159
|
-
caption:
|
|
160
|
-
"text-copy-light":
|
|
161
|
-
"text-copy-dark":
|
|
162
|
-
"text-copy-light dark:text-copy-dark":
|
|
163
|
-
"text-copy-dark dark:text-copy-light":
|
|
164
|
+
caption: o("py-2 text-sm font-bold", {
|
|
165
|
+
"text-copy-light": t === "dark",
|
|
166
|
+
"text-copy-dark": t === "light",
|
|
167
|
+
"text-copy-light dark:text-copy-dark": t === "system",
|
|
168
|
+
"text-copy-dark dark:text-copy-light": t === "alt-system"
|
|
164
169
|
})
|
|
165
170
|
};
|
|
166
171
|
}, V = ({
|
|
167
|
-
className:
|
|
172
|
+
className: t,
|
|
168
173
|
stickyHeader: r,
|
|
169
|
-
mode:
|
|
170
|
-
}) =>
|
|
174
|
+
mode: e
|
|
175
|
+
}) => o(
|
|
171
176
|
{
|
|
172
177
|
"sticky top-0 z-10": r,
|
|
173
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r &&
|
|
174
|
-
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r &&
|
|
175
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r &&
|
|
176
|
-
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r &&
|
|
178
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && e === "dark",
|
|
179
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && e === "system",
|
|
180
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && e === "light",
|
|
181
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && e === "alt-system"
|
|
177
182
|
},
|
|
178
|
-
|
|
183
|
+
t
|
|
179
184
|
), W = ({
|
|
180
|
-
className:
|
|
185
|
+
className: t,
|
|
181
186
|
stickyFooter: r,
|
|
182
|
-
mode:
|
|
183
|
-
}) =>
|
|
187
|
+
mode: e
|
|
188
|
+
}) => o(
|
|
184
189
|
{
|
|
185
190
|
"sticky bottom-0 z-10": r,
|
|
186
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r &&
|
|
187
|
-
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r &&
|
|
188
|
-
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r &&
|
|
189
|
-
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r &&
|
|
191
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && e === "dark",
|
|
192
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && e === "system",
|
|
193
|
+
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && e === "light",
|
|
194
|
+
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && e === "alt-system"
|
|
190
195
|
},
|
|
191
|
-
|
|
196
|
+
t
|
|
192
197
|
), B = ({
|
|
193
|
-
mode:
|
|
198
|
+
mode: t,
|
|
194
199
|
className: r,
|
|
195
|
-
cellWrapper:
|
|
196
|
-
}) =>
|
|
200
|
+
cellWrapper: e
|
|
201
|
+
}) => e === u || e === v ? o(
|
|
197
202
|
{
|
|
198
|
-
"bg-table-head-dark":
|
|
199
|
-
"bg-table-head-light":
|
|
200
|
-
"dark:bg-table-head-light":
|
|
201
|
-
"dark:bg-table-head-dark":
|
|
203
|
+
"bg-table-head-dark": t === "dark" || t === "system",
|
|
204
|
+
"bg-table-head-light": t === "light" || t === "alt-system",
|
|
205
|
+
"dark:bg-table-head-light": t === "system",
|
|
206
|
+
"dark:bg-table-head-dark": t === "alt-system"
|
|
202
207
|
},
|
|
203
208
|
r
|
|
204
|
-
) :
|
|
209
|
+
) : o(
|
|
205
210
|
"border-b last:border-0",
|
|
206
211
|
{
|
|
207
|
-
"hover:bg-table-dark-odd/50! hover:dark:bg-table-light-odd/50!":
|
|
208
|
-
"hover:bg-table-light-odd/50! hover:dark:bg-table-dark-odd/50!":
|
|
209
|
-
"border-table-dark":
|
|
210
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even":
|
|
211
|
-
"border-table-light":
|
|
212
|
-
"odd:bg-table-light-odd even:bg-table-light-even":
|
|
213
|
-
"dark:border-table-light":
|
|
214
|
-
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even":
|
|
215
|
-
"dark:border-table-dark":
|
|
216
|
-
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even":
|
|
212
|
+
"hover:bg-table-dark-odd/50! hover:dark:bg-table-light-odd/50!": t === "alt-system" || t === "light",
|
|
213
|
+
"hover:bg-table-light-odd/50! hover:dark:bg-table-dark-odd/50!": t === "system" || t === "dark",
|
|
214
|
+
"border-table-dark": t === "dark" || t === "system",
|
|
215
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even": t === "dark",
|
|
216
|
+
"border-table-light": t === "light" || t === "alt-system",
|
|
217
|
+
"odd:bg-table-light-odd even:bg-table-light-even": t === "light",
|
|
218
|
+
"dark:border-table-light": t === "system",
|
|
219
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === "system",
|
|
220
|
+
"dark:border-table-dark": t === "alt-system",
|
|
221
|
+
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === "alt-system"
|
|
217
222
|
},
|
|
218
223
|
r
|
|
219
224
|
), L = ({
|
|
220
|
-
cellWrapper:
|
|
225
|
+
cellWrapper: t,
|
|
221
226
|
className: r,
|
|
222
|
-
compact:
|
|
227
|
+
compact: e,
|
|
223
228
|
mode: a,
|
|
224
229
|
align: s
|
|
225
230
|
}) => ({
|
|
226
|
-
alignClasses:
|
|
231
|
+
alignClasses: o({
|
|
227
232
|
"flex justify-start text-left": s === "left",
|
|
228
233
|
"flex justify-center text-center": s === "center",
|
|
229
234
|
"flex justify-end text-right": s === "right"
|
|
230
235
|
}),
|
|
231
|
-
mainClasses:
|
|
236
|
+
mainClasses: o(
|
|
232
237
|
{
|
|
233
238
|
"text-copy-light": a === "dark" || a === "system",
|
|
234
239
|
"text-copy-dark": a === "light" || a === "alt-system",
|
|
235
240
|
"dark:text-copy-dark": a === "system",
|
|
236
241
|
"dark:text-copy-light": a === "alt-system",
|
|
237
|
-
"px-4 py-3": !
|
|
238
|
-
"p-4": !
|
|
239
|
-
"px-2 py-1.5":
|
|
242
|
+
"px-4 py-3": !e && (t === u || t === v),
|
|
243
|
+
"p-4": !e && t === f,
|
|
244
|
+
"px-2 py-1.5": e
|
|
240
245
|
},
|
|
241
246
|
r
|
|
242
247
|
)
|
|
243
248
|
}), M = ({
|
|
244
|
-
buttonClassName:
|
|
245
|
-
}) =>
|
|
246
|
-
children:
|
|
249
|
+
buttonClassName: t
|
|
250
|
+
}) => o("rounded-none text-sm", t), H = ({
|
|
251
|
+
children: t,
|
|
247
252
|
mode: r = "system",
|
|
248
|
-
caption:
|
|
253
|
+
caption: e,
|
|
249
254
|
compact: a,
|
|
250
255
|
disabled: s = !1,
|
|
251
256
|
summary: n,
|
|
252
|
-
className:
|
|
257
|
+
className: c,
|
|
253
258
|
wrapperClassName: b,
|
|
254
259
|
maxHeight: i,
|
|
255
260
|
stickyHeader: h,
|
|
256
|
-
stickyFooter:
|
|
257
|
-
...
|
|
261
|
+
stickyFooter: p,
|
|
262
|
+
...m
|
|
258
263
|
}) => {
|
|
259
264
|
const d = R({
|
|
260
265
|
mode: r,
|
|
261
|
-
className:
|
|
266
|
+
className: c,
|
|
262
267
|
wrapperClassName: b,
|
|
263
268
|
stickyHeader: h,
|
|
264
|
-
stickyFooter:
|
|
269
|
+
stickyFooter: p,
|
|
265
270
|
disabled: s
|
|
266
271
|
});
|
|
267
272
|
return /* @__PURE__ */ l(
|
|
268
|
-
|
|
273
|
+
g.Provider,
|
|
269
274
|
{
|
|
270
|
-
value: { mode: r, stickyHeader: h, stickyFooter:
|
|
275
|
+
value: { mode: r, stickyHeader: h, stickyFooter: p, compact: a },
|
|
271
276
|
children: /* @__PURE__ */ l(
|
|
272
277
|
"div",
|
|
273
278
|
{
|
|
@@ -275,123 +280,123 @@ const x = ({ children: e, fill: r, viewBox: t, className: a, defaultViewBox: s,
|
|
|
275
280
|
...i && {
|
|
276
281
|
style: { maxHeight: i }
|
|
277
282
|
},
|
|
278
|
-
children: s ? /* @__PURE__ */
|
|
283
|
+
children: s ? /* @__PURE__ */ _(w, { children: [
|
|
279
284
|
/* @__PURE__ */ l("div", { className: d.spinnerWrapper, children: /* @__PURE__ */ l("div", { className: d.spinner, role: "status", children: /* @__PURE__ */ l("span", { className: "sr-only", children: "Loading..." }) }) }),
|
|
280
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ _("div", { className: d.inner, children: [
|
|
281
286
|
/* @__PURE__ */ l("div", { className: d.overlay }),
|
|
282
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ _(
|
|
283
288
|
"table",
|
|
284
289
|
{
|
|
285
290
|
className: d.table,
|
|
286
291
|
summary: n,
|
|
287
292
|
...s && { "aria-disabled": "true" },
|
|
288
|
-
...
|
|
293
|
+
...m,
|
|
289
294
|
children: [
|
|
290
|
-
|
|
291
|
-
|
|
295
|
+
e && /* @__PURE__ */ l("caption", { className: d.caption, children: e }),
|
|
296
|
+
t
|
|
292
297
|
]
|
|
293
298
|
}
|
|
294
299
|
)
|
|
295
300
|
] })
|
|
296
|
-
] }) : /* @__PURE__ */
|
|
297
|
-
|
|
298
|
-
|
|
301
|
+
] }) : /* @__PURE__ */ _("table", { className: d.table, summary: n, ...m, children: [
|
|
302
|
+
e && /* @__PURE__ */ l("caption", { className: d.caption, children: e }),
|
|
303
|
+
t
|
|
299
304
|
] })
|
|
300
305
|
}
|
|
301
306
|
)
|
|
302
307
|
}
|
|
303
308
|
);
|
|
304
309
|
}, F = ({
|
|
305
|
-
children:
|
|
310
|
+
children: t,
|
|
306
311
|
className: r,
|
|
307
|
-
...
|
|
312
|
+
...e
|
|
308
313
|
}) => {
|
|
309
|
-
const a =
|
|
310
|
-
a.cellWrapper =
|
|
314
|
+
const a = y(g);
|
|
315
|
+
a.cellWrapper = u;
|
|
311
316
|
const s = V({
|
|
312
317
|
className: r,
|
|
313
318
|
mode: a.mode,
|
|
314
319
|
stickyHeader: a.stickyHeader
|
|
315
320
|
});
|
|
316
|
-
return /* @__PURE__ */ l("thead", { className: s, ...
|
|
321
|
+
return /* @__PURE__ */ l("thead", { className: s, ...e, children: t });
|
|
317
322
|
}, G = ({
|
|
318
|
-
children:
|
|
323
|
+
children: t,
|
|
319
324
|
className: r,
|
|
320
|
-
...
|
|
325
|
+
...e
|
|
321
326
|
}) => {
|
|
322
|
-
const a =
|
|
327
|
+
const a = y(g);
|
|
323
328
|
a.cellWrapper = v;
|
|
324
329
|
const s = W({
|
|
325
330
|
className: r,
|
|
326
331
|
mode: a.mode,
|
|
327
332
|
stickyFooter: a.stickyFooter
|
|
328
333
|
});
|
|
329
|
-
return /* @__PURE__ */ l("tfoot", { className: s, ...
|
|
330
|
-
}, Y = ({ children:
|
|
331
|
-
const
|
|
332
|
-
return
|
|
334
|
+
return /* @__PURE__ */ l("tfoot", { className: s, ...e, children: t });
|
|
335
|
+
}, Y = ({ children: t, ...r }) => {
|
|
336
|
+
const e = y(g);
|
|
337
|
+
return e.cellWrapper = f, /* @__PURE__ */ l("tbody", { ...r, children: t });
|
|
333
338
|
}, q = ({
|
|
334
|
-
children:
|
|
339
|
+
children: t,
|
|
335
340
|
className: r,
|
|
336
|
-
...
|
|
341
|
+
...e
|
|
337
342
|
}) => {
|
|
338
|
-
const a =
|
|
343
|
+
const a = y(g), s = B({
|
|
339
344
|
mode: a.mode,
|
|
340
345
|
cellWrapper: a.cellWrapper,
|
|
341
346
|
className: r
|
|
342
347
|
});
|
|
343
|
-
return /* @__PURE__ */ l("tr", { className: s, ...
|
|
348
|
+
return /* @__PURE__ */ l("tr", { className: s, ...e, children: t });
|
|
344
349
|
}, O = ({
|
|
345
|
-
children:
|
|
350
|
+
children: t,
|
|
346
351
|
component: r,
|
|
347
|
-
className:
|
|
352
|
+
className: e,
|
|
348
353
|
align: a,
|
|
349
354
|
...s
|
|
350
355
|
}) => {
|
|
351
|
-
const n =
|
|
356
|
+
const n = y(g), c = r || (n.cellWrapper === u ? "th" : "td"), { mainClasses: b, alignClasses: i } = L({
|
|
352
357
|
cellWrapper: n.cellWrapper,
|
|
353
|
-
className:
|
|
358
|
+
className: e,
|
|
354
359
|
mode: n.mode,
|
|
355
360
|
compact: n.compact,
|
|
356
361
|
align: a
|
|
357
362
|
});
|
|
358
|
-
return a ? /* @__PURE__ */ l(
|
|
363
|
+
return a ? /* @__PURE__ */ l(c, { className: b, ...s, children: /* @__PURE__ */ l("div", { className: i, children: t }) }) : /* @__PURE__ */ l(c, { className: b, ...s, children: t });
|
|
359
364
|
}, J = ({
|
|
360
|
-
align:
|
|
365
|
+
align: t,
|
|
361
366
|
children: r,
|
|
362
|
-
buttonClassName:
|
|
367
|
+
buttonClassName: e,
|
|
363
368
|
className: a,
|
|
364
369
|
component: s,
|
|
365
370
|
focusMode: n = "alt-system",
|
|
366
|
-
mode:
|
|
371
|
+
mode: c = "alt-system",
|
|
367
372
|
onClick: b,
|
|
368
373
|
sortDirection: i,
|
|
369
374
|
sortedCell: h,
|
|
370
|
-
cellId:
|
|
371
|
-
...
|
|
375
|
+
cellId: p,
|
|
376
|
+
...m
|
|
372
377
|
}) => {
|
|
373
|
-
const d = M({ buttonClassName:
|
|
378
|
+
const d = M({ buttonClassName: e });
|
|
374
379
|
return /* @__PURE__ */ l(
|
|
375
380
|
O,
|
|
376
381
|
{
|
|
377
382
|
component: s,
|
|
378
383
|
className: a,
|
|
379
384
|
role: "columnheader",
|
|
380
|
-
"aria-sort": i ===
|
|
381
|
-
...
|
|
385
|
+
"aria-sort": i === k.ASC && h === p ? "ascending" : i === k.DESC && h === p ? "descending" : "other",
|
|
386
|
+
...m,
|
|
382
387
|
children: /* @__PURE__ */ l(
|
|
383
388
|
C,
|
|
384
389
|
{
|
|
385
|
-
active: h ===
|
|
390
|
+
active: h === p,
|
|
386
391
|
className: d,
|
|
387
392
|
onClick: b,
|
|
388
|
-
align:
|
|
393
|
+
align: t,
|
|
389
394
|
noBorder: !0,
|
|
390
395
|
focusMode: n,
|
|
391
|
-
mode:
|
|
396
|
+
mode: c,
|
|
392
397
|
fullWidth: !0,
|
|
393
398
|
labelRight: r,
|
|
394
|
-
children: i ===
|
|
399
|
+
children: i === k.ASC && h === p ? /* @__PURE__ */ l(I, { className: "size-4", monotone: !0 }) : i === k.DESC && h === p ? /* @__PURE__ */ l(T, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ l(S, { className: "size-4", monotone: !0 })
|
|
395
400
|
}
|
|
396
401
|
)
|
|
397
402
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Table as a, TableBody as r, TableCell as T, TableCellSort as i, TableFooter as _, TableHead as t, TableRow as b } from "./components/Table/Table.js";
|
|
2
2
|
import { TableCellSortDirections as n } from "./components/TableConstants/TableConstants.js";
|
|
3
3
|
/*!
|
|
4
|
-
@versini/ui-table v6.4.
|
|
4
|
+
@versini/ui-table v6.4.2
|
|
5
5
|
© 2025 gizmette.com
|
|
6
6
|
*/
|
|
7
7
|
try {
|
|
8
8
|
window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
|
|
9
|
-
version: "6.4.
|
|
10
|
-
buildTime: "12/20/2025
|
|
9
|
+
version: "6.4.2",
|
|
10
|
+
buildTime: "12/20/2025 02:27 PM EST",
|
|
11
11
|
homepage: "https://www.npmjs.com/package/@versini/ui-table",
|
|
12
12
|
license: "MIT"
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-table",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"sideEffects": [
|
|
59
59
|
"**/*.css"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "ed73d5ac19461765490b69adf21233c25876d1c2"
|
|
62
62
|
}
|