@mui/x-date-pickers-pro 7.0.0-beta.2 → 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 (274) hide show
  1. package/CHANGELOG.md +298 -23
  2. package/DateRangeCalendar/DateRangeCalendar.js +3 -1
  3. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +3 -0
  4. package/DateRangePicker/DateRangePicker.d.ts +1 -1
  5. package/DateRangePicker/DateRangePicker.js +9 -9
  6. package/DateRangePicker/DateRangePicker.types.d.ts +3 -3
  7. package/DateRangePicker/DateRangePickerToolbar.d.ts +3 -0
  8. package/DateRangePicker/DateRangePickerToolbar.js +6 -0
  9. package/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
  10. package/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  11. package/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +3 -3
  12. package/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  13. package/DateTimeRangePicker/DateTimeRangePickerToolbar.d.ts +3 -0
  14. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +6 -0
  15. package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +1 -1
  16. package/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  17. package/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +3 -3
  18. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.d.ts +1 -1
  19. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  20. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.d.ts +3 -3
  21. package/MobileDateRangePicker/MobileDateRangePicker.d.ts +1 -1
  22. package/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  23. package/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +3 -3
  24. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.d.ts +1 -1
  25. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +11 -12
  26. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.d.ts +3 -3
  27. package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +1 -1
  28. package/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  29. package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +11 -14
  30. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +1 -1
  31. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  32. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +12 -16
  33. package/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +1 -1
  34. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  35. package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +12 -16
  36. package/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +2 -2
  37. package/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  38. package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +11 -14
  39. package/SingleInputDateRangeField/index.d.ts +1 -1
  40. package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +2 -3
  41. package/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -15
  42. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +2 -2
  43. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -10
  44. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +12 -15
  45. package/SingleInputDateTimeRangeField/index.d.ts +1 -1
  46. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +2 -3
  47. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -20
  48. package/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +2 -2
  49. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  50. package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +12 -15
  51. package/SingleInputTimeRangeField/index.d.ts +1 -1
  52. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +2 -3
  53. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -14
  54. package/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  55. package/index.d.ts +0 -1
  56. package/index.js +2 -1
  57. package/internals/hooks/models/useRangePicker.d.ts +5 -5
  58. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +1 -1
  59. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  60. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +5 -5
  61. package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +15 -15
  62. package/internals/hooks/useEnrichedRangePickerFieldProps.js +37 -40
  63. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +1 -1
  64. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +17 -8
  65. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +5 -5
  66. package/internals/hooks/useMultiInputFieldSelectedSections.d.ts +21 -0
  67. package/internals/hooks/useMultiInputFieldSelectedSections.js +43 -0
  68. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +1 -1
  69. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -12
  70. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +2 -3
  71. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -31
  72. package/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +4 -4
  73. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +2 -3
  74. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -25
  75. package/internals/hooks/useRangePosition.d.ts +2 -4
  76. package/internals/hooks/useRangePosition.js +3 -6
  77. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  78. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +1 -2
  79. package/internals/models/dateRange.d.ts +3 -15
  80. package/internals/models/dateTimeRange.d.ts +4 -6
  81. package/internals/models/index.d.ts +0 -1
  82. package/internals/models/index.js +0 -1
  83. package/internals/models/timeRange.d.ts +3 -6
  84. package/internals/utils/date-fields-utils.d.ts +1 -5
  85. package/internals/utils/releaseInfo.js +1 -1
  86. package/internals/utils/valueManagers.d.ts +1 -2
  87. package/internals/utils/valueManagers.js +11 -6
  88. package/models/fields.d.ts +69 -0
  89. package/models/index.d.ts +1 -0
  90. package/models/index.js +1 -0
  91. package/modern/DateRangeCalendar/DateRangeCalendar.js +3 -1
  92. package/modern/DateRangePicker/DateRangePicker.js +9 -9
  93. package/modern/DateRangePicker/DateRangePickerToolbar.js +6 -0
  94. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  95. package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  96. package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +6 -0
  97. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  98. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  99. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  100. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +11 -12
  101. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  102. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  103. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  104. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  105. package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -14
  106. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -10
  107. package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -19
  108. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  109. package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -13
  110. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  111. package/modern/index.js +2 -1
  112. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  113. package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +34 -37
  114. package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +17 -8
  115. package/modern/internals/hooks/useMultiInputFieldSelectedSections.js +40 -0
  116. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -12
  117. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -30
  118. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -24
  119. package/modern/internals/hooks/useRangePosition.js +3 -6
  120. package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  121. package/modern/internals/models/index.js +0 -1
  122. package/modern/internals/utils/releaseInfo.js +1 -1
  123. package/modern/internals/utils/valueManagers.js +11 -6
  124. package/modern/models/index.js +1 -0
  125. package/node/DateRangeCalendar/DateRangeCalendar.js +3 -1
  126. package/node/DateRangePicker/DateRangePicker.js +9 -9
  127. package/node/DateRangePicker/DateRangePickerToolbar.js +6 -0
  128. package/node/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  129. package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  130. package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +6 -0
  131. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  132. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  133. package/node/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  134. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +13 -14
  135. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  136. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  137. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  138. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  139. package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -16
  140. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +15 -13
  141. package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -21
  142. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  143. package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -15
  144. package/node/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  145. package/node/index.js +1 -1
  146. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  147. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +33 -36
  148. package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +17 -8
  149. package/node/internals/hooks/useMultiInputFieldSelectedSections.js +50 -0
  150. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +16 -11
  151. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -31
  152. package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -25
  153. package/node/internals/hooks/useRangePosition.js +3 -8
  154. package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  155. package/node/internals/models/index.js +0 -11
  156. package/node/internals/utils/releaseInfo.js +1 -1
  157. package/node/internals/utils/valueManagers.js +10 -5
  158. package/node/models/index.js +11 -0
  159. package/package.json +5 -5
  160. package/themeAugmentation/props.d.ts +12 -12
  161. package/internals/models/fields.d.ts +0 -49
  162. package/legacy/AdapterDateFns/index.js +0 -1
  163. package/legacy/AdapterDateFnsJalali/index.js +0 -1
  164. package/legacy/AdapterDateFnsV3/index.js +0 -1
  165. package/legacy/AdapterDayjs/index.js +0 -1
  166. package/legacy/AdapterLuxon/index.js +0 -1
  167. package/legacy/AdapterMoment/index.js +0 -1
  168. package/legacy/AdapterMomentHijri/index.js +0 -1
  169. package/legacy/AdapterMomentJalaali/index.js +0 -1
  170. package/legacy/DateRangeCalendar/DateRangeCalendar.js +0 -764
  171. package/legacy/DateRangeCalendar/DateRangeCalendar.types.js +0 -1
  172. package/legacy/DateRangeCalendar/dateRangeCalendarClasses.js +0 -5
  173. package/legacy/DateRangeCalendar/index.js +0 -2
  174. package/legacy/DateRangeCalendar/useDragRange.js +0 -258
  175. package/legacy/DateRangePicker/DateRangePicker.js +0 -334
  176. package/legacy/DateRangePicker/DateRangePicker.types.js +0 -1
  177. package/legacy/DateRangePicker/DateRangePickerToolbar.js +0 -127
  178. package/legacy/DateRangePicker/dateRangePickerToolbarClasses.js +0 -5
  179. package/legacy/DateRangePicker/index.js +0 -3
  180. package/legacy/DateRangePicker/shared.js +0 -33
  181. package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -366
  182. package/legacy/DateRangePickerDay/dateRangePickerDayClasses.js +0 -5
  183. package/legacy/DateRangePickerDay/index.js +0 -2
  184. package/legacy/DateTimeRangePicker/DateTimeRangePicker.js +0 -413
  185. package/legacy/DateTimeRangePicker/DateTimeRangePicker.types.js +0 -1
  186. package/legacy/DateTimeRangePicker/DateTimeRangePickerTabs.js +0 -191
  187. package/legacy/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +0 -57
  188. package/legacy/DateTimeRangePicker/DateTimeRangePickerToolbar.js +0 -184
  189. package/legacy/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +0 -6
  190. package/legacy/DateTimeRangePicker/dateTimeRangePickerToolbarClasses.js +0 -5
  191. package/legacy/DateTimeRangePicker/index.js +0 -5
  192. package/legacy/DateTimeRangePicker/shared.js +0 -54
  193. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -343
  194. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.types.js +0 -1
  195. package/legacy/DesktopDateRangePicker/index.js +0 -1
  196. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +0 -491
  197. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.js +0 -1
  198. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.js +0 -48
  199. package/legacy/DesktopDateTimeRangePicker/index.js +0 -1
  200. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -339
  201. package/legacy/MobileDateRangePicker/MobileDateRangePicker.types.js +0 -1
  202. package/legacy/MobileDateRangePicker/index.js +0 -1
  203. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +0 -484
  204. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.js +0 -1
  205. package/legacy/MobileDateTimeRangePicker/index.js +0 -1
  206. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +0 -316
  207. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.types.js +0 -1
  208. package/legacy/MultiInputDateRangeField/index.js +0 -2
  209. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +0 -357
  210. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.js +0 -1
  211. package/legacy/MultiInputDateTimeRangeField/index.js +0 -2
  212. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +0 -330
  213. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.types.js +0 -1
  214. package/legacy/MultiInputTimeRangeField/index.js +0 -2
  215. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +0 -307
  216. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.types.js +0 -1
  217. package/legacy/SingleInputDateRangeField/index.js +0 -2
  218. package/legacy/SingleInputDateRangeField/useSingleInputDateRangeField.js +0 -30
  219. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +0 -348
  220. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.js +0 -1
  221. package/legacy/SingleInputDateTimeRangeField/index.js +0 -2
  222. package/legacy/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +0 -35
  223. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +0 -321
  224. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.types.js +0 -1
  225. package/legacy/SingleInputTimeRangeField/index.js +0 -2
  226. package/legacy/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +0 -29
  227. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -276
  228. package/legacy/StaticDateRangePicker/StaticDateRangePicker.types.js +0 -1
  229. package/legacy/StaticDateRangePicker/index.js +0 -1
  230. package/legacy/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -87
  231. package/legacy/dateRangeViewRenderers/index.js +0 -1
  232. package/legacy/index.js +0 -52
  233. package/legacy/internals/constants/dimensions.js +0 -5
  234. package/legacy/internals/hooks/models/index.js +0 -1
  235. package/legacy/internals/hooks/models/useRangePicker.js +0 -1
  236. package/legacy/internals/hooks/useDesktopRangePicker/index.js +0 -1
  237. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +0 -154
  238. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.js +0 -1
  239. package/legacy/internals/hooks/useEnrichedRangePickerFieldProps.js +0 -258
  240. package/legacy/internals/hooks/useMobileRangePicker/index.js +0 -1
  241. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +0 -144
  242. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.js +0 -1
  243. package/legacy/internals/hooks/useMultiInputRangeField/shared.js +0 -9
  244. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +0 -102
  245. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +0 -115
  246. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.js +0 -1
  247. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +0 -109
  248. package/legacy/internals/hooks/useRangePosition.js +0 -39
  249. package/legacy/internals/hooks/useStaticRangePicker/index.js +0 -1
  250. package/legacy/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -76
  251. package/legacy/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.js +0 -1
  252. package/legacy/internals/models/dateRange.js +0 -1
  253. package/legacy/internals/models/dateTimeRange.js +0 -1
  254. package/legacy/internals/models/index.js +0 -5
  255. package/legacy/internals/models/rangePickerProps.js +0 -1
  256. package/legacy/internals/models/timeRange.js +0 -1
  257. package/legacy/internals/utils/date-fields-utils.js +0 -26
  258. package/legacy/internals/utils/date-range-manager.js +0 -65
  259. package/legacy/internals/utils/date-utils.js +0 -12
  260. package/legacy/internals/utils/releaseInfo.js +0 -13
  261. package/legacy/internals/utils/validation/validateDateRange.js +0 -45
  262. package/legacy/internals/utils/validation/validateDateTimeRange.js +0 -45
  263. package/legacy/internals/utils/validation/validateTimeRange.js +0 -32
  264. package/legacy/internals/utils/valueManagers.js +0 -135
  265. package/legacy/locales/index.js +0 -1
  266. package/legacy/models/index.js +0 -3
  267. package/legacy/models/multiInputRangeFieldClasses.js +0 -1
  268. package/legacy/models/range.js +0 -1
  269. package/legacy/models/validation.js +0 -1
  270. package/legacy/themeAugmentation/index.js +0 -4
  271. package/modern/internals/models/fields.js +0 -1
  272. /package/{internals/models → models}/fields.js +0 -0
  273. /package/{legacy/internals → modern}/models/fields.js +0 -0
  274. /package/node/{internals/models → models}/fields.js +0 -0
