{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "title": "Checkbox",
  "author": "AniBT <https://anibt.net>",
  "description": "AniBT candy checkbox: an 18px box that turns candy with a white tick that pops in; indeterminate shows a dash.",
  "dependencies": [
    "lucide-react",
    "radix-ui"
  ],
  "registryDependencies": [
    "@anibt/theme"
  ],
  "files": [
    {
      "path": "registry/anibt/ui/checkbox.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { CheckIcon, MinusIcon } from \"lucide-react\"\nimport { Checkbox as CheckboxPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * Checkbox — A's candy box (AniBT 「贴纸手账」).\n *\n * 18px on radius 6: paper inside a 1.5px `--input` ring when empty (pink\n * under the pointer); checked is candy with a deeper bottom edge and a white\n * tick that pops in; indeterminate is the same candy with a dash. A ticked\n * box always shows its tick — the state never rides on colour alone.\n *\n * Focus is a 2px `--ring` outline 2px outside, so it never replaces the\n * box's own ring; invalid is the same outline in red. Disabled is the sunk\n * well under the weak ink, checked or not — still readable, never an\n * opacity wash. The hit area reaches 8px past the box.\n *\n * The paint is the `anibt-check` / `anibt-check-on` recipe spelled out in\n * classes, so the disabled compounds below win by order, not by luck.\n */\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n  return (\n    <CheckboxPrimitive.Root\n      data-slot=\"checkbox\"\n      className={cn(\n        \"group/checkbox peer relative inline-flex size-[18px] shrink-0 items-center justify-center rounded-[6px] bg-card text-anibt-candy-ink shadow-[inset_0_0_0_1.5px_var(--input)] outline-hidden transition-[background-color,box-shadow] duration-150 after:absolute after:-inset-2\",\n        \"enabled:hover:shadow-[inset_0_0_0_1.5px_var(--anibt-wash-line)]\",\n        \"data-[state=checked]:bg-anibt-candy-edge data-[state=checked]:bg-(image:--anibt-candy) data-[state=checked]:shadow-[0_1px_0_var(--anibt-candy-edge)]\",\n        \"data-[state=indeterminate]:bg-anibt-candy-edge data-[state=indeterminate]:bg-(image:--anibt-candy) data-[state=indeterminate]:shadow-[0_1px_0_var(--anibt-candy-edge)]\",\n        \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid\",\n        \"aria-invalid:outline-2 aria-invalid:outline-offset-2 aria-invalid:outline-anibt-danger-fill aria-invalid:outline-solid\",\n        \"disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground disabled:shadow-[inset_0_0_0_1.5px_var(--border)]\",\n        \"disabled:data-[state=checked]:bg-anibt-deep2 disabled:data-[state=checked]:bg-none disabled:data-[state=checked]:shadow-[inset_0_0_0_1.5px_var(--border)]\",\n        \"disabled:data-[state=indeterminate]:bg-anibt-deep2 disabled:data-[state=indeterminate]:bg-none disabled:data-[state=indeterminate]:shadow-[inset_0_0_0_1.5px_var(--border)]\",\n        className\n      )}\n      {...props}\n    >\n      <CheckboxPrimitive.Indicator\n        data-slot=\"checkbox-indicator\"\n        className=\"grid place-content-center text-current transition-none\"\n      >\n        <CheckIcon\n          className=\"size-3 animate-anibt-pop group-data-[state=indeterminate]/checkbox:hidden\"\n          strokeWidth={3.5}\n          aria-hidden=\"true\"\n        />\n        <MinusIcon\n          className=\"hidden size-3 group-data-[state=indeterminate]/checkbox:block\"\n          strokeWidth={3.5}\n          aria-hidden=\"true\"\n        />\n      </CheckboxPrimitive.Indicator>\n    </CheckboxPrimitive.Root>\n  )\n}\n\nexport { Checkbox }\n",
      "type": "registry:ui"
    }
  ],
  "categories": [
    "forms"
  ],
  "type": "registry:ui"
}