@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
package/DatePicker/DatePicker.js
CHANGED
|
@@ -55,9 +55,6 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
55
55
|
* - the `input` element if there is a field rendered.
|
|
56
56
|
*/
|
|
57
57
|
autoFocus: PropTypes.bool,
|
|
58
|
-
/**
|
|
59
|
-
* Class name applied to the root element.
|
|
60
|
-
*/
|
|
61
58
|
className: PropTypes.string,
|
|
62
59
|
/**
|
|
63
60
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -93,9 +93,6 @@ process.env.NODE_ENV !== "production" ? DatePickerToolbar.propTypes = {
|
|
|
93
93
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
94
94
|
// ----------------------------------------------------------------------
|
|
95
95
|
classes: PropTypes.object,
|
|
96
|
-
/**
|
|
97
|
-
* className applied to the root component.
|
|
98
|
-
*/
|
|
99
96
|
className: PropTypes.string,
|
|
100
97
|
disabled: PropTypes.bool,
|
|
101
98
|
/**
|
|
@@ -65,9 +65,6 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
65
65
|
* - the `input` element if there is a field rendered.
|
|
66
66
|
*/
|
|
67
67
|
autoFocus: PropTypes.bool,
|
|
68
|
-
/**
|
|
69
|
-
* Class name applied to the root element.
|
|
70
|
-
*/
|
|
71
68
|
className: PropTypes.string,
|
|
72
69
|
/**
|
|
73
70
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import Tab from '@mui/material/Tab';
|
|
4
5
|
import Tabs, { tabsClasses } from '@mui/material/Tabs';
|
|
5
6
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
6
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
8
|
import { TimeIcon, DateRangeIcon } from '../icons';
|
|
8
9
|
import { useLocaleText } from '../internals/hooks/useUtils';
|
|
9
10
|
import { getDateTimePickerTabsUtilityClass } from './dateTimePickerTabsClasses';
|
|
@@ -68,7 +69,8 @@ const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
|
|
|
68
69
|
onViewChange,
|
|
69
70
|
timeIcon = /*#__PURE__*/_jsx(TimeIcon, {}),
|
|
70
71
|
view,
|
|
71
|
-
hidden = typeof window === 'undefined' || window.innerHeight < 667
|
|
72
|
+
hidden = typeof window === 'undefined' || window.innerHeight < 667,
|
|
73
|
+
className
|
|
72
74
|
} = props;
|
|
73
75
|
const localeText = useLocaleText();
|
|
74
76
|
const classes = useUtilityClasses(props);
|
|
@@ -83,7 +85,7 @@ const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
|
|
|
83
85
|
variant: "fullWidth",
|
|
84
86
|
value: viewToTab(view),
|
|
85
87
|
onChange: handleChange,
|
|
86
|
-
className: classes.root,
|
|
88
|
+
className: clsx(className, classes.root),
|
|
87
89
|
children: [/*#__PURE__*/_jsx(Tab, {
|
|
88
90
|
value: "date",
|
|
89
91
|
"aria-label": localeText.dateTableLabel,
|
|
@@ -108,6 +110,7 @@ process.env.NODE_ENV !== "production" ? DateTimePickerTabs.propTypes = {
|
|
|
108
110
|
* Override or extend the styles applied to the component.
|
|
109
111
|
*/
|
|
110
112
|
classes: PropTypes.object,
|
|
113
|
+
className: PropTypes.string,
|
|
111
114
|
/**
|
|
112
115
|
* Date tab icon.
|
|
113
116
|
* @default DateRange
|
|
@@ -119,7 +122,7 @@ process.env.NODE_ENV !== "production" ? DateTimePickerTabs.propTypes = {
|
|
|
119
122
|
*/
|
|
120
123
|
hidden: PropTypes.bool,
|
|
121
124
|
/**
|
|
122
|
-
* Callback called when a tab is clicked
|
|
125
|
+
* Callback called when a tab is clicked.
|
|
123
126
|
* @template TView
|
|
124
127
|
* @param {TView} view The view to open
|
|
125
128
|
*/
|
|
@@ -2,16 +2,21 @@ import * as React from 'react';
|
|
|
2
2
|
import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar';
|
|
3
3
|
import { DateTimePickerToolbarClasses } from './dateTimePickerToolbarClasses';
|
|
4
4
|
import { DateOrTimeViewWithMeridiem, WrapperVariant } from '../internals/models';
|
|
5
|
+
import { MakeOptional } from '../internals/models/helpers';
|
|
5
6
|
export interface ExportedDateTimePickerToolbarProps extends ExportedBaseToolbarProps {
|
|
6
7
|
ampm?: boolean;
|
|
7
8
|
ampmInClock?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export interface DateTimePickerToolbarProps<TDate> extends ExportedDateTimePickerToolbarProps, BaseToolbarProps<TDate | null, DateOrTimeViewWithMeridiem> {
|
|
10
|
+
export interface DateTimePickerToolbarProps<TDate> extends ExportedDateTimePickerToolbarProps, MakeOptional<BaseToolbarProps<TDate | null, DateOrTimeViewWithMeridiem>, 'view'> {
|
|
10
11
|
/**
|
|
11
12
|
* Override or extend the styles applied to the component.
|
|
12
13
|
*/
|
|
13
14
|
classes?: Partial<DateTimePickerToolbarClasses>;
|
|
14
15
|
toolbarVariant?: WrapperVariant;
|
|
16
|
+
/**
|
|
17
|
+
* If provided, it will be used instead of `dateTimePickerToolbarTitle` from localization.
|
|
18
|
+
*/
|
|
19
|
+
toolbarTitle?: React.ReactNode;
|
|
15
20
|
}
|
|
16
21
|
/**
|
|
17
22
|
* Demos:
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["ampm", "ampmInClock", "value", "onChange", "view", "isLandscape", "onViewChange", "toolbarFormat", "toolbarPlaceholder", "views", "disabled", "readOnly", "toolbarVariant"];
|
|
3
|
+
const _excluded = ["ampm", "ampmInClock", "value", "onChange", "view", "isLandscape", "onViewChange", "toolbarFormat", "toolbarPlaceholder", "views", "disabled", "readOnly", "toolbarVariant", "toolbarTitle", "className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { styled, useThemeProps, useTheme } from '@mui/material/styles';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import { PickersToolbarText } from '../internals/components/PickersToolbarText';
|
|
9
10
|
import { PickersToolbar } from '../internals/components/PickersToolbar';
|
|
10
11
|
import { PickersToolbarButton } from '../internals/components/PickersToolbarButton';
|
|
@@ -13,6 +14,8 @@ import { dateTimePickerToolbarClasses, getDateTimePickerToolbarUtilityClass } fr
|
|
|
13
14
|
import { useMeridiemMode } from '../internals/hooks/date-helpers-hooks';
|
|
14
15
|
import { MULTI_SECTION_CLOCK_SECTION_WIDTH } from '../internals/constants/dimensions';
|
|
15
16
|
import { formatMeridiem } from '../internals/utils/date-utils';
|
|
17
|
+
import { pickersToolbarTextClasses } from '../internals/components/pickersToolbarTextClasses';
|
|
18
|
+
import { pickersToolbarClasses } from '../internals';
|
|
16
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
21
|
const useUtilityClasses = ownerState => {
|
|
@@ -39,13 +42,18 @@ const DateTimePickerToolbarRoot = styled(PickersToolbar, {
|
|
|
39
42
|
})(({
|
|
40
43
|
theme,
|
|
41
44
|
ownerState
|
|
42
|
-
}) => ({
|
|
45
|
+
}) => _extends({
|
|
43
46
|
paddingLeft: ownerState.toolbarVariant === 'desktop' && !ownerState.isLandscape ? 24 : 16,
|
|
44
47
|
paddingRight: ownerState.toolbarVariant === 'desktop' && !ownerState.isLandscape ? 0 : 16,
|
|
45
48
|
borderBottom: ownerState.toolbarVariant === 'desktop' ? `1px solid ${(theme.vars || theme).palette.divider}` : undefined,
|
|
46
49
|
borderRight: ownerState.toolbarVariant === 'desktop' && ownerState.isLandscape ? `1px solid ${(theme.vars || theme).palette.divider}` : undefined,
|
|
47
50
|
justifyContent: 'space-around',
|
|
48
51
|
position: 'relative'
|
|
52
|
+
}, ownerState.toolbarVariant === 'desktop' && {
|
|
53
|
+
[`& .${pickersToolbarClasses.content} .${pickersToolbarTextClasses.selected}`]: {
|
|
54
|
+
color: (theme.vars || theme).palette.primary.main,
|
|
55
|
+
fontWeight: theme.typography.fontWeightBold
|
|
56
|
+
}
|
|
49
57
|
}));
|
|
50
58
|
DateTimePickerToolbarRoot.propTypes = {
|
|
51
59
|
// ----------------------------- Warning --------------------------------
|
|
@@ -182,7 +190,9 @@ function DateTimePickerToolbar(inProps) {
|
|
|
182
190
|
views,
|
|
183
191
|
disabled,
|
|
184
192
|
readOnly,
|
|
185
|
-
toolbarVariant = 'mobile'
|
|
193
|
+
toolbarVariant = 'mobile',
|
|
194
|
+
toolbarTitle: inToolbarTitle,
|
|
195
|
+
className
|
|
186
196
|
} = props,
|
|
187
197
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
188
198
|
const ownerState = props;
|
|
@@ -198,6 +208,7 @@ function DateTimePickerToolbar(inProps) {
|
|
|
198
208
|
const classes = useUtilityClasses(_extends({}, ownerState, {
|
|
199
209
|
theme
|
|
200
210
|
}));
|
|
211
|
+
const toolbarTitle = inToolbarTitle != null ? inToolbarTitle : localeText.dateTimePickerToolbarTitle;
|
|
201
212
|
const formatHours = time => ampm ? utils.format(time, 'hours12h') : utils.format(time, 'hours24h');
|
|
202
213
|
const dateText = React.useMemo(() => {
|
|
203
214
|
if (!value) {
|
|
@@ -209,9 +220,9 @@ function DateTimePickerToolbar(inProps) {
|
|
|
209
220
|
return utils.format(value, 'shortDate');
|
|
210
221
|
}, [value, toolbarFormat, toolbarPlaceholder, utils]);
|
|
211
222
|
return /*#__PURE__*/_jsxs(DateTimePickerToolbarRoot, _extends({
|
|
212
|
-
toolbarTitle: localeText.dateTimePickerToolbarTitle,
|
|
213
223
|
isLandscape: isLandscape,
|
|
214
|
-
className: classes.root
|
|
224
|
+
className: clsx(classes.root, className),
|
|
225
|
+
toolbarTitle: toolbarTitle
|
|
215
226
|
}, other, {
|
|
216
227
|
ownerState: ownerState,
|
|
217
228
|
children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarDateContainer, {
|
|
@@ -236,14 +247,14 @@ function DateTimePickerToolbar(inProps) {
|
|
|
236
247
|
children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarTimeDigitsContainer, {
|
|
237
248
|
className: classes.timeDigitsContainer,
|
|
238
249
|
ownerState: ownerState,
|
|
239
|
-
children: [views.includes('hours') && /*#__PURE__*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
250
|
+
children: [views.includes('hours') && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
251
|
+
children: [/*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
252
|
+
variant: isDesktop ? 'h5' : 'h3',
|
|
253
|
+
width: isDesktop && !isLandscape ? MULTI_SECTION_CLOCK_SECTION_WIDTH : undefined,
|
|
254
|
+
onClick: () => onViewChange('hours'),
|
|
255
|
+
selected: view === 'hours',
|
|
256
|
+
value: value ? formatHours(value) : '--'
|
|
257
|
+
}), /*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {
|
|
247
258
|
variant: isDesktop ? 'h5' : 'h3',
|
|
248
259
|
value: ":",
|
|
249
260
|
className: classes.separator,
|
|
@@ -252,8 +263,9 @@ function DateTimePickerToolbar(inProps) {
|
|
|
252
263
|
variant: isDesktop ? 'h5' : 'h3',
|
|
253
264
|
width: isDesktop && !isLandscape ? MULTI_SECTION_CLOCK_SECTION_WIDTH : undefined,
|
|
254
265
|
onClick: () => onViewChange('minutes'),
|
|
255
|
-
selected: view === 'minutes',
|
|
256
|
-
value: value ? utils.format(value, 'minutes') : '--'
|
|
266
|
+
selected: view === 'minutes' || !views.includes('minutes') && view === 'hours',
|
|
267
|
+
value: value ? utils.format(value, 'minutes') : '--',
|
|
268
|
+
disabled: !views.includes('minutes')
|
|
257
269
|
})]
|
|
258
270
|
}), views.includes('seconds') && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
259
271
|
children: [/*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {
|
|
@@ -308,9 +320,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
308
320
|
* Override or extend the styles applied to the component.
|
|
309
321
|
*/
|
|
310
322
|
classes: PropTypes.object,
|
|
311
|
-
/**
|
|
312
|
-
* className applied to the root component.
|
|
313
|
-
*/
|
|
314
323
|
className: PropTypes.string,
|
|
315
324
|
disabled: PropTypes.bool,
|
|
316
325
|
/**
|
|
@@ -338,12 +347,16 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
338
347
|
* @default "––"
|
|
339
348
|
*/
|
|
340
349
|
toolbarPlaceholder: PropTypes.node,
|
|
350
|
+
/**
|
|
351
|
+
* If provided, it will be used instead of `dateTimePickerToolbarTitle` from localization.
|
|
352
|
+
*/
|
|
353
|
+
toolbarTitle: PropTypes.node,
|
|
341
354
|
toolbarVariant: PropTypes.oneOf(['desktop', 'mobile']),
|
|
342
355
|
value: PropTypes.any,
|
|
343
356
|
/**
|
|
344
357
|
* Currently visible picker view.
|
|
345
358
|
*/
|
|
346
|
-
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year'])
|
|
359
|
+
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']),
|
|
347
360
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired).isRequired
|
|
348
361
|
} : void 0;
|
|
349
362
|
export { DateTimePickerToolbar };
|
|
@@ -80,9 +80,6 @@ DesktopDatePicker.propTypes = {
|
|
|
80
80
|
* - the `input` element if there is a field rendered.
|
|
81
81
|
*/
|
|
82
82
|
autoFocus: PropTypes.bool,
|
|
83
|
-
/**
|
|
84
|
-
* Class name applied to the root element.
|
|
85
|
-
*/
|
|
86
83
|
className: PropTypes.string,
|
|
87
84
|
/**
|
|
88
85
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -128,9 +128,6 @@ DesktopDateTimePicker.propTypes = {
|
|
|
128
128
|
* - the `input` element if there is a field rendered.
|
|
129
129
|
*/
|
|
130
130
|
autoFocus: PropTypes.bool,
|
|
131
|
-
/**
|
|
132
|
-
* Class name applied to the root element.
|
|
133
|
-
*/
|
|
134
131
|
className: PropTypes.string,
|
|
135
132
|
/**
|
|
136
133
|
* 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.
|
|
@@ -77,9 +77,6 @@ MobileDatePicker.propTypes = {
|
|
|
77
77
|
* - the `input` element if there is a field rendered.
|
|
78
78
|
*/
|
|
79
79
|
autoFocus: PropTypes.bool,
|
|
80
|
-
/**
|
|
81
|
-
* Class name applied to the root element.
|
|
82
|
-
*/
|
|
83
80
|
className: PropTypes.string,
|
|
84
81
|
/**
|
|
85
82
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -97,9 +97,6 @@ MobileDateTimePicker.propTypes = {
|
|
|
97
97
|
* - the `input` element if there is a field rendered.
|
|
98
98
|
*/
|
|
99
99
|
autoFocus: PropTypes.bool,
|
|
100
|
-
/**
|
|
101
|
-
* Class name applied to the root element.
|
|
102
|
-
*/
|
|
103
100
|
className: PropTypes.string,
|
|
104
101
|
/**
|
|
105
102
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -90,9 +90,6 @@ MobileTimePicker.propTypes = {
|
|
|
90
90
|
* - the `input` element if there is a field rendered.
|
|
91
91
|
*/
|
|
92
92
|
autoFocus: PropTypes.bool,
|
|
93
|
-
/**
|
|
94
|
-
* Class name applied to the root element.
|
|
95
|
-
*/
|
|
96
93
|
className: PropTypes.string,
|
|
97
94
|
/**
|
|
98
95
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -239,9 +239,6 @@ process.env.NODE_ENV !== "production" ? MonthCalendar.propTypes = {
|
|
|
239
239
|
* Override or extend the styles applied to the component.
|
|
240
240
|
*/
|
|
241
241
|
classes: PropTypes.object,
|
|
242
|
-
/**
|
|
243
|
-
* className applied to the root element.
|
|
244
|
-
*/
|
|
245
242
|
className: PropTypes.string,
|
|
246
243
|
/**
|
|
247
244
|
* The default selected value.
|
|
@@ -12,9 +12,6 @@ export interface ExportedMonthCalendarProps {
|
|
|
12
12
|
}
|
|
13
13
|
export interface MonthCalendarProps<TDate> extends ExportedMonthCalendarProps, MonthValidationProps<TDate>, BaseDateValidationProps<TDate>, TimezoneProps {
|
|
14
14
|
autoFocus?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* className applied to the root element.
|
|
17
|
-
*/
|
|
18
15
|
className?: string;
|
|
19
16
|
/**
|
|
20
17
|
* Override or extend the styles applied to the component.
|
|
@@ -231,9 +231,6 @@ process.env.NODE_ENV !== "production" ? PickersCalendarHeader.propTypes = {
|
|
|
231
231
|
* Override or extend the styles applied to the component.
|
|
232
232
|
*/
|
|
233
233
|
classes: PropTypes.object,
|
|
234
|
-
/**
|
|
235
|
-
* className applied to the root element.
|
|
236
|
-
*/
|
|
237
234
|
className: PropTypes.string,
|
|
238
235
|
currentMonth: PropTypes.any.isRequired,
|
|
239
236
|
disabled: PropTypes.bool,
|
|
@@ -50,9 +50,6 @@ export interface PickersCalendarHeaderProps<TDate> extends ExportedPickersArrowS
|
|
|
50
50
|
* Override or extend the styles applied to the component.
|
|
51
51
|
*/
|
|
52
52
|
classes?: Partial<PickersCalendarHeaderClasses>;
|
|
53
|
-
/**
|
|
54
|
-
* className applied to the root element.
|
|
55
|
-
*/
|
|
56
53
|
className?: string;
|
|
57
54
|
/**
|
|
58
55
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
@@ -8,6 +8,7 @@ import { UsePickerLayoutPropsResponseLayoutProps } from '../internals/hooks/useP
|
|
|
8
8
|
import { PickersLayoutClasses } from './pickersLayoutClasses';
|
|
9
9
|
import { DateOrTimeViewWithMeridiem, WrapperVariant } from '../internals/models/common';
|
|
10
10
|
import { PickersShortcutsProps } from '../PickersShortcuts';
|
|
11
|
+
import { ExportedPickersShortcutProps } from '../PickersShortcuts/PickersShortcuts';
|
|
11
12
|
export interface ExportedPickersLayoutSlots<TValue, TDate, TView extends DateOrTimeViewWithMeridiem> {
|
|
12
13
|
/**
|
|
13
14
|
* Custom component for the action bar, it is placed below the picker views.
|
|
@@ -87,11 +88,11 @@ export interface PickersLayoutProps<TValue, TDate, TView extends DateOrTimeViewW
|
|
|
87
88
|
*/
|
|
88
89
|
slotProps?: PickersLayoutSlotProps<TValue, TDate, TView>;
|
|
89
90
|
}
|
|
90
|
-
export interface SubComponents {
|
|
91
|
-
toolbar: React.
|
|
91
|
+
export interface SubComponents<TValue> {
|
|
92
|
+
toolbar: React.ReactElement<ExportedBaseToolbarProps> | null;
|
|
92
93
|
content: React.ReactNode;
|
|
93
|
-
tabs: React.
|
|
94
|
-
actionBar: React.
|
|
95
|
-
shortcuts: React.
|
|
94
|
+
tabs: React.ReactElement<ExportedBaseTabsProps> | null;
|
|
95
|
+
actionBar: React.ReactElement<PickersActionBarProps>;
|
|
96
|
+
shortcuts: React.ReactElement<ExportedPickersShortcutProps<TValue>> | null;
|
|
96
97
|
}
|
|
97
98
|
export {};
|
|
@@ -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 const pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'shortcuts']);
|
|
6
|
+
export const pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'tabs', 'shortcuts']);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PickersLayoutProps, SubComponents } from './PickersLayout.types';
|
|
2
2
|
import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
3
|
-
interface UsePickerLayoutResponse extends SubComponents {
|
|
3
|
+
interface UsePickerLayoutResponse<TValue> extends SubComponents<TValue> {
|
|
4
4
|
}
|
|
5
|
-
declare const usePickerLayout: <TValue, TDate, TView extends DateOrTimeViewWithMeridiem>(props: PickersLayoutProps<TValue, TDate, TView>) => UsePickerLayoutResponse
|
|
5
|
+
declare const usePickerLayout: <TValue, TDate, TView extends DateOrTimeViewWithMeridiem>(props: PickersLayoutProps<TValue, TDate, TView>) => UsePickerLayoutResponse<TValue>;
|
|
6
6
|
export default usePickerLayout;
|
|
@@ -105,7 +105,8 @@ const usePickerLayout = props => {
|
|
|
105
105
|
const Tabs = slots == null ? void 0 : slots.tabs;
|
|
106
106
|
const tabs = view && Tabs ? /*#__PURE__*/_jsx(Tabs, _extends({
|
|
107
107
|
view: view,
|
|
108
|
-
onViewChange: onViewChange
|
|
108
|
+
onViewChange: onViewChange,
|
|
109
|
+
className: classes.tabs
|
|
109
110
|
}, slotProps == null ? void 0 : slotProps.tabs)) : null;
|
|
110
111
|
|
|
111
112
|
// 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";
|
|
@@ -105,8 +106,12 @@ function PickersSection(props) {
|
|
|
105
106
|
children: [/*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorBeforeProps)), /*#__PURE__*/_jsx(SectionContent, _extends({}, sectionContentProps)), /*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorAfterProps))]
|
|
106
107
|
}));
|
|
107
108
|
}
|
|
108
|
-
const PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(
|
|
109
|
+
const PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(inProps, ref) {
|
|
109
110
|
var _slots$root;
|
|
111
|
+
const props = useThemeProps({
|
|
112
|
+
props: inProps,
|
|
113
|
+
name: 'MuiPickersSectionList'
|
|
114
|
+
});
|
|
110
115
|
const {
|
|
111
116
|
slots,
|
|
112
117
|
slotProps,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PickersInputBaseProps } from '../PickersInputBase';
|
|
3
|
+
export interface PickersFilledInputProps extends PickersInputBaseProps {
|
|
4
|
+
disableUnderline?: boolean;
|
|
5
|
+
hiddenLabel?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @ignore - internal component.
|
|
9
|
+
*/
|
|
10
|
+
declare const PickersFilledInput: React.ForwardRefExoticComponent<Omit<PickersFilledInputProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { PickersFilledInput };
|
|
@@ -2,13 +2,15 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["label", "autoFocus", "ownerState"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
5
6
|
import { useFormControl } from '@mui/material/FormControl';
|
|
6
|
-
import { styled } from '@mui/material/styles';
|
|
7
|
-
import
|
|
8
|
-
import { pickersFilledInputClasses, getPickersFilledInputUtilityClass } from './
|
|
9
|
-
import {
|
|
7
|
+
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
+
import { pickersFilledInputClasses, getPickersFilledInputUtilityClass } from './pickersFilledInputClasses';
|
|
10
|
+
import { PickersInputBase } from '../PickersInputBase';
|
|
11
|
+
import { PickersInputBaseRoot, PickersInputBaseSectionsContainer } from '../PickersInputBase/PickersInputBase';
|
|
10
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
const
|
|
13
|
+
const PickersFilledInputRoot = styled(PickersInputBaseRoot, {
|
|
12
14
|
name: 'MuiPickersFilledInput',
|
|
13
15
|
slot: 'Root',
|
|
14
16
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -94,7 +96,7 @@ const FilledInputRoot = styled(PickersInputRoot, {
|
|
|
94
96
|
paddingRight: 12
|
|
95
97
|
});
|
|
96
98
|
});
|
|
97
|
-
const
|
|
99
|
+
const PickersFilledSectionsContainer = styled(PickersInputBaseSectionsContainer, {
|
|
98
100
|
name: 'MuiPickersFilledInput',
|
|
99
101
|
slot: 'sectionsContainer',
|
|
100
102
|
overridesResolver: (props, styles) => styles.sectionsContainer
|
|
@@ -121,27 +123,24 @@ const FilledSectionsContainer = styled(PickersInputSectionsContainer, {
|
|
|
121
123
|
}));
|
|
122
124
|
const useUtilityClasses = ownerState => {
|
|
123
125
|
const {
|
|
124
|
-
focused,
|
|
125
|
-
disabled,
|
|
126
|
-
error,
|
|
127
126
|
classes,
|
|
128
|
-
|
|
129
|
-
color,
|
|
130
|
-
size,
|
|
131
|
-
endAdornment,
|
|
132
|
-
startAdornment
|
|
127
|
+
disableUnderline
|
|
133
128
|
} = ownerState;
|
|
134
129
|
const slots = {
|
|
135
|
-
root: ['root',
|
|
136
|
-
notchedOutline: ['notchedOutline'],
|
|
137
|
-
before: ['before'],
|
|
138
|
-
after: ['after'],
|
|
139
|
-
content: ['content'],
|
|
130
|
+
root: ['root', !disableUnderline && 'underline'],
|
|
140
131
|
input: ['input']
|
|
141
132
|
};
|
|
142
|
-
|
|
133
|
+
const composedClasses = composeClasses(slots, getPickersFilledInputUtilityClass, classes);
|
|
134
|
+
return _extends({}, classes, composedClasses);
|
|
143
135
|
};
|
|
144
|
-
|
|
136
|
+
/**
|
|
137
|
+
* @ignore - internal component.
|
|
138
|
+
*/
|
|
139
|
+
const PickersFilledInput = /*#__PURE__*/React.forwardRef(function PickersFilledInput(inProps, ref) {
|
|
140
|
+
const props = useThemeProps({
|
|
141
|
+
props: inProps,
|
|
142
|
+
name: 'MuiPickersFilledInput'
|
|
143
|
+
});
|
|
145
144
|
const {
|
|
146
145
|
label,
|
|
147
146
|
ownerState: ownerStateProp
|
|
@@ -152,10 +151,10 @@ export const PickersFilledInput = /*#__PURE__*/React.forwardRef(function Pickers
|
|
|
152
151
|
color: (muiFormControl == null ? void 0 : muiFormControl.color) || 'primary'
|
|
153
152
|
});
|
|
154
153
|
const classes = useUtilityClasses(ownerState);
|
|
155
|
-
return /*#__PURE__*/_jsx(
|
|
154
|
+
return /*#__PURE__*/_jsx(PickersInputBase, _extends({
|
|
156
155
|
slots: {
|
|
157
|
-
root:
|
|
158
|
-
input:
|
|
156
|
+
root: PickersFilledInputRoot,
|
|
157
|
+
input: PickersFilledSectionsContainer
|
|
159
158
|
}
|
|
160
159
|
}, other, {
|
|
161
160
|
label: label,
|
|
@@ -163,4 +162,78 @@ export const PickersFilledInput = /*#__PURE__*/React.forwardRef(function Pickers
|
|
|
163
162
|
ref: ref
|
|
164
163
|
}));
|
|
165
164
|
});
|
|
166
|
-
|
|
165
|
+
process.env.NODE_ENV !== "production" ? PickersFilledInput.propTypes = {
|
|
166
|
+
// ----------------------------- Warning --------------------------------
|
|
167
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
168
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
169
|
+
// ----------------------------------------------------------------------
|
|
170
|
+
/**
|
|
171
|
+
* Is `true` if the current values equals the empty value.
|
|
172
|
+
* For a single item value, it means that `value === null`
|
|
173
|
+
* For a range value, it means that `value === [null, null]`
|
|
174
|
+
*/
|
|
175
|
+
areAllSectionsEmpty: PropTypes.bool.isRequired,
|
|
176
|
+
className: PropTypes.string,
|
|
177
|
+
/**
|
|
178
|
+
* The component used for the root node.
|
|
179
|
+
* Either a string to use a HTML element or a component.
|
|
180
|
+
*/
|
|
181
|
+
component: PropTypes.elementType,
|
|
182
|
+
/**
|
|
183
|
+
* If true, the whole element is editable.
|
|
184
|
+
* Useful when all the sections are selected.
|
|
185
|
+
*/
|
|
186
|
+
contentEditable: PropTypes.bool.isRequired,
|
|
187
|
+
disableUnderline: PropTypes.bool,
|
|
188
|
+
/**
|
|
189
|
+
* The elements to render.
|
|
190
|
+
* Each element contains the prop to edit a section of the value.
|
|
191
|
+
*/
|
|
192
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
193
|
+
after: PropTypes.object.isRequired,
|
|
194
|
+
before: PropTypes.object.isRequired,
|
|
195
|
+
container: PropTypes.object.isRequired,
|
|
196
|
+
content: PropTypes.object.isRequired
|
|
197
|
+
})).isRequired,
|
|
198
|
+
endAdornment: PropTypes.node,
|
|
199
|
+
fullWidth: PropTypes.bool,
|
|
200
|
+
hiddenLabel: PropTypes.bool,
|
|
201
|
+
id: PropTypes.string,
|
|
202
|
+
inputProps: PropTypes.object,
|
|
203
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
204
|
+
current: PropTypes.object
|
|
205
|
+
})]),
|
|
206
|
+
label: PropTypes.node,
|
|
207
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
208
|
+
onChange: PropTypes.func.isRequired,
|
|
209
|
+
onClick: PropTypes.func.isRequired,
|
|
210
|
+
onInput: PropTypes.func.isRequired,
|
|
211
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
212
|
+
onPaste: PropTypes.func.isRequired,
|
|
213
|
+
ownerState: PropTypes.any,
|
|
214
|
+
readOnly: PropTypes.bool,
|
|
215
|
+
renderSuffix: PropTypes.func,
|
|
216
|
+
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
217
|
+
current: PropTypes.shape({
|
|
218
|
+
getRoot: PropTypes.func.isRequired,
|
|
219
|
+
getSectionContainer: PropTypes.func.isRequired,
|
|
220
|
+
getSectionContent: PropTypes.func.isRequired,
|
|
221
|
+
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
|
222
|
+
})
|
|
223
|
+
})]),
|
|
224
|
+
/**
|
|
225
|
+
* The components used for each slot inside.
|
|
226
|
+
*
|
|
227
|
+
* @default {}
|
|
228
|
+
*/
|
|
229
|
+
slots: PropTypes.object,
|
|
230
|
+
startAdornment: PropTypes.node,
|
|
231
|
+
style: PropTypes.object,
|
|
232
|
+
/**
|
|
233
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
234
|
+
*/
|
|
235
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
236
|
+
value: PropTypes.string.isRequired
|
|
237
|
+
} : void 0;
|
|
238
|
+
export { PickersFilledInput };
|
|
239
|
+
PickersFilledInput.muiName = 'Input';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { PickersFilledInput } from './PickersFilledInput';
|
|
2
|
+
export type { PickersFilledInputProps } from './PickersFilledInput';
|
|
3
|
+
export type { PickersFilledInputClasses, PickersFilledInputClassKey, } from './pickersFilledInputClasses';
|
|
4
|
+
export { getPickersFilledInputUtilityClass, pickersFilledInputClasses, } from './pickersFilledInputClasses';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PickersInputBaseClasses } from '../PickersInputBase';
|
|
2
|
+
export interface PickersFilledInputClasses extends PickersInputBaseClasses {
|
|
3
|
+
/** Styles applied to the root element unless `disableUnderline={true}`. */
|
|
4
|
+
underline?: string;
|
|
5
|
+
}
|
|
6
|
+
export type PickersFilledInputClassKey = keyof PickersFilledInputClasses;
|
|
7
|
+
export declare function getPickersFilledInputUtilityClass(slot: string): string;
|
|
8
|
+
export declare const pickersFilledInputClasses: {
|
|
9
|
+
underline: string;
|
|
10
|
+
input: string;
|
|
11
|
+
root: string;
|
|
12
|
+
disabled: string;
|
|
13
|
+
readOnly: string;
|
|
14
|
+
error: string;
|
|
15
|
+
focused: string;
|
|
16
|
+
adornedStart: string;
|
|
17
|
+
adornedEnd: string;
|
|
18
|
+
notchedOutline: string;
|
|
19
|
+
sectionsContainer: string;
|
|
20
|
+
sectionContent: string;
|
|
21
|
+
sectionBefore: string;
|
|
22
|
+
sectionAfter: string;
|
|
23
|
+
};
|