@mui/material 9.0.1 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.d.mts +5 -1
- package/Autocomplete/Autocomplete.d.ts +5 -1
- package/Autocomplete/Autocomplete.js +13 -7
- package/Autocomplete/Autocomplete.mjs +13 -7
- 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 -108
- package/ButtonBase/TouchRipple.mjs +253 -109
- package/CHANGELOG.md +122 -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/InitColorSchemeScript/InitColorSchemeScript.d.mts +5 -5
- package/InitColorSchemeScript/InitColorSchemeScript.d.ts +5 -5
- 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/SelectFocusSourceContext.d.mts +2 -2
- package/Select/utils/SelectFocusSourceContext.d.ts +2 -2
- 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/SliderValueLabel.d.mts +2 -2
- package/Slider/SliderValueLabel.d.ts +2 -2
- 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/Step/StepContext.d.mts +1 -1
- package/Step/StepContext.d.ts +1 -1
- 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/Stepper/StepperContext.d.mts +1 -1
- package/Stepper/StepperContext.d.ts +1 -1
- 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 +450 -0
- package/internal/Transition.mjs +442 -0
- package/internal/react-transition-group.d.mts +8 -0
- package/internal/react-transition-group.d.ts +8 -0
- package/package.json +7 -7
- package/styles/ThemeProviderWithVars.d.mts +7 -7
- package/styles/ThemeProviderWithVars.d.ts +7 -7
- package/styles/createGetSelector.d.mts +2 -2
- package/styles/createGetSelector.d.ts +2 -2
- 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/identifier.d.mts +1 -1
- package/styles/identifier.d.ts +1 -1
- 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/utils/memoTheme.d.mts +1 -1
- package/utils/memoTheme.d.ts +1 -1
- package/utils/useSlot.d.mts +1 -1
- package/utils/useSlot.d.ts +1 -1
- package/version/index.js +2 -2
- package/version/index.mjs +2 -2
- /package/transitions/{transition.js → types.js} +0 -0
- /package/transitions/{transition.mjs → types.mjs} +0 -0
package/Grow/Grow.mjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import useTimeout from '@mui/utils/useTimeout';
|
|
6
5
|
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
|
|
7
6
|
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
8
|
-
import
|
|
7
|
+
import Transition from "../internal/Transition.mjs";
|
|
8
|
+
import useReducedMotion from "../transitions/useReducedMotion.mjs";
|
|
9
9
|
import { useTheme } from "../zero-styled/index.mjs";
|
|
10
10
|
import { normalizedTransitionCallback, getTransitionProps, getTransitionChildStyle, reflow } from "../transitions/utils.mjs";
|
|
11
11
|
import useForkRef from "../utils/useForkRef.mjs";
|
|
@@ -40,13 +40,13 @@ const hiddenStyles = {
|
|
|
40
40
|
/**
|
|
41
41
|
* The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and
|
|
42
42
|
* [Popover](/material-ui/react-popover/) components.
|
|
43
|
-
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
44
43
|
*/
|
|
45
44
|
const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
46
45
|
const {
|
|
47
46
|
addEndListener,
|
|
48
47
|
appear = true,
|
|
49
48
|
children,
|
|
49
|
+
disablePrefersReducedMotion = false,
|
|
50
50
|
easing,
|
|
51
51
|
in: inProp,
|
|
52
52
|
onEnter,
|
|
@@ -59,15 +59,16 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
59
59
|
timeout = 'auto',
|
|
60
60
|
...other
|
|
61
61
|
} = props;
|
|
62
|
-
const
|
|
63
|
-
const autoTimeout = React.useRef();
|
|
62
|
+
const autoTimeout = React.useRef(null);
|
|
64
63
|
const theme = useTheme();
|
|
64
|
+
const reducedMotion = useReducedMotion(theme.motion.reducedMotion, disablePrefersReducedMotion);
|
|
65
65
|
const nodeRef = React.useRef(null);
|
|
66
66
|
const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
|
|
67
67
|
const handleEntering = normalizedTransitionCallback(nodeRef, onEntering);
|
|
68
68
|
const handleEnter = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
if (!reducedMotion.shouldReduceMotion) {
|
|
70
|
+
reflow(node); // Force layout so the animation starts from the initial styles.
|
|
71
|
+
}
|
|
71
72
|
const {
|
|
72
73
|
duration: transitionDuration,
|
|
73
74
|
delay,
|
|
@@ -80,18 +81,23 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
80
81
|
mode: 'enter'
|
|
81
82
|
});
|
|
82
83
|
let duration;
|
|
83
|
-
if (timeout === 'auto') {
|
|
84
|
+
if (timeout === 'auto' && !reducedMotion.shouldReduceMotion) {
|
|
84
85
|
duration = theme.transitions.getAutoHeightDuration(node.clientHeight);
|
|
85
86
|
autoTimeout.current = duration;
|
|
86
87
|
} else {
|
|
87
88
|
duration = transitionDuration;
|
|
89
|
+
autoTimeout.current = null;
|
|
88
90
|
}
|
|
89
|
-
|
|
91
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
90
92
|
duration,
|
|
91
93
|
delay
|
|
94
|
+
});
|
|
95
|
+
node.style.transition = [theme.transitions.create('opacity', {
|
|
96
|
+
duration: transitionTiming.duration,
|
|
97
|
+
delay: transitionTiming.delay
|
|
92
98
|
}), theme.transitions.create('transform', {
|
|
93
|
-
duration: duration * 0.666,
|
|
94
|
-
delay,
|
|
99
|
+
duration: typeof transitionTiming.duration === 'string' ? transitionTiming.duration : transitionTiming.duration * 0.666,
|
|
100
|
+
delay: transitionTiming.delay,
|
|
95
101
|
easing: transitionTimingFunction
|
|
96
102
|
})].join(',');
|
|
97
103
|
if (onEnter) {
|
|
@@ -113,18 +119,23 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
113
119
|
mode: 'exit'
|
|
114
120
|
});
|
|
115
121
|
let duration;
|
|
116
|
-
if (timeout === 'auto') {
|
|
122
|
+
if (timeout === 'auto' && !reducedMotion.shouldReduceMotion) {
|
|
117
123
|
duration = theme.transitions.getAutoHeightDuration(node.clientHeight);
|
|
118
124
|
autoTimeout.current = duration;
|
|
119
125
|
} else {
|
|
120
126
|
duration = transitionDuration;
|
|
127
|
+
autoTimeout.current = null;
|
|
121
128
|
}
|
|
122
|
-
|
|
129
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
123
130
|
duration,
|
|
124
131
|
delay
|
|
132
|
+
});
|
|
133
|
+
node.style.transition = [theme.transitions.create('opacity', {
|
|
134
|
+
duration: transitionTiming.duration,
|
|
135
|
+
delay: transitionTiming.delay
|
|
125
136
|
}), theme.transitions.create('transform', {
|
|
126
|
-
duration: duration * 0.666,
|
|
127
|
-
delay: delay || duration * 0.333,
|
|
137
|
+
duration: typeof transitionTiming.duration === 'string' ? transitionTiming.duration : transitionTiming.duration * 0.666,
|
|
138
|
+
delay: transitionTiming.delay || (typeof transitionTiming.duration === 'string' ? transitionTiming.duration : transitionTiming.duration * 0.333),
|
|
128
139
|
easing: transitionTimingFunction
|
|
129
140
|
})].join(',');
|
|
130
141
|
node.style.opacity = 0;
|
|
@@ -139,15 +150,9 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
139
150
|
onExited(node);
|
|
140
151
|
}
|
|
141
152
|
});
|
|
142
|
-
const handleAddEndListener = next => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
if (addEndListener) {
|
|
147
|
-
// Old call signature before `react-transition-group` implemented `nodeRef`
|
|
148
|
-
addEndListener(nodeRef.current, next);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
153
|
+
const handleAddEndListener = addEndListener ? next => {
|
|
154
|
+
addEndListener(nodeRef.current, next);
|
|
155
|
+
} : undefined;
|
|
151
156
|
return /*#__PURE__*/_jsx(Transition, {
|
|
152
157
|
appear: appear,
|
|
153
158
|
in: inProp,
|
|
@@ -159,12 +164,16 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
159
164
|
onExited: handleExited,
|
|
160
165
|
onExiting: handleExiting,
|
|
161
166
|
addEndListener: handleAddEndListener,
|
|
167
|
+
getAutoTimeout: timeout === 'auto' ? () => autoTimeout.current : undefined,
|
|
168
|
+
reduceMotion: reducedMotion.shouldReduceMotion,
|
|
162
169
|
timeout: timeout === 'auto' ? null : timeout,
|
|
163
170
|
...other,
|
|
164
171
|
children: (state, {
|
|
165
172
|
ownerState,
|
|
166
173
|
...restChildProps
|
|
167
174
|
}) => {
|
|
175
|
+
// Do not pass ownerState to a DOM child. ownerState is only for
|
|
176
|
+
// Material UI styling, and React would treat it as an invalid DOM attribute.
|
|
168
177
|
const childStyle = getTransitionChildStyle(state, inProp, styles, hiddenStyles, style, children.props.style);
|
|
169
178
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
170
179
|
style: childStyle,
|
|
@@ -180,9 +189,12 @@ process.env.NODE_ENV !== "production" ? Grow.propTypes /* remove-proptypes */ =
|
|
|
180
189
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
181
190
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
182
191
|
/**
|
|
183
|
-
* Add a custom transition end trigger.
|
|
184
|
-
*
|
|
185
|
-
*
|
|
192
|
+
* Add a custom transition end trigger.
|
|
193
|
+
* Use it when you need custom logic to decide when the transition has ended.
|
|
194
|
+
* Note: Timeouts are still used as a fallback if provided.
|
|
195
|
+
*
|
|
196
|
+
* @param {HTMLElement} node The transitioning DOM node.
|
|
197
|
+
* @param {Function} done Call this when the transition has finished.
|
|
186
198
|
*/
|
|
187
199
|
addEndListener: PropTypes.func,
|
|
188
200
|
/**
|
|
@@ -195,6 +207,11 @@ process.env.NODE_ENV !== "production" ? Grow.propTypes /* remove-proptypes */ =
|
|
|
195
207
|
* A single child content element.
|
|
196
208
|
*/
|
|
197
209
|
children: elementAcceptingRef.isRequired,
|
|
210
|
+
/**
|
|
211
|
+
* If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
|
|
212
|
+
* @default false
|
|
213
|
+
*/
|
|
214
|
+
disablePrefersReducedMotion: PropTypes.bool,
|
|
198
215
|
/**
|
|
199
216
|
* The transition timing function.
|
|
200
217
|
* You may specify a single easing or a object containing enter and exit values.
|
package/IconButton/IconButton.js
CHANGED
|
@@ -21,6 +21,7 @@ var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
|
21
21
|
var _CircularProgress = _interopRequireDefault(require("../CircularProgress"));
|
|
22
22
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
23
23
|
var _iconButtonClasses = _interopRequireWildcard(require("./iconButtonClasses"));
|
|
24
|
+
var _utils2 = require("../transitions/utils");
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const useUtilityClasses = ownerState => {
|
|
26
27
|
const {
|
|
@@ -56,7 +57,7 @@ const IconButtonRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
56
57
|
padding: 8,
|
|
57
58
|
borderRadius: '50%',
|
|
58
59
|
color: (theme.vars || theme).palette.action.active,
|
|
59
|
-
|
|
60
|
+
...(0, _utils2.getTransitionStyles)(theme, 'background-color', {
|
|
60
61
|
duration: theme.transitions.duration.shortest
|
|
61
62
|
}),
|
|
62
63
|
variants: [{
|
|
@@ -14,6 +14,7 @@ import ButtonBase from "../ButtonBase/index.mjs";
|
|
|
14
14
|
import CircularProgress from "../CircularProgress/index.mjs";
|
|
15
15
|
import capitalize from "../utils/capitalize.mjs";
|
|
16
16
|
import iconButtonClasses, { getIconButtonUtilityClass } from "./iconButtonClasses.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 {
|
|
@@ -49,7 +50,7 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
|
49
50
|
padding: 8,
|
|
50
51
|
borderRadius: '50%',
|
|
51
52
|
color: (theme.vars || theme).palette.action.active,
|
|
52
|
-
|
|
53
|
+
...getTransitionStyles(theme, 'background-color', {
|
|
53
54
|
duration: theme.transitions.duration.shortest
|
|
54
55
|
}),
|
|
55
56
|
variants: [{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const defaultConfig: {
|
|
2
|
-
readonly attribute:
|
|
3
|
-
readonly colorSchemeStorageKey:
|
|
4
|
-
readonly defaultLightColorScheme:
|
|
5
|
-
readonly defaultDarkColorScheme:
|
|
6
|
-
readonly modeStorageKey:
|
|
2
|
+
readonly attribute: 'data-mui-color-scheme';
|
|
3
|
+
readonly colorSchemeStorageKey: 'mui-color-scheme';
|
|
4
|
+
readonly defaultLightColorScheme: 'light';
|
|
5
|
+
readonly defaultDarkColorScheme: 'dark';
|
|
6
|
+
readonly modeStorageKey: 'mui-mode';
|
|
7
7
|
};
|
|
8
8
|
export interface InitColorSchemeScriptProps {
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const defaultConfig: {
|
|
2
|
-
readonly attribute:
|
|
3
|
-
readonly colorSchemeStorageKey:
|
|
4
|
-
readonly defaultLightColorScheme:
|
|
5
|
-
readonly defaultDarkColorScheme:
|
|
6
|
-
readonly modeStorageKey:
|
|
2
|
+
readonly attribute: 'data-mui-color-scheme';
|
|
3
|
+
readonly colorSchemeStorageKey: 'mui-color-scheme';
|
|
4
|
+
readonly defaultLightColorScheme: 'light';
|
|
5
|
+
readonly defaultDarkColorScheme: 'dark';
|
|
6
|
+
readonly modeStorageKey: 'mui-mode';
|
|
7
7
|
};
|
|
8
8
|
export interface InitColorSchemeScriptProps {
|
|
9
9
|
/**
|
package/Input/Input.js
CHANGED
|
@@ -20,6 +20,7 @@ var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/c
|
|
|
20
20
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
21
21
|
var _inputLabelClasses = _interopRequireDefault(require("../InputLabel/inputLabelClasses"));
|
|
22
22
|
var _inputClasses = _interopRequireWildcard(require("./inputClasses"));
|
|
23
|
+
var _utils = require("../transitions/utils");
|
|
23
24
|
var _InputBase2 = require("../InputBase/InputBase");
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const useUtilityClasses = ownerState => {
|
|
@@ -79,7 +80,7 @@ const InputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
|
|
|
79
80
|
position: 'absolute',
|
|
80
81
|
right: 0,
|
|
81
82
|
transform: 'scaleX(0)',
|
|
82
|
-
|
|
83
|
+
...(0, _utils.getTransitionStyles)(theme, 'transform', {
|
|
83
84
|
duration: theme.transitions.duration.shorter,
|
|
84
85
|
easing: theme.transitions.easing.easeOut
|
|
85
86
|
}),
|
|
@@ -102,7 +103,7 @@ const InputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
|
|
|
102
103
|
content: '""',
|
|
103
104
|
position: 'absolute',
|
|
104
105
|
right: 0,
|
|
105
|
-
|
|
106
|
+
...(0, _utils.getTransitionStyles)(theme, 'border-bottom-color', {
|
|
106
107
|
duration: theme.transitions.duration.shorter
|
|
107
108
|
}),
|
|
108
109
|
pointerEvents: 'none' // Transparent to the hover style.
|
package/Input/Input.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFil
|
|
|
13
13
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
14
14
|
import inputLabelClasses from "../InputLabel/inputLabelClasses.mjs";
|
|
15
15
|
import inputClasses, { getInputUtilityClass } from "./inputClasses.mjs";
|
|
16
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
16
17
|
import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.mjs";
|
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
const useUtilityClasses = ownerState => {
|
|
@@ -72,7 +73,7 @@ const InputRoot = styled(InputBaseRoot, {
|
|
|
72
73
|
position: 'absolute',
|
|
73
74
|
right: 0,
|
|
74
75
|
transform: 'scaleX(0)',
|
|
75
|
-
|
|
76
|
+
...getTransitionStyles(theme, 'transform', {
|
|
76
77
|
duration: theme.transitions.duration.shorter,
|
|
77
78
|
easing: theme.transitions.easing.easeOut
|
|
78
79
|
}),
|
|
@@ -95,7 +96,7 @@ const InputRoot = styled(InputBaseRoot, {
|
|
|
95
96
|
content: '""',
|
|
96
97
|
position: 'absolute',
|
|
97
98
|
right: 0,
|
|
98
|
-
|
|
99
|
+
...getTransitionStyles(theme, 'border-bottom-color', {
|
|
99
100
|
duration: theme.transitions.duration.shorter
|
|
100
101
|
}),
|
|
101
102
|
pointerEvents: 'none' // Transparent to the hover style.
|
package/InputBase/InputBase.js
CHANGED
|
@@ -28,6 +28,7 @@ var _ownerDocument = _interopRequireDefault(require("../utils/ownerDocument"));
|
|
|
28
28
|
var _getActiveElement = _interopRequireDefault(require("../utils/getActiveElement"));
|
|
29
29
|
var _utils = require("./utils");
|
|
30
30
|
var _inputBaseClasses = _interopRequireWildcard(require("./inputBaseClasses"));
|
|
31
|
+
var _utils2 = require("../transitions/utils");
|
|
31
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
33
|
var _InputGlobalStyles;
|
|
33
34
|
const MUI_AUTO_FILL = 'mui-auto-fill';
|
|
@@ -129,7 +130,7 @@ const InputBaseInput = exports.InputBaseInput = (0, _zeroStyled.styled)('input',
|
|
|
129
130
|
} : {
|
|
130
131
|
opacity: light ? 0.42 : 0.5
|
|
131
132
|
}),
|
|
132
|
-
|
|
133
|
+
...(0, _utils2.getTransitionStyles)(theme, 'opacity', {
|
|
133
134
|
duration: theme.transitions.duration.shorter
|
|
134
135
|
})
|
|
135
136
|
};
|
package/InputBase/InputBase.mjs
CHANGED
|
@@ -22,6 +22,7 @@ import ownerDocument from "../utils/ownerDocument.mjs";
|
|
|
22
22
|
import getActiveElement from "../utils/getActiveElement.mjs";
|
|
23
23
|
import { isFilled } from "./utils.mjs";
|
|
24
24
|
import inputBaseClasses, { getInputBaseUtilityClass } from "./inputBaseClasses.mjs";
|
|
25
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
25
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
27
|
const MUI_AUTO_FILL = 'mui-auto-fill';
|
|
27
28
|
const MUI_AUTO_FILL_CANCEL = 'mui-auto-fill-cancel';
|
|
@@ -120,7 +121,7 @@ export const InputBaseInput = styled('input', {
|
|
|
120
121
|
} : {
|
|
121
122
|
opacity: light ? 0.42 : 0.5
|
|
122
123
|
}),
|
|
123
|
-
|
|
124
|
+
...getTransitionStyles(theme, 'opacity', {
|
|
124
125
|
duration: theme.transitions.duration.shorter
|
|
125
126
|
})
|
|
126
127
|
};
|
package/InputLabel/InputLabel.js
CHANGED
|
@@ -19,6 +19,7 @@ var _zeroStyled = require("../zero-styled");
|
|
|
19
19
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
20
20
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
21
21
|
var _inputLabelClasses = require("./inputLabelClasses");
|
|
22
|
+
var _utils = require("../transitions/utils");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
24
25
|
const {
|
|
@@ -95,7 +96,7 @@ const InputLabelRoot = (0, _zeroStyled.styled)(_FormLabel.default, {
|
|
|
95
96
|
ownerState
|
|
96
97
|
}) => !ownerState.disableAnimation,
|
|
97
98
|
style: {
|
|
98
|
-
|
|
99
|
+
...(0, _utils.getTransitionStyles)(theme, ['color', 'transform', 'max-width'], {
|
|
99
100
|
duration: theme.transitions.duration.shorter,
|
|
100
101
|
easing: theme.transitions.easing.easeOut
|
|
101
102
|
})
|
|
@@ -12,6 +12,7 @@ import { styled } from "../zero-styled/index.mjs";
|
|
|
12
12
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
13
13
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
14
14
|
import { getInputLabelUtilityClasses } from "./inputLabelClasses.mjs";
|
|
15
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
const useUtilityClasses = ownerState => {
|
|
17
18
|
const {
|
|
@@ -88,7 +89,7 @@ const InputLabelRoot = styled(FormLabel, {
|
|
|
88
89
|
ownerState
|
|
89
90
|
}) => !ownerState.disableAnimation,
|
|
90
91
|
style: {
|
|
91
|
-
|
|
92
|
+
...getTransitionStyles(theme, ['color', 'transform', 'max-width'], {
|
|
92
93
|
duration: theme.transitions.duration.shorter,
|
|
93
94
|
easing: theme.transitions.easing.easeOut
|
|
94
95
|
})
|
package/LICENSE
CHANGED