@@ -1,5 +1,4 @@
1
1
  export * from './dateRange';
2
2
  export * from './dateTimeRange';
3
3
  export * from './timeRange';
4
- export * from './fields';
5
4
  export * from './rangePickerProps';
@@ -1,13 +1,10 @@
1
- import { BaseTimeValidationProps, TimeValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
1
+ import { BaseTimeValidationProps, TimeValidationProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers/models';
3
- import { TimeRangeValidationError, DateRange } from '../../models';
4
- import { BaseRangeProps } from './dateRange';
5
- import { RangeFieldSection } from './fields';
6
- export interface UseTimeRangeFieldProps<TDate extends PickerValidDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, TimeRangeValidationError>, 'format'>, TimeValidationProps<TDate>, BaseTimeValidationProps, BaseRangeProps {
3
+ import { TimeRangeValidationError, RangeFieldSection, DateRange } from '../../models';
4
+ export interface UseTimeRangeFieldProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends MakeOptional<Omit<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, TEnableAccessibleFieldDOMStructure, TimeRangeValidationError>, 'unstableFieldRef'>, 'format'>, TimeValidationProps<TDate>, BaseTimeValidationProps {
7
5
  /**
8
6
  * 12h/24h view for hour selection clock.
9
7
  * @default `utils.is12HourCycleInCurrentLocale()`
10
8
  */
11
9
  ampm?: boolean;
12
10
  }
13
- export type UseTimeRangeFieldDefaultizedProps<TDate extends PickerValidDate> = DefaultizedProps<UseTimeRangeFieldProps<TDate>, keyof BaseTimeValidationProps | 'format'>;
@@ -1,4 +1,4 @@
1
- import { RangeFieldSection } from '../models/fields';
1
+ import { RangeFieldSection } from '../../models';
2
2
  export declare const splitDateRangeSections: (sections: RangeFieldSection[]) => {
3
3
  startDate: RangeFieldSection[];
4
4
  endDate: RangeFieldSection[];
@@ -15,10 +15,6 @@ export declare const removeLastSeparator: (dateSections: RangeFieldSection[]) =>
15
15
  hasLeadingZerosInFormat: boolean;
16
16
  hasLeadingZerosInInput: boolean;
17
17
  modified: boolean;
18
- start: number;
19
- end: number;
20
- startInInput: number;
21
- endInInput: number;
22
18
  startSeparator: string;
23
19
  endSeparator: string;
24
20
  })[];
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTcwNzQyOTYwMDAwMA==";
3
+ const releaseInfo = "MTcwODYyODQwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -1,7 +1,6 @@
1
1
  import { PickerValueManager, FieldValueManager } from '@mui/x-date-pickers/internals';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers/models';
3
- import type { DateRangeValidationError, DateTimeRangeValidationError, TimeRangeValidationError, DateRange } from '../../models';
4
- import { RangeFieldSection } from '../models/fields';
3
+ import type { DateRangeValidationError, DateTimeRangeValidationError, TimeRangeValidationError, RangeFieldSection, DateRange } from '../../models';
5
4
  export type RangePickerValueManager<TValue = [any, any], TDate extends PickerValidDate = any, TError extends DateRangeValidationError | TimeRangeValidationError | DateTimeRangeValidationError = any> = PickerValueManager<TValue, TDate, TError>;
6
5
  export declare const rangeValueManager: RangePickerValueManager;
7
6
  export declare const rangeFieldValueManager: FieldValueManager<DateRange<any>, any, RangeFieldSection>;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["value", "referenceDate"];
4
- import { replaceInvalidDateByNull, addPositionPropertiesToSections, createDateStrForInputFromSections, areDatesEqual, getTodayDate, getDefaultReferenceDate } from '@mui/x-date-pickers/internals';
4
+ import { replaceInvalidDateByNull, createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections, areDatesEqual, getTodayDate, getDefaultReferenceDate } from '@mui/x-date-pickers/internals';
5
5
  import { splitDateRangeSections, removeLastSeparator } from './date-fields-utils';
6
6
  export const rangeValueManager = {
7
7
  emptyValue: [null, null],
@@ -50,7 +50,7 @@ export const rangeFieldValueManager = {
50
50
  }
51
51
  return [prevReferenceValue[1], value[1]];
52
52
  },
53
- getSectionsFromValue: (utils, [start, end], fallbackSections, localizedDigits, isRTL, getSectionsFromDate) => {
53
+ getSectionsFromValue: (utils, [start, end], fallbackSections, getSectionsFromDate) => {
54
54
  const separatedFallbackSections = fallbackSections == null ? {
55
55
  startDate: null,
56
56
  endDate: null
@@ -65,7 +65,8 @@ export const rangeFieldValueManager = {
65
65
  if (sectionIndex === sections.length - 1 && position === 'start') {
66
66
  return _extends({}, section, {
67
67
  dateName: position,
68
- endSeparator: `${section.endSeparator}${isRTL ? '\u2069 \u2066' : ' – '}`
68
+ // TODO: Check if RTL still works
69
+ endSeparator: `${section.endSeparator} – `
69
70
  });
70
71
  }
71
72
  return _extends({}, section, {
@@ -73,11 +74,15 @@ export const rangeFieldValueManager = {
73
74
  });
74
75
  });
75
76
  };
76
- return addPositionPropertiesToSections([...getSections(start, separatedFallbackSections.startDate, 'start'), ...getSections(end, separatedFallbackSections.endDate, 'end')], localizedDigits, isRTL);
77
+ return [...getSections(start, separatedFallbackSections.startDate, 'start'), ...getSections(end, separatedFallbackSections.endDate, 'end')];
77
78
  },
78
- getValueStrFromSections: (sections, localizedDigits, isRTL) => {
79
+ getV7HiddenInputValueFromSections: sections => {
79
80
  const dateRangeSections = splitDateRangeSections(sections);
80
- return createDateStrForInputFromSections([...dateRangeSections.startDate, ...dateRangeSections.endDate], localizedDigits, isRTL);
81
+ return createDateStrForV7HiddenInputFromSections([...dateRangeSections.startDate, ...dateRangeSections.endDate]);
82
+ },
83
+ getV6InputValueFromSections: (sections, localizedDigits, isRTL) => {
84
+ const dateRangeSections = splitDateRangeSections(sections);
85
+ return createDateStrForV6InputFromSections([...dateRangeSections.startDate, ...dateRangeSections.endDate], localizedDigits, isRTL);
81
86
  },
82
87
  parseValueStr: (valueStr, referenceValue, parseDate) => {
83
88
  // TODO: Improve because it would not work if the date format has `–` as a separator.
@@ -0,0 +1,69 @@
1
+ import * as React from 'react';
2
+ import { SlotComponentProps } from '@mui/base/utils';
3
+ import { BaseFieldProps, UseFieldResponse } from '@mui/x-date-pickers/internals';
4
+ import { BaseSingleInputPickersTextFieldProps, FieldRef, FieldSection, PickerValidDate } from '@mui/x-date-pickers/models';
5
+ import { UseClearableFieldResponse } from '@mui/x-date-pickers/hooks';
6
+ import { SxProps } from '@mui/material/styles';
7
+ export interface RangeFieldSection extends FieldSection {
8
+ dateName: 'start' | 'end';
9
+ }
10
+ export type FieldType = 'single-input' | 'multi-input';
11
+ /**
12
+ * Props the `textField` slot of the multi input field can receive when used inside a picker.
13
+ */
14
+ export interface MultiInputFieldSlotTextFieldProps {
15
+ label?: React.ReactNode;
16
+ id?: string;
17
+ disabled?: boolean;
18
+ readOnly?: boolean;
19
+ onKeyDown?: React.KeyboardEventHandler;
20
+ onClick?: React.MouseEventHandler;
21
+ onFocus?: React.FocusEventHandler;
22
+ focused?: boolean;
23
+ InputProps?: {
24
+ ref?: React.Ref<any>;
25
+ endAdornment?: React.ReactNode;
26
+ startAdornment?: React.ReactNode;
27
+ };
28
+ }
29
+ /**
30
+ * Props the `root` slot of the multi input field can receive when used inside a picker.
31
+ */
32
+ export interface MultiInputFieldSlotRootProps {
33
+ onBlur?: React.FocusEventHandler;
34
+ }
35
+ export interface MultiInputFieldRefs {
36
+ unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
37
+ unstableEndFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
38
+ }
39
+ /**
40
+ * Props the multi input field can receive when used inside a picker.
41
+ * Only contains what the MUI components are passing to the field,
42
+ * not what users can pass using the `props.slotProps.field`.
43
+ */
44
+ export interface BaseMultiInputFieldProps<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TEnableAccessibleFieldDOMStructure extends boolean, TError> extends Omit<BaseFieldProps<TValue, TDate, TSection, TEnableAccessibleFieldDOMStructure, TError>, 'unstableFieldRef'> {
45
+ sx?: SxProps<any>;
46
+ unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
47
+ unstableEndFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
48
+ slots?: {
49
+ root?: React.ElementType;
50
+ separator?: React.ElementType;
51
+ textField?: React.ElementType;
52
+ };
53
+ slotProps?: {
54
+ root?: SlotComponentProps<React.ElementType<MultiInputFieldSlotRootProps>, {}, Record<string, any>>;
55
+ textField?: SlotComponentProps<React.ElementType<MultiInputFieldSlotTextFieldProps>, {}, {
56
+ position?: 'start' | 'end';
57
+ } & Record<string, any>>;
58
+ };
59
+ }
60
+ /**
61
+ * Props the text field receives when used with a multi input picker.
62
+ * Only contains what the MUI components are passing to the text field, not what users can pass using the `props.slotProps.textField`.
63
+ */
64
+ export type BaseMultiInputPickersTextFieldProps<TEnableAccessibleFieldDOMStructure extends boolean> = UseClearableFieldResponse<UseFieldResponse<TEnableAccessibleFieldDOMStructure, MultiInputFieldSlotTextFieldProps>>;
65
+ /**
66
+ * Props the text field receives when used with a single or multi input picker.
67
+ * Only contains what the MUI components are passing to the text field, not what users can pass using the `props.slotProps.field` or `props.slotProps.textField`.
68
+ */
69
+ export type BasePickersTextFieldProps<TEnableAccessibleFieldDOMStructure extends boolean> = BaseSingleInputPickersTextFieldProps<TEnableAccessibleFieldDOMStructure> & BaseMultiInputPickersTextFieldProps<TEnableAccessibleFieldDOMStructure>;
package/models/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './fields';
1
2
  export * from './range';
2
3
  export * from './validation';
3
4
  export * from './multiInputRangeFieldClasses';
package/models/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './fields';
1
2
  export * from './range';
2
3
  export * from './validation';
3
4
  export * from './multiInputRangeFieldClasses';
@@ -526,6 +526,9 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
526
526
  * @default 2
527
527
  */
528
528
  calendars: PropTypes.oneOf([1, 2, 3]),
529
+ /**
530
+ * Override or extend the styles applied to the component.
531
+ */
529
532
  classes: PropTypes.object,
530
533
  className: PropTypes.string,
531
534
  /**
@@ -588,7 +591,6 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
588
591
  /**
589
592
  * The day view will show as many weeks as needed after the end of the current month to match this value.
590
593
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
591
- * @default undefined
592
594
  */
593
595
  fixedWeekNumber: PropTypes.number,
594
596
  /**
@@ -133,10 +133,13 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
133
133
  * If `true`, the week number will be display in the calendar.
134
134
  */
135
135
  displayWeekNumber: PropTypes.bool,
136
+ /**
137
+ * @default false
138
+ */
139
+ enableAccessibleFieldDOMStructure: PropTypes.any,
136
140
  /**
137
141
  * The day view will show as many weeks as needed after the end of the current month to match this value.
138
142
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
139
- * @default undefined
140
143
  */
141
144
  fixedWeekNumber: PropTypes.number,
142
145
  /**
@@ -263,17 +266,14 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
263
266
  renderLoading: PropTypes.func,
264
267
  /**
265
268
  * The currently selected sections.
266
- * This prop accept four formats:
269
+ * This prop accepts four formats:
267
270
  * 1. If a number is provided, the section at this index will be selected.
268
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
269
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
270
- * 4. If `null` is provided, no section will be selected
271
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
272
+ * 3. If `"all"` is provided, all the sections will be selected.
273
+ * 4. If `null` is provided, no section will be selected.
271
274
  * If not provided, the selected sections will be handled internally.
272
275
  */
273
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
274
- endIndex: PropTypes.number.isRequired,
275
- startIndex: PropTypes.number.isRequired
276
- })]),
276
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
277
277
  /**
278
278
  * Disable specific date.
279
279
  *
@@ -93,6 +93,9 @@ process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
93
93
  // | These PropTypes are generated from the TypeScript type definitions |
94
94
  // | To update them edit the TypeScript types and run "yarn proptypes" |
95
95
  // ----------------------------------------------------------------------
96
+ /**
97
+ * Override or extend the styles applied to the component.
98
+ */
96
99
  classes: PropTypes.object,
97
100
  className: PropTypes.string,
98
101
  disabled: PropTypes.bool,
@@ -104,6 +107,9 @@ process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
104
107
  onRangePositionChange: PropTypes.func.isRequired,
105
108
  rangePosition: PropTypes.oneOf(['end', 'start']).isRequired,
106
109
  readOnly: PropTypes.bool,
110
+ /**
111
+ * The system prop that allows defining system overrides as well as additional CSS styles.
112
+ */
107
113
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
108
114
  titleId: PropTypes.string,
109
115
  /**
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["desktopModeMediaQuery"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
+ import { refType } from '@mui/utils';
6
7
  import useMediaQuery from '@mui/material/useMediaQuery';
7
8
  import { useThemeProps } from '@mui/material/styles';
8
9
  import { DesktopDateTimeRangePicker } from '../DesktopDateTimeRangePicker';
@@ -132,10 +133,13 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
132
133
  * If `true`, the week number will be display in the calendar.
133
134
  */
134
135
  displayWeekNumber: PropTypes.bool,
136
+ /**
137
+ * @default false
138
+ */
139
+ enableAccessibleFieldDOMStructure: PropTypes.any,
135
140
  /**
136
141
  * The day view will show as many weeks as needed after the end of the current month to match this value.
137
142
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
138
- * @default undefined
139
143
  */
140
144
  fixedWeekNumber: PropTypes.number,
141
145
  /**
@@ -153,9 +157,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
153
157
  * Pass a ref to the `input` element.
154
158
  * Ignored if the field has several inputs.
155
159
  */
156
- inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
157
- current: PropTypes.object
158
- })]),
160
+ inputRef: refType,
159
161
  /**
160
162
  * The label content.
161
163
  * Ignored if the field has several inputs.
@@ -299,17 +301,14 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
299
301
  renderLoading: PropTypes.func,
300
302
  /**
301
303
  * The currently selected sections.
302
- * This prop accept four formats:
304
+ * This prop accepts four formats:
303
305
  * 1. If a number is provided, the section at this index will be selected.
304
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
305
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
306
- * 4. If `null` is provided, no section will be selected
306
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
307
+ * 3. If `"all"` is provided, all the sections will be selected.
308
+ * 4. If `null` is provided, no section will be selected.
307
309
  * If not provided, the selected sections will be handled internally.
308
310
  */
