import { ChevronLeft, ChevronRight } from "lucide-react"; import { DayPicker } from "react-day-picker"; import { cn } from "@/lib/utils"; import { buttonVariants } from "@/components/ui/button"; import { useDateLocale } from "@/hooks/use-date-locale"; export type CalendarProps = React.ComponentProps; function Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) { const locale = useDateLocale(); return ( button]:bg-selected [&>button]:text-white [&>button]:hover:bg-selected [&>button]:hover:text-white", range_end: "day-range-end !bg-accent rounded-r-md [&>button]:bg-selected [&>button]:text-white [&>button]:hover:bg-selected [&>button]:hover:text-white", selected: cn( props.mode === "range" ? " [&>button]:hover:bg-selected [&>button]:hover:text-white focus:bg-selected focus:text-white [&>button]:aria-selected:text-primary" : " [&>button]:bg-selected [&>button]:text-white [&>button]:hover:bg-selected [&>button]:hover:text-white focus:bg-selected focus:text-white rounded-md", ), today: "bg-muted text-muted-foreground !rounded-md", outside: "day-outside text-muted-foreground opacity-50 !aria-selected:bg-accent/50 !aria-selected:text-muted-foreground !aria-selected:opacity-30", disabled: "text-muted-foreground opacity-50", range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground", hidden: "invisible", ...classNames, }} components={{ Chevron: ({ ...props }) => props.orientation === "left" ? ( ) : ( ), }} {...props} /> ); } Calendar.displayName = "Calendar"; export { Calendar };