impact-nova 1.1.1 → 1.1.2
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/accordion.js +37 -33
- package/dist/components/ui/alert.d.ts +2 -0
- package/dist/components/ui/alert.js +46 -31
- package/dist/components/ui/breadcrumb.d.ts +7 -2
- package/dist/components/ui/breadcrumb.js +98 -77
- package/dist/components/ui/calendar.js +198 -178
- package/dist/components/ui/date-picker/date-picker.js +94 -87
- package/dist/components/ui/date-picker/date-range-picker.js +124 -117
- package/dist/components/ui/date-picker/month-picker.js +98 -91
- package/dist/components/ui/date-picker/month-range-picker.js +118 -111
- package/dist/components/ui/date-picker/multi-date-picker.js +76 -69
- package/dist/components/ui/date-picker/multi-month-picker.js +72 -65
- package/dist/components/ui/date-picker/multi-week-picker.js +88 -81
- package/dist/components/ui/date-picker/week-picker.js +107 -100
- package/dist/components/ui/date-picker/week-range-picker.js +144 -137
- package/dist/components/ui/dialog.js +65 -61
- package/dist/components/ui/drawer.d.ts +3 -1
- package/dist/components/ui/drawer.js +44 -29
- package/dist/components/ui/file-upload.d.ts +2 -1
- package/dist/components/ui/file-upload.js +159 -135
- package/dist/components/ui/filter-panel/filter-panel.js +89 -70
- package/dist/components/ui/filter-strip/filter-summary.js +117 -104
- package/dist/components/ui/filter-strip/filter-tag-list.js +81 -65
- package/dist/components/ui/popover.js +52 -48
- package/dist/components/ui/prompt.d.ts +2 -1
- package/dist/components/ui/prompt.js +81 -64
- package/dist/components/ui/sheet.js +91 -84
- package/dist/components/ui/sidebar.js +9 -8
- package/dist/components/ui/tabs.d.ts +2 -0
- package/dist/components/ui/tabs.js +58 -55
- package/dist/components/ui/tag.js +21 -20
- package/dist/components/ui/toast.js +41 -37
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +250 -248
- package/package.json +1 -1
|
@@ -1,72 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { ChevronDown as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Popover as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { ChevronDown as z, Search as V } from "lucide-react";
|
|
4
|
+
import { cn as g } from "../../../lib/utils.js";
|
|
5
|
+
import { Popover as Y, PopoverTrigger as q, PopoverContent as H } from "../popover.js";
|
|
6
|
+
import { Tooltip as m, TooltipTrigger as p, TooltipContent as h } from "../tooltip.js";
|
|
7
|
+
import { Button as y } from "../button.js";
|
|
8
|
+
import { Separator as C } from "../separator.js";
|
|
9
|
+
import { Tabs as J, TabsList as K, TabsTrigger as N } from "../tabs.js";
|
|
10
|
+
import { Input as U } from "../input.js";
|
|
11
|
+
import { Badge as W } from "../badge.js";
|
|
12
|
+
import { Skeleton as X } from "../skeleton.js";
|
|
13
|
+
const oe = ({
|
|
14
|
+
selectedFilter: o = "Not selected",
|
|
15
|
+
onSelectedFilterChange: w,
|
|
16
|
+
savedFilters: S,
|
|
17
|
+
recentFilters: u,
|
|
18
|
+
onApplySavedFilter: T,
|
|
18
19
|
onSavedFilterSearch: d,
|
|
19
|
-
onSavedFiltersScroll:
|
|
20
|
-
onDropdownOpenChange:
|
|
21
|
-
isLoadingFilterPreferencesList:
|
|
20
|
+
onSavedFiltersScroll: k,
|
|
21
|
+
onDropdownOpenChange: A,
|
|
22
|
+
isLoadingFilterPreferencesList: P = !1
|
|
22
23
|
}) => {
|
|
23
|
-
const [f,
|
|
24
|
-
|
|
25
|
-
}, [
|
|
26
|
-
|
|
24
|
+
const [f, x] = n.useState(!1), j = (a) => {
|
|
25
|
+
x(a), A?.(a);
|
|
26
|
+
}, [v, M] = n.useState(""), [c, I] = n.useState(""), [r, O] = n.useState("All"), [s, b] = n.useState(null);
|
|
27
|
+
n.useEffect(() => {
|
|
27
28
|
const a = setTimeout(() => {
|
|
28
|
-
|
|
29
|
+
I(v);
|
|
29
30
|
}, 300);
|
|
30
31
|
return () => clearTimeout(a);
|
|
31
|
-
}, [
|
|
32
|
-
d && d(c,
|
|
33
|
-
}, [c,
|
|
34
|
-
f &&
|
|
35
|
-
}, [f,
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
32
|
+
}, [v]), n.useEffect(() => {
|
|
33
|
+
d && d(c, r === "All" ? void 0 : r);
|
|
34
|
+
}, [c, r, d]), n.useEffect(() => {
|
|
35
|
+
f && b({ label: o });
|
|
36
|
+
}, [f, o]);
|
|
37
|
+
const G = (a) => {
|
|
38
|
+
M(a.target.value);
|
|
39
|
+
}, L = () => {
|
|
40
|
+
s && (w?.(s.label), s.savedItem && T?.(s.savedItem), x(!1));
|
|
41
|
+
}, Q = () => {
|
|
42
|
+
x(!1);
|
|
43
|
+
}, _ = () => !u || u.length === 0 ? null : /* @__PURE__ */ t("div", { className: "flex flex-col", children: [
|
|
43
44
|
/* @__PURE__ */ e("div", { className: "px-1 py-[6px] text-xs font-medium text-[#60697d] font-['Manrope']", children: "Recent" }),
|
|
44
|
-
/* @__PURE__ */ e("div", { className: "mb-[6px] flex flex-col", children:
|
|
45
|
-
const
|
|
45
|
+
/* @__PURE__ */ e("div", { className: "mb-[6px] flex flex-col", children: u.map((a, l) => {
|
|
46
|
+
const i = a.map((D) => D.label).join(", "), B = s?.label === i;
|
|
46
47
|
return /* @__PURE__ */ e(
|
|
47
48
|
"div",
|
|
48
49
|
{
|
|
49
|
-
className:
|
|
50
|
+
className: g(
|
|
50
51
|
"flex cursor-pointer flex-row px-3 py-2 rounded-lg hover:bg-[#f5f6fa]",
|
|
51
|
-
|
|
52
|
+
B && "bg-[#edf0ff]"
|
|
52
53
|
),
|
|
53
|
-
onClick: () =>
|
|
54
|
-
children: /* @__PURE__ */
|
|
54
|
+
onClick: () => b({ label: i }),
|
|
55
|
+
children: /* @__PURE__ */ t(m, { children: [
|
|
56
|
+
/* @__PURE__ */ e(p, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "text-sm font-['Manrope'] truncate text-[#1f2b4d]", children: i }) }),
|
|
57
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", side: "right", children: i })
|
|
58
|
+
] })
|
|
55
59
|
},
|
|
56
60
|
l
|
|
57
61
|
);
|
|
58
62
|
}) }),
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
] }),
|
|
61
|
-
if (
|
|
62
|
-
return /* @__PURE__ */ e("div", { className: "flex max-h-[160px] flex-col overflow-y-auto px-3 py-2 space-y-2", children: [1, 2, 3, 4, 5].map((l) => /* @__PURE__ */ e(
|
|
63
|
-
let a =
|
|
64
|
-
(l) =>
|
|
63
|
+
/* @__PURE__ */ e(C, { className: "mb-2" })
|
|
64
|
+
] }), E = () => {
|
|
65
|
+
if (P)
|
|
66
|
+
return /* @__PURE__ */ e("div", { className: "flex max-h-[160px] flex-col overflow-y-auto px-3 py-2 space-y-2", children: [1, 2, 3, 4, 5].map((l) => /* @__PURE__ */ e(X, { className: "h-9 w-full rounded-lg" }, l)) });
|
|
67
|
+
let a = S?.filter(
|
|
68
|
+
(l) => r === "All" || l.type === r
|
|
65
69
|
);
|
|
66
70
|
if (!d && c && (a = a?.filter((l) => l.label.toLowerCase().includes(c.toLowerCase()))), !a || a.length === 0) {
|
|
67
71
|
let l = "No saved filters found";
|
|
68
72
|
if (!!c)
|
|
69
|
-
switch (
|
|
73
|
+
switch (r) {
|
|
70
74
|
case "Personal":
|
|
71
75
|
l = "No personal filters match your search";
|
|
72
76
|
break;
|
|
@@ -77,7 +81,7 @@ const se = ({
|
|
|
77
81
|
l = "No saved filters match your search";
|
|
78
82
|
}
|
|
79
83
|
else
|
|
80
|
-
switch (
|
|
84
|
+
switch (r) {
|
|
81
85
|
case "Personal":
|
|
82
86
|
l = "You haven't created any personal filters yet.";
|
|
83
87
|
break;
|
|
@@ -93,103 +97,112 @@ const se = ({
|
|
|
93
97
|
"div",
|
|
94
98
|
{
|
|
95
99
|
className: "flex max-h-[160px] flex-col overflow-y-auto",
|
|
96
|
-
onScroll:
|
|
100
|
+
onScroll: k,
|
|
97
101
|
children: a.map((l) => {
|
|
98
|
-
const
|
|
102
|
+
const i = s?.label === l.label;
|
|
99
103
|
return /* @__PURE__ */ e(
|
|
100
104
|
"div",
|
|
101
105
|
{
|
|
102
|
-
className:
|
|
106
|
+
className: g(
|
|
103
107
|
"mb-1 flex justify-between cursor-pointer rounded-lg px-3 py-2 text-sm font-medium font-['Manrope'] hover:bg-[#f5f6fa]",
|
|
104
|
-
|
|
108
|
+
i ? "bg-[#edf0ff]" : "text-[#1f2b4d]"
|
|
105
109
|
),
|
|
106
|
-
onClick: () =>
|
|
107
|
-
children: /* @__PURE__ */
|
|
110
|
+
onClick: () => b({ label: l.label, savedItem: l }),
|
|
111
|
+
children: /* @__PURE__ */ t(m, { children: [
|
|
112
|
+
/* @__PURE__ */ e(p, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "truncate", children: l.label }) }),
|
|
113
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", side: "right", children: l.label })
|
|
114
|
+
] })
|
|
108
115
|
},
|
|
109
116
|
l.id
|
|
110
117
|
);
|
|
111
118
|
})
|
|
112
119
|
}
|
|
113
120
|
);
|
|
114
|
-
},
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */ e(
|
|
121
|
+
}, R = s?.label !== o;
|
|
122
|
+
return /* @__PURE__ */ t(Y, { open: f, onOpenChange: j, children: [
|
|
123
|
+
/* @__PURE__ */ e(q, { asChild: !0, children: /* @__PURE__ */ t("div", { className: "flex cursor-pointer items-center gap-2", children: [
|
|
117
124
|
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-[#60697d] font-['Manrope']", children: "Filters Applied" }),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
125
|
+
/* @__PURE__ */ t(m, { children: [
|
|
126
|
+
/* @__PURE__ */ e(p, { asChild: !0, children: /* @__PURE__ */ e(
|
|
127
|
+
W,
|
|
128
|
+
{
|
|
129
|
+
color: "primary",
|
|
130
|
+
variant: "outline",
|
|
131
|
+
className: "font-['Manrope'] max-w-[140px] truncate",
|
|
132
|
+
children: o || "Not selected"
|
|
133
|
+
}
|
|
134
|
+
) }),
|
|
135
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", side: "top", children: o || "Not selected" })
|
|
136
|
+
] }),
|
|
137
|
+
/* @__PURE__ */ t(m, { children: [
|
|
138
|
+
/* @__PURE__ */ e(p, { asChild: !0, children: /* @__PURE__ */ e(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
className: g(
|
|
142
|
+
"flex h-8 w-8 items-center justify-center rounded-lg bg-[#f5f6fa] transition-transform duration-200",
|
|
143
|
+
f && "rotate-180"
|
|
144
|
+
),
|
|
145
|
+
children: /* @__PURE__ */ e(z, { className: "h-4 w-4 text-[#1f2b4d]" })
|
|
146
|
+
}
|
|
147
|
+
) }),
|
|
148
|
+
/* @__PURE__ */ e(h, { variant: "tertiary", side: "top", children: "Select filter" })
|
|
149
|
+
] })
|
|
137
150
|
] }) }),
|
|
138
151
|
/* @__PURE__ */ e(
|
|
139
|
-
|
|
152
|
+
H,
|
|
140
153
|
{
|
|
141
154
|
align: "start",
|
|
142
155
|
className: "w-[280px] p-0 shadow-[0_0_4px_0_rgba(0,0,0,0.12)]",
|
|
143
156
|
sideOffset: 8,
|
|
144
|
-
children: /* @__PURE__ */
|
|
145
|
-
|
|
146
|
-
/* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ t("div", { className: "flex w-full flex-col py-[8px] px-[6px]", children: [
|
|
158
|
+
_(),
|
|
159
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col", children: [
|
|
147
160
|
/* @__PURE__ */ e("div", { className: "px-1 py-[6px] text-xs font-medium text-[#60697d] font-['Manrope']", children: "Saved Filters" }),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
|
|
161
|
+
/* @__PURE__ */ t(
|
|
162
|
+
J,
|
|
150
163
|
{
|
|
151
|
-
value:
|
|
152
|
-
onValueChange: (a) =>
|
|
164
|
+
value: r,
|
|
165
|
+
onValueChange: (a) => O(a),
|
|
153
166
|
variant: "outline",
|
|
154
167
|
size: "sm",
|
|
155
168
|
className: "w-full px-1",
|
|
156
169
|
children: [
|
|
157
|
-
/* @__PURE__ */ e("div", { className: "py-[8px]", children: /* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */ e(
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
/* @__PURE__ */ e(
|
|
170
|
+
/* @__PURE__ */ e("div", { className: "py-[8px]", children: /* @__PURE__ */ t(K, { children: [
|
|
171
|
+
/* @__PURE__ */ e(N, { value: "All", children: "All" }),
|
|
172
|
+
/* @__PURE__ */ e(N, { value: "Global", children: "Global" }),
|
|
173
|
+
/* @__PURE__ */ e(N, { value: "Personal", children: "Personal" })
|
|
161
174
|
] }) }),
|
|
162
175
|
/* @__PURE__ */ e("div", { className: "pb-[8px]", children: /* @__PURE__ */ e(
|
|
163
|
-
|
|
176
|
+
U,
|
|
164
177
|
{
|
|
165
|
-
prefix: /* @__PURE__ */ e(
|
|
178
|
+
prefix: /* @__PURE__ */ e(V, { className: "h-4 w-4 text-gray-500" }),
|
|
166
179
|
placeholder: "Search filters...",
|
|
167
|
-
value:
|
|
168
|
-
onChange:
|
|
180
|
+
value: v,
|
|
181
|
+
onChange: G,
|
|
169
182
|
className: "h-9 px-1 border-none shadow-none focus-visible:ring-0"
|
|
170
183
|
}
|
|
171
184
|
) }),
|
|
172
|
-
/* @__PURE__ */ e("div", { className: "mt-0", children:
|
|
185
|
+
/* @__PURE__ */ e("div", { className: "mt-0", children: E() })
|
|
173
186
|
]
|
|
174
187
|
}
|
|
175
188
|
)
|
|
176
189
|
] }),
|
|
177
|
-
/* @__PURE__ */ e(
|
|
178
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ e(C, { className: "my-2" }),
|
|
191
|
+
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2 px-3 pb-1", children: [
|
|
179
192
|
/* @__PURE__ */ e(
|
|
180
|
-
|
|
193
|
+
y,
|
|
181
194
|
{
|
|
182
195
|
variant: "secondary",
|
|
183
|
-
onClick:
|
|
196
|
+
onClick: Q,
|
|
184
197
|
children: "Cancel"
|
|
185
198
|
}
|
|
186
199
|
),
|
|
187
200
|
/* @__PURE__ */ e(
|
|
188
|
-
|
|
201
|
+
y,
|
|
189
202
|
{
|
|
190
203
|
variant: "default",
|
|
191
|
-
onClick:
|
|
192
|
-
disabled: !
|
|
204
|
+
onClick: L,
|
|
205
|
+
disabled: !R,
|
|
193
206
|
children: "Apply Filter"
|
|
194
207
|
}
|
|
195
208
|
)
|
|
@@ -200,5 +213,5 @@ const se = ({
|
|
|
200
213
|
] });
|
|
201
214
|
};
|
|
202
215
|
export {
|
|
203
|
-
|
|
216
|
+
oe as FilterSummary
|
|
204
217
|
};
|
|
@@ -1,78 +1,82 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { TagGroup as
|
|
5
|
-
import { Tag as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import * as N from "react";
|
|
3
|
+
import C from "../horizontal-scroller/horizontal-scroller.js";
|
|
4
|
+
import { TagGroup as T } from "../tag-group.js";
|
|
5
|
+
import { Tag as b } from "../tag.js";
|
|
6
|
+
import { Tooltip as v, TooltipTrigger as u, TooltipContent as f } from "../tooltip.js";
|
|
7
|
+
import { Popover as k, PopoverTrigger as S, PopoverContent as z } from "../popover.js";
|
|
8
|
+
import { Button as j } from "../button.js";
|
|
9
|
+
import { X as I } from "lucide-react";
|
|
10
|
+
const O = ({
|
|
11
|
+
remainingValues: l,
|
|
12
|
+
viewAllTrigger: n = "expand",
|
|
12
13
|
onViewAll: c,
|
|
13
14
|
onItemRemove: d,
|
|
14
|
-
isRemovable:
|
|
15
|
+
isRemovable: g
|
|
15
16
|
}) => {
|
|
16
|
-
const [e, m] =
|
|
17
|
-
|
|
17
|
+
const [e, m] = N.useState(!1), s = e ? l : l.slice(0, 3), p = l.length > 3, t = () => {
|
|
18
|
+
n === "custom" ? c?.() : m(!0);
|
|
18
19
|
};
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
20
|
+
return /* @__PURE__ */ r(
|
|
21
|
+
z,
|
|
21
22
|
{
|
|
22
23
|
className: "w-[200px] p-0 rounded-[8px] bg-white shadow-[0_0_4px_0_rgba(0,0,0,0.12)] border-none",
|
|
23
24
|
align: "start",
|
|
24
25
|
sideOffset: 8,
|
|
25
|
-
children: /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */ o(
|
|
28
|
-
|
|
26
|
+
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: s.map((a, 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(v, { children: [
|
|
29
|
+
/* @__PURE__ */ r(u, { asChild: !0, children: /* @__PURE__ */ r("span", { className: "truncate", children: String(a) }) }),
|
|
30
|
+
/* @__PURE__ */ r(f, { variant: "tertiary", side: "right", children: String(a) })
|
|
31
|
+
] }),
|
|
32
|
+
g && /* @__PURE__ */ r(
|
|
29
33
|
"button",
|
|
30
34
|
{
|
|
31
35
|
onClick: (x) => {
|
|
32
|
-
x.stopPropagation(), d(
|
|
36
|
+
x.stopPropagation(), d(a);
|
|
33
37
|
},
|
|
34
38
|
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 transition-opacity",
|
|
35
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ r(I, { size: 12 })
|
|
36
40
|
}
|
|
37
41
|
)
|
|
38
42
|
] }, h)) }),
|
|
39
|
-
!e && p && /* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
43
|
+
!e && p && /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: [
|
|
44
|
+
/* @__PURE__ */ r("div", { className: "h-[1px] bg-[#e6e8f0] w-full" }),
|
|
45
|
+
/* @__PURE__ */ r(
|
|
46
|
+
j,
|
|
43
47
|
{
|
|
44
48
|
variant: "secondary",
|
|
45
49
|
size: "sm",
|
|
46
50
|
className: "w-full justify-center",
|
|
47
51
|
onClick: t,
|
|
48
|
-
children:
|
|
52
|
+
children: n === "custom" ? "View all" : `View all (${l.length})`
|
|
49
53
|
}
|
|
50
54
|
)
|
|
51
55
|
] })
|
|
52
56
|
] })
|
|
53
57
|
}
|
|
54
58
|
);
|
|
55
|
-
},
|
|
56
|
-
filters:
|
|
57
|
-
onFilterRemove:
|
|
59
|
+
}, _ = ({
|
|
60
|
+
filters: l,
|
|
61
|
+
onFilterRemove: n,
|
|
58
62
|
onOverflowClick: c,
|
|
59
63
|
onViewAll: d
|
|
60
|
-
}) => /* @__PURE__ */
|
|
61
|
-
|
|
64
|
+
}) => /* @__PURE__ */ r("div", { className: "flex flex-1 items-center min-w-0", children: /* @__PURE__ */ r(
|
|
65
|
+
C,
|
|
62
66
|
{
|
|
63
|
-
items:
|
|
67
|
+
items: l,
|
|
64
68
|
renderItem: (e, m) => {
|
|
65
|
-
const
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
m > 0 && /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
const s = Array.isArray(e.value) ? e.value : [e.value], p = s.slice(0, 2), t = s.slice(2), a = !!e.overflow, h = e.overflow?.label ? e.overflow.label : e.overflow?.count ? `+${e.overflow.count}` : null, x = t.length > 0, y = a || x, w = `+${t.length}`;
|
|
70
|
+
return /* @__PURE__ */ o("div", { className: "flex items-center px-1", children: [
|
|
71
|
+
m > 0 && /* @__PURE__ */ r("div", { className: "mx-3 h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
|
|
72
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
73
|
+
/* @__PURE__ */ o("span", { className: "text-xs font-medium leading-[21px] text-[#60697d] whitespace-nowrap", children: [
|
|
70
74
|
e.label,
|
|
71
|
-
e.required && /* @__PURE__ */
|
|
75
|
+
e.required && /* @__PURE__ */ r("span", { className: "text-red-500 ml-0.5", children: "*" })
|
|
72
76
|
] }),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
77
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
|
|
78
|
+
/* @__PURE__ */ r(
|
|
79
|
+
T,
|
|
76
80
|
{
|
|
77
81
|
spacing: "sm",
|
|
78
82
|
tags: p.map((i) => ({
|
|
@@ -81,43 +85,55 @@ const j = ({
|
|
|
81
85
|
size: "md",
|
|
82
86
|
shape: "rounded",
|
|
83
87
|
removable: e.removable,
|
|
84
|
-
onRemove: () =>
|
|
88
|
+
onRemove: () => n(e.id, i)
|
|
85
89
|
}))
|
|
86
90
|
}
|
|
87
91
|
),
|
|
88
|
-
|
|
92
|
+
y && (a ? (
|
|
89
93
|
// Server-side overflow: Simple tag, no popover
|
|
90
|
-
/* @__PURE__ */ o(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
variant: "secondary",
|
|
94
|
-
size: "md",
|
|
95
|
-
shape: "rounded",
|
|
96
|
-
className: "whitespace-nowrap bg-[#eceefd] text-[#4259ee] hover:bg-[#dce1fc] border-0 h-6 px-2 text-xs font-medium font-['Manrope'] cursor-pointer",
|
|
97
|
-
onClick: () => c?.(e.id),
|
|
98
|
-
children: h || u
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
) : (
|
|
102
|
-
// Client-side overflow: Popover
|
|
103
|
-
/* @__PURE__ */ r(N, { children: [
|
|
104
|
-
/* @__PURE__ */ o(k, { asChild: !0, children: /* @__PURE__ */ o(
|
|
105
|
-
f,
|
|
94
|
+
/* @__PURE__ */ o(v, { children: [
|
|
95
|
+
/* @__PURE__ */ r(u, { asChild: !0, children: /* @__PURE__ */ r(
|
|
96
|
+
b,
|
|
106
97
|
{
|
|
107
98
|
variant: "secondary",
|
|
108
99
|
size: "md",
|
|
109
100
|
shape: "rounded",
|
|
110
101
|
className: "whitespace-nowrap bg-[#eceefd] text-[#4259ee] hover:bg-[#dce1fc] border-0 h-6 px-2 text-xs font-medium font-['Manrope'] cursor-pointer",
|
|
111
|
-
|
|
102
|
+
onClick: () => c?.(e.id),
|
|
103
|
+
children: h || w
|
|
112
104
|
}
|
|
113
105
|
) }),
|
|
114
|
-
/* @__PURE__ */ o(
|
|
115
|
-
|
|
106
|
+
/* @__PURE__ */ o(f, { variant: "tertiary", side: "top", children: [
|
|
107
|
+
e.overflow?.count || t.length,
|
|
108
|
+
" more filters"
|
|
109
|
+
] })
|
|
110
|
+
] })
|
|
111
|
+
) : (
|
|
112
|
+
// Client-side overflow: Popover
|
|
113
|
+
/* @__PURE__ */ o(k, { children: [
|
|
114
|
+
/* @__PURE__ */ r(S, { asChild: !0, children: /* @__PURE__ */ o(v, { children: [
|
|
115
|
+
/* @__PURE__ */ r(u, { asChild: !0, children: /* @__PURE__ */ r(
|
|
116
|
+
b,
|
|
117
|
+
{
|
|
118
|
+
variant: "secondary",
|
|
119
|
+
size: "md",
|
|
120
|
+
shape: "rounded",
|
|
121
|
+
className: "whitespace-nowrap bg-[#eceefd] text-[#4259ee] hover:bg-[#dce1fc] border-0 h-6 px-2 text-xs font-medium font-['Manrope'] cursor-pointer",
|
|
122
|
+
children: w
|
|
123
|
+
}
|
|
124
|
+
) }),
|
|
125
|
+
/* @__PURE__ */ o(f, { variant: "tertiary", side: "top", children: [
|
|
126
|
+
t.length,
|
|
127
|
+
" more filters"
|
|
128
|
+
] })
|
|
129
|
+
] }) }),
|
|
130
|
+
/* @__PURE__ */ r(
|
|
131
|
+
O,
|
|
116
132
|
{
|
|
117
133
|
remainingValues: t,
|
|
118
134
|
viewAllTrigger: e.viewAllTrigger,
|
|
119
135
|
onViewAll: d,
|
|
120
|
-
onItemRemove: (i) =>
|
|
136
|
+
onItemRemove: (i) => n(e.id, i),
|
|
121
137
|
isRemovable: e.removable
|
|
122
138
|
}
|
|
123
139
|
)
|
|
@@ -132,5 +148,5 @@ const j = ({
|
|
|
132
148
|
}
|
|
133
149
|
) });
|
|
134
150
|
export {
|
|
135
|
-
|
|
151
|
+
_ as FilterTagList
|
|
136
152
|
};
|