import * as React from 'react'; import { Size, States, Testable } from '../types'; import { TextFieldNote } from './types'; export type TextFieldProps = Testable & Omit, 'size' | 'onChange' | 'value' | 'disabled' | 'id' | 'type' | 'readOnly' | 'autoComplete' | 'pattern' | 'maxLength'> & { /** * Optional. The ID of the text field. */ id?: string; /** * Optional. A boolean indicating whether the text field is disabled. */ disabled?: boolean; /** * Optional. A boolean indicating whether the text field is read-only. */ readOnly?: boolean; /** * Optional. A function to be called when the text in the text field changes. * It should take a string representing the new text. */ onChange?: (text: string) => void; /** * Optional. The current value of the text field. */ value?: string; /** * Optional. The validation message to be displayed when the text field is in an error state. */ validationMessage?: string; /** * Optional. The type of the text field. Can be any valid HTML input type. */ type?: string; /** * Optional. The state of the text field. Can be 'Invalid' or 'Valid'. */ state?: States.Invalid | States.Valid; /** * Optional. The autocomplete attribute of the text field. Can be any valid HTML autocomplete value. */ autoComplete?: string; /** * Optional. The placeholder text to be displayed in the text field when it is empty. */ placeholder?: string; /** * Optional. A boolean indicating whether the text field is required. */ required?: boolean; /** * Optional. The pattern attribute of the text field. Can be any valid HTML pattern value. */ pattern?: string; /** * Optional. The maximum length of the text that can be entered in the text field. */ maxLength?: number; /** * Optional. The position of the overflow tooltip. Can be 'top' or 'bottom'. */ overflowTooltipPosition?: 'top' | 'bottom'; /** * Optional. The size of the text field. Can be 'Small' or 'Medium'. */ size?: Size.Small | Size.Medium; /** * Optional. The margin of the text field. Can be any valid CSS margin value. */ margin?: string; /** * Optional. A note to be displayed below the text field. */ note?: TextFieldNote; }; declare const TextField: React.ForwardRefExoticComponent, "disabled" | "id" | "onChange" | "size" | "pattern" | "type" | "value" | "autoComplete" | "maxLength" | "readOnly"> & { /** * Optional. The ID of the text field. */ id?: string; /** * Optional. A boolean indicating whether the text field is disabled. */ disabled?: boolean; /** * Optional. A boolean indicating whether the text field is read-only. */ readOnly?: boolean; /** * Optional. A function to be called when the text in the text field changes. * It should take a string representing the new text. */ onChange?: (text: string) => void; /** * Optional. The current value of the text field. */ value?: string; /** * Optional. The validation message to be displayed when the text field is in an error state. */ validationMessage?: string; /** * Optional. The type of the text field. Can be any valid HTML input type. */ type?: string; /** * Optional. The state of the text field. Can be 'Invalid' or 'Valid'. */ state?: States.Invalid | States.Valid; /** * Optional. The autocomplete attribute of the text field. Can be any valid HTML autocomplete value. */ autoComplete?: string; /** * Optional. The placeholder text to be displayed in the text field when it is empty. */ placeholder?: string; /** * Optional. A boolean indicating whether the text field is required. */ required?: boolean; /** * Optional. The pattern attribute of the text field. Can be any valid HTML pattern value. */ pattern?: string; /** * Optional. The maximum length of the text that can be entered in the text field. */ maxLength?: number; /** * Optional. The position of the overflow tooltip. Can be 'top' or 'bottom'. */ overflowTooltipPosition?: "top" | "bottom"; /** * Optional. The size of the text field. Can be 'Small' or 'Medium'. */ size?: Size.Small | Size.Medium; /** * Optional. The margin of the text field. Can be any valid CSS margin value. */ margin?: string; /** * Optional. A note to be displayed below the text field. */ note?: TextFieldNote; } & React.RefAttributes>; export default TextField;