@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
|
@@ -2,22 +2,22 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
var _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
|
var round = function round(value) {
|
|
17
17
|
return Math.round(value * 1e5) / 1e5;
|
|
18
18
|
};
|
|
19
|
-
export var
|
|
20
|
-
name: '
|
|
19
|
+
export var PickersInputBaseRoot = styled('div', {
|
|
20
|
+
name: 'MuiPickersInputBase',
|
|
21
21
|
slot: 'Root',
|
|
22
22
|
overridesResolver: function overridesResolver(props, styles) {
|
|
23
23
|
return styles.root;
|
|
@@ -40,8 +40,8 @@ export var PickersInputRoot = styled(Box, {
|
|
|
40
40
|
width: '100%'
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
|
-
export var
|
|
44
|
-
name: '
|
|
43
|
+
export var PickersInputBaseSectionsContainer = styled(PickersSectionListRoot, {
|
|
44
|
+
name: 'MuiPickersInputBase',
|
|
45
45
|
slot: 'SectionsContainer',
|
|
46
46
|
overridesResolver: function overridesResolver(props, styles) {
|
|
47
47
|
return styles.sectionsContainer;
|
|
@@ -77,8 +77,8 @@ export var PickersInputSectionsContainer = styled(PickersSectionListRoot, {
|
|
|
77
77
|
opacity: 0
|
|
78
78
|
}));
|
|
79
79
|
});
|
|
80
|
-
var
|
|
81
|
-
name: '
|
|
80
|
+
var PickersInputBaseSection = styled(PickersSectionListSection, {
|
|
81
|
+
name: 'MuiPickersInputBase',
|
|
82
82
|
slot: 'Section',
|
|
83
83
|
overridesResolver: function overridesResolver(props, styles) {
|
|
84
84
|
return styles.section;
|
|
@@ -94,8 +94,8 @@ var PickersInputSection = styled(PickersSectionListSection, {
|
|
|
94
94
|
display: 'flex'
|
|
95
95
|
};
|
|
96
96
|
});
|
|
97
|
-
var
|
|
98
|
-
name: '
|
|
97
|
+
var PickersInputBaseSectionContent = styled(PickersSectionListSectionContent, {
|
|
98
|
+
name: 'MuiPickersInputBase',
|
|
99
99
|
slot: 'SectionContent',
|
|
100
100
|
overridesResolver: function overridesResolver(props, styles) {
|
|
101
101
|
return styles.content;
|
|
@@ -111,8 +111,8 @@ var PickersInputSectionContent = styled(PickersSectionListSectionContent, {
|
|
|
111
111
|
outline: 'none'
|
|
112
112
|
};
|
|
113
113
|
});
|
|
114
|
-
var
|
|
115
|
-
name: '
|
|
114
|
+
var PickersInputBaseSectionSeparator = styled(PickersSectionListSectionSeparator, {
|
|
115
|
+
name: 'MuiPickersInputBase',
|
|
116
116
|
slot: 'Separator',
|
|
117
117
|
overridesResolver: function overridesResolver(props, styles) {
|
|
118
118
|
return styles.separator;
|
|
@@ -123,8 +123,8 @@ var PickersInputSeparator = styled(PickersSectionListSectionSeparator, {
|
|
|
123
123
|
letterSpacing: 'inherit'
|
|
124
124
|
};
|
|
125
125
|
});
|
|
126
|
-
var
|
|
127
|
-
name: '
|
|
126
|
+
var PickersInputBaseInput = styled('input', {
|
|
127
|
+
name: 'MuiPickersInputBase',
|
|
128
128
|
slot: 'Input',
|
|
129
129
|
overridesResolver: function overridesResolver(props, styles) {
|
|
130
130
|
return styles.hiddenInput;
|
|
@@ -150,9 +150,16 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
150
150
|
sectionBefore: ['sectionBefore'],
|
|
151
151
|
sectionAfter: ['sectionAfter']
|
|
152
152
|
};
|
|
153
|
-
return composeClasses(slots,
|
|
153
|
+
return composeClasses(slots, getPickersInputBaseUtilityClass, classes);
|
|
154
154
|
};
|
|
155
|
-
|
|
155
|
+
/**
|
|
156
|
+
* @ignore - internal component.
|
|
157
|
+
*/
|
|
158
|
+
var PickersInputBase = /*#__PURE__*/React.forwardRef(function PickersInputBase(inProps, ref) {
|
|
159
|
+
var props = useThemeProps({
|
|
160
|
+
props: inProps,
|
|
161
|
+
name: 'MuiPickersInputBase'
|
|
162
|
+
});
|
|
156
163
|
var elements = props.elements,
|
|
157
164
|
areAllSectionsEmpty = props.areAllSectionsEmpty,
|
|
158
165
|
defaultValue = props.defaultValue,
|
|
@@ -180,7 +187,7 @@ export var PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(pr
|
|
|
180
187
|
var handleInputRef = useForkRef(inputProps == null ? void 0 : inputProps.ref, inputRef);
|
|
181
188
|
var muiFormControl = useFormControl();
|
|
182
189
|
if (!muiFormControl) {
|
|
183
|
-
throw new Error('MUI:
|
|
190
|
+
throw new Error('MUI X: PickersInputBase should always be used inside a PickersTextField component');
|
|
184
191
|
}
|
|
185
192
|
var handleInputFocus = function handleInputFocus(event) {
|
|
186
193
|
var _muiFormControl$onFoc;
|
|
@@ -209,8 +216,8 @@ export var PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(pr
|
|
|
209
216
|
}, [muiFormControl, areAllSectionsEmpty]);
|
|
210
217
|
var ownerState = _extends({}, props, muiFormControl);
|
|
211
218
|
var classes = useUtilityClasses(ownerState);
|
|
212
|
-
var InputRoot = (slots == null ? void 0 : slots.root) ||
|
|
213
|
-
var InputSectionsContainer = (slots == null ? void 0 : slots.input) ||
|
|
219
|
+
var InputRoot = (slots == null ? void 0 : slots.root) || PickersInputBaseRoot;
|
|
220
|
+
var InputSectionsContainer = (slots == null ? void 0 : slots.input) || PickersInputBaseSectionsContainer;
|
|
214
221
|
return /*#__PURE__*/_jsxs(InputRoot, _extends({}, other, {
|
|
215
222
|
className: classes.root,
|
|
216
223
|
ownerState: ownerState,
|
|
@@ -229,25 +236,25 @@ export var PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(pr
|
|
|
229
236
|
onKeyDown: onKeyDown,
|
|
230
237
|
slots: {
|
|
231
238
|
root: InputSectionsContainer,
|
|
232
|
-
section:
|
|
233
|
-
sectionContent:
|
|
234
|
-
sectionSeparator:
|
|
239
|
+
section: PickersInputBaseSection,
|
|
240
|
+
sectionContent: PickersInputBaseSectionContent,
|
|
241
|
+
sectionSeparator: PickersInputBaseSectionSeparator
|
|
235
242
|
},
|
|
236
243
|
slotProps: {
|
|
237
244
|
root: {
|
|
238
245
|
ownerState: ownerState
|
|
239
246
|
},
|
|
240
247
|
sectionContent: {
|
|
241
|
-
className:
|
|
248
|
+
className: pickersInputBaseClasses.sectionContent
|
|
242
249
|
},
|
|
243
250
|
sectionSeparator: function sectionSeparator(_ref5) {
|
|
244
251
|
var position = _ref5.position;
|
|
245
252
|
return {
|
|
246
|
-
className: position === 'before' ?
|
|
253
|
+
className: position === 'before' ? pickersInputBaseClasses.sectionBefore : pickersInputBaseClasses.sectionAfter
|
|
247
254
|
};
|
|
248
255
|
}
|
|
249
256
|
}
|
|
250
|
-
}), endAdornment, renderSuffix ? renderSuffix(_extends({}, muiFormControl)) : null, /*#__PURE__*/_jsx(
|
|
257
|
+
}), endAdornment, renderSuffix ? renderSuffix(_extends({}, muiFormControl)) : null, /*#__PURE__*/_jsx(PickersInputBaseInput, _extends({
|
|
251
258
|
className: classes.input,
|
|
252
259
|
value: value,
|
|
253
260
|
onChange: onChange,
|
|
@@ -259,4 +266,75 @@ export var PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(pr
|
|
|
259
266
|
}))]
|
|
260
267
|
}));
|
|
261
268
|
});
|
|
262
|
-
|
|
269
|
+
process.env.NODE_ENV !== "production" ? PickersInputBase.propTypes = {
|
|
270
|
+
// ----------------------------- Warning --------------------------------
|
|
271
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
272
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
273
|
+
// ----------------------------------------------------------------------
|
|
274
|
+
/**
|
|
275
|
+
* Is `true` if the current values equals the empty value.
|
|
276
|
+
* For a single item value, it means that `value === null`
|
|
277
|
+
* For a range value, it means that `value === [null, null]`
|
|
278
|
+
*/
|
|
279
|
+
areAllSectionsEmpty: PropTypes.bool.isRequired,
|
|
280
|
+
className: PropTypes.string,
|
|
281
|
+
/**
|
|
282
|
+
* The component used for the root node.
|
|
283
|
+
* Either a string to use a HTML element or a component.
|
|
284
|
+
*/
|
|
285
|
+
component: PropTypes.elementType,
|
|
286
|
+
/**
|
|
287
|
+
* If true, the whole element is editable.
|
|
288
|
+
* Useful when all the sections are selected.
|
|
289
|
+
*/
|
|
290
|
+
contentEditable: PropTypes.bool.isRequired,
|
|
291
|
+
/**
|
|
292
|
+
* The elements to render.
|
|
293
|
+
* Each element contains the prop to edit a section of the value.
|
|
294
|
+
*/
|
|
295
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
296
|
+
after: PropTypes.object.isRequired,
|
|
297
|
+
before: PropTypes.object.isRequired,
|
|
298
|
+
container: PropTypes.object.isRequired,
|
|
299
|
+
content: PropTypes.object.isRequired
|
|
300
|
+
})).isRequired,
|
|
301
|
+
endAdornment: PropTypes.node,
|
|
302
|
+
fullWidth: PropTypes.bool,
|
|
303
|
+
id: PropTypes.string,
|
|
304
|
+
inputProps: PropTypes.object,
|
|
305
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
306
|
+
current: PropTypes.object
|
|
307
|
+
})]),
|
|
308
|
+
label: PropTypes.node,
|
|
309
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
310
|
+
onChange: PropTypes.func.isRequired,
|
|
311
|
+
onClick: PropTypes.func.isRequired,
|
|
312
|
+
onInput: PropTypes.func.isRequired,
|
|
313
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
314
|
+
onPaste: PropTypes.func.isRequired,
|
|
315
|
+
ownerState: PropTypes.any,
|
|
316
|
+
readOnly: PropTypes.bool,
|
|
317
|
+
renderSuffix: PropTypes.func,
|
|
318
|
+
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
319
|
+
current: PropTypes.shape({
|
|
320
|
+
getRoot: PropTypes.func.isRequired,
|
|
321
|
+
getSectionContainer: PropTypes.func.isRequired,
|
|
322
|
+
getSectionContent: PropTypes.func.isRequired,
|
|
323
|
+
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
|
324
|
+
})
|
|
325
|
+
})]),
|
|
326
|
+
/**
|
|
327
|
+
* The components used for each slot inside.
|
|
328
|
+
*
|
|
329
|
+
* @default {}
|
|
330
|
+
*/
|
|
331
|
+
slots: PropTypes.object,
|
|
332
|
+
startAdornment: PropTypes.node,
|
|
333
|
+
style: PropTypes.object,
|
|
334
|
+
/**
|
|
335
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
336
|
+
*/
|
|
337
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
338
|
+
value: PropTypes.string.isRequired
|
|
339
|
+
} : void 0;
|
|
340
|
+
export { PickersInputBase };
|
|
@@ -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 var pickersInputBaseClasses = generateUtilityClasses('MuiPickersInputBase', ['root', 'focused', 'disabled', 'error', 'notchedOutline', 'sectionContent', 'sectionBefore', 'sectionAfter', 'adornedStart', 'adornedEnd', 'input']);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
var _excluded = ["children", "className", "label"];
|
|
3
|
+
var _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";
|
|
@@ -85,10 +85,16 @@ var OutlineLegend = styled('legend')(function (_ref3) {
|
|
|
85
85
|
})
|
|
86
86
|
}));
|
|
87
87
|
});
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @ignore - internal component.
|
|
91
|
+
*/
|
|
88
92
|
export default function Outline(props) {
|
|
89
93
|
var children = props.children,
|
|
90
94
|
className = props.className,
|
|
91
95
|
label = props.label,
|
|
96
|
+
notched = props.notched,
|
|
97
|
+
shrink = props.shrink,
|
|
92
98
|
other = _objectWithoutProperties(props, _excluded);
|
|
93
99
|
var withLabel = label != null && label !== '';
|
|
94
100
|
var ownerState = _extends({}, props, {
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
var _excluded = ["label", "autoFocus", "ownerState", "notched"];
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { useFormControl } from '@mui/material/FormControl';
|
|
8
|
+
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
+
import { pickersOutlinedInputClasses, getPickersOutlinedInputUtilityClass } from './pickersOutlinedInputClasses';
|
|
11
|
+
import Outline from './Outline';
|
|
12
|
+
import { PickersInputBase } from '../PickersInputBase';
|
|
13
|
+
import { PickersInputBaseRoot, PickersInputBaseSectionsContainer } from '../PickersInputBase/PickersInputBase';
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
var PickersOutlinedInputRoot = styled(PickersInputBaseRoot, {
|
|
17
|
+
name: 'MuiPickersOutlinedInput',
|
|
18
|
+
slot: 'Root',
|
|
19
|
+
overridesResolver: function overridesResolver(props, styles) {
|
|
20
|
+
return styles.root;
|
|
21
|
+
}
|
|
22
|
+
})(function (_ref) {
|
|
23
|
+
var theme = _ref.theme,
|
|
24
|
+
ownerState = _ref.ownerState;
|
|
25
|
+
var borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
|
|
26
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
27
|
+
padding: '0 14px',
|
|
28
|
+
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
29
|
+
}, "&:hover .".concat(pickersOutlinedInputClasses.notchedOutline), {
|
|
30
|
+
borderColor: (theme.vars || theme).palette.text.primary
|
|
31
|
+
}), '@media (hover: none)', _defineProperty({}, "&:hover .".concat(pickersOutlinedInputClasses.notchedOutline), {
|
|
32
|
+
borderColor: theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : borderColor
|
|
33
|
+
})), "&.".concat(pickersOutlinedInputClasses.focused, " .").concat(pickersOutlinedInputClasses.notchedOutline), {
|
|
34
|
+
borderStyle: 'solid',
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
borderColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
37
|
+
borderWidth: 2
|
|
38
|
+
}), "&.".concat(pickersOutlinedInputClasses.disabled), _defineProperty(_defineProperty({}, "& .".concat(pickersOutlinedInputClasses.notchedOutline), {
|
|
39
|
+
borderColor: (theme.vars || theme).palette.action.disabled
|
|
40
|
+
}), '*', {
|
|
41
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
42
|
+
})), "&.".concat(pickersOutlinedInputClasses.error, " .").concat(pickersOutlinedInputClasses.notchedOutline), {
|
|
43
|
+
borderColor: (theme.vars || theme).palette.error.main
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
var PickersOutlinedInputSectionsContainer = styled(PickersInputBaseSectionsContainer, {
|
|
47
|
+
name: 'MuiPickersOutlinedInput',
|
|
48
|
+
slot: 'SectionsContainer',
|
|
49
|
+
overridesResolver: function overridesResolver(props, styles) {
|
|
50
|
+
return styles.sectionsContainer;
|
|
51
|
+
}
|
|
52
|
+
})(function (_ref3) {
|
|
53
|
+
var ownerState = _ref3.ownerState;
|
|
54
|
+
return _extends({
|
|
55
|
+
padding: '16.5px 0'
|
|
56
|
+
}, ownerState.size === 'small' && {
|
|
57
|
+
padding: '8.5px 0'
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
61
|
+
var classes = ownerState.classes;
|
|
62
|
+
var slots = {
|
|
63
|
+
root: ['root'],
|
|
64
|
+
notchedOutline: ['notchedOutline'],
|
|
65
|
+
input: ['input']
|
|
66
|
+
};
|
|
67
|
+
var composedClasses = composeClasses(slots, getPickersOutlinedInputUtilityClass, classes);
|
|
68
|
+
return _extends({}, classes, composedClasses);
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* @ignore - internal component.
|
|
72
|
+
*/
|
|
73
|
+
var PickersOutlinedInput = /*#__PURE__*/React.forwardRef(function PickersOutlinedInput(inProps, ref) {
|
|
74
|
+
var props = useThemeProps({
|
|
75
|
+
props: inProps,
|
|
76
|
+
name: 'MuiPickersOutlinedInput'
|
|
77
|
+
});
|
|
78
|
+
var label = props.label,
|
|
79
|
+
autoFocus = props.autoFocus,
|
|
80
|
+
ownerStateProp = props.ownerState,
|
|
81
|
+
notched = props.notched,
|
|
82
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
83
|
+
var muiFormControl = useFormControl();
|
|
84
|
+
var ownerState = _extends({}, props, ownerStateProp, muiFormControl, {
|
|
85
|
+
color: (muiFormControl == null ? void 0 : muiFormControl.color) || 'primary'
|
|
86
|
+
});
|
|
87
|
+
var classes = useUtilityClasses(ownerState);
|
|
88
|
+
return /*#__PURE__*/_jsx(PickersInputBase, _extends({
|
|
89
|
+
slots: {
|
|
90
|
+
root: PickersOutlinedInputRoot,
|
|
91
|
+
input: PickersOutlinedInputSectionsContainer
|
|
92
|
+
},
|
|
93
|
+
renderSuffix: function renderSuffix(state) {
|
|
94
|
+
return /*#__PURE__*/_jsx(Outline, {
|
|
95
|
+
shrink: Boolean(notched || state.adornedStart || state.focused || state.filled),
|
|
96
|
+
notched: Boolean(notched || state.adornedStart || state.focused || state.filled),
|
|
97
|
+
className: classes.notchedOutline,
|
|
98
|
+
label: label != null && label !== '' && muiFormControl != null && muiFormControl.required ? /*#__PURE__*/_jsxs(React.Fragment, {
|
|
99
|
+
children: [label, "\u2009", '*']
|
|
100
|
+
}) : label,
|
|
101
|
+
ownerState: ownerState
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}, other, {
|
|
105
|
+
label: label,
|
|
106
|
+
classes: classes,
|
|
107
|
+
ref: ref
|
|
108
|
+
}));
|
|
109
|
+
});
|
|
110
|
+
process.env.NODE_ENV !== "production" ? PickersOutlinedInput.propTypes = {
|
|
111
|
+
// ----------------------------- Warning --------------------------------
|
|
112
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
113
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
114
|
+
// ----------------------------------------------------------------------
|
|
115
|
+
/**
|
|
116
|
+
* Is `true` if the current values equals the empty value.
|
|
117
|
+
* For a single item value, it means that `value === null`
|
|
118
|
+
* For a range value, it means that `value === [null, null]`
|
|
119
|
+
*/
|
|
120
|
+
areAllSectionsEmpty: PropTypes.bool.isRequired,
|
|
121
|
+
className: PropTypes.string,
|
|
122
|
+
/**
|
|
123
|
+
* The component used for the root node.
|
|
124
|
+
* Either a string to use a HTML element or a component.
|
|
125
|
+
*/
|
|
126
|
+
component: PropTypes.elementType,
|
|
127
|
+
/**
|
|
128
|
+
* If true, the whole element is editable.
|
|
129
|
+
* Useful when all the sections are selected.
|
|
130
|
+
*/
|
|
131
|
+
contentEditable: PropTypes.bool.isRequired,
|
|
132
|
+
/**
|
|
133
|
+
* The elements to render.
|
|
134
|
+
* Each element contains the prop to edit a section of the value.
|
|
135
|
+
*/
|
|
136
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
137
|
+
after: PropTypes.object.isRequired,
|
|
138
|
+
before: PropTypes.object.isRequired,
|
|
139
|
+
container: PropTypes.object.isRequired,
|
|
140
|
+
content: PropTypes.object.isRequired
|
|
141
|
+
})).isRequired,
|
|
142
|
+
endAdornment: PropTypes.node,
|
|
143
|
+
fullWidth: PropTypes.bool,
|
|
144
|
+
id: PropTypes.string,
|
|
145
|
+
inputProps: PropTypes.object,
|
|
146
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
147
|
+
current: PropTypes.object
|
|
148
|
+
})]),
|
|
149
|
+
label: PropTypes.node,
|
|
150
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
151
|
+
notched: PropTypes.bool,
|
|
152
|
+
onChange: PropTypes.func.isRequired,
|
|
153
|
+
onClick: PropTypes.func.isRequired,
|
|
154
|
+
onInput: PropTypes.func.isRequired,
|
|
155
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
156
|
+
onPaste: PropTypes.func.isRequired,
|
|
157
|
+
ownerState: PropTypes.any,
|
|
158
|
+
readOnly: PropTypes.bool,
|
|
159
|
+
renderSuffix: PropTypes.func,
|
|
160
|
+
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
161
|
+
current: PropTypes.shape({
|
|
162
|
+
getRoot: PropTypes.func.isRequired,
|
|
163
|
+
getSectionContainer: PropTypes.func.isRequired,
|
|
164
|
+
getSectionContent: PropTypes.func.isRequired,
|
|
165
|
+
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
|
166
|
+
})
|
|
167
|
+
})]),
|
|
168
|
+
/**
|
|
169
|
+
* The components used for each slot inside.
|
|
170
|
+
*
|
|
171
|
+
* @default {}
|
|
172
|
+
*/
|
|
173
|
+
slots: PropTypes.object,
|
|
174
|
+
startAdornment: PropTypes.node,
|
|
175
|
+
style: PropTypes.object,
|
|
176
|
+
/**
|
|
177
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
178
|
+
*/
|
|
179
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
180
|
+
value: PropTypes.string.isRequired
|
|
181
|
+
} : void 0;
|
|
182
|
+
export { PickersOutlinedInput };
|
|
183
|
+
PickersOutlinedInput.muiName = 'Input';
|
|
@@ -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 getPickersOutlinedInputUtilityClass(slot) {
|
|
6
|
+
return generateUtilityClass('MuiPickersOutlinedInput', slot);
|
|
7
|
+
}
|
|
8
|
+
export var pickersOutlinedInputClasses = _extends({}, pickersInputBaseClasses, generateUtilityClasses('MuiPickersOutlinedInput', ['root', 'notchedOutline', 'input']));
|
package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js
RENAMED
|
@@ -2,21 +2,23 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["onFocus", "onBlur", "className", "color", "disabled", "error", "variant", "required", "InputProps", "inputProps", "inputRef", "sectionListRef", "elements", "areAllSectionsEmpty", "onClick", "onKeyDown", "onKeyUp", "onPaste", "onInput", "endAdornment", "startAdornment", "tabIndex", "contentEditable", "focused", "value", "onChange", "fullWidth", "id", "helperText", "FormHelperTextProps", "label", "InputLabelProps"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
|
-
import { styled } from '@mui/material/styles';
|
|
7
|
+
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
8
|
import useForkRef from '@mui/utils/useForkRef';
|
|
8
|
-
import
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
+
import useId from '@mui/utils/useId';
|
|
9
11
|
import InputLabel from '@mui/material/InputLabel';
|
|
10
12
|
import FormHelperText from '@mui/material/FormHelperText';
|
|
11
13
|
import FormControl from '@mui/material/FormControl';
|
|
12
14
|
import { getPickersTextFieldUtilityClass } from './pickersTextFieldClasses';
|
|
13
|
-
import { PickersOutlinedInput } from '
|
|
14
|
-
import { PickersFilledInput } from '
|
|
15
|
-
import {
|
|
15
|
+
import { PickersOutlinedInput } from './PickersOutlinedInput';
|
|
16
|
+
import { PickersFilledInput } from './PickersFilledInput';
|
|
17
|
+
import { PickersInput } from './PickersInput';
|
|
16
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
20
|
var VARIANT_COMPONENT = {
|
|
19
|
-
standard:
|
|
21
|
+
standard: PickersInput,
|
|
20
22
|
filled: PickersFilledInput,
|
|
21
23
|
outlined: PickersOutlinedInput
|
|
22
24
|
};
|
|
@@ -37,7 +39,11 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
37
39
|
};
|
|
38
40
|
return composeClasses(slots, getPickersTextFieldUtilityClass, classes);
|
|
39
41
|
};
|
|
40
|
-
|
|
42
|
+
var PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField(inProps, ref) {
|
|
43
|
+
var props = useThemeProps({
|
|
44
|
+
props: inProps,
|
|
45
|
+
name: 'MuiPickersTextField'
|
|
46
|
+
});
|
|
41
47
|
var onFocus = props.onFocus,
|
|
42
48
|
onBlur = props.onBlur,
|
|
43
49
|
className = props.className,
|
|
@@ -135,4 +141,118 @@ export var PickersTextField = /*#__PURE__*/React.forwardRef(function PickersText
|
|
|
135
141
|
children: helperText
|
|
136
142
|
}))]
|
|
137
143
|
}));
|
|
138
|
-
});
|
|
144
|
+
});
|
|
145
|
+
process.env.NODE_ENV !== "production" ? PickersTextField.propTypes = {
|
|
146
|
+
// ----------------------------- Warning --------------------------------
|
|
147
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
148
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
149
|
+
// ----------------------------------------------------------------------
|
|
150
|
+
/**
|
|
151
|
+
* Is `true` if the current values equals the empty value.
|
|
152
|
+
* For a single item value, it means that `value === null`
|
|
153
|
+
* For a range value, it means that `value === [null, null]`
|
|
154
|
+
*/
|
|
155
|
+
areAllSectionsEmpty: PropTypes.bool.isRequired,
|
|
156
|
+
className: PropTypes.string,
|
|
157
|
+
/**
|
|
158
|
+
* The color of the component.
|
|
159
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
160
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
161
|
+
* @default 'primary'
|
|
162
|
+
*/
|
|
163
|
+
color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
|
|
164
|
+
component: PropTypes.elementType,
|
|
165
|
+
/**
|
|
166
|
+
* If true, the whole element is editable.
|
|
167
|
+
* Useful when all the sections are selected.
|
|
168
|
+
*/
|
|
169
|
+
contentEditable: PropTypes.bool.isRequired,
|
|
170
|
+
disabled: PropTypes.bool.isRequired,
|
|
171
|
+
/**
|
|
172
|
+
* The elements to render.
|
|
173
|
+
* Each element contains the prop to edit a section of the value.
|
|
174
|
+
*/
|
|
175
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
176
|
+
after: PropTypes.object.isRequired,
|
|
177
|
+
before: PropTypes.object.isRequired,
|
|
178
|
+
container: PropTypes.object.isRequired,
|
|
179
|
+
content: PropTypes.object.isRequired
|
|
180
|
+
})).isRequired,
|
|
181
|
+
endAdornment: PropTypes.node,
|
|
182
|
+
error: PropTypes.bool.isRequired,
|
|
183
|
+
/**
|
|
184
|
+
* If `true`, the component is displayed in focused state.
|
|
185
|
+
*/
|
|
186
|
+
focused: PropTypes.bool,
|
|
187
|
+
FormHelperTextProps: PropTypes.object,
|
|
188
|
+
fullWidth: PropTypes.bool,
|
|
189
|
+
/**
|
|
190
|
+
* The helper text content.
|
|
191
|
+
*/
|
|
192
|
+
helperText: PropTypes.node,
|
|
193
|
+
/**
|
|
194
|
+
* If `true`, the label is hidden.
|
|
195
|
+
* This is used to increase density for a `FilledInput`.
|
|
196
|
+
* Be sure to add `aria-label` to the `input` element.
|
|
197
|
+
* @default false
|
|
198
|
+
*/
|
|
199
|
+
hiddenLabel: PropTypes.bool,
|
|
200
|
+
id: PropTypes.string,
|
|
201
|
+
InputLabelProps: PropTypes.object,
|
|
202
|
+
inputProps: PropTypes.object,
|
|
203
|
+
/**
|
|
204
|
+
* Props applied to the Input element.
|
|
205
|
+
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
206
|
+
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
207
|
+
* component depending on the `variant` prop value.
|
|
208
|
+
*/
|
|
209
|
+
InputProps: PropTypes.object,
|
|
210
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
211
|
+
current: PropTypes.object
|
|
212
|
+
})]),
|
|
213
|
+
label: PropTypes.node,
|
|
214
|
+
/**
|
|
215
|
+
* If `dense` or `normal`, will adjust vertical spacing of this and contained components.
|
|
216
|
+
* @default 'none'
|
|
217
|
+
*/
|
|
218
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
219
|
+
onBlur: PropTypes.func.isRequired,
|
|
220
|
+
onChange: PropTypes.func.isRequired,
|
|
221
|
+
onClick: PropTypes.func.isRequired,
|
|
222
|
+
onFocus: PropTypes.func.isRequired,
|
|
223
|
+
onInput: PropTypes.func.isRequired,
|
|
224
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
225
|
+
onPaste: PropTypes.func.isRequired,
|
|
226
|
+
readOnly: PropTypes.bool,
|
|
227
|
+
/**
|
|
228
|
+
* If `true`, the label will indicate that the `input` is required.
|
|
229
|
+
* @default false
|
|
230
|
+
*/
|
|
231
|
+
required: PropTypes.bool,
|
|
232
|
+
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
233
|
+
current: PropTypes.shape({
|
|
234
|
+
getRoot: PropTypes.func.isRequired,
|
|
235
|
+
getSectionContainer: PropTypes.func.isRequired,
|
|
236
|
+
getSectionContent: PropTypes.func.isRequired,
|
|
237
|
+
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
|
238
|
+
})
|
|
239
|
+
})]),
|
|
240
|
+
/**
|
|
241
|
+
* The size of the component.
|
|
242
|
+
* @default 'medium'
|
|
243
|
+
*/
|
|
244
|
+
size: PropTypes.oneOf(['medium', 'small']),
|
|
245
|
+
startAdornment: PropTypes.node,
|
|
246
|
+
style: PropTypes.object,
|
|
247
|
+
/**
|
|
248
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
249
|
+
*/
|
|
250
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
251
|
+
value: PropTypes.string.isRequired,
|
|
252
|
+
/**
|
|
253
|
+
* The variant to use.
|
|
254
|
+
* @default 'outlined'
|
|
255
|
+
*/
|
|
256
|
+
variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
|
|
257
|
+
} : void 0;
|
|
258
|
+
export { PickersTextField };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { PickersTextField } from './PickersTextField';
|
|
2
|
+
export { pickersTextFieldClasses, getPickersTextFieldUtilityClass } from './pickersTextFieldClasses';
|
|
3
|
+
export * from './PickersInput';
|
|
4
|
+
export * from './PickersFilledInput';
|
|
5
|
+
export * from './PickersOutlinedInput';
|
|
6
|
+
export * from './PickersInputBase';
|
|
@@ -59,9 +59,6 @@ StaticDatePicker.propTypes = {
|
|
|
59
59
|
* - the `input` element if there is a field rendered.
|
|
60
60
|
*/
|
|
61
61
|
autoFocus: PropTypes.bool,
|
|
62
|
-
/**
|
|
63
|
-
* Class name applied to the root element.
|
|
64
|
-
*/
|
|
65
62
|
className: PropTypes.string,
|
|
66
63
|
/**
|
|
67
64
|
* Formats the day of week displayed in the calendar header.
|
|
@@ -79,9 +79,6 @@ StaticDateTimePicker.propTypes = {
|
|
|
79
79
|
* - the `input` element if there is a field rendered.
|
|
80
80
|
*/
|
|
81
81
|
autoFocus: PropTypes.bool,
|
|
82
|
-
/**
|
|
83
|
-
* Class name applied to the root element.
|
|
84
|
-
*/
|
|
85
82
|
className: PropTypes.string,
|
|
86
83
|
/**
|
|
87
84
|
* Formats the day of week displayed in the calendar header.
|