import { Field as BaseField } from '@base-ui/react/field'; import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset'; import * as React from 'react'; /** * A form field: a label, a control, a hint and an error, wired together. * * **This is the thing Strix was missing.** `Label`, `HelpText` and `Input` all existed, and every * consumer wired `id`, `aria-describedby` and `aria-invalid` between them by hand — which is the * kind of work that is silently skipped, leaving a field whose hint no screen reader reads. * `Field.Root` owns that wiring, and it is Base UI's rather than ours. * * Composes the existing `Label` and `HelpText` class lists rather than restating them, so a field's * label cannot drift from a standalone one. * * @example * * Email * } /> * We never share it. * Enter an email address. * * * @example * // An external validator owns the decision, so `invalid` shows the message. * * Email * } /> * {meta.error} * */ export type FieldProps = React.ComponentPropsWithoutRef; export declare const Field: React.ForwardRefExoticComponent & React.RefAttributes, "ref"> & React.RefAttributes>; export type FieldLabelProps = React.ComponentPropsWithoutRef; /** * The field's label. * * `BaseField.Label` for the wiring, rendering Strix's own {@link Label} for the treatment. Base UI * generates the id pair, so no `htmlFor` is written by hand and none can go stale; `Label` supplies * the type role, so a field's label cannot drift from a standalone one. * * **IT USED TO DRIFT, AND THE DOCBLOCK HERE CLAIMED IT DID NOT.** This applied `labelStyles()` — the * three-class box, not the type — and then wrote its own ramp over the top: * `text-size-body-small font-body-small-medium`, 14px at weight 500. A standalone `Label` is * `body-m-semibold`, 16px at 600, and it also carries `font-sans`, which this dropped entirely, so * the label fell through to inherited family. Two label treatments coexisted on one form and the * mismatch was only visible side by side; the comment asserting they matched is why nobody looked. * * Figma says 16/24 semibold, twice: `.label` (22:3960) and `.input-dropdown` both draw the label * under the composite style `Paragraph/medium-semibold`, which is `font/size/small` 16px over * `font/line-height/small` 24px at `font/weight/Semibold` (CSS 600). `input-dropdown`'s binding * calls "Medium" here an error and corrects it explicitly. * * 14/Medium was not Figma's label at all — it is `Paragraph/small-medium`, which `.input-text` puts * on the **value inside the field**. Dev Mode names that layer `[FieldLabel]`, a bracketed * placeholder for the input's own text, and the name is almost certainly how it got copied onto the * label above the field. Composing `Label` is what stops the next such reading: there is no second * ramp left to write. */ export declare const FieldLabel: React.ForwardRefExoticComponent & React.RefAttributes, "ref"> & React.RefAttributes>; export type FieldControlProps = React.ComponentPropsWithoutRef; /** * The control. * * Renders a bare `` by default and takes `render` for anything else — * `render={}`, `render={