@ztwoint/z-ui 0.1.115 → 0.1.117

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.
Files changed (53) hide show
  1. package/dist/components/assets/icons/double-chevron-left.js +1 -2
  2. package/dist/components/assets/icons/double-chevron-right.js +1 -2
  3. package/dist/components/chart/chart.d.ts +4 -0
  4. package/dist/components/chart/chart.js +25 -0
  5. package/dist/components/chart/index.d.ts +2 -0
  6. package/dist/components/chart-card/builders/bar-chart-builder.d.ts +3 -0
  7. package/dist/components/chart-card/builders/bar-chart-builder.js +43 -0
  8. package/dist/components/chart-card/builders/chart-builder-factory.d.ts +5 -0
  9. package/dist/components/chart-card/builders/chart-builder-factory.js +23 -0
  10. package/dist/components/chart-card/builders/line-chart-builder.d.ts +3 -0
  11. package/dist/components/chart-card/builders/line-chart-builder.js +53 -0
  12. package/dist/components/chart-card/builders/pie-chart-builder.d.ts +3 -0
  13. package/dist/components/chart-card/builders/pie-chart-builder.js +71 -0
  14. package/dist/components/chart-card/chart-card-states.d.ts +10 -0
  15. package/dist/components/chart-card/chart-card-states.js +93 -0
  16. package/dist/components/chart-card/chart-card.config.types.d.ts +99 -0
  17. package/dist/components/chart-card/chart-card.d.ts +2 -0
  18. package/dist/components/chart-card/chart-card.js +72 -0
  19. package/dist/components/chart-card/chart-card.types.d.ts +12 -0
  20. package/dist/components/chart-card/config/colors.d.ts +29 -0
  21. package/dist/components/chart-card/config/colors.js +49 -0
  22. package/dist/components/chart-card/config/defaults.d.ts +164 -0
  23. package/dist/components/chart-card/config/defaults.js +156 -0
  24. package/dist/components/chart-card/index.d.ts +10 -0
  25. package/dist/components/chart-card/validators/config-validator.d.ts +7 -0
  26. package/dist/components/chart-card/validators/config-validator.js +40 -0
  27. package/dist/components/dynamic-table/z2-table-pagination.d.ts +2 -0
  28. package/dist/components/dynamic-table/z2-table-pagination.js +113 -64
  29. package/dist/components/dynamic-table/z2-table.js +162 -137
  30. package/dist/components/skeleton/skeleton.js +5 -5
  31. package/dist/components/table/components/cell/avatar-cell.js +5 -2
  32. package/dist/components/table/table-provider.js +3 -0
  33. package/dist/components/table-card/table-card.js +11 -8
  34. package/dist/css/styles/tailwind.css +1 -1
  35. package/dist/index.d.ts +2 -0
  36. package/dist/index.js +153 -130
  37. package/dist/types/components/chart/chart.d.ts +4 -0
  38. package/dist/types/components/chart/index.d.ts +2 -0
  39. package/dist/types/components/chart-card/builders/bar-chart-builder.d.ts +3 -0
  40. package/dist/types/components/chart-card/builders/chart-builder-factory.d.ts +5 -0
  41. package/dist/types/components/chart-card/builders/line-chart-builder.d.ts +3 -0
  42. package/dist/types/components/chart-card/builders/pie-chart-builder.d.ts +3 -0
  43. package/dist/types/components/chart-card/chart-card-states.d.ts +10 -0
  44. package/dist/types/components/chart-card/chart-card.config.types.d.ts +99 -0
  45. package/dist/types/components/chart-card/chart-card.d.ts +2 -0
  46. package/dist/types/components/chart-card/chart-card.types.d.ts +12 -0
  47. package/dist/types/components/chart-card/config/colors.d.ts +29 -0
  48. package/dist/types/components/chart-card/config/defaults.d.ts +164 -0
  49. package/dist/types/components/chart-card/index.d.ts +10 -0
  50. package/dist/types/components/chart-card/validators/config-validator.d.ts +7 -0
  51. package/dist/types/components/dynamic-table/z2-table-pagination.d.ts +2 -0
  52. package/dist/types/index.d.ts +2 -0
  53. package/package.json +3 -1
@@ -1,11 +1,12 @@
1
- import { jsxs as p, jsx as n, Fragment as z } from "react/jsx-runtime";
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 R } from "../checkbox/checkbox.js";
3
+ import { Z2Checkbox as w } from "../checkbox/checkbox.js";
4
4
  import { useZ2Table as g } from "./z2-table-context.js";
