import React from "react"; import "./index.scss"; import { ITranslation } from "./interface"; export declare type InputType = "text" | "password" | "hidden"; export declare type InputSize = "default" | "large" | "small"; export declare type InputStatus = "normal" | "disabled" | "isHint" | "error"; export interface InputProps { type?: InputType; size?: InputSize; value?: string; defaultValue?: string; placeholder?: string; status?: InputStatus; readOnly?: boolean; autoFocus?: boolean; allowPoprationOnClear?: boolean; maxLength?: number; prefix?: React.ReactNode; suffix?: React.ReactNode; translation?: ITranslation; showTip?: boolean; onChange?: (value: string) => void; onFocus?: (value: string) => void; onBlur?: (value: string) => void; onEnter?: (value: string) => void; onClear?: () => void; onKeyUp?: (evt: React.KeyboardEvent) => void; onClick?: React.MouseEventHandler; extraCls?: string; clearFocus?: boolean; inputRef?: (element: HTMLInputElement | null) => void; } interface InputState { value: string; hover: boolean; active: boolean; hasEllipsis: boolean; useInputReadonly?: boolean; } export default class Input extends React.PureComponent { static defaultProps: { type: string; size: string; status: string; readOnly: boolean; autoFocus: boolean; showTip: boolean; allowPoprationOnClear: boolean; translation: {}; }; private inputRef; private spanRef; private isClear; constructor(props: InputProps); shouldUseReadonly: () => boolean; autoFocus(): void; componentDidMount(): void; componentDidUpdate(prevProps: any): void; setHasEllipsis(): void; getValue(): string | undefined; setValue(value: string): void; getPlaceholder(): string | undefined; focus(): void; blur(): void; onControlEnter: () => void; onControlLeave: () => void; onFocus: (event: React.FocusEvent) => void; onBlur: (event: React.FocusEvent) => void; onChange: (event: React.ChangeEvent) => void; onKeyDown: (event: React.KeyboardEvent) => false | undefined; onClick: (event: React.MouseEvent) => void; onClear: (event: any) => void; onKeyUp: (evt: any) => void; onOverflowClick: () => void; renderClear(show: boolean): JSX.Element | null; renderPrefix(): JSX.Element | null; renderSuffix(show: boolean): JSX.Element | null; renderOverflow(value: string | undefined, hasEllipsis: boolean, hasPrefix: boolean, hasSuffix: boolean): JSX.Element | undefined; render(): JSX.Element; } export {};