@mui/x-date-pickers-pro 7.15.0 → 7.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/CHANGELOG.md +185 -1
  2. package/DateRangeCalendar/DateRangeCalendar.js +16 -13
  3. package/DateRangeCalendar/index.js +2 -2
  4. package/DateRangeCalendar/useDragRange.js +3 -1
  5. package/DateRangePicker/DateRangePicker.js +15 -13
  6. package/DateRangePicker/DateRangePickerToolbar.js +3 -1
  7. package/DateRangePicker/index.js +3 -3
  8. package/DateRangePicker/shared.js +1 -1
  9. package/DateRangePickerDay/DateRangePickerDay.js +4 -2
  10. package/DateRangePickerDay/index.js +2 -2
  11. package/DateTimeRangePicker/DateTimeRangePicker.js +15 -13
  12. package/DateTimeRangePicker/DateTimeRangePickerTabs.js +3 -1
  13. package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -2
  14. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +4 -2
  15. package/DateTimeRangePicker/index.js +5 -5
  16. package/DateTimeRangePicker/shared.js +2 -2
  17. package/DesktopDateRangePicker/DesktopDateRangePicker.js +20 -18
  18. package/DesktopDateRangePicker/index.js +1 -1
  19. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +23 -20
  20. package/DesktopDateTimeRangePicker/index.js +1 -1
  21. package/MobileDateRangePicker/MobileDateRangePicker.js +20 -18
  22. package/MobileDateRangePicker/index.js +1 -1
  23. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +23 -20
  24. package/MobileDateTimeRangePicker/index.js +1 -1
  25. package/MultiInputDateRangeField/MultiInputDateRangeField.js +16 -11
  26. package/MultiInputDateRangeField/index.js +2 -2
  27. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +16 -11
  28. package/MultiInputDateTimeRangeField/index.js +2 -2
  29. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +16 -11
  30. package/MultiInputTimeRangeField/index.js +2 -2
  31. package/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +2 -0
  32. package/PickersRangeCalendarHeader/index.js +1 -1
  33. package/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -8
  34. package/SingleInputDateRangeField/index.js +2 -2
  35. package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +1 -1
  36. package/SingleInputDateRangeField/useSingleInputDateRangeField.js +7 -4
  37. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -8
  38. package/SingleInputDateTimeRangeField/index.js +2 -2
  39. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +1 -1
  40. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +7 -4
  41. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +12 -8
  42. package/SingleInputTimeRangeField/index.js +2 -2
  43. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +1 -1
  44. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +7 -4
  45. package/StaticDateRangePicker/StaticDateRangePicker.js +18 -16
  46. package/StaticDateRangePicker/index.js +1 -1
  47. package/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -1
  48. package/dateRangeViewRenderers/index.js +1 -1
  49. package/index.d.ts +1 -0
  50. package/index.js +20 -19
  51. package/internals/hooks/useDesktopRangePicker/index.js +1 -1
  52. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -3
  53. package/internals/hooks/useMobileRangePicker/index.js +1 -1
  54. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -3
  55. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -17
  56. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +17 -17
  57. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +17 -17
  58. package/internals/hooks/useStaticRangePicker/index.js +1 -1
  59. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -1
  60. package/internals/models/index.js +4 -4
  61. package/internals/utils/releaseInfo.js +1 -1
  62. package/internals/utils/valueManagers.js +1 -1
  63. package/models/index.js +5 -5
  64. package/modern/DateRangeCalendar/DateRangeCalendar.js +16 -13
  65. package/modern/DateRangeCalendar/index.js +2 -2
  66. package/modern/DateRangeCalendar/useDragRange.js +3 -1
  67. package/modern/DateRangePicker/DateRangePicker.js +15 -13
  68. package/modern/DateRangePicker/DateRangePickerToolbar.js +3 -1
  69. package/modern/DateRangePicker/index.js +3 -3
  70. package/modern/DateRangePicker/shared.js +1 -1
  71. package/modern/DateRangePickerDay/DateRangePickerDay.js +4 -2
  72. package/modern/DateRangePickerDay/index.js +2 -2
  73. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +15 -13
  74. package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +3 -1
  75. package/modern/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -2
  76. package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +4 -2
  77. package/modern/DateTimeRangePicker/index.js +5 -5
  78. package/modern/DateTimeRangePicker/shared.js +2 -2
  79. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +20 -18
  80. package/modern/DesktopDateRangePicker/index.js +1 -1
  81. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +23 -20
  82. package/modern/DesktopDateTimeRangePicker/index.js +1 -1
  83. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +20 -18
  84. package/modern/MobileDateRangePicker/index.js +1 -1
  85. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +23 -20
  86. package/modern/MobileDateTimeRangePicker/index.js +1 -1
  87. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +16 -11
  88. package/modern/MultiInputDateRangeField/index.js +2 -2
  89. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +16 -11
  90. package/modern/MultiInputDateTimeRangeField/index.js +2 -2
  91. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +16 -11
  92. package/modern/MultiInputTimeRangeField/index.js +2 -2
  93. package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +2 -0
  94. package/modern/PickersRangeCalendarHeader/index.js +1 -1
  95. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -8
  96. package/modern/SingleInputDateRangeField/index.js +2 -2
  97. package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +7 -4
  98. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -8
  99. package/modern/SingleInputDateTimeRangeField/index.js +2 -2
  100. package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +7 -4
  101. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +12 -8
  102. package/modern/SingleInputTimeRangeField/index.js +2 -2
  103. package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +7 -4
  104. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +18 -16
  105. package/modern/StaticDateRangePicker/index.js +1 -1
  106. package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -1
  107. package/modern/dateRangeViewRenderers/index.js +1 -1
  108. package/modern/index.js +20 -19
  109. package/modern/internals/hooks/useDesktopRangePicker/index.js +1 -1
  110. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -3
  111. package/modern/internals/hooks/useMobileRangePicker/index.js +1 -1
  112. package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -3
  113. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -17
  114. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +17 -17
  115. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +17 -17
  116. package/modern/internals/hooks/useStaticRangePicker/index.js +1 -1
  117. package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -1
  118. package/modern/internals/models/index.js +4 -4
  119. package/modern/internals/utils/releaseInfo.js +1 -1
  120. package/modern/internals/utils/valueManagers.js +1 -1
  121. package/modern/models/index.js +5 -5
  122. package/modern/themeAugmentation/index.js +1 -4
  123. package/modern/validation/index.js +3 -0
  124. package/modern/{internals/utils/validation → validation}/validateDateRange.js +10 -5
  125. package/modern/{internals/utils/validation → validation}/validateDateTimeRange.js +10 -5
  126. package/{internals/utils → modern}/validation/validateTimeRange.js +10 -5
  127. package/node/DateRangeCalendar/DateRangeCalendar.js +7 -6
  128. package/node/DateRangeCalendar/useDragRange.js +3 -3
  129. package/node/DateRangePicker/DateRangePicker.js +14 -14
  130. package/node/DateRangePicker/DateRangePickerToolbar.js +3 -3
  131. package/node/DateRangePicker/shared.js +2 -3
  132. package/node/DateRangePickerDay/DateRangePickerDay.js +3 -3
  133. package/node/DateTimeRangePicker/DateTimeRangePicker.js +14 -14
  134. package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +3 -3
  135. package/node/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +1 -1
  136. package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +3 -3
  137. package/node/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +1 -1
  138. package/node/DateTimeRangePicker/shared.js +1 -1
  139. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +18 -18
  140. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +18 -17
  141. package/node/MobileDateRangePicker/MobileDateRangePicker.js +18 -18
  142. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +18 -17
  143. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +15 -12
  144. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +15 -12
  145. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +15 -12
  146. package/node/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +3 -3
  147. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  148. package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +6 -5
  149. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -10
  150. package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +6 -5
  151. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +12 -10
  152. package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +6 -5
  153. package/node/StaticDateRangePicker/StaticDateRangePicker.js +16 -16
  154. package/node/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -2
  155. package/node/index.js +13 -1
  156. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -3
  157. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +2 -3
  158. package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -3
  159. package/node/internals/hooks/useMultiInputFieldSelectedSections.js +2 -3
  160. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +14 -14
  161. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +14 -14
  162. package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +14 -14
  163. package/node/internals/hooks/useRangePosition.js +1 -1
  164. package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +2 -3
  165. package/node/internals/utils/date-fields-utils.js +1 -1
  166. package/node/internals/utils/releaseInfo.js +1 -1
  167. package/node/internals/utils/valueManagers.js +1 -1
  168. package/node/themeAugmentation/index.js +0 -33
  169. package/node/validation/index.js +26 -0
  170. package/node/{internals/utils/validation → validation}/validateDateRange.js +13 -8
  171. package/node/{internals/utils/validation → validation}/validateDateTimeRange.js +13 -8
  172. package/node/{internals/utils/validation → validation}/validateTimeRange.js +12 -7
  173. package/package.json +5 -4
  174. package/themeAugmentation/index.d.ts +3 -3
  175. package/themeAugmentation/index.js +1 -4
  176. package/validation/index.d.ts +6 -0
  177. package/validation/index.js +3 -0
  178. package/validation/package.json +6 -0
  179. package/validation/validateDateRange.d.ts +8 -0
  180. package/{internals/utils/validation → validation}/validateDateRange.js +10 -5
  181. package/validation/validateDateTimeRange.d.ts +8 -0
  182. package/{internals/utils/validation → validation}/validateDateTimeRange.js +10 -5
  183. package/validation/validateTimeRange.d.ts +6 -0
  184. package/{modern/internals/utils/validation → validation}/validateTimeRange.js +10 -5
  185. package/internals/utils/validation/validateDateRange.d.ts +0 -7
  186. package/internals/utils/validation/validateDateTimeRange.d.ts +0 -7
  187. package/internals/utils/validation/validateTimeRange.d.ts +0 -6
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  import _extends from "@babel/runtime/helpers/esm/extends";
3
5
  const _excluded = ["value", "defaultValue", "referenceDate", "onChange", "className", "disableFuture", "disablePast", "minDate", "maxDate", "shouldDisableDate", "reduceAnimations", "onMonthChange", "rangePosition", "defaultRangePosition", "onRangePositionChange", "calendars", "currentMonthCalendarPosition", "slots", "slotProps", "loading", "renderLoading", "disableHighlightToday", "readOnly", "disabled", "showDaysOutsideCurrentMonth", "dayOfWeekFormatter", "disableAutoMonthSwitching", "autoFocus", "fixedWeekNumber", "disableDragEditing", "displayWeekNumber", "timezone", "availableRangePositions", "views", "view", "openTo", "onViewChange"],
