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