@@ -6,66 +6,39 @@ import { TrendingUp, TrendingDown, Minus } from 'lucide-react';
66const StatisticRenderer = ( { schema } : { schema : StatisticSchema } ) => {
77 return (
88 < div className = { cn (
9- "group relative flex flex-col p-5 rounded-xl transition-all duration-300 overflow-hidden" ,
10- "bg-slate-950/40 border border-slate-800/60 backdrop-blur-sm" ,
11- "hover:bg-slate-900/60 hover:border-cyan-500/50 hover:shadow-[0_0_30px_-10px_rgba(6,182,212,0.3)]" ,
9+ "group relative flex flex-col p-6 rounded-xl border bg-card text-card-foreground shadow-sm" ,
1210 schema . className
1311 ) } >
14- { /* Decorative scanner line */ }
15- < div className = "absolute top-0 left-0 w-full h-[1px] bg-linear-to-r from-transparent via-cyan-500/50 to-transparent -translate-x-full group-hover:animate-[shimmer_1.5s_infinite]" />
16- < div className = "absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-5 pointer-events-none" />
17-
1812 { /* Label */ }
1913 { schema . label && (
2014 < div className = "flex items-center gap-2 mb-2" >
21- < div className = "w-1 h-3 bg-cyan-500 rounded-full shadow-[0_0_8px_cyan]" />
22- < p className = "text-[10px] font-mono font-bold uppercase tracking-[0.2em] text-cyan-600/80 group-hover:text-cyan-400 transition-colors" >
15+ < p className = "text-sm font-medium text-muted-foreground" >
2316 { schema . label }
2417 </ p >
2518 </ div >
2619 ) }
2720
2821 { /* Value Area */ }
29- < div className = "flex items-baseline gap-3 my-1 relative z-10" >
30- < h3 className = { cn (
31- "text-4xl font-black tracking-tight text-white transition-all duration-300" ,
32- "drop-shadow-[0_0_10px_rgba(255,255,255,0.3)]" ,
33- "group-hover:scale-110 group-hover:text-cyan-100 group-hover:drop-shadow-[0_0_15px_rgba(6,182,212,0.6)] group-hover:-translate-y-1"
34- ) } >
22+ < div className = "flex items-baseline gap-2" >
23+ < h3 className = "text-2xl font-bold tracking-tight" >
3524 { schema . value }
3625 </ h3 >
26+ </ div >
3727
38- { /* Trend Indicator */ }
39- { schema . trend && (
40- < div className = { cn (
41- "flex items-center px-2 py-0.5 rounded-full text-[10px] font-bold border backdrop-blur-md transition-all" ,
42- schema . trend === 'up' && "text-emerald-400 border-emerald-500/30 bg-emerald-950/30 shadow-[0_0_10px_-4px_rgba(52,211,153,0.5)]" ,
43- schema . trend === 'down' && "text-rose-400 border-rose-500/30 bg-rose-950/30 shadow-[0_0_10px_-4px_rgba(251,113,133,0.5)]" ,
44- schema . trend === 'neutral' && "text-amber-400 border-amber-500/30 bg-amber-950/30 shadow-[0_0_10px_-4px_rgba(251,191,36,0.5)]" ,
45- "group-hover:scale-105"
46- ) } >
47- { schema . trend === 'up' && < TrendingUp className = "mr-1 h-3 w-3" /> }
48- { schema . trend === 'down' && < TrendingDown className = "mr-1 h-3 w-3" /> }
28+ { /* Footer / Trend */ }
29+ { ( schema . trend || schema . description ) && (
30+ < div className = "mt-1 flex items-center text-xs text-muted-foreground" >
31+ { schema . trend === 'up' && < TrendingUp className = "mr-1 h-3 w-3 text-emerald-500" /> }
32+ { schema . trend === 'down' && < TrendingDown className = "mr-1 h-3 w-3 text-rose-500" /> }
4933 { schema . trend === 'neutral' && < Minus className = "mr-1 h-3 w-3" /> }
50- { schema . description && < span className = "max-w-[100px] truncate" > { schema . description } </ span > }
34+ < span className = { cn (
35+ schema . trend === 'up' && "text-emerald-500 font-medium" ,
36+ schema . trend === 'down' && "text-rose-500 font-medium" ,
37+ ) } >
38+ { schema . description }
39+ </ span >
5140 </ div >
52- ) }
53- </ div >
54-
55- { /* Footer / Description Text if needed below (optional, mostly handled by trend pill now, but keeping separate if text is long) */ }
56- { schema . description && ! schema . trend && (
57- < p className = "text-xs text-slate-500 font-mono mt-1 group-hover:text-slate-400 transition-colors" >
58- { schema . description }
59- </ p >
6041 ) }
61-
62- { /* Decorative accent corners */ }
63- < div className = "absolute right-0 bottom-0 w-8 h-8 opacity-20 group-hover:opacity-100 transition-opacity" >
64- < svg viewBox = "0 0 24 24" fill = "none" className = "w-full h-full text-cyan-500" stroke = "currentColor" strokeWidth = "1" >
65- < path d = "M22 22L12 22L22 12Z" fill = "currentColor" fillOpacity = "0.2" />
66- < path d = "M22 17L22 22L17 22" strokeLinecap = "round" strokeLinejoin = "round" />
67- </ svg >
68- </ div >
6942 </ div >
7043 ) ;
7144} ;
0 commit comments