@modoock/components 2.2.0 → 2.4.0

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 (47) hide show
  1. package/dist/accordion.d.ts.map +1 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/agenda.js +5 -5
  4. package/dist/button.js +1 -1
  5. package/dist/chart.d.ts +37 -0
  6. package/dist/chart.d.ts.map +1 -0
  7. package/dist/chart.js +92 -0
  8. package/dist/checkbox.d.ts +24 -0
  9. package/dist/checkbox.d.ts.map +1 -0
  10. package/dist/checkbox.js +25 -0
  11. package/dist/date-picker.d.ts.map +1 -1
  12. package/dist/date-picker.js +199 -54
  13. package/dist/drawer.d.ts +26 -0
  14. package/dist/drawer.d.ts.map +1 -0
  15. package/dist/drawer.js +125 -0
  16. package/dist/index.d.ts +18 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +9 -0
  19. package/dist/input.js +2 -2
  20. package/dist/metric-bar.js +1 -1
  21. package/dist/modal.d.ts.map +1 -1
  22. package/dist/modal.js +25 -6
  23. package/dist/pagination.d.ts +16 -0
  24. package/dist/pagination.d.ts.map +1 -0
  25. package/dist/pagination.js +39 -0
  26. package/dist/radio.d.ts +34 -0
  27. package/dist/radio.d.ts.map +1 -0
  28. package/dist/radio.js +37 -0
  29. package/dist/select.d.ts.map +1 -1
  30. package/dist/select.js +9 -5
  31. package/dist/skeleton.d.ts +12 -0
  32. package/dist/skeleton.d.ts.map +1 -0
  33. package/dist/skeleton.js +13 -0
  34. package/dist/stepper.js +1 -1
  35. package/dist/switch.d.ts +21 -0
  36. package/dist/switch.d.ts.map +1 -0
  37. package/dist/switch.js +27 -0
  38. package/dist/tab.js +1 -1
  39. package/dist/table.d.ts.map +1 -1
  40. package/dist/table.js +7 -6
  41. package/dist/toast.d.ts +31 -0
  42. package/dist/toast.d.ts.map +1 -0
  43. package/dist/toast.js +165 -0
  44. package/dist/tooltip.d.ts +18 -0
  45. package/dist/tooltip.d.ts.map +1 -0
  46. package/dist/tooltip.js +78 -0
  47. package/package.json +7 -3
package/dist/modal.js CHANGED
@@ -1,9 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useEffect, useId, useRef, } from "react";
3
+ import { useEffect, useId, useRef, useState, } from "react";
4
4
  import { createPortal } from "react-dom";
5
5
  import Icon from "./icon";
6
6
  import ClickableButton from "./button";
7
+ /** Matches Tailwind `duration-200` for enter/exit unmount timing. */
8
+ const ANIMATION_MS = 200;
7
9
  /** Selector matching every focusable element the dialog can own. */
