@mui/x-date-pickers 6.18.1 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/AdapterLuxon/AdapterLuxon.js +13 -3
  2. package/CHANGELOG.md +149 -0
  3. package/DateCalendar/DateCalendar.js +4 -20
  4. package/DateCalendar/DateCalendar.types.d.ts +12 -3
  5. package/DateCalendar/DayCalendar.d.ts +12 -3
  6. package/DateCalendar/DayCalendar.js +3 -5
  7. package/DateCalendar/useCalendarState.js +2 -3
  8. package/DateField/DateField.js +5 -21
  9. package/DateField/DateField.types.d.ts +12 -3
  10. package/DatePicker/DatePicker.js +0 -12
  11. package/DatePicker/DatePicker.types.d.ts +1 -14
  12. package/DatePicker/shared.d.ts +3 -15
  13. package/DatePicker/shared.js +2 -5
  14. package/DateTimeField/DateTimeField.js +5 -21
  15. package/DateTimeField/DateTimeField.types.d.ts +2 -15
  16. package/DateTimePicker/DateTimePicker.js +0 -12
  17. package/DateTimePicker/DateTimePicker.types.d.ts +1 -14
  18. package/DateTimePicker/shared.d.ts +3 -16
  19. package/DateTimePicker/shared.js +4 -7
  20. package/DesktopDatePicker/DesktopDatePicker.js +0 -12
  21. package/DesktopDatePicker/DesktopDatePicker.types.d.ts +2 -15
  22. package/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
  23. package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +2 -15
  24. package/DesktopTimePicker/DesktopTimePicker.js +0 -12
  25. package/DesktopTimePicker/DesktopTimePicker.types.d.ts +2 -15
  26. package/DigitalClock/DigitalClock.js +15 -24
  27. package/DigitalClock/DigitalClock.types.d.ts +2 -15
  28. package/MobileDatePicker/MobileDatePicker.js +0 -12
  29. package/MobileDatePicker/MobileDatePicker.types.d.ts +2 -15
  30. package/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
  31. package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +2 -15
  32. package/MobileTimePicker/MobileTimePicker.js +0 -12
  33. package/MobileTimePicker/MobileTimePicker.types.d.ts +2 -15
  34. package/MonthCalendar/MonthCalendar.js +3 -7
  35. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -18
  36. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +3 -15
  37. package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +2 -1
  38. package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
  39. package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +1 -2
  40. package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -10
  41. package/PickersCalendarHeader/PickersCalendarHeader.js +4 -17
  42. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +3 -16
  43. package/PickersLayout/PickersLayout.js +0 -12
  44. package/PickersLayout/PickersLayout.types.d.ts +6 -19
  45. package/PickersLayout/usePickerLayout.js +2 -7
  46. package/StaticDatePicker/StaticDatePicker.js +0 -12
  47. package/StaticDatePicker/StaticDatePicker.types.d.ts +2 -14
  48. package/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
  49. package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +2 -14
  50. package/StaticTimePicker/StaticTimePicker.js +0 -12
  51. package/StaticTimePicker/StaticTimePicker.types.d.ts +2 -14
  52. package/TimeClock/TimeClock.js +3 -20
  53. package/TimeClock/TimeClock.types.d.ts +1 -14
  54. package/TimeField/TimeField.js +5 -21
  55. package/TimeField/TimeField.types.d.ts +2 -15
  56. package/TimePicker/TimePicker.js +0 -12
  57. package/TimePicker/TimePicker.types.d.ts +1 -14
  58. package/TimePicker/shared.d.ts +2 -15
  59. package/TimePicker/shared.js +4 -7
  60. package/YearCalendar/YearCalendar.js +3 -7
  61. package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +2 -2
  62. package/dateTimeViewRenderers/dateTimeViewRenderers.js +2 -8
  63. package/dateViewRenderers/dateViewRenderers.d.ts +1 -1
  64. package/dateViewRenderers/dateViewRenderers.js +0 -4
  65. package/hooks/useClearableField.d.ts +1 -3
  66. package/hooks/useClearableField.js +6 -8
  67. package/index.js +1 -1
  68. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +5 -6
  69. package/internals/components/PickersModalDialog.d.ts +4 -5
  70. package/internals/components/PickersPopper.d.ts +5 -6
  71. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -8
  72. package/internals/hooks/useField/useField.types.d.ts +2 -2
  73. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +3 -4
  74. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +1 -14
  75. package/internals/index.d.ts +0 -2
  76. package/internals/index.js +0 -1
  77. package/legacy/AdapterLuxon/AdapterLuxon.js +13 -3
  78. package/legacy/DateCalendar/DateCalendar.js +4 -20
  79. package/legacy/DateCalendar/DayCalendar.js +3 -5
  80. package/legacy/DateCalendar/useCalendarState.js +2 -3
  81. package/legacy/DateField/DateField.js +6 -22
  82. package/legacy/DatePicker/DatePicker.js +0 -12
  83. package/legacy/DatePicker/shared.js +2 -5
  84. package/legacy/DateTimeField/DateTimeField.js +6 -22
  85. package/legacy/DateTimePicker/DateTimePicker.js +0 -12
  86. package/legacy/DateTimePicker/shared.js +4 -7
  87. package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -12
  88. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
  89. package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -12
  90. package/legacy/DigitalClock/DigitalClock.js +17 -24
  91. package/legacy/MobileDatePicker/MobileDatePicker.js +0 -12
  92. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
  93. package/legacy/MobileTimePicker/MobileTimePicker.js +0 -12
  94. package/legacy/MonthCalendar/MonthCalendar.js +3 -6
  95. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +11 -18
  96. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
  97. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +15 -10
  98. package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +4 -18
  99. package/legacy/PickersLayout/PickersLayout.js +0 -12
  100. package/legacy/PickersLayout/usePickerLayout.js +2 -7
  101. package/legacy/StaticDatePicker/StaticDatePicker.js +0 -12
  102. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
  103. package/legacy/StaticTimePicker/StaticTimePicker.js +0 -12
  104. package/legacy/TimeClock/TimeClock.js +3 -20
  105. package/legacy/TimeField/TimeField.js +5 -21
  106. package/legacy/TimePicker/TimePicker.js +0 -12
  107. package/legacy/TimePicker/shared.js +4 -7
  108. package/legacy/YearCalendar/YearCalendar.js +3 -6
  109. package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +2 -8
  110. package/legacy/dateViewRenderers/dateViewRenderers.js +0 -4
  111. package/legacy/hooks/useClearableField.js +6 -8
  112. package/legacy/index.js +1 -1
  113. package/legacy/internals/index.js +0 -1
  114. package/legacy/locales/esES.js +6 -7
  115. package/legacy/locales/eu.js +94 -0
  116. package/legacy/locales/index.js +1 -0
  117. package/legacy/timeViewRenderers/timeViewRenderers.js +0 -12
  118. package/locales/esES.js +6 -7
  119. package/locales/eu.d.ts +54 -0
  120. package/locales/eu.js +58 -0
  121. package/locales/index.d.ts +1 -0
  122. package/locales/index.js +1 -0
  123. package/modern/AdapterLuxon/AdapterLuxon.js +13 -3
  124. package/modern/DateCalendar/DateCalendar.js +3 -19
  125. package/modern/DateCalendar/DayCalendar.js +2 -4
  126. package/modern/DateCalendar/useCalendarState.js +2 -3
  127. package/modern/DateField/DateField.js +4 -20
  128. package/modern/DatePicker/DatePicker.js +0 -12
  129. package/modern/DatePicker/shared.js +1 -4
  130. package/modern/DateTimeField/DateTimeField.js +4 -20
  131. package/modern/DateTimePicker/DateTimePicker.js +0 -12
  132. package/modern/DateTimePicker/shared.js +3 -6
  133. package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -12
  134. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
  135. package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -12
  136. package/modern/DigitalClock/DigitalClock.js +14 -23
  137. package/modern/MobileDatePicker/MobileDatePicker.js +0 -12
  138. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
  139. package/modern/MobileTimePicker/MobileTimePicker.js +0 -12
  140. package/modern/MonthCalendar/MonthCalendar.js +3 -7
  141. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -18
  142. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
  143. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -10
  144. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +3 -16
  145. package/modern/PickersLayout/PickersLayout.js +0 -12
  146. package/modern/PickersLayout/usePickerLayout.js +2 -7
  147. package/modern/StaticDatePicker/StaticDatePicker.js +0 -12
  148. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
  149. package/modern/StaticTimePicker/StaticTimePicker.js +0 -12
  150. package/modern/TimeClock/TimeClock.js +3 -20
  151. package/modern/TimeField/TimeField.js +4 -20
  152. package/modern/TimePicker/TimePicker.js +0 -12
  153. package/modern/TimePicker/shared.js +3 -6
  154. package/modern/YearCalendar/YearCalendar.js +3 -7
  155. package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +1 -7
  156. package/modern/dateViewRenderers/dateViewRenderers.js +0 -4
  157. package/modern/hooks/useClearableField.js +5 -7
  158. package/modern/index.js +1 -1
  159. package/modern/internals/index.js +0 -1
  160. package/modern/locales/esES.js +6 -7
  161. package/modern/locales/eu.js +58 -0
  162. package/modern/locales/index.js +1 -0
  163. package/modern/timeViewRenderers/timeViewRenderers.js +0 -12
  164. package/node/AdapterLuxon/AdapterLuxon.js +13 -3
  165. package/node/DateCalendar/DateCalendar.js +3 -19
  166. package/node/DateCalendar/DayCalendar.js +2 -4
  167. package/node/DateCalendar/useCalendarState.js +1 -2
  168. package/node/DateField/DateField.js +4 -20
  169. package/node/DatePicker/DatePicker.js +0 -12
  170. package/node/DatePicker/shared.js +1 -4
  171. package/node/DateTimeField/DateTimeField.js +4 -20
  172. package/node/DateTimePicker/DateTimePicker.js +0 -12
  173. package/node/DateTimePicker/shared.js +3 -6
  174. package/node/DesktopDatePicker/DesktopDatePicker.js +0 -12
  175. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
  176. package/node/DesktopTimePicker/DesktopTimePicker.js +0 -12
  177. package/node/DigitalClock/DigitalClock.js +14 -23
  178. package/node/MobileDatePicker/MobileDatePicker.js +0 -12
  179. package/node/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
  180. package/node/MobileTimePicker/MobileTimePicker.js +0 -12
  181. package/node/MonthCalendar/MonthCalendar.js +3 -7
  182. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -18
  183. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
  184. package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -10
  185. package/node/PickersCalendarHeader/PickersCalendarHeader.js +3 -16
  186. package/node/PickersLayout/PickersLayout.js +0 -12
  187. package/node/PickersLayout/usePickerLayout.js +2 -7
  188. package/node/StaticDatePicker/StaticDatePicker.js +0 -12
  189. package/node/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
  190. package/node/StaticTimePicker/StaticTimePicker.js +0 -12
  191. package/node/TimeClock/TimeClock.js +3 -20
  192. package/node/TimeField/TimeField.js +4 -20
  193. package/node/TimePicker/TimePicker.js +0 -12
  194. package/node/TimePicker/shared.js +3 -6
  195. package/node/YearCalendar/YearCalendar.js +3 -7
  196. package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +1 -7
  197. package/node/dateViewRenderers/dateViewRenderers.js +0 -4
  198. package/node/hooks/useClearableField.js +5 -7
  199. package/node/index.js +1 -1
  200. package/node/internals/index.js +0 -7
  201. package/node/locales/esES.js +6 -7
  202. package/node/locales/eu.js +64 -0
  203. package/node/locales/index.js +11 -0
  204. package/node/timeViewRenderers/timeViewRenderers.js +0 -12
  205. package/package.json +1 -1
  206. package/timeViewRenderers/timeViewRenderers.d.ts +3 -3
  207. package/timeViewRenderers/timeViewRenderers.js +0 -12
  208. package/internals/utils/slots-migration.d.ts +0 -36
  209. package/internals/utils/slots-migration.js +0 -13
  210. package/legacy/internals/utils/slots-migration.js +0 -14
  211. package/modern/internals/utils/slots-migration.js +0 -13
  212. package/node/internals/utils/slots-migration.js +0 -21
@@ -2,30 +2,17 @@ import { UseMobilePickerSlotsComponent, ExportedUseMobilePickerSlotsComponentsPr
2
2
  import { BaseDateTimePickerProps, BaseDateTimePickerSlotsComponent, BaseDateTimePickerSlotsComponentsProps } from '../DateTimePicker/shared';
3
3
  import { MakeOptional } from '../internals/models/helpers';
4
4
  import { DateOrTimeView } from '../models';
5
- import { UncapitalizeObjectKeys } from '../internals/utils/slots-migration';
6
5
  import { DateOrTimeViewWithMeridiem } from '../internals/models';
7
- export interface MobileDateTimePickerSlotsComponent<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerSlotsComponent<TDate>, MakeOptional<UseMobilePickerSlotsComponent<TDate, TView>, 'Field'> {
6
+ export interface MobileDateTimePickerSlotsComponent<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerSlotsComponent<TDate>, MakeOptional<UseMobilePickerSlotsComponent<TDate, TView>, 'field'> {
8
7
  }
9
8
  export interface MobileDateTimePickerSlotsComponentsProps<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerSlotsComponentsProps<TDate>, ExportedUseMobilePickerSlotsComponentsProps<TDate, TView> {
10
9
  }
11
10
  export interface MobileDateTimePickerProps<TDate, TView extends DateOrTimeViewWithMeridiem = DateOrTimeView> extends BaseDateTimePickerProps<TDate, TView>, MobileOnlyPickerProps<TDate> {
12
- /**
13
- * Overridable components.
14
- * @default {}
15
- * @deprecated Please use `slots`.
16
- */
17
- components?: MobileDateTimePickerSlotsComponent<TDate, TView>;
18
- /**
19
- * The props used for each component slot.
20
- * @default {}
21
- * @deprecated Please use `slotProps`.
22
- */
23
- componentsProps?: MobileDateTimePickerSlotsComponentsProps<TDate, TView>;
24
11
  /**
25
12
  * Overridable component slots.
26
13
  * @default {}
27
14
  */
28
- slots?: UncapitalizeObjectKeys<MobileDateTimePickerSlotsComponent<TDate, TView>>;
15
+ slots?: MobileDateTimePickerSlotsComponent<TDate, TView>;
29
16
  /**
30
17
  * The props used for each component slot.
31
18
  * @default {}
@@ -99,18 +99,6 @@ MobileTimePicker.propTypes = {
99
99
  * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
100
100
  */
101
101
  closeOnSelect: PropTypes.bool,
102
- /**
103
- * Overridable components.
104
- * @default {}
105
- * @deprecated Please use `slots`.
106
- */
107
- components: PropTypes.object,
108
- /**
109
- * The props used for each component slot.
110
- * @default {}
111
- * @deprecated Please use `slotProps`.
112
- */
113
- componentsProps: PropTypes.object,
114
102
  /**
115
103
  * The default value.
116
104
  * Used when the component is not controlled.
@@ -3,29 +3,16 @@ import { BaseTimePickerProps, BaseTimePickerSlotsComponent, BaseTimePickerSlotsC
3
3
  import { MakeOptional } from '../internals/models/helpers';
4
4
  import { TimeView } from '../models';
5
5
  import { TimeViewWithMeridiem } from '../internals/models';
6
- import { UncapitalizeObjectKeys } from '../internals/utils/slots-migration';
7
- export interface MobileTimePickerSlotsComponent<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerSlotsComponent<TDate>, MakeOptional<UseMobilePickerSlotsComponent<TDate, TView>, 'Field'> {
6
+ export interface MobileTimePickerSlotsComponent<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerSlotsComponent<TDate>, MakeOptional<UseMobilePickerSlotsComponent<TDate, TView>, 'field'> {
8
7
  }
9
8
  export interface MobileTimePickerSlotsComponentsProps<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerSlotsComponentsProps, ExportedUseMobilePickerSlotsComponentsProps<TDate, TView> {
10
9
  }
11
10
  export interface MobileTimePickerProps<TDate, TView extends TimeViewWithMeridiem = TimeView> extends BaseTimePickerProps<TDate, TView>, MobileOnlyPickerProps<TDate> {
12
- /**
13
- * Overridable components.
14
- * @default {}
15
- * @deprecated Please use `slots`.
16
- */
17
- components?: MobileTimePickerSlotsComponent<TDate, TView>;
18
- /**
19
- * The props used for each component slot.
20
- * @default {}
21
- * @deprecated Please use `slotProps`.
22
- */
23
- componentsProps?: MobileTimePickerSlotsComponentsProps<TDate, TView>;
24
11
  /**
25
12
  * Overridable component slots.
26
13
  * @default {}
27
14
  */
28
- slots?: UncapitalizeObjectKeys<MobileTimePickerSlotsComponent<TDate, TView>>;
15
+ slots?: MobileTimePickerSlotsComponent<TDate, TView>;
29
16
  /**
30
17
  * The props used for each component slot.
31
18
  * @default {}
@@ -77,7 +77,6 @@ export const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalenda
77
77
  onChange,
78
78
  shouldDisableMonth,
79
79
  readOnly,
80
- disableHighlightToday,
81
80
  autoFocus = false,
82
81
  onMonthFocus,
83
82
  hasFocus,
@@ -119,12 +118,9 @@ export const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalenda
119
118
  if (value != null) {
120
119
  return utils.getMonth(value);
121
120
  }
122
- if (disableHighlightToday) {
123
- return null;
124
- }
125
- return utils.getMonth(referenceDate);
126
- }, [value, utils, disableHighlightToday, referenceDate]);
127
- const [focusedMonth, setFocusedMonth] = React.useState(() => selectedMonth || todayMonth);
121
+ return null;
122
+ }, [value, utils]);
123
+ const [focusedMonth, setFocusedMonth] = React.useState(() => selectedMonth || utils.getMonth(referenceDate));
128
124
  const [internalHasFocus, setInternalHasFocus] = useControlled({
129
125
  name: 'MonthCalendar',
130
126
  state: 'hasFocus',
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["ampm", "timeSteps", "autoFocus", "components", "componentsProps", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "onChange", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "skipDisabled", "timezone"];
3
+ const _excluded = ["ampm", "timeSteps", "autoFocus", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "onChange", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "skipDisabled", "timezone"];
4
4
  import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import PropTypes from 'prop-types';
@@ -61,8 +61,6 @@ export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function M
61
61
  ampm = utils.is12HourCycleInCurrentLocale(),
62
62
  timeSteps: inTimeSteps,
63
63
  autoFocus,
64
- components,
65
- componentsProps,
66
64
  slots,
67
65
  slotProps,
68
66
  value: valueProp,
@@ -242,7 +240,8 @@ export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function M
242
240
  utils,
243
241
  isDisabled: hours => disabled || isTimeDisabled(hours, 'hours'),
244
242
  timeStep: timeSteps.hours,
245
- resolveAriaLabel: localeText.hoursClockNumberText
243
+ resolveAriaLabel: localeText.hoursClockNumberText,
244
+ valueOrReferenceDate
246
245
  })
247
246
  };
248
247
  }
@@ -288,11 +287,13 @@ export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function M
288
287
  value: 'am',
289
288
  label: amLabel,
290
289
  isSelected: () => !!value && meridiemMode === 'am',
290
+ isFocused: () => !!valueOrReferenceDate && meridiemMode === 'am',
291
291
  ariaLabel: amLabel
292
292
  }, {
293
293
  value: 'pm',
294
294
  label: pmLabel,
295
295
  isSelected: () => !!value && meridiemMode === 'pm',
296
+ isFocused: () => !!valueOrReferenceDate && meridiemMode === 'pm',
296
297
  ariaLabel: pmLabel
297
298
  }]
298
299
  };
@@ -323,8 +324,8 @@ export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function M
323
324
  autoFocus: autoFocus != null ? autoFocus : focusedView === timeView,
324
325
  disabled: disabled,
325
326
  readOnly: readOnly,
326
- slots: slots != null ? slots : components,
327
- slotProps: slotProps != null ? slotProps : componentsProps,
327
+ slots: slots,
328
+ slotProps: slotProps,
328
329
  skipDisabled: skipDisabled,
329
330
  "aria-label": localeText.selectViewText(timeView)
330
331
  }, timeView))
@@ -352,18 +353,6 @@ process.env.NODE_ENV !== "production" ? MultiSectionDigitalClock.propTypes = {
352
353
  */
353
354
  classes: PropTypes.object,
354
355
  className: PropTypes.string,
355
- /**
356
- * Overrideable components.
357
- * @default {}
358
- * @deprecated Please use `slots`.
359
- */
360
- components: PropTypes.object,
361
- /**
362
- * The props used for each component slot.
363
- * @default {}
364
- * @deprecated Please use `slotProps`.
365
- */
366
- componentsProps: PropTypes.object,
367
356
  /**
368
357
  * The default selected value.
369
358
  * Used when the component is not controlled.
@@ -2,13 +2,13 @@
2
2
  import { SlotComponentProps } from '@mui/base/utils';
3
3
  import MenuItem from '@mui/material/MenuItem';
4
4
  import { MultiSectionDigitalClockClasses } from './multiSectionDigitalClockClasses';
5
- import { UncapitalizeObjectKeys } from '../internals/utils/slots-migration';
6
5
  import { BaseClockProps, ExportedBaseClockProps, MultiSectionDigitalClockOnlyProps } from '../internals/models/props/clock';
7
6
  import { MultiSectionDigitalClockSectionProps } from './MultiSectionDigitalClockSection';
8
7
  import { TimeViewWithMeridiem } from '../internals/models';
9
8
  export interface MultiSectionDigitalClockOption<TValue> {
10
9
  isDisabled?: (value: TValue) => boolean;
11
10
  isSelected: (value: TValue) => boolean;
11
+ isFocused: (value: TValue) => boolean;
12
12
  label: string;
13
13
  value: TValue;
14
14
  ariaLabel: string;
@@ -22,7 +22,7 @@ export interface MultiSectionDigitalClockSlotsComponent {
22
22
  * Component responsible for rendering a single multi section digital clock section item.
23
23
  * @default MenuItem from '@mui/material'
24
24
  */
25
- DigitalClockSectionItem?: React.ElementType;
25
+ digitalClockSectionItem?: React.ElementType;
26
26
  }
27
27
  export interface MultiSectionDigitalClockSlotsComponentsProps {
28
28
  digitalClockSectionItem?: SlotComponentProps<typeof MenuItem, {}, Record<string, any>>;
@@ -32,23 +32,11 @@ export interface MultiSectionDigitalClockProps<TDate> extends ExportedMultiSecti
32
32
  * Override or extend the styles applied to the component.
33
33
  */
34
34
  classes?: Partial<MultiSectionDigitalClockClasses>;
35
- /**
36
- * Overrideable components.
37
- * @default {}
38
- * @deprecated Please use `slots`.
39
- */
40
- components?: MultiSectionDigitalClockSlotsComponent;
41
- /**
42
- * The props used for each component slot.
43
- * @default {}
44
- * @deprecated Please use `slotProps`.
45
- */
46
- componentsProps?: MultiSectionDigitalClockSlotsComponentsProps;
47
35
  /**
48
36
  * Overrideable component slots.
49
37
  * @default {}
50
38
  */
51
- slots?: UncapitalizeObjectKeys<MultiSectionDigitalClockSlotsComponent>;
39
+ slots?: MultiSectionDigitalClockSlotsComponent;
52
40
  /**
53
41
  * The props used for each component slot.
54
42
  * @default {}
@@ -8,8 +8,9 @@ interface IGetHoursSectionOptions<TDate> {
8
8
  isDisabled: (value: number) => boolean;
9
9
  timeStep: number;
10
10
  resolveAriaLabel: (value: string) => string;
11
+ valueOrReferenceDate: TDate;
11
12
  }
12
- export declare const getHourSectionOptions: <TDate>({ now, value, utils, ampm, isDisabled, resolveAriaLabel, timeStep, }: IGetHoursSectionOptions<TDate>) => MultiSectionDigitalClockOption<number>[];
13
+ export declare const getHourSectionOptions: <TDate>({ now, value, utils, ampm, isDisabled, resolveAriaLabel, timeStep, valueOrReferenceDate, }: IGetHoursSectionOptions<TDate>) => MultiSectionDigitalClockOption<number>[];
13
14
  interface IGetTimeSectionOptions {
14
15
  value: number | null;
15
16
  isDisabled: (value: number) => boolean;
@@ -5,21 +5,26 @@ export const getHourSectionOptions = ({
5
5
  ampm,
6
6
  isDisabled,
7
7
  resolveAriaLabel,
8
- timeStep
8
+ timeStep,
9
+ valueOrReferenceDate
9
10
  }) => {
10
11
  const currentHours = value ? utils.getHours(value) : null;
11
12
  const result = [];
12
- const isSelected = hour => {
13
- if (currentHours === null) {
13
+ const isSelected = (hour, overriddenCurrentHours) => {
14
+ const resolvedCurrentHours = overriddenCurrentHours != null ? overriddenCurrentHours : currentHours;
15
+ if (resolvedCurrentHours === null) {
14
16
  return false;
15
17
  }
16
18
  if (ampm) {
17
19
  if (hour === 12) {
18
- return currentHours === 12 || currentHours === 0;
20
+ return resolvedCurrentHours === 12 || resolvedCurrentHours === 0;
19
21
  }
20
- return currentHours === hour || currentHours - 12 === hour;
22
+ return resolvedCurrentHours === hour || resolvedCurrentHours - 12 === hour;
21
23
  }
22
- return currentHours === hour;
24
+ return resolvedCurrentHours === hour;
25
+ };
26
+ const isFocused = hour => {
27
+ return isSelected(hour, utils.getHours(valueOrReferenceDate));
23
28
  };
24
29
  const endHour = ampm ? 11 : 23;
25
30
  for (let hour = 0; hour <= endHour; hour += timeStep) {
@@ -31,6 +36,7 @@ export const getHourSectionOptions = ({
31
36
  label,
32
37
  isSelected,
33
38
  isDisabled,
39
+ isFocused,
34
40
  ariaLabel
35
41
  });
36
42
  }
@@ -50,6 +56,9 @@ export const getTimeSectionOptions = ({
50
56
  }
51
57
  return hasValue && value === timeValue;
52
58
  };
59
+ const isFocused = timeValue => {
60
+ return value === timeValue;
61
+ };
53
62
  return [...Array.from({
54
63
  length: Math.ceil(60 / timeStep)
55
64
  }, (_, index) => {
@@ -59,6 +68,7 @@ export const getTimeSectionOptions = ({
59
68
  label: resolveLabel(timeValue),
60
69
  isDisabled,
61
70
  isSelected,
71
+ isFocused,
62
72
  ariaLabel: resolveAriaLabel(timeValue.toString())
63
73
  };
64
74
  })];
@@ -1,11 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { MultiSectionDigitalClockSectionClasses } from './multiSectionDigitalClockSectionClasses';
3
3
  import type { MultiSectionDigitalClockOption, MultiSectionDigitalClockSlotsComponent, MultiSectionDigitalClockSlotsComponentsProps } from './MultiSectionDigitalClock.types';
4
- import { UncapitalizeObjectKeys } from '../internals/utils/slots-migration';
5
4
  export interface ExportedMultiSectionDigitalClockSectionProps {
6
5
  className?: string;
7
6
  classes?: Partial<MultiSectionDigitalClockSectionClasses>;
8
- slots?: UncapitalizeObjectKeys<MultiSectionDigitalClockSlotsComponent>;
7
+ slots?: MultiSectionDigitalClockSlotsComponent;
9
8
  slotProps?: MultiSectionDigitalClockSlotsComponentsProps;
10
9
  }
11
10
  export interface MultiSectionDigitalClockSectionProps<TValue> extends ExportedMultiSectionDigitalClockSectionProps {
@@ -84,7 +84,7 @@ export const MultiSectionDigitalClockSection = /*#__PURE__*/React.forwardRef(fun
84
84
  var _slots$digitalClockSe;
85
85
  const containerRef = React.useRef(null);
86
86
  const handleRef = useForkRef(ref, containerRef);
87
- const previousSelected = React.useRef(null);
87
+ const previousActive = React.useRef(null);
88
88
  const props = useThemeProps({
89
89
  props: inProps,
90
90
  name: 'MuiMultiSectionDigitalClockSection'
@@ -111,23 +111,24 @@ export const MultiSectionDigitalClockSection = /*#__PURE__*/React.forwardRef(fun
111
111
  if (containerRef.current === null) {
112
112
  return;
113
113
  }
114
- const selectedItem = containerRef.current.querySelector('[role="option"][aria-selected="true"]');
115
- if (!selectedItem || previousSelected.current === selectedItem) {
114
+ const activeItem = containerRef.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');
115
+ if (!activeItem || previousActive.current === activeItem) {
116
116
  // Handle setting the ref to null if the selected item is ever reset via UI
117
- if (previousSelected.current !== selectedItem) {
118
- previousSelected.current = selectedItem;
117
+ if (previousActive.current !== activeItem) {
118
+ previousActive.current = activeItem;
119
119
  }
120
120
  return;
121
121
  }
122
- previousSelected.current = selectedItem;
122
+ previousActive.current = activeItem;
123
123
  if (active && autoFocus) {
124
- selectedItem.focus();
124
+ activeItem.focus();
125
125
  }
126
- const offsetTop = selectedItem.offsetTop;
126
+ const offsetTop = activeItem.offsetTop;
127
127
 
128
128
  // Subtracting the 4px of extra margin intended for the first visible section item
129
129
  containerRef.current.scrollTop = offsetTop - 4;
130
130
  });
131
+ const focusedOptionIndex = items.findIndex(item => item.isFocused(item.value));
131
132
  return /*#__PURE__*/_jsx(MultiSectionDigitalClockSectionRoot, _extends({
132
133
  ref: handleRef,
133
134
  className: clsx(classes.root, className),
@@ -135,12 +136,13 @@ export const MultiSectionDigitalClockSection = /*#__PURE__*/React.forwardRef(fun
135
136
  autoFocusItem: autoFocus && active,
136
137
  role: "listbox"
137
138
  }, other, {
138
- children: items.map(option => {
139
+ children: items.map((option, index) => {
139
140
  var _option$isDisabled, _option$isDisabled2;
140
141
  if (skipDisabled && (_option$isDisabled = option.isDisabled) != null && _option$isDisabled.call(option, option.value)) {
141
142
  return null;
142
143
  }
143
144
  const isSelected = option.isSelected(option.value);
145
+ const tabIndex = focusedOptionIndex === index || focusedOptionIndex === -1 && index === 0 ? 0 : -1;
144
146
  return /*#__PURE__*/_jsx(DigitalClockSectionItem, _extends({
145
147
  onClick: () => !readOnly && onChange(option.value),
146
148
  selected: isSelected,
@@ -151,7 +153,8 @@ export const MultiSectionDigitalClockSection = /*#__PURE__*/React.forwardRef(fun
151
153
  ,
152
154
  "aria-disabled": readOnly,
153
155
  "aria-label": option.ariaLabel,
154
- "aria-selected": isSelected
156
+ "aria-selected": isSelected,
157
+ tabIndex: tabIndex
155
158
  }, slotProps == null ? void 0 : slotProps.digitalClockSectionItem, {
156
159
  children: option.label
157
160
  }), option.label);
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["slots", "slotProps", "components", "componentsProps", "currentMonth", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onMonthChange", "onViewChange", "view", "reduceAnimations", "views", "labelId", "className", "timezone"],
3
+ const _excluded = ["slots", "slotProps", "currentMonth", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onMonthChange", "onViewChange", "view", "reduceAnimations", "views", "labelId", "className", "timezone"],
4
4
  _excluded2 = ["ownerState"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
@@ -104,7 +104,7 @@ const PickersCalendarHeaderSwitchViewIcon = styled(ArrowDropDownIcon, {
104
104
  * - [PickersCalendarHeader API](https://mui.com/x/api/date-pickers/pickers-calendar-header/)
105
105
  */
106
106
  const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCalendarHeader(inProps, ref) {
107
- var _ref, _slots$switchViewButt, _ref2, _slots$switchViewIcon;
107
+ var _slots$switchViewButt, _slots$switchViewIcon;
108
108
  const localeText = useLocaleText();
109
109
  const utils = useUtils();
110
110
  const props = useThemeProps({
@@ -114,7 +114,6 @@ const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCale
114
114
  const {
115
115
  slots,
116
116
  slotProps,
117
- components,
118
117
  currentMonth: month,
119
118
  disabled,
120
119
  disableFuture,
@@ -133,7 +132,7 @@ const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCale
133
132
  other = _objectWithoutPropertiesLoose(props, _excluded);
134
133
  const ownerState = props;
135
134
  const classes = useUtilityClasses(props);
136
- const SwitchViewButton = (_ref = (_slots$switchViewButt = slots == null ? void 0 : slots.switchViewButton) != null ? _slots$switchViewButt : components == null ? void 0 : components.SwitchViewButton) != null ? _ref : PickersCalendarHeaderSwitchViewButton;
135
+ const SwitchViewButton = (_slots$switchViewButt = slots == null ? void 0 : slots.switchViewButton) != null ? _slots$switchViewButt : PickersCalendarHeaderSwitchViewButton;
137
136
  const switchViewButtonProps = useSlotProps({
138
137
  elementType: SwitchViewButton,
139
138
  externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewButton,
@@ -144,7 +143,7 @@ const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCale
144
143
  ownerState,
145
144
  className: classes.switchViewButton
146
145
  });
147
- const SwitchViewIcon = (_ref2 = (_slots$switchViewIcon = slots == null ? void 0 : slots.switchViewIcon) != null ? _slots$switchViewIcon : components == null ? void 0 : components.SwitchViewIcon) != null ? _ref2 : PickersCalendarHeaderSwitchViewIcon;
146
+ const SwitchViewIcon = (_slots$switchViewIcon = slots == null ? void 0 : slots.switchViewIcon) != null ? _slots$switchViewIcon : PickersCalendarHeaderSwitchViewIcon;
148
147
  // The spread is here to avoid this bug mui/material-ui#34056
149
148
  const _useSlotProps = useSlotProps({
150
149
  elementType: SwitchViewIcon,
@@ -234,18 +233,6 @@ process.env.NODE_ENV !== "production" ? PickersCalendarHeader.propTypes = {
234
233
  * className applied to the root element.
235
234
  */
236
235
  className: PropTypes.string,
237
- /**
238
- * Overridable components.
239
- * @default {}
240
- * @deprecated Please use `slots`.
241
- */
242
- components: PropTypes.object,
243
- /**
244
- * The props used for each component slot.
245
- * @default {}
246
- * @deprecated Please use `slotProps`.
247
- */
248
- componentsProps: PropTypes.object,
249
236
  currentMonth: PropTypes.any.isRequired,
250
237
  disabled: PropTypes.bool,
251
238
  disableFuture: PropTypes.bool,
@@ -5,7 +5,6 @@ import SvgIcon from '@mui/material/SvgIcon';
5
5
  import { SxProps, Theme } from '@mui/material/styles';
6
6
  import { ExportedPickersArrowSwitcherProps, PickersArrowSwitcherSlotsComponent, PickersArrowSwitcherSlotsComponentsProps } from '../internals/components/PickersArrowSwitcher';
7
7
  import { MonthValidationOptions } from '../internals/hooks/date-helpers-hooks';
8
- import { UncapitalizeObjectKeys } from '../internals/utils/slots-migration';
9
8
  import { DateView } from '../models/views';
10
9
  import { SlideDirection } from '../DateCalendar/PickersSlideTransition';
11
10
  import { PickersCalendarHeaderClasses } from './pickersCalendarHeaderClasses';
@@ -14,12 +13,12 @@ export interface PickersCalendarHeaderSlotsComponent extends PickersArrowSwitche
14
13
  * Button displayed to switch between different calendar views.
15
14
  * @default IconButton
16
15
  */
17
- SwitchViewButton?: React.ElementType;
16
+ switchViewButton?: React.ElementType;
18
17
  /**
19
18
  * Icon displayed in the SwitchViewButton. Rotated by 180° when the open view is 'year'.
20
19
  * @default ArrowDropDown
21
20
  */
22
- SwitchViewIcon?: React.ElementType;
21
+ switchViewIcon?: React.ElementType;
23
22
  }
24
23
  export interface PickersCalendarHeaderComponentsPropsOverrides {
25
24
  }
@@ -29,23 +28,11 @@ export interface PickersCalendarHeaderSlotsComponentsProps<TDate> extends Picker
29
28
  switchViewIcon?: SlotComponentProps<typeof SvgIcon, PickersCalendarHeaderComponentsPropsOverrides, undefined>;
30
29
  }
31
30
  export interface PickersCalendarHeaderProps<TDate> extends ExportedPickersArrowSwitcherProps, MonthValidationOptions<TDate> {
32
- /**
33
- * Overridable components.
34
- * @default {}
35
- * @deprecated Please use `slots`.
36
- */
37
- components?: PickersCalendarHeaderSlotsComponent;
38
- /**
39
- * The props used for each component slot.
40
- * @default {}
41
- * @deprecated Please use `slotProps`.
42
- */
43
- componentsProps?: PickersCalendarHeaderSlotsComponentsProps<TDate>;
44
31
  /**
45
32
  * Overridable component slots.
46
33
  * @default {}
47
34
  */
48
- slots?: UncapitalizeObjectKeys<PickersCalendarHeaderSlotsComponent>;
35
+ slots?: PickersCalendarHeaderSlotsComponent;
49
36
  /**
50
37
  * The props used for each component slot.
51
38
  * @default {}
@@ -124,18 +124,6 @@ process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = {
124
124
  children: PropTypes.node,
125
125
  classes: PropTypes.object,
126
126
  className: PropTypes.string,
127
- /**
128
- * Overridable components.
129
- * @default {}
130
- * @deprecated Please use `slots`.
131
- */
132
- components: PropTypes.object,
133
- /**
134
- * The props used for each component slot.
135
- * @default {}
136
- * @deprecated Please use `slotProps`.
137
- */
138
- componentsProps: PropTypes.object,
139
127
  disabled: PropTypes.bool,
140
128
  isLandscape: PropTypes.bool.isRequired,
141
129
  isValid: PropTypes.func.isRequired,
@@ -5,7 +5,6 @@ import { PickersActionBarProps } from '../PickersActionBar';
5
5
  import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar';
6
6
  import { BaseTabsProps, ExportedBaseTabsProps } from '../internals/models/props/tabs';
7
7
  import { UsePickerLayoutPropsResponseLayoutProps } from '../internals/hooks/usePicker/usePickerLayoutProps';
8
- import { UncapitalizeObjectKeys } from '../internals/utils/slots-migration';
9
8
  import { PickersLayoutClasses } from './pickersLayoutClasses';
10
9
  import { DateOrTimeViewWithMeridiem, WrapperVariant } from '../internals/models/common';
11
10
  import { PickersShortcutsProps } from '../PickersShortcuts';
@@ -14,17 +13,17 @@ export interface ExportedPickersLayoutSlotsComponent<TValue, TDate, TView extend
14
13
  * Custom component for the action bar, it is placed below the picker views.
15
14
  * @default PickersActionBar
16
15
  */
17
- ActionBar?: React.ElementType<PickersActionBarProps>;
16
+ actionBar?: React.ElementType<PickersActionBarProps>;
18
17
  /**
19
18
  * Custom component for the shortcuts.
20
19
  * @default PickersShortcuts
21
20
  */
22
- Shortcuts?: React.JSXElementConstructor<PickersShortcutsProps<TValue>>;
21
+ shortcuts?: React.JSXElementConstructor<PickersShortcutsProps<TValue>>;
23
22
  /**
24
23
  * Custom component for wrapping the layout.
25
24
  * It wraps the toolbar, views, action bar, and shortcuts.
26
25
  */
27
- Layout?: React.JSXElementConstructor<PickersLayoutProps<TValue, TDate, TView> & React.RefAttributes<HTMLDivElement>>;
26
+ layout?: React.JSXElementConstructor<PickersLayoutProps<TValue, TDate, TView> & React.RefAttributes<HTMLDivElement>>;
28
27
  }
29
28
  interface PickersLayoutActionBarOwnerState<TValue, TDate, TView extends DateOrTimeViewWithMeridiem> extends PickersLayoutProps<TValue, TDate, TView> {
30
29
  wrapperVariant: WrapperVariant;
@@ -50,12 +49,12 @@ export interface PickersLayoutSlotsComponent<TValue, TDate, TView extends DateOr
50
49
  /**
51
50
  * Tabs enabling toggling between views.
52
51
  */
53
- Tabs?: React.ElementType<BaseTabsProps<TView>>;
52
+ tabs?: React.ElementType<BaseTabsProps<TView>>;
54
53
  /**
55
54
  * Custom component for the toolbar.
56
55
  * It is placed above the picker views.
57
56
  */
58
- Toolbar?: React.JSXElementConstructor<BaseToolbarProps<TValue, TView>>;
57
+ toolbar?: React.JSXElementConstructor<BaseToolbarProps<TValue, TView>>;
59
58
  }
60
59
  export interface PickersLayoutSlotsComponentsProps<TValue, TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedPickersLayoutSlotsComponentsProps<TValue, TDate, TView> {
61
60
  /**
@@ -77,23 +76,11 @@ export interface PickersLayoutProps<TValue, TDate, TView extends DateOrTimeViewW
77
76
  */
78
77
  ref?: React.Ref<HTMLDivElement>;
79
78
  classes?: Partial<PickersLayoutClasses>;
80
- /**
81
- * Overridable components.
82
- * @default {}
83
- * @deprecated Please use `slots`.
84
- */
85
- components?: PickersLayoutSlotsComponent<TValue, TDate, TView>;
86
- /**
87
- * The props used for each component slot.
88
- * @default {}
89
- * @deprecated Please use `slotProps`.
90
- */
91
- componentsProps?: PickersLayoutSlotsComponentsProps<TValue, TDate, TView>;
92
79
  /**
93
80
  * Overridable component slots.
94
81
  * @default {}
95
82
  */
96
- slots?: UncapitalizeObjectKeys<PickersLayoutSlotsComponent<TValue, TDate, TView>>;
83
+ slots?: PickersLayoutSlotsComponent<TValue, TDate, TView>;
97
84
  /**
98
85
  * The props used for each component slot.
99
86
  * @default {}
@@ -5,7 +5,6 @@ import { unstable_composeClasses as composeClasses } from '@mui/utils';
5
5
  import { PickersActionBar } from '../PickersActionBar';
6
6
  import { getPickersLayoutUtilityClass } from './pickersLayoutClasses';
7
7
  import { PickersShortcuts } from '../PickersShortcuts';
8
- import { uncapitalizeObjectKeys } from '../internals/utils/slots-migration';
9
8
  import { jsx as _jsx } from "react/jsx-runtime";
10
9
  function toolbarHasView(toolbarProps) {
11
10
  return toolbarProps.view !== null;
@@ -45,17 +44,13 @@ const usePickerLayout = props => {
45
44
  disabled,
46
45
  readOnly,
47
46
  children,
48
- components,
49
- componentsProps,
50
- slots: innerSlots,
51
- slotProps: innerSlotProps
47
+ slots,
48
+ slotProps
52
49
  // TODO: Remove this "as" hack. It get introduced to mark `value` prop in PickersLayoutProps as not required.
53
50
  // The true type should be
54
51
  // - For pickers value: TDate | null
55
52
  // - For range pickers value: [TDate | null, TDate | null]
56
53
  } = props;
57
- const slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
58
- const slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
59
54
  const classes = useUtilityClasses(props);
60
55
 
61
56
  // Action bar
@@ -64,18 +64,6 @@ StaticDatePicker.propTypes = {
64
64
  * Class name applied to the root element.
65
65
  */
66
66
  className: PropTypes.string,
67
- /**
68
- * Overridable components.
69
- * @default {}
70
- * @deprecated Please use `slots`.
71
- */
72
- components: PropTypes.object,
73
- /**
74
- * The props used for each component slot.
75
- * @default {}
76
- * @deprecated Please use `slotProps`.
77
- */
78
- componentsProps: PropTypes.object,
79
67
  /**
80
68
  * Formats the day of week displayed in the calendar header.
81
69
  * @param {string} day The day of week provided by the adapter. Deprecated, will be removed in v7: Use `date` instead.