309
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
310
- endIndex: PropTypes.number.isRequired,
311
- startIndex: PropTypes.number.isRequired
312
- })]),
311
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
313
312
  /**
314
313
  * Disable specific date.
315
314
  *
@@ -76,7 +76,8 @@ const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
76
76
  hidden = typeof window === 'undefined' || window.innerHeight < 667,
77
77
  rangePosition,
78
78
  onRangePositionChange,
79
- className
79
+ className,
80
+ sx
80
81
  } = props;
81
82
  const localeText = useLocaleText();
82
83
  const classes = useUtilityClasses(props);
@@ -120,6 +121,7 @@ const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
120
121
  return /*#__PURE__*/_jsxs(DateTimeRangePickerTabsRoot, {
121
122
  ownerState: props,
122
123
  className: clsx(classes.root, className),
124
+ sx: sx,
123
125
  children: [!isPreviousHidden ? /*#__PURE__*/_jsx(IconButton, {
124
126
  onClick: changeToPreviousTab,
125
127
  className: classes.navigationButton,
@@ -170,6 +172,10 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerTabs.propTypes = {
170
172
  */
171
173
  onViewChange: PropTypes.func.isRequired,
172
174
  rangePosition: PropTypes.oneOf(['end', 'start']).isRequired,
175
+ /**
176
+ * The system prop that allows defining system overrides as well as additional CSS styles.
177
+ */
178
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
173
179
  /**
174
180
  * Time tab icon.
175
181
  * @default TimeIcon
@@ -135,6 +135,9 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
135
135
  // | To update them edit the TypeScript types and run "yarn proptypes" |
136
136
  // ----------------------------------------------------------------------
137
137
  ampm: PropTypes.bool,
138
+ /**
139
+ * Override or extend the styles applied to the component.
140
+ */
138
141
  classes: PropTypes.object,
139
142
  className: PropTypes.string,
140
143
  disabled: PropTypes.bool,
@@ -154,6 +157,9 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
154
157
  onViewChange: PropTypes.func.isRequired,
155
158
  rangePosition: PropTypes.oneOf(['end', 'start']).isRequired,
156
159
  readOnly: PropTypes.bool,
160
+ /**
161
+ * The system prop that allows defining system overrides as well as additional CSS styles.
162
+ */
157
163
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
158
164
  titleId: PropTypes.string,
159
165
  /**
@@ -138,10 +138,13 @@ DesktopDateRangePicker.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
  /**
@@ -268,17 +271,14 @@ DesktopDateRangePicker.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
  *
@@ -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';
@@ -201,10 +202,13 @@ DesktopDateTimeRangePicker.propTypes = {
201
202
  * If `true`, the week number will be display in the calendar.
202
203
  */
203
204
  displayWeekNumber: PropTypes.bool,
205
+ /**
206
+ * @default false
207
+ */
208
+ enableAccessibleFieldDOMStructure: PropTypes.any,
204
209
  /**
205
210
  * The day view will show as many weeks as needed after the end of the current month to match this value.
206
211
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
207
- * @default undefined
208
212
  */
209
213
  fixedWeekNumber: PropTypes.number,
210
214
  /**
@@ -222,9 +226,7 @@ DesktopDateTimeRangePicker.propTypes = {
222
226
  * Pass a ref to the `input` element.
223
227
  * Ignored if the field has several inputs.
224
228
  */
225
- inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
226
- current: PropTypes.object
227
- })]),
229
+ inputRef: refType,
228
230
  /**
229
231
  * The label content.
230
232
  * Ignored if the field has several inputs.
@@ -368,17 +370,14 @@ DesktopDateTimeRangePicker.propTypes = {
368
370
  renderLoading: PropTypes.func,
369
371
  /**
370
372
  * The currently selected sections.
371
- * This prop accept four formats:
373
+ * This prop accepts four formats:
372
374
  * 1. If a number is provided, the section at this index will be selected.
373
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
374
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
375
- * 4. If `null` is provided, no section will be selected
375
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
376
+ * 3. If `"all"` is provided, all the sections will be selected.
377
+ * 4. If `null` is provided, no section will be selected.
376
378
  * If not provided, the selected sections will be handled internally.
377
379
  */
378
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
379
- endIndex: PropTypes.number.isRequired,
380
- startIndex: PropTypes.number.isRequired
381
- })]),
380
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
382
381
  /**
383
382
  * Disable specific date.
384
383
  *
@@ -134,10 +134,13 @@ MobileDateRangePicker.propTypes = {
134
134
  * If `true`, the week number will be display in the calendar.
135
135
  */
