@mui/codemod 6.0.0-alpha.7 → 6.0.0-alpha.9
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/README.md +227 -30
- package/node/deprecations/accordion-props/test-cases/actual.js +6 -3
- package/node/deprecations/accordion-props/test-cases/expected.js +14 -10
- package/node/deprecations/accordion-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/alert-props/test-cases/expected.js +12 -4
- package/node/deprecations/alert-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/all/deprecations-all.js +6 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +8 -6
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/avatar-group-props/avatar-group-props.js +87 -0
- package/node/deprecations/avatar-group-props/index.js +13 -0
- package/node/deprecations/avatar-group-props/test-cases/actual.js +56 -0
- package/node/deprecations/avatar-group-props/test-cases/expected.js +58 -0
- package/node/deprecations/avatar-group-props/test-cases/theme.actual.js +48 -0
- package/node/deprecations/avatar-group-props/test-cases/theme.expected.js +50 -0
- package/node/deprecations/avatar-props/test-cases/expected.js +8 -6
- package/node/deprecations/avatar-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/backdrop-props/test-cases/actual.js +3 -2
- package/node/deprecations/backdrop-props/test-cases/expected.js +3 -3
- package/node/deprecations/badge-props/test-cases/expected.js +12 -5
- package/node/deprecations/badge-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/form-control-label-props/test-cases/expected.js +4 -2
- package/node/deprecations/form-control-label-props/test-cases/theme.expected.js +4 -3
- package/node/deprecations/grid-props/grid-props.js +51 -0
- package/node/deprecations/grid-props/index.js +13 -0
- package/node/deprecations/grid-props/test-cases/actual.js +25 -0
- package/node/deprecations/grid-props/test-cases/expected.js +23 -0
- package/node/deprecations/grid-props/test-cases/theme.actual.js +24 -0
- package/node/deprecations/grid-props/test-cases/theme.expected.js +23 -0
- package/node/deprecations/list-item-props/index.js +13 -0
- package/node/deprecations/list-item-props/list-item-props.js +22 -0
- package/node/deprecations/list-item-props/test-cases/actual.js +43 -0
- package/node/deprecations/list-item-props/test-cases/expected.js +40 -0
- package/node/deprecations/list-item-props/test-cases/theme.actual.js +56 -0
- package/node/deprecations/list-item-props/test-cases/theme.expected.js +53 -0
- package/node/deprecations/popper-props/index.js +13 -0
- package/node/deprecations/popper-props/popper-props.js +22 -0
- package/node/deprecations/popper-props/test-cases/actual.js +27 -0
- package/node/deprecations/popper-props/test-cases/expected.js +24 -0
- package/node/deprecations/popper-props/test-cases/theme.actual.js +32 -0
- package/node/deprecations/popper-props/test-cases/theme.expected.js +29 -0
- package/node/deprecations/slider-props/test-cases/expected.js +12 -4
- package/node/deprecations/slider-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/speed-dial-props/test-cases/actual.js +3 -2
- package/node/deprecations/speed-dial-props/test-cases/expected.js +3 -3
- package/node/deprecations/step-label-props/test-cases/expected.js +8 -3
- package/node/deprecations/step-label-props/test-cases/theme.expected.js +8 -4
- package/node/deprecations/text-field-props/index.js +13 -0
- package/node/deprecations/text-field-props/test-cases/actual.js +27 -0
- package/node/deprecations/text-field-props/test-cases/expected.js +31 -0
- package/node/deprecations/text-field-props/test-cases/theme.actual.js +13 -0
- package/node/deprecations/text-field-props/test-cases/theme.expected.js +15 -0
- package/node/deprecations/text-field-props/text-field-props.js +48 -0
- package/node/deprecations/tooltip-props/index.js +13 -0
- package/node/deprecations/tooltip-props/test-cases/actual.js +92 -0
- package/node/deprecations/tooltip-props/test-cases/expected.js +84 -0
- package/node/deprecations/tooltip-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/tooltip-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/tooltip-props/tooltip-props.js +22 -0
- package/node/deprecations/utils/replaceComponentsWithSlots.js +29 -17
- package/node/util/migrateToVariants.js +198 -121
- package/node/v5.0.0/badge-overlap-value.test/actual.js +3 -4
- package/node/v5.0.0/badge-overlap-value.test/expected.js +3 -4
- package/node/v5.0.0/base-remove-component-prop.test/actual.js +4 -4
- package/node/v5.0.0/base-remove-component-prop.test/expected.js +4 -4
- package/node/v5.0.0/box-sx-prop.test/actual.js +4 -4
- package/node/v5.0.0/box-sx-prop.test/expected.js +3 -3
- package/node/v5.0.0/create-theme.test/custom-fn.actual.js +3 -4
- package/node/v5.0.0/create-theme.test/custom-fn.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/first.actual.js +11 -14
- package/node/v5.0.0/jss-to-styled.test/first.expected.js +11 -14
- package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +4 -4
- package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +4 -4
- package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +3 -4
- package/node/v5.0.0/jss-to-tss-react.test/actual-mixins-pattern.js +6 -5
- package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +6 -5
- package/node/v5.0.0/preset-safe.test/actual.js +6 -4
- package/node/v5.0.0/preset-safe.test/expected.js +9 -6
- package/node/v5.0.0/table-props.test/actual.js +4 -5
- package/node/v5.0.0/table-props.test/expected.js +4 -5
- package/node/v5.0.0/theme-spacing.test/large-actual.js +10 -10
- package/node/v5.0.0/theme-spacing.test/large-expected.js +10 -10
- package/node/v5.0.0/variant-prop.test/actual.js +12 -6
- package/node/v5.0.0/variant-prop.test/expected.js +15 -12
- package/node/v5.0.0/with-mobile-dialog.test/expected.js +6 -5
- package/node/v5.0.0/with-width.test/expected.js +6 -5
- package/node/v6.0.0/styled/test-cases/BasicStyled.actual.js +55 -44
- package/node/v6.0.0/styled/test-cases/BasicStyled.expected.js +5 -6
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.actual.js +80 -70
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +7 -6
- package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +32 -26
- package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +7 -6
- package/node/v6.0.0/styled/test-cases/ThemePaletteMode.expected.js +28 -26
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.actual.js +6 -5
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.expected.js +8 -8
- package/node/v6.0.0/sx-prop/index.js +13 -0
- package/node/v6.0.0/sx-prop/sx-v6.js +355 -0
- package/node/v6.0.0/sx-prop/test-cases/basic-sx.actual.js +36 -0
- package/node/v6.0.0/sx-prop/test-cases/basic-sx.expected.js +46 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.actual.js +41 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.expected.js +71 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.actual.js +87 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.expected.js +102 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.actual.js +49 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.expected.js +64 -0
- package/node/v6.0.0/system-props/index.js +13 -0
- package/node/v6.0.0/system-props/removeSystemProps.js +242 -0
- package/node/v6.0.0/system-props/test-cases/system-props.actual.js +79 -0
- package/node/v6.0.0/system-props/test-cases/system-props.expected.js +92 -0
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.actual.js +254 -225
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.expected.js +180 -162
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.actual.js +23 -21
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.expected.js +20 -19
- package/node/v6.0.0/theme-v6/theme-v6.js +2 -2
- package/package.json +4 -4
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _material = require("@mui/material");
|
|
5
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
6
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _Link;
|
|
9
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
10
|
+
typography: "body1"
|
|
11
|
+
});
|
|
12
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
13
|
+
color: "palette.main",
|
|
14
|
+
sx: {
|
|
15
|
+
display: 'block'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, {
|
|
19
|
+
container: true,
|
|
20
|
+
flexDirection: `column`
|
|
21
|
+
});
|
|
22
|
+
const sx = {
|
|
23
|
+
display: 'flex'
|
|
24
|
+
};
|
|
25
|
+
const ml = 2;
|
|
26
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
27
|
+
variant: "body1",
|
|
28
|
+
color: "primary.main",
|
|
29
|
+
ml: ml,
|
|
30
|
+
sx: sx
|
|
31
|
+
});
|
|
32
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
33
|
+
variant: "body1",
|
|
34
|
+
color: "divider",
|
|
35
|
+
ml: ml,
|
|
36
|
+
sx: sx
|
|
37
|
+
});
|
|
38
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
39
|
+
variant: "body1",
|
|
40
|
+
color: "inherit",
|
|
41
|
+
ml: ml,
|
|
42
|
+
sx: sx
|
|
43
|
+
});
|
|
44
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
45
|
+
fontSize: "xl4",
|
|
46
|
+
lineHeight: 1,
|
|
47
|
+
startDecorator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
48
|
+
fontSize: "lg",
|
|
49
|
+
textColor: "text.secondary",
|
|
50
|
+
children: "$"
|
|
51
|
+
}),
|
|
52
|
+
sx: {
|
|
53
|
+
alignItems: 'flex-start'
|
|
54
|
+
},
|
|
55
|
+
children: "25"
|
|
56
|
+
});
|
|
57
|
+
function Copyright(props) {
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
59
|
+
variant: "body2",
|
|
60
|
+
color: "text.secondary",
|
|
61
|
+
align: "center",
|
|
62
|
+
...props,
|
|
63
|
+
children: ['Copyright © ', _Link || (_Link = /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
64
|
+
color: "inherit",
|
|
65
|
+
href: "https://mui.com/",
|
|
66
|
+
children: "Your Website"
|
|
67
|
+
})), ' ', new Date().getFullYear(), '.']
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Stack.default, {
|
|
71
|
+
flex: "1",
|
|
72
|
+
sx: [...(Array.isArray(sx) ? sx : [sx])]
|
|
73
|
+
});
|
|
74
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
75
|
+
typography: "body1",
|
|
76
|
+
sx: foo.bar ? {
|
|
77
|
+
opacity: 0
|
|
78
|
+
} : sx
|
|
79
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _material = require("@mui/material");
|
|
5
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
6
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _Link;
|
|
9
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
10
|
+
sx: {
|
|
11
|
+
typography: "body1"
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
15
|
+
sx: {
|
|
16
|
+
color: "palette.main",
|
|
17
|
+
display: 'block'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, {
|
|
21
|
+
container: true,
|
|
22
|
+
sx: {
|
|
23
|
+
flexDirection: `column`
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const sx = {
|
|
27
|
+
display: 'flex'
|
|
28
|
+
};
|
|
29
|
+
const ml = 2;
|
|
30
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
31
|
+
variant: "body1",
|
|
32
|
+
sx: [{
|
|
33
|
+
color: "primary.main",
|
|
34
|
+
ml: ml
|
|
35
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
36
|
+
});
|
|
37
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
38
|
+
variant: "body1",
|
|
39
|
+
sx: [{
|
|
40
|
+
color: "divider",
|
|
41
|
+
ml: ml
|
|
42
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
43
|
+
});
|
|
44
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
45
|
+
variant: "body1",
|
|
46
|
+
color: "inherit",
|
|
47
|
+
sx: [{
|
|
48
|
+
ml: ml
|
|
49
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
50
|
+
});
|
|
51
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
52
|
+
startDecorator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
53
|
+
textColor: "text.secondary",
|
|
54
|
+
sx: {
|
|
55
|
+
fontSize: "lg"
|
|
56
|
+
},
|
|
57
|
+
children: "$"
|
|
58
|
+
}),
|
|
59
|
+
sx: {
|
|
60
|
+
fontSize: "xl4",
|
|
61
|
+
lineHeight: 1,
|
|
62
|
+
alignItems: 'flex-start'
|
|
63
|
+
},
|
|
64
|
+
children: "25"
|
|
65
|
+
});
|
|
66
|
+
function Copyright(props) {
|
|
67
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
68
|
+
variant: "body2",
|
|
69
|
+
align: "center",
|
|
70
|
+
...props,
|
|
71
|
+
sx: [{
|
|
72
|
+
color: "text.secondary"
|
|
73
|
+
}, ...(Array.isArray(props.sx) ? props.sx : [props.sx])],
|
|
74
|
+
children: ['Copyright © ', _Link || (_Link = /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
75
|
+
color: "inherit",
|
|
76
|
+
href: "https://mui.com/",
|
|
77
|
+
children: "Your Website"
|
|
78
|
+
})), ' ', new Date().getFullYear(), '.']
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Stack.default, {
|
|
82
|
+
sx: [{
|
|
83
|
+
flex: "1"
|
|
84
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
85
|
+
});
|
|
86
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
87
|
+
sx: [{
|
|
88
|
+
typography: "body1"
|
|
89
|
+
}, foo.bar ? {
|
|
90
|
+
opacity: 0
|
|
91
|
+
} : sx]
|
|
92
|
+
});
|