@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,113 +1,113 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import k, { useMemo as K } from "react";
3
3
  import * as d from "@radix-ui/react-popover";
4
- import { Button as u } from "../button/button.js";
4
+ import { Button as f } from "../button/button.js";
5
5
  import { useTableFilterContext as L } from "./table-filter.context.js";
6
6
  import _ from "./filters/text.js";
7
7
  import M from "./filters/boolean.js";
8
8
  import U from "./filters/number/number.js";
9
9
  import q from "./filters/checkbox.js";
10
- import E from "../assets/icons/circle-check-filled.js";
11
- import { getFilterCount as G } from "./selected-filters-display/selected-filters-display.utils.js";
12
- import { FilterConfirmationDialog as H } from "./close-filter-confirm/filter-confirmation-dialog.js";
10
+ import { getFilterCount as E } from "./selected-filters-display/selected-filters-display.utils.js";
11
+ import { FilterConfirmationDialog as G } from "./close-filter-confirm/filter-confirmation-dialog.js";
13
12
  import { hasUnsavedFilterChangesForColumn as A } from "./close-filter-confirm/filter-confirmation-dialog.utils.js";
14
- const re = ({ filterName: n }) => {
15
- const [T, a] = k.useState(!1), [f, s] = k.useState(!1), {
16
- getFilterForColumn: C,
13
+ import { NumberBadge as H } from "../number-badge/number-badge.js";
14
+ const le = ({ filterName: n }) => {
15
+ const [T, a] = k.useState(!1), [C, s] = k.useState(!1), {
16
+ getFilterForColumn: g,
17
17
  hasAppliedFilterForColumn: O,
18
- updateColumnFilter: g,
18
+ updateColumnFilter: b,
19
19
  applyFilters: c,
20
20
  resetToAppliedFilters: P,
21
21
  filterSchema: j,
22
22
  filterComponents: m = {},
23
23
  tempFilters: v,
24
24
  filter: p
25
- } = L(), N = (o) => {
26
- !o && f ? A(n, v, p.value) ? a(!0) : s(!1) : s(o);
25
+ } = L(), N = (t) => {
26
+ !t && C ? A(n, v, p.value) ? a(!0) : s(!1) : s(t);
27
27
  }, $ = () => {
28
28
  c(), a(!1), s(!1);
29
- }, D = () => {
29
+ }, B = () => {
30
30
  P(), a(!1), s(!1);
31
- }, R = () => {
31
+ }, D = () => {
32
32
  a(!1);
33
- }, x = A(n, v, p.value), t = j.find((o) => o.filterKey === n), l = K(
34
- () => C(n),
35
- [n, C]
33
+ }, x = A(n, v, p.value), o = j.find((t) => t.filterKey === n), r = K(
34
+ () => g(n),
35
+ [n, g]
36
36
  );
37
- if (!t)
37
+ if (!o)
38
38
  return console.warn(`Column "${n}" not found in schema`), null;
39
- const S = {
39
+ const R = {
40
40
  boolean: M,
41
41
  string: _,
42
42
  number: U,
43
43
  checkbox: q
44
- }, b = t.type && (m == null ? void 0 : m[t.type]) || S[t.type ?? "string"], h = O(n), F = p.loading || !1, y = t.options ? Object.entries(t.options).map(([o, i]) => ({
45
- label: o,
46
- value: o,
44
+ }, F = o.type && (m == null ? void 0 : m[o.type]) || R[o.type ?? "string"], u = O(n), y = p.loading || !1, w = o.options ? Object.entries(o.options).map(([t, i]) => ({
45
+ label: t,
46
+ value: t,
47
47
  total: i
48
- })) : void 0, w = l ? G(l, y) : void 0, z = l != null && l.value ? Array.isArray(l.value) ? l.value.length : 1 : 0, B = () => {
49
- const o = g(n, "", "");
50
- c(o), s(!1);
48
+ })) : void 0, h = r ? E(r, w) : void 0, S = r != null && r.value ? Array.isArray(r.value) ? r.value.length : 1 : 0, z = () => {
49
+ const t = b(n, "", "");
50
+ c(t), s(!1);
51
51
  }, I = () => {
52
52
  c(), s(!1);
53
53
  };
54
- return b ? /* @__PURE__ */ r(d.Root, { open: f, onOpenChange: N, children: [
54
+ return F ? /* @__PURE__ */ l(d.Root, { open: C, onOpenChange: N, children: [
55
55
  /* @__PURE__ */ e(d.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
56
- u,
56
+ f,
57
57
  {
58
- variant: h ? "filled" : "stroke",
59
- shade: h ? "brand" : "neutral",
58
+ variant: u ? "colored-stroke" : "stroke",
59
+ shade: u ? "brand" : "neutral",
60
60
  size: "small",
61
- children: /* @__PURE__ */ r("span", { className: "flex items-center gap-2", children: [
62
- /* @__PURE__ */ r("span", { className: "flex items-center gap-1", children: [
63
- t.helperText && /* @__PURE__ */ r("span", { className: "leading-normal-regular-xs text-neutral-muted", children: [
64
- t.helperText,
61
+ children: /* @__PURE__ */ l("span", { className: "flex items-center gap-2", children: [
62
+ /* @__PURE__ */ l("span", { className: "flex items-center gap-1", children: [
63
+ o.helperText && /* @__PURE__ */ l("span", { className: "leading-normal-regular-xs text-neutral-muted", children: [
64
+ o.helperText,
65
65
  ": "
66
66
  ] }),
67
- t.title
67
+ o.title
68
68
  ] }),
69
- h && /* @__PURE__ */ e(E, { className: "w-4 h-4 text-white flex-shrink-0" }),
70
- F && /* @__PURE__ */ e("div", { className: "w-4 h-4 border-2 border-text-brand-secondary rounded-full animate-spin flex-shrink-0" })
69
+ u && /* @__PURE__ */ e(H, { number: h || 0, textColor: "brand" }),
70
+ y && /* @__PURE__ */ e("div", { className: "w-4 h-4 border-2 border-text-brand-secondary rounded-full animate-spin flex-shrink-0" })
71
71
  ] })
72
72
  }
73
73
  ) }),
74
- /* @__PURE__ */ e(d.Portal, { children: /* @__PURE__ */ r(
74
+ /* @__PURE__ */ e(d.Portal, { children: /* @__PURE__ */ l(
75
75
  d.Content,
76
76
  {
77
77
  className: "w-80 bg-surface-neutral-default border border-stroke-solid-light rounded-2xl overflow-hidden shadow-lg",
78
78
  sideOffset: 8,
79
79
  align: "start",
80
80
  children: [
81
- F ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-3", children: [
81
+ y ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-3", children: [
82
82
  /* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-text-brand-secondary" }),
83
83
  /* @__PURE__ */ e("span", { className: "text-text-neutral-muted text-sm", children: "Loading options..." })
84
84
  ] }) }) : /* @__PURE__ */ e(
85
- b,
85
+ F,
86
86
  {
87
- value: l,
88
- onChange: ({ condition: o, value: i }) => g(n, o, i),
89
- filterOptions: y
87
+ value: r,
88
+ onChange: ({ condition: t, value: i }) => b(n, t, i),
89
+ filterOptions: w
90
90
  }
91
91
  ),
92
- (x || !!z) && /* @__PURE__ */ r("div", { className: "flex justify-between gap-2 p-3 border-t border-stroke-solid-medium", children: [
93
- /* @__PURE__ */ e(u, { onClick: B, variant: "stroke", shade: "neutral", size: "small", children: "Clear All" }),
94
- x && /* @__PURE__ */ e(u, { onClick: I, variant: "filled", shade: "neutral", size: "small", children: `Apply${w !== void 0 ? ` ${w}` : ""}` })
92
+ (x || !!S) && /* @__PURE__ */ l("div", { className: "flex justify-between gap-2 p-3 border-t border-stroke-solid-medium", children: [
93
+ /* @__PURE__ */ e(f, { onClick: z, variant: "stroke", shade: "neutral", size: "small", children: "Clear All" }),
94
+ x && /* @__PURE__ */ e(f, { onClick: I, variant: "filled", shade: "neutral", size: "small", children: `Apply${h !== void 0 ? ` ${h}` : ""}` })
95
95
  ] })
96
96
  ]
97
97
  }
98
98
  ) }),
99
99
  T && /* @__PURE__ */ e(
100
- H,
100
+ G,
101
101
  {
102
- onClose: R,
103
- onRevertChanges: D,
102
+ onClose: D,
103
+ onRevertChanges: B,
104
104
  onApplyChanges: $
105
105
  }
106
106
  )
107
107
  ] }) : (console.warn(
108
- `No filter component found for column "${t.filterKey}" with type "${t.type}". Provide a custom filter component or use supported types: "string", "number", "boolean", "checkbox".`
108
+ `No filter component found for column "${o.filterKey}" with type "${o.type}". Provide a custom filter component or use supported types: "string", "number", "boolean", "checkbox".`
109
109
  ), null);
110
110
  };
111
111
  export {
112
- re as TableFilterColumnButton
112
+ le as TableFilterColumnButton
113
113
  };
@@ -127,11 +127,11 @@
127
127
  --alpha-two-900: rgba(255, 255, 255, 0.9);
128
128
 
129
129
  --shadow-custom:
130
- 0px 2px 4px 0px var(--color-alpha-one-50), 0px 0px 0px 0.5px var(--color-neutral-150);
130
+ 0px 2px 4px 0px var(--color-alpha-one-50), 0px 0px 0px 1px var(--color-neutral-150);
131
131
  --shadow-default:
132
- 0px 1px 2px 0px var(--color-alpha-one-50), 0px 0px 0px 0.5px var(--color-neutral-150);
132
+ 0px 1px 2px 0px var(--color-alpha-one-50), 0px 0px 0px 1px var(--color-neutral-150);
133
133
 
134
- --shadow-button-disabled: 0px 0px 0px 0.5px var(--neutral-100), 0px 1px 2px 0px transparent;
134
+ --shadow-button-disabled: 0px 0px 0px 1px var(--neutral-100), 0px 1px 2px 0px transparent;
135
135
  }
136
136
 
137
137
  .dark {
@@ -259,11 +259,11 @@
259
259
  --alpha-two-900: rgba(0, 0, 0, 0.9);
260
260
 
261
261
  --shadow-custom:
262
- 0px 2px 4px 0px var(--color-alpha-one-50), 0px 0px 0px 0.5px var(--color-neutral-150);
262
+ 0px 2px 4px 0px var(--color-alpha-one-50), 0px 0px 0px 1px var(--color-neutral-150);
263
263
  --shadow-default:
264
- 0px 1px 2px 0px var(--color-alpha-one-50), 0px 0px 0px 0.5px var(--color-neutral-150);
264
+ 0px 1px 2px 0px var(--color-alpha-one-50), 0px 0px 0px 1px var(--color-neutral-150);
265
265
 
266
- --shadow-button-disabled: 0px 0px 0px 0.5px var(--neutral-100), 0px 1px 2px 0px transparent;
266
+ --shadow-button-disabled: 0px 0px 0px 1px var(--neutral-100), 0px 1px 2px 0px transparent;
267
267
  }
268
268
 
269
269
  /* Tailwind v4 Theme Integration */
@@ -21,8 +21,9 @@
21
21
  font-family: inherit;
22
22
  }
23
23
  }
24
- @import './config-deprecated.css';
24
+ /*@import './config-deprecated.css';*/
25
25
  /* @import './colors/defaults.css'; */
26
+
26
27
  @import './colors/semantic/index.css';
27
28
  @import './typography/index.css';
28
29
  @import './shadows.css';
@@ -1,5 +1,5 @@
1
1
  :root {
2
- --stroke-default: 0.5px;
2
+ --stroke-default: 1px;
3
3
  --stroke-thick: 2px;
4
4
  }
5
5