@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
@@ -1,117 +0,0 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- var _excluded = ["label", "autoFocus", "ownerState"];
5
- import * as React from 'react';
6
- import { useFormControl } from '@mui/material/FormControl';
7
- import { styled } from '@mui/material/styles';
8
- import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';
9
- import { pickersStandardInputClasses, getPickersStandardInputUtilityClass } from './pickersInputClasses';
10
- import { PickersInputRoot, PickersInput } from './PickersInput';
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- var StandardInputRoot = styled(PickersInputRoot, {
13
- name: 'MuiPickersStandardInput',
14
- slot: 'Root',
15
- overridesResolver: function overridesResolver(props, styles) {
16
- return styles.root;
17
- }
18
- })(function (_ref) {
19
- var theme = _ref.theme,
20
- ownerState = _ref.ownerState;
21
- var light = theme.palette.mode === 'light';
22
- var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
23
- if (theme.vars) {
24
- bottomLineColor = "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.inputUnderline, ")");
25
- }
26
- return _extends({
27
- 'label + &': {
28
- marginTop: 16
29
- }
30
- }, !ownerState.disableUnderline && _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
31
- '&::after': {
32
- background: 'red',
33
- borderBottom: "2px solid ".concat((theme.vars || theme).palette[ownerState.color].main),
34
- left: 0,
35
- bottom: 0,
36
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
37
- content: '""',
38
- position: 'absolute',
39
- right: 0,
40
- transform: 'scaleX(0)',
41
- transition: theme.transitions.create('transform', {
42
- duration: theme.transitions.duration.shorter,
43
- easing: theme.transitions.easing.easeOut
44
- }),
45
- pointerEvents: 'none' // Transparent to the hover style.
46
- }
47
- }, "&.".concat(pickersStandardInputClasses.focused, ":after"), {
48
- // translateX(0) is a workaround for Safari transform scale bug
49
- // See https://github.com/mui/material-ui/issues/31766
50
- transform: 'scaleX(1) translateX(0)'
51
- }), "&.".concat(pickersStandardInputClasses.error), {
52
- '&:before, &:after': {
53
- borderBottomColor: (theme.vars || theme).palette.error.main
54
- }
55
- }), '&::before', {
56
- borderBottom: "1px solid ".concat(bottomLineColor),
57
- left: 0,
58
- bottom: 0,
59
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
60
- content: '"\\00a0"',
61
- position: 'absolute',
62
- right: 0,
63
- transition: theme.transitions.create('border-bottom-color', {
64
- duration: theme.transitions.duration.shorter
65
- }),
66
- pointerEvents: 'none' // Transparent to the hover style.
67
- }), "&:hover:not(.".concat(pickersStandardInputClasses.disabled, ", .").concat(pickersStandardInputClasses.error, "):before"), {
68
- borderBottom: "2px solid ".concat((theme.vars || theme).palette.text.primary),
69
- // Reset on touch devices, it doesn't add specificity
70
- '@media (hover: none)': {
71
- borderBottom: "1px solid ".concat(bottomLineColor)
72
- }
73
- }), "&.".concat(pickersStandardInputClasses.disabled, ":before"), {
74
- borderBottomStyle: 'dotted'
75
- }));
76
- });
77
- var useUtilityClasses = function useUtilityClasses(ownerState) {
78
- var focused = ownerState.focused,
79
- disabled = ownerState.disabled,
80
- error = ownerState.error,
81
- classes = ownerState.classes,
82
- fullWidth = ownerState.fullWidth,
83
- color = ownerState.color,
84
- size = ownerState.size,
85
- endAdornment = ownerState.endAdornment,
86
- startAdornment = ownerState.startAdornment;
87
- var slots = {
88
- root: ['root', focused && !disabled && 'focused', disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', "color".concat(capitalize(color)), size === 'small' && 'inputSizeSmall', Boolean(startAdornment) && 'adornedStart', Boolean(endAdornment) && 'adornedEnd'],
89
- notchedOutline: ['notchedOutline'],
90
- before: ['before'],
91
- after: ['after'],
92
- content: ['content'],
93
- input: ['input']
94
- };
95
- return composeClasses(slots, getPickersStandardInputUtilityClass, classes);
96
- };
97
- export var PickersStandardInput = /*#__PURE__*/React.forwardRef(function PickersStandardInput(props, ref) {
98
- var label = props.label,
99
- autoFocus = props.autoFocus,
100
- ownerStateProp = props.ownerState,
101
- other = _objectWithoutProperties(props, _excluded);
102
- var muiFormControl = useFormControl();
103
- var ownerState = _extends({}, props, ownerStateProp, muiFormControl, {
104
- color: (muiFormControl == null ? void 0 : muiFormControl.color) || 'primary'
105
- });
106
- var classes = useUtilityClasses(ownerState);
107
- return /*#__PURE__*/_jsx(PickersInput, _extends({
108
- slots: {
109
- root: StandardInputRoot
110
- }
111
- }, other, {
112
- label: label,
113
- classes: classes,
114
- ref: ref
115
- }));
116
- });
117
- PickersInput.muiName = 'Input';
@@ -1,3 +0,0 @@
1
- export { PickersInput } from './PickersInput';
2
- export { PickersInputProps } from './PickersInput.types';
3
- export { pickersInputClasses, getPickersInputUtilityClass } from './pickersInputClasses';
@@ -1,18 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
3
- export function getPickersInputUtilityClass(slot) {
4
- return generateUtilityClass('MuiPickersInput', slot);
5
- }
6
- export function getPickersOutlinedInputUtilityClass(slot) {
7
- return generateUtilityClass('MuiPickersOutlinedInput', slot);
8
- }
9
- export function getPickersFilledInputUtilityClass(slot) {
10
- return generateUtilityClass('MuiPickersFilledInput', slot);
11
- }
12
- export function getPickersStandardInputUtilityClass(slot) {
13
- return generateUtilityClass('MuiPickersStandardInput', slot);
14
- }
15
- export var pickersInputClasses = generateUtilityClasses('MuiPickersInput', ['root', 'focused', 'disabled', 'error', 'notchedOutline', 'sectionContent', 'sectionBefore', 'sectionAfter', 'adornedStart', 'adornedEnd', 'input']);
16
- export var pickersOutlinedInputClasses = _extends({}, pickersInputClasses, generateUtilityClasses('MuiPickersOutlinedInput', ['root', 'notchedOutline', 'input']));
17
- export var pickersFilledInputClasses = _extends({}, pickersInputClasses, generateUtilityClasses('MuiPickersFilledInput', ['root', 'underline', 'input']));
18
- export var pickersStandardInputClasses = _extends({}, pickersInputClasses, generateUtilityClasses('MuiPickersStandardInput', ['root', 'underline', 'input']));
@@ -1 +0,0 @@
1
- export { PickersTextField } from './PickersTextField';
@@ -1,117 +0,0 @@
1
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
- import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["label", "autoFocus", "ownerState", "notched"];
4
- import * as React from 'react';
5
- import { useFormControl } from '@mui/material/FormControl';
6
- import { styled } from '@mui/material/styles';
7
- import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';
8
- import { pickersOutlinedInputClasses, getPickersOutlinedInputUtilityClass } from './pickersInputClasses';
9
- import Outline from './Outline';
10
- import { PickersInputRoot, PickersInput, PickersInputSectionsContainer } from './PickersInput';
11
- import { jsxs as _jsxs } from "react/jsx-runtime";
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- const OutlinedInputRoot = styled(PickersInputRoot, {
14
- name: 'MuiPickersOutlinedInput',
15
- slot: 'Root',
16
- overridesResolver: (props, styles) => styles.root
17
- })(({
18
- theme,
19
- ownerState
20
- }) => {
21
- const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
22
- return {
23
- padding: '0 14px',
24
- borderRadius: (theme.vars || theme).shape.borderRadius,
25
- [`&:hover .${pickersOutlinedInputClasses.notchedOutline}`]: {
26
- borderColor: (theme.vars || theme).palette.text.primary
27
- },
28
- // Reset on touch devices, it doesn't add specificity
29
- '@media (hover: none)': {
30
- [`&:hover .${pickersOutlinedInputClasses.notchedOutline}`]: {
31
- borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
32
- }
33
- },
34
- [`&.${pickersOutlinedInputClasses.focused} .${pickersOutlinedInputClasses.notchedOutline}`]: {
35
- borderStyle: 'solid',
36
- borderColor: (theme.vars || theme).palette[ownerState.color].main,
37
- borderWidth: 2
38
- },
39
- [`&.${pickersOutlinedInputClasses.disabled}`]: {
40
- [`& .${pickersOutlinedInputClasses.notchedOutline}`]: {
41
- borderColor: (theme.vars || theme).palette.action.disabled
42
- },
43
- '*': {
44
- color: (theme.vars || theme).palette.action.disabled
45
- }
46
- },
47
- [`&.${pickersOutlinedInputClasses.error} .${pickersOutlinedInputClasses.notchedOutline}`]: {
48
- borderColor: (theme.vars || theme).palette.error.main
49
- }
50
- };
51
- });
52
- const OutlinedPickersInputSectionsContainer = styled(PickersInputSectionsContainer, {
53
- name: 'MuiPickersOutlinedInput',
54
- slot: 'SectionsContainer',
55
- overridesResolver: (props, styles) => styles.sectionsContainer
56
- })(({
57
- ownerState
58
- }) => _extends({
59
- padding: '16.5px 0'
60
- }, ownerState.size === 'small' && {
61
- padding: '8.5px 0'
62
- }));
63
- const useUtilityClasses = ownerState => {
64
- const {
65
- focused,
66
- disabled,
67
- error,
68
- classes,
69
- fullWidth,
70
- color,
71
- size,
72
- endAdornment,
73
- startAdornment
74
- } = ownerState;
75
- const slots = {
76
- root: ['root', focused && !disabled && 'focused', disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', `color${color ? capitalize(color) : ''}`, size === 'small' && 'inputSizeSmall', Boolean(startAdornment) && 'adornedStart', Boolean(endAdornment) && 'adornedEnd'],
77
- notchedOutline: ['notchedOutline'],
78
- before: ['before'],
79
- after: ['after'],
80
- content: ['content'],
81
- input: ['input']
82
- };
83
- return composeClasses(slots, getPickersOutlinedInputUtilityClass, classes);
84
- };
85
- export const PickersOutlinedInput = /*#__PURE__*/React.forwardRef(function PickersOutlinedInput(props, ref) {
86
- const {
87
- label,
88
- ownerState: ownerStateProp,
89
- notched
90
- } = props,
91
- other = _objectWithoutPropertiesLoose(props, _excluded);
92
- const muiFormControl = useFormControl();
93
- const ownerState = _extends({}, props, ownerStateProp, muiFormControl, {
94
- color: muiFormControl?.color || 'primary'
95
- });
96
- const classes = useUtilityClasses(ownerState);
97
- return /*#__PURE__*/_jsx(PickersInput, _extends({
98
- slots: {
99
- root: OutlinedInputRoot,
100
- input: OutlinedPickersInputSectionsContainer
101
- },
102
- renderSuffix: state => /*#__PURE__*/_jsx(Outline, {
103
- shrink: Boolean(notched || state.adornedStart || state.focused || state.filled),
104
- notched: Boolean(notched || state.adornedStart || state.focused || state.filled),
105
- className: classes.notchedOutline,
106
- label: label != null && label !== '' && muiFormControl?.required ? /*#__PURE__*/_jsxs(React.Fragment, {
107
- children: [label, "\u2009", '*']
108
- }) : label,
109
- ownerState: ownerState
110
- })
111
- }, other, {
112
- label: label,
113
- classes: classes,
114
- ref: ref
115
- }));
116
- });
117
- PickersInput.muiName = 'Input';
@@ -1,123 +0,0 @@
1
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
- import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["label", "autoFocus", "ownerState"];
4
- import * as React from 'react';
5
- import { useFormControl } from '@mui/material/FormControl';
6
- import { styled } from '@mui/material/styles';
7
- import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';
8
- import { pickersStandardInputClasses, getPickersStandardInputUtilityClass } from './pickersInputClasses';
9
- import { PickersInputRoot, PickersInput } from './PickersInput';
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- const StandardInputRoot = styled(PickersInputRoot, {
12
- name: 'MuiPickersStandardInput',
13
- slot: 'Root',
14
- overridesResolver: (props, styles) => styles.root
15
- })(({
16
- theme,
17
- ownerState
18
- }) => {
19
- const light = theme.palette.mode === 'light';
20
- let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
21
- if (theme.vars) {
22
- bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})`;
23
- }
24
- return _extends({
25
- 'label + &': {
26
- marginTop: 16
27
- }
28
- }, !ownerState.disableUnderline && {
29
- '&::after': {
30
- background: 'red',
31
- borderBottom: `2px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
32
- left: 0,
33
- bottom: 0,
34
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
35
- content: '""',
36
- position: 'absolute',
37
- right: 0,
38
- transform: 'scaleX(0)',
39
- transition: theme.transitions.create('transform', {
40
- duration: theme.transitions.duration.shorter,
41
- easing: theme.transitions.easing.easeOut
42
- }),
43
- pointerEvents: 'none' // Transparent to the hover style.
44
- },
45
- [`&.${pickersStandardInputClasses.focused}:after`]: {
46
- // translateX(0) is a workaround for Safari transform scale bug
47
- // See https://github.com/mui/material-ui/issues/31766
48
- transform: 'scaleX(1) translateX(0)'
49
- },
50
- [`&.${pickersStandardInputClasses.error}`]: {
51
- '&:before, &:after': {
52
- borderBottomColor: (theme.vars || theme).palette.error.main
53
- }
54
- },
55
- '&::before': {
56
- borderBottom: `1px solid ${bottomLineColor}`,
57
- left: 0,
58
- bottom: 0,
59
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
60
- content: '"\\00a0"',
61
- position: 'absolute',
62
- right: 0,
63
- transition: theme.transitions.create('border-bottom-color', {
64
- duration: theme.transitions.duration.shorter
65
- }),
66
- pointerEvents: 'none' // Transparent to the hover style.
67
- },
68
- [`&:hover:not(.${pickersStandardInputClasses.disabled}, .${pickersStandardInputClasses.error}):before`]: {
69
- borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,
70
- // Reset on touch devices, it doesn't add specificity
71
- '@media (hover: none)': {
72
- borderBottom: `1px solid ${bottomLineColor}`
73
- }
74
- },
75
- [`&.${pickersStandardInputClasses.disabled}:before`]: {
76
- borderBottomStyle: 'dotted'
77
- }
78
- });
79
- });
80
- const useUtilityClasses = ownerState => {
81
- const {
82
- focused,
83
- disabled,
84
- error,
85
- classes,
86
- fullWidth,
87
- color,
88
- size,
89
- endAdornment,
90
- startAdornment
91
- } = ownerState;
92
- const slots = {
93
- root: ['root', focused && !disabled && 'focused', disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', `color${capitalize(color)}`, size === 'small' && 'inputSizeSmall', Boolean(startAdornment) && 'adornedStart', Boolean(endAdornment) && 'adornedEnd'],
94
- notchedOutline: ['notchedOutline'],
95
- before: ['before'],
96
- after: ['after'],
97
- content: ['content'],
98
- input: ['input']
99
- };
100
- return composeClasses(slots, getPickersStandardInputUtilityClass, classes);
101
- };
102
- export const PickersStandardInput = /*#__PURE__*/React.forwardRef(function PickersStandardInput(props, ref) {
103
- const {
104
- label,
105
- ownerState: ownerStateProp
106
- } = props,
107
- other = _objectWithoutPropertiesLoose(props, _excluded);
108
- const muiFormControl = useFormControl();
109
- const ownerState = _extends({}, props, ownerStateProp, muiFormControl, {
110
- color: muiFormControl?.color || 'primary'
111
- });
112
- const classes = useUtilityClasses(ownerState);
113
- return /*#__PURE__*/_jsx(PickersInput, _extends({
114
- slots: {
115
- root: StandardInputRoot
116
- }
117
- }, other, {
118
- label: label,
119
- classes: classes,
120
- ref: ref
121
- }));
122
- });
123
- PickersInput.muiName = 'Input';
@@ -1,3 +0,0 @@
1
- export { PickersInput } from './PickersInput';
2
- export { PickersInputProps } from './PickersInput.types';
3
- export { pickersInputClasses, getPickersInputUtilityClass } from './pickersInputClasses';
@@ -1,18 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
3
- export function getPickersInputUtilityClass(slot) {
4
- return generateUtilityClass('MuiPickersInput', slot);
5
- }
6
- export function getPickersOutlinedInputUtilityClass(slot) {
7
- return generateUtilityClass('MuiPickersOutlinedInput', slot);
8
- }
9
- export function getPickersFilledInputUtilityClass(slot) {
10
- return generateUtilityClass('MuiPickersFilledInput', slot);
11
- }
12
- export function getPickersStandardInputUtilityClass(slot) {
13
- return generateUtilityClass('MuiPickersStandardInput', slot);
14
- }
15
- export const pickersInputClasses = generateUtilityClasses('MuiPickersInput', ['root', 'focused', 'disabled', 'error', 'notchedOutline', 'sectionContent', 'sectionBefore', 'sectionAfter', 'adornedStart', 'adornedEnd', 'input']);
16
- export const pickersOutlinedInputClasses = _extends({}, pickersInputClasses, generateUtilityClasses('MuiPickersOutlinedInput', ['root', 'notchedOutline', 'input']));
17
- export const pickersFilledInputClasses = _extends({}, pickersInputClasses, generateUtilityClasses('MuiPickersFilledInput', ['root', 'underline', 'input']));
18
- export const pickersStandardInputClasses = _extends({}, pickersInputClasses, generateUtilityClasses('MuiPickersStandardInput', ['root', 'underline', 'input']));
@@ -1,138 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["onFocus", "onBlur", "className", "color", "disabled", "error", "variant", "required", "InputProps", "inputProps", "inputRef", "sectionListRef", "elements", "areAllSectionsEmpty", "onClick", "onKeyDown", "onKeyUp", "onPaste", "onInput", "endAdornment", "startAdornment", "tabIndex", "contentEditable", "focused", "value", "onChange", "fullWidth", "id", "helperText", "FormHelperTextProps", "label", "InputLabelProps"];
4
- import * as React from 'react';
5
- import clsx from 'clsx';
6
- import { styled } from '@mui/material/styles';
7
- import useForkRef from '@mui/utils/useForkRef';
8
- import { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';
9
- import InputLabel from '@mui/material/InputLabel';
10
- import FormHelperText from '@mui/material/FormHelperText';
11
- import FormControl from '@mui/material/FormControl';
12
- import { getPickersTextFieldUtilityClass } from './pickersTextFieldClasses';
13
- import { PickersOutlinedInput } from '../PickersInput/PickersOutlinedInput';
14
- import { PickersFilledInput } from '../PickersInput/PickersFilledInput';
15
- import { PickersStandardInput } from '../PickersInput/PickersStandardInput';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- const VARIANT_COMPONENT = {
19
- standard: PickersStandardInput,
20
- filled: PickersFilledInput,
21
- outlined: PickersOutlinedInput
22
- };
23
- const PickersTextFieldRoot = styled(FormControl, {
24
- name: 'MuiPickersTextField',
25
- slot: 'Root',
26
- overridesResolver: (props, styles) => styles.root
27
- })({});
28
- const useUtilityClasses = ownerState => {
29
- const {
30
- focused,
31
- disabled,
32
- classes,
33
- required
34
- } = ownerState;
35
- const slots = {
36
- root: ['root', focused && !disabled && 'focused', disabled && 'disabled', required && 'required']
37
- };
38
- return composeClasses(slots, getPickersTextFieldUtilityClass, classes);
39
- };
40
- export const PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField(props, ref) {
41
- const {
42
- // Props used by FormControl
43
- onFocus,
44
- onBlur,
45
- className,
46
- color = 'primary',
47
- disabled = false,
48
- error = false,
49
- variant = 'outlined',
50
- required = false,
51
- // Props used by PickersInput
52
- InputProps,
53
- inputProps,
54
- inputRef,
55
- sectionListRef,
56
- elements,
57
- areAllSectionsEmpty,
58
- onClick,
59
- onKeyDown,
60
- onPaste,
61
- onInput,
62
- endAdornment,
63
- startAdornment,
64
- tabIndex,
65
- contentEditable,
66
- focused,
67
- value,
68
- onChange,
69
- fullWidth,
70
- id: idProp,
71
- // Props used by FormHelperText
72
- helperText,
73
- FormHelperTextProps,
74
- // Props used by InputLabel
75
- label,
76
- InputLabelProps
77
- } = props,
78
- other = _objectWithoutPropertiesLoose(props, _excluded);
79
- const rootRef = React.useRef(null);
80
- const handleRootRef = useForkRef(ref, rootRef);
81
- const id = useId(idProp);
82
- const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
83
- const inputLabelId = label && id ? `${id}-label` : undefined;
84
- const ownerState = _extends({}, props, {
85
- color,
86
- disabled,
87
- error,
88
- focused,
89
- required,
90
- variant
91
- });
92
- const classes = useUtilityClasses(ownerState);
93
- const PickersInputComponent = VARIANT_COMPONENT[variant];
94
- return /*#__PURE__*/_jsxs(PickersTextFieldRoot, _extends({
95
- className: clsx(classes.root, className),
96
- ref: handleRootRef,
97
- focused: focused,
98
- onFocus: onFocus,
99
- onBlur: onBlur,
100
- disabled: disabled,
101
- variant: variant,
102
- error: error,
103
- color: color,
104
- fullWidth: fullWidth,
105
- required: required,
106
- ownerState: ownerState
107
- }, other, {
108
- children: [/*#__PURE__*/_jsx(InputLabel, _extends({
109
- htmlFor: id,
110
- id: inputLabelId
111
- }, InputLabelProps, {
112
- children: label
113
- })), /*#__PURE__*/_jsx(PickersInputComponent, _extends({
114
- elements: elements,
115
- areAllSectionsEmpty: areAllSectionsEmpty,
116
- onClick: onClick,
117
- onKeyDown: onKeyDown,
118
- onInput: onInput,
119
- onPaste: onPaste,
120
- endAdornment: endAdornment,
121
- startAdornment: startAdornment,
122
- tabIndex: tabIndex,
123
- contentEditable: contentEditable,
124
- value: value,
125
- onChange: onChange,
126
- id: id,
127
- fullWidth: fullWidth,
128
- inputProps: inputProps,
129
- inputRef: inputRef,
130
- sectionListRef: sectionListRef,
131
- label: label
132
- }, InputProps)), helperText && /*#__PURE__*/_jsx(FormHelperText, _extends({
133
- id: helperTextId
134
- }, FormHelperTextProps, {
135
- children: helperText
136
- }))]
137
- }));
138
- });
@@ -1 +0,0 @@
1
- export { PickersTextField } from './PickersTextField';