feat: migrate Tag, TagGroup and ErrorMessage with collection and focus contracts

Port the fixed HeroUI baseline tag/tag-group/error-message components onto the
existing collection selection/registry protocols instead of a second state model.

- TagGroup owns selection, disabled scope, removal requests and name/description
  wiring; TagGroupList renders the role=grid node and Tag renders role=row.
- Removal has one path: a press inside the remove subtree is a removal request,
  so custom remove buttons work without a second event source; focus follows the
  next neighbour only after the item is actually gone.
- ErrorMessage keeps the baseline slot marker and reuses the field part ids
  without gaining validation or aria-invalid semantics.
- Ship the 12 tag-group and 2 error-message previews, both doc pages, navigation,
  a 35-case behavioural suite and independent tarball consumption checks.
This commit is contained in:
maoyingjie
2026-10-25 10:45:43 +08:00
parent 3532cc6aad
commit af6bfda3ee
40 changed files with 3790 additions and 4 deletions
+6
View File
@@ -202,3 +202,9 @@ M18–M20 的标签桥接在 Vue 使用 indicator 注册表与 SSR 直接/原生
## B01 Menu / Dropdown(2026-10-24)
固定 ce90ea3 的 `packages/react/src/components/{menu,menu-item,menu-section,dropdown}`、`packages/styles/components/{menu,menu-item,menu-section,dropdown}.css` 与对应 tv,中文 `(collections)/dropdown.mdx` 及 `demos/cn/dropdown` 17 例。样式加 hv- 前缀;演示图标采用 Tabler Vue。Menu/Item/Section 无独立 Web 文档页(native menu.mdx 属 heroui-native,不作为本契约)。底座为安装版 Reka 2.11 DropdownMenu,未复制 React 源码构建。
## B03 Tag / TagGroup / ErrorMessage(2026-10-25)
固定 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 仓库。