@mui/x-date-pickers 6.16.2 → 6.16.3

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 (178) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/DateField/DateField.js +1 -1
  3. package/DatePicker/DatePicker.d.ts +10 -0
  4. package/DatePicker/DatePicker.js +10 -0
  5. package/DatePicker/DatePickerToolbar.d.ts +10 -0
  6. package/DatePicker/DatePickerToolbar.js +10 -0
  7. package/DateTimeField/DateTimeField.js +1 -1
  8. package/DateTimePicker/DateTimePickerTabs.d.ts +10 -0
  9. package/DateTimePicker/DateTimePickerTabs.js +11 -0
  10. package/DateTimePicker/DateTimePickerToolbar.d.ts +10 -0
  11. package/DateTimePicker/DateTimePickerToolbar.js +11 -0
  12. package/DayCalendarSkeleton/DayCalendarSkeleton.d.ts +1 -2
  13. package/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
  14. package/DesktopDatePicker/DesktopDatePicker.d.ts +10 -0
  15. package/DesktopDatePicker/DesktopDatePicker.js +10 -0
  16. package/DigitalClock/DigitalClock.d.ts +10 -0
  17. package/DigitalClock/DigitalClock.js +10 -0
  18. package/LocalizationProvider/LocalizationProvider.d.ts +12 -0
  19. package/LocalizationProvider/LocalizationProvider.js +12 -0
  20. package/MobileDatePicker/MobileDatePicker.d.ts +10 -0
  21. package/MobileDatePicker/MobileDatePicker.js +10 -0
  22. package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +10 -0
  23. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
  24. package/PickersActionBar/PickersActionBar.d.ts +10 -0
  25. package/PickersActionBar/PickersActionBar.js +10 -0
  26. package/PickersCalendarHeader/PickersCalendarHeader.d.ts +11 -0
  27. package/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
  28. package/PickersDay/PickersDay.d.ts +1 -3
  29. package/PickersDay/PickersDay.js +1 -3
  30. package/PickersLayout/PickersLayout.d.ts +9 -0
  31. package/PickersLayout/PickersLayout.js +10 -0
  32. package/PickersShortcuts/PickersShortcuts.d.ts +9 -0
  33. package/PickersShortcuts/PickersShortcuts.js +9 -0
  34. package/StaticDatePicker/StaticDatePicker.d.ts +10 -0
  35. package/StaticDatePicker/StaticDatePicker.js +10 -0
  36. package/TimeClock/TimeClock.d.ts +4 -0
  37. package/TimeClock/TimeClock.js +4 -0
  38. package/TimeField/TimeField.js +1 -1
  39. package/TimePicker/TimePickerToolbar.d.ts +10 -0
  40. package/TimePicker/TimePickerToolbar.js +11 -0
  41. package/index.js +1 -1
  42. package/internals/components/FakeTextField/FakeTextField.d.ts +6 -3
  43. package/internals/components/FakeTextField/FakeTextField.js +17 -9
  44. package/internals/hooks/useField/useField.js +14 -4
  45. package/internals/hooks/useField/useField.utils.js +1 -1
  46. package/internals/hooks/useField/useFieldState.js +5 -8
  47. package/legacy/DateField/DateField.js +1 -1
  48. package/legacy/DatePicker/DatePicker.js +10 -0
  49. package/legacy/DatePicker/DatePickerToolbar.js +10 -0
  50. package/legacy/DateTimeField/DateTimeField.js +1 -1
  51. package/legacy/DateTimePicker/DateTimePickerTabs.js +11 -0
  52. package/legacy/DateTimePicker/DateTimePickerToolbar.js +11 -0
  53. package/legacy/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
  54. package/legacy/DesktopDatePicker/DesktopDatePicker.js +10 -0
  55. package/legacy/DigitalClock/DigitalClock.js +10 -0
  56. package/legacy/LocalizationProvider/LocalizationProvider.js +12 -0
  57. package/legacy/MobileDatePicker/MobileDatePicker.js +10 -0
  58. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
  59. package/legacy/PickersActionBar/PickersActionBar.js +10 -0
  60. package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
  61. package/legacy/PickersDay/PickersDay.js +1 -3
  62. package/legacy/PickersLayout/PickersLayout.js +10 -0
  63. package/legacy/PickersShortcuts/PickersShortcuts.js +9 -0
  64. package/legacy/StaticDatePicker/StaticDatePicker.js +10 -0
  65. package/legacy/TimeClock/TimeClock.js +4 -0
  66. package/legacy/TimeField/TimeField.js +1 -1
  67. package/legacy/TimePicker/TimePickerToolbar.js +11 -0
  68. package/legacy/index.js +1 -1
  69. package/legacy/internals/components/FakeTextField/FakeTextField.js +13 -9
  70. package/legacy/internals/hooks/useField/useField.js +14 -4
  71. package/legacy/internals/hooks/useField/useField.utils.js +1 -1
  72. package/legacy/internals/hooks/useField/useFieldState.js +5 -8
  73. package/modern/DateField/DateField.js +1 -1
  74. package/modern/DatePicker/DatePicker.js +10 -0
  75. package/modern/DatePicker/DatePickerToolbar.js +10 -0
  76. package/modern/DateTimeField/DateTimeField.js +1 -1
  77. package/modern/DateTimePicker/DateTimePickerTabs.js +11 -0
  78. package/modern/DateTimePicker/DateTimePickerToolbar.js +11 -0
  79. package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
  80. package/modern/DesktopDatePicker/DesktopDatePicker.js +10 -0
  81. package/modern/DigitalClock/DigitalClock.js +10 -0
  82. package/modern/LocalizationProvider/LocalizationProvider.js +12 -0
  83. package/modern/MobileDatePicker/MobileDatePicker.js +10 -0
  84. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
  85. package/modern/PickersActionBar/PickersActionBar.js +10 -0
  86. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
  87. package/modern/PickersDay/PickersDay.js +1 -3
  88. package/modern/PickersLayout/PickersLayout.js +10 -0
  89. package/modern/PickersShortcuts/PickersShortcuts.js +9 -0
  90. package/modern/StaticDatePicker/StaticDatePicker.js +10 -0
  91. package/modern/TimeClock/TimeClock.js +4 -0
  92. package/modern/TimeField/TimeField.js +1 -1
  93. package/modern/TimePicker/TimePickerToolbar.js +11 -0
  94. package/modern/index.js +1 -1
  95. package/modern/internals/components/FakeTextField/FakeTextField.js +17 -9
  96. package/modern/internals/hooks/useField/useField.js +14 -4
  97. package/modern/internals/hooks/useField/useField.utils.js +1 -1
  98. package/modern/internals/hooks/useField/useFieldState.js +5 -8
  99. package/node/DateCalendar/DateCalendar.js +2 -2
  100. package/node/DateCalendar/DayCalendar.js +2 -2
  101. package/node/DateCalendar/PickersFadeTransitionGroup.js +2 -2
  102. package/node/DateCalendar/PickersSlideTransition.js +2 -2
  103. package/node/DateCalendar/useCalendarState.js +2 -2
  104. package/node/DateCalendar/useIsDateDisabled.js +2 -2
  105. package/node/DateField/DateField.js +3 -3
  106. package/node/DatePicker/DatePicker.js +12 -2
  107. package/node/DatePicker/DatePickerToolbar.js +12 -2
  108. package/node/DatePicker/shared.js +2 -2
  109. package/node/DateTimeField/DateTimeField.js +3 -3
  110. package/node/DateTimePicker/DateTimePicker.js +2 -2
  111. package/node/DateTimePicker/DateTimePickerTabs.js +13 -2
  112. package/node/DateTimePicker/DateTimePickerToolbar.js +13 -2
  113. package/node/DateTimePicker/shared.js +2 -2
  114. package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +3 -4
  115. package/node/DesktopDatePicker/DesktopDatePicker.js +12 -2
  116. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -2
  117. package/node/DesktopTimePicker/DesktopTimePicker.js +2 -2
  118. package/node/DigitalClock/DigitalClock.js +12 -2
  119. package/node/LocalizationProvider/LocalizationProvider.js +14 -2
  120. package/node/MobileDatePicker/MobileDatePicker.js +12 -2
  121. package/node/MobileDateTimePicker/MobileDateTimePicker.js +2 -2
  122. package/node/MobileTimePicker/MobileTimePicker.js +2 -2
  123. package/node/MonthCalendar/MonthCalendar.js +2 -2
  124. package/node/MonthCalendar/PickersMonth.js +2 -2
  125. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +12 -2
  126. package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -2
  127. package/node/PickersActionBar/PickersActionBar.js +12 -2
  128. package/node/PickersCalendarHeader/PickersCalendarHeader.js +13 -2
  129. package/node/PickersDay/PickersDay.js +3 -5
  130. package/node/PickersLayout/PickersLayout.js +12 -2
  131. package/node/PickersLayout/usePickerLayout.js +2 -2
  132. package/node/PickersShortcuts/PickersShortcuts.js +11 -2
  133. package/node/StaticDatePicker/StaticDatePicker.js +12 -2
  134. package/node/StaticDateTimePicker/StaticDateTimePicker.js +2 -2
  135. package/node/StaticTimePicker/StaticTimePicker.js +2 -2
  136. package/node/TimeClock/Clock.js +2 -2
  137. package/node/TimeClock/ClockNumber.js +2 -2
  138. package/node/TimeClock/ClockNumbers.js +2 -2
  139. package/node/TimeClock/ClockPointer.js +2 -2
  140. package/node/TimeClock/TimeClock.js +6 -2
  141. package/node/TimeField/TimeField.js +3 -3
  142. package/node/TimePicker/TimePicker.js +2 -2
  143. package/node/TimePicker/TimePickerToolbar.js +13 -2
  144. package/node/TimePicker/shared.js +2 -2
  145. package/node/YearCalendar/PickersYear.js +2 -2
  146. package/node/YearCalendar/YearCalendar.js +2 -2
  147. package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +2 -2
  148. package/node/dateViewRenderers/dateViewRenderers.js +2 -2
  149. package/node/hooks/useClearableField.js +2 -2
  150. package/node/icons/index.js +2 -2
  151. package/node/index.js +1 -1
  152. package/node/internals/components/FakeTextField/FakeTextField.js +20 -12
  153. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
  154. package/node/internals/components/PickersModalDialog.js +2 -2
  155. package/node/internals/components/PickersPopper.js +2 -2
  156. package/node/internals/components/PickersToolbar.js +2 -2
  157. package/node/internals/components/PickersToolbarButton.js +2 -2
  158. package/node/internals/components/PickersToolbarText.js +2 -2
  159. package/node/internals/demo/DemoContainer.js +2 -2
  160. package/node/internals/hooks/date-helpers-hooks.js +2 -2
  161. package/node/internals/hooks/useClockReferenceDate.js +2 -2
  162. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -2
  163. package/node/internals/hooks/useField/useField.js +16 -6
  164. package/node/internals/hooks/useField/useField.utils.js +1 -1
  165. package/node/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
  166. package/node/internals/hooks/useField/useFieldState.js +7 -10
  167. package/node/internals/hooks/useIsLandscape.js +2 -2
  168. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +2 -2
  169. package/node/internals/hooks/useOpenState.js +2 -2
  170. package/node/internals/hooks/usePicker/usePickerValue.js +2 -2
  171. package/node/internals/hooks/usePicker/usePickerViews.js +2 -2
  172. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +2 -2
  173. package/node/internals/hooks/useUtils.js +2 -2
  174. package/node/internals/hooks/useValidation.js +2 -2
  175. package/node/internals/hooks/useValueWithTimezone.js +2 -2
  176. package/node/internals/hooks/useViews.js +2 -2
  177. package/node/timeViewRenderers/timeViewRenderers.js +2 -2
  178. package/package.json +4 -4
