@mui/material 9.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.mts +2 -2
- package/Accordion/Accordion.d.ts +2 -2
- package/Accordion/Accordion.js +3 -2
- package/Accordion/Accordion.mjs +3 -2
- package/AccordionSummary/AccordionSummary.js +27 -29
- package/AccordionSummary/AccordionSummary.mjs +27 -29
- package/Autocomplete/Autocomplete.js +8 -6
- package/Autocomplete/Autocomplete.mjs +8 -6
- package/Backdrop/Backdrop.d.mts +2 -2
- package/Backdrop/Backdrop.d.ts +2 -2
- package/Badge/Badge.js +28 -24
- package/Badge/Badge.mjs +28 -24
- package/BottomNavigationAction/BottomNavigationAction.js +6 -2
- package/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
- package/Button/Button.js +11 -15
- package/Button/Button.mjs +11 -15
- package/ButtonBase/Ripple.js +21 -11
- package/ButtonBase/Ripple.mjs +21 -11
- package/ButtonBase/TouchRipple.js +252 -116
- package/ButtonBase/TouchRipple.mjs +253 -117
- package/CHANGELOG.md +84 -0
- package/CardActionArea/CardActionArea.js +2 -1
- package/CardActionArea/CardActionArea.mjs +2 -1
- package/Chip/Chip.js +2 -1
- package/Chip/Chip.mjs +2 -1
- package/CircularProgress/CircularProgress.js +85 -55
- package/CircularProgress/CircularProgress.mjs +84 -55
- package/Collapse/Collapse.d.mts +15 -3
- package/Collapse/Collapse.d.ts +15 -3
- package/Collapse/Collapse.js +44 -31
- package/Collapse/Collapse.mjs +43 -30
- package/Dialog/Dialog.d.mts +2 -2
- package/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.js +2 -0
- package/Dialog/Dialog.mjs +2 -0
- package/Drawer/Drawer.d.mts +2 -2
- package/Drawer/Drawer.d.ts +2 -2
- package/Fab/Fab.js +2 -1
- package/Fab/Fab.mjs +2 -1
- package/Fade/Fade.d.mts +15 -2
- package/Fade/Fade.d.ts +15 -2
- package/Fade/Fade.js +46 -19
- package/Fade/Fade.mjs +45 -18
- package/FilledInput/FilledInput.js +4 -3
- package/FilledInput/FilledInput.mjs +4 -3
- package/Grow/Grow.d.mts +15 -2
- package/Grow/Grow.d.ts +15 -2
- package/Grow/Grow.js +45 -28
- package/Grow/Grow.mjs +44 -27
- package/IconButton/IconButton.js +2 -1
- package/IconButton/IconButton.mjs +2 -1
- package/Input/Input.js +3 -2
- package/Input/Input.mjs +3 -2
- package/InputBase/InputBase.js +2 -1
- package/InputBase/InputBase.mjs +2 -1
- package/InputLabel/InputLabel.js +2 -1
- package/InputLabel/InputLabel.mjs +2 -1
- package/LICENSE +1 -1
- package/LinearProgress/LinearProgress.js +187 -120
- package/LinearProgress/LinearProgress.mjs +186 -120
- package/ListItem/ListItem.js +2 -1
- package/ListItem/ListItem.mjs +2 -1
- package/ListItemButton/ListItemButton.js +2 -1
- package/ListItemButton/ListItemButton.mjs +2 -1
- package/Menu/Menu.d.mts +1 -1
- package/Menu/Menu.d.ts +1 -1
- package/MobileStepper/MobileStepper.js +2 -1
- package/MobileStepper/MobileStepper.mjs +2 -1
- package/OutlinedInput/NotchedOutline.js +4 -3
- package/OutlinedInput/NotchedOutline.mjs +4 -3
- package/PaginationItem/PaginationItem.js +2 -1
- package/PaginationItem/PaginationItem.mjs +2 -1
- package/Paper/Paper.js +2 -1
- package/Paper/Paper.mjs +2 -1
- package/Popover/Popover.d.mts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/README.md +3 -2
- package/Radio/RadioButtonIcon.js +3 -2
- package/Radio/RadioButtonIcon.mjs +3 -2
- package/Rating/Rating.js +2 -1
- package/Rating/Rating.mjs +2 -1
- package/Select/SelectInput.js +115 -25
- package/Select/SelectInput.mjs +115 -25
- package/Select/utils/closedTypeahead.js +73 -0
- package/Select/utils/closedTypeahead.mjs +63 -0
- package/Skeleton/Skeleton.js +22 -2
- package/Skeleton/Skeleton.mjs +22 -2
- package/Slide/Slide.d.mts +15 -2
- package/Slide/Slide.d.ts +15 -2
- package/Slide/Slide.js +53 -25
- package/Slide/Slide.mjs +52 -24
- package/Slider/Slider.js +4 -3
- package/Slider/Slider.mjs +4 -3
- package/Slider/useSlider.js +1 -1
- package/Slider/useSlider.mjs +1 -1
- package/Snackbar/Snackbar.d.mts +2 -2
- package/Snackbar/Snackbar.d.ts +2 -2
- package/SpeedDial/SpeedDial.d.mts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/SpeedDial.js +6 -2
- package/SpeedDial/SpeedDial.mjs +6 -2
- package/SpeedDialAction/SpeedDialAction.js +11 -2
- package/SpeedDialAction/SpeedDialAction.mjs +12 -3
- package/SpeedDialIcon/SpeedDialIcon.js +40 -37
- package/SpeedDialIcon/SpeedDialIcon.mjs +40 -37
- package/Step/Step.js +47 -15
- package/Step/Step.mjs +47 -15
- package/StepButton/StepButton.js +9 -3
- package/StepButton/StepButton.mjs +9 -3
- package/StepConnector/StepConnector.js +10 -0
- package/StepConnector/StepConnector.mjs +10 -0
- package/StepContent/StepContent.d.mts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepContent/StepContent.js +26 -2
- package/StepContent/StepContent.mjs +26 -2
- package/StepIcon/StepIcon.js +2 -1
- package/StepIcon/StepIcon.mjs +2 -1
- package/StepLabel/StepLabel.js +52 -7
- package/StepLabel/StepLabel.mjs +52 -7
- package/Stepper/Stepper.d.mts +2 -0
- package/Stepper/Stepper.d.ts +2 -0
- package/Stepper/Stepper.js +18 -0
- package/Stepper/Stepper.mjs +18 -0
- package/SvgIcon/SvgIcon.js +2 -1
- package/SvgIcon/SvgIcon.mjs +2 -1
- package/SwipeableDrawer/SwipeableDrawer.js +14 -3
- package/SwipeableDrawer/SwipeableDrawer.mjs +14 -3
- package/Switch/Switch.js +3 -2
- package/Switch/Switch.mjs +3 -2
- package/TableSortLabel/TableSortLabel.js +2 -1
- package/TableSortLabel/TableSortLabel.mjs +2 -1
- package/Tabs/Tabs.js +14 -3
- package/Tabs/Tabs.mjs +14 -3
- package/Tooltip/Tooltip.d.mts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +3 -0
- package/Tooltip/Tooltip.mjs +3 -0
- package/Unstable_TrapFocus/FocusTrap.js +42 -8
- package/Unstable_TrapFocus/FocusTrap.mjs +42 -8
- package/Zoom/Zoom.d.mts +15 -2
- package/Zoom/Zoom.d.ts +15 -2
- package/Zoom/Zoom.js +43 -16
- package/Zoom/Zoom.mjs +42 -15
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internal/Transition.d.mts +34 -0
- package/internal/Transition.d.ts +34 -0
- package/internal/Transition.js +444 -0
- package/internal/Transition.mjs +436 -0
- package/internal/react-transition-group.d.mts +8 -0
- package/internal/react-transition-group.d.ts +8 -0
- package/package.json +6 -6
- package/styles/createMotion.d.mts +8 -0
- package/styles/createMotion.d.ts +8 -0
- package/styles/createMotion.js +13 -0
- package/styles/createMotion.mjs +7 -0
- package/styles/createThemeFoundation.d.mts +2 -0
- package/styles/createThemeFoundation.d.ts +2 -0
- package/styles/createThemeNoVars.d.mts +3 -0
- package/styles/createThemeNoVars.d.ts +3 -0
- package/styles/createThemeNoVars.js +5 -0
- package/styles/createThemeNoVars.mjs +5 -0
- package/styles/createTransitions.d.mts +6 -2
- package/styles/createTransitions.d.ts +6 -2
- package/styles/createTransitions.js +12 -4
- package/styles/createTransitions.mjs +12 -4
- package/styles/enhanceHighContrast.d.mts +70 -0
- package/styles/enhanceHighContrast.d.ts +70 -0
- package/styles/enhanceHighContrast.js +502 -0
- package/styles/enhanceHighContrast.mjs +495 -0
- package/styles/index.d.mts +2 -0
- package/styles/index.d.ts +2 -0
- package/styles/index.js +8 -0
- package/styles/index.mjs +1 -0
- package/styles/reducedMotion.d.mts +7 -0
- package/styles/reducedMotion.d.ts +7 -0
- package/styles/reducedMotion.js +21 -0
- package/styles/reducedMotion.mjs +14 -0
- package/styles/shouldSkipGeneratingVar.js +1 -1
- package/styles/shouldSkipGeneratingVar.mjs +1 -1
- package/styles/stringifyTheme.js +1 -0
- package/styles/stringifyTheme.mjs +1 -0
- package/transitions/index.d.mts +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/index.js +0 -11
- package/transitions/index.mjs +1 -1
- package/transitions/transition.d.mts +1 -12
- package/transitions/transition.d.ts +1 -12
- package/transitions/types.d.mts +73 -0
- package/transitions/types.d.ts +73 -0
- package/transitions/useReducedMotion.d.mts +14 -0
- package/transitions/useReducedMotion.d.ts +14 -0
- package/transitions/useReducedMotion.js +117 -0
- package/transitions/useReducedMotion.mjs +110 -0
- package/transitions/utils.d.mts +34 -2
- package/transitions/utils.d.ts +34 -2
- package/transitions/utils.js +33 -4
- package/transitions/utils.mjs +31 -4
- package/useAutocomplete/useAutocomplete.d.mts +8 -1
- package/useAutocomplete/useAutocomplete.d.ts +8 -1
- package/useAutocomplete/useAutocomplete.js +66 -4
- package/useAutocomplete/useAutocomplete.mjs +66 -4
- package/version/index.js +3 -3
- package/version/index.mjs +3 -3
- /package/transitions/{transition.js → types.js} +0 -0
- /package/transitions/{transition.mjs → types.mjs} +0 -0
package/StepLabel/StepLabel.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import memoTheme from "../utils/memoTheme.mjs";
|
|
|
12
12
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
13
13
|
import stepLabelClasses, { getStepLabelUtilityClass } from "./stepLabelClasses.mjs";
|
|
14
14
|
import useSlot from "../utils/useSlot.mjs";
|
|
15
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
15
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
const useUtilityClasses = ownerState => {
|
|
17
18
|
const {
|
|
@@ -43,9 +44,6 @@ const StepLabelRoot = styled('span', {
|
|
|
43
44
|
})({
|
|
44
45
|
display: 'flex',
|
|
45
46
|
alignItems: 'center',
|
|
46
|
-
[`&.${stepLabelClasses.alternativeLabel}`]: {
|
|
47
|
-
flexDirection: 'column'
|
|
48
|
-
},
|
|
49
47
|
[`&.${stepLabelClasses.disabled}`]: {
|
|
50
48
|
cursor: 'default'
|
|
51
49
|
},
|
|
@@ -57,6 +55,21 @@ const StepLabelRoot = styled('span', {
|
|
|
57
55
|
textAlign: 'left',
|
|
58
56
|
padding: '8px 0'
|
|
59
57
|
}
|
|
58
|
+
}, {
|
|
59
|
+
props: {
|
|
60
|
+
alternativeLabel: true
|
|
61
|
+
},
|
|
62
|
+
style: {
|
|
63
|
+
flexDirection: 'column'
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
props: {
|
|
67
|
+
orientation: 'vertical',
|
|
68
|
+
alternativeLabel: true
|
|
69
|
+
},
|
|
70
|
+
style: {
|
|
71
|
+
flexDirection: 'row-reverse'
|
|
72
|
+
}
|
|
60
73
|
}]
|
|
61
74
|
});
|
|
62
75
|
const StepLabelLabel = styled('span', {
|
|
@@ -67,7 +80,7 @@ const StepLabelLabel = styled('span', {
|
|
|
67
80
|
}) => ({
|
|
68
81
|
...theme.typography.body2,
|
|
69
82
|
display: 'block',
|
|
70
|
-
|
|
83
|
+
...getTransitionStyles(theme, 'color', {
|
|
71
84
|
duration: theme.transitions.duration.shortest
|
|
72
85
|
}),
|
|
73
86
|
[`&.${stepLabelClasses.active}, &.${stepLabelClasses.completed}`]: {
|
|
@@ -79,7 +92,18 @@ const StepLabelLabel = styled('span', {
|
|
|
79
92
|
},
|
|
80
93
|
[`&.${stepLabelClasses.error}`]: {
|
|
81
94
|
color: (theme.vars || theme).palette.error.main
|
|
82
|
-
}
|
|
95
|
+
},
|
|
96
|
+
variants: [{
|
|
97
|
+
props: {
|
|
98
|
+
orientation: 'vertical',
|
|
99
|
+
alternativeLabel: true
|
|
100
|
+
},
|
|
101
|
+
style: {
|
|
102
|
+
[`&.${stepLabelClasses.alternativeLabel}`]: {
|
|
103
|
+
marginTop: 0
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}]
|
|
83
107
|
})));
|
|
84
108
|
const StepLabelIconContainer = styled('span', {
|
|
85
109
|
name: 'MuiStepLabel',
|
|
@@ -90,7 +114,17 @@ const StepLabelIconContainer = styled('span', {
|
|
|
90
114
|
paddingRight: 8,
|
|
91
115
|
[`&.${stepLabelClasses.alternativeLabel}`]: {
|
|
92
116
|
paddingRight: 0
|
|
93
|
-
}
|
|
117
|
+
},
|
|
118
|
+
variants: [{
|
|
119
|
+
props: {
|
|
120
|
+
orientation: 'vertical',
|
|
121
|
+
alternativeLabel: true
|
|
122
|
+
},
|
|
123
|
+
style: {
|
|
124
|
+
paddingRight: 0,
|
|
125
|
+
paddingLeft: 8
|
|
126
|
+
}
|
|
127
|
+
}]
|
|
94
128
|
});
|
|
95
129
|
const StepLabelLabelContainer = styled('span', {
|
|
96
130
|
name: 'MuiStepLabel',
|
|
@@ -102,7 +136,18 @@ const StepLabelLabelContainer = styled('span', {
|
|
|
102
136
|
color: (theme.vars || theme).palette.text.secondary,
|
|
103
137
|
[`&.${stepLabelClasses.alternativeLabel}`]: {
|
|
104
138
|
textAlign: 'center'
|
|
105
|
-
}
|
|
139
|
+
},
|
|
140
|
+
variants: [{
|
|
141
|
+
props: {
|
|
142
|
+
orientation: 'vertical',
|
|
143
|
+
alternativeLabel: true
|
|
144
|
+
},
|
|
145
|
+
style: {
|
|
146
|
+
[`&.${stepLabelClasses.alternativeLabel}`]: {
|
|
147
|
+
textAlign: 'right'
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}]
|
|
106
151
|
})));
|
|
107
152
|
const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
|
|
108
153
|
const props = useDefaultProps({
|
package/Stepper/Stepper.d.mts
CHANGED
|
@@ -15,6 +15,8 @@ export interface StepperOwnProps extends Pick<PaperProps, 'elevation' | 'square'
|
|
|
15
15
|
/**
|
|
16
16
|
* If set to 'true' and orientation is horizontal,
|
|
17
17
|
* then the step label will be positioned under the icon.
|
|
18
|
+
* If set to 'true' and orientation is vertical,
|
|
19
|
+
* it reverses the position of the label and content.
|
|
18
20
|
* @default false
|
|
19
21
|
*/
|
|
20
22
|
alternativeLabel?: boolean | undefined;
|
package/Stepper/Stepper.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export interface StepperOwnProps extends Pick<PaperProps, 'elevation' | 'square'
|
|
|
15
15
|
/**
|
|
16
16
|
* If set to 'true' and orientation is horizontal,
|
|
17
17
|
* then the step label will be positioned under the icon.
|
|
18
|
+
* If set to 'true' and orientation is vertical,
|
|
19
|
+
* it reverses the position of the label and content.
|
|
18
20
|
* @default false
|
|
19
21
|
*/
|
|
20
22
|
alternativeLabel?: boolean | undefined;
|
package/Stepper/Stepper.js
CHANGED
|
@@ -55,6 +55,14 @@ const StepperRoot = (0, _zeroStyled.styled)('ol', {
|
|
|
55
55
|
flexDirection: 'row',
|
|
56
56
|
alignItems: 'center'
|
|
57
57
|
}
|
|
58
|
+
}, {
|
|
59
|
+
props: {
|
|
60
|
+
orientation: 'horizontal',
|
|
61
|
+
alternativeLabel: false
|
|
62
|
+
},
|
|
63
|
+
style: {
|
|
64
|
+
gap: 8
|
|
65
|
+
}
|
|
58
66
|
}, {
|
|
59
67
|
props: {
|
|
60
68
|
orientation: 'vertical'
|
|
@@ -69,6 +77,14 @@ const StepperRoot = (0, _zeroStyled.styled)('ol', {
|
|
|
69
77
|
style: {
|
|
70
78
|
alignItems: 'flex-start'
|
|
71
79
|
}
|
|
80
|
+
}, {
|
|
81
|
+
props: {
|
|
82
|
+
orientation: 'vertical',
|
|
83
|
+
alternativeLabel: true
|
|
84
|
+
},
|
|
85
|
+
style: {
|
|
86
|
+
alignItems: 'flex-end'
|
|
87
|
+
}
|
|
72
88
|
}]
|
|
73
89
|
});
|
|
74
90
|
const defaultConnector = /*#__PURE__*/(0, _jsxRuntime.jsx)(_StepConnector.default, {});
|
|
@@ -200,6 +216,8 @@ process.env.NODE_ENV !== "production" ? Stepper.propTypes /* remove-proptypes */
|
|
|
200
216
|
/**
|
|
201
217
|
* If set to 'true' and orientation is horizontal,
|
|
202
218
|
* then the step label will be positioned under the icon.
|
|
219
|
+
* If set to 'true' and orientation is vertical,
|
|
220
|
+
* it reverses the position of the label and content.
|
|
203
221
|
* @default false
|
|
204
222
|
*/
|
|
205
223
|
alternativeLabel: _propTypes.default.bool,
|
package/Stepper/Stepper.mjs
CHANGED
|
@@ -48,6 +48,14 @@ const StepperRoot = styled('ol', {
|
|
|
48
48
|
flexDirection: 'row',
|
|
49
49
|
alignItems: 'center'
|
|
50
50
|
}
|
|
51
|
+
}, {
|
|
52
|
+
props: {
|
|
53
|
+
orientation: 'horizontal',
|
|
54
|
+
alternativeLabel: false
|
|
55
|
+
},
|
|
56
|
+
style: {
|
|
57
|
+
gap: 8
|
|
58
|
+
}
|
|
51
59
|
}, {
|
|
52
60
|
props: {
|
|
53
61
|
orientation: 'vertical'
|
|
@@ -62,6 +70,14 @@ const StepperRoot = styled('ol', {
|
|
|
62
70
|
style: {
|
|
63
71
|
alignItems: 'flex-start'
|
|
64
72
|
}
|
|
73
|
+
}, {
|
|
74
|
+
props: {
|
|
75
|
+
orientation: 'vertical',
|
|
76
|
+
alternativeLabel: true
|
|
77
|
+
},
|
|
78
|
+
style: {
|
|
79
|
+
alignItems: 'flex-end'
|
|
80
|
+
}
|
|
65
81
|
}]
|
|
66
82
|
});
|
|
67
83
|
const defaultConnector = /*#__PURE__*/_jsx(StepConnector, {});
|
|
@@ -193,6 +209,8 @@ process.env.NODE_ENV !== "production" ? Stepper.propTypes /* remove-proptypes */
|
|
|
193
209
|
/**
|
|
194
210
|
* If set to 'true' and orientation is horizontal,
|
|
195
211
|
* then the step label will be positioned under the icon.
|
|
212
|
+
* If set to 'true' and orientation is vertical,
|
|
213
|
+
* it reverses the position of the label and content.
|
|
196
214
|
* @default false
|
|
197
215
|
*/
|
|
198
216
|
alternativeLabel: PropTypes.bool,
|
package/SvgIcon/SvgIcon.js
CHANGED
|
@@ -16,6 +16,7 @@ var _zeroStyled = require("../zero-styled");
|
|
|
16
16
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
17
17
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
18
18
|
var _svgIconClasses = require("./svgIconClasses");
|
|
19
|
+
var _utils = require("../transitions/utils");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
const useUtilityClasses = ownerState => {
|
|
21
22
|
const {
|
|
@@ -45,7 +46,7 @@ const SvgIconRoot = (0, _zeroStyled.styled)('svg', {
|
|
|
45
46
|
height: '1em',
|
|
46
47
|
display: 'inline-block',
|
|
47
48
|
flexShrink: 0,
|
|
48
|
-
|
|
49
|
+
...(0, _utils.getTransitionStyles)(theme, 'fill', {
|
|
49
50
|
duration: (theme.vars ?? theme).transitions?.duration?.shorter
|
|
50
51
|
}),
|
|
51
52
|
variants: [{
|
package/SvgIcon/SvgIcon.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { styled } from "../zero-styled/index.mjs";
|
|
|
9
9
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
10
10
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
11
11
|
import { getSvgIconUtilityClass } from "./svgIconClasses.mjs";
|
|
12
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
12
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
14
|
const useUtilityClasses = ownerState => {
|
|
14
15
|
const {
|
|
@@ -38,7 +39,7 @@ const SvgIconRoot = styled('svg', {
|
|
|
38
39
|
height: '1em',
|
|
39
40
|
display: 'inline-block',
|
|
40
41
|
flexShrink: 0,
|
|
41
|
-
|
|
42
|
+
...getTransitionStyles(theme, 'fill', {
|
|
42
43
|
duration: (theme.vars ?? theme).transitions?.duration?.shorter
|
|
43
44
|
}),
|
|
44
45
|
variants: [{
|
|
@@ -21,6 +21,7 @@ var _useEnhancedEffect = _interopRequireDefault(require("../utils/useEnhancedEff
|
|
|
21
21
|
var _zeroStyled = require("../zero-styled");
|
|
22
22
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
23
23
|
var _utils = require("../transitions/utils");
|
|
24
|
+
var _useReducedMotion = _interopRequireDefault(require("../transitions/useReducedMotion"));
|
|
24
25
|
var _utils2 = require("../utils");
|
|
25
26
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
26
27
|
var _SwipeArea = _interopRequireDefault(require("./SwipeArea"));
|
|
@@ -152,6 +153,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
152
153
|
slotProps = {},
|
|
153
154
|
...other
|
|
154
155
|
} = props;
|
|
156
|
+
const reducedMotion = (0, _useReducedMotion.default)(theme.motion.reducedMotion, false);
|
|
155
157
|
const [maybeSwiping, setMaybeSwiping] = React.useState(false);
|
|
156
158
|
const swipeInstance = React.useRef({
|
|
157
159
|
isSwiping: null
|
|
@@ -184,13 +186,22 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
184
186
|
drawerStyle.transform = transform;
|
|
185
187
|
let transition = '';
|
|
186
188
|
if (mode) {
|
|
187
|
-
|
|
189
|
+
const transitionProps = (0, _utils.getTransitionProps)({
|
|
188
190
|
easing: undefined,
|
|
189
191
|
style: undefined,
|
|
190
192
|
timeout: transitionDuration
|
|
191
193
|
}, {
|
|
192
194
|
mode
|
|
193
|
-
})
|
|
195
|
+
});
|
|
196
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
197
|
+
duration: transitionProps.duration,
|
|
198
|
+
delay: transitionProps.delay
|
|
199
|
+
});
|
|
200
|
+
transition = theme.transitions.create('all', {
|
|
201
|
+
...transitionProps,
|
|
202
|
+
duration: transitionTiming.duration,
|
|
203
|
+
delay: transitionTiming.delay
|
|
204
|
+
});
|
|
194
205
|
}
|
|
195
206
|
if (changeTransition) {
|
|
196
207
|
drawerStyle.transition = transition;
|
|
@@ -202,7 +213,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
202
213
|
backdropStyle.transition = transition;
|
|
203
214
|
}
|
|
204
215
|
}
|
|
205
|
-
}, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);
|
|
216
|
+
}, [anchor, disableBackdropTransition, hideBackdrop, reducedMotion, theme, transitionDuration]);
|
|
206
217
|
const handleBodyTouchEnd = (0, _useEventCallback.default)(nativeEvent => {
|
|
207
218
|
if (!touchDetected.current) {
|
|
208
219
|
return;
|
|
@@ -13,6 +13,7 @@ import useEnhancedEffect from "../utils/useEnhancedEffect.mjs";
|
|
|
13
13
|
import { useTheme } from "../zero-styled/index.mjs";
|
|
14
14
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
15
15
|
import { getTransitionProps } from "../transitions/utils.mjs";
|
|
16
|
+
import useReducedMotion from "../transitions/useReducedMotion.mjs";
|
|
16
17
|
import { mergeSlotProps } from "../utils/index.mjs";
|
|
17
18
|
import useSlot from "../utils/useSlot.mjs";
|
|
18
19
|
import SwipeArea from "./SwipeArea.mjs";
|
|
@@ -145,6 +146,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
145
146
|
slotProps = {},
|
|
146
147
|
...other
|
|
147
148
|
} = props;
|
|
149
|
+
const reducedMotion = useReducedMotion(theme.motion.reducedMotion, false);
|
|
148
150
|
const [maybeSwiping, setMaybeSwiping] = React.useState(false);
|
|
149
151
|
const swipeInstance = React.useRef({
|
|
150
152
|
isSwiping: null
|
|
@@ -177,13 +179,22 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
177
179
|
drawerStyle.transform = transform;
|
|
178
180
|
let transition = '';
|
|
179
181
|
if (mode) {
|
|
180
|
-
|
|
182
|
+
const transitionProps = getTransitionProps({
|
|
181
183
|
easing: undefined,
|
|
182
184
|
style: undefined,
|
|
183
185
|
timeout: transitionDuration
|
|
184
186
|
}, {
|
|
185
187
|
mode
|
|
186
|
-
})
|
|
188
|
+
});
|
|
189
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
190
|
+
duration: transitionProps.duration,
|
|
191
|
+
delay: transitionProps.delay
|
|
192
|
+
});
|
|
193
|
+
transition = theme.transitions.create('all', {
|
|
194
|
+
...transitionProps,
|
|
195
|
+
duration: transitionTiming.duration,
|
|
196
|
+
delay: transitionTiming.delay
|
|
197
|
+
});
|
|
187
198
|
}
|
|
188
199
|
if (changeTransition) {
|
|
189
200
|
drawerStyle.transition = transition;
|
|
@@ -195,7 +206,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
195
206
|
backdropStyle.transition = transition;
|
|
196
207
|
}
|
|
197
208
|
}
|
|
198
|
-
}, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);
|
|
209
|
+
}, [anchor, disableBackdropTransition, hideBackdrop, reducedMotion, theme, transitionDuration]);
|
|
199
210
|
const handleBodyTouchEnd = useEventCallback(nativeEvent => {
|
|
200
211
|
if (!touchDetected.current) {
|
|
201
212
|
return;
|
package/Switch/Switch.js
CHANGED
|
@@ -21,6 +21,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
|
21
21
|
var _switchClasses = _interopRequireWildcard(require("./switchClasses"));
|
|
22
22
|
var _utils = require("../utils");
|
|
23
23
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
24
|
+
var _utils2 = require("../transitions/utils");
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const useUtilityClasses = ownerState => {
|
|
26
27
|
const {
|
|
@@ -125,7 +126,7 @@ const SwitchSwitchBase = (0, _zeroStyled.styled)(_SwitchBase.default, {
|
|
|
125
126
|
zIndex: 1,
|
|
126
127
|
// Render above the focus ripple.
|
|
127
128
|
color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]}`,
|
|
128
|
-
|
|
129
|
+
...(0, _utils2.getTransitionStyles)(theme, ['left', 'transform'], {
|
|
129
130
|
duration: theme.transitions.duration.shortest
|
|
130
131
|
}),
|
|
131
132
|
[`&.${_switchClasses.default.checked}`]: {
|
|
@@ -188,7 +189,7 @@ const SwitchTrack = (0, _zeroStyled.styled)('span', {
|
|
|
188
189
|
width: '100%',
|
|
189
190
|
borderRadius: 14 / 2,
|
|
190
191
|
zIndex: -1,
|
|
191
|
-
|
|
192
|
+
...(0, _utils2.getTransitionStyles)(theme, ['opacity', 'background-color'], {
|
|
192
193
|
duration: theme.transitions.duration.shortest
|
|
193
194
|
}),
|
|
194
195
|
'@media (forced-colors: active)': {
|
package/Switch/Switch.mjs
CHANGED
|
@@ -14,6 +14,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
|
14
14
|
import switchClasses, { getSwitchUtilityClass } from "./switchClasses.mjs";
|
|
15
15
|
import { mergeSlotProps } from "../utils/index.mjs";
|
|
16
16
|
import useSlot from "../utils/useSlot.mjs";
|
|
17
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
17
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
19
|
const useUtilityClasses = ownerState => {
|
|
19
20
|
const {
|
|
@@ -118,7 +119,7 @@ const SwitchSwitchBase = styled(SwitchBase, {
|
|
|
118
119
|
zIndex: 1,
|
|
119
120
|
// Render above the focus ripple.
|
|
120
121
|
color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]}`,
|
|
121
|
-
|
|
122
|
+
...getTransitionStyles(theme, ['left', 'transform'], {
|
|
122
123
|
duration: theme.transitions.duration.shortest
|
|
123
124
|
}),
|
|
124
125
|
[`&.${switchClasses.checked}`]: {
|
|
@@ -181,7 +182,7 @@ const SwitchTrack = styled('span', {
|
|
|
181
182
|
width: '100%',
|
|
182
183
|
borderRadius: 14 / 2,
|
|
183
184
|
zIndex: -1,
|
|
184
|
-
|
|
185
|
+
...getTransitionStyles(theme, ['opacity', 'background-color'], {
|
|
185
186
|
duration: theme.transitions.duration.shortest
|
|
186
187
|
}),
|
|
187
188
|
'@media (forced-colors: active)': {
|
|
@@ -19,6 +19,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
|
19
19
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
20
20
|
var _tableSortLabelClasses = _interopRequireWildcard(require("./tableSortLabelClasses"));
|
|
21
21
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
22
|
+
var _utils = require("../transitions/utils");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
24
25
|
const {
|
|
@@ -76,7 +77,7 @@ const TableSortLabelIcon = (0, _zeroStyled.styled)('span', {
|
|
|
76
77
|
marginRight: 4,
|
|
77
78
|
marginLeft: 4,
|
|
78
79
|
opacity: 0,
|
|
79
|
-
|
|
80
|
+
...(0, _utils.getTransitionStyles)(theme, ['opacity', 'transform'], {
|
|
80
81
|
duration: theme.transitions.duration.shorter
|
|
81
82
|
}),
|
|
82
83
|
userSelect: 'none',
|
|
@@ -12,6 +12,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
|
12
12
|
import capitalize from "../utils/capitalize.mjs";
|
|
13
13
|
import tableSortLabelClasses, { getTableSortLabelUtilityClass } from "./tableSortLabelClasses.mjs";
|
|
14
14
|
import useSlot from "../utils/useSlot.mjs";
|
|
15
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
15
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
const useUtilityClasses = ownerState => {
|
|
17
18
|
const {
|
|
@@ -69,7 +70,7 @@ const TableSortLabelIcon = styled('span', {
|
|
|
69
70
|
marginRight: 4,
|
|
70
71
|
marginLeft: 4,
|
|
71
72
|
opacity: 0,
|
|
72
|
-
|
|
73
|
+
...getTransitionStyles(theme, ['opacity', 'transform'], {
|
|
73
74
|
duration: theme.transitions.duration.shorter
|
|
74
75
|
}),
|
|
75
76
|
userSelect: 'none',
|
package/Tabs/Tabs.js
CHANGED
|
@@ -20,6 +20,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
20
20
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
21
21
|
var _debounce = _interopRequireDefault(require("../utils/debounce"));
|
|
22
22
|
var _animate = _interopRequireDefault(require("../internal/animate"));
|
|
23
|
+
var _useReducedMotion = _interopRequireDefault(require("../transitions/useReducedMotion"));
|
|
23
24
|
var _ScrollbarSize = _interopRequireDefault(require("./ScrollbarSize"));
|
|
24
25
|
var _TabScrollButton = _interopRequireDefault(require("../TabScrollButton"));
|
|
25
26
|
var _useEventCallback = _interopRequireDefault(require("../utils/useEventCallback"));
|
|
@@ -32,6 +33,7 @@ var _getActiveElement = _interopRequireDefault(require("../utils/getActiveElemen
|
|
|
32
33
|
var _ownerDocument = _interopRequireDefault(require("../utils/ownerDocument"));
|
|
33
34
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
34
35
|
var _useRovingTabIndex = require("../utils/useRovingTabIndex");
|
|
36
|
+
var _utils = require("../transitions/utils");
|
|
35
37
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
36
38
|
const useUtilityClasses = ownerState => {
|
|
37
39
|
const {
|
|
@@ -185,7 +187,7 @@ const TabsIndicator = (0, _zeroStyled.styled)('span', {
|
|
|
185
187
|
height: 2,
|
|
186
188
|
bottom: 0,
|
|
187
189
|
width: '100%',
|
|
188
|
-
|
|
190
|
+
...(0, _utils.getTransitionStyles)(theme),
|
|
189
191
|
variants: [{
|
|
190
192
|
props: {
|
|
191
193
|
indicatorColor: 'primary'
|
|
@@ -222,6 +224,12 @@ const TabsScrollbarSize = (0, _zeroStyled.styled)(_ScrollbarSize.default)({
|
|
|
222
224
|
}
|
|
223
225
|
});
|
|
224
226
|
const defaultIndicatorStyle = {};
|
|
227
|
+
|
|
228
|
+
// Dev-only: tracks per-`Tabs` instance (keyed by its ref) whether the invalid-value warning was
|
|
229
|
+
// already logged, so it isn't repeated across the several effects that call `getTabsMeta`.
|
|
230
|
+
// Only referenced from `process.env.NODE_ENV !== 'production'` blocks; the `@__PURE__` annotation
|
|
231
|
+
// lets minifiers drop it (and the `WeakMap` allocation) entirely from production builds.
|
|
232
|
+
const warnedTabValueInvalid = /* @__PURE__ */new WeakMap();
|
|
225
233
|
let warnedOnceTabPresent = false;
|
|
226
234
|
const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
227
235
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
@@ -230,6 +238,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
230
238
|
});
|
|
231
239
|
const theme = (0, _zeroStyled.useTheme)();
|
|
232
240
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
241
|
+
const reducedMotion = (0, _useReducedMotion.default)(theme.motion.reducedMotion, false);
|
|
233
242
|
const {
|
|
234
243
|
'aria-label': ariaLabel,
|
|
235
244
|
'aria-labelledby': ariaLabelledBy,
|
|
@@ -336,7 +345,9 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
336
345
|
if (children.length > 0) {
|
|
337
346
|
const tab = children[valueToIndex.get(value)];
|
|
338
347
|
if (process.env.NODE_ENV !== 'production') {
|
|
339
|
-
|
|
348
|
+
// `getTabsMeta` runs from several effects, so guard against logging the warning repeatedly.
|
|
349
|
+
if (!tab && !warnedTabValueInvalid.has(tabsRef)) {
|
|
350
|
+
warnedTabValueInvalid.set(tabsRef, true);
|
|
340
351
|
console.error([`MUI: The \`value\` provided to the Tabs component is invalid.`, `None of the Tabs' children match with "${value}".`, valueToIndex.keys ? `You can provide one of the following values: ${Array.from(valueToIndex.keys()).join(', ')}.` : null].join('\n'));
|
|
341
352
|
}
|
|
342
353
|
}
|
|
@@ -393,7 +404,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
393
404
|
const scroll = (scrollValue, {
|
|
394
405
|
animation = true
|
|
395
406
|
} = {}) => {
|
|
396
|
-
if (animation) {
|
|
407
|
+
if (animation && !reducedMotion.shouldReduceMotion) {
|
|
397
408
|
(0, _animate.default)(scrollStart, tabsRef.current, scrollValue, {
|
|
398
409
|
duration: theme.transitions.duration.standard
|
|
399
410
|
});
|
package/Tabs/Tabs.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import memoTheme from "../utils/memoTheme.mjs";
|
|
|
13
13
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
14
14
|
import debounce from "../utils/debounce.mjs";
|
|
15
15
|
import animate from "../internal/animate.mjs";
|
|
16
|
+
import useReducedMotion from "../transitions/useReducedMotion.mjs";
|
|
16
17
|
import ScrollbarSize from "./ScrollbarSize.mjs";
|
|
17
18
|
import TabScrollButton from "../TabScrollButton/index.mjs";
|
|
18
19
|
import useEventCallback from "../utils/useEventCallback.mjs";
|
|
@@ -25,6 +26,7 @@ import getActiveElement from "../utils/getActiveElement.mjs";
|
|
|
25
26
|
import ownerDocument from "../utils/ownerDocument.mjs";
|
|
26
27
|
import useForkRef from "../utils/useForkRef.mjs";
|
|
27
28
|
import { RovingTabIndexContext, useRovingTabIndexRoot } from "../utils/useRovingTabIndex.mjs";
|
|
29
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
28
30
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
31
|
const useUtilityClasses = ownerState => {
|
|
30
32
|
const {
|
|
@@ -178,7 +180,7 @@ const TabsIndicator = styled('span', {
|
|
|
178
180
|
height: 2,
|
|
179
181
|
bottom: 0,
|
|
180
182
|
width: '100%',
|
|
181
|
-
|
|
183
|
+
...getTransitionStyles(theme),
|
|
182
184
|
variants: [{
|
|
183
185
|
props: {
|
|
184
186
|
indicatorColor: 'primary'
|
|
@@ -215,6 +217,12 @@ const TabsScrollbarSize = styled(ScrollbarSize)({
|
|
|
215
217
|
}
|
|
216
218
|
});
|
|
217
219
|
const defaultIndicatorStyle = {};
|
|
220
|
+
|
|
221
|
+
// Dev-only: tracks per-`Tabs` instance (keyed by its ref) whether the invalid-value warning was
|
|
222
|
+
// already logged, so it isn't repeated across the several effects that call `getTabsMeta`.
|
|
223
|
+
// Only referenced from `process.env.NODE_ENV !== 'production'` blocks; the `@__PURE__` annotation
|
|
224
|
+
// lets minifiers drop it (and the `WeakMap` allocation) entirely from production builds.
|
|
225
|
+
const warnedTabValueInvalid = /* @__PURE__ */new WeakMap();
|
|
218
226
|
let warnedOnceTabPresent = false;
|
|
219
227
|
const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
220
228
|
const props = useDefaultProps({
|
|
@@ -223,6 +231,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
223
231
|
});
|
|
224
232
|
const theme = useTheme();
|
|
225
233
|
const isRtl = useRtl();
|
|
234
|
+
const reducedMotion = useReducedMotion(theme.motion.reducedMotion, false);
|
|
226
235
|
const {
|
|
227
236
|
'aria-label': ariaLabel,
|
|
228
237
|
'aria-labelledby': ariaLabelledBy,
|
|
@@ -329,7 +338,9 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
329
338
|
if (children.length > 0) {
|
|
330
339
|
const tab = children[valueToIndex.get(value)];
|
|
331
340
|
if (process.env.NODE_ENV !== 'production') {
|
|
332
|
-
|
|
341
|
+
// `getTabsMeta` runs from several effects, so guard against logging the warning repeatedly.
|
|
342
|
+
if (!tab && !warnedTabValueInvalid.has(tabsRef)) {
|
|
343
|
+
warnedTabValueInvalid.set(tabsRef, true);
|
|
333
344
|
console.error([`MUI: The \`value\` provided to the Tabs component is invalid.`, `None of the Tabs' children match with "${value}".`, valueToIndex.keys ? `You can provide one of the following values: ${Array.from(valueToIndex.keys()).join(', ')}.` : null].join('\n'));
|
|
334
345
|
}
|
|
335
346
|
}
|
|
@@ -386,7 +397,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
386
397
|
const scroll = (scrollValue, {
|
|
387
398
|
animation = true
|
|
388
399
|
} = {}) => {
|
|
389
|
-
if (animation) {
|
|
400
|
+
if (animation && !reducedMotion.shouldReduceMotion) {
|
|
390
401
|
animate(scrollStart, tabsRef.current, scrollValue, {
|
|
391
402
|
duration: theme.transitions.duration.standard
|
|
392
403
|
});
|
package/Tooltip/Tooltip.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { PopperProps } from "../Popper/index.mjs";
|
|
|
4
4
|
import { Theme } from "../styles/index.mjs";
|
|
5
5
|
import { InternalStandardProps as StandardProps } from "../internal/index.mjs";
|
|
6
6
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.mjs";
|
|
7
|
-
import { TransitionProps } from "../transitions/
|
|
7
|
+
import { TransitionProps } from "../transitions/types.mjs";
|
|
8
8
|
import { TooltipClasses } from "./tooltipClasses.mjs";
|
|
9
9
|
export interface TooltipPopperSlotPropsOverrides {}
|
|
10
10
|
export interface TooltipTransitionSlotPropsOverrides {}
|
|
@@ -18,7 +18,7 @@ export interface TooltipSlots {
|
|
|
18
18
|
popper: React.ElementType;
|
|
19
19
|
/**
|
|
20
20
|
* The component used for the transition.
|
|
21
|
-
* [Follow this guide](
|
|
21
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
22
22
|
* @default Grow
|
|
23
23
|
*/
|
|
24
24
|
transition: React.ElementType;
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { PopperProps } from "../Popper/index.js";
|
|
|
4
4
|
import { Theme } from "../styles/index.js";
|
|
5
5
|
import { InternalStandardProps as StandardProps } from "../internal/index.js";
|
|
6
6
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
|
|
7
|
-
import { TransitionProps } from "../transitions/
|
|
7
|
+
import { TransitionProps } from "../transitions/types.js";
|
|
8
8
|
import { TooltipClasses } from "./tooltipClasses.js";
|
|
9
9
|
export interface TooltipPopperSlotPropsOverrides {}
|
|
10
10
|
export interface TooltipTransitionSlotPropsOverrides {}
|
|
@@ -18,7 +18,7 @@ export interface TooltipSlots {
|
|
|
18
18
|
popper: React.ElementType;
|
|
19
19
|
/**
|
|
20
20
|
* The component used for the transition.
|
|
21
|
-
* [Follow this guide](
|
|
21
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
22
22
|
* @default Grow
|
|
23
23
|
*/
|
|
24
24
|
transition: React.ElementType;
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -330,6 +330,9 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
330
330
|
});
|
|
331
331
|
});
|
|
332
332
|
const handleMouseOver = event => {
|
|
333
|
+
if (childNode?.disabled) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
333
336
|
if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
|
|
334
337
|
return;
|
|
335
338
|
}
|
package/Tooltip/Tooltip.mjs
CHANGED
|
@@ -322,6 +322,9 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
322
322
|
});
|
|
323
323
|
});
|
|
324
324
|
const handleMouseOver = event => {
|
|
325
|
+
if (childNode?.disabled) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
325
328
|
if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
|
|
326
329
|
return;
|
|
327
330
|
}
|