@mui/x-date-pickers 7.15.0 → 7.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdapterDateFns/AdapterDateFns.js +1 -1
- package/AdapterDateFns/index.js +1 -1
- package/AdapterDateFnsBase/index.js +1 -1
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -1
- package/AdapterDateFnsJalali/index.js +1 -1
- package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -1
- package/AdapterDateFnsJalaliV3/index.js +1 -1
- package/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -1
- package/AdapterDateFnsV3/index.js +1 -1
- package/AdapterDayjs/AdapterDayjs.js +5 -6
- package/AdapterDayjs/index.js +1 -1
- package/AdapterLuxon/AdapterLuxon.js +4 -5
- package/AdapterLuxon/index.js +1 -1
- package/AdapterMoment/AdapterMoment.js +4 -5
- package/AdapterMoment/index.js +1 -1
- package/AdapterMomentHijri/AdapterMomentHijri.js +1 -1
- package/AdapterMomentHijri/index.js +1 -1
- package/AdapterMomentJalaali/AdapterMomentJalaali.js +1 -1
- package/AdapterMomentJalaali/index.js +1 -1
- package/CHANGELOG.md +185 -1
- package/DateCalendar/DateCalendar.js +18 -16
- package/DateCalendar/DayCalendar.js +9 -10
- package/DateCalendar/PickersFadeTransitionGroup.js +1 -1
- package/DateCalendar/PickersSlideTransition.js +1 -1
- package/DateCalendar/index.js +5 -5
- package/DateCalendar/useCalendarState.js +6 -4
- package/DateCalendar/useIsDateDisabled.d.ts +4 -3
- package/DateCalendar/useIsDateDisabled.js +6 -4
- package/DateField/DateField.js +15 -11
- package/DateField/DateField.types.d.ts +7 -2
- package/DateField/index.d.ts +1 -1
- package/DateField/index.js +2 -2
- package/DateField/useDateField.d.ts +1 -1
- package/DateField/useDateField.js +8 -6
- package/DatePicker/DatePicker.js +16 -14
- package/DatePicker/DatePickerToolbar.js +7 -5
- package/DatePicker/index.js +3 -3
- package/DatePicker/shared.js +4 -4
- package/DateTimeField/DateTimeField.js +15 -11
- package/DateTimeField/DateTimeField.types.d.ts +7 -2
- package/DateTimeField/index.d.ts +1 -1
- package/DateTimeField/index.js +2 -2
- package/DateTimeField/useDateTimeField.d.ts +1 -1
- package/DateTimeField/useDateTimeField.js +8 -6
- package/DateTimePicker/DateTimePicker.js +16 -14
- package/DateTimePicker/DateTimePickerTabs.js +6 -4
- package/DateTimePicker/DateTimePickerToolbar.js +13 -11
- package/DateTimePicker/index.js +5 -5
- package/DateTimePicker/shared.js +5 -5
- package/DayCalendarSkeleton/DayCalendarSkeleton.js +4 -2
- package/DayCalendarSkeleton/index.js +2 -2
- package/DesktopDatePicker/DesktopDatePicker.js +30 -23
- package/DesktopDatePicker/index.js +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +37 -30
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/DesktopDateTimePicker/index.js +2 -2
- package/DesktopTimePicker/DesktopTimePicker.js +31 -24
- package/DesktopTimePicker/index.js +1 -1
- package/DigitalClock/DigitalClock.js +13 -11
- package/DigitalClock/index.js +2 -2
- package/LocalizationProvider/LocalizationProvider.js +2 -0
- package/LocalizationProvider/index.js +1 -1
- package/MobileDatePicker/MobileDatePicker.js +29 -22
- package/MobileDatePicker/index.js +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +30 -23
- package/MobileDateTimePicker/index.js +1 -1
- package/MobileTimePicker/MobileTimePicker.js +29 -22
- package/MobileTimePicker/index.js +1 -1
- package/MonthCalendar/MonthCalendar.js +10 -8
- package/MonthCalendar/PickersMonth.js +1 -1
- package/MonthCalendar/index.js +3 -3
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +19 -17
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -2
- package/MultiSectionDigitalClock/index.js +3 -3
- package/PickersActionBar/PickersActionBar.js +3 -1
- package/PickersActionBar/index.js +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.js +9 -7
- package/PickersCalendarHeader/index.js +2 -2
- package/PickersDay/PickersDay.js +5 -3
- package/PickersDay/index.js +2 -2
- package/PickersLayout/PickersLayout.js +4 -2
- package/PickersLayout/index.js +3 -3
- package/PickersLayout/usePickerLayout.js +5 -3
- package/PickersSectionList/PickersSectionList.js +3 -1
- package/PickersSectionList/index.js +2 -2
- package/PickersShortcuts/PickersShortcuts.js +3 -1
- package/PickersShortcuts/index.js +1 -1
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +3 -3
- package/PickersTextField/PickersFilledInput/index.js +2 -2
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +1 -1
- package/PickersTextField/PickersInput/PickersInput.js +3 -3
- package/PickersTextField/PickersInput/index.js +2 -2
- package/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.js +2 -2
- package/PickersTextField/PickersInputBase/index.js +2 -2
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +4 -4
- package/PickersTextField/PickersOutlinedInput/index.js +2 -2
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +1 -1
- package/PickersTextField/PickersTextField.js +6 -4
- package/PickersTextField/index.js +6 -6
- package/StaticDatePicker/StaticDatePicker.js +18 -16
- package/StaticDatePicker/index.js +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +19 -17
- package/StaticDateTimePicker/index.js +1 -1
- package/StaticTimePicker/StaticTimePicker.js +18 -16
- package/StaticTimePicker/index.js +1 -1
- package/TimeClock/Clock.js +7 -7
- package/TimeClock/ClockNumber.js +2 -2
- package/TimeClock/ClockNumbers.js +2 -2
- package/TimeClock/ClockPointer.js +2 -2
- package/TimeClock/TimeClock.js +16 -14
- package/TimeClock/index.js +5 -5
- package/TimeField/TimeField.js +15 -11
- package/TimeField/TimeField.types.d.ts +7 -2
- package/TimeField/index.d.ts +1 -1
- package/TimeField/index.js +2 -2
- package/TimeField/useTimeField.d.ts +1 -1
- package/TimeField/useTimeField.js +8 -6
- package/TimePicker/TimePicker.js +16 -14
- package/TimePicker/TimePickerToolbar.js +11 -9
- package/TimePicker/index.js +3 -3
- package/TimePicker/shared.js +3 -3
- package/YearCalendar/PickersYear.js +1 -1
- package/YearCalendar/YearCalendar.js +10 -8
- package/YearCalendar/index.js +3 -3
- package/dateViewRenderers/dateViewRenderers.js +2 -2
- package/dateViewRenderers/index.js +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +3 -2
- package/hooks/useClearableField.js +4 -2
- package/hooks/usePickersTranslations.js +3 -1
- package/hooks/useSplitFieldProps.d.ts +19 -0
- package/hooks/useSplitFieldProps.js +43 -0
- package/icons/index.js +8 -8
- package/index.d.ts +1 -0
- package/index.js +39 -38
- package/internals/components/PickerViewRoot/PickerViewRoot.js +1 -1
- package/internals/components/PickerViewRoot/index.js +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
- package/internals/components/PickersArrowSwitcher/index.js +2 -2
- package/internals/components/PickersModalDialog.js +1 -1
- package/internals/components/PickersPopper.js +3 -3
- package/internals/components/PickersToolbar.js +1 -1
- package/internals/components/PickersToolbarButton.js +2 -2
- package/internals/components/PickersToolbarText.js +1 -1
- package/internals/demo/DemoContainer.js +3 -3
- package/internals/demo/index.js +1 -1
- package/internals/hooks/date-helpers-hooks.js +2 -2
- package/internals/hooks/defaultizedFieldProps.js +2 -2
- package/internals/hooks/useClockReferenceDate.js +3 -3
- package/internals/hooks/useDesktopPicker/index.js +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +16 -8
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +6 -3
- package/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/internals/hooks/useField/index.js +2 -2
- package/internals/hooks/useField/useField.js +17 -12
- package/internals/hooks/useField/useField.types.d.ts +6 -22
- package/internals/hooks/useField/useField.utils.js +1 -1
- package/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
- package/internals/hooks/useField/useFieldState.js +8 -10
- package/internals/hooks/useField/useFieldV6TextField.js +2 -2
- package/internals/hooks/useField/useFieldV7TextField.js +4 -4
- package/internals/hooks/useIsLandscape.js +1 -1
- package/internals/hooks/useMobilePicker/index.js +1 -1
- package/internals/hooks/useMobilePicker/useMobilePicker.js +6 -8
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +2 -2
- package/internals/hooks/usePicker/index.js +1 -1
- package/internals/hooks/usePicker/usePicker.d.ts +1 -2
- package/internals/hooks/usePicker/usePicker.js +4 -4
- package/internals/hooks/usePicker/usePickerLayoutProps.js +1 -1
- package/internals/hooks/usePicker/usePickerValue.d.ts +1 -2
- package/internals/hooks/usePicker/usePickerValue.js +15 -19
- package/internals/hooks/usePicker/usePickerValue.types.d.ts +8 -19
- package/internals/hooks/usePicker/usePickerViews.js +2 -2
- package/internals/hooks/useStaticPicker/index.js +1 -1
- package/internals/hooks/useStaticPicker/useStaticPicker.js +4 -4
- package/internals/hooks/useUtils.js +2 -2
- package/internals/hooks/useValueWithTimezone.js +1 -1
- package/internals/hooks/useViews.d.ts +1 -1
- package/internals/index.d.ts +0 -8
- package/internals/index.js +29 -36
- package/internals/models/index.js +2 -2
- package/internals/utils/date-time-utils.js +2 -2
- package/internals/utils/date-utils.js +1 -1
- package/internals/utils/getDefaultReferenceDate.js +2 -2
- package/internals/utils/time-utils.js +1 -1
- package/internals/utils/valueManagers.js +3 -3
- package/locales/beBY.d.ts +3 -3
- package/locales/beBY.js +5 -5
- package/locales/caES.d.ts +3 -3
- package/locales/caES.js +4 -4
- package/locales/csCZ.d.ts +3 -3
- package/locales/csCZ.js +5 -5
- package/locales/daDK.d.ts +3 -3
- package/locales/daDK.js +4 -4
- package/locales/deDE.d.ts +3 -3
- package/locales/deDE.js +4 -4
- package/locales/elGR.d.ts +3 -3
- package/locales/elGR.js +5 -5
- package/locales/enUS.d.ts +3 -3
- package/locales/enUS.js +5 -5
- package/locales/esES.d.ts +3 -3
- package/locales/esES.js +4 -4
- package/locales/eu.d.ts +3 -3
- package/locales/eu.js +4 -4
- package/locales/faIR.d.ts +3 -3
- package/locales/faIR.js +4 -4
- package/locales/fiFI.d.ts +3 -3
- package/locales/fiFI.js +4 -4
- package/locales/frFR.d.ts +3 -3
- package/locales/frFR.js +4 -4
- package/locales/heIL.d.ts +3 -3
- package/locales/heIL.js +4 -4
- package/locales/huHU.d.ts +3 -3
- package/locales/huHU.js +4 -4
- package/locales/index.js +36 -36
- package/locales/isIS.d.ts +3 -3
- package/locales/isIS.js +5 -5
- package/locales/itIT.d.ts +3 -3
- package/locales/itIT.js +4 -4
- package/locales/jaJP.d.ts +3 -3
- package/locales/jaJP.js +4 -4
- package/locales/koKR.d.ts +3 -3
- package/locales/koKR.js +4 -4
- package/locales/kzKZ.d.ts +3 -3
- package/locales/kzKZ.js +5 -5
- package/locales/mk.d.ts +3 -3
- package/locales/mk.js +4 -4
- package/locales/nbNO.d.ts +3 -3
- package/locales/nbNO.js +5 -5
- package/locales/nlNL.d.ts +3 -3
- package/locales/nlNL.js +4 -4
- package/locales/nnNO.d.ts +3 -3
- package/locales/nnNO.js +4 -4
- package/locales/plPL.d.ts +3 -3
- package/locales/plPL.js +5 -5
- package/locales/ptBR.d.ts +3 -3
- package/locales/ptBR.js +5 -5
- package/locales/roRO.d.ts +3 -3
- package/locales/roRO.js +4 -4
- package/locales/ruRU.d.ts +3 -3
- package/locales/ruRU.js +4 -4
- package/locales/skSK.d.ts +3 -3
- package/locales/skSK.js +5 -5
- package/locales/svSE.d.ts +3 -3
- package/locales/svSE.js +4 -4
- package/locales/trTR.d.ts +3 -3
- package/locales/trTR.js +5 -5
- package/locales/ukUA.d.ts +3 -3
- package/locales/ukUA.js +4 -4
- package/locales/urPK.d.ts +3 -3
- package/locales/urPK.js +5 -5
- package/locales/utils/getPickersLocalization.d.ts +10 -3
- package/locales/utils/getPickersLocalization.js +13 -0
- package/locales/utils/pickersLocaleTextApi.d.ts +27 -3
- package/locales/viVN.d.ts +3 -3
- package/locales/viVN.js +4 -4
- package/locales/zhCN.d.ts +3 -3
- package/locales/zhCN.js +4 -4
- package/locales/zhHK.d.ts +3 -3
- package/locales/zhHK.js +4 -4
- package/models/index.d.ts +1 -0
- package/models/index.js +10 -7
- package/models/validation.d.ts +13 -0
- package/modern/AdapterDateFns/AdapterDateFns.js +1 -1
- package/modern/AdapterDateFns/index.js +1 -1
- package/modern/AdapterDateFnsBase/index.js +1 -1
- package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -1
- package/modern/AdapterDateFnsJalali/index.js +1 -1
- package/modern/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -1
- package/modern/AdapterDateFnsJalaliV3/index.js +1 -1
- package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -1
- package/modern/AdapterDateFnsV3/index.js +1 -1
- package/modern/AdapterDayjs/AdapterDayjs.js +5 -6
- package/modern/AdapterDayjs/index.js +1 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +4 -5
- package/modern/AdapterLuxon/index.js +1 -1
- package/modern/AdapterMoment/AdapterMoment.js +4 -5
- package/modern/AdapterMoment/index.js +1 -1
- package/modern/AdapterMomentHijri/AdapterMomentHijri.js +1 -1
- package/modern/AdapterMomentHijri/index.js +1 -1
- package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +1 -1
- package/modern/AdapterMomentJalaali/index.js +1 -1
- package/modern/DateCalendar/DateCalendar.js +18 -16
- package/modern/DateCalendar/DayCalendar.js +9 -10
- package/modern/DateCalendar/PickersFadeTransitionGroup.js +1 -1
- package/modern/DateCalendar/PickersSlideTransition.js +1 -1
- package/modern/DateCalendar/index.js +5 -5
- package/modern/DateCalendar/useCalendarState.js +6 -4
- package/modern/DateCalendar/useIsDateDisabled.js +6 -4
- package/modern/DateField/DateField.js +15 -11
- package/modern/DateField/index.js +2 -2
- package/modern/DateField/useDateField.js +8 -6
- package/modern/DatePicker/DatePicker.js +16 -14
- package/modern/DatePicker/DatePickerToolbar.js +7 -5
- package/modern/DatePicker/index.js +3 -3
- package/modern/DatePicker/shared.js +4 -4
- package/modern/DateTimeField/DateTimeField.js +15 -11
- package/modern/DateTimeField/index.js +2 -2
- package/modern/DateTimeField/useDateTimeField.js +8 -6
- package/modern/DateTimePicker/DateTimePicker.js +16 -14
- package/modern/DateTimePicker/DateTimePickerTabs.js +6 -4
- package/modern/DateTimePicker/DateTimePickerToolbar.js +13 -11
- package/modern/DateTimePicker/index.js +5 -5
- package/modern/DateTimePicker/shared.js +5 -5
- package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +4 -2
- package/modern/DayCalendarSkeleton/index.js +2 -2
- package/modern/DesktopDatePicker/DesktopDatePicker.js +30 -23
- package/modern/DesktopDatePicker/index.js +1 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +37 -30
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/modern/DesktopDateTimePicker/index.js +2 -2
- package/modern/DesktopTimePicker/DesktopTimePicker.js +31 -24
- package/modern/DesktopTimePicker/index.js +1 -1
- package/modern/DigitalClock/DigitalClock.js +13 -11
- package/modern/DigitalClock/index.js +2 -2
- package/modern/LocalizationProvider/LocalizationProvider.js +2 -0
- package/modern/LocalizationProvider/index.js +1 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +29 -22
- package/modern/MobileDatePicker/index.js +1 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +30 -23
- package/modern/MobileDateTimePicker/index.js +1 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +29 -22
- package/modern/MobileTimePicker/index.js +1 -1
- package/modern/MonthCalendar/MonthCalendar.js +10 -8
- package/modern/MonthCalendar/PickersMonth.js +1 -1
- package/modern/MonthCalendar/index.js +3 -3
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +19 -17
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -2
- package/modern/MultiSectionDigitalClock/index.js +3 -3
- package/modern/PickersActionBar/PickersActionBar.js +3 -1
- package/modern/PickersActionBar/index.js +1 -1
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +9 -7
- package/modern/PickersCalendarHeader/index.js +2 -2
- package/modern/PickersDay/PickersDay.js +5 -3
- package/modern/PickersDay/index.js +2 -2
- package/modern/PickersLayout/PickersLayout.js +4 -2
- package/modern/PickersLayout/index.js +3 -3
- package/modern/PickersLayout/usePickerLayout.js +5 -3
- package/modern/PickersSectionList/PickersSectionList.js +3 -1
- package/modern/PickersSectionList/index.js +2 -2
- package/modern/PickersShortcuts/PickersShortcuts.js +3 -1
- package/modern/PickersShortcuts/index.js +1 -1
- package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +3 -3
- package/modern/PickersTextField/PickersFilledInput/index.js +2 -2
- package/modern/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +1 -1
- package/modern/PickersTextField/PickersInput/PickersInput.js +3 -3
- package/modern/PickersTextField/PickersInput/index.js +2 -2
- package/modern/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +2 -2
- package/modern/PickersTextField/PickersInputBase/index.js +2 -2
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +4 -4
- package/modern/PickersTextField/PickersOutlinedInput/index.js +2 -2
- package/modern/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +1 -1
- package/modern/PickersTextField/PickersTextField.js +6 -4
- package/modern/PickersTextField/index.js +6 -6
- package/modern/StaticDatePicker/StaticDatePicker.js +18 -16
- package/modern/StaticDatePicker/index.js +1 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +19 -17
- package/modern/StaticDateTimePicker/index.js +1 -1
- package/modern/StaticTimePicker/StaticTimePicker.js +18 -16
- package/modern/StaticTimePicker/index.js +1 -1
- package/modern/TimeClock/Clock.js +7 -7
- package/modern/TimeClock/ClockNumber.js +2 -2
- package/modern/TimeClock/ClockNumbers.js +2 -2
- package/modern/TimeClock/ClockPointer.js +2 -2
- package/modern/TimeClock/TimeClock.js +16 -14
- package/modern/TimeClock/index.js +5 -5
- package/modern/TimeField/TimeField.js +15 -11
- package/modern/TimeField/index.js +2 -2
- package/modern/TimeField/useTimeField.js +8 -6
- package/modern/TimePicker/TimePicker.js +16 -14
- package/modern/TimePicker/TimePickerToolbar.js +11 -9
- package/modern/TimePicker/index.js +3 -3
- package/modern/TimePicker/shared.js +3 -3
- package/modern/YearCalendar/PickersYear.js +1 -1
- package/modern/YearCalendar/YearCalendar.js +10 -8
- package/modern/YearCalendar/index.js +3 -3
- package/modern/dateViewRenderers/dateViewRenderers.js +2 -2
- package/modern/dateViewRenderers/index.js +1 -1
- package/modern/hooks/index.js +3 -2
- package/modern/hooks/useClearableField.js +4 -2
- package/modern/hooks/usePickersTranslations.js +3 -1
- package/modern/hooks/useSplitFieldProps.js +43 -0
- package/modern/icons/index.js +8 -8
- package/modern/index.js +39 -38
- package/modern/internals/components/PickerViewRoot/PickerViewRoot.js +1 -1
- package/modern/internals/components/PickerViewRoot/index.js +1 -1
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
- package/modern/internals/components/PickersArrowSwitcher/index.js +2 -2
- package/modern/internals/components/PickersModalDialog.js +1 -1
- package/modern/internals/components/PickersPopper.js +3 -3
- package/modern/internals/components/PickersToolbar.js +1 -1
- package/modern/internals/components/PickersToolbarButton.js +2 -2
- package/modern/internals/components/PickersToolbarText.js +1 -1
- package/modern/internals/demo/DemoContainer.js +3 -3
- package/modern/internals/demo/index.js +1 -1
- package/modern/internals/hooks/date-helpers-hooks.js +2 -2
- package/modern/internals/hooks/defaultizedFieldProps.js +2 -2
- package/modern/internals/hooks/useClockReferenceDate.js +3 -3
- package/modern/internals/hooks/useDesktopPicker/index.js +1 -1
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +16 -8
- package/modern/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/modern/internals/hooks/useField/index.js +2 -2
- package/modern/internals/hooks/useField/useField.js +17 -12
- package/modern/internals/hooks/useField/useField.utils.js +1 -1
- package/modern/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
- package/modern/internals/hooks/useField/useFieldState.js +8 -10
- package/modern/internals/hooks/useField/useFieldV6TextField.js +2 -2
- package/modern/internals/hooks/useField/useFieldV7TextField.js +4 -4
- package/modern/internals/hooks/useIsLandscape.js +1 -1
- package/modern/internals/hooks/useMobilePicker/index.js +1 -1
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +6 -8
- package/modern/internals/hooks/usePicker/index.js +1 -1
- package/modern/internals/hooks/usePicker/usePicker.js +4 -4
- package/modern/internals/hooks/usePicker/usePickerLayoutProps.js +1 -1
- package/modern/internals/hooks/usePicker/usePickerValue.js +15 -19
- package/modern/internals/hooks/usePicker/usePickerViews.js +2 -2
- package/modern/internals/hooks/useStaticPicker/index.js +1 -1
- package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +4 -4
- package/modern/internals/hooks/useUtils.js +2 -2
- package/modern/internals/hooks/useValueWithTimezone.js +1 -1
- package/modern/internals/index.js +29 -36
- package/modern/internals/models/index.js +2 -2
- package/modern/internals/utils/date-time-utils.js +2 -2
- package/modern/internals/utils/date-utils.js +1 -1
- package/modern/internals/utils/getDefaultReferenceDate.js +2 -2
- package/modern/internals/utils/time-utils.js +1 -1
- package/modern/internals/utils/valueManagers.js +3 -3
- package/modern/locales/beBY.js +5 -5
- package/modern/locales/caES.js +4 -4
- package/modern/locales/csCZ.js +5 -5
- package/modern/locales/daDK.js +4 -4
- package/modern/locales/deDE.js +4 -4
- package/modern/locales/elGR.js +5 -5
- package/modern/locales/enUS.js +5 -5
- package/modern/locales/esES.js +4 -4
- package/modern/locales/eu.js +4 -4
- package/modern/locales/faIR.js +4 -4
- package/modern/locales/fiFI.js +4 -4
- package/modern/locales/frFR.js +4 -4
- package/modern/locales/heIL.js +4 -4
- package/modern/locales/huHU.js +4 -4
- package/modern/locales/index.js +36 -36
- package/modern/locales/isIS.js +5 -5
- package/modern/locales/itIT.js +4 -4
- package/modern/locales/jaJP.js +4 -4
- package/modern/locales/koKR.js +4 -4
- package/modern/locales/kzKZ.js +5 -5
- package/modern/locales/mk.js +4 -4
- package/modern/locales/nbNO.js +5 -5
- package/modern/locales/nlNL.js +4 -4
- package/modern/locales/nnNO.js +4 -4
- package/modern/locales/plPL.js +5 -5
- package/modern/locales/ptBR.js +5 -5
- package/modern/locales/roRO.js +4 -4
- package/modern/locales/ruRU.js +4 -4
- package/modern/locales/skSK.js +5 -5
- package/modern/locales/svSE.js +4 -4
- package/modern/locales/trTR.js +5 -5
- package/modern/locales/ukUA.js +4 -4
- package/modern/locales/urPK.js +5 -5
- package/modern/locales/utils/getPickersLocalization.js +13 -0
- package/modern/locales/viVN.js +4 -4
- package/modern/locales/zhCN.js +4 -4
- package/modern/locales/zhHK.js +4 -4
- package/modern/models/index.js +10 -7
- package/modern/themeAugmentation/index.js +0 -3
- package/modern/timeViewRenderers/index.js +1 -1
- package/modern/timeViewRenderers/timeViewRenderers.js +4 -4
- package/modern/validation/index.js +5 -0
- package/modern/validation/useValidation.js +54 -0
- package/modern/{internals/utils/validation → validation}/validateDate.js +6 -4
- package/modern/validation/validateDateTime.js +26 -0
- package/{internals/utils → modern}/validation/validateTime.js +6 -4
- package/node/AdapterDateFns/AdapterDateFns.js +1 -1
- package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -1
- package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -1
- package/node/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -1
- package/node/AdapterDayjs/AdapterDayjs.js +6 -7
- package/node/AdapterLuxon/AdapterLuxon.js +5 -6
- package/node/AdapterMoment/AdapterMoment.js +5 -6
- package/node/AdapterMomentHijri/AdapterMomentHijri.js +1 -1
- package/node/AdapterMomentJalaali/AdapterMomentJalaali.js +1 -1
- package/node/DateCalendar/DateCalendar.js +4 -4
- package/node/DateCalendar/DayCalendar.js +3 -5
- package/node/DateCalendar/PickersFadeTransitionGroup.js +2 -3
- package/node/DateCalendar/PickersSlideTransition.js +2 -3
- package/node/DateCalendar/useCalendarState.js +3 -3
- package/node/DateCalendar/useIsDateDisabled.js +6 -6
- package/node/DateField/DateField.js +12 -10
- package/node/DateField/useDateField.js +5 -4
- package/node/DatePicker/DatePicker.js +14 -14
- package/node/DatePicker/DatePickerToolbar.js +3 -3
- package/node/DatePicker/shared.js +2 -3
- package/node/DateTimeField/DateTimeField.js +12 -10
- package/node/DateTimeField/useDateTimeField.js +5 -4
- package/node/DateTimePicker/DateTimePicker.js +14 -14
- package/node/DateTimePicker/DateTimePickerTabs.js +3 -3
- package/node/DateTimePicker/DateTimePickerToolbar.js +3 -3
- package/node/DateTimePicker/shared.js +2 -3
- package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +3 -3
- package/node/DesktopDatePicker/DesktopDatePicker.js +24 -19
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +24 -19
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +2 -3
- package/node/DesktopTimePicker/DesktopTimePicker.js +24 -19
- package/node/DigitalClock/DigitalClock.js +4 -4
- package/node/DigitalClock/digitalClockClasses.js +1 -1
- package/node/LocalizationProvider/LocalizationProvider.js +3 -3
- package/node/MobileDatePicker/MobileDatePicker.js +24 -19
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +24 -19
- package/node/MobileTimePicker/MobileTimePicker.js +24 -19
- package/node/MonthCalendar/MonthCalendar.js +3 -3
- package/node/MonthCalendar/PickersMonth.js +2 -3
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -7
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -3
- package/node/MultiSectionDigitalClock/multiSectionDigitalClockClasses.js +1 -1
- package/node/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +1 -1
- package/node/PickersActionBar/PickersActionBar.js +3 -3
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
- package/node/PickersDay/PickersDay.js +3 -3
- package/node/PickersLayout/PickersLayout.js +3 -3
- package/node/PickersLayout/index.js +1 -1
- package/node/PickersLayout/pickersLayoutClasses.js +1 -1
- package/node/PickersLayout/usePickerLayout.js +3 -3
- package/node/PickersSectionList/PickersSectionList.js +3 -3
- package/node/PickersSectionList/pickersSectionListClasses.js +1 -1
- package/node/PickersShortcuts/PickersShortcuts.js +3 -3
- package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +2 -3
- package/node/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +1 -1
- package/node/PickersTextField/PickersInput/PickersInput.js +2 -3
- package/node/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/node/PickersTextField/PickersInputBase/PickersInputBase.js +2 -3
- package/node/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +1 -1
- package/node/PickersTextField/PickersOutlinedInput/Outline.js +2 -3
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +2 -3
- package/node/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +1 -1
- package/node/PickersTextField/PickersTextField.js +3 -3
- package/node/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/node/StaticDatePicker/StaticDatePicker.js +16 -16
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +16 -16
- package/node/StaticTimePicker/StaticTimePicker.js +16 -16
- package/node/TimeClock/Clock.js +3 -4
- package/node/TimeClock/ClockNumber.js +2 -3
- package/node/TimeClock/ClockNumbers.js +2 -3
- package/node/TimeClock/ClockPointer.js +2 -3
- package/node/TimeClock/TimeClock.js +4 -4
- package/node/TimeField/TimeField.js +12 -10
- package/node/TimeField/useTimeField.js +5 -4
- package/node/TimePicker/TimePicker.js +14 -14
- package/node/TimePicker/TimePickerToolbar.js +3 -3
- package/node/TimePicker/shared.js +2 -3
- package/node/YearCalendar/PickersYear.js +2 -3
- package/node/YearCalendar/YearCalendar.js +3 -3
- package/node/dateViewRenderers/dateViewRenderers.js +1 -2
- package/node/hooks/index.js +8 -1
- package/node/hooks/useClearableField.js +3 -3
- package/node/hooks/usePickersTranslations.js +1 -0
- package/node/hooks/useSplitFieldProps.js +51 -0
- package/node/icons/index.js +9 -10
- package/node/index.js +13 -1
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -3
- package/node/internals/components/PickersModalDialog.js +2 -3
- package/node/internals/components/PickersPopper.js +2 -3
- package/node/internals/components/PickersToolbar.js +2 -3
- package/node/internals/components/PickersToolbarButton.js +2 -3
- package/node/internals/components/PickersToolbarText.js +2 -3
- package/node/internals/demo/DemoContainer.js +4 -5
- package/node/internals/hooks/date-helpers-hooks.js +1 -2
- package/node/internals/hooks/defaultizedFieldProps.js +1 -1
- package/node/internals/hooks/useClockReferenceDate.js +1 -2
- package/node/internals/hooks/useDefaultReduceAnimations.js +1 -1
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +14 -7
- package/node/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/node/internals/hooks/useField/useField.js +13 -9
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +2 -3
- package/node/internals/hooks/useField/useFieldState.js +4 -7
- package/node/internals/hooks/useField/useFieldV6TextField.js +2 -3
- package/node/internals/hooks/useField/useFieldV7TextField.js +2 -3
- package/node/internals/hooks/useIsLandscape.js +1 -2
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +3 -6
- package/node/internals/hooks/useOpenState.js +1 -2
- package/node/internals/hooks/usePicker/usePicker.js +1 -1
- package/node/internals/hooks/usePicker/usePickerLayoutProps.js +1 -1
- package/node/internals/hooks/usePicker/usePickerValue.js +14 -19
- package/node/internals/hooks/usePicker/usePickerViews.js +2 -3
- package/node/internals/hooks/useStaticPicker/useStaticPicker.js +2 -3
- package/node/internals/hooks/useUtils.js +2 -3
- package/node/internals/hooks/useValueWithTimezone.js +2 -3
- package/node/internals/hooks/useViews.js +2 -3
- package/node/internals/index.js +0 -49
- package/node/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +1 -1
- package/node/internals/utils/date-time-utils.js +1 -1
- package/node/internals/utils/valueManagers.js +1 -1
- package/node/locales/beBY.js +4 -4
- package/node/locales/caES.js +3 -3
- package/node/locales/csCZ.js +4 -4
- package/node/locales/daDK.js +3 -3
- package/node/locales/deDE.js +3 -3
- package/node/locales/elGR.js +4 -4
- package/node/locales/enUS.js +4 -4
- package/node/locales/esES.js +3 -3
- package/node/locales/eu.js +3 -3
- package/node/locales/faIR.js +3 -3
- package/node/locales/fiFI.js +3 -3
- package/node/locales/frFR.js +3 -3
- package/node/locales/heIL.js +3 -3
- package/node/locales/huHU.js +3 -3
- package/node/locales/isIS.js +4 -4
- package/node/locales/itIT.js +3 -3
- package/node/locales/jaJP.js +3 -3
- package/node/locales/koKR.js +3 -3
- package/node/locales/kzKZ.js +4 -4
- package/node/locales/mk.js +3 -3
- package/node/locales/nbNO.js +4 -4
- package/node/locales/nlNL.js +3 -3
- package/node/locales/nnNO.js +3 -3
- package/node/locales/plPL.js +4 -4
- package/node/locales/ptBR.js +4 -4
- package/node/locales/roRO.js +3 -3
- package/node/locales/ruRU.js +3 -3
- package/node/locales/skSK.js +4 -4
- package/node/locales/svSE.js +3 -3
- package/node/locales/trTR.js +4 -4
- package/node/locales/ukUA.js +3 -3
- package/node/locales/urPK.js +4 -4
- package/node/locales/utils/getPickersLocalization.js +17 -3
- package/node/locales/viVN.js +3 -3
- package/node/locales/zhCN.js +3 -3
- package/node/locales/zhHK.js +3 -3
- package/node/themeAugmentation/index.js +1 -38
- package/node/timeViewRenderers/timeViewRenderers.js +1 -2
- package/node/validation/index.js +40 -0
- package/node/validation/useValidation.js +61 -0
- package/node/{internals/utils/validation → validation}/validateDate.js +6 -4
- package/node/{internals/utils/validation → validation}/validateDateTime.js +8 -3
- package/node/{internals/utils/validation → validation}/validateTime.js +6 -4
- package/package.json +4 -3
- package/themeAugmentation/index.d.ts +3 -3
- package/themeAugmentation/index.js +0 -3
- package/timeViewRenderers/index.js +1 -1
- package/timeViewRenderers/timeViewRenderers.js +4 -4
- package/{internals/utils/validation → validation}/extractValidationProps.d.ts +1 -1
- package/validation/index.d.ts +9 -0
- package/validation/index.js +5 -0
- package/validation/package.json +6 -0
- package/validation/useValidation.d.ts +68 -0
- package/validation/useValidation.js +54 -0
- package/validation/validateDate.d.ts +6 -0
- package/{internals/utils/validation → validation}/validateDate.js +6 -4
- package/validation/validateDateTime.d.ts +7 -0
- package/validation/validateDateTime.js +26 -0
- package/validation/validateTime.d.ts +6 -0
- package/{modern/internals/utils/validation → validation}/validateTime.js +6 -4
- package/internals/hooks/useValidation.d.ts +0 -24
- package/internals/hooks/useValidation.js +0 -22
- package/internals/utils/fields.d.ts +0 -5
- package/internals/utils/fields.js +0 -28
- package/internals/utils/validation/validateDate.d.ts +0 -7
- package/internals/utils/validation/validateDateTime.d.ts +0 -7
- package/internals/utils/validation/validateDateTime.js +0 -21
- package/internals/utils/validation/validateTime.d.ts +0 -7
- package/internals/utils/warning.d.ts +0 -2
- package/internals/utils/warning.js +0 -21
- package/modern/internals/hooks/useValidation.js +0 -22
- package/modern/internals/utils/fields.js +0 -28
- package/modern/internals/utils/validation/validateDateTime.js +0 -21
- package/modern/internals/utils/warning.js +0 -21
- package/node/internals/hooks/useValidation.js +0 -30
- package/node/internals/utils/fields.js +0 -36
- package/node/internals/utils/warning.js +0 -28
- /package/{internals/utils → modern}/validation/extractValidationProps.js +0 -0
- /package/node/{internals/utils/validation → validation}/extractValidationProps.js +0 -0
- /package/{modern/internals/utils/validation → validation}/extractValidationProps.js +0 -0
|
@@ -10,9 +10,9 @@ import MuiPopper from '@mui/material/Popper';
|
|
|
10
10
|
import BaseFocusTrap from '@mui/material/Unstable_TrapFocus';
|
|
11
11
|
import { unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_ownerDocument as ownerDocument, unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
12
12
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
13
|
-
import { getPickersPopperUtilityClass } from
|
|
14
|
-
import { getActiveElement } from
|
|
15
|
-
import { useDefaultReduceAnimations } from
|
|
13
|
+
import { getPickersPopperUtilityClass } from "./pickersPopperClasses.js";
|
|
14
|
+
import { getActiveElement } from "../utils/utils.js";
|
|
15
|
+
import { useDefaultReduceAnimations } from "../hooks/useDefaultReduceAnimations.js";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
const useUtilityClasses = ownerState => {
|
|
18
18
|
const {
|
|
@@ -6,7 +6,7 @@ import clsx from 'clsx';
|
|
|
6
6
|
import Typography from '@mui/material/Typography';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
-
import { getPickersToolbarUtilityClass } from
|
|
9
|
+
import { getPickersToolbarUtilityClass } from "./pickersToolbarClasses.js";
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
const useUtilityClasses = ownerState => {
|
|
12
12
|
const {
|
|
@@ -6,8 +6,8 @@ import clsx from 'clsx';
|
|
|
6
6
|
import Button from '@mui/material/Button';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
-
import { PickersToolbarText } from
|
|
10
|
-
import { getPickersToolbarUtilityClass } from
|
|
9
|
+
import { PickersToolbarText } from "./PickersToolbarText.js";
|
|
10
|
+
import { getPickersToolbarUtilityClass } from "./pickersToolbarClasses.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const useUtilityClasses = ownerState => {
|
|
13
13
|
const {
|
|
@@ -6,7 +6,7 @@ import clsx from 'clsx';
|
|
|
6
6
|
import Typography from '@mui/material/Typography';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
-
import { getPickersToolbarTextUtilityClass, pickersToolbarTextClasses } from
|
|
9
|
+
import { getPickersToolbarTextUtilityClass, pickersToolbarTextClasses } from "./pickersToolbarTextClasses.js";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const useUtilityClasses = ownerState => {
|
|
12
12
|
const {
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import Stack, { stackClasses } from '@mui/material/Stack';
|
|
4
4
|
import Typography from '@mui/material/Typography';
|
|
5
5
|
import { textFieldClasses } from '@mui/material/TextField';
|
|
6
|
-
import { pickersTextFieldClasses } from
|
|
6
|
+
import { pickersTextFieldClasses } from "../../PickersTextField/index.js";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const getChildTypeFromChildName = childName => {
|
|
9
9
|
if (childName.match(/^([A-Za-z]+)Range(Calendar|Clock)$/)) {
|
|
@@ -68,7 +68,7 @@ export function DemoItem(props) {
|
|
|
68
68
|
}
|
|
69
69
|
DemoItem.displayName = 'DemoItem';
|
|
70
70
|
const isDemoItem = child => {
|
|
71
|
-
if (
|
|
71
|
+
if (/*#__PURE__*/React.isValidElement(child) && typeof child.type !== 'string') {
|
|
72
72
|
// @ts-ignore
|
|
73
73
|
return child.type.displayName === 'DemoItem';
|
|
74
74
|
}
|
|
@@ -165,7 +165,7 @@ export function DemoContainer(props) {
|
|
|
165
165
|
spacing: spacing,
|
|
166
166
|
sx: finalSx,
|
|
167
167
|
children: React.Children.map(children, child => {
|
|
168
|
-
if (
|
|
168
|
+
if (/*#__PURE__*/React.isValidElement(child) && isDemoItem(child)) {
|
|
169
169
|
// Inject sx styles to the `DemoItem` if it is a direct child of `DemoContainer`.
|
|
170
170
|
// @ts-ignore
|
|
171
171
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DemoContainer, DemoItem } from
|
|
1
|
+
export { DemoContainer, DemoItem } from "./DemoContainer.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useUtils } from
|
|
3
|
-
import { getMeridiem, convertToMeridiem } from
|
|
2
|
+
import { useUtils } from "./useUtils.js";
|
|
3
|
+
import { getMeridiem, convertToMeridiem } from "../utils/time-utils.js";
|
|
4
4
|
export function useNextMonthDisabled(month, {
|
|
5
5
|
disableFuture,
|
|
6
6
|
maxDate,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { applyDefaultDate } from
|
|
3
|
-
import { useUtils, useDefaultDates } from
|
|
2
|
+
import { applyDefaultDate } from "../utils/date-utils.js";
|
|
3
|
+
import { useUtils, useDefaultDates } from "./useUtils.js";
|
|
4
4
|
export const useDefaultizedDateField = props => {
|
|
5
5
|
const utils = useUtils();
|
|
6
6
|
const defaultDates = useDefaultDates();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { singleItemValueManager } from
|
|
3
|
-
import { getTodayDate } from
|
|
4
|
-
import { SECTION_TYPE_GRANULARITY } from
|
|
2
|
+
import { singleItemValueManager } from "../utils/valueManagers.js";
|
|
3
|
+
import { getTodayDate } from "../utils/date-utils.js";
|
|
4
|
+
import { SECTION_TYPE_GRANULARITY } from "../utils/getDefaultReferenceDate.js";
|
|
5
5
|
export const useClockReferenceDate = ({
|
|
6
6
|
value,
|
|
7
7
|
referenceDate: referenceDateProp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useDesktopPicker } from
|
|
1
|
+
export { useDesktopPicker } from "./useDesktopPicker.js";
|
|
@@ -9,11 +9,10 @@ import MuiInputAdornment from '@mui/material/InputAdornment';
|
|
|
9
9
|
import IconButton from '@mui/material/IconButton';
|
|
10
10
|
import useForkRef from '@mui/utils/useForkRef';
|
|
11
11
|
import useId from '@mui/utils/useId';
|
|
12
|
-
import { PickersPopper } from
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { PickersLayout } from '../../../PickersLayout';
|
|
12
|
+
import { PickersPopper } from "../../components/PickersPopper.js";
|
|
13
|
+
import { usePicker } from "../usePicker/index.js";
|
|
14
|
+
import { LocalizationProvider } from "../../../LocalizationProvider/index.js";
|
|
15
|
+
import { PickersLayout } from "../../../PickersLayout/index.js";
|
|
17
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
17
|
/**
|
|
19
18
|
* Hook managing all the single-date desktop pickers:
|
|
@@ -47,7 +46,6 @@ export const useDesktopPicker = _ref => {
|
|
|
47
46
|
localeText,
|
|
48
47
|
reduceAnimations
|
|
49
48
|
} = props;
|
|
50
|
-
const utils = useUtils();
|
|
51
49
|
const containerRef = React.useRef(null);
|
|
52
50
|
const fieldRef = React.useRef(null);
|
|
53
51
|
const labelId = useId();
|
|
@@ -67,6 +65,11 @@ export const useDesktopPicker = _ref => {
|
|
|
67
65
|
additionalViewProps: {},
|
|
68
66
|
wrapperVariant: 'desktop'
|
|
69
67
|
}));
|
|
68
|
+
|
|
69
|
+
// TODO v8: Apply this ownerState to all the slots in this hook.
|
|
70
|
+
const ownerStateV8 = {
|
|
71
|
+
open
|
|
72
|
+
};
|
|
70
73
|
const InputAdornment = slots.inputAdornment ?? MuiInputAdornment;
|
|
71
74
|
const _useSlotProps = useSlotProps({
|
|
72
75
|
elementType: InputAdornment,
|
|
@@ -84,13 +87,18 @@ export const useDesktopPicker = _ref => {
|
|
|
84
87
|
additionalProps: {
|
|
85
88
|
disabled: disabled || readOnly,
|
|
86
89
|
onClick: open ? actions.onClose : actions.onOpen,
|
|
87
|
-
'aria-label': getOpenDialogAriaText(pickerFieldProps.value
|
|
90
|
+
'aria-label': getOpenDialogAriaText(pickerFieldProps.value),
|
|
88
91
|
edge: inputAdornmentProps.position
|
|
89
92
|
},
|
|
90
93
|
ownerState: props
|
|
91
94
|
}),
|
|
92
95
|
openPickerButtonProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);
|
|
93
96
|
const OpenPickerIcon = slots.openPickerIcon;
|
|
97
|
+
const openPickerIconProps = useSlotProps({
|
|
98
|
+
elementType: OpenPickerIcon,
|
|
99
|
+
externalSlotProps: innerSlotProps?.openPickerIcon,
|
|
100
|
+
ownerState: ownerStateV8
|
|
101
|
+
});
|
|
94
102
|
const Field = slots.field;
|
|
95
103
|
const fieldProps = useSlotProps({
|
|
96
104
|
elementType: Field,
|
|
@@ -125,7 +133,7 @@ export const useDesktopPicker = _ref => {
|
|
|
125
133
|
}, !props.disableOpenPicker && {
|
|
126
134
|
[`${inputAdornmentProps.position}Adornment`]: /*#__PURE__*/_jsx(InputAdornment, _extends({}, inputAdornmentProps, {
|
|
127
135
|
children: /*#__PURE__*/_jsx(OpenPickerButton, _extends({}, openPickerButtonProps, {
|
|
128
|
-
children: /*#__PURE__*/_jsx(OpenPickerIcon, _extends({},
|
|
136
|
+
children: /*#__PURE__*/_jsx(OpenPickerIcon, _extends({}, openPickerIconProps))
|
|
129
137
|
}))
|
|
130
138
|
}))
|
|
131
139
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { applyLocalizedDigits, cleanLeadingZeros, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, removeLocalizedDigits } from
|
|
2
|
+
import { applyLocalizedDigits, cleanLeadingZeros, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, removeLocalizedDigits } from "./useField.utils.js";
|
|
3
3
|
const expandFormat = ({
|
|
4
4
|
utils,
|
|
5
5
|
format
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useField } from
|
|
2
|
-
export { createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from
|
|
1
|
+
export { useField } from "./useField.js";
|
|
2
|
+
export { createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from "./useField.utils.js";
|
|
@@ -3,13 +3,13 @@ import * as React from 'react';
|
|
|
3
3
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
4
4
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
5
5
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
6
|
-
import { useValidation } from
|
|
7
|
-
import { useUtils } from
|
|
8
|
-
import { adjustSectionValue, getSectionOrder } from
|
|
9
|
-
import { useFieldState } from
|
|
10
|
-
import { useFieldCharacterEditing } from
|
|
11
|
-
import { useFieldV7TextField } from
|
|
12
|
-
import { useFieldV6TextField } from
|
|
6
|
+
import { useValidation } from "../../../validation/index.js";
|
|
7
|
+
import { useUtils } from "../useUtils.js";
|
|
8
|
+
import { adjustSectionValue, getSectionOrder } from "./useField.utils.js";
|
|
9
|
+
import { useFieldState } from "./useFieldState.js";
|
|
10
|
+
import { useFieldCharacterEditing } from "./useFieldCharacterEditing.js";
|
|
11
|
+
import { useFieldV7TextField } from "./useFieldV7TextField.js";
|
|
12
|
+
import { useFieldV6TextField } from "./useFieldV6TextField.js";
|
|
13
13
|
export const useField = params => {
|
|
14
14
|
const utils = useUtils();
|
|
15
15
|
const {
|
|
@@ -158,18 +158,23 @@ export const useField = params => {
|
|
|
158
158
|
useEnhancedEffect(() => {
|
|
159
159
|
interactions.syncSelectionToDOM();
|
|
160
160
|
});
|
|
161
|
-
const
|
|
161
|
+
const {
|
|
162
|
+
hasValidationError
|
|
163
|
+
} = useValidation({
|
|
164
|
+
props: internalProps,
|
|
165
|
+
validator,
|
|
166
|
+
timezone,
|
|
162
167
|
value: state.value,
|
|
163
|
-
|
|
164
|
-
})
|
|
168
|
+
onError: internalProps.onError
|
|
169
|
+
});
|
|
165
170
|
const inputError = React.useMemo(() => {
|
|
166
171
|
// only override when `error` is undefined.
|
|
167
172
|
// in case of multi input fields, the `error` value is provided externally and will always be defined.
|
|
168
173
|
if (error !== undefined) {
|
|
169
174
|
return error;
|
|
170
175
|
}
|
|
171
|
-
return
|
|
172
|
-
}, [
|
|
176
|
+
return hasValidationError;
|
|
177
|
+
}, [hasValidationError, error]);
|
|
173
178
|
React.useEffect(() => {
|
|
174
179
|
if (!inputError && activeSectionIndex == null) {
|
|
175
180
|
resetCharacterQuery();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getMonthsInYear } from
|
|
1
|
+
import { getMonthsInYear } from "../../utils/date-utils.js";
|
|
2
2
|
export const getDateSectionConfigFromFormatToken = (utils, formatToken) => {
|
|
3
3
|
const config = utils.formatTokenMap[formatToken];
|
|
4
4
|
if (config == null) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
4
|
-
import { useUtils } from
|
|
5
|
-
import { changeSectionValueFormat, cleanDigitSectionValue, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, getDaysInWeekStr, getLetterEditingOptions, applyLocalizedDigits, removeLocalizedDigits, isStringNumber } from
|
|
4
|
+
import { useUtils } from "../useUtils.js";
|
|
5
|
+
import { changeSectionValueFormat, cleanDigitSectionValue, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, getDaysInWeekStr, getLetterEditingOptions, applyLocalizedDigits, removeLocalizedDigits, isStringNumber } from "./useField.utils.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The letter editing and the numeric editing each define a `CharacterEditingApplier`.
|
|
@@ -2,12 +2,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useControlled from '@mui/utils/useControlled';
|
|
4
4
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
5
|
-
import { usePickersTranslations } from
|
|
6
|
-
import { useUtils, useLocalizationContext } from
|
|
7
|
-
import { mergeDateIntoReferenceDate, getSectionsBoundaries, validateSections, getDateFromDateSections, parseSelectedSections, getLocalizedDigits } from
|
|
8
|
-
import { buildSectionsFromFormat } from
|
|
9
|
-
import { useValueWithTimezone } from
|
|
10
|
-
import { getSectionTypeGranularity } from
|
|
5
|
+
import { usePickersTranslations } from "../../../hooks/usePickersTranslations.js";
|
|
6
|
+
import { useUtils, useLocalizationContext } from "../useUtils.js";
|
|
7
|
+
import { mergeDateIntoReferenceDate, getSectionsBoundaries, validateSections, getDateFromDateSections, parseSelectedSections, getLocalizedDigits } from "./useField.utils.js";
|
|
8
|
+
import { buildSectionsFromFormat } from "./buildSectionsFromFormat.js";
|
|
9
|
+
import { useValueWithTimezone } from "../useValueWithTimezone.js";
|
|
10
|
+
import { getSectionTypeGranularity } from "../../utils/getDefaultReferenceDate.js";
|
|
11
11
|
export const useFieldState = params => {
|
|
12
12
|
const utils = useUtils();
|
|
13
13
|
const translations = usePickersTranslations();
|
|
@@ -110,10 +110,8 @@ export const useFieldState = params => {
|
|
|
110
110
|
validationError: validator({
|
|
111
111
|
adapter,
|
|
112
112
|
value,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
timezone
|
|
116
|
-
})
|
|
113
|
+
timezone,
|
|
114
|
+
props: internalProps
|
|
117
115
|
})
|
|
118
116
|
};
|
|
119
117
|
handleValueChange(value, context);
|
|
@@ -3,8 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
4
4
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
5
5
|
import useForkRef from '@mui/utils/useForkRef';
|
|
6
|
-
import { getActiveElement } from
|
|
7
|
-
import { getSectionVisibleValue, isAndroid } from
|
|
6
|
+
import { getActiveElement } from "../../utils/utils.js";
|
|
7
|
+
import { getSectionVisibleValue, isAndroid } from "./useField.utils.js";
|
|
8
8
|
const cleanString = dirtyString => dirtyString.replace(/[\u2066\u2067\u2068\u2069]/g, '');
|
|
9
9
|
export const addPositionPropertiesToSections = (sections, localizedDigits, isRtl) => {
|
|
10
10
|
let position = 0;
|
|
@@ -3,10 +3,10 @@ import useForkRef from '@mui/utils/useForkRef';
|
|
|
3
3
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
4
4
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
5
5
|
import useId from '@mui/utils/useId';
|
|
6
|
-
import { getSectionValueNow, getSectionValueText, parseSelectedSections } from
|
|
7
|
-
import { getActiveElement } from
|
|
8
|
-
import { usePickersTranslations } from
|
|
9
|
-
import { useUtils } from
|
|
6
|
+
import { getSectionValueNow, getSectionValueText, parseSelectedSections } from "./useField.utils.js";
|
|
7
|
+
import { getActiveElement } from "../../utils/utils.js";
|
|
8
|
+
import { usePickersTranslations } from "../../../hooks/usePickersTranslations.js";
|
|
9
|
+
import { useUtils } from "../useUtils.js";
|
|
10
10
|
export const useFieldV7TextField = params => {
|
|
11
11
|
const {
|
|
12
12
|
internalProps: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
3
|
-
import { arrayIncludes } from
|
|
3
|
+
import { arrayIncludes } from "../utils/utils.js";
|
|
4
4
|
function getOrientation() {
|
|
5
5
|
if (typeof window === 'undefined') {
|
|
6
6
|
return 'portrait';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useMobilePicker } from
|
|
1
|
+
export { useMobilePicker } from "./useMobilePicker.js";
|
|
@@ -5,12 +5,11 @@ import * as React from 'react';
|
|
|
5
5
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
6
6
|
import useForkRef from '@mui/utils/useForkRef';
|
|
7
7
|
import useId from '@mui/utils/useId';
|
|
8
|
-
import { PickersModalDialog } from
|
|
9
|
-
import { usePicker } from
|
|
10
|
-
import { onSpaceOrEnter } from
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { PickersLayout } from '../../../PickersLayout';
|
|
8
|
+
import { PickersModalDialog } from "../../components/PickersModalDialog.js";
|
|
9
|
+
import { usePicker } from "../usePicker/index.js";
|
|
10
|
+
import { onSpaceOrEnter } from "../../utils/utils.js";
|
|
11
|
+
import { LocalizationProvider } from "../../../LocalizationProvider/index.js";
|
|
12
|
+
import { PickersLayout } from "../../../PickersLayout/index.js";
|
|
14
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
14
|
/**
|
|
16
15
|
* Hook managing all the single-date mobile pickers:
|
|
@@ -42,7 +41,6 @@ export const useMobilePicker = _ref => {
|
|
|
42
41
|
disabled,
|
|
43
42
|
localeText
|
|
44
43
|
} = props;
|
|
45
|
-
const utils = useUtils();
|
|
46
44
|
const fieldRef = React.useRef(null);
|
|
47
45
|
const labelId = useId();
|
|
48
46
|
const isToolbarHidden = innerSlotProps?.toolbar?.hidden ?? false;
|
|
@@ -89,7 +87,7 @@ export const useMobilePicker = _ref => {
|
|
|
89
87
|
|
|
90
88
|
// TODO: Move to `useSlotProps` when https://github.com/mui/material-ui/pull/35088 will be merged
|
|
91
89
|
fieldProps.inputProps = _extends({}, fieldProps.inputProps, {
|
|
92
|
-
'aria-label': getOpenDialogAriaText(pickerFieldProps.value
|
|
90
|
+
'aria-label': getOpenDialogAriaText(pickerFieldProps.value)
|
|
93
91
|
});
|
|
94
92
|
const slotsForField = _extends({
|
|
95
93
|
textField: slots.textField
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { usePicker } from
|
|
1
|
+
export { usePicker } from "./usePicker.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
2
|
+
import { usePickerValue } from "./usePickerValue.js";
|
|
3
|
+
import { usePickerViews } from "./usePickerViews.js";
|
|
4
|
+
import { usePickerLayoutProps } from "./usePickerLayoutProps.js";
|
|
5
5
|
export const usePicker = ({
|
|
6
6
|
props,
|
|
7
7
|
valueManager,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
3
|
-
import { useIsLandscape } from
|
|
3
|
+
import { useIsLandscape } from "../useIsLandscape.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props used to create the layout of the views.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
4
|
-
import { useOpenState } from
|
|
5
|
-
import { useLocalizationContext, useUtils } from
|
|
6
|
-
import { useValidation } from
|
|
7
|
-
import { useValueWithTimezone } from
|
|
4
|
+
import { useOpenState } from "../useOpenState.js";
|
|
5
|
+
import { useLocalizationContext, useUtils } from "../useUtils.js";
|
|
6
|
+
import { useValidation } from "../../../validation/index.js";
|
|
7
|
+
import { useValueWithTimezone } from "../useValueWithTimezone.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Decide if the new value should be published
|
|
@@ -180,10 +180,15 @@ export const usePickerValue = ({
|
|
|
180
180
|
hasBeenModifiedSinceMount: false
|
|
181
181
|
};
|
|
182
182
|
});
|
|
183
|
-
|
|
183
|
+
const {
|
|
184
|
+
getValidationErrorForNewValue
|
|
185
|
+
} = useValidation({
|
|
186
|
+
props,
|
|
187
|
+
validator,
|
|
188
|
+
timezone,
|
|
184
189
|
value: dateState.draft,
|
|
185
|
-
|
|
186
|
-
})
|
|
190
|
+
onError: props.onError
|
|
191
|
+
});
|
|
187
192
|
const updateDate = useEventCallback(action => {
|
|
188
193
|
const updaterParams = {
|
|
189
194
|
action,
|
|
@@ -204,14 +209,7 @@ export const usePickerValue = ({
|
|
|
204
209
|
let cachedContext = null;
|
|
205
210
|
const getContext = () => {
|
|
206
211
|
if (!cachedContext) {
|
|
207
|
-
const validationError = action.name === 'setValueFromField' ? action.context.validationError :
|
|
208
|
-
adapter,
|
|
209
|
-
value: action.value,
|
|
210
|
-
props: _extends({}, props, {
|
|
211
|
-
value: action.value,
|
|
212
|
-
timezone
|
|
213
|
-
})
|
|
214
|
-
});
|
|
212
|
+
const validationError = action.name === 'setValueFromField' ? action.context.validationError : getValidationErrorForNewValue(action.value);
|
|
215
213
|
cachedContext = {
|
|
216
214
|
validationError
|
|
217
215
|
};
|
|
@@ -325,10 +323,8 @@ export const usePickerValue = ({
|
|
|
325
323
|
const error = validator({
|
|
326
324
|
adapter,
|
|
327
325
|
value: testedValue,
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
timezone
|
|
331
|
-
})
|
|
326
|
+
timezone,
|
|
327
|
+
props
|
|
332
328
|
});
|
|
333
329
|
return !valueManager.hasError(error);
|
|
334
330
|
};
|
|
@@ -4,8 +4,8 @@ const _excluded = ["className", "sx"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
6
6
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
7
|
-
import { useViews } from
|
|
8
|
-
import { isTimeView } from
|
|
7
|
+
import { useViews } from "../useViews.js";
|
|
8
|
+
import { isTimeView } from "../../utils/time-utils.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Props used to handle the views that are common to all pickers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useStaticPicker } from
|
|
1
|
+
export { useStaticPicker } from "./useStaticPicker.js";
|
|
@@ -4,10 +4,10 @@ const _excluded = ["props", "ref"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled } from '@mui/material/styles';
|
|
7
|
-
import { usePicker } from
|
|
8
|
-
import { LocalizationProvider } from
|
|
9
|
-
import { PickersLayout } from
|
|
10
|
-
import { DIALOG_WIDTH } from
|
|
7
|
+
import { usePicker } from "../usePicker/index.js";
|
|
8
|
+
import { LocalizationProvider } from "../../../LocalizationProvider/index.js";
|
|
9
|
+
import { PickersLayout } from "../../../PickersLayout/index.js";
|
|
10
|
+
import { DIALOG_WIDTH } from "../../constants/dimensions.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const PickerStaticLayout = styled(PickersLayout)(({
|
|
13
13
|
theme
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { MuiPickersAdapterContext } from
|
|
4
|
-
import { DEFAULT_LOCALE } from
|
|
3
|
+
import { MuiPickersAdapterContext } from "../../LocalizationProvider/LocalizationProvider.js";
|
|
4
|
+
import { DEFAULT_LOCALE } from "../../locales/enUS.js";
|
|
5
5
|
export const useLocalizationContext = () => {
|
|
6
6
|
const localization = React.useContext(MuiPickersAdapterContext);
|
|
7
7
|
if (localization === null) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
3
3
|
import useControlled from '@mui/utils/useControlled';
|
|
4
|
-
import { useUtils } from
|
|
4
|
+
import { useUtils } from "./useUtils.js";
|
|
5
5
|
/**
|
|
6
6
|
* Hooks making sure that:
|
|
7
7
|
* - The value returned by `onChange` always have the timezone of `props.value` or `props.defaultValue` if defined
|
|
@@ -1,36 +1,29 @@
|
|
|
1
|
-
export { PickersArrowSwitcher } from
|
|
2
|
-
export { PickersModalDialog } from
|
|
3
|
-
export { PickersPopper } from
|
|
4
|
-
export { PickersToolbar } from
|
|
5
|
-
export { pickersToolbarClasses } from
|
|
6
|
-
export { pickersToolbarButtonClasses } from
|
|
7
|
-
export { pickersToolbarTextClasses } from
|
|
8
|
-
export { pickersArrowSwitcherClasses } from
|
|
9
|
-
export { pickersPopperClasses } from
|
|
10
|
-
export { PickersToolbarButton } from
|
|
11
|
-
export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT } from
|
|
12
|
-
export { useControlledValueWithTimezone } from
|
|
13
|
-
export { useField, createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from
|
|
14
|
-
export { usePicker } from
|
|
15
|
-
export { useStaticPicker } from
|
|
16
|
-
export { useLocalizationContext, useDefaultDates, useUtils, useNow } from
|
|
17
|
-
export { useViews } from
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export { validateDateTime } from './utils/validation/validateDateTime';
|
|
31
|
-
export { validateTime } from './utils/validation/validateTime';
|
|
32
|
-
export { applyDefaultViewProps } from './utils/views';
|
|
33
|
-
export { warnOnce } from './utils/warning';
|
|
34
|
-
export { DayCalendar } from '../DateCalendar/DayCalendar';
|
|
35
|
-
export { useCalendarState } from '../DateCalendar/useCalendarState';
|
|
36
|
-
export { isInternalTimeView, isTimeView } from './utils/time-utils';
|
|
1
|
+
export { PickersArrowSwitcher } from "./components/PickersArrowSwitcher/PickersArrowSwitcher.js";
|
|
2
|
+
export { PickersModalDialog } from "./components/PickersModalDialog.js";
|
|
3
|
+
export { PickersPopper } from "./components/PickersPopper.js";
|
|
4
|
+
export { PickersToolbar } from "./components/PickersToolbar.js";
|
|
5
|
+
export { pickersToolbarClasses } from "./components/pickersToolbarClasses.js";
|
|
6
|
+
export { pickersToolbarButtonClasses } from "./components/pickersToolbarButtonClasses.js";
|
|
7
|
+
export { pickersToolbarTextClasses } from "./components/pickersToolbarTextClasses.js";
|
|
8
|
+
export { pickersArrowSwitcherClasses } from "./components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js";
|
|
9
|
+
export { pickersPopperClasses } from "./components/pickersPopperClasses.js";
|
|
10
|
+
export { PickersToolbarButton } from "./components/PickersToolbarButton.js";
|
|
11
|
+
export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT } from "./constants/dimensions.js";
|
|
12
|
+
export { useControlledValueWithTimezone } from "./hooks/useValueWithTimezone.js";
|
|
13
|
+
export { useField, createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from "./hooks/useField/index.js";
|
|
14
|
+
export { usePicker } from "./hooks/usePicker/index.js";
|
|
15
|
+
export { useStaticPicker } from "./hooks/useStaticPicker/index.js";
|
|
16
|
+
export { useLocalizationContext, useDefaultDates, useUtils, useNow } from "./hooks/useUtils.js";
|
|
17
|
+
export { useViews } from "./hooks/useViews.js";
|
|
18
|
+
export { usePreviousMonthDisabled, useNextMonthDisabled } from "./hooks/date-helpers-hooks.js";
|
|
19
|
+
export { convertFieldResponseIntoMuiTextFieldProps } from "./utils/convertFieldResponseIntoMuiTextFieldProps.js";
|
|
20
|
+
export { applyDefaultDate, replaceInvalidDateByNull, areDatesEqual, getTodayDate, isDatePickerView, mergeDateAndTime, formatMeridiem } from "./utils/date-utils.js";
|
|
21
|
+
export { resolveTimeViewsResponse, resolveDateTimeFormat } from "./utils/date-time-utils.js";
|
|
22
|
+
export { getDefaultReferenceDate } from "./utils/getDefaultReferenceDate.js";
|
|
23
|
+
export { executeInTheNextEventLoopTick, getActiveElement, onSpaceOrEnter, DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from "./utils/utils.js";
|
|
24
|
+
export { useDefaultizedDateField, useDefaultizedTimeField, useDefaultizedDateTimeField } from "./hooks/defaultizedFieldProps.js";
|
|
25
|
+
export { useDefaultReduceAnimations } from "./hooks/useDefaultReduceAnimations.js";
|
|
26
|
+
export { applyDefaultViewProps } from "./utils/views.js";
|
|
27
|
+
export { DayCalendar } from "../DateCalendar/DayCalendar.js";
|
|
28
|
+
export { useCalendarState } from "../DateCalendar/useCalendarState.js";
|
|
29
|
+
export { isInternalTimeView, isTimeView } from "./utils/time-utils.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./fields.js";
|
|
2
|
+
export * from "./common.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["views", "format"];
|
|
4
|
-
import { resolveTimeFormat, isTimeView, isInternalTimeView } from
|
|
5
|
-
import { isDatePickerView, resolveDateFormat } from
|
|
4
|
+
import { resolveTimeFormat, isTimeView, isInternalTimeView } from "./time-utils.js";
|
|
5
|
+
import { isDatePickerView, resolveDateFormat } from "./date-utils.js";
|
|
6
6
|
export const resolveDateTimeFormat = (utils, _ref, ignoreDateResolving) => {
|
|
7
7
|
let {
|
|
8
8
|
views,
|