@ztwoint/z-ui 0.1.67 → 0.1.69

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.
@@ -1,29 +1,47 @@
1
1
  import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
- import { useState as i, useEffect as h } from "react";
3
- import { MagnifierIcon as y } from "../../assets/icons/magnifier-icon.js";
4
- import C from "../../assets/icons/x.js";
5
- const k = ["includesAny", "includesAll", "excludes"], j = ({ value: r, onChange: d, filterOptions: c = [] }) => {
6
- const [n, o] = i([]), [u, m] = i(""), [x, f] = i(c), p = (e) => {
7
- m(e.target.value);
8
- const a = c.filter(
9
- (l) => l.label.toLowerCase().includes(e.target.value.toLowerCase())
2
+ import { useState as i, useEffect as f } from "react";
3
+ import { Virtuoso as y } from "react-virtuoso";
4
+ import { MagnifierIcon as k } from "../../assets/icons/magnifier-icon.js";
5
+ import S from "../../assets/icons/x.js";
6
+ const w = ["includesAny", "includesAll", "excludes"], B = ({ value: r, onChange: d, filterOptions: n = [] }) => {
7
+ const [c, o] = i([]), [u, m] = i(""), [x, h] = i(n), p = (l) => {
8
+ m(l.target.value);
9
+ const e = n.filter(
10
+ (a) => a.label.toLowerCase().includes(l.target.value.toLowerCase())
10
11
  );
11
- f(a);
12
+ h(e);
12
13
  };
13
- h(() => {
14
- r.condition || d({ condition: k[0] });
15
- }, []), h(() => {
14
+ f(() => {
15
+ r.condition || d({ condition: w[0] });
16
+ }, []), f(() => {
16
17
  Array.isArray(r.value) ? o(r.value.filter(Boolean)) : o([]);
17
18
  }, [r.value]);
18
- const v = (e, a) => {
19
- let l;
20
- a ? l = [...n, e] : l = n.filter((g) => g !== e), o(l), d({ value: l });
21
- }, b = () => {
22
- m(""), f(c);
23
- }, N = (e) => n.includes(e);
24
- return c.length === 0 ? /* @__PURE__ */ t("div", { className: "text-text-neutral-muted text-sm", children: "No filter options available for this column" }) : /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
19
+ const b = (l, e) => {
20
+ let a;
21
+ e ? a = [...c, l] : a = c.filter((C) => C !== l), o(a), d({ value: a });
22
+ }, v = () => {
23
+ m(""), h(n);
24
+ }, g = (l) => c.includes(l), N = (l, e) => /* @__PURE__ */ s("div", { className: "flex justify-between items-center py-2 px-3", children: [
25
+ /* @__PURE__ */ s("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
26
+ /* @__PURE__ */ t(
27
+ "input",
28
+ {
29
+ type: "checkbox",
30
+ checked: g(e.value),
31
+ onChange: (a) => b(e.value, a.target.checked)
32
+ }
33
+ ),
34
+ /* @__PURE__ */ t("span", { className: "text-text-neutral-primary leading-none-medium-sm", children: e.label })
35
+ ] }),
36
+ e.total && /* @__PURE__ */ s("span", { className: "text-text-neutral-muted text-sm", children: [
37
+ "[",
38
+ e.total,
39
+ "]"
40
+ ] })
41
+ ] });
42
+ return n.length === 0 ? /* @__PURE__ */ t("div", { className: "text-text-neutral-muted text-sm p-4", children: "No filter options available for this column" }) : /* @__PURE__ */ s("div", { className: "flex flex-col h-full", children: [
25
43
  /* @__PURE__ */ s("div", { className: "relative border-b border-stroke-solid-medium", children: [
26
- /* @__PURE__ */ t(y, { className: "absolute left-3 top-3.5 text-text-neutral-muted" }),
44
+ /* @__PURE__ */ t(k, { className: "absolute left-3 top-3.5 text-text-neutral-muted" }),
27
45
  /* @__PURE__ */ t(
28
46
  "input",
29
47
  {
@@ -33,28 +51,20 @@ const k = ["includesAny", "includesAll", "excludes"], j = ({ value: r, onChange:
33
51
  className: "border-none outline-none bg-surface-neutral-default text-text-neutral-primary rounded p-3 pl-8 leading-none-medium-sm w-full"
34
52
  }
35
53
  ),
36
- u && /* @__PURE__ */ t("span", { className: "absolute right-3 top-3.5", onClick: b, children: /* @__PURE__ */ t(C, {}) })
54
+ u && /* @__PURE__ */ t("span", { className: "absolute right-3 top-3.5", onClick: v, children: /* @__PURE__ */ t(S, {}) })
37
55
  ] }),
38
- /* @__PURE__ */ t("div", { className: "flex flex-col p-3", children: /* @__PURE__ */ t("div", { className: "space-y-5 h-full overflow-y-auto", children: x.map((e) => /* @__PURE__ */ s("div", { className: "flex justify-between items-center", children: [
39
- /* @__PURE__ */ s("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
40
- /* @__PURE__ */ t(
41
- "input",
42
- {
43
- type: "checkbox",
44
- checked: N(e.value),
45
- onChange: (a) => v(e.value, a.target.checked)
46
- }
47
- ),
48
- /* @__PURE__ */ t("span", { className: "text-text-neutral-primary leading-none-medium-sm", children: e.label })
49
- ] }),
50
- e.total && /* @__PURE__ */ s("span", { className: "text-text-neutral-muted text-sm", children: [
51
- "[",
52
- e.total,
53
- "]"
54
- ] })
55
- ] }, e.value)) }) })
56
+ /* @__PURE__ */ t("div", { className: "flex-1", children: /* @__PURE__ */ t(
57
+ y,
58
+ {
59
+ data: x,
60
+ itemContent: N,
61
+ className: "h-full",
62
+ style: { height: "100%" },
63
+ overscan: 5
64
+ }
65
+ ) })
56
66
  ] });
57
67
  };
58
68
  export {
59
- j as default
69
+ B as default
60
70
  };
@@ -1,81 +1,76 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import * as u from "react";
3
- import { Button as x } from "../button/button.js";
2
+ import * as y from "react";
3
+ import * as m from "@radix-ui/react-popover";
4
+ import { Button as u } from "../button/button.js";
4
5
  import { useTableFilterContext as I } from "./table-filter.context.js";
5
- import P from "./filters/text.js";
6
- import U from "./filters/boolean.js";
7
- import V from "./filters/number/number.js";
8
- import q from "./filters/checkbox.js";
9
- import E from "../assets/icons/circle-check-filled.js";
10
- import { SelectedFiltersDisplay as G } from "./selected-filters-display/selected-filters-display.js";
11
- import { useClickOutside as H } from "../../hooks/useClickOutside.js";
6
+ import U from "./filters/text.js";
7
+ import V from "./filters/boolean.js";
8
+ import q from "./filters/number/number.js";
9
+ import E from "./filters/checkbox.js";
10
+ import G from "../assets/icons/circle-check-filled.js";
11
+ import { SelectedFiltersDisplay as H } from "./selected-filters-display/selected-filters-display.js";
12
12
  import { createFilterDisplayItems as J, calculateTotalCount as L } from "./selected-filters-display/selected-filters-display.utils.js";
13
13
  import { FilterConfirmationDialog as M } from "./close-filter-confirm/filter-confirmation-dialog.js";
14
- import { hasUnsavedFilterChanges as C } from "./close-filter-confirm/filter-confirmation-dialog.utils.js";
14
+ import { hasUnsavedFilterChanges as F } from "./close-filter-confirm/filter-confirmation-dialog.utils.js";
15
15
  const ne = () => {
16
- const [m, a] = u.useState(!1), [F, n] = u.useState(!1), g = u.useRef(null), {
16
+ const [N, a] = y.useState(!1), [x, n] = y.useState(!1), {
17
17
  selectedColumn: r,
18
- setSelectedColumn: N,
19
- getFilterForColumn: k,
20
- hasFilterForColumn: w,
21
- updateColumnFilter: K,
22
- clearAllFilters: j,
23
- resetToAppliedFilters: A,
24
- applyFilters: D,
18
+ setSelectedColumn: k,
19
+ getFilterForColumn: w,
20
+ hasFilterForColumn: K,
21
+ updateColumnFilter: j,
22
+ clearAllFilters: A,
23
+ resetToAppliedFilters: D,
24
+ applyFilters: O,
25
25
  hasActiveFilters: d,
26
26
  tempFilters: i,
27
27
  filterSchema: c,
28
28
  filter: p,
29
- filterComponents: f = {}
30
- } = I();
31
- H(g, () => {
32
- C(i, p.value) && m ? n(!0) : a(!1);
33
- });
34
- const v = () => {
35
- D(), a(!1);
29
+ filterComponents: h = {}
30
+ } = I(), P = (e) => {
31
+ !e && x ? F(i, p.value) ? a(!0) : n(!1) : n(e);
32
+ }, g = () => {
33
+ O(), n(!1);
36
34
  }, S = () => {
37
- n(!1), a(!1);
38
- }, O = () => {
39
- A(), n(!1), a(!1);
40
- }, R = () => {
41
- n(!1);
42
- }, T = J(i, c), b = L(T), $ = () => {
35
+ a(!1), n(!1);
36
+ }, T = () => {
37
+ D(), a(!1), n(!1);
38
+ }, $ = () => {
39
+ a(!1);
40
+ }, z = J(i, c), v = L(z), R = () => {
43
41
  if (!r) return null;
44
- const e = c.find((o) => o.filterKey === r), z = {
45
- boolean: U,
46
- string: P,
47
- number: V,
48
- checkbox: q
49
- }, y = (e == null ? void 0 : e.type) && (f == null ? void 0 : f[e.type]) || z[(e == null ? void 0 : e.type) ?? "string"];
50
- if (!y)
42
+ const e = c.find((o) => o.filterKey === r), b = {
43
+ boolean: V,
44
+ string: U,
45
+ number: q,
46
+ checkbox: E
47
+ }, C = (e == null ? void 0 : e.type) && (h == null ? void 0 : h[e.type]) || b[(e == null ? void 0 : e.type) ?? "string"];
48
+ if (!C)
51
49
  return console.warn(
52
50
  `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".`
53
51
  ), null;
54
- const s = k(r), B = {
52
+ const s = w(r), B = {
55
53
  condition: (s == null ? void 0 : s.condition) || "",
56
54
  value: (s == null ? void 0 : s.value) || ""
57
55
  };
58
- return /* @__PURE__ */ t("div", { className: "flex-1", children: /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t("div", { className: "", children: /* @__PURE__ */ t(
59
- y,
56
+ return /* @__PURE__ */ t("div", { className: "flex-1 h-full", children: /* @__PURE__ */ t("div", { className: "mb-4 h-full", children: /* @__PURE__ */ t(
57
+ C,
60
58
  {
61
59
  value: B,
62
- onChange: ({ condition: o, value: h }) => K(r, o, h),
63
- filterOptions: e != null && e.options ? Object.entries(e.options).map(([o, h]) => ({
60
+ onChange: ({ condition: o, value: f }) => j(r, o, f),
61
+ filterOptions: e != null && e.options ? Object.entries(e.options).map(([o, f]) => ({
64
62
  label: o,
65
63
  value: o,
66
- total: h
64
+ total: f
67
65
  })) : void 0
68
66
  },
69
67
  r
70
- ) }) }) });
68
+ ) }) });
71
69
  };
72
- return /* @__PURE__ */ l("div", { className: "relative", ref: g, children: [
73
- /* @__PURE__ */ l(
74
- x,
70
+ return /* @__PURE__ */ l(m.Root, { open: x, onOpenChange: P, children: [
71
+ /* @__PURE__ */ t(m.Trigger, { asChild: !0, children: /* @__PURE__ */ l(
72
+ u,
75
73
  {
76
- onClick: (e) => {
77
- e.stopPropagation(), a(!m);
78
- },
79
74
  variant: d ? "filled" : "stroke",
80
75
  shade: d ? "brand" : "neutral",
81
76
  size: "small",
@@ -84,51 +79,59 @@ const ne = () => {
84
79
  d && `(${p.value.length})`
85
80
  ]
86
81
  }
87
- ),
88
- m && /* @__PURE__ */ l("div", { className: "absolute top-full left-0 mt-2 w-[512px] bg-surface-neutral-default border border-stroke-solid-light rounded-2xl z-10 overflow-hidden shadow-lg", children: [
89
- /* @__PURE__ */ l("div", { className: "flex min-h-[442px]", children: [
90
- /* @__PURE__ */ l("div", { className: "w-48 border-r border-stroke-solid-light p-2 flex flex-col gap-1.5", children: [
91
- /* @__PURE__ */ t("div", { className: "p-2 pb-1", children: /* @__PURE__ */ t("h3", { className: "leading-none-medium-sm text-text-neutral-secondary", children: "Filters" }) }),
92
- c.map((e) => /* @__PURE__ */ l(
93
- "button",
94
- {
95
- onClick: () => N(e.filterKey),
96
- className: `w-full text-left p-2 text-sm flex items-center justify-between hover:bg-surface-neutral-hovered transition-colors rounded-lg ${r === e.filterKey ? "bg-surface-neutral-focused text-text-brand-primary" : "text-text-neutral-primary"}`,
97
- children: [
98
- /* @__PURE__ */ t("span", { className: "truncate", children: e.title }),
99
- w(e.filterKey) && /* @__PURE__ */ t(E, { className: "w-4 h-4 text-text-brand-secondary flex-shrink-0 ml-2" })
100
- ]
101
- },
102
- e.filterKey
103
- ))
104
- ] }),
105
- /* @__PURE__ */ t("div", { className: "flex-1 flex flex-col", children: r ? $() : /* @__PURE__ */ t("div", { className: "flex-1 flex items-center justify-center text-text-neutral-muted", children: "Select a column to configure its filter" }) })
106
- ] }),
107
- !!b && /* @__PURE__ */ l("div", { className: "flex justify-between items-end p-4 border-t border-stroke-solid-medium min-h-[71px]", children: [
108
- /* @__PURE__ */ t(G, { selectedFilters: i, schema: c }),
109
- /* @__PURE__ */ l("div", { className: "flex justify-end gap-2", children: [
110
- /* @__PURE__ */ t(x, { onClick: j, variant: "stroke", shade: "neutral", size: "small", children: "Clear All" }),
111
- /* @__PURE__ */ t(
112
- x,
113
- {
114
- onClick: v,
115
- variant: "filled",
116
- shade: "neutral",
117
- size: "small",
118
- children: `Apply ${b || ""}`
119
- }
120
- )
121
- ] })
122
- ] })
123
- ] }),
124
- F && /* @__PURE__ */ t(
82
+ ) }),
83
+ /* @__PURE__ */ t(m.Portal, { children: /* @__PURE__ */ l(
84
+ m.Content,
85
+ {
86
+ className: "z-10 w-[512px] bg-surface-neutral-default border border-stroke-solid-light rounded-2xl overflow-hidden shadow-lg",
87
+ sideOffset: 8,
88
+ align: "start",
89
+ children: [
90
+ /* @__PURE__ */ l("div", { className: "flex h-[442px]", children: [
91
+ /* @__PURE__ */ l("div", { className: "w-48 border-r border-stroke-solid-light p-2 flex flex-col gap-1.5", children: [
92
+ /* @__PURE__ */ t("div", { className: "p-2 pb-1", children: /* @__PURE__ */ t("h3", { className: "leading-none-medium-sm text-text-neutral-secondary", children: "Filters" }) }),
93
+ c.map((e) => /* @__PURE__ */ l(
94
+ "button",
95
+ {
96
+ onClick: () => k(e.filterKey),
97
+ className: `w-full text-left p-2 text-sm flex items-center justify-between hover:bg-surface-neutral-hovered transition-colors rounded-lg ${r === e.filterKey ? "bg-surface-neutral-focused text-text-brand-primary" : "text-text-neutral-primary"}`,
98
+ children: [
99
+ /* @__PURE__ */ t("span", { className: "truncate", children: e.title }),
100
+ K(e.filterKey) && /* @__PURE__ */ t(G, { className: "w-4 h-4 text-text-brand-secondary flex-shrink-0 ml-2" })
101
+ ]
102
+ },
103
+ e.filterKey
104
+ ))
105
+ ] }),
106
+ /* @__PURE__ */ t("div", { className: "flex-1 flex flex-col", children: r ? R() : /* @__PURE__ */ t("div", { className: "flex-1 flex items-center justify-center text-text-neutral-muted", children: "Select a column to configure its filter" }) })
107
+ ] }),
108
+ !!v && /* @__PURE__ */ l("div", { className: "flex justify-between items-end p-4 border-t border-stroke-solid-medium min-h-[71px]", children: [
109
+ /* @__PURE__ */ t(H, { selectedFilters: i, schema: c }),
110
+ /* @__PURE__ */ l("div", { className: "flex justify-end gap-2", children: [
111
+ /* @__PURE__ */ t(u, { onClick: A, variant: "stroke", shade: "neutral", size: "small", children: "Clear All" }),
112
+ /* @__PURE__ */ t(
113
+ u,
114
+ {
115
+ onClick: g,
116
+ variant: "filled",
117
+ shade: "neutral",
118
+ size: "small",
119
+ children: `Apply ${v || ""}`
120
+ }
121
+ )
122
+ ] })
123
+ ] })
124
+ ]
125
+ }
126
+ ) }),
127
+ N && /* @__PURE__ */ t(
125
128
  M,
126
129
  {
127
- onClose: R,
130
+ onClose: $,
128
131
  onKeepChanges: S,
129
- onRevertChanges: O,
130
- onApplyChanges: v,
131
- hasUnsavedChanges: C(i, p.value)
132
+ onRevertChanges: T,
133
+ onApplyChanges: g,
134
+ hasUnsavedChanges: F(i, p.value)
132
135
  }
133
136
  )
134
137
  ] });
@@ -1,104 +1,107 @@
1
- import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
- import * as u from "react";
3
- import { Button as h } from "../button/button.js";
1
+ import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
+ import * as y from "react";
3
+ import * as p from "@radix-ui/react-popover";
4
+ import { Button as f } from "../button/button.js";
4
5
  import { useTableFilterContext as U } from "./table-filter.context.js";
5
6
  import I from "./filters/text.js";
6
- import P from "./filters/boolean.js";
7
- import V from "./filters/number/number.js";
8
- import q from "./filters/checkbox.js";
9
- import E from "../assets/icons/circle-check-filled.js";
10
- import { useClickOutside as G } from "../../hooks/useClickOutside.js";
7
+ import V from "./filters/boolean.js";
8
+ import q from "./filters/number/number.js";
9
+ import E from "./filters/checkbox.js";
10
+ import G from "../assets/icons/circle-check-filled.js";
11
11
  import { getFilterCount as H } from "./selected-filters-display/selected-filters-display.utils.js";
12
12
  import { FilterConfirmationDialog as J } from "./close-filter-confirm/filter-confirmation-dialog.js";
13
- import { hasUnsavedFilterChangesForColumn as k } from "./close-filter-confirm/filter-confirmation-dialog.utils.js";
14
- const le = ({ filterName: o }) => {
15
- const [a, l] = u.useState(!1), [x, r] = u.useState(!1), C = u.useRef(null), {
13
+ import { hasUnsavedFilterChangesForColumn as x } from "./close-filter-confirm/filter-confirmation-dialog.utils.js";
14
+ const te = ({ filterName: t }) => {
15
+ const [k, r] = y.useState(!1), [u, s] = y.useState(!1), {
16
16
  getFilterForColumn: w,
17
17
  hasAppliedFilterForColumn: A,
18
- updateColumnFilter: g,
18
+ updateColumnFilter: C,
19
19
  applyFilters: d,
20
20
  resetToAppliedFilters: O,
21
- filterSchema: R,
21
+ filterSchema: P,
22
22
  filterComponents: c = {},
23
- tempFilters: F,
23
+ tempFilters: g,
24
24
  filter: v
25
- } = U();
26
- G(C, () => {
27
- k(o, F, v.value) && a ? r(!0) : l(!1);
28
- });
29
- const $ = () => {
30
- d(), l(!1);
25
+ } = U(), T = (o) => {
26
+ !o && u ? x(t, g, v.value) ? r(!0) : s(!1) : s(o);
27
+ }, $ = () => {
28
+ d(), s(!1);
31
29
  }, j = () => {
32
- r(!1), l(!1);
30
+ r(!1), s(!1);
33
31
  }, z = () => {
34
- O(), r(!1), l(!1);
32
+ O(), r(!1), s(!1);
35
33
  }, D = () => {
36
34
  r(!1);
37
- }, e = R.find((n) => n.filterKey === o);
35
+ }, e = P.find((o) => o.filterKey === t);
38
36
  if (!e)
39
- return console.warn(`Column "${o}" not found in schema`), null;
37
+ return console.warn(`Column "${t}" not found in schema`), null;
40
38
  const K = {
41
- boolean: P,
39
+ boolean: V,
42
40
  string: I,
43
- number: V,
44
- checkbox: q
45
- }, b = e.type && (c == null ? void 0 : c[e.type]) || K[e.type ?? "string"];
46
- if (!b)
41
+ number: q,
42
+ checkbox: E
43
+ }, F = e.type && (c == null ? void 0 : c[e.type]) || K[e.type ?? "string"];
44
+ if (!F)
47
45
  return console.warn(
48
46
  `No filter component found for column "${e.filterKey}" with type "${e.type}". Provide a custom filter component or use supported types: "string", "number", "boolean", "checkbox".`
49
47
  ), null;
50
- const t = w(o), p = A(o), y = e.options ? Object.entries(e.options).map(([n, f]) => ({
51
- label: n,
52
- value: n,
53
- total: f
54
- })) : void 0, m = t ? H(t, y) : void 0, S = {
55
- condition: (t == null ? void 0 : t.condition) || "",
56
- value: (t == null ? void 0 : t.value) || ""
57
- }, T = () => {
58
- g(o, "", ""), d(), l(!1);
48
+ const n = w(t), m = A(t), b = e.options ? Object.entries(e.options).map(([o, i]) => ({
49
+ label: o,
50
+ value: o,
51
+ total: i
52
+ })) : void 0, h = n ? H(n, b) : void 0, R = {
53
+ condition: (n == null ? void 0 : n.condition) || "",
54
+ value: (n == null ? void 0 : n.value) || ""
55
+ }, S = () => {
56
+ C(t, "", ""), d(), s(!1);
59
57
  }, B = () => {
60
- d(), l(!1);
58
+ d(), s(!1);
61
59
  };
62
- return /* @__PURE__ */ i("div", { className: "relative", ref: C, children: [
63
- /* @__PURE__ */ s(
64
- h,
60
+ return /* @__PURE__ */ a(p.Root, { open: u, onOpenChange: T, children: [
61
+ /* @__PURE__ */ l(p.Trigger, { asChild: !0, children: /* @__PURE__ */ l(
62
+ f,
65
63
  {
66
- onClick: () => {
67
- l(!a);
68
- },
69
- variant: p ? "filled" : "stroke",
70
- shade: p ? "brand" : "neutral",
64
+ variant: m ? "filled" : "stroke",
65
+ shade: m ? "brand" : "neutral",
71
66
  size: "small",
72
- children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
67
+ children: /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
73
68
  e.title,
74
- p && /* @__PURE__ */ s(E, { className: "w-4 h-4 text-white flex-shrink-0" })
69
+ m && /* @__PURE__ */ l(G, { className: "w-4 h-4 text-white flex-shrink-0" })
75
70
  ] })
76
71
  }
77
- ),
78
- a && /* @__PURE__ */ i("div", { className: "absolute top-full left-0 mt-2 w-80 bg-surface-neutral-default border border-stroke-solid-light rounded-2xl z-10 overflow-hidden shadow-lg", children: [
79
- /* @__PURE__ */ s(
80
- b,
81
- {
82
- value: S,
83
- onChange: ({ condition: n, value: f }) => g(o, n, f),
84
- filterOptions: y
85
- }
86
- ),
87
- !!m && /* @__PURE__ */ i("div", { className: "flex justify-between gap-2 p-3 border-t border-stroke-solid-medium", children: [
88
- /* @__PURE__ */ s(h, { onClick: T, variant: "stroke", shade: "neutral", size: "small", children: "Clear All" }),
89
- /* @__PURE__ */ s(h, { onClick: B, variant: "filled", shade: "neutral", size: "small", children: `Apply${m !== void 0 ? ` ${m}` : ""}` })
90
- ] })
91
- ] }),
92
- x && /* @__PURE__ */ s(
72
+ ) }),
73
+ /* @__PURE__ */ l(p.Portal, { children: /* @__PURE__ */ a(
74
+ p.Content,
75
+ {
76
+ className: "z-10 w-80 bg-surface-neutral-default border border-stroke-solid-light rounded-2xl overflow-hidden shadow-lg",
77
+ sideOffset: 8,
78
+ align: "start",
79
+ children: [
80
+ /* @__PURE__ */ l(
81
+ F,
82
+ {
83
+ value: R,
84
+ onChange: ({ condition: o, value: i }) => C(t, o, i),
85
+ filterOptions: b
86
+ }
87
+ ),
88
+ !!h && /* @__PURE__ */ a("div", { className: "flex justify-between gap-2 p-3 border-t border-stroke-solid-medium", children: [
89
+ /* @__PURE__ */ l(f, { onClick: S, variant: "stroke", shade: "neutral", size: "small", children: "Clear All" }),
90
+ /* @__PURE__ */ l(f, { onClick: B, variant: "filled", shade: "neutral", size: "small", children: `Apply${h !== void 0 ? ` ${h}` : ""}` })
91
+ ] })
92
+ ]
93
+ }
94
+ ) }),
95
+ k && /* @__PURE__ */ l(
93
96
  J,
94
97
  {
95
98
  onClose: D,
96
99
  onKeepChanges: j,
97
100
  onRevertChanges: z,
98
101
  onApplyChanges: $,
99
- hasUnsavedChanges: k(
100
- o,
101
- F,
102
+ hasUnsavedChanges: x(
103
+ t,
104
+ g,
102
105
  v.value
103
106
  )
104
107
  }
@@ -106,5 +109,5 @@ const le = ({ filterName: o }) => {
106
109
  ] });
107
110
  };
108
111
  export {
109
- le as TableFilterColumnButton
112
+ te as TableFilterColumnButton
110
113
  };