@mui/x-date-pickers 7.0.0-alpha.4 → 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.
Files changed (173) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/DateCalendar/DateCalendar.types.d.ts +6 -6
  3. package/DateCalendar/DayCalendar.d.ts +4 -4
  4. package/DateCalendar/index.d.ts +1 -1
  5. package/DateField/DateField.js +17 -50
  6. package/DateField/DateField.types.d.ts +5 -9
  7. package/DateField/useDateField.d.ts +2 -2
  8. package/DateField/useDateField.js +1 -5
  9. package/DatePicker/DatePicker.js +5 -1
  10. package/DatePicker/DatePicker.types.d.ts +6 -6
  11. package/DatePicker/index.d.ts +1 -1
  12. package/DatePicker/shared.d.ts +6 -6
  13. package/DateTimeField/DateTimeField.js +17 -50
  14. package/DateTimeField/DateTimeField.types.d.ts +5 -9
  15. package/DateTimeField/useDateTimeField.d.ts +2 -2
  16. package/DateTimeField/useDateTimeField.js +1 -5
  17. package/DateTimePicker/DateTimePicker.js +5 -1
  18. package/DateTimePicker/DateTimePicker.types.d.ts +6 -6
  19. package/DateTimePicker/index.d.ts +1 -1
  20. package/DateTimePicker/shared.d.ts +6 -6
  21. package/DesktopDatePicker/DesktopDatePicker.js +7 -2
  22. package/DesktopDatePicker/DesktopDatePicker.types.d.ts +6 -6
  23. package/DesktopDatePicker/index.d.ts +1 -1
  24. package/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
  25. package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +8 -8
  26. package/DesktopDateTimePicker/index.d.ts +1 -1
  27. package/DesktopTimePicker/DesktopTimePicker.js +5 -1
  28. package/DesktopTimePicker/DesktopTimePicker.types.d.ts +8 -8
  29. package/DesktopTimePicker/index.d.ts +1 -1
  30. package/DigitalClock/DigitalClock.types.d.ts +4 -4
  31. package/DigitalClock/index.d.ts +1 -1
  32. package/MobileDatePicker/MobileDatePicker.js +7 -2
  33. package/MobileDatePicker/MobileDatePicker.types.d.ts +6 -6
  34. package/MobileDatePicker/index.d.ts +1 -1
  35. package/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
  36. package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +6 -6
  37. package/MobileDateTimePicker/index.d.ts +1 -1
  38. package/MobileTimePicker/MobileTimePicker.js +5 -1
  39. package/MobileTimePicker/MobileTimePicker.types.d.ts +6 -6
  40. package/MobileTimePicker/index.d.ts +1 -1
  41. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +4 -4
  42. package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +3 -3
  43. package/MultiSectionDigitalClock/index.d.ts +1 -1
  44. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +8 -8
  45. package/PickersCalendarHeader/index.d.ts +1 -1
  46. package/PickersLayout/PickersLayout.types.d.ts +6 -6
  47. package/PickersLayout/index.d.ts +1 -1
  48. package/StaticDatePicker/StaticDatePicker.js +1 -1
  49. package/StaticDatePicker/StaticDatePicker.types.d.ts +7 -7
  50. package/StaticDatePicker/index.d.ts +1 -1
  51. package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +7 -7
  52. package/StaticDateTimePicker/index.d.ts +1 -1
  53. package/StaticTimePicker/StaticTimePicker.types.d.ts +7 -7
  54. package/StaticTimePicker/index.d.ts +1 -1
  55. package/TimeClock/TimeClock.types.d.ts +5 -5
  56. package/TimeClock/index.d.ts +1 -1
  57. package/TimeField/TimeField.js +17 -50
  58. package/TimeField/TimeField.types.d.ts +5 -9
  59. package/TimeField/useTimeField.d.ts +2 -2
  60. package/TimeField/useTimeField.js +1 -5
  61. package/TimePicker/TimePicker.js +5 -1
  62. package/TimePicker/TimePicker.types.d.ts +6 -6
  63. package/TimePicker/index.d.ts +1 -1
  64. package/TimePicker/shared.d.ts +5 -5
  65. package/hooks/index.d.ts +1 -0
  66. package/hooks/useClearableField.d.ts +32 -20
  67. package/hooks/useClearableField.js +32 -33
  68. package/index.js +1 -1
  69. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +9 -9
  70. package/internals/components/PickersArrowSwitcher/index.d.ts +3 -1
  71. package/internals/components/PickersArrowSwitcher/index.js +2 -1
  72. package/internals/components/PickersModalDialog.d.ts +4 -4
  73. package/internals/components/PickersPopper.d.ts +4 -4
  74. package/internals/hooks/useDesktopPicker/index.d.ts +1 -1
  75. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -0
  76. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +8 -8
  77. package/internals/hooks/useField/index.d.ts +1 -1
  78. package/internals/hooks/useField/useField.js +3 -3
  79. package/internals/hooks/useField/useField.types.d.ts +4 -24
  80. package/internals/hooks/useField/useField.utils.js +24 -4
  81. package/internals/hooks/useField/useFieldState.js +7 -3
  82. package/internals/hooks/useMobilePicker/index.d.ts +1 -1
  83. package/internals/hooks/useMobilePicker/useMobilePicker.js +3 -1
  84. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -7
  85. package/internals/hooks/useStaticPicker/index.d.ts +1 -1
  86. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +5 -5
  87. package/internals/index.d.ts +7 -6
  88. package/internals/index.js +1 -0
  89. package/internals/models/props/basePickerProps.d.ts +4 -0
  90. package/internals/utils/convertFieldResponseIntoMuiTextFieldProps.d.ts +3 -0
  91. package/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +26 -0
  92. package/legacy/DateField/DateField.js +19 -47
  93. package/legacy/DateField/useDateField.js +1 -4
  94. package/legacy/DatePicker/DatePicker.js +5 -1
  95. package/legacy/DateTimeField/DateTimeField.js +19 -47
  96. package/legacy/DateTimeField/useDateTimeField.js +1 -4
  97. package/legacy/DateTimePicker/DateTimePicker.js +5 -1
  98. package/legacy/DesktopDatePicker/DesktopDatePicker.js +7 -2
  99. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
  100. package/legacy/DesktopTimePicker/DesktopTimePicker.js +5 -1
  101. package/legacy/MobileDatePicker/MobileDatePicker.js +7 -2
  102. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
  103. package/legacy/MobileTimePicker/MobileTimePicker.js +5 -1
  104. package/legacy/StaticDatePicker/StaticDatePicker.js +1 -1
  105. package/legacy/TimeField/TimeField.js +19 -47
  106. package/legacy/TimeField/useTimeField.js +1 -4
  107. package/legacy/TimePicker/TimePicker.js +5 -1
  108. package/legacy/hooks/useClearableField.js +30 -32
  109. package/legacy/index.js +1 -1
  110. package/legacy/internals/components/PickersArrowSwitcher/index.js +2 -1
  111. package/legacy/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -0
  112. package/legacy/internals/hooks/useField/useField.js +4 -4
  113. package/legacy/internals/hooks/useField/useField.utils.js +26 -4
  114. package/legacy/internals/hooks/useField/useFieldState.js +7 -3
  115. package/legacy/internals/hooks/useMobilePicker/useMobilePicker.js +3 -1
  116. package/legacy/internals/index.js +1 -0
  117. package/legacy/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +24 -0
  118. package/models/fields.d.ts +2 -1
  119. package/modern/DateField/DateField.js +17 -50
  120. package/modern/DateField/useDateField.js +1 -5
  121. package/modern/DatePicker/DatePicker.js +5 -1
  122. package/modern/DateTimeField/DateTimeField.js +17 -50
  123. package/modern/DateTimeField/useDateTimeField.js +1 -5
  124. package/modern/DateTimePicker/DateTimePicker.js +5 -1
  125. package/modern/DesktopDatePicker/DesktopDatePicker.js +7 -2
  126. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
  127. package/modern/DesktopTimePicker/DesktopTimePicker.js +5 -1
  128. package/modern/MobileDatePicker/MobileDatePicker.js +7 -2
  129. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
  130. package/modern/MobileTimePicker/MobileTimePicker.js +5 -1
  131. package/modern/StaticDatePicker/StaticDatePicker.js +1 -1
  132. package/modern/TimeField/TimeField.js +17 -50
  133. package/modern/TimeField/useTimeField.js +1 -5
  134. package/modern/TimePicker/TimePicker.js +5 -1
  135. package/modern/hooks/useClearableField.js +32 -33
  136. package/modern/index.js +1 -1
  137. package/modern/internals/components/PickersArrowSwitcher/index.js +2 -1
  138. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -0
  139. package/modern/internals/hooks/useField/useField.js +3 -3
  140. package/modern/internals/hooks/useField/useField.utils.js +24 -4
  141. package/modern/internals/hooks/useField/useFieldState.js +7 -3
  142. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +3 -1
  143. package/modern/internals/index.js +1 -0
  144. package/modern/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +26 -0
  145. package/node/DateField/DateField.js +18 -51
  146. package/node/DateField/useDateField.js +1 -5
  147. package/node/DatePicker/DatePicker.js +5 -1
  148. package/node/DateTimeField/DateTimeField.js +18 -51
  149. package/node/DateTimeField/useDateTimeField.js +1 -5
  150. package/node/DateTimePicker/DateTimePicker.js +5 -1
  151. package/node/DesktopDatePicker/DesktopDatePicker.js +10 -5
  152. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
  153. package/node/DesktopTimePicker/DesktopTimePicker.js +5 -1
  154. package/node/MobileDatePicker/MobileDatePicker.js +10 -5
  155. package/node/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
  156. package/node/MobileTimePicker/MobileTimePicker.js +5 -1
  157. package/node/StaticDatePicker/StaticDatePicker.js +2 -2
  158. package/node/TimeField/TimeField.js +18 -51
  159. package/node/TimeField/useTimeField.js +1 -5
  160. package/node/TimePicker/TimePicker.js +5 -1
  161. package/node/hooks/useClearableField.js +33 -34
  162. package/node/index.js +1 -1
  163. package/node/internals/components/PickersArrowSwitcher/index.js +14 -1
  164. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -0
  165. package/node/internals/hooks/useField/useField.js +3 -3
  166. package/node/internals/hooks/useField/useField.utils.js +24 -4
  167. package/node/internals/hooks/useField/useFieldState.js +7 -3
  168. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +3 -1
  169. package/node/internals/index.js +7 -0
  170. package/node/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +34 -0
  171. package/package.json +2 -2
  172. package/themeAugmentation/overrides.d.ts +5 -7
  173. package/themeAugmentation/props.d.ts +6 -8
