@mui/x-date-pickers 7.0.0-alpha.3 → 7.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdapterLuxon/AdapterLuxon.d.ts +27 -27
- package/AdapterLuxon/AdapterLuxon.js +0 -1
- package/CHANGELOG.md +245 -0
- package/DateCalendar/DateCalendar.types.d.ts +6 -6
- package/DateCalendar/DayCalendar.d.ts +4 -4
- package/DateCalendar/index.d.ts +1 -1
- package/DateCalendar/useCalendarState.js +0 -1
- package/DateField/DateField.js +17 -50
- package/DateField/DateField.types.d.ts +5 -9
- package/DateField/useDateField.d.ts +2 -2
- package/DateField/useDateField.js +1 -5
- package/DatePicker/DatePicker.js +5 -1
- package/DatePicker/DatePicker.types.d.ts +6 -6
- package/DatePicker/index.d.ts +1 -1
- package/DatePicker/shared.d.ts +6 -6
- package/DateTimeField/DateTimeField.js +17 -50
- package/DateTimeField/DateTimeField.types.d.ts +5 -9
- package/DateTimeField/useDateTimeField.d.ts +2 -2
- package/DateTimeField/useDateTimeField.js +1 -5
- package/DateTimePicker/DateTimePicker.js +5 -1
- package/DateTimePicker/DateTimePicker.types.d.ts +6 -6
- package/DateTimePicker/index.d.ts +1 -1
- package/DateTimePicker/shared.d.ts +6 -6
- package/DesktopDatePicker/DesktopDatePicker.js +7 -2
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +6 -6
- package/DesktopDatePicker/index.d.ts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +8 -8
- package/DesktopDateTimePicker/index.d.ts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.js +5 -1
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +8 -8
- package/DesktopTimePicker/index.d.ts +1 -1
- package/DigitalClock/DigitalClock.types.d.ts +4 -4
- package/DigitalClock/index.d.ts +1 -1
- package/MobileDatePicker/MobileDatePicker.js +7 -2
- package/MobileDatePicker/MobileDatePicker.types.d.ts +6 -6
- package/MobileDatePicker/index.d.ts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +6 -6
- package/MobileDateTimePicker/index.d.ts +1 -1
- package/MobileTimePicker/MobileTimePicker.js +5 -1
- package/MobileTimePicker/MobileTimePicker.types.d.ts +6 -6
- package/MobileTimePicker/index.d.ts +1 -1
- package/MonthCalendar/MonthCalendar.js +0 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +4 -4
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +3 -3
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +8 -2
- package/MultiSectionDigitalClock/index.d.ts +1 -1
- package/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +2 -2
- package/PickersCalendarHeader/PickersCalendarHeader.js +4 -4
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +8 -8
- package/PickersCalendarHeader/index.d.ts +1 -1
- package/PickersLayout/PickersLayout.types.d.ts +6 -6
- package/PickersLayout/index.d.ts +1 -1
- package/StaticDatePicker/StaticDatePicker.js +1 -1
- package/StaticDatePicker/StaticDatePicker.types.d.ts +7 -7
- package/StaticDatePicker/index.d.ts +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +7 -7
- package/StaticDateTimePicker/index.d.ts +1 -1
- package/StaticTimePicker/StaticTimePicker.types.d.ts +7 -7
- package/StaticTimePicker/index.d.ts +1 -1
- package/TimeClock/Clock.js +0 -1
- package/TimeClock/ClockPointer.js +0 -1
- package/TimeClock/TimeClock.types.d.ts +5 -5
- package/TimeClock/index.d.ts +1 -1
- package/TimeField/TimeField.js +17 -50
- package/TimeField/TimeField.types.d.ts +5 -9
- package/TimeField/useTimeField.d.ts +2 -2
- package/TimeField/useTimeField.js +1 -5
- package/TimePicker/TimePicker.js +5 -1
- package/TimePicker/TimePicker.types.d.ts +6 -6
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/shared.d.ts +5 -5
- package/YearCalendar/YearCalendar.js +0 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/useClearableField.d.ts +32 -20
- package/hooks/useClearableField.js +32 -33
- package/index.js +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +9 -9
- package/internals/components/PickersArrowSwitcher/index.d.ts +3 -1
- package/internals/components/PickersArrowSwitcher/index.js +2 -1
- package/internals/components/PickersModalDialog.d.ts +4 -4
- package/internals/components/PickersPopper.d.ts +4 -4
- package/internals/components/PickersTextField/Outline.d.ts +7 -1
- package/internals/components/PickersTextField/Outline.js +2 -4
- package/internals/components/PickersTextField/PickersInput.d.ts +1 -2
- package/internals/components/PickersTextField/PickersInput.js +117 -112
- package/internals/components/PickersTextField/PickersInput.types.d.ts +35 -20
- package/internals/components/PickersTextField/PickersTextField.js +57 -48
- package/internals/components/PickersTextField/PickersTextField.types.d.ts +19 -16
- package/internals/components/PickersTextField/pickersTextFieldClasses.d.ts +11 -7
- package/internals/components/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/internals/constants/dimensions.d.ts +1 -1
- package/internals/constants/dimensions.js +1 -1
- package/internals/demo/DemoContainer.d.ts +4 -0
- package/internals/demo/DemoContainer.js +47 -19
- package/internals/hooks/useClockReferenceDate.js +0 -1
- package/internals/hooks/useDesktopPicker/index.d.ts +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -0
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +8 -8
- package/internals/hooks/useField/index.d.ts +1 -1
- package/internals/hooks/useField/useField.js +3 -3
- package/internals/hooks/useField/useField.types.d.ts +4 -24
- package/internals/hooks/useField/useField.utils.js +24 -6
- package/internals/hooks/useField/useFieldState.js +7 -3
- package/internals/hooks/useMobilePicker/index.d.ts +1 -1
- package/internals/hooks/useMobilePicker/useMobilePicker.js +3 -1
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -7
- package/internals/hooks/useStaticPicker/index.d.ts +1 -1
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +5 -5
- package/internals/hooks/useViews.js +0 -1
- package/internals/index.d.ts +7 -6
- package/internals/index.js +1 -0
- package/internals/models/props/basePickerProps.d.ts +4 -0
- package/internals/utils/convertFieldResponseIntoMuiTextFieldProps.d.ts +3 -0
- package/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +26 -0
- package/legacy/AdapterLuxon/AdapterLuxon.js +0 -1
- package/legacy/DateCalendar/useCalendarState.js +0 -1
- package/legacy/DateField/DateField.js +19 -47
- package/legacy/DateField/useDateField.js +1 -4
- package/legacy/DatePicker/DatePicker.js +5 -1
- package/legacy/DateTimeField/DateTimeField.js +19 -47
- package/legacy/DateTimeField/useDateTimeField.js +1 -4
- package/legacy/DateTimePicker/DateTimePicker.js +5 -1
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +7 -2
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +5 -1
- package/legacy/MobileDatePicker/MobileDatePicker.js +7 -2
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
- package/legacy/MobileTimePicker/MobileTimePicker.js +5 -1
- package/legacy/MonthCalendar/MonthCalendar.js +0 -1
- package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +8 -2
- package/legacy/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +2 -2
- package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +4 -4
- package/legacy/StaticDatePicker/StaticDatePicker.js +1 -1
- package/legacy/TimeClock/Clock.js +0 -1
- package/legacy/TimeClock/ClockPointer.js +0 -1
- package/legacy/TimeField/TimeField.js +19 -47
- package/legacy/TimeField/useTimeField.js +1 -4
- package/legacy/TimePicker/TimePicker.js +5 -1
- package/legacy/YearCalendar/YearCalendar.js +0 -1
- package/legacy/hooks/useClearableField.js +30 -32
- package/legacy/index.js +1 -1
- package/legacy/internals/components/PickersArrowSwitcher/index.js +2 -1
- package/legacy/internals/components/PickersTextField/Outline.js +1 -4
- package/legacy/internals/components/PickersTextField/PickersInput.js +119 -115
- package/legacy/internals/components/PickersTextField/PickersTextField.js +51 -51
- package/legacy/internals/components/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/legacy/internals/constants/dimensions.js +1 -1
- package/legacy/internals/demo/DemoContainer.js +45 -19
- package/legacy/internals/hooks/useClockReferenceDate.js +0 -1
- package/legacy/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -0
- package/legacy/internals/hooks/useField/useField.js +4 -4
- package/legacy/internals/hooks/useField/useField.utils.js +26 -6
- package/legacy/internals/hooks/useField/useFieldState.js +7 -3
- package/legacy/internals/hooks/useMobilePicker/useMobilePicker.js +3 -1
- package/legacy/internals/hooks/useViews.js +0 -1
- package/legacy/internals/index.js +1 -0
- package/legacy/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +24 -0
- package/legacy/locales/plPL.js +0 -1
- package/legacy/locales/svSE.js +0 -1
- package/legacy/locales/urPK.js +0 -1
- package/locales/plPL.js +0 -1
- package/locales/svSE.js +0 -1
- package/locales/urPK.js +0 -1
- package/models/fields.d.ts +2 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +0 -1
- package/modern/DateCalendar/useCalendarState.js +0 -1
- package/modern/DateField/DateField.js +17 -50
- package/modern/DateField/useDateField.js +1 -5
- package/modern/DatePicker/DatePicker.js +5 -1
- package/modern/DateTimeField/DateTimeField.js +17 -50
- package/modern/DateTimeField/useDateTimeField.js +1 -5
- package/modern/DateTimePicker/DateTimePicker.js +5 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +7 -2
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
- package/modern/DesktopTimePicker/DesktopTimePicker.js +5 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +7 -2
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +5 -1
- package/modern/MonthCalendar/MonthCalendar.js +0 -1
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +8 -2
- package/modern/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +2 -2
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +4 -4
- package/modern/StaticDatePicker/StaticDatePicker.js +1 -1
- package/modern/TimeClock/Clock.js +0 -1
- package/modern/TimeClock/ClockPointer.js +0 -1
- package/modern/TimeField/TimeField.js +17 -50
- package/modern/TimeField/useTimeField.js +1 -5
- package/modern/TimePicker/TimePicker.js +5 -1
- package/modern/YearCalendar/YearCalendar.js +0 -1
- package/modern/hooks/useClearableField.js +32 -33
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersArrowSwitcher/index.js +2 -1
- package/modern/internals/components/PickersTextField/Outline.js +2 -4
- package/modern/internals/components/PickersTextField/PickersInput.js +116 -112
- package/modern/internals/components/PickersTextField/PickersTextField.js +57 -47
- package/modern/internals/components/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/modern/internals/constants/dimensions.js +1 -1
- package/modern/internals/demo/DemoContainer.js +47 -19
- package/modern/internals/hooks/useClockReferenceDate.js +0 -1
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -0
- package/modern/internals/hooks/useField/useField.js +3 -3
- package/modern/internals/hooks/useField/useField.utils.js +24 -6
- package/modern/internals/hooks/useField/useFieldState.js +7 -3
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +3 -1
- package/modern/internals/hooks/useViews.js +0 -1
- package/modern/internals/index.js +1 -0
- package/modern/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +26 -0
- package/modern/locales/plPL.js +0 -1
- package/modern/locales/svSE.js +0 -1
- package/modern/locales/urPK.js +0 -1
- package/node/AdapterLuxon/AdapterLuxon.js +0 -1
- package/node/DateCalendar/useCalendarState.js +0 -1
- package/node/DateField/DateField.js +18 -51
- package/node/DateField/useDateField.js +1 -5
- package/node/DatePicker/DatePicker.js +5 -1
- package/node/DateTimeField/DateTimeField.js +18 -51
- package/node/DateTimeField/useDateTimeField.js +1 -5
- package/node/DateTimePicker/DateTimePicker.js +5 -1
- package/node/DesktopDatePicker/DesktopDatePicker.js +10 -5
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
- package/node/DesktopTimePicker/DesktopTimePicker.js +5 -1
- package/node/MobileDatePicker/MobileDatePicker.js +10 -5
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
- package/node/MobileTimePicker/MobileTimePicker.js +5 -1
- package/node/MonthCalendar/MonthCalendar.js +0 -1
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +8 -2
- package/node/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +2 -2
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +4 -4
- package/node/StaticDatePicker/StaticDatePicker.js +2 -2
- package/node/TimeClock/Clock.js +0 -1
- package/node/TimeClock/ClockPointer.js +0 -1
- package/node/TimeField/TimeField.js +18 -51
- package/node/TimeField/useTimeField.js +1 -5
- package/node/TimePicker/TimePicker.js +5 -1
- package/node/YearCalendar/YearCalendar.js +0 -1
- package/node/hooks/useClearableField.js +33 -34
- package/node/index.js +1 -1
- package/node/internals/components/PickersArrowSwitcher/index.js +14 -1
- package/node/internals/components/PickersTextField/Outline.js +2 -4
- package/node/internals/components/PickersTextField/PickersInput.js +119 -115
- package/node/internals/components/PickersTextField/PickersTextField.js +58 -48
- package/node/internals/components/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/node/internals/constants/dimensions.js +1 -1
- package/node/internals/demo/DemoContainer.js +47 -19
- package/node/internals/hooks/useClockReferenceDate.js +0 -1
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -0
- package/node/internals/hooks/useField/useField.js +3 -3
- package/node/internals/hooks/useField/useField.utils.js +24 -6
- package/node/internals/hooks/useField/useFieldState.js +7 -3
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +3 -1
- package/node/internals/hooks/useViews.js +0 -1
- package/node/internals/index.js +7 -0
- package/node/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +34 -0
- package/node/locales/plPL.js +0 -1
- package/node/locales/svSE.js +0 -1
- package/node/locales/urPK.js +0 -1
- package/package.json +6 -6
- package/themeAugmentation/overrides.d.ts +5 -7
- package/themeAugmentation/props.d.ts +6 -8
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseDatePickerProps,
|
|
1
|
+
import { UseMobilePickerSlots, MobileOnlyPickerProps, ExportedUseMobilePickerSlotProps } from '../internals/hooks/useMobilePicker';
|
|
2
|
+
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from '../DatePicker/shared';
|
|
3
3
|
import { MakeOptional } from '../internals/models/helpers';
|
|
4
4
|
import { DateView } from '../models';
|
|
5
|
-
export interface
|
|
5
|
+
export interface MobileDatePickerSlots<TDate> extends BaseDatePickerSlots<TDate>, MakeOptional<UseMobilePickerSlots<TDate, DateView>, 'field'> {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface MobileDatePickerSlotProps<TDate> extends BaseDatePickerSlotProps<TDate>, ExportedUseMobilePickerSlotProps<TDate, DateView> {
|
|
8
8
|
}
|
|
9
9
|
export interface MobileDatePickerProps<TDate> extends BaseDatePickerProps<TDate>, MobileOnlyPickerProps<TDate> {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
13
13
|
*/
|
|
14
|
-
slots?:
|
|
14
|
+
slots?: MobileDatePickerSlots<TDate>;
|
|
15
15
|
/**
|
|
16
16
|
* The props used for each component slot.
|
|
17
17
|
* @default {}
|
|
18
18
|
*/
|
|
19
|
-
slotProps?:
|
|
19
|
+
slotProps?: MobileDatePickerSlotProps<TDate>;
|
|
20
20
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MobileDatePicker } from './MobileDatePicker';
|
|
2
|
-
export type { MobileDatePickerProps,
|
|
2
|
+
export type { MobileDatePickerProps, MobileDatePickerSlots, MobileDatePickerSlotProps, } from './MobileDatePicker.types';
|
|
@@ -224,6 +224,10 @@ MobileDateTimePicker.propTypes = {
|
|
|
224
224
|
* @default 3
|
|
225
225
|
*/
|
|
226
226
|
monthsPerRow: PropTypes.oneOf([3, 4]),
|
|
227
|
+
/**
|
|
228
|
+
* Name attribute used by the `input` element in the Field.
|
|
229
|
+
*/
|
|
230
|
+
name: PropTypes.string,
|
|
227
231
|
/**
|
|
228
232
|
* Callback fired when the value is accepted.
|
|
229
233
|
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
@@ -322,7 +326,7 @@ MobileDateTimePicker.propTypes = {
|
|
|
322
326
|
* 4. If `null` is provided, no section will be selected
|
|
323
327
|
* If not provided, the selected sections will be handled internally.
|
|
324
328
|
*/
|
|
325
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
329
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
326
330
|
endIndex: PropTypes.number.isRequired,
|
|
327
331
|
startIndex: PropTypes.number.isRequired
|
|
328
332
|
})]),
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseDateTimePickerProps,
|
|
1
|
+
import { UseMobilePickerSlots, ExportedUseMobilePickerSlotProps, MobileOnlyPickerProps } from '../internals/hooks/useMobilePicker';
|
|
2
|
+
import { BaseDateTimePickerProps, BaseDateTimePickerSlots, BaseDateTimePickerSlotProps } from '../DateTimePicker/shared';
|
|
3
3
|
import { MakeOptional } from '../internals/models/helpers';
|
|
4
4
|
import { DateOrTimeView } from '../models';
|
|
5
5
|
import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
6
|
-
export interface
|
|
6
|
+
export interface MobileDateTimePickerSlots<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerSlots<TDate>, MakeOptional<UseMobilePickerSlots<TDate, TView>, 'field'> {
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface MobileDateTimePickerSlotProps<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerSlotProps<TDate>, ExportedUseMobilePickerSlotProps<TDate, TView> {
|
|
9
9
|
}
|
|
10
10
|
export interface MobileDateTimePickerProps<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerProps<TDate, TView>, MobileOnlyPickerProps<TDate> {
|
|
11
11
|
/**
|
|
12
12
|
* Overridable component slots.
|
|
13
13
|
* @default {}
|
|
14
14
|
*/
|
|
15
|
-
slots?:
|
|
15
|
+
slots?: MobileDateTimePickerSlots<TDate, TView>;
|
|
16
16
|
/**
|
|
17
17
|
* The props used for each component slot.
|
|
18
18
|
* @default {}
|
|
19
19
|
*/
|
|
20
|
-
slotProps?:
|
|
20
|
+
slotProps?: MobileDateTimePickerSlotProps<TDate, TView>;
|
|
21
21
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MobileDateTimePicker } from './MobileDateTimePicker';
|
|
2
|
-
export type { MobileDateTimePickerProps,
|
|
2
|
+
export type { MobileDateTimePickerProps, MobileDateTimePickerSlots, MobileDateTimePickerSlotProps, } from './MobileDateTimePicker.types';
|
|
@@ -168,6 +168,10 @@ MobileTimePicker.propTypes = {
|
|
|
168
168
|
* @default 1
|
|
169
169
|
*/
|
|
170
170
|
minutesStep: PropTypes.number,
|
|
171
|
+
/**
|
|
172
|
+
* Name attribute used by the `input` element in the Field.
|
|
173
|
+
*/
|
|
174
|
+
name: PropTypes.string,
|
|
171
175
|
/**
|
|
172
176
|
* Callback fired when the value is accepted.
|
|
173
177
|
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
@@ -248,7 +252,7 @@ MobileTimePicker.propTypes = {
|
|
|
248
252
|
* 4. If `null` is provided, no section will be selected
|
|
249
253
|
* If not provided, the selected sections will be handled internally.
|
|
250
254
|
*/
|
|
251
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
255
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
252
256
|
endIndex: PropTypes.number.isRequired,
|
|
253
257
|
startIndex: PropTypes.number.isRequired
|
|
254
258
|
})]),
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseTimePickerProps,
|
|
1
|
+
import { UseMobilePickerSlots, ExportedUseMobilePickerSlotProps, MobileOnlyPickerProps } from '../internals/hooks/useMobilePicker';
|
|
2
|
+
import { BaseTimePickerProps, BaseTimePickerSlots, BaseTimePickerSlotProps } from '../TimePicker/shared';
|
|
3
3
|
import { MakeOptional } from '../internals/models/helpers';
|
|
4
4
|
import { TimeView } from '../models';
|
|
5
5
|
import { TimeViewWithMeridiem } from '../internals/models';
|
|
6
|
-
export interface
|
|
6
|
+
export interface MobileTimePickerSlots<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerSlots<TDate>, MakeOptional<UseMobilePickerSlots<TDate, TView>, 'field'> {
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface MobileTimePickerSlotProps<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerSlotProps, ExportedUseMobilePickerSlotProps<TDate, TView> {
|
|
9
9
|
}
|
|
10
10
|
export interface MobileTimePickerProps<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerProps<TDate, TView>, MobileOnlyPickerProps<TDate> {
|
|
11
11
|
/**
|
|
12
12
|
* Overridable component slots.
|
|
13
13
|
* @default {}
|
|
14
14
|
*/
|
|
15
|
-
slots?:
|
|
15
|
+
slots?: MobileTimePickerSlots<TDate, TView>;
|
|
16
16
|
/**
|
|
17
17
|
* The props used for each component slot.
|
|
18
18
|
* @default {}
|
|
19
19
|
*/
|
|
20
|
-
slotProps?:
|
|
20
|
+
slotProps?: MobileTimePickerSlotProps<TDate, TView>;
|
|
21
21
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MobileTimePicker } from './MobileTimePicker';
|
|
2
|
-
export type { MobileTimePickerProps,
|
|
2
|
+
export type { MobileTimePickerProps, MobileTimePickerSlots, MobileTimePickerSlotProps, } from './MobileTimePicker.types';
|
|
@@ -110,7 +110,6 @@ export const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalenda
|
|
|
110
110
|
granularity: SECTION_TYPE_GRANULARITY.month
|
|
111
111
|
}), [] // eslint-disable-line react-hooks/exhaustive-deps
|
|
112
112
|
);
|
|
113
|
-
|
|
114
113
|
const ownerState = props;
|
|
115
114
|
const classes = useUtilityClasses(ownerState);
|
|
116
115
|
const todayMonth = React.useMemo(() => utils.getMonth(now), [utils, now]);
|
|
@@ -17,14 +17,14 @@ export interface ExportedMultiSectionDigitalClockProps<TDate> extends ExportedBa
|
|
|
17
17
|
}
|
|
18
18
|
export interface MultiSectionDigitalClockViewProps<TValue> extends Pick<MultiSectionDigitalClockSectionProps<TValue>, 'onChange' | 'items'> {
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
20
|
+
export interface MultiSectionDigitalClockSlots {
|
|
21
21
|
/**
|
|
22
22
|
* Component responsible for rendering a single multi section digital clock section item.
|
|
23
23
|
* @default MenuItem from '@mui/material'
|
|
24
24
|
*/
|
|
25
25
|
digitalClockSectionItem?: React.ElementType;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface MultiSectionDigitalClockSlotProps {
|
|
28
28
|
digitalClockSectionItem?: SlotComponentProps<typeof MenuItem, {}, Record<string, any>>;
|
|
29
29
|
}
|
|
30
30
|
export interface MultiSectionDigitalClockProps<TDate> extends ExportedMultiSectionDigitalClockProps<TDate>, BaseClockProps<TDate, TimeViewWithMeridiem> {
|
|
@@ -36,10 +36,10 @@ export interface MultiSectionDigitalClockProps<TDate> extends ExportedMultiSecti
|
|
|
36
36
|
* Overrideable component slots.
|
|
37
37
|
* @default {}
|
|
38
38
|
*/
|
|
39
|
-
slots?:
|
|
39
|
+
slots?: MultiSectionDigitalClockSlots;
|
|
40
40
|
/**
|
|
41
41
|
* The props used for each component slot.
|
|
42
42
|
* @default {}
|
|
43
43
|
*/
|
|
44
|
-
slotProps?:
|
|
44
|
+
slotProps?: MultiSectionDigitalClockSlotProps;
|
|
45
45
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MultiSectionDigitalClockSectionClasses } from './multiSectionDigitalClockSectionClasses';
|
|
3
|
-
import type { MultiSectionDigitalClockOption,
|
|
3
|
+
import type { MultiSectionDigitalClockOption, MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from './MultiSectionDigitalClock.types';
|
|
4
4
|
export interface ExportedMultiSectionDigitalClockSectionProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
classes?: Partial<MultiSectionDigitalClockSectionClasses>;
|
|
7
|
-
slots?:
|
|
8
|
-
slotProps?:
|
|
7
|
+
slots?: MultiSectionDigitalClockSlots;
|
|
8
|
+
slotProps?: MultiSectionDigitalClockSlotProps;
|
|
9
9
|
}
|
|
10
10
|
export interface MultiSectionDigitalClockSectionProps<TValue> extends ExportedMultiSectionDigitalClockSectionProps {
|
|
11
11
|
autoFocus?: boolean;
|
|
@@ -36,7 +36,12 @@ const MultiSectionDigitalClockSectionRoot = styled(MenuList, {
|
|
|
36
36
|
'@media (prefers-reduced-motion: no-preference)': {
|
|
37
37
|
scrollBehavior: ownerState.alreadyRendered ? 'smooth' : 'auto'
|
|
38
38
|
},
|
|
39
|
-
'
|
|
39
|
+
'@media (pointer: fine)': {
|
|
40
|
+
'&:hover': {
|
|
41
|
+
overflowY: 'auto'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
'@media (pointer: none), (pointer: coarse)': {
|
|
40
45
|
overflowY: 'auto'
|
|
41
46
|
},
|
|
42
47
|
'&:not(:first-of-type)': {
|
|
@@ -154,7 +159,8 @@ export const MultiSectionDigitalClockSection = /*#__PURE__*/React.forwardRef(fun
|
|
|
154
159
|
"aria-disabled": readOnly,
|
|
155
160
|
"aria-label": option.ariaLabel,
|
|
156
161
|
"aria-selected": isSelected,
|
|
157
|
-
tabIndex: tabIndex
|
|
162
|
+
tabIndex: tabIndex,
|
|
163
|
+
className: classes.item
|
|
158
164
|
}, slotProps == null ? void 0 : slotProps.digitalClockSectionItem, {
|
|
159
165
|
children: option.label
|
|
160
166
|
}), option.label);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { MultiSectionDigitalClock } from './MultiSectionDigitalClock';
|
|
2
|
-
export type { MultiSectionDigitalClockProps,
|
|
2
|
+
export type { MultiSectionDigitalClockProps, MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps, } from './MultiSectionDigitalClock.types';
|
|
3
3
|
export { multiSectionDigitalClockSectionClasses } from './multiSectionDigitalClockSectionClasses';
|
|
4
4
|
export type { MultiSectionDigitalClockSectionClasses, MultiSectionDigitalClockSectionClassKey, } from './multiSectionDigitalClockSectionClasses';
|
|
5
5
|
export type { ExportedMultiSectionDigitalClockSectionProps } from './MultiSectionDigitalClockSection';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
2
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
3
|
export function getMultiSectionDigitalClockSectionUtilityClass(slot) {
|
|
4
|
-
return generateUtilityClass('
|
|
4
|
+
return generateUtilityClass('MuiMultiSectionDigitalClockSection', slot);
|
|
5
5
|
}
|
|
6
|
-
export const multiSectionDigitalClockSectionClasses = generateUtilityClasses('
|
|
6
|
+
export const multiSectionDigitalClockSectionClasses = generateUtilityClasses('MuiMultiSectionDigitalClockSection', ['root', 'item']);
|
|
@@ -38,13 +38,13 @@ const PickersCalendarHeaderRoot = styled('div', {
|
|
|
38
38
|
})({
|
|
39
39
|
display: 'flex',
|
|
40
40
|
alignItems: 'center',
|
|
41
|
-
marginTop:
|
|
42
|
-
marginBottom:
|
|
41
|
+
marginTop: 12,
|
|
42
|
+
marginBottom: 4,
|
|
43
43
|
paddingLeft: 24,
|
|
44
44
|
paddingRight: 12,
|
|
45
45
|
// prevent jumping in safari
|
|
46
|
-
maxHeight:
|
|
47
|
-
minHeight:
|
|
46
|
+
maxHeight: 40,
|
|
47
|
+
minHeight: 40
|
|
48
48
|
});
|
|
49
49
|
const PickersCalendarHeaderLabelContainer = styled('div', {
|
|
50
50
|
name: 'MuiPickersCalendarHeader',
|
|
@@ -3,12 +3,12 @@ import { SlotComponentProps } from '@mui/base/utils';
|
|
|
3
3
|
import IconButton from '@mui/material/IconButton';
|
|
4
4
|
import SvgIcon from '@mui/material/SvgIcon';
|
|
5
5
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
6
|
-
import { ExportedPickersArrowSwitcherProps,
|
|
6
|
+
import { ExportedPickersArrowSwitcherProps, PickersArrowSwitcherSlots, PickersArrowSwitcherSlotProps } from '../internals/components/PickersArrowSwitcher';
|
|
7
7
|
import { MonthValidationOptions } from '../internals/hooks/date-helpers-hooks';
|
|
8
8
|
import { DateView } from '../models/views';
|
|
9
9
|
import { SlideDirection } from '../DateCalendar/PickersSlideTransition';
|
|
10
10
|
import { PickersCalendarHeaderClasses } from './pickersCalendarHeaderClasses';
|
|
11
|
-
export interface
|
|
11
|
+
export interface PickersCalendarHeaderSlots extends PickersArrowSwitcherSlots {
|
|
12
12
|
/**
|
|
13
13
|
* Button displayed to switch between different calendar views.
|
|
14
14
|
* @default IconButton
|
|
@@ -20,24 +20,24 @@ export interface PickersCalendarHeaderSlotsComponent extends PickersArrowSwitche
|
|
|
20
20
|
*/
|
|
21
21
|
switchViewIcon?: React.ElementType;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface PickersCalendarHeaderSlotPropsOverrides {
|
|
24
24
|
}
|
|
25
25
|
export type PickersCalendarHeaderOwnerState<TDate> = PickersCalendarHeaderProps<TDate>;
|
|
26
|
-
export interface
|
|
27
|
-
switchViewButton?: SlotComponentProps<typeof IconButton,
|
|
28
|
-
switchViewIcon?: SlotComponentProps<typeof SvgIcon,
|
|
26
|
+
export interface PickersCalendarHeaderSlotProps<TDate> extends PickersArrowSwitcherSlotProps {
|
|
27
|
+
switchViewButton?: SlotComponentProps<typeof IconButton, PickersCalendarHeaderSlotPropsOverrides, PickersCalendarHeaderOwnerState<TDate>>;
|
|
28
|
+
switchViewIcon?: SlotComponentProps<typeof SvgIcon, PickersCalendarHeaderSlotPropsOverrides, undefined>;
|
|
29
29
|
}
|
|
30
30
|
export interface PickersCalendarHeaderProps<TDate> extends ExportedPickersArrowSwitcherProps, MonthValidationOptions<TDate> {
|
|
31
31
|
/**
|
|
32
32
|
* Overridable component slots.
|
|
33
33
|
* @default {}
|
|
34
34
|
*/
|
|
35
|
-
slots?:
|
|
35
|
+
slots?: PickersCalendarHeaderSlots;
|
|
36
36
|
/**
|
|
37
37
|
* The props used for each component slot.
|
|
38
38
|
* @default {}
|
|
39
39
|
*/
|
|
40
|
-
slotProps?:
|
|
40
|
+
slotProps?: PickersCalendarHeaderSlotProps<TDate>;
|
|
41
41
|
currentMonth: TDate;
|
|
42
42
|
disabled?: boolean;
|
|
43
43
|
views: readonly DateView[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { pickersCalendarHeaderClasses } from './pickersCalendarHeaderClasses';
|
|
2
2
|
export type { PickersCalendarHeaderClassKey, PickersCalendarHeaderClasses, } from './pickersCalendarHeaderClasses';
|
|
3
3
|
export { PickersCalendarHeader } from './PickersCalendarHeader';
|
|
4
|
-
export type { PickersCalendarHeaderProps,
|
|
4
|
+
export type { PickersCalendarHeaderProps, PickersCalendarHeaderSlots, PickersCalendarHeaderSlotProps, ExportedPickersCalendarHeaderProps, } from './PickersCalendarHeader.types';
|
|
@@ -8,7 +8,7 @@ import { UsePickerLayoutPropsResponseLayoutProps } from '../internals/hooks/useP
|
|
|
8
8
|
import { PickersLayoutClasses } from './pickersLayoutClasses';
|
|
9
9
|
import { DateOrTimeViewWithMeridiem, WrapperVariant } from '../internals/models/common';
|
|
10
10
|
import { PickersShortcutsProps } from '../PickersShortcuts';
|
|
11
|
-
export interface
|
|
11
|
+
export interface ExportedPickersLayoutSlots<TValue, TDate, TView extends DateOrTimeViewWithMeridiem> {
|
|
12
12
|
/**
|
|
13
13
|
* Custom component for the action bar, it is placed below the picker views.
|
|
14
14
|
* @default PickersActionBar
|
|
@@ -31,7 +31,7 @@ interface PickersLayoutActionBarOwnerState<TValue, TDate, TView extends DateOrTi
|
|
|
31
31
|
interface PickersShortcutsOwnerState<TValue> extends PickersShortcutsProps<TValue> {
|
|
32
32
|
wrapperVariant: WrapperVariant;
|
|
33
33
|
}
|
|
34
|
-
export interface
|
|
34
|
+
export interface ExportedPickersLayoutSlotProps<TValue, TDate, TView extends DateOrTimeViewWithMeridiem> {
|
|
35
35
|
/**
|
|
36
36
|
* Props passed down to the action bar component.
|
|
37
37
|
*/
|
|
@@ -45,7 +45,7 @@ export interface ExportedPickersLayoutSlotsComponentsProps<TValue, TDate, TView
|
|
|
45
45
|
*/
|
|
46
46
|
layout?: Partial<PickersLayoutProps<TValue, TDate, TView>>;
|
|
47
47
|
}
|
|
48
|
-
export interface
|
|
48
|
+
export interface PickersLayoutSlots<TValue, TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedPickersLayoutSlots<TValue, TDate, TView> {
|
|
49
49
|
/**
|
|
50
50
|
* Tabs enabling toggling between views.
|
|
51
51
|
*/
|
|
@@ -56,7 +56,7 @@ export interface PickersLayoutSlotsComponent<TValue, TDate, TView extends DateOr
|
|
|
56
56
|
*/
|
|
57
57
|
toolbar?: React.JSXElementConstructor<BaseToolbarProps<TValue, TView>>;
|
|
58
58
|
}
|
|
59
|
-
export interface
|
|
59
|
+
export interface PickersLayoutSlotProps<TValue, TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedPickersLayoutSlotProps<TValue, TDate, TView> {
|
|
60
60
|
/**
|
|
61
61
|
* Props passed down to the tabs component.
|
|
62
62
|
*/
|
|
@@ -80,12 +80,12 @@ export interface PickersLayoutProps<TValue, TDate, TView extends DateOrTimeViewW
|
|
|
80
80
|
* Overridable component slots.
|
|
81
81
|
* @default {}
|
|
82
82
|
*/
|
|
83
|
-
slots?:
|
|
83
|
+
slots?: PickersLayoutSlots<TValue, TDate, TView>;
|
|
84
84
|
/**
|
|
85
85
|
* The props used for each component slot.
|
|
86
86
|
* @default {}
|
|
87
87
|
*/
|
|
88
|
-
slotProps?:
|
|
88
|
+
slotProps?: PickersLayoutSlotProps<TValue, TDate, TView>;
|
|
89
89
|
}
|
|
90
90
|
export interface SubComponents {
|
|
91
91
|
toolbar: React.ReactNode;
|
package/PickersLayout/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { PickersLayout, PickersLayoutRoot, PickersLayoutContentWrapper } from './PickersLayout';
|
|
2
|
-
export type { PickersLayoutProps,
|
|
2
|
+
export type { PickersLayoutProps, PickersLayoutSlots, PickersLayoutSlotProps, ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, } from './PickersLayout.types';
|
|
3
3
|
export { default as usePickerLayout } from './usePickerLayout';
|
|
4
4
|
export { pickersLayoutClasses } from './pickersLayoutClasses';
|
|
5
5
|
export type { PickersLayoutClassKey } from './pickersLayoutClasses';
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { useDatePickerDefaultizedProps } from '../DatePicker/shared';
|
|
5
5
|
import { renderDateViewCalendar } from '../dateViewRenderers';
|
|
6
6
|
import { useStaticPicker } from '../internals/hooks/useStaticPicker';
|
|
7
|
-
import { validateDate } from '../internals';
|
|
7
|
+
import { validateDate } from '../internals/utils/validation/validateDate';
|
|
8
8
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
9
9
|
/**
|
|
10
10
|
* Demos:
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { BaseDatePickerProps,
|
|
2
|
-
import { StaticOnlyPickerProps,
|
|
3
|
-
import { MakeOptional } from '../internals';
|
|
1
|
+
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from '../DatePicker/shared';
|
|
2
|
+
import { StaticOnlyPickerProps, UseStaticPickerSlots, UseStaticPickerSlotProps } from '../internals/hooks/useStaticPicker';
|
|
3
|
+
import { MakeOptional } from '../internals/models/helpers';
|
|
4
4
|
import { DateView } from '../models';
|
|
5
|
-
export interface
|
|
5
|
+
export interface StaticDatePickerSlots<TDate> extends BaseDatePickerSlots<TDate>, UseStaticPickerSlots<TDate, DateView> {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface StaticDatePickerSlotProps<TDate> extends BaseDatePickerSlotProps<TDate>, UseStaticPickerSlotProps<TDate, DateView> {
|
|
8
8
|
}
|
|
9
9
|
export interface StaticDatePickerProps<TDate> extends BaseDatePickerProps<TDate>, MakeOptional<StaticOnlyPickerProps, 'displayStaticWrapperAs'> {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
13
13
|
*/
|
|
14
|
-
slots?:
|
|
14
|
+
slots?: StaticDatePickerSlots<TDate>;
|
|
15
15
|
/**
|
|
16
16
|
* The props used for each component slot.
|
|
17
17
|
* @default {}
|
|
18
18
|
*/
|
|
19
|
-
slotProps?:
|
|
19
|
+
slotProps?: StaticDatePickerSlotProps<TDate>;
|
|
20
20
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { StaticDatePicker } from './StaticDatePicker';
|
|
2
|
-
export type { StaticDatePickerProps,
|
|
2
|
+
export type { StaticDatePickerProps, StaticDatePickerSlots, StaticDatePickerSlotProps, } from './StaticDatePicker.types';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { BaseDateTimePickerProps,
|
|
2
|
-
import { StaticOnlyPickerProps,
|
|
3
|
-
import { MakeOptional } from '../internals';
|
|
1
|
+
import { BaseDateTimePickerProps, BaseDateTimePickerSlots, BaseDateTimePickerSlotProps } from '../DateTimePicker/shared';
|
|
2
|
+
import { StaticOnlyPickerProps, UseStaticPickerSlots, UseStaticPickerSlotProps } from '../internals/hooks/useStaticPicker';
|
|
3
|
+
import { MakeOptional } from '../internals/models/helpers';
|
|
4
4
|
import { DateOrTimeView } from '../models';
|
|
5
|
-
export interface
|
|
5
|
+
export interface StaticDateTimePickerSlots<TDate> extends BaseDateTimePickerSlots<TDate>, UseStaticPickerSlots<TDate, DateOrTimeView> {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface StaticDateTimePickerSlotProps<TDate> extends BaseDateTimePickerSlotProps<TDate>, UseStaticPickerSlotProps<TDate, DateOrTimeView> {
|
|
8
8
|
}
|
|
9
9
|
export interface StaticDateTimePickerProps<TDate> extends BaseDateTimePickerProps<TDate, DateOrTimeView>, MakeOptional<StaticOnlyPickerProps, 'displayStaticWrapperAs'> {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
13
13
|
*/
|
|
14
|
-
slots?:
|
|
14
|
+
slots?: StaticDateTimePickerSlots<TDate>;
|
|
15
15
|
/**
|
|
16
16
|
* The props used for each component slot.
|
|
17
17
|
* @default {}
|
|
18
18
|
*/
|
|
19
|
-
slotProps?:
|
|
19
|
+
slotProps?: StaticDateTimePickerSlotProps<TDate>;
|
|
20
20
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { StaticDateTimePicker } from './StaticDateTimePicker';
|
|
2
|
-
export type { StaticDateTimePickerProps,
|
|
2
|
+
export type { StaticDateTimePickerProps, StaticDateTimePickerSlots, StaticDateTimePickerSlotProps, } from './StaticDateTimePicker.types';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { BaseTimePickerProps,
|
|
2
|
-
import { StaticOnlyPickerProps,
|
|
3
|
-
import { MakeOptional } from '../internals';
|
|
1
|
+
import { BaseTimePickerProps, BaseTimePickerSlots, BaseTimePickerSlotProps } from '../TimePicker/shared';
|
|
2
|
+
import { StaticOnlyPickerProps, UseStaticPickerSlots, UseStaticPickerSlotProps } from '../internals/hooks/useStaticPicker';
|
|
3
|
+
import { MakeOptional } from '../internals/models/helpers';
|
|
4
4
|
import { TimeView } from '../models';
|
|
5
|
-
export interface
|
|
5
|
+
export interface StaticTimePickerSlots<TDate> extends BaseTimePickerSlots<TDate>, UseStaticPickerSlots<TDate, TimeView> {
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface StaticTimePickerSlotProps<TDate> extends BaseTimePickerSlotProps, UseStaticPickerSlotProps<TDate, TimeView> {
|
|
8
8
|
}
|
|
9
9
|
export interface StaticTimePickerProps<TDate> extends BaseTimePickerProps<TDate, TimeView>, MakeOptional<StaticOnlyPickerProps, 'displayStaticWrapperAs'> {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
13
13
|
*/
|
|
14
|
-
slots?:
|
|
14
|
+
slots?: StaticTimePickerSlots<TDate>;
|
|
15
15
|
/**
|
|
16
16
|
* The props used for each component slot.
|
|
17
17
|
* @default {}
|
|
18
18
|
*/
|
|
19
|
-
slotProps?:
|
|
19
|
+
slotProps?: StaticTimePickerSlotProps<TDate>;
|
|
20
20
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { StaticTimePicker } from './StaticTimePicker';
|
|
2
|
-
export type { StaticTimePickerProps,
|
|
2
|
+
export type { StaticTimePickerProps, StaticTimePickerSlots, StaticTimePickerSlotProps, } from './StaticTimePicker.types';
|
package/TimeClock/Clock.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimeClockClasses } from './timeClockClasses';
|
|
2
|
-
import {
|
|
2
|
+
import { PickersArrowSwitcherSlots, PickersArrowSwitcherSlotProps } from '../internals/components/PickersArrowSwitcher';
|
|
3
3
|
import { BaseClockProps, ExportedBaseClockProps } from '../internals/models/props/clock';
|
|
4
4
|
import { TimeView } from '../models';
|
|
5
5
|
import { TimeViewWithMeridiem } from '../internals/models';
|
|
@@ -10,9 +10,9 @@ export interface ExportedTimeClockProps<TDate> extends ExportedBaseClockProps<TD
|
|
|
10
10
|
*/
|
|
11
11
|
ampmInClock?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface TimeClockSlots extends PickersArrowSwitcherSlots {
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface TimeClockSlotProps extends PickersArrowSwitcherSlotProps {
|
|
16
16
|
}
|
|
17
17
|
export interface TimeClockProps<TDate, TView extends TimeViewWithMeridiem = TimeView> extends ExportedTimeClockProps<TDate>, BaseClockProps<TDate, TView> {
|
|
18
18
|
/**
|
|
@@ -23,11 +23,11 @@ export interface TimeClockProps<TDate, TView extends TimeViewWithMeridiem = Time
|
|
|
23
23
|
* Overridable component slots.
|
|
24
24
|
* @default {}
|
|
25
25
|
*/
|
|
26
|
-
slots?:
|
|
26
|
+
slots?: TimeClockSlots;
|
|
27
27
|
/**
|
|
28
28
|
* The props used for each component slot.
|
|
29
29
|
* @default {}
|
|
30
30
|
*/
|
|
31
|
-
slotProps?:
|
|
31
|
+
slotProps?: TimeClockSlotProps;
|
|
32
32
|
showViewSwitcher?: boolean;
|
|
33
33
|
}
|
package/TimeClock/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { TimeClock } from './TimeClock';
|
|
2
|
-
export type { TimeClockProps,
|
|
2
|
+
export type { TimeClockProps, TimeClockSlots, TimeClockSlotProps } from './TimeClock.types';
|
|
3
3
|
export { clockClasses } from './clockClasses';
|
|
4
4
|
export type { ClockClasses, ClockClassKey } from './clockClasses';
|
|
5
5
|
export type { ClockProps } from './Clock';
|