{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "title": "Checkbox",
  "dependencies": [
    "@base-ui/react",
    "@phosphor-icons/react"
  ],
  "registryDependencies": [
    "https://ui.hotfix.jobs/r/recipes.json",
    "https://ui.hotfix.jobs/r/tokens.json",
    "https://ui.hotfix.jobs/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/components/ui/checkbox.tsx",
      "content": "\"use client\";\n\nimport { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\";\nimport type * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { selectionFocus, colorTransition } from \"@/lib/recipes\";\n\nimport { Check, Minus } from \"@phosphor-icons/react/dist/ssr\";\nexport interface CheckboxProps extends CheckboxPrimitive.Root.Props {\n  /** Optional label. When present, the checkbox is wrapped in a `<label>` so clicking the label toggles the box. */\n  children?: React.ReactNode;\n  /** Additional classes for the outer wrapper (only applies when `children` is provided). */\n  wrapperClassName?: string;\n}\n\nexport function Checkbox({\n  className,\n  wrapperClassName,\n  children,\n  disabled,\n  ...props\n}: CheckboxProps): React.ReactElement {\n  const box = (\n    <CheckboxPrimitive.Root\n      disabled={disabled}\n      className={cn(\n        \"inline-flex size-4 shrink-0 items-center justify-center rounded-[var(--radius-4)]\",\n        \"bg-fill-2 hover:bg-hairline-strong\",\n        \"data-checked:bg-ink data-checked:hover:bg-ink\",\n        \"data-indeterminate:bg-ink\",\n        \"data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n        colorTransition,\n        selectionFocus,\n        className,\n      )}\n      data-slot=\"checkbox\"\n      {...props}\n    >\n      <CheckboxPrimitive.Indicator\n        className=\"group flex items-center justify-center\"\n        data-slot=\"checkbox-indicator\"\n        keepMounted\n      >\n        <Check\n          className=\"text-base size-3 group-data-indeterminate:hidden group-data-unchecked:hidden\"\n        />\n        <Minus\n          aria-hidden=\"true\"\n          className=\"text-base hidden size-3 group-data-indeterminate:block\"\n        />\n      </CheckboxPrimitive.Indicator>\n    </CheckboxPrimitive.Root>\n  );\n\n  if (children == null) return box;\n\n  return (\n    <label\n      className={cn(\n        \"inline-flex items-center gap-2 text-small text-ink\",\n        disabled && \"cursor-not-allowed opacity-50\",\n        wrapperClassName,\n      )}\n      data-slot=\"checkbox-label\"\n    >\n      {box}\n      <span>{children}</span>\n    </label>\n  );\n}\n\nexport { CheckboxPrimitive };\n",
      "type": "registry:ui",
      "target": "components/ui/checkbox.tsx"
    }
  ],
  "type": "registry:ui"
}