@@ -1,2 +1,2 @@
1
- import { UseDateTimeFieldProps, UseDateTimeFieldParams } from './DateTimeField.types';
2
- export declare const useDateTimeField: <TDate, TChildProps extends {}>({ props: inProps, inputRef, }: UseDateTimeFieldParams<TDate, TChildProps>) => import("../internals/hooks/useField").UseFieldResponse<Omit<TChildProps & Omit<UseDateTimeFieldProps<TDate>, "format" | "disableFuture" | "disablePast" | "maxDate" | "minDate"> & Required<Pick<UseDateTimeFieldProps<TDate>, "format" | "disableFuture" | "disablePast" | "maxDate" | "minDate">>, keyof UseDateTimeFieldProps<any>>>;
1
+ import { UseDateTimeFieldProps, UseDateTimeFieldComponentProps } from './DateTimeField.types';
2
+ export declare const useDateTimeField: <TDate, TChildProps extends {}>(inProps: UseDateTimeFieldComponentProps<TDate, TChildProps>) => import("../internals/hooks/useField").UseFieldResponse<Omit<TChildProps & Omit<UseDateTimeFieldProps<TDate>, "format" | "disableFuture" | "disablePast" | "maxDate" | "minDate"> & Required<Pick<UseDateTimeFieldProps<TDate>, "format" | "disableFuture" | "disablePast" | "maxDate" | "minDate">>, keyof UseDateTimeFieldProps<any>>>;
@@ -22,17 +22,13 @@ const useDefaultizedDateTimeField = props => {
22
22
  maxTime: (_props$maxDateTime2 = props.maxDateTime) != null ? _props$maxDateTime2 : props.maxTime
23
23
  });
