import { ReactNode, HTMLAttributes } from 'react'; import { GenericCheckboxProps } from './generic-checkbox'; export type CheckboxOptionValue = string | number | boolean; export interface GenericCheckboxOption { value: CheckboxOptionValue; label: ReactNode; disabled?: boolean; } /** * @deprecated use `CheckboxOptionValue[]` instead */ export type GenericCheckboxGroupValue = CheckboxOptionValue[]; export type GenericCheckboxGroupOptions = Array; type GenericCheckboxGroupCheckHandler = (option: GenericCheckboxOption, value: CheckboxOptionValue[], currentValue: CheckboxOptionValue[]) => void; type PropsFromDivAttributes = Pick, 'onFocus' | 'onBlur'>; export interface GenericCheckboxGroupProps extends PropsFromDivAttributes { /** * 自定义 class */ className?: string; /** * 自定义 class * default: normal */ type?: GenericCheckboxProps['type']; /** * 自定义 class * use config context `baseSize` as default */ size?: GenericCheckboxProps['size']; /** * 选择模式 */ mode?: 'checkbox' | 'radio'; /** * 控制选中值 */ value?: CheckboxOptionValue[]; /** * 默认选中值 */ defaultValue?: CheckboxOptionValue[]; /** * 是否整组禁用 */ disabled?: boolean; /** * 选项布局 */ layout?: 'horizontal' | 'vertical'; /** * 选项列表 */ options?: GenericCheckboxGroupOptions; /** * 点选 option 的回调 */ onCheck?: GenericCheckboxGroupCheckHandler; /** * 反选 option 的回调 */ onUncheck?: GenericCheckboxGroupCheckHandler; /** * 值变化回调 */ onChange?: ((nextValue: string[]) => void) | ((nextValue: number[]) => void); } /** * @docgen-skip */ export declare function GenericCheckboxGroup(props: GenericCheckboxGroupProps): import("react/jsx-runtime").JSX.Element; export declare namespace GenericCheckboxGroup { var displayName: string; } export {};