@mui/x-date-pickers 7.22.2 → 8.0.0-alpha.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 (498) hide show
  1. package/AdapterDateFns/AdapterDateFns.d.ts +1 -1
  2. package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +3 -3
  3. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +1 -1
  4. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.d.ts +1 -1
  5. package/AdapterDateFnsV3/AdapterDateFnsV3.d.ts +1 -1
  6. package/AdapterDayjs/AdapterDayjs.d.ts +2 -2
  7. package/AdapterLuxon/AdapterLuxon.d.ts +2 -2
  8. package/AdapterMoment/AdapterMoment.d.ts +2 -2
  9. package/AdapterMomentHijri/AdapterMomentHijri.d.ts +2 -2
  10. package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +2 -2
  11. package/CHANGELOG.md +142 -155
  12. package/DateCalendar/DateCalendar.d.ts +1 -2
  13. package/DateCalendar/DateCalendar.js +20 -22
  14. package/DateCalendar/DateCalendar.types.d.ts +21 -31
  15. package/DateCalendar/DayCalendar.d.ts +25 -24
  16. package/DateCalendar/DayCalendar.js +13 -10
  17. package/DateCalendar/index.d.ts +1 -0
  18. package/DateCalendar/useCalendarState.d.ts +16 -16
  19. package/DateCalendar/useIsDateDisabled.d.ts +2 -2
  20. package/DateField/DateField.d.ts +1 -2
  21. package/DateField/DateField.js +8 -10
  22. package/DateField/DateField.types.d.ts +8 -9
  23. package/DateField/index.d.ts +1 -1
  24. package/DateField/useDateField.d.ts +1 -2
  25. package/DatePicker/DatePicker.d.ts +1 -2
  26. package/DatePicker/DatePicker.js +15 -14
  27. package/DatePicker/DatePicker.types.d.ts +10 -11
  28. package/DatePicker/DatePickerToolbar.d.ts +2 -2
  29. package/DatePicker/DatePickerToolbar.js +12 -2
  30. package/DatePicker/shared.d.ts +11 -11
  31. package/DateTimeField/DateTimeField.d.ts +1 -2
  32. package/DateTimeField/DateTimeField.js +9 -12
  33. package/DateTimeField/DateTimeField.types.d.ts +9 -14
  34. package/DateTimeField/index.d.ts +1 -1
  35. package/DateTimeField/useDateTimeField.d.ts +1 -2
  36. package/DateTimePicker/DateTimePicker.d.ts +1 -2
  37. package/DateTimePicker/DateTimePicker.js +16 -16
  38. package/DateTimePicker/DateTimePicker.types.d.ts +10 -13
  39. package/DateTimePicker/DateTimePickerTabs.d.ts +1 -2
  40. package/DateTimePicker/DateTimePickerTabs.js +2 -2
  41. package/DateTimePicker/DateTimePickerToolbar.d.ts +3 -3
  42. package/DateTimePicker/DateTimePickerToolbar.js +12 -2
  43. package/DateTimePicker/shared.d.ts +12 -12
  44. package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -2
  45. package/DesktopDatePicker/DesktopDatePicker.js +17 -16
  46. package/DesktopDatePicker/DesktopDatePicker.types.d.ts +7 -7
  47. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -2
  48. package/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  49. package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +8 -8
  50. package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +1 -2
  51. package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
  52. package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -2
  53. package/DesktopTimePicker/DesktopTimePicker.js +11 -6
  54. package/DesktopTimePicker/DesktopTimePicker.types.d.ts +8 -8
  55. package/DigitalClock/DigitalClock.d.ts +1 -2
  56. package/DigitalClock/DigitalClock.js +7 -6
  57. package/DigitalClock/DigitalClock.types.d.ts +4 -4
  58. package/LocalizationProvider/LocalizationProvider.d.ts +12 -12
  59. package/MobileDatePicker/MobileDatePicker.d.ts +1 -2
  60. package/MobileDatePicker/MobileDatePicker.js +17 -16
  61. package/MobileDatePicker/MobileDatePicker.types.d.ts +7 -7
  62. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +2 -2
  63. package/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  64. package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +7 -7
  65. package/MobileTimePicker/MobileTimePicker.d.ts +2 -2
  66. package/MobileTimePicker/MobileTimePicker.js +11 -6
  67. package/MobileTimePicker/MobileTimePicker.types.d.ts +7 -7
  68. package/MonthCalendar/MonthCalendar.d.ts +3 -4
  69. package/MonthCalendar/MonthCalendar.js +17 -14
  70. package/MonthCalendar/MonthCalendar.types.d.ts +14 -15
  71. package/MonthCalendar/PickersMonth.js +17 -13
  72. package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +1 -2
  73. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
  74. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +3 -4
  75. package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +9 -9
  76. package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +2 -3
  77. package/PickersActionBar/PickersActionBar.js +2 -2
  78. package/PickersCalendarHeader/PickersCalendarHeader.d.ts +1 -2
  79. package/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  80. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +9 -9
  81. package/PickersDay/PickersDay.d.ts +8 -8
  82. package/PickersLayout/PickersLayout.d.ts +2 -3
  83. package/PickersLayout/PickersLayout.js +10 -0
  84. package/PickersLayout/PickersLayout.types.d.ts +14 -17
  85. package/PickersLayout/index.d.ts +1 -1
  86. package/PickersLayout/usePickerLayout.d.ts +1 -2
  87. package/PickersLayout/usePickerLayout.js +17 -18
  88. package/README.md +2 -2
  89. package/StaticDatePicker/StaticDatePicker.d.ts +1 -2
  90. package/StaticDatePicker/StaticDatePicker.js +14 -13
  91. package/StaticDatePicker/StaticDatePicker.types.d.ts +7 -7
  92. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +1 -2
  93. package/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  94. package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +7 -7
  95. package/StaticTimePicker/StaticTimePicker.d.ts +1 -2
  96. package/StaticTimePicker/StaticTimePicker.js +8 -3
  97. package/StaticTimePicker/StaticTimePicker.types.d.ts +7 -7
  98. package/TimeClock/Clock.d.ts +4 -5
  99. package/TimeClock/Clock.js +3 -3
  100. package/TimeClock/ClockNumbers.d.ts +5 -5
  101. package/TimeClock/TimeClock.d.ts +1 -2
  102. package/TimeClock/TimeClock.js +7 -6
  103. package/TimeClock/TimeClock.types.d.ts +4 -4
  104. package/TimeField/TimeField.d.ts +1 -2
  105. package/TimeField/TimeField.js +6 -6
  106. package/TimeField/TimeField.types.d.ts +9 -14
  107. package/TimeField/index.d.ts +1 -1
  108. package/TimeField/useTimeField.d.ts +1 -2
  109. package/TimePicker/TimePicker.d.ts +1 -2
  110. package/TimePicker/TimePicker.js +9 -4
  111. package/TimePicker/TimePicker.types.d.ts +10 -13
  112. package/TimePicker/TimePickerToolbar.d.ts +2 -2
  113. package/TimePicker/TimePickerToolbar.js +12 -2
  114. package/TimePicker/shared.d.ts +10 -10
  115. package/YearCalendar/PickersYear.js +17 -13
  116. package/YearCalendar/YearCalendar.d.ts +1 -2
  117. package/YearCalendar/YearCalendar.js +17 -14
  118. package/YearCalendar/YearCalendar.types.d.ts +14 -15
  119. package/dateViewRenderers/dateViewRenderers.d.ts +3 -3
  120. package/hooks/index.d.ts +2 -2
  121. package/hooks/index.js +2 -2
  122. package/hooks/useClearableField.js +4 -3
  123. package/hooks/useParsedFormat.d.ts +2 -3
  124. package/hooks/useParsedFormat.js +2 -2
  125. package/hooks/usePickerContext.d.ts +4 -0
  126. package/hooks/usePickerContext.js +15 -0
  127. package/hooks/usePickerTranslations.d.ts +1 -0
  128. package/{modern/hooks/usePickersTranslations.js → hooks/usePickerTranslations.js} +1 -1
  129. package/index.js +1 -1
  130. package/internals/components/{PickersProvider.d.ts → PickerProvider.d.ts} +15 -8
  131. package/internals/components/PickerProvider.js +38 -0
  132. package/internals/hooks/date-helpers-hooks.d.ts +6 -6
  133. package/internals/hooks/defaultizedFieldProps.d.ts +7 -8
  134. package/internals/hooks/useClockReferenceDate.d.ts +5 -5
  135. package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -2
  136. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
  137. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +15 -15
  138. package/internals/hooks/useField/buildSectionsFromFormat.d.ts +5 -5
  139. package/internals/hooks/useField/useField.d.ts +3 -3
  140. package/internals/hooks/useField/useField.js +1 -1
  141. package/internals/hooks/useField/useField.types.d.ts +38 -48
  142. package/internals/hooks/useField/useField.utils.d.ts +13 -13
  143. package/internals/hooks/useField/useField.utils.js +2 -1
  144. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +4 -4
  145. package/internals/hooks/useField/useFieldState.d.ts +4 -4
  146. package/internals/hooks/useField/useFieldState.js +3 -3
  147. package/internals/hooks/useField/useFieldV7TextField.js +2 -2
  148. package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -2
  149. package/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
  150. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +12 -12
  151. package/internals/hooks/usePicker/usePicker.d.ts +2 -2
  152. package/internals/hooks/usePicker/usePicker.js +12 -4
  153. package/internals/hooks/usePicker/usePicker.types.d.ts +7 -5
  154. package/internals/hooks/usePicker/usePickerLayoutProps.d.ts +2 -3
  155. package/internals/hooks/usePicker/usePickerOwnerState.d.ts +4 -3
  156. package/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
  157. package/internals/hooks/usePicker/usePickerProvider.d.ts +10 -0
  158. package/internals/hooks/usePicker/usePickerProvider.js +21 -0
  159. package/internals/hooks/usePicker/usePickerValue.d.ts +2 -2
  160. package/internals/hooks/usePicker/usePickerValue.js +2 -7
  161. package/internals/hooks/usePicker/usePickerValue.types.d.ts +32 -34
  162. package/internals/hooks/usePicker/usePickerViews.d.ts +6 -11
  163. package/internals/hooks/usePickerPrivateContext.d.ts +4 -0
  164. package/internals/hooks/usePickerPrivateContext.js +9 -0
  165. package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -2
  166. package/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
  167. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +6 -6
  168. package/internals/hooks/useUtils.d.ts +7 -7
  169. package/internals/hooks/useValueWithTimezone.d.ts +5 -5
  170. package/internals/hooks/useViews.d.ts +3 -3
  171. package/internals/hooks/useViews.js +1 -1
  172. package/internals/index.d.ts +6 -4
  173. package/internals/index.js +2 -1
  174. package/internals/models/fields.d.ts +32 -7
  175. package/internals/models/formProps.d.ts +14 -0
  176. package/internals/models/helpers.d.ts +0 -4
  177. package/internals/models/index.d.ts +2 -0
  178. package/internals/models/index.js +3 -1
  179. package/internals/models/props/basePickerProps.d.ts +5 -6
  180. package/internals/models/props/{clock.d.ts → time.d.ts} +10 -17
  181. package/internals/models/props/toolbar.d.ts +2 -3
  182. package/internals/models/validation.d.ts +21 -25
  183. package/internals/models/value.d.ts +3 -0
  184. package/internals/models/value.js +1 -0
  185. package/internals/utils/date-time-utils.d.ts +7 -7
  186. package/internals/utils/date-utils.d.ts +16 -16
  187. package/internals/utils/getDefaultReferenceDate.d.ts +10 -10
  188. package/internals/utils/time-utils.d.ts +5 -5
  189. package/internals/utils/valueManagers.d.ts +3 -3
  190. package/locales/beBY.d.ts +3 -3
  191. package/locales/beBY.js +3 -3
  192. package/locales/bgBG.d.ts +3 -3
  193. package/locales/bgBG.js +3 -3
  194. package/locales/caES.d.ts +3 -3
  195. package/locales/caES.js +3 -3
  196. package/locales/csCZ.d.ts +3 -3
  197. package/locales/csCZ.js +3 -3
  198. package/locales/daDK.d.ts +3 -3
  199. package/locales/daDK.js +3 -3
  200. package/locales/deDE.d.ts +3 -3
  201. package/locales/deDE.js +3 -3
  202. package/locales/elGR.d.ts +3 -3
  203. package/locales/elGR.js +12 -13
  204. package/locales/enUS.d.ts +4 -4
  205. package/locales/enUS.js +3 -3
  206. package/locales/esES.d.ts +3 -3
  207. package/locales/esES.js +3 -3
  208. package/locales/eu.d.ts +3 -3
  209. package/locales/eu.js +3 -3
  210. package/locales/faIR.d.ts +3 -3
  211. package/locales/faIR.js +3 -3
  212. package/locales/fiFI.d.ts +3 -3
  213. package/locales/fiFI.js +3 -3
  214. package/locales/frFR.d.ts +3 -3
  215. package/locales/frFR.js +3 -3
  216. package/locales/heIL.d.ts +3 -3
  217. package/locales/heIL.js +3 -3
  218. package/locales/hrHR.d.ts +3 -3
  219. package/locales/hrHR.js +3 -3
  220. package/locales/huHU.d.ts +3 -3
  221. package/locales/huHU.js +3 -3
  222. package/locales/isIS.d.ts +3 -3
  223. package/locales/isIS.js +3 -3
  224. package/locales/itIT.d.ts +3 -3
  225. package/locales/itIT.js +3 -3
  226. package/locales/jaJP.d.ts +3 -3
  227. package/locales/jaJP.js +3 -3
  228. package/locales/koKR.d.ts +3 -3
  229. package/locales/koKR.js +3 -3
  230. package/locales/kzKZ.d.ts +3 -3
  231. package/locales/kzKZ.js +3 -3
  232. package/locales/mk.d.ts +3 -3
  233. package/locales/mk.js +3 -3
  234. package/locales/nbNO.d.ts +3 -3
  235. package/locales/nbNO.js +3 -3
  236. package/locales/nlNL.d.ts +3 -3
  237. package/locales/nlNL.js +3 -3
  238. package/locales/nnNO.d.ts +3 -3
  239. package/locales/nnNO.js +3 -3
  240. package/locales/plPL.d.ts +3 -3
  241. package/locales/plPL.js +3 -3
  242. package/locales/ptBR.d.ts +3 -3
  243. package/locales/ptBR.js +5 -3
  244. package/locales/ptPT.d.ts +3 -3
  245. package/locales/ptPT.js +3 -3
  246. package/locales/roRO.d.ts +3 -3
  247. package/locales/roRO.js +3 -3
  248. package/locales/ruRU.d.ts +3 -3
  249. package/locales/ruRU.js +3 -3
  250. package/locales/skSK.d.ts +3 -3
  251. package/locales/skSK.js +3 -3
  252. package/locales/svSE.d.ts +3 -3
  253. package/locales/svSE.js +3 -3
  254. package/locales/trTR.d.ts +3 -3
  255. package/locales/trTR.js +3 -3
  256. package/locales/ukUA.d.ts +3 -3
  257. package/locales/ukUA.js +3 -3
  258. package/locales/urPK.d.ts +3 -3
  259. package/locales/urPK.js +3 -3
  260. package/locales/utils/getPickersLocalization.d.ts +9 -9
  261. package/locales/utils/getPickersLocalization.js +1 -1
  262. package/locales/utils/pickersLocaleTextApi.d.ts +12 -36
  263. package/locales/viVN.d.ts +3 -3
  264. package/locales/viVN.js +3 -3
  265. package/locales/zhCN.d.ts +3 -3
  266. package/locales/zhCN.js +3 -3
  267. package/locales/zhHK.d.ts +3 -3
  268. package/locales/zhHK.js +3 -3
  269. package/models/adapters.d.ts +151 -202
  270. package/models/fields.d.ts +9 -41
  271. package/models/pickers.d.ts +10 -6
  272. package/modern/DateCalendar/DateCalendar.js +20 -22
  273. package/modern/DateCalendar/DayCalendar.js +13 -10
  274. package/modern/DateField/DateField.js +8 -10
  275. package/modern/DatePicker/DatePicker.js +15 -14
  276. package/modern/DatePicker/DatePickerToolbar.js +12 -2
  277. package/modern/DateTimeField/DateTimeField.js +9 -12
  278. package/modern/DateTimePicker/DateTimePicker.js +16 -16
  279. package/modern/DateTimePicker/DateTimePickerTabs.js +2 -2
  280. package/modern/DateTimePicker/DateTimePickerToolbar.js +12 -2
  281. package/modern/DesktopDatePicker/DesktopDatePicker.js +17 -16
  282. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  283. package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
  284. package/modern/DesktopTimePicker/DesktopTimePicker.js +11 -6
  285. package/modern/DigitalClock/DigitalClock.js +7 -6
  286. package/modern/MobileDatePicker/MobileDatePicker.js +17 -16
  287. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  288. package/modern/MobileTimePicker/MobileTimePicker.js +11 -6
  289. package/modern/MonthCalendar/MonthCalendar.js +17 -14
  290. package/modern/MonthCalendar/PickersMonth.js +17 -13
  291. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
  292. package/modern/PickersActionBar/PickersActionBar.js +2 -2
  293. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  294. package/modern/PickersLayout/PickersLayout.js +10 -0
  295. package/modern/PickersLayout/usePickerLayout.js +17 -18
  296. package/modern/StaticDatePicker/StaticDatePicker.js +14 -13
  297. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  298. package/modern/StaticTimePicker/StaticTimePicker.js +8 -3
  299. package/modern/TimeClock/Clock.js +3 -3
  300. package/modern/TimeClock/TimeClock.js +7 -6
  301. package/modern/TimeField/TimeField.js +6 -6
  302. package/modern/TimePicker/TimePicker.js +9 -4
  303. package/modern/TimePicker/TimePickerToolbar.js +12 -2
  304. package/modern/YearCalendar/PickersYear.js +17 -13
  305. package/modern/YearCalendar/YearCalendar.js +17 -14
  306. package/modern/hooks/index.js +2 -2
  307. package/modern/hooks/useClearableField.js +4 -3
  308. package/modern/hooks/useParsedFormat.js +2 -2
  309. package/modern/hooks/usePickerContext.js +15 -0
  310. package/{hooks/usePickersTranslations.js → modern/hooks/usePickerTranslations.js} +1 -1
  311. package/modern/index.js +1 -1
  312. package/modern/internals/components/PickerProvider.js +38 -0
  313. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
  314. package/modern/internals/hooks/useField/useField.js +1 -1
  315. package/modern/internals/hooks/useField/useField.utils.js +2 -1
  316. package/modern/internals/hooks/useField/useFieldState.js +3 -3
  317. package/modern/internals/hooks/useField/useFieldV7TextField.js +2 -2
  318. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
  319. package/modern/internals/hooks/usePicker/usePicker.js +12 -4
  320. package/modern/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
  321. package/modern/internals/hooks/usePicker/usePickerProvider.js +21 -0
  322. package/modern/internals/hooks/usePicker/usePickerValue.js +2 -7
  323. package/modern/internals/hooks/usePickerPrivateContext.js +9 -0
  324. package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
  325. package/modern/internals/hooks/useViews.js +1 -1
  326. package/modern/internals/index.js +2 -1
  327. package/modern/internals/models/formProps.js +1 -0
  328. package/modern/internals/models/index.js +3 -1
  329. package/modern/internals/models/props/time.js +1 -0
  330. package/modern/internals/models/value.js +1 -0
  331. package/modern/locales/beBY.js +3 -3
  332. package/modern/locales/bgBG.js +3 -3
  333. package/modern/locales/caES.js +3 -3
  334. package/modern/locales/csCZ.js +3 -3
  335. package/modern/locales/daDK.js +3 -3
  336. package/modern/locales/deDE.js +3 -3
  337. package/modern/locales/elGR.js +12 -13
  338. package/modern/locales/enUS.js +3 -3
  339. package/modern/locales/esES.js +3 -3
  340. package/modern/locales/eu.js +3 -3
  341. package/modern/locales/faIR.js +3 -3
  342. package/modern/locales/fiFI.js +3 -3
  343. package/modern/locales/frFR.js +3 -3
  344. package/modern/locales/heIL.js +3 -3
  345. package/modern/locales/hrHR.js +3 -3
  346. package/modern/locales/huHU.js +3 -3
  347. package/modern/locales/isIS.js +3 -3
  348. package/modern/locales/itIT.js +3 -3
  349. package/modern/locales/jaJP.js +3 -3
  350. package/modern/locales/koKR.js +3 -3
  351. package/modern/locales/kzKZ.js +3 -3
  352. package/modern/locales/mk.js +3 -3
  353. package/modern/locales/nbNO.js +3 -3
  354. package/modern/locales/nlNL.js +3 -3
  355. package/modern/locales/nnNO.js +3 -3
  356. package/modern/locales/plPL.js +3 -3
  357. package/modern/locales/ptBR.js +5 -3
  358. package/modern/locales/ptPT.js +3 -3
  359. package/modern/locales/roRO.js +3 -3
  360. package/modern/locales/ruRU.js +3 -3
  361. package/modern/locales/skSK.js +3 -3
  362. package/modern/locales/svSE.js +3 -3
  363. package/modern/locales/trTR.js +3 -3
  364. package/modern/locales/ukUA.js +3 -3
  365. package/modern/locales/urPK.js +3 -3
  366. package/modern/locales/utils/getPickersLocalization.js +1 -1
  367. package/modern/locales/viVN.js +3 -3
  368. package/modern/locales/zhCN.js +3 -3
  369. package/modern/locales/zhHK.js +3 -3
  370. package/modern/validation/useValidation.js +2 -3
  371. package/modern/validation/validateDate.js +5 -0
  372. package/modern/validation/validateDateTime.js +5 -0
  373. package/modern/validation/validateTime.js +5 -0
  374. package/node/DateCalendar/DateCalendar.js +20 -22
  375. package/node/DateCalendar/DayCalendar.js +13 -10
  376. package/node/DateField/DateField.js +8 -10
  377. package/node/DatePicker/DatePicker.js +15 -14
  378. package/node/DatePicker/DatePickerToolbar.js +12 -2
  379. package/node/DateTimeField/DateTimeField.js +9 -12
  380. package/node/DateTimePicker/DateTimePicker.js +16 -16
  381. package/node/DateTimePicker/DateTimePickerTabs.js +2 -2
  382. package/node/DateTimePicker/DateTimePickerToolbar.js +12 -2
  383. package/node/DesktopDatePicker/DesktopDatePicker.js +17 -16
  384. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  385. package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
  386. package/node/DesktopTimePicker/DesktopTimePicker.js +11 -6
  387. package/node/DigitalClock/DigitalClock.js +7 -6
  388. package/node/MobileDatePicker/MobileDatePicker.js +17 -16
  389. package/node/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  390. package/node/MobileTimePicker/MobileTimePicker.js +11 -6
  391. package/node/MonthCalendar/MonthCalendar.js +17 -14
  392. package/node/MonthCalendar/PickersMonth.js +17 -13
  393. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
  394. package/node/PickersActionBar/PickersActionBar.js +2 -2
  395. package/node/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  396. package/node/PickersLayout/PickersLayout.js +10 -0
  397. package/node/PickersLayout/usePickerLayout.js +17 -18
  398. package/node/StaticDatePicker/StaticDatePicker.js +14 -13
  399. package/node/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  400. package/node/StaticTimePicker/StaticTimePicker.js +8 -3
  401. package/node/TimeClock/Clock.js +3 -3
  402. package/node/TimeClock/TimeClock.js +7 -6
  403. package/node/TimeField/TimeField.js +6 -6
  404. package/node/TimePicker/TimePicker.js +9 -4
  405. package/node/TimePicker/TimePickerToolbar.js +12 -2
  406. package/node/YearCalendar/PickersYear.js +17 -13
  407. package/node/YearCalendar/YearCalendar.js +17 -14
  408. package/node/hooks/index.js +6 -6
  409. package/node/hooks/useClearableField.js +4 -3
  410. package/node/hooks/useParsedFormat.js +2 -2
  411. package/node/hooks/usePickerContext.js +21 -0
  412. package/node/hooks/usePickerTranslations.js +10 -0
  413. package/node/index.js +1 -1
  414. package/node/internals/components/PickerProvider.js +46 -0
  415. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
  416. package/node/internals/hooks/useField/useField.js +1 -1
  417. package/node/internals/hooks/useField/useField.utils.js +2 -1
  418. package/node/internals/hooks/useField/useFieldState.js +3 -3
  419. package/node/internals/hooks/useField/useFieldV7TextField.js +2 -2
  420. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
  421. package/node/internals/hooks/usePicker/usePicker.js +12 -4
  422. package/node/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
  423. package/node/internals/hooks/usePicker/usePickerProvider.js +28 -0
  424. package/node/internals/hooks/usePicker/usePickerValue.js +1 -7
  425. package/node/internals/hooks/usePickerPrivateContext.js +15 -0
  426. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
  427. package/node/internals/hooks/useViews.js +3 -3
  428. package/node/internals/index.js +14 -7
  429. package/node/internals/models/index.js +22 -0
  430. package/node/internals/models/props/time.js +5 -0
  431. package/node/internals/models/value.js +5 -0
  432. package/node/locales/beBY.js +3 -3
  433. package/node/locales/bgBG.js +3 -3
  434. package/node/locales/caES.js +3 -3
  435. package/node/locales/csCZ.js +3 -3
  436. package/node/locales/daDK.js +3 -3
  437. package/node/locales/deDE.js +3 -3
  438. package/node/locales/elGR.js +12 -13
  439. package/node/locales/enUS.js +3 -3
  440. package/node/locales/esES.js +3 -3
  441. package/node/locales/eu.js +3 -3
  442. package/node/locales/faIR.js +3 -3
  443. package/node/locales/fiFI.js +3 -3
  444. package/node/locales/frFR.js +3 -3
  445. package/node/locales/heIL.js +3 -3
  446. package/node/locales/hrHR.js +3 -3
  447. package/node/locales/huHU.js +3 -3
  448. package/node/locales/isIS.js +3 -3
  449. package/node/locales/itIT.js +3 -3
  450. package/node/locales/jaJP.js +3 -3
  451. package/node/locales/koKR.js +3 -3
  452. package/node/locales/kzKZ.js +3 -3
  453. package/node/locales/mk.js +3 -3
  454. package/node/locales/nbNO.js +3 -3
  455. package/node/locales/nlNL.js +3 -3
  456. package/node/locales/nnNO.js +3 -3
  457. package/node/locales/plPL.js +3 -3
  458. package/node/locales/ptBR.js +5 -3
  459. package/node/locales/ptPT.js +3 -3
  460. package/node/locales/roRO.js +3 -3
  461. package/node/locales/ruRU.js +3 -3
  462. package/node/locales/skSK.js +3 -3
  463. package/node/locales/svSE.js +3 -3
  464. package/node/locales/trTR.js +3 -3
  465. package/node/locales/ukUA.js +3 -3
  466. package/node/locales/urPK.js +3 -3
  467. package/node/locales/utils/getPickersLocalization.js +1 -1
  468. package/node/locales/viVN.js +3 -3
  469. package/node/locales/zhCN.js +3 -3
  470. package/node/locales/zhHK.js +3 -3
  471. package/node/validation/useValidation.js +2 -3
  472. package/node/validation/validateDate.js +4 -0
  473. package/node/validation/validateDateTime.js +4 -0
  474. package/node/validation/validateTime.js +4 -0
  475. package/package.json +3 -3
  476. package/themeAugmentation/props.d.ts +28 -28
  477. package/timeViewRenderers/timeViewRenderers.d.ts +6 -6
  478. package/validation/extractValidationProps.d.ts +4 -4
  479. package/validation/useValidation.d.ts +9 -10
  480. package/validation/useValidation.js +2 -3
  481. package/validation/validateDate.d.ts +7 -2
  482. package/validation/validateDate.js +5 -0
  483. package/validation/validateDateTime.d.ts +10 -4
  484. package/validation/validateDateTime.js +5 -0
  485. package/validation/validateTime.d.ts +7 -2
  486. package/validation/validateTime.js +5 -0
  487. package/hooks/usePickersContext.d.ts +0 -4
  488. package/hooks/usePickersContext.js +0 -15
  489. package/hooks/usePickersTranslations.d.ts +0 -2
  490. package/internals/components/PickersProvider.js +0 -26
  491. package/modern/hooks/usePickersContext.js +0 -15
  492. package/modern/internals/components/PickersProvider.js +0 -26
  493. package/node/hooks/usePickersContext.js +0 -21
  494. package/node/hooks/usePickersTranslations.js +0 -10
  495. package/node/internals/components/PickersProvider.js +0 -34
  496. /package/internals/models/{props/clock.js → formProps.js} +0 -0
  497. /package/{modern/internals/models/props/clock.js → internals/models/props/time.js} +0 -0
  498. /package/node/internals/models/{props/clock.js → formProps.js} +0 -0
