@mui/codemod 9.0.0-alpha.1 → 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 +288 -2
- package/README.md +393 -8
- package/deprecations/all/deprecations-all.js +6 -0
- package/deprecations/autocomplete-props/autocomplete-props.js +195 -0
- package/deprecations/autocomplete-props/test-cases/actual.js +31 -0
- package/deprecations/autocomplete-props/test-cases/expected.js +31 -0
- package/deprecations/autocomplete-props/test-cases/package.actual.js +11 -0
- package/deprecations/autocomplete-props/test-cases/package.expected.js +11 -0
- package/deprecations/autocomplete-props/test-cases/render-input-package.actual.js +34 -0
- package/deprecations/autocomplete-props/test-cases/render-input-package.expected.js +40 -0
- package/deprecations/autocomplete-props/test-cases/render-input.actual.js +81 -0
- package/deprecations/autocomplete-props/test-cases/render-input.expected.js +92 -0
- package/deprecations/autocomplete-props/test-cases/theme.actual.js +15 -0
- package/deprecations/autocomplete-props/test-cases/theme.expected.js +15 -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/circular-progress-classes/circular-progress-classes.js +16 -1
- package/deprecations/circular-progress-classes/postcss-plugin.js +2 -2
- package/deprecations/circular-progress-classes/test-cases/expected.js +4 -4
- package/deprecations/circular-progress-classes/test-cases/package.expected.js +4 -4
- 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/deprecations/tabs-props/tabs-props.js +44 -0
- package/deprecations/tabs-props/test-cases/actual.js +11 -0
- package/deprecations/tabs-props/test-cases/expected.js +11 -0
- package/deprecations/tabs-props/test-cases/package.actual.js +6 -0
- package/deprecations/tabs-props/test-cases/package.expected.js +6 -0
- package/deprecations/tabs-props/test-cases/theme.actual.js +10 -0
- package/deprecations/tabs-props/test-cases/theme.expected.js +10 -0
- package/package.json +3 -3
- 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,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
var _movePropIntoSlotProps = _interopRequireDefault(require("../utils/movePropIntoSlotProps"));
|
|
9
|
+
/**
|
|
10
|
+
* @param {import('jscodeshift').FileInfo} file
|
|
11
|
+
* @param {import('jscodeshift').API} api
|
|
12
|
+
*/
|
|
13
|
+
function transformer(file, api, options) {
|
|
14
|
+
const j = api.jscodeshift;
|
|
15
|
+
const root = j(file.source);
|
|
16
|
+
const printOptions = options.printOptions;
|
|
17
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
18
|
+
root,
|
|
19
|
+
packageName: options.packageName,
|
|
20
|
+
componentName: 'Checkbox',
|
|
21
|
+
propName: 'inputProps',
|
|
22
|
+
slotName: 'input'
|
|
23
|
+
});
|
|
24
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
25
|
+
root,
|
|
26
|
+
packageName: options.packageName,
|
|
27
|
+
componentName: 'Checkbox',
|
|
28
|
+
propName: 'inputRef',
|
|
29
|
+
slotName: 'input',
|
|
30
|
+
slotPropName: 'ref'
|
|
31
|
+
});
|
|
32
|
+
return root.toSource(printOptions);
|
|
33
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _checkboxProps.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _checkboxProps = _interopRequireDefault(require("./checkbox-props"));
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
8
|
+
inputProps: {
|
|
9
|
+
'aria-label': 'Checkbox'
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
13
|
+
inputRef: ref
|
|
14
|
+
});
|
|
15
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
16
|
+
inputProps: {
|
|
17
|
+
'aria-label': 'Checkbox'
|
|
18
|
+
},
|
|
19
|
+
inputRef: ref
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
22
|
+
inputProps: {
|
|
23
|
+
'aria-label': 'Checkbox'
|
|
24
|
+
},
|
|
25
|
+
inputRef: ref,
|
|
26
|
+
slotProps: {
|
|
27
|
+
root: {
|
|
28
|
+
id: 'test'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
33
|
+
inputProps: {
|
|
34
|
+
'aria-label': 'Checkbox'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
38
|
+
inputRef: ref
|
|
39
|
+
});
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
41
|
+
inputProps: {
|
|
42
|
+
'aria-label': 'Checkbox'
|
|
43
|
+
},
|
|
44
|
+
inputRef: ref
|
|
45
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
8
|
+
slotProps: {
|
|
9
|
+
input: {
|
|
10
|
+
'aria-label': 'Checkbox'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
15
|
+
slotProps: {
|
|
16
|
+
input: {
|
|
17
|
+
ref: ref
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
22
|
+
slotProps: {
|
|
23
|
+
input: {
|
|
24
|
+
'aria-label': 'Checkbox',
|
|
25
|
+
ref: ref
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
30
|
+
slotProps: {
|
|
31
|
+
root: {
|
|
32
|
+
id: 'test'
|
|
33
|
+
},
|
|
34
|
+
input: {
|
|
35
|
+
'aria-label': 'Checkbox',
|
|
36
|
+
ref: ref
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
41
|
+
slotProps: {
|
|
42
|
+
input: {
|
|
43
|
+
'aria-label': 'Checkbox'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
48
|
+
slotProps: {
|
|
49
|
+
input: {
|
|
50
|
+
ref: ref
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
55
|
+
slotProps: {
|
|
56
|
+
input: {
|
|
57
|
+
'aria-label': 'Checkbox',
|
|
58
|
+
ref: ref
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Checkbox = _interopRequireDefault(require("@org/ui/material/Checkbox"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
8
|
+
inputProps: {
|
|
9
|
+
'aria-label': 'Checkbox'
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
13
|
+
inputRef: ref
|
|
14
|
+
});
|
|
15
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
16
|
+
inputProps: {
|
|
17
|
+
'aria-label': 'Checkbox'
|
|
18
|
+
},
|
|
19
|
+
inputRef: ref
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
22
|
+
inputProps: {
|
|
23
|
+
'aria-label': 'Checkbox'
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
27
|
+
inputRef: ref
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
30
|
+
inputProps: {
|
|
31
|
+
'aria-label': 'Checkbox'
|
|
32
|
+
},
|
|
33
|
+
inputRef: ref
|
|
34
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Checkbox = _interopRequireDefault(require("@org/ui/material/Checkbox"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
8
|
+
slotProps: {
|
|
9
|
+
input: {
|
|
10
|
+
'aria-label': 'Checkbox'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
15
|
+
slotProps: {
|
|
16
|
+
input: {
|
|
17
|
+
ref: ref
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, {
|
|
22
|
+
slotProps: {
|
|
23
|
+
input: {
|
|
24
|
+
'aria-label': 'Checkbox',
|
|
25
|
+
ref: ref
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
30
|
+
slotProps: {
|
|
31
|
+
input: {
|
|
32
|
+
'aria-label': 'Checkbox'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
37
|
+
slotProps: {
|
|
38
|
+
input: {
|
|
39
|
+
ref: ref
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Checkbox, {
|
|
44
|
+
slotProps: {
|
|
45
|
+
input: {
|
|
46
|
+
'aria-label': 'Checkbox',
|
|
47
|
+
ref: ref
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiCheckbox: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
inputProps: {
|
|
7
|
+
'aria-label': 'Checkbox'
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
fn({
|
|
13
|
+
MuiCheckbox: {
|
|
14
|
+
defaultProps: {
|
|
15
|
+
inputRef: ref
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
fn({
|
|
20
|
+
MuiCheckbox: {
|
|
21
|
+
defaultProps: {
|
|
22
|
+
inputProps: {
|
|
23
|
+
'aria-label': 'Checkbox'
|
|
24
|
+
},
|
|
25
|
+
inputRef: ref
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiCheckbox: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
slotProps: {
|
|
7
|
+
input: {
|
|
8
|
+
'aria-label': 'Checkbox'
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
fn({
|
|
15
|
+
MuiCheckbox: {
|
|
16
|
+
defaultProps: {
|
|
17
|
+
slotProps: {
|
|
18
|
+
input: {
|
|
19
|
+
ref: ref
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
fn({
|
|
26
|
+
MuiCheckbox: {
|
|
27
|
+
defaultProps: {
|
|
28
|
+
slotProps: {
|
|
29
|
+
input: {
|
|
30
|
+
'aria-label': 'Checkbox',
|
|
31
|
+
ref: ref
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
@@ -34,7 +34,7 @@ function transformer(file, api, options) {
|
|
|
34
34
|
if (parent.type === j.TemplateLiteral.name) {
|
|
35
35
|
const memberExpressionIndex = parent.expressions.findIndex(expression => expression === memberExpression.value);
|
|
36
36
|
const precedingTemplateElement = parent.quasis[memberExpressionIndex];
|
|
37
|
-
const atomicClasses = replacementSelector.replaceAll('MuiCircularProgress-', '').replaceAll(replacementSelectorPrefix, '').replaceAll(' > ', '').split('.').filter(Boolean);
|
|
37
|
+
const atomicClasses = replacementSelector.replaceAll('MuiCircularProgress-', '').replaceAll(replacementSelectorPrefix, '').replaceAll(' > ', '').replaceAll(' ', '').split('.').filter(Boolean);
|
|
38
38
|
if (precedingTemplateElement.value.raw.endsWith(deprecatedClass.startsWith(' ') ? `${replacementSelectorPrefix} .` : `${replacementSelectorPrefix}.`)) {
|
|
39
39
|
const atomicClassesArgs = [memberExpressionIndex, 1, ...atomicClasses.map(atomicClass => j.memberExpression(memberExpression.value.object, j.identifier(atomicClass)))];
|
|
40
40
|
parent.expressions.splice(...atomicClassesArgs);
|
|
@@ -53,6 +53,21 @@ function transformer(file, api, options) {
|
|
|
53
53
|
}, false));
|
|
54
54
|
}
|
|
55
55
|
parent.quasis.splice(...quasisArgs);
|
|
56
|
+
} else if (replacementSelector.includes(' .')) {
|
|
57
|
+
const quasisArgs = [memberExpressionIndex, 1, j.templateElement({
|
|
58
|
+
raw: precedingTemplateElement.value.raw.replace(/ \.$/, '.'),
|
|
59
|
+
cooked: precedingTemplateElement.value.cooked.replace(/ \.$/, '.')
|
|
60
|
+
}, false), j.templateElement({
|
|
61
|
+
raw: ' .',
|
|
62
|
+
cooked: ' .'
|
|
63
|
+
}, false)];
|
|
64
|
+
if (atomicClasses.length === 3) {
|
|
65
|
+
quasisArgs.splice(3, 0, j.templateElement({
|
|
66
|
+
raw: ' .',
|
|
67
|
+
cooked: ' .'
|
|
68
|
+
}, false));
|
|
69
|
+
}
|
|
70
|
+
parent.quasis.splice(...quasisArgs);
|
|
56
71
|
} else {
|
|
57
72
|
parent.quasis.splice(memberExpressionIndex, 1, j.templateElement({
|
|
58
73
|
raw: precedingTemplateElement.value.raw,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
const classes = [{
|
|
4
4
|
deprecatedClass: ' .MuiCircularProgress-circleDeterminate',
|
|
5
|
-
replacementSelector: '.MuiCircularProgress-determinate
|
|
5
|
+
replacementSelector: '.MuiCircularProgress-determinate .MuiCircularProgress-circle'
|
|
6
6
|
}, {
|
|
7
7
|
deprecatedClass: ' .MuiCircularProgress-circleIndeterminate',
|
|
8
|
-
replacementSelector: '.MuiCircularProgress-indeterminate
|
|
8
|
+
replacementSelector: '.MuiCircularProgress-indeterminate .MuiCircularProgress-circle'
|
|
9
9
|
}];
|
|
10
10
|
const plugin = () => {
|
|
11
11
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _CircularProgress = require("@mui/material/CircularProgress");
|
|
4
|
-
"&.MuiCircularProgress-determinate
|
|
5
|
-
"&.MuiCircularProgress-indeterminate
|
|
6
|
-
`&.${_CircularProgress.circularProgressClasses.determinate}
|
|
7
|
-
`&.${_CircularProgress.circularProgressClasses.indeterminate}
|
|
4
|
+
"&.MuiCircularProgress-determinate .MuiCircularProgress-circle";
|
|
5
|
+
"&.MuiCircularProgress-indeterminate .MuiCircularProgress-circle";
|
|
6
|
+
`&.${_CircularProgress.circularProgressClasses.determinate} .${_CircularProgress.circularProgressClasses.circle}`;
|
|
7
|
+
`&.${_CircularProgress.circularProgressClasses.indeterminate} .${_CircularProgress.circularProgressClasses.circle}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _CircularProgress = require("@org/ui/material/CircularProgress");
|
|
4
|
-
"&.MuiCircularProgress-determinate
|
|
5
|
-
"&.MuiCircularProgress-indeterminate
|
|
6
|
-
`&.${_CircularProgress.circularProgressClasses.determinate}
|
|
7
|
-
`&.${_CircularProgress.circularProgressClasses.indeterminate}
|
|
4
|
+
"&.MuiCircularProgress-determinate .MuiCircularProgress-circle";
|
|
5
|
+
"&.MuiCircularProgress-indeterminate .MuiCircularProgress-circle";
|
|
6
|
+
`&.${_CircularProgress.circularProgressClasses.determinate} .${_CircularProgress.circularProgressClasses.circle}`;
|
|
7
|
+
`&.${_CircularProgress.circularProgressClasses.indeterminate} .${_CircularProgress.circularProgressClasses.circle}`;
|
|
@@ -15,6 +15,20 @@ function transformer(file, api, options) {
|
|
|
15
15
|
const j = api.jscodeshift;
|
|
16
16
|
const root = j(file.source);
|
|
17
17
|
const printOptions = options.printOptions;
|
|
18
|
+
(0, _movePropIntoSlots.default)(j, {
|
|
19
|
+
root,
|
|
20
|
+
packageName: options.packageName,
|
|
21
|
+
componentName: 'Dialog',
|
|
22
|
+
propName: 'BackdropComponent',
|
|
23
|
+
slotName: 'backdrop'
|
|
24
|
+
});
|
|
25
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
26
|
+
root,
|
|
27
|
+
packageName: options.packageName,
|
|
28
|
+
componentName: 'Dialog',
|
|
29
|
+
propName: 'BackdropProps',
|
|
30
|
+
slotName: 'backdrop'
|
|
31
|
+
});
|
|
18
32
|
(0, _movePropIntoSlots.default)(j, {
|
|
19
33
|
root,
|
|
20
34
|
packageName: options.packageName,
|
|
@@ -5,11 +5,15 @@ var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
|
5
5
|
var _material = require("@mui/material");
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
|
|
8
|
+
BackdropComponent: CustomBackdrop,
|
|
9
|
+
BackdropProps: CustomBackdropProps,
|
|
8
10
|
TransitionComponent: CustomTransition,
|
|
9
11
|
TransitionProps: CustomTransitionProps,
|
|
10
12
|
PaperProps: PaperProps
|
|
11
13
|
});
|
|
12
14
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Dialog, {
|
|
15
|
+
BackdropComponent: CustomBackdrop,
|
|
16
|
+
BackdropProps: CustomBackdropProps,
|
|
13
17
|
TransitionComponent: CustomTransition,
|
|
14
18
|
TransitionProps: CustomTransitionProps,
|
|
15
19
|
PaperProps: PaperProps
|
|
@@ -6,18 +6,22 @@ var _material = require("@mui/material");
|
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
|
|
8
8
|
slots: {
|
|
9
|
+
backdrop: CustomBackdrop,
|
|
9
10
|
transition: CustomTransition
|
|
10
11
|
},
|
|
11
12
|
slotProps: {
|
|
13
|
+
backdrop: CustomBackdropProps,
|
|
12
14
|
transition: CustomTransitionProps,
|
|
13
15
|
paper: PaperProps
|
|
14
16
|
}
|
|
15
17
|
});
|
|
16
18
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Dialog, {
|
|
17
19
|
slots: {
|
|
20
|
+
backdrop: CustomBackdrop,
|
|
18
21
|
transition: CustomTransition
|
|
19
22
|
},
|
|
20
23
|
slotProps: {
|
|
24
|
+
backdrop: CustomBackdropProps,
|
|
21
25
|
transition: CustomTransitionProps,
|
|
22
26
|
paper: PaperProps
|
|
23
27
|
}
|
|
@@ -71,5 +71,19 @@ function transformer(file, api, options) {
|
|
|
71
71
|
propName: 'SlideProps',
|
|
72
72
|
slotName: 'transition'
|
|
73
73
|
});
|
|
74
|
+
(0, _movePropIntoSlots.default)(j, {
|
|
75
|
+
root,
|
|
76
|
+
packageName: options.packageName,
|
|
77
|
+
componentName: 'Drawer',
|
|
78
|
+
propName: 'TransitionComponent',
|
|
79
|
+
slotName: 'transition'
|
|
80
|
+
});
|
|
81
|
+
(0, _movePropIntoSlots.default)(j, {
|
|
82
|
+
root,
|
|
83
|
+
packageName: options.packageName,
|
|
84
|
+
componentName: 'SwipeableDrawer',
|
|
85
|
+
propName: 'TransitionComponent',
|
|
86
|
+
slotName: 'transition'
|
|
87
|
+
});
|
|
74
88
|
return root.toSource(printOptions);
|
|
75
89
|
}
|
|
@@ -37,6 +37,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
37
37
|
direction: 'right'
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Drawer.default, {
|
|
41
|
+
TransitionComponent: CustomTransition
|
|
42
|
+
});
|
|
43
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_SwipeableDrawer.default, {
|
|
44
|
+
TransitionComponent: CustomTransition
|
|
45
|
+
});
|
|
40
46
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Drawer, {
|
|
41
47
|
BackdropComponent: Backdrop,
|
|
42
48
|
BackdropProps: {
|
|
@@ -47,7 +53,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
47
53
|
},
|
|
48
54
|
SlideProps: {
|
|
49
55
|
direction: 'right'
|
|
50
|
-
}
|
|
56
|
+
},
|
|
57
|
+
TransitionComponent: CustomTransition
|
|
51
58
|
});
|
|
52
59
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.SwipeableDrawer, {
|
|
53
60
|
BackdropComponent: Backdrop,
|
|
@@ -59,7 +66,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
59
66
|
},
|
|
60
67
|
SlideProps: {
|
|
61
68
|
direction: 'right'
|
|
62
|
-
}
|
|
69
|
+
},
|
|
70
|
+
TransitionComponent: CustomTransition
|
|
63
71
|
});
|
|
64
72
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomDrawer, {
|
|
65
73
|
PopperComponent: CustomPopper,
|
|
@@ -53,9 +53,20 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Drawer.default, {
|
|
57
|
+
slots: {
|
|
58
|
+
transition: CustomTransition
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_SwipeableDrawer.default, {
|
|
62
|
+
slots: {
|
|
63
|
+
transition: CustomTransition
|
|
64
|
+
}
|
|
65
|
+
});
|
|
56
66
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Drawer, {
|
|
57
67
|
slots: {
|
|
58
|
-
backdrop: Backdrop
|
|
68
|
+
backdrop: Backdrop,
|
|
69
|
+
transition: CustomTransition
|
|
59
70
|
},
|
|
60
71
|
slotProps: {
|
|
61
72
|
backdrop: {
|
|
@@ -71,7 +82,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
71
82
|
});
|
|
72
83
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.SwipeableDrawer, {
|
|
73
84
|
slots: {
|
|
74
|
-
backdrop: Backdrop
|
|
85
|
+
backdrop: Backdrop,
|
|
86
|
+
transition: CustomTransition
|
|
75
87
|
},
|
|
76
88
|
slotProps: {
|
|
77
89
|
backdrop: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _radioProps.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _radioProps = _interopRequireDefault(require("./radio-props"));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
var _movePropIntoSlotProps = _interopRequireDefault(require("../utils/movePropIntoSlotProps"));
|
|
9
|
+
/**
|
|
10
|
+
* @param {import('jscodeshift').FileInfo} file
|
|
11
|
+
* @param {import('jscodeshift').API} api
|
|
12
|
+
*/
|
|
13
|
+
function transformer(file, api, options) {
|
|
14
|
+
const j = api.jscodeshift;
|
|
15
|
+
const root = j(file.source);
|
|
16
|
+
const printOptions = options.printOptions;
|
|
17
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
18
|
+
root,
|
|
19
|
+
packageName: options.packageName,
|
|
20
|
+
componentName: 'Radio',
|
|
21
|
+
propName: 'inputProps',
|
|
22
|
+
slotName: 'input'
|
|
23
|
+
});
|
|
24
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
25
|
+
root,
|
|
26
|
+
packageName: options.packageName,
|
|
27
|
+
componentName: 'Radio',
|
|
28
|
+
propName: 'inputRef',
|
|
29
|
+
slotName: 'input',
|
|
30
|
+
slotPropName: 'ref'
|
|
31
|
+
});
|
|
32
|
+
return root.toSource(printOptions);
|
|
33
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Radio = _interopRequireDefault(require("@mui/material/Radio"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
8
|
+
inputProps: {
|
|
9
|
+
'aria-label': 'Radio'
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
13
|
+
inputRef: ref
|
|
14
|
+
});
|
|
15
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
16
|
+
inputProps: {
|
|
17
|
+
'aria-label': 'Radio'
|
|
18
|
+
},
|
|
19
|
+
inputRef: ref
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
22
|
+
inputProps: {
|
|
23
|
+
'aria-label': 'Radio'
|
|
24
|
+
},
|
|
25
|
+
inputRef: ref,
|
|
26
|
+
slotProps: {
|
|
27
|
+
root: {
|
|
28
|
+
id: 'test'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
33
|
+
inputProps: {
|
|
34
|
+
'aria-label': 'Radio'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
38
|
+
inputRef: ref
|
|
39
|
+
});
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
41
|
+
inputProps: {
|
|
42
|
+
'aria-label': 'Radio'
|
|
43
|
+
},
|
|
44
|
+
inputRef: ref
|
|
45
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Radio = _interopRequireDefault(require("@mui/material/Radio"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
8
|
+
slotProps: {
|
|
9
|
+
input: {
|
|
10
|
+
'aria-label': 'Radio'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
15
|
+
slotProps: {
|
|
16
|
+
input: {
|
|
17
|
+
ref: ref
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
22
|
+
slotProps: {
|
|
23
|
+
input: {
|
|
24
|
+
'aria-label': 'Radio',
|
|
25
|
+
ref: ref
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
30
|
+
slotProps: {
|
|
31
|
+
root: {
|
|
32
|
+
id: 'test'
|
|
33
|
+
},
|
|
34
|
+
input: {
|
|
35
|
+
'aria-label': 'Radio',
|
|
36
|
+
ref: ref
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
41
|
+
slotProps: {
|
|
42
|
+
input: {
|
|
43
|
+
'aria-label': 'Radio'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
48
|
+
slotProps: {
|
|
49
|
+
input: {
|
|
50
|
+
ref: ref
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
55
|
+
slotProps: {
|
|
56
|
+
input: {
|
|
57
|
+
'aria-label': 'Radio',
|
|
58
|
+
ref: ref
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|