@@ -13,17 +15,18 @@ import { styled, useThemeProps } from '@mui/material/styles';
13
15
  import composeClasses from '@mui/utils/composeClasses';
14
16
  import useId from '@mui/utils/useId';
15
17
  import { Watermark } from '@mui/x-license';
16
- import { applyDefaultDate, DayCalendar, useDefaultReduceAnimations, useCalendarState, useDefaultDates, useUtils, useNow, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, warnOnce, useControlledValueWithTimezone, useViews } from '@mui/x-date-pickers/internals';
17
- import { getReleaseInfo } from '../internals/utils/releaseInfo';
18
- import { dateRangeCalendarClasses, getDateRangeCalendarUtilityClass } from './dateRangeCalendarClasses';
19
- import { isEndOfRange, isRangeValid, isStartOfRange, isWithinRange } from '../internals/utils/date-utils';
20
- import { calculateRangeChange, calculateRangePreview } from '../internals/utils/date-range-manager';
21
- import { DateRangePickerDay, dateRangePickerDayClasses as dayClasses } from '../DateRangePickerDay';
22
- import { rangeValueManager } from '../internals/utils/valueManagers';
23
- import { useDragRange } from './useDragRange';
24
- import { useRangePosition } from '../internals/hooks/useRangePosition';
25
- import { DAY_RANGE_SIZE, DAY_MARGIN } from '../internals/constants/dimensions';
26
- import { PickersRangeCalendarHeader } from '../PickersRangeCalendarHeader';
18
+ import { applyDefaultDate, DayCalendar, useDefaultReduceAnimations, useCalendarState, useDefaultDates, useUtils, useNow, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, useControlledValueWithTimezone, useViews } from '@mui/x-date-pickers/internals';
19
+ import { warnOnce } from '@mui/x-internals/warning';
20
+ import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
21
+ import { dateRangeCalendarClasses, getDateRangeCalendarUtilityClass } from "./dateRangeCalendarClasses.js";
22
+ import { isEndOfRange, isRangeValid, isStartOfRange, isWithinRange } from "../internals/utils/date-utils.js";
23
+ import { calculateRangeChange, calculateRangePreview } from "../internals/utils/date-range-manager.js";
24
+ import { DateRangePickerDay, dateRangePickerDayClasses as dayClasses } from "../DateRangePickerDay/index.js";
25
+ import { rangeValueManager } from "../internals/utils/valueManagers.js";
26
+ import { useDragRange } from "./useDragRange.js";
27
+ import { useRangePosition } from "../internals/hooks/useRangePosition.js";
28
+ import { DAY_RANGE_SIZE, DAY_MARGIN } from "../internals/constants/dimensions.js";
29
+ import { PickersRangeCalendarHeader } from "../PickersRangeCalendarHeader/index.js";
27
30
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
31
  const releaseInfo = getReleaseInfo();
