import PropTypes from 'prop-types'; import React from 'react'; import { strings } from '@douyinfe/semi-foundation/lib/cjs/radio/constants'; import RadioGroupFoundation, { RadioGroupAdapter } from '@douyinfe/semi-foundation/lib/cjs/radio/radioGroupFoundation'; import { RadioChangeEvent } from '@douyinfe/semi-foundation/lib/cjs/radio/radioInnerFoundation'; import { ArrayElement } from '../_base/base'; import BaseComponent from '../_base/baseComponent'; import { RadioGroupButtonSize, RadioMode } from './context'; import { RadioType } from './radio'; export interface OptionItem { label?: React.ReactNode; value?: string | number; disabled?: boolean; extra?: React.ReactNode; style?: React.CSSProperties; className?: string; addonId?: string; addonStyle?: React.CSSProperties; addonClassName?: string; extraId?: string; } export type Options = string[] | Array; export type RadioGroupProps = { defaultValue?: string | number | boolean; disabled?: boolean; name?: string; options?: Options; value?: string | number | boolean; onChange?: (event: RadioChangeEvent) => void; className?: string; children?: React.ReactNode; style?: React.CSSProperties; direction?: ArrayElement; mode?: RadioMode; type?: RadioType; buttonSize?: RadioGroupButtonSize; prefixCls?: string; 'aria-label'?: React.AriaAttributes['aria-label']; 'aria-describedby'?: React.AriaAttributes['aria-describedby']; 'aria-errormessage'?: React.AriaAttributes['aria-errormessage']; 'aria-invalid'?: React.AriaAttributes['aria-invalid']; 'aria-labelledby'?: React.AriaAttributes['aria-labelledby']; 'aria-required'?: React.AriaAttributes['aria-required']; id?: string; }; export interface RadioGroupState { value?: any; } declare class RadioGroup extends BaseComponent { static propTypes: { defaultValue: PropTypes.Requireable; disabled: PropTypes.Requireable; name: PropTypes.Requireable; options: PropTypes.Requireable; buttonSize: PropTypes.Requireable<"small" | "large" | "middle">; type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">; value: PropTypes.Requireable; onChange: PropTypes.Requireable<(...args: any[]) => any>; children: PropTypes.Requireable; prefixCls: PropTypes.Requireable; className: PropTypes.Requireable; style: PropTypes.Requireable; direction: PropTypes.Requireable<"horizontal" | "vertical">; mode: PropTypes.Requireable<"" | "advanced">; 'aria-label': PropTypes.Requireable; 'aria-describedby': PropTypes.Requireable; 'aria-errormessage': PropTypes.Requireable; 'aria-invalid': PropTypes.Requireable; 'aria-labelledby': PropTypes.Requireable; 'aria-required': PropTypes.Requireable; id: PropTypes.Requireable; }; static defaultProps: Partial; foundation: RadioGroupFoundation; constructor(props: RadioGroupProps); componentDidMount(): void; componentDidUpdate(prevProps: RadioGroupProps): void; componentWillUnmount(): void; get adapter(): RadioGroupAdapter; onChange: (evt: RadioChangeEvent) => void; getFormatName: () => string; render(): React.JSX.Element; } export default RadioGroup;