feat: migrate Toolbar with teleport-safe focus ownership

This commit is contained in:
maoyingjie
2026-10-23 10:50:42 +08:00
parent 9c93647ad2
commit b2525bb04d
33 changed files with 2168 additions and 30 deletions
+8 -1
View File
@@ -3,7 +3,7 @@
- 项目:https://github.com/heroui-inc/heroui
- 基线版本:3.2.6
- 提交:ce90ea3ab49d58f6c428f71bfd6fe8ae2a87b960
- 本次更新:2026-10-24
- 本次更新:2026-10-25
## 已移植
@@ -35,6 +35,13 @@
- docs 引用的 26 个 ComponentPreview 示例由新项目 SFC 实现;图标改用 Tabler 官方 Vue 组件(原 gravity-ui:heart 等)。
- React Aria ToggleButtonGroup 的 toolbar/radiogroup 语义由 Vue 自实现选择内核对齐;Reka ToggleGroup 固定 role=group 且无 disallowEmptySelection,故未直接采用。
## M29 Toolbar
- packages/styles/components/toolbar.css 与 toolbarVariants:移植基线,类名 hv- 前缀;内部 `.button-group`/`.separator--*` 映射为 hv- 类。
- packages/react/src/components/toolbar/toolbar.tsx:isAttached/orientation,向 ToggleButtonGroup 提供 orientation、向 Separator 提供垂直方向。
- apps/docs/content/docs/cn/react/components/(layout)/toolbar.mdx 与 5 个 cn/toolbar 示例(basic/vertical/attached/with-button-group/custom-styles)。
- RAC Toolbar + Collection 焦点模型改为 Vue 本地 roving(与 M26–M28 单 Tab 入口一致);未使用 Reka ToolbarRoot 的 RovingFocusItem Collection,因 HeroUI 组合的是普通 Button/ToggleButton 而非 ToolbarButton。
## 本批文档适配
- Card 的头像改用本库 Avatar/AvatarImage/AvatarFallback(内部为 Reka Avatar);图片沿用上游 CDN URL,不复制媒体文件。关闭按钮改用本库 CloseButton(默认基线 CloseIcon)。