@mui/x-date-pickers-pro 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 (77) hide show
  1. package/CHANGELOG.md +330 -7
  2. package/DateRangePicker/DateRangePicker.types.d.ts +2 -2
  3. package/DateRangePicker/shared.d.ts +3 -2
  4. package/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +2 -2
  5. package/DateTimeRangePicker/DateTimeRangePickerTabs.js +8 -7
  6. package/DateTimeRangePicker/shared.d.ts +4 -3
  7. package/MultiInputDateRangeField/MultiInputDateRangeField.js +10 -12
  8. package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +12 -10
  9. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +10 -12
  10. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +11 -9
  11. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +10 -12
  12. package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +11 -9
  13. package/README.md +7 -4
  14. package/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -5
  15. package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +11 -10
  16. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +5 -5
  17. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +11 -10
  18. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -5
  19. package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +10 -9
  20. package/index.js +1 -1
  21. package/internals/hooks/models/useRangePicker.d.ts +1 -2
  22. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +12 -2
  23. package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +13 -12
  24. package/internals/hooks/useEnrichedRangePickerFieldProps.js +10 -11
  25. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +13 -3
  26. package/internals/hooks/useMultiInputFieldSelectedSections.d.ts +6 -7
  27. package/internals/hooks/useRangePosition.d.ts +3 -2
  28. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +1 -2
  29. package/internals/models/dateTimeRange.d.ts +2 -2
  30. package/internals/models/fields.d.ts +6 -6
  31. package/internals/models/timeRange.d.ts +2 -2
  32. package/internals/utils/date-fields-utils.d.ts +6 -6
  33. package/internals/utils/releaseInfo.js +1 -1
  34. package/internals/utils/valueManagers.d.ts +4 -3
  35. package/models/dateRange.d.ts +3 -3
  36. package/models/fields.d.ts +6 -9
  37. package/models/index.d.ts +1 -0
  38. package/models/index.js +2 -1
  39. package/models/range.d.ts +0 -1
  40. package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +8 -7
  41. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +10 -12
  42. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +10 -12
  43. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +10 -12
  44. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -5
  45. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +5 -5
  46. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -5
  47. package/modern/index.js +1 -1
  48. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +12 -2
  49. package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +10 -11
  50. package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +13 -3
  51. package/modern/internals/utils/releaseInfo.js +1 -1
  52. package/modern/models/index.js +2 -1
  53. package/modern/validation/validateDateRange.js +8 -0
  54. package/modern/validation/validateDateTimeRange.js +4 -0
  55. package/modern/validation/validateTimeRange.js +8 -0
  56. package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -6
  57. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +9 -11
  58. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +9 -11
  59. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +9 -11
  60. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +4 -4
  61. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +4 -4
  62. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +4 -4
  63. package/node/index.js +1 -1
  64. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +12 -2
  65. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +10 -11
  66. package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +13 -3
  67. package/node/internals/utils/releaseInfo.js +1 -1
  68. package/node/validation/validateDateRange.js +8 -0
  69. package/node/validation/validateDateTimeRange.js +4 -0
  70. package/node/validation/validateTimeRange.js +8 -0
  71. package/package.json +4 -4
  72. package/validation/validateDateRange.d.ts +9 -1
  73. package/validation/validateDateRange.js +8 -0
  74. package/validation/validateDateTimeRange.d.ts +6 -2
  75. package/validation/validateDateTimeRange.js +4 -0
  76. package/validation/validateTimeRange.d.ts +9 -1
  77. package/validation/validateTimeRange.js +8 -0
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);
@@ -1,7 +1,7 @@
1
1
  import { BaseSingleInputFieldProps, PickerRangeValue } from '@mui/x-date-pickers/internals';
2
2
  import { DesktopDateRangePickerProps, DesktopDateRangePickerSlots, DesktopDateRangePickerSlotProps } from '../DesktopDateRangePicker';
3
3
  import { MobileDateRangePickerProps, MobileDateRangePickerSlots, MobileDateRangePickerSlotProps } from '../MobileDateRangePicker';
4
- import { DateRangeValidationError, RangeFieldSection } from '../models';
4
+ import { DateRangeValidationError } from '../models';
5
5
  import { ValidateDateRangeProps } from '../validation';
6
6
  export interface DateRangePickerSlots extends DesktopDateRangePickerSlots, MobileDateRangePickerSlots {
7
7
  }
