import * as LabelPrimitive from "@radix-ui/react-label";
import type { ComponentPropsWithoutRef, HTMLAttributes } from "react";
/**
* FormField — composition wrapper for accessible form rows.
*
* Provides context with a generated `id`, so children (Label, Input, Hint,
* Error) wire themselves via `htmlFor` / `id` / `aria-describedby` without
* the consumer having to thread IDs manually.
*
* Composition:
*
* Email
*
*
*
* We never share your email.
* {error}
*
*
* Errors take precedence over hints (only one of them shows at once).
*/
type FormFieldSize = "sm" | "md" | "lg";
interface FormFieldProps extends HTMLAttributes {
/** Optional explicit id override. */
id?: string;
/** Marks the field as invalid; switches Hint → Error and toggles aria. */
invalid?: boolean;
/**
* Size scale propagated to Label / Hint / Error subparts via Context.
* Default `md` preserves prior behavior. Subparts do NOT accept a `size`
* prop of their own — use `className` for granular tweaks (EC-8).
*/
size?: FormFieldSize;
}
interface FormFieldLabelProps extends ComponentPropsWithoutRef {
required?: boolean;
}
declare const FormField: import("react").ForwardRefExoticComponent> & {
Label: import("react").ForwardRefExoticComponent>;
Control: import("react").ForwardRefExoticComponent & import("react").RefAttributes>;
Hint: import("react").ForwardRefExoticComponent & import("react").RefAttributes>;
Error: import("react").ForwardRefExoticComponent & import("react").RefAttributes>;
};
export { FormField };