Files
WealthySmart/frontend/src/lib/colors.ts
Carlos Escalante 46f2d8679c Add shadcn/ui design system, theme, and base components
Install shadcn/ui with base-nova style, tailwind-merge, tw-animate-css,
and font packages. Add oklch-based light/dark theme in index.css and
17 base UI components (button, card, dialog, table, tabs, etc.) plus
shared lib utilities (format, colors, cn) and useSettings hook.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 14:45:33 -06:00

26 lines
1.7 KiB
TypeScript

export interface ColorClasses {
bg: string;
ring: string;
text: string;
borderLeft: string;
}
export const COLOR_MAP: Record<string, ColorClasses> = {
'primary': { bg: 'bg-primary/10', ring: 'ring-primary/20', text: 'text-primary', borderLeft: 'border-l-primary' },
'destructive': { bg: 'bg-destructive/10', ring: 'ring-destructive/20', text: 'text-destructive', borderLeft: 'border-l-destructive' },
'chart-1': { bg: 'bg-chart-1/10', ring: 'ring-chart-1/20', text: 'text-chart-1', borderLeft: 'border-l-chart-1' },
'chart-2': { bg: 'bg-chart-2/10', ring: 'ring-chart-2/20', text: 'text-chart-2', borderLeft: 'border-l-chart-2' },
'chart-3': { bg: 'bg-chart-3/10', ring: 'ring-chart-3/20', text: 'text-chart-3', borderLeft: 'border-l-chart-3' },
'chart-4': { bg: 'bg-chart-4/10', ring: 'ring-chart-4/20', text: 'text-chart-4', borderLeft: 'border-l-chart-4' },
'chart-5': { bg: 'bg-chart-5/10', ring: 'ring-chart-5/20', text: 'text-chart-5', borderLeft: 'border-l-chart-5' },
'accent': { bg: 'bg-accent/10', ring: 'ring-accent/20', text: 'text-accent-foreground', borderLeft: 'border-l-accent' },
'muted': { bg: 'bg-muted/50', ring: 'ring-muted', text: 'text-muted-foreground', borderLeft: 'border-l-muted' },
'secondary': { bg: 'bg-secondary/50', ring: 'ring-secondary', text: 'text-secondary-foreground', borderLeft: 'border-l-secondary' },
};
export const COLOR_OPTIONS = Object.keys(COLOR_MAP);
export function getColorClasses(colorName: string): ColorClasses {
return COLOR_MAP[colorName] ?? COLOR_MAP['primary'];
}