impact-nova 1.7.51 → 1.8.1

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,6 +1,6 @@
1
1
  import { jsxs as v, jsx as o } from "react/jsx-runtime";
2
2
  import * as fe from "react";
3
- import { useMemo as F, useState as I, useRef as M, useCallback as x, useEffect as me } from "react";
3
+ import { useMemo as B, useState as I, useRef as M, useCallback as x, useEffect as me } from "react";
4
4
  import * as V from "@radix-ui/react-popover";
5
5
  import { cn as a } from "../../lib/utils.js";
6
6
  import { Info as X } from "../../icons/index.js";
@@ -34,9 +34,9 @@ const Y = {
34
34
  defaultValue: L = "",
35
35
  value: h,
36
36
  onChange: A,
37
- onBlur: K,
37
+ onBlur: F,
38
38
  placeholder: Z,
39
- label: P,
39
+ label: K,
40
40
  helperText: w,
41
41
  helperTextPosition: j = "absolute",
42
42
  isError: m,
@@ -48,42 +48,42 @@ const Y = {
48
48
  allowFreeText: R = !1,
49
49
  required: ee
50
50
  }, y) => {
51
- const U = F(
51
+ const U = B(
52
52
  () => xe({ options: c, min: u, max: d, step: f }),
53
53
  [c, u, d, f]
54
- ), O = h !== void 0, [te, oe] = I(L), S = O ? h : te, [ne, q] = I(""), [r, C] = I(!1), n = r ? ne : S, [_, g] = I(-1), G = M(-1), [se, k] = I("keyboard"), J = M(null), H = M(null), re = x(
54
+ ), P = h !== void 0, [te, oe] = I(L), S = P ? h : te, [ne, W] = I(""), [r, C] = I(!1), n = r ? ne : S, [O, g] = I(-1), q = M(-1), [se, k] = I("keyboard"), G = M(null), H = M(null), re = x(
55
55
  (e) => {
56
- J.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
56
+ G.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
57
57
  },
58
58
  [y]
59
- ), s = F(
59
+ ), s = B(
60
60
  () => pe(U, n),
61
61
  [U, n]
62
- ), Q = M(s), ie = F(() => {
62
+ ), J = M(s), ie = B(() => {
63
63
  if (!r || !n) return -1;
64
64
  const e = s.findIndex(
65
65
  (t) => t.toLowerCase() === n.toLowerCase()
66
66
  );
67
67
  return e >= 0 ? e : -1;
68
- }, [r, n, s]), N = _ >= 0 ? _ : ie, W = _ >= 0 ? se : "mouse";
68
+ }, [r, n, s]), N = O >= 0 ? O : ie, Q = O >= 0 ? se : "mouse";
69
69
  me(() => {
70
- G.current = N, Q.current = s, r && N >= 0 && H.current && H.current.querySelectorAll("[data-combobox-item]")[N]?.scrollIntoView({ block: "nearest" });
70
+ q.current = N, J.current = s, r && N >= 0 && H.current && H.current.querySelectorAll("[data-combobox-item]")[N]?.scrollIntoView({ block: "nearest" });
71
71
  }, [N, r, s]);
72
72
  const l = x(
73
73
  (e) => {
74
- O || oe(e), A?.(e), C(!1), g(-1);
74
+ P || oe(e), A?.(e), C(!1), g(-1);
75
75
  },
76
- [O, A]
76
+ [P, A]
77
77
  ), D = x(() => {
78
78
  C(!1), g(-1);
79
79
  }, []), ae = x(
80
80
  (e) => {
81
81
  const t = e.target.value;
82
- q(t), g(-1), k("mouse"), r || C(!0);
82
+ W(t), g(-1), k("mouse"), r || C(!0);
83
83
  },
84
84
  [r]
85
85
  ), le = x(() => {
86
- p || (q(S), C(!0));
86
+ p || (W(S), C(!0));
87
87
  }, [p, S]), ce = x(
88
88
  (e) => {
89
89
  const t = e.relatedTarget;
@@ -94,10 +94,10 @@ const Y = {
94
94
  );
95
95
  i ? l(i) : s.length === 1 ? l(s[0]) : R && n ? l(n) : D();
96
96
  }
97
- K?.(e);
97
+ F?.(e);
98
98
  }
99
99
  },