24
24
  };
25
- export const useDateTimeField = ({
26
- props: inProps,
27
- inputRef
28
- }) => {
25
+ export const useDateTimeField = inProps => {
29
26
  const props = useDefaultizedDateTimeField(inProps);
30
27
  const {
31
28
  forwardedProps,
32
29
  internalProps
33
30
  } = splitFieldInternalAndForwardedProps(props, 'date-time');
34
31
  return useField({
35
- inputRef,
36
32
  forwardedProps,
37
33
  internalProps,
38
34
  valueManager: singleItemValueManager,
@@ -198,6 +198,10 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
198
198
  * @default 3
199
199
  */
200
200
  monthsPerRow: PropTypes.oneOf([3, 4]),
201
+ /**
202
+ * Name attribute used by the `input` element in the Field.
203
+ */
204
+ name: PropTypes.string,
201
205
  /**
202
206
  * Callback fired when the value is accepted.
203
207
  * @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.
@@ -296,7 +300,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
296
300
  * 4. If `null` is provided, no section will be selected
297
301
  * If not provided, the selected sections will be handled internally.
298
302
  */
299
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
303
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
300
304
  endIndex: PropTypes.number.isRequired,
301
305
  startIndex: PropTypes.number.isRequired
302
306
  })]),
@@ -1,9 +1,9 @@
1
- import { DesktopDateTimePickerProps, DesktopDateTimePickerSlotsComponent, DesktopDateTimePickerSlotsComponentsProps } from '../DesktopDateTimePicker';
1
+ import { DesktopDateTimePickerProps, DesktopDateTimePickerSlots, DesktopDateTimePickerSlotProps } from '../DesktopDateTimePicker';
2
2
  import { DateOrTimeViewWithMeridiem } from '../internals/models';
