@krosoft/react 0.0.98 → 0.0.100

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 (31) hide show
  1. package/dist/{AppSubTitle-Bt3_01sd.js → AppSubTitle-DBxJVB46.js} +1 -1
  2. package/dist/{AppTitle-cR9yMcWN.js → AppTitle-DDQoaHBb.js} +1 -1
  3. package/dist/{AppVerticalTabs-Br5Y27x2.js → AppVerticalTabs-CYx0jMXp.js} +2 -2
  4. package/dist/{ConfirmationDialog-Bhboi93k.js → ConfirmationDialog-bBFPpP2z.js} +44 -44
  5. package/dist/{DataTable-7kgRjvT3.js → DataTable-locK3Z44.js} +1 -1
  6. package/dist/{ErrorAlert-D1laKrGq.js → ErrorAlert-B2LV1J2R.js} +4 -4
  7. package/dist/{MetricCard-5xmlrXzH.js → MetricCard-CFwSSiQY.js} +1 -1
  8. package/dist/{SearchInput-CcCFcweT.js → SearchInput-t-ab1DdJ.js} +137 -137
  9. package/dist/{TableFilter-Dd9SvVEF.js → TableFilter-BjYjDtSo.js} +2 -2
  10. package/dist/components/core/cards/index.js +1 -1
  11. package/dist/components/core/dialogs/index.js +2 -2
  12. package/dist/components/core/filters/index.js +1 -1
  13. package/dist/components/core/index.js +10 -10
  14. package/dist/components/core/inputs/MultiSelect.d.ts +2 -4
  15. package/dist/components/core/inputs/MultiSelect.d.ts.map +1 -1
  16. package/dist/components/core/inputs/SearchableSelect.d.ts +2 -4
  17. package/dist/components/core/inputs/SearchableSelect.d.ts.map +1 -1
  18. package/dist/components/core/inputs/index.js +1 -1
  19. package/dist/components/core/layouts/index.js +2 -2
  20. package/dist/components/core/states/index.js +1 -1
  21. package/dist/components/core/table/index.js +1 -1
  22. package/dist/components/core/tabs/index.js +1 -1
  23. package/dist/components/index.js +11 -11
  24. package/dist/components/ui/command.d.ts.map +1 -1
  25. package/dist/components/ui/index.js +2 -2
  26. package/dist/{toaster-Cz2Lbp2C.js → toaster-BTQcWjuV.js} +1 -1
  27. package/dist/{toggle-group-pAjKlGGO.js → toggle-group-6CH5BRLO.js} +573 -573
  28. package/dist/types/FilterFieldConfig.d.ts +2 -4
  29. package/dist/types/FilterFieldConfig.d.ts.map +1 -1
  30. package/dist/types/FilterSection.d.ts.map +1 -1
  31. package/package.json +2 -2
