{"name":"sonner","dependencies":["@base-ui/react","lucide-react","next-themes","sonner"],"files":[{"path":"sonner.tsx","content":"\"use client\"\n\nimport {\n  CircleCheckIcon,\n  InfoIcon,\n  Loader2Icon,\n  OctagonXIcon,\n  TriangleAlertIcon,\n} from \"lucide-react\"\nimport { useTheme } from \"next-themes\"\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\"\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n  const { theme = \"system\" } = useTheme()\n\n  return (\n    <Sonner\n      theme={theme as ToasterProps[\"theme\"]}\n      className=\"toaster group\"\n      icons={{\n        success: <CircleCheckIcon className=\"size-4\" />,\n        info: <InfoIcon className=\"size-4\" />,\n        warning: <TriangleAlertIcon className=\"size-4\" />,\n        error: <OctagonXIcon className=\"size-4\" />,\n        loading: <Loader2Icon className=\"size-4 animate-spin\" />,\n      }}\n      toastOptions={{\n        // Fully unstyled so the neobrutalist recipe below owns every surface:\n        // hard offset shadow, 2px border, square corners, press-down buttons.\n        unstyled: true,\n        classNames: {\n          toast:\n            \"group/toast relative flex w-(--width) items-center gap-3 rounded border-2 border-border bg-popover p-4 font-sans text-popover-foreground shadow-md\",\n          content: \"flex min-w-0 flex-col gap-0.5\",\n          title: \"font-head text-sm font-medium\",\n          description: \"text-sm text-muted-foreground\",\n          icon: \"shrink-0\",\n          actionButton:\n            \"ms-auto h-fit min-w-fit shrink-0 rounded border-2 border-border bg-primary px-2 py-1 text-xs font-medium text-primary-foreground shadow-sm transition-all duration-200 hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none\",\n          cancelButton:\n            \"ms-auto h-fit min-w-fit shrink-0 rounded border-2 border-border bg-muted px-2 py-1 text-xs font-medium text-foreground shadow-sm transition-all duration-200 hover:translate-x-0.5 hover:translate-y-0.5 hover:shadow-none\",\n          closeButton:\n            \"absolute -top-2 -start-2 rounded-full border-2 border-border bg-background p-0.5 transition-colors hover:bg-muted\",\n          success: \"[&_[data-icon]]:text-chart-2\",\n          warning: \"[&_[data-icon]]:text-chart-1\",\n          error: \"[&_[data-icon]]:text-destructive\",\n        },\n      }}\n      {...props}\n    />\n  )\n}\n\nexport { Toaster }\n","type":"registry:ui","target":"components/ui/sonner.tsx"}],"type":"registry:ui"}