{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "title": "Ninaero checkbox",
  "dependencies": [
    "@base-ui/react@^1.9.0",
    "cn@^0.4.0"
  ],
  "registryDependencies": [
    "https://ninaero.pages.dev/r/theme.json",
    "https://ninaero.pages.dev/r/icons.json",
    "https://ninaero.pages.dev/r/sound-provider.json"
  ],
  "files": [
    {
      "path": "registry/ninaero/ui/checkbox.tsx",
      "content": "\"use client\";\n\nimport { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\";\nimport { cn } from \"cn\";\n\nimport { CheckIcon, MinusIcon } from \"@/lib/icons\";\n\nimport { useControlSound, HoverSound } from \"./sound-feedback\";\n\nfunction Checkbox({\n  className,\n  onCheckedChange,\n  sound = true,\n  ...props\n}: CheckboxPrimitive.Root.Props & { sound?: boolean }) {\n  const { play } = useControlSound(sound);\n  return (\n    <HoverSound sound={sound}>\n      <CheckboxPrimitive.Root\n        data-slot=\"checkbox\"\n        className={cn(\n          \"ninaero-checkbox group/checkbox peer relative flex size-5 shrink-0 items-center justify-center rounded-[4px] after:absolute after:-inset-x-3 after:-inset-y-2\",\n          className,\n        )}\n        {...props}\n        onCheckedChange={(checked, details) => {\n          onCheckedChange?.(checked, details);\n          if (sound && !details.isCanceled && details.event.type !== \"reset\") {\n            play(checked ? \"on\" : \"off\");\n          }\n        }}\n      >\n        <CheckboxPrimitive.Indicator\n          data-slot=\"checkbox-indicator\"\n          className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n        >\n          <CheckIcon className=\"group-data-indeterminate/checkbox:hidden\" />\n          <MinusIcon className=\"hidden group-data-indeterminate/checkbox:block\" />\n        </CheckboxPrimitive.Indicator>\n      </CheckboxPrimitive.Root>\n    </HoverSound>\n  );\n}\n\nexport { Checkbox };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}