react-day-picker 8.0.0-beta.33 → 8.0.0-beta.38
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.
- package/CHANGELOG.md +33 -0
- package/{build → dist}/DayPicker.d.ts +93 -89
- package/dist/components/Button/Button.d.ts +7 -0
- package/{build → dist}/components/Button/index.d.ts +1 -1
- package/{build → dist}/components/Caption/Caption.d.ts +20 -18
- package/{build → dist}/components/Caption/index.d.ts +1 -1
- package/{build → dist}/components/CaptionLabel/CaptionLabel.d.ts +10 -8
- package/{build → dist}/components/CaptionLabel/index.d.ts +1 -1
- package/{build → dist}/components/Day/Day.d.ts +13 -13
- package/dist/components/Day/index.d.ts +1 -0
- package/{build → dist}/components/DayContent/DayContent.d.ts +15 -15
- package/{build → dist}/components/DayContent/index.d.ts +1 -1
- package/{build → dist}/components/Dropdown/Dropdown.d.ts +16 -16
- package/{build → dist}/components/Dropdown/index.d.ts +1 -1
- package/{build → dist}/components/Footer/Footer.d.ts +3 -3
- package/{build → dist}/components/Footer/index.d.ts +1 -1
- package/{build → dist}/components/Head/Head.d.ts +5 -5
- package/{build → dist}/components/Head/index.d.ts +1 -1
- package/{build → dist}/components/Head/utils/getWeekdays.d.ts +6 -6
- package/{build → dist}/components/Head/utils/index.d.ts +1 -1
- package/{build → dist}/components/IconDropdown/IconDropdown.d.ts +6 -6
- package/{build → dist}/components/IconDropdown/index.d.ts +1 -1
- package/{build → dist}/components/IconLeft/IconLeft.d.ts +6 -6
- package/{build → dist}/components/IconLeft/index.d.ts +1 -1
- package/{build → dist}/components/IconRight/IconRight.d.ts +6 -6
- package/{build → dist}/components/IconRight/index.d.ts +1 -1
- package/dist/components/Month/Month.d.ts +8 -0
- package/dist/components/Month/index.d.ts +1 -0
- package/{build → dist}/components/MonthsDropdown/MonthsDropdown.d.ts +10 -12
- package/{build → dist}/components/MonthsDropdown/index.d.ts +1 -1
- package/{build → dist}/components/Navigation/Navigation.d.ts +20 -20
- package/{build → dist}/components/Navigation/index.d.ts +1 -1
- package/dist/components/Root/Root.d.ts +3 -0
- package/{build → dist}/components/Root/index.d.ts +1 -1
- package/{build → dist}/components/Row/Row.d.ts +14 -16
- package/{build → dist}/components/Row/index.d.ts +1 -1
- package/{build → dist}/components/Table/Table.d.ts +10 -12
- package/{build → dist}/components/Table/index.d.ts +1 -1
- package/{build → dist}/components/Table/utils/getOutsideEndDays.d.ts +3 -3
- package/{build → dist}/components/Table/utils/getOutsideStartDays.d.ts +4 -4
- package/{build → dist}/components/Table/utils/getWeeks.d.ts +17 -17
- package/{build → dist}/components/WeekNumber/WeekNumber.d.ts +15 -15
- package/{build → dist}/components/WeekNumber/index.d.ts +1 -1
- package/{build → dist}/components/YearsDropdown/YearsDropdown.d.ts +16 -16
- package/{build → dist}/components/YearsDropdown/index.d.ts +1 -1
- package/dist/contexts/DayPicker/DayPickerContext.d.ts +45 -0
- package/{build → dist}/contexts/DayPicker/defaultClassNames.d.ts +5 -5
- package/dist/contexts/DayPicker/defaultContextValue.d.ts +6 -0
- package/{build → dist}/contexts/DayPicker/formatters/formatCaption.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/formatters/formatDay.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/formatters/formatMonthCaption.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/formatters/formatWeekNumber.d.ts +4 -4
- package/{build → dist}/contexts/DayPicker/formatters/formatWeekdayName.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/formatters/formatYearCaption.d.ts +6 -6
- package/{build → dist}/contexts/DayPicker/formatters/index.d.ts +6 -6
- package/dist/contexts/DayPicker/index.d.ts +2 -0
- package/{build → dist}/contexts/DayPicker/labels/index.d.ts +7 -7
- package/{build → dist}/contexts/DayPicker/labels/labelDay.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelMonthDropdown.d.ts +4 -4
- package/{build → dist}/contexts/DayPicker/labels/labelNext.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelPrevious.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelWeekNumber.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelWeekday.d.ts +5 -5
- package/{build → dist}/contexts/DayPicker/labels/labelYearDropdown.d.ts +4 -4
- package/{build → dist}/contexts/DayPicker/useDayPicker.d.ts +8 -8
- package/dist/contexts/DayPicker/utils/index.d.ts +1 -0
- package/{build → dist}/contexts/DayPicker/utils/parseFromToProps.d.ts +6 -9
- package/dist/contexts/Focus/FocusContext.d.ts +36 -0
- package/dist/contexts/Focus/index.d.ts +2 -0
- package/{build/contexts/Focus/useFocus.d.ts → dist/contexts/Focus/useFocusContext.d.ts} +3 -3
- package/dist/contexts/Focus/utils/getInitialFocusTarget.d.ts +3 -0
- package/dist/contexts/Modifiers/ModifiersContext.d.ts +9 -0
- package/dist/contexts/Modifiers/index.d.ts +2 -0
- package/dist/contexts/Modifiers/useModifiers.d.ts +6 -0
- package/dist/contexts/Modifiers/utils/getActiveModifiers.d.ts +7 -0
- package/dist/contexts/Modifiers/utils/getCustomModifiers.d.ts +3 -0
- package/dist/contexts/Modifiers/utils/getInternalModifiers.d.ts +6 -0
- package/{build/hooks/useModifiers → dist/contexts/Modifiers}/utils/isDateInRange.d.ts +3 -3
- package/{build/hooks/useModifiers → dist/contexts/Modifiers}/utils/isMatch.d.ts +3 -5
- package/dist/contexts/Modifiers/utils/matcherToArray.d.ts +3 -0
- package/{build → dist}/contexts/Navigation/NavigationContext.d.ts +28 -24
- package/{build → dist}/contexts/Navigation/index.d.ts +2 -2
- package/{build → dist}/contexts/Navigation/useNavigation.d.ts +3 -3
- package/{build → dist}/contexts/Navigation/useNavigationState.d.ts +7 -7
- package/{build → dist}/contexts/Navigation/utils/getDisplayMonths.d.ts +8 -8
- package/{build → dist}/contexts/Navigation/utils/getInitialMonth.d.ts +3 -3
- package/{build → dist}/contexts/Navigation/utils/getNextMonth.d.ts +18 -18
- package/{build → dist}/contexts/Navigation/utils/getPreviousMonth.d.ts +19 -19
- package/{build → dist}/contexts/RootProvider.d.ts +8 -8
- package/{build → dist}/contexts/SelectMultiple/SelectMultipleContext.d.ts +35 -32
- package/{build → dist}/contexts/SelectMultiple/index.d.ts +2 -2
- package/{build → dist}/contexts/SelectMultiple/useSelectMultiple.d.ts +3 -3
- package/{build → dist}/contexts/SelectRange/SelectRangeContext.d.ts +36 -32
- package/{build → dist}/contexts/SelectRange/index.d.ts +2 -2
- package/{build → dist}/contexts/SelectRange/useSelectRange.d.ts +3 -3
- package/{build → dist}/contexts/SelectRange/utils/addToRange.d.ts +8 -8
- package/{build → dist}/contexts/SelectSingle/SelectSingleContext.d.ts +30 -35
- package/{build → dist}/contexts/SelectSingle/index.d.ts +2 -2
- package/{build → dist}/contexts/SelectSingle/useSelectSingle.d.ts +3 -3
- package/dist/hooks/useActiveModifiers/index.d.ts +1 -0
- package/dist/hooks/useActiveModifiers/useActiveModifiers.d.ts +9 -0
- package/{build → dist}/hooks/useControlledValue/index.d.ts +1 -1
- package/{build → dist}/hooks/useControlledValue/useControlledValue.d.ts +12 -12
- package/dist/hooks/useDayEventHandlers/index.d.ts +1 -0
- package/dist/hooks/useDayEventHandlers/useDayEventHandlers.d.ts +28 -0
- package/dist/hooks/useDayRender/index.d.ts +1 -0
- package/dist/hooks/useDayRender/useDayRender.d.ts +39 -0
- package/dist/hooks/useDayRender/utils/getDayClassNames.d.ts +4 -0
- package/dist/hooks/useDayRender/utils/getDayStyle.d.ts +5 -0
- package/{build → dist}/hooks/useInput/index.d.ts +1 -1
- package/{build → dist}/hooks/useInput/useInput.d.ts +28 -28
- package/{build → dist}/hooks/useInput/utils/isValidDate.d.ts +2 -2
- package/dist/hooks/useSelectedDays/index.d.ts +1 -0
- package/dist/hooks/useSelectedDays/useSelectedDays.d.ts +8 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.esm.js +2213 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/{main.js → index.js} +2116 -1744
- package/dist/index.js.map +1 -0
- package/dist/react-day-picker.min.js +1 -0
- package/{style.css → dist/style.css} +21 -10
- package/{style.css.d.ts → dist/style.css.d.ts} +2 -2
- package/{build → dist}/types/DayPicker.d.ts +249 -228
- package/{build → dist}/types/DayPickerCustom.d.ts +9 -11
- package/{build → dist}/types/DayPickerMultiple.d.ts +16 -16
- package/{build → dist}/types/DayPickerRange.d.ts +17 -17
- package/{build → dist}/types/DayPickerSingle.d.ts +14 -14
- package/{build → dist}/types/EventHandlers.d.ts +51 -51
- package/{build → dist}/types/Formatters.d.ts +24 -24
- package/{build → dist}/types/Labels.d.ts +28 -28
- package/{build → dist}/types/Matchers.d.ts +34 -34
- package/dist/types/Modifiers.d.ts +51 -0
- package/{build → dist}/types/Styles.d.ts +82 -85
- package/package.json +42 -29
- package/build/DayPicker.js +0 -98
- package/build/DayPicker.js.map +0 -1
- package/build/_virtual/_tslib.js +0 -50
- package/build/_virtual/_tslib.js.map +0 -1
- package/build/components/Button/Button.d.ts +0 -7
- package/build/components/Button/Button.js +0 -23
- package/build/components/Button/Button.js.map +0 -1
- package/build/components/Caption/Caption.js +0 -57
- package/build/components/Caption/Caption.js.map +0 -1
- package/build/components/CaptionLabel/CaptionLabel.js +0 -11
- package/build/components/CaptionLabel/CaptionLabel.js.map +0 -1
- package/build/components/Day/Day.js +0 -24
- package/build/components/Day/Day.js.map +0 -1
- package/build/components/Day/hooks/index.d.ts +0 -1
- package/build/components/Day/hooks/useDay.d.ts +0 -58
- package/build/components/Day/hooks/useDay.js +0 -176
- package/build/components/Day/hooks/useDay.js.map +0 -1
- package/build/components/Day/hooks/useDayFocus.d.ts +0 -8
- package/build/components/Day/hooks/useDayFocus.js +0 -56
- package/build/components/Day/hooks/useDayFocus.js.map +0 -1
- package/build/components/Day/index.d.ts +0 -2
- package/build/components/DayContent/DayContent.js +0 -15
- package/build/components/DayContent/DayContent.js.map +0 -1
- package/build/components/Dropdown/Dropdown.js +0 -20
- package/build/components/Dropdown/Dropdown.js.map +0 -1
- package/build/components/Footer/Footer.js +0 -15
- package/build/components/Footer/Footer.js.map +0 -1
- package/build/components/Head/Head.js +0 -20
- package/build/components/Head/Head.js.map +0 -1
- package/build/components/Head/utils/getWeekdays.js +0 -18
- package/build/components/Head/utils/getWeekdays.js.map +0 -1
- package/build/components/IconDropdown/IconDropdown.js +0 -13
- package/build/components/IconDropdown/IconDropdown.js.map +0 -1
- package/build/components/IconLeft/IconLeft.js +0 -13
- package/build/components/IconLeft/IconLeft.js.map +0 -1
- package/build/components/IconRight/IconRight.js +0 -13
- package/build/components/IconRight/IconRight.js.map +0 -1
- package/build/components/MonthsDropdown/MonthsDropdown.js +0 -39
- package/build/components/MonthsDropdown/MonthsDropdown.js.map +0 -1
- package/build/components/Navigation/Navigation.js +0 -33
- package/build/components/Navigation/Navigation.js.map +0 -1
- package/build/components/Root/Root.d.ts +0 -6
- package/build/components/Root/Root.js +0 -49
- package/build/components/Root/Root.js.map +0 -1
- package/build/components/Row/Row.js +0 -22
- package/build/components/Row/Row.js.map +0 -1
- package/build/components/Table/Table.js +0 -18
- package/build/components/Table/Table.js.map +0 -1
- package/build/components/Table/utils/getOutsideEndDays.js +0 -15
- package/build/components/Table/utils/getOutsideEndDays.js.map +0 -1
- package/build/components/Table/utils/getOutsideStartDays.js +0 -15
- package/build/components/Table/utils/getOutsideStartDays.js.map +0 -1
- package/build/components/Table/utils/getWeeks.js +0 -50
- package/build/components/Table/utils/getWeeks.js.map +0 -1
- package/build/components/WeekNumber/WeekNumber.js +0 -24
- package/build/components/WeekNumber/WeekNumber.js.map +0 -1
- package/build/components/YearsDropdown/YearsDropdown.js +0 -28
- package/build/components/YearsDropdown/YearsDropdown.js.map +0 -1
- package/build/components/index.d.ts +0 -18
- package/build/contexts/DayPicker/DayPickerContext.d.ts +0 -31
- package/build/contexts/DayPicker/DayPickerContext.js +0 -14
- package/build/contexts/DayPicker/DayPickerContext.js.map +0 -1
- package/build/contexts/DayPicker/DayPickerProvider.d.ts +0 -12
- package/build/contexts/DayPicker/DayPickerProvider.js +0 -59
- package/build/contexts/DayPicker/DayPickerProvider.js.map +0 -1
- package/build/contexts/DayPicker/defaultClassNames.js +0 -42
- package/build/contexts/DayPicker/defaultClassNames.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatCaption.js +0 -11
- package/build/contexts/DayPicker/formatters/formatCaption.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatDay.js +0 -11
- package/build/contexts/DayPicker/formatters/formatDay.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatMonthCaption.js +0 -11
- package/build/contexts/DayPicker/formatters/formatMonthCaption.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatWeekNumber.js +0 -9
- package/build/contexts/DayPicker/formatters/formatWeekNumber.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatWeekdayName.js +0 -11
- package/build/contexts/DayPicker/formatters/formatWeekdayName.js.map +0 -1
- package/build/contexts/DayPicker/formatters/formatYearCaption.js +0 -11
- package/build/contexts/DayPicker/formatters/formatYearCaption.js.map +0 -1
- package/build/contexts/DayPicker/formatters/index.js +0 -7
- package/build/contexts/DayPicker/formatters/index.js.map +0 -1
- package/build/contexts/DayPicker/index.d.ts +0 -1
- package/build/contexts/DayPicker/labels/index.js +0 -8
- package/build/contexts/DayPicker/labels/index.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelDay.js +0 -11
- package/build/contexts/DayPicker/labels/labelDay.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelMonthDropdown.js +0 -9
- package/build/contexts/DayPicker/labels/labelMonthDropdown.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelNext.js +0 -9
- package/build/contexts/DayPicker/labels/labelNext.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelPrevious.js +0 -9
- package/build/contexts/DayPicker/labels/labelPrevious.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelWeekNumber.js +0 -9
- package/build/contexts/DayPicker/labels/labelWeekNumber.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelWeekday.js +0 -11
- package/build/contexts/DayPicker/labels/labelWeekday.js.map +0 -1
- package/build/contexts/DayPicker/labels/labelYearDropdown.js +0 -9
- package/build/contexts/DayPicker/labels/labelYearDropdown.js.map +0 -1
- package/build/contexts/DayPicker/useDayPicker.js +0 -19
- package/build/contexts/DayPicker/useDayPicker.js.map +0 -1
- package/build/contexts/DayPicker/utils/index.d.ts +0 -2
- package/build/contexts/DayPicker/utils/parseFromToProps.js +0 -29
- package/build/contexts/DayPicker/utils/parseFromToProps.js.map +0 -1
- package/build/contexts/DayPicker/utils/parseModifierProps.d.ts +0 -9
- package/build/contexts/DayPicker/utils/parseModifierProps.js +0 -54
- package/build/contexts/DayPicker/utils/parseModifierProps.js.map +0 -1
- package/build/contexts/Focus/FocusContext.d.ts +0 -30
- package/build/contexts/Focus/FocusContext.js +0 -71
- package/build/contexts/Focus/FocusContext.js.map +0 -1
- package/build/contexts/Focus/index.d.ts +0 -2
- package/build/contexts/Focus/useFocus.js +0 -14
- package/build/contexts/Focus/useFocus.js.map +0 -1
- package/build/contexts/Navigation/NavigationContext.js +0 -31
- package/build/contexts/Navigation/NavigationContext.js.map +0 -1
- package/build/contexts/Navigation/useNavigation.js +0 -14
- package/build/contexts/Navigation/useNavigation.js.map +0 -1
- package/build/contexts/Navigation/useNavigationState.js +0 -19
- package/build/contexts/Navigation/useNavigationState.js.map +0 -1
- package/build/contexts/Navigation/utils/getDisplayMonths.js +0 -23
- package/build/contexts/Navigation/utils/getDisplayMonths.js.map +0 -1
- package/build/contexts/Navigation/utils/getInitialMonth.js +0 -21
- package/build/contexts/Navigation/utils/getInitialMonth.js.map +0 -1
- package/build/contexts/Navigation/utils/getNextMonth.js +0 -32
- package/build/contexts/Navigation/utils/getNextMonth.js.map +0 -1
- package/build/contexts/Navigation/utils/getPreviousMonth.js +0 -33
- package/build/contexts/Navigation/utils/getPreviousMonth.js.map +0 -1
- package/build/contexts/RootProvider.js +0 -22
- package/build/contexts/RootProvider.js.map +0 -1
- package/build/contexts/SelectMultiple/SelectMultipleContext.js +0 -82
- package/build/contexts/SelectMultiple/SelectMultipleContext.js.map +0 -1
- package/build/contexts/SelectMultiple/useSelectMultiple.js +0 -14
- package/build/contexts/SelectMultiple/useSelectMultiple.js.map +0 -1
- package/build/contexts/SelectRange/SelectRangeContext.js +0 -123
- package/build/contexts/SelectRange/SelectRangeContext.js.map +0 -1
- package/build/contexts/SelectRange/useSelectRange.js +0 -14
- package/build/contexts/SelectRange/useSelectRange.js.map +0 -1
- package/build/contexts/SelectRange/utils/addToRange.js +0 -39
- package/build/contexts/SelectRange/utils/addToRange.js.map +0 -1
- package/build/contexts/SelectSingle/SelectSingleContext.js +0 -45
- package/build/contexts/SelectSingle/SelectSingleContext.js.map +0 -1
- package/build/contexts/SelectSingle/useSelectSingle.js +0 -14
- package/build/contexts/SelectSingle/useSelectSingle.js.map +0 -1
- package/build/contexts/index.d.ts +0 -7
- package/build/hooks/index.d.ts +0 -2
- package/build/hooks/useControlledValue/useControlledValue.js +0 -19
- package/build/hooks/useControlledValue/useControlledValue.js.map +0 -1
- package/build/hooks/useInput/useInput.js +0 -101
- package/build/hooks/useInput/useInput.js.map +0 -1
- package/build/hooks/useInput/utils/isValidDate.js +0 -7
- package/build/hooks/useInput/utils/isValidDate.js.map +0 -1
- package/build/hooks/useModifiers/index.d.ts +0 -1
- package/build/hooks/useModifiers/types/UseModifiers.d.ts +0 -10
- package/build/hooks/useModifiers/types/index.d.ts +0 -1
- package/build/hooks/useModifiers/useModifiers.d.ts +0 -3
- package/build/hooks/useModifiers/useModifiers.js +0 -65
- package/build/hooks/useModifiers/useModifiers.js.map +0 -1
- package/build/hooks/useModifiers/utils/getModifierStatus.d.ts +0 -7
- package/build/hooks/useModifiers/utils/getModifierStatus.js +0 -22
- package/build/hooks/useModifiers/utils/getModifierStatus.js.map +0 -1
- package/build/hooks/useModifiers/utils/isDateInRange.js +0 -25
- package/build/hooks/useModifiers/utils/isDateInRange.js.map +0 -1
- package/build/hooks/useModifiers/utils/isMatch.js +0 -52
- package/build/hooks/useModifiers/utils/isMatch.js.map +0 -1
- package/build/main.d.ts +0 -5
- package/build/main.js +0 -40
- package/build/main.js.map +0 -1
- package/build/test/PageObjects.d.ts +0 -40
- package/build/test/customRender.d.ts +0 -4
- package/build/test/customRenderHook.d.ts +0 -3
- package/build/test/index.d.ts +0 -3
- package/build/test/setup.d.ts +0 -2
- package/build/types/DayPickerCustom.js +0 -7
- package/build/types/DayPickerCustom.js.map +0 -1
- package/build/types/DayPickerMultiple.js +0 -7
- package/build/types/DayPickerMultiple.js.map +0 -1
- package/build/types/DayPickerRange.js +0 -7
- package/build/types/DayPickerRange.js.map +0 -1
- package/build/types/DayPickerSingle.js +0 -7
- package/build/types/DayPickerSingle.js.map +0 -1
- package/build/types/Matchers.js +0 -27
- package/build/types/Matchers.js.map +0 -1
- package/build/types/Modifiers.d.ts +0 -16
- package/build/types/index.d.ts +0 -11
- package/dist/main.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Root';
|
|
1
|
+
export * from './Root';
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* The props for the [[Row]] component.
|
|
4
|
-
*/
|
|
5
|
-
export interface RowProps {
|
|
6
|
-
/** The month where the row is displayed. */
|
|
7
|
-
displayMonth: Date;
|
|
8
|
-
/** The number of the week to render. */
|
|
9
|
-
weekNumber: number;
|
|
10
|
-
/** The days contained in the week. */
|
|
11
|
-
dates: Date[];
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
export declare function Row(props: RowProps): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* The props for the [[Row]] component.
|
|
4
|
+
*/
|
|
5
|
+
export interface RowProps {
|
|
6
|
+
/** The month where the row is displayed. */
|
|
7
|
+
displayMonth: Date;
|
|
8
|
+
/** The number of the week to render. */
|
|
9
|
+
weekNumber: number;
|
|
10
|
+
/** The days contained in the week. */
|
|
11
|
+
dates: Date[];
|
|
12
|
+
}
|
|
13
|
+
/** Render a row in the calendar, with the days and the week number. */
|
|
14
|
+
export declare function Row(props: RowProps): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Row';
|
|
1
|
+
export * from './Row';
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/** The month where the table is displayed. */
|
|
7
|
-
displayMonth: Date;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
export declare function Table(props: TableProps): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/** The props for the [[Table]] component. */
|
|
3
|
+
export interface TableProps {
|
|
4
|
+
/** The ID of the label of the table (the same given to the Caption). */
|
|
5
|
+
['aria-labelledby']?: string;
|
|
6
|
+
/** The month where the table is displayed. */
|
|
7
|
+
displayMonth: Date;
|
|
8
|
+
}
|
|
9
|
+
/** Render the table with the calendar. */
|
|
10
|
+
export declare function Table(props: TableProps): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Table';
|
|
1
|
+
export * from './Table';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function getOutsideEndDays(month: Date, options?: {
|
|
2
|
-
locale?: Locale;
|
|
3
|
-
}): Date[];
|
|
1
|
+
export declare function getOutsideEndDays(month: Date, options?: {
|
|
2
|
+
locale?: Locale;
|
|
3
|
+
}): Date[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Locale } from 'date-fns';
|
|
2
|
-
export declare function getOutsideStartDays(month: Date, options?: {
|
|
3
|
-
locale?: Locale;
|
|
4
|
-
}): Date[];
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
export declare function getOutsideStartDays(month: Date, options?: {
|
|
3
|
+
locale?: Locale;
|
|
4
|
+
}): Date[];
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Locale } from 'date-fns';
|
|
2
|
-
/**
|
|
3
|
-
* Represents a week in the month.
|
|
4
|
-
*/
|
|
5
|
-
export declare type MonthWeek = {
|
|
6
|
-
/** The week number from the start of the year. */
|
|
7
|
-
weekNumber: number;
|
|
8
|
-
/** The dates in the week. */
|
|
9
|
-
dates: Date[];
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Return the weeks belonging to the given month.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getWeeks(month: Date, { locale, fixedWeeks }: {
|
|
15
|
-
locale: Locale;
|
|
16
|
-
fixedWeeks?: boolean;
|
|
17
|
-
}): MonthWeek[];
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a week in the month.
|
|
4
|
+
*/
|
|
5
|
+
export declare type MonthWeek = {
|
|
6
|
+
/** The week number from the start of the year. */
|
|
7
|
+
weekNumber: number;
|
|
8
|
+
/** The dates in the week. */
|
|
9
|
+
dates: Date[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Return the weeks belonging to the given month.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getWeeks(month: Date, { locale, fixedWeeks }: {
|
|
15
|
+
locale: Locale;
|
|
16
|
+
fixedWeeks?: boolean;
|
|
17
|
+
}): MonthWeek[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/**
|
|
3
|
-
* The props for the [[WeekNumber]] component.
|
|
4
|
-
*/
|
|
5
|
-
export interface WeekNumberProps {
|
|
6
|
-
/** The number of the week. */
|
|
7
|
-
number: number;
|
|
8
|
-
/** The dates in the week. */
|
|
9
|
-
dates: Date[];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Render the week number element. If `onWeekNumberClick` is passed to DayPicker, it
|
|
13
|
-
* renders a button, otherwise a span element.
|
|
14
|
-
*/
|
|
15
|
-
export declare function WeekNumber(props: WeekNumberProps): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* The props for the [[WeekNumber]] component.
|
|
4
|
+
*/
|
|
5
|
+
export interface WeekNumberProps {
|
|
6
|
+
/** The number of the week. */
|
|
7
|
+
number: number;
|
|
8
|
+
/** The dates in the week. */
|
|
9
|
+
dates: Date[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Render the week number element. If `onWeekNumberClick` is passed to DayPicker, it
|
|
13
|
+
* renders a button, otherwise a span element.
|
|
14
|
+
*/
|
|
15
|
+
export declare function WeekNumber(props: WeekNumberProps): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './WeekNumber';
|
|
1
|
+
export * from './WeekNumber';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MonthChangeEventHandler } from '../../types/EventHandlers';
|
|
3
|
-
/**
|
|
4
|
-
* The props for the [[YearsDropdown]] component.
|
|
5
|
-
*/
|
|
6
|
-
export interface YearsDropdownProps {
|
|
7
|
-
/** The month where the drop-down is displayed. */
|
|
8
|
-
displayMonth: Date;
|
|
9
|
-
/** Callback to handle the `change` event. */
|
|
10
|
-
onChange: MonthChangeEventHandler;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Render a dropdown to change the year. Take in account the `nav.fromDate` and
|
|
14
|
-
* `toDate` from context.
|
|
15
|
-
*/
|
|
16
|
-
export declare function YearsDropdown(props: YearsDropdownProps): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MonthChangeEventHandler } from '../../types/EventHandlers';
|
|
3
|
+
/**
|
|
4
|
+
* The props for the [[YearsDropdown]] component.
|
|
5
|
+
*/
|
|
6
|
+
export interface YearsDropdownProps {
|
|
7
|
+
/** The month where the drop-down is displayed. */
|
|
8
|
+
displayMonth: Date;
|
|
9
|
+
/** Callback to handle the `change` event. */
|
|
10
|
+
onChange: MonthChangeEventHandler;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Render a dropdown to change the year. Take in account the `nav.fromDate` and
|
|
14
|
+
* `toDate` from context.
|
|
15
|
+
*/
|
|
16
|
+
export declare function YearsDropdown(props: YearsDropdownProps): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './YearsDropdown';
|
|
1
|
+
export * from './YearsDropdown';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { CaptionLayout } from '../../components/Caption';
|
|
3
|
+
import { DayPickerProps } from '../../types/DayPicker';
|
|
4
|
+
import { Formatters } from '../../types/Formatters';
|
|
5
|
+
import { Labels } from '../../types/Labels';
|
|
6
|
+
import { DayModifiers, ModifiersClassNames } from '../../types/Modifiers';
|
|
7
|
+
import { ClassNames, Styles } from '../../types/Styles';
|
|
8
|
+
/** The value of the [[DayPickerContext]] */
|
|
9
|
+
export interface DayPickerContextValue extends DayPickerProps {
|
|
10
|
+
captionLayout: CaptionLayout;
|
|
11
|
+
classNames: Required<ClassNames>;
|
|
12
|
+
formatters: Formatters;
|
|
13
|
+
labels: Labels;
|
|
14
|
+
locale: Locale;
|
|
15
|
+
modifiersClassNames: ModifiersClassNames;
|
|
16
|
+
modifierPrefix: string;
|
|
17
|
+
modifiers: DayModifiers;
|
|
18
|
+
numberOfMonths: number;
|
|
19
|
+
styles: Styles;
|
|
20
|
+
today: Date;
|
|
21
|
+
toYear?: never;
|
|
22
|
+
fromYear?: never;
|
|
23
|
+
toMonth?: never;
|
|
24
|
+
fromMonth?: never;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The DayPicker Context shares the props passed to DayPicker within internal
|
|
28
|
+
* and custom components. It is used to set the default values and perform
|
|
29
|
+
* one-time calculations required to render the days.
|
|
30
|
+
*
|
|
31
|
+
* Developers may access this context from the [[useDayPicker]] hook when
|
|
32
|
+
* using custom components.
|
|
33
|
+
*/
|
|
34
|
+
export declare const DayPickerContext: React.Context<DayPickerContextValue | undefined>;
|
|
35
|
+
/** The props for the [[DayPickerProvider]]. */
|
|
36
|
+
export interface DayPickerProviderProps {
|
|
37
|
+
/** The initial props from the DayPicker component. */
|
|
38
|
+
initialProps: DayPickerProps;
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The provider for the [[DayPickerContext]], assigning the defaults from the
|
|
43
|
+
* initial DayPicker props.
|
|
44
|
+
*/
|
|
45
|
+
export declare function DayPickerProvider(props: DayPickerProviderProps): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClassNames } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* The name of the default CSS classes.
|
|
4
|
-
*/
|
|
5
|
-
export declare const defaultClassNames: Required<ClassNames>;
|
|
1
|
+
import { ClassNames } from '../../types/Styles';
|
|
2
|
+
/**
|
|
3
|
+
* The name of the default CSS classes.
|
|
4
|
+
*/
|
|
5
|
+
export declare const defaultClassNames: Required<ClassNames>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DayPickerContextValue } from '../../contexts/DayPicker';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the default values to use in the DayPickerContext, in case they are
|
|
4
|
+
* not passed down with the DayPicker initial props.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getDefaultContextValue(): DayPickerContextValue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Locale } from 'date-fns';
|
|
2
|
-
/**
|
|
3
|
-
* The default formatter for the caption.
|
|
4
|
-
*/
|
|
5
|
-
export declare function formatCaption(month: Date, options?: {
|
|
6
|
-
locale?: Locale;
|
|
7
|
-
}): string;
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
/**
|
|
3
|
+
* The default formatter for the caption.
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatCaption(month: Date, options?: {
|
|
6
|
+
locale?: Locale;
|
|
7
|
+
}): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Locale } from 'date-fns';
|
|
2
|
-
/**
|
|
3
|
-
* The default formatter for the Day button.
|
|
4
|
-
*/
|
|
5
|
-
export declare function formatDay(day: Date, options?: {
|
|
6
|
-
locale?: Locale;
|
|
7
|
-
}): string;
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
/**
|
|
3
|
+
* The default formatter for the Day button.
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatDay(day: Date, options?: {
|
|
6
|
+
locale?: Locale;
|
|
7
|
+
}): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Locale } from 'date-fns';
|
|
2
|
-
/**
|
|
3
|
-
* The default formatter for the Month caption.
|
|
4
|
-
*/
|
|
5
|
-
export declare function formatMonthCaption(month: Date, options?: {
|
|
6
|
-
locale?: Locale;
|
|
7
|
-
}): string;
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
/**
|
|
3
|
+
* The default formatter for the Month caption.
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatMonthCaption(month: Date, options?: {
|
|
6
|
+
locale?: Locale;
|
|
7
|
+
}): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The default formatter for the week number.
|
|
3
|
-
*/
|
|
4
|
-
export declare function formatWeekNumber(weekNumber: number): string;
|
|
1
|
+
/**
|
|
2
|
+
* The default formatter for the week number.
|
|
3
|
+
*/
|
|
4
|
+
export declare function formatWeekNumber(weekNumber: number): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Locale } from 'date-fns';
|
|
2
|
-
/**
|
|
3
|
-
* The default formatter for the name of the weekday.
|
|
4
|
-
*/
|
|
5
|
-
export declare function formatWeekdayName(weekday: Date, options?: {
|
|
6
|
-
locale?: Locale;
|
|
7
|
-
}): string;
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
/**
|
|
3
|
+
* The default formatter for the name of the weekday.
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatWeekdayName(weekday: Date, options?: {
|
|
6
|
+
locale?: Locale;
|
|
7
|
+
}): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The default formatter for the Year caption.
|
|
3
|
-
*/
|
|
4
|
-
export declare function formatYearCaption(year: Date, options?: {
|
|
5
|
-
locale?: Locale;
|
|
6
|
-
}): string;
|
|
1
|
+
/**
|
|
2
|
+
* The default formatter for the Year caption.
|
|
3
|
+
*/
|
|
4
|
+
export declare function formatYearCaption(year: Date, options?: {
|
|
5
|
+
locale?: Locale;
|
|
6
|
+
}): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './formatCaption';
|
|
2
|
-
export * from './formatDay';
|
|
3
|
-
export * from './formatMonthCaption';
|
|
4
|
-
export * from './formatWeekNumber';
|
|
5
|
-
export * from './formatWeekdayName';
|
|
6
|
-
export * from './formatYearCaption';
|
|
1
|
+
export * from './formatCaption';
|
|
2
|
+
export * from './formatDay';
|
|
3
|
+
export * from './formatMonthCaption';
|
|
4
|
+
export * from './formatWeekNumber';
|
|
5
|
+
export * from './formatWeekdayName';
|
|
6
|
+
export * from './formatYearCaption';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './labelDay';
|
|
2
|
-
export * from './labelMonthDropdown';
|
|
3
|
-
export * from './labelNext';
|
|
4
|
-
export * from './labelPrevious';
|
|
5
|
-
export * from './labelWeekday';
|
|
6
|
-
export * from './labelWeekNumber';
|
|
7
|
-
export * from './labelYearDropdown';
|
|
1
|
+
export * from './labelDay';
|
|
2
|
+
export * from './labelMonthDropdown';
|
|
3
|
+
export * from './labelNext';
|
|
4
|
+
export * from './labelPrevious';
|
|
5
|
+
export * from './labelWeekday';
|
|
6
|
+
export * from './labelWeekNumber';
|
|
7
|
+
export * from './labelYearDropdown';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DayLabel } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* The default ARIA label for the day button.
|
|
4
|
-
*/
|
|
5
|
-
export declare const labelDay: DayLabel;
|
|
1
|
+
import { DayLabel } from '../../../types/Labels';
|
|
2
|
+
/**
|
|
3
|
+
* The default ARIA label for the day button.
|
|
4
|
+
*/
|
|
5
|
+
export declare const labelDay: DayLabel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The default ARIA label for the WeekNumber element.
|
|
3
|
-
*/
|
|
4
|
-
export declare const labelMonthDropdown: () => string;
|
|
1
|
+
/**
|
|
2
|
+
* The default ARIA label for the WeekNumber element.
|
|
3
|
+
*/
|
|
4
|
+
export declare const labelMonthDropdown: () => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NavButtonLabel } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* The default ARIA label for next month button in navigation
|
|
4
|
-
*/
|
|
5
|
-
export declare const labelNext: NavButtonLabel;
|
|
1
|
+
import { NavButtonLabel } from '../../../types/Labels';
|
|
2
|
+
/**
|
|
3
|
+
* The default ARIA label for next month button in navigation
|
|
4
|
+
*/
|
|
5
|
+
export declare const labelNext: NavButtonLabel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NavButtonLabel } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* The default ARIA label for previous month button in navigation
|
|
4
|
-
*/
|
|
5
|
-
export declare const labelPrevious: NavButtonLabel;
|
|
1
|
+
import { NavButtonLabel } from '../../../types/Labels';
|
|
2
|
+
/**
|
|
3
|
+
* The default ARIA label for previous month button in navigation
|
|
4
|
+
*/
|
|
5
|
+
export declare const labelPrevious: NavButtonLabel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WeekNumberLabel } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* The default ARIA label for the WeekNumber element.
|
|
4
|
-
*/
|
|
5
|
-
export declare const labelWeekNumber: WeekNumberLabel;
|
|
1
|
+
import { WeekNumberLabel } from '../../../types/Labels';
|
|
2
|
+
/**
|
|
3
|
+
* The default ARIA label for the WeekNumber element.
|
|
4
|
+
*/
|
|
5
|
+
export declare const labelWeekNumber: WeekNumberLabel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WeekdayLabel } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* The default ARIA label for the Weekday element.
|
|
4
|
-
*/
|
|
5
|
-
export declare const labelWeekday: WeekdayLabel;
|
|
1
|
+
import { WeekdayLabel } from '../../../types/Labels';
|
|
2
|
+
/**
|
|
3
|
+
* The default ARIA label for the Weekday element.
|
|
4
|
+
*/
|
|
5
|
+
export declare const labelWeekday: WeekdayLabel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The default ARIA label for the WeekNumber element.
|
|
3
|
-
*/
|
|
4
|
-
export declare const labelYearDropdown: () => string;
|
|
1
|
+
/**
|
|
2
|
+
* The default ARIA label for the WeekNumber element.
|
|
3
|
+
*/
|
|
4
|
+
export declare const labelYearDropdown: () => string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DayPickerContextValue } from './DayPickerContext';
|
|
2
|
-
/**
|
|
3
|
-
* Hook to access the [[DayPickerContext]].
|
|
4
|
-
*
|
|
5
|
-
* To use this hook make sure to wrap the components with a one
|
|
6
|
-
* [[DayPickerProvider]].
|
|
7
|
-
|
|
8
|
-
export declare function useDayPicker(): DayPickerContextValue;
|
|
1
|
+
import { DayPickerContextValue } from './DayPickerContext';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to access the [[DayPickerContext]].
|
|
4
|
+
*
|
|
5
|
+
* To use this hook make sure to wrap the components with a one
|
|
6
|
+
* [[DayPickerProvider]].
|
|
7
|
+
*/
|
|
8
|
+
export declare function useDayPicker(): DayPickerContextValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './parseFromToProps';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { DayPickerProps } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
fromDate: Date | undefined;
|
|
8
|
-
toDate: Date | undefined;
|
|
9
|
-
};
|
|
1
|
+
import { DayPickerProps } from '../../../types/DayPicker';
|
|
2
|
+
/** Return the `fromDate` and `toDate` prop values values parsing the DayPicker props. */
|
|
3
|
+
export declare function parseFromToProps(props: Pick<DayPickerProps, 'fromYear' | 'toYear' | 'fromDate' | 'toDate' | 'fromMonth' | 'toMonth'>): {
|
|
4
|
+
fromDate: Date | undefined;
|
|
5
|
+
toDate: Date | undefined;
|
|
6
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
/** Represents the value of the [[NavigationContext]]. */
|
|
3
|
+
export declare type FocusContextValue = {
|
|
4
|
+
/** The day currently focused. */
|
|
5
|
+
focusedDay: Date | undefined;
|
|
6
|
+
/** Day that will be focused. */
|
|
7
|
+
focusTarget: Date | undefined;
|
|
8
|
+
/** Focus a day. */
|
|
9
|
+
focus: (day: Date) => void;
|
|
10
|
+
/** Blur the focused day. */
|
|
11
|
+
blur: () => void;
|
|
12
|
+
/** Focus the day after the focused day. */
|
|
13
|
+
focusDayAfter: () => void;
|
|
14
|
+
/** Focus the day before the focused day. */
|
|
15
|
+
focusDayBefore: () => void;
|
|
16
|
+
/** Focus the day in the week before the focused day. */
|
|
17
|
+
focusWeekBefore: () => void;
|
|
18
|
+
/** Focus the day in the week after the focused day. */
|
|
19
|
+
focusWeekAfter: () => void;
|
|
20
|
+
focusMonthBefore: () => void;
|
|
21
|
+
focusMonthAfter: () => void;
|
|
22
|
+
focusYearBefore: () => void;
|
|
23
|
+
focusYearAfter: () => void;
|
|
24
|
+
focusStartOfWeek: () => void;
|
|
25
|
+
focusEndOfWeek: () => void;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The Focus context shares details about the focused day for the keyboard
|
|
29
|
+
*
|
|
30
|
+
* Access this context from the [[useFocus]] hook.
|
|
31
|
+
*/
|
|
32
|
+
export declare const FocusContext: React.Context<FocusContextValue | undefined>;
|
|
33
|
+
/** The provider for the [[FocusContext]]. */
|
|
34
|
+
export declare function FocusProvider(props: {
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
}): JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FocusContextValue } from './FocusContext';
|
|
2
|
-
/** Hook to access the [[FocusContext]]. */
|
|
3
|
-
export declare function
|
|
1
|
+
import { FocusContextValue } from './FocusContext';
|
|
2
|
+
/** Hook to access the [[FocusContext]]. */
|
|
3
|
+
export declare function useFocusContext(): FocusContextValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Modifiers } from '../../types/Modifiers';
|
|
3
|
+
/** The Modifiers context store the modifiers used in DayPicker. To access the value of this context, use [[useModifiers]]. */
|
|
4
|
+
export declare const ModifiersContext: React.Context<Modifiers | undefined>;
|
|
5
|
+
export declare type ModifiersProviderProps = {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
/** Provide the value for the [[ModifiersContext]]. */
|
|
9
|
+
export declare function ModifiersProvider(props: ModifiersProviderProps): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActiveModifiers, Modifiers } from '../../../types/Modifiers';
|
|
2
|
+
/** Return the active modifiers for the given day. */
|
|
3
|
+
export declare function getActiveModifiers(day: Date,
|
|
4
|
+
/** The modifiers to match for the given date. */
|
|
5
|
+
modifiers: Modifiers,
|
|
6
|
+
/** The month where the day is displayed, to add the "outside" modifiers. */
|
|
7
|
+
displayMonth?: Date): ActiveModifiers;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DayPickerContextValue } from '../../../contexts/DayPicker';
|
|
2
|
+
import { SelectMultipleContextValue } from '../../../contexts/SelectMultiple';
|
|
3
|
+
import { SelectRangeContextValue } from '../../../contexts/SelectRange';
|
|
4
|
+
import { InternalModifiers } from '../../../types/Modifiers';
|
|
5
|
+
/** Return the [[InternalModifiers]] from the DayPicker and select contexts. */
|
|
6
|
+
export declare function getInternalModifiers(dayPicker: DayPickerContextValue, selectMultiple: SelectMultipleContextValue, selectRange: SelectRangeContextValue): InternalModifiers;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DateRange } from '../../../types/Matchers';
|
|
2
|
-
/** Return `true` whether
|
|
3
|
-
export declare function isDateInRange(date: Date, range: DateRange): boolean;
|
|
1
|
+
import { DateRange } from '../../../types/Matchers';
|
|
2
|
+
/** Return `true` whether `date` is inside `range`. */
|
|
3
|
+
export declare function isDateInRange(date: Date, range: DateRange): boolean;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Matcher } from '../../../types/Matchers';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
export declare function isMatch(day: Date, matchers: Matcher[]): boolean;
|
|
1
|
+
import { Matcher } from '../../../types/Matchers';
|
|
2
|
+
/** Returns `true` whether the day matches against the given matchers. */
|
|
3
|
+
export declare function isMatch(day: Date, matchers: Matcher[]): boolean;
|