@ztwoint/z-ui 0.1.128 → 0.1.130

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 (47) hide show
  1. package/dist/components/button/button.d.ts +1 -1
  2. package/dist/components/button/button.js +30 -12
  3. package/dist/components/column-reorder/column-reorder.js +14 -14
  4. package/dist/components/dropdown/z2-dropdown.js +3 -3
  5. package/dist/components/dynamic-table/z2-table.js +116 -116
  6. package/dist/components/input/input.js +1 -1
  7. package/dist/components/number-badge/index.d.ts +2 -0
  8. package/dist/components/number-badge/number-badge.d.ts +10 -0
  9. package/dist/components/number-badge/number-badge.js +27 -0
  10. package/dist/components/primitives/table-card/table-card.js +1 -1
  11. package/dist/components/tab/tab.js +57 -27
  12. package/dist/components/table/components/cell/avatar-cell.js +1 -1
  13. package/dist/components/table/components/cell/description-cell.js +3 -3
  14. package/dist/components/table/components/cell/label-cell.js +9 -9
  15. package/dist/components/table/components/cell/link-cell.js +17 -17
  16. package/dist/components/table/components/cell/number-cell.js +17 -17
  17. package/dist/components/table/table.const.d.ts +1 -1
  18. package/dist/components/table/table.const.js +1 -1
  19. package/dist/components/table-filter/table-filter-button.js +46 -45
  20. package/dist/components/table-filter/table-filter-column-button.js +49 -49
  21. package/dist/css/config/colors/semantic/base.css +6 -6
  22. package/dist/css/config/config.css +2 -1
  23. package/dist/css/config/other-variables.css +1 -1
  24. package/dist/css/styles/tailwind.css +1 -1
  25. package/dist/types/components/button/button.d.ts +1 -1
  26. package/dist/types/components/number-badge/index.d.ts +2 -0
  27. package/dist/types/components/number-badge/number-badge.d.ts +10 -0
  28. package/dist/types/components/table/table.const.d.ts +1 -1
  29. package/package.json +1 -1
  30. package/dist/css/config/colors/backgrounds.css +0 -32
  31. package/dist/css/config/colors/components/avatar.css +0 -53
  32. package/dist/css/config/colors/components/badge.css +0 -137
  33. package/dist/css/config/colors/components/checkbox.css +0 -7
  34. package/dist/css/config/colors/components/featured-icon.css +0 -80
  35. package/dist/css/config/colors/components/progress-bar.css +0 -7
  36. package/dist/css/config/colors/components/radio-button.css +0 -7
  37. package/dist/css/config/colors/components/scroll-overlay.css +0 -17
  38. package/dist/css/config/colors/components/tab.css +0 -59
  39. package/dist/css/config/colors/components/toggle-switch.css +0 -3
  40. package/dist/css/config/colors/components/toggle.css +0 -25
  41. package/dist/css/config/colors/icons.css +0 -81
  42. package/dist/css/config/colors/overlay.css +0 -3
  43. package/dist/css/config/colors/shape.css +0 -163
  44. package/dist/css/config/colors/stroke.css +0 -79
  45. package/dist/css/config/colors/surfaces.css +0 -199
  46. package/dist/css/config/colors/text.css +0 -160
  47. package/dist/css/config/config-deprecated.css +0 -39
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "stroke" | "filled" | "ghost" | null | undefined;
4
+ variant?: "stroke" | "filled" | "colored-stroke" | "ghost" | null | undefined;
5
5
  shade?: "danger" | "neutral" | "brand" | null | undefined;
6
6
  size?: "small" | "large" | "medium" | null | undefined;
7
7
  iconOnly?: boolean | null | undefined;
@@ -1,4 +1,4 @@
1
- import { jsx as e, jsxs as x, Fragment as h } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as f, Fragment as h } from "react/jsx-runtime";
2
2
  import k from "react";
3
3
  import { Slot as w } from "@radix-ui/react-slot";
4
4
  import { cva as N } from "class-variance-authority";
