@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
@@ -44,7 +44,7 @@ const DateTimeField = exports.DateTimeField = /*#__PURE__*/React.forwardRef(func
44
44
  } = themeProps,
45
45
  other = (0, _objectWithoutPropertiesLoose2.default)(themeProps, _excluded);
46
46
  const ownerState = themeProps;
47
- const TextField = slots?.textField ?? (inProps.enableAccessibleFieldDOMStructure ? _PickersTextField.PickersTextField : _TextField.default);
47
+ const TextField = slots?.textField ?? (inProps.enableAccessibleFieldDOMStructure === false ? _TextField.default : _PickersTextField.PickersTextField);
48
48
  const textFieldProps = (0, _useSlotProps.default)({
49
49
  elementType: TextField,
50
50
  externalSlotProps: slotProps?.textField,
@@ -101,6 +101,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
101
101
  defaultValue: _propTypes.default.object,
102
102
  /**
103
103
  * If `true`, the component is disabled.
104
+ * When disabled, the value cannot be changed and no interaction is possible.
104
105
  * @default false
105
106
  */
106
107
  disabled: _propTypes.default.bool,
@@ -120,7 +121,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
120
121
  */
121
122
  disablePast: _propTypes.default.bool,
122
123
  /**
123
- * @default false
124
+ * @default true
124
125
  */
125
126
  enableAccessibleFieldDOMStructure: _propTypes.default.bool,
126
127
  /**
@@ -258,8 +259,8 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
258
259
  */
259
260
  onSelectedSectionsChange: _propTypes.default.func,
260
261
  /**
261
- * It prevents the user from changing the value of the field
262
- * (not from interacting with the field).
262
+ * If `true`, the component is read-only.
263
+ * When read-only, the value cannot be changed but the user can interact with the interface.
263
264
  * @default false
264
265
  */
265
266
  readOnly: _propTypes.default.bool,
@@ -289,30 +290,26 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
289
290
  *
290
291
  * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
291
292
  *
292
- * @template TDate
293
- * @param {TDate} day The date to test.
293
+ * @param {PickerValidDate} day The date to test.
294
294
  * @returns {boolean} If `true` the date will be disabled.
295
295
  */
296
296
  shouldDisableDate: _propTypes.default.func,
297
297
  /**
298
298
  * Disable specific month.
299
- * @template TDate
300
- * @param {TDate} month The month to test.
299
+ * @param {PickerValidDate} month The month to test.
301
300
  * @returns {boolean} If `true`, the month will be disabled.
302
301
  */
303
302
  shouldDisableMonth: _propTypes.default.func,
304
303
  /**
305
304
  * Disable specific time.
306
- * @template TDate
307
- * @param {TDate} value The value to check.
305
+ * @param {PickerValidDate} value The value to check.
308
306
  * @param {TimeView} view The clock type of the timeValue.
309
307
  * @returns {boolean} If `true` the time will be disabled.
310
308
  */
311
309
  shouldDisableTime: _propTypes.default.func,
312
310
  /**
313
311
  * Disable specific year.
314
- * @template TDate
315
- * @param {TDate} year The year to test.
312
+ * @param {PickerValidDate} year The year to test.
316
313
  * @returns {boolean} If `true`, the year will be disabled.
317
314
  */
318
315
  shouldDisableYear: _propTypes.default.func,
@@ -82,9 +82,9 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
82
82
  closeOnSelect: _propTypes.default.bool,
83
83
  /**
84
84
  * Formats the day of week displayed in the calendar header.
85
- * @param {TDate} date The date of the day of week provided by the adapter.
85
+ * @param {PickerValidDate} date The date of the day of week provided by the adapter.
86
86
  * @returns {string} The name to display.
87
- * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
87
+ * @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
88
88
  */
89
89
  dayOfWeekFormatter: _propTypes.default.func,
90
90
  /**
@@ -99,7 +99,8 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
99
99
  */
100
100
  desktopModeMediaQuery: _propTypes.default.string,
101
101
  /**
102
- * If `true`, the picker and text field are disabled.
102
+ * If `true`, the component is disabled.
103
+ * When disabled, the value cannot be changed and no interaction is possible.
103
104
  * @default false
104
105
  */
105
106
  disabled: _propTypes.default.bool,
@@ -133,7 +134,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
133
134
  */
134
135
  displayWeekNumber: _propTypes.default.bool,
135
136
  /**
136
- * @default false
137
+ * @default true
137
138
  */
138
139
  enableAccessibleFieldDOMStructure: _propTypes.default.any,
139
140
  /**
@@ -246,8 +247,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
246
247
  onError: _propTypes.default.func,
247
248
  /**
248
249
  * Callback fired on month change.
249
- * @template TDate
250
- * @param {TDate} month The new month.
250
+ * @param {PickerValidDate} month The new month.
251
251
  */
252
252
  onMonthChange: _propTypes.default.func,
253
253
  /**
@@ -268,8 +268,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
268
268
  onViewChange: _propTypes.default.func,
269
269
  /**
270
270
  * Callback fired on year change.
271
- * @template TDate
272
- * @param {TDate} year The new year.
271
+ * @param {PickerValidDate} year The new year.
273
272
  */
274
273
  onYearChange: _propTypes.default.func,
275
274
  /**
@@ -287,6 +286,11 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
287
286
  * Force rendering in particular orientation.
288
287
  */
289
288
  orientation: _propTypes.default.oneOf(['landscape', 'portrait']),
289
+ /**
290
+ * If `true`, the component is read-only.
291
+ * When read-only, the value cannot be changed but the user can interact with the interface.
292
+ * @default false
293
+ */
290
294
  readOnly: _propTypes.default.bool,
291
295
  /**
292
296
  * If `true`, disable heavy animations.
@@ -319,30 +323,26 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
319
323
  *
320
324
  * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
321
325
  *
322
- * @template TDate
323
- * @param {TDate} day The date to test.
326
+ * @param {PickerValidDate} day The date to test.
324
327
  * @returns {boolean} If `true` the date will be disabled.
325
328
  */
326
329
  shouldDisableDate: _propTypes.default.func,
327
330
  /**
328
331
  * Disable specific month.
329
- * @template TDate
330
- * @param {TDate} month The month to test.
332
+ * @param {PickerValidDate} month The month to test.
331
333
  * @returns {boolean} If `true`, the month will be disabled.
332
334
  */
333
335
  shouldDisableMonth: _propTypes.default.func,
334
336
  /**
335
337
  * Disable specific time.
336
- * @template TDate
337
- * @param {TDate} value The value to check.
338
+ * @param {PickerValidDate} value The value to check.
338
339
  * @param {TimeView} view The clock type of the timeValue.
339
340
  * @returns {boolean} If `true` the time will be disabled.
340
341
  */
341
342
  shouldDisableTime: _propTypes.default.func,
342
343
  /**
343
344
  * Disable specific year.
344
- * @template TDate
345
- * @param {TDate} year The year to test.
345
+ * @param {PickerValidDate} year The year to test.
346
346
  * @returns {boolean} If `true`, the year will be disabled.
347
347
  */
348
348
  shouldDisableYear: _propTypes.default.func,
@@ -15,7 +15,7 @@ var _Tabs = _interopRequireWildcard(require("@mui/material/Tabs"));
15
15
  var _styles = require("@mui/material/styles");
16
16
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
17
17
  var _icons = require("../icons");
18
- var _usePickersTranslations = require("../hooks/usePickersTranslations");
18
+ var _usePickerTranslations = require("../hooks/usePickerTranslations");
19
19
  var _dateTimePickerTabsClasses = require("./dateTimePickerTabsClasses");
20
20
  var _dateUtils = require("../internals/utils/date-utils");
21
21
  var _jsxRuntime = require("react/jsx-runtime");
@@ -81,7 +81,7 @@ const DateTimePickerTabs = exports.DateTimePickerTabs = function DateTimePickerT
81
81
  className,
82
82
  sx
83
83
  } = props;
84
- const translations = (0, _usePickersTranslations.usePickersTranslations)();
84
+ const translations = (0, _usePickerTranslations.usePickerTranslations)();
85
85
  const classes = useUtilityClasses(props);
86
86
  const handleChange = (event, value) => {
87
87
  onViewChange(tabToView(value));
@@ -18,7 +18,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
18
18
  var _PickersToolbarText = require("../internals/components/PickersToolbarText");
19
19
  var _PickersToolbar = require("../internals/components/PickersToolbar");
20
20
  var _PickersToolbarButton = require("../internals/components/PickersToolbarButton");
21
- var _usePickersTranslations = require("../hooks/usePickersTranslations");
21
+ var _usePickerTranslations = require("../hooks/usePickerTranslations");
22
22
  var _useUtils = require("../internals/hooks/useUtils");
23
23
  var _dateTimePickerToolbarClasses = require("./dateTimePickerToolbarClasses");
24
24
  var _dateHelpersHooks = require("../internals/hooks/date-helpers-hooks");
@@ -251,7 +251,7 @@ function DateTimePickerToolbar(inProps) {
251
251
  } = (0, _dateHelpersHooks.useMeridiemMode)(value, ampm, onChange);
252
252
  const showAmPmControl = Boolean(ampm && !ampmInClock);
253
253
  const isDesktop = toolbarVariant === 'desktop';
254
- const translations = (0, _usePickersTranslations.usePickersTranslations)();
254
+ const translations = (0, _usePickerTranslations.usePickerTranslations)();
255
255
  const classes = useUtilityClasses(ownerState);
256
256
  const toolbarTitle = inToolbarTitle ?? translations.dateTimePickerToolbarTitle;
257
257
  const formatHours = time => ampm ? utils.format(time, 'hours12h') : utils.format(time, 'hours24h');
@@ -366,6 +366,11 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
366
366
  */
367
367
  classes: _propTypes.default.object,
368
368
  className: _propTypes.default.string,
369
+ /**
370
+ * If `true`, the component is disabled.
371
+ * When disabled, the value cannot be changed and no interaction is possible.
372
+ * @default false
373
+ */
369
374
  disabled: _propTypes.default.bool,
370
375
  /**
371
376
  * If `true`, show the toolbar even in desktop mode.
@@ -380,6 +385,11 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
380
385
  * @param {TView} view The view to open
381
386
  */
382
387
  onViewChange: _propTypes.default.func.isRequired,
388
+ /**
389
+ * If `true`, the component is read-only.
390
+ * When read-only, the value cannot be changed but the user can interact with the interface.
391
+ * @default false
392
+ */
383
393
  readOnly: _propTypes.default.bool,
384
394
  /**
385
395
  * The system prop that allows defining system overrides as well as additional CSS styles.
@@ -14,7 +14,7 @@ var _resolveComponentProps = _interopRequireDefault(require("@mui/utils/resolveC
14
14
  var _utils = require("@mui/utils");
15
15
  var _valueManagers = require("../internals/utils/valueManagers");
16
16
  var _shared = require("../DatePicker/shared");
17
- var _usePickersTranslations = require("../hooks/usePickersTranslations");
17
+ var _usePickerTranslations = require("../hooks/usePickerTranslations");
18
18
  var _useUtils = require("../internals/hooks/useUtils");
19
19
  var _validation = require("../validation");
20
20
  var _useDesktopPicker = require("../internals/hooks/useDesktopPicker");
@@ -34,7 +34,7 @@ var _getPickersLocalization = require("../locales/utils/getPickersLocalization")
34
34
  * - [DesktopDatePicker API](https://mui.com/x/api/date-pickers/desktop-date-picker/)
35
35
  */
36
36
  const DesktopDatePicker = exports.DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {
37
- const translations = (0, _usePickersTranslations.usePickersTranslations)();
37
+ const translations = (0, _usePickerTranslations.usePickerTranslations)();
38
38
  const utils = (0, _useUtils.useUtils)();
39
39
 
40
40
  // Props with the default values common to all date pickers
@@ -99,9 +99,9 @@ DesktopDatePicker.propTypes = {
99
99
  closeOnSelect: _propTypes.default.bool,
100
100
  /**
101
101
  * Formats the day of week displayed in the calendar header.
102
- * @param {TDate} date The date of the day of week provided by the adapter.
102
+ * @param {PickerValidDate} date The date of the day of week provided by the adapter.
103
103
  * @returns {string} The name to display.
104
- * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
104
+ * @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
105
105
  */
106
106
  dayOfWeekFormatter: _propTypes.default.func,
107
107
  /**
@@ -110,7 +110,8 @@ DesktopDatePicker.propTypes = {
110
110
  */
111
111
  defaultValue: _propTypes.default.object,
112
112
  /**
113
- * If `true`, the picker and text field are disabled.
113
+ * If `true`, the component is disabled.
114
+ * When disabled, the value cannot be changed and no interaction is possible.
114
115
  * @default false
115
116
  */
116
117
  disabled: _propTypes.default.bool,
@@ -139,7 +140,7 @@ DesktopDatePicker.propTypes = {
139
140
  */
140
141
  displayWeekNumber: _propTypes.default.bool,
141
142
  /**
142
- * @default false
143
+ * @default true
143
144
  */
144
145
  enableAccessibleFieldDOMStructure: _propTypes.default.any,
145
146
  /**
@@ -229,8 +230,7 @@ DesktopDatePicker.propTypes = {
229
230
  onError: _propTypes.default.func,
230
231
  /**
231
232
  * Callback fired on month change.
232
- * @template TDate
233
- * @param {TDate} month The new month.
233
+ * @param {PickerValidDate} month The new month.
234
234
  */
235
235
  onMonthChange: _propTypes.default.func,
236
236
  /**
@@ -251,8 +251,7 @@ DesktopDatePicker.propTypes = {
251
251
  onViewChange: _propTypes.default.func,
252
252
  /**
253
253
  * Callback fired on year change.
254
- * @template TDate
255
- * @param {TDate} year The new year.
254
+ * @param {PickerValidDate} year The new year.
256
255
  */
257
256
  onYearChange: _propTypes.default.func,
258
257
  /**
@@ -270,6 +269,11 @@ DesktopDatePicker.propTypes = {
270
269
  * Force rendering in particular orientation.
271
270
  */
272
271
  orientation: _propTypes.default.oneOf(['landscape', 'portrait']),
272
+ /**
273
+ * If `true`, the component is read-only.
274
+ * When read-only, the value cannot be changed but the user can interact with the interface.
275
+ * @default false
276
+ */
273
277
  readOnly: _propTypes.default.bool,
274
278
  /**
275
279
  * If `true`, disable heavy animations.
@@ -302,22 +306,19 @@ DesktopDatePicker.propTypes = {
302
306
  *
303
307
  * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
304
308
  *
305
- * @template TDate
306
- * @param {TDate} day The date to test.
309
+ * @param {PickerValidDate} day The date to test.
307
310
  * @returns {boolean} If `true` the date will be disabled.
308
311
  */
309
312
  shouldDisableDate: _propTypes.default.func,
310
313
  /**
311
314
  * Disable specific month.
312
- * @template TDate
313
- * @param {TDate} month The month to test.
315
+ * @param {PickerValidDate} month The month to test.
314
316
  * @returns {boolean} If `true`, the month will be disabled.
315
317
  */
316
318
  shouldDisableMonth: _propTypes.default.func,
317
319
  /**
318
320
  * Disable specific year.
319
- * @template TDate
320
- * @param {TDate} year The year to test.
321
+ * @param {PickerValidDate} year The year to test.
321
322
  * @returns {boolean} If `true`, the year will be disabled.
322
323
  */
323
324
  shouldDisableYear: _propTypes.default.func,
@@ -18,7 +18,7 @@ var _valueManagers = require("../internals/utils/valueManagers");
18
18
  var _DateTimeField = require("../DateTimeField");
19
19
  var _shared = require("../DateTimePicker/shared");
20
20
  var _dateViewRenderers = require("../dateViewRenderers/dateViewRenderers");
21
- var _usePickersTranslations = require("../hooks/usePickersTranslations");
21
+ var _usePickerTranslations = require("../hooks/usePickerTranslations");
22
22
  var _useUtils = require("../internals/hooks/useUtils");
23
23
  var _validation = require("../validation");
24
24
  var _icons = require("../icons");
@@ -90,7 +90,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
90
90
  * - [DesktopDateTimePicker API](https://mui.com/x/api/date-pickers/desktop-date-time-picker/)
91
91
  */
92
92
  const DesktopDateTimePicker = exports.DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDateTimePicker(inProps, ref) {
93
- const translations = (0, _usePickersTranslations.usePickersTranslations)();
93
+ const translations = (0, _usePickerTranslations.usePickerTranslations)();
94
94
  const utils = (0, _useUtils.useUtils)();
95
95
 
96
96
  // Props with the default values common to all date time pickers
@@ -196,9 +196,9 @@ DesktopDateTimePicker.propTypes = {
196
196
  closeOnSelect: _propTypes.default.bool,
197
197
  /**
198
198
  * Formats the day of week displayed in the calendar header.
199
- * @param {TDate} date The date of the day of week provided by the adapter.
199
+ * @param {PickerValidDate} date The date of the day of week provided by the adapter.
200
200
  * @returns {string} The name to display.
201
- * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
201
+ * @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
202
202
  */
203
203
  dayOfWeekFormatter: _propTypes.default.func,
204
204
  /**
@@ -207,7 +207,8 @@ DesktopDateTimePicker.propTypes = {
207
207
  */
208
208
  defaultValue: _propTypes.default.object,
209
209
  /**
210
- * If `true`, the picker and text field are disabled.
210
+ * If `true`, the component is disabled.
211
+ * When disabled, the value cannot be changed and no interaction is possible.
211
212
  * @default false
212
213
  */
213
214
  disabled: _propTypes.default.bool,
@@ -241,7 +242,7 @@ DesktopDateTimePicker.propTypes = {
241
242
  */
242
243
  displayWeekNumber: _propTypes.default.bool,
243
244
  /**
244
- * @default false
245
+ * @default true
245
246
  */
246
247
  enableAccessibleFieldDOMStructure: _propTypes.default.any,
247
248
  /**
@@ -354,8 +355,7 @@ DesktopDateTimePicker.propTypes = {
354
355
  onError: _propTypes.default.func,
355
356
  /**
356
357
  * Callback fired on month change.
357
- * @template TDate
358
- * @param {TDate} month The new month.
358
+ * @param {PickerValidDate} month The new month.
359
359
  */
360
360
  onMonthChange: _propTypes.default.func,
361
361
  /**
@@ -376,8 +376,7 @@ DesktopDateTimePicker.propTypes = {
376
376
  onViewChange: _propTypes.default.func,
377
377
  /**
378
378
  * Callback fired on year change.
379
- * @template TDate
380
- * @param {TDate} year The new year.
379
+ * @param {PickerValidDate} year The new year.
381
380
  */
382
381
  onYearChange: _propTypes.default.func,
383
382
  /**
@@ -395,6 +394,11 @@ DesktopDateTimePicker.propTypes = {
395
394
  * Force rendering in particular orientation.
396
395
  */
397
396
  orientation: _propTypes.default.oneOf(['landscape', 'portrait']),
397
+ /**
398
+ * If `true`, the component is read-only.
399
+ * When read-only, the value cannot be changed but the user can interact with the interface.
400
+ * @default false
401
+ */
398
402
  readOnly: _propTypes.default.bool,
399
403
  /**
400
404
  * If `true`, disable heavy animations.
@@ -427,30 +431,26 @@ DesktopDateTimePicker.propTypes = {
427
431
  *
428
432
  * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
429
433
  *
430
- * @template TDate
431
- * @param {TDate} day The date to test.
434
+ * @param {PickerValidDate} day The date to test.
432
435
  * @returns {boolean} If `true` the date will be disabled.
433
436
  */
434
437
  shouldDisableDate: _propTypes.default.func,
435
438
  /**
436
439
  * Disable specific month.
437
- * @template TDate
438
- * @param {TDate} month The month to test.
440
+ * @param {PickerValidDate} month The month to test.
439
441
  * @returns {boolean} If `true`, the month will be disabled.
440
442
  */
441
443
  shouldDisableMonth: _propTypes.default.func,
442
444
  /**
443
445
  * Disable specific time.
444
- * @template TDate
445
- * @param {TDate} value The value to check.
446
+ * @param {PickerValidDate} value The value to check.
446
447
  * @param {TimeView} view The clock type of the timeValue.
447
448
  * @returns {boolean} If `true` the time will be disabled.
448
449
  */
449
450
  shouldDisableTime: _propTypes.default.func,
450
451
  /**
451
452
  * Disable specific year.
452
- * @template TDate
453
- * @param {TDate} year The year to test.
453
+ * @param {PickerValidDate} year The year to test.
454
454
  * @returns {boolean} If `true`, the year will be disabled.
455
455
  */
456
456
  shouldDisableYear: _propTypes.default.func,
@@ -74,6 +74,11 @@ process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes =
74
74
  */
75
75
  classes: _propTypes.default.object,
76
76
  className: _propTypes.default.string,
77
+ /**
78
+ * If `true`, the component is disabled.
79
+ * When disabled, the value cannot be changed and no interaction is possible.
80
+ * @default false
81
+ */
77
82
  disabled: _propTypes.default.bool,
78
83
  isLandscape: _propTypes.default.bool.isRequired,
79
84
  /**
@@ -95,6 +100,11 @@ process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes =
95
100
  * Force rendering in particular orientation.
96
101
  */
97
102
  orientation: _propTypes.default.oneOf(['landscape', 'portrait']),
103
+ /**
104
+ * If `true`, the component is read-only.
105
+ * When read-only, the value cannot be changed but the user can interact with the interface.
106
+ * @default false
107
+ */
98
108
  readOnly: _propTypes.default.bool,
99
109
  /**
100
110
  * The props used for each component slot.
@@ -15,7 +15,7 @@ var _utils = require("@mui/utils");
15
15
  var _valueManagers = require("../internals/utils/valueManagers");
16
16
  var _TimeField = require("../TimeField");
17
17
  var _shared = require("../TimePicker/shared");
18
- var _usePickersTranslations = require("../hooks/usePickersTranslations");
18
+ var _usePickerTranslations = require("../hooks/usePickerTranslations");
19
19
  var _useUtils = require("../internals/hooks/useUtils");
20
20
  var _validation = require("../validation");
21
21
  var _icons = require("../icons");
@@ -35,7 +35,7 @@ var _getPickersLocalization = require("../locales/utils/getPickersLocalization")
35
35
  * - [DesktopTimePicker API](https://mui.com/x/api/date-pickers/desktop-time-picker/)
36
36
  */
37
37
  const DesktopTimePicker = exports.DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DesktopTimePicker(inProps, ref) {
38
- const translations = (0, _usePickersTranslations.usePickersTranslations)();
38
+ const translations = (0, _usePickerTranslations.usePickerTranslations)();
39
39
  const utils = (0, _useUtils.useUtils)();
40
40
 
41
41
  // Props with the default values common to all time pickers
@@ -134,7 +134,8 @@ DesktopTimePicker.propTypes = {
134
134
  */
135
135
  defaultValue: _propTypes.default.object,
136
136
  /**
137
- * If `true`, the picker and text field are disabled.
137
+ * If `true`, the component is disabled.
138
+ * When disabled, the value cannot be changed and no interaction is possible.
138
139
  * @default false
139
140
  */
140
141
  disabled: _propTypes.default.bool,
@@ -159,7 +160,7 @@ DesktopTimePicker.propTypes = {
159
160
  */
160
161
  disablePast: _propTypes.default.bool,
161
162
  /**
162
- * @default false
163
+ * @default true
163
164
  */
164
165
  enableAccessibleFieldDOMStructure: _propTypes.default.any,
165
166
  /**
@@ -267,6 +268,11 @@ DesktopTimePicker.propTypes = {
267
268
  * Force rendering in particular orientation.
268
269
  */
269
270
  orientation: _propTypes.default.oneOf(['landscape', 'portrait']),
271
+ /**
272
+ * If `true`, the component is read-only.
273
+ * When read-only, the value cannot be changed but the user can interact with the interface.
274
+ * @default false
275
+ */
270
276
  readOnly: _propTypes.default.bool,
271
277
  /**
272
278
  * If `true`, disable heavy animations.
@@ -290,8 +296,7 @@ DesktopTimePicker.propTypes = {
290
296
  selectedSections: _propTypes.default.oneOfType([_propTypes.default.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), _propTypes.default.number]),
291
297
  /**
292
298
  * Disable specific time.
293
- * @template TDate
294
- * @param {TDate} value The value to check.
299
+ * @param {PickerValidDate} value The value to check.
295
300
  * @param {TimeView} view The clock type of the timeValue.
296
301
  * @returns {boolean} If `true` the time will be disabled.
297
302
  */
@@ -19,7 +19,7 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
19
19
  var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
20
20
  var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
21
21
  var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
22
- var _usePickersTranslations = require("../hooks/usePickersTranslations");
22
+ var _usePickerTranslations = require("../hooks/usePickerTranslations");
23
23
  var _useUtils = require("../internals/hooks/useUtils");
24
24
  var _timeUtils = require("../internals/utils/time-utils");
25
25
  var _PickerViewRoot = require("../internals/components/PickerViewRoot");
@@ -159,7 +159,7 @@ const DigitalClock = exports.DigitalClock = /*#__PURE__*/React.forwardRef(functi
159
159
  onChange,
160
160
  valueManager: _valueManagers.singleItemValueManager
161
161
  });
162
- const translations = (0, _usePickersTranslations.usePickersTranslations)();
162
+ const translations = (0, _usePickerTranslations.usePickerTranslations)();
163
163
  const now = (0, _useUtils.useNow)(timezone);
164
164
  const ownerState = React.useMemo(() => (0, _extends2.default)({}, props, {
165
165
  alreadyRendered: !!containerRef.current
@@ -342,7 +342,8 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
342
342
  */
343
343
  defaultValue: _propTypes.default.object,
344
344
  /**
345
- * If `true`, the picker views and text field are disabled.
345
+ * If `true`, the component is disabled.
346
+ * When disabled, the value cannot be changed and no interaction is possible.
346
347
  * @default false
347
348
  */
348
349
  disabled: _propTypes.default.bool,
@@ -409,7 +410,8 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
409
410
  */
410
411
  openTo: _propTypes.default.oneOf(['hours']),
411
412
  /**
412
- * If `true`, the picker views and text field are read-only.
413
+ * If `true`, the component is read-only.
414
+ * When read-only, the value cannot be changed but the user can interact with the interface.
413
415
  * @default false
414
416
  */
415
417
  readOnly: _propTypes.default.bool,
@@ -420,8 +422,7 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
420
422
  referenceDate: _propTypes.default.object,
421
423
  /**
422
424
  * Disable specific time.
423
- * @template TDate
424
- * @param {TDate} value The value to check.
425
+ * @param {PickerValidDate} value The value to check.
425
426
  * @param {TimeView} view The clock type of the timeValue.
426
427
  * @returns {boolean} If `true` the time will be disabled.
427
428
  */