@mui/x-date-pickers 7.11.1 → 7.12.1

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 (174) hide show
  1. package/AdapterDateFns/AdapterDateFns.js +5 -2
  2. package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +4 -4
  3. package/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
  4. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +0 -1
  5. package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
  6. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.d.ts +0 -1
  7. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
  8. package/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
  9. package/AdapterDayjs/AdapterDayjs.js +2 -1
  10. package/AdapterLuxon/AdapterLuxon.js +1 -0
  11. package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +1 -0
  12. package/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
  13. package/CHANGELOG.md +178 -4
  14. package/DateCalendar/DateCalendar.js +3 -1
  15. package/DateCalendar/DateCalendar.types.d.ts +1 -1
  16. package/DateCalendar/DayCalendar.js +1 -1
  17. package/DateField/DateField.js +3 -1
  18. package/DateField/DateField.types.d.ts +1 -1
  19. package/DatePicker/DatePicker.js +2 -0
  20. package/DatePicker/DatePickerToolbar.js +1 -1
  21. package/DateTimeField/DateTimeField.js +3 -1
  22. package/DateTimeField/DateTimeField.types.d.ts +1 -1
  23. package/DateTimePicker/DateTimePicker.js +2 -0
  24. package/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -1
  25. package/DesktopDatePicker/DesktopDatePicker.js +3 -1
  26. package/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -1
  27. package/DesktopTimePicker/DesktopTimePicker.js +1 -1
  28. package/DigitalClock/DigitalClock.js +1 -1
  29. package/DigitalClock/DigitalClock.types.d.ts +1 -1
  30. package/MobileDatePicker/MobileDatePicker.js +3 -1
  31. package/MobileDateTimePicker/MobileDateTimePicker.js +3 -1
  32. package/MobileTimePicker/MobileTimePicker.js +1 -1
  33. package/MonthCalendar/MonthCalendar.js +2 -0
  34. package/MonthCalendar/PickersMonth.js +1 -1
  35. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +1 -1
  36. package/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  37. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +1 -1
  38. package/PickersLayout/PickersLayout.js +1 -1
  39. package/PickersLayout/PickersLayout.types.d.ts +1 -1
  40. package/PickersLayout/usePickerLayout.js +2 -2
  41. package/PickersSectionList/PickersSectionList.js +1 -1
  42. package/PickersSectionList/PickersSectionList.types.d.ts +1 -1
  43. package/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
  44. package/PickersTextField/PickersTextField.js +2 -0
  45. package/StaticDatePicker/StaticDatePicker.js +2 -0
  46. package/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  47. package/TimeClock/ClockNumber.js +1 -1
  48. package/TimeClock/ClockPointer.js +1 -1
  49. package/TimeField/TimeField.js +1 -1
  50. package/TimeField/TimeField.types.d.ts +1 -1
  51. package/TimePicker/TimePickerToolbar.js +1 -1
  52. package/YearCalendar/PickersYear.js +1 -1
  53. package/YearCalendar/YearCalendar.js +2 -0
  54. package/hooks/useClearableField.d.ts +1 -1
  55. package/hooks/useClearableField.js +1 -1
  56. package/index.js +1 -1
  57. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
  58. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +1 -1
  59. package/internals/components/PickersPopper.d.ts +2 -2
  60. package/internals/components/PickersPopper.js +1 -1
  61. package/internals/components/PickersToolbar.js +1 -1
  62. package/internals/components/PickersToolbarButton.js +1 -1
  63. package/internals/components/PickersToolbarText.js +1 -1
  64. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
  65. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +1 -1
  66. package/internals/hooks/useField/useField.utils.js +1 -1
  67. package/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
  68. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +1 -1
  69. package/internals/models/validation.d.ts +2 -0
  70. package/locales/fiFI.js +2 -2
  71. package/locales/nlNL.js +15 -19
  72. package/modern/AdapterDateFns/AdapterDateFns.js +5 -2
  73. package/modern/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
  74. package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
  75. package/modern/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
  76. package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
  77. package/modern/AdapterDayjs/AdapterDayjs.js +2 -1
  78. package/modern/AdapterLuxon/AdapterLuxon.js +1 -0
  79. package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
  80. package/modern/DateCalendar/DateCalendar.js +3 -1
  81. package/modern/DateCalendar/DayCalendar.js +1 -1
  82. package/modern/DateField/DateField.js +3 -1
  83. package/modern/DatePicker/DatePicker.js +2 -0
  84. package/modern/DatePicker/DatePickerToolbar.js +1 -1
  85. package/modern/DateTimeField/DateTimeField.js +3 -1
  86. package/modern/DateTimePicker/DateTimePicker.js +2 -0
  87. package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -1
  88. package/modern/DesktopDatePicker/DesktopDatePicker.js +3 -1
  89. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -1
  90. package/modern/DesktopTimePicker/DesktopTimePicker.js +1 -1
  91. package/modern/DigitalClock/DigitalClock.js +1 -1
  92. package/modern/MobileDatePicker/MobileDatePicker.js +3 -1
  93. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +3 -1
  94. package/modern/MobileTimePicker/MobileTimePicker.js +1 -1
  95. package/modern/MonthCalendar/MonthCalendar.js +2 -0
  96. package/modern/MonthCalendar/PickersMonth.js +1 -1
  97. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  98. package/modern/PickersLayout/PickersLayout.js +1 -1
  99. package/modern/PickersLayout/usePickerLayout.js +2 -2
  100. package/modern/PickersSectionList/PickersSectionList.js +1 -1
  101. package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
  102. package/modern/PickersTextField/PickersTextField.js +2 -0
  103. package/modern/StaticDatePicker/StaticDatePicker.js +2 -0
  104. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  105. package/modern/TimeClock/ClockNumber.js +1 -1
  106. package/modern/TimeClock/ClockPointer.js +1 -1
  107. package/modern/TimeField/TimeField.js +1 -1
  108. package/modern/TimePicker/TimePickerToolbar.js +1 -1
  109. package/modern/YearCalendar/PickersYear.js +1 -1
  110. package/modern/YearCalendar/YearCalendar.js +2 -0
  111. package/modern/hooks/useClearableField.js +1 -1
  112. package/modern/index.js +1 -1
  113. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
  114. package/modern/internals/components/PickersPopper.js +1 -1
  115. package/modern/internals/components/PickersToolbar.js +1 -1
  116. package/modern/internals/components/PickersToolbarButton.js +1 -1
  117. package/modern/internals/components/PickersToolbarText.js +1 -1
  118. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
  119. package/modern/internals/hooks/useField/useField.utils.js +1 -1
  120. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
  121. package/modern/locales/fiFI.js +2 -2
  122. package/modern/locales/nlNL.js +15 -19
  123. package/node/AdapterDateFns/AdapterDateFns.js +5 -2
  124. package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
  125. package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
  126. package/node/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
  127. package/node/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
  128. package/node/AdapterDayjs/AdapterDayjs.js +2 -1
  129. package/node/AdapterLuxon/AdapterLuxon.js +1 -0
  130. package/node/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
  131. package/node/DateCalendar/DateCalendar.js +10 -8
  132. package/node/DateCalendar/DayCalendar.js +5 -5
  133. package/node/DateField/DateField.js +6 -4
  134. package/node/DatePicker/DatePicker.js +2 -0
  135. package/node/DatePicker/DatePickerToolbar.js +2 -2
  136. package/node/DateTimeField/DateTimeField.js +6 -4
  137. package/node/DateTimePicker/DateTimePicker.js +2 -0
  138. package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +2 -2
  139. package/node/DesktopDatePicker/DesktopDatePicker.js +6 -4
  140. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +7 -5
  141. package/node/DesktopTimePicker/DesktopTimePicker.js +4 -4
  142. package/node/DigitalClock/DigitalClock.js +2 -2
  143. package/node/MobileDatePicker/MobileDatePicker.js +6 -4
  144. package/node/MobileDateTimePicker/MobileDateTimePicker.js +6 -4
  145. package/node/MobileTimePicker/MobileTimePicker.js +4 -4
  146. package/node/MonthCalendar/MonthCalendar.js +2 -0
  147. package/node/MonthCalendar/PickersMonth.js +2 -2
  148. package/node/PickersCalendarHeader/PickersCalendarHeader.js +5 -5
  149. package/node/PickersLayout/PickersLayout.js +2 -2
  150. package/node/PickersLayout/usePickerLayout.js +6 -6
  151. package/node/PickersSectionList/PickersSectionList.js +6 -6
  152. package/node/PickersTextField/PickersInputBase/PickersInputBase.js +2 -2
  153. package/node/PickersTextField/PickersTextField.js +2 -0
  154. package/node/StaticDatePicker/StaticDatePicker.js +2 -0
  155. package/node/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
  156. package/node/TimeClock/ClockNumber.js +2 -2
  157. package/node/TimeClock/ClockPointer.js +2 -2
  158. package/node/TimeField/TimeField.js +4 -4
  159. package/node/TimePicker/TimePickerToolbar.js +6 -6
  160. package/node/YearCalendar/PickersYear.js +2 -2
  161. package/node/YearCalendar/YearCalendar.js +2 -0
  162. package/node/hooks/useClearableField.js +3 -3
  163. package/node/index.js +1 -1
  164. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +7 -7
  165. package/node/internals/components/PickersPopper.js +13 -13
  166. package/node/internals/components/PickersToolbar.js +2 -2
  167. package/node/internals/components/PickersToolbarButton.js +2 -2
  168. package/node/internals/components/PickersToolbarText.js +2 -2
  169. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +4 -4
  170. package/node/internals/hooks/useField/useField.utils.js +1 -1
  171. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +4 -4
  172. package/node/locales/fiFI.js +2 -2
  173. package/node/locales/nlNL.js +15 -19
  174. package/package.json +2 -3
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import MenuItem from '@mui/material/MenuItem';
4
4
  import { DigitalClockClasses } from './digitalClockClasses';
