{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "checkbox-card", "title": "Checkbox Card", "description": "Accessible controlled checkbox card with optional icon and pending state.", "registryDependencies": [ "askyourpolicy/ss-registry/stitch-base", "askyourpolicy/ss-registry/checkbox", "askyourpolicy/ss-registry/label", "askyourpolicy/ss-registry/spinner" ], "files": [ { "path": "src/components/ui/checkbox-card.tsx", "content": "\"use client\";\n\nimport { useId, type ReactNode } from \"react\";\n\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport { Label } from \"@/components/ui/label\";\nimport { Spinner } from \"@/components/ui/spinner\";\nimport { cn } from \"@/lib/utils\";\n\ntype CheckboxCardProps = {\n checked: boolean;\n className?: string;\n description?: ReactNode;\n disabled?: boolean;\n icon?: ReactNode;\n id?: string;\n label: ReactNode;\n onCheckedChange?: (checked: boolean) => void;\n pending?: boolean;\n};\n\nfunction CheckboxCard({\n checked,\n className,\n description,\n disabled = false,\n icon,\n id,\n label,\n onCheckedChange,\n pending = false,\n}: CheckboxCardProps) {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n const interactionDisabled = disabled || pending;\n\n return (\n \n {\n if (!pending) onCheckedChange?.(value === true);\n }}\n />\n {icon != null ? (\n \n {icon}\n \n ) : null}\n \n {label}\n {description != null ? (\n \n {description}\n \n ) : null}\n \n {pending ? : null}\n \n );\n}\n\nexport { CheckboxCard, type CheckboxCardProps };\n", "type": "registry:ui" } ], "type": "registry:ui" }