100
- [r, s, n, l, D, R, K]
100
+ [r, s, n, l, D, R, F]
101
101
  ), ue = x(
102
102
  (e) => {
103
103
  if (!r) {
@@ -122,12 +122,12 @@ const Y = {
122
122
  }
123
123
  if (e.key === "Enter" || e.key === "Tab") {
124
124
  e.preventDefault();
125
- const t = G.current, i = Q.current;
125
+ const t = q.current, i = J.current;
126
126
  if (t >= 0 && t < i.length)
127
127
  l(i[t]);
128
128
  else {
129
129
  const b = i.find(
130
- (B) => B.toLowerCase() === n.toLowerCase()
130
+ (_) => _.toLowerCase() === n.toLowerCase()
131
131
  );
132
132
  b ? l(b) : i.length === 1 ? l(i[0]) : R && n ? l(n) : D();
133
133
  }
@@ -137,7 +137,7 @@ const Y = {
137
137
  [r, s, n, l, D, R]
138
138
  ), de = x(
139
139
  (e) => {
140
- l(e), setTimeout(() => J.current?.focus(), 0);
140
+ l(e), setTimeout(() => G.current?.focus(), 0);
141
141
  },
142
142
  [l]
143
143
  );
@@ -148,7 +148,7 @@ const Y = {
148
148
  "data-numeric": z || void 0,
149
149
  className: a("flex w-full flex-col gap-[6px]", E),
150
150
  children: [
151
- P && /* @__PURE__ */ v(
151
+ K && /* @__PURE__ */ v(
152
152
  "label",
153
153
  {
154
154
  className: a(
@@ -157,7 +157,7 @@ const Y = {
157
157
  m && "text-destructive"
158
158
  ),
159
159
  children: [
160
- P,
160
+ K,
161
161
  " ",
162
162
  ee && /* @__PURE__ */ o("span", { className: "text-destructive", children: "*" })
163
163
  ]
@@ -219,13 +219,19 @@ const Y = {
219
219
  V.Content,
220
220
  {
221
221
  align: "start",
222
+ side: "bottom",
222
223
  sideOffset: 4,
224
+ avoidCollisions: !0,
225
+ collisionPadding: 8,
223
226
  onOpenAutoFocus: (e) => e.preventDefault(),
224
227
  onCloseAutoFocus: (e) => e.preventDefault(),
225
228
  onInteractOutside: () => {
226
229
  },
230
+ onWheel: (e) => e.stopPropagation(),
227
231
  className: "z-[9999] overflow-hidden rounded-[12px] bg-white text-base shadow-[0px_1px_6px_0px_rgba(26,39,124,0.14)] focus:outline-none sm:text-sm flex flex-col border-none w-[var(--radix-popover-trigger-width)]",
228
- style: { maxHeight: 250 },
232
+ style: {
233
+ maxHeight: "var(--radix-popover-content-available-height)"
234
+ },
229
235
  children: /* @__PURE__ */ o(
230
236
  "div",
231
237
  {
@@ -233,6 +239,7 @@ const Y = {
233
239
  className: "flex-1 overflow-auto py-1 px-[6px]",
234
240
  style: { maxHeight: 240, overscrollBehavior: "contain" },
235
241
  role: "listbox",
242
+ onWheel: (e) => e.stopPropagation(),
236
243
  onMouseLeave: () => {
237
244
  k("mouse"), g(-1);
238
245
  },
@@ -247,10 +254,10 @@ const Y = {
247
254
  className: a(
248
255
  "cursor-default select-none py-[6px] px-3 flex items-center transition-colors rounded-md",
249
256
  z ? "justify-end text-right" : "justify-between",
250
- i && W === "keyboard" ? "ring-2 ring-inset ring-primary bg-[#edf0ff] text-[#1f2b4d]" : i && W === "mouse" ? "bg-gray-100 text-[#1f2b4d]" : b ? "bg-[#edf0ff] text-[#1f2b4d]" : "text-[#1f2b4d] hover:bg-gray-100 cursor-pointer"
257
+ i && Q === "keyboard" ? "ring-2 ring-inset ring-primary bg-[#edf0ff] text-[#1f2b4d]" : i && Q === "mouse" ? "bg-gray-100 text-[#1f2b4d]" : b ? "bg-[#edf0ff] text-[#1f2b4d]" : "text-[#1f2b4d] hover:bg-gray-100 cursor-pointer"
251
258
  ),
252
- onMouseDown: (B) => {
253
- B.preventDefault(), de(e);
259
+ onMouseDown: (_) => {
260
+ _.preventDefault(), de(e);
254
261
  },
255
262
  onMouseEnter: () => {
256
263
  k("mouse"), g(t);
@@ -65,7 +65,8 @@ function X({ section: a }) {
65
65
  remainingValues: n,
66
66
  onItemRemove: () => {
67
67
  },
68
- isRemovable: !1
68
+ isRemovable: !1,
69
+ isCopyable: !0
69
70
  }
70
71
  )
71
72
  ] }) : null
@@ -1,3 +1,3 @@
1
1
  import { FilterStripProps } from '../types/filter-strip.types';
2
- declare const FilterStrip: ({ filters, onFilterRemove, onAllFiltersClick, savedFilters, recentFilters, onApplySavedFilter, onSavedFilterSearch, onSavedFiltersScroll, onViewAll, onOverflowClick, selectedFilter, onSelectedFilterChange, onDropdownOpenChange, isLoadingFilterPreferencesList, isLoading, onEditSavedFilter, onDeleteSavedFilter, onSetDefaultSavedFilter, className, allFiltersKeybinding, allFiltersShortcutId, }: FilterStripProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const FilterStrip: ({ filters, onFilterRemove, onAllFiltersClick, savedFilters, recentFilters, onApplySavedFilter, onSavedFilterSearch, onSavedFiltersScroll, onViewAll, onOverflowClick, selectedFilter, onSelectedFilterChange, onDropdownOpenChange, isLoadingFilterPreferencesList, isLoading, onEditSavedFilter, onDeleteSavedFilter, onSetDefaultSavedFilter, className, allFiltersKeybinding, allFiltersShortcutId, showAllFiltersButton, showSavedFilters, }: FilterStripProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export { FilterStrip };
@@ -1,12 +1,12 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import { ListFilter as j } from "lucide-react";
1
+ import { jsx as e, jsxs as i, Fragment as L } from "react/jsx-runtime";
2
+ import { ListFilter as A } from "lucide-react";
3
3
  import { cn as l } from "../../../lib/utils.js";
4
- import { Button as I } from "../button.js";
4
+ import { Button as B } from "../button.js";
5
5
  import { Skeleton as t } from "../skeleton.js";
6
- import { FilterSummary as L } from "./filter-summary.js";
7
- import { FilterTagList as A } from "./filter-tag-list.js";
8
- import { useImpactNovaI18n as B } from "../../../i18n/ImpactNovaI18nContext.js";
9
- const G = ({
6
+ import { FilterSummary as C } from "./filter-summary.js";
7
+ import { FilterTagList as K } from "./filter-tag-list.js";
8
+ import { useImpactNovaI18n as M } from "../../../i18n/ImpactNovaI18nContext.js";
9
+ const O = ({
10
10
  filters: s,
11
11
  onFilterRemove: n,
12
12
  onAllFiltersClick: m,
@@ -14,23 +14,25 @@ const G = ({
14
14
  recentFilters: c,
15
15
  onApplySavedFilter: p,
16
16
  onSavedFilterSearch: h,
17
- onSavedFiltersScroll: f,
18
- onViewAll: d,
17
+ onSavedFiltersScroll: d,
18
+ onViewAll: f,
19
19
  onOverflowClick: w,
20
20
  selectedFilter: x,
21
21
  onSelectedFilterChange: N,
22
22
  onDropdownOpenChange: v,
23
23
  isLoadingFilterPreferencesList: g,
24
- isLoading: k,
25
- onEditSavedFilter: u,
24
+ isLoading: u,
25
+ onEditSavedFilter: k,
26
26
  onDeleteSavedFilter: b,
27
- onSetDefaultSavedFilter: S,
27
+ onSetDefaultSavedFilter: F,
28
28
  className: a,
29
- allFiltersKeybinding: y,
30
- allFiltersShortcutId: F
29
+ allFiltersKeybinding: S,
30
+ allFiltersShortcutId: y,
31
+ showAllFiltersButton: j = !0,
32
+ showSavedFilters: I = !0
31
33
  }) => {
32
- const { t: r } = B();
33
- return k ? /* @__PURE__ */ e(
34
+ const { t: r } = M();
35
+ return u ? /* @__PURE__ */ e(
34
36
  "div",
35
37
  {
36
38
  "data-component": "filter-strip",
@@ -71,45 +73,47 @@ const G = ({
71
73
  a
72
74
  ),
73
75
  children: [
76
+ I && /* @__PURE__ */ i(L, { children: [
77
+ /* @__PURE__ */ e(
78
+ C,
79
+ {
80
+ selectedFilter: x,
81
+ onSelectedFilterChange: N,
82
+ savedFilters: o,
83
+ recentFilters: c,
84
+ onApplySavedFilter: p,
85
+ onSavedFilterSearch: h,
86
+ onSavedFiltersScroll: d,
87
+ onDropdownOpenChange: v,
88
+ isLoadingFilterPreferencesList: g,
89
+ onEditSavedFilter: k,
90
+ onDeleteSavedFilter: b,
91
+ onSetDefaultSavedFilter: F
92
+ }
93
+ ),
94
+ /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-stroke-hairline mx-1 shrink-0" })
95
+ ] }),
74
96
  /* @__PURE__ */ e(
75
- L,
76
- {
77
- selectedFilter: x,
78
- onSelectedFilterChange: N,
79
- savedFilters: o,
80
- recentFilters: c,
81
- onApplySavedFilter: p,
82
- onSavedFilterSearch: h,
83
- onSavedFiltersScroll: f,
84
- onDropdownOpenChange: v,
85
- isLoadingFilterPreferencesList: g,
86
- onEditSavedFilter: u,
87
- onDeleteSavedFilter: b,
88
- onSetDefaultSavedFilter: S
89
- }
90
- ),
91
- /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-stroke-hairline mx-1 shrink-0" }),
92
- /* @__PURE__ */ e(
93
- A,
97
+ K,
94
98
  {
95
99
  filters: s,
96
100
  onFilterRemove: n,
97
101
  onOverflowClick: w,
98
- onViewAll: d
102
+ onViewAll: f
99
103
  }
100
104
  ),
101
- /* @__PURE__ */ i(
102
- I,
105
+ j && /* @__PURE__ */ i(
106
+ B,
103
107
  {
104
108
  variant: "tertiary",
105
109
  onClick: m,
106
110
  "data-component": "filter-strip-all-filters",
107
111
  "aria-label": r("filterStrip.allFilters"),
108
112
  tooltipSide: "bottom",
109
- tooltipKeybinding: y,
110
- "data-shortcut-id": F,
113
+ tooltipKeybinding: S,
114
+ "data-shortcut-id": y,
111
115
  children: [
112
- /* @__PURE__ */ e(j, { className: "h-4 w-4" }),
116
+ /* @__PURE__ */ e(A, { className: "h-4 w-4" }),
113
117
  r("filterStrip.allFilters")
114
118
  ]
115
119
  }
@@ -119,5 +123,5 @@ const G = ({
119
123
  );
120
124
  };
121
125
  export {
122
- G as FilterStrip
126
+ O as FilterStrip
123
127
  };
@@ -5,12 +5,13 @@ interface FilterTagListProps {
5
5
  onOverflowClick?: (id: string) => void;
6
6
  onViewAll?: () => void;
7
7
  }
8
- declare const FilterPopoverContent: ({ remainingValues, viewAllTrigger, onViewAll, onItemRemove, isRemovable }: {
8
+ declare const FilterPopoverContent: ({ remainingValues, viewAllTrigger, onViewAll, onItemRemove, isRemovable, isCopyable }: {
9
9
  remainingValues: (string | number)[];
10
10
  viewAllTrigger?: "expand" | "custom";
11
11
  onViewAll?: () => void;
12
12
  onItemRemove: (val: string | number) => void;
13
13
  isRemovable?: boolean;
14
+ isCopyable?: boolean;
14
15
  }) => import("react/jsx-runtime").JSX.Element;
15
16
  declare const FilterTagList: ({ filters, onFilterRemove: _onFilterRemove, onOverflowClick, onViewAll, }: FilterTagListProps) => import("react/jsx-runtime").JSX.Element;
16
17
  export { FilterTagList, FilterPopoverContent };
@@ -1,55 +1,72 @@
1
1
  import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
2
  import * as N from "react";
3
- import C from "../horizontal-scroller/horizontal-scroller.js";
4
- import { TagGroup as k } from "../tag-group.js";
5
- import { Tag as w } from "../tag.js";
6
- import { Tooltip as u, TooltipTrigger as v, TooltipContent as f } from "../tooltip.js";
7
- import { Popover as S, PopoverTrigger as T, PopoverContent as z } from "../popover.js";
8
- import { Button as $ } from "../button.js";
9
- import { X as I } from "lucide-react";
10
- const j = ({
3
+ import k from "../horizontal-scroller/horizontal-scroller.js";
4
+ import { TagGroup as S } from "../tag-group.js";
5
+ import { Tag as C } from "../tag.js";
6
+ import { Tooltip as v, TooltipTrigger as b, TooltipContent as y } from "../tooltip.js";
7
+ import { Popover as T, PopoverTrigger as z, PopoverContent as $ } from "../popover.js";
8
+ import { Button as j } from "../button.js";
9
+ import { Check as I, Copy as P, X as A } from "lucide-react";
10
+ const F = ({
11
11
  remainingValues: l,
12
12
  viewAllTrigger: s = "expand",
13
- onViewAll: i,
14
- onItemRemove: d,
15
- isRemovable: g
13
+ onViewAll: d,
14
+ onItemRemove: h,
15
+ isRemovable: w,
16
+ isCopyable: e = !1
16
17
  }) => {
17
- const [e, m] = N.useState(!1), c = e ? l : l.slice(0, 3), p = l.length > 3, t = () => {
18
- s === "custom" ? i?.() : m(!0);
18
+ const [c, p] = N.useState(!1), [u, n] = N.useState(null), m = (a, t, i) => {
19
+ navigator.clipboard.writeText(String(t)), n(i), a.currentTarget.blur(), setTimeout(() => n(null), 1500);
20
+ }, x = c ? l : l.slice(0, 3), g = l.length > 3, f = () => {
21
+ s === "custom" ? d?.() : p(!0);
19
22
  };
20
23
  return /* @__PURE__ */ r(
21
- z,
24
+ $,
22
25
  {
23
26
  className: "w-[200px] p-0 rounded-[8px] bg-white shadow-[0_0_4px_0_rgba(0,0,0,0.12)] border-none",
24
27
  align: "start",
25
28
  sideOffset: 8,
29
+ onOpenAutoFocus: (a) => a.preventDefault(),
26
30
  children: /* @__PURE__ */ o("div", { className: "flex flex-col py-2 px-[6px]", children: [
27
- /* @__PURE__ */ r("div", { className: `flex flex-col gap-1 mb-2 ${e ? "max-h-[200px] overflow-y-auto" : ""}`, children: c.map((n, h) => /* @__PURE__ */ o("div", { className: "flex items-center justify-between text-[14px] font-medium leading-[20px] text-[#1f2b4d] px-3 py-2 overflow-hidden hover:bg-slate-50 rounded group shrink-0", children: [
28
- /* @__PURE__ */ o(u, { children: [
29
- /* @__PURE__ */ r(v, { asChild: !0, children: /* @__PURE__ */ r("span", { className: "truncate", children: String(n) }) }),
30
- /* @__PURE__ */ r(f, { variant: "tertiary", side: "right", children: String(n) })
31
+ /* @__PURE__ */ r("div", { className: `flex flex-col gap-1 mb-2 ${c ? "max-h-[180px] overflow-y-auto" : ""}`, children: x.map((a, t) => /* @__PURE__ */ o("div", { className: "flex items-center justify-between text-[14px] font-medium leading-[20px] text-[#1f2b4d] px-3 py-2 overflow-hidden hover:bg-slate-50 rounded group shrink-0", children: [
32
+ /* @__PURE__ */ o(v, { children: [
33
+ /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r("span", { className: "truncate", children: String(a) }) }),
34
+ /* @__PURE__ */ r(y, { variant: "tertiary", side: "right", children: String(a) })
31
35
  ] }),
32
- g && /* @__PURE__ */ r(
33
- "button",
34
- {
35
- onClick: (x) => {
36
- x.stopPropagation(), d(n);
37
- },
38
- "aria-label": `Remove ${String(n)}`,
39
- className: "ml-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-gray-400 hover:bg-black/5 hover:text-gray-600 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity",
40
- children: /* @__PURE__ */ r(I, { size: 12 })
41
- }
42
- )
43
- ] }, h)) }),
44
- !e && p && /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: [
36
+ /* @__PURE__ */ o("div", { className: "flex items-center shrink-0", children: [
37
+ e && /* @__PURE__ */ r(
38
+ "button",
39
+ {
40
+ onClick: (i) => {
41
+ i.stopPropagation(), m(i, a, t);
42
+ },
43
+ "aria-label": `Copy ${String(a)}`,
44
+ className: "ml-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-gray-400 hover:bg-black/5 hover:text-gray-600 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity",
45
+ children: u === t ? /* @__PURE__ */ r(I, { size: 12, className: "text-green-500" }) : /* @__PURE__ */ r(P, { size: 12 })
46
+ }
47
+ ),
48
+ w && /* @__PURE__ */ r(
49
+ "button",
50
+ {
51
+ onClick: (i) => {
52
+ i.stopPropagation(), h(a);
53
+ },
54
+ "aria-label": `Remove ${String(a)}`,
55
+ className: "ml-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-gray-400 hover:bg-black/5 hover:text-gray-600 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity",
56
+ children: /* @__PURE__ */ r(A, { size: 12 })
57
+ }
58
+ )
59
+ ] })
60
+ ] }, t)) }),
61
+ !c && g && /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: [
45
62
  /* @__PURE__ */ r("div", { className: "h-[1px] bg-[#e6e8f0] w-full" }),
46
63
  /* @__PURE__ */ r(
47
- $,
64
+ j,
48
65
  {
49
66
  variant: "secondary",
50
67
  size: "sm",
51
68
  className: "w-full justify-center",
52
- onClick: t,
69
+ onClick: f,
53
70
  children: s === "custom" ? "View all" : `View all (${l.length})`
54
71
  }
55
72
  )
@@ -57,19 +74,19 @@ const j = ({
57
74
  ] })
58
75
  }
59
76
  );
60
- }, M = ({
77
+ }, q = ({
61
78
  filters: l,
62
79
  onFilterRemove: s,
63
- onOverflowClick: i,
64
- onViewAll: d
80
+ onOverflowClick: d,
81
+ onViewAll: h
65
82
  }) => /* @__PURE__ */ r("div", { className: "flex flex-1 items-center min-w-0", children: /* @__PURE__ */ r(
66
- C,
83
+ k,
67
84
  {
68
85
  items: l,
69
- renderItem: (e, m) => {
70
- const c = Array.isArray(e.value) ? e.value : [e.value], p = c.slice(0, 2), t = c.slice(2), n = !!e.overflow, h = e.overflow?.label ? e.overflow.label : e.overflow?.count ? `+${e.overflow.count}` : null, x = t.length > 0, y = n || x, b = `+${t.length}`;
86
+ renderItem: (e, c) => {
87
+ const p = Array.isArray(e.value) ? e.value : [e.value], u = p.slice(0, 2), n = p.slice(2), m = !!e.overflow, x = e.overflow?.label ? e.overflow.label : e.overflow?.count ? `+${e.overflow.count}` : null, g = n.length > 0, f = m || g, a = `+${n.length}`;
71
88
  return /* @__PURE__ */ o("div", { className: "flex items-center px-1", children: [
72
- m > 0 && /* @__PURE__ */ r("div", { className: "mx-3 h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
89
+ c > 0 && /* @__PURE__ */ r("div", { className: "mx-3 h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
73
90
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
74
91
  /* @__PURE__ */ o("span", { className: "text-xs font-medium leading-[21px] text-[#60697d] whitespace-nowrap", children: [
75
92
  e.label,
@@ -77,71 +94,72 @@ const j = ({
77
94
  ] }),
78
95
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
79
96
  /* @__PURE__ */ r(
80
- k,
97
+ S,
81
98
  {
82
99
  spacing: "sm",
83
- tags: p.map((a) => ({
84
- label: String(a),
100
+ tags: u.map((t) => ({
101
+ label: String(t),
85
102
  variant: "secondary",
86
103
  size: "md",
87
104
  shape: "rounded",
88
105
  removable: e.removable,
89
- onRemove: () => s(e.id, a)
106
+ onRemove: () => s(e.id, t)
90
107
  }))
91
108
  }
92
109
  ),
93
- y && (n ? (
110
+ f && (m ? (
94
111
  // Server-side overflow: Simple tag, no popover
95
- /* @__PURE__ */ o(u, { children: [
96
- /* @__PURE__ */ r(v, { asChild: !0, children: /* @__PURE__ */ r(
97
- w,
112
+ /* @__PURE__ */ o(v, { children: [
113
+ /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
114
+ C,
98
115
  {
99
116
  variant: "secondary",
100
117
  size: "md",
101
118
  shape: "rounded",
102
119
  className: "whitespace-nowrap bg-[#eceefd] text-[#4259ee] hover:bg-[#dce1fc] border-0 h-5 px-2 text-xs font-medium font-['Manrope'] cursor-pointer",
103
- onClick: () => i?.(e.id),
120
+ onClick: () => d?.(e.id),
104
121
  tabIndex: 0,
105
122
  role: "button",
106
- "aria-label": `${e.overflow?.count || t.length} more filters for ${e.label}`,
107
- onKeyDown: (a) => {
108
- (a.key === "Enter" || a.key === " ") && (a.preventDefault(), i?.(e.id));
123
+ "aria-label": `${e.overflow?.count || n.length} more filters for ${e.label}`,
124
+ onKeyDown: (t) => {
125
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), d?.(e.id));
109
126
  },
110
- children: h || b
127
+ children: x || a
111
128
  }
112
129
  ) }),
113
- /* @__PURE__ */ o(f, { variant: "tertiary", side: "top", children: [
114
- e.overflow?.count || t.length,
130
+ /* @__PURE__ */ o(y, { variant: "tertiary", side: "top", children: [
131
+ e.overflow?.count || n.length,
115
132
  " more filters"
116
133
  ] })
117
134
  ] })
118
135
  ) : (
119
136
  // Client-side overflow: Popover
120
- /* @__PURE__ */ o(S, { children: [
121
- /* @__PURE__ */ o(u, { children: [
122
- /* @__PURE__ */ r(v, { asChild: !0, children: /* @__PURE__ */ r(T, { asChild: !0, children: /* @__PURE__ */ r(
123
- w,
137
+ /* @__PURE__ */ o(T, { children: [
138
+ /* @__PURE__ */ o(v, { children: [
139
+ /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(z, { asChild: !0, children: /* @__PURE__ */ r(
140
+ C,
124
141
  {
125
142
  variant: "secondary",
126
143
  size: "md",
127
144
  shape: "rounded",
128
145
  className: "whitespace-nowrap bg-[#eceefd] text-[#4259ee] hover:bg-[#dce1fc] border-0 h-5 px-2 text-xs font-medium font-['Manrope'] cursor-pointer",
129
- children: b
146
+ children: a
130
147
  }
131
148
  ) }) }),
132
- /* @__PURE__ */ o(f, { variant: "tertiary", side: "top", children: [
133
- t.length,
149
+ /* @__PURE__ */ o(y, { variant: "tertiary", side: "top", children: [
150
+ n.length,
134
151
  " more filters"
135
152
  ] })
136
153
  ] }),
137
154
  /* @__PURE__ */ r(
138
- j,
155
+ F,
139
156
  {
140
- remainingValues: t,
157
+ remainingValues: n,
141
158
  viewAllTrigger: e.viewAllTrigger,
142
- onViewAll: d,
143
- onItemRemove: (a) => s(e.id, a),
144
- isRemovable: e.removable
159
+ onViewAll: h,
160
+ onItemRemove: (t) => s(e.id, t),
161
+ isRemovable: e.removable,
162
+ isCopyable: e.copyable
145
163
  }
146
164
  )
147
165
  ] })
@@ -155,6 +173,6 @@ const j = ({
155
173
  }
156
174
  ) });
157
175
  export {
158
- j as FilterPopoverContent,
159
- M as FilterTagList
176
+ F as FilterPopoverContent,
177
+ q as FilterTagList
160
178
  };