@mui/codemod 9.0.0-alpha.4 → 9.0.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 +147 -4
- package/README.md +399 -147
- 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 +3 -3
- package/v5.0.0/theme-spacing.test/large-actual.js +1 -1
- package/v5.0.0/theme-spacing.test/large-expected.js +1 -1
- 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
|
@@ -13,6 +13,7 @@ var _avatarGroupProps = _interopRequireDefault(require("../avatar-group-props"))
|
|
|
13
13
|
var _autocompleteProps = _interopRequireDefault(require("../autocomplete-props"));
|
|
14
14
|
var _avatarProps = _interopRequireDefault(require("../avatar-props"));
|
|
15
15
|
var _backdropProps = _interopRequireDefault(require("../backdrop-props"));
|
|
16
|
+
var _checkboxProps = _interopRequireDefault(require("../checkbox-props"));
|
|
16
17
|
var _buttonClasses = _interopRequireDefault(require("../button-classes"));
|
|
17
18
|
var _buttonGroupClasses = _interopRequireDefault(require("../button-group-classes"));
|
|
18
19
|
var _chipClasses = _interopRequireDefault(require("../chip-classes"));
|
|
@@ -32,12 +33,14 @@ var _linearProgressClasses = _interopRequireDefault(require("../linear-progress-
|
|
|
32
33
|
var _modalProps = _interopRequireDefault(require("../modal-props"));
|
|
33
34
|
var _outlinedInputProps = _interopRequireDefault(require("../outlined-input-props"));
|
|
34
35
|
var _paginationItemProps = _interopRequireDefault(require("../pagination-item-props"));
|
|
36
|
+
var _radioProps = _interopRequireDefault(require("../radio-props"));
|
|
35
37
|
var _paginationItemClasses = _interopRequireDefault(require("../pagination-item-classes"));
|
|
36
38
|
var _popperProps = _interopRequireDefault(require("../popper-props"));
|
|
37
39
|
var _speedDialProps = _interopRequireDefault(require("../speed-dial-props"));
|
|
38
40
|
var _tableSortLabelClasses = _interopRequireDefault(require("../table-sort-label-classes"));
|
|
39
41
|
var _selectClasses = _interopRequireDefault(require("../select-classes"));
|
|
40
42
|
var _stepConnectorClasses = _interopRequireDefault(require("../step-connector-classes"));
|
|
43
|
+
var _switchProps = _interopRequireDefault(require("../switch-props"));
|
|
41
44
|
var _stepContentProps = _interopRequireDefault(require("../step-content-props"));
|
|
42
45
|
var _stepLabelProps = _interopRequireDefault(require("../step-label-props"));
|
|
43
46
|
var _textFieldProps = _interopRequireDefault(require("../text-field-props"));
|
|
@@ -70,6 +73,7 @@ function deprecationsAll(file, api, options) {
|
|
|
70
73
|
file.source = (0, _autocompleteProps.default)(file, api, options);
|
|
71
74
|
file.source = (0, _avatarProps.default)(file, api, options);
|
|
72
75
|
file.source = (0, _backdropProps.default)(file, api, options);
|
|
76
|
+
file.source = (0, _checkboxProps.default)(file, api, options);
|
|
73
77
|
file.source = (0, _buttonClasses.default)(file, api, options);
|
|
74
78
|
file.source = (0, _buttonGroupClasses.default)(file, api, options);
|
|
75
79
|
file.source = (0, _chipClasses.default)(file, api, options);
|
|
@@ -90,8 +94,10 @@ function deprecationsAll(file, api, options) {
|
|
|
90
94
|
file.source = (0, _outlinedInputProps.default)(file, api, options);
|
|
91
95
|
file.source = (0, _paginationItemClasses.default)(file, api, options);
|
|
92
96
|
file.source = (0, _paginationItemProps.default)(file, api, options);
|
|
97
|
+
file.source = (0, _radioProps.default)(file, api, options);
|
|
93
98
|
file.source = (0, _popperProps.default)(file, api, options);
|
|
94
99
|
file.source = (0, _speedDialProps.default)(file, api, options);
|
|
100
|
+
file.source = (0, _switchProps.default)(file, api, options);
|
|
95
101
|
file.source = (0, _stepConnectorClasses.default)(file, api, options);
|
|
96
102
|
file.source = (0, _stepContentProps.default)(file, api, options);
|
|
97
103
|
file.source = (0, _stepLabelProps.default)(file, api, options);
|
|
@@ -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
|
+
});
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Radio = _interopRequireDefault(require("@org/ui/material/Radio"));
|
|
5
|
+
var _material = require("@org/ui/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)(_material.Radio, {
|
|
22
|
+
inputProps: {
|
|
23
|
+
'aria-label': 'Radio'
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
27
|
+
inputRef: ref
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Radio, {
|
|
30
|
+
inputProps: {
|
|
31
|
+
'aria-label': 'Radio'
|
|
32
|
+
},
|
|
33
|
+
inputRef: ref
|
|
34
|
+
});
|