import { ID } from "../../types/index.mjs"; import { AtomExpose, AtomProps } from "../Atom/Atom.vue.mjs"; import "../Atom/index.mjs"; import { MaybeRefOrGetter, Ref } from "vue"; //#region src/components/Radio/RadioRoot.vue.d.ts /** Visual state of the radio for styling purposes */ type RadioState = 'checked' | 'unchecked'; interface RadioRootContext { /** Unique identifier */ readonly id: ID; /** Optional display label */ readonly label?: string; /** Value associated with this radio */ readonly value: unknown; /** Form field name (triggers auto hidden input when provided) */ readonly name?: string; /** Associate with form by ID */ readonly form?: string; /** Whether this radio is currently checked */ isChecked: Readonly>; /** Whether this radio is disabled */ isDisabled: Readonly>; /** Check this radio */ select: () => void; } interface RadioRootProps extends AtomProps { /** Unique identifier (auto-generated if not provided) */ id?: ID; /** Optional display label (passed through to slot) */ label?: string; /** * Value associated with this radio for group selection and form submission * * @example * ```vue * * ``` */ value?: V; /** Form field name - triggers auto hidden input when provided */ name?: string; /** * Associate with a form by ID (for radios outside the form element) * * @example * ```vue * * ``` */ form?: string; /** * Disables this radio (prevents selection and keyboard focus) * * @example * ```vue * * ``` */ disabled?: boolean | MaybeRefOrGetter; /** Namespace for context provision to children (Indicator, HiddenInput) */ namespace?: string; /** Namespace for connecting to parent Radio.Group */ groupNamespace?: string; /** ID of element that labels this radio */ ariaLabelledby?: string; /** ID of element that describes this radio */ ariaDescribedby?: string; /** * Marks the radio as invalid for form validation * * @example * ```vue * * ``` */ ariaInvalid?: boolean; } interface RadioRootSlotProps { /** Unique identifier */ id: ID; /** Optional display label */ label?: string; /** Value associated with this radio */ value: V | undefined; /** Whether this radio is currently checked */ isChecked: boolean; /** Whether this radio is disabled */ isDisabled: boolean; /** Check this radio */ select: () => void; /** Attributes to bind to the radio element */ attrs: { 'type': 'button' | undefined; 'role': 'radio'; 'aria-checked': boolean; 'aria-disabled': boolean; 'aria-label': string | undefined; 'aria-labelledby': string | undefined; 'aria-describedby': string | undefined; 'aria-invalid': boolean | undefined; 'tabindex': 0 | -1; 'data-state': RadioState; 'data-disabled': true | undefined; 'data-radio-id': ID; 'onClick': () => void; 'onKeydown': (e: KeyboardEvent) => void; }; } declare const useRadioRoot: (key: string, defaultValue?: RadioRootContext | undefined) => RadioRootContext, provideRadioRoot: (key: string, context: RadioRootContext, app?: import("vue").App) => RadioRootContext; 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> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: import("vue").ShallowUnwrapRef) => void; attrs: any; slots: { /** * Default slot with radio state, actions, and ARIA attributes * * @example * ```vue * * ``` */ default: (props: RadioRootSlotProps) => any; }; emit: {}; }>) => 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 { RadioRootContext, RadioRootProps, RadioRootSlotProps, RadioState, _default as default, provideRadioRoot, useRadioRoot };