@mui/x-date-pickers 7.0.0-alpha.8 → 7.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/AdapterLuxon/AdapterLuxon.d.ts +1 -1
  2. package/AdapterLuxon/AdapterLuxon.js +4 -12
  3. package/CHANGELOG.md +508 -30
  4. package/DatePicker/DatePicker.js +0 -3
  5. package/DatePicker/DatePickerToolbar.js +0 -3
  6. package/DateTimePicker/DateTimePicker.js +0 -3
  7. package/DateTimePicker/DateTimePickerTabs.js +7 -4
  8. package/DateTimePicker/DateTimePickerToolbar.d.ts +6 -1
  9. package/DateTimePicker/DateTimePickerToolbar.js +33 -20
  10. package/DesktopDatePicker/DesktopDatePicker.js +0 -3
  11. package/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
  12. package/DesktopTimePicker/DesktopTimePicker.js +0 -3
  13. package/MobileDatePicker/MobileDatePicker.js +0 -3
  14. package/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
  15. package/MobileTimePicker/MobileTimePicker.js +0 -3
  16. package/MonthCalendar/MonthCalendar.js +0 -3
  17. package/MonthCalendar/MonthCalendar.types.d.ts +0 -3
  18. package/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
  19. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +0 -3
  20. package/PickersLayout/PickersLayout.types.d.ts +6 -5
  21. package/PickersLayout/pickersLayoutClasses.js +3 -2
  22. package/PickersLayout/usePickerLayout.d.ts +2 -2
  23. package/PickersLayout/usePickerLayout.js +2 -1
  24. package/PickersSectionList/PickersSectionList.js +6 -1
  25. package/PickersTextField/PickersFilledInput/PickersFilledInput.d.ts +11 -0
  26. package/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +98 -25
  27. package/PickersTextField/PickersFilledInput/index.d.ts +4 -0
  28. package/PickersTextField/PickersFilledInput/index.js +2 -0
  29. package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +23 -0
  30. package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
  31. package/PickersTextField/PickersInput/PickersInput.d.ts +10 -0
  32. package/PickersTextField/PickersInput/PickersInput.js +196 -0
  33. package/{internals/components → PickersTextField}/PickersInput/index.d.ts +2 -2
  34. package/PickersTextField/PickersInput/index.js +2 -0
  35. package/PickersTextField/PickersInput/pickersInputClasses.d.ts +22 -0
  36. package/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
  37. package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +16 -0
  38. package/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
  39. package/{internals/components/PickersInput/PickersInput.types.d.ts → PickersTextField/PickersInputBase/PickersInputBase.types.d.ts} +3 -13
  40. package/PickersTextField/PickersInputBase/index.d.ts +4 -0
  41. package/PickersTextField/PickersInputBase/index.js +2 -0
  42. package/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +31 -0
  43. package/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
  44. package/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.d.ts +3 -0
  45. package/{modern/internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
  46. package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.d.ts +10 -0
  47. package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +190 -0
  48. package/PickersTextField/PickersOutlinedInput/index.d.ts +4 -0
  49. package/PickersTextField/PickersOutlinedInput/index.js +2 -0
  50. package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +22 -0
  51. package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
  52. package/PickersTextField/PickersTextField.d.ts +3 -0
  53. package/PickersTextField/PickersTextField.js +258 -0
  54. package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.d.ts +5 -2
  55. package/PickersTextField/index.d.ts +8 -0
  56. package/PickersTextField/index.js +6 -0
  57. package/PickersTextField/package.json +6 -0
  58. package/README.md +3 -3
  59. package/StaticDatePicker/StaticDatePicker.js +0 -3
  60. package/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
  61. package/StaticTimePicker/StaticTimePicker.js +0 -3
  62. package/TimeClock/TimeClock.js +3 -3
  63. package/TimePicker/TimePicker.js +0 -3
  64. package/TimePicker/TimePickerToolbar.js +0 -3
  65. package/YearCalendar/YearCalendar.js +0 -3
  66. package/YearCalendar/YearCalendar.types.d.ts +0 -3
  67. package/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
  68. package/index.d.ts +2 -1
  69. package/index.js +3 -2
  70. package/internals/hooks/useField/useField.js +6 -4
  71. package/internals/hooks/useField/useField.types.d.ts +4 -2
  72. package/internals/hooks/useField/useField.utils.d.ts +19 -9
  73. package/internals/hooks/useField/useField.utils.js +68 -21
  74. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +2 -1
  75. package/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
  76. package/internals/hooks/useField/useFieldState.d.ts +1 -0
  77. package/internals/hooks/useField/useFieldState.js +9 -7
  78. package/internals/hooks/usePicker/usePicker.d.ts +1 -1
  79. package/internals/hooks/usePicker/usePicker.js +4 -2
  80. package/internals/hooks/usePicker/usePicker.types.d.ts +1 -1
  81. package/internals/hooks/usePicker/usePickerViews.d.ts +11 -2
  82. package/internals/hooks/usePicker/usePickerViews.js +8 -3
  83. package/internals/index.d.ts +4 -4
  84. package/internals/index.js +2 -2
  85. package/internals/models/props/basePickerProps.d.ts +0 -3
  86. package/internals/models/props/tabs.d.ts +2 -1
  87. package/internals/models/props/toolbar.d.ts +0 -3
  88. package/internals/utils/valueManagers.js +2 -2
  89. package/legacy/AdapterLuxon/AdapterLuxon.js +4 -12
  90. package/legacy/DatePicker/DatePicker.js +0 -3
  91. package/legacy/DatePicker/DatePickerToolbar.js +0 -3
  92. package/legacy/DateTimePicker/DateTimePicker.js +0 -3
  93. package/legacy/DateTimePicker/DateTimePickerTabs.js +7 -4
  94. package/legacy/DateTimePicker/DateTimePickerToolbar.js +43 -32
  95. package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -3
  96. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
  97. package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -3
  98. package/legacy/MobileDatePicker/MobileDatePicker.js +0 -3
  99. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
  100. package/legacy/MobileTimePicker/MobileTimePicker.js +0 -3
  101. package/legacy/MonthCalendar/MonthCalendar.js +0 -3
  102. package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
  103. package/legacy/PickersLayout/pickersLayoutClasses.js +3 -2
  104. package/legacy/PickersLayout/usePickerLayout.js +2 -1
  105. package/legacy/PickersSectionList/PickersSectionList.js +6 -1
  106. package/legacy/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +99 -26
  107. package/legacy/PickersTextField/PickersFilledInput/index.js +2 -0
  108. package/legacy/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
  109. package/legacy/PickersTextField/PickersInput/PickersInput.js +190 -0
  110. package/legacy/PickersTextField/PickersInput/index.js +2 -0
  111. package/legacy/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
  112. package/legacy/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
  113. package/legacy/PickersTextField/PickersInputBase/index.js +2 -0
  114. package/legacy/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
  115. package/legacy/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +7 -1
  116. package/legacy/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +183 -0
  117. package/legacy/PickersTextField/PickersOutlinedInput/index.js +2 -0
  118. package/legacy/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
  119. package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js +128 -8
  120. package/legacy/PickersTextField/index.js +6 -0
  121. package/legacy/StaticDatePicker/StaticDatePicker.js +0 -3
  122. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
  123. package/legacy/StaticTimePicker/StaticTimePicker.js +0 -3
  124. package/legacy/TimeClock/TimeClock.js +3 -3
  125. package/legacy/TimePicker/TimePicker.js +0 -3
  126. package/legacy/TimePicker/TimePickerToolbar.js +0 -3
  127. package/legacy/YearCalendar/YearCalendar.js +0 -3
  128. package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +5 -4
  129. package/legacy/index.js +3 -2
  130. package/legacy/internals/hooks/useField/useField.js +6 -4
  131. package/legacy/internals/hooks/useField/useField.utils.js +71 -20
  132. package/legacy/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
  133. package/legacy/internals/hooks/useField/useFieldState.js +15 -11
  134. package/legacy/internals/hooks/usePicker/usePicker.js +4 -2
  135. package/legacy/internals/hooks/usePicker/usePickerViews.js +8 -3
  136. package/legacy/internals/index.js +2 -2
  137. package/legacy/internals/utils/valueManagers.js +2 -2
  138. package/legacy/locales/beBY.js +8 -3
  139. package/legacy/locales/caES.js +7 -2
  140. package/legacy/locales/csCZ.js +8 -3
  141. package/legacy/locales/daDK.js +8 -3
  142. package/legacy/locales/deDE.js +6 -1
  143. package/legacy/locales/elGR.js +8 -3
  144. package/legacy/locales/enUS.js +7 -3
  145. package/legacy/locales/esES.js +8 -3
  146. package/legacy/locales/eu.js +6 -1
  147. package/legacy/locales/faIR.js +6 -1
  148. package/legacy/locales/fiFI.js +8 -3
  149. package/legacy/locales/frFR.js +6 -1
  150. package/legacy/locales/heIL.js +6 -1
  151. package/legacy/locales/huHU.js +6 -1
  152. package/legacy/locales/isIS.js +8 -3
  153. package/legacy/locales/itIT.js +8 -3
  154. package/legacy/locales/jaJP.js +6 -1
  155. package/legacy/locales/koKR.js +6 -1
  156. package/legacy/locales/kzKZ.js +6 -1
  157. package/legacy/locales/mk.js +6 -1
  158. package/legacy/locales/nbNO.js +8 -3
  159. package/legacy/locales/nlNL.js +8 -3
  160. package/legacy/locales/plPL.js +8 -3
  161. package/legacy/locales/ptBR.js +6 -1
  162. package/legacy/locales/roRO.js +6 -1
  163. package/legacy/locales/ruRU.js +8 -3
  164. package/legacy/locales/skSK.js +8 -3
  165. package/legacy/locales/svSE.js +8 -3
  166. package/legacy/locales/trTR.js +8 -3
  167. package/legacy/locales/ukUA.js +8 -3
  168. package/legacy/locales/urPK.js +6 -1
  169. package/legacy/locales/viVN.js +8 -3
  170. package/legacy/locales/zhCN.js +6 -1
  171. package/legacy/locales/zhHK.js +6 -1
  172. package/locales/beBY.d.ts +4 -0
  173. package/locales/beBY.js +8 -3
  174. package/locales/caES.d.ts +4 -0
  175. package/locales/caES.js +7 -2
  176. package/locales/csCZ.d.ts +4 -0
  177. package/locales/csCZ.js +8 -3
  178. package/locales/daDK.d.ts +4 -0
  179. package/locales/daDK.js +8 -3
  180. package/locales/deDE.d.ts +4 -0
  181. package/locales/deDE.js +6 -1
  182. package/locales/elGR.d.ts +4 -0
  183. package/locales/elGR.js +8 -3
  184. package/locales/enUS.d.ts +4 -0
  185. package/locales/enUS.js +7 -3
  186. package/locales/esES.d.ts +4 -0
  187. package/locales/esES.js +8 -3
  188. package/locales/eu.d.ts +4 -0
  189. package/locales/eu.js +6 -1
  190. package/locales/faIR.d.ts +4 -0
  191. package/locales/faIR.js +6 -1
  192. package/locales/fiFI.d.ts +4 -0
  193. package/locales/fiFI.js +8 -3
  194. package/locales/frFR.d.ts +4 -0
  195. package/locales/frFR.js +6 -1
  196. package/locales/heIL.d.ts +4 -0
  197. package/locales/heIL.js +6 -1
  198. package/locales/huHU.d.ts +4 -0
  199. package/locales/huHU.js +6 -1
  200. package/locales/isIS.d.ts +4 -0
  201. package/locales/isIS.js +8 -3
  202. package/locales/itIT.d.ts +4 -0
  203. package/locales/itIT.js +8 -3
  204. package/locales/jaJP.d.ts +4 -0
  205. package/locales/jaJP.js +6 -1
  206. package/locales/koKR.d.ts +4 -0
  207. package/locales/koKR.js +6 -1
  208. package/locales/kzKZ.d.ts +4 -0
  209. package/locales/kzKZ.js +6 -1
  210. package/locales/mk.d.ts +4 -0
  211. package/locales/mk.js +6 -1
  212. package/locales/nbNO.d.ts +4 -0
  213. package/locales/nbNO.js +8 -3
  214. package/locales/nlNL.d.ts +4 -0
  215. package/locales/nlNL.js +8 -3
  216. package/locales/plPL.d.ts +4 -0
  217. package/locales/plPL.js +8 -3
  218. package/locales/ptBR.d.ts +4 -0
  219. package/locales/ptBR.js +6 -1
  220. package/locales/roRO.d.ts +4 -0
  221. package/locales/roRO.js +6 -1
  222. package/locales/ruRU.d.ts +4 -0
  223. package/locales/ruRU.js +8 -3
  224. package/locales/skSK.d.ts +4 -0
  225. package/locales/skSK.js +8 -3
  226. package/locales/svSE.d.ts +4 -0
  227. package/locales/svSE.js +8 -3
  228. package/locales/trTR.d.ts +4 -0
  229. package/locales/trTR.js +8 -3
  230. package/locales/ukUA.d.ts +4 -0
  231. package/locales/ukUA.js +8 -3
  232. package/locales/urPK.d.ts +4 -0
  233. package/locales/urPK.js +6 -1
  234. package/locales/utils/getPickersLocalization.d.ts +4 -0
  235. package/locales/utils/pickersLocaleTextApi.d.ts +4 -0
  236. package/locales/viVN.d.ts +4 -0
  237. package/locales/viVN.js +8 -3
  238. package/locales/zhCN.d.ts +4 -0
  239. package/locales/zhCN.js +6 -1
  240. package/locales/zhHK.d.ts +4 -0
  241. package/locales/zhHK.js +6 -1
  242. package/modern/AdapterLuxon/AdapterLuxon.js +3 -11
  243. package/modern/DatePicker/DatePicker.js +0 -3
  244. package/modern/DatePicker/DatePickerToolbar.js +0 -3
  245. package/modern/DateTimePicker/DateTimePicker.js +0 -3
  246. package/modern/DateTimePicker/DateTimePickerTabs.js +7 -4
  247. package/modern/DateTimePicker/DateTimePickerToolbar.js +33 -20
  248. package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -3
  249. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
  250. package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -3
  251. package/modern/MobileDatePicker/MobileDatePicker.js +0 -3
  252. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
  253. package/modern/MobileTimePicker/MobileTimePicker.js +0 -3
  254. package/modern/MonthCalendar/MonthCalendar.js +0 -3
  255. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
  256. package/modern/PickersLayout/pickersLayoutClasses.js +3 -2
  257. package/modern/PickersLayout/usePickerLayout.js +2 -1
  258. package/modern/PickersSectionList/PickersSectionList.js +6 -1
  259. package/modern/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +98 -25
  260. package/modern/PickersTextField/PickersFilledInput/index.js +2 -0
  261. package/modern/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
  262. package/modern/PickersTextField/PickersInput/PickersInput.js +196 -0
  263. package/modern/PickersTextField/PickersInput/index.js +2 -0
  264. package/modern/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
  265. package/modern/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
  266. package/modern/PickersTextField/PickersInputBase/index.js +2 -0
  267. package/modern/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
  268. package/{internals/components/PickersInput → modern/PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
  269. package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +190 -0
  270. package/modern/PickersTextField/PickersOutlinedInput/index.js +2 -0
  271. package/modern/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
  272. package/modern/PickersTextField/PickersTextField.js +258 -0
  273. package/modern/PickersTextField/index.js +6 -0
  274. package/modern/StaticDatePicker/StaticDatePicker.js +0 -3
  275. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
  276. package/modern/StaticTimePicker/StaticTimePicker.js +0 -3
  277. package/modern/TimeClock/TimeClock.js +3 -3
  278. package/modern/TimePicker/TimePicker.js +0 -3
  279. package/modern/TimePicker/TimePickerToolbar.js +0 -3
  280. package/modern/YearCalendar/YearCalendar.js +0 -3
  281. package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
  282. package/modern/index.js +3 -2
  283. package/modern/internals/hooks/useField/useField.js +5 -3
  284. package/modern/internals/hooks/useField/useField.utils.js +68 -21
  285. package/modern/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
  286. package/modern/internals/hooks/useField/useFieldState.js +9 -7
  287. package/modern/internals/hooks/usePicker/usePicker.js +4 -2
  288. package/modern/internals/hooks/usePicker/usePickerViews.js +8 -3
  289. package/modern/internals/index.js +2 -2
  290. package/modern/internals/utils/valueManagers.js +2 -2
  291. package/modern/locales/beBY.js +8 -3
  292. package/modern/locales/caES.js +7 -2
  293. package/modern/locales/csCZ.js +8 -3
  294. package/modern/locales/daDK.js +8 -3
  295. package/modern/locales/deDE.js +6 -1
  296. package/modern/locales/elGR.js +8 -3
  297. package/modern/locales/enUS.js +7 -3
  298. package/modern/locales/esES.js +8 -3
  299. package/modern/locales/eu.js +6 -1
  300. package/modern/locales/faIR.js +6 -1
  301. package/modern/locales/fiFI.js +8 -3
  302. package/modern/locales/frFR.js +6 -1
  303. package/modern/locales/heIL.js +6 -1
  304. package/modern/locales/huHU.js +6 -1
  305. package/modern/locales/isIS.js +8 -3
  306. package/modern/locales/itIT.js +8 -3
  307. package/modern/locales/jaJP.js +6 -1
  308. package/modern/locales/koKR.js +6 -1
  309. package/modern/locales/kzKZ.js +6 -1
  310. package/modern/locales/mk.js +6 -1
  311. package/modern/locales/nbNO.js +8 -3
  312. package/modern/locales/nlNL.js +8 -3
  313. package/modern/locales/plPL.js +8 -3
  314. package/modern/locales/ptBR.js +6 -1
  315. package/modern/locales/roRO.js +6 -1
  316. package/modern/locales/ruRU.js +8 -3
  317. package/modern/locales/skSK.js +8 -3
  318. package/modern/locales/svSE.js +8 -3
  319. package/modern/locales/trTR.js +8 -3
  320. package/modern/locales/ukUA.js +8 -3
  321. package/modern/locales/urPK.js +6 -1
  322. package/modern/locales/viVN.js +8 -3
  323. package/modern/locales/zhCN.js +6 -1
  324. package/modern/locales/zhHK.js +6 -1
  325. package/node/AdapterLuxon/AdapterLuxon.js +3 -11
  326. package/node/DatePicker/DatePicker.js +0 -3
  327. package/node/DatePicker/DatePickerToolbar.js +0 -3
  328. package/node/DateTimePicker/DateTimePicker.js +0 -3
  329. package/node/DateTimePicker/DateTimePickerTabs.js +8 -5
  330. package/node/DateTimePicker/DateTimePickerToolbar.js +34 -21
  331. package/node/DesktopDatePicker/DesktopDatePicker.js +0 -3
  332. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
  333. package/node/DesktopTimePicker/DesktopTimePicker.js +0 -3
  334. package/node/MobileDatePicker/MobileDatePicker.js +0 -3
  335. package/node/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
  336. package/node/MobileTimePicker/MobileTimePicker.js +0 -3
  337. package/node/MonthCalendar/MonthCalendar.js +0 -3
  338. package/node/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
  339. package/node/PickersLayout/pickersLayoutClasses.js +5 -3
  340. package/node/PickersLayout/usePickerLayout.js +2 -1
  341. package/node/PickersSectionList/PickersSectionList.js +6 -1
  342. package/node/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +102 -30
  343. package/node/PickersTextField/PickersFilledInput/index.js +25 -0
  344. package/node/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +16 -0
  345. package/node/PickersTextField/PickersInput/PickersInput.js +204 -0
  346. package/node/{internals/components → PickersTextField}/PickersInput/index.js +0 -7
  347. package/node/PickersTextField/PickersInput/pickersInputClasses.js +16 -0
  348. package/node/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +105 -27
  349. package/node/PickersTextField/PickersInputBase/index.js +25 -0
  350. package/node/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +14 -0
  351. package/node/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
  352. package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +197 -0
  353. package/node/PickersTextField/PickersOutlinedInput/index.js +25 -0
  354. package/node/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +16 -0
  355. package/node/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js +128 -9
  356. package/node/PickersTextField/index.js +78 -0
  357. package/node/StaticDatePicker/StaticDatePicker.js +0 -3
  358. package/node/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
  359. package/node/StaticTimePicker/StaticTimePicker.js +0 -3
  360. package/node/TimeClock/TimeClock.js +3 -3
  361. package/node/TimePicker/TimePicker.js +0 -3
  362. package/node/TimePicker/TimePickerToolbar.js +0 -3
  363. package/node/YearCalendar/YearCalendar.js +0 -3
  364. package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +4 -4
  365. package/node/index.js +17 -5
  366. package/node/internals/hooks/useField/useField.js +5 -3
  367. package/node/internals/hooks/useField/useField.utils.js +73 -22
  368. package/node/internals/hooks/useField/useFieldCharacterEditing.js +11 -7
  369. package/node/internals/hooks/useField/useFieldState.js +8 -6
  370. package/node/internals/hooks/usePicker/usePicker.js +4 -2
  371. package/node/internals/hooks/usePicker/usePickerViews.js +8 -3
  372. package/node/internals/index.js +12 -0
  373. package/node/internals/utils/valueManagers.js +2 -2
  374. package/node/locales/beBY.js +8 -3
  375. package/node/locales/caES.js +7 -2
  376. package/node/locales/csCZ.js +8 -3
  377. package/node/locales/daDK.js +8 -3
  378. package/node/locales/deDE.js +6 -1
  379. package/node/locales/elGR.js +8 -3
  380. package/node/locales/enUS.js +7 -3
  381. package/node/locales/esES.js +8 -3
  382. package/node/locales/eu.js +6 -1
  383. package/node/locales/faIR.js +6 -1
  384. package/node/locales/fiFI.js +8 -3
  385. package/node/locales/frFR.js +6 -1
  386. package/node/locales/heIL.js +6 -1
  387. package/node/locales/huHU.js +6 -1
  388. package/node/locales/isIS.js +8 -3
  389. package/node/locales/itIT.js +8 -3
  390. package/node/locales/jaJP.js +6 -1
  391. package/node/locales/koKR.js +6 -1
  392. package/node/locales/kzKZ.js +6 -1
  393. package/node/locales/mk.js +6 -1
  394. package/node/locales/nbNO.js +8 -3
  395. package/node/locales/nlNL.js +8 -3
  396. package/node/locales/plPL.js +8 -3
  397. package/node/locales/ptBR.js +6 -1
  398. package/node/locales/roRO.js +6 -1
  399. package/node/locales/ruRU.js +8 -3
  400. package/node/locales/skSK.js +8 -3
  401. package/node/locales/svSE.js +8 -3
  402. package/node/locales/trTR.js +8 -3
  403. package/node/locales/ukUA.js +8 -3
  404. package/node/locales/urPK.js +6 -1
  405. package/node/locales/viVN.js +8 -3
  406. package/node/locales/zhCN.js +6 -1
  407. package/node/locales/zhHK.js +6 -1
  408. package/package.json +7 -7
  409. package/themeAugmentation/components.d.ts +26 -0
  410. package/themeAugmentation/overrides.d.ts +16 -0
  411. package/themeAugmentation/props.d.ts +16 -0
  412. package/timeViewRenderers/timeViewRenderers.d.ts +1 -1
  413. package/internals/components/PickersInput/PickersFilledInput.d.ts +0 -3
  414. package/internals/components/PickersInput/PickersInput.d.ts +0 -13
  415. package/internals/components/PickersInput/PickersOutlinedInput.d.ts +0 -3
  416. package/internals/components/PickersInput/PickersOutlinedInput.js +0 -117
  417. package/internals/components/PickersInput/PickersStandardInput.d.ts +0 -3
  418. package/internals/components/PickersInput/PickersStandardInput.js +0 -123
  419. package/internals/components/PickersInput/index.js +0 -3
  420. package/internals/components/PickersInput/pickersInputClasses.d.ts +0 -84
  421. package/internals/components/PickersInput/pickersInputClasses.js +0 -18
  422. package/internals/components/PickersTextField/PickersTextField.d.ts +0 -2
  423. package/internals/components/PickersTextField/PickersTextField.js +0 -138
  424. package/internals/components/PickersTextField/index.d.ts +0 -1
  425. package/internals/components/PickersTextField/index.js +0 -1
  426. package/legacy/internals/components/PickersInput/PickersOutlinedInput.js +0 -110
  427. package/legacy/internals/components/PickersInput/PickersStandardInput.js +0 -117
  428. package/legacy/internals/components/PickersInput/index.js +0 -3
  429. package/legacy/internals/components/PickersInput/pickersInputClasses.js +0 -18
  430. package/legacy/internals/components/PickersTextField/index.js +0 -1
  431. package/modern/internals/components/PickersInput/PickersOutlinedInput.js +0 -117
  432. package/modern/internals/components/PickersInput/PickersStandardInput.js +0 -123
  433. package/modern/internals/components/PickersInput/index.js +0 -3
  434. package/modern/internals/components/PickersInput/pickersInputClasses.js +0 -18
  435. package/modern/internals/components/PickersTextField/PickersTextField.js +0 -138
  436. package/modern/internals/components/PickersTextField/index.js +0 -1
  437. package/node/internals/components/PickersInput/PickersOutlinedInput.js +0 -125
  438. package/node/internals/components/PickersInput/PickersStandardInput.js +0 -132
  439. package/node/internals/components/PickersInput/pickersInputClasses.js +0 -29
  440. package/node/internals/components/PickersTextField/index.js +0 -12
  441. /package/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
  442. /package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
  443. /package/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.d.ts +0 -0
  444. /package/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
  445. /package/legacy/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
  446. /package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
  447. /package/legacy/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
  448. /package/modern/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
  449. /package/modern/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
  450. /package/modern/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
  451. /package/node/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
  452. /package/node/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
  453. /package/node/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
@@ -72,7 +72,58 @@ export var getLetterEditingOptions = function getLetterEditingOptions(utils, tim
72
72
  }
73
73
  }
74
74
  };