5
- import { flexRender as w } from "@tanstack/react-table";
6
- import { cva as N } from "class-variance-authority";
7
- import { cn as m } from "../../lib/utils.js";
8
- const B = N("", {
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 = N("", {
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 v(l) {
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 I({ children: l }) {
40
+ function _({ children: l }) {
40
41
  var t, r, a;
41
42
  const { props: e } = g();
42
- return /* @__PURE__ */ n(
43
+ return /* @__PURE__ */ o(
43
44
  "table",
44
45
  {
45
46
  "data-slot": "data-grid-table",
46
- className: m(
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 T({ children: l }) {
57
+ function I({ children: l }) {
57
58
  var t, r, a;
58
59
  const { props: e } = g();
59
- return /* @__PURE__ */ n(
60
+ return /* @__PURE__ */ o(
60
61
  "thead",
61
62
  {
62
- className: m(
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 Z({
72
+ function T({
72
73
  children: l,
73
74
  headerGroup: e
74
75
  }) {
75
- var r, a, o, d, i;
76
+ var r, a, n, d, s;
76
77
  const { props: t } = g();
77
- return /* @__PURE__ */ n(
78
+ return /* @__PURE__ */ o(
78
79
  "tr",
79
80
  {
80
- className: m(
81
- "bg-transparent leading-none-medium-sm tracking-wider rounded-xl",
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
- ((o = t.tableLayout) == null ? void 0 : o.stripped) && "bg-transparent",
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
- (i = t.tableClassNames) == null ? void 0 : i.headerRow
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, y, C, x, k;
100
- const { props: a } = g(), { column: o } = e, d = o.getIsPinned(), i = d === "left" && o.getIsLastColumn("left"), s = d === "right" && o.getIsFirstColumn("right"), u = B({
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__ */ n(
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) && o.getCanPin() && v(o),
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": i ? "left" : s ? "right" : void 0,
116
- className: m(
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
- ((y = a.tableLayout) == null ? void 0 : y.columnsResizable) && o.getCanResize() && "truncate",
121
- ((C = a.tableLayout) == null ? void 0 : C.columnsPinnable) && o.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",
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
- o.getIndex() === 0 || o.getIndex() === e.headerGroup.headers.length - 1 ? (k = a.tableClassNames) == null ? void 0 : k.edgeCell : ""
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 _({ header: l }) {
131
+ function A({ header: l }) {
131
132
  const { column: e } = l;
132
- return /* @__PURE__ */ n(
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 A() {
143
- return /* @__PURE__ */ n("tbody", { "aria-hidden": "true", className: "h-2" });
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__ */ n(
149
+ return /* @__PURE__ */ o(
149
150
  "tbody",
150
151
  {
151
- className: m(
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, o, d, i;
162
+ var r, a, n, d, s;
162
163
  const { table: e, props: t } = g();
163
- return /* @__PURE__ */ n(
164
+ return /* @__PURE__ */ o(
164
165
  "tr",
165
166
  {
166
- className: m(
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
- ((o = t.tableLayout) == null ? void 0 : o.cellBorder) && "[&_>:last-child]:border-e-0",
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
- (i = t.tableClassNames) == null ? void 0 : i.bodyRow
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 o, d, i, s, u, c, b;
184
+ var n, d, s, i, u, c, b;
184
185
  const { props: t, table: r } = g(), a = S({
185
- size: (o = t.tableLayout) != null && o.dense ? "dense" : "default"
186
+ size: (n = t.tableLayout) != null && n.dense ? "dense" : "default"
186
187
  });
187
- return /* @__PURE__ */ n(
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: m(
196
+ className: p(
196
197
  "align-middle",
197
198
  a,
198
- ((i = t.tableLayout) == null ? void 0 : i.cellBorder) && "border-e border-stroke-solid-light",
199
- ((s = t.tableLayout) == null ? void 0 : s.columnsResizable) && e.getCanResize() && "truncate",
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 M({
209
+ function E({
209
210
  children: l,
210
211
  row: e,
211
212
  dndRef: t,
212
213
  dndStyle: r
213
214
  }) {
214
- var d, i, s, u, c;
215
- const { props: a, table: o } = g();
216
- return /* @__PURE__ */ n(
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": o.options.enableRowSelection && e.getIsSelected() ? "selected" : void 0,
222
+ "data-state": n.options.enableRowSelection && e.getIsSelected() ? "selected" : void 0,
222
223
  onClick: () => a.onRowClick && a.onRowClick(e.original),
223
- className: m(
224
- "hover:bg-background-neutral-medium data-[state=selected]:bg-muted/50 border-stroke-solid-light",
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) && ((i = a.tableLayout) == null ? void 0 : i.rowBorder) && "border-b [&:not(:last-child)>td]:border-b",
227
- ((s = a.tableLayout) == null ? void 0 : s.cellBorder) && "[&_>:last-child]:border-e-0",
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
- o.options.enableRowSelection && "[&_>:first-child]:relative",
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 $({ row: l }) {
237
- var a, o, d, i, s, u;
237
+ function j({ row: l }) {
238
+ var a, n, d, s, i, u;
238
239
  const { props: e, table: t } = g();
239
- return ((o = (a = t.getAllColumns().find((c) => {
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 : o.expandedContent) ? /* @__PURE__ */ n(
243
+ })) == null ? void 0 : a.columnDef.meta) == null ? void 0 : n.expandedContent) ? /* @__PURE__ */ o(
243
244
  "tr",
244
245
  {
245
- className: m(
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__ */ n("td", { colSpan: l.getVisibleCells().length, children: (u = (s = (i = t.getAllColumns().find((c) => {
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 : i.columnDef.meta) == null ? void 0 : s.expandedContent) == null ? void 0 : u.call(s, l.original) })
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 j({
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, y, C, x, k, L;
262
- const { props: a } = g(), { column: o, row: d } = e, i = o.getIsPinned(), s = i === "left" && o.getIsLastColumn("left"), u = i === "right" && o.getIsFirstColumn("right"), c = S({
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__ */ n(
266
+ return /* @__PURE__ */ o(
266
267
  "td",
267
268
  {
268
269
  ref: t,
269
- ...(h = a.tableLayout) != null && h.columnsDraggable && !i ? { cell: e } : {},
270
+ ...(h = a.tableLayout) != null && h.columnsDraggable && !s ? { cell: e } : {},
270
271
  style: {
271
- ...((f = a.tableLayout) == null ? void 0 : f.columnsPinnable) && o.getCanPin() && v(o),
272
+ ...((f = a.tableLayout) == null ? void 0 : f.columnsPinnable) && n.getCanPin() && N(n),
272
273
  ...r || null
273
274
  },
274
- "data-pinned": i || void 0,
275
- "data-last-col": s ? "left" : u ? "right" : void 0,
276
- className: m(
277
- "align-middle border-stroke-solid-light leading-none-medium-sm text-neutral-primary dark:text-inverted-primary",
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
- ((y = a.tableLayout) == null ? void 0 : y.cellBorder) && "border-e border-stroke-solid-light",
280
- ((C = a.tableLayout) == null ? void 0 : C.columnsResizable) && o.getCanResize() && "truncate",
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
- ((k = a.tableLayout) == null ? void 0 : k.columnsPinnable) && o.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"',
283
- o.getIndex() === 0 || o.getIndex() === d.getVisibleCells().length - 1 ? (L = a.tableClassNames) == null ? void 0 : L.edgeCell : ""
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 E() {
291
+ function G() {
291
292
  const { table: l, props: e } = g(), t = l.getAllColumns().length;
292
- return /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n("td", { colSpan: t, className: "text-center text-muted-foreground py-6", children: e.emptyMessage || "No data available" }) });
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 G() {
295
+ function O() {
295
296
  const { table: l, props: e } = g(), t = l.getAllColumns().length;
296
- return /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n("td", { colSpan: t, className: "text-center text-muted-foreground py-6", children: /* @__PURE__ */ p("div", { className: "text-muted-foreground bg-card flex items-center gap-2 px-4 py-2 font-medium leading-none text-sm", children: [
297
- /* @__PURE__ */ p(
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
- viewBox: "0 0 24 24",
306
+ className: "animate-spin",
304
307
  children: [
305
- /* @__PURE__ */ n(
306
- "circle",
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
- className: "opacity-25",
309
- cx: "12",
310
- cy: "12",
311
- r: "10",
312
- stroke: "currentColor",
313
- strokeWidth: "3"
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__ */ n(
328
+ /* @__PURE__ */ o(
317
329
  "path",
318
330
  {
319
- className: "opacity-75",
320
- fill: "currentColor",
321
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
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 X({
355
+ function ee({
331
356
  row: l
332
357
  // size,
333
358
  }) {
334
- return /* @__PURE__ */ p(z, { children: [
335
- /* @__PURE__ */ n(
359
+ return /* @__PURE__ */ m(z, { children: [
360
+ /* @__PURE__ */ o(
336
361
  "div",
337
362
  {
338
- className: m(
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__ */ n(
345
- R,
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 Y(l) {
380
+ function te(l) {
356
381
  const { table: e, recordCount: t, isLoading: r } = g();
357
- return /* @__PURE__ */ n(
358
- R,
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 ee() {
369
- var a, o;
393
+ function ae() {
394
+ var a, n;
370
395
  const { table: l, isLoading: e, props: t } = g(), r = l.getState().pagination;
371
- return /* @__PURE__ */ p(I, { children: [
372
- /* @__PURE__ */ n(T, { children: l.getHeaderGroups().map((d, i) => /* @__PURE__ */ n(Z, { headerGroup: d, children: d.headers.map((s, u) => {
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 } = s;
375
- return /* @__PURE__ */ p(D, { header: s, children: [
376
- s.isPlaceholder ? null : w(s.column.columnDef.header, s.getContext()),
377
- ((b = t.tableLayout) == null ? void 0 : b.columnsResizable) && c.getCanResize() && /* @__PURE__ */ n(_, { header: s })
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
- }) }, i)) }),
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
- ee as Z2Table,
392
- I as Z2TableBase,
416
+ ae as Z2Table,
417
+ _ as Z2TableBase,
393
418
  V as Z2TableBody,
394
- M as Z2TableBodyRow,
395
- j as Z2TableBodyRowCell,
396
- $ as Z2TableBodyRowExpandded,
419
+ E as Z2TableBodyRow,
420
+ $ as Z2TableBodyRowCell,
421
+ j as Z2TableBodyRowExpandded,
397
422
  F as Z2TableBodyRowSkeleton,
398
423
  H as Z2TableBodyRowSkeletonCell,
399
- E as Z2TableEmpty,
400
- T as Z2TableHead,
401
- Z as Z2TableHeadRow,
424
+ G as Z2TableEmpty,
425
+ I as Z2TableHead,
426
+ T as Z2TableHeadRow,
402
427
  D as Z2TableHeadRowCell,
403
- _ as Z2TableHeadRowCellResize,
404
- G as Z2TableLoader,
405
- X as Z2TableRowSelect,
406
- Y as Z2TableRowSelectAll,
407
- A as Z2TableRowSpacer
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 n } from "../../lib/utils.js";
4
- function i({ className: t, ...e }) {
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: n("bg-accent animate-pulse rounded-md", t),
10
- ...e
9
+ className: r("bg-surface-neutral-disabled animate-pulse rounded-md", e),
10
+ ...t
11
11
  }
12
12
  );
13
13
  }
14
14
  export {
15
- i as Z2Skeleton
15
+ s as Z2Skeleton
16
16
  };
@@ -44,7 +44,10 @@ import "../../../segmented-control/item.js";
44
44
  import "@radix-ui/react-popover";
45
45
  import "../../../dynamic-table/z2-table.js";
46
46
  import "../../../dynamic-table/z2-table-context.js";
47
- const mt = ({
47
+ import "../../../chart/chart.js";
48
+ import "../../../chart-card/config/defaults.js";
49
+ import "../../../chart-card/config/colors.js";
50
+ const pt = ({
48
51
  avatar: m,
49
52
  value: a,
50
53
  rightIcon: o,
@@ -82,5 +85,5 @@ const mt = ({
82
85
  }
83
86
  );
84
87
  export {
85
- mt as AvatarCell
88
+ pt as AvatarCell
86
89
  };
@@ -49,6 +49,9 @@ import "../segmented-control/item.js";
49
49
  import "@radix-ui/react-popover";
50
50
  import "../dynamic-table/z2-table.js";
51
51
  import "../dynamic-table/z2-table-context.js";
52
+ import "../chart/chart.js";
53
+ import "../chart-card/config/defaults.js";
54
+ import "../chart-card/config/colors.js";
52
55
  import { TableHeaderWrapper as T } from "./components/table-header-wrapper.js";
53
56
  import { TableHeaderContent as b } from "./components/table-header-content.js";
54
57
  import { TableFooter as s } from "./components/table-footer.js";