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:
@@ -261,12 +261,12 @@ Calendar 保留固定基线的主要属性与部件,以 Vue 模型、具名部
|
||||
|
||||
年份选择器支持日期格式与窗口选项。独立部件直接从包根导入,不需要 React 上下文。
|
||||
|
||||
| Component | Prop | 类型 | 默认值 | 描述 |
|
||||
| ---------------------------------- | -------------- | ---------------------------- | ------------------- | -------------------------------------------------------------------------- |
|
||||
| `CalendarYearPickerTriggerHeading` | `format` | `Intl.DateTimeFormatOptions` | - | 自定义月/年标签(如 `{month: 'short'}`) |
|
||||
| `CalendarYearPickerTriggerHeading` | `offset` | `{months?: number}` | - | 相对聚焦日期偏移标题(多月布局) |
|
||||
| `CalendarYearPickerGrid` | `format` | `Intl.DateTimeFormatOptions` | `{year: 'numeric'}` | 自定义年份单元格标签(纪元、历法等) |
|
||||
| `CalendarYearPickerGrid` | `visibleYears` | `number` | min–max 跨度 | 滑动窗口中显示的年份数。同时设置 `minValue` 与 `maxValue` 时默认为完整范围 |
|
||||
| Component | Prop | 类型 | 默认值 | 描述 |
|
||||
| ---------------------------------- | -------------- | ---------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `CalendarYearPickerTriggerHeading` | `format` | `Intl.DateTimeFormatOptions` | - | 自定义月/年标签(如 `{month: 'short'}`) |
|
||||
| `CalendarYearPickerTriggerHeading` | `offset` | `{months?: number}` | - | 相对聚焦日期偏移标题(多月布局) |
|
||||
| `CalendarYearPickerGrid` | `format` | `Intl.DateTimeFormatOptions` | `{year: 'numeric'}` | 自定义年份单元格标签(纪元、历法等) |
|
||||
| `CalendarYearPickerGrid` | `visibleYears` | `number` | min–max 完整范围 | 以焦点年为中心的滑动窗口年份数;缺省显示 min–max 完整范围(未设约束时为 1900–2099)。上游文档写“min–max 跨度或 `20`”,本实现没有 `20` 的回退分支 |
|
||||
|
||||
### CalendarCell 作用域插槽
|
||||
|
||||
@@ -298,12 +298,12 @@ Calendar 保留固定基线的主要属性与部件,以 Vue 模型、具名部
|
||||
- `locale`、`dir` 优先于 ConfigProvider;`timeZone` 用于“今天”标记。显示历法与公开模型历法分离;默认上下界按公历 1900-01-01 至 2099-12-31 转换到显示历法,与上游部分历法的近似年份偏移算法有差异。
|
||||
- 根为 `role="group"`,网格为语义 table/grid,CalendarCell 输出 td/gridcell + 原生 button。`class`、ARIA、DOM 事件落在真正可交互按钮;取消 Cell 的键盘或点击事件可阻止默认处理,祖先需使用捕获事件取消。`isDateDisabled` 完全禁用日期;`isDateUnavailable` 保留焦点但阻止选择。
|
||||
- 左右/上下键移动日期,Home/End 到周边界,PageUp/PageDown 移动月份,Shift+PageUp/PageDown 移动年份;Enter/Space 选择。年份层为三列,方向键与 Home/End 移动,Escape 关闭并恢复触发器。
|
||||
- Calendar 本身不产生原生命名表单输入,也不消费 Label/FieldError 的字段协议;表单字段与 Picker 后续共享 DateField 基建。RangeCalendar 与 TimeField 已有独立公共组件;DatePicker、DateRangePicker 尚未迁移。
|
||||
- Calendar 本身不产生原生命名表单输入,也不消费 Label/FieldError 的字段协议;表单字段由 DateField 体系承载,DatePicker、DateRangePicker 复用同一套 DateField 部件。RangeCalendar、TimeField、DatePicker、DateRangePicker 均有独立公共组件。
|
||||
- `weeksInMonth` 是行数下限,不裁掉真实月份日期。`visibleYears` 是以聚焦年份为中心的窗口;默认显示完整 min/max 年份范围。复杂 era 可通过年份插槽中的 `date` 传给 CalendarYearPickerCell,避免仅凭数字年份混淆。
|
||||
- 键盘适配层针对安装版 Reka 缺少 week/day view、年份层及原生取消缺口使用本地日期视图算法;不运行 React,也不承诺完整 React Aria 类型或全部读屏行为等价。
|
||||
|
||||
## 相关组件
|
||||
|
||||
[DateField 日期字段](./date-field) · [Select 选择器](./select) · [Popover 弹出框](./popover)
|
||||
[RangeCalendar 范围日历](./range-calendar) · [DateField 日期字段](./date-field) · [DatePicker 日期选择器](./date-picker)
|
||||
|
||||
Root 默认插槽还提供 `value`、`isDisabled`、`isReadOnly`、`isInvalid`、`focusedValue`、`visibleRange` 与 `isYearPickerOpen`。Cell 插槽还提供 `date`、`isOutsideVisibleRange`、`isToday`、`isHovered`、`isPressed`、`isFocused`、`isFocusVisible`。使用 `defaultFocusedValue`、`locale`、`dir`、`timeZone`、`isDateDisabled` 可显式设置初始视图、国际化和禁用规则。
|
||||
|
||||
Reference in New Issue
Block a user