@mui/x-date-pickers-pro 7.0.0 → 7.1.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 (66) hide show
  1. package/CHANGELOG.md +246 -4
  2. package/DateRangeCalendar/DateRangeCalendar.js +1 -1
  3. package/DateRangePicker/DateRangePicker.js +1 -1
  4. package/DateRangePickerDay/DateRangePickerDay.d.ts +5 -0
  5. package/DateRangePickerDay/DateRangePickerDay.js +107 -43
  6. package/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
  7. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +31 -15
  8. package/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
  9. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +2 -2
  10. package/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
  11. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
  12. package/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  13. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +2 -2
  14. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +2 -2
  15. package/README.md +1 -1
  16. package/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
  17. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +2 -2
  18. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +2 -2
  19. package/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
  20. package/index.js +1 -1
  21. package/internals/hooks/useEnrichedRangePickerFieldProps.js +1 -1
  22. package/internals/models/dateTimeRange.d.ts +1 -1
  23. package/internals/models/timeRange.d.ts +1 -1
  24. package/internals/utils/date-range-manager.js +1 -1
  25. package/internals/utils/releaseInfo.js +1 -1
  26. package/modern/DateRangeCalendar/DateRangeCalendar.js +1 -1
  27. package/modern/DateRangePicker/DateRangePicker.js +1 -1
  28. package/modern/DateRangePickerDay/DateRangePickerDay.js +107 -43
  29. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
  30. package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +31 -15
  31. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
  32. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +2 -2
  33. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
  34. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
  35. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  36. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +2 -2
  37. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +2 -2
  38. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
  39. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +2 -2
  40. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +2 -2
  41. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
  42. package/modern/index.js +1 -1
  43. package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +1 -1
  44. package/modern/internals/utils/date-range-manager.js +1 -1
  45. package/modern/internals/utils/releaseInfo.js +1 -1
  46. package/node/DateRangeCalendar/DateRangeCalendar.js +1 -1
  47. package/node/DateRangePicker/DateRangePicker.js +1 -1
  48. package/node/DateRangePickerDay/DateRangePickerDay.js +107 -43
  49. package/node/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
  50. package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +31 -15
  51. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
  52. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +2 -2
  53. package/node/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
  54. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
  55. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
  56. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +2 -2
  57. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +2 -2
  58. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
  59. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +2 -2
  60. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +2 -2
  61. package/node/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
  62. package/node/index.js +1 -1
  63. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +1 -1
  64. package/node/internals/utils/date-range-manager.js +1 -1
  65. package/node/internals/utils/releaseInfo.js +1 -1
  66. package/package.json +4 -4
@@ -83,7 +83,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
83
83
  * Formats the day of week displayed in the calendar header.
84
84
  * @param {TDate} date The date of the day of week provided by the adapter.
85
85
  * @returns {string} The name to display.
86
- * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
86
+ * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
87
87
  */
88
88
  dayOfWeekFormatter: _propTypes.default.func,
