import { BaseInputProps } from "../BaseInput/BaseInput"; import { FormGroupProps } from "../FormGroup/FormGroup"; type FormGroupExposedProps = Pick; export interface EmailFieldProps extends FormGroupExposedProps, BaseInputProps { /** * If a value is set, the field is rendered in its invalid state. */ errorMessage?: string; } /** * The `` component is used to enter and validate email addresses. * It automatically validates the format on blur and displays appropriate error messages. * * ### When to use * - Collecting user email addresses in forms * - Contact forms that require email validation * - Any input that must be a valid email format * * ### When not to use * - For general text input - use `TextField` instead * - For URLs - use `UrlField` instead * - For phone numbers - use `PhoneField` instead * * @example Basic usage * ```tsx * import { EmailField } from "@trackunit/react-form-components"; * * const [email, setEmail] = useState(""); * * setEmail(e.target.value)} * required * /> * ``` * @example With help text * ```tsx * import { EmailField } from "@trackunit/react-form-components"; * * * ``` * @example With custom error message * ```tsx * import { EmailField } from "@trackunit/react-form-components"; * * setEmail(e.target.value)} * errorMessage={isEmailTaken ? "This email is already registered" : undefined} * /> * ``` */ export declare const EmailField: { ({ label, id, tip, helpText, errorMessage, helpAddon, className, defaultValue, "data-testid": dataTestId, value, onChange, onBlur, isInvalid, ref, required, ...rest }: EmailFieldProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export {};