import { j as WalkedField } from "../types-BBQaEPfE.mjs"; import { t as AllConstraints } from "../renderer-ab9E52Bp.mjs"; //#region src/solid/a11y.d.ts /** * Build the ARIA attribute bundle for a renderer. * * - `aria-required="true"` whenever the field is non-optional. * - `aria-describedby=` whenever a constraint hint applies. * - `aria-label=` when a non-empty description is supplied. * * Pass `inputId` + `constraints` only when the renderer emits a * constraint-hint sibling; the helper then auto-derives the * `aria-describedby` value from `hintIdFor(inputId)`. Omitting either * argument skips the attribute. */ declare function buildAriaAttrs(tree: WalkedField, description?: unknown, inputId?: string, constraints?: AllConstraints): Record; /** * Description for a constraint hint emitted alongside an input. * * Returned by {@link constraintHint} when the field carries one or * more constraint keywords the user should be told about (min/max, * pattern, item count, …). Theme adapters render this as a `` * element wired to the input via `aria-describedby`. */ interface Hint { /** DOM id matching {@link hintIdFor}(inputId) on the host input. */ readonly id: string; /** Human-readable hint text. */ readonly text: string; } /** * Derive the constraint-hint descriptor for a field at `inputId`. * Returns `undefined` when the field has no constraint worth * announcing — callers skip rendering the `` element entirely * rather than emitting an empty node. */ declare function constraintHint(inputId: string, constraints: AllConstraints): Hint | undefined; /** * True when the supplied field is non-optional and therefore deserves * a visual required indicator alongside its label. */ declare function isFieldRequired(tree: WalkedField): boolean; /** * Narrow `meta.description` (typed `unknown`) to a string value safe to * pass into JSX `aria-label`. Returns `undefined` for non-string or * empty-string descriptions so Solid drops the attribute rather than * stringifying e.g. `{}` to `"[object Object]"`. */ declare function ariaLabel(description: unknown): string | undefined; /** * Structured constraint-hint data for the Solid renderers. Identical * shape to `react/a11y.ts` `HintInfo` — the input takes the * `ariaDescribedBy` id, the renderer emits a sibling `` * whose text is `hint`. Returns `undefined` when the field has no * advertise-able constraints. */ interface HintInfo { readonly id: string; readonly hint: string; readonly ariaDescribedBy: string; } /** * Build {@link HintInfo} for a field at `inputId` given its declared * constraints. Returns `undefined` when no constraint message would be * produced. */ declare function buildHintInfo(inputId: string, constraints: AllConstraints): HintInfo | undefined; //#endregion export { Hint, HintInfo, ariaLabel, buildAriaAttrs, buildHintInfo, constraintHint, isFieldRequired };