impact-nova 1.8.2 → 1.8.3

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,92 +1,106 @@
1
1
  import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
- import * as N from "react";
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 = ({
2
+ import * as C from "react";
3
+ import S from "../horizontal-scroller/horizontal-scroller.js";
4
+ import { TagGroup as T } from "../tag-group.js";
5
+ import { Tag as k } from "../tag.js";
6
+ import { Tooltip as b, TooltipTrigger as w, TooltipContent as y } from "../tooltip.js";
7
+ import { Popover as z, PopoverTrigger as $, PopoverContent as j } from "../popover.js";
8
+ import { Button as P } from "../button.js";
9
+ import { Check as A, Copy as I, X as O } from "lucide-react";
10
+ const R = ({
11
11
  remainingValues: l,
12
- viewAllTrigger: s = "expand",
13
- onViewAll: d,
14
- onItemRemove: h,
15
- isRemovable: w,
16
- isCopyable: e = !1
12
+ viewAllTrigger: c = "expand",
13
+ onViewAll: p,
14
+ onItemRemove: u,
15
+ isRemovable: N,
16
+ isCopyable: e = !1,
17
+ externalCopyFunction: m
17
18
  }) => {
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
+ const [i, x] = C.useState(!1), [a, d] = C.useState(null), f = (t, s, n) => {
20
+ navigator.clipboard.writeText(String(s)), d(n), t.currentTarget.blur(), setTimeout(() => d(null), 1500);
21
+ }, g = i ? l : l.slice(0, 3), v = l.length > 3, h = () => {
22
+ c === "custom" ? p?.() : x(!0);
22
23
  };
23
24
  return /* @__PURE__ */ r(
24
- $,
25
+ j,
25
26
  {
26
27
  className: "w-[200px] p-0 rounded-[8px] bg-white shadow-[0_0_4px_0_rgba(0,0,0,0.12)] border-none",
27
28
  align: "start",
28
29
  sideOffset: 8,
29
- onOpenAutoFocus: (a) => a.preventDefault(),
30
+ onOpenAutoFocus: (t) => t.preventDefault(),
30
31
  children: /* @__PURE__ */ o("div", { className: "flex flex-col py-2 px-[6px]", children: [
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) })
35
- ] }),
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",
32
+ /* @__PURE__ */ r(
33
+ "div",
34
+ {
35
+ className: `flex flex-col gap-1 mb-2 ${i ? "max-h-[180px] overflow-y-auto" : ""}`,
36
+ children: g.map((t, s) => /* @__PURE__ */ o(
37
+ "div",
50
38
  {
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: [
39
+ 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",
40
+ children: [
41
+ /* @__PURE__ */ o(b, { children: [
42
+ /* @__PURE__ */ r(w, { asChild: !0, children: /* @__PURE__ */ r("span", { className: "truncate", children: String(t) }) }),
43
+ /* @__PURE__ */ r(y, { variant: "tertiary", side: "right", children: String(t) })
44
+ ] }),
45
+ /* @__PURE__ */ o("div", { className: "flex items-center shrink-0", children: [
46
+ e && /* @__PURE__ */ r(
47
+ "button",
48
+ {
49
+ onClick: (n) => {
50
+ n.stopPropagation(), m ? m({ e: n, val: t, index: s }) : f(n, t, s);
51
+ },
52
+ "aria-label": `Copy ${String(t)}`,
53
+ 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",
54
+ children: a === s ? /* @__PURE__ */ r(A, { size: 12, className: "text-green-500" }) : /* @__PURE__ */ r(I, { size: 12 })
55
+ }
56
+ ),
57
+ N && /* @__PURE__ */ r(
58
+ "button",
59
+ {
60
+ onClick: (n) => {
61
+ n.stopPropagation(), u(t);
62
+ },
63
+ "aria-label": `Remove ${String(t)}`,
64
+ 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",
65
+ children: /* @__PURE__ */ r(O, { size: 12 })
66
+ }
67
+ )
68
+ ] })
69
+ ]
70
+ },
71
+ s
72
+ ))
73
+ }
74
+ ),
75
+ !i && v && /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: [
62
76
  /* @__PURE__ */ r("div", { className: "h-[1px] bg-[#e6e8f0] w-full" }),
63
77
  /* @__PURE__ */ r(
64
- j,
78
+ P,
65
79
  {
66
80
  variant: "secondary",
67
81
  size: "sm",
68
82
  className: "w-full justify-center",
69
- onClick: f,
70
- children: s === "custom" ? "View all" : `View all (${l.length})`
83
+ onClick: h,
84
+ children: c === "custom" ? "View all" : `View all (${l.length})`
71
85
  }
72
86
  )
73
87
  ] })
74
88
  ] })
75
89
  }
76
90
  );
