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,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import { X as Ne } from "lucide-react";
|
|
4
4
|
import { CalendarMonth as Re, Info as Z } from "../../../icons/index.js";
|
|
5
5
|
import { format as s, isValid as C, parse as P } from "date-fns";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as p, padValidDateString as $, maskDate as Y } from "../../../lib/utils.js";
|
|
7
7
|
import { Popover as Se, PopoverTrigger as Ce, PopoverContent as Pe } from "../popover.js";
|
|
8
8
|
import { Calendar as Ie } from "../calendar.js";
|
|
9
9
|
import { Tooltip as _, TooltipTrigger as F, TooltipContent as ee } from "../tooltip.js";
|
|
@@ -13,23 +13,23 @@ import { useImpactNovaI18n as Ee } from "../../../i18n/ImpactNovaI18nContext.js"
|
|
|
13
13
|
const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c.forwardRef(
|
|
14
14
|
({
|
|
15
15
|
value: t,
|
|
16
|
-
onChange:
|
|
16
|
+
onChange: D,
|
|
17
17
|
format: n = "MM/dd/yyyy",
|
|
18
18
|
placeholder: te,
|
|
19
19
|
minDate: ne,
|
|
20
20
|
maxDate: oe,
|
|
21
21
|
startMonth: le,
|
|
22
22
|
endMonth: re,
|
|
23
|
-
showFooter:
|
|
23
|
+
showFooter: y = !0,
|
|
24
24
|
calendarType: K = "calendar",
|
|
25
25
|
fiscalMode: M = "basic",
|
|
26
26
|
selectionMode: z = "week",
|
|
27
27
|
fiscalMonthPattern: B,
|
|
28
28
|
fiscalYearStartMonth: T = 1,
|
|
29
29
|
weekStartsOn: O = 1,
|
|
30
|
-
disabled:
|
|
30
|
+
disabled: i,
|
|
31
31
|
className: se,
|
|
32
|
-
isError:
|
|
32
|
+
isError: b,
|
|
33
33
|
size: H,
|
|
34
34
|
label: X,
|
|
35
35
|
helperText: I,
|
|
@@ -41,20 +41,20 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
41
41
|
}, ie) => {
|
|
42
42
|
const { locale: q, t: V } = Ee(), o = c.useMemo(() => Ve(q), [q]), G = te ?? V("datePicker.selectWeekRange"), J = c.useRef(null), de = c.useRef(null);
|
|
43
43
|
c.useRef(null), c.useRef(null), c.useImperativeHandle(ie, () => J.current);
|
|
44
|
-
const [l,
|
|
44
|
+
const [l, k] = c.useState(!1), W = c.useRef(!1), [v, m] = c.useState(t), [R, u] = c.useState(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), [S, x] = c.useState(a(t) ? s(a(t), n, { locale: o }) : ""), [fe, L] = c.useState(t?.from?.startDate || /* @__PURE__ */ new Date());
|
|
45
45
|
c.useEffect(() => {
|
|
46
|
-
l || (
|
|
46
|
+
l || (u(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), x(a(t) ? s(a(t), n, { locale: o }) : ""), m(t));
|
|
47
47
|
}, [t, n, l, o]), c.useEffect(() => {
|
|
48
|
-
l && (
|
|
48
|
+
l && (m(t), u(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), x(a(t) ? s(a(t), n, { locale: o }) : ""), L(t?.from?.startDate || /* @__PURE__ */ new Date()));
|
|
49
49
|
}, [l, t, n, o]);
|
|
50
50
|
const pe = (e) => {
|
|
51
|
-
|
|
51
|
+
m(e), e?.from ? (u(s(e.from.startDate, n, { locale: o })), x(s(a(e), n, { locale: o }))) : (u(""), x("")), !y && e?.from && e?.to && e.from.startDate.getTime() !== e.to.startDate.getTime() && (D?.(e), k(!1));
|
|
52
52
|
}, me = (e) => {
|
|
53
|
-
|
|
53
|
+
D?.(e !== void 0 ? e : v), k(!1);
|
|
54
54
|
}, j = () => {
|
|
55
|
-
|
|
55
|
+
m(t), u(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), x(a(t) ? s(a(t), n, { locale: o }) : ""), k(!1);
|
|
56
56
|
}, Q = () => {
|
|
57
|
-
|
|
57
|
+
m(void 0), u(""), x(""), D?.(void 0), y || k(!1);
|
|
58
58
|
}, E = (e) => We(e, {
|
|
59
59
|
calendarType: K,
|
|
60
60
|
fiscalMode: M,
|
|
@@ -63,48 +63,48 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
63
63
|
fiscalYearStartMonth: T,
|
|
64
64
|
weekStartsOn: O
|
|
65
65
|
}), ue = (e) => {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
|
|
66
|
+
const w = e.target.value, d = Y(w, n, R);
|
|
67
|
+
if (u(d), d === "") {
|
|
68
|
+
const g = { from: void 0, to: v?.to };
|
|
69
|
+
m(g), y || D?.(g);
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
if (C(
|
|
74
|
-
const
|
|
75
|
-
|
|
72
|
+
const h = P(d, n, /* @__PURE__ */ new Date(), { locale: o });
|
|
73
|
+
if (C(h) && d.length === n.length) {
|
|
74
|
+
const N = { from: E(h), to: v?.to };
|
|
75
|
+
m(N), x(s(a(N), n, { locale: o })), y || D?.(N);
|
|
76
76
|
}
|
|
77
77
|
}, xe = (e) => {
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
|
|
78
|
+
const w = e.target.value, d = Y(w, n, S);
|
|
79
|
+
if (x(d), d === "") {
|
|
80
|
+
const g = { from: v?.from, to: void 0 };
|
|
81
|
+
m(g), y || D?.(g);
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
const
|
|
85
|
-
if (C(
|
|
86
|
-
const
|
|
87
|
-
|
|
84
|
+
const h = P(d, n, /* @__PURE__ */ new Date(), { locale: o });
|
|
85
|
+
if (C(h) && d.length === n.length) {
|
|
86
|
+
const g = E(h), N = { from: v?.from, to: g };
|
|
87
|
+
m(N), v?.from && u(s(v.from.startDate, n, { locale: o })), h && L(h), y || D?.(N);
|
|
88
88
|
}
|
|
89
89
|
}, U = () => {
|
|
90
90
|
if (l) return;
|
|
91
|
-
const e = $(R, n),
|
|
92
|
-
if (!
|
|
93
|
-
|
|
94
|
-
else if (
|
|
95
|
-
const
|
|
96
|
-
|
|
91
|
+
const e = $(R, n), w = $(S, n), d = P(e, n, /* @__PURE__ */ new Date(), { locale: o }), h = P(w, n, /* @__PURE__ */ new Date(), { locale: o }), g = C(d) && e.length === n.length, N = C(h) && w.length === n.length;
|
|
92
|
+
if (!g || !N)
|
|
93
|
+
u(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), x(a(t) ? s(a(t), n, { locale: o }) : ""), m(t);
|
|
94
|
+
else if (u(e), x(w), !y) {
|
|
95
|
+
const be = E(d), ve = E(h);
|
|
96
|
+
D?.({ from: be, to: ve });
|
|
97
97
|
}
|
|
98
|
-
}, he = t?.from ? s(t.from.startDate, n, { locale: o }) : "", ge = a(t) ? s(a(t), n, { locale: o }) : "", ke = he !== R, we = ge !== S,
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
X && /* @__PURE__ */
|
|
98
|
+
}, he = t?.from ? s(t.from.startDate, n, { locale: o }) : "", ge = a(t) ? s(a(t), n, { locale: o }) : "", ke = he !== R, we = ge !== S, De = R.length === n.length && !C(P(R, n, /* @__PURE__ */ new Date(), { locale: o })), ye = S.length === n.length && !C(P(S, n, /* @__PURE__ */ new Date(), { locale: o }));
|
|
99
|
+
return /* @__PURE__ */ f("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "week-range-picker", "data-disabled": i || void 0, children: [
|
|
100
|
+
/* @__PURE__ */ f("div", { className: "flex flex-col gap-[6px]", children: [
|
|
101
|
+
X && /* @__PURE__ */ f(
|
|
102
102
|
"label",
|
|
103
103
|
{
|
|
104
|
-
className:
|
|
104
|
+
className: p(
|
|
105
105
|
"text-xs font-medium leading-[18px] text-content-tertiary",
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
i && "opacity-70",
|
|
107
|
+
b && "text-destructive"
|
|
108
108
|
),
|
|
109
109
|
children: [
|
|
110
110
|
X,
|
|
@@ -113,29 +113,31 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
113
113
|
]
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ f(
|
|
117
117
|
"div",
|
|
118
118
|
{
|
|
119
|
-
className:
|
|
119
|
+
className: p(
|
|
120
120
|
"w-full",
|
|
121
121
|
I && A === "absolute" && "relative"
|
|
122
122
|
),
|
|
123
123
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
|
|
124
|
+
/* @__PURE__ */ f(Se, { open: i ? !1 : l, onOpenChange: (e) => {
|
|
125
|
+
i || k(e);
|
|
126
|
+
}, children: [
|
|
127
|
+
/* @__PURE__ */ r(Ce, { asChild: !0, children: /* @__PURE__ */ f(
|
|
126
128
|
"div",
|
|
127
129
|
{
|
|
128
130
|
"data-state": l ? "open" : "closed",
|
|
129
|
-
className:
|
|
131
|
+
className: p(
|
|
130
132
|
"flex w-full items-center justify-between gap-2 rounded-md border bg-canvas-elevated px-3 text-sm shadow-sm transition-colors hover:border-brand disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:border-stroke",
|
|
131
|
-
|
|
133
|
+
b ? "border-destructive hover:border-destructive" : "border-field",
|
|
132
134
|
H === "sm" ? "h-6" : H === "md" ? "h-[28px]" : "h-8",
|
|
133
|
-
|
|
135
|
+
i && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
|
|
134
136
|
"cursor-pointer",
|
|
135
137
|
se
|
|
136
138
|
),
|
|
137
139
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ f("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
|
|
139
141
|
/* @__PURE__ */ r(
|
|
140
142
|
"input",
|
|
141
143
|
{
|
|
@@ -146,15 +148,15 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
146
148
|
onBlur: U,
|
|
147
149
|
onClick: (e) => l && e.stopPropagation(),
|
|
148
150
|
onKeyDown: (e) => {
|
|
149
|
-
(e.key === "Enter" || e.key === "ArrowDown") && !l && (e.preventDefault(), W.current = !0,
|
|
151
|
+
(e.key === "Enter" || e.key === "ArrowDown") && !l && !i && (e.preventDefault(), W.current = !0, k(!0)), e.key === "Escape" && l && (e.preventDefault(), j());
|
|
150
152
|
},
|
|
151
153
|
placeholder: l ? n : G,
|
|
152
|
-
disabled: !!
|
|
154
|
+
disabled: !!i,
|
|
153
155
|
"aria-label": "Start Date",
|
|
154
156
|
"data-field": "start",
|
|
155
|
-
className:
|
|
157
|
+
className: p(
|
|
156
158
|
"flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
|
|
157
|
-
|
|
159
|
+
De ? "text-destructive" : ke ? "text-content-muted" : ""
|
|
158
160
|
),
|
|
159
161
|
...ae
|
|
160
162
|
}
|
|
@@ -169,21 +171,21 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
169
171
|
onBlur: U,
|
|
170
172
|
onClick: (e) => l && e.stopPropagation(),
|
|
171
173
|
onKeyDown: (e) => {
|
|
172
|
-
(e.key === "Enter" || e.key === "ArrowDown") && !l && (e.preventDefault(), W.current = !0,
|
|
174
|
+
(e.key === "Enter" || e.key === "ArrowDown") && !l && !i && (e.preventDefault(), W.current = !0, k(!0)), e.key === "Escape" && l && (e.preventDefault(), j());
|
|
173
175
|
},
|
|
174
176
|
placeholder: l ? n : G,
|
|
175
|
-
disabled: !!
|
|
177
|
+
disabled: !!i,
|
|
176
178
|
"aria-label": "End Date",
|
|
177
179
|
"data-field": "end",
|
|
178
|
-
className:
|
|
180
|
+
className: p(
|
|
179
181
|
"flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
|
|
180
|
-
|
|
182
|
+
ye ? "text-destructive" : we ? "text-content-muted" : ""
|
|
181
183
|
)
|
|
182
184
|
}
|
|
183
185
|
)
|
|
184
186
|
] }),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
t?.from && !
|
|
187
|
+
/* @__PURE__ */ f("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
188
|
+
t?.from && !i && /* @__PURE__ */ f(_, { children: [
|
|
187
189
|
/* @__PURE__ */ r(F, { asChild: !0, children: /* @__PURE__ */ r(
|
|
188
190
|
Ne,
|
|
189
191
|
{
|
|
@@ -195,11 +197,11 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
195
197
|
) }),
|
|
196
198
|
/* @__PURE__ */ r(ee, { variant: "tertiary", side: "top", children: V("calendar.clear") })
|
|
197
199
|
] }),
|
|
198
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ f(_, { children: [
|
|
199
201
|
/* @__PURE__ */ r(F, { asChild: !0, children: /* @__PURE__ */ r("button", { type: "button", tabIndex: 0, "aria-label": V("datePicker.selectWeekRange"), onClick: (e) => {
|
|
200
|
-
e.stopPropagation(),
|
|
202
|
+
e.stopPropagation(), i || k(!l);
|
|
201
203
|
}, onKeyDown: (e) => {
|
|
202
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), W.current = !0,
|
|
204
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), i || (W.current = !0, k(!l)));
|
|
203
205
|
}, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ r(Re, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
|
|
204
206
|
/* @__PURE__ */ r(ee, { variant: "tertiary", side: "top", children: V("datePicker.selectWeekRange") })
|
|
205
207
|
] })
|
|
@@ -220,14 +222,14 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
220
222
|
{
|
|
221
223
|
pickerType: "week",
|
|
222
224
|
weekMode: "range",
|
|
223
|
-
selectedWeeks:
|
|
225
|
+
selectedWeeks: v,
|
|
224
226
|
onWeekSelect: pe,
|
|
225
227
|
month: fe,
|
|
226
228
|
onMonthChange: L,
|
|
227
229
|
disabled: { before: ne, after: oe },
|
|
228
230
|
startMonth: le,
|
|
229
231
|
endMonth: re,
|
|
230
|
-
showFooter:
|
|
232
|
+
showFooter: y,
|
|
231
233
|
calendarType: K,
|
|
232
234
|
fiscalMode: M,
|
|
233
235
|
selectionMode: z,
|
|
@@ -243,23 +245,23 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
243
245
|
}
|
|
244
246
|
)
|
|
245
247
|
] }),
|
|
246
|
-
I && A === "absolute" && /* @__PURE__ */
|
|
248
|
+
I && A === "absolute" && /* @__PURE__ */ f("div", { className: p("absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-[6px]", b && "text-destructive"), children: [
|
|
247
249
|
/* @__PURE__ */ r(
|
|
248
250
|
Z,
|
|
249
251
|
{
|
|
250
252
|
size: "xs",
|
|
251
|
-
className:
|
|
253
|
+
className: p(
|
|
252
254
|
"shrink-0",
|
|
253
|
-
|
|
255
|
+
b ? "text-destructive" : "text-content-muted"
|
|
254
256
|
)
|
|
255
257
|
}
|
|
256
258
|
),
|
|
257
259
|
/* @__PURE__ */ r(
|
|
258
260
|
"p",
|
|
259
261
|
{
|
|
260
|
-
className:
|
|
262
|
+
className: p(
|
|
261
263
|
"min-w-0 text-[12px] font-medium leading-[18px] text-navigation-muted",
|
|
262
|
-
|
|
264
|
+
b && "text-destructive"
|
|
263
265
|
),
|
|
264
266
|
children: I
|
|
265
267
|
}
|
|
@@ -269,23 +271,23 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
|
|
|
269
271
|
}
|
|
270
272
|
)
|
|
271
273
|
] }),
|
|
272
|
-
I && A === "flow" && /* @__PURE__ */
|
|
274
|
+
I && A === "flow" && /* @__PURE__ */ f("div", { className: p("flex items-center gap-[6px]", b && "text-destructive"), children: [
|
|
273
275
|
/* @__PURE__ */ r(
|
|
274
276
|
Z,
|
|
275
277
|
{
|
|
276
278
|
size: "xs",
|
|
277
|
-
className:
|
|
279
|
+
className: p(
|
|
278
280
|
"shrink-0",
|
|
279
|
-
|
|
281
|
+
b ? "text-destructive" : "text-content-muted"
|
|
280
282
|
)
|
|
281
283
|
}
|
|
282
284
|
),
|
|
283
285
|
/* @__PURE__ */ r(
|
|
284
286
|
"p",
|
|
285
287
|
{
|
|
286
|
-
className:
|
|
288
|
+
className: p(
|
|
287
289
|
"text-[12px] font-medium leading-[18px] text-navigation-muted",
|
|
288
|
-
|
|
290
|
+
b && "text-destructive"
|
|
289
291
|
),
|
|
290
292
|
children: I
|
|
291
293
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import * as B from "react";
|
|
3
3
|
import { ChevronDown as E } from "lucide-react";
|
|
4
|
-
import { Accordion as P, AccordionItem as V, AccordionTrigger as
|
|
5
|
-
import { Badge as
|
|
4
|
+
import { Accordion as P, AccordionItem as V, AccordionTrigger as R, AccordionContent as I } from "../accordion.js";
|
|
5
|
+
import { Badge as _ } from "../badge.js";
|
|
6
6
|
import { Checkbox as z } from "../checkbox.js";
|
|
7
7
|
import { FilterPopoverContent as D } from "../filter-strip/filter-tag-list.js";
|
|
8
8
|
import { Popover as M, PopoverTrigger as j } from "../popover.js";
|
|
@@ -28,7 +28,7 @@ function X({ section: a }) {
|
|
|
28
28
|
/* @__PURE__ */ e("p", { className: "text-xs font-semibold leading-5 text-content-heading", children: a.title ?? "Attributes" }),
|
|
29
29
|
/* @__PURE__ */ t("div", { className: "mt-2 flex flex-wrap gap-1.5", children: [
|
|
30
30
|
s.map((c, u) => /* @__PURE__ */ e(
|
|
31
|
-
|
|
31
|
+
_,
|
|
32
32
|
{
|
|
33
33
|
variant: "subtle",
|
|
34
34
|
color: "neutral",
|
|
@@ -107,7 +107,7 @@ const H = B.forwardRef(
|
|
|
107
107
|
collapseAriaLabel: T = "Collapse details",
|
|
108
108
|
...b
|
|
109
109
|
}, g) => {
|
|
110
|
-
const
|
|
110
|
+
const N = d !== void 0, S = N ? d ? h : "" : void 0, m = !!(o || n?.checked), $ = f != null && f.length > 0 || v != null, w = (r) => /* @__PURE__ */ t(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
113
|
className: p(
|
|
@@ -172,7 +172,7 @@ const H = B.forwardRef(
|
|
|
172
172
|
type: "single",
|
|
173
173
|
collapsible: !0,
|
|
174
174
|
disabled: x,
|
|
175
|
-
...
|
|
175
|
+
...N ? { value: S } : {
|
|
176
176
|
defaultValue: c ? h : void 0
|
|
177
177
|
},
|
|
178
178
|
onValueChange: (r) => u?.(r === h),
|
|
@@ -185,7 +185,7 @@ const H = B.forwardRef(
|
|
|
185
185
|
/* @__PURE__ */ t("div", { className: "flex items-start gap-3 px-3 py-3", children: [
|
|
186
186
|
C,
|
|
187
187
|
/* @__PURE__ */ t(
|
|
188
|
-
|
|
188
|
+
R,
|
|
189
189
|
{
|
|
190
190
|
variant: "plain",
|
|
191
191
|
className: p(
|
|
@@ -193,11 +193,11 @@ const H = B.forwardRef(
|
|
|
193
193
|
x && "pointer-events-none opacity-50"
|
|
194
194
|
),
|
|
195
195
|
children: [
|
|
196
|
-
|
|
196
|
+
w(!1),
|
|
197
197
|
/* @__PURE__ */ e(
|
|
198
198
|
"span",
|
|
199
199
|
{
|
|
200
|
-
className: "
|
|
200
|
+
className: "mt-0.5 inline-flex shrink-0 text-content-muted transition-transform duration-200 group-data-[state=open]:rotate-180",
|
|
201
201
|
"aria-hidden": !0,
|
|
202
202
|
children: /* @__PURE__ */ e(E, { className: "size-4" })
|
|
203
203
|
}
|
|
@@ -211,7 +211,7 @@ const H = B.forwardRef(
|
|
|
211
211
|
}
|
|
212
212
|
)
|
|
213
213
|
] }),
|
|
214
|
-
/* @__PURE__ */ e(
|
|
214
|
+
/* @__PURE__ */ e(I, { className: "border-0 bg-transparent p-0 pb-[0.01rem]", children: /* @__PURE__ */ t("div", { className: "mx-2 mb-2 overflow-hidden bg-[#f8f9fb] pt-2 rounded-lg", children: [
|
|
215
215
|
f?.map((r) => G(r)),
|
|
216
216
|
v ? /* @__PURE__ */ e("div", { className: "px-4 py-3 sm:px-5", children: v }) : null
|
|
217
217
|
] }) })
|
|
@@ -233,7 +233,7 @@ const H = B.forwardRef(
|
|
|
233
233
|
...b,
|
|
234
234
|
children: /* @__PURE__ */ t("div", { className: "flex items-start gap-3 px-3 py-3", children: [
|
|
235
235
|
C,
|
|
236
|
-
|
|
236
|
+
w(!!x)
|
|
237
237
|
] })
|
|
238
238
|
}
|
|
239
239
|
);
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { FilterItem } from '../types/filter-strip.types';
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
interface FilterTagListProps {
|
|
3
4
|
filters: FilterItem[];
|
|
4
5
|
onFilterRemove: (id: string, value?: string | number) => void;
|
|
5
6
|
onOverflowClick?: (id: string) => void;
|
|
6
7
|
onViewAll?: () => void;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
interface ExternalCopyFunctionProps {
|
|
10
|
+
e: React.MouseEvent<HTMLButtonElement>;
|
|
11
|
+
val: string | number;
|
|
12
|
+
index: number;
|
|
13
|
+
}
|
|
14
|
+
declare const FilterPopoverContent: ({ remainingValues, viewAllTrigger, onViewAll, onItemRemove, isRemovable, isCopyable, externalCopyFunction }: {
|
|
9
15
|
remainingValues: (string | number)[];
|
|
10
16
|
viewAllTrigger?: "expand" | "custom";
|
|
11
17
|
onViewAll?: () => void;
|
|
12
18
|
onItemRemove: (val: string | number) => void;
|
|
13
19
|
isRemovable?: boolean;
|
|
14
20
|
isCopyable?: boolean;
|
|
21
|
+
externalCopyFunction?: (props: ExternalCopyFunctionProps) => void;
|
|
15
22
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
23
|
declare const FilterTagList: ({ filters, onFilterRemove: _onFilterRemove, onOverflowClick, onViewAll, }: FilterTagListProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
24
|
export { FilterTagList, FilterPopoverContent };
|