react-day-picker 9.6.7 → 9.7.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.
- package/README.md +9 -1
- package/dist/cjs/DayPicker.d.ts +4 -2
- package/dist/cjs/DayPicker.js +59 -8
- package/dist/cjs/DayPicker.js.map +1 -1
- package/dist/cjs/UI.d.ts +11 -23
- package/dist/cjs/UI.js +6 -8
- package/dist/cjs/UI.js.map +1 -1
- package/dist/cjs/classes/CalendarDay.d.ts +17 -14
- package/dist/cjs/classes/CalendarDay.js +9 -6
- package/dist/cjs/classes/CalendarDay.js.map +1 -1
- package/dist/cjs/classes/CalendarMonth.d.ts +8 -3
- package/dist/cjs/classes/CalendarMonth.js +6 -1
- package/dist/cjs/classes/CalendarMonth.js.map +1 -1
- package/dist/cjs/classes/CalendarWeek.d.ts +6 -2
- package/dist/cjs/classes/CalendarWeek.js +5 -1
- package/dist/cjs/classes/CalendarWeek.js.map +1 -1
- package/dist/cjs/classes/DateLib.d.ts +53 -52
- package/dist/cjs/classes/DateLib.js +26 -22
- package/dist/cjs/classes/DateLib.js.map +1 -1
- package/dist/cjs/components/Day.d.ts +4 -4
- package/dist/cjs/components/Day.js +4 -4
- package/dist/cjs/components/DayButton.d.ts +2 -2
- package/dist/cjs/components/DayButton.js +1 -1
- package/dist/cjs/components/Dropdown.d.ts +4 -6
- package/dist/cjs/components/Dropdown.js +1 -1
- package/dist/cjs/components/Dropdown.js.map +1 -1
- package/dist/cjs/components/DropdownNav.d.ts +1 -1
- package/dist/cjs/components/DropdownNav.js +1 -1
- package/dist/cjs/components/Footer.d.ts +1 -1
- package/dist/cjs/components/Footer.js +1 -1
- package/dist/cjs/components/Month.d.ts +3 -3
- package/dist/cjs/components/Month.js +1 -1
- package/dist/cjs/components/MonthCaption.d.ts +3 -3
- package/dist/cjs/components/MonthCaption.js +1 -1
- package/dist/cjs/components/MonthGrid.d.ts +1 -1
- package/dist/cjs/components/MonthGrid.js +1 -1
- package/dist/cjs/components/Months.d.ts +1 -1
- package/dist/cjs/components/Months.js +1 -1
- package/dist/cjs/components/MonthsDropdown.d.ts +1 -1
- package/dist/cjs/components/MonthsDropdown.js +1 -1
- package/dist/cjs/components/Nav.d.ts +5 -1
- package/dist/cjs/components/Nav.js +1 -1
- package/dist/cjs/components/Nav.js.map +1 -1
- package/dist/cjs/components/NextMonthButton.d.ts +1 -1
- package/dist/cjs/components/NextMonthButton.js +1 -1
- package/dist/cjs/components/Option.d.ts +1 -1
- package/dist/cjs/components/Option.js +1 -1
- package/dist/cjs/components/PreviousMonthButton.d.ts +1 -1
- package/dist/cjs/components/PreviousMonthButton.js +1 -1
- package/dist/cjs/components/Root.d.ts +2 -2
- package/dist/cjs/components/Root.js +1 -1
- package/dist/cjs/components/Select.d.ts +1 -1
- package/dist/cjs/components/Select.js +1 -1
- package/dist/cjs/components/Week.d.ts +2 -1
- package/dist/cjs/components/Week.js +1 -1
- package/dist/cjs/components/Week.js.map +1 -1
- package/dist/cjs/components/WeekNumber.d.ts +2 -2
- package/dist/cjs/components/WeekNumber.js +1 -1
- package/dist/cjs/components/WeekNumberHeader.d.ts +1 -1
- package/dist/cjs/components/WeekNumberHeader.js +1 -1
- package/dist/cjs/components/Weekday.d.ts +1 -1
- package/dist/cjs/components/Weekday.js +1 -1
- package/dist/cjs/components/Weekdays.d.ts +1 -1
- package/dist/cjs/components/Weekdays.js +1 -1
- package/dist/cjs/components/Weeks.d.ts +1 -1
- package/dist/cjs/components/Weeks.js +1 -1
- package/dist/cjs/components/YearsDropdown.d.ts +1 -1
- package/dist/cjs/components/YearsDropdown.js +1 -1
- package/dist/cjs/formatters/formatCaption.d.ts +7 -2
- package/dist/cjs/formatters/formatCaption.js +7 -2
- package/dist/cjs/formatters/formatCaption.js.map +1 -1
- package/dist/cjs/formatters/formatDay.d.ts +7 -2
- package/dist/cjs/formatters/formatDay.js +7 -2
- package/dist/cjs/formatters/formatDay.js.map +1 -1
- package/dist/cjs/formatters/formatMonthDropdown.d.ts +6 -2
- package/dist/cjs/formatters/formatMonthDropdown.js +6 -2
- package/dist/cjs/formatters/formatMonthDropdown.js.map +1 -1
- package/dist/cjs/formatters/formatWeekNumber.d.ts +7 -3
- package/dist/cjs/formatters/formatWeekNumber.js +10 -5
- package/dist/cjs/formatters/formatWeekNumber.js.map +1 -1
- package/dist/cjs/formatters/formatWeekNumberHeader.d.ts +3 -2
- package/dist/cjs/formatters/formatWeekNumberHeader.js +3 -2
- package/dist/cjs/formatters/formatWeekNumberHeader.js.map +1 -1
- package/dist/cjs/formatters/formatWeekdayName.d.ts +7 -2
- package/dist/cjs/formatters/formatWeekdayName.js +7 -2
- package/dist/cjs/formatters/formatWeekdayName.js.map +1 -1
- package/dist/cjs/formatters/formatYearDropdown.d.ts +5 -1
- package/dist/cjs/formatters/formatYearDropdown.js +5 -1
- package/dist/cjs/formatters/formatYearDropdown.js.map +1 -1
- package/dist/cjs/helpers/calculateFocusTarget.d.ts +14 -0
- package/dist/cjs/helpers/calculateFocusTarget.js +24 -1
- package/dist/cjs/helpers/calculateFocusTarget.js.map +1 -1
- package/dist/cjs/helpers/createGetModifiers.d.ts +16 -0
- package/dist/cjs/{useGetModifiers.js → helpers/createGetModifiers.js} +13 -7
- package/dist/cjs/helpers/createGetModifiers.js.map +1 -0
- package/dist/cjs/helpers/endOfBroadcastWeek.d.ts +7 -1
- package/dist/cjs/helpers/endOfBroadcastWeek.js +7 -1
- package/dist/cjs/helpers/endOfBroadcastWeek.js.map +1 -1
- package/dist/cjs/helpers/getBroadcastWeeksInMonth.d.ts +8 -1
- package/dist/cjs/helpers/getBroadcastWeeksInMonth.js +8 -1
- package/dist/cjs/helpers/getBroadcastWeeksInMonth.js.map +1 -1
- package/dist/cjs/helpers/getClassNamesForModifiers.d.ts +12 -0
- package/dist/cjs/helpers/getClassNamesForModifiers.js +12 -0
- package/dist/cjs/helpers/getClassNamesForModifiers.js.map +1 -1
- package/dist/cjs/helpers/getComponents.d.ts +10 -0
- package/dist/cjs/helpers/getComponents.js +10 -0
- package/dist/cjs/helpers/getComponents.js.map +1 -1
- package/dist/cjs/helpers/getDataAttributes.d.ts +9 -1
- package/dist/cjs/helpers/getDataAttributes.js +11 -2
- package/dist/cjs/helpers/getDataAttributes.js.map +1 -1
- package/dist/cjs/helpers/getDates.d.ts +12 -1
- package/dist/cjs/helpers/getDates.js +13 -2
- package/dist/cjs/helpers/getDates.js.map +1 -1
- package/dist/cjs/helpers/getDays.d.ts +4 -0
- package/dist/cjs/helpers/getDays.js +4 -1
- package/dist/cjs/helpers/getDays.js.map +1 -1
- package/dist/cjs/helpers/getDefaultClassNames.d.ts +5 -1
- package/dist/cjs/helpers/getDefaultClassNames.js +5 -1
- package/dist/cjs/helpers/getDefaultClassNames.js.map +1 -1
- package/dist/cjs/helpers/getDisplayMonths.d.ts +10 -0
- package/dist/cjs/helpers/getDisplayMonths.js +10 -0
- package/dist/cjs/helpers/getDisplayMonths.js.map +1 -1
- package/dist/cjs/helpers/getFocusableDate.d.ts +16 -1
- package/dist/cjs/helpers/getFocusableDate.js +17 -2
- package/dist/cjs/helpers/getFocusableDate.js.map +1 -1
- package/dist/cjs/helpers/getFormatters.d.ts +7 -1
- package/dist/cjs/helpers/getFormatters.js +7 -1
- package/dist/cjs/helpers/getFormatters.js.map +1 -1
- package/dist/cjs/helpers/getInitialMonth.d.ts +11 -1
- package/dist/cjs/helpers/getInitialMonth.js +14 -7
- package/dist/cjs/helpers/getInitialMonth.js.map +1 -1
- package/dist/cjs/helpers/getLabels.d.ts +6 -1
- package/dist/cjs/helpers/getLabels.js +6 -1
- package/dist/cjs/helpers/getLabels.js.map +1 -1
- package/dist/cjs/helpers/getMonthOptions.d.ts +15 -1
- package/dist/cjs/helpers/getMonthOptions.js +15 -1
- package/dist/cjs/helpers/getMonthOptions.js.map +1 -1
- package/dist/cjs/helpers/getMonths.d.ts +15 -8
- package/dist/cjs/helpers/getMonths.js +16 -9
- package/dist/cjs/helpers/getMonths.js.map +1 -1
- package/dist/cjs/helpers/getNavMonth.d.ts +7 -1
- package/dist/cjs/helpers/getNavMonth.js +7 -1
- package/dist/cjs/helpers/getNavMonth.js.map +1 -1
- package/dist/cjs/helpers/getNextFocus.d.ts +18 -3
- package/dist/cjs/helpers/getNextFocus.js +19 -5
- package/dist/cjs/helpers/getNextFocus.js.map +1 -1
- package/dist/cjs/helpers/getNextMonth.d.ts +13 -5
- package/dist/cjs/helpers/getNextMonth.js +13 -6
- package/dist/cjs/helpers/getNextMonth.js.map +1 -1
- package/dist/cjs/helpers/getPreviousMonth.d.ts +13 -5
- package/dist/cjs/helpers/getPreviousMonth.js +13 -5
- package/dist/cjs/helpers/getPreviousMonth.js.map +1 -1
- package/dist/cjs/helpers/getStyleForModifiers.d.ts +11 -0
- package/dist/cjs/helpers/getStyleForModifiers.js +11 -0
- package/dist/cjs/helpers/getStyleForModifiers.js.map +1 -1
- package/dist/cjs/helpers/getWeekdays.d.ts +9 -9
- package/dist/cjs/helpers/getWeekdays.js +9 -9
- package/dist/cjs/helpers/getWeekdays.js.map +1 -1
- package/dist/cjs/helpers/getWeeks.d.ts +6 -1
- package/dist/cjs/helpers/getWeeks.js +6 -1
- package/dist/cjs/helpers/getWeeks.js.map +1 -1
- package/dist/cjs/helpers/getYearOptions.d.ts +13 -1
- package/dist/cjs/helpers/getYearOptions.js +13 -1
- package/dist/cjs/helpers/getYearOptions.js.map +1 -1
- package/dist/cjs/helpers/startOfBroadcastWeek.d.ts +8 -1
- package/dist/cjs/helpers/startOfBroadcastWeek.js +8 -1
- package/dist/cjs/helpers/startOfBroadcastWeek.js.map +1 -1
- package/dist/cjs/helpers/useControlledValue.d.ts +10 -6
- package/dist/cjs/helpers/useControlledValue.js +10 -6
- package/dist/cjs/helpers/useControlledValue.js.map +1 -1
- package/dist/cjs/labels/labelDayButton.d.ts +9 -6
- package/dist/cjs/labels/labelDayButton.js +9 -6
- package/dist/cjs/labels/labelDayButton.js.map +1 -1
- package/dist/cjs/labels/labelGrid.d.ts +7 -3
- package/dist/cjs/labels/labelGrid.js +7 -3
- package/dist/cjs/labels/labelGrid.js.map +1 -1
- package/dist/cjs/labels/labelGridcell.d.ts +7 -4
- package/dist/cjs/labels/labelGridcell.js +7 -4
- package/dist/cjs/labels/labelGridcell.js.map +1 -1
- package/dist/cjs/labels/labelMonthDropdown.d.ts +3 -1
- package/dist/cjs/labels/labelMonthDropdown.js +3 -1
- package/dist/cjs/labels/labelMonthDropdown.js.map +1 -1
- package/dist/cjs/labels/labelNav.d.ts +2 -1
- package/dist/cjs/labels/labelNav.js +2 -1
- package/dist/cjs/labels/labelNav.js.map +1 -1
- package/dist/cjs/labels/labelNext.d.ts +5 -4
- package/dist/cjs/labels/labelNext.js +5 -4
- package/dist/cjs/labels/labelNext.js.map +1 -1
- package/dist/cjs/labels/labelPrevious.d.ts +5 -4
- package/dist/cjs/labels/labelPrevious.js +5 -4
- package/dist/cjs/labels/labelPrevious.js.map +1 -1
- package/dist/cjs/labels/labelWeekNumber.d.ts +4 -1
- package/dist/cjs/labels/labelWeekNumber.js +4 -1
- package/dist/cjs/labels/labelWeekNumber.js.map +1 -1
- package/dist/cjs/labels/labelWeekNumberHeader.d.ts +3 -1
- package/dist/cjs/labels/labelWeekNumberHeader.js +3 -1
- package/dist/cjs/labels/labelWeekNumberHeader.js.map +1 -1
- package/dist/cjs/labels/labelWeekday.d.ts +5 -1
- package/dist/cjs/labels/labelWeekday.js +5 -1
- package/dist/cjs/labels/labelWeekday.js.map +1 -1
- package/dist/cjs/labels/labelYearDropdown.d.ts +3 -1
- package/dist/cjs/labels/labelYearDropdown.js +3 -1
- package/dist/cjs/labels/labelYearDropdown.js.map +1 -1
- package/dist/cjs/persian.d.ts +15 -2
- package/dist/cjs/persian.js +15 -2
- package/dist/cjs/persian.js.map +1 -1
- package/dist/cjs/selection/useMulti.d.ts +9 -0
- package/dist/cjs/selection/useMulti.js +9 -0
- package/dist/cjs/selection/useMulti.js.map +1 -1
- package/dist/cjs/selection/useRange.d.ts +9 -0
- package/dist/cjs/selection/useRange.js +9 -0
- package/dist/cjs/selection/useRange.js.map +1 -1
- package/dist/cjs/selection/useSingle.d.ts +9 -0
- package/dist/cjs/selection/useSingle.js +9 -0
- package/dist/cjs/selection/useSingle.js.map +1 -1
- package/dist/cjs/types/deprecated.d.ts +8 -8
- package/dist/cjs/types/deprecated.js +1 -1
- package/dist/cjs/types/props.d.ts +57 -13
- package/dist/cjs/types/selection.d.ts +25 -0
- package/dist/cjs/types/shared.d.ts +29 -78
- package/dist/cjs/useAnimation.d.ts +11 -1
- package/dist/cjs/useAnimation.js +11 -1
- package/dist/cjs/useAnimation.js.map +1 -1
- package/dist/cjs/useCalendar.d.ts +9 -1
- package/dist/cjs/useCalendar.js +9 -1
- package/dist/cjs/useCalendar.js.map +1 -1
- package/dist/cjs/useDayPicker.d.ts +4 -6
- package/dist/cjs/useDayPicker.js +4 -6
- package/dist/cjs/useDayPicker.js.map +1 -1
- package/dist/cjs/useFocus.d.ts +14 -1
- package/dist/cjs/useFocus.js +14 -1
- package/dist/cjs/useFocus.js.map +1 -1
- package/dist/cjs/useSelection.d.ts +10 -0
- package/dist/cjs/useSelection.js +10 -0
- package/dist/cjs/useSelection.js.map +1 -1
- package/dist/cjs/utc.d.ts +6 -0
- package/dist/cjs/utc.js +6 -0
- package/dist/cjs/utc.js.map +1 -1
- package/dist/cjs/utils/addToRange.d.ts +10 -11
- package/dist/cjs/utils/addToRange.js +10 -11
- package/dist/cjs/utils/addToRange.js.map +1 -1
- package/dist/cjs/utils/dateMatchModifiers.d.ts +5 -15
- package/dist/cjs/utils/dateMatchModifiers.js +5 -15
- package/dist/cjs/utils/dateMatchModifiers.js.map +1 -1
- package/dist/cjs/utils/rangeContainsDayOfWeek.d.ts +7 -9
- package/dist/cjs/utils/rangeContainsDayOfWeek.js +7 -9
- package/dist/cjs/utils/rangeContainsDayOfWeek.js.map +1 -1
- package/dist/cjs/utils/rangeContainsModifiers.d.ts +5 -14
- package/dist/cjs/utils/rangeContainsModifiers.js +5 -14
- package/dist/cjs/utils/rangeContainsModifiers.js.map +1 -1
- package/dist/cjs/utils/rangeIncludesDate.d.ts +7 -4
- package/dist/cjs/utils/rangeIncludesDate.js +7 -4
- package/dist/cjs/utils/rangeIncludesDate.js.map +1 -1
- package/dist/cjs/utils/rangeOverlaps.d.ts +5 -1
- package/dist/cjs/utils/rangeOverlaps.js +5 -1
- package/dist/cjs/utils/rangeOverlaps.js.map +1 -1
- package/dist/cjs/utils/typeguards.d.ts +19 -6
- package/dist/cjs/utils/typeguards.js +19 -6
- package/dist/cjs/utils/typeguards.js.map +1 -1
- package/dist/esm/DayPicker.d.ts +4 -2
- package/dist/esm/DayPicker.js +59 -8
- package/dist/esm/DayPicker.js.map +1 -1
- package/dist/esm/UI.d.ts +11 -23
- package/dist/esm/UI.js +6 -8
- package/dist/esm/UI.js.map +1 -1
- package/dist/esm/classes/CalendarDay.d.ts +17 -14
- package/dist/esm/classes/CalendarDay.js +9 -6
- package/dist/esm/classes/CalendarDay.js.map +1 -1
- package/dist/esm/classes/CalendarMonth.d.ts +8 -3
- package/dist/esm/classes/CalendarMonth.js +6 -1
- package/dist/esm/classes/CalendarMonth.js.map +1 -1
- package/dist/esm/classes/CalendarWeek.d.ts +6 -2
- package/dist/esm/classes/CalendarWeek.js +5 -1
- package/dist/esm/classes/CalendarWeek.js.map +1 -1
- package/dist/esm/classes/DateLib.d.ts +53 -52
- package/dist/esm/classes/DateLib.js +26 -22
- package/dist/esm/classes/DateLib.js.map +1 -1
- package/dist/esm/components/Day.d.ts +4 -4
- package/dist/esm/components/Day.js +4 -4
- package/dist/esm/components/DayButton.d.ts +2 -2
- package/dist/esm/components/DayButton.js +1 -1
- package/dist/esm/components/Dropdown.d.ts +4 -6
- package/dist/esm/components/Dropdown.js +1 -1
- package/dist/esm/components/Dropdown.js.map +1 -1
- package/dist/esm/components/DropdownNav.d.ts +1 -1
- package/dist/esm/components/DropdownNav.js +1 -1
- package/dist/esm/components/Footer.d.ts +1 -1
- package/dist/esm/components/Footer.js +1 -1
- package/dist/esm/components/Month.d.ts +3 -3
- package/dist/esm/components/Month.js +1 -1
- package/dist/esm/components/MonthCaption.d.ts +3 -3
- package/dist/esm/components/MonthCaption.js +1 -1
- package/dist/esm/components/MonthGrid.d.ts +1 -1
- package/dist/esm/components/MonthGrid.js +1 -1
- package/dist/esm/components/Months.d.ts +1 -1
- package/dist/esm/components/Months.js +1 -1
- package/dist/esm/components/MonthsDropdown.d.ts +1 -1
- package/dist/esm/components/MonthsDropdown.js +1 -1
- package/dist/esm/components/Nav.d.ts +5 -1
- package/dist/esm/components/Nav.js +1 -1
- package/dist/esm/components/Nav.js.map +1 -1
- package/dist/esm/components/NextMonthButton.d.ts +1 -1
- package/dist/esm/components/NextMonthButton.js +1 -1
- package/dist/esm/components/Option.d.ts +1 -1
- package/dist/esm/components/Option.js +1 -1
- package/dist/esm/components/PreviousMonthButton.d.ts +1 -1
- package/dist/esm/components/PreviousMonthButton.js +1 -1
- package/dist/esm/components/Root.d.ts +2 -2
- package/dist/esm/components/Root.js +1 -1
- package/dist/esm/components/Select.d.ts +1 -1
- package/dist/esm/components/Select.js +1 -1
- package/dist/esm/components/Week.d.ts +2 -1
- package/dist/esm/components/Week.js +1 -1
- package/dist/esm/components/Week.js.map +1 -1
- package/dist/esm/components/WeekNumber.d.ts +2 -2
- package/dist/esm/components/WeekNumber.js +1 -1
- package/dist/esm/components/WeekNumberHeader.d.ts +1 -1
- package/dist/esm/components/WeekNumberHeader.js +1 -1
- package/dist/esm/components/Weekday.d.ts +1 -1
- package/dist/esm/components/Weekday.js +1 -1
- package/dist/esm/components/Weekdays.d.ts +1 -1
- package/dist/esm/components/Weekdays.js +1 -1
- package/dist/esm/components/Weeks.d.ts +1 -1
- package/dist/esm/components/Weeks.js +1 -1
- package/dist/esm/components/YearsDropdown.d.ts +1 -1
- package/dist/esm/components/YearsDropdown.js +1 -1
- package/dist/esm/formatters/formatCaption.d.ts +7 -2
- package/dist/esm/formatters/formatCaption.js +7 -2
- package/dist/esm/formatters/formatCaption.js.map +1 -1
- package/dist/esm/formatters/formatDay.d.ts +7 -2
- package/dist/esm/formatters/formatDay.js +7 -2
- package/dist/esm/formatters/formatDay.js.map +1 -1
- package/dist/esm/formatters/formatMonthDropdown.d.ts +6 -2
- package/dist/esm/formatters/formatMonthDropdown.js +6 -2
- package/dist/esm/formatters/formatMonthDropdown.js.map +1 -1
- package/dist/esm/formatters/formatWeekNumber.d.ts +7 -3
- package/dist/esm/formatters/formatWeekNumber.js +10 -5
- package/dist/esm/formatters/formatWeekNumber.js.map +1 -1
- package/dist/esm/formatters/formatWeekNumberHeader.d.ts +3 -2
- package/dist/esm/formatters/formatWeekNumberHeader.js +3 -2
- package/dist/esm/formatters/formatWeekNumberHeader.js.map +1 -1
- package/dist/esm/formatters/formatWeekdayName.d.ts +7 -2
- package/dist/esm/formatters/formatWeekdayName.js +7 -2
- package/dist/esm/formatters/formatWeekdayName.js.map +1 -1
- package/dist/esm/formatters/formatYearDropdown.d.ts +5 -1
- package/dist/esm/formatters/formatYearDropdown.js +5 -1
- package/dist/esm/formatters/formatYearDropdown.js.map +1 -1
- package/dist/esm/helpers/calculateFocusTarget.d.ts +14 -0
- package/dist/esm/helpers/calculateFocusTarget.js +24 -1
- package/dist/esm/helpers/calculateFocusTarget.js.map +1 -1
- package/dist/esm/helpers/createGetModifiers.d.ts +16 -0
- package/dist/esm/{useGetModifiers.js → helpers/createGetModifiers.js} +12 -6
- package/dist/esm/helpers/createGetModifiers.js.map +1 -0
- package/dist/esm/helpers/endOfBroadcastWeek.d.ts +7 -1
- package/dist/esm/helpers/endOfBroadcastWeek.js +7 -1
- package/dist/esm/helpers/endOfBroadcastWeek.js.map +1 -1
- package/dist/esm/helpers/getBroadcastWeeksInMonth.d.ts +8 -1
- package/dist/esm/helpers/getBroadcastWeeksInMonth.js +8 -1
- package/dist/esm/helpers/getBroadcastWeeksInMonth.js.map +1 -1
- package/dist/esm/helpers/getClassNamesForModifiers.d.ts +12 -0
- package/dist/esm/helpers/getClassNamesForModifiers.js +12 -0
- package/dist/esm/helpers/getClassNamesForModifiers.js.map +1 -1
- package/dist/esm/helpers/getComponents.d.ts +10 -0
- package/dist/esm/helpers/getComponents.js +10 -0
- package/dist/esm/helpers/getComponents.js.map +1 -1
- package/dist/esm/helpers/getDataAttributes.d.ts +9 -1
- package/dist/esm/helpers/getDataAttributes.js +11 -2
- package/dist/esm/helpers/getDataAttributes.js.map +1 -1
- package/dist/esm/helpers/getDates.d.ts +12 -1
- package/dist/esm/helpers/getDates.js +13 -2
- package/dist/esm/helpers/getDates.js.map +1 -1
- package/dist/esm/helpers/getDays.d.ts +4 -0
- package/dist/esm/helpers/getDays.js +4 -1
- package/dist/esm/helpers/getDays.js.map +1 -1
- package/dist/esm/helpers/getDefaultClassNames.d.ts +5 -1
- package/dist/esm/helpers/getDefaultClassNames.js +5 -1
- package/dist/esm/helpers/getDefaultClassNames.js.map +1 -1
- package/dist/esm/helpers/getDisplayMonths.d.ts +10 -0
- package/dist/esm/helpers/getDisplayMonths.js +10 -0
- package/dist/esm/helpers/getDisplayMonths.js.map +1 -1
- package/dist/esm/helpers/getFocusableDate.d.ts +16 -1
- package/dist/esm/helpers/getFocusableDate.js +17 -2
- package/dist/esm/helpers/getFocusableDate.js.map +1 -1
- package/dist/esm/helpers/getFormatters.d.ts +7 -1
- package/dist/esm/helpers/getFormatters.js +7 -1
- package/dist/esm/helpers/getFormatters.js.map +1 -1
- package/dist/esm/helpers/getInitialMonth.d.ts +11 -1
- package/dist/esm/helpers/getInitialMonth.js +14 -7
- package/dist/esm/helpers/getInitialMonth.js.map +1 -1
- package/dist/esm/helpers/getLabels.d.ts +6 -1
- package/dist/esm/helpers/getLabels.js +6 -1
- package/dist/esm/helpers/getLabels.js.map +1 -1
- package/dist/esm/helpers/getMonthOptions.d.ts +15 -1
- package/dist/esm/helpers/getMonthOptions.js +15 -1
- package/dist/esm/helpers/getMonthOptions.js.map +1 -1
- package/dist/esm/helpers/getMonths.d.ts +15 -8
- package/dist/esm/helpers/getMonths.js +16 -9
- package/dist/esm/helpers/getMonths.js.map +1 -1
- package/dist/esm/helpers/getNavMonth.d.ts +7 -1
- package/dist/esm/helpers/getNavMonth.js +7 -1
- package/dist/esm/helpers/getNavMonth.js.map +1 -1
- package/dist/esm/helpers/getNextFocus.d.ts +18 -3
- package/dist/esm/helpers/getNextFocus.js +19 -5
- package/dist/esm/helpers/getNextFocus.js.map +1 -1
- package/dist/esm/helpers/getNextMonth.d.ts +13 -5
- package/dist/esm/helpers/getNextMonth.js +13 -6
- package/dist/esm/helpers/getNextMonth.js.map +1 -1
- package/dist/esm/helpers/getPreviousMonth.d.ts +13 -5
- package/dist/esm/helpers/getPreviousMonth.js +13 -5
- package/dist/esm/helpers/getPreviousMonth.js.map +1 -1
- package/dist/esm/helpers/getStyleForModifiers.d.ts +11 -0
- package/dist/esm/helpers/getStyleForModifiers.js +11 -0
- package/dist/esm/helpers/getStyleForModifiers.js.map +1 -1
- package/dist/esm/helpers/getWeekdays.d.ts +9 -9
- package/dist/esm/helpers/getWeekdays.js +9 -9
- package/dist/esm/helpers/getWeekdays.js.map +1 -1
- package/dist/esm/helpers/getWeeks.d.ts +6 -1
- package/dist/esm/helpers/getWeeks.js +6 -1
- package/dist/esm/helpers/getWeeks.js.map +1 -1
- package/dist/esm/helpers/getYearOptions.d.ts +13 -1
- package/dist/esm/helpers/getYearOptions.js +13 -1
- package/dist/esm/helpers/getYearOptions.js.map +1 -1
- package/dist/esm/helpers/startOfBroadcastWeek.d.ts +8 -1
- package/dist/esm/helpers/startOfBroadcastWeek.js +8 -1
- package/dist/esm/helpers/startOfBroadcastWeek.js.map +1 -1
- package/dist/esm/helpers/useControlledValue.d.ts +10 -6
- package/dist/esm/helpers/useControlledValue.js +10 -6
- package/dist/esm/helpers/useControlledValue.js.map +1 -1
- package/dist/esm/labels/labelDayButton.d.ts +9 -6
- package/dist/esm/labels/labelDayButton.js +9 -6
- package/dist/esm/labels/labelDayButton.js.map +1 -1
- package/dist/esm/labels/labelGrid.d.ts +7 -3
- package/dist/esm/labels/labelGrid.js +7 -3
- package/dist/esm/labels/labelGrid.js.map +1 -1
- package/dist/esm/labels/labelGridcell.d.ts +7 -4
- package/dist/esm/labels/labelGridcell.js +7 -4
- package/dist/esm/labels/labelGridcell.js.map +1 -1
- package/dist/esm/labels/labelMonthDropdown.d.ts +3 -1
- package/dist/esm/labels/labelMonthDropdown.js +3 -1
- package/dist/esm/labels/labelMonthDropdown.js.map +1 -1
- package/dist/esm/labels/labelNav.d.ts +2 -1
- package/dist/esm/labels/labelNav.js +2 -1
- package/dist/esm/labels/labelNav.js.map +1 -1
- package/dist/esm/labels/labelNext.d.ts +5 -4
- package/dist/esm/labels/labelNext.js +5 -4
- package/dist/esm/labels/labelNext.js.map +1 -1
- package/dist/esm/labels/labelPrevious.d.ts +5 -4
- package/dist/esm/labels/labelPrevious.js +5 -4
- package/dist/esm/labels/labelPrevious.js.map +1 -1
- package/dist/esm/labels/labelWeekNumber.d.ts +4 -1
- package/dist/esm/labels/labelWeekNumber.js +4 -1
- package/dist/esm/labels/labelWeekNumber.js.map +1 -1
- package/dist/esm/labels/labelWeekNumberHeader.d.ts +3 -1
- package/dist/esm/labels/labelWeekNumberHeader.js +3 -1
- package/dist/esm/labels/labelWeekNumberHeader.js.map +1 -1
- package/dist/esm/labels/labelWeekday.d.ts +5 -1
- package/dist/esm/labels/labelWeekday.js +5 -1
- package/dist/esm/labels/labelWeekday.js.map +1 -1
- package/dist/esm/labels/labelYearDropdown.d.ts +3 -1
- package/dist/esm/labels/labelYearDropdown.js +3 -1
- package/dist/esm/labels/labelYearDropdown.js.map +1 -1
- package/dist/esm/persian.d.ts +15 -2
- package/dist/esm/persian.js +15 -2
- package/dist/esm/persian.js.map +1 -1
- package/dist/esm/selection/useMulti.d.ts +9 -0
- package/dist/esm/selection/useMulti.js +9 -0
- package/dist/esm/selection/useMulti.js.map +1 -1
- package/dist/esm/selection/useRange.d.ts +9 -0
- package/dist/esm/selection/useRange.js +9 -0
- package/dist/esm/selection/useRange.js.map +1 -1
- package/dist/esm/selection/useSingle.d.ts +9 -0
- package/dist/esm/selection/useSingle.js +9 -0
- package/dist/esm/selection/useSingle.js.map +1 -1
- package/dist/esm/types/deprecated.d.ts +8 -8
- package/dist/esm/types/deprecated.js +1 -1
- package/dist/esm/types/props.d.ts +57 -13
- package/dist/esm/types/selection.d.ts +25 -0
- package/dist/esm/types/shared.d.ts +29 -78
- package/dist/esm/useAnimation.d.ts +11 -1
- package/dist/esm/useAnimation.js +11 -1
- package/dist/esm/useAnimation.js.map +1 -1
- package/dist/esm/useCalendar.d.ts +9 -1
- package/dist/esm/useCalendar.js +9 -1
- package/dist/esm/useCalendar.js.map +1 -1
- package/dist/esm/useDayPicker.d.ts +4 -6
- package/dist/esm/useDayPicker.js +4 -6
- package/dist/esm/useDayPicker.js.map +1 -1
- package/dist/esm/useFocus.d.ts +14 -1
- package/dist/esm/useFocus.js +14 -1
- package/dist/esm/useFocus.js.map +1 -1
- package/dist/esm/useSelection.d.ts +10 -0
- package/dist/esm/useSelection.js +10 -0
- package/dist/esm/useSelection.js.map +1 -1
- package/dist/esm/utc.d.ts +6 -0
- package/dist/esm/utc.js +6 -0
- package/dist/esm/utc.js.map +1 -1
- package/dist/esm/utils/addToRange.d.ts +10 -11
- package/dist/esm/utils/addToRange.js +10 -11
- package/dist/esm/utils/addToRange.js.map +1 -1
- package/dist/esm/utils/dateMatchModifiers.d.ts +5 -15
- package/dist/esm/utils/dateMatchModifiers.js +5 -15
- package/dist/esm/utils/dateMatchModifiers.js.map +1 -1
- package/dist/esm/utils/rangeContainsDayOfWeek.d.ts +7 -9
- package/dist/esm/utils/rangeContainsDayOfWeek.js +7 -9
- package/dist/esm/utils/rangeContainsDayOfWeek.js.map +1 -1
- package/dist/esm/utils/rangeContainsModifiers.d.ts +5 -14
- package/dist/esm/utils/rangeContainsModifiers.js +5 -14
- package/dist/esm/utils/rangeContainsModifiers.js.map +1 -1
- package/dist/esm/utils/rangeIncludesDate.d.ts +7 -4
- package/dist/esm/utils/rangeIncludesDate.js +7 -4
- package/dist/esm/utils/rangeIncludesDate.js.map +1 -1
- package/dist/esm/utils/rangeOverlaps.d.ts +5 -1
- package/dist/esm/utils/rangeOverlaps.js +5 -1
- package/dist/esm/utils/rangeOverlaps.js.map +1 -1
- package/dist/esm/utils/typeguards.d.ts +19 -6
- package/dist/esm/utils/typeguards.js +19 -6
- package/dist/esm/utils/typeguards.js.map +1 -1
- package/package.json +1 -1
- package/src/DayPicker.test.tsx +34 -0
- package/src/DayPicker.tsx +105 -6
- package/src/UI.ts +11 -23
- package/src/classes/CalendarDay.ts +17 -14
- package/src/classes/CalendarMonth.ts +8 -3
- package/src/classes/CalendarWeek.ts +8 -2
- package/src/classes/DateLib.ts +65 -76
- package/src/components/Day.tsx +4 -4
- package/src/components/DayButton.tsx +2 -2
- package/src/components/Dropdown.tsx +4 -6
- package/src/components/DropdownNav.tsx +1 -1
- package/src/components/Footer.tsx +1 -1
- package/src/components/Month.tsx +3 -3
- package/src/components/MonthCaption.tsx +3 -3
- package/src/components/MonthGrid.tsx +1 -1
- package/src/components/Months.tsx +1 -1
- package/src/components/MonthsDropdown.tsx +1 -1
- package/src/components/Nav.tsx +5 -1
- package/src/components/NextMonthButton.tsx +1 -1
- package/src/components/Option.tsx +1 -1
- package/src/components/PreviousMonthButton.tsx +1 -1
- package/src/components/Root.tsx +2 -2
- package/src/components/Select.tsx +1 -1
- package/src/components/Week.tsx +2 -1
- package/src/components/WeekNumber.tsx +2 -2
- package/src/components/WeekNumberHeader.tsx +1 -1
- package/src/components/Weekday.tsx +1 -1
- package/src/components/Weekdays.tsx +1 -1
- package/src/components/Weeks.tsx +1 -1
- package/src/components/YearsDropdown.tsx +1 -1
- package/src/formatters/formatCaption.ts +7 -2
- package/src/formatters/formatDay.ts +7 -2
- package/src/formatters/formatMonthDropdown.ts +6 -2
- package/src/formatters/formatWeekNumber.test.ts +11 -0
- package/src/formatters/formatWeekNumber.ts +11 -5
- package/src/formatters/formatWeekNumberHeader.ts +3 -2
- package/src/formatters/formatWeekdayName.ts +7 -2
- package/src/formatters/formatYearDropdown.ts +5 -1
- package/src/helpers/calculateFocusTarget.ts +25 -2
- package/src/{useGetModifiers.test.tsx → helpers/createGetModifiers.test.ts} +7 -8
- package/src/{useGetModifiers.tsx → helpers/createGetModifiers.ts} +13 -7
- package/src/helpers/endOfBroadcastWeek.ts +7 -1
- package/src/helpers/getBroadcastWeeksInMonth.ts +8 -1
- package/src/helpers/getClassNamesForModifiers.ts +13 -1
- package/src/helpers/getComponents.ts +10 -0
- package/src/helpers/getDataAttributes.tsx +11 -2
- package/src/helpers/getDates.ts +13 -2
- package/src/helpers/getDays.ts +4 -1
- package/src/helpers/getDefaultClassNames.ts +5 -1
- package/src/helpers/getDisplayMonths.ts +11 -1
- package/src/helpers/getFocusableDate.ts +17 -2
- package/src/helpers/getFormatters.ts +7 -1
- package/src/helpers/getInitialMonth.ts +14 -9
- package/src/helpers/getLabels.ts +6 -1
- package/src/helpers/getMonthOptions.ts +15 -1
- package/src/helpers/getMonths.ts +16 -5
- package/src/helpers/getNavMonth.ts +7 -1
- package/src/helpers/getNextFocus.tsx +18 -2
- package/src/helpers/getNextMonth.ts +13 -6
- package/src/helpers/getPreviousMonth.ts +13 -5
- package/src/helpers/getStyleForModifiers.ts +12 -1
- package/src/helpers/getWeekdays.ts +8 -5
- package/src/helpers/getWeeks.ts +6 -1
- package/src/helpers/getYearOptions.ts +13 -1
- package/src/helpers/startOfBroadcastWeek.ts +8 -1
- package/src/helpers/useControlledValue.ts +10 -6
- package/src/labels/labelDayButton.ts +8 -4
- package/src/labels/labelGrid.ts +7 -3
- package/src/labels/labelGridcell.ts +6 -2
- package/src/labels/labelMonthDropdown.ts +3 -1
- package/src/labels/labelNav.ts +2 -1
- package/src/labels/labelNext.ts +5 -5
- package/src/labels/labelPrevious.ts +5 -5
- package/src/labels/labelWeekNumber.ts +4 -1
- package/src/labels/labelWeekNumberHeader.ts +3 -1
- package/src/labels/labelWeekday.ts +5 -1
- package/src/labels/labelYearDropdown.ts +3 -1
- package/src/persian.tsx +15 -2
- package/src/selection/useMulti.tsx +9 -0
- package/src/selection/useRange.tsx +9 -0
- package/src/selection/useSingle.tsx +9 -0
- package/src/style.css +29 -0
- package/src/style.module.css +29 -0
- package/src/types/deprecated.ts +8 -8
- package/src/types/props.ts +58 -13
- package/src/types/selection.ts +25 -0
- package/src/types/shared.ts +29 -78
- package/src/useAnimation.ts +11 -1
- package/src/useCalendar.ts +9 -1
- package/src/useDayPicker.ts +4 -6
- package/src/useFocus.ts +14 -1
- package/src/useSelection.ts +10 -0
- package/src/utc.tsx +6 -0
- package/src/utils/addToRange.ts +9 -7
- package/src/utils/dateMatchModifiers.ts +5 -15
- package/src/utils/rangeContainsDayOfWeek.ts +7 -9
- package/src/utils/rangeContainsModifiers.ts +5 -14
- package/src/utils/rangeIncludesDate.ts +6 -2
- package/src/utils/rangeOverlaps.ts +5 -1
- package/src/utils/typeguards.ts +19 -6
- package/dist/cjs/useGetModifiers.d.ts +0 -10
- package/dist/cjs/useGetModifiers.js.map +0 -1
- package/dist/esm/useGetModifiers.d.ts +0 -10
- package/dist/esm/useGetModifiers.js.map +0 -1
- /package/src/helpers/{getPossibleFocusDate.test.ts → getFocusableDate.test.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDays.js","sourceRoot":"","sources":["../../../src/helpers/getDays.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getDays.js","sourceRoot":"","sources":["../../../src/helpers/getDays.ts"],"names":[],"mappings":";;AAUA,0BAQC;AAhBD;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,cAA+B;IACrD,MAAM,WAAW,GAAkB,EAAE,CAAC;IACtC,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC3C,MAAM,QAAQ,GAAkB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE;YACpE,OAAO,CAAC,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC,EAAE,WAAW,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC,CAAC;IAChC,CAAC,EAAE,WAAW,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { ClassNames } from "../types/index.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Returns the default class names for the UI elements.
|
|
4
4
|
*
|
|
5
|
+
* This function generates a mapping of default class names for various UI
|
|
6
|
+
* elements, day flags, selection states, and animations.
|
|
7
|
+
*
|
|
8
|
+
* @returns An object containing the default class names.
|
|
5
9
|
* @group Utilities
|
|
6
10
|
*/
|
|
7
11
|
export declare function getDefaultClassNames(): ClassNames;
|
|
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getDefaultClassNames = getDefaultClassNames;
|
|
4
4
|
const UI_js_1 = require("../UI.js");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Returns the default class names for the UI elements.
|
|
7
7
|
*
|
|
8
|
+
* This function generates a mapping of default class names for various UI
|
|
9
|
+
* elements, day flags, selection states, and animations.
|
|
10
|
+
*
|
|
11
|
+
* @returns An object containing the default class names.
|
|
8
12
|
* @group Utilities
|
|
9
13
|
*/
|
|
10
14
|
function getDefaultClassNames() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultClassNames.js","sourceRoot":"","sources":["../../../src/helpers/getDefaultClassNames.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getDefaultClassNames.js","sourceRoot":"","sources":["../../../src/helpers/getDefaultClassNames.ts"],"names":[],"mappings":";;AAYA,oDAwBC;AApCD,oCAAkE;AAGlE;;;;;;;;GAQG;AACH,SAAgB,oBAAoB;IAClC,MAAM,UAAU,GAAkC,EAAE,CAAC;IAErD,KAAK,MAAM,GAAG,IAAI,UAAE,EAAE,CAAC;QACrB,UAAU,CAAC,UAAE,CAAC,GAAsB,CAAC,CAAC;YACpC,OAAO,UAAE,CAAC,GAAsB,CAAC,EAAE,CAAC;IACxC,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,eAAO,EAAE,CAAC;QAC1B,UAAU,CAAC,eAAO,CAAC,GAA2B,CAAC,CAAC;YAC9C,OAAO,eAAO,CAAC,GAA2B,CAAC,EAAE,CAAC;IAClD,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,sBAAc,EAAE,CAAC;QACjC,UAAU,CAAC,sBAAc,CAAC,GAAkC,CAAC,CAAC;YAC5D,OAAO,sBAAc,CAAC,GAAkC,CAAC,EAAE,CAAC;IAChE,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,iBAAS,EAAE,CAAC;QAC5B,UAAU,CAAC,iBAAS,CAAC,GAA6B,CAAC,CAAC;YAClD,OAAO,iBAAS,CAAC,GAA6B,CAAC,EAAE,CAAC;IACtD,CAAC;IAED,OAAO,UAAkC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import type { DateLib } from "../classes/DateLib.js";
|
|
2
2
|
import type { DayPickerProps } from "../types/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns the months to display in the calendar.
|
|
5
|
+
*
|
|
6
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
7
|
+
* calendar.
|
|
8
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
9
|
+
* @param props The DayPicker props, including `numberOfMonths`.
|
|
10
|
+
* @param dateLib The date library to use for date manipulation.
|
|
11
|
+
* @returns An array of dates representing the months to display.
|
|
12
|
+
*/
|
|
3
13
|
export declare function getDisplayMonths(firstDisplayedMonth: Date, calendarEndMonth: Date | undefined, props: Pick<DayPickerProps, "numberOfMonths">, dateLib: DateLib): Date[];
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getDisplayMonths = getDisplayMonths;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the months to display in the calendar.
|
|
6
|
+
*
|
|
7
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
8
|
+
* calendar.
|
|
9
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
10
|
+
* @param props The DayPicker props, including `numberOfMonths`.
|
|
11
|
+
* @param dateLib The date library to use for date manipulation.
|
|
12
|
+
* @returns An array of dates representing the months to display.
|
|
13
|
+
*/
|
|
4
14
|
function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {
|
|
5
15
|
const { numberOfMonths = 1 } = props;
|
|
6
16
|
const months = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDisplayMonths.js","sourceRoot":"","sources":["../../../src/helpers/getDisplayMonths.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getDisplayMonths.js","sourceRoot":"","sources":["../../../src/helpers/getDisplayMonths.ts"],"names":[],"mappings":";;AAaA,4CAgBC;AA1BD;;;;;;;;;GASG;AACH,SAAgB,gBAAgB,CAC9B,mBAAyB,EACzB,gBAAkC,EAClC,KAA6C,EAC7C,OAAgB;IAEhB,MAAM,EAAE,cAAc,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;IACrC,MAAM,MAAM,GAAW,EAAE,CAAC;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC;QACxD,IAAI,gBAAgB,IAAI,KAAK,GAAG,gBAAgB,EAAE,CAAC;YACjD,MAAM;QACR,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import type { DateLib } from "../classes/DateLib.js";
|
|
2
2
|
import type { DayPickerProps, MoveFocusBy, MoveFocusDir } from "../types/index.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Calculates the next date that should be focused in the calendar.
|
|
5
|
+
*
|
|
6
|
+
* This function determines the next focusable date based on the movement
|
|
7
|
+
* direction, constraints, and calendar configuration.
|
|
8
|
+
*
|
|
9
|
+
* @param moveBy The unit of movement (e.g., "day", "week").
|
|
10
|
+
* @param moveDir The direction of movement ("before" or "after").
|
|
11
|
+
* @param refDate The reference date from which to calculate the next focusable
|
|
12
|
+
* date.
|
|
13
|
+
* @param navStart The earliest date the user can navigate to.
|
|
14
|
+
* @param navEnd The latest date the user can navigate to.
|
|
15
|
+
* @param props The DayPicker props, including calendar configuration options.
|
|
16
|
+
* @param dateLib The date library to use for date manipulation.
|
|
17
|
+
* @returns The next focusable date.
|
|
18
|
+
*/
|
|
4
19
|
export declare function getFocusableDate(moveBy: MoveFocusBy, moveDir: MoveFocusDir, refDate: Date, navStart: Date | undefined, navEnd: Date | undefined, props: Pick<DayPickerProps, "ISOWeek" | "broadcastCalendar">, dateLib: DateLib): Date;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFocusableDate = getFocusableDate;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Calculates the next date that should be focused in the calendar.
|
|
6
|
+
*
|
|
7
|
+
* This function determines the next focusable date based on the movement
|
|
8
|
+
* direction, constraints, and calendar configuration.
|
|
9
|
+
*
|
|
10
|
+
* @param moveBy The unit of movement (e.g., "day", "week").
|
|
11
|
+
* @param moveDir The direction of movement ("before" or "after").
|
|
12
|
+
* @param refDate The reference date from which to calculate the next focusable
|
|
13
|
+
* date.
|
|
14
|
+
* @param navStart The earliest date the user can navigate to.
|
|
15
|
+
* @param navEnd The latest date the user can navigate to.
|
|
16
|
+
* @param props The DayPicker props, including calendar configuration options.
|
|
17
|
+
* @param dateLib The date library to use for date manipulation.
|
|
18
|
+
* @returns The next focusable date.
|
|
19
|
+
*/
|
|
5
20
|
function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
|
|
6
21
|
const { ISOWeek, broadcastCalendar } = props;
|
|
7
22
|
const { addDays, addMonths, addWeeks, addYears, endOfBroadcastWeek, endOfISOWeek, endOfWeek, max, min, startOfBroadcastWeek, startOfISOWeek, startOfWeek } = dateLib;
|
|
@@ -16,7 +31,7 @@ function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dat
|
|
|
16
31
|
? startOfISOWeek(date)
|
|
17
32
|
: startOfWeek(date),
|
|
18
33
|
endOfWeek: (date) => broadcastCalendar
|
|
19
|
-
? endOfBroadcastWeek(date
|
|
34
|
+
? endOfBroadcastWeek(date)
|
|
20
35
|
: ISOWeek
|
|
21
36
|
? endOfISOWeek(date)
|
|
22
37
|
: endOfWeek(date)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFocusableDate.js","sourceRoot":"","sources":["../../../src/helpers/getFocusableDate.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getFocusableDate.js","sourceRoot":"","sources":["../../../src/helpers/getFocusableDate.ts"],"names":[],"mappings":";;AAuBA,4CAkDC;AAlED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,gBAAgB,CAC9B,MAAmB,EACnB,OAAqB,EACrB,OAAa,EACb,QAA0B,EAC1B,MAAwB,EACxB,KAA4D,EAC5D,OAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,GAAG,EACH,GAAG,EACH,oBAAoB,EACpB,cAAc,EACd,WAAW,EACZ,GAAG,OAAO,CAAC;IACZ,MAAM,OAAO,GAAG;QACd,GAAG,EAAE,OAAO;QACZ,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,IAAU,EAAE,EAAE,CAC1B,iBAAiB;YACf,CAAC,CAAC,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC;YACrC,CAAC,CAAC,OAAO;gBACP,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC;gBACtB,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;QACzB,SAAS,EAAE,CAAC,IAAU,EAAE,EAAE,CACxB,iBAAiB;YACf,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC1B,CAAC,CAAC,OAAO;gBACP,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC;gBACpB,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;KACxB,CAAC;IAEF,IAAI,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,IAAI,OAAO,KAAK,QAAQ,IAAI,QAAQ,EAAE,CAAC;QACrC,aAAa,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IACjD,CAAC;SAAM,IAAI,OAAO,KAAK,OAAO,IAAI,MAAM,EAAE,CAAC;QACzC,aAAa,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as defaultFormatters from "../formatters/index.js";
|
|
2
2
|
import type { DayPickerProps } from "../types/index.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Merges custom formatters from the props with the default formatters.
|
|
5
|
+
*
|
|
6
|
+
* @param customFormatters The custom formatters provided in the DayPicker
|
|
7
|
+
* props.
|
|
8
|
+
* @returns The merged formatters object.
|
|
9
|
+
*/
|
|
4
10
|
export declare function getFormatters(customFormatters: DayPickerProps["formatters"]): {
|
|
5
11
|
formatCaption: typeof defaultFormatters.formatCaption;
|
|
6
12
|
formatDay: typeof defaultFormatters.formatDay;
|
|
@@ -35,7 +35,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.getFormatters = getFormatters;
|
|
37
37
|
const defaultFormatters = __importStar(require("../formatters/index.js"));
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Merges custom formatters from the props with the default formatters.
|
|
40
|
+
*
|
|
41
|
+
* @param customFormatters The custom formatters provided in the DayPicker
|
|
42
|
+
* props.
|
|
43
|
+
* @returns The merged formatters object.
|
|
44
|
+
*/
|
|
39
45
|
function getFormatters(customFormatters) {
|
|
40
46
|
if (customFormatters?.formatMonthCaption && !customFormatters.formatCaption) {
|
|
41
47
|
customFormatters.formatCaption = customFormatters.formatMonthCaption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFormatters.js","sourceRoot":"","sources":["../../../src/helpers/getFormatters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getFormatters.js","sourceRoot":"","sources":["../../../src/helpers/getFormatters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,sCAcC;AAxBD,0EAA4D;AAG5D;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,gBAA8C;IAC1E,IAAI,gBAAgB,EAAE,kBAAkB,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC;QAC5E,gBAAgB,CAAC,aAAa,GAAG,gBAAgB,CAAC,kBAAkB,CAAC;IACvE,CAAC;IACD,IACE,gBAAgB,EAAE,iBAAiB;QACnC,CAAC,gBAAgB,CAAC,kBAAkB,EACpC,CAAC;QACD,gBAAgB,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,iBAAiB,CAAC;IAC3E,CAAC;IACD,OAAO;QACL,GAAG,iBAAiB;QACpB,GAAG,gBAAgB;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { type DateLib } from "../classes/DateLib.js";
|
|
2
2
|
import { type DayPickerProps } from "../types/props.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Determines the initial month to display in the calendar based on the provided
|
|
5
|
+
* props.
|
|
6
|
+
*
|
|
7
|
+
* This function calculates the starting month, considering constraints such as
|
|
8
|
+
* `startMonth`, `endMonth`, and the number of months to display.
|
|
9
|
+
*
|
|
10
|
+
* @param props The DayPicker props, including navigation and date constraints.
|
|
11
|
+
* @param dateLib The date library to use for date manipulation.
|
|
12
|
+
* @returns The initial month to display.
|
|
13
|
+
*/
|
|
4
14
|
export declare function getInitialMonth(props: Pick<DayPickerProps, "fromYear" | "toYear" | "startMonth" | "endMonth" | "month" | "defaultMonth" | "today" | "numberOfMonths" | "timeZone">, dateLib: DateLib): Date;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInitialMonth = getInitialMonth;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Determines the initial month to display in the calendar based on the provided
|
|
6
|
+
* props.
|
|
7
|
+
*
|
|
8
|
+
* This function calculates the starting month, considering constraints such as
|
|
9
|
+
* `startMonth`, `endMonth`, and the number of months to display.
|
|
10
|
+
*
|
|
11
|
+
* @param props The DayPicker props, including navigation and date constraints.
|
|
12
|
+
* @param dateLib The date library to use for date manipulation.
|
|
13
|
+
* @returns The initial month to display.
|
|
14
|
+
*/
|
|
6
15
|
function getInitialMonth(props, dateLib) {
|
|
7
|
-
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, endMonth, startMonth
|
|
16
|
+
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, endMonth, startMonth } = props;
|
|
8
17
|
let initialMonth = month || defaultMonth || today;
|
|
9
18
|
const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;
|
|
10
|
-
//
|
|
19
|
+
// Adjust the initial month if it is after the endMonth
|
|
11
20
|
if (endMonth && differenceInCalendarMonths(endMonth, initialMonth) < 0) {
|
|
12
21
|
const offset = -1 * (numberOfMonths - 1);
|
|
13
22
|
initialMonth = addMonths(endMonth, offset);
|
|
14
23
|
}
|
|
15
|
-
//
|
|
24
|
+
// Adjust the initial month if it is before the startMonth
|
|
16
25
|
if (startMonth && differenceInCalendarMonths(initialMonth, startMonth) < 0) {
|
|
17
26
|
initialMonth = startMonth;
|
|
18
27
|
}
|
|
19
|
-
// When timeZone is provided, convert initialMonth to TZDate type to ensure proper timezone handling
|
|
20
|
-
initialMonth = timeZone ? new tz_1.TZDate(initialMonth, timeZone) : initialMonth;
|
|
21
28
|
return startOfMonth(initialMonth);
|
|
22
29
|
}
|
|
23
30
|
//# sourceMappingURL=getInitialMonth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInitialMonth.js","sourceRoot":"","sources":["../../../src/helpers/getInitialMonth.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getInitialMonth.js","sourceRoot":"","sources":["../../../src/helpers/getInitialMonth.ts"],"names":[],"mappings":";;AAcA,0CAqCC;AAhDD;;;;;;;;;;GAUG;AACH,SAAgB,eAAe,CAC7B,KAWC,EACD,OAAgB;IAEhB,MAAM,EACJ,KAAK,EACL,YAAY,EACZ,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,EACvB,cAAc,GAAG,CAAC,EAClB,QAAQ,EACR,UAAU,EACX,GAAG,KAAK,CAAC;IACV,IAAI,YAAY,GAAG,KAAK,IAAI,YAAY,IAAI,KAAK,CAAC;IAClD,MAAM,EAAE,0BAA0B,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IAExE,uDAAuD;IACvD,IAAI,QAAQ,IAAI,0BAA0B,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;QACvE,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;QACzC,YAAY,GAAG,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IACD,0DAA0D;IAC1D,IAAI,UAAU,IAAI,0BAA0B,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3E,YAAY,GAAG,UAAU,CAAC;IAC5B,CAAC;IAED,OAAO,YAAY,CAAC,YAAY,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { DayPickerProps, Labels } from "../types/index.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Merges custom labels from the props with the default labels.
|
|
4
|
+
*
|
|
5
|
+
* @param customLabels The custom labels provided in the DayPicker props.
|
|
6
|
+
* @returns The merged labels object.
|
|
7
|
+
*/
|
|
3
8
|
export declare function getLabels(customLabels: DayPickerProps["labels"]): Labels;
|
|
@@ -35,7 +35,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.getLabels = getLabels;
|
|
37
37
|
const defaultLabels = __importStar(require("../labels/index.js"));
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Merges custom labels from the props with the default labels.
|
|
40
|
+
*
|
|
41
|
+
* @param customLabels The custom labels provided in the DayPicker props.
|
|
42
|
+
* @returns The merged labels object.
|
|
43
|
+
*/
|
|
39
44
|
function getLabels(customLabels) {
|
|
40
45
|
return {
|
|
41
46
|
...defaultLabels,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLabels.js","sourceRoot":"","sources":["../../../src/helpers/getLabels.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getLabels.js","sourceRoot":"","sources":["../../../src/helpers/getLabels.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,8BAKC;AAdD,kEAAoD;AAGpD;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,YAAsC;IAC9D,OAAO;QACL,GAAG,aAAa;QAChB,GAAG,YAAY;KAChB,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { type DateLib } from "../classes/DateLib.js";
|
|
2
2
|
import { DropdownOption } from "../components/Dropdown.js";
|
|
3
3
|
import type { Formatters } from "../types/index.js";
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Returns the months to show in the dropdown.
|
|
6
|
+
*
|
|
7
|
+
* This function generates a list of months for the current year, formatted
|
|
8
|
+
* using the provided formatter, and determines whether each month should be
|
|
9
|
+
* disabled based on the navigation range.
|
|
10
|
+
*
|
|
11
|
+
* @param displayMonth The currently displayed month.
|
|
12
|
+
* @param navStart The start date for navigation.
|
|
13
|
+
* @param navEnd The end date for navigation.
|
|
14
|
+
* @param formatters The formatters to use for formatting the month labels.
|
|
15
|
+
* @param dateLib The date library to use for date manipulation.
|
|
16
|
+
* @returns An array of dropdown options representing the months, or `undefined`
|
|
17
|
+
* if no months are available.
|
|
18
|
+
*/
|
|
5
19
|
export declare function getMonthOptions(displayMonth: Date, navStart: Date | undefined, navEnd: Date | undefined, formatters: Pick<Formatters, "formatMonthDropdown">, dateLib: DateLib): DropdownOption[] | undefined;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMonthOptions = getMonthOptions;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Returns the months to show in the dropdown.
|
|
6
|
+
*
|
|
7
|
+
* This function generates a list of months for the current year, formatted
|
|
8
|
+
* using the provided formatter, and determines whether each month should be
|
|
9
|
+
* disabled based on the navigation range.
|
|
10
|
+
*
|
|
11
|
+
* @param displayMonth The currently displayed month.
|
|
12
|
+
* @param navStart The start date for navigation.
|
|
13
|
+
* @param navEnd The end date for navigation.
|
|
14
|
+
* @param formatters The formatters to use for formatting the month labels.
|
|
15
|
+
* @param dateLib The date library to use for date manipulation.
|
|
16
|
+
* @returns An array of dropdown options representing the months, or `undefined`
|
|
17
|
+
* if no months are available.
|
|
18
|
+
*/
|
|
5
19
|
function getMonthOptions(displayMonth, navStart, navEnd, formatters, dateLib) {
|
|
6
20
|
const { startOfMonth, startOfYear, endOfYear, eachMonthOfInterval, getMonth } = dateLib;
|
|
7
21
|
const months = eachMonthOfInterval({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMonthOptions.js","sourceRoot":"","sources":["../../../src/helpers/getMonthOptions.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getMonthOptions.js","sourceRoot":"","sources":["../../../src/helpers/getMonthOptions.ts"],"names":[],"mappings":";;AAmBA,0CA+BC;AA9CD;;;;;;;;;;;;;;GAcG;AACH,SAAgB,eAAe,CAC7B,YAAkB,EAClB,QAA0B,EAC1B,MAAwB,EACxB,UAAmD,EACnD,OAAgB;IAEhB,MAAM,EACJ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACT,GAAG,OAAO,CAAC;IAEZ,MAAM,MAAM,GAAG,mBAAmB,CAAC;QACjC,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC;QAChC,GAAG,EAAE,SAAS,CAAC,YAAY,CAAC;KAC7B,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACnC,MAAM,KAAK,GAAG,UAAU,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC7D,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC9B,MAAM,QAAQ,GACZ,CAAC,QAAQ,IAAI,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YAC5C,CAAC,MAAM,IAAI,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;YACxC,KAAK,CAAC;QACR,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import type { DateLib } from "../classes/DateLib.js";
|
|
2
2
|
import { CalendarMonth } from "../classes/index.js";
|
|
3
3
|
import type { DayPickerProps } from "../types/index.js";
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Returns the months to display in the calendar.
|
|
6
|
+
*
|
|
7
|
+
* This function generates `CalendarMonth` objects for each month to be
|
|
8
|
+
* displayed, including their weeks and days, based on the provided display
|
|
9
|
+
* months and dates.
|
|
10
|
+
*
|
|
11
|
+
* @param displayMonths The months (as dates) to display in the calendar.
|
|
12
|
+
* @param dates The dates to display in the calendar.
|
|
13
|
+
* @param props Options from the DayPicker props context.
|
|
14
|
+
* @param dateLib The date library to use for date manipulation.
|
|
15
|
+
* @returns An array of `CalendarMonth` objects representing the months to
|
|
16
|
+
* display.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getMonths(displayMonths: Date[], dates: Date[], props: Pick<DayPickerProps, "broadcastCalendar" | "fixedWeeks" | "ISOWeek" | "reverseMonths">, dateLib: DateLib): CalendarMonth[];
|
|
@@ -2,14 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMonths = getMonths;
|
|
4
4
|
const index_js_1 = require("../classes/index.js");
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
dates
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Returns the months to display in the calendar.
|
|
7
|
+
*
|
|
8
|
+
* This function generates `CalendarMonth` objects for each month to be
|
|
9
|
+
* displayed, including their weeks and days, based on the provided display
|
|
10
|
+
* months and dates.
|
|
11
|
+
*
|
|
12
|
+
* @param displayMonths The months (as dates) to display in the calendar.
|
|
13
|
+
* @param dates The dates to display in the calendar.
|
|
14
|
+
* @param props Options from the DayPicker props context.
|
|
15
|
+
* @param dateLib The date library to use for date manipulation.
|
|
16
|
+
* @returns An array of `CalendarMonth` objects representing the months to
|
|
17
|
+
* display.
|
|
18
|
+
*/
|
|
19
|
+
function getMonths(displayMonths, dates, props, dateLib) {
|
|
13
20
|
const { addDays, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, getISOWeek, getWeek, startOfBroadcastWeek, startOfISOWeek, startOfWeek } = dateLib;
|
|
14
21
|
const dayPickerMonths = displayMonths.reduce((months, month) => {
|
|
15
22
|
const firstDateOfFirstWeek = props.broadcastCalendar
|
|
@@ -18,7 +25,7 @@ props, dateLib) {
|
|
|
18
25
|
? startOfISOWeek(month)
|
|
19
26
|
: startOfWeek(month);
|
|
20
27
|
const lastDateOfLastWeek = props.broadcastCalendar
|
|
21
|
-
? endOfBroadcastWeek(month
|
|
28
|
+
? endOfBroadcastWeek(month)
|
|
22
29
|
: props.ISOWeek
|
|
23
30
|
? endOfISOWeek(endOfMonth(month))
|
|
24
31
|
: endOfWeek(endOfMonth(month));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMonths.js","sourceRoot":"","sources":["../../../src/helpers/getMonths.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getMonths.js","sourceRoot":"","sources":["../../../src/helpers/getMonths.ts"],"names":[],"mappings":";;AAkBA,8BAkFC;AAnGD,kDAA+E;AAG/E;;;;;;;;;;;;;GAaG;AACH,SAAgB,SAAS,CACvB,aAAqB,EACrB,KAAa,EACb,KAGC,EACD,OAAgB;IAEhB,MAAM,EACJ,OAAO,EACP,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,oBAAoB,EACpB,cAAc,EACd,WAAW,EACZ,GAAG,OAAO,CAAC;IAEZ,MAAM,eAAe,GAAG,aAAa,CAAC,MAAM,CAC1C,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAChB,MAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB;YAClD,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC;YACtC,CAAC,CAAC,KAAK,CAAC,OAAO;gBACb,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC;gBACvB,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAEzB,MAAM,kBAAkB,GAAG,KAAK,CAAC,iBAAiB;YAChD,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC;YAC3B,CAAC,CAAC,KAAK,CAAC,OAAO;gBACb,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBACjC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAEnC,yCAAyC;QACzC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;YACvC,OAAO,IAAI,IAAI,oBAAoB,IAAI,IAAI,IAAI,kBAAkB,CAAC;QACpE,CAAC,CAAC,CAAC;QAEH,MAAM,sBAAsB,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAEjE,IAAI,KAAK,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,sBAAsB,EAAE,CAAC;YACnE,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;gBACvC,MAAM,SAAS,GAAG,sBAAsB,GAAG,UAAU,CAAC,MAAM,CAAC;gBAC7D,OAAO,CACL,IAAI,GAAG,kBAAkB;oBACzB,IAAI,IAAI,OAAO,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAC/C,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,KAAK,GAAmB,UAAU,CAAC,MAAM,CAC7C,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACd,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACpE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC;YAElE,MAAM,GAAG,GAAG,IAAI,sBAAW,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YAClD,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,KAAK,CAAC,IAAI,CAAC,IAAI,uBAAY,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAClD,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACtB,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC,EACD,EAAE,CACH,CAAC;QAEF,MAAM,cAAc,GAAG,IAAI,wBAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACvD,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,EAAE,CACH,CAAC;IAEF,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QACzB,OAAO,eAAe,CAAC;IACzB,CAAC;SAAM,CAAC;QACN,OAAO,eAAe,CAAC,OAAO,EAAE,CAAC;IACnC,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { type DateLib } from "../classes/DateLib.js";
|
|
2
2
|
import type { DayPickerProps } from "../types/index.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Returns the start and end months for calendar navigation.
|
|
5
|
+
*
|
|
6
|
+
* @param props The DayPicker props, including navigation and layout options.
|
|
7
|
+
* @param dateLib The date library to use for date manipulation.
|
|
8
|
+
* @returns A tuple containing the start and end months for navigation.
|
|
9
|
+
*/
|
|
4
10
|
export declare function getNavMonths(props: Pick<DayPickerProps, "captionLayout" | "endMonth" | "startMonth" | "today" | "timeZone" | "fromMonth" | "fromYear" | "toMonth" | "toYear">, dateLib: DateLib): [start: Date | undefined, end: Date | undefined];
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNavMonths = getNavMonths;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Returns the start and end months for calendar navigation.
|
|
6
|
+
*
|
|
7
|
+
* @param props The DayPicker props, including navigation and layout options.
|
|
8
|
+
* @param dateLib The date library to use for date manipulation.
|
|
9
|
+
* @returns A tuple containing the start and end months for navigation.
|
|
10
|
+
*/
|
|
5
11
|
function getNavMonths(props, dateLib) {
|
|
6
12
|
let { startMonth, endMonth } = props;
|
|
7
13
|
const { startOfYear, startOfDay, startOfMonth, endOfMonth, addYears, endOfYear, newDate, today } = dateLib;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNavMonth.js","sourceRoot":"","sources":["../../../src/helpers/getNavMonth.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getNavMonth.js","sourceRoot":"","sources":["../../../src/helpers/getNavMonth.ts"],"names":[],"mappings":";;AAUA,oCAiEC;AAxED;;;;;;GAMG;AACH,SAAgB,YAAY,CAC1B,KAYC,EACD,OAAgB;IAEhB,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAErC,MAAM,EACJ,WAAW,EACX,UAAU,EACV,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,SAAS,EACT,OAAO,EACP,KAAK,EACN,GAAG,OAAO,CAAC;IAEZ,yBAAyB;IACzB,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACvD,IAAI,CAAC,UAAU,IAAI,SAAS,EAAE,CAAC;QAC7B,UAAU,GAAG,SAAS,CAAC;IACzB,CAAC;IACD,IAAI,CAAC,UAAU,IAAI,QAAQ,EAAE,CAAC;QAC5B,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,CAAC,QAAQ,IAAI,OAAO,EAAE,CAAC;QACzB,QAAQ,GAAG,OAAO,CAAC;IACrB,CAAC;IACD,IAAI,CAAC,QAAQ,IAAI,MAAM,EAAE,CAAC;QACxB,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,eAAe,GACnB,KAAK,CAAC,aAAa,KAAK,UAAU;QAClC,KAAK,CAAC,aAAa,KAAK,gBAAgB,CAAC;IAC3C,IAAI,UAAU,EAAE,CAAC;QACf,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;SAAM,IAAI,QAAQ,EAAE,CAAC;QACpB,UAAU,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACvC,CAAC;SAAM,IAAI,CAAC,UAAU,IAAI,eAAe,EAAE,CAAC;QAC1C,UAAU,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;SAAM,IAAI,MAAM,EAAE,CAAC;QAClB,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;SAAM,IAAI,CAAC,QAAQ,IAAI,eAAe,EAAE,CAAC;QACxC,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO;QACL,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU;QAChD,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;KAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import type { DateLib } from "../classes/DateLib.js";
|
|
2
2
|
import { CalendarDay } from "../classes/index.js";
|
|
3
3
|
import type { DayPickerProps, MoveFocusBy, MoveFocusDir } from "../types/index.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Determines the next focusable day in the calendar.
|
|
6
|
+
*
|
|
7
|
+
* This function recursively calculates the next focusable day based on the
|
|
8
|
+
* movement direction and modifiers applied to the days.
|
|
9
|
+
*
|
|
10
|
+
* @param moveBy The unit of movement (e.g., "day", "week").
|
|
11
|
+
* @param moveDir The direction of movement ("before" or "after").
|
|
12
|
+
* @param refDay The currently focused day.
|
|
13
|
+
* @param calendarStartMonth The earliest month the user can navigate to.
|
|
14
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
15
|
+
* @param props The DayPicker props, including modifiers and configuration
|
|
16
|
+
* options.
|
|
17
|
+
* @param dateLib The date library to use for date manipulation.
|
|
18
|
+
* @param attempt The current recursion attempt (used to limit recursion depth).
|
|
19
|
+
* @returns The next focusable day, or `undefined` if no focusable day is found.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getNextFocus(moveBy: MoveFocusBy, moveDir: MoveFocusDir, refDay: CalendarDay, calendarStartMonth: Date | undefined, calendarEndMonth: Date | undefined, props: Pick<DayPickerProps, "disabled" | "hidden" | "modifiers" | "ISOWeek" | "timeZone">, dateLib: DateLib, attempt?: number): CalendarDay | undefined;
|
|
@@ -4,15 +4,29 @@ exports.getNextFocus = getNextFocus;
|
|
|
4
4
|
const index_js_1 = require("../classes/index.js");
|
|
5
5
|
const dateMatchModifiers_js_1 = require("../utils/dateMatchModifiers.js");
|
|
6
6
|
const getFocusableDate_js_1 = require("./getFocusableDate.js");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Determines the next focusable day in the calendar.
|
|
9
|
+
*
|
|
10
|
+
* This function recursively calculates the next focusable day based on the
|
|
11
|
+
* movement direction and modifiers applied to the days.
|
|
12
|
+
*
|
|
13
|
+
* @param moveBy The unit of movement (e.g., "day", "week").
|
|
14
|
+
* @param moveDir The direction of movement ("before" or "after").
|
|
15
|
+
* @param refDay The currently focused day.
|
|
16
|
+
* @param calendarStartMonth The earliest month the user can navigate to.
|
|
17
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
18
|
+
* @param props The DayPicker props, including modifiers and configuration
|
|
19
|
+
* options.
|
|
20
|
+
* @param dateLib The date library to use for date manipulation.
|
|
21
|
+
* @param attempt The current recursion attempt (used to limit recursion depth).
|
|
22
|
+
* @returns The next focusable day, or `undefined` if no focusable day is found.
|
|
23
|
+
*/
|
|
24
|
+
function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {
|
|
10
25
|
if (attempt > 365) {
|
|
11
26
|
// Limit the recursion to 365 attempts
|
|
12
27
|
return undefined;
|
|
13
28
|
}
|
|
14
|
-
const focusableDate = (0, getFocusableDate_js_1.getFocusableDate)(moveBy, moveDir, refDay.date,
|
|
15
|
-
calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
29
|
+
const focusableDate = (0, getFocusableDate_js_1.getFocusableDate)(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
16
30
|
const isDisabled = Boolean(props.disabled && (0, dateMatchModifiers_js_1.dateMatchModifiers)(focusableDate, props.disabled, dateLib));
|
|
17
31
|
const isHidden = Boolean(props.hidden && (0, dateMatchModifiers_js_1.dateMatchModifiers)(focusableDate, props.hidden, dateLib));
|
|
18
32
|
const targetMonth = focusableDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNextFocus.js","sourceRoot":"","sources":["../../../src/helpers/getNextFocus.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getNextFocus.js","sourceRoot":"","sources":["../../../src/helpers/getNextFocus.tsx"],"names":[],"mappings":";;AA4BA,oCAsDC;AAjFD,kDAAkD;AAMlD,0EAAoE;AAEpE,+DAAyD;AAEzD;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,YAAY,CAC1B,MAAmB,EACnB,OAAqB,EACrB,MAAmB,EACnB,kBAAoC,EACpC,gBAAkC,EAClC,KAGC,EACD,OAAgB,EAChB,UAAkB,CAAC;IAEnB,IAAI,OAAO,GAAG,GAAG,EAAE,CAAC;QAClB,sCAAsC;QACtC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,aAAa,GAAG,IAAA,sCAAgB,EACpC,MAAM,EACN,OAAO,EACP,MAAM,CAAC,IAAI,EACX,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,OAAO,CACR,CAAC;IAEF,MAAM,UAAU,GAAG,OAAO,CACxB,KAAK,CAAC,QAAQ,IAAI,IAAA,0CAAkB,EAAC,aAAa,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAC7E,CAAC;IAEF,MAAM,QAAQ,GAAG,OAAO,CACtB,KAAK,CAAC,MAAM,IAAI,IAAA,0CAAkB,EAAC,aAAa,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CACzE,CAAC;IAEF,MAAM,WAAW,GAAG,aAAa,CAAC;IAClC,MAAM,QAAQ,GAAG,IAAI,sBAAW,CAAC,aAAa,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAEtE,IAAI,CAAC,UAAU,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC7B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,sDAAsD;IACtD,OAAO,YAAY,CACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,OAAO,EACP,OAAO,GAAG,CAAC,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import type { DateLib } from "../classes/DateLib.js";
|
|
2
2
|
import type { DayPickerProps } from "../types/index.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* options.
|
|
4
|
+
* Returns the next month the user can navigate to, based on the given options.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
6
|
+
* The next month is not always the next calendar month:
|
|
8
7
|
*
|
|
9
|
-
* - If after the `calendarEndMonth
|
|
10
|
-
* - If
|
|
8
|
+
* - If it is after the `calendarEndMonth`, it returns `undefined`.
|
|
9
|
+
* - If paged navigation is enabled, it skips forward by the number of displayed
|
|
10
|
+
* months.
|
|
11
|
+
*
|
|
12
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
13
|
+
* calendar.
|
|
14
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
15
|
+
* @param options Navigation options, including `numberOfMonths` and
|
|
16
|
+
* `pagedNavigation`.
|
|
17
|
+
* @param dateLib The date library to use for date manipulation.
|
|
18
|
+
* @returns The next month, or `undefined` if navigation is not possible.
|
|
11
19
|
*/
|
|
12
20
|
export declare function getNextMonth(firstDisplayedMonth: Date, calendarEndMonth: Date | undefined, options: Pick<DayPickerProps, "numberOfMonths" | "pagedNavigation" | "disableNavigation">, dateLib: DateLib): Date | undefined;
|
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNextMonth = getNextMonth;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* options.
|
|
5
|
+
* Returns the next month the user can navigate to, based on the given options.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* The next month is not always the next calendar month:
|
|
9
8
|
*
|
|
10
|
-
* - If after the `calendarEndMonth
|
|
11
|
-
* - If
|
|
9
|
+
* - If it is after the `calendarEndMonth`, it returns `undefined`.
|
|
10
|
+
* - If paged navigation is enabled, it skips forward by the number of displayed
|
|
11
|
+
* months.
|
|
12
|
+
*
|
|
13
|
+
* @param firstDisplayedMonth The first month currently displayed in the
|
|
14
|
+
* calendar.
|
|
15
|
+
* @param calendarEndMonth The latest month the user can navigate to.
|
|
16
|
+
* @param options Navigation options, including `numberOfMonths` and
|
|
17
|
+
* `pagedNavigation`.
|
|
18
|
+
* @param dateLib The date library to use for date manipulation.
|
|
19
|
+
* @returns The next month, or `undefined` if navigation is not possible.
|
|
12
20
|
*/
|
|
13
21
|
function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {
|
|
14
22
|
if (options.disableNavigation) {
|
|
@@ -25,7 +33,6 @@ function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {
|
|
|
25
33
|
if (monthsDiff < numberOfMonths) {
|
|
26
34
|
return undefined;
|
|
27
35
|
}
|
|
28
|
-
// Jump forward as the number of months when paged navigation
|
|
29
36
|
return addMonths(month, offset);
|
|
30
37
|
}
|
|
31
38
|
//# sourceMappingURL=getNextMonth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNextMonth.js","sourceRoot":"","sources":["../../../src/helpers/getNextMonth.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getNextMonth.js","sourceRoot":"","sources":["../../../src/helpers/getNextMonth.ts"],"names":[],"mappings":";;AAoBA,oCA+BC;AAhDD;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,YAAY,CAC1B,mBAAyB,EACzB,gBAAkC,EAClC,OAGC,EACD,OAAgB;IAEhB,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,EAAE,eAAe,EAAE,cAAc,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,0BAA0B,EAAE,GAAG,OAAO,CAAC;IACxE,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;IAEhD,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,UAAU,GAAG,0BAA0B,CAC3C,gBAAgB,EAChB,mBAAmB,CACpB,CAAC;IAEF,IAAI,UAAU,GAAG,cAAc,EAAE,CAAC;QAChC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAClC,CAAC"}
|