import { IconType } from '../icon'; import { CSSProperties } from 'react'; export declare type InputType = 'text' | 'number' | 'password' | 'textarea'; export declare type InputWidthSizeType = 'xs' | 's' | 'm' | 'l' | 'xl'; export declare type IInputProps = IInputCoreProps | ITextAreaProps; export interface IInputClearEvent extends Omit, 'target'> { target: IInputCoreProps & { value: string; }; fromClearButton?: boolean; } export declare type IInputChangeEvent = IInputClearEvent | React.ChangeEvent; export interface IInputCommonProps { className?: string; width?: number | string; size?: 'large' | 'normal' | 'small'; widthSize?: InputWidthSizeType; onPressEnter?: React.KeyboardEventHandler; autoFocus?: boolean; autoSelect?: boolean; initSelectionStart?: number; initSelectionEnd?: number; inline?: boolean; style?: CSSProperties; } export interface IInputCoreProps extends Omit, 'size' | 'value' | 'onChange'>, IInputCommonProps { type?: 'text' | 'number' | 'password'; icon?: IconType; iconPosition?: 'front' | 'end'; showClear?: boolean; addonBefore?: React.ReactNode; addonAfter?: React.ReactNode; value?: string; inline?: boolean; onChange?: (e: IInputChangeEvent) => void; onIconClick?: React.MouseEventHandler; } export interface ITextAreaProps extends Omit, 'value' | 'onChange'>, IInputCommonProps { type: 'textarea'; showCount?: boolean; autoSize?: boolean; value?: string; maxCharacterCount?: number; onChange?: (e: React.ChangeEvent) => void; }