@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
|
@@ -6,21 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var _system = require("@mui/system");
|
|
15
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
15
|
var _styles = require("../styles");
|
|
17
|
-
var
|
|
18
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
16
|
+
var _zeroStyled = require("../zero-styled");
|
|
19
17
|
var _skeletonClasses = require("./skeletonClasses");
|
|
20
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
19
|
const _excluded = ["animation", "className", "component", "height", "style", "variant", "width"];
|
|
22
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSkeleton');
|
|
24
23
|
const useUtilityClasses = ownerState => {
|
|
25
24
|
const {
|
|
26
25
|
classes,
|
|
@@ -35,7 +34,7 @@ const useUtilityClasses = ownerState => {
|
|
|
35
34
|
};
|
|
36
35
|
return (0, _composeClasses.default)(slots, _skeletonClasses.getSkeletonUtilityClass, classes);
|
|
37
36
|
};
|
|
38
|
-
const pulseKeyframe = (0,
|
|
37
|
+
const pulseKeyframe = (0, _zeroStyled.keyframes)`
|
|
39
38
|
0% {
|
|
40
39
|
opacity: 1;
|
|
41
40
|
}
|
|
@@ -48,7 +47,7 @@ const pulseKeyframe = (0, _system.keyframes)`
|
|
|
48
47
|
opacity: 1;
|
|
49
48
|
}
|
|
50
49
|
`;
|
|
51
|
-
const waveKeyframe = (0,
|
|
50
|
+
const waveKeyframe = (0, _zeroStyled.keyframes)`
|
|
52
51
|
0% {
|
|
53
52
|
transform: translateX(-100%);
|
|
54
53
|
}
|
|
@@ -62,7 +61,17 @@ const waveKeyframe = (0, _system.keyframes)`
|
|
|
62
61
|
transform: translateX(100%);
|
|
63
62
|
}
|
|
64
63
|
`;
|
|
65
|
-
|
|
64
|
+
|
|
65
|
+
// This implementation is for supporting both Styled-components v4+ and Pigment CSS.
|
|
66
|
+
// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).
|
|
67
|
+
// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).
|
|
68
|
+
const pulseAnimation = typeof pulseKeyframe !== 'string' ? (0, _zeroStyled.css)`
|
|
69
|
+
animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
|
|
70
|
+
` : null;
|
|
71
|
+
const waveAnimation = typeof waveKeyframe !== 'string' ? (0, _zeroStyled.css)`
|
|
72
|
+
animation: ${waveKeyframe} 2s linear 0.5s infinite;
|
|
73
|
+
` : null;
|
|
74
|
+
const SkeletonRoot = (0, _zeroStyled.styled)('span', {
|
|
66
75
|
name: 'MuiSkeleton',
|
|
67
76
|
slot: 'Root',
|
|
68
77
|
overridesResolver: (props, styles) => {
|
|
@@ -72,72 +81,111 @@ const SkeletonRoot = (0, _styled.default)('span', {
|
|
|
72
81
|
return [styles.root, styles[ownerState.variant], ownerState.animation !== false && styles[ownerState.animation], ownerState.hasChildren && styles.withChildren, ownerState.hasChildren && !ownerState.width && styles.fitContent, ownerState.hasChildren && !ownerState.height && styles.heightAuto];
|
|
73
82
|
}
|
|
74
83
|
})(({
|
|
75
|
-
theme
|
|
76
|
-
ownerState
|
|
84
|
+
theme
|
|
77
85
|
}) => {
|
|
78
86
|
const radiusUnit = (0, _styles.unstable_getUnit)(theme.shape.borderRadius) || 'px';
|
|
79
87
|
const radiusValue = (0, _styles.unstable_toUnitless)(theme.shape.borderRadius);
|
|
80
|
-
return
|
|
88
|
+
return {
|
|
81
89
|
display: 'block',
|
|
82
90
|
// Create a "on paper" color with sufficient contrast retaining the color
|
|
83
91
|
backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : (0, _styles.alpha)(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
|
|
84
|
-
height: '1.2em'
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}, ownerState.hasChildren && {
|
|
100
|
-
'& > *': {
|
|
101
|
-
visibility: 'hidden'
|
|
102
|
-
}
|
|
103
|
-
}, ownerState.hasChildren && !ownerState.width && {
|
|
104
|
-
maxWidth: 'fit-content'
|
|
105
|
-
}, ownerState.hasChildren && !ownerState.height && {
|
|
106
|
-
height: 'auto'
|
|
107
|
-
});
|
|
108
|
-
}, ({
|
|
109
|
-
ownerState
|
|
110
|
-
}) => ownerState.animation === 'pulse' && (0, _system.css)`
|
|
111
|
-
animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
|
|
112
|
-
`, ({
|
|
113
|
-
ownerState,
|
|
114
|
-
theme
|
|
115
|
-
}) => ownerState.animation === 'wave' && (0, _system.css)`
|
|
116
|
-
position: relative;
|
|
117
|
-
overflow: hidden;
|
|
118
|
-
|
|
119
|
-
/* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
|
|
120
|
-
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
|
121
|
-
|
|
122
|
-
&::after {
|
|
123
|
-
animation: ${waveKeyframe} 2s linear 0.5s infinite;
|
|
124
|
-
background: linear-gradient(
|
|
125
|
-
90deg,
|
|
126
|
-
transparent,
|
|
127
|
-
${(theme.vars || theme).palette.action.hover},
|
|
128
|
-
transparent
|
|
129
|
-
);
|
|
130
|
-
content: '';
|
|
131
|
-
position: absolute;
|
|
132
|
-
transform: translateX(-100%); /* Avoid flash during server-side hydration */
|
|
133
|
-
bottom: 0;
|
|
134
|
-
left: 0;
|
|
135
|
-
right: 0;
|
|
136
|
-
top: 0;
|
|
92
|
+
height: '1.2em',
|
|
93
|
+
variants: [{
|
|
94
|
+
props: {
|
|
95
|
+
variant: 'text'
|
|
96
|
+
},
|
|
97
|
+
style: {
|
|
98
|
+
marginTop: 0,
|
|
99
|
+
marginBottom: 0,
|
|
100
|
+
height: 'auto',
|
|
101
|
+
transformOrigin: '0 55%',
|
|
102
|
+
transform: 'scale(1, 0.60)',
|
|
103
|
+
borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,
|
|
104
|
+
'&:empty:before': {
|
|
105
|
+
content: '"\\00a0"'
|
|
106
|
+
}
|
|
137
107
|
}
|
|
138
|
-
|
|
108
|
+
}, {
|
|
109
|
+
props: {
|
|
110
|
+
variant: 'circular'
|
|
111
|
+
},
|
|
112
|
+
style: {
|
|
113
|
+
borderRadius: '50%'
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
props: {
|
|
117
|
+
variant: 'rounded'
|
|
118
|
+
},
|
|
119
|
+
style: {
|
|
120
|
+
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
props: ({
|
|
124
|
+
ownerState
|
|
125
|
+
}) => ownerState.hasChildren,
|
|
126
|
+
style: {
|
|
127
|
+
'& > *': {
|
|
128
|
+
visibility: 'hidden'
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
props: ({
|
|
133
|
+
ownerState
|
|
134
|
+
}) => ownerState.hasChildren && !ownerState.width,
|
|
135
|
+
style: {
|
|
136
|
+
maxWidth: 'fit-content'
|
|
137
|
+
}
|
|
138
|
+
}, {
|
|
139
|
+
props: ({
|
|
140
|
+
ownerState
|
|
141
|
+
}) => ownerState.hasChildren && !ownerState.height,
|
|
142
|
+
style: {
|
|
143
|
+
height: 'auto'
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
props: {
|
|
147
|
+
animation: 'pulse'
|
|
148
|
+
},
|
|
149
|
+
style: pulseAnimation || {
|
|
150
|
+
animation: `${pulseKeyframe} 2s ease-in-out 0.5s infinite`
|
|
151
|
+
}
|
|
152
|
+
}, {
|
|
153
|
+
props: {
|
|
154
|
+
animation: 'wave'
|
|
155
|
+
},
|
|
156
|
+
style: {
|
|
157
|
+
position: 'relative',
|
|
158
|
+
overflow: 'hidden',
|
|
159
|
+
/* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
|
|
160
|
+
WebkitMaskImage: '-webkit-radial-gradient(white, black)',
|
|
161
|
+
'&::after': {
|
|
162
|
+
background: `linear-gradient(
|
|
163
|
+
90deg,
|
|
164
|
+
transparent,
|
|
165
|
+
${(theme.vars || theme).palette.action.hover},
|
|
166
|
+
transparent
|
|
167
|
+
)`,
|
|
168
|
+
content: '""',
|
|
169
|
+
position: 'absolute',
|
|
170
|
+
transform: 'translateX(-100%)' /* Avoid flash during server-side hydration */,
|
|
171
|
+
bottom: 0,
|
|
172
|
+
left: 0,
|
|
173
|
+
right: 0,
|
|
174
|
+
top: 0
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}, {
|
|
178
|
+
props: {
|
|
179
|
+
animation: 'wave'
|
|
180
|
+
},
|
|
181
|
+
style: waveAnimation || {
|
|
182
|
+
animation: `${waveKeyframe} 2s linear 0.5s infinite`
|
|
183
|
+
}
|
|
184
|
+
}]
|
|
185
|
+
};
|
|
186
|
+
});
|
|
139
187
|
const Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
|
|
140
|
-
const props = (
|
|
188
|
+
const props = useThemeProps({
|
|
141
189
|
props: inProps,
|
|
142
190
|
name: 'MuiSkeleton'
|
|
143
191
|
});
|
package/node/Slider/Slider.js
CHANGED
|
@@ -820,7 +820,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
820
820
|
/**
|
|
821
821
|
* The components used for each slot inside.
|
|
822
822
|
*
|
|
823
|
-
* @deprecated use the `slots` prop instead. This prop will be removed in v7. [
|
|
823
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
824
824
|
*
|
|
825
825
|
* @default {}
|
|
826
826
|
*/
|
|
@@ -838,7 +838,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
838
838
|
* The extra props for the slot components.
|
|
839
839
|
* You can override the existing props or add new ones.
|
|
840
840
|
*
|
|
841
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [
|
|
841
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
842
842
|
*
|
|
843
843
|
* @default {}
|
|
844
844
|
*/
|
|
@@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _utils = require("@mui/base/utils");
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
15
|
var _ClickAwayListener = require("@mui/base/ClickAwayListener");
|
|
16
16
|
var _useSnackbar = require("@mui/base/useSnackbar");
|
|
17
|
-
var
|
|
17
|
+
var _zeroStyled = require("../zero-styled");
|
|
18
18
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
19
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
20
19
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
21
20
|
var _Grow = _interopRequireDefault(require("../Grow"));
|
|
22
21
|
var _SnackbarContent = _interopRequireDefault(require("../SnackbarContent"));
|
|
@@ -26,6 +25,7 @@ const _excluded = ["onEnter", "onExited"],
|
|
|
26
25
|
_excluded2 = ["action", "anchorOrigin", "autoHideDuration", "children", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"];
|
|
27
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
28
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSnackbar');
|
|
29
29
|
const useUtilityClasses = ownerState => {
|
|
30
30
|
const {
|
|
31
31
|
classes,
|
|
@@ -36,7 +36,7 @@ const useUtilityClasses = ownerState => {
|
|
|
36
36
|
};
|
|
37
37
|
return (0, _composeClasses.default)(slots, _snackbarClasses.getSnackbarUtilityClass, classes);
|
|
38
38
|
};
|
|
39
|
-
const SnackbarRoot = (0,
|
|
39
|
+
const SnackbarRoot = (0, _zeroStyled.styled)('div', {
|
|
40
40
|
name: 'MuiSnackbar',
|
|
41
41
|
slot: 'Root',
|
|
42
42
|
overridesResolver: (props, styles) => {
|
|
@@ -46,46 +46,72 @@ const SnackbarRoot = (0, _styled.default)('div', {
|
|
|
46
46
|
return [styles.root, styles[`anchorOrigin${(0, _capitalize.default)(ownerState.anchorOrigin.vertical)}${(0, _capitalize.default)(ownerState.anchorOrigin.horizontal)}`]];
|
|
47
47
|
}
|
|
48
48
|
})(({
|
|
49
|
-
theme
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
bottom: 8
|
|
69
|
-
}, ownerState.anchorOrigin.horizontal === 'left' && {
|
|
70
|
-
justifyContent: 'flex-start'
|
|
71
|
-
}, ownerState.anchorOrigin.horizontal === 'right' && {
|
|
72
|
-
justifyContent: 'flex-end'
|
|
49
|
+
theme
|
|
50
|
+
}) => ({
|
|
51
|
+
zIndex: (theme.vars || theme).zIndex.snackbar,
|
|
52
|
+
position: 'fixed',
|
|
53
|
+
display: 'flex',
|
|
54
|
+
left: 8,
|
|
55
|
+
right: 8,
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
variants: [{
|
|
59
|
+
props: ({
|
|
60
|
+
ownerState
|
|
61
|
+
}) => ownerState.anchorOrigin.vertical === 'top',
|
|
62
|
+
style: {
|
|
63
|
+
top: 8,
|
|
64
|
+
[theme.breakpoints.up('sm')]: {
|
|
65
|
+
top: 24
|
|
66
|
+
}
|
|
67
|
+
}
|
|
73
68
|
}, {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
})
|
|
69
|
+
props: ({
|
|
70
|
+
ownerState
|
|
71
|
+
}) => ownerState.anchorOrigin.vertical !== 'top',
|
|
72
|
+
style: {
|
|
73
|
+
bottom: 8,
|
|
74
|
+
[theme.breakpoints.up('sm')]: {
|
|
75
|
+
bottom: 24
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
props: ({
|
|
80
|
+
ownerState
|
|
81
|
+
}) => ownerState.anchorOrigin.horizontal === 'left',
|
|
82
|
+
style: {
|
|
83
|
+
justifyContent: 'flex-start',
|
|
84
|
+
[theme.breakpoints.up('sm')]: {
|
|
85
|
+
left: 24,
|
|
86
|
+
right: 'auto'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
props: ({
|
|
91
|
+
ownerState
|
|
92
|
+
}) => ownerState.anchorOrigin.horizontal === 'right',
|
|
93
|
+
style: {
|
|
94
|
+
justifyContent: 'flex-end',
|
|
95
|
+
[theme.breakpoints.up('sm')]: {
|
|
96
|
+
right: 24,
|
|
97
|
+
left: 'auto'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
props: ({
|
|
102
|
+
ownerState
|
|
103
|
+
}) => ownerState.anchorOrigin.horizontal === 'center',
|
|
104
|
+
style: {
|
|
105
|
+
[theme.breakpoints.up('sm')]: {
|
|
106
|
+
left: '50%',
|
|
107
|
+
right: 'auto',
|
|
108
|
+
transform: 'translateX(-50%)'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}]
|
|
112
|
+
}));
|
|
87
113
|
const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
88
|
-
const props = (
|
|
114
|
+
const props = useThemeProps({
|
|
89
115
|
props: inProps,
|
|
90
116
|
name: 'MuiSnackbar'
|
|
91
117
|
});
|
|
@@ -13,14 +13,14 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
15
|
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
16
|
-
var
|
|
17
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
16
|
+
var _zeroStyled = require("../zero-styled");
|
|
18
17
|
var _Paper = _interopRequireDefault(require("../Paper"));
|
|
19
18
|
var _snackbarContentClasses = require("./snackbarContentClasses");
|
|
20
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
20
|
const _excluded = ["action", "className", "message", "role"];
|
|
22
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSnackbarContent');
|
|
24
24
|
const useUtilityClasses = ownerState => {
|
|
25
25
|
const {
|
|
26
26
|
classes
|
|
@@ -32,7 +32,7 @@ const useUtilityClasses = ownerState => {
|
|
|
32
32
|
};
|
|
33
33
|
return (0, _composeClasses.default)(slots, _snackbarContentClasses.getSnackbarContentUtilityClass, classes);
|
|
34
34
|
};
|
|
35
|
-
const SnackbarContentRoot = (0,
|
|
35
|
+
const SnackbarContentRoot = (0, _zeroStyled.styled)(_Paper.default, {
|
|
36
36
|
name: 'MuiSnackbarContent',
|
|
37
37
|
slot: 'Root',
|
|
38
38
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -56,14 +56,14 @@ const SnackbarContentRoot = (0, _styled.default)(_Paper.default, {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
|
-
const SnackbarContentMessage = (0,
|
|
59
|
+
const SnackbarContentMessage = (0, _zeroStyled.styled)('div', {
|
|
60
60
|
name: 'MuiSnackbarContent',
|
|
61
61
|
slot: 'Message',
|
|
62
62
|
overridesResolver: (props, styles) => styles.message
|
|
63
63
|
})({
|
|
64
64
|
padding: '8px 0'
|
|
65
65
|
});
|
|
66
|
-
const SnackbarContentAction = (0,
|
|
66
|
+
const SnackbarContentAction = (0, _zeroStyled.styled)('div', {
|
|
67
67
|
name: 'MuiSnackbarContent',
|
|
68
68
|
slot: 'Action',
|
|
69
69
|
overridesResolver: (props, styles) => styles.action
|
|
@@ -75,7 +75,7 @@ const SnackbarContentAction = (0, _styled.default)('div', {
|
|
|
75
75
|
marginRight: -8
|
|
76
76
|
});
|
|
77
77
|
const SnackbarContent = /*#__PURE__*/React.forwardRef(function SnackbarContent(inProps, ref) {
|
|
78
|
-
const props = (
|
|
78
|
+
const props = useThemeProps({
|
|
79
79
|
props: inProps,
|
|
80
80
|
name: 'MuiSnackbarContent'
|
|
81
81
|
});
|