@mui/x-date-pickers 8.0.0-alpha.1 → 8.0.0-alpha.3

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 (165) hide show
  1. package/AdapterMoment/AdapterMoment.js +10 -0
  2. package/CHANGELOG.md +330 -7
  3. package/DateCalendar/DateCalendar.types.d.ts +2 -1
  4. package/DateCalendar/PickersFadeTransitionGroup.js +4 -6
  5. package/DateCalendar/PickersSlideTransition.js +12 -5
  6. package/DateCalendar/useCalendarState.d.ts +6 -4
  7. package/DateField/DateField.js +5 -4
  8. package/DateField/DateField.types.d.ts +10 -9
  9. package/DatePicker/DatePicker.types.d.ts +3 -3
  10. package/DatePicker/DatePickerToolbar.d.ts +3 -2
  11. package/DatePicker/shared.d.ts +6 -5
  12. package/DateTimeField/DateTimeField.js +5 -4
  13. package/DateTimeField/DateTimeField.types.d.ts +10 -10
  14. package/DateTimePicker/DateTimePicker.types.d.ts +3 -3
  15. package/DateTimePicker/DateTimePickerTabs.js +8 -6
  16. package/DateTimePicker/DateTimePickerToolbar.d.ts +2 -3
  17. package/DateTimePicker/shared.d.ts +6 -6
  18. package/DayCalendarSkeleton/DayCalendarSkeleton.js +10 -19
  19. package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +2 -1
  20. package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -21
  21. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +6 -6
  22. package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +4 -4
  23. package/PickersActionBar/PickersActionBar.js +8 -1
  24. package/PickersCalendarHeader/PickersCalendarHeader.js +8 -7
  25. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +3 -4
  26. package/PickersLayout/PickersLayout.d.ts +7 -5
  27. package/PickersLayout/PickersLayout.js +22 -27
  28. package/PickersLayout/PickersLayout.types.d.ts +14 -15
  29. package/PickersLayout/usePickerLayout.d.ts +5 -4
  30. package/PickersLayout/usePickerLayout.js +19 -12
  31. package/PickersShortcuts/PickersShortcuts.d.ts +7 -6
  32. package/PickersShortcuts/PickersShortcuts.js +8 -1
  33. package/README.md +7 -4
  34. package/TimeField/TimeField.js +5 -4
  35. package/TimeField/TimeField.types.d.ts +10 -10
  36. package/TimePicker/TimePicker.types.d.ts +3 -3
  37. package/TimePicker/TimePickerToolbar.d.ts +2 -3
  38. package/TimePicker/shared.d.ts +6 -6
  39. package/hooks/useParsedFormat.d.ts +2 -2
  40. package/hooks/useParsedFormat.js +1 -1
  41. package/index.js +1 -1
  42. package/internals/components/PickerProvider.d.ts +2 -15
  43. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -10
  44. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +11 -8
  45. package/internals/components/PickersToolbar.d.ts +3 -3
  46. package/internals/hooks/useClockReferenceDate.d.ts +2 -1
  47. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +14 -14
  48. package/internals/hooks/useField/useField.d.ts +3 -3
  49. package/internals/hooks/useField/useField.types.d.ts +45 -45
  50. package/internals/hooks/useField/useField.utils.d.ts +4 -3
  51. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +6 -5
  52. package/internals/hooks/useField/useFieldState.d.ts +9 -8
  53. package/internals/hooks/useField/useFieldState.js +0 -1
  54. package/internals/hooks/useField/useFieldV6TextField.d.ts +4 -3
  55. package/internals/hooks/useFieldOwnerState.d.ts +6 -0
  56. package/internals/hooks/useFieldOwnerState.js +12 -0
  57. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +11 -11
  58. package/internals/hooks/useOpenState.d.ts +3 -2
  59. package/internals/hooks/useOpenState.js +10 -9
  60. package/internals/hooks/usePicker/usePicker.d.ts +3 -3
  61. package/internals/hooks/usePicker/usePicker.js +4 -10
  62. package/internals/hooks/usePicker/usePicker.types.d.ts +7 -7
  63. package/internals/hooks/usePicker/usePickerProvider.d.ts +5 -6
  64. package/internals/hooks/usePicker/usePickerProvider.js +8 -10
  65. package/internals/hooks/usePicker/usePickerValue.d.ts +3 -2
  66. package/internals/hooks/usePicker/usePickerValue.js +22 -12
  67. package/internals/hooks/usePicker/usePickerValue.types.d.ts +51 -24
  68. package/internals/hooks/usePicker/usePickerViews.d.ts +10 -10
  69. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +5 -6
  70. package/internals/hooks/useValueWithTimezone.d.ts +5 -4
  71. package/internals/hooks/useViews.d.ts +5 -5
  72. package/internals/index.d.ts +4 -2
  73. package/internals/index.js +1 -0
  74. package/internals/models/fields.d.ts +6 -1
  75. package/internals/models/pickers.d.ts +1 -0
  76. package/internals/models/pickers.js +1 -0
  77. package/internals/models/props/basePickerProps.d.ts +4 -3
  78. package/internals/models/props/time.d.ts +2 -1
  79. package/internals/models/props/toolbar.d.ts +2 -1
  80. package/internals/models/value.d.ts +9 -0
  81. package/internals/utils/date-utils.d.ts +1 -1
  82. package/internals/utils/valueManagers.d.ts +4 -3
  83. package/locales/nlNL.js +7 -7
  84. package/models/adapters.d.ts +4 -4
  85. package/models/fields.d.ts +19 -5
  86. package/models/validation.d.ts +2 -1
  87. package/modern/AdapterMoment/AdapterMoment.js +10 -0
  88. package/modern/DateCalendar/PickersFadeTransitionGroup.js +4 -6
  89. package/modern/DateCalendar/PickersSlideTransition.js +12 -5
  90. package/modern/DateField/DateField.js +5 -4
  91. package/modern/DateTimeField/DateTimeField.js +5 -4
  92. package/modern/DateTimePicker/DateTimePickerTabs.js +8 -6
  93. package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +10 -19
  94. package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -21
  95. package/modern/PickersActionBar/PickersActionBar.js +8 -1
  96. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +8 -7
  97. package/modern/PickersLayout/PickersLayout.js +22 -27
  98. package/modern/PickersLayout/usePickerLayout.js +19 -12
  99. package/modern/PickersShortcuts/PickersShortcuts.js +8 -1
  100. package/modern/TimeField/TimeField.js +5 -4
  101. package/modern/hooks/useParsedFormat.js +1 -1
  102. package/modern/index.js +1 -1
  103. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -10
  104. package/modern/internals/hooks/useField/useFieldState.js +0 -1
  105. package/modern/internals/hooks/useFieldOwnerState.js +12 -0
  106. package/modern/internals/hooks/useOpenState.js +10 -9
  107. package/modern/internals/hooks/usePicker/usePicker.js +4 -10
  108. package/modern/internals/hooks/usePicker/usePickerProvider.js +8 -10
  109. package/modern/internals/hooks/usePicker/usePickerValue.js +22 -12
  110. package/modern/internals/index.js +1 -0
  111. package/modern/internals/models/pickers.js +1 -0
  112. package/modern/locales/nlNL.js +7 -7
  113. package/modern/validation/useValidation.js +1 -1
  114. package/modern/validation/validateDate.js +8 -0
  115. package/modern/validation/validateDateTime.js +8 -0
  116. package/modern/validation/validateTime.js +8 -0
  117. package/node/AdapterMoment/AdapterMoment.js +10 -0
  118. package/node/DateCalendar/PickersFadeTransitionGroup.js +4 -6
  119. package/node/DateCalendar/PickersSlideTransition.js +12 -5
  120. package/node/DateField/DateField.js +5 -4
  121. package/node/DateTimeField/DateTimeField.js +5 -4
  122. package/node/DateTimePicker/DateTimePickerTabs.js +8 -6
  123. package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +10 -19
  124. package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +11 -22
  125. package/node/PickersActionBar/PickersActionBar.js +8 -1
  126. package/node/PickersCalendarHeader/PickersCalendarHeader.js +8 -7
  127. package/node/PickersLayout/PickersLayout.js +22 -27
  128. package/node/PickersLayout/usePickerLayout.js +19 -12
  129. package/node/PickersShortcuts/PickersShortcuts.js +8 -1
  130. package/node/TimeField/TimeField.js +5 -4
  131. package/node/hooks/useParsedFormat.js +1 -1
  132. package/node/index.js +1 -1
  133. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -10
  134. package/node/internals/hooks/useField/useFieldState.js +0 -1
  135. package/node/internals/hooks/useFieldOwnerState.js +20 -0
  136. package/node/internals/hooks/useOpenState.js +10 -9
  137. package/node/internals/hooks/usePicker/usePicker.js +5 -10
  138. package/node/internals/hooks/usePicker/usePickerProvider.js +9 -11
  139. package/node/internals/hooks/usePicker/usePickerValue.js +22 -11
  140. package/node/internals/index.js +7 -0
  141. package/node/internals/models/pickers.js +5 -0
  142. package/node/locales/nlNL.js +7 -7
  143. package/node/validation/useValidation.js +1 -1
  144. package/node/validation/validateDate.js +8 -0
  145. package/node/validation/validateDateTime.js +8 -0
  146. package/node/validation/validateTime.js +8 -0
  147. package/package.json +2 -2
  148. package/themeAugmentation/overrides.d.ts +1 -1
  149. package/themeAugmentation/props.d.ts +3 -2
  150. package/validation/useValidation.d.ts +7 -6
  151. package/validation/useValidation.js +1 -1
  152. package/validation/validateDate.d.ts +12 -3
  153. package/validation/validateDate.js +8 -0
  154. package/validation/validateDateTime.d.ts +12 -4
  155. package/validation/validateDateTime.js +8 -0
  156. package/validation/validateTime.d.ts +12 -3
  157. package/validation/validateTime.js +8 -0
  158. package/internals/hooks/useIsLandscape.d.ts +0 -4
  159. package/internals/hooks/useIsLandscape.js +0 -35
  160. package/internals/hooks/usePicker/usePickerLayoutProps.d.ts +0 -32
  161. package/internals/hooks/usePicker/usePickerLayoutProps.js +0 -31
  162. package/modern/internals/hooks/useIsLandscape.js +0 -35
  163. package/modern/internals/hooks/usePicker/usePickerLayoutProps.js +0 -31
  164. package/node/internals/hooks/useIsLandscape.js +0 -43
  165. package/node/internals/hooks/usePicker/usePickerLayoutProps.js +0 -38
