@capitaltg/vero 1.7.2 → 1.7.4
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/index.cjs +57 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2212 -2207
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +28 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -654,4 +654,32 @@ declare type UseAriaDisabledOptions = {
|
|
|
654
654
|
|
|
655
655
|
declare type UseAriaDisabledReturn = Omit<UseAriaDisabledActive, 'isDisabled'> | Omit<UseAriaDisabledInactive, 'isDisabled'>;
|
|
656
656
|
|
|
657
|
+
/**
|
|
658
|
+
* Hook for managing ARIA attributes for radio buttons with external labels.
|
|
659
|
+
*
|
|
660
|
+
* When no explicit aria-label is provided, this hook generates IDs for the label
|
|
661
|
+
* and description elements and creates appropriate aria-labelledby and aria-describedby
|
|
662
|
+
* attributes to ensure screen readers can properly announce the radio button.
|
|
663
|
+
*
|
|
664
|
+
* @param options - Configuration options
|
|
665
|
+
* @returns ARIA props and generated IDs for label and description elements
|
|
666
|
+
*/
|
|
667
|
+
export declare function useRadioAria({ label, description, 'aria-label': ariaLabel, }?: UseRadioAriaOptions): UseRadioAriaReturn;
|
|
668
|
+
|
|
669
|
+
export declare type UseRadioAriaOptions = {
|
|
670
|
+
label?: React.ReactNode;
|
|
671
|
+
description?: string;
|
|
672
|
+
'aria-label'?: string;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
export declare type UseRadioAriaReturn = {
|
|
676
|
+
ariaProps: {
|
|
677
|
+
'aria-label'?: string;
|
|
678
|
+
'aria-labelledby'?: string;
|
|
679
|
+
'aria-describedby'?: string;
|
|
680
|
+
};
|
|
681
|
+
labelId: string;
|
|
682
|
+
descriptionId: string;
|
|
683
|
+
};
|
|
684
|
+
|
|
657
685
|
export { }
|