@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,196 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["label", "autoFocus", "ownerState"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { useFormControl } from '@mui/material/FormControl';
|
|
7
|
+
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
+
import { pickersInputClasses, getPickersInputUtilityClass } from './pickersInputClasses';
|
|
10
|
+
import { PickersInputBase } from '../PickersInputBase';
|
|
11
|
+
import { PickersInputBaseRoot } from '../PickersInputBase/PickersInputBase';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
const PickersInputRoot = styled(PickersInputBaseRoot, {
|
|
14
|
+
name: 'MuiPickersInput',
|
|
15
|
+
slot: 'Root',
|
|
16
|
+
overridesResolver: (props, styles) => styles.root
|
|
17
|
+
})(({
|
|
18
|
+
theme,
|
|
19
|
+
ownerState
|
|
20
|
+
}) => {
|
|
21
|
+
const light = theme.palette.mode === 'light';
|
|
22
|
+
let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
23
|
+
if (theme.vars) {
|
|
24
|
+
bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})`;
|
|
25
|
+
}
|
|
26
|
+
return _extends({
|
|
27
|
+
'label + &': {
|
|
28
|
+
marginTop: 16
|
|
29
|
+
}
|
|
30
|
+
}, !ownerState.disableUnderline && {
|
|
31
|
+
'&::after': {
|
|
32
|
+
background: 'red',
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
borderBottom: `2px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
|
|
35
|
+
left: 0,
|
|
36
|
+
bottom: 0,
|
|
37
|
+
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
38
|
+
content: '""',
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
right: 0,
|
|
41
|
+
transform: 'scaleX(0)',
|
|
42
|
+
transition: theme.transitions.create('transform', {
|
|
43
|
+
duration: theme.transitions.duration.shorter,
|
|
44
|
+
easing: theme.transitions.easing.easeOut
|
|
45
|
+
}),
|
|
46
|
+
pointerEvents: 'none' // Transparent to the hover style.
|
|
47
|
+
},
|
|
48
|
+
[`&.${pickersInputClasses.focused}:after`]: {
|
|
49
|
+
// translateX(0) is a workaround for Safari transform scale bug
|
|
50
|
+
// See https://github.com/mui/material-ui/issues/31766
|
|
51
|
+
transform: 'scaleX(1) translateX(0)'
|
|
52
|
+
},
|
|
53
|
+
[`&.${pickersInputClasses.error}`]: {
|
|
54
|
+
'&:before, &:after': {
|
|
55
|
+
borderBottomColor: (theme.vars || theme).palette.error.main
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
'&::before': {
|
|
59
|
+
borderBottom: `1px solid ${bottomLineColor}`,
|
|
60
|
+
left: 0,
|
|
61
|
+
bottom: 0,
|
|
62
|
+
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
63
|
+
content: '"\\00a0"',
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
right: 0,
|
|
66
|
+
transition: theme.transitions.create('border-bottom-color', {
|
|
67
|
+
duration: theme.transitions.duration.shorter
|
|
68
|
+
}),
|
|
69
|
+
pointerEvents: 'none' // Transparent to the hover style.
|
|
70
|
+
},
|
|
71
|
+
[`&:hover:not(.${pickersInputClasses.disabled}, .${pickersInputClasses.error}):before`]: {
|
|
72
|
+
borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,
|
|
73
|
+
// Reset on touch devices, it doesn't add specificity
|
|
74
|
+
'@media (hover: none)': {
|
|
75
|
+
borderBottom: `1px solid ${bottomLineColor}`
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
[`&.${pickersInputClasses.disabled}:before`]: {
|
|
79
|
+
borderBottomStyle: 'dotted'
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
const useUtilityClasses = ownerState => {
|
|
84
|
+
const {
|
|
85
|
+
classes,
|
|
86
|
+
disableUnderline
|
|
87
|
+
} = ownerState;
|
|
88
|
+
const slots = {
|
|
89
|
+
root: ['root', !disableUnderline && 'underline'],
|
|
90
|
+
input: ['input']
|
|
91
|
+
};
|
|
92
|
+
const composedClasses = composeClasses(slots, getPickersInputUtilityClass, classes);
|
|
93
|
+
return _extends({}, classes, composedClasses);
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* @ignore - internal component.
|
|
97
|
+
*/
|
|
98
|
+
const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(inProps, ref) {
|
|
99
|
+
const props = useThemeProps({
|
|
100
|
+
props: inProps,
|
|
101
|
+
name: 'MuiPickersInput'
|
|
102
|
+
});
|
|
103
|
+
const {
|
|
104
|
+
label,
|
|
105
|
+
ownerState: ownerStateProp
|
|
106
|
+
} = props,
|
|
107
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
108
|
+
const muiFormControl = useFormControl();
|
|
109
|
+
const ownerState = _extends({}, props, ownerStateProp, muiFormControl, {
|
|
110
|
+
color: (muiFormControl == null ? void 0 : muiFormControl.color) || 'primary'
|
|
111
|
+
});
|
|
112
|
+
const classes = useUtilityClasses(ownerState);
|
|
113
|
+
return /*#__PURE__*/_jsx(PickersInputBase, _extends({
|
|
114
|
+
slots: {
|
|
115
|
+
root: PickersInputRoot
|
|
116
|
+
}
|
|
117
|
+
}, other, {
|
|
118
|
+
label: label,
|
|
119
|
+
classes: classes,
|
|
120
|
+
ref: ref
|
|
121
|
+
}));
|
|
122
|
+
});
|
|
123
|
+
process.env.NODE_ENV !== "production" ? PickersInput.propTypes = {
|
|
124
|
+
// ----------------------------- Warning --------------------------------
|
|
125
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
126
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
127
|
+
// ----------------------------------------------------------------------
|
|
128
|
+
/**
|
|
129
|
+
* Is `true` if the current values equals the empty value.
|
|
130
|
+
* For a single item value, it means that `value === null`
|
|
131
|
+
* For a range value, it means that `value === [null, null]`
|
|
132
|
+
*/
|
|
133
|
+
areAllSectionsEmpty: PropTypes.bool.isRequired,
|
|
134
|
+
className: PropTypes.string,
|
|
135
|
+
/**
|
|
136
|
+
* The component used for the root node.
|
|
137
|
+
* Either a string to use a HTML element or a component.
|
|
138
|
+
*/
|
|
139
|
+
component: PropTypes.elementType,
|
|
140
|
+
/**
|
|
141
|
+
* If true, the whole element is editable.
|
|
142
|
+
* Useful when all the sections are selected.
|
|
143
|
+
*/
|
|
144
|
+
contentEditable: PropTypes.bool.isRequired,
|
|
145
|
+
disableUnderline: PropTypes.bool,
|
|
146
|
+
/**
|
|
147
|
+
* The elements to render.
|
|
148
|
+
* Each element contains the prop to edit a section of the value.
|
|
149
|
+
*/
|
|
150
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
151
|
+
after: PropTypes.object.isRequired,
|
|
152
|
+
before: PropTypes.object.isRequired,
|
|
153
|
+
container: PropTypes.object.isRequired,
|
|
154
|
+
content: PropTypes.object.isRequired
|
|
155
|
+
})).isRequired,
|
|
156
|
+
endAdornment: PropTypes.node,
|
|
157
|
+
fullWidth: PropTypes.bool,
|
|
158
|
+
id: PropTypes.string,
|
|
159
|
+
inputProps: PropTypes.object,
|
|
160
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
161
|
+
current: PropTypes.object
|
|
162
|
+
})]),
|
|
163
|
+
label: PropTypes.node,
|
|
164
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
165
|
+
onChange: PropTypes.func.isRequired,
|
|
166
|
+
onClick: PropTypes.func.isRequired,
|
|
167
|
+
onInput: PropTypes.func.isRequired,
|
|
168
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
169
|
+
onPaste: PropTypes.func.isRequired,
|
|
170
|
+
ownerState: PropTypes.any,
|
|
171
|
+
readOnly: PropTypes.bool,
|
|
172
|
+
renderSuffix: PropTypes.func,
|
|
173
|
+
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
174
|
+
current: PropTypes.shape({
|
|
175
|
+
getRoot: PropTypes.func.isRequired,
|
|
176
|
+
getSectionContainer: PropTypes.func.isRequired,
|
|
177
|
+
getSectionContent: PropTypes.func.isRequired,
|
|
178
|
+
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
|
179
|
+
})
|
|
180
|
+
})]),
|
|
181
|
+
/**
|
|
182
|
+
* The components used for each slot inside.
|
|
183
|
+
*
|
|
184
|
+
* @default {}
|
|
185
|
+
*/
|
|
186
|
+
slots: PropTypes.object,
|
|
187
|
+
startAdornment: PropTypes.node,
|
|
188
|
+
style: PropTypes.object,
|
|
189
|
+
/**
|
|
190
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
191
|
+
*/
|
|
192
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
193
|
+
value: PropTypes.string.isRequired
|
|
194
|
+
} : void 0;
|
|
195
|
+
export { PickersInput };
|
|
196
|
+
PickersInput.muiName = 'Input';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { PickersInput } from './PickersInput';
|
|
2
|
-
export { PickersInputProps } from './PickersInput
|
|
3
|
-
export { pickersInputClasses, getPickersInputUtilityClass } from './pickersInputClasses';
|
|
2
|
+
export type { PickersInputProps } from './PickersInput';
|
|
4
3
|
export type { PickersInputClasses, PickersInputClassKey } from './pickersInputClasses';
|
|
4
|
+
export { getPickersInputUtilityClass, pickersInputClasses } from './pickersInputClasses';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PickersInputBaseClasses } from '../PickersInputBase';
|
|
2
|
+
export interface PickersInputClasses extends PickersInputBaseClasses {
|
|
3
|
+
/** Styles applied to the root element unless `disableUnderline={true}`. */
|
|
4
|
+
underline: string;
|
|
5
|
+
}
|
|
6
|
+
export type PickersInputClassKey = keyof PickersInputClasses;
|
|
7
|
+
export declare function getPickersInputUtilityClass(slot: string): string;
|
|
8
|
+
export declare const pickersInputClasses: {
|
|
9
|
+
disabled: string;
|
|
10
|
+
input: string;
|
|
11
|
+
readOnly: string;
|
|
12
|
+
error: string;
|
|
13
|
+
focused: string;
|
|
14
|
+
root: string;
|
|
15
|
+
adornedStart: string;
|
|
16
|
+
adornedEnd: string;
|
|
17
|
+
notchedOutline: string;
|
|
18
|
+
sectionsContainer: string;
|
|
19
|
+
sectionContent: string;
|
|
20
|
+
sectionBefore: string;
|
|
21
|
+
sectionAfter: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
4
|
+
import { pickersInputBaseClasses } from '../PickersInputBase';
|
|
5
|
+
export function getPickersInputUtilityClass(slot) {
|
|
6
|
+
return generateUtilityClass('MuiPickersFilledInput', slot);
|
|
7
|
+
}
|
|
8
|
+
export const pickersInputClasses = _extends({}, pickersInputBaseClasses, generateUtilityClasses('MuiPickersInput', ['root', 'input']));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FormControlState } from '@mui/material/FormControl';
|
|
3
|
+
import { PickersInputBaseProps } from './PickersInputBase.types';
|
|
4
|
+
export declare const PickersInputBaseRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
5
|
+
ownerState: OwnerStateType;
|
|
6
|
+
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
+
export declare const PickersInputBaseSectionsContainer: import("@emotion/styled").StyledComponent<Pick<import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement> | keyof import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
8
|
+
ownerState: OwnerStateType;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
interface OwnerStateType extends FormControlState, Omit<PickersInputBaseProps, keyof FormControlState> {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @ignore - internal component.
|
|
14
|
+
*/
|
|
15
|
+
declare const PickersInputBase: React.ForwardRefExoticComponent<Omit<PickersInputBaseProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export { PickersInputBase };
|
|
@@ -2,20 +2,20 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["elements", "areAllSectionsEmpty", "defaultValue", "label", "value", "onChange", "id", "autoFocus", "endAdornment", "startAdornment", "renderSuffix", "slots", "contentEditable", "tabIndex", "onInput", "onPaste", "onKeyDown", "fullWidth", "inputProps", "inputRef", "sectionListRef"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
6
|
import { useFormControl } from '@mui/material/FormControl';
|
|
7
|
-
import { styled } from '@mui/material/styles';
|
|
7
|
+
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import useForkRef from '@mui/utils/useForkRef';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import capitalize from '@mui/utils/capitalize';
|
|
11
11
|
import visuallyHidden from '@mui/utils/visuallyHidden';
|
|
12
|
-
import {
|
|
13
|
-
import { Unstable_PickersSectionList as PickersSectionList, Unstable_PickersSectionListRoot as PickersSectionListRoot, Unstable_PickersSectionListSection as PickersSectionListSection, Unstable_PickersSectionListSectionSeparator as PickersSectionListSectionSeparator, Unstable_PickersSectionListSectionContent as PickersSectionListSectionContent } from '
|
|
12
|
+
import { pickersInputBaseClasses, getPickersInputBaseUtilityClass } from './pickersInputBaseClasses';
|
|
13
|
+
import { Unstable_PickersSectionList as PickersSectionList, Unstable_PickersSectionListRoot as PickersSectionListRoot, Unstable_PickersSectionListSection as PickersSectionListSection, Unstable_PickersSectionListSectionSeparator as PickersSectionListSectionSeparator, Unstable_PickersSectionListSectionContent as PickersSectionListSectionContent } from '../../PickersSectionList';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
const round = value => Math.round(value * 1e5) / 1e5;
|
|
17
|
-
export const
|
|
18
|
-
name: '
|
|
17
|
+
export const PickersInputBaseRoot = styled('div', {
|
|
18
|
+
name: 'MuiPickersInputBase',
|
|
19
19
|
slot: 'Root',
|
|
20
20
|
overridesResolver: (props, styles) => styles.root
|
|
21
21
|
})(({
|
|
@@ -35,8 +35,8 @@ export const PickersInputRoot = styled(Box, {
|
|
|
35
35
|
}, ownerState.fullWidth && {
|
|
36
36
|
width: '100%'
|
|
37
37
|
}));
|
|
38
|
-
export const
|
|
39
|
-
name: '
|
|
38
|
+
export const PickersInputBaseSectionsContainer = styled(PickersSectionListRoot, {
|
|
39
|
+
name: 'MuiPickersInputBase',
|
|
40
40
|
slot: 'SectionsContainer',
|
|
41
41
|
overridesResolver: (props, styles) => styles.sectionsContainer
|
|
42
42
|
})(({
|
|
@@ -69,8 +69,8 @@ export const PickersInputSectionsContainer = styled(PickersSectionListRoot, {
|
|
|
69
69
|
}), ownerState.label != null && {
|
|
70
70
|
opacity: 0
|
|
71
71
|
})));
|
|
72
|
-
const
|
|
73
|
-
name: '
|
|
72
|
+
const PickersInputBaseSection = styled(PickersSectionListSection, {
|
|
73
|
+
name: 'MuiPickersInputBase',
|
|
74
74
|
slot: 'Section',
|
|
75
75
|
overridesResolver: (props, styles) => styles.section
|
|
76
76
|
})(({
|
|
@@ -83,8 +83,8 @@ const PickersInputSection = styled(PickersSectionListSection, {
|
|
|
83
83
|
// 23px
|
|
84
84
|
display: 'flex'
|
|
85
85
|
}));
|
|
86
|
-
const
|
|
87
|
-
name: '
|
|
86
|
+
const PickersInputBaseSectionContent = styled(PickersSectionListSectionContent, {
|
|
87
|
+
name: 'MuiPickersInputBase',
|
|
88
88
|
slot: 'SectionContent',
|
|
89
89
|
overridesResolver: (props, styles) => styles.content
|
|
90
90
|
})(({
|
|
@@ -97,16 +97,16 @@ const PickersInputSectionContent = styled(PickersSectionListSectionContent, {
|
|
|
97
97
|
width: 'fit-content',
|
|
98
98
|
outline: 'none'
|
|
99
99
|
}));
|
|
100
|
-
const
|
|
101
|
-
name: '
|
|
100
|
+
const PickersInputBaseSectionSeparator = styled(PickersSectionListSectionSeparator, {
|
|
101
|
+
name: 'MuiPickersInputBase',
|
|
102
102
|
slot: 'Separator',
|
|
103
103
|
overridesResolver: (props, styles) => styles.separator
|
|
104
104
|
})(() => ({
|
|
105
105
|
whiteSpace: 'pre',
|
|
106
106
|
letterSpacing: 'inherit'
|
|
107
107
|
}));
|
|
108
|
-
const
|
|
109
|
-
name: '
|
|
108
|
+
const PickersInputBaseInput = styled('input', {
|
|
109
|
+
name: 'MuiPickersInputBase',
|
|
110
110
|
slot: 'Input',
|
|
111
111
|
overridesResolver: (props, styles) => styles.hiddenInput
|
|
112
112
|
})(_extends({}, visuallyHidden));
|
|
@@ -132,9 +132,16 @@ const useUtilityClasses = ownerState => {
|
|
|
132
132
|
sectionBefore: ['sectionBefore'],
|
|
133
133
|
sectionAfter: ['sectionAfter']
|
|
134
134
|
};
|
|
135
|
-
return composeClasses(slots,
|
|
135
|
+
return composeClasses(slots, getPickersInputBaseUtilityClass, classes);
|
|
136
136
|
};
|
|
137
|
-
|
|
137
|
+
/**
|
|
138
|
+
* @ignore - internal component.
|
|
139
|
+
*/
|
|
140
|
+
const PickersInputBase = /*#__PURE__*/React.forwardRef(function PickersInputBase(inProps, ref) {
|
|
141
|
+
const props = useThemeProps({
|
|
142
|
+
props: inProps,
|
|
143
|
+
name: 'MuiPickersInputBase'
|
|
144
|
+
});
|
|
138
145
|
const {
|
|
139
146
|
elements,
|
|
140
147
|
areAllSectionsEmpty,
|
|
@@ -160,7 +167,7 @@ export const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(
|
|
|
160
167
|
const handleInputRef = useForkRef(inputProps == null ? void 0 : inputProps.ref, inputRef);
|
|
161
168
|
const muiFormControl = useFormControl();
|
|
162
169
|
if (!muiFormControl) {
|
|
163
|
-
throw new Error('MUI:
|
|
170
|
+
throw new Error('MUI X: PickersInputBase should always be used inside a PickersTextField component');
|
|
164
171
|
}
|
|
165
172
|
const handleInputFocus = event => {
|
|
166
173
|
var _muiFormControl$onFoc;
|
|
@@ -189,8 +196,8 @@ export const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(
|
|
|
189
196
|
}, [muiFormControl, areAllSectionsEmpty]);
|
|
190
197
|
const ownerState = _extends({}, props, muiFormControl);
|
|
191
198
|
const classes = useUtilityClasses(ownerState);
|
|
192
|
-
const InputRoot = (slots == null ? void 0 : slots.root) ||
|
|
193
|
-
const InputSectionsContainer = (slots == null ? void 0 : slots.input) ||
|
|
199
|
+
const InputRoot = (slots == null ? void 0 : slots.root) || PickersInputBaseRoot;
|
|
200
|
+
const InputSectionsContainer = (slots == null ? void 0 : slots.input) || PickersInputBaseSectionsContainer;
|
|
194
201
|
return /*#__PURE__*/_jsxs(InputRoot, _extends({}, other, {
|
|
195
202
|
className: classes.root,
|
|
196
203
|
ownerState: ownerState,
|
|
@@ -209,24 +216,24 @@ export const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(
|
|
|
209
216
|
onKeyDown: onKeyDown,
|
|
210
217
|
slots: {
|
|
211
218
|
root: InputSectionsContainer,
|
|
212
|
-
section:
|
|
213
|
-
sectionContent:
|
|
214
|
-
sectionSeparator:
|
|
219
|
+
section: PickersInputBaseSection,
|
|
220
|
+
sectionContent: PickersInputBaseSectionContent,
|
|
221
|
+
sectionSeparator: PickersInputBaseSectionSeparator
|
|
215
222
|
},
|
|
216
223
|
slotProps: {
|
|
217
224
|
root: {
|
|
218
225
|
ownerState
|
|
219
226
|
},
|
|
220
227
|
sectionContent: {
|
|
221
|
-
className:
|
|
228
|
+
className: pickersInputBaseClasses.sectionContent
|
|
222
229
|
},
|
|
223
230
|
sectionSeparator: ({
|
|
224
231
|
position
|
|
225
232
|
}) => ({
|
|
226
|
-
className: position === 'before' ?
|
|
233
|
+
className: position === 'before' ? pickersInputBaseClasses.sectionBefore : pickersInputBaseClasses.sectionAfter
|
|
227
234
|
})
|
|
228
235
|
}
|
|
229
|
-
}), endAdornment, renderSuffix ? renderSuffix(_extends({}, muiFormControl)) : null, /*#__PURE__*/_jsx(
|
|
236
|
+
}), endAdornment, renderSuffix ? renderSuffix(_extends({}, muiFormControl)) : null, /*#__PURE__*/_jsx(PickersInputBaseInput, _extends({
|
|
230
237
|
className: classes.input,
|
|
231
238
|
value: value,
|
|
232
239
|
onChange: onChange,
|
|
@@ -238,4 +245,75 @@ export const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(
|
|
|
238
245
|
}))]
|
|
239
246
|
}));
|
|
240
247
|
});
|
|
241
|
-
|
|
248
|
+
process.env.NODE_ENV !== "production" ? PickersInputBase.propTypes = {
|
|
249
|
+
// ----------------------------- Warning --------------------------------
|
|
250
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
251
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
252
|
+
// ----------------------------------------------------------------------
|
|
253
|
+
/**
|
|
254
|
+
* Is `true` if the current values equals the empty value.
|
|
255
|
+
* For a single item value, it means that `value === null`
|
|
256
|
+
* For a range value, it means that `value === [null, null]`
|
|
257
|
+
*/
|
|
258
|
+
areAllSectionsEmpty: PropTypes.bool.isRequired,
|
|
259
|
+
className: PropTypes.string,
|
|
260
|
+
/**
|
|
261
|
+
* The component used for the root node.
|
|
262
|
+
* Either a string to use a HTML element or a component.
|
|
263
|
+
*/
|
|
264
|
+
component: PropTypes.elementType,
|
|
265
|
+
/**
|
|
266
|
+
* If true, the whole element is editable.
|
|
267
|
+
* Useful when all the sections are selected.
|
|
268
|
+
*/
|
|
269
|
+
contentEditable: PropTypes.bool.isRequired,
|
|
270
|
+
/**
|
|
271
|
+
* The elements to render.
|
|
272
|
+
* Each element contains the prop to edit a section of the value.
|
|
273
|
+
*/
|
|
274
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
275
|
+
after: PropTypes.object.isRequired,
|
|
276
|
+
before: PropTypes.object.isRequired,
|
|
277
|
+
container: PropTypes.object.isRequired,
|
|
278
|
+
content: PropTypes.object.isRequired
|
|
279
|
+
})).isRequired,
|
|
280
|
+
endAdornment: PropTypes.node,
|
|
281
|
+
fullWidth: PropTypes.bool,
|
|
282
|
+
id: PropTypes.string,
|
|
283
|
+
inputProps: PropTypes.object,
|
|
284
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
285
|
+
current: PropTypes.object
|
|
286
|
+
})]),
|
|
287
|
+
label: PropTypes.node,
|
|
288
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
289
|
+
onChange: PropTypes.func.isRequired,
|
|
290
|
+
onClick: PropTypes.func.isRequired,
|
|
291
|
+
onInput: PropTypes.func.isRequired,
|
|
292
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
293
|
+
onPaste: PropTypes.func.isRequired,
|
|
294
|
+
ownerState: PropTypes.any,
|
|
295
|
+
readOnly: PropTypes.bool,
|
|
296
|
+
renderSuffix: PropTypes.func,
|
|
297
|
+
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
298
|
+
current: PropTypes.shape({
|
|
299
|
+
getRoot: PropTypes.func.isRequired,
|
|
300
|
+
getSectionContainer: PropTypes.func.isRequired,
|
|
301
|
+
getSectionContent: PropTypes.func.isRequired,
|
|
302
|
+
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
|
303
|
+
})
|
|
304
|
+
})]),
|
|
305
|
+
/**
|
|
306
|
+
* The components used for each slot inside.
|
|
307
|
+
*
|
|
308
|
+
* @default {}
|
|
309
|
+
*/
|
|
310
|
+
slots: PropTypes.object,
|
|
311
|
+
startAdornment: PropTypes.node,
|
|
312
|
+
style: PropTypes.object,
|
|
313
|
+
/**
|
|
314
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
315
|
+
*/
|
|
316
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
317
|
+
value: PropTypes.string.isRequired
|
|
318
|
+
} : void 0;
|
|
319
|
+
export { PickersInputBase };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { BoxProps } from '@mui/material/Box';
|
|
3
|
-
import { PickersSectionListProps } from '
|
|
3
|
+
import { PickersSectionListProps } from '../../PickersSectionList';
|
|
4
4
|
export interface PickersInputPropsUsedByField extends Pick<PickersSectionListProps, 'elements' | 'sectionListRef' | 'contentEditable' | 'tabIndex'> {
|
|
5
5
|
/**
|
|
6
6
|
* Is `true` if the current values equals the empty value.
|
|
@@ -25,7 +25,7 @@ export interface PickersInputPropsUsedByField extends Pick<PickersSectionListPro
|
|
|
25
25
|
};
|
|
26
26
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface PickersInputBaseProps extends Omit<BoxProps, keyof PickersInputPropsUsedByField>, PickersInputPropsUsedByField {
|
|
29
29
|
ownerState?: any;
|
|
30
30
|
margin?: 'dense' | 'none' | 'normal';
|
|
31
31
|
renderSuffix?: (state: {
|
|
@@ -48,13 +48,3 @@ export interface PickersInputProps extends Omit<BoxProps, keyof PickersInputProp
|
|
|
48
48
|
input?: React.ElementType;
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
export interface PickersOutlinedInputProps extends PickersInputProps {
|
|
52
|
-
notched?: boolean;
|
|
53
|
-
}
|
|
54
|
-
export interface PickersStandardInputProps extends PickersInputProps {
|
|
55
|
-
disableUnderline?: boolean;
|
|
56
|
-
}
|
|
57
|
-
export interface PickersFilledInputProps extends PickersInputProps {
|
|
58
|
-
disableUnderline?: boolean;
|
|
59
|
-
hiddenLabel?: boolean;
|
|
60
|
-
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { PickersInputBase } from './PickersInputBase';
|
|
2
|
+
export type { PickersInputBaseProps } from './PickersInputBase.types';
|
|
3
|
+
export { pickersInputBaseClasses, getPickersInputBaseUtilityClass, } from './pickersInputBaseClasses';
|
|
4
|
+
export type { PickersInputBaseClasses, PickersInputBaseClassKey } from './pickersInputBaseClasses';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface PickersInputBaseClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the root element if focused. */
|
|
5
|
+
focused: string;
|
|
6
|
+
/** State class applied to the root element if `disabled=true`. */
|
|
7
|
+
disabled: string;
|
|
8
|
+
/** State class applied to the root element if `readOnly=true`. */
|
|
9
|
+
readOnly: string;
|
|
10
|
+
/** State class applied to the root element if `error=true`. */
|
|
11
|
+
error: string;
|
|
12
|
+
/** Styles applied to the NotchedOutline element. */
|
|
13
|
+
notchedOutline: string;
|
|
14
|
+
/** Styles applied to the real hidden input element. */
|
|
15
|
+
input: string;
|
|
16
|
+
/** Styles applied to the container of the sections. */
|
|
17
|
+
sectionsContainer: string;
|
|
18
|
+
/** Styles applied to the content of a section. */
|
|
19
|
+
sectionContent: string;
|
|
20
|
+
/** Styles applied to the separator before a section */
|
|
21
|
+
sectionBefore: string;
|
|
22
|
+
/** Styles applied to the separator after a section */
|
|
23
|
+
sectionAfter: string;
|
|
24
|
+
/** Styles applied to the root if there is a startAdornment present */
|
|
25
|
+
adornedStart: string;
|
|
26
|
+
/** Styles applied to the root if there is an endAdornment present */
|
|
27
|
+
adornedEnd: string;
|
|
28
|
+
}
|
|
29
|
+
export type PickersInputBaseClassKey = keyof PickersInputBaseClasses;
|
|
30
|
+
export declare function getPickersInputBaseUtilityClass(slot: string): string;
|
|
31
|
+
export declare const pickersInputBaseClasses: Record<keyof PickersInputBaseClasses, string>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
+
export function getPickersInputBaseUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiPickersInputBase', slot);
|
|
5
|
+
}
|
|
6
|
+
export const pickersInputBaseClasses = generateUtilityClasses('MuiPickersInputBase', ['root', 'focused', 'disabled', 'error', 'notchedOutline', 'sectionContent', 'sectionBefore', 'sectionAfter', 'adornedStart', 'adornedEnd', 'input']);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "className", "label"];
|
|
3
|
+
const _excluded = ["children", "className", "label", "notched", "shrink"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -82,6 +82,10 @@ const OutlineLegend = styled('legend')(({
|
|
|
82
82
|
delay: 50
|
|
83
83
|
})
|
|
84
84
|
})));
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @ignore - internal component.
|
|
88
|
+
*/
|
|
85
89
|
export default function Outline(props) {
|
|
86
90
|
const {
|
|
87
91
|
className,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PickersInputBaseProps } from '../PickersInputBase';
|
|
3
|
+
export interface PickersOutlinedInputProps extends PickersInputBaseProps {
|
|
4
|
+
notched?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @ignore - internal component.
|
|
8
|
+
*/
|
|
9
|
+
declare const PickersOutlinedInput: React.ForwardRefExoticComponent<Omit<PickersOutlinedInputProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export { PickersOutlinedInput };
|