@mui/material 6.0.0-alpha.0 → 6.0.0-alpha.1
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/AppBar/AppBar.js +118 -68
- package/Badge/Badge.d.ts +2 -4
- package/Badge/Badge.js +2 -4
- package/Button/Button.js +220 -131
- package/ButtonBase/ButtonBase.js +2 -2
- package/ButtonBase/Ripple.js +1 -1
- package/ButtonBase/TouchRipple.js +3 -4
- package/ButtonGroup/ButtonGroup.js +167 -70
- package/CHANGELOG.md +129 -2
- package/Grid/Grid.js +3 -0
- package/RadioGroup/RadioGroup.d.ts +0 -2
- package/RadioGroup/RadioGroup.js +23 -2
- package/RadioGroup/index.d.ts +3 -0
- package/RadioGroup/index.js +3 -1
- package/RadioGroup/radioGroupClasses.d.ts +6 -0
- package/RadioGroup/radioGroupClasses.js +7 -0
- package/Slider/Slider.js +22 -22
- package/Table/Table.d.ts +0 -2
- package/Table/Table.js +0 -2
- package/index.js +1 -1
- package/legacy/AppBar/AppBar.js +124 -64
- package/legacy/Badge/Badge.js +2 -4
- package/legacy/Button/Button.js +218 -123
- package/legacy/ButtonBase/ButtonBase.js +2 -2
- package/legacy/ButtonBase/Ripple.js +1 -1
- package/legacy/ButtonBase/TouchRipple.js +3 -4
- package/legacy/ButtonGroup/ButtonGroup.js +163 -68
- package/legacy/Grid/Grid.js +3 -0
- package/legacy/RadioGroup/RadioGroup.js +21 -2
- package/legacy/RadioGroup/index.js +3 -1
- package/legacy/RadioGroup/radioGroupClasses.js +7 -0
- package/legacy/Slider/Slider.js +24 -24
- package/legacy/Table/Table.js +0 -2
- package/legacy/index.js +1 -1
- package/legacy/styles/experimental_extendTheme.js +24 -2
- package/legacy/zero-styled/index.js +1 -0
- package/modern/AppBar/AppBar.js +118 -68
- package/modern/Badge/Badge.js +2 -4
- package/modern/Button/Button.js +220 -131
- package/modern/ButtonBase/ButtonBase.js +2 -2
- package/modern/ButtonBase/Ripple.js +1 -1
- package/modern/ButtonBase/TouchRipple.js +3 -4
- package/modern/ButtonGroup/ButtonGroup.js +167 -70
- package/modern/Grid/Grid.js +3 -0
- package/modern/RadioGroup/RadioGroup.js +23 -2
- package/modern/RadioGroup/index.js +3 -1
- package/modern/RadioGroup/radioGroupClasses.js +7 -0
- package/modern/Slider/Slider.js +22 -22
- package/modern/Table/Table.js +0 -2
- package/modern/index.js +1 -1
- package/modern/styles/experimental_extendTheme.js +24 -2
- package/modern/zero-styled/index.js +1 -0
- package/node/AppBar/AppBar.js +125 -66
- package/node/Badge/Badge.js +2 -4
- package/node/Button/Button.js +224 -135
- package/node/ButtonBase/ButtonBase.js +4 -4
- package/node/ButtonBase/Ripple.js +1 -1
- package/node/ButtonBase/TouchRipple.js +9 -10
- package/node/ButtonGroup/ButtonGroup.js +169 -72
- package/node/Grid/Grid.js +3 -0
- package/node/RadioGroup/RadioGroup.js +23 -2
- package/node/RadioGroup/index.js +25 -1
- package/node/RadioGroup/radioGroupClasses.js +15 -0
- package/node/Slider/Slider.js +25 -25
- package/node/Table/Table.js +0 -2
- package/node/index.js +1 -1
- package/node/styles/experimental_extendTheme.js +24 -2
- package/node/zero-styled/index.js +7 -0
- package/package.json +7 -7
- package/styles/components.d.ts +5 -0
- package/styles/experimental_extendTheme.d.ts +2 -0
- package/styles/experimental_extendTheme.js +24 -2
- package/styles/overrides.d.ts +2 -0
- package/umd/material-ui.development.js +888 -593
- package/umd/material-ui.production.min.js +4 -4
- package/zero-styled/index.d.ts +1 -0
- package/zero-styled/index.js +1 -0
package/Table/Table.d.ts
CHANGED
package/Table/Table.js
CHANGED
|
@@ -119,8 +119,6 @@ process.env.NODE_ENV !== "production" ? Table.propTypes /* remove-proptypes */ =
|
|
|
119
119
|
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
|
|
120
120
|
/**
|
|
121
121
|
* Set the header sticky.
|
|
122
|
-
*
|
|
123
|
-
* ⚠️ It doesn't work with IE11.
|
|
124
122
|
* @default false
|
|
125
123
|
*/
|
|
126
124
|
stickyHeader: PropTypes.bool,
|
package/index.js
CHANGED
package/legacy/AppBar/AppBar.js
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
import PropTypes from 'prop-types';
|
|
7
8
|
import clsx from 'clsx';
|
|
8
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
-
import styled from '../
|
|
10
|
-
import useThemeProps from '../styles/useThemeProps';
|
|
10
|
+
import { styled, createUseThemeProps } from '../zero-styled';
|
|
11
11
|
import capitalize from '../utils/capitalize';
|
|
12
12
|
import Paper from '../Paper';
|
|
13
13
|
import { getAppBarUtilityClass } from './appBarClasses';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
var useThemeProps = createUseThemeProps('MuiAppBar');
|
|
15
16
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
16
17
|
var color = ownerState.color,
|
|
17
18
|
position = ownerState.position,
|
|
@@ -35,73 +36,132 @@ var AppBarRoot = styled(Paper, {
|
|
|
35
36
|
return [styles.root, styles["position".concat(capitalize(ownerState.position))], styles["color".concat(capitalize(ownerState.color))]];
|
|
36
37
|
}
|
|
37
38
|
})(function (_ref) {
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return _extends({
|
|
39
|
+
var _theme$vars;
|
|
40
|
+
var theme = _ref.theme;
|
|
41
|
+
return {
|
|
42
42
|
display: 'flex',
|
|
43
43
|
flexDirection: 'column',
|
|
44
44
|
width: '100%',
|
|
45
45
|
boxSizing: 'border-box',
|
|
46
46
|
// Prevent padding issue with the Modal and fixed positioned AppBar.
|
|
47
|
-
flexShrink: 0
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
47
|
+
flexShrink: 0,
|
|
48
|
+
variants: [{
|
|
49
|
+
props: {
|
|
50
|
+
position: 'fixed'
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
position: 'fixed',
|
|
54
|
+
zIndex: (theme.vars || theme).zIndex.appBar,
|
|
55
|
+
top: 0,
|
|
56
|
+
left: 'auto',
|
|
57
|
+
right: 0,
|
|
58
|
+
'@media print': {
|
|
59
|
+
// Prevent the app bar to be visible on each printed page.
|
|
60
|
+
position: 'absolute'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
props: {
|
|
65
|
+
position: 'absolute'
|
|
66
|
+
},
|
|
67
|
+
style: {
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
zIndex: (theme.vars || theme).zIndex.appBar,
|
|
70
|
+
top: 0,
|
|
71
|
+
left: 'auto',
|
|
72
|
+
right: 0
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
props: {
|
|
76
|
+
position: 'sticky'
|
|
77
|
+
},
|
|
78
|
+
style: {
|
|
79
|
+
// ⚠️ sticky is not supported by IE11.
|
|
80
|
+
position: 'sticky',
|
|
81
|
+
zIndex: (theme.vars || theme).zIndex.appBar,
|
|
82
|
+
top: 0,
|
|
83
|
+
left: 'auto',
|
|
84
|
+
right: 0
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
props: {
|
|
88
|
+
position: 'static'
|
|
89
|
+
},
|
|
90
|
+
style: {
|
|
91
|
+
position: 'static'
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
props: {
|
|
95
|
+
position: 'relative'
|
|
96
|
+
},
|
|
97
|
+
style: {
|
|
98
|
+
position: 'relative'
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
props: {
|
|
102
|
+
color: 'inherit'
|
|
103
|
+
},
|
|
104
|
+
style: {
|
|
105
|
+
'--AppBar-color': 'inherit'
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
props: {
|
|
109
|
+
color: 'default'
|
|
110
|
+
},
|
|
111
|
+
style: _extends({
|
|
112
|
+
'--AppBar-background': theme.vars ? theme.vars.palette.AppBar.defaultBg : theme.palette.grey[100],
|
|
113
|
+
'--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[100])
|
|
114
|
+
}, theme.applyStyles('dark', {
|
|
115
|
+
'--AppBar-background': theme.vars ? theme.vars.palette.AppBar.defaultBg : theme.palette.grey[900],
|
|
116
|
+
'--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[900])
|
|
117
|
+
}))
|
|
118
|
+
}].concat(_toConsumableArray(Object.keys(((_theme$vars = theme.vars) != null ? _theme$vars : theme).palette).filter(function (key) {
|
|
119
|
+
var _theme$vars2, _theme$vars3;
|
|
120
|
+
return ((_theme$vars2 = theme.vars) != null ? _theme$vars2 : theme).palette[key].main && ((_theme$vars3 = theme.vars) != null ? _theme$vars3 : theme).palette[key].contrastText;
|
|
121
|
+
}).map(function (color) {
|
|
122
|
+
var _theme$vars4, _theme$vars5;
|
|
123
|
+
return {
|
|
124
|
+
props: {
|
|
125
|
+
color: color
|
|
126
|
+
},
|
|
127
|
+
style: {
|
|
128
|
+
'--AppBar-background': ((_theme$vars4 = theme.vars) != null ? _theme$vars4 : theme).palette[color].main,
|
|
129
|
+
'--AppBar-color': ((_theme$vars5 = theme.vars) != null ? _theme$vars5 : theme).palette[color].contrastText
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
})), [{
|
|
133
|
+
props: {
|
|
134
|
+
enableColorOnDark: true
|
|
135
|
+
},
|
|
136
|
+
style: {
|
|
137
|
+
backgroundColor: 'var(--AppBar-background)',
|
|
138
|
+
color: 'var(--AppBar-color)'
|
|
139
|
+
}
|
|
140
|
+
}, {
|
|
141
|
+
props: {
|
|
142
|
+
enableColorOnDark: false
|
|
143
|
+
},
|
|
144
|
+
style: _extends({
|
|
145
|
+
backgroundColor: 'var(--AppBar-background)',
|
|
146
|
+
color: 'var(--AppBar-color)'
|
|
147
|
+
}, theme.applyStyles('dark', {
|
|
148
|
+
backgroundColor: theme.vars ? joinVars(theme.vars.palette.AppBar.darkBg, 'var(--AppBar-background)') : null,
|
|
149
|
+
color: theme.vars ? joinVars(theme.vars.palette.AppBar.darkColor, 'var(--AppBar-color)') : null
|
|
150
|
+
}))
|
|
151
|
+
}, {
|
|
152
|
+
props: {
|
|
153
|
+
color: 'transparent'
|
|
154
|
+
},
|
|
155
|
+
style: _extends({
|
|
156
|
+
'--AppBar-background': 'transparent',
|
|
157
|
+
'--AppBar-color': 'inherit',
|
|
158
|
+
backgroundColor: 'var(--AppBar-background)',
|
|
159
|
+
color: 'var(--AppBar-color)'
|
|
160
|
+
}, theme.applyStyles('dark', {
|
|
161
|
+
backgroundImage: 'none'
|
|
162
|
+
}))
|
|
163
|
+
}])
|
|
164
|
+
};
|
|
105
165
|
});
|
|
106
166
|
var AppBar = /*#__PURE__*/React.forwardRef(function AppBar(inProps, ref) {
|
|
107
167
|
var props = useThemeProps({
|
package/legacy/Badge/Badge.js
CHANGED
|
@@ -369,8 +369,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
|
|
|
369
369
|
/**
|
|
370
370
|
* The components used for each slot inside.
|
|
371
371
|
*
|
|
372
|
-
* This prop
|
|
373
|
-
* It's recommended to use the `slots` prop instead.
|
|
372
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
374
373
|
*
|
|
375
374
|
* @default {}
|
|
376
375
|
*/
|
|
@@ -382,8 +381,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
|
|
|
382
381
|
* The extra props for the slot components.
|
|
383
382
|
* You can override the existing props or add new ones.
|
|
384
383
|
*
|
|
385
|
-
* This prop
|
|
386
|
-
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
384
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
387
385
|
*
|
|
388
386
|
* @default {}
|
|
389
387
|
*/
|