@@ -28,4 +28,4 @@ export interface DateRangePickerProps<TEnableAccessibleFieldDOMStructure extends
28
28
  /**
29
29
  * Props the field can receive when used inside a date range picker (<DateRangePicker />, <DesktopDateRangePicker /> or <MobileDateRangePicker /> component).
30
30
  */
31
- export type DateRangePickerFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> = ValidateDateRangeProps & BaseSingleInputFieldProps<PickerRangeValue, RangeFieldSection, TEnableAccessibleFieldDOMStructure, DateRangeValidationError>;
31
+ export type DateRangePickerFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> = ValidateDateRangeProps & BaseSingleInputFieldProps<PickerRangeValue, TEnableAccessibleFieldDOMStructure, DateRangeValidationError>;
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { DefaultizedProps } from '@mui/x-internals/types';
3
3
  import { LocalizedComponent } from '@mui/x-date-pickers/locales';
4
- import { BaseDateValidationProps, BasePickerInputProps, PickerViewRendererLookup, PickerRangeValue } from '@mui/x-date-pickers/internals';
4
+ import { BasePickerInputProps, PickerViewRendererLookup, PickerRangeValue } from '@mui/x-date-pickers/internals';
5
5
  import { DateRangeValidationError } from '../models';
6
6
  import { DateRangeCalendarSlots, DateRangeCalendarSlotProps, ExportedDateRangeCalendarProps } from '../DateRangeCalendar';
7
7
  import { DateRangePickerToolbarProps, ExportedDateRangePickerToolbarProps } from './DateRangePickerToolbar';
8
8
  import { DateRangeViewRendererProps } from '../dateRangeViewRenderers';
9
+ import { ValidateDateRangePropsToDefault } from '../validation/validateDateRange';
9
10
  export interface BaseDateRangePickerSlots extends DateRangeCalendarSlots {
10
11
  /**
11
12
  * Custom component for the toolbar rendered above the views.
@@ -34,6 +35,6 @@ export interface BaseDateRangePickerProps extends Omit<BasePickerInputProps<Pick
34
35
  */
35
36
  viewRenderers?: Partial<PickerViewRendererLookup<PickerRangeValue, 'day', DateRangeViewRendererProps<'day'>, {}>>;
36
37
  }
37
- type UseDateRangePickerDefaultizedProps<Props extends BaseDateRangePickerProps> = LocalizedComponent<DefaultizedProps<Props, keyof BaseDateValidationProps>>;
38
+ type UseDateRangePickerDefaultizedProps<Props extends BaseDateRangePickerProps> = LocalizedComponent<DefaultizedProps<Props, ValidateDateRangePropsToDefault>>;
38
39
  export declare function useDateRangePickerDefaultizedProps<Props extends BaseDateRangePickerProps>(props: Props, name: string): UseDateRangePickerDefaultizedProps<Props>;
39
40
  export {};
@@ -1,7 +1,7 @@
1
1
  import { BaseSingleInputFieldProps, PickerRangeValue } from '@mui/x-date-pickers/internals';
2
2
  import { DesktopDateTimeRangePickerProps, DesktopDateTimeRangePickerSlots, DesktopDateTimeRangePickerSlotProps } from '../DesktopDateTimeRangePicker';
3
3
  import { MobileDateTimeRangePickerProps, MobileDateTimeRangePickerSlots, MobileDateTimeRangePickerSlotProps } from '../MobileDateTimeRangePicker';
4
- import { DateTimeRangeValidationError, RangeFieldSection } from '../models';
4
+ import { DateTimeRangeValidationError } from '../models';
5
5
  import type { ValidateDateTimeRangeProps } from '../validation';
6
6
  export interface DateTimeRangePickerSlots extends DesktopDateTimeRangePickerSlots, MobileDateTimeRangePickerSlots {
7
7
  }
@@ -28,4 +28,4 @@ export interface DateTimeRangePickerProps<TEnableAccessibleFieldDOMStructure ext
28
28
  /**
29
29
  * Props the field can receive when used inside a date time range picker (<DateTimeRangePicker />, <DesktopDateTimeRangePicker /> or <MobileDateTimeRangePicker /> component).
30
30
  */
