@mui/x-date-pickers 7.17.0 → 7.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdapterDateFns/AdapterDateFns.js +1 -1
- package/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -0
- package/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -1
- package/AdapterMoment/AdapterMoment.js +1 -0
- package/CHANGELOG.md +208 -5
- package/DateCalendar/DateCalendar.js +9 -1
- package/DateField/useDateField.d.ts +1 -1
- package/DatePicker/DatePicker.js +6 -0
- package/DatePicker/DatePicker.types.d.ts +5 -5
- package/DateTimeField/useDateTimeField.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +6 -0
- package/DateTimePicker/DateTimePicker.types.d.ts +7 -6
- package/DateTimePicker/DateTimePickerTabs.js +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +6 -0
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +7 -6
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +6 -0
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +11 -10
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/MobileDatePicker/MobileDatePicker.js +6 -0
- package/MobileDatePicker/MobileDatePicker.types.d.ts +5 -0
- package/MobileDateTimePicker/MobileDateTimePicker.js +6 -0
- package/MonthCalendar/MonthCalendar.types.d.ts +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +1 -1
- package/PickersLayout/PickersLayout.d.ts +2 -2
- package/PickersLayout/PickersLayout.js +1 -1
- package/PickersSectionList/PickersSectionList.d.ts +4 -4
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +2 -2
- package/StaticDatePicker/StaticDatePicker.js +7 -1
- package/StaticDatePicker/StaticDatePicker.types.d.ts +5 -0
- package/StaticDateTimePicker/StaticDateTimePicker.js +7 -1
- package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +5 -0
- package/TimeClock/Clock.js +1 -1
- package/TimeClock/ClockNumber.js +1 -1
- package/TimeClock/ClockPointer.js +1 -1
- package/TimeField/useTimeField.d.ts +1 -1
- package/YearCalendar/YearCalendar.js +19 -6
- package/YearCalendar/YearCalendar.types.d.ts +7 -1
- package/dateViewRenderers/dateViewRenderers.d.ts +1 -1
- package/dateViewRenderers/dateViewRenderers.js +2 -0
- package/index.js +1 -1
- package/internals/components/PickerViewRoot/PickerViewRoot.d.ts +1 -1
- package/internals/components/PickersToolbarButton.js +1 -1
- package/internals/components/PickersToolbarText.js +1 -1
- package/locales/bgBG.d.ts +80 -0
- package/locales/bgBG.js +73 -0
- package/locales/csCZ.js +16 -20
- package/locales/hrHR.d.ts +80 -0
- package/locales/hrHR.js +90 -0
- package/locales/index.d.ts +3 -0
- package/locales/index.js +3 -0
- package/locales/ptBR.js +3 -4
- package/locales/ptPT.d.ts +80 -0
- package/locales/ptPT.js +73 -0
- package/models/pickers.d.ts +1 -1
- package/modern/AdapterDateFns/AdapterDateFns.js +1 -1
- package/modern/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -0
- package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -1
- package/modern/AdapterMoment/AdapterMoment.js +1 -0
- package/modern/DateCalendar/DateCalendar.js +9 -1
- package/modern/DatePicker/DatePicker.js +6 -0
- package/modern/DateTimePicker/DateTimePicker.js +6 -0
- package/modern/DateTimePicker/DateTimePickerTabs.js +1 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +6 -0
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +6 -0
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +6 -0
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +6 -0
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/modern/PickersLayout/PickersLayout.js +1 -1
- package/modern/StaticDatePicker/StaticDatePicker.js +7 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +7 -1
- package/modern/TimeClock/Clock.js +1 -1
- package/modern/TimeClock/ClockNumber.js +1 -1
- package/modern/TimeClock/ClockPointer.js +1 -1
- package/modern/YearCalendar/YearCalendar.js +19 -6
- package/modern/dateViewRenderers/dateViewRenderers.js +2 -0
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersToolbarButton.js +1 -1
- package/modern/internals/components/PickersToolbarText.js +1 -1
- package/modern/locales/bgBG.js +73 -0
- package/modern/locales/csCZ.js +16 -20
- package/modern/locales/hrHR.js +90 -0
- package/modern/locales/index.js +3 -0
- package/modern/locales/ptBR.js +3 -4
- package/modern/locales/ptPT.js +73 -0
- package/node/AdapterDateFns/AdapterDateFns.js +1 -1
- package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -0
- package/node/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -1
- package/node/AdapterMoment/AdapterMoment.js +1 -0
- package/node/DateCalendar/DateCalendar.js +9 -1
- package/node/DatePicker/DatePicker.js +6 -0
- package/node/DateTimePicker/DateTimePicker.js +6 -0
- package/node/DateTimePicker/DateTimePickerTabs.js +1 -1
- package/node/DesktopDatePicker/DesktopDatePicker.js +6 -0
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +6 -0
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/node/MobileDatePicker/MobileDatePicker.js +6 -0
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +6 -0
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/node/PickersLayout/PickersLayout.js +1 -1
- package/node/StaticDatePicker/StaticDatePicker.js +7 -1
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +7 -1
- package/node/TimeClock/Clock.js +1 -1
- package/node/TimeClock/ClockNumber.js +1 -1
- package/node/TimeClock/ClockPointer.js +1 -1
- package/node/YearCalendar/YearCalendar.js +19 -6
- package/node/dateViewRenderers/dateViewRenderers.js +2 -0
- package/node/index.js +1 -1
- package/node/internals/components/PickersToolbarButton.js +1 -1
- package/node/internals/components/PickersToolbarText.js +1 -1
- package/node/locales/bgBG.js +79 -0
- package/node/locales/csCZ.js +16 -20
- package/node/locales/hrHR.js +96 -0
- package/node/locales/index.js +33 -0
- package/node/locales/ptBR.js +3 -4
- package/node/locales/ptPT.js +79 -0
- package/package.json +4 -4
|
@@ -78,7 +78,7 @@ export class AdapterDateFns extends AdapterDateFnsBase {
|
|
|
78
78
|
/* istanbul ignore next */
|
|
79
79
|
if (process.env.NODE_ENV !== 'production') {
|
|
80
80
|
if (typeof addDays !== 'function') {
|
|
81
|
-
throw new Error(['MUI:
|
|
81
|
+
throw new Error(['MUI: This adapter is only compatible with `date-fns` v2.x package versions.', 'Please, install v2.x of the package or use the `AdapterDateFnsV3` instead.'].join('\n'));
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
super({
|
|
@@ -82,7 +82,7 @@ export class AdapterDateFns extends AdapterDateFnsBase {
|
|
|
82
82
|
/* istanbul ignore next */
|
|
83
83
|
if (process.env.NODE_ENV !== 'production') {
|
|
84
84
|
if (typeof addDays !== 'function') {
|
|
85
|
-
throw new Error([`MUI: The \`date-fns\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x of the package or use the `AdapterDateFns` instead.'].join('\n'));
|
|
85
|
+
throw new Error([`MUI: The \`date-fns\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x or v4.x of the package or use the `AdapterDateFns` instead.'].join('\n'));
|
|
86
86
|
}
|
|
87
87
|
if (!longFormatters) {
|
|
88
88
|
throw new Error('MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.');
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,209 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.19.0
|
|
7
|
+
|
|
8
|
+
_Oct 4, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 26 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🔁 Automatic parents and children selection for Data Grid ["tree data"](https://mui.com/x/react-data-grid/tree-data/) and ["row grouping"](https://mui.com/x/react-data-grid/row-grouping/) features
|
|
13
|
+
- 💫 Support `minHeight` and `maxHeight` on flex parent container for the Data Grid component
|
|
14
|
+
- 🎁 Export `publicAPI` from the `useTreeItem2Utils` hook for the Tree View
|
|
15
|
+
- 🌍 Improve Bulgarian (bg-BG), Croatian (hr-HR), French (fr-FR), German (de-DE), Japanese (ja-JP) and Vietnamese (vi-VN) locales and add Portuguese (pt-PT) locale on the Data Grid component
|
|
16
|
+
- 🌏 Improve Czech (cs-CZ) and Portuguese (pt-BR) locales and add Bulgarian (bg-BG), Croatian (hr-HR) and Portuguese (pt-PT) locales on the Pickers components
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
- 📚 Documentation improvements
|
|
19
|
+
|
|
20
|
+
Special thanks goes out to our community contributors who have helped make this release possible:
|
|
21
|
+
@AWAIS97, @chucamphong, @GMchris, @JakubSveda, @k-rajat19, @k725, @lhilgert9, @ruiaraujo012, @Sanderand, @thomasmoon, @vallereaugabriel.
|
|
22
|
+
Following are all team members who have contributed to this release:
|
|
23
|
+
@alexfauquette, @arminmeh, @arthurbalduini, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @MBilalShafi, @michelengelen, @noraleonte, @oliviertassinari, @romgrk, @sai6855, @samuelsycamore.
|
|
24
|
+
|
|
25
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
26
|
+
|
|
27
|
+
### Data Grid
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid@7.19.0`
|
|
30
|
+
|
|
31
|
+
- [DataGrid] Fix column definition `undefined` value (#14456) @sai6855
|
|
32
|
+
- [DataGrid] Fix `checkboxSelectionVisibleOnly` reset the selection on filtering (#14677) @MBilalShafi
|
|
33
|
+
- [DataGrid] Fix background colors when `CSSVarsProvider` is used (#12901) @cherniavskii
|
|
34
|
+
- [DataGrid] Fix error when initializing aggregation with row spanning (#14710) @MBilalShafi
|
|
35
|
+
- [DataGrid] Fix scroll to cell logic for keyboard navigating cells and drag selection with pinned columns (#14550) @KenanYusuf
|
|
36
|
+
- [DataGrid] Support `minHeight` and `maxHeight` on flex parent container (#14614) @cherniavskii
|
|
37
|
+
- [l10n] Add missing Portuguese (pt-PT) translations (#14707) @ruiaraujo012
|
|
38
|
+
- [l10n] Improve Bulgarian (bg-BG) locale (#14451) @GMchris
|
|
39
|
+
- [l10n] Improve Croatian (hr-HR) locale (#14794) @arminmeh
|
|
40
|
+
- [l10n] Improve French (fr-FR) locale (#14750) @vallereaugabriel
|
|
41
|
+
- [l10n] Improve German (de-DE) locale (#14755) @lhilgert9
|
|
42
|
+
- [l10n] Improve Japanese (ja-JP) locale (#14381) @k725
|
|
43
|
+
- [l10n] Improve Vietnamese (vi-VN) locale (#14769) @chucamphong
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-data-grid-pro@7.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-data-grid@7.19.0`, plus:
|
|
48
|
+
|
|
49
|
+
- [DataGridPro] Fix dragging styles removal in column reorder (#14680) @k-rajat19
|
|
50
|
+
- [DataGridPro] Fix row pre-processing running with a stale data source (#14810) @MBilalShafi
|
|
51
|
+
- [DataGridPro] Fix `onRowsScrollEnd` not firing on very fast scrolling (#14171) @arminmeh
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-data-grid-premium@7.19.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
54
|
+
|
|
55
|
+
Same changes as in `@mui/x-data-grid-pro@7.19.0`, plus:
|
|
56
|
+
|
|
57
|
+
- [DataGridPremium] Automatic parents and children selection (#13757) @MBilalShafi
|
|
58
|
+
|
|
59
|
+
### Date and Time Pickers
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-date-pickers@7.19.0`
|
|
62
|
+
|
|
63
|
+
- [pickers] Fix left-right keyboard nav with `yearsOrder="desc"` and `direction="rtl"` (#14682) @thomasmoon
|
|
64
|
+
- [pickers] Improve `PickerValidDate` type (#14771) @flaviendelangle
|
|
65
|
+
- [pickers] Improve typing of the range pickers (#14716) @flaviendelangle
|
|
66
|
+
- [l10n] Add Bulgarian (bg-BG) locale (#14469) @GMchris
|
|
67
|
+
- [l10n] Add Croatian (hr-HR) locale (#14795) @arminmeh
|
|
68
|
+
- [l10n] Add Portuguese (pt-PT) locale (#14722) @ruiaraujo012
|
|
69
|
+
- [l10n] Improve Czech (cs-CZ) locale (#14732) @JakubSveda
|
|
70
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#14725) @arthurbalduini
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-date-pickers-pro@7.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
73
|
+
|
|
74
|
+
Same changes as in `@mui/x-date-pickers@7.19.0`.
|
|
75
|
+
|
|
76
|
+
### Charts
|
|
77
|
+
|
|
78
|
+
#### `@mui/x-charts@7.19.0`
|
|
79
|
+
|
|
80
|
+
- [charts] Fix `LineChart` area animation being stuck when resizing container (#14711) @alexfauquette
|
|
81
|
+
- [charts] Improve types and start using `warnOnce` (#14792) @JCQuintas
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-charts-pro@7.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
84
|
+
|
|
85
|
+
Same changes as in `@mui/x-charts@7.19.0`.
|
|
86
|
+
|
|
87
|
+
### Tree View
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-tree-view@7.19.0`
|
|
90
|
+
|
|
91
|
+
- [TreeView] Apply experimental features in `getDefaultizedParams` instead of in the plugin render (#14661) @flaviendelangle
|
|
92
|
+
- [TreeView] Export `publicAPI` form `useTreeItem2Utils` (#14729) @noraleonte
|
|
93
|
+
- [TreeView] Fix cursor navigation interfering with browser shortcut keys (#14798) @sai6855
|
|
94
|
+
- [TreeView] Fix invalid test for items reordering (#14665) @flaviendelangle
|
|
95
|
+
- [TreeView] Remove `instance.getTreeItemIdAttribute` (#14667) @flaviendelangle
|
|
96
|
+
|
|
97
|
+
### Docs
|
|
98
|
+
|
|
99
|
+
- [docs] Added warning callout for Firefox reordering bug (#14516) @michelengelen
|
|
100
|
+
- [docs] Copyedit `pages.ts` navigation (#14782) @samuelsycamore
|
|
101
|
+
- [docs] Fix typo in row spanning doc (#14770) @flaviendelangle
|
|
102
|
+
- [docs] Fix typo in the Tree View migration guide to v7 (#14727) @Sanderand
|
|
103
|
+
- [docs] Fix typo in usage of Moment guide for UTC and timezones (#14780) @AWAIS97
|
|
104
|
+
- [docs] Fix what's new link to use absolute URL (#14543) @oliviertassinari
|
|
105
|
+
|
|
106
|
+
### Core
|
|
107
|
+
|
|
108
|
+
- [core] Fix class name composition order (#14775) @oliviertassinari
|
|
109
|
+
- [core] Replace minWidth, maxWidth with width (#14776) @oliviertassinari
|
|
110
|
+
- [code-infra] Remove custom playwright installation steps (#14728) @Janpot
|
|
111
|
+
- [code-infra] Replace or remove all instances of `e` identifier (#14724) @samuelsycamore
|
|
112
|
+
- [infra] Adds community contribution section to the changelog script (#14799) @michelengelen
|
|
113
|
+
- [infra] Fix line break in Stack Overflow message @oliviertassinari
|
|
114
|
+
- [test] Fix `Escape` event firing event (#14797) @oliviertassinari
|
|
115
|
+
|
|
116
|
+
## 7.18.0
|
|
117
|
+
|
|
118
|
+
_Sep 20, 2024_
|
|
119
|
+
|
|
120
|
+
We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
121
|
+
|
|
122
|
+
- 💫 Support [Row spanning](https://mui.com/x/react-data-grid/row-spanning/) on the Data Grid that automatically merges the consecutive cells in a column based on the cell value
|
|
123
|
+
|
|
124
|
+
<img width="600" src="https://github.com/user-attachments/assets/d32ec936-d238-4c92-9e1a-af6788d74cdf" alt="data grid row spanning" />
|
|
125
|
+
|
|
126
|
+
- ⏰ Support `date-fns` v4 (#14673) @LukasTy
|
|
127
|
+
- 🎉 Add option for Pickers to change the order of displayed years (#11780) @thomasmoon
|
|
128
|
+
- 🐞 Bugfixes
|
|
129
|
+
- 📚 Documentation improvements
|
|
130
|
+
|
|
131
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
132
|
+
|
|
133
|
+
### Data Grid
|
|
134
|
+
|
|
135
|
+
#### `@mui/x-data-grid@7.18.0`
|
|
136
|
+
|
|
137
|
+
- [DataGrid] Add default reset value in row edit mode (#14050) @michelengelen
|
|
138
|
+
- [DataGrid] Add `columnGroupHeaderHeight` prop for sizing column group headers (#14637) @KenanYusuf
|
|
139
|
+
- [DataGrid] Fix `document` reference when the grid is rendered in a popup window (#14649) @arminmeh
|
|
140
|
+
- [DataGrid] Remove `minFirstColumn` from `GetHeadersParams` interface (#14450) @k-rajat19
|
|
141
|
+
- [DataGrid] Row spanning (#14124) @MBilalShafi
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-data-grid-pro@7.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-data-grid@7.18.0`, plus:
|
|
146
|
+
|
|
147
|
+
- [DataGridPro] Fix `onRowsScrollEnd` being triggered instantly when bottom pinned row is present (#14602) @arminmeh
|
|
148
|
+
- [DataGridPro] Fix header filters rendering issue for `isEmpty` and `isNotEmpty` filter operators (#14493) @k-rajat19
|
|
149
|
+
- [DataGridPro] Fix pinned columns in RTL mode (#14586) @KenanYusuf
|
|
150
|
+
|
|
151
|
+
#### `@mui/x-data-grid-premium@7.18.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
152
|
+
|
|
153
|
+
Same changes as in `@mui/x-data-grid-pro@7.18.0`.
|
|
154
|
+
|
|
155
|
+
### Date and Time Pickers
|
|
156
|
+
|
|
157
|
+
#### `@mui/x-date-pickers@7.18.0`
|
|
158
|
+
|
|
159
|
+
- [pickers] Add option to change the order of displayed years (#11780) @thomasmoon
|
|
160
|
+
- [pickers] Support `date-fns` v4 (#14673) @LukasTy
|
|
161
|
+
|
|
162
|
+
#### `@mui/x-date-pickers-pro@7.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
163
|
+
|
|
164
|
+
Same changes as in `@mui/x-date-pickers@7.18.0`.
|
|
165
|
+
|
|
166
|
+
### Charts
|
|
167
|
+
|
|
168
|
+
#### `@mui/x-charts@7.18.0`
|
|
169
|
+
|
|
170
|
+
- [charts] Add a `PolarProvider` to manage polar axes (#14642) @alexfauquette
|
|
171
|
+
- [charts] Fix `LineChart` animation being stuck with initial drawing area value (#14553) @JCQuintas
|
|
172
|
+
- [charts] Fix legend slot typing (#14657) @alexfauquette
|
|
173
|
+
- [charts] Pass the axis index to extremum getter (#14641) @alexfauquette
|
|
174
|
+
- [charts] Provide hooks to create custom tooltip (#14377) @alexfauquette
|
|
175
|
+
|
|
176
|
+
#### `@mui/x-charts-pro@7.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
177
|
+
|
|
178
|
+
Same changes as in `@mui/x-charts@7.18.0`.
|
|
179
|
+
|
|
180
|
+
### Tree View
|
|
181
|
+
|
|
182
|
+
#### `@mui/x-tree-view@7.18.0`
|
|
183
|
+
|
|
184
|
+
- [TreeView] Add `"use client"` directive to every public component and hook (#14579) @flaviendelangle
|
|
185
|
+
|
|
186
|
+
### Docs
|
|
187
|
+
|
|
188
|
+
- [docs] Add `groupingValueGetter` callout in column definition docs (#14599) @michelengelen
|
|
189
|
+
- [docs] Clean v6 => v7 migration guide (#14652) @flaviendelangle
|
|
190
|
+
- [docs] Copy `vale-action.yml` from main repo @oliviertassinari
|
|
191
|
+
- [docs] Edit the Pickers Getting started doc (#14555) @samuelsycamore
|
|
192
|
+
- [docs] Fix TypeScript capitalization @oliviertassinari
|
|
193
|
+
- [docs] Fix Vale error @oliviertassinari
|
|
194
|
+
- [docs] Make the migration guide diff a bit easier to read @oliviertassinari
|
|
195
|
+
- [docs] Report Vale at warning level (#14660) @oliviertassinari
|
|
196
|
+
- [docs] Warn about the `valueGetter` and `valueFormatter` signature change (#14613) @cherniavskii
|
|
197
|
+
- [docs] Polish code formatting (#14603) @oliviertassinari
|
|
198
|
+
- [test] Spy on `observe` method to avoid flaky wait for a callback (#14640) @arminmeh
|
|
199
|
+
|
|
200
|
+
### Core
|
|
201
|
+
|
|
202
|
+
- [core] Fix 301 link to Next.js and git diff @oliviertassinari
|
|
203
|
+
- [core] Fix failing CI on `master` (#14644) @cherniavskii
|
|
204
|
+
- [core] Fix `package.json` repository rule @oliviertassinari
|
|
205
|
+
- [core] MUI X repository moved to a new location @oliviertassinari
|
|
206
|
+
- [docs-infra] Strengthen CSP (#14581) @oliviertassinari
|
|
207
|
+
- [license] Finish renaming of LicensingModel (#14615) @oliviertassinari
|
|
208
|
+
|
|
6
209
|
## 7.17.0
|
|
7
210
|
|
|
8
211
|
_Sep 13, 2024_
|
|
@@ -75,7 +278,7 @@ Same changes as in `@mui/x-charts@7.17.0`.
|
|
|
75
278
|
### Docs
|
|
76
279
|
|
|
77
280
|
- [docs] Add missing callout on "Imperative API" tree view sections (#14503) @flaviendelangle
|
|
78
|
-
- [docs] Fix broken redirection to MUI
|
|
281
|
+
- [docs] Fix broken redirection to MUI X v5 @oliviertassinari
|
|
79
282
|
- [docs] Fix multiple `console.error` messages on `charts` docs (#14554) @JCQuintas
|
|
80
283
|
- [docs] Fixed typo in Row Grouping recipes (#14549) @Miodini
|
|
81
284
|
- [docs] Match title with blog posts @oliviertassinari
|
|
@@ -195,7 +398,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
195
398
|
|
|
196
399
|
- 💫 Support Material UI v6 (`@mui/material@6`) peer dependency (#14142) @cherniavskii
|
|
197
400
|
|
|
198
|
-
You can now use MUI
|
|
401
|
+
You can now use MUI X components with either v5 or v6 of `@mui/material` package 🎉
|
|
199
402
|
|
|
200
403
|
- 🐞 Bugfixes
|
|
201
404
|
|
|
@@ -240,7 +443,7 @@ Same changes as in `@mui/x-charts@7.15.0`, plus:
|
|
|
240
443
|
|
|
241
444
|
- [docs] Fix sentence case `h2` @oliviertassinari
|
|
242
445
|
- [docs] Clarify contribution guide references @oliviertassinari
|
|
243
|
-
- [docs] Fix Stack
|
|
446
|
+
- [docs] Fix Stack Overflow issue canned response @oliviertassinari
|
|
244
447
|
- [docs] Fix outdated link to support page @oliviertassinari
|
|
245
448
|
- [docs] Fix use of Material UI @oliviertassinari
|
|
246
449
|
- [docs] Update deprecated props in docs (#14295) @JCQuintas
|
|
@@ -498,7 +701,7 @@ The [Pro plan](https://mui.com/x/introduction/licensing/#pro-plan) is receiving
|
|
|
498
701
|
|
|
499
702
|
As always, every feature released as part of the MIT plan will remain free and MIT licensed forever.
|
|
500
703
|
|
|
501
|
-
This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI
|
|
704
|
+
This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI X pricing in 2024](https://mui.com/blog/mui-x-sep-2024-price-update/) blog post.
|
|
502
705
|
|
|
503
706
|
### Highlights
|
|
504
707
|
|
|
@@ -563,7 +766,7 @@ Same changes as in `@mui/x-date-pickers@7.12.0`.
|
|
|
563
766
|
#### `@mui/x-charts@7.12.0`
|
|
564
767
|
|
|
565
768
|
- [charts] Fix incorrect `axisId` prop being allowed in xAxis/yAxis config. Use `id` instead. (#13986) @JCQuintas
|
|
566
|
-
- [charts] Use vendor to have
|
|
769
|
+
- [charts] Use vendor to have CommonJS bundle working out of the box (#13608) @alexfauquette
|
|
567
770
|
- [charts] Divide the `SeriesProvider` to use in filtering (#14026) @JCQuintas
|
|
568
771
|
|
|
569
772
|
### Tree View
|
|
@@ -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 = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsPerRow", "monthsPerRow", "timezone"];
|
|
5
|
+
const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsOrder", "yearsPerRow", "monthsPerRow", "timezone"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -120,6 +120,7 @@ export const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(
|
|
|
120
120
|
loading,
|
|
121
121
|
renderLoading,
|
|
122
122
|
displayWeekNumber,
|
|
123
|
+
yearsOrder,
|
|
123
124
|
yearsPerRow,
|
|
124
125
|
monthsPerRow,
|
|
125
126
|
timezone: timezoneProp
|
|
@@ -311,6 +312,7 @@ export const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(
|
|
|
311
312
|
shouldDisableYear: shouldDisableYear,
|
|
312
313
|
hasFocus: hasFocus,
|
|
313
314
|
onFocusedViewChange: isViewFocused => setFocusedView('year', isViewFocused),
|
|
315
|
+
yearsOrder: yearsOrder,
|
|
314
316
|
yearsPerRow: yearsPerRow,
|
|
315
317
|
referenceDate: referenceDate
|
|
316
318
|
})), view === 'month' && /*#__PURE__*/_jsx(MonthCalendar, _extends({}, baseDateValidationProps, commonViewProps, {
|
|
@@ -560,6 +562,12 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
|
|
|
560
562
|
* Available views.
|
|
561
563
|
*/
|
|
562
564
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),
|
|
565
|
+
/**
|
|
566
|
+
* Years are displayed in ascending (chronological) order by default.
|
|
567
|
+
* If `desc`, years are displayed in descending order.
|
|
568
|
+
* @default 'asc'
|
|
569
|
+
*/
|
|
570
|
+
yearsOrder: PropTypes.oneOf(['asc', 'desc']),
|
|
563
571
|
/**
|
|
564
572
|
* Years rendered per row.
|
|
565
573
|
* @default 3
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UseDateFieldProps } from './DateField.types';
|
|
2
2
|
import { PickerValidDate } from '../models';
|
|
3
|
-
export declare const useDateField: <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseDateFieldProps<TDate, TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("../internals
|
|
3
|
+
export declare const useDateField: <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseDateFieldProps<TDate, TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("../internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseDateFieldProps<TDate, TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps<any>> & Required<Pick<UseDateFieldProps<TDate, TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps<any>>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "timezone" | "referenceDate" | "formatDensity" | "shouldRespectLeadingZeros" | "selectedSections" | "onSelectedSectionsChange" | "unstableFieldRef" | "enableAccessibleFieldDOMStructure" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | keyof import("../internals").BaseDateValidationProps<any> | "dateSeparator">>;
|
package/DatePicker/DatePicker.js
CHANGED
|
@@ -351,6 +351,12 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
351
351
|
* Available views.
|
|
352
352
|
*/
|
|
353
353
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),
|
|
354
|
+
/**
|
|
355
|
+
* Years are displayed in ascending (chronological) order by default.
|
|
356
|
+
* If `desc`, years are displayed in descending order.
|
|
357
|
+
* @default 'asc'
|
|
358
|
+
*/
|
|
359
|
+
yearsOrder: PropTypes.oneOf(['asc', 'desc']),
|
|
354
360
|
/**
|
|
355
361
|
* Years rendered per row.
|
|
356
362
|
* @default 4 on desktop, 3 on mobile
|
|
@@ -12,11 +12,6 @@ export interface DatePickerProps<TDate extends PickerValidDate, TEnableAccessibl
|
|
|
12
12
|
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
13
13
|
*/
|
|
14
14
|
desktopModeMediaQuery?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Years rendered per row.
|
|
17
|
-
* @default 4 on desktop, 3 on mobile
|
|
18
|
-
*/
|
|
19
|
-
yearsPerRow?: 3 | 4;
|
|
20
15
|
/**
|
|
21
16
|
* Overridable component slots.
|
|
22
17
|
* @default {}
|
|
@@ -27,4 +22,9 @@ export interface DatePickerProps<TDate extends PickerValidDate, TEnableAccessibl
|
|
|
27
22
|
* @default {}
|
|
28
23
|
*/
|
|
29
24
|
slotProps?: DatePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
|
|
25
|
+
/**
|
|
26
|
+
* Years rendered per row.
|
|
27
|
+
* @default 4 on desktop, 3 on mobile
|
|
28
|
+
*/
|
|
29
|
+
yearsPerRow?: 3 | 4;
|
|
30
30
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UseDateTimeFieldProps } from './DateTimeField.types';
|
|
2
2
|
import { PickerValidDate } from '../models';
|
|
3
|
-
export declare const useDateTimeField: <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseDateTimeFieldProps<TDate, TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("../internals
|
|
3
|
+
export declare const useDateTimeField: <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseDateTimeFieldProps<TDate, TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("../internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseDateTimeFieldProps<TDate, TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps<any>> & Required<Pick<UseDateTimeFieldProps<TDate, TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps<any>>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "minDate" | "maxDate" | "ampm" | "disableFuture" | "disablePast" | "timezone" | "referenceDate" | "formatDensity" | "shouldRespectLeadingZeros" | "selectedSections" | "onSelectedSectionsChange" | "unstableFieldRef" | "enableAccessibleFieldDOMStructure" | "minutesStep" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "minTime" | "maxTime" | "shouldDisableTime" | "disableIgnoringDatePartForTimeValidation" | "minDateTime" | "maxDateTime" | "dateSeparator">>;
|
|
@@ -422,6 +422,12 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
422
422
|
* Available views.
|
|
423
423
|
*/
|
|
424
424
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired),
|
|
425
|
+
/**
|
|
426
|
+
* Years are displayed in ascending (chronological) order by default.
|
|
427
|
+
* If `desc`, years are displayed in descending order.
|
|
428
|
+
* @default 'asc'
|
|
429
|
+
*/
|
|
430
|
+
yearsOrder: PropTypes.oneOf(['asc', 'desc']),
|
|
425
431
|
/**
|
|
426
432
|
* Years rendered per row.
|
|
427
433
|
* @default 4 on desktop, 3 on mobile
|
|
@@ -2,22 +2,18 @@ import { DesktopDateTimePickerProps, DesktopDateTimePickerSlots, DesktopDateTime
|
|
|
2
2
|
import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
3
3
|
import { MobileDateTimePickerProps, MobileDateTimePickerSlots, MobileDateTimePickerSlotProps } from '../MobileDateTimePicker';
|
|
4
4
|
import { PickerValidDate } from '../models';
|
|
5
|
+
import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
|
|
5
6
|
export interface DateTimePickerSlots<TDate extends PickerValidDate> extends DesktopDateTimePickerSlots<TDate>, MobileDateTimePickerSlots<TDate, DateOrTimeViewWithMeridiem> {
|
|
6
7
|
}
|
|
7
8
|
export interface DateTimePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends DesktopDateTimePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>, MobileDateTimePickerSlotProps<TDate, DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure> {
|
|
8
9
|
}
|
|
9
|
-
export interface DateTimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends DesktopDateTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>, Omit<MobileDateTimePickerProps<TDate, DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure>, 'views'> {
|
|
10
|
+
export interface DateTimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends DesktopDateTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>, ExportedYearCalendarProps, Omit<MobileDateTimePickerProps<TDate, DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure>, 'views'> {
|
|
10
11
|
/**
|
|
11
12
|
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
12
13
|
* @default '@media (pointer: fine)'
|
|
13
14
|
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
14
15
|
*/
|
|
15
16
|
desktopModeMediaQuery?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Years rendered per row.
|
|
18
|
-
* @default 4 on desktop, 3 on mobile
|
|
19
|
-
*/
|
|
20
|
-
yearsPerRow?: 3 | 4;
|
|
21
17
|
/**
|
|
22
18
|
* Overridable component slots.
|
|
23
19
|
* @default {}
|
|
@@ -28,4 +24,9 @@ export interface DateTimePickerProps<TDate extends PickerValidDate, TEnableAcces
|
|
|
28
24
|
* @default {}
|
|
29
25
|
*/
|
|
30
26
|
slotProps?: DateTimePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
|
|
27
|
+
/**
|
|
28
|
+
* Years rendered per row.
|
|
29
|
+
* @default 4 on desktop, 3 on mobile
|
|
30
|
+
*/
|
|
31
|
+
yearsPerRow?: 3 | 4;
|
|
31
32
|
}
|
|
@@ -87,7 +87,7 @@ const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
|
|
|
87
87
|
variant: "fullWidth",
|
|
88
88
|
value: viewToTab(view),
|
|
89
89
|
onChange: handleChange,
|
|
90
|
-
className: clsx(
|
|
90
|
+
className: clsx(classes.root, className),
|
|
91
91
|
sx: sx,
|
|
92
92
|
children: [/*#__PURE__*/_jsx(Tab, {
|
|
93
93
|
value: "date",
|
|
@@ -372,6 +372,12 @@ DesktopDatePicker.propTypes = {
|
|
|
372
372
|
* Available views.
|
|
373
373
|
*/
|
|
374
374
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),
|
|
375
|
+
/**
|
|
376
|
+
* Years are displayed in ascending (chronological) order by default.
|
|
377
|
+
* If `desc`, years are displayed in descending order.
|
|
378
|
+
* @default 'asc'
|
|
379
|
+
*/
|
|
380
|
+
yearsOrder: PropTypes.oneOf(['asc', 'desc']),
|
|
375
381
|
/**
|
|
376
382
|
* Years rendered per row.
|
|
377
383
|
* @default 4
|
|
@@ -2,16 +2,12 @@ import { UseDesktopPickerSlots, ExportedUseDesktopPickerSlotProps, DesktopOnlyPi
|
|
|
2
2
|
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from '../DatePicker/shared';
|
|
3
3
|
import { MakeOptional } from '../internals/models/helpers';
|
|
4
4
|
import { DateView, PickerValidDate } from '../models';
|
|
5
|
+
import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
|
|
5
6
|
export interface DesktopDatePickerSlots<TDate extends PickerValidDate> extends BaseDatePickerSlots<TDate>, MakeOptional<UseDesktopPickerSlots<TDate, DateView>, 'field' | 'openPickerIcon'> {
|
|
6
7
|
}
|
|
7
8
|
export interface DesktopDatePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDatePickerSlotProps<TDate>, ExportedUseDesktopPickerSlotProps<TDate, DateView, TEnableAccessibleFieldDOMStructure> {
|
|
8
9
|
}
|
|
9
|
-
export interface DesktopDatePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDatePickerProps<TDate>, DesktopOnlyPickerProps {
|
|
10
|
-
/**
|
|
11
|
-
* Years rendered per row.
|
|
12
|
-
* @default 4
|
|
13
|
-
*/
|
|
14
|
-
yearsPerRow?: 3 | 4;
|
|
10
|
+
export interface DesktopDatePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDatePickerProps<TDate>, DesktopOnlyPickerProps, ExportedYearCalendarProps {
|
|
15
11
|
/**
|
|
16
12
|
* Overridable component slots.
|
|
17
13
|
* @default {}
|
|
@@ -22,4 +18,9 @@ export interface DesktopDatePickerProps<TDate extends PickerValidDate, TEnableAc
|
|
|
22
18
|
* @default {}
|
|
23
19
|
*/
|
|
24
20
|
slotProps?: DesktopDatePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
|
|
21
|
+
/**
|
|
22
|
+
* Years rendered per row.
|
|
23
|
+
* @default 4
|
|
24
|
+
*/
|
|
25
|
+
yearsPerRow?: 3 | 4;
|
|
25
26
|
}
|
|
@@ -530,6 +530,12 @@ DesktopDateTimePicker.propTypes = {
|
|
|
530
530
|
* Available views.
|
|
531
531
|
*/
|
|
532
532
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired),
|
|
533
|
+
/**
|
|
534
|
+
* Years are displayed in ascending (chronological) order by default.
|
|
535
|
+
* If `desc`, years are displayed in descending order.
|
|
536
|
+
* @default 'asc'
|
|
537
|
+
*/
|
|
538
|
+
yearsOrder: PropTypes.oneOf(['asc', 'desc']),
|
|
533
539
|
/**
|
|
534
540
|
* Years rendered per row.
|
|
535
541
|
* @default 4
|
|
@@ -6,20 +6,12 @@ import { DesktopOnlyTimePickerProps } from '../internals/models/props/clock';
|
|
|
6
6
|
import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
7
7
|
import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from '../MultiSectionDigitalClock';
|
|
8
8
|
import { DigitalClockSlots, DigitalClockSlotProps } from '../DigitalClock';
|
|
9
|
+
import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
|
|
9
10
|
export interface DesktopDateTimePickerSlots<TDate extends PickerValidDate> extends BaseDateTimePickerSlots<TDate>, MakeOptional<UseDesktopPickerSlots<TDate, DateOrTimeViewWithMeridiem>, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {
|
|
10
11
|
}
|
|
11
12
|
export interface DesktopDateTimePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateTimePickerSlotProps<TDate>, ExportedUseDesktopPickerSlotProps<TDate, DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure>, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {
|
|
12
13
|
}
|
|
13
|
-
export interface DesktopDateTimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateTimePickerProps<TDate, DateOrTimeViewWithMeridiem>, DesktopOnlyPickerProps, DesktopOnlyTimePickerProps<TDate
|
|
14
|
-
/**
|
|
15
|
-
* Available views.
|
|
16
|
-
*/
|
|
17
|
-
views?: readonly DateOrTimeView[];
|
|
18
|
-
/**
|
|
19
|
-
* Years rendered per row.
|
|
20
|
-
* @default 4
|
|
21
|
-
*/
|
|
22
|
-
yearsPerRow?: 3 | 4;
|
|
14
|
+
export interface DesktopDateTimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateTimePickerProps<TDate, DateOrTimeViewWithMeridiem>, DesktopOnlyPickerProps, DesktopOnlyTimePickerProps<TDate>, ExportedYearCalendarProps {
|
|
23
15
|
/**
|
|
24
16
|
* Overridable component slots.
|
|
25
17
|
* @default {}
|
|
@@ -30,4 +22,13 @@ export interface DesktopDateTimePickerProps<TDate extends PickerValidDate, TEnab
|
|
|
30
22
|
* @default {}
|
|
31
23
|
*/
|
|
32
24
|
slotProps?: DesktopDateTimePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
|
|
25
|
+
/**
|
|
26
|
+
* Available views.
|
|
27
|
+
*/
|
|
28
|
+
views?: readonly DateOrTimeView[];
|
|
29
|
+
/**
|
|
30
|
+
* Years rendered per row.
|
|
31
|
+
* @default 4
|
|
32
|
+
*/
|
|
33
|
+
yearsPerRow?: 3 | 4;
|
|
33
34
|
}
|
|
@@ -30,7 +30,7 @@ const DesktopDateTimePickerLayout = /*#__PURE__*/React.forwardRef(function Deskt
|
|
|
30
30
|
});
|
|
31
31
|
return /*#__PURE__*/_jsxs(PickersLayoutRoot, {
|
|
32
32
|
ref: ref,
|
|
33
|
-
className: clsx(
|
|
33
|
+
className: clsx(pickersLayoutClasses.root, classes?.root, className),
|
|
34
34
|
sx: [{
|
|
35
35
|
[`& .${pickersLayoutClasses.tabs}`]: {
|
|
36
36
|
gridRow: 4,
|
|
@@ -369,6 +369,12 @@ MobileDatePicker.propTypes = {
|
|
|
369
369
|
* Available views.
|
|
370
370
|
*/
|
|
371
371
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),
|
|
372
|
+
/**
|
|
373
|
+
* Years are displayed in ascending (chronological) order by default.
|
|
374
|
+
* If `desc`, years are displayed in descending order.
|
|
375
|
+
* @default 'asc'
|
|
376
|
+
*/
|
|
377
|
+
yearsOrder: PropTypes.oneOf(['asc', 'desc']),
|
|
372
378
|
/**
|
|
373
379
|
* Years rendered per row.
|
|
374
380
|
* @default 3
|
|
@@ -17,4 +17,9 @@ export interface MobileDatePickerProps<TDate extends PickerValidDate, TEnableAcc
|
|
|
17
17
|
* @default {}
|
|
18
18
|
*/
|
|
19
19
|
slotProps?: MobileDatePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
|
|
20
|
+
/**
|
|
21
|
+
* Years rendered per row.
|
|
22
|
+
* @default 3
|
|
23
|
+
*/
|
|
24
|
+
yearsPerRow?: 3 | 4;
|
|
20
25
|
}
|
|
@@ -428,6 +428,12 @@ MobileDateTimePicker.propTypes = {
|
|
|
428
428
|
* Available views.
|
|
429
429
|
*/
|
|
430
430
|
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired),
|
|
431
|
+
/**
|
|
432
|
+
* Years are displayed in ascending (chronological) order by default.
|
|
433
|
+
* If `desc`, years are displayed in descending order.
|
|
434
|
+
* @default 'asc'
|
|
435
|
+
*/
|
|
436
|
+
yearsOrder: PropTypes.oneOf(['asc', 'desc']),
|
|
431
437
|
/**
|
|
432
438
|
* Years rendered per row.
|
|
433
439
|
* @default 3
|
|
@@ -8,7 +8,7 @@ import type { PickersMonthProps } from './PickersMonth';
|
|
|
8
8
|
import { SlotComponentPropsFromProps } from '../internals/models/helpers';
|
|
9
9
|
export interface MonthCalendarSlots {
|
|
10
10
|
/**
|
|
11
|
-
* Button displayed to render a single month in the
|
|
11
|
+
* Button displayed to render a single month in the `month` view.
|
|
12
12
|
* @default MonthCalendarButton
|
|
13
13
|
*/
|
|
14
14
|
monthButton?: React.ElementType;
|
|
@@ -190,7 +190,7 @@ const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCale
|
|
|
190
190
|
const label = utils.formatByString(month, format);
|
|
191
191
|
return /*#__PURE__*/_jsxs(PickersCalendarHeaderRoot, _extends({}, other, {
|
|
192
192
|
ownerState: ownerState,
|
|
193
|
-
className: clsx(
|
|
193
|
+
className: clsx(classes.root, className),
|
|
194
194
|
ref: ref,
|
|
195
195
|
children: [/*#__PURE__*/_jsxs(PickersCalendarHeaderLabelContainer, {
|
|
196
196
|
role: "presentation",
|
|
@@ -15,7 +15,7 @@ export interface PickersCalendarHeaderSlots extends PickersArrowSwitcherSlots {
|
|
|
15
15
|
*/
|
|
16
16
|
switchViewButton?: React.ElementType;
|
|
17
17
|
/**
|
|
18
|
-
* Icon displayed in the SwitchViewButton. Rotated by 180° when the open view is
|
|
18
|
+
* Icon displayed in the SwitchViewButton. Rotated by 180° when the open view is `year`.
|
|
19
19
|
* @default ArrowDropDown
|
|
20
20
|
*/
|
|
21
21
|
switchViewIcon?: React.ElementType;
|
|
@@ -2,10 +2,10 @@ import * as React from 'react';
|
|
|
2
2
|
import { PickersLayoutProps } from './PickersLayout.types';
|
|
3
3
|
import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
4
4
|
import { PickerValidDate } from '../models';
|
|
5
|
-
export declare const PickersLayoutRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material
|
|
5
|
+
export declare const PickersLayoutRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
6
6
|
ownerState: PickersLayoutProps<any, any, any>;
|
|
7
7
|
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
8
|
-
export declare const PickersLayoutContentWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material
|
|
8
|
+
export declare const PickersLayoutContentWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
9
9
|
type PickersLayoutComponent = (<TValue, TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem>(props: PickersLayoutProps<TValue, TDate, TView> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
10
10
|
propTypes?: any;
|
|
11
11
|
};
|