import { DatePreset } from "./presets.cjs"; import { WidthProp } from "@marigold/system"; import RAC from "react-aria-components"; import { DateValue } from "react-aria-components/Calendar"; type RemovedProps = 'isDateUnavailable' | 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style'; export interface CalendarProps extends Omit, RemovedProps> { /** * Disables the Calendar. * @default false */ disabled?: boolean; /** * Whether the calendar value is immutable. * @default false */ readOnly?: boolean; /** * Visual variant of the component. Which values exist is defined by the theme * and listed in the "Appearance" section of the component's documentation. */ variant?: string; /** * Size of the component. Which values exist is defined by the theme and listed * in the "Appearance" section of the component's documentation. */ size?: string; /** * Sets the width of the calendar. You can see allowed tokens here: https://tailwindcss.com/docs/width * @default fit */ width?: WidthProp['width']; /** * Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. */ dateUnavailable?: RAC.CalendarProps['isDateUnavailable']; /** * The number of months to display at once. Up to 3 months are supported. * @default { months: 1 } */ visibleDuration?: { months: 1 | 2 | 3; }; /** * Controls how the calendar pages when navigating. * - 'single': Page by one month at a time * - 'visible': Page by the number of visible months * @default 'visible' */ pageBehavior?: RAC.CalendarProps['pageBehavior']; /** * Quick-select presets rendered as a rail beside the calendar. On small * screens the grid renders first, topped by a "Quick selection" row that * opens the preset list — in a tray for inline calendars; inside a * picker's tray the sheet switches to the list in place. Accepts built-in * keys (see `BuiltInDatePresetKey`) with localized labels, and custom * presets with a `label` and a date value or resolver function. Selecting * a preset sets the date; the preset matching the current selection shows * as selected. Presets that fall outside `minValue`/`maxValue` or are * unavailable are disabled. */ presets?: readonly DatePreset[]; } declare const Calendar: ({ disabled, readOnly, size, variant, width, dateUnavailable, minValue, maxValue, visibleDuration, pageBehavior, presets, ...rest }: CalendarProps) => import("react").JSX.Element; export { Calendar };