@yuno-payments/dashboard-design-system 1.1.2 → 1.1.3-beta.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.
@@ -1,24 +1,24 @@
1
- import { j as o } from "../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as S, useState as E, useRef as F, useCallback as k, useEffect as Y } from "react";
3
- import { Button as T } from "../../../vendor/shadcn/button.js";
4
- import { Separator as $ } from "../../../vendor/shadcn/separator.js";
5
- import { Icon as j } from "../icon/icon.js";
6
- import { FilterSection as q } from "../filter/filter.js";
7
- import { FilterDateRangeValue as N, FilterDateRange as ke } from "../filter/filter-date-range.js";
1
+ import { j as s } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as N, useState as w, useRef as E, useCallback as T, useEffect as $ } from "react";
3
+ import { Button as j } from "../../../vendor/shadcn/button.js";
4
+ import { Separator as q } from "../../../vendor/shadcn/separator.js";
5
+ import { Icon as p } from "../icon/icon.js";
6
+ import { FilterSection as G } from "../filter/filter.js";
7
+ import { FilterDateRangeValue as k, FilterDateRange as we } from "../filter/filter-date-range.js";
8
8
  import { cn as h } from "../../../lib/utils.js";
9
- const G = S(
10
- ({ icon: d, label: p, isActive: l = !1, showChevron: g = !1, className: b, ...u }, V) => /* @__PURE__ */ o.jsxs(
9
+ const J = N(
10
+ ({ icon: d, label: C, isActive: l = !1, showChevron: x = !1, className: b, ...u }, v) => /* @__PURE__ */ s.jsxs(
11
11
  "button",
12
12
  {
13
- ref: V,
13
+ ref: v,
14
14
  className: h(
15
15
  "flex items-center gap-2 h-8 px-2 rounded-md w-full transition-colors shrink-0 hover:bg-secondary",
16
16
  b
17
17
  ),
18
18
  ...u,
19
19
  children: [
20
- d && /* @__PURE__ */ o.jsx(
21
- j,
20
+ d && /* @__PURE__ */ s.jsx(
21
+ p,
22
22
  {
23
23
  name: d,
24
24
  className: h(
@@ -27,18 +27,18 @@ const G = S(
27
27
  )
28
28
  }
29
29
  ),
30
- /* @__PURE__ */ o.jsx(
30
+ /* @__PURE__ */ s.jsx(
31
31
  "span",
32
32
  {
33
33
  className: h(
34
34
  "flex-1 text-sm font-normal text-left truncate",
35
35
  l ? "text-primary" : "text-foreground"
36
36
  ),
37
- children: p
37
+ children: C
38
38
  }
39
39
  ),
40
- (l || g) && /* @__PURE__ */ o.jsx(
41
- j,
40
+ (l || x) && /* @__PURE__ */ s.jsx(
41
+ p,
42
42
  {
43
43
  name: "CaretRight",
44
44
  className: h(
@@ -51,22 +51,22 @@ const G = S(
51
51
  }
52
52
  )
53
53
  );
54
- G.displayName = "FilterMenuItem";
55
- const J = S(
56
- ({ items: d, activeItemId: p, onItemClick: l, className: g }, b) => /* @__PURE__ */ o.jsx(
54
+ J.displayName = "FilterMenuItem";
55
+ const Q = N(
56
+ ({ items: d, activeItemId: C, onItemClick: l, className: x }, b) => /* @__PURE__ */ s.jsx(
57
57
  "div",
58
58
  {
59
59
  ref: b,
60
60
  className: h(
61
61
  "flex flex-col gap-2 w-64 h-full p-2 bg-muted border border-border rounded-md overflow-y-auto",
62
- g
62
+ x
63
63
  ),
64
- children: d.map((u) => /* @__PURE__ */ o.jsx(
65
- G,
64
+ children: d.map((u) => /* @__PURE__ */ s.jsx(
65
+ J,
66
66
  {
67
67
  icon: u.icon,
68
68
  label: u.label,
69
- isActive: p === u.id,
69
+ isActive: C === u.id,
70
70
  showChevron: u.showChevron,
71
71
  onClick: () => l?.(u.id)
72
72
  },
@@ -75,220 +75,204 @@ const J = S(
75
75
  }
76
76
  )
77
77
  );
78
- J.displayName = "FilterMenu";
79
- const Te = S(
78
+ Q.displayName = "FilterMenu";
79
+ const Ee = N(
80
80
  ({
81
81
  filters: d,
82
- buttonText: p = "Add filter",
82
+ buttonText: C = "Add filter",
83
83
  appliedFilters: l = [],
84
- onRemoveFilter: g,
84
+ onRemoveFilter: x,
85
85
  onClearAllFilters: b,
86
86
  onOpenChange: u,
87
- maxVisibleTags: V = 4,
88
- className: Q,
89
- disabled: Z = !1,
90
- applyOnClose: s = !1
91
- }, C) => {
92
- const [f, O] = E(!1), [m, ee] = E({}), D = F({}), I = F(d), c = k(
87
+ maxVisibleTags: v = 4,
88
+ className: Z,
89
+ disabled: O = !1,
90
+ applyOnClose: o = !1
91
+ }, D) => {
92
+ const [m, ee] = w(!1), [f, te] = w({}), I = E({}), S = E(d), c = T(
93
93
  (e) => {
94
- ee((r) => {
95
- const a = typeof e == "function" ? e(r) : e;
96
- return D.current = a, a;
94
+ te((n) => {
95
+ const r = typeof e == "function" ? e(n) : e;
96
+ return I.current = r, r;
97
97
  });
98
98
  },
99
99
  []
100
100
  );
101
- Y(() => {
102
- I.current = d;
101
+ $(() => {
102
+ S.current = d;
103
103
  }, [d]);
104
- const y = k(() => {
105
- if (console.log("[FilterDropdown] applyBufferedChanges called", {
106
- applyOnClose: s,
107
- bufferedChanges: D.current
108
- }), !s) return;
109
- const e = D.current, r = I.current;
110
- console.log("[FilterDropdown] Processing buffered changes", {
111
- changesCount: Object.keys(e).length,
112
- changes: e,
113
- filtersCount: r.length
114
- }), Object.entries(e).forEach(([a, n]) => {
115
- const i = r.find((x) => x.id === a);
116
- if (console.log("[FilterDropdown] Processing filter", { filterId: a, filter: !!i, changes: n }), !!i)
117
- switch (n.type) {
104
+ const F = T(() => {
105
+ if (!o) return;
106
+ const e = I.current, n = S.current;
107
+ Object.entries(e).forEach(([r, a]) => {
108
+ const i = n.find((g) => g.id === r);
109
+ if (i)
110
+ switch (a.type) {
118
111
  case "checkbox":
119
- n.checkboxValues !== void 0 && (console.log("[FilterDropdown] Applying checkbox values", { filterId: a, values: n.checkboxValues }), i.onChange?.(n.checkboxValues));
112
+ a.checkboxValues !== void 0 && i.onChange?.(a.checkboxValues);
120
113
  break;
121
114
  case "radio":
122
- n.radioValue !== void 0 && i.onValueChange?.(n.radioValue);
115
+ a.radioValue !== void 0 && i.onValueChange?.(a.radioValue);
123
116
  break;
124
117
  case "date":
125
- n.dateValue !== void 0 && i.onDateValueChange?.(n.dateValue), n.dateInit !== void 0 && i.onDateInitChange?.(n.dateInit), n.dateEnd !== void 0 && i.onDateEndChange?.(n.dateEnd), n.startTime !== void 0 && i.onStartTimeChange?.(n.startTime), n.endTime !== void 0 && i.onEndTimeChange?.(n.endTime);
118
+ a.dateValue !== void 0 && i.onDateValueChange?.(a.dateValue), a.dateInit !== void 0 && i.onDateInitChange?.(a.dateInit), a.dateEnd !== void 0 && i.onDateEndChange?.(a.dateEnd), a.startTime !== void 0 && i.onStartTimeChange?.(a.startTime), a.endTime !== void 0 && i.onEndTimeChange?.(a.endTime);
126
119
  break;
127
120
  case "custom":
128
- n.customValue !== void 0 && i.onCustomChange?.(n.customValue);
121
+ a.customValue !== void 0 && i.onCustomChange?.(a.customValue);
129
122
  break;
130
123
  }
131
124
  }), c({});
132
- }, [s, c]), w = k(
125
+ }, [o, c]), V = T(
133
126
  (e) => {
134
- console.log("[FilterDropdown] setIsOpen called", {
135
- open: e,
136
- isOpen: f,
137
- applyOnClose: s,
138
- bufferedChanges: D.current
139
- }), !e && f && s && (console.log("[FilterDropdown] Applying buffered changes on close", D.current), y()), e && !f && s && (console.log("[FilterDropdown] Clearing buffered changes on open"), c({})), O(e), u?.(e);
127
+ !e && m && o && F(), e && !m && o && c({}), ee(e), u?.(e);
140
128
  },
141
- [u, f, s, y, c]
142
- ), [B, A] = E(
129
+ [u, m, o, F, c]
130
+ ), [y, B] = w(
143
131
  d.length > 0 && d[0]?.id || ""
144
- ), M = F(null), te = k(
132
+ ), M = E(null), ne = T(
145
133
  (e) => {
146
- M.current = e, typeof C == "function" ? C(e) : C && (C.current = e);
134
+ M.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
147
135
  },
148
- [C]
136
+ [D]
149
137
  );
150
- Y(() => {
151
- if (!f) return;
152
- const e = (n) => {
153
- const i = n.target;
138
+ $(() => {
139
+ if (!m) return;
140
+ const e = (a) => {
141
+ const i = a.target;
154
142
  M.current?.contains(i) || i.closest?.(
155
143
  "[data-radix-popper-content-wrapper], [data-radix-portal]"
156
144
  ) || i.closest?.(
157
145
  ".rdp, .rdp-root, [data-calendar]"
158
- ) || w(!1);
159
- }, r = (n) => {
160
- n.key === "Escape" && w(!1);
161
- }, a = setTimeout(() => {
162
- document.addEventListener("mousedown", e), document.addEventListener("keydown", r);
146
+ ) || V(!1);
147
+ }, n = (a) => {
148
+ a.key === "Escape" && V(!1);
149
+ }, r = setTimeout(() => {
150
+ document.addEventListener("mousedown", e), document.addEventListener("keydown", n);
163
151
  }, 0);
164
152
  return () => {
165
- clearTimeout(a), document.removeEventListener("mousedown", e), document.removeEventListener("keydown", r);
153
+ clearTimeout(r), document.removeEventListener("mousedown", e), document.removeEventListener("keydown", n);
166
154
  };
167
- }, [f, w]);
168
- const ne = l.length > 0, re = l.slice(0, V), R = l.length - V, H = (e) => {
169
- if (d.find((n) => n.id === e)) return e;
170
- const a = e.split("-");
171
- if (a.length > 1) {
172
- const n = a[0];
173
- if (d.find((x) => x.id === n)) return n;
155
+ }, [m, V]);
156
+ const ae = l.length > 0, re = l.slice(0, v), R = l.length - v, A = (e) => {
157
+ if (d.find((a) => a.id === e)) return e;
158
+ const r = e.split("-");
159
+ if (r.length > 1) {
160
+ const a = r[0];
161
+ if (d.find((g) => g.id === a)) return a;
174
162
  }
175
163
  return e;
176
- }, P = (e) => {
177
- const r = H(e);
178
- return d.find((n) => n.id === r)?.clearable !== !1;
179
- }, ae = (e) => {
180
- const r = H(e);
181
- A(r), w(!0);
164
+ }, H = (e) => {
165
+ const n = A(e);
166
+ return d.find((a) => a.id === n)?.clearable !== !1;
167
+ }, se = (e) => {
168
+ const n = A(e);
169
+ B(n), V(!0);
182
170
  }, oe = l.some(
183
- (e) => P(e.id)
184
- ), se = d.map((e) => ({
171
+ (e) => H(e.id)
172
+ ), ie = d.map((e) => ({
185
173
  id: e.id,
186
174
  icon: e.icon,
187
175
  label: e.label
188
- })), t = d.find((e) => e.id === B), ie = (e, r) => s ? m[e]?.checkboxValues ?? r : r, de = (e, r) => s ? m[e]?.radioValue ?? r : r, ce = (e, r) => s ? m[e]?.dateValue ?? r : r, le = (e, r) => s ? m[e]?.dateInit ?? r : r, ue = (e, r) => s ? m[e]?.dateEnd ?? r : r, fe = (e, r) => s ? m[e]?.startTime ?? r : r, me = (e, r) => s ? m[e]?.endTime ?? r : r, he = (e, r, a) => (n) => {
189
- if (console.log("[FilterDropdown] Checkbox handler called", { filterId: e, values: n, applyOnClose: s, minSelection: a }), a !== void 0 && a > 0 && n.length < a) {
190
- console.log("[FilterDropdown] Blocked: minimum selection not met", { minSelection: a, actualLength: n.length });
191
- return;
192
- }
193
- s ? (console.log("[FilterDropdown] Buffering checkbox values", { filterId: e, values: n }), c((i) => ({
176
+ })), t = d.find((e) => e.id === y), de = (e, n) => o ? f[e]?.checkboxValues ?? n : n, ce = (e, n) => o ? f[e]?.radioValue ?? n : n, le = (e, n) => o ? f[e]?.dateValue ?? n : n, ue = (e, n) => o ? f[e]?.dateInit ?? n : n, fe = (e, n) => o ? f[e]?.dateEnd ?? n : n, me = (e, n) => o ? f[e]?.startTime ?? n : n, he = (e, n) => o ? f[e]?.endTime ?? n : n, xe = (e, n, r) => (a) => {
177
+ r !== void 0 && r > 0 && a.length < r || (o ? c((i) => ({
194
178
  ...i,
195
179
  [e]: {
196
180
  ...i[e],
197
181
  type: "checkbox",
198
- checkboxValues: n
182
+ checkboxValues: a
199
183
  }
200
- }))) : r?.(n);
201
- }, ge = (e, r) => (a) => {
202
- s ? c((n) => ({
203
- ...n,
184
+ })) : n?.(a));
185
+ }, be = (e, n) => (r) => {
186
+ o ? c((a) => ({
187
+ ...a,
204
188
  [e]: {
205
- ...n[e],
189
+ ...a[e],
206
190
  type: "radio",
207
- radioValue: a
191
+ radioValue: r
208
192
  }
209
- })) : r?.(a);
210
- }, be = (e, r) => (a) => {
211
- s ? c((n) => ({
212
- ...n,
193
+ })) : n?.(r);
194
+ }, ge = (e, n) => (r) => {
195
+ o ? c((a) => ({
196
+ ...a,
213
197
  [e]: {
214
- ...n[e],
198
+ ...a[e],
215
199
  type: "date",
216
- dateValue: a
200
+ dateValue: r
217
201
  }
218
- })) : r?.(a);
219
- }, xe = (e, r) => (a) => {
220
- s ? c((n) => ({
221
- ...n,
202
+ })) : n?.(r);
203
+ }, Ce = (e, n) => (r) => {
204
+ o ? c((a) => ({
205
+ ...a,
222
206
  [e]: {
223
- ...n[e],
207
+ ...a[e],
224
208
  type: "date",
225
- dateInit: a
209
+ dateInit: r
226
210
  }
227
- })) : r?.(a);
228
- }, pe = (e, r) => (a) => {
229
- s ? c((n) => ({
230
- ...n,
211
+ })) : n?.(r);
212
+ }, De = (e, n) => (r) => {
213
+ o ? c((a) => ({
214
+ ...a,
231
215
  [e]: {
232
- ...n[e],
216
+ ...a[e],
233
217
  type: "date",
234
- dateEnd: a
218
+ dateEnd: r
235
219
  }
236
- })) : r?.(a);
237
- }, Ce = (e, r) => (a) => {
238
- s ? c((n) => ({
239
- ...n,
220
+ })) : n?.(r);
221
+ }, Ve = (e, n) => (r) => {
222
+ o ? c((a) => ({
223
+ ...a,
240
224
  [e]: {
241
- ...n[e],
225
+ ...a[e],
242
226
  type: "date",
243
- startTime: a
227
+ startTime: r
244
228
  }
245
- })) : r?.(a);
246
- }, De = (e, r) => (a) => {
247
- s ? c((n) => ({
248
- ...n,
229
+ })) : n?.(r);
230
+ }, ve = (e, n) => (r) => {
231
+ o ? c((a) => ({
232
+ ...a,
249
233
  [e]: {
250
- ...n[e],
234
+ ...a[e],
251
235
  type: "date",
252
- endTime: a
236
+ endTime: r
253
237
  }
254
- })) : r?.(a);
255
- }, we = () => {
238
+ })) : n?.(r);
239
+ }, Te = () => {
256
240
  if (!t) return null;
257
241
  switch (t.type) {
258
242
  case "checkbox": {
259
- const e = ie(
243
+ const e = de(
260
244
  t.id,
261
245
  t.selectedValues || []
262
- ), r = t.description && (t.descriptionMinSelection === void 0 || e.length >= t.descriptionMinSelection);
263
- return /* @__PURE__ */ o.jsx(
264
- q,
246
+ ), n = t.description && (t.descriptionMinSelection === void 0 || e.length >= t.descriptionMinSelection);
247
+ return /* @__PURE__ */ s.jsx(
248
+ G,
265
249
  {
266
250
  title: t.label,
267
251
  items: t.items || [],
268
252
  selectedValues: e,
269
- onChange: he(t.id, t.onChange, t.minSelection),
253
+ onChange: xe(t.id, t.onChange, t.minSelection),
270
254
  searchable: t.searchable,
271
255
  searchPlaceholder: t.searchPlaceholder,
272
256
  showActions: t.showActions,
273
257
  enableSelectAll: t.enableSelectAll,
274
258
  enableInverse: t.enableInverse,
275
259
  enableNone: t.enableNone,
276
- description: r ? t.description : void 0
260
+ description: n ? t.description : void 0
277
261
  }
278
262
  );
279
263
  }
280
264
  case "radio":
281
- return /* @__PURE__ */ o.jsx(
282
- q,
265
+ return /* @__PURE__ */ s.jsx(
266
+ G,
283
267
  {
284
268
  type: "radio",
285
269
  title: t.label,
286
270
  items: t.items || [],
287
- selectedValue: de(
271
+ selectedValue: ce(
288
272
  t.id,
289
273
  t.selectedValue || ""
290
274
  ),
291
- onChange: ge(t.id, t.onValueChange),
275
+ onChange: be(t.id, t.onValueChange),
292
276
  searchable: t.searchable,
293
277
  searchPlaceholder: t.searchPlaceholder,
294
278
  showActions: t.showActions,
@@ -299,63 +283,63 @@ const Te = S(
299
283
  }
300
284
  );
301
285
  case "date": {
302
- const e = ce(
286
+ const e = le(
303
287
  t.id,
304
- t.dateValue || N.LAST_7_DAYS
305
- ), r = le(t.id, t.dateInit), a = ue(t.id, t.dateEnd), n = fe(t.id, t.startTime || ""), i = me(t.id, t.endTime || ""), x = be(
288
+ t.dateValue || k.LAST_7_DAYS
289
+ ), n = ue(t.id, t.dateInit), r = fe(t.id, t.dateEnd), a = me(t.id, t.startTime || ""), i = he(t.id, t.endTime || ""), g = o && f[t.id]?.dateInit !== void 0, z = o && f[t.id]?.dateEnd !== void 0, je = ge(
306
290
  t.id,
307
291
  t.onDateValueChange
308
- ), v = xe(
292
+ ), L = Ce(
309
293
  t.id,
310
294
  t.onDateInitChange
311
- ), z = pe(
295
+ ), P = De(
312
296
  t.id,
313
297
  t.onDateEndChange
314
- ), L = Ce(
298
+ ), U = Ve(
315
299
  t.id,
316
300
  t.onStartTimeChange
317
- ), U = De(
301
+ ), _ = ve(
318
302
  t.id,
319
303
  t.onEndTimeChange
320
- ), Ve = (_) => {
321
- if (x(_), _ === N.CUSTOM && !r && !a) {
322
- const K = /* @__PURE__ */ new Date(), W = new Date(K);
323
- W.setHours(23, 59, 59, 999);
324
- const X = new Date(K);
325
- X.setHours(0, 0, 0, 0), v(X), z(W), n || L("00:00:00"), i || U("23:59:59");
304
+ ), pe = (K) => {
305
+ if (je(K), K === k.CUSTOM && !g && !z) {
306
+ const W = /* @__PURE__ */ new Date(), X = new Date(W);
307
+ X.setHours(23, 59, 59, 999);
308
+ const Y = new Date(W);
309
+ Y.setHours(0, 0, 0, 0), L(Y), P(X), U("00:00:00"), _("23:59:59");
326
310
  }
327
311
  };
328
- return /* @__PURE__ */ o.jsx(
329
- ke,
312
+ return /* @__PURE__ */ s.jsx(
313
+ we,
330
314
  {
331
315
  value: e,
332
- onValueChange: Ve,
333
- showCustomFields: e === N.CUSTOM,
334
- startDate: r,
335
- endDate: a,
336
- startTime: n,
316
+ onValueChange: pe,
317
+ showCustomFields: e === k.CUSTOM,
318
+ startDate: n,
319
+ endDate: r,
320
+ startTime: a,
337
321
  endTime: i,
338
322
  mode: t.dateMode || "range",
339
323
  singleDayLabel: t.singleDayLabel,
340
324
  showAllTime: t.showAllTime,
341
- onStartDateChange: v,
342
- onEndDateChange: z,
343
- onStartTimeChange: L,
344
- onEndTimeChange: U,
325
+ onStartDateChange: L,
326
+ onEndDateChange: P,
327
+ onStartTimeChange: U,
328
+ onEndTimeChange: _,
345
329
  announcement: t.description
346
330
  }
347
331
  );
348
332
  }
349
333
  case "custom": {
350
- const e = s ? {
351
- bufferedValue: m[t.id]?.customValue,
352
- onDeferredChange: (r) => {
353
- c((a) => ({
354
- ...a,
334
+ const e = o ? {
335
+ bufferedValue: f[t.id]?.customValue,
336
+ onDeferredChange: (n) => {
337
+ c((r) => ({
338
+ ...r,
355
339
  [t.id]: {
356
- ...a[t.id],
340
+ ...r[t.id],
357
341
  type: "custom",
358
- customValue: r
342
+ customValue: n
359
343
  }
360
344
  }));
361
345
  },
@@ -367,50 +351,50 @@ const Te = S(
367
351
  return null;
368
352
  }
369
353
  };
370
- return /* @__PURE__ */ o.jsxs(
354
+ return /* @__PURE__ */ s.jsxs(
371
355
  "div",
372
356
  {
373
- ref: te,
374
- className: h("flex flex-col gap-1 relative", Q),
357
+ ref: ne,
358
+ className: h("flex flex-col gap-1 relative", Z),
375
359
  children: [
376
- /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-4", children: [
377
- /* @__PURE__ */ o.jsxs(
378
- T,
360
+ /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-4", children: [
361
+ /* @__PURE__ */ s.jsxs(
362
+ j,
379
363
  {
380
364
  variant: "outline",
381
365
  size: "sm",
382
366
  className: "gap-2",
383
- onClick: () => w(!f),
384
- disabled: Z,
367
+ onClick: () => V(!m),
368
+ disabled: O,
385
369
  children: [
386
- /* @__PURE__ */ o.jsx(j, { name: "FunnelSimple", className: "size-4" }),
387
- p
370
+ /* @__PURE__ */ s.jsx(p, { name: "FunnelSimple", className: "size-4" }),
371
+ C
388
372
  ]
389
373
  }
390
374
  ),
391
- ne ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
392
- /* @__PURE__ */ o.jsx($, { orientation: "vertical", className: "h-5" }),
393
- /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2", children: [
375
+ ae ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
376
+ /* @__PURE__ */ s.jsx(q, { orientation: "vertical", className: "h-5" }),
377
+ /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
394
378
  re.map((e) => {
395
- const r = P(e.id);
396
- return /* @__PURE__ */ o.jsxs(
397
- T,
379
+ const n = H(e.id);
380
+ return /* @__PURE__ */ s.jsxs(
381
+ j,
398
382
  {
399
383
  variant: "secondary",
400
- onClick: () => ae(e.id),
384
+ onClick: () => se(e.id),
401
385
  className: "display-flex items-center gap-2",
402
386
  size: "sm",
403
387
  children: [
404
388
  e.label,
405
- g && r && /* @__PURE__ */ o.jsx(
389
+ x && n && /* @__PURE__ */ s.jsx(
406
390
  "button",
407
391
  {
408
- onClick: (a) => {
409
- a.stopPropagation(), g(e.id);
392
+ onClick: (r) => {
393
+ r.stopPropagation(), x(e.id);
410
394
  },
411
395
  className: "inline-flex items-center justify-center",
412
396
  "aria-label": `Remove ${e.label} filter`,
413
- children: /* @__PURE__ */ o.jsx(j, { name: "X", className: "size-4" })
397
+ children: /* @__PURE__ */ s.jsx(p, { name: "X", className: "size-4" })
414
398
  }
415
399
  )
416
400
  ]
@@ -418,28 +402,28 @@ const Te = S(
418
402
  e.id
419
403
  );
420
404
  }),
421
- R > 0 && /* @__PURE__ */ o.jsxs(T, { children: [
405
+ R > 0 && /* @__PURE__ */ s.jsxs(j, { children: [
422
406
  "+",
423
407
  R,
424
408
  " more"
425
409
  ] }),
426
- b && oe && /* @__PURE__ */ o.jsx(
427
- T,
410
+ b && oe && /* @__PURE__ */ s.jsx(
411
+ j,
428
412
  {
429
413
  variant: "ghost",
430
414
  size: "sm",
431
415
  className: "h-8 px-3 py-2",
432
416
  onClick: b,
433
- children: /* @__PURE__ */ o.jsx("span", { className: "text-xs font-medium leading-none text-primary", children: "Clear filters" })
417
+ children: /* @__PURE__ */ s.jsx("span", { className: "text-xs font-medium leading-none text-primary", children: "Clear filters" })
434
418
  }
435
419
  )
436
420
  ] })
437
- ] }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
438
- /* @__PURE__ */ o.jsx($, { orientation: "vertical", className: "h-5" }),
439
- /* @__PURE__ */ o.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: "No filters applied" })
421
+ ] }) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
422
+ /* @__PURE__ */ s.jsx(q, { orientation: "vertical", className: "h-5" }),
423
+ /* @__PURE__ */ s.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: "No filters applied" })
440
424
  ] })
441
425
  ] }),
442
- f && /* @__PURE__ */ o.jsxs(
426
+ m && /* @__PURE__ */ s.jsxs(
443
427
  "div",
444
428
  {
445
429
  className: h(
@@ -450,15 +434,15 @@ const Te = S(
450
434
  "bg-popover border border-border rounded-md p-2"
451
435
  ),
452
436
  children: [
453
- /* @__PURE__ */ o.jsx(
454
- J,
437
+ /* @__PURE__ */ s.jsx(
438
+ Q,
455
439
  {
456
- items: se,
457
- activeItemId: B,
458
- onItemClick: A
440
+ items: ie,
441
+ activeItemId: y,
442
+ onItemClick: B
459
443
  }
460
444
  ),
461
- /* @__PURE__ */ o.jsx("div", { className: "flex flex-col gap-4 p-6 bg-popover w-[448px] h-full rounded-md overflow-y-auto", children: we() })
445
+ /* @__PURE__ */ s.jsx("div", { className: "flex flex-col gap-4 p-6 bg-popover w-[448px] h-full rounded-md overflow-y-auto", children: Te() })
462
446
  ]
463
447
  }
464
448
  )
@@ -467,9 +451,9 @@ const Te = S(
467
451
  );
468
452
  }
469
453
  );
470
- Te.displayName = "FilterDropdown";
454
+ Ee.displayName = "FilterDropdown";
471
455
  export {
472
- Te as FilterDropdown,
473
- J as FilterMenu,
474
- G as FilterMenuItem
456
+ Ee as FilterDropdown,
457
+ Q as FilterMenu,
458
+ J as FilterMenuItem
475
459
  };