feat(combo-box): migrate ComboBox with input-owned focus and filtering

Port the fixed-baseline ComboBox onto the B02a collection protocol: the input
keeps real DOM focus, the list only tracks an active row, and filtering reuses
the owner filter instead of a second collection kernel.

- Five parts: root (field text control, value/input/open models, form value,
  owner wiring), InputGroup (composes the caller's Input into the combobox
  control and anchors the popover), Trigger, Value, Popover.
- Closed-state metadata is planned from the slot tree, so filtering, the initial
  value label and form-value="text" work before the list has mounted.
- Selection text syncs on selection changes only, so allows-custom-value typing
  is not overwritten; read-only and disabled are injected onto the composed
  input because it reads the text-field protocol, not the field context.
- 24 baseline previews, the Chinese doc page, navigation, 19 behaviour tests and
  6 demo/document contracts. Async demo uses a local async source with abort,
  loading and incremental append (documented adaptations).

Not included: independent tarball consumption (B02d).
This commit is contained in:
maoyingjie
2026-10-25 16:59:16 +08:00
parent ff486fb665
commit 46e4df7e85
46 changed files with 4322 additions and 2 deletions
+4
View File
@@ -208,3 +208,7 @@ M18–M20 的标签桥接在 Vue 使用 indicator 注册表与 SSR 直接/原生
固定 HeroUI 3.2.6 / `ce90ea3ab49d58f6c428f71bfd6fe8ae2a87b960`:`packages/react/src/components/{tag,tag-group,error-message}`、`packages/styles/components/{tag,tag-group,error-message}.css`、`packages/styles/src/components/{tag,tag-group,error-message}/*.styles.ts`,中文 `(collections)/tag-group.mdx`、`(forms)/error-message.mdx` 与 `demos/cn/tag-group` 12 例、`demos/cn/error-message` 2 例。Tag 无独立文档页,按固定 tag-group 正文与示例迁移。
CSS/tv 仅加 `hv-` 前缀与 Vue 状态适配,保留 Apache-2.0 来源。TagRemoveButton 复用本库 CloseButton 与基线 CloseIcon,可访问名称为 `Remove tag {标签文本}`(固定基线测试的同一字符串)。上游 `TagGroup.List` / `Tag.RemoveButton` 在本库为具名导出 `TagGroupList` / `TagRemoveButton`;React `render` 函数对应 `as` / `as-child`;`useListData` 演示改为 Vue 响应式数组。RAC 的 `FieldSlotsGate`/`TextContext` 只在集合渲染时需要,Vue 端改用字段上下文与渲染期 id 规划,不移植该 gate。无新增依赖,未运行时依赖相邻 React 仓库。
## 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 仓库。