/** * Field: a form-field wrapper that wires a label, description, and error to a * single control for accessibility. `` derives a stable base id with * `React.useId()` and shares it (plus derived description/error ids and the * `invalid` flag) through context, so `` targets the control via * `htmlFor`, `` clones its child with the matching `id` + * `aria-describedby` + `aria-invalid`, and `` / `` * expose the referenced ids. Self-contained; skinned with the veryfront theme * tokens. * * @example * ```tsx * import { Field, FieldLabel, FieldControl, FieldDescription, FieldError } from "veryfront/ui"; * import { Input } from "veryfront/ui"; * * * Email * * Veryfront never shares it. * Enter a valid email. * ; * ``` * * @module react/components/ui/field */ import * as React from "react"; /** Props accepted by ``. */ export interface FieldProps extends React.HTMLAttributes { /** Mark the field invalid: flags the label/control/error via context. @default false */ invalid?: boolean; /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** The field wrapper: derives ids and provides them to its sub-parts. */ export declare function Field({ invalid, className, children, ref, ...props }: FieldProps): React.ReactElement; /** Props accepted by ``. */ export interface FieldLabelProps extends React.LabelHTMLAttributes { /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** The field's label: wired to the control with `htmlFor`. */ export declare function FieldLabel({ className, children, ref, ...props }: FieldLabelProps): React.ReactElement; /** Props accepted by ``. */ export interface FieldControlProps { /** The single form control element to wire: its `id`/`aria-*` are set for you. */ children: React.ReactElement; /** React 19: ref is forwarded onto the cloned child control (not a wrapper node). */ ref?: React.Ref; } /** * Wiring wrapper: renders no node of its own; clones its single child control * with the shared `id`, `aria-describedby` (the description, plus the error id * when invalid), and `aria-invalid`. */ export declare function FieldControl({ children, ref }: FieldControlProps): React.ReactElement; /** Props accepted by ``. */ export interface FieldDescriptionProps extends React.HTMLAttributes { /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** Helper text describing the field: referenced by the control's `aria-describedby`. */ export declare function FieldDescription({ className, children, id, ref, ...props }: FieldDescriptionProps): React.ReactElement; /** Props accepted by ``. */ export interface FieldErrorProps extends React.HTMLAttributes { /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** The field's error message: a live `role="alert"`; renders nothing when empty. */ export declare function FieldError({ className, children, id, ref, ...props }: FieldErrorProps): React.ReactElement | null; //# sourceMappingURL=field.d.ts.map