@mui/x-date-pickers-pro 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 (293) hide show
  1. package/CHANGELOG.md +437 -4
  2. package/DateRangeCalendar/DateRangeCalendar.d.ts +2 -1
  3. package/DateRangeCalendar/DateRangeCalendar.js +9 -7
  4. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +10 -7
  5. package/DateRangeCalendar/useDragRange.d.ts +4 -4
  6. package/DateRangePicker/DateRangePicker.d.ts +2 -1
  7. package/DateRangePicker/DateRangePicker.js +14 -14
  8. package/DateRangePicker/DateRangePicker.types.d.ts +5 -4
  9. package/DateRangePicker/DateRangePickerToolbar.d.ts +6 -2
  10. package/DateRangePicker/DateRangePickerToolbar.js +7 -1
  11. package/DateRangePicker/shared.d.ts +6 -5
  12. package/DateRangePickerDay/DateRangePickerDay.d.ts +3 -2
  13. package/DateRangePickerDay/DateRangePickerDay.js +2 -2
  14. package/DateTimeRangePicker/DateTimeRangePicker.d.ts +2 -1
  15. package/DateTimeRangePicker/DateTimeRangePicker.js +20 -21
  16. package/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +5 -4
  17. package/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  18. package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.d.ts +3 -2
  19. package/DateTimeRangePicker/DateTimeRangePickerToolbar.d.ts +6 -2
  20. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +7 -1
  21. package/DateTimeRangePicker/shared.d.ts +6 -5
  22. package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +2 -1
  23. package/DesktopDateRangePicker/DesktopDateRangePicker.js +14 -14
  24. package/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +5 -4
  25. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.d.ts +2 -1
  26. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -21
  27. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.d.ts +5 -4
  28. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.d.ts +2 -1
  29. package/MobileDateRangePicker/MobileDateRangePicker.d.ts +2 -1
  30. package/MobileDateRangePicker/MobileDateRangePicker.js +14 -14
  31. package/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +5 -4
  32. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.d.ts +2 -1
  33. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +20 -21
  34. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.d.ts +5 -4
  35. package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +2 -1
  36. package/MultiInputDateRangeField/MultiInputDateRangeField.js +22 -24
  37. package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +12 -14
  38. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +2 -1
  39. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +26 -28
  40. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +13 -16
  41. package/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +2 -1
  42. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +22 -24
  43. package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +13 -16
  44. package/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +3 -2
  45. package/SingleInputDateRangeField/SingleInputDateRangeField.js +17 -15
  46. package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +11 -13
  47. package/SingleInputDateRangeField/index.d.ts +1 -1
  48. package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +3 -3
  49. package/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -15
  50. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +3 -2
  51. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +21 -19
  52. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +12 -14
  53. package/SingleInputDateTimeRangeField/index.d.ts +1 -1
  54. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +3 -3
  55. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -20
  56. package/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +3 -2
  57. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +16 -14
  58. package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +12 -14
  59. package/SingleInputTimeRangeField/index.d.ts +1 -1
  60. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +3 -3
  61. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -14
  62. package/StaticDateRangePicker/StaticDateRangePicker.d.ts +2 -1
  63. package/StaticDateRangePicker/StaticDateRangePicker.js +5 -6
  64. package/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +4 -3
  65. package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +3 -2
  66. package/index.d.ts +7 -2
  67. package/index.js +8 -2
  68. package/internals/hooks/models/useRangePicker.d.ts +8 -7
  69. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +2 -1
  70. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +17 -8
  71. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +7 -6
  72. package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +15 -15
  73. package/internals/hooks/useEnrichedRangePickerFieldProps.js +37 -40
  74. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +2 -1
  75. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +18 -9
  76. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +7 -6
  77. package/internals/hooks/useMultiInputFieldSelectedSections.d.ts +21 -0
  78. package/internals/hooks/useMultiInputFieldSelectedSections.js +43 -0
  79. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +2 -1
  80. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -12
  81. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +3 -3
  82. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -31
  83. package/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +4 -4
  84. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +3 -3
  85. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -25
  86. package/internals/hooks/useRangePosition.d.ts +2 -4
  87. package/internals/hooks/useRangePosition.js +3 -6
  88. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +2 -1
  89. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  90. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +6 -6
  91. package/internals/models/dateRange.d.ts +5 -16
  92. package/internals/models/dateTimeRange.d.ts +5 -6
  93. package/internals/models/index.d.ts +0 -1
  94. package/internals/models/index.js +0 -1
  95. package/internals/models/timeRange.d.ts +4 -6
  96. package/internals/utils/date-fields-utils.d.ts +1 -5
  97. package/internals/utils/date-range-manager.d.ts +5 -5
  98. package/internals/utils/date-utils.d.ts +5 -5
  99. package/internals/utils/releaseInfo.js +1 -1
  100. package/internals/utils/validation/validateDateRange.d.ts +2 -2
  101. package/internals/utils/validation/validateDateTimeRange.d.ts +2 -2
  102. package/internals/utils/valueManagers.d.ts +3 -3
  103. package/internals/utils/valueManagers.js +11 -6
  104. package/models/fields.d.ts +69 -0
  105. package/models/index.d.ts +1 -0
  106. package/models/index.js +1 -0
  107. package/models/range.d.ts +3 -2
  108. package/modern/DateRangeCalendar/DateRangeCalendar.js +9 -7
  109. package/modern/DateRangePicker/DateRangePicker.js +14 -14
  110. package/modern/DateRangePicker/DateRangePickerToolbar.js +7 -1
  111. package/modern/DateRangePickerDay/DateRangePickerDay.js +2 -2
  112. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +20 -21
  113. package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  114. package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +7 -1
  115. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +14 -14
  116. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -21
  117. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +14 -14
  118. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +20 -21
  119. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +22 -24
  120. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +26 -28
  121. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +22 -24
  122. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +17 -15
  123. package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -14
  124. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +21 -19
  125. package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -19
  126. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +16 -14
  127. package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -13
  128. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +5 -6
  129. package/modern/index.js +8 -2
  130. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +17 -8
  131. package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +34 -37
  132. package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +18 -9
  133. package/modern/internals/hooks/useMultiInputFieldSelectedSections.js +40 -0
  134. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -12
  135. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -30
  136. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -24
  137. package/modern/internals/hooks/useRangePosition.js +3 -6
  138. package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  139. package/modern/internals/models/index.js +0 -1
  140. package/modern/internals/utils/releaseInfo.js +1 -1
  141. package/modern/internals/utils/valueManagers.js +11 -6
  142. package/modern/models/index.js +1 -0
  143. package/node/DateRangeCalendar/DateRangeCalendar.js +10 -8
  144. package/node/DateRangePicker/DateRangePicker.js +14 -14
  145. package/node/DateRangePicker/DateRangePickerToolbar.js +7 -1
  146. package/node/DateRangePickerDay/DateRangePickerDay.js +3 -3
  147. package/node/DateTimeRangePicker/DateTimeRangePicker.js +20 -21
  148. package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  149. package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +7 -1
  150. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +14 -14
  151. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -21
  152. package/node/MobileDateRangePicker/MobileDateRangePicker.js +14 -14
  153. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +22 -23
  154. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +22 -24
  155. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +26 -28
  156. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +22 -24
  157. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +17 -15
  158. package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -16
  159. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +24 -22
  160. package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -21
  161. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +16 -14
  162. package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -15
  163. package/node/StaticDateRangePicker/StaticDateRangePicker.js +5 -6
  164. package/node/index.js +18 -9
  165. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +18 -9
  166. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +33 -36
  167. package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +19 -10
  168. package/node/internals/hooks/useMultiInputFieldSelectedSections.js +50 -0
  169. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +16 -11
  170. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -31
  171. package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -25
  172. package/node/internals/hooks/useRangePosition.js +3 -8
  173. package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  174. package/node/internals/models/index.js +0 -11
  175. package/node/internals/utils/releaseInfo.js +1 -1
  176. package/node/internals/utils/valueManagers.js +10 -5
  177. package/node/models/index.js +11 -0
  178. package/package.json +6 -6
  179. package/themeAugmentation/props.d.ts +17 -17
  180. package/internals/models/fields.d.ts +0 -49
  181. package/legacy/AdapterDateFns/index.js +0 -1
  182. package/legacy/AdapterDateFnsJalali/index.js +0 -1
  183. package/legacy/AdapterDateFnsV3/index.js +0 -1
  184. package/legacy/AdapterDayjs/index.js +0 -1
  185. package/legacy/AdapterLuxon/index.js +0 -1
  186. package/legacy/AdapterMoment/index.js +0 -1
  187. package/legacy/AdapterMomentHijri/index.js +0 -1
  188. package/legacy/AdapterMomentJalaali/index.js +0 -1
  189. package/legacy/DateRangeCalendar/DateRangeCalendar.js +0 -764
  190. package/legacy/DateRangeCalendar/DateRangeCalendar.types.js +0 -1
  191. package/legacy/DateRangeCalendar/dateRangeCalendarClasses.js +0 -5
  192. package/legacy/DateRangeCalendar/index.js +0 -2
  193. package/legacy/DateRangeCalendar/useDragRange.js +0 -258
  194. package/legacy/DateRangePicker/DateRangePicker.js +0 -334
  195. package/legacy/DateRangePicker/DateRangePicker.types.js +0 -1
  196. package/legacy/DateRangePicker/DateRangePickerToolbar.js +0 -127
  197. package/legacy/DateRangePicker/dateRangePickerToolbarClasses.js +0 -5
  198. package/legacy/DateRangePicker/index.js +0 -3
  199. package/legacy/DateRangePicker/shared.js +0 -33
  200. package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -366
  201. package/legacy/DateRangePickerDay/dateRangePickerDayClasses.js +0 -5
  202. package/legacy/DateRangePickerDay/index.js +0 -2
  203. package/legacy/DateTimeRangePicker/DateTimeRangePicker.js +0 -413
  204. package/legacy/DateTimeRangePicker/DateTimeRangePicker.types.js +0 -1
  205. package/legacy/DateTimeRangePicker/DateTimeRangePickerTabs.js +0 -191
  206. package/legacy/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +0 -57
  207. package/legacy/DateTimeRangePicker/DateTimeRangePickerToolbar.js +0 -184
  208. package/legacy/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +0 -6
  209. package/legacy/DateTimeRangePicker/dateTimeRangePickerToolbarClasses.js +0 -5
  210. package/legacy/DateTimeRangePicker/index.js +0 -5
  211. package/legacy/DateTimeRangePicker/shared.js +0 -54
  212. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -343
  213. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.types.js +0 -1
  214. package/legacy/DesktopDateRangePicker/index.js +0 -1
  215. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +0 -491
  216. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.js +0 -1
  217. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.js +0 -48
  218. package/legacy/DesktopDateTimeRangePicker/index.js +0 -1
  219. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -339
  220. package/legacy/MobileDateRangePicker/MobileDateRangePicker.types.js +0 -1
  221. package/legacy/MobileDateRangePicker/index.js +0 -1
  222. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +0 -484
  223. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.js +0 -1
  224. package/legacy/MobileDateTimeRangePicker/index.js +0 -1
  225. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +0 -316
  226. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.types.js +0 -1
  227. package/legacy/MultiInputDateRangeField/index.js +0 -2
  228. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +0 -357
  229. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.js +0 -1
  230. package/legacy/MultiInputDateTimeRangeField/index.js +0 -2
  231. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +0 -330
  232. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.types.js +0 -1
  233. package/legacy/MultiInputTimeRangeField/index.js +0 -2
  234. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +0 -307
  235. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.types.js +0 -1
  236. package/legacy/SingleInputDateRangeField/index.js +0 -2
  237. package/legacy/SingleInputDateRangeField/useSingleInputDateRangeField.js +0 -30
  238. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +0 -348
  239. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.js +0 -1
  240. package/legacy/SingleInputDateTimeRangeField/index.js +0 -2
  241. package/legacy/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +0 -35
  242. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +0 -321
  243. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.types.js +0 -1
  244. package/legacy/SingleInputTimeRangeField/index.js +0 -2
  245. package/legacy/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +0 -29
  246. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -276
  247. package/legacy/StaticDateRangePicker/StaticDateRangePicker.types.js +0 -1
  248. package/legacy/StaticDateRangePicker/index.js +0 -1
  249. package/legacy/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -87
  250. package/legacy/dateRangeViewRenderers/index.js +0 -1
  251. package/legacy/index.js +0 -33
  252. package/legacy/internals/constants/dimensions.js +0 -5
  253. package/legacy/internals/hooks/models/index.js +0 -1
  254. package/legacy/internals/hooks/models/useRangePicker.js +0 -1
  255. package/legacy/internals/hooks/useDesktopRangePicker/index.js +0 -1
  256. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +0 -154
  257. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.js +0 -1
  258. package/legacy/internals/hooks/useEnrichedRangePickerFieldProps.js +0 -258
  259. package/legacy/internals/hooks/useMobileRangePicker/index.js +0 -1
  260. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +0 -144
  261. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.js +0 -1
  262. package/legacy/internals/hooks/useMultiInputRangeField/shared.js +0 -9
  263. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +0 -102
  264. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +0 -115
  265. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.js +0 -1
  266. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +0 -109
  267. package/legacy/internals/hooks/useRangePosition.js +0 -39
  268. package/legacy/internals/hooks/useStaticRangePicker/index.js +0 -1
  269. package/legacy/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -76
  270. package/legacy/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.js +0 -1
  271. package/legacy/internals/models/dateRange.js +0 -1
  272. package/legacy/internals/models/dateTimeRange.js +0 -1
  273. package/legacy/internals/models/index.js +0 -5
  274. package/legacy/internals/models/rangePickerProps.js +0 -1
  275. package/legacy/internals/models/timeRange.js +0 -1
  276. package/legacy/internals/utils/date-fields-utils.js +0 -26
  277. package/legacy/internals/utils/date-range-manager.js +0 -65
  278. package/legacy/internals/utils/date-utils.js +0 -12
  279. package/legacy/internals/utils/releaseInfo.js +0 -13
  280. package/legacy/internals/utils/validation/validateDateRange.js +0 -45
  281. package/legacy/internals/utils/validation/validateDateTimeRange.js +0 -45
  282. package/legacy/internals/utils/validation/validateTimeRange.js +0 -32
  283. package/legacy/internals/utils/valueManagers.js +0 -135
  284. package/legacy/locales/index.js +0 -1
  285. package/legacy/models/index.js +0 -3
  286. package/legacy/models/multiInputRangeFieldClasses.js +0 -1
  287. package/legacy/models/range.js +0 -1
  288. package/legacy/models/validation.js +0 -1
  289. package/legacy/themeAugmentation/index.js +0 -4
  290. package/modern/internals/models/fields.js +0 -1
  291. /package/{internals/models → models}/fields.js +0 -0
  292. /package/{legacy/internals → modern}/models/fields.js +0 -0
  293. /package/node/{internals/models → models}/fields.js +0 -0
