@mui/x-date-pickers 7.0.0-beta.1 → 7.0.0-beta.4

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 (778) hide show
  1. package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +6 -0
  2. package/AdapterDateFnsBase/AdapterDateFnsBase.js +4 -0
  3. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +6 -0
  4. package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +4 -1
  5. package/AdapterDayjs/AdapterDayjs.d.ts +6 -0
  6. package/AdapterDayjs/AdapterDayjs.js +6 -1
  7. package/AdapterLuxon/AdapterLuxon.d.ts +6 -0
  8. package/AdapterLuxon/AdapterLuxon.js +7 -2
  9. package/AdapterMoment/AdapterMoment.d.ts +6 -0
  10. package/AdapterMoment/AdapterMoment.js +4 -1
  11. package/AdapterMomentHijri/AdapterMomentHijri.d.ts +5 -0
  12. package/AdapterMomentHijri/AdapterMomentHijri.js +3 -1
  13. package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +5 -0
  14. package/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -1
  15. package/CHANGELOG.md +437 -4
  16. package/DateCalendar/DateCalendar.d.ts +2 -1
  17. package/DateCalendar/DateCalendar.js +8 -6
  18. package/DateCalendar/DateCalendar.types.d.ts +9 -6
  19. package/DateCalendar/DayCalendar.d.ts +9 -7
  20. package/DateCalendar/DayCalendar.js +1 -1
  21. package/DateCalendar/PickersFadeTransitionGroup.d.ts +3 -0
  22. package/DateCalendar/PickersSlideTransition.d.ts +3 -0
  23. package/DateCalendar/useCalendarState.d.ts +7 -7
  24. package/DateCalendar/useIsDateDisabled.d.ts +2 -1
  25. package/DateField/DateField.d.ts +2 -1
  26. package/DateField/DateField.js +16 -14
  27. package/DateField/DateField.types.d.ts +12 -15
  28. package/DateField/index.d.ts +1 -1
  29. package/DateField/useDateField.d.ts +3 -2
  30. package/DateField/useDateField.js +1 -15
  31. package/DatePicker/DatePicker.d.ts +2 -1
  32. package/DatePicker/DatePicker.js +14 -14
  33. package/DatePicker/DatePicker.types.d.ts +5 -4
  34. package/DatePicker/DatePickerToolbar.d.ts +7 -6
  35. package/DatePicker/DatePickerToolbar.js +12 -4
  36. package/DatePicker/shared.d.ts +6 -6
  37. package/DateTimeField/DateTimeField.d.ts +2 -1
  38. package/DateTimeField/DateTimeField.js +20 -18
  39. package/DateTimeField/DateTimeField.types.d.ts +12 -15
  40. package/DateTimeField/index.d.ts +1 -1
  41. package/DateTimeField/useDateTimeField.d.ts +3 -2
  42. package/DateTimeField/useDateTimeField.js +1 -20
  43. package/DateTimePicker/DateTimePicker.d.ts +2 -1
  44. package/DateTimePicker/DateTimePicker.js +18 -18
  45. package/DateTimePicker/DateTimePicker.types.d.ts +5 -4
  46. package/DateTimePicker/DateTimePickerTabs.d.ts +2 -2
  47. package/DateTimePicker/DateTimePickerTabs.js +7 -1
  48. package/DateTimePicker/DateTimePickerToolbar.d.ts +4 -3
  49. package/DateTimePicker/DateTimePickerToolbar.js +4 -1
  50. package/DateTimePicker/shared.d.ts +6 -6
  51. package/DesktopDatePicker/DesktopDatePicker.d.ts +2 -1
  52. package/DesktopDatePicker/DesktopDatePicker.js +14 -14
  53. package/DesktopDatePicker/DesktopDatePicker.types.d.ts +5 -5
  54. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +2 -1
  55. package/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  56. package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +5 -5
  57. package/DesktopTimePicker/DesktopTimePicker.d.ts +2 -1
  58. package/DesktopTimePicker/DesktopTimePicker.js +14 -13
  59. package/DesktopTimePicker/DesktopTimePicker.types.d.ts +5 -5
  60. package/DigitalClock/DigitalClock.d.ts +2 -1
  61. package/DigitalClock/DigitalClock.js +5 -5
  62. package/DigitalClock/DigitalClock.types.d.ts +4 -4
  63. package/LocalizationProvider/LocalizationProvider.d.ts +5 -5
  64. package/LocalizationProvider/LocalizationProvider.js +1 -0
  65. package/MobileDatePicker/MobileDatePicker.d.ts +2 -1
  66. package/MobileDatePicker/MobileDatePicker.js +14 -14
  67. package/MobileDatePicker/MobileDatePicker.types.d.ts +5 -5
  68. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +2 -1
  69. package/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  70. package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +5 -5
  71. package/MobileTimePicker/MobileTimePicker.d.ts +2 -1
  72. package/MobileTimePicker/MobileTimePicker.js +14 -13
  73. package/MobileTimePicker/MobileTimePicker.types.d.ts +5 -5
  74. package/MonthCalendar/MonthCalendar.d.ts +3 -2
  75. package/MonthCalendar/MonthCalendar.js +5 -5
  76. package/MonthCalendar/MonthCalendar.types.d.ts +2 -2
  77. package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +2 -1
  78. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +5 -5
  79. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +4 -3
  80. package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +5 -5
  81. package/PickersCalendarHeader/PickersCalendarHeader.d.ts +2 -1
  82. package/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
  83. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +6 -6
  84. package/PickersDay/PickersDay.d.ts +3 -2
  85. package/PickersDay/PickersDay.js +1 -1
  86. package/PickersLayout/PickersLayout.d.ts +2 -1
  87. package/PickersLayout/PickersLayout.js +6 -0
  88. package/PickersLayout/PickersLayout.types.d.ts +13 -6
  89. package/PickersLayout/usePickerLayout.d.ts +2 -1
  90. package/PickersSectionList/PickersSectionList.d.ts +4 -4
  91. package/PickersSectionList/PickersSectionList.js +1 -2
  92. package/PickersTextField/PickersFilledInput/PickersFilledInput.js +3 -3
  93. package/PickersTextField/PickersInput/PickersInput.js +3 -3
  94. package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +1 -1
  95. package/PickersTextField/PickersInputBase/PickersInputBase.js +11 -5
  96. package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +1 -0
  97. package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +3 -3
  98. package/PickersTextField/PickersTextField.d.ts +1 -1
  99. package/PickersTextField/PickersTextField.js +9 -5
  100. package/StaticDatePicker/StaticDatePicker.d.ts +2 -1
  101. package/StaticDatePicker/StaticDatePicker.js +5 -6
  102. package/StaticDatePicker/StaticDatePicker.types.d.ts +4 -4
  103. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +2 -1
  104. package/StaticDateTimePicker/StaticDateTimePicker.js +9 -10
  105. package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +4 -4
  106. package/StaticTimePicker/StaticTimePicker.d.ts +2 -1
  107. package/StaticTimePicker/StaticTimePicker.js +5 -5
  108. package/StaticTimePicker/StaticTimePicker.types.d.ts +4 -4
  109. package/TimeClock/Clock.d.ts +3 -3
  110. package/TimeClock/ClockNumbers.d.ts +4 -4
  111. package/TimeClock/TimeClock.d.ts +2 -1
  112. package/TimeClock/TimeClock.js +5 -5
  113. package/TimeClock/TimeClock.types.d.ts +3 -3
  114. package/TimeField/TimeField.d.ts +2 -1
  115. package/TimeField/TimeField.js +16 -14
  116. package/TimeField/TimeField.types.d.ts +12 -15
  117. package/TimeField/index.d.ts +1 -1
  118. package/TimeField/useTimeField.d.ts +3 -2
  119. package/TimeField/useTimeField.js +1 -13
  120. package/TimePicker/TimePicker.d.ts +2 -1
  121. package/TimePicker/TimePicker.js +14 -13
  122. package/TimePicker/TimePicker.types.d.ts +5 -4
  123. package/TimePicker/TimePickerToolbar.d.ts +7 -5
  124. package/TimePicker/TimePickerToolbar.js +12 -4
  125. package/TimePicker/shared.d.ts +5 -5
  126. package/YearCalendar/YearCalendar.d.ts +2 -1
  127. package/YearCalendar/YearCalendar.js +5 -5
  128. package/YearCalendar/YearCalendar.types.d.ts +2 -2
  129. package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +3 -2
  130. package/dateViewRenderers/dateViewRenderers.d.ts +3 -3
  131. package/hooks/index.d.ts +1 -1
  132. package/hooks/useClearableField.d.ts +10 -2
  133. package/index.js +1 -1
  134. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +3 -0
  135. package/internals/components/PickersPopper.d.ts +3 -0
  136. package/internals/components/PickersPopper.js +1 -2
  137. package/internals/demo/DemoContainer.js +6 -5
  138. package/internals/hooks/date-helpers-hooks.d.ts +5 -5
  139. package/internals/hooks/defaultizedFieldProps.d.ts +19 -0
  140. package/internals/hooks/defaultizedFieldProps.js +43 -0
  141. package/internals/hooks/useClockReferenceDate.d.ts +3 -3
  142. package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +2 -1
  143. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +13 -5
  144. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +16 -15
  145. package/internals/hooks/useField/buildSectionsFromFormat.d.ts +16 -0
  146. package/internals/hooks/useField/buildSectionsFromFormat.js +251 -0
  147. package/internals/hooks/useField/index.d.ts +2 -2
  148. package/internals/hooks/useField/index.js +1 -1
  149. package/internals/hooks/useField/useField.d.ts +4 -4
  150. package/internals/hooks/useField/useField.js +82 -309
  151. package/internals/hooks/useField/useField.types.d.ts +96 -60
  152. package/internals/hooks/useField/useField.utils.d.ts +20 -20
  153. package/internals/hooks/useField/useField.utils.js +78 -228
  154. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +8 -7
  155. package/internals/hooks/useField/useFieldCharacterEditing.js +6 -6
  156. package/internals/hooks/useField/useFieldState.d.ts +13 -11
  157. package/internals/hooks/useField/useFieldState.js +45 -61
  158. package/internals/hooks/useField/useFieldV6TextField.d.ts +25 -0
  159. package/internals/hooks/useField/useFieldV6TextField.js +324 -0
  160. package/internals/hooks/useField/useFieldV7TextField.d.ts +2 -0
  161. package/internals/hooks/useField/useFieldV7TextField.js +402 -0
  162. package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +2 -1
  163. package/internals/hooks/useMobilePicker/useMobilePicker.js +13 -5
  164. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +14 -14
  165. package/internals/hooks/usePicker/usePicker.d.ts +2 -2
  166. package/internals/hooks/usePicker/usePicker.js +3 -3
  167. package/internals/hooks/usePicker/usePicker.types.d.ts +4 -4
  168. package/internals/hooks/usePicker/usePickerValue.d.ts +2 -2
  169. package/internals/hooks/usePicker/usePickerValue.js +2 -18
  170. package/internals/hooks/usePicker/usePickerValue.types.d.ts +6 -7
  171. package/internals/hooks/usePicker/usePickerViews.d.ts +6 -6
  172. package/internals/hooks/usePicker/usePickerViews.js +5 -6
  173. package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +2 -1
  174. package/internals/hooks/useStaticPicker/useStaticPicker.js +1 -0
  175. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +7 -6
  176. package/internals/hooks/useUtils.d.ts +6 -6
  177. package/internals/hooks/useValidation.d.ts +3 -2
  178. package/internals/hooks/useValueWithTimezone.d.ts +3 -3
  179. package/internals/hooks/useViews.d.ts +2 -1
  180. package/internals/index.d.ts +5 -4
  181. package/internals/index.js +2 -1
  182. package/internals/models/fields.d.ts +3 -5
  183. package/internals/models/helpers.d.ts +1 -0
  184. package/internals/models/props/basePickerProps.d.ts +5 -9
  185. package/internals/models/props/clock.d.ts +4 -4
  186. package/internals/models/props/tabs.d.ts +6 -0
  187. package/internals/models/props/toolbar.d.ts +3 -0
  188. package/internals/models/validation.d.ts +7 -7
  189. package/internals/utils/convertFieldResponseIntoMuiTextFieldProps.d.ts +1 -1
  190. package/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +21 -3
  191. package/internals/utils/date-time-utils.d.ts +5 -5
  192. package/internals/utils/date-utils.d.ts +12 -12
  193. package/internals/utils/fields.js +1 -1
  194. package/internals/utils/getDefaultReferenceDate.d.ts +3 -3
  195. package/internals/utils/time-utils.d.ts +6 -6
  196. package/internals/utils/validation/validateDate.d.ts +2 -2
  197. package/internals/utils/validation/validateDateTime.d.ts +2 -2
  198. package/internals/utils/validation/validateTime.d.ts +2 -2
  199. package/internals/utils/valueManagers.d.ts +2 -2
  200. package/internals/utils/valueManagers.js +5 -4
  201. package/locales/beBY.d.ts +15 -6
  202. package/locales/beBY.js +13 -0
  203. package/locales/caES.d.ts +15 -6
  204. package/locales/caES.js +13 -0
  205. package/locales/csCZ.d.ts +15 -6
  206. package/locales/csCZ.js +13 -0
  207. package/locales/daDK.d.ts +15 -6
  208. package/locales/daDK.js +13 -0
  209. package/locales/deDE.d.ts +15 -6
  210. package/locales/deDE.js +13 -0
  211. package/locales/elGR.d.ts +15 -6
  212. package/locales/elGR.js +13 -0
  213. package/locales/enUS.d.ts +15 -6
  214. package/locales/enUS.js +12 -1
  215. package/locales/esES.d.ts +15 -6
  216. package/locales/esES.js +13 -0
  217. package/locales/eu.d.ts +15 -6
  218. package/locales/eu.js +13 -0
  219. package/locales/faIR.d.ts +15 -6
  220. package/locales/faIR.js +13 -0
  221. package/locales/fiFI.d.ts +15 -6
  222. package/locales/fiFI.js +13 -0
  223. package/locales/frFR.d.ts +15 -6
  224. package/locales/frFR.js +13 -0
  225. package/locales/heIL.d.ts +15 -6
  226. package/locales/heIL.js +13 -0
  227. package/locales/huHU.d.ts +15 -6
  228. package/locales/huHU.js +13 -0
  229. package/locales/isIS.d.ts +15 -6
  230. package/locales/isIS.js +13 -0
  231. package/locales/itIT.d.ts +15 -6
  232. package/locales/itIT.js +13 -0
  233. package/locales/jaJP.d.ts +15 -6
  234. package/locales/jaJP.js +13 -0
  235. package/locales/koKR.d.ts +15 -6
  236. package/locales/koKR.js +13 -0
  237. package/locales/kzKZ.d.ts +15 -6
  238. package/locales/kzKZ.js +13 -0
  239. package/locales/mk.d.ts +15 -6
  240. package/locales/mk.js +13 -0
  241. package/locales/nbNO.d.ts +15 -6
  242. package/locales/nbNO.js +13 -0
  243. package/locales/nlNL.d.ts +15 -6
  244. package/locales/nlNL.js +13 -0
  245. package/locales/plPL.d.ts +15 -6
  246. package/locales/plPL.js +13 -0
  247. package/locales/ptBR.d.ts +15 -6
  248. package/locales/ptBR.js +13 -0
  249. package/locales/roRO.d.ts +15 -6
  250. package/locales/roRO.js +13 -0
  251. package/locales/ruRU.d.ts +15 -6
  252. package/locales/ruRU.js +13 -0
  253. package/locales/skSK.d.ts +15 -6
  254. package/locales/skSK.js +13 -0
  255. package/locales/svSE.d.ts +15 -6
  256. package/locales/svSE.js +13 -0
  257. package/locales/trTR.d.ts +15 -6
  258. package/locales/trTR.js +13 -0
  259. package/locales/ukUA.d.ts +15 -6
  260. package/locales/ukUA.js +13 -0
  261. package/locales/urPK.d.ts +15 -6
  262. package/locales/urPK.js +13 -0
  263. package/locales/utils/getPickersLocalization.d.ts +15 -6
  264. package/locales/utils/pickersLocaleTextApi.d.ts +15 -6
  265. package/locales/viVN.d.ts +15 -6
  266. package/locales/viVN.js +13 -0
  267. package/locales/zhCN.d.ts +15 -6
  268. package/locales/zhCN.js +13 -0
  269. package/locales/zhHK.d.ts +15 -6
  270. package/locales/zhHK.js +13 -0
  271. package/models/adapters.d.ts +15 -1
  272. package/models/fields.d.ts +48 -32
  273. package/models/pickers.d.ts +3 -0
  274. package/modern/AdapterDateFnsBase/AdapterDateFnsBase.js +4 -0
  275. package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +4 -1
  276. package/modern/AdapterDayjs/AdapterDayjs.js +6 -1
  277. package/modern/AdapterLuxon/AdapterLuxon.js +7 -2
  278. package/modern/AdapterMoment/AdapterMoment.js +4 -1
  279. package/modern/AdapterMomentHijri/AdapterMomentHijri.js +3 -1
  280. package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -1
  281. package/modern/DateCalendar/DateCalendar.js +8 -6
  282. package/modern/DateCalendar/DayCalendar.js +1 -1
  283. package/modern/DateField/DateField.js +16 -14
  284. package/modern/DateField/useDateField.js +1 -14
  285. package/modern/DatePicker/DatePicker.js +14 -14
  286. package/modern/DatePicker/DatePickerToolbar.js +12 -4
  287. package/modern/DateTimeField/DateTimeField.js +20 -18
  288. package/modern/DateTimeField/useDateTimeField.js +1 -19
  289. package/modern/DateTimePicker/DateTimePicker.js +18 -18
  290. package/modern/DateTimePicker/DateTimePickerTabs.js +7 -1
  291. package/modern/DateTimePicker/DateTimePickerToolbar.js +4 -1
  292. package/modern/DesktopDatePicker/DesktopDatePicker.js +14 -14
  293. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  294. package/modern/DesktopTimePicker/DesktopTimePicker.js +14 -13
  295. package/modern/DigitalClock/DigitalClock.js +5 -5
  296. package/modern/LocalizationProvider/LocalizationProvider.js +1 -0
  297. package/modern/MobileDatePicker/MobileDatePicker.js +14 -14
  298. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  299. package/modern/MobileTimePicker/MobileTimePicker.js +14 -13
  300. package/modern/MonthCalendar/MonthCalendar.js +5 -5
  301. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +5 -5
  302. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
  303. package/modern/PickersDay/PickersDay.js +1 -1
  304. package/modern/PickersLayout/PickersLayout.js +6 -0
  305. package/modern/PickersSectionList/PickersSectionList.js +1 -2
  306. package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +3 -3
  307. package/modern/PickersTextField/PickersInput/PickersInput.js +3 -3
  308. package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +11 -5
  309. package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +3 -3
  310. package/modern/PickersTextField/PickersTextField.js +9 -5
  311. package/modern/StaticDatePicker/StaticDatePicker.js +5 -6
  312. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +9 -10
  313. package/modern/StaticTimePicker/StaticTimePicker.js +5 -5
  314. package/modern/TimeClock/TimeClock.js +5 -5
  315. package/modern/TimeField/TimeField.js +16 -14
  316. package/modern/TimeField/useTimeField.js +1 -12
  317. package/modern/TimePicker/TimePicker.js +14 -13
  318. package/modern/TimePicker/TimePickerToolbar.js +12 -4
  319. package/modern/YearCalendar/YearCalendar.js +5 -5
  320. package/modern/index.js +1 -1
  321. package/modern/internals/components/PickersPopper.js +1 -2
  322. package/modern/internals/demo/DemoContainer.js +6 -5
  323. package/modern/internals/hooks/defaultizedFieldProps.js +40 -0
  324. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +13 -5
  325. package/modern/internals/hooks/useField/buildSectionsFromFormat.js +251 -0
  326. package/modern/internals/hooks/useField/index.js +1 -1
  327. package/modern/internals/hooks/useField/useField.js +82 -303
  328. package/modern/internals/hooks/useField/useField.utils.js +78 -228
  329. package/modern/internals/hooks/useField/useFieldCharacterEditing.js +6 -6
  330. package/modern/internals/hooks/useField/useFieldState.js +45 -61
  331. package/modern/internals/hooks/useField/useFieldV6TextField.js +318 -0
  332. package/modern/internals/hooks/useField/useFieldV7TextField.js +400 -0
  333. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +13 -5
  334. package/modern/internals/hooks/usePicker/usePicker.js +3 -3
  335. package/modern/internals/hooks/usePicker/usePickerValue.js +2 -18
  336. package/modern/internals/hooks/usePicker/usePickerViews.js +4 -6
  337. package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +1 -0
  338. package/modern/internals/index.js +2 -1
  339. package/modern/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +21 -3
  340. package/modern/internals/utils/fields.js +1 -1
  341. package/modern/internals/utils/valueManagers.js +5 -4
  342. package/modern/locales/beBY.js +13 -0
  343. package/modern/locales/caES.js +13 -0
  344. package/modern/locales/csCZ.js +13 -0
  345. package/modern/locales/daDK.js +13 -0
  346. package/modern/locales/deDE.js +13 -0
  347. package/modern/locales/elGR.js +13 -0
  348. package/modern/locales/enUS.js +12 -1
  349. package/modern/locales/esES.js +13 -0
  350. package/modern/locales/eu.js +13 -0
  351. package/modern/locales/faIR.js +13 -0
  352. package/modern/locales/fiFI.js +13 -0
  353. package/modern/locales/frFR.js +13 -0
  354. package/modern/locales/heIL.js +13 -0
  355. package/modern/locales/huHU.js +13 -0
  356. package/modern/locales/isIS.js +13 -0
  357. package/modern/locales/itIT.js +13 -0
  358. package/modern/locales/jaJP.js +13 -0
  359. package/modern/locales/koKR.js +13 -0
  360. package/modern/locales/kzKZ.js +13 -0
  361. package/modern/locales/mk.js +13 -0
  362. package/modern/locales/nbNO.js +13 -0
  363. package/modern/locales/nlNL.js +13 -0
  364. package/modern/locales/plPL.js +13 -0
  365. package/modern/locales/ptBR.js +13 -0
  366. package/modern/locales/roRO.js +13 -0
  367. package/modern/locales/ruRU.js +13 -0
  368. package/modern/locales/skSK.js +13 -0
  369. package/modern/locales/svSE.js +13 -0
  370. package/modern/locales/trTR.js +13 -0
  371. package/modern/locales/ukUA.js +13 -0
  372. package/modern/locales/urPK.js +13 -0
  373. package/modern/locales/viVN.js +13 -0
  374. package/modern/locales/zhCN.js +13 -0
  375. package/modern/locales/zhHK.js +13 -0
  376. package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +4 -0
  377. package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +4 -1
  378. package/node/AdapterDayjs/AdapterDayjs.js +6 -1
  379. package/node/AdapterLuxon/AdapterLuxon.js +7 -2
  380. package/node/AdapterMoment/AdapterMoment.js +4 -1
  381. package/node/AdapterMomentHijri/AdapterMomentHijri.js +3 -1
  382. package/node/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -1
  383. package/node/DateCalendar/DateCalendar.js +8 -6
  384. package/node/DateCalendar/DayCalendar.js +1 -1
  385. package/node/DateField/DateField.js +16 -14
  386. package/node/DateField/useDateField.js +2 -16
  387. package/node/DatePicker/DatePicker.js +14 -14
  388. package/node/DatePicker/DatePickerToolbar.js +12 -4
  389. package/node/DateTimeField/DateTimeField.js +20 -18
  390. package/node/DateTimeField/useDateTimeField.js +2 -21
  391. package/node/DateTimePicker/DateTimePicker.js +18 -18
  392. package/node/DateTimePicker/DateTimePickerTabs.js +7 -1
  393. package/node/DateTimePicker/DateTimePickerToolbar.js +4 -1
  394. package/node/DesktopDatePicker/DesktopDatePicker.js +14 -14
  395. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  396. package/node/DesktopTimePicker/DesktopTimePicker.js +14 -13
  397. package/node/DigitalClock/DigitalClock.js +5 -5
  398. package/node/LocalizationProvider/LocalizationProvider.js +1 -0
  399. package/node/MobileDatePicker/MobileDatePicker.js +14 -14
  400. package/node/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  401. package/node/MobileTimePicker/MobileTimePicker.js +14 -13
  402. package/node/MonthCalendar/MonthCalendar.js +5 -5
  403. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +5 -5
  404. package/node/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
  405. package/node/PickersDay/PickersDay.js +1 -1
  406. package/node/PickersLayout/PickersLayout.js +6 -0
  407. package/node/PickersSectionList/PickersSectionList.js +4 -5
  408. package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +3 -3
  409. package/node/PickersTextField/PickersInput/PickersInput.js +3 -3
  410. package/node/PickersTextField/PickersInputBase/PickersInputBase.js +11 -5
  411. package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +3 -3
  412. package/node/PickersTextField/PickersTextField.js +9 -5
  413. package/node/StaticDatePicker/StaticDatePicker.js +5 -6
  414. package/node/StaticDateTimePicker/StaticDateTimePicker.js +9 -10
  415. package/node/StaticTimePicker/StaticTimePicker.js +5 -5
  416. package/node/TimeClock/TimeClock.js +5 -5
  417. package/node/TimeField/TimeField.js +16 -14
  418. package/node/TimeField/useTimeField.js +2 -14
  419. package/node/TimePicker/TimePicker.js +14 -13
  420. package/node/TimePicker/TimePickerToolbar.js +12 -4
  421. package/node/YearCalendar/YearCalendar.js +5 -5
  422. package/node/index.js +1 -1
  423. package/node/internals/components/PickersPopper.js +1 -2
  424. package/node/internals/demo/DemoContainer.js +6 -5
  425. package/node/internals/hooks/defaultizedFieldProps.js +50 -0
  426. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +13 -5
  427. package/node/internals/hooks/useField/buildSectionsFromFormat.js +259 -0
  428. package/node/internals/hooks/useField/index.js +4 -10
  429. package/node/internals/hooks/useField/useField.js +81 -302
  430. package/node/internals/hooks/useField/useField.utils.js +86 -236
  431. package/node/internals/hooks/useField/useFieldCharacterEditing.js +6 -6
  432. package/node/internals/hooks/useField/useFieldState.js +44 -60
  433. package/node/internals/hooks/useField/useFieldV6TextField.js +329 -0
  434. package/node/internals/hooks/useField/useFieldV7TextField.js +410 -0
  435. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +13 -5
  436. package/node/internals/hooks/usePicker/usePicker.js +3 -3
  437. package/node/internals/hooks/usePicker/usePickerValue.js +2 -18
  438. package/node/internals/hooks/usePicker/usePickerViews.js +4 -6
  439. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +1 -0
  440. package/node/internals/index.js +27 -8
  441. package/node/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +21 -3
  442. package/node/internals/utils/fields.js +1 -1
  443. package/node/internals/utils/valueManagers.js +4 -3
  444. package/node/locales/beBY.js +13 -0
  445. package/node/locales/caES.js +13 -0
  446. package/node/locales/csCZ.js +13 -0
  447. package/node/locales/daDK.js +13 -0
  448. package/node/locales/deDE.js +13 -0
  449. package/node/locales/elGR.js +13 -0
  450. package/node/locales/enUS.js +12 -1
  451. package/node/locales/esES.js +13 -0
  452. package/node/locales/eu.js +13 -0
  453. package/node/locales/faIR.js +13 -0
  454. package/node/locales/fiFI.js +13 -0
  455. package/node/locales/frFR.js +13 -0
  456. package/node/locales/heIL.js +13 -0
  457. package/node/locales/huHU.js +13 -0
  458. package/node/locales/isIS.js +13 -0
  459. package/node/locales/itIT.js +13 -0
  460. package/node/locales/jaJP.js +13 -0
  461. package/node/locales/koKR.js +13 -0
  462. package/node/locales/kzKZ.js +13 -0
  463. package/node/locales/mk.js +13 -0
  464. package/node/locales/nbNO.js +13 -0
  465. package/node/locales/nlNL.js +13 -0
  466. package/node/locales/plPL.js +13 -0
  467. package/node/locales/ptBR.js +13 -0
  468. package/node/locales/roRO.js +13 -0
  469. package/node/locales/ruRU.js +13 -0
  470. package/node/locales/skSK.js +13 -0
  471. package/node/locales/svSE.js +13 -0
  472. package/node/locales/trTR.js +13 -0
  473. package/node/locales/ukUA.js +13 -0
  474. package/node/locales/urPK.js +13 -0
  475. package/node/locales/viVN.js +13 -0
  476. package/node/locales/zhCN.js +13 -0
  477. package/node/locales/zhHK.js +13 -0
  478. package/package.json +4 -4
  479. package/themeAugmentation/props.d.ts +31 -31
  480. package/timeViewRenderers/timeViewRenderers.d.ts +4 -4
  481. package/legacy/AdapterDateFns/AdapterDateFns.js +0 -298
  482. package/legacy/AdapterDateFns/index.js +0 -1
  483. package/legacy/AdapterDateFnsBase/AdapterDateFnsBase.js +0 -293
  484. package/legacy/AdapterDateFnsBase/index.js +0 -1
  485. package/legacy/AdapterDateFnsJalali/AdapterDateFnsJalali.js +0 -548
  486. package/legacy/AdapterDateFnsJalali/index.js +0 -1
  487. package/legacy/AdapterDateFnsV3/AdapterDateFnsV3.js +0 -306
  488. package/legacy/AdapterDateFnsV3/index.js +0 -1
  489. package/legacy/AdapterDayjs/AdapterDayjs.js +0 -569
  490. package/legacy/AdapterDayjs/index.js +0 -1
  491. package/legacy/AdapterLuxon/AdapterLuxon.js +0 -509
  492. package/legacy/AdapterLuxon/index.js +0 -1
  493. package/legacy/AdapterMoment/AdapterMoment.js +0 -482
  494. package/legacy/AdapterMoment/index.js +0 -1
  495. package/legacy/AdapterMomentHijri/AdapterMomentHijri.js +0 -239
  496. package/legacy/AdapterMomentHijri/index.js +0 -1
  497. package/legacy/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -236
  498. package/legacy/AdapterMomentJalaali/index.js +0 -1
  499. package/legacy/DateCalendar/DateCalendar.js +0 -573
  500. package/legacy/DateCalendar/DateCalendar.types.js +0 -1
  501. package/legacy/DateCalendar/DayCalendar.js +0 -515
  502. package/legacy/DateCalendar/PickersFadeTransitionGroup.js +0 -58
  503. package/legacy/DateCalendar/PickersSlideTransition.js +0 -118
  504. package/legacy/DateCalendar/dateCalendarClasses.js +0 -5
  505. package/legacy/DateCalendar/dayCalendarClasses.js +0 -5
  506. package/legacy/DateCalendar/index.js +0 -5
  507. package/legacy/DateCalendar/pickersFadeTransitionGroupClasses.js +0 -5
  508. package/legacy/DateCalendar/pickersSlideTransitionClasses.js +0 -5
  509. package/legacy/DateCalendar/useCalendarState.js +0 -124
  510. package/legacy/DateCalendar/useIsDateDisabled.js +0 -30
  511. package/legacy/DateField/DateField.js +0 -319
  512. package/legacy/DateField/DateField.types.js +0 -1
  513. package/legacy/DateField/index.js +0 -2
  514. package/legacy/DateField/useDateField.js +0 -33
  515. package/legacy/DatePicker/DatePicker.js +0 -353
  516. package/legacy/DatePicker/DatePicker.types.js +0 -1
  517. package/legacy/DatePicker/DatePickerToolbar.js +0 -132
  518. package/legacy/DatePicker/datePickerToolbarClasses.js +0 -5
  519. package/legacy/DatePicker/index.js +0 -3
  520. package/legacy/DatePicker/shared.js +0 -41
  521. package/legacy/DateTimeField/DateTimeField.js +0 -360
  522. package/legacy/DateTimeField/DateTimeField.types.js +0 -1
  523. package/legacy/DateTimeField/index.js +0 -2
  524. package/legacy/DateTimeField/useDateTimeField.js +0 -38
  525. package/legacy/DateTimePicker/DateTimePicker.js +0 -424
  526. package/legacy/DateTimePicker/DateTimePicker.types.js +0 -1
  527. package/legacy/DateTimePicker/DateTimePickerTabs.js +0 -142
  528. package/legacy/DateTimePicker/DateTimePickerToolbar.js +0 -385
  529. package/legacy/DateTimePicker/dateTimePickerTabsClasses.js +0 -5
  530. package/legacy/DateTimePicker/dateTimePickerToolbarClasses.js +0 -5
  531. package/legacy/DateTimePicker/index.js +0 -5
  532. package/legacy/DateTimePicker/shared.js +0 -56
  533. package/legacy/DayCalendarSkeleton/DayCalendarSkeleton.js +0 -119
  534. package/legacy/DayCalendarSkeleton/dayCalendarSkeletonClasses.js +0 -5
  535. package/legacy/DayCalendarSkeleton/index.js +0 -2
  536. package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -372
  537. package/legacy/DesktopDatePicker/DesktopDatePicker.types.js +0 -1
  538. package/legacy/DesktopDatePicker/index.js +0 -1
  539. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -480
  540. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -1
  541. package/legacy/DesktopDateTimePicker/index.js +0 -1
  542. package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -355
  543. package/legacy/DesktopTimePicker/DesktopTimePicker.types.js +0 -1
  544. package/legacy/DesktopTimePicker/index.js +0 -1
  545. package/legacy/DigitalClock/DigitalClock.js +0 -443
  546. package/legacy/DigitalClock/DigitalClock.types.js +0 -1
  547. package/legacy/DigitalClock/digitalClockClasses.js +0 -6
  548. package/legacy/DigitalClock/index.js +0 -2
  549. package/legacy/LocalizationProvider/LocalizationProvider.js +0 -140
  550. package/legacy/LocalizationProvider/index.js +0 -1
  551. package/legacy/MobileDatePicker/MobileDatePicker.js +0 -369
  552. package/legacy/MobileDatePicker/MobileDatePicker.types.js +0 -1
  553. package/legacy/MobileDatePicker/index.js +0 -1
  554. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -428
  555. package/legacy/MobileDateTimePicker/MobileDateTimePicker.types.js +0 -1
  556. package/legacy/MobileDateTimePicker/index.js +0 -1
  557. package/legacy/MobileTimePicker/MobileTimePicker.js +0 -311
  558. package/legacy/MobileTimePicker/MobileTimePicker.types.js +0 -1
  559. package/legacy/MobileTimePicker/index.js +0 -1
  560. package/legacy/MonthCalendar/MonthCalendar.js +0 -338
  561. package/legacy/MonthCalendar/MonthCalendar.types.js +0 -1
  562. package/legacy/MonthCalendar/PickersMonth.js +0 -135
  563. package/legacy/MonthCalendar/index.js +0 -3
  564. package/legacy/MonthCalendar/monthCalendarClasses.js +0 -5
  565. package/legacy/MonthCalendar/pickersMonthClasses.js +0 -5
  566. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +0 -521
  567. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.types.js +0 -1
  568. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +0 -76
  569. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +0 -173
  570. package/legacy/MultiSectionDigitalClock/index.js +0 -3
  571. package/legacy/MultiSectionDigitalClock/multiSectionDigitalClockClasses.js +0 -6
  572. package/legacy/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +0 -6
  573. package/legacy/PickersActionBar/PickersActionBar.js +0 -86
  574. package/legacy/PickersActionBar/index.js +0 -1
  575. package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +0 -284
  576. package/legacy/PickersCalendarHeader/PickersCalendarHeader.types.js +0 -1
  577. package/legacy/PickersCalendarHeader/index.js +0 -2
  578. package/legacy/PickersCalendarHeader/pickersCalendarHeaderClasses.js +0 -5
  579. package/legacy/PickersDay/PickersDay.js +0 -367
  580. package/legacy/PickersDay/index.js +0 -2
  581. package/legacy/PickersDay/pickersDayClasses.js +0 -5
  582. package/legacy/PickersLayout/PickersLayout.js +0 -159
  583. package/legacy/PickersLayout/PickersLayout.types.js +0 -1
  584. package/legacy/PickersLayout/index.js +0 -3
  585. package/legacy/PickersLayout/pickersLayoutClasses.js +0 -6
  586. package/legacy/PickersLayout/usePickerLayout.js +0 -134
  587. package/legacy/PickersSectionList/PickersSectionList.js +0 -235
  588. package/legacy/PickersSectionList/PickersSectionList.types.js +0 -1
  589. package/legacy/PickersSectionList/index.js +0 -2
  590. package/legacy/PickersSectionList/pickersSectionListClasses.js +0 -6
  591. package/legacy/PickersShortcuts/PickersShortcuts.js +0 -110
  592. package/legacy/PickersShortcuts/index.js +0 -1
  593. package/legacy/PickersTextField/PickersFilledInput/PickersFilledInput.js +0 -234
  594. package/legacy/PickersTextField/PickersFilledInput/index.js +0 -2
  595. package/legacy/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +0 -8
  596. package/legacy/PickersTextField/PickersInput/PickersInput.js +0 -190
  597. package/legacy/PickersTextField/PickersInput/index.js +0 -2
  598. package/legacy/PickersTextField/PickersInput/pickersInputClasses.js +0 -8
  599. package/legacy/PickersTextField/PickersInputBase/PickersInputBase.js +0 -340
  600. package/legacy/PickersTextField/PickersInputBase/PickersInputBase.types.js +0 -1
  601. package/legacy/PickersTextField/PickersInputBase/index.js +0 -2
  602. package/legacy/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +0 -6
  603. package/legacy/PickersTextField/PickersOutlinedInput/Outline.js +0 -121
  604. package/legacy/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +0 -183
  605. package/legacy/PickersTextField/PickersOutlinedInput/index.js +0 -2
  606. package/legacy/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +0 -8
  607. package/legacy/PickersTextField/PickersTextField.js +0 -258
  608. package/legacy/PickersTextField/PickersTextField.types.js +0 -1
  609. package/legacy/PickersTextField/index.js +0 -6
  610. package/legacy/PickersTextField/pickersTextFieldClasses.js +0 -6
  611. package/legacy/StaticDatePicker/StaticDatePicker.js +0 -297
  612. package/legacy/StaticDatePicker/StaticDatePicker.types.js +0 -1
  613. package/legacy/StaticDatePicker/index.js +0 -1
  614. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -356
  615. package/legacy/StaticDateTimePicker/StaticDateTimePicker.types.js +0 -1
  616. package/legacy/StaticDateTimePicker/index.js +0 -1
  617. package/legacy/StaticTimePicker/StaticTimePicker.js +0 -238
  618. package/legacy/StaticTimePicker/StaticTimePicker.types.js +0 -1
  619. package/legacy/StaticTimePicker/index.js +0 -1
  620. package/legacy/TimeClock/Clock.js +0 -358
  621. package/legacy/TimeClock/ClockNumber.js +0 -87
  622. package/legacy/TimeClock/ClockNumbers.js +0 -73
  623. package/legacy/TimeClock/ClockPointer.js +0 -106
  624. package/legacy/TimeClock/TimeClock.js +0 -481
  625. package/legacy/TimeClock/TimeClock.types.js +0 -1
  626. package/legacy/TimeClock/clockClasses.js +0 -5
  627. package/legacy/TimeClock/clockNumberClasses.js +0 -5
  628. package/legacy/TimeClock/clockPointerClasses.js +0 -5
  629. package/legacy/TimeClock/index.js +0 -5
  630. package/legacy/TimeClock/shared.js +0 -53
  631. package/legacy/TimeClock/timeClockClasses.js +0 -5
  632. package/legacy/TimeField/TimeField.js +0 -320
  633. package/legacy/TimeField/TimeField.types.js +0 -1
  634. package/legacy/TimeField/index.js +0 -2
  635. package/legacy/TimeField/useTimeField.js +0 -31
  636. package/legacy/TimePicker/TimePicker.js +0 -314
  637. package/legacy/TimePicker/TimePicker.types.js +0 -1
  638. package/legacy/TimePicker/TimePickerToolbar.js +0 -260
  639. package/legacy/TimePicker/index.js +0 -3
  640. package/legacy/TimePicker/shared.js +0 -45
  641. package/legacy/TimePicker/timePickerToolbarClasses.js +0 -5
  642. package/legacy/YearCalendar/PickersYear.js +0 -137
  643. package/legacy/YearCalendar/YearCalendar.js +0 -362
  644. package/legacy/YearCalendar/YearCalendar.types.js +0 -1
  645. package/legacy/YearCalendar/index.js +0 -3
  646. package/legacy/YearCalendar/pickersYearClasses.js +0 -5
  647. package/legacy/YearCalendar/yearCalendarClasses.js +0 -5
  648. package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +0 -162
  649. package/legacy/dateTimeViewRenderers/index.js +0 -1
  650. package/legacy/dateViewRenderers/dateViewRenderers.js +0 -82
  651. package/legacy/dateViewRenderers/index.js +0 -1
  652. package/legacy/hooks/index.js +0 -1
  653. package/legacy/hooks/useClearableField.js +0 -76
  654. package/legacy/icons/index.js +0 -68
  655. package/legacy/index.js +0 -59
  656. package/legacy/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.js +0 -5
  657. package/legacy/internals/components/DateTimeViewWrapper/index.js +0 -1
  658. package/legacy/internals/components/PickerViewRoot/PickerViewRoot.js +0 -10
  659. package/legacy/internals/components/PickerViewRoot/index.js +0 -1
  660. package/legacy/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +0 -170
  661. package/legacy/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.js +0 -1
  662. package/legacy/internals/components/PickersArrowSwitcher/index.js +0 -2
  663. package/legacy/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js +0 -5
  664. package/legacy/internals/components/PickersModalDialog.js +0 -42
  665. package/legacy/internals/components/PickersPopper.js +0 -325
  666. package/legacy/internals/components/PickersToolbar.js +0 -92
  667. package/legacy/internals/components/PickersToolbarButton.js +0 -61
  668. package/legacy/internals/components/PickersToolbarText.js +0 -52
  669. package/legacy/internals/components/pickersPopperClasses.js +0 -5
  670. package/legacy/internals/components/pickersToolbarButtonClasses.js +0 -5
  671. package/legacy/internals/components/pickersToolbarClasses.js +0 -5
  672. package/legacy/internals/components/pickersToolbarTextClasses.js +0 -5
  673. package/legacy/internals/constants/dimensions.js +0 -7
  674. package/legacy/internals/demo/DemoContainer.js +0 -163
  675. package/legacy/internals/demo/index.js +0 -1
  676. package/legacy/internals/hooks/date-helpers-hooks.js +0 -37
  677. package/legacy/internals/hooks/useClockReferenceDate.js +0 -28
  678. package/legacy/internals/hooks/useDefaultReduceAnimations.js +0 -14
  679. package/legacy/internals/hooks/useDesktopPicker/index.js +0 -1
  680. package/legacy/internals/hooks/useDesktopPicker/useDesktopPicker.js +0 -174
  681. package/legacy/internals/hooks/useDesktopPicker/useDesktopPicker.types.js +0 -1
  682. package/legacy/internals/hooks/useField/index.js +0 -2
  683. package/legacy/internals/hooks/useField/useField.js +0 -470
  684. package/legacy/internals/hooks/useField/useField.types.js +0 -1
  685. package/legacy/internals/hooks/useField/useField.utils.js +0 -828
  686. package/legacy/internals/hooks/useField/useFieldCharacterEditing.js +0 -277
  687. package/legacy/internals/hooks/useField/useFieldState.js +0 -321
  688. package/legacy/internals/hooks/useIsLandscape.js +0 -39
  689. package/legacy/internals/hooks/useMobilePicker/index.js +0 -1
  690. package/legacy/internals/hooks/useMobilePicker/useMobilePicker.js +0 -126
  691. package/legacy/internals/hooks/useMobilePicker/useMobilePicker.types.js +0 -1
  692. package/legacy/internals/hooks/useOpenState.js +0 -38
  693. package/legacy/internals/hooks/usePicker/index.js +0 -1
  694. package/legacy/internals/hooks/usePicker/usePicker.js +0 -54
  695. package/legacy/internals/hooks/usePicker/usePicker.types.js +0 -1
  696. package/legacy/internals/hooks/usePicker/usePickerLayoutProps.js +0 -28
  697. package/legacy/internals/hooks/usePicker/usePickerValue.js +0 -365
  698. package/legacy/internals/hooks/usePicker/usePickerValue.types.js +0 -1
  699. package/legacy/internals/hooks/usePicker/usePickerViews.js +0 -172
  700. package/legacy/internals/hooks/useStaticPicker/index.js +0 -1
  701. package/legacy/internals/hooks/useStaticPicker/useStaticPicker.js +0 -66
  702. package/legacy/internals/hooks/useStaticPicker/useStaticPicker.types.js +0 -1
  703. package/legacy/internals/hooks/useUtils.js +0 -38
  704. package/legacy/internals/hooks/useValidation.js +0 -20
  705. package/legacy/internals/hooks/useValueWithTimezone.js +0 -81
  706. package/legacy/internals/hooks/useViews.js +0 -124
  707. package/legacy/internals/index.js +0 -35
  708. package/legacy/internals/models/common.js +0 -1
  709. package/legacy/internals/models/fields.js +0 -1
  710. package/legacy/internals/models/helpers.js +0 -1
  711. package/legacy/internals/models/index.js +0 -2
  712. package/legacy/internals/models/props/basePickerProps.js +0 -1
  713. package/legacy/internals/models/props/clock.js +0 -1
  714. package/legacy/internals/models/props/tabs.js +0 -1
  715. package/legacy/internals/models/props/toolbar.js +0 -1
  716. package/legacy/internals/models/validation.js +0 -1
  717. package/legacy/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +0 -24
  718. package/legacy/internals/utils/date-time-utils.js +0 -71
  719. package/legacy/internals/utils/date-utils.js +0 -129
  720. package/legacy/internals/utils/fields.js +0 -28
  721. package/legacy/internals/utils/getDefaultReferenceDate.js +0 -65
  722. package/legacy/internals/utils/time-utils.js +0 -63
  723. package/legacy/internals/utils/utils.js +0 -40
  724. package/legacy/internals/utils/validation/extractValidationProps.js +0 -16
  725. package/legacy/internals/utils/validation/validateDate.js +0 -38
  726. package/legacy/internals/utils/validation/validateDateTime.js +0 -20
  727. package/legacy/internals/utils/validation/validateTime.js +0 -42
  728. package/legacy/internals/utils/valueManagers.js +0 -67
  729. package/legacy/internals/utils/views.js +0 -29
  730. package/legacy/internals/utils/warning.js +0 -39
  731. package/legacy/locales/beBY.js +0 -99
  732. package/legacy/locales/caES.js +0 -100
  733. package/legacy/locales/csCZ.js +0 -100
  734. package/legacy/locales/daDK.js +0 -102
  735. package/legacy/locales/deDE.js +0 -101
  736. package/legacy/locales/elGR.js +0 -100
  737. package/legacy/locales/enUS.js +0 -96
  738. package/legacy/locales/esES.js +0 -99
  739. package/legacy/locales/eu.js +0 -99
  740. package/legacy/locales/faIR.js +0 -100
  741. package/legacy/locales/fiFI.js +0 -100
  742. package/legacy/locales/frFR.js +0 -98
  743. package/legacy/locales/heIL.js +0 -100
  744. package/legacy/locales/huHU.js +0 -99
  745. package/legacy/locales/index.js +0 -35
  746. package/legacy/locales/isIS.js +0 -100
  747. package/legacy/locales/itIT.js +0 -98
  748. package/legacy/locales/jaJP.js +0 -102
  749. package/legacy/locales/koKR.js +0 -98
  750. package/legacy/locales/kzKZ.js +0 -99
  751. package/legacy/locales/mk.js +0 -96
  752. package/legacy/locales/nbNO.js +0 -100
  753. package/legacy/locales/nlNL.js +0 -100
  754. package/legacy/locales/plPL.js +0 -85
  755. package/legacy/locales/ptBR.js +0 -100
  756. package/legacy/locales/roRO.js +0 -99
  757. package/legacy/locales/ruRU.js +0 -98
  758. package/legacy/locales/skSK.js +0 -100
  759. package/legacy/locales/svSE.js +0 -85
  760. package/legacy/locales/trTR.js +0 -100
  761. package/legacy/locales/ukUA.js +0 -100
  762. package/legacy/locales/urPK.js +0 -85
  763. package/legacy/locales/utils/getPickersLocalization.js +0 -12
  764. package/legacy/locales/utils/pickersLocaleTextApi.js +0 -1
  765. package/legacy/locales/viVN.js +0 -100
  766. package/legacy/locales/zhCN.js +0 -100
  767. package/legacy/locales/zhHK.js +0 -100
  768. package/legacy/models/adapters.js +0 -1
  769. package/legacy/models/common.js +0 -1
  770. package/legacy/models/fields.js +0 -1
  771. package/legacy/models/index.js +0 -7
  772. package/legacy/models/pickers.js +0 -1
  773. package/legacy/models/timezone.js +0 -1
  774. package/legacy/models/validation.js +0 -1
  775. package/legacy/models/views.js +0 -1
  776. package/legacy/themeAugmentation/index.js +0 -3
  777. package/legacy/timeViewRenderers/index.js +0 -1
  778. package/legacy/timeViewRenderers/timeViewRenderers.js +0 -186