31
- export type DateTimeRangePickerFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> = ValidateDateTimeRangeProps & BaseSingleInputFieldProps<PickerRangeValue, RangeFieldSection, TEnableAccessibleFieldDOMStructure, DateTimeRangeValidationError>;
31
+ export type DateTimeRangePickerFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> = ValidateDateTimeRangeProps & BaseSingleInputFieldProps<PickerRangeValue, TEnableAccessibleFieldDOMStructure, DateTimeRangeValidationError>;
@@ -7,7 +7,7 @@ import { styled, useThemeProps } from '@mui/material/styles';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
8
  import useEventCallback from '@mui/utils/useEventCallback';
9
9
  import { TimeIcon, DateRangeIcon, ArrowLeftIcon, ArrowRightIcon } from '@mui/x-date-pickers/icons';
10
- import { isDatePickerView } from '@mui/x-date-pickers/internals';
10
+ import { isDatePickerView, usePickerPrivateContext } from '@mui/x-date-pickers/internals';
11
11
  import { usePickerTranslations } from '@mui/x-date-pickers/hooks';
12
12
  import IconButton from '@mui/material/IconButton';
13
13
  import Button from '@mui/material/Button';
@@ -25,10 +25,7 @@ const tabToView = tab => {
25
25
  }
26
26
  return 'hours';
27
27
  };
