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
+29
View File
@@ -929,3 +929,32 @@ export type {
DropdownSubmenuIndicatorProps,
DropdownSubmenuTriggerProps,
} from "./types-menu";
export { default as Tag } from "./components/tag/Tag.vue";
export { default as TagGroup } from "./components/tag/TagGroup.vue";
export { default as TagGroupList } from "./components/tag/TagGroupList.vue";
export { default as TagRemoveButton } from "./components/tag/TagRemoveButton.vue";
export type {
TagProps,
TagGroupProps,
TagGroupListProps,
TagRemoveButtonProps,
} from "./types";
export type {
TagKey,
TagGroupDataItem,
TagRenderState,
TagGroupOptions,
} from "./components/tag/context";
export { default as ErrorMessage } from "./components/error-message/ErrorMessage.vue";
export type { ErrorMessageProps } from "./types";
export {
tagVariants,
tagGroupVariants,
errorMessageVariants,
type TagVariants,
type TagGroupVariants,
type ErrorMessageVariants,
} from "@heroui-vue/styles";