import { type HTMLAttributes } from 'react';
import { type VariantProps } from 'class-variance-authority';
declare const fieldVariants: (props?: ({
orientation?: "vertical" | "horizontal" | null | undefined;
disabled?: boolean | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
type RequiredIndicator = {
required?: boolean;
optional?: never;
} | {
required?: never;
optional?: boolean;
};
interface BaseFormFieldProps extends Omit, 'children'>, Omit, 'disabled'> {
label: string;
/**
* Rendered at the inline START of the label line, `--spacing-xs` before
* the text — a status chip or a marker, never a control. Part of the
* label, so its text joins the field's accessible name ("Highlighted,
* Allergies"). Use it when the mark qualifies the question itself; a
* reader should not have to cross the line to learn what it refers to.
*/
labelStart?: React.ReactNode;
/**
* Rendered at the inline end of the label line — a status chip or a
* marker, never a control. Part of the label, so its text joins the
* field's accessible name ("Allergies, Highlighted").
*/
labelEnd?: React.ReactNode;
description?: string;
error?: string;
/**
* Read the error out the moment it appears (`role="alert"`). Default
* true: right for a field checked on its own, as the user leaves it.
* Pass false while an `ErrorSummary` lists this field's error: the
* summary takes focus and reads every problem once, so the fields stay
* quiet instead of each interrupting at the same time. The message is
* still tied to the control, so it is read when the control has focus.
*/
announceError?: boolean;
/**
* Shown on its own line directly under the error, only while there is an
* error: the way forward from it, such as a "Sign in" link. Not part of
* the announced message. Keep it to links or buttons.
*/
errorAction?: React.ReactNode;
disabled?: boolean;
children: React.ReactNode;
}
export type FormFieldProps = BaseFormFieldProps & RequiredIndicator;
export declare const FormField: import("react").ForwardRefExoticComponent>;
export {};
//# sourceMappingURL=form-field.d.ts.map