@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,20 +1,22 @@
|
|
|
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 { TimeField } from
|
|
8
|
-
import { useTimePickerDefaultizedProps } from
|
|
9
|
-
import { usePickersTranslations } from
|
|
10
|
-
import { useUtils } from
|
|
11
|
-
import { validateTime } from
|
|
12
|
-
import { ClockIcon } from
|
|
13
|
-
import { useDesktopPicker } from
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
8
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
9
|
+
import { TimeField } from "../TimeField/index.js";
|
|
10
|
+
import { useTimePickerDefaultizedProps } from "../TimePicker/shared.js";
|
|
11
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
12
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
13
|
+
import { extractValidationProps, validateTime } from "../validation/index.js";
|
|
14
|
+
import { ClockIcon } from "../icons/index.js";
|
|
15
|
+
import { useDesktopPicker } from "../internals/hooks/useDesktopPicker/index.js";
|
|
16
|
+
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from "../timeViewRenderers/index.js";
|
|
17
|
+
import { resolveTimeFormat } from "../internals/utils/time-utils.js";
|
|
18
|
+
import { resolveTimeViewsResponse } from "../internals/utils/date-time-utils.js";
|
|
19
|
+
import { buildGetOpenDialogAriaText } from "../locales/utils/getPickersLocalization.js";
|
|
18
20
|
/**
|
|
19
21
|
* Demos:
|
|
20
22
|
*
|
|
@@ -81,7 +83,12 @@ const DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DesktopTimePick
|
|
|
81
83
|
props,
|
|
82
84
|
valueManager: singleItemValueManager,
|
|
83
85
|
valueType: 'time',
|
|
84
|
-
getOpenDialogAriaText:
|
|
86
|
+
getOpenDialogAriaText: buildGetOpenDialogAriaText({
|
|
87
|
+
utils,
|
|
88
|
+
formatKey: 'fullTime',
|
|
89
|
+
contextTranslation: translations.openTimePickerDialogue,
|
|
90
|
+
propsTranslation: props.localeText?.openTimePickerDialogue
|
|
91
|
+
}),
|
|
85
92
|
validator: validateTime
|
|
86
93
|
});
|
|
87
94
|
return renderPicker();
|
|
@@ -193,16 +200,16 @@ DesktopTimePicker.propTypes = {
|
|
|
193
200
|
name: PropTypes.string,
|
|
194
201
|
/**
|
|
195
202
|
* Callback fired when the value is accepted.
|
|
196
|
-
* @template TValue The value type.
|
|
197
|
-
* @template TError The validation error type.
|
|
203
|
+
* @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.
|
|
204
|
+
* @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.
|
|
198
205
|
* @param {TValue} value The value that was just accepted.
|
|
199
206
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
200
207
|
*/
|
|
201
208
|
onAccept: PropTypes.func,
|
|
202
209
|
/**
|
|
203
210
|
* Callback fired when the value changes.
|
|
204
|
-
* @template TValue The value type.
|
|
205
|
-
* @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.
|
|
206
213
|
* @param {TValue} value The new value.
|
|
207
214
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
208
215
|
*/
|
|
@@ -213,13 +220,13 @@ DesktopTimePicker.propTypes = {
|
|
|
213
220
|
*/
|
|
214
221
|
onClose: PropTypes.func,
|
|
215
222
|
/**
|
|
216
|
-
* Callback fired when the error associated
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* @template
|
|
220
|
-
* @template
|
|
221
|
-
* @param {TError} error The
|
|
222
|
-
* @param {TValue} value The value associated
|
|
223
|
+
* Callback fired when the error associated with the current value changes.
|
|
224
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
225
|
+
* This can be used to render an appropriate form error.
|
|
226
|
+
* @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
|
+
* @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
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
229
|
+
* @param {TValue} value The value associated with the error.
|
|
223
230
|
*/
|
|
224
231
|
onError: PropTypes.func,
|
|
225
232
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DesktopTimePicker } from
|
|
1
|
+
export { DesktopTimePicker } from "./DesktopTimePicker.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 = ["ampm", "timeStep", "autoFocus", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableTime", "onChange", "view", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "views", "skipDisabled", "timezone"];
|
|
@@ -11,16 +13,16 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
11
13
|
import MenuItem from '@mui/material/MenuItem';
|
|
12
14
|
import MenuList from '@mui/material/MenuList';
|
|
13
15
|
import useForkRef from '@mui/utils/useForkRef';
|
|
14
|
-
import { usePickersTranslations } from
|
|
15
|
-
import { useUtils, useNow } from
|
|
16
|
-
import { createIsAfterIgnoreDatePart } from
|
|
17
|
-
import { PickerViewRoot } from
|
|
18
|
-
import { getDigitalClockUtilityClass } from
|
|
19
|
-
import { useViews } from
|
|
20
|
-
import { DIGITAL_CLOCK_VIEW_HEIGHT } from
|
|
21
|
-
import { useControlledValueWithTimezone } from
|
|
22
|
-
import { singleItemValueManager } from
|
|
23
|
-
import { useClockReferenceDate } from
|
|
16
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
17
|
+
import { useUtils, useNow } from "../internals/hooks/useUtils.js";
|
|
18
|
+
import { createIsAfterIgnoreDatePart } from "../internals/utils/time-utils.js";
|
|
19
|
+
import { PickerViewRoot } from "../internals/components/PickerViewRoot/index.js";
|
|
20
|
+
import { getDigitalClockUtilityClass } from "./digitalClockClasses.js";
|
|
21
|
+
import { useViews } from "../internals/hooks/useViews.js";
|
|
22
|
+
import { DIGITAL_CLOCK_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
|
|
23
|
+
import { useControlledValueWithTimezone } from "../internals/hooks/useValueWithTimezone.js";
|
|
24
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
25
|
+
import { useClockReferenceDate } from "../internals/hooks/useClockReferenceDate.js";
|
|
24
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
27
|
const useUtilityClasses = ownerState => {
|
|
26
28
|
const {
|
|
@@ -336,7 +338,7 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
|
|
|
336
338
|
minutesStep: PropTypes.number,
|
|
337
339
|
/**
|
|
338
340
|
* Callback fired when the value changes.
|
|
339
|
-
* @template TValue The value type.
|
|
341
|
+
* @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.
|
|
340
342
|
* @template TView The view type. Will be one of date or time views.
|
|
341
343
|
* @param {TValue} value The new value.
|
|
342
344
|
* @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DigitalClock } from
|
|
2
|
-
export { digitalClockClasses, getDigitalClockUtilityClass } from
|
|
1
|
+
export { DigitalClock } from "./DigitalClock.js";
|
|
2
|
+
export { digitalClockClasses, getDigitalClockUtilityClass } from "./digitalClockClasses.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { LocalizationProvider, MuiPickersAdapterContext } from
|
|
1
|
+
export { LocalizationProvider, MuiPickersAdapterContext } from "./LocalizationProvider.js";
|
|
@@ -1,18 +1,20 @@
|
|
|
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 { useMobilePicker } from
|
|
7
|
-
import { useDatePickerDefaultizedProps } from
|
|
8
|
-
import { usePickersTranslations } from
|
|
9
|
-
import { useUtils } from
|
|
10
|
-
import { validateDate } from
|
|
11
|
-
import { DateField } from
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import { useMobilePicker } from "../internals/hooks/useMobilePicker/index.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 { extractValidationProps, validateDate } from "../validation/index.js";
|
|
13
|
+
import { DateField } from "../DateField/index.js";
|
|
14
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
15
|
+
import { renderDateViewCalendar } from "../dateViewRenderers/index.js";
|
|
16
|
+
import { resolveDateFormat } from "../internals/utils/date-utils.js";
|
|
17
|
+
import { buildGetOpenDialogAriaText } from "../locales/utils/getPickersLocalization.js";
|
|
16
18
|
/**
|
|
17
19
|
* Demos:
|
|
18
20
|
*
|
|
@@ -57,7 +59,12 @@ const MobileDatePicker = /*#__PURE__*/React.forwardRef(function MobileDatePicker
|
|
|
57
59
|
props,
|
|
58
60
|
valueManager: singleItemValueManager,
|
|
59
61
|
valueType: 'date',
|
|
60
|
-
getOpenDialogAriaText:
|
|
62
|
+
getOpenDialogAriaText: buildGetOpenDialogAriaText({
|
|
63
|
+
utils,
|
|
64
|
+
formatKey: 'fullDate',
|
|
65
|
+
contextTranslation: translations.openDatePickerDialogue,
|
|
66
|
+
propsTranslation: props.localeText?.openDatePickerDialogue
|
|
67
|
+
}),
|
|
61
68
|
validator: validateDate
|
|
62
69
|
});
|
|
63
70
|
return renderPicker();
|
|
@@ -181,16 +188,16 @@ MobileDatePicker.propTypes = {
|
|
|
181
188
|
name: PropTypes.string,
|
|
182
189
|
/**
|
|
183
190
|
* Callback fired when the value is accepted.
|
|
184
|
-
* @template TValue The value type.
|
|
185
|
-
* @template TError The validation error type.
|
|
191
|
+
* @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.
|
|
192
|
+
* @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.
|
|
186
193
|
* @param {TValue} value The value that was just accepted.
|
|
187
194
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
188
195
|
*/
|
|
189
196
|
onAccept: PropTypes.func,
|
|
190
197
|
/**
|
|
191
198
|
* Callback fired when the value changes.
|
|
192
|
-
* @template TValue The value type.
|
|
193
|
-
* @template TError The validation error type.
|
|
199
|
+
* @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.
|
|
200
|
+
* @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.
|
|
194
201
|
* @param {TValue} value The new value.
|
|
195
202
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
196
203
|
*/
|
|
@@ -201,13 +208,13 @@ MobileDatePicker.propTypes = {
|
|
|
201
208
|
*/
|
|
202
209
|
onClose: PropTypes.func,
|
|
203
210
|
/**
|
|
204
|
-
* Callback fired when the error associated
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* @template
|
|
208
|
-
* @template
|
|
209
|
-
* @param {TError} error The
|
|
210
|
-
* @param {TValue} value The value associated
|
|
211
|
+
* Callback fired when the error associated with the current value changes.
|
|
212
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
213
|
+
* This can be used to render an appropriate form error.
|
|
214
|
+
* @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.
|
|
215
|
+
* @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.
|
|
216
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
217
|
+
* @param {TValue} value The value associated with the error.
|
|
211
218
|
*/
|
|
212
219
|
onError: PropTypes.func,
|
|
213
220
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MobileDatePicker } from
|
|
1
|
+
export { MobileDatePicker } from "./MobileDatePicker.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 { DateTimeField } from
|
|
8
|
-
import { useDateTimePickerDefaultizedProps } from
|
|
9
|
-
import { usePickersTranslations } from
|
|
10
|
-
import { useUtils } from
|
|
11
|
-
import { validateDateTime } from
|
|
12
|
-
import { useMobilePicker } from
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
8
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
9
|
+
import { DateTimeField } from "../DateTimeField/index.js";
|
|
10
|
+
import { useDateTimePickerDefaultizedProps } from "../DateTimePicker/shared.js";
|
|
11
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
12
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
13
|
+
import { extractValidationProps, validateDateTime } from "../validation/index.js";
|
|
14
|
+
import { useMobilePicker } from "../internals/hooks/useMobilePicker/index.js";
|
|
15
|
+
import { renderDateViewCalendar } from "../dateViewRenderers/index.js";
|
|
16
|
+
import { renderTimeViewClock } from "../timeViewRenderers/index.js";
|
|
17
|
+
import { resolveDateTimeFormat } from "../internals/utils/date-time-utils.js";
|
|
18
|
+
import { buildGetOpenDialogAriaText } from "../locales/utils/getPickersLocalization.js";
|
|
17
19
|
/**
|
|
18
20
|
* Demos:
|
|
19
21
|
*
|
|
@@ -67,7 +69,12 @@ const MobileDateTimePicker = /*#__PURE__*/React.forwardRef(function MobileDateTi
|
|
|
67
69
|
props,
|
|
68
70
|
valueManager: singleItemValueManager,
|
|
69
71
|
valueType: 'date-time',
|
|
70
|
-
getOpenDialogAriaText:
|
|
72
|
+
getOpenDialogAriaText: buildGetOpenDialogAriaText({
|
|
73
|
+
utils,
|
|
74
|
+
formatKey: 'fullDate',
|
|
75
|
+
contextTranslation: translations.openDatePickerDialogue,
|
|
76
|
+
propsTranslation: props.localeText?.openDatePickerDialogue
|
|
77
|
+
}),
|
|
71
78
|
validator: validateDateTime
|
|
72
79
|
});
|
|
73
80
|
return renderPicker();
|
|
@@ -229,16 +236,16 @@ MobileDateTimePicker.propTypes = {
|
|
|
229
236
|
name: PropTypes.string,
|
|
230
237
|
/**
|
|
231
238
|
* Callback fired when the value is accepted.
|
|
232
|
-
* @template TValue The value type.
|
|
233
|
-
* @template TError The validation error type.
|
|
239
|
+
* @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.
|
|
240
|
+
* @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.
|
|
234
241
|
* @param {TValue} value The value that was just accepted.
|
|
235
242
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
236
243
|
*/
|
|
237
244
|
onAccept: PropTypes.func,
|
|
238
245
|
/**
|
|
239
246
|
* Callback fired when the value changes.
|
|
240
|
-
* @template TValue The value type.
|
|
241
|
-
* @template TError The validation error type.
|
|
247
|
+
* @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.
|
|
248
|
+
* @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
249
|
* @param {TValue} value The new value.
|
|
243
250
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
244
251
|
*/
|
|
@@ -249,13 +256,13 @@ MobileDateTimePicker.propTypes = {
|
|
|
249
256
|
*/
|
|
250
257
|
onClose: PropTypes.func,
|
|
251
258
|
/**
|
|
252
|
-
* Callback fired when the error associated
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* @template
|
|
256
|
-
* @template
|
|
257
|
-
* @param {TError} error The
|
|
258
|
-
* @param {TValue} value The value associated
|
|
259
|
+
* Callback fired when the error associated with the current value changes.
|
|
260
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
261
|
+
* This can be used to render an appropriate form error.
|
|
262
|
+
* @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.
|
|
263
|
+
* @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.
|
|
264
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
265
|
+
* @param {TValue} value The value associated with the error.
|
|
259
266
|
*/
|
|
260
267
|
onError: PropTypes.func,
|
|
261
268
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MobileDateTimePicker } from
|
|
1
|
+
export { MobileDateTimePicker } from "./MobileDateTimePicker.js";
|
|
@@ -1,18 +1,20 @@
|
|
|
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 { TimeField } from
|
|
8
|
-
import { useTimePickerDefaultizedProps } from
|
|
9
|
-
import { usePickersTranslations } from
|
|
10
|
-
import { useUtils } from
|
|
11
|
-
import { validateTime } from
|
|
12
|
-
import { useMobilePicker } from
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
9
|
+
import { TimeField } from "../TimeField/index.js";
|
|
10
|
+
import { useTimePickerDefaultizedProps } from "../TimePicker/shared.js";
|
|
11
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
12
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
13
|
+
import { extractValidationProps, validateTime } from "../validation/index.js";
|
|
14
|
+
import { useMobilePicker } from "../internals/hooks/useMobilePicker/index.js";
|
|
15
|
+
import { renderTimeViewClock } from "../timeViewRenderers/index.js";
|
|
16
|
+
import { resolveTimeFormat } from "../internals/utils/time-utils.js";
|
|
17
|
+
import { buildGetOpenDialogAriaText } from "../locales/utils/getPickersLocalization.js";
|
|
16
18
|
/**
|
|
17
19
|
* Demos:
|
|
18
20
|
*
|
|
@@ -60,7 +62,12 @@ const MobileTimePicker = /*#__PURE__*/React.forwardRef(function MobileTimePicker
|
|
|
60
62
|
props,
|
|
61
63
|
valueManager: singleItemValueManager,
|
|
62
64
|
valueType: 'time',
|
|
63
|
-
getOpenDialogAriaText:
|
|
65
|
+
getOpenDialogAriaText: buildGetOpenDialogAriaText({
|
|
66
|
+
utils,
|
|
67
|
+
formatKey: 'fullTime',
|
|
68
|
+
contextTranslation: translations.openTimePickerDialogue,
|
|
69
|
+
propsTranslation: props.localeText?.openTimePickerDialogue
|
|
70
|
+
}),
|
|
64
71
|
validator: validateTime
|
|
65
72
|
});
|
|
66
73
|
return renderPicker();
|
|
@@ -172,16 +179,16 @@ MobileTimePicker.propTypes = {
|
|
|
172
179
|
name: PropTypes.string,
|
|
173
180
|
/**
|
|
174
181
|
* Callback fired when the value is accepted.
|
|
175
|
-
* @template TValue The value type.
|
|
176
|
-
* @template TError The validation error type.
|
|
182
|
+
* @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.
|
|
183
|
+
* @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.
|
|
177
184
|
* @param {TValue} value The value that was just accepted.
|
|
178
185
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
179
186
|
*/
|
|
180
187
|
onAccept: PropTypes.func,
|
|
181
188
|
/**
|
|
182
189
|
* Callback fired when the value changes.
|
|
183
|
-
* @template TValue The value type.
|
|
184
|
-
* @template TError The validation error type.
|
|
190
|
+
* @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.
|
|
191
|
+
* @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.
|
|
185
192
|
* @param {TValue} value The new value.
|
|
186
193
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
187
194
|
*/
|
|
@@ -192,13 +199,13 @@ MobileTimePicker.propTypes = {
|
|
|
192
199
|
*/
|
|
193
200
|
onClose: PropTypes.func,
|
|
194
201
|
/**
|
|
195
|
-
* Callback fired when the error associated
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
* @template
|
|
199
|
-
* @template
|
|
200
|
-
* @param {TError} error The
|
|
201
|
-
* @param {TValue} value The value associated
|
|
202
|
+
* Callback fired when the error associated with the current value changes.
|
|
203
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
204
|
+
* This can be used to render an appropriate form error.
|
|
205
|
+
* @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.
|
|
206
|
+
* @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.
|
|
207
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
208
|
+
* @param {TValue} value The value associated with the error.
|
|
202
209
|
*/
|
|
203
210
|
onError: PropTypes.func,
|
|
204
211
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MobileTimePicker } from
|
|
1
|
+
export { MobileTimePicker } from "./MobileTimePicker.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["className", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "shouldDisableMonth", "readOnly", "disableHighlightToday", "autoFocus", "onMonthFocus", "hasFocus", "onFocusedViewChange", "monthsPerRow", "timezone", "gridLabelId", "slots", "slotProps"];
|
|
@@ -7,14 +9,14 @@ import clsx from 'clsx';
|
|
|
7
9
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
8
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
11
|
import { unstable_useControlled as useControlled, unstable_composeClasses as composeClasses, unstable_useEventCallback as useEventCallback } from '@mui/utils';
|
|
10
|
-
import { PickersMonth } from
|
|
11
|
-
import { useUtils, useNow, useDefaultDates } from
|
|
12
|
-
import { getMonthCalendarUtilityClass } from
|
|
13
|
-
import { applyDefaultDate, getMonthsInYear } from
|
|
14
|
-
import { singleItemValueManager } from
|
|
15
|
-
import { SECTION_TYPE_GRANULARITY } from
|
|
16
|
-
import { useControlledValueWithTimezone } from
|
|
17
|
-
import { DIALOG_WIDTH } from
|
|
12
|
+
import { PickersMonth } from "./PickersMonth.js";
|
|
13
|
+
import { useUtils, useNow, useDefaultDates } from "../internals/hooks/useUtils.js";
|
|
14
|
+
import { getMonthCalendarUtilityClass } from "./monthCalendarClasses.js";
|
|
15
|
+
import { applyDefaultDate, getMonthsInYear } from "../internals/utils/date-utils.js";
|
|
16
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
17
|
+
import { SECTION_TYPE_GRANULARITY } from "../internals/utils/getDefaultReferenceDate.js";
|
|
18
|
+
import { useControlledValueWithTimezone } from "../internals/hooks/useValueWithTimezone.js";
|
|
19
|
+
import { DIALOG_WIDTH } from "../internals/constants/dimensions.js";
|
|
18
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
21
|
const useUtilityClasses = ownerState => {
|
|
20
22
|
const {
|
|
@@ -7,7 +7,7 @@ import { styled, alpha, useThemeProps } from '@mui/material/styles';
|
|
|
7
7
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
10
|
-
import { getPickersMonthUtilityClass, pickersMonthClasses } from
|
|
10
|
+
import { getPickersMonthUtilityClass, pickersMonthClasses } from "./pickersMonthClasses.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const useUtilityClasses = ownerState => {
|
|
13
13
|
const {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MonthCalendar } from
|
|
2
|
-
export { monthCalendarClasses, getMonthCalendarUtilityClass } from
|
|
3
|
-
export { pickersMonthClasses } from
|
|
1
|
+
export { MonthCalendar } from "./MonthCalendar.js";
|
|
2
|
+
export { monthCalendarClasses, getMonthCalendarUtilityClass } from "./monthCalendarClasses.js";
|
|
3
|
+
export { pickersMonthClasses } from "./pickersMonthClasses.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 = ["ampm", "timeSteps", "autoFocus", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableTime", "onChange", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "skipDisabled", "timezone"];
|
|
@@ -8,19 +10,19 @@ import { useRtl } from '@mui/system/RtlProvider';
|
|
|
8
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
11
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
10
12
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
|
-
import { usePickersTranslations } from
|
|
12
|
-
import { useUtils, useNow } from
|
|
13
|
-
import { convertValueToMeridiem, createIsAfterIgnoreDatePart } from
|
|
14
|
-
import { useViews } from
|
|
15
|
-
import { useMeridiemMode } from
|
|
16
|
-
import { PickerViewRoot } from
|
|
17
|
-
import { getMultiSectionDigitalClockUtilityClass } from
|
|
18
|
-
import { MultiSectionDigitalClockSection } from
|
|
19
|
-
import { getHourSectionOptions, getTimeSectionOptions } from
|
|
20
|
-
import { useControlledValueWithTimezone } from
|
|
21
|
-
import { singleItemValueManager } from
|
|
22
|
-
import { useClockReferenceDate } from
|
|
23
|
-
import { formatMeridiem } from
|
|
13
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
14
|
+
import { useUtils, useNow } from "../internals/hooks/useUtils.js";
|
|
15
|
+
import { convertValueToMeridiem, createIsAfterIgnoreDatePart } from "../internals/utils/time-utils.js";
|
|
16
|
+
import { useViews } from "../internals/hooks/useViews.js";
|
|
17
|
+
import { useMeridiemMode } from "../internals/hooks/date-helpers-hooks.js";
|
|
18
|
+
import { PickerViewRoot } from "../internals/components/PickerViewRoot/index.js";
|
|
19
|
+
import { getMultiSectionDigitalClockUtilityClass } from "./multiSectionDigitalClockClasses.js";
|
|
20
|
+
import { MultiSectionDigitalClockSection } from "./MultiSectionDigitalClockSection.js";
|
|
21
|
+
import { getHourSectionOptions, getTimeSectionOptions } from "./MultiSectionDigitalClock.utils.js";
|
|
22
|
+
import { useControlledValueWithTimezone } from "../internals/hooks/useValueWithTimezone.js";
|
|
23
|
+
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
24
|
+
import { useClockReferenceDate } from "../internals/hooks/useClockReferenceDate.js";
|
|
25
|
+
import { formatMeridiem } from "../internals/utils/date-utils.js";
|
|
24
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
27
|
const useUtilityClasses = ownerState => {
|
|
26
28
|
const {
|
|
@@ -303,11 +305,11 @@ export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function M
|
|
|
303
305
|
return views;
|
|
304
306
|
}
|
|
305
307
|
const digitViews = views.filter(v => v !== 'meridiem');
|
|
306
|
-
|
|
308
|
+
digitViews.reverse();
|
|
307
309
|
if (views.includes('meridiem')) {
|
|
308
|
-
|
|
310
|
+
digitViews.push('meridiem');
|
|
309
311
|
}
|
|
310
|
-
return
|
|
312
|
+
return digitViews;
|
|
311
313
|
}, [isRtl, views]);
|
|
312
314
|
const viewTimeOptions = React.useMemo(() => {
|
|
313
315
|
return views.reduce((result, currentView) => {
|
|
@@ -406,7 +408,7 @@ process.env.NODE_ENV !== "production" ? MultiSectionDigitalClock.propTypes = {
|
|
|
406
408
|
minutesStep: PropTypes.number,
|
|
407
409
|
/**
|
|
408
410
|
* Callback fired when the value changes.
|
|
409
|
-
* @template TValue The value type.
|
|
411
|
+
* @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.
|
|
410
412
|
* @template TView The view type. Will be one of date or time views.
|
|
411
413
|
* @param {TValue} value The new value.
|
|
412
414
|
* @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.
|
|
@@ -8,8 +8,8 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
8
8
|
import MenuList from '@mui/material/MenuList';
|
|
9
9
|
import MenuItem from '@mui/material/MenuItem';
|
|
10
10
|
import useForkRef from '@mui/utils/useForkRef';
|
|
11
|
-
import { getMultiSectionDigitalClockSectionUtilityClass } from
|
|
12
|
-
import { DIGITAL_CLOCK_VIEW_HEIGHT, MULTI_SECTION_CLOCK_SECTION_WIDTH } from
|
|
11
|
+
import { getMultiSectionDigitalClockSectionUtilityClass } from "./multiSectionDigitalClockSectionClasses.js";
|
|
12
|
+
import { DIGITAL_CLOCK_VIEW_HEIGHT, MULTI_SECTION_CLOCK_SECTION_WIDTH } from "../internals/constants/dimensions.js";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MultiSectionDigitalClock } from
|
|
2
|
-
export { multiSectionDigitalClockSectionClasses } from
|
|
3
|
-
export { multiSectionDigitalClockClasses, getMultiSectionDigitalClockUtilityClass } from
|
|
1
|
+
export { MultiSectionDigitalClock } from "./MultiSectionDigitalClock.js";
|
|
2
|
+
export { multiSectionDigitalClockSectionClasses } from "./multiSectionDigitalClockSectionClasses.js";
|
|
3
|
+
export { multiSectionDigitalClockClasses, getMultiSectionDigitalClockUtilityClass } from "./multiSectionDigitalClockClasses.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 = ["onAccept", "onClear", "onCancel", "onSetToday", "actions"];
|
|
@@ -5,7 +7,7 @@ import * as React from 'react';
|
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import Button from '@mui/material/Button';
|
|
7
9
|
import DialogActions from '@mui/material/DialogActions';
|
|
8
|
-
import { usePickersTranslations } from
|
|
10
|
+
import { usePickersTranslations } from "../hooks/usePickersTranslations.js";
|
|
9
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
12
|
/**
|
|
11
13
|
* Demos:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PickersActionBar } from
|
|
1
|
+
export { PickersActionBar } from "./PickersActionBar.js";
|