迁移以下 5 个 Company 模块文件: - fui.ts: FUI_GLASS 改用全局 GLASS_BLUR/BG/BORDER 常量 - index.ts: GLASS 常量改用全局配置 - AnalysisModal.tsx: GLASS_BLUR.sm 替换 blur(8px) - DynamicTrackingNavSkeleton.tsx: GLASS_BLUR.lg 替换 blur(20px) - CompanyOverviewNavSkeleton.tsx: GLASS_BLUR.lg 替换 blur(20px) 保持 FUI_GLASS 导出不变,确保向后兼容 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
123 lines
2.8 KiB
TypeScript
123 lines
2.8 KiB
TypeScript
/**
|
|
* Company 页面 FUI 主题统一导出
|
|
*
|
|
* 使用方式:
|
|
* import { COLORS, GLOW, GLASS } from '@views/Company/theme';
|
|
* import { FUI_COLORS, FUI_THEME } from '@views/Company/theme';
|
|
* import { alpha, fui, chartTheme } from '@views/Company/theme';
|
|
*/
|
|
|
|
// 完整主题对象
|
|
export { default as FUI_THEME } from './fui';
|
|
export {
|
|
FUI_COLORS,
|
|
FUI_GLOW,
|
|
FUI_GLASS,
|
|
FUI_ANIMATION,
|
|
FUI_KEYFRAMES,
|
|
FUI_STYLES,
|
|
} from './fui';
|
|
|
|
// 主题组件
|
|
export * from './components';
|
|
|
|
// ============================================
|
|
// 工具函数导出(推荐使用)
|
|
// ============================================
|
|
|
|
export {
|
|
// 核心工具
|
|
alpha,
|
|
hex,
|
|
fui,
|
|
BASE_COLORS,
|
|
OPACITY,
|
|
chartTheme,
|
|
// 类型
|
|
type ColorName,
|
|
} from './utils';
|
|
|
|
// ============================================
|
|
// 便捷常量导出(推荐使用)
|
|
// ============================================
|
|
|
|
import { FUI_COLORS, FUI_GLOW, FUI_GLASS } from './fui';
|
|
|
|
/**
|
|
* 常用颜色常量
|
|
* 用于替换硬编码的 rgba(212, 175, 55, x) 等值
|
|
*/
|
|
export const COLORS = {
|
|
// 金色系
|
|
gold: '#D4AF37',
|
|
goldLight: '#F0D78C',
|
|
goldDark: '#B8960C',
|
|
goldMuted: 'rgba(212, 175, 55, 0.5)',
|
|
|
|
// 背景
|
|
bgDeep: '#0A0A14',
|
|
bgPrimary: '#0F0F1A',
|
|
bgElevated: '#1A1A2E',
|
|
bgSurface: '#252540',
|
|
bgOverlay: 'rgba(26, 26, 46, 0.95)',
|
|
bgGlass: 'rgba(15, 18, 35, 0.6)',
|
|
|
|
// 边框
|
|
border: 'rgba(212, 175, 55, 0.2)',
|
|
borderHover: 'rgba(212, 175, 55, 0.4)',
|
|
borderSubtle: 'rgba(212, 175, 55, 0.1)',
|
|
borderEmphasis: 'rgba(212, 175, 55, 0.6)',
|
|
|
|
// 文字
|
|
textPrimary: 'rgba(255, 255, 255, 0.95)',
|
|
textSecondary: 'rgba(255, 255, 255, 0.7)',
|
|
textMuted: 'rgba(255, 255, 255, 0.5)',
|
|
textDim: 'rgba(255, 255, 255, 0.3)',
|
|
|
|
// 状态
|
|
positive: '#EF4444',
|
|
negative: '#22C55E',
|
|
warning: '#F59E0B',
|
|
info: '#3B82F6',
|
|
} as const;
|
|
|
|
/**
|
|
* 发光效果
|
|
*/
|
|
export const GLOW = {
|
|
goldSm: '0 0 8px rgba(212, 175, 55, 0.3)',
|
|
goldMd: '0 0 16px rgba(212, 175, 55, 0.4)',
|
|
goldLg: '0 0 32px rgba(212, 175, 55, 0.5)',
|
|
goldPulse: '0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(212, 175, 55, 0.3)',
|
|
textGold: '0 0 10px rgba(212, 175, 55, 0.5)',
|
|
} as const;
|
|
|
|
/**
|
|
* 玻璃效果 - 使用全局统一配置
|
|
*/
|
|
import { GLASS_BLUR, GLASS_BG } from '@/constants/glassConfig';
|
|
|
|
export const GLASS = {
|
|
blur: GLASS_BLUR.md,
|
|
blurSm: GLASS_BLUR.sm,
|
|
blurLg: GLASS_BLUR.lg,
|
|
bgLight: GLASS_BG.light,
|
|
bgDark: GLASS_BG.dark,
|
|
bgGold: GLASS_BG.gold,
|
|
} as const;
|
|
|
|
/**
|
|
* 玻璃态卡片样式(可直接 spread 到组件)
|
|
*/
|
|
export const glassCardStyle = {
|
|
bg: COLORS.bgGlass,
|
|
borderRadius: '12px',
|
|
border: `1px solid ${COLORS.border}`,
|
|
backdropFilter: GLASS.blur,
|
|
transition: 'all 0.2s ease',
|
|
_hover: {
|
|
borderColor: COLORS.borderHover,
|
|
bg: 'rgba(15, 18, 35, 0.7)',
|
|
},
|
|
} as const;
|