feat: enhance ecommerce UI with typewriter animation, icon buttons, responsive layout, and refined design tokens

- EcommercePage.tsx: Add typewriter animation (useTypewriter hook) for slogan text with blinking cursor; replace text-based add/delete buttons with Ant Design icons (CloudUploadOutlined, DeleteOutlined); make command history panel responsive to window width (auto-collapse ≤1180px); update button labels from generic "添加" to context-specific "上传商品图" / "上传素材"
- New useTypewriter.ts hook: Character-by-character typewriter animation with configurable speed and pause-before-loop, auto-resets on text change
- reset.css: Add comprehensive HTML/body typography baseline (font-size, text-rendering, font-smoothing, line-height); extend reset coverage to select/canvas/svg elements; add overflow-wrap:anywhere for text-bearing elements; add min-width:0 to prevent form element overflow
- primitives.css: Add reusable typography utility classes (ui-page-title, ui-section-title, ui-body-copy) with design token references
- tokens.css: Expand design token set for typography scales, font weights, and leading values
- ecommerce-standalone.css: Add 689 lines of standalone ecommerce page styles
- Page CSS (ecommerce, image-workbench, more-tools, more, script-tokens, script-tokens-v5, studio-layout): Enhanced visual styles and layout refinements across all pages
- app-shell.css: Shell-level layout and styling improvements
This commit is contained in:
2026-06-11 11:31:39 +08:00
parent c367198385
commit bbea5d1e58
14 changed files with 1963 additions and 15 deletions
+56 -2
View File
@@ -44,8 +44,62 @@
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
--ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
--font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
"Microsoft YaHei", sans-serif;
--font-sans: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
"PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
--font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
monospace;
/* Typography scale */
--text-2xs: 10px;
--text-xs: 11px;
--text-sm: 12px;
--text-md: 13px;
--text-base: 14px;
--text-lg: 16px;
--text-xl: 18px;
--text-2xl: 20px;
--text-3xl: 24px;
--text-4xl: 28px;
--text-5xl: 32px;
--text-title: clamp(22px, 2.2vw, 32px);
--text-display: clamp(28px, 3.2vw, 46px);
--weight-regular: 400;
--weight-medium: 500;
--weight-semibold: 600;
--weight-bold: 700;
--weight-heavy: 800;
--leading-none: 1;
--leading-tight: 1.2;
--leading-heading: 1.28;
--leading-control: 1.35;
--leading-body: 1.55;
--leading-relaxed: 1.7;
/* Spacing scale */
--space-1: 4px;
--space-2: 6px;
--space-3: 8px;
--space-4: 10px;
--space-5: 12px;
--space-6: 16px;
--space-7: 20px;
--space-8: 24px;
--space-9: 32px;
--space-10: 40px;
--space-11: 48px;
/* Responsive layout tokens */
--breakpoint-sm: 480px;
--breakpoint-md: 768px;
--breakpoint-lg: 992px;
--breakpoint-xl: 1200px;
--page-gutter: clamp(12px, 2vw, 32px);
--panel-gutter: clamp(12px, 1.4vw, 24px);
--card-min: min(100%, 240px);
--form-control-min-height: 38px;
--toolbar-min-height: 44px;
/* Semantic aliases used by the layered stylesheet structure. */
--surface-canvas: var(--bg-base);