feat(autocomplete): migrate Autocomplete with popover-owned filtering

Port the fixed-baseline Autocomplete onto the B02a collection protocol. The
trigger is the single Tab entry; opening moves focus to the search box inside the
popover, which owns filtering, aria-activedescendant and keyboard navigation
while the list only tracks an active row.

- Seven parts: root (field, value/open models, form value, owner wiring),
  trigger (anchor + activation), value (scoped slot with selectedItems and
  selectedText instead of copied item subtrees), indicator, clear button,
  popover (measured trigger width), filter (owns the search text and composes the
  inner SearchFieldInput into the combobox control).
- Filter exposes input-value/update:inputValue/inputChange, matching ComboBox.
- Confirming the active row in multiple mode now toggles it instead of replacing
  the accepted set (ComboBox shared the same bug).
- ComboBox shows the accepted label on the first render via a display value that
  falls back to the selected record, so preselected fields are readable before
  the selection watcher runs (including SSR).
- Popovers measure the anchor with a ResizeObserver because Reka does not publish
  the anchor size; the caller's root class is merged again so the trigger fills
  the field width.
- 24 baseline previews, Chinese doc page, navigation, 17 behaviour tests, 5
  demo/document contracts and an independent tarball consumption script for both
  pickers.

Not included: the full bundler/NodeNext type matrix (B02d).
This commit is contained in:
maoyingjie
2026-10-25 17:20:17 +08:00
parent 46e4df7e85
commit 5e688680e9
53 changed files with 5730 additions and 11 deletions
+4
View File
@@ -212,3 +212,7 @@ CSS/tv 仅加 `hv-` 前缀与 Vue 状态适配,保留 Apache-2.0 来源。TagR
## B02b ComboBox(2026-10-25)
固定 ce90ea3 的 `packages/react/src/components/combo-box/combo-box.tsx`、`packages/styles/components/combo-box.css`、`packages/styles/src/components/combo-box/combo-box.styles.ts`、中文 `(pickers)/combo-box.mdx` 与 `demos/cn/combo-box` 24 例。CSS/tv 仅加 `hv-` 前缀;默认 chevron 沿用基线 `icons.tsx` 路径。Vue 侧用选择/字段/弹层既有设施组合,未移植 RAC 的 `createCollectionSlot`(`InputGroup` 直接渲染容器并组合调用方的 `Input`),关闭态元数据由本批 `combo-box/metadata.ts` 从插槽树规划。示例的异步源、加载更多控件与 `alert` 适配已在报告 11.2 逐项记录,未运行时依赖相邻 React 仓库。
## B02c Autocomplete(2026-10-25)
固定 ce90ea3 的 `packages/react/src/components/autocomplete/autocomplete.tsx`、`packages/styles/components/autocomplete.css`、`packages/styles/src/components/autocomplete/autocomplete.styles.ts`、中文 `(pickers)/autocomplete.mdx` 与 `demos/cn/autocomplete` 24 例。CSS/tv 仅加 `hv-` 前缀;默认 chevron 与清除图标沿用基线 `icons.tsx` 路径。Vue 侧把 `SearchFieldInput` 组合成弹层内的 combobox 控件;弹层宽度用本批 `useTriggerWidth`(ResizeObserver)实测,不依赖 Reka 未启用的 size 中间件;未移植 RAC 的 `useFilter`(默认谓词等价)与 `Virtualizer`(用 ListBox 的 items/virtualized)。示例的本地异步源、Value 作用域插槽与虚拟化适配已在报告 12.2 逐项记录,不运行时依赖相邻仓库。