@@ -0,0 +1,15 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { PickerContext } from "../internals/components/PickerProvider.js";
5
+
6
+ /**
7
+ * Returns the context passed by the picker that wraps the current component.
8
+ */
9
+ export const usePickerContext = () => {
10
+ const value = React.useContext(PickerContext);
11
+ if (value == null) {
12
+ throw new Error(['MUI X: The `usePickerContext` can only be called in fields that are used as a slot of a picker component'].join('\n'));
13
+ }
14
+ return value;
15
+ };
@@ -0,0 +1 @@
1
+ export declare const usePickerTranslations: () => import("..").PickersLocaleText;
@@ -1,4 +1,4 @@
1
1
  'use client';
2
2
 
3
3
  import { useLocalizationContext } from "../internals/hooks/useUtils.js";
4
- export const usePickersTranslations = () => useLocalizationContext().localeText;
4
+ export const usePickerTranslations = () => useLocalizationContext().localeText;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.22.2
2
+ * @mui/x-date-pickers v8.0.0-alpha.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
- import { PickerValidDate } from '../../models';
2
+ import { PickerOwnerState } from '../../models';
3
3
  import { PickersInputLocaleText } from '../../locales';
4
- export declare const PickersContext: React.Context<PickersContextValue | null>;
4
+ export declare const PickerContext: React.Context<PickerContextValue | null>;
5
+ export declare const PickerPrivateContext: React.Context<PickerPrivateContextValue>;
5
6
  /**
6
7
  * Provides the context for the various parts of a picker component:
7
8
  * - contextValue: the context for the picker sub-components.
@@ -9,13 +10,14 @@ export declare const PickersContext: React.Context<PickersContextValue | null>;
9
10
  *
10
11
  * @ignore - do not document.
11
12
  */
