@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.
- package/dist/chunk-5KOWMIWK.mjs +110 -0
- package/dist/{chunk-MCF3EQTV.js → chunk-73BHQJW6.js} +13 -1
- package/dist/{chunk-U3XWNFHH.js → chunk-A3M3XQ35.js} +96 -29
- package/dist/chunk-CPBDDGRX.mjs +572 -0
- package/dist/chunk-DJTFRMRY.js +595 -0
- package/dist/{chunk-NHB2TI2B.js → chunk-FHAWYXPX.js} +1 -1
- package/dist/{chunk-5UNG2O64.js → chunk-FR46MMNP.js} +7 -1
- package/dist/{chunk-I4S3R6C6.js → chunk-JUB3NGJR.js} +51 -6
- package/dist/chunk-JWQ2OUEG.js +132 -0
- package/dist/{chunk-EEIPCJQ2.mjs → chunk-KWQKC5TG.mjs} +1 -1
- package/dist/{chunk-IJIUUBFT.js → chunk-OUN5BU4Z.js} +1 -1
- package/dist/{chunk-DMCMWOBJ.mjs → chunk-PBXH4I5N.mjs} +51 -6
- package/dist/{chunk-ERL3WXNY.mjs → chunk-PZZWQ6IG.mjs} +5 -5
- package/dist/{chunk-L7OYR6U3.js → chunk-R4G5LFPN.js} +1 -1
- package/dist/{chunk-F2BUMJYW.mjs → chunk-RBVTV3LA.mjs} +1 -1
- package/dist/{chunk-B47HQHX3.mjs → chunk-RGZHSI2G.mjs} +1 -1
- package/dist/{chunk-GXKON34B.js → chunk-RTI25IBR.js} +1 -1
- package/dist/{chunk-GBWVIY3C.mjs → chunk-UJEIFKSK.mjs} +96 -29
- package/dist/{chunk-3R7PT3JG.js → chunk-USJDHMKS.js} +40 -6
- package/dist/{chunk-333YD5QI.mjs → chunk-WNBZXXFA.mjs} +40 -6
- package/dist/chunk-WY24TZ4R.mjs +94 -0
- package/dist/{chunk-JWOV5H6G.mjs → chunk-X53C3IQC.mjs} +7 -1
- package/dist/chunk-XBNIHUSG.js +116 -0
- package/dist/{chunk-TDGU5Y2P.js → chunk-XOFTU3T7.js} +5 -5
- package/dist/{chunk-NZ7GF6RF.mjs → chunk-YOMOULLR.mjs} +13 -1
- package/dist/{chunk-ZZ4EWC53.mjs → chunk-Z7CF7EQJ.mjs} +1 -1
- package/dist/components/Accordion/index.js +2 -2
- package/dist/components/Accordion/index.mjs +1 -1
- package/dist/components/Autocomplete/index.js +3 -3
- package/dist/components/Autocomplete/index.mjs +1 -1
- package/dist/components/Checkbox/index.js +2 -2
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/Counter/index.d.mts +12 -0
- package/dist/components/Counter/index.d.ts +12 -0
- package/dist/components/Counter/index.js +2 -2
- package/dist/components/Counter/index.mjs +1 -1
- package/dist/components/DateRangePicker/index.d.mts +7 -1
- package/dist/components/DateRangePicker/index.d.ts +7 -1
- package/dist/components/DateRangePicker/index.js +3 -3
- package/dist/components/DateRangePicker/index.mjs +1 -1
- package/dist/components/Drawer/index.d.mts +21 -1
- package/dist/components/Drawer/index.d.ts +21 -1
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/Drawer/index.mjs +1 -1
- package/dist/components/DualRangeSlider/index.js +2 -2
- package/dist/components/DualRangeSlider/index.mjs +1 -1
- package/dist/components/Input/index.js +3 -3
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Lightbox/index.d.mts +2 -0
- package/dist/components/Lightbox/index.d.ts +2 -0
- package/dist/components/Lightbox/index.js +2 -2
- package/dist/components/Lightbox/index.mjs +1 -1
- package/dist/components/RadioGroup/index.js +2 -2
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +8 -0
- package/dist/components/Select/index.d.ts +8 -0
- package/dist/components/Select/index.js +3 -3
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/Switch/index.d.mts +41 -1
- package/dist/components/Switch/index.d.ts +41 -1
- package/dist/components/Switch/index.js +4 -4
- package/dist/components/Switch/index.mjs +1 -1
- package/dist/components/Textarea/index.js +3 -3
- package/dist/components/Textarea/index.mjs +1 -1
- package/dist/index.js +81 -81
- package/dist/index.mjs +20 -20
- package/package.json +1 -1
- package/dist/chunk-AIA3NHCK.js +0 -373
- package/dist/chunk-FL3GD5FJ.mjs +0 -350
- package/dist/chunk-LRNSVRUN.mjs +0 -55
- package/dist/chunk-T4AT3YCT.js +0 -77
- package/dist/chunk-VWFY24XF.js +0 -89
- 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
|
|
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
|
|
10
|
+
get: function () { return chunkDJTFRMRY_js.DatePickerInput; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "DateRangePicker", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkDJTFRMRY_js.DateRangePicker; }
|
|
15
15
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DatePickerInput, DateRangePicker } from '../../chunk-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
10
|
+
get: function () { return chunkJWQ2OUEG_js.Drawer; }
|
|
11
11
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Drawer } from '../../chunk-
|
|
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
|
|
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
|
|
10
|
+
get: function () { return chunkXOFTU3T7_js.DualRangeSlider; }
|
|
11
11
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DualRangeSlider } from '../../chunk-
|
|
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
|
|
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
|
|
10
|
+
get: function () { return chunkFR46MMNP_js.Input; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "inputVariants", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkFR46MMNP_js.inputVariants; }
|
|
15
15
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Input, inputVariants } from '../../chunk-
|
|
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
|
|
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
|
|
10
|
+
get: function () { return chunkA3M3XQ35_js.Lightbox; }
|
|
11
11
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Lightbox } from '../../chunk-
|
|
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
|
|
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
|
|
10
|
+
get: function () { return chunkRTI25IBR_js.RadioGroup; }
|
|
11
11
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { RadioGroup } from '../../chunk-
|
|
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
|
|
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
|
|
10
|
+
get: function () { return chunkUSJDHMKS_js.Select; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "selectVariants", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkUSJDHMKS_js.selectVariants; }
|
|
15
15
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Select, selectVariants } from '../../chunk-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
10
|
+
get: function () { return chunkJUB3NGJR_js.Switch; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "switchThumbVariants", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkJUB3NGJR_js.switchThumbVariants; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "switchTrackVariants", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkJUB3NGJR_js.switchTrackVariants; }
|
|
19
19
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Switch, switchThumbVariants, switchTrackVariants } from '../../chunk-
|
|
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
|
|
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
|
|
10
|
+
get: function () { return chunkR4G5LFPN_js.Textarea; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "textareaVariants", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkR4G5LFPN_js.textareaVariants; }
|
|
15
15
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Textarea, textareaVariants } from '../../chunk-
|
|
1
|
+
export { Textarea, textareaVariants } from '../../chunk-Z7CF7EQJ.mjs';
|
|
2
2
|
import '../../chunk-IMKLN273.mjs';
|