{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "checkbox", "type": "registry:ui", "title": "Checkbox", "files": [ { "path": "ui/checkbox.tsrx", "type": "registry:ui", "target": "components/ui/checkbox.tsrx", "content": "// Base UI base checkbox — runs on the @octanejs/base-ui `Checkbox` primitive.\n//\n// THE CONDITIONAL UTILITIES ARE ADAPTED, NOT COPIED, and the reason is structural rather than\n// stylistic. Base UI's Checkbox.Root renders a `` — verified by rendering\n// it, not assumed — with a visually-hidden native `` alongside it for form submission.\n// A `` is never `:disabled`, so Tailwind's `disabled:` variant (which compiles to the\n// `:disabled` pseudo-class) can NEVER match. The primitive publishes `data-disabled` instead:\n//\n// radix base: `disabled:opacity-50` -> matches, Root is a real button\n// base-ui base: `data-disabled:opacity-50` <- what this file uses\n//\n// `data-checked:` needs no change — the radix base already uses that exact form, and Base UI\n// emits `data-checked`/`data-unchecked` too. `focus-visible:` also stays: the span carries\n// tabindex, so the native pseudo-class applies.\n//\n// UNVERIFIED PROVENANCE: the non-conditional utilities are taken from this package's radix base\n// rather than transcribed from upstream's Base UI source.\nimport { Checkbox as CheckboxPrimitive } from '@octanejs/base-ui/checkbox';\nimport { CheckIcon } from '@octanejs/lucide';\n\nimport { cn } from '@/lib/utils';\n\nexport interface CheckboxProps extends Record {\n\tclassName?: string;\n}\n\nexport function Checkbox({ className, ...props }: CheckboxProps) @{\n\t\n\t\tsvg]:size-3.5\"\n\t\t>\n\t\t\t\n\t\t\n\t\n}\n" } ], "dependencies": [ "@octanejs/base-ui@0.1.36", "@octanejs/lucide@0.1.33" ], "registryDependencies": [ "@octane/utils" ] }