@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.
@@ -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 { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capitaltg/vero",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "description": "Accessible, modern, open source React component library inspired by USWDS built with Radix UI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",