Files
heroui-vue/docs/upstream.md
T
2026-10-21 13:04:06 +08:00

36 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 上游基线与移植来源
- 项目:https://github.com/heroui-inc/heroui
- 基线版本:3.2.6
- 提交:ce90ea3ab49d58f6c428f71bfd6fe8ae2a87b960
- 本次更新:2026-10-21
## 已移植
- packages/styles/components/{button,close-button,card,input,textarea,switch,switch-group,label,description,surface,link,spinner}.css:只将组件类名加 hv- 前缀;Vue 状态适配集中在样式入口和组件层。
- packages/styles/themes/default/variables.css、themes/shared/theme.css:主题变量、OKLCH 颜色、派生公式和圆角尺寸。
- packages/styles/utilities、variants:焦点、禁用、减少动画等构建规则。
- packages/styles/src/components/{button,card,input,textarea,switch,surface,link,spinner}/*.styles.ts:变体与类名映射,增加命名空间。
- apps/docs/content/docs/cn/react/components 下 Button/Card/Input/Switch/Surface/Link/Spinner 的标题、说明、示例顺序和 API 描述;React 特有部分转换为 Vue 用法。
- apps/docs/src/demos/cn 下 Button/Card/Input/Switch/Surface/Link/Spinner 文档引用的基线示例文案与布局;文档由新项目 SFC 实现。
- packages/react/src/components/icons.tsx 的 ExternalLinkIcon:LinkIcon 默认外部箭头图标。
- packages/react/src/components/spinner/spinner.tsx 的 SpinnerPrimitive SVG(渐变路径)。
- apps/docs/public/fonts/Inter-{Regular,Medium,Bold}.ttf:文档字体资源。
## 来源声明
上游清单标注 MIT,但本地根 LICENSE 实际为 Apache-2.0(含 Copyright 2025 NextUI Inc.)。本项目保留原始全文于 third-party/HEROUI-LICENSE,样式包也携带 LICENSE;不能继续沿用早期文档中未经核对的 MIT 结论。移植文件保留来源并标注命名空间与 Vue 适配修改。
构建与运行不依赖相邻 React 仓库。完整源样式移植记录以本文件及源码顶部声明为准。
## 本批文档适配
- Card 的头像使用已安装 Reka Avatar 的加载和 fallback 机制;图片沿用上游 CDN URL,不复制媒体文件。关闭按钮使用原生 button、closeButtonVariants 与基线 CloseButton CSS 组合;Vue CloseButton 组件尚未实现。
- Card 链接使用本库 Link + LinkIcon(默认基线图标);关闭按钮仍为原生组合。
- Card 表单使用原生 form/label 与 Input 组合,提交仅展示本地反馈,不实现登录与密码找回服务。忘记密码链接使用 Link 与本地反馈。
- SwitchGroup 的方向布局 CSS 来自同一基线。Switch 的 native/ARIA 校验、表单 checkbox、reset、属性与事件透传由 Vue 状态层实现;FieldError 暂仅接入 Switch。
- Surface 搭配表单示例使用 Input 与 TextArea 的 secondary 变体;TextArea 为本批为演示移植的最小实现。
- Link 自定义图标示例将上游 `@gravity-ui/icons` 的 ArrowUpRightFromSquare / Link 替换为 Tabler `IconExternalLink` / `IconLink`(MIT),与项目图标约定一致。
- Spinner 内部 SVG 来自基线 SpinnerPrimitive,不属于演示图标;Button 加载示例改用 Spinner(`color="current" size="sm"`),与上游 CN loading 示例一致。
- 图标统一使用 @tabler/icons-vue(MIT)的官方组件,未移植 React 图标依赖;尚未完成自动逐像素对比。