@@ -1,11 +1,12 @@
1
1
  import { MakeOptional } from '@mui/x-date-pickers/internals';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { UseDesktopRangePickerSlots, UseDesktopRangePickerSlotProps, DesktopRangeOnlyPickerProps } from '../internals/hooks/useDesktopRangePicker';
3
4
  import { BaseDateRangePickerProps, BaseDateRangePickerSlots, BaseDateRangePickerSlotProps } from '../DateRangePicker/shared';
4
- export interface DesktopDateRangePickerSlots<TDate> extends BaseDateRangePickerSlots<TDate>, MakeOptional<UseDesktopRangePickerSlots<TDate, 'day'>, 'field'> {
5
+ export interface DesktopDateRangePickerSlots<TDate extends PickerValidDate> extends BaseDateRangePickerSlots<TDate>, MakeOptional<UseDesktopRangePickerSlots<TDate, 'day'>, 'field'> {
5
6
  }
6
- export interface DesktopDateRangePickerSlotProps<TDate> extends BaseDateRangePickerSlotProps<TDate>, Omit<UseDesktopRangePickerSlotProps<TDate, 'day'>, 'tabs'> {
7
+ export interface DesktopDateRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateRangePickerSlotProps<TDate>, Omit<UseDesktopRangePickerSlotProps<TDate, 'day', TEnableAccessibleFieldDOMStructure>, 'tabs'> {
7
8
  }
8
- export interface DesktopDateRangePickerProps<TDate> extends BaseDateRangePickerProps<TDate>, DesktopRangeOnlyPickerProps<TDate> {
9
+ export interface DesktopDateRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateRangePickerProps<TDate>, DesktopRangeOnlyPickerProps {
9
10
  /**
10
11
  * The number of calendars to render on **desktop**.
11
12
  * @default 2
@@ -20,5 +21,5 @@ export interface DesktopDateRangePickerProps<TDate> extends BaseDateRangePickerP
20
21
  * The props used for each component slot.
21
22
  * @default {}
22
23
  */
23
- slotProps?: DesktopDateRangePickerSlotProps<TDate>;
24
+ slotProps?: DesktopDateRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
24
25
  }
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { DesktopDateTimeRangePickerProps } from './DesktopDateTimeRangePicker.types';
3
- type DesktopDateRangePickerComponent = (<TDate>(props: DesktopDateTimeRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type DesktopDateRangePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: DesktopDateTimeRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
5
  propTypes?: any;
5
6
  };
6
7
  declare const DesktopDateTimeRangePicker: DesktopDateRangePickerComponent;
@@ -5,6 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { extractValidationProps, isDatePickerView, isInternalTimeView } from '@mui/x-date-pickers/internals';
7
7
  import { resolveComponentProps } from '@mui/base/utils';
8
+ import { refType } from '@mui/utils';
8
9
  import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
9
10
  import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from '@mui/x-date-pickers/MultiSectionDigitalClock';
10
11
  import Divider from '@mui/material/Divider';
@@ -164,7 +165,7 @@ DesktopDateTimeRangePicker.propTypes = {
164
165
  * The default value.
165
166
  * Used when the component is not controlled.
166
167
  */
167
- defaultValue: PropTypes.arrayOf(PropTypes.any),
168
+ defaultValue: PropTypes.arrayOf(PropTypes.object),
168
169
  /**
169
170
  * If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date.
170
171
  * @default false
@@ -209,10 +210,13 @@ DesktopDateTimeRangePicker.propTypes = {
209
210
  * If `true`, the week number will be display in the calendar.
210
211
  */
211
212
  displayWeekNumber: PropTypes.bool,
213
+ /**
214
+ * @default false
215
+ */
216
+ enableAccessibleFieldDOMStructure: PropTypes.any,
212
217
  /**
213
218
  * The day view will show as many weeks as needed after the end of the current month to match this value.
214
219
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
215
- * @default undefined
216
220
  */
217
221
  fixedWeekNumber: PropTypes.number,
218
222
  /**
@@ -230,9 +234,7 @@ DesktopDateTimeRangePicker.propTypes = {
230
234
  * Pass a ref to the `input` element.
231
235
  * Ignored if the field has several inputs.
232
236
  */
233
- inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
234
- current: PropTypes.object
235
- })]),
237
+ inputRef: refType,
236
238
  /**
237
239
  * The label content.
238
240
  * Ignored if the field has several inputs.
@@ -252,29 +254,29 @@ DesktopDateTimeRangePicker.propTypes = {
252
254
  /**
253
255
  * Maximal selectable date.
254
256
  */
255
- maxDate: PropTypes.any,
257
+ maxDate: PropTypes.object,
256
258
  /**
257
259
  * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.
258
260
  */
259
- maxDateTime: PropTypes.any,
261
+ maxDateTime: PropTypes.object,
260
262
  /**
261
263
  * Maximal selectable time.
262
264
  * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
263
265
  */
264
- maxTime: PropTypes.any,
266
+ maxTime: PropTypes.object,
265
267
  /**
266
268
  * Minimal selectable date.
267
269
  */
268
- minDate: PropTypes.any,
270
+ minDate: PropTypes.object,
269
271
  /**
270
272
  * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.
271
273
  */
272
- minDateTime: PropTypes.any,
274
+ minDateTime: PropTypes.object,
273
275
  /**
274
276
  * Minimal selectable time.
275
277
  * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
276
278
  */
277
- minTime: PropTypes.any,
279
+ minTime: PropTypes.object,
278
280
  /**
279
281
  * Step over minutes.
280
282
  * @default 1
@@ -367,7 +369,7 @@ DesktopDateTimeRangePicker.propTypes = {
367
369
  * The date used to generate the new value when both `value` and `defaultValue` are empty.
368
370
  * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
369
371
  */
370
- referenceDate: PropTypes.any,
372
+ referenceDate: PropTypes.object,
371
373
  /**
372
374
  * Component rendered on the "day" view when `props.loading` is true.
373
375
  * @returns {React.ReactNode} The node to render when loading.
@@ -376,17 +378,14 @@ DesktopDateTimeRangePicker.propTypes = {
376
378
  renderLoading: PropTypes.func,
377
379
  /**
378
380
  * The currently selected sections.
379
- * This prop accept four formats:
381
+ * This prop accepts four formats:
380
382
  * 1. If a number is provided, the section at this index will be selected.
381
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
382
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
383
- * 4. If `null` is provided, no section will be selected
383
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
384
+ * 3. If `"all"` is provided, all the sections will be selected.
385
+ * 4. If `null` is provided, no section will be selected.
384
386
  * If not provided, the selected sections will be handled internally.
385
387
  */
386
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
387
- endIndex: PropTypes.number.isRequired,
388
- startIndex: PropTypes.number.isRequired
389
- })]),
388
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
390
389
  /**
391
390
  * Disable specific date.
392
391
  *
@@ -464,7 +463,7 @@ DesktopDateTimeRangePicker.propTypes = {
464
463
  * The selected value.
465
464
  * Used when the component is controlled.
466
465
  */
