@mui/material 6.1.5 → 6.1.7
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 +1 -0
- package/AvatarGroup/AvatarGroup.js +5 -5
- package/CHANGELOG.md +111 -5
- package/Container/Container.js +2 -2
- package/Divider/Divider.js +1 -1
- package/Grid/Grid.js +4 -4
- package/Grid2/Grid2.js +3 -2
- package/NativeSelect/NativeSelect.js +2 -2
- package/Rating/Rating.d.ts +21 -4
- package/Rating/Rating.js +12 -0
- package/Select/Select.js +2 -2
- package/Slider/Slider.d.ts +1 -1
- package/Slider/Slider.js +3 -3
- package/Slider/SliderValueLabel.types.d.ts +1 -2
- package/Stack/Stack.js +2 -2
- package/index.js +1 -1
- package/modern/AvatarGroup/AvatarGroup.js +5 -5
- package/modern/Container/Container.js +2 -2
- package/modern/Divider/Divider.js +1 -1
- package/modern/Grid/Grid.js +4 -4
- package/modern/Grid2/Grid2.js +3 -2
- package/modern/NativeSelect/NativeSelect.js +2 -2
- package/modern/Rating/Rating.js +12 -0
- package/modern/Select/Select.js +2 -2
- package/modern/Slider/Slider.js +3 -3
- package/modern/Stack/Stack.js +2 -2
- package/modern/index.js +1 -1
- package/modern/styles/ThemeProviderWithVars.js +1 -1
- package/modern/styles/stringifyTheme.js +1 -1
- package/modern/useMediaQuery/index.js +6 -1
- package/modern/version/index.js +2 -2
- package/node/AvatarGroup/AvatarGroup.js +5 -5
- package/node/Container/Container.js +2 -2
- package/node/Divider/Divider.js +1 -1
- package/node/Grid/Grid.js +4 -4
- package/node/Grid2/Grid2.js +2 -1
- package/node/NativeSelect/NativeSelect.js +2 -2
- package/node/Rating/Rating.js +12 -0
- package/node/Select/Select.js +2 -2
- package/node/Slider/Slider.js +3 -3
- package/node/Stack/Stack.js +2 -2
- package/node/index.js +1 -1
- package/node/styles/ThemeProviderWithVars.js +1 -1
- package/node/styles/stringifyTheme.js +1 -1
- package/node/useMediaQuery/index.js +6 -6
- package/node/version/index.js +2 -2
- package/package.json +7 -7
- package/styles/ThemeProviderWithVars.d.ts +1 -1
- package/styles/ThemeProviderWithVars.js +1 -1
- package/styles/stringifyTheme.d.ts +1 -1
- package/styles/stringifyTheme.js +1 -1
- package/useMediaQuery/index.d.ts +10 -1
- package/useMediaQuery/index.js +6 -1
- package/version/index.js +2 -2
|
@@ -81,6 +81,7 @@ export interface AutocompleteRenderInputParams {
|
|
|
81
81
|
className: string;
|
|
82
82
|
startAdornment: React.ReactNode;
|
|
83
83
|
endAdornment: React.ReactNode;
|
|
84
|
+
onMouseDown: React.MouseEventHandler;
|
|
84
85
|
};
|
|
85
86
|
inputProps: ReturnType<ReturnType<typeof useAutocomplete>['getInputProps']>;
|
|
86
87
|
}
|
|
@@ -107,11 +107,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
107
107
|
className: classes.avatar,
|
|
108
108
|
ownerState,
|
|
109
109
|
additionalProps: {
|
|
110
|
-
variant
|
|
111
|
-
style: {
|
|
112
|
-
'--AvatarRoot-spacing': marginValue ? `${marginValue}px` : undefined,
|
|
113
|
-
...other.style
|
|
114
|
-
}
|
|
110
|
+
variant
|
|
115
111
|
}
|
|
116
112
|
});
|
|
117
113
|
return /*#__PURE__*/_jsxs(AvatarGroupRoot, {
|
|
@@ -120,6 +116,10 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
120
116
|
className: clsx(classes.root, className),
|
|
121
117
|
ref: ref,
|
|
122
118
|
...other,
|
|
119
|
+
style: {
|
|
120
|
+
'--AvatarGroup-spacing': marginValue ? `${marginValue}px` : undefined,
|
|
121
|
+
...other.style
|
|
122
|
+
},
|
|
123
123
|
children: [extraAvatars ? /*#__PURE__*/_jsx(SurplusSlot, {
|
|
124
124
|
...surplusProps,
|
|
125
125
|
children: extraAvatarsElement
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,112 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## v6.1.7
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v6.1.6..master -->
|
|
6
|
+
|
|
7
|
+
_Nov 13, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 13 contributors who made this release possible.
|
|
10
|
+
This release includes fixes as well as documentation improvements.
|
|
11
|
+
|
|
12
|
+
### `@mui/material@6.1.7`
|
|
13
|
+
|
|
14
|
+
- Fix default props theme scoping (#44340) @siriwatknp
|
|
15
|
+
- Support theme scoping in `useMediaQuery` (#44339) @siriwatknp
|
|
16
|
+
- [Grid] Fix regression spacing prop with string value (#44376) @siriwatknp
|
|
17
|
+
|
|
18
|
+
### `@mui/styled-engine-sc@6.1.7`
|
|
19
|
+
|
|
20
|
+
- Fix missing `@types/hoist-non-react-statics` causing `styled` returns any (#44397) @megos
|
|
21
|
+
|
|
22
|
+
### Docs
|
|
23
|
+
|
|
24
|
+
- Replace 'Experimental APIs - Toolpad' with 'Toolpad (Beta)' (#44388) @prakhargupta1
|
|
25
|
+
- Fix Pigment CSS install (#44353) @oliviertassinari
|
|
26
|
+
- Fix dashboard menu warning (#44317) @siriwatknp
|
|
27
|
+
- Add runtime theme section for Material Pigment CSS (#44137) @siriwatknp
|
|
28
|
+
- Add hash to `key` to remove noise from console (#44289) @sai6855
|
|
29
|
+
- Revise Example Projects and Related Projects pages (#44191) @samuelsycamore
|
|
30
|
+
- [material-ui] Fix typo in typography theme set up for templates (#44338) @navedqb
|
|
31
|
+
- [material-ui] Add StackBlitz/CodeSandbox buttons to template cards (#44253) @zanivan
|
|
32
|
+
- [material-ui] Fix Sign-in/Sign-up templates layout (#44281) @zanivan
|
|
33
|
+
- [material-ui] Remove noise in template (#44260) @oliviertassinari
|
|
34
|
+
- [material-ui][Rating] Add uncontrolled example to Basic Rating demo (#44386) @sai6855
|
|
35
|
+
- [material-ui][TextField] Replace InputProps with slotProps.input in demo (#44288) @sai6855
|
|
36
|
+
|
|
37
|
+
### Core
|
|
38
|
+
|
|
39
|
+
- [blog] Follow media asset guidelines (#44374) @oliviertassinari
|
|
40
|
+
- [code-infra] Changes for test util to work in `vitest` (#43625) @JCQuintas
|
|
41
|
+
- Remove old marked JS options (#44375) @ZeeshanTamboli
|
|
42
|
+
- Fix webpack capitalization (#44352) @oliviertassinari
|
|
43
|
+
- Fix Next.js link 404 (710cd95) @oliviertassinari
|
|
44
|
+
- Update Gold sponsoring backlinks (#44316) @oliviertassinari
|
|
45
|
+
- Fix tools-public.mui.com redirection (9196fa5) @oliviertassinari
|
|
46
|
+
- Remove blank AlertTitle test file (#44282) @ZeeshanTamboli
|
|
47
|
+
- [docs-infra] Fix ad in RTL (#44345) @oliviertassinari
|
|
48
|
+
- [docs-infra] Enforce punctuation on descriptions (#44292) @oliviertassinari
|
|
49
|
+
- [docs-infra] Add CodeSandbox and StackBlitz to vale vocab (6db477a) @oliviertassinari
|
|
50
|
+
- [docs-infra] Fix correct spelling of VS Code (#44277) @oliviertassinari
|
|
51
|
+
- [docs-infra] Add a `rawDescriptions` option (#44390) @vladmoroz
|
|
52
|
+
- [examples] Add missing `clsx` dependency (#43526) @Janpot
|
|
53
|
+
- [infra] Fix @renovate[bot] appearing in changelog (#44275) @mnajdova
|
|
54
|
+
|
|
55
|
+
All contributors of this release in alphabetical order: @Janpot, @JCQuintas, @megos, @mnajdova, @navedqb, @oliviertassinari, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @vladmoroz, @zanivan, @ZeeshanTamboli
|
|
56
|
+
|
|
57
|
+
## v6.1.6
|
|
58
|
+
|
|
59
|
+
<!-- generated comparing v6.1.5..master -->
|
|
60
|
+
|
|
61
|
+
_Oct 30, 2024_
|
|
62
|
+
|
|
63
|
+
A big thanks to the 13 contributors who made this release possible.
|
|
64
|
+
|
|
65
|
+
### `@mui/material@6.1.6`
|
|
66
|
+
|
|
67
|
+
- [Autocomplete] Add missing `onMouseDown` type to AutocompleteRenderInputParams (#44183) @sai6855
|
|
68
|
+
- [Avatar] Fix AvatarGroup spacing (#44208) @aarongarciah
|
|
69
|
+
- [AvatarGroup] Fix spacing CSS variable (#44202) @navedqb
|
|
70
|
+
- [Divider] Fix CSS specificity order (#44204) @o-alexandrov
|
|
71
|
+
- [Slider] Fix value prop type warning (#44131) @joshkel
|
|
72
|
+
- Replace `useThemeProps` with `useDefaultProps` (#44193) @siriwatknp
|
|
73
|
+
|
|
74
|
+
### `@mui/material-nextjs@6.1.6`
|
|
75
|
+
|
|
76
|
+
- Support Next 15.0.0 (#42428) @nphmuller
|
|
77
|
+
|
|
78
|
+
### `@mui/lab@6.0.0-beta.14`
|
|
79
|
+
|
|
80
|
+
- [Tabs] Fix type of TabPanel component (#44207) @blackcow1987
|
|
81
|
+
|
|
82
|
+
### `@mui/codemod@6.1.6`
|
|
83
|
+
|
|
84
|
+
- Fix system props default import specifier (#44170) @siriwatknp
|
|
85
|
+
|
|
86
|
+
### `@mui/utils@6.1.6`
|
|
87
|
+
|
|
88
|
+
- Bring back useIsFocusVisible (#44256) @aarongarciah
|
|
89
|
+
- Bring back getReactNodeRef (#44248) @aarongarciah
|
|
90
|
+
|
|
91
|
+
### Docs
|
|
92
|
+
|
|
93
|
+
- [material-ui][Avatar] Add AvatarGroup spacing demo (#44209) @aarongarciah
|
|
94
|
+
- Fix a typo in CONTRIBUTING.md (#44200) @prakhargupta1
|
|
95
|
+
- Mark the Hidden component as deprecated in the sidenav (#44068) @jimmycallin
|
|
96
|
+
- Use () when referencing functions (#44184) @oliviertassinari
|
|
97
|
+
- Follow types description convention (#44187) @oliviertassinari
|
|
98
|
+
|
|
99
|
+
### Core
|
|
100
|
+
|
|
101
|
+
- Lock file maintenance (#43947)
|
|
102
|
+
- Run @mui/icon-material src:icons (#44097) @oliviertassinari
|
|
103
|
+
- [test][material-ui] Add tests for Pigment Grid and Stack (#44132) @DiegoAndai
|
|
104
|
+
- [test] Distinguish private with public tests API (#44188) @oliviertassinari
|
|
105
|
+
- [docs-infra] Add recursively the relative modules in the demos (#44150) @mnajdova
|
|
106
|
+
|
|
107
|
+
All contributors of this release in alphabetical order: @aarongarciah, @blackcow1987, @DiegoAndai, @jimmycallin, @joshkel, @mnajdova, @navedqb, @nphmuller, @o-alexandrov, @oliviertassinari, @prakhargupta1, @sai6855, @siriwatknp
|
|
108
|
+
|
|
109
|
+
## v6.1.5
|
|
4
110
|
|
|
5
111
|
<!-- generated comparing v6.1.4..master -->
|
|
6
112
|
|
|
@@ -32,7 +138,7 @@ A big thanks to the 9 contributors who made this release possible.
|
|
|
32
138
|
- [material-ui][TextField] Dynamically modify the eye password button aria-label (#44122) @ChinoUkaegbu
|
|
33
139
|
- [icons] Run pnpm docs:mdicons:synonyms (#44098) @oliviertassinari
|
|
34
140
|
- [joy-ui] Update Overview copy to match Readme (#44136) @samuelsycamore
|
|
35
|
-
- Add CodeSandbox/
|
|
141
|
+
- Add CodeSandbox/StackBlitz to the rest of the templates (#43708) @siriwatknp
|
|
36
142
|
- Update Figma link to fix 301 (a7b7d9c) @oliviertassinari
|
|
37
143
|
- Link Toolpad from Core repo (#44111) @prakhargupta1
|
|
38
144
|
- Remove HighlightedCode max-width (#43731) @Janpot
|
|
@@ -202,7 +308,7 @@ A big thanks to the 13 contributors who made this release possible.
|
|
|
202
308
|
- Uniformity in version range @oliviertassinari
|
|
203
309
|
- Replace `toBeAriaHidden` matcher with `toBeInaccessible` in tests (#43870) @ZeeshanTamboli
|
|
204
310
|
- [docs-infra] Strengthen CSP (#43711) @oliviertassinari
|
|
205
|
-
- [docs-infra] Open
|
|
311
|
+
- [docs-infra] Open CodeSandbox demo with fontsize=12 (#43860) @siriwatknp
|
|
206
312
|
- [icons] Reduce Material Icon page size (#43911) @oliviertassinari
|
|
207
313
|
- [test] Point Istanbul to correct URL (#43935) @sai6855
|
|
208
314
|
- [test] Sync React.version parse logic with codebase (#43820) @oliviertassinari
|
|
@@ -358,7 +464,7 @@ A big thanks to the 11 contributors who made this release possible.
|
|
|
358
464
|
|
|
359
465
|
### `@mui/material@6.0.2`
|
|
360
466
|
|
|
361
|
-
- Fix `createTheme` with just color schemes (#43518) @siriwatknp
|
|
467
|
+
- Fix `createTheme()` with just color schemes (#43518) @siriwatknp
|
|
362
468
|
- [Menu,Popover] Fix Backdrop props descriptions (#43503) @Michael-Hutchinson
|
|
363
469
|
- [MenuList] Do not react to an event with modifier key pressed (#43505) @MateuszGroth
|
|
364
470
|
|
|
@@ -1100,7 +1206,7 @@ A big thanks to the 18 contributors who made this release possible.
|
|
|
1100
1206
|
|
|
1101
1207
|
### Docs
|
|
1102
1208
|
|
|
1103
|
-
- Add `theme.applyStyles` and migrate docs (#42498) @siriwatknp
|
|
1209
|
+
- Add `theme.applyStyles()` and migrate docs (#42498) @siriwatknp
|
|
1104
1210
|
- Fix dashboard template console error (#42594) @oliviertassinari
|
|
1105
1211
|
- Migrate system props to `sx` prop (#42475) @siriwatknp
|
|
1106
1212
|
- [material-ui]Fix duplicated sentence (#42521) @alexfauquette
|
package/Container/Container.js
CHANGED
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { createContainer } from '@mui/system';
|
|
5
5
|
import capitalize from "../utils/capitalize.js";
|
|
6
6
|
import styled from "../styles/styled.js";
|
|
7
|
-
import
|
|
7
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
8
8
|
const Container = createContainer({
|
|
9
9
|
createStyledComponent: styled('div', {
|
|
10
10
|
name: 'MuiContainer',
|
|
@@ -16,7 +16,7 @@ const Container = createContainer({
|
|
|
16
16
|
return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
|
|
17
17
|
}
|
|
18
18
|
}),
|
|
19
|
-
useThemeProps: inProps =>
|
|
19
|
+
useThemeProps: inProps => useDefaultProps({
|
|
20
20
|
props: inProps,
|
|
21
21
|
name: 'MuiContainer'
|
|
22
22
|
})
|
package/Divider/Divider.js
CHANGED
|
@@ -111,7 +111,6 @@ const DividerRoot = styled('div', {
|
|
|
111
111
|
}) => !!ownerState.children,
|
|
112
112
|
style: {
|
|
113
113
|
display: 'flex',
|
|
114
|
-
whiteSpace: 'nowrap',
|
|
115
114
|
textAlign: 'center',
|
|
116
115
|
border: 0,
|
|
117
116
|
borderTopStyle: 'solid',
|
|
@@ -185,6 +184,7 @@ const DividerWrapper = styled('span', {
|
|
|
185
184
|
display: 'inline-block',
|
|
186
185
|
paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
|
|
187
186
|
paddingRight: `calc(${theme.spacing(1)} * 1.2)`,
|
|
187
|
+
whiteSpace: 'nowrap',
|
|
188
188
|
variants: [{
|
|
189
189
|
props: {
|
|
190
190
|
orientation: 'vertical'
|
package/Grid/Grid.js
CHANGED
|
@@ -18,7 +18,7 @@ import { extendSxProp } from '@mui/system/styleFunctionSx';
|
|
|
18
18
|
import composeClasses from '@mui/utils/composeClasses';
|
|
19
19
|
import requirePropFactory from "../utils/requirePropFactory.js";
|
|
20
20
|
import styled from "../styles/styled.js";
|
|
21
|
-
import
|
|
21
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
22
22
|
import useTheme from "../styles/useTheme.js";
|
|
23
23
|
import GridContext from "./GridContext.js";
|
|
24
24
|
import gridClasses, { getGridUtilityClass } from "./gridClasses.js";
|
|
@@ -167,7 +167,7 @@ export function generateRowGap({
|
|
|
167
167
|
const themeSpacing = theme.spacing(propValue);
|
|
168
168
|
if (themeSpacing !== '0px') {
|
|
169
169
|
return {
|
|
170
|
-
marginTop:
|
|
170
|
+
marginTop: `-${themeSpacing}`,
|
|
171
171
|
[`& > .${gridClasses.item}`]: {
|
|
172
172
|
paddingTop: themeSpacing
|
|
173
173
|
}
|
|
@@ -212,7 +212,7 @@ export function generateColumnGap({
|
|
|
212
212
|
}, columnSpacingValues, (propValue, breakpoint) => {
|
|
213
213
|
const themeSpacing = theme.spacing(propValue);
|
|
214
214
|
if (themeSpacing !== '0px') {
|
|
215
|
-
const negativeValue =
|
|
215
|
+
const negativeValue = `-${themeSpacing}`;
|
|
216
216
|
return {
|
|
217
217
|
width: `calc(100% + ${themeSpacing})`,
|
|
218
218
|
marginLeft: negativeValue,
|
|
@@ -367,7 +367,7 @@ const useUtilityClasses = ownerState => {
|
|
|
367
367
|
* @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
|
|
368
368
|
*/
|
|
369
369
|
const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
370
|
-
const themeProps =
|
|
370
|
+
const themeProps = useDefaultProps({
|
|
371
371
|
props: inProps,
|
|
372
372
|
name: 'MuiGrid'
|
|
373
373
|
});
|
package/Grid2/Grid2.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { createGrid as createGrid2 } from '@mui/system/Grid';
|
|
5
5
|
import requirePropFactory from "../utils/requirePropFactory.js";
|
|
6
|
-
import { styled
|
|
6
|
+
import { styled } from "../styles/index.js";
|
|
7
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
* Demos:
|
|
@@ -21,7 +22,7 @@ const Grid2 = createGrid2({
|
|
|
21
22
|
overridesResolver: (props, styles) => styles.root
|
|
22
23
|
}),
|
|
23
24
|
componentName: 'MuiGrid2',
|
|
24
|
-
useThemeProps: inProps =>
|
|
25
|
+
useThemeProps: inProps => useDefaultProps({
|
|
25
26
|
props: inProps,
|
|
26
27
|
name: 'MuiGrid2'
|
|
27
28
|
})
|
|
@@ -9,7 +9,7 @@ import formControlState from "../FormControl/formControlState.js";
|
|
|
9
9
|
import useFormControl from "../FormControl/useFormControl.js";
|
|
10
10
|
import ArrowDropDownIcon from "../internal/svg-icons/ArrowDropDown.js";
|
|
11
11
|
import Input from "../Input/index.js";
|
|
12
|
-
import
|
|
12
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
13
13
|
import { getNativeSelectUtilityClasses } from "./nativeSelectClasses.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
const useUtilityClasses = ownerState => {
|
|
@@ -26,7 +26,7 @@ const defaultInput = /*#__PURE__*/_jsx(Input, {});
|
|
|
26
26
|
* An alternative to `<Select native />` with a much smaller bundle size footprint.
|
|
27
27
|
*/
|
|
28
28
|
const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps, ref) {
|
|
29
|
-
const props =
|
|
29
|
+
const props = useDefaultProps({
|
|
30
30
|
name: 'MuiNativeSelect',
|
|
31
31
|
props: inProps
|
|
32
32
|
});
|
package/Rating/Rating.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
3
|
import { OverridableStringUnion } from '@mui/types';
|
|
4
|
-
import {
|
|
4
|
+
import { Theme } from '..';
|
|
5
5
|
import { RatingClasses } from './ratingClasses';
|
|
6
|
+
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
|
6
7
|
|
|
7
8
|
export interface IconContainerProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
8
9
|
value: number;
|
|
@@ -10,8 +11,7 @@ export interface IconContainerProps extends React.HTMLAttributes<HTMLSpanElement
|
|
|
10
11
|
|
|
11
12
|
export interface RatingPropsSizeOverrides {}
|
|
12
13
|
|
|
13
|
-
export interface
|
|
14
|
-
extends StandardProps<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'onChange'> {
|
|
14
|
+
export interface RatingOwnProps {
|
|
15
15
|
/**
|
|
16
16
|
* Override or extend the styles applied to the component.
|
|
17
17
|
*/
|
|
@@ -114,6 +114,14 @@ export interface RatingProps
|
|
|
114
114
|
value?: number | null;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
export type RatingTypeMap<
|
|
118
|
+
AdditionalProps = {},
|
|
119
|
+
RootComponent extends React.ElementType = 'span',
|
|
120
|
+
> = {
|
|
121
|
+
props: AdditionalProps & RatingOwnProps;
|
|
122
|
+
defaultComponent: RootComponent;
|
|
123
|
+
};
|
|
124
|
+
|
|
117
125
|
/**
|
|
118
126
|
*
|
|
119
127
|
* Demos:
|
|
@@ -124,4 +132,13 @@ export interface RatingProps
|
|
|
124
132
|
*
|
|
125
133
|
* - [Rating API](https://mui.com/material-ui/api/rating/)
|
|
126
134
|
*/
|
|
127
|
-
|
|
135
|
+
declare const Rating: OverridableComponent<RatingTypeMap>;
|
|
136
|
+
|
|
137
|
+
export type RatingProps<
|
|
138
|
+
RootComponent extends React.ElementType = RatingTypeMap['defaultComponent'],
|
|
139
|
+
AdditionalProps = {},
|
|
140
|
+
> = OverrideProps<RatingTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
|
141
|
+
component?: React.ElementType;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export default Rating;
|
package/Rating/Rating.js
CHANGED
|
@@ -317,6 +317,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
317
317
|
props: inProps
|
|
318
318
|
});
|
|
319
319
|
const {
|
|
320
|
+
component = 'span',
|
|
320
321
|
className,
|
|
321
322
|
defaultValue = null,
|
|
322
323
|
disabled = false,
|
|
@@ -457,6 +458,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
457
458
|
const [emptyValueFocused, setEmptyValueFocused] = React.useState(false);
|
|
458
459
|
const ownerState = {
|
|
459
460
|
...props,
|
|
461
|
+
component,
|
|
460
462
|
defaultValue,
|
|
461
463
|
disabled,
|
|
462
464
|
emptyIcon,
|
|
@@ -473,6 +475,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
473
475
|
};
|
|
474
476
|
const classes = useUtilityClasses(ownerState);
|
|
475
477
|
return /*#__PURE__*/_jsxs(RatingRoot, {
|
|
478
|
+
as: component,
|
|
476
479
|
ref: handleRef,
|
|
477
480
|
onMouseMove: handleMouseMove,
|
|
478
481
|
onMouseLeave: handleMouseLeave,
|
|
@@ -558,6 +561,10 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
|
|
|
558
561
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
559
562
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
560
563
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
564
|
+
/**
|
|
565
|
+
* @ignore
|
|
566
|
+
*/
|
|
567
|
+
children: PropTypes.node,
|
|
561
568
|
/**
|
|
562
569
|
* Override or extend the styles applied to the component.
|
|
563
570
|
*/
|
|
@@ -566,6 +573,11 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
|
|
|
566
573
|
* @ignore
|
|
567
574
|
*/
|
|
568
575
|
className: PropTypes.string,
|
|
576
|
+
/**
|
|
577
|
+
* The component used for the root node.
|
|
578
|
+
* Either a string to use a HTML element or a component.
|
|
579
|
+
*/
|
|
580
|
+
component: PropTypes.elementType,
|
|
569
581
|
/**
|
|
570
582
|
* The default value. Use when the component is not controlled.
|
|
571
583
|
* @default null
|
package/Select/Select.js
CHANGED
|
@@ -13,7 +13,7 @@ import Input from "../Input/index.js";
|
|
|
13
13
|
import NativeSelectInput from "../NativeSelect/NativeSelectInput.js";
|
|
14
14
|
import FilledInput from "../FilledInput/index.js";
|
|
15
15
|
import OutlinedInput from "../OutlinedInput/index.js";
|
|
16
|
-
import
|
|
16
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
17
17
|
import useForkRef from "../utils/useForkRef.js";
|
|
18
18
|
import { styled } from "../zero-styled/index.js";
|
|
19
19
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
|
@@ -34,7 +34,7 @@ const StyledInput = styled(Input, styledRootConfig)('');
|
|
|
34
34
|
const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
|
|
35
35
|
const StyledFilledInput = styled(FilledInput, styledRootConfig)('');
|
|
36
36
|
const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
37
|
-
const props =
|
|
37
|
+
const props = useDefaultProps({
|
|
38
38
|
name: 'MuiSelect',
|
|
39
39
|
props: inProps
|
|
40
40
|
});
|
package/Slider/Slider.d.ts
CHANGED
|
@@ -284,7 +284,7 @@ export interface SliderValueLabelProps extends React.HTMLAttributes<HTMLSpanElem
|
|
|
284
284
|
children: React.ReactElement<unknown>;
|
|
285
285
|
index: number;
|
|
286
286
|
open: boolean;
|
|
287
|
-
value:
|
|
287
|
+
value: React.ReactNode;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
type SliderRootProps = NonNullable<SliderTypeMap['props']['componentsProps']>['root'];
|
package/Slider/Slider.js
CHANGED
|
@@ -440,7 +440,7 @@ process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes /* remove-pro
|
|
|
440
440
|
/**
|
|
441
441
|
* @ignore
|
|
442
442
|
*/
|
|
443
|
-
value: PropTypes.
|
|
443
|
+
value: PropTypes.node
|
|
444
444
|
} : void 0;
|
|
445
445
|
export { SliderValueLabel };
|
|
446
446
|
export const SliderMark = styled('span', {
|
|
@@ -901,7 +901,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
901
901
|
className: PropTypes.string,
|
|
902
902
|
open: PropTypes.bool,
|
|
903
903
|
style: PropTypes.object,
|
|
904
|
-
value: PropTypes.
|
|
904
|
+
value: PropTypes.node,
|
|
905
905
|
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
906
906
|
})])
|
|
907
907
|
}),
|
|
@@ -1018,7 +1018,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
1018
1018
|
className: PropTypes.string,
|
|
1019
1019
|
open: PropTypes.bool,
|
|
1020
1020
|
style: PropTypes.object,
|
|
1021
|
-
value: PropTypes.
|
|
1021
|
+
value: PropTypes.node,
|
|
1022
1022
|
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
1023
1023
|
})])
|
|
1024
1024
|
}),
|
|
@@ -8,9 +8,8 @@ export interface SliderValueLabelProps {
|
|
|
8
8
|
open: boolean;
|
|
9
9
|
/**
|
|
10
10
|
* The value of the slider.
|
|
11
|
-
* For ranged sliders, provide an array with two values.
|
|
12
11
|
*/
|
|
13
|
-
value:
|
|
12
|
+
value: React.ReactNode;
|
|
14
13
|
/**
|
|
15
14
|
* Controls when the value label is displayed:
|
|
16
15
|
*
|
package/Stack/Stack.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { createStack } from '@mui/system';
|
|
5
5
|
import styled from "../styles/styled.js";
|
|
6
|
-
import
|
|
6
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
7
7
|
const Stack = createStack({
|
|
8
8
|
createStyledComponent: styled('div', {
|
|
9
9
|
name: 'MuiStack',
|
|
10
10
|
slot: 'Root',
|
|
11
11
|
overridesResolver: (props, styles) => styles.root
|
|
12
12
|
}),
|
|
13
|
-
useThemeProps: inProps =>
|
|
13
|
+
useThemeProps: inProps => useDefaultProps({
|
|
14
14
|
props: inProps,
|
|
15
15
|
name: 'MuiStack'
|
|
16
16
|
})
|
package/index.js
CHANGED
|
@@ -107,11 +107,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
107
107
|
className: classes.avatar,
|
|
108
108
|
ownerState,
|
|
109
109
|
additionalProps: {
|
|
110
|
-
variant
|
|
111
|
-
style: {
|
|
112
|
-
'--AvatarRoot-spacing': marginValue ? `${marginValue}px` : undefined,
|
|
113
|
-
...other.style
|
|
114
|
-
}
|
|
110
|
+
variant
|
|
115
111
|
}
|
|
116
112
|
});
|
|
117
113
|
return /*#__PURE__*/_jsxs(AvatarGroupRoot, {
|
|
@@ -120,6 +116,10 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
120
116
|
className: clsx(classes.root, className),
|
|
121
117
|
ref: ref,
|
|
122
118
|
...other,
|
|
119
|
+
style: {
|
|
120
|
+
'--AvatarGroup-spacing': marginValue ? `${marginValue}px` : undefined,
|
|
121
|
+
...other.style
|
|
122
|
+
},
|
|
123
123
|
children: [extraAvatars ? /*#__PURE__*/_jsx(SurplusSlot, {
|
|
124
124
|
...surplusProps,
|
|
125
125
|
children: extraAvatarsElement
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { createContainer } from '@mui/system';
|
|
5
5
|
import capitalize from "../utils/capitalize.js";
|
|
6
6
|
import styled from "../styles/styled.js";
|
|
7
|
-
import
|
|
7
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
8
8
|
const Container = createContainer({
|
|
9
9
|
createStyledComponent: styled('div', {
|
|
10
10
|
name: 'MuiContainer',
|
|
@@ -16,7 +16,7 @@ const Container = createContainer({
|
|
|
16
16
|
return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
|
|
17
17
|
}
|
|
18
18
|
}),
|
|
19
|
-
useThemeProps: inProps =>
|
|
19
|
+
useThemeProps: inProps => useDefaultProps({
|
|
20
20
|
props: inProps,
|
|
21
21
|
name: 'MuiContainer'
|
|
22
22
|
})
|
|
@@ -111,7 +111,6 @@ const DividerRoot = styled('div', {
|
|
|
111
111
|
}) => !!ownerState.children,
|
|
112
112
|
style: {
|
|
113
113
|
display: 'flex',
|
|
114
|
-
whiteSpace: 'nowrap',
|
|
115
114
|
textAlign: 'center',
|
|
116
115
|
border: 0,
|
|
117
116
|
borderTopStyle: 'solid',
|
|
@@ -185,6 +184,7 @@ const DividerWrapper = styled('span', {
|
|
|
185
184
|
display: 'inline-block',
|
|
186
185
|
paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
|
|
187
186
|
paddingRight: `calc(${theme.spacing(1)} * 1.2)`,
|
|
187
|
+
whiteSpace: 'nowrap',
|
|
188
188
|
variants: [{
|
|
189
189
|
props: {
|
|
190
190
|
orientation: 'vertical'
|
package/modern/Grid/Grid.js
CHANGED
|
@@ -18,7 +18,7 @@ import { extendSxProp } from '@mui/system/styleFunctionSx';
|
|
|
18
18
|
import composeClasses from '@mui/utils/composeClasses';
|
|
19
19
|
import requirePropFactory from "../utils/requirePropFactory.js";
|
|
20
20
|
import styled from "../styles/styled.js";
|
|
21
|
-
import
|
|
21
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
22
22
|
import useTheme from "../styles/useTheme.js";
|
|
23
23
|
import GridContext from "./GridContext.js";
|
|
24
24
|
import gridClasses, { getGridUtilityClass } from "./gridClasses.js";
|
|
@@ -167,7 +167,7 @@ export function generateRowGap({
|
|
|
167
167
|
const themeSpacing = theme.spacing(propValue);
|
|
168
168
|
if (themeSpacing !== '0px') {
|
|
169
169
|
return {
|
|
170
|
-
marginTop:
|
|
170
|
+
marginTop: `-${themeSpacing}`,
|
|
171
171
|
[`& > .${gridClasses.item}`]: {
|
|
172
172
|
paddingTop: themeSpacing
|
|
173
173
|
}
|
|
@@ -212,7 +212,7 @@ export function generateColumnGap({
|
|
|
212
212
|
}, columnSpacingValues, (propValue, breakpoint) => {
|
|
213
213
|
const themeSpacing = theme.spacing(propValue);
|
|
214
214
|
if (themeSpacing !== '0px') {
|
|
215
|
-
const negativeValue =
|
|
215
|
+
const negativeValue = `-${themeSpacing}`;
|
|
216
216
|
return {
|
|
217
217
|
width: `calc(100% + ${themeSpacing})`,
|
|
218
218
|
marginLeft: negativeValue,
|
|
@@ -367,7 +367,7 @@ const useUtilityClasses = ownerState => {
|
|
|
367
367
|
* @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
|
|
368
368
|
*/
|
|
369
369
|
const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
370
|
-
const themeProps =
|
|
370
|
+
const themeProps = useDefaultProps({
|
|
371
371
|
props: inProps,
|
|
372
372
|
name: 'MuiGrid'
|
|
373
373
|
});
|
package/modern/Grid2/Grid2.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { createGrid as createGrid2 } from '@mui/system/Grid';
|
|
5
5
|
import requirePropFactory from "../utils/requirePropFactory.js";
|
|
6
|
-
import { styled
|
|
6
|
+
import { styled } from "../styles/index.js";
|
|
7
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
* Demos:
|
|
@@ -21,7 +22,7 @@ const Grid2 = createGrid2({
|
|
|
21
22
|
overridesResolver: (props, styles) => styles.root
|
|
22
23
|
}),
|
|
23
24
|
componentName: 'MuiGrid2',
|
|
24
|
-
useThemeProps: inProps =>
|
|
25
|
+
useThemeProps: inProps => useDefaultProps({
|
|
25
26
|
props: inProps,
|
|
26
27
|
name: 'MuiGrid2'
|
|
27
28
|
})
|
|
@@ -9,7 +9,7 @@ import formControlState from "../FormControl/formControlState.js";
|
|
|
9
9
|
import useFormControl from "../FormControl/useFormControl.js";
|
|
10
10
|
import ArrowDropDownIcon from "../internal/svg-icons/ArrowDropDown.js";
|
|
11
11
|
import Input from "../Input/index.js";
|
|
12
|
-
import
|
|
12
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
13
13
|
import { getNativeSelectUtilityClasses } from "./nativeSelectClasses.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
const useUtilityClasses = ownerState => {
|
|
@@ -26,7 +26,7 @@ const defaultInput = /*#__PURE__*/_jsx(Input, {});
|
|
|
26
26
|
* An alternative to `<Select native />` with a much smaller bundle size footprint.
|
|
27
27
|
*/
|
|
28
28
|
const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps, ref) {
|
|
29
|
-
const props =
|
|
29
|
+
const props = useDefaultProps({
|
|
30
30
|
name: 'MuiNativeSelect',
|
|
31
31
|
props: inProps
|
|
32
32
|
});
|
package/modern/Rating/Rating.js
CHANGED
|
@@ -317,6 +317,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
317
317
|
props: inProps
|
|
318
318
|
});
|
|
319
319
|
const {
|
|
320
|
+
component = 'span',
|
|
320
321
|
className,
|
|
321
322
|
defaultValue = null,
|
|
322
323
|
disabled = false,
|
|
@@ -457,6 +458,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
457
458
|
const [emptyValueFocused, setEmptyValueFocused] = React.useState(false);
|
|
458
459
|
const ownerState = {
|
|
459
460
|
...props,
|
|
461
|
+
component,
|
|
460
462
|
defaultValue,
|
|
461
463
|
disabled,
|
|
462
464
|
emptyIcon,
|
|
@@ -473,6 +475,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
473
475
|
};
|
|
474
476
|
const classes = useUtilityClasses(ownerState);
|
|
475
477
|
return /*#__PURE__*/_jsxs(RatingRoot, {
|
|
478
|
+
as: component,
|
|
476
479
|
ref: handleRef,
|
|
477
480
|
onMouseMove: handleMouseMove,
|
|
478
481
|
onMouseLeave: handleMouseLeave,
|
|
@@ -558,6 +561,10 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
|
|
|
558
561
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
559
562
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
560
563
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
564
|
+
/**
|
|
565
|
+
* @ignore
|
|
566
|
+
*/
|
|
567
|
+
children: PropTypes.node,
|
|
561
568
|
/**
|
|
562
569
|
* Override or extend the styles applied to the component.
|
|
563
570
|
*/
|
|
@@ -566,6 +573,11 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
|
|
|
566
573
|
* @ignore
|
|
567
574
|
*/
|
|
568
575
|
className: PropTypes.string,
|
|
576
|
+
/**
|
|
577
|
+
* The component used for the root node.
|
|
578
|
+
* Either a string to use a HTML element or a component.
|
|
579
|
+
*/
|
|
580
|
+
component: PropTypes.elementType,
|
|
569
581
|
/**
|
|
570
582
|
* The default value. Use when the component is not controlled.
|
|
571
583
|
* @default null
|
package/modern/Select/Select.js
CHANGED
|
@@ -13,7 +13,7 @@ import Input from "../Input/index.js";
|
|
|
13
13
|
import NativeSelectInput from "../NativeSelect/NativeSelectInput.js";
|
|
14
14
|
import FilledInput from "../FilledInput/index.js";
|
|
15
15
|
import OutlinedInput from "../OutlinedInput/index.js";
|
|
16
|
-
import
|
|
16
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
17
17
|
import useForkRef from "../utils/useForkRef.js";
|
|
18
18
|
import { styled } from "../zero-styled/index.js";
|
|
19
19
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
|
@@ -34,7 +34,7 @@ const StyledInput = styled(Input, styledRootConfig)('');
|
|
|
34
34
|
const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
|
|
35
35
|
const StyledFilledInput = styled(FilledInput, styledRootConfig)('');
|
|
36
36
|
const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
37
|
-
const props =
|
|
37
|
+
const props = useDefaultProps({
|
|
38
38
|
name: 'MuiSelect',
|
|
39
39
|
props: inProps
|
|
40
40
|
});
|
package/modern/Slider/Slider.js
CHANGED
|
@@ -440,7 +440,7 @@ process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes /* remove-pro
|
|
|
440
440
|
/**
|
|
441
441
|
* @ignore
|
|
442
442
|
*/
|
|
443
|
-
value: PropTypes.
|
|
443
|
+
value: PropTypes.node
|
|
444
444
|
} : void 0;
|
|
445
445
|
export { SliderValueLabel };
|
|
446
446
|
export const SliderMark = styled('span', {
|
|
@@ -901,7 +901,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
901
901
|
className: PropTypes.string,
|
|
902
902
|
open: PropTypes.bool,
|
|
903
903
|
style: PropTypes.object,
|
|
904
|
-
value: PropTypes.
|
|
904
|
+
value: PropTypes.node,
|
|
905
905
|
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
906
906
|
})])
|
|
907
907
|
}),
|
|
@@ -1018,7 +1018,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
1018
1018
|
className: PropTypes.string,
|
|
1019
1019
|
open: PropTypes.bool,
|
|
1020
1020
|
style: PropTypes.object,
|
|
1021
|
-
value: PropTypes.
|
|
1021
|
+
value: PropTypes.node,
|
|
1022
1022
|
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
1023
1023
|
})])
|
|
1024
1024
|
}),
|
package/modern/Stack/Stack.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { createStack } from '@mui/system';
|
|
5
5
|
import styled from "../styles/styled.js";
|
|
6
|
-
import
|
|
6
|
+
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
7
7
|
const Stack = createStack({
|
|
8
8
|
createStyledComponent: styled('div', {
|
|
9
9
|
name: 'MuiStack',
|
|
10
10
|
slot: 'Root',
|
|
11
11
|
overridesResolver: (props, styles) => styles.root
|
|
12
12
|
}),
|
|
13
|
-
useThemeProps: inProps =>
|
|
13
|
+
useThemeProps: inProps => useDefaultProps({
|
|
14
14
|
props: inProps,
|
|
15
15
|
name: 'MuiStack'
|
|
16
16
|
})
|
package/modern/index.js
CHANGED
|
@@ -69,7 +69,7 @@ const getInitColorSchemeScript = params => {
|
|
|
69
69
|
* @deprecated
|
|
70
70
|
* The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.
|
|
71
71
|
*
|
|
72
|
-
* You should use `ThemeProvider` and `createTheme` instead:
|
|
72
|
+
* You should use `ThemeProvider` and `createTheme()` instead:
|
|
73
73
|
*
|
|
74
74
|
* ```diff
|
|
75
75
|
* - import { CssVarsProvider, extendTheme } from '@mui/material/styles';
|
|
@@ -5,7 +5,7 @@ function isSerializable(val) {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* `baseTheme` usually comes from `createTheme` or `extendTheme`.
|
|
8
|
+
* `baseTheme` usually comes from `createTheme()` or `extendTheme()`.
|
|
9
9
|
*
|
|
10
10
|
* This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS
|
|
11
11
|
* For example, in a Next.js project:
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { unstable_createUseMediaQuery } from '@mui/system/useMediaQuery';
|
|
2
|
+
import THEME_ID from "../styles/identifier.js";
|
|
3
|
+
const useMediaQuery = unstable_createUseMediaQuery({
|
|
4
|
+
themeId: THEME_ID
|
|
5
|
+
});
|
|
6
|
+
export default useMediaQuery;
|
package/modern/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.1.
|
|
1
|
+
export const version = "6.1.7";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("1");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("7");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|
|
@@ -114,11 +114,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
114
114
|
className: classes.avatar,
|
|
115
115
|
ownerState,
|
|
116
116
|
additionalProps: {
|
|
117
|
-
variant
|
|
118
|
-
style: {
|
|
119
|
-
'--AvatarRoot-spacing': marginValue ? `${marginValue}px` : undefined,
|
|
120
|
-
...other.style
|
|
121
|
-
}
|
|
117
|
+
variant
|
|
122
118
|
}
|
|
123
119
|
});
|
|
124
120
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(AvatarGroupRoot, {
|
|
@@ -127,6 +123,10 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
127
123
|
className: (0, _clsx.default)(classes.root, className),
|
|
128
124
|
ref: ref,
|
|
129
125
|
...other,
|
|
126
|
+
style: {
|
|
127
|
+
'--AvatarGroup-spacing': marginValue ? `${marginValue}px` : undefined,
|
|
128
|
+
...other.style
|
|
129
|
+
},
|
|
130
130
|
children: [extraAvatars ? /*#__PURE__*/(0, _jsxRuntime.jsx)(SurplusSlot, {
|
|
131
131
|
...surplusProps,
|
|
132
132
|
children: extraAvatarsElement
|
|
@@ -10,7 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _system = require("@mui/system");
|
|
11
11
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
12
12
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
13
|
-
var
|
|
13
|
+
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
14
14
|
const Container = (0, _system.createContainer)({
|
|
15
15
|
createStyledComponent: (0, _styled.default)('div', {
|
|
16
16
|
name: 'MuiContainer',
|
|
@@ -22,7 +22,7 @@ const Container = (0, _system.createContainer)({
|
|
|
22
22
|
return [styles.root, styles[`maxWidth${(0, _capitalize.default)(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
|
|
23
23
|
}
|
|
24
24
|
}),
|
|
25
|
-
useThemeProps: inProps => (0,
|
|
25
|
+
useThemeProps: inProps => (0, _DefaultPropsProvider.useDefaultProps)({
|
|
26
26
|
props: inProps,
|
|
27
27
|
name: 'MuiContainer'
|
|
28
28
|
})
|
package/node/Divider/Divider.js
CHANGED
|
@@ -118,7 +118,6 @@ const DividerRoot = (0, _zeroStyled.styled)('div', {
|
|
|
118
118
|
}) => !!ownerState.children,
|
|
119
119
|
style: {
|
|
120
120
|
display: 'flex',
|
|
121
|
-
whiteSpace: 'nowrap',
|
|
122
121
|
textAlign: 'center',
|
|
123
122
|
border: 0,
|
|
124
123
|
borderTopStyle: 'solid',
|
|
@@ -192,6 +191,7 @@ const DividerWrapper = (0, _zeroStyled.styled)('span', {
|
|
|
192
191
|
display: 'inline-block',
|
|
193
192
|
paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
|
|
194
193
|
paddingRight: `calc(${theme.spacing(1)} * 1.2)`,
|
|
194
|
+
whiteSpace: 'nowrap',
|
|
195
195
|
variants: [{
|
|
196
196
|
props: {
|
|
197
197
|
orientation: 'vertical'
|
package/node/Grid/Grid.js
CHANGED
|
@@ -31,7 +31,7 @@ var _styleFunctionSx = require("@mui/system/styleFunctionSx");
|
|
|
31
31
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
32
32
|
var _requirePropFactory = _interopRequireDefault(require("../utils/requirePropFactory"));
|
|
33
33
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
34
|
-
var
|
|
34
|
+
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
35
35
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
36
36
|
var _GridContext = _interopRequireDefault(require("./GridContext"));
|
|
37
37
|
var _gridClasses = _interopRequireWildcard(require("./gridClasses"));
|
|
@@ -180,7 +180,7 @@ function generateRowGap({
|
|
|
180
180
|
const themeSpacing = theme.spacing(propValue);
|
|
181
181
|
if (themeSpacing !== '0px') {
|
|
182
182
|
return {
|
|
183
|
-
marginTop:
|
|
183
|
+
marginTop: `-${themeSpacing}`,
|
|
184
184
|
[`& > .${_gridClasses.default.item}`]: {
|
|
185
185
|
paddingTop: themeSpacing
|
|
186
186
|
}
|
|
@@ -225,7 +225,7 @@ function generateColumnGap({
|
|
|
225
225
|
}, columnSpacingValues, (propValue, breakpoint) => {
|
|
226
226
|
const themeSpacing = theme.spacing(propValue);
|
|
227
227
|
if (themeSpacing !== '0px') {
|
|
228
|
-
const negativeValue =
|
|
228
|
+
const negativeValue = `-${themeSpacing}`;
|
|
229
229
|
return {
|
|
230
230
|
width: `calc(100% + ${themeSpacing})`,
|
|
231
231
|
marginLeft: negativeValue,
|
|
@@ -380,7 +380,7 @@ const useUtilityClasses = ownerState => {
|
|
|
380
380
|
* @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
|
|
381
381
|
*/
|
|
382
382
|
const Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
|
|
383
|
-
const themeProps = (0,
|
|
383
|
+
const themeProps = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
384
384
|
props: inProps,
|
|
385
385
|
name: 'MuiGrid'
|
|
386
386
|
});
|
package/node/Grid2/Grid2.js
CHANGED
|
@@ -10,6 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _Grid = require("@mui/system/Grid");
|
|
11
11
|
var _requirePropFactory = _interopRequireDefault(require("../utils/requirePropFactory"));
|
|
12
12
|
var _styles = require("../styles");
|
|
13
|
+
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* Demos:
|
|
@@ -27,7 +28,7 @@ const Grid2 = (0, _Grid.createGrid)({
|
|
|
27
28
|
overridesResolver: (props, styles) => styles.root
|
|
28
29
|
}),
|
|
29
30
|
componentName: 'MuiGrid2',
|
|
30
|
-
useThemeProps: inProps => (0,
|
|
31
|
+
useThemeProps: inProps => (0, _DefaultPropsProvider.useDefaultProps)({
|
|
31
32
|
props: inProps,
|
|
32
33
|
name: 'MuiGrid2'
|
|
33
34
|
})
|
|
@@ -16,7 +16,7 @@ var _formControlState = _interopRequireDefault(require("../FormControl/formContr
|
|
|
16
16
|
var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
|
|
17
17
|
var _ArrowDropDown = _interopRequireDefault(require("../internal/svg-icons/ArrowDropDown"));
|
|
18
18
|
var _Input = _interopRequireDefault(require("../Input"));
|
|
19
|
-
var
|
|
19
|
+
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
20
20
|
var _nativeSelectClasses = require("./nativeSelectClasses");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const useUtilityClasses = ownerState => {
|
|
@@ -33,7 +33,7 @@ const defaultInput = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {});
|
|
|
33
33
|
* An alternative to `<Select native />` with a much smaller bundle size footprint.
|
|
34
34
|
*/
|
|
35
35
|
const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps, ref) {
|
|
36
|
-
const props = (0,
|
|
36
|
+
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
37
37
|
name: 'MuiNativeSelect',
|
|
38
38
|
props: inProps
|
|
39
39
|
});
|
package/node/Rating/Rating.js
CHANGED
|
@@ -324,6 +324,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
324
324
|
props: inProps
|
|
325
325
|
});
|
|
326
326
|
const {
|
|
327
|
+
component = 'span',
|
|
327
328
|
className,
|
|
328
329
|
defaultValue = null,
|
|
329
330
|
disabled = false,
|
|
@@ -464,6 +465,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
464
465
|
const [emptyValueFocused, setEmptyValueFocused] = React.useState(false);
|
|
465
466
|
const ownerState = {
|
|
466
467
|
...props,
|
|
468
|
+
component,
|
|
467
469
|
defaultValue,
|
|
468
470
|
disabled,
|
|
469
471
|
emptyIcon,
|
|
@@ -480,6 +482,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
480
482
|
};
|
|
481
483
|
const classes = useUtilityClasses(ownerState);
|
|
482
484
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RatingRoot, {
|
|
485
|
+
as: component,
|
|
483
486
|
ref: handleRef,
|
|
484
487
|
onMouseMove: handleMouseMove,
|
|
485
488
|
onMouseLeave: handleMouseLeave,
|
|
@@ -565,6 +568,10 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
|
|
|
565
568
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
566
569
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
567
570
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
571
|
+
/**
|
|
572
|
+
* @ignore
|
|
573
|
+
*/
|
|
574
|
+
children: _propTypes.default.node,
|
|
568
575
|
/**
|
|
569
576
|
* Override or extend the styles applied to the component.
|
|
570
577
|
*/
|
|
@@ -573,6 +580,11 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
|
|
|
573
580
|
* @ignore
|
|
574
581
|
*/
|
|
575
582
|
className: _propTypes.default.string,
|
|
583
|
+
/**
|
|
584
|
+
* The component used for the root node.
|
|
585
|
+
* Either a string to use a HTML element or a component.
|
|
586
|
+
*/
|
|
587
|
+
component: _propTypes.default.elementType,
|
|
576
588
|
/**
|
|
577
589
|
* The default value. Use when the component is not controlled.
|
|
578
590
|
* @default null
|
package/node/Select/Select.js
CHANGED
|
@@ -20,7 +20,7 @@ var _Input = _interopRequireDefault(require("../Input"));
|
|
|
20
20
|
var _NativeSelectInput = _interopRequireDefault(require("../NativeSelect/NativeSelectInput"));
|
|
21
21
|
var _FilledInput = _interopRequireDefault(require("../FilledInput"));
|
|
22
22
|
var _OutlinedInput = _interopRequireDefault(require("../OutlinedInput"));
|
|
23
|
-
var
|
|
23
|
+
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
24
24
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
25
25
|
var _zeroStyled = require("../zero-styled");
|
|
26
26
|
var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
|
|
@@ -41,7 +41,7 @@ const StyledInput = (0, _zeroStyled.styled)(_Input.default, styledRootConfig)(''
|
|
|
41
41
|
const StyledOutlinedInput = (0, _zeroStyled.styled)(_OutlinedInput.default, styledRootConfig)('');
|
|
42
42
|
const StyledFilledInput = (0, _zeroStyled.styled)(_FilledInput.default, styledRootConfig)('');
|
|
43
43
|
const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
44
|
-
const props = (0,
|
|
44
|
+
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
45
45
|
name: 'MuiSelect',
|
|
46
46
|
props: inProps
|
|
47
47
|
});
|
package/node/Slider/Slider.js
CHANGED
|
@@ -447,7 +447,7 @@ process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes /* remove-pro
|
|
|
447
447
|
/**
|
|
448
448
|
* @ignore
|
|
449
449
|
*/
|
|
450
|
-
value: _propTypes.default.
|
|
450
|
+
value: _propTypes.default.node
|
|
451
451
|
} : void 0;
|
|
452
452
|
const SliderMark = exports.SliderMark = (0, _zeroStyled.styled)('span', {
|
|
453
453
|
name: 'MuiSlider',
|
|
@@ -907,7 +907,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
907
907
|
className: _propTypes.default.string,
|
|
908
908
|
open: _propTypes.default.bool,
|
|
909
909
|
style: _propTypes.default.object,
|
|
910
|
-
value: _propTypes.default.
|
|
910
|
+
value: _propTypes.default.node,
|
|
911
911
|
valueLabelDisplay: _propTypes.default.oneOf(['auto', 'off', 'on'])
|
|
912
912
|
})])
|
|
913
913
|
}),
|
|
@@ -1024,7 +1024,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
1024
1024
|
className: _propTypes.default.string,
|
|
1025
1025
|
open: _propTypes.default.bool,
|
|
1026
1026
|
style: _propTypes.default.object,
|
|
1027
|
-
value: _propTypes.default.
|
|
1027
|
+
value: _propTypes.default.node,
|
|
1028
1028
|
valueLabelDisplay: _propTypes.default.oneOf(['auto', 'off', 'on'])
|
|
1029
1029
|
})])
|
|
1030
1030
|
}),
|
package/node/Stack/Stack.js
CHANGED
|
@@ -9,14 +9,14 @@ exports.default = void 0;
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _system = require("@mui/system");
|
|
11
11
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
12
|
-
var
|
|
12
|
+
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
13
13
|
const Stack = (0, _system.createStack)({
|
|
14
14
|
createStyledComponent: (0, _styled.default)('div', {
|
|
15
15
|
name: 'MuiStack',
|
|
16
16
|
slot: 'Root',
|
|
17
17
|
overridesResolver: (props, styles) => styles.root
|
|
18
18
|
}),
|
|
19
|
-
useThemeProps: inProps => (0,
|
|
19
|
+
useThemeProps: inProps => (0, _DefaultPropsProvider.useDefaultProps)({
|
|
20
20
|
props: inProps,
|
|
21
21
|
name: 'MuiStack'
|
|
22
22
|
})
|
package/node/index.js
CHANGED
|
@@ -79,7 +79,7 @@ const getInitColorSchemeScript = params => {
|
|
|
79
79
|
* @deprecated
|
|
80
80
|
* The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.
|
|
81
81
|
*
|
|
82
|
-
* You should use `ThemeProvider` and `createTheme` instead:
|
|
82
|
+
* You should use `ThemeProvider` and `createTheme()` instead:
|
|
83
83
|
*
|
|
84
84
|
* ```diff
|
|
85
85
|
* - import { CssVarsProvider, extendTheme } from '@mui/material/styles';
|
|
@@ -12,7 +12,7 @@ function isSerializable(val) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* `baseTheme` usually comes from `createTheme` or `extendTheme`.
|
|
15
|
+
* `baseTheme` usually comes from `createTheme()` or `extendTheme()`.
|
|
16
16
|
*
|
|
17
17
|
* This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS
|
|
18
18
|
* For example, in a Next.js project:
|
|
@@ -4,10 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _useMediaQuery = require("@mui/system/useMediaQuery");
|
|
9
|
+
var _identifier = _interopRequireDefault(require("../styles/identifier"));
|
|
10
|
+
const useMediaQuery = (0, _useMediaQuery.unstable_createUseMediaQuery)({
|
|
11
|
+
themeId: _identifier.default
|
|
12
12
|
});
|
|
13
|
-
var
|
|
13
|
+
var _default = exports.default = useMediaQuery;
|
package/node/version/index.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
|
|
7
|
-
const version = exports.version = "6.1.
|
|
7
|
+
const version = exports.version = "6.1.7";
|
|
8
8
|
const major = exports.major = Number("6");
|
|
9
9
|
const minor = exports.minor = Number("1");
|
|
10
|
-
const patch = exports.patch = Number("
|
|
10
|
+
const patch = exports.patch = Number("7");
|
|
11
11
|
const prerelease = exports.prerelease = undefined;
|
|
12
12
|
var _default = exports.default = version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"url": "https://opencollective.com/mui-org"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@babel/runtime": "^7.
|
|
30
|
+
"@babel/runtime": "^7.26.0",
|
|
31
31
|
"@popperjs/core": "^2.11.8",
|
|
32
32
|
"@types/react-transition-group": "^4.4.11",
|
|
33
33
|
"clsx": "^2.1.1",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react-is": "^18.3.1",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"@mui/core-downloads-tracker": "^6.1.
|
|
39
|
-
"@mui/system": "^6.1.
|
|
40
|
-
"@mui/types": "^7.2.
|
|
41
|
-
"@mui/utils": "^6.1.
|
|
38
|
+
"@mui/core-downloads-tracker": "^6.1.7",
|
|
39
|
+
"@mui/system": "^6.1.7",
|
|
40
|
+
"@mui/types": "^7.2.19",
|
|
41
|
+
"@mui/utils": "^6.1.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
47
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"@mui/material-pigment-css": "^6.1.
|
|
49
|
+
"@mui/material-pigment-css": "^6.1.7"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@types/react": {
|
|
@@ -8,7 +8,7 @@ declare const getInitColorSchemeScript: typeof deprecatedGetInitColorSchemeScrip
|
|
|
8
8
|
* @deprecated
|
|
9
9
|
* The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.
|
|
10
10
|
*
|
|
11
|
-
* You should use `ThemeProvider` and `createTheme` instead:
|
|
11
|
+
* You should use `ThemeProvider` and `createTheme()` instead:
|
|
12
12
|
*
|
|
13
13
|
* ```diff
|
|
14
14
|
* - import { CssVarsProvider, extendTheme } from '@mui/material/styles';
|
|
@@ -69,7 +69,7 @@ const getInitColorSchemeScript = params => {
|
|
|
69
69
|
* @deprecated
|
|
70
70
|
* The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.
|
|
71
71
|
*
|
|
72
|
-
* You should use `ThemeProvider` and `createTheme` instead:
|
|
72
|
+
* You should use `ThemeProvider` and `createTheme()` instead:
|
|
73
73
|
*
|
|
74
74
|
* ```diff
|
|
75
75
|
* - import { CssVarsProvider, extendTheme } from '@mui/material/styles';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `baseTheme` usually comes from `createTheme` or `extendTheme`.
|
|
2
|
+
* `baseTheme` usually comes from `createTheme()` or `extendTheme()`.
|
|
3
3
|
*
|
|
4
4
|
* This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS
|
|
5
5
|
* For example, in a Next.js project:
|
package/styles/stringifyTheme.js
CHANGED
|
@@ -5,7 +5,7 @@ function isSerializable(val) {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* `baseTheme` usually comes from `createTheme` or `extendTheme`.
|
|
8
|
+
* `baseTheme` usually comes from `createTheme()` or `extendTheme()`.
|
|
9
9
|
*
|
|
10
10
|
* This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS
|
|
11
11
|
* For example, in a Next.js project:
|
package/useMediaQuery/index.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { UseMediaQueryOptions } from '@mui/system/useMediaQuery';
|
|
2
|
+
import { Theme } from '../styles/createTheme';
|
|
3
|
+
|
|
2
4
|
export * from '@mui/system/useMediaQuery';
|
|
5
|
+
|
|
6
|
+
declare function useMediaQuery(
|
|
7
|
+
queryInput: string | ((theme: Theme) => string),
|
|
8
|
+
options?: UseMediaQueryOptions,
|
|
9
|
+
): boolean;
|
|
10
|
+
|
|
11
|
+
export default useMediaQuery;
|
package/useMediaQuery/index.js
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { unstable_createUseMediaQuery } from '@mui/system/useMediaQuery';
|
|
2
|
+
import THEME_ID from "../styles/identifier.js";
|
|
3
|
+
const useMediaQuery = unstable_createUseMediaQuery({
|
|
4
|
+
themeId: THEME_ID
|
|
5
|
+
});
|
|
6
|
+
export default useMediaQuery;
|
package/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.1.
|
|
1
|
+
export const version = "6.1.7";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("1");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("7");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|