@mui/codemod 5.15.7 → 5.15.8
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.
|
@@ -6,46 +6,36 @@ var _Accordion = _interopRequireDefault(require("@mui/material/Accordion"));
|
|
|
6
6
|
var _material = require("@mui/material");
|
|
7
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Accordion.default, {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
slotProps: {
|
|
13
|
-
transition: {
|
|
14
|
-
unmountOnExit: true
|
|
15
|
-
}
|
|
9
|
+
TransitionComponent: CustomTransition,
|
|
10
|
+
TransitionProps: {
|
|
11
|
+
unmountOnExit: true
|
|
16
12
|
}
|
|
17
13
|
});
|
|
18
14
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Accordion, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
slotProps: {
|
|
23
|
-
transition: transitionVars
|
|
24
|
-
}
|
|
15
|
+
TransitionComponent: CustomTransition,
|
|
16
|
+
TransitionProps: transitionVars
|
|
25
17
|
});
|
|
26
18
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Accordion.default, {
|
|
19
|
+
TransitionComponent: CustomTransition,
|
|
20
|
+
TransitionProps: {
|
|
21
|
+
unmountOnExit: true
|
|
22
|
+
},
|
|
27
23
|
slots: {
|
|
28
|
-
root: 'div'
|
|
29
|
-
transition: CustomTransition
|
|
24
|
+
root: 'div'
|
|
30
25
|
},
|
|
31
26
|
slotProps: {
|
|
32
27
|
root: {
|
|
33
28
|
className: 'foo'
|
|
34
|
-
},
|
|
35
|
-
transition: {
|
|
36
|
-
unmountOnExit: true
|
|
37
29
|
}
|
|
38
30
|
}
|
|
39
31
|
});
|
|
40
32
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Accordion, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
})
|
|
33
|
+
TransitionComponent: CustomTransition,
|
|
34
|
+
TransitionProps: {
|
|
35
|
+
unmountOnExit: true
|
|
36
|
+
},
|
|
37
|
+
slots: (0, _extends2.default)({}, outerSlots),
|
|
38
|
+
slotProps: (0, _extends2.default)({}, outerSlotProps)
|
|
49
39
|
});
|
|
50
40
|
// should skip non MUI components
|
|
51
41
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiAccordion, {
|
|
@@ -23,7 +23,7 @@ function findComponentJSX(j, options, callback) {
|
|
|
23
23
|
// case 3: import { ComponentName as SomethingElse } from '@mui/material';
|
|
24
24
|
|
|
25
25
|
const importName = new Set();
|
|
26
|
-
root.find(j.ImportDeclaration).filter(path => path.node.source.value.match(new RegExp(`^@mui/material
|
|
26
|
+
root.find(j.ImportDeclaration).filter(path => path.node.source.value.match(new RegExp(`^@mui/material(/${componentName})?$`))).forEach(path => {
|
|
27
27
|
path.node.specifiers.forEach(specifier => {
|
|
28
28
|
if (specifier.type === 'ImportDefaultSpecifier') {
|
|
29
29
|
importName.add(specifier.local.name);
|