"use client"; import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; import { CheckIcon, MinusIcon } from "lucide-react"; import { cn } from "@/lib/utils"; const SIZE_STYLES = { default: { root: "size-6", icon: "size-4", }, sm: { root: "size-5", icon: "size-3.5", }, } as const; type CheckboxSize = keyof typeof SIZE_STYLES; interface CheckboxProps extends React.ComponentProps { /** Size variant: "default" (24px) or "sm" (20px) */ size?: CheckboxSize; /** Show indeterminate state (minus icon) - used for partial selection in trees */ indeterminate?: boolean; } function Checkbox({ className, size = "default", indeterminate, checked, ...props }: CheckboxProps) { const sizeStyles = SIZE_STYLES[size]; return ( {indeterminate ? ( ) : ( )} ); } export { Checkbox }; export type { CheckboxProps, CheckboxSize };