89
89
  /**
@@ -77,26 +77,56 @@ const DateRangePickerDayRoot = (0, _styles.styled)('div', {
77
77
  [`&.${_dateRangePickerDayClasses.dateRangePickerDayClasses.hiddenDayFiller}`]: styles.hiddenDayFiller
78
78
  }, styles.root]
79
79
  })(({
80
- theme,
81
- ownerState
82
- }) => ownerState.isHiddenDayFiller ? {} : (0, _extends2.default)({
83
- [`&:first-of-type .${_dateRangePickerDayClasses.dateRangePickerDayClasses.rangeIntervalDayPreview}`]: (0, _extends2.default)({}, startBorderStyle, {
84
- borderLeftColor: (theme.vars || theme).palette.divider
85
- }),
86
- [`&:last-of-type .${_dateRangePickerDayClasses.dateRangePickerDayClasses.rangeIntervalDayPreview}`]: (0, _extends2.default)({}, endBorderStyle, {
87
- borderRightColor: (theme.vars || theme).palette.divider
88
- })
89
- }, ownerState.isHighlighting && {
90
- borderRadius: 0,
91
- color: (theme.vars || theme).palette.primary.contrastText,
92
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.focusOpacity})` : (0, _styles.alpha)(theme.palette.primary.main, theme.palette.action.focusOpacity),
93
- '&:first-of-type': startBorderStyle,
94
- '&:last-of-type': endBorderStyle
95
- }, (ownerState.isStartOfHighlighting || ownerState.isFirstVisibleCell) && (0, _extends2.default)({}, startBorderStyle, {
96
- paddingLeft: 0
97
- }), (ownerState.isEndOfHighlighting || ownerState.isLastVisibleCell) && (0, _extends2.default)({}, endBorderStyle, {
98
- paddingRight: 0
99
- })));
80
+ theme
81
+ }) => ({
82
+ variants: [{
83
+ props: {
84
+ isHiddenDayFiller: false
85
+ },
86
+ style: {
87
+ [`&:first-of-type .${_dateRangePickerDayClasses.dateRangePickerDayClasses.rangeIntervalDayPreview}`]: (0, _extends2.default)({}, startBorderStyle, {
88
+ borderLeftColor: (theme.vars || theme).palette.divider
89
+ }),
90
+ [`&:last-of-type .${_dateRangePickerDayClasses.dateRangePickerDayClasses.rangeIntervalDayPreview}`]: (0, _extends2.default)({}, endBorderStyle, {
91
+ borderRightColor: (theme.vars || theme).palette.divider
92
+ })
93
+ }
94
+ }, {
95
+ props: {
96
+ isHiddenDayFiller: false,
97
+ isHighlighting: true
98
+ },
99
+ style: {
100
+ borderRadius: 0,
101
+ color: (theme.vars || theme).palette.primary.contrastText,
102
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.focusOpacity})` : (0, _styles.alpha)(theme.palette.primary.main, theme.palette.action.focusOpacity),
103
+ '&:first-of-type': startBorderStyle,
104
+ '&:last-of-type': endBorderStyle
105
+ }
106
+ }, {
107
+ props: ({
108
+ ownerState: {
109
+ isHiddenDayFiller,
110
+ isStartOfHighlighting,
111
+ isFirstVisibleCell
112
+ }
113
+ }) => !isHiddenDayFiller && (isStartOfHighlighting || isFirstVisibleCell),
114
+ style: (0, _extends2.default)({}, startBorderStyle, {
115
+ paddingLeft: 0
116
+ })
117
+ }, {
118
+ props: ({
119
+ ownerState: {
120
+ isHiddenDayFiller,
121
+ isEndOfHighlighting,
122
+ isLastVisibleCell
123
+ }
124
+ }) => !isHiddenDayFiller && (isEndOfHighlighting || isLastVisibleCell),
125
+ style: (0, _extends2.default)({}, endBorderStyle, {
126
+ paddingRight: 0
127
+ })
128
+ }]
129
+ }));
100
130
  DateRangePickerDayRoot.propTypes = {
101
131
  // ----------------------------- Warning --------------------------------
102
132
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -115,21 +145,47 @@ const DateRangePickerDayRangeIntervalPreview = (0, _styles.styled)('div', {
115
145
  [`&.${_dateRangePickerDayClasses.dateRangePickerDayClasses.rangeIntervalDayPreviewEnd}`]: styles.rangeIntervalDayPreviewEnd
116
146
  }, styles.rangeIntervalPreview]
117
147
  })(({
118
- theme,
119
- ownerState
120
- }) => (0, _extends2.default)({
148
+ theme
149
+ }) => ({
121
150
  // replace default day component margin with transparent border to avoid jumping on preview
122
- border: '2px solid transparent'
123
- }, ownerState.isPreviewing && !ownerState.isHiddenDayFiller && (0, _extends2.default)({
124
- borderRadius: 0,
125
- border: `2px dashed ${(theme.vars || theme).palette.divider}`,
126
- borderLeftColor: 'transparent',
127
- borderRightColor: 'transparent'
128
- }, (ownerState.isStartOfPreviewing || ownerState.isFirstVisibleCell) && (0, _extends2.default)({
129
- borderLeftColor: (theme.vars || theme).palette.divider
130
- }, startBorderStyle), (ownerState.isEndOfPreviewing || ownerState.isLastVisibleCell) && (0, _extends2.default)({
131
- borderRightColor: (theme.vars || theme).palette.divider
132
- }, endBorderStyle))));
151
+ border: '2px solid transparent',
152
+ variants: [{
153
+ props: {
154
+ isPreviewing: true,
155
+ isHiddenDayFiller: false
156
+ },
157
+ style: {
158
+ borderRadius: 0,
159
+ border: `2px dashed ${(theme.vars || theme).palette.divider}`,
160
+ borderLeftColor: 'transparent',
161
+ borderRightColor: 'transparent'
162
+ }
163
+ }, {
164
+ props: ({
165
+ ownerState: {
166
+ isPreviewing,
167
+ isHiddenDayFiller,
168
+ isStartOfPreviewing,
169
+ isFirstVisibleCell
170
+ }
171
+ }) => isPreviewing && !isHiddenDayFiller && (isStartOfPreviewing || isFirstVisibleCell),
172
+ style: (0, _extends2.default)({
173
+ borderLeftColor: (theme.vars || theme).palette.divider
174
+ }, startBorderStyle)
175
+ }, {
176
+ props: ({
177
+ ownerState: {
178
+ isPreviewing,
179
+ isHiddenDayFiller,
180
+ isEndOfPreviewing,
181
+ isLastVisibleCell
182
+ }
183
+ }) => isPreviewing && !isHiddenDayFiller && (isEndOfPreviewing || isLastVisibleCell),
184
+ style: (0, _extends2.default)({
185
+ borderRightColor: (theme.vars || theme).palette.divider
186
+ }, endBorderStyle)
187
+ }]
188
+ }));
133
189
  DateRangePickerDayRangeIntervalPreview.propTypes = {
134
190
  // ----------------------------- Warning --------------------------------
135
191
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -147,19 +203,22 @@ const DateRangePickerDayDay = (0, _styles.styled)(_PickersDay.PickersDay, {
147
203
  }, {
148
204
  [`&.${_dateRangePickerDayClasses.dateRangePickerDayClasses.notSelectedDate}`]: styles.notSelectedDate
149
205
  }, styles.day]
150
- })(({
151
- ownerState
152
- }) => (0, _extends2.default)({
206
+ })({
153
207
  // Required to overlap preview border
154
208
  transform: 'scale(1.1)',
155
209
  '& > *': {
156
210
  transform: 'scale(0.9)'
157
- }
158
- }, ownerState.draggable && {
159
- cursor: 'grab'
160
- }, ownerState.draggable && {
161
- touchAction: 'none'
162
- }));
211
+ },
212
+ variants: [{
213
+ props: {
214
+ draggable: true
215
+ },
216
+ style: {
217
+ cursor: 'grab',
218
+ touchAction: 'none'
219
+ }
220
+ }]
221
+ });
163
222
  const DateRangePickerDayRaw = /*#__PURE__*/React.forwardRef(function DateRangePickerDay(inProps, ref) {
164
223
  const props = (0, _styles.useThemeProps)({
165
224
  props: inProps,
@@ -275,6 +334,11 @@ process.env.NODE_ENV !== "production" ? DateRangePickerDayRaw.propTypes = {
275
334
  * @default false
276
335
  */
277
336
  disableTouchRipple: _propTypes.default.bool,
337
+ /**
338
+ * If `true`, the day can be dragged to change the current date range.
339
+ * @default false
340
+ */
341
+ draggable: _propTypes.default.bool,
278
342
  /**
279
343
  * If `true`, the base button will have a keyboard focus ripple.
280
344
  * @default false
@@ -58,7 +58,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
58
58
  // ----------------------------------------------------------------------
59
59
  /**
60
60
  * 12h/24h view for hour selection clock.
61
- * @default `utils.is12HourCycleInCurrentLocale()`
61
+ * @default utils.is12HourCycleInCurrentLocale()
62
62
  */
63
63
  ampm: _propTypes.default.bool,
64
64
  /**
@@ -88,7 +88,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
88
88
  * Formats the day of week displayed in the calendar header.
89
89
  * @param {TDate} date The date of the day of week provided by the adapter.
90
90
  * @returns {string} The name to display.
91
- * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
91
+ * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
92
92
  */
93
93
  dayOfWeekFormatter: _propTypes.default.func,
94
94
  /**
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.DateTimeRangePickerToolbar = void 0;
8
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
  var _clsx = _interopRequireDefault(require("clsx"));
@@ -43,24 +43,40 @@ const DateTimeRangePickerToolbarStart = (0, _styles.styled)(_DateTimePicker.Date
43
43
  name: 'MuiDateTimeRangePickerToolbar',
44
44
  slot: 'StartToolbar',
45
45
  overridesResolver: (_, styles) => styles.startToolbar
46
- })(({
47
- ownerState
48
- }) => (0, _extends2.default)({
49
- borderBottom: 'none'
50
- }, ownerState?.toolbarVariant !== 'desktop' ? {
51
- padding: '12px 8px 0 12px'
52
- } : {
53
- paddingBottom: 0
54
- }));
46
+ })({
47
+ borderBottom: 'none',
48
+ variants: [{
49
+ props: ({
50
+ toolbarVariant
51
+ }) => toolbarVariant !== 'desktop',
52
+ style: {
53
+ padding: '12px 8px 0 12px'
54
+ }
55
+ }, {
56
+ props: {
57
+ toolbarVariant: 'desktop'
58
+ },
59
+ style: {
60
+ paddingBottom: 0
61
+ }
62
+ }]
63
+ });
55
64
  const DateTimeRangePickerToolbarEnd = (0, _styles.styled)(_DateTimePicker.DateTimePickerToolbar, {
56
65
  name: 'MuiDateTimeRangePickerToolbar',
57
66
  slot: 'EndToolbar',
58
67
  overridesResolver: (_, styles) => styles.endToolbar
59
- })(({
60
- ownerState
61
- }) => ({
62
- padding: ownerState?.toolbarVariant !== 'desktop' ? '12px 8px 12px 12px' : undefined
63
- }));
68
+ })({
69
+ variants: [{
70
+ props: ({
71
+ ownerState: {
72
+ toolbarVariant
73
+ }
74
+ }) => toolbarVariant !== 'desktop',
75
+ style: {
76
+ padding: '12px 8px 12px 12px'
77
+ }
78
+ }]
79
+ });
64
80
  const DateTimeRangePickerToolbar = exports.DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTimeRangePickerToolbar(inProps, ref) {
65
81
  const props = (0, _styles.useThemeProps)({
66
82
  props: inProps,
@@ -94,7 +94,7 @@ DesktopDateRangePicker.propTypes = {
94
94
  * Formats the day of week displayed in the calendar header.
95
95
  * @param {TDate} date The date of the day of week provided by the adapter.
96
96
  * @returns {string} The name to display.
97
- * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
97
+ * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
98
98
  */
99
99
  dayOfWeekFormatter: _propTypes.default.func,
100
100
  /**
@@ -133,7 +133,7 @@ DesktopDateTimeRangePicker.propTypes = {
133
133
  // ----------------------------------------------------------------------
134
134
  /**
135
135
  * 12h/24h view for hour selection clock.
136
- * @default `utils.is12HourCycleInCurrentLocale()`
136
+ * @default utils.is12HourCycleInCurrentLocale()
137
137
  */
138
138
  ampm: _propTypes.default.bool,
139
139
  /**
@@ -163,7 +163,7 @@ DesktopDateTimeRangePicker.propTypes = {
163
163
  * Formats the day of week displayed in the calendar header.
164
164
  * @param {TDate} date The date of the day of week provided by the adapter.
165
165
  * @returns {string} The name to display.
166
- * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
166
+ * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
167
167
  */
168
168
  dayOfWeekFormatter: _propTypes.default.func,
169
169
  /**
@@ -90,7 +90,7 @@ MobileDateRangePicker.propTypes = {
90
90
  * Formats the day of week displayed in the calendar header.
91
91
  * @param {TDate} date The date of the day of week provided by the adapter.
92
92
  * @returns {string} The name to display.
93
- * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
93
+ * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
94
94
  */
95
95
  dayOfWeekFormatter: _propTypes.default.func,
96
96
  /**
@@ -141,7 +141,7 @@ MobileDateTimeRangePicker.propTypes = {
141
141
  // ----------------------------------------------------------------------
142
142
  /**
143
143
  * 12h/24h view for hour selection clock.
144
- * @default `utils.is12HourCycleInCurrentLocale()`
144
+ * @default utils.is12HourCycleInCurrentLocale()
145
145
  */
146
146
  ampm: _propTypes.default.bool,
147
147
  /**
@@ -166,7 +166,7 @@ MobileDateTimeRangePicker.propTypes = {
166
166
  * Formats the day of week displayed in the calendar header.
167
167
  * @param {TDate} date The date of the day of week provided by the adapter.
168
168
  * @returns {string} The name to display.
169
- * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
169
+ * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
170
170
  */
171
171
  dayOfWeekFormatter: _propTypes.default.func,
172
172
  /**
@@ -272,7 +272,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
272
272
  * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
273
273
  * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
274
274
  *
275
- * @default `false`
275
+ * @default false
276
276
  */
277
277
  shouldRespectLeadingZeros: _propTypes.default.bool,
278
278
  /**
@@ -142,7 +142,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
142
142
  // ----------------------------------------------------------------------
143
143
  /**
144
144
  * 12h/24h view for hour selection clock.
145
- * @default `utils.is12HourCycleInCurrentLocale()`
145
+ * @default utils.is12HourCycleInCurrentLocale()
146
146
  */
147
147
  ampm: _propTypes.default.bool,
148
148
  /**
@@ -313,7 +313,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
313
313
  * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
314
314
  * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
315
315
  *
316
- * @default `false`
316
+ * @default false
317
317
  */
318
318
  shouldRespectLeadingZeros: _propTypes.default.bool,
319
319
  /**
@@ -142,7 +142,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
142
142
  // ----------------------------------------------------------------------
143
143
  /**
144
144
  * 12h/24h view for hour selection clock.
145
- * @default `utils.is12HourCycleInCurrentLocale()`
145
+ * @default utils.is12HourCycleInCurrentLocale()
146
146
  */
147
147
  ampm: _propTypes.default.bool,
148
148
  /**
@@ -286,7 +286,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
286
286
  * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
287
287
  * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
288
288
  *
289
- * @default `false`
289
+ * @default false
290
290
  */
291
291
  shouldRespectLeadingZeros: _propTypes.default.bool,
292
292
  /**
@@ -276,7 +276,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
276
276
  * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
277
277
  * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
278
278
  *
279
- * @default `false`
279
+ * @default false
280
280
  */
281
281
  shouldRespectLeadingZeros: _propTypes.default.bool,
282
282
  /**
@@ -74,7 +74,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
74
74
  // ----------------------------------------------------------------------
75
75
  /**
76
76
  * 12h/24h view for hour selection clock.
77
- * @default `utils.is12HourCycleInCurrentLocale()`
77
+ * @default utils.is12HourCycleInCurrentLocale()
78
78
  */
79
79
  ampm: _propTypes.default.bool,
80
80
  /**
@@ -317,7 +317,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
317
317
  * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
318
318
  * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
319
319
  *
320
- * @default `false`
320
+ * @default false
321
321
  */
322
322
  shouldRespectLeadingZeros: _propTypes.default.bool,
323
323
  /**
@@ -74,7 +74,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
74
74
  // ----------------------------------------------------------------------
75
75
  /**
76
76
  * 12h/24h view for hour selection clock.
77
- * @default `utils.is12HourCycleInCurrentLocale()`
77
+ * @default utils.is12HourCycleInCurrentLocale()
78
78
  */
79
79
  ampm: _propTypes.default.bool,
80
80
  /**
@@ -290,7 +290,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
290
290
  * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
291
291
  * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
292
292
  *
293
- * @default `false`
293
+ * @default false
294
294
  */
295
295
  shouldRespectLeadingZeros: _propTypes.default.bool,
296
296
  /**
@@ -83,7 +83,7 @@ StaticDateRangePicker.propTypes = {
83
83
  * Formats the day of week displayed in the calendar header.
84
84
  * @param {TDate} date The date of the day of week provided by the adapter.
85
85
  * @returns {string} The name to display.
86
- * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
86
+ * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
87
87
  */
88
88
  dayOfWeekFormatter: _propTypes.default.func,
89
89
  /**
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v7.0.0
2
+ * @mui/x-date-pickers-pro v7.1.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -230,7 +230,7 @@ const useSingleInputFieldSlotProps = ({
230
230
  InputProps: (0, _extends2.default)({
231
231
  ref: anchorRef
232
232
  }, fieldProps?.InputProps),
233
- focused: open
233
+ focused: open ? true : undefined
234
234
  }, labelId != null && {
235
235
  id: labelId
236
236
  }, wrapperVariant === 'mobile' && {
@@ -44,7 +44,7 @@ function calculateRangeChange({
44
44
  nextSelection: 'end',
45
45
  newRange: [selectedDate, null]
46
46
  };
47
- return Boolean(start) && utils.isBefore(selectedDate, start) ? truthyResult : {
47
+ return Boolean(start) && utils.isBeforeDay(selectedDate, start) ? truthyResult : {
48
48
  nextSelection: 'start',
49
49
  newRange: [start, selectedDate]
50
50
  };
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTcxMTA1ODQwMDAwMA==";
9
+ const releaseInfo = "MTcxMjI2NDQwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers-pro",
3
- "version": "7.0.0",
4
- "description": "The commercial edition of the date picker components (MUI X).",
3
+ "version": "7.1.1",
4
+ "description": "The Pro plan edition of the Date and Time Picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
7
7
  "license": "SEE LICENSE IN LICENSE",
@@ -35,8 +35,8 @@
35
35
  "@mui/base": "^5.0.0-beta.40",
36
36
  "@mui/system": "^5.15.14",
37
37
  "@mui/utils": "^5.15.14",
38
- "@mui/x-date-pickers": "7.0.0",
39
- "@mui/x-license": "7.0.0",
38
+ "@mui/x-date-pickers": "7.1.1",
39
+ "@mui/x-license": "7.1.1",
40
40
  "clsx": "^2.1.0",
41
41
  "prop-types": "^15.8.1",
42
42
  "react-transition-group": "^4.4.5"