feat(ST-1202): add lib/chart-colors.ts + vitest coverage
MD3-token-to-CSS-var mappings for STATUS, PRIORITY, VERIFY, JOB_STATUS and SERIES_COLORS; all 5 tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
85f73e43f6
commit
7404d586d1
2 changed files with 91 additions and 0 deletions
39
lib/chart-colors.ts
Normal file
39
lib/chart-colors.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
// Mapping van MD3-tokens naar CSS-var-strings voor Recharts fill/stroke.
|
||||
// Recharts accepteert gewone strings — 'var(--status-done)' werkt direct.
|
||||
export const STATUS_COLORS = {
|
||||
TO_DO: 'var(--status-todo)',
|
||||
IN_PROGRESS: 'var(--status-in-progress)',
|
||||
REVIEW: 'var(--status-in-progress)',
|
||||
DONE: 'var(--status-done)',
|
||||
} as const
|
||||
|
||||
export const PRIORITY_COLORS = {
|
||||
1: 'var(--priority-critical)',
|
||||
2: 'var(--priority-high)',
|
||||
3: 'var(--priority-medium)',
|
||||
4: 'var(--priority-low)',
|
||||
} as const
|
||||
|
||||
export const VERIFY_COLORS = {
|
||||
ALIGNED: 'var(--status-done)',
|
||||
PARTIAL: 'var(--priority-medium)',
|
||||
EMPTY: 'var(--priority-critical)',
|
||||
DIVERGENT: 'var(--priority-high)',
|
||||
} as const
|
||||
|
||||
export const JOB_STATUS_COLORS = {
|
||||
queued: 'var(--muted-foreground)',
|
||||
claimed: 'var(--status-in-progress)',
|
||||
running: 'var(--status-in-progress)',
|
||||
done: 'var(--status-done)',
|
||||
failed: 'var(--priority-critical)',
|
||||
cancelled: 'var(--muted-foreground)',
|
||||
} as const
|
||||
|
||||
export const SERIES_COLORS = [
|
||||
'var(--chart-1)',
|
||||
'var(--chart-2)',
|
||||
'var(--chart-3)',
|
||||
'var(--chart-4)',
|
||||
'var(--chart-5)',
|
||||
] as const
|
||||
Loading…
Add table
Add a link
Reference in a new issue