@modoock/components 2.1.0 → 2.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../components/ui/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,KAAK,EACL,aAAoB,EACpB,SAAc,GACf,EAAE,cAAc,+BAgEhB"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../components/ui/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,KAAK,EACL,aAAoB,EACpB,SAAc,GACf,EAAE,cAAc,+BAsEhB"}
package/dist/accordion.js CHANGED
@@ -25,6 +25,6 @@ export default function Accordion({ items, allowMultiple = true, className = "",
25
25
  const isOpen = openIds.has(item.id);
26
26
  const panelId = `accordion-panel-${item.id}`;
27
27
  const headerId = `accordion-header-${item.id}`;
28
- return (_jsxs("section", { className: "overflow-hidden rounded-large border border-border bg-surface", children: [_jsx("h3", { className: "m-0", children: _jsxs(ClickableButton, { type: "button", variant: "bare", id: headerId, "aria-expanded": isOpen, "aria-controls": panelId, onClick: () => toggle(item.id), className: "flex !h-auto w-full items-center justify-between gap-inline rounded-none px-component py-component text-left text-component-title text-foreground hover:bg-surface-muted focus-visible:ring-primary", children: [_jsx("span", { className: "min-w-0 flex-1 truncate", children: item.title }), _jsx(Icon, { name: "ChevronDown", "aria-hidden": "true", className: `shrink-0 transition-transform ${isOpen ? "rotate-180" : ""}` })] }) }), isOpen ? (_jsx("div", { id: panelId, role: "region", "aria-labelledby": headerId, className: "border-t border-border px-component py-component", children: item.content })) : null] }, item.id));
28
+ return (_jsxs("section", { className: "overflow-hidden rounded-large border border-border bg-surface", children: [_jsx("h3", { className: "m-0", children: _jsxs(ClickableButton, { type: "button", variant: "bare", id: headerId, "aria-expanded": isOpen, "aria-controls": panelId, onClick: () => toggle(item.id), className: "flex !h-auto w-full items-center justify-between gap-inline rounded-none px-component py-component text-left text-component-title text-foreground transition-colors duration-200 ease-out hover:bg-surface-muted focus-visible:ring-primary motion-reduce:transition-none", children: [_jsx("span", { className: "min-w-0 flex-1 truncate", children: item.title }), _jsx(Icon, { name: "ChevronDown", "aria-hidden": "true", className: `shrink-0 transition-transform duration-200 ease-out motion-reduce:transition-none ${isOpen ? "rotate-180" : ""}` })] }) }), _jsx("div", { id: panelId, role: "region", "aria-labelledby": headerId, "aria-hidden": !isOpen, inert: !isOpen ? true : undefined, className: `grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none ${isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"}`, children: _jsx("div", { className: "min-h-0 overflow-hidden", children: _jsx("div", { className: "border-t border-border px-component py-component", children: item.content }) }) })] }, item.id));
29
29
  }) }));
30
30
  }
package/dist/agenda.js CHANGED
@@ -260,7 +260,7 @@ function EventChip({ event, onSelect, statusStyles, }) {
260
260
  e.preventDefault();
261
261
  e.stopPropagation();
262
262
  onSelect(event);
263
- }, className: `flex w-full items-stretch overflow-hidden rounded-small text-left transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${style.event}`, title: `${formatEventTime(event.startAt)} — ${event.title}`, children: [_jsx("span", { className: `w-0.5 shrink-0 ${style.accent}`, "aria-hidden": "true" }), _jsxs("span", { className: "min-w-0 flex-1 truncate px-1.5 py-0.5 text-[10px] leading-tight", children: [_jsx("span", { className: "font-semibold tabular-nums", children: formatEventTime(event.startAt) }), " ", _jsx("span", { className: "opacity-90", children: event.title })] })] }));
263
+ }, className: `flex w-full items-stretch overflow-hidden rounded-small text-left transition-opacity duration-200 ease-out motion-reduce:transition-none hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${style.event}`, title: `${formatEventTime(event.startAt)} — ${event.title}`, children: [_jsx("span", { className: `w-0.5 shrink-0 ${style.accent}`, "aria-hidden": "true" }), _jsxs("span", { className: "min-w-0 flex-1 truncate px-1.5 py-0.5 text-[10px] leading-tight", children: [_jsx("span", { className: "font-semibold tabular-nums", children: formatEventTime(event.startAt) }), " ", _jsx("span", { className: "opacity-90", children: event.title })] })] }));
264
264
  }