467
- value: PropTypes.arrayOf(PropTypes.any),
466
+ value: PropTypes.arrayOf(PropTypes.object),
468
467
  /**
469
468
  * The visible view.
470
469
  * Used when the component view is controlled.
@@ -1,12 +1,13 @@
1
1
  import { MakeOptional } from '@mui/x-date-pickers/internals';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { UseDesktopRangePickerSlots, UseDesktopRangePickerSlotProps, DesktopRangeOnlyPickerProps } from '../internals/hooks/useDesktopRangePicker';
3
4
  import { BaseDateTimeRangePickerProps, BaseDateTimeRangePickerSlots, BaseDateTimeRangePickerSlotProps } from '../DateTimeRangePicker/shared';
4
5
  import { DateTimeRangePickerView } from '../internals/models';
5
- export interface DesktopDateTimeRangePickerSlots<TDate> extends BaseDateTimeRangePickerSlots<TDate>, MakeOptional<UseDesktopRangePickerSlots<TDate, DateTimeRangePickerView>, 'field'> {
6
+ export interface DesktopDateTimeRangePickerSlots<TDate extends PickerValidDate> extends BaseDateTimeRangePickerSlots<TDate>, MakeOptional<UseDesktopRangePickerSlots<TDate, DateTimeRangePickerView>, 'field'> {
6
7
  }
7
- export interface DesktopDateTimeRangePickerSlotProps<TDate> extends BaseDateTimeRangePickerSlotProps<TDate>, Omit<UseDesktopRangePickerSlotProps<TDate, DateTimeRangePickerView>, 'tabs' | 'toolbar'> {
8
+ export interface DesktopDateTimeRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateTimeRangePickerSlotProps<TDate>, Omit<UseDesktopRangePickerSlotProps<TDate, DateTimeRangePickerView, TEnableAccessibleFieldDOMStructure>, 'tabs' | 'toolbar'> {
8
9
  }
9
- export interface DesktopDateTimeRangePickerProps<TDate> extends BaseDateTimeRangePickerProps<TDate>, DesktopRangeOnlyPickerProps<TDate> {
10
+ export interface DesktopDateTimeRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateTimeRangePickerProps<TDate>, DesktopRangeOnlyPickerProps {
10
11
  /**
11
12
  * The number of calendars to render on **desktop**.
12
13
  * @default 1
@@ -21,5 +22,5 @@ export interface DesktopDateTimeRangePickerProps<TDate> extends BaseDateTimeRang
21
22
  * The props used for each component slot.
22
23
  * @default {}
23
24
  */
