@mui/x-date-pickers-pro 5.0.0-beta.5 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/AdapterDateFns/index.d.ts +1 -1
  2. package/AdapterDateFns/index.js +1 -1
  3. package/AdapterDayjs/index.d.ts +1 -1
  4. package/AdapterDayjs/index.js +1 -1
  5. package/AdapterLuxon/index.d.ts +1 -1
  6. package/AdapterLuxon/index.js +1 -1
  7. package/AdapterMoment/index.d.ts +1 -1
  8. package/AdapterMoment/index.js +1 -1
  9. package/CHANGELOG.md +177 -2
  10. package/DateRangePicker/DateRangePicker.js +5 -2
  11. package/DateRangePicker/DateRangePickerToolbar.js +4 -2
  12. package/DateRangePicker/DateRangePickerView.d.ts +4 -4
  13. package/DateRangePicker/DateRangePickerView.js +5 -2
  14. package/DateRangePicker/DateRangePickerViewDesktop.d.ts +2 -2
  15. package/DateRangePicker/DateRangePickerViewMobile.d.ts +2 -2
  16. package/DateRangePicker/shared.d.ts +4 -5
  17. package/DateRangePicker/shared.js +7 -5
  18. package/DateRangePickerDay/DateRangePickerDay.d.ts +1 -1
  19. package/DateRangePickerDay/DateRangePickerDay.js +0 -2
  20. package/DesktopDateRangePicker/DesktopDateRangePicker.js +4 -1
  21. package/MobileDateRangePicker/MobileDateRangePicker.js +1 -0
  22. package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +7 -0
  23. package/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.d.ts +5 -0
  24. package/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.js +1 -0
  25. package/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -0
  26. package/MultiInputDateRangeField/index.d.ts +2 -0
  27. package/MultiInputDateRangeField/index.js +1 -0
  28. package/MultiInputDateRangeField/package.json +6 -0
  29. package/MultiInputDateRangeField/useMultiInputDateRangeField.d.ts +6 -0
  30. package/MultiInputDateRangeField/useMultiInputDateRangeField.js +82 -0
  31. package/README.md +2 -1
  32. package/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +7 -0
  33. package/SingleInputDateRangeField/SingleInputDateRangeField.interfaces.d.ts +13 -0
  34. package/SingleInputDateRangeField/SingleInputDateRangeField.interfaces.js +1 -0
  35. package/SingleInputDateRangeField/SingleInputDateRangeField.js +15 -0
  36. package/SingleInputDateRangeField/SingleInputDateRangeField.utils.d.ts +5 -0
  37. package/SingleInputDateRangeField/SingleInputDateRangeField.utils.js +15 -0
  38. package/SingleInputDateRangeField/index.d.ts +3 -0
  39. package/SingleInputDateRangeField/index.js +2 -0
  40. package/SingleInputDateRangeField/package.json +6 -0
  41. package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +7 -0
  42. package/SingleInputDateRangeField/useSingleInputDateRangeField.js +145 -0
  43. package/StaticDateRangePicker/StaticDateRangePicker.d.ts +2 -2
  44. package/StaticDateRangePicker/StaticDateRangePicker.js +1 -0
  45. package/index.js +1 -1
  46. package/internal/hooks/validation/useDateRangeValidation.d.ts +4 -3
  47. package/internal/hooks/validation/useDateRangeValidation.js +15 -5
  48. package/internal/models/dateRange.d.ts +13 -0
  49. package/internal/utils/releaseInfo.js +1 -1
  50. package/legacy/AdapterDateFns/index.js +1 -1
  51. package/legacy/AdapterDayjs/index.js +1 -1
  52. package/legacy/AdapterLuxon/index.js +1 -1
  53. package/legacy/AdapterMoment/index.js +1 -1
  54. package/legacy/DateRangePicker/DateRangePicker.js +5 -2
  55. package/legacy/DateRangePicker/DateRangePickerToolbar.js +4 -3
  56. package/legacy/DateRangePicker/DateRangePickerView.js +6 -2
  57. package/legacy/DateRangePicker/shared.js +7 -5
  58. package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -2
  59. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +4 -1
  60. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +1 -0
  61. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.js +1 -0
  62. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -0
  63. package/legacy/MultiInputDateRangeField/index.js +1 -0
  64. package/legacy/MultiInputDateRangeField/useMultiInputDateRangeField.js +84 -0
  65. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.interfaces.js +1 -0
  66. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +15 -0
  67. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.utils.js +15 -0
  68. package/legacy/SingleInputDateRangeField/index.js +2 -0
  69. package/legacy/SingleInputDateRangeField/useSingleInputDateRangeField.js +157 -0
  70. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +1 -0
  71. package/legacy/index.js +1 -1
  72. package/legacy/internal/hooks/validation/useDateRangeValidation.js +17 -5
  73. package/legacy/internal/utils/releaseInfo.js +1 -1
  74. package/legacy/themeAugmentation/index.js +1 -0
  75. package/modern/AdapterDateFns/index.js +1 -1
  76. package/modern/AdapterDayjs/index.js +1 -1
  77. package/modern/AdapterLuxon/index.js +1 -1
  78. package/modern/AdapterMoment/index.js +1 -1
  79. package/modern/DateRangePicker/DateRangePicker.js +5 -2
  80. package/modern/DateRangePicker/DateRangePickerToolbar.js +4 -2
  81. package/modern/DateRangePicker/DateRangePickerView.js +5 -2
  82. package/modern/DateRangePicker/shared.js +7 -5
  83. package/modern/DateRangePickerDay/DateRangePickerDay.js +0 -2
  84. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +4 -1
  85. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +1 -0
  86. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.js +1 -0
  87. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -0
  88. package/modern/MultiInputDateRangeField/index.js +1 -0
  89. package/modern/MultiInputDateRangeField/useMultiInputDateRangeField.js +80 -0
  90. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.interfaces.js +1 -0
  91. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +15 -0
  92. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.utils.js +15 -0
  93. package/modern/SingleInputDateRangeField/index.js +2 -0
  94. package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +145 -0
  95. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +1 -0
  96. package/modern/index.js +1 -1
  97. package/modern/internal/hooks/validation/useDateRangeValidation.js +15 -5
  98. package/modern/internal/utils/releaseInfo.js +1 -1
  99. package/modern/themeAugmentation/index.js +1 -0
  100. package/node/AdapterDateFns/index.js +2 -4
  101. package/node/AdapterDayjs/index.js +2 -4
  102. package/node/AdapterLuxon/index.js +2 -4
  103. package/node/AdapterMoment/index.js +2 -4
  104. package/node/DateRangePicker/DateRangePicker.js +6 -3
  105. package/node/DateRangePicker/DateRangePickerToolbar.js +3 -1
  106. package/node/DateRangePicker/DateRangePickerView.js +5 -2
  107. package/node/DateRangePicker/shared.js +6 -4
  108. package/node/DateRangePickerDay/DateRangePickerDay.js +0 -2
  109. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +4 -1
  110. package/node/MobileDateRangePicker/MobileDateRangePicker.js +1 -0
  111. package/node/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.js +5 -0
  112. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +47 -0
  113. package/node/MultiInputDateRangeField/index.js +13 -0
  114. package/node/MultiInputDateRangeField/useMultiInputDateRangeField.js +102 -0
  115. package/node/SingleInputDateRangeField/SingleInputDateRangeField.interfaces.js +5 -0
  116. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +34 -0
  117. package/node/SingleInputDateRangeField/SingleInputDateRangeField.utils.js +24 -0
  118. package/node/SingleInputDateRangeField/index.js +21 -0
  119. package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +168 -0
  120. package/node/StaticDateRangePicker/StaticDateRangePicker.js +1 -0
  121. package/node/index.js +1 -1
  122. package/node/internal/hooks/validation/useDateRangeValidation.js +21 -3
  123. package/node/internal/utils/releaseInfo.js +1 -1
  124. package/node/themeAugmentation/index.js +13 -0
  125. package/package.json +10 -10
  126. package/themeAugmentation/index.d.ts +1 -0
  127. package/themeAugmentation/index.js +1 -0
