## autocomplete (`poetry_autocomplete`)

An input that suggests options as you type - the text itself is the value.

Class: Poetry::Ui::Autocomplete::Component - BEM block `poetry-ui-autocomplete`.
- `empty_text:` (string) - default "No results." - The no-matches message; hidden while anything matches.
- `id:` (string) - Stable DOM id token for the root and list ids.
- `label:` (string) - The accessible name (or wire aria-labelledby via html attrs).
- `name:` (string) - required - The form param key; the input's text submits under it as-is.
- `open:` (boolean) - default false - Server-renders the suggestion popup open.
- `open_on_focus:` (boolean) - default true - Opens the suggestions on focus; false waits for typing.
- `placeholder:` (string) - Placeholder text shown while the input is empty.
- `value:` (string) - The initial input text.
- PART `autocomplete` - Root wrapper carrying the controller + popper pair
- PART `autocomplete-input` - The REAL text input - role=combobox with aria-expanded tracking the popup, the form value itself
- PART `autocomplete-content` - The popper-positioned popup shell | states: data-open (popup visible); data-closed (popup hidden (the server-rendered default)); data-empty (no item matches the query - the empty state shows)
- PART `autocomplete-list` - role=listbox holding the options
- PART `autocomplete-item` - One suggestion - role=option; commit writes its label (or value:) into the input | states: data-label (always - what filtering matches and commit writes); data-value (value: given - overrides the committed text); data-highlighted (the keyboard/pointer highlight); data-disabled (disabled: - skipped by filtering and commit)
- PART `autocomplete-empty` - The no-matches message (hidden while anything matches)
- WIRING root: `poetry--core--autocomplete` registers; values open_on_focus (if) | `poetry--core--popper` registers
- WIRING input: `poetry--core--autocomplete` actions input on input, focus on focus, blurred on focusout, keydown on keydown; targets input | `poetry--core--popper` targets anchor
- WIRING content: `poetry--core--autocomplete` targets content | `poetry--core--popper` targets content
- WIRING list: `poetry--core--autocomplete` targets list
- WIRING empty: `poetry--core--autocomplete` targets empty
- WIRING item: `poetry--core--autocomplete` actions itemPress on pointerdown, itemEnter on pointerenter
- RULE: The input IS the value: name: is the param key and free text submits as-is - suggestions are conveniences, not constraints (constrained pick = Combobox).
- RULE: Items via with_item(label:) - label is what filtering matches and what commit writes; value: overrides the committed text when it differs from the label.
- RULE: empty_text: renders the no-matches state (hidden while anything matches).
- RULE: open_on_focus: false waits for typing before suggesting.
- RULE: Server-side filtering stays yours: render fewer items on re-render - the client filter only narrows what the server sent.
