@mui/codemod 6.0.0-alpha.9 → 6.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/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 +80 -30
- 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
package/codemod.js
CHANGED
|
@@ -23,7 +23,6 @@ async function runJscodeshiftTransform(transform, files, flags, codemodFlags) {
|
|
|
23
23
|
|
|
24
24
|
let transformerPath;
|
|
25
25
|
let error;
|
|
26
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
27
26
|
for (const item of paths) {
|
|
28
27
|
try {
|
|
29
28
|
// eslint-disable-next-line no-await-in-loop
|
|
@@ -113,7 +112,6 @@ async function runPostcssTransform(transform, files) {
|
|
|
113
112
|
|
|
114
113
|
let configPath;
|
|
115
114
|
let error;
|
|
116
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
117
115
|
for (const item of paths) {
|
|
118
116
|
try {
|
|
119
117
|
// eslint-disable-next-line no-await-in-loop
|
|
@@ -5,50 +5,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = deprecationsAll;
|
|
8
|
-
var _accordionProps = _interopRequireDefault(require("../accordion-props"));
|
|
9
|
-
var _autocompleteProps = _interopRequireDefault(require("../autocomplete-props"));
|
|
10
|
-
var _formControlLabelProps = _interopRequireDefault(require("../form-control-label-props"));
|
|
11
|
-
var _avatarGroupProps = _interopRequireDefault(require("../avatar-group-props"));
|
|
12
|
-
var _avatarProps = _interopRequireDefault(require("../avatar-props"));
|
|
13
|
-
var _dividerProps = _interopRequireDefault(require("../divider-props"));
|
|
14
8
|
var _accordionSummaryClasses = _interopRequireDefault(require("../accordion-summary-classes"));
|
|
9
|
+
var _alertClasses = _interopRequireDefault(require("../alert-classes"));
|
|
10
|
+
var _avatarGroupProps = _interopRequireDefault(require("../avatar-group-props"));
|
|
11
|
+
var _autocompleteProps = _interopRequireDefault(require("../autocomplete-props"));
|
|
12
|
+
var _backdropProps = _interopRequireDefault(require("../backdrop-props"));
|
|
15
13
|
var _buttonClasses = _interopRequireDefault(require("../button-classes"));
|
|
16
14
|
var _buttonGroupClasses = _interopRequireDefault(require("../button-group-classes"));
|
|
17
15
|
var _chipClasses = _interopRequireDefault(require("../chip-classes"));
|
|
18
|
-
var _paginationItemClasses = _interopRequireDefault(require("../pagination-item-classes"));
|
|
19
|
-
var _alertClasses = _interopRequireDefault(require("../alert-classes"));
|
|
20
|
-
var _toggleButtonGroupClasses = _interopRequireDefault(require("../toggle-button-group-classes"));
|
|
21
|
-
var _stepLabelProps = _interopRequireDefault(require("../step-label-props"));
|
|
22
|
-
var _backdropProps = _interopRequireDefault(require("../backdrop-props"));
|
|
23
|
-
var _stepConnectorClasses = _interopRequireDefault(require("../step-connector-classes"));
|
|
24
16
|
var _circularProgressClasses = _interopRequireDefault(require("../circular-progress-classes"));
|
|
17
|
+
var _dividerProps = _interopRequireDefault(require("../divider-props"));
|
|
18
|
+
var _filledInputProps = _interopRequireDefault(require("../filled-input-props"));
|
|
19
|
+
var _formControlLabelProps = _interopRequireDefault(require("../form-control-label-props"));
|
|
25
20
|
var _gridProps = _interopRequireDefault(require("../grid-props"));
|
|
26
|
-
var
|
|
21
|
+
var _inputBaseProps = _interopRequireDefault(require("../input-base-props"));
|
|
22
|
+
var _inputProps = _interopRequireDefault(require("../input-props"));
|
|
23
|
+
var _modalProps = _interopRequireDefault(require("../modal-props"));
|
|
24
|
+
var _outlinedInputProps = _interopRequireDefault(require("../outlined-input-props"));
|
|
25
|
+
var _paginationItemClasses = _interopRequireDefault(require("../pagination-item-classes"));
|
|
26
|
+
var _tableSortLabelClasses = _interopRequireDefault(require("../table-sort-label-classes"));
|
|
27
|
+
var _stepConnectorClasses = _interopRequireDefault(require("../step-connector-classes"));
|
|
28
|
+
var _stepLabelProps = _interopRequireDefault(require("../step-label-props"));
|
|
27
29
|
var _textFieldProps = _interopRequireDefault(require("../text-field-props"));
|
|
30
|
+
var _tabClasses = _interopRequireDefault(require("../tab-classes"));
|
|
31
|
+
var _toggleButtonGroupClasses = _interopRequireDefault(require("../toggle-button-group-classes"));
|
|
28
32
|
/**
|
|
29
33
|
* @param {import('jscodeshift').FileInfo} file
|
|
30
34
|
* @param {import('jscodeshift').API} api
|
|
31
35
|
*/
|
|
32
36
|
function deprecationsAll(file, api, options) {
|
|
33
|
-
file.source = (0, _accordionProps.default)(file, api, options);
|
|
34
|
-
file.source = (0, _autocompleteProps.default)(file, api, options);
|
|
35
|
-
file.source = (0, _formControlLabelProps.default)(file, api, options);
|
|
36
|
-
file.source = (0, _avatarGroupProps.default)(file, api, options);
|
|
37
|
-
file.source = (0, _avatarProps.default)(file, api, options);
|
|
38
|
-
file.source = (0, _dividerProps.default)(file, api, options);
|
|
39
37
|
file.source = (0, _accordionSummaryClasses.default)(file, api, options);
|
|
38
|
+
file.source = (0, _alertClasses.default)(file, api, options);
|
|
39
|
+
file.source = (0, _avatarGroupProps.default)(file, api, options);
|
|
40
|
+
file.source = (0, _autocompleteProps.default)(file, api, options);
|
|
41
|
+
file.source = (0, _backdropProps.default)(file, api, options);
|
|
40
42
|
file.source = (0, _buttonClasses.default)(file, api, options);
|
|
41
43
|
file.source = (0, _buttonGroupClasses.default)(file, api, options);
|
|
42
44
|
file.source = (0, _chipClasses.default)(file, api, options);
|
|
45
|
+
file.source = (0, _circularProgressClasses.default)(file, api, options);
|
|
46
|
+
file.source = (0, _dividerProps.default)(file, api, options);
|
|
47
|
+
file.source = (0, _filledInputProps.default)(file, api, options);
|
|
48
|
+
file.source = (0, _formControlLabelProps.default)(file, api, options);
|
|
49
|
+
file.source = (0, _gridProps.default)(file, api, options);
|
|
50
|
+
file.source = (0, _inputBaseProps.default)(file, api, options);
|
|
51
|
+
file.source = (0, _inputProps.default)(file, api, options);
|
|
52
|
+
file.source = (0, _modalProps.default)(file, api, options);
|
|
53
|
+
file.source = (0, _outlinedInputProps.default)(file, api, options);
|
|
43
54
|
file.source = (0, _paginationItemClasses.default)(file, api, options);
|
|
44
|
-
file.source = (0, _alertClasses.default)(file, api, options);
|
|
45
|
-
file.source = (0, _toggleButtonGroupClasses.default)(file, api, options);
|
|
46
|
-
file.source = (0, _stepLabelProps.default)(file, api, options);
|
|
47
|
-
file.source = (0, _backdropProps.default)(file, api, options);
|
|
48
55
|
file.source = (0, _stepConnectorClasses.default)(file, api, options);
|
|
49
|
-
file.source = (0,
|
|
50
|
-
file.source = (0,
|
|
56
|
+
file.source = (0, _stepLabelProps.default)(file, api, options);
|
|
57
|
+
file.source = (0, _tableSortLabelClasses.default)(file, api, options);
|
|
51
58
|
file.source = (0, _textFieldProps.default)(file, api, options);
|
|
52
|
-
file.source = (0,
|
|
59
|
+
file.source = (0, _tabClasses.default)(file, api, options);
|
|
60
|
+
file.source = (0, _toggleButtonGroupClasses.default)(file, api, options);
|
|
53
61
|
return file.source;
|
|
54
62
|
}
|
|
@@ -27,6 +27,12 @@ const {
|
|
|
27
27
|
const {
|
|
28
28
|
plugin: circularProgressClassesPlugin
|
|
29
29
|
} = require('../circular-progress-classes/postcss-plugin');
|
|
30
|
+
const {
|
|
31
|
+
plugin: tabClassesPlugin
|
|
32
|
+
} = require('../tab-classes/postcss-plugin');
|
|
33
|
+
const {
|
|
34
|
+
plugin: tableSortLabelClassesPlugin
|
|
35
|
+
} = require('../table-sort-label-classes/postcss-plugin');
|
|
30
36
|
module.exports = {
|
|
31
|
-
plugins: [accordionSummaryClassesPlugin, alertClassesPlugin, buttonClassesPlugin, buttonGroupClassesPlugin, chipClassesPlugin, circularProgressClassesPlugin, paginationItemClassesPlugin, stepConnectorClassesPlugin, toggleButtonGroupClassesPlugin]
|
|
37
|
+
plugins: [accordionSummaryClassesPlugin, alertClassesPlugin, buttonClassesPlugin, buttonGroupClassesPlugin, chipClassesPlugin, circularProgressClassesPlugin, paginationItemClassesPlugin, stepConnectorClassesPlugin, toggleButtonGroupClassesPlugin, tabClassesPlugin, tableSortLabelClassesPlugin]
|
|
32
38
|
};
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = transformer;
|
|
8
|
-
var _movePropIntoSlots = _interopRequireDefault(require("../utils/movePropIntoSlots"));
|
|
9
|
-
var _movePropIntoSlotProps = _interopRequireDefault(require("../utils/movePropIntoSlotProps"));
|
|
10
8
|
var _replaceComponentsWithSlots = _interopRequireDefault(require("../utils/replaceComponentsWithSlots"));
|
|
11
9
|
/**
|
|
12
10
|
* @param {import('jscodeshift').FileInfo} file
|
|
@@ -16,36 +14,6 @@ function transformer(file, api, options) {
|
|
|
16
14
|
const j = api.jscodeshift;
|
|
17
15
|
const root = j(file.source);
|
|
18
16
|
const printOptions = options.printOptions;
|
|
19
|
-
(0, _movePropIntoSlots.default)(j, {
|
|
20
|
-
root,
|
|
21
|
-
componentName: 'Autocomplete',
|
|
22
|
-
propName: 'PaperComponent',
|
|
23
|
-
slotName: 'paper'
|
|
24
|
-
});
|
|
25
|
-
(0, _movePropIntoSlots.default)(j, {
|
|
26
|
-
root,
|
|
27
|
-
componentName: 'Autocomplete',
|
|
28
|
-
propName: 'PopperComponent',
|
|
29
|
-
slotName: 'popper'
|
|
30
|
-
});
|
|
31
|
-
(0, _movePropIntoSlots.default)(j, {
|
|
32
|
-
root,
|
|
33
|
-
componentName: 'Autocomplete',
|
|
34
|
-
propName: 'ListboxComponent',
|
|
35
|
-
slotName: 'listbox'
|
|
36
|
-
});
|
|
37
|
-
(0, _movePropIntoSlotProps.default)(j, {
|
|
38
|
-
root,
|
|
39
|
-
componentName: 'Autocomplete',
|
|
40
|
-
propName: 'ListboxProps',
|
|
41
|
-
slotName: 'listbox'
|
|
42
|
-
});
|
|
43
|
-
(0, _movePropIntoSlotProps.default)(j, {
|
|
44
|
-
root,
|
|
45
|
-
componentName: 'Autocomplete',
|
|
46
|
-
propName: 'ChipProps',
|
|
47
|
-
slotName: 'chip'
|
|
48
|
-
});
|
|
49
17
|
(0, _replaceComponentsWithSlots.default)(j, {
|
|
50
18
|
root,
|
|
51
19
|
componentName: 'Autocomplete'
|
|
@@ -5,15 +5,6 @@ var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete")
|
|
|
5
5
|
var _material = require("@mui/material");
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, {
|
|
8
|
-
ChipProps: {
|
|
9
|
-
height: 10
|
|
10
|
-
},
|
|
11
|
-
PaperComponent: CustomPaper,
|
|
12
|
-
PopperComponent: CustomPopper,
|
|
13
|
-
ListboxComponent: CustomListbox,
|
|
14
|
-
ListboxProps: {
|
|
15
|
-
height: 12
|
|
16
|
-
},
|
|
17
8
|
componentsProps: {
|
|
18
9
|
clearIndicator: {
|
|
19
10
|
width: 10
|
|
@@ -30,15 +21,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
30
21
|
}
|
|
31
22
|
});
|
|
32
23
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, {
|
|
33
|
-
ChipProps: {
|
|
34
|
-
height: 10
|
|
35
|
-
},
|
|
36
|
-
PaperComponent: CustomPaper,
|
|
37
|
-
PopperComponent: CustomPopper,
|
|
38
|
-
ListboxComponent: CustomListbox,
|
|
39
|
-
ListboxProps: {
|
|
40
|
-
height: 12
|
|
41
|
-
},
|
|
42
24
|
slotProps: {
|
|
43
25
|
popupIndicator: {
|
|
44
26
|
width: 20
|
|
@@ -60,15 +42,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
60
42
|
}
|
|
61
43
|
});
|
|
62
44
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Autocomplete, {
|
|
63
|
-
ChipProps: {
|
|
64
|
-
height: 10
|
|
65
|
-
},
|
|
66
|
-
PaperComponent: CustomPaper,
|
|
67
|
-
PopperComponent: CustomPopper,
|
|
68
|
-
ListboxComponent: CustomListbox,
|
|
69
|
-
ListboxProps: {
|
|
70
|
-
height: 12
|
|
71
|
-
},
|
|
72
45
|
componentsProps: {
|
|
73
46
|
clearIndicator: {
|
|
74
47
|
width: 10
|
|
@@ -85,13 +58,18 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
85
58
|
}
|
|
86
59
|
});
|
|
87
60
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomAutocomplete, {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
61
|
+
componentsProps: {
|
|
62
|
+
clearIndicator: {
|
|
63
|
+
width: 10
|
|
64
|
+
},
|
|
65
|
+
paper: {
|
|
66
|
+
width: 12
|
|
67
|
+
},
|
|
68
|
+
popper: {
|
|
69
|
+
width: 14
|
|
70
|
+
},
|
|
71
|
+
popupIndicator: {
|
|
72
|
+
width: 16
|
|
73
|
+
}
|
|
96
74
|
}
|
|
97
75
|
});
|
|
@@ -5,18 +5,7 @@ var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete")
|
|
|
5
5
|
var _material = require("@mui/material");
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, {
|
|
8
|
-
slots: {
|
|
9
|
-
paper: CustomPaper,
|
|
10
|
-
popper: CustomPopper,
|
|
11
|
-
listbox: CustomListbox
|
|
12
|
-
},
|
|
13
8
|
slotProps: {
|
|
14
|
-
listbox: {
|
|
15
|
-
height: 12
|
|
16
|
-
},
|
|
17
|
-
chip: {
|
|
18
|
-
height: 10
|
|
19
|
-
},
|
|
20
9
|
clearIndicator: {
|
|
21
10
|
width: 10
|
|
22
11
|
},
|
|
@@ -33,12 +22,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
33
22
|
});
|
|
34
23
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, {
|
|
35
24
|
slotProps: {
|
|
36
|
-
listbox: {
|
|
37
|
-
height: 12
|
|
38
|
-
},
|
|
39
|
-
chip: {
|
|
40
|
-
height: 10
|
|
41
|
-
},
|
|
42
25
|
clearIndicator: {
|
|
43
26
|
width: 10
|
|
44
27
|
},
|
|
@@ -56,26 +39,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
56
39
|
width: 20
|
|
57
40
|
}
|
|
58
41
|
}
|
|
59
|
-
},
|
|
60
|
-
slots: {
|
|
61
|
-
paper: CustomPaper,
|
|
62
|
-
popper: CustomPopper,
|
|
63
|
-
listbox: CustomListbox
|
|
64
42
|
}
|
|
65
43
|
});
|
|
66
44
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Autocomplete, {
|
|
67
|
-
slots: {
|
|
68
|
-
paper: CustomPaper,
|
|
69
|
-
popper: CustomPopper,
|
|
70
|
-
listbox: CustomListbox
|
|
71
|
-
},
|
|
72
45
|
slotProps: {
|
|
73
|
-
listbox: {
|
|
74
|
-
height: 12
|
|
75
|
-
},
|
|
76
|
-
chip: {
|
|
77
|
-
height: 10
|
|
78
|
-
},
|
|
79
46
|
clearIndicator: {
|
|
80
47
|
width: 10
|
|
81
48
|
},
|
|
@@ -91,13 +58,18 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
91
58
|
}
|
|
92
59
|
});
|
|
93
60
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomAutocomplete, {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
61
|
+
componentsProps: {
|
|
62
|
+
clearIndicator: {
|
|
63
|
+
width: 10
|
|
64
|
+
},
|
|
65
|
+
paper: {
|
|
66
|
+
width: 12
|
|
67
|
+
},
|
|
68
|
+
popper: {
|
|
69
|
+
width: 14
|
|
70
|
+
},
|
|
71
|
+
popupIndicator: {
|
|
72
|
+
width: 16
|
|
73
|
+
}
|
|
102
74
|
}
|
|
103
75
|
});
|
|
@@ -3,15 +3,6 @@
|
|
|
3
3
|
fn({
|
|
4
4
|
MuiAutocomplete: {
|
|
5
5
|
defaultProps: {
|
|
6
|
-
ChipProps: {
|
|
7
|
-
height: 10
|
|
8
|
-
},
|
|
9
|
-
PaperComponent: CustomPaper,
|
|
10
|
-
PopperComponent: CustomPopper,
|
|
11
|
-
ListboxComponent: CustomListbox,
|
|
12
|
-
ListboxProps: {
|
|
13
|
-
height: 12
|
|
14
|
-
},
|
|
15
6
|
componentsProps: {
|
|
16
7
|
clearIndicator: {
|
|
17
8
|
width: 10
|
|
@@ -32,15 +23,6 @@ fn({
|
|
|
32
23
|
fn({
|
|
33
24
|
MuiAutocomplete: {
|
|
34
25
|
defaultProps: {
|
|
35
|
-
ChipProps: {
|
|
36
|
-
height: 10
|
|
37
|
-
},
|
|
38
|
-
PaperComponent: CustomPaper,
|
|
39
|
-
PopperComponent: CustomPopper,
|
|
40
|
-
ListboxComponent: CustomListbox,
|
|
41
|
-
ListboxProps: {
|
|
42
|
-
height: 12
|
|
43
|
-
},
|
|
44
26
|
slotProps: {
|
|
45
27
|
popupIndicator: {
|
|
46
28
|
width: 20
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
fn({
|
|
4
4
|
MuiAutocomplete: {
|
|
5
5
|
defaultProps: {
|
|
6
|
-
slots: {
|
|
7
|
-
paper: CustomPaper,
|
|
8
|
-
popper: CustomPopper,
|
|
9
|
-
listbox: CustomListbox
|
|
10
|
-
},
|
|
11
6
|
slotProps: {
|
|
12
7
|
clearIndicator: {
|
|
13
8
|
width: 10
|
|
@@ -20,12 +15,6 @@ fn({
|
|
|
20
15
|
},
|
|
21
16
|
popupIndicator: {
|
|
22
17
|
width: 16
|
|
23
|
-
},
|
|
24
|
-
listbox: {
|
|
25
|
-
height: 12
|
|
26
|
-
},
|
|
27
|
-
chip: {
|
|
28
|
-
height: 10
|
|
29
18
|
}
|
|
30
19
|
}
|
|
31
20
|
}
|
|
@@ -51,18 +40,7 @@ fn({
|
|
|
51
40
|
...{
|
|
52
41
|
width: 20
|
|
53
42
|
}
|
|
54
|
-
},
|
|
55
|
-
listbox: {
|
|
56
|
-
height: 12
|
|
57
|
-
},
|
|
58
|
-
chip: {
|
|
59
|
-
height: 10
|
|
60
43
|
}
|
|
61
|
-
},
|
|
62
|
-
slots: {
|
|
63
|
-
paper: CustomPaper,
|
|
64
|
-
popper: CustomPopper,
|
|
65
|
-
listbox: CustomListbox
|
|
66
44
|
}
|
|
67
45
|
}
|
|
68
46
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = transformer;
|
|
8
|
-
var
|
|
8
|
+
var _replaceComponentsWithSlots = _interopRequireDefault(require("../utils/replaceComponentsWithSlots"));
|
|
9
9
|
/**
|
|
10
10
|
* @param {import('jscodeshift').FileInfo} file
|
|
11
11
|
* @param {import('jscodeshift').API} api
|
|
@@ -14,11 +14,9 @@ function transformer(file, api, options) {
|
|
|
14
14
|
const j = api.jscodeshift;
|
|
15
15
|
const root = j(file.source);
|
|
16
16
|
const printOptions = options.printOptions;
|
|
17
|
-
(0,
|
|
17
|
+
(0, _replaceComponentsWithSlots.default)(j, {
|
|
18
18
|
root,
|
|
19
|
-
componentName: 'Backdrop'
|
|
20
|
-
propName: 'TransitionComponent',
|
|
21
|
-
slotName: 'transition'
|
|
19
|
+
componentName: 'Backdrop'
|
|
22
20
|
});
|
|
23
21
|
return root.toSource(printOptions);
|
|
24
22
|
}
|
|
@@ -5,31 +5,47 @@ var _Backdrop = _interopRequireDefault(require("@mui/material/Backdrop"));
|
|
|
5
5
|
var _material = require("@mui/material");
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
8
|
-
|
|
8
|
+
components: {
|
|
9
|
+
Root: ComponentsRoot
|
|
10
|
+
},
|
|
11
|
+
componentsProps: {
|
|
12
|
+
root: componentsRootProps
|
|
13
|
+
}
|
|
9
14
|
});
|
|
10
15
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
11
|
-
|
|
16
|
+
components: {
|
|
17
|
+
Root: ComponentsRoot
|
|
18
|
+
},
|
|
19
|
+
slotProps: {
|
|
20
|
+
root: slotsRootProps
|
|
21
|
+
}
|
|
12
22
|
});
|
|
13
23
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
14
|
-
TransitionComponent: CustomTransition,
|
|
15
24
|
slots: {
|
|
16
|
-
root:
|
|
25
|
+
root: SlotsRoot
|
|
26
|
+
},
|
|
27
|
+
componentsProps: {
|
|
28
|
+
root: componentsRootProps
|
|
17
29
|
}
|
|
18
30
|
});
|
|
19
31
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
20
|
-
TransitionComponent: CustomTransition,
|
|
21
|
-
slots: {
|
|
22
|
-
...outerSlots
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
26
|
-
TransitionComponent: ComponentTransition,
|
|
27
32
|
slots: {
|
|
28
|
-
root:
|
|
29
|
-
|
|
33
|
+
root: SlotsRoot
|
|
34
|
+
},
|
|
35
|
+
components: {
|
|
36
|
+
Root: ComponentsRoot
|
|
37
|
+
},
|
|
38
|
+
slotProps: {
|
|
39
|
+
root: slotsRootProps
|
|
40
|
+
},
|
|
41
|
+
componentsProps: {
|
|
42
|
+
root: componentsRootProps
|
|
30
43
|
}
|
|
31
44
|
});
|
|
45
|
+
|
|
32
46
|
// should skip non MUI components
|
|
33
47
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiBackdrop, {
|
|
34
|
-
|
|
48
|
+
components: {
|
|
49
|
+
Root: ComponentsRoot
|
|
50
|
+
}
|
|
35
51
|
});
|
|
@@ -6,33 +6,43 @@ var _material = require("@mui/material");
|
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
8
8
|
slots: {
|
|
9
|
-
|
|
9
|
+
root: ComponentsRoot
|
|
10
|
+
},
|
|
11
|
+
slotProps: {
|
|
12
|
+
root: componentsRootProps
|
|
10
13
|
}
|
|
11
14
|
});
|
|
12
15
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
16
|
+
slotProps: {
|
|
17
|
+
root: slotsRootProps
|
|
18
|
+
},
|
|
13
19
|
slots: {
|
|
14
|
-
|
|
20
|
+
root: ComponentsRoot
|
|
15
21
|
}
|
|
16
22
|
});
|
|
17
23
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
18
24
|
slots: {
|
|
19
|
-
root:
|
|
20
|
-
|
|
25
|
+
root: SlotsRoot
|
|
26
|
+
},
|
|
27
|
+
slotProps: {
|
|
28
|
+
root: componentsRootProps
|
|
21
29
|
}
|
|
22
30
|
});
|
|
23
31
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
24
32
|
slots: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
transition: SlotTransition
|
|
33
|
+
root: SlotsRoot
|
|
34
|
+
},
|
|
35
|
+
slotProps: {
|
|
36
|
+
root: {
|
|
37
|
+
...componentsRootProps,
|
|
38
|
+
...slotsRootProps
|
|
39
|
+
}
|
|
33
40
|
}
|
|
34
41
|
});
|
|
42
|
+
|
|
35
43
|
// should skip non MUI components
|
|
36
44
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiBackdrop, {
|
|
37
|
-
|
|
45
|
+
components: {
|
|
46
|
+
Root: ComponentsRoot
|
|
47
|
+
}
|
|
38
48
|
});
|
|
@@ -3,16 +3,35 @@
|
|
|
3
3
|
fn({
|
|
4
4
|
MuiBackdrop: {
|
|
5
5
|
defaultProps: {
|
|
6
|
-
|
|
6
|
+
components: {
|
|
7
|
+
Root: ComponentsRoot
|
|
8
|
+
},
|
|
9
|
+
componentsProps: {
|
|
10
|
+
root: componentsRootProps
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
fn({
|
|
16
|
+
MuiBackdrop: {
|
|
17
|
+
defaultProps: {
|
|
18
|
+
components: {
|
|
19
|
+
Root: ComponentsRoot
|
|
20
|
+
},
|
|
21
|
+
slotProps: {
|
|
22
|
+
root: slotsRootProps
|
|
23
|
+
}
|
|
7
24
|
}
|
|
8
25
|
}
|
|
9
26
|
});
|
|
10
27
|
fn({
|
|
11
28
|
MuiBackdrop: {
|
|
12
29
|
defaultProps: {
|
|
13
|
-
TransitionComponent: CustomTransition,
|
|
14
30
|
slots: {
|
|
15
|
-
root:
|
|
31
|
+
root: SlotsRoot
|
|
32
|
+
},
|
|
33
|
+
componentsProps: {
|
|
34
|
+
root: componentsRootProps
|
|
16
35
|
}
|
|
17
36
|
}
|
|
18
37
|
}
|
|
@@ -20,10 +39,17 @@ fn({
|
|
|
20
39
|
fn({
|
|
21
40
|
MuiBackdrop: {
|
|
22
41
|
defaultProps: {
|
|
23
|
-
TransitionComponent: ComponentTransition,
|
|
24
42
|
slots: {
|
|
25
|
-
root:
|
|
26
|
-
|
|
43
|
+
root: SlotsRoot
|
|
44
|
+
},
|
|
45
|
+
components: {
|
|
46
|
+
Root: ComponentsRoot
|
|
47
|
+
},
|
|
48
|
+
slotProps: {
|
|
49
|
+
root: slotsRootProps
|
|
50
|
+
},
|
|
51
|
+
componentsProps: {
|
|
52
|
+
root: componentsRootProps
|
|
27
53
|
}
|
|
28
54
|
}
|
|
29
55
|
}
|
|
@@ -4,7 +4,10 @@ fn({
|
|
|
4
4
|
MuiBackdrop: {
|
|
5
5
|
defaultProps: {
|
|
6
6
|
slots: {
|
|
7
|
-
|
|
7
|
+
root: ComponentsRoot
|
|
8
|
+
},
|
|
9
|
+
slotProps: {
|
|
10
|
+
root: componentsRootProps
|
|
8
11
|
}
|
|
9
12
|
}
|
|
10
13
|
}
|
|
@@ -12,9 +15,11 @@ fn({
|
|
|
12
15
|
fn({
|
|
13
16
|
MuiBackdrop: {
|
|
14
17
|
defaultProps: {
|
|
18
|
+
slotProps: {
|
|
19
|
+
root: slotsRootProps
|
|
20
|
+
},
|
|
15
21
|
slots: {
|
|
16
|
-
root:
|
|
17
|
-
transition: CustomTransition
|
|
22
|
+
root: ComponentsRoot
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
}
|
|
@@ -23,8 +28,25 @@ fn({
|
|
|
23
28
|
MuiBackdrop: {
|
|
24
29
|
defaultProps: {
|
|
25
30
|
slots: {
|
|
26
|
-
root:
|
|
27
|
-
|
|
31
|
+
root: SlotsRoot
|
|
32
|
+
},
|
|
33
|
+
slotProps: {
|
|
34
|
+
root: componentsRootProps
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
fn({
|
|
40
|
+
MuiBackdrop: {
|
|
41
|
+
defaultProps: {
|
|
42
|
+
slots: {
|
|
43
|
+
root: SlotsRoot
|
|
44
|
+
},
|
|
45
|
+
slotProps: {
|
|
46
|
+
root: {
|
|
47
|
+
...componentsRootProps,
|
|
48
|
+
...slotsRootProps
|
|
49
|
+
}
|
|
28
50
|
}
|
|
29
51
|
}
|
|
30
52
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = transformer;
|
|
8
|
+
var _replaceComponentsWithSlots = _interopRequireDefault(require("../utils/replaceComponentsWithSlots"));
|
|
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, _replaceComponentsWithSlots.default)(j, {
|
|
18
|
+
root,
|
|
19
|
+
componentName: 'FilledInput'
|
|
20
|
+
});
|
|
21
|
+
return root.toSource(printOptions);
|
|
22
|
+
}
|