@mui/x-date-pickers 7.0.0-alpha.8 → 7.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdapterLuxon/AdapterLuxon.d.ts +1 -1
- package/AdapterLuxon/AdapterLuxon.js +4 -12
- package/CHANGELOG.md +508 -30
- package/DatePicker/DatePicker.js +0 -3
- package/DatePicker/DatePickerToolbar.js +0 -3
- package/DateTimePicker/DateTimePicker.js +0 -3
- package/DateTimePicker/DateTimePickerTabs.js +7 -4
- package/DateTimePicker/DateTimePickerToolbar.d.ts +6 -1
- package/DateTimePicker/DateTimePickerToolbar.js +33 -20
- package/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/MobileDatePicker/MobileDatePicker.js +0 -3
- package/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
- package/MobileTimePicker/MobileTimePicker.js +0 -3
- package/MonthCalendar/MonthCalendar.js +0 -3
- package/MonthCalendar/MonthCalendar.types.d.ts +0 -3
- package/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +0 -3
- package/PickersLayout/PickersLayout.types.d.ts +6 -5
- package/PickersLayout/pickersLayoutClasses.js +3 -2
- package/PickersLayout/usePickerLayout.d.ts +2 -2
- package/PickersLayout/usePickerLayout.js +2 -1
- package/PickersSectionList/PickersSectionList.js +6 -1
- package/PickersTextField/PickersFilledInput/PickersFilledInput.d.ts +11 -0
- package/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +98 -25
- package/PickersTextField/PickersFilledInput/index.d.ts +4 -0
- package/PickersTextField/PickersFilledInput/index.js +2 -0
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +23 -0
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
- package/PickersTextField/PickersInput/PickersInput.d.ts +10 -0
- package/PickersTextField/PickersInput/PickersInput.js +196 -0
- package/{internals/components → PickersTextField}/PickersInput/index.d.ts +2 -2
- package/PickersTextField/PickersInput/index.js +2 -0
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +22 -0
- package/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +16 -0
- package/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
- package/{internals/components/PickersInput/PickersInput.types.d.ts → PickersTextField/PickersInputBase/PickersInputBase.types.d.ts} +3 -13
- package/PickersTextField/PickersInputBase/index.d.ts +4 -0
- package/PickersTextField/PickersInputBase/index.js +2 -0
- package/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +31 -0
- package/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
- package/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.d.ts +3 -0
- package/{modern/internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.d.ts +10 -0
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +190 -0
- package/PickersTextField/PickersOutlinedInput/index.d.ts +4 -0
- package/PickersTextField/PickersOutlinedInput/index.js +2 -0
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +22 -0
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
- package/PickersTextField/PickersTextField.d.ts +3 -0
- package/PickersTextField/PickersTextField.js +258 -0
- package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.d.ts +5 -2
- package/PickersTextField/index.d.ts +8 -0
- package/PickersTextField/index.js +6 -0
- package/PickersTextField/package.json +6 -0
- package/README.md +3 -3
- package/StaticDatePicker/StaticDatePicker.js +0 -3
- package/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/StaticTimePicker/StaticTimePicker.js +0 -3
- package/TimeClock/TimeClock.js +3 -3
- package/TimePicker/TimePicker.js +0 -3
- package/TimePicker/TimePickerToolbar.js +0 -3
- package/YearCalendar/YearCalendar.js +0 -3
- package/YearCalendar/YearCalendar.types.d.ts +0 -3
- package/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
- package/index.d.ts +2 -1
- package/index.js +3 -2
- package/internals/hooks/useField/useField.js +6 -4
- package/internals/hooks/useField/useField.types.d.ts +4 -2
- package/internals/hooks/useField/useField.utils.d.ts +19 -9
- package/internals/hooks/useField/useField.utils.js +68 -21
- package/internals/hooks/useField/useFieldCharacterEditing.d.ts +2 -1
- package/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
- package/internals/hooks/useField/useFieldState.d.ts +1 -0
- package/internals/hooks/useField/useFieldState.js +9 -7
- package/internals/hooks/usePicker/usePicker.d.ts +1 -1
- package/internals/hooks/usePicker/usePicker.js +4 -2
- package/internals/hooks/usePicker/usePicker.types.d.ts +1 -1
- package/internals/hooks/usePicker/usePickerViews.d.ts +11 -2
- package/internals/hooks/usePicker/usePickerViews.js +8 -3
- package/internals/index.d.ts +4 -4
- package/internals/index.js +2 -2
- package/internals/models/props/basePickerProps.d.ts +0 -3
- package/internals/models/props/tabs.d.ts +2 -1
- package/internals/models/props/toolbar.d.ts +0 -3
- package/internals/utils/valueManagers.js +2 -2
- package/legacy/AdapterLuxon/AdapterLuxon.js +4 -12
- package/legacy/DatePicker/DatePicker.js +0 -3
- package/legacy/DatePicker/DatePickerToolbar.js +0 -3
- package/legacy/DateTimePicker/DateTimePicker.js +0 -3
- package/legacy/DateTimePicker/DateTimePickerTabs.js +7 -4
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +43 -32
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/legacy/MobileDatePicker/MobileDatePicker.js +0 -3
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
- package/legacy/MobileTimePicker/MobileTimePicker.js +0 -3
- package/legacy/MonthCalendar/MonthCalendar.js +0 -3
- package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/legacy/PickersLayout/pickersLayoutClasses.js +3 -2
- package/legacy/PickersLayout/usePickerLayout.js +2 -1
- package/legacy/PickersSectionList/PickersSectionList.js +6 -1
- package/legacy/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +99 -26
- package/legacy/PickersTextField/PickersFilledInput/index.js +2 -0
- package/legacy/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
- package/legacy/PickersTextField/PickersInput/PickersInput.js +190 -0
- package/legacy/PickersTextField/PickersInput/index.js +2 -0
- package/legacy/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
- package/legacy/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
- package/legacy/PickersTextField/PickersInputBase/index.js +2 -0
- package/legacy/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
- package/legacy/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +7 -1
- package/legacy/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +183 -0
- package/legacy/PickersTextField/PickersOutlinedInput/index.js +2 -0
- package/legacy/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
- package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js +128 -8
- package/legacy/PickersTextField/index.js +6 -0
- package/legacy/StaticDatePicker/StaticDatePicker.js +0 -3
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/legacy/StaticTimePicker/StaticTimePicker.js +0 -3
- package/legacy/TimeClock/TimeClock.js +3 -3
- package/legacy/TimePicker/TimePicker.js +0 -3
- package/legacy/TimePicker/TimePickerToolbar.js +0 -3
- package/legacy/YearCalendar/YearCalendar.js +0 -3
- package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +5 -4
- package/legacy/index.js +3 -2
- package/legacy/internals/hooks/useField/useField.js +6 -4
- package/legacy/internals/hooks/useField/useField.utils.js +71 -20
- package/legacy/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
- package/legacy/internals/hooks/useField/useFieldState.js +15 -11
- package/legacy/internals/hooks/usePicker/usePicker.js +4 -2
- package/legacy/internals/hooks/usePicker/usePickerViews.js +8 -3
- package/legacy/internals/index.js +2 -2
- package/legacy/internals/utils/valueManagers.js +2 -2
- package/legacy/locales/beBY.js +8 -3
- package/legacy/locales/caES.js +7 -2
- package/legacy/locales/csCZ.js +8 -3
- package/legacy/locales/daDK.js +8 -3
- package/legacy/locales/deDE.js +6 -1
- package/legacy/locales/elGR.js +8 -3
- package/legacy/locales/enUS.js +7 -3
- package/legacy/locales/esES.js +8 -3
- package/legacy/locales/eu.js +6 -1
- package/legacy/locales/faIR.js +6 -1
- package/legacy/locales/fiFI.js +8 -3
- package/legacy/locales/frFR.js +6 -1
- package/legacy/locales/heIL.js +6 -1
- package/legacy/locales/huHU.js +6 -1
- package/legacy/locales/isIS.js +8 -3
- package/legacy/locales/itIT.js +8 -3
- package/legacy/locales/jaJP.js +6 -1
- package/legacy/locales/koKR.js +6 -1
- package/legacy/locales/kzKZ.js +6 -1
- package/legacy/locales/mk.js +6 -1
- package/legacy/locales/nbNO.js +8 -3
- package/legacy/locales/nlNL.js +8 -3
- package/legacy/locales/plPL.js +8 -3
- package/legacy/locales/ptBR.js +6 -1
- package/legacy/locales/roRO.js +6 -1
- package/legacy/locales/ruRU.js +8 -3
- package/legacy/locales/skSK.js +8 -3
- package/legacy/locales/svSE.js +8 -3
- package/legacy/locales/trTR.js +8 -3
- package/legacy/locales/ukUA.js +8 -3
- package/legacy/locales/urPK.js +6 -1
- package/legacy/locales/viVN.js +8 -3
- package/legacy/locales/zhCN.js +6 -1
- package/legacy/locales/zhHK.js +6 -1
- package/locales/beBY.d.ts +4 -0
- package/locales/beBY.js +8 -3
- package/locales/caES.d.ts +4 -0
- package/locales/caES.js +7 -2
- package/locales/csCZ.d.ts +4 -0
- package/locales/csCZ.js +8 -3
- package/locales/daDK.d.ts +4 -0
- package/locales/daDK.js +8 -3
- package/locales/deDE.d.ts +4 -0
- package/locales/deDE.js +6 -1
- package/locales/elGR.d.ts +4 -0
- package/locales/elGR.js +8 -3
- package/locales/enUS.d.ts +4 -0
- package/locales/enUS.js +7 -3
- package/locales/esES.d.ts +4 -0
- package/locales/esES.js +8 -3
- package/locales/eu.d.ts +4 -0
- package/locales/eu.js +6 -1
- package/locales/faIR.d.ts +4 -0
- package/locales/faIR.js +6 -1
- package/locales/fiFI.d.ts +4 -0
- package/locales/fiFI.js +8 -3
- package/locales/frFR.d.ts +4 -0
- package/locales/frFR.js +6 -1
- package/locales/heIL.d.ts +4 -0
- package/locales/heIL.js +6 -1
- package/locales/huHU.d.ts +4 -0
- package/locales/huHU.js +6 -1
- package/locales/isIS.d.ts +4 -0
- package/locales/isIS.js +8 -3
- package/locales/itIT.d.ts +4 -0
- package/locales/itIT.js +8 -3
- package/locales/jaJP.d.ts +4 -0
- package/locales/jaJP.js +6 -1
- package/locales/koKR.d.ts +4 -0
- package/locales/koKR.js +6 -1
- package/locales/kzKZ.d.ts +4 -0
- package/locales/kzKZ.js +6 -1
- package/locales/mk.d.ts +4 -0
- package/locales/mk.js +6 -1
- package/locales/nbNO.d.ts +4 -0
- package/locales/nbNO.js +8 -3
- package/locales/nlNL.d.ts +4 -0
- package/locales/nlNL.js +8 -3
- package/locales/plPL.d.ts +4 -0
- package/locales/plPL.js +8 -3
- package/locales/ptBR.d.ts +4 -0
- package/locales/ptBR.js +6 -1
- package/locales/roRO.d.ts +4 -0
- package/locales/roRO.js +6 -1
- package/locales/ruRU.d.ts +4 -0
- package/locales/ruRU.js +8 -3
- package/locales/skSK.d.ts +4 -0
- package/locales/skSK.js +8 -3
- package/locales/svSE.d.ts +4 -0
- package/locales/svSE.js +8 -3
- package/locales/trTR.d.ts +4 -0
- package/locales/trTR.js +8 -3
- package/locales/ukUA.d.ts +4 -0
- package/locales/ukUA.js +8 -3
- package/locales/urPK.d.ts +4 -0
- package/locales/urPK.js +6 -1
- package/locales/utils/getPickersLocalization.d.ts +4 -0
- package/locales/utils/pickersLocaleTextApi.d.ts +4 -0
- package/locales/viVN.d.ts +4 -0
- package/locales/viVN.js +8 -3
- package/locales/zhCN.d.ts +4 -0
- package/locales/zhCN.js +6 -1
- package/locales/zhHK.d.ts +4 -0
- package/locales/zhHK.js +6 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +3 -11
- package/modern/DatePicker/DatePicker.js +0 -3
- package/modern/DatePicker/DatePickerToolbar.js +0 -3
- package/modern/DateTimePicker/DateTimePicker.js +0 -3
- package/modern/DateTimePicker/DateTimePickerTabs.js +7 -4
- package/modern/DateTimePicker/DateTimePickerToolbar.js +33 -20
- package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/modern/MobileDatePicker/MobileDatePicker.js +0 -3
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
- package/modern/MobileTimePicker/MobileTimePicker.js +0 -3
- package/modern/MonthCalendar/MonthCalendar.js +0 -3
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/modern/PickersLayout/pickersLayoutClasses.js +3 -2
- package/modern/PickersLayout/usePickerLayout.js +2 -1
- package/modern/PickersSectionList/PickersSectionList.js +6 -1
- package/modern/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +98 -25
- package/modern/PickersTextField/PickersFilledInput/index.js +2 -0
- package/modern/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
- package/modern/PickersTextField/PickersInput/PickersInput.js +196 -0
- package/modern/PickersTextField/PickersInput/index.js +2 -0
- package/modern/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
- package/modern/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
- package/modern/PickersTextField/PickersInputBase/index.js +2 -0
- package/modern/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
- package/{internals/components/PickersInput → modern/PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +190 -0
- package/modern/PickersTextField/PickersOutlinedInput/index.js +2 -0
- package/modern/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
- package/modern/PickersTextField/PickersTextField.js +258 -0
- package/modern/PickersTextField/index.js +6 -0
- package/modern/StaticDatePicker/StaticDatePicker.js +0 -3
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/modern/StaticTimePicker/StaticTimePicker.js +0 -3
- package/modern/TimeClock/TimeClock.js +3 -3
- package/modern/TimePicker/TimePicker.js +0 -3
- package/modern/TimePicker/TimePickerToolbar.js +0 -3
- package/modern/YearCalendar/YearCalendar.js +0 -3
- package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
- package/modern/index.js +3 -2
- package/modern/internals/hooks/useField/useField.js +5 -3
- package/modern/internals/hooks/useField/useField.utils.js +68 -21
- package/modern/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
- package/modern/internals/hooks/useField/useFieldState.js +9 -7
- package/modern/internals/hooks/usePicker/usePicker.js +4 -2
- package/modern/internals/hooks/usePicker/usePickerViews.js +8 -3
- package/modern/internals/index.js +2 -2
- package/modern/internals/utils/valueManagers.js +2 -2
- package/modern/locales/beBY.js +8 -3
- package/modern/locales/caES.js +7 -2
- package/modern/locales/csCZ.js +8 -3
- package/modern/locales/daDK.js +8 -3
- package/modern/locales/deDE.js +6 -1
- package/modern/locales/elGR.js +8 -3
- package/modern/locales/enUS.js +7 -3
- package/modern/locales/esES.js +8 -3
- package/modern/locales/eu.js +6 -1
- package/modern/locales/faIR.js +6 -1
- package/modern/locales/fiFI.js +8 -3
- package/modern/locales/frFR.js +6 -1
- package/modern/locales/heIL.js +6 -1
- package/modern/locales/huHU.js +6 -1
- package/modern/locales/isIS.js +8 -3
- package/modern/locales/itIT.js +8 -3
- package/modern/locales/jaJP.js +6 -1
- package/modern/locales/koKR.js +6 -1
- package/modern/locales/kzKZ.js +6 -1
- package/modern/locales/mk.js +6 -1
- package/modern/locales/nbNO.js +8 -3
- package/modern/locales/nlNL.js +8 -3
- package/modern/locales/plPL.js +8 -3
- package/modern/locales/ptBR.js +6 -1
- package/modern/locales/roRO.js +6 -1
- package/modern/locales/ruRU.js +8 -3
- package/modern/locales/skSK.js +8 -3
- package/modern/locales/svSE.js +8 -3
- package/modern/locales/trTR.js +8 -3
- package/modern/locales/ukUA.js +8 -3
- package/modern/locales/urPK.js +6 -1
- package/modern/locales/viVN.js +8 -3
- package/modern/locales/zhCN.js +6 -1
- package/modern/locales/zhHK.js +6 -1
- package/node/AdapterLuxon/AdapterLuxon.js +3 -11
- package/node/DatePicker/DatePicker.js +0 -3
- package/node/DatePicker/DatePickerToolbar.js +0 -3
- package/node/DateTimePicker/DateTimePicker.js +0 -3
- package/node/DateTimePicker/DateTimePickerTabs.js +8 -5
- package/node/DateTimePicker/DateTimePickerToolbar.js +34 -21
- package/node/DesktopDatePicker/DesktopDatePicker.js +0 -3
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
- package/node/DesktopTimePicker/DesktopTimePicker.js +0 -3
- package/node/MobileDatePicker/MobileDatePicker.js +0 -3
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
- package/node/MobileTimePicker/MobileTimePicker.js +0 -3
- package/node/MonthCalendar/MonthCalendar.js +0 -3
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
- package/node/PickersLayout/pickersLayoutClasses.js +5 -3
- package/node/PickersLayout/usePickerLayout.js +2 -1
- package/node/PickersSectionList/PickersSectionList.js +6 -1
- package/node/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +102 -30
- package/node/PickersTextField/PickersFilledInput/index.js +25 -0
- package/node/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +16 -0
- package/node/PickersTextField/PickersInput/PickersInput.js +204 -0
- package/node/{internals/components → PickersTextField}/PickersInput/index.js +0 -7
- package/node/PickersTextField/PickersInput/pickersInputClasses.js +16 -0
- package/node/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +105 -27
- package/node/PickersTextField/PickersInputBase/index.js +25 -0
- package/node/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +14 -0
- package/node/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +197 -0
- package/node/PickersTextField/PickersOutlinedInput/index.js +25 -0
- package/node/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +16 -0
- package/node/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js +128 -9
- package/node/PickersTextField/index.js +78 -0
- package/node/StaticDatePicker/StaticDatePicker.js +0 -3
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
- package/node/StaticTimePicker/StaticTimePicker.js +0 -3
- package/node/TimeClock/TimeClock.js +3 -3
- package/node/TimePicker/TimePicker.js +0 -3
- package/node/TimePicker/TimePickerToolbar.js +0 -3
- package/node/YearCalendar/YearCalendar.js +0 -3
- package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
- package/node/index.js +17 -5
- package/node/internals/hooks/useField/useField.js +5 -3
- package/node/internals/hooks/useField/useField.utils.js +73 -22
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +11 -7
- package/node/internals/hooks/useField/useFieldState.js +8 -6
- package/node/internals/hooks/usePicker/usePicker.js +4 -2
- package/node/internals/hooks/usePicker/usePickerViews.js +8 -3
- package/node/internals/index.js +12 -0
- package/node/internals/utils/valueManagers.js +2 -2
- package/node/locales/beBY.js +8 -3
- package/node/locales/caES.js +7 -2
- package/node/locales/csCZ.js +8 -3
- package/node/locales/daDK.js +8 -3
- package/node/locales/deDE.js +6 -1
- package/node/locales/elGR.js +8 -3
- package/node/locales/enUS.js +7 -3
- package/node/locales/esES.js +8 -3
- package/node/locales/eu.js +6 -1
- package/node/locales/faIR.js +6 -1
- package/node/locales/fiFI.js +8 -3
- package/node/locales/frFR.js +6 -1
- package/node/locales/heIL.js +6 -1
- package/node/locales/huHU.js +6 -1
- package/node/locales/isIS.js +8 -3
- package/node/locales/itIT.js +8 -3
- package/node/locales/jaJP.js +6 -1
- package/node/locales/koKR.js +6 -1
- package/node/locales/kzKZ.js +6 -1
- package/node/locales/mk.js +6 -1
- package/node/locales/nbNO.js +8 -3
- package/node/locales/nlNL.js +8 -3
- package/node/locales/plPL.js +8 -3
- package/node/locales/ptBR.js +6 -1
- package/node/locales/roRO.js +6 -1
- package/node/locales/ruRU.js +8 -3
- package/node/locales/skSK.js +8 -3
- package/node/locales/svSE.js +8 -3
- package/node/locales/trTR.js +8 -3
- package/node/locales/ukUA.js +8 -3
- package/node/locales/urPK.js +6 -1
- package/node/locales/viVN.js +8 -3
- package/node/locales/zhCN.js +6 -1
- package/node/locales/zhHK.js +6 -1
- package/package.json +7 -7
- package/themeAugmentation/components.d.ts +26 -0
- package/themeAugmentation/overrides.d.ts +16 -0
- package/themeAugmentation/props.d.ts +16 -0
- package/timeViewRenderers/timeViewRenderers.d.ts +1 -1
- package/internals/components/PickersInput/PickersFilledInput.d.ts +0 -3
- package/internals/components/PickersInput/PickersInput.d.ts +0 -13
- package/internals/components/PickersInput/PickersOutlinedInput.d.ts +0 -3
- package/internals/components/PickersInput/PickersOutlinedInput.js +0 -117
- package/internals/components/PickersInput/PickersStandardInput.d.ts +0 -3
- package/internals/components/PickersInput/PickersStandardInput.js +0 -123
- package/internals/components/PickersInput/index.js +0 -3
- package/internals/components/PickersInput/pickersInputClasses.d.ts +0 -84
- package/internals/components/PickersInput/pickersInputClasses.js +0 -18
- package/internals/components/PickersTextField/PickersTextField.d.ts +0 -2
- package/internals/components/PickersTextField/PickersTextField.js +0 -138
- package/internals/components/PickersTextField/index.d.ts +0 -1
- package/internals/components/PickersTextField/index.js +0 -1
- package/legacy/internals/components/PickersInput/PickersOutlinedInput.js +0 -110
- package/legacy/internals/components/PickersInput/PickersStandardInput.js +0 -117
- package/legacy/internals/components/PickersInput/index.js +0 -3
- package/legacy/internals/components/PickersInput/pickersInputClasses.js +0 -18
- package/legacy/internals/components/PickersTextField/index.js +0 -1
- package/modern/internals/components/PickersInput/PickersOutlinedInput.js +0 -117
- package/modern/internals/components/PickersInput/PickersStandardInput.js +0 -123
- package/modern/internals/components/PickersInput/index.js +0 -3
- package/modern/internals/components/PickersInput/pickersInputClasses.js +0 -18
- package/modern/internals/components/PickersTextField/PickersTextField.js +0 -138
- package/modern/internals/components/PickersTextField/index.js +0 -1
- package/node/internals/components/PickersInput/PickersOutlinedInput.js +0 -125
- package/node/internals/components/PickersInput/PickersStandardInput.js +0 -132
- package/node/internals/components/PickersInput/pickersInputClasses.js +0 -29
- package/node/internals/components/PickersTextField/index.js +0 -12
- /package/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
- /package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
- /package/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.d.ts +0 -0
- /package/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
- /package/legacy/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
- /package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
- /package/legacy/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
- /package/modern/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
- /package/modern/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
- /package/modern/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
- /package/node/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
- /package/node/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
- /package/node/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
|
@@ -2,19 +2,20 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["elements", "areAllSectionsEmpty", "defaultValue", "label", "value", "onChange", "id", "autoFocus", "endAdornment", "startAdornment", "renderSuffix", "slots", "contentEditable", "tabIndex", "onInput", "onPaste", "onKeyDown", "fullWidth", "inputProps", "inputRef", "sectionListRef"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
5
6
|
import { useFormControl } from '@mui/material/FormControl';
|
|
6
|
-
import { styled } from '@mui/material/styles';
|
|
7
|
+
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
8
|
import useForkRef from '@mui/utils/useForkRef';
|
|
8
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
10
|
import capitalize from '@mui/utils/capitalize';
|
|
10
11
|
import visuallyHidden from '@mui/utils/visuallyHidden';
|
|
11
|
-
import {
|
|
12
|
-
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';
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
16
|
const round = value => Math.round(value * 1e5) / 1e5;
|
|
16
|
-
export const
|
|
17
|
-
name: '
|
|
17
|
+
export const PickersInputBaseRoot = styled('div', {
|
|
18
|
+
name: 'MuiPickersInputBase',
|
|
18
19
|
slot: 'Root',
|
|
19
20
|
overridesResolver: (props, styles) => styles.root
|
|
20
21
|
})(({
|
|
@@ -34,8 +35,8 @@ export const PickersInputRoot = styled('div', {
|
|
|
34
35
|
}, ownerState.fullWidth && {
|
|
35
36
|
width: '100%'
|
|
36
37
|
}));
|
|
37
|
-
export const
|
|
38
|
-
name: '
|
|
38
|
+
export const PickersInputBaseSectionsContainer = styled(PickersSectionListRoot, {
|
|
39
|
+
name: 'MuiPickersInputBase',
|
|
39
40
|
slot: 'SectionsContainer',
|
|
40
41
|
overridesResolver: (props, styles) => styles.sectionsContainer
|
|
41
42
|
})(({
|
|
@@ -68,8 +69,8 @@ export const PickersInputSectionsContainer = styled(PickersSectionListRoot, {
|
|
|
68
69
|
}), ownerState.label != null && {
|
|
69
70
|
opacity: 0
|
|
70
71
|
})));
|
|
71
|
-
const
|
|
72
|
-
name: '
|
|
72
|
+
const PickersInputBaseSection = styled(PickersSectionListSection, {
|
|
73
|
+
name: 'MuiPickersInputBase',
|
|
73
74
|
slot: 'Section',
|
|
74
75
|
overridesResolver: (props, styles) => styles.section
|
|
75
76
|
})(({
|
|
@@ -82,8 +83,8 @@ const PickersInputSection = styled(PickersSectionListSection, {
|
|
|
82
83
|
// 23px
|
|
83
84
|
display: 'flex'
|
|
84
85
|
}));
|
|
85
|
-
const
|
|
86
|
-
name: '
|
|
86
|
+
const PickersInputBaseSectionContent = styled(PickersSectionListSectionContent, {
|
|
87
|
+
name: 'MuiPickersInputBase',
|
|
87
88
|
slot: 'SectionContent',
|
|
88
89
|
overridesResolver: (props, styles) => styles.content
|
|
89
90
|
})(({
|
|
@@ -96,16 +97,16 @@ const PickersInputSectionContent = styled(PickersSectionListSectionContent, {
|
|
|
96
97
|
width: 'fit-content',
|
|
97
98
|
outline: 'none'
|
|
98
99
|
}));
|
|
99
|
-
const
|
|
100
|
-
name: '
|
|
100
|
+
const PickersInputBaseSectionSeparator = styled(PickersSectionListSectionSeparator, {
|
|
101
|
+
name: 'MuiPickersInputBase',
|
|
101
102
|
slot: 'Separator',
|
|
102
103
|
overridesResolver: (props, styles) => styles.separator
|
|
103
104
|
})(() => ({
|
|
104
105
|
whiteSpace: 'pre',
|
|
105
106
|
letterSpacing: 'inherit'
|
|
106
107
|
}));
|
|
107
|
-
const
|
|
108
|
-
name: '
|
|
108
|
+
const PickersInputBaseInput = styled('input', {
|
|
109
|
+
name: 'MuiPickersInputBase',
|
|
109
110
|
slot: 'Input',
|
|
110
111
|
overridesResolver: (props, styles) => styles.hiddenInput
|
|
111
112
|
})(_extends({}, visuallyHidden));
|
|
@@ -131,9 +132,16 @@ const useUtilityClasses = ownerState => {
|
|
|
131
132
|
sectionBefore: ['sectionBefore'],
|
|
132
133
|
sectionAfter: ['sectionAfter']
|
|
133
134
|
};
|
|
134
|
-
return composeClasses(slots,
|
|
135
|
+
return composeClasses(slots, getPickersInputBaseUtilityClass, classes);
|
|
135
136
|
};
|
|
136
|
-
|
|
137
|
+
/**
|
|
138
|
+
* @ignore - internal component.
|
|
139
|
+
*/
|
|
140
|
+
const PickersInputBase = /*#__PURE__*/React.forwardRef(function PickersInputBase(inProps, ref) {
|
|
141
|
+
const props = useThemeProps({
|
|
142
|
+
props: inProps,
|
|
143
|
+
name: 'MuiPickersInputBase'
|
|
144
|
+
});
|
|
137
145
|
const {
|
|
138
146
|
elements,
|
|
139
147
|
areAllSectionsEmpty,
|
|
@@ -159,7 +167,7 @@ export const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(
|
|
|
159
167
|
const handleInputRef = useForkRef(inputProps?.ref, inputRef);
|
|
160
168
|
const muiFormControl = useFormControl();
|
|
161
169
|
if (!muiFormControl) {
|
|
162
|
-
throw new Error('MUI X:
|
|
170
|
+
throw new Error('MUI X: PickersInputBase should always be used inside a PickersTextField component');
|
|
163
171
|
}
|
|
164
172
|
const handleInputFocus = event => {
|
|
165
173
|
// Fix a bug with IE11 where the focus/blur events are triggered
|
|
@@ -187,8 +195,8 @@ export const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(
|
|
|
187
195
|
}, [muiFormControl, areAllSectionsEmpty]);
|
|
188
196
|
const ownerState = _extends({}, props, muiFormControl);
|
|
189
197
|
const classes = useUtilityClasses(ownerState);
|
|
190
|
-
const InputRoot = slots?.root ||
|
|
191
|
-
const InputSectionsContainer = slots?.input ||
|
|
198
|
+
const InputRoot = slots?.root || PickersInputBaseRoot;
|
|
199
|
+
const InputSectionsContainer = slots?.input || PickersInputBaseSectionsContainer;
|
|
192
200
|
return /*#__PURE__*/_jsxs(InputRoot, _extends({}, other, {
|
|
193
201
|
className: classes.root,
|
|
194
202
|
ownerState: ownerState,
|
|
@@ -207,24 +215,24 @@ export const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(
|
|
|
207
215
|
onKeyDown: onKeyDown,
|
|
208
216
|
slots: {
|
|
209
217
|
root: InputSectionsContainer,
|
|
210
|
-
section:
|
|
211
|
-
sectionContent:
|
|
212
|
-
sectionSeparator:
|
|
218
|
+
section: PickersInputBaseSection,
|
|
219
|
+
sectionContent: PickersInputBaseSectionContent,
|
|
220
|
+
sectionSeparator: PickersInputBaseSectionSeparator
|
|
213
221
|
},
|
|
214
222
|
slotProps: {
|
|
215
223
|
root: {
|
|
216
224
|
ownerState
|
|
217
225
|
},
|
|
218
226
|
sectionContent: {
|
|
219
|
-
className:
|
|
227
|
+
className: pickersInputBaseClasses.sectionContent
|
|
220
228
|
},
|
|
221
229
|
sectionSeparator: ({
|
|
222
230
|
position
|
|
223
231
|
}) => ({
|
|
224
|
-
className: position === 'before' ?
|
|
232
|
+
className: position === 'before' ? pickersInputBaseClasses.sectionBefore : pickersInputBaseClasses.sectionAfter
|
|
225
233
|
})
|
|
226
234
|
}
|
|
227
|
-
}), endAdornment, renderSuffix ? renderSuffix(_extends({}, muiFormControl)) : null, /*#__PURE__*/_jsx(
|
|
235
|
+
}), endAdornment, renderSuffix ? renderSuffix(_extends({}, muiFormControl)) : null, /*#__PURE__*/_jsx(PickersInputBaseInput, _extends({
|
|
228
236
|
className: classes.input,
|
|
229
237
|
value: value,
|
|
230
238
|
onChange: onChange,
|
|
@@ -236,4 +244,75 @@ export const PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(
|
|
|
236
244
|
}))]
|
|
237
245
|
}));
|
|
238
246
|
});
|
|
239
|
-
|
|
247
|
+
process.env.NODE_ENV !== "production" ? PickersInputBase.propTypes = {
|
|
248
|
+
// ----------------------------- Warning --------------------------------
|
|
249
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
250
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
251
|
+
// ----------------------------------------------------------------------
|
|
252
|
+
/**
|
|
253
|
+
* Is `true` if the current values equals the empty value.
|
|
254
|
+
* For a single item value, it means that `value === null`
|
|
255
|
+
* For a range value, it means that `value === [null, null]`
|
|
256
|
+
*/
|
|
257
|
+
areAllSectionsEmpty: PropTypes.bool.isRequired,
|
|
258
|
+
className: PropTypes.string,
|
|
259
|
+
/**
|
|
260
|
+
* The component used for the root node.
|
|
261
|
+
* Either a string to use a HTML element or a component.
|
|
262
|
+
*/
|
|
263
|
+
component: PropTypes.elementType,
|
|
264
|
+
/**
|
|
265
|
+
* If true, the whole element is editable.
|
|
266
|
+
* Useful when all the sections are selected.
|
|
267
|
+
*/
|
|
268
|
+
contentEditable: PropTypes.bool.isRequired,
|
|
269
|
+
/**
|
|
270
|
+
* The elements to render.
|
|
271
|
+
* Each element contains the prop to edit a section of the value.
|
|
272
|
+
*/
|
|
273
|
+
elements: PropTypes.arrayOf(PropTypes.shape({
|
|
274
|
+
after: PropTypes.object.isRequired,
|
|
275
|
+
before: PropTypes.object.isRequired,
|
|
276
|
+
container: PropTypes.object.isRequired,
|
|
277
|
+
content: PropTypes.object.isRequired
|
|
278
|
+
})).isRequired,
|
|
279
|
+
endAdornment: PropTypes.node,
|
|
280
|
+
fullWidth: PropTypes.bool,
|
|
281
|
+
id: PropTypes.string,
|
|
282
|
+
inputProps: PropTypes.object,
|
|
283
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
284
|
+
current: PropTypes.object
|
|
285
|
+
})]),
|
|
286
|
+
label: PropTypes.node,
|
|
287
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
288
|
+
onChange: PropTypes.func.isRequired,
|
|
289
|
+
onClick: PropTypes.func.isRequired,
|
|
290
|
+
onInput: PropTypes.func.isRequired,
|
|
291
|
+
onKeyDown: PropTypes.func.isRequired,
|
|
292
|
+
onPaste: PropTypes.func.isRequired,
|
|
293
|
+
ownerState: PropTypes.any,
|
|
294
|
+
readOnly: PropTypes.bool,
|
|
295
|
+
renderSuffix: PropTypes.func,
|
|
296
|
+
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
297
|
+
current: PropTypes.shape({
|
|
298
|
+
getRoot: PropTypes.func.isRequired,
|
|
299
|
+
getSectionContainer: PropTypes.func.isRequired,
|
|
300
|
+
getSectionContent: PropTypes.func.isRequired,
|
|
301
|
+
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
|
302
|
+
})
|
|
303
|
+
})]),
|
|
304
|
+
/**
|
|
305
|
+
* The components used for each slot inside.
|
|
306
|
+
*
|
|
307
|
+
* @default {}
|
|
308
|
+
*/
|
|
309
|
+
slots: PropTypes.object,
|
|
310
|
+
startAdornment: PropTypes.node,
|
|
311
|
+
style: PropTypes.object,
|
|
312
|
+
/**
|
|
313
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
314
|
+
*/
|
|
315
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
316
|
+
value: PropTypes.string.isRequired
|
|
317
|
+
} : void 0;
|
|
318
|
+
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 const pickersInputBaseClasses = generateUtilityClasses('MuiPickersInputBase', ['root', 'focused', 'disabled', 'error', 'notchedOutline', 'sectionContent', 'sectionBefore', 'sectionAfter', 'adornedStart', 'adornedEnd', 'input']);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "className", "label"];
|
|
3
|
+
const _excluded = ["children", "className", "label", "notched", "shrink"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -82,6 +82,10 @@ const OutlineLegend = styled('legend')(({
|
|
|
82
82
|
delay: 50
|
|
83
83
|
})
|
|
84
84
|
})));
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @ignore - internal component.
|
|
88
|
+
*/
|
|
85
89
|
export default function Outline(props) {
|
|
86
90
|
const {
|
|
87
91
|
className,
|
|
@@ -0,0 +1,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?.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?.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,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']));
|