import React from 'react'; import { ConfigConsumerProps } from '../config-provider/context'; import { SizeType } from '../config-provider/SizeContext'; import { LiteralUnion } from '../_util'; import ClearableLabeledInput from './ClearableLabeledInput'; import './style/index.ts'; import type TextArea from './TextArea'; import type Password from './Password'; export interface InputFocusOptions extends FocusOptions { cursor?: 'start' | 'end' | 'all'; } export interface InputProps extends Omit, 'size' | 'prefix' | 'type'> { prefixCls?: string; size?: SizeType; type?: LiteralUnion<'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week', string>; onPressEnter?: React.KeyboardEventHandler; addonBefore?: React.ReactNode; addonAfter?: React.ReactNode; prefix?: React.ReactNode; suffix?: React.ReactNode; allowClear?: boolean; bordered?: boolean; htmlSize?: number; } export interface InputState { value: any; focused: boolean; prevValue: any; } declare class Input extends React.Component { static defaultProps: { type: string; }; static TextArea: typeof TextArea; static Password: typeof Password; input: HTMLInputElement; clearableInput: ClearableLabeledInput; removePasswordTimeout: any; constructor(props: InputProps); componentWillUnmount(): void; saveInput: (input: HTMLInputElement) => void; saveClearableInput: (input: ClearableLabeledInput) => void; setValue(value: string, callback?: () => void): void; clearPasswordValueAttribute: () => void; handleChange: (e: React.ChangeEvent) => void; onFocus: React.FocusEventHandler; onBlur: React.FocusEventHandler; handleKeyDown: (e: React.KeyboardEvent) => void; focus: (option?: InputFocusOptions | undefined) => void; handleReset: (e: React.MouseEvent) => void; renderInput: (prefixCls: string, size: SizeType | undefined, bordered: boolean, input?: ConfigConsumerProps['input']) => JSX.Element; renderComponent: ({ getPrefixCls, input }: ConfigConsumerProps) => JSX.Element; render(): JSX.Element; } export default Input;