{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notification-card",
  "title": "Notification Card",
  "description": "Notification card with a coloured icon tile, title and body, and a list wrapper.",
  "dependencies": [
    "class-variance-authority@^0.7.1",
    "lucide-react@^1.27.0"
  ],
  "registryDependencies": [
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/components/notification-card.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* Notification / alert card — a colored icon tile, a title and a one-line body\n   in a soft raised card. The tone tints the icon tile only; the copy beside it\n   stays neutral so a stack of mixed tones still reads as one calm column.\n\n   This is the list-item notification pattern (a feed of events), distinct from\n   the inline `Alert` banner. Compose a column of them with `NotificationList`. */\nconst notificationIconVariants = cva(\n  \"flex size-10 shrink-0 items-center justify-center rounded-full [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5\",\n  {\n    variants: {\n      tone: {\n        default:\n          \"bg-secondary text-muted-foreground ring-1 ring-foreground/[0.04]\",\n        brand: \"bg-primary/25 text-primary-foreground\",\n        info: \"bg-info/10 text-info\",\n        success: \"bg-success/10 text-success\",\n        warning: \"bg-warning/15 text-warning-ink\",\n        critical: \"bg-destructive/10 text-destructive dark:bg-destructive/20\",\n      },\n    },\n    defaultVariants: {\n      tone: \"default\",\n    },\n  }\n)\n\ntype NotificationCardProps = Omit<React.ComponentProps<\"div\">, \"title\"> &\n  VariantProps<typeof notificationIconVariants> & {\n    icon?: React.ReactNode\n    title: React.ReactNode\n    description?: React.ReactNode\n    /** Right-aligned slot — a timestamp, a button, or a menu trigger. */\n    action?: React.ReactNode\n    /** Renders a dismiss (×) button; fires this handler on click. */\n    onDismiss?: () => void\n    /** Shows a leading unread dot and lifts the title weight. */\n    unread?: boolean\n  }\n\nfunction NotificationCard({\n  className,\n  tone = \"default\",\n  icon,\n  title,\n  description,\n  action,\n  onDismiss,\n  unread = false,\n  ...props\n}: NotificationCardProps) {\n  return (\n    <div\n      data-slot=\"notification-card\"\n      data-tone={tone}\n      className={cn(\n        /* The card already answered hover with a deeper shadow; pairing that\n           with a single pixel of lift is what makes it read as elevation rather\n           than as the shadow simply getting darker. One pixel is the whole\n           budget — a feed of these scrolls past, and anything taller turns the\n           column into a wave. */\n        \"group/notification relative flex items-center gap-3.5 rounded-2xl border border-border/60 bg-card px-4 py-3.5 shadow-soft transition-[box-shadow,translate] duration-base ease-out-expo hover:-translate-y-px hover:shadow-card\",\n        className\n      )}\n      {...props}\n    >\n      {icon != null && (\n        <span\n          data-slot=\"notification-icon\"\n          aria-hidden=\"true\"\n          className={cn(notificationIconVariants({ tone }))}\n        >\n          {icon}\n        </span>\n      )}\n\n      <div className=\"min-w-0 flex-1\">\n        <div className=\"flex items-center gap-2\">\n          {unread && (\n            <span\n              aria-hidden=\"true\"\n              className=\"size-1.5 shrink-0 rounded-full bg-info\"\n            />\n          )}\n          <p\n            data-slot=\"notification-title\"\n            className=\"truncate text-body font-semibold tracking-snug text-foreground\"\n          >\n            {title}\n          </p>\n        </div>\n        {description != null && (\n          <p\n            data-slot=\"notification-description\"\n            className=\"mt-0.5 truncate text-sm text-muted-foreground\"\n          >\n            {description}\n          </p>\n        )}\n      </div>\n\n      {action != null && (\n        <div data-slot=\"notification-action\" className=\"shrink-0\">\n          {action}\n        </div>\n      )}\n\n      {onDismiss && (\n        <button\n          type=\"button\"\n          onClick={onDismiss}\n          aria-label=\"Dismiss notification\"\n          /* The X materialises with the row rather than just switching on:\n             undersized and softened at rest, arriving on the swap spring and\n             leaving on the short tween. Both resting values are invisible at\n             zero opacity, so nothing about the card at rest moves. */\n          className=\"flex size-7 shrink-0 scale-90 items-center justify-center rounded-full text-muted-foreground opacity-0 blur-xs transition-[opacity,color,background-color,scale,filter] duration-exit ease-out-expo outline-none hover:bg-muted hover:text-foreground focus-visible:scale-100 focus-visible:opacity-100 focus-visible:blur-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:duration-spring-swap focus-visible:ease-spring-swap group-hover/notification:scale-100 group-hover/notification:opacity-100 group-hover/notification:blur-none group-hover/notification:duration-spring-swap group-hover/notification:ease-spring-swap [&_svg]:size-4\"\n        >\n          <X />\n        </button>\n      )}\n    </div>\n  )\n}\n\n/* Vertical stack of notification cards — owns only the rhythm between them. */\nfunction NotificationList({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"notification-list\"\n      className={cn(\"flex w-full flex-col gap-2.5\", className)}\n      {...props}\n    />\n  )\n}\n\nexport { NotificationCard, NotificationList, notificationIconVariants }\nexport type { NotificationCardProps }\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}