75
- export var cleanLeadingZeros = function cleanLeadingZeros(utils, valueStr, size) {
75
+
76
+ // This format should be the same on all the adapters
77
+ // If some adapter does not respect this convention, then we will need to hardcode the format on each adapter.
78
+ export var FORMAT_SECONDS_NO_LEADING_ZEROS = 's';
79
+ var NON_LOCALIZED_DIGITS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
80
+ export var getLocalizedDigits = function getLocalizedDigits(utils) {
81
+ var today = utils.date(undefined);
82
+ var formattedZero = utils.formatByString(utils.setSeconds(today, 0), FORMAT_SECONDS_NO_LEADING_ZEROS);
83
+ if (formattedZero === '0') {
84
+ return NON_LOCALIZED_DIGITS;
85
+ }
86
+ return Array.from({
87
+ length: 10
88
+ }).map(function (_, index) {
89
+ return utils.formatByString(utils.setSeconds(today, index), FORMAT_SECONDS_NO_LEADING_ZEROS);
90
+ });
91
+ };
92
+ export var removeLocalizedDigits = function removeLocalizedDigits(valueStr, localizedDigits) {
93
+ if (localizedDigits[0] === '0') {
94
+ return valueStr;
95
+ }
96
+ var digits = [];
97
+ var currentFormattedDigit = '';
98
+ for (var i = 0; i < valueStr.length; i += 1) {
99
+ currentFormattedDigit += valueStr[i];
100
+ var matchingDigitIndex = localizedDigits.indexOf(currentFormattedDigit);
101
+ if (matchingDigitIndex > -1) {
102
+ digits.push(matchingDigitIndex.toString());
103
+ currentFormattedDigit = '';
104
+ }
105
+ }
106
+ return digits.join('');
107
+ };
108
+ export var applyLocalizedDigits = function applyLocalizedDigits(valueStr, localizedDigits) {
109
+ if (localizedDigits[0] === '0') {
110
+ return valueStr;
111
+ }
112
+ return valueStr.split('').map(function (char) {
113
+ return localizedDigits[Number(char)];
114
+ }).join('');
115
+ };
116
+ export var isStringNumber = function isStringNumber(valueStr, localizedDigits) {
117
+ var nonLocalizedValueStr = removeLocalizedDigits(valueStr, localizedDigits);
118
+ return !Number.isNaN(Number(nonLocalizedValueStr));
119
+ };
120
+
121
+ /**
122
+ * Remove the leading zeroes to a digit section value.
123
+ * E.g.: `03` => `3`
124
+ * Warning: Should only be called with non-localized digits. Call `removeLocalizedDigits` with your value if needed.
125
+ */
126
+ export var cleanLeadingZeros = function cleanLeadingZeros(valueStr, size) {
76
127
  var cleanValueStr = valueStr;
77
128
 
78
129
  // Remove the leading zeros
@@ -84,7 +135,7 @@ export var cleanLeadingZeros = function cleanLeadingZeros(utils, valueStr, size)
84
135
  }
85
136
  return cleanValueStr;
86
137
  };
