import type { JSX } from "@solidjs/web"; import { type FieldValidityData, type FieldValidityState as FieldValidityStateRaw } from "../../internals/field-context.js"; /** * Snapshot passed to ``'s function child. Mirrors React's * `FieldValidity.State` shape — the `state` slot (inside * `FieldValidityData`) is re-exposed as `validity` for API clarity. */ export interface FieldValidityState extends Omit { /** The raw validity state (`ValidityState`-shaped). */ validity: FieldValidityStateRaw; } export interface FieldValidityProps { /** * Function child that receives the current validity snapshot. Must be a * function — `` exists specifically to expose the snapshot * for consumer-rendered UI. * * ```tsx * * {(validity) => validity.validity.valueMissing * ? Required * : null} * * ``` */ children: (state: FieldValidityState) => JSX.Element; } /** * Renders nothing by itself — passes the current validity snapshot to its * function child. Mirrors Base UI React's ``. * * Solid 2 note: the snapshot is recomputed inside a `createMemo` so the * function child re-evaluates only when the validity or external `invalid` * flag actually changes. */ export declare function FieldValidity(props: FieldValidityProps): JSX.Element; //# sourceMappingURL=field-validity.d.ts.map