// Label + hint + error, wired for a11y. Field owns the ids and hands them to the // control through a render prop, so `aria-describedby` and `aria-invalid` can // never drift out of sync with what is actually rendered. import type { JSX } from 'solid-js'; import { useId } from '../a11y'; import { cx } from '../cx'; import { UI_KEYS } from '../i18n-keys'; import { useUi } from '../theme/context'; import styles from './Field.module.scss'; /** Spread straight onto Input/Textarea/Select/Checkbox. */ export interface FieldControl { readonly id: string; readonly 'aria-describedby': string | undefined; readonly 'aria-invalid': boolean; readonly required: boolean; } export interface FieldProps { /** Already-translated label. Rendered as a real