{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toggle",
  "title": "Toggle",
  "description": "A button that stays pressed.",
  "dependencies": [
    "@base-ui/react",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/ui/toggle.tsx",
      "content": "'use client';\n\nimport { Toggle as TogglePrimitive } from '@base-ui/react/toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/registry/ndeko/lib/utils';\n\nconst toggleVariants = cva(\n  [\n    'inline-flex shrink-0 cursor-pointer select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-[13px] font-medium text-muted-foreground outline-none',\n    'transition-[color,background-color,box-shadow,scale] duration-150 ease-(--ease-out-strong) hover:bg-foreground/5 hover:text-foreground',\n    'active:not-aria-[haspopup]:scale-[0.97]',\n    'data-pressed:bg-foreground/[0.07] data-pressed:text-foreground',\n    'focus-visible:ring-[3px] focus-visible:ring-ring/25 data-disabled:pointer-events-none data-disabled:opacity-50',\n    \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  ].join(' '),\n  {\n    variants: {\n      variant: {\n        default: '',\n        outline:\n          'bg-card shadow-[0_1px_2px_rgb(0_0_0/0.05)] hairline-ring ring-foreground/12 data-pressed:bg-foreground/[0.05] dark:bg-foreground/[0.04] dark:data-pressed:bg-foreground/[0.09] dark:ring-foreground/15',\n      },\n      size: {\n        sm: 'h-7 min-w-7 px-2',\n        default: 'h-8 min-w-8 px-2.5',\n        lg: 'h-9 min-w-9 px-3',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  }\n);\n\ntype ToggleProps = Omit<TogglePrimitive.Props, 'className'> &\n  VariantProps<typeof toggleVariants> & {\n    className?: string;\n  };\n\nfunction Toggle({ className, variant, size, ...props }: ToggleProps) {\n  return (\n    <TogglePrimitive\n      data-slot='toggle'\n      className={cn(toggleVariants({ variant, size }), className)}\n      {...props}\n    />\n  );\n}\n\nexport { Toggle, toggleVariants, type ToggleProps };\n",
      "type": "registry:ui"
    }
  ],
  "categories": [
    "primitives"
  ],
  "type": "registry:ui"
}