@mui/x-date-pickers 8.5.3 → 8.7.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 (198) hide show
  1. package/CHANGELOG.md +210 -0
  2. package/DateCalendar/DateCalendar.js +16 -16
  3. package/DateCalendar/DayCalendar.js +48 -48
  4. package/DateCalendar/useCalendarState.js +25 -25
  5. package/DateCalendar/useIsDateDisabled.js +2 -2
  6. package/DatePicker/DatePickerToolbar.js +7 -9
  7. package/DateTimeField/DateTimeField.js +1 -1
  8. package/DateTimePicker/DateTimePicker.js +1 -1
  9. package/DateTimePicker/DateTimePickerToolbar.js +12 -13
  10. package/DateTimePicker/shared.js +3 -3
  11. package/DesktopDatePicker/DesktopDatePicker.js +3 -3
  12. package/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -4
  13. package/DesktopTimePicker/DesktopTimePicker.js +4 -4
  14. package/DigitalClock/DigitalClock.d.ts +1 -1
  15. package/DigitalClock/DigitalClock.js +16 -16
  16. package/LocalizationProvider/LocalizationProvider.d.ts +9 -3
  17. package/LocalizationProvider/LocalizationProvider.js +28 -19
  18. package/MobileDatePicker/MobileDatePicker.js +3 -3
  19. package/MobileDateTimePicker/MobileDateTimePicker.js +4 -4
  20. package/MobileTimePicker/MobileTimePicker.js +4 -4
  21. package/MonthCalendar/MonthCalendar.js +19 -18
  22. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +32 -32
  23. package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +4 -4
  24. package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +7 -7
  25. package/PickerDay2/PickerDay2.js +3 -3
  26. package/PickersActionBar/PickersActionBar.d.ts +2 -2
  27. package/PickersActionBar/PickersActionBar.js +2 -2
  28. package/PickersCalendarHeader/PickersCalendarHeader.js +7 -8
  29. package/PickersDay/PickersDay.js +3 -3
  30. package/PickersDay/usePickerDayOwnerState.js +5 -5
  31. package/PickersTextField/PickersInputBase/PickersInputBase.js +1 -0
  32. package/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
  33. package/StaticTimePicker/StaticTimePicker.js +1 -1
  34. package/TimeClock/Clock.js +8 -9
  35. package/TimeClock/ClockNumbers.d.ts +3 -3
  36. package/TimeClock/ClockNumbers.js +5 -5
  37. package/TimeClock/TimeClock.js +29 -29
  38. package/TimeField/TimeField.js +1 -1
  39. package/TimePicker/TimePicker.js +1 -1
  40. package/TimePicker/TimePickerToolbar.js +7 -9
  41. package/TimePicker/shared.js +3 -3
  42. package/YearCalendar/YearCalendar.js +19 -18
  43. package/esm/DateCalendar/DateCalendar.js +16 -16
  44. package/esm/DateCalendar/DayCalendar.js +48 -48
  45. package/esm/DateCalendar/useCalendarState.js +25 -25
  46. package/esm/DateCalendar/useIsDateDisabled.js +2 -2
  47. package/esm/DatePicker/DatePickerToolbar.js +6 -8
  48. package/esm/DateTimeField/DateTimeField.js +1 -1
  49. package/esm/DateTimePicker/DateTimePicker.js +1 -1
  50. package/esm/DateTimePicker/DateTimePickerToolbar.js +11 -12
  51. package/esm/DateTimePicker/shared.js +3 -3
  52. package/esm/DesktopDatePicker/DesktopDatePicker.js +3 -3
  53. package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -4
  54. package/esm/DesktopTimePicker/DesktopTimePicker.js +4 -4
  55. package/esm/DigitalClock/DigitalClock.d.ts +1 -1
  56. package/esm/DigitalClock/DigitalClock.js +16 -16
  57. package/esm/LocalizationProvider/LocalizationProvider.d.ts +9 -3
  58. package/esm/LocalizationProvider/LocalizationProvider.js +27 -18
  59. package/esm/MobileDatePicker/MobileDatePicker.js +3 -3
  60. package/esm/MobileDateTimePicker/MobileDateTimePicker.js +4 -4
  61. package/esm/MobileTimePicker/MobileTimePicker.js +4 -4
  62. package/esm/MonthCalendar/MonthCalendar.js +20 -19
  63. package/esm/MultiSectionDigitalClock/MultiSectionDigitalClock.js +32 -32
  64. package/esm/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +4 -4
  65. package/esm/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +7 -7
  66. package/esm/PickerDay2/PickerDay2.js +3 -3
  67. package/esm/PickersActionBar/PickersActionBar.d.ts +2 -2
  68. package/esm/PickersActionBar/PickersActionBar.js +2 -2
  69. package/esm/PickersCalendarHeader/PickersCalendarHeader.js +6 -7
  70. package/esm/PickersDay/PickersDay.js +3 -3
  71. package/esm/PickersDay/usePickerDayOwnerState.js +5 -5
  72. package/esm/PickersTextField/PickersInputBase/PickersInputBase.js +2 -0
  73. package/esm/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
  74. package/esm/StaticTimePicker/StaticTimePicker.js +1 -1
  75. package/esm/TimeClock/Clock.js +7 -8
  76. package/esm/TimeClock/ClockNumbers.d.ts +3 -3
  77. package/esm/TimeClock/ClockNumbers.js +5 -5
  78. package/esm/TimeClock/TimeClock.js +29 -29
  79. package/esm/TimeField/TimeField.js +1 -1
  80. package/esm/TimePicker/TimePicker.js +1 -1
  81. package/esm/TimePicker/TimePickerToolbar.js +6 -8
  82. package/esm/TimePicker/shared.js +3 -3
  83. package/esm/YearCalendar/YearCalendar.js +20 -19
  84. package/esm/hooks/index.d.ts +2 -1
  85. package/esm/hooks/index.js +2 -1
  86. package/esm/hooks/useParsedFormat.js +6 -6
  87. package/esm/hooks/usePickerAdapter.d.ts +7 -0
  88. package/esm/hooks/usePickerAdapter.js +20 -0
  89. package/esm/hooks/usePickerTranslations.js +1 -1
  90. package/esm/index.js +1 -1
  91. package/esm/internals/components/PickerFieldUI.js +2 -0
  92. package/esm/internals/components/PickerPopper/PickerPopper.js +2 -0
  93. package/esm/internals/components/PickerProvider.js +2 -0
  94. package/esm/internals/components/pickersToolbarClasses.d.ts +1 -1
  95. package/esm/internals/demo/DemoContainer.d.ts +2 -3
  96. package/esm/internals/demo/DemoContainer.js +3 -2
  97. package/esm/internals/hooks/date-helpers-hooks.js +16 -16
  98. package/esm/internals/hooks/useClockReferenceDate.d.ts +2 -2
  99. package/esm/internals/hooks/useClockReferenceDate.js +5 -5
  100. package/esm/internals/hooks/useControlledValue.d.ts +2 -2
  101. package/esm/internals/hooks/useControlledValue.js +8 -7
  102. package/esm/internals/hooks/useField/buildSectionsFromFormat.d.ts +1 -1
  103. package/esm/internals/hooks/useField/buildSectionsFromFormat.js +17 -17
  104. package/esm/internals/hooks/useField/useField.types.d.ts +4 -4
  105. package/esm/internals/hooks/useField/useField.utils.d.ts +10 -10
  106. package/esm/internals/hooks/useField/useField.utils.js +69 -69
  107. package/esm/internals/hooks/useField/useFieldCharacterEditing.js +11 -11
  108. package/esm/internals/hooks/useField/useFieldRootHandleKeyDown.js +7 -7
  109. package/esm/internals/hooks/useField/useFieldSectionContentProps.js +15 -16
  110. package/esm/internals/hooks/useField/useFieldState.js +24 -24
  111. package/esm/internals/hooks/useField/useFieldV6TextField.js +2 -0
  112. package/esm/internals/hooks/useField/useFieldV7TextField.js +2 -0
  113. package/esm/internals/hooks/useNullableFieldPrivateContext.js +2 -0
  114. package/esm/internals/hooks/usePicker/hooks/useOrientation.js +2 -0
  115. package/esm/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +8 -6
  116. package/esm/internals/hooks/usePicker/usePicker.js +7 -6
  117. package/esm/internals/hooks/usePicker/usePicker.types.d.ts +3 -3
  118. package/esm/internals/hooks/useUtils.d.ts +1 -8
  119. package/esm/internals/hooks/useUtils.js +3 -19
  120. package/esm/internals/hooks/useViews.js +2 -0
  121. package/esm/internals/index.d.ts +2 -1
  122. package/esm/internals/index.js +2 -1
  123. package/esm/internals/models/manager.d.ts +17 -17
  124. package/esm/internals/models/props/time.d.ts +1 -1
  125. package/esm/internals/utils/date-time-utils.d.ts +1 -1
  126. package/esm/internals/utils/date-time-utils.js +5 -5
  127. package/esm/internals/utils/date-utils.d.ts +11 -11
  128. package/esm/internals/utils/date-utils.js +34 -34
  129. package/esm/internals/utils/getDefaultReferenceDate.d.ts +2 -2
  130. package/esm/internals/utils/getDefaultReferenceDate.js +16 -16
  131. package/esm/internals/utils/time-utils.d.ts +5 -5
  132. package/esm/internals/utils/time-utils.js +12 -12
  133. package/esm/internals/utils/valueManagers.js +4 -4
  134. package/esm/managers/useDateManager.js +12 -12
  135. package/esm/managers/useDateTimeManager.js +13 -13
  136. package/esm/managers/useTimeManager.js +9 -10
  137. package/esm/validation/useValidation.d.ts +2 -3
  138. package/esm/validation/useValidation.js +2 -2
  139. package/esm/validation/validateDate.js +6 -6
  140. package/esm/validation/validateTime.js +6 -6
  141. package/hooks/index.d.ts +2 -1
  142. package/hooks/index.js +8 -1
  143. package/hooks/useParsedFormat.js +6 -6
  144. package/hooks/usePickerAdapter.d.ts +7 -0
  145. package/hooks/usePickerAdapter.js +29 -0
  146. package/hooks/usePickerTranslations.js +2 -2
  147. package/index.js +1 -1
  148. package/internals/components/PickerFieldUI.js +1 -0
  149. package/internals/components/PickerPopper/PickerPopper.js +1 -0
  150. package/internals/components/PickerProvider.js +1 -0
  151. package/internals/components/pickersToolbarClasses.d.ts +1 -1
  152. package/internals/demo/DemoContainer.d.ts +2 -3
  153. package/internals/demo/DemoContainer.js +3 -2
  154. package/internals/hooks/date-helpers-hooks.js +16 -16
  155. package/internals/hooks/useClockReferenceDate.d.ts +2 -2
  156. package/internals/hooks/useClockReferenceDate.js +5 -5
  157. package/internals/hooks/useControlledValue.d.ts +2 -2
  158. package/internals/hooks/useControlledValue.js +7 -7
  159. package/internals/hooks/useField/buildSectionsFromFormat.d.ts +1 -1
  160. package/internals/hooks/useField/buildSectionsFromFormat.js +17 -17
  161. package/internals/hooks/useField/useField.types.d.ts +4 -4
  162. package/internals/hooks/useField/useField.utils.d.ts +10 -10
  163. package/internals/hooks/useField/useField.utils.js +69 -69
  164. package/internals/hooks/useField/useFieldCharacterEditing.js +11 -11
  165. package/internals/hooks/useField/useFieldRootHandleKeyDown.js +7 -7
  166. package/internals/hooks/useField/useFieldSectionContentProps.js +14 -15
  167. package/internals/hooks/useField/useFieldState.js +24 -25
  168. package/internals/hooks/useField/useFieldV6TextField.js +1 -0
  169. package/internals/hooks/useField/useFieldV7TextField.js +1 -0
  170. package/internals/hooks/useNullableFieldPrivateContext.js +1 -0
  171. package/internals/hooks/usePicker/hooks/useOrientation.js +1 -0
  172. package/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +7 -6
  173. package/internals/hooks/usePicker/usePicker.js +6 -6
  174. package/internals/hooks/usePicker/usePicker.types.d.ts +3 -3
  175. package/internals/hooks/useUtils.d.ts +1 -8
  176. package/internals/hooks/useUtils.js +5 -24
  177. package/internals/hooks/useViews.js +1 -0
  178. package/internals/index.d.ts +2 -1
  179. package/internals/index.js +2 -7
  180. package/internals/models/manager.d.ts +17 -17
  181. package/internals/models/props/time.d.ts +1 -1
  182. package/internals/utils/date-time-utils.d.ts +1 -1
  183. package/internals/utils/date-time-utils.js +5 -5
  184. package/internals/utils/date-utils.d.ts +11 -11
  185. package/internals/utils/date-utils.js +34 -34
  186. package/internals/utils/getDefaultReferenceDate.d.ts +2 -2
  187. package/internals/utils/getDefaultReferenceDate.js +16 -16
  188. package/internals/utils/time-utils.d.ts +5 -5
  189. package/internals/utils/time-utils.js +12 -12
  190. package/internals/utils/valueManagers.js +4 -4
  191. package/managers/useDateManager.js +12 -12
  192. package/managers/useDateTimeManager.js +13 -13
  193. package/managers/useTimeManager.js +10 -11
  194. package/package.json +2 -2
  195. package/validation/useValidation.d.ts +2 -3
  196. package/validation/useValidation.js +2 -2
  197. package/validation/validateDate.js +6 -6
  198. package/validation/validateTime.js +6 -6
