@mui/x-date-pickers 8.16.0 → 8.18.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 (104) hide show
  1. package/CHANGELOG.md +208 -1
  2. package/DateCalendar/DayCalendar.d.ts +1 -1
  3. package/DateCalendar/PickersFadeTransitionGroup.d.ts +1 -1
  4. package/DateCalendar/PickersSlideTransition.d.ts +1 -1
  5. package/DatePicker/DatePicker.js +8 -2
  6. package/DateTimePicker/DateTimePicker.js +8 -2
  7. package/DateTimePicker/DateTimePickerTabs.d.ts +1 -1
  8. package/DateTimePicker/DateTimePickerToolbar.d.ts +1 -1
  9. package/DateTimePicker/DateTimePickerToolbar.js +2 -1
  10. package/DayCalendarSkeleton/DayCalendarSkeleton.d.ts +1 -1
  11. package/DesktopDatePicker/DesktopDatePicker.js +8 -2
  12. package/DesktopDateTimePicker/DesktopDateTimePicker.js +8 -2
  13. package/DesktopTimePicker/DesktopTimePicker.js +8 -2
  14. package/MobileDatePicker/MobileDatePicker.js +8 -2
  15. package/MobileDateTimePicker/MobileDateTimePicker.js +8 -2
  16. package/MobileTimePicker/MobileTimePicker.js +8 -2
  17. package/PickersActionBar/PickersActionBar.d.ts +1 -1
  18. package/PickersShortcuts/PickersShortcuts.d.ts +1 -2
  19. package/PickersShortcuts/PickersShortcuts.js +2 -3
  20. package/PickersTextField/PickersOutlinedInput/Outline.d.ts +1 -1
  21. package/StaticDatePicker/StaticDatePicker.js +8 -2
  22. package/StaticDateTimePicker/StaticDateTimePicker.js +8 -2
  23. package/StaticTimePicker/StaticTimePicker.js +8 -2
  24. package/TimeClock/Clock.d.ts +1 -1
  25. package/TimeClock/ClockNumber.d.ts +1 -1
  26. package/TimeClock/ClockNumbers.d.ts +1 -1
  27. package/TimeClock/ClockPointer.d.ts +1 -1
  28. package/TimePicker/TimePicker.js +8 -2
  29. package/TimePicker/TimePickerToolbar.d.ts +1 -2
  30. package/TimePicker/TimePickerToolbar.js +2 -3
  31. package/dateViewRenderers/dateViewRenderers.d.ts +1 -2
  32. package/dateViewRenderers/dateViewRenderers.js +0 -2
  33. package/esm/DateCalendar/DayCalendar.d.ts +1 -1
  34. package/esm/DateCalendar/PickersFadeTransitionGroup.d.ts +1 -1
  35. package/esm/DateCalendar/PickersSlideTransition.d.ts +1 -1
  36. package/esm/DatePicker/DatePicker.js +8 -2
  37. package/esm/DateTimePicker/DateTimePicker.js +8 -2
  38. package/esm/DateTimePicker/DateTimePickerTabs.d.ts +1 -1
  39. package/esm/DateTimePicker/DateTimePickerToolbar.d.ts +1 -1
  40. package/esm/DateTimePicker/DateTimePickerToolbar.js +2 -1
  41. package/esm/DayCalendarSkeleton/DayCalendarSkeleton.d.ts +1 -1
  42. package/esm/DesktopDatePicker/DesktopDatePicker.js +8 -2
  43. package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +8 -2
  44. package/esm/DesktopTimePicker/DesktopTimePicker.js +8 -2
  45. package/esm/MobileDatePicker/MobileDatePicker.js +8 -2
  46. package/esm/MobileDateTimePicker/MobileDateTimePicker.js +8 -2
  47. package/esm/MobileTimePicker/MobileTimePicker.js +8 -2
  48. package/esm/PickersActionBar/PickersActionBar.d.ts +1 -1
  49. package/esm/PickersShortcuts/PickersShortcuts.d.ts +1 -2
  50. package/esm/PickersShortcuts/PickersShortcuts.js +2 -2
  51. package/esm/PickersTextField/PickersOutlinedInput/Outline.d.ts +1 -1
  52. package/esm/StaticDatePicker/StaticDatePicker.js +8 -2
  53. package/esm/StaticDateTimePicker/StaticDateTimePicker.js +8 -2
  54. package/esm/StaticTimePicker/StaticTimePicker.js +8 -2
  55. package/esm/TimeClock/Clock.d.ts +1 -1
  56. package/esm/TimeClock/ClockNumber.d.ts +1 -1
  57. package/esm/TimeClock/ClockNumbers.d.ts +1 -1
  58. package/esm/TimeClock/ClockPointer.d.ts +1 -1
  59. package/esm/TimePicker/TimePicker.js +8 -2
  60. package/esm/TimePicker/TimePickerToolbar.d.ts +1 -2
  61. package/esm/TimePicker/TimePickerToolbar.js +2 -2
  62. package/esm/dateViewRenderers/dateViewRenderers.d.ts +1 -2
  63. package/esm/dateViewRenderers/dateViewRenderers.js +0 -1
  64. package/esm/index.js +1 -1
  65. package/esm/internals/components/PickerFieldUI.d.ts +2 -2
  66. package/esm/internals/components/PickerPopper/PickerPopper.d.ts +1 -1
  67. package/esm/internals/components/PickerProvider.d.ts +9 -1
  68. package/esm/internals/components/PickersModalDialog.d.ts +1 -1
  69. package/esm/internals/demo/DemoContainer.d.ts +2 -2
  70. package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -2
  71. package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.js +0 -1
  72. package/esm/internals/hooks/useField/useFieldState.js +19 -10
  73. package/esm/internals/hooks/useField/useFieldV6TextField.js +1 -0
  74. package/esm/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -2
  75. package/esm/internals/hooks/useMobilePicker/useMobilePicker.js +0 -1
  76. package/esm/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +14 -2
  77. package/esm/internals/hooks/usePicker/usePicker.js +13 -5
  78. package/esm/internals/hooks/usePicker/usePicker.types.d.ts +8 -2
  79. package/esm/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -2
  80. package/esm/internals/hooks/useStaticPicker/useStaticPicker.js +0 -1
  81. package/esm/models/pickers.d.ts +8 -0
  82. package/esm/timeViewRenderers/timeViewRenderers.d.ts +3 -4
  83. package/esm/timeViewRenderers/timeViewRenderers.js +0 -1
  84. package/index.js +1 -1
  85. package/internals/components/PickerFieldUI.d.ts +2 -2
  86. package/internals/components/PickerPopper/PickerPopper.d.ts +1 -1
  87. package/internals/components/PickerProvider.d.ts +9 -1
  88. package/internals/components/PickersModalDialog.d.ts +1 -1
  89. package/internals/demo/DemoContainer.d.ts +2 -2
  90. package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -2
  91. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +0 -2
  92. package/internals/hooks/useField/useFieldState.js +19 -10
  93. package/internals/hooks/useField/useFieldV6TextField.js +1 -0
  94. package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -2
  95. package/internals/hooks/useMobilePicker/useMobilePicker.js +0 -2
  96. package/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +14 -2
  97. package/internals/hooks/usePicker/usePicker.js +13 -5
  98. package/internals/hooks/usePicker/usePicker.types.d.ts +8 -2
  99. package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -2
  100. package/internals/hooks/useStaticPicker/useStaticPicker.js +0 -2
  101. package/models/pickers.d.ts +8 -0
  102. package/package.json +3 -3
  103. package/timeViewRenderers/timeViewRenderers.d.ts +3 -4
  104. package/timeViewRenderers/timeViewRenderers.js +0 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,213 @@
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.18.0
9
+
10
+ <!-- generated comparing v8.17.0..master -->
11
+
12
+ _Nov 13, 2025_
13
+
14
+ We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
15
+
16
+ - Add `barLabelPlacement` property to customize the bar label position in bar charts, enabling labels to be placed above bars.
17
+
18
+ ![image](https://github.com/user-attachments/assets/4bc3a75b-74b8-4c6d-896b-5f5bf837bcda)
19
+
20
+ - Add `source` property to the date/time picker lifecycle and event handler context, enabling clearer differentiation between changes initiated by the picker UI and those from direct field input.
21
+ - 🐞 Bugfixes
22
+ - 📚 Documentation improvements
23
+
24
+ Special thanks go out to these community members for their valuable contributions:
25
+ @htollefsen, @sai6855, @Sigdriv
26
+
27
+ The following team members contributed to this release:
28
+ @arminmeh, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @JCQuintas, @michelengelen, @noraleonte, @prakhargupta1, @rita-codes, @siriwatknp
29
+
30
+ ### Data Grid
31
+
32
+ #### `@mui/x-data-grid@8.18.0`
33
+
34
+ - [DataGrid] Allow default event in the column action cell item click event handler (#20272) @arminmeh
35
+ - [DataGrid] Remove unnecessary generic from `useGridApiRef` (#20277) @cherniavskii
36
+
37
+ #### `@mui/x-data-grid-pro@8.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
38
+
39
+ Same changes as in `@mui/x-data-grid@8.18.0`.
40
+
41
+ #### `@mui/x-data-grid-premium@8.18.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
42
+
43
+ Same changes as in `@mui/x-data-grid-pro@8.18.0`, plus:
44
+
45
+ - [DataGridPremium] Return the correct `cellParams` value from the aggregation cells (#20224) @arminmeh
46
+
47
+ ### Date and Time Pickers
48
+
49
+ #### `@mui/x-date-pickers@8.18.0`
50
+
51
+ - [pickers] Keep invalid date state consistent (#20040) @michelengelen
52
+ - [pickers] Adds new `source` property to `onChange` and `onAccept` context object (#20234) @michelengelen
53
+
54
+ #### `@mui/x-date-pickers-pro@8.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
55
+
56
+ Same changes as in `@mui/x-date-pickers@8.18.0`.
57
+
58
+ ### Charts
59
+
60
+ #### `@mui/x-charts@8.18.0`
61
+
62
+ - [charts] Add prop for positioning a bar label (#20194) @Sigdriv
63
+ - [charts] Fix applying dark mode styles in `ChartAxisZoomSliderThumb` (#20232) @sai6855
64
+
65
+ #### `@mui/x-charts-pro@8.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
66
+
67
+ Same changes as in `@mui/x-charts@8.18.0`, plus:
68
+
69
+ - [charts-pro] Allow specifying Content Security Policy nonce on export (#20053) @bernardobelchior
70
+ - [charts-pro] Fix applying dark mode styles to slider (#20220) @sai6855
71
+ - [charts-pro] Sankey should respect node order (#20065) @JCQuintas
72
+
73
+ #### `@mui/x-charts-premium@8.18.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
74
+
75
+ Same changes as in `@mui/x-charts-pro@8.18.0`.
76
+
77
+ ### Tree View
78
+
79
+ #### `@mui/x-tree-view@8.18.0`
80
+
81
+ - [tree view] Prepare tests for the new store structure (#20225) @flaviendelangle
82
+ - [tree view] Prepare the item plugin files for the store migration (#20240) @flaviendelangle
83
+ - [tree view] Use `TreeItemId` type instead of raw string (#20233) @flaviendelangle
84
+
85
+ #### `@mui/x-tree-view-pro@8.18.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
86
+
87
+ Same changes as in `@mui/x-tree-view@8.18.0`.
88
+
89
+ ### Codemod
90
+
91
+ #### `@mui/x-codemod@8.18.0`
92
+
93
+ Internal changes.
94
+
95
+ ### Docs
96
+
97
+ - [charts] Add a demo for a custom tick label (#20073) @prakhargupta1
98
+ - [charts] Create `useAxes()` hook documentation page (#20229) @JCQuintas
99
+ - [charts] Fix logo alignment (#20228) @JCQuintas
100
+ - [charts] Fixes typo in import example (#20236) @htollefsen
101
+ - [Data Grid] Add recipe for cursor pagination with data source (#19700) @siriwatknp
102
+ - [Data Grid] Add a demo for pinned rows aggregation (#20198) @cherniavskii
103
+
104
+ ### Core
105
+
106
+ - [docs-infra] Use deployment config from docs-infra package (#20243) @brijeshb42
107
+
108
+ ## 8.17.0
109
+
110
+ _Nov 5, 2025_
111
+
112
+ We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
113
+
114
+ - Add `colorGetter` prop to cartesian charts series
115
+
116
+ <img width="400" alt="Image" src="https://github.com/user-attachments/assets/d8b1263f-794e-4939-b17e-87350fdd1746" />
117
+
118
+ - 🌎 Add Catalan (ca-ES) locale on the Data Grid
119
+ - 🌎 Add Norwegian Bokmål (nb-NO) locale on the Charts
120
+ - 🐞 Bugfixes
121
+ - 📚 Documentation improvements
122
+
123
+ Special thanks go out to these community members for their valuable contributions:
124
+ @frncesc, @Methuselah96, @samuelwalk, @htollefsen
125
+
126
+ The following team members contributed to this release:
127
+ @alexfauquette, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @mnajdova, @rita-codes, @arminmeh, @brijeshb42
128
+
129
+ ### Data Grid
130
+
131
+ #### `@mui/x-data-grid@8.17.0`
132
+
133
+ - [DataGrid] Stop event propagation on data grid action buttons (GridActionsCellItem) (#19513) @Copilot
134
+ - [DataGrid] Update cell editable state if `editable` prop is updated in the column definition (#20147) @arminmeh
135
+ - [DataGrid] Wait for external model updates before resetting pagination after sort/filter (#20162) @arminmeh
136
+ - [l10n] Add Catalan (ca-ES) locale (#20154) @frncesc
137
+ - [l10n] Improve Arabic (ar-SD) locale (#20185) @samuelwalk
138
+
139
+ #### `@mui/x-data-grid-pro@8.17.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
140
+
141
+ Same changes as in `@mui/x-data-grid@8.17.0`.
142
+
143
+ #### `@mui/x-data-grid-premium@8.17.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
144
+
145
+ Same changes as in `@mui/x-data-grid-pro@8.17.0`.
146
+
147
+ ### Date and Time Pickers
148
+
149
+ #### `@mui/x-date-pickers@8.17.0`
150
+
151
+ Internal changes.
152
+
153
+ #### `@mui/x-date-pickers-pro@8.17.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
154
+
155
+ Same changes as in `@mui/x-date-pickers@8.17.0`.
156
+
157
+ ### Charts
158
+
159
+ #### `@mui/x-charts@8.17.0`
160
+
161
+ - [charts] Add `barLabel` to bar series. Deprecate `barLabel` in `BarPlot`. (#20184) @bernardobelchior
162
+ - [charts] Add series color callback (#20084) @bernardobelchior
163
+ - [charts] Expose `ChartsSurface` classes (#20180) @bernardobelchior
164
+ - [charts] Fix chart cut off when inside `overflow: scroll` container (#20182) @bernardobelchior
165
+ - [charts] Fix tick label overflow on multiple axes and series demo (#20152) @bernardobelchior
166
+ - [charts] Organize series config (#20155) @bernardobelchior
167
+ - [charts] Use selectors from `@mui/x-internals` (#20052) @alexfauquette
168
+ - [charts] Use store from `@mui/x-internals` (#20121) @alexfauquette
169
+ - [charts] Add `useDataset` hook (#20205) @JCQuintas
170
+ - [l10n] Add Norwegian Bokmål (nb-NO) locale (#20197) @htollefsen
171
+
172
+ #### `@mui/x-charts-pro@8.17.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
173
+
174
+ Same changes as in `@mui/x-charts@8.17.0`, plus:
175
+
176
+ - [charts-pro] Fix zoom pan issue when controlled (#20163) @JCQuintas
177
+
178
+ #### `@mui/x-charts-premium@8.17.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
179
+
180
+ Same changes as in `@mui/x-charts-pro@8.17.0`.
181
+
182
+ ### Tree View
183
+
184
+ #### `@mui/x-tree-view@8.17.0`
185
+
186
+ - [tree view] Accept read only arrays in `expandedItems` prop (#20181) @Methuselah96
187
+ - [tree view] Use `aria-checked` instead of `aria-selected` on items (#19851) @flaviendelangle
188
+
189
+ #### `@mui/x-tree-view-pro@8.17.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
190
+
191
+ Same changes as in `@mui/x-tree-view@8.17.0`.
192
+
193
+ ### Codemod
194
+
195
+ #### `@mui/x-codemod@8.17.0`
196
+
197
+ Internal changes.
198
+
199
+ ### Docs
200
+
201
+ - [docs] Fix focus issues in the action column demo (#20178) @arminmeh
202
+ - [docs] Remove hidden Tree View headless page (#20119) @flaviendelangle
203
+ - [docs] Fix some external redirects (#20211) @Janpot
204
+
205
+ ### Core
206
+
207
+ - [code-infra] Fix cci job timeout due to buffered test output (#20193) @Janpot
208
+ - [code-infra] Fix publish workflow (#20140) @bernardobelchior
209
+ - [code-infra] Increase JSDOM test parallelism (#20179) @Janpot
210
+ - [code-infra] Remove React import requirement for jsx (#20144) @brijeshb42
211
+ - [code-infra] Replace `getInitialProps` with `getStaticProps` (#20192) @Janpot
212
+ - [code-infra] git-ignore next-env.d.ts (#20177) @Janpot
213
+ - [code-infra] Stabilize screenshot testing (#19868) @Janpot
214
+
8
215
  ## 8.16.0
9
216
 
10
217
  _Oct 29, 2025_
@@ -39,7 +246,7 @@ Same changes as in `@mui/x-data-grid@8.16.0`, plus:
39
246
  Same changes as in `@mui/x-data-grid-pro@8.16.0`, plus:
40
247
 
41
248
  - [DataGridPremium] Export and restore chart integration state (#20079) @arminmeh
42
- - [DataGridPremium] Fix grouping column `valueFormatter()` crash (#20070) @sai6855
249
+ - [DataGridPremium] Fix grouping column `valueFormatter()` crash (#20070) @sai6855
43
250
  - [DataGridPremium] Refetch aggregation data after row update with server-side aggregation (#20039) @arminmeh
44
251
 
45
252
  ### Date and Time Pickers
@@ -82,4 +82,4 @@ export interface DayCalendarProps extends ExportedDayCalendarProps, DayValidatio
82
82
  /**
83
83
  * @ignore - do not document.
84
84
  */
85
- export declare function DayCalendar(inProps: DayCalendarProps): React.JSX.Element;
85
+ export declare function DayCalendar(inProps: DayCalendarProps): import("react/jsx-runtime").JSX.Element;
@@ -15,4 +15,4 @@ export interface PickersFadeTransitionGroupProps extends ExportedPickersFadeTran
15
15
  /**
16
16
  * @ignore - do not document.
17
17
  */
18
- export declare function PickersFadeTransitionGroup(inProps: PickersFadeTransitionGroupProps): React.JSX.Element;
18
+ export declare function PickersFadeTransitionGroup(inProps: PickersFadeTransitionGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -22,4 +22,4 @@ export interface SlideTransitionProps extends Omit<CSSTransitionProps, 'timeout'
22
22
  /**
23
23
  * @ignore - do not document.
24
24
  */
25
- export declare function PickersSlideTransition(inProps: SlideTransitionProps): React.JSX.Element;
25
+ export declare function PickersSlideTransition(inProps: SlideTransitionProps): import("react/jsx-runtime").JSX.Element;
@@ -183,7 +183,10 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
183
183
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
184
184
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
185
185
  * @param {TValue} value The value that was just accepted.
186
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
186
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
187
+ * - `validationError`: validation result of the current value
188
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
189
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
187
190
  */
188
191
  onAccept: _propTypes.default.func,
189
192
  /**
@@ -191,7 +194,10 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
191
194
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
192
195
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
193
196
  * @param {TValue} value The new value.
194
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
197
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
198
+ * - `validationError`: validation result of the current value
199
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
200
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
195
201
  */
196
202
  onChange: _propTypes.default.func,
197
203
  /**
@@ -221,7 +221,10 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
221
221
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
222
222
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
223
223
  * @param {TValue} value The value that was just accepted.
224
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
224
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
225
+ * - `validationError`: validation result of the current value
226
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
227
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
225
228
  */
226
229
  onAccept: _propTypes.default.func,
227
230
  /**
@@ -229,7 +232,10 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
229
232
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
230
233
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
231
234
  * @param {TValue} value The new value.
232
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
235
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
236
+ * - `validationError`: validation result of the current value
237
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
238
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
233
239
  */
234
240
  onChange: _propTypes.default.func,
235
241
  /**
@@ -33,7 +33,7 @@ export interface DateTimePickerTabsProps extends ExportedBaseTabsProps {
33
33
  * - [DateTimePickerTabs API](https://mui.com/x/api/date-pickers/date-time-picker-tabs/)
34
34
  */
35
35
  declare const DateTimePickerTabs: {
36
- (inProps: DateTimePickerTabsProps): React.JSX.Element | null;
36
+ (inProps: DateTimePickerTabsProps): import("react/jsx-runtime").JSX.Element | null;
37
37
  propTypes: any;
38
38
  };
39
39
  export { DateTimePickerTabs };
@@ -40,7 +40,7 @@ export declare const DateTimePickerToolbarOverrideContext: React.Context<{
40
40
  *
41
41
  * - [DateTimePickerToolbar API](https://mui.com/x/api/date-pickers/date-time-picker-toolbar/)
42
42
  */
43
- declare function DateTimePickerToolbar(inProps: DateTimePickerToolbarProps): React.JSX.Element;
43
+ declare function DateTimePickerToolbar(inProps: DateTimePickerToolbarProps): import("react/jsx-runtime").JSX.Element;
44
44
  declare namespace DateTimePickerToolbar {
45
45
  var propTypes: any;
46
46
  }
@@ -264,7 +264,8 @@ function DateTimePickerToolbar(inProps) {
264
264
  meridiemMode,
265
265
  handleMeridiemChange
266
266
  } = (0, _dateHelpersHooks.useMeridiemMode)(value, ampm, newValue => setValue(newValue, {
267
- changeImportance: 'set'
267
+ changeImportance: 'set',
268
+ source: 'view'
268
269
  }));
269
270
  const toolbarVariant = overrides?.forceDesktopVariant ? 'desktop' : variant;
270
271
  const isDesktop = toolbarVariant === 'desktop';
@@ -23,7 +23,7 @@ export interface DayCalendarSkeletonProps extends HTMLDivProps {
23
23
  *
24
24
  * - [CalendarPickerSkeleton API](https://mui.com/x/api/date-pickers/calendar-picker-skeleton/)
25
25
  */
26
- declare function DayCalendarSkeleton(inProps: DayCalendarSkeletonProps): React.JSX.Element;
26
+ declare function DayCalendarSkeleton(inProps: DayCalendarSkeletonProps): import("react/jsx-runtime").JSX.Element;
27
27
  declare namespace DayCalendarSkeleton {
28
28
  var propTypes: any;
29
29
  }
@@ -194,7 +194,10 @@ DesktopDatePicker.propTypes = {
194
194
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
195
195
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
196
196
  * @param {TValue} value The value that was just accepted.
197
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
197
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
198
+ * - `validationError`: validation result of the current value
199
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
200
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
198
201
  */
199
202
  onAccept: _propTypes.default.func,
200
203
  /**
@@ -202,7 +205,10 @@ DesktopDatePicker.propTypes = {
202
205
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
203
206
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
204
207
  * @param {TValue} value The new value.
205
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
208
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
209
+ * - `validationError`: validation result of the current value
210
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
211
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
206
212
  */
207
213
  onChange: _propTypes.default.func,
208
214
  /**
@@ -316,7 +316,10 @@ DesktopDateTimePicker.propTypes = {
316
316
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
317
317
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
318
318
  * @param {TValue} value The value that was just accepted.
319
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
319
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
320
+ * - `validationError`: validation result of the current value
321
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
322
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
320
323
  */
321
324
  onAccept: _propTypes.default.func,
322
325
  /**
@@ -324,7 +327,10 @@ DesktopDateTimePicker.propTypes = {
324
327
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
325
328
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
326
329
  * @param {TValue} value The new value.
327
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
330
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
331
+ * - `validationError`: validation result of the current value
332
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
333
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
328
334
  */
329
335
  onChange: _propTypes.default.func,
330
336
  /**
@@ -198,7 +198,10 @@ DesktopTimePicker.propTypes = {
198
198
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
199
199
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
200
200
  * @param {TValue} value The value that was just accepted.
201
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
201
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
202
+ * - `validationError`: validation result of the current value
203
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
204
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
202
205
  */
203
206
  onAccept: _propTypes.default.func,
204
207
  /**
@@ -206,7 +209,10 @@ DesktopTimePicker.propTypes = {
206
209
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
207
210
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
208
211
  * @param {TValue} value The new value.
209
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
212
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
213
+ * - `validationError`: validation result of the current value
214
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
215
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
210
216
  */
211
217
  onChange: _propTypes.default.func,
212
218
  /**
@@ -192,7 +192,10 @@ MobileDatePicker.propTypes = {
192
192
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
193
193
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
194
194
  * @param {TValue} value The value that was just accepted.
195
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
195
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
196
+ * - `validationError`: validation result of the current value
197
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
198
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
196
199
  */
197
200
  onAccept: _propTypes.default.func,
198
201
  /**
@@ -200,7 +203,10 @@ MobileDatePicker.propTypes = {
200
203
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
201
204
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
202
205
  * @param {TValue} value The new value.
203
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
206
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
207
+ * - `validationError`: validation result of the current value
208
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
209
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
204
210
  */
205
211
  onChange: _propTypes.default.func,
206
212
  /**
@@ -282,7 +282,10 @@ MobileDateTimePicker.propTypes = {
282
282
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
283
283
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
284
284
  * @param {TValue} value The value that was just accepted.
285
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
285
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
286
+ * - `validationError`: validation result of the current value
287
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
288
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
286
289
  */
287
290
  onAccept: _propTypes.default.func,
288
291
  /**
@@ -290,7 +293,10 @@ MobileDateTimePicker.propTypes = {
290
293
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
291
294
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
292
295
  * @param {TValue} value The new value.
293
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
296
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
297
+ * - `validationError`: validation result of the current value
298
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
299
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
294
300
  */
295
301
  onChange: _propTypes.default.func,
296
302
  /**
@@ -183,7 +183,10 @@ MobileTimePicker.propTypes = {
183
183
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
184
184
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
185
185
  * @param {TValue} value The value that was just accepted.
186
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
186
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
187
+ * - `validationError`: validation result of the current value
188
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
189
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
187
190
  */
188
191
  onAccept: _propTypes.default.func,
189
192
  /**
@@ -191,7 +194,10 @@ MobileTimePicker.propTypes = {
191
194
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
192
195
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
193
196
  * @param {TValue} value The new value.
194
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
197
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
198
+ * - `validationError`: validation result of the current value
199
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
200
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
195
201
  */
196
202
  onChange: _propTypes.default.func,
197
203
  /**
@@ -21,7 +21,7 @@ export interface PickersActionBarProps extends DialogActionsProps {
21
21
  *
22
22
  * - [PickersActionBar API](https://mui.com/x/api/date-pickers/pickers-action-bar/)
23
23
  */
24
- declare function PickersActionBarComponent(props: PickersActionBarProps): React.JSX.Element | null;
24
+ declare function PickersActionBarComponent(props: PickersActionBarProps): import("react/jsx-runtime").JSX.Element | null;
25
25
  declare namespace PickersActionBarComponent {
26
26
  var propTypes: any;
27
27
  }
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { ListProps } from '@mui/material/List';
3
2
  import { PickerValidValue } from "../internals/models/index.js";
4
3
  import { PickerChangeImportance } from "../models/pickers.js";
@@ -40,7 +39,7 @@ export interface PickersShortcutsProps<TValue extends PickerValidValue> extends
40
39
  *
41
40
  * - [PickersShortcuts API](https://mui.com/x/api/date-pickers/pickers-shortcuts/)
42
41
  */
43
- declare function PickersShortcuts<TValue extends PickerValidValue>(props: PickersShortcutsProps<TValue>): React.JSX.Element | null;
42
+ declare function PickersShortcuts<TValue extends PickerValidValue>(props: PickersShortcutsProps<TValue>): import("react/jsx-runtime").JSX.Element | null;
44
43
  declare namespace PickersShortcuts {
45
44
  var propTypes: any;
46
45
  }
@@ -2,14 +2,12 @@
2
2
  'use client';
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
5
  Object.defineProperty(exports, "__esModule", {
7
6
  value: true
8
7
  });
9
8
  exports.PickersShortcuts = PickersShortcuts;
10
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
- var React = _interopRequireWildcard(require("react"));
13
11
  var _styles = require("@mui/material/styles");
14
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
13
  var _List = _interopRequireDefault(require("@mui/material/List"));
@@ -60,7 +58,8 @@ function PickersShortcuts(props) {
60
58
  onClick: () => {
61
59
  setValue(newValue, {
62
60
  changeImportance,
63
- shortcut: item
61
+ shortcut: item,
62
+ source: 'view'
64
63
  });
65
64
  },
66
65
  disabled: !isValidValue(newValue)
@@ -7,5 +7,5 @@ interface OutlineProps extends React.HTMLAttributes<HTMLFieldSetElement> {
7
7
  /**
8
8
  * @ignore - internal component.
9
9
  */
10
- export default function Outline(props: OutlineProps): React.JSX.Element;
10
+ export default function Outline(props: OutlineProps): import("react/jsx-runtime").JSX.Element;
11
11
  export {};
@@ -149,7 +149,10 @@ StaticDatePicker.propTypes = {
149
149
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
150
150
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
151
151
  * @param {TValue} value The value that was just accepted.
152
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
152
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
153
+ * - `validationError`: validation result of the current value
154
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
155
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
153
156
  */
154
157
  onAccept: _propTypes.default.func,
155
158
  /**
@@ -157,7 +160,10 @@ StaticDatePicker.propTypes = {
157
160
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
158
161
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
159
162
  * @param {TValue} value The new value.
160
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
163
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
164
+ * - `validationError`: validation result of the current value
165
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
166
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
161
167
  */
162
168
  onChange: _propTypes.default.func,
163
169
  /**
@@ -236,7 +236,10 @@ StaticDateTimePicker.propTypes = {
236
236
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
237
237
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
238
238
  * @param {TValue} value The value that was just accepted.
239
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
239
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
240
+ * - `validationError`: validation result of the current value
241
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
242
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
240
243
  */
241
244
  onAccept: _propTypes.default.func,
242
245
  /**
@@ -244,7 +247,10 @@ StaticDateTimePicker.propTypes = {
244
247
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
245
248
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
246
249
  * @param {TValue} value The new value.
247
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
250
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
251
+ * - `validationError`: validation result of the current value
252
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
253
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
248
254
  */
249
255
  onChange: _propTypes.default.func,
250
256
  /**
@@ -139,7 +139,10 @@ StaticTimePicker.propTypes = {
139
139
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
140
140
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
141
141
  * @param {TValue} value The value that was just accepted.
142
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
142
+ * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
143
+ * - `validationError`: validation result of the current value
144
+ * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
145
+ * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
143
146
  */
144
147
  onAccept: _propTypes.default.func,
145
148
  /**
@@ -147,7 +150,10 @@ StaticTimePicker.propTypes = {
147
150
  * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
148
151
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
149
152
  * @param {TValue} value The new value.
150
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
153
+ * @param {FieldChangeHandlerContext<TError>} context Context about this change:
154
+ * - `validationError`: validation result of the current value
155
+ * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
156
+ * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
151
157
  */
152
158
  onChange: _propTypes.default.func,
153
159
  /**
@@ -47,4 +47,4 @@ export interface ClockOwnerState extends PickerOwnerState {
47
47
  /**
48
48
  * @ignore - internal component.
49
49
  */
50
- export declare function Clock(inProps: ClockProps): React.JSX.Element;
50
+ export declare function Clock(inProps: ClockProps): import("react/jsx-runtime").JSX.Element;
@@ -34,4 +34,4 @@ export interface ClockNumberOwnerState extends PickerOwnerState {
34
34
  /**
35
35
  * @ignore - internal component.
36
36
  */
37
- export declare function ClockNumber(inProps: ClockNumberProps): React.JSX.Element;
37
+ export declare function ClockNumber(inProps: ClockNumberProps): import("react/jsx-runtime").JSX.Element;