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
+12 -12
View File
@@ -187,7 +187,7 @@ DatePicker 支持与真实 Vue/Reka 状态同步的 data 属性与伪状态:
- **Open**:触发器上 `[data-open="true"]`
- **Disabled**:触发器上 `[data-disabled="true"]` 或 `[aria-disabled="true"]`
- **Focus visible**:触发器上 `:focus-visible` 或 `[data-focus-visible="true"]`
- **Focus visible**:触发器上 `:focus-visible` 或 `[data-focus-visible="true"]`。当前 `data-focus-visible` 在任何聚焦时置位(含鼠标点击聚焦),与键盘专属焦点环语义不完全一致;修复列入 HD 队列(HD-06-LINK-FOCUS)
- **Hover**:触发器上 `:hover`
- **Invalid**:根容器上 `[data-invalid="true"]` 或 `[aria-invalid="true"]`
- **Read only**:根容器上 `[data-readonly="true"]`
@@ -230,16 +230,16 @@ DatePicker 继承固定基线的日期字段与弹层能力,通过 Vue `v-mode
#### Format Props
| Prop | 类型 | 默认值 | 描述 |
| ------------------------- | ------------------------------------------------------------- | ------------------------- | ----------------------------------------------- |
| `granularity` | `'day' \| 'hour' \| 'minute' \| 'second'` | `'day'` | 显示的日期/时间粒度;只改变显示,不截断接受值。 |
| `hourCycle` | `12 \| 24` | 由 locale 决定 | 以 12 或 24 小时制显示时间。 |
| `hideTimeZone` | `boolean` | `false` | 是否隐藏时区名称。 |
| `shouldForceLeadingZeros` | `boolean` | - | 是否始终为月、日、小时等显示前导零。 |
| `locale` | `string` | ConfigProvider 或 `en-US` | 显示历法与格式。 |
| `dir` | `'ltr' \| 'rtl'` | ConfigProvider 或 `ltr` | 排列与方向键方向。 |
| `firstDayOfWeek` | `'sun' \| 'mon' \| 'tue' \| 'wed' \| 'thu' \| 'fri' \| 'sat'` | 由 locale 决定 | 覆盖内嵌 Calendar 的一周起始日。 |
| `pageBehavior` | `'visible' \| 'single'` | `'visible'` | 内嵌 Calendar 翻页按可见范围或单步前进。 |
| Prop | 类型 | 默认值 | 描述 |
| ------------------------- | ------------------------------------------------------------- | --------------------------------------- | ----------------------------------------------- |
| `granularity` | `'day' \| 'hour' \| 'minute' \| 'second'` | 随值推断:纯日期 `day`、含时间 `minute` | 显示的日期/时间粒度;只改变显示,不截断接受值。 |
| `hourCycle` | `12 \| 24` | 由 locale 决定 | 以 12 或 24 小时制显示时间。 |
| `hideTimeZone` | `boolean` | `false` | 是否隐藏时区名称。 |
| `shouldForceLeadingZeros` | `boolean` | - | 是否始终为月、日、小时等显示前导零。 |
| `locale` | `string` | ConfigProvider 或 `en-US` | 显示历法与格式。 |
| `dir` | `'ltr' \| 'rtl'` | ConfigProvider 或 `ltr` | 排列与方向键方向。 |
| `firstDayOfWeek` | `'sun' \| 'mon' \| 'tue' \| 'wed' \| 'thu' \| 'fri' \| 'sat'` | 由 locale 决定 | 覆盖内嵌 Calendar 的一周起始日。 |
| `pageBehavior` | `'visible' \| 'single'` | `'visible'` | 内嵌 Calendar 翻页按可见范围或单步前进。 |
#### State & Form Props
@@ -313,7 +313,7 @@ DatePicker 继承固定基线的日期字段与弹层能力,通过 Vue `v-mode
## 相关组件
[Calendar 日历](./calendar) · [DateField 日期字段](./date-field) · [TimeField 时间字段](./time-field)
[Calendar 日历](./calendar) · [RangeCalendar 范围日历](./range-calendar) · [DateField 日期字段](./date-field)
## Vue 公共契约与差异