@@ -10,9 +10,12 @@ const C = N(
10
10
  variant: {
11
11
  filled: [""],
12
12
  stroke: [
13
- "ring-[0.5px] ring-btn-secondary-stroke-default hover:ring-btn-secondary-stroke-hover active:ring-btn-secondary-stroke-pressed disabled:ring-btn-secondary-stroke-disabled",
13
+ "ring-[1px] ring-btn-secondary-stroke-default hover:ring-btn-secondary-stroke-hover active:ring-btn-secondary-stroke-pressed disabled:ring-btn-secondary-stroke-disabled",
14
14
  "bg-btn-secondary-surface-default hover:bg-btn-secondary-surface-hover active:bg-btn-secondary-surface-pressed disabled:bg-btn-secondary-surface-disabled"
15
15
  ],
16
+ "colored-stroke": [
17
+ "ring-[1px] bg-btn-secondary-surface-default hover:bg-btn-secondary-surface-hover active:bg-btn-secondary-surface-pressed disabled:bg-btn-secondary-surface-disabled"
18
+ ],
16
19
  ghost: [
17
20
  "hover:text-text-neutral-secondary active:text-text-neutral-muted disabled:text-text-neutral-muted"
18
21
  ]
@@ -35,17 +38,17 @@ const C = N(
35
38
  {
36
39
  variant: "filled",
37
40
  shade: "brand",
38
- class: "bg-btn-primary-brand-surface-default hover:bg-btn-primary-brand-surface-hover active:bg-btn-primary-brand-surface-pressed disabled:bg-btn-primary-brand-surface-disabled ring-[0.5px] ring-btn-primary-brand-stroke-default hover:ring-btn-primary-brand-stroke-hover active:ring-btn-primary-brand-stroke-pressed disabled:ring-btn-primary-brand-stroke-disabled text-text-inverted-primary disabled:text-text-neutral-muted"
41
+ class: "bg-btn-primary-brand-surface-default hover:bg-btn-primary-brand-surface-hover active:bg-btn-primary-brand-surface-pressed disabled:bg-btn-primary-brand-surface-disabled ring-[1px] ring-btn-primary-brand-stroke-default hover:ring-btn-primary-brand-stroke-hover active:ring-btn-primary-brand-stroke-pressed disabled:ring-btn-primary-brand-stroke-disabled text-text-inverted-primary disabled:text-text-neutral-muted"
39
42
  },
40
43
  {
41
44
  variant: "filled",
42
45
  shade: "neutral",
43
- class: "bg-btn-primary-neutral-surface-default hover:bg-btn-primary-neutral-surface-hover active:bg-btn-primary-neutral-surface-pressed disabled:bg-btn-primary-neutral-surface-disabled ring-[0.5px] ring-btn-primary-neutral-stroke-default hover:ring-btn-primary-neutral-stroke-hover active:ring-btn-primary-neutral-stroke-pressed disabled:ring-btn-primary-neutral-stroke-disabled text-text-inverted-primary disabled:text-text-neutral-muted"
46
+ class: "bg-btn-primary-neutral-surface-default hover:bg-btn-primary-neutral-surface-hover active:bg-btn-primary-neutral-surface-pressed disabled:bg-btn-primary-neutral-surface-disabled ring-[1px] ring-btn-primary-neutral-stroke-default hover:ring-btn-primary-neutral-stroke-hover active:ring-btn-primary-neutral-stroke-pressed disabled:ring-btn-primary-neutral-stroke-disabled text-text-inverted-primary disabled:text-text-neutral-muted"
44
47
  },
45
48
  {
46
49
  variant: "filled",
47
50
  shade: "danger",
48
- class: "bg-btn-primary-danger-surface-default hover:bg-btn-primary-danger-surface-hover active:bg-btn-primary-danger-surface-pressed disabled:bg-btn-primary-danger-surface-disabled ring-[0.5px] ring-btn-primary-danger-stroke-default hover:ring-btn-primary-danger-stroke-hover active:ring-btn-primary-danger-stroke-pressed disabled:ring-btn-primary-danger-stroke-disabled text-text-inverted-primary disabled:text-text-neutral-muted"
51
+ class: "bg-btn-primary-danger-surface-default hover:bg-btn-primary-danger-surface-hover active:bg-btn-primary-danger-surface-pressed disabled:bg-btn-primary-danger-surface-disabled ring-[1px] ring-btn-primary-danger-stroke-default hover:ring-btn-primary-danger-stroke-hover active:ring-btn-primary-danger-stroke-pressed disabled:ring-btn-primary-danger-stroke-disabled text-text-inverted-primary disabled:text-text-neutral-muted"
49
52
  },
50
53
  {
51
54
  variant: "stroke",
@@ -62,6 +65,21 @@ const C = N(
62
65
  shade: "danger",
63
66
  class: "text-text-danger-secondary disabled:text-text-neutral-muted"
64
67
  },
68
+ {
69
+ variant: "colored-stroke",
70
+ shade: "neutral",
71
+ class: "text-text-neutral-primary ring-text-neutral-primary hover:ring-text-neutral-primary active:ring-text-neutral-primary disabled:text-text-neutral-muted disabled:ring-text-neutral-muted"
72
+ },
73
+ {
74
+ variant: "colored-stroke",
75
+ shade: "brand",
76
+ class: "text-text-neutral-primary ring-text-brand-secondary hover:ring-text-brand-secondary active:ring-text-brand-secondary disabled:text-text-neutral-muted disabled:ring-text-neutral-muted"
77
+ },
78
+ {
79
+ variant: "colored-stroke",
80
+ shade: "danger",
81
+ class: "text-text-neutral-primary ring-text-danger-secondary hover:ring-text-danger-secondary active:ring-text-danger-secondary disabled:text-text-neutral-muted disabled:ring-text-neutral-muted"
82
+ },
65
83
  {
66
84
  variant: "ghost",
67
85
  shade: "neutral",
@@ -90,19 +108,19 @@ const C = N(
90
108
  className: b,
91
109
  shade: u = "neutral",
92
110
  size: c,
93
- variant: m = "filled",
111
+ variant: g = "filled",
94
112
  asChild: i = !1,
95
113
  leftIcon: r,
96
114
  rightIcon: t,
97
- label: p,
115
+ label: m,
98
116
  children: l,
99
- ...g
100
- }, y) => {
101
- const f = i ? w : "button", a = p || l, n = !a && !!(r || t), o = n ? r || t : null, v = d(
102
- C({ shade: u, size: c, variant: m, iconOnly: n }),
117
+ ...p
118
+ }, x) => {
119
+ const y = i ? w : "button", a = m || l, n = !a && !!(r || t), o = n ? r || t : null, v = d(
120
+ C({ shade: u, size: c, variant: g, iconOnly: n }),
103
121
  b
104
122
  ), s = "w-3.5 h-3.5 min-w-max";
105
- return /* @__PURE__ */ e(f, { className: v, ref: y, ...g, children: i ? l : n ? o ? /* @__PURE__ */ e("span", { className: s, children: o }) : null : /* @__PURE__ */ x(h, { children: [
123
+ return /* @__PURE__ */ e(y, { className: v, ref: x, ...p, children: i ? l : n ? o ? /* @__PURE__ */ e("span", { className: s, children: o }) : null : /* @__PURE__ */ f(h, { children: [
106
124
  r && /* @__PURE__ */ e("span", { className: d(s), children: r }),
107
125
  a && /* @__PURE__ */ e("span", { children: a }),
108
126
  t && /* @__PURE__ */ e("span", { className: d(s), children: t })
@@ -4,35 +4,35 @@ import { cn as f } from "../../lib/utils.js";
4
4
  import { ColumnItem as p } from "./components/column-item/column-item.js";
5
5
  import { useColumnReorder as c } from "./column-reorder.hook.js";
6
6
  const C = ({
7
- columns: o,
7
+ columns: e,
8
8
  onReorder: d,
9
9
  onRemove: i,
10
10
  onEdit: l,
11
- renderAction: t,
12
- className: m,
13
- disabled: n = !1,
14
- editable: s = !1
11
+ renderAction: m,
12
+ className: t,
13
+ disabled: s = !1,
14
+ editable: n = !1
15
15
  }) => {
16
- const { internalColumns: a } = c({ columns: o, onReorder: d });
16
+ const { internalColumns: a } = c({ columns: e, onReorder: d });
17
17
  return /* @__PURE__ */ r(
18
18
  "div",
19
19
  {
20
20
  className: f(
21
- "rounded-2xl border-[0.5px] border-stroke-solid-light bg-background-neutral-default overflow-hidden",
22
- m
21
+ "rounded-2xl border-[1px] border-stroke-solid-light bg-background-neutral-default overflow-hidden box-shadow-medium-10",
22
+ t
23
23
  ),
24
- children: /* @__PURE__ */ r("div", { className: "divide-y divide-stroke-solid-light", children: a.map((e, u) => /* @__PURE__ */ r(
24
+ children: /* @__PURE__ */ r("div", { className: "divide-y divide-stroke-solid-light", children: a.map((o, u) => /* @__PURE__ */ r(
25
25
  p,
26
26
  {
27
- column: e,
27
+ column: o,
28
28
  index: u,
29
29
  onRemove: i,
30
30
  onEdit: l,
31
- renderAction: t,
32
- disabled: n,
33
- editable: s
31
+ renderAction: m,
32
+ disabled: s,
33
+ editable: n
34
34
  },
35
- e.id
35
+ o.id
36
36
  )) })
37
37
  }
38
38
  );
@@ -71,7 +71,7 @@ function B({
71
71
  "div",
72
72
  {
73
73
  className: d(
74
- "flex items-center justify-center gap-1.5 p-2 self-stretch relative cursor-pointer rounded-lg bg-white border-[0.5px] border-[#E0E0E0] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.05)] hover:border-neutral-300 ",
74
+ "flex items-center justify-center gap-1.5 p-2 self-stretch relative cursor-pointer rounded-lg bg-white border-[1px] border-[#E0E0E0] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.05)] hover:border-neutral-300 ",
75
75
  o
76
76
  ),
77
77
  children: [
@@ -133,7 +133,7 @@ function F({
133
133
  align: a,
134
134
  sideOffset: 8,
135
135
  className: d(
136
- "bg-white max-w-fit w-[var(--radix-popover-trigger-width)] p-1 flex flex-col items-start rounded-2xl border-[0.5px] border-[#E0E0E0] shadow-lg min-w-fit",
136
+ "bg-white max-w-fit w-[var(--radix-popover-trigger-width)] p-1 flex flex-col items-start rounded-2xl border-[1px] border-[#E0E0E0] shadow-lg min-w-fit",
137
137
  e
138
138
  ),
139
139
  ...o
@@ -222,7 +222,7 @@ function L({
222
222
  side: l,
223
223
  className: d(
224
224
  "min-w-md min-h-fit h-[var(--radix-popover-content-height)]",
225
- "bg-white w-full p-1 flex flex-col items-start rounded-2xl border-[0.5px] border-[#E0E0E0] shadow-lg",
225
+ "bg-white w-full p-1 flex flex-col items-start rounded-2xl border-[1px] border-[#E0E0E0] shadow-lg",
226
226
  e
227
227
  ),
228
228
  ...r
@@ -1,12 +1,12 @@
1
1
  import { jsxs as R, jsx as o, Fragment as z } from "react/jsx-runtime";
2
2
  import { Fragment as P } from "react";
3
3
  import { Z2Checkbox as k } from "../checkbox/checkbox.js";
4
- import { useZ2Table as g } from "./z2-table-context.js";
4
+ import { useZ2Table as b } from "./z2-table-context.js";
5
5
  import { flexRender as w } from "@tanstack/react-table";
6
6
  import { cva as v } from "class-variance-authority";
7
7
  import { cn as p } from "../../lib/utils.js";
8
8
  import { Z2Skeleton as Z } from "../skeleton/skeleton.js";
9
- const B = v("", {
9
+ const _ = v("", {
10
10
  variants: {
11
11
  size: {
12
12
  dense: "p-2 h-8",
@@ -37,33 +37,33 @@ function N(l) {
37
37
  zIndex: e ? 1 : 0
38
38
  };
39
39
  }
40
- function _({ children: l }) {
41
- var t, r, a;
42
- const { props: e } = g();
40
+ function B({ children: l }) {
41
+ var a, r, t;
42
+ const { props: e } = b();
43
43
  return /* @__PURE__ */ o(
44
44
  "table",
45
45
  {
46
46
  "data-slot": "data-grid-table",
47
47
  className: p(
48
48
  "w-full align-middle text-left rtl:text-right text-neutral-secondary",
49
- !((t = e.tableLayout) != null && t.columnsDraggable) && "border-separate border-spacing-0",
49
+ !((a = e.tableLayout) != null && a.columnsDraggable) && "border-separate border-spacing-0",
50
50
  ((r = e.tableLayout) == null ? void 0 : r.width) === "fixed" ? "table-fixed" : "table-auto",
51
- (a = e.tableClassNames) == null ? void 0 : a.base
51
+ (t = e.tableClassNames) == null ? void 0 : t.base
52
52
  ),
53
53
  children: l
54
54
  }
55
55
  );
56
56
  }
57
57
  function I({ children: l }) {
58
- var t, r, a;
59
- const { props: e } = g();
58
+ var a, r, t;
59
+ const { props: e } = b();
60
60
  return /* @__PURE__ */ o(
61
61
  "thead",
62
62
  {
63
63
  className: p(
64
64
  "",
65
- (t = e.tableClassNames) == null ? void 0 : t.header,
66
- ((r = e.tableLayout) == null ? void 0 : r.headerSticky) && ((a = e.tableClassNames) == null ? void 0 : a.headerSticky)
65
+ (a = e.tableClassNames) == null ? void 0 : a.header,
66
+ ((r = e.tableLayout) == null ? void 0 : r.headerSticky) && ((t = e.tableClassNames) == null ? void 0 : t.headerSticky)
67
67
  ),
68
68
  children: l
69
69
  }
@@ -73,18 +73,18 @@ function T({
73
73
  children: l,
74
74
  headerGroup: e
75
75
  }) {
76
- var r, a, n, d, s;
77
- const { props: t } = g();
76
+ var r, t, n, d, i;
77
+ const { props: a } = b();
78
78
  return /* @__PURE__ */ o(
79
79
  "tr",
80
80
  {
81
81
  className: p(
82
82
  "bg-transparent tracking-wider rounded-xl",
83
- ((r = t.tableLayout) == null ? void 0 : r.headerBorder) && "[&>th]:border-b border-stroke-solid-light",
84
- ((a = t.tableLayout) == null ? void 0 : a.cellBorder) && "[&_>:last-child]:border-e-0",
85
- ((n = t.tableLayout) == null ? void 0 : n.stripped) && "bg-transparent",
86
- ((d = t.tableLayout) == null ? void 0 : d.headerBackground) !== !1 && "bg-background-neutral-medium",
87
- (s = t.tableClassNames) == null ? void 0 : s.headerRow
83
+ ((r = a.tableLayout) == null ? void 0 : r.headerBorder) && "[&>th]:border-b border-stroke-solid-light",
84
+ ((t = a.tableLayout) == null ? void 0 : t.cellBorder) && "[&_>:last-child]:border-e-0",
85
+ ((n = a.tableLayout) == null ? void 0 : n.stripped) && "bg-transparent",
86
+ ((d = a.tableLayout) == null ? void 0 : d.headerBackground) !== !1 && "bg-background-neutral-medium",
87
+ (i = a.tableClassNames) == null ? void 0 : i.headerRow
88
88
  ),
89
89
  children: l
90
90
  },
@@ -94,42 +94,42 @@ function T({
94
94
  function D({
95
95
  children: l,
96
96
  header: e,
97
- dndRef: t,
97
+ dndRef: a,
98
98
  dndStyle: r
99
99
  }) {
100
- var c, b, m, h, f, C, y, x;
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({
102
- size: (c = a.tableLayout) != null && c.dense ? "dense" : "default"
100
+ var u, g, m, h, f, C, y, x;
101
+ const { props: t } = b(), { column: n } = e, d = n.getIsPinned(), i = d === "left" && n.getIsLastColumn("left"), s = d === "right" && n.getIsFirstColumn("right"), c = _({
102
+ size: (u = t.tableLayout) != null && u.dense ? "dense" : "default"
103
103
  });
104
104
  return /* @__PURE__ */ o(
105
105
  "th",
106
106
  {
107
- ref: t,
107
+ ref: a,
108
108
  colSpan: e.colSpan,
109
109
  style: {
110
- ...((b = a.tableLayout) == null ? void 0 : b.width) === "fixed" && {
110
+ ...((g = t.tableLayout) == null ? void 0 : g.width) === "fixed" && {
111
111
  width: `${e.getSize()}px`
112
112
  },
113
- ...((m = a.tableLayout) == null ? void 0 : m.columnsPinnable) && n.getCanPin() && N(n),
113
+ ...((m = t.tableLayout) == null ? void 0 : m.columnsPinnable) && n.getCanPin() && N(n),
114
114
  ...r || null
115
115
  },
116
116
  "data-pinned": d || void 0,
117
- "data-last-col": s ? "left" : i ? "right" : void 0,
117
+ "data-last-col": i ? "left" : s ? "right" : void 0,
118
118
  className: p(
119
119
  "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",
120
- u,
121
- ((h = a.tableLayout) == null ? void 0 : h.cellBorder) && "border-e",
122
- ((f = a.tableLayout) == null ? void 0 : f.columnsResizable) && n.getCanResize() && "truncate",
123
- ((C = a.tableLayout) == null ? void 0 : C.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",
120
+ c,
121
+ ((h = t.tableLayout) == null ? void 0 : h.cellBorder) && "border-e",
122
+ ((f = t.tableLayout) == null ? void 0 : f.columnsResizable) && n.getCanResize() && "truncate",
123
+ ((C = t.tableLayout) == null ? void 0 : C.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",
124
124
  (y = e.column.columnDef.meta) == null ? void 0 : y.headerClassName,
125
- n.getIndex() === 0 || n.getIndex() === e.headerGroup.headers.length - 1 ? (x = a.tableClassNames) == null ? void 0 : x.edgeCell : ""
125
+ n.getIndex() === 0 || n.getIndex() === e.headerGroup.headers.length - 1 ? (x = t.tableClassNames) == null ? void 0 : x.edgeCell : ""
126
126
  ),
127
127
  children: l
128
128
  },
129
129
  e.id
130
130
  );
131
131
  }
132
- function A({ header: l }) {
132
+ function M({ header: l }) {
133
133
  const { column: e } = l;
134
134
  return /* @__PURE__ */ o(
135
135
  "div",
@@ -141,18 +141,18 @@ function A({ header: l }) {
141
141
  }
142
142
  );
143
143
  }
144
- function M() {
144
+ function A() {
145
145
  return /* @__PURE__ */ o("tbody", { "aria-hidden": "true", className: "h-2" });
146
146
  }
147
147
  function V({ children: l }) {
148
- var t, r;
149
- const { props: e } = g();
148
+ var a, r;
149
+ const { props: e } = b();
150
150
  return /* @__PURE__ */ o(
151
151
  "tbody",
152
152
  {
153
153
  className: p(
154
154
  "[&_tr:last-child]:border-0",
155
- ((t = e.tableLayout) == null ? void 0 : t.rowRounded) && "[&_td:first-child]:rounded-s-lg [&_td:last-child]:rounded-e-lg",
155
+ ((a = e.tableLayout) == null ? void 0 : a.rowRounded) && "[&_td:first-child]:rounded-s-lg [&_td:last-child]:rounded-e-lg",
156
156
  (r = e.tableClassNames) == null ? void 0 : r.body
157
157
  ),
158
158
  children: l
@@ -160,19 +160,19 @@ function V({ children: l }) {
160
160
  );
161
161
  }
162
162
  function F({ children: l }) {
163
- var r, a, n, d, s;
164
- const { table: e, props: t } = g();
163
+ var r, t, n, d, i;
164
+ const { table: e, props: a } = b();
165
165
  return /* @__PURE__ */ o(
166
166
  "tr",
167
167
  {
168
168
  className: p(
169
169
  "hover:bg-background-neutral-medium data-[state=selected]:bg-muted/50 border-stroke-solid-light",
170
- t.onRowClick && "cursor-pointer",
171
- !((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",
172
- ((n = t.tableLayout) == null ? void 0 : n.cellBorder) && "[&_>:last-child]:border-e-0",
173
- ((d = t.tableLayout) == null ? void 0 : d.stripped) && "odd:bg-background-neutral-medium hover:bg-transparent odd:hover:bg-background-neutral-medium",
170
+ a.onRowClick && "cursor-pointer",
171
+ !((r = a.tableLayout) != null && r.stripped) && ((t = a.tableLayout) == null ? void 0 : t.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light",
172
+ ((n = a.tableLayout) == null ? void 0 : n.cellBorder) && "[&_>:last-child]:border-e-0",
173
+ ((d = a.tableLayout) == null ? void 0 : d.stripped) && "odd:bg-background-neutral-medium hover:bg-transparent odd:hover:bg-background-neutral-medium",
174
174
  e.options.enableRowSelection && "[&_>:first-child]:relative",
175
- (s = t.tableClassNames) == null ? void 0 : s.bodyRow
175
+ (i = a.tableClassNames) == null ? void 0 : i.bodyRow
176
176
  ),
177
177
  children: l
178
178
  }
@@ -182,26 +182,26 @@ function H({
182
182
  children: l,
183
183
  column: e
184
184
  }) {
185
- var n, d, s, i, u, c, b;
186
- const { props: t, table: r } = g(), a = S({
187
- size: (n = t.tableLayout) != null && n.dense ? "dense" : "default"
185
+ var n, d, i, s, c, u, g;
186
+ const { props: a, table: r } = b(), t = S({
187
+ size: (n = a.tableLayout) != null && n.dense ? "dense" : "default"
188
188
  });
189
189
  return /* @__PURE__ */ o(
190
190
  "td",
191
191
  {
192
192
  style: {
193
- ...((d = t.tableLayout) == null ? void 0 : d.width) === "fixed" && {
193
+ ...((d = a.tableLayout) == null ? void 0 : d.width) === "fixed" && {
194
194
  width: `${e.getSize()}px`
195
195
  }
196
196
  },
197
197
  className: p(
198
198
  "align-middle",
199
- a,
200
- ((s = t.tableLayout) == null ? void 0 : s.cellBorder) && "border-e border-stroke-solid-light",
201
- ((i = t.tableLayout) == null ? void 0 : i.columnsResizable) && e.getCanResize() && "truncate",
202
- (u = e.columnDef.meta) == null ? void 0 : u.cellClassName,
203
- ((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"',
204
- e.getIndex() === 0 || e.getIndex() === r.getVisibleFlatColumns().length - 1 ? (b = t.tableClassNames) == null ? void 0 : b.edgeCell : ""
199
+ t,
200
+ ((i = a.tableLayout) == null ? void 0 : i.cellBorder) && "border-e border-stroke-solid-light",
201
+ ((s = a.tableLayout) == null ? void 0 : s.columnsResizable) && e.getCanResize() && "truncate",
202
+ (c = e.columnDef.meta) == null ? void 0 : c.cellClassName,
203
+ ((u = a.tableLayout) == null ? void 0 : u.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"',
204
+ e.getIndex() === 0 || e.getIndex() === r.getVisibleFlatColumns().length - 1 ? (g = a.tableClassNames) == null ? void 0 : g.edgeCell : ""
205
205
  ),
206
206
  children: l
207
207
  }
@@ -210,79 +210,79 @@ function H({
210
210
  function E({
211
211
  children: l,
212
212
  row: e,
213
- dndRef: t,
213
+ dndRef: a,
214
214
  dndStyle: r
215
215
  }) {
216
- var d, s, i, u, c;
217
- const { props: a, table: n } = g();
216
+ var d, i, s, c, u;
217
+ const { props: t, table: n } = b();
218
218
  return /* @__PURE__ */ o(
219
219
  "tr",
220
220
  {
221
- ref: t,
221
+ ref: a,
222
222
  style: { ...r || null },
223
223
  "data-state": n.options.enableRowSelection && e.getIsSelected() ? "selected" : void 0,
224
- onClick: () => a.onRowClick && a.onRowClick(e.original),
224
+ onClick: () => t.onRowClick && t.onRowClick(e.original),
225
225
  className: p(
226
226
  "hover:bg-background-neutral-medium data-[state=selected]:bg-muted/50 leading-none-medium-sm text-neutral-primary dark:text-inverted-primary",
227
- a.onRowClick && "cursor-pointer",
228
- !((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",
229
- ((i = a.tableLayout) == null ? void 0 : i.cellBorder) && "[&_>:last-child]:border-e-0",
230
- ((u = a.tableLayout) == null ? void 0 : u.stripped) && "odd:bg-background-neutral-medium hover:bg-transparent odd:hover:bg-background-neutral-medium",
227
+ t.onRowClick && "cursor-pointer",
228
+ !((d = t.tableLayout) != null && d.stripped) && ((i = t.tableLayout) == null ? void 0 : i.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light",
229
+ ((s = t.tableLayout) == null ? void 0 : s.cellBorder) && "[&_>:last-child]:border-e-0",
230
+ ((c = t.tableLayout) == null ? void 0 : c.stripped) && "odd:bg-background-neutral-medium hover:bg-transparent odd:hover:bg-background-neutral-medium",
231
231
  n.options.enableRowSelection && "[&_>:first-child]:relative",
232
- (c = a.tableClassNames) == null ? void 0 : c.bodyRow
232
+ (u = t.tableClassNames) == null ? void 0 : u.bodyRow
233
233
  ),
234
234
  children: l
235
235
  }
236
236
  );
237
237
  }
238
238
  function j({ row: l }) {
239
- var a, n, d, s, i, u;
240
- const { props: e, table: t } = g();
241
- return ((n = (a = t.getAllColumns().find((c) => {
242
- var b;
243
- return (b = c.columnDef.meta) == null ? void 0 : b.expandedContent;
244
- })) == null ? void 0 : a.columnDef.meta) == null ? void 0 : n.expandedContent) ? /* @__PURE__ */ o(
239
+ var d, i;
240
+ const { props: e, table: a } = b(), r = a.getAllColumns().find((s) => {
241
+ var c;
242
+ return (c = s.columnDef.meta) == null ? void 0 : c.expandedContent;
243
+ }), t = (d = r == null ? void 0 : r.columnDef.meta) == null ? void 0 : d.expandedContent;
244
+ if (!t)
245
+ return null;
246
+ let n;
247
+ return typeof t == "function" ? n = t(l.original) : n = t, n == null ? null : /* @__PURE__ */ o(
245
248
  "tr",
246
249
  {
247
250
  className: p(
248
- ((d = e.tableLayout) == null ? void 0 : d.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light"
251
+ ((i = e.tableLayout) == null ? void 0 : i.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light"
249
252
  ),
250
- children: /* @__PURE__ */ o("td", { colSpan: l.getVisibleCells().length, children: (u = (i = (s = t.getAllColumns().find((c) => {
251
- var b;
252
- return (b = c.columnDef.meta) == null ? void 0 : b.expandedContent;
253
- })) == null ? void 0 : s.columnDef.meta) == null ? void 0 : i.expandedContent) == null ? void 0 : u.call(i, l.original) })
253
+ children: /* @__PURE__ */ o("td", { colSpan: l.getVisibleCells().length, children: n })
254
254
  }
255
- ) : null;
255
+ );
256
256
  }
257
257
  function $({
258
258
  children: l,
259
259
  cell: e,
260
- dndRef: t,
260
+ dndRef: a,
261
261
  dndStyle: r
262
262
  }) {
263
- var b, m, h, f, C, y, x, L;
264
- 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({
265
- size: (b = a.tableLayout) != null && b.dense ? "dense" : "default"
263
+ var g, m, h, f, C, y, x, L;
264
+ const { props: t } = b(), { column: n, row: d } = e, i = n.getIsPinned(), s = i === "left" && n.getIsLastColumn("left"), c = i === "right" && n.getIsFirstColumn("right"), u = S({
265
+ size: (g = t.tableLayout) != null && g.dense ? "dense" : "default"
266
266
  });
267
267
  return /* @__PURE__ */ o(
268
268
  "td",
269
269
  {
270
- ref: t,
271
- ...(m = a.tableLayout) != null && m.columnsDraggable && !s ? { cell: e } : {},
270
+ ref: a,
271
+ ...(m = t.tableLayout) != null && m.columnsDraggable && !i ? { cell: e } : {},
272
272
  style: {
273
- ...((h = a.tableLayout) == null ? void 0 : h.columnsPinnable) && n.getCanPin() && N(n),
273
+ ...((h = t.tableLayout) == null ? void 0 : h.columnsPinnable) && n.getCanPin() && N(n),
274
274
  ...r || null
275
275
  },
276
- "data-pinned": s || void 0,
277
- "data-last-col": i ? "left" : u ? "right" : void 0,
276
+ "data-pinned": i || void 0,
277
+ "data-last-col": s ? "left" : c ? "right" : void 0,
278
278
  className: p(
279
279
  "align-middle",
280
- c,
281
- ((f = a.tableLayout) == null ? void 0 : f.cellBorder) && "border-e border-stroke-solid-light",
282
- ((C = a.tableLayout) == null ? void 0 : C.columnsResizable) && n.getCanResize() && "truncate",
280
+ u,
281
+ ((f = t.tableLayout) == null ? void 0 : f.cellBorder) && "border-e border-stroke-solid-light",
282
+ ((C = t.tableLayout) == null ? void 0 : C.columnsResizable) && n.getCanResize() && "truncate",
283
283
  (y = e.column.columnDef.meta) == null ? void 0 : y.cellClassName,
284
- ((x = a.tableLayout) == null ? void 0 : x.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"',
285
- n.getIndex() === 0 || n.getIndex() === d.getVisibleCells().length - 1 ? (L = a.tableClassNames) == null ? void 0 : L.edgeCell : ""
284
+ ((x = t.tableLayout) == null ? void 0 : x.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"',
285
+ n.getIndex() === 0 || n.getIndex() === d.getVisibleCells().length - 1 ? (L = t.tableClassNames) == null ? void 0 : L.edgeCell : ""
286
286
  ),
287
287
  children: l
288
288
  },
@@ -290,12 +290,12 @@ function $({
290
290
  );
291
291
  }
292
292
  function G() {
293
- const { table: l, props: e } = g(), t = l.getAllColumns().length;
294
- 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
+ const { table: l, props: e } = b(), a = l.getAllColumns().length;
294
+ return /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: a, className: "text-center text-muted-foreground py-6", children: e.emptyMessage || "No data available" }) });
295
295
  }
296
296
  function O() {
297
- const { table: l, props: e } = g(), t = l.getAllColumns().length;
298
- 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__ */ R("div", { className: "text-neutral-muted flex items-center gap-2 px-4 py-2 leading-none-medium-sm justify-center", children: [
297
+ const { table: l, props: e } = b(), a = l.getAllColumns().length;
298
+ return /* @__PURE__ */ o("tr", { style: { height: l.getState().pagination.pageSize * 43 }, children: /* @__PURE__ */ o("td", { colSpan: a, className: "text-center text-muted-foreground py-6", children: /* @__PURE__ */ R("div", { className: "text-neutral-muted flex items-center gap-2 px-4 py-2 leading-none-medium-sm justify-center", children: [
299
299
  /* @__PURE__ */ R(
300
300
  "svg",
301
301
  {
@@ -368,43 +368,43 @@ function ee({
368
368
  ) });
369
369
  }
370
370
  function te(l) {
371
- const { table: e, recordCount: t, isLoading: r } = g();
371
+ const { table: e, recordCount: a, isLoading: r } = b();
372
372
  return /* @__PURE__ */ o(
373
373
  k,
374
374
  {
375
375
  checked: e.getIsAllPageRowsSelected() || e.getIsSomePageRowsSelected() && "indeterminate",
376
- disabled: r || t === 0,
377
- onCheckedChange: (a) => e.toggleAllPageRowsSelected(!!a),
376
+ disabled: r || a === 0,
377
+ onCheckedChange: (t) => e.toggleAllPageRowsSelected(!!t),
378
378
  "aria-label": "Select all",
379
379
  className: "align-[inherit]"
380
380
  }
381
381
  );
382
382
  }
383
383
  function ae() {
384
- var a, n;
385
- const { table: l, isLoading: e, props: t } = g(), r = l.getState().pagination;
386
- return /* @__PURE__ */ R(_, { children: [
387
- (((a = t.tableLayout) == null ? void 0 : a.stripped) || !((n = t.tableLayout) != null && n.rowBorder)) && /* @__PURE__ */ o(M, {}),
388
- /* @__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) => {
389
- var c;
390
- 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);
391
- }) }, s)) : /* @__PURE__ */ o(O, {}) : l.getRowModel().rows.length ? l.getRowModel().rows.map((d, s) => /* @__PURE__ */ R(P, { children: [
392
- /* @__PURE__ */ o(E, { row: d, children: d.getVisibleCells().map((i, u) => /* @__PURE__ */ o($, { cell: i, children: w(i.column.columnDef.cell, i.getContext()) }, u)) }, s),
384
+ var t, n;
385
+ const { table: l, isLoading: e, props: a } = b(), r = l.getState().pagination;
386
+ return /* @__PURE__ */ R(B, { children: [
387
+ (((t = a.tableLayout) == null ? void 0 : t.stripped) || !((n = a.tableLayout) != null && n.rowBorder)) && /* @__PURE__ */ o(A, {}),
388
+ /* @__PURE__ */ o(V, { children: e && (r != null && r.pageSize) ? a.loadingMode === "skeleton" ? Array.from({ length: r.pageSize }).map((d, i) => /* @__PURE__ */ o(F, { children: l.getVisibleFlatColumns().map((s, c) => {
389
+ var u;
390
+ return /* @__PURE__ */ o(H, { column: s, children: ((u = s.columnDef.meta) == null ? void 0 : u.skeleton) || /* @__PURE__ */ o(Z, { className: "h-4 w-full" }) }, c);
391
+ }) }, i)) : /* @__PURE__ */ o(O, {}) : l.getRowModel().rows.length ? l.getRowModel().rows.map((d, i) => /* @__PURE__ */ R(P, { children: [
392
+ /* @__PURE__ */ o(E, { row: d, children: d.getVisibleCells().map((s, c) => /* @__PURE__ */ o($, { cell: s, children: w(s.column.columnDef.cell, s.getContext()) }, c)) }, i),
393
393
  d.getIsExpanded() && /* @__PURE__ */ o(j, { row: d })
394
394
  ] }, d.id)) : /* @__PURE__ */ o(G, {}) }),
395
- /* @__PURE__ */ o(I, { children: l.getHeaderGroups().map((d, s) => /* @__PURE__ */ o(T, { headerGroup: d, children: d.headers.map((i, u) => {
396
- var b;
397
- const { column: c } = i;
398
- return /* @__PURE__ */ R(D, { header: i, children: [
399
- i.isPlaceholder ? null : w(i.column.columnDef.header, i.getContext()),
400
- ((b = t.tableLayout) == null ? void 0 : b.columnsResizable) && c.getCanResize() && /* @__PURE__ */ o(A, { header: i })
401
- ] }, u);
402
- }) }, s)) })
395
+ /* @__PURE__ */ o(I, { children: l.getHeaderGroups().map((d, i) => /* @__PURE__ */ o(T, { headerGroup: d, children: d.headers.map((s, c) => {
396
+ var g;
397
+ const { column: u } = s;
398
+ return /* @__PURE__ */ R(D, { header: s, children: [
399
+ s.isPlaceholder ? null : w(s.column.columnDef.header, s.getContext()),
400
+ ((g = a.tableLayout) == null ? void 0 : g.columnsResizable) && u.getCanResize() && /* @__PURE__ */ o(M, { header: s })
401
+ ] }, c);
402
+ }) }, i)) })
403
403
  ] });
404
404
  }
405
405
  export {
406
406
  ae as Z2Table,
407
- _ as Z2TableBase,
407
+ B as Z2TableBase,
408
408
  V as Z2TableBody,
409
409
  E as Z2TableBodyRow,
410
410
  $ as Z2TableBodyRowCell,
@@ -415,9 +415,9 @@ export {
415
415
  I as Z2TableHead,
416
416
  T as Z2TableHeadRow,
417
417
  D as Z2TableHeadRowCell,
418
- A as Z2TableHeadRowCellResize,
418
+ M as Z2TableHeadRowCellResize,
419
419
  O as Z2TableLoader,
420
420
  ee as Z2TableRowSelect,
421
421
  te as Z2TableRowSelectAll,
422
- M as Z2TableRowSpacer
422
+ A as Z2TableRowSpacer
423
423
  };
@@ -15,7 +15,7 @@ const d = _("", {
15
15
  "div",
16
16
  {
17
17
  className: e(
18
- "rounded-lg bg-input-surface-default flex items-center shadow-[inset_0_0_0_0.5px_theme(colors.input.stroke.default)] hover:shadow-[inset_0_0_0_0.5px_theme(colors.input.stroke.hover)] focus-within:shadow-[inset_0_0_0_0.5px_theme(colors.input.stroke.active),0_1px_2px_0_rgba(0,0,0,0.05)] focus-within:hover:shadow-[inset_0_0_0_0.5px_theme(colors.input.stroke.active),0_1px_2px_0_rgba(0,0,0,0.05)] has-[:disabled]:shadow-[inset_0_0_0_0.5px_theme(colors.input.stroke.disabled)]",
18
+ "rounded-lg bg-input-surface-default flex items-center shadow-[inset_0_0_0_1px_theme(colors.input.stroke.default)] hover:shadow-[inset_0_0_0_1px_theme(colors.input.stroke.hover)] focus-within:shadow-[inset_0_0_0_1px_theme(colors.input.stroke.active),0_1px_2px_0_rgba(0,0,0,0.05)] focus-within:hover:shadow-[inset_0_0_0_1px_theme(colors.input.stroke.active),0_1px_2px_0_rgba(0,0,0,0.05)] has-[:disabled]:shadow-[inset_0_0_0_1px_theme(colors.input.stroke.disabled)]",
19
19
  d({ size: s }),
20
20
  o
21
21
  ),
@@ -0,0 +1,2 @@
1
+ export { NumberBadge, numberBadgeVariants } from './number-badge';
2
+ export type { NumberBadgeProps } from './number-badge';