import { SingleSelectTokensType } from './singleSelect.tokens'; import { SelectMenuSize, SelectMenuVariant } from './types'; export type AriaAttributes = { 'aria-describedby'?: string; 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-invalid'?: boolean; [key: string]: unknown; }; export type ExtractedAriaProps = { 'aria-describedby'?: string; 'aria-label'?: string; 'aria-labelledby'?: string; restProps: Record; }; export declare function getBorderRadius(size: SelectMenuSize, varient: SelectMenuVariant, singleSelectGroupPosition: 'center' | 'left' | 'right' | undefined, tokens: SingleSelectTokensType): { borderRadius: string; borderRight?: string; }; export type AccessibilitySetupOptions = { name?: string; generatedId: string; label?: string; hintText?: string; error?: boolean; errorMessage?: string; rest?: Record; prefix?: string; needsMenuId?: boolean; }; export type AccessibilitySetupResult = { uniqueName: string; labelId?: string; hintTextId?: string; errorMessageId?: string; menuId?: string; ariaAttributes: AriaAttributes; }; /** * Generates unique IDs for accessibility attributes * WCAG 4.1.2 (Name, Role, Value) */ export declare const generateAccessibilityIds: (uniqueName: string, options: { hasLabel?: boolean; hasHintText?: boolean; hasErrorMessage?: boolean; needsMenuId?: boolean; }) => { labelId?: string; hintTextId?: string; errorMessageId?: string; menuId?: string; }; /** * Extracts ARIA attributes from rest props * WCAG 4.1.2 (Name, Role, Value) */ export declare const extractAriaProps: (rest: Record | undefined) => ExtractedAriaProps; /** * Merges aria-describedby IDs from multiple sources * WCAG 3.3.2 (Labels or Instructions) & 4.1.3 (Status Messages) */ export declare const mergeAriaDescribedBy: (...ids: (string | undefined)[]) => string | undefined; /** * Builds ARIA attributes object for SingleSelect components * Note: Radix UI handles aria-expanded and aria-controls automatically * We only add form-specific attributes: aria-labelledby, aria-describedby, aria-invalid * WCAG 4.1.2 (Name, Role, Value) */ export declare const buildAriaAttributes: (options: { error?: boolean; ariaLabelledBy?: string; ariaDescribedBy?: string; ariaLabel?: string; restProps?: Record; }) => AriaAttributes; /** * Complete accessibility setup for SingleSelect components * Handles ID generation, ARIA attribute extraction, and attribute building * WCAG 4.1.2 (Name, Role, Value), 3.3.2 (Labels or Instructions), 4.1.3 (Status Messages) */ export declare const setupAccessibility: (options: AccessibilitySetupOptions) => AccessibilitySetupResult;