react-day-picker 9.0.0-beta.1 → 9.0.0-beta.2
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 +2 -1
- package/dist/cjs/DayPicker.js +6 -2
- package/dist/cjs/DayPicker.js.map +1 -1
- package/dist/cjs/UI.d.ts +13 -8
- package/dist/cjs/UI.js +13 -8
- 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 +12 -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 +9 -2
- package/dist/cjs/components/Chevron.js.map +1 -1
- package/dist/cjs/components/Day.d.ts +4 -3
- package/dist/cjs/components/Day.js +5 -2
- package/dist/cjs/components/Day.js.map +1 -1
- package/dist/cjs/components/DayWrapper.d.ts +2 -1
- package/dist/cjs/components/DayWrapper.js +32 -24
- 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 +5 -2
- 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 +6 -4
- 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 +5 -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 +6 -4
- package/dist/cjs/components/YearsDropdown.js.map +1 -1
- package/dist/cjs/components/custom-components.js +32 -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/index.js +28 -8
- package/dist/cjs/contexts/index.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/selection.d.ts +2 -1
- package/dist/cjs/contexts/selection.js +35 -13
- 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 +5 -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/getFormatters.js +26 -4
- package/dist/cjs/helpers/getFormatters.js.map +1 -1
- package/dist/cjs/helpers/getFromToDate.js +2 -3
- 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/index.js +24 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/labels/index.js +22 -9
- package/dist/cjs/labels/index.js.map +1 -1
- package/dist/cjs/utils/index.js +18 -5
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/esm/DayPicker.d.ts +2 -1
- package/dist/esm/DayPicker.js +3 -2
- package/dist/esm/DayPicker.js.map +1 -1
- package/dist/esm/UI.d.ts +13 -8
- package/dist/esm/UI.js +13 -8
- 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 +9 -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 +6 -2
- package/dist/esm/components/Chevron.js.map +1 -1
- package/dist/esm/components/Day.d.ts +4 -3
- package/dist/esm/components/Day.js +2 -2
- package/dist/esm/components/Day.js.map +1 -1
- package/dist/esm/components/DayWrapper.d.ts +2 -1
- package/dist/esm/components/DayWrapper.js +26 -21
- 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 +2 -2
- 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 +3 -4
- 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 +2 -2
- 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 +3 -4
- package/dist/esm/components/YearsDropdown.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/index.js +6 -2
- package/dist/esm/contexts/index.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/selection.d.ts +2 -1
- package/dist/esm/contexts/selection.js +12 -13
- 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 +5 -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/getFormatters.js +2 -2
- package/dist/esm/helpers/getFormatters.js.map +1 -1
- package/dist/esm/helpers/getFromToDate.js +2 -3
- 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/examples/ContainerAttributes.test.tsx +30 -0
- package/examples/ContainerAttributes.tsx +22 -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/CustomDay.tsx +16 -0
- package/examples/CustomDayContent.test.tsx +15 -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 +14 -0
- package/examples/FocusRecursive.test.tsx +21 -0
- package/examples/FocusRecursive.tsx +22 -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/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 +944 -0
- package/examples/__snapshots__/StylingCssModules.test.tsx.snap +464 -0
- package/examples/declarations.d.ts +4 -0
- package/examples/index.ts +58 -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 +2 -0
- package/src/UI.ts +13 -8
- package/src/components/Button.tsx +1 -1
- package/src/components/Calendar.test.tsx +4 -2
- package/src/components/Calendar.tsx +2 -0
- package/src/components/Chevron.tsx +2 -0
- package/src/components/Day.tsx +3 -2
- package/src/components/DayWrapper.tsx +9 -3
- 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 +7 -1
- package/src/components/Months.tsx +1 -0
- package/src/components/MonthsDropdown.tsx +1 -0
- 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 +2 -0
- package/src/components/Weekday.tsx +2 -0
- package/src/components/Weekdays.tsx +2 -0
- package/src/components/YearsDropdown.tsx +1 -0
- 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/index.tsx +1 -0
- package/src/contexts/modifiers.tsx +7 -5
- package/src/contexts/props.tsx +6 -1
- package/src/contexts/selection.tsx +1 -1
- 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 +2 -2
- package/src/helpers/getFormatters.tsx +2 -0
- 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/useControlledValue.test.ts +1 -2
- package/src/style.css +16 -5
- package/src/style.css.d.ts +37 -0
- package/src/style.module.css +354 -0
- package/src/style.module.css.d.ts +37 -0
- package/src/types.test.tsx +2 -0
- 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 +36 -0
- package/website/docs/using-daypicker/anatomy.mdx +11 -0
- package/website/docs/using-daypicker/customization.mdx +124 -0
- package/website/docs/using-daypicker/localization.mdx +178 -0
- package/website/docs/using-daypicker/navigation.mdx +98 -0
- package/website/docs/using-daypicker/selection-modes.mdx +210 -0
- package/website/docs/using-daypicker/styling.mdx +140 -0
- package/website/tsconfig.json +16 -0
- 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,3 +1,4 @@
|
|
|
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
|
|
@@ -9,4 +10,4 @@ import type { DayPickerProps, Mode } from "./types";
|
|
|
9
10
|
* @group Components
|
|
10
11
|
* @see http://daypicker.dev
|
|
11
12
|
*/
|
|
12
|
-
export declare function DayPicker<T extends Mode = "default">(props: DayPickerProps<T>):
|
|
13
|
+
export declare function DayPicker<T extends Mode = "default">(props: DayPickerProps<T>): React.JSX.Element;
|
package/dist/cjs/DayPicker.js
CHANGED
|
@@ -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.DayPicker = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
const Calendar_1 = require("./components/Calendar");
|
|
6
9
|
const contexts_1 = require("./contexts");
|
|
7
10
|
/**
|
|
@@ -15,7 +18,8 @@ const contexts_1 = require("./contexts");
|
|
|
15
18
|
* @see http://daypicker.dev
|
|
16
19
|
*/
|
|
17
20
|
function DayPicker(props) {
|
|
18
|
-
return (
|
|
21
|
+
return (react_1.default.createElement(contexts_1.ContextProviders, { ...props },
|
|
22
|
+
react_1.default.createElement(Calendar_1.Calendar, null)));
|
|
19
23
|
}
|
|
20
24
|
exports.DayPicker = DayPicker;
|
|
21
25
|
//# 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,yCAA8C;AAG9C;;;;;;;;;GASG;AACH,SAAgB,SAAS,CACvB,KAAwB;IAExB,OAAO,CACL,8BAAC,2BAAgB,OAAK,KAAK;QACzB,8BAAC,mBAAQ,OAAG,CACK,CACpB,CAAC;AACJ,CAAC;AARD,8BAQC"}
|
package/dist/cjs/UI.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The UI elements composing DayPicker.
|
|
3
|
+
*
|
|
4
|
+
* These elements are mapped to the components directory.
|
|
5
|
+
*/
|
|
1
6
|
/**
|
|
2
7
|
* The UI elements composing DayPicker.
|
|
3
8
|
*
|
|
@@ -10,12 +15,12 @@ export declare enum UI {
|
|
|
10
15
|
ButtonNext = "button_next",
|
|
11
16
|
/** The calendar element, the root of the component. */
|
|
12
17
|
Calendar = "calendar",
|
|
18
|
+
/** The Chevron SVG element used by navigation buttons and dropdowns. */
|
|
19
|
+
Chevron = "chevron",
|
|
13
20
|
/** The gridcell with the day's date. */
|
|
14
21
|
Day = "day",
|
|
15
22
|
/** The label of a caption. */
|
|
16
23
|
CaptionLabel = "caption_label",
|
|
17
|
-
/** The Chevron SVG element used by navigation buttons and dropdowns. */
|
|
18
|
-
Chevron = "chevron",
|
|
19
24
|
/** The container of the dropdown navigation.. */
|
|
20
25
|
DropdownNav = "dropdown_nav",
|
|
21
26
|
/** The dropdown used for years and months. */
|
|
@@ -24,22 +29,22 @@ export declare enum UI {
|
|
|
24
29
|
DropdownRoot = "dropdown_root",
|
|
25
30
|
/** The root element of the {@link Footer} component. */
|
|
26
31
|
Footer = "footer",
|
|
32
|
+
/** The month grid. */
|
|
33
|
+
Month = "month",
|
|
27
34
|
/** The caption of a month. */
|
|
28
35
|
MonthCaption = "month_caption",
|
|
29
36
|
/** The dropdown of months. */
|
|
30
37
|
MonthsDropdown = "months_dropdown",
|
|
31
38
|
/** Wrapper of the month grid. */
|
|
32
39
|
MonthWrapper = "month_wrapper",
|
|
33
|
-
/** The month grid. */
|
|
34
|
-
Month = "month",
|
|
35
|
-
/** The group of weeks in a month. */
|
|
36
|
-
Weeks = "weeks",
|
|
37
40
|
/** Container containing the months. */
|
|
38
41
|
Months = "months",
|
|
39
42
|
/** The navigation element. */
|
|
40
43
|
Nav = "nav",
|
|
41
44
|
/** The row in a week. */
|
|
42
45
|
Week = "week",
|
|
46
|
+
/** The group of weeks in a month. */
|
|
47
|
+
Weeks = "weeks",
|
|
43
48
|
/** The column's header with the weekday. */
|
|
44
49
|
Weekday = "weekday",
|
|
45
50
|
/** The row grouping the weekdays. */
|
|
@@ -75,9 +80,9 @@ export declare enum DayModifier {
|
|
|
75
80
|
/** Flags that can be applied to the {@link UI.Calendar} element. */
|
|
76
81
|
export declare enum CalendarFlag {
|
|
77
82
|
/** Assigned when the week numbers are show. */
|
|
78
|
-
hasWeekNumbers = "
|
|
83
|
+
hasWeekNumbers = "has_week_numbers",
|
|
79
84
|
/** Assigned when the weekdays are hidden. */
|
|
80
85
|
noWeekdays = "no_weekdays",
|
|
81
86
|
/** Assigned when the calendar has multiple months. */
|
|
82
|
-
hasMultipleMonths = "
|
|
87
|
+
hasMultipleMonths = "has_multiple_months"
|
|
83
88
|
}
|
package/dist/cjs/UI.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalendarFlag = exports.DayModifier = exports.UI = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The UI elements composing DayPicker.
|
|
6
|
+
*
|
|
7
|
+
* These elements are mapped to the components directory.
|
|
8
|
+
*/
|
|
4
9
|
/**
|
|
5
10
|
* The UI elements composing DayPicker.
|
|
6
11
|
*
|
|
@@ -14,12 +19,12 @@ var UI;
|
|
|
14
19
|
UI["ButtonNext"] = "button_next";
|
|
15
20
|
/** The calendar element, the root of the component. */
|
|
16
21
|
UI["Calendar"] = "calendar";
|
|
22
|
+
/** The Chevron SVG element used by navigation buttons and dropdowns. */
|
|
23
|
+
UI["Chevron"] = "chevron";
|
|
17
24
|
/** The gridcell with the day's date. */
|
|
18
25
|
UI["Day"] = "day";
|
|
19
26
|
/** The label of a caption. */
|
|
20
27
|
UI["CaptionLabel"] = "caption_label";
|
|
21
|
-
/** The Chevron SVG element used by navigation buttons and dropdowns. */
|
|
22
|
-
UI["Chevron"] = "chevron";
|
|
23
28
|
/** The container of the dropdown navigation.. */
|
|
24
29
|
UI["DropdownNav"] = "dropdown_nav";
|
|
25
30
|
/** The dropdown used for years and months. */
|
|
@@ -28,22 +33,22 @@ var UI;
|
|
|
28
33
|
UI["DropdownRoot"] = "dropdown_root";
|
|
29
34
|
/** The root element of the {@link Footer} component. */
|
|
30
35
|
UI["Footer"] = "footer";
|
|
36
|
+
/** The month grid. */
|
|
37
|
+
UI["Month"] = "month";
|
|
31
38
|
/** The caption of a month. */
|
|
32
39
|
UI["MonthCaption"] = "month_caption";
|
|
33
40
|
/** The dropdown of months. */
|
|
34
41
|
UI["MonthsDropdown"] = "months_dropdown";
|
|
35
42
|
/** Wrapper of the month grid. */
|
|
36
43
|
UI["MonthWrapper"] = "month_wrapper";
|
|
37
|
-
/** The month grid. */
|
|
38
|
-
UI["Month"] = "month";
|
|
39
|
-
/** The group of weeks in a month. */
|
|
40
|
-
UI["Weeks"] = "weeks";
|
|
41
44
|
/** Container containing the months. */
|
|
42
45
|
UI["Months"] = "months";
|
|
43
46
|
/** The navigation element. */
|
|
44
47
|
UI["Nav"] = "nav";
|
|
45
48
|
/** The row in a week. */
|
|
46
49
|
UI["Week"] = "week";
|
|
50
|
+
/** The group of weeks in a month. */
|
|
51
|
+
UI["Weeks"] = "weeks";
|
|
47
52
|
/** The column's header with the weekday. */
|
|
48
53
|
UI["Weekday"] = "weekday";
|
|
49
54
|
/** The row grouping the weekdays. */
|
|
@@ -81,10 +86,10 @@ var DayModifier;
|
|
|
81
86
|
var CalendarFlag;
|
|
82
87
|
(function (CalendarFlag) {
|
|
83
88
|
/** Assigned when the week numbers are show. */
|
|
84
|
-
CalendarFlag["hasWeekNumbers"] = "
|
|
89
|
+
CalendarFlag["hasWeekNumbers"] = "has_week_numbers";
|
|
85
90
|
/** Assigned when the weekdays are hidden. */
|
|
86
91
|
CalendarFlag["noWeekdays"] = "no_weekdays";
|
|
87
92
|
/** Assigned when the calendar has multiple months. */
|
|
88
|
-
CalendarFlag["hasMultipleMonths"] = "
|
|
93
|
+
CalendarFlag["hasMultipleMonths"] = "has_multiple_months";
|
|
89
94
|
})(CalendarFlag || (exports.CalendarFlag = CalendarFlag = {}));
|
|
90
95
|
//# 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":";;;AAAA;;;;GAIG;AACH,IAAY,EA6CX;AA7CD,WAAY,EAAE;IACZ,6CAA6C;IAC7C,wCAAkC,CAAA;IAClC,qCAAqC;IACrC,gCAA0B,CAAA;IAC1B,uDAAuD;IACvD,2BAAqB,CAAA;IACrB,wCAAwC;IACxC,iBAAW,CAAA;IACX,8BAA8B;IAC9B,oCAA8B,CAAA;IAC9B,
|
|
1
|
+
{"version":3,"file":"UI.js","sourceRoot":"","sources":["../../src/UI.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH;;;;GAIG;AACH,IAAY,EA6CX;AA7CD,WAAY,EAAE;IACZ,6CAA6C;IAC7C,wCAAkC,CAAA;IAClC,qC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AED,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"}
|
|
@@ -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,14 @@ 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] }, calendar.months.map((month, i) => (react_1.default.createElement(Month, { "aria-labelledby": id, key: i, index: i, month: month })))),
|
|
46
|
+
!hideNavigation && react_1.default.createElement(Nav, null),
|
|
47
|
+
footer && (react_1.default.createElement(Footer, { className: classNames[UI_1.UI.Footer], style: styles?.[UI_1.UI.Footer] }, footer))));
|
|
43
48
|
}
|
|
44
49
|
exports.Calendar = Calendar;
|
|
45
50
|
//# 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,cAA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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,IACjE,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,CAAC,cAAc,IAAI,8BAAC,GAAG,OAAG;QAC1B,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
|
/**
|
|
@@ -15,7 +18,11 @@ const props_1 = require("../contexts/props");
|
|
|
15
18
|
function Chevron(props) {
|
|
16
19
|
const { size = 24, orientation = "left" } = props;
|
|
17
20
|
const { classNames } = (0, props_1.useProps)();
|
|
18
|
-
return (
|
|
21
|
+
return (react_1.default.createElement("svg", { className: classNames[UI_1.UI.Chevron], width: size, height: size, viewBox: "0 0 24 24" },
|
|
22
|
+
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" })),
|
|
23
|
+
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" })),
|
|
24
|
+
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" })),
|
|
25
|
+
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
26
|
}
|
|
20
27
|
exports.Chevron = Chevron;
|
|
21
28
|
//# 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,8BAA2B;AAC3B,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,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAElC,OAAO,CACL,uCACE,SAAS,EAAE,UAAU,CAAC,OAAE,CAAC,OAAO,CAAC,EACjC,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;AA5BD,0BA4BC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
3
|
import type { CalendarDay } from "../classes";
|
|
3
4
|
import type { DayModifiers } from "../types";
|
|
4
5
|
/**
|
|
@@ -17,6 +18,6 @@ export declare function Day(props: {
|
|
|
17
18
|
/** HTML attributes for the gridcell. */
|
|
18
19
|
htmlAttributes: HTMLAttributes<HTMLElement>;
|
|
19
20
|
/** Children of the gridcell. */
|
|
20
|
-
children?:
|
|
21
|
-
}):
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}): React.JSX.Element;
|
|
22
23
|
export type DayProps = Parameters<typeof Day>[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.Day = void 0;
|
|
4
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
5
8
|
/**
|
|
6
9
|
* Render the gridcell of a day in the calendar.
|
|
7
10
|
*
|
|
@@ -12,7 +15,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
12
15
|
*/
|
|
13
16
|
function Day(props) {
|
|
14
17
|
const { children, htmlAttributes } = props;
|
|
15
|
-
return
|
|
18
|
+
return react_1.default.createElement("div", { ...htmlAttributes }, children);
|
|
16
19
|
}
|
|
17
20
|
exports.Day = Day;
|
|
18
21
|
//# 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;;;;;;;GAOG;AACH,SAAgB,GAAG,CAAC,KASnB;IACC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAC3C,OAAO,0CAAS,cAAc,IAAG,QAAQ,CAAO,CAAC;AACnD,CAAC;AAZD,kBAYC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { CalendarDay } from "../classes/CalendarDay";
|
|
2
3
|
/**
|
|
3
4
|
* Provides a `Day` the day state and the html attributes. Developers may use a
|
|
@@ -9,4 +10,4 @@ export declare function DayWrapper(props: {
|
|
|
9
10
|
"aria-colindex": number;
|
|
10
11
|
/** The day to be rendered in the gridcell. */
|
|
11
12
|
day: CalendarDay;
|
|
12
|
-
}):
|
|
13
|
+
}): React.JSX.Element;
|
|
@@ -1,9 +1,13 @@
|
|
|
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.DayWrapper = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const react_2 = require("react");
|
|
6
9
|
const UI_1 = require("../UI");
|
|
10
|
+
const calendar_1 = require("../contexts/calendar");
|
|
7
11
|
const focus_1 = require("../contexts/focus");
|
|
8
12
|
const modifiers_1 = require("../contexts/modifiers");
|
|
9
13
|
const props_1 = require("../contexts/props");
|
|
@@ -19,9 +23,9 @@ const Day_1 = require("./Day");
|
|
|
19
23
|
* @internal
|
|
20
24
|
*/
|
|
21
25
|
function DayWrapper(props) {
|
|
22
|
-
|
|
23
|
-
const cellRef = (0, react_1.useRef)(null);
|
|
26
|
+
const cellRef = (0, react_2.useRef)(null);
|
|
24
27
|
const { classNames, components, dir, formatters: { formatDay }, locale, mode, modifiersClassNames = {}, modifiersStyles = {}, onDayFocus, onDayBlur, onDayClick, onDayKeyDown, onDayKeyPress, onDayKeyUp, onDayMouseEnter, onDayMouseLeave, onDayPointerEnter, onDayPointerLeave, onDayTouchCancel, onDayTouchEnd, onDayTouchMove, onDayTouchStart, styles = {} } = (0, props_1.useProps)();
|
|
28
|
+
const { isInteractive } = (0, calendar_1.useCalendar)();
|
|
25
29
|
const { setSelected } = (0, selection_1.useSelection)();
|
|
26
30
|
const { getModifiers } = (0, modifiers_1.useModifiers)();
|
|
27
31
|
const { autoFocusTarget, focusedDay, focus, blur, focusDayBefore, focusDayAfter, focusWeekBefore, focusWeekAfter, focusMonthBefore, focusMonthAfter, focusYearBefore, focusYearAfter, focusStartOfWeek, focusEndOfWeek } = (0, focus_1.useFocus)();
|
|
@@ -36,45 +40,50 @@ function DayWrapper(props) {
|
|
|
36
40
|
if (modifiers.focusable) {
|
|
37
41
|
focus(props.day);
|
|
38
42
|
}
|
|
39
|
-
onDayClick
|
|
43
|
+
onDayClick?.(props.day.date, modifiers, e);
|
|
40
44
|
};
|
|
41
45
|
const onFocus = (e) => {
|
|
46
|
+
if (modifiers.disabled) {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
42
51
|
focus(props.day);
|
|
43
|
-
onDayFocus
|
|
52
|
+
onDayFocus?.(props.day.date, modifiers, e);
|
|
44
53
|
};
|
|
45
54
|
const onBlur = (e) => {
|
|
46
55
|
blur();
|
|
47
|
-
onDayBlur
|
|
56
|
+
onDayBlur?.(props.day.date, modifiers, e);
|
|
48
57
|
};
|
|
49
58
|
const onMouseEnter = (e) => {
|
|
50
|
-
onDayMouseEnter
|
|
59
|
+
onDayMouseEnter?.(props.day.date, modifiers, e);
|
|
51
60
|
};
|
|
52
61
|
const onMouseLeave = (e) => {
|
|
53
|
-
onDayMouseLeave
|
|
62
|
+
onDayMouseLeave?.(props.day.date, modifiers, e);
|
|
54
63
|
};
|
|
55
64
|
const onPointerEnter = (e) => {
|
|
56
|
-
onDayPointerEnter
|
|
65
|
+
onDayPointerEnter?.(props.day.date, modifiers, e);
|
|
57
66
|
};
|
|
58
67
|
const onPointerLeave = (e) => {
|
|
59
|
-
onDayPointerLeave
|
|
68
|
+
onDayPointerLeave?.(props.day.date, modifiers, e);
|
|
60
69
|
};
|
|
61
70
|
const onTouchCancel = (e) => {
|
|
62
|
-
onDayTouchCancel
|
|
71
|
+
onDayTouchCancel?.(props.day.date, modifiers, e);
|
|
63
72
|
};
|
|
64
73
|
const onTouchEnd = (e) => {
|
|
65
|
-
onDayTouchEnd
|
|
74
|
+
onDayTouchEnd?.(props.day.date, modifiers, e);
|
|
66
75
|
};
|
|
67
76
|
const onTouchMove = (e) => {
|
|
68
|
-
onDayTouchMove
|
|
77
|
+
onDayTouchMove?.(props.day.date, modifiers, e);
|
|
69
78
|
};
|
|
70
79
|
const onTouchStart = (e) => {
|
|
71
|
-
onDayTouchStart
|
|
80
|
+
onDayTouchStart?.(props.day.date, modifiers, e);
|
|
72
81
|
};
|
|
73
82
|
const onKeyUp = (e) => {
|
|
74
|
-
onDayKeyUp
|
|
83
|
+
onDayKeyUp?.(props.day.date, modifiers, e);
|
|
75
84
|
};
|
|
76
85
|
const onKeyPress = (e) => {
|
|
77
|
-
onDayKeyPress
|
|
86
|
+
onDayKeyPress?.(props.day.date, modifiers, e);
|
|
78
87
|
};
|
|
79
88
|
const onKeyDown = (e) => {
|
|
80
89
|
switch (e.key) {
|
|
@@ -125,11 +134,10 @@ function DayWrapper(props) {
|
|
|
125
134
|
focusEndOfWeek();
|
|
126
135
|
break;
|
|
127
136
|
}
|
|
128
|
-
onDayKeyDown
|
|
137
|
+
onDayKeyDown?.(props.day.date, modifiers, e);
|
|
129
138
|
};
|
|
130
|
-
const isAutoFocusTarget = Boolean(autoFocusTarget
|
|
131
|
-
const isFocused = Boolean(focusedDay
|
|
132
|
-
const isInteractive = mode !== "default" || Boolean(onDayClick);
|
|
139
|
+
const isAutoFocusTarget = Boolean(autoFocusTarget?.isEqualTo(props.day));
|
|
140
|
+
const isFocused = Boolean(focusedDay?.isEqualTo(props.day));
|
|
133
141
|
const style = (0, getStyleForModifiers_1.getStyleForModifiers)(modifiers, modifiersStyles, styles);
|
|
134
142
|
const classNameForModifiers = (0, getClassNamesForModifiers_1.getClassNamesForModifiers)(modifiers, modifiersClassNames, classNames);
|
|
135
143
|
const className = [classNames[UI_1.UI.Day], ...classNameForModifiers];
|
|
@@ -161,7 +169,7 @@ function DayWrapper(props) {
|
|
|
161
169
|
onTouchStart,
|
|
162
170
|
ref: cellRef
|
|
163
171
|
};
|
|
164
|
-
(0,
|
|
172
|
+
(0, react_2.useEffect)(() => {
|
|
165
173
|
if (!cellRef.current)
|
|
166
174
|
return; // no element to focus
|
|
167
175
|
if (!focusedDay)
|
|
@@ -172,8 +180,8 @@ function DayWrapper(props) {
|
|
|
172
180
|
return; // cannot focus
|
|
173
181
|
cellRef.current.focus();
|
|
174
182
|
}, [focusedDay, modifiers.disabled, modifiers.hidden, props.day]);
|
|
175
|
-
const Day =
|
|
176
|
-
return (
|
|
183
|
+
const Day = components?.Day ?? Day_1.Day;
|
|
184
|
+
return (react_1.default.createElement(Day, { day: props.day, modifiers: modifiers, htmlAttributes: htmlAttributes }, formatDay(props.day.date, { locale })));
|
|
177
185
|
}
|
|
178
186
|
exports.DayWrapper = DayWrapper;
|
|
179
187
|
//# sourceMappingURL=DayWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DayWrapper.js","sourceRoot":"","sources":["../../../src/components/DayWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DayWrapper.js","sourceRoot":"","sources":["../../../src/components/DayWrapper.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iCAQe;AAEf,8BAAwC;AAExC,mDAAmD;AACnD,6CAA6C;AAC7C,qDAAqD;AACrD,6CAA6C;AAC7C,qDAAqD;AACrD,kDAA+C;AAC/C,oFAAiF;AACjF,0EAAuE;AAEvE,+BAA0C;AAE1C;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,KAI1B;IACC,MAAM,OAAO,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAE7C,MAAM,EACJ,UAAU,EACV,UAAU,EACV,GAAG,EACH,UAAU,EAAE,EAAE,SAAS,EAAE,EACzB,MAAM,EACN,IAAI,EACJ,mBAAmB,GAAG,EAAE,EACxB,eAAe,GAAG,EAAE,EACpB,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,aAAa,EACb,UAAU,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,MAAM,GAAG,EAAE,EACZ,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAEf,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,sBAAW,GAAE,CAAC;IACxC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,wBAAY,GAAE,CAAC;IACvC,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,wBAAY,GAAE,CAAC;IAExC,MAAM,EACJ,eAAe,EACf,UAAU,EACV,KAAK,EACL,IAAI,EACJ,cAAc,EACd,aAAa,EACb,eAA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E,OAAO,CAAC,eAAe;QAEnE,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAElE,MAAM,GAAG,GAAG,UAAU,EAAE,GAAG,IAAI,SAAU,CAAC;IAE1C,OAAO,CACL,8BAAC,GAAG,IAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,IACtE,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAClC,CACP,CAAC;AACJ,CAAC;AAnOD,gCAmOC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SelectHTMLAttributes } from "react";
|
|
1
|
+
import React, { SelectHTMLAttributes } from "react";
|
|
2
2
|
/** An option to use in the dropdown. Maps to the `<option>` HTML element. */
|
|
3
3
|
export type DropdownOption = [
|
|
4
4
|
/** The value of the option. */
|
|
@@ -17,5 +17,5 @@ export type DropdownOption = [
|
|
|
17
17
|
export declare function Dropdown(props: {
|
|
18
18
|
options?: DropdownOption[] | undefined;
|
|
19
19
|
rootClassName?: string;
|
|
20
|
-
} & Omit<SelectHTMLAttributes<HTMLSelectElement>, "children">):
|
|
20
|
+
} & Omit<SelectHTMLAttributes<HTMLSelectElement>, "children">): React.JSX.Element;
|
|
21
21
|
export type DropdownProps = Parameters<typeof Dropdown>[0];
|