"use client"; import { cn } from "@/shared/utils/cn"; interface CardProps extends Omit, "title"> { children?: React.ReactNode; title?: React.ReactNode; subtitle?: React.ReactNode; icon?: string; action?: React.ReactNode; padding?: "none" | "xs" | "sm" | "md" | "lg"; hover?: boolean; className?: string; } export default function Card({ children, title, subtitle, icon, action, padding = "md", hover = false, className, ...props }: CardProps) { const paddings = { none: "", xs: "p-3", sm: "p-4", md: "p-6", lg: "p-8", }; return (
{(title || action) && (
{icon && (
{icon}
)}
{title &&

{title}

} {subtitle &&

{subtitle}

}
{action}
)} {children}
); } // Sub-component: Bordered section inside Card Card.Section = function CardSection({ children, className, ...props }) { return (
{children}
); }; // Sub-component: Hoverable row inside Card Card.Row = function CardRow({ children, className, ...props }) { return (
{children}
); }; // Sub-component: List item with hover actions (macOS style) Card.ListItem = function CardListItem({ children, actions, className, ...props }) { return (
{children}
{actions && (
{actions}
)}
); };