@dododog/ui 0.14.1 → 0.15.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 (53) hide show
  1. package/dist/chunk-5KOWMIWK.mjs +110 -0
  2. package/dist/{chunk-MCF3EQTV.js → chunk-73BHQJW6.js} +13 -1
  3. package/dist/{chunk-U3XWNFHH.js → chunk-A3M3XQ35.js} +96 -29
  4. package/dist/chunk-BKM5VCUS.mjs +569 -0
  5. package/dist/{chunk-333YD5QI.mjs → chunk-EAATIFYL.mjs} +40 -6
  6. package/dist/chunk-FLKEMER2.js +592 -0
  7. package/dist/{chunk-I4S3R6C6.js → chunk-JUB3NGJR.js} +51 -6
  8. package/dist/chunk-JWQ2OUEG.js +132 -0
  9. package/dist/{chunk-3R7PT3JG.js → chunk-LJSMPON7.js} +40 -6
  10. package/dist/{chunk-DMCMWOBJ.mjs → chunk-PBXH4I5N.mjs} +51 -6
  11. package/dist/{chunk-ERL3WXNY.mjs → chunk-PZZWQ6IG.mjs} +5 -5
  12. package/dist/{chunk-GBWVIY3C.mjs → chunk-UJEIFKSK.mjs} +96 -29
  13. package/dist/chunk-WY24TZ4R.mjs +94 -0
  14. package/dist/chunk-XBNIHUSG.js +116 -0
  15. package/dist/{chunk-TDGU5Y2P.js → chunk-XOFTU3T7.js} +5 -5
  16. package/dist/{chunk-NZ7GF6RF.mjs → chunk-YOMOULLR.mjs} +13 -1
  17. package/dist/components/Accordion/index.js +2 -2
  18. package/dist/components/Accordion/index.mjs +1 -1
  19. package/dist/components/Counter/index.d.mts +12 -0
  20. package/dist/components/Counter/index.d.ts +12 -0
  21. package/dist/components/Counter/index.js +2 -2
  22. package/dist/components/Counter/index.mjs +1 -1
  23. package/dist/components/DateRangePicker/index.d.mts +7 -1
  24. package/dist/components/DateRangePicker/index.d.ts +7 -1
  25. package/dist/components/DateRangePicker/index.js +3 -3
  26. package/dist/components/DateRangePicker/index.mjs +1 -1
  27. package/dist/components/Drawer/index.d.mts +21 -1
  28. package/dist/components/Drawer/index.d.ts +21 -1
  29. package/dist/components/Drawer/index.js +2 -2
  30. package/dist/components/Drawer/index.mjs +1 -1
  31. package/dist/components/DualRangeSlider/index.js +2 -2
  32. package/dist/components/DualRangeSlider/index.mjs +1 -1
  33. package/dist/components/Lightbox/index.d.mts +2 -0
  34. package/dist/components/Lightbox/index.d.ts +2 -0
  35. package/dist/components/Lightbox/index.js +2 -2
  36. package/dist/components/Lightbox/index.mjs +1 -1
  37. package/dist/components/Select/index.d.mts +8 -0
  38. package/dist/components/Select/index.d.ts +8 -0
  39. package/dist/components/Select/index.js +3 -3
  40. package/dist/components/Select/index.mjs +1 -1
  41. package/dist/components/Switch/index.d.mts +41 -1
  42. package/dist/components/Switch/index.d.ts +41 -1
  43. package/dist/components/Switch/index.js +4 -4
  44. package/dist/components/Switch/index.mjs +1 -1
  45. package/dist/index.js +47 -47
  46. package/dist/index.mjs +15 -15
  47. package/package.json +1 -1
  48. package/dist/chunk-AIA3NHCK.js +0 -373
  49. package/dist/chunk-FL3GD5FJ.mjs +0 -350
  50. package/dist/chunk-LRNSVRUN.mjs +0 -55
  51. package/dist/chunk-T4AT3YCT.js +0 -77
  52. package/dist/chunk-VWFY24XF.js +0 -89
  53. package/dist/chunk-ZLF7IL3Y.mjs +0 -67