@@ -66,5 +66,18 @@ const ukUAPickers = {
66
66
  fieldMinutesPlaceholder: () => 'mm',
67
67
  fieldSecondsPlaceholder: () => 'ss',
68
68
  fieldMeridiemPlaceholder: () => 'aa'
69
+
70
+ // View names
71
+ // year: 'Year',
72
+ // month: 'Month',
73
+ // day: 'Day',
74
+ // weekDay: 'Week day',
75
+ // hours: 'Hours',
76
+ // minutes: 'Minutes',
77
+ // seconds: 'Seconds',
78
+ // meridiem: 'Meridiem',
79
+
80
+ // Common
81
+ // empty: 'Empty',
69
82
  };
70
83
  const ukUA = exports.ukUA = (0, _getPickersLocalization.getPickersLocalization)(ukUAPickers);
@@ -67,5 +67,18 @@ const urPKPickers = {
67
67
  // fieldMinutesPlaceholder: () => 'mm',
68
68
  // fieldSecondsPlaceholder: () => 'ss',
69
69
  // fieldMeridiemPlaceholder: () => 'aa',
70
+
71
+ // View names
72
+ // year: 'Year',
73
+ // month: 'Month',
74
+ // day: 'Day',
75
+ // weekDay: 'Week day',
76
+ // hours: 'Hours',
77
+ // minutes: 'Minutes',
78
+ // seconds: 'Seconds',
79
+ // meridiem: 'Meridiem',
80
+
81
+ // Common
82
+ // empty: 'Empty',
70
83
  };
