@mui/x-date-pickers 7.22.3 → 8.0.0-alpha.1

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 (514) 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 +348 -12
  12. package/DateCalendar/DateCalendar.d.ts +1 -2
  13. package/DateCalendar/DateCalendar.js +21 -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 +2 -4
  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 +5 -5
  42. package/DateTimePicker/DateTimePickerToolbar.js +8 -7
  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 +0 -2
  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 +8 -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 +18 -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 +8 -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 +0 -2
  84. package/PickersLayout/PickersLayout.types.d.ts +16 -19
  85. package/PickersLayout/index.d.ts +1 -1
  86. package/PickersLayout/usePickerLayout.d.ts +1 -2
  87. package/PickersLayout/usePickerLayout.js +18 -23
  88. package/PickersTextField/PickersInputBase/PickersInputBase.js +10 -9
  89. package/PickersTextField/PickersTextField.js +2 -2
  90. package/README.md +4 -4
  91. package/StaticDatePicker/StaticDatePicker.d.ts +1 -2
  92. package/StaticDatePicker/StaticDatePicker.js +14 -13
  93. package/StaticDatePicker/StaticDatePicker.types.d.ts +7 -7
  94. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +1 -2
  95. package/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  96. package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +7 -7
  97. package/StaticTimePicker/StaticTimePicker.d.ts +1 -2
  98. package/StaticTimePicker/StaticTimePicker.js +8 -3
  99. package/StaticTimePicker/StaticTimePicker.types.d.ts +7 -7
  100. package/TimeClock/Clock.d.ts +4 -5
  101. package/TimeClock/Clock.js +4 -3
  102. package/TimeClock/ClockNumbers.d.ts +5 -5
  103. package/TimeClock/TimeClock.d.ts +1 -2
  104. package/TimeClock/TimeClock.js +8 -6
  105. package/TimeClock/TimeClock.types.d.ts +4 -4
  106. package/TimeField/TimeField.d.ts +1 -2
  107. package/TimeField/TimeField.js +6 -6
  108. package/TimeField/TimeField.types.d.ts +9 -14
  109. package/TimeField/index.d.ts +1 -1
  110. package/TimeField/useTimeField.d.ts +1 -2
  111. package/TimePicker/TimePicker.d.ts +1 -2
  112. package/TimePicker/TimePicker.js +9 -4
  113. package/TimePicker/TimePicker.types.d.ts +10 -13
  114. package/TimePicker/TimePickerToolbar.d.ts +2 -2
  115. package/TimePicker/TimePickerToolbar.js +8 -7
  116. package/TimePicker/shared.d.ts +10 -10
  117. package/YearCalendar/PickersYear.js +17 -13
  118. package/YearCalendar/YearCalendar.d.ts +1 -2
  119. package/YearCalendar/YearCalendar.js +18 -14
  120. package/YearCalendar/YearCalendar.types.d.ts +14 -15
  121. package/dateViewRenderers/dateViewRenderers.d.ts +3 -3
  122. package/hooks/index.d.ts +2 -2
  123. package/hooks/index.js +2 -2
  124. package/hooks/useClearableField.js +4 -3
  125. package/hooks/useParsedFormat.d.ts +2 -3
  126. package/hooks/useParsedFormat.js +2 -2
  127. package/hooks/usePickerContext.d.ts +4 -0
  128. package/hooks/usePickerContext.js +15 -0
  129. package/hooks/usePickerTranslations.d.ts +1 -0
  130. package/{modern/hooks/usePickersTranslations.js → hooks/usePickerTranslations.js} +1 -1
  131. package/hooks/useSplitFieldProps.d.ts +3 -3
  132. package/index.js +1 -1
  133. package/internals/components/PickerProvider.d.ts +67 -0
  134. package/internals/components/PickerProvider.js +40 -0
  135. package/internals/hooks/date-helpers-hooks.d.ts +6 -6
  136. package/internals/hooks/defaultizedFieldProps.d.ts +7 -8
  137. package/internals/hooks/useClockReferenceDate.d.ts +5 -5
  138. package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -2
  139. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +22 -18
  140. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +15 -15
  141. package/internals/hooks/useField/buildSectionsFromFormat.d.ts +5 -5
  142. package/internals/hooks/useField/useField.d.ts +3 -3
  143. package/internals/hooks/useField/useField.js +1 -1
  144. package/internals/hooks/useField/useField.types.d.ts +40 -50
  145. package/internals/hooks/useField/useField.utils.d.ts +15 -15
  146. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +4 -4
  147. package/internals/hooks/useField/useFieldState.d.ts +4 -4
  148. package/internals/hooks/useField/useFieldState.js +4 -3
  149. package/internals/hooks/useField/useFieldV7TextField.js +4 -3
  150. package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -2
  151. package/internals/hooks/useMobilePicker/useMobilePicker.js +24 -19
  152. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +12 -12
  153. package/internals/hooks/usePicker/usePicker.d.ts +2 -2
  154. package/internals/hooks/usePicker/usePicker.js +15 -10
  155. package/internals/hooks/usePicker/usePicker.types.d.ts +9 -7
  156. package/internals/hooks/usePicker/usePickerLayoutProps.d.ts +6 -8
  157. package/internals/hooks/usePicker/usePickerLayoutProps.js +2 -5
  158. package/internals/hooks/usePicker/usePickerProvider.d.ts +26 -0
  159. package/internals/hooks/usePicker/usePickerProvider.js +77 -0
  160. package/internals/hooks/usePicker/usePickerValue.d.ts +2 -2
  161. package/internals/hooks/usePicker/usePickerValue.js +7 -10
  162. package/internals/hooks/usePicker/usePickerValue.types.d.ts +38 -39
  163. package/internals/hooks/usePicker/usePickerViews.d.ts +7 -11
  164. package/internals/hooks/usePicker/usePickerViews.js +1 -0
  165. package/internals/hooks/usePickerPrivateContext.d.ts +4 -0
  166. package/internals/hooks/usePickerPrivateContext.js +9 -0
  167. package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -2
  168. package/internals/hooks/useStaticPicker/useStaticPicker.js +6 -5
  169. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +6 -6
  170. package/internals/hooks/useUtils.d.ts +7 -7
  171. package/internals/hooks/useValueWithTimezone.d.ts +19 -15
  172. package/internals/hooks/useValueWithTimezone.js +13 -1
  173. package/internals/hooks/useViews.d.ts +3 -3
  174. package/internals/hooks/useViews.js +1 -1
  175. package/internals/index.d.ts +7 -5
  176. package/internals/index.js +2 -1
  177. package/internals/models/common.d.ts +2 -1
  178. package/internals/models/fields.d.ts +32 -7
  179. package/internals/models/formProps.d.ts +14 -0
  180. package/internals/models/helpers.d.ts +0 -4
  181. package/internals/models/index.d.ts +2 -0
  182. package/internals/models/index.js +3 -1
  183. package/internals/models/props/basePickerProps.d.ts +5 -6
  184. package/internals/models/props/{clock.d.ts → time.d.ts} +10 -17
  185. package/internals/models/props/toolbar.d.ts +0 -2
  186. package/internals/models/validation.d.ts +21 -25
  187. package/internals/models/value.d.ts +3 -0
  188. package/internals/models/value.js +1 -0
  189. package/internals/utils/date-time-utils.d.ts +7 -7
  190. package/internals/utils/date-utils.d.ts +17 -17
  191. package/internals/utils/getDefaultReferenceDate.d.ts +10 -10
  192. package/internals/utils/time-utils.d.ts +5 -5
  193. package/internals/utils/valueManagers.d.ts +3 -3
  194. package/locales/beBY.d.ts +3 -3
  195. package/locales/beBY.js +3 -3
  196. package/locales/bgBG.d.ts +3 -3
  197. package/locales/bgBG.js +3 -3
  198. package/locales/caES.d.ts +3 -3
  199. package/locales/caES.js +3 -3
  200. package/locales/csCZ.d.ts +3 -3
  201. package/locales/csCZ.js +3 -3
  202. package/locales/daDK.d.ts +3 -3
  203. package/locales/daDK.js +3 -3
  204. package/locales/deDE.d.ts +3 -3
  205. package/locales/deDE.js +3 -3
  206. package/locales/elGR.d.ts +3 -3
  207. package/locales/elGR.js +12 -13
  208. package/locales/enUS.d.ts +4 -4
  209. package/locales/enUS.js +3 -3
  210. package/locales/esES.d.ts +3 -3
  211. package/locales/esES.js +3 -3
  212. package/locales/eu.d.ts +3 -3
  213. package/locales/eu.js +3 -3
  214. package/locales/faIR.d.ts +3 -3
  215. package/locales/faIR.js +3 -3
  216. package/locales/fiFI.d.ts +3 -3
  217. package/locales/fiFI.js +3 -3
  218. package/locales/frFR.d.ts +3 -3
  219. package/locales/frFR.js +3 -3
  220. package/locales/heIL.d.ts +3 -3
  221. package/locales/heIL.js +3 -3
  222. package/locales/hrHR.d.ts +3 -3
  223. package/locales/hrHR.js +3 -3
  224. package/locales/huHU.d.ts +3 -3
  225. package/locales/huHU.js +3 -3
  226. package/locales/isIS.d.ts +3 -3
  227. package/locales/isIS.js +3 -3
  228. package/locales/itIT.d.ts +3 -3
  229. package/locales/itIT.js +3 -3
  230. package/locales/jaJP.d.ts +3 -3
  231. package/locales/jaJP.js +3 -3
  232. package/locales/koKR.d.ts +3 -3
  233. package/locales/koKR.js +3 -3
  234. package/locales/kzKZ.d.ts +3 -3
  235. package/locales/kzKZ.js +3 -3
  236. package/locales/mk.d.ts +3 -3
  237. package/locales/mk.js +3 -3
  238. package/locales/nbNO.d.ts +3 -3
  239. package/locales/nbNO.js +3 -3
  240. package/locales/nlNL.d.ts +3 -3
  241. package/locales/nlNL.js +3 -3
  242. package/locales/nnNO.d.ts +3 -3
  243. package/locales/nnNO.js +3 -3
  244. package/locales/plPL.d.ts +3 -3
  245. package/locales/plPL.js +3 -3
  246. package/locales/ptBR.d.ts +3 -3
  247. package/locales/ptBR.js +5 -3
  248. package/locales/ptPT.d.ts +3 -3
  249. package/locales/ptPT.js +3 -3
  250. package/locales/roRO.d.ts +3 -3
  251. package/locales/roRO.js +3 -3
  252. package/locales/ruRU.d.ts +3 -3
  253. package/locales/ruRU.js +3 -3
  254. package/locales/skSK.d.ts +3 -3
  255. package/locales/skSK.js +3 -3
  256. package/locales/svSE.d.ts +3 -3
  257. package/locales/svSE.js +3 -3
  258. package/locales/trTR.d.ts +3 -3
  259. package/locales/trTR.js +3 -3
  260. package/locales/ukUA.d.ts +3 -3
  261. package/locales/ukUA.js +3 -3
  262. package/locales/urPK.d.ts +3 -3
  263. package/locales/urPK.js +3 -3
  264. package/locales/utils/getPickersLocalization.d.ts +9 -9
  265. package/locales/utils/getPickersLocalization.js +1 -1
  266. package/locales/utils/pickersLocaleTextApi.d.ts +12 -36
  267. package/locales/viVN.d.ts +3 -3
  268. package/locales/viVN.js +3 -3
  269. package/locales/zhCN.d.ts +3 -3
  270. package/locales/zhCN.js +3 -3
  271. package/locales/zhHK.d.ts +3 -3
  272. package/locales/zhHK.js +3 -3
  273. package/models/adapters.d.ts +151 -202
  274. package/models/common.d.ts +1 -0
  275. package/models/fields.d.ts +9 -42
  276. package/models/pickers.d.ts +28 -6
  277. package/modern/DateCalendar/DateCalendar.js +21 -22
  278. package/modern/DateCalendar/DayCalendar.js +13 -10
  279. package/modern/DateField/DateField.js +8 -10
  280. package/modern/DatePicker/DatePicker.js +15 -14
  281. package/modern/DatePicker/DatePickerToolbar.js +2 -4
  282. package/modern/DateTimeField/DateTimeField.js +9 -12
  283. package/modern/DateTimePicker/DateTimePicker.js +16 -16
  284. package/modern/DateTimePicker/DateTimePickerTabs.js +2 -2
  285. package/modern/DateTimePicker/DateTimePickerToolbar.js +8 -7
  286. package/modern/DesktopDatePicker/DesktopDatePicker.js +17 -16
  287. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  288. package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +0 -2
  289. package/modern/DesktopTimePicker/DesktopTimePicker.js +11 -6
  290. package/modern/DigitalClock/DigitalClock.js +8 -6
  291. package/modern/MobileDatePicker/MobileDatePicker.js +17 -16
  292. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  293. package/modern/MobileTimePicker/MobileTimePicker.js +11 -6
  294. package/modern/MonthCalendar/MonthCalendar.js +18 -14
  295. package/modern/MonthCalendar/PickersMonth.js +17 -13
  296. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +8 -6
  297. package/modern/PickersActionBar/PickersActionBar.js +2 -2
  298. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  299. package/modern/PickersLayout/PickersLayout.js +0 -2
  300. package/modern/PickersLayout/usePickerLayout.js +18 -23
  301. package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +10 -9
  302. package/modern/PickersTextField/PickersTextField.js +2 -2
  303. package/modern/StaticDatePicker/StaticDatePicker.js +14 -13
  304. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  305. package/modern/StaticTimePicker/StaticTimePicker.js +8 -3
  306. package/modern/TimeClock/Clock.js +4 -3
  307. package/modern/TimeClock/TimeClock.js +8 -6
  308. package/modern/TimeField/TimeField.js +6 -6
  309. package/modern/TimePicker/TimePicker.js +9 -4
  310. package/modern/TimePicker/TimePickerToolbar.js +8 -7
  311. package/modern/YearCalendar/PickersYear.js +17 -13
  312. package/modern/YearCalendar/YearCalendar.js +18 -14
  313. package/modern/hooks/index.js +2 -2
  314. package/modern/hooks/useClearableField.js +4 -3
  315. package/modern/hooks/useParsedFormat.js +2 -2
  316. package/modern/hooks/usePickerContext.js +15 -0
  317. package/{hooks/usePickersTranslations.js → modern/hooks/usePickerTranslations.js} +1 -1
  318. package/modern/index.js +1 -1
  319. package/modern/internals/components/PickerProvider.js +40 -0
  320. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +22 -18
  321. package/modern/internals/hooks/useField/useField.js +1 -1
  322. package/modern/internals/hooks/useField/useFieldState.js +4 -3
  323. package/modern/internals/hooks/useField/useFieldV7TextField.js +4 -3
  324. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +24 -19
  325. package/modern/internals/hooks/usePicker/usePicker.js +15 -10
  326. package/modern/internals/hooks/usePicker/usePickerLayoutProps.js +2 -5
  327. package/modern/internals/hooks/usePicker/usePickerProvider.js +77 -0
  328. package/modern/internals/hooks/usePicker/usePickerValue.js +7 -10
  329. package/modern/internals/hooks/usePicker/usePickerViews.js +1 -0
  330. package/modern/internals/hooks/usePickerPrivateContext.js +9 -0
  331. package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +6 -5
  332. package/modern/internals/hooks/useValueWithTimezone.js +13 -1
  333. package/modern/internals/hooks/useViews.js +1 -1
  334. package/modern/internals/index.js +2 -1
  335. package/modern/internals/models/formProps.js +1 -0
  336. package/modern/internals/models/index.js +3 -1
  337. package/modern/internals/models/props/time.js +1 -0
  338. package/modern/internals/models/value.js +1 -0
  339. package/modern/locales/beBY.js +3 -3
  340. package/modern/locales/bgBG.js +3 -3
  341. package/modern/locales/caES.js +3 -3
  342. package/modern/locales/csCZ.js +3 -3
  343. package/modern/locales/daDK.js +3 -3
  344. package/modern/locales/deDE.js +3 -3
  345. package/modern/locales/elGR.js +12 -13
  346. package/modern/locales/enUS.js +3 -3
  347. package/modern/locales/esES.js +3 -3
  348. package/modern/locales/eu.js +3 -3
  349. package/modern/locales/faIR.js +3 -3
  350. package/modern/locales/fiFI.js +3 -3
  351. package/modern/locales/frFR.js +3 -3
  352. package/modern/locales/heIL.js +3 -3
  353. package/modern/locales/hrHR.js +3 -3
  354. package/modern/locales/huHU.js +3 -3
  355. package/modern/locales/isIS.js +3 -3
  356. package/modern/locales/itIT.js +3 -3
  357. package/modern/locales/jaJP.js +3 -3
  358. package/modern/locales/koKR.js +3 -3
  359. package/modern/locales/kzKZ.js +3 -3
  360. package/modern/locales/mk.js +3 -3
  361. package/modern/locales/nbNO.js +3 -3
  362. package/modern/locales/nlNL.js +3 -3
  363. package/modern/locales/nnNO.js +3 -3
  364. package/modern/locales/plPL.js +3 -3
  365. package/modern/locales/ptBR.js +5 -3
  366. package/modern/locales/ptPT.js +3 -3
  367. package/modern/locales/roRO.js +3 -3
  368. package/modern/locales/ruRU.js +3 -3
  369. package/modern/locales/skSK.js +3 -3
  370. package/modern/locales/svSE.js +3 -3
  371. package/modern/locales/trTR.js +3 -3
  372. package/modern/locales/ukUA.js +3 -3
  373. package/modern/locales/urPK.js +3 -3
  374. package/modern/locales/utils/getPickersLocalization.js +1 -1
  375. package/modern/locales/viVN.js +3 -3
  376. package/modern/locales/zhCN.js +3 -3
  377. package/modern/locales/zhHK.js +3 -3
  378. package/modern/validation/useValidation.js +2 -3
  379. package/modern/validation/validateDate.js +5 -0
  380. package/modern/validation/validateDateTime.js +5 -0
  381. package/modern/validation/validateTime.js +5 -0
  382. package/node/DateCalendar/DateCalendar.js +21 -22
  383. package/node/DateCalendar/DayCalendar.js +13 -10
  384. package/node/DateField/DateField.js +8 -10
  385. package/node/DatePicker/DatePicker.js +15 -14
  386. package/node/DatePicker/DatePickerToolbar.js +2 -4
  387. package/node/DateTimeField/DateTimeField.js +9 -12
  388. package/node/DateTimePicker/DateTimePicker.js +16 -16
  389. package/node/DateTimePicker/DateTimePickerTabs.js +2 -2
  390. package/node/DateTimePicker/DateTimePickerToolbar.js +8 -7
  391. package/node/DesktopDatePicker/DesktopDatePicker.js +17 -16
  392. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  393. package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +0 -2
  394. package/node/DesktopTimePicker/DesktopTimePicker.js +11 -6
  395. package/node/DigitalClock/DigitalClock.js +8 -6
  396. package/node/MobileDatePicker/MobileDatePicker.js +17 -16
  397. package/node/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  398. package/node/MobileTimePicker/MobileTimePicker.js +11 -6
  399. package/node/MonthCalendar/MonthCalendar.js +18 -14
  400. package/node/MonthCalendar/PickersMonth.js +17 -13
  401. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +8 -6
  402. package/node/PickersActionBar/PickersActionBar.js +2 -2
  403. package/node/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  404. package/node/PickersLayout/PickersLayout.js +0 -2
  405. package/node/PickersLayout/usePickerLayout.js +18 -23
  406. package/node/PickersTextField/PickersInputBase/PickersInputBase.js +10 -9
  407. package/node/PickersTextField/PickersTextField.js +2 -2
  408. package/node/StaticDatePicker/StaticDatePicker.js +14 -13
  409. package/node/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  410. package/node/StaticTimePicker/StaticTimePicker.js +8 -3
  411. package/node/TimeClock/Clock.js +4 -3
  412. package/node/TimeClock/TimeClock.js +8 -6
  413. package/node/TimeField/TimeField.js +6 -6
  414. package/node/TimePicker/TimePicker.js +9 -4
  415. package/node/TimePicker/TimePickerToolbar.js +8 -7
  416. package/node/YearCalendar/PickersYear.js +17 -13
  417. package/node/YearCalendar/YearCalendar.js +18 -14
  418. package/node/hooks/index.js +6 -6
  419. package/node/hooks/useClearableField.js +4 -3
  420. package/node/hooks/useParsedFormat.js +2 -2
  421. package/node/hooks/usePickerContext.js +21 -0
  422. package/node/hooks/usePickerTranslations.js +10 -0
  423. package/node/index.js +1 -1
  424. package/node/internals/components/PickerProvider.js +48 -0
  425. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +22 -18
  426. package/node/internals/hooks/useField/useField.js +1 -1
  427. package/node/internals/hooks/useField/useFieldState.js +4 -3
  428. package/node/internals/hooks/useField/useFieldV7TextField.js +4 -3
  429. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +24 -19
  430. package/node/internals/hooks/usePicker/usePicker.js +15 -10
  431. package/node/internals/hooks/usePicker/usePickerLayoutProps.js +2 -5
  432. package/node/internals/hooks/usePicker/usePickerProvider.js +87 -0
  433. package/node/internals/hooks/usePicker/usePickerValue.js +6 -10
  434. package/node/internals/hooks/usePicker/usePickerViews.js +1 -0
  435. package/node/internals/hooks/usePickerPrivateContext.js +15 -0
  436. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +6 -5
  437. package/node/internals/hooks/useValueWithTimezone.js +13 -1
  438. package/node/internals/hooks/useViews.js +3 -3
  439. package/node/internals/index.js +14 -7
  440. package/node/internals/models/index.js +22 -0
  441. package/node/internals/models/props/time.js +5 -0
  442. package/node/internals/models/value.js +5 -0
  443. package/node/locales/beBY.js +3 -3
  444. package/node/locales/bgBG.js +3 -3
  445. package/node/locales/caES.js +3 -3
  446. package/node/locales/csCZ.js +3 -3
  447. package/node/locales/daDK.js +3 -3
  448. package/node/locales/deDE.js +3 -3
  449. package/node/locales/elGR.js +12 -13
  450. package/node/locales/enUS.js +3 -3
  451. package/node/locales/esES.js +3 -3
  452. package/node/locales/eu.js +3 -3
  453. package/node/locales/faIR.js +3 -3
  454. package/node/locales/fiFI.js +3 -3
  455. package/node/locales/frFR.js +3 -3
  456. package/node/locales/heIL.js +3 -3
  457. package/node/locales/hrHR.js +3 -3
  458. package/node/locales/huHU.js +3 -3
  459. package/node/locales/isIS.js +3 -3
  460. package/node/locales/itIT.js +3 -3
  461. package/node/locales/jaJP.js +3 -3
  462. package/node/locales/koKR.js +3 -3
  463. package/node/locales/kzKZ.js +3 -3
  464. package/node/locales/mk.js +3 -3
  465. package/node/locales/nbNO.js +3 -3
  466. package/node/locales/nlNL.js +3 -3
  467. package/node/locales/nnNO.js +3 -3
  468. package/node/locales/plPL.js +3 -3
  469. package/node/locales/ptBR.js +5 -3
  470. package/node/locales/ptPT.js +3 -3
  471. package/node/locales/roRO.js +3 -3
  472. package/node/locales/ruRU.js +3 -3
  473. package/node/locales/skSK.js +3 -3
  474. package/node/locales/svSE.js +3 -3
  475. package/node/locales/trTR.js +3 -3
  476. package/node/locales/ukUA.js +3 -3
  477. package/node/locales/urPK.js +3 -3
  478. package/node/locales/utils/getPickersLocalization.js +1 -1
  479. package/node/locales/viVN.js +3 -3
  480. package/node/locales/zhCN.js +3 -3
  481. package/node/locales/zhHK.js +3 -3
  482. package/node/validation/useValidation.js +2 -3
  483. package/node/validation/validateDate.js +4 -0
  484. package/node/validation/validateDateTime.js +4 -0
  485. package/node/validation/validateTime.js +4 -0
  486. package/package.json +5 -5
  487. package/themeAugmentation/props.d.ts +28 -28
  488. package/timeViewRenderers/timeViewRenderers.d.ts +6 -6
  489. package/validation/extractValidationProps.d.ts +4 -4
  490. package/validation/useValidation.d.ts +9 -10
  491. package/validation/useValidation.js +2 -3
  492. package/validation/validateDate.d.ts +7 -2
  493. package/validation/validateDate.js +5 -0
  494. package/validation/validateDateTime.d.ts +10 -4
  495. package/validation/validateDateTime.js +5 -0
  496. package/validation/validateTime.d.ts +7 -2
  497. package/validation/validateTime.js +5 -0
  498. package/hooks/usePickersContext.d.ts +0 -4
  499. package/hooks/usePickersContext.js +0 -15
  500. package/hooks/usePickersTranslations.d.ts +0 -2
  501. package/internals/components/PickersProvider.d.ts +0 -34
  502. package/internals/components/PickersProvider.js +0 -26
  503. package/internals/hooks/usePicker/usePickerOwnerState.d.ts +0 -9
  504. package/internals/hooks/usePicker/usePickerOwnerState.js +0 -13
  505. package/modern/hooks/usePickersContext.js +0 -15
  506. package/modern/internals/components/PickersProvider.js +0 -26
  507. package/modern/internals/hooks/usePicker/usePickerOwnerState.js +0 -13
  508. package/node/hooks/usePickersContext.js +0 -21
  509. package/node/hooks/usePickersTranslations.js +0 -10
  510. package/node/internals/components/PickersProvider.js +0 -34
  511. package/node/internals/hooks/usePicker/usePickerOwnerState.js +0 -20
  512. /package/internals/models/{props/clock.js → formProps.js} +0 -0
  513. /package/{modern/internals/models/props/clock.js → internals/models/props/time.js} +0 -0
  514. /package/node/internals/models/{props/clock.js → formProps.js} +0 -0
