@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,190 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["label", "autoFocus", "ownerState", "notched"];
|
|
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 { pickersOutlinedInputClasses, getPickersOutlinedInputUtilityClass } from './pickersOutlinedInputClasses';
|
|
10
|
+
import Outline from './Outline';
|
|
11
|
+
import { PickersInputBase } from '../PickersInputBase';
|
|
12
|
+
import { PickersInputBaseRoot, PickersInputBaseSectionsContainer } from '../PickersInputBase/PickersInputBase';
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
const PickersOutlinedInputRoot = styled(PickersInputBaseRoot, {
|
|
16
|
+
name: 'MuiPickersOutlinedInput',
|
|
17
|
+
slot: 'Root',
|
|
18
|
+
overridesResolver: (props, styles) => styles.root
|
|
19
|
+
})(({
|
|
20
|
+
theme,
|
|
21
|
+
ownerState
|
|
22
|
+
}) => {
|
|
23
|
+
const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
|
|
24
|
+
return {
|
|
25
|
+
padding: '0 14px',
|
|
26
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
27
|
+
[`&:hover .${pickersOutlinedInputClasses.notchedOutline}`]: {
|
|
28
|
+
borderColor: (theme.vars || theme).palette.text.primary
|
|
29
|
+
},
|
|
30
|
+
// Reset on touch devices, it doesn't add specificity
|
|
31
|
+
'@media (hover: none)': {
|
|
32
|
+
[`&:hover .${pickersOutlinedInputClasses.notchedOutline}`]: {
|
|
33
|
+
borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
[`&.${pickersOutlinedInputClasses.focused} .${pickersOutlinedInputClasses.notchedOutline}`]: {
|
|
37
|
+
borderStyle: 'solid',
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
borderColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
40
|
+
borderWidth: 2
|
|
41
|
+
},
|
|
42
|
+
[`&.${pickersOutlinedInputClasses.disabled}`]: {
|
|
43
|
+
[`& .${pickersOutlinedInputClasses.notchedOutline}`]: {
|
|
44
|
+
borderColor: (theme.vars || theme).palette.action.disabled
|
|
45
|
+
},
|
|
46
|
+
'*': {
|
|
47
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
[`&.${pickersOutlinedInputClasses.error} .${pickersOutlinedInputClasses.notchedOutline}`]: {
|
|
51
|
+
borderColor: (theme.vars || theme).palette.error.main
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
const PickersOutlinedInputSectionsContainer = styled(PickersInputBaseSectionsContainer, {
|
|
56
|
+
name: 'MuiPickersOutlinedInput',
|
|
57
|
+
slot: 'SectionsContainer',
|
|
58
|
+
overridesResolver: (props, styles) => styles.sectionsContainer
|
|
59
|
+
})(({
|
|
60
|
+
ownerState
|
|
61
|
+
}) => _extends({
|
|
62
|
+
padding: '16.5px 0'
|
|
63
|
+
}, ownerState.size === 'small' && {
|
|
64
|
+
padding: '8.5px 0'
|
|
65
|
+
}));
|
|
66
|
+
const useUtilityClasses = ownerState => {
|
|
67
|
+
const {
|
|
68
|
+
classes
|
|
69
|
+
} = ownerState;
|
|
70
|
+
const slots = {
|
|
71
|
+
root: ['root'],
|
|
72
|
+
notchedOutline: ['notchedOutline'],
|
|
73
|
+
input: ['input']
|
|
74
|
+
};
|
|
75
|
+
const composedClasses = composeClasses(slots, getPickersOutlinedInputUtilityClass, classes);
|
|
76
|
+
return _extends({}, classes, composedClasses);
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @ignore - internal component.
|
|
80
|
+
*/
|
|
81
|
+
const PickersOutlinedInput = /*#__PURE__*/React.forwardRef(function PickersOutlinedInput(inProps, ref) {
|
|
82
|
+
const props = useThemeProps({
|
|
83
|
+
props: inProps,
|
|
84
|
+
name: 'MuiPickersOutlinedInput'
|
|
85
|
+
});
|
|
86
|
+
const {
|
|
87
|
+
label,
|
|
88
|
+
ownerState: ownerStateProp,
|
|
89
|
+
notched
|
|
90
|
+
} = props,
|
|
91
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
92
|
+
const muiFormControl = useFormControl();
|
|
93
|
+
const ownerState = _extends({}, props, ownerStateProp, muiFormControl, {
|
|
94
|
+
color: (muiFormControl == null ? void 0 : muiFormControl.color) || 'primary'
|
|
95
|
+
});
|
|
96
|
+
const classes = useUtilityClasses(ownerState);
|
|
97
|
+
return /*#__PURE__*/_jsx(PickersInputBase, _extends({
|
|
98
|
+
slots: {
|
|
99
|
+
root: PickersOutlinedInputRoot,
|
|
100
|
+
input: PickersOutlinedInputSectionsContainer
|
|
101
|
+
},
|
|
102
|
+
renderSuffix: state => /*#__PURE__*/_jsx(Outline, {
|
|
103
|
+
shrink: Boolean(notched || state.adornedStart || state.focused || state.filled),
|
|
104
|
+
notched: Boolean(notched || state.adornedStart || state.focused || state.filled),
|
|
105
|
+
className: classes.notchedOutline,
|
|
106
|
+
label: label != null && label !== '' && muiFormControl != null && muiFormControl.required ? /*#__PURE__*/_jsxs(React.Fragment, {
|
|
107
|
+
children: [label, "\u2009", '*']
|
|
108
|
+
}) : label,
|
|
109
|
+
ownerState: ownerState
|
|
110
|
+
})
|
|
111
|
+
}, other, {
|
|
112
|
+
label: label,
|
|
113
|
+
classes: classes,
|
|
114
|
+
ref: ref
|
|
115
|
+
}));
|
|
116
|
+
});
|
|
117
|
+
process.env.NODE_ENV !== "production" ? PickersOutlinedInput.propTypes = {
|
|
118
|
+
// ----------------------------- Warning --------------------------------
|
|
119
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
120
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
121
|
+
// ----------------------------------------------------------------------
|
|
122
|
+
/**
|
|
123
|
+
* Is `true` if the current values equals the empty value.
|
|
124
|
+
* For a single item value, it means that `value === null`
|
|
125
|
+
* For a range value, it means that `value === [null, null]`
|
|
126
|
+
*/
|
|
127
|
+
areAllSectionsEmpty: PropTypes.bool.isRequired,
|
|
128
|
+
className: PropTypes.string,
|
|
129
|
+
/**
|
|
130
|
+
* The component used for the root node.
|
|
131
|
+
* Either a string to use a HTML element or a component.
|
|
132
|
+
*/
|
|
133
|
+
component: PropTypes.elementType,
|
|
134
|
+
/**
|
|
135
|
+
* If true, the whole element is editable.
|
|
136
|
+
* Useful when all the sections are selected.
|
|
137
|
+
*/
|
|
138
|
+
contentEditable: PropTypes.bool.isRequired,
|
|
139
|
+
/**
|
|
140
|
+
* The elements to render.
|
|
141
|
+
* Each element contains the prop to edit a section of the value.
|
|
142
|
+
*/
|
|
143
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
144
|
+
after: PropTypes.object.isRequired,
|
|
145
|
+
before: PropTypes.object.isRequired,
|
|
146
|
+
container: PropTypes.object.isRequired,
|
|
147
|
+
content: PropTypes.object.isRequired
|
|
148
|
+
})).isRequired,
|
|
149
|
+
endAdornment: PropTypes.node,
|
|
150
|
+
fullWidth: PropTypes.bool,
|
|
151
|
+
id: PropTypes.string,
|
|
152
|
+
inputProps: PropTypes.object,
|
|
153
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
154
|
+
current: PropTypes.object
|
|
155
|
+
})]),
|
|
156
|
+
label: PropTypes.node,
|
|
157
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
158
|
+
notched: PropTypes.bool,
|
|
159
|
+
onChange: PropTypes.func.isRequired,
|
|
160
|
+
onClick: PropTypes.func.isRequired,
|
|
161
|
+
onInput: PropTypes.func.isRequired,
|
|
162
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
163
|
+
onPaste: PropTypes.func.isRequired,
|
|
164
|
+
ownerState: PropTypes.any,
|
|
165
|
+
readOnly: PropTypes.bool,
|
|
166
|
+
renderSuffix: PropTypes.func,
|
|
167
|
+
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
168
|
+
current: PropTypes.shape({
|
|
169
|
+
getRoot: PropTypes.func.isRequired,
|
|
170
|
+
getSectionContainer: PropTypes.func.isRequired,
|
|
171
|
+
getSectionContent: PropTypes.func.isRequired,
|
|
172
|
+
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
|
173
|
+
})
|
|
174
|
+
})]),
|
|
175
|
+
/**
|
|
176
|
+
* The components used for each slot inside.
|
|
177
|
+
*
|
|
178
|
+
* @default {}
|
|
179
|
+
*/
|
|
180
|
+
slots: PropTypes.object,
|
|
181
|
+
startAdornment: PropTypes.node,
|
|
182
|
+
style: PropTypes.object,
|
|
183
|
+
/**
|
|
184
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
185
|
+
*/
|
|
186
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
187
|
+
value: PropTypes.string.isRequired
|
|
188
|
+
} : void 0;
|
|
189
|
+
export { PickersOutlinedInput };
|
|
190
|
+
PickersOutlinedInput.muiName = 'Input';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { PickersOutlinedInput } from './PickersOutlinedInput';
|
|
2
|
+
export type { PickersOutlinedInputProps } from './PickersOutlinedInput';
|
|
3
|
+
export type { PickersOutlinedInputClasses, PickersOutlinedInputClassKey, } from './pickersOutlinedInputClasses';
|
|
4
|
+
export { getPickersOutlinedInputUtilityClass, pickersOutlinedInputClasses, } from './pickersOutlinedInputClasses';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PickersInputBaseClasses } from '../PickersInputBase';
|
|
2
|
+
export interface PickersOutlinedInputClasses extends PickersInputBaseClasses {
|
|
3
|
+
/** Styles applied to the NotchedOutline element. */
|
|
4
|
+
notchedOutline: string;
|
|
5
|
+
}
|
|
6
|
+
export type PickersOutlinedInputClassKey = keyof PickersOutlinedInputClasses;
|
|
7
|
+
export declare function getPickersOutlinedInputUtilityClass(slot: string): string;
|
|
8
|
+
export declare const pickersOutlinedInputClasses: {
|
|
9
|
+
input: string;
|
|
10
|
+
root: string;
|
|
11
|
+
notchedOutline: string;
|
|
12
|
+
disabled: string;
|
|
13
|
+
readOnly: string;
|
|
14
|
+
error: string;
|
|
15
|
+
focused: string;
|
|
16
|
+
adornedStart: string;
|
|
17
|
+
adornedEnd: 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 getPickersOutlinedInputUtilityClass(slot) {
|
|
6
|
+
return generateUtilityClass('MuiPickersOutlinedInput', slot);
|
|
7
|
+
}
|
|
8
|
+
export const pickersOutlinedInputClasses = _extends({}, pickersInputBaseClasses, generateUtilityClasses('MuiPickersOutlinedInput', ['root', 'notchedOutline', 'input']));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const PickersTextField: React.ForwardRefExoticComponent<(Omit<import("./PickersTextField.types").PickersFilledTextFieldProps, "ref"> | Omit<import("./PickersTextField.types").PickersOutlinedTextFieldProps, "ref"> | Omit<import("./PickersTextField.types").PickersStandardTextFieldProps, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export { PickersTextField };
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _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
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
+
import useForkRef from '@mui/utils/useForkRef';
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
+
import useId from '@mui/utils/useId';
|
|
11
|
+
import InputLabel from '@mui/material/InputLabel';
|
|
12
|
+
import FormHelperText from '@mui/material/FormHelperText';
|
|
13
|
+
import FormControl from '@mui/material/FormControl';
|
|
14
|
+
import { getPickersTextFieldUtilityClass } from './pickersTextFieldClasses';
|
|
15
|
+
import { PickersOutlinedInput } from './PickersOutlinedInput';
|
|
16
|
+
import { PickersFilledInput } from './PickersFilledInput';
|
|
17
|
+
import { PickersInput } from './PickersInput';
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
const VARIANT_COMPONENT = {
|
|
21
|
+
standard: PickersInput,
|
|
22
|
+
filled: PickersFilledInput,
|
|
23
|
+
outlined: PickersOutlinedInput
|
|
24
|
+
};
|
|
25
|
+
const PickersTextFieldRoot = styled(FormControl, {
|
|
26
|
+
name: 'MuiPickersTextField',
|
|
27
|
+
slot: 'Root',
|
|
28
|
+
overridesResolver: (props, styles) => styles.root
|
|
29
|
+
})({});
|
|
30
|
+
const useUtilityClasses = ownerState => {
|
|
31
|
+
const {
|
|
32
|
+
focused,
|
|
33
|
+
disabled,
|
|
34
|
+
classes,
|
|
35
|
+
required
|
|
36
|
+
} = ownerState;
|
|
37
|
+
const slots = {
|
|
38
|
+
root: ['root', focused && !disabled && 'focused', disabled && 'disabled', required && 'required']
|
|
39
|
+
};
|
|
40
|
+
return composeClasses(slots, getPickersTextFieldUtilityClass, classes);
|
|
41
|
+
};
|
|
42
|
+
const PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField(inProps, ref) {
|
|
43
|
+
const props = useThemeProps({
|
|
44
|
+
props: inProps,
|
|
45
|
+
name: 'MuiPickersTextField'
|
|
46
|
+
});
|
|
47
|
+
const {
|
|
48
|
+
// Props used by FormControl
|
|
49
|
+
onFocus,
|
|
50
|
+
onBlur,
|
|
51
|
+
className,
|
|
52
|
+
color = 'primary',
|
|
53
|
+
disabled = false,
|
|
54
|
+
error = false,
|
|
55
|
+
variant = 'outlined',
|
|
56
|
+
required = false,
|
|
57
|
+
// Props used by PickersInput
|
|
58
|
+
InputProps,
|
|
59
|
+
inputProps,
|
|
60
|
+
inputRef,
|
|
61
|
+
sectionListRef,
|
|
62
|
+
elements,
|
|
63
|
+
areAllSectionsEmpty,
|
|
64
|
+
onClick,
|
|
65
|
+
onKeyDown,
|
|
66
|
+
onPaste,
|
|
67
|
+
onInput,
|
|
68
|
+
endAdornment,
|
|
69
|
+
startAdornment,
|
|
70
|
+
tabIndex,
|
|
71
|
+
contentEditable,
|
|
72
|
+
focused,
|
|
73
|
+
value,
|
|
74
|
+
onChange,
|
|
75
|
+
fullWidth,
|
|
76
|
+
id: idProp,
|
|
77
|
+
// Props used by FormHelperText
|
|
78
|
+
helperText,
|
|
79
|
+
FormHelperTextProps,
|
|
80
|
+
// Props used by InputLabel
|
|
81
|
+
label,
|
|
82
|
+
InputLabelProps
|
|
83
|
+
} = props,
|
|
84
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
85
|
+
const rootRef = React.useRef(null);
|
|
86
|
+
const handleRootRef = useForkRef(ref, rootRef);
|
|
87
|
+
const id = useId(idProp);
|
|
88
|
+
const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
|
|
89
|
+
const inputLabelId = label && id ? `${id}-label` : undefined;
|
|
90
|
+
const ownerState = _extends({}, props, {
|
|
91
|
+
color,
|
|
92
|
+
disabled,
|
|
93
|
+
error,
|
|
94
|
+
focused,
|
|
95
|
+
required,
|
|
96
|
+
variant
|
|
97
|
+
});
|
|
98
|
+
const classes = useUtilityClasses(ownerState);
|
|
99
|
+
const PickersInputComponent = VARIANT_COMPONENT[variant];
|
|
100
|
+
return /*#__PURE__*/_jsxs(PickersTextFieldRoot, _extends({
|
|
101
|
+
className: clsx(classes.root, className),
|
|
102
|
+
ref: handleRootRef,
|
|
103
|
+
focused: focused,
|
|
104
|
+
onFocus: onFocus,
|
|
105
|
+
onBlur: onBlur,
|
|
106
|
+
disabled: disabled,
|
|
107
|
+
variant: variant,
|
|
108
|
+
error: error,
|
|
109
|
+
color: color,
|
|
110
|
+
fullWidth: fullWidth,
|
|
111
|
+
required: required,
|
|
112
|
+
ownerState: ownerState
|
|
113
|
+
}, other, {
|
|
114
|
+
children: [/*#__PURE__*/_jsx(InputLabel, _extends({
|
|
115
|
+
htmlFor: id,
|
|
116
|
+
id: inputLabelId
|
|
117
|
+
}, InputLabelProps, {
|
|
118
|
+
children: label
|
|
119
|
+
})), /*#__PURE__*/_jsx(PickersInputComponent, _extends({
|
|
120
|
+
elements: elements,
|
|
121
|
+
areAllSectionsEmpty: areAllSectionsEmpty,
|
|
122
|
+
onClick: onClick,
|
|
123
|
+
onKeyDown: onKeyDown,
|
|
124
|
+
onInput: onInput,
|
|
125
|
+
onPaste: onPaste,
|
|
126
|
+
endAdornment: endAdornment,
|
|
127
|
+
startAdornment: startAdornment,
|
|
128
|
+
tabIndex: tabIndex,
|
|
129
|
+
contentEditable: contentEditable,
|
|
130
|
+
value: value,
|
|
131
|
+
onChange: onChange,
|
|
132
|
+
id: id,
|
|
133
|
+
fullWidth: fullWidth,
|
|
134
|
+
inputProps: inputProps,
|
|
135
|
+
inputRef: inputRef,
|
|
136
|
+
sectionListRef: sectionListRef,
|
|
137
|
+
label: label
|
|
138
|
+
}, InputProps)), helperText && /*#__PURE__*/_jsx(FormHelperText, _extends({
|
|
139
|
+
id: helperTextId
|
|
140
|
+
}, FormHelperTextProps, {
|
|
141
|
+
children: helperText
|
|
142
|
+
}))]
|
|
143
|
+
}));
|
|
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 };
|
package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.d.ts
RENAMED
|
@@ -3,7 +3,10 @@ import { FormControlProps } from '@mui/material/FormControl';
|
|
|
3
3
|
import { FormHelperTextProps } from '@mui/material/FormHelperText';
|
|
4
4
|
import { InputLabelProps } from '@mui/material/InputLabel';
|
|
5
5
|
import { TextFieldVariants } from '@mui/material/TextField';
|
|
6
|
-
import {
|
|
6
|
+
import { PickersInputPropsUsedByField } from './PickersInputBase/PickersInputBase.types';
|
|
7
|
+
import { PickersInputProps } from './PickersInput';
|
|
8
|
+
import { PickersOutlinedInputProps } from './PickersOutlinedInput';
|
|
9
|
+
import { PickersFilledInputProps } from './PickersFilledInput';
|
|
7
10
|
interface PickersTextFieldPropsUsedByField {
|
|
8
11
|
onFocus: React.FocusEventHandler<HTMLDivElement>;
|
|
9
12
|
onBlur: React.FocusEventHandler<HTMLDivElement>;
|
|
@@ -30,7 +33,7 @@ export interface PickersStandardTextFieldProps extends PickersBaseTextFieldProps
|
|
|
30
33
|
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
31
34
|
* component depending on the `variant` prop value.
|
|
32
35
|
*/
|
|
33
|
-
InputProps?: Partial<
|
|
36
|
+
InputProps?: Partial<PickersInputProps>;
|
|
34
37
|
}
|
|
35
38
|
export interface PickersOutlinedTextFieldProps extends PickersBaseTextFieldProps {
|
|
36
39
|
/**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { PickersTextField } from './PickersTextField';
|
|
2
|
+
export type { PickersTextFieldProps } from './PickersTextField.types';
|
|
3
|
+
export { pickersTextFieldClasses, getPickersTextFieldUtilityClass, } from './pickersTextFieldClasses';
|
|
4
|
+
export type { PickersTextFieldClasses, PickersTextFieldClassKey } from './pickersTextFieldClasses';
|
|
5
|
+
export * from './PickersInput';
|
|
6
|
+
export * from './PickersFilledInput';
|
|
7
|
+
export * from './PickersOutlinedInput';
|
|
8
|
+
export * from './PickersInputBase';
|
|
@@ -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';
|
package/README.md
CHANGED
|
@@ -60,9 +60,6 @@ StaticDatePicker.propTypes = {
|
|
|
60
60
|
* - the `input` element if there is a field rendered.
|
|
61
61
|
*/
|
|
62
62
|
autoFocus: PropTypes.bool,
|
|
63
|
-
/**
|
|
64
|
-
* Class name applied to the root element.
|
|
65
|
-
*/
|
|
66
63
|
className: PropTypes.string,
|
|
67
64
|
/**
|
|
68
65
|
* Formats the day of week displayed in the calendar header.
|
|
@@ -80,9 +80,6 @@ StaticDateTimePicker.propTypes = {
|
|
|
80
80
|
* - the `input` element if there is a field rendered.
|
|
81
81
|
*/
|
|
82
82
|
autoFocus: PropTypes.bool,
|
|
83
|
-
/**
|
|
84
|
-
* Class name applied to the root element.
|
|
85
|
-
*/
|
|
86
83
|
className: PropTypes.string,
|
|
87
84
|
/**
|
|
88
85
|
* Formats the day of week displayed in the calendar header.
|
package/TimeClock/TimeClock.js
CHANGED
|
@@ -463,6 +463,7 @@ process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
|
|
|
463
463
|
view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),
|
|
464
464
|
/**
|
|
465
465
|
* Available views.
|
|
466
|
+
* @default ['hours', 'minutes']
|
|
466
467
|
*/
|
|
467
468
|
views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)
|
|
468
469
|
} : void 0;
|
|
@@ -15,6 +15,11 @@ export interface TimeClockSlots extends PickersArrowSwitcherSlots {
|
|
|
15
15
|
export interface TimeClockSlotProps extends PickersArrowSwitcherSlotProps {
|
|
16
16
|
}
|
|
17
17
|
export interface TimeClockProps<TDate, TView extends TimeViewWithMeridiem = TimeView> extends ExportedTimeClockProps<TDate>, BaseClockProps<TDate, TView> {
|
|
18
|
+
/**
|
|
19
|
+
* Available views.
|
|
20
|
+
* @default ['hours', 'minutes']
|
|
21
|
+
*/
|
|
22
|
+
views?: readonly TView[];
|
|
18
23
|
/**
|
|
19
24
|
* Override or extend the styles applied to the component.
|
|
20
25
|
*/
|
package/TimePicker/TimePicker.js
CHANGED
|
@@ -65,9 +65,6 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
|
65
65
|
* - the `input` element if there is a field rendered.
|
|
66
66
|
*/
|
|
67
67
|
autoFocus: PropTypes.bool,
|
|
68
|
-
/**
|
|
69
|
-
* Class name applied to the root element.
|
|
70
|
-
*/
|
|
71
68
|
className: PropTypes.string,
|
|
72
69
|
/**
|
|
73
70
|
* If `true`, the popover or modal will close after submitting the full date.
|
|
@@ -214,9 +214,6 @@ process.env.NODE_ENV !== "production" ? TimePickerToolbar.propTypes = {
|
|
|
214
214
|
ampm: PropTypes.bool,
|
|
215
215
|
ampmInClock: PropTypes.bool,
|
|
216
216
|
classes: PropTypes.object,
|
|
217
|
-
/**
|
|
218
|
-
* className applied to the root component.
|
|
219
|
-
*/
|
|
220
217
|
className: PropTypes.string,
|
|
221
218
|
disabled: PropTypes.bool,
|
|
222
219
|
/**
|
|
@@ -265,9 +265,6 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
|
|
|
265
265
|
* Override or extend the styles applied to the component.
|
|
266
266
|
*/
|
|
267
267
|
classes: PropTypes.object,
|
|
268
|
-
/**
|
|
269
|
-
* className applied to the root element.
|
|
270
|
-
*/
|
|
271
268
|
className: PropTypes.string,
|
|
272
269
|
/**
|
|
273
270
|
* The default selected value.
|
|
@@ -12,9 +12,6 @@ export interface ExportedYearCalendarProps {
|
|
|
12
12
|
}
|
|
13
13
|
export interface YearCalendarProps<TDate> extends ExportedYearCalendarProps, YearValidationProps<TDate>, BaseDateValidationProps<TDate>, TimezoneProps {
|
|
14
14
|
autoFocus?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* className applied to the root element.
|
|
17
|
-
*/
|
|
18
15
|
className?: string;
|
|
19
16
|
/**
|
|
20
17
|
* Override or extend the styles applied to the component.
|
|
@@ -42,8 +42,8 @@ export const useClearableField = props => {
|
|
|
42
42
|
});
|
|
43
43
|
return _extends({}, other, {
|
|
44
44
|
InputProps: _extends({}, InputProps, {
|
|
45
|
-
endAdornment:
|
|
46
|
-
children: [/*#__PURE__*/_jsx(InputAdornment, {
|
|
45
|
+
endAdornment: /*#__PURE__*/_jsxs(React.Fragment, {
|
|
46
|
+
children: [clearable && /*#__PURE__*/_jsx(InputAdornment, {
|
|
47
47
|
position: "end",
|
|
48
48
|
sx: {
|
|
49
49
|
marginRight: InputProps != null && InputProps.endAdornment ? -1 : -1.5
|
|
@@ -55,7 +55,7 @@ export const useClearableField = props => {
|
|
|
55
55
|
}, endClearIconProps))
|
|
56
56
|
}))
|
|
57
57
|
}), InputProps == null ? void 0 : InputProps.endAdornment]
|
|
58
|
-
})
|
|
58
|
+
})
|
|
59
59
|
}),
|
|
60
60
|
sx: [{
|
|
61
61
|
'& .clearButton': {
|