3
- import { MobileDateTimePickerProps, MobileDateTimePickerSlotsComponent, MobileDateTimePickerSlotsComponentsProps } from '../MobileDateTimePicker';
4
- export interface DateTimePickerSlotsComponents<TDate> extends DesktopDateTimePickerSlotsComponent<TDate>, MobileDateTimePickerSlotsComponent<TDate, DateOrTimeViewWithMeridiem> {
3
+ import { MobileDateTimePickerProps, MobileDateTimePickerSlots, MobileDateTimePickerSlotProps } from '../MobileDateTimePicker';
4
+ export interface DateTimePickerSlots<TDate> extends DesktopDateTimePickerSlots<TDate>, MobileDateTimePickerSlots<TDate, DateOrTimeViewWithMeridiem> {
5
5
  }
6
- export interface DateTimePickerSlotsComponentsProps<TDate> extends DesktopDateTimePickerSlotsComponentsProps<TDate>, MobileDateTimePickerSlotsComponentsProps<TDate, DateOrTimeViewWithMeridiem> {
6
+ export interface DateTimePickerSlotProps<TDate> extends DesktopDateTimePickerSlotProps<TDate>, MobileDateTimePickerSlotProps<TDate, DateOrTimeViewWithMeridiem> {
7
7
  }
8
8
  export interface DateTimePickerProps<TDate> extends DesktopDateTimePickerProps<TDate>, Omit<MobileDateTimePickerProps<TDate, DateOrTimeViewWithMeridiem>, 'views'> {
9
9
  /**
@@ -21,10 +21,10 @@ export interface DateTimePickerProps<TDate> extends DesktopDateTimePickerProps<T
21
21
  * Overridable component slots.
22
22
  * @default {}
23
23
  */
24
- slots?: DateTimePickerSlotsComponents<TDate>;
24
+ slots?: DateTimePickerSlots<TDate>;
25
25
  /**
26
26
  * The props used for each component slot.
27
27
  * @default {}
28
28
  */
29
- slotProps?: DateTimePickerSlotsComponentsProps<TDate>;
29
+ slotProps?: DateTimePickerSlotProps<TDate>;
30
30
  }
@@ -1,5 +1,5 @@
1
1
  export { DateTimePicker } from './DateTimePicker';
2
- export type { DateTimePickerProps, DateTimePickerSlotsComponents, DateTimePickerSlotsComponentsProps, } from './DateTimePicker.types';
2
+ export type { DateTimePickerProps, DateTimePickerSlots, DateTimePickerSlotProps, } from './DateTimePicker.types';
3
3
  export { DateTimePickerTabs } from './DateTimePickerTabs';
4
4
  export type { DateTimePickerTabsProps } from './DateTimePickerTabs';
5
5
  export { dateTimePickerTabsClasses } from './dateTimePickerTabsClasses';
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { DefaultizedProps } from '../internals/models/helpers';
3
3
  import { DateTimeValidationError } from '../models';
4
- import { DateCalendarSlotsComponent, DateCalendarSlotsComponentsProps, ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
5
- import { TimeClockSlotsComponent, TimeClockSlotsComponentsProps } from '../TimeClock/TimeClock.types';
4
+ import { DateCalendarSlots, DateCalendarSlotProps, ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
5
+ import { TimeClockSlots, TimeClockSlotProps } from '../TimeClock/TimeClock.types';
6
6
  import { BasePickerInputProps } from '../internals/models/props/basePickerProps';
7
7
  import { DateTimePickerTabsProps, ExportedDateTimePickerTabsProps } from './DateTimePickerTabs';
8
8
  import { BaseDateValidationProps, BaseTimeValidationProps, DateTimeValidationProps } from '../internals/models/validation';
@@ -13,7 +13,7 @@ import { DateViewRendererProps } from '../dateViewRenderers';
13
13
  import { TimeViewRendererProps } from '../timeViewRenderers';
14
14
  import { BaseClockProps, ExportedBaseClockProps } from '../internals/models/props/clock';
15
15
  import { DateOrTimeViewWithMeridiem, TimeViewWithMeridiem } from '../internals/models';
16
- export interface BaseDateTimePickerSlotsComponent<TDate> extends DateCalendarSlotsComponent<TDate>, TimeClockSlotsComponent {
16
+ export interface BaseDateTimePickerSlots<TDate> extends DateCalendarSlots<TDate>, TimeClockSlots {
17
17
  /**
18
18
  * Tabs enabling toggling between date and time pickers.
19
19
  * @default DateTimePickerTabs
@@ -25,7 +25,7 @@ export interface BaseDateTimePickerSlotsComponent<TDate> extends DateCalendarSlo
25
25
  */
26
26
  toolbar?: React.JSXElementConstructor<DateTimePickerToolbarProps<TDate>>;
27
27
  }
28
- export interface BaseDateTimePickerSlotsComponentsProps<TDate> extends DateCalendarSlotsComponentsProps<TDate>, TimeClockSlotsComponentsProps {
28
+ export interface BaseDateTimePickerSlotProps<TDate> extends DateCalendarSlotProps<TDate>, TimeClockSlotProps {
29
29
  /**
30
30
  * Props passed down to the tabs component.
31
31
  */
@@ -45,12 +45,12 @@ export interface BaseDateTimePickerProps<TDate, TView extends DateOrTimeViewWith
45
45
  * Overridable component slots.
46
46
  * @default {}
47
47
  */
48
- slots?: BaseDateTimePickerSlotsComponent<TDate>;
48
+ slots?: BaseDateTimePickerSlots<TDate>;
49
49
  /**
50
50
  * The props used for each component slot.
51
51
  * @default {}
52
52
  */
53
- slotProps?: BaseDateTimePickerSlotsComponentsProps<TDate>;
53
+ slotProps?: BaseDateTimePickerSlotProps<TDate>;
54
54
  /**
55
55
  * Define custom view renderers for each section.
56
56
  * If `null`, the section will only have field editing.
@@ -5,7 +5,8 @@ import { resolveComponentProps } from '@mui/base/utils';
5
5
  import { refType } from '@mui/utils';
6
6
  import { singleItemValueManager } from '../internals/utils/valueManagers';
7
7
  import { useDatePickerDefaultizedProps } from '../DatePicker/shared';
8
- import { useLocaleText, useUtils, validateDate } from '../internals';
8
+ import { useLocaleText, useUtils } from '../internals/hooks/useUtils';
9
+ import { validateDate } from '../internals/utils/validation/validateDate';
9
10
  import { useDesktopPicker } from '../internals/hooks/useDesktopPicker';
10
11
  import { CalendarIcon } from '../icons';
11
12
  import { DateField } from '../DateField';
@@ -178,6 +179,10 @@ DesktopDatePicker.propTypes = {
178
179
  * @default 3
179
180
  */
180
181
  monthsPerRow: PropTypes.oneOf([3, 4]),
182
+ /**
183
+ * Name attribute used by the `input` element in the Field.
184
+ */
185
+ name: PropTypes.string,
181
186
  /**
182
187
  * Callback fired when the value is accepted.
183
188
  * @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.
@@ -276,7 +281,7 @@ DesktopDatePicker.propTypes = {
276
281
  * 4. If `null` is provided, no section will be selected
277
282
  * If not provided, the selected sections will be handled internally.
278
283
  */
279
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
284
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
280
285
  endIndex: PropTypes.number.isRequired,
281
286
  startIndex: PropTypes.number.isRequired
282
287
  })]),
@@ -1,10 +1,10 @@
1
- import { UseDesktopPickerSlotsComponent, ExportedUseDesktopPickerSlotsComponentsProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
2
- import { BaseDatePickerProps, BaseDatePickerSlotsComponent, BaseDatePickerSlotsComponentsProps } from '../DatePicker/shared';
1
+ import { UseDesktopPickerSlots, ExportedUseDesktopPickerSlotProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
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 DesktopDatePickerSlotsComponent<TDate> extends BaseDatePickerSlotsComponent<TDate>, MakeOptional<UseDesktopPickerSlotsComponent<TDate, DateView>, 'field' | 'openPickerIcon'> {
5
+ export interface DesktopDatePickerSlots<TDate> extends BaseDatePickerSlots<TDate>, MakeOptional<UseDesktopPickerSlots<TDate, DateView>, 'field' | 'openPickerIcon'> {
6
6
  }
7
- export interface DesktopDatePickerSlotsComponentsProps<TDate> extends BaseDatePickerSlotsComponentsProps<TDate>, ExportedUseDesktopPickerSlotsComponentsProps<TDate, DateView> {
7
+ export interface DesktopDatePickerSlotProps<TDate> extends BaseDatePickerSlotProps<TDate>, ExportedUseDesktopPickerSlotProps<TDate, DateView> {
8
8
  }
9
9
  export interface DesktopDatePickerProps<TDate> extends BaseDatePickerProps<TDate>, DesktopOnlyPickerProps<TDate> {
10
10
  /**
@@ -16,10 +16,10 @@ export interface DesktopDatePickerProps<TDate> extends BaseDatePickerProps<TDate
16
16
  * Overridable component slots.
17
17
  * @default {}
18
18
  */
19
- slots?: DesktopDatePickerSlotsComponent<TDate>;
19
+ slots?: DesktopDatePickerSlots<TDate>;
20
20
  /**
21
21
  * The props used for each component slot.
22
22
  * @default {}
23
23
  */
24
- slotProps?: DesktopDatePickerSlotsComponentsProps<TDate>;
24
+ slotProps?: DesktopDatePickerSlotProps<TDate>;
25
25
  }
@@ -1,2 +1,2 @@
1
1
  export { DesktopDatePicker } from './DesktopDatePicker';
2
- export type { DesktopDatePickerProps, DesktopDatePickerSlotsComponent, DesktopDatePickerSlotsComponentsProps, } from './DesktopDatePicker.types';
2
+ export type { DesktopDatePickerProps, DesktopDatePickerSlots, DesktopDatePickerSlotProps, } from './DesktopDatePicker.types';
@@ -255,6 +255,10 @@ DesktopDateTimePicker.propTypes = {
255
255
  * @default 3
256
256
  */
257
257
  monthsPerRow: PropTypes.oneOf([3, 4]),
258
+ /**
259
+ * Name attribute used by the `input` element in the Field.
260
+ */
261
+ name: PropTypes.string,
258
262
  /**
259
263
  * Callback fired when the value is accepted.
260
264
  * @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.
@@ -353,7 +357,7 @@ DesktopDateTimePicker.propTypes = {
353
357
  * 4. If `null` is provided, no section will be selected
354
358
  * If not provided, the selected sections will be handled internally.
355
359
  */
356
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
360
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
357
361
  endIndex: PropTypes.number.isRequired,
358
362
  startIndex: PropTypes.number.isRequired
359
363
  })]),
@@ -1,14 +1,14 @@
1
- import { UseDesktopPickerSlotsComponent, ExportedUseDesktopPickerSlotsComponentsProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
2
- import { BaseDateTimePickerProps, BaseDateTimePickerSlotsComponent, BaseDateTimePickerSlotsComponentsProps } from '../DateTimePicker/shared';
1
+ import { UseDesktopPickerSlots, ExportedUseDesktopPickerSlotProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
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 { DesktopOnlyTimePickerProps } from '../internals/models/props/clock';
6
6
  import { DateOrTimeViewWithMeridiem } from '../internals/models';
7
- import { MultiSectionDigitalClockSlotsComponent, MultiSectionDigitalClockSlotsComponentsProps } from '../MultiSectionDigitalClock';
8
- import { DigitalClockSlotsComponent, DigitalClockSlotsComponentsProps } from '../DigitalClock';
9
- export interface DesktopDateTimePickerSlotsComponent<TDate> extends BaseDateTimePickerSlotsComponent<TDate>, MakeOptional<UseDesktopPickerSlotsComponent<TDate, DateOrTimeViewWithMeridiem>, 'field' | 'openPickerIcon'>, DigitalClockSlotsComponent, MultiSectionDigitalClockSlotsComponent {
7
+ import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from '../MultiSectionDigitalClock';
8
+ import { DigitalClockSlots, DigitalClockSlotProps } from '../DigitalClock';
9
+ export interface DesktopDateTimePickerSlots<TDate> extends BaseDateTimePickerSlots<TDate>, MakeOptional<UseDesktopPickerSlots<TDate, DateOrTimeViewWithMeridiem>, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {
10
10
  }
11
- export interface DesktopDateTimePickerSlotsComponentsProps<TDate> extends BaseDateTimePickerSlotsComponentsProps<TDate>, ExportedUseDesktopPickerSlotsComponentsProps<TDate, DateOrTimeViewWithMeridiem>, DigitalClockSlotsComponentsProps, MultiSectionDigitalClockSlotsComponentsProps {
11
+ export interface DesktopDateTimePickerSlotProps<TDate> extends BaseDateTimePickerSlotProps<TDate>, ExportedUseDesktopPickerSlotProps<TDate, DateOrTimeViewWithMeridiem>, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {
12
12
  }
13
13
  export interface DesktopDateTimePickerProps<TDate> extends BaseDateTimePickerProps<TDate, DateOrTimeViewWithMeridiem>, DesktopOnlyPickerProps<TDate>, DesktopOnlyTimePickerProps<TDate> {
14
14
  /**
@@ -24,10 +24,10 @@ export interface DesktopDateTimePickerProps<TDate> extends BaseDateTimePickerPro
24
24
  * Overridable component slots.
25
25
  * @default {}
26
26
  */
27
- slots?: DesktopDateTimePickerSlotsComponent<TDate>;
27
+ slots?: DesktopDateTimePickerSlots<TDate>;
28
28
  /**
29
29
  * The props used for each component slot.
30
30
  * @default {}
31
31
  */
32
- slotProps?: DesktopDateTimePickerSlotsComponentsProps<TDate>;
32
+ slotProps?: DesktopDateTimePickerSlotProps<TDate>;
33
33
  }
@@ -1,2 +1,2 @@
1
1
  export { DesktopDateTimePicker } from './DesktopDateTimePicker';
2
- export type { DesktopDateTimePickerProps, DesktopDateTimePickerSlotsComponent, DesktopDateTimePickerSlotsComponentsProps, } from './DesktopDateTimePicker.types';
2
+ export type { DesktopDateTimePickerProps, DesktopDateTimePickerSlots, DesktopDateTimePickerSlotProps, } from './DesktopDateTimePicker.types';
@@ -189,6 +189,10 @@ DesktopTimePicker.propTypes = {
189
189
  * @default 1
190
190
  */
191
191
  minutesStep: PropTypes.number,
192
+ /**
193
+ * Name attribute used by the `input` element in the Field.
194
+ */
195
+ name: PropTypes.string,
192
196
  /**
193
197
  * Callback fired when the value is accepted.
194
198
  * @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.
@@ -269,7 +273,7 @@ DesktopTimePicker.propTypes = {
269
273
  * 4. If `null` is provided, no section will be selected
270
274
  * If not provided, the selected sections will be handled internally.
271
275
  */
272
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
276
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
273
277
  endIndex: PropTypes.number.isRequired,
274
278
  startIndex: PropTypes.number.isRequired
275
279
  })]),
@@ -1,14 +1,14 @@
1
- import { UseDesktopPickerSlotsComponent, ExportedUseDesktopPickerSlotsComponentsProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
2
- import { BaseTimePickerProps, BaseTimePickerSlotsComponent, BaseTimePickerSlotsComponentsProps } from '../TimePicker/shared';
1
+ import { UseDesktopPickerSlots, ExportedUseDesktopPickerSlotProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
2
+ import { BaseTimePickerProps, BaseTimePickerSlots, BaseTimePickerSlotProps } from '../TimePicker/shared';
3
3
  import { MakeOptional } from '../internals/models/helpers';
4
4
  import { TimeViewWithMeridiem } from '../internals/models';
5
5
  import { DesktopOnlyTimePickerProps } from '../internals/models/props/clock';
6
- import { DigitalClockSlotsComponent, DigitalClockSlotsComponentsProps } from '../DigitalClock';
7
- import { MultiSectionDigitalClockSlotsComponent, MultiSectionDigitalClockSlotsComponentsProps } from '../MultiSectionDigitalClock';
6
+ import { DigitalClockSlots, DigitalClockSlotProps } from '../DigitalClock';
7
+ import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from '../MultiSectionDigitalClock';
8
8
  import { TimeView } from '../models';
9
- export interface DesktopTimePickerSlotsComponent<TDate> extends BaseTimePickerSlotsComponent<TDate>, MakeOptional<UseDesktopPickerSlotsComponent<TDate, TimeViewWithMeridiem>, 'field' | 'openPickerIcon'>, DigitalClockSlotsComponent, MultiSectionDigitalClockSlotsComponent {
9
+ export interface DesktopTimePickerSlots<TDate> extends BaseTimePickerSlots<TDate>, MakeOptional<UseDesktopPickerSlots<TDate, TimeViewWithMeridiem>, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {
10
10
  }
11
- export interface DesktopTimePickerSlotsComponentsProps<TDate> extends BaseTimePickerSlotsComponentsProps, ExportedUseDesktopPickerSlotsComponentsProps<TDate, TimeViewWithMeridiem>, DigitalClockSlotsComponentsProps, MultiSectionDigitalClockSlotsComponentsProps {
11
+ export interface DesktopTimePickerSlotProps<TDate> extends BaseTimePickerSlotProps, ExportedUseDesktopPickerSlotProps<TDate, TimeViewWithMeridiem>, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {
12
12
  }
13
13
  export interface DesktopTimePickerProps<TDate> extends BaseTimePickerProps<TDate, TimeViewWithMeridiem>, DesktopOnlyPickerProps<TDate>, DesktopOnlyTimePickerProps<TDate> {
14
14
  /**
@@ -19,10 +19,10 @@ export interface DesktopTimePickerProps<TDate> extends BaseTimePickerProps<TDate
19
19
  * Overridable component slots.
20
20
  * @default {}
21
21
  */
22
- slots?: DesktopTimePickerSlotsComponent<TDate>;
22
+ slots?: DesktopTimePickerSlots<TDate>;
23
23
  /**
24
24
  * The props used for each component slot.
25
25
  * @default {}
26
26
  */
27
- slotProps?: DesktopTimePickerSlotsComponentsProps<TDate>;
27
+ slotProps?: DesktopTimePickerSlotProps<TDate>;
28
28
  }
@@ -1,2 +1,2 @@
1
1
  export { DesktopTimePicker } from './DesktopTimePicker';
2
- export type { DesktopTimePickerProps, DesktopTimePickerSlotsComponent, DesktopTimePickerSlotsComponentsProps, } from './DesktopTimePicker.types';
2
+ export type { DesktopTimePickerProps, DesktopTimePickerSlots, DesktopTimePickerSlotProps, } from './DesktopTimePicker.types';
@@ -6,14 +6,14 @@ import { BaseClockProps, DigitalClockOnlyProps, ExportedBaseClockProps } from '.
6
6
  import { TimeView } from '../models';
7
7
  export interface ExportedDigitalClockProps<TDate> extends ExportedBaseClockProps<TDate>, DigitalClockOnlyProps {
8
8
  }
9
- export interface DigitalClockSlotsComponent {
9
+ export interface DigitalClockSlots {
10
10
  /**
11
11
  * Component responsible for rendering a single digital clock item.
12
12
  * @default MenuItem from '@mui/material'
13
13
  */
14
14
  digitalClockItem?: React.ElementType;
15
15
  }
16
- export interface DigitalClockSlotsComponentsProps {
16
+ export interface DigitalClockSlotProps {
17
17
  digitalClockItem?: SlotComponentProps<typeof MenuItem, {}, Record<string, any>>;
18
18
  }
19
19
  export interface DigitalClockProps<TDate> extends ExportedDigitalClockProps<TDate>, BaseClockProps<TDate, Extract<TimeView, 'hours'>> {
@@ -25,10 +25,10 @@ export interface DigitalClockProps<TDate> extends ExportedDigitalClockProps<TDat
25
25
  * Overrideable component slots.
26
26
  * @default {}
27
27
  */
28
- slots?: DigitalClockSlotsComponent;
28
+ slots?: DigitalClockSlots;
29
29
  /**
30
30
  * The props used for each component slot.
31
31
  * @default {}
32
32
  */
33
- slotProps?: DigitalClockSlotsComponentsProps;
33
+ slotProps?: DigitalClockSlotProps;
34
34
  }
@@ -1,4 +1,4 @@
1
1
  export { DigitalClock } from './DigitalClock';
2
- export type { DigitalClockProps, DigitalClockSlotsComponent, DigitalClockSlotsComponentsProps, ExportedDigitalClockProps, } from './DigitalClock.types';
2
+ export type { DigitalClockProps, DigitalClockSlots, DigitalClockSlotProps, ExportedDigitalClockProps, } from './DigitalClock.types';
3
3
  export { digitalClockClasses, getDigitalClockUtilityClass } from './digitalClockClasses';
4
4
  export type { DigitalClockClasses, DigitalClockClassKey } from './digitalClockClasses';
@@ -5,7 +5,8 @@ import { resolveComponentProps } from '@mui/base/utils';
5
5
  import { refType } from '@mui/utils';
6
6
  import { useMobilePicker } from '../internals/hooks/useMobilePicker';
7
7
  import { useDatePickerDefaultizedProps } from '../DatePicker/shared';
8
- import { useLocaleText, useUtils, validateDate } from '../internals';
8
+ import { useUtils, useLocaleText } from '../internals/hooks/useUtils';
9
+ import { validateDate } from '../internals/utils/validation/validateDate';
9
10
  import { DateField } from '../DateField';
10
11
  import { extractValidationProps } from '../internals/utils/validation/extractValidationProps';
11
12
  import { singleItemValueManager } from '../internals/utils/valueManagers';
@@ -175,6 +176,10 @@ MobileDatePicker.propTypes = {
175
176
  * @default 3
176
177
  */
177
178
  monthsPerRow: PropTypes.oneOf([3, 4]),
179
+ /**
180
+ * Name attribute used by the `input` element in the Field.
181
+ */
182
+ name: PropTypes.string,
178
183
  /**
179
184
  * Callback fired when the value is accepted.
180
185
  * @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.
@@ -273,7 +278,7 @@ MobileDatePicker.propTypes = {
273
278
  * 4. If `null` is provided, no section will be selected
274
279
  * If not provided, the selected sections will be handled internally.
275
280
  */
276
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
281
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
277
282
  endIndex: PropTypes.number.isRequired,
278
283
  startIndex: PropTypes.number.isRequired
279
284
  })]),
@@ -1,20 +1,20 @@
1
- import { UseMobilePickerSlotsComponent, MobileOnlyPickerProps, ExportedUseMobilePickerSlotsComponentsProps } from '../internals/hooks/useMobilePicker';
2
- import { BaseDatePickerProps, BaseDatePickerSlotsComponent, BaseDatePickerSlotsComponentsProps } from '../DatePicker/shared';
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 MobileDatePickerSlotsComponent<TDate> extends BaseDatePickerSlotsComponent<TDate>, MakeOptional<UseMobilePickerSlotsComponent<TDate, DateView>, 'field'> {
5
+ export interface MobileDatePickerSlots<TDate> extends BaseDatePickerSlots<TDate>, MakeOptional<UseMobilePickerSlots<TDate, DateView>, 'field'> {
6
6
  }
7
- export interface MobileDatePickerSlotsComponentsProps<TDate> extends BaseDatePickerSlotsComponentsProps<TDate>, ExportedUseMobilePickerSlotsComponentsProps<TDate, DateView> {
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?: MobileDatePickerSlotsComponent<TDate>;
14
+ slots?: MobileDatePickerSlots<TDate>;
15
15
  /**
16
16
  * The props used for each component slot.
17
17
  * @default {}
18
18
  */
19
- slotProps?: MobileDatePickerSlotsComponentsProps<TDate>;
19
+ slotProps?: MobileDatePickerSlotProps<TDate>;
20
20
  }
@@ -1,2 +1,2 @@
1
1
  export { MobileDatePicker } from './MobileDatePicker';
2
- export type { MobileDatePickerProps, MobileDatePickerSlotsComponent, MobileDatePickerSlotsComponentsProps, } from './MobileDatePicker.types';
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 { UseMobilePickerSlotsComponent, ExportedUseMobilePickerSlotsComponentsProps, MobileOnlyPickerProps } from '../internals/hooks/useMobilePicker';
2
- import { BaseDateTimePickerProps, BaseDateTimePickerSlotsComponent, BaseDateTimePickerSlotsComponentsProps } from '../DateTimePicker/shared';
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 MobileDateTimePickerSlotsComponent<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerSlotsComponent<TDate>, MakeOptional<UseMobilePickerSlotsComponent<TDate, TView>, 'field'> {
6
+ export interface MobileDateTimePickerSlots<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerSlots<TDate>, MakeOptional<UseMobilePickerSlots<TDate, TView>, 'field'> {
7
7
  }
8
- export interface MobileDateTimePickerSlotsComponentsProps<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerSlotsComponentsProps<TDate>, ExportedUseMobilePickerSlotsComponentsProps<TDate, TView> {
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?: MobileDateTimePickerSlotsComponent<TDate, TView>;
15
+ slots?: MobileDateTimePickerSlots<TDate, TView>;
16
16
  /**
17
17
  * The props used for each component slot.
18
18
  * @default {}
19
19
  */
20
- slotProps?: MobileDateTimePickerSlotsComponentsProps<TDate, TView>;
20
+ slotProps?: MobileDateTimePickerSlotProps<TDate, TView>;
21
21
  }
@@ -1,2 +1,2 @@
1
1
  export { MobileDateTimePicker } from './MobileDateTimePicker';
2
- export type { MobileDateTimePickerProps, MobileDateTimePickerSlotsComponent, MobileDateTimePickerSlotsComponentsProps, } from './MobileDateTimePicker.types';
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 { UseMobilePickerSlotsComponent, ExportedUseMobilePickerSlotsComponentsProps, MobileOnlyPickerProps } from '../internals/hooks/useMobilePicker';
2
- import { BaseTimePickerProps, BaseTimePickerSlotsComponent, BaseTimePickerSlotsComponentsProps } from '../TimePicker/shared';
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 MobileTimePickerSlotsComponent<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerSlotsComponent<TDate>, MakeOptional<UseMobilePickerSlotsComponent<TDate, TView>, 'field'> {
6
+ export interface MobileTimePickerSlots<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerSlots<TDate>, MakeOptional<UseMobilePickerSlots<TDate, TView>, 'field'> {
7
7
  }
8
- export interface MobileTimePickerSlotsComponentsProps<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerSlotsComponentsProps, ExportedUseMobilePickerSlotsComponentsProps<TDate, TView> {
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?: MobileTimePickerSlotsComponent<TDate, TView>;
15
+ slots?: MobileTimePickerSlots<TDate, TView>;
16
16
  /**
17
17
  * The props used for each component slot.
18
18
  * @default {}
19
19
  */
20
- slotProps?: MobileTimePickerSlotsComponentsProps<TDate, TView>;
20
+ slotProps?: MobileTimePickerSlotProps<TDate, TView>;
21
21
  }
@@ -1,2 +1,2 @@
1
1
  export { MobileTimePicker } from './MobileTimePicker';
2
- export type { MobileTimePickerProps, MobileTimePickerSlotsComponent, MobileTimePickerSlotsComponentsProps, } from './MobileTimePicker.types';
2
+ export type { MobileTimePickerProps, MobileTimePickerSlots, MobileTimePickerSlotProps, } from './MobileTimePicker.types';
@@ -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 MultiSectionDigitalClockSlotsComponent {
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 MultiSectionDigitalClockSlotsComponentsProps {
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?: MultiSectionDigitalClockSlotsComponent;
39
+ slots?: MultiSectionDigitalClockSlots;
40
40
  /**
41
41
  * The props used for each component slot.
42
42
  * @default {}
43
43
  */
44
- slotProps?: MultiSectionDigitalClockSlotsComponentsProps;
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, MultiSectionDigitalClockSlotsComponent, MultiSectionDigitalClockSlotsComponentsProps } from './MultiSectionDigitalClock.types';
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?: MultiSectionDigitalClockSlotsComponent;
8
- slotProps?: MultiSectionDigitalClockSlotsComponentsProps;
7
+ slots?: MultiSectionDigitalClockSlots;
8
+ slotProps?: MultiSectionDigitalClockSlotProps;
9
9
  }
10
10
  export interface MultiSectionDigitalClockSectionProps<TValue> extends ExportedMultiSectionDigitalClockSectionProps {
11
11
  autoFocus?: boolean;
@@ -1,5 +1,5 @@
1
1
  export { MultiSectionDigitalClock } from './MultiSectionDigitalClock';
2
- export type { MultiSectionDigitalClockProps, MultiSectionDigitalClockSlotsComponent, MultiSectionDigitalClockSlotsComponentsProps, } from './MultiSectionDigitalClock.types';
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';