2026-05-03 19:51:57 -05:00
|
|
|
import * as React from 'react';
|
|
|
|
|
import { cva } from 'class-variance-authority';
|
|
|
|
|
import { cn } from '@/lib/utils';
|
|
|
|
|
|
|
|
|
|
const badgeVariants = cva(
|
|
|
|
|
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-[3px] focus:ring-ring/50',
|
|
|
|
|
{
|
|
|
|
|
variants: {
|
|
|
|
|
variant: {
|
|
|
|
|
default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',
|
|
|
|
|
secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
|
|
|
destructive: 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',
|
|
|
|
|
outline: 'text-foreground',
|
|
|
|
|
// Bill status variants
|
style: global readability/theme pass
- Sharpened font stack in index.css, removed softer Georgia digit font for UI text/money
- Tuned dark-mode tokens: clearer foreground, brighter muted text, stronger borders, defined cards
- Updated UI primitives: cards, buttons, inputs, selects, tables, badges
- Cleaned up bills rows, mobile bill rows, tracker dismiss, snowball icons, summary/category/health/analytics money values, import/export status icons
- Reduced fuzzy uppercase label spacing globally
2026-05-28 23:18:14 -05:00
|
|
|
paid: 'bg-emerald-500/20 text-emerald-300 border-emerald-400/35',
|
|
|
|
|
late: 'bg-orange-500/20 text-orange-300 border-orange-400/35',
|
|
|
|
|
missed: 'bg-red-500/20 text-red-300 border-red-400/35',
|
|
|
|
|
due_soon: 'bg-yellow-500/20 text-yellow-200 border-yellow-400/35',
|
|
|
|
|
upcoming: 'bg-slate-400/20 text-slate-200 border-slate-300/30',
|
|
|
|
|
autodraft: 'bg-amber-500/20 text-amber-200 border-amber-400/35',
|
2026-05-03 19:51:57 -05:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
defaultVariants: {
|
|
|
|
|
variant: 'default',
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
function Badge({ className, variant, ...props }) {
|
|
|
|
|
return (
|
|
|
|
|
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export { Badge, badgeVariants };
|