@krosoft/react 0.0.78 → 0.0.79

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.
Files changed (97) hide show
  1. package/dist/{LoadingState-CqRLmkxn.js → LoadingState-DQjGcT2l.js} +5 -5
  2. package/dist/MetricCard-4VI9Ki0g.js +83 -0
  3. package/dist/SearchInput-Cf5NHhnz.js +698 -0
  4. package/dist/TableFilter-DgChe4aX.js +406 -0
  5. package/dist/TableSettings-4YLJSh4G.js +2064 -0
  6. package/dist/{ThemeSelector-sTd9T2OD.js → ThemeSelector-MqD5QvHl.js} +8 -8
  7. package/dist/{Topbar-BqC05zWP.js → Topbar-DifQ00kV.js} +26 -27
  8. package/dist/{badge-kADcbb2Y.js → badge-Bw-aBz_H.js} +1 -1
  9. package/dist/components/core/cards/KpiCard.d.ts +1 -1
  10. package/dist/components/core/cards/KpiCard.d.ts.map +1 -1
  11. package/dist/components/core/cards/MetricCard.d.ts +1 -2
  12. package/dist/components/core/cards/MetricCard.d.ts.map +1 -1
  13. package/dist/components/core/cards/index.js +1 -1
  14. package/dist/components/core/filters/ActiveFilters.d.ts +10 -0
  15. package/dist/components/core/filters/ActiveFilters.d.ts.map +1 -0
  16. package/dist/components/core/filters/AdvancedFilters.d.ts +11 -0
  17. package/dist/components/core/filters/AdvancedFilters.d.ts.map +1 -0
  18. package/dist/components/core/filters/FilterField.d.ts +11 -0
  19. package/dist/components/core/filters/FilterField.d.ts.map +1 -0
  20. package/dist/components/core/filters/SearchableFilterPill.d.ts +15 -0
  21. package/dist/components/core/filters/SearchableFilterPill.d.ts.map +1 -0
  22. package/dist/components/core/filters/TableFilter.d.ts +17 -0
  23. package/dist/components/core/filters/TableFilter.d.ts.map +1 -0
  24. package/dist/components/core/filters/index.d.ts +5 -0
  25. package/dist/components/core/filters/index.d.ts.map +1 -0
  26. package/dist/components/core/filters/index.js +7 -0
  27. package/dist/components/core/index.d.ts +2 -0
  28. package/dist/components/core/index.d.ts.map +1 -1
  29. package/dist/components/core/index.js +34 -26
  30. package/dist/components/core/inputs/DatePicker.d.ts +9 -0
  31. package/dist/components/core/inputs/DatePicker.d.ts.map +1 -0
  32. package/dist/components/core/inputs/MultiSelect.d.ts +17 -0
  33. package/dist/components/core/inputs/MultiSelect.d.ts.map +1 -0
  34. package/dist/components/core/inputs/SearchInput.d.ts.map +1 -1
  35. package/dist/components/core/inputs/SearchableSelect.d.ts +14 -0
  36. package/dist/components/core/inputs/SearchableSelect.d.ts.map +1 -0
  37. package/dist/components/core/inputs/index.d.ts +3 -1
  38. package/dist/components/core/inputs/index.d.ts.map +1 -1
  39. package/dist/components/core/inputs/index.js +6 -3
  40. package/dist/components/core/navbar/index.js +1 -1
  41. package/dist/components/core/states/index.js +1 -1
  42. package/dist/components/core/table/DataTable.d.ts +17 -2
  43. package/dist/components/core/table/DataTable.d.ts.map +1 -1
  44. package/dist/components/core/table/TableBody.d.ts +2 -2
  45. package/dist/components/core/table/TableBody.d.ts.map +1 -1
  46. package/dist/components/core/table/TableHeader.d.ts +1 -1
  47. package/dist/components/core/table/TableHeader.d.ts.map +1 -1
  48. package/dist/components/core/table/index.d.ts +1 -3
  49. package/dist/components/core/table/index.d.ts.map +1 -1
  50. package/dist/components/core/table/index.js +9 -9
  51. package/dist/components/core/theme/ThemeSelector.d.ts +2 -1
  52. package/dist/components/core/theme/ThemeSelector.d.ts.map +1 -1
  53. package/dist/components/core/theme/index.js +1 -1
  54. package/dist/components/index.js +86 -63
  55. package/dist/components/ui/badge.d.ts +1 -1
  56. package/dist/components/ui/badge.d.ts.map +1 -1
  57. package/dist/components/ui/button.d.ts.map +1 -1
  58. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  59. package/dist/components/ui/index.d.ts +4 -1
  60. package/dist/components/ui/index.d.ts.map +1 -1
  61. package/dist/components/ui/index.js +50 -35
  62. package/dist/components/ui/label.d.ts +6 -0
  63. package/dist/components/ui/label.d.ts.map +1 -0
  64. package/dist/components/ui/select.d.ts +1 -1
  65. package/dist/components/ui/select.d.ts.map +1 -1
  66. package/dist/components/ui/sheet.d.ts.map +1 -1
  67. package/dist/components/ui/toast.d.ts +1 -1
  68. package/dist/components/ui/toast.d.ts.map +1 -1
  69. package/dist/{floating-ui.react-dom-BPCyLQfI.js → floating-ui.react-dom-BIcsGc3t.js} +553 -526
  70. package/dist/hooks/index.js +1 -1
  71. package/dist/hooks/ui/useDataTable.d.ts +1 -1
  72. package/dist/hooks/ui/useDataTable.d.ts.map +1 -1
  73. package/dist/hooks/ui/useToast.d.ts +5 -13
  74. package/dist/hooks/ui/useToast.d.ts.map +1 -1
  75. package/dist/popover-UjRQmYGN.js +5889 -0
  76. package/dist/select-CtU681LB.js +2070 -0
  77. package/dist/tailwind/index.d.ts.map +1 -1
  78. package/dist/tooltip-DzQngJZK.js +828 -0
  79. package/dist/types/FilterFieldConfig.d.ts +16 -0
  80. package/dist/types/FilterFieldConfig.d.ts.map +1 -0
  81. package/dist/types/FilterSection.d.ts +6 -0
  82. package/dist/types/FilterSection.d.ts.map +1 -0
  83. package/dist/types/index.d.ts +0 -1
  84. package/dist/types/index.d.ts.map +1 -1
  85. package/dist/{useTheme-D__o7mLN.js → useTheme-DsHPKCDp.js} +24 -18
  86. package/package.json +4 -2
  87. package/dist/Combination-CzdDhqdB.js +0 -564
  88. package/dist/DataTable-CjFA9p4V.js +0 -2216
  89. package/dist/DateRangePicker-rrXXEYz8.js +0 -1240
  90. package/dist/MetricCard-B1Y-27_U.js +0 -78
  91. package/dist/calendar-BMReToKR.js +0 -3911
  92. package/dist/checkbox-BI6Lm_p-.js +0 -358
  93. package/dist/chevron-down-ki5-dwtL.js +0 -11
  94. package/dist/select-B-hcmC3K.js +0 -1468
  95. package/dist/tooltip-gI1Mp9DG.js +0 -779
  96. package/dist/types/DataTableProps.d.ts +0 -19
  97. package/dist/types/DataTableProps.d.ts.map +0 -1