71
84
  const urPK = exports.urPK = (0, _getPickersLocalization.getPickersLocalization)(urPKPickers);
@@ -66,5 +66,18 @@ const viVNPickers = {
66
66
  fieldMinutesPlaceholder: () => 'mm',
67
67
  fieldSecondsPlaceholder: () => 'ss',
68
68
  fieldMeridiemPlaceholder: () => 'aa'
69
+
70
+ // View names
71
+ // year: 'Year',
72
+ // month: 'Month',
73
+ // day: 'Day',
74
+ // weekDay: 'Week day',
75
+ // hours: 'Hours',
76
+ // minutes: 'Minutes',
77
+ // seconds: 'Seconds',
78
+ // meridiem: 'Meridiem',
79
+
80
+ // Common
81
+ // empty: 'Empty',
69
82
  };
70
83
  const viVN = exports.viVN = (0, _getPickersLocalization.getPickersLocalization)(viVNPickers);
@@ -66,5 +66,18 @@ const zhCNPickers = {
66
66
  fieldMinutesPlaceholder: () => 'mm',
67
67
  fieldSecondsPlaceholder: () => 'ss',
68
68
  fieldMeridiemPlaceholder: () => 'aa'
69
+
70
+ // View names
71
+ // year: 'Year',
72
+ // month: 'Month',
73
+ // day: 'Day',
74
+ // weekDay: 'Week day',
75
+ // hours: 'Hours',
76
+ // minutes: 'Minutes',
77
+ // seconds: 'Seconds',
78
+ // meridiem: 'Meridiem',
79
+
80
+ // Common
81
+ // empty: 'Empty',
69
82
  };