77
- }, q = ({
91
+ }, B = ({
78
92
  filters: l,
79
- onFilterRemove: s,
80
- onOverflowClick: d,
81
- onViewAll: h
93
+ onFilterRemove: c,
94
+ onOverflowClick: p,
95
+ onViewAll: u
82
96
  }) => /* @__PURE__ */ r("div", { className: "flex flex-1 items-center min-w-0", children: /* @__PURE__ */ r(
83
- k,
97
+ S,
84
98
  {
85
99
  items: l,
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}`;
100
+ renderItem: (e, m) => {
101
+ const i = Array.isArray(e.value) ? e.value : [e.value], x = i.slice(0, 2), a = i.slice(2), d = !!e.overflow, f = e.overflow?.label ? e.overflow.label : e.overflow?.count ? `+${e.overflow.count}` : null, g = a.length > 0, v = d || g, h = `+${a.length}`;
88
102
  return /* @__PURE__ */ o("div", { className: "flex items-center px-1", children: [
89
- c > 0 && /* @__PURE__ */ r("div", { className: "mx-3 h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
103
+ m > 0 && /* @__PURE__ */ r("div", { className: "mx-3 h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
90
104
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
91
105
  /* @__PURE__ */ o("span", { className: "text-xs font-medium leading-[21px] text-[#60697d] whitespace-nowrap", children: [
92
106
  e.label,
@@ -94,70 +108,70 @@ const F = ({
94
108
  ] }),
95
109
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
96
110
  /* @__PURE__ */ r(
97
- S,
111
+ T,
98
112
  {
99
113
  spacing: "sm",
100
- tags: u.map((t) => ({
114
+ tags: x.map((t) => ({
101
115
  label: String(t),
102
116
  variant: "secondary",
103
117
  size: "md",
104
118
  shape: "rounded",
105
119
  removable: e.removable,
106
- onRemove: () => s(e.id, t)
120
+ onRemove: () => c(e.id, t)
107
121
  }))
108
122
  }
109
123
  ),
110
- f && (m ? (
124
+ v && (d ? (
111
125
  // Server-side overflow: Simple tag, no popover
112
- /* @__PURE__ */ o(v, { children: [
113
- /* @__PURE__ */ r(b, { asChild: !0, children: /* @__PURE__ */ r(
114
- C,
126
+ /* @__PURE__ */ o(b, { children: [
127
+ /* @__PURE__ */ r(w, { asChild: !0, children: /* @__PURE__ */ r(
128
+ k,
115
129
  {
116
130
  variant: "secondary",
117
131
  size: "md",
118
132
  shape: "rounded",
119
133
  className: "whitespace-nowrap bg-[#eceefd] text-[#4259ee] hover:bg-[#dce1fc] border-0 h-5 px-2 text-xs font-medium font-['Manrope'] cursor-pointer",
120
- onClick: () => d?.(e.id),
134
+ onClick: () => p?.(e.id),
121
135
  tabIndex: 0,
122
136
  role: "button",
123
- "aria-label": `${e.overflow?.count || n.length} more filters for ${e.label}`,
137
+ "aria-label": `${e.overflow?.count || a.length} more filters for ${e.label}`,
124
138
  onKeyDown: (t) => {
125
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), d?.(e.id));
139
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), p?.(e.id));
126
140
  },
127
- children: x || a
141
+ children: f || h
128
142
  }
129
143
  ) }),
130
144
  /* @__PURE__ */ o(y, { variant: "tertiary", side: "top", children: [
131
- e.overflow?.count || n.length,
145
+ e.overflow?.count || a.length,
132
146
  " more filters"
133
147
  ] })
134
148
  ] })
135
149
  ) : (
136
150
  // Client-side overflow: Popover
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,
151
+ /* @__PURE__ */ o(z, { children: [
152
+ /* @__PURE__ */ o(b, { children: [
153
+ /* @__PURE__ */ r(w, { asChild: !0, children: /* @__PURE__ */ r($, { asChild: !0, children: /* @__PURE__ */ r(
154
+ k,
141
155
  {
142
156
  variant: "secondary",
143
157
  size: "md",
144
158
  shape: "rounded",
145
159
  className: "whitespace-nowrap bg-[#eceefd] text-[#4259ee] hover:bg-[#dce1fc] border-0 h-5 px-2 text-xs font-medium font-['Manrope'] cursor-pointer",
146
- children: a
160
+ children: h
147
161
  }
148
162
  ) }) }),
149
163
  /* @__PURE__ */ o(y, { variant: "tertiary", side: "top", children: [
150
- n.length,
164
+ a.length,
151
165
  " more filters"
152
166
  ] })
153
167
  ] }),
154
168
  /* @__PURE__ */ r(
155
- F,
169
+ R,
156
170
  {
157
- remainingValues: n,
171
+ remainingValues: a,
158
172
  viewAllTrigger: e.viewAllTrigger,
159
- onViewAll: h,
160
- onItemRemove: (t) => s(e.id, t),
173
+ onViewAll: u,
174
+ onItemRemove: (t) => c(e.id, t),
161
175
  isRemovable: e.removable,
162
176
  isCopyable: e.copyable
163
177
  }
@@ -173,6 +187,6 @@ const F = ({
173
187
  }
174
188
  ) });
175
189
  export {
176
- F as FilterPopoverContent,
177
- q as FilterTagList
190
+ R as FilterPopoverContent,
191
+ B as FilterTagList
178
192
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",