{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "loading-overlay",
  "title": "Loading Overlay",
  "description": "The nx-ui Loading Overlay component.",
  "registryDependencies": [
    "@nx-ui/utils",
    "@nx-ui/spinner"
  ],
  "files": [
    {
      "path": "components/ui/loading-overlay.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Spinner } from \"@/components/ui/spinner\"\n\n/**\n * LoadingOverlay — a translucent, blurred backdrop with a centred spinner and an\n * optional label, covering a container or the whole page.\n *\n * By default it absolutely fills its nearest positioned ancestor (`inset-0`);\n * pass `fullscreen` to cover the viewport. When `open` is false it renders\n * nothing. Ported from the report's UUI loading-overlay spec.\n */\n\nfunction LoadingOverlay({\n  open = true,\n  label,\n  fullscreen = false,\n  spinnerClassName,\n  className,\n  children,\n  ...props\n}: React.ComponentProps<\"div\"> & {\n  /** When false, the overlay is not rendered. */\n  open?: boolean\n  /** Optional text shown beneath the spinner. */\n  label?: React.ReactNode\n  /** Cover the viewport (`fixed`) instead of the parent container. */\n  fullscreen?: boolean\n  spinnerClassName?: string\n}) {\n  if (!open) return null\n\n  return (\n    <div\n      data-slot=\"loading-overlay\"\n      role=\"status\"\n      aria-live=\"polite\"\n      className={cn(\n        \"z-20 flex flex-col items-center justify-center gap-3 bg-background/60 backdrop-blur-[2px]\",\n        fullscreen ? \"fixed inset-0\" : \"absolute inset-0\",\n        className\n      )}\n      {...props}\n    >\n      {children ?? <Spinner className={cn(\"size-8\", spinnerClassName)} />}\n      {label ? (\n        <p className=\"text-sm font-medium text-secondary-foreground\">{label}</p>\n      ) : null}\n    </div>\n  )\n}\n\nexport { LoadingOverlay }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}