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,52 +0,0 @@
|
|
|
1
|
-
import { isDate, isSameDay, differenceInCalendarDays } from 'date-fns';
|
|
2
|
-
import { isDateRange, isDayOfWeekType, isDateInterval, isDateAfterType, isDateBeforeType } from '../../../types/Matchers.js';
|
|
3
|
-
import { isDateInRange } from './isDateInRange.js';
|
|
4
|
-
|
|
5
|
-
/** Returns true if `value` is a Date type. */
|
|
6
|
-
function isDateType(value) {
|
|
7
|
-
return isDate(value);
|
|
8
|
-
}
|
|
9
|
-
/** Returns true if `value` is an array of valid dates. */
|
|
10
|
-
function isArrayOfDates(value) {
|
|
11
|
-
return Array.isArray(value) && value.every(isDate);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Returns `true` whether the day matches against the given matchers.
|
|
15
|
-
*/
|
|
16
|
-
function isMatch(day, matchers) {
|
|
17
|
-
return matchers.some(function (matcher) {
|
|
18
|
-
if (typeof matcher === 'boolean') {
|
|
19
|
-
return matcher;
|
|
20
|
-
}
|
|
21
|
-
if (isDateType(matcher)) {
|
|
22
|
-
return isSameDay(day, matcher);
|
|
23
|
-
}
|
|
24
|
-
if (isArrayOfDates(matcher)) {
|
|
25
|
-
return matcher.includes(day);
|
|
26
|
-
}
|
|
27
|
-
if (isDateRange(matcher)) {
|
|
28
|
-
return isDateInRange(day, matcher);
|
|
29
|
-
}
|
|
30
|
-
if (isDayOfWeekType(matcher)) {
|
|
31
|
-
return matcher.dayOfWeek.includes(day.getDay());
|
|
32
|
-
}
|
|
33
|
-
if (isDateInterval(matcher)) {
|
|
34
|
-
var isBefore = differenceInCalendarDays(matcher.before, day) > 0;
|
|
35
|
-
var isAfter = differenceInCalendarDays(day, matcher.after) > 0;
|
|
36
|
-
return isBefore && isAfter;
|
|
37
|
-
}
|
|
38
|
-
if (isDateAfterType(matcher)) {
|
|
39
|
-
return differenceInCalendarDays(day, matcher.after) > 0;
|
|
40
|
-
}
|
|
41
|
-
if (isDateBeforeType(matcher)) {
|
|
42
|
-
return differenceInCalendarDays(matcher.before, day) > 0;
|
|
43
|
-
}
|
|
44
|
-
if (typeof matcher === 'function') {
|
|
45
|
-
return matcher(day);
|
|
46
|
-
}
|
|
47
|
-
return false;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { isMatch };
|
|
52
|
-
//# sourceMappingURL=isMatch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isMatch.js","sources":["../../../../src/hooks/useModifiers/utils/isMatch.ts"],"sourcesContent":["import { differenceInCalendarDays, isDate, isSameDay } from 'date-fns';\nimport {\n isDateAfterType,\n isDateBeforeType,\n isDateInterval,\n isDateRange,\n isDayOfWeekType,\n Matcher\n} from '../../../types/Matchers';\n\nimport { isDateInRange } from './isDateInRange';\n\n/** Returns true if `value` is a Date type. */\nfunction isDateType(value: unknown): value is Date {\n return isDate(value);\n}\n\n/** Returns true if `value` is an array of valid dates. */\nfunction isArrayOfDates(value: unknown): value is Date[] {\n return Array.isArray(value) && value.every(isDate);\n}\n\n/**\n * Returns `true` whether the day matches against the given matchers.\n */\nexport function isMatch(day: Date, matchers: Matcher[]): boolean {\n return matchers.some((matcher: Matcher) => {\n if (typeof matcher === 'boolean') {\n return matcher;\n }\n if (isDateType(matcher)) {\n return isSameDay(day, matcher);\n }\n if (isArrayOfDates(matcher)) {\n return matcher.includes(day);\n }\n if (isDateRange(matcher)) {\n return isDateInRange(day, matcher);\n }\n if (isDayOfWeekType(matcher)) {\n return matcher.dayOfWeek.includes(day.getDay());\n }\n if (isDateInterval(matcher)) {\n const isBefore = differenceInCalendarDays(matcher.before, day) > 0;\n const isAfter = differenceInCalendarDays(day, matcher.after) > 0;\n return isBefore && isAfter;\n }\n if (isDateAfterType(matcher)) {\n return differenceInCalendarDays(day, matcher.after) > 0;\n }\n if (isDateBeforeType(matcher)) {\n return differenceInCalendarDays(matcher.before, day) > 0;\n }\n if (typeof matcher === 'function') {\n return matcher(day);\n }\n return false;\n });\n}\n"],"names":[],"mappings":";;;;AAYA;AACA,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED;AACA,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACrD,CAAC;AAED;;;SAGgB,OAAO,CAAC,GAAS,EAAE,QAAmB;IACpD,OAAO,QAAQ,CAAC,IAAI,CAAC,UAAC,OAAgB;QACpC,IAAI,OAAO,OAAO,KAAK,SAAS,EAAE;YAChC,OAAO,OAAO,CAAC;SAChB;QACD,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE;YACvB,OAAO,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;SAChC;QACD,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE;YAC3B,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SAC9B;QACD,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE;YACxB,OAAO,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;SACpC;QACD,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE;YAC5B,OAAO,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE;YAC3B,IAAM,QAAQ,GAAG,wBAAwB,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;YACnE,IAAM,OAAO,GAAG,wBAAwB,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO,QAAQ,IAAI,OAAO,CAAC;SAC5B;QACD,IAAI,eAAe,CAAC,OAAO,CAAC,EAAE;YAC5B,OAAO,wBAAwB,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACzD;QACD,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE;YAC7B,OAAO,wBAAwB,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;SAC1D;QACD,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;YACjC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;SACrB;QACD,OAAO,KAAK,CAAC;KACd,CAAC,CAAC;AACL;;;;"}
|
package/build/main.d.ts
DELETED
package/build/main.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export { DayPicker } from './DayPicker.js';
|
|
2
|
-
export { Button } from './components/Button/Button.js';
|
|
3
|
-
export { Caption } from './components/Caption/Caption.js';
|
|
4
|
-
export { CaptionLabel } from './components/CaptionLabel/CaptionLabel.js';
|
|
5
|
-
export { Day } from './components/Day/Day.js';
|
|
6
|
-
export { useDay } from './components/Day/hooks/useDay.js';
|
|
7
|
-
export { DayContent } from './components/DayContent/DayContent.js';
|
|
8
|
-
export { Dropdown } from './components/Dropdown/Dropdown.js';
|
|
9
|
-
export { Footer } from './components/Footer/Footer.js';
|
|
10
|
-
export { Head } from './components/Head/Head.js';
|
|
11
|
-
export { IconDropdown } from './components/IconDropdown/IconDropdown.js';
|
|
12
|
-
export { IconRight } from './components/IconRight/IconRight.js';
|
|
13
|
-
export { IconLeft } from './components/IconLeft/IconLeft.js';
|
|
14
|
-
export { MonthsDropdown } from './components/MonthsDropdown/MonthsDropdown.js';
|
|
15
|
-
export { Navigation } from './components/Navigation/Navigation.js';
|
|
16
|
-
export { Root } from './components/Root/Root.js';
|
|
17
|
-
export { Row } from './components/Row/Row.js';
|
|
18
|
-
export { Table } from './components/Table/Table.js';
|
|
19
|
-
export { WeekNumber } from './components/WeekNumber/WeekNumber.js';
|
|
20
|
-
export { YearsDropdown } from './components/YearsDropdown/YearsDropdown.js';
|
|
21
|
-
export { RootProvider } from './contexts/RootProvider.js';
|
|
22
|
-
export { useDayPicker } from './contexts/DayPicker/useDayPicker.js';
|
|
23
|
-
export { FocusContext, FocusProvider } from './contexts/Focus/FocusContext.js';
|
|
24
|
-
export { useFocus } from './contexts/Focus/useFocus.js';
|
|
25
|
-
export { NavigationContext, NavigationProvider } from './contexts/Navigation/NavigationContext.js';
|
|
26
|
-
export { useNavigation } from './contexts/Navigation/useNavigation.js';
|
|
27
|
-
export { SelectMultipleContext, SelectMultipleProvider, SelectMultipleProviderInternal } from './contexts/SelectMultiple/SelectMultipleContext.js';
|
|
28
|
-
export { useSelectMultiple } from './contexts/SelectMultiple/useSelectMultiple.js';
|
|
29
|
-
export { SelectRangeContext, SelectRangeProvider, SelectRangeProviderInternal } from './contexts/SelectRange/SelectRangeContext.js';
|
|
30
|
-
export { useSelectRange } from './contexts/SelectRange/useSelectRange.js';
|
|
31
|
-
export { SelectSingleContext, SelectSingleProvider, SelectSingleProviderInternal } from './contexts/SelectSingle/SelectSingleContext.js';
|
|
32
|
-
export { useSelectSingle } from './contexts/SelectSingle/useSelectSingle.js';
|
|
33
|
-
export { isDayPickerCustom } from './types/DayPickerCustom.js';
|
|
34
|
-
export { isDayPickerMultiple } from './types/DayPickerMultiple.js';
|
|
35
|
-
export { isDayPickerRange } from './types/DayPickerRange.js';
|
|
36
|
-
export { isDayPickerSingle } from './types/DayPickerSingle.js';
|
|
37
|
-
export { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDayOfWeekType } from './types/Matchers.js';
|
|
38
|
-
export { useInput } from './hooks/useInput/useInput.js';
|
|
39
|
-
export { useModifiers } from './hooks/useModifiers/useModifiers.js';
|
|
40
|
-
//# sourceMappingURL=main.js.map
|
package/build/main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare class PageObjects {
|
|
2
|
-
today: Date;
|
|
3
|
-
/**
|
|
4
|
-
* Initialize the page objects for the DayPicker elements. Use the objects in
|
|
5
|
-
* this class to access to the elements to test.
|
|
6
|
-
*
|
|
7
|
-
* @param today The date to use as today. Usually the one froze with
|
|
8
|
-
* timekeeper.
|
|
9
|
-
*/
|
|
10
|
-
constructor(today: Date);
|
|
11
|
-
/** The icon for the left button. */
|
|
12
|
-
get iconLeft(): HTMLElement;
|
|
13
|
-
/** The icon for the dropdown. */
|
|
14
|
-
get iconDropdown(): HTMLElement;
|
|
15
|
-
/** The icon for the right button. */
|
|
16
|
-
get iconRight(): HTMLElement;
|
|
17
|
-
/** Get the table element. */
|
|
18
|
-
get table(): HTMLTableElement;
|
|
19
|
-
/** Get the content of the footer. */
|
|
20
|
-
get footer(): ChildNode | null;
|
|
21
|
-
get button(): HTMLButtonElement;
|
|
22
|
-
/** The drop-down to choose the month from. */
|
|
23
|
-
get monthDropdown(): HTMLSelectElement;
|
|
24
|
-
/** The drop-down to choose the year from. */
|
|
25
|
-
get yearDropdown(): HTMLSelectElement;
|
|
26
|
-
/** The label of the caption element. */
|
|
27
|
-
getCaptionLabel(date: Date): HTMLSpanElement;
|
|
28
|
-
/** The previous month button in the navigation. */
|
|
29
|
-
get previousButton(): HTMLButtonElement;
|
|
30
|
-
/** The next month button in the navigation. */
|
|
31
|
-
get nextButton(): HTMLButtonElement;
|
|
32
|
-
/** Select the month from the drop-down. */
|
|
33
|
-
runSelectMonth(month: Date): void;
|
|
34
|
-
/** Click the previous month button. */
|
|
35
|
-
runPreviousClick(): boolean;
|
|
36
|
-
/** Click the next month button. */
|
|
37
|
-
runNextClick(): boolean;
|
|
38
|
-
/** Select the year from the drop-down. */
|
|
39
|
-
runSelectYear(year: Date): void;
|
|
40
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Renderer, RenderHookResult } from '@testing-library/react-hooks';
|
|
2
|
-
import { DayPickerCustomProps, DayPickerMultipleProps, DayPickerProps, DayPickerRangeProps, DayPickerSingleProps } from '../types';
|
|
3
|
-
export declare function customRenderHook<TProps, TResult>(callback: (props: TProps) => TResult, contextValue: DayPickerProps | DayPickerMultipleProps | DayPickerSingleProps | DayPickerCustomProps | DayPickerRangeProps): RenderHookResult<TProps, TResult, Renderer<TProps>>;
|
package/build/test/index.d.ts
DELETED
package/build/test/setup.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DayPickerCustom.js","sources":["../../src/types/DayPickerCustom.ts"],"sourcesContent":["import { DayPickerProps } from './DayPicker';\n\n/** The props for the [[DayPicker]] component when using `mode=\"custom\"`. */\nexport interface DayPickerCustomProps extends DayPickerProps {\n mode: 'custom';\n /** The selected day(s). */\n selected?: unknown;\n /** Use `onDayClick` and related event instead. */\n onSelect: never;\n}\n\n/** Returns true when the props are of type [[DayPickerCustom]]. */\nexport function isDayPickerCustom(\n props: DayPickerProps\n): props is DayPickerCustomProps {\n return props.mode === 'custom';\n}\n"],"names":[],"mappings":"AAWA;SACgB,iBAAiB,CAC/B,KAAqB;IAErB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DayPickerMultiple.js","sources":["../../src/types/DayPickerMultiple.ts"],"sourcesContent":["import { DayPickerProps } from './DayPicker';\nimport { SelectMultipleEventHandler } from './EventHandlers';\n\n/** The props for the [[DayPicker]] component when using `mode=\"multiple\"`. */\nexport interface DayPickerMultipleProps extends DayPickerProps {\n mode: 'multiple';\n /** The selected days. */\n selected?: Date[];\n /** Event fired when a days added or removed to the selection. */\n onSelect?: SelectMultipleEventHandler;\n /** The minimum amount of days that can be selected. */\n min?: number;\n /** The maximum amount of days that can be selected. */\n max?: number;\n}\n\n/** Returns true when the props are of type [[DayPickerMultiple]]. */\nexport function isDayPickerMultiple(\n props: DayPickerProps\n): props is DayPickerMultipleProps {\n return props.mode === 'multiple';\n}\n"],"names":[],"mappings":"AAgBA;SACgB,mBAAmB,CACjC,KAAqB;IAErB,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACnC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DayPickerRange.js","sources":["../../src/types/DayPickerRange.ts"],"sourcesContent":["import { DayPickerProps } from './DayPicker';\nimport { SelectRangeEventHandler } from './EventHandlers';\nimport { DateRange } from './Matchers';\n\n/** The props for the [[DayPicker]] component when using `mode=\"range\"`. */\nexport interface DayPickerRangeProps extends DayPickerProps {\n mode: 'range';\n /** The selected range of days. */\n selected?: DateRange;\n /** Event fired when a range (or a part of the range) is selected. */\n onSelect?: SelectRangeEventHandler;\n /** The minimum amount of days that can be selected. */\n min?: number;\n /** The maximum amount of days that can be selected. */\n max?: number;\n}\n\n/** Returns true when the props are of type [[DayPickerRange]]. */\nexport function isDayPickerRange(\n props: DayPickerProps\n): props is DayPickerRangeProps {\n return props.mode === 'range';\n}\n"],"names":[],"mappings":"AAiBA;SACgB,gBAAgB,CAC9B,KAAqB;IAErB,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC;AAChC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DayPickerSingle.js","sources":["../../src/types/DayPickerSingle.ts"],"sourcesContent":["import { DayPickerProps } from './DayPicker';\nimport { SelectSingleEventHandler } from './EventHandlers';\n\n/** The props for the [[DayPicker]] component when using `mode=\"single\"`. */\nexport interface DayPickerSingleProps extends DayPickerProps {\n mode: 'single';\n /** The selected day. */\n selected?: Date | undefined;\n /** Event fired when a day is selected. */\n onSelect?: SelectSingleEventHandler;\n /** Make the selection required. */\n required?: boolean;\n}\n\n/** Returns true when the props are of type [[DayPickerSingle]]. */\nexport function isDayPickerSingle(\n props: DayPickerProps\n): props is DayPickerSingleProps {\n return props.mode === 'single';\n}\n"],"names":[],"mappings":"AAcA;SACgB,iBAAiB,CAC/B,KAAqB;IAErB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjC;;;;"}
|
package/build/types/Matchers.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** Returns true if `matcher` is of type [[DateInterval]]. */
|
|
2
|
-
function isDateInterval(matcher) {
|
|
3
|
-
return Boolean(matcher &&
|
|
4
|
-
typeof matcher === 'object' &&
|
|
5
|
-
'before' in matcher &&
|
|
6
|
-
'after' in matcher);
|
|
7
|
-
}
|
|
8
|
-
/** Returns true if `value` is a [[DateRange]] type. */
|
|
9
|
-
function isDateRange(value) {
|
|
10
|
-
// TODO: Check if dates?!
|
|
11
|
-
return Boolean(value && typeof value === 'object' && 'from' in value);
|
|
12
|
-
}
|
|
13
|
-
/** Returns true if `value` is of type [[DateAfter]]. */
|
|
14
|
-
function isDateAfterType(value) {
|
|
15
|
-
return Boolean(value && typeof value === 'object' && 'after' in value);
|
|
16
|
-
}
|
|
17
|
-
/** Returns true if `value` is of type [[DateBefore]]. */
|
|
18
|
-
function isDateBeforeType(value) {
|
|
19
|
-
return Boolean(value && typeof value === 'object' && 'before' in value);
|
|
20
|
-
}
|
|
21
|
-
/** Returns true if `value` is a [[DayOfWeek]] type. */
|
|
22
|
-
function isDayOfWeekType(value) {
|
|
23
|
-
return Boolean(value && typeof value === 'object' && 'dayOfWeek' in value);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDayOfWeekType };
|
|
27
|
-
//# sourceMappingURL=Matchers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Matchers.js","sources":["../../src/types/Matchers.ts"],"sourcesContent":["/** A `Matcher` is a function, a date, an object, or an array of them used to determine if a day matches a modifier. */\nexport type Matcher =\n | ((date: Date) => boolean)\n | Date\n | Date[]\n | DateRange\n | DateBefore\n | DateAfter\n | DateInterval\n | DayOfWeek;\n\n/** A matcher to match a day falling after the specified date, with the date not included. */\nexport type DateAfter = { after: Date };\n\n/** A matcher to match a day falling before the specified date, with the date not included. */\nexport type DateBefore = { before: Date };\n\n/** A matcher to match a day falling before and after two dates, where the dates are not included. */\nexport type DateInterval = { before: Date; after: Date };\n\n/** A matcher to match a range of dates. The range can be open. Differently from [[DateInterval]], the dates here are included. */\nexport type DateRange = { from: Date | undefined; to?: Date | undefined };\n\n/** A matcher to match a date being one of the specified days of the week (`0-7`, where `0` is Sunday). */\nexport type DayOfWeek = { dayOfWeek: number[] };\n\n/** Returns true if `matcher` is of type [[DateInterval]]. */\nexport function isDateInterval(matcher: unknown): matcher is DateInterval {\n return Boolean(\n matcher &&\n typeof matcher === 'object' &&\n 'before' in matcher &&\n 'after' in matcher\n );\n}\n\n/** Returns true if `value` is a [[DateRange]] type. */\nexport function isDateRange(value: unknown): value is DateRange {\n // TODO: Check if dates?!\n return Boolean(value && typeof value === 'object' && 'from' in value);\n}\n\n/** Returns true if `value` is of type [[DateAfter]]. */\nexport function isDateAfterType(value: unknown): value is DateAfter {\n return Boolean(value && typeof value === 'object' && 'after' in value);\n}\n\n/** Returns true if `value` is of type [[DateBefore]]. */\nexport function isDateBeforeType(value: unknown): value is DateBefore {\n return Boolean(value && typeof value === 'object' && 'before' in value);\n}\n\n/** Returns true if `value` is a [[DayOfWeek]] type. */\nexport function isDayOfWeekType(value: unknown): value is DayOfWeek {\n return Boolean(value && typeof value === 'object' && 'dayOfWeek' in value);\n}\n"],"names":[],"mappings":"AA0BA;SACgB,cAAc,CAAC,OAAgB;IAC7C,OAAO,OAAO,CACZ,OAAO;QACL,OAAO,OAAO,KAAK,QAAQ;QAC3B,QAAQ,IAAI,OAAO;QACnB,OAAO,IAAI,OAAO,CACrB,CAAC;AACJ,CAAC;AAED;SACgB,WAAW,CAAC,KAAc;;IAExC,OAAO,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC;AACxE,CAAC;AAED;SACgB,eAAe,CAAC,KAAc;IAC5C,OAAO,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;SACgB,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED;SACgB,eAAe,CAAC,KAAc;IAC5C,OAAO,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,IAAI,KAAK,CAAC,CAAC;AAC7E;;;;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Matcher } from './Matchers';
|
|
3
|
-
/** The map of modifiers with an array of matcher. */
|
|
4
|
-
export declare type Modifiers = Record<Modifier, Matcher[]> & Record<InternalModifier, Matcher[]>;
|
|
5
|
-
/** The modifiers that are used internally in DayPicker. */
|
|
6
|
-
export declare type InternalModifier = 'selected' | 'disabled' | 'hidden' | 'today' | 'range_start' | 'range_end' | 'range_middle';
|
|
7
|
-
/** A _modifier_ represents different styles or states of a day displayed in the calendar. */
|
|
8
|
-
export declare type Modifier = string;
|
|
9
|
-
/** The status of a modifiers when matched a day. */
|
|
10
|
-
export declare type ModifierStatus = Record<Modifier, true> & Partial<Record<InternalModifier, true>>;
|
|
11
|
-
/** The inline-style to apply to the day matching `modifier`. */
|
|
12
|
-
export declare type ModifierStyles = Record<Modifier, React.CSSProperties> & Partial<Record<InternalModifier, React.CSSProperties>>;
|
|
13
|
-
/** The classnames to assign to each modifier. */
|
|
14
|
-
export declare type ModifierClassNames = Record<Modifier, string> & Partial<Record<InternalModifier, string>>;
|
|
15
|
-
/** A map of matchers to use as custom modifiers.*/
|
|
16
|
-
export declare type CustomModifiers = Record<Modifier, Matcher | Matcher[]>;
|
package/build/types/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './DayPicker';
|
|
2
|
-
export * from './DayPickerCustom';
|
|
3
|
-
export * from './DayPickerMultiple';
|
|
4
|
-
export * from './DayPickerRange';
|
|
5
|
-
export * from './DayPickerSingle';
|
|
6
|
-
export * from './EventHandlers';
|
|
7
|
-
export * from './Formatters';
|
|
8
|
-
export * from './Labels';
|
|
9
|
-
export * from './Matchers';
|
|
10
|
-
export * from './Modifiers';
|
|
11
|
-
export * from './Styles';
|