@@ -1,11 +1,11 @@
1
- import { jsxs as s, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
2
  import * as L from "react";
3
- import { useState as C, useRef as P, useEffect as j, useMemo as S } from "react";
4
- import { cm as E, cn as N, co as k, cp as F, cq as W, H as A, bv as X, bx as V, bw as _, ce as J, _ as R, aW as I } from "./toggle-group-pAjKlGGO.js";
3
+ import { useState as C, useRef as P, useEffect as j, useMemo as W } from "react";
4
+ import { cm as E, cn as k, co as N, cp as F, cq as T, H as A, bv as X, bx as V, bw as _, ce as J, _ as R, aW as I } from "./toggle-group-6CH5BRLO.js";
5
5
  import "./alert-srKINZRG.js";
6
- import { c as b } from "./tailwind.helper-gWiv5-6R.js";
7
- import { B as x, C as H } from "./tooltip-mWS3Mix6.js";
8
- import { X as D, C as Q } from "./select-CDIMkakd.js";
6
+ import { c as v } from "./tailwind.helper-gWiv5-6R.js";
7
+ import { B as w, C as H } from "./tooltip-mWS3Mix6.js";
8
+ import { X as S, C as Q } from "./select-CDIMkakd.js";
9
9
  import "next-themes";
10
10
  import { c as Y } from "./index-BSI9LuBZ.js";
11
11
  /**
@@ -82,9 +82,9 @@ const $ = [
82
82
  other: "presque {{count}} ans"
83
83
  }
84
84
  }, K = (e, t, l) => {
85
- let r;
85
+ let a;
86
86
  const i = B[e];
87
- return typeof i == "string" ? r = i : t === 1 ? r = i.one : r = i.other.replace("{{count}}", String(t)), l != null && l.addSuffix ? l.comparison && l.comparison > 0 ? "dans " + r : "il y a " + r : r;
87
+ return typeof i == "string" ? a = i : t === 1 ? a = i.one : a = i.other.replace("{{count}}", String(t)), l != null && l.addSuffix ? l.comparison && l.comparison > 0 ? "dans " + a : "il y a " + a : a;
88
88
  }, G = {
89
89
  full: "EEEE d MMMM y",
90
90
  long: "d MMMM y",
@@ -120,7 +120,7 @@ const $ = [
120
120
  tomorrow: "'demain à' p'",
121
121
  nextWeek: "eeee 'prochain à' p",
122
122
  other: "P"
123
- }, ne = (e, t, l, r) => te[e], re = {
123
+ }, re = (e, t, l, a) => te[e], ne = {
124
124
  narrow: ["av. J.-C", "ap. J.-C"],
125
125
  abbreviated: ["av. J.-C", "ap. J.-C"],
126
126
  wide: ["avant Jésus-Christ", "après Jésus-Christ"]
@@ -203,36 +203,36 @@ const $ = [
203
203
  night: "du matin"
204
204
  }
205
205
  }, le = (e, t) => {
206
- const l = Number(e), r = t == null ? void 0 : t.unit;
206
+ const l = Number(e), a = t == null ? void 0 : t.unit;
207
207
  if (l === 0) return "0";
208
208
  const i = ["year", "week", "hour", "minute", "second"];
209
209
  let u;
210
- return l === 1 ? u = r && i.includes(r) ? "ère" : "er" : u = "ème", l + u;
210
+ return l === 1 ? u = a && i.includes(a) ? "ère" : "er" : u = "ème", l + u;
211
211
  }, de = ["MMM", "MMMM"], ce = {
212
212
  preprocessor: (e, t) => e.getDate() === 1 || !t.some(
213
- (r) => r.isToken && de.includes(r.value)
213
+ (a) => a.isToken && de.includes(a.value)
214
214
  ) ? t : t.map(
215
- (r) => r.isToken && r.value === "do" ? { isToken: !0, value: "d" } : r
215
+ (a) => a.isToken && a.value === "do" ? { isToken: !0, value: "d" } : a
216
216
  ),
217
217
  ordinalNumber: le,
218
- era: N({
219
- values: re,
218
+ era: k({
219
+ values: ne,
220
220
  defaultWidth: "wide"
221
221
  }),
222
- quarter: N({
222
+ quarter: k({
223
223
  values: ae,
224
224
  defaultWidth: "wide",
225
225
  argumentCallback: (e) => e - 1
226
226
  }),
227
- month: N({
227
+ month: k({
228
228
  values: oe,
229
229
  defaultWidth: "wide"
230
230
  }),
231
- day: N({
231
+ day: k({
232
232
  values: ie,
233
233
  defaultWidth: "wide"
234
234
  }),
235
- dayPeriod: N({
235
+ dayPeriod: k({
236
236
  values: se,
237
237
  defaultWidth: "wide"
238
238
  })
@@ -246,13 +246,13 @@ const $ = [
246
246
  narrow: /^T?[1234]/i,
247
247
  abbreviated: /^[1234](er|ème|e)? trim\.?/i,
248
248
  wide: /^[1234](er|ème|e)? trimestre/i
249
- }, ge = {
249
+ }, be = {
250
250
  any: [/1/i, /2/i, /3/i, /4/i]
251
- }, ve = {
251
+ }, ge = {
252
252
  narrow: /^[jfmasond]/i,
253
253
  abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
254
254
  wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
255
- }, be = {
255
+ }, ve = {
256
256
  narrow: [
257
257
  /^j/i,
258
258
  /^f/i,
@@ -286,10 +286,10 @@ const $ = [
286
286
  short: /^(di|lu|ma|me|je|ve|sa)/i,
287
287
  abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
288
288
  wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
289
- }, we = {
289
+ }, xe = {
290
290
  narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
291
291
  any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
292
- }, xe = {
292
+ }, we = {
293
293
  narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
294
294
  any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
295
295
  }, Me = {
@@ -303,65 +303,65 @@ const $ = [
303
303
  evening: /soir/i,
304
304
  night: /nuit/i
305
305
  }
306
- }, Ne = {
306
+ }, ke = {
307
307
  ordinalNumber: F({
308
308
  matchPattern: ue,
309
309
  parsePattern: me,
310
310
  valueCallback: (e) => parseInt(e)
311
311
  }),
312
- era: k({
312
+ era: N({
313
313
  matchPatterns: fe,
314
314
  defaultMatchWidth: "wide",
315
315
  parsePatterns: he,
316
316
  defaultParseWidth: "any"
317
317
  }),
318
- quarter: k({
318
+ quarter: N({
319
319
  matchPatterns: pe,
320
320
  defaultMatchWidth: "wide",
321
- parsePatterns: ge,
321
+ parsePatterns: be,
322
322
  defaultParseWidth: "any",
323
323
  valueCallback: (e) => e + 1
324
324
  }),
325
- month: k({
326
- matchPatterns: ve,
325
+ month: N({
326
+ matchPatterns: ge,
327
327
  defaultMatchWidth: "wide",
328
- parsePatterns: be,
328
+ parsePatterns: ve,
329
329
  defaultParseWidth: "any"
330
330
  }),
331
- day: k({
331
+ day: N({
332
332
  matchPatterns: ye,
333
333
  defaultMatchWidth: "wide",
334
- parsePatterns: we,
334
+ parsePatterns: xe,
335
335
  defaultParseWidth: "any"
336
336
  }),
337
- dayPeriod: k({
338
- matchPatterns: xe,
337
+ dayPeriod: N({
338
+ matchPatterns: we,
339
339
  defaultMatchWidth: "any",
340
340
  parsePatterns: Me,
341
341
  defaultParseWidth: "any"
342
342
  })
343
- }, z = {
343
+ }, D = {
344
344
  code: "fr",
345
345
  formatDistance: K,
346
346
  formatLong: ee,
347
- formatRelative: ne,
347
+ formatRelative: re,
348
348
  localize: ce,
349
- match: Ne,
349
+ match: ke,
350
350
  options: {
351
351
  weekStartsOn: 1,
352
352
  firstWeekContainsDate: 4
353
353
  }
354
354
  }, Le = ({ date: e, onDateChange: t, placeholder: l }) => {
355
- const [r, i] = C(!1), u = P(null);
355
+ const [a, i] = C(!1), u = P(null);
356
356
  j(() => {
357
- if (!r) return;
357
+ if (!a) return;
358
358
  const d = (c) => {
359
359
  u.current !== null && !u.current.contains(c.target) && i(!1);
360
360
  };
361
361
  return document.addEventListener("mousedown", d), () => {
362
362
  document.removeEventListener("mousedown", d);
363
363
  };
364
- }, [r]);
364
+ }, [a]);
365
365
  const m = () => {
366
366
  i((d) => !d);
367
367
  }, h = (d) => {
@@ -369,25 +369,25 @@ const $ = [
369
369
  };
370
370
  return /* @__PURE__ */ s("div", { ref: u, className: "relative w-full", children: [
371
371
  /* @__PURE__ */ s(
372
- x,
372
+ w,
373
373
  {
374
374
  variant: "outline",
375
375
  type: "button",
376
376
  onClick: m,
377
- className: b(
377
+ className: v(
378
378
  "w-full justify-start text-left font-normal focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
379
- r && "ring-2 ring-ring ring-offset-2",
379
+ a && "ring-2 ring-ring ring-offset-2",
380
380
  e === void 0 && "text-muted-foreground"
381
381
  ),
382
382
  children: [
383
- /* @__PURE__ */ n(q, { className: "mr-2 h-4 w-4 shrink-0" }),
384
- e !== void 0 ? W(e, "dd/MM/yyyy", { locale: z }) : /* @__PURE__ */ n("span", { children: l })
383
+ /* @__PURE__ */ r(q, { className: "mr-2 size-4 shrink-0" }),
384
+ e !== void 0 ? T(e, "dd/MM/yyyy", { locale: D }) : /* @__PURE__ */ r("span", { children: l })
385
385
  ]
386
386
  }
387
387
  ),
388
- r ? /* @__PURE__ */ n("div", { className: "absolute left-0 top-[calc(100%+4px)] z-[100] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2", children: /* @__PURE__ */ n(A, { mode: "single", selected: e, onSelect: h }) }) : null
388
+ a ? /* @__PURE__ */ r("div", { className: "absolute left-0 top-[calc(100%+4px)] z-[100] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2", children: /* @__PURE__ */ r(A, { mode: "single", selected: e, onSelect: h }) }) : null
389
389
  ] });
390
- }, Ee = ({ value: e, onChange: t, placeholder: l = "Selectionner une periode", className: r }) => {
390
+ }, Ee = ({ value: e, onChange: t, placeholder: l = "Selectionner une periode", className: a }) => {
391
391
  const [i, u] = L.useState(!1), [m, h] = L.useState(e);
392
392
  L.useEffect(() => {
393
393
  i && h(e);
@@ -400,13 +400,13 @@ const $ = [
400
400
  h(e), u(!1);
401
401
  }, y = () => {
402
402
  h(void 0);
403
- }, w = (f) => f != null && f.from ? !f.to || f.from.getTime() === f.to.getTime() ? W(f.from, "dd MMM yyyy", { locale: z }) : `${W(f.from, "dd MMM yyyy", { locale: z })} - ${W(f.to, "dd MMM yyyy", { locale: z })}` : l;
404
- return /* @__PURE__ */ n("div", { className: b("grid gap-2", r), children: /* @__PURE__ */ s(X, { open: i, onOpenChange: u, children: [
405
- /* @__PURE__ */ n(V, { asChild: !0, children: /* @__PURE__ */ s(x, { id: "date", variant: "outline", className: b("w-[300px] justify-start text-left font-normal", !(e != null && e.from) && "text-muted-foreground"), children: [
406
- /* @__PURE__ */ n(q, { className: "mr-2 size-4" }),
407
- w(e),
408
- (e == null ? void 0 : e.from) && /* @__PURE__ */ n(
409
- x,
403
+ }, x = (f) => f != null && f.from ? !f.to || f.from.getTime() === f.to.getTime() ? T(f.from, "dd MMM yyyy", { locale: D }) : `${T(f.from, "dd MMM yyyy", { locale: D })} - ${T(f.to, "dd MMM yyyy", { locale: D })}` : l;
404
+ return /* @__PURE__ */ r("div", { className: v("grid gap-2", a), children: /* @__PURE__ */ s(X, { open: i, onOpenChange: u, children: [
405
+ /* @__PURE__ */ r(V, { asChild: !0, children: /* @__PURE__ */ s(w, { id: "date", variant: "outline", className: v("w-[300px] justify-start text-left font-normal", !(e != null && e.from) && "text-muted-foreground"), children: [
406
+ /* @__PURE__ */ r(q, { className: "mr-2 size-4" }),
407
+ x(e),
408
+ (e == null ? void 0 : e.from) && /* @__PURE__ */ r(
409
+ w,
410
410
  {
411
411
  type: "button",
412
412
  variant: "ghost",
@@ -414,12 +414,12 @@ const $ = [
414
414
  "aria-label": "Effacer la periode selectionnee",
415
415
  className: "ml-auto h-5 w-5 opacity-50 hover:opacity-100",
416
416
  onClick: d,
417
- children: /* @__PURE__ */ n(D, { className: "size-4" })
417
+ children: /* @__PURE__ */ r(S, { className: "size-4" })
418
418
  }
419
419
  )
420
420
  ] }) }),
421
421
  /* @__PURE__ */ s(_, { className: "w-auto p-0", align: "start", side: "bottom", sideOffset: 4, children: [
422
- /* @__PURE__ */ n(
422
+ /* @__PURE__ */ r(
423
423
  A,
424
424
  {
425
425
  mode: "range",
@@ -432,10 +432,10 @@ const $ = [
432
432
  }
433
433
  ),
434
434
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-t border-border px-3 py-2", children: [
435
- /* @__PURE__ */ n(x, { variant: "ghost", size: "sm", onClick: y, children: "Effacer" }),
435
+ /* @__PURE__ */ r(w, { variant: "ghost", size: "sm", onClick: y, children: "Effacer" }),
436
436
  /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
437
- /* @__PURE__ */ n(x, { variant: "ghost", size: "sm", onClick: p, children: "Annuler" }),
438
- /* @__PURE__ */ n(x, { size: "sm", onClick: c, children: "Appliquer" })
437
+ /* @__PURE__ */ r(w, { variant: "ghost", size: "sm", onClick: p, children: "Annuler" }),
438
+ /* @__PURE__ */ r(w, { size: "sm", onClick: c, children: "Appliquer" })
439
439
  ] })
440
440
  ] })
441
441
  ] })
@@ -444,116 +444,116 @@ const $ = [
444
444
  options: e,
445
445
  selected: t,
446
446
  onToggle: l,
447
- onClear: r,
447
+ onClear: a,
448
448
  onSelectAll: i,
449
449
  placeholder: u = "Sélectionner...",
450
450
  searchable: m = !1,
451
451
  searchPlaceholder: h = "Rechercher..."
452
452
  }) => {
453
- const [d, c] = C(""), [p, y] = C(!1), w = P(null), f = P(null), v = S(() => d === "" ? e : e.filter((a) => a.label.toLowerCase().includes(d.toLowerCase())), [e, d]), T = S(() => v.length === 0 ? !1 : v.every((a) => t.includes(a.value)), [v, t]);
453
+ const [d, c] = C(""), [p, y] = C(!1), x = P(null), f = P(null), g = W(() => d === "" ? e : e.filter((n) => n.label.toLowerCase().includes(d.toLowerCase())), [e, d]), z = W(() => g.length === 0 ? !1 : g.every((n) => t.includes(n.value)), [g, t]);
454
454
  j(() => {
455
455
  p && m && requestAnimationFrame(() => {
456
- var a;
457
- (a = f.current) == null || a.focus();
456
+ var n;
457
+ (n = f.current) == null || n.focus();
458
458
  });
459
459
  }, [p, m]), j(() => {
460
460
  if (!p) return;
461
- const a = (g) => {
462
- w.current !== null && !w.current.contains(g.target) && (y(!1), c(""));
461
+ const n = (b) => {
462
+ x.current !== null && !x.current.contains(b.target) && (y(!1), c(""));
463
463
  };
464
- return document.addEventListener("mousedown", a), () => {
465
- document.removeEventListener("mousedown", a);
464
+ return document.addEventListener("mousedown", n), () => {
465
+ document.removeEventListener("mousedown", n);
466
466
  };
467
467
  }, [p]);
468
468
  const O = () => {
469
- if (T) {
470
- const a = v.map((M) => M.value), g = t.filter((M) => !a.includes(M));
471
- i !== void 0 ? i(g) : r();
469
+ if (z) {
470
+ const n = g.map((M) => M.value), b = t.filter((M) => !n.includes(M));
471
+ i !== void 0 ? i(b) : a();
472
472
  } else {
473
- const a = [...t];
474
- v.forEach((g) => {
475
- a.includes(g.value) || a.push(g.value);
476
- }), i !== void 0 ? i(a) : v.forEach((g) => {
477
- t.includes(g.value) || l(g.value);
473
+ const n = [...t];
474
+ g.forEach((b) => {
475
+ n.includes(b.value) || n.push(b.value);
476
+ }), i !== void 0 ? i(n) : g.forEach((b) => {
477
+ t.includes(b.value) || l(b.value);
478
478
  });
479
479
  }
480
480
  };
481
- return /* @__PURE__ */ s("div", { ref: w, className: "relative w-full", children: [
481
+ return /* @__PURE__ */ s("div", { ref: x, className: "relative w-full", children: [
482
482
  /* @__PURE__ */ s(
483
- x,
483
+ "button",
484
484
  {
485
- variant: "outline",
486
485
  type: "button",
487
486
  onClick: () => {
488
- y((a) => (a && c(""), !a));
487
+ y((n) => (n && c(""), !n));
489
488
  },
490
- className: b(
491
- "w-full justify-between text-left font-normal focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
489
+ className: v(
490
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
492
491
  p && "ring-2 ring-ring ring-offset-2",
493
492
  t.length === 0 && "text-muted-foreground"
494
493
  ),
495
494
  children: [
496
- /* @__PURE__ */ n("span", { className: "truncate", children: t.length === 0 ? u : t.map((a) => {
497
- var g;
498
- return ((g = e.find((M) => M.value === a)) == null ? void 0 : g.label) ?? a;
495
+ /* @__PURE__ */ r("span", { className: "truncate", children: t.length === 0 ? u : t.map((n) => {
496
+ var b;
497
+ return ((b = e.find((M) => M.value === n)) == null ? void 0 : b.label) ?? n;
499
498
  }).join(", ") }),
500
499
  /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-1", children: [
501
- t.length > 0 && /* @__PURE__ */ n(
500
+ t.length > 0 && /* @__PURE__ */ r(
502
501
  "span",
503
502
  {
504
503
  role: "button",
505
- onClick: (a) => {
506
- a.stopPropagation(), r();
504
+ tabIndex: -1,
505
+ onPointerDown: (n) => {
506
+ n.preventDefault(), n.stopPropagation(), a();
507
507
  },
508
- className: "rounded-full p-0.5 opacity-50 transition-opacity hover:opacity-100",
509
- children: /* @__PURE__ */ n(D, { className: "h-3.5 w-3.5" })
508
+ className: "text-muted-foreground hover:text-foreground",
509
+ children: /* @__PURE__ */ r(S, { className: "size-4" })
510
510
  }
511
511
  ),
512
- /* @__PURE__ */ n(H, { className: b("h-4 w-4 opacity-50 transition-transform", p && "rotate-180") })
512
+ /* @__PURE__ */ r(H, { className: v("size-4 opacity-50 shrink-0 transition-transform", p && "rotate-180") })
513
513
  ] })
514
514
  ]
515
515
  }
516
516
  ),
517
517
  p ? /* @__PURE__ */ s("div", { className: "absolute left-0 right-0 top-[calc(100%+4px)] z-[100] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2", children: [
518
- m ? /* @__PURE__ */ n("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ s("div", { className: "relative", children: [
519
- /* @__PURE__ */ n(J, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
520
- /* @__PURE__ */ n(
518
+ m ? /* @__PURE__ */ r("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ s("div", { className: "relative", children: [
519
+ /* @__PURE__ */ r(J, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
520
+ /* @__PURE__ */ r(
521
521
  "input",
522
522
  {
523
523
  ref: f,
524
524
  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",
525
525
  placeholder: h,
526
526
  value: d,
527
- onChange: (a) => {
528
- c(a.target.value);
527
+ onChange: (n) => {
528
+ c(n.target.value);
529
529
  }
530
530
  }
531
531
  )
532
532
  ] }) }) : null,
533
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5 max-h-56 overflow-y-auto p-1.5", children: [
534
- v.length > 0 && /* @__PURE__ */ s("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
535
- /* @__PURE__ */ n(R, { checked: T, onCheckedChange: O }),
533
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5 max-h-56 overflow-y-auto p-1.5 scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-track]:bg-transparent", children: [
534
+ g.length > 0 && /* @__PURE__ */ s("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
535
+ /* @__PURE__ */ r(R, { checked: z, onCheckedChange: O }),
536
536
  "Tout sélectionner"
537
537
  ] }),
538
- v.length === 0 && /* @__PURE__ */ n("p", { className: "px-2 py-3 text-center text-xs text-muted-foreground", children: "Aucun résultat" }),
539
- v.map((a) => /* @__PURE__ */ s("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
540
- /* @__PURE__ */ n(
538
+ g.length === 0 && /* @__PURE__ */ r("p", { className: "px-2 py-3 text-center text-xs text-muted-foreground", children: "Aucun résultat" }),
539
+ g.map((n) => /* @__PURE__ */ s("label", { className: "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors", children: [
540
+ /* @__PURE__ */ r(
541
541
  R,
542
542
  {
543
- checked: t.includes(a.value),
543
+ checked: t.includes(n.value),
544
544
  onCheckedChange: () => {
545
- l(a.value);
545
+ l(n.value);
546
546
  }
547
547
  }
548
548
  ),
549
- a.label
550
- ] }, a.value))
549
+ n.label
550
+ ] }, n.value))
551
551
  ] }),
552
- t.length > 0 && /* @__PURE__ */ n("div", { className: "border-t border-border p-1.5", children: /* @__PURE__ */ n(
552
+ t.length > 0 && /* @__PURE__ */ r("div", { className: "border-t border-border p-1.5", children: /* @__PURE__ */ r(
553
553
  "button",
554
554
  {
555
555
  type: "button",
556
- onClick: r,
556
+ onClick: a,
557
557
  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",
558
558
  children: "Tout désélectionner"
559
559
  }
@@ -561,34 +561,34 @@ const $ = [
561
561
  ] }) : null
562
562
  ] });
563
563
  }, Oe = ({
564
- options: e,
564
+ options: e = [],
565
565
  value: t,
566
566
  onChange: l,
567
- onClear: r,
567
+ onClear: a,
568
568
  placeholder: i = "Sélectionner...",
569
569
  searchPlaceholder: u = "Rechercher...",
570
570
  disabled: m = !1
571
571
  }) => {
572
- const [h, d] = C(""), [c, p] = C(!1), y = P(null), w = P(null), f = S(() => h === "" ? e : e.filter((o) => o.label.toLowerCase().includes(h.toLowerCase())), [e, h]), v = S(() => {
572
+ const [h, d] = C(""), [c, p] = C(!1), y = P(null), x = P(null), f = W(() => h === "" ? e : e.filter((o) => o.label.toLowerCase().includes(h.toLowerCase())), [e, h]), g = W(() => {
573
573
  var o;
574
574
  if (!(t === void 0 || t === ""))
575
- return ((o = e.find((a) => a.value === t)) == null ? void 0 : o.label) ?? t;
575
+ return ((o = e.find((n) => n.value === t)) == null ? void 0 : o.label) ?? t;
576
576
  }, [e, t]);
577
577
  j(() => {
578
578
  c && requestAnimationFrame(() => {
579
579
  var o;
580
- (o = w.current) == null || o.focus();
580
+ (o = x.current) == null || o.focus();
581
581
  });
582
582
  }, [c]), j(() => {
583
583
  if (!c) return;
584
- const o = (a) => {
585
- y.current !== null && !y.current.contains(a.target) && (p(!1), d(""));
584
+ const o = (n) => {
585
+ y.current !== null && !y.current.contains(n.target) && (p(!1), d(""));
586
586
  };
587
587
  return document.addEventListener("mousedown", o), () => {
588
588
  document.removeEventListener("mousedown", o);
589
589
  };
590
590
  }, [c]);
591
- const T = (o) => {
591
+ const z = (o) => {
592
592
  l(o), p(!1), d("");
593
593
  };
594
594
  return /* @__PURE__ */ s("div", { ref: y, className: "relative w-full", children: [
@@ -600,38 +600,38 @@ const $ = [
600
600
  m || p((o) => (o && d(""), !o));
601
601
  },
602
602
  disabled: m,
603
- className: b(
603
+ className: v(
604
604
  "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
605
605
  c && "ring-2 ring-ring ring-offset-2",
606
606
  (t === void 0 || t === "") && "text-muted-foreground"
607
607
  ),
608
608
  children: [
609
- /* @__PURE__ */ n("span", { className: "truncate", children: v ?? i }),
609
+ /* @__PURE__ */ r("span", { className: "truncate", children: g ?? i }),
610
610
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
611
- r && t !== void 0 && t !== "" && !m && /* @__PURE__ */ n(
611
+ a && t !== void 0 && t !== "" && !m && /* @__PURE__ */ r(
612
612
  "span",
613
613
  {
614
614
  role: "button",
615
615
  tabIndex: -1,
616
616
  onPointerDown: (o) => {
617
- o.preventDefault(), o.stopPropagation(), r();
617
+ o.preventDefault(), o.stopPropagation(), a();
618
618
  },
619
619
  className: "text-muted-foreground hover:text-foreground",
620
- children: /* @__PURE__ */ n(D, { className: "size-4" })
620
+ children: /* @__PURE__ */ r(S, { className: "size-4" })
621
621
  }
622
622
  ),
623
- /* @__PURE__ */ n(H, { className: b("h-4 w-4 opacity-50 shrink-0 transition-transform", c && "rotate-180") })
623
+ /* @__PURE__ */ r(H, { className: v("size-4 opacity-50 shrink-0 transition-transform", c && "rotate-180") })
624
624
  ] })
625
625
  ]
626
626
  }
627
627
  ),
628
628
  c ? /* @__PURE__ */ s("div", { className: "absolute left-0 right-0 top-[calc(100%+4px)] z-[100] rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2", children: [
629
- /* @__PURE__ */ n("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ s("div", { className: "relative", children: [
630
- /* @__PURE__ */ n(J, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
631
- /* @__PURE__ */ n(
629
+ /* @__PURE__ */ r("div", { className: "border-b border-border p-2", children: /* @__PURE__ */ s("div", { className: "relative", children: [
630
+ /* @__PURE__ */ r(J, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
631
+ /* @__PURE__ */ r(
632
632
  "input",
633
633
  {
634
- ref: w,
634
+ ref: x,
635
635
  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",
636
636
  placeholder: u,
637
637
  value: h,
@@ -642,20 +642,20 @@ const $ = [
642
642
  )
643
643
  ] }) }),
644
644
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5 max-h-56 overflow-y-auto p-1.5 scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-track]:bg-transparent", children: [
645
- f.length === 0 && /* @__PURE__ */ n("p", { className: "px-2 py-3 text-center text-xs text-muted-foreground", children: "Aucun résultat" }),
645
+ f.length === 0 && /* @__PURE__ */ r("p", { className: "px-2 py-3 text-center text-xs text-muted-foreground", children: "Aucun résultat" }),
646
646
  f.map((o) => /* @__PURE__ */ s(
647
647
  "button",
648
648
  {
649
649
  type: "button",
650
650
  onClick: () => {
651
- T(o.value);
651
+ z(o.value);
652
652
  },
653
- className: b(
653
+ className: v(
654
654
  "flex items-center gap-2.5 rounded-md px-2 py-2 text-sm hover:bg-muted cursor-pointer transition-colors text-left w-full",
655
655
  t === o.value && "bg-muted font-medium"
656
656
  ),
657
657
  children: [
658
- /* @__PURE__ */ n(Q, { className: b("size-3.5 shrink-0", t === o.value ? "opacity-100" : "opacity-0") }),
658
+ /* @__PURE__ */ r(Q, { className: v("size-3.5 shrink-0", t === o.value ? "opacity-100" : "opacity-0") }),
659
659
  o.label
660
660
  ]
661
661
  },
@@ -668,23 +668,23 @@ const $ = [
668
668
  searchQuery: e,
669
669
  search: t,
670
670
  placeholder: l = "Rechercher...",
671
- onSearch: r,
671
+ onSearch: a,
672
672
  onSubmit: i,
673
673
  onClear: u,
674
674
  className: m
675
675
  }) => {
676
676
  const h = e ?? t ?? "", d = () => {
677
- r(""), u !== void 0 && u();
677
+ a(""), u !== void 0 && u();
678
678
  };
679
- return /* @__PURE__ */ s("div", { className: b("relative h-fit w-full md:w-64", m), children: [
680
- /* @__PURE__ */ n(J, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
681
- /* @__PURE__ */ n(
679
+ return /* @__PURE__ */ s("div", { className: v("relative h-fit w-full md:w-64", m), children: [
680
+ /* @__PURE__ */ r(J, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
681
+ /* @__PURE__ */ r(
682
682
  I,
683
683
  {
684
684
  placeholder: l,
685
685
  value: h,
686
686
  onChange: (c) => {
687
- r(c.target.value);
687
+ a(c.target.value);
688
688
  },
689
689
  className: "pl-8",
690
690
  onKeyDown: (c) => {
@@ -692,7 +692,7 @@ const $ = [
692
692
  }
693
693
  }
694
694
  ),
695
- h !== "" ? /* @__PURE__ */ n("button", { onClick: d, className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700", type: "button", children: /* @__PURE__ */ n(D, { className: "size-4" }) }) : null
695
+ h !== "" ? /* @__PURE__ */ r("button", { onClick: d, className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700", type: "button", children: /* @__PURE__ */ r(S, { className: "size-4" }) }) : null
696
696
  ] });
697
697
  };
698
698
  export {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as k, useEffect as M, useMemo as A } from "react";
3
- import { M as $, a as O, D as _, b as I, S as j } from "./SearchInput-CcCFcweT.js";
4
- import { aW as C, bD as z, bM as R, bF as B, bI as Q, bL as V, a$ as H, bH as W, bv as X, bx as G, bw as J, ce as K, _ as P } from "./toggle-group-pAjKlGGO.js";
3
+ import { M as $, a as O, D as _, b as I, S as j } from "./SearchInput-t-ab1DdJ.js";
4
+ import { aW as C, bD as z, bM as R, bF as B, bI as Q, bL as V, a$ as H, bH as W, bv as X, bx as G, bw as J, ce as K, _ as P } from "./toggle-group-6CH5BRLO.js";
5
5
  import "./alert-srKINZRG.js";
6
6
  import { B as w, C as U } from "./tooltip-mWS3Mix6.js";
7
7
  import { X as E, S as Y, h as Z, i as q, a as ee, c as re } from "./select-CDIMkakd.js";
@@ -1,4 +1,4 @@
1
- import { C as s, a as d, D as C, K as e, b as o, M as t } from "../../../MetricCard-5xmlrXzH.js";
1
+ import { C as s, a as d, D as C, K as e, b as o, M as t } from "../../../MetricCard-CFwSSiQY.js";
2
2
  export {
3
3
  s as CardSkeleton,
4
4
  d as CardsSkeleton,
@@ -1,5 +1,5 @@
1
- import { A as i, C as l, a as s, F as g } from "../../../ConfirmationDialog-Bhboi93k.js";
2
- import { D as e, a as r, b as t, c as n, d as f, e as m, f as p, g as C, h as F, i as P, P as c } from "../../../toggle-group-pAjKlGGO.js";
1
+ import { A as i, C as l, a as s, F as g } from "../../../ConfirmationDialog-bBFPpP2z.js";
2
+ import { D as e, a as r, b as t, c as n, d as f, e as m, f as p, g as C, h as F, i as P, P as c } from "../../../toggle-group-6CH5BRLO.js";
3
3
  export {
4
4
  i as AppDialog,
5
5
  l as ConfirmDeleteDialog,
@@ -1,4 +1,4 @@
1
- import { A as l, a as i, F as r, S as s, T as t } from "../../../TableFilter-Dd9SvVEF.js";
1
+ import { A as l, a as i, F as r, S as s, T as t } from "../../../TableFilter-BjYjDtSo.js";
2
2
  export {
3
3
  l as ActiveFilters,
4
4
  i as AdvancedFilters,