UNPKG

@arolariu/components

Version:

🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

39 lines • 1.47 kB
import * as React from "react"; import { DayPicker, type DateRange, type DayPickerProps, type Matcher } from "react-day-picker"; import { Button } from "./button"; /** * Props for the shared calendar component. */ type CalendarProps = React.ComponentProps<typeof DayPicker> & { /** * Visual variant applied to the navigation buttons. * @default "ghost" */ buttonVariant?: React.ComponentProps<typeof Button>["variant"]; }; /** * Renders a styled calendar built on top of `react-day-picker`. * * @remarks * - Renders the `DayPicker` calendar root * - Built on `react-day-picker` with shared button styling from the component library * - Preserves the V1 public API while aligning visuals with the current design system * - Overrides the default DayPicker `Root`, `Chevron`, `DayButton`, and `WeekNumber` * components while still allowing consumers to replace them through the `components` prop * - Override the default chevron icons with `components={{Chevron: YourChevronComponent}}` * * @example * ```tsx * <Calendar * mode='single' * selected={new Date()} * onSelect={(date) => console.log(date)} * /> * ``` * * @see {@link https://daypicker.dev | React Day Picker Docs} */ declare const Calendar: React.ForwardRefExoticComponent<CalendarProps & React.RefAttributes<HTMLDivElement>>; export { Calendar }; export type { CalendarProps, DateRange, DayPickerProps, Matcher }; //# sourceMappingURL=calendar.d.ts.map