@@ -171,6 +171,11 @@ export var useField = function useField(params) {
171
171
  return;
172
172
  }
173
173
  var targetValue = event.target.value;
174
+ if (targetValue === '') {
175
+ resetCharacterQuery();
176
+ clearValue();
177
+ return;
178
+ }
174
179
  var eventData = event.nativeEvent.data;
175
180
  // Calling `.fill(04/11/2022)` in playwright will trigger a change event with the requested content to insert in `event.nativeEvent.data`
176
181
  // usual changes have only the currently typed character in the `event.nativeEvent.data`
@@ -210,8 +215,13 @@ export var useField = function useField(params) {
210
215
  var activeSectionEndRelativeToNewValue = cleanValueStr.length - prevValueStr.length + activeSection.end - cleanString(activeSection.endSeparator || '').length;
211
216
  keyPressed = cleanValueStr.slice(activeSection.start + cleanString(activeSection.startSeparator || '').length, activeSectionEndRelativeToNewValue);
212
217
  }
213
- if (isAndroid() && keyPressed.length === 0) {
214
- setTempAndroidValueStr(valueStr);
218
+ if (keyPressed.length === 0) {
219
+ if (isAndroid()) {
220
+ setTempAndroidValueStr(valueStr);
221
+ } else {
222
+ resetCharacterQuery();
223
+ clearActiveSection();
224
+ }
215
225
  return;
216
226
  }
217
227
  applyCharacterEditing({
@@ -269,7 +279,7 @@ export var useField = function useField(params) {
269
279
  }
270
280
 
271
281
  // Reset the value of the selected section
272
- case ['Backspace', 'Delete'].includes(event.key):
282
+ case event.key === 'Delete':
273
283
  {
274
284
  event.preventDefault();
275
285
  if (readOnly) {
@@ -330,7 +340,7 @@ export var useField = function useField(params) {
330
340
  // Fix scroll jumping on iOS browser: https://github.com/mui/mui-x/issues/8321
331
341
  var currentScrollTop = inputRef.current.scrollTop;
332
342
  // On multi input range pickers we want to update selection range only for the active input
333
- // This helps avoiding the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
343
+ // This helps to avoid the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
334
344
  // because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425
335
345
  if (inputRef.current === getActiveElement(document)) {
336
346
  inputRef.current.setSelectionRange(selectionStart, selectionEnd);
@@ -312,7 +312,7 @@ export var doesSectionFormatHaveLeadingZeros = function doesSectionFormatHaveLea
312
312
  }
313
313
  case 'seconds':
314
314
  {
315
- return utils.formatByString(utils.setMinutes(now, 1), format).length > 1;
315
+ return utils.formatByString(utils.setSeconds(now, 1), format).length > 1;
316
316
  }
317
317
  default:
318
318
  {
@@ -137,6 +137,9 @@ export var useFieldState = function useFieldState(params) {
137
137
  tempValueStrAndroid: null
138
138
  });
139
139
  });
140
+ if (valueManager.areValuesEqual(utils, state.value, value)) {
141
+ return;
142
+ }
140
143
  var context = {
141
144
  validationError: validator({
142
145
  adapter: adapter,
@@ -158,9 +161,6 @@ export var useFieldState = function useFieldState(params) {
158
161
  return addPositionPropertiesToSections(newSections, isRTL);
159
162
  };
160
163
  var clearValue = function clearValue() {
161
- if (valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue)) {
162
- return;
163
- }
164
164
  publishValue({
165
165
  value: valueManager.emptyValue,
166
166
  referenceValue: state.referenceValue,
@@ -172,16 +172,13 @@ export var useFieldState = function useFieldState(params) {
172
172
  return;
173
173
  }
174
174
  var activeSection = state.sections[selectedSectionIndexes.startIndex];
175
- if (activeSection.value === '') {
176
- return;
177
- }
178
175
  var activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);
179
176
  var nonEmptySectionCountBefore = activeDateManager.getSections(state.sections).filter(function (section) {
180
177
  return section.value !== '';
181
178
  }).length;
182
- var isTheOnlyNonEmptySection = nonEmptySectionCountBefore === 1;
179
+ var hasNoOtherNonEmptySections = nonEmptySectionCountBefore === (activeSection.value === '' ? 0 : 1);
183
180
  var newSections = setSectionValue(selectedSectionIndexes.startIndex, '');
184
- var newActiveDate = isTheOnlyNonEmptySection ? null : utils.date(new Date(''));
181
+ var newActiveDate = hasNoOtherNonEmptySections ? null : utils.date(new Date(''));
185
182
  var newValues = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);
186
183
  if ((newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date))) {
187
184
  publishValue(_extends({}, newValues, {
@@ -112,7 +112,7 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
112
112
  /**
113
113
  * The color of the component.
114
114
  * It supports both default and custom theme colors, which can be added as shown in the
115
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
115
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
116
116
  * @default 'primary'
117
117
  */
118
118
  color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
@@ -10,6 +10,16 @@ import { DesktopDatePicker } from '../DesktopDatePicker';
10
10
  import { MobileDatePicker } from '../MobileDatePicker';
11
11
  import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from '../internals/utils/utils';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ /**
14
+ * Demos:
15
+ *
16
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
17
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
18
+ *
19
+ * API:
20
+ *
21
+ * - [DatePicker API](https://mui.com/x/api/date-pickers/date-picker/)
22
+ */
13
23
  const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker(inProps, ref) {
14
24
  const props = useThemeProps({
15
25
  props: inProps,
@@ -39,6 +39,16 @@ const DatePickerToolbarTitle = styled(Typography, {
39
39
  }) => _extends({}, ownerState.isLandscape && {
40
40
  margin: 'auto 16px auto auto'
41
41
  }));
42
+ /**
43
+ * Demos:
44
+ *
45
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
46
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
47
+ *
48
+ * API:
49
+ *
50
+ * - [DatePickerToolbar API](https://mui.com/x/api/date-pickers/date-picker-toolbar/)
51
+ */
42
52
  const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {
43
53
  const props = useThemeProps({
44
54
  props: inProps,
@@ -117,7 +117,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
117
117
  /**
118
118
  * The color of the component.
119
119
  * It supports both default and custom theme colors, which can be added as shown in the
120
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
120
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
121
121
  * @default 'primary'
122
122
  */
123
123
  color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
@@ -47,6 +47,17 @@ const DateTimePickerTabsRoot = styled(Tabs, {
47
47
  }
48
48
  }
49
49
  }));
50
+
51
+ /**
52
+ * Demos:
53
+ *
54
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
55
+ * - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)
56
+ *
57
+ * API:
58
+ *
59
+ * - [DateTimePickerTabs API](https://mui.com/x/api/date-pickers/date-time-picker-tabs/)
60
+ */
50
61
  const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
51
62
  const props = useThemeProps({
52
63
  props: inProps,
@@ -153,6 +153,17 @@ const DateTimePickerToolbarAmPmSelection = styled('div', {
153
153
  fontSize: 17
154
154
  }
155
155
  }));
156
+
157
+ /**
158
+ * Demos:
159
+ *
160
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
161
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
162
+ *
163
+ * API:
164
+ *
165
+ * - [DateTimePickerToolbar API](https://mui.com/x/api/date-pickers/date-time-picker-toolbar/)
166
+ */
156
167
  function DateTimePickerToolbar(inProps) {
157
168
  const props = useThemeProps({
158
169
  props: inProps,
@@ -60,10 +60,9 @@ DayCalendarSkeletonDay.propTypes = {
60
60
  const monthMap = [[0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0]];
61
61
 
62
62
  /**
63
- *
64
63
  * Demos:
65
64
  *
66
- * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)
65
+ * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
67
66
  *
68
67
  * API:
69
68
  *
@@ -12,6 +12,16 @@ import { DateField } from '../DateField';
12
12
  import { extractValidationProps } from '../internals/utils/validation/extractValidationProps';
13
13
  import { renderDateViewCalendar } from '../dateViewRenderers';
14
14
  import { resolveDateFormat } from '../internals/utils/date-utils';
15
+ /**
16
+ * Demos:
17
+ *
18
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
19
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
20
+ *
21
+ * API:
22
+ *
23
+ * - [DesktopDatePicker API](https://mui.com/x/api/date-pickers/desktop-date-picker/)
24
+ */
15
25
  const DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {
16
26
  const localeText = useLocaleText();
17
27
  const utils = useUtils();
@@ -79,6 +79,16 @@ const DigitalClockItem = styled(MenuItem, {
79
79
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.focusOpacity)
80
80
  }
81
81
  }));
82
+ /**
83
+ * Demos:
84
+ *
85
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
86
+ * - [DigitalClock](https://mui.com/x/react-date-pickers/digital-clock/)
87
+ *
88
+ * API:
89
+ *
90
+ * - [DigitalClock API](https://mui.com/x/api/date-pickers/digital-clock/)
91
+ */
82
92
  export const DigitalClock = /*#__PURE__*/React.forwardRef(function DigitalClock(inProps, ref) {
83
93
  const utils = useUtils();
84
94
  const containerRef = React.useRef(null);
@@ -9,6 +9,18 @@ export const MuiPickersAdapterContext = /*#__PURE__*/React.createContext(null);
9
9
  if (process.env.NODE_ENV !== 'production') {
10
10
  MuiPickersAdapterContext.displayName = 'MuiPickersAdapterContext';
11
11
  }
12
+ /**
13
+ * Demos:
14
+ *
15
+ * - [Date format and localization](https://mui.com/x/react-date-pickers/adapters-locale/)
16
+ * - [Calendar systems](https://mui.com/x/react-date-pickers/calendar-systems/)
17
+ * - [Translated components](https://mui.com/x/react-date-pickers/localization/)
18
+ * - [UTC and timezones](https://mui.com/x/react-date-pickers/timezone/)
19
+ *
20
+ * API:
21
+ *
22
+ * - [LocalizationProvider API](https://mui.com/x/api/date-pickers/localization-provider/)
23
+ */
12
24
  export const LocalizationProvider = function LocalizationProvider(inProps) {
13
25
  const {
14
26
  localeText: inLocaleText
@@ -11,6 +11,16 @@ import { extractValidationProps } from '../internals/utils/validation/extractVal
11
11
  import { singleItemValueManager } from '../internals/utils/valueManagers';
12
12
  import { renderDateViewCalendar } from '../dateViewRenderers';
13
13
  import { resolveDateFormat } from '../internals/utils/date-utils';
14
+ /**
15
+ * Demos:
16
+ *
17
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
18
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
19
+ *
20
+ * API:
21
+ *
22
+ * - [MobileDatePicker API](https://mui.com/x/api/date-pickers/mobile-date-picker/)
23
+ */
14
24
  const MobileDatePicker = /*#__PURE__*/React.forwardRef(function MobileDatePicker(inProps, ref) {
15
25
  const localeText = useLocaleText();
16
26
  const utils = useUtils();
@@ -41,6 +41,16 @@ const MultiSectionDigitalClockRoot = styled(PickerViewRoot, {
41
41
  width: '100%',
42
42
  borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
43
43
  }));
44
+ /**
45
+ * Demos:
46
+ *
47
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
48
+ * - [DigitalClock](https://mui.com/x/react-date-pickers/digital-clock/)
49
+ *
50
+ * API:
51
+ *
52
+ * - [MultiSectionDigitalClock API](https://mui.com/x/api/date-pickers/multi-section-digital-clock/)
53
+ */
44
54
  export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function MultiSectionDigitalClock(inProps, ref) {
45
55
  const utils = useUtils();
46
56
  const props = useThemeProps({
@@ -7,6 +7,16 @@ import Button from '@mui/material/Button';
7
7
  import DialogActions from '@mui/material/DialogActions';
8
8
  import { useLocaleText } from '../internals/hooks/useUtils';
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
+ /**
11
+ * Demos:
12
+ *
13
+ * - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)
14
+ * - [Custom layout](https://mui.com/x/react-date-pickers/custom-layout/)
15
+ *
16
+ * API:
17
+ *
18
+ * - [PickersActionBar API](https://mui.com/x/api/date-pickers/pickers-action-bar/)
19
+ */
10
20
  function PickersActionBar(props) {
11
21
  const {
12
22
  onAccept,
@@ -94,6 +94,17 @@ const PickersCalendarHeaderSwitchViewIcon = styled(ArrowDropDownIcon, {
94
94
  transition: theme.transitions.create('transform'),
95
95
  transform: 'rotate(0deg)'
96
96
  }));
97
+ /**
98
+ * Demos:
99
+ *
100
+ * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
101
+ * - [DateRangeCalendar](https://mui.com/x/react-date-pickers/date-range-calendar/)
102
+ * - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)
103
+ *
104
+ * API:
105
+ *
106
+ * - [PickersCalendarHeader API](https://mui.com/x/api/date-pickers/pickers-calendar-header/)
107
+ */
97
108
  const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCalendarHeader(inProps, ref) {
98
109
  const localeText = useLocaleText();
99
110
  const utils = useUtils();
@@ -343,11 +343,9 @@ process.env.NODE_ENV !== "production" ? PickersDayRaw.propTypes = {
343
343
  } : void 0;
344
344
 
345
345
  /**
346
- *
347
346
  * Demos:
348
347
  *
349
- * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)
350
- *
348
+ * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
351
349
  * API:
352
350
  *
353
351
  * - [PickersDay API](https://mui.com/x/api/date-pickers/pickers-day/)
@@ -70,6 +70,16 @@ export const PickersLayoutContentWrapper = styled('div', {
70
70
  display: 'flex',
71
71
  flexDirection: 'column'
72
72
  });
73
+
74
+ /**
75
+ * Demos:
76
+ *
77
+ * - [Custom layout](https://mui.com/x/react-date-pickers/custom-layout/)
78
+ *
79
+ * API:
80
+ *
81
+ * - [PickersLayout API](https://mui.com/x/api/date-pickers/pickers-layout/)
82
+ */
73
83
  const PickersLayout = function PickersLayout(inProps) {
74
84
  const props = useThemeProps({
75
85
  props: inProps,
@@ -9,6 +9,15 @@ import ListItem from '@mui/material/ListItem';
9
9
  import Chip from '@mui/material/Chip';
10
10
  import { VIEW_HEIGHT } from '../internals/constants/dimensions';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
+ /**
13
+ * Demos:
14
+ *
15
+ * - [Shortcuts](https://mui.com/x/react-date-pickers/shortcuts/)
16
+ *
17
+ * API:
18
+ *
19
+ * - [PickersShortcuts API](https://mui.com/x/api/date-pickers/pickers-shortcuts/)
20
+ */
12
21
  function PickersShortcuts(props) {
13
22
  const {
14
23
  items,
@@ -6,6 +6,16 @@ import { renderDateViewCalendar } from '../dateViewRenderers';
6
6
  import { useStaticPicker } from '../internals/hooks/useStaticPicker';
7
7
  import { validateDate } from '../internals';
8
8
  import { singleItemValueManager } from '../internals/utils/valueManagers';
9
+ /**
10
+ * Demos:
11
+ *
12
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
13
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
14
+ *
15
+ * API:
16
+ *
17
+ * - [StaticDatePicker API](https://mui.com/x/api/date-pickers/static-date-picker/)
18
+ */
9
19
  const StaticDatePicker = /*#__PURE__*/React.forwardRef(function StaticDatePicker(inProps, ref) {
10
20
  const defaultizedProps = useDatePickerDefaultizedProps(inProps, 'MuiStaticDatePicker');
11
21
  const displayStaticWrapperAs = defaultizedProps.displayStaticWrapperAs ?? 'mobile';
@@ -52,6 +52,10 @@ const TimeClockArrowSwitcher = styled(PickersArrowSwitcher, {
52
52
  const TIME_CLOCK_DEFAULT_VIEWS = ['hours', 'minutes'];
53
53
 
54
54
  /**
55
+ * Demos:
56
+ *
57
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
58
+ * - [TimeClock](https://mui.com/x/react-date-pickers/time-clock/)
55
59
  *
56
60
  * API:
57
61
  *
@@ -117,7 +117,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
117
117
  /**
118
118
  * The color of the component.
119
119
  * It supports both default and custom theme colors, which can be added as shown in the
120
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
120
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
121
121
  * @default 'primary'
122
122
  */
123
123
  color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
@@ -106,6 +106,17 @@ TimePickerToolbarAmPmSelection.propTypes = {
106
106
  ownerState: PropTypes.object.isRequired,
107
107
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
108
108
  };
109
+
110
+ /**
111
+ * Demos:
112
+ *
113
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
114
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
115
+ *
116
+ * API:
117
+ *
118
+ * - [TimePickerToolbar API](https://mui.com/x/api/date-pickers/time-picker-toolbar/)
119
+ */
109
120
  function TimePickerToolbar(inProps) {
110
121
  const props = useThemeProps({
111
122
  props: inProps,
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.16.2
2
+ * @mui/x-date-pickers v6.16.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,19 +1,27 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["before", "after"];
1
4
  import * as React from 'react';
2
5
  import Stack from '@mui/material/Stack';
3
6
  import { jsx as _jsx } from "react/jsx-runtime";
4
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
5
- export function FakeTextField(props) {
8
+ export const FakeTextField = /*#__PURE__*/React.forwardRef(function FakeTextField(props, ref) {
6
9
  const {
7
- sections
10
+ elements
8
11
  } = props;
9
12
  return /*#__PURE__*/_jsx(Stack, {
10
13
  direction: "row",
11
14
  spacing: 1,
12
- children: sections.map(section => /*#__PURE__*/_jsxs(React.Fragment, {
13
- children: [section.startSeparator, /*#__PURE__*/_jsx("input", {
14
- value: section.value,
15
- onChange: () => {}
16
- }), section.endSeparator]
17
- }))
15
+ ref: ref,
16
+ children: elements.map((_ref, elementIndex) => {
17
+ let {
18
+ before,
19
+ after
20
+ } = _ref,
21
+ otherElementProps = _objectWithoutPropertiesLoose(_ref, _excluded);
22
+ return /*#__PURE__*/_jsxs(React.Fragment, {
23
+ children: [before, /*#__PURE__*/_jsx("input", _extends({}, otherElementProps)), after]
24
+ }, elementIndex);
25
+ })
18
26
  });
19
- }
27
+ });
@@ -161,6 +161,11 @@ export const useField = params => {
161
161
  return;
162
162
  }
163
163
  const targetValue = event.target.value;
164
+ if (targetValue === '') {
165
+ resetCharacterQuery();
166
+ clearValue();
167
+ return;
168
+ }
164
169
  const eventData = event.nativeEvent.data;
165
170
  // Calling `.fill(04/11/2022)` in playwright will trigger a change event with the requested content to insert in `event.nativeEvent.data`
166
171
  // usual changes have only the currently typed character in the `event.nativeEvent.data`
@@ -200,8 +205,13 @@ export const useField = params => {
200
205
  const activeSectionEndRelativeToNewValue = cleanValueStr.length - prevValueStr.length + activeSection.end - cleanString(activeSection.endSeparator || '').length;
201
206
  keyPressed = cleanValueStr.slice(activeSection.start + cleanString(activeSection.startSeparator || '').length, activeSectionEndRelativeToNewValue);
202
207
  }
203
- if (isAndroid() && keyPressed.length === 0) {
204
- setTempAndroidValueStr(valueStr);
208
+ if (keyPressed.length === 0) {
209
+ if (isAndroid()) {
210
+ setTempAndroidValueStr(valueStr);
211
+ } else {
212
+ resetCharacterQuery();
213
+ clearActiveSection();
214
+ }
205
215
  return;
206
216
  }
207
217
  applyCharacterEditing({
@@ -259,7 +269,7 @@ export const useField = params => {
259
269
  }
260
270
 
261
271
  // Reset the value of the selected section
262
- case ['Backspace', 'Delete'].includes(event.key):
272
+ case event.key === 'Delete':
263
273
  {
264
274
  event.preventDefault();
265
275
  if (readOnly) {
@@ -320,7 +330,7 @@ export const useField = params => {
320
330
  // Fix scroll jumping on iOS browser: https://github.com/mui/mui-x/issues/8321
321
331
  const currentScrollTop = inputRef.current.scrollTop;
322
332
  // On multi input range pickers we want to update selection range only for the active input
323
- // This helps avoiding the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
333
+ // This helps to avoid the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
324
334
  // because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425
325
335
  if (inputRef.current === getActiveElement(document)) {
326
336
  inputRef.current.setSelectionRange(selectionStart, selectionEnd);
@@ -300,7 +300,7 @@ export const doesSectionFormatHaveLeadingZeros = (utils, timezone, contentType,
300
300
  }
301
301
  case 'seconds':
302
302
  {
303
- return utils.formatByString(utils.setMinutes(now, 1), format).length > 1;
303
+ return utils.formatByString(utils.setSeconds(now, 1), format).length > 1;
304
304
  }
305
305
  default:
306
306
  {
@@ -117,6 +117,9 @@ export const useFieldState = params => {
117
117
  referenceValue,
118
118
  tempValueStrAndroid: null
119
119
  }));
120
+ if (valueManager.areValuesEqual(utils, state.value, value)) {
121
+ return;
122
+ }
120
123
  const context = {
121
124
  validationError: validator({
122
125
  adapter,
@@ -138,9 +141,6 @@ export const useFieldState = params => {
138
141
  return addPositionPropertiesToSections(newSections, isRTL);
139
142
  };
140
143
  const clearValue = () => {
141
- if (valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue)) {
142
- return;
143
- }
144
144
  publishValue({
145
145
  value: valueManager.emptyValue,
146
146
  referenceValue: state.referenceValue,
@@ -152,14 +152,11 @@ export const useFieldState = params => {
152
152
  return;
153
153
  }
154
154
  const activeSection = state.sections[selectedSectionIndexes.startIndex];
155
- if (activeSection.value === '') {
156
- return;
157
- }
158
155
  const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);
159
156
  const nonEmptySectionCountBefore = activeDateManager.getSections(state.sections).filter(section => section.value !== '').length;
160
- const isTheOnlyNonEmptySection = nonEmptySectionCountBefore === 1;
157
+ const hasNoOtherNonEmptySections = nonEmptySectionCountBefore === (activeSection.value === '' ? 0 : 1);
161
158
  const newSections = setSectionValue(selectedSectionIndexes.startIndex, '');
162
- const newActiveDate = isTheOnlyNonEmptySection ? null : utils.date(new Date(''));
159
+ const newActiveDate = hasNoOtherNonEmptySections ? null : utils.date(new Date(''));
163
160
  const newValues = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);
164
161
  if ((newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date))) {
165
162
  publishValue(_extends({}, newValues, {
@@ -30,8 +30,8 @@ var _valueManagers = require("../internals/utils/valueManagers");
30
30
  var _dimensions = require("../internals/constants/dimensions");
31
31
  var _jsxRuntime = require("react/jsx-runtime");
32
32
  const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "defaultCalendarMonth", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "components", "componentsProps", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsPerRow", "monthsPerRow", "timezone"];
33
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
34
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
34
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
35
35
  const useUtilityClasses = ownerState => {
36
36
  const {
37
37
  classes
@@ -24,8 +24,8 @@ var _dayCalendarClasses = require("./dayCalendarClasses");
24
24
  var _jsxRuntime = require("react/jsx-runtime");
25
25
  const _excluded = ["parentProps", "day", "focusableDay", "selectedDays", "isDateDisabled", "currentMonthNumber", "isViewFocused"],
26
26
  _excluded2 = ["ownerState"];
27
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
28
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
28
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
29
29
  const useUtilityClasses = ownerState => {
30
30
  const {
31
31
  classes
@@ -13,8 +13,8 @@ var _styles = require("@mui/material/styles");
13
13
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
14
  var _pickersFadeTransitionGroupClasses = require("./pickersFadeTransitionGroupClasses");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  const useUtilityClasses = ownerState => {
19
19
  const {
20
20
  classes