import { FormGroupProps } from "../FormGroup/FormGroup"; import { UrlBaseInputProps } from "./UrlBaseInput/UrlBaseInput"; type FormGroupExposedProps = Pick; export interface UrlFieldProps extends FormGroupExposedProps, UrlBaseInputProps { /** * If a value is set, the field is rendered in its invalid state. */ errorMessage?: string; } /** * The `` component is used to enter and validate URLs/web addresses. * It automatically validates the format on blur and displays appropriate error messages. * * ### When to use * - Collecting website URLs in forms * - Social media profile links * - Any input requiring valid URL format * * ### When not to use * - General text input - use `TextField` instead * - Email addresses - use `EmailField` instead * - Internal application links - use standard link/routing * * @example Basic usage * ```tsx * import { UrlField } from "@trackunit/react-form-components"; * * const [website, setWebsite] = useState(""); * * setWebsite(e.target.value)} * placeholder="https://example.com" * /> * ``` * @example With help text * ```tsx * import { UrlField } from "@trackunit/react-form-components"; * * * ``` * @example With custom validation * ```tsx * import { UrlField } from "@trackunit/react-form-components"; * * setDocUrl(e.target.value)} * errorMessage={!docUrl.includes("docs") ? "URL must point to documentation" : undefined} * /> * ``` */ export declare const UrlField: { ({ label, id, tip, helpText, errorMessage, helpAddon, className, defaultValue, "data-testid": dataTestId, isInvalid, value, onBlur, ref, required, ...rest }: UrlFieldProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export {};