feat(styles): export shared field variant maps and restore the border fallback
HD-05 scope, against heroui ce90ea3 styles sources: - add labelVariants/descriptionVariants/fieldErrorVariants/ textFieldVariants/switchGroupVariants (+ VariantProps types) to @heroui-vue/styles and re-export them from @heroui-vue/components; variant keys, defaultVariants and slot sets match the pinned *.styles.ts files key for key (hv- namespace only) - Label/Description/FieldError/useTextField/SwitchGroup now consume those mappings instead of inline class strings, so the state classes have a single source; rendered class output is unchanged and pinned by tests/shared-field-styles.test.ts (mapping output <-> component output) - restore the global border-color fallback (*, ::after, ::before, ::backdrop, ::file-selector-button -> border-color: var(--border, currentColor)) in a new base/base.css, imported layer(base) right after preflight like the pinned entry: a low-priority default that components, utilities and consumer CSS override without !important - view-transition globals from the pinned base.css stay unported: no View Transitions API usage exists in the library or docs site - shared-styles package contract: packed runtime exports from both entries, variant-output assertions, CSS tokens incl. the fallback, strict nodenext+bundler type contract, and a real-browser consumer fixture (light/dark --border, explicit colors, consumer overrides, currentColor fallback) wired into check-package.mjs - docs: styling layers/border fallback/exports notes, five component API pages, compatibility matrix and upstream source records Full suite 111 files / 1634 tests, typecheck and build:docs pass; shared-styles + api-root-aliases + handbook-styles verified against the final tarballs.
This commit is contained in:
@@ -290,3 +290,7 @@ ComboBox/Autocomplete的正式组合、原30项返修和本轮定位/ref/ARIA/lo
|
||||
固定源六篇56章节的实现证据与差异见 [Handbook审计](handbook-audit.md)。修复 data-scrollbar 三模式、八类浮层/Skeleton/Drawer 的减少动效与动态取消动画后的进入标记清理。按需 CSS 子路径、公共 useTheme、局部主题自动跨 Teleport 及 Skeleton 动画变量的局部/动态读取仍未提供;不声明所有组件已完成全部规范的浏览器验收。逐项场景与实际验证见 [任务结果](tasks/results/HANDBOOK-IMPLEMENTATION-AUDIT.md)。
|
||||
|
||||
HD-01(2026-10-28):按钮/切换组与导航示例已恢复固定cn基线;ButtonGroup内Dropdown保留根attrs/事件,以容器位置适配接缝。HD01-R1已关闭;不升级整族API兼容状态,详见[结果](tasks/results/HD-01-BUTTON-NAV-DEMOS.md)。
|
||||
|
||||
## HD-05 styles 导出与全局边框回退(2026-10-28)
|
||||
|
||||
`@heroui-vue/styles` 增量补齐固定源缺失的 5 个 tv 映射与类型:`labelVariants`/`descriptionVariants`/`fieldErrorVariants`/`textFieldVariants`/`switchGroupVariants`(hv- 命名空间,变体集合与默认值与 `heroui/packages/styles/src/components/{label,description,field-error,textfield,switch-group}/*.styles.ts` 逐键一致),`@heroui-vue/components` 再导出同一组函数与 `*Variants` 类型。Label/Description/FieldError/useTextField/SwitchGroup 改为消费同一映射,状态类只保留一处来源,渲染类输出不变(tests/shared-field-styles.test.ts 钉住映射输出与组件输出一致)。恢复 `base` 层全局边框色回退 `border-color: var(--border, currentColor)`(与固定源 base/base.css 同选择器、同层序:preflight 之后);独立 tarball 消费者真实浏览器验证浅/深 `--border`、显式边框色(含字段透明边框)、调用方普通 CSS 覆盖(含与库同选择器的注入规则)与 `--border` 缺失时的 currentColor 回退,CSSOM 确认规则位于 base 层且无 `!important`。`view-transition-name`/`::view-transition` 两条上游全局规则经核查无使用证据(库与文档站均未使用 View Transitions API),不迁移、不建专项。chip `size:"md"`、kbd `variant:"default"` 等效默认类、reduced-motion、Spinner 定尺、Table th 行头、定位补偿与 HD-01~HD-04 成果均未改动。见 [任务结果](tasks/results/HD-05-STYLES.md)。
|
||||
|
||||
Reference in New Issue
Block a user