@mui/material 5.11.10 → 5.11.12
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.d.ts +4 -1
- package/Autocomplete/Autocomplete.js +5 -2
- package/Autocomplete/autocompleteClasses.d.ts +2 -0
- package/Autocomplete/autocompleteClasses.js +1 -1
- package/Badge/Badge.js +1 -1
- package/CHANGELOG.md +233 -0
- package/Container/Container.js +0 -1
- package/DialogTitle/DialogTitle.js +2 -2
- package/InputBase/InputBase.js +2 -2
- package/InputLabel/InputLabel.js +3 -1
- package/ListSubheader/ListSubheader.js +1 -0
- package/Menu/Menu.js +1 -1
- package/MenuList/MenuList.js +7 -0
- package/Modal/Modal.d.ts +9 -1
- package/Modal/Modal.js +14 -9
- package/OutlinedInput/OutlinedInput.js +1 -1
- package/README.md +0 -2
- package/Rating/Rating.js +2 -2
- package/Select/SelectInput.js +2 -22
- package/Slider/Slider.d.ts +5 -1
- package/Slider/Slider.js +16 -11
- package/Snackbar/Snackbar.js +21 -125
- package/Stack/Stack.d.ts +0 -1
- package/Stack/Stack.js +9 -120
- package/Stack/index.d.ts +3 -0
- package/Stack/index.js +2 -1
- package/Stack/stackClasses.d.ts +6 -0
- package/Stack/stackClasses.js +7 -0
- package/Unstable_Grid2/Grid2.js +2 -3
- package/index.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +5 -2
- package/legacy/Autocomplete/autocompleteClasses.js +1 -1
- package/legacy/Badge/Badge.js +1 -1
- package/legacy/Container/Container.js +0 -1
- package/legacy/DialogTitle/DialogTitle.js +2 -2
- package/legacy/InputBase/InputBase.js +2 -2
- package/legacy/InputLabel/InputLabel.js +3 -1
- package/legacy/ListSubheader/ListSubheader.js +1 -0
- package/legacy/Menu/Menu.js +1 -1
- package/legacy/MenuList/MenuList.js +7 -0
- package/legacy/Modal/Modal.js +14 -9
- package/legacy/OutlinedInput/OutlinedInput.js +1 -1
- package/legacy/Rating/Rating.js +2 -2
- package/legacy/Select/SelectInput.js +2 -22
- package/legacy/Slider/Slider.js +16 -12
- package/legacy/Snackbar/Snackbar.js +20 -119
- package/legacy/Stack/Stack.js +13 -122
- package/legacy/Stack/index.js +2 -1
- package/legacy/Stack/stackClasses.js +7 -0
- package/legacy/Unstable_Grid2/Grid2.js +2 -3
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +1 -8
- package/legacy/styles/createTheme.js +1 -0
- package/legacy/styles/experimental_extendTheme.js +64 -40
- package/legacy/useAutocomplete/useAutocomplete.js +2 -2
- package/modern/Autocomplete/Autocomplete.js +5 -2
- package/modern/Autocomplete/autocompleteClasses.js +1 -1
- package/modern/Badge/Badge.js +1 -1
- package/modern/Container/Container.js +0 -1
- package/modern/DialogTitle/DialogTitle.js +2 -2
- package/modern/InputBase/InputBase.js +2 -2
- package/modern/InputLabel/InputLabel.js +3 -1
- package/modern/ListSubheader/ListSubheader.js +1 -0
- package/modern/Menu/Menu.js +1 -1
- package/modern/MenuList/MenuList.js +7 -0
- package/modern/Modal/Modal.js +14 -9
- package/modern/OutlinedInput/OutlinedInput.js +1 -1
- package/modern/Rating/Rating.js +2 -2
- package/modern/Select/SelectInput.js +2 -18
- package/modern/Slider/Slider.js +16 -11
- package/modern/Snackbar/Snackbar.js +21 -125
- package/modern/Stack/Stack.js +9 -120
- package/modern/Stack/index.js +2 -1
- package/modern/Stack/stackClasses.js +7 -0
- package/modern/Unstable_Grid2/Grid2.js +2 -3
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +1 -5
- package/modern/styles/createTheme.js +1 -0
- package/modern/styles/experimental_extendTheme.js +62 -41
- package/modern/useAutocomplete/useAutocomplete.js +2 -2
- package/node/Autocomplete/Autocomplete.js +5 -2
- package/node/Autocomplete/autocompleteClasses.js +1 -1
- package/node/Badge/Badge.js +2 -2
- package/node/Container/Container.js +0 -2
- package/node/DialogTitle/DialogTitle.js +2 -2
- package/node/InputBase/InputBase.js +2 -2
- package/node/InputLabel/InputLabel.js +3 -1
- package/node/ListSubheader/ListSubheader.js +1 -0
- package/node/Menu/Menu.js +1 -1
- package/node/MenuList/MenuList.js +7 -0
- package/node/Modal/Modal.js +14 -9
- package/node/OutlinedInput/OutlinedInput.js +1 -1
- package/node/Rating/Rating.js +2 -2
- package/node/Select/SelectInput.js +2 -22
- package/node/Slider/Slider.js +19 -14
- package/node/Snackbar/Snackbar.js +20 -124
- package/node/Stack/Stack.js +9 -122
- package/node/Stack/index.js +8 -1
- package/node/Stack/stackClasses.js +16 -0
- package/node/Unstable_Grid2/Grid2.js +0 -1
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +1 -9
- package/node/styles/createTheme.js +1 -0
- package/node/styles/experimental_extendTheme.js +66 -40
- package/node/useAutocomplete/useAutocomplete.js +8 -6
- package/package.json +6 -6
- package/styles/CssVarsProvider.d.ts +1 -2
- package/styles/CssVarsProvider.js +1 -8
- package/styles/createTheme.js +1 -0
- package/styles/experimental_extendTheme.d.ts +16 -0
- package/styles/experimental_extendTheme.js +65 -41
- package/umd/material-ui.development.js +3958 -3813
- package/umd/material-ui.production.min.js +21 -21
- package/useAutocomplete/useAutocomplete.d.ts +2 -2
- package/useAutocomplete/useAutocomplete.js +2 -2
|
@@ -4,13 +4,12 @@ const _excluded = ["onEnter", "onExited"],
|
|
|
4
4
|
_excluded2 = ["action", "anchorOrigin", "autoHideDuration", "children", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import
|
|
8
|
-
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
7
|
+
import { unstable_composeClasses as composeClasses, useSlotProps } from '@mui/base';
|
|
9
8
|
import ClickAwayListener from '@mui/base/ClickAwayListener';
|
|
9
|
+
import useSnackbar from '@mui/base/useSnackbar';
|
|
10
10
|
import styled from '../styles/styled';
|
|
11
11
|
import useTheme from '../styles/useTheme';
|
|
12
12
|
import useThemeProps from '../styles/useThemeProps';
|
|
13
|
-
import useEventCallback from '../utils/useEventCallback';
|
|
14
13
|
import capitalize from '../utils/capitalize';
|
|
15
14
|
import Grow from '../Grow';
|
|
16
15
|
import SnackbarContent from '../SnackbarContent';
|
|
@@ -100,13 +99,7 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
100
99
|
ContentProps,
|
|
101
100
|
disableWindowBlurListener = false,
|
|
102
101
|
message,
|
|
103
|
-
onBlur,
|
|
104
|
-
onClose,
|
|
105
|
-
onFocus,
|
|
106
|
-
onMouseEnter,
|
|
107
|
-
onMouseLeave,
|
|
108
102
|
open,
|
|
109
|
-
resumeHideDuration,
|
|
110
103
|
TransitionComponent = Grow,
|
|
111
104
|
transitionDuration = defaultTransitionDuration,
|
|
112
105
|
TransitionProps: {
|
|
@@ -120,76 +113,27 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
120
113
|
anchorOrigin: {
|
|
121
114
|
vertical,
|
|
122
115
|
horizontal
|
|
123
|
-
}
|
|
116
|
+
},
|
|
117
|
+
autoHideDuration,
|
|
118
|
+
disableWindowBlurListener,
|
|
119
|
+
TransitionComponent,
|
|
120
|
+
transitionDuration
|
|
124
121
|
});
|
|
125
122
|
const classes = useUtilityClasses(ownerState);
|
|
126
|
-
const
|
|
123
|
+
const {
|
|
124
|
+
getRootProps,
|
|
125
|
+
onClickAway
|
|
126
|
+
} = useSnackbar(_extends({}, ownerState, {
|
|
127
|
+
ref
|
|
128
|
+
}));
|
|
127
129
|
const [exited, setExited] = React.useState(true);
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
const rootProps = useSlotProps({
|
|
131
|
+
elementType: SnackbarRoot,
|
|
132
|
+
getSlotProps: getRootProps,
|
|
133
|
+
externalForwardedProps: other,
|
|
134
|
+
ownerState,
|
|
135
|
+
className: [classes.root, className]
|
|
132
136
|
});
|
|
133
|
-
const setAutoHideTimer = useEventCallback(autoHideDurationParam => {
|
|
134
|
-
if (!onClose || autoHideDurationParam == null) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
clearTimeout(timerAutoHide.current);
|
|
138
|
-
timerAutoHide.current = setTimeout(() => {
|
|
139
|
-
handleClose(null, 'timeout');
|
|
140
|
-
}, autoHideDurationParam);
|
|
141
|
-
});
|
|
142
|
-
React.useEffect(() => {
|
|
143
|
-
if (open) {
|
|
144
|
-
setAutoHideTimer(autoHideDuration);
|
|
145
|
-
}
|
|
146
|
-
return () => {
|
|
147
|
-
clearTimeout(timerAutoHide.current);
|
|
148
|
-
};
|
|
149
|
-
}, [open, autoHideDuration, setAutoHideTimer]);
|
|
150
|
-
|
|
151
|
-
// Pause the timer when the user is interacting with the Snackbar
|
|
152
|
-
// or when the user hide the window.
|
|
153
|
-
const handlePause = () => {
|
|
154
|
-
clearTimeout(timerAutoHide.current);
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
// Restart the timer when the user is no longer interacting with the Snackbar
|
|
158
|
-
// or when the window is shown back.
|
|
159
|
-
const handleResume = React.useCallback(() => {
|
|
160
|
-
if (autoHideDuration != null) {
|
|
161
|
-
setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);
|
|
162
|
-
}
|
|
163
|
-
}, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);
|
|
164
|
-
const handleFocus = event => {
|
|
165
|
-
if (onFocus) {
|
|
166
|
-
onFocus(event);
|
|
167
|
-
}
|
|
168
|
-
handlePause();
|
|
169
|
-
};
|
|
170
|
-
const handleMouseEnter = event => {
|
|
171
|
-
if (onMouseEnter) {
|
|
172
|
-
onMouseEnter(event);
|
|
173
|
-
}
|
|
174
|
-
handlePause();
|
|
175
|
-
};
|
|
176
|
-
const handleBlur = event => {
|
|
177
|
-
if (onBlur) {
|
|
178
|
-
onBlur(event);
|
|
179
|
-
}
|
|
180
|
-
handleResume();
|
|
181
|
-
};
|
|
182
|
-
const handleMouseLeave = event => {
|
|
183
|
-
if (onMouseLeave) {
|
|
184
|
-
onMouseLeave(event);
|
|
185
|
-
}
|
|
186
|
-
handleResume();
|
|
187
|
-
};
|
|
188
|
-
const handleClickAway = event => {
|
|
189
|
-
if (onClose) {
|
|
190
|
-
onClose(event, 'clickaway');
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
137
|
const handleExited = node => {
|
|
194
138
|
setExited(true);
|
|
195
139
|
if (onExited) {
|
|
@@ -202,63 +146,15 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
202
146
|
onEnter(node, isAppearing);
|
|
203
147
|
}
|
|
204
148
|
};
|
|
205
|
-
React.useEffect(() => {
|
|
206
|
-
// TODO: window global should be refactored here
|
|
207
|
-
if (!disableWindowBlurListener && open) {
|
|
208
|
-
window.addEventListener('focus', handleResume);
|
|
209
|
-
window.addEventListener('blur', handlePause);
|
|
210
|
-
return () => {
|
|
211
|
-
window.removeEventListener('focus', handleResume);
|
|
212
|
-
window.removeEventListener('blur', handlePause);
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
return undefined;
|
|
216
|
-
}, [disableWindowBlurListener, handleResume, open]);
|
|
217
|
-
React.useEffect(() => {
|
|
218
|
-
if (!open) {
|
|
219
|
-
return undefined;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* @param {KeyboardEvent} nativeEvent
|
|
224
|
-
*/
|
|
225
|
-
function handleKeyDown(nativeEvent) {
|
|
226
|
-
if (!nativeEvent.defaultPrevented) {
|
|
227
|
-
// IE11, Edge (prior to using Bink?) use 'Esc'
|
|
228
|
-
if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {
|
|
229
|
-
// not calling `preventDefault` since we don't know if people may ignore this event e.g. a permanently open snackbar
|
|
230
|
-
if (onClose) {
|
|
231
|
-
onClose(nativeEvent, 'escapeKeyDown');
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
237
|
-
return () => {
|
|
238
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
239
|
-
};
|
|
240
|
-
}, [exited, open, onClose]);
|
|
241
149
|
|
|
242
150
|
// So we only render active snackbars.
|
|
243
151
|
if (!open && exited) {
|
|
244
152
|
return null;
|
|
245
153
|
}
|
|
246
154
|
return /*#__PURE__*/_jsx(ClickAwayListener, _extends({
|
|
247
|
-
onClickAway:
|
|
155
|
+
onClickAway: onClickAway
|
|
248
156
|
}, ClickAwayListenerProps, {
|
|
249
|
-
children: /*#__PURE__*/_jsx(SnackbarRoot, _extends({
|
|
250
|
-
className: clsx(classes.root, className),
|
|
251
|
-
onBlur: handleBlur,
|
|
252
|
-
onFocus: handleFocus,
|
|
253
|
-
onMouseEnter: handleMouseEnter,
|
|
254
|
-
onMouseLeave: handleMouseLeave,
|
|
255
|
-
ownerState: ownerState,
|
|
256
|
-
ref: ref
|
|
257
|
-
// ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
|
|
258
|
-
// See https://github.com/mui/material-ui/issues/29080
|
|
259
|
-
,
|
|
260
|
-
role: "presentation"
|
|
261
|
-
}, other, {
|
|
157
|
+
children: /*#__PURE__*/_jsx(SnackbarRoot, _extends({}, rootProps, {
|
|
262
158
|
children: /*#__PURE__*/_jsx(TransitionComponent, _extends({
|
|
263
159
|
appear: true,
|
|
264
160
|
in: open,
|
package/modern/Stack/Stack.js
CHANGED
|
@@ -1,128 +1,17 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["component", "direction", "spacing", "divider", "children"];
|
|
4
|
-
import * as React from 'react';
|
|
5
1
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
7
|
-
import { deepmerge } from '@mui/utils';
|
|
2
|
+
import { createStack } from '@mui/system';
|
|
8
3
|
import styled from '../styles/styled';
|
|
9
4
|
import useThemeProps from '../styles/useThemeProps';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
-
function joinChildren(children, separator) {
|
|
20
|
-
const childrenArray = React.Children.toArray(children).filter(Boolean);
|
|
21
|
-
return childrenArray.reduce((output, child, index) => {
|
|
22
|
-
output.push(child);
|
|
23
|
-
if (index < childrenArray.length - 1) {
|
|
24
|
-
output.push( /*#__PURE__*/React.cloneElement(separator, {
|
|
25
|
-
key: `separator-${index}`
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
return output;
|
|
29
|
-
}, []);
|
|
30
|
-
}
|
|
31
|
-
const getSideFromDirection = direction => {
|
|
32
|
-
return {
|
|
33
|
-
row: 'Left',
|
|
34
|
-
'row-reverse': 'Right',
|
|
35
|
-
column: 'Top',
|
|
36
|
-
'column-reverse': 'Bottom'
|
|
37
|
-
}[direction];
|
|
38
|
-
};
|
|
39
|
-
export const style = ({
|
|
40
|
-
ownerState,
|
|
41
|
-
theme
|
|
42
|
-
}) => {
|
|
43
|
-
let styles = _extends({
|
|
44
|
-
display: 'flex',
|
|
45
|
-
flexDirection: 'column'
|
|
46
|
-
}, handleBreakpoints({
|
|
47
|
-
theme
|
|
48
|
-
}, resolveBreakpointValues({
|
|
49
|
-
values: ownerState.direction,
|
|
50
|
-
breakpoints: theme.breakpoints.values
|
|
51
|
-
}), propValue => ({
|
|
52
|
-
flexDirection: propValue
|
|
53
|
-
})));
|
|
54
|
-
if (ownerState.spacing) {
|
|
55
|
-
const transformer = createUnarySpacing(theme);
|
|
56
|
-
const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
|
|
57
|
-
if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
|
|
58
|
-
acc[breakpoint] = true;
|
|
59
|
-
}
|
|
60
|
-
return acc;
|
|
61
|
-
}, {});
|
|
62
|
-
const directionValues = resolveBreakpointValues({
|
|
63
|
-
values: ownerState.direction,
|
|
64
|
-
base
|
|
65
|
-
});
|
|
66
|
-
const spacingValues = resolveBreakpointValues({
|
|
67
|
-
values: ownerState.spacing,
|
|
68
|
-
base
|
|
69
|
-
});
|
|
70
|
-
if (typeof directionValues === 'object') {
|
|
71
|
-
Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
|
|
72
|
-
const directionValue = directionValues[breakpoint];
|
|
73
|
-
if (!directionValue) {
|
|
74
|
-
const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
|
|
75
|
-
directionValues[breakpoint] = previousDirectionValue;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
const styleFromPropValue = (propValue, breakpoint) => {
|
|
80
|
-
return {
|
|
81
|
-
'& > :not(style) + :not(style)': {
|
|
82
|
-
margin: 0,
|
|
83
|
-
[`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: getValue(transformer, propValue)
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
styles = deepmerge(styles, handleBreakpoints({
|
|
88
|
-
theme
|
|
89
|
-
}, spacingValues, styleFromPropValue));
|
|
90
|
-
}
|
|
91
|
-
styles = mergeBreakpointsInOrder(theme.breakpoints, styles);
|
|
92
|
-
return styles;
|
|
93
|
-
};
|
|
94
|
-
const StackRoot = styled('div', {
|
|
95
|
-
name: 'MuiStack',
|
|
96
|
-
slot: 'Root',
|
|
97
|
-
overridesResolver: (props, styles) => {
|
|
98
|
-
return [styles.root];
|
|
99
|
-
}
|
|
100
|
-
})(style);
|
|
101
|
-
const Stack = /*#__PURE__*/React.forwardRef(function Stack(inProps, ref) {
|
|
102
|
-
const themeProps = useThemeProps({
|
|
5
|
+
const Stack = createStack({
|
|
6
|
+
createStyledComponent: styled('div', {
|
|
7
|
+
name: 'MuiStack',
|
|
8
|
+
slot: 'Root',
|
|
9
|
+
overridesResolver: (props, styles) => styles.root
|
|
10
|
+
}),
|
|
11
|
+
useThemeProps: inProps => useThemeProps({
|
|
103
12
|
props: inProps,
|
|
104
13
|
name: 'MuiStack'
|
|
105
|
-
})
|
|
106
|
-
const props = extendSxProp(themeProps);
|
|
107
|
-
const {
|
|
108
|
-
component = 'div',
|
|
109
|
-
direction = 'column',
|
|
110
|
-
spacing = 0,
|
|
111
|
-
divider,
|
|
112
|
-
children
|
|
113
|
-
} = props,
|
|
114
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
115
|
-
const ownerState = {
|
|
116
|
-
direction,
|
|
117
|
-
spacing
|
|
118
|
-
};
|
|
119
|
-
return /*#__PURE__*/_jsx(StackRoot, _extends({
|
|
120
|
-
as: component,
|
|
121
|
-
ownerState: ownerState,
|
|
122
|
-
ref: ref
|
|
123
|
-
}, other, {
|
|
124
|
-
children: divider ? joinChildren(children, divider) : children
|
|
125
|
-
}));
|
|
14
|
+
})
|
|
126
15
|
});
|
|
127
16
|
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
|
128
17
|
// ----------------------------- Warning --------------------------------
|
package/modern/Stack/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from './Stack';
|
|
1
|
+
export { default } from './Stack';
|
|
2
|
+
export { default as stackClasses } from './stackClasses';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
2
|
+
import generateUtilityClass from '../generateUtilityClass';
|
|
3
|
+
export function getStackUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiStack', slot);
|
|
5
|
+
}
|
|
6
|
+
const stackClasses = generateUtilityClasses('MuiStack', ['root']);
|
|
7
|
+
export default stackClasses;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { createGrid } from '@mui/system/Unstable_Grid';
|
|
2
|
+
import { createGrid as createGrid2 } from '@mui/system/Unstable_Grid';
|
|
3
3
|
import { styled, useThemeProps } from '../styles';
|
|
4
|
-
const Grid2 =
|
|
4
|
+
const Grid2 = createGrid2({
|
|
5
5
|
createStyledComponent: styled('div', {
|
|
6
6
|
name: 'MuiGrid2',
|
|
7
7
|
overridesResolver: (props, styles) => styles.root
|
|
8
8
|
}),
|
|
9
9
|
componentName: 'MuiGrid2',
|
|
10
|
-
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
11
10
|
useThemeProps: inProps => useThemeProps({
|
|
12
11
|
props: inProps,
|
|
13
12
|
name: 'MuiGrid2'
|
package/modern/index.js
CHANGED
|
@@ -3,9 +3,6 @@ import { unstable_createCssVarsProvider as createCssVarsProvider, unstable_style
|
|
|
3
3
|
import experimental_extendTheme from './experimental_extendTheme';
|
|
4
4
|
import createTypography from './createTypography';
|
|
5
5
|
import excludeVariablesFromRoot from './excludeVariablesFromRoot';
|
|
6
|
-
const shouldSkipGeneratingVar = keys => !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
7
|
-
// ends with sxConfig
|
|
8
|
-
keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
|
|
9
6
|
const defaultTheme = experimental_extendTheme();
|
|
10
7
|
const {
|
|
11
8
|
CssVarsProvider,
|
|
@@ -32,7 +29,6 @@ const {
|
|
|
32
29
|
};
|
|
33
30
|
return newTheme;
|
|
34
31
|
},
|
|
35
|
-
shouldSkipGeneratingVar,
|
|
36
32
|
excludeVariablesFromRoot
|
|
37
33
|
});
|
|
38
|
-
export { useColorScheme, getInitColorSchemeScript,
|
|
34
|
+
export { useColorScheme, getInitColorSchemeScript, CssVarsProvider as Experimental_CssVarsProvider };
|
|
@@ -37,6 +37,7 @@ Please use another name.` : _formatMuiErrorMessage(18));
|
|
|
37
37
|
muiTheme = deepmerge(muiTheme, other);
|
|
38
38
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
|
39
39
|
if (process.env.NODE_ENV !== 'production') {
|
|
40
|
+
// TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.
|
|
40
41
|
const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];
|
|
41
42
|
const traverse = (node, component) => {
|
|
42
43
|
let key;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["colorSchemes", "cssVarPrefix"],
|
|
3
|
+
const _excluded = ["colorSchemes", "cssVarPrefix", "shouldSkipGeneratingVar"],
|
|
4
4
|
_excluded2 = ["palette"];
|
|
5
5
|
import { deepmerge } from '@mui/utils';
|
|
6
|
-
import { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, unstable_createGetCssVar as systemCreateGetCssVar, unstable_defaultSxConfig as defaultSxConfig, unstable_styleFunctionSx as styleFunctionSx } from '@mui/system';
|
|
6
|
+
import { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, unstable_createGetCssVar as systemCreateGetCssVar, unstable_defaultSxConfig as defaultSxConfig, unstable_styleFunctionSx as styleFunctionSx, unstable_prepareCssVars as prepareCssVars } from '@mui/system';
|
|
7
7
|
import createThemeWithoutVars from './createTheme';
|
|
8
8
|
import getOverlayAlpha from './getOverlayAlpha';
|
|
9
9
|
const defaultDarkOverlays = [...Array(25)].map((_, index) => {
|
|
@@ -41,10 +41,14 @@ const silent = fn => {
|
|
|
41
41
|
return undefined;
|
|
42
42
|
};
|
|
43
43
|
export const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);
|
|
44
|
+
export const defaultShouldSkipGeneratingVar = keys => !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
45
|
+
// ends with sxConfig
|
|
46
|
+
keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
|
|
44
47
|
export default function extendTheme(options = {}, ...args) {
|
|
45
48
|
const {
|
|
46
49
|
colorSchemes: colorSchemesInput = {},
|
|
47
|
-
cssVarPrefix = 'mui'
|
|
50
|
+
cssVarPrefix = 'mui',
|
|
51
|
+
shouldSkipGeneratingVar = defaultShouldSkipGeneratingVar
|
|
48
52
|
} = options,
|
|
49
53
|
input = _objectWithoutPropertiesLoose(options, _excluded);
|
|
50
54
|
const getCssVar = createGetCssVar(cssVarPrefix);
|
|
@@ -90,6 +94,12 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
90
94
|
});
|
|
91
95
|
Object.keys(theme.colorSchemes).forEach(key => {
|
|
92
96
|
const palette = theme.colorSchemes[key].palette;
|
|
97
|
+
const setCssVarColor = cssVar => {
|
|
98
|
+
const tokens = cssVar.split('-');
|
|
99
|
+
const color = tokens[1];
|
|
100
|
+
const colorToken = tokens[2];
|
|
101
|
+
return getCssVar(cssVar, palette[color][colorToken]);
|
|
102
|
+
};
|
|
93
103
|
|
|
94
104
|
// attach black & white channels to common node
|
|
95
105
|
if (key === 'light') {
|
|
@@ -107,10 +117,10 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
107
117
|
setColor(palette.Alert, 'infoColor', safeDarken(palette.info.light, 0.6));
|
|
108
118
|
setColor(palette.Alert, 'successColor', safeDarken(palette.success.light, 0.6));
|
|
109
119
|
setColor(palette.Alert, 'warningColor', safeDarken(palette.warning.light, 0.6));
|
|
110
|
-
setColor(palette.Alert, 'errorFilledBg',
|
|
111
|
-
setColor(palette.Alert, 'infoFilledBg',
|
|
112
|
-
setColor(palette.Alert, 'successFilledBg',
|
|
113
|
-
setColor(palette.Alert, 'warningFilledBg',
|
|
120
|
+
setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-main'));
|
|
121
|
+
setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-main'));
|
|
122
|
+
setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-main'));
|
|
123
|
+
setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-main'));
|
|
114
124
|
setColor(palette.Alert, 'errorFilledColor', silent(() => lightPalette.getContrastText(palette.error.main)));
|
|
115
125
|
setColor(palette.Alert, 'infoFilledColor', silent(() => lightPalette.getContrastText(palette.info.main)));
|
|
116
126
|
setColor(palette.Alert, 'successFilledColor', silent(() => lightPalette.getContrastText(palette.success.main)));
|
|
@@ -119,15 +129,15 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
119
129
|
setColor(palette.Alert, 'infoStandardBg', safeLighten(palette.info.light, 0.9));
|
|
120
130
|
setColor(palette.Alert, 'successStandardBg', safeLighten(palette.success.light, 0.9));
|
|
121
131
|
setColor(palette.Alert, 'warningStandardBg', safeLighten(palette.warning.light, 0.9));
|
|
122
|
-
setColor(palette.Alert, 'errorIconColor',
|
|
123
|
-
setColor(palette.Alert, 'infoIconColor',
|
|
124
|
-
setColor(palette.Alert, 'successIconColor',
|
|
125
|
-
setColor(palette.Alert, 'warningIconColor',
|
|
126
|
-
setColor(palette.AppBar, 'defaultBg',
|
|
127
|
-
setColor(palette.Avatar, 'defaultBg',
|
|
128
|
-
setColor(palette.Chip, 'defaultBorder',
|
|
129
|
-
setColor(palette.Chip, 'defaultAvatarColor',
|
|
130
|
-
setColor(palette.Chip, 'defaultIconColor',
|
|
132
|
+
setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));
|
|
133
|
+
setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));
|
|
134
|
+
setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));
|
|
135
|
+
setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));
|
|
136
|
+
setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));
|
|
137
|
+
setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));
|
|
138
|
+
setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));
|
|
139
|
+
setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));
|
|
140
|
+
setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));
|
|
131
141
|
setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');
|
|
132
142
|
setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');
|
|
133
143
|
setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');
|
|
@@ -137,7 +147,7 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
137
147
|
setColor(palette.LinearProgress, 'infoBg', safeLighten(palette.info.main, 0.62));
|
|
138
148
|
setColor(palette.LinearProgress, 'successBg', safeLighten(palette.success.main, 0.62));
|
|
139
149
|
setColor(palette.LinearProgress, 'warningBg', safeLighten(palette.warning.main, 0.62));
|
|
140
|
-
setColor(palette.Skeleton, 'bg', `rgba(${
|
|
150
|
+
setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.11)`);
|
|
141
151
|
setColor(palette.Slider, 'primaryTrack', safeLighten(palette.primary.main, 0.62));
|
|
142
152
|
setColor(palette.Slider, 'secondaryTrack', safeLighten(palette.secondary.main, 0.62));
|
|
143
153
|
setColor(palette.Slider, 'errorTrack', safeLighten(palette.error.main, 0.62));
|
|
@@ -148,10 +158,10 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
148
158
|
setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
|
|
149
159
|
setColor(palette.SnackbarContent, 'color', silent(() => lightPalette.getContrastText(snackbarContentBackground)));
|
|
150
160
|
setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));
|
|
151
|
-
setColor(palette.StepConnector, 'border',
|
|
152
|
-
setColor(palette.StepContent, 'border',
|
|
153
|
-
setColor(palette.Switch, 'defaultColor',
|
|
154
|
-
setColor(palette.Switch, 'defaultDisabledColor',
|
|
161
|
+
setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-400'));
|
|
162
|
+
setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-400'));
|
|
163
|
+
setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-common-white'));
|
|
164
|
+
setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-100'));
|
|
155
165
|
setColor(palette.Switch, 'primaryDisabledColor', safeLighten(palette.primary.main, 0.62));
|
|
156
166
|
setColor(palette.Switch, 'secondaryDisabledColor', safeLighten(palette.secondary.main, 0.62));
|
|
157
167
|
setColor(palette.Switch, 'errorDisabledColor', safeLighten(palette.error.main, 0.62));
|
|
@@ -165,10 +175,10 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
165
175
|
setColor(palette.Alert, 'infoColor', safeLighten(palette.info.light, 0.6));
|
|
166
176
|
setColor(palette.Alert, 'successColor', safeLighten(palette.success.light, 0.6));
|
|
167
177
|
setColor(palette.Alert, 'warningColor', safeLighten(palette.warning.light, 0.6));
|
|
168
|
-
setColor(palette.Alert, 'errorFilledBg',
|
|
169
|
-
setColor(palette.Alert, 'infoFilledBg',
|
|
170
|
-
setColor(palette.Alert, 'successFilledBg',
|
|
171
|
-
setColor(palette.Alert, 'warningFilledBg',
|
|
178
|
+
setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-dark'));
|
|
179
|
+
setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-dark'));
|
|
180
|
+
setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-dark'));
|
|
181
|
+
setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-dark'));
|
|
172
182
|
setColor(palette.Alert, 'errorFilledColor', silent(() => darkPalette.getContrastText(palette.error.dark)));
|
|
173
183
|
setColor(palette.Alert, 'infoFilledColor', silent(() => darkPalette.getContrastText(palette.info.dark)));
|
|
174
184
|
setColor(palette.Alert, 'successFilledColor', silent(() => darkPalette.getContrastText(palette.success.dark)));
|
|
@@ -177,17 +187,17 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
177
187
|
setColor(palette.Alert, 'infoStandardBg', safeDarken(palette.info.light, 0.9));
|
|
178
188
|
setColor(palette.Alert, 'successStandardBg', safeDarken(palette.success.light, 0.9));
|
|
179
189
|
setColor(palette.Alert, 'warningStandardBg', safeDarken(palette.warning.light, 0.9));
|
|
180
|
-
setColor(palette.Alert, 'errorIconColor',
|
|
181
|
-
setColor(palette.Alert, 'infoIconColor',
|
|
182
|
-
setColor(palette.Alert, 'successIconColor',
|
|
183
|
-
setColor(palette.Alert, 'warningIconColor',
|
|
184
|
-
setColor(palette.AppBar, 'defaultBg',
|
|
185
|
-
setColor(palette.AppBar, 'darkBg',
|
|
186
|
-
setColor(palette.AppBar, 'darkColor',
|
|
187
|
-
setColor(palette.Avatar, 'defaultBg',
|
|
188
|
-
setColor(palette.Chip, 'defaultBorder',
|
|
189
|
-
setColor(palette.Chip, 'defaultAvatarColor',
|
|
190
|
-
setColor(palette.Chip, 'defaultIconColor',
|
|
190
|
+
setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));
|
|
191
|
+
setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));
|
|
192
|
+
setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));
|
|
193
|
+
setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));
|
|
194
|
+
setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-900'));
|
|
195
|
+
setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode
|
|
196
|
+
setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode
|
|
197
|
+
setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));
|
|
198
|
+
setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));
|
|
199
|
+
setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));
|
|
200
|
+
setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));
|
|
191
201
|
setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');
|
|
192
202
|
setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');
|
|
193
203
|
setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');
|
|
@@ -197,7 +207,7 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
197
207
|
setColor(palette.LinearProgress, 'infoBg', safeDarken(palette.info.main, 0.5));
|
|
198
208
|
setColor(palette.LinearProgress, 'successBg', safeDarken(palette.success.main, 0.5));
|
|
199
209
|
setColor(palette.LinearProgress, 'warningBg', safeDarken(palette.warning.main, 0.5));
|
|
200
|
-
setColor(palette.Skeleton, 'bg', `rgba(${
|
|
210
|
+
setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.13)`);
|
|
201
211
|
setColor(palette.Slider, 'primaryTrack', safeDarken(palette.primary.main, 0.5));
|
|
202
212
|
setColor(palette.Slider, 'secondaryTrack', safeDarken(palette.secondary.main, 0.5));
|
|
203
213
|
setColor(palette.Slider, 'errorTrack', safeDarken(palette.error.main, 0.5));
|
|
@@ -208,10 +218,10 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
208
218
|
setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);
|
|
209
219
|
setColor(palette.SnackbarContent, 'color', silent(() => darkPalette.getContrastText(snackbarContentBackground)));
|
|
210
220
|
setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));
|
|
211
|
-
setColor(palette.StepConnector, 'border',
|
|
212
|
-
setColor(palette.StepContent, 'border',
|
|
213
|
-
setColor(palette.Switch, 'defaultColor',
|
|
214
|
-
setColor(palette.Switch, 'defaultDisabledColor',
|
|
221
|
+
setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-600'));
|
|
222
|
+
setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-600'));
|
|
223
|
+
setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-grey-300'));
|
|
224
|
+
setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-600'));
|
|
215
225
|
setColor(palette.Switch, 'primaryDisabledColor', safeDarken(palette.primary.main, 0.55));
|
|
216
226
|
setColor(palette.Switch, 'secondaryDisabledColor', safeDarken(palette.secondary.main, 0.55));
|
|
217
227
|
setColor(palette.Switch, 'errorDisabledColor', safeDarken(palette.error.main, 0.55));
|
|
@@ -264,6 +274,17 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
264
274
|
});
|
|
265
275
|
});
|
|
266
276
|
theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);
|
|
277
|
+
const parserConfig = {
|
|
278
|
+
prefix: cssVarPrefix,
|
|
279
|
+
shouldSkipGeneratingVar
|
|
280
|
+
};
|
|
281
|
+
const {
|
|
282
|
+
vars: themeVars,
|
|
283
|
+
generateCssVars
|
|
284
|
+
} = prepareCssVars(theme, parserConfig);
|
|
285
|
+
theme.vars = themeVars;
|
|
286
|
+
theme.generateCssVars = generateCssVars;
|
|
287
|
+
theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar;
|
|
267
288
|
theme.unstable_sxConfig = _extends({}, defaultSxConfig, input?.unstable_sxConfig);
|
|
268
289
|
theme.unstable_sx = function sx(props) {
|
|
269
290
|
return styleFunctionSx({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export * from '@mui/base/
|
|
1
|
+
export { default } from '@mui/base/useAutocomplete';
|
|
2
|
+
export * from '@mui/base/useAutocomplete';
|
|
@@ -43,6 +43,7 @@ const useUtilityClasses = ownerState => {
|
|
|
43
43
|
const {
|
|
44
44
|
classes,
|
|
45
45
|
disablePortal,
|
|
46
|
+
expanded,
|
|
46
47
|
focused,
|
|
47
48
|
fullWidth,
|
|
48
49
|
hasClearIcon,
|
|
@@ -52,7 +53,7 @@ const useUtilityClasses = ownerState => {
|
|
|
52
53
|
size
|
|
53
54
|
} = ownerState;
|
|
54
55
|
const slots = {
|
|
55
|
-
root: ['root', focused && 'focused', fullWidth && 'fullWidth', hasClearIcon && 'hasClearIcon', hasPopupIcon && 'hasPopupIcon'],
|
|
56
|
+
root: ['root', expanded && 'expanded', focused && 'focused', fullWidth && 'fullWidth', hasClearIcon && 'hasClearIcon', hasPopupIcon && 'hasPopupIcon'],
|
|
56
57
|
inputRoot: ['inputRoot'],
|
|
57
58
|
input: ['input', inputFocused && 'inputFocused'],
|
|
58
59
|
tag: ['tag', `tagSize${(0, _capitalize.default)(size)}`],
|
|
@@ -451,6 +452,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
451
452
|
getOptionProps,
|
|
452
453
|
value,
|
|
453
454
|
dirty,
|
|
455
|
+
expanded,
|
|
454
456
|
id,
|
|
455
457
|
popupOpen,
|
|
456
458
|
focused,
|
|
@@ -468,6 +470,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
468
470
|
// If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
|
|
469
471
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
470
472
|
disablePortal,
|
|
473
|
+
expanded,
|
|
471
474
|
focused,
|
|
472
475
|
fullWidth,
|
|
473
476
|
hasClearIcon,
|
|
@@ -914,7 +917,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
914
917
|
*
|
|
915
918
|
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
916
919
|
* @param {T} option The highlighted option.
|
|
917
|
-
* @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`.
|
|
920
|
+
* @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`, `"touch"`.
|
|
918
921
|
*/
|
|
919
922
|
onHighlightChange: _propTypes.default.func,
|
|
920
923
|
/**
|
|
@@ -11,6 +11,6 @@ var _generateUtilityClass = _interopRequireDefault(require("../generateUtilityCl
|
|
|
11
11
|
function getAutocompleteUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiAutocomplete', slot);
|
|
13
13
|
}
|
|
14
|
-
const autocompleteClasses = (0, _utils.unstable_generateUtilityClasses)('MuiAutocomplete', ['root', 'fullWidth', 'focused', 'focusVisible', 'tag', 'tagSizeSmall', 'tagSizeMedium', 'hasPopupIcon', 'hasClearIcon', 'inputRoot', 'input', 'inputFocused', 'endAdornment', 'clearIndicator', 'popupIndicator', 'popupIndicatorOpen', 'popper', 'popperDisablePortal', 'paper', 'listbox', 'loading', 'noOptions', 'option', 'groupLabel', 'groupUl']);
|
|
14
|
+
const autocompleteClasses = (0, _utils.unstable_generateUtilityClasses)('MuiAutocomplete', ['root', 'expanded', 'fullWidth', 'focused', 'focusVisible', 'tag', 'tagSizeSmall', 'tagSizeMedium', 'hasPopupIcon', 'hasClearIcon', 'inputRoot', 'input', 'inputFocused', 'endAdornment', 'clearIndicator', 'popupIndicator', 'popupIndicatorOpen', 'popper', 'popperDisablePortal', 'paper', 'listbox', 'loading', 'noOptions', 'option', 'groupLabel', 'groupUl']);
|
|
15
15
|
var _default = autocompleteClasses;
|
|
16
16
|
exports.default = _default;
|