{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "nui-theme-provider",
  "type": "registry:component",
  "dependencies": [
    "@radix-ui/react-slot",
    "@remixicon/react",
    "class-variance-authority",
    "clsx",
    "next-themes",
    "react",
    "tailwind-merge"
  ],
  "files": [
    {
      "type": "registry:component",
      "target": "components/nui/theme-provider.tsx",
      "content": "\"use client\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { RiMoonFill, RiSunFill } from \"@remixicon/react\"\nimport { ThemeProvider as NextThemesProvider, useTheme } from \"next-themes\"\n\nexport const ThemeToggle = () => {\n  const { theme, setTheme } = useTheme()\n\n  const smartToggle = () => {\n    /* The smart toggle by @nrjdalal */\n    const prefersDarkScheme = window.matchMedia(\n      \"(prefers-color-scheme: dark)\",\n    ).matches\n    if (theme === \"system\") {\n      setTheme(prefersDarkScheme ? \"light\" : \"dark\")\n    } else if (\n      (theme === \"light\" && !prefersDarkScheme) ||\n      (theme === \"dark\" && prefersDarkScheme)\n    ) {\n      setTheme(theme === \"light\" ? \"dark\" : \"light\")\n    } else {\n      setTheme(\"system\")\n    }\n  }\n\n  return (\n    <Button\n      variant=\"ghost\"\n      className=\"aspect-square size-full rounded-none [&_svg]:size-5\"\n      onClick={smartToggle}\n      aria-label=\"Switch between system/light/dark version\"\n    >\n      <RiSunFill className=\"dark:hidden\" aria-hidden=\"true\" />\n      <RiMoonFill className=\"hidden dark:block\" aria-hidden=\"true\" />\n    </Button>\n  )\n}\n\nexport const ThemeProvider = ({\n  children,\n  ...props\n}: React.ComponentProps<typeof NextThemesProvider>) => {\n  return (\n    <NextThemesProvider\n      attribute=\"class\"\n      defaultTheme=\"system\"\n      enableSystem\n      disableTransitionOnChange\n      {...props}\n    >\n      {children}\n    </NextThemesProvider>\n  )\n}\n",
      "path": "src/components/nui/theme-provider.tsx"
    },
    {
      "type": "registry:ui",
      "target": "components/ui/button.tsx",
      "content": "import { cn } from \"@/lib/utils\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n  {\n    variants: {\n      variant: {\n        default:\n          \"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90\",\n        destructive:\n          \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40\",\n        outline:\n          \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n        secondary:\n          \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n        ghost: \"hover:bg-accent hover:text-accent-foreground\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n        sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n        lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n        icon: \"size-9\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  },\n)\n\nfunction Button({\n  className,\n  variant,\n  size,\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"button\"> &\n  VariantProps<typeof buttonVariants> & {\n    asChild?: boolean\n  }) {\n  const Comp = asChild ? Slot : \"button\"\n\n  return (\n    <Comp\n      data-slot=\"button\"\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\n",
      "path": "src/components/ui/button.tsx"
    },
    {
      "type": "registry:lib",
      "target": "lib/utils.ts",
      "content": "import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs))\n}\n",
      "path": "src/lib/utils.ts"
    }
  ]
}