136
136
  displayWeekNumber: PropTypes.bool,
137
+ /**
138
+ * @default false
139
+ */
140
+ enableAccessibleFieldDOMStructure: PropTypes.any,
137
141
  /**
138
142
  * The day view will show as many weeks as needed after the end of the current month to match this value.
139
143
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
140
- * @default undefined
141
144
  */
142
145
  fixedWeekNumber: PropTypes.number,
143
146
  /**
@@ -264,17 +267,14 @@ MobileDateRangePicker.propTypes = {
264
267
  renderLoading: PropTypes.func,
265
268
  /**
266
269
  * The currently selected sections.
267
- * This prop accept four formats:
270
+ * This prop accepts four formats:
268
271
  * 1. If a number is provided, the section at this index will be selected.
269
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
270
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
271
- * 4. If `null` is provided, no section will be selected
272
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
273
+ * 3. If `"all"` is provided, all the sections will be selected.
274
+ * 4. If `null` is provided, no section will be selected.
272
275
  * If not provided, the selected sections will be handled internally.
273
276
  */
274
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
275
- endIndex: PropTypes.number.isRequired,
276
- startIndex: PropTypes.number.isRequired
277
- })]),
277
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
278
278
  /**
279
279
  * Disable specific date.
280
280
  *
@@ -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';
@@ -204,10 +205,13 @@ MobileDateTimeRangePicker.propTypes = {
204
205
  * If `true`, the week number will be display in the calendar.
205
206
  */
