@mui/x-date-pickers 7.0.0-alpha.8 → 7.0.0-beta.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/AdapterLuxon/AdapterLuxon.d.ts +1 -1
- package/AdapterLuxon/AdapterLuxon.js +4 -12
- package/CHANGELOG.md +508 -30
- package/DatePicker/DatePicker.js +0 -3
- package/DatePicker/DatePickerToolbar.js +0 -3
- package/DateTimePicker/DateTimePicker.js +0 -3
- package/DateTimePicker/DateTimePickerTabs.js +7 -4
- package/DateTimePicker/DateTimePickerToolbar.d.ts +6 -1
- package/DateTimePicker/DateTimePickerToolbar.js +33 -20
- package/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/MobileDatePicker/MobileDatePicker.js +0 -3
- package/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
- package/MobileTimePicker/MobileTimePicker.js +0 -3
- package/MonthCalendar/MonthCalendar.js +0 -3
- package/MonthCalendar/MonthCalendar.types.d.ts +0 -3
- package/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +0 -3
- package/PickersLayout/PickersLayout.types.d.ts +6 -5
- package/PickersLayout/pickersLayoutClasses.js +3 -2
- package/PickersLayout/usePickerLayout.d.ts +2 -2
- package/PickersLayout/usePickerLayout.js +2 -1
- package/PickersSectionList/PickersSectionList.js +6 -1
- package/PickersTextField/PickersFilledInput/PickersFilledInput.d.ts +11 -0
- package/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +98 -25
- package/PickersTextField/PickersFilledInput/index.d.ts +4 -0
- package/PickersTextField/PickersFilledInput/index.js +2 -0
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +23 -0
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
- package/PickersTextField/PickersInput/PickersInput.d.ts +10 -0
- package/PickersTextField/PickersInput/PickersInput.js +196 -0
- package/{internals/components → PickersTextField}/PickersInput/index.d.ts +2 -2
- package/PickersTextField/PickersInput/index.js +2 -0
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +22 -0
- package/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +16 -0
- package/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
- package/{internals/components/PickersInput/PickersInput.types.d.ts → PickersTextField/PickersInputBase/PickersInputBase.types.d.ts} +3 -13
- package/PickersTextField/PickersInputBase/index.d.ts +4 -0
- package/PickersTextField/PickersInputBase/index.js +2 -0
- package/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +31 -0
- package/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
- package/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.d.ts +3 -0
- package/{modern/internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.d.ts +10 -0
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +190 -0
- package/PickersTextField/PickersOutlinedInput/index.d.ts +4 -0
- package/PickersTextField/PickersOutlinedInput/index.js +2 -0
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +22 -0
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
- package/PickersTextField/PickersTextField.d.ts +3 -0
- package/PickersTextField/PickersTextField.js +258 -0
- package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.d.ts +5 -2
- package/PickersTextField/index.d.ts +8 -0
- package/PickersTextField/index.js +6 -0
- package/PickersTextField/package.json +6 -0
- package/README.md +3 -3
- package/StaticDatePicker/StaticDatePicker.js +0 -3
- package/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/StaticTimePicker/StaticTimePicker.js +0 -3
- package/TimeClock/TimeClock.js +3 -3
- package/TimePicker/TimePicker.js +0 -3
- package/TimePicker/TimePickerToolbar.js +0 -3
- package/YearCalendar/YearCalendar.js +0 -3
- package/YearCalendar/YearCalendar.types.d.ts +0 -3
- package/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
- package/index.d.ts +2 -1
- package/index.js +3 -2
- package/internals/hooks/useField/useField.js +6 -4
- package/internals/hooks/useField/useField.types.d.ts +4 -2
- package/internals/hooks/useField/useField.utils.d.ts +19 -9
- package/internals/hooks/useField/useField.utils.js +68 -21
- package/internals/hooks/useField/useFieldCharacterEditing.d.ts +2 -1
- package/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
- package/internals/hooks/useField/useFieldState.d.ts +1 -0
- package/internals/hooks/useField/useFieldState.js +9 -7
- package/internals/hooks/usePicker/usePicker.d.ts +1 -1
- package/internals/hooks/usePicker/usePicker.js +4 -2
- package/internals/hooks/usePicker/usePicker.types.d.ts +1 -1
- package/internals/hooks/usePicker/usePickerViews.d.ts +11 -2
- package/internals/hooks/usePicker/usePickerViews.js +8 -3
- package/internals/index.d.ts +4 -4
- package/internals/index.js +2 -2
- package/internals/models/props/basePickerProps.d.ts +0 -3
- package/internals/models/props/tabs.d.ts +2 -1
- package/internals/models/props/toolbar.d.ts +0 -3
- package/internals/utils/valueManagers.js +2 -2
- package/legacy/AdapterLuxon/AdapterLuxon.js +4 -12
- package/legacy/DatePicker/DatePicker.js +0 -3
- package/legacy/DatePicker/DatePickerToolbar.js +0 -3
- package/legacy/DateTimePicker/DateTimePicker.js +0 -3
- package/legacy/DateTimePicker/DateTimePickerTabs.js +7 -4
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +43 -32
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/legacy/MobileDatePicker/MobileDatePicker.js +0 -3
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
- package/legacy/MobileTimePicker/MobileTimePicker.js +0 -3
- package/legacy/MonthCalendar/MonthCalendar.js +0 -3
- package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/legacy/PickersLayout/pickersLayoutClasses.js +3 -2
- package/legacy/PickersLayout/usePickerLayout.js +2 -1
- package/legacy/PickersSectionList/PickersSectionList.js +6 -1
- package/legacy/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +99 -26
- package/legacy/PickersTextField/PickersFilledInput/index.js +2 -0
- package/legacy/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
- package/legacy/PickersTextField/PickersInput/PickersInput.js +190 -0
- package/legacy/PickersTextField/PickersInput/index.js +2 -0
- package/legacy/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
- package/legacy/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
- package/legacy/PickersTextField/PickersInputBase/index.js +2 -0
- package/legacy/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
- package/legacy/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +7 -1
- package/legacy/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +183 -0
- package/legacy/PickersTextField/PickersOutlinedInput/index.js +2 -0
- package/legacy/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
- package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js +128 -8
- package/legacy/PickersTextField/index.js +6 -0
- package/legacy/StaticDatePicker/StaticDatePicker.js +0 -3
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/legacy/StaticTimePicker/StaticTimePicker.js +0 -3
- package/legacy/TimeClock/TimeClock.js +3 -3
- package/legacy/TimePicker/TimePicker.js +0 -3
- package/legacy/TimePicker/TimePickerToolbar.js +0 -3
- package/legacy/YearCalendar/YearCalendar.js +0 -3
- package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +5 -4
- package/legacy/index.js +3 -2
- package/legacy/internals/hooks/useField/useField.js +6 -4
- package/legacy/internals/hooks/useField/useField.utils.js +71 -20
- package/legacy/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
- package/legacy/internals/hooks/useField/useFieldState.js +15 -11
- package/legacy/internals/hooks/usePicker/usePicker.js +4 -2
- package/legacy/internals/hooks/usePicker/usePickerViews.js +8 -3
- package/legacy/internals/index.js +2 -2
- package/legacy/internals/utils/valueManagers.js +2 -2
- package/legacy/locales/beBY.js +8 -3
- package/legacy/locales/caES.js +7 -2
- package/legacy/locales/csCZ.js +8 -3
- package/legacy/locales/daDK.js +8 -3
- package/legacy/locales/deDE.js +6 -1
- package/legacy/locales/elGR.js +8 -3
- package/legacy/locales/enUS.js +7 -3
- package/legacy/locales/esES.js +8 -3
- package/legacy/locales/eu.js +6 -1
- package/legacy/locales/faIR.js +6 -1
- package/legacy/locales/fiFI.js +8 -3
- package/legacy/locales/frFR.js +6 -1
- package/legacy/locales/heIL.js +6 -1
- package/legacy/locales/huHU.js +6 -1
- package/legacy/locales/isIS.js +8 -3
- package/legacy/locales/itIT.js +8 -3
- package/legacy/locales/jaJP.js +6 -1
- package/legacy/locales/koKR.js +6 -1
- package/legacy/locales/kzKZ.js +6 -1
- package/legacy/locales/mk.js +6 -1
- package/legacy/locales/nbNO.js +8 -3
- package/legacy/locales/nlNL.js +8 -3
- package/legacy/locales/plPL.js +8 -3
- package/legacy/locales/ptBR.js +6 -1
- package/legacy/locales/roRO.js +6 -1
- package/legacy/locales/ruRU.js +8 -3
- package/legacy/locales/skSK.js +8 -3
- package/legacy/locales/svSE.js +8 -3
- package/legacy/locales/trTR.js +8 -3
- package/legacy/locales/ukUA.js +8 -3
- package/legacy/locales/urPK.js +6 -1
- package/legacy/locales/viVN.js +8 -3
- package/legacy/locales/zhCN.js +6 -1
- package/legacy/locales/zhHK.js +6 -1
- package/locales/beBY.d.ts +4 -0
- package/locales/beBY.js +8 -3
- package/locales/caES.d.ts +4 -0
- package/locales/caES.js +7 -2
- package/locales/csCZ.d.ts +4 -0
- package/locales/csCZ.js +8 -3
- package/locales/daDK.d.ts +4 -0
- package/locales/daDK.js +8 -3
- package/locales/deDE.d.ts +4 -0
- package/locales/deDE.js +6 -1
- package/locales/elGR.d.ts +4 -0
- package/locales/elGR.js +8 -3
- package/locales/enUS.d.ts +4 -0
- package/locales/enUS.js +7 -3
- package/locales/esES.d.ts +4 -0
- package/locales/esES.js +8 -3
- package/locales/eu.d.ts +4 -0
- package/locales/eu.js +6 -1
- package/locales/faIR.d.ts +4 -0
- package/locales/faIR.js +6 -1
- package/locales/fiFI.d.ts +4 -0
- package/locales/fiFI.js +8 -3
- package/locales/frFR.d.ts +4 -0
- package/locales/frFR.js +6 -1
- package/locales/heIL.d.ts +4 -0
- package/locales/heIL.js +6 -1
- package/locales/huHU.d.ts +4 -0
- package/locales/huHU.js +6 -1
- package/locales/isIS.d.ts +4 -0
- package/locales/isIS.js +8 -3
- package/locales/itIT.d.ts +4 -0
- package/locales/itIT.js +8 -3
- package/locales/jaJP.d.ts +4 -0
- package/locales/jaJP.js +6 -1
- package/locales/koKR.d.ts +4 -0
- package/locales/koKR.js +6 -1
- package/locales/kzKZ.d.ts +4 -0
- package/locales/kzKZ.js +6 -1
- package/locales/mk.d.ts +4 -0
- package/locales/mk.js +6 -1
- package/locales/nbNO.d.ts +4 -0
- package/locales/nbNO.js +8 -3
- package/locales/nlNL.d.ts +4 -0
- package/locales/nlNL.js +8 -3
- package/locales/plPL.d.ts +4 -0
- package/locales/plPL.js +8 -3
- package/locales/ptBR.d.ts +4 -0
- package/locales/ptBR.js +6 -1
- package/locales/roRO.d.ts +4 -0
- package/locales/roRO.js +6 -1
- package/locales/ruRU.d.ts +4 -0
- package/locales/ruRU.js +8 -3
- package/locales/skSK.d.ts +4 -0
- package/locales/skSK.js +8 -3
- package/locales/svSE.d.ts +4 -0
- package/locales/svSE.js +8 -3
- package/locales/trTR.d.ts +4 -0
- package/locales/trTR.js +8 -3
- package/locales/ukUA.d.ts +4 -0
- package/locales/ukUA.js +8 -3
- package/locales/urPK.d.ts +4 -0
- package/locales/urPK.js +6 -1
- package/locales/utils/getPickersLocalization.d.ts +4 -0
- package/locales/utils/pickersLocaleTextApi.d.ts +4 -0
- package/locales/viVN.d.ts +4 -0
- package/locales/viVN.js +8 -3
- package/locales/zhCN.d.ts +4 -0
- package/locales/zhCN.js +6 -1
- package/locales/zhHK.d.ts +4 -0
- package/locales/zhHK.js +6 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +3 -11
- package/modern/DatePicker/DatePicker.js +0 -3
- package/modern/DatePicker/DatePickerToolbar.js +0 -3
- package/modern/DateTimePicker/DateTimePicker.js +0 -3
- package/modern/DateTimePicker/DateTimePickerTabs.js +7 -4
- package/modern/DateTimePicker/DateTimePickerToolbar.js +33 -20
- package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/modern/MobileDatePicker/MobileDatePicker.js +0 -3
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
- package/modern/MobileTimePicker/MobileTimePicker.js +0 -3
- package/modern/MonthCalendar/MonthCalendar.js +0 -3
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/modern/PickersLayout/pickersLayoutClasses.js +3 -2
- package/modern/PickersLayout/usePickerLayout.js +2 -1
- package/modern/PickersSectionList/PickersSectionList.js +6 -1
- package/modern/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +98 -25
- package/modern/PickersTextField/PickersFilledInput/index.js +2 -0
- package/modern/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
- package/modern/PickersTextField/PickersInput/PickersInput.js +196 -0
- package/modern/PickersTextField/PickersInput/index.js +2 -0
- package/modern/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
- package/modern/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
- package/modern/PickersTextField/PickersInputBase/index.js +2 -0
- package/modern/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
- package/{internals/components/PickersInput → modern/PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +190 -0
- package/modern/PickersTextField/PickersOutlinedInput/index.js +2 -0
- package/modern/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
- package/modern/PickersTextField/PickersTextField.js +258 -0
- package/modern/PickersTextField/index.js +6 -0
- package/modern/StaticDatePicker/StaticDatePicker.js +0 -3
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/modern/StaticTimePicker/StaticTimePicker.js +0 -3
- package/modern/TimeClock/TimeClock.js +3 -3
- package/modern/TimePicker/TimePicker.js +0 -3
- package/modern/TimePicker/TimePickerToolbar.js +0 -3
- package/modern/YearCalendar/YearCalendar.js +0 -3
- package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
- package/modern/index.js +3 -2
- package/modern/internals/hooks/useField/useField.js +5 -3
- package/modern/internals/hooks/useField/useField.utils.js +68 -21
- package/modern/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
- package/modern/internals/hooks/useField/useFieldState.js +9 -7
- package/modern/internals/hooks/usePicker/usePicker.js +4 -2
- package/modern/internals/hooks/usePicker/usePickerViews.js +8 -3
- package/modern/internals/index.js +2 -2
- package/modern/internals/utils/valueManagers.js +2 -2
- package/modern/locales/beBY.js +8 -3
- package/modern/locales/caES.js +7 -2
- package/modern/locales/csCZ.js +8 -3
- package/modern/locales/daDK.js +8 -3
- package/modern/locales/deDE.js +6 -1
- package/modern/locales/elGR.js +8 -3
- package/modern/locales/enUS.js +7 -3
- package/modern/locales/esES.js +8 -3
- package/modern/locales/eu.js +6 -1
- package/modern/locales/faIR.js +6 -1
- package/modern/locales/fiFI.js +8 -3
- package/modern/locales/frFR.js +6 -1
- package/modern/locales/heIL.js +6 -1
- package/modern/locales/huHU.js +6 -1
- package/modern/locales/isIS.js +8 -3
- package/modern/locales/itIT.js +8 -3
- package/modern/locales/jaJP.js +6 -1
- package/modern/locales/koKR.js +6 -1
- package/modern/locales/kzKZ.js +6 -1
- package/modern/locales/mk.js +6 -1
- package/modern/locales/nbNO.js +8 -3
- package/modern/locales/nlNL.js +8 -3
- package/modern/locales/plPL.js +8 -3
- package/modern/locales/ptBR.js +6 -1
- package/modern/locales/roRO.js +6 -1
- package/modern/locales/ruRU.js +8 -3
- package/modern/locales/skSK.js +8 -3
- package/modern/locales/svSE.js +8 -3
- package/modern/locales/trTR.js +8 -3
- package/modern/locales/ukUA.js +8 -3
- package/modern/locales/urPK.js +6 -1
- package/modern/locales/viVN.js +8 -3
- package/modern/locales/zhCN.js +6 -1
- package/modern/locales/zhHK.js +6 -1
- package/node/AdapterLuxon/AdapterLuxon.js +3 -11
- package/node/DatePicker/DatePicker.js +0 -3
- package/node/DatePicker/DatePickerToolbar.js +0 -3
- package/node/DateTimePicker/DateTimePicker.js +0 -3
- package/node/DateTimePicker/DateTimePickerTabs.js +8 -5
- package/node/DateTimePicker/DateTimePickerToolbar.js +34 -21
- package/node/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/node/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/node/MobileDatePicker/MobileDatePicker.js +0 -3
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
- package/node/MobileTimePicker/MobileTimePicker.js +0 -3
- package/node/MonthCalendar/MonthCalendar.js +0 -3
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/node/PickersLayout/pickersLayoutClasses.js +5 -3
- package/node/PickersLayout/usePickerLayout.js +2 -1
- package/node/PickersSectionList/PickersSectionList.js +6 -1
- package/node/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +102 -30
- package/node/PickersTextField/PickersFilledInput/index.js +25 -0
- package/node/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +16 -0
- package/node/PickersTextField/PickersInput/PickersInput.js +204 -0
- package/node/{internals/components → PickersTextField}/PickersInput/index.js +0 -7
- package/node/PickersTextField/PickersInput/pickersInputClasses.js +16 -0
- package/node/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +105 -27
- package/node/PickersTextField/PickersInputBase/index.js +25 -0
- package/node/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +14 -0
- package/node/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +197 -0
- package/node/PickersTextField/PickersOutlinedInput/index.js +25 -0
- package/node/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +16 -0
- package/node/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js +128 -9
- package/node/PickersTextField/index.js +78 -0
- package/node/StaticDatePicker/StaticDatePicker.js +0 -3
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/node/StaticTimePicker/StaticTimePicker.js +0 -3
- package/node/TimeClock/TimeClock.js +3 -3
- package/node/TimePicker/TimePicker.js +0 -3
- package/node/TimePicker/TimePickerToolbar.js +0 -3
- package/node/YearCalendar/YearCalendar.js +0 -3
- package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
- package/node/index.js +17 -5
- package/node/internals/hooks/useField/useField.js +5 -3
- package/node/internals/hooks/useField/useField.utils.js +73 -22
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +11 -7
- package/node/internals/hooks/useField/useFieldState.js +8 -6
- package/node/internals/hooks/usePicker/usePicker.js +4 -2
- package/node/internals/hooks/usePicker/usePickerViews.js +8 -3
- package/node/internals/index.js +12 -0
- package/node/internals/utils/valueManagers.js +2 -2
- package/node/locales/beBY.js +8 -3
- package/node/locales/caES.js +7 -2
- package/node/locales/csCZ.js +8 -3
- package/node/locales/daDK.js +8 -3
- package/node/locales/deDE.js +6 -1
- package/node/locales/elGR.js +8 -3
- package/node/locales/enUS.js +7 -3
- package/node/locales/esES.js +8 -3
- package/node/locales/eu.js +6 -1
- package/node/locales/faIR.js +6 -1
- package/node/locales/fiFI.js +8 -3
- package/node/locales/frFR.js +6 -1
- package/node/locales/heIL.js +6 -1
- package/node/locales/huHU.js +6 -1
- package/node/locales/isIS.js +8 -3
- package/node/locales/itIT.js +8 -3
- package/node/locales/jaJP.js +6 -1
- package/node/locales/koKR.js +6 -1
- package/node/locales/kzKZ.js +6 -1
- package/node/locales/mk.js +6 -1
- package/node/locales/nbNO.js +8 -3
- package/node/locales/nlNL.js +8 -3
- package/node/locales/plPL.js +8 -3
- package/node/locales/ptBR.js +6 -1
- package/node/locales/roRO.js +6 -1
- package/node/locales/ruRU.js +8 -3
- package/node/locales/skSK.js +8 -3
- package/node/locales/svSE.js +8 -3
- package/node/locales/trTR.js +8 -3
- package/node/locales/ukUA.js +8 -3
- package/node/locales/urPK.js +6 -1
- package/node/locales/viVN.js +8 -3
- package/node/locales/zhCN.js +6 -1
- package/node/locales/zhHK.js +6 -1
- package/package.json +7 -7
- package/themeAugmentation/components.d.ts +26 -0
- package/themeAugmentation/overrides.d.ts +16 -0
- package/themeAugmentation/props.d.ts +16 -0
- package/timeViewRenderers/timeViewRenderers.d.ts +1 -1
- package/internals/components/PickersInput/PickersFilledInput.d.ts +0 -3
- package/internals/components/PickersInput/PickersInput.d.ts +0 -13
- package/internals/components/PickersInput/PickersOutlinedInput.d.ts +0 -3
- package/internals/components/PickersInput/PickersOutlinedInput.js +0 -117
- package/internals/components/PickersInput/PickersStandardInput.d.ts +0 -3
- package/internals/components/PickersInput/PickersStandardInput.js +0 -123
- package/internals/components/PickersInput/index.js +0 -3
- package/internals/components/PickersInput/pickersInputClasses.d.ts +0 -84
- package/internals/components/PickersInput/pickersInputClasses.js +0 -18
- package/internals/components/PickersTextField/PickersTextField.d.ts +0 -2
- package/internals/components/PickersTextField/PickersTextField.js +0 -138
- package/internals/components/PickersTextField/index.d.ts +0 -1
- package/internals/components/PickersTextField/index.js +0 -1
- package/legacy/internals/components/PickersInput/PickersOutlinedInput.js +0 -110
- package/legacy/internals/components/PickersInput/PickersStandardInput.js +0 -117
- package/legacy/internals/components/PickersInput/index.js +0 -3
- package/legacy/internals/components/PickersInput/pickersInputClasses.js +0 -18
- package/legacy/internals/components/PickersTextField/index.js +0 -1
- package/modern/internals/components/PickersInput/PickersOutlinedInput.js +0 -117
- package/modern/internals/components/PickersInput/PickersStandardInput.js +0 -123
- package/modern/internals/components/PickersInput/index.js +0 -3
- package/modern/internals/components/PickersInput/pickersInputClasses.js +0 -18
- package/modern/internals/components/PickersTextField/PickersTextField.js +0 -138
- package/modern/internals/components/PickersTextField/index.js +0 -1
- package/node/internals/components/PickersInput/PickersOutlinedInput.js +0 -125
- package/node/internals/components/PickersInput/PickersStandardInput.js +0 -132
- package/node/internals/components/PickersInput/pickersInputClasses.js +0 -29
- package/node/internals/components/PickersTextField/index.js +0 -12
- /package/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
- /package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
- /package/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.d.ts +0 -0
- /package/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
- /package/legacy/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
- /package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
- /package/legacy/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
- /package/modern/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
- /package/modern/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
- /package/modern/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
- /package/node/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
- /package/node/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
- /package/node/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
|
@@ -30,7 +30,8 @@ export const usePickerViews = ({
|
|
|
30
30
|
propsFromPickerValue,
|
|
31
31
|
additionalViewProps,
|
|
32
32
|
inputRef,
|
|
33
|
-
autoFocusView
|
|
33
|
+
autoFocusView,
|
|
34
|
+
rendererInterceptor
|
|
34
35
|
}) => {
|
|
35
36
|
const {
|
|
36
37
|
onChange,
|
|
@@ -146,7 +147,7 @@ export const usePickerViews = ({
|
|
|
146
147
|
if (renderer == null) {
|
|
147
148
|
return null;
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
+
const rendererProps = _extends({}, propsToForwardToView, additionalViewProps, propsFromPickerValue, {
|
|
150
151
|
views,
|
|
151
152
|
timezone,
|
|
152
153
|
onChange: setValueAndGoToNextView,
|
|
@@ -156,7 +157,11 @@ export const usePickerViews = ({
|
|
|
156
157
|
onFocusedViewChange: setFocusedView,
|
|
157
158
|
showViewSwitcher: timeViewsCount > 1,
|
|
158
159
|
timeViewsCount
|
|
159
|
-
})
|
|
160
|
+
});
|
|
161
|
+
if (rendererInterceptor) {
|
|
162
|
+
return rendererInterceptor(viewRenderers, popperView, rendererProps);
|
|
163
|
+
}
|
|
164
|
+
return renderer(rendererProps);
|
|
160
165
|
}
|
|
161
166
|
};
|
|
162
167
|
};
|
package/internals/index.d.ts
CHANGED
|
@@ -20,16 +20,16 @@ export type { PickerPopperProps } from './components/PickersPopper';
|
|
|
20
20
|
export { pickersPopperClasses } from './components/pickersPopperClasses';
|
|
21
21
|
export type { PickersPopperClassKey, PickersPopperClasses, } from './components/pickersPopperClasses';
|
|
22
22
|
export { PickersToolbarButton } from './components/PickersToolbarButton';
|
|
23
|
-
export { DAY_MARGIN, DIALOG_WIDTH } from './constants/dimensions';
|
|
23
|
+
export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT } from './constants/dimensions';
|
|
24
24
|
export { useControlledValueWithTimezone } from './hooks/useValueWithTimezone';
|
|
25
25
|
export type { DesktopOnlyPickerProps } from './hooks/useDesktopPicker';
|
|
26
26
|
export { useField, createDateStrForInputFromSections, addPositionPropertiesToSections, } from './hooks/useField';
|
|
27
27
|
export type { UseFieldInternalProps, UseFieldParams, UseFieldResponse, UseFieldForwardedProps, FieldValueManager, FieldChangeHandler, FieldChangeHandlerContext, } from './hooks/useField';
|
|
28
28
|
export type { MobileOnlyPickerProps } from './hooks/useMobilePicker';
|
|
29
29
|
export { usePicker } from './hooks/usePicker';
|
|
30
|
-
export type { UsePickerResponse, UsePickerParams, UsePickerProps } from './hooks/usePicker';
|
|
30
|
+
export type { UsePickerResponse, UsePickerParams, UsePickerProps, UsePickerValueFieldResponse, } from './hooks/usePicker';
|
|
31
31
|
export type { UsePickerValueNonStaticProps, PickerValueManager, PickerSelectionState, } from './hooks/usePicker/usePickerValue.types';
|
|
32
|
-
export type { UsePickerViewsNonStaticProps, PickerViewRendererLookup, UsePickerViewsProps, } from './hooks/usePicker/usePickerViews';
|
|
32
|
+
export type { UsePickerViewsNonStaticProps, PickerViewRendererLookup, PickerViewRenderer, UsePickerViewsProps, } from './hooks/usePicker/usePickerViews';
|
|
33
33
|
export { useStaticPicker } from './hooks/useStaticPicker';
|
|
34
34
|
export type { StaticOnlyPickerProps, UseStaticPickerSlots, UseStaticPickerSlotProps, } from './hooks/useStaticPicker';
|
|
35
35
|
export { useLocalizationContext, useDefaultDates, useUtils, useLocaleText, useNow, } from './hooks/useUtils';
|
|
@@ -63,4 +63,4 @@ export { DayCalendar } from '../DateCalendar/DayCalendar';
|
|
|
63
63
|
export type { DayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, ExportedDayCalendarProps, } from '../DateCalendar/DayCalendar';
|
|
64
64
|
export type { ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
|
|
65
65
|
export { useCalendarState } from '../DateCalendar/useCalendarState';
|
|
66
|
-
export { isTimeView } from './utils/time-utils';
|
|
66
|
+
export { isInternalTimeView, isTimeView } from './utils/time-utils';
|
package/internals/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { pickersToolbarTextClasses } from './components/pickersToolbarTextClasse
|
|
|
8
8
|
export { pickersArrowSwitcherClasses } from './components/PickersArrowSwitcher/pickersArrowSwitcherClasses';
|
|
9
9
|
export { pickersPopperClasses } from './components/pickersPopperClasses';
|
|
10
10
|
export { PickersToolbarButton } from './components/PickersToolbarButton';
|
|
11
|
-
export { DAY_MARGIN, DIALOG_WIDTH } from './constants/dimensions';
|
|
11
|
+
export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT } from './constants/dimensions';
|
|
12
12
|
export { useControlledValueWithTimezone } from './hooks/useValueWithTimezone';
|
|
13
13
|
export { useField, createDateStrForInputFromSections, addPositionPropertiesToSections } from './hooks/useField';
|
|
14
14
|
export { usePicker } from './hooks/usePicker';
|
|
@@ -32,4 +32,4 @@ export { applyDefaultViewProps } from './utils/views';
|
|
|
32
32
|
export { buildDeprecatedPropsWarning, buildWarning } from './utils/warning';
|
|
33
33
|
export { DayCalendar } from '../DateCalendar/DayCalendar';
|
|
34
34
|
export { useCalendarState } from '../DateCalendar/useCalendarState';
|
|
35
|
-
export { isTimeView } from './utils/time-utils';
|
|
35
|
+
export { isInternalTimeView, isTimeView } from './utils/time-utils';
|
|
@@ -10,9 +10,6 @@ import { DateOrTimeViewWithMeridiem } from '../common';
|
|
|
10
10
|
* Props common to all pickers after applying the default props on each picker.
|
|
11
11
|
*/
|
|
12
12
|
export interface BasePickerProps<TValue, TDate, TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UsePickerViewsProps<TValue, TDate, TView, any, any>, TAdditionalProps extends {}> extends UsePickerBaseProps<TValue, TDate, TView, TError, TExternalProps, TAdditionalProps> {
|
|
13
|
-
/**
|
|
14
|
-
* Class name applied to the root element.
|
|
15
|
-
*/
|
|
16
13
|
className?: string;
|
|
17
14
|
/**
|
|
18
15
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
@@ -5,11 +5,12 @@ export interface BaseTabsProps<TView extends DateOrTimeViewWithMeridiem> {
|
|
|
5
5
|
*/
|
|
6
6
|
view: TView;
|
|
7
7
|
/**
|
|
8
|
-
* Callback called when a tab is clicked
|
|
8
|
+
* Callback called when a tab is clicked.
|
|
9
9
|
* @template TView
|
|
10
10
|
* @param {TView} view The view to open
|
|
11
11
|
*/
|
|
12
12
|
onViewChange: (view: TView) => void;
|
|
13
13
|
}
|
|
14
14
|
export interface ExportedBaseTabsProps {
|
|
15
|
+
className?: string;
|
|
15
16
|
}
|
|
@@ -30,12 +30,12 @@ export const singleItemValueManager = {
|
|
|
30
30
|
};
|
|
31
31
|
export const singleItemFieldValueManager = {
|
|
32
32
|
updateReferenceValue: (utils, value, prevReferenceValue) => value == null || !utils.isValid(value) ? prevReferenceValue : value,
|
|
33
|
-
getSectionsFromValue: (utils, date, prevSections, isRTL, getSectionsFromDate) => {
|
|
33
|
+
getSectionsFromValue: (utils, date, prevSections, localizedDigits, isRTL, getSectionsFromDate) => {
|
|
34
34
|
const shouldReUsePrevDateSections = !utils.isValid(date) && !!prevSections;
|
|
35
35
|
if (shouldReUsePrevDateSections) {
|
|
36
36
|
return prevSections;
|
|
37
37
|
}
|
|
38
|
-
return addPositionPropertiesToSections(getSectionsFromDate(date), isRTL);
|
|
38
|
+
return addPositionPropertiesToSections(getSectionsFromDate(date), localizedDigits, isRTL);
|
|
39
39
|
},
|
|
40
40
|
getValueStrFromSections: createDateStrForInputFromSections,
|
|
41
41
|
getActiveDateManager: (utils, state) => ({
|
|
@@ -348,10 +348,7 @@ export var AdapterLuxon = /*#__PURE__*/_createClass(function AdapterLuxon() {
|
|
|
348
348
|
return value.startOf('month');
|
|
349
349
|
};
|
|
350
350
|
this.startOfWeek = function (value) {
|
|
351
|
-
return value.startOf('week',
|
|
352
|
-
// TODO: remove when `@types/luxon` add support for the parameter.
|
|
353
|
-
// @ts-ignore
|
|
354
|
-
{
|
|
351
|
+
return value.startOf('week', {
|
|
355
352
|
useLocaleWeeks: true
|
|
356
353
|
});
|
|
357
354
|
};
|
|
@@ -365,10 +362,7 @@ export var AdapterLuxon = /*#__PURE__*/_createClass(function AdapterLuxon() {
|
|
|
365
362
|
return value.endOf('month');
|
|
366
363
|
};
|
|
367
364
|
this.endOfWeek = function (value) {
|
|
368
|
-
return value.endOf('week',
|
|
369
|
-
// TODO: remove when `@types/luxon` add support for the parameter.
|
|
370
|
-
// @ts-ignore
|
|
371
|
-
{
|
|
365
|
+
return value.endOf('week', {
|
|
372
366
|
useLocaleWeeks: true
|
|
373
367
|
});
|
|
374
368
|
};
|
|
@@ -493,10 +487,8 @@ export var AdapterLuxon = /*#__PURE__*/_createClass(function AdapterLuxon() {
|
|
|
493
487
|
return weeks;
|
|
494
488
|
};
|
|
495
489
|
this.getWeekNumber = function (value) {
|
|
496
|
-
var _value$
|
|
497
|
-
|
|
498
|
-
// @ts-ignore
|
|
499
|
-
return (_value$localeWeekNumb = value.localeWeekNumber) != null ? _value$localeWeekNumb : value.weekNumber;
|
|
490
|
+
var _value$localWeekNumbe;
|
|
491
|
+
return (_value$localWeekNumbe = value.localWeekNumber) != null ? _value$localWeekNumbe : value.weekNumber;
|
|
500
492
|
};
|
|
501
493
|
this.getYearRange = function (_ref4) {
|
|
502
494
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
@@ -54,9 +54,6 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
54
54
|
* - the `input` element if there is a field rendered.
|
|
55
55
|
*/
|
|
56
56
|
autoFocus: PropTypes.bool,
|
|
57
|
-
/**
|
|
58
|
-
* Class name applied to the root element.
|
|
59
|
-
*/
|
|
60
57
|
className: PropTypes.string,
|
|
61
58
|
/**
|
|
62
59
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -96,9 +96,6 @@ process.env.NODE_ENV !== "production" ? DatePickerToolbar.propTypes = {
|
|
|
96
96
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
97
97
|
// ----------------------------------------------------------------------
|
|
98
98
|
classes: PropTypes.object,
|
|
99
|
-
/**
|
|
100
|
-
* className applied to the root component.
|
|
101
|
-
*/
|
|
102
99
|
className: PropTypes.string,
|
|
103
100
|
disabled: PropTypes.bool,
|
|
104
101
|
/**
|
|
@@ -64,9 +64,6 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
64
64
|
* - the `input` element if there is a field rendered.
|
|
65
65
|
*/
|
|
66
66
|
autoFocus: PropTypes.bool,
|
|
67
|
-
/**
|
|
68
|
-
* Class name applied to the root element.
|
|
69
|
-
*/
|
|
70
67
|
className: PropTypes.string,
|
|
71
68
|
/**
|
|
72
69
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import Tab from '@mui/material/Tab';
|
|
5
6
|
import Tabs, { tabsClasses } from '@mui/material/Tabs';
|
|
6
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
9
|
import { TimeIcon, DateRangeIcon } from '../icons';
|
|
9
10
|
import { useLocaleText } from '../internals/hooks/useUtils';
|
|
10
11
|
import { getDateTimePickerTabsUtilityClass } from './dateTimePickerTabsClasses';
|
|
@@ -71,7 +72,8 @@ var DateTimePickerTabs = function DateTimePickerTabs(inProps) {
|
|
|
71
72
|
timeIcon = _props$timeIcon === void 0 ? /*#__PURE__*/_jsx(TimeIcon, {}) : _props$timeIcon,
|
|
72
73
|
view = props.view,
|
|
73
74
|
_props$hidden = props.hidden,
|
|
74
|
-
hidden = _props$hidden === void 0 ? typeof window === 'undefined' || window.innerHeight < 667 : _props$hidden
|
|
75
|
+
hidden = _props$hidden === void 0 ? typeof window === 'undefined' || window.innerHeight < 667 : _props$hidden,
|
|
76
|
+
className = props.className;
|
|
75
77
|
var localeText = useLocaleText();
|
|
76
78
|
var classes = useUtilityClasses(props);
|
|
77
79
|
var handleChange = function handleChange(event, value) {
|
|
@@ -85,7 +87,7 @@ var DateTimePickerTabs = function DateTimePickerTabs(inProps) {
|
|
|
85
87
|
variant: "fullWidth",
|
|
86
88
|
value: viewToTab(view),
|
|
87
89
|
onChange: handleChange,
|
|
88
|
-
className: classes.root,
|
|
90
|
+
className: clsx(className, classes.root),
|
|
89
91
|
children: [/*#__PURE__*/_jsx(Tab, {
|
|
90
92
|
value: "date",
|
|
91
93
|
"aria-label": localeText.dateTableLabel,
|
|
@@ -110,6 +112,7 @@ process.env.NODE_ENV !== "production" ? DateTimePickerTabs.propTypes = {
|
|
|
110
112
|
* Override or extend the styles applied to the component.
|
|
111
113
|
*/
|
|
112
114
|
classes: PropTypes.object,
|
|
115
|
+
className: PropTypes.string,
|
|
113
116
|
/**
|
|
114
117
|
* Date tab icon.
|
|
115
118
|
* @default DateRange
|
|
@@ -121,7 +124,7 @@ process.env.NODE_ENV !== "production" ? DateTimePickerTabs.propTypes = {
|
|
|
121
124
|
*/
|
|
122
125
|
hidden: PropTypes.bool,
|
|
123
126
|
/**
|
|
124
|
-
* Callback called when a tab is clicked
|
|
127
|
+
* Callback called when a tab is clicked.
|
|
125
128
|
* @template TView
|
|
126
129
|
* @param {TView} view The view to open
|
|
127
130
|
*/
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
var _excluded = ["ampm", "ampmInClock", "value", "onChange", "view", "isLandscape", "onViewChange", "toolbarFormat", "toolbarPlaceholder", "views", "disabled", "readOnly", "toolbarVariant"];
|
|
4
|
+
var _excluded = ["ampm", "ampmInClock", "value", "onChange", "view", "isLandscape", "onViewChange", "toolbarFormat", "toolbarPlaceholder", "views", "disabled", "readOnly", "toolbarVariant", "toolbarTitle", "className"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { styled, useThemeProps, useTheme } from '@mui/material/styles';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import { PickersToolbarText } from '../internals/components/PickersToolbarText';
|
|
10
11
|
import { PickersToolbar } from '../internals/components/PickersToolbar';
|
|
11
12
|
import { PickersToolbarButton } from '../internals/components/PickersToolbarButton';
|
|
@@ -14,6 +15,8 @@ import { dateTimePickerToolbarClasses, getDateTimePickerToolbarUtilityClass } fr
|
|
|
14
15
|
import { useMeridiemMode } from '../internals/hooks/date-helpers-hooks';
|
|
15
16
|
import { MULTI_SECTION_CLOCK_SECTION_WIDTH } from '../internals/constants/dimensions';
|
|
16
17
|
import { formatMeridiem } from '../internals/utils/date-utils';
|
|
18
|
+
import { pickersToolbarTextClasses } from '../internals/components/pickersToolbarTextClasses';
|
|
19
|
+
import { pickersToolbarClasses } from '../internals';
|
|
17
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
22
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
@@ -40,14 +43,17 @@ var DateTimePickerToolbarRoot = styled(PickersToolbar, {
|
|
|
40
43
|
})(function (_ref) {
|
|
41
44
|
var theme = _ref.theme,
|
|
42
45
|
ownerState = _ref.ownerState;
|
|
43
|
-
return {
|
|
46
|
+
return _extends({
|
|
44
47
|
paddingLeft: ownerState.toolbarVariant === 'desktop' && !ownerState.isLandscape ? 24 : 16,
|
|
45
48
|
paddingRight: ownerState.toolbarVariant === 'desktop' && !ownerState.isLandscape ? 0 : 16,
|
|
46
49
|
borderBottom: ownerState.toolbarVariant === 'desktop' ? "1px solid ".concat((theme.vars || theme).palette.divider) : undefined,
|
|
47
50
|
borderRight: ownerState.toolbarVariant === 'desktop' && ownerState.isLandscape ? "1px solid ".concat((theme.vars || theme).palette.divider) : undefined,
|
|
48
51
|
justifyContent: 'space-around',
|
|
49
52
|
position: 'relative'
|
|
50
|
-
}
|
|
53
|
+
}, ownerState.toolbarVariant === 'desktop' && _defineProperty({}, "& .".concat(pickersToolbarClasses.content, " .").concat(pickersToolbarTextClasses.selected), {
|
|
54
|
+
color: (theme.vars || theme).palette.primary.main,
|
|
55
|
+
fontWeight: theme.typography.fontWeightBold
|
|
56
|
+
}));
|
|
51
57
|
});
|
|
52
58
|
DateTimePickerToolbarRoot.propTypes = {
|
|
53
59
|
// ----------------------------- Warning --------------------------------
|
|
@@ -83,9 +89,9 @@ var DateTimePickerToolbarTimeContainer = styled('div', {
|
|
|
83
89
|
overridesResolver: function overridesResolver(props, styles) {
|
|
84
90
|
return styles.timeContainer;
|
|
85
91
|
}
|
|
86
|
-
})(function (
|
|
87
|
-
var theme =
|
|
88
|
-
ownerState =
|
|
92
|
+
})(function (_ref3) {
|
|
93
|
+
var theme = _ref3.theme,
|
|
94
|
+
ownerState = _ref3.ownerState;
|
|
89
95
|
var direction = ownerState.isLandscape && ownerState.toolbarVariant !== 'desktop' ? 'column' : 'row';
|
|
90
96
|
return _extends({
|
|
91
97
|
display: 'flex',
|
|
@@ -104,9 +110,9 @@ var DateTimePickerToolbarTimeDigitsContainer = styled('div', {
|
|
|
104
110
|
overridesResolver: function overridesResolver(props, styles) {
|
|
105
111
|
return styles.timeDigitsContainer;
|
|
106
112
|
}
|
|
107
|
-
})(function (
|
|
108
|
-
var theme =
|
|
109
|
-
ownerState =
|
|
113
|
+
})(function (_ref4) {
|
|
114
|
+
var theme = _ref4.theme,
|
|
115
|
+
ownerState = _ref4.ownerState;
|
|
110
116
|
return _extends({
|
|
111
117
|
display: 'flex'
|
|
112
118
|
}, ownerState.toolbarVariant === 'desktop' && {
|
|
@@ -130,8 +136,8 @@ var DateTimePickerToolbarSeparator = styled(PickersToolbarText, {
|
|
|
130
136
|
overridesResolver: function overridesResolver(props, styles) {
|
|
131
137
|
return styles.separator;
|
|
132
138
|
}
|
|
133
|
-
})(function (
|
|
134
|
-
var ownerState =
|
|
139
|
+
})(function (_ref5) {
|
|
140
|
+
var ownerState = _ref5.ownerState;
|
|
135
141
|
return {
|
|
136
142
|
margin: ownerState.toolbarVariant === 'desktop' ? 0 : '0 4px 0 2px',
|
|
137
143
|
cursor: 'default'
|
|
@@ -145,8 +151,8 @@ var DateTimePickerToolbarAmPmSelection = styled('div', {
|
|
|
145
151
|
overridesResolver: function overridesResolver(props, styles) {
|
|
146
152
|
return [_defineProperty({}, ".".concat(dateTimePickerToolbarClasses.ampmLabel), styles.ampmLabel), _defineProperty({}, "&.".concat(dateTimePickerToolbarClasses.ampmLandscape), styles.ampmLandscape), styles.ampmSelection];
|
|
147
153
|
}
|
|
148
|
-
})(function (
|
|
149
|
-
var ownerState =
|
|
154
|
+
})(function (_ref8) {
|
|
155
|
+
var ownerState = _ref8.ownerState;
|
|
150
156
|
return _extends({
|
|
151
157
|
display: 'flex',
|
|
152
158
|
flexDirection: 'column',
|
|
@@ -192,6 +198,8 @@ function DateTimePickerToolbar(inProps) {
|
|
|
192
198
|
readOnly = props.readOnly,
|
|
193
199
|
_props$toolbarVariant = props.toolbarVariant,
|
|
194
200
|
toolbarVariant = _props$toolbarVariant === void 0 ? 'mobile' : _props$toolbarVariant,
|
|
201
|
+
inToolbarTitle = props.toolbarTitle,
|
|
202
|
+
className = props.className,
|
|
195
203
|
other = _objectWithoutProperties(props, _excluded);
|
|
196
204
|
var ownerState = props;
|
|
197
205
|
var utils = useUtils();
|
|
@@ -205,6 +213,7 @@ function DateTimePickerToolbar(inProps) {
|
|
|
205
213
|
var classes = useUtilityClasses(_extends({}, ownerState, {
|
|
206
214
|
theme: theme
|
|
207
215
|
}));
|
|
216
|
+
var toolbarTitle = inToolbarTitle != null ? inToolbarTitle : localeText.dateTimePickerToolbarTitle;
|
|
208
217
|
var formatHours = function formatHours(time) {
|
|
209
218
|
return ampm ? utils.format(time, 'hours12h') : utils.format(time, 'hours24h');
|
|
210
219
|
};
|
|
@@ -218,9 +227,9 @@ function DateTimePickerToolbar(inProps) {
|
|
|
218
227
|
return utils.format(value, 'shortDate');
|
|
219
228
|
}, [value, toolbarFormat, toolbarPlaceholder, utils]);
|
|
220
229
|
return /*#__PURE__*/_jsxs(DateTimePickerToolbarRoot, _extends({
|
|
221
|
-
toolbarTitle: localeText.dateTimePickerToolbarTitle,
|
|
222
230
|
isLandscape: isLandscape,
|
|
223
|
-
className: classes.root
|
|
231
|
+
className: clsx(classes.root, className),
|
|
232
|
+
toolbarTitle: toolbarTitle
|
|
224
233
|
}, other, {
|
|
225
234
|
ownerState: ownerState,
|
|
226
235
|
children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarDateContainer, {
|
|
@@ -249,16 +258,16 @@ function DateTimePickerToolbar(inProps) {
|
|
|
249
258
|
children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarTimeDigitsContainer, {
|
|
250
259
|
className: classes.timeDigitsContainer,
|
|
251
260
|
ownerState: ownerState,
|
|
252
|
-
children: [views.includes('hours') && /*#__PURE__*/
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
261
|
+
children: [views.includes('hours') && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
262
|
+
children: [/*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
263
|
+
variant: isDesktop ? 'h5' : 'h3',
|
|
264
|
+
width: isDesktop && !isLandscape ? MULTI_SECTION_CLOCK_SECTION_WIDTH : undefined,
|
|
265
|
+
onClick: function onClick() {
|
|
266
|
+
return onViewChange('hours');
|
|
267
|
+
},
|
|
268
|
+
selected: view === 'hours',
|
|
269
|
+
value: value ? formatHours(value) : '--'
|
|
270
|
+
}), /*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {
|
|
262
271
|
variant: isDesktop ? 'h5' : 'h3',
|
|
263
272
|
value: ":",
|
|
264
273
|
className: classes.separator,
|
|
@@ -269,8 +278,9 @@ function DateTimePickerToolbar(inProps) {
|
|
|
269
278
|
onClick: function onClick() {
|
|
270
279
|
return onViewChange('minutes');
|
|
271
280
|
},
|
|
272
|
-
selected: view === 'minutes',
|
|
273
|
-
value: value ? utils.format(value, 'minutes') : '--'
|
|
281
|
+
selected: view === 'minutes' || !views.includes('minutes') && view === 'hours',
|
|
282
|
+
value: value ? utils.format(value, 'minutes') : '--',
|
|
283
|
+
disabled: !views.includes('minutes')
|
|
274
284
|
})]
|
|
275
285
|
}), views.includes('seconds') && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
276
286
|
children: [/*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {
|
|
@@ -333,9 +343,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
333
343
|
* Override or extend the styles applied to the component.
|
|
334
344
|
*/
|
|
335
345
|
classes: PropTypes.object,
|
|
336
|
-
/**
|
|
337
|
-
* className applied to the root component.
|
|
338
|
-
*/
|
|
339
346
|
className: PropTypes.string,
|
|
340
347
|
disabled: PropTypes.bool,
|
|
341
348
|
/**
|
|
@@ -363,12 +370,16 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
363
370
|
* @default "––"
|
|
364
371
|
*/
|
|
365
372
|
toolbarPlaceholder: PropTypes.node,
|
|
373
|
+
/**
|
|
374
|
+
* If provided, it will be used instead of `dateTimePickerToolbarTitle` from localization.
|
|
375
|
+
*/
|
|
376
|
+
toolbarTitle: PropTypes.node,
|
|
366
377
|
toolbarVariant: PropTypes.oneOf(['desktop', 'mobile']),
|
|
367
378
|
value: PropTypes.any,
|
|
368
379
|
/**
|
|
369
380
|
* Currently visible picker view.
|
|
370
381
|
*/
|
|
371
|
-
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year'])
|
|
382
|
+
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']),
|
|
372
383
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired).isRequired
|
|
373
384
|
} : void 0;
|
|
374
385
|
export { DateTimePickerToolbar };
|
|
@@ -79,9 +79,6 @@ DesktopDatePicker.propTypes = {
|
|
|
79
79
|
* - the `input` element if there is a field rendered.
|
|
80
80
|
*/
|
|
81
81
|
autoFocus: PropTypes.bool,
|
|
82
|
-
/**
|
|
83
|
-
* Class name applied to the root element.
|
|
84
|
-
*/
|
|
85
82
|
className: PropTypes.string,
|
|
86
83
|
/**
|
|
87
84
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -126,9 +126,6 @@ DesktopDateTimePicker.propTypes = {
|
|
|
126
126
|
* - the `input` element if there is a field rendered.
|
|
127
127
|
*/
|
|
128
128
|
autoFocus: PropTypes.bool,
|
|
129
|
-
/**
|
|
130
|
-
* Class name applied to the root element.
|
|
131
|
-
*/
|
|
132
129
|
className: PropTypes.string,
|
|
133
130
|
/**
|
|
134
131
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -111,9 +111,6 @@ DesktopTimePicker.propTypes = {
|
|
|
111
111
|
* - the `input` element if there is a field rendered.
|
|
112
112
|
*/
|
|
113
113
|
autoFocus: PropTypes.bool,
|
|
114
|
-
/**
|
|
115
|
-
* Class name applied to the root element.
|
|
116
|
-
*/
|
|
117
114
|
className: PropTypes.string,
|
|
118
115
|
/**
|
|
119
116
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -76,9 +76,6 @@ MobileDatePicker.propTypes = {
|
|
|
76
76
|
* - the `input` element if there is a field rendered.
|
|
77
77
|
*/
|
|
78
78
|
autoFocus: PropTypes.bool,
|
|
79
|
-
/**
|
|
80
|
-
* Class name applied to the root element.
|
|
81
|
-
*/
|
|
82
79
|
className: PropTypes.string,
|
|
83
80
|
/**
|
|
84
81
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -96,9 +96,6 @@ MobileDateTimePicker.propTypes = {
|
|
|
96
96
|
* - the `input` element if there is a field rendered.
|
|
97
97
|
*/
|
|
98
98
|
autoFocus: PropTypes.bool,
|
|
99
|
-
/**
|
|
100
|
-
* Class name applied to the root element.
|
|
101
|
-
*/
|
|
102
99
|
className: PropTypes.string,
|
|
103
100
|
/**
|
|
104
101
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -89,9 +89,6 @@ MobileTimePicker.propTypes = {
|
|
|
89
89
|
* - the `input` element if there is a field rendered.
|
|
90
90
|
*/
|
|
91
91
|
autoFocus: PropTypes.bool,
|
|
92
|
-
/**
|
|
93
|
-
* Class name applied to the root element.
|
|
94
|
-
*/
|
|
95
92
|
className: PropTypes.string,
|
|
96
93
|
/**
|
|
97
94
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -254,9 +254,6 @@ process.env.NODE_ENV !== "production" ? MonthCalendar.propTypes = {
|
|
|
254
254
|
* Override or extend the styles applied to the component.
|
|
255
255
|
*/
|
|
256
256
|
classes: PropTypes.object,
|
|
257
|
-
/**
|
|
258
|
-
* className applied to the root element.
|
|
259
|
-
*/
|
|
260
257
|
className: PropTypes.string,
|
|
261
258
|
/**
|
|
262
259
|
* The default selected value.
|
|
@@ -247,9 +247,6 @@ process.env.NODE_ENV !== "production" ? PickersCalendarHeader.propTypes = {
|
|
|
247
247
|
* Override or extend the styles applied to the component.
|
|
248
248
|
*/
|
|
249
249
|
classes: PropTypes.object,
|
|
250
|
-
/**
|
|
251
|
-
* className applied to the root element.
|
|
252
|
-
*/
|
|
253
250
|
className: PropTypes.string,
|
|
254
251
|
currentMonth: PropTypes.any.isRequired,
|
|
255
252
|
disabled: PropTypes.bool,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
3
|
export function getPickersLayoutUtilityClass(slot) {
|
|
3
4
|
return generateUtilityClass('MuiPickersLayout', slot);
|
|
4
5
|
}
|
|
5
|
-
export var pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'shortcuts']);
|
|
6
|
+
export var pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'tabs', 'shortcuts']);
|
|
@@ -98,7 +98,8 @@ var usePickerLayout = function usePickerLayout(props) {
|
|
|
98
98
|
var Tabs = slots == null ? void 0 : slots.tabs;
|
|
99
99
|
var tabs = view && Tabs ? /*#__PURE__*/_jsx(Tabs, _extends({
|
|
100
100
|
view: view,
|
|
101
|
-
onViewChange: onViewChange
|
|
101
|
+
onViewChange: onViewChange,
|
|
102
|
+
className: classes.tabs
|
|
102
103
|
}, slotProps == null ? void 0 : slotProps.tabs)) : null;
|
|
103
104
|
|
|
104
105
|
// Shortcuts
|
|
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { useSlotProps } from '@mui/base/utils';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import useForkRef from '@mui/utils/useForkRef';
|
|
10
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
10
11
|
import { getPickersSectionListUtilityClass, pickersSectionListClasses } from './pickersSectionListClasses';
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -109,8 +110,12 @@ function PickersSection(props) {
|
|
|
109
110
|
children: [/*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorBeforeProps)), /*#__PURE__*/_jsx(SectionContent, _extends({}, sectionContentProps)), /*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorAfterProps))]
|
|
110
111
|
}));
|
|
111
112
|
}
|
|
112
|
-
var PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(
|
|
113
|
+
var PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(inProps, ref) {
|
|
113
114
|
var _slots$root;
|
|
115
|
+
var props = useThemeProps({
|
|
116
|
+
props: inProps,
|
|
117
|
+
name: 'MuiPickersSectionList'
|
|
118
|
+
});
|
|
114
119
|
var slots = props.slots,
|
|
115
120
|
slotProps = props.slotProps,
|
|
116
121
|
elements = props.elements,
|