@mui/x-date-pickers 8.5.1 → 8.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +187 -10
  2. package/PickerDay2/PickerDay2.d.ts +7 -0
  3. package/PickerDay2/PickerDay2.js +369 -0
  4. package/PickerDay2/PickerDay2.types.d.ts +18 -0
  5. package/PickerDay2/PickerDay2.types.js +5 -0
  6. package/PickerDay2/index.d.ts +4 -0
  7. package/PickerDay2/index.js +25 -0
  8. package/PickerDay2/pickerDay2Classes.d.ts +17 -0
  9. package/PickerDay2/pickerDay2Classes.js +14 -0
  10. package/PickersDay/PickersDay.js +1 -1
  11. package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -0
  12. package/PickersTextField/PickersInput/pickersInputClasses.d.ts +1 -0
  13. package/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +2 -0
  14. package/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +1 -1
  15. package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +1 -0
  16. package/PickersTextField/PickersTextField.js +4 -1
  17. package/esm/PickerDay2/PickerDay2.d.ts +7 -0
  18. package/esm/PickerDay2/PickerDay2.js +361 -0
  19. package/esm/PickerDay2/PickerDay2.types.d.ts +18 -0
  20. package/esm/PickerDay2/PickerDay2.types.js +1 -0
  21. package/esm/PickerDay2/index.d.ts +4 -0
  22. package/esm/PickerDay2/index.js +2 -0
  23. package/esm/PickerDay2/pickerDay2Classes.d.ts +17 -0
  24. package/esm/PickerDay2/pickerDay2Classes.js +6 -0
  25. package/esm/PickersDay/PickersDay.js +1 -1
  26. package/esm/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -0
  27. package/esm/PickersTextField/PickersInput/pickersInputClasses.d.ts +1 -0
  28. package/esm/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +2 -0
  29. package/esm/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +1 -1
  30. package/esm/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +1 -0
  31. package/esm/PickersTextField/PickersTextField.js +4 -1
  32. package/esm/index.d.ts +1 -0
  33. package/esm/index.js +2 -1
  34. package/esm/themeAugmentation/components.d.ts +4 -0
  35. package/esm/themeAugmentation/overrides.d.ts +2 -0
  36. package/esm/themeAugmentation/props.d.ts +2 -0
  37. package/index.d.ts +1 -0
  38. package/index.js +13 -1
  39. package/package.json +3 -3
  40. package/themeAugmentation/components.d.ts +4 -0
  41. package/themeAugmentation/overrides.d.ts +2 -0
  42. package/themeAugmentation/props.d.ts +2 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,193 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.5.3
