///
///
///
import React from 'react';
interface TextInputClearButtonPropTypes {
onClick: () => void;
}
/**
* Accessible button that makes it easy to add a "Clear" button to a text input. It should be used
* with the `innerRight` prop in `Input`.
*/
declare const TextInputClearButton: ({ onClick }: TextInputClearButtonPropTypes) => JSX.Element;
interface TextInputIconPropTypes {
/**
* Set the icon color with a color from [Thumbprint Tokens](/tokens/).
*/
color?: string;
/**
* An icon component from [Thumbprint Icons](/icons/).
* You should pair "Medium" icons with `large` inputs and "Small" icons with `small` inputs.
*/
children: React.ReactNode;
}
/**
* Component that helps position icons within inputs.
*/
declare const TextInputIcon: ({ color, children }: TextInputIconPropTypes) => JSX.Element;
export interface TextInputProps {
/**
* Adds a HTML `id` attribute to the input. This is used for linking the HTML with a
* [Label](/components/label/react/).
*/
id?: string;
/**
* Visually and functionally disable the input.
*/
isDisabled?: boolean;
/**
* Adds `readonly` HTML attribute, allowing users to select (but not modify) the input.
*/
isReadOnly?: boolean;
/**
* Adds the `required` HTML attribute.
*/
isRequired?: boolean;
/**
* A regular expression that the `` element's value is checked against when submitting a
* form.
*/
pattern?: string;
/**
* The maximum number of characters that a user can enter. `onChange` will not fire if a user
* enters a character that exceeds `maxLength`.
*/
maxLength?: number;
/**
* The maximum value that can be entered. Valid when `type=number`.
*/
max?: number;
/**
* The minimum value that can be entered. Valid when `type=number`.
*/
min?: number;
/**
* The granularity of values that can be entered. Valid when `type=number`.
*/
step?: number;
/**
* Makes the text and border color red.
*/
hasError?: boolean;
/**
* Text that appears within the input when there is no `value`.
*/
placeholder?: string;
/**
* Controls the height and padding of the input.
*/
size?: 'small' | 'large';
/**
* Sets the `type` attribute on the input element.
*/
type?: 'email' | 'password' | 'text' | 'search' | 'tel' | 'number';
/**
* A [proposed specification](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute)
* that enables specification of virtual keyboard type in Chrome. Currently only supported in
* Chrome and Android.
*/
inputMode?: 'numeric';
/**
* The HTML `name` attribute that will be pased to the input. It is required if working with a
* form that uses `