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

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 (240) hide show
  1. package/AdapterLuxon/AdapterLuxon.d.ts +1 -1
  2. package/AdapterLuxon/AdapterLuxon.js +4 -12
  3. package/CHANGELOG.md +379 -2
  4. package/DatePicker/DatePicker.js +0 -3
  5. package/DatePicker/DatePickerToolbar.js +0 -3
  6. package/DateTimePicker/DateTimePicker.js +0 -3
  7. package/DateTimePicker/DateTimePickerToolbar.js +0 -3
  8. package/DesktopDatePicker/DesktopDatePicker.js +0 -3
  9. package/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
  10. package/DesktopTimePicker/DesktopTimePicker.js +0 -3
  11. package/MobileDatePicker/MobileDatePicker.js +0 -3
  12. package/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
  13. package/MobileTimePicker/MobileTimePicker.js +0 -3
  14. package/MonthCalendar/MonthCalendar.js +0 -3
  15. package/MonthCalendar/MonthCalendar.types.d.ts +0 -3
  16. package/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
  17. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +0 -3
  18. package/PickersSectionList/PickersSectionList.js +6 -1
  19. package/PickersTextField/PickersFilledInput/PickersFilledInput.d.ts +11 -0
  20. package/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +98 -25
  21. package/PickersTextField/PickersFilledInput/index.d.ts +4 -0
  22. package/PickersTextField/PickersFilledInput/index.js +2 -0
  23. package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +23 -0
  24. package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
  25. package/PickersTextField/PickersInput/PickersInput.d.ts +10 -0
  26. package/PickersTextField/PickersInput/PickersInput.js +196 -0
  27. package/{internals/components → PickersTextField}/PickersInput/index.d.ts +2 -2
  28. package/PickersTextField/PickersInput/index.js +2 -0
  29. package/PickersTextField/PickersInput/pickersInputClasses.d.ts +22 -0
  30. package/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
  31. package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +16 -0
  32. package/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
  33. package/{internals/components/PickersInput/PickersInput.types.d.ts → PickersTextField/PickersInputBase/PickersInputBase.types.d.ts} +3 -13
  34. package/PickersTextField/PickersInputBase/index.d.ts +4 -0
  35. package/PickersTextField/PickersInputBase/index.js +2 -0
  36. package/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +31 -0
  37. package/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
  38. package/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.d.ts +3 -0
  39. package/{modern/internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
  40. package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.d.ts +10 -0
  41. package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +190 -0
  42. package/PickersTextField/PickersOutlinedInput/index.d.ts +4 -0
  43. package/PickersTextField/PickersOutlinedInput/index.js +2 -0
  44. package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +22 -0
  45. package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
  46. package/PickersTextField/PickersTextField.d.ts +3 -0
  47. package/PickersTextField/PickersTextField.js +258 -0
  48. package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.d.ts +5 -2
  49. package/PickersTextField/index.d.ts +8 -0
  50. package/PickersTextField/index.js +6 -0
  51. package/PickersTextField/package.json +6 -0
  52. package/README.md +1 -1
  53. package/StaticDatePicker/StaticDatePicker.js +0 -3
  54. package/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
  55. package/StaticTimePicker/StaticTimePicker.js +0 -3
  56. package/TimePicker/TimePicker.js +0 -3
  57. package/TimePicker/TimePickerToolbar.js +0 -3
  58. package/YearCalendar/YearCalendar.js +0 -3
  59. package/YearCalendar/YearCalendar.types.d.ts +0 -3
  60. package/index.d.ts +2 -1
  61. package/index.js +3 -2
  62. package/internals/hooks/useField/useField.js +6 -4
  63. package/internals/hooks/useField/useField.types.d.ts +4 -2
  64. package/internals/hooks/useField/useField.utils.d.ts +19 -9
  65. package/internals/hooks/useField/useField.utils.js +68 -21
  66. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +2 -1
  67. package/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
  68. package/internals/hooks/useField/useFieldState.d.ts +1 -0
  69. package/internals/hooks/useField/useFieldState.js +9 -7
  70. package/internals/models/props/basePickerProps.d.ts +0 -3
  71. package/internals/models/props/toolbar.d.ts +0 -3
  72. package/internals/utils/valueManagers.js +2 -2
  73. package/legacy/AdapterLuxon/AdapterLuxon.js +4 -12
  74. package/legacy/DatePicker/DatePicker.js +0 -3
  75. package/legacy/DatePicker/DatePickerToolbar.js +0 -3
  76. package/legacy/DateTimePicker/DateTimePicker.js +0 -3
  77. package/legacy/DateTimePicker/DateTimePickerToolbar.js +0 -3
  78. package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -3
  79. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
  80. package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -3
  81. package/legacy/MobileDatePicker/MobileDatePicker.js +0 -3
  82. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
  83. package/legacy/MobileTimePicker/MobileTimePicker.js +0 -3
  84. package/legacy/MonthCalendar/MonthCalendar.js +0 -3
  85. package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
  86. package/legacy/PickersSectionList/PickersSectionList.js +6 -1
  87. package/legacy/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +99 -26
  88. package/legacy/PickersTextField/PickersFilledInput/index.js +2 -0
  89. package/legacy/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
  90. package/legacy/PickersTextField/PickersInput/PickersInput.js +190 -0
  91. package/legacy/PickersTextField/PickersInput/index.js +2 -0
  92. package/legacy/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
  93. package/legacy/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
  94. package/legacy/PickersTextField/PickersInputBase/index.js +2 -0
  95. package/legacy/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
  96. package/legacy/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +7 -1
  97. package/legacy/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +183 -0
  98. package/legacy/PickersTextField/PickersOutlinedInput/index.js +2 -0
  99. package/legacy/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
  100. package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js +128 -8
  101. package/legacy/PickersTextField/index.js +6 -0
  102. package/legacy/StaticDatePicker/StaticDatePicker.js +0 -3
  103. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
  104. package/legacy/StaticTimePicker/StaticTimePicker.js +0 -3
  105. package/legacy/TimePicker/TimePicker.js +0 -3
  106. package/legacy/TimePicker/TimePickerToolbar.js +0 -3
  107. package/legacy/YearCalendar/YearCalendar.js +0 -3
  108. package/legacy/index.js +3 -2
  109. package/legacy/internals/hooks/useField/useField.js +6 -4
  110. package/legacy/internals/hooks/useField/useField.utils.js +71 -20
  111. package/legacy/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
  112. package/legacy/internals/hooks/useField/useFieldState.js +15 -11
  113. package/legacy/internals/utils/valueManagers.js +2 -2
  114. package/modern/AdapterLuxon/AdapterLuxon.js +3 -11
  115. package/modern/DatePicker/DatePicker.js +0 -3
  116. package/modern/DatePicker/DatePickerToolbar.js +0 -3
  117. package/modern/DateTimePicker/DateTimePicker.js +0 -3
  118. package/modern/DateTimePicker/DateTimePickerToolbar.js +0 -3
  119. package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -3
  120. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
  121. package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -3
  122. package/modern/MobileDatePicker/MobileDatePicker.js +0 -3
  123. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
  124. package/modern/MobileTimePicker/MobileTimePicker.js +0 -3
  125. package/modern/MonthCalendar/MonthCalendar.js +0 -3
  126. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
  127. package/modern/PickersSectionList/PickersSectionList.js +6 -1
  128. package/modern/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +98 -25
  129. package/modern/PickersTextField/PickersFilledInput/index.js +2 -0
  130. package/modern/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +8 -0
  131. package/modern/PickersTextField/PickersInput/PickersInput.js +196 -0
  132. package/modern/PickersTextField/PickersInput/index.js +2 -0
  133. package/modern/PickersTextField/PickersInput/pickersInputClasses.js +8 -0
  134. package/modern/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +106 -27
  135. package/modern/PickersTextField/PickersInputBase/index.js +2 -0
  136. package/modern/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +6 -0
  137. package/{internals/components/PickersInput → modern/PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
  138. package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +190 -0
  139. package/modern/PickersTextField/PickersOutlinedInput/index.js +2 -0
  140. package/modern/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +8 -0
  141. package/modern/PickersTextField/PickersTextField.js +258 -0
  142. package/modern/PickersTextField/index.js +6 -0
  143. package/modern/StaticDatePicker/StaticDatePicker.js +0 -3
  144. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
  145. package/modern/StaticTimePicker/StaticTimePicker.js +0 -3
  146. package/modern/TimePicker/TimePicker.js +0 -3
  147. package/modern/TimePicker/TimePickerToolbar.js +0 -3
  148. package/modern/YearCalendar/YearCalendar.js +0 -3
  149. package/modern/index.js +3 -2
  150. package/modern/internals/hooks/useField/useField.js +5 -3
  151. package/modern/internals/hooks/useField/useField.utils.js +68 -21
  152. package/modern/internals/hooks/useField/useFieldCharacterEditing.js +12 -8
  153. package/modern/internals/hooks/useField/useFieldState.js +9 -7
  154. package/modern/internals/utils/valueManagers.js +2 -2
  155. package/node/AdapterLuxon/AdapterLuxon.js +3 -11
  156. package/node/DatePicker/DatePicker.js +0 -3
  157. package/node/DatePicker/DatePickerToolbar.js +0 -3
  158. package/node/DateTimePicker/DateTimePicker.js +0 -3
  159. package/node/DateTimePicker/DateTimePickerToolbar.js +0 -3
  160. package/node/DesktopDatePicker/DesktopDatePicker.js +0 -3
  161. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -3
  162. package/node/DesktopTimePicker/DesktopTimePicker.js +0 -3
  163. package/node/MobileDatePicker/MobileDatePicker.js +0 -3
  164. package/node/MobileDateTimePicker/MobileDateTimePicker.js +0 -3
  165. package/node/MobileTimePicker/MobileTimePicker.js +0 -3
  166. package/node/MonthCalendar/MonthCalendar.js +0 -3
  167. package/node/PickersCalendarHeader/PickersCalendarHeader.js +0 -3
  168. package/node/PickersSectionList/PickersSectionList.js +6 -1
  169. package/node/{internals/components/PickersInput → PickersTextField/PickersFilledInput}/PickersFilledInput.js +102 -30
  170. package/node/PickersTextField/PickersFilledInput/index.js +25 -0
  171. package/node/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js +16 -0
  172. package/node/PickersTextField/PickersInput/PickersInput.js +204 -0
  173. package/node/{internals/components → PickersTextField}/PickersInput/index.js +0 -7
  174. package/node/PickersTextField/PickersInput/pickersInputClasses.js +16 -0
  175. package/node/{internals/components/PickersInput/PickersInput.js → PickersTextField/PickersInputBase/PickersInputBase.js} +105 -27
  176. package/node/PickersTextField/PickersInputBase/index.js +25 -0
  177. package/node/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +14 -0
  178. package/node/{internals/components/PickersInput → PickersTextField/PickersOutlinedInput}/Outline.js +5 -1
  179. package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +197 -0
  180. package/node/PickersTextField/PickersOutlinedInput/index.js +25 -0
  181. package/node/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js +16 -0
  182. package/node/{internals/components/PickersTextField → PickersTextField}/PickersTextField.js +128 -9
  183. package/node/PickersTextField/index.js +78 -0
  184. package/node/StaticDatePicker/StaticDatePicker.js +0 -3
  185. package/node/StaticDateTimePicker/StaticDateTimePicker.js +0 -3
  186. package/node/StaticTimePicker/StaticTimePicker.js +0 -3
  187. package/node/TimePicker/TimePicker.js +0 -3
  188. package/node/TimePicker/TimePickerToolbar.js +0 -3
  189. package/node/YearCalendar/YearCalendar.js +0 -3
  190. package/node/index.js +17 -5
  191. package/node/internals/hooks/useField/useField.js +5 -3
  192. package/node/internals/hooks/useField/useField.utils.js +73 -22
  193. package/node/internals/hooks/useField/useFieldCharacterEditing.js +11 -7
  194. package/node/internals/hooks/useField/useFieldState.js +8 -6
  195. package/node/internals/utils/valueManagers.js +2 -2
  196. package/package.json +7 -7
  197. package/themeAugmentation/components.d.ts +26 -0
  198. package/themeAugmentation/overrides.d.ts +16 -0
  199. package/themeAugmentation/props.d.ts +16 -0
  200. package/internals/components/PickersInput/PickersFilledInput.d.ts +0 -3
  201. package/internals/components/PickersInput/PickersInput.d.ts +0 -13
  202. package/internals/components/PickersInput/PickersOutlinedInput.d.ts +0 -3
  203. package/internals/components/PickersInput/PickersOutlinedInput.js +0 -117
  204. package/internals/components/PickersInput/PickersStandardInput.d.ts +0 -3
  205. package/internals/components/PickersInput/PickersStandardInput.js +0 -123
  206. package/internals/components/PickersInput/index.js +0 -3
  207. package/internals/components/PickersInput/pickersInputClasses.d.ts +0 -84
  208. package/internals/components/PickersInput/pickersInputClasses.js +0 -18
  209. package/internals/components/PickersTextField/PickersTextField.d.ts +0 -2
  210. package/internals/components/PickersTextField/PickersTextField.js +0 -138
  211. package/internals/components/PickersTextField/index.d.ts +0 -1
  212. package/internals/components/PickersTextField/index.js +0 -1
  213. package/legacy/internals/components/PickersInput/PickersOutlinedInput.js +0 -110
  214. package/legacy/internals/components/PickersInput/PickersStandardInput.js +0 -117
  215. package/legacy/internals/components/PickersInput/index.js +0 -3
  216. package/legacy/internals/components/PickersInput/pickersInputClasses.js +0 -18
  217. package/legacy/internals/components/PickersTextField/index.js +0 -1
  218. package/modern/internals/components/PickersInput/PickersOutlinedInput.js +0 -117
  219. package/modern/internals/components/PickersInput/PickersStandardInput.js +0 -123
  220. package/modern/internals/components/PickersInput/index.js +0 -3
  221. package/modern/internals/components/PickersInput/pickersInputClasses.js +0 -18
  222. package/modern/internals/components/PickersTextField/PickersTextField.js +0 -138
  223. package/modern/internals/components/PickersTextField/index.js +0 -1
  224. package/node/internals/components/PickersInput/PickersOutlinedInput.js +0 -125
  225. package/node/internals/components/PickersInput/PickersStandardInput.js +0 -132
  226. package/node/internals/components/PickersInput/pickersInputClasses.js +0 -29
  227. package/node/internals/components/PickersTextField/index.js +0 -12
  228. /package/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
  229. /package/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
  230. /package/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.d.ts +0 -0
  231. /package/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
  232. /package/legacy/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
  233. /package/legacy/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
  234. /package/legacy/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
  235. /package/modern/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
  236. /package/modern/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
  237. /package/modern/{internals/components/PickersTextField → PickersTextField}/pickersTextFieldClasses.js +0 -0
  238. /package/node/{internals/components/PickersInput/PickersInput.types.js → PickersTextField/PickersInputBase/PickersInputBase.types.js} +0 -0
  239. /package/node/{internals/components/PickersTextField → PickersTextField}/PickersTextField.types.js +0 -0
  240. /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
  };
@@ -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) {
@@ -337,10 +337,7 @@ export class AdapterLuxon {
337
337
  return value.startOf('month');
338
338
  };
339
339
  this.startOfWeek = value => {
340
- return value.startOf('week',
341
- // TODO: remove when `@types/luxon` add support for the parameter.
342
- // @ts-ignore
343
- {
340
+ return value.startOf('week', {
344
341
  useLocaleWeeks: true
345
342
  });
346
343
  };
@@ -354,10 +351,7 @@ export class AdapterLuxon {
354
351
  return value.endOf('month');
355
352
  };
356
353
  this.endOfWeek = value => {
357
- return value.endOf('week',
358
- // TODO: remove when `@types/luxon` add support for the parameter.
359
- // @ts-ignore
360
- {
354
+ return value.endOf('week', {
361
355
  useLocaleWeeks: true
362
356
  });
363
357
  };
@@ -479,9 +473,7 @@ export class AdapterLuxon {
479
473
  return weeks;
480
474
  };
481
475
  this.getWeekNumber = value => {
482
- // TODO: remove when `@types/luxon` add support for the parameter.
483
- // @ts-ignore
484
- return value.localeWeekNumber ?? value.weekNumber;
476
+ return value.localWeekNumber ?? value.weekNumber;
485
477
  };
486
478
  this.getYearRange = ([start, end]) => {
487
479
  const startDate = this.startOfYear(start);
@@ -55,9 +55,6 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
55
55
  * - the `input` element if there is a field rendered.
56
56
  */
57
57
  autoFocus: PropTypes.bool,
58
- /**
59
- * Class name applied to the root element.
60
- */
61
58
  className: PropTypes.string,
62
59
  /**
63
60
  * If `true`, the popover or modal will close after submitting the full date.
@@ -93,9 +93,6 @@ process.env.NODE_ENV !== "production" ? DatePickerToolbar.propTypes = {
93
93
  // | To update them edit the TypeScript types and run "yarn proptypes" |
94
94
  // ----------------------------------------------------------------------
95
95
  classes: PropTypes.object,
96
- /**
97
- * className applied to the root component.
98
- */
99
96
  className: PropTypes.string,
100
97
  disabled: PropTypes.bool,
101
98
  /**
@@ -65,9 +65,6 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
65
65
  * - the `input` element if there is a field rendered.
66
66
  */
67
67
  autoFocus: PropTypes.bool,
68
- /**
69
- * Class name applied to the root element.
70
- */
71
68
  className: PropTypes.string,
72
69
  /**
73
70
  * If `true`, the popover or modal will close after submitting the full date.
@@ -308,9 +308,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
308
308
  * Override or extend the styles applied to the component.
309
309
  */
310
310
  classes: PropTypes.object,
311
- /**
312
- * className applied to the root component.
313
- */
314
311
  className: PropTypes.string,
315
312
  disabled: PropTypes.bool,
316
313
  /**
@@ -76,9 +76,6 @@ DesktopDatePicker.propTypes = {
76
76
  * - the `input` element if there is a field rendered.
77
77
  */
78
78
  autoFocus: PropTypes.bool,
79
- /**
80
- * Class name applied to the root element.
81
- */
82
79
  className: PropTypes.string,
83
80
  /**
84
81
  * If `true`, the popover or modal will close after submitting the full date.
@@ -124,9 +124,6 @@ DesktopDateTimePicker.propTypes = {
124
124
  * - the `input` element if there is a field rendered.
125
125
  */
126
126
  autoFocus: PropTypes.bool,
127
- /**
128
- * Class name applied to the root element.
129
- */
130
127
  className: PropTypes.string,
131
128
  /**
132
129
  * If `true`, the popover or modal will close after submitting the full date.
@@ -107,9 +107,6 @@ DesktopTimePicker.propTypes = {
107
107
  * - the `input` element if there is a field rendered.
108
108
  */
109
109
  autoFocus: PropTypes.bool,
110
- /**
111
- * Class name applied to the root element.
112
- */
113
110
  className: PropTypes.string,
114
111
  /**
115
112
  * If `true`, the popover or modal will close after submitting the full date.
@@ -73,9 +73,6 @@ MobileDatePicker.propTypes = {
73
73
  * - the `input` element if there is a field rendered.
74
74
  */
75
75
  autoFocus: PropTypes.bool,
76
- /**
77
- * Class name applied to the root element.
78
- */
79
76
  className: PropTypes.string,
80
77
  /**
81
78
  * If `true`, the popover or modal will close after submitting the full date.
@@ -93,9 +93,6 @@ MobileDateTimePicker.propTypes = {
93
93
  * - the `input` element if there is a field rendered.
94
94
  */
95
95
  autoFocus: PropTypes.bool,
96
- /**
97
- * Class name applied to the root element.
98
- */
99
96
  className: PropTypes.string,
100
97
  /**
101
98
  * If `true`, the popover or modal will close after submitting the full date.
@@ -86,9 +86,6 @@ MobileTimePicker.propTypes = {
86
86
  * - the `input` element if there is a field rendered.
87
87
  */
88
88
  autoFocus: PropTypes.bool,
89
- /**
90
- * Class name applied to the root element.
91
- */
92
89
  className: PropTypes.string,
93
90
  /**
94
91
  * If `true`, the popover or modal will close after submitting the full date.
@@ -239,9 +239,6 @@ process.env.NODE_ENV !== "production" ? MonthCalendar.propTypes = {
239
239
  * Override or extend the styles applied to the component.
240
240
  */
241
241
  classes: PropTypes.object,
242
- /**
243
- * className applied to the root element.
244
- */
245
242
  className: PropTypes.string,
246
243
  /**
247
244
  * The default selected value.
@@ -230,9 +230,6 @@ process.env.NODE_ENV !== "production" ? PickersCalendarHeader.propTypes = {
230
230
  * Override or extend the styles applied to the component.
231
231
  */
232
232
  classes: PropTypes.object,
233
- /**
234
- * className applied to the root element.
235
- */
236
233
  className: PropTypes.string,
237
234
  currentMonth: PropTypes.any.isRequired,
238
235
  disabled: PropTypes.bool,
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
7
7
  import { useSlotProps } from '@mui/base/utils';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
9
  import useForkRef from '@mui/utils/useForkRef';
10
+ import { useThemeProps } from '@mui/material/styles';
10
11
  import { getPickersSectionListUtilityClass, pickersSectionListClasses } from './pickersSectionListClasses';
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -104,7 +105,11 @@ function PickersSection(props) {
104
105
  children: [/*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorBeforeProps)), /*#__PURE__*/_jsx(SectionContent, _extends({}, sectionContentProps)), /*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorAfterProps))]
105
106
  }));
106
107
  }
107
- const PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(props, ref) {
108
+ const PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(inProps, ref) {
109
+ const props = useThemeProps({
110
+ props: inProps,
111
+ name: 'MuiPickersSectionList'
112
+ });
108
113
  const {
109
114
  slots,
110
115
  slotProps,