import * as React from 'react'; import { Key, RawValueType } from './generator'; export type RenderDOMFunc = (props: any) => HTMLElement; export type RenderNode = React.ReactNode | ((props: any) => React.ReactNode); export type Mode = 'multiple' | 'tags' | 'combobox'; export type OnActiveValue = (active: RawValueType, index: number, info?: { source?: 'keyboard' | 'mouse'; }) => void; export interface OptionCoreData { key?: Key; disabled?: boolean; value: Key; title?: string; className?: string; style?: React.CSSProperties; label?: React.ReactNode; /** @deprecated Only works when use `children` as option data */ children?: React.ReactNode; extra?: React.ReactNode; } export interface OptionData extends OptionCoreData { /** Save for customize data */ [prop: string]: any; } export interface OptionGroupData { key?: Key; label?: React.ReactNode; options: OptionData[]; className?: string; style?: React.CSSProperties; /** Save for customize data */ [prop: string]: any; } export type OptionsType = (OptionData | OptionGroupData)[]; export interface FlattenOptionData { group?: boolean; groupOption?: boolean; key?: string | number; value?: string | number; data?: OptionData | OptionGroupData; groupKey?: string | number; groupLabel?: React.ReactNode; }