import type { CSSProperties, VNodeChild } from "vue"; import type { XyControlStatus, XyOptionValue, XySemanticClassNames, XySemanticStyles, XySize } from "../core"; export type XyRadioButtonStyle = "outline" | "solid"; export type XyRadioOptionType = "button" | "default"; export type XyRadioOrientation = "horizontal" | "vertical"; export type XyRadioSemanticDom = "icon" | "label" | "root"; export type XyRadioGroupSemanticDom = "root"; export interface XyRadioProps { ariaLabel?: string; autofocus?: boolean; button?: boolean; checked?: boolean; classNames?: XyRadioClassNames; defaultChecked?: boolean; disabled?: boolean; id?: string; modelValue?: XyOptionValue; name?: string; readonly?: boolean; required?: boolean; size?: XySize; status?: XyControlStatus; styles?: XyRadioStyles; tabindex?: number; value: XyOptionValue; } export type XyRadioClassNames = XySemanticClassNames; export type XyRadioStyles = XySemanticStyles; export interface XyRadioOption { className?: string; disabled?: boolean; id?: string; label: string; onChange?: (value: XyOptionValue, event: Event) => void; required?: boolean; style?: CSSProperties; title?: string; value: XyOptionValue; } export type XyRadioOptionInput = XyOptionValue | XyRadioOption; export interface XyRadioGroupProps { ariaLabel?: string; block?: boolean; buttonStyle?: XyRadioButtonStyle; classNames?: XyRadioGroupClassNames; defaultValue?: XyOptionValue; /** @deprecated Use orientation instead. */ direction?: XyRadioOrientation; disabled?: boolean; modelValue?: XyOptionValue; name?: string; options?: XyRadioOptionInput[]; optionType?: XyRadioOptionType; orientation?: XyRadioOrientation; readonly?: boolean; size?: XySize; status?: XyControlStatus; styles?: XyRadioGroupStyles; /** @deprecated Use orientation="vertical" instead. */ vertical?: boolean; } export type XyRadioGroupClassNames = XySemanticClassNames; export type XyRadioGroupStyles = XySemanticStyles; export interface XyRadioExpose { blur: () => void; focus: (options?: FocusOptions) => void; input: HTMLInputElement | undefined; nativeElement: HTMLInputElement | undefined; } export interface XyRadioGroupExpose { value: XyOptionValue | undefined; } export interface XyRadioGroupSlots { default?: () => VNodeChild; option?: (props: { checked: boolean; option: XyRadioOption; }) => VNodeChild; }