@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
@@ -273,15 +273,25 @@ export class AdapterLuxon {
273
273
  };
274
274
  this.expandFormat = format => {
275
275
  // Extract escaped section to avoid extending them
276
- const longFormatRegexp = /''|'(''|[^'])+('|$)|[^']*/g;
277
- return format.match(longFormatRegexp).map(token => {
276
+ const catchEscapedSectionsRegexp = /''|'(''|[^'])+('|$)|[^']*/g;
277
+
278
+ // Extract words to test if they are a token or a word to escape.
279
+ const catchWordsRegexp = /(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;
280
+ return format.match(catchEscapedSectionsRegexp).map(token => {
278
281
  const firstCharacter = token[0];
279
282
  if (firstCharacter === "'") {
280
283
  return token;
281
284
  }
282
- return DateTime.expandFormat(token, {
285
+ const expandedToken = DateTime.expandFormat(token, {
283
286
  locale: this.locale
284
287
  });
288
+ return expandedToken.replace(catchWordsRegexp, (correspondance, g1, g2) => {
289
+ const word = g1 || g2; // words are either in group 1 or group 2
290
+ if (word === 'yyyyy' || formatTokenMap[word] !== undefined) {
291
+ return correspondance;
292
+ }
293
+ return `'${correspondance}'`;
294
+ });
285
295
  }).join('')
286
296
  // The returned format can contain `yyyyy` which means year between 4 and 6 digits.
287
297
  // This value is supported by luxon parser but not luxon formatter.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,213 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.0.0-alpha.0
7
+
8
+ _Nov 10, 2023_
9
+
10
+ We're thrilled to announce the first alpha release of our next major version, v7.
11
+ This release introduces a few breaking changes, paving the way for the upcoming features like Pivoting and DateTimeRangePicker.
12
+
13
+ A special shoutout to thank the 12 contributors who made this release possible. Here are some highlights ✨:
14
+
15
+ - 🚀 First v7 alpha release
16
+ - ✨ Fix aggregation label not showing when `renderHeader` is used (#10961) @cherniavskii
17
+ - 📘 Server side data source [early documentation](https://mui.com/x/react-data-grid/server-side-data/)
18
+ - 💫 New recipes added for the data grid
19
+ - 📈 `<ChartsReferenceLine />` component is now available
20
+ - 🌍 Add Basque (eu) locale, improve Czech (cs-CZ) and Spanish (es-ES) locales
21
+ - 🐞 Bugfixes
22
+ - 📚 Documentation improvements
23
+
24
+ ### Data Grid
25
+
26
+ #### Breaking changes
27
+
28
+ - The deprecated `components` and `componentsProps` props have been removed. Use `slots` and `slotProps` instead. See [components section](/x/react-data-grid/components/) for more details.
29
+ - The print export will now only print the selected rows if there are any.
30
+ If there are no selected rows, it will print all rows. This makes the print export consistent with the other exports.
31
+ You can [customize the rows to export by using the `getRowsToExport` function](/x/react-data-grid/export/#customizing-the-rows-to-export).
32
+ - The `getApplyFilterFnV7` in `GridFilterOperator` was renamed to `getApplyFilterFn`.
33
+ If you use `getApplyFilterFnV7` directly - rename it to `getApplyFilterFn`.
34
+ - The signature of the function returned by `getApplyFilterFn` has changed for performance reasons:
35
+
36
+ ```diff
37
+ const getApplyFilterFn: GetApplyFilterFn<any, unknown> = (filterItem) => {
38
+ if (!filterItem.value) {
39
+ return null;
40
+ }
41
+ const filterRegex = new RegExp(escapeRegExp(filterItem.value), 'i');
42
+ - return (cellParams) => {
43
+ - const { value } = cellParams;
44
+ + return (value, row, colDef, apiRef) => {
45
+ return value != null ? filterRegex.test(String(value)) : false;
46
+ };
47
+ }
48
+ ```
49
+
50
+ - The `getApplyQuickFilterFnV7` in `GridColDef` was renamed to `getApplyQuickFilterFn`.
51
+ If you use `getApplyQuickFilterFnV7` directly - rename it to `getApplyQuickFilterFn`.
52
+ - The signature of the function returned by `getApplyQuickFilterFn` has changed for performance reasons:
53
+
54
+ ```diff
55
+ const getGridStringQuickFilterFn: GetApplyQuickFilterFn<any, unknown> = (value) => {
56
+ if (!value) {
57
+ return null;
58
+ }
59
+ const filterRegex = new RegExp(escapeRegExp(value), 'i');
60
+ - return (cellParams) => {
61
+ - const { formattedValue } = cellParams;
62
+ + return (value, row, column, apiRef) => {
63
+ + let formattedValue = apiRef.current.getRowFormattedValue(row, column);
64
+ return formattedValue != null ? filterRegex.test(formattedValue.toString()) : false;
65
+ };
66
+ };
67
+ ```
68
+
69
+ #### `@mui/x-data-grid@7.0.0-alpha.0`
70
+
71
+ - [DataGrid] Fix for error thrown when removing skeleton rows, after sorting is applied (#10807) @benjaminbialy
72
+ - [DataGrid] Fix: `undefined` slot value (#10937) @romgrk
73
+ - [DataGrid] Print selected rows by default (#10846) @cherniavskii
74
+ - [DataGrid] Remove deprecated `components` and `componentsProps` (#10911) @MBilalShafi
75
+ - [DataGrid] Remove legacy filtering API (#10897) @cherniavskii
76
+ - [DataGrid] Fix keyboard navigation for actions cell with disabled buttons (#10882) @michelengelen
77
+ - [DataGrid] Added a recipe for using non-native select in filter panel (#10916) @michelengelen
78
+ - [DataGrid] Added a recipe to style cells without impacting the aggregation cells (#10913) @michelengelen
79
+ - [l10n] Improve Czech (cs-CZ) locale (#10949) @luborepka
80
+
81
+ #### `@mui/x-data-grid-pro@7.0.0-alpha.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
82
+
83
+ Same changes as in `@mui/x-data-grid@7.0.0-alpha.0`, plus:
84
+
85
+ - [DataGridPro] Autosize Columns - Fix headers being cut off (#10666) @gitstart
86
+ - [DataGridPro] Add data source interface and basic documentation (#10543) @MBilalShafi
87
+
88
+ #### `@mui/x-data-grid-premium@7.0.0-alpha.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
89
+
90
+ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.0`, plus:
91
+
92
+ - [DataGridPremium] Render aggregation label when `renderHeader` is used (#10936) @cherniavskii
93
+
94
+ ### Date Pickers
95
+
96
+ #### Breaking changes
97
+
98
+ - The deprecated `components` and `componentsProps` props have been removed. Use `slots` and `slotProps` instead.
99
+
100
+ #### `@mui/x-date-pickers@7.0.0-alpha.0`
101
+
102
+ - [pickers] Escape non tokens words (#10400) @alexfauquette
103
+ - [fields] Fix `MultiInputTimeRangeField` section selection (#10922) @noraleonte
104
+ - [pickers] Refine `referenceDate` behavior in views (#10863) @LukasTy
105
+ - [pickers] Remove `components` and `componentsProps` props (#10700) @alexfauquette
106
+ - [l10n] Add Basque (eu) locale and improve Spanish (es-ES) locale (#10819) @lajtomekadimon
107
+ - [pickers] Add short weekdays token (#10988) @alexfauquette
108
+
109
+ #### `@mui/x-date-pickers-pro@7.0.0-alpha.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
110
+
111
+ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.0`.
112
+
113
+ ### Charts / `@mui/x-charts@7.0.0-alpha.0`
114
+
115
+ #### Breaking changes
116
+
117
+ Types for `slots` and `slotProps` got renamed by removing the "Component" which is meaningless for charts.
118
+ Unless you imported those types, to create a wrapper, you should not be impacted by this breaking change.
119
+
120
+ Here is an example of the renaming for the `<ChartsTooltip />` component.
121
+
122
+ ```diff
123
+ -ChartsTooltipSlotsComponent
124
+ +ChartsTooltipSlots
125
+
126
+ -ChartsTooltipSlotComponentProps
127
+ +ChartsTooltipSlotProps
128
+ ```
129
+
130
+ - [charts] Add `<ChartsReferenceLine />` component (#10597) (#10946) @alexfauquette
131
+ - [charts] Improve properties JSDoc (#10931) (#10955) @alexfauquette
132
+ - [charts] Rename `slots` and `slotProps` types (#10875) @alexfauquette
133
+
134
+ ### `@mui/x-codemod@7.0.0-alpha.0`
135
+
136
+ - [codemod] Add `v7.0.0/preset-safe` (#10973) @LukasTy
137
+
138
+ ### Docs
139
+
140
+ - [docs] Add `@next` tag to the installation instructions (#10963) @MBilalShafi
141
+ - [docs] Document how to hide the legend (#10951) @alexfauquette
142
+ - [docs] Fix typo in the migration guide (#10972) @flaviendelangle
143
+
144
+ ### Core
145
+
146
+ - [core] Adds migration docs for charts, pickers and tree view (#10926) @michelengelen
147
+ - [core] Bump monorepo (#10959) @LukasTy
148
+ - [core] Changed prettier branch value to next (#10917) @michelengelen
149
+ - [core] Fix GitHub title tag consistency @oliviertassinari
150
+ - [core] Fixed wrong package names in migration docs (#10953) @michelengelen
151
+ - [core] Merge `master` into `next` (#10929) @cherniavskii
152
+ - [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
153
+ - [license] Correctly throw errors (#10924) @oliviertassinari
154
+
155
+ ## 6.18.1
156
+
157
+ _Nov 9, 2023_
158
+
159
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
160
+
161
+ - ✨ Fix aggregation label not showing when `renderHeader` is used (#10961) @cherniavskii
162
+ - 📘 Server side data source [early documentation](https://mui.com/x/react-data-grid/server-side-data/) published
163
+ - 📈 `<ChartsReferenceLine />` component is now available
164
+ - 🐞 Bugfixes
165
+ - 📚 Documentation improvements
166
+
167
+ ### Data Grid
168
+
169
+ #### `@mui/x-data-grid@6.18.1`
170
+
171
+ - [DataGrid] Fix cell value type in quick filtering v7 (#10884) @cherniavskii
172
+ - [DataGrid] Fix keyboard navigation for actions cell with disabled buttons (#10947) @michelengelen
173
+ - [DataGrid] Fix `undefined` slot values (#10934) @romgrk
174
+
175
+ #### `@mui/x-data-grid-pro@6.18.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
176
+
177
+ Same changes as in `@mui/x-data-grid@6.18.1`, plus:
178
+
179
+ - [DataGridPro] Add data source interface and basic documentation (#10543) @MBilalShafi
180
+
181
+ #### `@mui/x-data-grid-premium@6.18.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
182
+
183
+ Same changes as in `@mui/x-data-grid-pro@6.18.1`, plus:
184
+
185
+ - [DataGridPremium] Render aggregation label when `renderHeader` is used (#10961) @cherniavskii
186
+
187
+ ### Date Pickers
188
+
189
+ #### `@mui/x-date-pickers@6.18.1`
190
+
191
+ - [fields] Fix multi input date time field section selection (#10915) @noraleonte
192
+ - [pickers] Always use up-to-date `defaultView` (#10889) @LukasTy
193
+
194
+ #### `@mui/x-date-pickers-pro@6.18.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
195
+
196
+ Same changes as in `@mui/x-date-pickers@6.18.1`.
197
+
198
+ ### Charts / `@mui/x-charts@6.18.1`
199
+
200
+ - [charts] Add `<ChartsReferenceLine />` component (#10597) @wascou
201
+ - [charts] Improve properties JSDoc (#10931) @alexfauquette
202
+
203
+ ### Docs
204
+
205
+ - [docs] Fix charts docs as stable (#10888) @alexfauquette
206
+ - [docs] Document how to hide the legend (#10954) @alexfauquette
207
+
208
+ ### Core
209
+
210
+ - [core] Adds new alpha version to version select on the docs (#10944) @michelengelen
211
+ - [core] Fix GitHub title tag consistency @oliviertassinari
212
+
6
213
  ## 6.18.0
7
214
 
8
215
  _Nov 3, 2023_
@@ -357,7 +564,7 @@ Same changes as in `@mui/x-date-pickers@6.16.1`, plus:
357
564
 
358
565
  - [core] Fix casing consistency with legal and marketing content @oliviertassinari
359
566
  - [core] Revert the link in the priority support ticket description (#10517) @michelengelen
360
- - [CHANGELOG] Polish image @oliviertassinari
567
+ - [changelog] Polish image @oliviertassinari
361
568
 
362
569
  ## 6.16.0
363
570
 
@@ -1149,7 +1356,7 @@ Same changes as in `@mui/x-date-pickers@6.10.1`.
1149
1356
  ### Core
1150
1357
 
1151
1358
  - [core] Add `validate` command (#9714) @romgrk
1152
- - [CHANGELOG] Update generator to new format @oliviertassinari
1359
+ - [changelog] Update generator to new format @oliviertassinari
1153
1360
 
1154
1361
  ## 6.10.0
1155
1362
 
@@ -1207,7 +1414,7 @@ Same changes as in `@mui/x-date-pickers@6.10.0`.
1207
1414
 
1208
1415
  - [core] Disambiguate eslint plugin name @oliviertassinari
1209
1416
  - [core] Update priority support issue template and prompt (#9574) @DanailH
1210
- - [CHANGELOG] Clarify each plan (#9446) @oliviertassinari
1417
+ - [changelog] Clarify each plan (#9446) @oliviertassinari
1211
1418
  - [license] Fix error terminology (#9614) @oliviertassinari
1212
1419
 
1213
1420
  ## 6.9.2
@@ -1356,8 +1563,8 @@ Same changes as in `@mui/x-date-pickers@6.9.1`.
1356
1563
  - [core] Fix priority support prompt action (#9472) @DanailH
1357
1564
  - [core] Update `uses` for priority support action (#9480) @DanailH
1358
1565
  - [core] Bumb update monorepo (#9476) @alexfauquette
1359
- - [CHANGELOG] Fix media quality (#9439) @oliviertassinari
1360
- - [CHANGELOG] Remove height img attribute @oliviertassinari
1566
+ - [changelog] Fix media quality (#9439) @oliviertassinari
1567
+ - [changelog] Remove height img attribute @oliviertassinari
1361
1568
  - [test] Skip flaky row pinning tests in JSDOM (#9511) @cherniavskii
1362
1569
 
1363
1570
  ## 6.9.0
@@ -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 = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "defaultCalendarMonth", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "components", "componentsProps", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsPerRow", "monthsPerRow", "timezone"];
3
+ const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "defaultCalendarMonth", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsPerRow", "monthsPerRow", "timezone"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -83,7 +83,7 @@ const DateCalendarViewTransitionContainer = styled(PickersFadeTransitionGroup, {
83
83
  * - [DateCalendar API](https://mui.com/x/api/date-pickers/date-calendar/)
84
84
  */
85
85
  export const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(inProps, ref) {
86
- var _ref, _slots$calendarHeader, _slotProps$calendarHe;
86
+ var _slots$calendarHeader;
87
87
  const utils = useUtils();
88
88
  const id = useId();
89
89
  const props = useDateCalendarDefaultizedProps(inProps, 'MuiDateCalendar');
@@ -117,8 +117,6 @@ export const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(
117
117
  showDaysOutsideCurrentMonth,
118
118
  fixedWeekNumber,
119
119
  dayOfWeekFormatter,
120
- components,
121
- componentsProps,
122
120
  slots,
123
121
  slotProps,
124
122
  loading,
@@ -185,10 +183,10 @@ export const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(
185
183
  const maxDateWithDisabled = disabled && value || maxDate;
186
184
  const gridLabelId = `${id}-grid-label`;
187
185
  const hasFocus = focusedView !== null;
188
- const CalendarHeader = (_ref = (_slots$calendarHeader = slots == null ? void 0 : slots.calendarHeader) != null ? _slots$calendarHeader : components == null ? void 0 : components.CalendarHeader) != null ? _ref : PickersCalendarHeader;
186
+ const CalendarHeader = (_slots$calendarHeader = slots == null ? void 0 : slots.calendarHeader) != null ? _slots$calendarHeader : PickersCalendarHeader;
189
187
  const calendarHeaderProps = useSlotProps({
190
188
  elementType: CalendarHeader,
191
- externalSlotProps: (_slotProps$calendarHe = slotProps == null ? void 0 : slotProps.calendarHeader) != null ? _slotProps$calendarHe : componentsProps == null ? void 0 : componentsProps.calendarHeader,
189
+ externalSlotProps: slotProps == null ? void 0 : slotProps.calendarHeader,
192
190
  additionalProps: {
193
191
  views,
194
192
  view,
@@ -339,8 +337,6 @@ export const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(
339
337
  fixedWeekNumber: fixedWeekNumber,
340
338
  dayOfWeekFormatter: dayOfWeekFormatter,
341
339
  displayWeekNumber: displayWeekNumber,
342
- components: components,
343
- componentsProps: componentsProps,
344
340
  slots: slots,
345
341
  slotProps: slotProps,
346
342
  loading: loading,
@@ -364,18 +360,6 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
364
360
  autoFocus: PropTypes.bool,
365
361
  classes: PropTypes.object,
366
362
  className: PropTypes.string,
367
- /**
368
- * Overridable components.
369
- * @default {}
370
- * @deprecated Please use `slots`.
371
- */
372
- components: PropTypes.object,
373
- /**
374
- * The props used for each component slot.
375
- * @default {}
376
- * @deprecated Please use `slotProps`.
377
- */
378
- componentsProps: PropTypes.object,
379
363
  /**
380
364
  * Formats the day of week displayed in the calendar header.
381
365
  * @param {string} day The day of week provided by the adapter. Deprecated, will be removed in v7: Use `date` instead.
@@ -10,7 +10,6 @@ import { PickerSelectionState } from '../internals/hooks/usePicker/usePickerValu
10
10
  import { ExportedUseViewsOptions } from '../internals/hooks/useViews';
11
11
  import { DateView, TimezoneProps } from '../models';
12
12
  import { DefaultizedProps } from '../internals/models/helpers';
13
- import { SlotsAndSlotProps } from '../internals/utils/slots-migration';
14
13
  import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
15
14
  import { ExportedMonthCalendarProps } from '../MonthCalendar/MonthCalendar.types';
16
15
  export interface DateCalendarSlotsComponent<TDate> extends PickersCalendarHeaderSlotsComponent, DayCalendarSlotsComponent<TDate> {
@@ -19,7 +18,7 @@ export interface DateCalendarSlotsComponent<TDate> extends PickersCalendarHeader
19
18
  * Check the [PickersCalendarHeader](https://mui.com/x/api/date-pickers/pickers-calendar-header/) component.
20
19
  * @default PickersCalendarHeader
21
20
  */
22
- CalendarHeader?: React.ElementType<PickersCalendarHeaderProps<TDate>>;
21
+ calendarHeader?: React.ElementType<PickersCalendarHeaderProps<TDate>>;
23
22
  }
24
23
  export interface DateCalendarSlotsComponentsProps<TDate> extends PickersCalendarHeaderSlotsComponentsProps<TDate>, DayCalendarSlotsComponentsProps<TDate> {
25
24
  calendarHeader?: SlotComponentProps<typeof PickersCalendarHeader, {}, DateCalendarProps<TDate>>;
@@ -63,7 +62,7 @@ export interface ExportedDateCalendarProps<TDate> extends ExportedDayCalendarPro
63
62
  */
64
63
  onMonthChange?: (month: TDate) => void;
65
64
  }
66
- export interface DateCalendarProps<TDate> extends ExportedDateCalendarProps<TDate>, ExportedUseViewsOptions<DateView>, SlotsAndSlotProps<DateCalendarSlotsComponent<TDate>, DateCalendarSlotsComponentsProps<TDate>> {
65
+ export interface DateCalendarProps<TDate> extends ExportedDateCalendarProps<TDate>, ExportedUseViewsOptions<DateView> {
67
66
  /**
68
67
  * The selected value.
69
68
  * Used when the component is controlled.
@@ -92,5 +91,15 @@ export interface DateCalendarProps<TDate> extends ExportedDateCalendarProps<TDat
92
91
  * The system prop that allows defining system overrides as well as additional CSS styles.
93
92
  */
94
93
  sx?: SxProps<Theme>;
94
+ /**
95
+ * Overridable component slots.
96
+ * @default {}
97
+ */
98
+ slots?: DateCalendarSlotsComponent<TDate>;
99
+ /**
100
+ * The props used for each component slot.
101
+ * @default {}
102
+ */
103
+ slotProps?: DateCalendarSlotsComponentsProps<TDate>;
95
104
  }
96
105
  export type DateCalendarDefaultizedProps<TDate> = DefaultizedProps<DateCalendarProps<TDate>, 'views' | 'openTo' | 'loading' | 'reduceAnimations' | 'renderLoading' | keyof BaseDateValidationProps<TDate>>;
@@ -5,7 +5,6 @@ import { PickerOnChangeFn } from '../internals/hooks/useViews';
5
5
  import { SlideDirection, SlideTransitionProps } from './PickersSlideTransition';
6
6
  import { BaseDateValidationProps, DayValidationProps, MonthValidationProps, YearValidationProps } from '../internals/models/validation';
7
7
  import { DayCalendarClasses } from './dayCalendarClasses';
8
- import { SlotsAndSlotProps } from '../internals/utils/slots-migration';
9
8
  import { TimezoneProps } from '../models';
10
9
  import { DefaultizedProps } from '../internals/models/helpers';
11
10
  export interface DayCalendarSlotsComponent<TDate> {
@@ -14,7 +13,7 @@ export interface DayCalendarSlotsComponent<TDate> {
14
13
  * Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.
15
14
  * @default PickersDay
16
15
  */
17
- Day?: React.ElementType<PickersDayProps<TDate>>;
16
+ day?: React.ElementType<PickersDayProps<TDate>>;
18
17
  }
19
18
  export interface DayCalendarSlotsComponentsProps<TDate> {
20
19
  day?: SlotComponentProps<typeof PickersDay, {}, DayCalendarProps<TDate> & {
@@ -54,7 +53,7 @@ export interface ExportedDayCalendarProps<TDate> extends ExportedPickersDayProps
54
53
  */
55
54
  fixedWeekNumber?: number;
56
55
  }
57
- export interface DayCalendarProps<TDate> extends ExportedDayCalendarProps<TDate>, DayValidationProps<TDate>, MonthValidationProps<TDate>, YearValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'>, SlotsAndSlotProps<DayCalendarSlotsComponent<TDate>, DayCalendarSlotsComponentsProps<TDate>> {
56
+ export interface DayCalendarProps<TDate> extends ExportedDayCalendarProps<TDate>, DayValidationProps<TDate>, MonthValidationProps<TDate>, YearValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'> {
58
57
  autoFocus?: boolean;
59
58
  className?: string;
60
59
  currentMonth: TDate;
@@ -73,6 +72,16 @@ export interface DayCalendarProps<TDate> extends ExportedDayCalendarProps<TDate>
73
72
  onFocusedViewChange?: (newHasFocus: boolean) => void;
74
73
  gridLabelId?: string;
75
74
  classes?: Partial<DayCalendarClasses>;
75
+ /**
76
+ * Overridable component slots.
77
+ * @default {}
78
+ */
79
+ slots?: DayCalendarSlotsComponent<TDate>;
80
+ /**
81
+ * The props used for each component slot.
82
+ * @default {}
83
+ */
84
+ slotProps?: DayCalendarSlotsComponentsProps<TDate>;
76
85
  }
77
86
  /**
78
87
  * @ignore - do not document.
@@ -133,7 +133,7 @@ const PickersCalendarWeek = styled('div', {
133
133
  justifyContent: 'center'
134
134
  });
135
135
  function WrappedDay(_ref) {
136
- var _ref2, _slots$day, _slotProps$day;
136
+ var _slots$day;
137
137
  let {
138
138
  parentProps,
139
139
  day,
@@ -149,8 +149,6 @@ function WrappedDay(_ref) {
149
149
  disableHighlightToday,
150
150
  isMonthSwitchingAnimating,
151
151
  showDaysOutsideCurrentMonth,
152
- components,
153
- componentsProps,
154
152
  slots,
155
153
  slotProps,
156
154
  timezone
@@ -160,11 +158,11 @@ function WrappedDay(_ref) {
160
158
  const isFocusableDay = focusableDay !== null && utils.isSameDay(day, focusableDay);
161
159
  const isSelected = selectedDays.some(selectedDay => utils.isSameDay(selectedDay, day));
162
160
  const isToday = utils.isSameDay(day, now);
163
- const Day = (_ref2 = (_slots$day = slots == null ? void 0 : slots.day) != null ? _slots$day : components == null ? void 0 : components.Day) != null ? _ref2 : PickersDay;
161
+ const Day = (_slots$day = slots == null ? void 0 : slots.day) != null ? _slots$day : PickersDay;
164
162
  // We don't want to pass to ownerState down, to avoid re-rendering all the day whenever a prop changes.
165
163
  const _useSlotProps = useSlotProps({
166
164
  elementType: Day,
167
- externalSlotProps: (_slotProps$day = slotProps == null ? void 0 : slotProps.day) != null ? _slotProps$day : componentsProps == null ? void 0 : componentsProps.day,
165
+ externalSlotProps: slotProps == null ? void 0 : slotProps.day,
168
166
  additionalProps: _extends({
169
167
  disableHighlightToday,
170
168
  showDaysOutsideCurrentMonth,
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import useEventCallback from '@mui/utils/useEventCallback';
4
4
  import { useIsDateDisabled } from './useIsDateDisabled';
5
- import { useUtils, useNow } from '../internals/hooks/useUtils';
5
+ import { useUtils } from '../internals/hooks/useUtils';
6
6
  import { singleItemValueManager } from '../internals/utils/valueManagers';
7
7
  import { SECTION_TYPE_GRANULARITY } from '../internals/utils/getDefaultReferenceDate';
8
8
  export const createCalendarStateReducer = (reduceAnimations, disableSwitchToMonthOnDayFocus, utils) => (state, action) => {
@@ -49,7 +49,6 @@ export const useCalendarState = params => {
49
49
  shouldDisableDate,
50
50
  timezone
51
51
  } = params;
52
- const now = useNow(timezone);
53
52
  const utils = useUtils();
54
53
  const reducerFn = React.useRef(createCalendarStateReducer(Boolean(reduceAnimations), disableSwitchToMonthOnDayFocus, utils)).current;
55
54
  const referenceDate = React.useMemo(() => {
@@ -73,7 +72,7 @@ export const useCalendarState = params => {
73
72
 
74
73
  const [calendarState, dispatch] = React.useReducer(reducerFn, {
75
74
  isMonthSwitchingAnimating: false,
76
- focusedDay: value || now,
75
+ focusedDay: referenceDate,
77
76
  currentMonth: utils.startOfMonth(referenceDate),
78
77
  slideDirection: 'left'
79
78
  });
@@ -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 = ["components", "componentsProps", "slots", "slotProps", "InputProps", "inputProps"],
3
+ const _excluded = ["slots", "slotProps", "InputProps", "inputProps"],
4
4
  _excluded2 = ["inputRef"],
5
5
  _excluded3 = ["ref", "onPaste", "onKeyDown", "inputMode", "readOnly", "clearable", "onClear"];
6
6
  import * as React from 'react';
@@ -23,14 +23,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
23
23
  * - [DateField API](https://mui.com/x/api/date-pickers/date-field/)
24
24
  */
25
25
  const DateField = /*#__PURE__*/React.forwardRef(function DateField(inProps, ref) {
26
- var _ref, _slots$textField, _slotProps$textField;
26
+ var _slots$textField;
27
27
  const themeProps = useThemeProps({
28
28
  props: inProps,
29
29
  name: 'MuiDateField'
30
30
  });
31
31
  const {
32
- components,
33
- componentsProps,
34
32
  slots,
35
33
  slotProps,
36
34
  InputProps,
@@ -38,10 +36,10 @@ const DateField = /*#__PURE__*/React.forwardRef(function DateField(inProps, ref)
38
36
  } = themeProps,
39
37
  other = _objectWithoutPropertiesLoose(themeProps, _excluded);
40
38
  const ownerState = themeProps;
41
- const TextField = (_ref = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : components == null ? void 0 : components.TextField) != null ? _ref : MuiTextField;
39
+ const TextField = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : MuiTextField;
42
40
  const _useSlotProps = useSlotProps({
43
41
  elementType: TextField,
44
- externalSlotProps: (_slotProps$textField = slotProps == null ? void 0 : slotProps.textField) != null ? _slotProps$textField : componentsProps == null ? void 0 : componentsProps.textField,
42
+ externalSlotProps: slotProps == null ? void 0 : slotProps.textField,
45
43
  externalForwardedProps: other,
46
44
  ownerState
47
45
  }),
@@ -76,9 +74,7 @@ const DateField = /*#__PURE__*/React.forwardRef(function DateField(inProps, ref)
76
74
  fieldProps,
77
75
  InputProps: fieldProps.InputProps,
78
76
  slots,
79
- slotProps,
80
- components,
81
- componentsProps
77
+ slotProps
82
78
  });
83
79
  return /*#__PURE__*/_jsx(TextField, _extends({
84
80
  ref: ref
@@ -118,18 +114,6 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
118
114
  */
119
115
  color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
120
116
  component: PropTypes.elementType,
121
- /**
122
- * Overridable components.
123
- * @default {}
124
- * @deprecated Please use `slots`.
125
- */
126
- components: PropTypes.object,
127
- /**
128
- * The props used for each component slot.
129
- * @default {}
130
- * @deprecated Please use `slotProps`.
131
- */
132
- componentsProps: PropTypes.object,
133
117
  /**
134
118
  * The default value. Use when the component is not controlled.
135
119
  */
@@ -7,7 +7,6 @@ import { UseFieldInternalProps } from '../internals/hooks/useField';
7
7
  import { DefaultizedProps, MakeOptional } from '../internals/models/helpers';
8
8
  import { BaseDateValidationProps, DayValidationProps, MonthValidationProps, YearValidationProps } from '../internals/models/validation';
9
9
  import { FieldsTextFieldProps } from '../internals/models/fields';
10
- import { SlotsAndSlotProps } from '../internals/utils/slots-migration';
11
10
  export interface UseDateFieldParams<TDate, TChildProps extends {}> {
12
11
  props: UseDateFieldComponentProps<TDate, TChildProps>;
13
12
  inputRef?: React.Ref<HTMLInputElement>;
@@ -16,7 +15,17 @@ export interface UseDateFieldProps<TDate> extends MakeOptional<UseFieldInternalP
16
15
  }
17
16
  export type UseDateFieldDefaultizedProps<TDate> = DefaultizedProps<UseDateFieldProps<TDate>, keyof BaseDateValidationProps<any> | 'format'>;
18
17
  export type UseDateFieldComponentProps<TDate, TChildProps extends {}> = Omit<TChildProps, keyof UseDateFieldProps<TDate>> & UseDateFieldProps<TDate>;
19
- export interface DateFieldProps<TDate> extends UseDateFieldComponentProps<TDate, FieldsTextFieldProps>, SlotsAndSlotProps<DateFieldSlotsComponent, DateFieldSlotsComponentsProps<TDate>> {
18
+ export interface DateFieldProps<TDate> extends UseDateFieldComponentProps<TDate, FieldsTextFieldProps> {
19
+ /**
20
+ * Overridable component slots.
21
+ * @default {}
22
+ */
23
+ slots?: DateFieldSlotsComponent;
24
+ /**
25
+ * The props used for each component slot.
26
+ * @default {}
27
+ */
28
+ slotProps?: DateFieldSlotsComponentsProps<TDate>;
20
29
  }
21
30
  export type DateFieldOwnerState<TDate> = DateFieldProps<TDate>;
22
31
  export interface DateFieldSlotsComponent extends FieldSlotsComponents {
@@ -25,7 +34,7 @@ export interface DateFieldSlotsComponent extends FieldSlotsComponents {
25
34
  * Receives the same props as `@mui/material/TextField`.
26
35
  * @default TextField from '@mui/material'
27
36
  */
28
- TextField?: React.ElementType;
37
+ textField?: React.ElementType;
29
38
  }
30
39
  export interface DateFieldSlotsComponentsProps<TDate> extends FieldSlotsComponentsProps {
31
40
  textField?: SlotComponentProps<typeof TextField, {}, DateFieldOwnerState<TDate>>;
@@ -64,18 +64,6 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
64
64
  * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
65
65
  */
66
66
  closeOnSelect: PropTypes.bool,
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.
@@ -1,5 +1,4 @@
1
1
  import { DesktopDatePickerProps, DesktopDatePickerSlotsComponent, DesktopDatePickerSlotsComponentsProps } from '../DesktopDatePicker';
2
- import { UncapitalizeObjectKeys } from '../internals/utils/slots-migration';
3
2
  import { MobileDatePickerProps, MobileDatePickerSlotsComponent, MobileDatePickerSlotsComponentsProps } from '../MobileDatePicker';
4
3
  export interface DatePickerSlotsComponents<TDate> extends DesktopDatePickerSlotsComponent<TDate>, MobileDatePickerSlotsComponent<TDate> {
5
4
  }
@@ -17,23 +16,11 @@ export interface DatePickerProps<TDate> extends DesktopDatePickerProps<TDate>, M
17
16
  * @default 4 on desktop, 3 on mobile
18
17
  */
19
18
  yearsPerRow?: 3 | 4;
20
- /**
21
- * Overridable components.
22
- * @default {}
23
- * @deprecated Please use `slots`.
24
- */
25
- components?: DatePickerSlotsComponents<TDate>;
26
- /**
27
- * The props used for each component slot.
28
- * @default {}
29
- * @deprecated Please use `slotProps`.
30
- */
31
- componentsProps?: DatePickerSlotsComponentsProps<TDate>;
32
19
  /**
33
20
  * Overridable component slots.
34
21
  * @default {}
35
22
  */
36
- slots?: UncapitalizeObjectKeys<DatePickerSlotsComponents<TDate>>;
23
+ slots?: DatePickerSlotsComponents<TDate>;
37
24
  /**
38
25
  * The props used for each component slot.
39
26
  * @default {}