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.
- package/dist/components/ui/calendar.js +2 -3
- package/dist/components/ui/combobox.d.ts +1 -0
- package/dist/components/ui/combobox.js +116 -102
- package/dist/components/ui/date-picker/date-picker.js +52 -50
- package/dist/components/ui/date-picker/date-range-picker.js +92 -90
- package/dist/components/ui/date-picker/month-picker.js +57 -55
- package/dist/components/ui/date-picker/month-range-picker.js +84 -82
- package/dist/components/ui/date-picker/multi-date-picker.js +45 -43
- package/dist/components/ui/date-picker/week-range-picker.js +77 -75
- package/dist/components/ui/expandable-sku/expandable-sku.js +10 -10
- package/dist/components/ui/filter-strip/filter-tag-list.d.ts +8 -1
- package/dist/components/ui/filter-strip/filter-tag-list.js +99 -85
- package/package.json +1 -1
|
@@ -1,92 +1,106 @@
|
|
|
1
1
|
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { TagGroup as
|
|
5
|
-
import { Tag as
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { Popover as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { Check as
|
|
10
|
-
const
|
|
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:
|
|
13
|
-
onViewAll:
|
|
14
|
-
onItemRemove:
|
|
15
|
-
isRemovable:
|
|
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 [
|
|
19
|
-
navigator.clipboard.writeText(String(
|
|
20
|
-
},
|
|
21
|
-
|
|
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: (
|
|
30
|
+
onOpenAutoFocus: (t) => t.preventDefault(),
|
|
30
31
|
children: /* @__PURE__ */ o("div", { className: "flex flex-col py-2 px-[6px]", children: [
|
|
31
|
-
/* @__PURE__ */ r(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
78
|
+
P,
|
|
65
79
|
{
|
|
66
80
|
variant: "secondary",
|
|
67
81
|
size: "sm",
|
|
68
82
|
className: "w-full justify-center",
|
|
69
|
-
onClick:
|
|
70
|
-
children:
|
|
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
|
-
},
|
|
91
|
+
}, B = ({
|
|
78
92
|
filters: l,
|
|
79
|
-
onFilterRemove:
|
|
80
|
-
onOverflowClick:
|
|
81
|
-
onViewAll:
|
|
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
|
-
|
|
97
|
+
S,
|
|
84
98
|
{
|
|
85
99
|
items: l,
|
|
86
|
-
renderItem: (e,
|
|
87
|
-
const
|
|
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
|
-
|
|
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
|
-
|
|
111
|
+
T,
|
|
98
112
|
{
|
|
99
113
|
spacing: "sm",
|
|
100
|
-
tags:
|
|
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: () =>
|
|
120
|
+
onRemove: () => c(e.id, t)
|
|
107
121
|
}))
|
|
108
122
|
}
|
|
109
123
|
),
|
|
110
|
-
|
|
124
|
+
v && (d ? (
|
|
111
125
|
// Server-side overflow: Simple tag, no popover
|
|
112
|
-
/* @__PURE__ */ o(
|
|
113
|
-
/* @__PURE__ */ r(
|
|
114
|
-
|
|
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: () =>
|
|
134
|
+
onClick: () => p?.(e.id),
|
|
121
135
|
tabIndex: 0,
|
|
122
136
|
role: "button",
|
|
123
|
-
"aria-label": `${e.overflow?.count ||
|
|
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(),
|
|
139
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), p?.(e.id));
|
|
126
140
|
},
|
|
127
|
-
children:
|
|
141
|
+
children: f || h
|
|
128
142
|
}
|
|
129
143
|
) }),
|
|
130
144
|
/* @__PURE__ */ o(y, { variant: "tertiary", side: "top", children: [
|
|
131
|
-
e.overflow?.count ||
|
|
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(
|
|
138
|
-
/* @__PURE__ */ o(
|
|
139
|
-
/* @__PURE__ */ r(
|
|
140
|
-
|
|
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:
|
|
160
|
+
children: h
|
|
147
161
|
}
|
|
148
162
|
) }) }),
|
|
149
163
|
/* @__PURE__ */ o(y, { variant: "tertiary", side: "top", children: [
|
|
150
|
-
|
|
164
|
+
a.length,
|
|
151
165
|
" more filters"
|
|
152
166
|
] })
|
|
153
167
|
] }),
|
|
154
168
|
/* @__PURE__ */ r(
|
|
155
|
-
|
|
169
|
+
R,
|
|
156
170
|
{
|
|
157
|
-
remainingValues:
|
|
171
|
+
remainingValues: a,
|
|
158
172
|
viewAllTrigger: e.viewAllTrigger,
|
|
159
|
-
onViewAll:
|
|
160
|
-
onItemRemove: (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
|
-
|
|
177
|
-
|
|
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.
|
|
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",
|