diff --git a/.changeset/combobox-multiple-panel-anchor.md b/.changeset/combobox-multiple-panel-anchor.md deleted file mode 100644 index c8e8743..0000000 --- a/.changeset/combobox-multiple-panel-anchor.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -'@code-sherpas/pharos-react': patch ---- - -fix(Combobox): anchor the multi-select popup to the chips control box, not the input - -In a `Combobox multiple`, Base UI resolves the popup anchor as -`inputGroupElement ?? inputElement`. Single-select wraps Base UI's `InputGroup` -(`ComboboxControl`), so the popup anchored to the full-width control. But -multi-select uses `Combobox.Chips` (`ComboboxChips`) as the bordered box, and -`Chips` registers no `inputGroupElement` — so the anchor fell back to the -`Input`, which floats at the end of the chip row. Once several chips pushed the -input toward the right edge, the popup opened **narrow and shifted right** -(anchored at the typing caret) instead of keeping the control width. - -`ComboboxChips` now publishes its DOM node through an internal context that -`ComboboxContent` reads and passes as the `Positioner`'s `anchor`, so the popup -keeps a **constant width = the control** (`width: var(--anchor-width)`), -left-aligned, regardless of where the input sits. Single-select is unchanged: -no chips box means no anchor override, so Base UI keeps anchoring to the -`ComboboxControl` as before. - -No public TypeScript API change. Surfaced in Alexandria's `AddUsers` / -`AddSkills` multi-select pickers. diff --git a/CHANGELOG.md b/CHANGELOG.md index fd9ed07..0c72975 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # @code-sherpas/pharos-react +## 0.14.3 + +### Patch Changes + +- d67e70c: fix(Combobox): anchor the multi-select popup to the chips control box, not the input + + In a `Combobox multiple`, Base UI resolves the popup anchor as + `inputGroupElement ?? inputElement`. Single-select wraps Base UI's `InputGroup` + (`ComboboxControl`), so the popup anchored to the full-width control. But + multi-select uses `Combobox.Chips` (`ComboboxChips`) as the bordered box, and + `Chips` registers no `inputGroupElement` — so the anchor fell back to the + `Input`, which floats at the end of the chip row. Once several chips pushed the + input toward the right edge, the popup opened **narrow and shifted right** + (anchored at the typing caret) instead of keeping the control width. + + `ComboboxChips` now publishes its DOM node through an internal context that + `ComboboxContent` reads and passes as the `Positioner`'s `anchor`, so the popup + keeps a **constant width = the control** (`width: var(--anchor-width)`), + left-aligned, regardless of where the input sits. Single-select is unchanged: + no chips box means no anchor override, so Base UI keeps anchoring to the + `ComboboxControl` as before. + + No public TypeScript API change. Surfaced in Alexandria's `AddUsers` / + `AddSkills` multi-select pickers. + ## 0.14.2 ### Patch Changes diff --git a/package.json b/package.json index cb3bda3..c040c7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@code-sherpas/pharos-react", - "version": "0.14.2", + "version": "0.14.3", "description": "React component library for Code Sherpas. Consumes @code-sherpas/pharos-tokens. Vite library mode + CSS Modules — no Tailwind, no CSS framework required at the consumer.", "license": "MIT", "repository": {