1 | import { CalendarDay } from "./classes/CalendarDay.js";
|
2 | import { CalendarMonth } from "./classes/CalendarMonth.js";
|
3 | import type { DayPickerProps } from "./types/props.js";
|
4 | import type { SelectedValue, SelectHandler } from "./types/selection.js";
|
5 | import { Modifiers } from "./types/shared.js";
|
6 | export declare const dayPickerContext: import("react").Context<DayPickerContext<DayPickerProps> | undefined>;
|
7 | export type DayPickerContext<T extends DayPickerProps> = {
|
8 |
|
9 | months: CalendarMonth[];
|
10 |
|
11 | nextMonth: Date | undefined;
|
12 |
|
13 | previousMonth: Date | undefined;
|
14 |
|
15 | goToMonth: (month: Date) => void;
|
16 |
|
17 | getModifiers: (day: CalendarDay) => Modifiers;
|
18 |
|
19 | selected: SelectedValue<T> | undefined;
|
20 |
|
21 | select: SelectHandler<T> | undefined;
|
22 |
|
23 | isSelected: ((date: Date) => boolean) | undefined;
|
24 | };
|
25 | /**
|
26 | * Return the context to work with `<DayPicker />` inside custom components.
|
27 | *
|
28 | * @group Hooks
|
29 | * @see https://daypicker.dev/guides/custom-components
|
30 | */
|
31 | export declare function useDayPicker<T extends DayPickerProps>(props?: T): DayPickerContext<T>;
|
32 |
|
\ | No newline at end of file |