@ztwoint/z-ui 0.1.116 → 0.1.118
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/assets/icons/double-chevron-left.js +1 -2
- package/dist/components/assets/icons/double-chevron-right.js +1 -2
- package/dist/components/dynamic-table/z2-table-pagination.d.ts +2 -0
- package/dist/components/dynamic-table/z2-table-pagination.js +113 -64
- package/dist/components/dynamic-table/z2-table.js +162 -137
- package/dist/components/skeleton/skeleton.js +5 -5
- package/dist/components/table/table.const.d.ts +3 -3
- package/dist/components/table/table.const.js +6 -6
- package/dist/components/table-filter/table-filter-column-button.js +22 -22
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/types/components/dynamic-table/z2-table-pagination.d.ts +2 -0
- package/dist/types/components/table/table.const.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, jsx as o, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment as P } from "react";
|
|
3
|
-
import { Z2Checkbox as
|
|
3
|
+
import { Z2Checkbox as w } from "../checkbox/checkbox.js";
|
|
4
4
|
import { useZ2Table as g } from "./z2-table-context.js";
|
|
5
|
-
import { flexRender as
|
|
6
|
-
import { cva as
|
|
7
|
-
import { cn as
|
|
8
|
-
|
|
5
|
+
import { flexRender as k } from "@tanstack/react-table";
|
|
6
|
+
import { cva as v } from "class-variance-authority";
|
|
7
|
+
import { cn as p } from "../../lib/utils.js";
|
|
8
|
+
import { Z2Skeleton as Z } from "../skeleton/skeleton.js";
|
|
9
|
+
const B = v("", {
|
|
9
10
|
variants: {
|
|
10
11
|
size: {
|
|
11
12
|
dense: "p-2 h-8",
|
|
@@ -15,7 +16,7 @@ const B = N("", {
|
|
|
15
16
|
defaultVariants: {
|
|
16
17
|
size: "default"
|
|
17
18
|
}
|
|
18
|
-
}), S =
|
|
19
|
+
}), S = v("", {
|
|
19
20
|
variants: {
|
|
20
21
|
size: {
|
|
21
22
|
dense: "p-2",
|
|
@@ -26,7 +27,7 @@ const B = N("", {
|
|
|
26
27
|
size: "default"
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
|
-
function
|
|
30
|
+
function N(l) {
|
|
30
31
|
const e = l.getIsPinned();
|
|
31
32
|
return {
|
|
32
33
|
left: e === "left" ? `${l.getStart("left")}px` : void 0,
|
|
@@ -36,14 +37,14 @@ function v(l) {
|
|
|
36
37
|
zIndex: e ? 1 : 0
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function _({ children: l }) {
|
|
40
41
|
var t, r, a;
|
|
41
42
|
const { props: e } = g();
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ o(
|
|
43
44
|
"table",
|
|
44
45
|
{
|
|
45
46
|
"data-slot": "data-grid-table",
|
|
46
|
-
className:
|
|
47
|
+
className: p(
|
|
47
48
|
"w-full align-middle text-left rtl:text-right text-neutral-secondary",
|
|
48
49
|
!((t = e.tableLayout) != null && t.columnsDraggable) && "border-separate border-spacing-0",
|
|
49
50
|
((r = e.tableLayout) == null ? void 0 : r.width) === "fixed" ? "table-fixed" : "table-auto",
|
|
@@ -53,13 +54,13 @@ function I({ children: l }) {
|
|
|
53
54
|
}
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function I({ children: l }) {
|
|
57
58
|
var t, r, a;
|
|
58
59
|
const { props: e } = g();
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ o(
|
|
60
61
|
"thead",
|
|
61
62
|
{
|
|
62
|
-
className:
|
|
63
|
+
className: p(
|
|
63
64
|
"",
|
|
64
65
|
(t = e.tableClassNames) == null ? void 0 : t.header,
|
|
65
66
|
((r = e.tableLayout) == null ? void 0 : r.headerSticky) && ((a = e.tableClassNames) == null ? void 0 : a.headerSticky)
|
|
@@ -68,22 +69,22 @@ function T({ children: l }) {
|
|
|
68
69
|
}
|
|
69
70
|
);
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
+
function T({
|
|
72
73
|
children: l,
|
|
73
74
|
headerGroup: e
|
|
74
75
|
}) {
|
|
75
|
-
var r, a,
|
|
76
|
+
var r, a, n, d, s;
|
|
76
77
|
const { props: t } = g();
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ o(
|
|
78
79
|
"tr",
|
|
79
80
|
{
|
|
80
|
-
className:
|
|
81
|
-
"bg-transparent
|
|
81
|
+
className: p(
|
|
82
|
+
"bg-transparent tracking-wider rounded-xl",
|
|
82
83
|
((r = t.tableLayout) == null ? void 0 : r.headerBorder) && "[&>th]:border-b border-stroke-solid-light",
|
|
83
84
|
((a = t.tableLayout) == null ? void 0 : a.cellBorder) && "[&_>:last-child]:border-e-0",
|
|
84
|
-
((
|
|
85
|
+
((n = t.tableLayout) == null ? void 0 : n.stripped) && "bg-transparent",
|
|
85
86
|
((d = t.tableLayout) == null ? void 0 : d.headerBackground) !== !1 && "bg-background-neutral-medium",
|
|
86
|
-
(
|
|
87
|
+
(s = t.tableClassNames) == null ? void 0 : s.headerRow
|
|
87
88
|
),
|
|
88
89
|
children: l
|
|
89
90
|
},
|
|
@@ -96,11 +97,11 @@ function D({
|
|
|
96
97
|
dndRef: t,
|
|
97
98
|
dndStyle: r
|
|
98
99
|
}) {
|
|
99
|
-
var c, b, h, f,
|
|
100
|
-
const { props: a } = g(), { column:
|
|
100
|
+
var c, b, h, f, C, y, x, R;
|
|
101
|
+
const { props: a } = g(), { column: n } = e, d = n.getIsPinned(), s = d === "left" && n.getIsLastColumn("left"), i = d === "right" && n.getIsFirstColumn("right"), u = B({
|
|
101
102
|
size: (c = a.tableLayout) != null && c.dense ? "dense" : "default"
|
|
102
103
|
});
|
|
103
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ o(
|
|
104
105
|
"th",
|
|
105
106
|
{
|
|
106
107
|
ref: t,
|
|
@@ -108,28 +109,28 @@ function D({
|
|
|
108
109
|
...((b = a.tableLayout) == null ? void 0 : b.width) === "fixed" && {
|
|
109
110
|
width: `${e.getSize()}px`
|
|
110
111
|
},
|
|
111
|
-
...((h = a.tableLayout) == null ? void 0 : h.columnsPinnable) &&
|
|
112
|
+
...((h = a.tableLayout) == null ? void 0 : h.columnsPinnable) && n.getCanPin() && N(n),
|
|
112
113
|
...r || null
|
|
113
114
|
},
|
|
114
115
|
"data-pinned": d || void 0,
|
|
115
|
-
"data-last-col":
|
|
116
|
-
className:
|
|
116
|
+
"data-last-col": s ? "left" : i ? "right" : void 0,
|
|
117
|
+
className: p(
|
|
117
118
|
"relative h-10 text-left rtl:text-right align-middle [&:has([role=checkbox])]:pe-0 border-stroke-solid-light leading-none-medium-sm dark:text-inverted-secondary",
|
|
118
119
|
u,
|
|
119
120
|
((f = a.tableLayout) == null ? void 0 : f.cellBorder) && "border-e",
|
|
120
|
-
((
|
|
121
|
-
((
|
|
121
|
+
((C = a.tableLayout) == null ? void 0 : C.columnsResizable) && n.getCanResize() && "truncate",
|
|
122
|
+
((y = a.tableLayout) == null ? void 0 : y.columnsPinnable) && n.getCanPin() && "[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0 [&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0 [&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0 [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-border data-pinned:bg-muted/90 data-pinned:backdrop-blur-xs",
|
|
122
123
|
(x = e.column.columnDef.meta) == null ? void 0 : x.headerClassName,
|
|
123
|
-
|
|
124
|
+
n.getIndex() === 0 || n.getIndex() === e.headerGroup.headers.length - 1 ? (R = a.tableClassNames) == null ? void 0 : R.edgeCell : ""
|
|
124
125
|
),
|
|
125
126
|
children: l
|
|
126
127
|
},
|
|
127
128
|
e.id
|
|
128
129
|
);
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function A({ header: l }) {
|
|
131
132
|
const { column: e } = l;
|
|
132
|
-
return /* @__PURE__ */
|
|
133
|
+
return /* @__PURE__ */ o(
|
|
133
134
|
"div",
|
|
134
135
|
{
|
|
135
136
|
onDoubleClick: () => e.resetSize(),
|
|
@@ -139,16 +140,16 @@ function _({ header: l }) {
|
|
|
139
140
|
}
|
|
140
141
|
);
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
-
return /* @__PURE__ */
|
|
143
|
+
function M() {
|
|
144
|
+
return /* @__PURE__ */ o("tbody", { "aria-hidden": "true", className: "h-2" });
|
|
144
145
|
}
|
|
145
146
|
function V({ children: l }) {
|
|
146
147
|
var t, r;
|
|
147
148
|
const { props: e } = g();
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ o(
|
|
149
150
|
"tbody",
|
|
150
151
|
{
|
|
151
|
-
className:
|
|
152
|
+
className: p(
|
|
152
153
|
"[&_tr:last-child]:border-0",
|
|
153
154
|
((t = e.tableLayout) == null ? void 0 : t.rowRounded) && "[&_td:first-child]:rounded-s-lg [&_td:last-child]:rounded-e-lg",
|
|
154
155
|
(r = e.tableClassNames) == null ? void 0 : r.body
|
|
@@ -158,19 +159,19 @@ function V({ children: l }) {
|
|
|
158
159
|
);
|
|
159
160
|
}
|
|
160
161
|
function F({ children: l }) {
|
|
161
|
-
var r, a,
|
|
162
|
+
var r, a, n, d, s;
|
|
162
163
|
const { table: e, props: t } = g();
|
|
163
|
-
return /* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ o(
|
|
164
165
|
"tr",
|
|
165
166
|
{
|
|
166
|
-
className:
|
|
167
|
+
className: p(
|
|
167
168
|
"hover:bg-background-neutral-medium data-[state=selected]:bg-muted/50 border-stroke-solid-light",
|
|
168
169
|
t.onRowClick && "cursor-pointer",
|
|
169
170
|
!((r = t.tableLayout) != null && r.stripped) && ((a = t.tableLayout) == null ? void 0 : a.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light",
|
|
170
|
-
((
|
|
171
|
+
((n = t.tableLayout) == null ? void 0 : n.cellBorder) && "[&_>:last-child]:border-e-0",
|
|
171
172
|
((d = t.tableLayout) == null ? void 0 : d.stripped) && "odd:bg-background-neutral-medium hover:bg-transparent odd:hover:bg-background-neutral-medium",
|
|
172
173
|
e.options.enableRowSelection && "[&_>:first-child]:relative",
|
|
173
|
-
(
|
|
174
|
+
(s = t.tableClassNames) == null ? void 0 : s.bodyRow
|
|
174
175
|
),
|
|
175
176
|
children: l
|
|
176
177
|
}
|
|
@@ -180,11 +181,11 @@ function H({
|
|
|
180
181
|
children: l,
|
|
181
182
|
column: e
|
|
182
183
|
}) {
|
|
183
|
-
var
|
|
184
|
+
var n, d, s, i, u, c, b;
|
|
184
185
|
const { props: t, table: r } = g(), a = S({
|
|
185
|
-
size: (
|
|
186
|
+
size: (n = t.tableLayout) != null && n.dense ? "dense" : "default"
|
|
186
187
|
});
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
+
return /* @__PURE__ */ o(
|
|
188
189
|
"td",
|
|
189
190
|
{
|
|
190
191
|
style: {
|
|
@@ -192,11 +193,11 @@ function H({
|
|
|
192
193
|
width: `${e.getSize()}px`
|
|
193
194
|
}
|
|
194
195
|
},
|
|
195
|
-
className:
|
|
196
|
+
className: p(
|
|
196
197
|
"align-middle",
|
|
197
198
|
a,
|
|
198
|
-
((
|
|
199
|
-
((
|
|
199
|
+
((s = t.tableLayout) == null ? void 0 : s.cellBorder) && "border-e border-stroke-solid-light",
|
|
200
|
+
((i = t.tableLayout) == null ? void 0 : i.columnsResizable) && e.getCanResize() && "truncate",
|
|
200
201
|
(u = e.columnDef.meta) == null ? void 0 : u.cellClassName,
|
|
201
202
|
((c = t.tableLayout) == null ? void 0 : c.columnsPinnable) && e.getCanPin() && '[&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-stroke-solid-light data-pinned:bg-background/90 data-pinned:backdrop-blur-xs"',
|
|
202
203
|
e.getIndex() === 0 || e.getIndex() === r.getVisibleFlatColumns().length - 1 ? (b = t.tableClassNames) == null ? void 0 : b.edgeCell : ""
|
|
@@ -205,144 +206,168 @@ function H({
|
|
|
205
206
|
}
|
|
206
207
|
);
|
|
207
208
|
}
|
|
208
|
-
function
|
|
209
|
+
function E({
|
|
209
210
|
children: l,
|
|
210
211
|
row: e,
|
|
211
212
|
dndRef: t,
|
|
212
213
|
dndStyle: r
|
|
213
214
|
}) {
|
|
214
|
-
var d,
|
|
215
|
-
const { props: a, table:
|
|
216
|
-
return /* @__PURE__ */
|
|
215
|
+
var d, s, i, u, c;
|
|
216
|
+
const { props: a, table: n } = g();
|
|
217
|
+
return /* @__PURE__ */ o(
|
|
217
218
|
"tr",
|
|
218
219
|
{
|
|
219
220
|
ref: t,
|
|
220
221
|
style: { ...r || null },
|
|
221
|
-
"data-state":
|
|
222
|
+
"data-state": n.options.enableRowSelection && e.getIsSelected() ? "selected" : void 0,
|
|
222
223
|
onClick: () => a.onRowClick && a.onRowClick(e.original),
|
|
223
|
-
className:
|
|
224
|
-
"hover:bg-background-neutral-medium data-[state=selected]:bg-muted/50
|
|
224
|
+
className: p(
|
|
225
|
+
"hover:bg-background-neutral-medium data-[state=selected]:bg-muted/50 leading-none-medium-sm text-neutral-primary dark:text-inverted-primary",
|
|
225
226
|
a.onRowClick && "cursor-pointer",
|
|
226
|
-
!((d = a.tableLayout) != null && d.stripped) && ((
|
|
227
|
-
((
|
|
227
|
+
!((d = a.tableLayout) != null && d.stripped) && ((s = a.tableLayout) == null ? void 0 : s.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light",
|
|
228
|
+
((i = a.tableLayout) == null ? void 0 : i.cellBorder) && "[&_>:last-child]:border-e-0",
|
|
228
229
|
((u = a.tableLayout) == null ? void 0 : u.stripped) && "odd:bg-background-neutral-medium hover:bg-transparent odd:hover:bg-background-neutral-medium",
|
|
229
|
-
|
|
230
|
+
n.options.enableRowSelection && "[&_>:first-child]:relative",
|
|
230
231
|
(c = a.tableClassNames) == null ? void 0 : c.bodyRow
|
|
231
232
|
),
|
|
232
233
|
children: l
|
|
233
234
|
}
|
|
234
235
|
);
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
-
var a,
|
|
237
|
+
function j({ row: l }) {
|
|
238
|
+
var a, n, d, s, i, u;
|
|
238
239
|
const { props: e, table: t } = g();
|
|
239
|
-
return ((
|
|
240
|
+
return ((n = (a = t.getAllColumns().find((c) => {
|
|
240
241
|
var b;
|
|
241
242
|
return (b = c.columnDef.meta) == null ? void 0 : b.expandedContent;
|
|
242
|
-
})) == null ? void 0 : a.columnDef.meta) == null ? void 0 :
|
|
243
|
+
})) == null ? void 0 : a.columnDef.meta) == null ? void 0 : n.expandedContent) ? /* @__PURE__ */ o(
|
|
243
244
|
"tr",
|
|
244
245
|
{
|
|
245
|
-
className:
|
|
246
|
+
className: p(
|
|
246
247
|
((d = e.tableLayout) == null ? void 0 : d.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light"
|
|
247
248
|
),
|
|
248
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ o("td", { colSpan: l.getVisibleCells().length, children: (u = (i = (s = t.getAllColumns().find((c) => {
|
|
249
250
|
var b;
|
|
250
251
|
return (b = c.columnDef.meta) == null ? void 0 : b.expandedContent;
|
|
251
|
-
})) == null ? void 0 :
|
|
252
|
+
})) == null ? void 0 : s.columnDef.meta) == null ? void 0 : i.expandedContent) == null ? void 0 : u.call(i, l.original) })
|
|
252
253
|
}
|
|
253
254
|
) : null;
|
|
254
255
|
}
|
|
255
|
-
function
|
|
256
|
+
function $({
|
|
256
257
|
children: l,
|
|
257
258
|
cell: e,
|
|
258
259
|
dndRef: t,
|
|
259
260
|
dndStyle: r
|
|
260
261
|
}) {
|
|
261
|
-
var b, h, f,
|
|
262
|
-
const { props: a } = g(), { column:
|
|
262
|
+
var b, h, f, C, y, x, R, L;
|
|
263
|
+
const { props: a } = g(), { column: n, row: d } = e, s = n.getIsPinned(), i = s === "left" && n.getIsLastColumn("left"), u = s === "right" && n.getIsFirstColumn("right"), c = S({
|
|
263
264
|
size: (b = a.tableLayout) != null && b.dense ? "dense" : "default"
|
|
264
265
|
});
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ o(
|
|
266
267
|
"td",
|
|
267
268
|
{
|
|
268
269
|
ref: t,
|
|
269
|
-
...(h = a.tableLayout) != null && h.columnsDraggable && !
|
|
270
|
+
...(h = a.tableLayout) != null && h.columnsDraggable && !s ? { cell: e } : {},
|
|
270
271
|
style: {
|
|
271
|
-
...((f = a.tableLayout) == null ? void 0 : f.columnsPinnable) &&
|
|
272
|
+
...((f = a.tableLayout) == null ? void 0 : f.columnsPinnable) && n.getCanPin() && N(n),
|
|
272
273
|
...r || null
|
|
273
274
|
},
|
|
274
|
-
"data-pinned":
|
|
275
|
-
"data-last-col":
|
|
276
|
-
className:
|
|
277
|
-
"align-middle
|
|
275
|
+
"data-pinned": s || void 0,
|
|
276
|
+
"data-last-col": i ? "left" : u ? "right" : void 0,
|
|
277
|
+
className: p(
|
|
278
|
+
"align-middle",
|
|
278
279
|
c,
|
|
279
|
-
((
|
|
280
|
-
((
|
|
280
|
+
((C = a.tableLayout) == null ? void 0 : C.cellBorder) && "border-e border-stroke-solid-light",
|
|
281
|
+
((y = a.tableLayout) == null ? void 0 : y.columnsResizable) && n.getCanResize() && "truncate",
|
|
281
282
|
(x = e.column.columnDef.meta) == null ? void 0 : x.cellClassName,
|
|
282
|
-
((
|
|
283
|
-
|
|
283
|
+
((R = a.tableLayout) == null ? void 0 : R.columnsPinnable) && n.getCanPin() && '[&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-border data-pinned:bg-background/90 data-pinned:backdrop-blur-xs"',
|
|
284
|
+
n.getIndex() === 0 || n.getIndex() === d.getVisibleCells().length - 1 ? (L = a.tableClassNames) == null ? void 0 : L.edgeCell : ""
|
|
284
285
|
),
|
|
285
286
|
children: l
|
|
286
287
|
},
|
|
287
288
|
e.id
|
|
288
289
|
);
|
|
289
290
|
}
|
|
290
|
-
function
|
|
291
|
+
function G() {
|
|
291
292
|
const { table: l, props: e } = g(), t = l.getAllColumns().length;
|
|
292
|
-
return /* @__PURE__ */
|
|
293
|
+
return /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: t, className: "text-center text-muted-foreground py-6", children: e.emptyMessage || "No data available" }) });
|
|
293
294
|
}
|
|
294
|
-
function
|
|
295
|
+
function O() {
|
|
295
296
|
const { table: l, props: e } = g(), t = l.getAllColumns().length;
|
|
296
|
-
return /* @__PURE__ */
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
return /* @__PURE__ */ o("tr", { style: { height: l.getState().pagination.pageSize * 43 }, children: /* @__PURE__ */ o("td", { colSpan: t, className: "text-center text-muted-foreground py-6", children: /* @__PURE__ */ m("div", { className: "text-neutral-muted flex items-center gap-2 px-4 py-2 leading-none-medium-sm justify-center", children: [
|
|
298
|
+
/* @__PURE__ */ m(
|
|
298
299
|
"svg",
|
|
299
300
|
{
|
|
300
|
-
className: "animate-spin -ml-1 h-5 w-5 text-muted-foreground",
|
|
301
301
|
xmlns: "http://www.w3.org/2000/svg",
|
|
302
|
+
width: "32",
|
|
303
|
+
height: "32",
|
|
304
|
+
viewBox: "0 0 32 32",
|
|
302
305
|
fill: "none",
|
|
303
|
-
|
|
306
|
+
className: "animate-spin",
|
|
304
307
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
"
|
|
308
|
+
/* @__PURE__ */ o("g", { clipPath: "url(#paint0_angular_20785_14982_clip_path)", "data-figma-skip-parse": "true", children: /* @__PURE__ */ o("g", { transform: "matrix(0.016 0 0 0.016 16 16)", children: /* @__PURE__ */ o("foreignObject", { x: "-1083.33", y: "-1083.33", width: "2166.67", height: "2166.67", children: /* @__PURE__ */ o(
|
|
309
|
+
"div",
|
|
307
310
|
{
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
311
|
+
style: {
|
|
312
|
+
background: "conic-gradient(from 90deg,rgba(37, 99, 235, 0) 0deg,rgba(37, 99, 235, 0) 0.036deg,rgba(37, 99, 235, 1) 360deg)",
|
|
313
|
+
height: "100%",
|
|
314
|
+
width: "100%",
|
|
315
|
+
opacity: 1
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
) }) }) }),
|
|
319
|
+
/* @__PURE__ */ o(
|
|
320
|
+
"path",
|
|
321
|
+
{
|
|
322
|
+
fillRule: "evenodd",
|
|
323
|
+
clipRule: "evenodd",
|
|
324
|
+
d: "M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32ZM16 29.3333C23.3638 29.3333 29.3333 23.3638 29.3333 16C29.3333 8.6362 23.3638 2.66667 16 2.66667C8.6362 2.66667 2.66667 8.6362 2.66667 16C2.66667 23.3638 8.6362 29.3333 16 29.3333Z",
|
|
325
|
+
"data-figma-gradient-fill": '{"type":"GRADIENT_ANGULAR","stops":[{"color":{"r":0.14509804546833038,"g":0.38823530077934265,"b":0.92156863212585449,"a":0.0},"position":0.0},{"color":{"r":0.14509804546833038,"g":0.38823530077934265,"b":0.92156863212585449,"a":0.0},"position":9.9999997473787516e-05},{"color":{"r":0.14509804546833038,"g":0.38823530077934265,"b":0.92156863212585449,"a":1.0},"position":1.0}],"stopsVar":[{"color":{"r":0.14509804546833038,"g":0.38823530077934265,"b":0.92156863212585449,"a":0.0},"position":0.0},{"color":{"r":0.14509804546833038,"g":0.38823530077934265,"b":0.92156863212585449,"a":0.0},"position":9.9999997473787516e-05},{"color":{"r":0.14509804546833038,"g":0.38823530077934265,"b":0.92156863212585449,"a":1.0},"position":1.0}],"transform":{"m00":32.0,"m01":3.0381143971023802e-14,"m02":-2.8421709430404007e-14,"m10":-1.6170289255821799e-14,"m11":32.0,"m12":-7.1054273576010019e-15},"opacity":1.0,"blendMode":"NORMAL","visible":true}'
|
|
314
326
|
}
|
|
315
327
|
),
|
|
316
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ o(
|
|
317
329
|
"path",
|
|
318
330
|
{
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
d: "
|
|
331
|
+
fillRule: "evenodd",
|
|
332
|
+
clipRule: "evenodd",
|
|
333
|
+
d: "M30.3755 12.8009C31.1058 12.7067 31.7743 13.2223 31.8685 13.9527C31.9561 14.6316 32 15.3154 32 16C32 16.7364 31.4031 17.3333 30.6667 17.3333C29.9303 17.3333 29.3333 16.7364 29.3333 16C29.3333 15.4295 29.2967 14.8597 29.2237 14.2939C29.1295 13.5636 29.6452 12.8951 30.3755 12.8009Z",
|
|
334
|
+
fill: "#2563EB",
|
|
335
|
+
style: {
|
|
336
|
+
fill: "#2563EB",
|
|
337
|
+
fillOpacity: 1
|
|
338
|
+
}
|
|
322
339
|
}
|
|
323
|
-
)
|
|
340
|
+
),
|
|
341
|
+
/* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: "paint0_angular_20785_14982_clip_path", children: /* @__PURE__ */ o(
|
|
342
|
+
"path",
|
|
343
|
+
{
|
|
344
|
+
fillRule: "evenodd",
|
|
345
|
+
clipRule: "evenodd",
|
|
346
|
+
d: "M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32ZM16 29.3333C23.3638 29.3333 29.3333 23.3638 29.3333 16C29.3333 8.6362 23.3638 2.66667 16 2.66667C8.6362 2.66667 2.66667 8.6362 2.66667 16C2.66667 23.3638 8.6362 29.3333 16 29.3333Z"
|
|
347
|
+
}
|
|
348
|
+
) }) })
|
|
324
349
|
]
|
|
325
350
|
}
|
|
326
351
|
),
|
|
327
352
|
e.loadingMessage || "Loading..."
|
|
328
353
|
] }) }) });
|
|
329
354
|
}
|
|
330
|
-
function
|
|
355
|
+
function ee({
|
|
331
356
|
row: l
|
|
332
357
|
// size,
|
|
333
358
|
}) {
|
|
334
|
-
return /* @__PURE__ */
|
|
335
|
-
/* @__PURE__ */
|
|
359
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
360
|
+
/* @__PURE__ */ o(
|
|
336
361
|
"div",
|
|
337
362
|
{
|
|
338
|
-
className:
|
|
363
|
+
className: p(
|
|
339
364
|
"hidden absolute top-0 bottom-0 start-0 w-[2px] bg-primary",
|
|
340
365
|
l.getIsSelected() && "block"
|
|
341
366
|
)
|
|
342
367
|
}
|
|
343
368
|
),
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
|
|
369
|
+
/* @__PURE__ */ o(
|
|
370
|
+
w,
|
|
346
371
|
{
|
|
347
372
|
checked: l.getIsSelected(),
|
|
348
373
|
onCheckedChange: (e) => l.toggleSelected(!!e),
|
|
@@ -352,10 +377,10 @@ function X({
|
|
|
352
377
|
)
|
|
353
378
|
] });
|
|
354
379
|
}
|
|
355
|
-
function
|
|
380
|
+
function te(l) {
|
|
356
381
|
const { table: e, recordCount: t, isLoading: r } = g();
|
|
357
|
-
return /* @__PURE__ */
|
|
358
|
-
|
|
382
|
+
return /* @__PURE__ */ o(
|
|
383
|
+
w,
|
|
359
384
|
{
|
|
360
385
|
checked: e.getIsAllPageRowsSelected() || e.getIsSomePageRowsSelected() && "indeterminate",
|
|
361
386
|
disabled: r || t === 0,
|
|
@@ -365,44 +390,44 @@ function Y(l) {
|
|
|
365
390
|
}
|
|
366
391
|
);
|
|
367
392
|
}
|
|
368
|
-
function
|
|
369
|
-
var a,
|
|
393
|
+
function ae() {
|
|
394
|
+
var a, n;
|
|
370
395
|
const { table: l, isLoading: e, props: t } = g(), r = l.getState().pagination;
|
|
371
|
-
return /* @__PURE__ */
|
|
372
|
-
|
|
396
|
+
return /* @__PURE__ */ m(_, { children: [
|
|
397
|
+
(((a = t.tableLayout) == null ? void 0 : a.stripped) || !((n = t.tableLayout) != null && n.rowBorder)) && /* @__PURE__ */ o(M, {}),
|
|
398
|
+
/* @__PURE__ */ o(V, { children: e && (r != null && r.pageSize) ? t.loadingMode === "skeleton" ? Array.from({ length: r.pageSize }).map((d, s) => /* @__PURE__ */ o(F, { children: l.getVisibleFlatColumns().map((i, u) => {
|
|
399
|
+
var c;
|
|
400
|
+
return /* @__PURE__ */ o(H, { column: i, children: ((c = i.columnDef.meta) == null ? void 0 : c.skeleton) || /* @__PURE__ */ o(Z, { className: "h-4 w-full" }) }, u);
|
|
401
|
+
}) }, s)) : /* @__PURE__ */ o(O, {}) : l.getRowModel().rows.length ? l.getRowModel().rows.map((d, s) => /* @__PURE__ */ m(P, { children: [
|
|
402
|
+
/* @__PURE__ */ o(E, { row: d, children: d.getVisibleCells().map((i, u) => /* @__PURE__ */ o($, { cell: i, children: k(i.column.columnDef.cell, i.getContext()) }, u)) }, s),
|
|
403
|
+
d.getIsExpanded() && /* @__PURE__ */ o(j, { row: d })
|
|
404
|
+
] }, d.id)) : /* @__PURE__ */ o(G, {}) }),
|
|
405
|
+
/* @__PURE__ */ o(I, { children: l.getHeaderGroups().map((d, s) => /* @__PURE__ */ o(T, { headerGroup: d, children: d.headers.map((i, u) => {
|
|
373
406
|
var b;
|
|
374
|
-
const { column: c } =
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
|
|
377
|
-
((b = t.tableLayout) == null ? void 0 : b.columnsResizable) && c.getCanResize() && /* @__PURE__ */
|
|
407
|
+
const { column: c } = i;
|
|
408
|
+
return /* @__PURE__ */ m(D, { header: i, children: [
|
|
409
|
+
i.isPlaceholder ? null : k(i.column.columnDef.header, i.getContext()),
|
|
410
|
+
((b = t.tableLayout) == null ? void 0 : b.columnsResizable) && c.getCanResize() && /* @__PURE__ */ o(A, { header: i })
|
|
378
411
|
] }, u);
|
|
379
|
-
}) },
|
|
380
|
-
(((a = t.tableLayout) == null ? void 0 : a.stripped) || !((o = t.tableLayout) != null && o.rowBorder)) && /* @__PURE__ */ n(A, {}),
|
|
381
|
-
/* @__PURE__ */ n(V, { children: e && (r != null && r.pageSize) ? t.loadingMode === "skeleton" ? Array.from({ length: r.pageSize }).map((d, i) => /* @__PURE__ */ n(F, { children: l.getVisibleFlatColumns().map((s, u) => {
|
|
382
|
-
var c;
|
|
383
|
-
return /* @__PURE__ */ n(H, { column: s, children: (c = s.columnDef.meta) == null ? void 0 : c.skeleton }, u);
|
|
384
|
-
}) }, i)) : /* @__PURE__ */ n(G, {}) : l.getRowModel().rows.length ? l.getRowModel().rows.map((d, i) => /* @__PURE__ */ p(P, { children: [
|
|
385
|
-
/* @__PURE__ */ n(M, { row: d, children: d.getVisibleCells().map((s, u) => /* @__PURE__ */ n(j, { cell: s, children: w(s.column.columnDef.cell, s.getContext()) }, u)) }, i),
|
|
386
|
-
d.getIsExpanded() && /* @__PURE__ */ n($, { row: d })
|
|
387
|
-
] }, d.id)) : /* @__PURE__ */ n(E, {}) })
|
|
412
|
+
}) }, s)) })
|
|
388
413
|
] });
|
|
389
414
|
}
|
|
390
415
|
export {
|
|
391
|
-
|
|
392
|
-
|
|
416
|
+
ae as Z2Table,
|
|
417
|
+
_ as Z2TableBase,
|
|
393
418
|
V as Z2TableBody,
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
419
|
+
E as Z2TableBodyRow,
|
|
420
|
+
$ as Z2TableBodyRowCell,
|
|
421
|
+
j as Z2TableBodyRowExpandded,
|
|
397
422
|
F as Z2TableBodyRowSkeleton,
|
|
398
423
|
H as Z2TableBodyRowSkeletonCell,
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
424
|
+
G as Z2TableEmpty,
|
|
425
|
+
I as Z2TableHead,
|
|
426
|
+
T as Z2TableHeadRow,
|
|
402
427
|
D as Z2TableHeadRowCell,
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
428
|
+
A as Z2TableHeadRowCellResize,
|
|
429
|
+
O as Z2TableLoader,
|
|
430
|
+
ee as Z2TableRowSelect,
|
|
431
|
+
te as Z2TableRowSelectAll,
|
|
432
|
+
M as Z2TableRowSpacer
|
|
408
433
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
function
|
|
3
|
+
import { cn as r } from "../../lib/utils.js";
|
|
4
|
+
function s({ className: e, ...t }) {
|
|
5
5
|
return /* @__PURE__ */ o(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
8
8
|
"data-slot": "skeleton",
|
|
9
|
-
className:
|
|
10
|
-
...
|
|
9
|
+
className: r("bg-surface-neutral-disabled animate-pulse rounded-md", e),
|
|
10
|
+
...t
|
|
11
11
|
}
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
s as Z2Skeleton
|
|
16
16
|
};
|
|
@@ -5,7 +5,7 @@ export declare const TABLE_CSS_CLASSES: {
|
|
|
5
5
|
readonly true: "[&_td:first-child]:border-l-1 [&_th:first-child]:border-l-1 ";
|
|
6
6
|
readonly false: "";
|
|
7
7
|
};
|
|
8
|
-
readonly header: "bg-background-neutral-
|
|
8
|
+
readonly header: "bg-background-neutral-light text-text-neutral-secondary table-fixed";
|
|
9
9
|
readonly cell: {
|
|
10
10
|
readonly default: "p-0 align-middle relative h-4 ";
|
|
11
11
|
readonly hasBorder: {
|
|
@@ -14,13 +14,13 @@ export declare const TABLE_CSS_CLASSES: {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
readonly headerCell: {
|
|
17
|
-
readonly default: "
|
|
17
|
+
readonly default: "p-3 text-left text-xs font-medium tracking-wider border-stroke-solid-light";
|
|
18
18
|
readonly hasBorder: {
|
|
19
19
|
readonly true: " [box-shadow:inset_-1px_0_0_0_var(--color-stroke-solid-light),_inset_0_-1px_0_0_var(--color-stroke-solid-light)] border-stroke-solid-light dark:shadow-none dark:border-0";
|
|
20
20
|
readonly false: "border-stroke-solid-light ";
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
readonly sortableHeaderCell: "p-3 text-left text-xs font-medium
|
|
23
|
+
readonly sortableHeaderCell: "p-3 text-left text-xs font-medium tracking-wider cursor-pointer transition-colors duration-200";
|
|
24
24
|
readonly headerCellContent: "flex items-center justify-between";
|
|
25
25
|
readonly sortIcon: "ml-2 w-4 h-4 text-gray-400";
|
|
26
26
|
readonly sortIconActive: "ml-2 w-4 h-4 text-gray-600";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = "No data available", e = {
|
|
2
2
|
table: "w-full",
|
|
3
3
|
bordered: {
|
|
4
4
|
true: "[&_td:first-child]:border-l-1 [&_th:first-child]:border-l-1 ",
|
|
5
5
|
false: ""
|
|
6
6
|
},
|
|
7
|
-
header: "bg-background-neutral-
|
|
7
|
+
header: "bg-background-neutral-light text-text-neutral-secondary table-fixed",
|
|
8
8
|
cell: {
|
|
9
9
|
default: "p-0 align-middle relative h-4 ",
|
|
10
10
|
hasBorder: {
|
|
@@ -13,13 +13,13 @@ const e = "No data available", t = {
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
headerCell: {
|
|
16
|
-
default: "
|
|
16
|
+
default: "p-3 text-left text-xs font-medium tracking-wider border-stroke-solid-light",
|
|
17
17
|
hasBorder: {
|
|
18
18
|
true: " [box-shadow:inset_-1px_0_0_0_var(--color-stroke-solid-light),_inset_0_-1px_0_0_var(--color-stroke-solid-light)] border-stroke-solid-light dark:shadow-none dark:border-0",
|
|
19
19
|
false: "border-stroke-solid-light "
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
sortableHeaderCell: "p-3 text-left text-xs font-medium
|
|
22
|
+
sortableHeaderCell: "p-3 text-left text-xs font-medium tracking-wider cursor-pointer transition-colors duration-200",
|
|
23
23
|
headerCellContent: "flex items-center justify-between",
|
|
24
24
|
sortIcon: "ml-2 w-4 h-4 text-gray-400",
|
|
25
25
|
sortIconActive: "ml-2 w-4 h-4 text-gray-600",
|
|
@@ -29,6 +29,6 @@ const e = "No data available", t = {
|
|
|
29
29
|
loading: "px-4 py-8 text-center text-gray-500"
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
t as DEFAULT_EMPTY_MESSAGE,
|
|
33
|
+
e as TABLE_CSS_CLASSES
|
|
34
34
|
};
|