70
83
  const zhCN = exports.zhCN = (0, _getPickersLocalization.getPickersLocalization)(zhCNPickers);
@@ -66,5 +66,18 @@ const zhHKPickers = {
66
66
  fieldMinutesPlaceholder: () => 'mm',
67
67
  fieldSecondsPlaceholder: () => 'ss',
68
68
  fieldMeridiemPlaceholder: () => 'aa'
69
+
70
+ // View names
71
+ // year: 'Year',
72
+ // month: 'Month',
73
+ // day: 'Day',
74
+ // weekDay: 'Week day',
75
+ // hours: 'Hours',
76
+ // minutes: 'Minutes',
77
+ // seconds: 'Seconds',
78
+ // meridiem: 'Meridiem',
79
+
80
+ // Common
81
+ // empty: 'Empty',
69
82
  };
70
83
  const zhHK = exports.zhHK = (0, _getPickersLocalization.getPickersLocalization)(zhHKPickers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "7.0.0-beta.1",
3
+ "version": "7.0.0-beta.4",
4
4
  "description": "The community edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -35,9 +35,9 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.23.9",
38
- "@mui/base": "^5.0.0-beta.34",
39
- "@mui/system": "^5.15.7",
40
- "@mui/utils": "^5.15.7",
38
+ "@mui/base": "^5.0.0-beta.36",
39
+ "@mui/system": "^5.15.9",
40
+ "@mui/utils": "^5.15.9",
41
41
  "@types/react-transition-group": "^4.4.10",
42
42
  "clsx": "^2.1.0",
43
43
  "prop-types": "^15.8.1",
@@ -17,7 +17,7 @@ import { PickerPopperProps } from '../internals/components/PickersPopper';
17
17
  import { PickersToolbarProps } from '../internals/components/PickersToolbar';
18
18
  import { PickersToolbarButtonProps } from '../internals/components/PickersToolbarButton';
19
19
  import { ExportedPickersToolbarTextProps } from '../internals/components/PickersToolbarText';
20
- import { DateOrTimeView } from '../models';
20
+ import { DateOrTimeView, PickerValidDate } from '../models';
21
21
 
22
22
  import { DatePickerProps, DatePickerToolbarProps } from '../DatePicker';
23
23
  import { DesktopDatePickerProps } from '../DesktopDatePicker';
@@ -55,25 +55,25 @@ import {
55
55
  import { PickersSectionListProps } from '../PickersSectionList';
56
56
 
57
57
  export interface PickersComponentsPropsList {
58
- MuiClock: ClockProps<unknown>;
58
+ MuiClock: ClockProps<PickerValidDate>;
59
59
  MuiClockNumber: ClockNumberProps;
60
60
  MuiClockPointer: ClockPointerProps;
61
- MuiDateCalendar: DateCalendarProps<unknown>;
62
- MuiDateField: DateFieldProps<unknown>;
63
- MuiDatePickerToolbar: DatePickerToolbarProps<unknown>;
64
- MuiDateTimeField: DateTimeFieldProps<unknown>;
61
+ MuiDateCalendar: DateCalendarProps<PickerValidDate>;
62
+ MuiDateField: DateFieldProps<PickerValidDate, any>;
63
+ MuiDatePickerToolbar: DatePickerToolbarProps<PickerValidDate>;
64
+ MuiDateTimeField: DateTimeFieldProps<PickerValidDate, any>;
65
65
  MuiDateTimePickerTabs: DateTimePickerTabsProps;
66
- MuiDateTimePickerToolbar: DateTimePickerToolbarProps<unknown>;
67
- MuiDayCalendar: DayCalendarProps<unknown>;
66
+ MuiDateTimePickerToolbar: DateTimePickerToolbarProps<PickerValidDate>;
67
+ MuiDayCalendar: DayCalendarProps<PickerValidDate>;
68
68
  MuiDayCalendarSkeleton: DayCalendarSkeletonProps;
69
- MuiDigitalClock: ExportedDigitalClockProps<unknown>;
70
- MuiLocalizationProvider: LocalizationProviderProps<unknown, unknown>;
71
- MuiMonthCalendar: MonthCalendarProps<unknown>;
72
- MuiMultiSectionDigitalClock: MultiSectionDigitalClockProps<unknown>;
69
+ MuiDigitalClock: ExportedDigitalClockProps<PickerValidDate>;
70
+ MuiLocalizationProvider: LocalizationProviderProps<PickerValidDate, unknown>;
71
+ MuiMonthCalendar: MonthCalendarProps<PickerValidDate>;
72
+ MuiMultiSectionDigitalClock: MultiSectionDigitalClockProps<PickerValidDate>;
73
73
  MuiMultiSectionDigitalClockSection: ExportedMultiSectionDigitalClockSectionProps;
74
74
  MuiPickersArrowSwitcher: ExportedPickersArrowSwitcherProps;
75
- MuiPickersCalendarHeader: ExportedPickersCalendarHeaderProps<unknown>;
76
- MuiPickersDay: PickersDayProps<unknown>;
75
+ MuiPickersCalendarHeader: ExportedPickersCalendarHeaderProps<PickerValidDate>;
76
+ MuiPickersDay: PickersDayProps<PickerValidDate>;
77
77
  MuiPickersFadeTransitionGroup: PickersFadeTransitionGroupProps;
78
78
  MuiPickersMonth: ExportedPickersMonthProps;
79
79
  MuiPickersPopper: PickerPopperProps;
@@ -81,30 +81,30 @@ export interface PickersComponentsPropsList {
81
81
  MuiPickersToolbar: PickersToolbarProps<unknown, DateOrTimeView>;
82
82
  MuiPickersToolbarButton: PickersToolbarButtonProps;
83
83
  MuiPickersToolbarText: ExportedPickersToolbarTextProps;
84
- MuiPickersLayout: PickersLayoutProps<unknown, unknown, DateOrTimeView>;
84
+ MuiPickersLayout: PickersLayoutProps<unknown, PickerValidDate, DateOrTimeView>;
85
85
  MuiPickersYear: ExportedPickersYearProps;
86
- MuiTimeClock: TimeClockProps<unknown>;
87
- MuiTimeField: TimeFieldProps<unknown>;
88
- MuiTimePickerToolbar: TimePickerToolbarProps<unknown>;
89
- MuiYearCalendar: YearCalendarProps<unknown>;
86
+ MuiTimeClock: TimeClockProps<PickerValidDate>;
87
+ MuiTimeField: TimeFieldProps<PickerValidDate, any>;
88
+ MuiTimePickerToolbar: TimePickerToolbarProps<PickerValidDate>;
89
+ MuiYearCalendar: YearCalendarProps<PickerValidDate>;
90
90
 
91
91
  // Date Pickers
92
- MuiDatePicker: DatePickerProps<unknown>;
93
- MuiDesktopDatePicker: DesktopDatePickerProps<unknown>;
94
- MuiMobileDatePicker: MobileDatePickerProps<unknown>;
95
- MuiStaticDatePicker: StaticDatePickerProps<unknown>;
92
+ MuiDatePicker: DatePickerProps<PickerValidDate>;
93
+ MuiDesktopDatePicker: DesktopDatePickerProps<PickerValidDate>;
94
+ MuiMobileDatePicker: MobileDatePickerProps<PickerValidDate>;
95
+ MuiStaticDatePicker: StaticDatePickerProps<PickerValidDate>;
96
96
 
97
97
  // Time Pickers
98
- MuiTimePicker: TimePickerProps<unknown>;
99
- MuiDesktopTimePicker: DesktopTimePickerProps<unknown>;
100
- MuiMobileTimePicker: MobileTimePickerProps<unknown>;
101
- MuiStaticTimePicker: StaticTimePickerProps<unknown>;
98
+ MuiTimePicker: TimePickerProps<PickerValidDate>;
99
+ MuiDesktopTimePicker: DesktopTimePickerProps<PickerValidDate>;
100
+ MuiMobileTimePicker: MobileTimePickerProps<PickerValidDate>;
101
+ MuiStaticTimePicker: StaticTimePickerProps<PickerValidDate>;
102
102
 
103
103
  // Date Time Pickers
104
- MuiDateTimePicker: DateTimePickerProps<unknown>;
105
- MuiDesktopDateTimePicker: DesktopDateTimePickerProps<unknown>;
106
- MuiMobileDateTimePicker: MobileDateTimePickerProps<unknown>;
107
- MuiStaticDateTimePicker: StaticDateTimePickerProps<unknown>;
104
+ MuiDateTimePicker: DateTimePickerProps<PickerValidDate>;
105
+ MuiDesktopDateTimePicker: DesktopDateTimePickerProps<PickerValidDate>;
106
+ MuiMobileDateTimePicker: MobileDateTimePickerProps<PickerValidDate>;
107
+ MuiStaticDateTimePicker: StaticDateTimePickerProps<PickerValidDate>;
108
108
 
109
109
  // V7 Picker's TextField
110
110
  MuiPickersTextField: PickersTextFieldProps;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { TimeClockProps } from '../TimeClock';
3
- import { TimeView } from '../models';
3
+ import { PickerValidDate, TimeView } from '../models';
4
4
  import { DigitalClockProps } from '../DigitalClock';
5
5
  import { BaseClockProps } from '../internals/models/props/clock';
6
6
  import { MultiSectionDigitalClockProps } from '../MultiSectionDigitalClock';
@@ -11,6 +11,6 @@ export type TimeViewRendererProps<TView extends TimeViewWithMeridiem, TComponent
11
11
  onViewChange?: (view: TView) => void;
12
12
  views: readonly TView[];
13
13
  };
14
- export declare const renderTimeViewClock: <TDate extends unknown>({ view, onViewChange, focusedView, onFocusedViewChange, views, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minTime, maxTime, shouldDisableTime, minutesStep, ampm, ampmInClock, slots, slotProps, readOnly, disabled, sx, autoFocus, showViewSwitcher, disableIgnoringDatePartForTimeValidation, timezone, }: TimeViewRendererProps<TimeView, TimeClockProps<TDate, TimeView>>) => React.JSX.Element;
15
- export declare const renderDigitalClockTimeView: <TDate extends unknown>({ view, onViewChange, focusedView, onFocusedViewChange, views, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minTime, maxTime, shouldDisableTime, minutesStep, ampm, slots, slotProps, readOnly, disabled, sx, autoFocus, disableIgnoringDatePartForTimeValidation, timeSteps, skipDisabled, timezone, }: TimeViewRendererProps<"hours", Omit<DigitalClockProps<TDate>, "timeStep"> & Pick<TimePickerProps<TDate>, "timeSteps">>) => React.JSX.Element;
16
- export declare const renderMultiSectionDigitalClockTimeView: <TDate extends unknown>({ view, onViewChange, focusedView, onFocusedViewChange, views, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minTime, maxTime, shouldDisableTime, minutesStep, ampm, slots, slotProps, readOnly, disabled, sx, autoFocus, disableIgnoringDatePartForTimeValidation, timeSteps, skipDisabled, timezone, }: TimeViewRendererProps<TimeViewWithMeridiem, MultiSectionDigitalClockProps<TDate>>) => React.JSX.Element;
14
+ export declare const renderTimeViewClock: <TDate extends PickerValidDate>({ view, onViewChange, focusedView, onFocusedViewChange, views, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minTime, maxTime, shouldDisableTime, minutesStep, ampm, ampmInClock, slots, slotProps, readOnly, disabled, sx, autoFocus, showViewSwitcher, disableIgnoringDatePartForTimeValidation, timezone, }: TimeViewRendererProps<TimeView, TimeClockProps<TDate, TimeView>>) => React.JSX.Element;
15
+ export declare const renderDigitalClockTimeView: <TDate extends PickerValidDate>({ view, onViewChange, focusedView, onFocusedViewChange, views, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minTime, maxTime, shouldDisableTime, minutesStep, ampm, slots, slotProps, readOnly, disabled, sx, autoFocus, disableIgnoringDatePartForTimeValidation, timeSteps, skipDisabled, timezone, }: TimeViewRendererProps<"hours", Omit<DigitalClockProps<TDate>, "timeStep"> & Pick<TimePickerProps<TDate, false>, "timeSteps">>) => React.JSX.Element;
16
+ export declare const renderMultiSectionDigitalClockTimeView: <TDate extends PickerValidDate>({ view, onViewChange, focusedView, onFocusedViewChange, views, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minTime, maxTime, shouldDisableTime, minutesStep, ampm, slots, slotProps, readOnly, disabled, sx, autoFocus, disableIgnoringDatePartForTimeValidation, timeSteps, skipDisabled, timezone, }: TimeViewRendererProps<TimeViewWithMeridiem, MultiSectionDigitalClockProps<TDate>>) => React.JSX.Element;
@@ -1,298 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
- import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
5
- import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- /* eslint-disable class-methods-use-this */
10
- import addDays from 'date-fns/addDays';
11
- import addSeconds from 'date-fns/addSeconds';
12
- import addMinutes from 'date-fns/addMinutes';
13
- import addHours from 'date-fns/addHours';
14
- import addWeeks from 'date-fns/addWeeks';
15
- import addMonths from 'date-fns/addMonths';
16
- import addYears from 'date-fns/addYears';
17
- import endOfDay from 'date-fns/endOfDay';
18
- import endOfWeek from 'date-fns/endOfWeek';
19
- import endOfYear from 'date-fns/endOfYear';
20
- import dateFnsFormat from 'date-fns/format';
21
- import getDate from 'date-fns/getDate';
22
- import getDaysInMonth from 'date-fns/getDaysInMonth';
23
- import getHours from 'date-fns/getHours';
24
- import getMinutes from 'date-fns/getMinutes';
25
- import getMonth from 'date-fns/getMonth';
26
- import getSeconds from 'date-fns/getSeconds';
27
- import getMilliseconds from 'date-fns/getMilliseconds';
28
- import getWeek from 'date-fns/getWeek';
29
- import getYear from 'date-fns/getYear';
30
- import isAfter from 'date-fns/isAfter';
31
- import isBefore from 'date-fns/isBefore';
32
- import isEqual from 'date-fns/isEqual';
33
- import isSameDay from 'date-fns/isSameDay';
34
- import isSameYear from 'date-fns/isSameYear';
35
- import isSameMonth from 'date-fns/isSameMonth';
36
- import isSameHour from 'date-fns/isSameHour';
37
- import isValid from 'date-fns/isValid';
38
- import dateFnsParse from 'date-fns/parse';
39
- import setDate from 'date-fns/setDate';
40
- import setHours from 'date-fns/setHours';
41
- import setMinutes from 'date-fns/setMinutes';
42
- import setMonth from 'date-fns/setMonth';
43
- import setSeconds from 'date-fns/setSeconds';
44
- import setMilliseconds from 'date-fns/setMilliseconds';
45
- import setYear from 'date-fns/setYear';
46
- import startOfDay from 'date-fns/startOfDay';
47
- import startOfMonth from 'date-fns/startOfMonth';
48
- import endOfMonth from 'date-fns/endOfMonth';
49
- import startOfWeek from 'date-fns/startOfWeek';
50
- import startOfYear from 'date-fns/startOfYear';
51
- import isWithinInterval from 'date-fns/isWithinInterval';
52
- import defaultLocale from 'date-fns/locale/en-US';
53
- // @ts-ignore
54
- import longFormatters from 'date-fns/_lib/format/longFormatters';
55
- import { AdapterDateFnsBase } from '../AdapterDateFnsBase';
56
- /**
57
- * Based on `@date-io/date-fns`
58
- *
59
- * MIT License
60
- *
61
- * Copyright (c) 2017 Dmitriy Kovalenko
62
- *
63
- * Permission is hereby granted, free of charge, to any person obtaining a copy
64
- * of this software and associated documentation files (the "Software"), to deal
65
- * in the Software without restriction, including without limitation the rights
66
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
67
- * copies of the Software, and to permit persons to whom the Software is
68
- * furnished to do so, subject to the following conditions:
69
- *
70
- * The above copyright notice and this permission notice shall be included in all
71
- * copies or substantial portions of the Software.
72
- *
73
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
75
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
76
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
77
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
78
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
79
- * SOFTWARE.
80
- */
81
- export var AdapterDateFns = /*#__PURE__*/function (_ref) {
82
- _inherits(AdapterDateFns, _ref);
83
- function AdapterDateFns() {
84
- var _this;
85
- var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
86
- locale = _ref2.locale,
87
- formats = _ref2.formats;
88
- _classCallCheck(this, AdapterDateFns);
89
- if (typeof addDays !== 'function') {
90
- throw new Error(['MUI: The `date-fns` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsV3` instead.'].join('\n'));
91
- }
92
- _this = _callSuper(this, AdapterDateFns, [{
93
- locale: locale != null ? locale : defaultLocale,
94
- formats: formats,
95
- longFormatters: longFormatters
96
- }]);
97
- _this.parse = function (value, format) {
98
- if (value === '') {
99
- return null;
100
- }
101
- return dateFnsParse(value, format, new Date(), {
102
- locale: _this.locale
103
- });
104
- };
105
- _this.isValid = function (value) {
106
- if (value == null) {
107
- return false;
108
- }
109
- return isValid(value);
110
- };
111
- _this.format = function (value, formatKey) {
112
- return _this.formatByString(value, _this.formats[formatKey]);
113
- };
114
- _this.formatByString = function (value, formatString) {
115
- return dateFnsFormat(value, formatString, {
116
- locale: _this.locale
117
- });
118
- };
119
- _this.isEqual = function (value, comparing) {
120
- if (value === null && comparing === null) {
121
- return true;
122
- }
123
- if (value === null || comparing === null) {
124
- return false;
125
- }
126
- return isEqual(value, comparing);
127
- };
128
- _this.isSameYear = function (value, comparing) {
129
- return isSameYear(value, comparing);
130
- };
131
- _this.isSameMonth = function (value, comparing) {
132
- return isSameMonth(value, comparing);
133
- };
134
- _this.isSameDay = function (value, comparing) {
135
- return isSameDay(value, comparing);
136
- };
137
- _this.isSameHour = function (value, comparing) {
138
- return isSameHour(value, comparing);
139
- };
140
- _this.isAfter = function (value, comparing) {
141
- return isAfter(value, comparing);
142
- };
143
- _this.isAfterYear = function (value, comparing) {
144
- return isAfter(value, endOfYear(comparing));
145
- };
146
- _this.isAfterDay = function (value, comparing) {
147
- return isAfter(value, endOfDay(comparing));
148
- };
149
- _this.isBefore = function (value, comparing) {
150
- return isBefore(value, comparing);
151
- };
152
- _this.isBeforeYear = function (value, comparing) {
153
- return isBefore(value, _this.startOfYear(comparing));
154
- };
155
- _this.isBeforeDay = function (value, comparing) {
156
- return isBefore(value, _this.startOfDay(comparing));
157
- };
158
- _this.isWithinRange = function (value, _ref3) {
159
- var _ref4 = _slicedToArray(_ref3, 2),
160
- start = _ref4[0],
161
- end = _ref4[1];
162
- return isWithinInterval(value, {
163
- start: start,
164
- end: end
165
- });
166
- };
167
- _this.startOfYear = function (value) {
168
- return startOfYear(value);
169
- };
170
- _this.startOfMonth = function (value) {
171
- return startOfMonth(value);
172
- };
173
- _this.startOfWeek = function (value) {
174
- return startOfWeek(value, {
175
- locale: _this.locale
176
- });
177
- };
178
- _this.startOfDay = function (value) {
179
- return startOfDay(value);
180
- };
181
- _this.endOfYear = function (value) {
182
- return endOfYear(value);
183
- };
184
- _this.endOfMonth = function (value) {
185
- return endOfMonth(value);
186
- };
187
- _this.endOfWeek = function (value) {
188
- return endOfWeek(value, {
189
- locale: _this.locale
190
- });
191
- };
192
- _this.endOfDay = function (value) {
193
- return endOfDay(value);
194
- };
195
- _this.addYears = function (value, amount) {
196
- return addYears(value, amount);
197
- };
198
- _this.addMonths = function (value, amount) {
199
- return addMonths(value, amount);
200
- };
201
- _this.addWeeks = function (value, amount) {
202
- return addWeeks(value, amount);
203
- };
204
- _this.addDays = function (value, amount) {
205
- return addDays(value, amount);
206
- };
207
- _this.addHours = function (value, amount) {
208
- return addHours(value, amount);
209
- };
210
- _this.addMinutes = function (value, amount) {
211
- return addMinutes(value, amount);
212
- };
213
- _this.addSeconds = function (value, amount) {
214
- return addSeconds(value, amount);
215
- };
216
- _this.getYear = function (value) {
217
- return getYear(value);
218
- };
219
- _this.getMonth = function (value) {
220
- return getMonth(value);
221
- };
222
- _this.getDate = function (value) {
223
- return getDate(value);
224
- };
225
- _this.getHours = function (value) {
226
- return getHours(value);
227
- };
228
- _this.getMinutes = function (value) {
229
- return getMinutes(value);
230
- };
231
- _this.getSeconds = function (value) {
232
- return getSeconds(value);
233
- };
234
- _this.getMilliseconds = function (value) {
235
- return getMilliseconds(value);
236
- };
237
- _this.setYear = function (value, year) {
238
- return setYear(value, year);
239
- };
240
- _this.setMonth = function (value, month) {
241
- return setMonth(value, month);
242
- };
243
- _this.setDate = function (value, date) {
244
- return setDate(value, date);
245
- };
246
- _this.setHours = function (value, hours) {
247
- return setHours(value, hours);
248
- };
249
- _this.setMinutes = function (value, minutes) {
250
- return setMinutes(value, minutes);
251
- };
252
- _this.setSeconds = function (value, seconds) {
253
- return setSeconds(value, seconds);
254
- };
255
- _this.setMilliseconds = function (value, milliseconds) {
256
- return setMilliseconds(value, milliseconds);
257
- };
258
- _this.getDaysInMonth = function (value) {
259
- return getDaysInMonth(value);
260
- };
261
- _this.getWeekArray = function (value) {
262
- var start = _this.startOfWeek(_this.startOfMonth(value));
263
- var end = _this.endOfWeek(_this.endOfMonth(value));
264
- var count = 0;
265
- var current = start;
266
- var nestedWeeks = [];
267
- while (_this.isBefore(current, end)) {
268
- var weekNumber = Math.floor(count / 7);
269
- nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
270
- nestedWeeks[weekNumber].push(current);
271
- current = _this.addDays(current, 1);
272
- count += 1;
273
- }
274
- return nestedWeeks;
275
- };
276
- _this.getWeekNumber = function (value) {
277
- return getWeek(value, {
278
- locale: _this.locale
279
- });
280
- };
281
- _this.getYearRange = function (_ref5) {
282
- var _ref6 = _slicedToArray(_ref5, 2),
283
- start = _ref6[0],
284
- end = _ref6[1];
285
- var startDate = _this.startOfYear(start);
286
- var endDate = _this.endOfYear(end);
287
- var years = [];
288
- var current = startDate;
289
- while (_this.isBefore(current, endDate)) {
290
- years.push(current);
291
- current = _this.addYears(current, 1);
292
- }
293
- return years;
294
- };
295
- return _this;
296
- }
297
- return _createClass(AdapterDateFns);
298
- }(AdapterDateFnsBase);
@@ -1 +0,0 @@
1
- export { AdapterDateFns } from './AdapterDateFns';