@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
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const numberBadgeVariants: (props?: ({
4
+ textColor?: "danger" | "neutral" | "brand" | null | undefined;
5
+ } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
6
+ export interface NumberBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof numberBadgeVariants> {
7
+ number: number;
8
+ }
9
+ declare const NumberBadge: React.ForwardRefExoticComponent<NumberBadgeProps & React.RefAttributes<HTMLSpanElement>>;
10
+ export { NumberBadge, numberBadgeVariants };
@@ -0,0 +1,27 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import { cva as d } from "class-variance-authority";
4
+ import { cn as o } from "../../lib/utils.js";
5
+ const i = d("inline-flex items-center leading-none-medium-sm", {
6
+ variants: {
7
+ textColor: {
8
+ neutral: "text-text-neutral-primary",
9
+ brand: "text-text-brand-secondary",
10
+ danger: "text-text-danger-secondary"
11
+ }
12
+ },
13
+ defaultVariants: {
14
+ textColor: "neutral"
15
+ }
16
+ }), x = m.forwardRef(
17
+ ({ className: t, textColor: r = "neutral", number: a, ...n }, s) => /* @__PURE__ */ l("span", { className: o(i({ textColor: r }), t), ref: s, ...n, children: [
18
+ /* @__PURE__ */ e("span", { className: "text-text-neutral-muted pr-[1px]", children: "[" }),
19
+ /* @__PURE__ */ e("span", { children: a }),
20
+ /* @__PURE__ */ e("span", { className: "text-text-neutral-muted pl-[1px]", children: "]" })
21
+ ] })
22
+ );
23
+ x.displayName = "NumberBadge";
24
+ export {
25
+ x as NumberBadge,
26
+ i as numberBadgeVariants
27
+ };
@@ -164,7 +164,7 @@ const Dt = ({
164
164
  r.Footer,
165
165
  {
166
166
  className: d(
167
- "flex-shrink-0 border-stroke-solid-light border-t-[0.5px] mt-[-2px]",
167
+ "flex-shrink-0 border-stroke-solid-light border-t-[1px] mt-[-2px]",
168
168
  n && "border",
169
169
  c && "rounded-b-xl",
170
170
  T
@@ -1,12 +1,12 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import * as r from "@radix-ui/react-tabs";
3
- import { cn as s } from "../../lib/utils.js";
4
- function o({ className: a, ...t }) {
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import * as s from "@radix-ui/react-tabs";
3
+ import { cn as r } from "../../lib/utils.js";
4
+ function m({ className: a, ...t }) {
5
5
  return /* @__PURE__ */ e(
6
- r.Root,
6
+ s.Root,
7
7
  {
8
8
  "data-slot": "tabs",
9
- className: s(a),
9
+ className: r(a),
10
10
  orientation: "horizontal",
11
11
  ...t
12
12
  }
@@ -14,67 +14,97 @@ function o({ className: a, ...t }) {
14
14
  }
15
15
  function c({ className: a, ...t }) {
16
16
  return /* @__PURE__ */ e(
17
- r.List,
17
+ s.List,
18
18
  {
19
19
  "data-slot": "tabs-list",
20
- className: s(
20
+ className: r(
21
21
  "inline-flex items-center bg-transparent relative",
22
22
  "w-full h-11",
23
23
  "max-lg:w-full max-lg:max-w-[full] max-lg:overflow-x-auto max-lg:overflow-y-hidden",
24
24
  "max-sm:w-full max-sm:px-2",
25
- // 'after:absolute after:bottom-0 after:left-0 after:w-full after:h-0.5 after:bg-neutral-150',
26
25
  a
27
26
  ),
28
27
  ...t
29
28
  }
30
29
  );
31
30
  }
32
- function p({
31
+ function f({
33
32
  className: a,
34
33
  icon: t,
35
- label: i,
36
- ...n
34
+ label: n,
35
+ ...i
37
36
  }) {
38
- return /* @__PURE__ */ l(
39
- r.Trigger,
37
+ return /* @__PURE__ */ o(
38
+ s.Trigger,
40
39
  {
41
40
  "data-slot": "tabs-trigger",
42
- className: s(
41
+ className: r(
42
+ // Base positioning and layout
43
43
  "flex h-11 p-2.5 justify-center items-center gap-1 relative cursor-pointer",
44
44
  "max-lg:min-w-fit max-lg:flex-shrink-0",
45
45
  "max-sm:px-1.5 max-sm:py-2 max-sm:gap-0.5",
46
46
  "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
47
47
  "group",
48
+ // Underline pseudo-element using Tailwind's after: utilities
49
+ 'after:content-[""] after:absolute after:left-1/2 after:bottom-0 after:-translate-x-1/2',
50
+ "after:w-[calc(100%-24px)] after:border-b after:border-stroke-solid-attention",
51
+ "after:opacity-0 after:transition-opacity after:duration-200 after:ease-linear after:z-10",
52
+ // Active state - show underline
53
+ "data-[state=active]:after:opacity-100",
48
54
  a
49
55
  ),
50
- ...n,
56
+ ...i,
51
57
  children: [
52
- t && /* @__PURE__ */ e("div", { className: "w-[14px] h-[14px] flex-shrink-0 flex items-center justify-center tab-icon", children: /* @__PURE__ */ e("div", { className: "w-[14px] h-[14px] [&>*]:!w-[14px] [&>*]:!h-[14px]", children: t }) }),
53
- i && /* @__PURE__ */ e("div", { className: "flex px-0.5 justify-center items-center gap-1.5 max-sm:px-0.25 max-sm:gap-1", children: /* @__PURE__ */ e(
58
+ t && /* @__PURE__ */ e(
59
+ "div",
60
+ {
61
+ className: r(
62
+ "w-[14px] h-[14px] flex-shrink-0 flex items-center justify-center transition-colors duration-200",
63
+ // Icon colors based on state
64
+ "text-text-neutral-secondary",
65
+ // Default inactive color
66
+ "group-data-[state=active]:text-text-neutral-primary",
67
+ // Active color
68
+ "group-hover:text-text-neutral-primary",
69
+ // Hover color
70
+ // Force icon size
71
+ "[&>*]:!w-[14px] [&>*]:!h-[14px]"
72
+ ),
73
+ children: t
74
+ }
75
+ ),
76
+ n && /* @__PURE__ */ e("div", { className: "flex px-0.5 justify-center items-center gap-1.5 max-sm:px-0.25 max-sm:gap-1", children: /* @__PURE__ */ e(
54
77
  "div",
55
78
  {
56
- className: s(
57
- "text-center font-[450] transition-colors duration-200 tab-label",
79
+ className: r(
80
+ "text-center font-[450] transition-colors duration-200",
58
81
  "text-sm leading-none tracking-[-0.2px]",
59
82
  "max-lg:text-[13px]",
60
- "max-sm:text-xs"
83
+ "max-sm:text-xs",
84
+ // Label colors based on state
85
+ "text-text-neutral-secondary",
86
+ // Default inactive color
87
+ "group-data-[state=active]:text-text-neutral-primary",
88
+ // Active color
89
+ "group-hover:text-text-neutral-primary"
90
+ // Hover color
61
91
  ),
62
- children: i
92
+ children: n
63
93
  }
64
94
  ) })
65
95
  ]
66
96
  }
67
97
  );
68
98
  }
69
- function d({
99
+ function p({
70
100
  className: a,
71
101
  ...t
72
102
  }) {
73
- return /* @__PURE__ */ e(r.Content, { "data-slot": "tabs-content", className: s(a), ...t });
103
+ return /* @__PURE__ */ e(s.Content, { "data-slot": "tabs-content", className: r(a), ...t });
74
104
  }
75
105
  export {
76
- o as Z2Tabs,
77
- d as Z2TabsContent,
106
+ m as Z2Tabs,
107
+ p as Z2TabsContent,
78
108
  c as Z2TabsList,
79
- p as Z2TabsTrigger
109
+ f as Z2TabsTrigger
80
110
  };
@@ -66,7 +66,7 @@ const ft = ({
66
66
  "div",
67
67
  {
68
68
  className: r(
69
- "flex flex-col gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
69
+ "flex flex-col gap-2.5 items-center h-full min-w-full leading-none-medium-sm p-3",
70
70
  s
71
71
  ),
72
72
  children: [
@@ -1,10 +1,10 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { cn as l } from "../../../../lib/utils.js";
3
- const i = ({ value: e, className: t }) => /* @__PURE__ */ r(
3
+ const o = ({ value: e, className: t }) => /* @__PURE__ */ r(
4
4
  "div",
5
5
  {
6
6
  className: l(
7
- "text-text-neutral-secondary p-3 w-full h-full items-center flex hover:bg-background-neutral-light",
7
+ "text-text-neutral-secondary p-3 w-full h-full items-center flex",
8
8
  "leading-[24px] text-[14px]",
9
9
  t
10
10
  ),
@@ -12,5 +12,5 @@ const i = ({ value: e, className: t }) => /* @__PURE__ */ r(
12
12
  }
13
13
  );
14
14
  export {
15
- i as DescriptionCell
15
+ o as DescriptionCell
16
16
  };
@@ -2,19 +2,19 @@ import { jsxs as e, jsx as l } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as a } from "../../../../lib/utils.js";
4
4
  const u = ({
5
- value: i,
5
+ value: r,
6
6
  leftIcon: n,
7
- rightIcon: t,
7
+ rightIcon: m,
8
8
  className: c,
9
- helperText: m,
9
+ helperText: t,
10
10
  description: s
11
11
  }) => {
12
- const r = "min-h-max min-w-max";
12
+ const i = "min-h-max min-w-max";
13
13
  return /* @__PURE__ */ e(
14
14
  "div",
15
15
  {
16
16
  className: a(
17
- "flex flex-row gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
17
+ "flex flex-row gap-2.5 items-center h-full min-w-full leading-none-medium-sm p-3",
18
18
  s && "flex-col",
19
19
  c
20
20
  ),
@@ -27,12 +27,12 @@ const u = ({
27
27
  ),
28
28
  children: [
29
29
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2.5 h-full", children: [
30
- n && /* @__PURE__ */ l("span", { className: a(r), children: n }),
31
- i
30
+ n && /* @__PURE__ */ l("span", { className: a(i), children: n }),
31
+ r
32
32
  ] }),
33
33
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2.5", children: [
34
- m && /* @__PURE__ */ l("span", { className: "text-text-neutral-secondary", children: m }),
35
- t && /* @__PURE__ */ l("span", { className: a(r), children: t })
34
+ t && /* @__PURE__ */ l("span", { className: "text-text-neutral-secondary", children: t }),
35
+ m && /* @__PURE__ */ l("span", { className: a(i), children: m })
36
36
  ] })
37
37
  ]
38
38
  }
@@ -1,36 +1,36 @@
1
- import { jsxs as s, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as m } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as e } from "../../../../lib/utils.js";
4
- const x = ({
5
- value: i,
6
- href: m,
4
+ const d = ({
5
+ value: a,
6
+ href: i,
7
7
  target: t = "_self",
8
8
  leftIcon: n,
9
- rightIcon: r,
10
- className: o,
11
- LinkComponent: c = "a"
9
+ rightIcon: s,
10
+ className: c,
11
+ LinkComponent: o = "a"
12
12
  }) => {
13
13
  const l = "min-h-max min-w-max";
14
- return /* @__PURE__ */ s(
15
- c,
14
+ return /* @__PURE__ */ r(
15
+ o,
16
16
  {
17
- href: m,
17
+ href: i,
18
18
  target: t,
19
19
  rel: "noopener noreferrer",
20
20
  className: e(
21
- "text-text-brand-secondary p-3 leading-none-medium-sm flex flex-row justify-between hover:bg-background-neutral-light gap-2.5 min-w-full min-h-full items-center",
22
- o
21
+ "text-text-brand-secondary p-3 leading-none-medium-sm flex flex-row justify-between gap-2.5 min-w-full min-h-full items-center",
22
+ c
23
23
  ),
24
24
  children: [
25
- /* @__PURE__ */ s("div", { className: "flex items-center gap-2.5 h-full", children: [
26
- n && /* @__PURE__ */ a("span", { className: e(l), children: n }),
27
- i
25
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2.5 h-full", children: [
26
+ n && /* @__PURE__ */ m("span", { className: e(l), children: n }),
27
+ a
28
28
  ] }),
29
- r && /* @__PURE__ */ a("span", { className: e(l), children: r })
29
+ s && /* @__PURE__ */ m("span", { className: e(l), children: s })
30
30
  ]
31
31
  }
32
32
  );
33
33
  };
34
34
  export {
35
- x as LinkCell
35
+ d as LinkCell
36
36
  };
@@ -1,35 +1,35 @@
1
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import "react";
3
- import { cn as l } from "../../../../lib/utils.js";
4
- const u = ({
5
- value: r,
6
- leftIcon: s,
3
+ import { cn as s } from "../../../../lib/utils.js";
4
+ const x = ({
5
+ value: t,
6
+ leftIcon: a,
7
7
  rightIcon: n,
8
- className: t,
8
+ className: r,
9
9
  helperText: i
10
10
  }) => {
11
11
  const m = "min-h-max min-w-max";
12
12
  return /* @__PURE__ */ e(
13
13
  "div",
14
14
  {
15
- className: l(
16
- "flex gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
17
- t
15
+ className: s(
16
+ "flex gap-2.5 items-center h-full min-w-full leading-none-medium-sm p-3",
17
+ r
18
18
  ),
19
- children: /* @__PURE__ */ a(
19
+ children: /* @__PURE__ */ l(
20
20
  "div",
21
21
  {
22
- className: l(
22
+ className: s(
23
23
  "text-text-neutral-primary flex justify-between gap-2.5 min-w-full items-center"
24
24
  ),
25
25
  children: [
26
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2.5 h-full", children: [
27
- s && /* @__PURE__ */ e("span", { className: l(m), children: s }),
26
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2.5 h-full", children: [
27
+ a && /* @__PURE__ */ e("span", { className: s(m), children: a }),
28
28
  i && /* @__PURE__ */ e("span", { className: "text-text-neutral-secondary", children: i })
29
29
  ] }),
30
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2.5", children: [
31
- r,
32
- n && /* @__PURE__ */ e("span", { className: l(m), children: n })
30
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2.5", children: [
31
+ t,
32
+ n && /* @__PURE__ */ e("span", { className: s(m), children: n })
33
33
  ] })
34
34
  ]
35
35
  }
@@ -38,5 +38,5 @@ const u = ({
38
38
  );
39
39
  };
40
40
  export {
41
- u as NumberCell
41
+ x as NumberCell
42
42
  };
@@ -24,7 +24,7 @@ export declare const TABLE_CSS_CLASSES: {
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";
27
- readonly row: " transition-colors duration-200 text-text-neutral-primary";
27
+ readonly row: " transition-colors duration-200 text-text-neutral-primary hover:bg-background-neutral-light";
28
28
  readonly emptyState: "px-4 py-8 text-center text-gray-500";
29
29
  readonly dataErrorState: "px-4 py-8 text-center text-text-danger-primary";
30
30
  readonly loading: "px-4 py-8 text-center text-gray-500";
@@ -23,7 +23,7 @@ const t = "No data available", e = {
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",
26
- row: " transition-colors duration-200 text-text-neutral-primary",
26
+ row: " transition-colors duration-200 text-text-neutral-primary hover:bg-background-neutral-light",
27
27
  emptyState: "px-4 py-8 text-center text-gray-500",
28
28
  dataErrorState: "px-4 py-8 text-center text-text-danger-primary",
29
29
  loading: "px-4 py-8 text-center text-gray-500"
@@ -1,6 +1,6 @@
1
- import { jsxs as r, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
2
  import * as b from "react";
3
- import * as f from "@radix-ui/react-popover";
3
+ import * as p from "@radix-ui/react-popover";
4
4
  import { Button as y } from "../button/button.js";
5
5
  import { useTableFilterContext as q } from "./table-filter.context.js";
6
6
  import E from "./filters/text.js";
@@ -11,33 +11,34 @@ import Q from "../assets/icons/circle-check-filled.js";
11
11
  import { SelectedFiltersDisplay as W } from "./selected-filters-display/selected-filters-display.js";
12
12
  import { FilterConfirmationDialog as X } from "./close-filter-confirm/filter-confirmation-dialog.js";
13
13
  import { hasUnsavedFilterChanges as S } from "./close-filter-confirm/filter-confirmation-dialog.utils.js";
14
- const ie = () => {
15
- var k, A;
16
- const [K, i] = b.useState(!1), n = b.useRef(null), [C, c] = b.useState(!1), {
14
+ import { NumberBadge as Y } from "../number-badge/number-badge.js";
15
+ const de = () => {
16
+ var w, A;
17
+ const [K, c] = b.useState(!1), n = b.useRef(null), [C, d] = b.useState(!1), {
17
18
  selectedColumn: a,
18
19
  setSelectedColumn: O,
19
20
  getFilterForColumn: P,
20
21
  hasFilterForColumn: T,
21
22
  updateColumnFilter: D,
22
23
  clearAllFilters: R,
23
- resetToAppliedFilters: $,
24
- applyFilters: z,
25
- hasActiveFilters: h,
24
+ resetToAppliedFilters: B,
25
+ applyFilters: $,
26
+ hasActiveFilters: f,
26
27
  tempFilters: u,
27
- filterSchema: d,
28
- filter: m,
28
+ filterSchema: m,
29
+ filter: h,
29
30
  filterComponents: x = {}
30
- } = q(), B = (e) => {
31
- !e && C ? S(u, m.value) ? i(!0) : c(!1) : c(e);
31
+ } = q(), z = (e) => {
32
+ !e && C ? S(u, h.value) ? c(!0) : d(!1) : d(e);
32
33
  }, N = () => {
33
- z(), i(!1), c(!1);
34
+ $(), c(!1), d(!1);
34
35
  }, L = () => {
35
- $(), i(!1), c(!1);
36
+ B(), c(!1), d(!1);
36
37
  }, I = () => {
37
- i(!1);
38
- }, F = S(u, m.value), l = P(a || ""), V = () => {
38
+ c(!1);
39
+ }, F = S(u, h.value), r = P(a || ""), V = () => {
39
40
  if (!a) return null;
40
- const e = d.find((o) => o.filterKey === a), s = {
41
+ const e = m.find((o) => o.filterKey === a), s = {
41
42
  boolean: G,
42
43
  string: E,
43
44
  number: J,
@@ -48,8 +49,8 @@ const ie = () => {
48
49
  `No filter component found for column "${e == null ? void 0 : e.filterKey}" with type "${e == null ? void 0 : e.type}". Provide a custom filter component or use supported types: "string", "number", "boolean", "checkbox".`
49
50
  ), null;
50
51
  const U = {
51
- condition: (l == null ? void 0 : l.condition) || "",
52
- value: (l == null ? void 0 : l.value) || ""
52
+ condition: (r == null ? void 0 : r.condition) || "",
53
+ value: (r == null ? void 0 : r.value) || ""
53
54
  };
54
55
  return /* @__PURE__ */ t("div", { className: "flex-1 h-full", children: /* @__PURE__ */ t("div", { className: "mb-4 h-full", children: /* @__PURE__ */ t(
55
56
  j,
@@ -64,50 +65,50 @@ const ie = () => {
64
65
  },
65
66
  a
66
67
  ) }) });
67
- }, H = m.loading || !1;
68
- l && (Array.isArray(l.value) && l.value.length > 0 || (l == null ? void 0 : l.value) !== "") && (n.current = l);
69
- const g = d.find(
68
+ }, H = h.loading || !1;
69
+ r && (Array.isArray(r.value) && r.value.length > 0 || (r == null ? void 0 : r.value) !== "") && (n.current = r);
70
+ const g = m.find(
70
71
  (e) => {
71
72
  var s;
72
73
  return e.filterKey == ((s = n.current) == null ? void 0 : s.field);
73
74
  }
74
- ), w = Array.isArray((k = n.current) == null ? void 0 : k.value) ? (A = n.current) == null ? void 0 : A.value.map(
75
+ ), k = Array.isArray((w = n.current) == null ? void 0 : w.value) ? (A = n.current) == null ? void 0 : A.value.map(
75
76
  (e) => {
76
77
  var s;
77
78
  return ((s = g == null ? void 0 : g.options) == null ? void 0 : s[e]) || 1;
78
79
  }
79
- ) : [], p = w.reduce((e, s) => e + s, 0);
80
- return /* @__PURE__ */ r(f.Root, { open: C, onOpenChange: B, children: [
81
- /* @__PURE__ */ t(f.Trigger, { asChild: !0, children: /* @__PURE__ */ r(
80
+ ) : [], i = k.reduce((e, s) => e + s, 0);
81
+ return /* @__PURE__ */ l(p.Root, { open: C, onOpenChange: z, children: [
82
+ /* @__PURE__ */ t(p.Trigger, { asChild: !0, children: /* @__PURE__ */ l(
82
83
  y,
83
84
  {
84
- variant: h ? "filled" : "stroke",
85
- shade: h ? "brand" : "neutral",
85
+ variant: f ? "colored-stroke" : "stroke",
86
+ shade: f ? "brand" : "neutral",
86
87
  size: "small",
87
88
  children: [
88
89
  "Filters ",
89
- h && `(${m.value.length})`
90
+ f && /* @__PURE__ */ t(Y, { number: i, textColor: "brand" })
90
91
  ]
91
92
  }
92
93
  ) }),
93
- /* @__PURE__ */ t(f.Portal, { children: /* @__PURE__ */ r(
94
- f.Content,
94
+ /* @__PURE__ */ t(p.Portal, { children: /* @__PURE__ */ l(
95
+ p.Content,
95
96
  {
96
97
  className: "w-[512px] bg-surface-neutral-default border border-stroke-solid-light rounded-2xl overflow-hidden shadow-lg",
97
98
  sideOffset: 8,
98
99
  align: "start",
99
100
  children: [
100
- /* @__PURE__ */ r("div", { className: "flex h-[422px]", style: { maxHeight: "calc(100vh - 8rem)" }, children: [
101
- /* @__PURE__ */ r("div", { className: "w-48 border-r border-stroke-solid-light p-2 flex flex-col gap-1.5 overflow-y-auto", children: [
101
+ /* @__PURE__ */ l("div", { className: "flex h-[422px]", style: { maxHeight: "calc(100vh - 8rem)" }, children: [
102
+ /* @__PURE__ */ l("div", { className: "w-48 border-r border-stroke-solid-light p-2 flex flex-col gap-1.5 overflow-y-auto", children: [
102
103
  /* @__PURE__ */ t("div", { className: "p-2 pb-1", children: /* @__PURE__ */ t("h3", { className: "leading-none-medium-sm text-text-neutral-secondary", children: "Filters" }) }),
103
- d.map((e) => /* @__PURE__ */ r(
104
+ m.map((e) => /* @__PURE__ */ l(
104
105
  "button",
105
106
  {
106
107
  onClick: () => O(e.filterKey),
107
108
  className: `w-full text-left p-2 text-sm flex items-center justify-between hover:bg-surface-neutral-hover transition-colors rounded-lg ${a === e.filterKey ? "bg-surface-neutral-focused text-text-brand-primary" : "text-text-neutral-primary"}`,
108
109
  children: [
109
- /* @__PURE__ */ r("span", { className: "flex items-center gap-1", children: [
110
- e.helperText && /* @__PURE__ */ r("span", { className: "leading-normal-regular-xs text-neutral-muted", children: [
110
+ /* @__PURE__ */ l("span", { className: "flex items-center gap-1", children: [
111
+ e.helperText && /* @__PURE__ */ l("span", { className: "leading-normal-regular-xs text-neutral-muted", children: [
111
112
  e.helperText,
112
113
  ": "
113
114
  ] }),
@@ -119,24 +120,24 @@ const ie = () => {
119
120
  e.filterKey
120
121
  ))
121
122
  ] }),
122
- /* @__PURE__ */ r("div", { className: "flex-1 flex flex-col relative", children: [
123
+ /* @__PURE__ */ l("div", { className: "flex-1 flex flex-col relative", children: [
123
124
  a ? V() : /* @__PURE__ */ t("div", { className: "flex-1 flex items-center justify-center text-text-neutral-muted", children: "Select a column to configure its filter" }),
124
- H && /* @__PURE__ */ t("div", { className: "flex items-center justify-center p-8 absolute top-0 left-0 right-0 bottom-0 bg-background-neutral-default/80", children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-3", children: [
125
+ H && /* @__PURE__ */ t("div", { className: "flex items-center justify-center p-8 absolute top-0 left-0 right-0 bottom-0 bg-background-neutral-default/80", children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-3", children: [
125
126
  /* @__PURE__ */ t("div", { className: "w-8 h-8 border-2 border-stroke-solid-medium border-t-transparent rounded-full animate-spin" }),
126
127
  /* @__PURE__ */ t("span", { className: "text-text-body-primary text-sm", children: "Loading options..." })
127
128
  ] }) })
128
129
  ] })
129
130
  ] }),
130
- (!!p || F) && /* @__PURE__ */ r("div", { className: "flex justify-between items-end p-4 border-t border-stroke-solid-medium min-h-[73px]", children: [
131
- w.length > 0 ? /* @__PURE__ */ t(
131
+ (!!i || F) && /* @__PURE__ */ l("div", { className: "flex justify-between items-end p-4 border-t border-stroke-solid-medium min-h-[73px]", children: [
132
+ k.length > 0 ? /* @__PURE__ */ t(
132
133
  W,
133
134
  {
134
135
  tempFilters: u,
135
- filterSchema: d,
136
- totalCount: p
136
+ filterSchema: m,
137
+ totalCount: i
137
138
  }
138
139
  ) : /* @__PURE__ */ t("div", { className: "w-full" }),
139
- /* @__PURE__ */ r("div", { className: "flex justify-end gap-2", children: [
140
+ /* @__PURE__ */ l("div", { className: "flex justify-end gap-2", children: [
140
141
  /* @__PURE__ */ t(
141
142
  y,
142
143
  {
@@ -158,7 +159,7 @@ const ie = () => {
158
159
  size: "small",
159
160
  className: "min-w-20",
160
161
  disabled: !F,
161
- children: `Apply ${p ? p.toLocaleString() : ""}`
162
+ children: `Apply ${i ? i.toLocaleString() : ""}`
162
163
  }
163
164
  )
164
165
  ] })
@@ -177,5 +178,5 @@ const ie = () => {
177
178
  ] });
178
179
  };
179
180
  export {
180
- ie as TableFilterButton
181
+ de as TableFilterButton
181
182
  };