@mui/x-date-pickers 7.15.0 → 7.17.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 (674) hide show
  1. package/AdapterDateFns/AdapterDateFns.js +1 -1
  2. package/AdapterDateFns/index.js +1 -1
  3. package/AdapterDateFnsBase/index.js +1 -1
  4. package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -1
  5. package/AdapterDateFnsJalali/index.js +1 -1
  6. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -1
  7. package/AdapterDateFnsJalaliV3/index.js +1 -1
  8. package/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -1
  9. package/AdapterDateFnsV3/index.js +1 -1
  10. package/AdapterDayjs/AdapterDayjs.js +5 -6
  11. package/AdapterDayjs/index.js +1 -1
  12. package/AdapterLuxon/AdapterLuxon.js +4 -5
  13. package/AdapterLuxon/index.js +1 -1
  14. package/AdapterMoment/AdapterMoment.js +4 -5
  15. package/AdapterMoment/index.js +1 -1
  16. package/AdapterMomentHijri/AdapterMomentHijri.js +1 -1
  17. package/AdapterMomentHijri/index.js +1 -1
  18. package/AdapterMomentJalaali/AdapterMomentJalaali.js +1 -1
  19. package/AdapterMomentJalaali/index.js +1 -1
  20. package/CHANGELOG.md +185 -1
  21. package/DateCalendar/DateCalendar.js +18 -16
  22. package/DateCalendar/DayCalendar.js +9 -10
  23. package/DateCalendar/PickersFadeTransitionGroup.js +1 -1
  24. package/DateCalendar/PickersSlideTransition.js +1 -1
  25. package/DateCalendar/index.js +5 -5
  26. package/DateCalendar/useCalendarState.js +6 -4
  27. package/DateCalendar/useIsDateDisabled.d.ts +4 -3
  28. package/DateCalendar/useIsDateDisabled.js +6 -4
  29. package/DateField/DateField.js +15 -11
  30. package/DateField/DateField.types.d.ts +7 -2
  31. package/DateField/index.d.ts +1 -1
  32. package/DateField/index.js +2 -2
  33. package/DateField/useDateField.d.ts +1 -1
  34. package/DateField/useDateField.js +8 -6
  35. package/DatePicker/DatePicker.js +16 -14
  36. package/DatePicker/DatePickerToolbar.js +7 -5
  37. package/DatePicker/index.js +3 -3
  38. package/DatePicker/shared.js +4 -4
  39. package/DateTimeField/DateTimeField.js +15 -11
  40. package/DateTimeField/DateTimeField.types.d.ts +7 -2
  41. package/DateTimeField/index.d.ts +1 -1
  42. package/DateTimeField/index.js +2 -2
  43. package/DateTimeField/useDateTimeField.d.ts +1 -1
  44. package/DateTimeField/useDateTimeField.js +8 -6
  45. package/DateTimePicker/DateTimePicker.js +16 -14
  46. package/DateTimePicker/DateTimePickerTabs.js +6 -4
  47. package/DateTimePicker/DateTimePickerToolbar.js +13 -11
  48. package/DateTimePicker/index.js +5 -5
  49. package/DateTimePicker/shared.js +5 -5
  50. package/DayCalendarSkeleton/DayCalendarSkeleton.js +4 -2
  51. package/DayCalendarSkeleton/index.js +2 -2
  52. package/DesktopDatePicker/DesktopDatePicker.js +30 -23
  53. package/DesktopDatePicker/index.js +1 -1
  54. package/DesktopDateTimePicker/DesktopDateTimePicker.js +37 -30
  55. package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
  56. package/DesktopDateTimePicker/index.js +2 -2
  57. package/DesktopTimePicker/DesktopTimePicker.js +31 -24
  58. package/DesktopTimePicker/index.js +1 -1
  59. package/DigitalClock/DigitalClock.js +13 -11
  60. package/DigitalClock/index.js +2 -2
  61. package/LocalizationProvider/LocalizationProvider.js +2 -0
  62. package/LocalizationProvider/index.js +1 -1
  63. package/MobileDatePicker/MobileDatePicker.js +29 -22
  64. package/MobileDatePicker/index.js +1 -1
  65. package/MobileDateTimePicker/MobileDateTimePicker.js +30 -23
  66. package/MobileDateTimePicker/index.js +1 -1
  67. package/MobileTimePicker/MobileTimePicker.js +29 -22
  68. package/MobileTimePicker/index.js +1 -1
  69. package/MonthCalendar/MonthCalendar.js +10 -8
  70. package/MonthCalendar/PickersMonth.js +1 -1
  71. package/MonthCalendar/index.js +3 -3
  72. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +19 -17
  73. package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -2
  74. package/MultiSectionDigitalClock/index.js +3 -3
  75. package/PickersActionBar/PickersActionBar.js +3 -1
  76. package/PickersActionBar/index.js +1 -1
  77. package/PickersCalendarHeader/PickersCalendarHeader.js +9 -7
  78. package/PickersCalendarHeader/index.js +2 -2
  79. package/PickersDay/PickersDay.js +5 -3
  80. package/PickersDay/index.js +2 -2
  81. package/PickersLayout/PickersLayout.js +4 -2
  82. package/PickersLayout/index.js +3 -3
  83. package/PickersLayout/usePickerLayout.js +5 -3
  84. package/PickersSectionList/PickersSectionList.js +3 -1
  85. package/PickersSectionList/index.js +2 -2
  86. package/PickersShortcuts/PickersShortcuts.js +3 -1
  87. package/PickersShortcuts/index.js +1 -1
  88. package/PickersTextField/PickersFilledInput/PickersFilledInput.js +3 -3
  89. package/PickersTextField/PickersFilledInput/index.js +2 -2
  90. package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +1 -1
  91. package/PickersTextField/PickersInput/PickersInput.js +3 -3
  92. package/PickersTextField/PickersInput/index.js +2 -2
  93. package/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
  94. package/PickersTextField/PickersInputBase/PickersInputBase.js +2 -2
  95. package/PickersTextField/PickersInputBase/index.js +2 -2
  96. package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +4 -4
  97. package/PickersTextField/PickersOutlinedInput/index.js +2 -2
  98. package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +1 -1
  99. package/PickersTextField/PickersTextField.js +6 -4
  100. package/PickersTextField/index.js +6 -6
  101. package/StaticDatePicker/StaticDatePicker.js +18 -16
  102. package/StaticDatePicker/index.js +1 -1
  103. package/StaticDateTimePicker/StaticDateTimePicker.js +19 -17
  104. package/StaticDateTimePicker/index.js +1 -1
  105. package/StaticTimePicker/StaticTimePicker.js +18 -16
  106. package/StaticTimePicker/index.js +1 -1
  107. package/TimeClock/Clock.js +7 -7
  108. package/TimeClock/ClockNumber.js +2 -2
  109. package/TimeClock/ClockNumbers.js +2 -2
  110. package/TimeClock/ClockPointer.js +2 -2
  111. package/TimeClock/TimeClock.js +16 -14
  112. package/TimeClock/index.js +5 -5
  113. package/TimeField/TimeField.js +15 -11
  114. package/TimeField/TimeField.types.d.ts +7 -2
  115. package/TimeField/index.d.ts +1 -1
  116. package/TimeField/index.js +2 -2
  117. package/TimeField/useTimeField.d.ts +1 -1
  118. package/TimeField/useTimeField.js +8 -6
  119. package/TimePicker/TimePicker.js +16 -14
  120. package/TimePicker/TimePickerToolbar.js +11 -9
  121. package/TimePicker/index.js +3 -3
  122. package/TimePicker/shared.js +3 -3
  123. package/YearCalendar/PickersYear.js +1 -1
  124. package/YearCalendar/YearCalendar.js +10 -8
  125. package/YearCalendar/index.js +3 -3
  126. package/dateViewRenderers/dateViewRenderers.js +2 -2
  127. package/dateViewRenderers/index.js +1 -1
  128. package/hooks/index.d.ts +1 -0
  129. package/hooks/index.js +3 -2
  130. package/hooks/useClearableField.js +4 -2
  131. package/hooks/usePickersTranslations.js +3 -1
  132. package/hooks/useSplitFieldProps.d.ts +19 -0
  133. package/hooks/useSplitFieldProps.js +43 -0
  134. package/icons/index.js +8 -8
  135. package/index.d.ts +1 -0
  136. package/index.js +39 -38
  137. package/internals/components/PickerViewRoot/PickerViewRoot.js +1 -1
  138. package/internals/components/PickerViewRoot/index.js +1 -1
  139. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
  140. package/internals/components/PickersArrowSwitcher/index.js +2 -2
  141. package/internals/components/PickersModalDialog.js +1 -1
  142. package/internals/components/PickersPopper.js +3 -3
  143. package/internals/components/PickersToolbar.js +1 -1
  144. package/internals/components/PickersToolbarButton.js +2 -2
  145. package/internals/components/PickersToolbarText.js +1 -1
  146. package/internals/demo/DemoContainer.js +3 -3
  147. package/internals/demo/index.js +1 -1
  148. package/internals/hooks/date-helpers-hooks.js +2 -2
  149. package/internals/hooks/defaultizedFieldProps.js +2 -2
  150. package/internals/hooks/useClockReferenceDate.js +3 -3
  151. package/internals/hooks/useDesktopPicker/index.js +1 -1
  152. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +16 -8
  153. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +6 -3
  154. package/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
  155. package/internals/hooks/useField/index.js +2 -2
  156. package/internals/hooks/useField/useField.js +17 -12
  157. package/internals/hooks/useField/useField.types.d.ts +6 -22
  158. package/internals/hooks/useField/useField.utils.js +1 -1
  159. package/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
  160. package/internals/hooks/useField/useFieldState.js +8 -10
  161. package/internals/hooks/useField/useFieldV6TextField.js +2 -2
  162. package/internals/hooks/useField/useFieldV7TextField.js +4 -4
  163. package/internals/hooks/useIsLandscape.js +1 -1
  164. package/internals/hooks/useMobilePicker/index.js +1 -1
  165. package/internals/hooks/useMobilePicker/useMobilePicker.js +6 -8
  166. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +2 -2
  167. package/internals/hooks/usePicker/index.js +1 -1
  168. package/internals/hooks/usePicker/usePicker.d.ts +1 -2
  169. package/internals/hooks/usePicker/usePicker.js +4 -4
  170. package/internals/hooks/usePicker/usePickerLayoutProps.js +1 -1
  171. package/internals/hooks/usePicker/usePickerValue.d.ts +1 -2
  172. package/internals/hooks/usePicker/usePickerValue.js +15 -19
  173. package/internals/hooks/usePicker/usePickerValue.types.d.ts +8 -19
  174. package/internals/hooks/usePicker/usePickerViews.js +2 -2
  175. package/internals/hooks/useStaticPicker/index.js +1 -1
  176. package/internals/hooks/useStaticPicker/useStaticPicker.js +4 -4
  177. package/internals/hooks/useUtils.js +2 -2
  178. package/internals/hooks/useValueWithTimezone.js +1 -1
  179. package/internals/hooks/useViews.d.ts +1 -1
  180. package/internals/index.d.ts +0 -8
  181. package/internals/index.js +29 -36
  182. package/internals/models/index.js +2 -2
  183. package/internals/utils/date-time-utils.js +2 -2
  184. package/internals/utils/date-utils.js +1 -1
  185. package/internals/utils/getDefaultReferenceDate.js +2 -2
  186. package/internals/utils/time-utils.js +1 -1
  187. package/internals/utils/valueManagers.js +3 -3
  188. package/locales/beBY.d.ts +3 -3
  189. package/locales/beBY.js +5 -5
  190. package/locales/caES.d.ts +3 -3
  191. package/locales/caES.js +4 -4
  192. package/locales/csCZ.d.ts +3 -3
  193. package/locales/csCZ.js +5 -5
  194. package/locales/daDK.d.ts +3 -3
  195. package/locales/daDK.js +4 -4
  196. package/locales/deDE.d.ts +3 -3
  197. package/locales/deDE.js +4 -4
  198. package/locales/elGR.d.ts +3 -3
  199. package/locales/elGR.js +5 -5
  200. package/locales/enUS.d.ts +3 -3
  201. package/locales/enUS.js +5 -5
  202. package/locales/esES.d.ts +3 -3
  203. package/locales/esES.js +4 -4
  204. package/locales/eu.d.ts +3 -3
  205. package/locales/eu.js +4 -4
  206. package/locales/faIR.d.ts +3 -3
  207. package/locales/faIR.js +4 -4
  208. package/locales/fiFI.d.ts +3 -3
  209. package/locales/fiFI.js +4 -4
  210. package/locales/frFR.d.ts +3 -3
  211. package/locales/frFR.js +4 -4
  212. package/locales/heIL.d.ts +3 -3
  213. package/locales/heIL.js +4 -4
  214. package/locales/huHU.d.ts +3 -3
  215. package/locales/huHU.js +4 -4
  216. package/locales/index.js +36 -36
  217. package/locales/isIS.d.ts +3 -3
  218. package/locales/isIS.js +5 -5
  219. package/locales/itIT.d.ts +3 -3
  220. package/locales/itIT.js +4 -4
  221. package/locales/jaJP.d.ts +3 -3
  222. package/locales/jaJP.js +4 -4
  223. package/locales/koKR.d.ts +3 -3
  224. package/locales/koKR.js +4 -4
  225. package/locales/kzKZ.d.ts +3 -3
  226. package/locales/kzKZ.js +5 -5
  227. package/locales/mk.d.ts +3 -3
  228. package/locales/mk.js +4 -4
  229. package/locales/nbNO.d.ts +3 -3
  230. package/locales/nbNO.js +5 -5
  231. package/locales/nlNL.d.ts +3 -3
  232. package/locales/nlNL.js +4 -4
  233. package/locales/nnNO.d.ts +3 -3
  234. package/locales/nnNO.js +4 -4
  235. package/locales/plPL.d.ts +3 -3
  236. package/locales/plPL.js +5 -5
  237. package/locales/ptBR.d.ts +3 -3
  238. package/locales/ptBR.js +5 -5
  239. package/locales/roRO.d.ts +3 -3
  240. package/locales/roRO.js +4 -4
  241. package/locales/ruRU.d.ts +3 -3
  242. package/locales/ruRU.js +4 -4
  243. package/locales/skSK.d.ts +3 -3
  244. package/locales/skSK.js +5 -5
  245. package/locales/svSE.d.ts +3 -3
  246. package/locales/svSE.js +4 -4
  247. package/locales/trTR.d.ts +3 -3
  248. package/locales/trTR.js +5 -5
  249. package/locales/ukUA.d.ts +3 -3
  250. package/locales/ukUA.js +4 -4
  251. package/locales/urPK.d.ts +3 -3
  252. package/locales/urPK.js +5 -5
  253. package/locales/utils/getPickersLocalization.d.ts +10 -3
  254. package/locales/utils/getPickersLocalization.js +13 -0
  255. package/locales/utils/pickersLocaleTextApi.d.ts +27 -3
  256. package/locales/viVN.d.ts +3 -3
  257. package/locales/viVN.js +4 -4
  258. package/locales/zhCN.d.ts +3 -3
  259. package/locales/zhCN.js +4 -4
  260. package/locales/zhHK.d.ts +3 -3
  261. package/locales/zhHK.js +4 -4
  262. package/models/index.d.ts +1 -0
  263. package/models/index.js +10 -7
  264. package/models/validation.d.ts +13 -0
  265. package/modern/AdapterDateFns/AdapterDateFns.js +1 -1
  266. package/modern/AdapterDateFns/index.js +1 -1
  267. package/modern/AdapterDateFnsBase/index.js +1 -1
  268. package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -1
  269. package/modern/AdapterDateFnsJalali/index.js +1 -1
  270. package/modern/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -1
  271. package/modern/AdapterDateFnsJalaliV3/index.js +1 -1
  272. package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -1
  273. package/modern/AdapterDateFnsV3/index.js +1 -1
  274. package/modern/AdapterDayjs/AdapterDayjs.js +5 -6
  275. package/modern/AdapterDayjs/index.js +1 -1
  276. package/modern/AdapterLuxon/AdapterLuxon.js +4 -5
  277. package/modern/AdapterLuxon/index.js +1 -1
  278. package/modern/AdapterMoment/AdapterMoment.js +4 -5
  279. package/modern/AdapterMoment/index.js +1 -1
  280. package/modern/AdapterMomentHijri/AdapterMomentHijri.js +1 -1
  281. package/modern/AdapterMomentHijri/index.js +1 -1
  282. package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +1 -1
  283. package/modern/AdapterMomentJalaali/index.js +1 -1
  284. package/modern/DateCalendar/DateCalendar.js +18 -16
  285. package/modern/DateCalendar/DayCalendar.js +9 -10
  286. package/modern/DateCalendar/PickersFadeTransitionGroup.js +1 -1
  287. package/modern/DateCalendar/PickersSlideTransition.js +1 -1
  288. package/modern/DateCalendar/index.js +5 -5
  289. package/modern/DateCalendar/useCalendarState.js +6 -4
  290. package/modern/DateCalendar/useIsDateDisabled.js +6 -4
  291. package/modern/DateField/DateField.js +15 -11
  292. package/modern/DateField/index.js +2 -2
  293. package/modern/DateField/useDateField.js +8 -6
  294. package/modern/DatePicker/DatePicker.js +16 -14
  295. package/modern/DatePicker/DatePickerToolbar.js +7 -5
  296. package/modern/DatePicker/index.js +3 -3
  297. package/modern/DatePicker/shared.js +4 -4
  298. package/modern/DateTimeField/DateTimeField.js +15 -11
  299. package/modern/DateTimeField/index.js +2 -2
  300. package/modern/DateTimeField/useDateTimeField.js +8 -6
  301. package/modern/DateTimePicker/DateTimePicker.js +16 -14
  302. package/modern/DateTimePicker/DateTimePickerTabs.js +6 -4
  303. package/modern/DateTimePicker/DateTimePickerToolbar.js +13 -11
  304. package/modern/DateTimePicker/index.js +5 -5
  305. package/modern/DateTimePicker/shared.js +5 -5
  306. package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +4 -2
  307. package/modern/DayCalendarSkeleton/index.js +2 -2
  308. package/modern/DesktopDatePicker/DesktopDatePicker.js +30 -23
  309. package/modern/DesktopDatePicker/index.js +1 -1
  310. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +37 -30
  311. package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
  312. package/modern/DesktopDateTimePicker/index.js +2 -2
  313. package/modern/DesktopTimePicker/DesktopTimePicker.js +31 -24
  314. package/modern/DesktopTimePicker/index.js +1 -1
  315. package/modern/DigitalClock/DigitalClock.js +13 -11
  316. package/modern/DigitalClock/index.js +2 -2
  317. package/modern/LocalizationProvider/LocalizationProvider.js +2 -0
  318. package/modern/LocalizationProvider/index.js +1 -1
  319. package/modern/MobileDatePicker/MobileDatePicker.js +29 -22
  320. package/modern/MobileDatePicker/index.js +1 -1
  321. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +30 -23
  322. package/modern/MobileDateTimePicker/index.js +1 -1
  323. package/modern/MobileTimePicker/MobileTimePicker.js +29 -22
  324. package/modern/MobileTimePicker/index.js +1 -1
  325. package/modern/MonthCalendar/MonthCalendar.js +10 -8
  326. package/modern/MonthCalendar/PickersMonth.js +1 -1
  327. package/modern/MonthCalendar/index.js +3 -3
  328. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +19 -17
  329. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -2
  330. package/modern/MultiSectionDigitalClock/index.js +3 -3
  331. package/modern/PickersActionBar/PickersActionBar.js +3 -1
  332. package/modern/PickersActionBar/index.js +1 -1
  333. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +9 -7
  334. package/modern/PickersCalendarHeader/index.js +2 -2
  335. package/modern/PickersDay/PickersDay.js +5 -3
  336. package/modern/PickersDay/index.js +2 -2
  337. package/modern/PickersLayout/PickersLayout.js +4 -2
  338. package/modern/PickersLayout/index.js +3 -3
  339. package/modern/PickersLayout/usePickerLayout.js +5 -3
  340. package/modern/PickersSectionList/PickersSectionList.js +3 -1
  341. package/modern/PickersSectionList/index.js +2 -2
  342. package/modern/PickersShortcuts/PickersShortcuts.js +3 -1
  343. package/modern/PickersShortcuts/index.js +1 -1
  344. package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +3 -3
  345. package/modern/PickersTextField/PickersFilledInput/index.js +2 -2
  346. package/modern/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +1 -1
  347. package/modern/PickersTextField/PickersInput/PickersInput.js +3 -3
  348. package/modern/PickersTextField/PickersInput/index.js +2 -2
  349. package/modern/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
  350. package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +2 -2
  351. package/modern/PickersTextField/PickersInputBase/index.js +2 -2
  352. package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +4 -4
  353. package/modern/PickersTextField/PickersOutlinedInput/index.js +2 -2
  354. package/modern/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +1 -1
  355. package/modern/PickersTextField/PickersTextField.js +6 -4
  356. package/modern/PickersTextField/index.js +6 -6
  357. package/modern/StaticDatePicker/StaticDatePicker.js +18 -16
  358. package/modern/StaticDatePicker/index.js +1 -1
  359. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +19 -17
  360. package/modern/StaticDateTimePicker/index.js +1 -1
  361. package/modern/StaticTimePicker/StaticTimePicker.js +18 -16
  362. package/modern/StaticTimePicker/index.js +1 -1
  363. package/modern/TimeClock/Clock.js +7 -7
  364. package/modern/TimeClock/ClockNumber.js +2 -2
  365. package/modern/TimeClock/ClockNumbers.js +2 -2
  366. package/modern/TimeClock/ClockPointer.js +2 -2
  367. package/modern/TimeClock/TimeClock.js +16 -14
  368. package/modern/TimeClock/index.js +5 -5
  369. package/modern/TimeField/TimeField.js +15 -11
  370. package/modern/TimeField/index.js +2 -2
  371. package/modern/TimeField/useTimeField.js +8 -6
  372. package/modern/TimePicker/TimePicker.js +16 -14
  373. package/modern/TimePicker/TimePickerToolbar.js +11 -9
  374. package/modern/TimePicker/index.js +3 -3
  375. package/modern/TimePicker/shared.js +3 -3
  376. package/modern/YearCalendar/PickersYear.js +1 -1
  377. package/modern/YearCalendar/YearCalendar.js +10 -8
  378. package/modern/YearCalendar/index.js +3 -3
  379. package/modern/dateViewRenderers/dateViewRenderers.js +2 -2
  380. package/modern/dateViewRenderers/index.js +1 -1
  381. package/modern/hooks/index.js +3 -2
  382. package/modern/hooks/useClearableField.js +4 -2
  383. package/modern/hooks/usePickersTranslations.js +3 -1
  384. package/modern/hooks/useSplitFieldProps.js +43 -0
  385. package/modern/icons/index.js +8 -8
  386. package/modern/index.js +39 -38
  387. package/modern/internals/components/PickerViewRoot/PickerViewRoot.js +1 -1
  388. package/modern/internals/components/PickerViewRoot/index.js +1 -1
  389. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
  390. package/modern/internals/components/PickersArrowSwitcher/index.js +2 -2
  391. package/modern/internals/components/PickersModalDialog.js +1 -1
  392. package/modern/internals/components/PickersPopper.js +3 -3
  393. package/modern/internals/components/PickersToolbar.js +1 -1
  394. package/modern/internals/components/PickersToolbarButton.js +2 -2
  395. package/modern/internals/components/PickersToolbarText.js +1 -1
  396. package/modern/internals/demo/DemoContainer.js +3 -3
  397. package/modern/internals/demo/index.js +1 -1
  398. package/modern/internals/hooks/date-helpers-hooks.js +2 -2
  399. package/modern/internals/hooks/defaultizedFieldProps.js +2 -2
  400. package/modern/internals/hooks/useClockReferenceDate.js +3 -3
  401. package/modern/internals/hooks/useDesktopPicker/index.js +1 -1
  402. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +16 -8
  403. package/modern/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
  404. package/modern/internals/hooks/useField/index.js +2 -2
  405. package/modern/internals/hooks/useField/useField.js +17 -12
  406. package/modern/internals/hooks/useField/useField.utils.js +1 -1
  407. package/modern/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
  408. package/modern/internals/hooks/useField/useFieldState.js +8 -10
  409. package/modern/internals/hooks/useField/useFieldV6TextField.js +2 -2
  410. package/modern/internals/hooks/useField/useFieldV7TextField.js +4 -4
  411. package/modern/internals/hooks/useIsLandscape.js +1 -1
  412. package/modern/internals/hooks/useMobilePicker/index.js +1 -1
  413. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +6 -8
  414. package/modern/internals/hooks/usePicker/index.js +1 -1
  415. package/modern/internals/hooks/usePicker/usePicker.js +4 -4
  416. package/modern/internals/hooks/usePicker/usePickerLayoutProps.js +1 -1
  417. package/modern/internals/hooks/usePicker/usePickerValue.js +15 -19
  418. package/modern/internals/hooks/usePicker/usePickerViews.js +2 -2
  419. package/modern/internals/hooks/useStaticPicker/index.js +1 -1
  420. package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +4 -4
  421. package/modern/internals/hooks/useUtils.js +2 -2
  422. package/modern/internals/hooks/useValueWithTimezone.js +1 -1
  423. package/modern/internals/index.js +29 -36
  424. package/modern/internals/models/index.js +2 -2
  425. package/modern/internals/utils/date-time-utils.js +2 -2
  426. package/modern/internals/utils/date-utils.js +1 -1
  427. package/modern/internals/utils/getDefaultReferenceDate.js +2 -2
  428. package/modern/internals/utils/time-utils.js +1 -1
  429. package/modern/internals/utils/valueManagers.js +3 -3
  430. package/modern/locales/beBY.js +5 -5
  431. package/modern/locales/caES.js +4 -4
  432. package/modern/locales/csCZ.js +5 -5
  433. package/modern/locales/daDK.js +4 -4
  434. package/modern/locales/deDE.js +4 -4
  435. package/modern/locales/elGR.js +5 -5
  436. package/modern/locales/enUS.js +5 -5
  437. package/modern/locales/esES.js +4 -4
  438. package/modern/locales/eu.js +4 -4
  439. package/modern/locales/faIR.js +4 -4
  440. package/modern/locales/fiFI.js +4 -4
  441. package/modern/locales/frFR.js +4 -4
  442. package/modern/locales/heIL.js +4 -4
  443. package/modern/locales/huHU.js +4 -4
  444. package/modern/locales/index.js +36 -36
  445. package/modern/locales/isIS.js +5 -5
  446. package/modern/locales/itIT.js +4 -4
  447. package/modern/locales/jaJP.js +4 -4
  448. package/modern/locales/koKR.js +4 -4
  449. package/modern/locales/kzKZ.js +5 -5
  450. package/modern/locales/mk.js +4 -4
  451. package/modern/locales/nbNO.js +5 -5
  452. package/modern/locales/nlNL.js +4 -4
  453. package/modern/locales/nnNO.js +4 -4
  454. package/modern/locales/plPL.js +5 -5
  455. package/modern/locales/ptBR.js +5 -5
  456. package/modern/locales/roRO.js +4 -4
  457. package/modern/locales/ruRU.js +4 -4
  458. package/modern/locales/skSK.js +5 -5
  459. package/modern/locales/svSE.js +4 -4
  460. package/modern/locales/trTR.js +5 -5
  461. package/modern/locales/ukUA.js +4 -4
  462. package/modern/locales/urPK.js +5 -5
  463. package/modern/locales/utils/getPickersLocalization.js +13 -0
  464. package/modern/locales/viVN.js +4 -4
  465. package/modern/locales/zhCN.js +4 -4
  466. package/modern/locales/zhHK.js +4 -4
  467. package/modern/models/index.js +10 -7
  468. package/modern/themeAugmentation/index.js +0 -3
  469. package/modern/timeViewRenderers/index.js +1 -1
  470. package/modern/timeViewRenderers/timeViewRenderers.js +4 -4
  471. package/modern/validation/index.js +5 -0
  472. package/modern/validation/useValidation.js +54 -0
  473. package/modern/{internals/utils/validation → validation}/validateDate.js +6 -4
  474. package/modern/validation/validateDateTime.js +26 -0
  475. package/{internals/utils → modern}/validation/validateTime.js +6 -4
  476. package/node/AdapterDateFns/AdapterDateFns.js +1 -1
  477. package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -1
  478. package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -1
  479. package/node/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +1 -1
  480. package/node/AdapterDayjs/AdapterDayjs.js +6 -7
  481. package/node/AdapterLuxon/AdapterLuxon.js +5 -6
  482. package/node/AdapterMoment/AdapterMoment.js +5 -6
  483. package/node/AdapterMomentHijri/AdapterMomentHijri.js +1 -1
  484. package/node/AdapterMomentJalaali/AdapterMomentJalaali.js +1 -1
  485. package/node/DateCalendar/DateCalendar.js +4 -4
  486. package/node/DateCalendar/DayCalendar.js +3 -5
  487. package/node/DateCalendar/PickersFadeTransitionGroup.js +2 -3
  488. package/node/DateCalendar/PickersSlideTransition.js +2 -3
  489. package/node/DateCalendar/useCalendarState.js +3 -3
  490. package/node/DateCalendar/useIsDateDisabled.js +6 -6
  491. package/node/DateField/DateField.js +12 -10
  492. package/node/DateField/useDateField.js +5 -4
  493. package/node/DatePicker/DatePicker.js +14 -14
  494. package/node/DatePicker/DatePickerToolbar.js +3 -3
  495. package/node/DatePicker/shared.js +2 -3
  496. package/node/DateTimeField/DateTimeField.js +12 -10
  497. package/node/DateTimeField/useDateTimeField.js +5 -4
  498. package/node/DateTimePicker/DateTimePicker.js +14 -14
  499. package/node/DateTimePicker/DateTimePickerTabs.js +3 -3
  500. package/node/DateTimePicker/DateTimePickerToolbar.js +3 -3
  501. package/node/DateTimePicker/shared.js +2 -3
  502. package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +3 -3
  503. package/node/DesktopDatePicker/DesktopDatePicker.js +24 -19
  504. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +24 -19
  505. package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +2 -3
  506. package/node/DesktopTimePicker/DesktopTimePicker.js +24 -19
  507. package/node/DigitalClock/DigitalClock.js +4 -4
  508. package/node/DigitalClock/digitalClockClasses.js +1 -1
  509. package/node/LocalizationProvider/LocalizationProvider.js +3 -3
  510. package/node/MobileDatePicker/MobileDatePicker.js +24 -19
  511. package/node/MobileDateTimePicker/MobileDateTimePicker.js +24 -19
  512. package/node/MobileTimePicker/MobileTimePicker.js +24 -19
  513. package/node/MonthCalendar/MonthCalendar.js +3 -3
  514. package/node/MonthCalendar/PickersMonth.js +2 -3
  515. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -7
  516. package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -3
  517. package/node/MultiSectionDigitalClock/multiSectionDigitalClockClasses.js +1 -1
  518. package/node/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +1 -1
  519. package/node/PickersActionBar/PickersActionBar.js +3 -3
  520. package/node/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
  521. package/node/PickersDay/PickersDay.js +3 -3
  522. package/node/PickersLayout/PickersLayout.js +3 -3
  523. package/node/PickersLayout/index.js +1 -1
  524. package/node/PickersLayout/pickersLayoutClasses.js +1 -1
  525. package/node/PickersLayout/usePickerLayout.js +3 -3
  526. package/node/PickersSectionList/PickersSectionList.js +3 -3
  527. package/node/PickersSectionList/pickersSectionListClasses.js +1 -1
  528. package/node/PickersShortcuts/PickersShortcuts.js +3 -3
  529. package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +2 -3
  530. package/node/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +1 -1
  531. package/node/PickersTextField/PickersInput/PickersInput.js +2 -3
  532. package/node/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
  533. package/node/PickersTextField/PickersInputBase/PickersInputBase.js +2 -3
  534. package/node/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +1 -1
  535. package/node/PickersTextField/PickersOutlinedInput/Outline.js +2 -3
  536. package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +2 -3
  537. package/node/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +1 -1
  538. package/node/PickersTextField/PickersTextField.js +3 -3
  539. package/node/PickersTextField/pickersTextFieldClasses.js +1 -1
  540. package/node/StaticDatePicker/StaticDatePicker.js +16 -16
  541. package/node/StaticDateTimePicker/StaticDateTimePicker.js +16 -16
  542. package/node/StaticTimePicker/StaticTimePicker.js +16 -16
  543. package/node/TimeClock/Clock.js +3 -4
  544. package/node/TimeClock/ClockNumber.js +2 -3
  545. package/node/TimeClock/ClockNumbers.js +2 -3
  546. package/node/TimeClock/ClockPointer.js +2 -3
  547. package/node/TimeClock/TimeClock.js +4 -4
  548. package/node/TimeField/TimeField.js +12 -10
  549. package/node/TimeField/useTimeField.js +5 -4
  550. package/node/TimePicker/TimePicker.js +14 -14
  551. package/node/TimePicker/TimePickerToolbar.js +3 -3
  552. package/node/TimePicker/shared.js +2 -3
  553. package/node/YearCalendar/PickersYear.js +2 -3
  554. package/node/YearCalendar/YearCalendar.js +3 -3
  555. package/node/dateViewRenderers/dateViewRenderers.js +1 -2
  556. package/node/hooks/index.js +8 -1
  557. package/node/hooks/useClearableField.js +3 -3
  558. package/node/hooks/usePickersTranslations.js +1 -0
  559. package/node/hooks/useSplitFieldProps.js +51 -0
  560. package/node/icons/index.js +9 -10
  561. package/node/index.js +13 -1
  562. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -3
  563. package/node/internals/components/PickersModalDialog.js +2 -3
  564. package/node/internals/components/PickersPopper.js +2 -3
  565. package/node/internals/components/PickersToolbar.js +2 -3
  566. package/node/internals/components/PickersToolbarButton.js +2 -3
  567. package/node/internals/components/PickersToolbarText.js +2 -3
  568. package/node/internals/demo/DemoContainer.js +4 -5
  569. package/node/internals/hooks/date-helpers-hooks.js +1 -2
  570. package/node/internals/hooks/defaultizedFieldProps.js +1 -1
  571. package/node/internals/hooks/useClockReferenceDate.js +1 -2
  572. package/node/internals/hooks/useDefaultReduceAnimations.js +1 -1
  573. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +14 -7
  574. package/node/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
  575. package/node/internals/hooks/useField/useField.js +13 -9
  576. package/node/internals/hooks/useField/useFieldCharacterEditing.js +2 -3
  577. package/node/internals/hooks/useField/useFieldState.js +4 -7
  578. package/node/internals/hooks/useField/useFieldV6TextField.js +2 -3
  579. package/node/internals/hooks/useField/useFieldV7TextField.js +2 -3
  580. package/node/internals/hooks/useIsLandscape.js +1 -2
  581. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +3 -6
  582. package/node/internals/hooks/useOpenState.js +1 -2
  583. package/node/internals/hooks/usePicker/usePicker.js +1 -1
  584. package/node/internals/hooks/usePicker/usePickerLayoutProps.js +1 -1
  585. package/node/internals/hooks/usePicker/usePickerValue.js +14 -19
  586. package/node/internals/hooks/usePicker/usePickerViews.js +2 -3
  587. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +2 -3
  588. package/node/internals/hooks/useUtils.js +2 -3
  589. package/node/internals/hooks/useValueWithTimezone.js +2 -3
  590. package/node/internals/hooks/useViews.js +2 -3
  591. package/node/internals/index.js +0 -49
  592. package/node/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +1 -1
  593. package/node/internals/utils/date-time-utils.js +1 -1
  594. package/node/internals/utils/valueManagers.js +1 -1
  595. package/node/locales/beBY.js +4 -4
  596. package/node/locales/caES.js +3 -3
  597. package/node/locales/csCZ.js +4 -4
  598. package/node/locales/daDK.js +3 -3
  599. package/node/locales/deDE.js +3 -3
  600. package/node/locales/elGR.js +4 -4
  601. package/node/locales/enUS.js +4 -4
  602. package/node/locales/esES.js +3 -3
  603. package/node/locales/eu.js +3 -3
  604. package/node/locales/faIR.js +3 -3
  605. package/node/locales/fiFI.js +3 -3
  606. package/node/locales/frFR.js +3 -3
  607. package/node/locales/heIL.js +3 -3
  608. package/node/locales/huHU.js +3 -3
  609. package/node/locales/isIS.js +4 -4
  610. package/node/locales/itIT.js +3 -3
  611. package/node/locales/jaJP.js +3 -3
  612. package/node/locales/koKR.js +3 -3
  613. package/node/locales/kzKZ.js +4 -4
  614. package/node/locales/mk.js +3 -3
  615. package/node/locales/nbNO.js +4 -4
  616. package/node/locales/nlNL.js +3 -3
  617. package/node/locales/nnNO.js +3 -3
  618. package/node/locales/plPL.js +4 -4
  619. package/node/locales/ptBR.js +4 -4
  620. package/node/locales/roRO.js +3 -3
  621. package/node/locales/ruRU.js +3 -3
  622. package/node/locales/skSK.js +4 -4
  623. package/node/locales/svSE.js +3 -3
  624. package/node/locales/trTR.js +4 -4
  625. package/node/locales/ukUA.js +3 -3
  626. package/node/locales/urPK.js +4 -4
  627. package/node/locales/utils/getPickersLocalization.js +17 -3
  628. package/node/locales/viVN.js +3 -3
  629. package/node/locales/zhCN.js +3 -3
  630. package/node/locales/zhHK.js +3 -3
  631. package/node/themeAugmentation/index.js +1 -38
  632. package/node/timeViewRenderers/timeViewRenderers.js +1 -2
  633. package/node/validation/index.js +40 -0
  634. package/node/validation/useValidation.js +61 -0
  635. package/node/{internals/utils/validation → validation}/validateDate.js +6 -4
  636. package/node/{internals/utils/validation → validation}/validateDateTime.js +8 -3
  637. package/node/{internals/utils/validation → validation}/validateTime.js +6 -4
  638. package/package.json +4 -3
  639. package/themeAugmentation/index.d.ts +3 -3
  640. package/themeAugmentation/index.js +0 -3
  641. package/timeViewRenderers/index.js +1 -1
  642. package/timeViewRenderers/timeViewRenderers.js +4 -4
  643. package/{internals/utils/validation → validation}/extractValidationProps.d.ts +1 -1
  644. package/validation/index.d.ts +9 -0
  645. package/validation/index.js +5 -0
  646. package/validation/package.json +6 -0
  647. package/validation/useValidation.d.ts +68 -0
  648. package/validation/useValidation.js +54 -0
  649. package/validation/validateDate.d.ts +6 -0
  650. package/{internals/utils/validation → validation}/validateDate.js +6 -4
  651. package/validation/validateDateTime.d.ts +7 -0
  652. package/validation/validateDateTime.js +26 -0
  653. package/validation/validateTime.d.ts +6 -0
  654. package/{modern/internals/utils/validation → validation}/validateTime.js +6 -4
  655. package/internals/hooks/useValidation.d.ts +0 -24
  656. package/internals/hooks/useValidation.js +0 -22
  657. package/internals/utils/fields.d.ts +0 -5
  658. package/internals/utils/fields.js +0 -28
  659. package/internals/utils/validation/validateDate.d.ts +0 -7
  660. package/internals/utils/validation/validateDateTime.d.ts +0 -7
  661. package/internals/utils/validation/validateDateTime.js +0 -21
  662. package/internals/utils/validation/validateTime.d.ts +0 -7
  663. package/internals/utils/warning.d.ts +0 -2
  664. package/internals/utils/warning.js +0 -21
  665. package/modern/internals/hooks/useValidation.js +0 -22
  666. package/modern/internals/utils/fields.js +0 -28
  667. package/modern/internals/utils/validation/validateDateTime.js +0 -21
  668. package/modern/internals/utils/warning.js +0 -21
  669. package/node/internals/hooks/useValidation.js +0 -30
  670. package/node/internals/utils/fields.js +0 -36
  671. package/node/internals/utils/warning.js +0 -28
  672. /package/{internals/utils → modern}/validation/extractValidationProps.js +0 -0
  673. /package/node/{internals/utils/validation → validation}/extractValidationProps.js +0 -0
  674. /package/{modern/internals/utils/validation → validation}/extractValidationProps.js +0 -0
