@modoock/components 1.1.0 → 2.1.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 (58) hide show
  1. package/dist/accordion.d.ts +24 -0
  2. package/dist/accordion.d.ts.map +1 -0
  3. package/dist/accordion.js +30 -0
  4. package/dist/agenda.d.ts +93 -0
  5. package/dist/agenda.d.ts.map +1 -0
  6. package/dist/agenda.js +581 -0
  7. package/dist/badge.d.ts +10 -0
  8. package/dist/badge.d.ts.map +1 -0
  9. package/dist/badge.js +14 -0
  10. package/dist/button.d.ts +21 -0
  11. package/dist/button.d.ts.map +1 -0
  12. package/dist/button.js +27 -0
  13. package/dist/date-picker.d.ts +47 -0
  14. package/dist/date-picker.d.ts.map +1 -0
  15. package/dist/date-picker.js +327 -0
  16. package/dist/icon.d.ts +21 -0
  17. package/dist/icon.d.ts.map +1 -0
  18. package/dist/icon.js +24 -0
  19. package/{components/ui/index.ts → dist/index.d.ts} +28 -28
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +14 -0
  22. package/dist/input.d.ts +41 -0
  23. package/dist/input.d.ts.map +1 -0
  24. package/dist/input.js +105 -0
  25. package/dist/loader.d.ts +26 -0
  26. package/dist/loader.d.ts.map +1 -0
  27. package/dist/loader.js +20 -0
  28. package/dist/metric-bar.d.ts +11 -0
  29. package/dist/metric-bar.d.ts.map +1 -0
  30. package/dist/metric-bar.js +19 -0
  31. package/dist/modal.d.ts +19 -0
  32. package/dist/modal.d.ts.map +1 -0
  33. package/dist/modal.js +88 -0
  34. package/dist/select.d.ts +59 -0
  35. package/dist/select.d.ts.map +1 -0
  36. package/dist/select.js +153 -0
  37. package/dist/stepper.d.ts +13 -0
  38. package/dist/stepper.d.ts.map +1 -0
  39. package/dist/stepper.js +38 -0
  40. package/dist/tab.d.ts +34 -0
  41. package/dist/tab.d.ts.map +1 -0
  42. package/dist/tab.js +25 -0
  43. package/dist/table.d.ts +57 -0
  44. package/dist/table.d.ts.map +1 -0
  45. package/dist/table.js +180 -0
  46. package/package.json +26 -2
  47. package/components/ui/accordion.tsx +0 -97
  48. package/components/ui/badge.tsx +0 -43
  49. package/components/ui/button.tsx +0 -104
  50. package/components/ui/icon.tsx +0 -78
  51. package/components/ui/input.tsx +0 -376
  52. package/components/ui/loader.tsx +0 -78
  53. package/components/ui/metric-bar.tsx +0 -49
  54. package/components/ui/modal.tsx +0 -177
  55. package/components/ui/select.tsx +0 -458
  56. package/components/ui/stepper.tsx +0 -96
  57. package/components/ui/tab.tsx +0 -85
  58. package/components/ui/table.tsx +0 -806
