@mui/x-date-pickers 9.6.0 → 9.7.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/AdapterDateFns/AdapterDateFns.d.mts +2 -2
- package/AdapterDateFns/AdapterDateFns.d.ts +2 -2
- package/AdapterDateFnsBase/AdapterDateFnsBase.d.mts +2 -2
- package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +2 -2
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.mts +2 -2
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +2 -2
- package/AdapterDateFnsJalaliV2/AdapterDateFnsJalaliV2.d.mts +1 -1
- package/AdapterDateFnsJalaliV2/AdapterDateFnsJalaliV2.d.ts +1 -1
- package/AdapterDateFnsV2/AdapterDateFnsV2.d.mts +1 -1
- package/AdapterDateFnsV2/AdapterDateFnsV2.d.ts +1 -1
- package/AdapterDayjs/AdapterDayjs.d.mts +29 -29
- package/AdapterDayjs/AdapterDayjs.d.ts +29 -29
- package/AdapterDayjs/AdapterDayjs.mjs +1 -0
- package/AdapterDayjsBuddhist/AdapterDayjsBuddhist.d.mts +4 -4
- package/AdapterDayjsBuddhist/AdapterDayjsBuddhist.d.ts +4 -4
- package/AdapterDayjsBuddhist/AdapterDayjsBuddhist.mjs +1 -0
- package/AdapterLuxon/AdapterLuxon.d.mts +1 -1
- package/AdapterLuxon/AdapterLuxon.d.ts +1 -1
- package/AdapterMoment/AdapterMoment.d.mts +29 -28
- package/AdapterMoment/AdapterMoment.d.ts +29 -28
- package/AdapterMomentHijri/AdapterMomentHijri.d.mts +14 -13
- package/AdapterMomentHijri/AdapterMomentHijri.d.ts +14 -13
- package/AdapterMomentHijri/AdapterMomentHijri.mjs +1 -0
- package/AdapterMomentJalaali/AdapterMomentJalaali.d.mts +13 -12
- package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +13 -12
- package/AdapterMomentJalaali/AdapterMomentJalaali.mjs +1 -0
- package/CHANGELOG.md +111 -1
- package/DateCalendar/DateCalendar.d.mts +1 -1
- package/DateCalendar/DateCalendar.d.ts +1 -1
- package/DateCalendar/DateCalendar.types.d.mts +16 -16
- package/DateCalendar/DateCalendar.types.d.ts +16 -16
- package/DateCalendar/DayCalendar.d.mts +9 -9
- package/DateCalendar/DayCalendar.d.ts +9 -9
- package/DateCalendar/PickersFadeTransitionGroup.d.mts +1 -1
- package/DateCalendar/PickersFadeTransitionGroup.d.ts +1 -1
- package/DateCalendar/PickersSlideTransition.d.mts +3 -3
- package/DateCalendar/PickersSlideTransition.d.ts +3 -3
- package/DateCalendar/useCalendarState.d.mts +3 -3
- package/DateCalendar/useCalendarState.d.ts +3 -3
- package/DateCalendar/useIsDateDisabled.d.mts +3 -3
- package/DateCalendar/useIsDateDisabled.d.ts +3 -3
- package/DateField/DateField.d.mts +1 -1
- package/DateField/DateField.d.ts +1 -1
- package/DateField/DateField.js +1 -0
- package/DateField/DateField.mjs +1 -0
- package/DateField/DateField.types.d.mts +6 -6
- package/DateField/DateField.types.d.ts +6 -6
- package/DateField/useDateField.d.mts +1 -1
- package/DateField/useDateField.d.ts +1 -1
- package/DatePicker/DatePicker.d.mts +1 -1
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.types.d.mts +4 -4
- package/DatePicker/DatePicker.types.d.ts +4 -4
- package/DatePicker/DatePickerToolbar.d.mts +2 -2
- package/DatePicker/DatePickerToolbar.d.ts +2 -2
- package/DatePicker/shared.d.mts +10 -10
- package/DatePicker/shared.d.ts +10 -10
- package/DateTimeField/DateTimeField.d.mts +1 -1
- package/DateTimeField/DateTimeField.d.ts +1 -1
- package/DateTimeField/DateTimeField.js +1 -0
- package/DateTimeField/DateTimeField.mjs +1 -0
- package/DateTimeField/DateTimeField.types.d.mts +7 -7
- package/DateTimeField/DateTimeField.types.d.ts +7 -7
- package/DateTimeField/useDateTimeField.d.mts +1 -1
- package/DateTimeField/useDateTimeField.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.d.mts +1 -1
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.types.d.mts +5 -5
- package/DateTimePicker/DateTimePicker.types.d.ts +5 -5
- package/DateTimePicker/DateTimePickerTabs.d.mts +2 -2
- package/DateTimePicker/DateTimePickerTabs.d.ts +2 -2
- package/DateTimePicker/DateTimePickerToolbar.d.mts +5 -5
- package/DateTimePicker/DateTimePickerToolbar.d.ts +5 -5
- package/DateTimePicker/shared.d.mts +15 -15
- package/DateTimePicker/shared.d.ts +15 -15
- package/DayCalendarSkeleton/DayCalendarSkeleton.d.mts +3 -3
- package/DayCalendarSkeleton/DayCalendarSkeleton.d.ts +3 -3
- package/DesktopDatePicker/DesktopDatePicker.d.mts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.types.d.mts +4 -4
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +4 -4
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.mts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.mts +6 -6
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +6 -6
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.mts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +2 -2
- package/DesktopTimePicker/DesktopTimePicker.d.mts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.types.d.mts +8 -8
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +8 -8
- package/DigitalClock/DigitalClock.d.mts +1 -1
- package/DigitalClock/DigitalClock.d.ts +1 -1
- package/DigitalClock/DigitalClock.types.d.mts +6 -6
- package/DigitalClock/DigitalClock.types.d.ts +6 -6
- package/LocalizationProvider/LocalizationProvider.d.mts +2 -2
- package/LocalizationProvider/LocalizationProvider.d.ts +2 -2
- package/MobileDatePicker/MobileDatePicker.d.mts +1 -1
- package/MobileDatePicker/MobileDatePicker.d.ts +1 -1
- package/MobileDatePicker/MobileDatePicker.types.d.mts +3 -3
- package/MobileDatePicker/MobileDatePicker.types.d.ts +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.d.mts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.mts +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +3 -3
- package/MobileTimePicker/MobileTimePicker.d.mts +2 -2
- package/MobileTimePicker/MobileTimePicker.d.ts +2 -2
- package/MobileTimePicker/MobileTimePicker.types.d.mts +5 -5
- package/MobileTimePicker/MobileTimePicker.types.d.ts +5 -5
- package/MonthCalendar/MonthCalendar.d.mts +2 -2
- package/MonthCalendar/MonthCalendar.d.ts +2 -2
- package/MonthCalendar/MonthCalendar.types.d.mts +8 -8
- package/MonthCalendar/MonthCalendar.types.d.ts +8 -8
- package/MonthCalendar/MonthCalendarButton.d.mts +2 -2
- package/MonthCalendar/MonthCalendarButton.d.ts +2 -2
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.mts +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.mts +7 -7
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +7 -7
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.mts +2 -2
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +2 -2
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.mts +3 -3
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +3 -3
- package/PickerDay/PickerDay.d.mts +1 -1
- package/PickerDay/PickerDay.d.ts +1 -1
- package/PickerDay/PickerDay.types.d.mts +5 -5
- package/PickerDay/PickerDay.types.d.ts +5 -5
- package/PickersActionBar/PickersActionBar.d.mts +1 -1
- package/PickersActionBar/PickersActionBar.d.ts +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.d.mts +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.d.ts +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.mts +9 -9
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +9 -9
- package/PickersLayout/PickersLayout.d.mts +2 -2
- package/PickersLayout/PickersLayout.d.ts +2 -2
- package/PickersLayout/PickersLayout.types.d.mts +11 -11
- package/PickersLayout/PickersLayout.types.d.ts +11 -11
- package/PickersLayout/usePickerLayout.d.mts +2 -2
- package/PickersLayout/usePickerLayout.d.ts +2 -2
- package/PickersSectionList/PickersSectionList.types.d.mts +4 -4
- package/PickersSectionList/PickersSectionList.types.d.ts +4 -4
- package/PickersShortcuts/PickersShortcuts.d.mts +3 -3
- package/PickersShortcuts/PickersShortcuts.d.ts +3 -3
- package/PickersTextField/PickersFilledInput/PickersFilledInput.d.mts +2 -2
- package/PickersTextField/PickersFilledInput/PickersFilledInput.d.ts +2 -2
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -0
- package/PickersTextField/PickersFilledInput/PickersFilledInput.mjs +1 -0
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.mts +1 -1
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -1
- package/PickersTextField/PickersInput/PickersInput.d.mts +2 -2
- package/PickersTextField/PickersInput/PickersInput.d.ts +2 -2
- package/PickersTextField/PickersInput/PickersInput.js +1 -0
- package/PickersTextField/PickersInput/PickersInput.mjs +1 -0
- package/PickersTextField/PickersInput/pickersInputClasses.d.mts +1 -1
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +1 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.d.mts +2 -2
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +2 -2
- package/PickersTextField/PickersInputBase/PickersInputBase.js +16 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.mjs +16 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.mts +6 -5
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +6 -5
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.d.mts +1 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.d.ts +1 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +12 -8
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.mjs +12 -8
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.mts +1 -1
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +1 -1
- package/PickersTextField/PickersTextField.js +4 -1
- package/PickersTextField/PickersTextField.mjs +4 -1
- package/PickersTextField/PickersTextField.types.d.mts +6 -6
- package/PickersTextField/PickersTextField.types.d.ts +6 -6
- package/PickersTextField/usePickerTextFieldOwnerState.d.mts +1 -1
- package/PickersTextField/usePickerTextFieldOwnerState.d.ts +1 -1
- package/StaticDatePicker/StaticDatePicker.d.mts +1 -1
- package/StaticDatePicker/StaticDatePicker.d.ts +1 -1
- package/StaticDatePicker/StaticDatePicker.types.d.mts +3 -3
- package/StaticDatePicker/StaticDatePicker.types.d.ts +3 -3
- package/StaticDateTimePicker/StaticDateTimePicker.d.mts +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.types.d.mts +3 -3
- package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +3 -3
- package/StaticTimePicker/StaticTimePicker.d.mts +1 -1
- package/StaticTimePicker/StaticTimePicker.d.ts +1 -1
- package/StaticTimePicker/StaticTimePicker.types.d.mts +4 -4
- package/StaticTimePicker/StaticTimePicker.types.d.ts +4 -4
- package/TimeClock/Clock.d.mts +5 -5
- package/TimeClock/Clock.d.ts +5 -5
- package/TimeClock/Clock.js +76 -30
- package/TimeClock/Clock.mjs +76 -30
- package/TimeClock/ClockNumber.d.mts +2 -2
- package/TimeClock/ClockNumber.d.ts +2 -2
- package/TimeClock/ClockNumbers.d.mts +1 -1
- package/TimeClock/ClockNumbers.d.ts +1 -1
- package/TimeClock/ClockPointer.d.mts +2 -2
- package/TimeClock/ClockPointer.d.ts +2 -2
- package/TimeClock/TimeClock.d.mts +1 -1
- package/TimeClock/TimeClock.d.ts +1 -1
- package/TimeClock/TimeClock.types.d.mts +5 -5
- package/TimeClock/TimeClock.types.d.ts +5 -5
- package/TimeField/TimeField.d.mts +1 -1
- package/TimeField/TimeField.d.ts +1 -1
- package/TimeField/TimeField.js +1 -0
- package/TimeField/TimeField.mjs +1 -0
- package/TimeField/TimeField.types.d.mts +7 -7
- package/TimeField/TimeField.types.d.ts +7 -7
- package/TimeField/useTimeField.d.mts +1 -1
- package/TimeField/useTimeField.d.ts +1 -1
- package/TimePicker/TimePicker.d.mts +1 -1
- package/TimePicker/TimePicker.d.ts +1 -1
- package/TimePicker/TimePicker.types.d.mts +4 -4
- package/TimePicker/TimePicker.types.d.ts +4 -4
- package/TimePicker/TimePickerToolbar.d.mts +2 -2
- package/TimePicker/TimePickerToolbar.d.ts +2 -2
- package/TimePicker/shared.d.mts +11 -11
- package/TimePicker/shared.d.ts +11 -11
- package/YearCalendar/YearCalendar.d.mts +1 -1
- package/YearCalendar/YearCalendar.d.ts +1 -1
- package/YearCalendar/YearCalendar.types.d.mts +8 -8
- package/YearCalendar/YearCalendar.types.d.ts +8 -8
- package/YearCalendar/YearCalendarButton.d.mts +2 -2
- package/YearCalendar/YearCalendarButton.d.ts +2 -2
- package/dateViewRenderers/dateViewRenderers.d.mts +3 -3
- package/dateViewRenderers/dateViewRenderers.d.ts +3 -3
- package/hooks/useIsValidValue.d.mts +1 -1
- package/hooks/useIsValidValue.d.ts +1 -1
- package/hooks/usePickerActionsContext.d.mts +2 -2
- package/hooks/usePickerActionsContext.d.ts +2 -2
- package/hooks/usePickerAdapter.d.mts +2 -2
- package/hooks/usePickerAdapter.d.ts +2 -2
- package/hooks/usePickerContext.d.mts +1 -1
- package/hooks/usePickerContext.d.ts +1 -1
- package/hooks/useSplitFieldProps.d.mts +1 -1
- package/hooks/useSplitFieldProps.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/components/PickerFieldUI.d.mts +7 -7
- package/internals/components/PickerFieldUI.d.ts +7 -7
- package/internals/components/PickerPopper/PickerPopper.d.mts +7 -7
- package/internals/components/PickerPopper/PickerPopper.d.ts +7 -7
- package/internals/components/PickerProvider.d.mts +6 -6
- package/internals/components/PickerProvider.d.ts +6 -6
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.d.mts +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.d.ts +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.mts +6 -6
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +6 -6
- package/internals/components/PickersModalDialog.d.mts +3 -3
- package/internals/components/PickersModalDialog.d.ts +3 -3
- package/internals/components/PickersToolbar.d.mts +2 -2
- package/internals/components/PickersToolbar.d.ts +2 -2
- package/internals/components/PickersToolbarButton.d.mts +4 -4
- package/internals/components/PickersToolbarButton.d.ts +4 -4
- package/internals/components/PickersToolbarText.d.mts +2 -2
- package/internals/components/PickersToolbarText.d.ts +2 -2
- package/internals/demo/DemoContainer.d.mts +2 -2
- package/internals/demo/DemoContainer.d.ts +2 -2
- package/internals/hooks/PickerDay.types.d.mts +1 -1
- package/internals/hooks/PickerDay.types.d.ts +1 -1
- package/internals/hooks/date-helpers-hooks.d.mts +3 -3
- package/internals/hooks/date-helpers-hooks.d.ts +3 -3
- package/internals/hooks/useClockReferenceDate.d.mts +2 -2
- package/internals/hooks/useClockReferenceDate.d.ts +2 -2
- package/internals/hooks/useControlledValue.d.mts +2 -3
- package/internals/hooks/useControlledValue.d.ts +2 -3
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.mts +2 -2
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +2 -2
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.mts +10 -10
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +10 -10
- package/internals/hooks/useField/buildSectionsFromFormat.d.mts +2 -2
- package/internals/hooks/useField/buildSectionsFromFormat.d.ts +2 -2
- package/internals/hooks/useField/syncSelectionToDOM.d.mts +3 -3
- package/internals/hooks/useField/syncSelectionToDOM.d.ts +3 -3
- package/internals/hooks/useField/useField.d.mts +2 -2
- package/internals/hooks/useField/useField.d.ts +2 -2
- package/internals/hooks/useField/useField.js +18 -0
- package/internals/hooks/useField/useField.mjs +18 -0
- package/internals/hooks/useField/useField.types.d.mts +5 -4
- package/internals/hooks/useField/useField.types.d.ts +5 -4
- package/internals/hooks/useField/useField.utils.d.mts +3 -4
- package/internals/hooks/useField/useField.utils.d.ts +3 -4
- package/internals/hooks/useField/useField.utils.js +1 -3
- package/internals/hooks/useField/useField.utils.mjs +0 -1
- package/internals/hooks/useField/useFieldCharacterEditing.d.mts +2 -2
- package/internals/hooks/useField/useFieldCharacterEditing.d.ts +2 -2
- package/internals/hooks/useField/useFieldHiddenInputProps.d.mts +2 -2
- package/internals/hooks/useField/useFieldHiddenInputProps.d.ts +2 -2
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.d.mts +1 -1
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.d.ts +1 -1
- package/internals/hooks/useField/useFieldRootProps.d.mts +5 -4
- package/internals/hooks/useField/useFieldRootProps.d.ts +5 -4
- package/internals/hooks/useField/useFieldRootProps.js +95 -8
- package/internals/hooks/useField/useFieldRootProps.mjs +95 -8
- package/internals/hooks/useField/useFieldSectionContainerProps.d.mts +2 -2
- package/internals/hooks/useField/useFieldSectionContainerProps.d.ts +2 -2
- package/internals/hooks/useField/useFieldSectionContainerProps.js +35 -4
- package/internals/hooks/useField/useFieldSectionContainerProps.mjs +34 -4
- package/internals/hooks/useField/useFieldSectionContentProps.d.mts +6 -6
- package/internals/hooks/useField/useFieldSectionContentProps.d.ts +6 -6
- package/internals/hooks/useField/useFieldSectionContentProps.js +3 -1
- package/internals/hooks/useField/useFieldSectionContentProps.mjs +3 -1
- package/internals/hooks/useField/useFieldState.d.mts +3 -3
- package/internals/hooks/useField/useFieldState.d.ts +3 -3
- package/internals/hooks/useFieldOwnerState.d.mts +2 -2
- package/internals/hooks/useFieldOwnerState.d.ts +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.d.mts +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.mts +10 -10
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +10 -10
- package/internals/hooks/useNullableFieldPrivateContext.d.mts +2 -2
- package/internals/hooks/useNullableFieldPrivateContext.d.ts +2 -2
- package/internals/hooks/usePicker/hooks/useOrientation.d.mts +1 -1
- package/internals/hooks/usePicker/hooks/useOrientation.d.ts +1 -1
- package/internals/hooks/usePicker/hooks/useValueAndOpenStates.d.mts +5 -5
- package/internals/hooks/usePicker/hooks/useValueAndOpenStates.d.ts +5 -5
- package/internals/hooks/usePicker/usePicker.d.mts +2 -2
- package/internals/hooks/usePicker/usePicker.d.ts +2 -2
- package/internals/hooks/usePicker/usePicker.types.d.mts +10 -10
- package/internals/hooks/usePicker/usePicker.types.d.ts +10 -10
- package/internals/hooks/usePickerDayOwnerState.d.mts +2 -2
- package/internals/hooks/usePickerDayOwnerState.d.ts +2 -2
- package/internals/hooks/useReduceAnimations.js +4 -1
- package/internals/hooks/useReduceAnimations.mjs +4 -1
- package/internals/hooks/useStaticPicker/useStaticPicker.d.mts +2 -2
- package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +2 -2
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.mts +5 -5
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +5 -5
- package/internals/hooks/useToolbarOwnerState.d.mts +1 -1
- package/internals/hooks/useToolbarOwnerState.d.ts +1 -1
- package/internals/hooks/useUtils.d.mts +1 -1
- package/internals/hooks/useUtils.d.ts +1 -1
- package/internals/hooks/useViews.d.mts +4 -4
- package/internals/hooks/useViews.d.ts +4 -4
- package/internals/models/common.d.mts +1 -1
- package/internals/models/common.d.ts +1 -1
- package/internals/models/fields.d.mts +1 -1
- package/internals/models/fields.d.ts +1 -1
- package/internals/models/helpers.d.mts +2 -2
- package/internals/models/helpers.d.ts +2 -2
- package/internals/models/manager.d.mts +1 -1
- package/internals/models/manager.d.ts +1 -1
- package/internals/models/props/basePickerProps.d.mts +7 -8
- package/internals/models/props/basePickerProps.d.ts +7 -8
- package/internals/models/props/tabs.d.mts +2 -2
- package/internals/models/props/tabs.d.ts +2 -2
- package/internals/models/props/time.d.mts +6 -6
- package/internals/models/props/time.d.ts +6 -6
- package/internals/models/props/toolbar.d.mts +3 -3
- package/internals/models/props/toolbar.d.ts +3 -3
- package/internals/models/value.d.mts +1 -1
- package/internals/models/value.d.ts +1 -1
- package/internals/utils/createNonRangePickerStepNavigation.d.mts +1 -1
- package/internals/utils/createNonRangePickerStepNavigation.d.ts +1 -1
- package/internals/utils/createStepNavigation.d.mts +1 -1
- package/internals/utils/createStepNavigation.d.ts +1 -1
- package/internals/utils/date-time-utils.d.mts +4 -4
- package/internals/utils/date-time-utils.d.ts +4 -4
- package/internals/utils/date-utils.d.mts +2 -2
- package/internals/utils/date-utils.d.ts +2 -2
- package/internals/utils/getDefaultReferenceDate.d.mts +1 -1
- package/internals/utils/getDefaultReferenceDate.d.ts +1 -1
- package/internals/utils/time-utils.d.mts +2 -2
- package/internals/utils/time-utils.d.ts +2 -2
- package/internals/utils/utils.d.mts +3 -3
- package/internals/utils/utils.d.ts +3 -3
- package/internals/utils/valueManagers.d.mts +2 -3
- package/internals/utils/valueManagers.d.ts +2 -3
- package/internals/utils/views.d.mts +1 -1
- package/internals/utils/views.d.ts +1 -1
- package/locales/beBY.d.mts +1 -1
- package/locales/beBY.d.ts +1 -1
- package/locales/bgBG.d.mts +1 -1
- package/locales/bgBG.d.ts +1 -1
- package/locales/bnBD.d.mts +1 -1
- package/locales/bnBD.d.ts +1 -1
- package/locales/caES.d.mts +1 -1
- package/locales/caES.d.ts +1 -1
- package/locales/csCZ.d.mts +1 -1
- package/locales/csCZ.d.ts +1 -1
- package/locales/daDK.d.mts +1 -1
- package/locales/daDK.d.ts +1 -1
- package/locales/deDE.d.mts +1 -1
- package/locales/deDE.d.ts +1 -1
- package/locales/elGR.d.mts +1 -1
- package/locales/elGR.d.ts +1 -1
- package/locales/enUS.d.mts +1 -1
- package/locales/enUS.d.ts +1 -1
- package/locales/esES.d.mts +1 -1
- package/locales/esES.d.ts +1 -1
- package/locales/eu.d.mts +1 -1
- package/locales/eu.d.ts +1 -1
- package/locales/faIR.d.mts +1 -1
- package/locales/faIR.d.ts +1 -1
- package/locales/fiFI.d.mts +1 -1
- package/locales/fiFI.d.ts +1 -1
- package/locales/frFR.d.mts +1 -1
- package/locales/frFR.d.ts +1 -1
- package/locales/heIL.d.mts +1 -1
- package/locales/heIL.d.ts +1 -1
- package/locales/hrHR.d.mts +1 -1
- package/locales/hrHR.d.ts +1 -1
- package/locales/huHU.d.mts +1 -1
- package/locales/huHU.d.ts +1 -1
- package/locales/isIS.d.mts +1 -1
- package/locales/isIS.d.ts +1 -1
- package/locales/itIT.d.mts +1 -1
- package/locales/itIT.d.ts +1 -1
- package/locales/jaJP.d.mts +1 -1
- package/locales/jaJP.d.ts +1 -1
- package/locales/koKR.d.mts +1 -1
- package/locales/koKR.d.ts +1 -1
- package/locales/kzKZ.d.mts +1 -1
- package/locales/kzKZ.d.ts +1 -1
- package/locales/nbNO.d.mts +1 -1
- package/locales/nbNO.d.ts +1 -1
- package/locales/nlNL.d.mts +1 -1
- package/locales/nlNL.d.ts +1 -1
- package/locales/nnNO.d.mts +1 -1
- package/locales/nnNO.d.ts +1 -1
- package/locales/plPL.d.mts +1 -1
- package/locales/plPL.d.ts +1 -1
- package/locales/ptBR.d.mts +1 -1
- package/locales/ptBR.d.ts +1 -1
- package/locales/ptPT.d.mts +1 -1
- package/locales/ptPT.d.ts +1 -1
- package/locales/roRO.d.mts +1 -1
- package/locales/roRO.d.ts +1 -1
- package/locales/ruRU.d.mts +1 -1
- package/locales/ruRU.d.ts +1 -1
- package/locales/skSK.d.mts +1 -1
- package/locales/skSK.d.ts +1 -1
- package/locales/svSE.d.mts +1 -1
- package/locales/svSE.d.ts +1 -1
- package/locales/thTH.d.mts +1 -1
- package/locales/thTH.d.ts +1 -1
- package/locales/trTR.d.mts +1 -1
- package/locales/trTR.d.ts +1 -1
- package/locales/ukUA.d.mts +1 -1
- package/locales/ukUA.d.ts +1 -1
- package/locales/urPK.d.mts +1 -1
- package/locales/urPK.d.ts +1 -1
- package/locales/utils/getPickersLocalization.d.mts +1 -1
- package/locales/utils/getPickersLocalization.d.ts +1 -1
- package/locales/utils/pickersLocaleTextApi.d.mts +2 -2
- package/locales/utils/pickersLocaleTextApi.d.ts +2 -2
- package/locales/viVN.d.mts +1 -1
- package/locales/viVN.d.ts +1 -1
- package/locales/zhCN.d.mts +1 -1
- package/locales/zhCN.d.ts +1 -1
- package/locales/zhHK.d.mts +1 -1
- package/locales/zhHK.d.ts +1 -1
- package/locales/zhTW.d.mts +1 -1
- package/locales/zhTW.d.ts +1 -1
- package/managers/useDateManager.d.mts +4 -4
- package/managers/useDateManager.d.ts +4 -4
- package/managers/useDateTimeManager.d.mts +5 -5
- package/managers/useDateTimeManager.d.ts +5 -5
- package/managers/useTimeManager.d.mts +5 -5
- package/managers/useTimeManager.d.ts +5 -5
- package/models/adapters.d.mts +3 -3
- package/models/adapters.d.ts +3 -3
- package/models/fields.d.mts +4 -4
- package/models/fields.d.ts +4 -4
- package/models/pickers.d.mts +1 -1
- package/models/pickers.d.ts +1 -1
- package/package.json +3 -3
- package/themeAugmentation/components.d.mts +16 -16
- package/themeAugmentation/components.d.ts +16 -16
- package/themeAugmentation/overrides.d.mts +20 -20
- package/themeAugmentation/overrides.d.ts +20 -20
- package/themeAugmentation/props.d.mts +38 -38
- package/themeAugmentation/props.d.ts +38 -38
- package/timeViewRenderers/timeViewRenderers.d.mts +6 -6
- package/timeViewRenderers/timeViewRenderers.d.ts +6 -6
- package/validation/extractValidationProps.d.mts +1 -1
- package/validation/extractValidationProps.d.ts +1 -1
- package/validation/useValidation.d.mts +2 -3
- package/validation/useValidation.d.ts +2 -3
- package/validation/validateDate.d.mts +4 -4
- package/validation/validateDate.d.ts +4 -4
- package/validation/validateDateTime.d.mts +6 -6
- package/validation/validateDateTime.d.ts +6 -6
- package/validation/validateTime.d.mts +4 -4
- package/validation/validateTime.d.ts +4 -4
|
@@ -138,14 +138,22 @@ export function useFieldRootProps(parameters) {
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
const containerClickTimeout = useTimeout();
|
|
141
|
-
const handleClick = useEventCallback(
|
|
141
|
+
const handleClick = useEventCallback(() => {
|
|
142
142
|
if (disabled || !domGetters.isReady()) {
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
|
-
setFocused(true);
|
|
146
145
|
if (parsedSelectedSections === 'all') {
|
|
146
|
+
setFocused(true);
|
|
147
147
|
containerClickTimeout.start(0, () => {
|
|
148
|
-
|
|
148
|
+
// `getSelection`/`getRangeAt` can be unset transiently (e.g. focus
|
|
149
|
+
// moved before this 0-tick callback ran). Fall back to the first
|
|
150
|
+
// section in that case.
|
|
151
|
+
const selection = document.getSelection();
|
|
152
|
+
if (!selection || selection.rangeCount === 0) {
|
|
153
|
+
setSelectedSections(sectionOrder.startIndex);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const cursorPosition = selection.getRangeAt(0).startOffset;
|
|
149
157
|
if (cursorPosition === 0) {
|
|
150
158
|
setSelectedSections(sectionOrder.startIndex);
|
|
151
159
|
return;
|
|
@@ -159,16 +167,70 @@ export function useFieldRootProps(parameters) {
|
|
|
159
167
|
}
|
|
160
168
|
setSelectedSections(sectionIndex - 1);
|
|
161
169
|
});
|
|
162
|
-
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// For trusted pointer input, `handleMouseDown` already ran and set the
|
|
174
|
+
// section. This branch only matters for `click` events that arrive
|
|
175
|
+
// without a preceding `mousedown` (programmatic `element.click()`, some
|
|
176
|
+
// assistive-technology activations, synthetic event sequences in tests).
|
|
177
|
+
// Fall back to the first section so the field doesn't enter a "focused
|
|
178
|
+
// but no active section" state.
|
|
179
|
+
if (!focused) {
|
|
163
180
|
setFocused(true);
|
|
164
|
-
|
|
165
|
-
} else {
|
|
166
|
-
const hasClickedOnASection = domGetters.getRoot().contains(event.target);
|
|
167
|
-
if (!hasClickedOnASection) {
|
|
181
|
+
if (parsedSelectedSections == null) {
|
|
168
182
|
setSelectedSections(sectionOrder.startIndex);
|
|
169
183
|
}
|
|
170
184
|
}
|
|
171
185
|
});
|
|
186
|
+
|
|
187
|
+
// Replaces Chromium's focus delegation with an explicit section focus on
|
|
188
|
+
// every primary mousedown inside the sections container. The CSS gate
|
|
189
|
+
// (`WebkitUserModify: read-only` while not `:focus-within`) can make the
|
|
190
|
+
// section's contenteditable span temporarily non-focusable, in which case
|
|
191
|
+
// Chromium falls back to the sections-container `tabindex=0` and our
|
|
192
|
+
// `handleFocus` then runs the "no active section" fallback, briefly
|
|
193
|
+
// selecting the first section before the click bubble corrects it.
|
|
194
|
+
// Setting the target section here (and letting `syncSelectionToDOM` move
|
|
195
|
+
// focus via `.focus()`, which works even with the user-modify rule
|
|
196
|
+
// active) skips that race entirely.
|
|
197
|
+
const handleMouseDown = useEventCallback(event => {
|
|
198
|
+
if (disabled || !domGetters.isReady() || parsedSelectedSections === 'all') {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (event.button !== 0) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const target = event.target;
|
|
205
|
+
// `sectionListRoot` is the sections container (a descendant of the
|
|
206
|
+
// InputBase root that owns this handler). The guard rejects clicks on
|
|
207
|
+
// sibling adornments (open / clear buttons, etc.) which have their own
|
|
208
|
+
// behavior and must not get intercepted here.
|
|
209
|
+
const sectionListRoot = domGetters.getRoot();
|
|
210
|
+
if (!sectionListRoot.contains(target)) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
// Prefer the visually-containing section (matches Chromium's
|
|
214
|
+
// delegation + section container `onClick`), fall back to the
|
|
215
|
+
// closest-by-distance section for padding / past-last-section clicks.
|
|
216
|
+
const sectionElement = target.closest('[data-sectionindex]');
|
|
217
|
+
const parsedIndex = sectionElement ? Number(sectionElement.dataset.sectionindex) : findClosestSectionIndexToPoint(sectionListRoot, event.clientX);
|
|
218
|
+
// `Number(undefined) === NaN` and `NaN == null === false`, so guard
|
|
219
|
+
// explicitly here even though `data-sectionindex` is set by
|
|
220
|
+
// `useFieldSectionContainerProps` for every section in practice.
|
|
221
|
+
if (parsedIndex == null || !Number.isInteger(parsedIndex)) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
event.preventDefault();
|
|
225
|
+
setFocused(true);
|
|
226
|
+
// `mousedown` is now authoritative for pointer section selection. The
|
|
227
|
+
// section container's own `onClick` deduplicates against the resulting
|
|
228
|
+
// `parsedSelectedSections` on the click bubble (see
|
|
229
|
+
// `useFieldSectionContainerProps`), so we always select here and let that
|
|
230
|
+
// guard absorb the redundant call -- matching the pre-PR
|
|
231
|
+
// `onSelectedSectionsChange` invocation count.
|
|
232
|
+
setSelectedSections(parsedIndex);
|
|
233
|
+
});
|
|
172
234
|
const handleInput = useEventCallback(event => {
|
|
173
235
|
if (!domGetters.isReady() || parsedSelectedSections !== 'all') {
|
|
174
236
|
return;
|
|
@@ -236,6 +298,7 @@ export function useFieldRootProps(parameters) {
|
|
|
236
298
|
onBlur: handleBlur,
|
|
237
299
|
onFocus: handleFocus,
|
|
238
300
|
onClick: handleClick,
|
|
301
|
+
onMouseDown: handleMouseDown,
|
|
239
302
|
onPaste: handlePaste,
|
|
240
303
|
onInput: handleInput,
|
|
241
304
|
// Other
|
|
@@ -243,6 +306,30 @@ export function useFieldRootProps(parameters) {
|
|
|
243
306
|
tabIndex: internalPropsWithDefaults.disabled || parsedSelectedSections === 0 ? -1 : 0 // TODO: Try to set to undefined when there is a section selected.
|
|
244
307
|
};
|
|
245
308
|
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Returns the index of the section whose horizontal center is closest to `clientX`.
|
|
312
|
+
* Returns `null` if the field renders no `[role="spinbutton"]` descendants
|
|
313
|
+
* (defensive — every section content span sets `role="spinbutton"` in practice).
|
|
314
|
+
*/
|
|
315
|
+
function findClosestSectionIndexToPoint(root, clientX) {
|
|
316
|
+
const sections = root.querySelectorAll('[role="spinbutton"]');
|
|
317
|
+
if (sections.length === 0) {
|
|
318
|
+
return null;
|
|
319
|
+
}
|
|
320
|
+
let closestIndex = 0;
|
|
321
|
+
let closestDistance = Infinity;
|
|
322
|
+
for (let i = 0; i < sections.length; i += 1) {
|
|
323
|
+
const rect = sections[i].getBoundingClientRect();
|
|
324
|
+
const center = (rect.left + rect.right) / 2;
|
|
325
|
+
const distance = Math.abs(clientX - center);
|
|
326
|
+
if (distance < closestDistance) {
|
|
327
|
+
closestDistance = distance;
|
|
328
|
+
closestIndex = i;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return closestIndex;
|
|
332
|
+
}
|
|
246
333
|
function getDeltaFromKeyCode(keyCode) {
|
|
247
334
|
switch (keyCode) {
|
|
248
335
|
case 'ArrowUp':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { UseFieldStateReturnValue } from "./useFieldState.mjs";
|
|
3
|
-
import { UseFieldInternalProps } from "./useField.types.mjs";
|
|
2
|
+
import type { UseFieldStateReturnValue } from "./useFieldState.mjs";
|
|
3
|
+
import type { UseFieldInternalProps } from "./useField.types.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Generate the props to pass to the container element of each section of the field.
|
|
6
6
|
* @param {UseFieldSectionContainerPropsParameters} parameters The parameters of the hook.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { UseFieldStateReturnValue } from "./useFieldState.js";
|
|
3
|
-
import { UseFieldInternalProps } from "./useField.types.js";
|
|
2
|
+
import type { UseFieldStateReturnValue } from "./useFieldState.js";
|
|
3
|
+
import type { UseFieldInternalProps } from "./useField.types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Generate the props to pass to the container element of each section of the field.
|
|
6
6
|
* @param {UseFieldSectionContainerPropsParameters} parameters The parameters of the hook.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.useFieldSectionContainerProps = useFieldSectionContainerProps;
|
|
8
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
9
11
|
/**
|
|
10
12
|
* Generate the props to pass to the container element of each section of the field.
|
|
11
13
|
* @param {UseFieldSectionContainerPropsParameters} parameters The parameters of the hook.
|
|
@@ -14,6 +16,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
14
16
|
function useFieldSectionContainerProps(parameters) {
|
|
15
17
|
const {
|
|
16
18
|
stateResponse: {
|
|
19
|
+
// States and derived states
|
|
20
|
+
parsedSelectedSections,
|
|
17
21
|
// Methods to update the states
|
|
18
22
|
setSelectedSections
|
|
19
23
|
},
|
|
@@ -21,16 +25,43 @@ function useFieldSectionContainerProps(parameters) {
|
|
|
21
25
|
disabled = false
|
|
22
26
|
}
|
|
23
27
|
} = parameters;
|
|
24
|
-
|
|
28
|
+
|
|
29
|
+
// A single stable handler shared by every section, rather than a per-index
|
|
30
|
+
// factory. The section index is read from the container's `data-sectionindex`
|
|
31
|
+
// at click time, and `useEventCallback` reads the latest `disabled` /
|
|
32
|
+
// `parsedSelectedSections` / `setSelectedSections` internally -- so none of
|
|
33
|
+
// them sit in a dependency array and the `onClick` identity stays stable
|
|
34
|
+
// across renders (`setSelectedSections` is recreated on every render, which
|
|
35
|
+
// would otherwise churn the handler).
|
|
36
|
+
const handleClick = (0, _useEventCallback.default)(event => {
|
|
25
37
|
// The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.
|
|
26
38
|
// We avoid this by checking if the call to this function is actually intended, or a side effect.
|
|
27
39
|
if (disabled || event.isDefaultPrevented()) {
|
|
28
40
|
return;
|
|
29
41
|
}
|
|
42
|
+
|
|
43
|
+
// `currentTarget` is the section container, which always carries
|
|
44
|
+
// `data-sectionindex` (set below). Guard the parse defensively all the
|
|
45
|
+
// same -- `Number(undefined)` is `NaN`, and `NaN === parsedSelectedSections`
|
|
46
|
+
// is always false, so it would otherwise reach `setSelectedSections(NaN)`.
|
|
47
|
+
const sectionIndex = Number(event.currentTarget.dataset.sectionindex);
|
|
48
|
+
if (!Number.isInteger(sectionIndex)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// For pointer input the `mousedown` handler already selected the section
|
|
53
|
+
// before this click bubbles, so bail to avoid a redundant
|
|
54
|
+
// `onSelectedSectionsChange` invocation. On the non-pointer paths
|
|
55
|
+
// (programmatic `element.click()`, some AT activations) `mousedown`
|
|
56
|
+
// didn't run, so `parsedSelectedSections` won't match yet and selection
|
|
57
|
+
// proceeds normally.
|
|
58
|
+
if (parsedSelectedSections === sectionIndex) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
30
61
|
setSelectedSections(sectionIndex);
|
|
31
|
-
}
|
|
62
|
+
});
|
|
32
63
|
return React.useCallback(sectionIndex => ({
|
|
33
64
|
'data-sectionindex': sectionIndex,
|
|
34
|
-
onClick:
|
|
35
|
-
}), [
|
|
65
|
+
onClick: handleClick
|
|
66
|
+
}), [handleClick]);
|
|
36
67
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import useEventCallback from '@mui/utils/useEventCallback';
|
|
2
3
|
/**
|
|
3
4
|
* Generate the props to pass to the container element of each section of the field.
|
|
4
5
|
* @param {UseFieldSectionContainerPropsParameters} parameters The parameters of the hook.
|
|
@@ -7,6 +8,8 @@ import * as React from 'react';
|
|
|
7
8
|
export function useFieldSectionContainerProps(parameters) {
|
|
8
9
|
const {
|
|
9
10
|
stateResponse: {
|
|
11
|
+
// States and derived states
|
|
12
|
+
parsedSelectedSections,
|
|
10
13
|
// Methods to update the states
|
|
11
14
|
setSelectedSections
|
|
12
15
|
},
|
|
@@ -14,16 +17,43 @@ export function useFieldSectionContainerProps(parameters) {
|
|
|
14
17
|
disabled = false
|
|
15
18
|
}
|
|
16
19
|
} = parameters;
|
|
17
|
-
|
|
20
|
+
|
|
21
|
+
// A single stable handler shared by every section, rather than a per-index
|
|
22
|
+
// factory. The section index is read from the container's `data-sectionindex`
|
|
23
|
+
// at click time, and `useEventCallback` reads the latest `disabled` /
|
|
24
|
+
// `parsedSelectedSections` / `setSelectedSections` internally -- so none of
|
|
25
|
+
// them sit in a dependency array and the `onClick` identity stays stable
|
|
26
|
+
// across renders (`setSelectedSections` is recreated on every render, which
|
|
27
|
+
// would otherwise churn the handler).
|
|
28
|
+
const handleClick = useEventCallback(event => {
|
|
18
29
|
// The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.
|
|
19
30
|
// We avoid this by checking if the call to this function is actually intended, or a side effect.
|
|
20
31
|
if (disabled || event.isDefaultPrevented()) {
|
|
21
32
|
return;
|
|
22
33
|
}
|
|
34
|
+
|
|
35
|
+
// `currentTarget` is the section container, which always carries
|
|
36
|
+
// `data-sectionindex` (set below). Guard the parse defensively all the
|
|
37
|
+
// same -- `Number(undefined)` is `NaN`, and `NaN === parsedSelectedSections`
|
|
38
|
+
// is always false, so it would otherwise reach `setSelectedSections(NaN)`.
|
|
39
|
+
const sectionIndex = Number(event.currentTarget.dataset.sectionindex);
|
|
40
|
+
if (!Number.isInteger(sectionIndex)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// For pointer input the `mousedown` handler already selected the section
|
|
45
|
+
// before this click bubbles, so bail to avoid a redundant
|
|
46
|
+
// `onSelectedSectionsChange` invocation. On the non-pointer paths
|
|
47
|
+
// (programmatic `element.click()`, some AT activations) `mousedown`
|
|
48
|
+
// didn't run, so `parsedSelectedSections` won't match yet and selection
|
|
49
|
+
// proceeds normally.
|
|
50
|
+
if (parsedSelectedSections === sectionIndex) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
23
53
|
setSelectedSections(sectionIndex);
|
|
24
|
-
}
|
|
54
|
+
});
|
|
25
55
|
return React.useCallback(sectionIndex => ({
|
|
26
56
|
'data-sectionindex': sectionIndex,
|
|
27
|
-
onClick:
|
|
28
|
-
}), [
|
|
57
|
+
onClick: handleClick
|
|
58
|
+
}), [handleClick]);
|
|
29
59
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { UseFieldStateReturnValue } from "./useFieldState.mjs";
|
|
2
|
-
import { FieldSection } from "../../../models/index.mjs";
|
|
3
|
-
import { UseFieldDOMGetters, UseFieldInternalProps } from "./useField.types.mjs";
|
|
4
|
-
import { UseFieldCharacterEditingReturnValue } from "./useFieldCharacterEditing.mjs";
|
|
5
|
-
import { PickerAnyManager } from "../../models/index.mjs";
|
|
6
|
-
import { PickersSectionElement } from "../../../PickersSectionList/index.mjs";
|
|
1
|
+
import type { UseFieldStateReturnValue } from "./useFieldState.mjs";
|
|
2
|
+
import type { FieldSection } from "../../../models/index.mjs";
|
|
3
|
+
import type { UseFieldDOMGetters, UseFieldInternalProps } from "./useField.types.mjs";
|
|
4
|
+
import type { UseFieldCharacterEditingReturnValue } from "./useFieldCharacterEditing.mjs";
|
|
5
|
+
import type { PickerAnyManager } from "../../models/index.mjs";
|
|
6
|
+
import type { PickersSectionElement } from "../../../PickersSectionList/index.mjs";
|
|
7
7
|
/**
|
|
8
8
|
* Generate the props to pass to the content element of each section of the field.
|
|
9
9
|
* @param {UseFieldSectionContentPropsParameters} parameters The parameters of the hook.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { UseFieldStateReturnValue } from "./useFieldState.js";
|
|
2
|
-
import { FieldSection } from "../../../models/index.js";
|
|
3
|
-
import { UseFieldDOMGetters, UseFieldInternalProps } from "./useField.types.js";
|
|
4
|
-
import { UseFieldCharacterEditingReturnValue } from "./useFieldCharacterEditing.js";
|
|
5
|
-
import { PickerAnyManager } from "../../models/index.js";
|
|
6
|
-
import { PickersSectionElement } from "../../../PickersSectionList/index.js";
|
|
1
|
+
import type { UseFieldStateReturnValue } from "./useFieldState.js";
|
|
2
|
+
import type { FieldSection } from "../../../models/index.js";
|
|
3
|
+
import type { UseFieldDOMGetters, UseFieldInternalProps } from "./useField.types.js";
|
|
4
|
+
import type { UseFieldCharacterEditingReturnValue } from "./useFieldCharacterEditing.js";
|
|
5
|
+
import type { PickerAnyManager } from "../../models/index.js";
|
|
6
|
+
import type { PickersSectionElement } from "../../../PickersSectionList/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* Generate the props to pass to the content element of each section of the field.
|
|
9
9
|
* @param {UseFieldSectionContentPropsParameters} parameters The parameters of the hook.
|
|
@@ -190,7 +190,9 @@ function getSectionValueText(section, adapter) {
|
|
|
190
190
|
case 'day':
|
|
191
191
|
if (section.contentType === 'digit') {
|
|
192
192
|
const dateWithDay = adapter.setDate(adapter.startOfYear(adapter.date()), Number(section.value));
|
|
193
|
-
|
|
193
|
+
// Announce a cardinal day (e.g. "2"), not a locale ordinal (e.g. French "2ème").
|
|
194
|
+
// See https://github.com/mui/mui-x/issues/22915.
|
|
195
|
+
return adapter.isValid(dateWithDay) ? adapter.format(dateWithDay, 'dayOfMonth') : '';
|
|
194
196
|
}
|
|
195
197
|
return section.value;
|
|
196
198
|
case 'weekDay':
|
|
@@ -182,7 +182,9 @@ function getSectionValueText(section, adapter) {
|
|
|
182
182
|
case 'day':
|
|
183
183
|
if (section.contentType === 'digit') {
|
|
184
184
|
const dateWithDay = adapter.setDate(adapter.startOfYear(adapter.date()), Number(section.value));
|
|
185
|
-
|
|
185
|
+
// Announce a cardinal day (e.g. "2"), not a locale ordinal (e.g. French "2ème").
|
|
186
|
+
// See https://github.com/mui/mui-x/issues/22915.
|
|
187
|
+
return adapter.isValid(dateWithDay) ? adapter.format(dateWithDay, 'dayOfMonth') : '';
|
|
186
188
|
}
|
|
187
189
|
return section.value;
|
|
188
190
|
case 'weekDay':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UseFieldInternalProps, UseFieldState, FieldParsedSelectedSections, FieldSectionsValueBoundaries, SectionOrdering, UseFieldForwardedProps, CharacterEditingQuery } from "./useField.types.mjs";
|
|
2
|
-
import { FieldSelectedSections, PickersTimezone, InferFieldSection, PickerManager } from "../../../models/index.mjs";
|
|
3
|
-
import { PickerValidValue } from "../../models/index.mjs";
|
|
1
|
+
import type { UseFieldInternalProps, UseFieldState, FieldParsedSelectedSections, FieldSectionsValueBoundaries, SectionOrdering, UseFieldForwardedProps, CharacterEditingQuery } from "./useField.types.mjs";
|
|
2
|
+
import type { FieldSelectedSections, PickersTimezone, InferFieldSection, PickerManager } from "../../../models/index.mjs";
|
|
3
|
+
import type { PickerValidValue } from "../../models/index.mjs";
|
|
4
4
|
export declare const useFieldState: <TValue extends PickerValidValue, TError, TValidationProps extends {}, TForwardedProps extends UseFieldForwardedProps>(parameters: UseFieldStateParameters<TValue, TError, TValidationProps, TForwardedProps>) => UseFieldStateReturnValue<TValue>;
|
|
5
5
|
interface UseFieldStateParameters<TValue extends PickerValidValue, TError, TValidationProps extends {}, TForwardedProps extends UseFieldForwardedProps> {
|
|
6
6
|
manager: PickerManager<TValue, TError, TValidationProps, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UseFieldInternalProps, UseFieldState, FieldParsedSelectedSections, FieldSectionsValueBoundaries, SectionOrdering, UseFieldForwardedProps, CharacterEditingQuery } from "./useField.types.js";
|
|
2
|
-
import { FieldSelectedSections, PickersTimezone, InferFieldSection, PickerManager } from "../../../models/index.js";
|
|
3
|
-
import { PickerValidValue } from "../../models/index.js";
|
|
1
|
+
import type { UseFieldInternalProps, UseFieldState, FieldParsedSelectedSections, FieldSectionsValueBoundaries, SectionOrdering, UseFieldForwardedProps, CharacterEditingQuery } from "./useField.types.js";
|
|
2
|
+
import type { FieldSelectedSections, PickersTimezone, InferFieldSection, PickerManager } from "../../../models/index.js";
|
|
3
|
+
import type { PickerValidValue } from "../../models/index.js";
|
|
4
4
|
export declare const useFieldState: <TValue extends PickerValidValue, TError, TValidationProps extends {}, TForwardedProps extends UseFieldForwardedProps>(parameters: UseFieldStateParameters<TValue, TError, TValidationProps, TForwardedProps>) => UseFieldStateReturnValue<TValue>;
|
|
5
5
|
interface UseFieldStateParameters<TValue extends PickerValidValue, TError, TValidationProps extends {}, TForwardedProps extends UseFieldForwardedProps> {
|
|
6
6
|
manager: PickerManager<TValue, TError, TValidationProps, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldOwnerState } from "../../models/index.mjs";
|
|
2
|
-
import { FormProps } from "../models/index.mjs";
|
|
1
|
+
import type { FieldOwnerState } from "../../models/index.mjs";
|
|
2
|
+
import type { FormProps } from "../models/index.mjs";
|
|
3
3
|
export declare function useFieldOwnerState(parameters: UseFieldOwnerStateParameters): FieldOwnerState;
|
|
4
4
|
export interface UseFieldOwnerStateParameters extends FormProps {
|
|
5
5
|
required?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldOwnerState } from "../../models/index.js";
|
|
2
|
-
import { FormProps } from "../models/index.js";
|
|
1
|
+
import type { FieldOwnerState } from "../../models/index.js";
|
|
2
|
+
import type { FormProps } from "../models/index.js";
|
|
3
3
|
export declare function useFieldOwnerState(parameters: UseFieldOwnerStateParameters): FieldOwnerState;
|
|
4
4
|
export interface UseFieldOwnerStateParameters extends FormProps {
|
|
5
5
|
required?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UseMobilePickerParams, UseMobilePickerProps } from "./useMobilePicker.types.mjs";
|
|
2
|
-
import { DateOrTimeViewWithMeridiem } from "../../models/index.mjs";
|
|
1
|
+
import type { UseMobilePickerParams, UseMobilePickerProps } from "./useMobilePicker.types.mjs";
|
|
2
|
+
import type { DateOrTimeViewWithMeridiem } from "../../models/index.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Hook managing all the single-date mobile pickers:
|
|
5
5
|
* - MobileDatePicker
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UseMobilePickerParams, UseMobilePickerProps } from "./useMobilePicker.types.js";
|
|
2
|
-
import { DateOrTimeViewWithMeridiem } from "../../models/index.js";
|
|
1
|
+
import type { UseMobilePickerParams, UseMobilePickerProps } from "./useMobilePicker.types.js";
|
|
2
|
+
import type { DateOrTimeViewWithMeridiem } from "../../models/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Hook managing all the single-date mobile pickers:
|
|
5
5
|
* - MobileDatePicker
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { MakeRequired, SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
|
-
import { BasePickerProps } from "../../models/props/basePickerProps.mjs";
|
|
4
|
-
import { PickersModalDialogSlots, PickersModalDialogSlotProps } from "../../components/PickersModalDialog.mjs";
|
|
5
|
-
import { UsePickerParameters, UsePickerNonStaticProps, UsePickerProps } from "../usePicker/index.mjs";
|
|
6
|
-
import { PickerFieldSlotProps, PickerOwnerState } from "../../../models/index.mjs";
|
|
7
|
-
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from "../../../PickersLayout/PickersLayout.types.mjs";
|
|
8
|
-
import { DateOrTimeViewWithMeridiem, PickerValue } from "../../models/index.mjs";
|
|
9
|
-
import { PickerFieldUISlotsFromContext, PickerFieldUISlotPropsFromContext } from "../../components/PickerFieldUI.mjs";
|
|
10
|
-
import { PickerStep } from "../../utils/createNonRangePickerStepNavigation.mjs";
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { MakeRequired, SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
|
+
import type { BasePickerProps } from "../../models/props/basePickerProps.mjs";
|
|
4
|
+
import type { PickersModalDialogSlots, PickersModalDialogSlotProps } from "../../components/PickersModalDialog.mjs";
|
|
5
|
+
import type { UsePickerParameters, UsePickerNonStaticProps, UsePickerProps } from "../usePicker/index.mjs";
|
|
6
|
+
import type { PickerFieldSlotProps, PickerOwnerState } from "../../../models/index.mjs";
|
|
7
|
+
import type { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from "../../../PickersLayout/PickersLayout.types.mjs";
|
|
8
|
+
import type { DateOrTimeViewWithMeridiem, PickerValue } from "../../models/index.mjs";
|
|
9
|
+
import type { PickerFieldUISlotsFromContext, PickerFieldUISlotPropsFromContext } from "../../components/PickerFieldUI.mjs";
|
|
10
|
+
import type { PickerStep } from "../../utils/createNonRangePickerStepNavigation.mjs";
|
|
11
11
|
export interface UseMobilePickerSlots extends PickersModalDialogSlots, ExportedPickersLayoutSlots<PickerValue>, PickerFieldUISlotsFromContext {
|
|
12
12
|
/**
|
|
13
13
|
* Component used to enter the date with the keyboard.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { MakeRequired, SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
|
-
import { BasePickerProps } from "../../models/props/basePickerProps.js";
|
|
4
|
-
import { PickersModalDialogSlots, PickersModalDialogSlotProps } from "../../components/PickersModalDialog.js";
|
|
5
|
-
import { UsePickerParameters, UsePickerNonStaticProps, UsePickerProps } from "../usePicker/index.js";
|
|
6
|
-
import { PickerFieldSlotProps, PickerOwnerState } from "../../../models/index.js";
|
|
7
|
-
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from "../../../PickersLayout/PickersLayout.types.js";
|
|
8
|
-
import { DateOrTimeViewWithMeridiem, PickerValue } from "../../models/index.js";
|
|
9
|
-
import { PickerFieldUISlotsFromContext, PickerFieldUISlotPropsFromContext } from "../../components/PickerFieldUI.js";
|
|
10
|
-
import { PickerStep } from "../../utils/createNonRangePickerStepNavigation.js";
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { MakeRequired, SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
|
+
import type { BasePickerProps } from "../../models/props/basePickerProps.js";
|
|
4
|
+
import type { PickersModalDialogSlots, PickersModalDialogSlotProps } from "../../components/PickersModalDialog.js";
|
|
5
|
+
import type { UsePickerParameters, UsePickerNonStaticProps, UsePickerProps } from "../usePicker/index.js";
|
|
6
|
+
import type { PickerFieldSlotProps, PickerOwnerState } from "../../../models/index.js";
|
|
7
|
+
import type { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from "../../../PickersLayout/PickersLayout.types.js";
|
|
8
|
+
import type { DateOrTimeViewWithMeridiem, PickerValue } from "../../models/index.js";
|
|
9
|
+
import type { PickerFieldUISlotsFromContext, PickerFieldUISlotPropsFromContext } from "../../components/PickerFieldUI.js";
|
|
10
|
+
import type { PickerStep } from "../../utils/createNonRangePickerStepNavigation.js";
|
|
11
11
|
export interface UseMobilePickerSlots extends PickersModalDialogSlots, ExportedPickersLayoutSlots<PickerValue>, PickerFieldUISlotsFromContext {
|
|
12
12
|
/**
|
|
13
13
|
* Component used to enter the date with the keyboard.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { UseFieldInternalProps } from "./useField/index.mjs";
|
|
3
|
-
import { FieldRef } from "../../models/index.mjs";
|
|
4
|
-
import { PickerRangeValue, PickerValue } from "../models/index.mjs";
|
|
3
|
+
import type { FieldRef } from "../../models/index.mjs";
|
|
4
|
+
import type { PickerRangeValue, PickerValue } from "../models/index.mjs";
|
|
5
5
|
export declare const PickerFieldPrivateContext: React.Context<PickerFieldPrivateContextValue | null>;
|
|
6
6
|
export declare function useNullableFieldPrivateContext(): PickerFieldPrivateContextValue | null;
|
|
7
7
|
export interface PickerFieldPrivateContextValue extends Pick<UseFieldInternalProps<any, any>, 'formatDensity' | 'selectedSections' | 'onSelectedSectionsChange'> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { UseFieldInternalProps } from "./useField/index.js";
|
|
3
|
-
import { FieldRef } from "../../models/index.js";
|
|
4
|
-
import { PickerRangeValue, PickerValue } from "../models/index.js";
|
|
3
|
+
import type { FieldRef } from "../../models/index.js";
|
|
4
|
+
import type { PickerRangeValue, PickerValue } from "../models/index.js";
|
|
5
5
|
export declare const PickerFieldPrivateContext: React.Context<PickerFieldPrivateContextValue | null>;
|
|
6
6
|
export declare function useNullableFieldPrivateContext(): PickerFieldPrivateContextValue | null;
|
|
7
7
|
export interface PickerFieldPrivateContextValue extends Pick<UseFieldInternalProps<any, any>, 'formatDensity' | 'selectedSections' | 'onSelectedSectionsChange'> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DateOrTimeViewWithMeridiem, PickerOrientation } from "../../../models/index.mjs";
|
|
1
|
+
import type { DateOrTimeViewWithMeridiem, PickerOrientation } from "../../../models/index.mjs";
|
|
2
2
|
export declare function useOrientation(views: readonly DateOrTimeViewWithMeridiem[], customOrientation: PickerOrientation | undefined): PickerOrientation;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DateOrTimeViewWithMeridiem, PickerOrientation } from "../../../models/index.js";
|
|
1
|
+
import type { DateOrTimeViewWithMeridiem, PickerOrientation } from "../../../models/index.js";
|
|
2
2
|
export declare function useOrientation(views: readonly DateOrTimeViewWithMeridiem[], customOrientation: PickerOrientation | undefined): PickerOrientation;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateOrTimeViewWithMeridiem, PickerValidValue, PickerValueManager } from "../../../models/index.mjs";
|
|
3
|
-
import { PickerSelectionState, UsePickerProps, UsePickerState } from "../usePicker.types.mjs";
|
|
4
|
-
import { InferError } from "../../../../models/index.mjs";
|
|
5
|
-
import { SetValueActionOptions } from "../../../components/PickerProvider.mjs";
|
|
6
|
-
import { Validator } from "../../../../validation/index.mjs";
|
|
2
|
+
import type { DateOrTimeViewWithMeridiem, PickerValidValue, PickerValueManager } from "../../../models/index.mjs";
|
|
3
|
+
import type { PickerSelectionState, UsePickerProps, UsePickerState } from "../usePicker.types.mjs";
|
|
4
|
+
import type { InferError } from "../../../../models/index.mjs";
|
|
5
|
+
import type { SetValueActionOptions } from "../../../components/PickerProvider.mjs";
|
|
6
|
+
import type { Validator } from "../../../../validation/index.mjs";
|
|
7
7
|
export declare function useValueAndOpenStates<TValue extends PickerValidValue, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UsePickerProps<TValue, TView, any, any>>(parameters: UsePickerDateStateParameters<TValue, TView, TExternalProps>): {
|
|
8
8
|
timezone: string;
|
|
9
9
|
state: UsePickerState<TValue>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateOrTimeViewWithMeridiem, PickerValidValue, PickerValueManager } from "../../../models/index.js";
|
|
3
|
-
import { PickerSelectionState, UsePickerProps, UsePickerState } from "../usePicker.types.js";
|
|
4
|
-
import { InferError } from "../../../../models/index.js";
|
|
5
|
-
import { SetValueActionOptions } from "../../../components/PickerProvider.js";
|
|
6
|
-
import { Validator } from "../../../../validation/index.js";
|
|
2
|
+
import type { DateOrTimeViewWithMeridiem, PickerValidValue, PickerValueManager } from "../../../models/index.js";
|
|
3
|
+
import type { PickerSelectionState, UsePickerProps, UsePickerState } from "../usePicker.types.js";
|
|
4
|
+
import type { InferError } from "../../../../models/index.js";
|
|
5
|
+
import type { SetValueActionOptions } from "../../../components/PickerProvider.js";
|
|
6
|
+
import type { Validator } from "../../../../validation/index.js";
|
|
7
7
|
export declare function useValueAndOpenStates<TValue extends PickerValidValue, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UsePickerProps<TValue, TView, any, any>>(parameters: UsePickerDateStateParameters<TValue, TView, TExternalProps>): {
|
|
8
8
|
timezone: string;
|
|
9
9
|
state: UsePickerState<TValue>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UsePickerParameters, UsePickerProps, UsePickerReturnValue } from "./usePicker.types.mjs";
|
|
2
|
-
import { DateOrTimeViewWithMeridiem, PickerValidValue } from "../../models/index.mjs";
|
|
1
|
+
import type { UsePickerParameters, UsePickerProps, UsePickerReturnValue } from "./usePicker.types.mjs";
|
|
2
|
+
import type { DateOrTimeViewWithMeridiem, PickerValidValue } from "../../models/index.mjs";
|
|
3
3
|
export declare const usePicker: <TValue extends PickerValidValue, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UsePickerProps<TValue, TView, any, any>>({
|
|
4
4
|
ref,
|
|
5
5
|
props,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UsePickerParameters, UsePickerProps, UsePickerReturnValue } from "./usePicker.types.js";
|
|
2
|
-
import { DateOrTimeViewWithMeridiem, PickerValidValue } from "../../models/index.js";
|
|
1
|
+
import type { UsePickerParameters, UsePickerProps, UsePickerReturnValue } from "./usePicker.types.js";
|
|
2
|
+
import type { DateOrTimeViewWithMeridiem, PickerValidValue } from "../../models/index.js";
|
|
3
3
|
export declare const usePicker: <TValue extends PickerValidValue, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UsePickerProps<TValue, TView, any, any>>({
|
|
4
4
|
ref,
|
|
5
5
|
props,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import { SxProps } from '@mui/system';
|
|
3
|
-
import { Theme } from '@mui/material/styles';
|
|
4
|
-
import { InferError, OnErrorProps, PickerChangeHandlerContext, PickerOwnerState, PickerValidDate, PickerValueType, TimezoneProps } from "../../../models/index.mjs";
|
|
5
|
-
import { DateOrTimeViewWithMeridiem, FormProps, PickerOrientation, PickerRangeValue, PickerValidValue, PickerValueManager, PickerVariant } from "../../models/index.mjs";
|
|
6
|
-
import { Validator } from "../../../validation/index.mjs";
|
|
7
|
-
import { UseViewsOptions } from "../useViews.mjs";
|
|
8
|
-
import { PickerProviderProps } from "../../components/PickerProvider.mjs";
|
|
9
|
-
import { PickersInputLocaleText } from "../../../locales/index.mjs";
|
|
10
|
-
import { PickerFieldPrivateContextValue } from "../useNullableFieldPrivateContext.mjs";
|
|
11
|
-
import { CreateStepNavigationReturnValue } from "../../utils/createStepNavigation.mjs";
|
|
2
|
+
import type { SxProps } from '@mui/system';
|
|
3
|
+
import type { Theme } from '@mui/material/styles';
|
|
4
|
+
import type { InferError, OnErrorProps, PickerChangeHandlerContext, PickerOwnerState, PickerValidDate, PickerValueType, TimezoneProps } from "../../../models/index.mjs";
|
|
5
|
+
import type { DateOrTimeViewWithMeridiem, FormProps, PickerOrientation, PickerRangeValue, PickerValidValue, PickerValueManager, PickerVariant } from "../../models/index.mjs";
|
|
6
|
+
import type { Validator } from "../../../validation/index.mjs";
|
|
7
|
+
import type { UseViewsOptions } from "../useViews.mjs";
|
|
8
|
+
import type { PickerProviderProps } from "../../components/PickerProvider.mjs";
|
|
9
|
+
import type { PickersInputLocaleText } from "../../../locales/index.mjs";
|
|
10
|
+
import type { PickerFieldPrivateContextValue } from "../useNullableFieldPrivateContext.mjs";
|
|
11
|
+
import type { CreateStepNavigationReturnValue } from "../../utils/createStepNavigation.mjs";
|
|
12
12
|
/**
|
|
13
13
|
* Props common to all Picker headless implementations.
|
|
14
14
|
* Those props are exposed on all the Pickers.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import { SxProps } from '@mui/system';
|
|
3
|
-
import { Theme } from '@mui/material/styles';
|
|
4
|
-
import { InferError, OnErrorProps, PickerChangeHandlerContext, PickerOwnerState, PickerValidDate, PickerValueType, TimezoneProps } from "../../../models/index.js";
|
|
5
|
-
import { DateOrTimeViewWithMeridiem, FormProps, PickerOrientation, PickerRangeValue, PickerValidValue, PickerValueManager, PickerVariant } from "../../models/index.js";
|
|
6
|
-
import { Validator } from "../../../validation/index.js";
|
|
7
|
-
import { UseViewsOptions } from "../useViews.js";
|
|
8
|
-
import { PickerProviderProps } from "../../components/PickerProvider.js";
|
|
9
|
-
import { PickersInputLocaleText } from "../../../locales/index.js";
|
|
10
|
-
import { PickerFieldPrivateContextValue } from "../useNullableFieldPrivateContext.js";
|
|
11
|
-
import { CreateStepNavigationReturnValue } from "../../utils/createStepNavigation.js";
|
|
2
|
+
import type { SxProps } from '@mui/system';
|
|
3
|
+
import type { Theme } from '@mui/material/styles';
|
|
4
|
+
import type { InferError, OnErrorProps, PickerChangeHandlerContext, PickerOwnerState, PickerValidDate, PickerValueType, TimezoneProps } from "../../../models/index.js";
|
|
5
|
+
import type { DateOrTimeViewWithMeridiem, FormProps, PickerOrientation, PickerRangeValue, PickerValidValue, PickerValueManager, PickerVariant } from "../../models/index.js";
|
|
6
|
+
import type { Validator } from "../../../validation/index.js";
|
|
7
|
+
import type { UseViewsOptions } from "../useViews.js";
|
|
8
|
+
import type { PickerProviderProps } from "../../components/PickerProvider.js";
|
|
9
|
+
import type { PickersInputLocaleText } from "../../../locales/index.js";
|
|
10
|
+
import type { PickerFieldPrivateContextValue } from "../useNullableFieldPrivateContext.js";
|
|
11
|
+
import type { CreateStepNavigationReturnValue } from "../../utils/createStepNavigation.js";
|
|
12
12
|
/**
|
|
13
13
|
* Props common to all Picker headless implementations.
|
|
14
14
|
* Those props are exposed on all the Pickers.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PickerDayOwnerState } from "./PickerDay.types.mjs";
|
|
2
|
-
import { PickerValidDate } from "../../models/pickers.mjs";
|
|
1
|
+
import type { PickerDayOwnerState } from "./PickerDay.types.mjs";
|
|
2
|
+
import type { PickerValidDate } from "../../models/pickers.mjs";
|
|
3
3
|
export declare function usePickerDayOwnerState(parameters: UsePickerDayOwnerStateParameters): PickerDayOwnerState;
|
|
4
4
|
interface UsePickerDayOwnerStateParameters {
|
|
5
5
|
day: PickerValidDate;
|