"use client"; import { AnimatePresence, motion, useReducedMotion } from "motion/react"; import { useId } from "react"; import { EASE_OUT, SPRING_PRESS } from "@/lib/ease"; import { cn } from "@/lib/utils"; const CHECK_PATH = "M5 13l4 4L19 7"; const INDETERMINATE_PATH = "M6 12h12"; export interface CheckboxProps { checked: boolean; onCheckedChange: (checked: boolean) => void; disabled?: boolean; indeterminate?: boolean; label?: string; className?: string; id?: string; "aria-label"?: string; } export function Checkbox({ checked, onCheckedChange, disabled, indeterminate, label, className, id: idProp, "aria-label": ariaLabel, }: CheckboxProps) { const autoId = useId(); const id = idProp ?? autoId; const reduce = useReducedMotion(); const showMark = checked || indeterminate; const path = indeterminate ? INDETERMINATE_PATH : CHECK_PATH; return ( ); }