206
207
  displayWeekNumber: PropTypes.bool,
208
+ /**
209
+ * @default false
210
+ */
211
+ enableAccessibleFieldDOMStructure: PropTypes.any,
207
212
  /**
208
213
  * The day view will show as many weeks as needed after the end of the current month to match this value.
209
214
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
210
- * @default undefined
211
215
  */
212
216
  fixedWeekNumber: PropTypes.number,
213
217
  /**
@@ -225,9 +229,7 @@ MobileDateTimeRangePicker.propTypes = {
225
229
  * Pass a ref to the `input` element.
226
230
  * Ignored if the field has several inputs.
227
231
  */
228
- inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
229
- current: PropTypes.object
230
- })]),
232
+ inputRef: refType,
231
233
  /**
232
234
  * The label content.
233
235
  * Ignored if the field has several inputs.
@@ -371,17 +373,14 @@ MobileDateTimeRangePicker.propTypes = {
371
373
  renderLoading: PropTypes.func,
372
374
  /**
373
375
  * The currently selected sections.
374
- * This prop accept four formats:
376
+ * This prop accepts four formats:
375
377
  * 1. If a number is provided, the section at this index will be selected.
376
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
377
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
378
- * 4. If `null` is provided, no section will be selected
378
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
379
+ * 3. If `"all"` is provided, all the sections will be selected.
380
+ * 4. If `null` is provided, no section will be selected.
379
381
  * If not provided, the selected sections will be handled internally.
380
382
  */
381
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
382
- endIndex: PropTypes.number.isRequired,
383
- startIndex: PropTypes.number.isRequired
384
- })]),
383
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
385
384
  /**
386
385
  * Disable specific date.
387
386
  *