9
+
10
+ _Jun 19, 2025_
11
+
12
+ We'd like to extend a big thank you to the 10 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📚 Documentation improvements
15
+ - 🐞 Bugfixes
16
+
17
+ Special thanks go out to the community members for their valuable contributions:
18
+ @alisasanib, @arminmeh, @sai6855
19
+
20
+ The following are all team members who have contributed to this release:
21
+ @alexfauquette, @bernardobelchior, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @oliviertassinari
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@8.5.3`
26
+
27
+ - [DataGrid] Fix export menu button tooltip being interactive when menu is open (#18327) @bernardobelchior
28
+ - [DataGrid] Fix column menu scroll close (#18065) @alisasanib
29
+ - [DataGrid] Fix page size issue with data source (#18419) @MBilalShafi
30
+
31
+ #### `@mui/x-data-grid-pro@8.5.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
32
+
33
+ Same changes as in `@mui/x-data-grid@8.5.3`, plus:
34
+
35
+ - [DataGridPro] Ignore missing `rowCount` response when new children are fetched with the data source (#17711) @arminmeh
36
+
37
+ #### `@mui/x-data-grid-premium@8.5.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
38
+
39
+ Same changes as in `@mui/x-data-grid-pro@8.5.3`.
40
+
41
+ ### Date and Time Pickers
42
+
43
+ #### `@mui/x-date-pickers@8.5.3`
44
+
45
+ - [pickers] Add `inputSizeSmall` to classes interface (#18242) @sai6855
46
+
47
+ #### `@mui/x-date-pickers-pro@8.5.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
48
+
49
+ Same changes as in `@mui/x-date-pickers@8.5.3`.
50
+
51
+ ### Charts
52
+
53
+ #### `@mui/x-charts@8.5.3`
54
+
55
+ - [charts] Add item class to list item around each series in legend (#18411) @bernardobelchior
56
+ - [charts] Allow `tabIndex` in surface and legend (#18344) @JCQuintas
57
+ - [charts] Explore selector typing (#18362) @alexfauquette
58
+ - [charts] Fix highlight with number ids (#18423) @alexfauquette
59
+ - [charts] Make scatter chart use data attributes (#18048) @alexfauquette
60
+
61
+ #### `@mui/x-charts-pro@8.5.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
62
+
63
+ Same changes as in `@mui/x-charts@8.5.3`, plus:
64
+
65
+ - [charts-pro] Add data-series to elements of funnel chart (#18067) @JCQuintas
66
+ - [charts-pro] Hide values outside minStart and maxEnd in zoom slider (#18336) @bernardobelchior
67
+ - [charts-pro] Fix `FunnelChart` label positioning with different curves (#18354) @JCQuintas
68
+
69
+ ### Tree View
70
+
71
+ #### `@mui/x-tree-view@8.5.3`
72
+
73
+ Internal changes.
74
+
75
+ #### `@mui/x-tree-view-pro@8.5.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
76
+
77
+ Same changes as in `@mui/x-tree-view@8.5.3`.
78
+
79
+ ### Codemod
80
+
81
+ #### `@mui/x-codemod@8.5.3`
82
+
83
+ Internal changes.
84
+
85
+ ### Docs
86
+
87
+ - [docs] Fix 404 in charts docs (#18440) @alexfauquette
88
+ - [docs][pickers] Fix adapter version resolving when opening demo to edit (#18363) @LukasTy
89
+
90
+ ### Core
91
+
92
+ - [core] Fix pnpm valelint error (#18420) @oliviertassinari
93
+
94
+ ### Miscellaneous
95
+
96
+ - [code-infra] Add back a `Playwright` renovate group (#18397) @LukasTy
97
+ - [code-infra] Setup `CODEOWNERS` for charts repositories (#18418) @JCQuintas
98
+ - [code-infra] Strengthen `URL` usage for test config (#18444) @LukasTy
99
+ - [code-infra] Use `vitest` bundled types (#17758) @JCQuintas
100
+ - [infra] Stabilise tests by removing babel and plugins from vitest (#18341) @JCQuintas
101
+ - [infra] Add automated release PR creation script (#18345) @michelengelen
102
+
103
+ ## 8.5.2
104
+
105
+ _Jun 12, 2025_
106
+
107
+ We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
108
+
109
+ - 📊 Improve Data Grid selectors performance
110
+ - 🐞 Fix `useSyncExternalStore` import error in React 17
111
+
112
+ Special thanks go out to the community members for their valuable contributions:
113
+ @alisasanib, @noobyogi0010.
114
+
115
+ The following are all team members who have contributed to this release:
116
+ @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @JCQuintas, @KenanYusuf, @LukasTy, @mapache-salvaje, @michelengelen, @noraleonte, @oliviertassinari, @prakhargupta1, @romgrk.
117
+
118
+ ### Data Grid
119
+
120
+ #### `@mui/x-data-grid@8.5.2`
121
+
122
+ - [DataGrid] Improve selectors performance (#18234) @romgrk
123
+ - [DataGrid] Fix data grid palette when using CSS vars (#18310) @KenanYusuf
124
+ - [DataGrid] Ignore data source request if the grid got unmounted (#18268) @arminmeh
125
+
126
+ #### `@mui/x-data-grid-pro@8.5.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
127
+
128
+ Same changes as in `@mui/x-data-grid@8.5.2`, plus:
129
+
130
+ - [DataGridPro] Fix flex column width if it is a pinned column (#18293) @alisasanib
131
+ - [DataGridPro] Fix inconsistent filtering results with aggregation (#17954) @cherniavskii
132
+
133
+ #### `@mui/x-data-grid-premium@8.5.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
134
+
135
+ Same changes as in `@mui/x-data-grid-pro@8.5.2`.
136
+
137
+ ### Date and Time Pickers
138
+
139
+ #### `@mui/x-date-pickers@8.5.2`
140
+
141
+ - [pickers] Add `PickerDay2` and `DateRangePickerDay2` components (#15921) @noraleonte
142
+ - [pickers] Fix `hiddenLabel` prop propagation (#18195) @noobyogi0010
143
+
144
+ #### `@mui/x-date-pickers-pro@8.5.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
145
+
146
+ Same changes as in `@mui/x-date-pickers@8.5.2`.
147
+
148
+ ### Charts
149
+
150
+ #### `@mui/x-charts@8.5.2`
151
+
152
+ - [charts] Add a default value formatter for continuous scales (#18178) @bernardobelchior
153
+ - [charts] Add margin-bottom to charts toolbar (#18326) @bernardobelchior
154
+ - [charts] Fix grid with band scale (#18295) @alexfauquette
155
+ - [charts] Remove unnecessary style changes in tests (#18317) @JCQuintas
156
+ - [charts] Remove `sx` prop merging from `useComponentRenderer` (#18235) @bernardobelchior
157
+ - [charts] Fix `useSyncExternalStore` import error in React 17 (#18314) @bernardobelchior
158
+
159
+ #### `@mui/x-charts-pro@8.5.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
160
+
161
+ Same changes as in `@mui/x-charts@8.5.2`, plus:
162
+
163
+ - [charts-pro] Document zoom slider tooltip value formatting (#18261) @bernardobelchior
164
+ - [charts-pro] Funnel `gap` prop does not impact the drawing area (#18233) @JCQuintas
165
+ - [charts-pro] Use `ChartsToolbarPro` types in pro charts (#18243) @bernardobelchior
166
+
167
+ ### Tree View
168
+
169
+ #### `@mui/x-tree-view@8.5.2`
170
+
171
+ - [tree-view] Fix `useSyncExternalStore` import error in React 17 (#18314) @bernardobelchior
172
+
173
+ #### `@mui/x-tree-view-pro@8.5.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
174
+
175
+ Same changes as in `@mui/x-tree-view@8.5.2`.
176
+
177
+ ### Docs
178
+
179
+ - [docs] Add toolbar custom trigger and panel recipe (#18297) @KenanYusuf
180
+ - [docs] Copyedit the Priority support page (#18311) @mapache-salvaje
181
+ - [docs] Remove confusing opt-out mention in telemetry docs (#18257) @prakhargupta1
182
+ - [docs] Revise the Master Detail doc (#17927) @mapache-salvaje
183
+ - [docs] Revise the list view doc (#17928) @mapache-salvaje
184
+ - [docs] Audit and revise the Pro column docs (#17844) @mapache-salvaje
185
+ - [docs] Add some more context on Heatmap (#18256) @oliviertassinari
186
+ - [x-telemetry] Reduce Telemetry overhead (#18292) @oliviertassinari
187
+ - [code-infra] Align Node version used in CI to v22 (#18319) @LukasTy
188
+ - [code-infra] Fix pkg.pr.new publishing (#18316) @bernardobelchior
189
+ - [code-infra] Revert `React` to `19.0.0` (#18265) @LukasTy
190
+ - [code-infra] Use `catalog` for reused dependencies (#18302) @LukasTy
191
+ - [infra] Remove unused karma/mocha deps and files (#18340) @JCQuintas
192
+ - [infra] Update GitHub label references to use 'scope' instead of 'component' (#18260) @michelengelen
193
+ - [infra] Use a single browser server in CI (#18230) @JCQuintas
194
+
8
195
  ## 8.5.1
9
196
 
10
197
  <!-- generated comparing v8.5.0..master -->
@@ -97,15 +284,6 @@ Same changes as in `@mui/x-tree-view@8.5.1`.
97
284
 
98
285
  ### Core
99
286
 
100
- - chore(deps): bump @next/eslint-plugin-next to 15.3.3 (#18155) @renovate[bot]
101
- - chore(deps): bump @types/lodash to ^4.17.17 (#17990) @renovate[bot]
102
- - chore(deps): bump babel (#18157) @renovate[bot]
103
- - chore(deps): bump eslint to ^9.28.0 (#17352) @renovate[bot]
104
- - chore(deps): bump material ui (#17802) @renovate[bot]
105
- - chore(deps): bump next to ^15.3.3 (#18159) @renovate[bot]
106
- - chore(deps): bump ossf/scorecard-action action to v2.4.2 (#18160) @renovate[bot]
107
- - chore(deps): bump react-router to ^7.6.1 (#18162) @renovate[bot]
108
- - chore(deps): bump yargs to ^18.0.0 (#18169) @renovate[bot]
109
287
  - [code-infra] Different approach to console testing for `processRowUpdate` (#18213) @JCQuintas
110
288
  - [code-infra] Fix act warnings in DataGrid/toolbar (#18207) @JCQuintas
111
289
  - [code-infra] Remove `istanbul` references (#18194) @JCQuintas
@@ -4549,7 +4727,6 @@ No changes since `@mui/x-charts@7.22.2`.
4549
4727
  - [docs] Add `next` version links (#15423) @LukasTy
4550
4728
  - [docs] Use the `loading` state in the demos (#15538) @cherniavskii
4551
4729
  - [docs] Add data caching to lazy loaded detail panel demo (#15506) @cherniavskii
4552
-
4553
4730
  - [code-infra] Tentative fix for Argos flaky screenshot tests (#15399) @JCQuintas
4554
4731
  - [docs-infra] Transpile `.ts` demo files (#15421) @KenanYusuf
4555
4732
  - [core] Clarify release version bump strategy (#15536) @cherniavskii
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { PickerDay2Props } from "./PickerDay2.types.js";
3
+ type PickerDay2Component = ((props: PickerDay2Props & React.RefAttributes<HTMLButtonElement>) => React.JSX.Element) & {
4
+ propTypes?: any;
5
+ };
6
+ export declare const PickerDay2: PickerDay2Component;
7
+ export {};
@@ -0,0 +1,369 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.PickerDay2 = void 0;
9
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _clsx = _interopRequireDefault(require("clsx"));
14
+ var _styles = require("@mui/material/styles");
15
+ var _ButtonBase = _interopRequireDefault(require("@mui/material/ButtonBase"));
16
+ var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
17
+ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
18
+ var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
19
+ var _dimensions = require("../internals/constants/dimensions");
20
+ var _pickerDay2Classes = require("./pickerDay2Classes");
21
+ var _useUtils = require("../internals/hooks/useUtils");
22
+ var _usePickerDayOwnerState = require("../PickersDay/usePickerDayOwnerState");
23
+ var _jsxRuntime = require("react/jsx-runtime");
24
+ const _excluded = ["autoFocus", "className", "classes", "hidden", "isAnimating", "onClick", "onDaySelect", "onFocus", "onBlur", "onKeyDown", "onMouseDown", "onMouseEnter", "children", "isFirstVisibleCell", "isLastVisibleCell", "day", "selected", "disabled", "today", "outsideCurrentMonth", "disableMargin", "disableHighlightToday", "showDaysOutsideCurrentMonth", "isVisuallySelected"];
25
+ const useUtilityClasses = (ownerState, classes) => {
26
+ const {
27
+ isDaySelected,
28
+ disableHighlightToday,
29
+ isDayCurrent,
30
+ isDayDisabled,
31
+ isDayOutsideMonth,
32
+ isDayFillerCell
33
+ } = ownerState;
34
+ const slots = {
35
+ root: ['root', isDaySelected && !isDayFillerCell && 'selected', isDayDisabled && 'disabled', !disableHighlightToday && isDayCurrent && !isDaySelected && !isDayFillerCell && 'today', isDayOutsideMonth && 'dayOutsideMonth', isDayFillerCell && 'fillerCell']
36
+ };
37
+ return (0, _composeClasses.default)(slots, _pickerDay2Classes.getPickerDay2UtilityClass, classes);
38
+ };
39
+ const PickerDay2Root = (0, _styles.styled)(_ButtonBase.default, {
40
+ name: 'MuiPickerDay2',
41
+ slot: 'Root',
42
+ overridesResolver: (props, styles) => {
43
+ const {
44
+ ownerState
45
+ } = props;
46
+ return [styles.root, !ownerState.disableHighlightToday && ownerState.isDayCurrent && styles.today, !ownerState.isDayOutsideMonth && styles.dayOutsideMonth, ownerState.isDayFillerCell && styles.fillerCell];
47
+ }
48
+ })(({
49
+ theme
50
+ }) => (0, _extends2.default)({
51
+ '--PickerDay-horizontalMargin': `${_dimensions.DAY_MARGIN}px`,
52
+ '--PickerDay-size': `${_dimensions.DAY_SIZE}px`
53
+ }, theme.typography.caption, {
54
+ width: 'var(--PickerDay-size)',
55
+ height: 'var(--PickerDay-size)',
56
+ borderRadius: 'calc(var(--PickerDay-size) / 2)',
57
+ padding: 0,
58
+ // explicitly setting to `transparent` to avoid potentially getting impacted by change from the overridden component
59
+ backgroundColor: 'transparent',
60
+ transition: theme.transitions.create('background-color', {
61
+ duration: theme.transitions.duration.short
62
+ }),
63
+ color: (theme.vars || theme).palette.text.primary,
64
+ '@media (pointer: fine)': {
65
+ '&:hover': {
66
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _styles.alpha)(theme.palette.primary.main, theme.palette.action.hoverOpacity)
67
+ }
68
+ },
69
+ '&:focus': {
70
+ 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)
71
+ },
72
+ marginLeft: 'var(--PickerDay-horizontalMargin)',
73
+ marginRight: 'var(--PickerDay-horizontalMargin)',
74
+ variants: [{
75
+ props: {
76
+ isDaySelected: true
77
+ },
78
+ style: {
79
+ color: (theme.vars || theme).palette.primary.contrastText,
80
+ backgroundColor: (theme.vars || theme).palette.primary.main,
81
+ fontWeight: theme.typography.fontWeightMedium,
82
+ '&:focus, &:hover': {
83
+ willChange: 'background-color',
84
+ backgroundColor: (theme.vars || theme).palette.primary.dark
85
+ },
86
+ [`&.${_pickerDay2Classes.pickerDay2Classes.disabled}`]: {
87
+ opacity: 0.6
88
+ }
89
+ }
90
+ }, {
91
+ props: {
92
+ isDayDisabled: true
93
+ },
94
+ style: {
95
+ color: (theme.vars || theme).palette.text.disabled
96
+ }
97
+ }, {
98
+ props: {
99
+ isDayFillerCell: true
100
+ },
101
+ style: {
102
+ // visibility: 'hidden' does not work here as it hides the element from screen readers
103
+ // and results in unexpected relationships between week day and day columns.
104
+ opacity: 0,
105
+ pointerEvents: 'none'
106
+ }
107
+ }, {
108
+ props: {
109
+ isDayOutsideMonth: true
110
+ },
111
+ style: {
112
+ color: (theme.vars || theme).palette.text.secondary
113
+ }
114
+ }, {
115
+ props: {
116
+ isDayCurrent: true,
117
+ isDaySelected: false
118
+ },
119
+ style: {
120
+ outline: `1px solid ${(theme.vars || theme).palette.text.secondary}`,
121
+ outlineOffset: -1
122
+ }
123
+ }]
124
+ }));
125
+ const noop = () => {};
126
+ const PickerDay2Raw = /*#__PURE__*/React.forwardRef(function PickerDay2(inProps, forwardedRef) {
127
+ const props = (0, _styles.useThemeProps)({
128
+ props: inProps,
129
+ name: 'MuiPickerDay2'
130
+ });
131
+ const utils = (0, _useUtils.useUtils)();
132
+ const {
133
+ autoFocus = false,
134
+ className,
135
+ classes: classesProp,
136
+ isAnimating,
137
+ onClick,
138
+ onDaySelect,
139
+ onFocus = noop,
140
+ onBlur = noop,
141
+ onKeyDown = noop,
142
+ onMouseDown = noop,
143
+ onMouseEnter = noop,
144
+ children,
145
+ day,
146
+ selected,
147
+ disabled,
148
+ today,
149
+ outsideCurrentMonth,
150
+ disableMargin,
151
+ disableHighlightToday,
152
+ showDaysOutsideCurrentMonth
153
+ } = props,
154
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
155
+ const pickersDayOwnerState = (0, _usePickerDayOwnerState.usePickerDayOwnerState)({
156
+ day,
157
+ selected,
158
+ disabled,
159
+ today,
160
+ outsideCurrentMonth,
161
+ disableMargin,
162
+ disableHighlightToday,
163
+ showDaysOutsideCurrentMonth
164
+ });
165
+ const ownerState = (0, _extends2.default)({}, pickersDayOwnerState, {
166
+ // Properties specific to the MUI implementation (some might be removed in the next major)
167
+ isDayFillerCell: outsideCurrentMonth && !showDaysOutsideCurrentMonth
168
+ });
169
+ const classes = useUtilityClasses(ownerState, classesProp);
170
+ const ref = React.useRef(null);
171
+ const handleRef = (0, _useForkRef.default)(ref, forwardedRef);
172
+
173
+ // Since this is rendered when a Popper is opened we can't use passive effects.
174
+ // Focusing in passive effects in Popper causes scroll jump.
175
+ (0, _useEnhancedEffect.default)(() => {
176
+ if (autoFocus && !disabled && !isAnimating && !outsideCurrentMonth) {
177
+ // ref.current being null would be a bug in MUI
178
+ ref.current.focus();
179
+ }
180
+ }, [autoFocus, disabled, isAnimating, outsideCurrentMonth]);
181
+
182
+ // For a day outside the current month, move the focus from mouseDown to mouseUp
183
+ // Goal: have the onClick ends before sliding to the new month
184
+ const handleMouseDown = event => {
185
+ onMouseDown(event);
186
+ if (outsideCurrentMonth) {
187
+ event.preventDefault();
188
+ }
189
+ };
190
+ const handleClick = event => {
191
+ if (!disabled) {
192
+ onDaySelect(day);
193
+ }
194
+ if (outsideCurrentMonth) {
195
+ event.currentTarget.focus();
196
+ }
197
+ if (onClick) {
198
+ onClick(event);
199
+ }
200
+ };
201
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(PickerDay2Root, (0, _extends2.default)({
202
+ ref: handleRef,
203
+ centerRipple: true
204
+ // compat with PickersDay for tests
205
+ ,
206
+
207
+ disabled: disabled,
208
+ tabIndex: selected ? 0 : -1,
209
+ onKeyDown: event => onKeyDown(event, day),
210
+ onFocus: event => onFocus(event, day),
211
+ onBlur: event => onBlur(event, day),
212
+ onMouseEnter: event => onMouseEnter(event, day),
213
+ onClick: handleClick,
214
+ onMouseDown: handleMouseDown
215
+ }, other, {
216
+ ownerState: ownerState,
217
+ className: (0, _clsx.default)(classes.root, className),
218
+ children: children ?? (ownerState.isDayFillerCell ? null : utils.format(day, 'dayOfMonth'))
219
+ }));
220
+ });
221
+ if (process.env.NODE_ENV !== "production") PickerDay2Raw.displayName = "PickerDay2Raw";
222
+ process.env.NODE_ENV !== "production" ? PickerDay2Raw.propTypes = {
223
+ // ----------------------------- Warning --------------------------------
224
+ // | These PropTypes are generated from the TypeScript type definitions |
225
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
226
+ // ----------------------------------------------------------------------
227
+ /**
228
+ * A ref for imperative actions.
229
+ * It currently only supports `focusVisible()` action.
230
+ */
231
+ action: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
232
+ current: _propTypes.default.shape({
233
+ focusVisible: _propTypes.default.func.isRequired
234
+ })
235
+ })]),
236
+ /**
237
+ * If `true`, the ripples are centered.
238
+ * They won't start at the cursor interaction position.
239
+ * @default false
240
+ */
241
+ centerRipple: _propTypes.default.bool,
242
+ /**
243
+ * Override or extend the styles applied to the component.
244
+ */
245
+ classes: _propTypes.default.object,
246
+ className: _propTypes.default.string,
247
+ component: _propTypes.default.elementType,
248
+ /**
249
+ * The date to show.
250
+ */
251
+ day: _propTypes.default.object.isRequired,
252
+ /**
253
+ * If `true`, renders as disabled.
254
+ * @default false
255
+ */
256
+ disabled: _propTypes.default.bool,
257
+ /**
258
+ * If `true`, today's date is rendering without highlighting with circle.
259
+ * @default false
260
+ */
261
+ disableHighlightToday: _propTypes.default.bool,
262
+ /**
263
+ * If `true`, days are rendering without margin. Useful for displaying linked range of days.
264
+ * @default false
265
+ */
266
+ disableMargin: _propTypes.default.bool,
267
+ /**
268
+ * If `true`, the ripple effect is disabled.
269
+ *
270
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
271
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
272
+ * @default false
273
+ */
274
+ disableRipple: _propTypes.default.bool,
275
+ /**
276
+ * If `true`, the touch ripple effect is disabled.
277
+ * @default false
278
+ */
279
+ disableTouchRipple: _propTypes.default.bool,
280
+ /**
281
+ * If `true`, the base button will have a keyboard focus ripple.
282
+ * @default false
283
+ */
284
+ focusRipple: _propTypes.default.bool,
285
+ /**
286
+ * This prop can help identify which element has keyboard focus.
287
+ * The class name will be applied when the element gains the focus through keyboard interaction.
288
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
289
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
290
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
291
+ * if needed.
292
+ */
293
+ focusVisibleClassName: _propTypes.default.string,
294
+ isAnimating: _propTypes.default.bool,
295
+ /**
296
+ * If `true`, day is the first visible cell of the month.
297
+ * Either the first day of the month or the first day of the week depending on `showDaysOutsideCurrentMonth`.
298
+ */
299
+ isFirstVisibleCell: _propTypes.default.bool.isRequired,
300
+ /**
301
+ * If `true`, day is the last visible cell of the month.
302
+ * Either the last day of the month or the last day of the week depending on `showDaysOutsideCurrentMonth`.
303
+ */
304
+ isLastVisibleCell: _propTypes.default.bool.isRequired,
305
+ /**
306
+ * Indicates if the day should be visually selected.
307
+ */
308
+ isVisuallySelected: _propTypes.default.bool,
309
+ onBlur: _propTypes.default.func,
310
+ onDaySelect: _propTypes.default.func.isRequired,
311
+ onFocus: _propTypes.default.func,
312
+ /**
313
+ * Callback fired when the component is focused with a keyboard.
314
+ * We trigger a `onFocus` callback too.
315
+ */
316
+ onFocusVisible: _propTypes.default.func,
317
+ onKeyDown: _propTypes.default.func,
318
+ onMouseEnter: _propTypes.default.func,
319
+ /**
320
+ * If `true`, day is outside of month and will be hidden.
321
+ */
322
+ outsideCurrentMonth: _propTypes.default.bool.isRequired,
323
+ /**
324
+ * If `true`, renders as selected.
325
+ * @default false
326
+ */
327
+ selected: _propTypes.default.bool,
328
+ /**
329
+ * If `true`, days outside the current month are rendered:
330
+ *
331
+ * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
332
+ *
333
+ * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
334
+ *
335
+ * - ignored if `calendars` equals more than `1` on range pickers.
336
+ * @default false
337
+ */
338
+ showDaysOutsideCurrentMonth: _propTypes.default.bool,
339
+ style: _propTypes.default.object,
340
+ /**
341
+ * The system prop that allows defining system overrides as well as additional CSS styles.
342
+ */
343
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
344
+ /**
345
+ * @default 0
346
+ */
347
+ tabIndex: _propTypes.default.number,
348
+ /**
349
+ * If `true`, renders as today date.
350
+ * @default false
351
+ */
352
+ today: _propTypes.default.bool,
353
+ /**
354
+ * Props applied to the `TouchRipple` element.
355
+ */
356
+ TouchRippleProps: _propTypes.default.object,
357
+ /**
358
+ * A ref that points to the `TouchRipple` element.
359
+ */
360
+ touchRippleRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
361
+ current: _propTypes.default.shape({
362
+ pulsate: _propTypes.default.func.isRequired,
363
+ start: _propTypes.default.func.isRequired,
364
+ stop: _propTypes.default.func.isRequired
365
+ })
366
+ })])
367
+ } : void 0;
368
+ const PickerDay2 = exports.PickerDay2 = /*#__PURE__*/React.memo(PickerDay2Raw);
369
+ if (process.env.NODE_ENV !== "production") PickerDay2.displayName = "PickerDay2";
@@ -0,0 +1,18 @@
1
+ import { PickerDay2Classes } from "./pickerDay2Classes.js";
2
+ import { PickerDayOwnerState, PickersDayProps } from "../PickersDay/index.js";
3
+ export interface PickerDay2Props extends Omit<PickersDayProps, 'classes'> {
4
+ /**
5
+ * Override or extend the styles applied to the component.
6
+ */
7
+ classes?: Partial<PickerDay2Classes>;
8
+ /**
9
+ * Indicates if the day should be visually selected.
10
+ */
11
+ isVisuallySelected?: boolean;
12
+ }
13
+ export interface PickerDay2OwnerState extends PickerDayOwnerState {
14
+ /**
15
+ * Whether the day is a filler day (its content is hidden).
16
+ */
17
+ isDayFillerCell: boolean;
18
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,4 @@
1
+ export { PickerDay2 } from "./PickerDay2.js";
2
+ export type { PickerDay2Props, PickerDay2OwnerState } from "./PickerDay2.types.js";
3
+ export { getPickerDay2UtilityClass, pickerDay2Classes } from "./pickerDay2Classes.js";
4
+ export type { PickerDay2ClassKey } from "./pickerDay2Classes.js";
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "PickerDay2", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _PickerDay.PickerDay2;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "getPickerDay2UtilityClass", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _pickerDay2Classes.getPickerDay2UtilityClass;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "pickerDay2Classes", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _pickerDay2Classes.pickerDay2Classes;
22
+ }
23
+ });
24
+ var _PickerDay = require("./PickerDay2");
25
+ var _pickerDay2Classes = require("./pickerDay2Classes");
@@ -0,0 +1,17 @@
1
+ export interface PickerDay2Classes {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `outsideCurrentMonth=true` and `showDaysOutsideCurrentMonth=true`. */
5
+ dayOutsideMonth: string;
6
+ /** Styles applied to the root element if `outsideCurrentMonth=true` and `showDaysOutsideCurrentMonth=false`. */
7
+ fillerCell: string;
8
+ /** Styles applied to the root element if `disableHighlightToday=false` and `today=true`. */
9
+ today: string;
10
+ /** State class applied to the root element if `selected=true`. */
11
+ selected: string;
12
+ /** State class applied to the root element if `disabled=true`. */
13
+ disabled: string;
14
+ }
15
+ export type PickerDay2ClassKey = keyof PickerDay2Classes;
16
+ export declare function getPickerDay2UtilityClass(slot: string): string;
17
+ export declare const pickerDay2Classes: Record<keyof PickerDay2Classes, string>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getPickerDay2UtilityClass = getPickerDay2UtilityClass;
8
+ exports.pickerDay2Classes = void 0;
9
+ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
10
+ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
11
+ function getPickerDay2UtilityClass(slot) {
12
+ return (0, _generateUtilityClass.default)('MuiPickerDay2', slot);
13
+ }
14
+ const pickerDay2Classes = exports.pickerDay2Classes = (0, _generateUtilityClasses.default)('MuiPickerDay2', ['root', 'dayOutsideMonth', 'today', 'selected', 'disabled', 'fillerCell']);