@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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["desktopModeMediaQuery"];
|
|
@@ -6,9 +8,9 @@ import PropTypes from 'prop-types';
|
|
|
6
8
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
7
9
|
import { useThemeProps } from '@mui/material/styles';
|
|
8
10
|
import { refType } from '@mui/utils';
|
|
9
|
-
import { DesktopDatePicker } from
|
|
10
|
-
import { MobileDatePicker } from
|
|
11
|
-
import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from
|
|
11
|
+
import { DesktopDatePicker } from "../DesktopDatePicker/index.js";
|
|
12
|
+
import { MobileDatePicker } from "../MobileDatePicker/index.js";
|
|
13
|
+
import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from "../internals/utils/utils.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
/**
|
|
14
16
|
* Demos:
|
|
@@ -168,16 +170,16 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
168
170
|
name: PropTypes.string,
|
|
169
171
|
/**
|
|
170
172
|
* Callback fired when the value is accepted.
|
|
171
|
-
* @template TValue The value type.
|
|
172
|
-
* @template TError The validation error type.
|
|
173
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
174
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
173
175
|
* @param {TValue} value The value that was just accepted.
|
|
174
176
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
175
177
|
*/
|
|
176
178
|
onAccept: PropTypes.func,
|
|
177
179
|
/**
|
|
178
180
|
* Callback fired when the value changes.
|
|
179
|
-
* @template TValue The value type.
|
|
180
|
-
* @template TError The validation error type.
|
|
181
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
182
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
181
183
|
* @param {TValue} value The new value.
|
|
182
184
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
183
185
|
*/
|
|
@@ -188,13 +190,13 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
188
190
|
*/
|
|
189
191
|
onClose: PropTypes.func,
|
|
190
192
|
/**
|
|
191
|
-
* Callback fired when the error associated
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
* @template
|
|
195
|
-
* @template
|
|
196
|
-
* @param {TError} error The
|
|
197
|
-
* @param {TValue} value The value associated
|
|
193
|
+
* Callback fired when the error associated with the current value changes.
|
|
194
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
195
|
+
* This can be used to render an appropriate form error.
|
|
196
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
197
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
198
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
199
|
+
* @param {TValue} value The value associated with the error.
|
|
198
200
|
*/
|
|
199
201
|
onError: PropTypes.func,
|
|
200
202
|
/**
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["value", "isLandscape", "onChange", "toolbarFormat", "toolbarPlaceholder", "views", "className", "onViewChange", "view"];
|
|
@@ -7,11 +9,11 @@ import PropTypes from 'prop-types';
|
|
|
7
9
|
import Typography from '@mui/material/Typography';
|
|
8
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
11
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import { PickersToolbar } from
|
|
11
|
-
import { usePickersTranslations } from
|
|
12
|
-
import { useUtils } from
|
|
13
|
-
import { getDatePickerToolbarUtilityClass } from
|
|
14
|
-
import { resolveDateFormat } from
|
|
12
|
+
import { PickersToolbar } from "../internals/components/PickersToolbar.js";
|
|
13
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
14
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
15
|
+
import { getDatePickerToolbarUtilityClass } from "./datePickerToolbarClasses.js";
|
|
16
|
+
import { resolveDateFormat } from "../internals/utils/date-utils.js";
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
18
|
const useUtilityClasses = ownerState => {
|
|
17
19
|
const {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DatePicker } from
|
|
2
|
-
export { DatePickerToolbar } from
|
|
3
|
-
export { datePickerToolbarClasses } from
|
|
1
|
+
export { DatePicker } from "./DatePicker.js";
|
|
2
|
+
export { DatePickerToolbar } from "./DatePickerToolbar.js";
|
|
3
|
+
export { datePickerToolbarClasses } from "./datePickerToolbarClasses.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
|
-
import { useDefaultDates, useUtils } from
|
|
5
|
-
import { applyDefaultViewProps } from
|
|
6
|
-
import { applyDefaultDate } from
|
|
7
|
-
import { DatePickerToolbar } from
|
|
4
|
+
import { useDefaultDates, useUtils } from "../internals/hooks/useUtils.js";
|
|
5
|
+
import { applyDefaultViewProps } from "../internals/utils/views.js";
|
|
6
|
+
import { applyDefaultDate } from "../internals/utils/date-utils.js";
|
|
7
|
+
import { DatePickerToolbar } from "./DatePickerToolbar.js";
|
|
8
8
|
export function useDatePickerDefaultizedProps(props, name) {
|
|
9
9
|
const utils = useUtils();
|
|
10
10
|
const defaultDates = useDefaultDates();
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["slots", "slotProps", "InputProps", "inputProps"];
|
|
@@ -7,10 +9,10 @@ import MuiTextField from '@mui/material/TextField';
|
|
|
7
9
|
import { useThemeProps } from '@mui/material/styles';
|
|
8
10
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
11
|
import { refType } from '@mui/utils';
|
|
10
|
-
import { useDateTimeField } from
|
|
11
|
-
import { useClearableField } from
|
|
12
|
-
import { PickersTextField } from
|
|
13
|
-
import { convertFieldResponseIntoMuiTextFieldProps } from
|
|
12
|
+
import { useDateTimeField } from "./useDateTimeField.js";
|
|
13
|
+
import { useClearableField } from "../hooks/index.js";
|
|
14
|
+
import { PickersTextField } from "../PickersTextField/index.js";
|
|
15
|
+
import { convertFieldResponseIntoMuiTextFieldProps } from "../internals/utils/convertFieldResponseIntoMuiTextFieldProps.js";
|
|
14
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
17
|
/**
|
|
16
18
|
* Demos:
|
|
@@ -222,8 +224,8 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
|
|
|
222
224
|
onBlur: PropTypes.func,
|
|
223
225
|
/**
|
|
224
226
|
* Callback fired when the value changes.
|
|
225
|
-
* @template TValue The value type.
|
|
226
|
-
* @template TError The validation error type.
|
|
227
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
228
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
227
229
|
* @param {TValue} value The new value.
|
|
228
230
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
229
231
|
*/
|
|
@@ -233,11 +235,13 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
|
|
|
233
235
|
*/
|
|
234
236
|
onClear: PropTypes.func,
|
|
235
237
|
/**
|
|
236
|
-
* Callback fired when the error associated
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* @
|
|
240
|
-
* @
|
|
238
|
+
* Callback fired when the error associated with the current value changes.
|
|
239
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
240
|
+
* This can be used to render an appropriate form error.
|
|
241
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
242
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
243
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
244
|
+
* @param {TValue} value The value associated with the error.
|
|
241
245
|
*/
|
|
242
246
|
onError: PropTypes.func,
|
|
243
247
|
onFocus: PropTypes.func,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DateTimeField } from
|
|
2
|
-
export { useDateTimeField as unstable_useDateTimeField } from
|
|
1
|
+
export { DateTimeField } from "./DateTimeField.js";
|
|
2
|
+
export { useDateTimeField as unstable_useDateTimeField } from "./useDateTimeField.js";
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { singleItemFieldValueManager, singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
4
|
+
import { useField } from "../internals/hooks/useField/index.js";
|
|
5
|
+
import { validateDateTime } from "../validation/index.js";
|
|
6
|
+
import { useSplitFieldProps } from "../hooks/index.js";
|
|
7
|
+
import { useDefaultizedDateTimeField } from "../internals/hooks/defaultizedFieldProps.js";
|
|
6
8
|
export const useDateTimeField = inProps => {
|
|
7
9
|
const props = useDefaultizedDateTimeField(inProps);
|
|
8
10
|
const {
|
|
9
11
|
forwardedProps,
|
|
10
12
|
internalProps
|
|
11
|
-
} =
|
|
13
|
+
} = useSplitFieldProps(props, 'date-time');
|
|
12
14
|
return useField({
|
|
13
15
|
forwardedProps,
|
|
14
16
|
internalProps,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["desktopModeMediaQuery"];
|
|
@@ -6,9 +8,9 @@ import PropTypes from 'prop-types';
|
|
|
6
8
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
7
9
|
import { useThemeProps } from '@mui/material/styles';
|
|
8
10
|
import { refType } from '@mui/utils';
|
|
9
|
-
import { DesktopDateTimePicker } from
|
|
10
|
-
import { MobileDateTimePicker } from
|
|
11
|
-
import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from
|
|
11
|
+
import { DesktopDateTimePicker } from "../DesktopDateTimePicker/index.js";
|
|
12
|
+
import { MobileDateTimePicker } from "../MobileDateTimePicker/index.js";
|
|
13
|
+
import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from "../internals/utils/utils.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
/**
|
|
14
16
|
* Demos:
|
|
@@ -206,16 +208,16 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
206
208
|
name: PropTypes.string,
|
|
207
209
|
/**
|
|
208
210
|
* Callback fired when the value is accepted.
|
|
209
|
-
* @template TValue The value type.
|
|
210
|
-
* @template TError The validation error type.
|
|
211
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
212
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
211
213
|
* @param {TValue} value The value that was just accepted.
|
|
212
214
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
213
215
|
*/
|
|
214
216
|
onAccept: PropTypes.func,
|
|
215
217
|
/**
|
|
216
218
|
* Callback fired when the value changes.
|
|
217
|
-
* @template TValue The value type.
|
|
218
|
-
* @template TError The validation error type.
|
|
219
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
220
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
219
221
|
* @param {TValue} value The new value.
|
|
220
222
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
221
223
|
*/
|
|
@@ -226,13 +228,13 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
226
228
|
*/
|
|
227
229
|
onClose: PropTypes.func,
|
|
228
230
|
/**
|
|
229
|
-
* Callback fired when the error associated
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
* @template
|
|
233
|
-
* @template
|
|
234
|
-
* @param {TError} error The
|
|
235
|
-
* @param {TValue} value The value associated
|
|
231
|
+
* Callback fired when the error associated with the current value changes.
|
|
232
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
233
|
+
* This can be used to render an appropriate form error.
|
|
234
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
235
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
236
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
237
|
+
* @param {TValue} value The value associated with the error.
|
|
236
238
|
*/
|
|
237
239
|
onError: PropTypes.func,
|
|
238
240
|
/**
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import clsx from 'clsx';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
@@ -5,10 +7,10 @@ import Tab from '@mui/material/Tab';
|
|
|
5
7
|
import Tabs, { tabsClasses } from '@mui/material/Tabs';
|
|
6
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
|
-
import { TimeIcon, DateRangeIcon } from
|
|
9
|
-
import { usePickersTranslations } from
|
|
10
|
-
import { getDateTimePickerTabsUtilityClass } from
|
|
11
|
-
import { isDatePickerView } from
|
|
10
|
+
import { TimeIcon, DateRangeIcon } from "../icons/index.js";
|
|
11
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
12
|
+
import { getDateTimePickerTabsUtilityClass } from "./dateTimePickerTabsClasses.js";
|
|
13
|
+
import { isDatePickerView } from "../internals/utils/date-utils.js";
|
|
12
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
15
|
const viewToTab = view => {
|
|
14
16
|
if (isDatePickerView(view)) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["ampm", "ampmInClock", "value", "onChange", "view", "isLandscape", "onViewChange", "toolbarFormat", "toolbarPlaceholder", "views", "disabled", "readOnly", "toolbarVariant", "toolbarTitle", "className"];
|
|
@@ -7,17 +9,17 @@ import { useRtl } from '@mui/system/RtlProvider';
|
|
|
7
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
11
|
import clsx from 'clsx';
|
|
10
|
-
import { PickersToolbarText } from
|
|
11
|
-
import { PickersToolbar } from
|
|
12
|
-
import { PickersToolbarButton } from
|
|
13
|
-
import { usePickersTranslations } from
|
|
14
|
-
import { useUtils } from
|
|
15
|
-
import { dateTimePickerToolbarClasses, getDateTimePickerToolbarUtilityClass } from
|
|
16
|
-
import { useMeridiemMode } from
|
|
17
|
-
import { MULTI_SECTION_CLOCK_SECTION_WIDTH } from
|
|
18
|
-
import { formatMeridiem } from
|
|
19
|
-
import { pickersToolbarTextClasses } from
|
|
20
|
-
import { pickersToolbarClasses } from
|
|
12
|
+
import { PickersToolbarText } from "../internals/components/PickersToolbarText.js";
|
|
13
|
+
import { PickersToolbar } from "../internals/components/PickersToolbar.js";
|
|
14
|
+
import { PickersToolbarButton } from "../internals/components/PickersToolbarButton.js";
|
|
15
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
16
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
17
|
+
import { dateTimePickerToolbarClasses, getDateTimePickerToolbarUtilityClass } from "./dateTimePickerToolbarClasses.js";
|
|
18
|
+
import { useMeridiemMode } from "../internals/hooks/date-helpers-hooks.js";
|
|
19
|
+
import { MULTI_SECTION_CLOCK_SECTION_WIDTH } from "../internals/constants/dimensions.js";
|
|
20
|
+
import { formatMeridiem } from "../internals/utils/date-utils.js";
|
|
21
|
+
import { pickersToolbarTextClasses } from "../internals/components/pickersToolbarTextClasses.js";
|
|
22
|
+
import { pickersToolbarClasses } from "../internals/components/pickersToolbarClasses.js";
|
|
21
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
24
|
const useUtilityClasses = ownerState => {
|
|
23
25
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DateTimePicker } from
|
|
2
|
-
export { DateTimePickerTabs } from
|
|
3
|
-
export { dateTimePickerTabsClasses } from
|
|
4
|
-
export { DateTimePickerToolbar } from
|
|
5
|
-
export { dateTimePickerToolbarClasses } from
|
|
1
|
+
export { DateTimePicker } from "./DateTimePicker.js";
|
|
2
|
+
export { DateTimePickerTabs } from "./DateTimePickerTabs.js";
|
|
3
|
+
export { dateTimePickerTabsClasses } from "./dateTimePickerTabsClasses.js";
|
|
4
|
+
export { DateTimePickerToolbar } from "./DateTimePickerToolbar.js";
|
|
5
|
+
export { dateTimePickerToolbarClasses } from "./dateTimePickerToolbarClasses.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
|
-
import { useDefaultDates, useUtils } from
|
|
5
|
-
import { applyDefaultDate } from
|
|
6
|
-
import { DateTimePickerTabs } from
|
|
7
|
-
import { DateTimePickerToolbar } from
|
|
8
|
-
import { applyDefaultViewProps } from
|
|
4
|
+
import { useDefaultDates, useUtils } from "../internals/hooks/useUtils.js";
|
|
5
|
+
import { applyDefaultDate } from "../internals/utils/date-utils.js";
|
|
6
|
+
import { DateTimePickerTabs } from "./DateTimePickerTabs.js";
|
|
7
|
+
import { DateTimePickerToolbar } from "./DateTimePickerToolbar.js";
|
|
8
|
+
import { applyDefaultViewProps } from "../internals/utils/views.js";
|
|
9
9
|
export function useDateTimePickerDefaultizedProps(props, name) {
|
|
10
10
|
const utils = useUtils();
|
|
11
11
|
const defaultDates = useDefaultDates();
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["className"];
|
|
@@ -7,8 +9,8 @@ import clsx from 'clsx';
|
|
|
7
9
|
import Skeleton from '@mui/material/Skeleton';
|
|
8
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
11
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import { DAY_SIZE, DAY_MARGIN } from
|
|
11
|
-
import { getDayCalendarSkeletonUtilityClass } from
|
|
12
|
+
import { DAY_SIZE, DAY_MARGIN } from "../internals/constants/dimensions.js";
|
|
13
|
+
import { getDayCalendarSkeletonUtilityClass } from "./dayCalendarSkeletonClasses.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
const useUtilityClasses = ownerState => {
|
|
14
16
|
const {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DayCalendarSkeleton } from
|
|
2
|
-
export { dayCalendarSkeletonClasses, getDayCalendarSkeletonUtilityClass } from
|
|
1
|
+
export { DayCalendarSkeleton } from "./DayCalendarSkeleton.js";
|
|
2
|
+
export { dayCalendarSkeletonClasses, getDayCalendarSkeletonUtilityClass } from "./dayCalendarSkeletonClasses.js";
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
5
7
|
import { refType } from '@mui/utils';
|
|
6
|
-
import { singleItemValueManager } from
|
|
7
|
-
import { useDatePickerDefaultizedProps } from
|
|
8
|
-
import { usePickersTranslations } from
|
|
9
|
-
import { useUtils } from
|
|
10
|
-
import { validateDate } from
|
|
11
|
-
import { useDesktopPicker } from
|
|
12
|
-
import { CalendarIcon } from
|
|
13
|
-
import { DateField } from
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
8
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
9
|
+
import { useDatePickerDefaultizedProps } from "../DatePicker/shared.js";
|
|
10
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
11
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
12
|
+
import { validateDate, extractValidationProps } from "../validation/index.js";
|
|
13
|
+
import { useDesktopPicker } from "../internals/hooks/useDesktopPicker/index.js";
|
|
14
|
+
import { CalendarIcon } from "../icons/index.js";
|
|
15
|
+
import { DateField } from "../DateField/index.js";
|
|
16
|
+
import { renderDateViewCalendar } from "../dateViewRenderers/index.js";
|
|
17
|
+
import { resolveDateFormat } from "../internals/utils/date-utils.js";
|
|
18
|
+
import { buildGetOpenDialogAriaText } from "../locales/utils/getPickersLocalization.js";
|
|
17
19
|
/**
|
|
18
20
|
* Demos:
|
|
19
21
|
*
|
|
@@ -60,7 +62,12 @@ const DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePick
|
|
|
60
62
|
props,
|
|
61
63
|
valueManager: singleItemValueManager,
|
|
62
64
|
valueType: 'date',
|
|
63
|
-
getOpenDialogAriaText:
|
|
65
|
+
getOpenDialogAriaText: buildGetOpenDialogAriaText({
|
|
66
|
+
utils,
|
|
67
|
+
formatKey: 'fullDate',
|
|
68
|
+
contextTranslation: translations.openDatePickerDialogue,
|
|
69
|
+
propsTranslation: props.localeText?.openDatePickerDialogue
|
|
70
|
+
}),
|
|
64
71
|
validator: validateDate
|
|
65
72
|
});
|
|
66
73
|
return renderPicker();
|
|
@@ -184,16 +191,16 @@ DesktopDatePicker.propTypes = {
|
|
|
184
191
|
name: PropTypes.string,
|
|
185
192
|
/**
|
|
186
193
|
* Callback fired when the value is accepted.
|
|
187
|
-
* @template TValue The value type.
|
|
188
|
-
* @template TError The validation error type.
|
|
194
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
195
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
189
196
|
* @param {TValue} value The value that was just accepted.
|
|
190
197
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
191
198
|
*/
|
|
192
199
|
onAccept: PropTypes.func,
|
|
193
200
|
/**
|
|
194
201
|
* Callback fired when the value changes.
|
|
195
|
-
* @template TValue The value type.
|
|
196
|
-
* @template TError The validation error type.
|
|
202
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
203
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
197
204
|
* @param {TValue} value The new value.
|
|
198
205
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
199
206
|
*/
|
|
@@ -204,13 +211,13 @@ DesktopDatePicker.propTypes = {
|
|
|
204
211
|
*/
|
|
205
212
|
onClose: PropTypes.func,
|
|
206
213
|
/**
|
|
207
|
-
* Callback fired when the error associated
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
* @template
|
|
211
|
-
* @template
|
|
212
|
-
* @param {TError} error The
|
|
213
|
-
* @param {TValue} value The value associated
|
|
214
|
+
* Callback fired when the error associated with the current value changes.
|
|
215
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
216
|
+
* This can be used to render an appropriate form error.
|
|
217
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
218
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
219
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
220
|
+
* @param {TValue} value The value associated with the error.
|
|
214
221
|
*/
|
|
215
222
|
onError: PropTypes.func,
|
|
216
223
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DesktopDatePicker } from
|
|
1
|
+
export { DesktopDatePicker } from "./DesktopDatePicker.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["openTo", "focusedView", "timeViewsCount"];
|
|
@@ -6,24 +8,24 @@ import PropTypes from 'prop-types';
|
|
|
6
8
|
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
7
9
|
import { refType } from '@mui/utils';
|
|
8
10
|
import Divider from '@mui/material/Divider';
|
|
9
|
-
import { singleItemValueManager } from
|
|
10
|
-
import { DateTimeField } from
|
|
11
|
-
import { useDateTimePickerDefaultizedProps } from
|
|
12
|
-
import { renderDateViewCalendar } from
|
|
13
|
-
import { usePickersTranslations } from
|
|
14
|
-
import { useUtils } from
|
|
15
|
-
import { validateDateTime } from
|
|
16
|
-
import { CalendarIcon } from
|
|
17
|
-
import { useDesktopPicker } from
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
11
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
12
|
+
import { DateTimeField } from "../DateTimeField/index.js";
|
|
13
|
+
import { useDateTimePickerDefaultizedProps } from "../DateTimePicker/shared.js";
|
|
14
|
+
import { renderDateViewCalendar } from "../dateViewRenderers/dateViewRenderers.js";
|
|
15
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
16
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
17
|
+
import { validateDateTime, extractValidationProps } from "../validation/index.js";
|
|
18
|
+
import { CalendarIcon } from "../icons/index.js";
|
|
19
|
+
import { useDesktopPicker } from "../internals/hooks/useDesktopPicker/index.js";
|
|
20
|
+
import { resolveDateTimeFormat, resolveTimeViewsResponse } from "../internals/utils/date-time-utils.js";
|
|
21
|
+
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from "../timeViewRenderers/index.js";
|
|
22
|
+
import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from "../MultiSectionDigitalClock/index.js";
|
|
23
|
+
import { digitalClockClasses } from "../DigitalClock/index.js";
|
|
24
|
+
import { DesktopDateTimePickerLayout } from "./DesktopDateTimePickerLayout.js";
|
|
25
|
+
import { VIEW_HEIGHT } from "../internals/constants/dimensions.js";
|
|
26
|
+
import { isInternalTimeView } from "../internals/utils/time-utils.js";
|
|
27
|
+
import { isDatePickerView } from "../internals/utils/date-utils.js";
|
|
28
|
+
import { buildGetOpenDialogAriaText } from "../locales/utils/getPickersLocalization.js";
|
|
27
29
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
30
|
const rendererInterceptor = function rendererInterceptor(inViewRenderers, popperView, rendererProps) {
|
|
29
31
|
const {
|
|
@@ -146,7 +148,12 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
|
|
|
146
148
|
props,
|
|
147
149
|
valueManager: singleItemValueManager,
|
|
148
150
|
valueType: 'date-time',
|
|
149
|
-
getOpenDialogAriaText:
|
|
151
|
+
getOpenDialogAriaText: buildGetOpenDialogAriaText({
|
|
152
|
+
utils,
|
|
153
|
+
formatKey: 'fullDate',
|
|
154
|
+
contextTranslation: translations.openDatePickerDialogue,
|
|
155
|
+
propsTranslation: props.localeText?.openDatePickerDialogue
|
|
156
|
+
}),
|
|
150
157
|
validator: validateDateTime,
|
|
151
158
|
rendererInterceptor
|
|
152
159
|
});
|
|
@@ -309,16 +316,16 @@ DesktopDateTimePicker.propTypes = {
|
|
|
309
316
|
name: PropTypes.string,
|
|
310
317
|
/**
|
|
311
318
|
* Callback fired when the value is accepted.
|
|
312
|
-
* @template TValue The value type.
|
|
313
|
-
* @template TError The validation error type.
|
|
319
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
320
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
314
321
|
* @param {TValue} value The value that was just accepted.
|
|
315
322
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
316
323
|
*/
|
|
317
324
|
onAccept: PropTypes.func,
|
|
318
325
|
/**
|
|
319
326
|
* Callback fired when the value changes.
|
|
320
|
-
* @template TValue The value type.
|
|
321
|
-
* @template TError The validation error type.
|
|
327
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
328
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
322
329
|
* @param {TValue} value The new value.
|
|
323
330
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
324
331
|
*/
|
|
@@ -329,13 +336,13 @@ DesktopDateTimePicker.propTypes = {
|
|
|
329
336
|
*/
|
|
330
337
|
onClose: PropTypes.func,
|
|
331
338
|
/**
|
|
332
|
-
* Callback fired when the error associated
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
* @template
|
|
336
|
-
* @template
|
|
337
|
-
* @param {TError} error The
|
|
338
|
-
* @param {TValue} value The value associated
|
|
339
|
+
* Callback fired when the error associated with the current value changes.
|
|
340
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
341
|
+
* This can be used to render an appropriate form error.
|
|
342
|
+
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
343
|
+
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
344
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
345
|
+
* @param {TValue} value The value associated with the error.
|
|
339
346
|
*/
|
|
340
347
|
onError: PropTypes.func,
|
|
341
348
|
/**
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
6
6
|
import Divider from '@mui/material/Divider';
|
|
7
|
-
import { PickersLayoutContentWrapper, PickersLayoutRoot, pickersLayoutClasses, usePickerLayout } from
|
|
7
|
+
import { PickersLayoutContentWrapper, PickersLayoutRoot, pickersLayoutClasses, usePickerLayout } from "../PickersLayout/index.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
/**
|
|
10
10
|
* @ignore - internal component.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DesktopDateTimePicker } from
|
|
2
|
-
export { DesktopDateTimePickerLayout } from
|
|
1
|
+
export { DesktopDateTimePicker } from "./DesktopDateTimePicker.js";
|
|
2
|
+
export { DesktopDateTimePickerLayout } from "./DesktopDateTimePickerLayout.js";
|