24
- slotProps?: DesktopDateTimeRangePickerSlotProps<TDate>;
25
+ slotProps?: DesktopDateTimeRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
25
26
  }
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { PickersLayoutProps } from '@mui/x-date-pickers/PickersLayout';
3
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
3
4
  import { DateRange } from '../models';
4
5
  import { DateTimeRangePickerView } from '../internals/models/dateTimeRange';
5
6
  /**
6
7
  * @ignore - internal component.
7
8
  */
8
- export declare function DesktopDateTimeRangePickerLayout<TDate>(props: PickersLayoutProps<DateRange<TDate>, TDate, DateTimeRangePickerView>): React.JSX.Element;
9
+ export declare function DesktopDateTimeRangePickerLayout<TDate extends PickerValidDate>(props: PickersLayoutProps<DateRange<TDate>, TDate, DateTimeRangePickerView>): React.JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { MobileDateRangePickerProps } from './MobileDateRangePicker.types';
3
- type MobileDateRangePickerComponent = (<TDate>(props: MobileDateRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type MobileDateRangePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: MobileDateRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
5
  propTypes?: any;
5
6
  };
6
7
  /**
@@ -98,7 +98,7 @@ MobileDateRangePicker.propTypes = {
98
98
  * The default value.
99
99
  * Used when the component is not controlled.
100
100
  */
101
- defaultValue: PropTypes.arrayOf(PropTypes.any),
101
+ defaultValue: PropTypes.arrayOf(PropTypes.object),
102
102
  /**
103
103
  * If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date.
104
104
  * @default false
@@ -138,10 +138,13 @@ MobileDateRangePicker.propTypes = {
138
138
  * If `true`, the week number will be display in the calendar.
139
139
  */
140
140
  displayWeekNumber: PropTypes.bool,
141
+ /**
142
+ * @default false
143
+ */
144
+ enableAccessibleFieldDOMStructure: PropTypes.any,
141
145
  /**
142
146
  * The day view will show as many weeks as needed after the end of the current month to match this value.
143
147
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
144
- * @default undefined
145
148
  */
146
149
  fixedWeekNumber: PropTypes.number,
147
150
  /**
@@ -179,11 +182,11 @@ MobileDateRangePicker.propTypes = {
179
182
  /**
180
183
  * Maximal selectable date.
181
184
  */
182
- maxDate: PropTypes.any,
185
+ maxDate: PropTypes.object,
183
186
  /**
184
187
  * Minimal selectable date.
185
188
  */
186
- minDate: PropTypes.any,
189
+ minDate: PropTypes.object,
187
190
  /**
188
191
  * Name attribute used by the `input` element in the Field.
189
192
  * Ignored if the field has several inputs.
@@ -259,7 +262,7 @@ MobileDateRangePicker.propTypes = {
259
262
  * The date used to generate the new value when both `value` and `defaultValue` are empty.
260
263
  * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
261
264
  */
262
- referenceDate: PropTypes.any,
265
+ referenceDate: PropTypes.object,
263
266
  /**
264
267
  * Component rendered on the "day" view when `props.loading` is true.
265
268
  * @returns {React.ReactNode} The node to render when loading.
@@ -268,17 +271,14 @@ MobileDateRangePicker.propTypes = {
268
271
  renderLoading: PropTypes.func,
269
272
  /**
270
273
  * The currently selected sections.
271
- * This prop accept four formats:
274
+ * This prop accepts four formats:
272
275
  * 1. If a number is provided, the section at this index will be selected.
273
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
274
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
275
- * 4. If `null` is provided, no section will be selected
276
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
277
+ * 3. If `"all"` is provided, all the sections will be selected.
278
+ * 4. If `null` is provided, no section will be selected.
276
279
  * If not provided, the selected sections will be handled internally.
277
280
  */
278
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
279
- endIndex: PropTypes.number.isRequired,
280
- startIndex: PropTypes.number.isRequired
281
- })]),
281
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
282
282
  /**
283
283
  * Disable specific date.
284
284
  *
@@ -327,7 +327,7 @@ MobileDateRangePicker.propTypes = {
327
327
  * The selected value.
328
328
  * Used when the component is controlled.
329
329
  */