@@ -0,0 +1,116 @@
1
+ 'use strict';
2
+
3
+ var chunkADIDI7AJ_js = require('./chunk-ADIDI7AJ.js');
4
+ var React = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
26
+
27
+ var Counter = React__namespace.forwardRef(
28
+ ({
29
+ value,
30
+ onChange,
31
+ min = 0,
32
+ max = 99,
33
+ label,
34
+ subtitle,
35
+ className,
36
+ "aria-label": ariaLabel,
37
+ "aria-labelledby": ariaLabelledBy,
38
+ decrementLabel,
39
+ incrementLabel
40
+ }, ref) => {
41
+ const generatedId = React__namespace.useId();
42
+ const labelId = `${generatedId}-label`;
43
+ const canDecrement = value > min;
44
+ const canIncrement = value < max;
45
+ const labelledBy = [label ? labelId : null, ariaLabelledBy].filter(Boolean).join(" ") || void 0;
46
+ const groupName = label ?? ariaLabel;
47
+ const resolvedDecrementLabel = decrementLabel ?? (groupName ? `Diminuer ${groupName}` : "Diminuer");
48
+ const resolvedIncrementLabel = incrementLabel ?? (groupName ? `Augmenter ${groupName}` : "Augmenter");
49
+ return /* @__PURE__ */ jsxRuntime.jsxs(
50
+ "div",
51
+ {
52
+ ref,
53
+ role: "group",
54
+ "aria-labelledby": labelledBy,
55
+ "aria-label": labelledBy ? void 0 : ariaLabel,
56
+ className: chunkADIDI7AJ_js.cn("flex items-center justify-between", className),
57
+ children: [
58
+ (label || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
59
+ label && /* @__PURE__ */ jsxRuntime.jsx("span", { id: labelId, className: "text-sm font-medium text-primary", children: label }),
60
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs text-text-secondary", children: subtitle })
61
+ ] }),
62
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
63
+ /* @__PURE__ */ jsxRuntime.jsx(
64
+ "button",
65
+ {
66
+ type: "button",
67
+ disabled: !canDecrement,
68
+ onPointerDown: (e) => e.stopPropagation(),
69
+ onClick: () => canDecrement && onChange?.(value - 1),
70
+ className: chunkADIDI7AJ_js.cn(
71
+ "w-8 h-8 rounded-full border flex items-center justify-center transition-colors",
72
+ canDecrement ? "border-gray-300 text-primary hover:border-primary hover:bg-primary/5" : "border-gray-200 text-gray-300 cursor-not-allowed"
73
+ ),
74
+ "aria-label": resolvedDecrementLabel,
75
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14" }) })
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsxRuntime.jsxs(
79
+ "span",
80
+ {
81
+ "aria-live": "polite",
82
+ "aria-atomic": "true",
83
+ className: "w-8 text-center text-sm font-medium text-primary tabular-nums",
84
+ children: [
85
+ groupName && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: `${groupName} : ` }),
86
+ value
87
+ ]
88
+ }
89
+ ),
90
+ /* @__PURE__ */ jsxRuntime.jsx(
91
+ "button",
92
+ {
93
+ type: "button",
94
+ disabled: !canIncrement,
95
+ onPointerDown: (e) => e.stopPropagation(),
96
+ onClick: () => canIncrement && onChange?.(value + 1),
97
+ className: chunkADIDI7AJ_js.cn(
98
+ "w-8 h-8 rounded-full border flex items-center justify-center transition-colors",
99
+ canIncrement ? "border-gray-300 text-primary hover:border-primary hover:bg-primary/5" : "border-gray-200 text-gray-300 cursor-not-allowed"
100
+ ),
101
+ "aria-label": resolvedIncrementLabel,
102
+ children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
103
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14" }),
104
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 5v14" })
105
+ ] })
106
+ }
107
+ )
108
+ ] })
109
+ ]
110
+ }
111
+ );
112
+ }
113
+ );
114
+ Counter.displayName = "Counter";
115
+
116
+ exports.Counter = Counter;
@@ -52,12 +52,12 @@ var DualRangeSlider = React__namespace.forwardRef(
52
52
  const labelMin = formatLabel ? formatLabel(valueMin, "min") : String(valueMin);
53
53
  const labelMax = formatLabel ? formatLabel(valueMax, "max") : String(valueMax);
54
54
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: chunkADIDI7AJ_js.cn("w-full", className), children: [
55
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-2", children: [
56
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-full bg-gray-200" }),
55
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-6", children: [
56
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-1/2 h-2 -translate-y-1/2 rounded-full bg-gray-200" }),
57
57
  /* @__PURE__ */ jsxRuntime.jsx(
58
58
  "div",
59
59
  {
60
- className: "absolute h-full rounded-full bg-secondary",
60
+ className: "absolute top-1/2 h-2 -translate-y-1/2 rounded-full bg-secondary",
61
61
  style: { left: `${leftPercent}%`, right: `${rightPercent}%` }
62
62
  }
63
63
  ),
@@ -72,7 +72,7 @@ var DualRangeSlider = React__namespace.forwardRef(
72
72
  onChange: handleMinChange,
73
73
  "aria-label": "Minimum",
74
74
  className: chunkADIDI7AJ_js.cn(
75
- "absolute w-full h-2 appearance-none bg-transparent pointer-events-none",
75
+ "absolute inset-0 h-6 w-full appearance-none bg-transparent pointer-events-none",
76
76
  // Webkit thumb
77
77
  "[&::-webkit-slider-thumb]:pointer-events-auto",
78
78
  "[&::-webkit-slider-thumb]:appearance-none",
@@ -104,7 +104,7 @@ var DualRangeSlider = React__namespace.forwardRef(
104
104
  onChange: handleMaxChange,
105
105
  "aria-label": "Maximum",
106
106
  className: chunkADIDI7AJ_js.cn(
107
- "absolute w-full h-2 appearance-none bg-transparent pointer-events-none",
107
+ "absolute inset-0 h-6 w-full appearance-none bg-transparent pointer-events-none",
108
108
  "[&::-webkit-slider-thumb]:pointer-events-auto",
109
109
  "[&::-webkit-slider-thumb]:appearance-none",
110
110
  "[&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5",
@@ -51,11 +51,15 @@ Accordion.displayName = "Accordion";
51
51
  function AccordionItem({ title, isOpen, onToggle, children }) {
52
52
  const contentRef = React.useRef(null);
53
53
  const [height, setHeight] = React.useState(0);
54
+ const baseId = React.useId();
55
+ const headerId = `${baseId}-header`;
56
+ const panelId = `${baseId}-panel`;
54
57
  React.useEffect(() => {
55
58
  if (contentRef.current) {
56
59
  setHeight(isOpen ? contentRef.current.scrollHeight : 0);
57
60
  }
58
61
  }, [isOpen]);
62
+ const inertProps = isOpen ? {} : { inert: "" };
59
63
  return /* @__PURE__ */ jsxs(
60
64
  "div",
61
65
  {
@@ -67,8 +71,10 @@ function AccordionItem({ title, isOpen, onToggle, children }) {
67
71
  /* @__PURE__ */ jsxs(
68
72
  "button",
69
73
  {
74
+ id: headerId,
70
75
  onClick: onToggle,
71
76
  "aria-expanded": isOpen,
77
+ "aria-controls": panelId,
72
78
  className: "w-full flex items-center justify-between py-5 px-5 text-left group",
73
79
  children: [
74
80
  /* @__PURE__ */ jsx(
@@ -84,6 +90,7 @@ function AccordionItem({ title, isOpen, onToggle, children }) {
84
90
  /* @__PURE__ */ jsx(
85
91
  "div",
86
92
  {
93
+ "aria-hidden": "true",
87
94
  className: cn(
88
95
  "w-7 h-7 rounded-full flex items-center justify-center shrink-0 transition-all duration-300",
89
96
  isOpen ? "bg-secondary text-white" : "bg-gray-100 text-gray-600 group-hover:bg-secondary/10 group-hover:text-secondary"
@@ -100,7 +107,12 @@ function AccordionItem({ title, isOpen, onToggle, children }) {
100
107
  /* @__PURE__ */ jsx(
101
108
  "div",
102
109
  {
103
- style: { height },
110
+ id: panelId,
111
+ role: "region",
112
+ "aria-labelledby": headerId,
113
+ "aria-hidden": isOpen ? void 0 : true,
114
+ ...inertProps,
115
+ style: { height, visibility: isOpen ? void 0 : "hidden" },
104
116
  className: "overflow-hidden transition-all duration-500 ease-out",
105
117
  children: /* @__PURE__ */ jsx("div", { ref: contentRef, className: "pb-5 px-5 pr-12", children })
106
118
  }
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkMCF3EQTV_js = require('../../chunk-MCF3EQTV.js');
3
+ var chunk73BHQJW6_js = require('../../chunk-73BHQJW6.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Accordion", {
9
9
  enumerable: true,
10
- get: function () { return chunkMCF3EQTV_js.Accordion; }
10
+ get: function () { return chunk73BHQJW6_js.Accordion; }
11
11
  });
@@ -1,2 +1,2 @@
1
- export { Accordion } from '../../chunk-NZ7GF6RF.mjs';
1
+ export { Accordion } from '../../chunk-YOMOULLR.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';
@@ -8,6 +8,18 @@ interface CounterProps {
8
8
  label?: string;
9
9
  subtitle?: string;
10
10
  className?: string;
11
+ /** Nom accessible du groupe quand aucun `label` visible n'est rendu. */
12
+ "aria-label"?: string;
13
+ /** Id d'un texte externe qui sert de nom accessible au groupe. */
14
+ "aria-labelledby"?: string;
15
+ /**
16
+ * Libelle du bouton « moins ». Par defaut « Diminuer <nom du compteur> » :
17
+ * un simple « Diminuer » ne dit pas quoi, des que plusieurs compteurs
18
+ * cohabitent.
19
+ */
20
+ decrementLabel?: string;
21
+ /** Libelle du bouton « plus ». Par defaut « Augmenter <nom du compteur> ». */
22
+ incrementLabel?: string;
11
23
  }
12
24
  declare const Counter: React.ForwardRefExoticComponent<CounterProps & React.RefAttributes<HTMLDivElement>>;
13
25
 
@@ -8,6 +8,18 @@ interface CounterProps {
8
8
  label?: string;
9
9
  subtitle?: string;
10
10
  className?: string;
11
+ /** Nom accessible du groupe quand aucun `label` visible n'est rendu. */
12
+ "aria-label"?: string;
13
+ /** Id d'un texte externe qui sert de nom accessible au groupe. */
14
+ "aria-labelledby"?: string;
15
+ /**
16
+ * Libelle du bouton « moins ». Par defaut « Diminuer <nom du compteur> » :
17
+ * un simple « Diminuer » ne dit pas quoi, des que plusieurs compteurs
18
+ * cohabitent.
19
+ */
20
+ decrementLabel?: string;
21
+ /** Libelle du bouton « plus ». Par defaut « Augmenter <nom du compteur> ». */
22
+ incrementLabel?: string;
11
23
  }
12
24
  declare const Counter: React.ForwardRefExoticComponent<CounterProps & React.RefAttributes<HTMLDivElement>>;
13
25
 
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkT4AT3YCT_js = require('../../chunk-T4AT3YCT.js');
3
+ var chunkXBNIHUSG_js = require('../../chunk-XBNIHUSG.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Counter", {
9
9
  enumerable: true,
10
- get: function () { return chunkT4AT3YCT_js.Counter; }
10
+ get: function () { return chunkXBNIHUSG_js.Counter; }
11
11
  });
@@ -1,2 +1,2 @@
1
- export { Counter } from '../../chunk-LRNSVRUN.mjs';
1
+ export { Counter } from '../../chunk-WY24TZ4R.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';
@@ -19,8 +19,14 @@ interface DatePickerInputProps {
19
19
  onClick: () => void;
20
20
  onClear?: () => void;
21
21
  showClear?: boolean;
22
+ /**
23
+ * Etat du calendrier commande par ce declencheur (`aria-expanded`). Par
24
+ * defaut, on retombe sur `isActive` : le champ actif est celui dont le
25
+ * calendrier est ouvert.
26
+ */
27
+ isOpen?: boolean;
22
28
  }
23
- declare function DatePickerInput({ label, value, placeholder, isActive, onClick, onClear, showClear, }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
29
+ declare function DatePickerInput({ label, value, placeholder, isActive, onClick, onClear, showClear, isOpen, }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
24
30
  declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>;
25
31
 
26
32
  export { DatePickerInput, type DatePickerInputProps, DateRangePicker, type DateRangePickerProps };
@@ -19,8 +19,14 @@ interface DatePickerInputProps {
19
19
  onClick: () => void;
20
20
  onClear?: () => void;
21
21
  showClear?: boolean;
22
+ /**
23
+ * Etat du calendrier commande par ce declencheur (`aria-expanded`). Par
24
+ * defaut, on retombe sur `isActive` : le champ actif est celui dont le
25
+ * calendrier est ouvert.
26
+ */
27
+ isOpen?: boolean;
22
28
  }
23
- declare function DatePickerInput({ label, value, placeholder, isActive, onClick, onClear, showClear, }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
29
+ declare function DatePickerInput({ label, value, placeholder, isActive, onClick, onClear, showClear, isOpen, }: DatePickerInputProps): react_jsx_runtime.JSX.Element;
24
30
  declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>;
25
31
 
26
32
  export { DatePickerInput, type DatePickerInputProps, DateRangePicker, type DateRangePickerProps };
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkAIA3NHCK_js = require('../../chunk-AIA3NHCK.js');
3
+ var chunkFLKEMER2_js = require('../../chunk-FLKEMER2.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "DatePickerInput", {
9
9
  enumerable: true,
10
- get: function () { return chunkAIA3NHCK_js.DatePickerInput; }
10
+ get: function () { return chunkFLKEMER2_js.DatePickerInput; }
11
11
  });
12
12
  Object.defineProperty(exports, "DateRangePicker", {
13
13
  enumerable: true,
14
- get: function () { return chunkAIA3NHCK_js.DateRangePicker; }
14
+ get: function () { return chunkFLKEMER2_js.DateRangePicker; }
15
15
  });
@@ -1,2 +1,2 @@
1
- export { DatePickerInput, DateRangePicker } from '../../chunk-FL3GD5FJ.mjs';
1
+ export { DatePickerInput, DateRangePicker } from '../../chunk-BKM5VCUS.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';
@@ -4,9 +4,29 @@ interface DrawerProps {
4
4
  isOpen: boolean;
5
5
  onClose: () => void;
6
6
  children: React.ReactNode;
7
- side?: "left" | "right";
7
+ /**
8
+ * Bord d'ancrage du panneau. `bottom` produit une feuille (bottom sheet)
9
+ * pleine largeur, ancrée en bas et plafonnée en hauteur — le patron mobile.
10
+ */
11
+ side?: "left" | "right" | "bottom";
8
12
  title?: string;
13
+ /**
14
+ * `id` d'un titre déjà rendu dans le contenu. Prend le pas sur `title` pour
15
+ * nommer le dialogue (`aria-labelledby`), ce qui évite de dupliquer le titre
16
+ * quand le contenu porte déjà son propre `<h2>`.
17
+ */
18
+ labelledById?: string;
19
+ /** Classes du panneau. */
9
20
  className?: string;
21
+ /**
22
+ * Classes de la racine fixe. Sert notamment à caler le drawer dans l'échelle
23
+ * de z-index de l'hôte quand `z-50` ne suffit pas (carte, overlays…).
24
+ */
25
+ overlayClassName?: string;
26
+ /** Classes du conteneur défilant. */
27
+ contentClassName?: string;
28
+ /** Libellé accessible du bouton de fermeture. */
29
+ closeLabel?: string;
10
30
  }
11
31
  declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
12
32
 
@@ -4,9 +4,29 @@ interface DrawerProps {
4
4
  isOpen: boolean;
5
5
  onClose: () => void;
6
6
  children: React.ReactNode;
7
- side?: "left" | "right";
7
+ /**
8
+ * Bord d'ancrage du panneau. `bottom` produit une feuille (bottom sheet)
9
+ * pleine largeur, ancrée en bas et plafonnée en hauteur — le patron mobile.
10
+ */
11
+ side?: "left" | "right" | "bottom";
8
12
  title?: string;
13
+ /**
14
+ * `id` d'un titre déjà rendu dans le contenu. Prend le pas sur `title` pour
15
+ * nommer le dialogue (`aria-labelledby`), ce qui évite de dupliquer le titre
16
+ * quand le contenu porte déjà son propre `<h2>`.
17
+ */
18
+ labelledById?: string;
19
+ /** Classes du panneau. */
9
20
  className?: string;
21
+ /**
22
+ * Classes de la racine fixe. Sert notamment à caler le drawer dans l'échelle
23
+ * de z-index de l'hôte quand `z-50` ne suffit pas (carte, overlays…).
24
+ */
25
+ overlayClassName?: string;
26
+ /** Classes du conteneur défilant. */
27
+ contentClassName?: string;
28
+ /** Libellé accessible du bouton de fermeture. */
29
+ closeLabel?: string;
10
30
  }
11
31
  declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
12
32
 
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkVWFY24XF_js = require('../../chunk-VWFY24XF.js');
3
+ var chunkJWQ2OUEG_js = require('../../chunk-JWQ2OUEG.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Drawer", {
9
9
  enumerable: true,
10
- get: function () { return chunkVWFY24XF_js.Drawer; }
10
+ get: function () { return chunkJWQ2OUEG_js.Drawer; }
11
11
  });
@@ -1,2 +1,2 @@
1
- export { Drawer } from '../../chunk-ZLF7IL3Y.mjs';
1
+ export { Drawer } from '../../chunk-5KOWMIWK.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkTDGU5Y2P_js = require('../../chunk-TDGU5Y2P.js');
3
+ var chunkXOFTU3T7_js = require('../../chunk-XOFTU3T7.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "DualRangeSlider", {
9
9
  enumerable: true,
10
- get: function () { return chunkTDGU5Y2P_js.DualRangeSlider; }
10
+ get: function () { return chunkXOFTU3T7_js.DualRangeSlider; }
11
11
  });
@@ -1,2 +1,2 @@
1
- export { DualRangeSlider } from '../../chunk-ERL3WXNY.mjs';
1
+ export { DualRangeSlider } from '../../chunk-PZZWQ6IG.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';
@@ -9,6 +9,8 @@ interface LightboxProps {
9
9
  open: boolean;
10
10
  onClose: () => void;
11
11
  className?: string;
12
+ /** Nom accessible de la visionneuse (annonce a l'ouverture). */
13
+ "aria-label"?: string;
12
14
  }
13
15
  declare const Lightbox: React.ForwardRefExoticComponent<LightboxProps & React.RefAttributes<HTMLDivElement>>;
14
16
 
@@ -9,6 +9,8 @@ interface LightboxProps {
9
9
  open: boolean;
10
10
  onClose: () => void;
11
11
  className?: string;
12
+ /** Nom accessible de la visionneuse (annonce a l'ouverture). */
13
+ "aria-label"?: string;
12
14
  }
13
15
  declare const Lightbox: React.ForwardRefExoticComponent<LightboxProps & React.RefAttributes<HTMLDivElement>>;
14
16
 
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkU3XWNFHH_js = require('../../chunk-U3XWNFHH.js');
3
+ var chunkA3M3XQ35_js = require('../../chunk-A3M3XQ35.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Lightbox", {
9
9
  enumerable: true,
10
- get: function () { return chunkU3XWNFHH_js.Lightbox; }
10
+ get: function () { return chunkA3M3XQ35_js.Lightbox; }
11
11
  });
@@ -1,2 +1,2 @@
1
- export { Lightbox } from '../../chunk-GBWVIY3C.mjs';
1
+ export { Lightbox } from '../../chunk-UJEIFKSK.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';
@@ -20,6 +20,14 @@ interface SelectProps extends VariantProps<typeof selectVariants> {
20
20
  placeholder?: string;
21
21
  disabled?: boolean;
22
22
  className?: string;
23
+ /** Id du bouton combobox. Genere automatiquement si absent. */
24
+ id?: string;
25
+ /** Nom accessible quand aucun `label` visible n'est rendu. */
26
+ "aria-label"?: string;
27
+ /** Id d'un texte externe qui sert de nom accessible. */
28
+ "aria-labelledby"?: string;
29
+ /** Id(s) d'un texte d'aide externe, compose avec le message d'erreur. */
30
+ "aria-describedby"?: string;
23
31
  }
24
32
  declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
25
33
 
@@ -20,6 +20,14 @@ interface SelectProps extends VariantProps<typeof selectVariants> {
20
20
  placeholder?: string;
21
21
  disabled?: boolean;
22
22
  className?: string;
23
+ /** Id du bouton combobox. Genere automatiquement si absent. */
24
+ id?: string;
25
+ /** Nom accessible quand aucun `label` visible n'est rendu. */
26
+ "aria-label"?: string;
27
+ /** Id d'un texte externe qui sert de nom accessible. */
28
+ "aria-labelledby"?: string;
29
+ /** Id(s) d'un texte d'aide externe, compose avec le message d'erreur. */
30
+ "aria-describedby"?: string;
23
31
  }
24
32
  declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
25
33
 
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunk3R7PT3JG_js = require('../../chunk-3R7PT3JG.js');
3
+ var chunkLJSMPON7_js = require('../../chunk-LJSMPON7.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Select", {
9
9
  enumerable: true,
10
- get: function () { return chunk3R7PT3JG_js.Select; }
10
+ get: function () { return chunkLJSMPON7_js.Select; }
11
11
  });
12
12
  Object.defineProperty(exports, "selectVariants", {
13
13
  enumerable: true,
14
- get: function () { return chunk3R7PT3JG_js.selectVariants; }
14
+ get: function () { return chunkLJSMPON7_js.selectVariants; }
15
15
  });
@@ -1,2 +1,2 @@
1
- export { Select, selectVariants } from '../../chunk-333YD5QI.mjs';
1
+ export { Select, selectVariants } from '../../chunk-EAATIFYL.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';
@@ -8,15 +8,55 @@ declare const switchTrackVariants: (props?: ({
8
8
  declare const switchThumbVariants: (props?: ({
9
9
  size?: "sm" | "md" | null | undefined;
10
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
11
- interface SwitchProps extends VariantProps<typeof switchTrackVariants> {
11
+ interface SwitchBaseProps extends VariantProps<typeof switchTrackVariants> {
12
12
  checked?: boolean;
13
13
  onCheckedChange?: (checked: boolean) => void;
14
14
  disabled?: boolean;
15
+ /**
16
+ * Libelle visible. C'est la maniere PRIVILEGIEE de nommer un switch : il est
17
+ * rendu dans un `<label>` relie au bouton.
18
+ */
15
19
  label?: string;
16
20
  description?: string;
17
21
  className?: string;
22
+ /** Nom du champ de formulaire (rend un input cache). */
18
23
  name?: string;
24
+ /** Id du bouton. Genere automatiquement si absent. */
25
+ id?: string;
26
+ /**
27
+ * Nom accessible quand aucun `label` visible n'est rendu (le texte est deja
28
+ * porte par un titre voisin, par exemple).
29
+ */
30
+ "aria-label"?: string;
31
+ /** Id d'un texte deja present dans la page qui sert de nom accessible. */
32
+ "aria-labelledby"?: string;
33
+ /** Id(s) d'un texte descriptif externe, compose avec `description`. */
34
+ "aria-describedby"?: string;
19
35
  }
36
+ /**
37
+ * Au moins UNE source de nom accessible est obligatoire. La contrainte est
38
+ * portee par le type, pas seulement par une convention : un switch sans nom ne
39
+ * compile plus. `name` reste accepte parce que la version publiee de la lib en
40
+ * derive deja l'`aria-label`, et que les appelants s'en servent.
41
+ */
42
+ type SwitchAccessibleNameProps = {
43
+ label: string;
44
+ } | {
45
+ "aria-label": string;
46
+ } | {
47
+ "aria-labelledby": string;
48
+ } | {
49
+ name: string;
50
+ };
51
+ type SwitchProps = SwitchBaseProps & SwitchAccessibleNameProps;
52
+ /**
53
+ * Un switch DOIT avoir un nom accessible. Les quatre sources acceptees, par
54
+ * ordre de priorite : `label`, `aria-labelledby`, `aria-label`, `name`.
55
+ *
56
+ * La contrainte est appliquee par le TYPE (`SwitchAccessibleNameProps`) : un
57
+ * `<Switch />` nu ne compile pas. L'avertissement en developpement reste le
58
+ * filet des consommateurs JavaScript, qui n'ont pas de verification de types.
59
+ */
20
60
  declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
21
61
 
22
62
  export { Switch, type SwitchProps, switchThumbVariants, switchTrackVariants };