feat(web): 搭建 Web 壳层与 UI 包基线

React 19 + Vite 6 + Router 7 + TanStack Query + Zustand;Semi 二次封装与 Remix 图标统一出口;顶部模块 + 左侧功能菜单布局、Cloud Blue 主题、登录页与 401/403/404/500 页面;请求层含 token 注入、单飞刷新与统一错误提示。
This commit is contained in:
Stev_Wang committed 2026-11-02 17:21:16 +08:00
1 parent 23067edb8f
commit 073d210a92
51 files changed
+4452

No files matched your search

+114
View File
@@ -0,0 +1,114 @@
:root {
/* 方向 A · 云白蓝(Cloud Blue):传统企业后台骨架 + 现代浅色质感 */
--lx-color-bg-app: #f5f7fa;
--lx-color-bg-panel: #ffffff;
--lx-color-bg-elevated: #ffffff;
--lx-color-bg-subtle: #fafbfc;
--lx-color-bg-hover: #f2f4f7;
--lx-color-bg-active: #e8f1ff;
--lx-color-border: #e5e8ef;
--lx-color-border-strong: #d0d5dd;
--lx-color-text-primary: #1f2329;
--lx-color-text-secondary: #646a73;
--lx-color-text-tertiary: #8f959e;
--lx-color-text-inverse: #ffffff;
--lx-color-brand: #1677ff;
--lx-color-brand-hover: #4096ff;
--lx-color-brand-pressed: #0958d9;
--lx-color-brand-soft: #e8f1ff;
--lx-color-on-brand: #ffffff;
--lx-color-focus: #1677ff;
--lx-color-success: #00b42a;
--lx-color-warning: #ff7d00;
--lx-color-danger: #f53f3f;
--lx-color-info: #1677ff;
--lx-color-chart-1: #1677ff;
--lx-color-chart-2: #00b42a;
--lx-color-chart-3: #ff7d00;
--lx-color-chart-4: #722ed1;
--lx-color-chart-5: #eb2f96;
/* 字体 */
--lx-font-sans:
'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont,
'Segoe UI', sans-serif;
--lx-font-mono: 'SF Mono', 'JetBrains Mono', 'Roboto Mono', ui-monospace, monospace;
--lx-font-size-xs: 12px;
--lx-font-size-sm: 13px;
--lx-font-size-md: 14px;
--lx-font-size-lg: 16px;
--lx-font-size-xl: 20px;
--lx-font-size-display: 28px;
--lx-line-height-tight: 1.25;
--lx-line-height-normal: 1.55;
/* 间距(4px 基线) */
--lx-space-1: 4px;
--lx-space-2: 8px;
--lx-space-3: 12px;
--lx-space-4: 16px;
--lx-space-5: 20px;
--lx-space-6: 24px;
--lx-space-8: 32px;
--lx-space-10: 40px;
/* 结构尺寸:顶部模块菜单 + 左侧功能菜单 */
--lx-topbar-height: 56px;
--lx-sidebar-width: 216px;
--lx-sidebar-collapsed-width: 56px;
--lx-content-padding: 24px;
--lx-radius-sm: 4px;
--lx-radius-md: 6px;
--lx-radius-lg: 10px;
--lx-radius-pill: 999px;
--lx-shadow-panel: 0 1px 2px rgba(31, 35, 41, 0.04);
--lx-shadow-overlay: 0 12px 32px rgba(31, 35, 41, 0.14);
--lx-shadow-focus: 0 0 0 3px rgba(22, 119, 255, 0.16);
--lx-motion-fast: 120ms;
--lx-motion-base: 180ms;
--lx-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Semi Design 变量桥接:业务侧只使用 --lx-*,Semi 组件跟随同一套 token */
body[theme-mode='light'] {
--semi-color-primary: var(--lx-color-brand);
--semi-color-primary-hover: var(--lx-color-brand-hover);
--semi-color-primary-active: var(--lx-color-brand-pressed);
--semi-color-primary-disabled: var(--lx-color-border-strong);
--semi-color-primary-light-default: var(--lx-color-brand-soft);
--semi-color-primary-light-hover: #dbe9ff;
--semi-color-primary-light-active: #cfe1ff;
--semi-color-bg-0: var(--lx-color-bg-app);
--semi-color-bg-1: var(--lx-color-bg-panel);
--semi-color-bg-2: var(--lx-color-bg-panel);
--semi-color-bg-3: var(--lx-color-bg-panel);
--semi-color-bg-4: var(--lx-color-bg-hover);
--semi-color-text-0: var(--lx-color-text-primary);
--semi-color-text-1: var(--lx-color-text-primary);
--semi-color-text-2: var(--lx-color-text-secondary);
--semi-color-text-3: var(--lx-color-text-tertiary);
--semi-color-border: var(--lx-color-border);
--semi-color-fill-0: var(--lx-color-bg-hover);
--semi-color-fill-1: #eef1f5;
--semi-color-fill-2: var(--lx-color-bg-active);
--semi-color-danger: var(--lx-color-danger);
--semi-color-success: var(--lx-color-success);
--semi-color-warning: var(--lx-color-warning);
--semi-color-info: var(--lx-color-info);
--semi-color-focus-border: var(--lx-color-focus);
--semi-color-shadow: var(--lx-shadow-overlay);
}
+15
View File
@@ -0,0 +1,15 @@
/**
* 主题 token 的 JS 副本(供 JS 计算场景使用,如 ECharts / Canvas)
* 注意:颜色字面量只允许出现在 packages/ui/src/theme/(工程规范 03 §3.2)。
*/
export const themeTokens = {
colorBrand: '#f5a524',
colorBrandHover: '#ffb84d',
colorSuccess: '#3fb950',
colorWarning: '#d29922',
colorDanger: '#f85149',
colorInfo: '#58a6ff',
chartColors: ['#f5a524', '#58a6ff', '#3fb950', '#d29922', '#a371f7'],
} as const;
export type ThemeTokens = typeof themeTokens;