@dododog/ui 0.14.1 → 0.16.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 (73) 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-CPBDDGRX.mjs +572 -0
  5. package/dist/chunk-DJTFRMRY.js +595 -0
  6. package/dist/{chunk-NHB2TI2B.js → chunk-FHAWYXPX.js} +1 -1
  7. package/dist/{chunk-5UNG2O64.js → chunk-FR46MMNP.js} +7 -1
  8. package/dist/{chunk-I4S3R6C6.js → chunk-JUB3NGJR.js} +51 -6
  9. package/dist/chunk-JWQ2OUEG.js +132 -0
  10. package/dist/{chunk-EEIPCJQ2.mjs → chunk-KWQKC5TG.mjs} +1 -1
  11. package/dist/{chunk-IJIUUBFT.js → chunk-OUN5BU4Z.js} +1 -1
  12. package/dist/{chunk-DMCMWOBJ.mjs → chunk-PBXH4I5N.mjs} +51 -6
  13. package/dist/{chunk-ERL3WXNY.mjs → chunk-PZZWQ6IG.mjs} +5 -5
  14. package/dist/{chunk-L7OYR6U3.js → chunk-R4G5LFPN.js} +1 -1
  15. package/dist/{chunk-F2BUMJYW.mjs → chunk-RBVTV3LA.mjs} +1 -1
  16. package/dist/{chunk-B47HQHX3.mjs → chunk-RGZHSI2G.mjs} +1 -1
  17. package/dist/{chunk-GXKON34B.js → chunk-RTI25IBR.js} +1 -1
  18. package/dist/{chunk-GBWVIY3C.mjs → chunk-UJEIFKSK.mjs} +96 -29
  19. package/dist/{chunk-3R7PT3JG.js → chunk-USJDHMKS.js} +40 -6
  20. package/dist/{chunk-333YD5QI.mjs → chunk-WNBZXXFA.mjs} +40 -6
  21. package/dist/chunk-WY24TZ4R.mjs +94 -0
  22. package/dist/{chunk-JWOV5H6G.mjs → chunk-X53C3IQC.mjs} +7 -1
  23. package/dist/chunk-XBNIHUSG.js +116 -0
  24. package/dist/{chunk-TDGU5Y2P.js → chunk-XOFTU3T7.js} +5 -5
  25. package/dist/{chunk-NZ7GF6RF.mjs → chunk-YOMOULLR.mjs} +13 -1
  26. package/dist/{chunk-ZZ4EWC53.mjs → chunk-Z7CF7EQJ.mjs} +1 -1
  27. package/dist/components/Accordion/index.js +2 -2
  28. package/dist/components/Accordion/index.mjs +1 -1
  29. package/dist/components/Autocomplete/index.js +3 -3
  30. package/dist/components/Autocomplete/index.mjs +1 -1
  31. package/dist/components/Checkbox/index.js +2 -2
  32. package/dist/components/Checkbox/index.mjs +1 -1
  33. package/dist/components/Counter/index.d.mts +12 -0
  34. package/dist/components/Counter/index.d.ts +12 -0
  35. package/dist/components/Counter/index.js +2 -2
  36. package/dist/components/Counter/index.mjs +1 -1
  37. package/dist/components/DateRangePicker/index.d.mts +7 -1
  38. package/dist/components/DateRangePicker/index.d.ts +7 -1
  39. package/dist/components/DateRangePicker/index.js +3 -3
  40. package/dist/components/DateRangePicker/index.mjs +1 -1
  41. package/dist/components/Drawer/index.d.mts +21 -1
  42. package/dist/components/Drawer/index.d.ts +21 -1
  43. package/dist/components/Drawer/index.js +2 -2
  44. package/dist/components/Drawer/index.mjs +1 -1
  45. package/dist/components/DualRangeSlider/index.js +2 -2
  46. package/dist/components/DualRangeSlider/index.mjs +1 -1
  47. package/dist/components/Input/index.js +3 -3
  48. package/dist/components/Input/index.mjs +1 -1
  49. package/dist/components/Lightbox/index.d.mts +2 -0
  50. package/dist/components/Lightbox/index.d.ts +2 -0
  51. package/dist/components/Lightbox/index.js +2 -2
  52. package/dist/components/Lightbox/index.mjs +1 -1
  53. package/dist/components/RadioGroup/index.js +2 -2
  54. package/dist/components/RadioGroup/index.mjs +1 -1
  55. package/dist/components/Select/index.d.mts +8 -0
  56. package/dist/components/Select/index.d.ts +8 -0
  57. package/dist/components/Select/index.js +3 -3
  58. package/dist/components/Select/index.mjs +1 -1
  59. package/dist/components/Switch/index.d.mts +41 -1
  60. package/dist/components/Switch/index.d.ts +41 -1
  61. package/dist/components/Switch/index.js +4 -4
  62. package/dist/components/Switch/index.mjs +1 -1
  63. package/dist/components/Textarea/index.js +3 -3
  64. package/dist/components/Textarea/index.mjs +1 -1
  65. package/dist/index.js +81 -81
  66. package/dist/index.mjs +20 -20
  67. package/package.json +1 -1
  68. package/dist/chunk-AIA3NHCK.js +0 -373
  69. package/dist/chunk-FL3GD5FJ.mjs +0 -350
  70. package/dist/chunk-LRNSVRUN.mjs +0 -55
  71. package/dist/chunk-T4AT3YCT.js +0 -77
  72. package/dist/chunk-VWFY24XF.js +0 -89
  73. package/dist/chunk-ZLF7IL3Y.mjs +0 -67