@@ -31,7 +31,7 @@ const nnNOPickers = {
31
31
  timePickerToolbarTitle: 'Vel klokkeslett',
32
32
  dateRangePickerToolbarTitle: 'Vel datoperiode',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `Vel ${timeViews[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Ingen tid vald' : `Vald tid er ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `Vel ${timeViews[view]}. ${!formattedTime ? 'Ingen tid vald' : `Vald tid er ${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours} timar`,
36
36
  minutesClockNumberText: minutes => `${minutes} minuttar`,
37
37
  secondsClockNumberText: seconds => `${seconds} sekundar`,
@@ -43,8 +43,8 @@ const nnNOPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `Veke ${weekNumber}`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Vel dato, vald dato er ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Vel dato',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Vel tid, vald tid er ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Vel tid',
46
+ openDatePickerDialogue: formattedDate => formattedDate ? `Vel dato, vald dato er ${formattedDate}` : 'Vel dato',
47
+ openTimePickerDialogue: formattedTime => formattedTime ? `Vel tid, vald tid er ${formattedTime}` : 'Vel tid',
48
48
  fieldClearLabel: 'Fjern verdi',
49
49
  // Table labels
50
50
  timeTableLabel: 'vel tid',
@@ -31,7 +31,7 @@ const plPLPickers = {
31
31
  timePickerToolbarTitle: 'Wybierz czas',
32
32
  dateRangePickerToolbarTitle: 'Wybierz zakres dat',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `Wybierz ${timeViews[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Nie wybrano czasu' : `Wybrany czas to ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `Wybierz ${timeViews[view]}. ${!formattedTime ? 'Nie wybrano czasu' : `Wybrany czas to ${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours} godzin`,
36
36
  minutesClockNumberText: minutes => `${minutes} minut`,
37
37
  secondsClockNumberText: seconds => `${seconds} sekund`,
@@ -43,8 +43,8 @@ const plPLPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `Tydzień ${weekNumber}`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => value != null && utils.isValid(value) ? `Wybierz datę, obecnie wybrana data to ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Wybierz datę',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Wybierz czas, obecnie wybrany czas to ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Wybierz czas',
46
+ openDatePickerDialogue: formattedDate => formattedDate ? `Wybierz datę, obecnie wybrana data to ${formattedDate}` : 'Wybierz datę',
47
+ openTimePickerDialogue: formattedTime => formattedTime ? `Wybierz czas, obecnie wybrany czas to ${formattedTime}` : 'Wybierz czas',
48
48
  fieldClearLabel: 'Wyczyść',
49
49
  // Table labels
50
50
  timeTableLabel: 'wybierz czas',
@@ -31,7 +31,7 @@ const ptBRPickers = {
31
31
  timePickerToolbarTitle: 'Selecione a hora',
32
32
  dateRangePickerToolbarTitle: 'Selecione o intervalo entre datas',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `Selecione ${timeViews[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Hora não selecionada' : `Selecionado a hora ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `Selecione ${timeViews[view]}. ${!formattedTime ? 'Hora não selecionada' : `Selecionado a hora ${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours} horas`,
36
36
  minutesClockNumberText: minutes => `${minutes} minutos`,
37
37
  secondsClockNumberText: seconds => `${seconds} segundos`,
@@ -43,8 +43,10 @@ const ptBRPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `Semana ${weekNumber}`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Escolha uma data, data selecionada ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Escolha uma data',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Escolha uma hora, hora selecionada ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Escolha uma hora',
46
+ openDatePickerDialogue: formattedDate => {
47
+ return formattedDate ? `Escolha uma data, data selecionada ${formattedDate}` : 'Escolha uma data';
48
+ },
49
+ openTimePickerDialogue: formattedTime => formattedTime ? `Escolha uma hora, hora selecionada ${formattedTime}` : 'Escolha uma hora',
48
50
  fieldClearLabel: 'Limpar valor',
49
51
  // Table labels
50
52
  timeTableLabel: 'escolha uma hora',
@@ -31,7 +31,7 @@ const ptPTPickers = {
31
31
  timePickerToolbarTitle: 'Selecione a hora',
32
32
  dateRangePickerToolbarTitle: 'Selecione o intervalo de datas',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `Selecione ${timeViews[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Hora não selecionada' : `Selecionado a hora ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `Selecione ${timeViews[view]}. ${!formattedTime ? 'Hora não selecionada' : `Selecionado a hora ${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours} horas`,
36
36
  minutesClockNumberText: minutes => `${minutes} minutos`,
37
37
  secondsClockNumberText: seconds => `${seconds} segundos`,
@@ -43,8 +43,8 @@ const ptPTPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `Semana ${weekNumber}`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Escolha uma data, a data selecionada é ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Escolha uma data',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Escolha uma hora, a hora selecionada é ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Escolha uma hora',
46
+ openDatePickerDialogue: formattedDate => formattedDate ? `Escolha uma data, a data selecionada é ${formattedDate}` : 'Escolha uma data',
47
+ openTimePickerDialogue: formattedTime => formattedTime ? `Escolha uma hora, a hora selecionada é ${formattedTime}` : 'Escolha uma hora',
48
48
  fieldClearLabel: 'Limpar valor',
49
49
  // Table labels
50
50
  timeTableLabel: 'escolha uma hora',
@@ -33,7 +33,7 @@ const roROPickers = {
33
33
  timePickerToolbarTitle: 'Selectați ora',
34
34
  dateRangePickerToolbarTitle: 'Selectați intervalul de date',
35
35
  // Clock labels
36
- clockLabelText: (view, time, utils, formattedTime) => `Selectați ${timeViews[view] ?? view}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Nicio oră selectată' : `Ora selectată este ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
36
+ clockLabelText: (view, formattedTime) => `Selectați ${timeViews[view] ?? view}. ${!formattedTime ? 'Nicio oră selectată' : `Ora selectată este ${formattedTime}`}`,
37
37
  hoursClockNumberText: hours => `${hours} ${timeViews.hours}`,
38
38
  minutesClockNumberText: minutes => `${minutes} ${timeViews.minutes}`,
39
39
  secondsClockNumberText: seconds => `${seconds} ${timeViews.seconds}`,
@@ -45,8 +45,8 @@ const roROPickers = {
45
45
  calendarWeekNumberAriaLabelText: weekNumber => `Săptămâna ${weekNumber}`,
46
46
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
47
47
  // Open picker labels
48
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Selectați data, data selectată este ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Selectați data',
49
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Selectați ora, ora selectată este ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Selectați ora',
48
+ openDatePickerDialogue: formattedDate => formattedDate ? `Selectați data, data selectată este ${formattedDate}` : 'Selectați data',
49
+ openTimePickerDialogue: formattedTime => formattedTime ? `Selectați ora, ora selectată este ${formattedTime}` : 'Selectați ora',
50
50
  fieldClearLabel: 'Golire conținut',
51
51
  // Table labels
52
52
  timeTableLabel: 'Selectați ora',
@@ -32,7 +32,7 @@ const ruRUPickers = {
32
32
  timePickerToolbarTitle: 'Выбрать время',
33
33
  dateRangePickerToolbarTitle: 'Выбрать период',
34
34
  // Clock labels
35
- clockLabelText: (view, time, utils, formattedTime) => `Выбрать ${timeViews[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Время не выбрано' : `Выбрано время ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
+ clockLabelText: (view, formattedTime) => `Выбрать ${timeViews[view]}. ${!formattedTime ? 'Время не выбрано' : `Выбрано время ${formattedTime}`}`,
36
36
  hoursClockNumberText: hours => `${hours} часов`,
37
37
  minutesClockNumberText: minutes => `${minutes} минут`,
38
38
  secondsClockNumberText: seconds => `${seconds} секунд`,
@@ -44,8 +44,8 @@ const ruRUPickers = {
44
44
  calendarWeekNumberAriaLabelText: weekNumber => `Неделя ${weekNumber}`,
45
45
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
46
46
  // Open picker labels
47
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Выберите дату, выбрана дата ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Выберите дату',
48
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Выберите время, выбрано время ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Выберите время',
47
+ openDatePickerDialogue: formattedDate => formattedDate ? `Выберите дату, выбрана дата ${formattedDate}` : 'Выберите дату',
48
+ openTimePickerDialogue: formattedTime => formattedTime ? `Выберите время, выбрано время ${formattedTime}` : 'Выберите время',
49
49
  fieldClearLabel: 'Очистить значение',
50
50
  // Table labels
51
51
  timeTableLabel: 'выбрать время',
@@ -33,7 +33,7 @@ const skSKPickers = {
33
33
  timePickerToolbarTitle: 'Vyberte čas',
34
34
  dateRangePickerToolbarTitle: 'Vyberete rozmedzie dátumov',
35
35
  // Clock labels
36
- clockLabelText: (view, time, utils, formattedTime) => `${timeViews[view] ?? view} vybraný. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Nie je vybraný čas' : `Vybraný čas je ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
36
+ clockLabelText: (view, formattedTime) => `${timeViews[view] ?? view} vybraný. ${!formattedTime ? 'Nie je vybraný čas' : `Vybraný čas je ${formattedTime}`}`,
37
37
  hoursClockNumberText: hours => `${hours} hodín`,
38
38
  minutesClockNumberText: minutes => `${minutes} minút`,
39
39
  secondsClockNumberText: seconds => `${seconds} sekúnd`,
@@ -45,8 +45,8 @@ const skSKPickers = {
45
45
  calendarWeekNumberAriaLabelText: weekNumber => `${weekNumber} týždeň v roku`,
46
46
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
47
47
  // Open picker labels
48
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Vyberte dátum, vybraný dátum je ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Vyberte dátum',
49
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Vyberte čas, vybraný čas je ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Vyberte čas',
48
+ openDatePickerDialogue: formattedDate => formattedDate ? `Vyberte dátum, vybraný dátum je ${formattedDate}` : 'Vyberte dátum',
49
+ openTimePickerDialogue: formattedTime => formattedTime ? `Vyberte čas, vybraný čas je ${formattedTime}` : 'Vyberte čas',
50
50
  // fieldClearLabel: 'Clear',
51
51
 
52
52
  // Table labels
@@ -31,7 +31,7 @@ const svSEPickers = {
31
31
  timePickerToolbarTitle: 'Välj tid',
32
32
  dateRangePickerToolbarTitle: 'Välj datumintervall',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `Välj ${timeViews[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Ingen tid vald' : `Vald tid är ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `Välj ${timeViews[view]}. ${!formattedTime ? 'Ingen tid vald' : `Vald tid är ${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours} timmar`,
36
36
  minutesClockNumberText: minutes => `${minutes} minuter`,
37
37
  secondsClockNumberText: seconds => `${seconds} sekunder`,
@@ -43,8 +43,8 @@ const svSEPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `Vecka ${weekNumber}`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Välj datum, valt datum är ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Välj datum',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Välj tid, vald tid är ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Välj tid',
46
+ openDatePickerDialogue: formattedDate => formattedDate ? `Välj datum, valt datum är ${formattedDate}` : 'Välj datum',
47
+ openTimePickerDialogue: formattedTime => formattedTime ? `Välj tid, vald tid är ${formattedTime}` : 'Välj tid',
48
48
  fieldClearLabel: 'Rensa värde',
49
49
  // Table labels
50
50
  timeTableLabel: 'välj tid',
@@ -32,7 +32,7 @@ const trTRPickers = {
32
32
  timePickerToolbarTitle: 'Saat seç',
33
33
  dateRangePickerToolbarTitle: 'Tarih aralığı seçin',
34
34
  // Clock labels
35
- clockLabelText: (view, time, utils, formattedTime) => `${timeViews[view]} seç. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Zaman seçilmedi' : `Seçilen zaman: ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
+ clockLabelText: (view, formattedTime) => `${timeViews[view]} seç. ${!formattedTime ? 'Zaman seçilmedi' : `Seçilen zaman: ${formattedTime}`}`,
36
36
  hoursClockNumberText: hours => `${hours} saat`,
37
37
  minutesClockNumberText: minutes => `${minutes} dakika`,
38
38
  secondsClockNumberText: seconds => `${seconds} saniye`,
@@ -44,8 +44,8 @@ const trTRPickers = {
44
44
  calendarWeekNumberAriaLabelText: weekNumber => `Hafta ${weekNumber}`,
45
45
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
46
46
  // Open picker labels
47
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Tarih seçin, seçilen tarih: ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Tarih seç',
48
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Saat seçin, seçilen saat: ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Saat seç',
47
+ openDatePickerDialogue: formattedDate => formattedDate ? `Tarih seçin, seçilen tarih: ${formattedDate}` : 'Tarih seç',
48
+ openTimePickerDialogue: formattedTime => formattedTime ? `Saat seçin, seçilen saat: ${formattedTime}` : 'Saat seç',
49
49
  // fieldClearLabel: 'Clear',
50
50
 
51
51
  // Table labels
@@ -31,7 +31,7 @@ const ukUAPickers = {
31
31
  timePickerToolbarTitle: 'Вибрати час',
32
32
  dateRangePickerToolbarTitle: 'Вибрати календарний період',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `Вибрати ${timeViews[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Час не вибраний' : `Вибрано час ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `Вибрати ${timeViews[view]}. ${!formattedTime ? 'Час не вибраний' : `Вибрано час ${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours} годин`,
36
36
  minutesClockNumberText: minutes => `${minutes} хвилин`,
37
37
  secondsClockNumberText: seconds => `${seconds} секунд`,
@@ -43,8 +43,8 @@ const ukUAPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `Тиждень ${weekNumber}`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Оберіть дату, обрана дата ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Оберіть дату',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Оберіть час, обраний час ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Оберіть час',
46
+ openDatePickerDialogue: formattedDate => formattedDate ? `Оберіть дату, обрана дата ${formattedDate}` : 'Оберіть дату',
47
+ openTimePickerDialogue: formattedTime => formattedTime ? `Оберіть час, обраний час ${formattedTime}` : 'Оберіть час',
48
48
  fieldClearLabel: 'Очистити дані',
49
49
  // Table labels
50
50
  timeTableLabel: 'оберіть час',
@@ -32,7 +32,7 @@ const urPKPickers = {
32
32
  timePickerToolbarTitle: 'وقت منتخب کریں',
33
33
  dateRangePickerToolbarTitle: 'تاریخوں کی رینج منتخب کریں',
34
34
  // Clock labels
35
- clockLabelText: (view, time, utils, formattedTime) => `${timeViews[view]} منتخب کریں ${!formattedTime && (time === null || !utils.isValid(time)) ? 'کوئی وقت منتخب نہیں' : `منتخب وقت ہے ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
+ clockLabelText: (view, formattedTime) => `${timeViews[view]} منتخب کریں ${!formattedTime ? 'کوئی وقت منتخب نہیں' : `منتخب وقت ہے ${formattedTime}`}`,
36
36
  hoursClockNumberText: hours => `${hours} گھنٹے`,
37
37
  minutesClockNumberText: minutes => `${minutes} منٹ`,
38
38
  secondsClockNumberText: seconds => `${seconds} سیکنڈ`,
@@ -44,8 +44,8 @@ const urPKPickers = {
44
44
  calendarWeekNumberAriaLabelText: weekNumber => `ہفتہ ${weekNumber}`,
45
45
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
46
46
  // Open picker labels
47
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `تاریخ منتخب کریں، منتخب شدہ تاریخ ہے ${formattedDate ?? utils.format(value, 'fullDate')}` : 'تاریخ منتخب کریں',
48
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `وقت منتخب کریں، منتخب شدہ وقت ہے ${formattedTime ?? utils.format(value, 'fullTime')}` : 'وقت منتخب کریں',
47
+ openDatePickerDialogue: formattedDate => formattedDate ? `تاریخ منتخب کریں، منتخب شدہ تاریخ ہے ${formattedDate}` : 'تاریخ منتخب کریں',
48
+ openTimePickerDialogue: formattedTime => formattedTime ? `وقت منتخب کریں، منتخب شدہ وقت ہے ${formattedTime}` : 'وقت منتخب کریں',
49
49
  // fieldClearLabel: 'Clear',
50
50
 
51
51
  // Table labels
@@ -20,6 +20,6 @@ export const buildGetOpenDialogAriaText = params => {
20
20
  return value => {
21
21
  const formattedValue = value !== null && utils.isValid(value) ? utils.format(value, formatKey) : null;
22
22
  const translation = propsTranslation ?? contextTranslation;
23
- return translation(value, utils, formattedValue);
23
+ return translation(formattedValue);
24
24
  };
25
25
  };
@@ -31,7 +31,7 @@ const viVNPickers = {
31
31
  timePickerToolbarTitle: 'Chọn giờ',
32
32
  dateRangePickerToolbarTitle: 'Chọn khoảng ngày',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `Chọn ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Không có giờ được chọn' : `Giờ được chọn là ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `Chọn ${views[view]}. ${!formattedTime ? 'Không có giờ được chọn' : `Giờ được chọn là ${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours} giờ`,
36
36
  minutesClockNumberText: minutes => `${minutes} phút`,
37
37
  secondsClockNumberText: seconds => `${seconds} giây`,
@@ -43,8 +43,8 @@ const viVNPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `Tuần ${weekNumber}`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Chọn ngày, ngày đã chọn là ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Chọn ngày',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Chọn giờ, giờ đã chọn là ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Chọn giờ',
46
+ openDatePickerDialogue: formattedDate => formattedDate ? `Chọn ngày, ngày đã chọn là ${formattedDate}` : 'Chọn ngày',
47
+ openTimePickerDialogue: formattedTime => formattedTime ? `Chọn giờ, giờ đã chọn là ${formattedTime}` : 'Chọn giờ',
48
48
  fieldClearLabel: 'Xóa giá trị',
49
49
  // Table labels
50
50
  timeTableLabel: 'chọn giờ',
@@ -31,7 +31,7 @@ const zhCNPickers = {
31
31
  timePickerToolbarTitle: '选择时间',
32
32
  dateRangePickerToolbarTitle: '选择时间范围',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `选择 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? '未选择时间' : `已选择${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `选择 ${views[view]}. ${!formattedTime ? '未选择时间' : `已选择${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours}小时`,
36
36
  minutesClockNumberText: minutes => `${minutes}分钟`,
37
37
  secondsClockNumberText: seconds => `${seconds}秒`,
@@ -43,8 +43,8 @@ const zhCNPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `第${weekNumber}周`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `选择日期,已选择${formattedDate ?? utils.format(value, 'fullDate')}` : '选择日期',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `选择时间,已选择${formattedTime ?? utils.format(value, 'fullTime')}` : '选择时间',
46
+ openDatePickerDialogue: formattedDate => formattedDate ? `选择日期,已选择${formattedDate}` : '选择日期',
47
+ openTimePickerDialogue: formattedTime => formattedTime ? `选择时间,已选择${formattedTime}` : '选择时间',
48
48
  fieldClearLabel: '清除',
49
49
  // Table labels
50
50
  timeTableLabel: '选择时间',
@@ -31,7 +31,7 @@ const zhHKPickers = {
31
31
  timePickerToolbarTitle: '選擇時間',
32
32
  dateRangePickerToolbarTitle: '選擇時間範圍',
33
33
  // Clock labels
34
- clockLabelText: (view, time, utils, formattedTime) => `選擇 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? '未選擇時間' : `已選擇${formattedTime ?? utils.format(time, 'fullTime')}`}`,
34
+ clockLabelText: (view, formattedTime) => `選擇 ${views[view]}. ${!formattedTime ? '未選擇時間' : `已選擇${formattedTime}`}`,
35
35
  hoursClockNumberText: hours => `${hours}小時`,
36
36
  minutesClockNumberText: minutes => `${minutes}分鐘`,
37
37
  secondsClockNumberText: seconds => `${seconds}秒`,
@@ -43,8 +43,8 @@ const zhHKPickers = {
43
43
  calendarWeekNumberAriaLabelText: weekNumber => `第${weekNumber}週`,
44
44
  calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
45
  // Open picker labels
46
- openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `選擇日期,已選擇${formattedDate ?? utils.format(value, 'fullDate')}` : '選擇日期',
47
- openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `選擇時間,已選擇${formattedTime ?? utils.format(value, 'fullTime')}` : '選擇時間',
46
+ openDatePickerDialogue: formattedDate => formattedDate ? `選擇日期,已選擇${formattedDate}` : '選擇日期',
47
+ openTimePickerDialogue: formattedTime => formattedTime ? `選擇時間,已選擇${formattedTime}` : '選擇時間',
48
48
  fieldClearLabel: '清除',
49
49
  // Table labels
50
50
  timeTableLabel: '選擇時間',
@@ -5,13 +5,12 @@ import useEventCallback from '@mui/utils/useEventCallback';
5
5
  import { useLocalizationContext } from "../internals/hooks/useUtils.js";
6
6
  /**
7
7
  * Utility hook to check if a given value is valid based on the provided validation props.
8
- * @template TDate
9
8
  * @template TValue The value type. It will be either the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
10
9
  * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
11
- * @param {UseValidationOptions<TValue, TDate, TError, TValidationProps>} options The options to configure the hook.
10
+ * @param {UseValidationOptions<TValue, TError, TValidationProps>} options The options to configure the hook.
12
11
  * @param {TValue} options.value The value to validate.
13
12
  * @param {PickersTimezone} options.timezone The timezone to use for the validation.
14
- * @param {Validator<TValue, TDate, TError, TValidationProps>} options.validator The validator function to use.
13
+ * @param {Validator<TValue, TError, TValidationProps>} options.validator The validator function to use.
15
14
  * @param {TValidationProps} options.props The validation props, they differ depending on the component.
16
15
  * @param {(error: TError, value: TValue) => void} options.onError Callback fired when the error associated with the current value changes.
17
16
  */
@@ -1,5 +1,10 @@
1
1
  import { applyDefaultDate } from "../internals/utils/date-utils.js";
2
2
  import { singleItemValueManager } from "../internals/utils/valueManagers.js";
3
+
4
+ /**
5
+ * Validation props used by the Date Picker, Date Field and Date Calendar components.
6
+ */
7
+
3
8
  export const validateDate = ({
4
9
  props,
5
10
  value,
@@ -1,6 +1,11 @@
1
1
  import { validateDate } from "./validateDate.js";
2
2
  import { validateTime } from "./validateTime.js";
3
3
  import { singleItemValueManager } from "../internals/utils/valueManagers.js";
4
+
5
+ /**
6
+ * Validation props used by the Date Time Picker and Date Time Field components.
7
+ */
8
+
4
9
  export const validateDateTime = ({
5
10
  adapter,
6
11
  value,
@@ -1,5 +1,10 @@
1
1
  import { createIsAfterIgnoreDatePart } from "../internals/utils/time-utils.js";
2
2
  import { singleItemValueManager } from "../internals/utils/valueManagers.js";
3
+
4
+ /**
5
+ * Validation props used by the Time Picker, Time Field and Clock components.
6
+ */
7
+
3
8
  export const validateTime = ({
4
9
  adapter,
5
10
  value,
@@ -30,12 +30,10 @@ var _dateCalendarClasses = require("./dateCalendarClasses");
30
30
  var _useValueWithTimezone = require("../internals/hooks/useValueWithTimezone");
31
31
  var _valueManagers = require("../internals/utils/valueManagers");
32
32
  var _dimensions = require("../internals/constants/dimensions");
33
+ var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
33
34
  var _jsxRuntime = require("react/jsx-runtime");
34
- const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsOrder", "yearsPerRow", "monthsPerRow", "timezone"];
35
- const useUtilityClasses = ownerState => {
36
- const {
37
- classes
38
- } = ownerState;
35
+ const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "classes", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsOrder", "yearsPerRow", "monthsPerRow", "timezone"];
36
+ const useUtilityClasses = classes => {
39
37
  const slots = {
40
38
  root: ['root'],
41
39
  viewTransitionContainer: ['viewTransitionContainer']
@@ -91,6 +89,9 @@ const DateCalendarViewTransitionContainer = (0, _styles.styled)(_PickersFadeTran
91
89
  */
92
90
  const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(inProps, ref) {
93
91
  const utils = (0, _useUtils.useUtils)();
92
+ const {
93
+ ownerState
94
+ } = (0, _usePickerPrivateContext.usePickerPrivateContext)();
94
95
  const id = (0, _utils.unstable_useId)();
95
96
  const props = useDateCalendarDefaultizedProps(inProps, 'MuiDateCalendar');
96
97
  const {
@@ -112,6 +113,7 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
112
113
  views,
113
114
  openTo,
114
115
  className,
116
+ classes: classesProp,
115
117
  disabled,
116
118
  readOnly,
117
119
  minDate,
@@ -142,6 +144,7 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
142
144
  timezone: timezoneProp,
143
145
  value: valueProp,
144
146
  defaultValue,
147
+ referenceDate: referenceDateProp,
145
148
  onChange,
146
149
  valueManager: _valueManagers.singleItemValueManager
147
150
  });
@@ -210,7 +213,7 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
210
213
  timezone,
211
214
  labelId: gridLabelId
212
215
  },
213
- ownerState: props
216
+ ownerState
214
217
  });
215
218
  const handleDateMonthChange = (0, _utils.unstable_useEventCallback)(newDate => {
216
219
  const startOfMonth = utils.startOfMonth(newDate);
@@ -269,8 +272,7 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
269
272
  }
270
273
  }, [value]); // eslint-disable-line
271
274
 
272
- const ownerState = props;
273
- const classes = useUtilityClasses(ownerState);
275
+ const classes = useUtilityClasses(classesProp);
274
276
  const baseDateValidationProps = {
275
277
  disablePast,
276
278
  disableFuture,
@@ -372,9 +374,9 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
372
374
  className: _propTypes.default.string,
373
375
  /**
374
376
  * Formats the day of week displayed in the calendar header.
375
- * @param {TDate} date The date of the day of week provided by the adapter.
377
+ * @param {PickerValidDate} date The date of the day of week provided by the adapter.
376
378
  * @returns {string} The name to display.
377
- * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
379
+ * @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
378
380
  */
379
381
  dayOfWeekFormatter: _propTypes.default.func,
380
382
  /**
@@ -383,7 +385,8 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
383
385
  */
384
386
  defaultValue: _propTypes.default.object,
385
387
  /**
386
- * If `true`, the picker and text field are disabled.
388
+ * If `true`, the component is disabled.
389
+ * When disabled, the value cannot be changed and no interaction is possible.
387
390
  * @default false
388
391
  */
389
392
  disabled: _propTypes.default.bool,
@@ -454,8 +457,7 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
454
457
  onFocusedViewChange: _propTypes.default.func,
455
458
  /**
456
459
  * Callback fired on month change.
457
- * @template TDate
458
- * @param {TDate} month The new month.
460
+ * @param {PickerValidDate} month The new month.
459
461
  */
460
462
  onMonthChange: _propTypes.default.func,
461
463
  /**
@@ -466,8 +468,7 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
466
468
  onViewChange: _propTypes.default.func,
467
469
  /**
468
470
  * Callback fired on year change.
469
- * @template TDate
470
- * @param {TDate} year The new year.
471
+ * @param {PickerValidDate} year The new year.
471
472
  */
472
473
  onYearChange: _propTypes.default.func,
473
474
  /**
@@ -477,7 +478,8 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
477
478
  */
478
479
  openTo: _propTypes.default.oneOf(['day', 'month', 'year']),
479
480
  /**
480
- * Make picker read only.
481
+ * If `true`, the component is read-only.
482
+ * When read-only, the value cannot be changed but the user can interact with the interface.
481
483
  * @default false
482
484
  */
483
485
  readOnly: _propTypes.default.bool,
@@ -502,22 +504,19 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
502
504
  *
503
505
  * 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.
504
506
  *
505
- * @template TDate
506
- * @param {TDate} day The date to test.
507
+ * @param {PickerValidDate} day The date to test.
507
508
  * @returns {boolean} If `true` the date will be disabled.
508
509
  */
509
510
  shouldDisableDate: _propTypes.default.func,
510
511
  /**
511
512
  * Disable specific month.
512
- * @template TDate
513
- * @param {TDate} month The month to test.
513
+ * @param {PickerValidDate} month The month to test.
514
514
  * @returns {boolean} If `true`, the month will be disabled.
515
515
  */
516
516
  shouldDisableMonth: _propTypes.default.func,
517
517
  /**
518
518
  * Disable specific year.
519
- * @template TDate
520
- * @param {TDate} year The year to test.
519
+ * @param {PickerValidDate} year The year to test.
521
520
  * @returns {boolean} If `true`, the year will be disabled.
522
521
  */
523
522
  shouldDisableYear: _propTypes.default.func,
@@ -17,20 +17,18 @@ var _styles = require("@mui/material/styles");
17
17
  var _utils = require("@mui/utils");
18
18
  var _clsx = _interopRequireDefault(require("clsx"));
19
19
  var _PickersDay = require("../PickersDay/PickersDay");
20
- var _usePickersTranslations = require("../hooks/usePickersTranslations");
20
+ var _usePickerTranslations = require("../hooks/usePickerTranslations");
21
21
  var _useUtils = require("../internals/hooks/useUtils");
22
22
  var _dimensions = require("../internals/constants/dimensions");
23
23
  var _PickersSlideTransition = require("./PickersSlideTransition");
24
24
  var _useIsDateDisabled = require("./useIsDateDisabled");
25
25
  var _dateUtils = require("../internals/utils/date-utils");
26
26
  var _dayCalendarClasses = require("./dayCalendarClasses");
27
+ var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
27
28
  var _jsxRuntime = require("react/jsx-runtime");
28
29
  const _excluded = ["parentProps", "day", "focusableDay", "selectedDays", "isDateDisabled", "currentMonthNumber", "isViewFocused"],
29
30
  _excluded2 = ["ownerState"];
30
- const useUtilityClasses = ownerState => {
31
- const {
32
- classes
33
- } = ownerState;
31
+ const useUtilityClasses = classes => {
34
32
  const slots = {
35
33
  root: ['root'],
36
34
  header: ['header'],
@@ -163,9 +161,13 @@ function WrappedDay(_ref) {
163
161
  } = parentProps;
164
162
  const utils = (0, _useUtils.useUtils)();
165
163
  const now = (0, _useUtils.useNow)(timezone);
164
+ const {
165
+ ownerState
166
+ } = (0, _usePickerPrivateContext.usePickerPrivateContext)();
166
167
  const isFocusableDay = focusableDay !== null && utils.isSameDay(day, focusableDay);
167
168
  const isSelected = selectedDays.some(selectedDay => utils.isSameDay(selectedDay, day));
168
169
  const isToday = utils.isSameDay(day, now);
170
+ const isDisabled = React.useMemo(() => disabled || isDateDisabled(day), [disabled, isDateDisabled, day]);
169
171
  const Day = slots?.day ?? _PickersDay.PickersDay;
170
172
  // We don't want to pass to ownerState down, to avoid re-rendering all the day whenever a prop changes.
171
173
  const _useSlotProps = (0, _useSlotProps2.default)({
@@ -179,13 +181,13 @@ function WrappedDay(_ref) {
179
181
  // it is used in date range dragging logic by accessing `dataset.timestamp`
180
182
  'data-timestamp': utils.toJsDate(day).valueOf()
181
183
  }, other),
182
- ownerState: (0, _extends2.default)({}, parentProps, {
184
+ ownerState: (0, _extends2.default)({}, ownerState, {
183
185
  day,
184
- selected: isSelected
186
+ isDayDisabled: isDisabled,
187
+ isDaySelected: isSelected
185
188
  })
186
189
  }),
187
190
  dayProps = (0, _objectWithoutPropertiesLoose2.default)(_useSlotProps, _excluded2);
188
- const isDisabled = React.useMemo(() => disabled || isDateDisabled(day), [disabled, isDateDisabled, day]);
189
191
  const outsideCurrentMonth = React.useMemo(() => utils.getMonth(day) !== currentMonthNumber, [utils, day, currentMonthNumber]);
190
192
  const isFirstVisibleCell = React.useMemo(() => {
191
193
  const startOfMonth = utils.startOfMonth(utils.setMonth(day, currentMonthNumber));
@@ -228,6 +230,7 @@ function DayCalendar(inProps) {
228
230
  const {
229
231
  onFocusedDayChange,
230
232
  className,
233
+ classes: classesProp,
231
234
  currentMonth,
232
235
  selectedDays,
233
236
  focusedDay,
@@ -258,7 +261,7 @@ function DayCalendar(inProps) {
258
261
  timezone
259
262
  } = props;
260
263
  const now = (0, _useUtils.useNow)(timezone);
261
- const classes = useUtilityClasses(props);
264
+ const classes = useUtilityClasses(classesProp);
262
265
  const isRtl = (0, _RtlProvider.useRtl)();
263
266
  const isDateDisabled = (0, _useIsDateDisabled.useIsDateDisabled)({
264
267
  shouldDisableDate,
@@ -270,7 +273,7 @@ function DayCalendar(inProps) {
270
273
  disableFuture,
271
274
  timezone
272
275
  });
273
- const translations = (0, _usePickersTranslations.usePickersTranslations)();
276
+ const translations = (0, _usePickerTranslations.usePickerTranslations)();
274
277
  const [internalHasFocus, setInternalHasFocus] = (0, _utils.unstable_useControlled)({
275
278
  name: 'DayCalendar',
276
279
  state: 'hasFocus',