@@ -0,0 +1,406 @@
1
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
+ import { useState as k, useEffect as M, useMemo as A } from "react";
3
+ import { M as O, a as $, D as j, b as I, c as _, S as z } from "./SearchInput-Cf5NHhnz.js";
4
+ import { X as C, I as P, S as R, n as B, g as Q, j as V, m as H, L as X, i as G, P as J, e as K, d as U, c as E } from "./popover-UjRQmYGN.js";
5
+ import { B as w, C as W } from "./floating-ui.react-dom-BIcsGc3t.js";
6
+ import "./card-7XPLAra3.js";
7
+ import { S as Y, h as Z, i as q, a as ee, c as re } from "./select-CtU681LB.js";
8
+ import { B as L } from "./badge-Bw-aBz_H.js";
9
+ import { c as te } from "./index-gWiv5-6R.js";
10
+ import { c as le } from "./createLucideIcon-CRdjzt2A.js";
11
+ /**
12
+ * @license lucide-react v1.16.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */
17
+ const ae = [
18
+ [
19
+ "path",
20
+ {
21
+ d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
22
+ key: "sc7q7i"
23
+ }
24
+ ]
25
+ ], se = le("funnel", ae), T = (s, l, a = {}) => {
26
+ if (l instanceof Date)
27
+ return l.toLocaleDateString("fr-FR");
28
+ const o = String(l), i = a[`${s}_${o}`];
29
+ return i !== void 0 ? i : s.includes("ok") || l === "true" || l === "false" ? l === "true" ? "Oui" : "Non" : o;
30
+ };
31
+ function ce({ filters: s, onRemoveFilter: l, onClearAll: a, filterLabels: o = {}, optionLabels: i = {} }) {
32
+ const d = Object.entries(s).filter(([n, p]) => !(p == null || p === "" || Array.isArray(p) && p.length === 0));
33
+ return d.length === 0 ? null : /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-2 mb-4", children: [
34
+ /* @__PURE__ */ r("span", { className: "text-sm text-gray-600 font-medium", children: "Filtres actifs :" }),
35
+ d.flatMap(([n, p]) => {
36
+ const f = o[n] ?? n;
37
+ if (Array.isArray(p))
38
+ return p.map((v) => {
39
+ const b = T(n, v, i);
40
+ return /* @__PURE__ */ m(
41
+ L,
42
+ {
43
+ variant: "secondary",
44
+ className: "flex items-center gap-1 px-3 py-1 bg-blue-50 text-blue-700 border border-blue-200 hover:bg-blue-100",
45
+ children: [
46
+ f,
47
+ ": ",
48
+ b,
49
+ /* @__PURE__ */ r(
50
+ "button",
51
+ {
52
+ onClick: () => {
53
+ l(n, v);
54
+ },
55
+ className: "ml-1 hover:bg-blue-200 rounded-full p-0.5",
56
+ children: /* @__PURE__ */ r(C, { className: "size-4" })
57
+ }
58
+ )
59
+ ]
60
+ },
61
+ `${n}_${String(v)}`
62
+ );
63
+ });
64
+ const x = T(n, p, i);
65
+ return /* @__PURE__ */ m(L, { variant: "secondary", className: "flex items-center gap-1 px-3 py-1 bg-blue-50 text-blue-700 border border-blue-200 hover:bg-blue-100", children: [
66
+ f,
67
+ ": ",
68
+ x,
69
+ /* @__PURE__ */ r(
70
+ "button",
71
+ {
72
+ onClick: () => {
73
+ l(n);
74
+ },
75
+ className: "ml-1 hover:bg-blue-200 rounded-full p-0.5",
76
+ children: /* @__PURE__ */ r(C, { className: "size-4" })
77
+ }
78
+ )
79
+ ] }, n);
80
+ }),
81
+ d.length > 0 && /* @__PURE__ */ r("button", { onClick: a, className: "text-xs text-red-500 hover:text-red-600 transition-colors font-medium ml-2", children: "Effacer tout" })
82
+ ] });
83
+ }
84
+ const ne = ({ field: s, value: l, onChange: a, onToggleMultiSelect: o }) => {
85
+ var i;
86
+ switch (s.type) {
87
+ case "text":
88
+ return /* @__PURE__ */ r(
89
+ P,
90
+ {
91
+ placeholder: s.placeholder,
92
+ value: l ?? "",
93
+ onChange: (d) => {
94
+ a(d.target.value);
95
+ }
96
+ }
97
+ );
98
+ case "number":
99
+ return /* @__PURE__ */ r(
100
+ P,
101
+ {
102
+ type: "number",
103
+ placeholder: s.placeholder,
104
+ value: l ?? "",
105
+ onChange: (d) => {
106
+ a(d.target.value);
107
+ },
108
+ min: s.min,
109
+ max: s.max
110
+ }
111
+ );
112
+ case "select":
113
+ return s.searchable === !0 ? /* @__PURE__ */ r(
114
+ I,
115
+ {
116
+ options: s.options ?? [],
117
+ value: l,
118
+ onChange: a,
119
+ placeholder: s.placeholder,
120
+ searchPlaceholder: s.searchPlaceholder
121
+ }
122
+ ) : /* @__PURE__ */ m(Y, { value: l ?? "", onValueChange: a, children: [
123
+ /* @__PURE__ */ r(Z, { className: te((l === void 0 || l === "") && "text-muted-foreground"), children: /* @__PURE__ */ r(q, { placeholder: s.placeholder }) }),
124
+ /* @__PURE__ */ r(ee, { children: (i = s.options) == null ? void 0 : i.map((d) => /* @__PURE__ */ r(re, { value: d.value, children: d.label }, d.value)) })
125
+ ] });
126
+ case "date":
127
+ return /* @__PURE__ */ r(j, { date: l, onDateChange: a, placeholder: s.placeholder ?? "Sélectionner une date" });
128
+ case "date-range":
129
+ return /* @__PURE__ */ r($, { value: l, onChange: a, placeholder: s.placeholder });
130
+ case "multi-select":
131
+ return /* @__PURE__ */ r(
132
+ O,
133
+ {
134
+ options: s.options ?? [],
135
+ selected: l ?? [],
136
+ onToggle: o,
137
+ onClear: () => {
138
+ a([]);
139
+ },
140
+ onSelectAll: a,
141
+ placeholder: s.placeholder,
142
+ searchable: s.searchable,
143
+ searchPlaceholder: s.searchPlaceholder
144
+ }
145
+ );
146
+ default:
147
+ return null;
148
+ }
149
+ };
150
+ function oe({
151
+ sections: s,
152
+ filters: l,
153
+ onFiltersChange: a,
154
+ buttonText: o = "Plus de filtres",
155
+ sheetTitle: i = "Filtres avancés"
156
+ }) {
157
+ const [d, n] = k(!1), [p, f] = k(l);
158
+ M(() => {
159
+ f(l);
160
+ }, [l, d]);
161
+ const x = (g, t) => {
162
+ f((h) => ({ ...h, [g]: t }));
163
+ }, v = (g, t) => {
164
+ const h = p[g], e = Array.isArray(h) ? h : [], u = e.includes(t) ? e.filter((c) => c !== t) : [...e, t];
165
+ x(g, u);
166
+ }, b = () => {
167
+ a(p), n(!1);
168
+ }, N = () => {
169
+ f({}), a({}), n(!1);
170
+ };
171
+ return /* @__PURE__ */ m(R, { open: d, onOpenChange: n, children: [
172
+ /* @__PURE__ */ r(B, { asChild: !0, children: /* @__PURE__ */ m(w, { variant: "outline", className: "gap-2", children: [
173
+ /* @__PURE__ */ r(se, { className: "size-4 shrink-0" }),
174
+ o
175
+ ] }) }),
176
+ /* @__PURE__ */ m(Q, { side: "right", className: "w-[400px] sm:w-[500px] flex flex-col p-0", children: [
177
+ /* @__PURE__ */ r(V, { className: "p-6 pb-0", children: /* @__PURE__ */ r(H, { children: i }) }),
178
+ /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto p-6 pt-6", children: /* @__PURE__ */ r("div", { className: "space-y-6", children: s.map((g, t) => /* @__PURE__ */ m("div", { className: "space-y-4", children: [
179
+ /* @__PURE__ */ r("h3", { className: "font-semibold text-sm text-gray-900 dark:text-gray-100 border-b pb-2", children: g.title }),
180
+ g.filters.map((h) => /* @__PURE__ */ m("div", { className: "space-y-2", children: [
181
+ /* @__PURE__ */ r(X, { htmlFor: h.key, children: h.label }),
182
+ /* @__PURE__ */ r(
183
+ ne,
184
+ {
185
+ field: h,
186
+ value: p[h.key],
187
+ onChange: (e) => {
188
+ x(h.key, e);
189
+ },
190
+ onToggleMultiSelect: (e) => {
191
+ v(h.key, e);
192
+ }
193
+ }
194
+ )
195
+ ] }, h.key))
196
+ ] }, t)) }) }),
197
+ /* @__PURE__ */ m(G, { className: "gap-2 p-6 border-t bg-white dark:bg-gray-950", children: [
198
+ /* @__PURE__ */ r(w, { variant: "outline", className: "flex-1", onClick: N, children: "Effacer les filtres" }),
199
+ /* @__PURE__ */ r(w, { className: "flex-1 bg-orange-500 hover:bg-orange-600 text-white", onClick: b, children: "Rechercher" })
200
+ ] })
201
+ ] })
202
+ ] });
203
+ }
204
+ function ie({
205
+ label: s,
206
+ options: l,
207
+ selected: a,
208
+ onToggle: o,
209
+ onClear: i,
210
+ onSelectAll: d,
211
+ searchable: n = !1,
212
+ searchPlaceholder: p = "Rechercher..."
213
+ }) {
214
+ const [f, x] = k(""), v = a.length > 0, b = A(() => f === "" ? l : l.filter((t) => t.label.toLowerCase().includes(f.toLowerCase())), [l, f]), N = A(() => b.length === 0 ? !1 : b.every((t) => a.includes(t.value)), [b, a]), g = () => {
215
+ if (N)
216
+ if (d !== void 0) {
217
+ const t = b.map((e) => e.value), h = a.filter((e) => !t.includes(e));
218
+ d(h);
219
+ } else i !== void 0 ? i() : a.forEach((t) => {
220
+ o(t);
221
+ });
222
+ else if (d !== void 0) {
223
+ const t = [...a];
224
+ b.forEach((h) => {
225
+ t.includes(h.value) || t.push(h.value);
226
+ }), d(t);
227
+ } else
228
+ b.forEach((t) => {
229
+ a.includes(t.value) || o(t.value);
230
+ });
231
+ };
232
+ return /* @__PURE__ */ m(
233
+ J,
234
+ {
235
+ onOpenChange: () => {
236
+ x("");
237
+ },
238
+ children: [
239
+ /* @__PURE__ */ r(K, { asChild: !0, children: /* @__PURE__ */ m(
240
+ "button",
241
+ {
242
+ className: `inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm transition-colors whitespace-nowrap ${v ? "border-primary bg-primary/10 text-primary font-medium" : "border-border bg-card text-card-foreground hover:bg-muted"}`,
243
+ children: [
244
+ s,
245
+ a.length > 0 && /* @__PURE__ */ r("span", { className: "flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary px-1 text-[10px] font-bold text-primary-foreground", children: a.length }),
246
+ /* @__PURE__ */ r(W, { className: "size-3.5 opacity-60" })
247
+ ]
248
+ }
249
+ ) }),
250
+ /* @__PURE__ */ m(U, { className: "w-56 p-0", align: "start", children: [
251
+ n ? /* @__PURE__ */ r("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ m("div", { className: "relative", children: [
252
+ /* @__PURE__ */ r(_, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
253
+ /* @__PURE__ */ r(
254
+ "input",
255
+ {
256
+ className: "w-full rounded-md bg-muted/50 py-1.5 pl-7 pr-2 text-sm text-foreground placeholder:text-muted-foreground outline-none focus:ring-1 focus:ring-ring",
257
+ placeholder: p,
258
+ value: f,
259
+ onChange: (t) => {
260
+ x(t.target.value);
261
+ },
262
+ autoFocus: !0
263
+ }
264
+ )
265
+ ] }) }) : null,
266
+ /* @__PURE__ */ m("div", { className: "flex flex-col gap-0.5 max-h-56 overflow-y-auto p-1.5", children: [
267
+ b.length > 0 && /* @__PURE__ */ m("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
268
+ /* @__PURE__ */ r(E, { checked: N, onCheckedChange: g }),
269
+ "Tout sélectionner"
270
+ ] }),
271
+ b.length === 0 && /* @__PURE__ */ r("p", { className: "px-2 py-3 text-center text-xs text-muted-foreground", children: "Aucun résultat" }),
272
+ b.map((t) => /* @__PURE__ */ m("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
273
+ /* @__PURE__ */ r(
274
+ E,
275
+ {
276
+ checked: a.includes(t.value),
277
+ onCheckedChange: () => {
278
+ o(t.value);
279
+ }
280
+ }
281
+ ),
282
+ t.label
283
+ ] }, t.value))
284
+ ] }),
285
+ a.length > 0 && /* @__PURE__ */ r("div", { className: "border-t border-border p-1.5", children: /* @__PURE__ */ r(
286
+ "button",
287
+ {
288
+ onClick: () => {
289
+ i !== void 0 ? i() : a.forEach((t) => {
290
+ o(t);
291
+ });
292
+ },
293
+ className: "w-full rounded-md px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted transition-colors text-center",
294
+ children: "Tout désélectionner"
295
+ }
296
+ ) })
297
+ ] })
298
+ ]
299
+ }
300
+ );
301
+ }
302
+ function ye({
303
+ searchQuery: s,
304
+ onSearchChange: l,
305
+ searchPlaceholder: a = "Rechercher...",
306
+ filters: o,
307
+ onFiltersChange: i,
308
+ filterLabels: d = {},
309
+ sections: n,
310
+ advancedButtonText: p = "Filtres",
311
+ sheetTitle: f = "Filtres avancés"
312
+ }) {
313
+ const x = (e, u) => {
314
+ const c = o[e], y = Array.isArray(c) ? c : [], S = y.includes(u) ? y.filter((D) => D !== u) : [...y, u], F = { ...o };
315
+ S.length === 0 ? delete F[e] : F[e] = S, i(F);
316
+ }, v = (e) => {
317
+ const u = { ...o };
318
+ delete u[e], i(u);
319
+ }, b = () => {
320
+ i({});
321
+ }, N = (e, u) => {
322
+ const c = { ...o }, y = c[e];
323
+ Array.isArray(y) && u !== void 0 ? (c[e] = y.filter((S) => S !== u), Array.isArray(c[e]) && c[e].length === 0 && delete c[e]) : delete c[e], i(c);
324
+ }, g = A(() => {
325
+ const e = [];
326
+ return n.forEach((u) => {
327
+ u.filters.forEach((c) => {
328
+ c.isQuickFilter === !0 && e.push({
329
+ key: c.key,
330
+ label: c.label,
331
+ options: c.options ?? [],
332
+ searchable: c.searchable,
333
+ searchPlaceholder: c.searchPlaceholder
334
+ });
335
+ });
336
+ }), e;
337
+ }, [n]), t = A(() => {
338
+ const e = { ...d };
339
+ return n.forEach((u) => {
340
+ u.filters.forEach((c) => {
341
+ e[c.key] = c.label;
342
+ });
343
+ }), e;
344
+ }, [n, d]), h = A(() => {
345
+ const e = {};
346
+ return n.forEach((u) => {
347
+ u.filters.forEach((c) => {
348
+ c.options !== void 0 && c.options.forEach((y) => {
349
+ e[`${c.key}_${y.value}`] = y.label;
350
+ });
351
+ });
352
+ }), e;
353
+ }, [n]);
354
+ return /* @__PURE__ */ m("div", { className: "space-y-4 w-full", children: [
355
+ /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3 justify-between", children: /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-3", children: [
356
+ l !== void 0 ? /* @__PURE__ */ r(
357
+ z,
358
+ {
359
+ searchQuery: s,
360
+ onSearch: l,
361
+ onClear: () => {
362
+ l("");
363
+ },
364
+ placeholder: a
365
+ }
366
+ ) : null,
367
+ g.map((e) => /* @__PURE__ */ r(
368
+ ie,
369
+ {
370
+ label: e.label,
371
+ options: e.options,
372
+ selected: Array.isArray(o[e.key]) ? o[e.key] : [],
373
+ onToggle: (u) => {
374
+ x(e.key, u);
375
+ },
376
+ onClear: () => {
377
+ v(e.key);
378
+ },
379
+ onSelectAll: (u) => {
380
+ i({ ...o, [e.key]: u });
381
+ },
382
+ searchable: e.searchable,
383
+ searchPlaceholder: e.searchPlaceholder
384
+ },
385
+ e.key
386
+ )),
387
+ n.length > 0 && /* @__PURE__ */ r(oe, { sections: n, filters: o, onFiltersChange: i, buttonText: p, sheetTitle: f })
388
+ ] }) }),
389
+ /* @__PURE__ */ r(
390
+ ce,
391
+ {
392
+ filters: o,
393
+ onRemoveFilter: N,
394
+ onClearAll: b,
395
+ filterLabels: t,
396
+ optionLabels: h
397
+ }
398
+ )
399
+ ] });
400
+ }
401
+ export {
402
+ ce as A,
403
+ ie as S,
404
+ ye as T,
405
+ oe as a
406
+ };