@mui/codemod 6.0.0-alpha.9 → 6.0.0-beta.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/README.md +423 -168
- package/codemod.js +0 -2
- package/node/deprecations/all/deprecations-all.js +34 -26
- package/node/deprecations/all/postcss.config.js +7 -1
- package/node/deprecations/autocomplete-props/autocomplete-props.js +0 -32
- package/node/deprecations/autocomplete-props/test-cases/actual.js +13 -35
- package/node/deprecations/autocomplete-props/test-cases/expected.js +13 -41
- package/node/deprecations/autocomplete-props/test-cases/theme.actual.js +0 -18
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +0 -22
- package/node/deprecations/backdrop-props/backdrop-props.js +3 -5
- package/node/deprecations/backdrop-props/test-cases/actual.js +30 -14
- package/node/deprecations/backdrop-props/test-cases/expected.js +23 -13
- package/node/deprecations/backdrop-props/test-cases/theme.actual.js +32 -6
- package/node/deprecations/backdrop-props/test-cases/theme.expected.js +27 -5
- package/node/deprecations/filled-input-props/filled-input-props.js +22 -0
- package/node/deprecations/filled-input-props/index.js +13 -0
- package/node/deprecations/filled-input-props/test-cases/actual.js +60 -0
- package/node/deprecations/filled-input-props/test-cases/expected.js +52 -0
- package/node/deprecations/filled-input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/filled-input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/input-base-props/index.js +13 -0
- package/node/deprecations/input-base-props/input-base-props.js +22 -0
- package/node/deprecations/input-base-props/test-cases/actual.js +60 -0
- package/node/deprecations/input-base-props/test-cases/expected.js +52 -0
- package/node/deprecations/input-base-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/input-base-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/input-props/index.js +13 -0
- package/node/deprecations/input-props/input-props.js +22 -0
- package/node/deprecations/input-props/test-cases/actual.js +60 -0
- package/node/deprecations/input-props/test-cases/expected.js +52 -0
- package/node/deprecations/input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/modal-props/index.js +13 -0
- package/node/deprecations/modal-props/modal-props.js +22 -0
- package/node/deprecations/modal-props/test-cases/actual.js +43 -0
- package/node/deprecations/modal-props/test-cases/expected.js +40 -0
- package/node/deprecations/modal-props/test-cases/theme.actual.js +56 -0
- package/node/deprecations/modal-props/test-cases/theme.expected.js +53 -0
- package/node/deprecations/outlined-input-props/index.js +13 -0
- package/node/deprecations/outlined-input-props/outlined-input-props.js +22 -0
- package/node/deprecations/outlined-input-props/test-cases/actual.js +60 -0
- package/node/deprecations/outlined-input-props/test-cases/expected.js +52 -0
- package/node/deprecations/outlined-input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/outlined-input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/step-label-props/step-label-props.js +0 -14
- package/node/deprecations/step-label-props/test-cases/actual.js +0 -23
- package/node/deprecations/step-label-props/test-cases/expected.js +0 -27
- package/node/deprecations/step-label-props/test-cases/theme.actual.js +0 -22
- package/node/deprecations/step-label-props/test-cases/theme.expected.js +0 -28
- package/node/deprecations/tab-classes/index.js +13 -0
- package/node/deprecations/tab-classes/postcss-plugin.js +30 -0
- package/node/deprecations/tab-classes/postcss.config.js +8 -0
- package/node/deprecations/tab-classes/tab-classes.js +53 -0
- package/node/deprecations/tab-classes/test-cases/actual.js +5 -0
- package/node/deprecations/tab-classes/test-cases/expected.js +5 -0
- package/node/deprecations/table-sort-label-classes/index.js +13 -0
- package/node/deprecations/table-sort-label-classes/postcss-plugin.js +33 -0
- package/node/deprecations/table-sort-label-classes/postcss.config.js +8 -0
- package/node/deprecations/table-sort-label-classes/table-sort-label-classes.js +77 -0
- package/node/deprecations/table-sort-label-classes/test-cases/actual.js +7 -0
- package/node/deprecations/table-sort-label-classes/test-cases/expected.js +7 -0
- package/node/util/migrateToVariants.js +91 -43
- package/node/v5.0.0/theme-spacing.test/large-actual.js +1 -1
- package/node/v5.0.0/theme-spacing.test/large-expected.js +1 -1
- package/node/v6.0.0/grid-v2-props/grid-v2-props.js +149 -0
- package/node/v6.0.0/grid-v2-props/index.js +13 -0
- package/node/v6.0.0/grid-v2-props/test-cases/actual.js +85 -0
- package/node/v6.0.0/grid-v2-props/test-cases/custom-breakpoints.actual.js +18 -0
- package/node/v6.0.0/grid-v2-props/test-cases/custom-breakpoints.expected.js +22 -0
- package/node/v6.0.0/grid-v2-props/test-cases/expected.js +97 -0
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +9 -22
- package/node/v6.0.0/styled/test-cases/DynamicPropsStyled.actual.js +39 -0
- package/node/v6.0.0/styled/test-cases/DynamicPropsStyled.expected.js +65 -0
- package/node/v6.0.0/styled/test-cases/LogicalStyled.actual.js +31 -1
- package/node/v6.0.0/styled/test-cases/LogicalStyled.expected.js +39 -1
- package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +11 -13
- package/node/v6.0.0/sx-prop/sx-v6.js +111 -39
- package/node/v6.0.0/sx-prop/test-cases/sx-applyStyles.actual.js +89 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-applyStyles.expected.js +82 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-condition.actual.js +93 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-condition.expected.js +90 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.actual.js +14 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.expected.js +33 -16
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.actual.js +21 -1
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.expected.js +19 -1
- package/node/v6.0.0/sx-prop/test-cases/sx-line-break.actual.js +69 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-line-break.expected.js +69 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-value-callback.actual.js +102 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-value-callback.expected.js +111 -0
- package/package.json +7 -7
|
@@ -3,54 +3,54 @@
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
5
5
|
sx: theme => ({
|
|
6
|
-
backgroundImage: "var(--items-
|
|
6
|
+
backgroundImage: "var(--imageDark-items-selectedItemIndex)",
|
|
7
7
|
...theme.applyStyles("light", {
|
|
8
|
-
backgroundImage: "var(--items-
|
|
8
|
+
backgroundImage: "var(--imageLight-items-selectedItemIndex)"
|
|
9
9
|
})
|
|
10
10
|
}),
|
|
11
11
|
style: {
|
|
12
|
-
"--items-
|
|
13
|
-
"--items-
|
|
12
|
+
"--imageLight-items-selectedItemIndex": items[selectedItemIndex].imageLight,
|
|
13
|
+
"--imageDark-items-selectedItemIndex": items[selectedItemIndex].imageDark
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
17
17
|
style: {
|
|
18
|
-
"--items-
|
|
19
|
-
"--items-
|
|
18
|
+
"--imageLight-items-selectedItemIndex": items[selectedItemIndex].imageLight,
|
|
19
|
+
"--imageDark-items-selectedItemIndex": items[selectedItemIndex].imageDark,
|
|
20
20
|
...props.style
|
|
21
21
|
},
|
|
22
22
|
sx: theme => ({
|
|
23
|
-
backgroundImage: "var(--items-
|
|
23
|
+
backgroundImage: "var(--imageDark-items-selectedItemIndex)",
|
|
24
24
|
...theme.applyStyles("light", {
|
|
25
|
-
backgroundImage: "var(--items-
|
|
25
|
+
backgroundImage: "var(--imageLight-items-selectedItemIndex)"
|
|
26
26
|
})
|
|
27
27
|
})
|
|
28
28
|
});
|
|
29
29
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
30
30
|
style: {
|
|
31
|
-
"--items-
|
|
32
|
-
"--items-
|
|
31
|
+
"--imageLight-items-selectedItemIndex": items[selectedItemIndex].imageLight,
|
|
32
|
+
"--imageDark-items-selectedItemIndex": items[selectedItemIndex].imageDark,
|
|
33
33
|
color: 'red',
|
|
34
34
|
...props.style
|
|
35
35
|
},
|
|
36
36
|
sx: theme => ({
|
|
37
|
-
backgroundImage: "var(--items-
|
|
37
|
+
backgroundImage: "var(--imageDark-items-selectedItemIndex)",
|
|
38
38
|
...theme.applyStyles("light", {
|
|
39
|
-
backgroundImage: "var(--items-
|
|
39
|
+
backgroundImage: "var(--imageLight-items-selectedItemIndex)"
|
|
40
40
|
})
|
|
41
41
|
})
|
|
42
42
|
});
|
|
43
43
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
44
44
|
...props,
|
|
45
45
|
sx: theme => ({
|
|
46
|
-
backgroundImage: "var(--items-
|
|
46
|
+
backgroundImage: "var(--imageDark-items-selectedItemIndex)",
|
|
47
47
|
...theme.applyStyles("light", {
|
|
48
|
-
backgroundImage: "var(--items-
|
|
48
|
+
backgroundImage: "var(--imageLight-items-selectedItemIndex)"
|
|
49
49
|
})
|
|
50
50
|
}),
|
|
51
51
|
style: {
|
|
52
|
-
"--items-
|
|
53
|
-
"--items-
|
|
52
|
+
"--imageLight-items-selectedItemIndex": items[selectedItemIndex].imageLight,
|
|
53
|
+
"--imageDark-items-selectedItemIndex": items[selectedItemIndex].imageDark,
|
|
54
54
|
...props.style
|
|
55
55
|
}
|
|
56
56
|
});
|
|
@@ -68,4 +68,21 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
68
68
|
style: {
|
|
69
69
|
"--post-image": post.image
|
|
70
70
|
}
|
|
71
|
+
});
|
|
72
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Chip, {
|
|
73
|
+
size: "sm",
|
|
74
|
+
variant: "outlined",
|
|
75
|
+
color: colors[data.role],
|
|
76
|
+
sx: {
|
|
77
|
+
ml: 'auto',
|
|
78
|
+
borderRadius: '2px',
|
|
79
|
+
minHeight: '20px',
|
|
80
|
+
paddingInline: '4px',
|
|
81
|
+
fontSize: 'xs',
|
|
82
|
+
bgcolor: `${"var(--colors-data-role)"}.softBg`
|
|
83
|
+
},
|
|
84
|
+
style: {
|
|
85
|
+
"--colors-data-role": colors[data.role]
|
|
86
|
+
},
|
|
87
|
+
children: data.role
|
|
71
88
|
});
|
|
@@ -84,4 +84,24 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
84
84
|
display: 'none'
|
|
85
85
|
})
|
|
86
86
|
}]
|
|
87
|
-
});
|
|
87
|
+
});
|
|
88
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Step, {
|
|
89
|
+
indicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepIndicator, {
|
|
90
|
+
variant: activeStep <= index ? 'soft' : 'solid',
|
|
91
|
+
color: activeStep < index ? 'neutral' : 'primary',
|
|
92
|
+
children: activeStep <= index ? index + 1 : /*#__PURE__*/(0, _jsxRuntime.jsx)(Check, {})
|
|
93
|
+
}),
|
|
94
|
+
sx: {
|
|
95
|
+
'&:not([data-active])': {
|
|
96
|
+
'&::after': {
|
|
97
|
+
...(activeStep > index && index !== 2 && {
|
|
98
|
+
bgcolor: 'primary.solidBg'
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepButton, {
|
|
104
|
+
onClick: () => setActiveStep(index),
|
|
105
|
+
children: step
|
|
106
|
+
})
|
|
107
|
+
}, step);
|
|
@@ -99,4 +99,22 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
99
99
|
}, open && {
|
|
100
100
|
display: 'none'
|
|
101
101
|
}]
|
|
102
|
-
});
|
|
102
|
+
});
|
|
103
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Step, {
|
|
104
|
+
indicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepIndicator, {
|
|
105
|
+
variant: activeStep <= index ? 'soft' : 'solid',
|
|
106
|
+
color: activeStep < index ? 'neutral' : 'primary',
|
|
107
|
+
children: activeStep <= index ? index + 1 : /*#__PURE__*/(0, _jsxRuntime.jsx)(Check, {})
|
|
108
|
+
}),
|
|
109
|
+
sx: [activeStep > index && index !== 2 && {
|
|
110
|
+
'&:not([data-active])': {
|
|
111
|
+
'&::after': {
|
|
112
|
+
bgcolor: 'primary.solidBg'
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}],
|
|
116
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StepButton, {
|
|
117
|
+
onClick: () => setActiveStep(index),
|
|
118
|
+
children: step
|
|
119
|
+
})
|
|
120
|
+
}, step);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = EnableColorOnDarkAppBar;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _AppBar = _interopRequireDefault(require("@mui/material/AppBar"));
|
|
10
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
11
|
+
var _Toolbar = _interopRequireDefault(require("@mui/material/Toolbar"));
|
|
12
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
13
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
14
|
+
var _Menu = _interopRequireDefault(require("@mui/icons-material/Menu"));
|
|
15
|
+
var _styles = require("@mui/material/styles");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
var _MenuIcon;
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
function appBarLabel(label) {
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Toolbar.default, {
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
23
|
+
edge: "start",
|
|
24
|
+
color: "inherit",
|
|
25
|
+
"aria-label": "menu",
|
|
26
|
+
sx: {
|
|
27
|
+
mr: 2
|
|
28
|
+
},
|
|
29
|
+
children: _MenuIcon || (_MenuIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, {}))
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
31
|
+
variant: "h6",
|
|
32
|
+
noWrap: true,
|
|
33
|
+
component: "div",
|
|
34
|
+
sx: {
|
|
35
|
+
flexGrow: 1
|
|
36
|
+
},
|
|
37
|
+
children: label
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const darkTheme = (0, _styles.createTheme)({
|
|
42
|
+
palette: {
|
|
43
|
+
mode: 'dark',
|
|
44
|
+
primary: {
|
|
45
|
+
main: '#1976d2'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
function EnableColorOnDarkAppBar() {
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Stack.default, {
|
|
51
|
+
spacing: 2,
|
|
52
|
+
sx: {
|
|
53
|
+
flexGrow: 1
|
|
54
|
+
},
|
|
55
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ThemeProvider, {
|
|
56
|
+
theme: darkTheme,
|
|
57
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppBar.default, {
|
|
58
|
+
position: "static",
|
|
59
|
+
color: "primary",
|
|
60
|
+
enableColorOnDark: true,
|
|
61
|
+
children: appBarLabel('enableColorOnDark')
|
|
62
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppBar.default, {
|
|
63
|
+
position: "static",
|
|
64
|
+
color: "primary",
|
|
65
|
+
children: appBarLabel('default')
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = EnableColorOnDarkAppBar;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _AppBar = _interopRequireDefault(require("@mui/material/AppBar"));
|
|
10
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
11
|
+
var _Toolbar = _interopRequireDefault(require("@mui/material/Toolbar"));
|
|
12
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
13
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
14
|
+
var _Menu = _interopRequireDefault(require("@mui/icons-material/Menu"));
|
|
15
|
+
var _styles = require("@mui/material/styles");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
var _MenuIcon;
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
function appBarLabel(label) {
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Toolbar.default, {
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
23
|
+
edge: "start",
|
|
24
|
+
color: "inherit",
|
|
25
|
+
"aria-label": "menu",
|
|
26
|
+
sx: {
|
|
27
|
+
mr: 2
|
|
28
|
+
},
|
|
29
|
+
children: _MenuIcon || (_MenuIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.default, {}))
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
31
|
+
variant: "h6",
|
|
32
|
+
noWrap: true,
|
|
33
|
+
component: "div",
|
|
34
|
+
sx: {
|
|
35
|
+
flexGrow: 1
|
|
36
|
+
},
|
|
37
|
+
children: label
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const darkTheme = (0, _styles.createTheme)({
|
|
42
|
+
palette: {
|
|
43
|
+
mode: 'dark',
|
|
44
|
+
primary: {
|
|
45
|
+
main: '#1976d2'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
function EnableColorOnDarkAppBar() {
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Stack.default, {
|
|
51
|
+
spacing: 2,
|
|
52
|
+
sx: {
|
|
53
|
+
flexGrow: 1
|
|
54
|
+
},
|
|
55
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ThemeProvider, {
|
|
56
|
+
theme: darkTheme,
|
|
57
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppBar.default, {
|
|
58
|
+
position: "static",
|
|
59
|
+
color: "primary",
|
|
60
|
+
enableColorOnDark: true,
|
|
61
|
+
children: appBarLabel('enableColorOnDark')
|
|
62
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppBar.default, {
|
|
63
|
+
position: "static",
|
|
64
|
+
color: "primary",
|
|
65
|
+
children: appBarLabel('default')
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
function FacebookCircularProgress(props) {
|
|
5
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Box, {
|
|
6
|
+
sx: {
|
|
7
|
+
position: 'relative'
|
|
8
|
+
},
|
|
9
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
|
|
10
|
+
variant: "determinate",
|
|
11
|
+
sx: {
|
|
12
|
+
color: theme => theme.palette.grey[theme.palette.mode === 'light' ? 200 : 800]
|
|
13
|
+
},
|
|
14
|
+
size: 40,
|
|
15
|
+
thickness: 4,
|
|
16
|
+
...props,
|
|
17
|
+
value: 100
|
|
18
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
|
|
19
|
+
variant: "indeterminate",
|
|
20
|
+
disableShrink: true,
|
|
21
|
+
sx: {
|
|
22
|
+
color: theme => theme.palette.mode === 'light' ? '#1a90ff' : '#308fe8',
|
|
23
|
+
animationDuration: '550ms',
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
left: 0,
|
|
26
|
+
[`& .${circularProgressClasses.circle}`]: {
|
|
27
|
+
strokeLinecap: 'round'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
size: 40,
|
|
31
|
+
thickness: 4,
|
|
32
|
+
...props
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Paper, {
|
|
37
|
+
elevation: 0,
|
|
38
|
+
sx: {
|
|
39
|
+
display: 'flex',
|
|
40
|
+
border: theme => `1px solid ${theme.palette.divider}`,
|
|
41
|
+
flexWrap: 'wrap'
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Divider, {
|
|
45
|
+
sx: {
|
|
46
|
+
border: theme => `1px solid ${theme.palette.mode === 'dark' ? '#fff' : '#000'}`
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)(Typography, {
|
|
50
|
+
component: "span",
|
|
51
|
+
variant: "subtitle1",
|
|
52
|
+
color: "inherit",
|
|
53
|
+
sx: {
|
|
54
|
+
position: 'relative',
|
|
55
|
+
p: 4,
|
|
56
|
+
pt: 2,
|
|
57
|
+
pb: theme => `calc(${theme.spacing(1)} + 6px)`
|
|
58
|
+
},
|
|
59
|
+
children: [image.title, /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageMarked, {
|
|
60
|
+
className: "MuiImageMarked-root"
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Autocomplete, {
|
|
64
|
+
sx: {
|
|
65
|
+
display: 'inline-block',
|
|
66
|
+
'& input': {
|
|
67
|
+
width: 200,
|
|
68
|
+
bgcolor: 'background.paper',
|
|
69
|
+
color: theme => theme.palette.getContrastText(theme.palette.background.paper)
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
id: "custom-input-demo",
|
|
73
|
+
options: options,
|
|
74
|
+
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
75
|
+
ref: params.InputProps.ref,
|
|
76
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
77
|
+
type: "text",
|
|
78
|
+
...params.inputProps
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
83
|
+
sx: {
|
|
84
|
+
position: 'relative',
|
|
85
|
+
width: 400,
|
|
86
|
+
bgcolor: 'background.paper',
|
|
87
|
+
border: '2px solid #000',
|
|
88
|
+
boxShadow: theme => theme.shadows[5],
|
|
89
|
+
p: 4
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Backdrop, {
|
|
93
|
+
sx: {
|
|
94
|
+
color: '#fff',
|
|
95
|
+
zIndex: theme => theme.zIndex.drawer + 1
|
|
96
|
+
},
|
|
97
|
+
open: open,
|
|
98
|
+
onClick: handleClose,
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
|
|
100
|
+
color: "inherit"
|
|
101
|
+
})
|
|
102
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
function FacebookCircularProgress(props) {
|
|
5
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Box, {
|
|
6
|
+
sx: {
|
|
7
|
+
position: 'relative'
|
|
8
|
+
},
|
|
9
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
|
|
10
|
+
variant: "determinate",
|
|
11
|
+
sx: theme => ({
|
|
12
|
+
color: theme.palette.grey[800],
|
|
13
|
+
...theme.applyStyles("light", {
|
|
14
|
+
color: theme.palette.grey[200]
|
|
15
|
+
})
|
|
16
|
+
}),
|
|
17
|
+
size: 40,
|
|
18
|
+
thickness: 4,
|
|
19
|
+
...props,
|
|
20
|
+
value: 100
|
|
21
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
|
|
22
|
+
variant: "indeterminate",
|
|
23
|
+
disableShrink: true,
|
|
24
|
+
sx: theme => ({
|
|
25
|
+
color: '#308fe8',
|
|
26
|
+
animationDuration: '550ms',
|
|
27
|
+
position: 'absolute',
|
|
28
|
+
left: 0,
|
|
29
|
+
[`& .${circularProgressClasses.circle}`]: {
|
|
30
|
+
strokeLinecap: 'round'
|
|
31
|
+
},
|
|
32
|
+
...theme.applyStyles("light", {
|
|
33
|
+
color: '#1a90ff'
|
|
34
|
+
})
|
|
35
|
+
}),
|
|
36
|
+
size: 40,
|
|
37
|
+
thickness: 4,
|
|
38
|
+
...props
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Paper, {
|
|
43
|
+
elevation: 0,
|
|
44
|
+
sx: theme => ({
|
|
45
|
+
display: 'flex',
|
|
46
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
47
|
+
flexWrap: 'wrap'
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Divider, {
|
|
51
|
+
sx: theme => ({
|
|
52
|
+
border: `1px solid ${'#000'}`,
|
|
53
|
+
...theme.applyStyles("dark", {
|
|
54
|
+
border: `1px solid ${'#fff'}`
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)(Typography, {
|
|
59
|
+
component: "span",
|
|
60
|
+
variant: "subtitle1",
|
|
61
|
+
color: "inherit",
|
|
62
|
+
sx: theme => ({
|
|
63
|
+
position: 'relative',
|
|
64
|
+
p: 4,
|
|
65
|
+
pt: 2,
|
|
66
|
+
pb: `calc(${theme.spacing(1)} + 6px)`
|
|
67
|
+
}),
|
|
68
|
+
children: [image.title, /*#__PURE__*/(0, _jsxRuntime.jsx)(ImageMarked, {
|
|
69
|
+
className: "MuiImageMarked-root"
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Autocomplete, {
|
|
73
|
+
sx: theme => ({
|
|
74
|
+
display: 'inline-block',
|
|
75
|
+
'& input': {
|
|
76
|
+
width: 200,
|
|
77
|
+
bgcolor: 'background.paper',
|
|
78
|
+
color: theme.palette.getContrastText(theme.palette.background.paper)
|
|
79
|
+
}
|
|
80
|
+
}),
|
|
81
|
+
id: "custom-input-demo",
|
|
82
|
+
options: options,
|
|
83
|
+
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
|
+
ref: params.InputProps.ref,
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
86
|
+
type: "text",
|
|
87
|
+
...params.inputProps
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
92
|
+
sx: theme => ({
|
|
93
|
+
position: 'relative',
|
|
94
|
+
width: 400,
|
|
95
|
+
bgcolor: 'background.paper',
|
|
96
|
+
border: '2px solid #000',
|
|
97
|
+
boxShadow: theme.shadows[5],
|
|
98
|
+
p: 4
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Backdrop, {
|
|
102
|
+
sx: theme => ({
|
|
103
|
+
color: '#fff',
|
|
104
|
+
zIndex: theme.zIndex.drawer + 1
|
|
105
|
+
}),
|
|
106
|
+
open: open,
|
|
107
|
+
onClick: handleClose,
|
|
108
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
|
|
109
|
+
color: "inherit"
|
|
110
|
+
})
|
|
111
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/codemod",
|
|
3
|
-
"version": "6.0.0-
|
|
3
|
+
"version": "6.0.0-beta.1",
|
|
4
4
|
"bin": "./codemod.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "MUI Team",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"url": "https://opencollective.com/mui-org"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@babel/core": "^7.24.
|
|
28
|
-
"@babel/runtime": "^7.24.
|
|
29
|
-
"@babel/traverse": "^7.24.
|
|
30
|
-
"jscodeshift": "^0.
|
|
27
|
+
"@babel/core": "^7.24.8",
|
|
28
|
+
"@babel/runtime": "^7.24.8",
|
|
29
|
+
"@babel/traverse": "^7.24.8",
|
|
30
|
+
"jscodeshift": "^0.16.1",
|
|
31
31
|
"jscodeshift-add-imports": "^1.0.10",
|
|
32
|
-
"postcss": "^8.4.
|
|
33
|
-
"postcss-cli": "^
|
|
32
|
+
"postcss": "^8.4.39",
|
|
33
|
+
"postcss-cli": "^11.0.0",
|
|
34
34
|
"yargs": "^17.7.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|