Files
hms/apps/miniprogram/src/styles/token-values.ts
iven 4fcbf705ca refactor(mp): E3-2 大文件拆分 + U3-2 微交互统一
E3-2 大文件拆分(3 文件 → 6 文件):
- daily-monitoring 449L → useDailyMonitoring.ts hook(238L) + 页面(255L)
- request.ts 376L → cache.ts(75L) + limiter.ts(32L) + 主文件(278L)
- BLEManager.ts 363L → BLEConnection.ts(212L) + 主文件(228L)

U3-2 微交互统一:
- 新增 haptic.ts 工具(light/medium/heavy 三级触觉反馈)
- PrimaryButton 点击触发 hapticLight()
- tokens.scss 新增 5 个动画时序 token(duration/easing)
- mixins.scss 新增 fade-in() mixin(支持 fast/normal/slow 三档)
2026-05-22 08:41:12 +08:00

115 lines
2.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Auto-generated by scripts/generate-tokens.ts — DO NOT EDIT
// Generated at: 2026-05-22T00:37:54.202Z
export const TOKEN_VALUES = {
"pri": "#C4623A",
"pri-l": "#F0DDD4",
"pri-d": "#8B3E1F",
"shadow-btn": "0 4px 16px rgba(196, 98, 58, 0.3)",
"shadow-tab": "0 2px 8px rgba(196, 98, 58, 0.25)",
"font-display": "72px",
"font-hero": "48px",
"font-h1": "28px",
"font-h2": "22px",
"font-body-lg": "18px",
"font-body": "16px",
"font-body-sm": "14px",
"font-num": "30px",
"font-num-lg": "34px",
"font-cap": "13px",
"font-nav": "18px",
"font-micro": "11px",
"line-height": "1.5",
"touch-min": "48px",
"btn-primary-h": "52px",
"text-secondary": "#78716C",
"card-bg": "#FFFFFF",
"card-padding": "20px",
"card-padding-sm": "16px",
"card-padding-lg": "28px",
"card-radius": "16px",
"gap-2xs": "4px",
"gap-xs": "8px",
"gap-sm": "12px",
"gap-md": "16px",
"section-gap": "20px",
"gap-lg": "24px",
"gap-xl": "32px",
"gap-2xl": "48px",
"page-padding": "20px",
"input-height": "56px",
"tabbar-space": "100px",
"touch-feedback-opacity": "0.85",
"tag-font-size": "11px",
"tag-padding-v": "3px",
"tag-padding-h": "8px",
"duration-fast": "150ms",
"duration-normal": "200ms",
"duration-slow": "300ms",
"easing": "cubic-bezier(0.16, 1, 0.3, 1)",
"easing-bounce": "cubic-bezier(0.34, 1.56, 0.64, 1)"
} as const;
export const ELDER_TOKEN_OVERRIDES = {
"font-display": "80px",
"font-hero": "56px",
"font-h1": "32px",
"font-h2": "25px",
"font-body-lg": "22px",
"font-body": "22px",
"font-body-sm": "19px",
"font-num": "34px",
"font-num-lg": "40px",
"font-cap": "18px",
"font-nav": "22px",
"font-micro": "17px",
"line-height": "1.7",
"touch-min": "56px",
"btn-primary-h": "60px",
"text-secondary": "#5A554F",
"card-padding": "28px",
"card-padding-sm": "20px",
"card-padding-lg": "36px",
"card-radius": "20px",
"gap-2xs": "6px",
"gap-xs": "12px",
"gap-sm": "16px",
"gap-md": "20px",
"section-gap": "28px",
"gap-lg": "32px",
"gap-xl": "40px",
"gap-2xl": "56px",
"page-padding": "28px",
"input-height": "64px",
"tabbar-space": "120px",
"touch-feedback-opacity": "0.8",
"tag-font-size": "13px",
"tag-padding-v": "5px",
"tag-padding-h": "12px"
} as const;
export const DOCTOR_TOKEN_OVERRIDES = {
"pri": "#3A6B8C",
"pri-l": "#D4E5F0",
"pri-d": "#2A4F6A",
"shadow-btn": "0 4px 16px rgba(58, 107, 140, 0.3)",
"shadow-tab": "0 2px 8px rgba(58, 107, 140, 0.25)"
} as const;
// Canvas 专用:字号(数字,单位 px
export const CANVAS_FONT_NORMAL = {
yLabel: 10,
xLabel: 10,
tooltip: 12,
pointNormal: 3,
pointAbnormal: 5,
} as const;
export const CANVAS_FONT_ELDER = {
yLabel: 14,
xLabel: 14,
tooltip: 16,
pointNormal: 5,
pointAbnormal: 8,
} as const;