{{-- Stat Card Component - shadcn-inspired Usage: --}} @props([ 'value', 'label', 'suffix' => null, 'prefix' => null, 'icon' => null, 'iconClass' => 'text-muted-foreground', 'status' => null, 'statusText' => null, 'href' => null, 'progress' => null, 'progressColor' => 'bg-primary', 'clickable' => false, 'compact' => false, 'change' => null, 'changeLabel' => null, ]) @php $tag = $href ? 'a' : 'div'; $statusClasses = [ 'success' => 'text-success', 'warning' => 'text-warning', 'danger' => 'text-danger', 'info' => 'text-info', 'muted' => 'text-muted-foreground', ]; $statusClass = $statusClasses[$status] ?? ''; @endphp <{{ $tag }} @if($href) href="{{ $href }}" @endif {{ $attributes->class([ 'rounded-xl border bg-card p-6 shadow-sm', 'hover:bg-accent/50 transition-colors duration-150 cursor-pointer' => $href || $clickable, ]) }} >
@if($change !== null) = 0 ? 'text-success' : 'text-danger'])> {{ $change >= 0 ? '+' : '' }}{{ $change }}% @endif {{ $changeLabel ?? 'from last period' }}