import { Activation } from "../../types/index.mjs"; import { AtomProps } from "../Atom/Atom.vue.mjs"; import "../Atom/index.mjs"; import { SingleContext, SingleTicket } from "../../composables/createSingle/index.mjs"; import { MaybeRefOrGetter, Ref } from "vue"; //#region src/components/Radio/RadioGroup.vue.d.ts /** Ticket for radio items with element reference for focus management */ interface RadioTicket extends SingleTicket { /** Element reference for roving tabindex focus management */ el?: MaybeRefOrGetter; } /** Imperative handle exposed by Radio.Group. */ interface RadioGroupExpose { /** Focus the selected radio, or the first if none is selected. */ focus: (options?: FocusOptions) => void; } /** Activation mode alias for Radio component API */ type RadioActivation = Activation; interface RadioGroupContext extends SingleContext { /** Form field name shared by all radios in the group */ name?: string; /** Activation mode for the group */ activation: Ref; } interface RadioGroupProps extends AtomProps { /** Namespace for dependency injection */ namespace?: string; /** * Disables the entire radio group * * @example * ```vue * * ``` */ disabled?: boolean; /** * Auto-selects the first non-disabled item on mount. * Radio groups are inherently mandatory (selection can only be changed, not cleared), * so `mandatory="force"` is the only meaningful option. * * @example * ```vue * * ``` */ mandatory?: boolean | 'force'; /** * Accessible name for the group * * @example * ```vue * * ``` */ label?: string; /** ID of element that labels this group */ ariaLabelledby?: string; /** ID of element that describes this group */ ariaDescribedby?: string; /** Whether a selection is required before form submission */ ariaRequired?: boolean; /** * Form field name - enables native form submission for all radios in group * * @example * ```vue * * ``` */ name?: string; /** * Activation mode controlling when selection occurs: * - `automatic` (default): Selection follows focus (arrow keys select) * - `manual`: Selection requires explicit Enter/Space key press * * Per WAI-ARIA APG, radio groups should have selection follow focus by default. * Use `manual` for toolbar radio groups or when deliberate selection is preferred. * * @example * ```vue * * ``` */ activation?: RadioActivation; } interface RadioGroupSlotProps { /** Whether the radio group is disabled */ isDisabled: boolean; /** Whether no items are currently selected */ isNoneSelected: boolean; /** Current activation mode */ activation: RadioActivation; /** Attributes to bind to the root element */ attrs: { 'role': 'radiogroup'; 'aria-label': string | undefined; 'aria-labelledby': string | undefined; 'aria-describedby': string | undefined; 'aria-required': boolean | undefined; }; } declare const useRadioGroup: (key: string, defaultValue?: RadioGroupContext | undefined) => RadioGroupContext, provideRadioGroup: (key: string, context: RadioGroupContext, app?: import("vue").App) => RadioGroupContext; declare const _default: typeof __VLS_export; declare const __VLS_export: (__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: import("vue").PublicProps & __VLS_PrettifyLocal<(RadioGroupProps & { modelValue?: T; }) & { "onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined; "onUpdate:model-value"?: ((value: T) => any) | undefined; }> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: import("vue").ShallowUnwrapRef) => void; attrs: any; slots: { /** * Default slot with group state and ARIA attributes * * @example * ```vue * * ``` */ default: (props: RadioGroupSlotProps) => any; }; emit: ((evt: "update:model-value", value: T) => void) & ((event: "update:modelValue", value: T | undefined) => void); }>) => import("vue").VNode & { __ctx?: NonNullable>; }; type __VLS_PrettifyLocal = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {}; //#endregion export { RadioActivation, RadioGroupContext, RadioGroupExpose, RadioGroupProps, RadioGroupSlotProps, RadioTicket, _default as default, provideRadioGroup, useRadioGroup };