@mui/x-date-pickers 7.0.0-alpha.7 → 7.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdapterDateFns/AdapterDateFns.d.ts +4 -21
- package/AdapterDateFns/AdapterDateFns.js +11 -255
- package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +62 -0
- package/AdapterDateFnsBase/AdapterDateFnsBase.js +291 -0
- package/AdapterDateFnsBase/index.d.ts +1 -0
- package/AdapterDateFnsBase/index.js +1 -0
- package/AdapterDateFnsBase/package.json +6 -0
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +1 -0
- package/AdapterDateFnsV3/AdapterDateFnsV3.d.ts +80 -0
- package/AdapterDateFnsV3/AdapterDateFnsV3.js +287 -0
- package/AdapterDateFnsV3/index.d.ts +1 -0
- package/AdapterDateFnsV3/index.js +1 -0
- package/AdapterDateFnsV3/package.json +6 -0
- package/AdapterLuxon/AdapterLuxon.d.ts +1 -1
- package/AdapterLuxon/AdapterLuxon.js +4 -12
- package/CHANGELOG.md +554 -51
- package/DatePicker/DatePicker.js +0 -3
- package/DatePicker/DatePickerToolbar.d.ts +2 -2
- package/DatePicker/DatePickerToolbar.js +2 -10
- package/DateTimePicker/DateTimePicker.js +0 -3
- package/DateTimePicker/DateTimePickerToolbar.js +0 -3
- package/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/DigitalClock/DigitalClock.js +1 -0
- package/DigitalClock/DigitalClock.types.d.ts +5 -0
- package/LocalizationProvider/LocalizationProvider.js +1 -1
- 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/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +5 -0
- package/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +0 -3
- package/PickersSectionList/PickersSectionList.js +7 -2
- 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 -28
- 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 +1 -1
- package/StaticDatePicker/StaticDatePicker.js +0 -3
- package/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/StaticTimePicker/StaticTimePicker.js +0 -3
- package/TimeClock/TimeClock.js +1 -0
- package/TimeClock/TimeClock.types.d.ts +5 -0
- 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/hooks/useClearableField.js +3 -3
- 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 +73 -26
- 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/index.d.ts +1 -1
- package/internals/hooks/usePicker/usePickerValue.js +2 -2
- package/internals/hooks/useUtils.js +2 -2
- package/internals/hooks/useViews.js +2 -2
- package/internals/index.d.ts +9 -3
- package/internals/index.js +6 -2
- package/internals/models/common.d.ts +1 -1
- package/internals/models/helpers.d.ts +1 -0
- package/internals/models/props/basePickerProps.d.ts +0 -3
- package/internals/models/props/toolbar.d.ts +0 -3
- package/internals/utils/valueManagers.js +2 -2
- package/internals/utils/views.js +1 -1
- package/legacy/AdapterDateFns/AdapterDateFns.js +222 -458
- package/legacy/AdapterDateFnsBase/AdapterDateFnsBase.js +293 -0
- package/legacy/AdapterDateFnsBase/index.js +1 -0
- package/legacy/AdapterDateFnsV3/AdapterDateFnsV3.js +306 -0
- package/legacy/AdapterDateFnsV3/index.js +1 -0
- package/legacy/AdapterLuxon/AdapterLuxon.js +4 -12
- package/legacy/AdapterMomentHijri/AdapterMomentHijri.js +5 -6
- package/legacy/AdapterMomentJalaali/AdapterMomentJalaali.js +5 -6
- package/legacy/DatePicker/DatePicker.js +0 -3
- package/legacy/DatePicker/DatePickerToolbar.js +2 -10
- package/legacy/DateTimePicker/DateTimePicker.js +0 -3
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +0 -3
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/legacy/DigitalClock/DigitalClock.js +1 -0
- package/legacy/LocalizationProvider/LocalizationProvider.js +1 -1
- 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/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
- package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/legacy/PickersSectionList/PickersSectionList.js +7 -2
- 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 -28
- 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 +1 -0
- package/legacy/TimePicker/TimePicker.js +0 -3
- package/legacy/TimePicker/TimePickerToolbar.js +0 -3
- package/legacy/YearCalendar/YearCalendar.js +0 -3
- package/legacy/hooks/useClearableField.js +3 -3
- package/legacy/index.js +3 -2
- package/legacy/internals/hooks/useField/useField.js +6 -4
- package/legacy/internals/hooks/useField/useField.utils.js +76 -25
- package/legacy/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
- package/legacy/internals/hooks/useField/useFieldState.js +15 -11
- package/legacy/internals/hooks/usePicker/usePickerValue.js +2 -2
- package/legacy/internals/hooks/useUtils.js +2 -2
- package/legacy/internals/hooks/useViews.js +2 -2
- package/legacy/internals/index.js +6 -2
- package/legacy/internals/utils/valueManagers.js +2 -2
- package/legacy/internals/utils/views.js +1 -1
- package/legacy/locales/index.js +1 -0
- package/locales/enUS.d.ts +1 -1
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/locales/mk.d.ts +1 -1
- package/locales/utils/getPickersLocalization.d.ts +1 -1
- package/modern/AdapterDateFns/AdapterDateFns.js +11 -254
- package/modern/AdapterDateFnsBase/AdapterDateFnsBase.js +290 -0
- package/modern/AdapterDateFnsBase/index.js +1 -0
- package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +287 -0
- package/modern/AdapterDateFnsV3/index.js +1 -0
- package/modern/AdapterLuxon/AdapterLuxon.js +3 -11
- package/modern/DatePicker/DatePicker.js +0 -3
- package/modern/DatePicker/DatePickerToolbar.js +2 -10
- package/modern/DateTimePicker/DateTimePicker.js +0 -3
- package/modern/DateTimePicker/DateTimePickerToolbar.js +0 -3
- package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/modern/DigitalClock/DigitalClock.js +1 -0
- package/modern/LocalizationProvider/LocalizationProvider.js +1 -1
- 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/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/modern/PickersSectionList/PickersSectionList.js +7 -2
- 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 -28
- 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 +1 -0
- package/modern/TimePicker/TimePicker.js +0 -3
- package/modern/TimePicker/TimePickerToolbar.js +0 -3
- package/modern/YearCalendar/YearCalendar.js +0 -3
- package/modern/hooks/useClearableField.js +3 -3
- package/modern/index.js +3 -2
- package/modern/internals/hooks/useField/useField.js +5 -3
- package/modern/internals/hooks/useField/useField.utils.js +73 -26
- package/modern/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
- package/modern/internals/hooks/useField/useFieldState.js +9 -7
- package/modern/internals/hooks/usePicker/usePickerValue.js +2 -2
- package/modern/internals/hooks/useUtils.js +2 -2
- package/modern/internals/hooks/useViews.js +2 -2
- package/modern/internals/index.js +6 -2
- package/modern/internals/utils/valueManagers.js +2 -2
- package/modern/internals/utils/views.js +1 -1
- package/modern/locales/index.js +1 -0
- package/node/AdapterDateFns/AdapterDateFns.js +11 -254
- package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +298 -0
- package/node/AdapterDateFnsBase/index.js +12 -0
- package/node/AdapterDateFnsV3/AdapterDateFnsV3.js +295 -0
- package/node/AdapterDateFnsV3/index.js +12 -0
- package/node/AdapterLuxon/AdapterLuxon.js +3 -11
- package/node/DatePicker/DatePicker.js +0 -3
- package/node/DatePicker/DatePickerToolbar.js +0 -7
- package/node/DateTimePicker/DateTimePicker.js +0 -3
- package/node/DateTimePicker/DateTimePickerToolbar.js +0 -3
- package/node/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/node/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/node/DigitalClock/DigitalClock.js +1 -0
- package/node/LocalizationProvider/LocalizationProvider.js +1 -1
- 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/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/node/PickersSectionList/PickersSectionList.js +7 -2
- 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 -28
- 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 +1 -0
- package/node/TimePicker/TimePicker.js +0 -3
- package/node/TimePicker/TimePickerToolbar.js +0 -3
- package/node/YearCalendar/YearCalendar.js +0 -3
- package/node/hooks/useClearableField.js +3 -3
- package/node/index.js +17 -5
- package/node/internals/hooks/useField/useField.js +5 -3
- package/node/internals/hooks/useField/useField.utils.js +78 -27
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +11 -7
- package/node/internals/hooks/useField/useFieldState.js +8 -6
- package/node/internals/hooks/usePicker/usePickerValue.js +2 -2
- package/node/internals/hooks/useUtils.js +2 -2
- package/node/internals/hooks/useViews.js +2 -2
- package/node/internals/index.js +47 -1
- package/node/internals/utils/valueManagers.js +2 -2
- package/node/internals/utils/views.js +1 -1
- package/node/locales/index.js +11 -0
- package/package.json +8 -8
- package/themeAugmentation/components.d.ts +26 -0
- package/themeAugmentation/overrides.d.ts +16 -0
- package/themeAugmentation/props.d.ts +16 -0
- package/internals/components/PickersInput/PickersFilledInput.d.ts +0 -3
- package/internals/components/PickersInput/PickersInput.d.ts +0 -15
- 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
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/* eslint-disable class-methods-use-this */
|
|
2
|
+
// TODO remove when date-fns-v3 is the default
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
import { addDays } from 'date-fns/addDays';
|
|
5
|
+
import { addSeconds } from 'date-fns/addSeconds';
|
|
6
|
+
import { addMinutes } from 'date-fns/addMinutes';
|
|
7
|
+
import { addHours } from 'date-fns/addHours';
|
|
8
|
+
import { addWeeks } from 'date-fns/addWeeks';
|
|
9
|
+
import { addMonths } from 'date-fns/addMonths';
|
|
10
|
+
import { addYears } from 'date-fns/addYears';
|
|
11
|
+
import { endOfDay } from 'date-fns/endOfDay';
|
|
12
|
+
import { endOfWeek } from 'date-fns/endOfWeek';
|
|
13
|
+
import { endOfYear } from 'date-fns/endOfYear';
|
|
14
|
+
// @ts-ignore TODO remove when date-fns-v3 is the default
|
|
15
|
+
import { format as dateFnsFormat, longFormatters } from 'date-fns/format';
|
|
16
|
+
import { getDate } from 'date-fns/getDate';
|
|
17
|
+
import { getDaysInMonth } from 'date-fns/getDaysInMonth';
|
|
18
|
+
import { getHours } from 'date-fns/getHours';
|
|
19
|
+
import { getMinutes } from 'date-fns/getMinutes';
|
|
20
|
+
import { getMonth } from 'date-fns/getMonth';
|
|
21
|
+
import { getSeconds } from 'date-fns/getSeconds';
|
|
22
|
+
import { getMilliseconds } from 'date-fns/getMilliseconds';
|
|
23
|
+
import { getWeek } from 'date-fns/getWeek';
|
|
24
|
+
import { getYear } from 'date-fns/getYear';
|
|
25
|
+
import { isAfter } from 'date-fns/isAfter';
|
|
26
|
+
import { isBefore } from 'date-fns/isBefore';
|
|
27
|
+
import { isEqual } from 'date-fns/isEqual';
|
|
28
|
+
import { isSameDay } from 'date-fns/isSameDay';
|
|
29
|
+
import { isSameYear } from 'date-fns/isSameYear';
|
|
30
|
+
import { isSameMonth } from 'date-fns/isSameMonth';
|
|
31
|
+
import { isSameHour } from 'date-fns/isSameHour';
|
|
32
|
+
import { isValid } from 'date-fns/isValid';
|
|
33
|
+
import { parse as dateFnsParse } from 'date-fns/parse';
|
|
34
|
+
import { setDate } from 'date-fns/setDate';
|
|
35
|
+
import { setHours } from 'date-fns/setHours';
|
|
36
|
+
import { setMinutes } from 'date-fns/setMinutes';
|
|
37
|
+
import { setMonth } from 'date-fns/setMonth';
|
|
38
|
+
import { setSeconds } from 'date-fns/setSeconds';
|
|
39
|
+
import { setMilliseconds } from 'date-fns/setMilliseconds';
|
|
40
|
+
import { setYear } from 'date-fns/setYear';
|
|
41
|
+
import { startOfDay } from 'date-fns/startOfDay';
|
|
42
|
+
import { startOfMonth } from 'date-fns/startOfMonth';
|
|
43
|
+
import { endOfMonth } from 'date-fns/endOfMonth';
|
|
44
|
+
import { startOfWeek } from 'date-fns/startOfWeek';
|
|
45
|
+
import { startOfYear } from 'date-fns/startOfYear';
|
|
46
|
+
import { isWithinInterval } from 'date-fns/isWithinInterval';
|
|
47
|
+
import { enUS } from 'date-fns/locale/en-US';
|
|
48
|
+
// date-fns v2 does not export types
|
|
49
|
+
// @ts-ignore TODO remove when date-fns-v3 is the default
|
|
50
|
+
|
|
51
|
+
import { AdapterDateFnsBase } from '../AdapterDateFnsBase';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Based on `@date-io/date-fns`
|
|
55
|
+
*
|
|
56
|
+
* MIT License
|
|
57
|
+
*
|
|
58
|
+
* Copyright (c) 2017 Dmitriy Kovalenko
|
|
59
|
+
*
|
|
60
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
61
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
62
|
+
* in the Software without restriction, including without limitation the rights
|
|
63
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
64
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
65
|
+
* furnished to do so, subject to the following conditions:
|
|
66
|
+
*
|
|
67
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
68
|
+
* copies or substantial portions of the Software.
|
|
69
|
+
*
|
|
70
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
71
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
72
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
73
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
74
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
75
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
76
|
+
* SOFTWARE.
|
|
77
|
+
*/
|
|
78
|
+
export class AdapterDateFns extends AdapterDateFnsBase {
|
|
79
|
+
constructor({
|
|
80
|
+
locale,
|
|
81
|
+
formats
|
|
82
|
+
} = {}) {
|
|
83
|
+
if (typeof addDays !== 'function') {
|
|
84
|
+
throw new Error([`MUI: The \`date-fns\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x of the package or use the `AdapterDateFns` instead.'].join('\n'));
|
|
85
|
+
}
|
|
86
|
+
if (!longFormatters) {
|
|
87
|
+
throw new Error('MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.');
|
|
88
|
+
}
|
|
89
|
+
super({
|
|
90
|
+
locale: locale ?? enUS,
|
|
91
|
+
formats,
|
|
92
|
+
longFormatters
|
|
93
|
+
});
|
|
94
|
+
this.parse = (value, format) => {
|
|
95
|
+
if (value === '') {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
return dateFnsParse(value, format, new Date(), {
|
|
99
|
+
locale: this.locale
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
this.isValid = value => {
|
|
103
|
+
if (value == null) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
return isValid(value);
|
|
107
|
+
};
|
|
108
|
+
this.format = (value, formatKey) => {
|
|
109
|
+
return this.formatByString(value, this.formats[formatKey]);
|
|
110
|
+
};
|
|
111
|
+
this.formatByString = (value, formatString) => {
|
|
112
|
+
return dateFnsFormat(value, formatString, {
|
|
113
|
+
locale: this.locale
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
this.isEqual = (value, comparing) => {
|
|
117
|
+
if (value === null && comparing === null) {
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
if (value === null || comparing === null) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return isEqual(value, comparing);
|
|
124
|
+
};
|
|
125
|
+
this.isSameYear = (value, comparing) => {
|
|
126
|
+
return isSameYear(value, comparing);
|
|
127
|
+
};
|
|
128
|
+
this.isSameMonth = (value, comparing) => {
|
|
129
|
+
return isSameMonth(value, comparing);
|
|
130
|
+
};
|
|
131
|
+
this.isSameDay = (value, comparing) => {
|
|
132
|
+
return isSameDay(value, comparing);
|
|
133
|
+
};
|
|
134
|
+
this.isSameHour = (value, comparing) => {
|
|
135
|
+
return isSameHour(value, comparing);
|
|
136
|
+
};
|
|
137
|
+
this.isAfter = (value, comparing) => {
|
|
138
|
+
return isAfter(value, comparing);
|
|
139
|
+
};
|
|
140
|
+
this.isAfterYear = (value, comparing) => {
|
|
141
|
+
return isAfter(value, endOfYear(comparing));
|
|
142
|
+
};
|
|
143
|
+
this.isAfterDay = (value, comparing) => {
|
|
144
|
+
return isAfter(value, endOfDay(comparing));
|
|
145
|
+
};
|
|
146
|
+
this.isBefore = (value, comparing) => {
|
|
147
|
+
return isBefore(value, comparing);
|
|
148
|
+
};
|
|
149
|
+
this.isBeforeYear = (value, comparing) => {
|
|
150
|
+
return isBefore(value, this.startOfYear(comparing));
|
|
151
|
+
};
|
|
152
|
+
this.isBeforeDay = (value, comparing) => {
|
|
153
|
+
return isBefore(value, this.startOfDay(comparing));
|
|
154
|
+
};
|
|
155
|
+
this.isWithinRange = (value, [start, end]) => {
|
|
156
|
+
return isWithinInterval(value, {
|
|
157
|
+
start,
|
|
158
|
+
end
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
this.startOfYear = value => {
|
|
162
|
+
return startOfYear(value);
|
|
163
|
+
};
|
|
164
|
+
this.startOfMonth = value => {
|
|
165
|
+
return startOfMonth(value);
|
|
166
|
+
};
|
|
167
|
+
this.startOfWeek = value => {
|
|
168
|
+
return startOfWeek(value, {
|
|
169
|
+
locale: this.locale
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
this.startOfDay = value => {
|
|
173
|
+
return startOfDay(value);
|
|
174
|
+
};
|
|
175
|
+
this.endOfYear = value => {
|
|
176
|
+
return endOfYear(value);
|
|
177
|
+
};
|
|
178
|
+
this.endOfMonth = value => {
|
|
179
|
+
return endOfMonth(value);
|
|
180
|
+
};
|
|
181
|
+
this.endOfWeek = value => {
|
|
182
|
+
return endOfWeek(value, {
|
|
183
|
+
locale: this.locale
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
this.endOfDay = value => {
|
|
187
|
+
return endOfDay(value);
|
|
188
|
+
};
|
|
189
|
+
this.addYears = (value, amount) => {
|
|
190
|
+
return addYears(value, amount);
|
|
191
|
+
};
|
|
192
|
+
this.addMonths = (value, amount) => {
|
|
193
|
+
return addMonths(value, amount);
|
|
194
|
+
};
|
|
195
|
+
this.addWeeks = (value, amount) => {
|
|
196
|
+
return addWeeks(value, amount);
|
|
197
|
+
};
|
|
198
|
+
this.addDays = (value, amount) => {
|
|
199
|
+
return addDays(value, amount);
|
|
200
|
+
};
|
|
201
|
+
this.addHours = (value, amount) => {
|
|
202
|
+
return addHours(value, amount);
|
|
203
|
+
};
|
|
204
|
+
this.addMinutes = (value, amount) => {
|
|
205
|
+
return addMinutes(value, amount);
|
|
206
|
+
};
|
|
207
|
+
this.addSeconds = (value, amount) => {
|
|
208
|
+
return addSeconds(value, amount);
|
|
209
|
+
};
|
|
210
|
+
this.getYear = value => {
|
|
211
|
+
return getYear(value);
|
|
212
|
+
};
|
|
213
|
+
this.getMonth = value => {
|
|
214
|
+
return getMonth(value);
|
|
215
|
+
};
|
|
216
|
+
this.getDate = value => {
|
|
217
|
+
return getDate(value);
|
|
218
|
+
};
|
|
219
|
+
this.getHours = value => {
|
|
220
|
+
return getHours(value);
|
|
221
|
+
};
|
|
222
|
+
this.getMinutes = value => {
|
|
223
|
+
return getMinutes(value);
|
|
224
|
+
};
|
|
225
|
+
this.getSeconds = value => {
|
|
226
|
+
return getSeconds(value);
|
|
227
|
+
};
|
|
228
|
+
this.getMilliseconds = value => {
|
|
229
|
+
return getMilliseconds(value);
|
|
230
|
+
};
|
|
231
|
+
this.setYear = (value, year) => {
|
|
232
|
+
return setYear(value, year);
|
|
233
|
+
};
|
|
234
|
+
this.setMonth = (value, month) => {
|
|
235
|
+
return setMonth(value, month);
|
|
236
|
+
};
|
|
237
|
+
this.setDate = (value, date) => {
|
|
238
|
+
return setDate(value, date);
|
|
239
|
+
};
|
|
240
|
+
this.setHours = (value, hours) => {
|
|
241
|
+
return setHours(value, hours);
|
|
242
|
+
};
|
|
243
|
+
this.setMinutes = (value, minutes) => {
|
|
244
|
+
return setMinutes(value, minutes);
|
|
245
|
+
};
|
|
246
|
+
this.setSeconds = (value, seconds) => {
|
|
247
|
+
return setSeconds(value, seconds);
|
|
248
|
+
};
|
|
249
|
+
this.setMilliseconds = (value, milliseconds) => {
|
|
250
|
+
return setMilliseconds(value, milliseconds);
|
|
251
|
+
};
|
|
252
|
+
this.getDaysInMonth = value => {
|
|
253
|
+
return getDaysInMonth(value);
|
|
254
|
+
};
|
|
255
|
+
this.getWeekArray = value => {
|
|
256
|
+
const start = this.startOfWeek(this.startOfMonth(value));
|
|
257
|
+
const end = this.endOfWeek(this.endOfMonth(value));
|
|
258
|
+
let count = 0;
|
|
259
|
+
let current = start;
|
|
260
|
+
const nestedWeeks = [];
|
|
261
|
+
while (this.isBefore(current, end)) {
|
|
262
|
+
const weekNumber = Math.floor(count / 7);
|
|
263
|
+
nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
|
|
264
|
+
nestedWeeks[weekNumber].push(current);
|
|
265
|
+
current = this.addDays(current, 1);
|
|
266
|
+
count += 1;
|
|
267
|
+
}
|
|
268
|
+
return nestedWeeks;
|
|
269
|
+
};
|
|
270
|
+
this.getWeekNumber = value => {
|
|
271
|
+
return getWeek(value, {
|
|
272
|
+
locale: this.locale
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
this.getYearRange = ([start, end]) => {
|
|
276
|
+
const startDate = this.startOfYear(start);
|
|
277
|
+
const endDate = this.endOfYear(end);
|
|
278
|
+
const years = [];
|
|
279
|
+
let current = startDate;
|
|
280
|
+
while (this.isBefore(current, endDate)) {
|
|
281
|
+
years.push(current);
|
|
282
|
+
current = this.addYears(current, 1);
|
|
283
|
+
}
|
|
284
|
+
return years;
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdapterDateFns } from './AdapterDateFnsV3';
|
|
@@ -337,10 +337,7 @@ export class AdapterLuxon {
|
|
|
337
337
|
return value.startOf('month');
|
|
338
338
|
};
|
|
339
339
|
this.startOfWeek = value => {
|
|
340
|
-
return value.startOf('week',
|
|
341
|
-
// TODO: remove when `@types/luxon` add support for the parameter.
|
|
342
|
-
// @ts-ignore
|
|
343
|
-
{
|
|
340
|
+
return value.startOf('week', {
|
|
344
341
|
useLocaleWeeks: true
|
|
345
342
|
});
|
|
346
343
|
};
|
|
@@ -354,10 +351,7 @@ export class AdapterLuxon {
|
|
|
354
351
|
return value.endOf('month');
|
|
355
352
|
};
|
|
356
353
|
this.endOfWeek = value => {
|
|
357
|
-
return value.endOf('week',
|
|
358
|
-
// TODO: remove when `@types/luxon` add support for the parameter.
|
|
359
|
-
// @ts-ignore
|
|
360
|
-
{
|
|
354
|
+
return value.endOf('week', {
|
|
361
355
|
useLocaleWeeks: true
|
|
362
356
|
});
|
|
363
357
|
};
|
|
@@ -479,9 +473,7 @@ export class AdapterLuxon {
|
|
|
479
473
|
return weeks;
|
|
480
474
|
};
|
|
481
475
|
this.getWeekNumber = value => {
|
|
482
|
-
|
|
483
|
-
// @ts-ignore
|
|
484
|
-
return value.localeWeekNumber ?? value.weekNumber;
|
|
476
|
+
return value.localWeekNumber ?? value.weekNumber;
|
|
485
477
|
};
|
|
486
478
|
this.getYearRange = ([start, end]) => {
|
|
487
479
|
const startDate = this.startOfYear(start);
|
|
@@ -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.
|
|
@@ -26,10 +26,6 @@ const DatePickerToolbarRoot = styled(PickersToolbar, {
|
|
|
26
26
|
slot: 'Root',
|
|
27
27
|
overridesResolver: (_, styles) => styles.root
|
|
28
28
|
})({});
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @ignore - do not document.
|
|
32
|
-
*/
|
|
33
29
|
const DatePickerToolbarTitle = styled(Typography, {
|
|
34
30
|
name: 'MuiDatePickerToolbar',
|
|
35
31
|
slot: 'Title',
|
|
@@ -49,7 +45,7 @@ const DatePickerToolbarTitle = styled(Typography, {
|
|
|
49
45
|
*
|
|
50
46
|
* - [DatePickerToolbar API](https://mui.com/x/api/date-pickers/date-picker-toolbar/)
|
|
51
47
|
*/
|
|
52
|
-
const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {
|
|
48
|
+
export const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {
|
|
53
49
|
const props = useThemeProps({
|
|
54
50
|
props: inProps,
|
|
55
51
|
name: 'MuiDatePickerToolbar'
|
|
@@ -97,9 +93,6 @@ process.env.NODE_ENV !== "production" ? DatePickerToolbar.propTypes = {
|
|
|
97
93
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
98
94
|
// ----------------------------------------------------------------------
|
|
99
95
|
classes: PropTypes.object,
|
|
100
|
-
/**
|
|
101
|
-
* className applied to the root component.
|
|
102
|
-
*/
|
|
103
96
|
className: PropTypes.string,
|
|
104
97
|
disabled: PropTypes.bool,
|
|
105
98
|
/**
|
|
@@ -133,5 +126,4 @@ process.env.NODE_ENV !== "production" ? DatePickerToolbar.propTypes = {
|
|
|
133
126
|
*/
|
|
134
127
|
view: PropTypes.oneOf(['day', 'month', 'year']).isRequired,
|
|
135
128
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired).isRequired
|
|
136
|
-
} : void 0;
|
|
137
|
-
export { DatePickerToolbar };
|
|
129
|
+
} : void 0;
|
|
@@ -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.
|
|
@@ -308,9 +308,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
308
308
|
* Override or extend the styles applied to the component.
|
|
309
309
|
*/
|
|
310
310
|
classes: PropTypes.object,
|
|
311
|
-
/**
|
|
312
|
-
* className applied to the root component.
|
|
313
|
-
*/
|
|
314
311
|
className: PropTypes.string,
|
|
315
312
|
disabled: PropTypes.bool,
|
|
316
313
|
/**
|
|
@@ -76,9 +76,6 @@ DesktopDatePicker.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.
|
|
@@ -124,9 +124,6 @@ DesktopDateTimePicker.propTypes = {
|
|
|
124
124
|
* - the `input` element if there is a field rendered.
|
|
125
125
|
*/
|
|
126
126
|
autoFocus: PropTypes.bool,
|
|
127
|
-
/**
|
|
128
|
-
* Class name applied to the root element.
|
|
129
|
-
*/
|
|
130
127
|
className: PropTypes.string,
|
|
131
128
|
/**
|
|
132
129
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -107,9 +107,6 @@ DesktopTimePicker.propTypes = {
|
|
|
107
107
|
* - the `input` element if there is a field rendered.
|
|
108
108
|
*/
|
|
109
109
|
autoFocus: PropTypes.bool,
|
|
110
|
-
/**
|
|
111
|
-
* Class name applied to the root element.
|
|
112
|
-
*/
|
|
113
110
|
className: PropTypes.string,
|
|
114
111
|
/**
|
|
115
112
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -61,7 +61,7 @@ export const LocalizationProvider = function LocalizationProvider(inProps) {
|
|
|
61
61
|
instance: dateLibInstance
|
|
62
62
|
});
|
|
63
63
|
if (!adapter.isMUIAdapter) {
|
|
64
|
-
throw new Error(['MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", 'More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation'].join(`\n`));
|
|
64
|
+
throw new Error(['MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", 'More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation'].join(`\n`));
|
|
65
65
|
}
|
|
66
66
|
return adapter;
|
|
67
67
|
}, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentUtils]);
|
|
@@ -73,9 +73,6 @@ MobileDatePicker.propTypes = {
|
|
|
73
73
|
* - the `input` element if there is a field rendered.
|
|
74
74
|
*/
|
|
75
75
|
autoFocus: PropTypes.bool,
|
|
76
|
-
/**
|
|
77
|
-
* Class name applied to the root element.
|
|
78
|
-
*/
|
|
79
76
|
className: PropTypes.string,
|
|
80
77
|
/**
|
|
81
78
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -93,9 +93,6 @@ MobileDateTimePicker.propTypes = {
|
|
|
93
93
|
* - the `input` element if there is a field rendered.
|
|
94
94
|
*/
|
|
95
95
|
autoFocus: PropTypes.bool,
|
|
96
|
-
/**
|
|
97
|
-
* Class name applied to the root element.
|
|
98
|
-
*/
|
|
99
96
|
className: PropTypes.string,
|
|
100
97
|
/**
|
|
101
98
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -86,9 +86,6 @@ MobileTimePicker.propTypes = {
|
|
|
86
86
|
* - the `input` element if there is a field rendered.
|
|
87
87
|
*/
|
|
88
88
|
autoFocus: PropTypes.bool,
|
|
89
|
-
/**
|
|
90
|
-
* Class name applied to the root element.
|
|
91
|
-
*/
|
|
92
89
|
className: PropTypes.string,
|
|
93
90
|
/**
|
|
94
91
|
* 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.
|
|
@@ -486,6 +486,7 @@ process.env.NODE_ENV !== "production" ? MultiSectionDigitalClock.propTypes = {
|
|
|
486
486
|
view: PropTypes.oneOf(['hours', 'meridiem', 'minutes', 'seconds']),
|
|
487
487
|
/**
|
|
488
488
|
* Available views.
|
|
489
|
+
* @default ['hours', 'minutes']
|
|
489
490
|
*/
|
|
490
491
|
views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'meridiem', 'minutes', 'seconds']).isRequired)
|
|
491
492
|
} : void 0;
|
|
@@ -230,9 +230,6 @@ process.env.NODE_ENV !== "production" ? PickersCalendarHeader.propTypes = {
|
|
|
230
230
|
* Override or extend the styles applied to the component.
|
|
231
231
|
*/
|
|
232
232
|
classes: PropTypes.object,
|
|
233
|
-
/**
|
|
234
|
-
* className applied to the root element.
|
|
235
|
-
*/
|
|
236
233
|
className: PropTypes.string,
|
|
237
234
|
currentMonth: PropTypes.any.isRequired,
|
|
238
235
|
disabled: PropTypes.bool,
|
|
@@ -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";
|
|
@@ -104,7 +105,11 @@ function PickersSection(props) {
|
|
|
104
105
|
children: [/*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorBeforeProps)), /*#__PURE__*/_jsx(SectionContent, _extends({}, sectionContentProps)), /*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorAfterProps))]
|
|
105
106
|
}));
|
|
106
107
|
}
|
|
107
|
-
const PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(
|
|
108
|
+
const PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(inProps, ref) {
|
|
109
|
+
const props = useThemeProps({
|
|
110
|
+
props: inProps,
|
|
111
|
+
name: 'MuiPickersSectionList'
|
|
112
|
+
});
|
|
108
113
|
const {
|
|
109
114
|
slots,
|
|
110
115
|
slotProps,
|
|
@@ -117,7 +122,7 @@ const PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSection
|
|
|
117
122
|
const handleRootRef = useForkRef(ref, rootRef);
|
|
118
123
|
const getRoot = methodName => {
|
|
119
124
|
if (!rootRef.current) {
|
|
120
|
-
throw new Error(`MUI: Cannot call sectionListRef.${methodName} before the mount of the component
|
|
125
|
+
throw new Error(`MUI X: Cannot call sectionListRef.${methodName} before the mount of the component.`);
|
|
121
126
|
}
|
|
122
127
|
return rootRef.current;
|
|
123
128
|
};
|