/// import { IState } from 'formstate-x'; import * as base from 'react-icecream'; interface CommonInputProps { value?: V; } interface CommonCheckboxProps { checked?: boolean; onChange?: (checked: boolean) => void; } /** 从 Input 控件的 props 类型中取出 value 的类型 */ declare type ValueOf

= P extends CommonInputProps ? V : never; export declare type WithState

> = Omit & { /** 当前字段所对应的状态 */ state: IState>; }; /** Bind state to normal input components, such as `TextInput`, `Select`, ... */ export declare function bindInput(state: IState): { value: V; onChange(value: V): void; }; export declare type WithStateForCommonCheckbox

= Omit & { /** 当前字段所对应的状态 */ state?: IState; }; /** Bind state to input components which use `checked` as value, such as `Checkbox`, `Radio`, `Switch` */ export declare function bindCheckedInput(state: IState): { checked: boolean; onChange: (value: boolean) => void; }; export declare type TextInputProps = WithState; export declare function TextInput(props: TextInputProps): JSX.Element; export declare type PasswordInputProps = WithState; export declare function PasswordInput(props: PasswordInputProps): JSX.Element; export declare type NumberInputProps = WithState; export declare function NumberInput(props: NumberInputProps): JSX.Element; export declare type TextAreaProps = WithState; export declare function TextArea(props: TextAreaProps): JSX.Element; export declare type DatePickerProps = WithState; export declare function DatePicker(props: DatePickerProps): JSX.Element; export declare type RangeDatePickerProps = WithState; export declare function RangeDatePicker(props: RangeDatePickerProps): JSX.Element; export declare type SelectProps = WithState>; export declare function Select(props: SelectProps): JSX.Element; export declare type MultiSelectProps = WithState>; export declare function MultiSelect(props: MultiSelectProps): JSX.Element; export declare type CheckboxGroupProps = WithState>; export declare function CheckboxGroup(props: CheckboxGroupProps): JSX.Element; export declare type CheckboxProps = WithStateForCommonCheckbox>; export declare function Checkbox(props: CheckboxProps): JSX.Element; export declare type RadioGroupProps = WithState>; export declare function RadioGroup(props: RadioGroupProps): JSX.Element; export declare type RadioProps = WithStateForCommonCheckbox>; export declare function Radio(props: RadioProps): JSX.Element; export declare type SwitchProps = Omit & { /** 当前字段所对应的状态 */ state: IState; }; export declare function Switch(props: SwitchProps): JSX.Element; export declare type CascaderProps = WithState>; export declare function Cascader(props: CascaderProps): JSX.Element; export declare type MultiCascaderProps = WithState>; export declare function MultiCascader(props: MultiCascaderProps): JSX.Element; export declare type AutoCompleteProps = WithState; export declare function AutoComplete(props: AutoCompleteProps): JSX.Element; export declare type TagsInputProps = WithState; export declare function TagsInput(props: TagsInputProps): JSX.Element; export declare type SliderProps = WithState; export declare function Slider(props: SliderProps): JSX.Element; export declare type UploadProps = WithState; export declare function Upload(props: UploadProps): JSX.Element; export declare type DragUploadProps = WithState; export declare function DragUpload(props: DragUploadProps): JSX.Element; export {};