import React, { ChangeEventHandler } from 'react'; import { Props } from '../../../common'; import { InputGroupPosition } from '../InputGroup'; interface ITextInputProps { /** ID of the input */ id?: string; /** Name of the input */ name: string; /** Custom classname to use */ className?: string; /** If true, adds invalid input class to component */ isInvalid?: boolean; /** Function passed to `onChange` prop */ handleChange?: ChangeEventHandler; /** Called when the input is changed */ onChange?: (value: string) => void; /** Value of the input */ value?: string | number; /** Type of the input */ type?: 'text' | 'password' | 'email' | 'search' | 'url' | 'tel'; /** If true, sets input to disabled state */ isDisabled?: boolean; /** Icon to display in the input box */ icon?: JSX.Element; /** Highlight input value on focus */ highlightOnFocus?: boolean; /** Handle blur event */ handleBlur?: (e: React.FocusEvent, value?: string | number) => void; /** Handle key down events */ handleKeyDown?: (e: React.KeyboardEvent) => void; /** Max length of string for text input */ maxLength?: number; /** Placeholder text to display when input is empty */ placeholder?: string; /** If true, use HTML5 required attribute */ isHTML5Required?: boolean; /** Add autofocus attribute to input */ autoFocus?: boolean; /** Specify where a input is in an InputGroup */ groupPosition?: InputGroupPosition; /** Specify width of the input */ width?: string; /** Disable Prefix to display in the input box */ disabledPrefix?: string; /** The component context */ componentContext?: string; /** Handle clear button events */ handleClear?: (e: React.MouseEvent) => void; /** The margins around the component */ margins?: Props.IMargins; /** Label for accessibility */ 'aria-label'?: string; } declare class TextInput extends React.PureComponent> { private prefixWrapperRef; componentDidMount(): void; componentDidUpdate(prevProps: ITextInputProps): void; render(): JSX.Element; private get input(); private get classNames(); private onFocus; private get hasClearButton(); private get prefix(); private get clearButton(); private handleChange; } export { TextInput, ITextInputProps };