Skip to content

ONE-88 Stage 2 · Design tokens + base components/layout refactor - #138

Merged
mapxn merged 3 commits into
mainfrom
agent/mary/e5e99dbb6618
Oct 24, 2026
Merged

mapxn merged 3 commits into
mainfrom
agent/mary/e5e99dbb6618

Conversation

@mapxn

@mapxn mapxn commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

范围

Stage 2(ONE-108):把冻结契约 docs/design-system.md 落到代码 —— 设计令牌 + 9 个基础组件 + 2 个 layout。不碰 pages/、不动 worker。

改动

  • apps/web/src/styles/globals.css:CSS-first(@theme)落全部 10 组 token —— 字体族(Inter / JetBrains Mono,fontsource 自托管 variable 版,font-display: swap)、8 档字号阶梯 + 行高、字重、字距、4px 间距基网、明暗双策略阴影(暗色描边+微光)、4 条缓动、5 档时长、补全颜色(电蓝 primary、新增 success/warning)与圆角;body 声明 font-family;新增 dialog 入场动画 + prefers-reduced-motion 降级。
  • 删除 tailwind.config.js,token 单一来源;components.json 同步。
  • 重构 components/ui/{button,card,badge,input,label,switch,dialog,otp-input} 与 layout/{DashboardLayout,AdminLayout}:语义 token 替换硬编码(badge success 走 --success,CardTitle 改 h2 档,导航激活态改 accent 语义,focus 统一 shadow-focus 光环,过渡统一 duration/ease token)。

验证

  • pnpm -r build ✅(tsc + vite,web & worker)
  • biome lint . ✅(103 files, no issues)
  • pnpm test(web)✅ 54 pass / 0 fail

mapxn added 2 commits October 24, 2026 08:21
…NE-88 Stage 2)

- globals.css: full token set per frozen docs/design-system.md (font stacks,
  8-step type scale, leading/weight/tracking, 4px spacing grid, light/dark
  shadow strategies, easings, durations, semantic colors incl. success/warning,
  radii); Tailwind v4 CSS-first via @theme, tailwind.config.js removed
- body declares font-family (Inter Variable / JetBrains Mono Variable via
  fontsource, self-hosted, display:swap)
- refactor ui/{button,card,badge,input,label,switch,dialog,otp-input} and
  layout/{DashboardLayout,AdminLayout} onto semantic tokens; tokenized
  focus ring (shadow-focus), transitions (duration/ease vars), dialog
  enter animation, prefers-reduced-motion downgrade
@mapxn
mapxn merged commit 68d2b98 into main Oct 24, 2026
2 checks passed
@mapxn
mapxn deleted the agent/mary/e5e99dbb6618 branch November 8, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant