@mui/material 6.0.0-alpha.5 → 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 +48 -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 +1 -1
- package/FormControlLabel/FormControlLabel.js +1 -1
- 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 +1 -1
- package/PaginationItem/PaginationItem.js +1 -1
- 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/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 +1 -1
- 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 +1 -1
- 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/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 +1 -1
- 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 +1 -1
- 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/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 +4 -4
- package/umd/material-ui.development.js +2585 -1287
- package/umd/material-ui.production.min.js +4 -4
|
@@ -15,14 +15,15 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
15
15
|
var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
|
|
16
16
|
var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
|
|
17
17
|
var _FormLabel = _interopRequireWildcard(require("../FormLabel"));
|
|
18
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
19
18
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
20
|
-
var
|
|
19
|
+
var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
|
|
20
|
+
var _zeroStyled = require("../zero-styled");
|
|
21
21
|
var _inputLabelClasses = require("./inputLabelClasses");
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
const _excluded = ["disableAnimation", "margin", "shrink", "variant", "className"];
|
|
24
24
|
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); }
|
|
25
25
|
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; }
|
|
26
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiInputLabel');
|
|
26
27
|
const useUtilityClasses = ownerState => {
|
|
27
28
|
const {
|
|
28
29
|
classes,
|
|
@@ -40,8 +41,8 @@ const useUtilityClasses = ownerState => {
|
|
|
40
41
|
const composedClasses = (0, _composeClasses.default)(slots, _inputLabelClasses.getInputLabelUtilityClasses, classes);
|
|
41
42
|
return (0, _extends2.default)({}, classes, composedClasses);
|
|
42
43
|
};
|
|
43
|
-
const InputLabelRoot = (0,
|
|
44
|
-
shouldForwardProp: prop => (0,
|
|
44
|
+
const InputLabelRoot = (0, _zeroStyled.styled)(_FormLabel.default, {
|
|
45
|
+
shouldForwardProp: prop => (0, _rootShouldForwardProp.default)(prop) || prop === 'classes',
|
|
45
46
|
name: 'MuiInputLabel',
|
|
46
47
|
slot: 'Root',
|
|
47
48
|
overridesResolver: (props, styles) => {
|
|
@@ -53,69 +54,130 @@ const InputLabelRoot = (0, _styled.default)(_FormLabel.default, {
|
|
|
53
54
|
}, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, ownerState.focused && styles.focused, styles[ownerState.variant]];
|
|
54
55
|
}
|
|
55
56
|
})(({
|
|
56
|
-
theme
|
|
57
|
-
|
|
58
|
-
}) => (0, _extends2.default)({
|
|
57
|
+
theme
|
|
58
|
+
}) => ({
|
|
59
59
|
display: 'block',
|
|
60
60
|
transformOrigin: 'top left',
|
|
61
61
|
whiteSpace: 'nowrap',
|
|
62
62
|
overflow: 'hidden',
|
|
63
63
|
textOverflow: 'ellipsis',
|
|
64
|
-
maxWidth: '100%'
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
64
|
+
maxWidth: '100%',
|
|
65
|
+
variants: [{
|
|
66
|
+
props: ({
|
|
67
|
+
ownerState
|
|
68
|
+
}) => ownerState.formControl,
|
|
69
|
+
style: {
|
|
70
|
+
position: 'absolute',
|
|
71
|
+
left: 0,
|
|
72
|
+
top: 0,
|
|
73
|
+
// slight alteration to spec spacing to match visual spec result
|
|
74
|
+
transform: 'translate(0, 20px) scale(1)'
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
props: {
|
|
78
|
+
size: 'small'
|
|
79
|
+
},
|
|
80
|
+
style: {
|
|
81
|
+
// Compensation for the `Input.inputSizeSmall` style.
|
|
82
|
+
transform: 'translate(0, 17px) scale(1)'
|
|
83
|
+
}
|
|
84
|
+
}, {
|
|
85
|
+
props: ({
|
|
86
|
+
ownerState
|
|
87
|
+
}) => ownerState.shrink,
|
|
88
|
+
style: {
|
|
89
|
+
transform: 'translate(0, -1.5px) scale(0.75)',
|
|
90
|
+
transformOrigin: 'top left',
|
|
91
|
+
maxWidth: '133%'
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
props: ({
|
|
95
|
+
ownerState
|
|
96
|
+
}) => !ownerState.disableAnimation,
|
|
97
|
+
style: {
|
|
98
|
+
transition: theme.transitions.create(['color', 'transform', 'max-width'], {
|
|
99
|
+
duration: theme.transitions.duration.shorter,
|
|
100
|
+
easing: theme.transitions.easing.easeOut
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
props: {
|
|
105
|
+
variant: 'filled'
|
|
106
|
+
},
|
|
107
|
+
style: {
|
|
108
|
+
// Chrome's autofill feature gives the input field a yellow background.
|
|
109
|
+
// Since the input field is behind the label in the HTML tree,
|
|
110
|
+
// the input field is drawn last and hides the label with an opaque background color.
|
|
111
|
+
// zIndex: 1 will raise the label above opaque background-colors of input.
|
|
112
|
+
zIndex: 1,
|
|
113
|
+
pointerEvents: 'none',
|
|
114
|
+
transform: 'translate(12px, 16px) scale(1)',
|
|
115
|
+
maxWidth: 'calc(100% - 24px)'
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
props: {
|
|
119
|
+
variant: 'filled',
|
|
120
|
+
size: 'small'
|
|
121
|
+
},
|
|
122
|
+
style: {
|
|
123
|
+
transform: 'translate(12px, 13px) scale(1)'
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
props: ({
|
|
127
|
+
variant,
|
|
128
|
+
ownerState
|
|
129
|
+
}) => variant === 'filled' && ownerState.shrink,
|
|
130
|
+
style: {
|
|
131
|
+
userSelect: 'none',
|
|
132
|
+
pointerEvents: 'auto',
|
|
133
|
+
transform: 'translate(12px, 7px) scale(0.75)',
|
|
134
|
+
maxWidth: 'calc(133% - 24px)'
|
|
135
|
+
}
|
|
136
|
+
}, {
|
|
137
|
+
props: ({
|
|
138
|
+
variant,
|
|
139
|
+
ownerState,
|
|
140
|
+
size
|
|
141
|
+
}) => variant === 'filled' && ownerState.shrink && size === 'small',
|
|
142
|
+
style: {
|
|
143
|
+
transform: 'translate(12px, 4px) scale(0.75)'
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
props: {
|
|
147
|
+
variant: 'outlined'
|
|
148
|
+
},
|
|
149
|
+
style: {
|
|
150
|
+
// see comment above on filled.zIndex
|
|
151
|
+
zIndex: 1,
|
|
152
|
+
pointerEvents: 'none',
|
|
153
|
+
transform: 'translate(14px, 16px) scale(1)',
|
|
154
|
+
maxWidth: 'calc(100% - 24px)'
|
|
155
|
+
}
|
|
156
|
+
}, {
|
|
157
|
+
props: {
|
|
158
|
+
variant: 'outlined',
|
|
159
|
+
size: 'small'
|
|
160
|
+
},
|
|
161
|
+
style: {
|
|
162
|
+
transform: 'translate(14px, 9px) scale(1)'
|
|
163
|
+
}
|
|
164
|
+
}, {
|
|
165
|
+
props: ({
|
|
166
|
+
variant,
|
|
167
|
+
ownerState
|
|
168
|
+
}) => variant === 'outlined' && ownerState.shrink,
|
|
169
|
+
style: {
|
|
170
|
+
userSelect: 'none',
|
|
171
|
+
pointerEvents: 'auto',
|
|
172
|
+
// Theoretically, we should have (8+5)*2/0.75 = 34px
|
|
173
|
+
// but it feels a better when it bleeds a bit on the left, so 32px.
|
|
174
|
+
maxWidth: 'calc(133% - 32px)',
|
|
175
|
+
transform: 'translate(14px, -9px) scale(0.75)'
|
|
176
|
+
}
|
|
177
|
+
}]
|
|
178
|
+
}));
|
|
117
179
|
const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {
|
|
118
|
-
const props = (
|
|
180
|
+
const props = useThemeProps({
|
|
119
181
|
name: 'MuiInputLabel',
|
|
120
182
|
props: inProps
|
|
121
183
|
});
|
package/node/Link/Link.js
CHANGED
|
@@ -6,25 +6,27 @@ 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 _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
+
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
14
15
|
var _elementTypeAcceptingRef = _interopRequireDefault(require("@mui/utils/elementTypeAcceptingRef"));
|
|
15
16
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
17
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
17
|
-
var
|
|
18
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
18
|
+
var _zeroStyled = require("../zero-styled");
|
|
19
19
|
var _useIsFocusVisible = _interopRequireDefault(require("../utils/useIsFocusVisible"));
|
|
20
20
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
21
21
|
var _Typography = _interopRequireDefault(require("../Typography"));
|
|
22
22
|
var _linkClasses = _interopRequireWildcard(require("./linkClasses"));
|
|
23
23
|
var _getTextDecoration = _interopRequireWildcard(require("./getTextDecoration"));
|
|
24
|
+
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const _excluded = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant", "sx"];
|
|
26
27
|
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); }
|
|
27
28
|
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; }
|
|
29
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiLink');
|
|
28
30
|
const useUtilityClasses = ownerState => {
|
|
29
31
|
const {
|
|
30
32
|
classes,
|
|
@@ -37,7 +39,7 @@ const useUtilityClasses = ownerState => {
|
|
|
37
39
|
};
|
|
38
40
|
return (0, _composeClasses.default)(slots, _linkClasses.getLinkUtilityClass, classes);
|
|
39
41
|
};
|
|
40
|
-
const LinkRoot = (0,
|
|
42
|
+
const LinkRoot = (0, _zeroStyled.styled)(_Typography.default, {
|
|
41
43
|
name: 'MuiLink',
|
|
42
44
|
slot: 'Root',
|
|
43
45
|
overridesResolver: (props, styles) => {
|
|
@@ -47,60 +49,92 @@ const LinkRoot = (0, _styled.default)(_Typography.default, {
|
|
|
47
49
|
return [styles.root, styles[`underline${(0, _capitalize.default)(ownerState.underline)}`], ownerState.component === 'button' && styles.button];
|
|
48
50
|
}
|
|
49
51
|
})(({
|
|
50
|
-
theme
|
|
51
|
-
ownerState
|
|
52
|
+
theme
|
|
52
53
|
}) => {
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
54
|
+
return {
|
|
55
|
+
variants: [{
|
|
56
|
+
props: {
|
|
57
|
+
underline: 'none'
|
|
58
|
+
},
|
|
59
|
+
style: {
|
|
60
|
+
textDecoration: 'none'
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
props: {
|
|
64
|
+
underline: 'hover'
|
|
65
|
+
},
|
|
66
|
+
style: {
|
|
67
|
+
textDecoration: 'none',
|
|
68
|
+
'&:hover': {
|
|
69
|
+
textDecoration: 'underline'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
props: {
|
|
74
|
+
underline: 'always'
|
|
75
|
+
},
|
|
76
|
+
style: {
|
|
77
|
+
textDecoration: 'underline',
|
|
78
|
+
'&:hover': {
|
|
79
|
+
textDecorationColor: 'inherit'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
props: ({
|
|
84
|
+
underline,
|
|
85
|
+
ownerState
|
|
86
|
+
}) => underline === 'always' && ownerState.color !== 'inherit',
|
|
87
|
+
style: {
|
|
88
|
+
textDecorationColor: 'var(--Link-underlineColor)'
|
|
89
|
+
}
|
|
90
|
+
}, ...Object.entries(theme.palette).filter(([, value]) => value.main).map(([color]) => ({
|
|
91
|
+
props: {
|
|
92
|
+
underline: 'always',
|
|
93
|
+
color
|
|
94
|
+
},
|
|
95
|
+
style: {
|
|
96
|
+
'--Link-underlineColor': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.4)` : (0, _colorManipulator.alpha)(theme.palette[color].main, 0.4)
|
|
97
|
+
}
|
|
98
|
+
})), {
|
|
99
|
+
props: {
|
|
100
|
+
component: 'button'
|
|
101
|
+
},
|
|
102
|
+
style: {
|
|
103
|
+
position: 'relative',
|
|
104
|
+
WebkitTapHighlightColor: 'transparent',
|
|
105
|
+
backgroundColor: 'transparent',
|
|
106
|
+
// Reset default value
|
|
107
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
108
|
+
outline: 0,
|
|
109
|
+
border: 0,
|
|
110
|
+
margin: 0,
|
|
111
|
+
// Remove the margin in Safari
|
|
112
|
+
borderRadius: 0,
|
|
113
|
+
padding: 0,
|
|
114
|
+
// Remove the padding in Firefox
|
|
115
|
+
cursor: 'pointer',
|
|
116
|
+
userSelect: 'none',
|
|
117
|
+
verticalAlign: 'middle',
|
|
118
|
+
MozAppearance: 'none',
|
|
119
|
+
// Reset
|
|
120
|
+
WebkitAppearance: 'none',
|
|
121
|
+
// Reset
|
|
122
|
+
'&::-moz-focus-inner': {
|
|
123
|
+
borderStyle: 'none' // Remove Firefox dotted outline.
|
|
124
|
+
},
|
|
125
|
+
[`&.${_linkClasses.default.focusVisible}`]: {
|
|
126
|
+
outline: 'auto'
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}]
|
|
130
|
+
};
|
|
98
131
|
});
|
|
99
132
|
const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
100
|
-
const props = (
|
|
133
|
+
const props = useThemeProps({
|
|
101
134
|
props: inProps,
|
|
102
135
|
name: 'MuiLink'
|
|
103
136
|
});
|
|
137
|
+
const theme = (0, _useTheme.default)();
|
|
104
138
|
const {
|
|
105
139
|
className,
|
|
106
140
|
color = 'primary',
|
|
@@ -156,11 +190,18 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
156
190
|
onFocus: handleFocus,
|
|
157
191
|
ref: handlerRef,
|
|
158
192
|
ownerState: ownerState,
|
|
159
|
-
variant: variant
|
|
160
|
-
|
|
193
|
+
variant: variant
|
|
194
|
+
}, other, {
|
|
195
|
+
sx: [...(_getTextDecoration.colorTransformations[color] === undefined ? [{
|
|
161
196
|
color
|
|
162
|
-
}] : []), ...(Array.isArray(sx) ? sx : [sx])]
|
|
163
|
-
|
|
197
|
+
}] : []), ...(Array.isArray(sx) ? sx : [sx])],
|
|
198
|
+
style: (0, _extends2.default)({}, other.style, underline === 'always' && color !== 'inherit' && {
|
|
199
|
+
'--Link-underlineColor': (0, _getTextDecoration.default)({
|
|
200
|
+
theme,
|
|
201
|
+
ownerState
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
}));
|
|
164
205
|
});
|
|
165
206
|
process.env.NODE_ENV !== "production" ? Link.propTypes /* remove-proptypes */ = {
|
|
166
207
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
@@ -197,6 +238,10 @@ process.env.NODE_ENV !== "production" ? Link.propTypes /* remove-proptypes */ =
|
|
|
197
238
|
* @ignore
|
|
198
239
|
*/
|
|
199
240
|
onFocus: _propTypes.default.func,
|
|
241
|
+
/**
|
|
242
|
+
* @ignore
|
|
243
|
+
*/
|
|
244
|
+
style: _propTypes.default.object,
|
|
200
245
|
/**
|
|
201
246
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
202
247
|
*/
|
|
@@ -4,25 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.colorTransformations = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _style = require("@mui/system/style");
|
|
8
8
|
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
9
|
+
// TODO v7: remove this transformation
|
|
9
10
|
const colorTransformations = exports.colorTransformations = {
|
|
10
|
-
primary: 'primary.main',
|
|
11
11
|
textPrimary: 'text.primary',
|
|
12
|
-
secondary: 'secondary.main',
|
|
13
12
|
textSecondary: 'text.secondary',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
// For main palette, the color will be applied by the styles above.
|
|
14
|
+
primary: null,
|
|
15
|
+
secondary: null,
|
|
16
|
+
error: null,
|
|
17
|
+
info: null,
|
|
18
|
+
success: null,
|
|
19
|
+
warning: null
|
|
18
20
|
};
|
|
19
21
|
const getTextDecoration = ({
|
|
20
22
|
theme,
|
|
21
23
|
ownerState
|
|
22
24
|
}) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
let transformedColor = colorTransformations[ownerState.color];
|
|
26
|
+
if (transformedColor === null) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
if (transformedColor === undefined) {
|
|
30
|
+
transformedColor = ownerState.color;
|
|
31
|
+
}
|
|
32
|
+
const color = (0, _style.getPath)(theme, `palette.${transformedColor}`, false) || ownerState.color;
|
|
33
|
+
const channelColor = (0, _style.getPath)(theme, `palette.${transformedColor}Channel`);
|
|
26
34
|
if ('vars' in theme && channelColor) {
|
|
27
35
|
return `rgba(${channelColor} / 0.4)`;
|
|
28
36
|
}
|
package/node/List/List.js
CHANGED
|
@@ -6,20 +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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
-
var
|
|
16
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
15
|
+
var _zeroStyled = require("../zero-styled");
|
|
17
16
|
var _ListContext = _interopRequireDefault(require("./ListContext"));
|
|
18
17
|
var _listClasses = require("./listClasses");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
19
|
const _excluded = ["children", "className", "component", "dense", "disablePadding", "subheader"];
|
|
21
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); }
|
|
22
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)('MuiList');
|
|
23
23
|
const useUtilityClasses = ownerState => {
|
|
24
24
|
const {
|
|
25
25
|
classes,
|
|
@@ -32,7 +32,7 @@ const useUtilityClasses = ownerState => {
|
|
|
32
32
|
};
|
|
33
33
|
return (0, _composeClasses.default)(slots, _listClasses.getListUtilityClass, classes);
|
|
34
34
|
};
|
|
35
|
-
const ListRoot = (0,
|
|
35
|
+
const ListRoot = (0, _zeroStyled.styled)('ul', {
|
|
36
36
|
name: 'MuiList',
|
|
37
37
|
slot: 'Root',
|
|
38
38
|
overridesResolver: (props, styles) => {
|
|
@@ -41,21 +41,30 @@ const ListRoot = (0, _styled.default)('ul', {
|
|
|
41
41
|
} = props;
|
|
42
42
|
return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];
|
|
43
43
|
}
|
|
44
|
-
})(
|
|
45
|
-
ownerState
|
|
46
|
-
}) => (0, _extends2.default)({
|
|
44
|
+
})({
|
|
47
45
|
listStyle: 'none',
|
|
48
46
|
margin: 0,
|
|
49
47
|
padding: 0,
|
|
50
|
-
position: 'relative'
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
position: 'relative',
|
|
49
|
+
variants: [{
|
|
50
|
+
props: ({
|
|
51
|
+
ownerState
|
|
52
|
+
}) => !ownerState.disablePadding,
|
|
53
|
+
style: {
|
|
54
|
+
paddingTop: 8,
|
|
55
|
+
paddingBottom: 8
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
props: ({
|
|
59
|
+
ownerState
|
|
60
|
+
}) => ownerState.subheader,
|
|
61
|
+
style: {
|
|
62
|
+
paddingTop: 0
|
|
63
|
+
}
|
|
64
|
+
}]
|
|
65
|
+
});
|
|
57
66
|
const List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {
|
|
58
|
-
const props = (
|
|
67
|
+
const props = useThemeProps({
|
|
59
68
|
props: inProps,
|
|
60
69
|
name: 'MuiList'
|
|
61
70
|
});
|
|
@@ -16,8 +16,7 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
|
|
|
16
16
|
var _elementTypeAcceptingRef = _interopRequireDefault(require("@mui/utils/elementTypeAcceptingRef"));
|
|
17
17
|
var _chainPropTypes = _interopRequireDefault(require("@mui/utils/chainPropTypes"));
|
|
18
18
|
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
19
|
-
var
|
|
20
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
19
|
+
var _zeroStyled = require("../zero-styled");
|
|
21
20
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
22
21
|
var _isMuiElement = _interopRequireDefault(require("../utils/isMuiElement"));
|
|
23
22
|
var _useEnhancedEffect = _interopRequireDefault(require("../utils/useEnhancedEffect"));
|
|
@@ -31,6 +30,7 @@ const _excluded = ["className"],
|
|
|
31
30
|
_excluded2 = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"];
|
|
32
31
|
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); }
|
|
33
32
|
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; }
|
|
33
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiListItem');
|
|
34
34
|
const overridesResolver = (props, styles) => {
|
|
35
35
|
const {
|
|
36
36
|
ownerState
|
|
@@ -57,7 +57,7 @@ const useUtilityClasses = ownerState => {
|
|
|
57
57
|
};
|
|
58
58
|
return (0, _composeClasses.default)(slots, _listItemClasses.getListItemUtilityClass, classes);
|
|
59
59
|
};
|
|
60
|
-
const ListItemRoot = exports.ListItemRoot = (0,
|
|
60
|
+
const ListItemRoot = exports.ListItemRoot = (0, _zeroStyled.styled)('div', {
|
|
61
61
|
name: 'MuiListItem',
|
|
62
62
|
slot: 'Root',
|
|
63
63
|
overridesResolver
|
|
@@ -176,7 +176,7 @@ const ListItemRoot = exports.ListItemRoot = (0, _styled.default)('div', {
|
|
|
176
176
|
}
|
|
177
177
|
}]
|
|
178
178
|
}));
|
|
179
|
-
const ListItemContainer = (0,
|
|
179
|
+
const ListItemContainer = (0, _zeroStyled.styled)('li', {
|
|
180
180
|
name: 'MuiListItem',
|
|
181
181
|
slot: 'Container',
|
|
182
182
|
overridesResolver: (props, styles) => styles.container
|
|
@@ -188,7 +188,7 @@ const ListItemContainer = (0, _styled.default)('li', {
|
|
|
188
188
|
* Uses an additional container component if `ListItemSecondaryAction` is the last child.
|
|
189
189
|
*/
|
|
190
190
|
const ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
|
|
191
|
-
const props = (
|
|
191
|
+
const props = useThemeProps({
|
|
192
192
|
props: inProps,
|
|
193
193
|
name: 'MuiListItem'
|
|
194
194
|
});
|
|
@@ -13,13 +13,13 @@ 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 _ListContext = _interopRequireDefault(require("../List/ListContext"));
|
|
16
|
-
var
|
|
17
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
16
|
+
var _zeroStyled = require("../zero-styled");
|
|
18
17
|
var _listItemAvatarClasses = require("./listItemAvatarClasses");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
19
|
const _excluded = ["className"];
|
|
21
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); }
|
|
22
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)('MuiListItemAvatar');
|
|
23
23
|
const useUtilityClasses = ownerState => {
|
|
24
24
|
const {
|
|
25
25
|
alignItems,
|
|
@@ -30,7 +30,7 @@ const useUtilityClasses = ownerState => {
|
|
|
30
30
|
};
|
|
31
31
|
return (0, _composeClasses.default)(slots, _listItemAvatarClasses.getListItemAvatarUtilityClass, classes);
|
|
32
32
|
};
|
|
33
|
-
const ListItemAvatarRoot = (0,
|
|
33
|
+
const ListItemAvatarRoot = (0, _zeroStyled.styled)('div', {
|
|
34
34
|
name: 'MuiListItemAvatar',
|
|
35
35
|
slot: 'Root',
|
|
36
36
|
overridesResolver: (props, styles) => {
|
|
@@ -56,7 +56,7 @@ const ListItemAvatarRoot = (0, _styled.default)('div', {
|
|
|
56
56
|
* A simple wrapper to apply `List` styles to an `Avatar`.
|
|
57
57
|
*/
|
|
58
58
|
const ListItemAvatar = /*#__PURE__*/React.forwardRef(function ListItemAvatar(inProps, ref) {
|
|
59
|
-
const props = (
|
|
59
|
+
const props = useThemeProps({
|
|
60
60
|
props: inProps,
|
|
61
61
|
name: 'MuiListItemAvatar'
|
|
62
62
|
});
|