@mui/material 5.8.7 → 5.9.2
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 +2 -2
- package/ButtonBase/TouchRipple.js +1 -1
- package/CHANGELOG.md +200 -4
- package/Dialog/Dialog.js +2 -1
- package/FormHelperText/FormHelperText.d.ts +7 -1
- package/FormHelperText/FormHelperText.js +3 -1
- package/ImageListItem/ImageListItem.js +4 -4
- package/Modal/Modal.d.ts +2 -1
- package/Modal/Modal.js +8 -7
- package/OverridableComponent.d.ts +4 -0
- package/Popper/Popper.d.ts +1 -6
- package/Popper/Popper.js +24 -0
- package/README.md +60 -26
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +6 -0
- package/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
- package/Slider/Slider.js +3 -2
- package/Stack/Stack.js +13 -1
- package/Tabs/Tabs.d.ts +7 -1
- package/Tabs/Tabs.js +3 -1
- package/Unstable_Grid2/Grid2.d.ts +4 -0
- package/Unstable_Grid2/Grid2.js +34 -0
- package/Unstable_Grid2/Grid2Props.d.ts +15 -0
- package/Unstable_Grid2/Grid2Props.js +1 -0
- package/Unstable_Grid2/grid2Classes.d.ts +5 -0
- package/Unstable_Grid2/grid2Classes.js +14 -0
- package/Unstable_Grid2/index.d.ts +4 -0
- package/Unstable_Grid2/index.js +4 -0
- package/Unstable_Grid2/package.json +6 -0
- package/index.d.ts +3 -0
- package/index.js +3 -1
- package/legacy/Autocomplete/Autocomplete.js +2 -2
- package/legacy/ButtonBase/TouchRipple.js +1 -1
- package/legacy/Dialog/Dialog.js +2 -1
- package/legacy/FormHelperText/FormHelperText.js +3 -1
- package/legacy/ImageListItem/ImageListItem.js +4 -4
- package/legacy/Modal/Modal.js +15 -10
- package/legacy/Popper/Popper.js +24 -0
- package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
- package/legacy/Slider/Slider.js +3 -2
- package/legacy/Stack/Stack.js +13 -1
- package/legacy/Tabs/Tabs.js +3 -1
- package/legacy/Unstable_Grid2/Grid2.js +38 -0
- package/legacy/Unstable_Grid2/Grid2Props.js +1 -0
- package/legacy/Unstable_Grid2/grid2Classes.js +27 -0
- package/legacy/Unstable_Grid2/index.js +4 -0
- package/legacy/index.js +3 -1
- package/modern/Autocomplete/Autocomplete.js +2 -2
- package/modern/ButtonBase/TouchRipple.js +1 -1
- package/modern/Dialog/Dialog.js +2 -1
- package/modern/FormHelperText/FormHelperText.js +3 -1
- package/modern/ImageListItem/ImageListItem.js +4 -4
- package/modern/Modal/Modal.js +8 -7
- package/modern/Popper/Popper.js +24 -0
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
- package/modern/Slider/Slider.js +3 -2
- package/modern/Stack/Stack.js +13 -1
- package/modern/Tabs/Tabs.js +3 -1
- package/modern/Unstable_Grid2/Grid2.js +34 -0
- package/modern/Unstable_Grid2/Grid2Props.js +1 -0
- package/modern/Unstable_Grid2/grid2Classes.js +14 -0
- package/modern/Unstable_Grid2/index.js +4 -0
- package/modern/index.js +3 -1
- package/node/Autocomplete/Autocomplete.js +2 -2
- package/node/ButtonBase/TouchRipple.js +1 -1
- package/node/Dialog/Dialog.js +2 -1
- package/node/FormHelperText/FormHelperText.js +3 -1
- package/node/ImageListItem/ImageListItem.js +4 -4
- package/node/Modal/Modal.js +11 -10
- package/node/Popper/Popper.js +24 -0
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
- package/node/Slider/Slider.js +3 -2
- package/node/Stack/Stack.js +13 -1
- package/node/Tabs/Tabs.js +3 -1
- package/node/Unstable_Grid2/Grid2.js +47 -0
- package/node/Unstable_Grid2/Grid2Props.js +5 -0
- package/node/Unstable_Grid2/grid2Classes.js +25 -0
- package/node/Unstable_Grid2/index.js +56 -0
- package/node/index.js +22 -1
- package/package.json +7 -7
- package/styles/components.d.ts +5 -0
- package/styles/createTheme.d.ts +1 -1
- package/styles/experimental_extendTheme.d.ts +84 -7
- package/styles/index.d.ts +11 -0
- package/styles/overrides.d.ts +3 -1
- package/styles/props.d.ts +2 -0
- package/themeCssVarsAugmentation/index.d.ts +4 -8
- package/umd/material-ui.development.js +885 -290
- package/umd/material-ui.production.min.js +20 -25
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- markdownlint-disable-next-line -->
|
|
2
2
|
<p align="center">
|
|
3
|
-
<a href="https://mui.com/" rel="noopener" target="_blank"><img width="150" src="
|
|
3
|
+
<a href="https://mui.com/" rel="noopener" target="_blank"><img width="150" src="/docs/public/static/logo.svg" alt="MUI logo"></a>
|
|
4
4
|
</p>
|
|
5
5
|
|
|
6
6
|
<h1 align="center">MUI Core</h1>
|
|
@@ -39,11 +39,15 @@
|
|
|
39
39
|
|
|
40
40
|
Material UI is available as an [npm package](https://www.npmjs.com/package/@mui/material).
|
|
41
41
|
|
|
42
|
+
**npm:**
|
|
43
|
+
|
|
42
44
|
```sh
|
|
43
|
-
// with npm
|
|
44
45
|
npm install @mui/material @emotion/react @emotion/styled
|
|
46
|
+
```
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
**yarn:**
|
|
49
|
+
|
|
50
|
+
```sh
|
|
47
51
|
yarn add @mui/material @emotion/react @emotion/styled
|
|
48
52
|
```
|
|
49
53
|
|
|
@@ -63,11 +67,15 @@ Use `@latest` for the latest stable release.
|
|
|
63
67
|
|
|
64
68
|
MUI Base is available as an [npm package](https://www.npmjs.com/package/@mui/base).
|
|
65
69
|
|
|
70
|
+
**npm:**
|
|
71
|
+
|
|
66
72
|
```sh
|
|
67
|
-
// with npm
|
|
68
73
|
npm install @mui/base
|
|
74
|
+
```
|
|
69
75
|
|
|
70
|
-
|
|
76
|
+
**yarn:**
|
|
77
|
+
|
|
78
|
+
```sh
|
|
71
79
|
yarn add @mui/base
|
|
72
80
|
```
|
|
73
81
|
|
|
@@ -78,22 +86,30 @@ We are adding new components regularly and you're welcome to contribute!
|
|
|
78
86
|
|
|
79
87
|
MUI System is available as an [npm package](https://www.npmjs.com/package/@mui/system).
|
|
80
88
|
|
|
89
|
+
**npm:**
|
|
90
|
+
|
|
81
91
|
```sh
|
|
82
|
-
// with npm
|
|
83
92
|
npm install @mui/system @emotion/react @emotion/styled
|
|
93
|
+
```
|
|
84
94
|
|
|
85
|
-
|
|
95
|
+
**yarn:**
|
|
96
|
+
|
|
97
|
+
```sh
|
|
86
98
|
yarn add @mui/system @emotion/react @emotion/styled
|
|
87
99
|
```
|
|
88
100
|
|
|
89
101
|
Or if you want to use `styled-components` as a styling engine:
|
|
90
102
|
|
|
103
|
+
**npm:**
|
|
104
|
+
|
|
91
105
|
```sh
|
|
92
|
-
|
|
93
|
-
|
|
106
|
+
npm install @mui/material @mui/styled-engine-sc styled-components
|
|
107
|
+
```
|
|
94
108
|
|
|
95
|
-
|
|
96
|
-
|
|
109
|
+
**yarn:**
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
yarn add @mui/material @mui/styled-engine-sc styled-components
|
|
97
113
|
```
|
|
98
114
|
|
|
99
115
|
Visit our [`styled-engine` guide](https://mui.com/material-ui/guides/styled-engine/) for more information about how to configure `styled-components` as the style engine.
|
|
@@ -103,7 +119,7 @@ Visit our [`styled-engine` guide](https://mui.com/material-ui/guides/styled-engi
|
|
|
103
119
|
### Diamond 💎
|
|
104
120
|
|
|
105
121
|
<p align="center">
|
|
106
|
-
<a href="https://octopus.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="128" width="128" src="https://
|
|
122
|
+
<a href="https://octopus.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="128" width="128" src="https://i.ibb.co/w0HF0Nz/Logo-Blue-140px-rgb.png" alt="octopus" title="Repeatable, reliable deployments" loading="lazy" /></a>
|
|
107
123
|
<a href="https://www.doit-intl.com/flexsave/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="128" width="128" src="https://avatars3.githubusercontent.com/u/8424863?s=256" alt="doit-intl" title="Management Platform for Google Cloud and AWS" loading="lazy" /></a>
|
|
108
124
|
<a href="https://www.zesty.io/integrations/nextjs-cms/?utm_source=mui&utm_medium=referral&utm_campaign=sponsor" rel="noopener sponsored" target="_blank"><img height="90" width="90" src="https://brand.zesty.io/zesty-io-logo.svg" alt="zesty.io" title="The only Next.js CMS you need" loading="lazy" /></a>
|
|
109
125
|
</p>
|
|
@@ -118,10 +134,11 @@ via [OpenCollective](https://opencollective.com/mui) or via [Patreon](https://ww
|
|
|
118
134
|
<a href="https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=homepage" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://github.com/tidelift.png?size=192" alt="tidelift.com" title="Enterprise-ready open-source software" loading="lazy" /></a>
|
|
119
135
|
<a href="https://bit.dev/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank" style="margin-rig ht: 16px;"><img height="96" width="96" src="https://github.com/teambit.png?size=192" alt="bit.dev" title="The fastest way to share code" loading="lazy" /></a>
|
|
120
136
|
<a href="https://www.text-em-all.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img src="https://images.opencollective.com/callemall/09710fe/logo/192.png" alt="text-em-all.com" title="Mass Text Messaging & Automated Calling" height="96" width="96" loading="lazy"></a>
|
|
121
|
-
<a href="https://www.laststance.io/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://images.opencollective.com/laststance/daffd6c/avatar/192.png" alt="laststance.io" title="Indipendent organization for OSS activity based on Tokyo" loading="lazy" /></a>
|
|
122
137
|
<a href="https://online-aussie-casino.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://images.opencollective.com/aussiecasinohex/923df37/logo/192.png" alt="online-aussie-casino.com" title="Aussie Gambling Guide" loading="lazy" /></a>
|
|
123
138
|
<a href="https://sumatosoft.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://images.opencollective.com/sumatosoft_company/0b78570/avatar/192.png" alt="sumatosoft.com" title="We help companies to digitalize their businesses" loading="lazy" /></a>
|
|
124
139
|
<a href="https://megafamous.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://p18.zdusercontent.com/attachment/9422375/Rullx0rw9lUGKuyKOy4VQ9Zxq?size=192" alt="megafamous.com" title="The best place to buy Instagram followers & likes." loading="lazy" /></a>
|
|
140
|
+
<a href="https://www.dialmycalls.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://images.opencollective.com/dialmycalls/f5ae9ab/avatar/192.png" alt="dialmycalls.com" title="Send text messages, calls & emails to thousands with ease." loading="lazy" /></a>
|
|
141
|
+
<a href="https://goread.io/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://goread.io/assets/uploads/usereb4ac3033e8ab3591e0fcefa8c26ce3fd36d5a0f/bd81e54effbcc265ad169015455a0c1e.png" alt="goread.io" title="Instagram followers, likes, power likes, views, comments, saves in minutes." loading="lazy" /></a>
|
|
125
142
|
</p>
|
|
126
143
|
|
|
127
144
|
Gold Sponsors are those who have pledged \$500/month or more to MUI.
|
|
@@ -147,7 +164,7 @@ In the interactive demo below, try changing the code and see how it affects the
|
|
|
147
164
|
(Hint: change `variant` to `"outlined"` and `color` to `"secondary"`.
|
|
148
165
|
For more options, see the [`Button` component page](https://mui.com/material-ui/react-button/) in our docs.)
|
|
149
166
|
|
|
150
|
-
[](https://codesandbox.io/s/
|
|
167
|
+
[](https://codesandbox.io/s/material-ui-u9sy1h)
|
|
151
168
|
|
|
152
169
|
## Questions
|
|
153
170
|
|
|
@@ -160,8 +177,9 @@ Our documentation features [a collection of example projects using Material UI](
|
|
|
160
177
|
|
|
161
178
|
## Documentation
|
|
162
179
|
|
|
163
|
-
- [Material UI](https://mui.com/material-ui/getting-started/
|
|
164
|
-
- [
|
|
180
|
+
- [Material UI](https://mui.com/material-ui/getting-started/overview/)
|
|
181
|
+
- [Joy UI](https://mui.com/joy-ui/getting-started/overview/)
|
|
182
|
+
- [MUI Base](https://mui.com/base/getting-started/overview/)
|
|
165
183
|
- [MUI System](https://mui.com/system/basics/)
|
|
166
184
|
|
|
167
185
|
## Premium themes
|
|
@@ -196,22 +214,38 @@ For details of supported versions and contact details for reporting security iss
|
|
|
196
214
|
|
|
197
215
|
These great services sponsor MUI's core infrastructure:
|
|
198
216
|
|
|
199
|
-
|
|
217
|
+
<picture>
|
|
218
|
+
<source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/github-darkmode.svg">
|
|
219
|
+
<source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/github-lightmode.svg">
|
|
220
|
+
<img alt="GitHub logo" src="/docs/public/static/readme/github-darkmode.svg">
|
|
221
|
+
</picture>
|
|
200
222
|
|
|
201
|
-
GitHub lets us host the Git repository and coordinate contributions.
|
|
223
|
+
[GitHub](https://github.com/) lets us host the Git repository and coordinate contributions.
|
|
202
224
|
|
|
203
|
-
|
|
225
|
+
<picture>
|
|
226
|
+
<source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/netlify-darkmode.svg">
|
|
227
|
+
<source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/netlify-lightmode.svg">
|
|
228
|
+
<img alt="Netlify logo" src="/docs/public/static/readme/netlify-darkmode.svg">
|
|
229
|
+
</picture>
|
|
204
230
|
|
|
205
|
-
Netlify lets us distribute the documentation.
|
|
231
|
+
[Netlify](https://www.netlify.com/) lets us distribute the documentation.
|
|
206
232
|
|
|
207
|
-
|
|
233
|
+
<picture>
|
|
234
|
+
<source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/crowdin-darkmode.svg">
|
|
235
|
+
<source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/crowdin-lightmode.svg">
|
|
236
|
+
<img alt="Crowdin logo" src="/docs/public/static/readme/crowdin-darkmode.svg">
|
|
237
|
+
</picture>
|
|
208
238
|
|
|
209
|
-
Crowdin lets us translate the documentation.
|
|
239
|
+
[Crowdin](https://crowdin.com/) lets us translate the documentation.
|
|
210
240
|
|
|
211
|
-
|
|
241
|
+
<picture>
|
|
242
|
+
<source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/browserstack-darkmode.svg">
|
|
243
|
+
<source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/browserstack-lightmode.svg">
|
|
244
|
+
<img alt="GitHub logo" src="/docs/public/static/readme/browserstack-darkmode.svg">
|
|
245
|
+
</picture>
|
|
212
246
|
|
|
213
|
-
BrowserStack lets us test in real browsers.
|
|
247
|
+
[BrowserStack](https://www.browserstack.com/) lets us test in real browsers.
|
|
214
248
|
|
|
215
|
-
|
|
249
|
+
<img loading="lazy" alt="CodeCov logo" src="https://github.com/codecov.png?size=70" width="35" height="35">
|
|
216
250
|
|
|
217
|
-
CodeCov lets us monitor test coverage.
|
|
251
|
+
[CodeCov](https://about.codecov.io/) lets us monitor test coverage.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { SxProps } from '@mui/system';
|
|
1
2
|
import * as React from 'react';
|
|
3
|
+
import { Theme } from '../styles';
|
|
2
4
|
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
|
3
5
|
import { ScopedCssBaselineClasses } from './scopedCssBaselineClasses';
|
|
4
6
|
|
|
@@ -18,6 +20,10 @@ export interface ScopedCssBaselineTypeMap<P = {}, D extends React.ElementType =
|
|
|
18
20
|
* For browser support, check out https://caniuse.com/?search=color-scheme
|
|
19
21
|
*/
|
|
20
22
|
enableColorScheme?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
25
|
+
*/
|
|
26
|
+
sx?: SxProps<Theme>;
|
|
21
27
|
};
|
|
22
28
|
defaultComponent: D;
|
|
23
29
|
}
|
|
@@ -96,6 +96,11 @@ process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes
|
|
|
96
96
|
* For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
|
|
97
97
|
* For browser support, check out https://caniuse.com/?search=color-scheme
|
|
98
98
|
*/
|
|
99
|
-
enableColorScheme: PropTypes.bool
|
|
99
|
+
enableColorScheme: PropTypes.bool,
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
103
|
+
*/
|
|
104
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
100
105
|
} : void 0;
|
|
101
106
|
export default ScopedCssBaseline;
|
package/Slider/Slider.js
CHANGED
|
@@ -284,7 +284,6 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
284
284
|
transition: theme.transitions.create(['transform'], {
|
|
285
285
|
duration: theme.transitions.duration.shortest
|
|
286
286
|
}),
|
|
287
|
-
transformOrigin: 'bottom center',
|
|
288
287
|
transform: 'translateY(-100%) scale(0)',
|
|
289
288
|
position: 'absolute',
|
|
290
289
|
backgroundColor: (theme.vars || theme).palette.grey[600],
|
|
@@ -296,6 +295,7 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
296
295
|
padding: '0.25rem 0.75rem'
|
|
297
296
|
}, ownerState.orientation === 'horizontal' && {
|
|
298
297
|
top: '-10px',
|
|
298
|
+
transformOrigin: 'bottom center',
|
|
299
299
|
'&:before': {
|
|
300
300
|
position: 'absolute',
|
|
301
301
|
content: '""',
|
|
@@ -308,7 +308,8 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
308
308
|
}
|
|
309
309
|
}, ownerState.orientation === 'vertical' && {
|
|
310
310
|
right: '30px',
|
|
311
|
-
top: '
|
|
311
|
+
top: '24px',
|
|
312
|
+
transformOrigin: 'right center',
|
|
312
313
|
'&:before': {
|
|
313
314
|
position: 'absolute',
|
|
314
315
|
content: '""',
|
package/Stack/Stack.js
CHANGED
|
@@ -46,7 +46,8 @@ export const style = ({
|
|
|
46
46
|
theme
|
|
47
47
|
}) => {
|
|
48
48
|
let styles = _extends({
|
|
49
|
-
display: 'flex'
|
|
49
|
+
display: 'flex',
|
|
50
|
+
flexDirection: 'column'
|
|
50
51
|
}, handleBreakpoints({
|
|
51
52
|
theme
|
|
52
53
|
}, resolveBreakpointValues({
|
|
@@ -74,6 +75,17 @@ export const style = ({
|
|
|
74
75
|
base
|
|
75
76
|
});
|
|
76
77
|
|
|
78
|
+
if (typeof directionValues === 'object') {
|
|
79
|
+
Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
|
|
80
|
+
const directionValue = directionValues[breakpoint];
|
|
81
|
+
|
|
82
|
+
if (!directionValue) {
|
|
83
|
+
const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
|
|
84
|
+
directionValues[breakpoint] = previousDirectionValue;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
77
89
|
const styleFromPropValue = (propValue, breakpoint) => {
|
|
78
90
|
return {
|
|
79
91
|
'& > :not(style) + :not(style)': {
|
package/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
3
4
|
import { Theme } from '../styles';
|
|
4
5
|
import ButtonBase from '../ButtonBase';
|
|
5
6
|
import { TabScrollButtonProps } from '../TabScrollButton';
|
|
6
7
|
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
|
7
8
|
import { TabsClasses } from './tabsClasses';
|
|
8
9
|
|
|
10
|
+
export interface TabsPropsIndicatorColorOverrides {}
|
|
11
|
+
|
|
9
12
|
export interface TabsTypeMap<P = {}, D extends React.ElementType = typeof ButtonBase> {
|
|
10
13
|
props: P & {
|
|
11
14
|
/**
|
|
@@ -49,7 +52,10 @@ export interface TabsTypeMap<P = {}, D extends React.ElementType = typeof Button
|
|
|
49
52
|
* Determines the color of the indicator.
|
|
50
53
|
* @default 'primary'
|
|
51
54
|
*/
|
|
52
|
-
indicatorColor?:
|
|
55
|
+
indicatorColor?: OverridableStringUnion<
|
|
56
|
+
'secondary' | 'primary',
|
|
57
|
+
TabsPropsIndicatorColorOverrides
|
|
58
|
+
>;
|
|
53
59
|
/**
|
|
54
60
|
* Callback fired when the value changes.
|
|
55
61
|
*
|
package/Tabs/Tabs.js
CHANGED
|
@@ -775,7 +775,9 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes
|
|
|
775
775
|
* Determines the color of the indicator.
|
|
776
776
|
* @default 'primary'
|
|
777
777
|
*/
|
|
778
|
-
indicatorColor: PropTypes
|
|
778
|
+
indicatorColor: PropTypes
|
|
779
|
+
/* @typescript-to-proptypes-ignore */
|
|
780
|
+
.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
|
|
779
781
|
|
|
780
782
|
/**
|
|
781
783
|
* Callback fired when the value changes.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { createGrid } from '@mui/system/Unstable_Grid';
|
|
3
|
+
import { styled, useThemeProps } from '../styles';
|
|
4
|
+
const Grid2 = createGrid({
|
|
5
|
+
createStyledComponent: styled('div', {
|
|
6
|
+
name: 'MuiGrid2',
|
|
7
|
+
overridesResolver: (props, styles) => styles.root
|
|
8
|
+
}),
|
|
9
|
+
componentName: 'MuiGrid2',
|
|
10
|
+
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
11
|
+
useThemeProps: inProps => useThemeProps({
|
|
12
|
+
props: inProps,
|
|
13
|
+
name: 'MuiGrid2'
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
process.env.NODE_ENV !== "production" ? Grid2.propTypes
|
|
17
|
+
/* remove-proptypes */
|
|
18
|
+
= {
|
|
19
|
+
// ----------------------------- Warning --------------------------------
|
|
20
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
21
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
22
|
+
// ----------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The content of the component.
|
|
26
|
+
*/
|
|
27
|
+
children: PropTypes.node,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
32
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
33
|
+
} : void 0;
|
|
34
|
+
export default Grid2;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OverrideProps } from '@mui/types';
|
|
3
|
+
import { SxProps, SystemProps } from '@mui/system';
|
|
4
|
+
import { GridBaseProps } from '@mui/system/Unstable_Grid';
|
|
5
|
+
import { Theme } from '../styles';
|
|
6
|
+
export declare type Grid2Slot = 'root';
|
|
7
|
+
export interface Grid2TypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
8
|
+
props: P & GridBaseProps & {
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
} & SystemProps<Theme>;
|
|
11
|
+
defaultComponent: D;
|
|
12
|
+
}
|
|
13
|
+
export declare type Grid2Props<D extends React.ElementType = Grid2TypeMap['defaultComponent'], P = {
|
|
14
|
+
component?: React.ElementType;
|
|
15
|
+
}> = OverrideProps<Grid2TypeMap<P, D>, D>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
2
|
+
export function getGrid2UtilityClass(slot) {
|
|
3
|
+
return generateUtilityClass('MuiGrid2', slot);
|
|
4
|
+
}
|
|
5
|
+
const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
6
|
+
const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
|
|
7
|
+
const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
|
|
8
|
+
const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
9
|
+
const grid2Classes = generateUtilityClasses('MuiGrid2', ['root', 'container', 'item', 'zeroMinWidth', // spacings
|
|
10
|
+
...SPACINGS.map(spacing => `spacing-xs-${spacing}`), // direction values
|
|
11
|
+
...DIRECTIONS.map(direction => `direction-xs-${direction}`), // wrap values
|
|
12
|
+
...WRAPS.map(wrap => `wrap-xs-${wrap}`), // grid sizes for all breakpoints
|
|
13
|
+
...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);
|
|
14
|
+
export default grid2Classes;
|
package/index.d.ts
CHANGED
|
@@ -224,6 +224,9 @@ export * from './FormLabel';
|
|
|
224
224
|
export { default as Grid } from './Grid';
|
|
225
225
|
export * from './Grid';
|
|
226
226
|
|
|
227
|
+
export { default as Unstable_Grid2 } from './Unstable_Grid2';
|
|
228
|
+
export * from './Unstable_Grid2';
|
|
229
|
+
|
|
227
230
|
export { default as Grow } from './Grow';
|
|
228
231
|
export * from './Grow';
|
|
229
232
|
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.
|
|
1
|
+
/** @license MUI v5.9.2
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -106,6 +106,8 @@ export { default as FormLabel } from './FormLabel';
|
|
|
106
106
|
export * from './FormLabel';
|
|
107
107
|
export { default as Grid } from './Grid';
|
|
108
108
|
export * from './Grid';
|
|
109
|
+
export { default as Unstable_Grid2 } from './Unstable_Grid2';
|
|
110
|
+
export * from './Unstable_Grid2';
|
|
109
111
|
export { default as Grow } from './Grow';
|
|
110
112
|
export * from './Grow';
|
|
111
113
|
export { default as Hidden } from './Hidden';
|
|
@@ -477,7 +477,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
477
477
|
if (multiple && value.length > 0) {
|
|
478
478
|
var getCustomizedTagProps = function getCustomizedTagProps(params) {
|
|
479
479
|
return _extends({
|
|
480
|
-
className:
|
|
480
|
+
className: classes.tag,
|
|
481
481
|
disabled: disabled
|
|
482
482
|
}, getTagProps(params));
|
|
483
483
|
};
|
|
@@ -585,7 +585,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
585
585
|
})
|
|
586
586
|
}),
|
|
587
587
|
inputProps: _extends({
|
|
588
|
-
className:
|
|
588
|
+
className: classes.input,
|
|
589
589
|
disabled: disabled,
|
|
590
590
|
readOnly: readOnly
|
|
591
591
|
}, getInputProps())
|
|
@@ -158,7 +158,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
|
|
|
158
158
|
rippleX = Math.round(rect.width / 2);
|
|
159
159
|
rippleY = Math.round(rect.height / 2);
|
|
160
160
|
} else {
|
|
161
|
-
var _ref5 = event.touches ? event.touches[0] : event,
|
|
161
|
+
var _ref5 = event.touches && event.touches.length > 0 ? event.touches[0] : event,
|
|
162
162
|
clientX = _ref5.clientX,
|
|
163
163
|
clientY = _ref5.clientY;
|
|
164
164
|
|
package/legacy/Dialog/Dialog.js
CHANGED
|
@@ -291,7 +291,8 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
|
|
|
291
291
|
|
|
292
292
|
/**
|
|
293
293
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
294
|
-
* @deprecated Use `components.Backdrop` instead.
|
|
294
|
+
* @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
|
295
|
+
* Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
|
|
295
296
|
* @default styled(Backdrop, {
|
|
296
297
|
* name: 'MuiModal',
|
|
297
298
|
* slot: 'Backdrop',
|
|
@@ -184,6 +184,8 @@ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
|
|
|
184
184
|
/**
|
|
185
185
|
* The variant to use.
|
|
186
186
|
*/
|
|
187
|
-
variant: PropTypes
|
|
187
|
+
variant: PropTypes
|
|
188
|
+
/* @typescript-to-proptypes-ignore */
|
|
189
|
+
.oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])
|
|
188
190
|
} : void 0;
|
|
189
191
|
export default FormHelperText;
|
|
@@ -34,9 +34,8 @@ var ImageListItemRoot = styled('li', {
|
|
|
34
34
|
})(function (_ref2) {
|
|
35
35
|
var ownerState = _ref2.ownerState;
|
|
36
36
|
return _extends({
|
|
37
|
-
display: '
|
|
38
|
-
position: 'relative'
|
|
39
|
-
lineHeight: 0
|
|
37
|
+
display: 'block',
|
|
38
|
+
position: 'relative'
|
|
40
39
|
}, ownerState.variant === 'standard' && {
|
|
41
40
|
// For titlebar under list item
|
|
42
41
|
display: 'flex',
|
|
@@ -50,7 +49,8 @@ var ImageListItemRoot = styled('li', {
|
|
|
50
49
|
}, _defineProperty({}, "& .".concat(imageListItemClasses.img), _extends({
|
|
51
50
|
objectFit: 'cover',
|
|
52
51
|
width: '100%',
|
|
53
|
-
height: '100%'
|
|
52
|
+
height: '100%',
|
|
53
|
+
display: 'block'
|
|
54
54
|
}, ownerState.variant === 'standard' && {
|
|
55
55
|
height: 'auto',
|
|
56
56
|
flexGrow: 1
|
package/legacy/Modal/Modal.js
CHANGED
|
@@ -2,9 +2,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import { isHostComponent } from '@mui/base';
|
|
6
|
-
import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
|
|
7
5
|
import ModalUnstyled, { modalUnstyledClasses } from '@mui/base/ModalUnstyled';
|
|
6
|
+
import { isHostComponent, resolveComponentProps } from '@mui/base/utils';
|
|
7
|
+
import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
|
|
8
8
|
import styled from '../styles/styled';
|
|
9
9
|
import useThemeProps from '../styles/useThemeProps';
|
|
10
10
|
import Backdrop from '../Backdrop';
|
|
@@ -125,11 +125,15 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
125
125
|
Backdrop: BackdropComponent
|
|
126
126
|
}, components),
|
|
127
127
|
componentsProps: {
|
|
128
|
-
root:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
root: function root() {
|
|
129
|
+
return _extends({}, resolveComponentProps(componentsProps.root, ownerState), !isHostComponent(Root) && {
|
|
130
|
+
as: component,
|
|
131
|
+
theme: theme
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
backdrop: function backdrop() {
|
|
135
|
+
return _extends({}, BackdropProps, resolveComponentProps(componentsProps.backdrop, ownerState));
|
|
136
|
+
}
|
|
133
137
|
},
|
|
134
138
|
onTransitionEnter: function onTransitionEnter() {
|
|
135
139
|
return setExited(false);
|
|
@@ -154,7 +158,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
154
158
|
|
|
155
159
|
/**
|
|
156
160
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
157
|
-
* @deprecated Use `components.Backdrop` instead.
|
|
161
|
+
* @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
|
162
|
+
* Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
|
|
158
163
|
* @default styled(Backdrop, {
|
|
159
164
|
* name: 'MuiModal',
|
|
160
165
|
* slot: 'Backdrop',
|
|
@@ -210,8 +215,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
210
215
|
* @default {}
|
|
211
216
|
*/
|
|
212
217
|
componentsProps: PropTypes.shape({
|
|
213
|
-
backdrop: PropTypes.object,
|
|
214
|
-
root: PropTypes.object
|
|
218
|
+
backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
219
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
215
220
|
}),
|
|
216
221
|
|
|
217
222
|
/**
|
package/legacy/Popper/Popper.js
CHANGED
|
@@ -63,6 +63,30 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes
|
|
|
63
63
|
/* @typescript-to-proptypes-ignore */
|
|
64
64
|
.oneOfType([PropTypes.node, PropTypes.func]),
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @ignore
|
|
68
|
+
*/
|
|
69
|
+
component: PropTypes
|
|
70
|
+
/* @typescript-to-proptypes-ignore */
|
|
71
|
+
.elementType,
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The components used for each slot inside the Popper.
|
|
75
|
+
* Either a string to use a HTML element or a component.
|
|
76
|
+
* @default {}
|
|
77
|
+
*/
|
|
78
|
+
components: PropTypes.shape({
|
|
79
|
+
Root: PropTypes.elementType
|
|
80
|
+
}),
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The props used for each slot inside the Popper.
|
|
84
|
+
* @default {}
|
|
85
|
+
*/
|
|
86
|
+
componentsProps: PropTypes.shape({
|
|
87
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
88
|
+
}),
|
|
89
|
+
|
|
66
90
|
/**
|
|
67
91
|
* An HTML element or function that returns one.
|
|
68
92
|
* The `container` will have the portal children appended to it.
|
|
@@ -94,6 +94,11 @@ process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes
|
|
|
94
94
|
* For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
|
|
95
95
|
* For browser support, check out https://caniuse.com/?search=color-scheme
|
|
96
96
|
*/
|
|
97
|
-
enableColorScheme: PropTypes.bool
|
|
97
|
+
enableColorScheme: PropTypes.bool,
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
101
|
+
*/
|
|
102
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
98
103
|
} : void 0;
|
|
99
104
|
export default ScopedCssBaseline;
|
package/legacy/Slider/Slider.js
CHANGED
|
@@ -283,7 +283,6 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
283
283
|
transition: theme.transitions.create(['transform'], {
|
|
284
284
|
duration: theme.transitions.duration.shortest
|
|
285
285
|
}),
|
|
286
|
-
transformOrigin: 'bottom center',
|
|
287
286
|
transform: 'translateY(-100%) scale(0)',
|
|
288
287
|
position: 'absolute',
|
|
289
288
|
backgroundColor: (theme.vars || theme).palette.grey[600],
|
|
@@ -295,6 +294,7 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
295
294
|
padding: '0.25rem 0.75rem'
|
|
296
295
|
}, ownerState.orientation === 'horizontal' && {
|
|
297
296
|
top: '-10px',
|
|
297
|
+
transformOrigin: 'bottom center',
|
|
298
298
|
'&:before': {
|
|
299
299
|
position: 'absolute',
|
|
300
300
|
content: '""',
|
|
@@ -307,7 +307,8 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
307
307
|
}
|
|
308
308
|
}, ownerState.orientation === 'vertical' && {
|
|
309
309
|
right: '30px',
|
|
310
|
-
top: '
|
|
310
|
+
top: '24px',
|
|
311
|
+
transformOrigin: 'right center',
|
|
311
312
|
'&:before': {
|
|
312
313
|
position: 'absolute',
|
|
313
314
|
content: '""',
|