@@ -430,12 +430,22 @@ export class AdapterMoment {
430
430
  const end = this.endOfWeek(this.endOfMonth(value));
431
431
  let count = 0;
432
432
  let current = start;
433
+ let currentDayOfYear = current.get('dayOfYear');
433
434
  const nestedWeeks = [];
434
435
  while (current.isBefore(end)) {
435
436
  const weekNumber = Math.floor(count / 7);
436
437
  nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
437
438
  nestedWeeks[weekNumber].push(current);
439
+ const prevDayOfYear = currentDayOfYear;
438
440
  current = this.addDays(current, 1);
441
+ currentDayOfYear = current.get('dayOfYear');
442
+
443
+ // If there is a TZ change at midnight, adding 1 day may only increase the date by 23 hours to 11pm
444
+ // To fix, bump the date into the next day (add 12 hours) and then revert to the start of the day
445
+ // See https://github.com/moment/moment/issues/4743#issuecomment-811306874 for context.
446
+ if (prevDayOfYear === currentDayOfYear) {
447
+ current = current.add(12, 'h').startOf('day');
448
+ }
439
449
  count += 1;
440
450
  }
441
451
  return nestedWeeks;
package/CHANGELOG.md CHANGED
@@ -5,6 +5,235 @@
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.0.0-alpha.3
9
+
10
+ _Dec 5, 2024_
11
+
12
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 💫 Support [Server-side lazy loading](https://mui.com/x/react-data-grid/server-side-data/lazy-loading/) on the Data Grid. Use [data source](https://mui.com/x/react-data-grid/server-side-data/#data-source) to fetch a range of rows on demand and update the rows in the same way as described in [Infinite loading](https://mui.com/x/react-data-grid/row-updates/#infinite-loading) and [Lazy loading](https://mui.com/x/react-data-grid/row-updates/#lazy-loading) without the need to use any additional event listeners and callbacks.
15
+ - 🎯 Improved [data caching](https://mui.com/x/react-data-grid/server-side-data/#data-caching). Check out our [recommendations](https://mui.com/x/react-data-grid/server-side-data/#improving-the-cache-hit-rate) for improving the cache hit rate.
16
+
17
+ Special thanks go out to the community contributors who have helped make this release possible:
18
+ @ihsanberkozcan, @k-rajat19, @perezShaked.
19
+ Following are all team members who have contributed to this release:
20
+ @arminmeh, @cherniavskii, @flaviendelangle, @JCQuintas, @MBilalShafi, @noraleonte.
21
+
22
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
23
+
24
+ ### Data Grid
25
+
26
+ #### Breaking changes
27
+
28
+ - The "Select all" checkbox is now checked when all the selectable rows are selected, ignoring rows that are not selectable because of the `isRowSelectable` prop.
29
+ - The `rowPositionsDebounceMs` prop was removed.
30
+ - The `gridRowsDataRowIdToIdLookupSelector` selector was removed. Use the `gridRowsLookupSelector` selector in combination with the `getRowId()` API method instead.
31
+ ```diff
32
+ -const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);
33
+ -const rowId = idToIdLookup[id]
34
+ +const rowsLookup = gridRowsLookupSelector(apiRef);
35
+ +const rowId = apiRef.current.getRowId(rowsLookup[id])
36
+ ```
37
+ - The Grid is now more aligned with the WAI-ARIA authoring practices and sets the `role` attribute to `treegrid` if the Data Grid is used with row grouping feature.
38
+
39
+ #### `@mui/x-data-grid@8.0.0-alpha.3`
40
+
41
+ - [DataGrid] Fix deselection not working with `isRowSelectable` (#15692) @MBilalShafi
42
+ - [DataGrid] Make column autosizing work with flex columns (#15465) @cherniavskii
43
+ - [DataGrid] Remove `gridRowsDataRowIdToIdLookupSelector` selector (#15698) @arminmeh
44
+ - [DataGrid] Remove `rowPositionsDebounceMs` prop (#15482) @k-rajat19
45
+ - [l10n] Improve Hebrew (he-IL) locale (#15699) @perezShaked
46
+ - [l10n] Improve Turkish (tr-TR) locale (#15734) @ihsanberkozcan
47
+
48
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
49
+
50
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.3`, plus:
51
+
52
+ - [DataGridPro] Cleanup pinned rows on removal (#15697) @cherniavskii
53
+ - [DataGridPro] Server-side lazy loading (#13878) @arminmeh
54
+
55
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
56
+
57
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.3`, plus:
58
+
59
+ - [DataGridPremium] Remove the `ariaV8` experimental flag (#15694) @arminmeh
60
+
61
+ ### Date and Time Pickers
62
+
63
+ #### Breaking changes
64
+
65
+ - The `onOpen()` and `onClose()` methods of the `usePickerContext()` hook have been replaced with a single `setOpen` method — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#usepickercontext).
66
+
67
+ #### `@mui/x-date-pickers@8.0.0-alpha.3`
68
+
69
+ - [pickers] Replace the `onOpen()` and `onClose()` methods of `usePickerContext()` with a single `setOpen()` method. (#15701) @flaviendelangle
70
+
71
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
72
+
73
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.3`.
74
+
75
+ ### Charts
76
+
77
+ #### `@mui/x-charts@8.0.0-alpha.3`
78
+
79
+ - [charts] Improve SVG `pattern` and `gradient` support (#15720) @JCQuintas
80
+
81
+ #### `@mui/x-charts-pro@8.0.0-alpha.3` [![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-charts@8.0.0-alpha.3`.
84
+
85
+ ### Tree View
86
+
87
+ #### `@mui/x-tree-view@8.0.0-alpha.3`
88
+
89
+ No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.2`.
90
+
91
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
92
+
93
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.3`.
94
+
95
+ ### Docs
96
+
97
+ - [docs] Add a customization demo for the Date and Time Pickers overview page (#15118) @noraleonte
98
+ - [docs] Fix typo in charts axis documentation (#15743) @JCQuintas
99
+ - [docs] Improve SEO titles for the Data Grid (#15695) @MBilalShafi
100
+
101
+ ### Core
102
+
103
+ - [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15316) @flaviendelangle
104
+ - [code-infra] Lock file maintenance (#11894)
105
+ - [code-infra] Check if `preset-safe` folder exists in codemod test (#15703) @JCQuintas
106
+ - [code-infra] Import Pickers `preset-safe` into global codemod config (#15659) @JCQuintas
107
+ - [code-infra] Playwright 1.49 (#15493) @JCQuintas
108
+ - [test] Force hover in headless Chrome (#15710) @cherniavskii
109
+
110
+ ## v8.0.0-alpha.2
111
+
112
+ _Nov 29, 2024_
113
+
114
+ We'd like to offer a big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
115
+
116
+ - 👨🏽‍💻 Improve resize performance on the Data Gird.
117
+ - `<ChartDataProvider />` and `<ChartsSurface />` components are now fully divided — [Learn more](https://next.mui.com/x/react-charts/composition/#overview).
118
+ - Users can create their own HTML components using chart data — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
119
+ - 🌍 Improve Spanish, Portuguese, Chinese locales on the Data Grid component.
120
+ - 🌍 Improve Dutch locale on the Date and Time Pickers components.
121
+ - 🐞 Bugfixes
122
+ - 📚 Documentation improvements
123
+
124
+ Special thanks go out to the community contributors who have helped make this release possible:
125
+ @dloeda, @headironc, @jedesroches, @k-rajat19, @lauri865, @mathzdev, @nphmuller, @zinoroman.
126
+ Following are all team members who have contributed to this release:
127
+ @arminmeh, @alexfauquette, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @oliviertassinari.
128
+
129
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
130
+
131
+ ### Data Grid
132
+
133
+ #### Breaking changes
134
+
135
+ - The `<GridOverlays />` component is not exported anymore.
136
+ - The `indeterminateCheckboxAction` prop has been removed. Clicking on an indeterminate checkbox "selects" the unselected descendants.
137
+ - The `apiRef.current.resize()` method was removed.
138
+ - The default value of the `rowSelectionPropagation` prop has been changed to `{ parents: true, descendants: true }` which means that the selection will be propagated to the parents and descendants by default.
139
+ To revert to the previous behavior, pass `rowSelectionPropagation` as `{ parents: false, descendants: false }`.
140
+ - If `estimatedRowCount` is used, the text provided to the [Table Pagination](/material-ui/api/table-pagination/) component from the Material UI library is updated and requires additional translations. Check the example at the end of [Index-based pagination section](/x/react-data-grid/pagination/#index-based-pagination).
141
+
142
+ #### `@mui/x-data-grid@v8.0.0-alpha.2`
143
+
144
+ - [DataGrid] Change test dom check from `/jsdom/` to `/jsdom|HappyDOM/`. (#15634) @jedesroches
145
+ - [DataGrid] Clear timers on unmount (#15620) @cherniavskii
146
+ - [DataGrid] Fix order of spread props on toolbar items (#15556) @KenanYusuf
147
+ - [DataGrid] Improve resize performance (#15549) @lauri865
148
+ - [DataGrid] Make estimation label more accurate (#15632) @arminmeh
149
+ - [DataGrid] Remove `<GridOverlays />` export (#15573) @k-rajat19
150
+ - [DataGrid] Remove `indeterminateCheckboxAction` prop (#15522) @MBilalShafi
151
+ - [DataGrid] Remove try/catch from `<GridCell />` due to performance issues (#15616) @lauri865
152
+ - [DataGrid] Remove unused `resize` method (#15599) @cherniavskii
153
+ - [DataGrid] Support column virtualization with dynamic row height (#15541) @cherniavskii
154
+ - [DataGrid] Update the default value for `rowSelectionPropagation` (#15523) @MBilalShafi
155
+ - [l10n] Improve Chinese (zh-CN) locale (#15570) @headironc
156
+ - [l10n] Improve Portuguese (pt-PT) locale (#15561) @mathzdev
157
+
158
+ #### `@mui/x-data-grid-pro@v8.0.0-alpha.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
159
+
160
+ Same changes as in `@mui/x-data-grid@v8.0.0-alpha.2`, plus:
161
+
162
+ - [DataGridPro] Fix header filtering with `boolean` column type (#15528) @k-rajat19
163
+ - [DataGridPro] Fix pagination state not updating if the data source response has no rows (#15622) @zinoroman
164
+ - [DataGridPro] Fix selection propagation issue on initialization (#15461) @MBilalShafi
165
+
166
+ #### `@mui/x-data-grid-premium@v8.0.0-alpha.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
167
+
168
+ Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.2`.
169
+
170
+ ### Date and Time Pickers
171
+
172
+ #### Breaking changes
173
+
174
+ - The props received by the `layout` and the `toolbar` slots have been reworked — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#do-not-pass-the-section-type-as-a-generic).
175
+
176
+ - The `TSection` generic of the `FieldRef` type has been replaced with the `TValue` generic — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slots-breaking-changes).
177
+
178
+ #### `@mui/x-date-pickers@v8.0.0-alpha.2`
179
+
180
+ - [l10n] Improve Dutch (nl-NL) locale (#15564) @nphmuller
181
+ - [pickers] Fix DST issue with `America/Asuncion` timezone and `AdapterMoment` (#15552) @flaviendelangle
182
+ - [pickers] Improve validation internals (#15419) @flaviendelangle
183
+ - [pickers] Remove `TSection` and strictly type `TValue` (#15434) @flaviendelangle
184
+ - [pickers] Remove `orientation`, `isLandscape`, `isRtl`, `wrapperVariant` and `disabled` props from `PickersLayout` (#15494) @flaviendelangle
185
+ - [pickers] Use the new `ownerState` in `<PickersCalendarHeader />`, `<PickersArrowSwitcher />` and `<DayCalendarSkeleton />` (#15499) @flaviendelangle
186
+ - [pickers] Use the new `ownerState` object in all the field components (#15510) @flaviendelangle
187
+
188
+ #### `@mui/x-date-pickers-pro@v8.0.0-alpha.2` [![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-date-pickers@v8.0.0-alpha.2`.
191
+
192
+ ### Charts
193
+
194
+ #### Breaking changes
195
+
196
+ - Charts Container don't have a `<div />` wrapping them anymore. All props are now passed to the root `<svg />` instead of the `<div />`.
197
+
198
+ #### `@mui/x-charts@v8.0.0-alpha.2`
199
+
200
+ - [charts] Allow the creation of custom HTML components using charts data (#15511) @JCQuintas
201
+ - [charts] Flatten imports from `@mui/utils` and `@mui/system` (#15603) @alexfauquette
202
+ - [charts] Introduce the plugin system (#15513) @alexfauquette
203
+ - [charts] Prevent invalid `releasePointerCapture` (#15602) @alexfauquette
204
+ - [charts] Fix custom Tooltip demos (#15631) @alexfauquette
205
+
206
+ #### `@mui/x-charts-pro@v8.0.0-alpha.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
207
+
208
+ Same changes as in `@mui/x-charts@v8.0.0-alpha.2`.
209
+
210
+ ### Tree View
211
+
212
+ #### `@mui/x-tree-view@v8.0.0-alpha.2`
213
+
214
+ - [TreeView] Flatten import from `@mui/utils` and `@mui/system` (#15604) @alexfauquette
215
+
216
+ #### `@mui/x-tree-view-pro@v8.0.0-alpha.2`
217
+
218
+ Same changes as in `@mui/x-tree-view@v8.0.0-alpha.2`.
219
+
220
+ ### Docs
221
+
222
+ - [docs] Fix 404 links (#15575) @oliviertassinari
223
+ - [docs] Fix bash comments (#15571) @oliviertassinari
224
+ - [docs] Fix Pickers theme augmentation example (#15672) @LukasTy
225
+ - [docs] Replace use of "e.g." with "for example" (#15572) @oliviertassinari
226
+ - [docs] Update stale `new` and `preview` tags in v8 docs (#15547) @JCQuintas
227
+ - [docs] Fix layout shift image on Tree View docs (#15626) @oliviertassinari
228
+ - [docs] Fix `anchorEl` API page for charts (#15625) @oliviertassinari
229
+ - [docs] Add documentation for the list view feature (#15344) @KenanYusuf
230
+
231
+ ### Core
232
+
233
+ - [core] Follow `()` function convention for docs @oliviertassinari
234
+ - [core] Remove dead translation key (#15566) @oliviertassinari
235
+ - [code-infra] Auto-merge `@types/node` bumps (#15591) @LukasTy
236
+
8
237
  ## v8.0.0-alpha.1
9
238
 
10
239
  _Nov 22, 2024_
@@ -17,8 +246,6 @@ We'd like to offer a big thanks to the 16 contributors who made this release pos
17
246
  - 🐞 Bugfixes
18
247
  - 📚 Documentation improvements
19
248
 
20
- ### Breaking change
21
-
22
249
  Special thanks go out to the community contributors who have helped make this release possible:
23
250
  @CarlosLopezLg, @headironc, @hendrikpeilke, @k-rajat19, @lhilgert9, @viktormelin.
24
251
  Following are all team members who have contributed to this release:
@@ -56,7 +283,7 @@ Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.1`, plus:
56
283
  #### Breaking change
57
284
 
58
285
  - The `FieldValueType` type has been renamed to `PickerValueType` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables).
59
- - The `toolbar` and `layout` slots no longer receive the `disabled` and `readOnly` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slots-breaking-changes).
286
+ - The `toolbar` and `layout` slots no longer receive the `disabled` and `readOnly` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slots-breaking-changes).
60
287
 
61
288
  #### `@mui/x-date-pickers@v8.0.0-alpha.1`
62
289
 
@@ -64,9 +291,9 @@ Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.1`, plus:
64
291
  - [pickers] React 19 support (#15342) @arminmeh
65
292
  - [pickers] Add new properties to `PickerOwnerState` and `PickerContextValue` (#15415) @flaviendelangle
66
293
  - [pickers] Always use `props.value` when it changes (#15490) @flaviendelangle
67
- - [pickers] Ensure internal value timezone is updated (#15435) @LukasTy
294
+ - [pickers] Ensure internal value timezone is updated (#15435) @LukasTy
68
295
  - [pickers] Fix unused code in `<PickersToolbar />` component (#15515) @LukasTy
69
- - [pickers] Remove `FieldValueType` in favor of `PickerValueType` (#15259) @arthurbalduini
296
+ - [pickers] Remove `FieldValueType` in favor of `PickerValueType` (#15259) @arthurbalduini
70
297
  - [pickers] Remove the form props from the layout and the toolbar slots (#15492) @flaviendelangle
71
298
  - [pickers] Use `props.referenceDate` timezone when `props.value` and `props.defaultValue` are not defined (#15532) @flaviendelangle
72
299
  - [TimePicker] Prevent mouse events after `touchend` event (#15346) @arthurbalduini
@@ -82,12 +309,14 @@ Same changes as in `@mui/x-date-pickers@v8.0.0-alpha.1`, plus:
82
309
  #### Breaking change
83
310
 
84
311
  - The DX of the Tooltip customization has been refactored
312
+
85
313
  - The `tooltip` prop has been removed in favor of `slotProps.tooltip` for consistency.
86
- - The `popper`, `axisContent`, and `itemContent` slots have been removed in favor of the `tooltip` slot which overrides the entire tooltip.
314
+ - The `popper`, `axisContent`, and `itemContent` slots have been removed in favor of the `tooltip` slot which overrides the entire tooltip.
87
315
  - To override the tooltip content, use the `useItemTooltip` or `useAxisTooltip` hook to get the data, and wrap your component in `ChartsTooltipContainer` to follow the pointer position.
88
316
  - To override the tooltip placement, use the `ChartsItemTooltipContent` or `ChartsItemTooltipContent` to get default data and place them in your custom tooltip.
89
317
 
90
318
  - The library now uses the SVG `filter` attribute instead of `d3-color` for color manipulation.
319
+
91
320
  - This modification impacts the `LinePlot`, `AreaPlot`, and `BarPlot` components.
92
321
  If you've customized the `fill` of those elements, you might need to override it by using the CSS `filter`.
93
322
  - The `theme.styleOverride` is removed for `MuiLineElement`, `MuiAreaElement`, and `MuiBarElement` to improve performance.
@@ -338,6 +567,100 @@ Same changes as in `@mui/x-charts@8.0.0-alpha.0`.
338
567
  - [release] v8 preparation (#15054) @michelengelen
339
568
  - [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf
340
569
 
570
+ ## 7.23.0
571
+
572
+ _Nov 29, 2024_
573
+
574
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
575
+
576
+ - ✨ Support for a new display mode on the Data Grid with the [List View feature](https://mui.com/x/react-data-grid/list-view/), offering an extremely flexible way to render datasets and enabling developers to adapt how data is displayed across different screen sizes.
577
+
578
+ https://github.com/user-attachments/assets/61286adc-03fc-4323-9739-8ca726fcc16c
579
+
580
+ - ⚛️ React 19 support
581
+ - 📚 Documentation improvements
582
+ - 🌍 Improve Spanish, Portuguese, Chinese locales on the Data Grid component.
583
+ - 🌍 Improve Dutch locale on the Date and Time Picker components.
584
+ - 🐞 Bugfixes
585
+
586
+ Special thanks go out to the community contributors who have helped make this release possible:
587
+ @dloeda, @headironc, @mathzdev, @nphmuller, @lhilgert9, @lauri865.
588
+ Following are all team members who have contributed to this release:
589
+ @oliviertassinari, @arminmeh, @KenanYusuf, @flaviendelangle, @MBilalShafi.
590
+
591
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
592
+
593
+ ### Data Grid
594
+
595
+ #### `@mui/x-data-grid@v7.23.0`
596
+
597
+ - [DataGrid] React 19 support (#15557) @arminmeh
598
+ - [DataGrid] Change test dom check from `/jsdom/` to `/jsdom|HappyDOM/`. (#15642) @jedesroches
599
+ - [DataGrid] Fix last separator not being hidden when grid is scrollable (#15551) @KenanYusuf
600
+ - [DataGrid] Fix order of spread props on toolbar items (#15556) @KenanYusuf
601
+ - [DataGrid] Fix row-spanning in combination with column-pinning (#15460) @lhilgert9
602
+ - [DataGrid] Improve resize performance (#15592) @lauri865
603
+ - [DataGrid] Support column virtualization with dynamic row height (#15567) @cherniavskii
604
+ - [DataGrid] Improve `GridCell` performance (#15621) @lauri865
605
+ - [l10n] Improve Chinese (zh-CN) locale (#15570) @headironc
606
+ - [l10n] Improve Portuguese (pt-PT) locale (#15561) @mathzdev
607
+
608
+ #### `@mui/x-data-grid-pro@v7.23.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
609
+
610
+ Same changes as in `@mui/x-data-grid@v7.23.0`, plus:
611
+
612
+ - [DataGridPro] Fix header filtering with `boolean` column type (#15640) @k-rajat19
613
+ - [DataGridPro] Fix pagination state not updating if the data source response has no rows (#15643) @zinoroman
614
+ - [DataGridPro] Fix selection propagation issue on initialization (#15593) @MBilalShafi
615
+
616
+ #### `@mui/x-data-grid-premium@v7.23.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
617
+
618
+ Same changes as in `@mui/x-data-grid-pro@v7.23.0`.
619
+
620
+ ### Date and Time Pickers
621
+
622
+ #### `@mui/x-date-pickers@v7.23.0`
623
+
624
+ - [pickers] React 19 support (#15557) @arminmeh
625
+ - [pickers] Fix DST issue with `America/Asuncion` timezone and `AdapterMoment` (#15653) @flaviendelangle
626
+ - [pickers] Use `props.referenceDate` timezone when `props.value` and `props.defaultValue` are not defined (#15544) @flaviendelangle
627
+ - [l10n] Improve Dutch (nl-NL) locale (#15564) @nphmuller
628
+
629
+ #### `@mui/x-date-pickers-pro@v7.23.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
630
+
631
+ Same changes as in `@mui/x-date-pickers@v7.23.0`.
632
+
633
+ ### Charts
634
+
635
+ #### `@mui/x-charts@v7.23.0`
636
+
637
+ - [charts] React 19 support (#15557) @arminmeh
638
+ - [charts] Prevent invalid `releasePointerCapture` (#15609) @alexfauquette
639
+
640
+ #### `@mui/x-charts-pro@v7.23.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
641
+
642
+ Same changes as in `@mui/x-charts@v7.23.0`.
643
+
644
+ ### Tree View
645
+
646
+ #### `@mui/x-tree-view@v7.23.0`
647
+
648
+ - [TreeView] React 19 support (#15557) @arminmeh
649
+
650
+ #### `@mui/x-tree-view-pro@7.23.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
651
+
652
+ Same changes as in `@mui/x-tree-view@7.23.0`.
653
+
654
+ ### Docs
655
+
656
+ - [docs] Add data caching to lazy loaded detail panel demo (#15555) @cherniavskii
657
+ - [docs] Remove selectors section from list view docs (#15639) @KenanYusuf
658
+ - [docs] Add documentation for the list view feature (#15344) @KenanYusuf
659
+
660
+ ### Core
661
+
662
+ - [core] Update @mui/monorepo (#15574) @oliviertassinari
663
+
341
664
  ## v7.22.3
342
665
 
343
666
  _Nov 21, 2024_
@@ -4803,7 +5126,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
4803
5126
 
4804
5127
  The `useClearableField` hook API has been simplified to now take a `props` parameter instead of a `fieldProps`, `InputProps`, `clearable`, `onClear`, `slots` and `slotProps` parameters.
4805
5128
 
4806
- You should now be able to directly pass the returned value from your field hook (e.g: `useDateField`) to `useClearableField`
5129
+ You should now be able to directly pass the returned value from your field hook (for example `useDateField`) to `useClearableField`
4807
5130
 
4808
5131
  ```diff
4809
5132
  const fieldResponse = useDateField(props);
@@ -13,6 +13,7 @@ import { ExportedYearCalendarProps, YearCalendarSlots, YearCalendarSlotProps } f
13
13
  import { ExportedMonthCalendarProps, MonthCalendarSlots, MonthCalendarSlotProps } from '../MonthCalendar/MonthCalendar.types';
14
14
  import { ExportedValidateDateProps } from '../validation/validateDate';
15
15
  import { FormProps } from '../internals/models/formProps';
16
+ import { PickerValue } from '../internals/models';
16
17
  export interface DateCalendarSlots extends PickersCalendarHeaderSlots, DayCalendarSlots, MonthCalendarSlots, YearCalendarSlots {
17
18
  /**
18
19
  * Custom component for calendar header.
@@ -47,7 +48,7 @@ export interface ExportedDateCalendarProps extends ExportedDayCalendarProps, Exp
47
48
  */
48
49
  onMonthChange?: (month: PickerValidDate) => void;
49
50
  }
50
- export interface DateCalendarProps extends ExportedDateCalendarProps, ExportedUseViewsOptions<PickerValidDate | null, DateView> {
51
+ export interface DateCalendarProps extends ExportedDateCalendarProps, ExportedUseViewsOptions<PickerValue, DateView> {
51
52
  /**
52
53
  * The selected value.
53
54
  * Used when the component is controlled.
@@ -6,10 +6,7 @@ import { styled, useTheme, useThemeProps } from '@mui/material/styles';
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
7
  import { getPickersFadeTransitionGroupUtilityClass } from "./pickersFadeTransitionGroupClasses.js";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
- const useUtilityClasses = ownerState => {
10
- const {
11
- classes
12
- } = ownerState;
9
+ const useUtilityClasses = classes => {
13
10
  const slots = {
14
11
  root: ['root']
15
12
  };
@@ -36,9 +33,10 @@ export function PickersFadeTransitionGroup(inProps) {
36
33
  children,
37
34
  className,
38
35
  reduceAnimations,
39
- transKey
36
+ transKey,
37
+ classes: classesProp
40
38
  } = props;
41
- const classes = useUtilityClasses(props);
39
+ const classes = useUtilityClasses(classesProp);
42
40
  const theme = useTheme();
43
41
  if (reduceAnimations) {
44
42
  return children;
@@ -7,10 +7,10 @@ import { styled, useTheme, useThemeProps } from '@mui/material/styles';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
8
  import { CSSTransition, TransitionGroup } from 'react-transition-group';
9
9
  import { getPickersSlideTransitionUtilityClass, pickersSlideTransitionClasses } from "./pickersSlideTransitionClasses.js";
10
+ import { usePickerPrivateContext } from "../internals/hooks/usePickerPrivateContext.js";
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
11
- const useUtilityClasses = ownerState => {
12
+ const useUtilityClasses = (classes, ownerState) => {
12
13
  const {
13
- classes,
14
14
  slideDirection
15
15
  } = ownerState;
16
16
  const slots = {
@@ -99,11 +99,18 @@ export function PickersSlideTransition(inProps) {
99
99
  children,
100
100
  className,
101
101
  reduceAnimations,
102
- transKey
103
- // extracting `classes` from `other`
102
+ slideDirection,
103
+ transKey,
104
+ classes: classesProp
104
105
  } = props,
105
106
  other = _objectWithoutPropertiesLoose(props, _excluded);
106
- const classes = useUtilityClasses(props);
107
+ const {
108
+ ownerState: pickerOwnerState
109
+ } = usePickerPrivateContext();
110
+ const ownerState = _extends({}, pickerOwnerState, {
111
+ slideDirection
112
+ });
113
+ const classes = useUtilityClasses(classesProp, ownerState);
107
114
  const theme = useTheme();
108
115
  if (reduceAnimations) {
109
116
  return /*#__PURE__*/_jsx("div", {
@@ -25,17 +25,19 @@ interface ChangeFocusedDayPayload {
25
25
  export declare const createCalendarStateReducer: (reduceAnimations: boolean, disableSwitchToMonthOnDayFocus: boolean, utils: MuiPickersAdapter) => (state: CalendarState, action: ReducerAction<"finishMonthSwitchingAnimation"> | ReducerAction<"changeMonth", ChangeMonthPayload> | ReducerAction<"changeMonthTimezone", {
26
26
  newTimezone: string;
27
27
  }> | ReducerAction<"changeFocusedDay", ChangeFocusedDayPayload>) => CalendarState;
28
- interface UseCalendarStateParams extends Pick<DateCalendarDefaultizedProps, 'value' | 'referenceDate' | 'disableFuture' | 'disablePast' | 'minDate' | 'maxDate' | 'onMonthChange' | 'reduceAnimations' | 'shouldDisableDate'> {
28
+ interface UseCalendarStateParameters extends Pick<DateCalendarDefaultizedProps, 'referenceDate' | 'disableFuture' | 'disablePast' | 'minDate' | 'maxDate' | 'onMonthChange' | 'reduceAnimations' | 'shouldDisableDate'> {
29
+ value: PickerValidDate | null;
29
30
  disableSwitchToMonthOnDayFocus?: boolean;
30
31
  timezone: PickersTimezone;
31
32
  }
32
- export declare const useCalendarState: (params: UseCalendarStateParams) => {
33
- referenceDate: any;
33
+ interface UseCalendarStateReturnValue {
34
+ referenceDate: PickerValidDate;
34
35
  calendarState: CalendarState;
35
36
  changeMonth: (newDate: PickerValidDate) => void;
36
37
  changeFocusedDay: (newFocusedDate: PickerValidDate | null, withoutMonthSwitchingAnimation?: boolean) => void;
37
38
  isDateDisabled: (day: PickerValidDate | null) => boolean;
38
39
  onMonthSwitchingAnimationEnd: () => void;
39
40
  handleChangeMonth: (payload: ChangeMonthPayload) => void;
40
- };
41
+ }
42
+ export declare const useCalendarState: (params: UseCalendarStateParameters) => UseCalendarStateReturnValue;
41
43
  export {};
@@ -13,6 +13,7 @@ import { useDateField } from "./useDateField.js";
13
13
  import { useClearableField } from "../hooks/index.js";
14
14
  import { PickersTextField } from "../PickersTextField/index.js";
15
15
  import { convertFieldResponseIntoMuiTextFieldProps } from "../internals/utils/convertFieldResponseIntoMuiTextFieldProps.js";
16
+ import { useFieldOwnerState } from "../internals/hooks/useFieldOwnerState.js";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  /**
18
19
  * Demos:
@@ -36,7 +37,7 @@ const DateField = /*#__PURE__*/React.forwardRef(function DateField(inProps, inRe
36
37
  inputProps
37
38
  } = themeProps,
38
39
  other = _objectWithoutPropertiesLoose(themeProps, _excluded);
39
- const ownerState = themeProps;
40
+ const ownerState = useFieldOwnerState(themeProps);
40
41
  const TextField = slots?.textField ?? (inProps.enableAccessibleFieldDOMStructure === false ? MuiTextField : PickersTextField);
41
42
  const textFieldProps = useSlotProps({
42
43
  elementType: TextField,
@@ -267,10 +268,10 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
267
268
  */
268
269
  shouldDisableYear: PropTypes.func,
269
270
  /**
270
- * If `true`, the format will respect the leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
271
- * If `false`, the format will always add leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
271
+ * If `true`, the format will respect the leading zeroes (for example on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
272
+ * If `false`, the format will always add leading zeroes (for example on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
272
273
  *
273
- * Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (e.g: "DD"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.
274
+ * Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (for example "DD"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.
274
275
  *
275
276
  * Warning n°2: When `shouldRespectLeadingZeros={true}`, the field will add an invisible character on the sections containing a single digit to make sure `onChange` is fired.
276
277
  * If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\u200e/g, '')`.
@@ -1,12 +1,13 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/utils';
3
- import { MakeOptional } from '@mui/x-internals/types';
4
- import TextField from '@mui/material/TextField';
2
+ import type { TextFieldProps } from '@mui/material/TextField';
3
+ import { MakeOptional, SlotComponentPropsFromProps } from '@mui/x-internals/types';
5
4
  import { ExportedUseClearableFieldProps, UseClearableFieldSlots, UseClearableFieldSlotProps } from '../hooks/useClearableField';
6
- import { DateValidationError, FieldSection, PickerValidDate, BuiltInFieldTextFieldProps } from '../models';
5
+ import { DateValidationError, BuiltInFieldTextFieldProps, FieldOwnerState } from '../models';
7
6
  import { UseFieldInternalProps } from '../internals/hooks/useField';
8
7
  import { ExportedValidateDateProps } from '../validation/validateDate';
9
- export interface UseDateFieldProps<TEnableAccessibleFieldDOMStructure extends boolean> extends MakeOptional<UseFieldInternalProps<PickerValidDate | null, FieldSection, TEnableAccessibleFieldDOMStructure, DateValidationError>, 'format'>, ExportedValidateDateProps, ExportedUseClearableFieldProps {
8
+ import { PickersTextFieldProps } from '../PickersTextField';
9
+ import { PickerValue } from '../internals/models';
10
+ export interface UseDateFieldProps<TEnableAccessibleFieldDOMStructure extends boolean> extends MakeOptional<UseFieldInternalProps<PickerValue, TEnableAccessibleFieldDOMStructure, DateValidationError>, 'format'>, ExportedValidateDateProps, ExportedUseClearableFieldProps {
10
11
  }
11
12
  export type DateFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> = UseDateFieldProps<TEnableAccessibleFieldDOMStructure> & Omit<BuiltInFieldTextFieldProps<TEnableAccessibleFieldDOMStructure>, keyof UseDateFieldProps<TEnableAccessibleFieldDOMStructure>> & {
12
13
  /**
@@ -18,16 +19,16 @@ export type DateFieldProps<TEnableAccessibleFieldDOMStructure extends boolean =
18
19
  * The props used for each component slot.
19
20
  * @default {}
20
21
  */
21
- slotProps?: DateFieldSlotProps<TEnableAccessibleFieldDOMStructure>;
22
+ slotProps?: DateFieldSlotProps;
22
23
  };
23
24
  export type DateFieldOwnerState<TEnableAccessibleFieldDOMStructure extends boolean> = DateFieldProps<TEnableAccessibleFieldDOMStructure>;
24
25
  export interface DateFieldSlots extends UseClearableFieldSlots {
25
26
  /**
26
27
  * Form control with an input to render the value.
27
- * @default TextField from '@mui/material' or PickersTextField if `enableAccessibleFieldDOMStructure` is `true`.
28
+ * @default <PickersTextField />, or <TextField /> from '@mui/material' if `enableAccessibleFieldDOMStructure` is `false`.
28
29
  */
29
30
  textField?: React.ElementType;
30
31
  }
31
- export interface DateFieldSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends UseClearableFieldSlotProps {
32
- textField?: SlotComponentProps<typeof TextField, {}, DateFieldOwnerState<TEnableAccessibleFieldDOMStructure>>;
32
+ export interface DateFieldSlotProps extends UseClearableFieldSlotProps {
33
+ textField?: SlotComponentPropsFromProps<PickersTextFieldProps | TextFieldProps, {}, FieldOwnerState>;
33
34
  }
@@ -1,7 +1,7 @@
1
1
  import { DesktopDatePickerProps, DesktopDatePickerSlots, DesktopDatePickerSlotProps } from '../DesktopDatePicker';
2
- import { BaseSingleInputFieldProps } from '../internals/models';
2
+ import { BaseSingleInputFieldProps, PickerValue } from '../internals/models';
3
3
  import { MobileDatePickerProps, MobileDatePickerSlots, MobileDatePickerSlotProps } from '../MobileDatePicker';
4
- import { DateValidationError, FieldSection, PickerValidDate } from '../models';
4
+ import { DateValidationError } from '../models';
5
5
  import { ValidateDateProps } from '../validation/validateDate';
6
6
  export interface DatePickerSlots extends DesktopDatePickerSlots, MobileDatePickerSlots {
7
7
  }
@@ -33,4 +33,4 @@ export interface DatePickerProps<TEnableAccessibleFieldDOMStructure extends bool
33
33
  /**
34
34
  * Props the field can receive when used inside a date picker (<DatePicker />, <DesktopDatePicker /> or <MobileDatePicker /> component).
35
35
  */
36
- export type DatePickerFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> = ValidateDateProps & BaseSingleInputFieldProps<PickerValidDate | null, FieldSection, TEnableAccessibleFieldDOMStructure, DateValidationError>;
36
+ export type DatePickerFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> = ValidateDateProps & BaseSingleInputFieldProps<PickerValue, TEnableAccessibleFieldDOMStructure, DateValidationError>;
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar';
3
- import { DateView, PickerValidDate } from '../models';
3
+ import { DateView } from '../models';
4
4
  import { DatePickerToolbarClasses } from './datePickerToolbarClasses';
5
- export interface DatePickerToolbarProps extends BaseToolbarProps<PickerValidDate | null, DateView>, ExportedDatePickerToolbarProps {
5
+ import { PickerValue } from '../internals/models';
6
+ export interface DatePickerToolbarProps extends BaseToolbarProps<PickerValue, DateView>, ExportedDatePickerToolbarProps {
6
7
  }
7
8
  export interface ExportedDatePickerToolbarProps extends ExportedBaseToolbarProps {
8
9
  /**