import "./field_annotations.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; /** What a FIELD says about itself under its own value — ONE anatomy for every * field surface in the kit. Always VISIBLE: a fault behind a disclosure is a * fault the reader ships. */ export interface FieldAnnotationProps { /** PERSISTENT guidance — what to enter, or the rule that applies. Muted, never * announced: it is true before the reader touches the field and stays true * after. Same name, same meaning as `FormField.description`. */ description?: string; /** A consequence the reader should WEIGH before acting — amber, announced on * appearance. It does not block: the value is accepted and something * downstream is worse for it. Same name, same meaning as `FormField.warning`. */ warning?: string; /** Field-level FAILURE — danger ink, `FormField`'s alert semantics, announced on appearance. * For CONSUMER-validated state: the `Inline*` editors already render their own transient * save errors, so don't wire both to one failure. */ error?: string; } /** Does this field have anything to say? Hosts ask because an annotated field is a TALLER row, * and the label beside it still has to centre on the CONTROL line rather than on the block. */ export declare function hasFieldAnnotation(props: FieldAnnotationProps): boolean; interface FieldAnnotationsProps extends FieldAnnotationProps, StyleProps { testID?: string; ref?: React.Ref; render?: useRender.RenderProp; /** The value above is FLAT text, not a painted control, so the control's text * inset would be pure indent and the column would drift in and out of * alignment down its own length. */ flat?: boolean; } /** The stack itself, `null` when the field has nothing to say. SEVERITY DESCENDS * FROM THE CONTROL: error first, then warning, then the guidance, and none * suppresses another. */ export declare function FieldAnnotations({ error, warning, description, flat, testID, render, ref, ...props }: FieldAnnotationsProps): React.ReactElement> | null; export {};