import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const datePickerVariants = cva( "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", { variants: { variant: { default: "", error: "border-destructive focus-visible:ring-destructive", }, }, defaultVariants: { variant: "default", }, } ) export interface DatePickerProps extends Omit, 'type' | 'value' | 'onChange'>, VariantProps { value?: string | null onChange?: (date: string | null) => void } const DatePicker = React.forwardRef( ({ className, variant, value, onChange, ...props }, ref) => { const handleChange = (e: React.ChangeEvent) => { const newValue = e.target.value || null onChange?.(newValue) } return ( ) } ) DatePicker.displayName = "DatePicker" export { DatePicker, datePickerVariants }