8
10
  const FOCUSABLE_SELECTOR = [
9
11
  "a[href]",
@@ -25,16 +27,31 @@ export default function Modal({ open, title, children, onClose, footer, primaryA
25
27
  const panelRef = useRef(null);
26
28
  // Element that had focus before the modal opened, restored on close.
27
29
  const previouslyFocusedRef = useRef(null);
28
- // Lock body scroll while open.
30
+ const [present, setPresent] = useState(open);
31
+ const [visible, setVisible] = useState(open);
32
+ // Keep the portal mounted through the exit transition.
29
33
  useEffect(() => {
30
- if (!open)
34
+ if (open) {
35
+ setPresent(true);
36
+ const frame = requestAnimationFrame(() => {
37
+ requestAnimationFrame(() => setVisible(true));
38
+ });
39
+ return () => cancelAnimationFrame(frame);
40
+ }
41
+ setVisible(false);
42
+ const timeout = window.setTimeout(() => setPresent(false), ANIMATION_MS);
43
+ return () => window.clearTimeout(timeout);
44
+ }, [open]);
45
+ // Lock body scroll while the dialog is present (including exit animation).
46
+ useEffect(() => {
47
+ if (!present)
31
48
  return;
32
49
  const previousOverflow = document.body.style.overflow;
33
50
  document.body.style.overflow = "hidden";
34
51
  return () => {
35
52
  document.body.style.overflow = previousOverflow;
36
53
  };
37
- }, [open]);
54
+ }, [present]);
38
55
  // Close on Escape.
39
56
  useEffect(() => {
40
57
  if (!open)
@@ -61,7 +78,7 @@ export default function Modal({ open, title, children, onClose, footer, primaryA
61
78
  previouslyFocusedRef.current = null;
62
79
  };
63
80
  }, [open]);
64
- if (!open)
81
+ if (!present)
65
82
  return null;
66
83
  // Keep Tab / Shift+Tab cycling within the dialog panel.
67
84
  const handlePanelKeyDown = (event) => {
@@ -84,5 +101,7 @@ export default function Modal({ open, title, children, onClose, footer, primaryA
84
101
  last.focus();
85
102
  }
86
103
  };
87
- return createPortal(_jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, onClick: onClose, children: _jsxs("div", { ref: panelRef, className: "flex max-h-[90vh] w-full max-w-[560px] flex-col overflow-hidden rounded-large border border-border bg-surface shadow-lg", onClick: (event) => event.stopPropagation(), onKeyDown: handlePanelKeyDown, children: [_jsxs("div", { className: "flex shrink-0 items-center justify-between border-b border-border px-component py-control", children: [_jsx("h2", { id: titleId, className: "text-component-title text-foreground", children: title }), _jsx("button", { type: "button", onClick: onClose, className: "grid size-8 place-items-center rounded-small text-muted-foreground outline-none hover:bg-surface-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0 [&_svg]:text-current", "aria-label": "Fermer", children: _jsx(Icon, { name: "X", "aria-hidden": "true" }) })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-component py-control", children: children }), (footer || primaryAction || secondaryAction) && (_jsxs("div", { className: "flex shrink-0 items-center justify-end gap-inline border-t border-border px-component py-control", children: [secondaryAction && (_jsx(ClickableButton, { type: "button", onClick: secondaryAction.onClick, variant: "ghost", children: secondaryAction.label })), footer && footer, primaryAction && (_jsx(ClickableButton, { onClick: primaryAction.onClick, children: primaryAction.label }))] }))] }) }), document.body);
104
+ return createPortal(_jsx("div", { className: `fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 transition-opacity duration-200 ease-out motion-reduce:transition-none ${visible ? "opacity-100" : "opacity-0"}`, role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, onClick: onClose, children: _jsxs("div", { ref: panelRef, tabIndex: -1, className: `flex max-h-[90vh] w-full max-w-[560px] flex-col overflow-hidden rounded-large border border-border bg-surface shadow-lg transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none ${visible
105
+ ? "translate-y-0 scale-100 opacity-100"
106
+ : "translate-y-2 scale-95 opacity-0"}`, onClick: (event) => event.stopPropagation(), onKeyDown: handlePanelKeyDown, children: [_jsxs("div", { className: "flex shrink-0 items-center justify-between border-b border-border px-component py-control", children: [_jsx("h2", { id: titleId, className: "text-component-title text-foreground", children: title }), _jsx("button", { type: "button", onClick: onClose, className: "grid size-8 place-items-center rounded-small text-muted-foreground outline-none transition-colors duration-200 ease-out hover:bg-surface-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary motion-reduce:transition-none [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0 [&_svg]:text-current", "aria-label": "Fermer", children: _jsx(Icon, { name: "X", "aria-hidden": "true" }) })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-component py-control", children: children }), (footer || primaryAction || secondaryAction) && (_jsxs("div", { className: "flex shrink-0 items-center justify-end gap-inline border-t border-border px-component py-control", children: [secondaryAction && (_jsx(ClickableButton, { type: "button", onClick: secondaryAction.onClick, variant: "ghost", children: secondaryAction.label })), footer && footer, primaryAction && (_jsx(ClickableButton, { onClick: primaryAction.onClick, children: primaryAction.label }))] }))] }) }), document.body);
88
107
  }
@@ -0,0 +1,16 @@
1
+ export interface PaginationProps {
2
+ /** Current page, 1-based. */
3
+ page: number;
4
+ /** Total number of pages (at least 1). */
5
+ pageCount: number;
6
+ onPageChange: (page: number) => void;
7
+ /** Total item count — used with `pageSize` for the range summary. */
8
+ totalItems?: number;
9
+ pageSize?: number;
10
+ className?: string;
11
+ }
12
+ /**
13
+ * Pagination — pages numérotées, précédent / suivant, résumé.
14
+ */
15
+ export default function Pagination({ page, pageCount, onPageChange, totalItems, pageSize, className, }: PaginationProps): import("react").JSX.Element;
16
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../components/ui/pagination.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAoCD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAc,GACf,EAAE,eAAe,+BA+DjB"}
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import ClickableButton from "./button";
4
+ import Icon from "./icon";
5
+ function pageItems(page, count) {
6
+ if (count <= 7) {
7
+ return Array.from({ length: count }, (_, index) => index + 1);
8
+ }
9
+ const items = [1];
10
+ const start = Math.max(2, page - 1);
11
+ const end = Math.min(count - 1, page + 1);
12
+ if (start > 2)
13
+ items.push("ellipsis-start");
14
+ for (let n = start; n <= end; n += 1)
15
+ items.push(n);
16
+ if (end < count - 1)
17
+ items.push("ellipsis-end");
18
+ items.push(count);
19
+ return items;
20
+ }
21
+ function rangeSummary(page, pageCount, totalItems, pageSize) {
22
+ if (totalItems != null && pageSize != null) {
23
+ if (totalItems === 0)
24
+ return "Aucun élément";
25
+ const start = (page - 1) * pageSize + 1;
26
+ const end = Math.min(page * pageSize, totalItems);
27
+ return `${start}–${end} sur ${totalItems}`;
28
+ }
29
+ return `Page ${page} sur ${pageCount}`;
30
+ }
31
+ /**
32
+ * Pagination — pages numérotées, précédent / suivant, résumé.
33
+ */
34
+ export default function Pagination({ page, pageCount, onPageChange, totalItems, pageSize, className = "", }) {
35
+ const count = Math.max(1, pageCount);
36
+ const current = Math.min(Math.max(1, page), count);
37
+ const summary = rangeSummary(current, count, totalItems, pageSize);
38
+ return (_jsxs("nav", { "aria-label": "Pagination", className: `flex flex-wrap items-center justify-between gap-control ${className}`, children: [_jsx("p", { className: "text-small text-muted-foreground", "aria-live": "polite", children: summary }), _jsxs("div", { className: "flex flex-wrap items-center gap-micro", children: [_jsx(ClickableButton, { type: "button", variant: "secondary", size: "sm", className: "w-9 px-0", "aria-label": "Page pr\u00E9c\u00E9dente", disabled: current <= 1, onClick: () => onPageChange(current - 1), children: _jsx(Icon, { name: "ChevronLeft", size: "small", "aria-hidden": "true" }) }), pageItems(current, count).map((item) => typeof item === "number" ? (_jsx(ClickableButton, { type: "button", variant: item === current ? "primary" : "secondary", size: "sm", className: "min-w-9 px-inline", "aria-label": `Page ${item}`, "aria-current": item === current ? "page" : undefined, onClick: () => onPageChange(item), children: item }, item)) : (_jsx("span", { className: "px-micro text-small text-muted-foreground", "aria-hidden": "true", children: "\u2026" }, item))), _jsx(ClickableButton, { type: "button", variant: "secondary", size: "sm", className: "w-9 px-0", "aria-label": "Page suivante", disabled: current >= count, onClick: () => onPageChange(current + 1), children: _jsx(Icon, { name: "ChevronRight", size: "small", "aria-hidden": "true" }) })] })] }));
39
+ }
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from "react";
2
+ export type RadioSize = "sm" | "md";
3
+ export interface RadioGroupProps {
4
+ /** Controlled selected value. */
5
+ value: string;
6
+ onValueChange: (value: string) => void;
7
+ /** Visible group label (fieldset legend) — required. */
8
+ label: string;
9
+ name?: string;
10
+ disabled?: boolean;
11
+ size?: RadioSize;
12
+ className?: string;
13
+ children: ReactNode;
14
+ }
15
+ /**
16
+ * Groupe de boutons radio — un seul choix parmi plusieurs.
17
+ */
18
+ export declare function RadioGroup({ value, onValueChange, label, name, disabled, size, className, children, }: RadioGroupProps): import("react").JSX.Element;
19
+ export interface RadioProps {
20
+ value: string;
21
+ /** Visible label — required for accessibility. */
22
+ label: string;
23
+ description?: string;
24
+ disabled?: boolean;
25
+ id?: string;
26
+ size?: RadioSize;
27
+ className?: string;
28
+ }
29
+ /**
30
+ * Bouton radio — à utiliser dans un RadioGroup.
31
+ * Identité Modoock : anneau primary, pastille primary.
32
+ */
33
+ export declare function Radio({ value, label, description, disabled, id, size, className, }: RadioProps): import("react").JSX.Element;
34
+ //# sourceMappingURL=radio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../components/ui/radio.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AAYpC,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAYD;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,aAAa,EACb,KAAK,EACL,IAAI,EACJ,QAAgB,EAChB,IAAW,EACX,SAAc,EACd,QAAQ,GACT,EAAE,eAAe,+BAiBjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,KAAK,EACL,WAAW,EACX,QAAgB,EAChB,EAAE,EACF,IAAI,EACJ,SAAc,GACf,EAAE,UAAU,+BA0DZ"}
package/dist/radio.js ADDED
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { createContext, useContext, useId, } from "react";
4
+ const RadioGroupContext = createContext(null);
5
+ const BOX_SIZE = {
6
+ sm: "size-4",
7
+ md: "size-5",
8
+ };
9
+ const DOT_SIZE = {
10
+ sm: "size-1.5",
11
+ md: "size-2",
12
+ };
13
+ /**
14
+ * Groupe de boutons radio — un seul choix parmi plusieurs.
15
+ */
16
+ export function RadioGroup({ value, onValueChange, label, name, disabled = false, size = "md", className = "", children, }) {
17
+ const generatedName = useId();
18
+ const groupName = name ?? generatedName;
19
+ return (_jsxs("fieldset", { disabled: disabled, className: `flex min-w-0 flex-col gap-control ${disabled ? "opacity-60" : ""} ${className}`, children: [_jsx("legend", { className: "px-0 text-label text-muted-foreground", children: label }), _jsx(RadioGroupContext.Provider, { value: { name: groupName, value, onValueChange, disabled, size }, children: children })] }));
20
+ }
21
+ /**
22
+ * Bouton radio — à utiliser dans un RadioGroup.
23
+ * Identité Modoock : anneau primary, pastille primary.
24
+ */
25
+ export function Radio({ value, label, description, disabled = false, id, size, className = "", }) {
26
+ const ctx = useContext(RadioGroupContext);
27
+ if (!ctx) {
28
+ throw new Error("Radio must be used inside RadioGroup.");
29
+ }
30
+ const generatedId = useId();
31
+ const inputId = id ?? generatedId;
32
+ const descriptionId = description ? `${inputId}-description` : undefined;
33
+ const checked = ctx.value === value;
34
+ const isDisabled = disabled || ctx.disabled;
35
+ const resolvedSize = size ?? ctx.size;
36
+ return (_jsxs("div", { className: `inline-flex items-start gap-control ${disabled && !ctx.disabled ? "opacity-60" : ""} ${className}`, children: [_jsxs("span", { className: "relative mt-micro inline-flex shrink-0", children: [_jsx("input", { type: "radio", id: inputId, name: ctx.name, value: value, checked: checked, disabled: isDisabled, "aria-describedby": descriptionId, onChange: () => ctx.onValueChange(value), className: `appearance-none rounded-full border bg-surface outline-none transition-[border-color] duration-200 ease-out focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed motion-reduce:transition-none ${BOX_SIZE[resolvedSize]} ${isDisabled ? "cursor-not-allowed" : "cursor-pointer"} ${checked ? "border-primary" : "border-border"}` }), checked ? (_jsx("span", { "aria-hidden": "true", className: `pointer-events-none absolute inset-0 m-auto rounded-full bg-primary ${DOT_SIZE[resolvedSize]}` })) : null] }), _jsxs("div", { className: "min-w-0 pt-micro", children: [_jsx("label", { htmlFor: inputId, className: `text-body-medium leading-snug text-foreground ${isDisabled ? "cursor-not-allowed" : "cursor-pointer"}`, children: label }), description ? (_jsx("p", { id: descriptionId, className: "mt-0 text-small leading-snug text-muted-foreground", children: description })) : null] })] }));
37
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../components/ui/select.tsx"],"names":[],"mappings":"AAOA,6DAA6D;AAC7D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,WAAY,SAAQ,eAAe;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,UAAU,gBAAiB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAiKD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAA+B,EAC/B,YAAY,GACb,EAAE,WAAW,+BAgCb;AAmDD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,WAA+B,EAC/B,YAAY,EACZ,eAAmB,GACpB,EAAE,gBAAgB,+BAgClB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAA+B,EAC/B,YAAY,GACb,EAAE,WAAW,+BAgCb;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,WAA+B,EAC/B,YAAY,EACZ,eAAmB,GACpB,EAAE,gBAAgB,+BAgClB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,WAA0B,EAC1B,YAAY,EACZ,eAAe,GAChB,EAAE,gBAAgB,+BAYlB"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../components/ui/select.tsx"],"names":[],"mappings":"AAOA,6DAA6D;AAC7D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,WAAY,SAAQ,eAAe;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,UAAU,gBAAiB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA2KD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAA+B,EAC/B,YAAY,GACb,EAAE,WAAW,+BAgCb;AAmDD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,WAA+B,EAC/B,YAAY,EACZ,eAAmB,GACpB,EAAE,gBAAgB,+BAgClB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAA+B,EAC/B,YAAY,GACb,EAAE,WAAW,+BAgCb;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,WAA+B,EAC/B,YAAY,EACZ,eAAmB,GACpB,EAAE,gBAAgB,+BAgClB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,WAA0B,EAC1B,YAAY,EACZ,eAAe,GAChB,EAAE,gBAAgB,+BAYlB"}
package/dist/select.js CHANGED
@@ -46,7 +46,7 @@ function useDismissibleOpen() {
46
46
  return { open, setOpen, rootRef };
47
47
  }
48
48
  function SelectTrigger({ open, onOpenChange, children, }) {
49
- return (_jsxs("button", { type: "button", "aria-haspopup": "true", "aria-expanded": open, onClick: () => onOpenChange(!open), className: "ds-input flex cursor-pointer items-center justify-between gap-2 text-left [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0", children: [children, _jsx(Icon, { name: "ChevronDown", variant: "muted", "aria-hidden": "true", className: `transition-transform duration-150 ${open ? "rotate-180" : ""}` })] }));
49
+ return (_jsxs("button", { type: "button", "aria-haspopup": "true", "aria-expanded": open, onClick: () => onOpenChange(!open), className: "ds-input flex cursor-pointer items-center justify-between gap-2 text-left [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0", children: [children, _jsx(Icon, { name: "ChevronDown", variant: "muted", "aria-hidden": "true", className: `transition-transform duration-200 ease-out motion-reduce:transition-none ${open ? "rotate-180" : ""}` })] }));
50
50
  }
51
51
  function SelectDropdown({ open, options, selected, multiple, searchable, searchablePlaceholder = "Rechercher...", onToggle, emptyMessage = "Aucun résultat trouvé.", }) {
52
52
  const [searchQuery, setSearchQuery] = useState("");
@@ -57,11 +57,15 @@ function SelectDropdown({ open, options, selected, multiple, searchable, searcha
57
57
  return options.filter((option) => option.label.toLowerCase().includes(query) ||
58
58
  option.value.toLowerCase().includes(query));
59
59
  }, [options, searchQuery]);
60
- if (!open)
61
- return null;
62
- return (_jsxs("div", { className: "absolute top-full z-50 mt-1 max-h-64 w-full min-w-[10rem] overflow-hidden rounded-medium border border-border bg-surface shadow-lg", children: [searchable && (_jsx("div", { className: "border-b border-border p-2", children: _jsx(Input, { type: "text", placeholder: searchablePlaceholder, value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), icon: _jsx(Icon, { name: "Search" }), "aria-label": searchablePlaceholder }) })), _jsx("div", { className: "overflow-y-auto", children: filteredOptions.length === 0 ? (_jsx("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyMessage })) : (filteredOptions.map((option) => {
60
+ useEffect(() => {
61
+ if (!open)
62
+ setSearchQuery("");
63
+ }, [open]);
64
+ return (_jsxs("div", { "aria-hidden": !open, inert: !open ? true : undefined, className: `absolute top-full z-50 mt-1 max-h-64 w-full min-w-[10rem] overflow-hidden rounded-medium border border-border bg-surface shadow-lg transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none ${open
65
+ ? "pointer-events-auto translate-y-0 opacity-100"
66
+ : "pointer-events-none -translate-y-1 opacity-0"}`, children: [searchable && (_jsx("div", { className: "border-b border-border p-2", children: _jsx(Input, { type: "text", placeholder: searchablePlaceholder, value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), icon: _jsx(Icon, { name: "Search" }), "aria-label": searchablePlaceholder }) })), _jsx("div", { className: "overflow-y-auto", children: filteredOptions.length === 0 ? (_jsx("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyMessage })) : (filteredOptions.map((option) => {
63
67
  const isSelected = selected.has(option.value);
64
- return (_jsxs("div", { className: "flex items-center justify-between px-3 py-2 text-sm text-foreground hover:bg-surface-muted cursor-pointer [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0", onClick: () => onToggle(option.value), children: [_jsx("span", { children: option.label }), multiple ? (_jsx("div", { className: `flex h-4 w-4 items-center justify-center rounded-sm border [&_svg]:size-3 [&_svg]:text-current ${isSelected ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground"}`, children: isSelected && _jsx(Icon, { name: "Check" }) })) : isSelected ? (_jsx(Icon, { name: "Check", variant: "primary" })) : null] }, option.value));
68
+ return (_jsxs("div", { className: "flex cursor-pointer items-center justify-between px-3 py-2 text-sm text-foreground transition-colors duration-200 ease-out hover:bg-surface-muted motion-reduce:transition-none [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0", onClick: () => onToggle(option.value), children: [_jsx("span", { children: option.label }), multiple ? (_jsx("div", { className: `flex h-4 w-4 items-center justify-center rounded-sm border transition-[background-color,border-color] duration-200 ease-out motion-reduce:transition-none [&_svg]:size-3 [&_svg]:text-current ${isSelected ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground"}`, children: isSelected && _jsx(Icon, { name: "Check" }) })) : isSelected ? (_jsx(Icon, { name: "Check", variant: "primary" })) : null] }, option.value));
65
69
  })) })] }));
66
70
  }
67
71
  /**
@@ -0,0 +1,12 @@
1
+ export type SkeletonShape = "line" | "circle" | "block";
2
+ export interface SkeletonProps {
3
+ /** Visual shape of the placeholder. */
4
+ shape?: SkeletonShape;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * Squelette — placeholder de chargement.
9
+ * Le parent peut poser `aria-busy` ; ces barres restent décoratives.
10
+ */
11
+ export default function Skeleton({ shape, className, }: SkeletonProps): import("react").JSX.Element;
12
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../components/ui/skeleton.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,KAAc,EACd,SAAc,GACf,EAAE,aAAa,+BAOf"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ const SHAPE_CLASS = {
3
+ line: "h-3 w-full rounded-small",
4
+ circle: "size-10 rounded-full",
5
+ block: "h-24 w-full rounded-medium",
6
+ };
7
+ /**
8
+ * Squelette — placeholder de chargement.
9
+ * Le parent peut poser `aria-busy` ; ces barres restent décoratives.
10
+ */
11
+ export default function Skeleton({ shape = "line", className = "", }) {
12
+ return (_jsx("div", { "aria-hidden": "true", className: `animate-pulse bg-muted motion-reduce:animate-none ${SHAPE_CLASS[shape]} ${className}` }));
13
+ }
package/dist/stepper.js CHANGED
@@ -33,6 +33,6 @@ export default function Stepper({ steps, currentIndex, complete = false, rejecte
33
33
  return (_jsx("ol", { "aria-label": label, className: "flex flex-col gap-control md:flex-row md:items-center", children: steps.map((step, index) => {
34
34
  const visual = stepState(index, currentIndex, complete, rejected);
35
35
  const last = index === steps.length - 1;
36
- return (_jsxs("li", { className: "flex min-w-0 items-center gap-inline md:flex-1", "aria-label": `${step}, ${STATE_NAME[visual]}`, "aria-current": visual === "current" || visual === "rejected" ? "step" : undefined, children: [_jsx("span", { className: `grid size-8 shrink-0 place-items-center rounded-full text-label ${CIRCLE_CLASS[visual]}`, children: visual === "done" ? (_jsx(Icon, { name: "Check", variant: "white", size: "small", "aria-hidden": "true" })) : (index + 1) }), _jsx("span", { className: `min-w-0 text-label ${LABEL_CLASS[visual]}`, children: step }), last ? null : (_jsx("span", { className: `hidden h-px flex-1 md:block ${visual === "done" ? "bg-success" : "bg-border"}`, "aria-hidden": "true" }))] }, step));
36
+ return (_jsxs("li", { className: "flex min-w-0 items-center gap-inline md:flex-1", "aria-label": `${step}, ${STATE_NAME[visual]}`, "aria-current": visual === "current" || visual === "rejected" ? "step" : undefined, children: [_jsx("span", { className: `grid size-8 shrink-0 place-items-center rounded-full text-label transition-[background-color,color,box-shadow] duration-200 ease-out motion-reduce:transition-none ${CIRCLE_CLASS[visual]}`, children: visual === "done" ? (_jsx(Icon, { name: "Check", variant: "white", size: "small", "aria-hidden": "true" })) : (index + 1) }), _jsx("span", { className: `min-w-0 text-label transition-colors duration-200 ease-out motion-reduce:transition-none ${LABEL_CLASS[visual]}`, children: step }), last ? null : (_jsx("span", { className: `hidden h-px flex-1 md:block ${visual === "done" ? "bg-success" : "bg-border"}`, "aria-hidden": "true" }))] }, step));
37
37
  }) }));
38
38
  }
@@ -0,0 +1,21 @@
1
+ export type SwitchSize = "sm" | "md";
2
+ export interface SwitchProps {
3
+ /** Controlled checked state. */
4
+ checked: boolean;
5
+ onCheckedChange: (checked: boolean) => void;
6
+ /** Visible label — required for accessibility. */
7
+ label: string;
8
+ /** Optional helper text under the label. */
9
+ description?: string;
10
+ disabled?: boolean;
11
+ id?: string;
12
+ name?: string;
13
+ size?: SwitchSize;
14
+ className?: string;
15
+ }
16
+ /**
17
+ * Interrupteur (switch) — bascule on/off.
18
+ * Identité Modoock : piste primary à l’activation, pastille blanche.
19
+ */
20
+ export default function Switch({ checked, onCheckedChange, label, description, disabled, id, name, size, className, }: SwitchProps): import("react").JSX.Element;
21
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../components/ui/switch.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiBD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAO,EACP,eAAe,EACf,KAAK,EACL,WAAW,EACX,QAAgB,EAChB,EAAE,EACF,IAAI,EACJ,IAAW,EACX,SAAc,GACf,EAAE,WAAW,+BAmDb"}
package/dist/switch.js ADDED
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useId } from "react";
4
+ const TRACK_SIZE = {
5
+ sm: "h-5 w-9",
6
+ md: "h-6 w-11",
7
+ };
8
+ const THUMB_SIZE = {
9
+ sm: "size-4",
10
+ md: "size-5",
11
+ };
12
+ const THUMB_ON = {
13
+ sm: "translate-x-4",
14
+ md: "translate-x-5",
15
+ };
16
+ /**
17
+ * Interrupteur (switch) — bascule on/off.
18
+ * Identité Modoock : piste primary à l’activation, pastille blanche.
19
+ */
20
+ export default function Switch({ checked, onCheckedChange, label, description, disabled = false, id, name, size = "md", className = "", }) {
21
+ const generatedId = useId();
22
+ const switchId = id ?? generatedId;
23
+ const descriptionId = description ? `${switchId}-description` : undefined;
24
+ return (_jsxs("div", { className: `inline-flex items-start gap-control ${disabled ? "opacity-60" : ""} ${className}`, children: [_jsx("button", { type: "button", role: "switch", id: switchId, name: name, "aria-checked": checked, "aria-describedby": descriptionId, disabled: disabled, onClick: () => onCheckedChange(!checked), className: `relative inline-flex shrink-0 cursor-pointer items-center rounded-full border p-0.5 outline-none transition-[background-color,border-color] duration-200 ease-out focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed motion-reduce:transition-none ${TRACK_SIZE[size]} ${checked
25
+ ? "border-primary bg-primary"
26
+ : "border-border bg-surface-muted"}`, children: _jsx("span", { "aria-hidden": "true", className: `pointer-events-none block rounded-full bg-white shadow-sm transition-transform duration-200 ease-out motion-reduce:transition-none ${THUMB_SIZE[size]} ${checked ? THUMB_ON[size] : "translate-x-0"}` }) }), _jsxs("div", { className: "min-w-0 pt-micro", children: [_jsx("label", { htmlFor: switchId, className: `text-body-medium leading-snug text-foreground ${disabled ? "cursor-not-allowed" : "cursor-pointer"}`, children: label }), description ? (_jsx("p", { id: descriptionId, className: "mt-0 text-small leading-snug text-muted-foreground", children: description })) : null] })] }));
27
+ }
package/dist/tab.js CHANGED
@@ -18,7 +18,7 @@ export default function Tabs({ tabs, defaultValue, onChange, children, panelClas
18
18
  };
19
19
  return (_jsxs("div", { className: "flex h-full min-h-0 w-full flex-col", children: [_jsx("div", { role: "tablist", className: "inline-flex max-w-full items-center gap-micro overflow-x-auto rounded-large bg-surface-muted p-micro", children: tabs.map((tab) => {
20
20
  const isActive = activeTab === tab.value;
21
- return (_jsx(ClickableButton, { type: "button", variant: "bare", role: "tab", "aria-selected": isActive, "aria-current": isActive ? "page" : undefined, onClick: () => handleSelect(tab.value), className: `whitespace-nowrap rounded-large px-component py-inline text-body-medium focus-visible:ring-primary ${isActive
21
+ return (_jsx(ClickableButton, { type: "button", variant: "bare", role: "tab", "aria-selected": isActive, "aria-current": isActive ? "page" : undefined, onClick: () => handleSelect(tab.value), className: `whitespace-nowrap rounded-large px-component py-inline text-body-medium transition-[color,background-color,box-shadow] duration-200 ease-out focus-visible:ring-primary motion-reduce:transition-none ${isActive
22
22
  ? "bg-surface text-primary shadow-sm"
23
23
  : "bg-transparent text-muted-foreground hover:text-foreground"}`, children: tab.label }, tab.value));
24
24
  }) }), children && _jsx("div", { className: panelClassName, children: children(activeTab) })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../components/ui/table.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAI7C,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;CACjC;AAED,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;0DAEsD;IACtD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAGD,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,iFAAiF;IACjF,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAErB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,6FAA6F;IAC7F,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;IAEjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;uEAImE;IACnE,WAAW,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAElC,YAAY,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACrC,cAAc,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;iFAG6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CAChD;AAiND,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,EAC9C,OAAO,EACP,IAAI,EACJ,WAAe,EACf,YAAuC,EACvC,SAAkC,EAClC,gBAAoB,EACpB,WAAW,EACX,YAAmB,EACnB,cAAqB,EACrB,SAAS,EACT,SAAiB,EACjB,cAAc,EACd,eAAe,GAChB,EAAE,UAAU,CAAC,CAAC,CAAC,+BAmgBf"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../components/ui/table.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAK7C,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;CACjC;AAED,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;0DAEsD;IACtD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAGD,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,iFAAiF;IACjF,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAErB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,6FAA6F;IAC7F,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC;IAEjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;uEAImE;IACnE,WAAW,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAElC,YAAY,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACrC,cAAc,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;iFAG6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CAChD;AAiND,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,EAC9C,OAAO,EACP,IAAI,EACJ,WAAe,EACf,YAAuC,EACvC,SAAkC,EAClC,gBAAoB,EACpB,WAAW,EACX,YAAmB,EACnB,cAAqB,EACrB,SAAS,EACT,SAAiB,EACjB,cAAc,EACd,eAAe,GAChB,EAAE,UAAU,CAAC,CAAC,CAAC,+BA4ef"}
package/dist/table.js CHANGED
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { useState } from "react";
4
4
  import Icon from "./icon";
5
5
  import ClickableButton from "./button";
6
+ import Pagination from "./pagination";
6
7
  function defaultCompare(a, b, key) {
7
8
  const aValue = a[key];
8
9
  const bValue = b[key];
@@ -24,8 +25,8 @@ function CardActionsMenu({ tableActions, rowActions, open, onToggle, onClose, tr
24
25
  _jsx("div", { onClick: onClose, className: "rounded-small focus-within:ring-primary", children: action.content }, action.label || `derived-${index}`)) : (_jsxs("button", { type: "button", role: "menuitem", onClick: () => {
25
26
  onClose();
26
27
  action.onSelect();
27
- }, className: `flex items-center gap-inline whitespace-nowrap rounded-small px-component py-control text-left text-body-medium transition-colors hover:bg-surface-muted focus-visible:ring-primary ${action.danger ? "text-danger" : "text-foreground"}`, children: [action.icon && (_jsx(Icon, { name: action.icon, size: "small", variant: action.danger ? "danger" : "muted", "aria-hidden": "true" })), action.label] }, action.label)));
28
- return (_jsxs("div", { className: "relative", children: [trigger === "kebab" ? (_jsx(ClickableButton, { type: "button", variant: "ghost", size: "icon", "aria-label": "Plus d'actions", "aria-haspopup": "menu", "aria-expanded": open, onClick: onToggle, className: "text-muted-foreground hover:text-primary focus-visible:ring-primary", children: _jsx(Icon, { name: "EllipsisVertical", "aria-hidden": "true" }) })) : (_jsxs(ClickableButton, { type: "button", variant: "secondary", size: "sm", "aria-haspopup": "menu", "aria-expanded": open, onClick: onToggle, leftIcon: _jsx(Icon, { name: "EllipsisVertical", size: "small" }), children: ["Actions", _jsx(Icon, { name: "ChevronDown", size: "small", className: `transition-transform ${open ? "rotate-180" : ""}` })] })), open && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", "aria-label": "Fermer le menu", tabIndex: -1, onClick: onClose, className: "fixed inset-0 z-40 cursor-default" }), _jsxs("div", { role: "menu", className: `absolute right-0 z-50 flex min-w-40 max-w-[16rem] flex-col rounded-medium border border-border bg-surface shadow-lg ${direction === "up" ? "bottom-full mb-micro" : "top-full mt-micro"}`, children: [hasGroups && (_jsx("p", { className: "px-component pt-micro text-label text-muted-foreground", children: "Tableau" })), renderGroup(tableActions), hasGroups && _jsx("div", { className: "mx-component my-micro h-px bg-border" }), hasGroups && (_jsx("p", { className: "px-component pt-micro text-label text-muted-foreground", children: "Cette ligne" })), renderGroup(rowActions)] })] }))] }));
28
+ }, className: `flex items-center gap-inline whitespace-nowrap rounded-small px-component py-control text-left text-body-medium transition-colors duration-200 ease-out motion-reduce:transition-none hover:bg-surface-muted focus-visible:ring-primary ${action.danger ? "text-danger" : "text-foreground"}`, children: [action.icon && (_jsx(Icon, { name: action.icon, size: "small", variant: action.danger ? "danger" : "muted", "aria-hidden": "true" })), action.label] }, action.label)));
29
+ return (_jsxs("div", { className: "relative", children: [trigger === "kebab" ? (_jsx(ClickableButton, { type: "button", variant: "ghost", size: "icon", "aria-label": "Plus d'actions", "aria-haspopup": "menu", "aria-expanded": open, onClick: onToggle, className: "text-muted-foreground hover:text-primary focus-visible:ring-primary", children: _jsx(Icon, { name: "EllipsisVertical", "aria-hidden": "true" }) })) : (_jsxs(ClickableButton, { type: "button", variant: "secondary", size: "sm", "aria-haspopup": "menu", "aria-expanded": open, onClick: onToggle, leftIcon: _jsx(Icon, { name: "EllipsisVertical", size: "small" }), children: ["Actions", _jsx(Icon, { name: "ChevronDown", size: "small", className: `transition-transform duration-200 ease-out motion-reduce:transition-none ${open ? "rotate-180" : ""}` })] })), open && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", "aria-label": "Fermer le menu", tabIndex: -1, onClick: onClose, className: "fixed inset-0 z-40 cursor-default" }), _jsxs("div", { role: "menu", className: `absolute right-0 z-50 flex min-w-40 max-w-[16rem] flex-col rounded-medium border border-border bg-surface shadow-lg ${direction === "up" ? "bottom-full mb-micro" : "top-full mt-micro"}`, children: [hasGroups && (_jsx("p", { className: "px-component pt-micro text-label text-muted-foreground", children: "Tableau" })), renderGroup(tableActions), hasGroups && _jsx("div", { className: "mx-component my-micro h-px bg-border" }), hasGroups && (_jsx("p", { className: "px-component pt-micro text-label text-muted-foreground", children: "Cette ligne" })), renderGroup(rowActions)] })] }))] }));
29
30
  }
30
31
  function TableActionsBar({ selectAllAction, allSelected, tableActions, open, direction = "down", onToggle, onClose, }) {
31
32
  return (_jsxs("div", { className: "flex items-center justify-end gap-inline", children: [selectAllAction ? (_jsx(ClickableButton, { type: "button", variant: "secondary", size: "sm", "aria-pressed": allSelected, onClick: selectAllAction.onSelect, leftIcon: selectAllAction.icon ? (_jsx(Icon, { name: selectAllAction.icon, size: "small", variant: allSelected ? "primary" : "muted", "aria-hidden": "true" })) : undefined, children: selectAllAction.label })) : null, tableActions.length > 0 ? (_jsx(CardActionsMenu, { trigger: "labeled", direction: direction, tableActions: tableActions, rowActions: [], open: open, onToggle: onToggle, onClose: onClose })) : null] }));
@@ -154,11 +155,11 @@ export default function Table({ columns, data, rowsPerPage = 8, emptyMessage = "
154
155
  return (_jsx("div", { className: "flex justify-end", children: _jsx(ClickableButton, { type: "button", variant: action.danger ? "danger" : "secondary", size: "sm", onClick: action.onSelect, children: action.label }) }));
155
156
  };
156
157
  const SortIcon = () => (_jsx(Icon, { name: "ChevronsUpDown", "aria-hidden": "true" }));
157
- const SortableHeader = ({ column }) => (_jsx("th", { className: "text-left", children: _jsxs(ClickableButton, { type: "button", variant: "bare", onClick: () => handleSort(column), className: "px-component py-control text-muted-foreground transition-colors hover:text-primary focus-visible:ring-primary", children: [_jsx("span", { className: "text-label", children: column.label }), _jsx(SortIcon, {})] }) }));
158
+ const SortableHeader = ({ column }) => (_jsx("th", { className: "text-left", children: _jsxs(ClickableButton, { type: "button", variant: "bare", onClick: () => handleSort(column), className: "px-component py-control text-muted-foreground transition-colors duration-200 ease-out motion-reduce:transition-none hover:text-primary focus-visible:ring-primary", children: [_jsx("span", { className: "text-label", children: column.label }), _jsx(SortIcon, {})] }) }));
158
159
  return (_jsxs("div", { className: `flex flex-col overflow-hidden rounded-large border border-border bg-surface md:h-full ${className ?? ""}`, children: [tableActions.length > 0 || selectAllAction ? (_jsx("div", { className: "hidden shrink-0 border-b border-border px-component py-control md:flex md:justify-end", children: _jsx(TableActionsBar, { selectAllAction: selectAllAction, allSelected: allSelected, tableActions: tableActions, open: openMenu === "actions-desktop", onToggle: () => toggleMenu("actions-desktop"), onClose: closeMenus }) })) : null, _jsx("div", { className: "hidden min-h-0 flex-1 overflow-auto md:block", children: _jsx("table", { className: "w-full border-collapse text-body", children: transpose ? (_jsxs(_Fragment, { children: [_jsx("thead", { className: "sticky top-0 z-10 bg-surface-muted", children: _jsxs("tr", { className: "border-b border-border", children: [_jsx("th", { className: "px-component py-control text-left text-label text-muted-foreground", children: transposeLabel ?? columns[0]?.label ?? "" }), data.map((item, i) => (_jsx("th", { className: "px-component py-control text-left", children: transposeHeader ? transposeHeader(item) : null }, i)))] }) }), _jsx("tbody", { children: data.length === 0 ? (_jsx("tr", { children: _jsx("td", { colSpan: 1, className: "px-component py-section text-center text-muted-foreground", children: emptyMessage }) })) : (columns.slice(1).map((column) => (_jsxs("tr", { className: "h-12 border-t border-border", children: [_jsx("td", { className: "px-component align-middle text-label text-muted-foreground", children: column.label }), data.map((item, i) => (_jsx("td", { className: `px-component align-middle ${column.className ?? "text-body-medium text-foreground"}`, children: getCellValue(item, column) }, i)))] }, String(column.key))))) })] })) : (_jsxs(_Fragment, { children: [_jsx("thead", { className: "sticky top-0 z-10 bg-surface-muted", children: _jsxs("tr", { className: "border-b border-border", children: [hasSelectionControl ? (_jsx("th", { className: "w-10 px-component py-control", children: selectAllAction ? (_jsx(ClickableButton, { type: "button", variant: "ghost", size: "icon", "aria-label": selectAllAction.label, "aria-pressed": allSelected, onClick: selectAllAction.onSelect, className: "text-muted-foreground hover:text-primary focus-visible:ring-primary", children: _jsx(Icon, { name: allSelected ? "SquareCheck" : "Square", "aria-hidden": "true" }) })) : null })) : null, visibleColumns.map((column, columnIndex) => column.sortable ? (_jsx(SortableHeader, { column: column }, `col-${columnIndex}`)) : (_jsx("th", { className: "px-component py-control text-left text-label text-muted-foreground", children: column.label }, `col-${columnIndex}`)))] }) }), _jsx("tbody", { children: visibleData.length === 0 ? (_jsx("tr", { children: _jsx("td", { colSpan: columnCount, className: "px-component py-section text-center text-muted-foreground", children: emptyMessage }) })) : (visibleData.map((row, rowIndex) => {
159
160
  const rowKey = getRowKey(row, startIndex + rowIndex);
160
161
  const selected = selectedKeys?.has(rowKey) ?? false;
161
- return (_jsxs("tr", { className: "h-12 border-b border-border transition-colors last:border-b-0 hover:bg-surface-muted", children: [hasSelectionControl ? (_jsx("td", { className: "px-component align-middle", children: _jsx(ClickableButton, { type: "button", variant: "ghost", size: "icon", "aria-pressed": selected, "aria-label": selected
162
+ return (_jsxs("tr", { className: "h-12 border-b border-border transition-colors duration-200 ease-out motion-reduce:transition-none last:border-b-0 hover:bg-surface-muted", children: [hasSelectionControl ? (_jsx("td", { className: "px-component align-middle", children: _jsx(ClickableButton, { type: "button", variant: "ghost", size: "icon", "aria-pressed": selected, "aria-label": selected
162
163
  ? "Retirer la sélection"
163
164
  : "Sélectionner", onClick: () => onToggleSelect?.(rowKey), className: "text-muted-foreground hover:text-primary focus-visible:ring-primary", children: _jsx(Icon, { name: selected ? "SquareCheck" : "Square", "aria-hidden": "true" }) }) })) : null, visibleColumns.map((column, columnIndex) => (_jsx("td", { className: `px-component align-middle ${column.className ?? "text-body-medium text-foreground"}`, children: cardActions?.row && column === rowActionColumn ? (renderPersonalActions(row, rowKey)) : (getCellValue(row, column)) }, `col-${columnIndex}`)))] }, rowKey));
164
165
  })) })] })) }) }), _jsx("div", { className: "md:hidden", children: visibleData.length === 0 ? (_jsx("div", { className: "px-component py-section text-center text-muted-foreground", children: emptyMessage })) : (_jsxs("div", { className: "flex flex-col gap-component p-component", children: [tableActions.length > 0 || selectAllAction ? (_jsx("div", { className: "flex justify-end", children: _jsx(TableActionsBar, { selectAllAction: selectAllAction, allSelected: allSelected, tableActions: tableActions, direction: "down", open: openMenu === "actions-top", onToggle: () => toggleMenu("actions-top"), onClose: closeMenus }) })) : null, visibleData.map((row, rowIndex) => {
@@ -173,8 +174,8 @@ export default function Table({ columns, data, rowsPerPage = 8, emptyMessage = "
173
174
  const menuKey = `card:${String(rowKey)}`;
174
175
  return (_jsxs("article", { className: "flex flex-col overflow-hidden rounded-large border border-border bg-surface", children: [_jsxs("div", { className: "flex items-center gap-inline bg-surface-muted px-component py-control", children: [hasSelectionControl ? (_jsx("button", { type: "button", onClick: () => onToggleSelect?.(rowKey), "aria-pressed": selectedKeys?.has(rowKey) ?? false, "aria-label": selectedKeys?.has(rowKey)
175
176
  ? "Retirer la sélection"
176
- : "Sélectionner", className: "grid size-8 shrink-0 place-items-center rounded-small text-muted-foreground transition-colors hover:text-primary focus-visible:ring-primary", children: _jsx(Icon, { name: selectedKeys?.has(rowKey) ? "SquareCheck" : "Square", size: "default", "aria-hidden": "true" }) })) : (headerControlColumn && (_jsx("div", { className: "shrink-0", children: getCellValue(row, headerControlColumn) }))), _jsx("p", { className: "min-w-0 flex-1 text-component-title text-foreground", children: getCellValue(row, titleColumn) }), rowActions.length > 0 ? (_jsx(CardActionsMenu, { trigger: "kebab", tableActions: [], rowActions: rowActions, open: openMenu === menuKey, onToggle: () => toggleMenu(menuKey), onClose: closeMenus })) : null] }), visiblePairs.map((column) => (_jsxs("div", { className: "flex items-center justify-between gap-inline border-t border-border px-component py-control", children: [_jsx("span", { className: "shrink-0 text-label text-muted-foreground", children: column.label }), _jsx("span", { className: "min-w-0 text-right text-body-medium text-foreground", children: getCellValue(row, column) })] }, String(column.key)))), collapsible && (_jsx("div", { className: "border-t border-border px-component py-control", children: _jsxs(ClickableButton, { type: "button", variant: "bare", onClick: () => toggleCard(rowKey), "aria-expanded": isExpanded, className: "flex items-center gap-micro text-small text-primary transition-colors hover:text-primary focus-visible:ring-primary", children: [_jsx(Icon, { name: "ChevronDown", "aria-hidden": "true", className: `transition-transform ${isExpanded ? "rotate-180" : ""}` }), isExpanded
177
+ : "Sélectionner", className: "grid size-8 shrink-0 place-items-center rounded-small text-muted-foreground transition-colors duration-200 ease-out motion-reduce:transition-none hover:text-primary focus-visible:ring-primary", children: _jsx(Icon, { name: selectedKeys?.has(rowKey) ? "SquareCheck" : "Square", size: "default", "aria-hidden": "true" }) })) : (headerControlColumn && (_jsx("div", { className: "shrink-0", children: getCellValue(row, headerControlColumn) }))), _jsx("p", { className: "min-w-0 flex-1 text-component-title text-foreground", children: getCellValue(row, titleColumn) }), rowActions.length > 0 ? (_jsx(CardActionsMenu, { trigger: "kebab", tableActions: [], rowActions: rowActions, open: openMenu === menuKey, onToggle: () => toggleMenu(menuKey), onClose: closeMenus })) : null] }), visiblePairs.map((column) => (_jsxs("div", { className: "flex items-center justify-between gap-inline border-t border-border px-component py-control", children: [_jsx("span", { className: "shrink-0 text-label text-muted-foreground", children: column.label }), _jsx("span", { className: "min-w-0 text-right text-body-medium text-foreground", children: getCellValue(row, column) })] }, String(column.key)))), collapsible && (_jsx("div", { className: "border-t border-border px-component py-control", children: _jsxs(ClickableButton, { type: "button", variant: "bare", onClick: () => toggleCard(rowKey), "aria-expanded": isExpanded, className: "flex items-center gap-micro text-small text-primary transition-colors duration-200 ease-out motion-reduce:transition-none hover:text-primary focus-visible:ring-primary", children: [_jsx(Icon, { name: "ChevronDown", "aria-hidden": "true", className: `transition-transform duration-200 ease-out motion-reduce:transition-none ${isExpanded ? "rotate-180" : ""}` }), isExpanded
177
178
  ? "Réduire"
178
179
  : `Voir tout (+${contentColumns.length - pairLimit})`] }) })), actionColumn && rowActions.length === 0 ? (_jsx("div", { className: "flex justify-end border-t border-border px-component py-control", children: getCellValue(row, actionColumn) })) : null] }, rowKey));
179
- }), tableActions.length > 0 || selectAllAction ? (_jsx("div", { className: "flex justify-end", children: _jsx(TableActionsBar, { selectAllAction: selectAllAction, allSelected: allSelected, tableActions: tableActions, direction: "up", open: openMenu === "actions-bottom", onToggle: () => toggleMenu("actions-bottom"), onClose: closeMenus }) })) : null] })) }), totalPages > 1 && (_jsxs("div", { className: "flex items-center justify-between border-t border-border bg-surface px-component py-control", children: [_jsxs("p", { className: "text-small text-muted-foreground", children: [startIndex + 1, "\u2013", Math.min(startIndex + rowsPerPage, sortedData.length), " sur", " ", sortedData.length] }), _jsxs("div", { className: "flex items-center gap-inline", children: [_jsx(ClickableButton, { type: "button", variant: "bare", onClick: () => setCurrentPage((page) => Math.max(1, page - 1)), disabled: safePage === 1, className: "rounded-medium border border-border p-inline text-muted-foreground transition-colors hover:text-primary disabled:opacity-50 focus-visible:ring-primary", "aria-label": "Page pr\u00E9c\u00E9dente", children: _jsx(Icon, { name: "ChevronLeft", "aria-hidden": "true" }) }), _jsxs("span", { className: "text-small text-muted-foreground", children: [safePage, " / ", totalPages] }), _jsx(ClickableButton, { type: "button", variant: "bare", onClick: () => setCurrentPage((page) => Math.min(totalPages, page + 1)), disabled: safePage === totalPages, className: "rounded-medium border border-border p-inline text-muted-foreground transition-colors hover:text-primary disabled:opacity-50 focus-visible:ring-primary", "aria-label": "Page suivante", children: _jsx(Icon, { name: "ChevronRight", "aria-hidden": "true" }) })] })] }))] }));
180
+ }), tableActions.length > 0 || selectAllAction ? (_jsx("div", { className: "flex justify-end", children: _jsx(TableActionsBar, { selectAllAction: selectAllAction, allSelected: allSelected, tableActions: tableActions, direction: "up", open: openMenu === "actions-bottom", onToggle: () => toggleMenu("actions-bottom"), onClose: closeMenus }) })) : null] })) }), totalPages > 1 ? (_jsx(Pagination, { page: safePage, pageCount: totalPages, onPageChange: setCurrentPage, totalItems: sortedData.length, pageSize: rowsPerPage, className: "border-t border-border bg-surface px-component py-control" })) : null] }));
180
181
  }
@@ -0,0 +1,31 @@
1
+ export type ToastVariant = "default" | "success" | "warning" | "danger" | "info";
2
+ export type ToastPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left";
3
+ export interface ToastOptions {
4
+ title: string;
5
+ description: string;
6
+ variant?: ToastVariant;
7
+ /** Auto-dismiss delay in ms. `0` keeps the toast until closed. Default 4000. */
8
+ duration?: number;
9
+ }
10
+ export interface ToasterProps {
11
+ position?: ToastPosition;
12
+ /** Max visible toasts. Oldest are dismissed first. Default 4. */
13
+ max?: number;
14
+ className?: string;
15
+ }
16
+ declare function dismiss(id: string): void;
17
+ export declare const toast: ((options: ToastOptions) => string) & {
18
+ success: (title: string, description: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
19
+ warning: (title: string, description: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
20
+ danger: (title: string, description: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
21
+ info: (title: string, description: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
22
+ message: (title: string, description: string, options?: Omit<ToastOptions, "title" | "description" | "variant">) => string;
23
+ dismiss: typeof dismiss;
24
+ };
25
+ /**
26
+ * Conteneur des toasts — monter une seule fois (layout racine).
27
+ * Déclencher via `toast.success("…")` / `toast({ title, … })`.
28
+ */
29
+ export declare function Toaster({ position, max, className, }: ToasterProps): import("react").ReactPortal | null;
30
+ export {};
31
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../components/ui/toast.tsx"],"names":[],"mappings":"AAUA,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA8CD,iBAAS,OAAO,CAAC,EAAE,EAAE,MAAM,QAU1B;AAmDD,eAAO,MAAM,KAAK,aACN,YAAY;qBAPb,MAAM,eACA,MAAM,YACT,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;qBAF1D,MAAM,eACA,MAAM,YACT,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;oBAF1D,MAAM,eACA,MAAM,YACT,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;kBAF1D,MAAM,eACA,MAAM,YACT,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;qBAF1D,MAAM,eACA,MAAM,YACT,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;;CAcpE,CAAC;AA4HF;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAyB,EACzB,GAAiB,EACjB,SAAc,GACf,EAAE,YAAY,sCA4Bd"}