import { type ComponentProps, type RefObject } from 'react'; import type { Era } from '../core/date.js'; /** Where one day stands. */ export interface DayState { date: Date; outsideMonth: boolean; today: boolean; selected: boolean; inRange: boolean; rangeStart: boolean; rangeEnd: boolean; /** Refused: outside `min` / `max` or by `isDateDisabled`. */ disabled: boolean; /** Before `min` or after `max`: a click does nothing (one refused by `isDateDisabled` still takes the focus). */ outsideLimits: boolean; /** Carries the roving tab stop. */ tabStop: boolean; } export interface Names { /** October */ month: (d: Date) => string; /** October 2026 */ monthYear: (d: Date) => string; /** Friday, October 9, 2026 */ day: (d: Date) => string; /** Friday */ weekday: (d: Date) => string; /** The column heading: `weekdayFormat`, else the translation's (Carbon English S M T W Th F S) for its own language, else Intl. */ weekdayShort: (d: Date) => string; /** The week-number column's heading. */ week: string; } export interface CalendarContextValue { id: string; /** The day with the tab stop. */ focusDate: Date; /** The first of the month shown (several months: of the first one). */ month: Date; /** The weeks of `month`. */ weeks: Date[][]; /** The first of each month on show, in order. */ months: Date[]; /** A month's weeks (without other months' days: only the weeks it has days in). */ weeksOf: (month: Date) => Date[][]; /** Other months' days are left out: without `showOutsideDays`, or with several months. */ ownDaysOnly: boolean; /** How far ‹ › turn the page, in months. */ pageStep: number; /** Turn the page by `by` months; focus moves only when its day leaves the page (Cally). */ turnPage: (by: number) => void; /** The day the heading's selects and year box move from: the focused day; several months: that day in the first month. */ headingFocus: Date; /** The year shown (several months: the first one's; Buddhist era when `era` is `be`). */ year: number; locale: string; min: string; max: string; yearBounds: { min?: number; max?: number; }; /** ‹ / › are off: the first / last month on show reaches `min` / `max`. */ nav: { previous: boolean; next: boolean; }; today: Date; era: Era; names: Names; isUnavailable: (date: Date) => boolean; /** Where a day stands, in `month`'s grid (default the first month on show). */ dayState: (date: Date, month?: Date) => DayState; /** Move the tab stop (clamped to `min` / `max`); `fromGrid` (default): DOM focus follows and the range preview drops the pointer's day. */ moveFocus: (date: Date, fromGrid?: boolean) => void; /** Picks `date` unless it is refused. */ pick: (date: Date) => void; /** Show this year (as shown in `era`), same month. */ goToYear: (year: number) => void; /** The day under the pointer (range preview); null when it leaves. */ hover: (date: Date | null) => void; focusDay: () => void; /** The `Root` element, whose grids hold the day with the tab stop. */ root: RefObject; /** The first month's grid, kept for code written before several months; prefer `root`. */ grid: RefObject; firstDay: number; showWeekNumbers: boolean; showOutsideDays: boolean; } export declare const CalendarContext: import("react").Context; /** The month of the enclosing `Months` repeat. */ export declare const MonthContext: import("react").Context; /** The state of the enclosing `Calendar.Root` (the month shown, the weeks, the names …). */ export declare function useCalendarContext(part?: string): CalendarContextValue; /** The month a part stands in: its `Months` repeat's, else the first on show. */ export declare function useMonth(ctx: CalendarContextValue): Date; export type ButtonProps = Omit, 'type'>;