import type { RadioGroupRootProps, RadioGroupRootEmits } from 'reka-ui'; import type { VNode } from 'vue'; import type { AppConfig } from '@nuxt/schema'; import theme from '#build/b24ui/radio-group'; import type { AcceptableValue, GetItemKeys, GetModelValue, GetModelValueEmits } from '../types/utils'; import type { ComponentConfig } from '../types/tv'; type RadioGroup = ComponentConfig; export type RadioGroupValue = AcceptableValue; export type RadioGroupItem = RadioGroupValue | { label?: string; description?: string; disabled?: boolean; value?: RadioGroupValue; class?: any; b24ui?: Pick; [key: string]: any; }; export interface RadioGroupProps = 'value'> extends Pick { /** * The element or component this component should render as. * @defaultValue 'div' */ as?: any; legend?: string; /** * When `items` is an array of objects, select the field to use as the value. * @defaultValue 'value' */ valueKey?: VK; /** * When `items` is an array of objects, select the field to use as the label. * @defaultValue 'label' */ labelKey?: GetItemKeys; /** * When `items` is an array of objects, select the field to use as the description. * @defaultValue 'description' */ descriptionKey?: GetItemKeys; items?: T; /** The controlled value of the RadioGroup. Can be bind as `v-model`. */ modelValue?: GetModelValue; /** The value of the RadioGroup when initially rendered. Use when you do not need to control the state of the RadioGroup. */ defaultValue?: GetModelValue; /** * @defaultValue 'md' */ size?: RadioGroup['variants']['size']; /** * @defaultValue 'list' */ variant?: RadioGroup['variants']['variant']; /** * @defaultValue 'air-primary' */ color?: RadioGroup['variants']['color']; /** * The orientation the radio buttons are laid out. * @defaultValue 'vertical' */ orientation?: RadioGroup['variants']['orientation']; /** * Position of the indicator. * @defaultValue 'start' */ indicator?: RadioGroup['variants']['indicator']; class?: any; b24ui?: RadioGroup['slots']; } export type RadioGroupEmits = 'value'> = Omit & { change: [event: Event]; } & GetModelValueEmits; type NormalizeItem = Exclude; type SlotProps = (props: { item: NormalizeItem; modelValue?: RadioGroupValue; }) => VNode[]; export interface RadioGroupSlots { legend?(props?: {}): VNode[]; label?: SlotProps; description?: SlotProps; } declare const _default: typeof __VLS_export; export default _default; declare const __VLS_export: = "value">(__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: import("vue").PublicProps & __VLS_PrettifyLocal & { onChange?: ((event: Event) => any) | undefined; "onUpdate:modelValue"?: ((value: import("../types").GetItemValue>) => any) | undefined; }> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: {}) => void; attrs: any; slots: RadioGroupSlots; emit: ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: import("../types").GetItemValue>) => void); }>) => import("vue").VNode & { __ctx?: Awaited; }; type __VLS_PrettifyLocal = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};