package/dist/button.js ADDED
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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";
4
+ const SIZE_CLASS = {
5
+ sm: "h-9 px-3",
6
+ md: "h-10 px-4",
7
+ lg: "h-11 px-5",
8
+ /* Icon-only button: square, no horizontal padding. */
9
+ icon: "h-10 w-10 px-0",
10
+ };
11
+ const VARIANT_CLASS = {
12
+ primary: "bg-primary text-white hover:bg-primary-hover active:bg-primary-active focus-visible:ring-primary",
13
+ secondary: "border border-border bg-surface text-foreground hover:border-primary hover:text-primary focus-visible:ring-primary",
14
+ ghost: "bg-transparent text-muted-foreground hover:text-primary focus-visible:ring-primary",
15
+ success: "bg-success text-white hover:brightness-90 active:brightness-80 focus-visible:ring-success",
16
+ warning: "bg-warning text-white hover:brightness-90 active:brightness-80 focus-visible:ring-warning",
17
+ danger: "bg-danger text-white hover:brightness-90 active:brightness-80 focus-visible:ring-danger",
18
+ info: "bg-info text-white hover:brightness-90 active:brightness-80 focus-visible:ring-info",
19
+ accent: "bg-accent text-accent-foreground hover:bg-accent-hover active:brightness-80 focus-visible:ring-accent",
20
+ /* No built-in styles: the caller provides everything via className. */
21
+ bare: "",
22
+ };
23
+ export default function ClickableButton({ children, variant = "primary", size = "md", leftIcon, rightIcon, loading = false, loadingText, fullWidth = false, disabled, className = "", ...props }) {
24
+ const isDisabled = disabled || loading;
25
+ const resolvedLabel = loading && loadingText ? loadingText : children;
26
+ return (_jsxs("button", { type: "button", "aria-busy": loading || undefined, disabled: isDisabled, className: `${BASE_CLASS} ${VARIANT_CLASS[variant]} ${SIZE_CLASS[size]} ${fullWidth ? "w-full" : ""} ${className}`, ...props, children: [loading ? (_jsx(Icon, { name: "LoaderCircle", size: "small", className: "animate-spin", "aria-hidden": "true" })) : (leftIcon), resolvedLabel, !loading && rightIcon] }));
27
+ }
@@ -0,0 +1,47 @@
1
+ export type DateRangeValue = {
2
+ from: Date | null;
3
+ to: Date | null;
4
+ };
5
+ interface FieldChromeProps {
6
+ label?: string;
7
+ required?: boolean;
8
+ disabled?: boolean;
9
+ error?: string;
10
+ helper?: string;
11
+ className?: string;
12
+ }
13
+ interface DatePickerBaseProps extends FieldChromeProps {
14
+ minDate?: Date;
15
+ maxDate?: Date;
16
+ placeholder?: string;
17
+ clearable?: boolean;
18
+ }
19
+ export interface DatePickerProps extends DatePickerBaseProps {
20
+ value: Date | null;
21
+ onChange: (value: Date | null) => void;
22
+ }
23
+ export interface DateTimePickerProps extends DatePickerBaseProps {
24
+ value: Date | null;
25
+ onChange: (value: Date | null) => void;
26
+ }
27
+ export interface DateRangePickerProps extends DatePickerBaseProps {
28
+ value: DateRangeValue;
29
+ onChange: (value: DateRangeValue) => void;
30
+ }
31
+ /**
32
+ * Single-date picker.
33
+ * Trigger matches Select/Input (`ds-input`); calendar opens below.
34
+ */
35
+ export declare function DatePicker({ label, value, onChange, placeholder, minDate, maxDate, disabled, required, error, helper, clearable, className, }: DatePickerProps): import("react").JSX.Element;
36
+ /**
37
+ * Date and time picker.
38
+ * Day selection updates the date; time is confirmed via the time field.
39
+ */
40
+ export declare function DateTimePicker({ label, value, onChange, placeholder, minDate, maxDate, disabled, required, error, helper, clearable, className, }: DateTimePickerProps): import("react").JSX.Element;
41
+ /**
42
+ * Date range picker (from → to).
43
+ * First click sets the start; second click sets the end.
44
+ */
45
+ export declare function DateRangePicker({ label, value, onChange, placeholder, minDate, maxDate, disabled, required, error, helper, clearable, className, }: DateRangePickerProps): import("react").JSX.Element;
46
+ export {};
47
+ //# sourceMappingURL=date-picker.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,327 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useId, useMemo, useRef, useState, } from "react";
4
+ import Icon from "./icon";
5
+ import ClickableButton from "./button";
6
+ /* ------------------------------------------------------------------ */
7
+ /* Locale helpers (French UI copy) */
8
+ /* ------------------------------------------------------------------ */
9
+ const WEEKDAY_LABELS = ["Lu", "Ma", "Me", "Je", "Ve", "Sa", "Di"];
10
+ const DATE_FORMAT = new Intl.DateTimeFormat("fr-FR", {
11
+ day: "2-digit",
12
+ month: "2-digit",
13
+ year: "numeric",
14
+ });
15
+ const DATETIME_FORMAT = new Intl.DateTimeFormat("fr-FR", {
16
+ day: "2-digit",
17
+ month: "2-digit",
18
+ year: "numeric",
19
+ hour: "2-digit",
20
+ minute: "2-digit",
21
+ });
22
+ const MONTH_TITLE_FORMAT = new Intl.DateTimeFormat("fr-FR", {
23
+ month: "long",
24
+ year: "numeric",
25
+ });
26
+ function startOfDay(date) {
27
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
28
+ }
29
+ function isSameDay(a, b) {
30
+ if (!a || !b)
31
+ return false;
32
+ return (a.getFullYear() === b.getFullYear() &&
33
+ a.getMonth() === b.getMonth() &&
34
+ a.getDate() === b.getDate());
35
+ }
36
+ function isBeforeDay(a, b) {
37
+ return startOfDay(a).getTime() < startOfDay(b).getTime();
38
+ }
39
+ function isAfterDay(a, b) {
40
+ return startOfDay(a).getTime() > startOfDay(b).getTime();
41
+ }
42
+ function clampToBounds(date, minDate, maxDate) {
43
+ let next = date;
44
+ if (minDate && isBeforeDay(next, minDate))
45
+ next = startOfDay(minDate);
46
+ if (maxDate && isAfterDay(next, maxDate))
47
+ next = startOfDay(maxDate);
48
+ return next;
49
+ }
50
+ function withTime(date, hours, minutes) {
51
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), hours, minutes, 0, 0);
52
+ }
53
+ function formatTimeValue(date) {
54
+ return `${String(date.getHours()).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
55
+ }
56
+ function parseTimeValue(value) {
57
+ const match = /^(\d{2}):(\d{2})$/.exec(value);
58
+ if (!match)
59
+ return null;
60
+ const hours = Number(match[1]);
61
+ const minutes = Number(match[2]);
62
+ if (hours > 23 || minutes > 59)
63
+ return null;
64
+ return { hours, minutes };
65
+ }
66
+ function formatRangeLabel(value) {
67
+ if (!value.from && !value.to)
68
+ return null;
69
+ if (value.from && value.to) {
70
+ return `${DATE_FORMAT.format(value.from)} – ${DATE_FORMAT.format(value.to)}`;
71
+ }
72
+ if (value.from)
73
+ return `${DATE_FORMAT.format(value.from)} – …`;
74
+ return `… – ${DATE_FORMAT.format(value.to)}`;
75
+ }
76
+ /* ------------------------------------------------------------------ */
77
+ /* Field chrome */
78
+ /* ------------------------------------------------------------------ */
79
+ const LABEL_CLASS = "mb-inline flex items-center gap-micro text-label text-muted-foreground";
80
+ function RequiredMark() {
81
+ return (_jsx("span", { "aria-hidden": "true", className: "text-danger", children: "*" }));
82
+ }
83
+ function FieldFeedback({ id, error }) {
84
+ if (!error)
85
+ return null;
86
+ return (_jsxs("p", { id: id, className: "flex items-start gap-micro text-small text-danger-foreground [&_svg]:size-[var(--icon-small)] [&_svg]:shrink-0", children: [_jsx(Icon, { name: "CircleAlert", variant: "danger", "aria-hidden": "true" }), _jsx("span", { children: error })] }));
87
+ }
88
+ function useDismissibleOpen() {
89
+ const [open, setOpen] = useState(false);
90
+ const rootRef = useRef(null);
91
+ useEffect(() => {
92
+ if (!open)
93
+ return;
94
+ const close = () => setOpen(false);
95
+ const focusTrigger = () => {
96
+ rootRef.current
97
+ ?.querySelector("button[aria-haspopup]")
98
+ ?.focus();
99
+ };
100
+ const isOutside = (target) => target instanceof Node && !rootRef.current?.contains(target);
101
+ const onPointerDown = (event) => {
102
+ if (isOutside(event.target))
103
+ close();
104
+ };
105
+ const onKeyDown = (event) => {
106
+ if (event.key !== "Escape")
107
+ return;
108
+ event.preventDefault();
109
+ event.stopPropagation();
110
+ focusTrigger();
111
+ close();
112
+ };
113
+ const onFocusIn = (event) => {
114
+ if (isOutside(event.target))
115
+ close();
116
+ };
117
+ document.addEventListener("pointerdown", onPointerDown, true);
118
+ document.addEventListener("keydown", onKeyDown, true);
119
+ document.addEventListener("focusin", onFocusIn);
120
+ return () => {
121
+ document.removeEventListener("pointerdown", onPointerDown, true);
122
+ document.removeEventListener("keydown", onKeyDown, true);
123
+ document.removeEventListener("focusin", onFocusIn);
124
+ };
125
+ }, [open]);
126
+ return { open, setOpen, rootRef };
127
+ }
128
+ /* ------------------------------------------------------------------ */
129
+ /* Calendar grid */
130
+ /* ------------------------------------------------------------------ */
131
+ function buildMonthCells(viewMonth) {
132
+ const year = viewMonth.getFullYear();
133
+ const month = viewMonth.getMonth();
134
+ const first = new Date(year, month, 1);
135
+ // Monday-first: JS getDay() is 0=Sun … 6=Sat
136
+ const startOffset = (first.getDay() + 6) % 7;
137
+ const daysInMonth = new Date(year, month + 1, 0).getDate();
138
+ const cells = [];
139
+ for (let i = 0; i < startOffset; i += 1)
140
+ cells.push(null);
141
+ for (let day = 1; day <= daysInMonth; day += 1) {
142
+ cells.push(new Date(year, month, day));
143
+ }
144
+ while (cells.length % 7 !== 0)
145
+ cells.push(null);
146
+ return cells;
147
+ }
148
+ function Calendar({ viewMonth, onViewMonthChange, onSelectDay, isSelected, isInRange, isRangeStart, isRangeEnd, minDate, maxDate, footer, }) {
149
+ const cells = useMemo(() => buildMonthCells(viewMonth), [viewMonth]);
150
+ const title = MONTH_TITLE_FORMAT.format(viewMonth);
151
+ const today = startOfDay(new Date());
152
+ const goMonth = (delta) => {
153
+ onViewMonthChange(new Date(viewMonth.getFullYear(), viewMonth.getMonth() + delta, 1));
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) => {
156
+ if (!day) {
157
+ return _jsx("div", { className: "h-8" }, `empty-${index}`);
158
+ }
159
+ const disabled = (minDate ? isBeforeDay(day, minDate) : false) ||
160
+ (maxDate ? isAfterDay(day, maxDate) : false);
161
+ const selected = isSelected(day);
162
+ const inRange = isInRange?.(day) ?? false;
163
+ const rangeStart = isRangeStart?.(day) ?? false;
164
+ const rangeEnd = isRangeEnd?.(day) ?? false;
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";
167
+ if (disabled) {
168
+ dayClass += " cursor-not-allowed text-muted-foreground/40";
169
+ }
170
+ else if (selected || rangeStart || rangeEnd) {
171
+ dayClass +=
172
+ " bg-primary text-primary-foreground hover:bg-primary-hover";
173
+ }
174
+ else if (inRange) {
175
+ dayClass += " bg-primary-light text-primary hover:bg-primary-muted";
176
+ }
177
+ else {
178
+ dayClass +=
179
+ " text-foreground hover:bg-surface-muted";
180
+ }
181
+ if (isToday && !selected && !rangeStart && !rangeEnd) {
182
+ dayClass += " font-semibold ring-1 ring-inset ring-primary/40";
183
+ }
184
+ return (_jsx("button", { type: "button", role: "gridcell", disabled: disabled, "aria-selected": selected || rangeStart || rangeEnd, "aria-current": isToday ? "date" : undefined, onClick: () => onSelectDay(day), className: dayClass, children: day.getDate() }, day.toISOString()));
185
+ }) }), footer ? _jsx("div", { className: "mt-3 border-t border-border pt-3", children: footer }) : null] }));
186
+ }
187
+ /* ------------------------------------------------------------------ */
188
+ /* Trigger + shell */
189
+ /* ------------------------------------------------------------------ */
190
+ function DateFieldShell({ label, required, disabled, error, helper, className = "", open, onOpenChange, display, placeholder, clearable, hasValue, onClear, children, rootRef, }) {
191
+ const generatedId = useId();
192
+ const helperId = useId();
193
+ const errorId = useId();
194
+ const describedBy = [error ? errorId : helper ? helperId : undefined]
195
+ .filter(Boolean)
196
+ .join(" ") || undefined;
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
+ ? "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 }))] }));
200
+ }
201
+ function initialViewMonth(value, fallback) {
202
+ const source = value ?? fallback ?? new Date();
203
+ return new Date(source.getFullYear(), source.getMonth(), 1);
204
+ }
205
+ /* ------------------------------------------------------------------ */
206
+ /* DatePicker — single date */
207
+ /* ------------------------------------------------------------------ */
208
+ /**
209
+ * Single-date picker.
210
+ * Trigger matches Select/Input (`ds-input`); calendar opens below.
211
+ */
212
+ export function DatePicker({ label, value, onChange, placeholder = "Sélectionner une date…", minDate, maxDate, disabled = false, required = false, error, helper, clearable = true, className = "", }) {
213
+ const { open, setOpen, rootRef } = useDismissibleOpen();
214
+ const [viewMonth, setViewMonth] = useState(() => initialViewMonth(value));
215
+ useEffect(() => {
216
+ if (open)
217
+ setViewMonth(initialViewMonth(value));
218
+ }, [open, value]);
219
+ const handleSelect = (day) => {
220
+ const next = clampToBounds(startOfDay(day), minDate, maxDate);
221
+ onChange(next);
222
+ setOpen(false);
223
+ };
224
+ return (_jsx(DateFieldShell, { rootRef: rootRef, label: label, required: required, disabled: disabled, error: error, helper: helper, className: className, open: open, onOpenChange: setOpen, display: value ? DATE_FORMAT.format(value) : null, placeholder: placeholder, clearable: clearable, hasValue: Boolean(value), onClear: () => onChange(null), children: _jsx(Calendar, { viewMonth: viewMonth, onViewMonthChange: setViewMonth, onSelectDay: handleSelect, isSelected: (day) => isSameDay(day, value), minDate: minDate, maxDate: maxDate, footer: _jsxs("div", { className: "flex justify-between gap-2", children: [_jsx(ClickableButton, { type: "button", variant: "ghost", size: "sm", onClick: () => {
225
+ onChange(null);
226
+ setOpen(false);
227
+ }, children: "Effacer" }), _jsx(ClickableButton, { type: "button", variant: "secondary", size: "sm", onClick: () => handleSelect(clampToBounds(startOfDay(new Date()), minDate, maxDate)), children: "Aujourd'hui" })] }) }) }));
228
+ }
229
+ /* ------------------------------------------------------------------ */
230
+ /* DateTimePicker — date + time */
231
+ /* ------------------------------------------------------------------ */
232
+ /**
233
+ * Date and time picker.
234
+ * Day selection updates the date; time is confirmed via the time field.
235
+ */
236
+ export function DateTimePicker({ label, value, onChange, placeholder = "Sélectionner une date et une heure…", minDate, maxDate, disabled = false, required = false, error, helper, clearable = true, className = "", }) {
237
+ const { open, setOpen, rootRef } = useDismissibleOpen();
238
+ const [viewMonth, setViewMonth] = useState(() => initialViewMonth(value));
239
+ const [draftDate, setDraftDate] = useState(value);
240
+ const [timeText, setTimeText] = useState(() => value ? formatTimeValue(value) : "09:00");
241
+ useEffect(() => {
242
+ if (!open)
243
+ return;
244
+ setViewMonth(initialViewMonth(value));
245
+ setDraftDate(value);
246
+ setTimeText(value ? formatTimeValue(value) : "09:00");
247
+ }, [open, value]);
248
+ const apply = (day, time) => {
249
+ const parsed = parseTimeValue(time) ?? { hours: 0, minutes: 0 };
250
+ const next = withTime(clampToBounds(day, minDate, maxDate), parsed.hours, parsed.minutes);
251
+ onChange(next);
252
+ };
253
+ const handleSelectDay = (day) => {
254
+ setDraftDate(day);
255
+ apply(day, timeText);
256
+ };
257
+ const handleTimeChange = (nextTime) => {
258
+ setTimeText(nextTime);
259
+ if (draftDate && parseTimeValue(nextTime)) {
260
+ apply(draftDate, nextTime);
261
+ }
262
+ };
263
+ return (_jsx(DateFieldShell, { rootRef: rootRef, label: label, required: required, disabled: disabled, error: error, helper: helper, className: className, open: open, onOpenChange: setOpen, display: value ? DATETIME_FORMAT.format(value) : null, placeholder: placeholder, clearable: clearable, hasValue: Boolean(value), onClear: () => onChange(null), children: _jsx(Calendar, { viewMonth: viewMonth, onViewMonthChange: setViewMonth, onSelectDay: handleSelectDay, isSelected: (day) => isSameDay(day, draftDate), minDate: minDate, maxDate: maxDate, footer: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("label", { className: "flex items-center justify-between gap-2 text-label text-muted-foreground", children: [_jsx("span", { children: "Heure" }), _jsx("input", { type: "time", value: timeText, onChange: (event) => handleTimeChange(event.target.value), className: "ds-input w-auto py-1.5", "aria-label": "Heure" })] }), _jsxs("div", { className: "flex justify-between gap-2", children: [_jsx(ClickableButton, { type: "button", variant: "ghost", size: "sm", onClick: () => {
264
+ onChange(null);
265
+ setOpen(false);
266
+ }, children: "Effacer" }), _jsx(ClickableButton, { type: "button", variant: "primary", size: "sm", disabled: !draftDate, onClick: () => {
267
+ if (!draftDate)
268
+ return;
269
+ apply(draftDate, timeText);
270
+ setOpen(false);
271
+ }, children: "Appliquer" })] })] }) }) }));
272
+ }
273
+ /* ------------------------------------------------------------------ */
274
+ /* DateRangePicker — from / to */
275
+ /* ------------------------------------------------------------------ */
276
+ /**
277
+ * Date range picker (from → to).
278
+ * First click sets the start; second click sets the end.
279
+ */
280
+ export function DateRangePicker({ label, value, onChange, placeholder = "Sélectionner une période…", minDate, maxDate, disabled = false, required = false, error, helper, clearable = true, className = "", }) {
281
+ const { open, setOpen, rootRef } = useDismissibleOpen();
282
+ const [viewMonth, setViewMonth] = useState(() => initialViewMonth(value.from, value.to));
283
+ const [draft, setDraft] = useState(value);
284
+ useEffect(() => {
285
+ if (!open)
286
+ return;
287
+ setViewMonth(initialViewMonth(value.from, value.to));
288
+ setDraft(value);
289
+ }, [open, value]);
290
+ const handleSelectDay = (day) => {
291
+ const nextDay = clampToBounds(startOfDay(day), minDate, maxDate);
292
+ // First click (or reset after a complete range): set "from".
293
+ if (!draft.from || (draft.from && draft.to)) {
294
+ setDraft({ from: nextDay, to: null });
295
+ return;
296
+ }
297
+ // Second click: if before start, swap; otherwise complete the draft range.
298
+ // Stay open until Appliquer confirms.
299
+ if (isBeforeDay(nextDay, draft.from)) {
300
+ setDraft({ from: nextDay, to: draft.from });
301
+ return;
302
+ }
303
+ setDraft({ from: draft.from, to: nextDay });
304
+ };
305
+ const inRange = (day) => {
306
+ if (!draft.from || !draft.to)
307
+ return false;
308
+ return !isBeforeDay(day, draft.from) && !isAfterDay(day, draft.to) &&
309
+ !isSameDay(day, draft.from) &&
310
+ !isSameDay(day, draft.to);
311
+ };
312
+ return (_jsx(DateFieldShell, { rootRef: rootRef, label: label, required: required, disabled: disabled, error: error, helper: helper, className: className, open: open, onOpenChange: setOpen, display: formatRangeLabel(value), placeholder: placeholder, clearable: clearable, hasValue: Boolean(value.from || value.to), onClear: () => onChange({ from: null, to: null }), children: _jsx(Calendar, { viewMonth: viewMonth, onViewMonthChange: setViewMonth, onSelectDay: handleSelectDay, isSelected: () => false, isRangeStart: (day) => isSameDay(day, draft.from), isRangeEnd: (day) => isSameDay(day, draft.to), isInRange: inRange, minDate: minDate, maxDate: maxDate, footer: _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("p", { className: "text-small text-muted-foreground", children: !draft.from
313
+ ? "Choisissez la date de début."
314
+ : !draft.to
315
+ ? "Choisissez la date de fin."
316
+ : `${DATE_FORMAT.format(draft.from)} – ${DATE_FORMAT.format(draft.to)}` }), _jsxs("div", { className: "flex justify-between gap-2", children: [_jsx(ClickableButton, { type: "button", variant: "ghost", size: "sm", onClick: () => {
317
+ const empty = { from: null, to: null };
318
+ setDraft(empty);
319
+ onChange(empty);
320
+ setOpen(false);
321
+ }, children: "Effacer" }), _jsx(ClickableButton, { type: "button", variant: "primary", size: "sm", disabled: !draft.from || !draft.to, onClick: () => {
322
+ if (!draft.from || !draft.to)
323
+ return;
324
+ onChange(draft);
325
+ setOpen(false);
326
+ }, children: "Appliquer" })] })] }) }) }));
327
+ }
package/dist/icon.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import type { SVGProps } from "react";
2
+ import { icons } from "lucide-react";
3
+ /** Available icon sizes from the Iconography section. */
4
+ export type IconSize = "small" | "default" | "large" | "display";
5
+ /** Available icon variants, aligned with the Design System colors. */
6
+ export type IconVariant = "default" | "muted" | "primary" | "success" | "warning" | "danger" | "white";
7
+ /** Every exported Lucide icon name (e.g. "Search", "ArrowRight"). */
8
+ export type IconName = keyof typeof icons;
9
+ export interface IconProps extends Omit<SVGProps<SVGSVGElement>, "size" | "name"> {
10
+ /** The Lucide icon name to render. */
11
+ name: IconName;
12
+ /** Color variant; defaults to a neutral foreground icon. */
13
+ variant?: IconVariant;
14
+ /** Size variant following the Iconography tokens. */
15
+ size?: IconSize;
16
+ /** Overrides the Design System default stroke weight (1.8). */
17
+ strokeWidth?: number;
18
+ className?: string;
19
+ }
20
+ export default function Icon({ name, variant, size, strokeWidth, className, ...props }: IconProps): import("react").JSX.Element;
21
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../components/ui/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,KAAK,EAAmB,MAAM,cAAc,CAAC;AAStD,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjE,sEAAsE;AACtE,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,GACR,OAAO,CAAC;AAEZ,qEAAqE;AACrE,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC;AAE1C,MAAM,WAAW,SACf,SAAQ,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtD,sCAAsC;IACtC,IAAI,EAAE,QAAQ,CAAC;IACf,4DAA4D;IAC5D,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,qDAAqD;IACrD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,IAAI,EACJ,OAAmB,EACnB,IAAgB,EAChB,WAAiB,EACjB,SAAc,EACd,GAAG,KAAK,EACT,EAAE,SAAS,+BAWX"}
package/dist/icon.js ADDED
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { icons } from "lucide-react";
3
+ /** Fallback base class: keeps the icon from shrinking inside flex rows. */
4
+ const BASE_CLASS = "shrink-0";
5
+ const SIZE_CLASS = {
6
+ small: "size-[var(--icon-small)]",
7
+ default: "size-[var(--icon-default)]",
8
+ large: "size-[var(--icon-large)]",
9
+ display: "size-[var(--icon-display)]",
10
+ };
11
+ const VARIANT_CLASS = {
12
+ default: "text-foreground",
13
+ muted: "text-muted-foreground",
14
+ primary: "text-primary",
15
+ success: "text-success",
16
+ warning: "text-warning",
17
+ danger: "text-danger",
18
+ /* White icon intended for colored surfaces (nav items, brand badges). */
19
+ white: "text-white",
20
+ };
21
+ export default function Icon({ name, variant = "default", size = "default", strokeWidth = 1.8, className = "", ...props }) {
22
+ const IconComponent = icons[name];
23
+ return (_jsx(IconComponent, { "aria-hidden": "true", strokeWidth: strokeWidth, className: `${BASE_CLASS} ${SIZE_CLASS[size]} ${VARIANT_CLASS[variant]} ${className}`, ...props }));
24
+ }
@@ -1,28 +1,28 @@
1
- export { default as ClickableButton } from "./button";
2
- export type {
3
- ClickableButtonProps,
4
- ButtonVariant,
5
- ButtonSize,
6
- } from "./button";
7
- export { default as Input, Textarea } from "./input";
8
- export type { InputState, InputProps, TextareaProps } from "./input";
9
- export {default as Badge} from "./badge";
10
- export type {BadgeProps} from "./badge";
11
- export { default as Table } from "./table";
12
- export type { Column, CardAction, TableCardActions } from "./table";
13
- export { Select, MultiSelect, SelectWithSearch, MultiSelectWithSearch, SelectFilter } from "./select";
14
- export type { SelectOption } from "./select";
15
- export { default as Modal } from "./modal";
16
- export { default as Tabs } from "./tab";
17
- export type { Tab } from "./tab";
18
- export { default as Icon } from "./icon";
19
- export type { IconName, IconVariant, IconSize, IconProps } from "./icon";
20
- export { default as Loader } from "./loader";
21
- export type { LoaderProps } from "./loader";
22
- export { default as MetricBar } from "./metric-bar";
23
- export type { MetricTone } from "./metric-bar";
24
- export { default as Stepper } from "./stepper";
25
- export type { StepperStepState } from "./stepper";
26
- export { default as Accordion } from "./accordion";
27
- export type { AccordionItem } from "./accordion";
28
-
1
+ export { default as ClickableButton } from "./button";
2
+ export type { ClickableButtonProps, ButtonVariant, ButtonSize, } from "./button";
3
+ export { default as Input, Textarea } from "./input";
4
+ export type { InputState, InputProps, TextareaProps } from "./input";
5
+ export { default as Badge } from "./badge";
6
+ export type { BadgeProps } from "./badge";
7
+ export { default as Table } from "./table";
8
+ export type { Column, CardAction, TableCardActions } from "./table";
9
+ export { Select, MultiSelect, SelectWithSearch, MultiSelectWithSearch, SelectFilter } from "./select";
10
+ export type { SelectOption } from "./select";
11
+ export { default as Modal } from "./modal";
12
+ export { default as Tabs } from "./tab";
13
+ export type { Tab } from "./tab";
14
+ export { default as Icon } from "./icon";
15
+ export type { IconName, IconVariant, IconSize, IconProps } from "./icon";
16
+ export { default as Loader } from "./loader";
17
+ export type { LoaderProps } from "./loader";
18
+ export { default as MetricBar } from "./metric-bar";
19
+ export type { MetricTone } from "./metric-bar";
20
+ export { default as Stepper } from "./stepper";
21
+ export type { StepperStepState } from "./stepper";
22
+ export { default as Accordion } from "./accordion";
23
+ export type { AccordionItem } from "./accordion";
24
+ export { DatePicker, DateTimePicker, DateRangePicker } from "./date-picker";
25
+ export type { DatePickerProps, DateTimePickerProps, DateRangePickerProps, DateRangeValue, } from "./date-picker";
26
+ export { default as Agenda, AGENDA_STATUS_OPTIONS } from "./agenda";
27
+ export type { AgendaProps, AgendaEvent, AgendaView, AgendaEventStatus, AgendaStatusOption, AgendaStatusStyle, AgendaListRow, DateRangeValue as AgendaDateRangeValue, } from "./agenda";
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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E,MAAM,WAAW,CAAC;AAC/C,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5E,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACpE,YAAY,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,cAAc,IAAI,oBAAoB,GACvC,MAAM,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ export { default as ClickableButton } from "./button";
2
+ export { default as Input, Textarea } from "./input";
3
+ export { default as Badge } from "./badge";
4
+ export { default as Table } from "./table";
5
+ export { Select, MultiSelect, SelectWithSearch, MultiSelectWithSearch, SelectFilter } from "./select";
6
+ export { default as Modal } from "./modal";
7
+ export { default as Tabs } from "./tab";
8
+ export { default as Icon } from "./icon";
9
+ export { default as Loader } from "./loader";
10
+ export { default as MetricBar } from "./metric-bar";
11
+ export { default as Stepper } from "./stepper";
12
+ export { default as Accordion } from "./accordion";
13
+ export { DatePicker, DateTimePicker, DateRangePicker } from "./date-picker";
14
+ export { default as Agenda, AGENDA_STATUS_OPTIONS } from "./agenda";
@@ -0,0 +1,41 @@
1
+ import { type InputHTMLAttributes, type ReactNode, type Ref, type TextareaHTMLAttributes } from "react";
2
+ /** Visual validation state of the field. */
3
+ export type InputState = "valid" | "invalid";
4
+ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
5
+ /** Text label shown above the field. */
6
+ label?: string;
7
+ /** Optional leading icon/control inside the field. */
8
+ icon?: ReactNode;
9
+ /** Optional static adornment shown at the right of the field. */
10
+ trailingIcon?: ReactNode;
11
+ /** Visual validation state: tints the border and shows a feedback icon. */
12
+ state?: InputState;
13
+ /** Error message shown below the field (overrides `helper`). */
14
+ error?: string;
15
+ /** Unstyled helper text shown below the field. */
16
+ helper?: string;
17
+ /** Marks the field as required (renders `*` and sets `aria-required`). */
18
+ required?: boolean;
19
+ /** When set, shows a "clear" action as soon as the field has a value. */
20
+ clearable?: boolean;
21
+ /** Shorthand for a password field with a visibility toggle (same as `type="password"`). */
22
+ password?: boolean;
23
+ /** Shows a live character counter (uses `maxLength` when provided). */
24
+ counter?: boolean;
25
+ /** Extra callback fired after the field value is cleared. */
26
+ onClear?: () => void;
27
+ /** React 19 forwarded ref. */
28
+ ref?: Ref<HTMLInputElement>;
29
+ }
30
+ export default function Input({ label, icon, trailingIcon, state, error, helper, required, clearable, password, counter, onClear, id, type, disabled, maxLength, value, defaultValue, onChange, className, ref, ...props }: InputProps): import("react").JSX.Element;
31
+ export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
32
+ label?: string;
33
+ state?: InputState;
34
+ error?: string;
35
+ helper?: string;
36
+ required?: boolean;
37
+ counter?: boolean;
38
+ ref?: Ref<HTMLTextAreaElement>;
39
+ }
40
+ export declare function Textarea({ label, state, error, helper, required, counter, id, disabled, maxLength, value, defaultValue, onChange, className, ref, ...props }: TextareaProps): import("react").JSX.Element;
41
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../components/ui/input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,sBAAsB,EAC5B,MAAM,OAAO,CAAC;AAGf,4CAA4C;AAC5C,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AA0B7C,MAAM,WAAW,UAA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