import type { ComponentPropsWithRef, ReactElement, ReactNode, Ref } from "react";
import type { SlotProps } from "../slotProps.ts";
/**
* Everything else a caller writes on a `Field` reaches **the control
* it clones onto**, not the `
` around it.
*
* That is not a new destination, it is the existing one finally
* declared. `SlotProps` was a *closed* five-key type over a runtime
* that already spread `...receivedSlotProps` into the clone, so
* `name`, `placeholder`, `autoFocus`, `onBlur` and every `aria-*` all
* arrived at the `` and none of them type-checked. The only
* prop a consumer could legally pass was `className` — which is the
* one escape hatch the fleet's "configured by props, not a borrowed
* class" rule is trying to close, so the closed type forced the very
* thing the rule forbids
* ([decision](../../../../docs/decisions/2026-08-21-a-slot-components-rest-props-are-the-controls-props.md)).
*
* `className` stays on the `
`, alone, because a class is a
* statement about the box a **parent** lays out
* ([decision](../../../../docs/decisions/2026-08-19-classname-is-the-outermost-box-a-component-renders.md)).
* Every other prop is a statement about the control, and `id` is the
* proof: it has named the control since the component shipped, and a
* dated record settles its precedence
* ([decision](../../../../docs/decisions/2026-08-05-field-adopts-the-childs-own-id.md)).
* Routing the rest to the `
` would have moved it, silently, in
* every consumer.
*
* `"input"` because `SlotProps` already picks from
* `InputHTMLAttributes` and this is the same set widened, not a
* second opinion about what a control is. `ref` is re-declared over
* `HTMLElement`: the child may be a `Picker`'s `