UNPKG

@payfit/unity-components

Version:

26 lines (25 loc) 1.14 kB
import { InputProps as AriaInputProps } from 'react-aria-components/Input'; export interface PasswordInputProps extends Omit<AriaInputProps, 'type' | 'style' | 'className'> { /** Whether the field is required */ isRequired?: boolean; /** Whether the field is in an invalid state */ isInvalid?: boolean; /** Whether the field is in a loading state */ isLoading?: boolean; /** Whether the field is disabled */ isDisabled?: boolean; /** Whether the field is read-only */ isReadOnly?: boolean; /** Whether to show the caps lock warning (default: true) */ showCapsLockWarning?: boolean; /** Autocomplete hint for password managers */ autoComplete?: 'new-password' | 'current-password'; /** Clear button press handler */ onClearButtonPress?: () => void; } /** * PasswordInput component with visibility toggle and caps lock detection * Based on the Unity Input component but specialized for password fields */ declare const PasswordInput: import('react').ForwardRefExoticComponent<PasswordInputProps & import('react').RefAttributes<HTMLInputElement>>; export { PasswordInput };