package/CHANGELOG.md CHANGED
@@ -5,6 +5,216 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.7.0
9
+
10
+ _Jul 4, 2025_
11
+
12
+ We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Add `useChartProApiRef` for easier access to the API
15
+ - 📆 Support different start and end `referenceDate` props on range components
16
+ - 📚 Documentation improvements
17
+ - 🐞 Bugfixes
18
+ - 🌎 Improve Greek (el-GR) translations on the Charts
19
+ - 🌎 Improve Danish (da-DK) locale on the Data Grid
20
+
21
+ Special thanks go out to the community members for their valuable contributions:
22
+ @ShahrazH, @vadimkuragkovskiy, @whythecode
23
+
24
+ The following are all team members who have contributed to this release:
25
+ @alexfauquette, @brijeshb42, @mapache-salvaje, @arminmeh, @bernardobelchior, @bharatkashyap, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @rita-codes
26
+
27
+ ### Data Grid
28
+
29
+ #### `@mui/x-data-grid@8.7.0`
30
+
31
+ - [DataGrid] Fix column state restore with controlled column visibility model (#18567) @arminmeh
32
+ - [DataGrid] Fix styling virtualized column headers (#18603) @KenanYusuf
33
+ - [l10n] Improve Danish (da-DK) locale (#18537) @ShahrazH
34
+
35
+ #### `@mui/x-data-grid-pro@8.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
36
+
37
+ Same changes as in `@mui/x-data-grid@8.7.0`.
38
+
39
+ #### `@mui/x-data-grid-premium@8.7.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
40
+
41
+ Same changes as in `@mui/x-data-grid-pro@8.7.0`.
42
+
43
+ ### Date and Time Pickers
44
+
45
+ #### `@mui/x-date-pickers@8.7.0`
46
+
47
+ - [pickers] Support different `start` and `end` `referenceDate` props on range components (#18549) @LukasTy
48
+
49
+ #### `@mui/x-date-pickers-pro@8.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
50
+
51
+ Same changes as in `@mui/x-date-pickers@8.7.0`.
52
+
53
+ ### Charts
54
+
55
+ #### `@mui/x-charts@8.7.0`
56
+
57
+ - [charts] Export `ChartsReferenceLineProps` (#18598) @bernardobelchior
58
+ - [charts] Extract bar and line plot logic into reusable hooks (#18541) @bernardobelchior
59
+ - [charts] Extract plot logic into separate files for reuse (#18522) @bernardobelchior
60
+ - [charts] Profile charts benchmarks using chromium (#18528) @bernardobelchior
61
+ - [l10n] Add Greek (el-GR) locale to charts (#18548) @whythecode
62
+
63
+ #### `@mui/x-charts-pro@8.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
64
+
65
+ Same changes as in `@mui/x-charts@8.7.0`, plus:
66
+
67
+ - [charts-pro] Add `useChartProApiRef` for easier refs (#18013) @JCQuintas
68
+ - [charts-pro] Add tests and classes to zoom slider (#18660) @JCQuintas
69
+ - [charts-pro] Fix geometry not handling gestures in specific scenarios (#18651) @JCQuintas
70
+ - [charts-pro] Rename `useChartApiContext` to `useChartProApiContext` (#18565) @JCQuintas
71
+ - [charts-pro] Zoom pointer improvements (#17480) @JCQuintas
72
+
73
+ ### Tree View
74
+
75
+ #### `@mui/x-tree-view@8.7.0`
76
+
77
+ Internal changes.
78
+
79
+ #### `@mui/x-tree-view-pro@8.7.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
80
+
81
+ Same changes as in `@mui/x-tree-view@8.7.0`, plus:
82
+
83
+ - [tree view pro] Add missing `dataSource` JSDoc (#18650) @LukasTy
84
+
85
+ ### Docs
86
+
87
+ - [docs] Add MCP stub (#18204) @bharatkashyap
88
+ - [docs] Fix AI Assistant proxy rewrite prefix (#18661) @arminmeh
89
+ - [docs] Improve test README.MD (#18634) @LukasTy
90
+ - [docs] Provide workaround for pie chart composition (#18600) @alexfauquette
91
+ - [docs][charts] Add donut chart as a special case of a pie chart (#18652) @bernardobelchior
92
+ - [docs][charts] Centralize country and continent data (#18604) @bernardobelchior
93
+ - [docs][data grid] Audit and revise the Pro row docs (#17926) @mapache-salvaje
94
+ - [docs][pickers] Add mention of theme augmentation in relevant migration section (#18608) @LukasTy
95
+
96
+ ### Core
97
+
98
+ - [core] Avoid stringifying `document` object (#18657) @vadimkuragkovskiy
99
+
100
+ ### Miscellaneous
101
+
102
+ - [code-infra] Bump code-infra version and fix breaking changes (#18653) @brijeshb42
103
+ - [code-infra] Ensure `material-ui/disallow-react-api-in-server-components` ESLint rule is applied (#18570) @LukasTy
104
+ - [code-infra] Migrate to flat eslint config (#18562) @brijeshb42
105
+ - [code-infra] Refactor eslint config (#18643) @LukasTy
106
+ - [infra] Add renovatebot rule for latest infra packages (#18609) @Janpot
107
+ - [infra] Move pushArgos script to code-infra (#18667) @Janpot
108
+ - [infra] Updates release script to fetch latest major version from upstream (#18552) @michelengelen
109
+ - [release] Add missing contributor to changelog (#18561) @bernardobelchior
110
+
111
+ ## 8.6.0
112
+
113
+ _Jun 27, 2025_
114
+
115
+ We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
116
+
117
+ - 📊 Add export menu to charts toolbar
118
+ - 📅 Add `usePickerAdapter` hook to access the date adapter.
119
+
120
+ You can use the adapter in your custom components if you need them to work with multiple date libraries — [Learn more](https://mui.com/x/react-date-pickers/custom-components/#access-date-adapter).
121
+ - 🌎 Improve Danish (da-DK) locale
122
+ - 🌎 Improve German (de-DE) locale
123
+
124
+ Special thanks go out to the community members for their valuable contributions:
125
+ @omalyutin, @ShahrazH, @vadimka123
126
+
127
+ The following are all team members who have contributed to this release:
128
+ @arminmeh, @bernardobelchior, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes, @sai6855
129
+
130
+ ### Data Grid
131
+
132
+ #### `@mui/x-data-grid@8.6.0`
133
+
134
+ - [DataGrid] Fix `label` type in `GridActionsCellItem` type (#18175) @sai6855
135
+ - [DataGrid] Fix grid menu not closing when pressing escape/tab (#18300) @KenanYusuf
136
+ - [l10n] Improve Danish (da-DK) locale (#18428) @ShahrazH
137
+ - [l10n] Improve German (de-DE) locale (#18388) @omalyutin
138
+
139
+ #### `@mui/x-data-grid-pro@8.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
140
+
141
+ Same changes as in `@mui/x-data-grid@8.6.0`, plus:
142
+
143
+ - [DataGridPro] Fix lazy loading params calculated from rendering context (#18460) @arminmeh
144
+
145
+ #### `@mui/x-data-grid-premium@8.6.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link "Premium plan")
146
+
147
+ Same changes as in `@mui/x-data-grid-pro@8.6.0`.
148
+
149
+ ### Date and Time Pickers
150
+
151
+ #### `@mui/x-date-pickers@8.6.0`
152
+
153
+ - [pickers] Add `usePickerAdapter` hook (#18457) @LukasTy
154
+ - [pickers] Fix to use latest `value` when updating `lastCommittedValue` in internal state (#18518) @LukasTy
155
+ - [pickers] Use `usePickerAdapter` hook internally instead of `useUtils` (#18465) @LukasTy
156
+
157
+ #### `@mui/x-date-pickers-pro@8.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
158
+
159
+ Same changes as in `@mui/x-date-pickers@8.6.0`.
160
+
161
+ ### Charts
162
+
163
+ #### `@mui/x-charts@8.6.0`
164
+
165
+ - [charts] Add `data-series` to charts legend item (#18414) @bernardobelchior
166
+ - [charts] Add `data-series` to bar charts (#18413) @bernardobelchior
167
+ - [charts] Add `data-series` to elements of line chart (#18409) @bernardobelchior
168
+ - [charts] Add `data-series` to pie charts (#18432) @bernardobelchior
169
+ - [charts] Fix missing key in bar plot (#18502) @bernardobelchior
170
+ - [charts] Split axis utils from main file (#18517) @JCQuintas
171
+ - [charts] Improve touch behavior for polar axis (#18531) @JCQuintas
172
+ - [charts] Add `isElementInside` helper (#18530) @JCQuintas
173
+
174
+ #### `@mui/x-charts-pro@8.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
175
+
176
+ Same changes as in `@mui/x-charts@8.6.0`, plus:
177
+
178
+ - [charts-pro] Add export menu to charts toolbar (#18210) @bernardobelchior
179
+ - [charts-pro] Fix export docs mentioning tooltip instead of toolbar (#18490) @bernardobelchior
180
+ - [charts-pro] Fix iframe not being removed after print export (#18500) @bernardobelchior
181
+
182
+ ### Tree View
183
+
184
+ #### `@mui/x-tree-view@8.6.0`
185
+
186
+ Internal changes.
187
+
188
+ #### `@mui/x-tree-view-pro@8.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
189
+
190
+ Same changes as in `@mui/x-tree-view@8.6.0`, plus:
191
+
192
+ - [tree view pro] Fix theme augmentation (#18437) @LukasTy
193
+
194
+ ### Codemod
195
+
196
+ #### `@mui/x-codemod@8.6.0`
197
+
198
+ Internal changes.
199
+
200
+ ### Docs
201
+
202
+ - [docs] Document `GridRenderContext` (#18492) @arminmeh
203
+ - [docs] Prevent stale rows to appear on sort and filter change in the lazy loading demo (#18461) @arminmeh
204
+ - [docs][pickers] Update action bar demo to use the `nextOrAccept` action (#18505) @LukasTy
205
+ - [docs] Update indeterminate checkbox section in migration guide (#18229) @michelengelen
206
+ - [docs] Data source nested pagination recipe (#14777) @MBilalShafi
207
+
208
+ ### Core
209
+
210
+ - [core] Avoid json stringify whole window object (#18512) @vadimka123
211
+
212
+ ### Miscellaneous
213
+
214
+ - [code-infra] Dynamically get pickers adapters dependencies versions (#18446) @JCQuintas
215
+ - [infra] Adjust inquirer version and usage (#18495) @michelengelen
216
+ - [infra] Use `String.raw` for creating the remote regex (#18462) @michelengelen
217
+
8
218
  ## 8.5.3
9
219
 
10
220
  _Jun 19, 2025_
@@ -18,7 +18,6 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
18
18
  var _useId = _interopRequireDefault(require("@mui/utils/useId"));
19
19
  var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
20
20
  var _useCalendarState = require("./useCalendarState");
21
- var _useUtils = require("../internals/hooks/useUtils");
22
21
  var _PickersFadeTransitionGroup = require("./PickersFadeTransitionGroup");
23
22
  var _DayCalendar = require("./DayCalendar");
24
23
  var _MonthCalendar = require("../MonthCalendar");
@@ -34,6 +33,7 @@ var _valueManagers = require("../internals/utils/valueManagers");
34
33
  var _dimensions = require("../internals/constants/dimensions");
35
34
  var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
36
35
  var _useDateManager = require("../managers/useDateManager");
36
+ var _usePickerAdapter = require("../hooks/usePickerAdapter");
37
37
  var _jsxRuntime = require("react/jsx-runtime");
38
38
  const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "classes", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsOrder", "yearsPerRow", "monthsPerRow", "timezone"];
39
39
  const useUtilityClasses = classes => {
@@ -84,7 +84,7 @@ const DateCalendarViewTransitionContainer = (0, _styles.styled)(_PickersFadeTran
84
84
  * - [DateCalendar API](https://mui.com/x/api/date-pickers/date-calendar/)
85
85
  */
86
86
  const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(inProps, ref) {
87
- const utils = (0, _useUtils.useUtils)();
87
+ const adapter = (0, _usePickerAdapter.usePickerAdapter)();
88
88
  const {
89
89
  ownerState
90
90
  } = (0, _usePickerPrivateContext.usePickerPrivateContext)();
@@ -178,10 +178,10 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
178
178
  disableFuture,
179
179
  timezone,
180
180
  getCurrentMonthFromVisibleDate: (visibleDate, prevMonth) => {
181
- if (utils.isSameMonth(visibleDate, prevMonth)) {
181
+ if (adapter.isSameMonth(visibleDate, prevMonth)) {
182
182
  return prevMonth;
183
183
  }
184
- return utils.startOfMonth(visibleDate);
184
+ return adapter.startOfMonth(visibleDate);
185
185
  }
186
186
  });
187
187
 
@@ -215,13 +215,13 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
215
215
  ownerState
216
216
  });
217
217
  const handleDateMonthChange = (0, _useEventCallback.default)(newDate => {
218
- const startOfMonth = utils.startOfMonth(newDate);
219
- const endOfMonth = utils.endOfMonth(newDate);
218
+ const startOfMonth = adapter.startOfMonth(newDate);
219
+ const endOfMonth = adapter.endOfMonth(newDate);
220
220
  const closestEnabledDate = isDateDisabled(newDate) ? (0, _dateUtils.findClosestEnabledDate)({
221
- utils,
221
+ adapter,
222
222
  date: newDate,
223
- minDate: utils.isBefore(minDate, startOfMonth) ? startOfMonth : minDate,
224
- maxDate: utils.isAfter(maxDate, endOfMonth) ? endOfMonth : maxDate,
223
+ minDate: adapter.isBefore(minDate, startOfMonth) ? startOfMonth : minDate,
224
+ maxDate: adapter.isAfter(maxDate, endOfMonth) ? endOfMonth : maxDate,
225
225
  disablePast,
226
226
  disableFuture,
227
227
  isDateDisabled,
@@ -242,13 +242,13 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
242
242
  }
243
243
  });
244
244
  const handleDateYearChange = (0, _useEventCallback.default)(newDate => {
245
- const startOfYear = utils.startOfYear(newDate);
246
- const endOfYear = utils.endOfYear(newDate);
245
+ const startOfYear = adapter.startOfYear(newDate);
246
+ const endOfYear = adapter.endOfYear(newDate);
247
247
  const closestEnabledDate = isDateDisabled(newDate) ? (0, _dateUtils.findClosestEnabledDate)({
248
- utils,
248
+ adapter,
249
249
  date: newDate,
250
- minDate: utils.isBefore(minDate, startOfYear) ? startOfYear : minDate,
251
- maxDate: utils.isAfter(maxDate, endOfYear) ? endOfYear : maxDate,
250
+ minDate: adapter.isBefore(minDate, startOfYear) ? startOfYear : minDate,
251
+ maxDate: adapter.isAfter(maxDate, endOfYear) ? endOfYear : maxDate,
252
252
  disablePast,
253
253
  disableFuture,
254
254
  isDateDisabled,
@@ -271,12 +271,12 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
271
271
  const handleSelectedDayChange = (0, _useEventCallback.default)(day => {
272
272
  if (day) {
273
273
  // If there is a date already selected, then we want to keep its time
274
- return handleValueChange((0, _dateUtils.mergeDateAndTime)(utils, day, value ?? referenceDate), 'finish', view);
274
+ return handleValueChange((0, _dateUtils.mergeDateAndTime)(adapter, day, value ?? referenceDate), 'finish', view);
275
275
  }
276
276
  return handleValueChange(day, 'finish', view);
277
277
  });
278
278
  React.useEffect(() => {
279
- if (utils.isValid(value)) {
279
+ if (adapter.isValid(value)) {
280
280
  setVisibleDate({
281
281
  target: value,
282
282
  reason: 'controlled-value-change'
@@ -18,7 +18,7 @@ var _styles = require("@mui/material/styles");
18
18
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
19
19
  var _clsx = _interopRequireDefault(require("clsx"));
20
20
  var _PickersDay = require("../PickersDay");
21
- var _usePickerTranslations = require("../hooks/usePickerTranslations");
21
+ var _hooks = require("../hooks");
22
22
  var _useUtils = require("../internals/hooks/useUtils");
23
23
  var _dimensions = require("../internals/constants/dimensions");
24
24
  var _PickersSlideTransition = require("./PickersSlideTransition");
@@ -151,14 +151,14 @@ function WrappedDay(_ref) {
151
151
  slotProps,
152
152
  timezone
153
153
  } = parentProps;
154
- const utils = (0, _useUtils.useUtils)();
154
+ const adapter = (0, _hooks.usePickerAdapter)();
155
155
  const now = (0, _useUtils.useNow)(timezone);
156
- const isFocusableDay = focusedDay != null && utils.isSameDay(day, focusedDay);
156
+ const isFocusableDay = focusedDay != null && adapter.isSameDay(day, focusedDay);
157
157
  const isFocusedDay = isViewFocused && isFocusableDay;
158
- const isSelected = selectedDays.some(selectedDay => utils.isSameDay(selectedDay, day));
159
- const isToday = utils.isSameDay(day, now);
158
+ const isSelected = selectedDays.some(selectedDay => adapter.isSameDay(selectedDay, day));
159
+ const isToday = adapter.isSameDay(day, now);
160
160
  const isDisabled = React.useMemo(() => disabled || isDateDisabled(day), [disabled, isDateDisabled, day]);
161
- const isOutsideCurrentMonth = React.useMemo(() => utils.getMonth(day) !== currentMonthNumber, [utils, day, currentMonthNumber]);
161
+ const isOutsideCurrentMonth = React.useMemo(() => adapter.getMonth(day) !== currentMonthNumber, [adapter, day, currentMonthNumber]);
162
162
  const ownerState = (0, _usePickerDayOwnerState.usePickerDayOwnerState)({
163
163
  day,
164
164
  selected: isSelected,
@@ -181,7 +181,7 @@ function WrappedDay(_ref) {
181
181
  role: 'gridcell',
182
182
  isAnimating: isMonthSwitchingAnimating,
183
183
  // it is used in date range dragging logic by accessing `dataset.timestamp`
184
- 'data-timestamp': utils.toJsDate(day).valueOf()
184
+ 'data-timestamp': adapter.toJsDate(day).valueOf()
185
185
  }, other),
186
186
  ownerState: (0, _extends2.default)({}, ownerState, {
187
187
  day,
@@ -191,19 +191,19 @@ function WrappedDay(_ref) {
191
191
  }),
192
192
  dayProps = (0, _objectWithoutPropertiesLoose2.default)(_useSlotProps, _excluded2);
193
193
  const isFirstVisibleCell = React.useMemo(() => {
194
- const startOfMonth = utils.startOfMonth(utils.setMonth(day, currentMonthNumber));
194
+ const startOfMonth = adapter.startOfMonth(adapter.setMonth(day, currentMonthNumber));
195
195
  if (!showDaysOutsideCurrentMonth) {
196
- return utils.isSameDay(day, startOfMonth);
196
+ return adapter.isSameDay(day, startOfMonth);
197
197
  }
198
- return utils.isSameDay(day, utils.startOfWeek(startOfMonth));
199
- }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, utils]);
198
+ return adapter.isSameDay(day, adapter.startOfWeek(startOfMonth));
199
+ }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, adapter]);
200
200
  const isLastVisibleCell = React.useMemo(() => {
201
- const endOfMonth = utils.endOfMonth(utils.setMonth(day, currentMonthNumber));
201
+ const endOfMonth = adapter.endOfMonth(adapter.setMonth(day, currentMonthNumber));
202
202
  if (!showDaysOutsideCurrentMonth) {
203
- return utils.isSameDay(day, endOfMonth);
203
+ return adapter.isSameDay(day, endOfMonth);
204
204
  }
205
- return utils.isSameDay(day, utils.endOfWeek(endOfMonth));
206
- }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, utils]);
205
+ return adapter.isSameDay(day, adapter.endOfWeek(endOfMonth));
206
+ }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, adapter]);
207
207
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Day, (0, _extends2.default)({}, dayProps, {
208
208
  day: day,
209
209
  disabled: isDisabled,
@@ -227,7 +227,7 @@ function DayCalendar(inProps) {
227
227
  props: inProps,
228
228
  name: 'MuiDayCalendar'
229
229
  });
230
- const utils = (0, _useUtils.useUtils)();
230
+ const adapter = (0, _hooks.usePickerAdapter)();
231
231
  const {
232
232
  onFocusedDayChange,
233
233
  className,
@@ -252,7 +252,7 @@ function DayCalendar(inProps) {
252
252
  shouldDisableDate,
253
253
  shouldDisableMonth,
254
254
  shouldDisableYear,
255
- dayOfWeekFormatter = date => utils.format(date, 'weekdayShort').charAt(0).toUpperCase(),
255
+ dayOfWeekFormatter = date => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase(),
256
256
  hasFocus,
257
257
  onFocusedViewChange,
258
258
  gridLabelId,
@@ -273,7 +273,7 @@ function DayCalendar(inProps) {
273
273
  disableFuture,
274
274
  timezone
275
275
  });
276
- const translations = (0, _usePickerTranslations.usePickerTranslations)();
276
+ const translations = (0, _hooks.usePickerTranslations)();
277
277
  const handleDaySelect = (0, _useEventCallback.default)(day => {
278
278
  if (readOnly) {
279
279
  return;
@@ -289,22 +289,22 @@ function DayCalendar(inProps) {
289
289
  const handleKeyDown = (0, _useEventCallback.default)((event, day) => {
290
290
  switch (event.key) {
291
291
  case 'ArrowUp':
292
- focusDay(utils.addDays(day, -7));
292
+ focusDay(adapter.addDays(day, -7));
293
293
  event.preventDefault();
294
294
  break;
295
295
  case 'ArrowDown':
296
- focusDay(utils.addDays(day, 7));
296
+ focusDay(adapter.addDays(day, 7));
297
297
  event.preventDefault();
298
298
  break;
299
299
  case 'ArrowLeft':
300
300
  {
301
- const newFocusedDayDefault = utils.addDays(day, isRtl ? 1 : -1);
302
- const nextAvailableMonth = utils.addMonths(day, isRtl ? 1 : -1);
301
+ const newFocusedDayDefault = adapter.addDays(day, isRtl ? 1 : -1);
302
+ const nextAvailableMonth = adapter.addMonths(day, isRtl ? 1 : -1);
303
303
  const closestDayToFocus = (0, _dateUtils.findClosestEnabledDate)({
304
- utils,
304
+ adapter,
305
305
  date: newFocusedDayDefault,
306
- minDate: isRtl ? newFocusedDayDefault : utils.startOfMonth(nextAvailableMonth),
307
- maxDate: isRtl ? utils.endOfMonth(nextAvailableMonth) : newFocusedDayDefault,
306
+ minDate: isRtl ? newFocusedDayDefault : adapter.startOfMonth(nextAvailableMonth),
307
+ maxDate: isRtl ? adapter.endOfMonth(nextAvailableMonth) : newFocusedDayDefault,
308
308
  isDateDisabled,
309
309
  timezone
310
310
  });
@@ -314,13 +314,13 @@ function DayCalendar(inProps) {
314
314
  }
315
315
  case 'ArrowRight':
316
316
  {
317
- const newFocusedDayDefault = utils.addDays(day, isRtl ? -1 : 1);
318
- const nextAvailableMonth = utils.addMonths(day, isRtl ? -1 : 1);
317
+ const newFocusedDayDefault = adapter.addDays(day, isRtl ? -1 : 1);
318
+ const nextAvailableMonth = adapter.addMonths(day, isRtl ? -1 : 1);
319
319
  const closestDayToFocus = (0, _dateUtils.findClosestEnabledDate)({
320
- utils,
320
+ adapter,
321
321
  date: newFocusedDayDefault,
322
- minDate: isRtl ? utils.startOfMonth(nextAvailableMonth) : newFocusedDayDefault,
323
- maxDate: isRtl ? newFocusedDayDefault : utils.endOfMonth(nextAvailableMonth),
322
+ minDate: isRtl ? adapter.startOfMonth(nextAvailableMonth) : newFocusedDayDefault,
323
+ maxDate: isRtl ? newFocusedDayDefault : adapter.endOfMonth(nextAvailableMonth),
324
324
  isDateDisabled,
325
325
  timezone
326
326
  });
@@ -329,19 +329,19 @@ function DayCalendar(inProps) {
329
329
  break;
330
330
  }
331
331
  case 'Home':
332
- focusDay(utils.startOfWeek(day));
332
+ focusDay(adapter.startOfWeek(day));
333
333
  event.preventDefault();
334
334
  break;
335
335
  case 'End':
336
- focusDay(utils.endOfWeek(day));
336
+ focusDay(adapter.endOfWeek(day));
337
337
  event.preventDefault();
338
338
  break;
339
339
  case 'PageUp':
340
- focusDay(utils.addMonths(day, 1));
340
+ focusDay(adapter.addMonths(day, 1));
341
341
  event.preventDefault();
342
342
  break;
343
343
  case 'PageDown':
344
- focusDay(utils.addMonths(day, -1));
344
+ focusDay(adapter.addMonths(day, -1));
345
345
  event.preventDefault();
346
346
  break;
347
347
  default:
@@ -350,33 +350,33 @@ function DayCalendar(inProps) {
350
350
  });
351
351
  const handleFocus = (0, _useEventCallback.default)((event, day) => focusDay(day));
352
352
  const handleBlur = (0, _useEventCallback.default)((event, day) => {
353
- if (focusedDay != null && utils.isSameDay(focusedDay, day)) {
353
+ if (focusedDay != null && adapter.isSameDay(focusedDay, day)) {
354
354
  onFocusedViewChange?.(false);
355
355
  }
356
356
  });
357
- const currentMonthNumber = utils.getMonth(currentMonth);
358
- const currentYearNumber = utils.getYear(currentMonth);
359
- const validSelectedDays = React.useMemo(() => selectedDays.filter(day => !!day).map(day => utils.startOfDay(day)), [utils, selectedDays]);
357
+ const currentMonthNumber = adapter.getMonth(currentMonth);
358
+ const currentYearNumber = adapter.getYear(currentMonth);
359
+ const validSelectedDays = React.useMemo(() => selectedDays.filter(day => !!day).map(day => adapter.startOfDay(day)), [adapter, selectedDays]);
360
360
 
361
361
  // need a new ref whenever the `key` of the transition changes: https://reactcommunity.org/react-transition-group/transition/#Transition-prop-nodeRef.
362
362
  const transitionKey = `${currentYearNumber}-${currentMonthNumber}`;
363
363
  // eslint-disable-next-line react-hooks/exhaustive-deps
364
364
  const slideNodeRef = React.useMemo(() => /*#__PURE__*/React.createRef(), [transitionKey]);
365
365
  const weeksToDisplay = React.useMemo(() => {
366
- const toDisplay = utils.getWeekArray(currentMonth);
367
- let nextMonth = utils.addMonths(currentMonth, 1);
366
+ const toDisplay = adapter.getWeekArray(currentMonth);
367
+ let nextMonth = adapter.addMonths(currentMonth, 1);
368
368
  while (fixedWeekNumber && toDisplay.length < fixedWeekNumber) {
369
- const additionalWeeks = utils.getWeekArray(nextMonth);
370
- const hasCommonWeek = utils.isSameDay(toDisplay[toDisplay.length - 1][0], additionalWeeks[0][0]);
369
+ const additionalWeeks = adapter.getWeekArray(nextMonth);
370
+ const hasCommonWeek = adapter.isSameDay(toDisplay[toDisplay.length - 1][0], additionalWeeks[0][0]);
371
371
  additionalWeeks.slice(hasCommonWeek ? 1 : 0).forEach(week => {
372
372
  if (toDisplay.length < fixedWeekNumber) {
373
373
  toDisplay.push(week);
374
374
  }
375
375
  });
376
- nextMonth = utils.addMonths(nextMonth, 1);
376
+ nextMonth = adapter.addMonths(nextMonth, 1);
377
377
  }
378
378
  return toDisplay;
379
- }, [currentMonth, fixedWeekNumber, utils]);
379
+ }, [currentMonth, fixedWeekNumber, adapter]);
380
380
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(PickersCalendarDayRoot, {
381
381
  role: "grid",
382
382
  "aria-labelledby": gridLabelId,
@@ -390,10 +390,10 @@ function DayCalendar(inProps) {
390
390
  "aria-label": translations.calendarWeekNumberHeaderLabel,
391
391
  className: classes.weekNumberLabel,
392
392
  children: translations.calendarWeekNumberHeaderText
393
- }), (0, _dateUtils.getWeekdays)(utils, now).map((weekday, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(PickersCalendarWeekDayLabel, {
393
+ }), (0, _dateUtils.getWeekdays)(adapter, now).map((weekday, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(PickersCalendarWeekDayLabel, {
394
394
  variant: "caption",
395
395
  role: "columnheader",
396
- "aria-label": utils.format(weekday, 'weekday'),
396
+ "aria-label": adapter.format(weekday, 'weekday'),
397
397
  className: classes.weekDayLabel,
398
398
  children: dayOfWeekFormatter(weekday)
399
399
  }, i.toString()))]
@@ -422,8 +422,8 @@ function DayCalendar(inProps) {
422
422
  children: [displayWeekNumber && /*#__PURE__*/(0, _jsxRuntime.jsx)(PickersCalendarWeekNumber, {
423
423
  className: classes.weekNumber,
424
424
  role: "rowheader",
425
- "aria-label": translations.calendarWeekNumberAriaLabelText(utils.getWeekNumber(week[0])),
426
- children: translations.calendarWeekNumberText(utils.getWeekNumber(week[0]))
425
+ "aria-label": translations.calendarWeekNumberAriaLabelText(adapter.getWeekNumber(week[0])),
426
+ children: translations.calendarWeekNumberText(adapter.getWeekNumber(week[0]))
427
427
  }), week.map((day, dayIndex) => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedDay, {
428
428
  parentProps: props,
429
429
  day: day,