{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toast",
  "title": "Toast",
  "description": "shadcn's Base UI toast, restyled to the brand. Mount one <Toaster /> as a SIBLING of the app's content and raise a toast from anywhere with toast.add({ title, description }) — the manager is created at module scope, so a handler needs no hook and no provider in scope. The five status types (success, info, warning, error, loading) are DROPPED, as the button `link` variant was: the brand's one attention colour is orange, orange is never text on the light ground, and a coloured status ladder cannot be rendered honestly on these tokens. Base UI's `type` still reaches the DOM as data-type, so a future status has a seam. Raised surface with the kit radius, the overlay shadow and a themed hairline; entrance, stack transform and swipe all collapse under motion-reduce; the viewport sits above the popover layer, because a toast is often raised BY something inside an open overlay.",
  "dependencies": [
    "@base-ui/react@1.9.0",
    "lucide-react@1.33.0"
  ],
  "registryDependencies": [
    "@waimakers/utils",
    "@waimakers/theme",
    "@waimakers/button"
  ],
  "files": [
    {
      "path": "src/components/ui/toast.tsx",
      "content": "import { Toast as ToastPrimitive } from \"@base-ui/react/toast\";\nimport { XIcon } from \"lucide-react\";\n\nimport { cn, focusRing } from \"../../lib/utils\";\nimport { Button } from \"./button\";\n\nconst toast = ToastPrimitive.createToastManager();\n\nfunction ToastProvider({ ...props }: ToastPrimitive.Provider.Props) {\n  return <ToastPrimitive.Provider {...props} />;\n}\n\nfunction ToastPortal({ ...props }: ToastPrimitive.Portal.Props) {\n  return <ToastPrimitive.Portal data-slot=\"toast-portal\" {...props} />;\n}\n\nfunction ToastViewport({ className, ...props }: ToastPrimitive.Viewport.Props) {\n  return (\n    <ToastPrimitive.Viewport\n      data-slot=\"toast-viewport\"\n      className={cn(\n        \"pointer-events-none fixed inset-x-4 bottom-4 z-(--z-toast,100) mx-auto w-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction Toast({ className, ...props }: ToastPrimitive.Root.Props) {\n  return (\n    <ToastPrimitive.Root\n      data-slot=\"toast\"\n      className={cn(\n        \"group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-md border border-border bg-popover text-popover-foreground shadow-brand-overlay will-change-transform select-none\",\n        focusRing,\n        \"[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]\",\n        \"h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_var(--ease),opacity_500ms_var(--ease),height_150ms_var(--ease)] motion-reduce:transition-none\",\n        \"after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']\",\n        \"data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]\",\n        \"data-limited:opacity-0 data-starting-style:[transform:translateY(150%)] motion-reduce:data-starting-style:[transform:none]\",\n        \"[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]\",\n        \"data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]\",\n        \"data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]\",\n        \"data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]\",\n        \"data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]\",\n        \"data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]\",\n        \"data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]\",\n        \"data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]\",\n        \"data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction ToastContent({ className, ...props }: ToastPrimitive.Content.Props) {\n  return (\n    <ToastPrimitive.Content\n      data-slot=\"toast-content\"\n      className={cn(\n        \"flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-(--dur-base,220ms) ease-brand data-behind:opacity-0 data-expanded:opacity-100 motion-reduce:transition-none\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction ToastTitle({ className, ...props }: ToastPrimitive.Title.Props) {\n  return (\n    <ToastPrimitive.Title\n      data-slot=\"toast-title\"\n      className={cn(\"text-sm font-medium\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction ToastDescription({ className, ...props }: ToastPrimitive.Description.Props) {\n  return (\n    <ToastPrimitive.Description\n      data-slot=\"toast-description\"\n      className={cn(\"text-sm text-muted-foreground\", className)}\n      {...props}\n    />\n  );\n}\n\nconst toastActionRender = <Button type=\"button\" variant=\"outline\" size=\"sm\" />;\nconst toastCloseRender = <Button type=\"button\" variant=\"ghost\" size=\"icon\" />;\n\nfunction ToastAction({\n  className,\n  render = toastActionRender,\n  ...props\n}: ToastPrimitive.Action.Props) {\n  return (\n    <ToastPrimitive.Action\n      data-slot=\"toast-action\"\n      render={render}\n      className={cn(\"shrink-0\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction ToastClose({\n  className,\n  children,\n  render = toastCloseRender,\n  ...props\n}: ToastPrimitive.Close.Props) {\n  return (\n    <ToastPrimitive.Close\n      data-slot=\"toast-close\"\n      aria-label=\"Dismiss notification\"\n      render={render}\n      className={cn(\n        \"relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground\",\n        className,\n      )}\n      {...props}\n    >\n      {children ?? <XIcon aria-hidden=\"true\" />}\n    </ToastPrimitive.Close>\n  );\n}\n\nfunction ToastList() {\n  const { toasts } = ToastPrimitive.useToastManager();\n\n  return toasts.map((toastItem) => (\n    <Toast key={toastItem.id} toast={toastItem}>\n      <ToastContent>\n        <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n          <ToastTitle />\n          <ToastDescription />\n        </div>\n        <ToastAction />\n        <ToastClose />\n      </ToastContent>\n    </Toast>\n  ));\n}\n\nfunction Toaster({ children, toastManager = toast, ...props }: ToastPrimitive.Provider.Props) {\n  return (\n    <ToastProvider toastManager={toastManager} {...props}>\n      {children}\n      <ToastPortal>\n        <ToastViewport>\n          <ToastList />\n        </ToastViewport>\n      </ToastPortal>\n    </ToastProvider>\n  );\n}\n\nconst createToastManager = ToastPrimitive.createToastManager;\nconst useToastManager = ToastPrimitive.useToastManager;\n\nexport {\n  Toast,\n  ToastAction,\n  ToastClose,\n  ToastContent,\n  ToastDescription,\n  ToastPortal,\n  ToastProvider,\n  ToastTitle,\n  ToastViewport,\n  Toaster,\n  createToastManager,\n  toast,\n  useToastManager,\n};\n",
      "type": "registry:ui",
      "target": "components/ui/toast.tsx"
    }
  ],
  "type": "registry:ui"
}