import React from 'react'; import { AriaFocusProps } from '../../types/common'; import { DefaultRadioSizeUnion, BoxRadioSizeUnion } from './types'; export type AlignType = 'horizontal' | 'vertical'; export type RadioItemType = 'default' | 'box'; export type RadioWidthType = 'fill' | 'auto'; export interface RadioCategoryType { radioItemType?: T; /** * radioItemType - default일 경우 'small', 'medium', 'large'만 적용되며 default값은 'medium'입니다. * * radioItemType - box일 경우 'xsmall', 'medium', 'large'만 적용되며 default값은 'medium'입니다. */ size?: T extends 'box' ? BoxRadioSizeUnion : DefaultRadioSizeUnion; } export interface RadioItem { label: React.ReactNode; value: RadioValue; disabled?: boolean; } export interface RadioGroupProps extends Omit, 'defaultValue' | 'value' | 'onChange'>, AriaFocusProps, RadioCategoryType { className?: string; defaultValue?: RadioValue; value?: RadioValue; name?: string; items: RadioItem[]; /** @default 'default' */ radioItemType?: RadioItemType; /** * RadioItemType - box 일경우 spacing 속성은 미적용됩니다. * @default 24 */ spacing?: number; /** @default false */ disabled?: boolean; /** * RadioItemType - box 일경우 align 속성은 'horizontal' 고정입니다. * @default 'horizontal' */ align?: AlignType; /** * 'fill' 일경우 Full Width 값, 'auto' 일경우 기본 너비 값으로 적용됩니다. * @default 'auto' */ width?: RadioWidthType; keyExtractor?: (item: RadioItem, index: number) => string | number; onChange?: (value: RadioValue) => void; } export interface RadioGroupInstance { value?: RadioValue; focus: () => void; } export declare const RadioGroup: (props: RadioGroupProps & { ref?: React.Ref> | undefined; }) => React.ReactElement;