react-day-picker 9.0.0-beta.1 → 9.0.0-beta.3
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 +3 -1
- package/dist/cjs/DayPicker.d.ts +3 -5
- package/dist/cjs/DayPicker.js +8 -7
- package/dist/cjs/DayPicker.js.map +1 -1
- package/dist/cjs/UI.d.ts +49 -28
- package/dist/cjs/UI.js +52 -29
- package/dist/cjs/UI.js.map +1 -1
- package/dist/cjs/classes/index.js +17 -4
- package/dist/cjs/classes/index.js.map +1 -1
- package/dist/cjs/components/Button.d.ts +2 -2
- package/dist/cjs/components/Button.js +5 -2
- package/dist/cjs/components/Button.js.map +1 -1
- package/dist/cjs/components/Calendar.d.ts +2 -1
- package/dist/cjs/components/Calendar.js +13 -7
- package/dist/cjs/components/Calendar.js.map +1 -1
- package/dist/cjs/components/Chevron.d.ts +2 -1
- package/dist/cjs/components/Chevron.js +16 -3
- package/dist/cjs/components/Chevron.js.map +1 -1
- package/dist/cjs/components/Day.d.ts +10 -10
- package/dist/cjs/components/Day.js +10 -5
- package/dist/cjs/components/Day.js.map +1 -1
- package/dist/cjs/components/DayDate.d.ts +24 -0
- package/dist/cjs/components/DayDate.js +20 -0
- package/dist/cjs/components/DayDate.js.map +1 -0
- package/dist/cjs/components/DayWrapper.d.ts +2 -1
- package/dist/cjs/components/DayWrapper.js +42 -26
- package/dist/cjs/components/DayWrapper.js.map +1 -1
- package/dist/cjs/components/Dropdown.d.ts +2 -2
- package/dist/cjs/components/Dropdown.js +13 -7
- package/dist/cjs/components/Dropdown.js.map +1 -1
- package/dist/cjs/components/DropdownNav.d.ts +2 -1
- package/dist/cjs/components/DropdownNav.js +7 -2
- package/dist/cjs/components/DropdownNav.js.map +1 -1
- package/dist/cjs/components/Footer.d.ts +2 -2
- package/dist/cjs/components/Footer.js +5 -2
- package/dist/cjs/components/Footer.js.map +1 -1
- package/dist/cjs/components/Month.d.ts +2 -1
- package/dist/cjs/components/Month.js +32 -7
- package/dist/cjs/components/Month.js.map +1 -1
- package/dist/cjs/components/MonthCaption.d.ts +2 -1
- package/dist/cjs/components/MonthCaption.js +6 -3
- package/dist/cjs/components/MonthCaption.js.map +1 -1
- package/dist/cjs/components/Months.d.ts +2 -1
- package/dist/cjs/components/Months.js +5 -2
- package/dist/cjs/components/Months.js.map +1 -1
- package/dist/cjs/components/MonthsDropdown.d.ts +2 -1
- package/dist/cjs/components/MonthsDropdown.js +7 -5
- package/dist/cjs/components/MonthsDropdown.js.map +1 -1
- package/dist/cjs/components/Nav.d.ts +2 -1
- package/dist/cjs/components/Nav.js +24 -6
- package/dist/cjs/components/Nav.js.map +1 -1
- package/dist/cjs/components/Option.d.ts +2 -1
- package/dist/cjs/components/Option.js +5 -2
- package/dist/cjs/components/Option.js.map +1 -1
- package/dist/cjs/components/Select.d.ts +2 -1
- package/dist/cjs/components/Select.js +5 -2
- package/dist/cjs/components/Select.js.map +1 -1
- package/dist/cjs/components/Week.d.ts +2 -1
- package/dist/cjs/components/Week.js +8 -4
- package/dist/cjs/components/Week.js.map +1 -1
- package/dist/cjs/components/WeekNumber.d.ts +2 -1
- package/dist/cjs/components/WeekNumber.js +9 -2
- package/dist/cjs/components/WeekNumber.js.map +1 -1
- package/dist/cjs/components/Weekday.d.ts +2 -1
- package/dist/cjs/components/Weekday.js +7 -4
- package/dist/cjs/components/Weekday.js.map +1 -1
- package/dist/cjs/components/Weekdays.d.ts +2 -1
- package/dist/cjs/components/Weekdays.js +8 -4
- package/dist/cjs/components/Weekdays.js.map +1 -1
- package/dist/cjs/components/YearsDropdown.d.ts +2 -1
- package/dist/cjs/components/YearsDropdown.js +7 -5
- package/dist/cjs/components/YearsDropdown.js.map +1 -1
- package/dist/cjs/components/custom-components.d.ts +5 -4
- package/dist/cjs/components/custom-components.js +33 -19
- package/dist/cjs/components/custom-components.js.map +1 -1
- package/dist/cjs/contexts/calendar.d.ts +7 -1
- package/dist/cjs/contexts/calendar.js +11 -7
- package/dist/cjs/contexts/calendar.js.map +1 -1
- package/dist/cjs/contexts/focus.d.ts +1 -1
- package/dist/cjs/contexts/focus.js +54 -15
- package/dist/cjs/contexts/focus.js.map +1 -1
- package/dist/cjs/contexts/modifiers.d.ts +2 -1
- package/dist/cjs/contexts/modifiers.js +29 -6
- package/dist/cjs/contexts/modifiers.js.map +1 -1
- package/dist/cjs/contexts/props.d.ts +2 -2
- package/dist/cjs/contexts/props.js +32 -11
- package/dist/cjs/contexts/props.js.map +1 -1
- package/dist/cjs/contexts/{index.d.ts → root.d.ts} +0 -5
- package/dist/cjs/contexts/root.js +27 -0
- package/dist/cjs/contexts/root.js.map +1 -0
- package/dist/cjs/contexts/selection.d.ts +2 -1
- package/dist/cjs/contexts/selection.js +38 -16
- package/dist/cjs/contexts/selection.js.map +1 -1
- package/dist/cjs/formatters/formatMonthDropdown.js +1 -2
- package/dist/cjs/formatters/formatMonthDropdown.js.map +1 -1
- package/dist/cjs/formatters/index.js +20 -7
- package/dist/cjs/formatters/index.js.map +1 -1
- package/dist/cjs/helpers/daysToMonthWeeks.js +3 -3
- package/dist/cjs/helpers/daysToMonthWeeks.js.map +1 -1
- package/dist/cjs/helpers/debounce.js.map +1 -1
- package/dist/cjs/helpers/getClassNames.d.ts +8 -5
- package/dist/cjs/helpers/getClassNames.js.map +1 -1
- package/dist/cjs/helpers/getDataAttributes.js.map +1 -1
- package/dist/cjs/helpers/getDates.js +1 -1
- package/dist/cjs/helpers/getDates.js.map +1 -1
- package/dist/cjs/helpers/getDefaultClassNames.d.ts +5 -1
- package/dist/cjs/helpers/getDefaultClassNames.js +13 -1
- package/dist/cjs/helpers/getDefaultClassNames.js.map +1 -1
- package/dist/cjs/helpers/getFormatters.js +26 -4
- package/dist/cjs/helpers/getFormatters.js.map +1 -1
- package/dist/cjs/helpers/getFromToDate.d.ts +1 -1
- package/dist/cjs/helpers/getFromToDate.js +5 -5
- package/dist/cjs/helpers/getFromToDate.js.map +1 -1
- package/dist/cjs/helpers/getLabels.js +24 -2
- package/dist/cjs/helpers/getLabels.js.map +1 -1
- package/dist/cjs/helpers/getMonthWeeks.js +1 -1
- package/dist/cjs/helpers/getMonthWeeks.js.map +1 -1
- package/dist/cjs/helpers/getNextFocus.js.map +1 -1
- package/dist/cjs/helpers/getStyleForModifiers.js +1 -1
- package/dist/cjs/helpers/getStyleForModifiers.js.map +1 -1
- package/dist/cjs/helpers/index.d.ts +1 -0
- package/dist/cjs/helpers/index.js +19 -0
- package/dist/cjs/helpers/index.js.map +1 -0
- package/dist/cjs/index.d.ts +5 -1
- package/dist/cjs/index.js +28 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/labels/index.d.ts +1 -0
- package/dist/cjs/labels/index.js +23 -9
- package/dist/cjs/labels/index.js.map +1 -1
- package/dist/cjs/labels/labelCaption.d.ts +8 -0
- package/dist/cjs/labels/labelCaption.js +14 -0
- package/dist/cjs/labels/labelCaption.js.map +1 -0
- package/dist/cjs/labels/labelDay.d.ts +5 -1
- package/dist/cjs/labels/labelDay.js +6 -3
- package/dist/cjs/labels/labelDay.js.map +1 -1
- package/dist/cjs/types-deprecated.d.ts +1 -1
- package/dist/cjs/types-deprecated.js +2 -2
- package/dist/cjs/types-deprecated.js.map +1 -1
- package/dist/cjs/types.d.ts +24 -12
- package/dist/cjs/utils/index.js +18 -5
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/esm/DayPicker.d.ts +3 -5
- package/dist/esm/DayPicker.js +5 -7
- package/dist/esm/DayPicker.js.map +1 -1
- package/dist/esm/UI.d.ts +49 -28
- package/dist/esm/UI.js +51 -28
- package/dist/esm/UI.js.map +1 -1
- package/dist/esm/components/Button.d.ts +2 -2
- package/dist/esm/components/Button.js +2 -2
- package/dist/esm/components/Button.js.map +1 -1
- package/dist/esm/components/Calendar.d.ts +2 -1
- package/dist/esm/components/Calendar.js +10 -7
- package/dist/esm/components/Calendar.js.map +1 -1
- package/dist/esm/components/Chevron.d.ts +2 -1
- package/dist/esm/components/Chevron.js +14 -4
- package/dist/esm/components/Chevron.js.map +1 -1
- package/dist/esm/components/Day.d.ts +10 -10
- package/dist/esm/components/Day.js +7 -5
- package/dist/esm/components/Day.js.map +1 -1
- package/dist/esm/components/DayDate.d.ts +24 -0
- package/dist/esm/components/DayDate.js +13 -0
- package/dist/esm/components/DayDate.js.map +1 -0
- package/dist/esm/components/DayWrapper.d.ts +2 -1
- package/dist/esm/components/DayWrapper.js +36 -23
- package/dist/esm/components/DayWrapper.js.map +1 -1
- package/dist/esm/components/Dropdown.d.ts +2 -2
- package/dist/esm/components/Dropdown.js +10 -7
- package/dist/esm/components/Dropdown.js.map +1 -1
- package/dist/esm/components/DropdownNav.d.ts +2 -1
- package/dist/esm/components/DropdownNav.js +4 -2
- package/dist/esm/components/DropdownNav.js.map +1 -1
- package/dist/esm/components/Footer.d.ts +2 -2
- package/dist/esm/components/Footer.js +2 -2
- package/dist/esm/components/Footer.js.map +1 -1
- package/dist/esm/components/Month.d.ts +2 -1
- package/dist/esm/components/Month.js +9 -7
- package/dist/esm/components/Month.js.map +1 -1
- package/dist/esm/components/MonthCaption.d.ts +2 -1
- package/dist/esm/components/MonthCaption.js +3 -3
- package/dist/esm/components/MonthCaption.js.map +1 -1
- package/dist/esm/components/Months.d.ts +2 -1
- package/dist/esm/components/Months.js +2 -2
- package/dist/esm/components/Months.js.map +1 -1
- package/dist/esm/components/MonthsDropdown.d.ts +2 -1
- package/dist/esm/components/MonthsDropdown.js +4 -5
- package/dist/esm/components/MonthsDropdown.js.map +1 -1
- package/dist/esm/components/Nav.d.ts +2 -1
- package/dist/esm/components/Nav.js +21 -6
- package/dist/esm/components/Nav.js.map +1 -1
- package/dist/esm/components/Option.d.ts +2 -1
- package/dist/esm/components/Option.js +2 -2
- package/dist/esm/components/Option.js.map +1 -1
- package/dist/esm/components/Select.d.ts +2 -1
- package/dist/esm/components/Select.js +2 -2
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/Week.d.ts +2 -1
- package/dist/esm/components/Week.js +5 -4
- package/dist/esm/components/Week.js.map +1 -1
- package/dist/esm/components/WeekNumber.d.ts +2 -1
- package/dist/esm/components/WeekNumber.js +7 -3
- package/dist/esm/components/WeekNumber.js.map +1 -1
- package/dist/esm/components/Weekday.d.ts +2 -1
- package/dist/esm/components/Weekday.js +4 -4
- package/dist/esm/components/Weekday.js.map +1 -1
- package/dist/esm/components/Weekdays.d.ts +2 -1
- package/dist/esm/components/Weekdays.js +5 -4
- package/dist/esm/components/Weekdays.js.map +1 -1
- package/dist/esm/components/YearsDropdown.d.ts +2 -1
- package/dist/esm/components/YearsDropdown.js +4 -5
- package/dist/esm/components/YearsDropdown.js.map +1 -1
- package/dist/esm/components/custom-components.d.ts +5 -4
- package/dist/esm/components/custom-components.js +5 -4
- package/dist/esm/components/custom-components.js.map +1 -1
- package/dist/esm/contexts/calendar.d.ts +7 -1
- package/dist/esm/contexts/calendar.js +5 -4
- package/dist/esm/contexts/calendar.js.map +1 -1
- package/dist/esm/contexts/focus.d.ts +1 -1
- package/dist/esm/contexts/focus.js +31 -15
- package/dist/esm/contexts/focus.js.map +1 -1
- package/dist/esm/contexts/modifiers.d.ts +2 -1
- package/dist/esm/contexts/modifiers.js +6 -6
- package/dist/esm/contexts/modifiers.js.map +1 -1
- package/dist/esm/contexts/props.d.ts +2 -2
- package/dist/esm/contexts/props.js +9 -11
- package/dist/esm/contexts/props.js.map +1 -1
- package/dist/esm/contexts/{index.d.ts → root.d.ts} +0 -5
- package/dist/esm/contexts/root.js +20 -0
- package/dist/esm/contexts/root.js.map +1 -0
- package/dist/esm/contexts/selection.d.ts +2 -1
- package/dist/esm/contexts/selection.js +14 -15
- package/dist/esm/contexts/selection.js.map +1 -1
- package/dist/esm/formatters/formatMonthDropdown.js +1 -2
- package/dist/esm/formatters/formatMonthDropdown.js.map +1 -1
- package/dist/esm/helpers/daysToMonthWeeks.js +3 -3
- package/dist/esm/helpers/daysToMonthWeeks.js.map +1 -1
- package/dist/esm/helpers/debounce.js.map +1 -1
- package/dist/esm/helpers/getClassNames.d.ts +8 -5
- package/dist/esm/helpers/getClassNames.js.map +1 -1
- package/dist/esm/helpers/getDataAttributes.js.map +1 -1
- package/dist/esm/helpers/getDates.js +1 -1
- package/dist/esm/helpers/getDates.js.map +1 -1
- package/dist/esm/helpers/getDefaultClassNames.d.ts +5 -1
- package/dist/esm/helpers/getDefaultClassNames.js +14 -2
- package/dist/esm/helpers/getDefaultClassNames.js.map +1 -1
- package/dist/esm/helpers/getFormatters.js +2 -2
- package/dist/esm/helpers/getFormatters.js.map +1 -1
- package/dist/esm/helpers/getFromToDate.d.ts +1 -1
- package/dist/esm/helpers/getFromToDate.js +5 -5
- package/dist/esm/helpers/getFromToDate.js.map +1 -1
- package/dist/esm/helpers/getLabels.js.map +1 -1
- package/dist/esm/helpers/getMonthWeeks.js +1 -1
- package/dist/esm/helpers/getMonthWeeks.js.map +1 -1
- package/dist/esm/helpers/getNextFocus.js.map +1 -1
- package/dist/esm/helpers/getStyleForModifiers.js +1 -1
- package/dist/esm/helpers/getStyleForModifiers.js.map +1 -1
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +3 -0
- package/dist/esm/helpers/index.js.map +1 -0
- package/dist/esm/index.d.ts +5 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/labels/index.d.ts +1 -0
- package/dist/esm/labels/index.js +1 -0
- package/dist/esm/labels/index.js.map +1 -1
- package/dist/esm/labels/labelCaption.d.ts +8 -0
- package/dist/esm/labels/labelCaption.js +10 -0
- package/dist/esm/labels/labelCaption.js.map +1 -0
- package/dist/esm/labels/labelDay.d.ts +5 -1
- package/dist/esm/labels/labelDay.js +6 -3
- package/dist/esm/labels/labelDay.js.map +1 -1
- package/dist/esm/types-deprecated.d.ts +1 -1
- package/dist/esm/types-deprecated.js +1 -1
- package/dist/esm/types-deprecated.js.map +1 -1
- package/dist/esm/types.d.ts +24 -12
- package/examples/AccessibleDatePicker.tsx +33 -0
- package/examples/ContainerAttributes.test.tsx +30 -0
- package/examples/ContainerAttributes.tsx +17 -0
- package/examples/Controlled.test.tsx +23 -0
- package/examples/Controlled.tsx +23 -0
- package/examples/CssModules.tsx +8 -0
- package/examples/CssVariables.tsx +9 -0
- package/examples/CustomCaption.tsx +35 -0
- package/examples/CustomDayDate.test.tsx +15 -0
- package/examples/CustomDayDate.tsx +16 -0
- package/examples/CustomMultiple.test.tsx +42 -0
- package/examples/CustomMultiple.tsx +39 -0
- package/examples/CustomSingle.test.tsx +41 -0
- package/examples/CustomSingle.tsx +24 -0
- package/examples/CustomWeek.test.tsx +53 -0
- package/examples/CustomWeek.tsx +46 -0
- package/examples/DefaultMonth.test.tsx +14 -0
- package/examples/DefaultMonth.tsx +7 -0
- package/examples/Dialog.tsx +128 -0
- package/examples/DisableNavigation.tsx +7 -0
- package/examples/Disabled.test.tsx +47 -0
- package/examples/Disabled.tsx +7 -0
- package/examples/Dropdown.test.tsx +32 -0
- package/examples/Dropdown.tsx +7 -0
- package/examples/DropdownMultipleMonths.test.tsx +40 -0
- package/examples/DropdownMultipleMonths.tsx +14 -0
- package/examples/FixedWeeks.test.tsx +16 -0
- package/examples/Fixedweeks.tsx +7 -0
- package/examples/FocusRecursive.test.tsx +23 -0
- package/examples/FocusRecursive.tsx +22 -0
- package/examples/Footer.tsx +21 -0
- package/examples/Formatters.test.tsx +16 -0
- package/examples/Formatters.tsx +34 -0
- package/examples/FromToMonth.test.tsx +40 -0
- package/examples/FromToMonth.tsx +14 -0
- package/examples/FromToYear.test.tsx +40 -0
- package/examples/FromToYear.tsx +9 -0
- package/examples/HideNavigation.tsx +7 -0
- package/examples/Input.test.tsx +65 -0
- package/examples/Input.tsx +80 -0
- package/examples/InputRange.tsx +82 -0
- package/examples/InputTime.tsx +69 -0
- package/examples/Keyboard.test.tsx +254 -0
- package/examples/Keyboard.tsx +16 -0
- package/examples/ModifiersClassnames.test.tsx +23 -0
- package/examples/ModifiersClassnames.tsx +32 -0
- package/examples/ModifiersCustom.test.tsx +21 -0
- package/examples/ModifiersCustom.tsx +45 -0
- package/examples/ModifiersDisabled.test.tsx +17 -0
- package/examples/ModifiersDisabled.tsx +13 -0
- package/examples/ModifiersHidden.test.tsx +21 -0
- package/examples/ModifiersHidden.tsx +13 -0
- package/examples/ModifiersSelected.tsx +19 -0
- package/examples/ModifiersStyle.test.tsx +22 -0
- package/examples/ModifiersStyle.tsx +25 -0
- package/examples/ModifiersToday.test.tsx +43 -0
- package/examples/ModifiersToday.tsx +17 -0
- package/examples/Multiple.test.tsx +36 -0
- package/examples/Multiple.tsx +7 -0
- package/examples/MultipleMinMax.test.tsx +72 -0
- package/examples/MultipleMinMax.tsx +16 -0
- package/examples/MultipleMonths.test.tsx +40 -0
- package/examples/MultipleMonths.tsx +7 -0
- package/examples/MultipleMonthsId.test.tsx +21 -0
- package/examples/MultipleMonthsId.tsx +7 -0
- package/examples/MultipleMonthsPaged.test.tsx +43 -0
- package/examples/MultipleMonthsPaged.tsx +7 -0
- package/examples/None.tsx +7 -0
- package/examples/NumberingSystem.test.tsx +23 -0
- package/examples/NumberingSystem.tsx +30 -0
- package/examples/OutsideDays.test.tsx +19 -0
- package/examples/OutsideDays.tsx +7 -0
- package/examples/Range.test.tsx +68 -0
- package/examples/Range.tsx +38 -0
- package/examples/RangeMinMax.tsx +33 -0
- package/examples/RangeShiftKey.test.tsx +43 -0
- package/examples/RangeShiftKey.tsx +58 -0
- package/examples/Rtl.test.tsx +32 -0
- package/examples/Rtl.tsx +8 -0
- package/examples/Single.test.tsx +33 -0
- package/examples/Single.tsx +7 -0
- package/examples/SingleRequired.test.tsx +29 -0
- package/examples/SingleRequired.tsx +16 -0
- package/examples/Spanish.test.tsx +17 -0
- package/examples/Spanish.tsx +8 -0
- package/examples/SpanishWeekStartsOn.test.tsx +11 -0
- package/examples/SpanishWeekStartsOn.tsx +8 -0
- package/examples/Start.test.tsx +35 -0
- package/examples/Start.tsx +13 -0
- package/examples/StylingCss.test.tsx +19 -0
- package/examples/StylingCss.tsx +23 -0
- package/examples/StylingCssModules.test.tsx +17 -0
- package/examples/StylingInline.test.tsx +18 -0
- package/examples/StylingInline.tsx +13 -0
- package/examples/StylingModifiers.tsx +28 -0
- package/examples/TailwindCSS.tsx +30 -0
- package/examples/TestCase2047.test.tsx +24 -0
- package/examples/TestCase2047.tsx +21 -0
- package/examples/Testcase1567.test.tsx +20 -0
- package/examples/Testcase1567.tsx +34 -0
- package/examples/WeekIso.tsx +7 -0
- package/examples/Weeknumber.test.tsx +32 -0
- package/examples/Weeknumber.tsx +19 -0
- package/examples/WeeknumberCustom.test.tsx +13 -0
- package/examples/WeeknumberCustom.tsx +23 -0
- package/examples/WeeknumberIso.tsx +7 -0
- package/examples/__snapshots__/Range.test.tsx.snap +1296 -0
- package/examples/__snapshots__/StylingCssModules.test.tsx.snap +640 -0
- package/examples/declarations.d.ts +4 -0
- package/examples/index.ts +61 -0
- package/examples/styles/css-variables.module.css +3 -0
- package/examples/styles/styles.css +34 -0
- package/examples/styles/styling-modifiers.module.css +4 -0
- package/package.json +21 -10
- package/src/DayPicker.test.tsx +2 -0
- package/src/DayPicker.tsx +4 -5
- package/src/UI.ts +53 -28
- package/src/components/Button.tsx +1 -1
- package/src/components/Calendar.test.tsx +4 -2
- package/src/components/Calendar.tsx +3 -1
- package/src/components/Chevron.tsx +11 -3
- package/src/components/Day.tsx +36 -11
- package/src/components/DayDate.tsx +29 -0
- package/src/components/DayWrapper.tsx +29 -8
- package/src/components/Dropdown.tsx +1 -1
- package/src/components/DropdownNav.tsx +2 -0
- package/src/components/Footer.tsx +1 -1
- package/src/components/Month.tsx +1 -1
- package/src/components/MonthCaption.tsx +13 -12
- package/src/components/Months.tsx +1 -0
- package/src/components/MonthsDropdown.tsx +3 -1
- package/src/components/Nav.test.tsx +25 -0
- package/src/components/Nav.tsx +19 -3
- package/src/components/Option.tsx +1 -0
- package/src/components/Select.tsx +1 -0
- package/src/components/Week.tsx +2 -0
- package/src/components/WeekNumber.tsx +11 -4
- package/src/components/Weekday.tsx +2 -0
- package/src/components/Weekdays.tsx +2 -0
- package/src/components/YearsDropdown.tsx +3 -1
- package/src/components/custom-components.ts +5 -4
- package/src/contexts/calendar.test.tsx +2 -0
- package/src/contexts/calendar.tsx +12 -0
- package/src/contexts/focus.test.tsx +40 -0
- package/src/contexts/focus.tsx +36 -16
- package/src/contexts/modifiers.tsx +7 -5
- package/src/contexts/props.tsx +6 -1
- package/src/contexts/{index.tsx → root.tsx} +1 -6
- package/src/contexts/selection.tsx +3 -3
- package/src/helpers/debounce.tsx +2 -0
- package/src/helpers/getClassNames.tsx +2 -0
- package/src/helpers/getDataAttributes.tsx +2 -0
- package/src/helpers/getDefaultClassNames.test.ts +5 -2
- package/src/helpers/getDefaultClassNames.ts +22 -2
- package/src/helpers/getFormatters.tsx +2 -0
- package/src/helpers/getFromToDate.test.ts +30 -31
- package/src/helpers/getFromToDate.ts +4 -4
- package/src/helpers/getLabels.tsx +2 -0
- package/src/helpers/getNextFocus.test.tsx +2 -0
- package/src/helpers/getNextFocus.tsx +2 -0
- package/src/helpers/index.ts +2 -0
- package/src/helpers/useControlledValue.test.ts +1 -2
- package/src/index.ts +5 -1
- package/src/labels/index.ts +1 -0
- package/src/labels/labelCaption.ts +14 -0
- package/src/labels/labelDay.test.ts +2 -4
- package/src/labels/labelDay.ts +6 -2
- package/src/style.css +144 -155
- package/src/style.css.d.ts +40 -0
- package/src/style.module.css +332 -0
- package/src/style.module.css.d.ts +40 -0
- package/src/types-deprecated.ts +1 -1
- package/src/types.test.tsx +2 -0
- package/src/types.ts +30 -11
- package/tsconfig.json +4 -3
- package/website/README.md +41 -0
- package/website/docs/.eslintignore +1 -0
- package/website/docs/advanced-guides/custom-components.mdx +115 -0
- package/website/docs/advanced-guides/custom-modifiers.mdx +151 -0
- package/website/docs/advanced-guides/custom-selections.mdx +161 -0
- package/website/docs/advanced-guides/input-fields.mdx +233 -0
- package/website/docs/changelog.mdx +10 -0
- package/website/docs/development/architecture.mdx +64 -0
- package/website/docs/development/code-of-conduct.md +11 -0
- package/website/docs/development/contributing.mdx +11 -0
- package/website/docs/development/documentation.md +11 -0
- package/website/docs/development/roadmap.mdx +37 -0
- package/website/docs/development/source.md +11 -0
- package/website/docs/development/test-cases.mdx +22 -0
- package/website/docs/intro.md +54 -0
- package/website/docs/license.mdx +35 -0
- package/website/docs/start.mdx +60 -0
- package/website/docs/upgrading.mdx +72 -0
- package/website/docs/using-daypicker/accessibility.mdx +85 -0
- package/website/docs/using-daypicker/anatomy.mdx +48 -0
- package/website/docs/using-daypicker/customization.mdx +149 -0
- package/website/docs/using-daypicker/localization.mdx +178 -0
- package/website/docs/using-daypicker/navigation.mdx +114 -0
- package/website/docs/using-daypicker/selection-modes.mdx +228 -0
- package/website/docs/using-daypicker/styling.mdx +196 -0
- package/website/tsconfig.json +16 -0
- package/dist/cjs/contexts/index.js +0 -26
- package/dist/cjs/contexts/index.js.map +0 -1
- package/dist/esm/contexts/index.js +0 -21
- package/dist/esm/contexts/index.js.map +0 -1
- package/src/style.d.ts +0 -9
package/README.md
CHANGED
|
@@ -21,7 +21,9 @@ DayPicker is written in TypeScript and compiled to CommonJS and ESM. It requires
|
|
|
21
21
|
npm install react-day-picker date-fns
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
<a href="https://www.npmjs.com/package/react-day-picker"><img src="https://img.shields.io/npm/v/react-day-picker
|
|
24
|
+
<a href="https://www.npmjs.com/package/react-day-picker"><img src="https://img.shields.io/npm/v/react-day-picker" alt="npm version"/></a>
|
|
25
|
+
<a href="https://www.npmjs.com/package/react-day-picker/next"><img src="https://img.shields.io/npm/v/react-day-picker/next" alt="npm version"/></a>
|
|
26
|
+
<img src="https://img.shields.io/npm/dm/react-day-picker.svg" alt="npm downloads"/> <img src="https://img.shields.io/bundlephobia/minzip/react-day-picker" alt="Min gzipped size"/>
|
|
25
27
|
|
|
26
28
|
## Usage
|
|
27
29
|
|
package/dist/cjs/DayPicker.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { DayPickerProps, Mode } from "./types";
|
|
2
3
|
/**
|
|
3
4
|
* DayPicker is a React component to create date pickers, calendars, and date
|
|
4
|
-
* inputs for web applications.
|
|
5
|
-
* with a custom one.
|
|
6
|
-
*
|
|
7
|
-
* Use the `components` prop to swap this component with a custom one.
|
|
5
|
+
* inputs for web applications.
|
|
8
6
|
*
|
|
9
7
|
* @group Components
|
|
10
8
|
* @see http://daypicker.dev
|
|
11
9
|
*/
|
|
12
|
-
export declare function DayPicker<T extends Mode = "default">(props: DayPickerProps<T>):
|
|
10
|
+
export declare function DayPicker<T extends Mode = "default">(props: DayPickerProps<T>): React.JSX.Element;
|
package/dist/cjs/DayPicker.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.DayPicker = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const Calendar_1 = require("./components/Calendar");
|
|
6
|
-
const
|
|
9
|
+
const root_1 = require("./contexts/root");
|
|
7
10
|
/**
|
|
8
11
|
* DayPicker is a React component to create date pickers, calendars, and date
|
|
9
|
-
* inputs for web applications.
|
|
10
|
-
* with a custom one.
|
|
11
|
-
*
|
|
12
|
-
* Use the `components` prop to swap this component with a custom one.
|
|
12
|
+
* inputs for web applications.
|
|
13
13
|
*
|
|
14
14
|
* @group Components
|
|
15
15
|
* @see http://daypicker.dev
|
|
16
16
|
*/
|
|
17
17
|
function DayPicker(props) {
|
|
18
|
-
return (
|
|
18
|
+
return (react_1.default.createElement(root_1.ContextProviders, { ...props },
|
|
19
|
+
react_1.default.createElement(Calendar_1.Calendar, null)));
|
|
19
20
|
}
|
|
20
21
|
exports.DayPicker = DayPicker;
|
|
21
22
|
//# sourceMappingURL=DayPicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DayPicker.js","sourceRoot":"","sources":["../../src/DayPicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DayPicker.js","sourceRoot":"","sources":["../../src/DayPicker.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,oDAAiD;AACjD,0CAAmD;AAGnD;;;;;;GAMG;AACH,SAAgB,SAAS,CACvB,KAAwB;IAExB,OAAO,CACL,8BAAC,uBAAgB,OAAK,KAAK;QACzB,8BAAC,mBAAQ,OAAG,CACK,CACpB,CAAC;AACJ,CAAC;AARD,8BAQC"}
|
package/dist/cjs/UI.d.ts
CHANGED
|
@@ -1,52 +1,60 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The UI elements composing DayPicker.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The UI elements composing DayPicker. These elements are mapped to
|
|
3
|
+
* {@link CustomComponents}, the {@link ClassNames} and the {@link Styles} used by
|
|
4
|
+
* DayPicker.
|
|
5
5
|
*/
|
|
6
6
|
export declare enum UI {
|
|
7
7
|
/** The previous button in the navigation. */
|
|
8
8
|
ButtonPrevious = "button_previous",
|
|
9
9
|
/** The next button the navigation */
|
|
10
10
|
ButtonNext = "button_next",
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The calendar element: the root component displaying the months and the
|
|
13
|
+
* navigation bar. Extended by {@link CalendarFlag}.
|
|
14
|
+
*/
|
|
12
15
|
Calendar = "calendar",
|
|
13
|
-
/** The gridcell with the day's date. */
|
|
14
|
-
Day = "day",
|
|
15
|
-
/** The label of a caption. */
|
|
16
|
-
CaptionLabel = "caption_label",
|
|
17
16
|
/** The Chevron SVG element used by navigation buttons and dropdowns. */
|
|
18
17
|
Chevron = "chevron",
|
|
19
|
-
/** The
|
|
18
|
+
/** The grid cell with the day's date. Extended by {@link DayModifier}. */
|
|
19
|
+
Day = "day",
|
|
20
|
+
/** The element containing the formatted day's date, inside the grid cell. */
|
|
21
|
+
DayDate = "day_date",
|
|
22
|
+
/** The caption label of the month (when not showing the dropdown navigation). */
|
|
23
|
+
CaptionLabel = "caption_label",
|
|
24
|
+
/** The container of the dropdown navigation (when enabled). */
|
|
20
25
|
DropdownNav = "dropdown_nav",
|
|
21
|
-
/** The dropdown
|
|
26
|
+
/** The dropdown element to select for years and months. */
|
|
22
27
|
Dropdown = "dropdown",
|
|
23
|
-
/** The
|
|
28
|
+
/** The container element of the dropdown. */
|
|
24
29
|
DropdownRoot = "dropdown_root",
|
|
25
|
-
/** The root element of the
|
|
30
|
+
/** The root element of the footer. */
|
|
26
31
|
Footer = "footer",
|
|
27
|
-
/** The
|
|
32
|
+
/** The month grid. */
|
|
33
|
+
Month = "month",
|
|
34
|
+
/** Contains the dropdown navigation or the caption label. */
|
|
28
35
|
MonthCaption = "month_caption",
|
|
29
|
-
/** The dropdown
|
|
36
|
+
/** The dropdown with the months. */
|
|
30
37
|
MonthsDropdown = "months_dropdown",
|
|
31
|
-
/** Wrapper of the
|
|
38
|
+
/** Wrapper of the {@link} grid. */
|
|
32
39
|
MonthWrapper = "month_wrapper",
|
|
33
|
-
/** The
|
|
34
|
-
Month = "month",
|
|
35
|
-
/** The group of weeks in a month. */
|
|
36
|
-
Weeks = "weeks",
|
|
37
|
-
/** Container containing the months. */
|
|
40
|
+
/** The container of the displayed months. */
|
|
38
41
|
Months = "months",
|
|
39
|
-
/** The navigation
|
|
42
|
+
/** The navigation bar with the previous and next buttons */
|
|
40
43
|
Nav = "nav",
|
|
41
|
-
/** The row
|
|
44
|
+
/** The row containing the week. */
|
|
42
45
|
Week = "week",
|
|
43
|
-
/** The
|
|
46
|
+
/** The group of row weeks in a month. */
|
|
47
|
+
Weeks = "weeks",
|
|
48
|
+
/** The column header with the weekday. */
|
|
44
49
|
Weekday = "weekday",
|
|
45
|
-
/** The row grouping the weekdays. */
|
|
50
|
+
/** The row grouping the weekdays in the column headers. */
|
|
46
51
|
Weekdays = "weekdays",
|
|
47
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The row header containing the week number. Extended by
|
|
54
|
+
* {@link WeekNumberFlag}.
|
|
55
|
+
*/
|
|
48
56
|
WeekNumber = "week_number",
|
|
49
|
-
/** The dropdown
|
|
57
|
+
/** The dropdown with the years. */
|
|
50
58
|
YearsDropdown = "years_dropdown"
|
|
51
59
|
}
|
|
52
60
|
/** The modifiers for the {@link UI.Day}. */
|
|
@@ -75,9 +83,22 @@ export declare enum DayModifier {
|
|
|
75
83
|
/** Flags that can be applied to the {@link UI.Calendar} element. */
|
|
76
84
|
export declare enum CalendarFlag {
|
|
77
85
|
/** Assigned when the week numbers are show. */
|
|
78
|
-
hasWeekNumbers = "
|
|
86
|
+
hasWeekNumbers = "has_week_numbers",
|
|
79
87
|
/** Assigned when the weekdays are hidden. */
|
|
80
88
|
noWeekdays = "no_weekdays",
|
|
81
89
|
/** Assigned when the calendar has multiple months. */
|
|
82
|
-
hasMultipleMonths = "
|
|
90
|
+
hasMultipleMonths = "has_multiple_months"
|
|
91
|
+
}
|
|
92
|
+
/** Flags that can be applied to the {@link UI.Chevron} element. */
|
|
93
|
+
export declare enum ChevronFlag {
|
|
94
|
+
/** Assigned when the week numbers are show. */
|
|
95
|
+
disabled = "chevron_disabled"
|
|
96
|
+
}
|
|
97
|
+
/** Flags that can be applied to the {@link UI.WeekNumber} element. */
|
|
98
|
+
export declare enum WeekNumberFlag {
|
|
99
|
+
/**
|
|
100
|
+
* Assigned when the week number is interactive, i.e. has an
|
|
101
|
+
* `onWeekNumberClick` event attached to it.
|
|
102
|
+
*/
|
|
103
|
+
isInteractive = "week_number_interactive"
|
|
83
104
|
}
|
package/dist/cjs/UI.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CalendarFlag = exports.DayModifier = exports.UI = void 0;
|
|
3
|
+
exports.WeekNumberFlag = exports.ChevronFlag = exports.CalendarFlag = exports.DayModifier = exports.UI = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* The UI elements composing DayPicker.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* The UI elements composing DayPicker. These elements are mapped to
|
|
6
|
+
* {@link CustomComponents}, the {@link ClassNames} and the {@link Styles} used by
|
|
7
|
+
* DayPicker.
|
|
8
8
|
*/
|
|
9
9
|
var UI;
|
|
10
10
|
(function (UI) {
|
|
@@ -12,45 +12,53 @@ var UI;
|
|
|
12
12
|
UI["ButtonPrevious"] = "button_previous";
|
|
13
13
|
/** The next button the navigation */
|
|
14
14
|
UI["ButtonNext"] = "button_next";
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The calendar element: the root component displaying the months and the
|
|
17
|
+
* navigation bar. Extended by {@link CalendarFlag}.
|
|
18
|
+
*/
|
|
16
19
|
UI["Calendar"] = "calendar";
|
|
17
|
-
/** The gridcell with the day's date. */
|
|
18
|
-
UI["Day"] = "day";
|
|
19
|
-
/** The label of a caption. */
|
|
20
|
-
UI["CaptionLabel"] = "caption_label";
|
|
21
20
|
/** The Chevron SVG element used by navigation buttons and dropdowns. */
|
|
22
21
|
UI["Chevron"] = "chevron";
|
|
23
|
-
/** The
|
|
22
|
+
/** The grid cell with the day's date. Extended by {@link DayModifier}. */
|
|
23
|
+
UI["Day"] = "day";
|
|
24
|
+
/** The element containing the formatted day's date, inside the grid cell. */
|
|
25
|
+
UI["DayDate"] = "day_date";
|
|
26
|
+
/** The caption label of the month (when not showing the dropdown navigation). */
|
|
27
|
+
UI["CaptionLabel"] = "caption_label";
|
|
28
|
+
/** The container of the dropdown navigation (when enabled). */
|
|
24
29
|
UI["DropdownNav"] = "dropdown_nav";
|
|
25
|
-
/** The dropdown
|
|
30
|
+
/** The dropdown element to select for years and months. */
|
|
26
31
|
UI["Dropdown"] = "dropdown";
|
|
27
|
-
/** The
|
|
32
|
+
/** The container element of the dropdown. */
|
|
28
33
|
UI["DropdownRoot"] = "dropdown_root";
|
|
29
|
-
/** The root element of the
|
|
34
|
+
/** The root element of the footer. */
|
|
30
35
|
UI["Footer"] = "footer";
|
|
31
|
-
/** The
|
|
36
|
+
/** The month grid. */
|
|
37
|
+
UI["Month"] = "month";
|
|
38
|
+
/** Contains the dropdown navigation or the caption label. */
|
|
32
39
|
UI["MonthCaption"] = "month_caption";
|
|
33
|
-
/** The dropdown
|
|
40
|
+
/** The dropdown with the months. */
|
|
34
41
|
UI["MonthsDropdown"] = "months_dropdown";
|
|
35
|
-
/** Wrapper of the
|
|
42
|
+
/** Wrapper of the {@link} grid. */
|
|
36
43
|
UI["MonthWrapper"] = "month_wrapper";
|
|
37
|
-
/** The
|
|
38
|
-
UI["Month"] = "month";
|
|
39
|
-
/** The group of weeks in a month. */
|
|
40
|
-
UI["Weeks"] = "weeks";
|
|
41
|
-
/** Container containing the months. */
|
|
44
|
+
/** The container of the displayed months. */
|
|
42
45
|
UI["Months"] = "months";
|
|
43
|
-
/** The navigation
|
|
46
|
+
/** The navigation bar with the previous and next buttons */
|
|
44
47
|
UI["Nav"] = "nav";
|
|
45
|
-
/** The row
|
|
48
|
+
/** The row containing the week. */
|
|
46
49
|
UI["Week"] = "week";
|
|
47
|
-
/** The
|
|
50
|
+
/** The group of row weeks in a month. */
|
|
51
|
+
UI["Weeks"] = "weeks";
|
|
52
|
+
/** The column header with the weekday. */
|
|
48
53
|
UI["Weekday"] = "weekday";
|
|
49
|
-
/** The row grouping the weekdays. */
|
|
54
|
+
/** The row grouping the weekdays in the column headers. */
|
|
50
55
|
UI["Weekdays"] = "weekdays";
|
|
51
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The row header containing the week number. Extended by
|
|
58
|
+
* {@link WeekNumberFlag}.
|
|
59
|
+
*/
|
|
52
60
|
UI["WeekNumber"] = "week_number";
|
|
53
|
-
/** The dropdown
|
|
61
|
+
/** The dropdown with the years. */
|
|
54
62
|
UI["YearsDropdown"] = "years_dropdown";
|
|
55
63
|
})(UI || (exports.UI = UI = {}));
|
|
56
64
|
/** The modifiers for the {@link UI.Day}. */
|
|
@@ -81,10 +89,25 @@ var DayModifier;
|
|
|
81
89
|
var CalendarFlag;
|
|
82
90
|
(function (CalendarFlag) {
|
|
83
91
|
/** Assigned when the week numbers are show. */
|
|
84
|
-
CalendarFlag["hasWeekNumbers"] = "
|
|
92
|
+
CalendarFlag["hasWeekNumbers"] = "has_week_numbers";
|
|
85
93
|
/** Assigned when the weekdays are hidden. */
|
|
86
94
|
CalendarFlag["noWeekdays"] = "no_weekdays";
|
|
87
95
|
/** Assigned when the calendar has multiple months. */
|
|
88
|
-
CalendarFlag["hasMultipleMonths"] = "
|
|
96
|
+
CalendarFlag["hasMultipleMonths"] = "has_multiple_months";
|
|
89
97
|
})(CalendarFlag || (exports.CalendarFlag = CalendarFlag = {}));
|
|
98
|
+
/** Flags that can be applied to the {@link UI.Chevron} element. */
|
|
99
|
+
var ChevronFlag;
|
|
100
|
+
(function (ChevronFlag) {
|
|
101
|
+
/** Assigned when the week numbers are show. */
|
|
102
|
+
ChevronFlag["disabled"] = "chevron_disabled";
|
|
103
|
+
})(ChevronFlag || (exports.ChevronFlag = ChevronFlag = {}));
|
|
104
|
+
/** Flags that can be applied to the {@link UI.WeekNumber} element. */
|
|
105
|
+
var WeekNumberFlag;
|
|
106
|
+
(function (WeekNumberFlag) {
|
|
107
|
+
/**
|
|
108
|
+
* Assigned when the week number is interactive, i.e. has an
|
|
109
|
+
* `onWeekNumberClick` event attached to it.
|
|
110
|
+
*/
|
|
111
|
+
WeekNumberFlag["isInteractive"] = "week_number_interactive";
|
|
112
|
+
})(WeekNumberFlag || (exports.WeekNumberFlag = WeekNumberFlag = {}));
|
|
90
113
|
//# sourceMappingURL=UI.js.map
|
package/dist/cjs/UI.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UI.js","sourceRoot":"","sources":["../../src/UI.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"UI.js","sourceRoot":"","sources":["../../src/UI.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,IAAY,EAqDX;AArDD,WAAY,EAAE;IACZ,6CAA6C;IAC7C,wCAAkC,CAAA;IAClC,qCAAqC;IACrC,gCAA0B,CAAA;IAC1B;;;OAGG;IACH,2BAAqB,CAAA;IACrB,wEAAwE;IACxE,yBAAmB,CAAA;IACnB,0EAA0E;IAC1E,iBAAW,CAAA;IACX,6EAA6E;IAC7E,0BAAoB,CAAA;IACpB,iFAAiF;IACjF,oCAA8B,CAAA;IAC9B,+DAA+D;IAC/D,kCAA4B,CAAA;IAC5B,2DAA2D;IAC3D,2BAAqB,CAAA;IACrB,6CAA6C;IAC7C,oCAA8B,CAAA;IAC9B,sCAAsC;IACtC,uBAAiB,CAAA;IACjB,sBAAsB;IACtB,qBAAe,CAAA;IACf,6DAA6D;IAC7D,oCAA8B,CAAA;IAC9B,oCAAoC;IACpC,wCAAkC,CAAA;IAClC,mCAAmC;IACnC,oCAA8B,CAAA;IAC9B,6CAA6C;IAC7C,uBAAiB,CAAA;IACjB,4DAA4D;IAC5D,iBAAW,CAAA;IACX,mCAAmC;IACnC,mBAAa,CAAA;IACb,yCAAyC;IACzC,qBAAe,CAAA;IACf,0CAA0C;IAC1C,yBAAmB,CAAA;IACnB,2DAA2D;IAC3D,2BAAqB,CAAA;IACrB;;;OAGG;IACH,gCAA0B,CAAA;IAC1B,mCAAmC;IACnC,sCAAgC,CAAA;AAClC,CAAC,EArDW,EAAE,kBAAF,EAAE,QAqDb;AAED,4CAA4C;AAC5C,IAAY,WAqBX;AArBD,WAAY,WAAW;IACrB,0BAA0B;IAC1B,oCAAqB,CAAA;IACrB,wBAAwB;IACxB,gCAAiB,CAAA;IACjB,2CAA2C;IAC3C,kCAAmB,CAAA;IACnB,iDAAiD;IACjD,sCAAuB,CAAA;IACvB,oDAAoD;IACpD,4CAA6B,CAAA;IAC7B,mDAAmD;IACnD,0CAA2B,CAAA;IAC3B,2BAA2B;IAC3B,oCAAqB,CAAA;IACrB,4BAA4B;IAC5B,sCAAuB,CAAA;IACvB,0BAA0B;IAC1B,kCAAmB,CAAA;IACnB,wBAAwB;IACxB,8BAAe,CAAA;AACjB,CAAC,EArBW,WAAW,2BAAX,WAAW,QAqBtB;AAED,oEAAoE;AACpE,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,+CAA+C;IAC/C,mDAAmC,CAAA;IACnC,6CAA6C;IAC7C,0CAA0B,CAAA;IAC1B,sDAAsD;IACtD,yDAAyC,CAAA;AAC3C,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AAED,mEAAmE;AACnE,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,+CAA+C;IAC/C,4CAA6B,CAAA;AAC/B,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,sEAAsE;AACtE,IAAY,cAMX;AAND,WAAY,cAAc;IACxB;;;OAGG;IACH,2DAAyC,CAAA;AAC3C,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tslib_1.__exportStar(require("./CalendarWeek"), exports);
|
|
17
|
+
__exportStar(require("./CalendarDay"), exports);
|
|
18
|
+
__exportStar(require("./CalendarMonth"), exports);
|
|
19
|
+
__exportStar(require("./CalendarWeek"), exports);
|
|
7
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/classes/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/classes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,iDAA+B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from "react";
|
|
1
|
+
import React, { ButtonHTMLAttributes } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* The component used to generate the button elements in the calendar.
|
|
4
4
|
*
|
|
@@ -7,5 +7,5 @@ import { ButtonHTMLAttributes } from "react";
|
|
|
7
7
|
* @group Components
|
|
8
8
|
* @see https://react-day-picker.js.org/advanced-guides/custom-components
|
|
9
9
|
*/
|
|
10
|
-
export declare function Button(props: ButtonHTMLAttributes<HTMLButtonElement>):
|
|
10
|
+
export declare function Button(props: ButtonHTMLAttributes<HTMLButtonElement>): React.JSX.Element;
|
|
11
11
|
export type ButtonProps = Parameters<typeof Button>[0];
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Button = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
/**
|
|
6
9
|
* The component used to generate the button elements in the calendar.
|
|
7
10
|
*
|
|
@@ -11,7 +14,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
11
14
|
* @see https://react-day-picker.js.org/advanced-guides/custom-components
|
|
12
15
|
*/
|
|
13
16
|
function Button(props) {
|
|
14
|
-
return
|
|
17
|
+
return react_1.default.createElement("button", { ...props });
|
|
15
18
|
}
|
|
16
19
|
exports.Button = Button;
|
|
17
20
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAoD;AAKpD;;;;;;;GAOG;AACH,SAAgB,MAAM,CAAC,KAA8C;IACnE,OAAO,6CAAY,KAAK,GAAI,CAAC;AAC/B,CAAC;AAFD,wBAEC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
/**
|
|
2
3
|
* Render the DayPicker Calendar with navigation and the month grids.
|
|
3
4
|
*
|
|
@@ -6,4 +7,4 @@
|
|
|
6
7
|
* @group Components
|
|
7
8
|
* @see https://react-day-picker.js.org/advanced-guides/custom-components
|
|
8
9
|
*/
|
|
9
|
-
export declare function Calendar():
|
|
10
|
+
export declare function Calendar(): React.JSX.Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Calendar = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const UI_1 = require("../UI");
|
|
6
9
|
const calendar_1 = require("../contexts/calendar");
|
|
7
10
|
const props_1 = require("../contexts/props");
|
|
@@ -18,7 +21,6 @@ const Nav_1 = require("./Nav");
|
|
|
18
21
|
* @see https://react-day-picker.js.org/advanced-guides/custom-components
|
|
19
22
|
*/
|
|
20
23
|
function Calendar() {
|
|
21
|
-
var _a, _b, _c, _d;
|
|
22
24
|
const { className, classNames, components, dataAttributes, dir, footer, hideNavigation, hideWeekdayRow, id, lang, nonce, numberOfMonths, showWeekNumber, style, styles, title } = (0, props_1.useProps)();
|
|
23
25
|
const calendar = (0, calendar_1.useCalendar)();
|
|
24
26
|
// Apply classnames according to props
|
|
@@ -35,11 +37,15 @@ function Calendar() {
|
|
|
35
37
|
if (hideWeekdayRow) {
|
|
36
38
|
cssClassNames.push(classNames[UI_1.CalendarFlag.noWeekdays]);
|
|
37
39
|
}
|
|
38
|
-
const Nav =
|
|
39
|
-
const Months =
|
|
40
|
-
const Month =
|
|
41
|
-
const Footer =
|
|
42
|
-
return (
|
|
40
|
+
const Nav = components?.Nav ?? Nav_1.Nav;
|
|
41
|
+
const Months = components?.Months ?? Months_1.Months;
|
|
42
|
+
const Month = components?.Month ?? Month_1.Month;
|
|
43
|
+
const Footer = components?.Footer ?? Footer_1.Footer;
|
|
44
|
+
return (react_1.default.createElement("div", { className: cssClassNames.join(" "), style: { ...styles?.[UI_1.UI.Calendar], ...style }, dir: dir, id: id, lang: lang, nonce: nonce, title: title, ...dataAttributes },
|
|
45
|
+
react_1.default.createElement(Months, { className: classNames[UI_1.UI.Months], style: styles?.[UI_1.UI.Months] },
|
|
46
|
+
!hideNavigation && react_1.default.createElement(Nav, null),
|
|
47
|
+
calendar.months.map((month, i) => (react_1.default.createElement(Month, { "aria-labelledby": id, key: i, index: i, month: month })))),
|
|
48
|
+
footer && (react_1.default.createElement(Footer, { className: classNames[UI_1.UI.Footer], style: styles?.[UI_1.UI.Footer] }, footer))));
|
|
43
49
|
}
|
|
44
50
|
exports.Calendar = Calendar;
|
|
45
51
|
//# sourceMappingURL=Calendar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../../src/components/Calendar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../../src/components/Calendar.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8BAAyC;AACzC,mDAAmD;AACnD,6CAA6C;AAE7C,qCAAmD;AACnD,mCAAgD;AAChD,qCAAmD;AACnD,+BAA0C;AAE1C;;;;;;;GAOG;AACH,SAAgB,QAAQ;IACtB,MAAM,EACJ,SAAS,EACT,UAAU,EACV,UAAU,EACV,cAAc,EACd,GAAG,EACH,MAAM,EACN,cAAc,EACd,cAAc,EACd,EAAE,EACF,IAAI,EACJ,KAAK,EACL,cAAc,EACd,cAAc,EACd,KAAK,EACL,MAAM,EACN,KAAK,EACN,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAEf,MAAM,QAAQ,GAAG,IAAA,sBAAW,GAAE,CAAC;IAE/B,sCAAsC;IACtC,MAAM,aAAa,GAAG,CAAC,UAAU,CAAC,OAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChD,IAAI,SAAS,EAAE,CAAC;QACd,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IACD,IAAI,cAAc,GAAG,CAAC,EAAE,CAAC;QACvB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,cAAc,EAAE,CAAC;QACnB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAY,CAAC,cAAc,CAAC,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,cAAc,EAAE,CAAC;QACnB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAY,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,GAAG,GAAG,UAAU,EAAE,GAAG,IAAI,SAAU,CAAC;IAC1C,MAAM,MAAM,GAAG,UAAU,EAAE,MAAM,IAAI,eAAa,CAAC;IACnD,MAAM,KAAK,GAAG,UAAU,EAAE,KAAK,IAAI,aAAY,CAAC;IAChD,MAAM,MAAM,GAAG,UAAU,EAAE,MAAM,IAAI,eAAa,CAAC;IAEnD,OAAO,CACL,uCACE,SAAS,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,EAClC,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,OAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,EAC7C,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,KACR,cAAc;QAElB,8BAAC,MAAM,IAAC,SAAS,EAAE,UAAU,CAAC,OAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,OAAE,CAAC,MAAM,CAAC;YACjE,CAAC,cAAc,IAAI,8BAAC,GAAG,OAAG;YAC1B,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CACjC,8BAAC,KAAK,uBAAkB,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,CAC/D,CAAC,CACK;QACR,MAAM,IAAI,CACT,8BAAC,MAAM,IAAC,SAAS,EAAE,UAAU,CAAC,OAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,OAAE,CAAC,MAAM,CAAC,IACjE,MAAM,CACA,CACV,CACG,CACP,CAAC;AACJ,CAAC;AAlED,4BAkEC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
/**
|
|
2
3
|
* Render the chevron icon used in the navigation buttons and dropdowns.
|
|
3
4
|
*
|
|
@@ -9,4 +10,4 @@
|
|
|
9
10
|
export declare function Chevron(props: {
|
|
10
11
|
size?: number;
|
|
11
12
|
orientation?: "up" | "down" | "left" | "right";
|
|
12
|
-
}):
|
|
13
|
+
}): React.JSX.Element;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Chevron = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const UI_1 = require("../UI");
|
|
6
9
|
const props_1 = require("../contexts/props");
|
|
7
10
|
/**
|
|
@@ -14,8 +17,18 @@ const props_1 = require("../contexts/props");
|
|
|
14
17
|
*/
|
|
15
18
|
function Chevron(props) {
|
|
16
19
|
const { size = 24, orientation = "left" } = props;
|
|
17
|
-
const { classNames } = (0, props_1.useProps)();
|
|
18
|
-
|
|
20
|
+
const { classNames, disableNavigation } = (0, props_1.useProps)();
|
|
21
|
+
const svgClassName = [
|
|
22
|
+
classNames[UI_1.UI.Chevron],
|
|
23
|
+
disableNavigation ? classNames[UI_1.ChevronFlag.disabled] : ""
|
|
24
|
+
]
|
|
25
|
+
.join(" ")
|
|
26
|
+
.trim();
|
|
27
|
+
return (react_1.default.createElement("svg", { className: svgClassName, width: size, height: size, viewBox: "0 0 24 24" },
|
|
28
|
+
orientation === "up" && (react_1.default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" })),
|
|
29
|
+
orientation === "down" && (react_1.default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" })),
|
|
30
|
+
orientation === "left" && (react_1.default.createElement("polygon", { points: "15 17.23 9.43 11.5 15 5.76 13.28 4 6 11.5 13.28 19" })),
|
|
31
|
+
orientation === "right" && (react_1.default.createElement("polygon", { points: "8 18.23 13.57 12.5 8 6.76 9.72 5 17 12.5 9.72 20" }))));
|
|
19
32
|
}
|
|
20
33
|
exports.Chevron = Chevron;
|
|
21
34
|
//# sourceMappingURL=Chevron.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron.js","sourceRoot":"","sources":["../../../src/components/Chevron.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chevron.js","sourceRoot":"","sources":["../../../src/components/Chevron.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8BAAwC;AACxC,6CAA6C;AAE7C;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,KAGvB;IACC,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IAClD,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAErD,MAAM,YAAY,GAAG;QACnB,UAAU,CAAC,OAAE,CAAC,OAAO,CAAC;QACtB,iBAAiB,CAAC,CAAC,CAAC,UAAU,CAAC,gBAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;KAC1D;SACE,IAAI,CAAC,GAAG,CAAC;SACT,IAAI,EAAE,CAAC;IACV,OAAO,CACL,uCACE,SAAS,EAAE,YAAY,EACvB,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,OAAO,EAAC,WAAW;QAElB,WAAW,KAAK,IAAI,IAAI,CACvB,2CAAS,MAAM,EAAC,qDAAqD,GAAG,CACzE;QACA,WAAW,KAAK,MAAM,IAAI,CACzB,2CAAS,MAAM,EAAC,kDAAkD,GAAG,CACtE;QACA,WAAW,KAAK,MAAM,IAAI,CACzB,2CAAS,MAAM,EAAC,oDAAoD,GAAG,CACxE;QACA,WAAW,KAAK,OAAO,IAAI,CAC1B,2CAAS,MAAM,EAAC,kDAAkD,GAAG,CACtE,CACG,CACP,CAAC;AACJ,CAAC;AAlCD,0BAkCC"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
2
3
|
import type { CalendarDay } from "../classes";
|
|
3
4
|
import type { DayModifiers } from "../types";
|
|
4
5
|
/**
|
|
5
|
-
* Render the gridcell of a day in the calendar
|
|
6
|
+
* Render the gridcell of a day in the calendar and handle the interaction and
|
|
7
|
+
* the focus with they day.
|
|
6
8
|
*
|
|
7
|
-
* Use the `components` prop to swap this component with a custom one.
|
|
9
|
+
* Use the `components` prop to swap this component with a custom one. If you
|
|
10
|
+
* need to just change the content of the day cell, consider swapping the
|
|
11
|
+
* `DayDate` component instead.
|
|
8
12
|
*
|
|
9
13
|
* @group Components
|
|
10
14
|
* @see https://react-day-picker.js.org/advanced-guides/custom-components
|
|
11
15
|
*/
|
|
12
16
|
export declare function Day(props: {
|
|
13
|
-
/** The day to be rendered in the gridcell. */
|
|
14
17
|
day: CalendarDay;
|
|
15
|
-
/** Modifiers for the day. */
|
|
16
18
|
modifiers: DayModifiers;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
children?: React.ReactNode;
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
rootProps: Pick<JSX.IntrinsicElements["div"], "className" | "style" | "tabIndex" | "aria-colindex" | "aria-disabled" | "aria-hidden" | "aria-label" | "aria-selected" | "onClick" | "onBlur" | "onFocus" | "onKeyDown" | "onKeyPress" | "onKeyUp" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onTouchCancel" | "onTouchEnd" | "onTouchMove" | "onTouchStart" | "ref" | "role">;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
22
|
export type DayProps = Parameters<typeof Day>[0];
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Day = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
/**
|
|
6
|
-
* Render the gridcell of a day in the calendar
|
|
9
|
+
* Render the gridcell of a day in the calendar and handle the interaction and
|
|
10
|
+
* the focus with they day.
|
|
7
11
|
*
|
|
8
|
-
* Use the `components` prop to swap this component with a custom one.
|
|
12
|
+
* Use the `components` prop to swap this component with a custom one. If you
|
|
13
|
+
* need to just change the content of the day cell, consider swapping the
|
|
14
|
+
* `DayDate` component instead.
|
|
9
15
|
*
|
|
10
16
|
* @group Components
|
|
11
17
|
* @see https://react-day-picker.js.org/advanced-guides/custom-components
|
|
12
18
|
*/
|
|
13
19
|
function Day(props) {
|
|
14
|
-
|
|
15
|
-
return (0, jsx_runtime_1.jsx)("div", { ...htmlAttributes, children: children });
|
|
20
|
+
return react_1.default.createElement("div", { ...props.rootProps }, props.children);
|
|
16
21
|
}
|
|
17
22
|
exports.Day = Day;
|
|
18
23
|
//# sourceMappingURL=Day.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Day.js","sourceRoot":"","sources":["../../../src/components/Day.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Day.js","sourceRoot":"","sources":["../../../src/components/Day.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAM1B;;;;;;;;;;GAUG;AACH,SAAgB,GAAG,CAAC,KA+BnB;IACC,OAAO,0CAAS,KAAK,CAAC,SAAS,IAAG,KAAK,CAAC,QAAQ,CAAO,CAAC;AAC1D,CAAC;AAjCD,kBAiCC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CalendarDay } from "../classes";
|
|
3
|
+
import type { DayModifiers } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Render the date as string inside the day grid cell.
|
|
6
|
+
*
|
|
7
|
+
* Use the `components` prop to swap this component with a custom one.
|
|
8
|
+
*
|
|
9
|
+
* @group Components
|
|
10
|
+
* @see https://react-day-picker.js.org/advanced-guides/custom-components
|
|
11
|
+
*/
|
|
12
|
+
export declare function DayDate(props: {
|
|
13
|
+
day: CalendarDay;
|
|
14
|
+
/** The date to display. */
|
|
15
|
+
formattedDate: string;
|
|
16
|
+
/** The modifiers for the day. */
|
|
17
|
+
modifiers: DayModifiers;
|
|
18
|
+
/** The HTML attributes for the root element. */
|
|
19
|
+
rootProps: {
|
|
20
|
+
className: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
};
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
export type DayDateProps = Parameters<typeof DayDate>[0];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DayDate = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
/**
|
|
9
|
+
* Render the date as string inside the day grid cell.
|
|
10
|
+
*
|
|
11
|
+
* Use the `components` prop to swap this component with a custom one.
|
|
12
|
+
*
|
|
13
|
+
* @group Components
|
|
14
|
+
* @see https://react-day-picker.js.org/advanced-guides/custom-components
|
|
15
|
+
*/
|
|
16
|
+
function DayDate(props) {
|
|
17
|
+
return react_1.default.createElement("span", { ...props.rootProps }, props.formattedDate);
|
|
18
|
+
}
|
|
19
|
+
exports.DayDate = DayDate;
|
|
20
|
+
//# sourceMappingURL=DayDate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DayDate.js","sourceRoot":"","sources":["../../../src/components/DayDate.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAK1B;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,KAWvB;IACC,OAAO,2CAAU,KAAK,CAAC,SAAS,IAAG,KAAK,CAAC,aAAa,CAAQ,CAAC;AACjE,CAAC;AAbD,0BAaC"}
|