import { TPAComponentProps } from '../../types'; import { Placement } from '../internal/WixUiCoreComponents/components/CorePopover'; import { ErrorProps } from '../ErrorMessageWrapper'; import { CoreInputProps } from '../internal/WixUiCoreComponents/components/CoreInput'; import { ErrorMessageWrapperProps } from '../internal/ErrorMessageWrapper'; export declare enum TextFieldTheme { Line = "line", Box = "box" } export declare enum TextFieldLabelStyle { Regular = "regular", Floating = "floating" } export interface TPATextFieldProps extends TPAComponentProps { /** the error message to display */ errorMessage?: string; /** Appearance of error message. TextOnly | BackgroundAndBorder */ errorAppearance?: ErrorMessageWrapperProps['errorAppearance']; /** error tooltip max width */ errorTooltipMaxWidth?: number; /** Placement for Popover. Optional. */ errorTooltipPlacement?: Placement; /** possible values: 'line', 'box' */ theme?: TextFieldTheme; /** apply success state */ success?: boolean; /** should display success icon */ successIcon?: boolean; /** Specifies whether to apply the new design and behavior of error messages */ newErrorMessage?: boolean; /** apply error state*/ error?: boolean; /** should display clear button */ withClearButton?: boolean; /** callback for when the clear button is clicked */ onClear?(): void; /** Defines a string value that labels the clear button element. Optional. */ clearButtonAriaLabel?: string; /** Identifies the element that labels the clear button element. Optional. */ clearButtonAriaLabelledby?: string; /** a label that appears on top of the input. Optional. */ label?: string; /** specifies whether label will be default (on top of the input) or floating (inside of the input). Optional. */ labelStyle?: TextFieldLabelStyle; /** Limits the number of characters that could be written. Optional. */ maxLength?: number; /** Whether to display the character count. In order to show the charCount you must pass the maxLength prop. Optional. */ showCharCount?: boolean; /** When set to true, a placeholder would be placed when a label is not provided, to preserve a constant height. */ forceLabel?: boolean; /** a label describing the prefix for screen readers */ prefixLabel?: string; /** a text describing the input requirements */ helperText?: string; /** @deprecated use readOnlyCustom instead */ readOnly?: boolean; /** apply readonly state with color wiring and style*/ readOnlyCustom?: boolean; } export interface TextFieldDefaultProps { success: boolean; successIcon: boolean; error: boolean; withClearButton: boolean; disabled: boolean; theme: TextFieldTheme; errorTooltipPlacement: Placement; forceLabel: boolean; labelStyle: TextFieldLabelStyle; } export type PasswordVisibility = 'hidden' | 'visible'; interface PasswordVisibilityProps { visible?: boolean; showPasswordTooltipText?: string; hidePasswordTooltipText?: string; onPasswordVisibilityChange?: (state: PasswordVisibility) => void; } interface ClearButtonProps { clearButtonTooltipText?: string; } export type TextFieldProps = ErrorProps & PasswordVisibilityProps & ClearButtonProps & TPATextFieldProps & CoreInputProps; export interface TextFieldState { isErrorTooltipShown: boolean; isPasswordVisible: boolean; isFocused: boolean; } export {}; //# sourceMappingURL=types.d.ts.map