@mui/material 9.0.0 → 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 +73 -17
- package/Autocomplete/Autocomplete.mjs +73 -17
- package/Avatar/Avatar.js +4 -0
- package/Avatar/Avatar.mjs +4 -0
- package/Backdrop/Backdrop.d.mts +2 -2
- package/Backdrop/Backdrop.d.ts +2 -2
- package/Badge/Badge.js +31 -24
- package/Badge/Badge.mjs +31 -24
- package/BottomNavigationAction/BottomNavigationAction.js +6 -2
- package/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
- package/Button/Button.js +19 -6
- package/Button/Button.mjs +19 -6
- package/ButtonBase/ButtonBase.d.mts +7 -0
- package/ButtonBase/ButtonBase.d.ts +7 -0
- package/ButtonBase/ButtonBase.js +5 -2
- package/ButtonBase/ButtonBase.mjs +5 -2
- 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 +216 -1245
- package/CardActionArea/CardActionArea.js +2 -1
- package/CardActionArea/CardActionArea.mjs +2 -1
- package/Checkbox/Checkbox.js +2 -1
- package/Checkbox/Checkbox.mjs +2 -1
- package/Chip/Chip.js +2 -1
- package/Chip/Chip.mjs +2 -1
- package/CircularProgress/CircularProgress.d.mts +12 -2
- package/CircularProgress/CircularProgress.d.ts +12 -2
- package/CircularProgress/CircularProgress.js +115 -58
- package/CircularProgress/CircularProgress.mjs +114 -58
- package/ClickAwayListener/ClickAwayListener.js +3 -6
- package/ClickAwayListener/ClickAwayListener.mjs +3 -6
- 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 +13 -6
- package/Dialog/Dialog.mjs +13 -6
- package/Drawer/Drawer.d.mts +2 -2
- package/Drawer/Drawer.d.ts +2 -2
- package/Drawer/Drawer.js +18 -4
- package/Drawer/Drawer.mjs +18 -4
- package/Fab/Fab.js +9 -2
- package/Fab/Fab.mjs +9 -2
- 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.d.mts +4 -0
- package/FilledInput/FilledInput.d.ts +4 -0
- package/FilledInput/FilledInput.js +22 -23
- package/FilledInput/FilledInput.mjs +22 -23
- package/FormControl/useFormControl.d.mts +12 -2
- package/FormControl/useFormControl.d.ts +12 -2
- package/FormControl/useFormControl.js +13 -0
- package/FormControl/useFormControl.mjs +12 -0
- package/FormControlLabel/FormControlLabel.js +5 -8
- package/FormControlLabel/FormControlLabel.mjs +5 -8
- package/FormGroup/FormGroup.js +2 -5
- package/FormGroup/FormGroup.mjs +2 -5
- package/FormHelperText/FormHelperText.js +2 -5
- package/FormHelperText/FormHelperText.mjs +2 -5
- package/FormLabel/FormLabel.js +2 -5
- package/FormLabel/FormLabel.mjs +2 -5
- 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 +3 -9
- package/IconButton/IconButton.mjs +3 -9
- package/Input/Input.d.mts +4 -0
- package/Input/Input.d.ts +4 -0
- package/Input/Input.js +9 -2
- package/Input/Input.mjs +9 -2
- package/InputBase/InputBase.d.mts +2 -1
- package/InputBase/InputBase.d.ts +2 -1
- package/InputBase/InputBase.js +52 -16
- package/InputBase/InputBase.mjs +52 -16
- package/InputLabel/InputLabel.js +7 -9
- package/InputLabel/InputLabel.mjs +7 -9
- package/LICENSE +1 -1
- package/LinearProgress/LinearProgress.d.mts +12 -2
- package/LinearProgress/LinearProgress.d.ts +12 -2
- package/LinearProgress/LinearProgress.js +225 -126
- package/LinearProgress/LinearProgress.mjs +224 -126
- package/List/List.js +2 -1
- package/List/List.mjs +2 -1
- package/ListItem/ListItem.js +2 -1
- package/ListItem/ListItem.mjs +2 -1
- package/ListItemButton/ListItemButton.js +9 -2
- package/ListItemButton/ListItemButton.mjs +9 -2
- package/Menu/Menu.d.mts +1 -1
- package/Menu/Menu.d.ts +1 -1
- package/MenuItem/MenuItem.js +7 -1
- package/MenuItem/MenuItem.mjs +7 -1
- package/MenuList/MenuList.js +2 -1
- package/MenuList/MenuList.mjs +2 -1
- package/MobileStepper/MobileStepper.js +2 -1
- package/MobileStepper/MobileStepper.mjs +2 -1
- package/NativeSelect/NativeSelect.js +2 -5
- package/NativeSelect/NativeSelect.mjs +2 -5
- package/OutlinedInput/NotchedOutline.js +4 -3
- package/OutlinedInput/NotchedOutline.mjs +4 -3
- package/OutlinedInput/OutlinedInput.js +13 -23
- package/OutlinedInput/OutlinedInput.mjs +13 -23
- 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/PigmentContainer/PigmentContainer.js +0 -1
- package/PigmentContainer/PigmentContainer.mjs +0 -1
- package/Popover/Popover.d.mts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/Popper/BasePopper.js +23 -1
- package/Popper/BasePopper.mjs +23 -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/Select.js +2 -5
- package/Select/Select.mjs +2 -5
- package/Select/SelectInput.js +276 -24
- package/Select/SelectInput.mjs +276 -24
- 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 +97 -47
- package/Slide/Slide.mjs +97 -47
- package/Slider/Slider.js +14 -4
- package/Slider/Slider.mjs +14 -4
- package/Slider/useSlider.js +4 -3
- package/Slider/useSlider.mjs +4 -3
- 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 +21 -6
- package/SwipeableDrawer/SwipeableDrawer.mjs +21 -6
- package/Switch/Switch.js +10 -8
- package/Switch/Switch.mjs +10 -8
- package/TableSortLabel/TableSortLabel.js +2 -1
- package/TableSortLabel/TableSortLabel.mjs +2 -1
- package/Tabs/ScrollbarSize.js +2 -1
- package/Tabs/ScrollbarSize.mjs +2 -1
- package/Tabs/Tabs.js +16 -4
- package/Tabs/Tabs.mjs +16 -4
- package/Tooltip/Tooltip.d.mts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +29 -108
- package/Tooltip/Tooltip.mjs +29 -108
- package/Unstable_TrapFocus/FocusTrap.js +60 -22
- package/Unstable_TrapFocus/FocusTrap.mjs +60 -22
- 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 +50 -50
- 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/responsiveFontSizes.js +19 -8
- package/styles/responsiveFontSizes.mjs +19 -8
- 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/styles/useThemeProps.d.mts +3 -3
- package/styles/useThemeProps.d.ts +3 -3
- 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 +51 -2
- package/transitions/utils.d.ts +51 -2
- package/transitions/utils.js +97 -4
- package/transitions/utils.mjs +94 -4
- package/useAutocomplete/useAutocomplete.d.mts +12 -6
- package/useAutocomplete/useAutocomplete.d.ts +12 -6
- package/useAutocomplete/useAutocomplete.js +230 -55
- package/useAutocomplete/useAutocomplete.mjs +230 -55
- package/utils/contains.d.mts +2 -0
- package/utils/contains.d.ts +2 -0
- package/utils/contains.js +9 -0
- package/utils/contains.mjs +2 -0
- package/utils/focusable.d.mts +7 -0
- package/utils/focusable.d.ts +7 -0
- package/utils/focusable.js +20 -0
- package/utils/focusable.mjs +13 -0
- package/utils/getEventTarget.d.mts +2 -0
- package/utils/getEventTarget.d.ts +2 -0
- package/utils/getEventTarget.js +9 -0
- package/utils/getEventTarget.mjs +2 -0
- package/utils/mergeSlotProps.js +2 -8
- package/utils/mergeSlotProps.mjs +1 -8
- package/version/index.js +2 -2
- package/version/index.mjs +2 -2
- package/FormControl/formControlState.js +0 -21
- package/FormControl/formControlState.mjs +0 -15
- /package/transitions/{transition.js → types.js} +0 -0
- /package/transitions/{transition.mjs → types.mjs} +0 -0
package/Slider/Slider.js
CHANGED
|
@@ -24,6 +24,7 @@ var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
|
24
24
|
var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/createSimplePaletteValueFilter"));
|
|
25
25
|
var _SliderValueLabel = _interopRequireDefault(require("./SliderValueLabel"));
|
|
26
26
|
var _sliderClasses = _interopRequireWildcard(require("./sliderClasses"));
|
|
27
|
+
var _utils = require("../transitions/utils");
|
|
27
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
29
|
function Identity(x) {
|
|
29
30
|
return x;
|
|
@@ -138,6 +139,10 @@ const SliderRail = exports.SliderRail = (0, _zeroStyled.styled)('span', {
|
|
|
138
139
|
borderRadius: 'inherit',
|
|
139
140
|
backgroundColor: 'currentColor',
|
|
140
141
|
opacity: 0.38,
|
|
142
|
+
'@media (forced-colors: active)': {
|
|
143
|
+
border: '1px solid transparent',
|
|
144
|
+
boxSizing: 'border-box'
|
|
145
|
+
},
|
|
141
146
|
variants: [{
|
|
142
147
|
props: {
|
|
143
148
|
orientation: 'horizontal'
|
|
@@ -179,7 +184,7 @@ const SliderTrack = exports.SliderTrack = (0, _zeroStyled.styled)('span', {
|
|
|
179
184
|
borderRadius: 'inherit',
|
|
180
185
|
border: '1px solid currentColor',
|
|
181
186
|
backgroundColor: 'currentColor',
|
|
182
|
-
|
|
187
|
+
...(0, _utils.getTransitionStyles)(theme, ['left', 'width', 'bottom', 'height'], {
|
|
183
188
|
duration: theme.transitions.duration.shortest
|
|
184
189
|
}),
|
|
185
190
|
variants: [{
|
|
@@ -187,7 +192,9 @@ const SliderTrack = exports.SliderTrack = (0, _zeroStyled.styled)('span', {
|
|
|
187
192
|
size: 'small'
|
|
188
193
|
},
|
|
189
194
|
style: {
|
|
190
|
-
|
|
195
|
+
'@media (forced-colors: none)': {
|
|
196
|
+
border: 'none'
|
|
197
|
+
}
|
|
191
198
|
}
|
|
192
199
|
}, {
|
|
193
200
|
props: {
|
|
@@ -253,9 +260,12 @@ const SliderThumb = exports.SliderThumb = (0, _zeroStyled.styled)('span', {
|
|
|
253
260
|
display: 'flex',
|
|
254
261
|
alignItems: 'center',
|
|
255
262
|
justifyContent: 'center',
|
|
256
|
-
|
|
263
|
+
...(0, _utils.getTransitionStyles)(theme, ['box-shadow', 'left', 'bottom'], {
|
|
257
264
|
duration: theme.transitions.duration.shortest
|
|
258
265
|
}),
|
|
266
|
+
'@media (forced-colors: active)': {
|
|
267
|
+
border: '1px solid ButtonBorder'
|
|
268
|
+
},
|
|
259
269
|
'&::before': {
|
|
260
270
|
position: 'absolute',
|
|
261
271
|
content: '""',
|
|
@@ -334,7 +344,7 @@ const SliderValueLabel = exports.SliderValueLabel = (0, _zeroStyled.styled)(_Sli
|
|
|
334
344
|
whiteSpace: 'nowrap',
|
|
335
345
|
...theme.typography.body2,
|
|
336
346
|
fontWeight: 500,
|
|
337
|
-
|
|
347
|
+
...(0, _utils.getTransitionStyles)(theme, ['transform'], {
|
|
338
348
|
duration: theme.transitions.duration.shortest
|
|
339
349
|
}),
|
|
340
350
|
position: 'absolute',
|
package/Slider/Slider.mjs
CHANGED
|
@@ -17,6 +17,7 @@ import capitalize from "../utils/capitalize.mjs";
|
|
|
17
17
|
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.mjs";
|
|
18
18
|
import BaseSliderValueLabel from "./SliderValueLabel.mjs";
|
|
19
19
|
import sliderClasses, { getSliderUtilityClass } from "./sliderClasses.mjs";
|
|
20
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
20
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
22
|
function Identity(x) {
|
|
22
23
|
return x;
|
|
@@ -131,6 +132,10 @@ export const SliderRail = styled('span', {
|
|
|
131
132
|
borderRadius: 'inherit',
|
|
132
133
|
backgroundColor: 'currentColor',
|
|
133
134
|
opacity: 0.38,
|
|
135
|
+
'@media (forced-colors: active)': {
|
|
136
|
+
border: '1px solid transparent',
|
|
137
|
+
boxSizing: 'border-box'
|
|
138
|
+
},
|
|
134
139
|
variants: [{
|
|
135
140
|
props: {
|
|
136
141
|
orientation: 'horizontal'
|
|
@@ -172,7 +177,7 @@ export const SliderTrack = styled('span', {
|
|
|
172
177
|
borderRadius: 'inherit',
|
|
173
178
|
border: '1px solid currentColor',
|
|
174
179
|
backgroundColor: 'currentColor',
|
|
175
|
-
|
|
180
|
+
...getTransitionStyles(theme, ['left', 'width', 'bottom', 'height'], {
|
|
176
181
|
duration: theme.transitions.duration.shortest
|
|
177
182
|
}),
|
|
178
183
|
variants: [{
|
|
@@ -180,7 +185,9 @@ export const SliderTrack = styled('span', {
|
|
|
180
185
|
size: 'small'
|
|
181
186
|
},
|
|
182
187
|
style: {
|
|
183
|
-
|
|
188
|
+
'@media (forced-colors: none)': {
|
|
189
|
+
border: 'none'
|
|
190
|
+
}
|
|
184
191
|
}
|
|
185
192
|
}, {
|
|
186
193
|
props: {
|
|
@@ -246,9 +253,12 @@ export const SliderThumb = styled('span', {
|
|
|
246
253
|
display: 'flex',
|
|
247
254
|
alignItems: 'center',
|
|
248
255
|
justifyContent: 'center',
|
|
249
|
-
|
|
256
|
+
...getTransitionStyles(theme, ['box-shadow', 'left', 'bottom'], {
|
|
250
257
|
duration: theme.transitions.duration.shortest
|
|
251
258
|
}),
|
|
259
|
+
'@media (forced-colors: active)': {
|
|
260
|
+
border: '1px solid ButtonBorder'
|
|
261
|
+
},
|
|
252
262
|
'&::before': {
|
|
253
263
|
position: 'absolute',
|
|
254
264
|
content: '""',
|
|
@@ -327,7 +337,7 @@ const SliderValueLabel = styled(BaseSliderValueLabel, {
|
|
|
327
337
|
whiteSpace: 'nowrap',
|
|
328
338
|
...theme.typography.body2,
|
|
329
339
|
fontWeight: 500,
|
|
330
|
-
|
|
340
|
+
...getTransitionStyles(theme, ['transform'], {
|
|
331
341
|
duration: theme.transitions.duration.shortest
|
|
332
342
|
}),
|
|
333
343
|
position: 'absolute',
|
package/Slider/useSlider.js
CHANGED
|
@@ -20,6 +20,7 @@ var _visuallyHidden = _interopRequireDefault(require("@mui/utils/visuallyHidden"
|
|
|
20
20
|
var _clamp = _interopRequireDefault(require("@mui/utils/clamp"));
|
|
21
21
|
var _extractEventHandlers = _interopRequireDefault(require("@mui/utils/extractEventHandlers"));
|
|
22
22
|
var _areArraysEqual = _interopRequireDefault(require("../utils/areArraysEqual"));
|
|
23
|
+
var _contains = _interopRequireDefault(require("../utils/contains"));
|
|
23
24
|
var _getActiveElement = _interopRequireDefault(require("../utils/getActiveElement"));
|
|
24
25
|
const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;
|
|
25
26
|
const EMPTY_MARKS = [];
|
|
@@ -103,7 +104,7 @@ function setValueIndex(values, newValue, index) {
|
|
|
103
104
|
function focusThumb(sliderRef, activeIndex, setActive, focusVisible) {
|
|
104
105
|
const doc = (0, _ownerDocument.default)(sliderRef.current);
|
|
105
106
|
const activeElement = (0, _getActiveElement.default)(doc);
|
|
106
|
-
if (!sliderRef.current
|
|
107
|
+
if (!(0, _contains.default)(sliderRef.current, activeElement) || Number(activeElement?.getAttribute('data-index')) !== activeIndex) {
|
|
107
108
|
const input = sliderRef.current?.querySelector(`[type="range"][data-index="${activeIndex}"]`);
|
|
108
109
|
if (input != null) {
|
|
109
110
|
if (focusVisible == null) {
|
|
@@ -115,8 +116,8 @@ function focusThumb(sliderRef, activeIndex, setActive, focusVisible) {
|
|
|
115
116
|
preventScroll: true,
|
|
116
117
|
// Prevent pointer-driven focus rings in browsers that support this option.
|
|
117
118
|
// Chrome 144+ supports `focusVisible` in `HTMLElement.focus()` options.
|
|
118
|
-
// @ts-expect-error `focusVisible` is not yet in TypeScript's lib.dom FocusOptions.
|
|
119
119
|
focusVisible
|
|
120
|
+
// Cast can be removed once TypeScript >= 6.0 (added `focusVisible` to lib.dom FocusOptions).
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
123
|
}
|
|
@@ -388,7 +389,7 @@ function useSlider(parameters) {
|
|
|
388
389
|
};
|
|
389
390
|
(0, _useEnhancedEffect.default)(() => {
|
|
390
391
|
const activeElement = (0, _getActiveElement.default)((0, _ownerDocument.default)(sliderRef.current));
|
|
391
|
-
if (disabled && sliderRef.current
|
|
392
|
+
if (disabled && (0, _contains.default)(sliderRef.current, activeElement)) {
|
|
392
393
|
// This is necessary because Firefox and Safari will keep focus
|
|
393
394
|
// on a disabled element:
|
|
394
395
|
// https://codesandbox.io/p/sandbox/mui-pr-22247-forked-h151h?file=/src/App.js
|
package/Slider/useSlider.mjs
CHANGED
|
@@ -11,6 +11,7 @@ import visuallyHidden from '@mui/utils/visuallyHidden';
|
|
|
11
11
|
import clamp from '@mui/utils/clamp';
|
|
12
12
|
import extractEventHandlers from '@mui/utils/extractEventHandlers';
|
|
13
13
|
import areArraysEqual from "../utils/areArraysEqual.mjs";
|
|
14
|
+
import contains from "../utils/contains.mjs";
|
|
14
15
|
import getActiveElement from "../utils/getActiveElement.mjs";
|
|
15
16
|
const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;
|
|
16
17
|
const EMPTY_MARKS = [];
|
|
@@ -94,7 +95,7 @@ function setValueIndex(values, newValue, index) {
|
|
|
94
95
|
function focusThumb(sliderRef, activeIndex, setActive, focusVisible) {
|
|
95
96
|
const doc = ownerDocument(sliderRef.current);
|
|
96
97
|
const activeElement = getActiveElement(doc);
|
|
97
|
-
if (!sliderRef.current
|
|
98
|
+
if (!contains(sliderRef.current, activeElement) || Number(activeElement?.getAttribute('data-index')) !== activeIndex) {
|
|
98
99
|
const input = sliderRef.current?.querySelector(`[type="range"][data-index="${activeIndex}"]`);
|
|
99
100
|
if (input != null) {
|
|
100
101
|
if (focusVisible == null) {
|
|
@@ -106,8 +107,8 @@ function focusThumb(sliderRef, activeIndex, setActive, focusVisible) {
|
|
|
106
107
|
preventScroll: true,
|
|
107
108
|
// Prevent pointer-driven focus rings in browsers that support this option.
|
|
108
109
|
// Chrome 144+ supports `focusVisible` in `HTMLElement.focus()` options.
|
|
109
|
-
// @ts-expect-error `focusVisible` is not yet in TypeScript's lib.dom FocusOptions.
|
|
110
110
|
focusVisible
|
|
111
|
+
// Cast can be removed once TypeScript >= 6.0 (added `focusVisible` to lib.dom FocusOptions).
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
}
|
|
@@ -378,7 +379,7 @@ export function useSlider(parameters) {
|
|
|
378
379
|
};
|
|
379
380
|
useEnhancedEffect(() => {
|
|
380
381
|
const activeElement = getActiveElement(ownerDocument(sliderRef.current));
|
|
381
|
-
if (disabled && sliderRef.current
|
|
382
|
+
if (disabled && contains(sliderRef.current, activeElement)) {
|
|
382
383
|
// This is necessary because Firefox and Safari will keep focus
|
|
383
384
|
// on a disabled element:
|
|
384
385
|
// https://codesandbox.io/p/sandbox/mui-pr-22247-forked-h151h?file=/src/App.js
|
package/Snackbar/Snackbar.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import ClickAwayListener from "../ClickAwayListener/index.mjs";
|
|
|
4
4
|
import { Theme } from "../styles/index.mjs";
|
|
5
5
|
import { InternalStandardProps as StandardProps } from "../internal/index.mjs";
|
|
6
6
|
import { SnackbarContentProps } from "../SnackbarContent/index.mjs";
|
|
7
|
-
import { TransitionProps } from "../transitions/
|
|
7
|
+
import { TransitionProps } from "../transitions/types.mjs";
|
|
8
8
|
import { SnackbarClasses } from "./snackbarClasses.mjs";
|
|
9
9
|
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.mjs";
|
|
10
10
|
export interface SnackbarSlots {
|
|
@@ -25,7 +25,7 @@ export interface SnackbarSlots {
|
|
|
25
25
|
clickAwayListener: React.ElementType;
|
|
26
26
|
/**
|
|
27
27
|
* The component that renders the transition.
|
|
28
|
-
* [Follow this guide](/material-ui/transitions/#
|
|
28
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
29
29
|
* @default Grow
|
|
30
30
|
*/
|
|
31
31
|
transition: React.ElementType;
|
package/Snackbar/Snackbar.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import ClickAwayListener from "../ClickAwayListener/index.js";
|
|
|
4
4
|
import { Theme } from "../styles/index.js";
|
|
5
5
|
import { InternalStandardProps as StandardProps } from "../internal/index.js";
|
|
6
6
|
import { SnackbarContentProps } from "../SnackbarContent/index.js";
|
|
7
|
-
import { TransitionProps } from "../transitions/
|
|
7
|
+
import { TransitionProps } from "../transitions/types.js";
|
|
8
8
|
import { SnackbarClasses } from "./snackbarClasses.js";
|
|
9
9
|
import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
|
|
10
10
|
export interface SnackbarSlots {
|
|
@@ -25,7 +25,7 @@ export interface SnackbarSlots {
|
|
|
25
25
|
clickAwayListener: React.ElementType;
|
|
26
26
|
/**
|
|
27
27
|
* The component that renders the transition.
|
|
28
|
-
* [Follow this guide](/material-ui/transitions/#
|
|
28
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
29
29
|
* @default Grow
|
|
30
30
|
*/
|
|
31
31
|
transition: React.ElementType;
|
|
@@ -16,7 +16,7 @@ export interface SpeedDialSlots {
|
|
|
16
16
|
root: React.ElementType;
|
|
17
17
|
/**
|
|
18
18
|
* The component that renders the transition.
|
|
19
|
-
* [Follow this guide](
|
|
19
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
20
20
|
* @default Zoom
|
|
21
21
|
*/
|
|
22
22
|
transition: React.ElementType;
|
package/SpeedDial/SpeedDial.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface SpeedDialSlots {
|
|
|
16
16
|
root: React.ElementType;
|
|
17
17
|
/**
|
|
18
18
|
* The component that renders the transition.
|
|
19
|
-
* [Follow this guide](
|
|
19
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
20
20
|
* @default Zoom
|
|
21
21
|
*/
|
|
22
22
|
transition: React.ElementType;
|
package/SpeedDial/SpeedDial.js
CHANGED
|
@@ -19,6 +19,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
19
19
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
20
20
|
var _Zoom = _interopRequireDefault(require("../Zoom"));
|
|
21
21
|
var _Fab = _interopRequireDefault(require("../Fab"));
|
|
22
|
+
var _utils = require("../transitions/utils");
|
|
22
23
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
23
24
|
var _isMuiElement = _interopRequireDefault(require("../utils/isMuiElement"));
|
|
24
25
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
@@ -131,7 +132,9 @@ const SpeedDialActions = (0, _zeroStyled.styled)('div', {
|
|
|
131
132
|
} = props;
|
|
132
133
|
return [styles.actions, !ownerState.open && styles.actionsClosed];
|
|
133
134
|
}
|
|
134
|
-
})({
|
|
135
|
+
})((0, _memoTheme.default)(({
|
|
136
|
+
theme
|
|
137
|
+
}) => ({
|
|
135
138
|
display: 'flex',
|
|
136
139
|
pointerEvents: 'auto',
|
|
137
140
|
variants: [{
|
|
@@ -140,10 +143,11 @@ const SpeedDialActions = (0, _zeroStyled.styled)('div', {
|
|
|
140
143
|
}) => !ownerState.open,
|
|
141
144
|
style: {
|
|
142
145
|
transition: 'top 0s linear 0.2s',
|
|
146
|
+
...(0, _utils.getReducedMotionStyles)(theme),
|
|
143
147
|
pointerEvents: 'none'
|
|
144
148
|
}
|
|
145
149
|
}]
|
|
146
|
-
});
|
|
150
|
+
})));
|
|
147
151
|
const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref) {
|
|
148
152
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
149
153
|
props: inProps,
|
package/SpeedDial/SpeedDial.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import memoTheme from "../utils/memoTheme.mjs";
|
|
|
12
12
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
13
13
|
import Zoom from "../Zoom/index.mjs";
|
|
14
14
|
import Fab from "../Fab/index.mjs";
|
|
15
|
+
import { getReducedMotionStyles } from "../transitions/utils.mjs";
|
|
15
16
|
import capitalize from "../utils/capitalize.mjs";
|
|
16
17
|
import isMuiElement from "../utils/isMuiElement.mjs";
|
|
17
18
|
import useForkRef from "../utils/useForkRef.mjs";
|
|
@@ -124,7 +125,9 @@ const SpeedDialActions = styled('div', {
|
|
|
124
125
|
} = props;
|
|
125
126
|
return [styles.actions, !ownerState.open && styles.actionsClosed];
|
|
126
127
|
}
|
|
127
|
-
})({
|
|
128
|
+
})(memoTheme(({
|
|
129
|
+
theme
|
|
130
|
+
}) => ({
|
|
128
131
|
display: 'flex',
|
|
129
132
|
pointerEvents: 'auto',
|
|
130
133
|
variants: [{
|
|
@@ -133,10 +136,11 @@ const SpeedDialActions = styled('div', {
|
|
|
133
136
|
}) => !ownerState.open,
|
|
134
137
|
style: {
|
|
135
138
|
transition: 'top 0s linear 0.2s',
|
|
139
|
+
...getReducedMotionStyles(theme),
|
|
136
140
|
pointerEvents: 'none'
|
|
137
141
|
}
|
|
138
142
|
}]
|
|
139
|
-
});
|
|
143
|
+
})));
|
|
140
144
|
const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref) {
|
|
141
145
|
const props = useDefaultProps({
|
|
142
146
|
props: inProps,
|
|
@@ -18,6 +18,8 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
18
18
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
19
19
|
var _Fab = _interopRequireDefault(require("../Fab"));
|
|
20
20
|
var _Tooltip = _interopRequireDefault(require("../Tooltip"));
|
|
21
|
+
var _utils = require("../transitions/utils");
|
|
22
|
+
var _useReducedMotion = _interopRequireDefault(require("../transitions/useReducedMotion"));
|
|
21
23
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
22
24
|
var _speedDialActionClasses = _interopRequireWildcard(require("./speedDialActionClasses"));
|
|
23
25
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
@@ -57,6 +59,7 @@ const SpeedDialActionFab = (0, _zeroStyled.styled)(_Fab.default, {
|
|
|
57
59
|
transition: `${theme.transitions.create('transform', {
|
|
58
60
|
duration: theme.transitions.duration.shorter
|
|
59
61
|
})}, opacity 0.8s`,
|
|
62
|
+
...(0, _utils.getReducedMotionStyles)(theme),
|
|
60
63
|
opacity: 1,
|
|
61
64
|
variants: [{
|
|
62
65
|
props: ({
|
|
@@ -84,7 +87,7 @@ const SpeedDialActionStaticTooltip = (0, _zeroStyled.styled)('span', {
|
|
|
84
87
|
display: 'flex',
|
|
85
88
|
alignItems: 'center',
|
|
86
89
|
[`& .${_speedDialActionClasses.default.staticTooltipLabel}`]: {
|
|
87
|
-
|
|
90
|
+
...(0, _utils.getTransitionStyles)(theme, ['transform', 'opacity'], {
|
|
88
91
|
duration: theme.transitions.duration.shorter
|
|
89
92
|
}),
|
|
90
93
|
opacity: 1
|
|
@@ -153,6 +156,8 @@ const SpeedDialAction = /*#__PURE__*/React.forwardRef(function SpeedDialAction(i
|
|
|
153
156
|
slotProps = {},
|
|
154
157
|
...other
|
|
155
158
|
} = props;
|
|
159
|
+
const theme = (0, _zeroStyled.useTheme)();
|
|
160
|
+
const reducedMotion = (0, _useReducedMotion.default)(theme.motion.reducedMotion, false);
|
|
156
161
|
const resolvedTooltipSlotProps = typeof slotProps.tooltip === 'function' ? slotProps.tooltip(props) : slotProps.tooltip ?? {};
|
|
157
162
|
const tooltipPlacement = resolvedTooltipSlotProps.placement ?? 'left';
|
|
158
163
|
const ownerState = {
|
|
@@ -171,8 +176,12 @@ const SpeedDialAction = /*#__PURE__*/React.forwardRef(function SpeedDialAction(i
|
|
|
171
176
|
const handleTooltipOpen = () => {
|
|
172
177
|
setTooltipOpen(true);
|
|
173
178
|
};
|
|
179
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
180
|
+
duration: 0,
|
|
181
|
+
delay: `${delay}ms`
|
|
182
|
+
});
|
|
174
183
|
const transitionStyle = {
|
|
175
|
-
transitionDelay:
|
|
184
|
+
transitionDelay: transitionTiming.delay
|
|
176
185
|
};
|
|
177
186
|
const [FabSlot, fabSlotProps] = (0, _useSlot.default)('fab', {
|
|
178
187
|
elementType: SpeedDialActionFab,
|
|
@@ -6,11 +6,13 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { emphasize } from '@mui/system/colorManipulator';
|
|
9
|
-
import { styled } from "../zero-styled/index.mjs";
|
|
9
|
+
import { styled, useTheme } from "../zero-styled/index.mjs";
|
|
10
10
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
11
11
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
12
12
|
import Fab from "../Fab/index.mjs";
|
|
13
13
|
import Tooltip from "../Tooltip/index.mjs";
|
|
14
|
+
import { getReducedMotionStyles, getTransitionStyles } from "../transitions/utils.mjs";
|
|
15
|
+
import useReducedMotion from "../transitions/useReducedMotion.mjs";
|
|
14
16
|
import capitalize from "../utils/capitalize.mjs";
|
|
15
17
|
import speedDialActionClasses, { getSpeedDialActionUtilityClass } from "./speedDialActionClasses.mjs";
|
|
16
18
|
import useSlot from "../utils/useSlot.mjs";
|
|
@@ -50,6 +52,7 @@ const SpeedDialActionFab = styled(Fab, {
|
|
|
50
52
|
transition: `${theme.transitions.create('transform', {
|
|
51
53
|
duration: theme.transitions.duration.shorter
|
|
52
54
|
})}, opacity 0.8s`,
|
|
55
|
+
...getReducedMotionStyles(theme),
|
|
53
56
|
opacity: 1,
|
|
54
57
|
variants: [{
|
|
55
58
|
props: ({
|
|
@@ -77,7 +80,7 @@ const SpeedDialActionStaticTooltip = styled('span', {
|
|
|
77
80
|
display: 'flex',
|
|
78
81
|
alignItems: 'center',
|
|
79
82
|
[`& .${speedDialActionClasses.staticTooltipLabel}`]: {
|
|
80
|
-
|
|
83
|
+
...getTransitionStyles(theme, ['transform', 'opacity'], {
|
|
81
84
|
duration: theme.transitions.duration.shorter
|
|
82
85
|
}),
|
|
83
86
|
opacity: 1
|
|
@@ -146,6 +149,8 @@ const SpeedDialAction = /*#__PURE__*/React.forwardRef(function SpeedDialAction(i
|
|
|
146
149
|
slotProps = {},
|
|
147
150
|
...other
|
|
148
151
|
} = props;
|
|
152
|
+
const theme = useTheme();
|
|
153
|
+
const reducedMotion = useReducedMotion(theme.motion.reducedMotion, false);
|
|
149
154
|
const resolvedTooltipSlotProps = typeof slotProps.tooltip === 'function' ? slotProps.tooltip(props) : slotProps.tooltip ?? {};
|
|
150
155
|
const tooltipPlacement = resolvedTooltipSlotProps.placement ?? 'left';
|
|
151
156
|
const ownerState = {
|
|
@@ -164,8 +169,12 @@ const SpeedDialAction = /*#__PURE__*/React.forwardRef(function SpeedDialAction(i
|
|
|
164
169
|
const handleTooltipOpen = () => {
|
|
165
170
|
setTooltipOpen(true);
|
|
166
171
|
};
|
|
172
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
173
|
+
duration: 0,
|
|
174
|
+
delay: `${delay}ms`
|
|
175
|
+
});
|
|
167
176
|
const transitionStyle = {
|
|
168
|
-
transitionDelay:
|
|
177
|
+
transitionDelay: transitionTiming.delay
|
|
169
178
|
};
|
|
170
179
|
const [FabSlot, fabSlotProps] = useSlot('fab', {
|
|
171
180
|
elementType: SpeedDialActionFab,
|
|
@@ -16,6 +16,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
16
16
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
17
17
|
var _Add = _interopRequireDefault(require("../internal/svg-icons/Add"));
|
|
18
18
|
var _speedDialIconClasses = _interopRequireWildcard(require("./speedDialIconClasses"));
|
|
19
|
+
var _utils = require("../transitions/utils");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
const useUtilityClasses = ownerState => {
|
|
21
22
|
const {
|
|
@@ -51,45 +52,47 @@ const SpeedDialIconRoot = (0, _zeroStyled.styled)('span', {
|
|
|
51
52
|
}
|
|
52
53
|
})((0, _memoTheme.default)(({
|
|
53
54
|
theme
|
|
54
|
-
}) =>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
55
|
+
}) => {
|
|
56
|
+
return {
|
|
57
|
+
height: 24,
|
|
58
|
+
[`& .${_speedDialIconClasses.default.icon}`]: {
|
|
59
|
+
...(0, _utils.getTransitionStyles)(theme, ['transform', 'opacity'], {
|
|
60
|
+
duration: theme.transitions.duration.short
|
|
61
|
+
})
|
|
62
|
+
},
|
|
63
|
+
[`& .${_speedDialIconClasses.default.openIcon}`]: {
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
...(0, _utils.getTransitionStyles)(theme, ['transform', 'opacity'], {
|
|
66
|
+
duration: theme.transitions.duration.short
|
|
67
|
+
}),
|
|
68
|
+
opacity: 0,
|
|
69
|
+
transform: 'rotate(-45deg)'
|
|
70
|
+
},
|
|
71
|
+
variants: [{
|
|
72
|
+
props: ({
|
|
73
|
+
ownerState
|
|
74
|
+
}) => ownerState.open,
|
|
75
|
+
style: {
|
|
76
|
+
[`& .${_speedDialIconClasses.default.icon}`]: {
|
|
77
|
+
transform: 'rotate(45deg)'
|
|
78
|
+
},
|
|
79
|
+
[`& .${_speedDialIconClasses.default.openIcon}`]: {
|
|
80
|
+
transform: 'rotate(0deg)',
|
|
81
|
+
opacity: 1
|
|
82
|
+
}
|
|
80
83
|
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
ownerState
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
}, {
|
|
85
|
+
props: ({
|
|
86
|
+
ownerState
|
|
87
|
+
}) => ownerState.open && ownerState.openIcon,
|
|
88
|
+
style: {
|
|
89
|
+
[`& .${_speedDialIconClasses.default.icon}`]: {
|
|
90
|
+
opacity: 0
|
|
91
|
+
}
|
|
89
92
|
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}))
|
|
93
|
+
}]
|
|
94
|
+
};
|
|
95
|
+
}));
|
|
93
96
|
const SpeedDialIcon = /*#__PURE__*/React.forwardRef(function SpeedDialIcon(inProps, ref) {
|
|
94
97
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
95
98
|
props: inProps,
|
|
@@ -9,6 +9,7 @@ import memoTheme from "../utils/memoTheme.mjs";
|
|
|
9
9
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
10
10
|
import AddIcon from "../internal/svg-icons/Add.mjs";
|
|
11
11
|
import speedDialIconClasses, { getSpeedDialIconUtilityClass } from "./speedDialIconClasses.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 {
|
|
@@ -44,45 +45,47 @@ const SpeedDialIconRoot = styled('span', {
|
|
|
44
45
|
}
|
|
45
46
|
})(memoTheme(({
|
|
46
47
|
theme
|
|
47
|
-
}) =>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
48
|
+
}) => {
|
|
49
|
+
return {
|
|
50
|
+
height: 24,
|
|
51
|
+
[`& .${speedDialIconClasses.icon}`]: {
|
|
52
|
+
...getTransitionStyles(theme, ['transform', 'opacity'], {
|
|
53
|
+
duration: theme.transitions.duration.short
|
|
54
|
+
})
|
|
55
|
+
},
|
|
56
|
+
[`& .${speedDialIconClasses.openIcon}`]: {
|
|
57
|
+
position: 'absolute',
|
|
58
|
+
...getTransitionStyles(theme, ['transform', 'opacity'], {
|
|
59
|
+
duration: theme.transitions.duration.short
|
|
60
|
+
}),
|
|
61
|
+
opacity: 0,
|
|
62
|
+
transform: 'rotate(-45deg)'
|
|
63
|
+
},
|
|
64
|
+
variants: [{
|
|
65
|
+
props: ({
|
|
66
|
+
ownerState
|
|
67
|
+
}) => ownerState.open,
|
|
68
|
+
style: {
|
|
69
|
+
[`& .${speedDialIconClasses.icon}`]: {
|
|
70
|
+
transform: 'rotate(45deg)'
|
|
71
|
+
},
|
|
72
|
+
[`& .${speedDialIconClasses.openIcon}`]: {
|
|
73
|
+
transform: 'rotate(0deg)',
|
|
74
|
+
opacity: 1
|
|
75
|
+
}
|
|
73
76
|
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
ownerState
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
}, {
|
|
78
|
+
props: ({
|
|
79
|
+
ownerState
|
|
80
|
+
}) => ownerState.open && ownerState.openIcon,
|
|
81
|
+
style: {
|
|
82
|
+
[`& .${speedDialIconClasses.icon}`]: {
|
|
83
|
+
opacity: 0
|
|
84
|
+
}
|
|
82
85
|
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}))
|
|
86
|
+
}]
|
|
87
|
+
};
|
|
88
|
+
}));
|
|
86
89
|
const SpeedDialIcon = /*#__PURE__*/React.forwardRef(function SpeedDialIcon(inProps, ref) {
|
|
87
90
|
const props = useDefaultProps({
|
|
88
91
|
props: inProps,
|