@mui/codemod 9.0.0-alpha.4 → 9.0.0-beta.0
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/CHANGELOG.md +71 -4
- package/README.md +252 -0
- package/deprecations/all/deprecations-all.js +6 -0
- package/deprecations/checkbox-props/checkbox-props.js +33 -0
- package/deprecations/checkbox-props/index.js +13 -0
- package/deprecations/checkbox-props/test-cases/actual.js +45 -0
- package/deprecations/checkbox-props/test-cases/expected.js +61 -0
- package/deprecations/checkbox-props/test-cases/package.actual.js +34 -0
- package/deprecations/checkbox-props/test-cases/package.expected.js +50 -0
- package/deprecations/checkbox-props/test-cases/theme.actual.js +28 -0
- package/deprecations/checkbox-props/test-cases/theme.expected.js +36 -0
- package/deprecations/dialog-props/dialog-props.js +14 -0
- package/deprecations/dialog-props/test-cases/actual.js +4 -0
- package/deprecations/dialog-props/test-cases/expected.js +4 -0
- package/deprecations/drawer-props/drawer-props.js +14 -0
- package/deprecations/drawer-props/test-cases/actual.js +10 -2
- package/deprecations/drawer-props/test-cases/expected.js +14 -2
- package/deprecations/radio-props/index.js +13 -0
- package/deprecations/radio-props/radio-props.js +33 -0
- package/deprecations/radio-props/test-cases/actual.js +45 -0
- package/deprecations/radio-props/test-cases/expected.js +61 -0
- package/deprecations/radio-props/test-cases/package.actual.js +34 -0
- package/deprecations/radio-props/test-cases/package.expected.js +50 -0
- package/deprecations/radio-props/test-cases/theme.actual.js +28 -0
- package/deprecations/radio-props/test-cases/theme.expected.js +36 -0
- package/deprecations/switch-props/index.js +13 -0
- package/deprecations/switch-props/switch-props.js +33 -0
- package/deprecations/switch-props/test-cases/actual.js +45 -0
- package/deprecations/switch-props/test-cases/expected.js +61 -0
- package/deprecations/switch-props/test-cases/package.actual.js +34 -0
- package/deprecations/switch-props/test-cases/package.expected.js +50 -0
- package/deprecations/switch-props/test-cases/theme.actual.js +28 -0
- package/deprecations/switch-props/test-cases/theme.expected.js +36 -0
- package/package.json +2 -2
- package/v9.0.0/system-props/index.js +13 -0
- package/v9.0.0/system-props/removeSystemProps.js +243 -0
- package/v9.0.0/system-props/test-cases/system-props.actual.js +144 -0
- package/v9.0.0/system-props/test-cases/system-props.expected.js +175 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _material = require("@mui/material");
|
|
5
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
6
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
7
|
+
var _Link2 = _interopRequireDefault(require("@mui/material/Link"));
|
|
8
|
+
var _DialogContentText = _interopRequireDefault(require("@mui/material/DialogContentText"));
|
|
9
|
+
var _TimelineContent = _interopRequireDefault(require("@mui/lab/TimelineContent"));
|
|
10
|
+
var _TimelineOppositeContent = _interopRequireDefault(require("@mui/lab/TimelineOppositeContent"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
var _Link;
|
|
13
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
14
|
+
sx: {
|
|
15
|
+
typography: "body1"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
19
|
+
sx: {
|
|
20
|
+
color: "palette.main",
|
|
21
|
+
display: 'block'
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, {
|
|
25
|
+
container: true,
|
|
26
|
+
sx: {
|
|
27
|
+
flexDirection: `column`
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid2, {
|
|
31
|
+
container: true,
|
|
32
|
+
sx: {
|
|
33
|
+
flexDirection: `column`
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const sx = {
|
|
37
|
+
display: 'flex'
|
|
38
|
+
};
|
|
39
|
+
const ml = 2;
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
41
|
+
sx: {
|
|
42
|
+
color: "#fff",
|
|
43
|
+
mb: 5
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
47
|
+
sx: {
|
|
48
|
+
color: "hsl(200 30% 30%)",
|
|
49
|
+
mb: 5
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
53
|
+
variant: "body1",
|
|
54
|
+
sx: [{
|
|
55
|
+
color: "primary.main",
|
|
56
|
+
ml: ml
|
|
57
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
58
|
+
});
|
|
59
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
60
|
+
variant: "body1",
|
|
61
|
+
sx: [{
|
|
62
|
+
color: "divider",
|
|
63
|
+
ml: ml
|
|
64
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
65
|
+
});
|
|
66
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
67
|
+
variant: "body1",
|
|
68
|
+
sx: [{
|
|
69
|
+
color: "inherit",
|
|
70
|
+
ml: ml
|
|
71
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
72
|
+
});
|
|
73
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
74
|
+
startDecorator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
75
|
+
textColor: "text.secondary",
|
|
76
|
+
sx: {
|
|
77
|
+
fontSize: "lg"
|
|
78
|
+
},
|
|
79
|
+
children: "$"
|
|
80
|
+
}),
|
|
81
|
+
sx: {
|
|
82
|
+
fontSize: "xl4",
|
|
83
|
+
lineHeight: 1,
|
|
84
|
+
alignItems: 'flex-start'
|
|
85
|
+
},
|
|
86
|
+
children: "25"
|
|
87
|
+
});
|
|
88
|
+
function Copyright(props) {
|
|
89
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
90
|
+
variant: "body2",
|
|
91
|
+
align: "center",
|
|
92
|
+
...props,
|
|
93
|
+
sx: [{
|
|
94
|
+
color: "text.secondary"
|
|
95
|
+
}, ...(Array.isArray(props.sx) ? props.sx : [props.sx])],
|
|
96
|
+
children: ['Copyright © ', _Link || (_Link = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link2.default, {
|
|
97
|
+
color: "inherit",
|
|
98
|
+
href: "https://mui.com/",
|
|
99
|
+
children: "Your Website"
|
|
100
|
+
})), ' ', new Date().getFullYear(), '.']
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Stack.default, {
|
|
104
|
+
sx: [{
|
|
105
|
+
flex: "1"
|
|
106
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
107
|
+
});
|
|
108
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
109
|
+
sx: [{
|
|
110
|
+
typography: "body1"
|
|
111
|
+
}, foo.bar ? {
|
|
112
|
+
opacity: 0
|
|
113
|
+
} : sx]
|
|
114
|
+
});
|
|
115
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Link2.default, {
|
|
116
|
+
color: "inherit",
|
|
117
|
+
href: "https://mui.com/",
|
|
118
|
+
children: "Sitemark"
|
|
119
|
+
});
|
|
120
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Link2.default, {
|
|
121
|
+
variant: "body2",
|
|
122
|
+
href: "#",
|
|
123
|
+
sx: {
|
|
124
|
+
color: "text.secondary"
|
|
125
|
+
},
|
|
126
|
+
children: "Features"
|
|
127
|
+
});
|
|
128
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Link2.default, {
|
|
129
|
+
color: "primary",
|
|
130
|
+
href: "#",
|
|
131
|
+
children: "Primary Link"
|
|
132
|
+
});
|
|
133
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogContentText.default, {
|
|
134
|
+
sx: {
|
|
135
|
+
color: "text.secondary"
|
|
136
|
+
},
|
|
137
|
+
children: "Some content"
|
|
138
|
+
});
|
|
139
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogContentText.default, {
|
|
140
|
+
sx: {
|
|
141
|
+
color: "inherit",
|
|
142
|
+
mt: 2
|
|
143
|
+
},
|
|
144
|
+
children: "Inherited"
|
|
145
|
+
});
|
|
146
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_DialogContentText.default, {
|
|
147
|
+
color: "primary",
|
|
148
|
+
children: "Primary"
|
|
149
|
+
});
|
|
150
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_TimelineOppositeContent.default, {
|
|
151
|
+
sx: {
|
|
152
|
+
color: "text.secondary"
|
|
153
|
+
},
|
|
154
|
+
children: "09:30 am"
|
|
155
|
+
});
|
|
156
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_TimelineContent.default, {
|
|
157
|
+
sx: {
|
|
158
|
+
color: "inherit"
|
|
159
|
+
},
|
|
160
|
+
children: "Eat"
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// Dynamic color values (expression, not string literal)
|
|
164
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
165
|
+
color: dynamicColor,
|
|
166
|
+
sx: {
|
|
167
|
+
mb: 2
|
|
168
|
+
},
|
|
169
|
+
children: "Dynamic"
|
|
170
|
+
});
|
|
171
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Link2.default, {
|
|
172
|
+
color: linkColor,
|
|
173
|
+
href: "#",
|
|
174
|
+
children: "Dynamic Link"
|
|
175
|
+
});
|