330
- value: PropTypes.arrayOf(PropTypes.any),
330
+ value: PropTypes.arrayOf(PropTypes.object),
331
331
  /**
332
332
  * Define custom view renderers for each section.
333
333
  * If `null`, the section will only have field editing.
@@ -1,11 +1,12 @@
1
1
  import { MakeOptional } from '@mui/x-date-pickers/internals';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { UseMobileRangePickerSlots, UseMobileRangePickerSlotProps, MobileRangeOnlyPickerProps } from '../internals/hooks/useMobileRangePicker';
3
4
  import { BaseDateRangePickerProps, BaseDateRangePickerSlots, BaseDateRangePickerSlotProps } from '../DateRangePicker/shared';
4
- export interface MobileDateRangePickerSlots<TDate> extends BaseDateRangePickerSlots<TDate>, MakeOptional<UseMobileRangePickerSlots<TDate, 'day'>, 'field'> {
5
+ export interface MobileDateRangePickerSlots<TDate extends PickerValidDate> extends BaseDateRangePickerSlots<TDate>, MakeOptional<UseMobileRangePickerSlots<TDate, 'day'>, 'field'> {
5
6
  }
6
- export interface MobileDateRangePickerSlotProps<TDate> extends BaseDateRangePickerSlotProps<TDate>, Omit<UseMobileRangePickerSlotProps<TDate, 'day'>, 'tabs'> {
7
+ export interface MobileDateRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateRangePickerSlotProps<TDate>, Omit<UseMobileRangePickerSlotProps<TDate, 'day', TEnableAccessibleFieldDOMStructure>, 'tabs'> {
7
8
  }
8
- export interface MobileDateRangePickerProps<TDate> extends BaseDateRangePickerProps<TDate>, MobileRangeOnlyPickerProps<TDate> {
9
+ export interface MobileDateRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateRangePickerProps<TDate>, MobileRangeOnlyPickerProps {
9
10
  /**
10
11
  * Overridable component slots.
11
12
  * @default {}
@@ -15,5 +16,5 @@ export interface MobileDateRangePickerProps<TDate> extends BaseDateRangePickerPr
15
16
  * The props used for each component slot.
16
17
  * @default {}
17
18
  */
