refactor(styles): 建立统一的生产级样式体系 (#4)

## 变更内容

- 将全局样式拆分为设计令牌、基础规则和语义组件层
- 集中管理 Naive UI 主题配置
- 迁移页面容器、表单、信息面板和按钮等重复样式
- 增加样式体系文档与自动契约检查

## 验证

- `npm run check:styles`
- `npm run build`Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
2026-07-23 02:41:04 +08:00
parent 51743645e2
commit 16b3dd4aaa
27 changed files with 828 additions and 480 deletions
+55
View File
@@ -0,0 +1,55 @@
import type { GlobalThemeOverrides } from 'naive-ui'
/** Keep these values aligned with the semantic tokens in styles/tokens.css. */
export const openCloudThemeOverrides: GlobalThemeOverrides = {
common: {
primaryColor: '#0f766e',
primaryColorHover: '#115e59',
primaryColorPressed: '#134e4a',
primaryColorSuppl: '#0f766e',
infoColor: '#0369a1',
successColor: '#0f766e',
warningColor: '#d97706',
errorColor: '#dc2626',
borderRadius: '0px',
borderRadiusSmall: '0px',
fontFamily: '"IBM Plex Sans", "Noto Sans SC", "PingFang SC", sans-serif',
fontFamilyMono: '"IBM Plex Mono", "SFMono-Regular", monospace',
bodyColor: '#f3f7fb',
cardColor: '#ffffff',
modalColor: '#ffffff',
popoverColor: '#ffffff',
tableColor: '#ffffff',
textColorBase: '#0f172a',
textColor1: '#0f172a',
textColor2: '#334155',
textColor3: '#64748b',
textColorDisabled: '#94a3b8',
dividerColor: '#d9e3ee',
borderColor: '#d9e3ee',
inputColor: '#ffffff',
},
Button: {
borderRadiusTiny: '0px',
borderRadiusSmall: '0px',
borderRadiusMedium: '0px',
borderRadiusLarge: '0px',
textColorPrimary: '#0f172a',
textColorHoverPrimary: '#0f172a',
},
Card: {
borderRadius: '0px',
borderRadiusEmbedded: '0px',
paddingMedium: '24px',
},
Input: { borderRadius: '0px' },
Select: {
peers: {
InternalSelection: { borderRadius: '0px' },
},
},
Tabs: { tabBorderRadius: '0px' },
Tag: { borderRadius: '0px' },
Alert: { borderRadius: '0px' },
Modal: { borderRadius: '0px' },
}