@mui/x-date-pickers 6.19.0 → 6.19.2

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 (103) hide show
  1. package/AdapterDateFns/AdapterDateFns.d.ts +1 -0
  2. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +1 -0
  3. package/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -0
  4. package/AdapterLuxon/AdapterLuxon.js +0 -1
  5. package/CHANGELOG.md +64 -0
  6. package/DateCalendar/useCalendarState.js +0 -1
  7. package/DatePicker/DatePickerToolbar.d.ts +2 -2
  8. package/DatePicker/DatePickerToolbar.js +2 -7
  9. package/DateTimePicker/DateTimePickerTabs.js +6 -3
  10. package/DigitalClock/DigitalClock.js +1 -0
  11. package/DigitalClock/DigitalClock.types.d.ts +5 -0
  12. package/MonthCalendar/MonthCalendar.js +0 -1
  13. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
  14. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +5 -0
  15. package/PickersLayout/pickersLayoutClasses.js +3 -2
  16. package/PickersLayout/usePickerLayout.js +2 -1
  17. package/TimeClock/Clock.js +0 -1
  18. package/TimeClock/ClockPointer.js +0 -1
  19. package/TimeClock/TimeClock.js +1 -0
  20. package/TimeClock/TimeClock.types.d.ts +5 -0
  21. package/YearCalendar/YearCalendar.js +0 -1
  22. package/index.js +1 -1
  23. package/internals/hooks/useClockReferenceDate.js +0 -1
  24. package/internals/hooks/useField/useField.utils.js +0 -2
  25. package/internals/hooks/useViews.js +0 -1
  26. package/internals/models/props/tabs.d.ts +1 -0
  27. package/legacy/AdapterDateFns/AdapterDateFns.js +5 -6
  28. package/legacy/AdapterDateFnsV3/AdapterDateFnsV3.js +6 -6
  29. package/legacy/AdapterLuxon/AdapterLuxon.js +0 -1
  30. package/legacy/AdapterMomentHijri/AdapterMomentHijri.js +5 -6
  31. package/legacy/AdapterMomentJalaali/AdapterMomentJalaali.js +5 -6
  32. package/legacy/DateCalendar/PickersSlideTransition.js +8 -9
  33. package/legacy/DateCalendar/useCalendarState.js +0 -1
  34. package/legacy/DatePicker/DatePickerToolbar.js +2 -7
  35. package/legacy/DateTimePicker/DateTimePickerTabs.js +6 -3
  36. package/legacy/DigitalClock/DigitalClock.js +1 -0
  37. package/legacy/MonthCalendar/MonthCalendar.js +0 -1
  38. package/legacy/MonthCalendar/PickersMonth.js +4 -5
  39. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
  40. package/legacy/PickersDay/PickersDay.js +5 -6
  41. package/legacy/PickersLayout/PickersLayout.js +5 -6
  42. package/legacy/PickersLayout/pickersLayoutClasses.js +3 -2
  43. package/legacy/PickersLayout/usePickerLayout.js +2 -1
  44. package/legacy/TimeClock/Clock.js +0 -1
  45. package/legacy/TimeClock/ClockNumber.js +4 -5
  46. package/legacy/TimeClock/ClockPointer.js +0 -1
  47. package/legacy/TimeClock/TimeClock.js +1 -0
  48. package/legacy/TimePicker/TimePickerToolbar.js +1 -2
  49. package/legacy/YearCalendar/PickersYear.js +4 -5
  50. package/legacy/YearCalendar/YearCalendar.js +0 -1
  51. package/legacy/index.js +1 -1
  52. package/legacy/internals/components/PickersModalDialog.js +3 -4
  53. package/legacy/internals/hooks/useClockReferenceDate.js +0 -1
  54. package/legacy/internals/hooks/useField/useField.utils.js +0 -2
  55. package/legacy/internals/hooks/useViews.js +0 -1
  56. package/legacy/locales/plPL.js +0 -1
  57. package/legacy/locales/svSE.js +0 -1
  58. package/legacy/locales/urPK.js +0 -1
  59. package/locales/plPL.js +0 -1
  60. package/locales/svSE.js +0 -1
  61. package/locales/urPK.js +0 -1
  62. package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -0
  63. package/modern/AdapterLuxon/AdapterLuxon.js +0 -1
  64. package/modern/DateCalendar/useCalendarState.js +0 -1
  65. package/modern/DatePicker/DatePickerToolbar.js +2 -7
  66. package/modern/DateTimePicker/DateTimePickerTabs.js +6 -3
  67. package/modern/DigitalClock/DigitalClock.js +1 -0
  68. package/modern/MonthCalendar/MonthCalendar.js +0 -1
  69. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
  70. package/modern/PickersLayout/pickersLayoutClasses.js +3 -2
  71. package/modern/PickersLayout/usePickerLayout.js +2 -1
  72. package/modern/TimeClock/Clock.js +0 -1
  73. package/modern/TimeClock/ClockPointer.js +0 -1
  74. package/modern/TimeClock/TimeClock.js +1 -0
  75. package/modern/YearCalendar/YearCalendar.js +0 -1
  76. package/modern/index.js +1 -1
  77. package/modern/internals/hooks/useClockReferenceDate.js +0 -1
  78. package/modern/internals/hooks/useField/useField.utils.js +0 -2
  79. package/modern/internals/hooks/useViews.js +0 -1
  80. package/modern/locales/plPL.js +0 -1
  81. package/modern/locales/svSE.js +0 -1
  82. package/modern/locales/urPK.js +0 -1
  83. package/node/AdapterLuxon/AdapterLuxon.js +0 -1
  84. package/node/DateCalendar/useCalendarState.js +0 -1
  85. package/node/DatePicker/DatePickerToolbar.js +0 -4
  86. package/node/DateTimePicker/DateTimePickerTabs.js +7 -4
  87. package/node/DigitalClock/DigitalClock.js +1 -0
  88. package/node/MonthCalendar/MonthCalendar.js +0 -1
  89. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -0
  90. package/node/PickersLayout/pickersLayoutClasses.js +5 -3
  91. package/node/PickersLayout/usePickerLayout.js +2 -1
  92. package/node/TimeClock/Clock.js +0 -1
  93. package/node/TimeClock/ClockPointer.js +0 -1
  94. package/node/TimeClock/TimeClock.js +1 -0
  95. package/node/YearCalendar/YearCalendar.js +0 -1
  96. package/node/index.js +1 -1
  97. package/node/internals/hooks/useClockReferenceDate.js +0 -1
  98. package/node/internals/hooks/useField/useField.utils.js +0 -2
  99. package/node/internals/hooks/useViews.js +0 -1
  100. package/node/locales/plPL.js +0 -1
  101. package/node/locales/svSE.js +0 -1
  102. package/node/locales/urPK.js +0 -1
  103. package/package.json +1 -1
@@ -1,10 +1,11 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import * as React from 'react';
3
+ import clsx from 'clsx';
3
4
  import PropTypes from 'prop-types';
4
5
  import Tab from '@mui/material/Tab';
5
6
  import Tabs, { tabsClasses } from '@mui/material/Tabs';
6
7
  import { styled, useThemeProps } from '@mui/material/styles';
7
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
8
+ import composeClasses from '@mui/utils/composeClasses';
8
9
  import { TimeIcon, DateRangeIcon } from '../icons';
9
10
  import { useLocaleText } from '../internals/hooks/useUtils';
10
11
  import { getDateTimePickerTabsUtilityClass } from './dateTimePickerTabsClasses';
@@ -71,7 +72,8 @@ var DateTimePickerTabs = function DateTimePickerTabs(inProps) {
71
72
  timeIcon = _props$timeIcon === void 0 ? /*#__PURE__*/_jsx(TimeIcon, {}) : _props$timeIcon,
72
73
  view = props.view,
73
74
  _props$hidden = props.hidden,
74
- hidden = _props$hidden === void 0 ? typeof window === 'undefined' || window.innerHeight < 667 : _props$hidden;
75
+ hidden = _props$hidden === void 0 ? typeof window === 'undefined' || window.innerHeight < 667 : _props$hidden,
76
+ className = props.className;
75
77
  var localeText = useLocaleText();
76
78
  var classes = useUtilityClasses(props);
77
79
  var handleChange = function handleChange(event, value) {
@@ -85,7 +87,7 @@ var DateTimePickerTabs = function DateTimePickerTabs(inProps) {
85
87
  variant: "fullWidth",
86
88
  value: viewToTab(view),
87
89
  onChange: handleChange,
88
- className: classes.root,
90
+ className: clsx(className, classes.root),
89
91
  children: [/*#__PURE__*/_jsx(Tab, {
90
92
  value: "date",
91
93
  "aria-label": localeText.dateTableLabel,
@@ -110,6 +112,7 @@ process.env.NODE_ENV !== "production" ? DateTimePickerTabs.propTypes = {
110
112
  * Override or extend the styles applied to the component.
111
113
  */
112
114
  classes: PropTypes.object,
115
+ className: PropTypes.string,
113
116
  /**
114
117
  * Date tab icon.
115
118
  * @default DateRange
@@ -455,6 +455,7 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
455
455
  view: PropTypes.oneOf(['hours']),
456
456
  /**
457
457
  * Available views.
458
+ * @default ['hours']
458
459
  */
459
460
  views: PropTypes.arrayOf(PropTypes.oneOf(['hours']))
460
461
  } : void 0;
@@ -113,7 +113,6 @@ export var MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalendar(
113
113
  });
114
114
  }, [] // eslint-disable-line react-hooks/exhaustive-deps
115
115
  );
116
-
117
116
  var ownerState = props;
118
117
  var classes = useUtilityClasses(ownerState);
119
118
  var todayMonth = React.useMemo(function () {
@@ -39,14 +39,13 @@ var PickersMonthButton = styled('button', {
39
39
  return [styles.monthButton, _defineProperty({}, "&.".concat(pickersMonthClasses.disabled), styles.disabled), _defineProperty({}, "&.".concat(pickersMonthClasses.selected), styles.selected)];
40
40
  }
41
41
  })(function (_ref4) {
42
- var _extends2;
43
42
  var theme = _ref4.theme;
44
43
  return _extends({
45
44
  color: 'unset',
46
45
  backgroundColor: 'transparent',
47
46
  border: 0,
48
47
  outline: 0
49
- }, theme.typography.subtitle1, (_extends2 = {
48
+ }, theme.typography.subtitle1, _defineProperty(_defineProperty({
50
49
  margin: '8px 0',
51
50
  height: 36,
52
51
  width: 72,
@@ -62,15 +61,15 @@ var PickersMonthButton = styled('button', {
62
61
  cursor: 'auto',
63
62
  pointerEvents: 'none'
64
63
  }
65
- }, _defineProperty(_extends2, "&.".concat(pickersMonthClasses.disabled), {
64
+ }, "&.".concat(pickersMonthClasses.disabled), {
66
65
  color: (theme.vars || theme).palette.text.secondary
67
- }), _defineProperty(_extends2, "&.".concat(pickersMonthClasses.selected), {
66
+ }), "&.".concat(pickersMonthClasses.selected), {
68
67
  color: (theme.vars || theme).palette.primary.contrastText,
69
68
  backgroundColor: (theme.vars || theme).palette.primary.main,
70
69
  '&:focus, &:hover': {
71
70
  backgroundColor: (theme.vars || theme).palette.primary.dark
72
71
  }
73
- }), _extends2));
72
+ }));
74
73
  });
75
74
 
76
75
  /**
@@ -534,6 +534,7 @@ process.env.NODE_ENV !== "production" ? MultiSectionDigitalClock.propTypes = {
534
534
  view: PropTypes.oneOf(['hours', 'meridiem', 'minutes', 'seconds']),
535
535
  /**
536
536
  * Available views.
537
+ * @default ['hours', 'minutes']
537
538
  */
538
539
  views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'meridiem', 'minutes', 'seconds']).isRequired)
539
540
  } : void 0;
@@ -29,10 +29,9 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
29
29
  return composeClasses(slots, getPickersDayUtilityClass, classes);
30
30
  };
31
31
  var styleArg = function styleArg(_ref) {
32
- var _extends2;
33
32
  var theme = _ref.theme,
34
33
  ownerState = _ref.ownerState;
35
- return _extends({}, theme.typography.caption, (_extends2 = {
34
+ return _extends({}, theme.typography.caption, _defineProperty(_defineProperty(_defineProperty({
36
35
  width: DAY_SIZE,
37
36
  height: DAY_SIZE,
38
37
  borderRadius: '50%',
@@ -54,7 +53,7 @@ var styleArg = function styleArg(_ref) {
54
53
  willChange: 'background-color',
55
54
  backgroundColor: (theme.vars || theme).palette.primary.dark
56
55
  })
57
- }, _defineProperty(_extends2, "&.".concat(pickersDayClasses.selected), {
56
+ }, "&.".concat(pickersDayClasses.selected), {
58
57
  color: (theme.vars || theme).palette.primary.contrastText,
59
58
  backgroundColor: (theme.vars || theme).palette.primary.main,
60
59
  fontWeight: theme.typography.fontWeightMedium,
@@ -62,11 +61,11 @@ var styleArg = function styleArg(_ref) {
62
61
  willChange: 'background-color',
63
62
  backgroundColor: (theme.vars || theme).palette.primary.dark
64
63
  }
65
- }), _defineProperty(_extends2, "&.".concat(pickersDayClasses.disabled, ":not(.").concat(pickersDayClasses.selected, ")"), {
64
+ }), "&.".concat(pickersDayClasses.disabled, ":not(.").concat(pickersDayClasses.selected, ")"), {
66
65
  color: (theme.vars || theme).palette.text.disabled
67
- }), _defineProperty(_extends2, "&.".concat(pickersDayClasses.disabled, "&.").concat(pickersDayClasses.selected), {
66
+ }), "&.".concat(pickersDayClasses.disabled, "&.").concat(pickersDayClasses.selected), {
68
67
  opacity: 0.6
69
- }), _extends2), !ownerState.disableMargin && {
68
+ }), !ownerState.disableMargin && {
70
69
  margin: "0 ".concat(DAY_MARGIN, "px")
71
70
  }, ownerState.outsideCurrentMonth && ownerState.showDaysOutsideCurrentMonth && {
72
71
  color: (theme.vars || theme).palette.text.secondary
@@ -24,29 +24,28 @@ var PickersLayoutRoot = styled('div', {
24
24
  return styles.root;
25
25
  }
26
26
  })(function (_ref) {
27
- var _ref2;
28
27
  var theme = _ref.theme,
29
28
  ownerState = _ref.ownerState;
30
- return _ref2 = {
29
+ return _defineProperty(_defineProperty(_defineProperty({
31
30
  display: 'grid',
32
31
  gridAutoColumns: 'max-content auto max-content',
33
32
  gridAutoRows: 'max-content auto max-content'
34
- }, _defineProperty(_ref2, "& .".concat(pickersLayoutClasses.toolbar), ownerState.isLandscape ? {
33
+ }, "& .".concat(pickersLayoutClasses.toolbar), ownerState.isLandscape ? {
35
34
  gridColumn: theme.direction === 'rtl' ? 3 : 1,
36
35
  gridRow: '2 / 3'
37
36
  } : {
38
37
  gridColumn: '2 / 4',
39
38
  gridRow: 1
40
- }), _defineProperty(_ref2, ".".concat(pickersLayoutClasses.shortcuts), ownerState.isLandscape ? {
39
+ }), ".".concat(pickersLayoutClasses.shortcuts), ownerState.isLandscape ? {
41
40
  gridColumn: '2 / 4',
42
41
  gridRow: 1
43
42
  } : {
44
43
  gridColumn: theme.direction === 'rtl' ? 3 : 1,
45
44
  gridRow: '2 / 3'
46
- }), _defineProperty(_ref2, "& .".concat(pickersLayoutClasses.actionBar), {
45
+ }), "& .".concat(pickersLayoutClasses.actionBar), {
47
46
  gridColumn: '1 / 4',
48
47
  gridRow: 3
49
- }), _ref2;
48
+ });
50
49
  });
51
50
  PickersLayoutRoot.propTypes = {
52
51
  // ----------------------------- Warning --------------------------------
@@ -1,5 +1,6 @@
1
- import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
1
+ import generateUtilityClass from '@mui/utils/generateUtilityClass';
2
+ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
2
3
  export function getPickersLayoutUtilityClass(slot) {
3
4
  return generateUtilityClass('MuiPickersLayout', slot);
4
5
  }
5
- export var pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'shortcuts']);
6
+ export var pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'tabs', 'shortcuts']);
@@ -103,7 +103,8 @@ var usePickerLayout = function usePickerLayout(props) {
103
103
  var Tabs = slots == null ? void 0 : slots.tabs;
104
104
  var tabs = view && Tabs ? /*#__PURE__*/_jsx(Tabs, _extends({
105
105
  view: view,
106
- onViewChange: onViewChange
106
+ onViewChange: onViewChange,
107
+ className: classes.tabs
107
108
  }, slotProps == null ? void 0 : slotProps.tabs)) : null;
108
109
 
109
110
  // Shortcuts
@@ -293,7 +293,6 @@ export function Clock(inProps) {
293
293
  // do nothing
294
294
  }
295
295
  };