18
- slotProps?: MobileDateRangePickerSlotProps<TDate>;
19
+ slotProps?: MobileDateRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
19
20
  }
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { MobileDateTimeRangePickerProps } from './MobileDateTimeRangePicker.types';
3
- type MobileDateRangePickerComponent = (<TDate>(props: MobileDateTimeRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type MobileDateRangePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: MobileDateTimeRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
5
  propTypes?: any;
5
6
  };
6
7
  declare const MobileDateTimeRangePicker: MobileDateRangePickerComponent;
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["view", "openTo", "rangePosition", "sx"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
+ import { refType } from '@mui/utils';
6
7
  import { DIALOG_WIDTH, VIEW_HEIGHT, extractValidationProps, isInternalTimeView, isDatePickerView } from '@mui/x-date-pickers/internals';
7
8
  import { resolveComponentProps } from '@mui/base/utils';
8
9
  import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
@@ -163,7 +164,7 @@ MobileDateTimeRangePicker.propTypes = {
163
164
  * The default value.
164
165
  * Used when the component is not controlled.
165
166
  */
166
- defaultValue: PropTypes.arrayOf(PropTypes.any),
167
+ defaultValue: PropTypes.arrayOf(PropTypes.object),
167
168
  /**
168
169
  * If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date.
169
170
  * @default false
@@ -208,10 +209,13 @@ MobileDateTimeRangePicker.propTypes = {
208
209
  * If `true`, the week number will be display in the calendar.
209
210
  */
210
211
  displayWeekNumber: PropTypes.bool,
212
+ /**
213
+ * @default false
214
+ */
215
+ enableAccessibleFieldDOMStructure: PropTypes.any,
211
216
  /**
212
217
  * The day view will show as many weeks as needed after the end of the current month to match this value.
213
218
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
214
- * @default undefined
215
219
  */
216
220
  fixedWeekNumber: PropTypes.number,
217
221
  /**
@@ -229,9 +233,7 @@ MobileDateTimeRangePicker.propTypes = {
229
233
  * Pass a ref to the `input` element.
230
234
  * Ignored if the field has several inputs.
231
235
  */
232
- inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
233
- current: PropTypes.object
234
- })]),
236
+ inputRef: refType,
235
237
  /**
236
238
  * The label content.
237
239
  * Ignored if the field has several inputs.
@@ -251,29 +253,29 @@ MobileDateTimeRangePicker.propTypes = {
251
253
  /**
252
254
  * Maximal selectable date.
253
255
  */