265
265
  function DayEventsModal({ open, title, events, onClose, onSelectEvent, statusOptions, statusStyles, }) {
266
266
  if (!open)
@@ -271,7 +271,7 @@ function DayEventsModal({ open, title, events, onClose, onSelectEvent, statusOpt
271
271
  return (_jsx("li", { children: _jsxs("button", { type: "button", onClick: () => {
272
272
  onClose();
273
273
  onSelectEvent(event);
274
- }, className: "flex w-full items-start gap-inline rounded-large border border-border bg-surface px-component py-control text-left transition-colors hover:border-primary hover:bg-primary-light/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", children: [_jsx("span", { className: `mt-1 size-2.5 shrink-0 rounded-full ${style.dot}`, "aria-hidden": "true" }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsxs("span", { className: "flex flex-wrap items-center gap-inline", children: [_jsxs("span", { className: "inline-flex items-center gap-micro text-body-medium text-foreground", children: [_jsx(Icon, { name: "Clock", size: "small", variant: "muted", "aria-hidden": "true" }), formatEventTime(event.startAt), event.endAt
274
+ }, className: "flex w-full items-start gap-inline rounded-large border border-border bg-surface px-component py-control text-left transition-colors duration-200 ease-out motion-reduce:transition-none hover:border-primary hover:bg-primary-light/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", children: [_jsx("span", { className: `mt-1 size-2.5 shrink-0 rounded-full ${style.dot}`, "aria-hidden": "true" }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsxs("span", { className: "flex flex-wrap items-center gap-inline", children: [_jsxs("span", { className: "inline-flex items-center gap-micro text-body-medium text-foreground", children: [_jsx(Icon, { name: "Clock", size: "small", variant: "muted", "aria-hidden": "true" }), formatEventTime(event.startAt), event.endAt
275
275
  ? ` – ${formatEventTime(event.endAt)}`
276
276
  : ""] }), label ? (_jsx(Badge, { variant: style.badge ?? "default", children: label })) : null] }), _jsx("span", { className: "mt-micro block text-body text-foreground", children: event.title }), (event.subtitle || event.kind) && (_jsx("span", { className: "mt-micro block text-small text-muted-foreground", children: [event.kind, event.subtitle].filter(Boolean).join(" · ") }))] }), _jsx(Icon, { name: "ChevronRight", size: "small", variant: "muted", "aria-hidden": "true", className: "mt-1 shrink-0" })] }) }, event.id));
277
277
  }) }) }));
@@ -371,13 +371,13 @@ function MonthView({ events, anchorDate, onSelectEvent, onCreateSlot, maxEventsP
371
371
  e.preventDefault();
372
372
  openDay(cellDate, dayEvents);
373
373
  }
374
- }, className: `group relative flex min-h-[6.5rem] flex-col gap-micro border-b border-r border-border p-inline transition-colors last:border-r-0 focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ${inMonth
374
+ }, className: `group relative flex min-h-[6.5rem] flex-col gap-micro border-b border-r border-border p-inline transition-colors duration-200 ease-out motion-reduce:transition-none last:border-r-0 focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ${inMonth
375
375
  ? "bg-surface hover:bg-surface-muted/60"
376
376
  : "bg-surface-muted/40 text-muted-foreground"} ${cellIndex % 7 === 6 ? "border-r-0" : ""}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-micro", children: [_jsx("span", { className: `inline-flex size-7 items-center justify-center rounded-full text-small ${today
377
377
  ? "bg-primary font-semibold text-primary-foreground"
378
378
  : inMonth
379
379
  ? "font-medium text-foreground"
380
- : "text-muted-foreground"}`, children: cellDate.getDate() }), canCreate ? (_jsx("span", { className: "pointer-events-none inline-flex size-6 items-center justify-center rounded-small text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100", children: _jsx(Icon, { name: "Plus", size: "small", "aria-hidden": "true" }) })) : dayEvents.length > 0 ? (_jsx("span", { className: "text-[10px] tabular-nums text-muted-foreground", children: dayEvents.length })) : null] }), _jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-micro", children: [mounted &&
380
+ : "text-muted-foreground"}`, children: cellDate.getDate() }), canCreate ? (_jsx("span", { className: "pointer-events-none inline-flex size-6 items-center justify-center rounded-small text-muted-foreground opacity-0 transition-opacity duration-200 ease-out motion-reduce:transition-none group-hover:opacity-100 group-focus-visible:opacity-100", children: _jsx(Icon, { name: "Plus", size: "small", "aria-hidden": "true" }) })) : dayEvents.length > 0 ? (_jsx("span", { className: "text-[10px] tabular-nums text-muted-foreground", children: dayEvents.length })) : null] }), _jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-micro", children: [mounted &&
381
381
  visible.map((event) => (_jsx(EventChip, { event: event, onSelect: onSelectEvent, statusStyles: statusStyles }, event.id))), mounted && extra > 0 ? (_jsxs("button", { type: "button", onClick: (e) => {
382
382
  e.stopPropagation();
383
383
  openDay(cellDate, dayEvents);
@@ -444,7 +444,7 @@ function WeekView({ events, anchorDate, onSelectEvent, onCreateSlot, weekStartHo
444
444
  return (_jsxs("button", { type: "button", onClick: (e) => {
445
445
  e.stopPropagation();
446
446
  onSelectEvent(event);
447
- }, className: `absolute right-1 left-1 z-[1] flex overflow-hidden rounded-small text-left shadow-sm transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${style.event}`, style: {
447
+ }, className: `absolute right-1 left-1 z-[1] flex overflow-hidden rounded-small text-left shadow-sm transition-opacity duration-200 ease-out motion-reduce:transition-none hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${style.event}`, style: {
448
448
  top: `${topPct}%`,
449
449
  height: `${heightPct}%`,
450
450
  minHeight: "1.35rem",
@@ -0,0 +1,40 @@
1
+ import { type ReactNode } from "react";
2
+ import { type IconName } from "./icon";
3
+ export type AvatarSize = "sm" | "md" | "lg" | "xl";
4
+ export type AvatarVariant = "default" | "primary" | "success" | "warning" | "danger" | "info" | "accent";
5
+ export interface AvatarProps {
6
+ /** Image URL. Falls back to initials / icon when missing or broken. */
7
+ src?: string | null;
8
+ /** Accessible name — also used to derive initials when there is no image. */
9
+ name?: string;
10
+ /** Explicit initials override (1–2 characters). */
11
+ initials?: string;
12
+ size?: AvatarSize;
13
+ /** Background / text tone for the initials fallback. */
14
+ variant?: AvatarVariant;
15
+ /** Lucide icon used when there is no image and no name/initials. */
16
+ fallbackIcon?: IconName;
17
+ /** Optional status badge (bottom-right). */
18
+ status?: "online" | "offline" | "busy" | "away";
19
+ className?: string;
20
+ /** React 19 style: optional children replace the default content. */
21
+ children?: ReactNode;
22
+ }
23
+ export interface AvatarGroupProps {
24
+ children: ReactNode;
25
+ /** Max avatars shown before a “+N” overflow chip. */
26
+ max?: number;
27
+ size?: AvatarSize;
28
+ className?: string;
29
+ }
30
+ /** Builds up to 2 initials from a display name (French-safe). */
31
+ export declare function getAvatarInitials(name: string): string;
32
+ /**
33
+ * User / entity avatar: image, initials, or icon fallback.
34
+ */
35
+ export default function Avatar({ src, name, initials, size, variant, fallbackIcon, status, className, children, }: AvatarProps): import("react").JSX.Element;
36
+ /**
37
+ * Overlapping stack of avatars with an optional “+N” overflow chip.
38
+ */
39
+ export declare function AvatarGroup({ children, max, size, className, }: AvatarGroupProps): import("react").JSX.Element;
40
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../components/ui/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAM7C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,GACR,MAAM,GACN,QAAQ,CAAC;AAEb,MAAM,WAAW,WAAW;IAC1B,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,wDAAwD;IACxD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,oEAAoE;IACpE,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuDD,iEAAiE;AACjE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQtD;AAMD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,IAAW,EACX,OAAmB,EACnB,YAAqB,EACrB,MAAM,EACN,SAAc,EACd,QAAQ,GACT,EAAE,WAAW,+BAoDb;AAMD;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,GAAO,EACP,IAAW,EACX,SAAc,GACf,EAAE,gBAAgB,+BA6BlB"}
package/dist/avatar.js ADDED
@@ -0,0 +1,91 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import Icon from "./icon";
5
+ /* ------------------------------------------------------------------ */
6
+ /* Styles */
7
+ /* ------------------------------------------------------------------ */
8
+ const SIZE_CLASS = {
9
+ sm: "size-8 text-[0.625rem]",
10
+ md: "size-10 text-label",
11
+ lg: "size-12 text-body-medium",
12
+ xl: "size-16 text-component-title",
13
+ };
14
+ const ICON_SIZE = {
15
+ sm: "small",
16
+ md: "small",
17
+ lg: "default",
18
+ xl: "large",
19
+ };
20
+ const VARIANT_CLASS = {
21
+ default: "bg-surface-muted text-muted-foreground",
22
+ primary: "bg-primary-light text-primary",
23
+ success: "bg-success-light text-success-foreground",
24
+ warning: "bg-warning-light text-warning-foreground",
25
+ danger: "bg-danger-light text-danger-foreground",
26
+ info: "bg-info-light text-info-foreground",
27
+ accent: "bg-accent-light text-accent",
28
+ };
29
+ const STATUS_CLASS = {
30
+ online: "bg-success",
31
+ offline: "bg-muted-foreground",
32
+ busy: "bg-danger",
33
+ away: "bg-warning",
34
+ };
35
+ const STATUS_LABEL = {
36
+ online: "En ligne",
37
+ offline: "Hors ligne",
38
+ busy: "Occupé",
39
+ away: "Absent",
40
+ };
41
+ const GROUP_OVERLAP = {
42
+ sm: "-space-x-2",
43
+ md: "-space-x-2.5",
44
+ lg: "-space-x-3",
45
+ xl: "-space-x-4",
46
+ };
47
+ /* ------------------------------------------------------------------ */
48
+ /* Helpers */
49
+ /* ------------------------------------------------------------------ */
50
+ /** Builds up to 2 initials from a display name (French-safe). */
51
+ export function getAvatarInitials(name) {
52
+ const parts = name
53
+ .trim()
54
+ .split(/\s+/)
55
+ .filter(Boolean);
56
+ if (parts.length === 0)
57
+ return "";
58
+ if (parts.length === 1)
59
+ return parts[0].slice(0, 2).toUpperCase();
60
+ return `${parts[0][0] ?? ""}${parts[parts.length - 1][0] ?? ""}`.toUpperCase();
61
+ }
62
+ /* ------------------------------------------------------------------ */
63
+ /* Avatar */
64
+ /* ------------------------------------------------------------------ */
65
+ /**
66
+ * User / entity avatar: image, initials, or icon fallback.
67
+ */
68
+ export default function Avatar({ src, name, initials, size = "md", variant = "default", fallbackIcon = "User", status, className = "", children, }) {
69
+ const [failed, setFailed] = useState(false);
70
+ const showImage = Boolean(src) && !failed;
71
+ const resolvedInitials = initials?.trim().slice(0, 2).toUpperCase() ||
72
+ (name ? getAvatarInitials(name) : "");
73
+ const label = name?.trim() || "Avatar";
74
+ return (_jsxs("span", { className: `relative inline-flex shrink-0 ${SIZE_CLASS[size]} ${className}`.trim(), title: name || undefined, children: [_jsx("span", { role: "img", "aria-label": label, className: `flex size-full items-center justify-center overflow-hidden rounded-full font-semibold uppercase ring-2 ring-surface ${showImage ? "bg-surface-muted" : VARIANT_CLASS[variant]}`, children: children ? (children) : showImage ? (_jsx("img", { src: src, alt: "", className: "size-full object-cover", onError: () => setFailed(true) })) : resolvedInitials ? (_jsx("span", { "aria-hidden": "true", children: resolvedInitials })) : (_jsx(Icon, { name: fallbackIcon, size: ICON_SIZE[size], "aria-hidden": "true", className: "opacity-80" })) }), status ? (_jsx("span", { className: `absolute right-0 bottom-0 size-2.5 rounded-full ring-2 ring-surface ${STATUS_CLASS[status]} ${size === "sm" ? "size-2" : size === "xl" ? "size-3.5" : "size-2.5"}`, title: STATUS_LABEL[status], "aria-label": STATUS_LABEL[status] })) : null] }));
75
+ }
76
+ /* ------------------------------------------------------------------ */
77
+ /* AvatarGroup */
78
+ /* ------------------------------------------------------------------ */
79
+ /**
80
+ * Overlapping stack of avatars with an optional “+N” overflow chip.
81
+ */
82
+ export function AvatarGroup({ children, max = 4, size = "md", className = "", }) {
83
+ const items = Array.isArray(children)
84
+ ? children.filter(Boolean)
85
+ : children
86
+ ? [children]
87
+ : [];
88
+ const visible = items.slice(0, Math.max(1, max));
89
+ const overflow = items.length - visible.length;
90
+ return (_jsxs("div", { className: `flex items-center ${GROUP_OVERLAP[size]} ${className}`.trim(), role: "group", children: [visible.map((child, index) => (_jsx("span", { className: "relative inline-flex", children: child }, index))), overflow > 0 ? (_jsxs("span", { className: `relative inline-flex items-center justify-center rounded-full bg-surface-muted font-semibold text-muted-foreground ring-2 ring-surface ${SIZE_CLASS[size]}`, "aria-label": `${overflow} de plus`, children: ["+", overflow] })) : null] }));
91
+ }
package/dist/button.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Icon from "./icon";
3
- const BASE_CLASS = "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-medium text-sm font-medium outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0 [&_svg]:text-current";
3
+ const BASE_CLASS = "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-medium text-sm font-medium outline-none transition-[color,background-color,border-color,opacity,filter] duration-200 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 motion-reduce:transition-none [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0 [&_svg]:text-current";
4
4
  const SIZE_CLASS = {
5
5
  sm: "h-9 px-3",
6
6
  md: "h-10 px-4",
@@ -0,0 +1,37 @@
1
+ export type ChartType = "line" | "area" | "bar" | "stacked-bar" | "donut" | "sparkline";
2
+ export type ChartDataPoint = Record<string, string | number>;
3
+ export interface ChartSeries {
4
+ /** Key in each data point. */
5
+ key: string;
6
+ /** Legend / tooltip label (French in product copy). */
7
+ label: string;
8
+ /** CSS color (token var or hex). Defaults to the Modoock palette. */
9
+ color?: string;
10
+ }
11
+ export interface ChartProps {
12
+ type: ChartType;
13
+ data: ChartDataPoint[];
14
+ /**
15
+ * Category axis key (line/area/bar) or slice name key (donut).
16
+ * Ignored for sparkline.
17
+ */
18
+ categoryKey: string;
19
+ series: ChartSeries[];
20
+ /** Chart height in pixels. Defaults by type. */
21
+ height?: number;
22
+ showGrid?: boolean;
23
+ showLegend?: boolean;
24
+ showTooltip?: boolean;
25
+ className?: string;
26
+ /** Accessible name for the chart region. */
27
+ "aria-label"?: string;
28
+ emptyTitle?: string;
29
+ emptyDescription?: string;
30
+ }
31
+ export declare const CHART_COLORS: readonly ["var(--color-primary)", "var(--color-info)", "var(--color-success)", "var(--color-accent)", "var(--color-border-strong)", "var(--color-muted-foreground)"];
32
+ /**
33
+ * Graphiques métier (argent, santé, tableaux de bord) via Recharts.
34
+ * Types : line, area, bar, stacked-bar, donut, sparkline.
35
+ */
36
+ export default function Chart({ type, data, categoryKey, series, height, showGrid, showLegend, showTooltip, className, "aria-label": ariaLabel, emptyTitle, emptyDescription, }: ChartProps): import("react").JSX.Element;
37
+ //# sourceMappingURL=chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../components/ui/chart.tsx"],"names":[],"mappings":"AA0BA,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,KAAK,GACL,aAAa,GACb,OAAO,GACP,WAAW,CAAC;AAEhB,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAMD,eAAO,MAAM,YAAY,sKAOf,CAAC;AAyHX;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,MAAM,EACN,MAAM,EACN,QAAe,EACf,UAAiB,EACjB,WAAkB,EAClB,SAAc,EACd,YAAY,EAAE,SAAS,EACvB,UAA4B,EAC5B,gBAAkF,GACnF,EAAE,UAAU,+BA4MZ"}
package/dist/chart.js ADDED
@@ -0,0 +1,92 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, Legend, Line, LineChart, Pie, PieChart, ResponsiveContainer, Tooltip, XAxis, YAxis, } from "recharts";
4
+ import Icon from "./icon";
5
+ /* ------------------------------------------------------------------ */
6
+ /* Palette — avoid orange/warning as decorative series colors */
7
+ /* ------------------------------------------------------------------ */
8
+ export const CHART_COLORS = [
9
+ "var(--color-primary)",
10
+ "var(--color-info)",
11
+ "var(--color-success)",
12
+ "var(--color-accent)",
13
+ "var(--color-border-strong)",
14
+ "var(--color-muted-foreground)",
15
+ ];
16
+ function seriesColor(series, index) {
17
+ return series.color ?? CHART_COLORS[index % CHART_COLORS.length];
18
+ }
19
+ /* ------------------------------------------------------------------ */
20
+ /* Shared chrome */
21
+ /* ------------------------------------------------------------------ */
22
+ const AXIS_TICK = {
23
+ fill: "var(--color-muted-foreground)",
24
+ fontSize: 12,
25
+ };
26
+ const GRID_STROKE = "var(--color-border)";
27
+ const TOOLTIP_CURSOR = { fill: "var(--color-surface-muted)" };
28
+ function defaultHeight(type) {
29
+ if (type === "sparkline")
30
+ return 40;
31
+ if (type === "donut")
32
+ return 240;
33
+ return 280;
34
+ }
35
+ function ChartEmpty({ title, description, height, }) {
36
+ return (_jsxs("div", { className: "flex w-full flex-col items-center justify-center gap-inline rounded-medium border border-dashed border-border bg-surface-muted px-component text-center", style: { height }, role: "status", children: [_jsx(Icon, { name: "ChartColumnIncreasing", variant: "muted", "aria-hidden": "true" }), _jsx("p", { className: "text-body-medium text-foreground", children: title }), _jsx("p", { className: "max-w-xs text-small text-muted-foreground", children: description })] }));
37
+ }
38
+ function ChartTooltipContent({ active, payload, label, series, }) {
39
+ if (!active || !payload?.length)
40
+ return null;
41
+ const labelByKey = new Map(series.map((item) => [item.key, item.label]));
42
+ return (_jsxs("div", { className: "rounded-medium border border-border bg-surface px-component py-control shadow-lg", children: [label != null && label !== "" && (_jsx("p", { className: "mb-micro text-label text-muted-foreground", children: label })), _jsx("ul", { className: "flex flex-col gap-micro", children: payload.map((entry, index) => {
43
+ const key = String(entry.dataKey ?? "");
44
+ const rowLabel = entry.name && !labelByKey.has(String(entry.name))
45
+ ? entry.name
46
+ : (labelByKey.get(key) ?? entry.name ?? key);
47
+ return (_jsxs("li", { className: "flex items-center justify-between gap-component text-small text-foreground", children: [_jsx("span", { children: rowLabel }), _jsx("span", { className: "font-medium tabular-nums", children: entry.value })] }, `${key}-${index}`));
48
+ }) })] }));
49
+ }
50
+ function ChartFrame({ height, className, ariaLabel, children, }) {
51
+ return (_jsx("div", { className: `w-full min-w-0 ${className}`, style: { height }, role: "img", "aria-label": ariaLabel, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: children }) }));
52
+ }
53
+ /* ------------------------------------------------------------------ */
54
+ /* Chart */
55
+ /* ------------------------------------------------------------------ */
56
+ /**
57
+ * Graphiques métier (argent, santé, tableaux de bord) via Recharts.
58
+ * Types : line, area, bar, stacked-bar, donut, sparkline.
59
+ */
60
+ export default function Chart({ type, data, categoryKey, series, height, showGrid = true, showLegend = true, showTooltip = true, className = "", "aria-label": ariaLabel, emptyTitle = "Aucune donnée", emptyDescription = "Les valeurs apparaîtront ici dès qu’elles seront disponibles.", }) {
61
+ const resolvedHeight = height ?? defaultHeight(type);
62
+ if (!data.length || !series.length) {
63
+ return (_jsx(ChartEmpty, { title: emptyTitle, description: emptyDescription, height: resolvedHeight }));
64
+ }
65
+ const tooltip = showTooltip ? (_jsx(Tooltip, { content: _jsx(ChartTooltipContent, { series: series }), cursor: type === "bar" || type === "stacked-bar" ? TOOLTIP_CURSOR : undefined })) : null;
66
+ const legend = showLegend ? (_jsx(Legend, { wrapperStyle: { fontSize: 12, color: "var(--color-muted-foreground)" }, formatter: (value) => {
67
+ const match = series.find((item) => item.key === value);
68
+ return match?.label ?? value;
69
+ } })) : null;
70
+ const grid = showGrid ? (_jsx(CartesianGrid, { stroke: GRID_STROKE, strokeDasharray: "3 3", vertical: false })) : null;
71
+ if (type === "sparkline") {
72
+ const primary = series[0];
73
+ const color = seriesColor(primary, 0);
74
+ return (_jsx(ChartFrame, { height: resolvedHeight, className: className, ariaLabel: ariaLabel ?? primary.label, children: _jsx(LineChart, { data: data, margin: { top: 4, right: 0, left: 0, bottom: 0 }, children: _jsx(Line, { type: "monotone", dataKey: primary.key, stroke: color, strokeWidth: 2, dot: false, isAnimationActive: true, animationDuration: 200 }) }) }));
75
+ }
76
+ if (type === "donut") {
77
+ const valueKey = series[0].key;
78
+ return (_jsx(ChartFrame, { height: resolvedHeight, className: className, ariaLabel: ariaLabel ?? "Répartition", children: _jsxs(PieChart, { children: [_jsx(Pie, { data: data, dataKey: valueKey, nameKey: categoryKey, innerRadius: "58%", outerRadius: "80%", paddingAngle: 2, stroke: "var(--color-surface)", strokeWidth: 2, isAnimationActive: true, animationDuration: 200, children: data.map((_, index) => (_jsx(Cell, { fill: seriesColor(series[0], index) }, `slice-${index}`))) }), tooltip, legend] }) }));
79
+ }
80
+ if (type === "line") {
81
+ return (_jsx(ChartFrame, { height: resolvedHeight, className: className, ariaLabel: ariaLabel, children: _jsxs(LineChart, { data: data, margin: { top: 8, right: 8, left: 0, bottom: 0 }, children: [grid, _jsx(XAxis, { dataKey: categoryKey, tick: AXIS_TICK, axisLine: false, tickLine: false }), _jsx(YAxis, { tick: AXIS_TICK, axisLine: false, tickLine: false, width: 40 }), tooltip, legend, series.map((item, index) => (_jsx(Line, { type: "monotone", dataKey: item.key, name: item.key, stroke: seriesColor(item, index), strokeWidth: 2, dot: false, activeDot: { r: 4 }, isAnimationActive: true, animationDuration: 200 }, item.key)))] }) }));
82
+ }
83
+ if (type === "area") {
84
+ return (_jsx(ChartFrame, { height: resolvedHeight, className: className, ariaLabel: ariaLabel, children: _jsxs(AreaChart, { data: data, margin: { top: 8, right: 8, left: 0, bottom: 0 }, children: [grid, _jsx(XAxis, { dataKey: categoryKey, tick: AXIS_TICK, axisLine: false, tickLine: false }), _jsx(YAxis, { tick: AXIS_TICK, axisLine: false, tickLine: false, width: 40 }), tooltip, legend, series.map((item, index) => {
85
+ const color = seriesColor(item, index);
86
+ return (_jsx(Area, { type: "monotone", dataKey: item.key, name: item.key, stroke: color, fill: color, fillOpacity: 0.15, strokeWidth: 2, isAnimationActive: true, animationDuration: 200 }, item.key));
87
+ })] }) }));
88
+ }
89
+ // bar | stacked-bar
90
+ const stacked = type === "stacked-bar";
91
+ return (_jsx(ChartFrame, { height: resolvedHeight, className: className, ariaLabel: ariaLabel, children: _jsxs(BarChart, { data: data, margin: { top: 8, right: 8, left: 0, bottom: 0 }, children: [grid, _jsx(XAxis, { dataKey: categoryKey, tick: AXIS_TICK, axisLine: false, tickLine: false }), _jsx(YAxis, { tick: AXIS_TICK, axisLine: false, tickLine: false, width: 40 }), tooltip, legend, series.map((item, index) => (_jsx(Bar, { dataKey: item.key, name: item.key, fill: seriesColor(item, index), radius: stacked ? [0, 0, 0, 0] : [4, 4, 0, 0], stackId: stacked ? "stack" : undefined, isAnimationActive: true, animationDuration: 200 }, item.key)))] }) }));
92
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../components/ui/date-picker.tsx"],"names":[],"mappings":"AAkBA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,EAAE,EAAE,IAAI,GAAG,IAAI,CAAC;CACjB,CAAC;AAEF,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,mBAAoB,SAAQ,gBAAgB;IACpD,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC3C;AAsbD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAsC,EACtC,OAAO,EACP,OAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,KAAK,EACL,MAAM,EACN,SAAgB,EAChB,SAAc,GACf,EAAE,eAAe,+BAkEjB;AAMD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAmD,EACnD,OAAO,EACP,OAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,KAAK,EACL,MAAM,EACN,SAAgB,EAChB,SAAc,GACf,EAAE,mBAAmB,+BAwGrB;AAMD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAyC,EACzC,OAAO,EACP,OAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,KAAK,EACL,MAAM,EACN,SAAgB,EAChB,SAAc,GACf,EAAE,oBAAoB,+BA4GtB"}
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../components/ui/date-picker.tsx"],"names":[],"mappings":"AAkBA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,IAAI,GAAG,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EACL,QAAQ,EACR,WAAmD,EACnD,OAAO,EACP,OAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,KAAK,EACL,MAAM,EACN,SAAgB,EAChB,SAAc,GACf,EAAE,mBAAmB,+BAwGrB;AAMD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,WAAyC,EACzC,OAAO,EACP,OAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,KAAK,EACL,MAAM,EACN,SAAgB,EAChB,SAAc,GACf,EAAE,oBAAoB,+BA4GtB"}
@@ -152,7 +152,7 @@ function Calendar({ viewMonth, onViewMonthChange, onSelectDay, isSelected, isInR
152
152
  const goMonth = (delta) => {
153
153
  onViewMonthChange(new Date(viewMonth.getFullYear(), viewMonth.getMonth() + delta, 1));
154
154
  };
155
- return (_jsxs("div", { className: "w-[17.5rem] p-3", children: [_jsxs("div", { className: "mb-2 flex items-center justify-between gap-2", children: [_jsx("button", { type: "button", "aria-label": "Mois pr\u00E9c\u00E9dent", onClick: () => goMonth(-1), className: "flex size-8 items-center justify-center rounded-small text-muted-foreground transition-colors hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary [&_svg]:size-[var(--icon-small)]", children: _jsx(Icon, { name: "ChevronLeft", "aria-hidden": "true" }) }), _jsx("p", { className: "text-sm font-medium capitalize text-foreground", children: title }), _jsx("button", { type: "button", "aria-label": "Mois suivant", onClick: () => goMonth(1), className: "flex size-8 items-center justify-center rounded-small text-muted-foreground transition-colors hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary [&_svg]:size-[var(--icon-small)]", children: _jsx(Icon, { name: "ChevronRight", "aria-hidden": "true" }) })] }), _jsx("div", { className: "mb-1 grid grid-cols-7 gap-0.5", children: WEEKDAY_LABELS.map((label) => (_jsx("div", { className: "flex h-8 items-center justify-center text-xs font-medium text-muted-foreground", children: label }, label))) }), _jsx("div", { className: "grid grid-cols-7 gap-0.5", role: "grid", "aria-label": title, children: cells.map((day, index) => {
155
+ return (_jsxs("div", { className: "w-[17.5rem] p-3", children: [_jsxs("div", { className: "mb-2 flex items-center justify-between gap-2", children: [_jsx("button", { type: "button", "aria-label": "Mois pr\u00E9c\u00E9dent", onClick: () => goMonth(-1), className: "flex size-8 items-center justify-center rounded-small text-muted-foreground transition-colors duration-200 ease-out hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary motion-reduce:transition-none [&_svg]:size-[var(--icon-small)]", children: _jsx(Icon, { name: "ChevronLeft", "aria-hidden": "true" }) }), _jsx("p", { className: "text-sm font-medium capitalize text-foreground", children: title }), _jsx("button", { type: "button", "aria-label": "Mois suivant", onClick: () => goMonth(1), className: "flex size-8 items-center justify-center rounded-small text-muted-foreground transition-colors duration-200 ease-out hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary motion-reduce:transition-none [&_svg]:size-[var(--icon-small)]", children: _jsx(Icon, { name: "ChevronRight", "aria-hidden": "true" }) })] }), _jsx("div", { className: "mb-1 grid grid-cols-7 gap-0.5", children: WEEKDAY_LABELS.map((label) => (_jsx("div", { className: "flex h-8 items-center justify-center text-xs font-medium text-muted-foreground", children: label }, label))) }), _jsx("div", { className: "grid grid-cols-7 gap-0.5", role: "grid", "aria-label": title, children: cells.map((day, index) => {
156
156
  if (!day) {
157
157
  return _jsx("div", { className: "h-8" }, `empty-${index}`);
158
158
  }
@@ -163,7 +163,7 @@ function Calendar({ viewMonth, onViewMonthChange, onSelectDay, isSelected, isInR
163
163
  const rangeStart = isRangeStart?.(day) ?? false;
164
164
  const rangeEnd = isRangeEnd?.(day) ?? false;
165
165
  const isToday = isSameDay(day, today);
166
- let dayClass = "relative flex h-8 w-full items-center justify-center rounded-small text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary";
166
+ let dayClass = "relative flex h-8 w-full items-center justify-center rounded-small text-sm transition-colors duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary motion-reduce:transition-none";
167
167
  if (disabled) {
168
168
  dayClass += " cursor-not-allowed text-muted-foreground/40";
169
169
  }
@@ -196,7 +196,9 @@ function DateFieldShell({ label, required, disabled, error, helper, className =
196
196
  .join(" ") || undefined;
197
197
  return (_jsxs("div", { ref: rootRef, className: `relative w-full ${className}`.trim(), children: [label ? (_jsxs("label", { className: LABEL_CLASS, children: [_jsx("span", { className: "truncate", children: label }), required ? _jsx(RequiredMark, {}) : null] })) : null, _jsxs("div", { className: "relative", children: [_jsx("button", { type: "button", id: generatedId, disabled: disabled, "aria-haspopup": "dialog", "aria-expanded": open, "aria-invalid": Boolean(error) || undefined, "aria-required": required || undefined, "aria-describedby": describedBy, onClick: () => onOpenChange(!open), className: `ds-input flex cursor-pointer items-center justify-between gap-2 text-left disabled:cursor-not-allowed [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0 ${clearable && hasValue && !disabled ? "pr-16" : "pr-9"} ${error
198
198
  ? "border-danger hover:border-danger focus:border-danger"
199
- : ""}`, children: _jsx("span", { className: `min-w-0 flex-1 truncate ${display ? "text-foreground" : "text-muted-foreground"}`, children: display ?? placeholder }) }), _jsxs("span", { className: "pointer-events-none absolute right-3 top-1/2 flex -translate-y-1/2 items-center gap-inline text-muted-foreground [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0", children: [clearable && hasValue && !disabled ? (_jsx("button", { type: "button", "aria-label": "Effacer la valeur", disabled: disabled, onClick: onClear, className: "pointer-events-auto flex items-center rounded-small transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary", children: _jsx(Icon, { name: "X", "aria-hidden": "true" }) })) : null, _jsx(Icon, { name: "Calendar", "aria-hidden": "true" })] }), open ? (_jsx("div", { role: "dialog", "aria-modal": "false", className: "absolute top-full z-50 mt-1 overflow-hidden rounded-medium border border-border bg-surface shadow-lg", children: children })) : null] }), (error || helper) && (_jsx("div", { className: "mt-inline", children: error ? (_jsx(FieldFeedback, { id: errorId, error: error })) : helper ? (_jsx("p", { id: helperId, className: "text-small text-muted-foreground", children: helper })) : null }))] }));
199
+ : ""}`, children: _jsx("span", { className: `min-w-0 flex-1 truncate ${display ? "text-foreground" : "text-muted-foreground"}`, children: display ?? placeholder }) }), _jsxs("span", { className: "pointer-events-none absolute right-3 top-1/2 flex -translate-y-1/2 items-center gap-inline text-muted-foreground [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0", children: [clearable && hasValue && !disabled ? (_jsx("button", { type: "button", "aria-label": "Effacer la valeur", disabled: disabled, onClick: onClear, className: "pointer-events-auto flex items-center rounded-small transition-colors duration-200 ease-out hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary motion-reduce:transition-none", children: _jsx(Icon, { name: "X", "aria-hidden": "true" }) })) : null, _jsx(Icon, { name: "Calendar", "aria-hidden": "true" })] }), _jsx("div", { role: "dialog", "aria-modal": "false", "aria-hidden": !open, inert: !open ? true : undefined, className: `absolute top-full z-50 mt-1 overflow-hidden rounded-medium border border-border bg-surface shadow-lg transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none ${open
200
+ ? "pointer-events-auto translate-y-0 opacity-100"
201
+ : "pointer-events-none -translate-y-1 opacity-0"}`, children: children })] }), (error || helper) && (_jsx("div", { className: "mt-inline", children: error ? (_jsx(FieldFeedback, { id: errorId, error: error })) : helper ? (_jsx("p", { id: helperId, className: "text-small text-muted-foreground", children: helper })) : null }))] }));
200
202
  }
201
203
  function initialViewMonth(value, fallback) {
202
204
  const source = value ?? fallback ?? new Date();
@@ -0,0 +1,26 @@
1
+ import { type ReactNode } from "react";
2
+ export type DrawerSide = "left" | "right" | "top" | "bottom";
3
+ export interface DrawerProps {
4
+ open: boolean;
5
+ title: string;
6
+ children: ReactNode;
7
+ onClose: () => void;
8
+ /** Edge the panel slides from. Defaults to `bottom` (slides up). */
9
+ side?: DrawerSide;
10
+ footer?: ReactNode;
11
+ primaryAction?: {
12
+ label: string;
13
+ onClick: () => void;
14
+ };
15
+ secondaryAction?: {
16
+ label: string;
17
+ onClick: () => void;
18
+ };
19
+ className?: string;
20
+ }
21
+ /**
22
+ * Panneau latéral (tiroir) — glisse depuis un bord de l’écran.
23
+ * Même contrat que Modal : overlay, Escape, focus piégé, overscroll contenu.
24
+ */
25
+ export default function Drawer({ open, title, children, onClose, side, footer, primaryAction, secondaryAction, className, }: DrawerProps): import("react").ReactPortal | null;
26
+ //# sourceMappingURL=drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../components/ui/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oEAAoE;IACpE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,aAAa,CAAC,EAAE;QACd,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;IACF,eAAe,CAAC,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyCD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAe,EACf,MAAM,EACN,aAAa,EACb,eAAe,EACf,SAAc,GACf,EAAE,WAAW,sCAyIb"}
package/dist/drawer.js ADDED
@@ -0,0 +1,125 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useId, useRef, useState, } from "react";
4
+ import { createPortal } from "react-dom";
5
+ import Icon from "./icon";
6
+ import ClickableButton from "./button";
7
+ /** Matches Tailwind `duration-200` for enter/exit unmount timing. */
8
+ const ANIMATION_MS = 300;
9
+ const FOCUSABLE_SELECTOR = [
10
+ "a[href]",
11
+ "button:not([disabled])",
12
+ "textarea:not([disabled])",
13
+ "input:not([disabled])",
14
+ "select:not([disabled])",
15
+ '[tabindex]:not([tabindex="-1"])',
16
+ ].join(", ");
17
+ function getFocusables(panel) {
18
+ return panel
19
+ ? Array.from(panel.querySelectorAll(FOCUSABLE_SELECTOR))
20
+ : [];
21
+ }
22
+ const SIDE_PANEL_CLASS = {
23
+ left: "left-0 top-0 h-full w-full max-w-md rounded-r-large border-r",
24
+ right: "right-0 top-0 h-full w-full max-w-md rounded-l-large border-l",
25
+ top: "left-0 top-0 w-full max-h-[85vh] rounded-b-large border-b",
26
+ bottom: "bottom-0 left-0 w-full max-h-[85vh] rounded-t-large border-t",
27
+ };
28
+ function sideMotionClass(side, visible) {
29
+ if (visible) {
30
+ return "translate-x-0 translate-y-0";
31
+ }
32
+ switch (side) {
33
+ case "left":
34
+ return "-translate-x-full";
35
+ case "right":
36
+ return "translate-x-full";
37
+ case "top":
38
+ return "-translate-y-full";
39
+ case "bottom":
40
+ // Off-screen below → slides up into view (bottom → top).
41
+ return "translate-y-full";
42
+ }
43
+ }
44
+ /**
45
+ * Panneau latéral (tiroir) — glisse depuis un bord de l’écran.
46
+ * Même contrat que Modal : overlay, Escape, focus piégé, overscroll contenu.
47
+ */
48
+ export default function Drawer({ open, title, children, onClose, side = "bottom", footer, primaryAction, secondaryAction, className = "", }) {
49
+ const titleId = useId();
50
+ const panelRef = useRef(null);
51
+ const previouslyFocusedRef = useRef(null);
52
+ const [present, setPresent] = useState(open);
53
+ const [visible, setVisible] = useState(open);
54
+ // Keep the open side through the exit animation (callers often reset side on close).
55
+ const [activeSide, setActiveSide] = useState(side);
56
+ useEffect(() => {
57
+ if (open) {
58
+ setActiveSide(side);
59
+ setPresent(true);
60
+ const frame = requestAnimationFrame(() => {
61
+ requestAnimationFrame(() => setVisible(true));
62
+ });
63
+ return () => cancelAnimationFrame(frame);
64
+ }
65
+ setVisible(false);
66
+ const timeout = window.setTimeout(() => setPresent(false), ANIMATION_MS);
67
+ return () => window.clearTimeout(timeout);
68
+ }, [open, side]);
69
+ useEffect(() => {
70
+ if (!present)
71
+ return;
72
+ const previousOverflow = document.body.style.overflow;
73
+ document.body.style.overflow = "hidden";
74
+ return () => {
75
+ document.body.style.overflow = previousOverflow;
76
+ };
77
+ }, [present]);
78
+ useEffect(() => {
79
+ if (!open)
80
+ return;
81
+ const handleKeyDown = (event) => {
82
+ if (event.key === "Escape")
83
+ onClose();
84
+ };
85
+ document.addEventListener("keydown", handleKeyDown);
86
+ return () => document.removeEventListener("keydown", handleKeyDown);
87
+ }, [open, onClose]);
88
+ useEffect(() => {
89
+ if (!open)
90
+ return;
91
+ previouslyFocusedRef.current =
92
+ document.activeElement instanceof HTMLElement
93
+ ? document.activeElement
94
+ : null;
95
+ const focusables = getFocusables(panelRef.current);
96
+ (focusables[0] ?? panelRef.current)?.focus();
97
+ return () => {
98
+ previouslyFocusedRef.current?.focus?.();
99
+ previouslyFocusedRef.current = null;
100
+ };
101
+ }, [open]);
102
+ if (!present)
103
+ return null;
104
+ const handlePanelKeyDown = (event) => {
105
+ if (event.key !== "Tab")
106
+ return;
107
+ const focusables = getFocusables(panelRef.current);
108
+ if (focusables.length === 0)
109
+ return;
110
+ const first = focusables[0];
111
+ const last = focusables[focusables.length - 1];
112
+ const active = document.activeElement;
113
+ if (!event.shiftKey &&
114
+ (!panelRef.current?.contains(active) || active === last)) {
115
+ event.preventDefault();
116
+ first.focus();
117
+ }
118
+ else if (event.shiftKey &&
119
+ (!panelRef.current?.contains(active) || active === first)) {
120
+ event.preventDefault();
121
+ last.focus();
122
+ }
123
+ };
124
+ return createPortal(_jsx("div", { className: `fixed inset-0 z-50 bg-black/60 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: `absolute flex flex-col overflow-hidden border-border bg-surface shadow-lg transition-transform duration-300 ease-out will-change-transform motion-reduce:transition-none motion-reduce:duration-0 ${SIDE_PANEL_CLASS[activeSide]} ${sideMotionClass(activeSide, visible)} ${className}`, 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, primaryAction && (_jsx(ClickableButton, { onClick: primaryAction.onClick, children: primaryAction.label }))] }))] }) }), document.body);
125
+ }
package/dist/index.d.ts CHANGED
@@ -4,11 +4,15 @@ export { default as Input, Textarea } from "./input";
4
4
  export type { InputState, InputProps, TextareaProps } from "./input";
5
5
  export { default as Badge } from "./badge";
6
6
  export type { BadgeProps } from "./badge";
7
+ export { default as Avatar, AvatarGroup, getAvatarInitials } from "./avatar";
8
+ export type { AvatarProps, AvatarGroupProps, AvatarSize, AvatarVariant, } from "./avatar";
7
9
  export { default as Table } from "./table";
8
10
  export type { Column, CardAction, TableCardActions } from "./table";
9
11
  export { Select, MultiSelect, SelectWithSearch, MultiSelectWithSearch, SelectFilter } from "./select";
10
12
  export type { SelectOption } from "./select";
11
13
  export { default as Modal } from "./modal";
14
+ export { default as Drawer } from "./drawer";
15
+ export type { DrawerProps, DrawerSide } from "./drawer";
12
16
  export { default as Tabs } from "./tab";
13
17
  export type { Tab } from "./tab";
14
18
  export { default as Icon } from "./icon";
@@ -25,4 +29,12 @@ export { DatePicker, DateTimePicker, DateRangePicker } from "./date-picker";
25
29
  export type { DatePickerProps, DateTimePickerProps, DateRangePickerProps, DateRangeValue, } from "./date-picker";
26
30
  export { default as Agenda, AGENDA_STATUS_OPTIONS } from "./agenda";
27
31
  export type { AgendaProps, AgendaEvent, AgendaView, AgendaEventStatus, AgendaStatusOption, AgendaStatusStyle, AgendaListRow, DateRangeValue as AgendaDateRangeValue, } from "./agenda";
32
+ export { default as Chart, CHART_COLORS } from "./chart";
33
+ export type { ChartProps, ChartType, ChartSeries, ChartDataPoint, } from "./chart";
34
+ export { Toaster, toast } from "./toast";
35
+ export type { ToastOptions, ToastVariant, ToastPosition, ToasterProps, } from "./toast";
36
+ export { default as Switch } from "./switch";
37
+ export type { SwitchProps, SwitchSize } from "./switch";
38
+ export { default as Tooltip } from "./tooltip";
39
+ export type { TooltipProps, TooltipSide } from "./tooltip";
28
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AACtD,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,UAAU,GACX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,OAAO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