import { HTMLAttributes, forwardRef } from "react"; import { cn } from "../lib/utils"; /** * Mission Control Card Component * Glassmorphism design with optional glow variants */ export type CardVariant = "default" | "glow-cyan" | "glow-green" | "glow-amber" | "glow-rose"; export interface CardProps extends HTMLAttributes { variant?: CardVariant; } const cardVariants: Record = { default: "border-slate-700/50", "glow-cyan": "border-cyan-500/50 shadow-[0_0_15px_rgba(6,182,212,0.15)]", "glow-green": "border-emerald-500/50 shadow-[0_0_15px_rgba(16,185,129,0.15)]", "glow-amber": "border-amber-500/50 shadow-[0_0_15px_rgba(245,158,11,0.15)]", "glow-rose": "border-rose-500/50 shadow-[0_0_15px_rgba(244,63,94,0.15)]", }; const cardHoverVariants: Record = { default: "hover:border-slate-600/70 hover:shadow-lg hover:shadow-slate-900/50", "glow-cyan": "hover:border-cyan-400/70 hover:shadow-[0_0_25px_rgba(6,182,212,0.25)]", "glow-green": "hover:border-emerald-400/70 hover:shadow-[0_0_25px_rgba(16,185,129,0.25)]", "glow-amber": "hover:border-amber-400/70 hover:shadow-[0_0_25px_rgba(245,158,11,0.25)]", "glow-rose": "hover:border-rose-400/70 hover:shadow-[0_0_25px_rgba(244,63,94,0.25)]", }; const Card = forwardRef( ({ className, variant = "default", ...props }, ref) => (
) ); Card.displayName = "Card"; const CardHeader = forwardRef>( ({ className, ...props }, ref) => (
) ); CardHeader.displayName = "CardHeader"; export interface CardTitleProps extends HTMLAttributes { gradient?: boolean; gradientFrom?: string; gradientTo?: string; } const CardTitle = forwardRef( ({ className, gradient = false, gradientFrom = "cyan-400", gradientTo = "blue-500", ...props }, ref) => (

) ); CardTitle.displayName = "CardTitle"; const CardDescription = forwardRef>( ({ className, ...props }, ref) => (

) ); CardDescription.displayName = "CardDescription"; const CardContent = forwardRef>( ({ className, ...props }, ref) => (

) ); CardContent.displayName = "CardContent"; const CardFooter = forwardRef>( ({ className, ...props }, ref) => (
) ); CardFooter.displayName = "CardFooter"; export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter };