@mui/x-date-pickers 6.18.0 → 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 (216) hide show
  1. package/AdapterLuxon/AdapterLuxon.js +13 -3
  2. package/CHANGELOG.md +212 -5
  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/hooks/useViews.js +2 -1
  76. package/internals/index.d.ts +0 -2
  77. package/internals/index.js +0 -1
  78. package/legacy/AdapterLuxon/AdapterLuxon.js +13 -3
  79. package/legacy/DateCalendar/DateCalendar.js +4 -20
  80. package/legacy/DateCalendar/DayCalendar.js +3 -5
  81. package/legacy/DateCalendar/useCalendarState.js +2 -3
  82. package/legacy/DateField/DateField.js +6 -22
  83. package/legacy/DatePicker/DatePicker.js +0 -12
  84. package/legacy/DatePicker/shared.js +2 -5
  85. package/legacy/DateTimeField/DateTimeField.js +6 -22
  86. package/legacy/DateTimePicker/DateTimePicker.js +0 -12
  87. package/legacy/DateTimePicker/shared.js +4 -7
  88. package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -12
  89. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
  90. package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -12
  91. package/legacy/DigitalClock/DigitalClock.js +17 -24
  92. package/legacy/MobileDatePicker/MobileDatePicker.js +0 -12
  93. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
  94. package/legacy/MobileTimePicker/MobileTimePicker.js +0 -12
  95. package/legacy/MonthCalendar/MonthCalendar.js +3 -6
  96. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +11 -18
  97. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
  98. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +15 -10
  99. package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +4 -18
  100. package/legacy/PickersLayout/PickersLayout.js +0 -12
  101. package/legacy/PickersLayout/usePickerLayout.js +2 -7
  102. package/legacy/StaticDatePicker/StaticDatePicker.js +0 -12
  103. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
  104. package/legacy/StaticTimePicker/StaticTimePicker.js +0 -12
  105. package/legacy/TimeClock/TimeClock.js +3 -20
  106. package/legacy/TimeField/TimeField.js +5 -21
  107. package/legacy/TimePicker/TimePicker.js +0 -12
  108. package/legacy/TimePicker/shared.js +4 -7
  109. package/legacy/YearCalendar/YearCalendar.js +3 -6
  110. package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +2 -8
  111. package/legacy/dateViewRenderers/dateViewRenderers.js +0 -4
  112. package/legacy/hooks/useClearableField.js +6 -8
  113. package/legacy/index.js +1 -1
  114. package/legacy/internals/hooks/useViews.js +2 -1
  115. package/legacy/internals/index.js +0 -1
  116. package/legacy/locales/esES.js +6 -7
  117. package/legacy/locales/eu.js +94 -0
  118. package/legacy/locales/index.js +1 -0
  119. package/legacy/timeViewRenderers/timeViewRenderers.js +0 -12
  120. package/locales/esES.js +6 -7
  121. package/locales/eu.d.ts +54 -0
  122. package/locales/eu.js +58 -0
  123. package/locales/index.d.ts +1 -0
  124. package/locales/index.js +1 -0
  125. package/modern/AdapterLuxon/AdapterLuxon.js +13 -3
  126. package/modern/DateCalendar/DateCalendar.js +3 -19
  127. package/modern/DateCalendar/DayCalendar.js +2 -4
  128. package/modern/DateCalendar/useCalendarState.js +2 -3
  129. package/modern/DateField/DateField.js +4 -20
  130. package/modern/DatePicker/DatePicker.js +0 -12
  131. package/modern/DatePicker/shared.js +1 -4
  132. package/modern/DateTimeField/DateTimeField.js +4 -20
  133. package/modern/DateTimePicker/DateTimePicker.js +0 -12
  134. package/modern/DateTimePicker/shared.js +3 -6
  135. package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -12
  136. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
  137. package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -12
  138. package/modern/DigitalClock/DigitalClock.js +14 -23
  139. package/modern/MobileDatePicker/MobileDatePicker.js +0 -12
  140. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
  141. package/modern/MobileTimePicker/MobileTimePicker.js +0 -12
  142. package/modern/MonthCalendar/MonthCalendar.js +3 -7
  143. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -18
  144. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
  145. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -10
  146. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +3 -16
  147. package/modern/PickersLayout/PickersLayout.js +0 -12
  148. package/modern/PickersLayout/usePickerLayout.js +2 -7
  149. package/modern/StaticDatePicker/StaticDatePicker.js +0 -12
  150. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
  151. package/modern/StaticTimePicker/StaticTimePicker.js +0 -12
  152. package/modern/TimeClock/TimeClock.js +3 -20
  153. package/modern/TimeField/TimeField.js +4 -20
  154. package/modern/TimePicker/TimePicker.js +0 -12
  155. package/modern/TimePicker/shared.js +3 -6
  156. package/modern/YearCalendar/YearCalendar.js +3 -7
  157. package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +1 -7
  158. package/modern/dateViewRenderers/dateViewRenderers.js +0 -4
  159. package/modern/hooks/useClearableField.js +5 -7
  160. package/modern/index.js +1 -1
  161. package/modern/internals/hooks/useViews.js +2 -1
  162. package/modern/internals/index.js +0 -1
  163. package/modern/locales/esES.js +6 -7
  164. package/modern/locales/eu.js +58 -0
  165. package/modern/locales/index.js +1 -0
  166. package/modern/timeViewRenderers/timeViewRenderers.js +0 -12
  167. package/node/AdapterLuxon/AdapterLuxon.js +13 -3
  168. package/node/DateCalendar/DateCalendar.js +3 -19
  169. package/node/DateCalendar/DayCalendar.js +2 -4
  170. package/node/DateCalendar/useCalendarState.js +1 -2
  171. package/node/DateField/DateField.js +4 -20
  172. package/node/DatePicker/DatePicker.js +0 -12
  173. package/node/DatePicker/shared.js +1 -4
  174. package/node/DateTimeField/DateTimeField.js +4 -20
  175. package/node/DateTimePicker/DateTimePicker.js +0 -12
  176. package/node/DateTimePicker/shared.js +3 -6
  177. package/node/DesktopDatePicker/DesktopDatePicker.js +0 -12
  178. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
  179. package/node/DesktopTimePicker/DesktopTimePicker.js +0 -12
  180. package/node/DigitalClock/DigitalClock.js +14 -23
  181. package/node/MobileDatePicker/MobileDatePicker.js +0 -12
  182. package/node/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
  183. package/node/MobileTimePicker/MobileTimePicker.js +0 -12
  184. package/node/MonthCalendar/MonthCalendar.js +3 -7
  185. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -18
  186. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
  187. package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -10
  188. package/node/PickersCalendarHeader/PickersCalendarHeader.js +3 -16
  189. package/node/PickersLayout/PickersLayout.js +0 -12
  190. package/node/PickersLayout/usePickerLayout.js +2 -7
  191. package/node/StaticDatePicker/StaticDatePicker.js +0 -12
  192. package/node/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
  193. package/node/StaticTimePicker/StaticTimePicker.js +0 -12
  194. package/node/TimeClock/TimeClock.js +3 -20
  195. package/node/TimeField/TimeField.js +4 -20
  196. package/node/TimePicker/TimePicker.js +0 -12
  197. package/node/TimePicker/shared.js +3 -6
  198. package/node/YearCalendar/YearCalendar.js +3 -7
  199. package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +1 -7
  200. package/node/dateViewRenderers/dateViewRenderers.js +0 -4
  201. package/node/hooks/useClearableField.js +5 -7
  202. package/node/index.js +1 -1
  203. package/node/internals/hooks/useViews.js +2 -1
  204. package/node/internals/index.js +0 -7
  205. package/node/locales/esES.js +6 -7
  206. package/node/locales/eu.js +64 -0
  207. package/node/locales/index.js +11 -0
  208. package/node/timeViewRenderers/timeViewRenderers.js +0 -12
  209. package/package.json +1 -1
  210. package/timeViewRenderers/timeViewRenderers.d.ts +3 -3
  211. package/timeViewRenderers/timeViewRenderers.js +0 -12
  212. package/internals/utils/slots-migration.d.ts +0 -36
  213. package/internals/utils/slots-migration.js +0 -13
  214. package/legacy/internals/utils/slots-migration.js +0 -14
  215. package/modern/internals/utils/slots-migration.js +0 -13
  216. package/node/internals/utils/slots-migration.js +0 -21
@@ -27,7 +27,7 @@ var _useValueWithTimezone = require("../internals/hooks/useValueWithTimezone");
27
27
  var _valueManagers = require("../internals/utils/valueManagers");
28
28
  var _useClockReferenceDate = require("../internals/hooks/useClockReferenceDate");
29
29
  var _jsxRuntime = require("react/jsx-runtime");
30
- const _excluded = ["ampm", "timeStep", "autoFocus", "components", "componentsProps", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "onChange", "view", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "views", "skipDisabled", "timezone"];
30
+ const _excluded = ["ampm", "timeStep", "autoFocus", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "onChange", "view", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "views", "skipDisabled", "timezone"];
31
31
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
32
32
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
33
33
  const useUtilityClasses = ownerState => {
@@ -110,8 +110,6 @@ const DigitalClock = exports.DigitalClock = /*#__PURE__*/React.forwardRef(functi
110
110
  ampm = utils.is12HourCycleInCurrentLocale(),
111
111
  timeStep = 30,
112
112
  autoFocus,
113
- components,
114
- componentsProps,
115
113
  slots,
116
114
  slotProps,
117
115
  value: valueProp,
@@ -157,10 +155,10 @@ const DigitalClock = exports.DigitalClock = /*#__PURE__*/React.forwardRef(functi
157
155
  alreadyRendered: !!containerRef.current
158
156
  }), [props]);
159
157
  const classes = useUtilityClasses(ownerState);
160
- const ClockItem = slots?.digitalClockItem ?? components?.DigitalClockItem ?? DigitalClockItem;
158
+ const ClockItem = slots?.digitalClockItem ?? DigitalClockItem;
161
159
  const clockItemProps = (0, _utils.useSlotProps)({
162
160
  elementType: ClockItem,
163
- externalSlotProps: slotProps?.digitalClockItem ?? componentsProps?.digitalClockItem,
161
+ externalSlotProps: slotProps?.digitalClockItem,
164
162
  ownerState: {},
165
163
  className: classes.item
166
164
  });
@@ -190,11 +188,14 @@ const DigitalClock = exports.DigitalClock = /*#__PURE__*/React.forwardRef(functi
190
188
  if (containerRef.current === null) {
191
189
  return;
192
190
  }
193
- const selectedItem = containerRef.current.querySelector('[role="listbox"] [role="option"][aria-selected="true"]');
194
- if (!selectedItem) {
191
+ const activeItem = containerRef.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');
192
+ if (!activeItem) {
195
193
  return;
196
194
  }
197
- const offsetTop = selectedItem.offsetTop;
195
+ const offsetTop = activeItem.offsetTop;
196
+ if (autoFocus || !!focusedView) {
197
+ activeItem.focus();
198
+ }
198
199
 
199
200
  // Subtracting the 4px of extra margin intended for the first visible section item
200
201
  containerRef.current.scrollTop = offsetTop - 4;
@@ -236,21 +237,22 @@ const DigitalClock = exports.DigitalClock = /*#__PURE__*/React.forwardRef(functi
236
237
  length: Math.ceil(24 * 60 / timeStep) - 1
237
238
  }, (_, index) => utils.addMinutes(startOfDay, timeStep * (index + 1)))];
238
239
  }, [valueOrReferenceDate, timeStep, utils]);
240
+ const focusedOptionIndex = timeOptions.findIndex(option => utils.isEqual(option, valueOrReferenceDate));
239
241
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(DigitalClockRoot, (0, _extends2.default)({
240
242
  ref: handleRef,
241
243
  className: (0, _clsx.default)(classes.root, className),
242
244
  ownerState: ownerState
243
245
  }, other, {
244
246
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DigitalClockList, {
245
- autoFocusItem: autoFocus || !!focusedView,
246
247
  role: "listbox",
247
248
  "aria-label": localeText.timePickerToolbarTitle,
248
249
  className: classes.list,
249
- children: timeOptions.map(option => {
250
+ children: timeOptions.map((option, index) => {
250
251
  if (skipDisabled && isTimeDisabled(option)) {
251
252
  return null;
252
253
  }
253
254
  const isSelected = utils.isEqual(option, value);
255
+ const tabIndex = focusedOptionIndex === index || focusedOptionIndex === -1 && index === 0 ? 0 : -1;
254
256
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ClockItem, (0, _extends2.default)({
255
257
  onClick: () => !readOnly && handleItemSelect(option),
256
258
  selected: isSelected,
@@ -260,7 +262,8 @@ const DigitalClock = exports.DigitalClock = /*#__PURE__*/React.forwardRef(functi
260
262
  // aria-readonly is not supported here and does not have any effect
261
263
  ,
262
264
  "aria-disabled": readOnly,
263
- "aria-selected": isSelected
265
+ "aria-selected": isSelected,
266
+ tabIndex: tabIndex
264
267
  }, clockItemProps, {
265
268
  children: utils.format(option, ampm ? 'fullTime12h' : 'fullTime24h')
266
269
  }), utils.toISO(option));
@@ -290,18 +293,6 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
290
293
  */
291
294
  classes: _propTypes.default.object,
292
295
  className: _propTypes.default.string,
293
- /**
294
- * Overrideable components.
295
- * @default {}
296
- * @deprecated Please use `slots`.
297
- */
298
- components: _propTypes.default.object,
299
- /**
300
- * The props used for each component slot.
301
- * @default {}
302
- * @deprecated Please use `slotProps`.
303
- */
304
- componentsProps: _propTypes.default.object,
305
296
  /**
306
297
  * The default selected value.
307
298
  * Used when the component is not controlled.
@@ -90,18 +90,6 @@ MobileDatePicker.propTypes = {
90
90
  * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
91
91
  */
92
92
  closeOnSelect: _propTypes.default.bool,
93
- /**
94
- * Overridable components.
95
- * @default {}
96
- * @deprecated Please use `slots`.
97
- */
98
- components: _propTypes.default.object,
99
- /**
100
- * The props used for each component slot.
101
- * @default {}
102
- * @deprecated Please use `slotProps`.
103
- */
104
- componentsProps: _propTypes.default.object,
105
93
  /**
106
94
  * Formats the day of week displayed in the calendar header.
107
95
  * @param {string} day The day of week provided by the adapter. Deprecated, will be removed in v7: Use `date` instead.
@@ -111,18 +111,6 @@ MobileDateTimePicker.propTypes = {
111
111
  * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
112
112
  */
113
113
  closeOnSelect: _propTypes.default.bool,
114
- /**
115
- * Overridable components.
116
- * @default {}
117
- * @deprecated Please use `slots`.
118
- */
119
- components: _propTypes.default.object,
120
- /**
121
- * The props used for each component slot.
122
- * @default {}
123
- * @deprecated Please use `slotProps`.
124
- */
125
- componentsProps: _propTypes.default.object,
126
114
  /**
127
115
  * Formats the day of week displayed in the calendar header.
128
116
  * @param {string} day The day of week provided by the adapter. Deprecated, will be removed in v7: Use `date` instead.
@@ -104,18 +104,6 @@ MobileTimePicker.propTypes = {
104
104
  * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
105
105
  */
106
106
  closeOnSelect: _propTypes.default.bool,
107
- /**
108
- * Overridable components.
109
- * @default {}
110
- * @deprecated Please use `slots`.
111
- */
112
- components: _propTypes.default.object,
113
- /**
114
- * The props used for each component slot.
115
- * @default {}
116
- * @deprecated Please use `slotProps`.
117
- */
118
- componentsProps: _propTypes.default.object,
119
107
  /**
120
108
  * The default value.
121
109
  * Used when the component is not controlled.
@@ -87,7 +87,6 @@ const MonthCalendar = exports.MonthCalendar = /*#__PURE__*/React.forwardRef(func
87
87
  onChange,
88
88
  shouldDisableMonth,
89
89
  readOnly,
90
- disableHighlightToday,
91
90
  autoFocus = false,
92
91
  onMonthFocus,
93
92
  hasFocus,
@@ -129,12 +128,9 @@ const MonthCalendar = exports.MonthCalendar = /*#__PURE__*/React.forwardRef(func
129
128
  if (value != null) {
130
129
  return utils.getMonth(value);
131
130
  }
132
- if (disableHighlightToday) {
133
- return null;
134
- }
135
- return utils.getMonth(referenceDate);
136
- }, [value, utils, disableHighlightToday, referenceDate]);
137
- const [focusedMonth, setFocusedMonth] = React.useState(() => selectedMonth || todayMonth);
131
+ return null;
132
+ }, [value, utils]);
133
+ const [focusedMonth, setFocusedMonth] = React.useState(() => selectedMonth || utils.getMonth(referenceDate));
138
134
  const [internalHasFocus, setInternalHasFocus] = (0, _utils.unstable_useControlled)({
139
135
  name: 'MonthCalendar',
140
136
  state: 'hasFocus',
@@ -26,7 +26,7 @@ var _valueManagers = require("../internals/utils/valueManagers");
26
26
  var _useClockReferenceDate = require("../internals/hooks/useClockReferenceDate");
27
27
  var _dateUtils = require("../internals/utils/date-utils");
28
28
  var _jsxRuntime = require("react/jsx-runtime");
29
- 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"];
29
+ 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"];
30
30
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
31
31
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
32
32
  const useUtilityClasses = ownerState => {
@@ -70,8 +70,6 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
70
70
  ampm = utils.is12HourCycleInCurrentLocale(),
71
71
  timeSteps: inTimeSteps,
72
72
  autoFocus,
73
- components,
74
- componentsProps,
75
73
  slots,
76
74
  slotProps,
77
75
  value: valueProp,
@@ -251,7 +249,8 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
251
249
  utils,
252
250
  isDisabled: hours => disabled || isTimeDisabled(hours, 'hours'),
253
251
  timeStep: timeSteps.hours,
254
- resolveAriaLabel: localeText.hoursClockNumberText
252
+ resolveAriaLabel: localeText.hoursClockNumberText,
253
+ valueOrReferenceDate
255
254
  })
256
255
  };
257
256
  }
@@ -297,11 +296,13 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
297
296
  value: 'am',
298
297
  label: amLabel,
299
298
  isSelected: () => !!value && meridiemMode === 'am',
299
+ isFocused: () => !!valueOrReferenceDate && meridiemMode === 'am',
300
300
  ariaLabel: amLabel
301
301
  }, {
302
302
  value: 'pm',
303
303
  label: pmLabel,
304
304
  isSelected: () => !!value && meridiemMode === 'pm',
305
+ isFocused: () => !!valueOrReferenceDate && meridiemMode === 'pm',
305
306
  ariaLabel: pmLabel
306
307
  }]
307
308
  };
@@ -332,8 +333,8 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
332
333
  autoFocus: autoFocus ?? focusedView === timeView,
333
334
  disabled: disabled,
334
335
  readOnly: readOnly,
335
- slots: slots ?? components,
336
- slotProps: slotProps ?? componentsProps,
336
+ slots: slots,
337
+ slotProps: slotProps,
337
338
  skipDisabled: skipDisabled,
338
339
  "aria-label": localeText.selectViewText(timeView)
339
340
  }, timeView))
@@ -361,18 +362,6 @@ process.env.NODE_ENV !== "production" ? MultiSectionDigitalClock.propTypes = {
361
362
  */
362
363
  classes: _propTypes.default.object,
363
364
  className: _propTypes.default.string,
364
- /**
365
- * Overrideable components.
366
- * @default {}
367
- * @deprecated Please use `slots`.
368
- */
369
- components: _propTypes.default.object,
370
- /**
371
- * The props used for each component slot.
372
- * @default {}
373
- * @deprecated Please use `slotProps`.
374
- */
375
- componentsProps: _propTypes.default.object,
376
365
  /**
377
366
  * The default selected value.
378
367
  * Used when the component is not controlled.
@@ -11,21 +11,26 @@ const getHourSectionOptions = ({
11
11
  ampm,
12
12
  isDisabled,
13
13
  resolveAriaLabel,
14
- timeStep
14
+ timeStep,
15
+ valueOrReferenceDate
15
16
  }) => {
16
17
  const currentHours = value ? utils.getHours(value) : null;
17
18
  const result = [];
18
- const isSelected = hour => {
19
- if (currentHours === null) {
19
+ const isSelected = (hour, overriddenCurrentHours) => {
20
+ const resolvedCurrentHours = overriddenCurrentHours ?? currentHours;
21
+ if (resolvedCurrentHours === null) {
20
22
  return false;
21
23
  }
22
24
  if (ampm) {
23
25
  if (hour === 12) {
24
- return currentHours === 12 || currentHours === 0;
26
+ return resolvedCurrentHours === 12 || resolvedCurrentHours === 0;
25
27
  }
26
- return currentHours === hour || currentHours - 12 === hour;
28
+ return resolvedCurrentHours === hour || resolvedCurrentHours - 12 === hour;
27
29
  }
28
- return currentHours === hour;
30
+ return resolvedCurrentHours === hour;
31
+ };
32
+ const isFocused = hour => {
33
+ return isSelected(hour, utils.getHours(valueOrReferenceDate));
29
34
  };
30
35
  const endHour = ampm ? 11 : 23;
31
36
  for (let hour = 0; hour <= endHour; hour += timeStep) {
@@ -37,6 +42,7 @@ const getHourSectionOptions = ({
37
42
  label,
38
43
  isSelected,
39
44
  isDisabled,
45
+ isFocused,
40
46
  ariaLabel
41
47
  });
42
48
  }
@@ -57,6 +63,9 @@ const getTimeSectionOptions = ({
57
63
  }
58
64
  return hasValue && value === timeValue;
59
65
  };
66
+ const isFocused = timeValue => {
67
+ return value === timeValue;
68
+ };
60
69
  return [...Array.from({
61
70
  length: Math.ceil(60 / timeStep)
62
71
  }, (_, index) => {
@@ -66,6 +75,7 @@ const getTimeSectionOptions = ({
66
75
  label: resolveLabel(timeValue),
67
76
  isDisabled,
68
77
  isSelected,
78
+ isFocused,
69
79
  ariaLabel: resolveAriaLabel(timeValue.toString())
70
80
  };
71
81
  })];
@@ -92,7 +92,7 @@ const MultiSectionDigitalClockSectionItem = (0, _styles.styled)(_MenuItem.defaul
92
92
  const MultiSectionDigitalClockSection = exports.MultiSectionDigitalClockSection = /*#__PURE__*/React.forwardRef(function MultiSectionDigitalClockSection(inProps, ref) {
93
93
  const containerRef = React.useRef(null);
94
94
  const handleRef = (0, _useForkRef.default)(ref, containerRef);
95
- const previousSelected = React.useRef(null);
95
+ const previousActive = React.useRef(null);
96
96
  const props = (0, _styles.useThemeProps)({
97
97
  props: inProps,
98
98
  name: 'MuiMultiSectionDigitalClockSection'
@@ -119,23 +119,24 @@ const MultiSectionDigitalClockSection = exports.MultiSectionDigitalClockSection
119
119
  if (containerRef.current === null) {
120
120
  return;
121
121
  }
122
- const selectedItem = containerRef.current.querySelector('[role="option"][aria-selected="true"]');
123
- if (!selectedItem || previousSelected.current === selectedItem) {
122
+ const activeItem = containerRef.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');
123
+ if (!activeItem || previousActive.current === activeItem) {
124
124
  // Handle setting the ref to null if the selected item is ever reset via UI
125
- if (previousSelected.current !== selectedItem) {
126
- previousSelected.current = selectedItem;
125
+ if (previousActive.current !== activeItem) {
126
+ previousActive.current = activeItem;
127
127
  }
128
128
  return;
129
129
  }
130
- previousSelected.current = selectedItem;
130
+ previousActive.current = activeItem;
131
131
  if (active && autoFocus) {
132
- selectedItem.focus();
132
+ activeItem.focus();
133
133
  }
134
- const offsetTop = selectedItem.offsetTop;
134
+ const offsetTop = activeItem.offsetTop;
135
135
 
136
136
  // Subtracting the 4px of extra margin intended for the first visible section item
137
137
  containerRef.current.scrollTop = offsetTop - 4;
138
138
  });
139
+ const focusedOptionIndex = items.findIndex(item => item.isFocused(item.value));
139
140
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(MultiSectionDigitalClockSectionRoot, (0, _extends2.default)({
140
141
  ref: handleRef,
141
142
  className: (0, _clsx.default)(classes.root, className),
@@ -143,11 +144,12 @@ const MultiSectionDigitalClockSection = exports.MultiSectionDigitalClockSection
143
144
  autoFocusItem: autoFocus && active,
144
145
  role: "listbox"
145
146
  }, other, {
146
- children: items.map(option => {
147
+ children: items.map((option, index) => {
147
148
  if (skipDisabled && option.isDisabled?.(option.value)) {
148
149
  return null;
149
150
  }
150
151
  const isSelected = option.isSelected(option.value);
152
+ const tabIndex = focusedOptionIndex === index || focusedOptionIndex === -1 && index === 0 ? 0 : -1;
151
153
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(DigitalClockSectionItem, (0, _extends2.default)({
152
154
  onClick: () => !readOnly && onChange(option.value),
153
155
  selected: isSelected,
@@ -158,7 +160,8 @@ const MultiSectionDigitalClockSection = exports.MultiSectionDigitalClockSection
158
160
  ,
159
161
  "aria-disabled": readOnly,
160
162
  "aria-label": option.ariaLabel,
161
- "aria-selected": isSelected
163
+ "aria-selected": isSelected,
164
+ tabIndex: tabIndex
162
165
  }, slotProps?.digitalClockSectionItem, {
163
166
  children: option.label
164
167
  }), option.label);
@@ -22,7 +22,7 @@ var _PickersArrowSwitcher = require("../internals/components/PickersArrowSwitche
22
22
  var _dateHelpersHooks = require("../internals/hooks/date-helpers-hooks");
23
23
  var _pickersCalendarHeaderClasses = require("./pickersCalendarHeaderClasses");
24
24
  var _jsxRuntime = require("react/jsx-runtime");
25
- const _excluded = ["slots", "slotProps", "components", "componentsProps", "currentMonth", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onMonthChange", "onViewChange", "view", "reduceAnimations", "views", "labelId", "className", "timezone"],
25
+ const _excluded = ["slots", "slotProps", "currentMonth", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onMonthChange", "onViewChange", "view", "reduceAnimations", "views", "labelId", "className", "timezone"],
26
26
  _excluded2 = ["ownerState"];
27
27
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
28
28
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -121,7 +121,6 @@ const PickersCalendarHeader = exports.PickersCalendarHeader = /*#__PURE__*/React
121
121
  const {
122
122
  slots,
123
123
  slotProps,
124
- components,
125
124
  currentMonth: month,
126
125
  disabled,
127
126
  disableFuture,
@@ -140,7 +139,7 @@ const PickersCalendarHeader = exports.PickersCalendarHeader = /*#__PURE__*/React
140
139
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
141
140
  const ownerState = props;
142
141
  const classes = useUtilityClasses(props);
143
- const SwitchViewButton = slots?.switchViewButton ?? components?.SwitchViewButton ?? PickersCalendarHeaderSwitchViewButton;
142
+ const SwitchViewButton = slots?.switchViewButton ?? PickersCalendarHeaderSwitchViewButton;
144
143
  const switchViewButtonProps = (0, _utils.useSlotProps)({
145
144
  elementType: SwitchViewButton,
146
145
  externalSlotProps: slotProps?.switchViewButton,
@@ -151,7 +150,7 @@ const PickersCalendarHeader = exports.PickersCalendarHeader = /*#__PURE__*/React
151
150
  ownerState,
152
151
  className: classes.switchViewButton
153
152
  });
154
- const SwitchViewIcon = slots?.switchViewIcon ?? components?.SwitchViewIcon ?? PickersCalendarHeaderSwitchViewIcon;
153
+ const SwitchViewIcon = slots?.switchViewIcon ?? PickersCalendarHeaderSwitchViewIcon;
155
154
  // The spread is here to avoid this bug mui/material-ui#34056
156
155
  const _useSlotProps = (0, _utils.useSlotProps)({
157
156
  elementType: SwitchViewIcon,
@@ -241,18 +240,6 @@ process.env.NODE_ENV !== "production" ? PickersCalendarHeader.propTypes = {
241
240
  * className applied to the root element.
242
241
  */
243
242
  className: _propTypes.default.string,
244
- /**
245
- * Overridable components.
246
- * @default {}
247
- * @deprecated Please use `slots`.
248
- */
249
- components: _propTypes.default.object,
250
- /**
251
- * The props used for each component slot.
252
- * @default {}
253
- * @deprecated Please use `slotProps`.
254
- */
255
- componentsProps: _propTypes.default.object,
256
243
  currentMonth: _propTypes.default.any.isRequired,
257
244
  disabled: _propTypes.default.bool,
258
245
  disableFuture: _propTypes.default.bool,
@@ -131,18 +131,6 @@ process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = {
131
131
  children: _propTypes.default.node,
132
132
  classes: _propTypes.default.object,
133
133
  className: _propTypes.default.string,
134
- /**
135
- * Overridable components.
136
- * @default {}
137
- * @deprecated Please use `slots`.
138
- */
139
- components: _propTypes.default.object,
140
- /**
141
- * The props used for each component slot.
142
- * @default {}
143
- * @deprecated Please use `slotProps`.
144
- */
145
- componentsProps: _propTypes.default.object,
146
134
  disabled: _propTypes.default.bool,
147
135
  isLandscape: _propTypes.default.bool.isRequired,
148
136
  isValid: _propTypes.default.func.isRequired,
@@ -12,7 +12,6 @@ var _utils2 = require("@mui/utils");
12
12
  var _PickersActionBar = require("../PickersActionBar");
13
13
  var _pickersLayoutClasses = require("./pickersLayoutClasses");
14
14
  var _PickersShortcuts = require("../PickersShortcuts");
15
- var _slotsMigration = require("../internals/utils/slots-migration");
16
15
  var _jsxRuntime = require("react/jsx-runtime");
17
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -53,17 +52,13 @@ const usePickerLayout = props => {
53
52
  disabled,
54
53
  readOnly,
55
54
  children,
56
- components,
57
- componentsProps,
58
- slots: innerSlots,
59
- slotProps: innerSlotProps
55
+ slots,
56
+ slotProps
60
57
  // TODO: Remove this "as" hack. It get introduced to mark `value` prop in PickersLayoutProps as not required.
61
58
  // The true type should be
62
59
  // - For pickers value: TDate | null
63
60
  // - For range pickers value: [TDate | null, TDate | null]
64
61
  } = props;
65
- const slots = innerSlots ?? (0, _slotsMigration.uncapitalizeObjectKeys)(components);
66
- const slotProps = innerSlotProps ?? componentsProps;
67
62
  const classes = useUtilityClasses(props);
68
63
 
69
64
  // Action bar
@@ -72,18 +72,6 @@ StaticDatePicker.propTypes = {
72
72
  * Class name applied to the root element.
73
73
  */
74
74
  className: _propTypes.default.string,
75
- /**
76
- * Overridable components.
77
- * @default {}
78
- * @deprecated Please use `slots`.
79
- */
80
- components: _propTypes.default.object,
81
- /**
82
- * The props used for each component slot.
83
- * @default {}
84
- * @deprecated Please use `slotProps`.
85
- */
86
- componentsProps: _propTypes.default.object,
87
75
  /**
88
76
  * Formats the day of week displayed in the calendar header.
89
77
  * @param {string} day The day of week provided by the adapter. Deprecated, will be removed in v7: Use `date` instead.
@@ -92,18 +92,6 @@ StaticDateTimePicker.propTypes = {
92
92
  * Class name applied to the root element.
93
93
  */
94
94
  className: _propTypes.default.string,
95
- /**
96
- * Overridable components.
97
- * @default {}
98
- * @deprecated Please use `slots`.
99
- */
100
- components: _propTypes.default.object,
101
- /**
102
- * The props used for each component slot.
103
- * @default {}
104
- * @deprecated Please use `slotProps`.
105
- */
106
- componentsProps: _propTypes.default.object,
107
95
  /**
108
96
  * Formats the day of week displayed in the calendar header.
109
97
  * @param {string} day The day of week provided by the adapter. Deprecated, will be removed in v7: Use `date` instead.
@@ -84,18 +84,6 @@ StaticTimePicker.propTypes = {
84
84
  * Class name applied to the root element.
85
85
  */
86
86
  className: _propTypes.default.string,
87
- /**
88
- * Overridable components.
89
- * @default {}
90
- * @deprecated Please use `slots`.
91
- */
92
- components: _propTypes.default.object,
93
- /**
94
- * The props used for each component slot.
95
- * @default {}
96
- * @deprecated Please use `slotProps`.
97
- */
98
- componentsProps: _propTypes.default.object,
99
87
  /**
100
88
  * The default value.
101
89
  * Used when the component is not controlled.
@@ -23,10 +23,9 @@ var _Clock = require("./Clock");
23
23
  var _ClockNumbers = require("./ClockNumbers");
24
24
  var _useValueWithTimezone = require("../internals/hooks/useValueWithTimezone");
25
25
  var _valueManagers = require("../internals/utils/valueManagers");
26
- var _slotsMigration = require("../internals/utils/slots-migration");
27
26
  var _useClockReferenceDate = require("../internals/hooks/useClockReferenceDate");
28
27
  var _jsxRuntime = require("react/jsx-runtime");
29
- const _excluded = ["ampm", "ampmInClock", "autoFocus", "components", "componentsProps", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "showViewSwitcher", "onChange", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "timezone"];
28
+ const _excluded = ["ampm", "ampmInClock", "autoFocus", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "showViewSwitcher", "onChange", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "timezone"];
30
29
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
31
30
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
32
31
  const useUtilityClasses = ownerState => {
@@ -79,10 +78,8 @@ const TimeClock = exports.TimeClock = /*#__PURE__*/React.forwardRef(function Tim
79
78
  ampm = utils.is12HourCycleInCurrentLocale(),
80
79
  ampmInClock = false,
81
80
  autoFocus,
82
- components,
83
- componentsProps,
84
- slots: innerSlots,
85
- slotProps: innerSlotProps,
81
+ slots,
82
+ slotProps,
86
83
  value: valueProp,
87
84
  defaultValue,
88
85
  referenceDate: referenceDateProp,
@@ -108,8 +105,6 @@ const TimeClock = exports.TimeClock = /*#__PURE__*/React.forwardRef(function Tim
108
105
  timezone: timezoneProp
109
106
  } = props,
110
107
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
111
- const slots = innerSlots ?? (0, _slotsMigration.uncapitalizeObjectKeys)(components);
112
- const slotProps = innerSlotProps ?? componentsProps;
113
108
  const {
114
109
  value,
115
110
  handleValueChange,
@@ -354,18 +349,6 @@ process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
354
349
  */
355
350
  classes: _propTypes.default.object,
356
351
  className: _propTypes.default.string,
357
- /**
358
- * Overridable components.
359
- * @default {}
360
- * @deprecated Please use `slots`.
361
- */
362
- components: _propTypes.default.object,
363
- /**
364
- * The props used for each component slot.
365
- * @default {}
366
- * @deprecated Please use `slotProps`.
367
- */
368
- componentsProps: _propTypes.default.object,
369
352
  /**
370
353
  * The default selected value.
371
354
  * Used when the component is not controlled.