import * as React from 'react'; import { Omit, LiteralUnion } from '../_util/type'; import './style'; declare type SizeType = 'small' | 'middle' | 'large'; export interface InputProps extends Omit, 'size'> { size?: SizeType; type?: LiteralUnion<'text' | 'email' | 'hidden' | 'password', string>; error?: boolean | string; animation?: boolean; validator?: (value: any) => string | undefined; onPressEnter?: React.KeyboardEventHandler; onChange?: (value: any) => void; ref?: React.RefCallback; isSubmitting?: boolean; } interface InputState { value?: any; focused?: boolean; error?: boolean | string; } declare class Input extends React.PureComponent { static defaultProps: { type: string; validator: () => void; }; $input: HTMLInputElement; constructor(props: InputProps); componentDidUpdate(prevProps: InputProps): void; focus: () => void; blur: () => void; onFocus: React.FocusEventHandler; onBlur: React.FocusEventHandler; validate: () => void; setValue(value: string, callback?: () => void): void; handleReset: () => void; handleChange: (e: React.ChangeEvent) => void; handleKeyDown: (e: React.KeyboardEvent) => void; saveInput: (input: HTMLInputElement) => void; render(): JSX.Element; } export default Input;