import { InputHTMLAttributes, ChangeEventHandler, FC, RefObject } from 'react'; declare type BaseElement = HTMLInputElement; declare type BaseProps = InputHTMLAttributes; export declare type NumberInputType = number | ''; export declare type InputChangeHandler = ChangeEventHandler; export declare type InputValueChangeHandler = (value: T) => void; export declare type TextInputWidth = 'small' | 'medium' | 'large' | 'full'; export declare type TextInputCredentialsType = 'username' | 'current-password' | 'new-password'; export declare type InputType = 'text' | 'number'; declare type ErrorVariant = 'text' | 'icon'; interface BaseInputProps extends BaseProps { /** * Specifies the name of an input element. */ readonly name?: BaseProps['name']; /** * `class` to be passed to the component. */ readonly className?: BaseProps['className']; /** * The value of the input element. */ readonly value: T; /** * Native change handler that can be used by formik etc. */ readonly onChange?: InputChangeHandler; /** * Smooth typed value change handler. */ readonly onValueChange?: InputValueChangeHandler; /** * Executes an action when the Enter key is pressed. */ readonly onPressEnter?: VoidFunction; /** * Executes an action when the Esc key is pressed. */ readonly onPressEscape?: VoidFunction; /** * Changes the width of the textbox area. */ readonly width?: TextInputWidth; /** * Adds error message to TextInput. */ readonly error?: string; /** * Error message variant. * * Default: `text` */ readonly errorVariant?: ErrorVariant; /** * Can be used to set React ref to the input element */ readonly inputRef?: RefObject; /** * Override theme's default setting for `compact` if set. */ readonly compact?: boolean; } export declare type TextInputProps = BaseInputProps; export declare const TextInput: FC; export declare type NumberInputProps = BaseInputProps; export declare const NumberInput: FC; export interface TextInputCredentialsProps extends BaseInputProps { readonly type: TextInputCredentialsType; } export declare const TextInputCredentials: FC; export declare const TextInputField: FC; export declare const NumberInputField: FC; export declare const TextInputCredentialsField: FC; export {};