feat: add CloseButton Avatar and Skeleton components
This commit is contained in:
+11
-7
@@ -7,15 +7,16 @@
|
||||
|
||||
## 已移植
|
||||
|
||||
- packages/styles/components/{button,close-button,card,input,textarea,switch,switch-group,label,description,surface,link,spinner}.css:只将组件类名加 hv- 前缀;Vue 状态适配集中在样式入口和组件层。
|
||||
- packages/styles/components/{button,close-button,card,input,textarea,switch,switch-group,label,description,surface,link,spinner,avatar,avatar-group,skeleton}.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/styles/src/components/{button,card,input,textarea,switch,surface,link,spinner,close-button,avatar,avatar-group,skeleton}/*.styles.ts:变体与类名映射,增加命名空间。
|
||||
- apps/docs/content/docs/cn/react/components 下 Button/Card/Input/Switch/Surface/Link/Spinner/CloseButton/Avatar/AvatarGroup/Skeleton 的标题、说明、示例顺序和 API 描述;React 特有部分转换为 Vue 用法。
|
||||
- apps/docs/src/demos/cn 下 Button/Card/Input/Switch/Surface/Link/Spinner/CloseButton/Avatar/AvatarGroup/Skeleton 文档引用的基线示例文案与布局;文档由新项目 SFC 实现。
|
||||
- packages/react/src/components/icons.tsx 的 ExternalLinkIcon:LinkIcon 默认外部箭头图标;CloseIcon:CloseButton 默认关闭图标。
|
||||
- packages/react/src/components/spinner/spinner.tsx 的 SpinnerPrimitive SVG(渐变路径)。
|
||||
- apps/docs/public/fonts/Inter-{Regular,Medium,Bold}.ttf:文档字体资源。
|
||||
- apps/docs/src/app/global.css 的 `animate-shine` / `shine` 关键帧与 Skeleton 演示用 `shadow-panel`:放在文档 utilities.css,不进入组件包。
|
||||
|
||||
## 来源声明
|
||||
|
||||
@@ -25,11 +26,14 @@
|
||||
|
||||
## 本批文档适配
|
||||
|
||||
- Card 的头像使用已安装 Reka Avatar 的加载和 fallback 机制;图片沿用上游 CDN URL,不复制媒体文件。关闭按钮使用原生 button、closeButtonVariants 与基线 CloseButton CSS 组合;Vue CloseButton 组件尚未实现。
|
||||
- Card 链接使用本库 Link + LinkIcon(默认基线图标);关闭按钮仍为原生组合。
|
||||
- Card 的头像改用本库 Avatar/AvatarImage/AvatarFallback(内部为 Reka Avatar);图片沿用上游 CDN URL,不复制媒体文件。关闭按钮改用本库 CloseButton(默认基线 CloseIcon)。
|
||||
- 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 示例一致。
|
||||
- CloseButton 自定义图标示例将上游 `@gravity-ui/icons` 的 CircleXmark / Xmark 替换为 Tabler `IconCircleX` / `IconX`;默认关闭图标为移植的基线 CloseIcon。
|
||||
- Avatar 回退/变体与 AvatarGroup 自定义样式示例中的 Person 图标替换为 Tabler `IconUser`。Avatar 自定义图片组件示例以本地 FrameworkImage 演示 asChild,对应上游 Next.js Image 组合。Avatar 变体示例中的 Separator 以分隔线 div 适配。
|
||||
- Skeleton 演示沿用上游 `shadow-panel` 与 `animate-shine` 类名,并在文档 utilities.css 中提供对应定义(上游放在 docs global.css)。
|
||||
- 图标统一使用 @tabler/icons-vue(MIT)的官方组件,未移植 React 图标依赖;尚未完成自动逐像素对比。
|
||||
|
||||
Reference in New Issue
Block a user