@@ -3,13 +3,13 @@ import * as React from 'react';
3
3
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
4
4
  import useEventCallback from '@mui/utils/useEventCallback';
5
5
  import { useRtl } from '@mui/system/RtlProvider';
6
- import { useValidation } from '../useValidation';
7
- import { useUtils } from '../useUtils';
8
- import { adjustSectionValue, getSectionOrder } from './useField.utils';
9
- import { useFieldState } from './useFieldState';
10
- import { useFieldCharacterEditing } from './useFieldCharacterEditing';
11
- import { useFieldV7TextField } from './useFieldV7TextField';
12
- import { useFieldV6TextField } from './useFieldV6TextField';
6
+ import { useValidation } from "../../../validation/index.js";
7
+ import { useUtils } from "../useUtils.js";
8
+ import { adjustSectionValue, getSectionOrder } from "./useField.utils.js";
9
+ import { useFieldState } from "./useFieldState.js";
10
+ import { useFieldCharacterEditing } from "./useFieldCharacterEditing.js";
11
+ import { useFieldV7TextField } from "./useFieldV7TextField.js";
12
+ import { useFieldV6TextField } from "./useFieldV6TextField.js";
13
13
  export const useField = params => {
14
14
  const utils = useUtils();
15
15
  const {
@@ -158,18 +158,23 @@ export const useField = params => {
158
158
  useEnhancedEffect(() => {
159
159
  interactions.syncSelectionToDOM();
160
160
  });
161
- const validationError = useValidation(_extends({}, internalProps, {
161
+ const {
162
+ hasValidationError
163
+ } = useValidation({
164
+ props: internalProps,
165
+ validator,
166
+ timezone,
162
167
  value: state.value,
163
- timezone
164
- }), validator, valueManager.isSameError, valueManager.defaultErrorState);
168
+ onError: internalProps.onError
169
+ });
165
170
  const inputError = React.useMemo(() => {
166
171
  // only override when `error` is undefined.
167
172
  // in case of multi input fields, the `error` value is provided externally and will always be defined.
168
173
  if (error !== undefined) {
169
174
  return error;
170
175
  }
171
- return valueManager.hasError(validationError);
172
- }, [valueManager, validationError, error]);
176
+ return hasValidationError;
177
+ }, [hasValidationError, error]);
173
178
  React.useEffect(() => {
174
179
  if (!inputError && activeSectionIndex == null) {
175
180
  resetCharacterQuery();
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { FieldSectionType, FieldSection, FieldSelectedSections, MuiPickersAdapter, TimezoneProps, FieldSectionContentType, FieldValueType, PickersTimezone, PickerValidDate, FieldRef } from '../../../models';
2
+ import { FieldSectionType, FieldSection, FieldSelectedSections, MuiPickersAdapter, TimezoneProps, FieldSectionContentType, FieldValueType, PickerValidDate, FieldRef, OnErrorProps, InferError } from '../../../models';
3
3
  import type { PickerValueManager } from '../usePicker';
4
- import { InferError, Validator } from '../useValidation';
4
+ import type { Validator } from '../../../validation';
5
5
  import type { UseFieldStateResponse } from './useFieldState';
6
6
  import type { UseFieldCharacterEditingResponse } from './useFieldCharacterEditing';
7
7
  import { PickersSectionElement, PickersSectionListRef } from '../../../PickersSectionList';
@@ -11,10 +11,10 @@ export interface UseFieldParams<TValue, TDate extends PickerValidDate, TSection
11
11
  internalProps: TInternalProps;
12
12
  valueManager: PickerValueManager<TValue, TDate, InferError<TInternalProps>>;
13
13
  fieldValueManager: FieldValueManager<TValue, TDate, TSection>;
14
- validator: Validator<TValue, TDate, InferError<TInternalProps>, UseFieldValidationProps<TValue, TInternalProps>>;
14
+ validator: Validator<TValue, TDate, InferError<TInternalProps>, TInternalProps>;
15
15
  valueType: FieldValueType;
16
16
  }
17
- export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TError> extends TimezoneProps {
17
+ export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TError> extends TimezoneProps, OnErrorProps<TValue, TError> {
18
18
  /**
19
19
  * The selected value.
20
20
  * Used when the component is controlled.
@@ -32,20 +32,12 @@ export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TS
32
32
  referenceDate?: TDate;
33
33
  /**
34
34
  * Callback fired when the value changes.
35
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
36
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
35
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
36
+ * @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.
37
37
  * @param {TValue} value The new value.
38
38
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
39
39
  */
40
40
  onChange?: FieldChangeHandler<TValue, TError>;
41
- /**
42
- * Callback fired when the error associated to the current value changes.
43
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
44
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
45
- * @param {TError} error The new error.
46
- * @param {TValue} value The value associated to the error.
47
- */
48
- onError?: (error: TError, value: TValue) => void;
49
41
  /**
50
42
  * Format of the date when rendered in the input(s).
51
43
  */
@@ -289,14 +281,6 @@ export interface UseFieldState<TValue, TSection extends FieldSection> {
289
281
  */
290
282
  tempValueStrAndroid: string | null;
291
283
  }
292
- export type UseFieldValidationProps<TValue, TInternalProps extends {
293
- value?: TValue;
294
- defaultValue?: TValue;
295
- timezone?: PickersTimezone;
296
- }> = Omit<TInternalProps, 'value' | 'defaultValue' | 'timezone'> & {
297
- value: TValue;
298
- timezone: PickersTimezone;
299
- };
300
284
  export type AvailableAdjustKeyCode = 'ArrowUp' | 'ArrowDown' | 'PageUp' | 'PageDown' | 'Home' | 'End';
301
285
  export type SectionNeighbors = {
302
286
  [sectionIndex: number]: {
@@ -1,4 +1,4 @@
1
- import { getMonthsInYear } from '../../utils/date-utils';
1
+ import { getMonthsInYear } from "../../utils/date-utils.js";
2
2
  export const getDateSectionConfigFromFormatToken = (utils, formatToken) => {
3
3
  const config = utils.formatTokenMap[formatToken];
4
4
  if (config == null) {
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import useEventCallback from '@mui/utils/useEventCallback';
4
- import { useUtils } from '../useUtils';
5
- import { changeSectionValueFormat, cleanDigitSectionValue, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, getDaysInWeekStr, getLetterEditingOptions, applyLocalizedDigits, removeLocalizedDigits, isStringNumber } from './useField.utils';
4
+ import { useUtils } from "../useUtils.js";
5
+ import { changeSectionValueFormat, cleanDigitSectionValue, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, getDaysInWeekStr, getLetterEditingOptions, applyLocalizedDigits, removeLocalizedDigits, isStringNumber } from "./useField.utils.js";
6
6
 
7
7
  /**
8
8
  * The letter editing and the numeric editing each define a `CharacterEditingApplier`.
@@ -2,12 +2,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import useControlled from '@mui/utils/useControlled';
4
4
  import { useRtl } from '@mui/system/RtlProvider';
5
- import { usePickersTranslations } from '../../../hooks/usePickersTranslations';
6
- import { useUtils, useLocalizationContext } from '../useUtils';
7
- import { mergeDateIntoReferenceDate, getSectionsBoundaries, validateSections, getDateFromDateSections, parseSelectedSections, getLocalizedDigits } from './useField.utils';
8
- import { buildSectionsFromFormat } from './buildSectionsFromFormat';
9
- import { useValueWithTimezone } from '../useValueWithTimezone';
10
- import { getSectionTypeGranularity } from '../../utils/getDefaultReferenceDate';
5
+ import { usePickersTranslations } from "../../../hooks/usePickersTranslations.js";
6
+ import { useUtils, useLocalizationContext } from "../useUtils.js";
7
+ import { mergeDateIntoReferenceDate, getSectionsBoundaries, validateSections, getDateFromDateSections, parseSelectedSections, getLocalizedDigits } from "./useField.utils.js";
8
+ import { buildSectionsFromFormat } from "./buildSectionsFromFormat.js";
9
+ import { useValueWithTimezone } from "../useValueWithTimezone.js";
10
+ import { getSectionTypeGranularity } from "../../utils/getDefaultReferenceDate.js";
11
11
  export const useFieldState = params => {
12
12
  const utils = useUtils();
13
13
  const translations = usePickersTranslations();
@@ -110,10 +110,8 @@ export const useFieldState = params => {
110
110
  validationError: validator({
111
111
  adapter,
112
112
  value,
113
- props: _extends({}, internalProps, {
114
- value,
115
- timezone
116
- })
113
+ timezone,
114
+ props: internalProps
117
115
  })
118
116
  };
119
117
  handleValueChange(value, context);
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { useRtl } from '@mui/system/RtlProvider';
4
4
  import useEventCallback from '@mui/utils/useEventCallback';
5
5
  import useForkRef from '@mui/utils/useForkRef';
6
- import { getActiveElement } from '../../utils/utils';
7
- import { getSectionVisibleValue, isAndroid } from './useField.utils';
6
+ import { getActiveElement } from "../../utils/utils.js";
7
+ import { getSectionVisibleValue, isAndroid } from "./useField.utils.js";
8
8
  const cleanString = dirtyString => dirtyString.replace(/[\u2066\u2067\u2068\u2069]/g, '');
9
9
  export const addPositionPropertiesToSections = (sections, localizedDigits, isRtl) => {
10
10
  let position = 0;
@@ -3,10 +3,10 @@ import useForkRef from '@mui/utils/useForkRef';
3
3
  import useEventCallback from '@mui/utils/useEventCallback';
4
4
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
5
5
  import useId from '@mui/utils/useId';
6
- import { getSectionValueNow, getSectionValueText, parseSelectedSections } from './useField.utils';
7
- import { getActiveElement } from '../../utils/utils';
8
- import { usePickersTranslations } from '../../../hooks/usePickersTranslations';
9
- import { useUtils } from '../useUtils';
6
+ import { getSectionValueNow, getSectionValueText, parseSelectedSections } from "./useField.utils.js";
7
+ import { getActiveElement } from "../../utils/utils.js";
8
+ import { usePickersTranslations } from "../../../hooks/usePickersTranslations.js";
9
+ import { useUtils } from "../useUtils.js";
10
10
  export const useFieldV7TextField = params => {
11
11
  const {
12
12
  internalProps: {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
3
- import { arrayIncludes } from '../utils/utils';
3
+ import { arrayIncludes } from "../utils/utils.js";
4
4
  function getOrientation() {
5
5
  if (typeof window === 'undefined') {
6
6
  return 'portrait';
@@ -1 +1 @@
1
- export { useMobilePicker } from './useMobilePicker';
1
+ export { useMobilePicker } from "./useMobilePicker.js";
@@ -5,12 +5,11 @@ import * as React from 'react';
5
5
  import useSlotProps from '@mui/utils/useSlotProps';
6
6
  import useForkRef from '@mui/utils/useForkRef';
7
7
  import useId from '@mui/utils/useId';
8
- import { PickersModalDialog } from '../../components/PickersModalDialog';
9
- import { usePicker } from '../usePicker';
10
- import { onSpaceOrEnter } from '../../utils/utils';
11
- import { useUtils } from '../useUtils';
12
- import { LocalizationProvider } from '../../../LocalizationProvider';
13
- import { PickersLayout } from '../../../PickersLayout';
8
+ import { PickersModalDialog } from "../../components/PickersModalDialog.js";
9
+ import { usePicker } from "../usePicker/index.js";
10
+ import { onSpaceOrEnter } from "../../utils/utils.js";
11
+ import { LocalizationProvider } from "../../../LocalizationProvider/index.js";
12
+ import { PickersLayout } from "../../../PickersLayout/index.js";
14
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
14
  /**
16
15
  * Hook managing all the single-date mobile pickers:
@@ -42,7 +41,6 @@ export const useMobilePicker = _ref => {
42
41
  disabled,
43
42
  localeText
44
43
  } = props;
45
- const utils = useUtils();
46
44
  const fieldRef = React.useRef(null);
47
45
  const labelId = useId();
48
46
  const isToolbarHidden = innerSlotProps?.toolbar?.hidden ?? false;
@@ -89,7 +87,7 @@ export const useMobilePicker = _ref => {
89
87
 
90
88
  // TODO: Move to `useSlotProps` when https://github.com/mui/material-ui/pull/35088 will be merged
91
89
  fieldProps.inputProps = _extends({}, fieldProps.inputProps, {
92
- 'aria-label': getOpenDialogAriaText(pickerFieldProps.value, utils)
90
+ 'aria-label': getOpenDialogAriaText(pickerFieldProps.value)
93
91
  });
94
92
  const slotsForField = _extends({
95
93
  textField: slots.textField
@@ -4,7 +4,7 @@ import { SlotComponentProps } from '@mui/utils';
4
4
  import { BaseNonStaticPickerProps, BasePickerProps, BaseNonRangeNonStaticPickerProps } from '../../models/props/basePickerProps';
5
5
  import { PickersModalDialogSlots, PickersModalDialogSlotProps } from '../../components/PickersModalDialog';
6
6
  import { UsePickerParams, UsePickerProps } from '../usePicker';
7
- import { BaseSingleInputFieldProps, FieldSection, MuiPickersAdapter, PickerValidDate } from '../../../models';
7
+ import { BaseSingleInputFieldProps, FieldSection, PickerValidDate } from '../../../models';
8
8
  import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from '../../../PickersLayout/PickersLayout.types';
9
9
  import { UsePickerValueNonStaticProps } from '../usePicker/usePickerValue.types';
10
10
  import { UsePickerViewsNonStaticProps, UsePickerViewsProps } from '../usePicker/usePickerViews';
@@ -43,5 +43,5 @@ export interface UseMobilePickerProps<TDate extends PickerValidDate, TView exten
43
43
  }
44
44
  export interface UseMobilePickerParams<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure extends boolean, TExternalProps extends UseMobilePickerProps<TDate, TView, TEnableAccessibleFieldDOMStructure, any, TExternalProps>> extends Pick<UsePickerParams<TDate | null, TDate, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator'> {
45
45
  props: TExternalProps;
46
- getOpenDialogAriaText: (date: TDate | null, utils: MuiPickersAdapter<TDate>) => string;
46
+ getOpenDialogAriaText: (date: TDate | null) => string;
47
47
  }
@@ -1 +1 @@
1
- export { usePicker } from './usePicker';
1
+ export { usePicker } from "./usePicker.js";
@@ -1,5 +1,4 @@
1
1
  import { UsePickerParams, UsePickerProps, UsePickerResponse } from './usePicker.types';
2
- import { InferError } from '../useValidation';
3
- import { FieldSection, PickerValidDate } from '../../../models';
2
+ import { FieldSection, PickerValidDate, InferError } from '../../../models';
4
3
  import { DateOrTimeViewWithMeridiem } from '../../models';
5
4
  export declare const usePicker: <TValue, TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TSection extends FieldSection, TExternalProps extends UsePickerProps<TValue, TDate, TView, any, any, any>, TAdditionalProps extends {}>({ props, valueManager, valueType, wrapperVariant, additionalViewProps, validator, autoFocusView, rendererInterceptor, fieldRef, }: UsePickerParams<TValue, TDate, TView, TSection, TExternalProps, TAdditionalProps>) => UsePickerResponse<TValue, TView, TSection, InferError<TExternalProps>>;
@@ -1,7 +1,7 @@
1
- import { usePickerValue } from './usePickerValue';
2
- import { usePickerViews } from './usePickerViews';
3
- import { usePickerLayoutProps } from './usePickerLayoutProps';
4
- import { warnOnce } from '../../utils/warning';
1
+ import { warnOnce } from '@mui/x-internals/warning';
2
+ import { usePickerValue } from "./usePickerValue.js";
3
+ import { usePickerViews } from "./usePickerViews.js";
4
+ import { usePickerLayoutProps } from "./usePickerLayoutProps.js";
5
5
  export const usePicker = ({
6
6
  props,
7
7
  valueManager,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { useRtl } from '@mui/system/RtlProvider';
3
- import { useIsLandscape } from '../useIsLandscape';
3
+ import { useIsLandscape } from "../useIsLandscape.js";
4
4
 
5
5
  /**
6
6
  * Props used to create the layout of the views.
@@ -1,5 +1,4 @@
1
- import { InferError } from '../useValidation';
2
- import { FieldSection, PickerValidDate } from '../../../models';
1
+ import { FieldSection, PickerValidDate, InferError } from '../../../models';
3
2
  import { UsePickerValueProps, UsePickerValueParams, UsePickerValueResponse } from './usePickerValue.types';
4
3
  /**
5
4
  * Manage the value lifecycle of all the pickers.
@@ -1,10 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import useEventCallback from '@mui/utils/useEventCallback';
4
- import { useOpenState } from '../useOpenState';
5
- import { useLocalizationContext, useUtils } from '../useUtils';
6
- import { useValidation } from '../useValidation';
7
- import { useValueWithTimezone } from '../useValueWithTimezone';
4
+ import { useOpenState } from "../useOpenState.js";
5
+ import { useLocalizationContext, useUtils } from "../useUtils.js";
6
+ import { useValidation } from "../../../validation/index.js";
7
+ import { useValueWithTimezone } from "../useValueWithTimezone.js";
8
8
 
9
9
  /**
10
10
  * Decide if the new value should be published
@@ -180,10 +180,15 @@ export const usePickerValue = ({
180
180
  hasBeenModifiedSinceMount: false
181
181
  };
182
182
  });
183
- useValidation(_extends({}, props, {
183
+ const {
184
+ getValidationErrorForNewValue
185
+ } = useValidation({
186
+ props,
187
+ validator,
188
+ timezone,
184
189
  value: dateState.draft,
185
- timezone
186
- }), validator, valueManager.isSameError, valueManager.defaultErrorState);
190
+ onError: props.onError
191
+ });
187
192
  const updateDate = useEventCallback(action => {
188
193
  const updaterParams = {
189
194
  action,
@@ -204,14 +209,7 @@ export const usePickerValue = ({
204
209
  let cachedContext = null;
205
210
  const getContext = () => {
206
211
  if (!cachedContext) {
207
- const validationError = action.name === 'setValueFromField' ? action.context.validationError : validator({
208
- adapter,
209
- value: action.value,
210
- props: _extends({}, props, {
211
- value: action.value,
212
- timezone
213
- })
214
- });
212
+ const validationError = action.name === 'setValueFromField' ? action.context.validationError : getValidationErrorForNewValue(action.value);
215
213
  cachedContext = {
216
214
  validationError
217
215
  };
@@ -325,10 +323,8 @@ export const usePickerValue = ({
325
323
  const error = validator({
326
324
  adapter,
327
325
  value: testedValue,
328
- props: _extends({}, props, {
329
- value: testedValue,
330
- timezone
331
- })
326
+ timezone,
327
+ props
332
328
  });
333
329
  return !valueManager.hasError(error);
334
330
  };
@@ -1,8 +1,7 @@
1
1
  import { FieldChangeHandlerContext, UseFieldInternalProps } from '../useField';
2
- import { InferError, Validator } from '../useValidation';
3
- import { UseFieldValidationProps } from '../useField/useField.types';
2
+ import { Validator } from '../../../validation';
4
3
  import { WrapperVariant } from '../../models/common';
5
- import { FieldSection, FieldValueType, TimezoneProps, MuiPickersAdapter, PickersTimezone, PickerChangeHandlerContext, PickerValidDate } from '../../../models';
4
+ import { FieldSection, FieldValueType, TimezoneProps, MuiPickersAdapter, PickersTimezone, PickerChangeHandlerContext, PickerValidDate, OnErrorProps, InferError } from '../../../models';
6
5
  import { GetDefaultReferenceDateProps } from '../../utils/getDefaultReferenceDate';
7
6
  import { PickerShortcutChangeImportance, PickersShortcutsItemContext } from '../../../PickersShortcuts';
8
7
  export interface PickerValueManager<TValue, TDate extends PickerValidDate, TError> {
@@ -170,7 +169,7 @@ export type PickerValueUpdateAction<TValue, TError> = {
170
169
  /**
171
170
  * Props used to handle the value that are common to all pickers.
172
171
  */
173
- export interface UsePickerValueBaseProps<TValue, TError> {
172
+ export interface UsePickerValueBaseProps<TValue, TError> extends OnErrorProps<TValue, TError> {
174
173
  /**
175
174
  * The selected value.
176
175
  * Used when the component is controlled.
@@ -183,30 +182,20 @@ export interface UsePickerValueBaseProps<TValue, TError> {
183
182
  defaultValue?: TValue;
184
183
  /**
185
184
  * Callback fired when the value changes.
186
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
187
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
185
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
186
+ * @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.
188
187
  * @param {TValue} value The new value.
189
188
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
190
189
  */
191
190
  onChange?: (value: TValue, context: PickerChangeHandlerContext<TError>) => void;
192
191
  /**
193
192
  * Callback fired when the value is accepted.
194
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
195
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
193
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
194
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
196
195
  * @param {TValue} value The value that was just accepted.
197
196
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
198
197
  */
199
198
  onAccept?: (value: TValue, context: PickerChangeHandlerContext<TError>) => void;
200
- /**
201
- * Callback fired when the error associated to the current value changes.
202
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
203
- *
204
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
205
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
206
- * @param {TError} error The new error describing why the current value is not valid.
207
- * @param {TValue} value The value associated to the error.
208
- */
209
- onError?: (error: TError, value: TValue) => void;
210
199
  }
211
200
  /**
212
201
  * Props used to handle the value of non-static pickers.
@@ -243,7 +232,7 @@ export interface UsePickerValueParams<TValue, TDate extends PickerValidDate, TEx
243
232
  valueManager: PickerValueManager<TValue, TDate, InferError<TExternalProps>>;
244
233
  valueType: FieldValueType;
245
234
  wrapperVariant: WrapperVariant;
246
- validator: Validator<TValue, TDate, InferError<TExternalProps>, UseFieldValidationProps<TValue, TExternalProps>>;
235
+ validator: Validator<TValue, TDate, InferError<TExternalProps>, TExternalProps>;
247
236
  }
248
237
  export interface UsePickerValueActions {
249
238
  onAccept: () => void;
@@ -4,8 +4,8 @@ const _excluded = ["className", "sx"];
4
4
  import * as React from 'react';
5
5
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
6
6
  import useEventCallback from '@mui/utils/useEventCallback';
7
- import { useViews } from '../useViews';
8
- import { isTimeView } from '../../utils/time-utils';
7
+ import { useViews } from "../useViews.js";
8
+ import { isTimeView } from "../../utils/time-utils.js";
9
9
 
10
10
  /**
11
11
  * Props used to handle the views that are common to all pickers.
@@ -1 +1 @@
1
- export { useStaticPicker } from './useStaticPicker';
1
+ export { useStaticPicker } from "./useStaticPicker.js";
@@ -4,10 +4,10 @@ const _excluded = ["props", "ref"];
4
4
  import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import { styled } from '@mui/material/styles';
7
- import { usePicker } from '../usePicker';
8
- import { LocalizationProvider } from '../../../LocalizationProvider';
9
- import { PickersLayout } from '../../../PickersLayout';
10
- import { DIALOG_WIDTH } from '../../constants/dimensions';
7
+ import { usePicker } from "../usePicker/index.js";
8
+ import { LocalizationProvider } from "../../../LocalizationProvider/index.js";
9
+ import { PickersLayout } from "../../../PickersLayout/index.js";
10
+ import { DIALOG_WIDTH } from "../../constants/dimensions.js";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  const PickerStaticLayout = styled(PickersLayout)(({
13
13
  theme
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { MuiPickersAdapterContext } from '../../LocalizationProvider/LocalizationProvider';
4
- import { DEFAULT_LOCALE } from '../../locales/enUS';
3
+ import { MuiPickersAdapterContext } from "../../LocalizationProvider/LocalizationProvider.js";
4
+ import { DEFAULT_LOCALE } from "../../locales/enUS.js";
5
5
  export const useLocalizationContext = () => {
6
6
  const localization = React.useContext(MuiPickersAdapterContext);
7
7
  if (localization === null) {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import useEventCallback from '@mui/utils/useEventCallback';
3
3
  import useControlled from '@mui/utils/useControlled';
4
- import { useUtils } from './useUtils';
4
+ import { useUtils } from "./useUtils.js";
5
5
  /**
6
6
  * Hooks making sure that:
7
7
  * - The value returned by `onChange` always have the timezone of `props.value` or `props.defaultValue` if defined
@@ -6,7 +6,7 @@ export type PickerOnChangeFn<TDate extends PickerValidDate> = (date: TDate | nul
6
6
  export interface UseViewsOptions<TValue, TView extends DateOrTimeViewWithMeridiem> {
7
7
  /**
8
8
  * Callback fired when the value changes.
9
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
9
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
10
10
  * @template TView The view type. Will be one of date or time views.
11
11
  * @param {TValue} value The new value.
12
12
  * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.
@@ -35,8 +35,6 @@ export type { StaticOnlyPickerProps, UseStaticPickerSlots, UseStaticPickerSlotPr
35
35
  export { useLocalizationContext, useDefaultDates, useUtils, useNow } from './hooks/useUtils';
36
36
  export type { ExportedUseViewsOptions, UseViewsOptions } from './hooks/useViews';
37
37
  export { useViews } from './hooks/useViews';
38
- export { useValidation } from './hooks/useValidation';
39
- export type { ValidationProps, Validator, InferError } from './hooks/useValidation';
40
38
  export { usePreviousMonthDisabled, useNextMonthDisabled } from './hooks/date-helpers-hooks';
41
39
  export type { BaseFieldProps } from './models/fields';
42
40
  export type { BasePickerProps, BasePickerInputProps, BaseNonStaticPickerProps, } from './models/props/basePickerProps';
@@ -49,17 +47,11 @@ export type { BaseDateValidationProps, BaseTimeValidationProps, TimeValidationPr
49
47
  export { convertFieldResponseIntoMuiTextFieldProps } from './utils/convertFieldResponseIntoMuiTextFieldProps';
50
48
  export { applyDefaultDate, replaceInvalidDateByNull, areDatesEqual, getTodayDate, isDatePickerView, mergeDateAndTime, formatMeridiem, } from './utils/date-utils';
51
49
  export { resolveTimeViewsResponse, resolveDateTimeFormat } from './utils/date-time-utils';
52
- export { splitFieldInternalAndForwardedProps } from './utils/fields';
53
50
  export { getDefaultReferenceDate } from './utils/getDefaultReferenceDate';
54
51
  export { executeInTheNextEventLoopTick, getActiveElement, onSpaceOrEnter, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, } from './utils/utils';
55
52
  export { useDefaultizedDateField, useDefaultizedTimeField, useDefaultizedDateTimeField, } from './hooks/defaultizedFieldProps';
56
53
  export { useDefaultReduceAnimations } from './hooks/useDefaultReduceAnimations';
57
- export { extractValidationProps } from './utils/validation/extractValidationProps';
58
- export { validateDate } from './utils/validation/validateDate';
59
- export { validateDateTime } from './utils/validation/validateDateTime';
60
- export { validateTime } from './utils/validation/validateTime';
61
54
  export { applyDefaultViewProps } from './utils/views';
62
- export { warnOnce } from './utils/warning';
63
55
  export { DayCalendar } from '../DateCalendar/DayCalendar';
64
56
  export type { DayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, ExportedDayCalendarProps, } from '../DateCalendar/DayCalendar';
65
57
  export type { ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
@@ -1,36 +1,29 @@
1
- export { PickersArrowSwitcher } from './components/PickersArrowSwitcher/PickersArrowSwitcher';
2
- export { PickersModalDialog } from './components/PickersModalDialog';
3
- export { PickersPopper } from './components/PickersPopper';
4
- export { PickersToolbar } from './components/PickersToolbar';
5
- export { pickersToolbarClasses } from './components/pickersToolbarClasses';
6
- export { pickersToolbarButtonClasses } from './components/pickersToolbarButtonClasses';
7
- export { pickersToolbarTextClasses } from './components/pickersToolbarTextClasses';
8
- export { pickersArrowSwitcherClasses } from './components/PickersArrowSwitcher/pickersArrowSwitcherClasses';
9
- export { pickersPopperClasses } from './components/pickersPopperClasses';
10
- export { PickersToolbarButton } from './components/PickersToolbarButton';
11
- export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT } from './constants/dimensions';
12
- export { useControlledValueWithTimezone } from './hooks/useValueWithTimezone';
13
- export { useField, createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from './hooks/useField';
14
- export { usePicker } from './hooks/usePicker';
15
- export { useStaticPicker } from './hooks/useStaticPicker';
16
- export { useLocalizationContext, useDefaultDates, useUtils, useNow } from './hooks/useUtils';
17
- export { useViews } from './hooks/useViews';
18
- export { useValidation } from './hooks/useValidation';
19
- export { usePreviousMonthDisabled, useNextMonthDisabled } from './hooks/date-helpers-hooks';
20
- export { convertFieldResponseIntoMuiTextFieldProps } from './utils/convertFieldResponseIntoMuiTextFieldProps';
21
- export { applyDefaultDate, replaceInvalidDateByNull, areDatesEqual, getTodayDate, isDatePickerView, mergeDateAndTime, formatMeridiem } from './utils/date-utils';
22
- export { resolveTimeViewsResponse, resolveDateTimeFormat } from './utils/date-time-utils';
23
- export { splitFieldInternalAndForwardedProps } from './utils/fields';
24
- export { getDefaultReferenceDate } from './utils/getDefaultReferenceDate';
25
- export { executeInTheNextEventLoopTick, getActiveElement, onSpaceOrEnter, DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from './utils/utils';
26
- export { useDefaultizedDateField, useDefaultizedTimeField, useDefaultizedDateTimeField } from './hooks/defaultizedFieldProps';
27
- export { useDefaultReduceAnimations } from './hooks/useDefaultReduceAnimations';
28
- export { extractValidationProps } from './utils/validation/extractValidationProps';
29
- export { validateDate } from './utils/validation/validateDate';
30
- export { validateDateTime } from './utils/validation/validateDateTime';
31
- export { validateTime } from './utils/validation/validateTime';
32
- export { applyDefaultViewProps } from './utils/views';
33
- export { warnOnce } from './utils/warning';
34
- export { DayCalendar } from '../DateCalendar/DayCalendar';
35
- export { useCalendarState } from '../DateCalendar/useCalendarState';
36
- export { isInternalTimeView, isTimeView } from './utils/time-utils';
1
+ export { PickersArrowSwitcher } from "./components/PickersArrowSwitcher/PickersArrowSwitcher.js";
2
+ export { PickersModalDialog } from "./components/PickersModalDialog.js";
3
+ export { PickersPopper } from "./components/PickersPopper.js";
4
+ export { PickersToolbar } from "./components/PickersToolbar.js";
5
+ export { pickersToolbarClasses } from "./components/pickersToolbarClasses.js";
6
+ export { pickersToolbarButtonClasses } from "./components/pickersToolbarButtonClasses.js";
7
+ export { pickersToolbarTextClasses } from "./components/pickersToolbarTextClasses.js";
8
+ export { pickersArrowSwitcherClasses } from "./components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js";
9
+ export { pickersPopperClasses } from "./components/pickersPopperClasses.js";
10
+ export { PickersToolbarButton } from "./components/PickersToolbarButton.js";
11
+ export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT } from "./constants/dimensions.js";
12
+ export { useControlledValueWithTimezone } from "./hooks/useValueWithTimezone.js";
13
+ export { useField, createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from "./hooks/useField/index.js";
14
+ export { usePicker } from "./hooks/usePicker/index.js";
15
+ export { useStaticPicker } from "./hooks/useStaticPicker/index.js";
16
+ export { useLocalizationContext, useDefaultDates, useUtils, useNow } from "./hooks/useUtils.js";
17
+ export { useViews } from "./hooks/useViews.js";
18
+ export { usePreviousMonthDisabled, useNextMonthDisabled } from "./hooks/date-helpers-hooks.js";
19
+ export { convertFieldResponseIntoMuiTextFieldProps } from "./utils/convertFieldResponseIntoMuiTextFieldProps.js";
20
+ export { applyDefaultDate, replaceInvalidDateByNull, areDatesEqual, getTodayDate, isDatePickerView, mergeDateAndTime, formatMeridiem } from "./utils/date-utils.js";
21
+ export { resolveTimeViewsResponse, resolveDateTimeFormat } from "./utils/date-time-utils.js";
22
+ export { getDefaultReferenceDate } from "./utils/getDefaultReferenceDate.js";
23
+ export { executeInTheNextEventLoopTick, getActiveElement, onSpaceOrEnter, DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from "./utils/utils.js";
24
+ export { useDefaultizedDateField, useDefaultizedTimeField, useDefaultizedDateTimeField } from "./hooks/defaultizedFieldProps.js";
25
+ export { useDefaultReduceAnimations } from "./hooks/useDefaultReduceAnimations.js";
26
+ export { applyDefaultViewProps } from "./utils/views.js";
27
+ export { DayCalendar } from "../DateCalendar/DayCalendar.js";
28
+ export { useCalendarState } from "../DateCalendar/useCalendarState.js";
29
+ export { isInternalTimeView, isTimeView } from "./utils/time-utils.js";
@@ -1,2 +1,2 @@
1
- export * from './fields';
2
- export * from './common';
1
+ export * from "./fields.js";
2
+ export * from "./common.js";