12
- export declare function PickersProvider<TDate extends PickerValidDate>(props: PickersFieldProviderProps<TDate>): React.JSX.Element;
13
- interface PickersFieldProviderProps<TDate extends PickerValidDate> {
14
- contextValue: PickersContextValue;
15
- localeText: PickersInputLocaleText<TDate> | undefined;
13
+ export declare function PickerProvider(props: PickerProviderProps): React.JSX.Element;
14
+ export interface PickerProviderProps {
15
+ contextValue: PickerContextValue;
16
+ privateContextValue: PickerPrivateContextValue;
17
+ localeText: PickersInputLocaleText | undefined;
16
18
  children: React.ReactNode;
17
19
  }
18
- export interface PickersContextValue {
20
+ export interface PickerContextValue {
19
21
  /**
20
22
  * Open the picker.
21
23
  * @param {React.UIEvent} event The DOM event that triggered the change.
@@ -31,4 +33,9 @@ export interface PickersContextValue {
31
33
  */
32
34
  open: boolean;
33
35
  }
34
- export {};
36
+ export interface PickerPrivateContextValue {
37
+ /**
38
+ * The ownerState of the picker.
39
+ */
40
+ ownerState: PickerOwnerState;
41
+ }
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { LocalizationProvider } from "../../LocalizationProvider/index.js";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export const PickerContext = /*#__PURE__*/React.createContext(null);
5
+ export const PickerPrivateContext = /*#__PURE__*/React.createContext({
6
+ ownerState: {
7
+ isPickerDisabled: false,
8
+ isPickerReadOnly: false,
9
+ isPickerValueEmpty: false,
10
+ isPickerOpen: false
11
+ }
12
+ });
13
+
14
+ /**
15
+ * Provides the context for the various parts of a picker component:
16
+ * - contextValue: the context for the picker sub-components.
17
+ * - localizationProvider: the translations passed through the props and through a parent LocalizationProvider.
18
+ *
19
+ * @ignore - do not document.
20
+ */
21
+ export function PickerProvider(props) {
22
+ const {
23
+ contextValue,
24
+ privateContextValue,
25
+ localeText,
26
+ children
27
+ } = props;
28
+ return /*#__PURE__*/_jsx(PickerContext.Provider, {
29
+ value: contextValue,
30
+ children: /*#__PURE__*/_jsx(PickerPrivateContext.Provider, {
31
+ value: privateContextValue,
32
+ children: /*#__PURE__*/_jsx(LocalizationProvider, {
33
+ localeText: localeText,
34
+ children: children
35
+ })
36
+ })
37
+ });
38
+ }
@@ -1,16 +1,16 @@
1
1
  import { PickerOnChangeFn } from './useViews';
2
2
  import { PickerSelectionState } from './usePicker';
3
3
  import { PickersTimezone, PickerValidDate } from '../../models';
4
- export interface MonthValidationOptions<TDate extends PickerValidDate> {
4
+ export interface MonthValidationOptions {
5
5
  disablePast?: boolean;
6
6
  disableFuture?: boolean;
7
- minDate: TDate;
8
- maxDate: TDate;
7
+ minDate: PickerValidDate;
8
+ maxDate: PickerValidDate;
9
9
  timezone: PickersTimezone;
10
10
  }
11
- export declare function useNextMonthDisabled<TDate extends PickerValidDate>(month: TDate, { disableFuture, maxDate, timezone, }: Pick<MonthValidationOptions<TDate>, 'disableFuture' | 'maxDate' | 'timezone'>): boolean;
12
- export declare function usePreviousMonthDisabled<TDate extends PickerValidDate>(month: TDate, { disablePast, minDate, timezone, }: Pick<MonthValidationOptions<TDate>, 'disablePast' | 'minDate' | 'timezone'>): boolean;
13
- export declare function useMeridiemMode<TDate extends PickerValidDate>(date: TDate | null, ampm: boolean | undefined, onChange: PickerOnChangeFn<TDate>, selectionState?: PickerSelectionState): {
11
+ export declare function useNextMonthDisabled(month: PickerValidDate, { disableFuture, maxDate, timezone, }: Pick<MonthValidationOptions, 'disableFuture' | 'maxDate' | 'timezone'>): boolean;
12
+ export declare function usePreviousMonthDisabled(month: PickerValidDate, { disablePast, minDate, timezone, }: Pick<MonthValidationOptions, 'disablePast' | 'minDate' | 'timezone'>): boolean;
13
+ export declare function useMeridiemMode(date: PickerValidDate | null, ampm: boolean | undefined, onChange: PickerOnChangeFn, selectionState?: PickerSelectionState): {
14
14
  meridiemMode: import("../utils/time-utils").Meridiem | null;
15
15
  handleMeridiemChange: (mode: "am" | "pm") => void;
16
16
  };
@@ -1,19 +1,18 @@
1
+ import { DefaultizedProps } from '@mui/x-internals/types';
1
2
  import { BaseDateValidationProps, BaseTimeValidationProps, DateTimeValidationProps, TimeValidationProps } from '../models/validation';
2
- import { DefaultizedProps } from '../models/helpers';
3
- import { PickerValidDate } from '../../models';
4
- export interface UseDefaultizedDateFieldBaseProps<TDate extends PickerValidDate> extends BaseDateValidationProps<TDate> {
3
+ export interface UseDefaultizedDateFieldBaseProps extends BaseDateValidationProps {
5
4
  format?: string;
6
5
  }
7
- export declare const useDefaultizedDateField: <TDate extends PickerValidDate, TKnownProps extends UseDefaultizedDateFieldBaseProps<TDate>, TAllProps extends {}>(props: TKnownProps & TAllProps) => TAllProps & DefaultizedProps<TKnownProps, keyof UseDefaultizedDateFieldBaseProps<any>>;
6
+ export declare const useDefaultizedDateField: <TKnownProps extends UseDefaultizedDateFieldBaseProps, TAllProps extends {}>(props: TKnownProps & TAllProps) => TAllProps & DefaultizedProps<TKnownProps, keyof UseDefaultizedDateFieldBaseProps>;
8
7
  export interface UseDefaultizedTimeFieldBaseProps extends BaseTimeValidationProps {
9
8
  format?: string;
10
9
  }
11
- export declare const useDefaultizedTimeField: <TDate extends PickerValidDate, TKnownProps extends UseDefaultizedTimeFieldBaseProps & {
10
+ export declare const useDefaultizedTimeField: <TKnownProps extends UseDefaultizedTimeFieldBaseProps & {
12
11
  ampm?: boolean;
13
12
  }, TAllProps extends {}>(props: TKnownProps & TAllProps) => TAllProps & DefaultizedProps<TKnownProps, keyof UseDefaultizedTimeFieldBaseProps>;
14
- export interface UseDefaultizedDateTimeFieldBaseProps<TDate extends PickerValidDate> extends BaseDateValidationProps<TDate>, BaseTimeValidationProps {
13
+ export interface UseDefaultizedDateTimeFieldBaseProps extends BaseDateValidationProps, BaseTimeValidationProps {
15
14
  format?: string;
16
15
  }
17
- export declare const useDefaultizedDateTimeField: <TDate extends PickerValidDate, TKnownProps extends UseDefaultizedDateTimeFieldBaseProps<TDate> & DateTimeValidationProps<TDate> & TimeValidationProps<TDate> & {
16
+ export declare const useDefaultizedDateTimeField: <TKnownProps extends UseDefaultizedDateTimeFieldBaseProps & DateTimeValidationProps & TimeValidationProps & {
18
17
  ampm?: boolean;
19
- }, TAllProps extends {}>(props: TKnownProps & TAllProps) => TAllProps & DefaultizedProps<TKnownProps, keyof UseDefaultizedDateTimeFieldBaseProps<any>>;
18
+ }, TAllProps extends {}>(props: TKnownProps & TAllProps) => TAllProps & DefaultizedProps<TKnownProps, keyof UseDefaultizedDateTimeFieldBaseProps>;
@@ -1,8 +1,8 @@
1
1
  import { MuiPickersAdapter, PickersTimezone, PickerValidDate } from '../../models';
2
- export declare const useClockReferenceDate: <TDate extends PickerValidDate, TProps extends {}>({ value, referenceDate: referenceDateProp, utils, props, timezone, }: {
3
- value: TDate;
4
- referenceDate: TDate | undefined;
5
- utils: MuiPickersAdapter<TDate>;
2
+ export declare const useClockReferenceDate: <TProps extends {}>({ value, referenceDate: referenceDateProp, utils, props, timezone, }: {
3
+ value: PickerValidDate;
4
+ referenceDate: PickerValidDate | undefined;
5
+ utils: MuiPickersAdapter;
6
6
  props: TProps;
7
7
  timezone: PickersTimezone;
8
- }) => TDate;
8
+ }) => PickerValidDate;
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { UseDesktopPickerParams, UseDesktopPickerProps } from './useDesktopPicker.types';
3
- import { PickerValidDate } from '../../../models';
4
3
  import { DateOrTimeViewWithMeridiem } from '../../models';
5
4
  /**
6
5
  * Hook managing all the single-date desktop pickers:
@@ -8,6 +7,6 @@ import { DateOrTimeViewWithMeridiem } from '../../models';
8
7
  * - DesktopDateTimePicker
9
8
  * - DesktopTimePicker
10
9
  */
11
- export declare const useDesktopPicker: <TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseDesktopPickerProps<TDate, TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>>({ props, getOpenDialogAriaText, ...pickerParams }: UseDesktopPickerParams<TDate, TView, TEnableAccessibleFieldDOMStructure, TExternalProps>) => {
10
+ export declare const useDesktopPicker: <TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseDesktopPickerProps<TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>>({ props, getOpenDialogAriaText, ...pickerParams }: UseDesktopPickerParams<TView, TEnableAccessibleFieldDOMStructure, TExternalProps>) => {
12
11
  renderPicker: () => React.JSX.Element;
13
12
  };
@@ -12,7 +12,7 @@ import useId from '@mui/utils/useId';
12
12
  import { PickersPopper } from "../../components/PickersPopper.js";
13
13
  import { usePicker } from "../usePicker/index.js";
14
14
  import { PickersLayout } from "../../../PickersLayout/index.js";
15
- import { PickersProvider } from "../../components/PickersProvider.js";
15
+ import { PickerProvider } from "../../components/PickerProvider.js";
16
16
 
17
17
  /**
18
18
  * Hook managing all the single-date desktop pickers:
@@ -56,14 +56,15 @@ export const useDesktopPicker = _ref => {
56
56
  actions,
57
57
  hasUIView,
58
58
  layoutProps,
59
+ providerProps,
59
60
  renderCurrentView,
60
61
  shouldRestoreFocus,
61
62
  fieldProps: pickerFieldProps,
62
- contextValue,
63
63
  ownerState
64
64
  } = usePicker(_extends({}, pickerParams, {
65
65
  props,
66
66
  fieldRef,
67
+ localeText,
67
68
  autoFocusView: true,
68
69
  additionalViewProps: {},
69
70
  wrapperVariant: 'desktop'
@@ -75,7 +76,7 @@ export const useDesktopPicker = _ref => {
75
76
  additionalProps: {
76
77
  position: 'end'
77
78
  },
78
- ownerState: props
79
+ ownerState
79
80
  }),
80
81
  inputAdornmentProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
81
82
  const OpenPickerButton = slots.openPickerButton ?? IconButton;
@@ -88,7 +89,7 @@ export const useDesktopPicker = _ref => {
88
89
  'aria-label': getOpenDialogAriaText(pickerFieldProps.value),
89
90
  edge: inputAdornmentProps.position
90
91
  },
91
- ownerState: props
92
+ ownerState
92
93
  }),
93
94
  openPickerButtonProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);
94
95
  const OpenPickerIcon = slots.openPickerIcon;
@@ -101,27 +102,32 @@ export const useDesktopPicker = _ref => {
101
102
  const fieldProps = useSlotProps({
102
103
  elementType: Field,
103
104
  externalSlotProps: innerSlotProps?.field,
104
- additionalProps: _extends({}, pickerFieldProps, isToolbarHidden && {
105
- id: labelId
106
- }, {
105
+ additionalProps: _extends({
106
+ // Internal props
107
107
  readOnly,
108
108
  disabled,
109
- className,
110
- sx,
111
109
  format,
112
110
  formatDensity,
113
111
  enableAccessibleFieldDOMStructure,
114
112
  selectedSections,
115
113
  onSelectedSectionsChange,
116
114
  timezone,
115
+ autoFocus: autoFocus && !props.open
116
+ }, pickerFieldProps, {
117
+ // onChange and value
118
+
119
+ // Forwarded props
120
+ className,
121
+ sx,
117
122
  label,
118
123
  name,
119
- autoFocus: autoFocus && !props.open,
120
124
  focused: open ? true : undefined
121
- }, inputRef ? {
125
+ }, isToolbarHidden && {
126
+ id: labelId
127
+ }, !!inputRef && {
122
128
  inputRef
123
- } : {}),
124
- ownerState: props
129
+ }),
130
+ ownerState
125
131
  });
126
132
 
127
133
  // TODO: Move to `useSlotProps` when https://github.com/mui/material-ui/pull/35088 will be merged
@@ -159,9 +165,7 @@ export const useDesktopPicker = _ref => {
159
165
  }, innerSlotProps?.popper)
160
166
  });
161
167
  const handleFieldRef = useForkRef(fieldRef, fieldProps.unstableFieldRef);
162
- const renderPicker = () => /*#__PURE__*/_jsxs(PickersProvider, {
163
- contextValue: contextValue,
164
- localeText: localeText,
168
+ const renderPicker = () => /*#__PURE__*/_jsxs(PickerProvider, _extends({}, providerProps, {
165
169
  children: [/*#__PURE__*/_jsx(Field, _extends({}, fieldProps, {
166
170
  slots: slotsForField,
167
171
  slotProps: slotProps,
@@ -182,7 +186,7 @@ export const useDesktopPicker = _ref => {
182
186
  children: renderCurrentView()
183
187
  }))
184
188
  }))]
185
- });
189
+ }));
186
190
  return {
187
191
  renderPicker
188
192
  };
@@ -3,17 +3,17 @@ import IconButton, { IconButtonProps } from '@mui/material/IconButton';
3
3
  import { InputAdornmentProps } from '@mui/material/InputAdornment';
4
4
  import TextField from '@mui/material/TextField';
5
5
  import { SlotComponentProps } from '@mui/utils';
6
+ import { MakeRequired, SlotComponentPropsFromProps } from '@mui/x-internals/types';
6
7
  import { BaseNonStaticPickerProps, BasePickerProps, BaseNonRangeNonStaticPickerProps } from '../../models/props/basePickerProps';
7
8
  import { PickersPopperSlots, PickersPopperSlotProps } from '../../components/PickersPopper';
8
- import { UsePickerParams, UsePickerProps } from '../usePicker';
9
- import { BaseSingleInputFieldProps, FieldSection, PickerOwnerState, PickerValidDate } from '../../../models';
9
+ import { UsePickerParams } from '../usePicker';
10
+ import { FieldSection, PickerFieldSlotProps, PickerOwnerState, PickerValidDate } from '../../../models';
10
11
  import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from '../../../PickersLayout/PickersLayout.types';
11
12
  import { UsePickerValueNonStaticProps } from '../usePicker/usePickerValue.types';
12
13
  import { UsePickerViewsNonStaticProps, UsePickerViewsProps } from '../usePicker/usePickerViews';
13
14
  import { DateOrTimeViewWithMeridiem } from '../../models';
14
15
  import { UseClearableFieldSlots, UseClearableFieldSlotProps } from '../../../hooks/useClearableField';
15
- import { SlotComponentPropsFromProps } from '../../models/helpers';
16
- export interface UseDesktopPickerSlots<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem> extends Pick<PickersPopperSlots, 'desktopPaper' | 'desktopTransition' | 'desktopTrapFocus' | 'popper'>, ExportedPickersLayoutSlots<TDate | null, TDate, TView>, UseClearableFieldSlots {
16
+ export interface UseDesktopPickerSlots<TView extends DateOrTimeViewWithMeridiem> extends Pick<PickersPopperSlots, 'desktopPaper' | 'desktopTransition' | 'desktopTrapFocus' | 'popper'>, ExportedPickersLayoutSlots<PickerValidDate | null, TView>, UseClearableFieldSlots {
17
17
  /**
18
18
  * Component used to enter the date with the keyboard.
19
19
  */
@@ -38,14 +38,14 @@ export interface UseDesktopPickerSlots<TDate extends PickerValidDate, TView exte
38
38
  */
39
39
  openPickerIcon: React.ElementType;
40
40
  }
41
- export interface UseDesktopPickerSlotProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean> extends ExportedUseDesktopPickerSlotProps<TDate, TView, TEnableAccessibleFieldDOMStructure>, Pick<PickersLayoutSlotProps<TDate | null, TDate, TView>, 'toolbar'> {
41
+ export interface UseDesktopPickerSlotProps<TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean> extends ExportedUseDesktopPickerSlotProps<TView, TEnableAccessibleFieldDOMStructure>, Pick<PickersLayoutSlotProps<PickerValidDate | null, TView>, 'toolbar'> {
42
42
  }
43
- export interface ExportedUseDesktopPickerSlotProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean> extends PickersPopperSlotProps, ExportedPickersLayoutSlotProps<TDate | null, TDate, TView>, UseClearableFieldSlotProps {
44
- field?: SlotComponentPropsFromProps<BaseSingleInputFieldProps<TDate | null, TDate, FieldSection, TEnableAccessibleFieldDOMStructure, unknown>, {}, UsePickerProps<TDate | null, TDate, any, any, any, any>>;
43
+ export interface ExportedUseDesktopPickerSlotProps<TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean> extends PickersPopperSlotProps, ExportedPickersLayoutSlotProps<PickerValidDate | null, TView>, UseClearableFieldSlotProps {
44
+ field?: SlotComponentPropsFromProps<PickerFieldSlotProps<PickerValidDate | null, FieldSection, TEnableAccessibleFieldDOMStructure>, {}, PickerOwnerState>;
45
45
  textField?: SlotComponentProps<typeof TextField, {}, Record<string, any>>;
46
- inputAdornment?: Partial<InputAdornmentProps>;
47
- openPickerButton?: SlotComponentProps<typeof IconButton, {}, UseDesktopPickerProps<TDate, any, TEnableAccessibleFieldDOMStructure, any, any>>;
48
- openPickerIcon?: SlotComponentPropsFromProps<Record<string, any>, {}, PickerOwnerState<TDate | null>>;
46
+ inputAdornment?: SlotComponentPropsFromProps<InputAdornmentProps, {}, PickerOwnerState>;
47
+ openPickerButton?: SlotComponentProps<typeof IconButton, {}, PickerOwnerState>;
48
+ openPickerIcon?: SlotComponentPropsFromProps<Record<string, any>, {}, PickerOwnerState>;
49
49
  }
50
50
  export interface DesktopOnlyPickerProps extends BaseNonStaticPickerProps, BaseNonRangeNonStaticPickerProps, UsePickerValueNonStaticProps, UsePickerViewsNonStaticProps {
51
51
  /**
@@ -54,19 +54,19 @@ export interface DesktopOnlyPickerProps extends BaseNonStaticPickerProps, BaseNo
54
54
  */
55
55
  autoFocus?: boolean;
56
56
  }
57
- export interface UseDesktopPickerProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TError, TExternalProps extends UsePickerViewsProps<TDate | null, TDate, TView, any, {}>> extends BasePickerProps<TDate | null, TDate, TView, TError, TExternalProps, {}>, DesktopOnlyPickerProps {
57
+ export interface UseDesktopPickerProps<TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TError, TExternalProps extends UsePickerViewsProps<PickerValidDate | null, TView, any, {}>> extends BasePickerProps<PickerValidDate | null, TView, TError, TExternalProps, {}>, MakeRequired<DesktopOnlyPickerProps, 'format'> {
58
58
  /**
59
59
  * Overridable component slots.
60
60
  * @default {}
61
61
  */
62
- slots: UseDesktopPickerSlots<TDate, TView>;
62
+ slots: UseDesktopPickerSlots<TView>;
63
63
  /**
64
64
  * The props used for each component slot.
65
65
  * @default {}
66
66
  */
67
- slotProps?: UseDesktopPickerSlotProps<TDate, TView, TEnableAccessibleFieldDOMStructure>;
67
+ slotProps?: UseDesktopPickerSlotProps<TView, TEnableAccessibleFieldDOMStructure>;
68
68
  }
69
- export interface UseDesktopPickerParams<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseDesktopPickerProps<TDate, TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>> extends Pick<UsePickerParams<TDate | null, TDate, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator' | 'rendererInterceptor'> {
69
+ export interface UseDesktopPickerParams<TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseDesktopPickerProps<TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>> extends Pick<UsePickerParams<PickerValidDate | null, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator' | 'rendererInterceptor'> {
70
70
  props: TExternalProps;
71
- getOpenDialogAriaText: (date: TDate | null) => string;
71
+ getOpenDialogAriaText: (date: PickerValidDate | null) => string;
72
72
  }
@@ -1,15 +1,15 @@
1
1
  import { FieldSection, MuiPickersAdapter, PickerValidDate } from '../../../models';
2
2
  import { PickersLocaleText } from '../../../locales';
3
- interface BuildSectionsFromFormatParams<TDate extends PickerValidDate> {
4
- utils: MuiPickersAdapter<TDate>;
3
+ interface BuildSectionsFromFormatParams {
4
+ utils: MuiPickersAdapter;
5
5
  format: string;
6
6
  formatDensity: 'dense' | 'spacious';
7
7
  isRtl: boolean;
8
8
  shouldRespectLeadingZeros: boolean;
9
- localeText: PickersLocaleText<TDate>;
9
+ localeText: PickersLocaleText;
10
10
  localizedDigits: string[];
11
- date: TDate | null;
11
+ date: PickerValidDate | null;
12
12
  enableAccessibleFieldDOMStructure: boolean;
13
13
  }
14
- export declare const buildSectionsFromFormat: <TDate extends PickerValidDate>(params: BuildSectionsFromFormatParams<TDate>) => FieldSection[];
14
+ export declare const buildSectionsFromFormat: (params: BuildSectionsFromFormatParams) => FieldSection[];
15
15
  export {};
@@ -1,5 +1,5 @@
1
1
  import { UseFieldParams, UseFieldResponse, UseFieldCommonForwardedProps, UseFieldInternalProps, UseFieldForwardedProps } from './useField.types';
2
- import { PickerValidDate, FieldSection } from '../../../models';
3
- export declare const useField: <TValue, TDate extends PickerValidDate, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TForwardedProps extends UseFieldCommonForwardedProps & UseFieldForwardedProps<TEnableAccessibleFieldDOMStructure>, TInternalProps extends UseFieldInternalProps<any, any, any, TEnableAccessibleFieldDOMStructure, any> & {
2
+ import { FieldSection } from '../../../models';
3
+ export declare const useField: <TValue, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TForwardedProps extends UseFieldCommonForwardedProps & UseFieldForwardedProps<TEnableAccessibleFieldDOMStructure>, TInternalProps extends UseFieldInternalProps<any, any, TEnableAccessibleFieldDOMStructure, any> & {
4
4
  minutesStep?: number;
5
- }>(params: UseFieldParams<TValue, TDate, TSection, TEnableAccessibleFieldDOMStructure, TForwardedProps, TInternalProps>) => UseFieldResponse<TEnableAccessibleFieldDOMStructure, TForwardedProps>;
5
+ }>(params: UseFieldParams<TValue, TSection, TEnableAccessibleFieldDOMStructure, TForwardedProps, TInternalProps>) => UseFieldResponse<TEnableAccessibleFieldDOMStructure, TForwardedProps>;
@@ -17,7 +17,7 @@ export const useField = params => {
17
17
  internalProps: {
18
18
  unstableFieldRef,
19
19
  minutesStep,
20
- enableAccessibleFieldDOMStructure = false,
20
+ enableAccessibleFieldDOMStructure = true,
21
21
  disabled = false,
22
22
  readOnly = false
23
23
  },
@@ -6,15 +6,16 @@ import type { UseFieldStateResponse } from './useFieldState';
6
6
  import type { UseFieldCharacterEditingResponse } from './useFieldCharacterEditing';
7
7
  import { PickersSectionElement, PickersSectionListRef } from '../../../PickersSectionList';
8
8
  import { ExportedUseClearableFieldProps } from '../../../hooks/useClearableField';
9
- export interface UseFieldParams<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TForwardedProps extends UseFieldCommonForwardedProps & UseFieldForwardedProps<TEnableAccessibleFieldDOMStructure>, TInternalProps extends UseFieldInternalProps<any, any, any, TEnableAccessibleFieldDOMStructure, any>> {
9
+ import { FormProps } from '../../models';
10
+ export interface UseFieldParams<TValue, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TForwardedProps extends UseFieldCommonForwardedProps & UseFieldForwardedProps<TEnableAccessibleFieldDOMStructure>, TInternalProps extends UseFieldInternalProps<any, any, TEnableAccessibleFieldDOMStructure, any>> {
10
11
  forwardedProps: TForwardedProps;
11
12
  internalProps: TInternalProps;
12
- valueManager: PickerValueManager<TValue, TDate, InferError<TInternalProps>>;
13
- fieldValueManager: FieldValueManager<TValue, TDate, TSection>;
14
- validator: Validator<TValue, TDate, InferError<TInternalProps>, TInternalProps>;
13
+ valueManager: PickerValueManager<TValue, InferError<TInternalProps>>;
14
+ fieldValueManager: FieldValueManager<TValue, TSection>;
15
+ validator: Validator<TValue, InferError<TInternalProps>, TInternalProps>;
15
16
  valueType: FieldValueType;
16
17
  }
17
- export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TError> extends TimezoneProps, OnErrorProps<TValue, TError> {
18
+ export interface UseFieldInternalProps<TValue, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TError> extends TimezoneProps, FormProps, OnErrorProps<TValue, TError> {
18
19
  /**
19
20
  * The selected value.
20
21
  * Used when the component is controlled.
@@ -29,7 +30,7 @@ export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TS
29
30
  * For example, on time fields it will be used to determine the date to set.
30
31
  * @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`. Value is rounded to the most granular section used.
31
32
  */
32
- referenceDate?: TDate;
33
+ referenceDate?: PickerValidDate;
33
34
  /**
34
35
  * Callback fired when the value changes.
35
36
  * @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.
@@ -63,12 +64,6 @@ export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TS
63
64
  * @default false
64
65
  */
65
66
  shouldRespectLeadingZeros?: boolean;
66
- /**
67
- * It prevents the user from changing the value of the field
68
- * (not from interacting with the field).
69
- * @default false
70
- */
71
- readOnly?: boolean;
72
67
  /**
73
68
  * The currently selected sections.
74
69
  * This prop accepts four formats:
@@ -89,7 +84,7 @@ export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TS
89
84
  */
90
85
  unstableFieldRef?: React.Ref<FieldRef<TSection>>;
91
86
  /**
92
- * @default false
87
+ * @default true
93
88
  */
94
89
  enableAccessibleFieldDOMStructure?: TEnableAccessibleFieldDOMStructure;
95
90
  /**
@@ -97,13 +92,8 @@ export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TS
97
92
  * @default false
98
93
  */
99
94
  autoFocus?: boolean;
100
- /**
101
- * If `true`, the component is disabled.
102
- * @default false
103
- */
104
- disabled?: boolean;
105
95
  }
106
- export interface UseFieldCommonAdditionalProps extends Required<Pick<UseFieldInternalProps<any, any, any, any, any>, 'disabled' | 'readOnly'>> {
96
+ export interface UseFieldCommonAdditionalProps extends Required<Pick<UseFieldInternalProps<any, any, any, any>, 'disabled' | 'readOnly'>> {
107
97
  }
108
98
  export interface UseFieldCommonForwardedProps extends ExportedUseClearableFieldProps {
109
99
  onKeyDown?: React.KeyboardEventHandler;
@@ -143,18 +133,18 @@ interface UseFieldV7AdditionalProps {
143
133
  export type UseFieldResponse<TEnableAccessibleFieldDOMStructure extends boolean, TForwardedProps extends UseFieldCommonForwardedProps & {
144
134
  [key: string]: any;
145
135
  }> = Omit<TForwardedProps, keyof UseFieldCommonForwardedProps> & Required<UseFieldCommonForwardedProps> & UseFieldCommonAdditionalProps & (TEnableAccessibleFieldDOMStructure extends false ? UseFieldV6AdditionalProps & Required<UseFieldV6ForwardedProps> : UseFieldV7AdditionalProps & Required<UseFieldV7ForwardedProps>);
146
- export type FieldSectionValueBoundaries<TDate extends PickerValidDate, SectionType extends FieldSectionType> = {
136
+ export type FieldSectionValueBoundaries<SectionType extends FieldSectionType> = {
147
137
  minimum: number;
148
138
  maximum: number;
149
139
  } & (SectionType extends 'day' ? {
150
- longestMonth: TDate;
140
+ longestMonth: PickerValidDate;
151
141
  } : {});
152
- export type FieldSectionsValueBoundaries<TDate extends PickerValidDate> = {
142
+ export type FieldSectionsValueBoundaries = {
153
143
  [SectionType in FieldSectionType]: (params: {
154
- currentDate: TDate | null;
144
+ currentDate: PickerValidDate | null;
155
145
  format: string;
156
146
  contentType: FieldSectionContentType;
157
- }) => FieldSectionValueBoundaries<TDate, SectionType>;
147
+ }) => FieldSectionValueBoundaries<SectionType>;
158
148
  };
159
149
  export type FieldSectionsBoundaries = {
160
150
  [SectionType in FieldSectionType]: {
@@ -170,15 +160,15 @@ export interface FieldChangeHandlerContext<TError> {
170
160
  * Object used to access and update the active date (i.e: the date containing the active section).
171
161
  * Mainly useful in the range fields where we need to update the date containing the active section without impacting the other one.
172
162
  */
173
- interface FieldActiveDateManager<TValue, TDate extends PickerValidDate, TSection extends FieldSection> {
163
+ interface FieldActiveDateManager<TValue, TSection extends FieldSection> {
174
164
  /**
175
165
  * Active date from `state.value`.
176
166
  */
177
- date: TDate | null;
167
+ date: PickerValidDate | null;
178
168
  /**
179
169
  * Active date from the `state.referenceValue`.
180
170
  */
181
- referenceDate: TDate;
171
+ referenceDate: PickerValidDate;
182
172
  /**
183
173
  * @template TSection
184
174
  * @param {TSection[]} sections The sections of the full value.
@@ -188,25 +178,25 @@ interface FieldActiveDateManager<TValue, TDate extends PickerValidDate, TSection
188
178
  getSections: (sections: TSection[]) => TSection[];
189
179
  /**
190
180
  * Creates the new value and reference value based on the new active date and the current state.
191
- * @template TValue, TDate
192
- * @param {TDate | null} newActiveDate The new value of the date containing the active section.
181
+ * @template TValue
182
+ * @param {PickerValidDate | null} newActiveDate The new value of the date containing the active section.
193
183
  * @returns {Pick<UseFieldState<TValue, any>, 'value' | 'referenceValue'>} The new value and reference value to publish and store in the state.
194
184
  */
195
- getNewValuesFromNewActiveDate: (newActiveDate: TDate | null) => Pick<UseFieldState<TValue, any>, 'value' | 'referenceValue'>;
185
+ getNewValuesFromNewActiveDate: (newActiveDate: PickerValidDate | null) => Pick<UseFieldState<TValue, any>, 'value' | 'referenceValue'>;
196
186
  }
197
187
  export type FieldParsedSelectedSections = number | 'all' | null;
198
- export interface FieldValueManager<TValue, TDate extends PickerValidDate, TSection extends FieldSection> {
188
+ export interface FieldValueManager<TValue, TSection extends FieldSection> {
199
189
  /**
200
190
  * Creates the section list from the current value.
201
191
  * The `prevSections` are used on the range fields to avoid losing the sections of a partially filled date when editing the other date.
202
- * @template TValue, TDate, TSection
203
- * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.
192
+ * @template TValue, TSection
193
+ * @param {MuiPickersAdapter} utils The utils to manipulate the date.
204
194
  * @param {TValue} value The current value to generate sections from.
205
195
  * @param {TSection[] | null} fallbackSections The sections to use as a fallback if a date is null or invalid.
206
- * @param {(date: TDate) => FieldSection[]} getSectionsFromDate Returns the sections of the given date.
196
+ * @param {(date: PickerValidDate) => FieldSection[]} getSectionsFromDate Returns the sections of the given date.
207
197
  * @returns {TSection[]} The new section list.
208
198
  */
209
- getSectionsFromValue: (utils: MuiPickersAdapter<TDate>, value: TValue, fallbackSections: TSection[] | null, getSectionsFromDate: (date: TDate) => FieldSection[]) => TSection[];
199
+ getSectionsFromValue: (utils: MuiPickersAdapter, value: TValue, fallbackSections: TSection[] | null, getSectionsFromDate: (date: PickerValidDate) => FieldSection[]) => TSection[];
210
200
  /**
211
201
  * Creates the string value to render in the input based on the current section list.
212
202
  * @template TSection
@@ -225,33 +215,33 @@ export interface FieldValueManager<TValue, TDate extends PickerValidDate, TSecti
225
215
  getV7HiddenInputValueFromSections: (sections: TSection[]) => string;
226
216
  /**
227
217
  * Returns the manager of the active date.
228
- * @template TValue, TDate, TSection
229
- * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.
218
+ * @template TValue, TSection
219
+ * @param {MuiPickersAdapter} utils The utils to manipulate the date.
230
220
  * @param {UseFieldState<TValue, TSection>} state The current state of the field.
231
221
  * @param {TSection} activeSection The active section.
232
- * @returns {FieldActiveDateManager<TValue, TDate, TSection>} The manager of the active date.
222
+ * @returns {FieldActiveDateManager<TValue, TSection>} The manager of the active date.
233
223
  */
234
- getActiveDateManager: (utils: MuiPickersAdapter<TDate>, state: UseFieldState<TValue, TSection>, activeSection: TSection) => FieldActiveDateManager<TValue, TDate, TSection>;
224
+ getActiveDateManager: (utils: MuiPickersAdapter, state: UseFieldState<TValue, TSection>, activeSection: TSection) => FieldActiveDateManager<TValue, TSection>;
235
225
  /**
236
226
  * Parses a string version (most of the time coming from the input).
237
227
  * This method should only be used when the change does not come from a single section.
238
- * @template TValue, TDate
228
+ * @template TValue
239
229
  * @param {string} valueStr The string value to parse.
240
230
  * @param {TValue} referenceValue The reference value currently stored in state.
241
- * @param {(dateStr: string, referenceDate: TDate) => TDate | null} parseDate A method to convert a string date into a parsed one.
231
+ * @param {(dateStr: string, referenceDate: PickerValidDate) => PickerValidDate | null} parseDate A method to convert a string date into a parsed one.
242
232
  * @returns {TValue} The new parsed value.
243
233
  */
244
- parseValueStr: (valueStr: string, referenceValue: TValue, parseDate: (dateStr: string, referenceDate: TDate) => TDate | null) => TValue;
234
+ parseValueStr: (valueStr: string, referenceValue: TValue, parseDate: (dateStr: string, referenceDate: PickerValidDate) => PickerValidDate | null) => TValue;
245
235
  /**
246
236
  * Update the reference value with the new value.
247
237
  * This method must make sure that no date inside the returned `referenceValue` is invalid.
248
- * @template TValue, TDate
249
- * @param {MuiPickersAdapter<TDate>} utils The utils to manipulate the date.
238
+ * @template TValue
239
+ * @param {MuiPickersAdapter} utils The utils to manipulate the date.
250
240
  * @param {TValue} value The new value from which we want to take all valid dates in the `referenceValue` state.
251
241
  * @param {TValue} prevReferenceValue The previous reference value. It is used as a fallback for invalid dates in the new value.
252
242
  * @returns {TValue} The new reference value with no invalid date.
253
243
  */
254
- updateReferenceValue: (utils: MuiPickersAdapter<TDate>, value: TValue, prevReferenceValue: TValue) => TValue;
244
+ updateReferenceValue: (utils: MuiPickersAdapter, value: TValue, prevReferenceValue: TValue) => TValue;
255
245
  }
256
246
  export interface UseFieldState<TValue, TSection extends FieldSection> {
257
247
  value: TValue;
@@ -327,13 +317,13 @@ export interface UseFieldTextFieldInteractions {
327
317
  setSelectedSections: (newSelectedSections: FieldSelectedSections) => void;
328
318
  isFieldFocused: () => boolean;
329
319
  }
330
- export type UseFieldTextField<TEnableAccessibleFieldDOMStructure extends boolean> = <TValue, TDate extends PickerValidDate, TSection extends FieldSection, TForwardedProps extends TEnableAccessibleFieldDOMStructure extends false ? UseFieldV6ForwardedProps : UseFieldV7ForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, any, TEnableAccessibleFieldDOMStructure, any> & {
320
+ export type UseFieldTextField<TEnableAccessibleFieldDOMStructure extends boolean> = <TValue, TSection extends FieldSection, TForwardedProps extends TEnableAccessibleFieldDOMStructure extends false ? UseFieldV6ForwardedProps : UseFieldV7ForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, TEnableAccessibleFieldDOMStructure, any> & {
331
321
  minutesStep?: number;
332
- }>(params: UseFieldTextFieldParams<TValue, TDate, TSection, TEnableAccessibleFieldDOMStructure, TForwardedProps, TInternalProps>) => {
322
+ }>(params: UseFieldTextFieldParams<TValue, TSection, TEnableAccessibleFieldDOMStructure, TForwardedProps, TInternalProps>) => {
333
323
  interactions: UseFieldTextFieldInteractions;
334
324
  returnedValue: TEnableAccessibleFieldDOMStructure extends false ? UseFieldV6AdditionalProps & Required<UseFieldV6ForwardedProps> : UseFieldV7AdditionalProps & Required<UseFieldV7ForwardedProps>;
335
325
  };
336
- interface UseFieldTextFieldParams<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TForwardedProps extends TEnableAccessibleFieldDOMStructure extends false ? UseFieldV6ForwardedProps : UseFieldV7ForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, any, TEnableAccessibleFieldDOMStructure, any>> extends UseFieldParams<TValue, TDate, TSection, TEnableAccessibleFieldDOMStructure, TForwardedProps, TInternalProps>, UseFieldStateResponse<TValue, TDate, TSection>, UseFieldCharacterEditingResponse {
326
+ interface UseFieldTextFieldParams<TValue, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TForwardedProps extends TEnableAccessibleFieldDOMStructure extends false ? UseFieldV6ForwardedProps : UseFieldV7ForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, TEnableAccessibleFieldDOMStructure, any>> extends UseFieldParams<TValue, TSection, TEnableAccessibleFieldDOMStructure, TForwardedProps, TInternalProps>, UseFieldStateResponse<TValue, TSection>, UseFieldCharacterEditingResponse {
337
327
  areAllSectionsEmpty: boolean;
338
328
  sectionOrder: SectionOrdering;
339
329
  }