| import { clsx } from "clsx"; |
| import { twMerge } from "tailwind-merge"; |
|
|
| |
| |
| |
| |
| |
| export function cn(...inputs) { |
| return twMerge(clsx(inputs)); |
| } |
|
|
| |
| |
| |
| |
| |
| export function formatScore(score) { |
| return (score || 0).toFixed(1); |
| } |
|
|
| |
| |
| |
| |
| |
| export function getScoreVariant(score) { |
| if (score >= 7.5) return 'high'; |
| if (score >= 5.5) return 'mid'; |
| return 'low'; |
| } |
|
|
| |
| |
| |
| |
| |
| export function getScoreColor(score) { |
| if (score >= 7.5) return 'text-ascent-blue'; |
| if (score >= 5.5) return 'text-semantic-warning'; |
| return 'text-semantic-error'; |
| } |
|
|
| |
| |
| |
| |
| |
| export function getScoreBg(score) { |
| if (score >= 7.5) return 'bg-ascent-blue-subtle'; |
| if (score >= 5.5) return 'bg-semantic-warning-bg'; |
| return 'bg-semantic-error-bg'; |
| } |
|
|
| |
| |
| |
| |
| |
| export function getVerdict(score) { |
| if (score >= 8) return 'EXCELLENT'; |
| if (score >= 6.5) return 'SOLID'; |
| if (score >= 5) return 'BORDERLINE'; |
| return 'NEEDS WORK'; |
| } |
|
|
| |
| |
| |
| |
| |
| export function getVerdictColor(score) { |
| if (score >= 8) return 'bg-ascent-blue-subtle text-ascent-blue'; |
| if (score >= 6.5) return 'bg-ascent-blue-subtle text-ascent-blue'; |
| if (score >= 5) return 'bg-semantic-warning-bg text-semantic-warning'; |
| return 'bg-semantic-error-bg text-semantic-error'; |
| } |
|
|
| |
| |
| |
| |
| |
| export function formatDuration(minutes) { |
| return `${minutes} minute${minutes !== 1 ? 's' : ''}`; |
| } |
|
|
| |
| |
| |
| |
| |
| |
| export function staggerDelay(index, baseDelay = 80) { |
| return { animationDelay: `${index * baseDelay}ms` }; |
| } |
|
|