{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toast",
  "title": "Toast",
  "description": "Tetsu toast on @ui-sdk/react, styled with the @tetsustudio/tokens variables.",
  "dependencies": [
    "@ui-sdk/react@0.1.0-beta.5",
    "lucide-react@^1.16.0"
  ],
  "files": [
    {
      "path": "registry/ui/toast.tsx",
      "content": "'use client'\n\nimport {\n  Toast,\n  ToastDescription,\n  ToastRegion,\n  ToastTitle,\n  toast,\n  type ToastRegionProps,\n} from '@ui-sdk/react/toast'\nimport {\n  CircleCheckIcon,\n  InfoIcon,\n  Loader2Icon,\n  OctagonXIcon,\n  TriangleAlertIcon,\n} from 'lucide-react'\n\nconst icons = {\n  success: <CircleCheckIcon className=\"size-4 shrink-0\" aria-hidden=\"true\" />,\n  info: <InfoIcon className=\"size-4 shrink-0\" aria-hidden=\"true\" />,\n  warning: <TriangleAlertIcon className=\"size-4 shrink-0\" aria-hidden=\"true\" />,\n  error: <OctagonXIcon className=\"size-4 shrink-0\" aria-hidden=\"true\" />,\n  loading: <Loader2Icon className=\"size-4 shrink-0 animate-spin\" aria-hidden=\"true\" />,\n} as const\n\n// Pill toasts with inverted colors (ground = text color); errors in red.\n// Stacking and animation come with the item's CSS (data-slot toast-region).\nfunction Toaster(props: Omit<ToastRegionProps, 'children'>) {\n  return (\n    <ToastRegion side=\"top\" align=\"center\" {...props}>\n      {(item) => (\n        <Toast className=\"flex items-center gap-2 rounded-full border border-foreground bg-foreground px-4 py-3 text-sm font-medium text-background shadow-lg data-[type=error]:border-destructive data-[type=error]:bg-destructive data-[type=error]:text-destructive-foreground\">\n          {item.type && item.type in icons ? icons[item.type as keyof typeof icons] : null}\n          <div className=\"flex min-w-0 flex-col\">\n            <ToastTitle />\n            <ToastDescription className=\"text-xs opacity-80 empty:hidden\" />\n          </div>\n        </Toast>\n      )}\n    </ToastRegion>\n  )\n}\n\nexport { Toaster, toast }\n",
      "type": "registry:ui"
    }
  ],
  "css": {
    "@layer components": {
      "[data-slot='toast-region']": {
        "position": "fixed",
        "top": "1rem",
        "left": "50%",
        "z-index": "100",
        "width": "min(356px, calc(100vw - 2rem))",
        "height": "var(--toast-front-height)",
        "translate": "-50% 0"
      },
      "[data-slot='toast-region'][data-expanded]": {
        "height": "calc(var(--toast-stack-height) + (var(--toast-count) - 1) * 12px)"
      },
      "[data-slot='toast']": {
        "--y": "calc(var(--toast-index) * 12px)",
        "position": "absolute",
        "inset-inline": "0",
        "top": "0",
        "z-index": "calc(100 - var(--toast-index))",
        "overflow": "hidden",
        "height": "var(--toast-height)",
        "translate": "var(--toast-swipe-x, 0px) calc(var(--y) + var(--toast-swipe-y, 0px))",
        "scale": "calc(1 - var(--toast-index) * 0.05)",
        "transition-property": "translate, scale, opacity, height",
        "transition-duration": "400ms",
        "user-select": "none"
      },
      "[data-slot='toast']:not([data-front], [data-expanded])": {
        "height": "var(--toast-front-height)"
      },
      "[data-slot='toast'][data-expanded]": {
        "--y": "calc(var(--toast-offset) + var(--toast-index) * 12px)",
        "scale": "1"
      },
      "[data-slot='toast'][data-starting-style], [data-slot='toast'][data-swiping]": {
        "transition": "none"
      },
      "[data-slot='toast'][data-starting-style][data-front]": {
        "--y": "-100%"
      },
      "[data-slot='toast']:is([data-starting-style]:not([data-front]), [data-ending-style])": {
        "opacity": "0"
      },
      "@media (prefers-reduced-motion: reduce)": {
        "[data-slot='toast']": {
          "transition-property": "opacity"
        }
      }
    }
  },
  "type": "registry:ui"
}