import { CalendarDatesDisabled, CalendarPicker, CalendarSelection, CalendarValue } from './types'; import { CalendarBaseProps } from '../CalendarBase'; export interface CalendarProps extends Omit { /** * Upper date boundary for navigation and selection. * - Months and years beyond this date become unavailable. * - Day, Month, and Year pickers use this to disable or clamp navigation. */ to?: Date; /** * Lower date boundary for navigation and selection. * - Months and years before this date become unavailable. * - All pickers respect this constraint when computing active ranges. */ from?: Date; /** * Selection mode. * Determines the structure of the returned `value`: * - 'single' — a single `Date` * - 'multiple' — an array of `Date` * - 'range' — a tuple `[start: Date | null, end: Date | null]` * * Default: `'single'` */ selection?: S; /** * Controls which picker view is currently active. * - 'day' — standard calendar grid * - 'month' — month selection view * - 'year' — year selection view * * When controlled, it overrides the internal picker state. */ picker?: CalendarPicker; /** * Controlled selection value. * Shape depends on the `selection` mode: * - single: `Date | undefined` * - multiple: `Date[] | undefined` * - range: `[Date | null, Date | null] | undefined` */ value?: CalendarValue; /** * Uncontrolled initial selection value. * Shape depends on the `selection` mode: * - single: `Date | undefined` * - multiple: `Date[] | undefined` * - range: `[Date | null, Date | null] | undefined` */ defaultValue?: CalendarValue; /** * Uncontrolled initial picker view. * Used only on first render when `picker` is not controlled. * * Default: `'day'` */ defaultPicker?: CalendarPicker; /** * Disables specific dates. * Can be: * - a single `Date` * - an array of `Date` * - a predicate `(date: Date) => boolean` * * Used to gray out or prevent interaction with certain days in the grid. */ disabled?: CalendarDatesDisabled; /** * Fires when the visible date changes (e.g., via scrolling or picker). * This event represents *view navigation*, not selection. */ onChangeDate?(date: Date): void; /** * Fires when the selected value changes. * The value type depends on the selected mode: * - 'single' → `Date | undefined` * - 'multiple' → `Date[]` * - 'range' → `[Date | null, Date | null]` */ onChange?(value: CalendarValue): void; /** * Fires when the active picker view changes. * Useful for synchronizing UI (e.g., closing external popovers or * updating analytics on mode switches). */ onChangePicker?(picker: CalendarPicker): void; /** * Reference date used as a logical anchor for indexed or virtualized pickers. * * This does not affect selection directly, but helps stabilize * scroll-based navigation. */ referenceDate?: Date; /** * Controlled visible date. */ date?: Date; /** * Initial visible date for uncontrolled usage. */ defaultDate?: Date; /** * Controlled active (focused) day value. * * Represented as a timestamp for consistency across pickers. */ activeDay?: number; /** * Initial active day for uncontrolled usage. */ defaultActiveDay?: number; /** * Fires when the active day changes due to keyboard or programmatic focus. */ onChangeActiveDay?(activeDay: number | undefined): void; } /** * `Calendar` is the high-level, fully featured calendar component that * composes: * - the visual shell from `CalendarBase`, and * - all calendar interaction logic via `CalendarContext`. * * It coordinates day, month, and year views; synchronizes scroll-based * navigation with visible dates; and manages controlled/uncontrolled * selection state for single, multiple, and range selection modes. */ export declare const Calendar: ({ to, from, value, picker, disabled, size, defaultValue, referenceDate, date: _date, defaultDate, defaultActiveDay, activeDay: _activeDay, onChangeActiveDay, variant, selection, defaultPicker, onChangePicker, onChangeDate, onChange, children, ...props }: CalendarProps) => import("react/jsx-runtime").JSX.Element;