@mui/x-date-pickers 8.0.0-beta.3 → 8.0.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 (767) hide show
  1. package/CHANGELOG.md +282 -96
  2. package/DatePicker/DatePicker.js +1 -1
  3. package/DateTimePicker/DateTimePicker.js +1 -1
  4. package/DesktopDatePicker/DesktopDatePicker.js +2 -7
  5. package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
  6. package/DesktopTimePicker/DesktopTimePicker.js +1 -1
  7. package/LocalizationProvider/LocalizationProvider.d.ts +1 -1
  8. package/LocalizationProvider/LocalizationProvider.js +1 -1
  9. package/MobileDatePicker/MobileDatePicker.js +1 -1
  10. package/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
  11. package/MobileTimePicker/MobileTimePicker.js +1 -1
  12. package/PickersLayout/usePickerLayout.js +3 -2
  13. package/PickersSectionList/PickersSectionList.types.d.ts +3 -1
  14. package/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -0
  15. package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -0
  16. package/PickersTextField/PickersInput/PickersInput.js +1 -0
  17. package/PickersTextField/PickersInput/pickersInputClasses.d.ts +1 -0
  18. package/PickersTextField/PickersInputBase/PickersInputBase.js +101 -3
  19. package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +3 -1
  20. package/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +6 -4
  21. package/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +1 -1
  22. package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -0
  23. package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +1 -0
  24. package/PickersTextField/PickersTextField.js +6 -3
  25. package/TimePicker/TimePicker.js +1 -1
  26. package/esm/DatePicker/DatePicker.js +1 -1
  27. package/esm/DateTimePicker/DateTimePicker.js +1 -1
  28. package/esm/DesktopDatePicker/DesktopDatePicker.js +2 -7
  29. package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
  30. package/esm/DesktopTimePicker/DesktopTimePicker.js +1 -1
  31. package/esm/LocalizationProvider/LocalizationProvider.d.ts +1 -1
  32. package/esm/LocalizationProvider/LocalizationProvider.js +1 -1
  33. package/esm/MobileDatePicker/MobileDatePicker.js +1 -1
  34. package/esm/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
  35. package/esm/MobileTimePicker/MobileTimePicker.js +1 -1
  36. package/esm/PickersLayout/usePickerLayout.js +3 -2
  37. package/esm/PickersSectionList/PickersSectionList.types.d.ts +3 -1
  38. package/esm/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -0
  39. package/esm/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -0
  40. package/esm/PickersTextField/PickersInput/PickersInput.js +1 -0
  41. package/esm/PickersTextField/PickersInput/pickersInputClasses.d.ts +1 -0
  42. package/esm/PickersTextField/PickersInputBase/PickersInputBase.js +101 -3
  43. package/esm/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +3 -1
  44. package/esm/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +6 -4
  45. package/esm/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +1 -1
  46. package/esm/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -0
  47. package/esm/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +1 -0
  48. package/esm/PickersTextField/PickersTextField.js +6 -3
  49. package/esm/TimePicker/TimePicker.js +1 -1
  50. package/esm/index.js +1 -1
  51. package/esm/internals/components/PickerFieldUI.d.ts +2 -2
  52. package/esm/internals/components/PickerPopper/PickerPopper.js +6 -0
  53. package/esm/internals/components/PickerProvider.d.ts +9 -0
  54. package/esm/internals/components/PickerProvider.js +3 -1
  55. package/esm/internals/hooks/useField/buildSectionsFromFormat.js +1 -0
  56. package/esm/internals/hooks/useField/useFieldRootProps.js +3 -2
  57. package/esm/internals/hooks/useField/useFieldSectionContainerProps.d.ts +2 -0
  58. package/esm/internals/hooks/useField/useFieldSectionContainerProps.js +4 -1
  59. package/esm/internals/hooks/useField/useFieldSectionContentProps.d.ts +2 -2
  60. package/esm/internals/hooks/useField/useFieldSectionContentProps.js +4 -1
  61. package/esm/internals/hooks/useField/useFieldV7TextField.js +25 -15
  62. package/esm/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +3 -2
  63. package/esm/internals/hooks/usePicker/usePicker.d.ts +1 -0
  64. package/esm/internals/hooks/usePicker/usePicker.js +21 -13
  65. package/esm/internals/hooks/usePicker/usePicker.types.d.ts +3 -2
  66. package/esm/internals/hooks/useViews.d.ts +8 -2
  67. package/esm/internals/hooks/useViews.js +27 -12
  68. package/esm/internals/utils/createNonRangePickerStepNavigation.js +3 -3
  69. package/esm/internals/utils/createStepNavigation.d.ts +19 -2
  70. package/esm/internals/utils/createStepNavigation.js +16 -6
  71. package/esm/locales/csCZ.js +1 -1
  72. package/esm/locales/skSK.js +3 -3
  73. package/esm/models/fields.d.ts +4 -0
  74. package/index.js +1 -1
  75. package/internals/components/PickerFieldUI.d.ts +2 -2
  76. package/internals/components/PickerPopper/PickerPopper.js +6 -0
  77. package/internals/components/PickerProvider.d.ts +9 -0
  78. package/internals/components/PickerProvider.js +3 -1
  79. package/internals/hooks/useField/buildSectionsFromFormat.js +1 -0
  80. package/internals/hooks/useField/useFieldRootProps.js +3 -2
  81. package/internals/hooks/useField/useFieldSectionContainerProps.d.ts +2 -0
  82. package/internals/hooks/useField/useFieldSectionContainerProps.js +4 -1
  83. package/internals/hooks/useField/useFieldSectionContentProps.d.ts +2 -2
  84. package/internals/hooks/useField/useFieldSectionContentProps.js +4 -1
  85. package/internals/hooks/useField/useFieldV7TextField.js +25 -15
  86. package/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +3 -2
  87. package/internals/hooks/usePicker/usePicker.d.ts +1 -0
  88. package/internals/hooks/usePicker/usePicker.js +21 -13
  89. package/internals/hooks/usePicker/usePicker.types.d.ts +3 -2
  90. package/internals/hooks/useViews.d.ts +8 -2
  91. package/internals/hooks/useViews.js +28 -13
  92. package/internals/utils/createNonRangePickerStepNavigation.js +3 -3
  93. package/internals/utils/createStepNavigation.d.ts +19 -2
  94. package/internals/utils/createStepNavigation.js +17 -6
  95. package/locales/csCZ.js +1 -1
  96. package/locales/skSK.js +3 -3
  97. package/models/fields.d.ts +4 -0
  98. package/package.json +3 -11
  99. package/modern/AdapterDateFns/AdapterDateFns.d.ts +0 -88
  100. package/modern/AdapterDateFns/AdapterDateFns.js +0 -284
  101. package/modern/AdapterDateFns/index.d.ts +0 -1
  102. package/modern/AdapterDateFns/index.js +0 -1
  103. package/modern/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +0 -64
  104. package/modern/AdapterDateFnsBase/AdapterDateFnsBase.js +0 -291
  105. package/modern/AdapterDateFnsBase/index.d.ts +0 -1
  106. package/modern/AdapterDateFnsBase/index.js +0 -1
  107. package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +0 -89
  108. package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +0 -326
  109. package/modern/AdapterDateFnsJalali/index.d.ts +0 -1
  110. package/modern/AdapterDateFnsJalali/index.js +0 -1
  111. package/modern/AdapterDateFnsJalaliV2/AdapterDateFnsJalaliV2.d.ts +0 -89
  112. package/modern/AdapterDateFnsJalaliV2/AdapterDateFnsJalaliV2.js +0 -326
  113. package/modern/AdapterDateFnsJalaliV2/index.d.ts +0 -1
  114. package/modern/AdapterDateFnsJalaliV2/index.js +0 -1
  115. package/modern/AdapterDateFnsV2/AdapterDateFnsV2.d.ts +0 -88
  116. package/modern/AdapterDateFnsV2/AdapterDateFnsV2.js +0 -284
  117. package/modern/AdapterDateFnsV2/index.d.ts +0 -1
  118. package/modern/AdapterDateFnsV2/index.js +0 -1
  119. package/modern/AdapterDayjs/AdapterDayjs.d.ts +0 -129
  120. package/modern/AdapterDayjs/AdapterDayjs.js +0 -557
  121. package/modern/AdapterDayjs/index.d.ts +0 -1
  122. package/modern/AdapterDayjs/index.js +0 -1
  123. package/modern/AdapterLuxon/AdapterLuxon.d.ts +0 -108
  124. package/modern/AdapterLuxon/AdapterLuxon.js +0 -500
  125. package/modern/AdapterLuxon/index.d.ts +0 -1
  126. package/modern/AdapterLuxon/index.js +0 -1
  127. package/modern/AdapterMoment/AdapterMoment.d.ts +0 -114
  128. package/modern/AdapterMoment/AdapterMoment.js +0 -472
  129. package/modern/AdapterMoment/index.d.ts +0 -1
  130. package/modern/AdapterMoment/index.js +0 -1
  131. package/modern/AdapterMomentHijri/AdapterMomentHijri.d.ts +0 -62
  132. package/modern/AdapterMomentHijri/AdapterMomentHijri.js +0 -219
  133. package/modern/AdapterMomentHijri/index.d.ts +0 -1
  134. package/modern/AdapterMomentHijri/index.js +0 -1
  135. package/modern/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +0 -66
  136. package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -221
  137. package/modern/AdapterMomentJalaali/index.d.ts +0 -1
  138. package/modern/AdapterMomentJalaali/index.js +0 -1
  139. package/modern/DateCalendar/DateCalendar.d.ts +0 -18
  140. package/modern/DateCalendar/DateCalendar.js +0 -590
  141. package/modern/DateCalendar/DateCalendar.types.d.ts +0 -87
  142. package/modern/DateCalendar/DateCalendar.types.js +0 -1
  143. package/modern/DateCalendar/DayCalendar.d.ts +0 -85
  144. package/modern/DateCalendar/DayCalendar.js +0 -449
  145. package/modern/DateCalendar/PickersFadeTransitionGroup.d.ts +0 -16
  146. package/modern/DateCalendar/PickersFadeTransitionGroup.js +0 -58
  147. package/modern/DateCalendar/PickersSlideTransition.d.ts +0 -21
  148. package/modern/DateCalendar/PickersSlideTransition.js +0 -142
  149. package/modern/DateCalendar/dateCalendarClasses.d.ts +0 -9
  150. package/modern/DateCalendar/dateCalendarClasses.js +0 -3
  151. package/modern/DateCalendar/dayCalendarClasses.d.ts +0 -23
  152. package/modern/DateCalendar/dayCalendarClasses.js +0 -3
  153. package/modern/DateCalendar/index.d.ts +0 -12
  154. package/modern/DateCalendar/index.js +0 -5
  155. package/modern/DateCalendar/pickersFadeTransitionGroupClasses.d.ts +0 -7
  156. package/modern/DateCalendar/pickersFadeTransitionGroupClasses.js +0 -3
  157. package/modern/DateCalendar/pickersSlideTransitionClasses.d.ts +0 -19
  158. package/modern/DateCalendar/pickersSlideTransitionClasses.js +0 -3
  159. package/modern/DateCalendar/useCalendarState.d.ts +0 -27
  160. package/modern/DateCalendar/useCalendarState.js +0 -156
  161. package/modern/DateCalendar/useIsDateDisabled.d.ts +0 -13
  162. package/modern/DateCalendar/useIsDateDisabled.js +0 -31
  163. package/modern/DateField/DateField.d.ts +0 -17
  164. package/modern/DateField/DateField.js +0 -327
  165. package/modern/DateField/DateField.types.d.ts +0 -22
  166. package/modern/DateField/DateField.types.js +0 -1
  167. package/modern/DateField/index.d.ts +0 -3
  168. package/modern/DateField/index.js +0 -2
  169. package/modern/DateField/useDateField.d.ts +0 -2
  170. package/modern/DateField/useDateField.js +0 -11
  171. package/modern/DatePicker/DatePicker.d.ts +0 -17
  172. package/modern/DatePicker/DatePicker.js +0 -368
  173. package/modern/DatePicker/DatePicker.types.d.ts +0 -38
  174. package/modern/DatePicker/DatePicker.types.js +0 -1
  175. package/modern/DatePicker/DatePickerToolbar.d.ts +0 -25
  176. package/modern/DatePicker/DatePickerToolbar.js +0 -130
  177. package/modern/DatePicker/datePickerToolbarClasses.d.ts +0 -9
  178. package/modern/DatePicker/datePickerToolbarClasses.js +0 -5
  179. package/modern/DatePicker/index.d.ts +0 -6
  180. package/modern/DatePicker/index.js +0 -3
  181. package/modern/DatePicker/shared.d.ts +0 -43
  182. package/modern/DatePicker/shared.js +0 -33
  183. package/modern/DateTimeField/DateTimeField.d.ts +0 -17
  184. package/modern/DateTimeField/DateTimeField.js +0 -367
  185. package/modern/DateTimeField/DateTimeField.types.d.ts +0 -22
  186. package/modern/DateTimeField/DateTimeField.types.js +0 -1
  187. package/modern/DateTimeField/index.d.ts +0 -3
  188. package/modern/DateTimeField/index.js +0 -2
  189. package/modern/DateTimeField/useDateTimeField.d.ts +0 -2
  190. package/modern/DateTimeField/useDateTimeField.js +0 -11
  191. package/modern/DateTimePicker/DateTimePicker.d.ts +0 -17
  192. package/modern/DateTimePicker/DateTimePicker.js +0 -438
  193. package/modern/DateTimePicker/DateTimePicker.types.d.ts +0 -34
  194. package/modern/DateTimePicker/DateTimePicker.types.js +0 -1
  195. package/modern/DateTimePicker/DateTimePickerTabs.d.ts +0 -39
  196. package/modern/DateTimePicker/DateTimePickerTabs.js +0 -142
  197. package/modern/DateTimePicker/DateTimePickerToolbar.d.ts +0 -47
  198. package/modern/DateTimePicker/DateTimePickerToolbar.js +0 -415
  199. package/modern/DateTimePicker/dateTimePickerTabsClasses.d.ts +0 -7
  200. package/modern/DateTimePicker/dateTimePickerTabsClasses.js +0 -5
  201. package/modern/DateTimePicker/dateTimePickerToolbarClasses.d.ts +0 -23
  202. package/modern/DateTimePicker/dateTimePickerToolbarClasses.js +0 -5
  203. package/modern/DateTimePicker/index.d.ts +0 -10
  204. package/modern/DateTimePicker/index.js +0 -5
  205. package/modern/DateTimePicker/shared.d.ts +0 -72
  206. package/modern/DateTimePicker/shared.js +0 -65
  207. package/modern/DayCalendarSkeleton/DayCalendarSkeleton.d.ts +0 -30
  208. package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +0 -100
  209. package/modern/DayCalendarSkeleton/dayCalendarSkeletonClasses.d.ts +0 -11
  210. package/modern/DayCalendarSkeleton/dayCalendarSkeletonClasses.js +0 -3
  211. package/modern/DayCalendarSkeleton/index.d.ts +0 -4
  212. package/modern/DayCalendarSkeleton/index.js +0 -2
  213. package/modern/DesktopDatePicker/DesktopDatePicker.d.ts +0 -17
  214. package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -384
  215. package/modern/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -28
  216. package/modern/DesktopDatePicker/DesktopDatePicker.types.js +0 -1
  217. package/modern/DesktopDatePicker/index.d.ts +0 -2
  218. package/modern/DesktopDatePicker/index.js +0 -1
  219. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -17
  220. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -528
  221. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -29
  222. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -1
  223. package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +0 -11
  224. package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +0 -83
  225. package/modern/DesktopDateTimePicker/index.d.ts +0 -3
  226. package/modern/DesktopDateTimePicker/index.js +0 -2
  227. package/modern/DesktopTimePicker/DesktopTimePicker.d.ts +0 -17
  228. package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -353
  229. package/modern/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -26
  230. package/modern/DesktopTimePicker/DesktopTimePicker.types.js +0 -1
  231. package/modern/DesktopTimePicker/index.d.ts +0 -2
  232. package/modern/DesktopTimePicker/index.js +0 -1
  233. package/modern/DigitalClock/DigitalClock.d.ts +0 -18
  234. package/modern/DigitalClock/DigitalClock.js +0 -481
  235. package/modern/DigitalClock/DigitalClock.types.d.ts +0 -54
  236. package/modern/DigitalClock/DigitalClock.types.js +0 -1
  237. package/modern/DigitalClock/digitalClockClasses.d.ts +0 -11
  238. package/modern/DigitalClock/digitalClockClasses.js +0 -6
  239. package/modern/DigitalClock/index.d.ts +0 -4
  240. package/modern/DigitalClock/index.js +0 -2
  241. package/modern/LocalizationProvider/LocalizationProvider.d.ts +0 -55
  242. package/modern/LocalizationProvider/LocalizationProvider.js +0 -143
  243. package/modern/LocalizationProvider/index.d.ts +0 -2
  244. package/modern/LocalizationProvider/index.js +0 -1
  245. package/modern/MobileDatePicker/MobileDatePicker.d.ts +0 -17
  246. package/modern/MobileDatePicker/MobileDatePicker.js +0 -377
  247. package/modern/MobileDatePicker/MobileDatePicker.types.d.ts +0 -22
  248. package/modern/MobileDatePicker/MobileDatePicker.types.js +0 -1
  249. package/modern/MobileDatePicker/index.d.ts +0 -2
  250. package/modern/MobileDatePicker/index.js +0 -1
  251. package/modern/MobileDateTimePicker/MobileDateTimePicker.d.ts +0 -17
  252. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -497
  253. package/modern/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +0 -17
  254. package/modern/MobileDateTimePicker/MobileDateTimePicker.types.js +0 -1
  255. package/modern/MobileDateTimePicker/index.d.ts +0 -2
  256. package/modern/MobileDateTimePicker/index.js +0 -1
  257. package/modern/MobileTimePicker/MobileTimePicker.d.ts +0 -18
  258. package/modern/MobileTimePicker/MobileTimePicker.js +0 -316
  259. package/modern/MobileTimePicker/MobileTimePicker.types.d.ts +0 -19
  260. package/modern/MobileTimePicker/MobileTimePicker.types.js +0 -1
  261. package/modern/MobileTimePicker/index.d.ts +0 -2
  262. package/modern/MobileTimePicker/index.js +0 -1
  263. package/modern/MonthCalendar/MonthCalendar.d.ts +0 -18
  264. package/modern/MonthCalendar/MonthCalendar.js +0 -360
  265. package/modern/MonthCalendar/MonthCalendar.types.d.ts +0 -82
  266. package/modern/MonthCalendar/MonthCalendar.types.js +0 -1
  267. package/modern/MonthCalendar/MonthCalendarButton.d.ts +0 -24
  268. package/modern/MonthCalendar/MonthCalendarButton.js +0 -115
  269. package/modern/MonthCalendar/index.d.ts +0 -4
  270. package/modern/MonthCalendar/index.js +0 -2
  271. package/modern/MonthCalendar/monthCalendarClasses.d.ts +0 -13
  272. package/modern/MonthCalendar/monthCalendarClasses.js +0 -5
  273. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +0 -17
  274. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +0 -513
  275. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +0 -48
  276. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.types.js +0 -1
  277. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +0 -41
  278. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +0 -76
  279. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +0 -26
  280. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +0 -210
  281. package/modern/MultiSectionDigitalClock/index.d.ts +0 -7
  282. package/modern/MultiSectionDigitalClock/index.js +0 -3
  283. package/modern/MultiSectionDigitalClock/multiSectionDigitalClockClasses.d.ts +0 -7
  284. package/modern/MultiSectionDigitalClock/multiSectionDigitalClockClasses.js +0 -6
  285. package/modern/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.d.ts +0 -9
  286. package/modern/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +0 -6
  287. package/modern/PickersActionBar/PickersActionBar.d.ts +0 -29
  288. package/modern/PickersActionBar/PickersActionBar.js +0 -117
  289. package/modern/PickersActionBar/index.d.ts +0 -2
  290. package/modern/PickersActionBar/index.js +0 -1
  291. package/modern/PickersCalendarHeader/PickersCalendarHeader.d.ts +0 -18
  292. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +0 -280
  293. package/modern/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +0 -60
  294. package/modern/PickersCalendarHeader/PickersCalendarHeader.types.js +0 -1
  295. package/modern/PickersCalendarHeader/index.d.ts +0 -4
  296. package/modern/PickersCalendarHeader/index.js +0 -2
  297. package/modern/PickersCalendarHeader/pickersCalendarHeaderClasses.d.ts +0 -15
  298. package/modern/PickersCalendarHeader/pickersCalendarHeaderClasses.js +0 -3
  299. package/modern/PickersDay/PickersDay.d.ts +0 -15
  300. package/modern/PickersDay/PickersDay.js +0 -372
  301. package/modern/PickersDay/PickersDay.types.d.ts +0 -114
  302. package/modern/PickersDay/PickersDay.types.js +0 -1
  303. package/modern/PickersDay/index.d.ts +0 -4
  304. package/modern/PickersDay/index.js +0 -2
  305. package/modern/PickersDay/pickersDayClasses.d.ts +0 -19
  306. package/modern/PickersDay/pickersDayClasses.js +0 -5
  307. package/modern/PickersDay/usePickerDayOwnerState.d.ts +0 -14
  308. package/modern/PickersDay/usePickerDayOwnerState.js +0 -32
  309. package/modern/PickersLayout/PickersLayout.d.ts +0 -23
  310. package/modern/PickersLayout/PickersLayout.js +0 -168
  311. package/modern/PickersLayout/PickersLayout.types.d.ts +0 -100
  312. package/modern/PickersLayout/PickersLayout.types.js +0 -1
  313. package/modern/PickersLayout/index.d.ts +0 -5
  314. package/modern/PickersLayout/index.js +0 -3
  315. package/modern/PickersLayout/pickersLayoutClasses.d.ts +0 -19
  316. package/modern/PickersLayout/pickersLayoutClasses.js +0 -6
  317. package/modern/PickersLayout/usePickerLayout.d.ts +0 -7
  318. package/modern/PickersLayout/usePickerLayout.js +0 -104
  319. package/modern/PickersSectionList/PickersSectionList.d.ts +0 -20
  320. package/modern/PickersSectionList/PickersSectionList.js +0 -252
  321. package/modern/PickersSectionList/PickersSectionList.types.d.ts +0 -59
  322. package/modern/PickersSectionList/PickersSectionList.types.js +0 -1
  323. package/modern/PickersSectionList/index.d.ts +0 -4
  324. package/modern/PickersSectionList/index.js +0 -2
  325. package/modern/PickersSectionList/pickersSectionListClasses.d.ts +0 -11
  326. package/modern/PickersSectionList/pickersSectionListClasses.js +0 -6
  327. package/modern/PickersShortcuts/PickersShortcuts.d.ts +0 -47
  328. package/modern/PickersShortcuts/PickersShortcuts.js +0 -124
  329. package/modern/PickersShortcuts/index.d.ts +0 -2
  330. package/modern/PickersShortcuts/index.js +0 -1
  331. package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.d.ts +0 -18
  332. package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +0 -305
  333. package/modern/PickersTextField/PickersFilledInput/index.d.ts +0 -4
  334. package/modern/PickersTextField/PickersFilledInput/index.js +0 -2
  335. package/modern/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +0 -23
  336. package/modern/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +0 -8
  337. package/modern/PickersTextField/PickersInput/PickersInput.d.ts +0 -10
  338. package/modern/PickersTextField/PickersInput/PickersInput.js +0 -220
  339. package/modern/PickersTextField/PickersInput/index.d.ts +0 -4
  340. package/modern/PickersTextField/PickersInput/index.js +0 -2
  341. package/modern/PickersTextField/PickersInput/pickersInputClasses.d.ts +0 -23
  342. package/modern/PickersTextField/PickersInput/pickersInputClasses.js +0 -8
  343. package/modern/PickersTextField/PickersInputBase/PickersInputBase.d.ts +0 -14
  344. package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +0 -375
  345. package/modern/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +0 -59
  346. package/modern/PickersTextField/PickersInputBase/PickersInputBase.types.js +0 -1
  347. package/modern/PickersTextField/PickersInputBase/index.d.ts +0 -4
  348. package/modern/PickersTextField/PickersInputBase/index.js +0 -2
  349. package/modern/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +0 -31
  350. package/modern/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +0 -6
  351. package/modern/PickersTextField/PickersOutlinedInput/Outline.d.ts +0 -11
  352. package/modern/PickersTextField/PickersOutlinedInput/Outline.js +0 -137
  353. package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.d.ts +0 -10
  354. package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +0 -198
  355. package/modern/PickersTextField/PickersOutlinedInput/index.d.ts +0 -4
  356. package/modern/PickersTextField/PickersOutlinedInput/index.js +0 -2
  357. package/modern/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +0 -22
  358. package/modern/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +0 -8
  359. package/modern/PickersTextField/PickersTextField.d.ts +0 -3
  360. package/modern/PickersTextField/PickersTextField.js +0 -280
  361. package/modern/PickersTextField/PickersTextField.types.d.ts +0 -106
  362. package/modern/PickersTextField/PickersTextField.types.js +0 -1
  363. package/modern/PickersTextField/index.d.ts +0 -8
  364. package/modern/PickersTextField/index.js +0 -6
  365. package/modern/PickersTextField/pickersTextFieldClasses.d.ts +0 -15
  366. package/modern/PickersTextField/pickersTextFieldClasses.js +0 -6
  367. package/modern/PickersTextField/usePickerTextFieldOwnerState.d.ts +0 -4
  368. package/modern/PickersTextField/usePickerTextFieldOwnerState.js +0 -11
  369. package/modern/StaticDatePicker/StaticDatePicker.d.ts +0 -17
  370. package/modern/StaticDatePicker/StaticDatePicker.js +0 -310
  371. package/modern/StaticDatePicker/StaticDatePicker.types.d.ts +0 -22
  372. package/modern/StaticDatePicker/StaticDatePicker.types.js +0 -1
  373. package/modern/StaticDatePicker/index.d.ts +0 -2
  374. package/modern/StaticDatePicker/index.js +0 -1
  375. package/modern/StaticDateTimePicker/StaticDateTimePicker.d.ts +0 -17
  376. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -429
  377. package/modern/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +0 -22
  378. package/modern/StaticDateTimePicker/StaticDateTimePicker.types.js +0 -1
  379. package/modern/StaticDateTimePicker/index.d.ts +0 -2
  380. package/modern/StaticDateTimePicker/index.js +0 -1
  381. package/modern/StaticTimePicker/StaticTimePicker.d.ts +0 -17
  382. package/modern/StaticTimePicker/StaticTimePicker.js +0 -248
  383. package/modern/StaticTimePicker/StaticTimePicker.types.d.ts +0 -18
  384. package/modern/StaticTimePicker/StaticTimePicker.types.js +0 -1
  385. package/modern/StaticTimePicker/index.d.ts +0 -2
  386. package/modern/StaticTimePicker/index.js +0 -1
  387. package/modern/TimeClock/Clock.d.ts +0 -39
  388. package/modern/TimeClock/Clock.js +0 -354
  389. package/modern/TimeClock/ClockNumber.d.ts +0 -19
  390. package/modern/TimeClock/ClockNumber.js +0 -102
  391. package/modern/TimeClock/ClockNumbers.d.ts +0 -37
  392. package/modern/TimeClock/ClockNumbers.js +0 -71
  393. package/modern/TimeClock/ClockPointer.d.ts +0 -19
  394. package/modern/TimeClock/ClockPointer.js +0 -119
  395. package/modern/TimeClock/TimeClock.d.ts +0 -17
  396. package/modern/TimeClock/TimeClock.js +0 -491
  397. package/modern/TimeClock/TimeClock.types.d.ts +0 -36
  398. package/modern/TimeClock/TimeClock.types.js +0 -1
  399. package/modern/TimeClock/clockClasses.d.ts +0 -23
  400. package/modern/TimeClock/clockClasses.js +0 -5
  401. package/modern/TimeClock/clockNumberClasses.d.ts +0 -11
  402. package/modern/TimeClock/clockNumberClasses.js +0 -5
  403. package/modern/TimeClock/clockPointerClasses.d.ts +0 -9
  404. package/modern/TimeClock/clockPointerClasses.js +0 -5
  405. package/modern/TimeClock/index.d.ts +0 -13
  406. package/modern/TimeClock/index.js +0 -5
  407. package/modern/TimeClock/shared.d.ts +0 -4
  408. package/modern/TimeClock/shared.js +0 -52
  409. package/modern/TimeClock/timeClockClasses.d.ts +0 -9
  410. package/modern/TimeClock/timeClockClasses.js +0 -5
  411. package/modern/TimeField/TimeField.d.ts +0 -17
  412. package/modern/TimeField/TimeField.js +0 -328
  413. package/modern/TimeField/TimeField.types.d.ts +0 -22
  414. package/modern/TimeField/TimeField.types.js +0 -1
  415. package/modern/TimeField/index.d.ts +0 -3
  416. package/modern/TimeField/index.js +0 -2
  417. package/modern/TimeField/useTimeField.d.ts +0 -2
  418. package/modern/TimeField/useTimeField.js +0 -11
  419. package/modern/TimePicker/TimePicker.d.ts +0 -17
  420. package/modern/TimePicker/TimePicker.js +0 -326
  421. package/modern/TimePicker/TimePicker.types.d.ts +0 -28
  422. package/modern/TimePicker/TimePicker.types.js +0 -1
  423. package/modern/TimePicker/TimePickerToolbar.d.ts +0 -28
  424. package/modern/TimePicker/TimePickerToolbar.js +0 -244
  425. package/modern/TimePicker/index.d.ts +0 -6
  426. package/modern/TimePicker/index.js +0 -3
  427. package/modern/TimePicker/shared.d.ts +0 -49
  428. package/modern/TimePicker/shared.js +0 -43
  429. package/modern/TimePicker/timePickerToolbarClasses.d.ts +0 -21
  430. package/modern/TimePicker/timePickerToolbarClasses.js +0 -5
  431. package/modern/YearCalendar/YearCalendar.d.ts +0 -16
  432. package/modern/YearCalendar/YearCalendar.js +0 -410
  433. package/modern/YearCalendar/YearCalendar.types.d.ts +0 -88
  434. package/modern/YearCalendar/YearCalendar.types.js +0 -1
  435. package/modern/YearCalendar/YearCalendarButton.d.ts +0 -23
  436. package/modern/YearCalendar/YearCalendarButton.js +0 -115
  437. package/modern/YearCalendar/index.d.ts +0 -4
  438. package/modern/YearCalendar/index.js +0 -2
  439. package/modern/YearCalendar/yearCalendarClasses.d.ts +0 -13
  440. package/modern/YearCalendar/yearCalendarClasses.js +0 -5
  441. package/modern/dateViewRenderers/dateViewRenderers.d.ts +0 -50
  442. package/modern/dateViewRenderers/dateViewRenderers.js +0 -83
  443. package/modern/dateViewRenderers/index.d.ts +0 -2
  444. package/modern/dateViewRenderers/index.js +0 -1
  445. package/modern/hooks/index.d.ts +0 -6
  446. package/modern/hooks/index.js +0 -6
  447. package/modern/hooks/useIsValidValue.d.ts +0 -7
  448. package/modern/hooks/useIsValidValue.js +0 -11
  449. package/modern/hooks/useParsedFormat.d.ts +0 -16
  450. package/modern/hooks/useParsedFormat.js +0 -41
  451. package/modern/hooks/usePickerActionsContext.d.ts +0 -7
  452. package/modern/hooks/usePickerActionsContext.js +0 -15
  453. package/modern/hooks/usePickerContext.d.ts +0 -8
  454. package/modern/hooks/usePickerContext.js +0 -15
  455. package/modern/hooks/usePickerTranslations.d.ts +0 -1
  456. package/modern/hooks/usePickerTranslations.js +0 -4
  457. package/modern/hooks/useSplitFieldProps.d.ts +0 -24
  458. package/modern/hooks/useSplitFieldProps.js +0 -48
  459. package/modern/icons/index.d.ts +0 -48
  460. package/modern/icons/index.js +0 -67
  461. package/modern/index.d.ts +0 -39
  462. package/modern/index.js +0 -61
  463. package/modern/internals/components/PickerFieldUI.d.ts +0 -143
  464. package/modern/internals/components/PickerFieldUI.js +0 -321
  465. package/modern/internals/components/PickerPopper/PickerPopper.d.ts +0 -68
  466. package/modern/internals/components/PickerPopper/PickerPopper.js +0 -330
  467. package/modern/internals/components/PickerPopper/index.d.ts +0 -4
  468. package/modern/internals/components/PickerPopper/index.js +0 -2
  469. package/modern/internals/components/PickerPopper/pickerPopperClasses.d.ts +0 -9
  470. package/modern/internals/components/PickerPopper/pickerPopperClasses.js +0 -6
  471. package/modern/internals/components/PickerProvider.d.ts +0 -284
  472. package/modern/internals/components/PickerProvider.js +0 -64
  473. package/modern/internals/components/PickerViewRoot/PickerViewRoot.d.ts +0 -1
  474. package/modern/internals/components/PickerViewRoot/PickerViewRoot.js +0 -10
  475. package/modern/internals/components/PickerViewRoot/index.d.ts +0 -1
  476. package/modern/internals/components/PickerViewRoot/index.js +0 -1
  477. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.d.ts +0 -3
  478. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +0 -176
  479. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +0 -74
  480. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.js +0 -1
  481. package/modern/internals/components/PickersArrowSwitcher/index.d.ts +0 -4
  482. package/modern/internals/components/PickersArrowSwitcher/index.js +0 -2
  483. package/modern/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.d.ts +0 -19
  484. package/modern/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js +0 -5
  485. package/modern/internals/components/PickersModalDialog.d.ts +0 -48
  486. package/modern/internals/components/PickersModalDialog.js +0 -51
  487. package/modern/internals/components/PickersToolbar.d.ts +0 -14
  488. package/modern/internals/components/PickersToolbar.js +0 -116
  489. package/modern/internals/components/PickersToolbarButton.d.ts +0 -15
  490. package/modern/internals/components/PickersToolbarButton.js +0 -61
  491. package/modern/internals/components/PickersToolbarText.d.ts +0 -11
  492. package/modern/internals/components/PickersToolbarText.js +0 -52
  493. package/modern/internals/components/pickersToolbarButtonClasses.d.ts +0 -7
  494. package/modern/internals/components/pickersToolbarButtonClasses.js +0 -5
  495. package/modern/internals/components/pickersToolbarClasses.d.ts +0 -11
  496. package/modern/internals/components/pickersToolbarClasses.js +0 -5
  497. package/modern/internals/components/pickersToolbarTextClasses.d.ts +0 -7
  498. package/modern/internals/components/pickersToolbarTextClasses.js +0 -5
  499. package/modern/internals/constants/dimensions.d.ts +0 -7
  500. package/modern/internals/constants/dimensions.js +0 -7
  501. package/modern/internals/demo/DemoContainer.d.ts +0 -27
  502. package/modern/internals/demo/DemoContainer.js +0 -178
  503. package/modern/internals/demo/index.d.ts +0 -1
  504. package/modern/internals/demo/index.js +0 -1
  505. package/modern/internals/hooks/date-helpers-hooks.d.ts +0 -24
  506. package/modern/internals/hooks/date-helpers-hooks.js +0 -40
  507. package/modern/internals/hooks/useClockReferenceDate.d.ts +0 -15
  508. package/modern/internals/hooks/useClockReferenceDate.js +0 -25
  509. package/modern/internals/hooks/useControlledValue.d.ts +0 -38
  510. package/modern/internals/hooks/useControlledValue.js +0 -56
  511. package/modern/internals/hooks/useDesktopPicker/index.d.ts +0 -2
  512. package/modern/internals/hooks/useDesktopPicker/index.js +0 -1
  513. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +0 -16
  514. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +0 -97
  515. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +0 -48
  516. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.types.js +0 -1
  517. package/modern/internals/hooks/useField/buildSectionsFromFormat.d.ts +0 -15
  518. package/modern/internals/hooks/useField/buildSectionsFromFormat.js +0 -254
  519. package/modern/internals/hooks/useField/index.d.ts +0 -4
  520. package/modern/internals/hooks/useField/index.js +0 -3
  521. package/modern/internals/hooks/useField/syncSelectionToDOM.d.ts +0 -9
  522. package/modern/internals/hooks/useField/syncSelectionToDOM.js +0 -50
  523. package/modern/internals/hooks/useField/useField.d.ts +0 -3
  524. package/modern/internals/hooks/useField/useField.js +0 -9
  525. package/modern/internals/hooks/useField/useField.types.d.ts +0 -329
  526. package/modern/internals/hooks/useField/useField.types.js +0 -1
  527. package/modern/internals/hooks/useField/useField.utils.d.ts +0 -36
  528. package/modern/internals/hooks/useField/useField.utils.js +0 -496
  529. package/modern/internals/hooks/useField/useFieldCharacterEditing.d.ts +0 -29
  530. package/modern/internals/hooks/useField/useFieldCharacterEditing.js +0 -240
  531. package/modern/internals/hooks/useField/useFieldHiddenInputProps.d.ts +0 -20
  532. package/modern/internals/hooks/useField/useFieldHiddenInputProps.js +0 -31
  533. package/modern/internals/hooks/useField/useFieldInternalPropsWithDefaults.d.ts +0 -17
  534. package/modern/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +0 -53
  535. package/modern/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +0 -16
  536. package/modern/internals/hooks/useField/useFieldRootHandleKeyDown.js +0 -205
  537. package/modern/internals/hooks/useField/useFieldRootProps.d.ts +0 -32
  538. package/modern/internals/hooks/useField/useFieldRootProps.js +0 -150
  539. package/modern/internals/hooks/useField/useFieldSectionContainerProps.d.ts +0 -15
  540. package/modern/internals/hooks/useField/useFieldSectionContainerProps.js +0 -29
  541. package/modern/internals/hooks/useField/useFieldSectionContentProps.d.ts +0 -23
  542. package/modern/internals/hooks/useField/useFieldSectionContentProps.js +0 -226
  543. package/modern/internals/hooks/useField/useFieldState.d.ts +0 -44
  544. package/modern/internals/hooks/useField/useFieldState.js +0 -392
  545. package/modern/internals/hooks/useField/useFieldV6TextField.d.ts +0 -26
  546. package/modern/internals/hooks/useField/useFieldV6TextField.js +0 -409
  547. package/modern/internals/hooks/useField/useFieldV7TextField.d.ts +0 -3
  548. package/modern/internals/hooks/useField/useFieldV7TextField.js +0 -243
  549. package/modern/internals/hooks/useFieldOwnerState.d.ts +0 -6
  550. package/modern/internals/hooks/useFieldOwnerState.js +0 -16
  551. package/modern/internals/hooks/useMobilePicker/index.d.ts +0 -2
  552. package/modern/internals/hooks/useMobilePicker/index.js +0 -1
  553. package/modern/internals/hooks/useMobilePicker/useMobilePicker.d.ts +0 -16
  554. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +0 -97
  555. package/modern/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +0 -42
  556. package/modern/internals/hooks/useMobilePicker/useMobilePicker.types.js +0 -1
  557. package/modern/internals/hooks/useNullableFieldPrivateContext.d.ts +0 -9
  558. package/modern/internals/hooks/useNullableFieldPrivateContext.js +0 -5
  559. package/modern/internals/hooks/useNullablePickerContext.d.ts +0 -5
  560. package/modern/internals/hooks/useNullablePickerContext.js +0 -10
  561. package/modern/internals/hooks/usePicker/hooks/useOrientation.d.ts +0 -2
  562. package/modern/internals/hooks/usePicker/hooks/useOrientation.js +0 -34
  563. package/modern/internals/hooks/usePicker/hooks/useValueAndOpenStates.d.ts +0 -21
  564. package/modern/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +0 -191
  565. package/modern/internals/hooks/usePicker/index.d.ts +0 -2
  566. package/modern/internals/hooks/usePicker/index.js +0 -1
  567. package/modern/internals/hooks/usePicker/usePicker.d.ts +0 -15
  568. package/modern/internals/hooks/usePicker/usePicker.js +0 -306
  569. package/modern/internals/hooks/usePicker/usePicker.types.d.ts +0 -186
  570. package/modern/internals/hooks/usePicker/usePicker.types.js +0 -1
  571. package/modern/internals/hooks/usePickerPrivateContext.d.ts +0 -4
  572. package/modern/internals/hooks/usePickerPrivateContext.js +0 -9
  573. package/modern/internals/hooks/useReduceAnimations.d.ts +0 -2
  574. package/modern/internals/hooks/useReduceAnimations.js +0 -17
  575. package/modern/internals/hooks/useStaticPicker/index.d.ts +0 -2
  576. package/modern/internals/hooks/useStaticPicker/index.js +0 -1
  577. package/modern/internals/hooks/useStaticPicker/useStaticPicker.d.ts +0 -16
  578. package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +0 -69
  579. package/modern/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +0 -46
  580. package/modern/internals/hooks/useStaticPicker/useStaticPicker.types.js +0 -1
  581. package/modern/internals/hooks/useToolbarOwnerState.d.ts +0 -10
  582. package/modern/internals/hooks/useToolbarOwnerState.js +0 -13
  583. package/modern/internals/hooks/useUtils.d.ts +0 -13
  584. package/modern/internals/hooks/useUtils.js +0 -27
  585. package/modern/internals/hooks/useViews.d.ts +0 -79
  586. package/modern/internals/hooks/useViews.js +0 -113
  587. package/modern/internals/index.d.ts +0 -72
  588. package/modern/internals/index.js +0 -40
  589. package/modern/internals/models/common.d.ts +0 -5
  590. package/modern/internals/models/common.js +0 -1
  591. package/modern/internals/models/fields.d.ts +0 -12
  592. package/modern/internals/models/fields.js +0 -1
  593. package/modern/internals/models/formProps.d.ts +0 -14
  594. package/modern/internals/models/formProps.js +0 -1
  595. package/modern/internals/models/helpers.d.ts +0 -6
  596. package/modern/internals/models/helpers.js +0 -1
  597. package/modern/internals/models/index.d.ts +0 -5
  598. package/modern/internals/models/index.js +0 -5
  599. package/modern/internals/models/manager.d.ts +0 -119
  600. package/modern/internals/models/manager.js +0 -1
  601. package/modern/internals/models/pickers.d.ts +0 -1
  602. package/modern/internals/models/pickers.js +0 -1
  603. package/modern/internals/models/props/basePickerProps.d.ts +0 -27
  604. package/modern/internals/models/props/basePickerProps.js +0 -1
  605. package/modern/internals/models/props/tabs.d.ts +0 -9
  606. package/modern/internals/models/props/tabs.js +0 -1
  607. package/modern/internals/models/props/time.d.ts +0 -77
  608. package/modern/internals/models/props/time.js +0 -1
  609. package/modern/internals/models/props/toolbar.d.ts +0 -27
  610. package/modern/internals/models/props/toolbar.js +0 -1
  611. package/modern/internals/models/validation.d.ts +0 -116
  612. package/modern/internals/models/validation.js +0 -1
  613. package/modern/internals/models/value.d.ts +0 -12
  614. package/modern/internals/models/value.js +0 -1
  615. package/modern/internals/utils/createNonRangePickerStepNavigation.d.ts +0 -13
  616. package/modern/internals/utils/createNonRangePickerStepNavigation.js +0 -24
  617. package/modern/internals/utils/createStepNavigation.d.ts +0 -32
  618. package/modern/internals/utils/createStepNavigation.js +0 -34
  619. package/modern/internals/utils/date-time-utils.d.ts +0 -26
  620. package/modern/internals/utils/date-time-utils.js +0 -68
  621. package/modern/internals/utils/date-utils.d.ts +0 -40
  622. package/modern/internals/utils/date-utils.js +0 -124
  623. package/modern/internals/utils/getDefaultReferenceDate.d.ts +0 -31
  624. package/modern/internals/utils/getDefaultReferenceDate.js +0 -59
  625. package/modern/internals/utils/time-utils.d.ts +0 -21
  626. package/modern/internals/utils/time-utils.js +0 -59
  627. package/modern/internals/utils/utils.d.ts +0 -16
  628. package/modern/internals/utils/utils.js +0 -56
  629. package/modern/internals/utils/valueManagers.d.ts +0 -7
  630. package/modern/internals/utils/valueManagers.js +0 -44
  631. package/modern/internals/utils/views.d.ts +0 -16
  632. package/modern/internals/utils/views.js +0 -28
  633. package/modern/locales/beBY.d.ts +0 -83
  634. package/modern/locales/beBY.js +0 -82
  635. package/modern/locales/bgBG.d.ts +0 -83
  636. package/modern/locales/bgBG.js +0 -77
  637. package/modern/locales/bnBD.d.ts +0 -83
  638. package/modern/locales/bnBD.js +0 -77
  639. package/modern/locales/caES.d.ts +0 -83
  640. package/modern/locales/caES.js +0 -77
  641. package/modern/locales/csCZ.d.ts +0 -83
  642. package/modern/locales/csCZ.js +0 -78
  643. package/modern/locales/daDK.d.ts +0 -83
  644. package/modern/locales/daDK.js +0 -78
  645. package/modern/locales/deDE.d.ts +0 -83
  646. package/modern/locales/deDE.js +0 -77
  647. package/modern/locales/elGR.d.ts +0 -83
  648. package/modern/locales/elGR.js +0 -80
  649. package/modern/locales/enUS.d.ts +0 -84
  650. package/modern/locales/enUS.js +0 -74
  651. package/modern/locales/esES.d.ts +0 -83
  652. package/modern/locales/esES.js +0 -77
  653. package/modern/locales/eu.d.ts +0 -83
  654. package/modern/locales/eu.js +0 -80
  655. package/modern/locales/faIR.d.ts +0 -83
  656. package/modern/locales/faIR.js +0 -77
  657. package/modern/locales/fiFI.d.ts +0 -83
  658. package/modern/locales/fiFI.js +0 -77
  659. package/modern/locales/frFR.d.ts +0 -83
  660. package/modern/locales/frFR.js +0 -77
  661. package/modern/locales/heIL.d.ts +0 -83
  662. package/modern/locales/heIL.js +0 -77
  663. package/modern/locales/hrHR.d.ts +0 -83
  664. package/modern/locales/hrHR.js +0 -94
  665. package/modern/locales/huHU.d.ts +0 -83
  666. package/modern/locales/huHU.js +0 -78
  667. package/modern/locales/index.d.ts +0 -41
  668. package/modern/locales/index.js +0 -41
  669. package/modern/locales/isIS.d.ts +0 -83
  670. package/modern/locales/isIS.js +0 -81
  671. package/modern/locales/itIT.d.ts +0 -83
  672. package/modern/locales/itIT.js +0 -77
  673. package/modern/locales/jaJP.d.ts +0 -83
  674. package/modern/locales/jaJP.js +0 -78
  675. package/modern/locales/koKR.d.ts +0 -83
  676. package/modern/locales/koKR.js +0 -78
  677. package/modern/locales/kzKZ.d.ts +0 -83
  678. package/modern/locales/kzKZ.js +0 -82
  679. package/modern/locales/mk.d.ts +0 -82
  680. package/modern/locales/mk.js +0 -77
  681. package/modern/locales/nbNO.d.ts +0 -83
  682. package/modern/locales/nbNO.js +0 -77
  683. package/modern/locales/nlNL.d.ts +0 -83
  684. package/modern/locales/nlNL.js +0 -77
  685. package/modern/locales/nnNO.d.ts +0 -83
  686. package/modern/locales/nnNO.js +0 -77
  687. package/modern/locales/plPL.d.ts +0 -83
  688. package/modern/locales/plPL.js +0 -79
  689. package/modern/locales/ptBR.d.ts +0 -83
  690. package/modern/locales/ptBR.js +0 -79
  691. package/modern/locales/ptPT.d.ts +0 -83
  692. package/modern/locales/ptPT.js +0 -77
  693. package/modern/locales/roRO.d.ts +0 -83
  694. package/modern/locales/roRO.js +0 -78
  695. package/modern/locales/ruRU.d.ts +0 -83
  696. package/modern/locales/ruRU.js +0 -78
  697. package/modern/locales/skSK.d.ts +0 -83
  698. package/modern/locales/skSK.js +0 -82
  699. package/modern/locales/svSE.d.ts +0 -83
  700. package/modern/locales/svSE.js +0 -77
  701. package/modern/locales/trTR.d.ts +0 -83
  702. package/modern/locales/trTR.js +0 -81
  703. package/modern/locales/ukUA.d.ts +0 -83
  704. package/modern/locales/ukUA.js +0 -77
  705. package/modern/locales/urPK.d.ts +0 -83
  706. package/modern/locales/urPK.js +0 -82
  707. package/modern/locales/utils/getPickersLocalization.d.ts +0 -83
  708. package/modern/locales/utils/getPickersLocalization.js +0 -12
  709. package/modern/locales/utils/pickersLocaleTextApi.d.ts +0 -118
  710. package/modern/locales/utils/pickersLocaleTextApi.js +0 -1
  711. package/modern/locales/viVN.d.ts +0 -83
  712. package/modern/locales/viVN.js +0 -77
  713. package/modern/locales/zhCN.d.ts +0 -83
  714. package/modern/locales/zhCN.js +0 -76
  715. package/modern/locales/zhHK.d.ts +0 -83
  716. package/modern/locales/zhHK.js +0 -76
  717. package/modern/locales/zhTW.d.ts +0 -83
  718. package/modern/locales/zhTW.js +0 -76
  719. package/modern/managers/index.d.ts +0 -6
  720. package/modern/managers/index.js +0 -3
  721. package/modern/managers/useDateManager.d.ts +0 -14
  722. package/modern/managers/useDateManager.js +0 -48
  723. package/modern/managers/useDateTimeManager.d.ts +0 -15
  724. package/modern/managers/useDateTimeManager.js +0 -53
  725. package/modern/managers/useTimeManager.d.ts +0 -15
  726. package/modern/managers/useTimeManager.js +0 -48
  727. package/modern/models/adapters.d.ts +0 -542
  728. package/modern/models/adapters.js +0 -1
  729. package/modern/models/common.d.ts +0 -6
  730. package/modern/models/common.js +0 -1
  731. package/modern/models/fields.d.ts +0 -139
  732. package/modern/models/fields.js +0 -1
  733. package/modern/models/index.d.ts +0 -9
  734. package/modern/models/index.js +0 -11
  735. package/modern/models/manager.d.ts +0 -78
  736. package/modern/models/manager.js +0 -1
  737. package/modern/models/pickers.d.ts +0 -58
  738. package/modern/models/pickers.js +0 -1
  739. package/modern/models/timezone.d.ts +0 -11
  740. package/modern/models/timezone.js +0 -1
  741. package/modern/models/validation.d.ts +0 -22
  742. package/modern/models/validation.js +0 -1
  743. package/modern/models/views.d.ts +0 -3
  744. package/modern/models/views.js +0 -1
  745. package/modern/package.json +0 -1
  746. package/modern/themeAugmentation/components.d.ts +0 -190
  747. package/modern/themeAugmentation/index.d.ts +0 -3
  748. package/modern/themeAugmentation/index.js +0 -0
  749. package/modern/themeAugmentation/overrides.d.ts +0 -64
  750. package/modern/themeAugmentation/props.d.ts +0 -102
  751. package/modern/timeViewRenderers/index.d.ts +0 -2
  752. package/modern/timeViewRenderers/index.js +0 -1
  753. package/modern/timeViewRenderers/timeViewRenderers.d.ts +0 -103
  754. package/modern/timeViewRenderers/timeViewRenderers.js +0 -183
  755. package/modern/validation/extractValidationProps.d.ts +0 -11
  756. package/modern/validation/extractValidationProps.js +0 -14
  757. package/modern/validation/index.d.ts +0 -9
  758. package/modern/validation/index.js +0 -5
  759. package/modern/validation/useValidation.d.ts +0 -68
  760. package/modern/validation/useValidation.js +0 -53
  761. package/modern/validation/validateDate.d.ts +0 -18
  762. package/modern/validation/validateDate.js +0 -55
  763. package/modern/validation/validateDateTime.d.ts +0 -19
  764. package/modern/validation/validateDateTime.js +0 -39
  765. package/modern/validation/validateTime.d.ts +0 -18
  766. package/modern/validation/validateTime.js +0 -59
  767. package/tsconfig.build.tsbuildinfo +0 -1