254
- maxDate: PropTypes.any,
256
+ maxDate: PropTypes.object,
255
257
  /**
256
258
  * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.
257
259
  */
258
- maxDateTime: PropTypes.any,
260
+ maxDateTime: PropTypes.object,
259
261
  /**
260
262
  * Maximal selectable time.
261
263
  * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
262
264
  */
263
- maxTime: PropTypes.any,
265
+ maxTime: PropTypes.object,
264
266
  /**
265
267
  * Minimal selectable date.
266
268
  */
267
- minDate: PropTypes.any,
269
+ minDate: PropTypes.object,
268
270
  /**
269
271
  * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.
270
272
  */
271
- minDateTime: PropTypes.any,
273
+ minDateTime: PropTypes.object,
272
274
  /**
273
275
  * Minimal selectable time.
274
276
  * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
275
277
  */
276
- minTime: PropTypes.any,
278
+ minTime: PropTypes.object,
277
279
  /**
278
280
  * Step over minutes.
279
281
  * @default 1
@@ -366,7 +368,7 @@ MobileDateTimeRangePicker.propTypes = {
366
368
  * The date used to generate the new value when both `value` and `defaultValue` are empty.
367
369
  * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
368
370
  */
369
- referenceDate: PropTypes.any,
371
+ referenceDate: PropTypes.object,
370
372
  /**
371
373
  * Component rendered on the "day" view when `props.loading` is true.
372
374
  * @returns {React.ReactNode} The node to render when loading.
@@ -375,17 +377,14 @@ MobileDateTimeRangePicker.propTypes = {
375
377
  renderLoading: PropTypes.func,
376
378
  /**
377
379
  * The currently selected sections.
378
- * This prop accept four formats:
380
+ * This prop accepts four formats:
379
381
  * 1. If a number is provided, the section at this index will be selected.
380
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
381
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
382
- * 4. If `null` is provided, no section will be selected
382
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
383
+ * 3. If `"all"` is provided, all the sections will be selected.
384
+ * 4. If `null` is provided, no section will be selected.
383
385
  * If not provided, the selected sections will be handled internally.
384
386
  */
385
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
386
- endIndex: PropTypes.number.isRequired,
387
- startIndex: PropTypes.number.isRequired
388
- })]),
387
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
389
388
  /**
390
389
  * Disable specific date.
391
390
  *
@@ -463,7 +462,7 @@ MobileDateTimeRangePicker.propTypes = {
463
462
  * The selected value.
464
463
  * Used when the component is controlled.
465
464
  */
466
- value: PropTypes.arrayOf(PropTypes.any),
465
+ value: PropTypes.arrayOf(PropTypes.object),
467
466
  /**
468
467
  * The visible view.
469
468
  * Used when the component view is controlled.
@@ -1,12 +1,13 @@
1
1
  import { MakeOptional } from '@mui/x-date-pickers/internals';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { UseMobileRangePickerSlots, UseMobileRangePickerSlotProps, MobileRangeOnlyPickerProps } from '../internals/hooks/useMobileRangePicker';
3
4
  import { BaseDateTimeRangePickerProps, BaseDateTimeRangePickerSlots, BaseDateTimeRangePickerSlotProps } from '../DateTimeRangePicker/shared';
4
5
  import { DateTimeRangePickerView } from '../internals/models';
5
- export interface MobileDateTimeRangePickerSlots<TDate> extends BaseDateTimeRangePickerSlots<TDate>, MakeOptional<UseMobileRangePickerSlots<TDate, DateTimeRangePickerView>, 'field'> {
6
+ export interface MobileDateTimeRangePickerSlots<TDate extends PickerValidDate> extends BaseDateTimeRangePickerSlots<TDate>, MakeOptional<UseMobileRangePickerSlots<TDate, DateTimeRangePickerView>, 'field'> {
6
7
  }
7
- export interface MobileDateTimeRangePickerSlotProps<TDate> extends BaseDateTimeRangePickerSlotProps<TDate>, Omit<UseMobileRangePickerSlotProps<TDate, DateTimeRangePickerView>, 'tabs' | 'toolbar'> {
8
+ export interface MobileDateTimeRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateTimeRangePickerSlotProps<TDate>, Omit<UseMobileRangePickerSlotProps<TDate, DateTimeRangePickerView, TEnableAccessibleFieldDOMStructure>, 'tabs' | 'toolbar'> {
8
9
  }
9
- export interface MobileDateTimeRangePickerProps<TDate> extends BaseDateTimeRangePickerProps<TDate>, MobileRangeOnlyPickerProps<TDate> {
10
+ export interface MobileDateTimeRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateTimeRangePickerProps<TDate>, MobileRangeOnlyPickerProps {
10
11
  /**
11
12
  * Overridable component slots.
12
13
  * @default {}
@@ -16,5 +17,5 @@ export interface MobileDateTimeRangePickerProps<TDate> extends BaseDateTimeRange
16
17
  * The props used for each component slot.
17
18
  * @default {}
18
19
  */
19
- slotProps?: MobileDateTimeRangePickerSlotProps<TDate>;
20
+ slotProps?: MobileDateTimeRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
20
21
  }
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { MultiInputDateRangeFieldProps } from './MultiInputDateRangeField.types';
3
4
  import { MultiInputRangeFieldClasses } from '../models';
