import { zhCN } from "date-fns/locale"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { DayPicker, type DayPickerProps } from "react-day-picker"; import { cn } from "~/lib/utils.ts"; // 日历(react-day-picker v10)的玻璃族皮肤:全部走语义 token + 玻璃 hover // 语言(中性灰纱、选中 primary 药丸 + 顶部内高光、今日描边)。键盘导航 // 与 aria 由 DayPicker 自带。默认中文 locale。 export function Calendar({ className, classNames, ...props }: DayPickerProps) { return ( button]:pill-selected [&>button]:rounded-full", today: "[&>button]:border [&>button]:border-primary/35", outside: "[&>button]:text-muted-foreground/45", disabled: "[&>button]:pointer-events-none [&>button]:opacity-30", hidden: "invisible", ...classNames, }} components={{ Chevron: ({ orientation }) => orientation === "left" ? : , }} {...props} /> ); }