29
32
  const DateRangeCalendarRoot = styled('div', {
@@ -321,7 +324,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
321
324
  if (disableAutoMonthSwitching && prevDate && utils.isEqual(prevDate, date)) {
322
325
  return;
323
326
  }
324
- const displayingMonthRange = calendars - 1;
327
+ const displayingMonthRange = calendars - currentMonthCalendarPosition;
325
328
  const currentMonthNumber = utils.getMonth(calendarState.currentMonth);
326
329
  const requestedMonthNumber = utils.getMonth(date);
327
330
  if (!utils.isSameYear(calendarState.currentMonth, date) || requestedMonthNumber < currentMonthNumber || requestedMonthNumber > currentMonthNumber + displayingMonthRange) {
@@ -587,7 +590,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
587
590
  minDate: PropTypes.object,
588
591
  /**
589
592
  * Callback fired when the value changes.
590
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
593
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
591
594
  * @template TView The view type. Will be one of date or time views.
592
595
  * @param {TValue} value The new value.
593
596
  * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.
@@ -1,2 +1,2 @@
1
- export { DateRangeCalendar } from './DateRangeCalendar';
2
- export { getDateRangeCalendarUtilityClass, dateRangeCalendarClasses } from './dateRangeCalendarClasses';
1
+ export { DateRangeCalendar } from "./DateRangeCalendar.js";
2
+ export { getDateRangeCalendarUtilityClass, dateRangeCalendarClasses } from "./dateRangeCalendarClasses.js";
@@ -1,7 +1,9 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import useEventCallback from '@mui/utils/useEventCallback';
4
- import { isEndOfRange, isStartOfRange } from '../internals/utils/date-utils';
6
+ import { isEndOfRange, isStartOfRange } from "../internals/utils/date-utils.js";
5
7
  const resolveDateFromTarget = (target, utils, timezone) => {
6
8
  const timestampString = target.dataset.timestamp;
7
9
  if (!timestampString) {
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["desktopModeMediaQuery"];
@@ -6,8 +8,8 @@ import PropTypes from 'prop-types';
6
8
  import useMediaQuery from '@mui/material/useMediaQuery';
7
9
  import { useThemeProps } from '@mui/material/styles';
8
10
  import { refType } from '@mui/utils';
9
- import { DesktopDateRangePicker } from '../DesktopDateRangePicker';
10
- import { MobileDateRangePicker } from '../MobileDateRangePicker';
11
+ import { DesktopDateRangePicker } from "../DesktopDateRangePicker/index.js";
12
+ import { MobileDateRangePicker } from "../MobileDateRangePicker/index.js";
11
13
  import { jsx as _jsx } from "react/jsx-runtime";
12
14
  /**
13
15
  * Demos:
@@ -191,16 +193,16 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
191
193
  name: PropTypes.string,
192
194
  /**
193
195
  * Callback fired when the value is accepted.
194
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
195
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
196
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
197
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
196
198
  * @param {TValue} value The value that was just accepted.
197
199
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
198
200
  */
199
201
  onAccept: PropTypes.func,
200
202
  /**
201
203
  * Callback fired when the value changes.
202
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
203
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
204
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
205
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
204
206
  * @param {TValue} value The new value.
205
207
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
206
208
  */
@@ -211,13 +213,13 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
211
213
  */
212
214
  onClose: PropTypes.func,
213
215
  /**
214
- * Callback fired when the error associated to the current value changes.
215
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
216
- *
217
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
218
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
219
- * @param {TError} error The new error describing why the current value is not valid.
220
- * @param {TValue} value The value associated to the error.
216
+ * Callback fired when the error associated with the current value changes.
217
+ * When a validation error is detected, the `error` parameter contains a non-null value.
218
+ * This can be used to render an appropriate form error.
219
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
220
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
221
+ * @param {TError} error The reason why the current value is not valid.
222
+ * @param {TValue} value The value associated with the error.
221
223
  */
222
224
  onError: PropTypes.func,
223
225
  /**
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className", "onViewChange", "view", "views"];
@@ -9,7 +11,7 @@ import { styled, useThemeProps } from '@mui/material/styles';
9
11
  import composeClasses from '@mui/utils/composeClasses';
10
12
  import { PickersToolbar, PickersToolbarButton, useUtils } from '@mui/x-date-pickers/internals';
11
13
  import { usePickersTranslations } from '@mui/x-date-pickers/hooks';
12
- import { getDateRangePickerToolbarUtilityClass } from './dateRangePickerToolbarClasses';
14
+ import { getDateRangePickerToolbarUtilityClass } from "./dateRangePickerToolbarClasses.js";
13
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
16
  const useUtilityClasses = ownerState => {
15
17
  const {
@@ -1,3 +1,3 @@
1
- export { DateRangePicker } from './DateRangePicker';
2
- export { DateRangePickerToolbar } from './DateRangePickerToolbar';
3
- export { getDateRangePickerToolbarUtilityClass, dateRangePickerToolbarClasses } from './dateRangePickerToolbarClasses';
1
+ export { DateRangePicker } from "./DateRangePicker.js";
2
+ export { DateRangePickerToolbar } from "./DateRangePickerToolbar.js";
3
+ export { getDateRangePickerToolbarUtilityClass, dateRangePickerToolbarClasses } from "./dateRangePickerToolbarClasses.js";
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { useThemeProps } from '@mui/material/styles';
4
4
  import { useDefaultDates, useUtils, applyDefaultDate } from '@mui/x-date-pickers/internals';
5
- import { DateRangePickerToolbar } from './DateRangePickerToolbar';
5
+ import { DateRangePickerToolbar } from "./DateRangePickerToolbar.js";
6
6
  export function useDateRangePickerDefaultizedProps(props, name) {
7
7
  const utils = useUtils();
8
8
  const defaultDates = useDefaultDates();
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
4
  import _extends from "@babel/runtime/helpers/esm/extends";
3
5
  const _excluded = ["className", "day", "outsideCurrentMonth", "isEndOfHighlighting", "isEndOfPreviewing", "isHighlighting", "isPreviewing", "isStartOfHighlighting", "isStartOfPreviewing", "selected", "isVisuallySelected", "sx", "draggable", "isFirstVisibleCell", "isLastVisibleCell"];
@@ -9,8 +11,8 @@ import { alpha, styled, useThemeProps } from '@mui/material/styles';
9
11
  import composeClasses from '@mui/utils/composeClasses';
10
12
  import { useUtils } from '@mui/x-date-pickers/internals';
11
13
  import { PickersDay } from '@mui/x-date-pickers/PickersDay';
12
- import { getDateRangePickerDayUtilityClass, dateRangePickerDayClasses } from './dateRangePickerDayClasses';
13
- import { getReleaseInfo } from '../internals/utils/releaseInfo';
14
+ import { getDateRangePickerDayUtilityClass, dateRangePickerDayClasses } from "./dateRangePickerDayClasses.js";
15
+ import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
15
17
  const releaseInfo = getReleaseInfo();
16
18
  const useUtilityClasses = ownerState => {
@@ -1,2 +1,2 @@
1
- export { DateRangePickerDay } from './DateRangePickerDay';
2
- export { getDateRangePickerDayUtilityClass, dateRangePickerDayClasses } from './dateRangePickerDayClasses';
1
+ export { DateRangePickerDay } from "./DateRangePickerDay.js";
2
+ export { getDateRangePickerDayUtilityClass, dateRangePickerDayClasses } from "./dateRangePickerDayClasses.js";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["desktopModeMediaQuery"];
@@ -6,8 +8,8 @@ import PropTypes from 'prop-types';
6
8
  import { refType } from '@mui/utils';
7
9
  import useMediaQuery from '@mui/material/useMediaQuery';
8
10
  import { useThemeProps } from '@mui/material/styles';
9
- import { DesktopDateTimeRangePicker } from '../DesktopDateTimeRangePicker';
10
- import { MobileDateTimeRangePicker } from '../MobileDateTimeRangePicker';
11
+ import { DesktopDateTimeRangePicker } from "../DesktopDateTimeRangePicker/index.js";
12
+ import { MobileDateTimeRangePicker } from "../MobileDateTimeRangePicker/index.js";
11
13
  import { jsx as _jsx } from "react/jsx-runtime";
12
14
  /**
13
15
  * Demos:
@@ -224,16 +226,16 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
224
226
  name: PropTypes.string,
225
227
  /**
226
228
  * Callback fired when the value is accepted.
227
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
228
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
229
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
230
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
229
231
  * @param {TValue} value The value that was just accepted.
230
232
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
231
233
  */
232
234
  onAccept: PropTypes.func,
233
235
  /**
234
236
  * Callback fired when the value changes.
235
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
236
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
237
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
238
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
237
239
  * @param {TValue} value The new value.
238
240
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
239
241
  */
@@ -244,13 +246,13 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
244
246
  */
245
247
  onClose: PropTypes.func,
246
248
  /**
247
- * Callback fired when the error associated to the current value changes.
248
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
249
- *
250
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
251
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
252
- * @param {TError} error The new error describing why the current value is not valid.
253
- * @param {TValue} value The value associated to the error.
249
+ * Callback fired when the error associated with the current value changes.
250
+ * When a validation error is detected, the `error` parameter contains a non-null value.
251
+ * This can be used to render an appropriate form error.
252
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
253
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
254
+ * @param {TError} error The reason why the current value is not valid.
255
+ * @param {TValue} value The value associated with the error.
254
256
  */
255
257
  onError: PropTypes.func,
256
258
  /**
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from 'react';
2
4
  import clsx from 'clsx';
3
5
  import PropTypes from 'prop-types';
@@ -9,7 +11,7 @@ import { isDatePickerView } from '@mui/x-date-pickers/internals';
9
11
  import { usePickersTranslations } from '@mui/x-date-pickers/hooks';
10
12
  import IconButton from '@mui/material/IconButton';
11
13
  import Button from '@mui/material/Button';
12
- import { getDateTimeRangePickerTabsUtilityClass } from './dateTimeRangePickerTabsClasses';
14
+ import { getDateTimeRangePickerTabsUtilityClass } from "./dateTimeRangePickerTabsClasses.js";
13
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
16
  const viewToTab = (view, rangePosition) => {
15
17
  if (isDatePickerView(view)) {
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["rangePosition", "onRangePositionChange", "viewRenderer", "value", "onChange", "defaultValue", "onViewChange", "views", "className"];
4
4
  import { isInternalTimeView, useUtils } from '@mui/x-date-pickers/internals';
5
- import { isRangeValid } from '../internals/utils/date-utils';
6
- import { calculateRangeChange } from '../internals/utils/date-range-manager';
5
+ import { isRangeValid } from "../internals/utils/date-utils.js";
6
+ import { calculateRangeChange } from "../internals/utils/date-range-manager.js";
7
7
  /**
8
8
  * @ignore - internal component.
9
9
  */
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "onViewChange", "toolbarVariant", "onChange", "classes", "view", "isLandscape", "views", "ampm", "disabled", "readOnly", "hidden", "toolbarFormat", "toolbarPlaceholder", "titleId", "sx"];
@@ -9,8 +11,8 @@ import composeClasses from '@mui/utils/composeClasses';
9
11
  import { useUtils } from '@mui/x-date-pickers/internals';
10
12
  import { usePickersTranslations } from '@mui/x-date-pickers/hooks';
11
13
  import { DateTimePickerToolbar } from '@mui/x-date-pickers/DateTimePicker';
12
- import { getDateTimeRangePickerToolbarUtilityClass } from './dateTimeRangePickerToolbarClasses';
13
- import { calculateRangeChange } from '../internals/utils/date-range-manager';
14
+ import { getDateTimeRangePickerToolbarUtilityClass } from "./dateTimeRangePickerToolbarClasses.js";
15
+ import { calculateRangeChange } from "../internals/utils/date-range-manager.js";
14
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
17
  const useUtilityClasses = ownerState => {
16
18
  const {
@@ -1,5 +1,5 @@
1
- export { DateTimeRangePicker } from './DateTimeRangePicker';
2
- export { DateTimeRangePickerTabs } from './DateTimeRangePickerTabs';
3
- export { getDateTimeRangePickerTabsUtilityClass, dateTimeRangePickerTabsClasses } from './dateTimeRangePickerTabsClasses';
4
- export { DateTimeRangePickerToolbar } from './DateTimeRangePickerToolbar';
5
- export { getDateTimeRangePickerToolbarUtilityClass, dateTimeRangePickerToolbarClasses } from './dateTimeRangePickerToolbarClasses';
1
+ export { DateTimeRangePicker } from "./DateTimeRangePicker.js";
2
+ export { DateTimeRangePickerTabs } from "./DateTimeRangePickerTabs.js";
3
+ export { getDateTimeRangePickerTabsUtilityClass, dateTimeRangePickerTabsClasses } from "./dateTimeRangePickerTabsClasses.js";
4
+ export { DateTimeRangePickerToolbar } from "./DateTimeRangePickerToolbar.js";
5
+ export { getDateTimeRangePickerToolbarUtilityClass, dateTimeRangePickerToolbarClasses } from "./dateTimeRangePickerToolbarClasses.js";
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { useThemeProps } from '@mui/material/styles';
3
3
  import { useDefaultDates, useUtils, applyDefaultDate, applyDefaultViewProps, resolveTimeViewsResponse } from '@mui/x-date-pickers/internals';
4
- import { DateTimeRangePickerToolbar } from './DateTimeRangePickerToolbar';
5
- import { DateTimeRangePickerTabs } from './DateTimeRangePickerTabs';
4
+ import { DateTimeRangePickerToolbar } from "./DateTimeRangePickerToolbar.js";
5
+ import { DateTimeRangePickerTabs } from "./DateTimeRangePickerTabs.js";
6
6
  export function useDateTimeRangePickerDefaultizedProps(props, name) {
7
7
  const utils = useUtils();
8
8
  const defaultDates = useDefaultDates();
@@ -1,15 +1,17 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
4
- import { extractValidationProps } from '@mui/x-date-pickers/internals';
6
+ import { extractValidationProps } from '@mui/x-date-pickers/validation';
5
7
  import resolveComponentProps from '@mui/utils/resolveComponentProps';
6
8
  import { refType } from '@mui/utils';
7
- import { rangeValueManager } from '../internals/utils/valueManagers';
8
- import { useDateRangePickerDefaultizedProps } from '../DateRangePicker/shared';
9
- import { renderDateRangeViewCalendar } from '../dateRangeViewRenderers';
10
- import { MultiInputDateRangeField } from '../MultiInputDateRangeField';
11
- import { useDesktopRangePicker } from '../internals/hooks/useDesktopRangePicker';
12
- import { validateDateRange } from '../internals/utils/validation/validateDateRange';
9
+ import { rangeValueManager } from "../internals/utils/valueManagers.js";
10
+ import { useDateRangePickerDefaultizedProps } from "../DateRangePicker/shared.js";
11
+ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
12
+ import { MultiInputDateRangeField } from "../MultiInputDateRangeField/index.js";
13
+ import { useDesktopRangePicker } from "../internals/hooks/useDesktopRangePicker/index.js";
14
+ import { validateDateRange } from "../validation/index.js";
13
15
  /**
14
16
  * Demos:
15
17
  *
@@ -196,16 +198,16 @@ DesktopDateRangePicker.propTypes = {
196
198
  name: PropTypes.string,
197
199
  /**
198
200
  * Callback fired when the value is accepted.
199
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
200
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
201
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
202
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
201
203
  * @param {TValue} value The value that was just accepted.
202
204
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
203
205
  */
204
206
  onAccept: PropTypes.func,
205
207
  /**
206
208
  * Callback fired when the value changes.
207
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
208
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
209
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
210
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
209
211
  * @param {TValue} value The new value.
210
212
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
211
213
  */
@@ -216,13 +218,13 @@ DesktopDateRangePicker.propTypes = {
216
218
  */
217
219
  onClose: PropTypes.func,
218
220
  /**
219
- * Callback fired when the error associated to the current value changes.
220
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
221
- *
222
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
223
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
224
- * @param {TError} error The new error describing why the current value is not valid.
225
- * @param {TValue} value The value associated to the error.
221
+ * Callback fired when the error associated with the current value changes.
222
+ * When a validation error is detected, the `error` parameter contains a non-null value.
223
+ * This can be used to render an appropriate form error.
224
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
225
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
226
+ * @param {TError} error The reason why the current value is not valid.
227
+ * @param {TValue} value The value associated with the error.
226
228
  */
227
229
  onError: PropTypes.func,
228
230
  /**
@@ -1 +1 @@
1
- export { DesktopDateRangePicker } from './DesktopDateRangePicker';
1
+ export { DesktopDateRangePicker } from "./DesktopDateRangePicker.js";
@@ -1,9 +1,12 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
5
  const _excluded = ["openTo", "rangePosition"];
4
6
  import * as React from 'react';
5
7
  import PropTypes from 'prop-types';
6
- import { extractValidationProps, isDatePickerView, isInternalTimeView, resolveDateTimeFormat, useUtils } from '@mui/x-date-pickers/internals';
8
+ import { isDatePickerView, isInternalTimeView, resolveDateTimeFormat, useUtils } from '@mui/x-date-pickers/internals';
9
+ import { extractValidationProps } from '@mui/x-date-pickers/validation';
7
10
  import resolveComponentProps from '@mui/utils/resolveComponentProps';
8
11
  import { refType } from '@mui/utils';
9
12
  import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
@@ -11,14 +14,14 @@ import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses
11
14
  import Divider from '@mui/material/Divider';
12
15
  import { digitalClockClasses } from '@mui/x-date-pickers/DigitalClock';
13
16
  import { DesktopDateTimePickerLayout } from '@mui/x-date-pickers/DesktopDateTimePicker';
14
- import { rangeValueManager } from '../internals/utils/valueManagers';
15
- import { renderDateRangeViewCalendar } from '../dateRangeViewRenderers';
16
- import { useDesktopRangePicker } from '../internals/hooks/useDesktopRangePicker';
17
- import { validateDateTimeRange } from '../internals/utils/validation/validateDateTimeRange';
18
- import { useDateTimeRangePickerDefaultizedProps } from '../DateTimeRangePicker/shared';
19
- import { MultiInputDateTimeRangeField } from '../MultiInputDateTimeRangeField';
20
- import { DateTimeRangePickerTimeWrapper } from '../DateTimeRangePicker/DateTimeRangePickerTimeWrapper';
21
- import { RANGE_VIEW_HEIGHT } from '../internals/constants/dimensions';
17
+ import { rangeValueManager } from "../internals/utils/valueManagers.js";
18
+ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
19
+ import { useDesktopRangePicker } from "../internals/hooks/useDesktopRangePicker/index.js";
20
+ import { validateDateTimeRange } from "../validation/index.js";
21
+ import { useDateTimeRangePickerDefaultizedProps } from "../DateTimeRangePicker/shared.js";
22
+ import { MultiInputDateTimeRangeField } from "../MultiInputDateTimeRangeField/index.js";
23
+ import { DateTimeRangePickerTimeWrapper } from "../DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js";
24
+ import { RANGE_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
22
25
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
26
  const rendererInterceptor = function rendererInterceptor(inViewRenderers, popperView, rendererProps) {
24
27
  const {
@@ -304,16 +307,16 @@ DesktopDateTimeRangePicker.propTypes = {
304
307
  name: PropTypes.string,
305
308
  /**
306
309
  * Callback fired when the value is accepted.
307
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
308
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
310
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
311
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
309
312
  * @param {TValue} value The value that was just accepted.
310
313
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
311
314
  */
312
315
  onAccept: PropTypes.func,
313
316
  /**
314
317
  * Callback fired when the value changes.
315
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
316
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
318
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
319
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
317
320
  * @param {TValue} value The new value.
318
321
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
319
322
  */
@@ -324,13 +327,13 @@ DesktopDateTimeRangePicker.propTypes = {
324
327
  */
325
328
  onClose: PropTypes.func,
326
329
  /**
327
- * Callback fired when the error associated to the current value changes.
328
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
329
- *
330
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
331
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
332
- * @param {TError} error The new error describing why the current value is not valid.
333
- * @param {TValue} value The value associated to the error.
330
+ * Callback fired when the error associated with the current value changes.
331
+ * When a validation error is detected, the `error` parameter contains a non-null value.
332
+ * This can be used to render an appropriate form error.
333
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
334
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
335
+ * @param {TError} error The reason why the current value is not valid.
336
+ * @param {TValue} value The value associated with the error.
334
337
  */
335
338
  onError: PropTypes.func,
336
339
  /**
@@ -1 +1 @@
1
- export { DesktopDateTimeRangePicker } from './DesktopDateTimeRangePicker';
1
+ export { DesktopDateTimeRangePicker } from "./DesktopDateTimeRangePicker.js";
@@ -1,15 +1,17 @@
1
+ 'use client';
2
+
1
3
  import _extends from "@babel/runtime/helpers/esm/extends";
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
4
- import { extractValidationProps } from '@mui/x-date-pickers/internals';
6
+ import { extractValidationProps } from '@mui/x-date-pickers/validation';
5
7
  import resolveComponentProps from '@mui/utils/resolveComponentProps';
6
8
  import { refType } from '@mui/utils';
7
- import { rangeValueManager } from '../internals/utils/valueManagers';
8
- import { useDateRangePickerDefaultizedProps } from '../DateRangePicker/shared';
9
- import { renderDateRangeViewCalendar } from '../dateRangeViewRenderers';
10
- import { MultiInputDateRangeField } from '../MultiInputDateRangeField';
11
- import { useMobileRangePicker } from '../internals/hooks/useMobileRangePicker';
12
- import { validateDateRange } from '../internals/utils/validation/validateDateRange';
9
+ import { rangeValueManager } from "../internals/utils/valueManagers.js";
10
+ import { useDateRangePickerDefaultizedProps } from "../DateRangePicker/shared.js";
11
+ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
12
+ import { MultiInputDateRangeField } from "../MultiInputDateRangeField/index.js";
13
+ import { useMobileRangePicker } from "../internals/hooks/useMobileRangePicker/index.js";
14
+ import { validateDateRange } from "../validation/index.js";
13
15
  /**
14
16
  * Demos:
15
17
  *
@@ -192,16 +194,16 @@ MobileDateRangePicker.propTypes = {
192
194
  name: PropTypes.string,
193
195
  /**
194
196
  * Callback fired when the value is accepted.
195
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
196
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
197
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
198
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
197
199
  * @param {TValue} value The value that was just accepted.
198
200
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
199
201
  */
200
202
  onAccept: PropTypes.func,
201
203
  /**
202
204
  * Callback fired when the value changes.
203
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
204
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
205
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
206
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
205
207
  * @param {TValue} value The new value.
206
208
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
207
209
  */
@@ -212,13 +214,13 @@ MobileDateRangePicker.propTypes = {
212
214
  */
213
215
  onClose: PropTypes.func,
214
216
  /**
215
- * Callback fired when the error associated to the current value changes.
216
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
217
- *
218
- * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
219
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
220
- * @param {TError} error The new error describing why the current value is not valid.
221
- * @param {TValue} value The value associated to the error.
217
+ * Callback fired when the error associated with the current value changes.
218
+ * When a validation error is detected, the `error` parameter contains a non-null value.
219
+ * This can be used to render an appropriate form error.
220
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
221
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
222
+ * @param {TError} error The reason why the current value is not valid.
223
+ * @param {TValue} value The value associated with the error.
222
224
  */
223
225
  onError: PropTypes.func,
224
226
  /**
@@ -1 +1 @@
1
- export { MobileDateRangePicker } from './MobileDateRangePicker';
1
+ export { MobileDateRangePicker } from "./MobileDateRangePicker.js";