28
- const useUtilityClasses = ownerState => {
29
- const {
30
- classes
31
- } = ownerState;
28
+ const useUtilityClasses = classes => {
32
29
  const slots = {
33
30
  root: ['root'],
34
31
  tabButton: ['tabButton'],
@@ -79,10 +76,14 @@ const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
79
76
  rangePosition,
80
77
  onRangePositionChange,
81
78
  className,
79
+ classes: classesProp,
82
80
  sx
83
81
  } = props;
84
82
  const translations = usePickerTranslations();
85
- const classes = useUtilityClasses(props);
83
+ const {
84
+ ownerState
85
+ } = usePickerPrivateContext();
86
+ const classes = useUtilityClasses(classesProp);
86
87
  const value = React.useMemo(() => viewToTab(view, rangePosition), [view, rangePosition]);
87
88
  const isPreviousHidden = value === 'start-date';
88
89
  const isNextHidden = value === 'end-time';
@@ -121,7 +122,7 @@ const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
121
122
  return null;
122
123
  }
123
124
  return /*#__PURE__*/_jsxs(DateTimeRangePickerTabsRoot, {
124
- ownerState: props,
125
+ ownerState: ownerState,
125
126
  className: clsx(classes.root, className),
126
127
  sx: sx,
127
128
  children: [!isPreviousHidden ? /*#__PURE__*/_jsx(IconButton, {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { DefaultizedProps } from '@mui/x-internals/types';
3
3
  import { LocalizedComponent } from '@mui/x-date-pickers/locales';
4
- import { BaseDateValidationProps, BasePickerInputProps, PickerViewRendererLookup, BaseClockProps, DesktopOnlyTimePickerProps, TimeViewWithMeridiem, UseViewsOptions, DateTimeValidationProps, DateOrTimeViewWithMeridiem, PickerRangeValue } from '@mui/x-date-pickers/internals';
4
+ import { BasePickerInputProps, PickerViewRendererLookup, BaseClockProps, DesktopOnlyTimePickerProps, TimeViewWithMeridiem, UseViewsOptions, DateOrTimeViewWithMeridiem, PickerRangeValue } from '@mui/x-date-pickers/internals';
5
5
  import { TimeViewRendererProps } from '@mui/x-date-pickers/timeViewRenderers';
6
6
  import { DigitalClockSlots, DigitalClockSlotProps } from '@mui/x-date-pickers/DigitalClock';
7
7
  import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from '@mui/x-date-pickers/MultiSectionDigitalClock';
@@ -11,6 +11,7 @@ import { DateRangeCalendarSlots, DateRangeCalendarSlotProps, ExportedDateRangeCa
11
11
  import { DateTimeRangePickerToolbarProps, ExportedDateTimeRangePickerToolbarProps } from './DateTimeRangePickerToolbar';
12
12
  import { DateRangeViewRendererProps } from '../dateRangeViewRenderers';
13
13
  import { DateTimeRangePickerTabsProps, ExportedDateTimeRangePickerTabsProps } from './DateTimeRangePickerTabs';
14
+ import { ExportedValidateDateTimeRangeProps, ValidateDateTimeRangePropsToDefault } from '../validation/validateDateTimeRange';
14
15
  export interface BaseDateTimeRangePickerSlots extends DateRangeCalendarSlots, DigitalClockSlots, MultiSectionDigitalClockSlots {
15
16
  /**
16
17
  * Tabs enabling toggling between date and time pickers.
@@ -36,7 +37,7 @@ export interface BaseDateTimeRangePickerSlotProps extends DateRangeCalendarSlotP
36
37
  export type DateTimeRangePickerRenderers<TView extends DateOrTimeViewWithMeridiem, TAdditionalProps extends {} = {}> = PickerViewRendererLookup<PickerRangeValue, TView, Omit<DateRangeViewRendererProps<'day'>, 'view' | 'slots' | 'slotProps'> & Omit<TimeViewRendererProps<TimeViewWithMeridiem, BaseClockProps<TimeViewWithMeridiem>>, 'view' | 'slots' | 'slotProps'> & {
37
38
  view: TView;
38
39
  }, TAdditionalProps>;
39
- export interface BaseDateTimeRangePickerProps extends Omit<BasePickerInputProps<PickerRangeValue, DateTimeRangePickerView, DateTimeRangeValidationError>, 'orientation' | 'views' | 'openTo'>, ExportedDateRangeCalendarProps, BaseDateValidationProps, DesktopOnlyTimePickerProps, Partial<Pick<UseViewsOptions<PickerRangeValue, DateTimeRangePickerViewExternal>, 'openTo' | 'views'>>, DateTimeValidationProps {
40
+ export interface BaseDateTimeRangePickerProps extends Omit<BasePickerInputProps<PickerRangeValue, DateTimeRangePickerView, DateTimeRangeValidationError>, 'orientation' | 'views' | 'openTo'>, ExportedDateRangeCalendarProps, ExportedValidateDateTimeRangeProps, DesktopOnlyTimePickerProps, Partial<Pick<UseViewsOptions<PickerRangeValue, DateTimeRangePickerViewExternal>, 'openTo' | 'views'>> {
40
41
  /**
41
42
  * Overridable component slots.
42
43
  * @default {}
@@ -54,7 +55,7 @@ export interface BaseDateTimeRangePickerProps extends Omit<BasePickerInputProps<
54
55
  */
55
56
  viewRenderers?: Partial<DateTimeRangePickerRenderers<DateTimeRangePickerView>>;
56
57
  }
57
- type UseDateTimeRangePickerDefaultizedProps<Props extends BaseDateTimeRangePickerProps> = LocalizedComponent<Omit<DefaultizedProps<Props, 'openTo' | 'ampm' | keyof BaseDateValidationProps>, 'views'>> & {
58
+ type UseDateTimeRangePickerDefaultizedProps<Props extends BaseDateTimeRangePickerProps> = LocalizedComponent<Omit<DefaultizedProps<Props, 'openTo' | 'ampm' | ValidateDateTimeRangePropsToDefault>, 'views'>> & {
58
59
  shouldRenderTimeInASingleColumn: boolean;
59
60
  views: readonly DateTimeRangePickerView[];
60
61
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["slots", "slotProps", "unstableStartFieldRef", "unstableEndFieldRef", "className"];
5
+ const _excluded = ["slots", "slotProps", "unstableStartFieldRef", "unstableEndFieldRef", "className", "classes"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
@@ -12,17 +12,14 @@ import Typography from '@mui/material/Typography';
12
12
  import { styled, useThemeProps } from '@mui/material/styles';
13
13
  import useSlotProps from '@mui/utils/useSlotProps';
14
14
  import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
15
- import { convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
15
+ import { convertFieldResponseIntoMuiTextFieldProps, useFieldOwnerState } from '@mui/x-date-pickers/internals';
16
16
  import { useSplitFieldProps } from '@mui/x-date-pickers/hooks';
17
17
  import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
18
18
  import { useMultiInputDateRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js";
19
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
20
  export const multiInputDateRangeFieldClasses = generateUtilityClasses('MuiMultiInputDateRangeField', ['root', 'separator']);
21
21
  export const getMultiInputDateRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputDateRangeField', slot);
22
- const useUtilityClasses = ownerState => {
23
- const {
24
- classes
25
- } = ownerState;
22
+ const useUtilityClasses = classes => {
26
23
  const slots = {
27
24
  root: ['root'],
28
25
  separator: ['separator']
@@ -70,11 +67,12 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
70
67
  slotProps,
71
68
  unstableStartFieldRef,
72
69
  unstableEndFieldRef,
73
- className
70
+ className,
71
+ classes: classesProp
74
72
  } = forwardedProps,
75
73
  otherForwardedProps = _objectWithoutPropertiesLoose(forwardedProps, _excluded);
76
- const ownerState = themeProps;
77
- const classes = useUtilityClasses(ownerState);
74
+ const ownerState = useFieldOwnerState(internalProps);
75
+ const classes = useUtilityClasses(classesProp);
78
76
  const Root = slots?.root ?? MultiInputDateRangeFieldRoot;
79
77
  const rootProps = useSlotProps({
80
78
  elementType: Root,
@@ -258,10 +256,10 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
258
256
  */
259
257
  shouldDisableDate: PropTypes.func,
260
258
  /**
261
- * If `true`, the format will respect the leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
262
- * If `false`, the format will always add leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
259
+ * If `true`, the format will respect the leading zeroes (for example on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
260
+ * If `false`, the format will always add leading zeroes (for example on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
263
261
  *
264
- * 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`.
262
+ * 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`.
265
263
  *
266
264
  * 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.
267
265
  * If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\u200e/g, '')`.
@@ -1,8 +1,10 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/utils';
3
- import Typography from '@mui/material/Typography';
4
- import Stack, { StackProps } from '@mui/material/Stack';
5
- import TextField from '@mui/material/TextField';
2
+ import type { TypographyProps } from '@mui/material/Typography';
3
+ import type { StackProps } from '@mui/material/Stack';
4
+ import type { TextFieldProps } from '@mui/material/TextField';
5
+ import { FieldOwnerState } from '@mui/x-date-pickers/models';
6
+ import { SlotComponentPropsFromProps } from '@mui/x-internals/types';
7
+ import { PickersTextFieldProps } from '@mui/x-date-pickers/PickersTextField';
6
8
  import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
7
9
  import { MultiInputFieldRefs, MultiInputRangeFieldClasses, RangePosition, UseDateRangeFieldProps } from '../models';
8
10
  export type UseMultiInputDateRangeFieldParams<TEnableAccessibleFieldDOMStructure extends boolean, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>, TTextFieldSlotProps>;
@@ -24,7 +26,7 @@ export interface MultiInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructur
24
26
  * The props used for each component slot.
25
27
  * @default {}
26
28
  */
27
- slotProps?: MultiInputDateRangeFieldSlotProps<TEnableAccessibleFieldDOMStructure>;
29
+ slotProps?: MultiInputDateRangeFieldSlotProps;
28
30
  }
29
31
  export interface MultiInputDateRangeFieldSlots {
30
32
  /**
@@ -35,7 +37,7 @@ export interface MultiInputDateRangeFieldSlots {
35
37
  /**
36
38
  * Form control with an input to render a date.
37
39
  * It is rendered twice: once for the start date and once for the end date.
38
- * @default TextField from '@mui/material' or PickersTextField if `enableAccessibleFieldDOMStructure` is `true`.
40
+ * @default <PickersTextField />, or <TextField /> from '@mui/material' if `enableAccessibleFieldDOMStructure` is `false`.
39
41
  */
40
42
  textField?: React.ElementType;
41
43
  /**
@@ -44,10 +46,10 @@ export interface MultiInputDateRangeFieldSlots {
44
46
  */
45
47
  separator?: React.ElementType;
46
48
  }
47
- export interface MultiInputDateRangeFieldSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> {
48
- root?: SlotComponentProps<typeof Stack, {}, MultiInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>>;
49
- textField?: SlotComponentProps<typeof TextField, {}, MultiInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure> & {
49
+ export interface MultiInputDateRangeFieldSlotProps {
50
+ root?: SlotComponentPropsFromProps<StackProps, {}, FieldOwnerState>;
51
+ textField?: SlotComponentPropsFromProps<PickersTextFieldProps | TextFieldProps, {}, FieldOwnerState & {
50
52
  position: RangePosition;
51
53
  }>;
52
- separator?: SlotComponentProps<typeof Typography, {}, MultiInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>>;
54
+ separator?: SlotComponentPropsFromProps<TypographyProps, {}, FieldOwnerState>;
53
55
  }