/** * Unstyled month calendar (React Aria `Calendar` parts; the keys of ``, APG date * picker grid): a `Grid` of `Day` buttons (the month's own weeks; six with `showOutsideDays`) with one roving tab stop. ←/→ day, ↑/↓ * week, Home/End week start/end, PageUp/PageDown month, Shift+Page year, Enter/Space pick; DOM focus * follows the keys. `PrevButton` / `NextButton` step the month (off when that month lies outside * `min` / `max`); `YearInput` takes a typed year once it has four digits, its `YearStep`s step it; * `TodayButton` picks today. `Heading` is the polite live region the grid is named by — keep it * (it can be visually hidden). * * On its own it holds the shown month (`defaultFocusDate`, or controlled `focusDate` + * `onFocusDateChange`) and, for a single date, the value (`defaultValue`, or controlled `value`); * `onPick` hears each pick. A range (`range`, `value` … `endValue`, `activeField` for the end being * picked, whose preview follows the pointer or the keys) is yours to hold — or put the calendar in a * `DatePicker.Popup`, which fills all of that in (a prop you pass still wins). * * `MonthSelect` / `YearSelect` are Cally's heading selects (`calendar-select-month` / `-year`); `YearInput` * with `YearStep`s is a typed year box instead. * * Several months (`months`, 1 to 12) show side by side: put the grid in `Months`, which repeats it for * each month on show, with a `MonthTitle` over it (the heading's selects then show the first one). They show only their own days; ‹ › turn the whole page, or one month with `pageBy="single"`; * focus moved past the page turns it (Cally's paging). Twelve months paged by the page show a calendar year. * * Cally's options: `today` (the day marked as today), `weekdayFormat`, `showWeekNumbers` (an ISO week * number `` before each week), `showOutsideDays` (other months' days fill the six * weeks; by default they are empty cells and a week of none is left out, as Cally), `onPageChange` (the month shown changed). ←/→ follow right-to-left. * * State shows as data attributes on `Day`: `data-selected`, `data-today`, `data-outside-month`, * `data-disabled` (refused: outside `min` / `max` or by `isDateDisabled`), `data-in-range`, * `data-range-start`, `data-range-end` (the chosen or previewed end); `data-range` on `Root`. * `useCellContext()` inside a `Cell` gives the same as values. * * ```tsx * …}> * ‹ * * › * * * {(d) => } * {(d) => } * * * ``` */ export type { CalendarHandle } from './lib/calendar-link.js'; export { useCalendarContext, type DayState } from './calendar-context.js'; export { Root, type RootProps } from './calendar-root.tsx'; export { Heading, MonthName, MonthSelect, NextButton, PrevButton, YearInput, YearSelect, YearStep } from './calendar-header.tsx'; export { Cell, Day, Grid, GridBody, GridHeader, HeaderCell, Months, MonthTitle, TodayButton, useCellContext } from './calendar-grid.tsx';