@mui/material 6.0.0-alpha.4 → 6.0.0-alpha.6
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.ts +2 -2
- package/Accordion/Accordion.js +2 -2
- package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/Alert/Alert.d.ts +2 -2
- package/Alert/Alert.js +2 -2
- package/Alert/alertClasses.d.ts +12 -12
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js +1 -1
- package/Backdrop/Backdrop.d.ts +1 -1
- package/Backdrop/Backdrop.js +1 -1
- package/Badge/Badge.d.ts +2 -2
- package/Badge/Badge.js +2 -2
- package/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
- package/Button/Button.js +1 -1
- package/Button/buttonClasses.d.ts +33 -33
- package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/CHANGELOG.md +86 -0
- package/Checkbox/Checkbox.js +3 -1
- package/Chip/chipClasses.d.ts +28 -26
- package/Chip/chipClasses.js +1 -1
- package/Collapse/Collapse.js +66 -35
- package/Dialog/Dialog.js +105 -61
- package/DialogActions/DialogActions.js +16 -12
- package/DialogContent/DialogContent.js +25 -15
- package/DialogContentText/DialogContentText.js +3 -2
- package/DialogTitle/DialogTitle.js +2 -2
- package/Divider/Divider.d.ts +1 -1
- package/Divider/Divider.js +1 -1
- package/Drawer/Drawer.js +73 -32
- package/Fab/Fab.js +1 -1
- package/FilledInput/FilledInput.d.ts +1 -0
- package/FilledInput/FilledInput.js +170 -87
- package/FormControlLabel/FormControlLabel.d.ts +21 -14
- package/FormControlLabel/FormControlLabel.js +22 -4
- package/FormHelperText/FormHelperText.js +2 -2
- package/FormLabel/FormLabel.js +23 -13
- package/Grow/Grow.js +3 -1
- package/Icon/Icon.js +63 -23
- package/ImageList/ImageList.js +2 -2
- package/ImageListItem/ImageListItem.js +2 -2
- package/ImageListItemBar/ImageListItemBar.js +2 -2
- package/Input/Input.d.ts +1 -0
- package/Input/Input.js +84 -61
- package/InputAdornment/InputAdornment.js +37 -21
- package/InputBase/InputBase.js +58 -28
- package/InputLabel/InputLabel.js +120 -58
- package/Link/Link.js +99 -54
- package/Link/getTextDecoration.d.ts +2 -8
- package/Link/getTextDecoration.js +16 -8
- package/List/List.js +22 -13
- package/ListItem/ListItem.js +2 -2
- package/ListItemAvatar/ListItemAvatar.js +2 -2
- package/ListItemButton/ListItemButton.js +3 -2
- package/ListItemIcon/ListItemIcon.js +14 -9
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
- package/ListItemText/ListItemText.js +2 -2
- package/ListSubheader/ListSubheader.js +5 -3
- package/Menu/Menu.js +3 -2
- package/MenuItem/MenuItem.js +47 -27
- package/NativeSelect/NativeSelectInput.js +78 -49
- package/OutlinedInput/NotchedOutline.js +60 -43
- package/OutlinedInput/OutlinedInput.js +97 -39
- package/Pagination/Pagination.js +2 -2
- package/PaginationItem/PaginationItem.d.ts +26 -14
- package/PaginationItem/PaginationItem.js +64 -20
- package/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/Paper/Paper.js +44 -21
- package/Radio/Radio.js +5 -3
- package/Radio/RadioButtonIcon.js +1 -1
- package/Rating/Rating.js +3 -2
- package/Select/Select.js +2 -1
- package/Select/SelectInput.js +8 -6
- package/Skeleton/Skeleton.js +109 -61
- package/Slider/Slider.d.ts +2 -2
- package/Slider/Slider.js +2 -2
- package/Snackbar/Snackbar.js +66 -40
- package/SnackbarContent/SnackbarContent.js +2 -2
- package/SpeedDial/SpeedDial.d.ts +28 -1
- package/SpeedDial/SpeedDial.js +107 -49
- package/SpeedDialAction/SpeedDialAction.js +50 -24
- package/SpeedDialIcon/SpeedDialIcon.js +37 -16
- package/StepConnector/stepConnectorClasses.d.ts +2 -2
- package/StepLabel/StepLabel.d.ts +3 -3
- package/StepLabel/StepLabel.js +3 -3
- package/SvgIcon/SvgIcon.js +73 -21
- package/SwipeableDrawer/SwipeArea.js +39 -18
- package/Tab/Tab.js +127 -55
- package/TabScrollButton/TabScrollButton.js +27 -15
- package/Table/Table.js +2 -2
- package/TableBody/TableBody.js +2 -2
- package/TableCell/TableCell.js +2 -2
- package/TableContainer/TableContainer.js +2 -2
- package/TableFooter/TableFooter.js +2 -2
- package/TableHead/TableHead.js +2 -2
- package/TablePagination/TablePagination.js +2 -2
- package/TableRow/TableRow.js +2 -2
- package/TableSortLabel/TableSortLabel.js +2 -2
- package/Tabs/Tabs.js +107 -54
- package/TextField/TextField.js +2 -2
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
- package/Toolbar/Toolbar.js +3 -7
- package/Tooltip/Tooltip.js +185 -88
- package/Typography/Typography.js +89 -39
- package/index.js +1 -1
- package/internal/SwitchBase.js +39 -11
- package/modern/Accordion/Accordion.js +2 -2
- package/modern/Alert/Alert.js +2 -2
- package/modern/Avatar/Avatar.js +1 -1
- package/modern/Backdrop/Backdrop.js +1 -1
- package/modern/Badge/Badge.js +2 -2
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
- package/modern/Button/Button.js +1 -1
- package/modern/Checkbox/Checkbox.js +3 -1
- package/modern/Chip/chipClasses.js +1 -1
- package/modern/Collapse/Collapse.js +66 -35
- package/modern/Dialog/Dialog.js +105 -61
- package/modern/DialogActions/DialogActions.js +16 -12
- package/modern/DialogContent/DialogContent.js +25 -15
- package/modern/DialogContentText/DialogContentText.js +3 -2
- package/modern/DialogTitle/DialogTitle.js +2 -2
- package/modern/Divider/Divider.js +1 -1
- package/modern/Drawer/Drawer.js +73 -32
- package/modern/Fab/Fab.js +1 -1
- package/modern/FilledInput/FilledInput.js +170 -87
- package/modern/FormControlLabel/FormControlLabel.js +22 -4
- package/modern/FormHelperText/FormHelperText.js +2 -2
- package/modern/FormLabel/FormLabel.js +23 -13
- package/modern/Grow/Grow.js +3 -1
- package/modern/Icon/Icon.js +63 -23
- package/modern/ImageList/ImageList.js +2 -2
- package/modern/ImageListItem/ImageListItem.js +2 -2
- package/modern/ImageListItemBar/ImageListItemBar.js +2 -2
- package/modern/Input/Input.js +84 -61
- package/modern/InputAdornment/InputAdornment.js +37 -21
- package/modern/InputBase/InputBase.js +58 -28
- package/modern/InputLabel/InputLabel.js +120 -58
- package/modern/Link/Link.js +99 -54
- package/modern/Link/getTextDecoration.js +16 -8
- package/modern/List/List.js +22 -13
- package/modern/ListItem/ListItem.js +2 -2
- package/modern/ListItemAvatar/ListItemAvatar.js +2 -2
- package/modern/ListItemButton/ListItemButton.js +3 -2
- package/modern/ListItemIcon/ListItemIcon.js +14 -9
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
- package/modern/ListItemText/ListItemText.js +2 -2
- package/modern/ListSubheader/ListSubheader.js +5 -3
- package/modern/Menu/Menu.js +3 -2
- package/modern/MenuItem/MenuItem.js +47 -27
- package/modern/NativeSelect/NativeSelectInput.js +78 -49
- package/modern/OutlinedInput/NotchedOutline.js +60 -43
- package/modern/OutlinedInput/OutlinedInput.js +97 -39
- package/modern/Pagination/Pagination.js +2 -2
- package/modern/PaginationItem/PaginationItem.js +64 -20
- package/modern/Paper/Paper.js +44 -21
- package/modern/Radio/Radio.js +5 -3
- package/modern/Radio/RadioButtonIcon.js +1 -1
- package/modern/Rating/Rating.js +3 -2
- package/modern/Select/Select.js +2 -1
- package/modern/Select/SelectInput.js +8 -6
- package/modern/Skeleton/Skeleton.js +109 -61
- package/modern/Slider/Slider.js +2 -2
- package/modern/Snackbar/Snackbar.js +66 -40
- package/modern/SnackbarContent/SnackbarContent.js +2 -2
- package/modern/SpeedDial/SpeedDial.js +107 -49
- package/modern/SpeedDialAction/SpeedDialAction.js +50 -24
- package/modern/SpeedDialIcon/SpeedDialIcon.js +37 -16
- package/modern/StepLabel/StepLabel.js +3 -3
- package/modern/SvgIcon/SvgIcon.js +73 -21
- package/modern/SwipeableDrawer/SwipeArea.js +39 -18
- package/modern/Tab/Tab.js +127 -55
- package/modern/TabScrollButton/TabScrollButton.js +27 -15
- package/modern/Table/Table.js +2 -2
- package/modern/TableBody/TableBody.js +2 -2
- package/modern/TableCell/TableCell.js +2 -2
- package/modern/TableContainer/TableContainer.js +2 -2
- package/modern/TableFooter/TableFooter.js +2 -2
- package/modern/TableHead/TableHead.js +2 -2
- package/modern/TablePagination/TablePagination.js +2 -2
- package/modern/TableRow/TableRow.js +2 -2
- package/modern/TableSortLabel/TableSortLabel.js +2 -2
- package/modern/Tabs/Tabs.js +107 -54
- package/modern/TextField/TextField.js +2 -2
- package/modern/Toolbar/Toolbar.js +3 -7
- package/modern/Tooltip/Tooltip.js +185 -88
- package/modern/Typography/Typography.js +89 -39
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +39 -11
- package/node/Accordion/Accordion.js +2 -2
- package/node/Alert/Alert.js +2 -2
- package/node/Avatar/Avatar.js +1 -1
- package/node/Backdrop/Backdrop.js +1 -1
- package/node/Badge/Badge.js +2 -2
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -3
- package/node/Button/Button.js +2 -2
- package/node/Checkbox/Checkbox.js +3 -1
- package/node/Chip/chipClasses.js +1 -1
- package/node/Collapse/Collapse.js +70 -39
- package/node/Dialog/Dialog.js +110 -66
- package/node/DialogActions/DialogActions.js +18 -14
- package/node/DialogContent/DialogContent.js +27 -17
- package/node/DialogContentText/DialogContentText.js +6 -5
- package/node/DialogTitle/DialogTitle.js +4 -4
- package/node/Divider/Divider.js +1 -1
- package/node/Drawer/Drawer.js +78 -37
- package/node/Fab/Fab.js +2 -2
- package/node/FilledInput/FilledInput.js +176 -91
- package/node/FormControlLabel/FormControlLabel.js +23 -5
- package/node/FormHelperText/FormHelperText.js +4 -4
- package/node/FormLabel/FormLabel.js +26 -16
- package/node/Grow/Grow.js +3 -1
- package/node/Icon/Icon.js +65 -25
- package/node/ImageList/ImageList.js +4 -4
- package/node/ImageListItem/ImageListItem.js +4 -4
- package/node/ImageListItemBar/ImageListItemBar.js +8 -8
- package/node/Input/Input.js +87 -64
- package/node/InputAdornment/InputAdornment.js +39 -23
- package/node/InputBase/InputBase.js +61 -31
- package/node/InputLabel/InputLabel.js +123 -61
- package/node/Link/Link.js +101 -56
- package/node/Link/getTextDecoration.js +18 -10
- package/node/List/List.js +24 -15
- package/node/ListItem/ListItem.js +5 -5
- package/node/ListItemAvatar/ListItemAvatar.js +4 -4
- package/node/ListItemButton/ListItemButton.js +6 -5
- package/node/ListItemIcon/ListItemIcon.js +16 -11
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
- package/node/ListItemText/ListItemText.js +4 -4
- package/node/ListSubheader/ListSubheader.js +7 -5
- package/node/Menu/Menu.js +8 -7
- package/node/MenuItem/MenuItem.js +50 -30
- package/node/NativeSelect/NativeSelectInput.js +80 -53
- package/node/OutlinedInput/NotchedOutline.js +64 -47
- package/node/OutlinedInput/OutlinedInput.js +101 -43
- package/node/Pagination/Pagination.js +5 -5
- package/node/PaginationItem/PaginationItem.js +65 -20
- package/node/Paper/Paper.js +49 -28
- package/node/Radio/Radio.js +6 -4
- package/node/Radio/RadioButtonIcon.js +2 -2
- package/node/Rating/Rating.js +9 -8
- package/node/Select/Select.js +6 -5
- package/node/Select/SelectInput.js +9 -7
- package/node/Skeleton/Skeleton.js +113 -65
- package/node/Slider/Slider.js +2 -2
- package/node/Snackbar/Snackbar.js +68 -42
- package/node/SnackbarContent/SnackbarContent.js +6 -6
- package/node/SpeedDial/SpeedDial.js +111 -53
- package/node/SpeedDialAction/SpeedDialAction.js +54 -28
- package/node/SpeedDialIcon/SpeedDialIcon.js +39 -18
- package/node/StepLabel/StepLabel.js +3 -3
- package/node/SvgIcon/SvgIcon.js +79 -24
- package/node/SwipeableDrawer/SwipeArea.js +41 -20
- package/node/Tab/Tab.js +129 -57
- package/node/TabScrollButton/TabScrollButton.js +29 -17
- package/node/Table/Table.js +4 -4
- package/node/TableBody/TableBody.js +4 -4
- package/node/TableCell/TableCell.js +4 -4
- package/node/TableContainer/TableContainer.js +4 -4
- package/node/TableFooter/TableFooter.js +4 -4
- package/node/TableHead/TableHead.js +4 -4
- package/node/TablePagination/TablePagination.js +10 -10
- package/node/TableRow/TableRow.js +4 -4
- package/node/TableSortLabel/TableSortLabel.js +5 -5
- package/node/Tabs/Tabs.js +113 -60
- package/node/TextField/TextField.js +4 -4
- package/node/Toolbar/Toolbar.js +5 -9
- package/node/Tooltip/Tooltip.js +189 -92
- package/node/Typography/Typography.js +90 -40
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +41 -13
- package/package.json +6 -6
- package/umd/material-ui.development.js +2777 -1334
- package/umd/material-ui.production.min.js +4 -4
package/Snackbar/Snackbar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["onEnter", "onExited"],
|
|
6
6
|
_excluded2 = ["action", "anchorOrigin", "autoHideDuration", "children", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"];
|
|
7
7
|
import * as React from 'react';
|
|
@@ -10,14 +10,14 @@ import { useSlotProps } from '@mui/base/utils';
|
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
11
|
import { ClickAwayListener } from '@mui/base/ClickAwayListener';
|
|
12
12
|
import { useSnackbar } from '@mui/base/useSnackbar';
|
|
13
|
-
import styled from '../
|
|
13
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
14
14
|
import useTheme from '../styles/useTheme';
|
|
15
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
16
15
|
import capitalize from '../utils/capitalize';
|
|
17
16
|
import Grow from '../Grow';
|
|
18
17
|
import SnackbarContent from '../SnackbarContent';
|
|
19
18
|
import { getSnackbarUtilityClass } from './snackbarClasses';
|
|
20
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
const useThemeProps = createUseThemeProps('MuiSnackbar');
|
|
21
21
|
const useUtilityClasses = ownerState => {
|
|
22
22
|
const {
|
|
23
23
|
classes,
|
|
@@ -38,44 +38,70 @@ const SnackbarRoot = styled('div', {
|
|
|
38
38
|
return [styles.root, styles[`anchorOrigin${capitalize(ownerState.anchorOrigin.vertical)}${capitalize(ownerState.anchorOrigin.horizontal)}`]];
|
|
39
39
|
}
|
|
40
40
|
})(({
|
|
41
|
-
theme
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
bottom: 8
|
|
61
|
-
}, ownerState.anchorOrigin.horizontal === 'left' && {
|
|
62
|
-
justifyContent: 'flex-start'
|
|
63
|
-
}, ownerState.anchorOrigin.horizontal === 'right' && {
|
|
64
|
-
justifyContent: 'flex-end'
|
|
41
|
+
theme
|
|
42
|
+
}) => ({
|
|
43
|
+
zIndex: (theme.vars || theme).zIndex.snackbar,
|
|
44
|
+
position: 'fixed',
|
|
45
|
+
display: 'flex',
|
|
46
|
+
left: 8,
|
|
47
|
+
right: 8,
|
|
48
|
+
justifyContent: 'center',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
variants: [{
|
|
51
|
+
props: ({
|
|
52
|
+
ownerState
|
|
53
|
+
}) => ownerState.anchorOrigin.vertical === 'top',
|
|
54
|
+
style: {
|
|
55
|
+
top: 8,
|
|
56
|
+
[theme.breakpoints.up('sm')]: {
|
|
57
|
+
top: 24
|
|
58
|
+
}
|
|
59
|
+
}
|
|
65
60
|
}, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
})
|
|
61
|
+
props: ({
|
|
62
|
+
ownerState
|
|
63
|
+
}) => ownerState.anchorOrigin.vertical !== 'top',
|
|
64
|
+
style: {
|
|
65
|
+
bottom: 8,
|
|
66
|
+
[theme.breakpoints.up('sm')]: {
|
|
67
|
+
bottom: 24
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
props: ({
|
|
72
|
+
ownerState
|
|
73
|
+
}) => ownerState.anchorOrigin.horizontal === 'left',
|
|
74
|
+
style: {
|
|
75
|
+
justifyContent: 'flex-start',
|
|
76
|
+
[theme.breakpoints.up('sm')]: {
|
|
77
|
+
left: 24,
|
|
78
|
+
right: 'auto'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
82
|
+
props: ({
|
|
83
|
+
ownerState
|
|
84
|
+
}) => ownerState.anchorOrigin.horizontal === 'right',
|
|
85
|
+
style: {
|
|
86
|
+
justifyContent: 'flex-end',
|
|
87
|
+
[theme.breakpoints.up('sm')]: {
|
|
88
|
+
right: 24,
|
|
89
|
+
left: 'auto'
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
props: ({
|
|
94
|
+
ownerState
|
|
95
|
+
}) => ownerState.anchorOrigin.horizontal === 'center',
|
|
96
|
+
style: {
|
|
97
|
+
[theme.breakpoints.up('sm')]: {
|
|
98
|
+
left: '50%',
|
|
99
|
+
right: 'auto',
|
|
100
|
+
transform: 'translateX(-50%)'
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}]
|
|
104
|
+
}));
|
|
79
105
|
const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
80
106
|
const props = useThemeProps({
|
|
81
107
|
props: inProps,
|
|
@@ -8,11 +8,11 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { emphasize } from '@mui/system/colorManipulator';
|
|
11
|
-
import styled from '../
|
|
12
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
11
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
13
12
|
import Paper from '../Paper';
|
|
14
13
|
import { getSnackbarContentUtilityClass } from './snackbarContentClasses';
|
|
15
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
const useThemeProps = createUseThemeProps('MuiSnackbarContent');
|
|
16
16
|
const useUtilityClasses = ownerState => {
|
|
17
17
|
const {
|
|
18
18
|
classes
|
package/SpeedDial/SpeedDial.d.ts
CHANGED
|
@@ -5,12 +5,35 @@ import { InternalStandardProps as StandardProps } from '..';
|
|
|
5
5
|
import { FabProps } from '../Fab';
|
|
6
6
|
import { TransitionProps } from '../transitions';
|
|
7
7
|
import { SpeedDialClasses } from './speedDialClasses';
|
|
8
|
+
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
|
8
9
|
|
|
9
10
|
export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown';
|
|
10
11
|
export type OpenReason = 'toggle' | 'focus' | 'mouseEnter';
|
|
11
12
|
|
|
13
|
+
export interface SpeedDialSlots {
|
|
14
|
+
/**
|
|
15
|
+
* The component that renders the transition.
|
|
16
|
+
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
17
|
+
* @default {}
|
|
18
|
+
*/
|
|
19
|
+
transition?: React.JSXElementConstructor<
|
|
20
|
+
TransitionProps & { children: React.ReactElement<any, any> }
|
|
21
|
+
>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
|
25
|
+
SpeedDialSlots,
|
|
26
|
+
{
|
|
27
|
+
transition: SlotProps<React.JSXElementConstructor<TransitionProps>, {}, SpeedDialOwnerState>;
|
|
28
|
+
}
|
|
29
|
+
>;
|
|
30
|
+
|
|
12
31
|
export interface SpeedDialProps
|
|
13
|
-
extends
|
|
32
|
+
extends Omit<
|
|
33
|
+
StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'>,
|
|
34
|
+
'slots' | 'slotProps'
|
|
35
|
+
>,
|
|
36
|
+
SpeedDialSlotsAndSlotProps {
|
|
14
37
|
/**
|
|
15
38
|
* SpeedDialActions to display when the SpeedDial is `open`.
|
|
16
39
|
*/
|
|
@@ -74,6 +97,7 @@ export interface SpeedDialProps
|
|
|
74
97
|
* The component used for the transition.
|
|
75
98
|
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
76
99
|
* @default Zoom
|
|
100
|
+
* * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
77
101
|
*/
|
|
78
102
|
TransitionComponent?: React.JSXElementConstructor<TransitionProps>;
|
|
79
103
|
/**
|
|
@@ -88,10 +112,13 @@ export interface SpeedDialProps
|
|
|
88
112
|
/**
|
|
89
113
|
* Props applied to the transition element.
|
|
90
114
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
115
|
+
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
91
116
|
*/
|
|
92
117
|
TransitionProps?: TransitionProps;
|
|
93
118
|
}
|
|
94
119
|
|
|
120
|
+
export interface SpeedDialOwnerState extends SpeedDialProps {}
|
|
121
|
+
|
|
95
122
|
/**
|
|
96
123
|
*
|
|
97
124
|
* Demos:
|
package/SpeedDial/SpeedDial.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["ref"],
|
|
6
|
-
_excluded2 = ["ariaLabel", "FabProps", "children", "className", "direction", "hidden", "icon", "onBlur", "onClose", "onFocus", "onKeyDown", "onMouseEnter", "onMouseLeave", "onOpen", "open", "openIcon", "
|
|
6
|
+
_excluded2 = ["ariaLabel", "FabProps", "children", "className", "direction", "hidden", "icon", "onBlur", "onClose", "onFocus", "onKeyDown", "onMouseEnter", "onMouseLeave", "onOpen", "open", "openIcon", "slots", "slotProps", "TransitionComponent", "TransitionProps", "transitionDuration"],
|
|
7
7
|
_excluded3 = ["ref"];
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { isFragment } from 'react-is';
|
|
@@ -12,8 +12,7 @@ import clsx from 'clsx';
|
|
|
12
12
|
import composeClasses from '@mui/utils/composeClasses';
|
|
13
13
|
import useTimeout from '@mui/utils/useTimeout';
|
|
14
14
|
import clamp from '@mui/utils/clamp';
|
|
15
|
-
import styled from '../
|
|
16
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
15
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
17
16
|
import useTheme from '../styles/useTheme';
|
|
18
17
|
import Zoom from '../Zoom';
|
|
19
18
|
import Fab from '../Fab';
|
|
@@ -22,7 +21,9 @@ import isMuiElement from '../utils/isMuiElement';
|
|
|
22
21
|
import useForkRef from '../utils/useForkRef';
|
|
23
22
|
import useControlled from '../utils/useControlled';
|
|
24
23
|
import speedDialClasses, { getSpeedDialUtilityClass } from './speedDialClasses';
|
|
24
|
+
import useSlot from '../utils/useSlot';
|
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
const useThemeProps = createUseThemeProps('MuiSpeedDial');
|
|
26
27
|
const useUtilityClasses = ownerState => {
|
|
27
28
|
const {
|
|
28
29
|
classes,
|
|
@@ -57,41 +58,61 @@ const SpeedDialRoot = styled('div', {
|
|
|
57
58
|
return [styles.root, styles[`direction${capitalize(ownerState.direction)}`]];
|
|
58
59
|
}
|
|
59
60
|
})(({
|
|
60
|
-
theme
|
|
61
|
-
|
|
62
|
-
}) => _extends({
|
|
61
|
+
theme
|
|
62
|
+
}) => ({
|
|
63
63
|
zIndex: (theme.vars || theme).zIndex.speedDial,
|
|
64
64
|
display: 'flex',
|
|
65
65
|
alignItems: 'center',
|
|
66
|
-
pointerEvents: 'none'
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
66
|
+
pointerEvents: 'none',
|
|
67
|
+
variants: [{
|
|
68
|
+
props: {
|
|
69
|
+
direction: 'up'
|
|
70
|
+
},
|
|
71
|
+
style: {
|
|
72
|
+
flexDirection: 'column-reverse',
|
|
73
|
+
[`& .${speedDialClasses.actions}`]: {
|
|
74
|
+
flexDirection: 'column-reverse',
|
|
75
|
+
marginBottom: -dialRadius,
|
|
76
|
+
paddingBottom: spacingActions + dialRadius
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
props: {
|
|
81
|
+
direction: 'down'
|
|
82
|
+
},
|
|
83
|
+
style: {
|
|
84
|
+
flexDirection: 'column',
|
|
85
|
+
[`& .${speedDialClasses.actions}`]: {
|
|
86
|
+
flexDirection: 'column',
|
|
87
|
+
marginTop: -dialRadius,
|
|
88
|
+
paddingTop: spacingActions + dialRadius
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
props: {
|
|
93
|
+
direction: 'left'
|
|
94
|
+
},
|
|
95
|
+
style: {
|
|
96
|
+
flexDirection: 'row-reverse',
|
|
97
|
+
[`& .${speedDialClasses.actions}`]: {
|
|
98
|
+
flexDirection: 'row-reverse',
|
|
99
|
+
marginRight: -dialRadius,
|
|
100
|
+
paddingRight: spacingActions + dialRadius
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
props: {
|
|
105
|
+
direction: 'right'
|
|
106
|
+
},
|
|
107
|
+
style: {
|
|
108
|
+
flexDirection: 'row',
|
|
109
|
+
[`& .${speedDialClasses.actions}`]: {
|
|
110
|
+
flexDirection: 'row',
|
|
111
|
+
marginLeft: -dialRadius,
|
|
112
|
+
paddingLeft: spacingActions + dialRadius
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}]
|
|
95
116
|
}));
|
|
96
117
|
const SpeedDialFab = styled(Fab, {
|
|
97
118
|
name: 'MuiSpeedDial',
|
|
@@ -109,15 +130,19 @@ const SpeedDialActions = styled('div', {
|
|
|
109
130
|
} = props;
|
|
110
131
|
return [styles.actions, !ownerState.open && styles.actionsClosed];
|
|
111
132
|
}
|
|
112
|
-
})(
|
|
113
|
-
ownerState
|
|
114
|
-
}) => _extends({
|
|
133
|
+
})({
|
|
115
134
|
display: 'flex',
|
|
116
|
-
pointerEvents: 'auto'
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
})
|
|
135
|
+
pointerEvents: 'auto',
|
|
136
|
+
variants: [{
|
|
137
|
+
props: ({
|
|
138
|
+
ownerState
|
|
139
|
+
}) => !ownerState.open,
|
|
140
|
+
style: {
|
|
141
|
+
transition: 'top 0s linear 0.2s',
|
|
142
|
+
pointerEvents: 'none'
|
|
143
|
+
}
|
|
144
|
+
}]
|
|
145
|
+
});
|
|
121
146
|
const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref) {
|
|
122
147
|
const props = useThemeProps({
|
|
123
148
|
props: inProps,
|
|
@@ -146,9 +171,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
146
171
|
onMouseLeave,
|
|
147
172
|
onOpen,
|
|
148
173
|
open: openProp,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
174
|
+
slots = {},
|
|
175
|
+
slotProps = {},
|
|
176
|
+
TransitionComponent: TransitionComponentProp,
|
|
177
|
+
TransitionProps: TransitionPropsProp,
|
|
178
|
+
transitionDuration = defaultTransitionDuration
|
|
152
179
|
} = props,
|
|
153
180
|
FabProps = _objectWithoutPropertiesLoose(props.FabProps, _excluded),
|
|
154
181
|
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
@@ -336,6 +363,21 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
336
363
|
id: `${id}-action-${index}`
|
|
337
364
|
});
|
|
338
365
|
});
|
|
366
|
+
const backwardCompatibleSlots = _extends({
|
|
367
|
+
transition: TransitionComponentProp
|
|
368
|
+
}, slots);
|
|
369
|
+
const backwardCompatibleSlotProps = _extends({
|
|
370
|
+
transition: TransitionPropsProp
|
|
371
|
+
}, slotProps);
|
|
372
|
+
const externalForwardedProps = {
|
|
373
|
+
slots: backwardCompatibleSlots,
|
|
374
|
+
slotProps: backwardCompatibleSlotProps
|
|
375
|
+
};
|
|
376
|
+
const [TransitionSlot, transitionProps] = useSlot('transition', {
|
|
377
|
+
elementType: Zoom,
|
|
378
|
+
externalForwardedProps,
|
|
379
|
+
ownerState
|
|
380
|
+
});
|
|
339
381
|
return /*#__PURE__*/_jsxs(SpeedDialRoot, _extends({
|
|
340
382
|
className: clsx(classes.root, className),
|
|
341
383
|
ref: ref,
|
|
@@ -347,11 +389,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
347
389
|
onMouseLeave: handleClose,
|
|
348
390
|
ownerState: ownerState
|
|
349
391
|
}, other, {
|
|
350
|
-
children: [/*#__PURE__*/_jsx(
|
|
392
|
+
children: [/*#__PURE__*/_jsx(TransitionSlot, _extends({
|
|
351
393
|
in: !hidden,
|
|
352
394
|
timeout: transitionDuration,
|
|
353
395
|
unmountOnExit: true
|
|
354
|
-
},
|
|
396
|
+
}, transitionProps, {
|
|
355
397
|
children: /*#__PURE__*/_jsx(SpeedDialFab, _extends({
|
|
356
398
|
color: "primary",
|
|
357
399
|
"aria-label": ariaLabel,
|
|
@@ -461,6 +503,20 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
461
503
|
* The icon to display in the SpeedDial Fab when the SpeedDial is open.
|
|
462
504
|
*/
|
|
463
505
|
openIcon: PropTypes.node,
|
|
506
|
+
/**
|
|
507
|
+
* The props used for each slot inside.
|
|
508
|
+
* @default {}
|
|
509
|
+
*/
|
|
510
|
+
slotProps: PropTypes.shape({
|
|
511
|
+
transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
512
|
+
}),
|
|
513
|
+
/**
|
|
514
|
+
* The components used for each slot inside.
|
|
515
|
+
* @default {}
|
|
516
|
+
*/
|
|
517
|
+
slots: PropTypes.shape({
|
|
518
|
+
transition: PropTypes.elementType
|
|
519
|
+
}),
|
|
464
520
|
/**
|
|
465
521
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
466
522
|
*/
|
|
@@ -469,6 +525,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
469
525
|
* The component used for the transition.
|
|
470
526
|
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
471
527
|
* @default Zoom
|
|
528
|
+
* * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
472
529
|
*/
|
|
473
530
|
TransitionComponent: PropTypes.elementType,
|
|
474
531
|
/**
|
|
@@ -487,6 +544,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
487
544
|
/**
|
|
488
545
|
* Props applied to the transition element.
|
|
489
546
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
547
|
+
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
490
548
|
*/
|
|
491
549
|
TransitionProps: PropTypes.object
|
|
492
550
|
} : void 0;
|
|
@@ -9,13 +9,13 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
11
|
import { emphasize } from '@mui/system/colorManipulator';
|
|
12
|
-
import styled from '../
|
|
13
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
12
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
14
13
|
import Fab from '../Fab';
|
|
15
14
|
import Tooltip from '../Tooltip';
|
|
16
15
|
import capitalize from '../utils/capitalize';
|
|
17
16
|
import speedDialActionClasses, { getSpeedDialActionUtilityClass } from './speedDialActionClasses';
|
|
18
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
const useThemeProps = createUseThemeProps('MuiSpeedDialAction');
|
|
19
19
|
const useUtilityClasses = ownerState => {
|
|
20
20
|
const {
|
|
21
21
|
open,
|
|
@@ -40,9 +40,8 @@ const SpeedDialActionFab = styled(Fab, {
|
|
|
40
40
|
return [styles.fab, !ownerState.open && styles.fabClosed];
|
|
41
41
|
}
|
|
42
42
|
})(({
|
|
43
|
-
theme
|
|
44
|
-
|
|
45
|
-
}) => _extends({
|
|
43
|
+
theme
|
|
44
|
+
}) => ({
|
|
46
45
|
margin: 8,
|
|
47
46
|
color: (theme.vars || theme).palette.text.secondary,
|
|
48
47
|
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
@@ -52,10 +51,16 @@ const SpeedDialActionFab = styled(Fab, {
|
|
|
52
51
|
transition: `${theme.transitions.create('transform', {
|
|
53
52
|
duration: theme.transitions.duration.shorter
|
|
54
53
|
})}, opacity 0.8s`,
|
|
55
|
-
opacity: 1
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
opacity: 1,
|
|
55
|
+
variants: [{
|
|
56
|
+
props: ({
|
|
57
|
+
ownerState
|
|
58
|
+
}) => !ownerState.open,
|
|
59
|
+
style: {
|
|
60
|
+
opacity: 0,
|
|
61
|
+
transform: 'scale(0)'
|
|
62
|
+
}
|
|
63
|
+
}]
|
|
59
64
|
}));
|
|
60
65
|
const SpeedDialActionStaticTooltip = styled('span', {
|
|
61
66
|
name: 'MuiSpeedDialAction',
|
|
@@ -67,29 +72,50 @@ const SpeedDialActionStaticTooltip = styled('span', {
|
|
|
67
72
|
return [styles.staticTooltip, !ownerState.open && styles.staticTooltipClosed, styles[`tooltipPlacement${capitalize(ownerState.tooltipPlacement)}`]];
|
|
68
73
|
}
|
|
69
74
|
})(({
|
|
70
|
-
theme
|
|
71
|
-
ownerState
|
|
75
|
+
theme
|
|
72
76
|
}) => ({
|
|
73
77
|
position: 'relative',
|
|
74
78
|
display: 'flex',
|
|
75
79
|
alignItems: 'center',
|
|
76
|
-
[`& .${speedDialActionClasses.staticTooltipLabel}`]:
|
|
80
|
+
[`& .${speedDialActionClasses.staticTooltipLabel}`]: {
|
|
77
81
|
transition: theme.transitions.create(['transform', 'opacity'], {
|
|
78
82
|
duration: theme.transitions.duration.shorter
|
|
79
83
|
}),
|
|
80
84
|
opacity: 1
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
85
|
+
},
|
|
86
|
+
variants: [{
|
|
87
|
+
props: ({
|
|
88
|
+
ownerState
|
|
89
|
+
}) => !ownerState.open,
|
|
90
|
+
style: {
|
|
91
|
+
[`& .${speedDialActionClasses.staticTooltipLabel}`]: {
|
|
92
|
+
opacity: 0,
|
|
93
|
+
transform: 'scale(0.5)'
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
props: {
|
|
98
|
+
tooltipPlacement: 'left'
|
|
99
|
+
},
|
|
100
|
+
style: {
|
|
101
|
+
[`& .${speedDialActionClasses.staticTooltipLabel}`]: {
|
|
102
|
+
transformOrigin: '100% 50%',
|
|
103
|
+
right: '100%',
|
|
104
|
+
marginRight: 8
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
props: {
|
|
109
|
+
tooltipPlacement: 'right'
|
|
110
|
+
},
|
|
111
|
+
style: {
|
|
112
|
+
[`& .${speedDialActionClasses.staticTooltipLabel}`]: {
|
|
113
|
+
transformOrigin: '0% 50%',
|
|
114
|
+
left: '100%',
|
|
115
|
+
marginLeft: 8
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}]
|
|
93
119
|
}));
|
|
94
120
|
const SpeedDialActionStaticTooltipLabel = styled('span', {
|
|
95
121
|
name: 'MuiSpeedDialAction',
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["className", "icon", "open", "openIcon"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import styled from '../
|
|
11
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
10
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
12
11
|
import AddIcon from '../internal/svg-icons/Add';
|
|
13
12
|
import speedDialIconClasses, { getSpeedDialIconUtilityClass } from './speedDialIconClasses';
|
|
14
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const useThemeProps = createUseThemeProps('MuiSpeedDialIcon');
|
|
15
15
|
const useUtilityClasses = ownerState => {
|
|
16
16
|
const {
|
|
17
17
|
classes,
|
|
@@ -45,30 +45,51 @@ const SpeedDialIconRoot = styled('span', {
|
|
|
45
45
|
}, styles.root];
|
|
46
46
|
}
|
|
47
47
|
})(({
|
|
48
|
-
theme
|
|
49
|
-
ownerState
|
|
48
|
+
theme
|
|
50
49
|
}) => ({
|
|
51
50
|
height: 24,
|
|
52
|
-
[`& .${speedDialIconClasses.icon}`]:
|
|
51
|
+
[`& .${speedDialIconClasses.icon}`]: {
|
|
53
52
|
transition: theme.transitions.create(['transform', 'opacity'], {
|
|
54
53
|
duration: theme.transitions.duration.short
|
|
55
54
|
})
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
}, ownerState.openIcon && {
|
|
59
|
-
opacity: 0
|
|
60
|
-
})),
|
|
61
|
-
[`& .${speedDialIconClasses.openIcon}`]: _extends({
|
|
55
|
+
},
|
|
56
|
+
[`& .${speedDialIconClasses.openIcon}`]: {
|
|
62
57
|
position: 'absolute',
|
|
63
58
|
transition: theme.transitions.create(['transform', 'opacity'], {
|
|
64
59
|
duration: theme.transitions.duration.short
|
|
65
60
|
}),
|
|
66
61
|
opacity: 0,
|
|
67
62
|
transform: 'rotate(-45deg)'
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
},
|
|
64
|
+
variants: [{
|
|
65
|
+
props: ({
|
|
66
|
+
ownerState
|
|
67
|
+
}) => ownerState.open,
|
|
68
|
+
style: {
|
|
69
|
+
[`& .${speedDialIconClasses.icon}`]: {
|
|
70
|
+
transform: 'rotate(45deg)'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
props: ({
|
|
75
|
+
ownerState
|
|
76
|
+
}) => ownerState.open && ownerState.openIcon,
|
|
77
|
+
style: {
|
|
78
|
+
[`& .${speedDialIconClasses.icon}`]: {
|
|
79
|
+
opacity: 0
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
props: ({
|
|
84
|
+
ownerState
|
|
85
|
+
}) => ownerState.open,
|
|
86
|
+
style: {
|
|
87
|
+
[`& .${speedDialIconClasses.openIcon}`]: {
|
|
88
|
+
transform: 'rotate(0deg)',
|
|
89
|
+
opacity: 1
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}]
|
|
72
93
|
}));
|
|
73
94
|
const SpeedDialIcon = /*#__PURE__*/React.forwardRef(function SpeedDialIcon(inProps, ref) {
|
|
74
95
|
const props = useThemeProps({
|
|
@@ -16,11 +16,11 @@ export interface StepConnectorClasses {
|
|
|
16
16
|
/** Styles applied to the line element. */
|
|
17
17
|
line: string;
|
|
18
18
|
/** Styles applied to the line element if `orientation="horizontal"`.
|
|
19
|
-
* @deprecated Combine the [.MuiStepConnector-horizontal](/material-ui/api/step-connector/#step-connector-classes-horizontal) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. [
|
|
19
|
+
* @deprecated Combine the [.MuiStepConnector-horizontal](/material-ui/api/step-connector/#step-connector-classes-horizontal) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
20
20
|
*/
|
|
21
21
|
lineHorizontal: string;
|
|
22
22
|
/** Styles applied to the line element if `orientation="vertical"`.
|
|
23
|
-
* @deprecated Combine the [.MuiStepConnector-vertical](/material-ui/api/step-connector/#step-connector-classes-vertical) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. [
|
|
23
|
+
* @deprecated Combine the [.MuiStepConnector-vertical](/material-ui/api/step-connector/#step-connector-classes-vertical) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
24
24
|
*/
|
|
25
25
|
lineVertical: string;
|
|
26
26
|
}
|