import { ComponentPropsWithRef } from 'react'; import { Nullable } from '@viasat/beam-shared/utils/types'; import { ThemeTypes } from '@viasat/beam-shared/utils/constants'; import { InputSize } from '@viasat/beam-shared/components/input'; import { FormValidator } from '@viasat/beam-shared/components/form'; import * as React from 'react'; export interface TextFieldProps extends Omit, 'size'> { /** * Specify placeholder text for TextField */ placeholder?: string; /** * Specify HelperText for TextField */ helperText?: Nullable; /** * Specify if TextField is a required input * @default false */ required?: boolean; /** * Specify if the TextField displays with an asterisk * @default false */ hideRequiredMarker?: boolean; /** * Specify Label for TextField */ label?: Nullable; /** * Specify error text and display error state of a TextField */ error?: boolean | string; /** * Specify if TextField displays in a read-only state * @default false */ readOnly?: boolean; /** * Specify if TextField displays in a disabled state * @default false */ disabled?: boolean; /** * Specify if TextField is fluid * @default false */ fluid?: boolean; /** * Specify the size of TextField. * Passing a number is a deprecated, backward-compatible shorthand for the * native character width — use `htmlSize` instead. * @default 'md' */ size?: InputSize | number; /** * Specify the native input width in average character widths * (the HTML `size` attribute) */ htmlSize?: number; /** * Specify the width of TextField */ width?: string; /** * Specify if overflow displays ellipsis * @default false */ ellipse?: boolean; /** * Specify content to display before input */ contentBefore?: React.ReactNode; /** * Specify content to display after input */ contentAfter?: React.ReactNode; /** * Specify the theme of the TextField. By default it inherits the theme from the parent */ theme?: ThemeTypes; /** * Specify form validation rules for TextField */ validationRules?: Array; } export declare const TextField: React.ForwardRefExoticComponent & React.RefAttributes>; export default TextField;