@cleartrip/ct-design-ct-react-day-picker 1.2.0-SNAPSHOT-ctcalendar.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,506 @@
1
+ import * as react from 'react';
2
+ import { CSSProperties, ReactNode, SelectHTMLAttributes, ChangeEventHandler, MouseEvent, FocusEvent, KeyboardEvent, PointerEvent, TouchEvent, InputHTMLAttributes, HTMLProps, RefObject } from 'react';
3
+ import { Locale } from 'date-fns';
4
+
5
+ interface CaptionProps {
6
+ id?: string;
7
+ displayMonth: Date;
8
+ displayIndex?: number | undefined;
9
+ }
10
+ type CaptionLayout = 'dropdown' | 'buttons' | 'dropdown-buttons';
11
+ declare function Caption(props: CaptionProps): JSX.Element;
12
+
13
+ interface CaptionLabelProps {
14
+ id?: string;
15
+ displayMonth: Date;
16
+ displayIndex?: number | undefined;
17
+ }
18
+ declare function CaptionLabel(props: CaptionLabelProps): JSX.Element;
19
+
20
+ interface DayProps {
21
+ displayMonth: Date;
22
+ date: Date;
23
+ }
24
+ declare function Day(props: DayProps): JSX.Element;
25
+
26
+ type Matcher = boolean | ((date: Date) => boolean) | Date | Date[] | DateRange | DateBefore | DateAfter | DateInterval | DayOfWeek;
27
+ type DateAfter = {
28
+ after: Date;
29
+ };
30
+ type DateBefore = {
31
+ before: Date;
32
+ };
33
+ type DateInterval = {
34
+ before: Date;
35
+ after: Date;
36
+ };
37
+ type DateRange = {
38
+ from: Date | undefined;
39
+ to?: Date | undefined;
40
+ };
41
+ type DayOfWeek = {
42
+ dayOfWeek: number[];
43
+ };
44
+ declare function isDateInterval(matcher: unknown): matcher is DateInterval;
45
+ declare function isDateRange(value: unknown): value is DateRange;
46
+ declare function isDateAfterType(value: unknown): value is DateAfter;
47
+ declare function isDateBeforeType(value: unknown): value is DateBefore;
48
+ declare function isDayOfWeekType(value: unknown): value is DayOfWeek;
49
+
50
+ type Modifier = string;
51
+ type Modifiers = CustomModifiers & InternalModifiers;
52
+ declare enum InternalModifier {
53
+ Outside = "outside",
54
+ Disabled = "disabled",
55
+ Selected = "selected",
56
+ Hidden = "hidden",
57
+ Today = "today",
58
+ RangeStart = "range_start",
59
+ RangeEnd = "range_end",
60
+ RangeMiddle = "range_middle"
61
+ }
62
+ type InternalModifiers = Record<InternalModifier, Matcher[]>;
63
+ type ActiveModifiers = Record<Modifier, true> & Partial<Record<InternalModifier, true>>;
64
+ type ModifiersStyles = Record<Modifier, CSSProperties> & Partial<Record<InternalModifier, CSSProperties>>;
65
+ type ModifiersClassNames = Record<Modifier, string> & Partial<Record<InternalModifier, string>>;
66
+ type DayModifiers = Record<Modifier, Matcher | Matcher[]>;
67
+ type CustomModifiers = Record<Modifier, Matcher[]>;
68
+
69
+ interface DayContentProps {
70
+ date: Date;
71
+ displayMonth: Date;
72
+ activeModifiers: ActiveModifiers;
73
+ }
74
+ declare function DayContent(props: DayContentProps): JSX.Element;
75
+
76
+ interface DropdownProps {
77
+ name?: string;
78
+ caption?: ReactNode;
79
+ children?: SelectHTMLAttributes<HTMLSelectElement>['children'];
80
+ className?: string;
81
+ ['aria-label']?: string;
82
+ style?: CSSProperties;
83
+ value?: string | number;
84
+ onChange?: ChangeEventHandler<HTMLSelectElement>;
85
+ }
86
+ declare function Dropdown(props: DropdownProps): JSX.Element;
87
+
88
+ interface FooterProps {
89
+ displayMonth?: Date;
90
+ }
91
+ declare function Footer(props: FooterProps): JSX.Element;
92
+
93
+ type MonthsProps = {
94
+ children: ReactNode;
95
+ };
96
+ declare function Months(props: MonthsProps): JSX.Element;
97
+
98
+ interface RowProps {
99
+ displayMonth: Date;
100
+ weekNumber: number;
101
+ dates: Date[];
102
+ }
103
+ declare function Row(props: RowProps): JSX.Element;
104
+
105
+ interface WeekNumberProps {
106
+ number: number;
107
+ dates: Date[];
108
+ }
109
+ declare function WeekNumber(props: WeekNumberProps): JSX.Element;
110
+
111
+ type DayClickEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: MouseEvent) => void;
112
+ type DayFocusEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: FocusEvent | KeyboardEvent) => void;
113
+ type DayKeyboardEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: KeyboardEvent) => void;
114
+ type DayMouseEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: MouseEvent) => void;
115
+ type DayPointerEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: PointerEvent) => void;
116
+ type MonthChangeEventHandler = (month: Date) => void;
117
+ type SelectMultipleEventHandler = (days: Date[] | undefined, selectedDay: Date, activeModifiers: ActiveModifiers, e: MouseEvent) => void;
118
+ type SelectRangeEventHandler = (range: DateRange | undefined, selectedDay: Date, activeModifiers: ActiveModifiers, e: MouseEvent) => void;
119
+ type SelectSingleEventHandler = (day: Date | undefined, selectedDay: Date, activeModifiers: ActiveModifiers, e: MouseEvent) => void;
120
+ type WeekNumberClickEventHandler = (weekNumber: number, dates: Date[], e: MouseEvent) => void;
121
+ type DayTouchEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: TouchEvent) => void;
122
+
123
+ type DateFormatter = (date: Date, options?: {
124
+ locale?: Locale;
125
+ }) => ReactNode;
126
+ type Formatters = {
127
+ formatCaption: DateFormatter;
128
+ formatMonthCaption: DateFormatter;
129
+ formatYearCaption: DateFormatter;
130
+ formatDay: DateFormatter;
131
+ formatWeekNumber: WeekNumberFormatter;
132
+ formatWeekdayName: DateFormatter;
133
+ };
134
+ type WeekNumberFormatter = (weekNumber: number, options?: {
135
+ locale?: Locale;
136
+ }) => ReactNode;
137
+
138
+ type Labels = {
139
+ labelMonthDropdown: () => string;
140
+ labelYearDropdown: () => string;
141
+ labelNext: NavButtonLabel;
142
+ labelPrevious: NavButtonLabel;
143
+ labelDay: DayLabel;
144
+ labelWeekday: WeekdayLabel;
145
+ labelWeekNumber: WeekNumberLabel;
146
+ };
147
+ type DayLabel = (day: Date, activeModifiers: ActiveModifiers, options?: {
148
+ locale?: Locale;
149
+ }) => string;
150
+ type NavButtonLabel = (month?: Date, options?: {
151
+ locale?: Locale;
152
+ }) => string;
153
+ type WeekdayLabel = (day: Date, options?: {
154
+ locale?: Locale;
155
+ }) => string;
156
+ type WeekNumberLabel = (n: number, options?: {
157
+ locale?: Locale;
158
+ }) => string;
159
+
160
+ type StyledElement<T = string | CSSProperties> = {
161
+ readonly root: T;
162
+ readonly multiple_months: T;
163
+ readonly with_weeknumber: T;
164
+ readonly vhidden: T;
165
+ readonly button_reset: T;
166
+ readonly button: T;
167
+ readonly caption: T;
168
+ readonly caption_start: T;
169
+ readonly caption_end: T;
170
+ readonly caption_between: T;
171
+ readonly caption_label: T;
172
+ readonly caption_dropdowns: T;
173
+ readonly dropdown: T;
174
+ readonly dropdown_month: T;
175
+ readonly dropdown_year: T;
176
+ readonly dropdown_icon: T;
177
+ readonly months: T;
178
+ readonly month: T;
179
+ readonly table: T;
180
+ readonly tbody: T;
181
+ readonly tfoot: T;
182
+ readonly head: T;
183
+ readonly head_row: T;
184
+ readonly head_cell: T;
185
+ readonly nav: T;
186
+ readonly nav_button: T;
187
+ readonly nav_button_previous: T;
188
+ readonly nav_button_next: T;
189
+ readonly nav_icon: T;
190
+ readonly row: T;
191
+ readonly weeknumber: T;
192
+ readonly cell: T;
193
+ readonly day: T;
194
+ readonly day_outside: T;
195
+ readonly day_selected: T;
196
+ readonly day_disabled: T;
197
+ readonly day_hidden: T;
198
+ readonly day_range_start: T;
199
+ readonly day_range_end: T;
200
+ readonly day_range_middle: T;
201
+ readonly day_today: T;
202
+ };
203
+ type InternalModifiersElement = 'day_outside' | 'day_selected' | 'day_disabled' | 'day_hidden' | 'day_range_start' | 'day_range_end' | 'day_range_middle' | 'day_today';
204
+ type ClassNames = Partial<StyledElement<string>>;
205
+ type Styles = Partial<Omit<StyledElement<CSSProperties>, InternalModifiersElement>>;
206
+ type StyledComponent = {
207
+ className?: string;
208
+ style?: CSSProperties;
209
+ children?: ReactNode;
210
+ };
211
+
212
+ type DaySelectionMode = 'single' | 'multiple' | 'range' | 'default';
213
+ interface DayPickerBase {
214
+ className?: string;
215
+ classNames?: ClassNames;
216
+ modifiersClassNames?: ModifiersClassNames;
217
+ style?: CSSProperties;
218
+ styles?: Styles;
219
+ modifiersStyles?: ModifiersStyles;
220
+ id?: string;
221
+ defaultMonth?: Date;
222
+ month?: Date;
223
+ onMonthChange?: MonthChangeEventHandler;
224
+ numberOfMonths?: number;
225
+ fromDate?: Date;
226
+ toDate?: Date;
227
+ fromMonth?: Date;
228
+ toMonth?: Date;
229
+ fromYear?: number;
230
+ toYear?: number;
231
+ disableNavigation?: boolean;
232
+ pagedNavigation?: boolean;
233
+ reverseMonths?: boolean;
234
+ captionLayout?: CaptionLayout;
235
+ fixedWeeks?: boolean;
236
+ hideHead?: boolean;
237
+ showOutsideDays?: boolean;
238
+ showWeekNumber?: boolean;
239
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
240
+ firstWeekContainsDate?: 1 | 4;
241
+ ISOWeek?: boolean;
242
+ components?: CustomComponents;
243
+ footer?: ReactNode;
244
+ initialFocus?: boolean;
245
+ disabled?: Matcher | Matcher[] | undefined;
246
+ hidden?: Matcher | Matcher[] | undefined;
247
+ selected?: Matcher | Matcher[] | undefined;
248
+ today?: Date;
249
+ modifiers?: DayModifiers;
250
+ locale?: Locale;
251
+ labels?: Partial<Labels>;
252
+ formatters?: Partial<Formatters>;
253
+ dir?: HTMLDivElement['dir'];
254
+ nonce?: HTMLDivElement['nonce'];
255
+ title?: HTMLDivElement['title'];
256
+ lang?: HTMLDivElement['lang'];
257
+ onNextClick?: MonthChangeEventHandler;
258
+ onPrevClick?: MonthChangeEventHandler;
259
+ onWeekNumberClick?: WeekNumberClickEventHandler;
260
+ onDayClick?: DayClickEventHandler;
261
+ onDayFocus?: DayFocusEventHandler;
262
+ onDayBlur?: DayFocusEventHandler;
263
+ onDayMouseEnter?: DayMouseEventHandler;
264
+ onDayMouseLeave?: DayMouseEventHandler;
265
+ onDayKeyDown?: DayKeyboardEventHandler;
266
+ onDayKeyUp?: DayKeyboardEventHandler;
267
+ onDayKeyPress?: DayKeyboardEventHandler;
268
+ onDayPointerEnter?: DayPointerEventHandler;
269
+ onDayPointerLeave?: DayPointerEventHandler;
270
+ onDayTouchCancel?: DayTouchEventHandler;
271
+ onDayTouchEnd?: DayTouchEventHandler;
272
+ onDayTouchMove?: DayTouchEventHandler;
273
+ onDayTouchStart?: DayTouchEventHandler;
274
+ }
275
+ interface CustomComponents {
276
+ Caption?: (props: CaptionProps) => JSX.Element | null;
277
+ CaptionLabel?: (props: CaptionLabelProps) => JSX.Element | null;
278
+ Day?: (props: DayProps) => JSX.Element | null;
279
+ DayContent?: (props: DayContentProps) => JSX.Element | null;
280
+ Dropdown?: (props: DropdownProps) => JSX.Element | null;
281
+ Footer?: (props: FooterProps) => JSX.Element | null;
282
+ Head?: () => JSX.Element | null;
283
+ HeadRow?: () => JSX.Element | null;
284
+ IconDropdown?: (props: StyledComponent) => JSX.Element | null;
285
+ IconRight?: (props: StyledComponent) => JSX.Element | null;
286
+ IconLeft?: (props: StyledComponent) => JSX.Element | null;
287
+ Months?: (props: MonthsProps) => JSX.Element | null;
288
+ Row?: (props: RowProps) => JSX.Element | null;
289
+ WeekNumber?: (props: WeekNumberProps) => JSX.Element | null;
290
+ }
291
+
292
+ interface DayPickerDefaultProps extends DayPickerBase {
293
+ mode?: undefined | 'default';
294
+ }
295
+ declare function isDayPickerDefault(props: DayPickerProps): props is DayPickerDefaultProps;
296
+
297
+ interface DayPickerRangeProps extends DayPickerBase {
298
+ mode: 'range';
299
+ selected?: DateRange | undefined;
300
+ onSelect?: SelectRangeEventHandler;
301
+ min?: number;
302
+ max?: number;
303
+ }
304
+ declare function isDayPickerRange(props: DayPickerProps | DayPickerContextValue): props is DayPickerRangeProps;
305
+
306
+ interface DayPickerSingleProps extends DayPickerBase {
307
+ mode: 'single';
308
+ selected?: Date | undefined;
309
+ onSelect?: SelectSingleEventHandler;
310
+ required?: boolean;
311
+ }
312
+ declare function isDayPickerSingle(props: DayPickerProps | DayPickerContextValue): props is DayPickerSingleProps;
313
+
314
+ interface DayPickerContextValue extends DayPickerBase {
315
+ mode: DaySelectionMode;
316
+ onSelect?: DayPickerSingleProps['onSelect'] | DayPickerMultipleProps['onSelect'] | DayPickerRangeProps['onSelect'];
317
+ required?: boolean;
318
+ min?: number;
319
+ max?: number;
320
+ selected?: Matcher | Matcher[];
321
+ captionLayout: CaptionLayout;
322
+ classNames: Required<ClassNames>;
323
+ formatters: Formatters;
324
+ labels: Labels;
325
+ locale: Locale;
326
+ modifiersClassNames: ModifiersClassNames;
327
+ modifiers: DayModifiers;
328
+ numberOfMonths: number;
329
+ styles: Styles;
330
+ today: Date;
331
+ }
332
+ declare const DayPickerContext: react.Context<DayPickerContextValue | undefined>;
333
+ interface DayPickerProviderProps {
334
+ initialProps: DayPickerProps;
335
+ children?: ReactNode;
336
+ }
337
+ declare function DayPickerProvider(props: DayPickerProviderProps): JSX.Element;
338
+ declare function useDayPicker(): DayPickerContextValue;
339
+
340
+ interface DayPickerMultipleProps extends DayPickerBase {
341
+ mode: 'multiple';
342
+ selected?: Date[] | undefined;
343
+ onSelect?: SelectMultipleEventHandler;
344
+ min?: number;
345
+ max?: number;
346
+ }
347
+ declare function isDayPickerMultiple(props: DayPickerProps | DayPickerContextValue): props is DayPickerMultipleProps;
348
+
349
+ type DayPickerProps = DayPickerDefaultProps | DayPickerSingleProps | DayPickerMultipleProps | DayPickerRangeProps;
350
+ declare function DayPicker(props: DayPickerDefaultProps | DayPickerSingleProps | DayPickerMultipleProps | DayPickerRangeProps): JSX.Element;
351
+
352
+ declare function useWhyDidYouUpdate(name: any, props: any): void;
353
+ type ButtonProps = JSX.IntrinsicElements['button'];
354
+ declare const Button: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>>;
355
+ declare const ButtonWrapper: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>>;
356
+
357
+ declare function CaptionDropdowns(props: CaptionProps): JSX.Element;
358
+
359
+ declare function CaptionNavigation(props: CaptionProps): JSX.Element;
360
+
361
+ declare function Head(): JSX.Element;
362
+
363
+ declare function HeadRow(): JSX.Element;
364
+
365
+ declare function IconDropdown(props: StyledComponent): JSX.Element;
366
+
367
+ declare function IconRight(props: StyledComponent): JSX.Element;
368
+
369
+ declare function IconLeft(props: StyledComponent): JSX.Element;
370
+
371
+ type InputProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'onBlur' | 'onChange' | 'onFocus' | 'value' | 'placeholder'>;
372
+ type InputDayPickerProps = Pick<DayPickerSingleProps, 'fromDate' | 'toDate' | 'locale' | 'month' | 'onDayClick' | 'onMonthChange' | 'selected' | 'today'>;
373
+ interface UseInputOptions extends Pick<DayPickerBase, 'locale' | 'fromDate' | 'toDate' | 'fromMonth' | 'toMonth' | 'fromYear' | 'toYear' | 'today'> {
374
+ defaultSelected?: Date;
375
+ format?: string;
376
+ required?: boolean;
377
+ }
378
+ interface UseInputValue {
379
+ dayPickerProps: InputDayPickerProps;
380
+ inputProps: InputProps;
381
+ reset: () => void;
382
+ setSelected: (day: Date | undefined) => void;
383
+ }
384
+ declare function useInput(options?: UseInputOptions): UseInputValue;
385
+
386
+ type EventName = 'onClick' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp' | 'onMouseEnter' | 'onMouseLeave' | 'onPointerEnter' | 'onPointerLeave' | 'onTouchCancel' | 'onTouchEnd' | 'onTouchMove' | 'onTouchStart';
387
+ type DayEventHandlers = Pick<HTMLProps<HTMLButtonElement>, EventName>;
388
+
389
+ type SelectedDays = Date | Date[] | DateRange | undefined;
390
+
391
+ type DayRender = {
392
+ isButton: boolean;
393
+ isHidden: boolean;
394
+ activeModifiers: ActiveModifiers;
395
+ buttonProps: StyledComponent & Pick<ButtonProps, 'disabled' | 'aria-selected' | 'tabIndex'> & DayEventHandlers;
396
+ divProps: StyledComponent;
397
+ selectedDays: SelectedDays;
398
+ };
399
+ declare function useDayRender(day: Date, displayMonth: Date, buttonRef: RefObject<HTMLButtonElement>): DayRender;
400
+
401
+ declare function useActiveModifiers(day: Date, displayMonth?: Date): ActiveModifiers;
402
+ declare function useActiveModifiersFn(day: Date, displayMonth?: Date): () => ActiveModifiers;
403
+
404
+ type FocusContextValue = {
405
+ focusedDay: Date | undefined;
406
+ focusTarget: Date | undefined;
407
+ focus: (day: Date) => void;
408
+ blur: () => void;
409
+ focusDayAfter: () => void;
410
+ focusDayBefore: () => void;
411
+ focusWeekBefore: () => void;
412
+ focusWeekAfter: () => void;
413
+ focusMonthBefore: () => void;
414
+ focusMonthAfter: () => void;
415
+ focusYearBefore: () => void;
416
+ focusYearAfter: () => void;
417
+ focusStartOfWeek: () => void;
418
+ focusEndOfWeek: () => void;
419
+ };
420
+ declare const FocusContext: react.Context<FocusContextValue | undefined>;
421
+ type FocusProviderProps = {
422
+ children: ReactNode;
423
+ };
424
+ declare function FocusProvider(props: FocusProviderProps): JSX.Element;
425
+ declare function useFocusContext(): FocusContextValue;
426
+
427
+ interface NavigationContextValue {
428
+ currentMonth: Date;
429
+ displayMonths: Date[];
430
+ goToMonth: (month: Date) => void;
431
+ goToDate: (date: Date, refDate?: Date) => void;
432
+ nextMonth?: Date;
433
+ previousMonth?: Date;
434
+ isDateDisplayed: (day: Date) => boolean;
435
+ }
436
+ declare const NavigationContext: react.Context<NavigationContextValue | undefined>;
437
+ declare function NavigationProvider(props: {
438
+ children?: ReactNode;
439
+ }): JSX.Element;
440
+ declare function useNavigation(): NavigationContextValue;
441
+
442
+ interface RootContext {
443
+ children?: ReactNode;
444
+ }
445
+ declare function RootProvider(props: RootContext): JSX.Element;
446
+
447
+ type SelectMultipleModifiers = Pick<Modifiers, InternalModifier.Disabled>;
448
+ interface SelectMultipleContextValue {
449
+ selected: Date[] | undefined;
450
+ modifiers: SelectMultipleModifiers;
451
+ onDayClick?: DayClickEventHandler;
452
+ }
453
+ declare const SelectMultipleContext: react.Context<SelectMultipleContextValue | undefined>;
454
+ type SelectMultipleProviderProps = {
455
+ initialProps: DayPickerBase;
456
+ children?: ReactNode;
457
+ };
458
+ declare function SelectMultipleProvider(props: SelectMultipleProviderProps): JSX.Element;
459
+ interface SelectMultipleProviderInternalProps {
460
+ initialProps: DayPickerMultipleProps;
461
+ children?: ReactNode;
462
+ }
463
+ declare function SelectMultipleProviderInternal({ initialProps, children, }: SelectMultipleProviderInternalProps): JSX.Element;
464
+ declare function useSelectMultiple(): SelectMultipleContextValue;
465
+
466
+ type SelectRangeModifiers = Pick<Modifiers, InternalModifier.Disabled | InternalModifier.RangeEnd | InternalModifier.RangeMiddle | InternalModifier.RangeStart>;
467
+ interface SelectRangeContextValue {
468
+ selected: DateRange | undefined;
469
+ modifiers: SelectRangeModifiers;
470
+ onDayClick?: DayClickEventHandler;
471
+ }
472
+ declare const SelectRangeContext: react.Context<SelectRangeContextValue | undefined>;
473
+ interface SelectRangeProviderProps {
474
+ initialProps: DayPickerBase;
475
+ children?: ReactNode;
476
+ }
477
+ declare function SelectRangeProvider(props: SelectRangeProviderProps): JSX.Element;
478
+ interface SelectRangeProviderInternalProps {
479
+ initialProps: DayPickerRangeProps;
480
+ children?: ReactNode;
481
+ }
482
+ declare function SelectRangeProviderInternal({ initialProps, children }: SelectRangeProviderInternalProps): JSX.Element;
483
+ declare function useSelectRange(): SelectRangeContextValue;
484
+
485
+ interface SelectSingleContextValue {
486
+ selected: Date | undefined;
487
+ onDayClick?: DayClickEventHandler;
488
+ }
489
+ declare const SelectSingleContext: react.Context<SelectSingleContextValue | undefined>;
490
+ interface SelectSingleProviderProps {
491
+ initialProps: DayPickerBase;
492
+ children?: ReactNode;
493
+ }
494
+ declare function SelectSingleProvider(props: SelectSingleProviderProps): JSX.Element;
495
+ interface SelectSingleProviderInternal {
496
+ initialProps: DayPickerSingleProps;
497
+ children?: ReactNode;
498
+ }
499
+ declare function SelectSingleProviderInternal({ initialProps, children }: SelectSingleProviderInternal): JSX.Element;
500
+ declare function useSelectSingle(): SelectSingleContextValue;
501
+
502
+ declare function isMatch(day: Date, matchers: Matcher[]): boolean;
503
+
504
+ declare function addToRange(day: Date, range?: DateRange): DateRange | undefined;
505
+
506
+ export { type ActiveModifiers, Button, type ButtonProps, ButtonWrapper, Caption, CaptionDropdowns, CaptionLabel, type CaptionLabelProps, type CaptionLayout, CaptionNavigation, type CaptionProps, type ClassNames, type CustomComponents, type CustomModifiers, type DateAfter, type DateBefore, type DateFormatter, type DateInterval, type DateRange, Day, type DayClickEventHandler, DayContent, type DayContentProps, type DayFocusEventHandler, type DayKeyboardEventHandler, type DayLabel, type DayModifiers, type DayMouseEventHandler, type DayOfWeek, DayPicker, type DayPickerBase, DayPickerContext, type DayPickerContextValue, type DayPickerDefaultProps, type DayPickerMultipleProps, type DayPickerProps, DayPickerProvider, type DayPickerProviderProps, type DayPickerRangeProps, type DayPickerSingleProps, type DayPointerEventHandler, type DayProps, type DayRender, type DaySelectionMode, type DayTouchEventHandler, Dropdown, type DropdownProps, FocusContext, type FocusContextValue, FocusProvider, type FocusProviderProps, Footer, type FooterProps, type Formatters, Head, HeadRow, IconDropdown, IconLeft, IconRight, type InputDayPickerProps, type InputProps, InternalModifier, type InternalModifiers, type InternalModifiersElement, type Labels, type Matcher, type Modifier, type Modifiers, type ModifiersClassNames, type ModifiersStyles, type MonthChangeEventHandler, Months, type MonthsProps, type NavButtonLabel, NavigationContext, type NavigationContextValue, NavigationProvider, type RootContext, RootProvider, Row, type RowProps, SelectMultipleContext, type SelectMultipleContextValue, type SelectMultipleEventHandler, type SelectMultipleModifiers, SelectMultipleProvider, SelectMultipleProviderInternal, type SelectMultipleProviderInternalProps, type SelectMultipleProviderProps, SelectRangeContext, type SelectRangeContextValue, type SelectRangeEventHandler, type SelectRangeModifiers, SelectRangeProvider, SelectRangeProviderInternal, type SelectRangeProviderInternalProps, type SelectRangeProviderProps, SelectSingleContext, type SelectSingleContextValue, type SelectSingleEventHandler, SelectSingleProvider, SelectSingleProviderInternal, type SelectSingleProviderProps, type StyledComponent, type StyledElement, type Styles, type UseInputOptions, type UseInputValue, WeekNumber, type WeekNumberClickEventHandler, type WeekNumberFormatter, type WeekNumberLabel, type WeekNumberProps, type WeekdayLabel, addToRange, isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDayOfWeekType, isDayPickerDefault, isDayPickerMultiple, isDayPickerRange, isDayPickerSingle, isMatch, useActiveModifiers, useActiveModifiersFn, useDayPicker, useDayRender, useFocusContext, useInput, useNavigation, useSelectMultiple, useSelectRange, useSelectSingle, useWhyDidYouUpdate };