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:
@@ -123,7 +123,7 @@ Avatar 组件使用以下 CSS 类:
|
||||
|
||||
| Prop | 类型 | 默认值 | 描述 |
|
||||
| ------------- | ---------------------------------- | ------- | ------------------------------------------ |
|
||||
| `src` | `string` | - | 可选图片 URL,省略时显示回退 |
|
||||
| `src` | `string` | - | 可选图片 URL,省略时显示回退 |
|
||||
| `srcSet` | `string` | - | 响应式图片的 `srcset` 属性 |
|
||||
| `sizes` | `string` | - | 响应式图片的 `sizes` 属性 |
|
||||
| `alt` | `string` | - | 图片替代文本 |
|
||||
@@ -136,11 +136,11 @@ Avatar 组件使用以下 CSS 类:
|
||||
|
||||
### AvatarFallback
|
||||
|
||||
| Prop | 类型 | 默认值 | 描述 |
|
||||
| --------- | ------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| Prop | 类型 | 默认值 | 描述 |
|
||||
| --------- | ------------------------------------------------------------- | ------ | ------------------------------------------------------------------------- |
|
||||
| `delayMs` | `number` | - | 显示 fallback 前的延迟(毫秒);省略或 `0` 时立即显示,正数延迟可动态更新 |
|
||||
| `color` | `'default' \| 'accent' \| 'success' \| 'warning' \| 'danger'` | - | 覆盖父级颜色(替换而非叠加) |
|
||||
| `class` | `string` | - | 附加 CSS 类 |
|
||||
| `color` | `'default' \| 'accent' \| 'success' \| 'warning' \| 'danger'` | - | 覆盖父级颜色(替换而非叠加) |
|
||||
| `class` | `string` | - | 附加 CSS 类 |
|
||||
|
||||
三个部件均支持 `as`(根/回退默认 `span`,图片默认 `img`)与 `asChild`(默认 `false`)。`asChild` 需要单个可接收属性的元素或组件;自定义组件应将 attrs 和事件透传到实际 DOM。Image 的默认插槽用于提供自定义图片,Root / Fallback 的默认插槽分别提供部件与回退内容。`referrerPolicy` 接受原生图片策略并透传。
|
||||
|
||||
@@ -150,4 +150,4 @@ Avatar 使用 Reka UI 的 `AvatarRoot` / `AvatarImage` / `AvatarFallback` 处理
|
||||
|
||||
## 相关组件
|
||||
|
||||
[AvatarGroup 头像组](./avatar-group) · [Card 卡片](./card)
|
||||
[AvatarGroup 头像组](./avatar-group) · [Separator 分隔符](./separator) · [Badge 徽章](./badge)
|
||||
|
||||
Reference in New Issue
Block a user