@mui/material 9.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.mts +2 -2
- package/Accordion/Accordion.d.ts +2 -2
- package/Accordion/Accordion.js +3 -2
- package/Accordion/Accordion.mjs +3 -2
- package/AccordionSummary/AccordionSummary.js +27 -29
- package/AccordionSummary/AccordionSummary.mjs +27 -29
- package/Autocomplete/Autocomplete.js +8 -6
- package/Autocomplete/Autocomplete.mjs +8 -6
- package/Backdrop/Backdrop.d.mts +2 -2
- package/Backdrop/Backdrop.d.ts +2 -2
- package/Badge/Badge.js +28 -24
- package/Badge/Badge.mjs +28 -24
- package/BottomNavigationAction/BottomNavigationAction.js +6 -2
- package/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
- package/Button/Button.js +11 -15
- package/Button/Button.mjs +11 -15
- package/ButtonBase/Ripple.js +21 -11
- package/ButtonBase/Ripple.mjs +21 -11
- package/ButtonBase/TouchRipple.js +252 -116
- package/ButtonBase/TouchRipple.mjs +253 -117
- package/CHANGELOG.md +84 -0
- package/CardActionArea/CardActionArea.js +2 -1
- package/CardActionArea/CardActionArea.mjs +2 -1
- package/Chip/Chip.js +2 -1
- package/Chip/Chip.mjs +2 -1
- package/CircularProgress/CircularProgress.js +85 -55
- package/CircularProgress/CircularProgress.mjs +84 -55
- package/Collapse/Collapse.d.mts +15 -3
- package/Collapse/Collapse.d.ts +15 -3
- package/Collapse/Collapse.js +44 -31
- package/Collapse/Collapse.mjs +43 -30
- package/Dialog/Dialog.d.mts +2 -2
- package/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.js +2 -0
- package/Dialog/Dialog.mjs +2 -0
- package/Drawer/Drawer.d.mts +2 -2
- package/Drawer/Drawer.d.ts +2 -2
- package/Fab/Fab.js +2 -1
- package/Fab/Fab.mjs +2 -1
- package/Fade/Fade.d.mts +15 -2
- package/Fade/Fade.d.ts +15 -2
- package/Fade/Fade.js +46 -19
- package/Fade/Fade.mjs +45 -18
- package/FilledInput/FilledInput.js +4 -3
- package/FilledInput/FilledInput.mjs +4 -3
- package/Grow/Grow.d.mts +15 -2
- package/Grow/Grow.d.ts +15 -2
- package/Grow/Grow.js +45 -28
- package/Grow/Grow.mjs +44 -27
- package/IconButton/IconButton.js +2 -1
- package/IconButton/IconButton.mjs +2 -1
- package/Input/Input.js +3 -2
- package/Input/Input.mjs +3 -2
- package/InputBase/InputBase.js +2 -1
- package/InputBase/InputBase.mjs +2 -1
- package/InputLabel/InputLabel.js +2 -1
- package/InputLabel/InputLabel.mjs +2 -1
- package/LICENSE +1 -1
- package/LinearProgress/LinearProgress.js +187 -120
- package/LinearProgress/LinearProgress.mjs +186 -120
- package/ListItem/ListItem.js +2 -1
- package/ListItem/ListItem.mjs +2 -1
- package/ListItemButton/ListItemButton.js +2 -1
- package/ListItemButton/ListItemButton.mjs +2 -1
- package/Menu/Menu.d.mts +1 -1
- package/Menu/Menu.d.ts +1 -1
- package/MobileStepper/MobileStepper.js +2 -1
- package/MobileStepper/MobileStepper.mjs +2 -1
- package/OutlinedInput/NotchedOutline.js +4 -3
- package/OutlinedInput/NotchedOutline.mjs +4 -3
- package/PaginationItem/PaginationItem.js +2 -1
- package/PaginationItem/PaginationItem.mjs +2 -1
- package/Paper/Paper.js +2 -1
- package/Paper/Paper.mjs +2 -1
- package/Popover/Popover.d.mts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/README.md +3 -2
- package/Radio/RadioButtonIcon.js +3 -2
- package/Radio/RadioButtonIcon.mjs +3 -2
- package/Rating/Rating.js +2 -1
- package/Rating/Rating.mjs +2 -1
- package/Select/SelectInput.js +115 -25
- package/Select/SelectInput.mjs +115 -25
- package/Select/utils/closedTypeahead.js +73 -0
- package/Select/utils/closedTypeahead.mjs +63 -0
- package/Skeleton/Skeleton.js +22 -2
- package/Skeleton/Skeleton.mjs +22 -2
- package/Slide/Slide.d.mts +15 -2
- package/Slide/Slide.d.ts +15 -2
- package/Slide/Slide.js +53 -25
- package/Slide/Slide.mjs +52 -24
- package/Slider/Slider.js +4 -3
- package/Slider/Slider.mjs +4 -3
- package/Slider/useSlider.js +1 -1
- package/Slider/useSlider.mjs +1 -1
- package/Snackbar/Snackbar.d.mts +2 -2
- package/Snackbar/Snackbar.d.ts +2 -2
- package/SpeedDial/SpeedDial.d.mts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/SpeedDial.js +6 -2
- package/SpeedDial/SpeedDial.mjs +6 -2
- package/SpeedDialAction/SpeedDialAction.js +11 -2
- package/SpeedDialAction/SpeedDialAction.mjs +12 -3
- package/SpeedDialIcon/SpeedDialIcon.js +40 -37
- package/SpeedDialIcon/SpeedDialIcon.mjs +40 -37
- package/Step/Step.js +47 -15
- package/Step/Step.mjs +47 -15
- package/StepButton/StepButton.js +9 -3
- package/StepButton/StepButton.mjs +9 -3
- package/StepConnector/StepConnector.js +10 -0
- package/StepConnector/StepConnector.mjs +10 -0
- package/StepContent/StepContent.d.mts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepContent/StepContent.js +26 -2
- package/StepContent/StepContent.mjs +26 -2
- package/StepIcon/StepIcon.js +2 -1
- package/StepIcon/StepIcon.mjs +2 -1
- package/StepLabel/StepLabel.js +52 -7
- package/StepLabel/StepLabel.mjs +52 -7
- package/Stepper/Stepper.d.mts +2 -0
- package/Stepper/Stepper.d.ts +2 -0
- package/Stepper/Stepper.js +18 -0
- package/Stepper/Stepper.mjs +18 -0
- package/SvgIcon/SvgIcon.js +2 -1
- package/SvgIcon/SvgIcon.mjs +2 -1
- package/SwipeableDrawer/SwipeableDrawer.js +14 -3
- package/SwipeableDrawer/SwipeableDrawer.mjs +14 -3
- package/Switch/Switch.js +3 -2
- package/Switch/Switch.mjs +3 -2
- package/TableSortLabel/TableSortLabel.js +2 -1
- package/TableSortLabel/TableSortLabel.mjs +2 -1
- package/Tabs/Tabs.js +14 -3
- package/Tabs/Tabs.mjs +14 -3
- package/Tooltip/Tooltip.d.mts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +3 -0
- package/Tooltip/Tooltip.mjs +3 -0
- package/Unstable_TrapFocus/FocusTrap.js +42 -8
- package/Unstable_TrapFocus/FocusTrap.mjs +42 -8
- package/Zoom/Zoom.d.mts +15 -2
- package/Zoom/Zoom.d.ts +15 -2
- package/Zoom/Zoom.js +43 -16
- package/Zoom/Zoom.mjs +42 -15
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internal/Transition.d.mts +34 -0
- package/internal/Transition.d.ts +34 -0
- package/internal/Transition.js +444 -0
- package/internal/Transition.mjs +436 -0
- package/internal/react-transition-group.d.mts +8 -0
- package/internal/react-transition-group.d.ts +8 -0
- package/package.json +6 -6
- package/styles/createMotion.d.mts +8 -0
- package/styles/createMotion.d.ts +8 -0
- package/styles/createMotion.js +13 -0
- package/styles/createMotion.mjs +7 -0
- package/styles/createThemeFoundation.d.mts +2 -0
- package/styles/createThemeFoundation.d.ts +2 -0
- package/styles/createThemeNoVars.d.mts +3 -0
- package/styles/createThemeNoVars.d.ts +3 -0
- package/styles/createThemeNoVars.js +5 -0
- package/styles/createThemeNoVars.mjs +5 -0
- package/styles/createTransitions.d.mts +6 -2
- package/styles/createTransitions.d.ts +6 -2
- package/styles/createTransitions.js +12 -4
- package/styles/createTransitions.mjs +12 -4
- package/styles/enhanceHighContrast.d.mts +70 -0
- package/styles/enhanceHighContrast.d.ts +70 -0
- package/styles/enhanceHighContrast.js +502 -0
- package/styles/enhanceHighContrast.mjs +495 -0
- package/styles/index.d.mts +2 -0
- package/styles/index.d.ts +2 -0
- package/styles/index.js +8 -0
- package/styles/index.mjs +1 -0
- package/styles/reducedMotion.d.mts +7 -0
- package/styles/reducedMotion.d.ts +7 -0
- package/styles/reducedMotion.js +21 -0
- package/styles/reducedMotion.mjs +14 -0
- package/styles/shouldSkipGeneratingVar.js +1 -1
- package/styles/shouldSkipGeneratingVar.mjs +1 -1
- package/styles/stringifyTheme.js +1 -0
- package/styles/stringifyTheme.mjs +1 -0
- package/transitions/index.d.mts +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/index.js +0 -11
- package/transitions/index.mjs +1 -1
- package/transitions/transition.d.mts +1 -12
- package/transitions/transition.d.ts +1 -12
- package/transitions/types.d.mts +73 -0
- package/transitions/types.d.ts +73 -0
- package/transitions/useReducedMotion.d.mts +14 -0
- package/transitions/useReducedMotion.d.ts +14 -0
- package/transitions/useReducedMotion.js +117 -0
- package/transitions/useReducedMotion.mjs +110 -0
- package/transitions/utils.d.mts +34 -2
- package/transitions/utils.d.ts +34 -2
- package/transitions/utils.js +33 -4
- package/transitions/utils.mjs +31 -4
- package/useAutocomplete/useAutocomplete.d.mts +8 -1
- package/useAutocomplete/useAutocomplete.d.ts +8 -1
- package/useAutocomplete/useAutocomplete.js +66 -4
- package/useAutocomplete/useAutocomplete.mjs +66 -4
- package/version/index.js +3 -3
- package/version/index.mjs +3 -3
- /package/transitions/{transition.js → types.js} +0 -0
- /package/transitions/{transition.mjs → types.mjs} +0 -0
|
@@ -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,
|
package/Step/Step.js
CHANGED
|
@@ -42,14 +42,47 @@ const StepRoot = (0, _zeroStyled.styled)('li', {
|
|
|
42
42
|
})({
|
|
43
43
|
variants: [{
|
|
44
44
|
props: {
|
|
45
|
-
orientation: 'horizontal'
|
|
45
|
+
orientation: 'horizontal',
|
|
46
|
+
alternativeLabel: false,
|
|
47
|
+
hasConnector: false
|
|
48
|
+
},
|
|
49
|
+
style: {
|
|
50
|
+
paddingLeft: 8
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
props: {
|
|
54
|
+
orientation: 'horizontal',
|
|
55
|
+
alternativeLabel: false,
|
|
56
|
+
last: true
|
|
46
57
|
},
|
|
47
58
|
style: {
|
|
48
|
-
paddingLeft: 8,
|
|
49
59
|
paddingRight: 8
|
|
50
60
|
}
|
|
51
61
|
}, {
|
|
52
62
|
props: {
|
|
63
|
+
orientation: 'horizontal',
|
|
64
|
+
alternativeLabel: false,
|
|
65
|
+
hasConnector: true
|
|
66
|
+
},
|
|
67
|
+
style: {
|
|
68
|
+
flex: '1 1 auto',
|
|
69
|
+
display: 'grid',
|
|
70
|
+
gridTemplateColumns: '1fr auto',
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
gap: 8
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
props: {
|
|
76
|
+
orientation: 'vertical',
|
|
77
|
+
alternativeLabel: true
|
|
78
|
+
},
|
|
79
|
+
style: {
|
|
80
|
+
display: 'flex',
|
|
81
|
+
flexDirection: 'column'
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
props: {
|
|
85
|
+
orientation: 'horizontal',
|
|
53
86
|
alternativeLabel: true
|
|
54
87
|
},
|
|
55
88
|
style: {
|
|
@@ -100,6 +133,7 @@ const Step = /*#__PURE__*/React.forwardRef(function Step(inProps, ref) {
|
|
|
100
133
|
completed,
|
|
101
134
|
disabled
|
|
102
135
|
}), [index, last, expanded, active, completed, disabled]);
|
|
136
|
+
const hasConnector = !!connector && index !== 0;
|
|
103
137
|
const ownerState = {
|
|
104
138
|
...props,
|
|
105
139
|
active,
|
|
@@ -108,23 +142,21 @@ const Step = /*#__PURE__*/React.forwardRef(function Step(inProps, ref) {
|
|
|
108
142
|
completed,
|
|
109
143
|
disabled,
|
|
110
144
|
expanded,
|
|
111
|
-
component
|
|
145
|
+
component,
|
|
146
|
+
hasConnector
|
|
112
147
|
};
|
|
113
148
|
const classes = useUtilityClasses(ownerState);
|
|
114
|
-
const newChildren = /*#__PURE__*/(0, _jsxRuntime.jsxs)(StepRoot, {
|
|
115
|
-
as: component,
|
|
116
|
-
className: (0, _clsx.default)(classes.root, className),
|
|
117
|
-
ref: ref,
|
|
118
|
-
ownerState: ownerState,
|
|
119
|
-
role: isTabList ? 'presentation' : undefined,
|
|
120
|
-
...other,
|
|
121
|
-
children: [connector && alternativeLabel && index !== 0 ? connector : null, children]
|
|
122
|
-
});
|
|
123
149
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StepContext.default.Provider, {
|
|
124
150
|
value: contextValue,
|
|
125
|
-
children:
|
|
126
|
-
|
|
127
|
-
|
|
151
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(StepRoot, {
|
|
152
|
+
as: component,
|
|
153
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
154
|
+
ref: ref,
|
|
155
|
+
ownerState: ownerState,
|
|
156
|
+
role: isTabList ? 'presentation' : undefined,
|
|
157
|
+
...other,
|
|
158
|
+
children: [hasConnector ? connector : null, children]
|
|
159
|
+
})
|
|
128
160
|
});
|
|
129
161
|
});
|
|
130
162
|
process.env.NODE_ENV !== "production" ? Step.propTypes /* remove-proptypes */ = {
|
package/Step/Step.mjs
CHANGED
|
@@ -35,14 +35,47 @@ const StepRoot = styled('li', {
|
|
|
35
35
|
})({
|
|
36
36
|
variants: [{
|
|
37
37
|
props: {
|
|
38
|
-
orientation: 'horizontal'
|
|
38
|
+
orientation: 'horizontal',
|
|
39
|
+
alternativeLabel: false,
|
|
40
|
+
hasConnector: false
|
|
41
|
+
},
|
|
42
|
+
style: {
|
|
43
|
+
paddingLeft: 8
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
props: {
|
|
47
|
+
orientation: 'horizontal',
|
|
48
|
+
alternativeLabel: false,
|
|
49
|
+
last: true
|
|
39
50
|
},
|
|
40
51
|
style: {
|
|
41
|
-
paddingLeft: 8,
|
|
42
52
|
paddingRight: 8
|
|
43
53
|
}
|
|
44
54
|
}, {
|
|
45
55
|
props: {
|
|
56
|
+
orientation: 'horizontal',
|
|
57
|
+
alternativeLabel: false,
|
|
58
|
+
hasConnector: true
|
|
59
|
+
},
|
|
60
|
+
style: {
|
|
61
|
+
flex: '1 1 auto',
|
|
62
|
+
display: 'grid',
|
|
63
|
+
gridTemplateColumns: '1fr auto',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
gap: 8
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
props: {
|
|
69
|
+
orientation: 'vertical',
|
|
70
|
+
alternativeLabel: true
|
|
71
|
+
},
|
|
72
|
+
style: {
|
|
73
|
+
display: 'flex',
|
|
74
|
+
flexDirection: 'column'
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
props: {
|
|
78
|
+
orientation: 'horizontal',
|
|
46
79
|
alternativeLabel: true
|
|
47
80
|
},
|
|
48
81
|
style: {
|
|
@@ -93,6 +126,7 @@ const Step = /*#__PURE__*/React.forwardRef(function Step(inProps, ref) {
|
|
|
93
126
|
completed,
|
|
94
127
|
disabled
|
|
95
128
|
}), [index, last, expanded, active, completed, disabled]);
|
|
129
|
+
const hasConnector = !!connector && index !== 0;
|
|
96
130
|
const ownerState = {
|
|
97
131
|
...props,
|
|
98
132
|
active,
|
|
@@ -101,23 +135,21 @@ const Step = /*#__PURE__*/React.forwardRef(function Step(inProps, ref) {
|
|
|
101
135
|
completed,
|
|
102
136
|
disabled,
|
|
103
137
|
expanded,
|
|
104
|
-
component
|
|
138
|
+
component,
|
|
139
|
+
hasConnector
|
|
105
140
|
};
|
|
106
141
|
const classes = useUtilityClasses(ownerState);
|
|
107
|
-
const newChildren = /*#__PURE__*/_jsxs(StepRoot, {
|
|
108
|
-
as: component,
|
|
109
|
-
className: clsx(classes.root, className),
|
|
110
|
-
ref: ref,
|
|
111
|
-
ownerState: ownerState,
|
|
112
|
-
role: isTabList ? 'presentation' : undefined,
|
|
113
|
-
...other,
|
|
114
|
-
children: [connector && alternativeLabel && index !== 0 ? connector : null, children]
|
|
115
|
-
});
|
|
116
142
|
return /*#__PURE__*/_jsx(StepContext.Provider, {
|
|
117
143
|
value: contextValue,
|
|
118
|
-
children:
|
|
119
|
-
|
|
120
|
-
|
|
144
|
+
children: /*#__PURE__*/_jsxs(StepRoot, {
|
|
145
|
+
as: component,
|
|
146
|
+
className: clsx(classes.root, className),
|
|
147
|
+
ref: ref,
|
|
148
|
+
ownerState: ownerState,
|
|
149
|
+
role: isTabList ? 'presentation' : undefined,
|
|
150
|
+
...other,
|
|
151
|
+
children: [hasConnector ? connector : null, children]
|
|
152
|
+
})
|
|
121
153
|
});
|
|
122
154
|
});
|
|
123
155
|
process.env.NODE_ENV !== "production" ? Step.propTypes /* remove-proptypes */ = {
|
package/StepButton/StepButton.js
CHANGED
|
@@ -12,6 +12,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
14
|
var _zeroStyled = require("../zero-styled");
|
|
15
|
+
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
15
16
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
16
17
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
17
18
|
var _StepLabel = _interopRequireDefault(require("../StepLabel"));
|
|
@@ -43,13 +44,18 @@ const StepButtonRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
43
44
|
[`& .${_stepButtonClasses.default.touchRipple}`]: styles.touchRipple
|
|
44
45
|
}, styles.root, styles[ownerState.orientation]];
|
|
45
46
|
}
|
|
46
|
-
})({
|
|
47
|
+
})((0, _memoTheme.default)(({
|
|
48
|
+
theme
|
|
49
|
+
}) => ({
|
|
47
50
|
width: '100%',
|
|
48
51
|
padding: '24px 16px',
|
|
49
52
|
margin: '-24px -16px',
|
|
50
53
|
boxSizing: 'content-box',
|
|
51
54
|
[`& .${_stepButtonClasses.default.touchRipple}`]: {
|
|
52
|
-
color: 'rgba(0, 0, 0, 0.3)'
|
|
55
|
+
color: 'rgba(0, 0, 0, 0.3)',
|
|
56
|
+
...theme.applyStyles('dark', {
|
|
57
|
+
color: 'rgba(255, 255, 255, 0.3)'
|
|
58
|
+
})
|
|
53
59
|
},
|
|
54
60
|
variants: [{
|
|
55
61
|
props: {
|
|
@@ -61,7 +67,7 @@ const StepButtonRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
61
67
|
margin: '-8px'
|
|
62
68
|
}
|
|
63
69
|
}]
|
|
64
|
-
});
|
|
70
|
+
})));
|
|
65
71
|
const RovingStepButton = /*#__PURE__*/React.forwardRef(function RovingStepButton(props, ref) {
|
|
66
72
|
// eslint-disable-next-line react/prop-types
|
|
67
73
|
const {
|
|
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { styled } from "../zero-styled/index.mjs";
|
|
8
|
+
import memoTheme from "../utils/memoTheme.mjs";
|
|
8
9
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
9
10
|
import ButtonBase from "../ButtonBase/index.mjs";
|
|
10
11
|
import StepLabel from "../StepLabel/index.mjs";
|
|
@@ -36,13 +37,18 @@ const StepButtonRoot = styled(ButtonBase, {
|
|
|
36
37
|
[`& .${stepButtonClasses.touchRipple}`]: styles.touchRipple
|
|
37
38
|
}, styles.root, styles[ownerState.orientation]];
|
|
38
39
|
}
|
|
39
|
-
})({
|
|
40
|
+
})(memoTheme(({
|
|
41
|
+
theme
|
|
42
|
+
}) => ({
|
|
40
43
|
width: '100%',
|
|
41
44
|
padding: '24px 16px',
|
|
42
45
|
margin: '-24px -16px',
|
|
43
46
|
boxSizing: 'content-box',
|
|
44
47
|
[`& .${stepButtonClasses.touchRipple}`]: {
|
|
45
|
-
color: 'rgba(0, 0, 0, 0.3)'
|
|
48
|
+
color: 'rgba(0, 0, 0, 0.3)',
|
|
49
|
+
...theme.applyStyles('dark', {
|
|
50
|
+
color: 'rgba(255, 255, 255, 0.3)'
|
|
51
|
+
})
|
|
46
52
|
},
|
|
47
53
|
variants: [{
|
|
48
54
|
props: {
|
|
@@ -54,7 +60,7 @@ const StepButtonRoot = styled(ButtonBase, {
|
|
|
54
60
|
margin: '-8px'
|
|
55
61
|
}
|
|
56
62
|
}]
|
|
57
|
-
});
|
|
63
|
+
})));
|
|
58
64
|
const RovingStepButton = /*#__PURE__*/React.forwardRef(function RovingStepButton(props, ref) {
|
|
59
65
|
// eslint-disable-next-line react/prop-types
|
|
60
66
|
const {
|
|
@@ -53,6 +53,16 @@ const StepConnectorRoot = (0, _zeroStyled.styled)('div', {
|
|
|
53
53
|
}
|
|
54
54
|
}, {
|
|
55
55
|
props: {
|
|
56
|
+
orientation: 'vertical',
|
|
57
|
+
alternativeLabel: true
|
|
58
|
+
},
|
|
59
|
+
style: {
|
|
60
|
+
marginLeft: 'auto',
|
|
61
|
+
marginRight: 12 // half icon
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
props: {
|
|
65
|
+
orientation: 'horizontal',
|
|
56
66
|
alternativeLabel: true
|
|
57
67
|
},
|
|
58
68
|
style: {
|
|
@@ -46,6 +46,16 @@ const StepConnectorRoot = styled('div', {
|
|
|
46
46
|
}
|
|
47
47
|
}, {
|
|
48
48
|
props: {
|
|
49
|
+
orientation: 'vertical',
|
|
50
|
+
alternativeLabel: true
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
marginLeft: 'auto',
|
|
54
|
+
marginRight: 12 // half icon
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
props: {
|
|
58
|
+
orientation: 'horizontal',
|
|
49
59
|
alternativeLabel: true
|
|
50
60
|
},
|
|
51
61
|
style: {
|
|
@@ -3,13 +3,13 @@ import { SxProps } from '@mui/system';
|
|
|
3
3
|
import { Theme } from "../styles/index.mjs";
|
|
4
4
|
import { InternalStandardProps as StandardProps } from "../internal/index.mjs";
|
|
5
5
|
import { CollapseProps } from "../Collapse/index.mjs";
|
|
6
|
-
import { TransitionProps } from "../transitions/
|
|
6
|
+
import { TransitionProps } from "../transitions/types.mjs";
|
|
7
7
|
import { StepContentClasses } from "./stepContentClasses.mjs";
|
|
8
8
|
import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.mjs";
|
|
9
9
|
export interface StepContentSlots {
|
|
10
10
|
/**
|
|
11
11
|
* The component that renders the transition slot.
|
|
12
|
-
* [Follow this guide](
|
|
12
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
13
13
|
* @default Collapse
|
|
14
14
|
*/
|
|
15
15
|
transition?: React.JSXElementConstructor<TransitionProps & {
|
|
@@ -3,13 +3,13 @@ import { SxProps } from '@mui/system';
|
|
|
3
3
|
import { Theme } from "../styles/index.js";
|
|
4
4
|
import { InternalStandardProps as StandardProps } from "../internal/index.js";
|
|
5
5
|
import { CollapseProps } from "../Collapse/index.js";
|
|
6
|
-
import { TransitionProps } from "../transitions/
|
|
6
|
+
import { TransitionProps } from "../transitions/types.js";
|
|
7
7
|
import { StepContentClasses } from "./stepContentClasses.js";
|
|
8
8
|
import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js";
|
|
9
9
|
export interface StepContentSlots {
|
|
10
10
|
/**
|
|
11
11
|
* The component that renders the transition slot.
|
|
12
|
-
* [Follow this guide](
|
|
12
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
13
13
|
* @default Collapse
|
|
14
14
|
*/
|
|
15
15
|
transition?: React.JSXElementConstructor<TransitionProps & {
|
|
@@ -56,6 +56,28 @@ const StepContentRoot = (0, _zeroStyled.styled)('div', {
|
|
|
56
56
|
style: {
|
|
57
57
|
borderLeft: 'none'
|
|
58
58
|
}
|
|
59
|
+
}, {
|
|
60
|
+
props: {
|
|
61
|
+
alternativeLabel: true
|
|
62
|
+
},
|
|
63
|
+
style: {
|
|
64
|
+
marginLeft: 0,
|
|
65
|
+
marginRight: 12,
|
|
66
|
+
// half icon
|
|
67
|
+
paddingLeft: 8,
|
|
68
|
+
paddingRight: 8 + 12,
|
|
69
|
+
// margin + half icon
|
|
70
|
+
borderLeft: 'none',
|
|
71
|
+
borderRight: theme.vars ? `1px solid ${theme.vars.palette.StepContent.border}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
props: {
|
|
75
|
+
alternativeLabel: true,
|
|
76
|
+
last: true
|
|
77
|
+
},
|
|
78
|
+
style: {
|
|
79
|
+
borderRight: 'none'
|
|
80
|
+
}
|
|
59
81
|
}]
|
|
60
82
|
})));
|
|
61
83
|
const StepContentTransition = (0, _zeroStyled.styled)(_Collapse.default, {
|
|
@@ -76,7 +98,8 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
|
|
|
76
98
|
...other
|
|
77
99
|
} = props;
|
|
78
100
|
const {
|
|
79
|
-
orientation
|
|
101
|
+
orientation,
|
|
102
|
+
alternativeLabel
|
|
80
103
|
} = (0, _StepperContext.useStepperContext)();
|
|
81
104
|
const {
|
|
82
105
|
active,
|
|
@@ -85,7 +108,8 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
|
|
|
85
108
|
} = React.useContext(_StepContext.default);
|
|
86
109
|
const ownerState = {
|
|
87
110
|
...props,
|
|
88
|
-
last
|
|
111
|
+
last,
|
|
112
|
+
alternativeLabel
|
|
89
113
|
};
|
|
90
114
|
const classes = useUtilityClasses(ownerState);
|
|
91
115
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -49,6 +49,28 @@ const StepContentRoot = styled('div', {
|
|
|
49
49
|
style: {
|
|
50
50
|
borderLeft: 'none'
|
|
51
51
|
}
|
|
52
|
+
}, {
|
|
53
|
+
props: {
|
|
54
|
+
alternativeLabel: true
|
|
55
|
+
},
|
|
56
|
+
style: {
|
|
57
|
+
marginLeft: 0,
|
|
58
|
+
marginRight: 12,
|
|
59
|
+
// half icon
|
|
60
|
+
paddingLeft: 8,
|
|
61
|
+
paddingRight: 8 + 12,
|
|
62
|
+
// margin + half icon
|
|
63
|
+
borderLeft: 'none',
|
|
64
|
+
borderRight: theme.vars ? `1px solid ${theme.vars.palette.StepContent.border}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
props: {
|
|
68
|
+
alternativeLabel: true,
|
|
69
|
+
last: true
|
|
70
|
+
},
|
|
71
|
+
style: {
|
|
72
|
+
borderRight: 'none'
|
|
73
|
+
}
|
|
52
74
|
}]
|
|
53
75
|
})));
|
|
54
76
|
const StepContentTransition = styled(Collapse, {
|
|
@@ -69,7 +91,8 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
|
|
|
69
91
|
...other
|
|
70
92
|
} = props;
|
|
71
93
|
const {
|
|
72
|
-
orientation
|
|
94
|
+
orientation,
|
|
95
|
+
alternativeLabel
|
|
73
96
|
} = useStepperContext();
|
|
74
97
|
const {
|
|
75
98
|
active,
|
|
@@ -78,7 +101,8 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
|
|
|
78
101
|
} = React.useContext(StepContext);
|
|
79
102
|
const ownerState = {
|
|
80
103
|
...props,
|
|
81
|
-
last
|
|
104
|
+
last,
|
|
105
|
+
alternativeLabel
|
|
82
106
|
};
|
|
83
107
|
const classes = useUtilityClasses(ownerState);
|
|
84
108
|
if (process.env.NODE_ENV !== 'production') {
|
package/StepIcon/StepIcon.js
CHANGED
|
@@ -18,6 +18,7 @@ var _CheckCircle = _interopRequireDefault(require("../internal/svg-icons/CheckCi
|
|
|
18
18
|
var _Warning = _interopRequireDefault(require("../internal/svg-icons/Warning"));
|
|
19
19
|
var _SvgIcon = _interopRequireDefault(require("../SvgIcon"));
|
|
20
20
|
var _stepIconClasses = _interopRequireWildcard(require("./stepIconClasses"));
|
|
21
|
+
var _utils = require("../transitions/utils");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
var _circle;
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
@@ -40,7 +41,7 @@ const StepIconRoot = (0, _zeroStyled.styled)(_SvgIcon.default, {
|
|
|
40
41
|
theme
|
|
41
42
|
}) => ({
|
|
42
43
|
display: 'block',
|
|
43
|
-
|
|
44
|
+
...(0, _utils.getTransitionStyles)(theme, 'color', {
|
|
44
45
|
duration: theme.transitions.duration.shortest
|
|
45
46
|
}),
|
|
46
47
|
color: (theme.vars || theme).palette.text.disabled,
|
package/StepIcon/StepIcon.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import CheckCircle from "../internal/svg-icons/CheckCircle.mjs";
|
|
|
12
12
|
import Warning from "../internal/svg-icons/Warning.mjs";
|
|
13
13
|
import SvgIcon from "../SvgIcon/index.mjs";
|
|
14
14
|
import stepIconClasses, { getStepIconUtilityClass } from "./stepIconClasses.mjs";
|
|
15
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
15
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
const useUtilityClasses = ownerState => {
|
|
17
18
|
const {
|
|
@@ -33,7 +34,7 @@ const StepIconRoot = styled(SvgIcon, {
|
|
|
33
34
|
theme
|
|
34
35
|
}) => ({
|
|
35
36
|
display: 'block',
|
|
36
|
-
|
|
37
|
+
...getTransitionStyles(theme, 'color', {
|
|
37
38
|
duration: theme.transitions.duration.shortest
|
|
38
39
|
}),
|
|
39
40
|
color: (theme.vars || theme).palette.text.disabled,
|
package/StepLabel/StepLabel.js
CHANGED
|
@@ -19,6 +19,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
19
19
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
20
20
|
var _stepLabelClasses = _interopRequireWildcard(require("./stepLabelClasses"));
|
|
21
21
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
22
|
+
var _utils = require("../transitions/utils");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
24
25
|
const {
|
|
@@ -50,9 +51,6 @@ const StepLabelRoot = (0, _zeroStyled.styled)('span', {
|
|
|
50
51
|
})({
|
|
51
52
|
display: 'flex',
|
|
52
53
|
alignItems: 'center',
|
|
53
|
-
[`&.${_stepLabelClasses.default.alternativeLabel}`]: {
|
|
54
|
-
flexDirection: 'column'
|
|
55
|
-
},
|
|
56
54
|
[`&.${_stepLabelClasses.default.disabled}`]: {
|
|
57
55
|
cursor: 'default'
|
|
58
56
|
},
|
|
@@ -64,6 +62,21 @@ const StepLabelRoot = (0, _zeroStyled.styled)('span', {
|
|
|
64
62
|
textAlign: 'left',
|
|
65
63
|
padding: '8px 0'
|
|
66
64
|
}
|
|
65
|
+
}, {
|
|
66
|
+
props: {
|
|
67
|
+
alternativeLabel: true
|
|
68
|
+
},
|
|
69
|
+
style: {
|
|
70
|
+
flexDirection: 'column'
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
props: {
|
|
74
|
+
orientation: 'vertical',
|
|
75
|
+
alternativeLabel: true
|
|
76
|
+
},
|
|
77
|
+
style: {
|
|
78
|
+
flexDirection: 'row-reverse'
|
|
79
|
+
}
|
|
67
80
|
}]
|
|
68
81
|
});
|
|
69
82
|
const StepLabelLabel = (0, _zeroStyled.styled)('span', {
|
|
@@ -74,7 +87,7 @@ const StepLabelLabel = (0, _zeroStyled.styled)('span', {
|
|
|
74
87
|
}) => ({
|
|
75
88
|
...theme.typography.body2,
|
|
76
89
|
display: 'block',
|
|
77
|
-
|
|
90
|
+
...(0, _utils.getTransitionStyles)(theme, 'color', {
|
|
78
91
|
duration: theme.transitions.duration.shortest
|
|
79
92
|
}),
|
|
80
93
|
[`&.${_stepLabelClasses.default.active}, &.${_stepLabelClasses.default.completed}`]: {
|
|
@@ -86,7 +99,18 @@ const StepLabelLabel = (0, _zeroStyled.styled)('span', {
|
|
|
86
99
|
},
|
|
87
100
|
[`&.${_stepLabelClasses.default.error}`]: {
|
|
88
101
|
color: (theme.vars || theme).palette.error.main
|
|
89
|
-
}
|
|
102
|
+
},
|
|
103
|
+
variants: [{
|
|
104
|
+
props: {
|
|
105
|
+
orientation: 'vertical',
|
|
106
|
+
alternativeLabel: true
|
|
107
|
+
},
|
|
108
|
+
style: {
|
|
109
|
+
[`&.${_stepLabelClasses.default.alternativeLabel}`]: {
|
|
110
|
+
marginTop: 0
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}]
|
|
90
114
|
})));
|
|
91
115
|
const StepLabelIconContainer = (0, _zeroStyled.styled)('span', {
|
|
92
116
|
name: 'MuiStepLabel',
|
|
@@ -97,7 +121,17 @@ const StepLabelIconContainer = (0, _zeroStyled.styled)('span', {
|
|
|
97
121
|
paddingRight: 8,
|
|
98
122
|
[`&.${_stepLabelClasses.default.alternativeLabel}`]: {
|
|
99
123
|
paddingRight: 0
|
|
100
|
-
}
|
|
124
|
+
},
|
|
125
|
+
variants: [{
|
|
126
|
+
props: {
|
|
127
|
+
orientation: 'vertical',
|
|
128
|
+
alternativeLabel: true
|
|
129
|
+
},
|
|
130
|
+
style: {
|
|
131
|
+
paddingRight: 0,
|
|
132
|
+
paddingLeft: 8
|
|
133
|
+
}
|
|
134
|
+
}]
|
|
101
135
|
});
|
|
102
136
|
const StepLabelLabelContainer = (0, _zeroStyled.styled)('span', {
|
|
103
137
|
name: 'MuiStepLabel',
|
|
@@ -109,7 +143,18 @@ const StepLabelLabelContainer = (0, _zeroStyled.styled)('span', {
|
|
|
109
143
|
color: (theme.vars || theme).palette.text.secondary,
|
|
110
144
|
[`&.${_stepLabelClasses.default.alternativeLabel}`]: {
|
|
111
145
|
textAlign: 'center'
|
|
112
|
-
}
|
|
146
|
+
},
|
|
147
|
+
variants: [{
|
|
148
|
+
props: {
|
|
149
|
+
orientation: 'vertical',
|
|
150
|
+
alternativeLabel: true
|
|
151
|
+
},
|
|
152
|
+
style: {
|
|
153
|
+
[`&.${_stepLabelClasses.default.alternativeLabel}`]: {
|
|
154
|
+
textAlign: 'right'
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}]
|
|
113
158
|
})));
|
|
114
159
|
const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
|
|
115
160
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|