4
5
  export declare const multiInputDateRangeFieldClasses: MultiInputRangeFieldClasses;
5
6
  export declare const getMultiInputDateRangeFieldUtilityClass: (slot: string) => string;
6
- type MultiInputDateRangeFieldComponent = (<TDate>(props: MultiInputDateRangeFieldProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
7
+ type MultiInputDateRangeFieldComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: MultiInputDateRangeFieldProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
7
8
  propTypes?: any;
8
9
  };
9
10
  /**
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["slots", "slotProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef", "className"];
3
+ const _excluded = ["slots", "slotProps", "unstableStartFieldRef", "unstableEndFieldRef", "className"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -11,6 +11,7 @@ import { styled, useThemeProps } from '@mui/material/styles';
11
11
  import { useSlotProps } from '@mui/base/utils';
12
12
  import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
13
13
  import { splitFieldInternalAndForwardedProps, convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
14
+ import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
14
15
  import { useMultiInputDateRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField';
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -63,14 +64,12 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
63
64
  name: 'MuiMultiInputDateRangeField'
64
65
  });
65
66
  const {
66
- internalProps: dateFieldInternalProps,
67
+ internalProps,
67
68
  forwardedProps
68
69
  } = splitFieldInternalAndForwardedProps(themeProps, 'date');
69
70
  const {
70
71
  slots,
71
72
  slotProps,
72
- disabled,
73
- autoFocus,
74
73
  unstableStartFieldRef,
75
74
  unstableEndFieldRef,
76
75
  className
@@ -89,13 +88,10 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
89
88
  ownerState,
90
89
  className: clsx(className, classes.root)
91
90
  });
92
- const TextField = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : MuiTextField;
91
+ const TextField = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : inProps.enableAccessibleFieldDOMStructure ? PickersTextField : MuiTextField;
93
92
  const startTextFieldProps = useSlotProps({
94
93
  elementType: TextField,
95
94
  externalSlotProps: slotProps == null ? void 0 : slotProps.textField,
96
- additionalProps: {
97
- autoFocus
98
- },
99
95
  ownerState: _extends({}, ownerState, {
100
96
  position: 'start'
101
97
  })
@@ -115,9 +111,7 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
115
111
  className: classes.separator
116
112
  });
117
113
  const fieldResponse = useMultiInputDateRangeField({
118
- sharedProps: _extends({}, dateFieldInternalProps, {
119
- disabled
120
- }),
114
+ sharedProps: internalProps,
121
115
  startTextFieldProps,
122
116
  endTextFieldProps,
123
117
  unstableStartFieldRef,
@@ -138,6 +132,9 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
138
132
  // | These PropTypes are generated from the TypeScript type definitions |
139
133
  // | To update them edit the TypeScript types and run "yarn proptypes" |
140
134
  // ----------------------------------------------------------------------
135
+ /**
136
+ * If `true`, the `input` element is focused during the first mount.
137
+ */
141
138
  autoFocus: PropTypes.bool,
142
139
  /**
143
140
  * Override or extend the styles applied to the component.
@@ -148,7 +145,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
148
145
  /**
149
146
  * The default value. Use when the component is not controlled.
150
147
  */
151
- defaultValue: PropTypes.arrayOf(PropTypes.any),
148
+ defaultValue: PropTypes.arrayOf(PropTypes.object),
152
149
  /**
153
150
  * Defines the `flex-direction` style property.
154
151
  * It is applied for all screen sizes.
@@ -174,6 +171,10 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
174
171
  * Add an element between each child.
175
172
  */
176
173
  divider: PropTypes.node,
174
+ /**
175
+ * @default false
176
+ */
177
+ enableAccessibleFieldDOMStructure: PropTypes.bool,
177
178
  /**
178
179
  * Format of the date when rendered in the input(s).
179
180
  */
@@ -187,11 +188,11 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
187
188
  /**
188
189
  * Maximal selectable date.
189
190
  */
190
- maxDate: PropTypes.any,
191
+ maxDate: PropTypes.object,
191
192
  /**
192
193
  * Minimal selectable date.
193
194
  */
194
- minDate: PropTypes.any,
195
+ minDate: PropTypes.object,
195
196
  /**
196
197
  * Callback fired when the value changes.
197
198
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
@@ -224,20 +225,17 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
224
225
  * For example, on time fields it will be used to determine the date to set.
225
226
  * @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`. Value is rounded to the most granular section used.
226
227
  */
227
- referenceDate: PropTypes.any,
228
+ referenceDate: PropTypes.object,
228
229
  /**
229
230
  * The currently selected sections.
230
- * This prop accept four formats:
231
+ * This prop accepts four formats:
231
232
  * 1. If a number is provided, the section at this index will be selected.
232
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
233
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
234
- * 4. If `null` is provided, no section will be selected
233
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
234
+ * 3. If `"all"` is provided, all the sections will be selected.
235
+ * 4. If `null` is provided, no section will be selected.
235
236
  * If not provided, the selected sections will be handled internally.
236
237
  */
237
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
238
- endIndex: PropTypes.number.isRequired,
239
- startIndex: PropTypes.number.isRequired
240
- })]),
238
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
241
239
  /**
242
240
  * Disable specific date.
243
241
  *
@@ -308,6 +306,6 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
308
306
  * The selected value.
309
307
  * Used when the component is controlled.
310
308
  */
311
- value: PropTypes.arrayOf(PropTypes.any)
309
+ value: PropTypes.arrayOf(PropTypes.object)
312
310
  } : void 0;
313
311
  export { MultiInputDateRangeField };