@mui/material 5.15.13 → 5.15.15
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.js +30 -23
- package/AccordionActions/AccordionActions.js +14 -12
- package/AccordionDetails/AccordionDetails.js +2 -2
- package/AccordionSummary/AccordionSummary.js +29 -23
- package/Autocomplete/Autocomplete.d.ts +1 -1
- package/Autocomplete/Autocomplete.js +60 -34
- package/Autocomplete/autocompleteClasses.d.ts +3 -3
- package/CHANGELOG.md +156 -60
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +1 -1
- package/Icon/Icon.d.ts +1 -1
- package/Icon/Icon.js +1 -1
- package/OverridableComponent.d.ts +1 -1
- package/Popper/Popper.d.ts +3 -26
- package/README.md +2 -2
- package/RadioGroup/RadioGroup.d.ts +0 -2
- package/RadioGroup/RadioGroup.js +23 -2
- package/RadioGroup/index.d.ts +3 -0
- package/RadioGroup/index.js +3 -1
- package/RadioGroup/radioGroupClasses.d.ts +6 -0
- package/RadioGroup/radioGroupClasses.js +7 -0
- package/Select/Select.d.ts +8 -20
- package/Slider/Slider.js +404 -223
- package/SvgIcon/SvgIcon.js +1 -1
- package/index.js +1 -1
- package/legacy/Accordion/Accordion.js +33 -22
- package/legacy/AccordionActions/AccordionActions.js +17 -14
- package/legacy/AccordionDetails/AccordionDetails.js +2 -2
- package/legacy/AccordionSummary/AccordionSummary.js +31 -22
- package/legacy/Autocomplete/Autocomplete.js +133 -114
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/Icon/Icon.js +1 -1
- package/legacy/RadioGroup/RadioGroup.js +21 -2
- package/legacy/RadioGroup/index.js +3 -1
- package/legacy/RadioGroup/radioGroupClasses.js +7 -0
- package/legacy/Slider/Slider.js +373 -191
- package/legacy/SvgIcon/SvgIcon.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/experimental_extendTheme.js +1 -1
- package/legacy/styles/rootShouldForwardProp.js +5 -0
- package/legacy/styles/slotShouldForwardProp.js +5 -0
- package/legacy/styles/styled.js +4 -5
- package/legacy/usePagination/usePagination.js +1 -1
- package/modern/Accordion/Accordion.js +30 -23
- package/modern/AccordionActions/AccordionActions.js +14 -12
- package/modern/AccordionDetails/AccordionDetails.js +2 -2
- package/modern/AccordionSummary/AccordionSummary.js +29 -23
- package/modern/Autocomplete/Autocomplete.js +60 -34
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/Icon/Icon.js +1 -1
- package/modern/RadioGroup/RadioGroup.js +23 -2
- package/modern/RadioGroup/index.js +3 -1
- package/modern/RadioGroup/radioGroupClasses.js +7 -0
- package/modern/Slider/Slider.js +337 -172
- package/modern/SvgIcon/SvgIcon.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/experimental_extendTheme.js +1 -1
- package/modern/styles/rootShouldForwardProp.js +3 -0
- package/modern/styles/slotShouldForwardProp.js +5 -0
- package/modern/styles/styled.js +4 -3
- package/modern/usePagination/usePagination.js +1 -1
- package/node/Accordion/Accordion.js +32 -25
- package/node/AccordionActions/AccordionActions.js +16 -14
- package/node/AccordionDetails/AccordionDetails.js +4 -4
- package/node/AccordionSummary/AccordionSummary.js +33 -27
- package/node/Autocomplete/Autocomplete.js +72 -46
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/Icon/Icon.js +1 -1
- package/node/RadioGroup/RadioGroup.js +23 -2
- package/node/RadioGroup/index.js +25 -1
- package/node/RadioGroup/radioGroupClasses.js +15 -0
- package/node/Slider/Slider.js +414 -233
- package/node/SvgIcon/SvgIcon.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/experimental_extendTheme.js +1 -1
- package/node/styles/rootShouldForwardProp.js +10 -0
- package/node/styles/slotShouldForwardProp.js +11 -0
- package/node/styles/styled.js +17 -8
- package/node/usePagination/usePagination.js +1 -1
- package/package.json +6 -6
- package/styles/components.d.ts +5 -0
- package/styles/experimental_extendTheme.js +1 -1
- package/styles/overrides.d.ts +2 -0
- package/styles/rootShouldForwardProp.d.ts +2 -0
- package/styles/rootShouldForwardProp.js +3 -0
- package/styles/slotShouldForwardProp.d.ts +2 -0
- package/styles/slotShouldForwardProp.js +5 -0
- package/styles/styled.d.ts +2 -3
- package/styles/styled.js +4 -3
- package/umd/material-ui.development.js +1010 -746
- package/umd/material-ui.production.min.js +2 -2
- package/usePagination/usePagination.js +1 -1
package/Accordion/Accordion.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["children", "className", "defaultExpanded", "disabled", "disableGutters", "expanded", "onChange", "square", "slots", "slotProps", "TransitionComponent", "TransitionProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { isFragment } from 'react-is';
|
|
@@ -9,8 +9,7 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import chainPropTypes from '@mui/utils/chainPropTypes';
|
|
11
11
|
import composeClasses from '@mui/utils/composeClasses';
|
|
12
|
-
import styled from '../
|
|
13
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
12
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
14
13
|
import Collapse from '../Collapse';
|
|
15
14
|
import Paper from '../Paper';
|
|
16
15
|
import AccordionContext from './AccordionContext';
|
|
@@ -19,6 +18,7 @@ import useSlot from '../utils/useSlot';
|
|
|
19
18
|
import accordionClasses, { getAccordionUtilityClass } from './accordionClasses';
|
|
20
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
const useThemeProps = createUseThemeProps('MuiAccordion');
|
|
22
22
|
const useUtilityClasses = ownerState => {
|
|
23
23
|
const {
|
|
24
24
|
classes,
|
|
@@ -92,27 +92,34 @@ const AccordionRoot = styled(Paper, {
|
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
}, ({
|
|
95
|
-
theme
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
95
|
+
theme
|
|
96
|
+
}) => ({
|
|
97
|
+
variants: [{
|
|
98
|
+
props: props => !props.square,
|
|
99
|
+
style: {
|
|
100
|
+
borderRadius: 0,
|
|
101
|
+
'&:first-of-type': {
|
|
102
|
+
borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
|
|
103
|
+
borderTopRightRadius: (theme.vars || theme).shape.borderRadius
|
|
104
|
+
},
|
|
105
|
+
'&:last-of-type': {
|
|
106
|
+
borderBottomLeftRadius: (theme.vars || theme).shape.borderRadius,
|
|
107
|
+
borderBottomRightRadius: (theme.vars || theme).shape.borderRadius,
|
|
108
|
+
// Fix a rendering issue on Edge
|
|
109
|
+
'@supports (-ms-ime-align: auto)': {
|
|
110
|
+
borderBottomLeftRadius: 0,
|
|
111
|
+
borderBottomRightRadius: 0
|
|
112
|
+
}
|
|
113
|
+
}
|
|
110
114
|
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
}, {
|
|
116
|
+
props: props => !props.disableGutters,
|
|
117
|
+
style: {
|
|
118
|
+
[`&.${accordionClasses.expanded}`]: {
|
|
119
|
+
margin: '16px 0'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}]
|
|
116
123
|
}));
|
|
117
124
|
const Accordion = /*#__PURE__*/React.forwardRef(function Accordion(inProps, ref) {
|
|
118
125
|
const props = useThemeProps({
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["className", "disableSpacing"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import styled from '../
|
|
11
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
10
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
12
11
|
import { getAccordionActionsUtilityClass } from './accordionActionsClasses';
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
const useThemeProps = createUseThemeProps('MuiAccordionActions');
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
16
16
|
classes,
|
|
@@ -30,18 +30,20 @@ const AccordionActionsRoot = styled('div', {
|
|
|
30
30
|
} = props;
|
|
31
31
|
return [styles.root, !ownerState.disableSpacing && styles.spacing];
|
|
32
32
|
}
|
|
33
|
-
})(
|
|
34
|
-
ownerState
|
|
35
|
-
}) => _extends({
|
|
33
|
+
})({
|
|
36
34
|
display: 'flex',
|
|
37
35
|
alignItems: 'center',
|
|
38
36
|
padding: 8,
|
|
39
|
-
justifyContent: 'flex-end'
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
justifyContent: 'flex-end',
|
|
38
|
+
variants: [{
|
|
39
|
+
props: props => !props.disableSpacing,
|
|
40
|
+
style: {
|
|
41
|
+
'& > :not(style) ~ :not(style)': {
|
|
42
|
+
marginLeft: 8
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}]
|
|
46
|
+
});
|
|
45
47
|
const AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions(inProps, ref) {
|
|
46
48
|
const props = useThemeProps({
|
|
47
49
|
props: inProps,
|
|
@@ -7,10 +7,10 @@ import * as React from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import styled from '../
|
|
11
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
10
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
12
11
|
import { getAccordionDetailsUtilityClass } from './accordionDetailsClasses';
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
const useThemeProps = createUseThemeProps('MuiAccordionDetails');
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
16
16
|
classes
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["children", "className", "expandIcon", "focusVisibleClassName", "onClick"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
|
-
import styled from '../
|
|
11
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
10
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
12
11
|
import ButtonBase from '../ButtonBase';
|
|
13
12
|
import AccordionContext from '../Accordion/AccordionContext';
|
|
14
13
|
import accordionSummaryClasses, { getAccordionSummaryUtilityClass } from './accordionSummaryClasses';
|
|
15
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const useThemeProps = createUseThemeProps('MuiAccordionSummary');
|
|
17
17
|
const useUtilityClasses = ownerState => {
|
|
18
18
|
const {
|
|
19
19
|
classes,
|
|
@@ -34,13 +34,12 @@ const AccordionSummaryRoot = styled(ButtonBase, {
|
|
|
34
34
|
slot: 'Root',
|
|
35
35
|
overridesResolver: (props, styles) => styles.root
|
|
36
36
|
})(({
|
|
37
|
-
theme
|
|
38
|
-
ownerState
|
|
37
|
+
theme
|
|
39
38
|
}) => {
|
|
40
39
|
const transition = {
|
|
41
40
|
duration: theme.transitions.duration.shortest
|
|
42
41
|
};
|
|
43
|
-
return
|
|
42
|
+
return {
|
|
44
43
|
display: 'flex',
|
|
45
44
|
minHeight: 48,
|
|
46
45
|
padding: theme.spacing(0, 2),
|
|
@@ -53,31 +52,38 @@ const AccordionSummaryRoot = styled(ButtonBase, {
|
|
|
53
52
|
},
|
|
54
53
|
[`&:hover:not(.${accordionSummaryClasses.disabled})`]: {
|
|
55
54
|
cursor: 'pointer'
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
},
|
|
56
|
+
variants: [{
|
|
57
|
+
props: props => !props.disableGutters,
|
|
58
|
+
style: {
|
|
59
|
+
[`&.${accordionSummaryClasses.expanded}`]: {
|
|
60
|
+
minHeight: 64
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}]
|
|
64
|
+
};
|
|
62
65
|
});
|
|
63
66
|
const AccordionSummaryContent = styled('div', {
|
|
64
67
|
name: 'MuiAccordionSummary',
|
|
65
68
|
slot: 'Content',
|
|
66
69
|
overridesResolver: (props, styles) => styles.content
|
|
67
70
|
})(({
|
|
68
|
-
theme
|
|
69
|
-
|
|
70
|
-
}) => _extends({
|
|
71
|
+
theme
|
|
72
|
+
}) => ({
|
|
71
73
|
display: 'flex',
|
|
72
74
|
flexGrow: 1,
|
|
73
|
-
margin: '12px 0'
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
margin: '12px 0',
|
|
76
|
+
variants: [{
|
|
77
|
+
props: props => !props.disableGutters,
|
|
78
|
+
style: {
|
|
79
|
+
transition: theme.transitions.create(['margin'], {
|
|
80
|
+
duration: theme.transitions.duration.shortest
|
|
81
|
+
}),
|
|
82
|
+
[`&.${accordionSummaryClasses.expanded}`]: {
|
|
83
|
+
margin: '20px 0'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}]
|
|
81
87
|
}));
|
|
82
88
|
const AccordionSummaryExpandIconWrapper = styled('div', {
|
|
83
89
|
name: 'MuiAccordionSummary',
|
|
@@ -171,7 +171,7 @@ export interface AutocompleteProps<
|
|
|
171
171
|
};
|
|
172
172
|
/**
|
|
173
173
|
* If `true`, the component is in a loading state.
|
|
174
|
-
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show,
|
|
174
|
+
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
175
175
|
* @default false
|
|
176
176
|
*/
|
|
177
177
|
loading?: boolean;
|
|
@@ -24,14 +24,14 @@ import outlinedInputClasses from '../OutlinedInput/outlinedInputClasses';
|
|
|
24
24
|
import filledInputClasses from '../FilledInput/filledInputClasses';
|
|
25
25
|
import ClearIcon from '../internal/svg-icons/Close';
|
|
26
26
|
import ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';
|
|
27
|
-
import
|
|
28
|
-
import styled from '../styles/styled';
|
|
27
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
29
28
|
import autocompleteClasses, { getAutocompleteUtilityClass } from './autocompleteClasses';
|
|
30
29
|
import capitalize from '../utils/capitalize';
|
|
31
30
|
import useForkRef from '../utils/useForkRef';
|
|
32
31
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
33
32
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
34
33
|
import { createElement as _createElement } from "react";
|
|
34
|
+
const useThemeProps = createUseThemeProps('MuiAutocomplete');
|
|
35
35
|
const useUtilityClasses = ownerState => {
|
|
36
36
|
const {
|
|
37
37
|
classes,
|
|
@@ -90,9 +90,7 @@ const AutocompleteRoot = styled('div', {
|
|
|
90
90
|
[`& .${autocompleteClasses.input}`]: inputFocused && styles.inputFocused
|
|
91
91
|
}, styles.root, fullWidth && styles.fullWidth, hasPopupIcon && styles.hasPopupIcon, hasClearIcon && styles.hasClearIcon];
|
|
92
92
|
}
|
|
93
|
-
})(
|
|
94
|
-
ownerState
|
|
95
|
-
}) => _extends({
|
|
93
|
+
})({
|
|
96
94
|
[`&.${autocompleteClasses.focused} .${autocompleteClasses.clearIndicator}`]: {
|
|
97
95
|
visibility: 'visible'
|
|
98
96
|
},
|
|
@@ -101,17 +99,11 @@ const AutocompleteRoot = styled('div', {
|
|
|
101
99
|
[`&:hover .${autocompleteClasses.clearIndicator}`]: {
|
|
102
100
|
visibility: 'visible'
|
|
103
101
|
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
width: '100%'
|
|
107
|
-
}, {
|
|
108
|
-
[`& .${autocompleteClasses.tag}`]: _extends({
|
|
102
|
+
},
|
|
103
|
+
[`& .${autocompleteClasses.tag}`]: {
|
|
109
104
|
margin: 3,
|
|
110
105
|
maxWidth: 'calc(100% - 6px)'
|
|
111
|
-
},
|
|
112
|
-
margin: 2,
|
|
113
|
-
maxWidth: 'calc(100% - 4px)'
|
|
114
|
-
}),
|
|
106
|
+
},
|
|
115
107
|
[`& .${autocompleteClasses.inputRoot}`]: {
|
|
116
108
|
flexWrap: 'wrap',
|
|
117
109
|
[`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
|
|
@@ -200,14 +192,39 @@ const AutocompleteRoot = styled('div', {
|
|
|
200
192
|
paddingBottom: 9
|
|
201
193
|
}
|
|
202
194
|
},
|
|
203
|
-
[`& .${autocompleteClasses.input}`]:
|
|
195
|
+
[`& .${autocompleteClasses.input}`]: {
|
|
204
196
|
flexGrow: 1,
|
|
205
197
|
textOverflow: 'ellipsis',
|
|
206
198
|
opacity: 0
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
199
|
+
},
|
|
200
|
+
variants: [{
|
|
201
|
+
props: {
|
|
202
|
+
fullWidth: true
|
|
203
|
+
},
|
|
204
|
+
style: {
|
|
205
|
+
width: '100%'
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
props: {
|
|
209
|
+
size: 'small'
|
|
210
|
+
},
|
|
211
|
+
style: {
|
|
212
|
+
[`& .${autocompleteClasses.tag}`]: {
|
|
213
|
+
margin: 2,
|
|
214
|
+
maxWidth: 'calc(100% - 4px)'
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}, {
|
|
218
|
+
props: {
|
|
219
|
+
inputFocused: true
|
|
220
|
+
},
|
|
221
|
+
style: {
|
|
222
|
+
[`& .${autocompleteClasses.input}`]: {
|
|
223
|
+
opacity: 1
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}]
|
|
227
|
+
});
|
|
211
228
|
const AutocompleteEndAdornment = styled('div', {
|
|
212
229
|
name: 'MuiAutocomplete',
|
|
213
230
|
slot: 'EndAdornment',
|
|
@@ -234,14 +251,18 @@ const AutocompletePopupIndicator = styled(IconButton, {
|
|
|
234
251
|
overridesResolver: ({
|
|
235
252
|
ownerState
|
|
236
253
|
}, styles) => _extends({}, styles.popupIndicator, ownerState.popupOpen && styles.popupIndicatorOpen)
|
|
237
|
-
})(
|
|
238
|
-
ownerState
|
|
239
|
-
}) => _extends({
|
|
254
|
+
})({
|
|
240
255
|
padding: 2,
|
|
241
|
-
marginRight: -2
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
256
|
+
marginRight: -2,
|
|
257
|
+
variants: [{
|
|
258
|
+
props: {
|
|
259
|
+
popupOpen: true
|
|
260
|
+
},
|
|
261
|
+
style: {
|
|
262
|
+
transform: 'rotate(180deg)'
|
|
263
|
+
}
|
|
264
|
+
}]
|
|
265
|
+
});
|
|
245
266
|
const AutocompletePopper = styled(Popper, {
|
|
246
267
|
name: 'MuiAutocomplete',
|
|
247
268
|
slot: 'Popper',
|
|
@@ -254,12 +275,17 @@ const AutocompletePopper = styled(Popper, {
|
|
|
254
275
|
}, styles.popper, ownerState.disablePortal && styles.popperDisablePortal];
|
|
255
276
|
}
|
|
256
277
|
})(({
|
|
257
|
-
theme
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
278
|
+
theme
|
|
279
|
+
}) => ({
|
|
280
|
+
zIndex: (theme.vars || theme).zIndex.modal,
|
|
281
|
+
variants: [{
|
|
282
|
+
props: {
|
|
283
|
+
disablePortal: true
|
|
284
|
+
},
|
|
285
|
+
style: {
|
|
286
|
+
position: 'absolute'
|
|
287
|
+
}
|
|
288
|
+
}]
|
|
263
289
|
}));
|
|
264
290
|
const AutocompletePaper = styled(Paper, {
|
|
265
291
|
name: 'MuiAutocomplete',
|
|
@@ -575,7 +601,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
575
601
|
}))
|
|
576
602
|
}));
|
|
577
603
|
let autocompletePopper = null;
|
|
578
|
-
if (
|
|
604
|
+
if (groupedOptions.length > 0) {
|
|
579
605
|
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteListbox, _extends({
|
|
580
606
|
as: ListboxComponent,
|
|
581
607
|
className: classes.listbox,
|
|
@@ -912,7 +938,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
912
938
|
ListboxProps: PropTypes.object,
|
|
913
939
|
/**
|
|
914
940
|
* If `true`, the component is in a loading state.
|
|
915
|
-
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show,
|
|
941
|
+
* This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
|
|
916
942
|
* @default false
|
|
917
943
|
*/
|
|
918
944
|
loading: PropTypes.bool,
|
|
@@ -9,11 +9,11 @@ export interface AutocompleteClasses {
|
|
|
9
9
|
focused: string;
|
|
10
10
|
/** Styles applied to the option elements if they are keyboard focused. */
|
|
11
11
|
focusVisible: string;
|
|
12
|
-
/** Styles applied to the tag elements,
|
|
12
|
+
/** Styles applied to the tag elements, for example the chips. */
|
|
13
13
|
tag: string;
|
|
14
|
-
/** Styles applied to the tag elements,
|
|
14
|
+
/** Styles applied to the tag elements, for example the chips if `size="small"`. */
|
|
15
15
|
tagSizeSmall: string;
|
|
16
|
-
/** Styles applied to the tag elements,
|
|
16
|
+
/** Styles applied to the tag elements, for example the chips if `size="medium"`. */
|
|
17
17
|
tagSizeMedium: string;
|
|
18
18
|
/** Styles applied when the popup icon is rendered. */
|
|
19
19
|
hasPopupIcon: string;
|