87
- export var cleanDigitSectionValue = function cleanDigitSectionValue(utils, timezone, value, sectionBoundaries, section) {
138
+ export var cleanDigitSectionValue = function cleanDigitSectionValue(utils, value, sectionBoundaries, localizedDigits, section) {
88
139
  if (process.env.NODE_ENV !== 'production') {
89
140
  if (section.type !== 'day' && section.contentType === 'digit-with-letter') {
90
141
  throw new Error(["MUI X: The token \"".concat(section.format, "\" is a digit format with letter in it.'\n This type of format is only supported for 'day' sections")].join('\n'));
@@ -98,11 +149,11 @@ export var cleanDigitSectionValue = function cleanDigitSectionValue(utils, timez
98
149
  // queryValue without leading `0` (`01` => `1`)
99
150
  var valueStr = value.toString();
100
151
  if (section.hasLeadingZerosInInput) {
101
- return cleanLeadingZeros(utils, valueStr, section.maxLength);
152
+ valueStr = cleanLeadingZeros(valueStr, section.maxLength);
102
153
  }
103
- return valueStr;
154
+ return applyLocalizedDigits(valueStr, localizedDigits);
104
155
  };
105
- export var adjustSectionValue = function adjustSectionValue(utils, timezone, section, keyCode, sectionsValueBoundaries, activeDate, stepsAttributes) {
156
+ export var adjustSectionValue = function adjustSectionValue(utils, timezone, section, keyCode, sectionsValueBoundaries, localizedDigits, activeDate, stepsAttributes) {
106
157
  var delta = getDeltaFromKeyCode(keyCode);
107
158
  var isStart = keyCode === 'Home';
108
159
  var isEnd = keyCode === 'End';
@@ -114,10 +165,10 @@ export var adjustSectionValue = function adjustSectionValue(utils, timezone, sec
114
165
  contentType: section.contentType
115
166
  });
116
167
  var getCleanValue = function getCleanValue(value) {
117
- return cleanDigitSectionValue(utils, timezone, value, sectionBoundaries, section);
168
+ return cleanDigitSectionValue(utils, value, sectionBoundaries, localizedDigits, section);
118
169
  };
119
170
  var step = section.type === 'minutes' && stepsAttributes != null && stepsAttributes.minutesStep ? stepsAttributes.minutesStep : 1;
120
- var currentSectionValue = parseInt(section.value, 10);
171
+ var currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);
121
172
  var newSectionValueNumber = currentSectionValue + delta * step;
122
173
  if (shouldSetAbsolute) {
123
174
  if (section.type === 'year' && !isEnd && !isStart) {
@@ -165,11 +216,11 @@ export var adjustSectionValue = function adjustSectionValue(utils, timezone, sec
165
216
  }
166
217
  return adjustLetterSection();
167
218
  };
168
- export var getSectionVisibleValue = function getSectionVisibleValue(section, target) {
219
+ export var getSectionVisibleValue = function getSectionVisibleValue(section, target, localizedDigits) {
169
220
  var value = section.value || section.placeholder;
170
221
  var hasLeadingZeros = target === 'non-input' ? section.hasLeadingZerosInFormat : section.hasLeadingZerosInInput;
171
222
  if (target === 'non-input' && section.hasLeadingZerosInInput && !section.hasLeadingZerosInFormat) {
172
- value = Number(value).toString();
223
+ value = Number(removeLocalizedDigits(value, localizedDigits)).toString();
173
224
  }
174
225
 
175
226
  // In the input, we add an empty character at the end of each section without leading zeros.
@@ -189,13 +240,13 @@ export var getSectionVisibleValue = function getSectionVisibleValue(section, tar
189
240
  export var cleanString = function cleanString(dirtyString) {
190
241
  return dirtyString.replace(/[\u2066\u2067\u2068\u2069]/g, '');
191
242
  };
192
- export var addPositionPropertiesToSections = function addPositionPropertiesToSections(sections, isRTL) {
243
+ export var addPositionPropertiesToSections = function addPositionPropertiesToSections(sections, localizedDigits, isRTL) {
193
244
  var position = 0;
194
245
  var positionInInput = isRTL ? 1 : 0;
195
246
  var newSections = [];
196
247
  for (var i = 0; i < sections.length; i += 1) {
197
248
  var section = sections[i];
198
- var renderedValue = getSectionVisibleValue(section, isRTL ? 'input-rtl' : 'input-ltr');
249
+ var renderedValue = getSectionVisibleValue(section, isRTL ? 'input-rtl' : 'input-ltr', localizedDigits);
199
250
  var sectionStr = "".concat(section.startSeparator).concat(renderedValue).concat(section.endSeparator);
200
251
  var sectionLength = cleanString(sectionStr).length;
201
252
  var sectionLengthInInput = sectionStr.length;
@@ -348,7 +399,7 @@ var getEscapedPartsFromFormat = function getEscapedPartsFromFormat(utils, format
348
399
  }
349
400
  return escapedParts;
350
401
  };
351
- export var splitFormatIntoSections = function splitFormatIntoSections(utils, timezone, localeText, format, date, formatDensity, shouldRespectLeadingZeros, isRTL) {
402
+ export var splitFormatIntoSections = function splitFormatIntoSections(utils, timezone, localeText, localizedDigits, format, date, formatDensity, shouldRespectLeadingZeros, isRTL) {
352
403
  var startSeparator = '';
353
404
  var sections = [];
354
405
  var now = utils.date();
@@ -371,7 +422,7 @@ export var splitFormatIntoSections = function splitFormatIntoSections(utils, tim
371
422
  }
372
423
  maxLength = sectionConfig.maxLength;
373
424
  if (isValidDate) {
374
- sectionValue = cleanLeadingZeros(utils, sectionValue, maxLength);
425
+ sectionValue = applyLocalizedDigits(cleanLeadingZeros(removeLocalizedDigits(sectionValue, localizedDigits), maxLength), localizedDigits);
375
426
  }
376
427
  }
377
428
  }
@@ -480,7 +531,7 @@ export var splitFormatIntoSections = function splitFormatIntoSections(utils, tim
480
531
  * Some date libraries like `dayjs` don't support parsing from date with escaped characters.
481
532
  * To make sure that the parsing works, we are building a format and a date without any separator.
482
533
  */
483
- export var getDateFromDateSections = function getDateFromDateSections(utils, sections) {
534
+ export var getDateFromDateSections = function getDateFromDateSections(utils, sections, localizedDigits) {
484
535
  // If we have both a day and a weekDay section,
485
536
  // Then we skip the weekDay in the parsing because libraries like dayjs can't parse complicated formats containing a weekDay.
486
537
  // dayjs(dayjs().format('dddd MMMM D YYYY'), 'dddd MMMM D YYYY')) // returns `Invalid Date` even if the format is valid.
@@ -494,16 +545,16 @@ export var getDateFromDateSections = function getDateFromDateSections(utils, sec
494
545
  var shouldSkip = shouldSkipWeekDays && section.type === 'weekDay';
495
546
  if (!shouldSkip) {
496
547
  sectionFormats.push(section.format);
497
- sectionValues.push(getSectionVisibleValue(section, 'non-input'));
548
+ sectionValues.push(getSectionVisibleValue(section, 'non-input', localizedDigits));
498
549
  }
499
550
  }
500
551
  var formatWithoutSeparator = sectionFormats.join(' ');
501
552
  var dateWithoutSeparatorStr = sectionValues.join(' ');
502
553
  return utils.parse(dateWithoutSeparatorStr, formatWithoutSeparator);
503
554
  };
504
- export var createDateStrForInputFromSections = function createDateStrForInputFromSections(sections, isRTL) {
555
+ export var createDateStrForInputFromSections = function createDateStrForInputFromSections(sections, localizedDigits, isRTL) {
505
556
  var formattedSections = sections.map(function (section) {
506
- var dateValue = getSectionVisibleValue(section, isRTL ? 'input-rtl' : 'input-ltr');
557
+ var dateValue = getSectionVisibleValue(section, isRTL ? 'input-rtl' : 'input-ltr', localizedDigits);
507
558
  return "".concat(section.startSeparator).concat(dateValue).concat(section.endSeparator);
508
559
  });
509
560
  var dateStr = formattedSections.join('');
@@ -518,7 +569,7 @@ export var createDateStrForInputFromSections = function createDateStrForInputFro
518
569
  // wrap into an isolated group such that separators can split the string in smaller ones by adding \u2069\u2068
519
570
  return "\u2066".concat(dateStr, "\u2069");
520
571
  };
521
- export var getSectionsBoundaries = function getSectionsBoundaries(utils, timezone) {
572
+ export var getSectionsBoundaries = function getSectionsBoundaries(utils, localizedDigits, timezone) {
522
573
  var today = utils.date(undefined, timezone);
523
574
  var endOfYear = utils.endOfYear(today);
524
575
  var endOfDay = utils.endOfDay(today);
@@ -578,11 +629,11 @@ export var getSectionsBoundaries = function getSectionsBoundaries(utils, timezon
578
629
  hours: function hours(_ref4) {
579
630
  var format = _ref4.format;
580
631
  var lastHourInDay = utils.getHours(endOfDay);
581
- var hasMeridiem = utils.formatByString(utils.endOfDay(today), format) !== lastHourInDay.toString();
632
+ var hasMeridiem = removeLocalizedDigits(utils.formatByString(utils.endOfDay(today), format), localizedDigits) !== lastHourInDay.toString();
582
633
  if (hasMeridiem) {
583
634
  return {
584
635
  minimum: 1,
585
- maximum: Number(utils.formatByString(utils.startOfDay(today), format))
636
+ maximum: Number(removeLocalizedDigits(utils.formatByString(utils.startOfDay(today), format), localizedDigits))
586
637
  };
587
638
  }
588
639
  return {
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import * as React from 'react';
4
4
  import useEventCallback from '@mui/utils/useEventCallback';
5
5
  import { useUtils } from '../useUtils';
6
- import { changeSectionValueFormat, cleanDigitSectionValue, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, getDaysInWeekStr, getLetterEditingOptions } from './useField.utils';
6
+ import { changeSectionValueFormat, cleanDigitSectionValue, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, getDaysInWeekStr, getLetterEditingOptions, applyLocalizedDigits, removeLocalizedDigits, isStringNumber } from './useField.utils';
7
7
 
8
8
  /**
9
9
  * The letter editing and the numeric editing each define a `CharacterEditingApplier`.
@@ -43,6 +43,7 @@ export var useFieldCharacterEditing = function useFieldCharacterEditing(_ref) {
43
43
  var sections = _ref.sections,
44
44
  updateSectionValue = _ref.updateSectionValue,
45
45
  sectionsValueBoundaries = _ref.sectionsValueBoundaries,
46
+ localizedDigits = _ref.localizedDigits,
46
47
  setTempAndroidValueStr = _ref.setTempAndroidValueStr,
47
48
  timezone = _ref.timezone;
48
49
  var utils = useUtils();
@@ -77,7 +78,7 @@ export var useFieldCharacterEditing = function useFieldCharacterEditing(_ref) {
77
78
  var activeSection = sections[sectionIndex];
78
79
 
79
80
  // The current query targets the section being editing
80
- // We can try to concatenated value
81
+ // We can try to concatenate the value
81
82
  if (query != null && (!isValidQueryValue || isValidQueryValue(query.value)) && query.sectionIndex === sectionIndex) {
82
83
  var concatenatedQueryValue = "".concat(query.value).concat(cleanKeyPressed);
83
84
  var _queryResponse = getFirstSectionValueMatchingWithQuery(concatenatedQueryValue, activeSection);
@@ -179,7 +180,8 @@ export var useFieldCharacterEditing = function useFieldCharacterEditing(_ref) {
179
180
  };
180
181
  var applyNumericEditing = function applyNumericEditing(params) {
181
182
  var getNewSectionValue = function getNewSectionValue(queryValue, section) {
182
- var queryValueNumber = Number("".concat(queryValue));
183
+ var cleanQueryValue = removeLocalizedDigits(queryValue, localizedDigits);
184
+ var queryValueNumber = Number(cleanQueryValue);
183
185
  var sectionBoundaries = sectionsValueBoundaries[section.type]({
184
186
  currentDate: null,
185
187
  format: section.format,
@@ -199,8 +201,8 @@ export var useFieldCharacterEditing = function useFieldCharacterEditing(_ref) {
199
201
  saveQuery: true
200
202
  };
201
203
  }
202
- var shouldGoToNextSection = Number("".concat(queryValue, "0")) > sectionBoundaries.maximum || queryValue.length === sectionBoundaries.maximum.toString().length;
203
- var newSectionValue = cleanDigitSectionValue(utils, timezone, queryValueNumber, sectionBoundaries, section);
204
+ var shouldGoToNextSection = queryValueNumber * 10 > sectionBoundaries.maximum || cleanQueryValue.length === sectionBoundaries.maximum.toString().length;
205
+ var newSectionValue = cleanDigitSectionValue(utils, queryValueNumber, sectionBoundaries, localizedDigits, section);
204
206
  return {
205
207
  sectionValue: newSectionValue,
206
208
  shouldGoToNextSection: shouldGoToNextSection
@@ -249,13 +251,15 @@ export var useFieldCharacterEditing = function useFieldCharacterEditing(_ref) {
249
251
  };
250
252
  };
251
253
  return applyQuery(params, getFirstSectionValueMatchingWithQuery, function (queryValue) {
252
- return !Number.isNaN(Number(queryValue));
254
+ return isStringNumber(queryValue, localizedDigits);
253
255
  });
254
256
  };
255
257
  var applyCharacterEditing = useEventCallback(function (params) {
256
258
  var activeSection = sections[params.sectionIndex];
257
- var isNumericEditing = !Number.isNaN(Number(params.keyPressed));
258
- var response = isNumericEditing ? applyNumericEditing(params) : applyLetterEditing(params);
259
+ var isNumericEditing = isStringNumber(params.keyPressed, localizedDigits);
260
+ var response = isNumericEditing ? applyNumericEditing(_extends({}, params, {
261
+ keyPressed: applyLocalizedDigits(params.keyPressed, localizedDigits)
262
+ })) : applyLetterEditing(params);
259
263
  if (response == null) {
260
264
  setTempAndroidValueStr(null);
261
265
  } else {
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import useControlled from '@mui/utils/useControlled';
6
6
  import { useTheme } from '@mui/material/styles';
7
7
  import { useUtils, useLocaleText, useLocalizationContext } from '../useUtils';
8
- import { addPositionPropertiesToSections, splitFormatIntoSections, mergeDateIntoReferenceDate, getSectionsBoundaries, validateSections, getDateFromDateSections } from './useField.utils';
8
+ import { addPositionPropertiesToSections, splitFormatIntoSections, mergeDateIntoReferenceDate, getSectionsBoundaries, validateSections, getDateFromDateSections, getLocalizedDigits } from './useField.utils';
9
9
  import { useValueWithTimezone } from '../useValueWithTimezone';
10
10
  import { getSectionTypeGranularity } from '../../utils/getDefaultReferenceDate';
11
11
  export var useFieldState = function useFieldState(params) {
@@ -42,18 +42,21 @@ export var useFieldState = function useFieldState(params) {
42
42
  timezone = _useValueWithTimezone.timezone,
43
43
  valueFromTheOutside = _useValueWithTimezone.value,
44
44
  handleValueChange = _useValueWithTimezone.handleValueChange;
45
+ var localizedDigits = React.useMemo(function () {
46
+ return getLocalizedDigits(utils);
47
+ }, [utils]);
45
48
  var sectionsValueBoundaries = React.useMemo(function () {
46
- return getSectionsBoundaries(utils, timezone);
47
- }, [utils, timezone]);
49
+ return getSectionsBoundaries(utils, localizedDigits, timezone);
50
+ }, [utils, localizedDigits, timezone]);
48
51
  var getSectionsFromValue = React.useCallback(function (value) {
49
52
  var fallbackSections = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
50
- return fieldValueManager.getSectionsFromValue(utils, value, fallbackSections, isRTL, function (date) {
51
- return splitFormatIntoSections(utils, timezone, localeText, format, date, formatDensity, shouldRespectLeadingZeros, isRTL);
53
+ return fieldValueManager.getSectionsFromValue(utils, value, fallbackSections, localizedDigits, isRTL, function (date) {
54
+ return splitFormatIntoSections(utils, timezone, localeText, localizedDigits, format, date, formatDensity, shouldRespectLeadingZeros, isRTL);
52
55
  });
53
- }, [fieldValueManager, format, localeText, isRTL, shouldRespectLeadingZeros, utils, formatDensity, timezone]);
56
+ }, [fieldValueManager, format, localeText, localizedDigits, isRTL, shouldRespectLeadingZeros, utils, formatDensity, timezone]);
54
57
  var placeholder = React.useMemo(function () {
55
- return fieldValueManager.getValueStrFromSections(getSectionsFromValue(valueManager.emptyValue), isRTL);
56
- }, [fieldValueManager, getSectionsFromValue, valueManager.emptyValue, isRTL]);
58
+ return fieldValueManager.getValueStrFromSections(getSectionsFromValue(valueManager.emptyValue), localizedDigits, isRTL);
59
+ }, [fieldValueManager, getSectionsFromValue, valueManager.emptyValue, localizedDigits, isRTL]);
57
60
  var _React$useState = React.useState(function () {
58
61
  var sections = getSectionsFromValue(valueFromTheOutside);
59
62
  validateSections(sections, valueType);
@@ -162,7 +165,7 @@ export var useFieldState = function useFieldState(params) {
162
165
  value: newSectionValue,
163
166
  modified: true
164
167
  });
165
- return addPositionPropertiesToSections(newSections, isRTL);
168
+ return addPositionPropertiesToSections(newSections, localizedDigits, isRTL);
166
169
  };
167
170
  var clearValue = function clearValue() {
168
171
  publishValue({
@@ -203,7 +206,7 @@ export var useFieldState = function useFieldState(params) {
203
206
  if (date == null || !utils.isValid(date)) {
204
207
  return null;
205
208
  }
206
- var sections = splitFormatIntoSections(utils, timezone, localeText, format, date, formatDensity, shouldRespectLeadingZeros, isRTL);
209
+ var sections = splitFormatIntoSections(utils, timezone, localeText, localizedDigits, format, date, formatDensity, shouldRespectLeadingZeros, isRTL);
207
210
  return mergeDateIntoReferenceDate(utils, timezone, date, sections, referenceDate, false);
208
211
  };
209
212
  var newValue = fieldValueManager.parseValueStr(valueStr, state.referenceValue, parseDateStr);
@@ -233,7 +236,7 @@ export var useFieldState = function useFieldState(params) {
233
236
  var activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);
234
237
  var newSections = setSectionValue(selectedSectionIndexes.startIndex, newSectionValue);
235
238
  var newActiveDateSections = activeDateManager.getSections(newSections);
236
- var newActiveDate = getDateFromDateSections(utils, newActiveDateSections);
239
+ var newActiveDate = getDateFromDateSections(utils, newActiveDateSections, localizedDigits);
237
240
  var values;
238
241
  var shouldPublish;
239
242
 
@@ -311,6 +314,7 @@ export var useFieldState = function useFieldState(params) {
311
314
  updateValueFromValueStr: updateValueFromValueStr,
312
315
  setTempAndroidValueStr: setTempAndroidValueStr,
313
316
  sectionsValueBoundaries: sectionsValueBoundaries,
317
+ localizedDigits: localizedDigits,
314
318
  placeholder: placeholder,
315
319
  timezone: timezone
316
320
  };
@@ -11,7 +11,8 @@ export var usePicker = function usePicker(_ref) {
11
11
  inputRef = _ref.inputRef,
12
12
  additionalViewProps = _ref.additionalViewProps,
13
13
  validator = _ref.validator,
14
- autoFocusView = _ref.autoFocusView;
14
+ autoFocusView = _ref.autoFocusView,
15
+ rendererInterceptor = _ref.rendererInterceptor;
15
16
  if (process.env.NODE_ENV !== 'production') {
16
17
  if (props.renderInput != null) {
17
18
  warnRenderInputIsDefined();
@@ -29,7 +30,8 @@ export var usePicker = function usePicker(_ref) {
29
30
  inputRef: inputRef,
30
31
  additionalViewProps: additionalViewProps,
31
32
  autoFocusView: autoFocusView,
32
- propsFromPickerValue: pickerValueResponse.viewProps
33
+ propsFromPickerValue: pickerValueResponse.viewProps,
34
+ rendererInterceptor: rendererInterceptor
33
35
  });
34
36
  var pickerLayoutResponse = usePickerLayoutProps({
35
37
  props: props,
@@ -31,7 +31,8 @@ export var usePickerViews = function usePickerViews(_ref) {
31
31
  propsFromPickerValue = _ref.propsFromPickerValue,
32
32
  additionalViewProps = _ref.additionalViewProps,
33
33
  inputRef = _ref.inputRef,
34
- autoFocusView = _ref.autoFocusView;
34
+ autoFocusView = _ref.autoFocusView,
35
+ rendererInterceptor = _ref.rendererInterceptor;
35
36
  var onChange = propsFromPickerValue.onChange,
36
37
  open = propsFromPickerValue.open,
37
38
  onSelectedSectionsChange = propsFromPickerValue.onSelectedSectionsChange,
@@ -151,7 +152,7 @@ export var usePickerViews = function usePickerViews(_ref) {
151
152
  if (renderer == null) {
152
153
  return null;
153
154
  }
154
- return renderer(_extends({}, propsToForwardToView, additionalViewProps, propsFromPickerValue, {
155
+ var rendererProps = _extends({}, propsToForwardToView, additionalViewProps, propsFromPickerValue, {
155
156
  views: views,
156
157
  timezone: timezone,
157
158
  onChange: setValueAndGoToNextView,
@@ -161,7 +162,11 @@ export var usePickerViews = function usePickerViews(_ref) {
161
162
  onFocusedViewChange: setFocusedView,
162
163
  showViewSwitcher: timeViewsCount > 1,
163
164
  timeViewsCount: timeViewsCount
164
- }));
165
+ });
166
+ if (rendererInterceptor) {
167
+ return rendererInterceptor(viewRenderers, popperView, rendererProps);
168
+ }
169
+ return renderer(rendererProps);
165
170
  }
166
171
  };
167
172
  };
@@ -8,7 +8,7 @@ export { pickersToolbarTextClasses } from './components/pickersToolbarTextClasse
8
8
  export { pickersArrowSwitcherClasses } from './components/PickersArrowSwitcher/pickersArrowSwitcherClasses';
9
9
  export { pickersPopperClasses } from './components/pickersPopperClasses';
10
10
  export { PickersToolbarButton } from './components/PickersToolbarButton';
11
- export { DAY_MARGIN, DIALOG_WIDTH } from './constants/dimensions';
11
+ export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT } from './constants/dimensions';
12
12
  export { useControlledValueWithTimezone } from './hooks/useValueWithTimezone';
13
13
  export { useField, createDateStrForInputFromSections, addPositionPropertiesToSections } from './hooks/useField';
14
14
  export { usePicker } from './hooks/usePicker';
@@ -32,4 +32,4 @@ export { applyDefaultViewProps } from './utils/views';
32
32
  export { buildDeprecatedPropsWarning, buildWarning } from './utils/warning';
33
33
  export { DayCalendar } from '../DateCalendar/DayCalendar';
34
34
  export { useCalendarState } from '../DateCalendar/useCalendarState';
35
- export { isTimeView } from './utils/time-utils';
35
+ export { isInternalTimeView, isTimeView } from './utils/time-utils';
@@ -38,12 +38,12 @@ export var singleItemFieldValueManager = {
38
38
  updateReferenceValue: function updateReferenceValue(utils, value, prevReferenceValue) {
39
39
  return value == null || !utils.isValid(value) ? prevReferenceValue : value;
40
40
  },
41
- getSectionsFromValue: function getSectionsFromValue(utils, date, prevSections, isRTL, getSectionsFromDate) {
41
+ getSectionsFromValue: function getSectionsFromValue(utils, date, prevSections, localizedDigits, isRTL, getSectionsFromDate) {
42
42
  var shouldReUsePrevDateSections = !utils.isValid(date) && !!prevSections;
43
43
  if (shouldReUsePrevDateSections) {
44
44
  return prevSections;
45
45
  }
46
- return addPositionPropertiesToSections(getSectionsFromDate(date), isRTL);
46
+ return addPositionPropertiesToSections(getSectionsFromDate(date), localizedDigits, isRTL);
47
47
  },
48
48
  getValueStrFromSections: createDateStrForInputFromSections,
49
49
  getActiveDateManager: function getActiveDateManager(utils, state) {
@@ -11,14 +11,19 @@ var beBYPickers = {
11
11
  previousMonth: 'Папярэдні месяц',
12
12
  nextMonth: 'Наступны месяц',
13
13
  // View navigation
14
- openPreviousView: 'адкрыць папярэдні выгляд',
15
- openNextView: 'адкрыць наступны выгляд',
14
+ openPreviousView: 'Aдкрыць папярэдні выгляд',
15
+ openNextView: 'Aдкрыць наступны выгляд',
16
16
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
17
17
  return view === 'year' ? 'гадавы выгляд адкрыты, перайсці да каляндарнага выгляду' : 'каляндарны выгляд адкрыты, перайсці да гадавога выгляду';
18
18
  },
19
- // DateRange placeholders
19
+ // DateRange labels
20
20
  start: 'Пачатак',
21
21
  end: 'Канец',
22
+ // startDate: 'Start date',
23
+ // startTime: 'Start time',
24
+ // endDate: 'End date',
25
+ // endTime: 'End time',
26
+
22
27
  // Action bar
23
28
  cancelButtonLabel: 'Адмена',
24
29
  clearButtonLabel: 'Ачысціць',
@@ -10,14 +10,19 @@ var caESPickers = {
10
10
  previousMonth: 'Últim mes',
11
11
  nextMonth: 'Pròxim mes',
12
12
  // View navigation
13
- openPreviousView: "obrir l'última vista",
13
+ openPreviousView: "Obrir l'última vista",
14
14
  openNextView: 'obrir la següent vista',
15
15
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
16
16
  return view === 'year' ? "la vista de l'any està oberta, canvie a la vista de calendari" : "la vista de calendari està oberta, canvie a la vista de l'any";
17
17
  },
18
- // DateRange placeholders
18
+ // DateRange labels
19
19
  start: 'Començar',
20
20
  end: 'Terminar',
21
+ // startDate: 'Start date',
22
+ // startTime: 'Start time',
23
+ // endDate: 'End date',
24
+ // endTime: 'End time',
25
+
21
26
  // Action bar
22
27
  cancelButtonLabel: 'Cancel·lar',
23
28
  clearButtonLabel: 'Netejar',
@@ -11,14 +11,19 @@ var csCZPickers = {
11
11
  previousMonth: 'Předchozí měsíc',
12
12
  nextMonth: 'Další měsíc',
13
13
  // View navigation
14
- openPreviousView: 'otevřít předchozí zobrazení',
15
- openNextView: 'otevřít další zobrazení',
14
+ openPreviousView: 'Otevřít předchozí zobrazení',
15
+ openNextView: 'Otevřít další zobrazení',
16
16
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
17
17
  return view === 'year' ? 'roční zobrazení otevřeno, přepněte do zobrazení kalendáře' : 'zobrazení kalendáře otevřeno, přepněte do zobrazení roku';
18
18
  },
19
- // DateRange placeholders
19
+ // DateRange labels
20
20
  start: 'Začátek',
21
21
  end: 'Konec',
22
+ // startDate: 'Start date',
23
+ // startTime: 'Start time',
24
+ // endDate: 'End date',
25
+ // endTime: 'End time',
26
+
22
27
  // Action bar
23
28
  cancelButtonLabel: 'Zrušit',
24
29
  clearButtonLabel: 'Vymazat',
@@ -11,14 +11,19 @@ var daDKPickers = {
11
11
  previousMonth: 'Forrige måned',
12
12
  nextMonth: 'Næste måned',
13
13
  // View navigation
14
- openPreviousView: 'åben forrige visning',
15
- openNextView: 'åben næste visning',
14
+ openPreviousView: 'Åben forrige visning',
15
+ openNextView: 'Åben næste visning',
16
16
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
17
17
  return view === 'year' ? 'årsvisning er åben, skift til kalendervisning' : 'kalendervisning er åben, skift til årsvisning';
18
18
  },
19
- // DateRange placeholders
19
+ // DateRange labels
20
20
  start: 'Start',
21
21
  end: 'Slut',
22
+ // startDate: 'Start date',
23
+ // startTime: 'Start time',
24
+ // endDate: 'End date',
25
+ // endTime: 'End time',
26
+
22
27
  // Action bar
23
28
  cancelButtonLabel: 'Annuller',
24
29
  clearButtonLabel: 'Ryd',
@@ -16,9 +16,14 @@ var deDEPickers = {
16
16
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
17
17
  return view === 'year' ? 'Jahresansicht ist geöffnet, zur Kalenderansicht wechseln' : 'Kalenderansicht ist geöffnet, zur Jahresansicht wechseln';
18
18
  },
19
- // DateRange placeholders
19
+ // DateRange labels
20
20
  start: 'Beginn',
21
21
  end: 'Ende',
22
+ // startDate: 'Start date',
23
+ // startTime: 'Start time',
24
+ // endDate: 'End date',
25
+ // endTime: 'End time',
26
+
22
27
  // Action bar
23
28
  cancelButtonLabel: 'Abbrechen',
24
29
  clearButtonLabel: 'Löschen',
@@ -10,14 +10,19 @@ var elGRPickers = {
10
10
  previousMonth: 'Προηγούμενος μήνας',
11
11
  nextMonth: 'Επόμενος μήνας',
12
12
  // View navigation
13
- openPreviousView: 'ανοίγμα προηγούμενης προβολή',
14
- openNextView: 'ανοίγμα επόμενης προβολή',
13
+ openPreviousView: 'Άνοίγμα προηγούμενης προβολή',
14
+ openNextView: 'Άνοίγμα επόμενης προβολή',
15
15
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
16
16
  return view === 'year' ? 'η προβολή έτους είναι ανοιχτή, μεταβείτε στην προβολή ημερολογίου' : 'η προβολή ημερολογίου είναι ανοιχτή, μεταβείτε στην προβολή έτους';
17
17
  },
18
- // DateRange placeholders
18
+ // DateRange labels
19
19
  start: 'Αρχή',
20
20
  end: 'Τέλος',
21
+ // startDate: 'Start date',
22
+ // startTime: 'Start time',
23
+ // endDate: 'End date',
24
+ // endTime: 'End time',
25
+
21
26
  // Action bar
22
27
  cancelButtonLabel: 'Άκυρο',
23
28
  clearButtonLabel: 'Καθαρισμός',
@@ -7,14 +7,18 @@ var enUSPickers = {
7
7
  previousMonth: 'Previous month',
8
8
  nextMonth: 'Next month',
9
9
  // View navigation
10
- openPreviousView: 'open previous view',
11
- openNextView: 'open next view',
10
+ openPreviousView: 'Open previous view',
11
+ openNextView: 'Open next view',
12
12
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
13
13
  return view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view';
14
14
  },
15
- // DateRange placeholders
15
+ // DateRange labels
16
16
  start: 'Start',
17
17
  end: 'End',
18
+ startDate: 'Start date',
19
+ startTime: 'Start time',
20
+ endDate: 'End date',
21
+ endTime: 'End time',
18
22
  // Action bar
19
23
  cancelButtonLabel: 'Cancel',
20
24
  clearButtonLabel: 'Clear',
@@ -10,14 +10,19 @@ var esESPickers = {
10
10
  previousMonth: 'Último mes',
11
11
  nextMonth: 'Próximo mes',
12
12
  // View navigation
13
- openPreviousView: 'abrir la última vista',
14
- openNextView: 'abrir la siguiente vista',
13
+ openPreviousView: 'Abrir la última vista',
14
+ openNextView: 'Abrir la siguiente vista',
15
15
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
16
16
  return view === 'year' ? 'la vista del año está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista del año';
17
17
  },
18
- // DateRange placeholders
18
+ // DateRange labels
19
19
  start: 'Empezar',
20
20
  end: 'Terminar',
21
+ // startDate: 'Start date',
22
+ // startTime: 'Start time',
23
+ // endDate: 'End date',
24
+ // endTime: 'End time',
25
+
21
26
  // Action bar
22
27
  cancelButtonLabel: 'Cancelar',
23
28
  clearButtonLabel: 'Limpiar',
@@ -15,9 +15,14 @@ var euPickers = {
15
15
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
16
16
  return view === 'year' ? 'urteko bista irekita dago, aldatu egutegi bistara' : 'egutegi bista irekita dago, aldatu urteko bistara';
17
17
  },
18
- // DateRange placeholders
18
+ // DateRange labels
19
19
  start: 'Hasi',
20
20
  end: 'Bukatu',
21
+ // startDate: 'Start date',
22
+ // startTime: 'Start time',
23
+ // endDate: 'End date',
24
+ // endTime: 'End time',
25
+
21
26
  // Action bar
22
27
  cancelButtonLabel: 'Utxi',
23
28
  clearButtonLabel: 'Garbitu',
@@ -15,9 +15,14 @@ var faIRPickers = {
15
15
  calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
16
16
  return view === 'year' ? 'نمای سال باز است، رفتن به نمای تقویم' : 'نمای تقویم باز است، رفتن به نمای سال';
17
17
  },
18
- // DateRange placeholders
18
+ // DateRange labels
19
19
  start: 'شروع',
20
20
  end: 'پایان',
21
+ // startDate: 'Start date',
22
+ // startTime: 'Start time',
23
+ // endDate: 'End date',
24
+ // endTime: 'End time',
25
+
21
26
  // Action bar
22
27
  cancelButtonLabel: 'لغو',
23
28
  clearButtonLabel: 'پاک کردن',