import { type DateRange } from '@daypicker/react'; import { type ReactElement, type ReactNode } from 'react'; import { type FieldBoxSize } from './fieldBox.js'; export interface DatePickerProps { /** As a native date input holds it: `yyyy-MM-dd`, or with `withTime` the local * `yyyy-MM-ddTHH:mm` of `datetime-local`. Empty while nothing is chosen. */ value: string; onValueChange: (value: string) => void; /** A time beside the date. */ withTime?: boolean | undefined; /** The earliest and latest days, and with `withTime` times, that can be chosen, in the value's * format. */ min?: string | undefined; max?: string | undefined; /** Seconds the time steps by, such as 900 for quarter hours. */ timeStep?: number | undefined; /** Leaves out the clear button, for a field that always holds a date. */ required?: boolean | undefined; disabled?: boolean | undefined; placeholder?: string | undefined; id?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-describedby'?: string | undefined; 'aria-invalid'?: boolean | undefined; 'aria-required'?: boolean | undefined; /** `sm` for dense places such as toolbars and table cells, `lg` for a form that stands alone, * such as sign-in. */ size?: FieldBoxSize | undefined; /** On the row that holds the date and the time: its width or margin. */ className?: string | undefined; /** Renders the field as this button, such as a chip that says the date its own way. The * button shows the date itself; `placeholder` and `size` then go unused. */ trigger?: ReactElement | undefined; /** A hint on the trigger button. */ triggerTooltip?: ReactNode; /** The edge of the field the calendar lines up with. */ align?: 'start' | 'end' | undefined; } /** * A day from a calendar, and with `withTime` a time beside it. The value is a string as a native * date or datetime-local input holds it, so it reads the same in forms and URLs; months, weekdays * and the shown date follow the reader's locale. */ export declare function DatePicker({ value, onValueChange, withTime, min, max, timeStep, required, disabled, placeholder, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, size, className, trigger, triggerTooltip, align, }: DatePickerProps): import("react").JSX.Element; export type CalendarProps = { /** The earliest and latest days that can be chosen. */ min?: Date | undefined; max?: Date | undefined; /** The month it opens on, when it differs from the chosen day's. */ defaultMonth?: Date | undefined; /** Moves focus to the chosen day, or today, as it appears. */ autoFocus?: boolean | undefined; } & ({ mode: 'single'; selected: Date | undefined; onSelect: (day: Date | undefined) => void; } | { /** Two days, both included; the second click ends the range. */ mode: 'range'; selected: DateRange | undefined; onSelect: (range: DateRange | undefined) => void; }); /** The month grid DatePicker opens, for a panel that holds a calendar in place, such as a * date filter's picker. Months, weekdays and labels follow the reader's locale. */ export declare function Calendar({ min, max, defaultMonth, autoFocus, ...props }: CalendarProps): import("react").JSX.Element;