296
-
297
296
  return /*#__PURE__*/_jsxs(ClockRoot, {
298
297
  className: clsx(className, classes.root),
299
298
  children: [/*#__PURE__*/_jsxs(ClockClock, {
@@ -25,10 +25,9 @@ var ClockNumberRoot = styled('span', {
25
25
  return [styles.root, _defineProperty({}, "&.".concat(clockNumberClasses.disabled), styles.disabled), _defineProperty({}, "&.".concat(clockNumberClasses.selected), styles.selected)];
26
26
  }
27
27
  })(function (_ref3) {
28
- var _extends2;
29
28
  var theme = _ref3.theme,
30
29
  ownerState = _ref3.ownerState;
31
- return _extends((_extends2 = {
30
+ return _extends(_defineProperty(_defineProperty({
32
31
  height: CLOCK_HOUR_WIDTH,
33
32
  width: CLOCK_HOUR_WIDTH,
34
33
  position: 'absolute',
@@ -42,12 +41,12 @@ var ClockNumberRoot = styled('span', {
42
41
  '&:focused': {
43
42
  backgroundColor: (theme.vars || theme).palette.background.paper
44
43
  }
45
- }, _defineProperty(_extends2, "&.".concat(clockNumberClasses.selected), {
44
+ }, "&.".concat(clockNumberClasses.selected), {
46
45
  color: (theme.vars || theme).palette.primary.contrastText
47
- }), _defineProperty(_extends2, "&.".concat(clockNumberClasses.disabled), {
46
+ }), "&.".concat(clockNumberClasses.disabled), {
48
47
  pointerEvents: 'none',
49
48
  color: (theme.vars || theme).palette.text.disabled
50
- }), _extends2), ownerState.inner && _extends({}, theme.typography.body2, {
49
+ }), ownerState.inner && _extends({}, theme.typography.body2, {
51
50
  color: (theme.vars || theme).palette.text.secondary
52
51
  }));
53
52
  });
@@ -88,7 +88,6 @@ export function ClockPointer(inProps) {
88
88
  if (type === 'hours' && viewValue > 12) {
89
89
  angle -= 360; // round up angle to max 360 degrees
90
90
  }
91
-
92
91
  return {
93
92
  height: Math.round((isInner ? 0.26 : 0.4) * CLOCK_WIDTH),
94
93
  transform: "rotateZ(".concat(angle, "deg)")
@@ -504,6 +504,7 @@ process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
504
504
  view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),
505
505
  /**
506
506
  * Available views.
507
+ * @default ['hours', 'minutes']
507
508
  */
508
509
  views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)
509
510
  } : void 0;
@@ -51,8 +51,7 @@ var TimePickerToolbarHourMinuteLabel = styled('div', {
51
51
  name: 'MuiTimePickerToolbar',
52
52
  slot: 'HourMinuteLabel',
53
53
  overridesResolver: function overridesResolver(props, styles) {
54
- var _ref;
55
- return [(_ref = {}, _defineProperty(_ref, "&.".concat(timePickerToolbarClasses.hourMinuteLabelLandscape), styles.hourMinuteLabelLandscape), _defineProperty(_ref, "&.".concat(timePickerToolbarClasses.hourMinuteLabelReverse), styles.hourMinuteLabelReverse), _ref), styles.hourMinuteLabel];
54
+ return [_defineProperty(_defineProperty({}, "&.".concat(timePickerToolbarClasses.hourMinuteLabelLandscape), styles.hourMinuteLabelLandscape), "&.".concat(timePickerToolbarClasses.hourMinuteLabelReverse), styles.hourMinuteLabelReverse), styles.hourMinuteLabel];
56
55
  }
57
56
  })(function (_ref2) {
58
57
  var theme = _ref2.theme,
@@ -40,14 +40,13 @@ var PickersYearButton = styled('button', {
40
40
  return [styles.yearButton, _defineProperty({}, "&.".concat(pickersYearClasses.disabled), styles.disabled), _defineProperty({}, "&.".concat(pickersYearClasses.selected), styles.selected)];
41
41
  }
42
42
  })(function (_ref4) {
43
- var _extends2;
44
43
  var theme = _ref4.theme;
45
44
  return _extends({
46
45
  color: 'unset',
47
46
  backgroundColor: 'transparent',
48
47
  border: 0,
49
48
  outline: 0
50
- }, theme.typography.subtitle1, (_extends2 = {
49
+ }, theme.typography.subtitle1, _defineProperty(_defineProperty({
51
50
  margin: '6px 0',
52
51
  height: 36,
53
52
  width: 72,
@@ -63,15 +62,15 @@ var PickersYearButton = styled('button', {
63
62
  cursor: 'auto',
64
63
  pointerEvents: 'none'
65
64
  }
66
- }, _defineProperty(_extends2, "&.".concat(pickersYearClasses.disabled), {
65
+ }, "&.".concat(pickersYearClasses.disabled), {
67
66
  color: (theme.vars || theme).palette.text.secondary
68
- }), _defineProperty(_extends2, "&.".concat(pickersYearClasses.selected), {
67
+ }), "&.".concat(pickersYearClasses.selected), {
69
68
  color: (theme.vars || theme).palette.primary.contrastText,
70
69
  backgroundColor: (theme.vars || theme).palette.primary.main,
71
70
  '&:focus, &:hover': {
72
71
  backgroundColor: (theme.vars || theme).palette.primary.dark
73
72
  }
74
- }), _extends2));
73
+ }));
75
74
  });
76
75
 
77
76
  /**
@@ -117,7 +117,6 @@ export var YearCalendar = /*#__PURE__*/React.forwardRef(function YearCalendar(in
117
117
  });
118
118
  }, [] // eslint-disable-line react-hooks/exhaustive-deps
119
119
  );
120
-
121
120
  var ownerState = props;
122
121
  var classes = useUtilityClasses(ownerState);
123
122
  var todayYear = React.useMemo(function () {
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.19.0
2
+ * @mui/x-date-pickers v6.19.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
- var _styled;
4
3
  import * as React from 'react';
5
4
  import DialogContent from '@mui/material/DialogContent';
6
5
  import Fade from '@mui/material/Fade';
@@ -8,12 +7,12 @@ import MuiDialog, { dialogClasses } from '@mui/material/Dialog';
8
7
  import { styled } from '@mui/material/styles';
9
8
  import { DIALOG_WIDTH } from '../constants/dimensions';
10
9
  import { jsx as _jsx } from "react/jsx-runtime";
11
- var PickersModalDialogRoot = styled(MuiDialog)((_styled = {}, _defineProperty(_styled, "& .".concat(dialogClasses.container), {
10
+ var PickersModalDialogRoot = styled(MuiDialog)(_defineProperty(_defineProperty({}, "& .".concat(dialogClasses.container), {
12
11
  outline: 0
13
- }), _defineProperty(_styled, "& .".concat(dialogClasses.paper), {
12
+ }), "& .".concat(dialogClasses.paper), {
14
13
  outline: 0,
15
14
  minWidth: DIALOG_WIDTH
16
- }), _styled));
15
+ }));
17
16
  var PickersModalDialogContent = styled(DialogContent)({
18
17
  '&:first-of-type': {
19
18
  padding: 0
@@ -24,6 +24,5 @@ export var useClockReferenceDate = function useClockReferenceDate(_ref) {
24
24
  // We only want to compute the reference date on mount.
25
25
  [] // eslint-disable-line react-hooks/exhaustive-deps
26
26
  );
27
-
28
27
  return value != null ? value : referenceDate;
29
28
  };
@@ -133,7 +133,6 @@ export var adjustSectionValue = function adjustSectionValue(utils, timezone, sec
133
133
  if (delta < 0 || isStart) {
134
134
  newSectionValueNumber += step - (step + newSectionValueNumber) % step; // for JS -3 % 5 = -3 (should be 2)
135
135
  }
136
-
137
136
  if (delta > 0 || isEnd) {
138
137
  newSectionValueNumber -= newSectionValueNumber % step;
139
138
  }
@@ -414,7 +413,6 @@ export var splitFormatIntoSections = function splitFormatIntoSections(utils, tim
414
413
  }) // Sort to put longest word first
415
414
  .join('|'), ")"), 'g') // used to get access to lastIndex state
416
415
  ;
417
-
418
416
  var currentTokenValue = '';
419
417
  var _loop = function _loop(_i) {
420
418
  var escapedPartOfCurrentChar = escapedParts.find(function (escapeIndex) {
@@ -71,7 +71,6 @@ export function useViews(_ref) {
71
71
  } // If false the blur is due to view switching
72
72
  );
73
73
  }
74
-
75
74
  onFocusedViewChange == null || onFocusedViewChange(viewToFocus, hasFocus);
76
75
  });
77
76
  var handleChangeView = useEventCallback(function (newView) {
@@ -77,5 +77,4 @@ var plPLPickers = {
77
77
  // fieldSecondsPlaceholder: () => 'ss',
78
78
  // fieldMeridiemPlaceholder: () => 'aa',
79
79
  };
80
-
81
80
  export var plPL = getPickersLocalization(plPLPickers);
@@ -77,5 +77,4 @@ var svSEPickers = {
77
77
  // fieldSecondsPlaceholder: () => 'ss',
78
78
  // fieldMeridiemPlaceholder: () => 'aa',
79
79
  };
80
-
81
80
  export var svSE = getPickersLocalization(svSEPickers);
@@ -77,5 +77,4 @@ var urPKPickers = {
77
77
  // fieldSecondsPlaceholder: () => 'ss',
78
78
  // fieldMeridiemPlaceholder: () => 'aa',
79
79
  };
80
-
81
80
  export var urPK = getPickersLocalization(urPKPickers);
package/locales/plPL.js CHANGED
@@ -57,5 +57,4 @@ const plPLPickers = {
57
57
  // fieldSecondsPlaceholder: () => 'ss',
58
58
  // fieldMeridiemPlaceholder: () => 'aa',
59
59
  };
60
-
61
60
  export const plPL = getPickersLocalization(plPLPickers);
package/locales/svSE.js CHANGED
@@ -57,5 +57,4 @@ const svSEPickers = {
57
57
  // fieldSecondsPlaceholder: () => 'ss',
58
58
  // fieldMeridiemPlaceholder: () => 'aa',
59
59
  };
60
-
61
60
  export const svSE = getPickersLocalization(svSEPickers);
package/locales/urPK.js CHANGED
@@ -57,5 +57,4 @@ const urPKPickers = {
57
57
  // fieldSecondsPlaceholder: () => 'ss',
58
58
  // fieldMeridiemPlaceholder: () => 'aa',
59
59
  };
60
-
61
60
  export const urPK = getPickersLocalization(urPKPickers);
@@ -59,6 +59,7 @@ import { isWithinInterval } from 'date-fns/isWithinInterval';
59
59
  import { enUS } from 'date-fns/locale/en-US';
60
60
  // date-fns v2 does not export types
61
61
  // @ts-ignore TODO remove when date-fns-v3 is the default
62
+
62
63
  import { AdapterDateFnsBase } from '../AdapterDateFnsBase';
63
64
 
64
65
  /**
@@ -265,7 +265,6 @@ export class AdapterLuxon {
265
265
  if (typeof Intl === 'undefined' || typeof Intl.DateTimeFormat === 'undefined') {
266
266
  return true; // Luxon defaults to en-US if Intl not found
267
267
  }
268
-
269
268
  return Boolean(new Intl.DateTimeFormat(this.locale, {
270
269
  hour: 'numeric'
271
270
  })?.resolvedOptions()?.hour12);
@@ -70,7 +70,6 @@ export const useCalendarState = params => {
70
70
  });
71
71
  }, [] // eslint-disable-line react-hooks/exhaustive-deps
72
72
  );
73
-
74
73
  const [calendarState, dispatch] = React.useReducer(reducerFn, {
75
74
  isMonthSwitchingAnimating: false,
76
75
  focusedDay: utils.isValid(value) ? value : now,
@@ -26,10 +26,6 @@ const DatePickerToolbarRoot = styled(PickersToolbar, {
26
26
  slot: 'Root',
27
27
  overridesResolver: (_, styles) => styles.root
28
28
  })({});
29
-
30
- /**
31
- * @ignore - do not document.
32
- */
33
29
  const DatePickerToolbarTitle = styled(Typography, {
34
30
  name: 'MuiDatePickerToolbar',
35
31
  slot: 'Title',
@@ -49,7 +45,7 @@ const DatePickerToolbarTitle = styled(Typography, {
49
45
  *
50
46
  * - [DatePickerToolbar API](https://mui.com/x/api/date-pickers/date-picker-toolbar/)
51
47
  */
52
- const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {
48
+ export const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {
53
49
  const props = useThemeProps({
54
50
  props: inProps,
55
51
  name: 'MuiDatePickerToolbar'
@@ -133,5 +129,4 @@ process.env.NODE_ENV !== "production" ? DatePickerToolbar.propTypes = {
133
129
  */
134
130
  view: PropTypes.oneOf(['day', 'month', 'year']).isRequired,
135
131
  views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired).isRequired
136
- } : void 0;
137
- export { DatePickerToolbar };
132
+ } : void 0;
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
+ import clsx from 'clsx';
2
3
  import PropTypes from 'prop-types';
3
4
  import Tab from '@mui/material/Tab';
4
5
  import Tabs, { tabsClasses } from '@mui/material/Tabs';
5
6
  import { styled, useThemeProps } from '@mui/material/styles';
6
- import { unstable_composeClasses as composeClasses } from '@mui/utils';
7
+ import composeClasses from '@mui/utils/composeClasses';
7
8
  import { TimeIcon, DateRangeIcon } from '../icons';
8
9
  import { useLocaleText } from '../internals/hooks/useUtils';
9
10
  import { getDateTimePickerTabsUtilityClass } from './dateTimePickerTabsClasses';
@@ -68,7 +69,8 @@ const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
68
69
  onViewChange,
69
70
  timeIcon = /*#__PURE__*/_jsx(TimeIcon, {}),
70
71
  view,
71
- hidden = typeof window === 'undefined' || window.innerHeight < 667
72
+ hidden = typeof window === 'undefined' || window.innerHeight < 667,
73
+ className
72
74
  } = props;
73
75
  const localeText = useLocaleText();
74
76
  const classes = useUtilityClasses(props);
@@ -83,7 +85,7 @@ const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
83
85
  variant: "fullWidth",
84
86
  value: viewToTab(view),
85
87
  onChange: handleChange,
86
- className: classes.root,
88
+ className: clsx(className, classes.root),
87
89
  children: [/*#__PURE__*/_jsx(Tab, {
88
90
  value: "date",
89
91
  "aria-label": localeText.dateTableLabel,
@@ -108,6 +110,7 @@ process.env.NODE_ENV !== "production" ? DateTimePickerTabs.propTypes = {
108
110
  * Override or extend the styles applied to the component.
109
111
  */
110
112
  classes: PropTypes.object,
113
+ className: PropTypes.string,
111
114
  /**
112
115
  * Date tab icon.
113
116
  * @default DateRange
@@ -437,6 +437,7 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
437
437
  view: PropTypes.oneOf(['hours']),
438
438
  /**
439
439
  * Available views.
440
+ * @default ['hours']
440
441
  */
441
442
  views: PropTypes.arrayOf(PropTypes.oneOf(['hours']))
442
443
  } : void 0;
@@ -111,7 +111,6 @@ export const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalenda
111
111
  granularity: SECTION_TYPE_GRANULARITY.month
112
112
  }), [] // eslint-disable-line react-hooks/exhaustive-deps
113
113
  );
114
-
115
114
  const ownerState = props;
116
115
  const classes = useUtilityClasses(ownerState);
117
116
  const todayMonth = React.useMemo(() => utils.getMonth(now), [utils, now]);
@@ -509,6 +509,7 @@ process.env.NODE_ENV !== "production" ? MultiSectionDigitalClock.propTypes = {
509
509
  view: PropTypes.oneOf(['hours', 'meridiem', 'minutes', 'seconds']),
510
510
  /**
511
511
  * Available views.
512
+ * @default ['hours', 'minutes']
512
513
  */
513
514
  views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'meridiem', 'minutes', 'seconds']).isRequired)
514
515
  } : void 0;
@@ -1,5 +1,6 @@
1
- import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
1
+ import generateUtilityClass from '@mui/utils/generateUtilityClass';
2
+ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
2
3
  export function getPickersLayoutUtilityClass(slot) {
3
4
  return generateUtilityClass('MuiPickersLayout', slot);
4
5
  }
5
- export const pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'shortcuts']);
6
+ export const pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'tabs', 'shortcuts']);
@@ -109,7 +109,8 @@ const usePickerLayout = props => {
109
109
  const Tabs = slots?.tabs;
110
110
  const tabs = view && Tabs ? /*#__PURE__*/_jsx(Tabs, _extends({
111
111
  view: view,
112
- onViewChange: onViewChange
112
+ onViewChange: onViewChange,
113
+ className: classes.tabs
113
114
  }, slotProps?.tabs)) : null;
114
115
 
115
116
  // Shortcuts
@@ -276,7 +276,6 @@ export function Clock(inProps) {
276
276
  // do nothing
277
277
  }
278
278
  };
279
-
280
279
  return /*#__PURE__*/_jsxs(ClockRoot, {
281
280
  className: clsx(className, classes.root),
282
281
  children: [/*#__PURE__*/_jsxs(ClockClock, {
@@ -85,7 +85,6 @@ export function ClockPointer(inProps) {
85
85
  if (type === 'hours' && viewValue > 12) {
86
86
  angle -= 360; // round up angle to max 360 degrees
87
87
  }
88
-
89
88
  return {
90
89
  height: Math.round((isInner ? 0.26 : 0.4) * CLOCK_WIDTH),
91
90
  transform: `rotateZ(${angle}deg)`
@@ -492,6 +492,7 @@ process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
492
492
  view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),
493
493
  /**
494
494
  * Available views.
495
+ * @default ['hours', 'minutes']
495
496
  */
496
497
  views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)
497
498
  } : void 0;
@@ -116,7 +116,6 @@ export const YearCalendar = /*#__PURE__*/React.forwardRef(function YearCalendar(
116
116
  granularity: SECTION_TYPE_GRANULARITY.year
117
117
  }), [] // eslint-disable-line react-hooks/exhaustive-deps
118
118
  );
119
-
120
119
  const ownerState = props;
121
120
  const classes = useUtilityClasses(ownerState);
122
121
  const todayYear = React.useMemo(() => utils.getYear(now), [utils, now]);
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.19.0
2
+ * @mui/x-date-pickers v6.19.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -21,6 +21,5 @@ export const useClockReferenceDate = ({
21
21
  // We only want to compute the reference date on mount.
22
22
  [] // eslint-disable-line react-hooks/exhaustive-deps
23
23
  );
24
-
25
24
  return value ?? referenceDate;
26
25
  };
@@ -125,7 +125,6 @@ export const adjustSectionValue = (utils, timezone, section, keyCode, sectionsVa
125
125
  if (delta < 0 || isStart) {
126
126
  newSectionValueNumber += step - (step + newSectionValueNumber) % step; // for JS -3 % 5 = -3 (should be 2)
127
127
  }
128
-
129
128
  if (delta > 0 || isEnd) {
130
129
  newSectionValueNumber -= newSectionValueNumber % step;
131
130
  }
@@ -401,7 +400,6 @@ export const splitFormatIntoSections = (utils, timezone, localeText, format, dat
401
400
  const isTokenStartRegExp = new RegExp(`^(${Object.keys(utils.formatTokenMap).sort((a, b) => b.length - a.length) // Sort to put longest word first
402
401
  .join('|')})`, 'g') // used to get access to lastIndex state
403
402
  ;
404
-
405
403
  let currentTokenValue = '';
406
404
  for (let i = 0; i < expandedFormat.length; i += 1) {
407
405
  const escapedPartOfCurrentChar = escapedParts.find(escapeIndex => escapeIndex.start <= i && escapeIndex.end >= i);