@mui/x-date-pickers 9.0.0-alpha.3 → 9.0.0-rc.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/AdapterDateFnsBase/AdapterDateFnsBase.mjs +1 -1
- package/AdapterDayjs/AdapterDayjs.mjs +1 -1
- package/AdapterLuxon/AdapterLuxon.mjs +1 -1
- package/AdapterMoment/AdapterMoment.mjs +1 -1
- package/AdapterMomentHijri/AdapterMomentHijri.mjs +1 -1
- package/AdapterMomentJalaali/AdapterMomentJalaali.mjs +1 -1
- package/CHANGELOG.md +384 -1
- package/DateCalendar/DateCalendar.js +1 -1
- package/DateCalendar/DateCalendar.mjs +1 -1
- package/DateCalendar/DayCalendar.d.mts +7 -7
- package/DateCalendar/DayCalendar.d.ts +7 -7
- package/DateCalendar/DayCalendar.js +23 -25
- package/DateCalendar/DayCalendar.mjs +23 -25
- package/DateField/DateField.d.mts +1 -1
- package/DateField/DateField.d.ts +1 -1
- package/DateField/DateField.js +26 -8
- package/DateField/DateField.mjs +26 -8
- package/DateField/DateField.types.d.mts +3 -3
- package/DateField/DateField.types.d.ts +3 -3
- package/DateField/useDateField.d.mts +1 -1
- package/DateField/useDateField.d.ts +1 -1
- package/DateField/useDateField.js +1 -1
- package/DateField/useDateField.mjs +1 -1
- package/DatePicker/DatePicker.d.mts +1 -1
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.js +1 -5
- package/DatePicker/DatePicker.mjs +1 -5
- package/DatePicker/DatePicker.types.d.mts +3 -3
- package/DatePicker/DatePicker.types.d.ts +3 -3
- package/DateTimeField/DateTimeField.d.mts +1 -1
- package/DateTimeField/DateTimeField.d.ts +1 -1
- package/DateTimeField/DateTimeField.js +26 -8
- package/DateTimeField/DateTimeField.mjs +26 -8
- package/DateTimeField/DateTimeField.types.d.mts +2 -2
- package/DateTimeField/DateTimeField.types.d.ts +2 -2
- package/DateTimeField/useDateTimeField.d.mts +1 -1
- package/DateTimeField/useDateTimeField.d.ts +1 -1
- package/DateTimeField/useDateTimeField.js +1 -1
- package/DateTimeField/useDateTimeField.mjs +1 -1
- package/DateTimePicker/DateTimePicker.d.mts +1 -1
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +1 -5
- package/DateTimePicker/DateTimePicker.mjs +1 -5
- package/DateTimePicker/DateTimePicker.types.d.mts +3 -3
- package/DateTimePicker/DateTimePicker.types.d.ts +3 -3
- package/DesktopDatePicker/DesktopDatePicker.d.mts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +1 -5
- package/DesktopDatePicker/DesktopDatePicker.mjs +1 -5
- package/DesktopDatePicker/DesktopDatePicker.types.d.mts +3 -3
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +3 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.mts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -5
- package/DesktopDateTimePicker/DesktopDateTimePicker.mjs +1 -5
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.mts +3 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +3 -3
- package/DesktopTimePicker/DesktopTimePicker.d.mts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.js +0 -4
- package/DesktopTimePicker/DesktopTimePicker.mjs +0 -4
- package/DesktopTimePicker/DesktopTimePicker.types.d.mts +3 -3
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +3 -3
- package/DigitalClock/DigitalClock.d.mts +1 -1
- package/DigitalClock/DigitalClock.d.ts +1 -1
- package/DigitalClock/DigitalClock.js +5 -3
- package/DigitalClock/DigitalClock.mjs +6 -4
- package/MobileDatePicker/MobileDatePicker.d.mts +1 -1
- package/MobileDatePicker/MobileDatePicker.d.ts +1 -1
- package/MobileDatePicker/MobileDatePicker.js +1 -5
- package/MobileDatePicker/MobileDatePicker.mjs +1 -5
- 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.js +1 -5
- package/MobileDateTimePicker/MobileDateTimePicker.mjs +1 -5
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.mts +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +3 -3
- package/MobileTimePicker/MobileTimePicker.d.mts +1 -1
- package/MobileTimePicker/MobileTimePicker.d.ts +1 -1
- package/MobileTimePicker/MobileTimePicker.js +0 -4
- package/MobileTimePicker/MobileTimePicker.mjs +0 -4
- package/MobileTimePicker/MobileTimePicker.types.d.mts +3 -3
- package/MobileTimePicker/MobileTimePicker.types.d.ts +3 -3
- package/MonthCalendar/MonthCalendarButton.js +2 -2
- package/MonthCalendar/MonthCalendarButton.mjs +3 -3
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +46 -9
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.mjs +47 -10
- package/PickerDay/PickerDay.d.mts +14 -0
- package/PickerDay/PickerDay.d.ts +14 -0
- package/{PickerDay2/PickerDay2.js → PickerDay/PickerDay.js} +110 -45
- package/{PickerDay2/PickerDay2.mjs → PickerDay/PickerDay.mjs} +110 -45
- package/PickerDay/PickerDay.types.d.mts +137 -0
- package/PickerDay/PickerDay.types.d.ts +137 -0
- package/PickerDay/index.d.mts +4 -0
- package/PickerDay/index.d.ts +4 -0
- package/PickerDay/index.js +25 -0
- package/PickerDay/index.mjs +2 -0
- package/{PickerDay2/pickerDay2Classes.d.mts → PickerDay/pickerDayClasses.d.mts} +4 -4
- package/{PickerDay2/pickerDay2Classes.d.ts → PickerDay/pickerDayClasses.d.ts} +4 -4
- package/PickerDay/pickerDayClasses.js +14 -0
- package/PickerDay/pickerDayClasses.mjs +6 -0
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +27 -1
- package/PickersTextField/PickersFilledInput/PickersFilledInput.mjs +27 -1
- package/PickersTextField/PickersInput/PickersInput.js +27 -1
- package/PickersTextField/PickersInput/PickersInput.mjs +27 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.js +26 -0
- package/PickersTextField/PickersInputBase/PickersInputBase.mjs +26 -0
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.mts +26 -0
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +26 -0
- package/PickersTextField/PickersOutlinedInput/Outline.js +1 -1
- package/PickersTextField/PickersOutlinedInput/Outline.mjs +1 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +27 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.mjs +27 -1
- package/PickersTextField/PickersTextField.js +42 -2
- package/PickersTextField/PickersTextField.mjs +42 -2
- package/PickersTextField/PickersTextField.types.d.mts +22 -6
- package/PickersTextField/PickersTextField.types.d.ts +22 -6
- package/StaticDatePicker/StaticDatePicker.js +1 -1
- package/StaticDatePicker/StaticDatePicker.mjs +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.mjs +1 -1
- package/TimeField/TimeField.d.mts +1 -1
- package/TimeField/TimeField.d.ts +1 -1
- package/TimeField/TimeField.js +26 -8
- package/TimeField/TimeField.mjs +26 -8
- package/TimeField/TimeField.types.d.mts +2 -2
- package/TimeField/TimeField.types.d.ts +2 -2
- 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.js +0 -4
- package/TimePicker/TimePicker.mjs +0 -4
- package/TimePicker/TimePicker.types.d.mts +3 -3
- package/TimePicker/TimePicker.types.d.ts +3 -3
- package/YearCalendar/YearCalendarButton.js +2 -2
- package/YearCalendar/YearCalendarButton.mjs +3 -3
- package/hooks/useParsedFormat.js +5 -7
- package/hooks/useParsedFormat.mjs +5 -7
- package/hooks/useSplitFieldProps.d.mts +1 -1
- package/hooks/useSplitFieldProps.d.ts +1 -1
- package/hooks/useSplitFieldProps.js +1 -1
- package/hooks/useSplitFieldProps.mjs +1 -1
- package/index.d.mts +1 -2
- package/index.d.ts +1 -2
- package/index.js +2 -14
- package/index.mjs +2 -3
- package/internals/components/PickerFieldUI.d.mts +22 -13
- package/internals/components/PickerFieldUI.d.ts +22 -13
- package/internals/components/PickerFieldUI.js +22 -80
- package/internals/components/PickerFieldUI.mjs +22 -80
- package/internals/components/PickerPopper/PickerPopper.js +20 -2
- package/internals/components/PickerPopper/PickerPopper.mjs +20 -2
- package/internals/components/PickersToolbar.js +3 -1
- package/internals/components/PickersToolbar.mjs +3 -1
- package/internals/demo/DemoContainer.js +6 -8
- package/internals/demo/DemoContainer.mjs +6 -8
- package/internals/hooks/PickerDay.types.d.mts +12 -0
- package/internals/hooks/PickerDay.types.d.ts +12 -0
- 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 +6 -6
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +6 -6
- package/internals/hooks/useField/buildSectionsFromFormat.d.mts +0 -1
- package/internals/hooks/useField/buildSectionsFromFormat.d.ts +0 -1
- package/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/internals/hooks/useField/buildSectionsFromFormat.mjs +1 -1
- package/internals/hooks/useField/index.d.mts +1 -1
- package/internals/hooks/useField/index.d.ts +1 -1
- package/internals/hooks/useField/index.js +2 -8
- package/internals/hooks/useField/index.mjs +1 -1
- package/internals/hooks/useField/useField.d.mts +2 -2
- package/internals/hooks/useField/useField.d.ts +2 -2
- package/internals/hooks/useField/useField.js +265 -8
- package/internals/hooks/useField/useField.mjs +264 -8
- package/internals/hooks/useField/useField.types.d.mts +12 -51
- package/internals/hooks/useField/useField.types.d.ts +12 -51
- package/internals/hooks/useField/useField.utils.d.mts +2 -3
- package/internals/hooks/useField/useField.utils.d.ts +2 -3
- package/internals/hooks/useField/useField.utils.js +8 -65
- package/internals/hooks/useField/useField.utils.mjs +6 -62
- package/internals/hooks/useField/useFieldHiddenInputProps.d.mts +2 -4
- package/internals/hooks/useField/useFieldHiddenInputProps.d.ts +2 -4
- package/internals/hooks/useField/useFieldHiddenInputProps.js +1 -3
- package/internals/hooks/useField/useFieldHiddenInputProps.mjs +1 -3
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +2 -3
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.mjs +2 -3
- package/internals/hooks/useField/useFieldRootProps.d.mts +5 -5
- package/internals/hooks/useField/useFieldRootProps.d.ts +5 -5
- package/internals/hooks/useField/useFieldRootProps.js +183 -11
- package/internals/hooks/useField/useFieldRootProps.mjs +183 -11
- package/internals/hooks/useField/useFieldSectionContainerProps.d.mts +3 -5
- package/internals/hooks/useField/useFieldSectionContainerProps.d.ts +3 -5
- package/internals/hooks/useField/useFieldSectionContainerProps.js +2 -4
- package/internals/hooks/useField/useFieldSectionContainerProps.mjs +2 -4
- package/internals/hooks/useField/useFieldSectionContentProps.d.mts +6 -7
- package/internals/hooks/useField/useFieldSectionContentProps.d.ts +6 -7
- package/internals/hooks/useField/useFieldSectionContentProps.js +2 -4
- package/internals/hooks/useField/useFieldSectionContentProps.mjs +2 -4
- package/internals/hooks/useField/useFieldState.d.mts +4 -4
- package/internals/hooks/useField/useFieldState.d.ts +4 -4
- package/internals/hooks/useField/useFieldState.js +3 -6
- package/internals/hooks/useField/useFieldState.mjs +3 -6
- 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 +6 -6
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +6 -6
- package/internals/hooks/useNullableFieldPrivateContext.d.mts +3 -2
- package/internals/hooks/useNullableFieldPrivateContext.d.ts +3 -2
- package/internals/hooks/usePicker/usePicker.js +13 -10
- package/internals/hooks/usePicker/usePicker.mjs +13 -10
- package/internals/hooks/usePicker/usePicker.types.d.mts +2 -1
- package/internals/hooks/usePicker/usePicker.types.d.ts +2 -1
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.d.mts +2 -3
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.d.ts +2 -3
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.js +3 -5
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.mjs +3 -5
- package/internals/index.d.mts +5 -4
- package/internals/index.d.ts +5 -4
- package/internals/index.js +16 -9
- package/internals/index.mjs +4 -3
- package/internals/models/manager.d.mts +3 -5
- package/internals/models/manager.d.ts +3 -5
- package/internals/utils/isElementInteractive.d.mts +1 -0
- package/internals/utils/isElementInteractive.d.ts +1 -0
- package/internals/utils/isElementInteractive.js +34 -0
- package/internals/utils/isElementInteractive.mjs +28 -0
- package/internals/utils/valueManagers.js +1 -2
- package/internals/utils/valueManagers.mjs +2 -3
- package/managers/index.d.mts +2 -2
- package/managers/index.d.ts +2 -2
- package/managers/useDateManager.d.mts +3 -6
- package/managers/useDateManager.d.ts +3 -6
- package/managers/useDateManager.js +2 -6
- package/managers/useDateManager.mjs +2 -6
- package/managers/useDateTimeManager.d.mts +3 -6
- package/managers/useDateTimeManager.d.ts +3 -6
- package/managers/useDateTimeManager.js +2 -6
- package/managers/useDateTimeManager.mjs +2 -6
- package/managers/useTimeManager.d.mts +4 -6
- package/managers/useTimeManager.d.ts +4 -6
- package/managers/useTimeManager.js +1 -3
- package/managers/useTimeManager.mjs +1 -3
- package/models/fields.d.mts +7 -4
- package/models/fields.d.ts +7 -4
- package/models/manager.d.mts +2 -8
- package/models/manager.d.ts +2 -8
- package/package.json +12 -26
- package/themeAugmentation/components.d.mts +4 -8
- package/themeAugmentation/components.d.ts +4 -8
- package/themeAugmentation/overrides.d.mts +2 -4
- package/themeAugmentation/overrides.d.ts +2 -4
- package/themeAugmentation/props.d.mts +5 -7
- package/themeAugmentation/props.d.ts +5 -7
- package/PickerDay2/PickerDay2.d.mts +0 -7
- package/PickerDay2/PickerDay2.d.ts +0 -7
- package/PickerDay2/PickerDay2.types.d.mts +0 -18
- package/PickerDay2/PickerDay2.types.d.ts +0 -18
- package/PickerDay2/index.d.mts +0 -4
- package/PickerDay2/index.d.ts +0 -4
- package/PickerDay2/index.js +0 -25
- package/PickerDay2/index.mjs +0 -2
- package/PickerDay2/pickerDay2Classes.js +0 -14
- package/PickerDay2/pickerDay2Classes.mjs +0 -6
- package/PickersDay/PickersDay.d.mts +0 -15
- package/PickersDay/PickersDay.d.ts +0 -15
- package/PickersDay/PickersDay.js +0 -384
- package/PickersDay/PickersDay.mjs +0 -377
- package/PickersDay/PickersDay.types.d.mts +0 -114
- package/PickersDay/PickersDay.types.d.ts +0 -114
- package/PickersDay/index.d.mts +0 -4
- package/PickersDay/index.d.ts +0 -4
- package/PickersDay/index.js +0 -25
- package/PickersDay/index.mjs +0 -2
- package/PickersDay/pickersDayClasses.d.mts +0 -19
- package/PickersDay/pickersDayClasses.d.ts +0 -19
- package/PickersDay/pickersDayClasses.js +0 -14
- package/PickersDay/pickersDayClasses.mjs +0 -6
- package/internals/hooks/useField/useFieldRootHandleKeyDown.d.mts +0 -16
- package/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +0 -16
- package/internals/hooks/useField/useFieldRootHandleKeyDown.js +0 -211
- package/internals/hooks/useField/useFieldRootHandleKeyDown.mjs +0 -205
- package/internals/hooks/useField/useFieldV6TextField.d.mts +0 -26
- package/internals/hooks/useField/useFieldV6TextField.d.ts +0 -26
- package/internals/hooks/useField/useFieldV6TextField.js +0 -421
- package/internals/hooks/useField/useFieldV6TextField.mjs +0 -412
- package/internals/hooks/useField/useFieldV7TextField.d.mts +0 -3
- package/internals/hooks/useField/useFieldV7TextField.d.ts +0 -3
- package/internals/hooks/useField/useFieldV7TextField.js +0 -271
- package/internals/hooks/useField/useFieldV7TextField.mjs +0 -263
- /package/{PickerDay2/PickerDay2.types.js → PickerDay/PickerDay.types.js} +0 -0
- /package/{PickerDay2/PickerDay2.types.mjs → PickerDay/PickerDay.types.mjs} +0 -0
- /package/{PickersDay/PickersDay.types.js → internals/hooks/PickerDay.types.js} +0 -0
- /package/{PickersDay/PickersDay.types.mjs → internals/hooks/PickerDay.types.mjs} +0 -0
|
@@ -5,8 +5,8 @@ import { DateOrTimeView } from "../models/index.js";
|
|
|
5
5
|
import { DigitalTimePickerProps } from "../internals/models/props/time.js";
|
|
6
6
|
import { ExportedYearCalendarProps } from "../YearCalendar/YearCalendar.types.js";
|
|
7
7
|
export interface DesktopDateTimePickerSlots extends BaseDateTimePickerSlots, MakeOptional<UseDesktopPickerSlots, 'field' | 'openPickerIcon'> {}
|
|
8
|
-
export interface DesktopDateTimePickerSlotProps
|
|
9
|
-
export interface DesktopDateTimePickerProps
|
|
8
|
+
export interface DesktopDateTimePickerSlotProps extends BaseDateTimePickerSlotProps, ExportedUseDesktopPickerSlotProps {}
|
|
9
|
+
export interface DesktopDateTimePickerProps extends BaseDateTimePickerProps, DesktopOnlyPickerProps, DigitalTimePickerProps, ExportedYearCalendarProps {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
@@ -16,7 +16,7 @@ export interface DesktopDateTimePickerProps<TEnableAccessibleFieldDOMStructure e
|
|
|
16
16
|
* The props used for each component slot.
|
|
17
17
|
* @default {}
|
|
18
18
|
*/
|
|
19
|
-
slotProps?: DesktopDateTimePickerSlotProps
|
|
19
|
+
slotProps?: DesktopDateTimePickerSlotProps;
|
|
20
20
|
/**
|
|
21
21
|
* Available views.
|
|
22
22
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DesktopTimePickerProps } from "./DesktopTimePicker.types.mjs";
|
|
3
|
-
type DesktopTimePickerComponent = (
|
|
3
|
+
type DesktopTimePickerComponent = ((props: DesktopTimePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DesktopTimePickerProps } from "./DesktopTimePicker.types.js";
|
|
3
|
-
type DesktopTimePickerComponent = (
|
|
3
|
+
type DesktopTimePickerComponent = ((props: DesktopTimePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -146,10 +146,6 @@ DesktopTimePicker.propTypes = {
|
|
|
146
146
|
* @default false
|
|
147
147
|
*/
|
|
148
148
|
disablePast: _propTypes.default.bool,
|
|
149
|
-
/**
|
|
150
|
-
* @default true
|
|
151
|
-
*/
|
|
152
|
-
enableAccessibleFieldDOMStructure: _propTypes.default.any,
|
|
153
149
|
/**
|
|
154
150
|
* Format of the date when rendered in the input(s).
|
|
155
151
|
* Defaults to localized format based on the used `views`.
|
|
@@ -139,10 +139,6 @@ DesktopTimePicker.propTypes = {
|
|
|
139
139
|
* @default false
|
|
140
140
|
*/
|
|
141
141
|
disablePast: PropTypes.bool,
|
|
142
|
-
/**
|
|
143
|
-
* @default true
|
|
144
|
-
*/
|
|
145
|
-
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
146
142
|
/**
|
|
147
143
|
* Format of the date when rendered in the input(s).
|
|
148
144
|
* Defaults to localized format based on the used `views`.
|
|
@@ -7,8 +7,8 @@ import { DigitalClockSlots, DigitalClockSlotProps } from "../DigitalClock/index.
|
|
|
7
7
|
import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from "../MultiSectionDigitalClock/index.mjs";
|
|
8
8
|
import { TimeView } from "../models/index.mjs";
|
|
9
9
|
export interface DesktopTimePickerSlots extends BaseTimePickerSlots, MakeOptional<UseDesktopPickerSlots, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {}
|
|
10
|
-
export interface DesktopTimePickerSlotProps
|
|
11
|
-
export interface DesktopTimePickerProps
|
|
10
|
+
export interface DesktopTimePickerSlotProps extends BaseTimePickerSlotProps, ExportedUseDesktopPickerSlotProps, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {}
|
|
11
|
+
export interface DesktopTimePickerProps extends BaseTimePickerProps<TimeViewWithMeridiem>, DesktopOnlyPickerProps, DigitalTimePickerProps {
|
|
12
12
|
/**
|
|
13
13
|
* Available views.
|
|
14
14
|
*/
|
|
@@ -22,5 +22,5 @@ export interface DesktopTimePickerProps<TEnableAccessibleFieldDOMStructure exten
|
|
|
22
22
|
* The props used for each component slot.
|
|
23
23
|
* @default {}
|
|
24
24
|
*/
|
|
25
|
-
slotProps?: DesktopTimePickerSlotProps
|
|
25
|
+
slotProps?: DesktopTimePickerSlotProps;
|
|
26
26
|
}
|
|
@@ -7,8 +7,8 @@ import { DigitalClockSlots, DigitalClockSlotProps } from "../DigitalClock/index.
|
|
|
7
7
|
import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from "../MultiSectionDigitalClock/index.js";
|
|
8
8
|
import { TimeView } from "../models/index.js";
|
|
9
9
|
export interface DesktopTimePickerSlots extends BaseTimePickerSlots, MakeOptional<UseDesktopPickerSlots, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {}
|
|
10
|
-
export interface DesktopTimePickerSlotProps
|
|
11
|
-
export interface DesktopTimePickerProps
|
|
10
|
+
export interface DesktopTimePickerSlotProps extends BaseTimePickerSlotProps, ExportedUseDesktopPickerSlotProps, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {}
|
|
11
|
+
export interface DesktopTimePickerProps extends BaseTimePickerProps<TimeViewWithMeridiem>, DesktopOnlyPickerProps, DigitalTimePickerProps {
|
|
12
12
|
/**
|
|
13
13
|
* Available views.
|
|
14
14
|
*/
|
|
@@ -22,5 +22,5 @@ export interface DesktopTimePickerProps<TEnableAccessibleFieldDOMStructure exten
|
|
|
22
22
|
* The props used for each component slot.
|
|
23
23
|
* @default {}
|
|
24
24
|
*/
|
|
25
|
-
slotProps?: DesktopTimePickerSlotProps
|
|
25
|
+
slotProps?: DesktopTimePickerSlotProps;
|
|
26
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DigitalClockProps } from "./DigitalClock.types.mjs";
|
|
3
|
-
export declare const DigitalClockItem: import("@emotion/styled").StyledComponent<import("@mui/material/MenuItem").MenuItemOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "
|
|
3
|
+
export declare const DigitalClockItem: import("@emotion/styled").StyledComponent<import("@mui/material/MenuItem").MenuItemOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, keyof import("@mui/material/MenuItem").MenuItemOwnProps> & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "tabIndex" | "children" | "nativeButton" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | keyof import("@mui/material/MenuItem").MenuItemOwnProps> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "disabled" | "autoFocus" | "dense" | "style" | "tabIndex" | "className" | "children" | "classes" | "sx" | "disableGutters" | "divider" | "nativeButton" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
4
4
|
type DigitalClockComponent = ((props: DigitalClockProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
5
5
|
propTypes?: any;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DigitalClockProps } from "./DigitalClock.types.js";
|
|
3
|
-
export declare const DigitalClockItem: import("@emotion/styled").StyledComponent<import("@mui/material/MenuItem").MenuItemOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "
|
|
3
|
+
export declare const DigitalClockItem: import("@emotion/styled").StyledComponent<import("@mui/material/MenuItem").MenuItemOwnProps & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, keyof import("@mui/material/MenuItem").MenuItemOwnProps> & Omit<import("@mui/material/ButtonBase").ButtonBaseOwnProps, "tabIndex" | "children" | "nativeButton" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | keyof import("@mui/material/MenuItem").MenuItemOwnProps> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "disabled" | "autoFocus" | "dense" | "style" | "tabIndex" | "className" | "children" | "classes" | "sx" | "disableGutters" | "divider" | "nativeButton" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
4
4
|
type DigitalClockComponent = ((props: DigitalClockProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
5
5
|
propTypes?: any;
|
|
6
6
|
};
|
|
@@ -83,7 +83,7 @@ const DigitalClockItem = exports.DigitalClockItem = (0, _styles.styled)(_MenuIte
|
|
|
83
83
|
marginTop: 4
|
|
84
84
|
},
|
|
85
85
|
'&:hover': {
|
|
86
|
-
backgroundColor: theme.
|
|
86
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, (theme.vars || theme).palette.action.hoverOpacity)
|
|
87
87
|
},
|
|
88
88
|
'&.Mui-selected': {
|
|
89
89
|
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
@@ -93,7 +93,7 @@ const DigitalClockItem = exports.DigitalClockItem = (0, _styles.styled)(_MenuIte
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
'&.Mui-focusVisible': {
|
|
96
|
-
backgroundColor: theme.
|
|
96
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, (theme.vars || theme).palette.action.focusOpacity)
|
|
97
97
|
}
|
|
98
98
|
}));
|
|
99
99
|
/**
|
|
@@ -111,6 +111,7 @@ const DigitalClock = exports.DigitalClock = /*#__PURE__*/React.forwardRef(functi
|
|
|
111
111
|
const containerRef = React.useRef(null);
|
|
112
112
|
const handleRef = (0, _useForkRef.default)(ref, containerRef);
|
|
113
113
|
const listRef = React.useRef(null);
|
|
114
|
+
const lastActiveRef = React.useRef(null);
|
|
114
115
|
const props = (0, _styles.useThemeProps)({
|
|
115
116
|
props: inProps,
|
|
116
117
|
name: 'MuiDigitalClock'
|
|
@@ -206,7 +207,8 @@ const DigitalClock = exports.DigitalClock = /*#__PURE__*/React.forwardRef(functi
|
|
|
206
207
|
return;
|
|
207
208
|
}
|
|
208
209
|
const offsetTop = activeItem.offsetTop;
|
|
209
|
-
if (autoFocus || !!focusedView) {
|
|
210
|
+
if ((autoFocus || !!focusedView) && activeItem !== lastActiveRef.current) {
|
|
211
|
+
lastActiveRef.current = activeItem;
|
|
210
212
|
activeItem.focus();
|
|
211
213
|
}
|
|
212
214
|
|
|
@@ -7,7 +7,7 @@ import * as React from 'react';
|
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
10
|
-
import {
|
|
10
|
+
import { styled, useThemeProps } from '@mui/material/styles';
|
|
11
11
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
12
12
|
import composeClasses from '@mui/utils/composeClasses';
|
|
13
13
|
import MenuItem from '@mui/material/MenuItem';
|
|
@@ -76,7 +76,7 @@ export const DigitalClockItem = styled(MenuItem, {
|
|
|
76
76
|
marginTop: 4
|
|
77
77
|
},
|
|
78
78
|
'&:hover': {
|
|
79
|
-
backgroundColor: theme.
|
|
79
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, (theme.vars || theme).palette.action.hoverOpacity)
|
|
80
80
|
},
|
|
81
81
|
'&.Mui-selected': {
|
|
82
82
|
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
@@ -86,7 +86,7 @@ export const DigitalClockItem = styled(MenuItem, {
|
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
'&.Mui-focusVisible': {
|
|
89
|
-
backgroundColor: theme.
|
|
89
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.primary.main, (theme.vars || theme).palette.action.focusOpacity)
|
|
90
90
|
}
|
|
91
91
|
}));
|
|
92
92
|
/**
|
|
@@ -104,6 +104,7 @@ export const DigitalClock = /*#__PURE__*/React.forwardRef(function DigitalClock(
|
|
|
104
104
|
const containerRef = React.useRef(null);
|
|
105
105
|
const handleRef = useForkRef(ref, containerRef);
|
|
106
106
|
const listRef = React.useRef(null);
|
|
107
|
+
const lastActiveRef = React.useRef(null);
|
|
107
108
|
const props = useThemeProps({
|
|
108
109
|
props: inProps,
|
|
109
110
|
name: 'MuiDigitalClock'
|
|
@@ -199,7 +200,8 @@ export const DigitalClock = /*#__PURE__*/React.forwardRef(function DigitalClock(
|
|
|
199
200
|
return;
|
|
200
201
|
}
|
|
201
202
|
const offsetTop = activeItem.offsetTop;
|
|
202
|
-
if (autoFocus || !!focusedView) {
|
|
203
|
+
if ((autoFocus || !!focusedView) && activeItem !== lastActiveRef.current) {
|
|
204
|
+
lastActiveRef.current = activeItem;
|
|
203
205
|
activeItem.focus();
|
|
204
206
|
}
|
|
205
207
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MobileDatePickerProps } from "./MobileDatePicker.types.mjs";
|
|
3
|
-
type MobileDatePickerComponent = (
|
|
3
|
+
type MobileDatePickerComponent = ((props: MobileDatePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MobileDatePickerProps } from "./MobileDatePicker.types.js";
|
|
3
|
-
type MobileDatePickerComponent = (
|
|
3
|
+
type MobileDatePickerComponent = ((props: MobileDatePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -110,7 +110,7 @@ MobileDatePicker.propTypes = {
|
|
|
110
110
|
*/
|
|
111
111
|
disableFuture: _propTypes.default.bool,
|
|
112
112
|
/**
|
|
113
|
-
* If `true`, today's
|
|
113
|
+
* If `true`, today's day is not highlighted.
|
|
114
114
|
* @default false
|
|
115
115
|
*/
|
|
116
116
|
disableHighlightToday: _propTypes.default.bool,
|
|
@@ -129,10 +129,6 @@ MobileDatePicker.propTypes = {
|
|
|
129
129
|
* If `true`, the week number will be display in the calendar.
|
|
130
130
|
*/
|
|
131
131
|
displayWeekNumber: _propTypes.default.bool,
|
|
132
|
-
/**
|
|
133
|
-
* @default true
|
|
134
|
-
*/
|
|
135
|
-
enableAccessibleFieldDOMStructure: _propTypes.default.any,
|
|
136
132
|
/**
|
|
137
133
|
* The day view will show as many weeks as needed after the end of the current month to match this value.
|
|
138
134
|
* Put it to 6 to have a fixed number of weeks in Gregorian calendars
|
|
@@ -103,7 +103,7 @@ MobileDatePicker.propTypes = {
|
|
|
103
103
|
*/
|
|
104
104
|
disableFuture: PropTypes.bool,
|
|
105
105
|
/**
|
|
106
|
-
* If `true`, today's
|
|
106
|
+
* If `true`, today's day is not highlighted.
|
|
107
107
|
* @default false
|
|
108
108
|
*/
|
|
109
109
|
disableHighlightToday: PropTypes.bool,
|
|
@@ -122,10 +122,6 @@ MobileDatePicker.propTypes = {
|
|
|
122
122
|
* If `true`, the week number will be display in the calendar.
|
|
123
123
|
*/
|
|
124
124
|
displayWeekNumber: PropTypes.bool,
|
|
125
|
-
/**
|
|
126
|
-
* @default true
|
|
127
|
-
*/
|
|
128
|
-
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
129
125
|
/**
|
|
130
126
|
* The day view will show as many weeks as needed after the end of the current month to match this value.
|
|
131
127
|
* Put it to 6 to have a fixed number of weeks in Gregorian calendars
|
|
@@ -2,8 +2,8 @@ import { MakeOptional } from '@mui/x-internals/types';
|
|
|
2
2
|
import { UseMobilePickerSlots, MobileOnlyPickerProps, ExportedUseMobilePickerSlotProps } from "../internals/hooks/useMobilePicker/index.mjs";
|
|
3
3
|
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from "../DatePicker/shared.mjs";
|
|
4
4
|
export interface MobileDatePickerSlots extends BaseDatePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {}
|
|
5
|
-
export interface MobileDatePickerSlotProps
|
|
6
|
-
export interface MobileDatePickerProps
|
|
5
|
+
export interface MobileDatePickerSlotProps extends BaseDatePickerSlotProps, ExportedUseMobilePickerSlotProps {}
|
|
6
|
+
export interface MobileDatePickerProps extends BaseDatePickerProps, MobileOnlyPickerProps {
|
|
7
7
|
/**
|
|
8
8
|
* Overridable component slots.
|
|
9
9
|
* @default {}
|
|
@@ -13,7 +13,7 @@ export interface MobileDatePickerProps<TEnableAccessibleFieldDOMStructure extend
|
|
|
13
13
|
* The props used for each component slot.
|
|
14
14
|
* @default {}
|
|
15
15
|
*/
|
|
16
|
-
slotProps?: MobileDatePickerSlotProps
|
|
16
|
+
slotProps?: MobileDatePickerSlotProps;
|
|
17
17
|
/**
|
|
18
18
|
* Years rendered per row.
|
|
19
19
|
* @default 3
|
|
@@ -2,8 +2,8 @@ import { MakeOptional } from '@mui/x-internals/types';
|
|
|
2
2
|
import { UseMobilePickerSlots, MobileOnlyPickerProps, ExportedUseMobilePickerSlotProps } from "../internals/hooks/useMobilePicker/index.js";
|
|
3
3
|
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from "../DatePicker/shared.js";
|
|
4
4
|
export interface MobileDatePickerSlots extends BaseDatePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {}
|
|
5
|
-
export interface MobileDatePickerSlotProps
|
|
6
|
-
export interface MobileDatePickerProps
|
|
5
|
+
export interface MobileDatePickerSlotProps extends BaseDatePickerSlotProps, ExportedUseMobilePickerSlotProps {}
|
|
6
|
+
export interface MobileDatePickerProps extends BaseDatePickerProps, MobileOnlyPickerProps {
|
|
7
7
|
/**
|
|
8
8
|
* Overridable component slots.
|
|
9
9
|
* @default {}
|
|
@@ -13,7 +13,7 @@ export interface MobileDatePickerProps<TEnableAccessibleFieldDOMStructure extend
|
|
|
13
13
|
* The props used for each component slot.
|
|
14
14
|
* @default {}
|
|
15
15
|
*/
|
|
16
|
-
slotProps?: MobileDatePickerSlotProps
|
|
16
|
+
slotProps?: MobileDatePickerSlotProps;
|
|
17
17
|
/**
|
|
18
18
|
* Years rendered per row.
|
|
19
19
|
* @default 3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MobileDateTimePickerProps } from "./MobileDateTimePicker.types.mjs";
|
|
3
|
-
type MobileDateTimePickerComponent = (
|
|
3
|
+
type MobileDateTimePickerComponent = ((props: MobileDateTimePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MobileDateTimePickerProps } from "./MobileDateTimePicker.types.js";
|
|
3
|
-
type MobileDateTimePickerComponent = (
|
|
3
|
+
type MobileDateTimePickerComponent = ((props: MobileDateTimePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -172,7 +172,7 @@ MobileDateTimePicker.propTypes = {
|
|
|
172
172
|
*/
|
|
173
173
|
disableFuture: _propTypes.default.bool,
|
|
174
174
|
/**
|
|
175
|
-
* If `true`, today's
|
|
175
|
+
* If `true`, today's day is not highlighted.
|
|
176
176
|
* @default false
|
|
177
177
|
*/
|
|
178
178
|
disableHighlightToday: _propTypes.default.bool,
|
|
@@ -196,10 +196,6 @@ MobileDateTimePicker.propTypes = {
|
|
|
196
196
|
* If `true`, the week number will be display in the calendar.
|
|
197
197
|
*/
|
|
198
198
|
displayWeekNumber: _propTypes.default.bool,
|
|
199
|
-
/**
|
|
200
|
-
* @default true
|
|
201
|
-
*/
|
|
202
|
-
enableAccessibleFieldDOMStructure: _propTypes.default.any,
|
|
203
199
|
/**
|
|
204
200
|
* The day view will show as many weeks as needed after the end of the current month to match this value.
|
|
205
201
|
* Put it to 6 to have a fixed number of weeks in Gregorian calendars
|
|
@@ -165,7 +165,7 @@ MobileDateTimePicker.propTypes = {
|
|
|
165
165
|
*/
|
|
166
166
|
disableFuture: PropTypes.bool,
|
|
167
167
|
/**
|
|
168
|
-
* If `true`, today's
|
|
168
|
+
* If `true`, today's day is not highlighted.
|
|
169
169
|
* @default false
|
|
170
170
|
*/
|
|
171
171
|
disableHighlightToday: PropTypes.bool,
|
|
@@ -189,10 +189,6 @@ MobileDateTimePicker.propTypes = {
|
|
|
189
189
|
* If `true`, the week number will be display in the calendar.
|
|
190
190
|
*/
|
|
191
191
|
displayWeekNumber: PropTypes.bool,
|
|
192
|
-
/**
|
|
193
|
-
* @default true
|
|
194
|
-
*/
|
|
195
|
-
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
196
192
|
/**
|
|
197
193
|
* The day view will show as many weeks as needed after the end of the current month to match this value.
|
|
198
194
|
* Put it to 6 to have a fixed number of weeks in Gregorian calendars
|
|
@@ -2,8 +2,8 @@ import { MakeOptional } from '@mui/x-internals/types';
|
|
|
2
2
|
import { UseMobilePickerSlots, ExportedUseMobilePickerSlotProps, MobileOnlyPickerProps } from "../internals/hooks/useMobilePicker/index.mjs";
|
|
3
3
|
import { BaseDateTimePickerProps, BaseDateTimePickerSlots, BaseDateTimePickerSlotProps } from "../DateTimePicker/shared.mjs";
|
|
4
4
|
export interface MobileDateTimePickerSlots extends BaseDateTimePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {}
|
|
5
|
-
export interface MobileDateTimePickerSlotProps
|
|
6
|
-
export interface MobileDateTimePickerProps
|
|
5
|
+
export interface MobileDateTimePickerSlotProps extends BaseDateTimePickerSlotProps, ExportedUseMobilePickerSlotProps {}
|
|
6
|
+
export interface MobileDateTimePickerProps extends BaseDateTimePickerProps, MobileOnlyPickerProps {
|
|
7
7
|
/**
|
|
8
8
|
* Overridable component slots.
|
|
9
9
|
* @default {}
|
|
@@ -13,5 +13,5 @@ export interface MobileDateTimePickerProps<TEnableAccessibleFieldDOMStructure ex
|
|
|
13
13
|
* The props used for each component slot.
|
|
14
14
|
* @default {}
|
|
15
15
|
*/
|
|
16
|
-
slotProps?: MobileDateTimePickerSlotProps
|
|
16
|
+
slotProps?: MobileDateTimePickerSlotProps;
|
|
17
17
|
}
|
|
@@ -2,8 +2,8 @@ import { MakeOptional } from '@mui/x-internals/types';
|
|
|
2
2
|
import { UseMobilePickerSlots, ExportedUseMobilePickerSlotProps, MobileOnlyPickerProps } from "../internals/hooks/useMobilePicker/index.js";
|
|
3
3
|
import { BaseDateTimePickerProps, BaseDateTimePickerSlots, BaseDateTimePickerSlotProps } from "../DateTimePicker/shared.js";
|
|
4
4
|
export interface MobileDateTimePickerSlots extends BaseDateTimePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {}
|
|
5
|
-
export interface MobileDateTimePickerSlotProps
|
|
6
|
-
export interface MobileDateTimePickerProps
|
|
5
|
+
export interface MobileDateTimePickerSlotProps extends BaseDateTimePickerSlotProps, ExportedUseMobilePickerSlotProps {}
|
|
6
|
+
export interface MobileDateTimePickerProps extends BaseDateTimePickerProps, MobileOnlyPickerProps {
|
|
7
7
|
/**
|
|
8
8
|
* Overridable component slots.
|
|
9
9
|
* @default {}
|
|
@@ -13,5 +13,5 @@ export interface MobileDateTimePickerProps<TEnableAccessibleFieldDOMStructure ex
|
|
|
13
13
|
* The props used for each component slot.
|
|
14
14
|
* @default {}
|
|
15
15
|
*/
|
|
16
|
-
slotProps?: MobileDateTimePickerSlotProps
|
|
16
|
+
slotProps?: MobileDateTimePickerSlotProps;
|
|
17
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MobileTimePickerProps } from "./MobileTimePicker.types.mjs";
|
|
3
3
|
import { TimeView } from "../models/index.mjs";
|
|
4
|
-
type MobileTimePickerComponent = (
|
|
4
|
+
type MobileTimePickerComponent = ((props: MobileTimePickerProps<TimeView> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
5
5
|
propTypes?: any;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MobileTimePickerProps } from "./MobileTimePicker.types.js";
|
|
3
3
|
import { TimeView } from "../models/index.js";
|
|
4
|
-
type MobileTimePickerComponent = (
|
|
4
|
+
type MobileTimePickerComponent = ((props: MobileTimePickerProps<TimeView> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
5
5
|
propTypes?: any;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
@@ -131,10 +131,6 @@ MobileTimePicker.propTypes = {
|
|
|
131
131
|
* @default false
|
|
132
132
|
*/
|
|
133
133
|
disablePast: _propTypes.default.bool,
|
|
134
|
-
/**
|
|
135
|
-
* @default true
|
|
136
|
-
*/
|
|
137
|
-
enableAccessibleFieldDOMStructure: _propTypes.default.any,
|
|
138
134
|
/**
|
|
139
135
|
* Format of the date when rendered in the input(s).
|
|
140
136
|
* Defaults to localized format based on the used `views`.
|
|
@@ -124,10 +124,6 @@ MobileTimePicker.propTypes = {
|
|
|
124
124
|
* @default false
|
|
125
125
|
*/
|
|
126
126
|
disablePast: PropTypes.bool,
|
|
127
|
-
/**
|
|
128
|
-
* @default true
|
|
129
|
-
*/
|
|
130
|
-
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
131
127
|
/**
|
|
132
128
|
* Format of the date when rendered in the input(s).
|
|
133
129
|
* Defaults to localized format based on the used `views`.
|
|
@@ -4,8 +4,8 @@ import { BaseTimePickerProps, BaseTimePickerSlots, BaseTimePickerSlotProps } fro
|
|
|
4
4
|
import { TimeView } from "../models/index.mjs";
|
|
5
5
|
import { TimeViewWithMeridiem } from "../internals/models/index.mjs";
|
|
6
6
|
export interface MobileTimePickerSlots extends BaseTimePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {}
|
|
7
|
-
export interface MobileTimePickerSlotProps
|
|
8
|
-
export interface MobileTimePickerProps<TView extends TimeViewWithMeridiem = TimeView
|
|
7
|
+
export interface MobileTimePickerSlotProps extends BaseTimePickerSlotProps, ExportedUseMobilePickerSlotProps {}
|
|
8
|
+
export interface MobileTimePickerProps<TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerProps<TView>, MobileOnlyPickerProps {
|
|
9
9
|
/**
|
|
10
10
|
* Overridable component slots.
|
|
11
11
|
* @default {}
|
|
@@ -15,5 +15,5 @@ export interface MobileTimePickerProps<TView extends TimeViewWithMeridiem = Time
|
|
|
15
15
|
* The props used for each component slot.
|
|
16
16
|
* @default {}
|
|
17
17
|
*/
|
|
18
|
-
slotProps?: MobileTimePickerSlotProps
|
|
18
|
+
slotProps?: MobileTimePickerSlotProps;
|
|
19
19
|
}
|
|
@@ -4,8 +4,8 @@ import { BaseTimePickerProps, BaseTimePickerSlots, BaseTimePickerSlotProps } fro
|
|
|
4
4
|
import { TimeView } from "../models/index.js";
|
|
5
5
|
import { TimeViewWithMeridiem } from "../internals/models/index.js";
|
|
6
6
|
export interface MobileTimePickerSlots extends BaseTimePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {}
|
|
7
|
-
export interface MobileTimePickerSlotProps
|
|
8
|
-
export interface MobileTimePickerProps<TView extends TimeViewWithMeridiem = TimeView
|
|
7
|
+
export interface MobileTimePickerSlotProps extends BaseTimePickerSlotProps, ExportedUseMobilePickerSlotProps {}
|
|
8
|
+
export interface MobileTimePickerProps<TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerProps<TView>, MobileOnlyPickerProps {
|
|
9
9
|
/**
|
|
10
10
|
* Overridable component slots.
|
|
11
11
|
* @default {}
|
|
@@ -15,5 +15,5 @@ export interface MobileTimePickerProps<TView extends TimeViewWithMeridiem = Time
|
|
|
15
15
|
* The props used for each component slot.
|
|
16
16
|
* @default {}
|
|
17
17
|
*/
|
|
18
|
-
slotProps?: MobileTimePickerSlotProps
|
|
18
|
+
slotProps?: MobileTimePickerSlotProps;
|
|
19
19
|
}
|
|
@@ -45,10 +45,10 @@ const DefaultMonthButton = (0, _styles.styled)('button', {
|
|
|
45
45
|
borderRadius: 18,
|
|
46
46
|
cursor: 'pointer',
|
|
47
47
|
'&:focus': {
|
|
48
|
-
backgroundColor: theme.
|
|
48
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)
|
|
49
49
|
},
|
|
50
50
|
'&:hover': {
|
|
51
|
-
backgroundColor: theme.
|
|
51
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)
|
|
52
52
|
},
|
|
53
53
|
'&:disabled': {
|
|
54
54
|
cursor: 'auto',
|
|
@@ -4,7 +4,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
const _excluded = ["autoFocus", "classes", "disabled", "selected", "value", "onClick", "onKeyDown", "onFocus", "onBlur", "slots", "slotProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { styled
|
|
7
|
+
import { styled } from '@mui/material/styles';
|
|
8
8
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
@@ -38,10 +38,10 @@ const DefaultMonthButton = styled('button', {
|
|
|
38
38
|
borderRadius: 18,
|
|
39
39
|
cursor: 'pointer',
|
|
40
40
|
'&:focus': {
|
|
41
|
-
backgroundColor: theme.
|
|
41
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)
|
|
42
42
|
},
|
|
43
43
|
'&:hover': {
|
|
44
|
-
backgroundColor: theme.
|
|
44
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)
|
|
45
45
|
},
|
|
46
46
|
'&:disabled': {
|
|
47
47
|
cursor: 'auto',
|