5
5
  import { BaseClockProps, DigitalClockOnlyProps, ExportedBaseClockProps } from '../internals/models/props/clock';
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { resolveComponentProps } from '@mui/base/utils';
4
+ import resolveComponentProps from '@mui/utils/resolveComponentProps';
5
5
  import { refType } from '@mui/utils';
6
6
  import { useMobilePicker } from '../internals/hooks/useMobilePicker';
7
7
  import { useDatePickerDefaultizedProps } from '../DatePicker/shared';
@@ -162,10 +162,12 @@ MobileDatePicker.propTypes = {
162
162
  localeText: PropTypes.object,
163
163
  /**
164
164
  * Maximal selectable date.
165
+ * @default 2099-12-31
165
166
  */
166
167
  maxDate: PropTypes.object,
167
168
  /**
168
169
  * Minimal selectable date.
170
+ * @default 1900-01-01
169
171
  */
170
172
  minDate: PropTypes.object,
171
173
  /**
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { resolveComponentProps } from '@mui/base/utils';
4
+ import resolveComponentProps from '@mui/utils/resolveComponentProps';
5
5
  import { refType } from '@mui/utils';
6
6
  import { singleItemValueManager } from '../internals/utils/valueManagers';
7
7
  import { DateTimeField } from '../DateTimeField';
@@ -187,6 +187,7 @@ MobileDateTimePicker.propTypes = {
187
187
  localeText: PropTypes.object,
188
188
  /**
189
189
  * Maximal selectable date.
190
+ * @default 2099-12-31
190
191
  */
191
192
  maxDate: PropTypes.object,
192
193
  /**
@@ -200,6 +201,7 @@ MobileDateTimePicker.propTypes = {
200
201
  maxTime: PropTypes.object,
201
202
  /**
202
203
  * Minimal selectable date.
204
+ * @default 1900-01-01
203
205
  */
204
206
  minDate: PropTypes.object,
205
207
  /**
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { resolveComponentProps } from '@mui/base/utils';
4
+ import resolveComponentProps from '@mui/utils/resolveComponentProps';
5
5
  import { refType } from '@mui/utils';
6
6
  import { singleItemValueManager } from '../internals/utils/valueManagers';
7
7
  import { TimeField } from '../TimeField';
@@ -272,10 +272,12 @@ process.env.NODE_ENV !== "production" ? MonthCalendar.propTypes = {
272
272
  hasFocus: PropTypes.bool,
273
273
  /**
274
274
  * Maximal selectable date.
275
+ * @default 2099-12-31
275
276
  */
276
277
  maxDate: PropTypes.object,
277
278
  /**
278
279
  * Minimal selectable date.
280
+ * @default 1900-01-01
279
281
  */
280
282
  minDate: PropTypes.object,
281
283
  /**
@@ -4,7 +4,7 @@ const _excluded = ["autoFocus", "className", "children", "disabled", "selected",
4
4
  import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import { styled, alpha, useThemeProps } from '@mui/material/styles';
7
- import { useSlotProps } from '@mui/base/utils';
7
+ import useSlotProps from '@mui/utils/useSlotProps';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
9
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
10
10
  import { getPickersMonthUtilityClass, pickersMonthClasses } from './pickersMonthClasses';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import MenuItem from '@mui/material/MenuItem';
4
4
  import { MultiSectionDigitalClockClasses } from './multiSectionDigitalClockClasses';
5
5
  import { BaseClockProps, ExportedBaseClockProps, MultiSectionDigitalClockOnlyProps } from '../internals/models/props/clock';
@@ -7,8 +7,8 @@ import PropTypes from 'prop-types';
7
7
  import clsx from 'clsx';
8
8
  import Fade from '@mui/material/Fade';
9
9
  import { styled, useThemeProps } from '@mui/material/styles';
10
- import { useSlotProps } from '@mui/base/utils';
11
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
10
+ import useSlotProps from '@mui/utils/useSlotProps';
11
+ import composeClasses from '@mui/utils/composeClasses';
12
12
  import IconButton from '@mui/material/IconButton';
13
13
  import { usePickersTranslations } from '../hooks/usePickersTranslations';
14
14
  import { useUtils } from '../internals/hooks/useUtils';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import IconButton from '@mui/material/IconButton';
4
4
  import SvgIcon from '@mui/material/SvgIcon';
5
5
  import { SxProps, Theme } from '@mui/material/styles';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import clsx from 'clsx';
4
4
  import { styled, useThemeProps } from '@mui/material/styles';
5
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
5
+ import composeClasses from '@mui/utils/composeClasses';
6
6
  import { pickersLayoutClasses, getPickersLayoutUtilityClass } from './pickersLayoutClasses';
7
7
  import usePickerLayout from './usePickerLayout';
8
8
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps, Theme } from '@mui/material/styles';
3
- import { SlotComponentProps } from '@mui/base/utils';
3
+ import { SlotComponentProps } from '@mui/utils';
4
4
  import { PickersActionBar, PickersActionBarProps } from '../PickersActionBar';
5
5
  import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar';
6
6
  import { BaseTabsProps, ExportedBaseTabsProps } from '../internals/models/props/tabs';
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { useSlotProps } from '@mui/base/utils';
4
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
3
+ import useSlotProps from '@mui/utils/useSlotProps';
4
+ import composeClasses from '@mui/utils/composeClasses';
5
5
  import { PickersActionBar } from '../PickersActionBar';
6
6
  import { getPickersLayoutUtilityClass } from './pickersLayoutClasses';
7
7
  import { PickersShortcuts } from '../PickersShortcuts';
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["slots", "slotProps", "elements", "sectionListRef"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import { useSlotProps } from '@mui/base/utils';
6
+ import useSlotProps from '@mui/utils/useSlotProps';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
8
  import useForkRef from '@mui/utils/useForkRef';
9
9
  import { styled, useThemeProps } from '@mui/material/styles';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import { PickersSectionListClasses } from './pickersSectionListClasses';
4
4
  export interface PickersSectionListSlots {
5
5
  root: React.ElementType;
@@ -9,7 +9,7 @@ import useForkRef from '@mui/utils/useForkRef';
9
9
  import { refType } from '@mui/utils';
10
10
  import composeClasses from '@mui/utils/composeClasses';
11
11
  import capitalize from '@mui/utils/capitalize';
12
- import { useSlotProps } from '@mui/base/utils';
12
+ import useSlotProps from '@mui/utils/useSlotProps';
13
13
  import visuallyHidden from '@mui/utils/visuallyHidden';
14
14
  import { useRtl } from '@mui/system/RtlProvider';
15
15
  import { pickersInputBaseClasses, getPickersInputBaseUtilityClass } from './pickersInputBaseClasses';
@@ -63,6 +63,7 @@ const PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField
63
63
  areAllSectionsEmpty,
64
64
  onClick,
65
65
  onKeyDown,
66
+ onKeyUp,
66
67
  onPaste,
67
68
  onInput,
68
69
  endAdornment,
@@ -122,6 +123,7 @@ const PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField
122
123
  areAllSectionsEmpty: areAllSectionsEmpty,
123
124
  onClick: onClick,
124
125
  onKeyDown: onKeyDown,
126
+ onKeyUp: onKeyUp,
125
127
  onInput: onInput,
126
128
  onPaste: onPaste,
127
129
  endAdornment: endAdornment,
@@ -119,10 +119,12 @@ StaticDatePicker.propTypes = {
119
119
  localeText: PropTypes.object,
120
120
  /**
121
121
  * Maximal selectable date.
122
+ * @default 2099-12-31
122
123
  */
123
124
  maxDate: PropTypes.object,
124
125
  /**
125
126
  * Minimal selectable date.
127
+ * @default 1900-01-01
126
128
  */
127
129
  minDate: PropTypes.object,
128
130
  /**
@@ -144,6 +144,7 @@ StaticDateTimePicker.propTypes = {
144
144
  localeText: PropTypes.object,
145
145
  /**
146
146
  * Maximal selectable date.
147
+ * @default 2099-12-31
147
148
  */
148
149
  maxDate: PropTypes.object,
149
150
  /**
@@ -157,6 +158,7 @@ StaticDateTimePicker.propTypes = {
157
158
  maxTime: PropTypes.object,
158
159
  /**
159
160
  * Minimal selectable date.
161
+ * @default 1900-01-01
160
162
  */
161
163
  minDate: PropTypes.object,
162
164
  /**
@@ -4,7 +4,7 @@ const _excluded = ["className", "disabled", "index", "inner", "label", "selected
4
4
  import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import { styled, useThemeProps } from '@mui/material/styles';
7
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
7
+ import composeClasses from '@mui/utils/composeClasses';
8
8
  import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';
9
9
  import { getClockNumberUtilityClass, clockNumberClasses } from './clockNumberClasses';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -4,7 +4,7 @@ const _excluded = ["className", "hasSelected", "isInner", "type", "viewValue"];
4
4
  import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import { styled, useThemeProps } from '@mui/material/styles';
7
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
7
+ import composeClasses from '@mui/utils/composeClasses';
8
8
  import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';
9
9
  import { getClockPointerUtilityClass } from './clockPointerClasses';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import MuiTextField from '@mui/material/TextField';
7
7
  import { useThemeProps } from '@mui/material/styles';
8
- import { useSlotProps } from '@mui/base/utils';
8
+ import useSlotProps from '@mui/utils/useSlotProps';
9
9
  import { refType } from '@mui/utils';
10
10
  import { useTimeField } from './useTimeField';
11
11
  import { useClearableField } from '../hooks';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import TextField from '@mui/material/TextField';
4
4
  import { UseFieldInternalProps } from '../internals/hooks/useField';
5
5
  import { MakeOptional } from '../internals/models/helpers';
@@ -6,7 +6,7 @@ import clsx from 'clsx';
6
6
  import PropTypes from 'prop-types';
7
7
  import { useRtl } from '@mui/system/RtlProvider';
8
8
  import { styled, useThemeProps } from '@mui/material/styles';
9
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
9
+ import composeClasses from '@mui/utils/composeClasses';
10
10
  import { PickersToolbarText } from '../internals/components/PickersToolbarText';
11
11
  import { PickersToolbarButton } from '../internals/components/PickersToolbarButton';
12
12
  import { PickersToolbar } from '../internals/components/PickersToolbar';
@@ -4,7 +4,7 @@ const _excluded = ["autoFocus", "className", "children", "disabled", "selected",
4
4
  import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import { styled, alpha, useThemeProps } from '@mui/material/styles';
7
- import { useSlotProps } from '@mui/base/utils';
7
+ import useSlotProps from '@mui/utils/useSlotProps';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
9
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
10
10
  import { getPickersYearUtilityClass, pickersYearClasses } from './pickersYearClasses';
@@ -297,10 +297,12 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
297
297
  hasFocus: PropTypes.bool,
298
298
  /**
299
299
  * Maximal selectable date.
300
+ * @default 2099-12-31
300
301
  */
301
302
  maxDate: PropTypes.object,
302
303
  /**
303
304
  * Minimal selectable date.
305
+ * @default 1900-01-01
304
306
  */
305
307
  minDate: PropTypes.object,
306
308
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import MuiIconButton from '@mui/material/IconButton';
4
4
  import { SxProps } from '@mui/system';
5
5
  import { ClearIcon } from '../icons';
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["clearable", "onClear", "InputProps", "sx", "slots", "slotProps"],
4
4
  _excluded2 = ["ownerState"];
5
5
  import * as React from 'react';
6
- import { useSlotProps } from '@mui/base/utils';
6
+ import useSlotProps from '@mui/utils/useSlotProps';
7
7
  import MuiIconButton from '@mui/material/IconButton';
8
8
  import InputAdornment from '@mui/material/InputAdornment';
9
9
  import { ClearIcon } from '../icons';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.11.1
2
+ * @mui/x-date-pickers v7.12.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -8,8 +8,8 @@ import clsx from 'clsx';
8
8
  import Typography from '@mui/material/Typography';
9
9
  import { useRtl } from '@mui/system/RtlProvider';
10
10
  import { styled, useThemeProps } from '@mui/material/styles';
11
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
12
- import { useSlotProps } from '@mui/base/utils';
11
+ import composeClasses from '@mui/utils/composeClasses';
12
+ import useSlotProps from '@mui/utils/useSlotProps';
13
13
  import IconButton from '@mui/material/IconButton';
14
14
  import { ArrowLeftIcon, ArrowRightIcon } from '../../../icons';
15
15
  import { getPickersArrowSwitcherUtilityClass } from './pickersArrowSwitcherClasses';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
2
+ import { SlotComponentProps } from '@mui/utils';
3
3
  import IconButton from '@mui/material/IconButton';
4
4
  import SvgIcon from '@mui/material/SvgIcon';
5
5
  import { PickersArrowSwitcherClasses } from './pickersArrowSwitcherClasses';
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
3
2
  import MuiPaper, { PaperProps as MuiPaperProps } from '@mui/material/Paper';
4
3
  import MuiPopper, { PopperProps as MuiPopperProps, PopperPlacementType } from '@mui/material/Popper';
5
4
  import { TrapFocusProps as MuiTrapFocusProps } from '@mui/material/Unstable_TrapFocus';
5
+ import { SlotComponentProps } from '@mui/utils';
6
6
  import { TransitionProps as MuiTransitionProps } from '@mui/material/transitions';
7
7
  import { PickersPopperClasses } from './pickersPopperClasses';
8
8
  import { UsePickerValueActions } from '../hooks/usePicker/usePickerValue.types';
@@ -22,7 +22,7 @@ export interface PickersPopperSlots {
22
22
  desktopTransition?: React.JSXElementConstructor<MuiTransitionProps>;
23
23
  /**
24
24
  * Custom component for trapping the focus inside the views on desktop.
25
- * @default FocusTrap from '@mui/base'.
25
+ * @default TrapFocus from '@mui/material'.
26
26
  */
27
27
  desktopTrapFocus?: React.JSXElementConstructor<MuiTrapFocusProps>;
28
28
  /**
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["PaperComponent", "popperPlacement", "ownerState", "children", "paperSlotProps", "paperClasses", "onPaperClick", "onPaperTouchStart"];
4
4
  import * as React from 'react';
5
- import { useSlotProps } from '@mui/base/utils';
5
+ import useSlotProps from '@mui/utils/useSlotProps';
6
6
  import Grow from '@mui/material/Grow';
7
7
  import Fade from '@mui/material/Fade';
8
8
  import MuiPaper from '@mui/material/Paper';
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Typography from '@mui/material/Typography';
7
7
  import { styled, useThemeProps } from '@mui/material/styles';
8
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
8
+ import composeClasses from '@mui/utils/composeClasses';
9
9
  import { getPickersToolbarUtilityClass } from './pickersToolbarClasses';
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  const useUtilityClasses = ownerState => {
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Button from '@mui/material/Button';
7
7
  import { styled, useThemeProps } from '@mui/material/styles';
8
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
8
+ import composeClasses from '@mui/utils/composeClasses';
9
9
  import { PickersToolbarText } from './PickersToolbarText';
10
10
  import { getPickersToolbarUtilityClass } from './pickersToolbarClasses';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Typography from '@mui/material/Typography';
7
7
  import { styled, useThemeProps } from '@mui/material/styles';
8
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
8
+ import composeClasses from '@mui/utils/composeClasses';
9
9
  import { getPickersToolbarTextUtilityClass, pickersToolbarTextClasses } from './pickersToolbarTextClasses';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  const useUtilityClasses = ownerState => {
@@ -4,7 +4,7 @@ const _excluded = ["props", "getOpenDialogAriaText"],
4
4
  _excluded2 = ["ownerState"],
5
5
  _excluded3 = ["ownerState"];
6
6
  import * as React from 'react';
7
- import { useSlotProps } from '@mui/base/utils';
7
+ import useSlotProps from '@mui/utils/useSlotProps';
8
8
  import MuiInputAdornment from '@mui/material/InputAdornment';
9
9
  import IconButton from '@mui/material/IconButton';
10
10
  import useForkRef from '@mui/utils/useForkRef';
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import IconButton, { IconButtonProps } from '@mui/material/IconButton';
3
3
  import { InputAdornmentProps } from '@mui/material/InputAdornment';
4
4
  import TextField from '@mui/material/TextField';
5
- import { SlotComponentProps } from '@mui/base/utils';
5
+ import { SlotComponentProps } from '@mui/utils';
6
6
  import { BaseNonStaticPickerProps, BasePickerProps, BaseNonRangeNonStaticPickerProps } from '../../models/props/basePickerProps';
7
7
  import { PickersPopperSlots, PickersPopperSlotProps } from '../../components/PickersPopper';
8
8
  import { UsePickerParams, UsePickerProps } from '../usePicker';
@@ -507,7 +507,7 @@ export const mergeDateIntoReferenceDate = (utils, timezone, dateToTransferFrom,
507
507
  }
508
508
  return mergedDate;
509
509
  }, referenceDate);
510
- export const isAndroid = () => navigator.userAgent.toLowerCase().indexOf('android') > -1;
510
+ export const isAndroid = () => navigator.userAgent.toLowerCase().includes('android');
511
511
 
512
512
  // TODO v8: Remove if we drop the v6 TextField approach.
513
513
  export const getSectionOrder = (sections, shouldApplyRTL) => {
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["props", "getOpenDialogAriaText"];
4
4
  import * as React from 'react';
5
- import { useSlotProps } from '@mui/base/utils';
5
+ import useSlotProps from '@mui/utils/useSlotProps';
6
6
  import useForkRef from '@mui/utils/useForkRef';
7
7
  import useId from '@mui/utils/useId';
8
8
  import { PickersModalDialog } from '../../components/PickersModalDialog';
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import TextField from '@mui/material/TextField';
3
- import { SlotComponentProps } from '@mui/base/utils';
3
+ import { SlotComponentProps } from '@mui/utils';
4
4
  import { BaseNonStaticPickerProps, BasePickerProps, BaseNonRangeNonStaticPickerProps } from '../../models/props/basePickerProps';
5
5
  import { PickersModalDialogSlots, PickersModalDialogSlotProps } from '../../components/PickersModalDialog';
6
6
  import { UsePickerParams, UsePickerProps } from '../usePicker';
@@ -57,10 +57,12 @@ export interface TimeValidationProps<TDate extends PickerValidDate> {
57
57
  export interface BaseDateValidationProps<TDate extends PickerValidDate> extends FutureAndPastValidationProps {
58
58
  /**
59
59
  * Maximal selectable date.
60
+ * @default 2099-12-31
60
61
  */
61
62
  maxDate?: TDate;
62
63
  /**
63
64
  * Minimal selectable date.
65
+ * @default 1900-01-01
64
66
  */
65
67
  minDate?: TDate;
66
68
  }
package/locales/fiFI.js CHANGED
@@ -10,8 +10,8 @@ const fiFIPickers = {
10
10
  previousMonth: 'Edellinen kuukausi',
11
11
  nextMonth: 'Seuraava kuukausi',
12
12
  // View navigation
13
- openPreviousView: 'Avaa edellinen kuukausi',
14
- openNextView: 'Avaa seuraava kuukausi',
13
+ openPreviousView: 'Avaa edellinen näkymä',
14
+ openNextView: 'Avaa seuraava näkymä',
15
15
  calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'vuosinäkymä on auki, vaihda kalenterinäkymään' : 'kalenterinäkymä on auki, vaihda vuosinäkymään',
16
16
  // DateRange labels
17
17
  start: 'Alku',
package/locales/nlNL.js CHANGED
@@ -16,11 +16,10 @@ const nlNLPickers = {
16
16
  // DateRange labels
17
17
  start: 'Start',
18
18
  end: 'Einde',
19
- // startDate: 'Start date',
20
- // startTime: 'Start time',
21
- // endDate: 'End date',
22
- // endTime: 'End time',
23
-
19
+ startDate: 'Start datum',
20
+ startTime: 'Start tijd',
21
+ endDate: 'Eind datum',
22
+ endTime: 'Eind tijd',
24
23
  // Action bar
25
24
  cancelButtonLabel: 'Annuleren',
26
25
  clearButtonLabel: 'Resetten',
@@ -46,8 +45,7 @@ const nlNLPickers = {
46
45
  // Open picker labels
47
46
  openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Kies datum, geselecteerde datum is ${utils.format(value, 'fullDate')}` : 'Kies datum',
48
47
  openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Kies tijd, geselecteerde tijd is ${utils.format(value, 'fullTime')}` : 'Kies tijd',
49
- // fieldClearLabel: 'Clear value',
50
-
48
+ fieldClearLabel: 'Wissen',
51
49
  // Table labels
52
50
  timeTableLabel: 'kies tijd',
53
51
  dateTableLabel: 'kies datum',
@@ -59,19 +57,17 @@ const nlNLPickers = {
59
57
  fieldHoursPlaceholder: () => 'hh',
60
58
  fieldMinutesPlaceholder: () => 'mm',
61
59
  fieldSecondsPlaceholder: () => 'ss',
62
- fieldMeridiemPlaceholder: () => 'aa'
63
-
60
+ fieldMeridiemPlaceholder: () => 'aa',
64
61
  // View names
65
- // year: 'Year',
66
- // month: 'Month',
67
- // day: 'Day',
68
- // weekDay: 'Week day',
69
- // hours: 'Hours',
70
- // minutes: 'Minutes',
71
- // seconds: 'Seconds',
72
- // meridiem: 'Meridiem',
73
-
62
+ year: 'Jaar',
63
+ month: 'Maand',
64
+ day: 'Dag',
65
+ weekDay: 'Weekdag',
66
+ hours: 'Uren',
67
+ minutes: 'Minuten',
68
+ seconds: 'Seconden',
69
+ meridiem: 'Middag',
74
70
  // Common
75
- // empty: 'Empty',
71
+ empty: 'Legen'
76
72
  };
77
73
  export const nlNL = getPickersLocalization(nlNLPickers);
@@ -75,8 +75,11 @@ export class AdapterDateFns extends AdapterDateFnsBase {
75
75
  locale,
76
76
  formats
77
77
  } = {}) {
78
- if (typeof addDays !== 'function') {
79
- throw new Error(['MUI: The `date-fns` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsV3` instead.'].join('\n'));
78
+ /* istanbul ignore next */
79
+ if (process.env.NODE_ENV !== 'production') {
80
+ if (typeof addDays !== 'function') {
81
+ throw new Error(['MUI: The `date-fns` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsV3` instead.'].join('\n'));
82
+ }
80
83
  }
81
84
  super({
82
85
  locale: locale ?? defaultLocale,
@@ -249,19 +249,15 @@ export class AdapterDateFnsBase {
249
249
  return value;
250
250
  };
251
251
  this.getCurrentLocaleCode = () => {
252
- return this.locale?.code || 'en-US';
252
+ // `code` is undefined only in `date-fns` types, but all locales have it
253
+ return this.locale.code;
253
254
  };
254
255
  // Note: date-fns input types are more lenient than this adapter, so we need to expose our more
255
256
  // strict signature and delegate to the more lenient signature. Otherwise, we have downstream type errors upon usage.
256
257
  this.is12HourCycleInCurrentLocale = () => {
257
- if (this.locale) {
258
- return /a/.test(this.locale.formatLong.time({
259
- width: 'short'
260
- }));
261
- }
262
-
263
- // By default, date-fns is using en-US locale with am/pm enabled
264
- return true;
258
+ return /a/.test(this.locale.formatLong.time({
259
+ width: 'short'
260
+ }));
265
261
  };
266
262
  this.expandFormat = format => {
267
263
  const longFormatRegexp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
@@ -113,8 +113,11 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
113
113
  locale,
114
114
  formats
115
115
  } = {}) {
116
- if (typeof addDays !== 'function') {
117
- throw new Error(['MUI: The `date-fns-jalali` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsJalaliV3` instead.'].join('\n'));
116
+ /* istanbul ignore next */
117
+ if (process.env.NODE_ENV !== 'production') {
118
+ if (typeof addDays !== 'function') {
119
+ throw new Error(['MUI: The `date-fns-jalali` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsJalaliV3` instead.'].join('\n'));
120
+ }
118
121
  }
119
122
  super({
120
123
  locale: locale ?? defaultLocale,
@@ -132,9 +135,6 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
132
135
  locale: this.locale
133
136
  });
134
137
  };
135
- this.getCurrentLocaleCode = () => {
136
- return this.locale?.code || 'fa-IR';
137
- };
138
138
  this.isValid = value => {
139
139
  if (value == null) {
140
140
  return false;