@mui/x-date-pickers 8.0.0-beta.2 → 8.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +141 -0
- package/DateField/DateField.js +4 -4
- package/DateTimeField/DateTimeField.js +4 -4
- package/DesktopDatePicker/DesktopDatePicker.js +2 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -1
- package/DesktopTimePicker/DesktopTimePicker.js +2 -1
- package/DigitalClock/DigitalClock.js +1 -0
- package/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/LocalizationProvider/LocalizationProvider.js +2 -2
- package/MobileDatePicker/MobileDatePicker.js +2 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +9 -1
- package/MobileTimePicker/MobileTimePicker.js +2 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +1 -0
- package/PickersActionBar/PickersActionBar.d.ts +1 -1
- package/PickersActionBar/PickersActionBar.js +21 -3
- package/StaticDatePicker/StaticDatePicker.js +2 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +9 -1
- package/StaticTimePicker/StaticTimePicker.js +2 -1
- package/TimeField/TimeField.js +4 -4
- package/esm/DateField/DateField.js +4 -4
- package/esm/DateTimeField/DateTimeField.js +4 -4
- package/esm/DesktopDatePicker/DesktopDatePicker.js +2 -1
- package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -1
- package/esm/DesktopTimePicker/DesktopTimePicker.js +2 -1
- package/esm/DigitalClock/DigitalClock.js +1 -0
- package/esm/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/esm/LocalizationProvider/LocalizationProvider.js +2 -2
- package/esm/MobileDatePicker/MobileDatePicker.js +2 -1
- package/esm/MobileDateTimePicker/MobileDateTimePicker.js +9 -1
- package/esm/MobileTimePicker/MobileTimePicker.js +2 -1
- package/esm/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +1 -0
- package/esm/PickersActionBar/PickersActionBar.d.ts +1 -1
- package/esm/PickersActionBar/PickersActionBar.js +22 -4
- package/esm/StaticDatePicker/StaticDatePicker.js +2 -1
- package/esm/StaticDateTimePicker/StaticDateTimePicker.js +9 -1
- package/esm/StaticTimePicker/StaticTimePicker.js +2 -1
- package/esm/TimeField/TimeField.js +4 -4
- package/esm/index.js +1 -1
- package/esm/internals/components/PickerProvider.d.ts +9 -0
- package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -0
- package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -3
- package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -0
- package/esm/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/esm/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -0
- package/esm/internals/hooks/useMobilePicker/useMobilePicker.js +9 -3
- package/esm/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -0
- package/esm/internals/hooks/usePicker/usePicker.d.ts +2 -1
- package/esm/internals/hooks/usePicker/usePicker.js +14 -4
- package/esm/internals/hooks/usePicker/usePicker.types.d.ts +2 -0
- package/esm/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -0
- package/esm/internals/hooks/useStaticPicker/useStaticPicker.js +9 -3
- package/esm/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +7 -0
- package/esm/internals/index.d.ts +3 -2
- package/esm/internals/index.js +3 -2
- package/esm/internals/utils/createNonRangePickerStepNavigation.d.ts +13 -0
- package/esm/internals/utils/createNonRangePickerStepNavigation.js +24 -0
- package/esm/internals/utils/createStepNavigation.d.ts +32 -0
- package/esm/internals/utils/createStepNavigation.js +34 -0
- package/esm/internals/utils/date-utils.d.ts +1 -0
- package/esm/internals/utils/date-utils.js +2 -2
- package/esm/internals/utils/time-utils.d.ts +2 -0
- package/esm/internals/utils/time-utils.js +4 -3
- package/esm/locales/beBY.d.ts +1 -0
- package/esm/locales/beBY.js +1 -0
- package/esm/locales/bgBG.d.ts +1 -0
- package/esm/locales/bgBG.js +1 -0
- package/esm/locales/bnBD.d.ts +1 -0
- package/esm/locales/bnBD.js +1 -0
- package/esm/locales/caES.d.ts +1 -0
- package/esm/locales/caES.js +1 -0
- package/esm/locales/csCZ.d.ts +1 -0
- package/esm/locales/csCZ.js +1 -0
- package/esm/locales/daDK.d.ts +1 -0
- package/esm/locales/daDK.js +1 -0
- package/esm/locales/deDE.d.ts +1 -0
- package/esm/locales/deDE.js +1 -0
- package/esm/locales/elGR.d.ts +1 -0
- package/esm/locales/elGR.js +1 -0
- package/esm/locales/enUS.d.ts +1 -0
- package/esm/locales/enUS.js +1 -0
- package/esm/locales/esES.d.ts +1 -0
- package/esm/locales/esES.js +1 -0
- package/esm/locales/eu.d.ts +1 -0
- package/esm/locales/eu.js +1 -0
- package/esm/locales/faIR.d.ts +1 -0
- package/esm/locales/faIR.js +1 -0
- package/esm/locales/fiFI.d.ts +1 -0
- package/esm/locales/fiFI.js +1 -0
- package/esm/locales/frFR.d.ts +1 -0
- package/esm/locales/frFR.js +1 -0
- package/esm/locales/heIL.d.ts +1 -0
- package/esm/locales/heIL.js +1 -0
- package/esm/locales/hrHR.d.ts +1 -0
- package/esm/locales/hrHR.js +1 -0
- package/esm/locales/huHU.d.ts +1 -0
- package/esm/locales/huHU.js +1 -0
- package/esm/locales/isIS.d.ts +1 -0
- package/esm/locales/isIS.js +1 -0
- package/esm/locales/itIT.d.ts +1 -0
- package/esm/locales/itIT.js +1 -0
- package/esm/locales/jaJP.d.ts +1 -0
- package/esm/locales/jaJP.js +1 -0
- package/esm/locales/koKR.d.ts +1 -0
- package/esm/locales/koKR.js +1 -0
- package/esm/locales/kzKZ.d.ts +1 -0
- package/esm/locales/kzKZ.js +1 -0
- package/esm/locales/mk.d.ts +1 -0
- package/esm/locales/mk.js +1 -0
- package/esm/locales/nbNO.d.ts +1 -0
- package/esm/locales/nbNO.js +1 -0
- package/esm/locales/nlNL.d.ts +1 -0
- package/esm/locales/nlNL.js +1 -0
- package/esm/locales/nnNO.d.ts +1 -0
- package/esm/locales/nnNO.js +1 -0
- package/esm/locales/plPL.d.ts +1 -0
- package/esm/locales/plPL.js +1 -0
- package/esm/locales/ptBR.d.ts +1 -0
- package/esm/locales/ptBR.js +1 -0
- package/esm/locales/ptPT.d.ts +1 -0
- package/esm/locales/ptPT.js +1 -0
- package/esm/locales/roRO.d.ts +1 -0
- package/esm/locales/roRO.js +1 -0
- package/esm/locales/ruRU.d.ts +1 -0
- package/esm/locales/ruRU.js +1 -0
- package/esm/locales/skSK.d.ts +1 -0
- package/esm/locales/skSK.js +1 -0
- package/esm/locales/svSE.d.ts +1 -0
- package/esm/locales/svSE.js +1 -0
- package/esm/locales/trTR.d.ts +1 -0
- package/esm/locales/trTR.js +1 -0
- package/esm/locales/ukUA.d.ts +1 -0
- package/esm/locales/ukUA.js +1 -0
- package/esm/locales/urPK.d.ts +1 -0
- package/esm/locales/urPK.js +1 -0
- package/esm/locales/utils/getPickersLocalization.d.ts +1 -0
- package/esm/locales/utils/pickersLocaleTextApi.d.ts +1 -0
- package/esm/locales/viVN.d.ts +1 -0
- package/esm/locales/viVN.js +1 -0
- package/esm/locales/zhCN.d.ts +1 -0
- package/esm/locales/zhCN.js +1 -0
- package/esm/locales/zhHK.d.ts +1 -0
- package/esm/locales/zhHK.js +1 -0
- package/esm/locales/zhTW.d.ts +1 -0
- package/esm/locales/zhTW.js +1 -0
- package/index.js +1 -1
- package/internals/components/PickerProvider.d.ts +9 -0
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -0
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -3
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -0
- package/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -0
- package/internals/hooks/useMobilePicker/useMobilePicker.js +9 -3
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -0
- package/internals/hooks/usePicker/usePicker.d.ts +2 -1
- package/internals/hooks/usePicker/usePicker.js +14 -4
- package/internals/hooks/usePicker/usePicker.types.d.ts +2 -0
- package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -0
- package/internals/hooks/useStaticPicker/useStaticPicker.js +9 -3
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +7 -0
- package/internals/index.d.ts +3 -2
- package/internals/index.js +19 -0
- package/internals/utils/createNonRangePickerStepNavigation.d.ts +13 -0
- package/internals/utils/createNonRangePickerStepNavigation.js +30 -0
- package/internals/utils/createStepNavigation.d.ts +32 -0
- package/internals/utils/createStepNavigation.js +41 -0
- package/internals/utils/date-utils.d.ts +1 -0
- package/internals/utils/date-utils.js +3 -3
- package/internals/utils/time-utils.d.ts +2 -0
- package/internals/utils/time-utils.js +5 -4
- package/locales/beBY.d.ts +1 -0
- package/locales/beBY.js +1 -0
- package/locales/bgBG.d.ts +1 -0
- package/locales/bgBG.js +1 -0
- package/locales/bnBD.d.ts +1 -0
- package/locales/bnBD.js +1 -0
- package/locales/caES.d.ts +1 -0
- package/locales/caES.js +1 -0
- package/locales/csCZ.d.ts +1 -0
- package/locales/csCZ.js +1 -0
- package/locales/daDK.d.ts +1 -0
- package/locales/daDK.js +1 -0
- package/locales/deDE.d.ts +1 -0
- package/locales/deDE.js +1 -0
- package/locales/elGR.d.ts +1 -0
- package/locales/elGR.js +1 -0
- package/locales/enUS.d.ts +1 -0
- package/locales/enUS.js +1 -0
- package/locales/esES.d.ts +1 -0
- package/locales/esES.js +1 -0
- package/locales/eu.d.ts +1 -0
- package/locales/eu.js +1 -0
- package/locales/faIR.d.ts +1 -0
- package/locales/faIR.js +1 -0
- package/locales/fiFI.d.ts +1 -0
- package/locales/fiFI.js +1 -0
- package/locales/frFR.d.ts +1 -0
- package/locales/frFR.js +1 -0
- package/locales/heIL.d.ts +1 -0
- package/locales/heIL.js +1 -0
- package/locales/hrHR.d.ts +1 -0
- package/locales/hrHR.js +1 -0
- package/locales/huHU.d.ts +1 -0
- package/locales/huHU.js +1 -0
- package/locales/isIS.d.ts +1 -0
- package/locales/isIS.js +1 -0
- package/locales/itIT.d.ts +1 -0
- package/locales/itIT.js +1 -0
- package/locales/jaJP.d.ts +1 -0
- package/locales/jaJP.js +1 -0
- package/locales/koKR.d.ts +1 -0
- package/locales/koKR.js +1 -0
- package/locales/kzKZ.d.ts +1 -0
- package/locales/kzKZ.js +1 -0
- package/locales/mk.d.ts +1 -0
- package/locales/mk.js +1 -0
- package/locales/nbNO.d.ts +1 -0
- package/locales/nbNO.js +1 -0
- package/locales/nlNL.d.ts +1 -0
- package/locales/nlNL.js +1 -0
- package/locales/nnNO.d.ts +1 -0
- package/locales/nnNO.js +1 -0
- package/locales/plPL.d.ts +1 -0
- package/locales/plPL.js +1 -0
- package/locales/ptBR.d.ts +1 -0
- package/locales/ptBR.js +1 -0
- package/locales/ptPT.d.ts +1 -0
- package/locales/ptPT.js +1 -0
- package/locales/roRO.d.ts +1 -0
- package/locales/roRO.js +1 -0
- package/locales/ruRU.d.ts +1 -0
- package/locales/ruRU.js +1 -0
- package/locales/skSK.d.ts +1 -0
- package/locales/skSK.js +1 -0
- package/locales/svSE.d.ts +1 -0
- package/locales/svSE.js +1 -0
- package/locales/trTR.d.ts +1 -0
- package/locales/trTR.js +1 -0
- package/locales/ukUA.d.ts +1 -0
- package/locales/ukUA.js +1 -0
- package/locales/urPK.d.ts +1 -0
- package/locales/urPK.js +1 -0
- package/locales/utils/getPickersLocalization.d.ts +1 -0
- package/locales/utils/pickersLocaleTextApi.d.ts +1 -0
- package/locales/viVN.d.ts +1 -0
- package/locales/viVN.js +1 -0
- package/locales/zhCN.d.ts +1 -0
- package/locales/zhCN.js +1 -0
- package/locales/zhHK.d.ts +1 -0
- package/locales/zhHK.js +1 -0
- package/locales/zhTW.d.ts +1 -0
- package/locales/zhTW.js +1 -0
- package/modern/DateField/DateField.js +4 -4
- package/modern/DateTimeField/DateTimeField.js +4 -4
- package/modern/DesktopDatePicker/DesktopDatePicker.js +2 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -1
- package/modern/DesktopTimePicker/DesktopTimePicker.js +2 -1
- package/modern/DigitalClock/DigitalClock.js +1 -0
- package/modern/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/modern/LocalizationProvider/LocalizationProvider.js +2 -2
- package/modern/MobileDatePicker/MobileDatePicker.js +2 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +9 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +2 -1
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +1 -0
- package/modern/PickersActionBar/PickersActionBar.d.ts +1 -1
- package/modern/PickersActionBar/PickersActionBar.js +22 -4
- package/modern/StaticDatePicker/StaticDatePicker.js +2 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +9 -1
- package/modern/StaticTimePicker/StaticTimePicker.js +2 -1
- package/modern/TimeField/TimeField.js +4 -4
- package/modern/index.js +1 -1
- package/modern/internals/components/PickerProvider.d.ts +9 -0
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -0
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -3
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -0
- package/modern/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -0
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +9 -3
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -0
- package/modern/internals/hooks/usePicker/usePicker.d.ts +2 -1
- package/modern/internals/hooks/usePicker/usePicker.js +14 -4
- package/modern/internals/hooks/usePicker/usePicker.types.d.ts +2 -0
- package/modern/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -0
- package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +9 -3
- package/modern/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +7 -0
- package/modern/internals/index.d.ts +3 -2
- package/modern/internals/index.js +3 -2
- package/modern/internals/utils/createNonRangePickerStepNavigation.d.ts +13 -0
- package/modern/internals/utils/createNonRangePickerStepNavigation.js +24 -0
- package/modern/internals/utils/createStepNavigation.d.ts +32 -0
- package/modern/internals/utils/createStepNavigation.js +34 -0
- package/modern/internals/utils/date-utils.d.ts +1 -0
- package/modern/internals/utils/date-utils.js +2 -2
- package/modern/internals/utils/time-utils.d.ts +2 -0
- package/modern/internals/utils/time-utils.js +4 -3
- package/modern/locales/beBY.d.ts +1 -0
- package/modern/locales/beBY.js +1 -0
- package/modern/locales/bgBG.d.ts +1 -0
- package/modern/locales/bgBG.js +1 -0
- package/modern/locales/bnBD.d.ts +1 -0
- package/modern/locales/bnBD.js +1 -0
- package/modern/locales/caES.d.ts +1 -0
- package/modern/locales/caES.js +1 -0
- package/modern/locales/csCZ.d.ts +1 -0
- package/modern/locales/csCZ.js +1 -0
- package/modern/locales/daDK.d.ts +1 -0
- package/modern/locales/daDK.js +1 -0
- package/modern/locales/deDE.d.ts +1 -0
- package/modern/locales/deDE.js +1 -0
- package/modern/locales/elGR.d.ts +1 -0
- package/modern/locales/elGR.js +1 -0
- package/modern/locales/enUS.d.ts +1 -0
- package/modern/locales/enUS.js +1 -0
- package/modern/locales/esES.d.ts +1 -0
- package/modern/locales/esES.js +1 -0
- package/modern/locales/eu.d.ts +1 -0
- package/modern/locales/eu.js +1 -0
- package/modern/locales/faIR.d.ts +1 -0
- package/modern/locales/faIR.js +1 -0
- package/modern/locales/fiFI.d.ts +1 -0
- package/modern/locales/fiFI.js +1 -0
- package/modern/locales/frFR.d.ts +1 -0
- package/modern/locales/frFR.js +1 -0
- package/modern/locales/heIL.d.ts +1 -0
- package/modern/locales/heIL.js +1 -0
- package/modern/locales/hrHR.d.ts +1 -0
- package/modern/locales/hrHR.js +1 -0
- package/modern/locales/huHU.d.ts +1 -0
- package/modern/locales/huHU.js +1 -0
- package/modern/locales/isIS.d.ts +1 -0
- package/modern/locales/isIS.js +1 -0
- package/modern/locales/itIT.d.ts +1 -0
- package/modern/locales/itIT.js +1 -0
- package/modern/locales/jaJP.d.ts +1 -0
- package/modern/locales/jaJP.js +1 -0
- package/modern/locales/koKR.d.ts +1 -0
- package/modern/locales/koKR.js +1 -0
- package/modern/locales/kzKZ.d.ts +1 -0
- package/modern/locales/kzKZ.js +1 -0
- package/modern/locales/mk.d.ts +1 -0
- package/modern/locales/mk.js +1 -0
- package/modern/locales/nbNO.d.ts +1 -0
- package/modern/locales/nbNO.js +1 -0
- package/modern/locales/nlNL.d.ts +1 -0
- package/modern/locales/nlNL.js +1 -0
- package/modern/locales/nnNO.d.ts +1 -0
- package/modern/locales/nnNO.js +1 -0
- package/modern/locales/plPL.d.ts +1 -0
- package/modern/locales/plPL.js +1 -0
- package/modern/locales/ptBR.d.ts +1 -0
- package/modern/locales/ptBR.js +1 -0
- package/modern/locales/ptPT.d.ts +1 -0
- package/modern/locales/ptPT.js +1 -0
- package/modern/locales/roRO.d.ts +1 -0
- package/modern/locales/roRO.js +1 -0
- package/modern/locales/ruRU.d.ts +1 -0
- package/modern/locales/ruRU.js +1 -0
- package/modern/locales/skSK.d.ts +1 -0
- package/modern/locales/skSK.js +1 -0
- package/modern/locales/svSE.d.ts +1 -0
- package/modern/locales/svSE.js +1 -0
- package/modern/locales/trTR.d.ts +1 -0
- package/modern/locales/trTR.js +1 -0
- package/modern/locales/ukUA.d.ts +1 -0
- package/modern/locales/ukUA.js +1 -0
- package/modern/locales/urPK.d.ts +1 -0
- package/modern/locales/urPK.js +1 -0
- package/modern/locales/utils/getPickersLocalization.d.ts +1 -0
- package/modern/locales/utils/pickersLocaleTextApi.d.ts +1 -0
- package/modern/locales/viVN.d.ts +1 -0
- package/modern/locales/viVN.js +1 -0
- package/modern/locales/zhCN.d.ts +1 -0
- package/modern/locales/zhCN.js +1 -0
- package/modern/locales/zhHK.d.ts +1 -0
- package/modern/locales/zhHK.js +1 -0
- package/modern/locales/zhTW.d.ts +1 -0
- package/modern/locales/zhTW.js +1 -0
- package/package.json +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
package/esm/locales/roRO.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const roRO: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/roRO.js
CHANGED
|
@@ -26,6 +26,7 @@ const roROPickers = {
|
|
|
26
26
|
clearButtonLabel: 'Ștergere',
|
|
27
27
|
okButtonLabel: 'OK',
|
|
28
28
|
todayButtonLabel: 'Astăzi',
|
|
29
|
+
nextStepButtonLabel: 'Următoare',
|
|
29
30
|
// Toolbar titles
|
|
30
31
|
datePickerToolbarTitle: 'Selectați data',
|
|
31
32
|
dateTimePickerToolbarTitle: 'Selectați data și ora',
|
package/esm/locales/ruRU.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const ruRU: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/ruRU.js
CHANGED
|
@@ -26,6 +26,7 @@ const ruRUPickers = {
|
|
|
26
26
|
clearButtonLabel: 'Очистить',
|
|
27
27
|
okButtonLabel: 'Ок',
|
|
28
28
|
todayButtonLabel: 'Сегодня',
|
|
29
|
+
nextStepButtonLabel: 'Следующий',
|
|
29
30
|
// Toolbar titles
|
|
30
31
|
datePickerToolbarTitle: 'Выбрать дату',
|
|
31
32
|
dateTimePickerToolbarTitle: 'Выбрать дату и время',
|
package/esm/locales/skSK.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const skSK: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/skSK.js
CHANGED
|
@@ -27,6 +27,7 @@ const skSKPickers = {
|
|
|
27
27
|
clearButtonLabel: 'Vymazať',
|
|
28
28
|
okButtonLabel: 'Potvrdiť',
|
|
29
29
|
todayButtonLabel: 'Dnes',
|
|
30
|
+
nextStepButtonLabel: 'Predchádzajúci',
|
|
30
31
|
// Toolbar titles
|
|
31
32
|
datePickerToolbarTitle: 'Vyberte dátum',
|
|
32
33
|
dateTimePickerToolbarTitle: 'Vyberte dátum a čas',
|
package/esm/locales/svSE.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const svSE: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/svSE.js
CHANGED
package/esm/locales/trTR.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const trTR: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/trTR.js
CHANGED
package/esm/locales/ukUA.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const ukUA: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/ukUA.js
CHANGED
|
@@ -25,6 +25,7 @@ const ukUAPickers = {
|
|
|
25
25
|
clearButtonLabel: 'Очистити',
|
|
26
26
|
okButtonLabel: 'OK',
|
|
27
27
|
todayButtonLabel: 'Сьогодні',
|
|
28
|
+
nextStepButtonLabel: 'Наступний',
|
|
28
29
|
// Toolbar titles
|
|
29
30
|
datePickerToolbarTitle: 'Вибрати дату',
|
|
30
31
|
dateTimePickerToolbarTitle: 'Вибрати дату і час',
|
package/esm/locales/urPK.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const urPK: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/urPK.js
CHANGED
|
@@ -26,6 +26,7 @@ const urPKPickers = {
|
|
|
26
26
|
clearButtonLabel: 'کلئیر',
|
|
27
27
|
okButtonLabel: 'اوکے',
|
|
28
28
|
todayButtonLabel: 'آج',
|
|
29
|
+
nextStepButtonLabel: 'مہینہ',
|
|
29
30
|
// Toolbar titles
|
|
30
31
|
datePickerToolbarTitle: 'تاریخ منتخب کریں',
|
|
31
32
|
dateTimePickerToolbarTitle: 'تاریخ اور وقت منتخب کریں',
|
|
@@ -23,6 +23,7 @@ export declare const getPickersLocalization: (pickersTranslations: Partial<Picke
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
|
@@ -47,6 +47,7 @@ export interface PickersComponentAgnosticLocaleText {
|
|
|
47
47
|
clearButtonLabel: string;
|
|
48
48
|
okButtonLabel: string;
|
|
49
49
|
todayButtonLabel: string;
|
|
50
|
+
nextStepButtonLabel: string;
|
|
50
51
|
clockLabelText: (view: TimeView, formattedTime: string | null) => string;
|
|
51
52
|
hoursClockNumberText: (hours: string) => string;
|
|
52
53
|
minutesClockNumberText: (minutes: string) => string;
|
package/esm/locales/viVN.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const viVN: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/viVN.js
CHANGED
package/esm/locales/zhCN.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const zhCN: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/zhCN.js
CHANGED
package/esm/locales/zhHK.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const zhHK: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/zhHK.js
CHANGED
package/esm/locales/zhTW.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const zhTW: {
|
|
|
23
23
|
clearButtonLabel?: string | undefined;
|
|
24
24
|
okButtonLabel?: string | undefined;
|
|
25
25
|
todayButtonLabel?: string | undefined;
|
|
26
|
+
nextStepButtonLabel?: string | undefined;
|
|
26
27
|
clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, formattedTime: string | null) => string) | undefined;
|
|
27
28
|
hoursClockNumberText?: ((hours: string) => string) | undefined;
|
|
28
29
|
minutesClockNumberText?: ((minutes: string) => string) | undefined;
|
package/esm/locales/zhTW.js
CHANGED
package/index.js
CHANGED
|
@@ -109,6 +109,10 @@ export interface PickerContextValue<TValue extends PickerValidValue, TView exten
|
|
|
109
109
|
* If it is "enabled", the field should render an interactive UI to open the Picker.
|
|
110
110
|
*/
|
|
111
111
|
triggerStatus: 'hidden' | 'disabled' | 'enabled';
|
|
112
|
+
/**
|
|
113
|
+
* Whether the Picker has any value picking steps left.
|
|
114
|
+
*/
|
|
115
|
+
hasNextStep: boolean;
|
|
112
116
|
/**
|
|
113
117
|
* The ref to attach to the popup's outermost element that contains the view, if any.
|
|
114
118
|
* When using a built-in popup component, this property is automatically attached to the appropriate element.
|
|
@@ -203,6 +207,11 @@ export interface PickerActionsContextValue<TValue extends PickerValidValue, TVie
|
|
|
203
207
|
* The value will be reset to the last accepted value.
|
|
204
208
|
*/
|
|
205
209
|
cancelValueChanges: () => void;
|
|
210
|
+
/**
|
|
211
|
+
* Go to the next step in the value picking process.
|
|
212
|
+
* For example, on the Mobile Date Time Picker, if the user is editing the date, it will switch to editing the time.
|
|
213
|
+
*/
|
|
214
|
+
goToNextStep: () => void;
|
|
206
215
|
}
|
|
207
216
|
export interface SetValueActionOptions<TError = string | null> {
|
|
208
217
|
/**
|
|
@@ -9,6 +9,7 @@ import { DateOrTimeViewWithMeridiem } from "../../models/index.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const useDesktopPicker: <TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseDesktopPickerProps<TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>>({
|
|
11
11
|
props,
|
|
12
|
+
steps,
|
|
12
13
|
...pickerParams
|
|
13
14
|
}: UseDesktopPickerParams<TView, TEnableAccessibleFieldDOMStructure, TExternalProps>) => {
|
|
14
15
|
renderPicker: () => React.JSX.Element;
|
|
@@ -15,8 +15,9 @@ var _usePicker = require("../usePicker");
|
|
|
15
15
|
var _PickersLayout = require("../../../PickersLayout");
|
|
16
16
|
var _PickerProvider = require("../../components/PickerProvider");
|
|
17
17
|
var _PickerFieldUI = require("../../components/PickerFieldUI");
|
|
18
|
+
var _createNonRangePickerStepNavigation = require("../../utils/createNonRangePickerStepNavigation");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const _excluded = ["props"],
|
|
20
|
+
const _excluded = ["props", "steps"],
|
|
20
21
|
_excluded2 = ["ownerState"];
|
|
21
22
|
/**
|
|
22
23
|
* Hook managing all the single-date desktop pickers:
|
|
@@ -26,7 +27,8 @@ const _excluded = ["props"],
|
|
|
26
27
|
*/
|
|
27
28
|
const useDesktopPicker = _ref => {
|
|
28
29
|
let {
|
|
29
|
-
props
|
|
30
|
+
props,
|
|
31
|
+
steps
|
|
30
32
|
} = _ref,
|
|
31
33
|
pickerParams = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
32
34
|
const {
|
|
@@ -36,6 +38,9 @@ const useDesktopPicker = _ref => {
|
|
|
36
38
|
inputRef,
|
|
37
39
|
localeText
|
|
38
40
|
} = props;
|
|
41
|
+
const getStepNavigation = (0, _createNonRangePickerStepNavigation.createNonRangePickerStepNavigation)({
|
|
42
|
+
steps
|
|
43
|
+
});
|
|
39
44
|
const {
|
|
40
45
|
providerProps,
|
|
41
46
|
renderCurrentView,
|
|
@@ -45,7 +50,8 @@ const useDesktopPicker = _ref => {
|
|
|
45
50
|
localeText,
|
|
46
51
|
autoFocusView: true,
|
|
47
52
|
viewContainerRole: 'dialog',
|
|
48
|
-
variant: 'desktop'
|
|
53
|
+
variant: 'desktop',
|
|
54
|
+
getStepNavigation
|
|
49
55
|
}));
|
|
50
56
|
const labelId = providerProps.privateContextValue.labelId;
|
|
51
57
|
const isToolbarHidden = innerSlotProps?.toolbar?.hidden ?? false;
|
|
@@ -7,6 +7,7 @@ import { PickerFieldSlotProps, PickerOwnerState } from "../../../models/index.js
|
|
|
7
7
|
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from "../../../PickersLayout/PickersLayout.types.js";
|
|
8
8
|
import { DateOrTimeViewWithMeridiem, PickerValue } from "../../models/index.js";
|
|
9
9
|
import { PickerFieldUISlotsFromContext, PickerFieldUISlotPropsFromContext } from "../../components/PickerFieldUI.js";
|
|
10
|
+
import { PickerStep } from "../../utils/createNonRangePickerStepNavigation.js";
|
|
10
11
|
export interface UseDesktopPickerSlots extends Pick<PickerPopperSlots, 'desktopPaper' | 'desktopTransition' | 'desktopTrapFocus' | 'popper'>, ExportedPickersLayoutSlots<PickerValue>, PickerFieldUISlotsFromContext {
|
|
11
12
|
/**
|
|
12
13
|
* Component used to enter the date with the keyboard.
|
|
@@ -38,4 +39,10 @@ export interface UseDesktopPickerProps<TView extends DateOrTimeViewWithMeridiem,
|
|
|
38
39
|
}
|
|
39
40
|
export interface UseDesktopPickerParams<TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseDesktopPickerProps<TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>> extends Pick<UsePickerParameters<PickerValue, TView, TExternalProps>, 'valueManager' | 'valueType' | 'validator' | 'rendererInterceptor' | 'ref'> {
|
|
40
41
|
props: TExternalProps;
|
|
42
|
+
/**
|
|
43
|
+
* Steps available for the picker.
|
|
44
|
+
* This will be used to define the behavior of navigation actions.
|
|
45
|
+
* If null, the picker will not have any step navigation.
|
|
46
|
+
*/
|
|
47
|
+
steps: PickerStep[] | null;
|
|
41
48
|
}
|
|
@@ -128,7 +128,7 @@ const createSection = ({
|
|
|
128
128
|
maxLength = sectionValue === '' ? utils.formatByString(now, token).length : sectionValue.length;
|
|
129
129
|
} else {
|
|
130
130
|
if (sectionConfig.maxLength == null) {
|
|
131
|
-
throw new Error(`MUI X: The token ${token} should have a '
|
|
131
|
+
throw new Error(`MUI X: The token ${token} should have a 'maxLength' property on it's adapter`);
|
|
132
132
|
}
|
|
133
133
|
maxLength = sectionConfig.maxLength;
|
|
134
134
|
if (isValidDate) {
|
|
@@ -9,6 +9,7 @@ import { DateOrTimeViewWithMeridiem } from "../../models/index.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const useMobilePicker: <TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseMobilePickerProps<TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>>({
|
|
11
11
|
props,
|
|
12
|
+
steps,
|
|
12
13
|
...pickerParams
|
|
13
14
|
}: UseMobilePickerParams<TView, TEnableAccessibleFieldDOMStructure, TExternalProps>) => {
|
|
14
15
|
renderPicker: () => React.JSX.Element;
|
|
@@ -15,8 +15,9 @@ var _usePicker = require("../usePicker");
|
|
|
15
15
|
var _PickersLayout = require("../../../PickersLayout");
|
|
16
16
|
var _PickerProvider = require("../../components/PickerProvider");
|
|
17
17
|
var _PickerFieldUI = require("../../components/PickerFieldUI");
|
|
18
|
+
var _createNonRangePickerStepNavigation = require("../../utils/createNonRangePickerStepNavigation");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const _excluded = ["props"],
|
|
20
|
+
const _excluded = ["props", "steps"],
|
|
20
21
|
_excluded2 = ["ownerState"];
|
|
21
22
|
/**
|
|
22
23
|
* Hook managing all the single-date mobile pickers:
|
|
@@ -26,7 +27,8 @@ const _excluded = ["props"],
|
|
|
26
27
|
*/
|
|
27
28
|
const useMobilePicker = _ref => {
|
|
28
29
|
let {
|
|
29
|
-
props
|
|
30
|
+
props,
|
|
31
|
+
steps
|
|
30
32
|
} = _ref,
|
|
31
33
|
pickerParams = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
32
34
|
const {
|
|
@@ -36,6 +38,9 @@ const useMobilePicker = _ref => {
|
|
|
36
38
|
inputRef,
|
|
37
39
|
localeText
|
|
38
40
|
} = props;
|
|
41
|
+
const getStepNavigation = (0, _createNonRangePickerStepNavigation.createNonRangePickerStepNavigation)({
|
|
42
|
+
steps
|
|
43
|
+
});
|
|
39
44
|
const {
|
|
40
45
|
providerProps,
|
|
41
46
|
renderCurrentView,
|
|
@@ -45,7 +50,8 @@ const useMobilePicker = _ref => {
|
|
|
45
50
|
localeText,
|
|
46
51
|
autoFocusView: true,
|
|
47
52
|
viewContainerRole: 'dialog',
|
|
48
|
-
variant: 'mobile'
|
|
53
|
+
variant: 'mobile',
|
|
54
|
+
getStepNavigation
|
|
49
55
|
}));
|
|
50
56
|
const labelId = providerProps.privateContextValue.labelId;
|
|
51
57
|
const isToolbarHidden = innerSlotProps?.toolbar?.hidden ?? false;
|
|
@@ -7,6 +7,7 @@ import { PickerFieldSlotProps, PickerOwnerState } from "../../../models/index.js
|
|
|
7
7
|
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from "../../../PickersLayout/PickersLayout.types.js";
|
|
8
8
|
import { DateOrTimeViewWithMeridiem, PickerValue } from "../../models/index.js";
|
|
9
9
|
import { PickerFieldUISlotsFromContext, PickerFieldUISlotPropsFromContext } from "../../components/PickerFieldUI.js";
|
|
10
|
+
import { PickerStep } from "../../utils/createNonRangePickerStepNavigation.js";
|
|
10
11
|
export interface UseMobilePickerSlots extends PickersModalDialogSlots, ExportedPickersLayoutSlots<PickerValue>, PickerFieldUISlotsFromContext {
|
|
11
12
|
/**
|
|
12
13
|
* Component used to enter the date with the keyboard.
|
|
@@ -32,4 +33,10 @@ export interface UseMobilePickerProps<TView extends DateOrTimeViewWithMeridiem,
|
|
|
32
33
|
}
|
|
33
34
|
export interface UseMobilePickerParams<TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseMobilePickerProps<TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>> extends Pick<UsePickerParameters<PickerValue, TView, TExternalProps>, 'valueManager' | 'valueType' | 'validator' | 'ref'> {
|
|
34
35
|
props: TExternalProps;
|
|
36
|
+
/**
|
|
37
|
+
* Steps available for the picker.
|
|
38
|
+
* This will be used to define the behavior of navigation actions.
|
|
39
|
+
* If null, the picker will not have any step navigation.
|
|
40
|
+
*/
|
|
41
|
+
steps: PickerStep[] | null;
|
|
35
42
|
}
|
|
@@ -10,5 +10,6 @@ export declare const usePicker: <TValue extends PickerValidValue, TView extends
|
|
|
10
10
|
autoFocusView,
|
|
11
11
|
rendererInterceptor: RendererInterceptor,
|
|
12
12
|
localeText,
|
|
13
|
-
viewContainerRole
|
|
13
|
+
viewContainerRole,
|
|
14
|
+
getStepNavigation
|
|
14
15
|
}: UsePickerParameters<TValue, TView, TExternalProps>) => UsePickerReturnValue<TValue>;
|
|
@@ -31,7 +31,8 @@ const usePicker = ({
|
|
|
31
31
|
autoFocusView,
|
|
32
32
|
rendererInterceptor: RendererInterceptor,
|
|
33
33
|
localeText,
|
|
34
|
-
viewContainerRole
|
|
34
|
+
viewContainerRole,
|
|
35
|
+
getStepNavigation
|
|
35
36
|
}) => {
|
|
36
37
|
const {
|
|
37
38
|
// View props
|
|
@@ -198,6 +199,13 @@ const usePicker = ({
|
|
|
198
199
|
}
|
|
199
200
|
return 'enabled';
|
|
200
201
|
}, [disableOpenPicker, hasUIView, disabled, readOnly]);
|
|
202
|
+
const stepNavigation = getStepNavigation({
|
|
203
|
+
setView,
|
|
204
|
+
view,
|
|
205
|
+
initialView: initialView ?? views[0],
|
|
206
|
+
views
|
|
207
|
+
});
|
|
208
|
+
const wrappedGoToNextStep = (0, _useEventCallback.default)(stepNavigation.goToNextStep);
|
|
201
209
|
const actionsContextValue = React.useMemo(() => ({
|
|
202
210
|
setValue,
|
|
203
211
|
setOpen,
|
|
@@ -205,8 +213,9 @@ const usePicker = ({
|
|
|
205
213
|
setValueToToday,
|
|
206
214
|
acceptValueChanges,
|
|
207
215
|
cancelValueChanges,
|
|
208
|
-
setView
|
|
209
|
-
|
|
216
|
+
setView,
|
|
217
|
+
goToNextStep: wrappedGoToNextStep
|
|
218
|
+
}), [setValue, setOpen, clearValue, setValueToToday, acceptValueChanges, cancelValueChanges, setView, wrappedGoToNextStep]);
|
|
210
219
|
const contextValue = React.useMemo(() => (0, _extends2.default)({}, actionsContextValue, {
|
|
211
220
|
value,
|
|
212
221
|
timezone,
|
|
@@ -223,13 +232,14 @@ const usePicker = ({
|
|
|
223
232
|
reduceAnimations,
|
|
224
233
|
triggerRef,
|
|
225
234
|
triggerStatus,
|
|
235
|
+
hasNextStep: stepNavigation.hasNextStep,
|
|
226
236
|
fieldFormat: format ?? '',
|
|
227
237
|
name,
|
|
228
238
|
label,
|
|
229
239
|
rootSx: sx,
|
|
230
240
|
rootRef,
|
|
231
241
|
rootClassName: className
|
|
232
|
-
}), [actionsContextValue, value, rootRef, variant, orientation, reduceAnimations, disabled, readOnly, format, className, name, label, sx, triggerStatus, timezone, state.open, popperView, views, initialView, autoFocus]);
|
|
242
|
+
}), [actionsContextValue, value, rootRef, variant, orientation, reduceAnimations, disabled, readOnly, format, className, name, label, sx, triggerStatus, stepNavigation.hasNextStep, timezone, state.open, popperView, views, initialView, autoFocus]);
|
|
233
243
|
const privateContextValue = React.useMemo(() => ({
|
|
234
244
|
dismissViews,
|
|
235
245
|
ownerState,
|
|
@@ -7,6 +7,7 @@ import { UseViewsOptions } from "../useViews.js";
|
|
|
7
7
|
import { PickerProviderProps } from "../../components/PickerProvider.js";
|
|
8
8
|
import { PickersInputLocaleText } from "../../../locales/index.js";
|
|
9
9
|
import { PickerFieldPrivateContextValue } from "../useNullableFieldPrivateContext.js";
|
|
10
|
+
import { CreateStepNavigationReturnValue } from "../../utils/createStepNavigation.js";
|
|
10
11
|
/**
|
|
11
12
|
* Props common to all Picker headless implementations.
|
|
12
13
|
* Those props are exposed on all the Pickers.
|
|
@@ -130,6 +131,7 @@ export interface UsePickerParameters<TValue extends PickerValidValue, TView exte
|
|
|
130
131
|
*/
|
|
131
132
|
rendererInterceptor?: React.JSXElementConstructor<PickerRendererInterceptorProps<TValue, TView, TExternalProps>>;
|
|
132
133
|
props: TExternalProps;
|
|
134
|
+
getStepNavigation: CreateStepNavigationReturnValue;
|
|
133
135
|
}
|
|
134
136
|
export interface UsePickerReturnValue<TValue extends PickerValidValue> {
|
|
135
137
|
ownerState: PickerOwnerState;
|
|
@@ -9,6 +9,7 @@ import { DateOrTimeViewWithMeridiem } from "../../models/index.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const useStaticPicker: <TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseStaticPickerProps<TView, any, TExternalProps>>({
|
|
11
11
|
props,
|
|
12
|
+
steps,
|
|
12
13
|
...pickerParams
|
|
13
14
|
}: UseStaticPickerParams<TView, TExternalProps>) => {
|
|
14
15
|
renderPicker: () => React.JSX.Element;
|
|
@@ -16,8 +16,9 @@ var _PickerProvider = require("../../components/PickerProvider");
|
|
|
16
16
|
var _PickersLayout = require("../../../PickersLayout");
|
|
17
17
|
var _dimensions = require("../../constants/dimensions");
|
|
18
18
|
var _utils = require("../../utils/utils");
|
|
19
|
+
var _createNonRangePickerStepNavigation = require("../../utils/createNonRangePickerStepNavigation");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["props"];
|
|
21
|
+
const _excluded = ["props", "steps"];
|
|
21
22
|
const PickerStaticLayout = (0, _styles.styled)(_PickersLayout.PickersLayout)(({
|
|
22
23
|
theme
|
|
23
24
|
}) => ({
|
|
@@ -34,7 +35,8 @@ const PickerStaticLayout = (0, _styles.styled)(_PickersLayout.PickersLayout)(({
|
|
|
34
35
|
*/
|
|
35
36
|
const useStaticPicker = _ref => {
|
|
36
37
|
let {
|
|
37
|
-
props
|
|
38
|
+
props,
|
|
39
|
+
steps
|
|
38
40
|
} = _ref,
|
|
39
41
|
pickerParams = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
40
42
|
const {
|
|
@@ -44,6 +46,9 @@ const useStaticPicker = _ref => {
|
|
|
44
46
|
displayStaticWrapperAs,
|
|
45
47
|
autoFocus
|
|
46
48
|
} = props;
|
|
49
|
+
const getStepNavigation = (0, _createNonRangePickerStepNavigation.createNonRangePickerStepNavigation)({
|
|
50
|
+
steps
|
|
51
|
+
});
|
|
47
52
|
const {
|
|
48
53
|
providerProps,
|
|
49
54
|
renderCurrentView
|
|
@@ -52,7 +57,8 @@ const useStaticPicker = _ref => {
|
|
|
52
57
|
variant: displayStaticWrapperAs,
|
|
53
58
|
autoFocusView: autoFocus ?? false,
|
|
54
59
|
viewContainerRole: null,
|
|
55
|
-
localeText
|
|
60
|
+
localeText,
|
|
61
|
+
getStepNavigation
|
|
56
62
|
}));
|
|
57
63
|
const Layout = slots?.layout ?? PickerStaticLayout;
|
|
58
64
|
const renderPicker = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_PickerProvider.PickerProvider, (0, _extends2.default)({}, providerProps, {
|
|
@@ -2,6 +2,7 @@ import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps } from "../.
|
|
|
2
2
|
import { BasePickerProps } from "../../models/props/basePickerProps.js";
|
|
3
3
|
import { UsePickerParameters, UsePickerProps } from "../usePicker/index.js";
|
|
4
4
|
import { DateOrTimeViewWithMeridiem, PickerValue } from "../../models/index.js";
|
|
5
|
+
import { PickerStep } from "../../utils/createNonRangePickerStepNavigation.js";
|
|
5
6
|
export interface UseStaticPickerSlots extends ExportedPickersLayoutSlots<PickerValue> {}
|
|
6
7
|
export interface UseStaticPickerSlotProps extends ExportedPickersLayoutSlotProps<PickerValue> {}
|
|
7
8
|
export interface StaticOnlyPickerProps {
|
|
@@ -36,4 +37,10 @@ export interface UseStaticPickerProps<TView extends DateOrTimeViewWithMeridiem,
|
|
|
36
37
|
}
|
|
37
38
|
export interface UseStaticPickerParams<TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseStaticPickerProps<TView, any, TExternalProps>> extends Pick<UsePickerParameters<PickerValue, TView, TExternalProps>, 'valueManager' | 'valueType' | 'validator' | 'ref'> {
|
|
38
39
|
props: TExternalProps;
|
|
40
|
+
/**
|
|
41
|
+
* Steps available for the picker.
|
|
42
|
+
* This will be used to define the behavior of navigation actions.
|
|
43
|
+
* If null, the picker will not have any step navigation.
|
|
44
|
+
*/
|
|
45
|
+
steps: PickerStep[] | null;
|
|
39
46
|
}
|
package/internals/index.d.ts
CHANGED
|
@@ -53,9 +53,10 @@ export type { FormProps } from './models/formProps';
|
|
|
53
53
|
export type { PickerVariant, TimeViewWithMeridiem, DateOrTimeViewWithMeridiem } from './models/common';
|
|
54
54
|
export type { BaseDateValidationProps, BaseTimeValidationProps, TimeValidationProps, MonthValidationProps, YearValidationProps, DayValidationProps, DateTimeValidationProps } from './models/validation';
|
|
55
55
|
export type { PickerValue, PickerRangeValue, PickerNonNullableRangeValue, InferNonNullablePickerValue, PickerValidValue } from './models/value';
|
|
56
|
-
export {
|
|
56
|
+
export { createStepNavigation } from "./utils/createStepNavigation.js";
|
|
57
|
+
export { applyDefaultDate, replaceInvalidDateByNull, areDatesEqual, getTodayDate, isDatePickerView, mergeDateAndTime, formatMeridiem, DATE_VIEWS } from "./utils/date-utils.js";
|
|
57
58
|
export { getDefaultReferenceDate } from "./utils/getDefaultReferenceDate.js";
|
|
58
|
-
export { isTimeView, isInternalTimeView, resolveTimeFormat, getMeridiem } from "./utils/time-utils.js";
|
|
59
|
+
export { isTimeView, isInternalTimeView, resolveTimeFormat, getMeridiem, TIME_VIEWS } from "./utils/time-utils.js";
|
|
59
60
|
export { resolveTimeViewsResponse, resolveDateTimeFormat } from "./utils/date-time-utils.js";
|
|
60
61
|
export { executeInTheNextEventLoopTick, getActiveElement, onSpaceOrEnter, mergeSx, DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from "./utils/utils.js";
|
|
61
62
|
export { useReduceAnimations } from "./hooks/useReduceAnimations.js";
|
package/internals/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "DATE_VIEWS", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _dateUtils.DATE_VIEWS;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "DAY_MARGIN", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
@@ -99,6 +105,12 @@ Object.defineProperty(exports, "PickersToolbarText", {
|
|
|
99
105
|
return _PickersToolbarText.PickersToolbarText;
|
|
100
106
|
}
|
|
101
107
|
});
|
|
108
|
+
Object.defineProperty(exports, "TIME_VIEWS", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _timeUtils.TIME_VIEWS;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
102
114
|
Object.defineProperty(exports, "VIEW_HEIGHT", {
|
|
103
115
|
enumerable: true,
|
|
104
116
|
get: function () {
|
|
@@ -141,6 +153,12 @@ Object.defineProperty(exports, "createDateStrForV7HiddenInputFromSections", {
|
|
|
141
153
|
return _useField.createDateStrForV7HiddenInputFromSections;
|
|
142
154
|
}
|
|
143
155
|
});
|
|
156
|
+
Object.defineProperty(exports, "createStepNavigation", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () {
|
|
159
|
+
return _createStepNavigation.createStepNavigation;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
144
162
|
Object.defineProperty(exports, "executeInTheNextEventLoopTick", {
|
|
145
163
|
enumerable: true,
|
|
146
164
|
get: function () {
|
|
@@ -436,6 +454,7 @@ var _useToolbarOwnerState = require("./hooks/useToolbarOwnerState");
|
|
|
436
454
|
var _useUtils = require("./hooks/useUtils");
|
|
437
455
|
var _useViews = require("./hooks/useViews");
|
|
438
456
|
var _dateHelpersHooks = require("./hooks/date-helpers-hooks");
|
|
457
|
+
var _createStepNavigation = require("./utils/createStepNavigation");
|
|
439
458
|
var _dateUtils = require("./utils/date-utils");
|
|
440
459
|
var _getDefaultReferenceDate = require("./utils/getDefaultReferenceDate");
|
|
441
460
|
var _timeUtils = require("./utils/time-utils");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DateOrTimeViewWithMeridiem } from "../models/common.js";
|
|
2
|
+
export declare function createNonRangePickerStepNavigation(parameters: CreateNonRangePickerStepNavigationParameters): import("./createStepNavigation").CreateStepNavigationReturnValue;
|
|
3
|
+
export interface PickerStep {
|
|
4
|
+
/**
|
|
5
|
+
* The views that are handled inside this step.
|
|
6
|
+
* If null, all views are handled by this step.
|
|
7
|
+
*/
|
|
8
|
+
views: readonly DateOrTimeViewWithMeridiem[] | null;
|
|
9
|
+
}
|
|
10
|
+
interface CreateNonRangePickerStepNavigationParameters {
|
|
11
|
+
steps: PickerStep[] | null;
|
|
12
|
+
}
|
|
13
|
+
export {};
|