import { t as Grid } from "./grid.types-CRm-ZxMm.js"; import { a as Calendar } from "./grid-CtFRnXoX.js"; import { t as Selection } from "./selection.types-0TRo8T6S.js"; import { t as UseAnnouncer } from "./use-announcer.types-BWMYvaFG.js"; //#region src/react/use-calendar/use-calendar.types.d.ts declare namespace UseCalendar { interface IUseCalendarConfig extends Calendar.ICalendarConfig { /** Initial selected value for uncontrolled usage. */ defaultSelected?: Selection.CalendarValue | undefined; } interface IDayProps { role: 'gridcell'; 'aria-label': string; 'aria-selected': boolean; 'aria-disabled': boolean; 'aria-current': 'date' | undefined; tabIndex: 0 | -1; 'data-calendar-day': ''; 'data-selected': 'true' | undefined; 'data-today': 'true' | undefined; 'data-disabled': 'true' | undefined; 'data-outside-month': 'true' | undefined; 'data-hidden': 'true' | undefined; 'data-range-middle': 'true' | undefined; 'data-range-start': 'true' | undefined; 'data-range-end': 'true' | undefined; 'data-focused': 'true' | undefined; 'data-weekend': 'true' | undefined; onClick: (e?: { shiftKey?: boolean; }) => void; onMouseEnter: () => void; onKeyDown: React.KeyboardEventHandler; } interface IGridProps { role: 'grid'; 'aria-labelledby': string; 'aria-roledescription': string; /** * Stable per-instance grid id. `useCalendar` uses this to scope DOM focus queries * to its own grid, so multi-calendar pages don't grab the first match across the * whole document. */ 'data-calendar-grid': string; } interface INavProps { 'aria-label': string; disabled: boolean; onClick: () => void; } interface IHeaderProps { id: string; 'aria-live': 'polite'; } interface IUseCalendarReturn { state: { /** The currently visible month. */month: TDate; /** The current selection value. Shape depends on mode. */ value: Selection.CalendarValue; /** The date that currently has keyboard focus. */ focusedDate: TDate; /** Whether we're showing the day grid, month picker, or year picker. */ viewMode: Calendar.ViewMode; /** Decorated weeks for the first (or only) month. */ weeks: Grid.ICalendarWeek[]; /** All month grids when numberOfMonths > 1. */ months: Grid.ICalendarMonth[]; /** Localised weekday header labels (7 items). */ weekdays: string[]; /** Whether forward navigation is possible (respects toDate). */ canGoNext: boolean; /** Whether backward navigation is possible (respects fromDate). */ canGoPrevious: boolean; }; actions: { setMonth: (month: TDate) => void; setViewMode: (mode: Calendar.ViewMode) => void; goToNext: () => void; goToPrevious: () => void; selectDate: (date: TDate, options?: { shiftKey?: boolean; }) => void; focusDate: (date: TDate) => void; }; /** Spread onto each day cell element. */ getDayProps: (day: Grid.ICalendarDay) => IDayProps; /** Spread onto the grid container element. */ getGridProps: () => IGridProps; /** Spread onto prev/next navigation buttons. */ getNavProps: (direction: 'prev' | 'next') => INavProps; /** Spread onto the month/year header element. */ getHeaderProps: () => IHeaderProps; /** Render announcer inside the calendar tree for screen reader announcements. */ announcer: UseAnnouncer.IAnnouncerReturn; } } //#endregion export { UseCalendar as t };