@@ -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 chunkDJTFRMRY_js = require('../../chunk-DJTFRMRY.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 chunkDJTFRMRY_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 chunkDJTFRMRY_js.DateRangePicker; }
15
15
  });
@@ -1,2 +1,2 @@
1
- export { DatePickerInput, DateRangePicker } from '../../chunk-FL3GD5FJ.mjs';
1
+ export { DatePickerInput, DateRangePicker } from '../../chunk-CPBDDGRX.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';
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunk5UNG2O64_js = require('../../chunk-5UNG2O64.js');
3
+ var chunkFR46MMNP_js = require('../../chunk-FR46MMNP.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Input", {
9
9
  enumerable: true,
10
- get: function () { return chunk5UNG2O64_js.Input; }
10
+ get: function () { return chunkFR46MMNP_js.Input; }
11
11
  });
12
12
  Object.defineProperty(exports, "inputVariants", {
13
13
  enumerable: true,
14
- get: function () { return chunk5UNG2O64_js.inputVariants; }
14
+ get: function () { return chunkFR46MMNP_js.inputVariants; }
15
15
  });
@@ -1,2 +1,2 @@
1
- export { Input, inputVariants } from '../../chunk-JWOV5H6G.mjs';
1
+ export { Input, inputVariants } from '../../chunk-X53C3IQC.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';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkGXKON34B_js = require('../../chunk-GXKON34B.js');
3
+ var chunkRTI25IBR_js = require('../../chunk-RTI25IBR.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "RadioGroup", {
9
9
  enumerable: true,
10
- get: function () { return chunkGXKON34B_js.RadioGroup; }
10
+ get: function () { return chunkRTI25IBR_js.RadioGroup; }
11
11
  });
@@ -1,2 +1,2 @@
1
- export { RadioGroup } from '../../chunk-F2BUMJYW.mjs';
1
+ export { RadioGroup } from '../../chunk-RBVTV3LA.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 chunkUSJDHMKS_js = require('../../chunk-USJDHMKS.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 chunkUSJDHMKS_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 chunkUSJDHMKS_js.selectVariants; }
15
15
  });
@@ -1,2 +1,2 @@
1
- export { Select, selectVariants } from '../../chunk-333YD5QI.mjs';
1
+ export { Select, selectVariants } from '../../chunk-WNBZXXFA.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 };
@@ -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 };
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunkI4S3R6C6_js = require('../../chunk-I4S3R6C6.js');
3
+ var chunkJUB3NGJR_js = require('../../chunk-JUB3NGJR.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Switch", {
9
9
  enumerable: true,
10
- get: function () { return chunkI4S3R6C6_js.Switch; }
10
+ get: function () { return chunkJUB3NGJR_js.Switch; }
11
11
  });
12
12
  Object.defineProperty(exports, "switchThumbVariants", {
13
13
  enumerable: true,
14
- get: function () { return chunkI4S3R6C6_js.switchThumbVariants; }
14
+ get: function () { return chunkJUB3NGJR_js.switchThumbVariants; }
15
15
  });
16
16
  Object.defineProperty(exports, "switchTrackVariants", {
17
17
  enumerable: true,
18
- get: function () { return chunkI4S3R6C6_js.switchTrackVariants; }
18
+ get: function () { return chunkJUB3NGJR_js.switchTrackVariants; }
19
19
  });
@@ -1,2 +1,2 @@
1
- export { Switch, switchThumbVariants, switchTrackVariants } from '../../chunk-DMCMWOBJ.mjs';
1
+ export { Switch, switchThumbVariants, switchTrackVariants } from '../../chunk-PBXH4I5N.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkL7OYR6U3_js = require('../../chunk-L7OYR6U3.js');
3
+ var chunkR4G5LFPN_js = require('../../chunk-R4G5LFPN.js');
4
4
  require('../../chunk-ADIDI7AJ.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Textarea", {
9
9
  enumerable: true,
10
- get: function () { return chunkL7OYR6U3_js.Textarea; }
10
+ get: function () { return chunkR4G5LFPN_js.Textarea; }
11
11
  });
12
12
  Object.defineProperty(exports, "textareaVariants", {
13
13
  enumerable: true,
14
- get: function () { return chunkL7OYR6U3_js.textareaVariants; }
14
+ get: function () { return chunkR4G5LFPN_js.textareaVariants; }
15
15
  });
@@ -1,2 +1,2 @@
1
- export { Textarea, textareaVariants } from '../../chunk-ZZ4EWC53.mjs';
1
+ export { Textarea, textareaVariants } from '../../chunk-Z7CF7EQJ.mjs';
2
2
  import '../../chunk-IMKLN273.mjs';