@mui/material 6.0.0-beta.5 → 6.0.0-beta.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/Autocomplete/Autocomplete.js +1 -1
- package/Breadcrumbs/Breadcrumbs.js +1 -1
- package/CHANGELOG.md +69 -0
- package/CardHeader/CardHeader.js +9 -5
- package/DialogContentText/DialogContentText.js +1 -1
- package/Divider/Divider.js +3 -2
- package/FormControlLabel/FormControlLabel.js +1 -3
- package/IconButton/IconButton.js +3 -0
- package/InputAdornment/InputAdornment.js +1 -1
- package/Link/Link.js +39 -4
- package/Link/getTextDecoration.d.ts +1 -2
- package/Link/getTextDecoration.js +1 -19
- package/ListItemText/ListItemText.js +8 -4
- package/Slider/useSlider.js +3 -3
- package/Typography/Typography.d.ts +21 -2
- package/Typography/Typography.js +28 -16
- package/index.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +1 -1
- package/modern/Breadcrumbs/Breadcrumbs.js +1 -1
- package/modern/CardHeader/CardHeader.js +9 -5
- package/modern/DialogContentText/DialogContentText.js +1 -1
- package/modern/Divider/Divider.js +3 -2
- package/modern/FormControlLabel/FormControlLabel.js +1 -3
- package/modern/IconButton/IconButton.js +3 -0
- package/modern/InputAdornment/InputAdornment.js +1 -1
- package/modern/Link/Link.js +39 -4
- package/modern/Link/getTextDecoration.js +1 -19
- package/modern/ListItemText/ListItemText.js +8 -4
- package/modern/Slider/useSlider.js +3 -3
- package/modern/Typography/Typography.js +28 -16
- package/modern/index.js +1 -1
- package/modern/styles/createGetSelector.js +8 -2
- package/modern/useAutocomplete/useAutocomplete.js +0 -8
- package/modern/version/index.js +2 -2
- package/node/AppBar/AppBar.js +10 -13
- package/node/Autocomplete/Autocomplete.js +4 -7
- package/node/AvatarGroup/AvatarGroup.js +1 -2
- package/node/Badge/Badge.js +6 -7
- package/node/Breadcrumbs/Breadcrumbs.js +1 -1
- package/node/Button/Button.js +1 -2
- package/node/ButtonBase/TouchRipple.js +4 -4
- package/node/CardHeader/CardHeader.js +9 -5
- package/node/Checkbox/Checkbox.js +2 -3
- package/node/CssBaseline/CssBaseline.js +5 -10
- package/node/DialogContentText/DialogContentText.js +1 -1
- package/node/DialogTitle/DialogTitle.js +1 -1
- package/node/Divider/Divider.js +3 -2
- package/node/Fab/Fab.js +87 -90
- package/node/FilledInput/FilledInput.js +13 -17
- package/node/FormControlLabel/FormControlLabel.js +4 -7
- package/node/Grid/Grid.js +2 -4
- package/node/IconButton/IconButton.js +3 -0
- package/node/Input/Input.js +3 -4
- package/node/InputAdornment/InputAdornment.js +1 -1
- package/node/InputBase/InputBase.js +1 -2
- package/node/Link/Link.js +39 -4
- package/node/Link/getTextDecoration.js +2 -20
- package/node/ListItemText/ListItemText.js +9 -5
- package/node/Menu/Menu.js +2 -3
- package/node/Modal/Modal.js +4 -4
- package/node/Modal/ModalManager.js +1 -1
- package/node/Modal/useModal.js +4 -6
- package/node/OutlinedInput/OutlinedInput.js +3 -3
- package/node/PaginationItem/PaginationItem.js +4 -5
- package/node/Paper/Paper.js +1 -2
- package/node/Popover/Popover.js +2 -3
- package/node/Popper/BasePopper.js +1 -2
- package/node/Popper/Popper.js +2 -3
- package/node/Radio/Radio.js +2 -3
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +2 -4
- package/node/Select/SelectInput.js +2 -3
- package/node/Slider/Slider.js +20 -21
- package/node/Slider/useSlider.js +17 -29
- package/node/Snackbar/useSnackbar.js +7 -7
- package/node/StepLabel/StepLabel.js +1 -1
- package/node/SvgIcon/SvgIcon.js +75 -81
- package/node/SwipeableDrawer/SwipeableDrawer.js +1 -2
- package/node/TabScrollButton/TabScrollButton.js +2 -3
- package/node/TablePagination/TablePagination.js +1 -2
- package/node/TablePagination/TablePaginationActions.js +10 -11
- package/node/Tabs/Tabs.js +5 -8
- package/node/Tooltip/Tooltip.js +13 -15
- package/node/Typography/Typography.js +28 -16
- package/node/Unstable_TrapFocus/FocusTrap.js +1 -2
- package/node/index.js +1 -1
- package/node/styles/createGetSelector.js +9 -3
- package/node/styles/createTheme.js +2 -2
- package/node/styles/createThemeNoVars.js +1 -1
- package/node/styles/createThemeWithVars.js +5 -7
- package/node/styles/shouldSkipGeneratingVar.js +1 -2
- package/node/transitions/utils.js +2 -3
- package/node/useAutocomplete/useAutocomplete.js +3 -18
- package/node/useLazyRipple/useLazyRipple.js +3 -12
- package/node/utils/useSlot.js +1 -1
- package/node/version/index.js +2 -2
- package/package.json +11 -11
- package/styles/createGetSelector.d.ts +5 -3
- package/styles/createGetSelector.js +8 -2
- package/useAutocomplete/useAutocomplete.d.ts +2 -2
- package/useAutocomplete/useAutocomplete.js +0 -8
- package/version/index.js +2 -2
|
@@ -42,24 +42,21 @@ const body = theme => ({
|
|
|
42
42
|
});
|
|
43
43
|
exports.body = body;
|
|
44
44
|
const styles = (theme, enableColorScheme = false) => {
|
|
45
|
-
var _theme$components;
|
|
46
45
|
const colorSchemeStyles = {};
|
|
47
46
|
if (enableColorScheme && theme.colorSchemes && typeof theme.getColorSchemeSelector === 'function') {
|
|
48
47
|
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
49
48
|
const selector = theme.getColorSchemeSelector(key);
|
|
50
49
|
if (selector.startsWith('@')) {
|
|
51
|
-
var _scheme$palette;
|
|
52
50
|
// for @media (prefers-color-scheme), we need to target :root
|
|
53
51
|
colorSchemeStyles[selector] = {
|
|
54
52
|
':root': {
|
|
55
|
-
colorScheme:
|
|
53
|
+
colorScheme: scheme.palette?.mode
|
|
56
54
|
}
|
|
57
55
|
};
|
|
58
56
|
} else {
|
|
59
|
-
var _scheme$palette2;
|
|
60
57
|
// else, it's likely that the selector already target an element with a class or data attribute
|
|
61
58
|
colorSchemeStyles[selector.replace(/\s*&/, '')] = {
|
|
62
|
-
colorScheme:
|
|
59
|
+
colorScheme: scheme.palette?.mode
|
|
63
60
|
};
|
|
64
61
|
}
|
|
65
62
|
});
|
|
@@ -84,7 +81,7 @@ const styles = (theme, enableColorScheme = false) => {
|
|
|
84
81
|
},
|
|
85
82
|
...colorSchemeStyles
|
|
86
83
|
};
|
|
87
|
-
const themeOverrides =
|
|
84
|
+
const themeOverrides = theme.components?.MuiCssBaseline?.styleOverrides;
|
|
88
85
|
if (themeOverrides) {
|
|
89
86
|
defaultStyles = [defaultStyles, themeOverrides];
|
|
90
87
|
}
|
|
@@ -106,19 +103,17 @@ const staticStyles = theme => {
|
|
|
106
103
|
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
107
104
|
const selector = theme.getColorSchemeSelector(key);
|
|
108
105
|
if (selector.startsWith('@')) {
|
|
109
|
-
var _scheme$palette3;
|
|
110
106
|
// for @media (prefers-color-scheme), we need to target :root
|
|
111
107
|
baseStyles[selector] = {
|
|
112
108
|
[`:root:not(:has(.${SELECTOR}))`]: {
|
|
113
|
-
colorScheme:
|
|
109
|
+
colorScheme: scheme.palette?.mode
|
|
114
110
|
}
|
|
115
111
|
};
|
|
116
112
|
} else {
|
|
117
|
-
var _scheme$palette4;
|
|
118
113
|
// else, it's likely that the selector already target an element with a class or data attribute
|
|
119
114
|
baseStyles[selector.replace(/\s*&/, '')] = {
|
|
120
115
|
[`&:not(:has(.${SELECTOR}))`]: {
|
|
121
|
-
colorScheme:
|
|
116
|
+
colorScheme: scheme.palette?.mode
|
|
122
117
|
}
|
|
123
118
|
};
|
|
124
119
|
}
|
|
@@ -52,7 +52,7 @@ const DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentTe
|
|
|
52
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogContentTextRoot, {
|
|
53
53
|
component: "p",
|
|
54
54
|
variant: "body1",
|
|
55
|
-
color: "
|
|
55
|
+
color: "textSecondary",
|
|
56
56
|
ref: ref,
|
|
57
57
|
ownerState: ownerState,
|
|
58
58
|
className: (0, _clsx.default)(classes.root, className),
|
package/node/Divider/Divider.js
CHANGED
|
@@ -211,10 +211,10 @@ const Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {
|
|
|
211
211
|
absolute = false,
|
|
212
212
|
children,
|
|
213
213
|
className,
|
|
214
|
-
|
|
214
|
+
orientation = 'horizontal',
|
|
215
|
+
component = children || orientation === 'vertical' ? 'div' : 'hr',
|
|
215
216
|
flexItem = false,
|
|
216
217
|
light = false,
|
|
217
|
-
orientation = 'horizontal',
|
|
218
218
|
role = component !== 'hr' ? 'separator' : undefined,
|
|
219
219
|
textAlign = 'center',
|
|
220
220
|
variant = 'fullWidth',
|
|
@@ -238,6 +238,7 @@ const Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {
|
|
|
238
238
|
role: role,
|
|
239
239
|
ref: ref,
|
|
240
240
|
ownerState: ownerState,
|
|
241
|
+
"aria-orientation": role === 'separator' && (component !== 'hr' || orientation === 'vertical') ? orientation : undefined,
|
|
241
242
|
...other,
|
|
242
243
|
children: children ? /*#__PURE__*/(0, _jsxRuntime.jsx)(DividerWrapper, {
|
|
243
244
|
className: classes.wrapper,
|
package/node/Fab/Fab.js
CHANGED
|
@@ -48,99 +48,96 @@ const FabRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
48
48
|
}
|
|
49
49
|
})(({
|
|
50
50
|
theme
|
|
51
|
-
}) => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
boxShadow: (theme.vars || theme).shadows[
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
}) => ({
|
|
52
|
+
...theme.typography.button,
|
|
53
|
+
minHeight: 36,
|
|
54
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
|
|
55
|
+
duration: theme.transitions.duration.short
|
|
56
|
+
}),
|
|
57
|
+
borderRadius: '50%',
|
|
58
|
+
padding: 0,
|
|
59
|
+
minWidth: 0,
|
|
60
|
+
width: 56,
|
|
61
|
+
height: 56,
|
|
62
|
+
zIndex: (theme.vars || theme).zIndex.fab,
|
|
63
|
+
boxShadow: (theme.vars || theme).shadows[6],
|
|
64
|
+
'&:active': {
|
|
65
|
+
boxShadow: (theme.vars || theme).shadows[12]
|
|
66
|
+
},
|
|
67
|
+
color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText?.(theme.palette.grey[300]),
|
|
68
|
+
backgroundColor: (theme.vars || theme).palette.grey[300],
|
|
69
|
+
'&:hover': {
|
|
70
|
+
backgroundColor: (theme.vars || theme).palette.grey.A100,
|
|
71
|
+
// Reset on touch devices, it doesn't add specificity
|
|
72
|
+
'@media (hover: none)': {
|
|
73
|
+
backgroundColor: (theme.vars || theme).palette.grey[300]
|
|
68
74
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
textDecoration: 'none'
|
|
75
|
+
textDecoration: 'none'
|
|
76
|
+
},
|
|
77
|
+
[`&.${_fabClasses.default.focusVisible}`]: {
|
|
78
|
+
boxShadow: (theme.vars || theme).shadows[6]
|
|
79
|
+
},
|
|
80
|
+
variants: [{
|
|
81
|
+
props: {
|
|
82
|
+
size: 'small'
|
|
78
83
|
},
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
style: {
|
|
85
|
+
width: 40,
|
|
86
|
+
height: 40
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
props: {
|
|
90
|
+
size: 'medium'
|
|
81
91
|
},
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
minWidth: 40,
|
|
132
|
-
height: 40
|
|
133
|
-
}
|
|
134
|
-
}, {
|
|
135
|
-
props: {
|
|
136
|
-
color: 'inherit'
|
|
137
|
-
},
|
|
138
|
-
style: {
|
|
139
|
-
color: 'inherit'
|
|
140
|
-
}
|
|
141
|
-
}]
|
|
142
|
-
};
|
|
143
|
-
}, ({
|
|
92
|
+
style: {
|
|
93
|
+
width: 48,
|
|
94
|
+
height: 48
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
props: {
|
|
98
|
+
variant: 'extended'
|
|
99
|
+
},
|
|
100
|
+
style: {
|
|
101
|
+
borderRadius: 48 / 2,
|
|
102
|
+
padding: '0 16px',
|
|
103
|
+
width: 'auto',
|
|
104
|
+
minHeight: 'auto',
|
|
105
|
+
minWidth: 48,
|
|
106
|
+
height: 48
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
props: {
|
|
110
|
+
variant: 'extended',
|
|
111
|
+
size: 'small'
|
|
112
|
+
},
|
|
113
|
+
style: {
|
|
114
|
+
width: 'auto',
|
|
115
|
+
padding: '0 8px',
|
|
116
|
+
borderRadius: 34 / 2,
|
|
117
|
+
minWidth: 34,
|
|
118
|
+
height: 34
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
props: {
|
|
122
|
+
variant: 'extended',
|
|
123
|
+
size: 'medium'
|
|
124
|
+
},
|
|
125
|
+
style: {
|
|
126
|
+
width: 'auto',
|
|
127
|
+
padding: '0 16px',
|
|
128
|
+
borderRadius: 40 / 2,
|
|
129
|
+
minWidth: 40,
|
|
130
|
+
height: 40
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
props: {
|
|
134
|
+
color: 'inherit'
|
|
135
|
+
},
|
|
136
|
+
style: {
|
|
137
|
+
color: 'inherit'
|
|
138
|
+
}
|
|
139
|
+
}]
|
|
140
|
+
}), ({
|
|
144
141
|
theme
|
|
145
142
|
}) => ({
|
|
146
143
|
variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main && value.dark && value.contrastText) // check all the used fields in the style below
|
|
@@ -130,20 +130,17 @@ const FilledInputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}, ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below
|
|
133
|
-
.map(([color]) => {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
'&::after': {
|
|
142
|
-
borderBottom: `2px solid ${(_palette$color = (theme.vars || theme).palette[color]) == null ? void 0 : _palette$color.main}`
|
|
143
|
-
}
|
|
133
|
+
.map(([color]) => ({
|
|
134
|
+
props: {
|
|
135
|
+
disableUnderline: false,
|
|
136
|
+
color
|
|
137
|
+
},
|
|
138
|
+
style: {
|
|
139
|
+
'&::after': {
|
|
140
|
+
borderBottom: `2px solid ${(theme.vars || theme).palette[color]?.main}`
|
|
144
141
|
}
|
|
145
|
-
}
|
|
146
|
-
}), {
|
|
142
|
+
}
|
|
143
|
+
})), {
|
|
147
144
|
props: ({
|
|
148
145
|
ownerState
|
|
149
146
|
}) => ownerState.startAdornment,
|
|
@@ -276,7 +273,6 @@ const FilledInputInput = (0, _zeroStyled.styled)(_InputBase2.InputBaseInput, {
|
|
|
276
273
|
}]
|
|
277
274
|
}));
|
|
278
275
|
const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {
|
|
279
|
-
var _ref, _slots$root, _ref2, _slots$input;
|
|
280
276
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
281
277
|
props: inProps,
|
|
282
278
|
name: 'MuiFilledInput'
|
|
@@ -312,9 +308,9 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
|
|
|
312
308
|
ownerState
|
|
313
309
|
}
|
|
314
310
|
};
|
|
315
|
-
const componentsProps =
|
|
316
|
-
const RootSlot =
|
|
317
|
-
const InputSlot =
|
|
311
|
+
const componentsProps = slotProps ?? componentsPropsProp ? (0, _deepmerge.default)(filledInputComponentsProps, slotProps ?? componentsPropsProp) : filledInputComponentsProps;
|
|
312
|
+
const RootSlot = slots.root ?? components.Root ?? FilledInputRoot;
|
|
313
|
+
const InputSlot = slots.input ?? components.Input ?? FilledInputInput;
|
|
318
314
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, {
|
|
319
315
|
slots: {
|
|
320
316
|
root: RootSlot,
|
|
@@ -14,7 +14,6 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
|
|
|
14
14
|
var _FormControl = require("../FormControl");
|
|
15
15
|
var _zeroStyled = require("../zero-styled");
|
|
16
16
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
17
|
-
var _Stack = _interopRequireDefault(require("../Stack"));
|
|
18
17
|
var _Typography = _interopRequireDefault(require("../Typography"));
|
|
19
18
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
20
19
|
var _formControlLabelClasses = _interopRequireWildcard(require("./formControlLabelClasses"));
|
|
@@ -117,7 +116,6 @@ const AsteriskComponent = (0, _zeroStyled.styled)('span', {
|
|
|
117
116
|
* Use this component if you want to display an extra label.
|
|
118
117
|
*/
|
|
119
118
|
const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(inProps, ref) {
|
|
120
|
-
var _ref;
|
|
121
119
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
122
120
|
props: inProps,
|
|
123
121
|
name: 'MuiFormControlLabel'
|
|
@@ -141,8 +139,8 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
141
139
|
...other
|
|
142
140
|
} = props;
|
|
143
141
|
const muiFormControl = (0, _FormControl.useFormControl)();
|
|
144
|
-
const disabled =
|
|
145
|
-
const required = requiredProp
|
|
142
|
+
const disabled = disabledProp ?? control.props.disabled ?? muiFormControl?.disabled;
|
|
143
|
+
const required = requiredProp ?? control.props.required;
|
|
146
144
|
const controlProps = {
|
|
147
145
|
disabled,
|
|
148
146
|
required
|
|
@@ -182,7 +180,7 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
182
180
|
label = /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographySlot, {
|
|
183
181
|
component: "span",
|
|
184
182
|
...typographySlotProps,
|
|
185
|
-
className: (0, _clsx.default)(classes.label, typographySlotProps
|
|
183
|
+
className: (0, _clsx.default)(classes.label, typographySlotProps?.className),
|
|
186
184
|
children: label
|
|
187
185
|
});
|
|
188
186
|
}
|
|
@@ -191,8 +189,7 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
191
189
|
ownerState: ownerState,
|
|
192
190
|
ref: ref,
|
|
193
191
|
...other,
|
|
194
|
-
children: [/*#__PURE__*/React.cloneElement(control, controlProps), required ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
195
|
-
display: "block",
|
|
192
|
+
children: [/*#__PURE__*/React.cloneElement(control, controlProps), required ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
196
193
|
children: [label, /*#__PURE__*/(0, _jsxRuntime.jsxs)(AsteriskComponent, {
|
|
197
194
|
ownerState: ownerState,
|
|
198
195
|
"aria-hidden": true,
|
package/node/Grid/Grid.js
CHANGED
|
@@ -178,7 +178,6 @@ function generateRowGap({
|
|
|
178
178
|
styles = (0, _system.handleBreakpoints)({
|
|
179
179
|
theme
|
|
180
180
|
}, rowSpacingValues, (propValue, breakpoint) => {
|
|
181
|
-
var _zeroValueBreakpointK;
|
|
182
181
|
const themeSpacing = theme.spacing(propValue);
|
|
183
182
|
if (themeSpacing !== '0px') {
|
|
184
183
|
return {
|
|
@@ -188,7 +187,7 @@ function generateRowGap({
|
|
|
188
187
|
}
|
|
189
188
|
};
|
|
190
189
|
}
|
|
191
|
-
if (
|
|
190
|
+
if (zeroValueBreakpointKeys?.includes(breakpoint)) {
|
|
192
191
|
return {};
|
|
193
192
|
}
|
|
194
193
|
return {
|
|
@@ -225,7 +224,6 @@ function generateColumnGap({
|
|
|
225
224
|
styles = (0, _system.handleBreakpoints)({
|
|
226
225
|
theme
|
|
227
226
|
}, columnSpacingValues, (propValue, breakpoint) => {
|
|
228
|
-
var _zeroValueBreakpointK2;
|
|
229
227
|
const themeSpacing = theme.spacing(propValue);
|
|
230
228
|
if (themeSpacing !== '0px') {
|
|
231
229
|
const negativeValue = theme.spacing(-propValue);
|
|
@@ -237,7 +235,7 @@ function generateColumnGap({
|
|
|
237
235
|
}
|
|
238
236
|
};
|
|
239
237
|
}
|
|
240
|
-
if (
|
|
238
|
+
if (zeroValueBreakpointKeys?.includes(breakpoint)) {
|
|
241
239
|
return {};
|
|
242
240
|
}
|
|
243
241
|
return {
|
|
@@ -172,6 +172,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
|
172
172
|
color = 'default',
|
|
173
173
|
disabled = false,
|
|
174
174
|
disableFocusRipple = false,
|
|
175
|
+
disableRipple = false,
|
|
175
176
|
size = 'medium',
|
|
176
177
|
...other
|
|
177
178
|
} = props;
|
|
@@ -181,6 +182,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
|
181
182
|
color,
|
|
182
183
|
disabled,
|
|
183
184
|
disableFocusRipple,
|
|
185
|
+
disableRipple,
|
|
184
186
|
size
|
|
185
187
|
};
|
|
186
188
|
const classes = useUtilityClasses(ownerState);
|
|
@@ -189,6 +191,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
|
189
191
|
centerRipple: true,
|
|
190
192
|
focusRipple: !disableFocusRipple,
|
|
191
193
|
disabled: disabled,
|
|
194
|
+
disableRipple: disableRipple,
|
|
192
195
|
ref: ref,
|
|
193
196
|
...other,
|
|
194
197
|
ownerState: ownerState,
|
package/node/Input/Input.js
CHANGED
|
@@ -135,7 +135,6 @@ const InputInput = (0, _zeroStyled.styled)(_InputBase2.InputBaseInput, {
|
|
|
135
135
|
overridesResolver: _InputBase2.inputOverridesResolver
|
|
136
136
|
})({});
|
|
137
137
|
const Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {
|
|
138
|
-
var _ref, _slots$root, _ref2, _slots$input;
|
|
139
138
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
140
139
|
props: inProps,
|
|
141
140
|
name: 'MuiInput'
|
|
@@ -161,9 +160,9 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {
|
|
|
161
160
|
ownerState
|
|
162
161
|
}
|
|
163
162
|
};
|
|
164
|
-
const componentsProps =
|
|
165
|
-
const RootSlot =
|
|
166
|
-
const InputSlot =
|
|
163
|
+
const componentsProps = slotProps ?? componentsPropsProp ? (0, _deepmerge.default)(slotProps ?? componentsPropsProp, inputComponentsProps) : inputComponentsProps;
|
|
164
|
+
const RootSlot = slots.root ?? components.Root ?? InputRoot;
|
|
165
|
+
const InputSlot = slots.input ?? components.Input ?? InputInput;
|
|
167
166
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, {
|
|
168
167
|
slots: {
|
|
169
168
|
root: RootSlot,
|
|
@@ -130,7 +130,7 @@ const InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inP
|
|
|
130
130
|
ref: ref,
|
|
131
131
|
...other,
|
|
132
132
|
children: typeof children === 'string' && !disableTypography ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
133
|
-
color: "
|
|
133
|
+
color: "textSecondary",
|
|
134
134
|
children: children
|
|
135
135
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
136
136
|
children: [position === 'start' ? ( /* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -246,7 +246,6 @@ const InputGlobalStyles = (0, _zeroStyled.globalCss)({
|
|
|
246
246
|
* It contains a load of style reset and some state logic.
|
|
247
247
|
*/
|
|
248
248
|
const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
|
|
249
|
-
var _slotProps$input;
|
|
250
249
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
251
250
|
props: inProps,
|
|
252
251
|
name: 'MuiInputBase'
|
|
@@ -468,7 +467,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
|
|
|
468
467
|
const Input = slots.input || components.Input || InputBaseInput;
|
|
469
468
|
inputProps = {
|
|
470
469
|
...inputProps,
|
|
471
|
-
...(
|
|
470
|
+
...(slotProps.input ?? componentsProps.input)
|
|
472
471
|
};
|
|
473
472
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
474
473
|
children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && ( // For Emotion/Styled-components, InputGlobalStyles will be a function
|
package/node/Link/Link.js
CHANGED
|
@@ -18,10 +18,21 @@ var _zeroStyled = require("../zero-styled");
|
|
|
18
18
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
19
19
|
var _Typography = _interopRequireDefault(require("../Typography"));
|
|
20
20
|
var _linkClasses = _interopRequireWildcard(require("./linkClasses"));
|
|
21
|
-
var _getTextDecoration =
|
|
21
|
+
var _getTextDecoration = _interopRequireDefault(require("./getTextDecoration"));
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
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); }
|
|
24
24
|
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; }
|
|
25
|
+
const v6Colors = {
|
|
26
|
+
primary: true,
|
|
27
|
+
secondary: true,
|
|
28
|
+
error: true,
|
|
29
|
+
info: true,
|
|
30
|
+
success: true,
|
|
31
|
+
warning: true,
|
|
32
|
+
textPrimary: true,
|
|
33
|
+
textSecondary: true,
|
|
34
|
+
textDisabled: true
|
|
35
|
+
};
|
|
25
36
|
const useUtilityClasses = ownerState => {
|
|
26
37
|
const {
|
|
27
38
|
classes,
|
|
@@ -91,6 +102,30 @@ const LinkRoot = (0, _zeroStyled.styled)(_Typography.default, {
|
|
|
91
102
|
'--Link-underlineColor': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.4)` : (0, _colorManipulator.alpha)(theme.palette[color].main, 0.4)
|
|
92
103
|
}
|
|
93
104
|
})), {
|
|
105
|
+
props: {
|
|
106
|
+
underline: 'always',
|
|
107
|
+
color: 'textPrimary'
|
|
108
|
+
},
|
|
109
|
+
style: {
|
|
110
|
+
'--Link-underlineColor': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.4)` : (0, _colorManipulator.alpha)(theme.palette.text.primary, 0.4)
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
props: {
|
|
114
|
+
underline: 'always',
|
|
115
|
+
color: 'textSecondary'
|
|
116
|
+
},
|
|
117
|
+
style: {
|
|
118
|
+
'--Link-underlineColor': theme.vars ? `rgba(${theme.vars.palette.text.secondaryChannel} / 0.4)` : (0, _colorManipulator.alpha)(theme.palette.text.secondary, 0.4)
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
props: {
|
|
122
|
+
underline: 'always',
|
|
123
|
+
color: 'textDisabled'
|
|
124
|
+
},
|
|
125
|
+
style: {
|
|
126
|
+
'--Link-underlineColor': (theme.vars || theme).palette.text.disabled
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
94
129
|
props: {
|
|
95
130
|
component: 'button'
|
|
96
131
|
},
|
|
@@ -179,12 +214,12 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
179
214
|
ownerState: ownerState,
|
|
180
215
|
variant: variant,
|
|
181
216
|
...other,
|
|
182
|
-
sx: [...(
|
|
217
|
+
sx: [...(v6Colors[color] === undefined ? [{
|
|
183
218
|
color
|
|
184
219
|
}] : []), ...(Array.isArray(sx) ? sx : [sx])],
|
|
185
220
|
style: {
|
|
186
221
|
...other.style,
|
|
187
|
-
...(underline === 'always' && color !== 'inherit' && {
|
|
222
|
+
...(underline === 'always' && color !== 'inherit' && !v6Colors[color] && {
|
|
188
223
|
'--Link-underlineColor': (0, _getTextDecoration.default)({
|
|
189
224
|
theme,
|
|
190
225
|
ownerState
|
|
@@ -214,7 +249,7 @@ process.env.NODE_ENV !== "production" ? Link.propTypes /* remove-proptypes */ =
|
|
|
214
249
|
* The color of the link.
|
|
215
250
|
* @default 'primary'
|
|
216
251
|
*/
|
|
217
|
-
color: _propTypes.default /* @typescript-to-proptypes-ignore */.
|
|
252
|
+
color: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['primary', 'secondary', 'success', 'error', 'info', 'warning', 'textPrimary', 'textSecondary', 'textDisabled']), _propTypes.default.string]),
|
|
218
253
|
/**
|
|
219
254
|
* The component used for the root node.
|
|
220
255
|
* Either a string to use a HTML element or a component.
|
|
@@ -3,32 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _style = require("@mui/system/style");
|
|
8
8
|
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
9
|
-
// TODO v7: remove this transformation
|
|
10
|
-
const colorTransformations = exports.colorTransformations = {
|
|
11
|
-
textPrimary: 'text.primary',
|
|
12
|
-
textSecondary: 'text.secondary',
|
|
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
|
|
20
|
-
};
|
|
21
9
|
const getTextDecoration = ({
|
|
22
10
|
theme,
|
|
23
11
|
ownerState
|
|
24
12
|
}) => {
|
|
25
|
-
|
|
26
|
-
if (transformedColor === null) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
if (transformedColor === undefined) {
|
|
30
|
-
transformedColor = ownerState.color;
|
|
31
|
-
}
|
|
13
|
+
const transformedColor = ownerState.color;
|
|
32
14
|
const color = (0, _style.getPath)(theme, `palette.${transformedColor}`, false) || ownerState.color;
|
|
33
15
|
const channelColor = (0, _style.getPath)(theme, `palette.${transformedColor}Channel`);
|
|
34
16
|
if ('vars' in theme && channelColor) {
|
|
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
12
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
|
-
var _Typography =
|
|
13
|
+
var _Typography = _interopRequireWildcard(require("../Typography"));
|
|
14
14
|
var _ListContext = _interopRequireDefault(require("../List/ListContext"));
|
|
15
15
|
var _zeroStyled = require("../zero-styled");
|
|
16
16
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
@@ -51,6 +51,12 @@ const ListItemTextRoot = (0, _zeroStyled.styled)('div', {
|
|
|
51
51
|
minWidth: 0,
|
|
52
52
|
marginTop: 4,
|
|
53
53
|
marginBottom: 4,
|
|
54
|
+
[`.${_Typography.typographyClasses.root}:where(& .${_listItemTextClasses.default.primary})`]: {
|
|
55
|
+
display: 'block'
|
|
56
|
+
},
|
|
57
|
+
[`.${_Typography.typographyClasses.root}:where(& .${_listItemTextClasses.default.secondary})`]: {
|
|
58
|
+
display: 'block'
|
|
59
|
+
},
|
|
54
60
|
variants: [{
|
|
55
61
|
props: ({
|
|
56
62
|
ownerState
|
|
@@ -102,8 +108,7 @@ const ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(inProps
|
|
|
102
108
|
primary = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
103
109
|
variant: dense ? 'body2' : 'body1',
|
|
104
110
|
className: classes.primary,
|
|
105
|
-
component: primaryTypographyProps
|
|
106
|
-
display: "block",
|
|
111
|
+
component: primaryTypographyProps?.variant ? undefined : 'span',
|
|
107
112
|
...primaryTypographyProps,
|
|
108
113
|
children: primary
|
|
109
114
|
});
|
|
@@ -112,8 +117,7 @@ const ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(inProps
|
|
|
112
117
|
secondary = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
113
118
|
variant: "body2",
|
|
114
119
|
className: classes.secondary,
|
|
115
|
-
color: "
|
|
116
|
-
display: "block",
|
|
120
|
+
color: "textSecondary",
|
|
117
121
|
...secondaryTypographyProps,
|
|
118
122
|
children: secondary
|
|
119
123
|
});
|