docs: close documentation facts, structure and related-component mapping

HD-04 scope, against heroui ce90ea3 cn sources:

- stale/fictional content: input.md no longer claims TextField is
  unmigrated; color-field.md no longer claims ColorPicker is private;
  header.md drops the fictional Header.Root subcomponent and the stale
  'menus not migrated' wording (MenuSection label registration is now
  documented from HeaderRoot source); radio-group.md drops three copied
  CheckboxGroup wordings (variant override is Radio's, scalar emits,
  native single-value submit); input-otp.md drops the fictional
  data-complete state and lists the real missing upstream props
- toggle-button disabled row now matches the real CSS hooks
  (:disabled / [aria-disabled], with data-disabled as a marker only)
- part API / CSS classes / interactive states restored per pinned
  sources: button (full class lists + real variable-based global CSS),
  accordion (per-part tables + variant/state lists), card (per-part
  tables + variant list), switch (SwitchGroup snippet + Switch/
  SwitchGroup class lists + states), color-field Group (class list +
  states), input-otp (variant notes, global CSS, class/state lists);
  input-group gains the two upstream usage chapters
- RelatedComponents restored from the pinned componentRelationships
  (first-3, filtered against componentsMap): 64 pages rewritten,
  list-box/slider sections added, 7 empty-mapping pages' fabricated
  entries removed; RelatedShowcases left unmigrated with its real data
  inventory recorded (2 cases, showcase-site cards)
- defaults unified on implementation evidence: granularity (inferred
  day/minute) and visibleYears (full min-max span, no "or 20" fallback);
  HD-03 hand-offs resolved (trigger focus-visible noted for HD-06,
  width guards kept)
- new demos: header-collection-grouping (MenuSection/ListBoxSection
  label wiring), empty-state-collection (collection empty slot);
  empty-state page deduplicated with a boundary compatibility note
- ComponentPreview minHeight/isBgSolid restored per the 30 upstream
  marks; tabs-overflow max-w-full kept after measuring internal scroll
- tests: +3 header registration/demo cases, +1 empty-state collection
  case; full suite 110 files / 1630 tests, typecheck and build:docs
  pass
This commit is contained in:
maoyingjie
2026-10-28 22:32:10 +08:00
parent 2c6d871354
commit 145a208687
76 changed files with 912 additions and 352 deletions
+15 -2
View File
@@ -94,6 +94,13 @@ Card 提供语义变体,描述 prominence 级别而非具体视觉样式,允
| CardContent | `.hv-card__content` | `card-content` | div |
| CardFooter | `.hv-card__footer` | `card-footer` | div |
#### 变体类 [!toc]
- `.hv-card--transparent` - 透明背景、无边框与无阴影(遮罩层与自定义背景场景)
- `.hv-card--default` - 默认表面(`bg-surface`)
- `.hv-card--secondary` - 次级表面(`bg-surface-secondary`)
- `.hv-card--tertiary` - 三级表面(`bg-surface-tertiary`)
## API 参考
### Card
@@ -106,7 +113,13 @@ Card 提供语义变体,描述 prominence 级别而非具体视觉样式,允
### CardHeader / CardTitle / CardDescription / CardContent / CardFooter
各部件支持 `as`、默认插槽和原生属性。默认标签见上表。Vue 使用独立命名导出替代 `Card.Header` 等 React 部件访问方式。
| 属性 | 类型 | 默认值 | 描述 |
| -------- | --------------------------- | ---------------- | ------------------------------------------ |
| `as` | `string` | 见上表默认元素列 | 渲染的 HTML 元素 |
| `class` | `string \| Array \| Object` | — | 额外的 CSS 类,合并到部件根元素 |
| 默认插槽 | - | - | 部件内容;`$attrs`(ARIA、事件)透传根元素 |
各部件无业务状态或事件;类名与 `data-slot` 见样式参考表。Vue 使用独立命名导出替代 `Card.Header` 等 React 部件访问方式。
## 无障碍
@@ -118,4 +131,4 @@ Card 提供语义变体,描述 prominence 级别而非具体视觉样式,允
## 相关组件
[Button 按钮](./button) · [Input 输入框](./input)
[Surface 表面](./surface) · [Avatar 头像](./avatar) · [Form 表单](./form)