import { DateRangePreset } from "../Calendar/presets.mjs"; import { FieldBaseProps } from "../FieldBase/FieldBase.mjs"; import { WidthProp } from "@marigold/system"; import RAC from "react-aria-components"; import { DateValue } from "react-aria-components/RangeCalendar"; type RemovedProps = 'isDateUnavailable' | 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style'; export interface RangeCalendarProps extends Omit, RemovedProps>, Pick, 'description' | 'errorMessage'> { /** * Disables the RangeCalendar. * @default false */ disabled?: boolean; /** * Whether the calendar value is immutable. * @default false */ readOnly?: boolean; /** * Whether the value is invalid. * @default false */ error?: boolean; /** * Whether non-contiguous ranges are allowed. * @default false */ allowsNonContiguousRanges?: 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.RangeCalendarProps['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.RangeCalendarProps['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 `BuiltInDateRangePresetKey`) with localized labels, and custom * presets with a `label` and a range value or resolver function. Selecting * a preset sets the range; the preset matching the current selection shows * as selected. Presets that fall outside `minValue`/`maxValue` or hit * unavailable dates are disabled. */ presets?: readonly DateRangePreset[]; } declare const RangeCalendar: ({ disabled, readOnly, error, allowsNonContiguousRanges, errorMessage, description, size, variant, width, dateUnavailable, minValue, maxValue, visibleDuration, pageBehavior, presets, ...rest }: RangeCalendarProps) => import("react").JSX.Element; export { RangeCalendar };