@@ -1,103 +0,0 @@
1
- import * as React from 'react';
2
- import { TimeClockProps } from "../TimeClock/index.js";
3
- import { TimeView } from "../models/index.js";
4
- import { DigitalClockProps } from "../DigitalClock/index.js";
5
- import { BaseClockProps } from "../internals/models/props/time.js";
6
- import { MultiSectionDigitalClockProps } from "../MultiSectionDigitalClock/index.js";
7
- import { TimeViewWithMeridiem } from "../internals/models/index.js";
8
- import type { TimePickerProps } from '../TimePicker/TimePicker.types';
9
- export type TimeViewRendererProps<TView extends TimeViewWithMeridiem, TComponentProps extends BaseClockProps<TView>> = Omit<TComponentProps, 'views' | 'openTo' | 'view' | 'onViewChange'> & {
10
- view: TView;
11
- onViewChange?: (view: TView) => void;
12
- views: readonly TView[];
13
- };
14
- export declare const renderTimeViewClock: ({
15
- view,
16
- onViewChange,
17
- focusedView,
18
- onFocusedViewChange,
19
- views,
20
- value,
21
- defaultValue,
22
- referenceDate,
23
- onChange,
24
- className,
25
- classes,
26
- disableFuture,
27
- disablePast,
28
- minTime,
29
- maxTime,
30
- shouldDisableTime,
31
- minutesStep,
32
- ampm,
33
- ampmInClock,
34
- slots,
35
- slotProps,
36
- readOnly,
37
- disabled,
38
- sx,
39
- autoFocus,
40
- showViewSwitcher,
41
- disableIgnoringDatePartForTimeValidation,
42
- timezone
43
- }: TimeViewRendererProps<TimeView, TimeClockProps<TimeView>>) => React.JSX.Element;
44
- export declare const renderDigitalClockTimeView: ({
45
- view,
46
- onViewChange,
47
- focusedView,
48
- onFocusedViewChange,
49
- views,
50
- value,
51
- defaultValue,
52
- referenceDate,
53
- onChange,
54
- className,
55
- classes,
56
- disableFuture,
57
- disablePast,
58
- minTime,
59
- maxTime,
60
- shouldDisableTime,
61
- minutesStep,
62
- ampm,
63
- slots,
64
- slotProps,
65
- readOnly,
66
- disabled,
67
- sx,
68
- autoFocus,
69
- disableIgnoringDatePartForTimeValidation,
70
- timeSteps,
71
- skipDisabled,
72
- timezone
73
- }: TimeViewRendererProps<Extract<TimeView, "hours">, Omit<DigitalClockProps, "timeStep"> & Pick<TimePickerProps, "timeSteps">>) => React.JSX.Element;
74
- export declare const renderMultiSectionDigitalClockTimeView: ({
75
- view,
76
- onViewChange,
77
- focusedView,
78
- onFocusedViewChange,
79
- views,
80
- value,
81
- defaultValue,
82
- referenceDate,
83
- onChange,
84
- className,
85
- classes,
86
- disableFuture,
87
- disablePast,
88
- minTime,
89
- maxTime,
90
- shouldDisableTime,
91
- minutesStep,
92
- ampm,
93
- slots,
94
- slotProps,
95
- readOnly,
96
- disabled,
97
- sx,
98
- autoFocus,
99
- disableIgnoringDatePartForTimeValidation,
100
- timeSteps,
101
- skipDisabled,
102
- timezone
103
- }: TimeViewRendererProps<TimeViewWithMeridiem, MultiSectionDigitalClockProps>) => React.JSX.Element;
@@ -1,183 +0,0 @@
1
- import * as React from 'react';
2
- import { TimeClock } from "../TimeClock/index.js";
3
- import { DigitalClock } from "../DigitalClock/index.js";
4
- import { MultiSectionDigitalClock } from "../MultiSectionDigitalClock/index.js";
5
- import { isInternalTimeView, isTimeView } from "../internals/utils/time-utils.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export const renderTimeViewClock = ({
8
- view,
9
- onViewChange,
10
- focusedView,
11
- onFocusedViewChange,
12
- views,
13
- value,
14
- defaultValue,
15
- referenceDate,
16
- onChange,
17
- className,
18
- classes,
19
- disableFuture,
20
- disablePast,
21
- minTime,
22
- maxTime,
23
- shouldDisableTime,
24
- minutesStep,
25
- ampm,
26
- ampmInClock,
27
- slots,
28
- slotProps,
29
- readOnly,
30
- disabled,
31
- sx,
32
- autoFocus,
33
- showViewSwitcher,
34
- disableIgnoringDatePartForTimeValidation,
35
- timezone
36
- }) => /*#__PURE__*/_jsx(TimeClock, {
37
- view: view,
38
- onViewChange: onViewChange,
39
- focusedView: focusedView && isTimeView(focusedView) ? focusedView : null,
40
- onFocusedViewChange: onFocusedViewChange,
41
- views: views.filter(isTimeView),
42
- value: value,
43
- defaultValue: defaultValue,
44
- referenceDate: referenceDate,
45
- onChange: onChange,
46
- className: className,
47
- classes: classes,
48
- disableFuture: disableFuture,
49
- disablePast: disablePast,
50
- minTime: minTime,
51
- maxTime: maxTime,
52
- shouldDisableTime: shouldDisableTime,
53
- minutesStep: minutesStep,
54
- ampm: ampm,
55
- ampmInClock: ampmInClock,
56
- slots: slots,
57
- slotProps: slotProps,
58
- readOnly: readOnly,
59
- disabled: disabled,
60
- sx: sx,
61
- autoFocus: autoFocus,
62
- showViewSwitcher: showViewSwitcher,
63
- disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation,
64
- timezone: timezone
65
- });
66
- export const renderDigitalClockTimeView = ({
67
- view,
68
- onViewChange,
69
- focusedView,
70
- onFocusedViewChange,
71
- views,
72
- value,
73
- defaultValue,
74
- referenceDate,
75
- onChange,
76
- className,
77
- classes,
78
- disableFuture,
79
- disablePast,
80
- minTime,
81
- maxTime,
82
- shouldDisableTime,
83
- minutesStep,
84
- ampm,
85
- slots,
86
- slotProps,
87
- readOnly,
88
- disabled,
89
- sx,
90
- autoFocus,
91
- disableIgnoringDatePartForTimeValidation,
92
- timeSteps,
93
- skipDisabled,
94
- timezone
95
- }) => /*#__PURE__*/_jsx(DigitalClock, {
96
- view: view,
97
- onViewChange: onViewChange,
98
- focusedView: focusedView && isTimeView(focusedView) ? focusedView : null,
99
- onFocusedViewChange: onFocusedViewChange,
100
- views: views.filter(isTimeView),
101
- value: value,
102
- defaultValue: defaultValue,
103
- referenceDate: referenceDate,
104
- onChange: onChange,
105
- className: className,
106
- classes: classes,
107
- disableFuture: disableFuture,
108
- disablePast: disablePast,
109
- minTime: minTime,
110
- maxTime: maxTime,
111
- shouldDisableTime: shouldDisableTime,
112
- minutesStep: minutesStep,
113
- ampm: ampm,
114
- slots: slots,
115
- slotProps: slotProps,
116
- readOnly: readOnly,
117
- disabled: disabled,
118
- sx: sx,
119
- autoFocus: autoFocus,
120
- disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation,
121
- timeStep: timeSteps?.minutes,
122
- skipDisabled: skipDisabled,
123
- timezone: timezone
124
- });
125
- export const renderMultiSectionDigitalClockTimeView = ({
126
- view,
127
- onViewChange,
128
- focusedView,
129
- onFocusedViewChange,
130
- views,
131
- value,
132
- defaultValue,
133
- referenceDate,
134
- onChange,
135
- className,
136
- classes,
137
- disableFuture,
138
- disablePast,
139
- minTime,
140
- maxTime,
141
- shouldDisableTime,
142
- minutesStep,
143
- ampm,
144
- slots,
145
- slotProps,
146
- readOnly,
147
- disabled,
148
- sx,
149
- autoFocus,
150
- disableIgnoringDatePartForTimeValidation,
151
- timeSteps,
152
- skipDisabled,
153
- timezone
154
- }) => /*#__PURE__*/_jsx(MultiSectionDigitalClock, {
155
- view: view,
156
- onViewChange: onViewChange,
157
- focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
158
- onFocusedViewChange: onFocusedViewChange,
159
- views: views.filter(isTimeView),
160
- value: value,
161
- defaultValue: defaultValue,
162
- referenceDate: referenceDate,
163
- onChange: onChange,
164
- className: className,
165
- classes: classes,
166
- disableFuture: disableFuture,
167
- disablePast: disablePast,
168
- minTime: minTime,
169
- maxTime: maxTime,
170
- shouldDisableTime: shouldDisableTime,
171
- minutesStep: minutesStep,
172
- ampm: ampm,
173
- slots: slots,
174
- slotProps: slotProps,
175
- readOnly: readOnly,
176
- disabled: disabled,
177
- sx: sx,
178
- autoFocus: autoFocus,
179
- disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation,
180
- timeSteps: timeSteps,
181
- skipDisabled: skipDisabled,
182
- timezone: timezone
183
- });
@@ -1,11 +0,0 @@
1
- import { BaseDateValidationProps, BaseTimeValidationProps, DateTimeValidationProps, DayValidationProps, MonthValidationProps, TimeValidationProps, YearValidationProps } from "../internals/models/validation.js";
2
- export declare const DATE_VALIDATION_PROP_NAMES: (keyof BaseDateValidationProps | keyof YearValidationProps | keyof MonthValidationProps | keyof DayValidationProps)[];
3
- export declare const TIME_VALIDATION_PROP_NAMES: (keyof BaseTimeValidationProps | keyof TimeValidationProps | 'ampm')[];
4
- export declare const DATE_TIME_VALIDATION_PROP_NAMES: (keyof DateTimeValidationProps)[];
5
- /**
6
- * Extract the validation props for the props received by a component.
7
- * Limit the risk of forgetting some of them and reduce the bundle size.
8
- */
9
- export declare const extractValidationProps: <Props extends {
10
- [key: string]: any;
11
- }>(props: Props) => Pick<Props, "maxDate" | "minDate" | "disablePast" | "disableFuture" | "shouldDisableYear" | "shouldDisableMonth" | "shouldDisableDate" | "minTime" | "maxTime" | "minutesStep" | "shouldDisableTime" | "disableIgnoringDatePartForTimeValidation" | "ampm" | "minDateTime" | "maxDateTime">;
@@ -1,14 +0,0 @@
1
- export const DATE_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minDate', 'maxDate', 'shouldDisableDate', 'shouldDisableMonth', 'shouldDisableYear'];
2
- export const TIME_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minTime', 'maxTime', 'shouldDisableTime', 'minutesStep', 'ampm', 'disableIgnoringDatePartForTimeValidation'];
3
- export const DATE_TIME_VALIDATION_PROP_NAMES = ['minDateTime', 'maxDateTime'];
4
- const VALIDATION_PROP_NAMES = [...DATE_VALIDATION_PROP_NAMES, ...TIME_VALIDATION_PROP_NAMES, ...DATE_TIME_VALIDATION_PROP_NAMES];
5
- /**
6
- * Extract the validation props for the props received by a component.
7
- * Limit the risk of forgetting some of them and reduce the bundle size.
8
- */
9
- export const extractValidationProps = props => VALIDATION_PROP_NAMES.reduce((extractedProps, propName) => {
10
- if (props.hasOwnProperty(propName)) {
11
- extractedProps[propName] = props[propName];
12
- }
13
- return extractedProps;
14
- }, {});
@@ -1,9 +0,0 @@
1
- export { validateDate } from "./validateDate.js";
2
- export type { ValidateDateProps } from './validateDate';
3
- export { validateTime } from "./validateTime.js";
4
- export type { ValidateTimeProps } from './validateTime';
5
- export { validateDateTime } from "./validateDateTime.js";
6
- export type { ValidateDateTimeProps } from './validateDateTime';
7
- export { extractValidationProps } from "./extractValidationProps.js";
8
- export { useValidation } from "./useValidation.js";
9
- export type { Validator, UseValidationReturnValue } from './useValidation';
@@ -1,5 +0,0 @@
1
- export { validateDate } from "./validateDate.js";
2
- export { validateTime } from "./validateTime.js";
3
- export { validateDateTime } from "./validateDateTime.js";
4
- export { extractValidationProps } from "./extractValidationProps.js";
5
- export { useValidation } from "./useValidation.js";
@@ -1,68 +0,0 @@
1
- import { MuiPickersAdapterContextValue } from "../LocalizationProvider/LocalizationProvider.js";
2
- import { OnErrorProps, PickersTimezone } from "../models/index.js";
3
- import type { PickerValueManager } from '../internals/models';
4
- import { PickerValidValue } from "../internals/models/index.js";
5
- export type Validator<TValue extends PickerValidValue, TError, TValidationProps> = {
6
- (params: {
7
- adapter: MuiPickersAdapterContextValue;
8
- value: TValue;
9
- timezone: PickersTimezone;
10
- props: TValidationProps;
11
- }): TError;
12
- valueManager: PickerValueManager<TValue, any>;
13
- };
14
- interface UseValidationOptions<TValue extends PickerValidValue, TError, TValidationProps extends {}> extends OnErrorProps<TValue, TError> {
15
- /**
16
- * The value to validate.
17
- */
18
- value: TValue;
19
- /**
20
- * The timezone to use for the validation.
21
- */
22
- timezone: PickersTimezone;
23
- /**
24
- * The validator function to use.
25
- * They can be imported from `@mui/x-date-pickers/validation` and `@mui/x-date-pickers-pro/validation`.
26
- * It is recommended to only use the validator exported by the MUI X packages,
27
- * otherwise you may have inconsistent behaviors between the field and the views.
28
- */
29
- validator: Validator<TValue, TError, TValidationProps>;
30
- /**
31
- * The validation props, they differ depending on the component.
32
- * For example, the `validateTime` function supports `minTime`, `maxTime`, etc.
33
- */
34
- props: TValidationProps;
35
- }
36
- export interface UseValidationReturnValue<TValue extends PickerValidValue, TError> {
37
- /**
38
- * The validation error associated to the value passed to the `useValidation` hook.
39
- */
40
- validationError: TError;
41
- /**
42
- * `true` if the current error is not null.
43
- * For single value components, it means that the value is invalid.
44
- * For range components, it means that either start or end value is invalid.
45
- */
46
- hasValidationError: boolean;
47
- /**
48
- * Get the validation error for a new value.
49
- * This can be used to validate the value in a change handler before updating the state.
50
- * @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.
51
- * @param {TValue} newValue The value to validate.
52
- * @returns {TError} The validation error associated to the new value.
53
- */
54
- getValidationErrorForNewValue: (newValue: TValue) => TError;
55
- }
56
- /**
57
- * Utility hook to check if a given value is valid based on the provided validation props.
58
- * @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.
59
- * @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.
60
- * @param {UseValidationOptions<TValue, TError, TValidationProps>} options The options to configure the hook.
61
- * @param {TValue} options.value The value to validate.
62
- * @param {PickersTimezone} options.timezone The timezone to use for the validation.
63
- * @param {Validator<TValue, TError, TValidationProps>} options.validator The validator function to use.
64
- * @param {TValidationProps} options.props The validation props, they differ depending on the component.
65
- * @param {(error: TError, value: TValue) => void} options.onError Callback fired when the error associated with the current value changes.
66
- */
67
- export declare function useValidation<TValue extends PickerValidValue, TError, TValidationProps extends {}>(options: UseValidationOptions<TValue, TError, TValidationProps>): UseValidationReturnValue<TValue, TError>;
68
- export {};
@@ -1,53 +0,0 @@
1
- 'use client';
2
-
3
- import * as React from 'react';
4
- import useEventCallback from '@mui/utils/useEventCallback';
5
- import { useLocalizationContext } from "../internals/hooks/useUtils.js";
6
- /**
7
- * Utility hook to check if a given value is valid based on the provided validation props.
8
- * @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.
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.
10
- * @param {UseValidationOptions<TValue, TError, TValidationProps>} options The options to configure the hook.
11
- * @param {TValue} options.value The value to validate.
12
- * @param {PickersTimezone} options.timezone The timezone to use for the validation.
13
- * @param {Validator<TValue, TError, TValidationProps>} options.validator The validator function to use.
14
- * @param {TValidationProps} options.props The validation props, they differ depending on the component.
15
- * @param {(error: TError, value: TValue) => void} options.onError Callback fired when the error associated with the current value changes.
16
- */
17
- export function useValidation(options) {
18
- const {
19
- props,
20
- validator,
21
- value,
22
- timezone,
23
- onError
24
- } = options;
25
- const adapter = useLocalizationContext();
26
- const previousValidationErrorRef = React.useRef(validator.valueManager.defaultErrorState);
27
- const validationError = validator({
28
- adapter,
29
- value,
30
- timezone,
31
- props
32
- });
33
- const hasValidationError = validator.valueManager.hasError(validationError);
34
- React.useEffect(() => {
35
- if (onError && !validator.valueManager.isSameError(validationError, previousValidationErrorRef.current)) {
36
- onError(validationError, value);
37
- }
38
- previousValidationErrorRef.current = validationError;
39
- }, [validator, onError, validationError, value]);
40
- const getValidationErrorForNewValue = useEventCallback(newValue => {
41
- return validator({
42
- adapter,
43
- value: newValue,
44
- timezone,
45
- props
46
- });
47
- });
48
- return {
49
- validationError,
50
- hasValidationError,
51
- getValidationErrorForNewValue
52
- };
53
- }
@@ -1,18 +0,0 @@
1
- import type { MakeRequired } from '@mui/x-internals/types';
2
- import { Validator } from "./useValidation.js";
3
- import { BaseDateValidationProps, DayValidationProps, MonthValidationProps, YearValidationProps } from "../internals/models/validation.js";
4
- import { DateValidationError } from "../models/index.js";
5
- import { PickerValue } from "../internals/models/index.js";
6
- /**
7
- * Validation props used by the Date Picker, Date Field and Date Calendar components.
8
- */
9
- export interface ExportedValidateDateProps extends DayValidationProps, MonthValidationProps, YearValidationProps, BaseDateValidationProps {}
10
- /**
11
- * Validation props as received by the validateDate method.
12
- */
13
- export interface ValidateDateProps extends MakeRequired<ExportedValidateDateProps, ValidateDatePropsToDefault> {}
14
- /**
15
- * Name of the props that should be defaulted before being passed to the validateDate method.
16
- */
17
- export type ValidateDatePropsToDefault = keyof BaseDateValidationProps;
18
- export declare const validateDate: Validator<PickerValue, DateValidationError, ValidateDateProps>;
@@ -1,55 +0,0 @@
1
- import { singleItemValueManager } from "../internals/utils/valueManagers.js";
2
-
3
- /**
4
- * Validation props used by the Date Picker, Date Field and Date Calendar components.
5
- */
6
-
7
- /**
8
- * Validation props as received by the validateDate method.
9
- */
10
-
11
- /**
12
- * Name of the props that should be defaulted before being passed to the validateDate method.
13
- */
14
-
15
- export const validateDate = ({
16
- props,
17
- value,
18
- timezone,
19
- adapter
20
- }) => {
21
- if (value === null) {
22
- return null;
23
- }
24
- const {
25
- shouldDisableDate,
26
- shouldDisableMonth,
27
- shouldDisableYear,
28
- disablePast,
29
- disableFuture,
30
- minDate,
31
- maxDate
32
- } = props;
33
- const now = adapter.utils.date(undefined, timezone);
34
- switch (true) {
35
- case !adapter.utils.isValid(value):
36
- return 'invalidDate';
37
- case Boolean(shouldDisableDate && shouldDisableDate(value)):
38
- return 'shouldDisableDate';
39
- case Boolean(shouldDisableMonth && shouldDisableMonth(value)):
40
- return 'shouldDisableMonth';
41
- case Boolean(shouldDisableYear && shouldDisableYear(value)):
42
- return 'shouldDisableYear';
43
- case Boolean(disableFuture && adapter.utils.isAfterDay(value, now)):
44
- return 'disableFuture';
45
- case Boolean(disablePast && adapter.utils.isBeforeDay(value, now)):
46
- return 'disablePast';
47
- case Boolean(minDate && adapter.utils.isBeforeDay(value, minDate)):
48
- return 'minDate';
49
- case Boolean(maxDate && adapter.utils.isAfterDay(value, maxDate)):
50
- return 'maxDate';
51
- default:
52
- return null;
53
- }
54
- };
55
- validateDate.valueManager = singleItemValueManager;
@@ -1,19 +0,0 @@
1
- import { Validator } from "./useValidation.js";
2
- import { ExportedValidateDateProps, ValidateDateProps, ValidateDatePropsToDefault } from "./validateDate.js";
3
- import { ExportedValidateTimeProps, ValidateTimeProps, ValidateTimePropsToDefault } from "./validateTime.js";
4
- import { DateTimeValidationError } from "../models/index.js";
5
- import { DateTimeValidationProps } from "../internals/models/validation.js";
6
- import { PickerValue } from "../internals/models/index.js";
7
- /**
8
- * Validation props used by the Date Time Picker and Date Time Field components.
9
- */
10
- export interface ExportedValidateDateTimeProps extends ExportedValidateDateProps, ExportedValidateTimeProps, DateTimeValidationProps {}
11
- /**
12
- * Validation props as received by the validateDateTime method.
13
- */
14
- export interface ValidateDateTimeProps extends ValidateDateProps, ValidateTimeProps {}
15
- /**
16
- * Name of the props that should be defaulted before being passed to the validateDateTime method.
17
- */
18
- export type ValidateDateTimePropsToDefault = ValidateDatePropsToDefault | ValidateTimePropsToDefault;
19
- export declare const validateDateTime: Validator<PickerValue, DateTimeValidationError, ValidateDateTimeProps>;
@@ -1,39 +0,0 @@
1
- import { validateDate } from "./validateDate.js";
2
- import { validateTime } from "./validateTime.js";
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
-
9
- /**
10
- * Validation props as received by the validateDateTime method.
11
- */
12
-
13
- /**
14
- * Name of the props that should be defaulted before being passed to the validateDateTime method.
15
- */
16
-
17
- export const validateDateTime = ({
18
- adapter,
19
- value,
20
- timezone,
21
- props
22
- }) => {
23
- const dateValidationResult = validateDate({
24
- adapter,
25
- value,
26
- timezone,
27
- props
28
- });
29
- if (dateValidationResult !== null) {
30
- return dateValidationResult;
31
- }
32
- return validateTime({
33
- adapter,
34
- value,
35
- timezone,
36
- props
37
- });
38
- };
39
- validateDateTime.valueManager = singleItemValueManager;
@@ -1,18 +0,0 @@
1
- import type { MakeRequired } from '@mui/x-internals/types';
2
- import { Validator } from "./useValidation.js";
3
- import { BaseTimeValidationProps, TimeValidationProps } from "../internals/models/validation.js";
4
- import { TimeValidationError } from "../models/index.js";
5
- import { PickerValue } from "../internals/models/index.js";
6
- /**
7
- * Validation props used by the Time Picker, Time Field and Clock components.
8
- */
9
- export interface ExportedValidateTimeProps extends BaseTimeValidationProps, TimeValidationProps {}
10
- /**
11
- * Validation props as received by the validateTime method.
12
- */
13
- export interface ValidateTimeProps extends MakeRequired<ExportedValidateTimeProps, ValidateTimePropsToDefault> {}
14
- /**
15
- * Name of the props that should be defaulted before being passed to the validateTime method.
16
- */
17
- export type ValidateTimePropsToDefault = keyof BaseTimeValidationProps;
18
- export declare const validateTime: Validator<PickerValue, TimeValidationError, ValidateTimeProps>;
@@ -1,59 +0,0 @@
1
- import { createIsAfterIgnoreDatePart } from "../internals/utils/time-utils.js";
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
-
8
- /**
9
- * Validation props as received by the validateTime method.
10
- */
11
-
12
- /**
13
- * Name of the props that should be defaulted before being passed to the validateTime method.
14
- */
15
-
16
- export const validateTime = ({
17
- adapter,
18
- value,
19
- timezone,
20
- props
21
- }) => {
22
- if (value === null) {
23
- return null;
24
- }
25
- const {
26
- minTime,
27
- maxTime,
28
- minutesStep,
29
- shouldDisableTime,
30
- disableIgnoringDatePartForTimeValidation = false,
31
- disablePast,
32
- disableFuture
33
- } = props;
34
- const now = adapter.utils.date(undefined, timezone);
35
- const isAfter = createIsAfterIgnoreDatePart(disableIgnoringDatePartForTimeValidation, adapter.utils);
36
- switch (true) {
37
- case !adapter.utils.isValid(value):
38
- return 'invalidDate';
39
- case Boolean(minTime && isAfter(minTime, value)):
40
- return 'minTime';
41
- case Boolean(maxTime && isAfter(value, maxTime)):
42
- return 'maxTime';
43
- case Boolean(disableFuture && adapter.utils.isAfter(value, now)):
44
- return 'disableFuture';
45
- case Boolean(disablePast && adapter.utils.isBefore(value, now)):
46
- return 'disablePast';
47
- case Boolean(shouldDisableTime && shouldDisableTime(value, 'hours')):
48
- return 'shouldDisableTime-hours';
49
- case Boolean(shouldDisableTime && shouldDisableTime(value, 'minutes')):
50
- return 'shouldDisableTime-minutes';
51
- case Boolean(shouldDisableTime && shouldDisableTime(value, 'seconds')):
52
- return 'shouldDisableTime-seconds';
53
- case Boolean(minutesStep && adapter.utils.getMinutes(value) % minutesStep !== 0):
54
- return 'minutesStep';
55
- default:
56
- return null;
57
- }
58
- };
59
- validateTime.valueManager = singleItemValueManager;