// Tremor Raw Calendar [v0.0.2] "use client"; import * as React from "react"; import { addYears, format, isSameMonth } from "date-fns"; import { DayPicker, useDayPicker, useDayRender, useNavigation, type DayPickerRangeProps, type DayPickerSingleProps, type DayProps, type Matcher, } from "react-day-picker"; import { cx, focusRing } from "../../lib/utils"; import { ChevronDoubleLeftIcon, ChevronDoubleRightIcon, ChevronLeftIcon, ChevronRightIcon, } from "@heroicons/react/20/solid"; interface NavigationButtonProps extends React.HTMLAttributes { onClick: () => void; icon: React.ElementType; disabled?: boolean; } const NavigationButton = React.forwardRef< HTMLButtonElement, NavigationButtonProps >( ( { onClick, icon, disabled, ...props }: NavigationButtonProps, forwardedRef ) => { const Icon = icon; return ( ); } ); NavigationButton.displayName = "NavigationButton"; type OmitKeys = { [P in keyof T as P extends K ? never : P]: T[P]; }; type KeysToOmit = "showWeekNumber" | "captionLayout" | "mode"; type SingleProps = OmitKeys; type RangeProps = OmitKeys; type CalendarProps = | ({ mode: "single"; } & SingleProps) | ({ mode?: undefined; } & SingleProps) | ({ mode: "range"; } & RangeProps); const Calendar = ({ mode = "single", weekStartsOn = 1, numberOfMonths = 1, enableYearNavigation = false, disableNavigation, locale, className, classNames, ...props }: CalendarProps & { enableYearNavigation?: boolean }) => { return ( (