@@ -1 +1 @@
1
- export { default as AdapterDateFns } from '@date-io/date-fns';
1
+ export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
@@ -1 +1 @@
1
- export { default as AdapterDateFns } from '@date-io/date-fns';
1
+ export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
@@ -1 +1 @@
1
- export { default as AdapterDayjs } from '@date-io/dayjs';
1
+ export { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
@@ -1 +1 @@
1
- export { default as AdapterDayjs } from '@date-io/dayjs';
1
+ export { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
@@ -1 +1 @@
1
- export { default as AdapterLuxon } from '@date-io/luxon';
1
+ export { AdapterLuxon } from '@mui/x-date-pickers/AdapterLuxon';
@@ -1 +1 @@
1
- export { default as AdapterLuxon } from '@date-io/luxon';
1
+ export { AdapterLuxon } from '@mui/x-date-pickers/AdapterLuxon';
@@ -1 +1 @@
1
- export { default as AdapterMoment } from '@date-io/moment';
1
+ export { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
@@ -1 +1 @@
1
- export { default as AdapterMoment } from '@date-io/moment';
1
+ export { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
package/CHANGELOG.md CHANGED
@@ -3,6 +3,181 @@
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
+ ## 5.17.0
7
+
8
+ _Sep 2, 2022_
9
+
10
+ 🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` packages!
11
+
12
+ If you are still using picker components from the `lab`, take a look at the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/).
13
+
14
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
15
+
16
+ - 🎁 Implement Lazy loading (#5214) @DanailH
17
+
18
+ Pro users now can try the experimental lazy loading feature.
19
+ In a few steps, you can load your data on demand, as the rows are displayed.
20
+
21
+ To enable this feature, add `experimentalFeatures={{ lazyLoading: true }}`.
22
+ Lazy Loading requires a few other settings.
23
+ See the [documentation](https://mui.com/x/react-data-grid/row-updates/#lazy-loading) to explore the example in detail.
24
+
25
+ - 🚀 Improve `pickers` focus management (#5820) @alexfauquette
26
+ - 🎉 Enable disabling `day` on date range picker depending on `position` (#5773) @alexfauquette
27
+ - ✨ Various improvements
28
+ - 📚 Documentation improvements
29
+ - 🐞 Bugfixes
30
+
31
+ ### `@mui/x-data-grid@v5.17.0` / `@mui/x-data-grid-pro@v5.17.0` / `@mui/x-data-grid-premium@v5.17.0`
32
+
33
+ #### Changes
34
+
35
+ - [DataGrid] Add `sort` prop to columns panel slot (#5888) @gavbrennan
36
+ - [DataGrid] Do not throw if `fieldToFocus` cannot be found (#5871) @cherniavskii
37
+ - [DataGrid] Support `getRowId` in the `replaceRows` method (#5988) @flaviendelangle
38
+ - [DataGridPro] Add class name to row with open detail panel (#5924) @m4theushw
39
+ - [DataGridPro] Fix crash when using `pinnedRows` + `getRowClassName` props and `rows=[]` (#5851) @cherniavskii
40
+ - [DataGridPro] Fix filtering with inactive filter items (#5993) @alexfauquette
41
+ - [DataGridPro] Implement Lazy loading (#5214) @DanailH
42
+ - [DataGridPro] Support pinned columns and dynamic row height (#5782) @m4theushw
43
+ - [DataGridPremium] Add state initializer for column groups (#5963) @alexfauquette
44
+ - [DataGridPremium] Update grouping when `groupingValueGetter` changes (#5919) @flaviendelangle
45
+ - [DataGridPremium] Use the aggregated value on tree data real groups (#5953) @flaviendelangle
46
+
47
+ ### `@mui/x-date-pickers@v5.0.0` / `@mui/x-date-pickers-pro@v5.0.0`
48
+
49
+ #### Changes
50
+
51
+ - [DatePicker] Improve focus management (#5820) @alexfauquette
52
+ - [DateRangePicker] Enable disabling `day` depending on `position` (#5773) @alexfauquette
53
+ - [DateTimePicker] Create a new `tabs` component slot (#5972) @LukasTy
54
+ - [pickers] Do not forward validation props to the DOM on field components (#5971) @flaviendelangle
55
+ - [pickers] Do not hardcode `date-fns` elements in field components (#5975) @flaviendelangle
56
+ - [pickers] Do not require `date-fns` in `@mui/x-date-pickers-pro` (#5941) @flaviendelangle
57
+ - [pickers] Fix mobile picker not opening on label click (#5651) @LukasTy
58
+ - [pickers] Improve DOM event management on `useField` (#5901) @flaviendelangle
59
+ - [pickers] Include `community` package `themeAugmentation` in `pro` package types (#5969) @LukasTy
60
+ - [pickers] Rename `DateRangeField` into `SingleInputDateRangeField` (#5961) @flaviendelangle
61
+ - [pickers] Support `isSameError` on field components (#5984) @flaviendelangle
62
+
63
+ ### Docs
64
+
65
+ - [docs] Add `description` and `default` to pickers slots (#5893) @alexfauquette
66
+ - [docs] Fix typo (#5945) @wettopa
67
+ - [docs] Fix typo `onYearPicker` to `onYearChange` (#5954) @alexfauquette
68
+ - [docs] Update `GridCellParams`'s `value` description (#5849) @cherniavskii
69
+ - [docs] Update `README.md` to match Introduction section of the docs (#5754) @samuelsycamore
70
+
71
+ ### Core
72
+
73
+ - [core] Fix typo (#5990) @flaviendelangle
74
+ - [core] Remove old babel resolve rule (#5939) @oliviertassinari
75
+ - [core] Remove outdated TODO (#5956) @flaviendelangle
76
+ - [core] Upgrade monorepo (#5960) @cherniavskii
77
+ - [core] Fix statics (#5986) @DanailH
78
+ - [core] Remove unused dependencies (#5937) @oliviertassinari
79
+ - [license] Remove CLI (#5757) @flaviendelangle
80
+ - [test] Fix time zone sensitive test (#5955) @LukasTy
81
+ - [test] Use `userEvent.mousePress` instead of `fireClickEvent` (#5920) @cherniavskii
82
+
83
+ ## 5.16.0
84
+
85
+ _Aug 25, 2022_
86
+
87
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
88
+
89
+ - 🎁 Introduce column grouping for data grid (#5133) @alexfauquette
90
+
91
+ You can now group columns using the `columnGroupingModel` prop. This lets you to display more structured data.
92
+
93
+ <img src="https://user-images.githubusercontent.com/45398769/186178366-4fba66b2-bf90-4c7a-9d83-940a7fc78704.png" width="800" />
94
+
95
+ To enable this feature, add `experimentalFeatures={{ columnGrouping: true }}`.
96
+ The grouping header can be fully customized.
97
+ See the [documentation](https://mui.com/x/react-data-grid/column-groups/) to explore everything it has to offer.
98
+
99
+ - 🐞 Bugfixes
100
+ - 🌏 New locales for pickers thanks to @tesseractjh and @drastus
101
+
102
+ ### `@mui/x-data-grid@v5.16.0` / `@mui/x-data-grid-pro@v5.16.0` / `@mui/x-data-grid-premium@v5.16.0`
103
+
104
+ #### Changes
105
+
106
+ - [DataGrid] Implement column grouping (#5133) @alexfauquette
107
+ - [DataGrid] Handle `disableVirtualization` prop change (#5889) @cherniavskii
108
+ - [DataGrid] Improve `GridRowModel` typing (#5734) @cherniavskii
109
+ - [DataGrid] Update deprecation note for `GridColDef` `hide` property (#5886) @cherniavskii
110
+
111
+ ### `@mui/x-date-pickers@v5.0.0-beta.7` / `@mui/x-date-pickers-pro@v5.0.0-beta.7`
112
+
113
+ #### Changes
114
+
115
+ - [DatePicker] Fix to pass down `className` prop provided on DatePicker to `renderInput` (#5471) @CruseCtrl
116
+ - [DatePicker] Improve `a11y` support (#5809) @LukasTy
117
+ - [pickers] Add `PaperContent` component slot (#5801) @LukasTy
118
+ - [pickers] Add a breaking change section in the migration guide (#5805) @alexfauquette
119
+ - [pickers] Add new translations to `localeText` (#5143) @alexfauquette
120
+ - [pickers] Document components slots (#4657) @flaviendelangle
121
+ - [pickers] Add new unstable field components (#5504) @flaviendelangle
122
+ - [pickers] Fallback to default `minDate` / `maxDate` when `null` value is passed (#5397) @flaviendelangle
123
+ - [l10n] Add Korean (ko-KR) locale (#5854) @tesseractjh
124
+ - [l10n] Add Polish (pl-PL) locale (#5833) @drastus
125
+
126
+ ### Docs
127
+
128
+ - [docs] Fix typo in `migration from lab` (#5277) @chuckwired
129
+ - [docs] Use `dayjs` instead of `date-fns` in doc examples (#5481) @flaviendelangle
130
+
131
+ ### Core
132
+
133
+ - [core] Clarify the scope of the license key used for tests and documentation (#5824) @oliviertassinari
134
+ - [core] Fix Typescript error on field hooks (#5892) @flaviendelangle
135
+ - [core] Memoize `columns` in `useDemoData` hook (#5848) @cherniavskii
136
+ - [core] Remove Firefox from the BrowserStack list (#5874) @DanailH
137
+ - [core] Small changes to the release script (#5840) @m4theushw
138
+
139
+ ## 5.15.3
140
+
141
+ _Aug 18, 2022_
142
+
143
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
144
+
145
+ - 📚 Documentation improvements
146
+ - 🐞 Bugfixes
147
+
148
+ ### `@mui/x-data-grid@v5.15.3` / `@mui/x-data-grid-pro@v5.15.3` / `@mui/x-data-grid-premium@v5.15.3`
149
+
150
+ #### Changes
151
+
152
+ - [DataGrid] Fix <kbd>Enter</kbd> causing Select to re-open when commiting value (#5756) @m4theushw
153
+ - [DataGrid] Fix `GridOverlays` bypassing pointer events (#5674) @philjones88
154
+
155
+ ### `@mui/x-date-pickers@v5.0.0-beta.6` / `@mui/x-date-picker-pro@v5.0.0-beta.6`
156
+
157
+ #### Changes
158
+
159
+ - [DatePicker] Support click on day outside of current month (#5768) @alexfauquette
160
+ - [pickers] Extend `PickersActionBarProps` with `DialogActionProps` (#5798) @LukasTy
161
+
162
+ ### Docs
163
+
164
+ - [docs] Fix API anchor link scroll top (#5795) @oliviertassinari
165
+ - [docs] Fix contradiction in the free trial clause (#5732) @oliviertassinari
166
+ - [docs] Fix default value of the DataGrid `logLevel` prop to false (#5784) @HwangTaehyun
167
+ - [docs] Fix typo on the row height page (#5772) @flaviendelangle
168
+ - [docs] Improve "upgrading plans" documentation. (#5683) @joserodolfofreitas
169
+ - [docs] Link the license docs before pricing (#5726) @oliviertassinari
170
+ - [docs] Update packages README files (#5835) @cherniavskii
171
+ - [docs] Use `InputBase` for pickers inputs (#5597) @cherniavskii
172
+
173
+ ### Core
174
+
175
+ - [core] Upgrade monorepo (#5771, #5797) @cherniavskii
176
+ - [core] Various TS improvements (#5556) @flaviendelangle
177
+ - [license] Give more context in the missing license (#5731) @oliviertassinari
178
+ - [license] Only log an error type once (#5730) @oliviertassinari
179
+ - [test] Increase timeout to take print screenshot (#5799) @m4theushw
180
+
6
181
  ## 5.15.2
7
182
 
8
183
  _Aug 11, 2022_
@@ -13,7 +188,7 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
13
188
  - 📚 Documentation improvements
14
189
  - 🐞 Bugfixes
15
190
 
16
- ### `@mui/x-data-grid@5.15.2` / `@mui/x-data-grid-pro@5.15.2` / `@mui/x-data-grid-premium@5.15.2`
191
+ ### `@mui/x-data-grid@v5.15.2` / `@mui/x-data-grid-pro@v5.15.2` / `@mui/x-data-grid-premium@v5.15.2`
17
192
 
18
193
  #### Changes
19
194
 
@@ -487,7 +662,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
487
662
 
488
663
  **MonthPicker**: The prop `onMonthChange` has been removed, you can use `onChange` instead since every change is a month change
489
664
 
490
- **YearPicker**: The prop `onYearPicker` has been removed, you can use `onChange` instead since every change is a year change
665
+ **YearPicker**: The prop `onYearChange` has been removed, you can use `onChange` instead since every change is a year change
491
666
 
492
667
  **DayPicker**: The prop `isDateDisabled` has been removed, you can now use the same validation props as for the other components (`maxDate`, `minDate`, `shouldDisableDate`, `disableFuture` and `disablePast`)
493
668
 
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["desktopModeMediaQuery", "DialogProps", "PopperProps", "TransitionComponent"];
4
- import PropTypes from 'prop-types';
3
+ const _excluded = ["desktopModeMediaQuery", "DialogProps", "PopperProps", "PaperProps", "TransitionComponent"];
5
4
  import * as React from 'react';
5
+ import PropTypes from 'prop-types';
6
6
  import { useThemeProps } from '@mui/material/styles';
7
7
  import { useLicenseVerifier } from '@mui/x-license-pro';
8
8
  import useMediaQuery from '@mui/material/useMediaQuery';
@@ -33,6 +33,7 @@ export const DateRangePicker = /*#__PURE__*/React.forwardRef(function DateRangeP
33
33
  desktopModeMediaQuery = '@media (pointer: fine)',
34
34
  DialogProps,
35
35
  PopperProps,
36
+ PaperProps,
36
37
  TransitionComponent
37
38
  } = props,
38
39
  other = _objectWithoutPropertiesLoose(props, _excluded); // defaults to `true` in environments where `window.matchMedia` would not be available (i.e. test/jsdom)
@@ -46,6 +47,7 @@ export const DateRangePicker = /*#__PURE__*/React.forwardRef(function DateRangeP
46
47
  return /*#__PURE__*/_jsx(DesktopDateRangePicker, _extends({
47
48
  ref: ref,
48
49
  PopperProps: PopperProps,
50
+ PaperProps: PaperProps,
49
51
  TransitionComponent: TransitionComponent
50
52
  }, other));
51
53
  }
@@ -383,6 +385,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
383
385
  * Disable specific date. @DateIOType
384
386
  * @template TDate
385
387
  * @param {TDate} day The date to test.
388
+ * @param {string} position The date to test, 'start' or 'end'.
386
389
  * @returns {boolean} Returns `true` if the date should be disabled.
387
390
  */
388
391
  shouldDisableDate: PropTypes.func,
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import Typography from '@mui/material/Typography';
3
3
  import { styled } from '@mui/material/styles';
4
4
  import { generateUtilityClasses } from '@mui/material';
5
- import { PickersToolbar, PickersToolbarButton, pickersToolbarClasses, useUtils } from '@mui/x-date-pickers/internals';
5
+ import { PickersToolbar, PickersToolbarButton, pickersToolbarClasses, useUtils, useLocaleText } from '@mui/x-date-pickers/internals';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
8
  export const dateRangePickerToolbarClasses = generateUtilityClasses('MuiDateRangePickerToolbar', ['root']);
@@ -34,8 +34,10 @@ export const DateRangePickerToolbar = props => {
34
34
  startText,
35
35
  toggleMobileKeyboardView,
36
36
  toolbarFormat,
37
- toolbarTitle = 'Select date range'
37
+ toolbarTitle: toolbarTitleProp
38
38
  } = props;
39
+ const localeText = useLocaleText();
40
+ const toolbarTitle = toolbarTitleProp != null ? toolbarTitleProp : localeText.dateRangePickerDefaultToolbarTitle;
39
41
  const startDateValue = start ? utils.formatByString(start, toolbarFormat || utils.formats.shortDate) : startText;
40
42
  const endDateValue = end ? utils.formatByString(end, toolbarFormat || utils.formats.shortDate) : endText;
41
43
  const ownerState = props;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { ExportedCalendarPickerProps, PickerStatePickerProps } from '@mui/x-date-pickers/internals';
3
- import { DateRange, CurrentlySelectingRangeEndProps } from '../internal/models/dateRange';
2
+ import { ExportedCalendarPickerProps, PickerStatePickerProps, BaseDateValidationProps, DayValidationProps } from '@mui/x-date-pickers/internals';
3
+ import { DateRange, CurrentlySelectingRangeEndProps, DayRangeValidationProps } from '../internal/models/dateRange';
4
4
  import { DateRangePickerViewMobileSlotsComponent, DateRangePickerViewMobileSlotsComponentsProps } from './DateRangePickerViewMobile';
5
5
  import { DateRangeInputProps } from './DateRangePickerInput';
6
6
  import { ExportedDesktopDateRangeCalendarProps } from './DateRangePickerViewDesktop';
@@ -8,7 +8,7 @@ export interface DateRangePickerViewSlotsComponent extends DateRangePickerViewMo
8
8
  }
9
9
  export interface DateRangePickerViewSlotsComponentsProps extends DateRangePickerViewMobileSlotsComponentsProps {
10
10
  }
11
- export interface ExportedDateRangePickerViewProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<ExportedCalendarPickerProps<TDate>, 'onYearChange' | 'renderDay'> {
11
+ export interface ExportedDateRangePickerViewProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, DayRangeValidationProps<TDate>, Omit<ExportedCalendarPickerProps<TDate>, 'onYearChange' | 'renderDay' | keyof BaseDateValidationProps<TDate> | keyof DayValidationProps<TDate>> {
12
12
  /**
13
13
  * Overrideable components.
14
14
  * @default {}
@@ -42,7 +42,7 @@ export interface ExportedDateRangePickerViewProps<TDate> extends ExportedDesktop
42
42
  */
43
43
  className?: string;
44
44
  }
45
- interface DateRangePickerViewProps<TInputDate, TDate> extends CurrentlySelectingRangeEndProps, ExportedDateRangePickerViewProps<TDate>, PickerStatePickerProps<DateRange<TDate>> {
45
+ interface DateRangePickerViewProps<TInputDate, TDate> extends CurrentlySelectingRangeEndProps, ExportedDateRangePickerViewProps<TDate>, PickerStatePickerProps<DateRange<TDate>>, Required<BaseDateValidationProps<TDate>> {
46
46
  calendars: 1 | 2 | 3;
47
47
  open: boolean;
48
48
  startText: React.ReactNode;
@@ -51,6 +51,9 @@ function DateRangePickerViewRaw(props) {
51
51
 
52
52
  const utils = useUtils();
53
53
  const wrapperVariant = React.useContext(WrapperVariantContext);
54
+
55
+ const wrappedShouldDisableDate = shouldDisableDate && (dayToTest => shouldDisableDate == null ? void 0 : shouldDisableDate(dayToTest, currentlySelectingRangeEnd));
56
+
54
57
  const [start, end] = parsedValue;
55
58
  const {
56
59
  changeMonth,
@@ -68,7 +71,7 @@ function DateRangePickerViewRaw(props) {
68
71
  minDate,
69
72
  onMonthChange,
70
73
  reduceAnimations,
71
- shouldDisableDate
74
+ shouldDisableDate: wrappedShouldDisableDate
72
75
  });
73
76
  const toShowToolbar = showToolbar != null ? showToolbar : wrapperVariant !== 'desktop';
74
77
 
@@ -132,7 +135,7 @@ function DateRangePickerViewRaw(props) {
132
135
  disablePast,
133
136
  minDate,
134
137
  maxDate,
135
- shouldDisableDate
138
+ shouldDisableDate: wrappedShouldDisableDate
136
139
  }, calendarState, other);
137
140
 
138
141
  switch (wrapperVariant) {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ExportedDateValidationProps, ExportedArrowSwitcherProps, DayPickerProps } from '@mui/x-date-pickers/internals';
2
+ import { ExportedArrowSwitcherProps, DayPickerProps, DayValidationProps } from '@mui/x-date-pickers/internals';
3
3
  import { DateRange } from '../internal/models';
4
4
  import { DateRangePickerDayProps } from '../DateRangePickerDay';
5
5
  export interface ExportedDesktopDateRangeCalendarProps<TDate> {
@@ -18,7 +18,7 @@ export interface ExportedDesktopDateRangeCalendarProps<TDate> {
18
18
  */
19
19
  renderDay?: (day: TDate, dateRangePickerDayProps: DateRangePickerDayProps<TDate>) => JSX.Element;
20
20
  }
21
- interface DesktopDateRangeCalendarProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<DayPickerProps<TDate>, 'selectedDays' | 'renderDay' | 'onFocusedDayChange'>, ExportedDateValidationProps<TDate>, ExportedArrowSwitcherProps {
21
+ interface DesktopDateRangeCalendarProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<DayPickerProps<TDate>, 'selectedDays' | 'renderDay' | 'onFocusedDayChange'>, DayValidationProps<TDate>, ExportedArrowSwitcherProps {
22
22
  calendars: 1 | 2 | 3;
23
23
  parsedValue: DateRange<TDate>;
24
24
  changeMonth: (date: TDate) => void;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ExportedCalendarHeaderProps, ExportedDateValidationProps, DayPickerProps, PickersCalendarHeaderSlotsComponent, PickersCalendarHeaderSlotsComponentsProps } from '@mui/x-date-pickers/internals';
2
+ import { ExportedCalendarHeaderProps, DayPickerProps, PickersCalendarHeaderSlotsComponent, PickersCalendarHeaderSlotsComponentsProps, DayValidationProps } from '@mui/x-date-pickers/internals';
3
3
  import { DateRange } from '../internal/models/dateRange';
4
4
  import { ExportedDesktopDateRangeCalendarProps } from './DateRangePickerViewDesktop';
5
5
  export interface DateRangePickerViewMobileSlotsComponent extends PickersCalendarHeaderSlotsComponent {
@@ -8,7 +8,7 @@ export interface DateRangePickerViewMobileSlotsComponentsProps extends PickersCa
8
8
  }
9
9
  export interface ExportedMobileDateRangeCalendarProps<TDate> extends Pick<ExportedDesktopDateRangeCalendarProps<TDate>, 'renderDay'> {
10
10
  }
11
- interface DesktopDateRangeCalendarProps<TDate> extends ExportedMobileDateRangeCalendarProps<TDate>, Omit<DayPickerProps<TDate>, 'selectedDays' | 'renderDay' | 'onFocusedDayChange'>, ExportedDateValidationProps<TDate>, ExportedCalendarHeaderProps<TDate> {
11
+ interface DesktopDateRangeCalendarProps<TDate> extends ExportedMobileDateRangeCalendarProps<TDate>, Omit<DayPickerProps<TDate>, 'selectedDays' | 'renderDay' | 'onFocusedDayChange'>, DayValidationProps<TDate>, ExportedCalendarHeaderProps<TDate> {
12
12
  /**
13
13
  * Overrideable components.
14
14
  * @default {}
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import { BasePickerProps, PickerStateValueManager, ValidationProps } from '@mui/x-date-pickers/internals';
2
+ import { BasePickerProps, PickerStateValueManager, ValidationProps, DefaultizedProps, BaseDateValidationProps } from '@mui/x-date-pickers/internals';
3
3
  import { ExportedDateRangePickerViewProps } from './DateRangePickerView';
4
4
  import { DateRangeValidationError } from '../internal/hooks/validation/useDateRangeValidation';
5
5
  import { DateRange } from '../internal/models';
6
6
  import { ExportedDateRangePickerInputProps } from './DateRangePickerInput';
7
- export interface BaseDateRangePickerProps<TInputDate, TDate> extends Omit<BasePickerProps<DateRange<TInputDate>, DateRange<TDate>>, 'orientation'>, ExportedDateRangePickerViewProps<TDate>, ValidationProps<DateRangeValidationError, DateRange<TInputDate>>, ExportedDateRangePickerInputProps<TInputDate, TDate> {
7
+ export interface BaseDateRangePickerProps<TInputDate, TDate> extends Omit<BasePickerProps<DateRange<TInputDate>, DateRange<TDate>>, 'orientation'>, ExportedDateRangePickerViewProps<TDate>, BaseDateValidationProps<TDate>, ValidationProps<DateRangeValidationError, DateRange<TInputDate>>, ExportedDateRangePickerInputProps<TInputDate, TDate> {
8
8
  /**
9
9
  * Text for end input label and toolbar placeholder.
10
10
  * @default 'End'
@@ -30,8 +30,7 @@ export interface BaseDateRangePickerProps<TInputDate, TDate> extends Omit<BasePi
30
30
  */
31
31
  startText?: React.ReactNode;
32
32
  }
33
- export declare type DefaultizedProps<Props> = Props & {
33
+ export declare function useDateRangePickerDefaultizedProps<TInputDate, TDate, Props extends BaseDateRangePickerProps<TInputDate, TDate>>(props: Props, name: string): DefaultizedProps<Props, 'calendars' | 'startText' | 'endText' | keyof BaseDateValidationProps<TDate>, {
34
34
  inputFormat: string;
35
- };
36
- export declare function useDateRangePickerDefaultizedProps<TInputDate, TDate, Props extends BaseDateRangePickerProps<TInputDate, TDate>>(props: Props, name: string): DefaultizedProps<Props> & Required<Pick<BaseDateRangePickerProps<TInputDate, TDate>, 'calendars' | 'startText' | 'endText'>>;
35
+ }>;
37
36
  export declare const dateRangePickerValueManager: PickerStateValueManager<[any, any], [any, any], any>;
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { buildDeprecatedPropsWarning, useDefaultDates, useLocaleText, useUtils } from '@mui/x-date-pickers/internals';
2
+ import { buildDeprecatedPropsWarning, useDefaultDates, useLocaleText, useUtils, parseNonNullablePickerDate } from '@mui/x-date-pickers/internals';
3
3
  import { useThemeProps } from '@mui/material/styles';
4
4
  import { parseRangeInputValue } from '../internal/utils/date-utils';
5
5
  const deprecatedPropsWarning = buildDeprecatedPropsWarning('Props for translation are deprecated. See https://mui.com/x/react-date-pickers/localization for more information.');
@@ -22,13 +22,15 @@ export function useDateRangePickerDefaultizedProps(props, name) {
22
22
  const startText = (_themeProps$startText = themeProps.startText) != null ? _themeProps$startText : localeText.start;
23
23
  const endText = (_themeProps$endText = themeProps.endText) != null ? _themeProps$endText : localeText.end;
24
24
  return _extends({
25
+ disableFuture: false,
26
+ disablePast: false,
25
27
  calendars: 2,
26
- inputFormat: utils.formats.keyboardDate,
27
- minDate: defaultDates.minDate,
28
- maxDate: defaultDates.maxDate
28
+ inputFormat: utils.formats.keyboardDate
29
29
  }, themeProps, {
30
30
  endText,
31
- startText
31
+ startText,
32
+ minDate: parseNonNullablePickerDate(utils, themeProps.minDate, defaultDates.minDate),
33
+ maxDate: parseNonNullablePickerDate(utils, themeProps.maxDate, defaultDates.maxDate)
32
34
  });
33
35
  }
34
36
  export const dateRangePickerValueManager = {
@@ -3,7 +3,7 @@ import { SxProps } from '@mui/system';
3
3
  import { Theme } from '@mui/material/styles';
4
4
  import { PickersDayProps } from '@mui/x-date-pickers/PickersDay';
5
5
  import { DateRangePickerDayClasses } from './dateRangePickerDayClasses';
6
- export interface DateRangePickerDayProps<TDate> extends Omit<PickersDayProps<TDate>, 'classes'> {
6
+ export interface DateRangePickerDayProps<TDate> extends Omit<PickersDayProps<TDate>, 'classes' | 'onBlur' | 'onFocus' | 'onKeyDown'> {
7
7
  /**
8
8
  * Set to `true` if the `day` is in a highlighted date range.
9
9
  */
@@ -154,7 +154,6 @@ const DateRangePickerDayRaw = /*#__PURE__*/React.forwardRef(function DateRangePi
154
154
  className: clsx(classes.root, className),
155
155
  ownerState: ownerState,
156
156
  children: /*#__PURE__*/_jsx(DateRangePickerDayRangeIntervalPreview, {
157
- role: "cell",
158
157
  className: classes.rangeIntervalPreview,
159
158
  ownerState: ownerState,
160
159
  children: /*#__PURE__*/_jsx(DateRangePickerDayDay, _extends({}, other, {
@@ -233,7 +232,6 @@ process.env.NODE_ENV !== "production" ? DateRangePickerDayRaw.propTypes = {
233
232
  * Set to `true` if the `day` is the end of a highlighted date range.
234
233
  */
235
234
  isStartOfPreviewing: PropTypes.bool.isRequired,
236
- onDayFocus: PropTypes.func,
237
235
  onDaySelect: PropTypes.func.isRequired,
238
236
 
239
237
  /**
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["value", "onChange", "PopperProps", "TransitionComponent", "components", "componentsProps"];
3
+ const _excluded = ["value", "onChange", "PopperProps", "PaperProps", "TransitionComponent", "components", "componentsProps"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { useLicenseVerifier } from '@mui/x-license-pro';
@@ -37,6 +37,7 @@ export const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function Des
37
37
 
38
38
  const {
39
39
  PopperProps,
40
+ PaperProps,
40
41
  TransitionComponent,
41
42
  components,
42
43
  componentsProps
@@ -56,6 +57,7 @@ export const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function Des
56
57
  DateInputProps: DateInputProps,
57
58
  KeyboardDateInputComponent: KeyboardDateInputComponent,
58
59
  PopperProps: PopperProps,
60
+ PaperProps: PaperProps,
59
61
  TransitionComponent: TransitionComponent,
60
62
  components: components,
61
63
  componentsProps: componentsProps,
@@ -386,6 +388,7 @@ process.env.NODE_ENV !== "production" ? DesktopDateRangePicker.propTypes = {
386
388
  * Disable specific date. @DateIOType
387
389
  * @template TDate
388
390
  * @param {TDate} day The date to test.
391
+ * @param {string} position The date to test, 'start' or 'end'.
389
392
  * @returns {boolean} Returns `true` if the date should be disabled.
390
393
  */
391
394
  shouldDisableDate: PropTypes.func,
@@ -386,6 +386,7 @@ process.env.NODE_ENV !== "production" ? MobileDateRangePicker.propTypes = {
386
386
  * Disable specific date. @DateIOType
387
387
  * @template TDate
388
388
  * @param {TDate} day The date to test.
389
+ * @param {string} position The date to test, 'start' or 'end'.
389
390
  * @returns {boolean} Returns `true` if the date should be disabled.
390
391
  */
391
392
  shouldDisableDate: PropTypes.func,
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { MultiInputDateRangeFieldProps } from './MultiInputDateRangeField.interfaces';
3
+ declare type MultiInputDateRangeFieldComponent = (<TInputDate, TDate = TInputDate>(props: MultiInputDateRangeFieldProps<TInputDate, TDate> & React.RefAttributes<HTMLInputElement>) => JSX.Element) & {
4
+ propTypes?: any;
5
+ };
6
+ export declare const MultiInputDateRangeField: MultiInputDateRangeFieldComponent;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { UseSingleInputDateRangeFieldProps } from '../SingleInputDateRangeField';
2
+ export interface UseMultiInputDateRangeFieldProps<TInputDate, TDate> extends UseSingleInputDateRangeFieldProps<TInputDate, TDate> {
3
+ }
4
+ export interface MultiInputDateRangeFieldProps<TInputDate, TDate> extends UseMultiInputDateRangeFieldProps<TInputDate, TDate> {
5
+ }
@@ -0,0 +1,27 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import * as React from 'react';
3
+ import Stack from '@mui/material/Stack';
4
+ import TextField from '@mui/material/TextField';
5
+ import Typography from '@mui/material/Typography';
6
+ import { useMultiInputDateRangeField } from './useMultiInputDateRangeField';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ export const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInputDateRangeField(inProps, ref) {
10
+ const {
11
+ startDate,
12
+ endDate
13
+ } = useMultiInputDateRangeField(inProps);
14
+ return /*#__PURE__*/_jsxs(Stack, {
15
+ spacing: 2,
16
+ direction: "row",
17
+ alignItems: "center",
18
+ ref: ref,
19
+ children: [/*#__PURE__*/_jsx(TextField, _extends({
20
+ inputRef: startDate.inputRef
21
+ }, startDate.inputProps)), /*#__PURE__*/_jsx(Typography, {
22
+ children: "to"
23
+ }), /*#__PURE__*/_jsx(TextField, _extends({
24
+ inputRef: endDate.inputRef
25
+ }, endDate.inputProps))]
26
+ });
27
+ });
@@ -0,0 +1,2 @@
1
+ export { MultiInputDateRangeField as Unstable_MultiInputDateRangeField } from './MultiInputDateRangeField';
2
+ export type { UseMultiInputDateRangeFieldProps } from './MultiInputDateRangeField.interfaces';
@@ -0,0 +1 @@
1
+ export { MultiInputDateRangeField as Unstable_MultiInputDateRangeField } from './MultiInputDateRangeField';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/MultiInputDateRangeField/index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -0,0 +1,6 @@
1
+ import { UseFieldResponse } from '@mui/x-date-pickers/internals-fields';
2
+ import { UseMultiInputDateRangeFieldProps } from './MultiInputDateRangeField.interfaces';
3
+ export declare const useMultiInputDateRangeField: <TInputDate, TDate, TProps extends UseMultiInputDateRangeFieldProps<TInputDate, TDate>>(inProps: TProps) => {
4
+ startDate: UseFieldResponse<{}>;
5
+ endDate: UseFieldResponse<{}>;
6
+ };