{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkbox",
  "title": "Checkbox",
  "description": "Checkbox primitive with Circle styling.",
  "dependencies": [
    "@radix-ui/react-checkbox"
  ],
  "registryDependencies": [
    "@circle-ui/utils"
  ],
  "files": [
    {
      "path": "registry/berlin/circle-ui/checkbox.tsx",
      "content": "// Generated from packages/ui/src/components/checkbox.tsx\n\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\n\nimport { cn } from \"@/registry/berlin/lib/utils\";\n\nfunction CheckIcon({ className }: { className?: string }) {\n  return (\n    <svg\n      className={className}\n      viewBox=\"0 0 12 12\"\n      fill=\"none\"\n      aria-hidden=\"true\"\n    >\n      <path\n        d=\"M10.9 3.77 4.9 9.77a.65.65 0 0 1-.9 0L1.47 7.15a.66.66 0 0 1 .93-.93L4.5 8.33l5.6-5.6a.66.66 0 0 1 .93.93l-.13.11Z\"\n        fill=\"currentColor\"\n      />\n    </svg>\n  );\n}\n\nexport interface CheckboxProps extends Omit<\n  React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n  \"checked\" | \"defaultChecked\" | \"onChange\" | \"onCheckedChange\"\n> {\n  label?: string;\n  checked?: boolean;\n  defaultChecked?: boolean;\n  onChange?: (checked: boolean) => void;\n}\n\nexport const Checkbox = React.forwardRef<\n  React.ElementRef<typeof CheckboxPrimitive.Root>,\n  CheckboxProps\n>(\n  (\n    {\n      checked,\n      defaultChecked = false,\n      onChange,\n      label,\n      className,\n      disabled,\n      id,\n      ...props\n    },\n    ref,\n  ) => {\n    const reactId = React.useId();\n    const checkboxId = id ?? `checkbox-${reactId}`;\n\n    return (\n      <div className={cn(\"flex items-start gap-2\", className)}>\n        <CheckboxPrimitive.Root\n          ref={ref}\n          id={checkboxId}\n          checked={checked}\n          defaultChecked={defaultChecked}\n          disabled={disabled}\n          onCheckedChange={(value) => onChange?.(value === true)}\n          className={cn(\n            \"group relative inline-flex size-6 shrink-0 items-center justify-center rounded-md text-inverse-background transition-[color,box-shadow]\",\n            \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n            \"disabled:cursor-not-allowed disabled:opacity-50\",\n          )}\n          {...props}\n        >\n          <span\n            aria-hidden=\"true\"\n            className=\"pointer-events-none absolute left-1/2 top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-[4px] border border-checkbox-border transition-[background-color,border-color] group-data-[state=checked]:border-checkbox-checked group-data-[state=checked]:bg-checkbox-checked\"\n          />\n          <CheckboxPrimitive.Indicator className=\"pointer-events-none absolute left-1/2 top-1/2 flex size-3 -translate-x-1/2 -translate-y-1/2 items-center justify-center\">\n            <CheckIcon className=\"size-3\" />\n          </CheckboxPrimitive.Indicator>\n        </CheckboxPrimitive.Root>\n        {label ? (\n          <label\n            htmlFor={checkboxId}\n            className={cn(\n              \"min-w-0 flex-1 text-left text-sm leading-6 tracking-[-0.14px] text-muted-foreground\",\n              disabled && \"cursor-not-allowed opacity-60\",\n            )}\n          >\n            {label}\n          </label>\n        ) : null}\n      </div>\n    );\n  },\n);\n\nCheckbox.displayName = \"Checkbox\";\n",
      "type": "registry:ui",
      "target": "src/components/circle/ui/checkbox.tsx"
    }
  ],
  "type": "registry:ui"
}