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