@mui/codemod 6.0.0-alpha.7 → 6.0.0-alpha.9
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 +227 -30
- package/node/deprecations/accordion-props/test-cases/actual.js +6 -3
- package/node/deprecations/accordion-props/test-cases/expected.js +14 -10
- package/node/deprecations/accordion-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/alert-props/test-cases/expected.js +12 -4
- package/node/deprecations/alert-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/all/deprecations-all.js +6 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +8 -6
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/avatar-group-props/avatar-group-props.js +87 -0
- package/node/deprecations/avatar-group-props/index.js +13 -0
- package/node/deprecations/avatar-group-props/test-cases/actual.js +56 -0
- package/node/deprecations/avatar-group-props/test-cases/expected.js +58 -0
- package/node/deprecations/avatar-group-props/test-cases/theme.actual.js +48 -0
- package/node/deprecations/avatar-group-props/test-cases/theme.expected.js +50 -0
- package/node/deprecations/avatar-props/test-cases/expected.js +8 -6
- package/node/deprecations/avatar-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/backdrop-props/test-cases/actual.js +3 -2
- package/node/deprecations/backdrop-props/test-cases/expected.js +3 -3
- package/node/deprecations/badge-props/test-cases/expected.js +12 -5
- package/node/deprecations/badge-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/form-control-label-props/test-cases/expected.js +4 -2
- package/node/deprecations/form-control-label-props/test-cases/theme.expected.js +4 -3
- package/node/deprecations/grid-props/grid-props.js +51 -0
- package/node/deprecations/grid-props/index.js +13 -0
- package/node/deprecations/grid-props/test-cases/actual.js +25 -0
- package/node/deprecations/grid-props/test-cases/expected.js +23 -0
- package/node/deprecations/grid-props/test-cases/theme.actual.js +24 -0
- package/node/deprecations/grid-props/test-cases/theme.expected.js +23 -0
- package/node/deprecations/list-item-props/index.js +13 -0
- package/node/deprecations/list-item-props/list-item-props.js +22 -0
- package/node/deprecations/list-item-props/test-cases/actual.js +43 -0
- package/node/deprecations/list-item-props/test-cases/expected.js +40 -0
- package/node/deprecations/list-item-props/test-cases/theme.actual.js +56 -0
- package/node/deprecations/list-item-props/test-cases/theme.expected.js +53 -0
- package/node/deprecations/popper-props/index.js +13 -0
- package/node/deprecations/popper-props/popper-props.js +22 -0
- package/node/deprecations/popper-props/test-cases/actual.js +27 -0
- package/node/deprecations/popper-props/test-cases/expected.js +24 -0
- package/node/deprecations/popper-props/test-cases/theme.actual.js +32 -0
- package/node/deprecations/popper-props/test-cases/theme.expected.js +29 -0
- package/node/deprecations/slider-props/test-cases/expected.js +12 -4
- package/node/deprecations/slider-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/speed-dial-props/test-cases/actual.js +3 -2
- package/node/deprecations/speed-dial-props/test-cases/expected.js +3 -3
- package/node/deprecations/step-label-props/test-cases/expected.js +8 -3
- package/node/deprecations/step-label-props/test-cases/theme.expected.js +8 -4
- package/node/deprecations/text-field-props/index.js +13 -0
- package/node/deprecations/text-field-props/test-cases/actual.js +27 -0
- package/node/deprecations/text-field-props/test-cases/expected.js +31 -0
- package/node/deprecations/text-field-props/test-cases/theme.actual.js +13 -0
- package/node/deprecations/text-field-props/test-cases/theme.expected.js +15 -0
- package/node/deprecations/text-field-props/text-field-props.js +48 -0
- package/node/deprecations/tooltip-props/index.js +13 -0
- package/node/deprecations/tooltip-props/test-cases/actual.js +92 -0
- package/node/deprecations/tooltip-props/test-cases/expected.js +84 -0
- package/node/deprecations/tooltip-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/tooltip-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/tooltip-props/tooltip-props.js +22 -0
- package/node/deprecations/utils/replaceComponentsWithSlots.js +29 -17
- package/node/util/migrateToVariants.js +198 -121
- package/node/v5.0.0/badge-overlap-value.test/actual.js +3 -4
- package/node/v5.0.0/badge-overlap-value.test/expected.js +3 -4
- package/node/v5.0.0/base-remove-component-prop.test/actual.js +4 -4
- package/node/v5.0.0/base-remove-component-prop.test/expected.js +4 -4
- package/node/v5.0.0/box-sx-prop.test/actual.js +4 -4
- package/node/v5.0.0/box-sx-prop.test/expected.js +3 -3
- package/node/v5.0.0/create-theme.test/custom-fn.actual.js +3 -4
- package/node/v5.0.0/create-theme.test/custom-fn.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/first.actual.js +11 -14
- package/node/v5.0.0/jss-to-styled.test/first.expected.js +11 -14
- package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +4 -4
- package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +4 -4
- package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +3 -4
- package/node/v5.0.0/jss-to-tss-react.test/actual-mixins-pattern.js +6 -5
- package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +6 -5
- package/node/v5.0.0/preset-safe.test/actual.js +6 -4
- package/node/v5.0.0/preset-safe.test/expected.js +9 -6
- package/node/v5.0.0/table-props.test/actual.js +4 -5
- package/node/v5.0.0/table-props.test/expected.js +4 -5
- package/node/v5.0.0/theme-spacing.test/large-actual.js +10 -10
- package/node/v5.0.0/theme-spacing.test/large-expected.js +10 -10
- package/node/v5.0.0/variant-prop.test/actual.js +12 -6
- package/node/v5.0.0/variant-prop.test/expected.js +15 -12
- package/node/v5.0.0/with-mobile-dialog.test/expected.js +6 -5
- package/node/v5.0.0/with-width.test/expected.js +6 -5
- package/node/v6.0.0/styled/test-cases/BasicStyled.actual.js +55 -44
- package/node/v6.0.0/styled/test-cases/BasicStyled.expected.js +5 -6
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.actual.js +80 -70
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +7 -6
- package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +32 -26
- package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +7 -6
- package/node/v6.0.0/styled/test-cases/ThemePaletteMode.expected.js +28 -26
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.actual.js +6 -5
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.expected.js +8 -8
- package/node/v6.0.0/sx-prop/index.js +13 -0
- package/node/v6.0.0/sx-prop/sx-v6.js +355 -0
- package/node/v6.0.0/sx-prop/test-cases/basic-sx.actual.js +36 -0
- package/node/v6.0.0/sx-prop/test-cases/basic-sx.expected.js +46 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.actual.js +41 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.expected.js +71 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.actual.js +87 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.expected.js +102 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.actual.js +49 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.expected.js +64 -0
- package/node/v6.0.0/system-props/index.js +13 -0
- package/node/v6.0.0/system-props/removeSystemProps.js +242 -0
- package/node/v6.0.0/system-props/test-cases/system-props.actual.js +79 -0
- package/node/v6.0.0/system-props/test-cases/system-props.expected.js +92 -0
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.actual.js +254 -225
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.expected.js +180 -162
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.actual.js +23 -21
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.expected.js +20 -19
- package/node/v6.0.0/theme-v6/theme-v6.js +2 -2
- package/package.json +4 -4
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _ListItem = _interopRequireDefault(require("@mui/material/ListItem"));
|
|
5
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
6
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItem.default, {
|
|
7
|
+
slots: {
|
|
8
|
+
root: ComponentsRoot
|
|
9
|
+
},
|
|
10
|
+
slotProps: {
|
|
11
|
+
root: componentsRootProps
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItem.default, {
|
|
15
|
+
slotProps: {
|
|
16
|
+
root: slotsRootProps
|
|
17
|
+
},
|
|
18
|
+
slots: {
|
|
19
|
+
root: ComponentsRoot
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItem.default, {
|
|
23
|
+
slots: {
|
|
24
|
+
root: SlotsRoot
|
|
25
|
+
},
|
|
26
|
+
slotProps: {
|
|
27
|
+
root: componentsRootProps
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItem.default, {
|
|
31
|
+
slots: {
|
|
32
|
+
root: SlotsRoot
|
|
33
|
+
},
|
|
34
|
+
slotProps: {
|
|
35
|
+
root: {
|
|
36
|
+
...componentsRootProps,
|
|
37
|
+
...slotsRootProps
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiListItem: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
components: {
|
|
7
|
+
Root: ComponentsRoot
|
|
8
|
+
},
|
|
9
|
+
componentsProps: {
|
|
10
|
+
root: componentsRootProps
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
fn({
|
|
16
|
+
MuiListItem: {
|
|
17
|
+
defaultProps: {
|
|
18
|
+
components: {
|
|
19
|
+
Root: ComponentsRoot
|
|
20
|
+
},
|
|
21
|
+
slotProps: {
|
|
22
|
+
root: slotsRootProps
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
fn({
|
|
28
|
+
MuiListItem: {
|
|
29
|
+
defaultProps: {
|
|
30
|
+
slots: {
|
|
31
|
+
root: SlotsRoot
|
|
32
|
+
},
|
|
33
|
+
componentsProps: {
|
|
34
|
+
root: componentsRootProps
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
fn({
|
|
40
|
+
MuiListItem: {
|
|
41
|
+
defaultProps: {
|
|
42
|
+
slots: {
|
|
43
|
+
root: SlotsRoot
|
|
44
|
+
},
|
|
45
|
+
components: {
|
|
46
|
+
Root: ComponentsRoot
|
|
47
|
+
},
|
|
48
|
+
slotProps: {
|
|
49
|
+
root: slotsRootProps
|
|
50
|
+
},
|
|
51
|
+
componentsProps: {
|
|
52
|
+
root: componentsRootProps
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiListItem: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
slots: {
|
|
7
|
+
root: ComponentsRoot
|
|
8
|
+
},
|
|
9
|
+
slotProps: {
|
|
10
|
+
root: componentsRootProps
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
fn({
|
|
16
|
+
MuiListItem: {
|
|
17
|
+
defaultProps: {
|
|
18
|
+
slotProps: {
|
|
19
|
+
root: slotsRootProps
|
|
20
|
+
},
|
|
21
|
+
slots: {
|
|
22
|
+
root: ComponentsRoot
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
fn({
|
|
28
|
+
MuiListItem: {
|
|
29
|
+
defaultProps: {
|
|
30
|
+
slots: {
|
|
31
|
+
root: SlotsRoot
|
|
32
|
+
},
|
|
33
|
+
slotProps: {
|
|
34
|
+
root: componentsRootProps
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
fn({
|
|
40
|
+
MuiListItem: {
|
|
41
|
+
defaultProps: {
|
|
42
|
+
slots: {
|
|
43
|
+
root: SlotsRoot
|
|
44
|
+
},
|
|
45
|
+
slotProps: {
|
|
46
|
+
root: {
|
|
47
|
+
...componentsRootProps,
|
|
48
|
+
...slotsRootProps
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _popperProps.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _popperProps = _interopRequireDefault(require("./popper-props"));
|
|
@@ -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: 'Popper'
|
|
20
|
+
});
|
|
21
|
+
return root.toSource(printOptions);
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
|
|
5
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
6
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Popper.default, {
|
|
7
|
+
components: {
|
|
8
|
+
Root: ComponentsRoot
|
|
9
|
+
},
|
|
10
|
+
componentsProps: {
|
|
11
|
+
root: componentsRootProps
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Popper.default, {
|
|
15
|
+
slots: {
|
|
16
|
+
root: SlotsRoot
|
|
17
|
+
},
|
|
18
|
+
components: {
|
|
19
|
+
Root: ComponentsRoot
|
|
20
|
+
},
|
|
21
|
+
slotProps: {
|
|
22
|
+
root: slotsRootProps
|
|
23
|
+
},
|
|
24
|
+
componentsProps: {
|
|
25
|
+
root: componentsRootProps
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
|
|
5
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
6
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Popper.default, {
|
|
7
|
+
slots: {
|
|
8
|
+
root: ComponentsRoot
|
|
9
|
+
},
|
|
10
|
+
slotProps: {
|
|
11
|
+
root: componentsRootProps
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Popper.default, {
|
|
15
|
+
slots: {
|
|
16
|
+
root: SlotsRoot
|
|
17
|
+
},
|
|
18
|
+
slotProps: {
|
|
19
|
+
root: {
|
|
20
|
+
...componentsRootProps,
|
|
21
|
+
...slotsRootProps
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiPopper: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
components: {
|
|
7
|
+
Root: ComponentsRoot
|
|
8
|
+
},
|
|
9
|
+
componentsProps: {
|
|
10
|
+
root: componentsRootProps
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
fn({
|
|
16
|
+
MuiPopper: {
|
|
17
|
+
defaultProps: {
|
|
18
|
+
components: {
|
|
19
|
+
Root: ComponentsRoot
|
|
20
|
+
},
|
|
21
|
+
slots: {
|
|
22
|
+
root: SlotsRoot
|
|
23
|
+
},
|
|
24
|
+
componentsProps: {
|
|
25
|
+
root: componentsRootProps
|
|
26
|
+
},
|
|
27
|
+
slotProps: {
|
|
28
|
+
root: slotsRootProps
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiPopper: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
slots: {
|
|
7
|
+
root: ComponentsRoot
|
|
8
|
+
},
|
|
9
|
+
slotProps: {
|
|
10
|
+
root: componentsRootProps
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
fn({
|
|
16
|
+
MuiPopper: {
|
|
17
|
+
defaultProps: {
|
|
18
|
+
slots: {
|
|
19
|
+
root: SlotsRoot
|
|
20
|
+
},
|
|
21
|
+
slotProps: {
|
|
22
|
+
root: {
|
|
23
|
+
...componentsRootProps,
|
|
24
|
+
...slotsRootProps
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
4
|
var _Slider = _interopRequireDefault(require("@mui/material/Slider"));
|
|
6
5
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
6
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider.default, {
|
|
@@ -29,7 +28,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
29
28
|
},
|
|
30
29
|
slotProps: {
|
|
31
30
|
rail: slotsRailProps,
|
|
32
|
-
track:
|
|
31
|
+
track: {
|
|
32
|
+
...componentsTrackProps,
|
|
33
|
+
...slotsTrackProps
|
|
34
|
+
}
|
|
33
35
|
}
|
|
34
36
|
});
|
|
35
37
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Slider.default, {
|
|
@@ -38,7 +40,13 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
38
40
|
track: SlotsTrack
|
|
39
41
|
},
|
|
40
42
|
slotProps: {
|
|
41
|
-
track:
|
|
42
|
-
|
|
43
|
+
track: {
|
|
44
|
+
...componentsTrackProps,
|
|
45
|
+
...slotsTrackProps
|
|
46
|
+
},
|
|
47
|
+
rail: {
|
|
48
|
+
...componentsRailProps,
|
|
49
|
+
...slotsRailProps
|
|
50
|
+
}
|
|
43
51
|
}
|
|
44
52
|
});
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
3
|
fn({
|
|
6
4
|
MuiSlider: {
|
|
7
5
|
defaultProps: {
|
|
@@ -36,7 +34,10 @@ fn({
|
|
|
36
34
|
rail: SlotsRail
|
|
37
35
|
},
|
|
38
36
|
slotProps: {
|
|
39
|
-
track:
|
|
37
|
+
track: {
|
|
38
|
+
...componentsTrackProps,
|
|
39
|
+
...slotsTrackProps
|
|
40
|
+
},
|
|
40
41
|
rail: slotsRailProps
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -50,8 +51,14 @@ fn({
|
|
|
50
51
|
rail: SlotsRail
|
|
51
52
|
},
|
|
52
53
|
slotProps: {
|
|
53
|
-
track:
|
|
54
|
-
|
|
54
|
+
track: {
|
|
55
|
+
...componentsTrackProps,
|
|
56
|
+
...slotsTrackProps
|
|
57
|
+
},
|
|
58
|
+
rail: {
|
|
59
|
+
...componentsRailProps,
|
|
60
|
+
...slotsRailProps
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
4
|
var _SpeedDial = _interopRequireDefault(require("@mui/material/SpeedDial"));
|
|
6
5
|
var _material = require("@mui/material");
|
|
7
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -23,7 +22,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
23
22
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.SpeedDial, {
|
|
24
23
|
TransitionComponent: CustomTransition,
|
|
25
24
|
TransitionProps: CustomTransitionProps,
|
|
26
|
-
slots:
|
|
25
|
+
slots: {
|
|
26
|
+
...outerSlots
|
|
27
|
+
}
|
|
27
28
|
});
|
|
28
29
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_SpeedDial.default, {
|
|
29
30
|
TransitionComponent: ComponentTransition,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
4
|
var _SpeedDial = _interopRequireDefault(require("@mui/material/SpeedDial"));
|
|
6
5
|
var _material = require("@mui/material");
|
|
7
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -31,9 +30,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
32
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.SpeedDial, {
|
|
34
|
-
slots:
|
|
33
|
+
slots: {
|
|
34
|
+
...outerSlots,
|
|
35
35
|
transition: CustomTransition
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
37
|
slotProps: {
|
|
38
38
|
transition: CustomTransitionProps
|
|
39
39
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
4
|
var _StepLabel = _interopRequireDefault(require("@mui/material/StepLabel"));
|
|
6
5
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
6
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_StepLabel.default, {
|
|
@@ -14,7 +13,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
13
|
label: SlotsLabel
|
|
15
14
|
},
|
|
16
15
|
slotProps: {
|
|
17
|
-
label:
|
|
16
|
+
label: {
|
|
17
|
+
...componentsLabelProps,
|
|
18
|
+
...slotLabelProps
|
|
19
|
+
}
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
22
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_StepLabel.default, {
|
|
@@ -29,7 +31,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
29
31
|
stepIcon: StepIconComponent
|
|
30
32
|
},
|
|
31
33
|
slotProps: {
|
|
32
|
-
label:
|
|
34
|
+
label: {
|
|
35
|
+
...componentsLabelProps,
|
|
36
|
+
...slotLabelProps
|
|
37
|
+
},
|
|
33
38
|
stepIcon: StepIconProps
|
|
34
39
|
}
|
|
35
40
|
});
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
3
|
fn({
|
|
6
4
|
MuiStepLabel: {
|
|
7
5
|
defaultProps: {
|
|
@@ -15,7 +13,10 @@ fn({
|
|
|
15
13
|
MuiStepLabel: {
|
|
16
14
|
defaultProps: {
|
|
17
15
|
slotProps: {
|
|
18
|
-
label:
|
|
16
|
+
label: {
|
|
17
|
+
...componentsLabelProps,
|
|
18
|
+
...slotLabelProps
|
|
19
|
+
}
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -36,7 +37,10 @@ fn({
|
|
|
36
37
|
MuiStepLabel: {
|
|
37
38
|
defaultProps: {
|
|
38
39
|
slotProps: {
|
|
39
|
-
label:
|
|
40
|
+
label: {
|
|
41
|
+
...componentsLabelProps,
|
|
42
|
+
...slotLabelProps
|
|
43
|
+
},
|
|
40
44
|
stepIcon: StepIconProps
|
|
41
45
|
},
|
|
42
46
|
slots: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _textFieldProps.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _textFieldProps = _interopRequireDefault(require("./text-field-props"));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
|
8
|
+
InputProps: CustomInputProps,
|
|
9
|
+
inputProps: CustomHtmlInputProps,
|
|
10
|
+
SelectProps: CustomSelectProps,
|
|
11
|
+
InputLabelProps: CustomInputLabelProps,
|
|
12
|
+
FormHelperTextProps: CustomFormHelperProps
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
15
|
+
InputProps: CustomInputProps,
|
|
16
|
+
inputProps: CustomHtmlInputProps,
|
|
17
|
+
SelectProps: CustomSelectProps,
|
|
18
|
+
InputLabelProps: CustomInputLabelProps,
|
|
19
|
+
FormHelperTextProps: CustomFormHelperProps
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiTextField, {
|
|
22
|
+
InputProps: CustomInputProps,
|
|
23
|
+
inputProps: CustomHtmlInputProps,
|
|
24
|
+
SelectProps: CustomSelectProps,
|
|
25
|
+
InputLabelProps: CustomInputLabelProps,
|
|
26
|
+
FormHelperTextProps: CustomFormHelperProps
|
|
27
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
|
8
|
+
slotProps: {
|
|
9
|
+
input: CustomInputProps,
|
|
10
|
+
htmlInput: CustomHtmlInputProps,
|
|
11
|
+
select: CustomSelectProps,
|
|
12
|
+
inputLabel: CustomInputLabelProps,
|
|
13
|
+
formHelperText: CustomFormHelperProps
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
17
|
+
slotProps: {
|
|
18
|
+
input: CustomInputProps,
|
|
19
|
+
htmlInput: CustomHtmlInputProps,
|
|
20
|
+
select: CustomSelectProps,
|
|
21
|
+
inputLabel: CustomInputLabelProps,
|
|
22
|
+
formHelperText: CustomFormHelperProps
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiTextField, {
|
|
26
|
+
InputProps: CustomInputProps,
|
|
27
|
+
inputProps: CustomHtmlInputProps,
|
|
28
|
+
SelectProps: CustomSelectProps,
|
|
29
|
+
InputLabelProps: CustomInputLabelProps,
|
|
30
|
+
FormHelperTextProps: CustomFormHelperProps
|
|
31
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiTextField: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
InputProps: CustomInputProps,
|
|
7
|
+
inputProps: CustomHtmlInputProps,
|
|
8
|
+
SelectProps: CustomSelectProps,
|
|
9
|
+
InputLabelProps: CustomInputLabelProps,
|
|
10
|
+
FormHelperTextProps: CustomFormHelperProps
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiTextField: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
slotProps: {
|
|
7
|
+
input: CustomInputProps,
|
|
8
|
+
htmlInput: CustomHtmlInputProps,
|
|
9
|
+
select: CustomSelectProps,
|
|
10
|
+
inputLabel: CustomInputLabelProps,
|
|
11
|
+
formHelperText: CustomFormHelperProps
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
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 _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
|
+
componentName: 'TextField',
|
|
20
|
+
propName: 'InputProps',
|
|
21
|
+
slotName: 'input'
|
|
22
|
+
});
|
|
23
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
24
|
+
root,
|
|
25
|
+
componentName: 'TextField',
|
|
26
|
+
propName: 'inputProps',
|
|
27
|
+
slotName: 'htmlInput'
|
|
28
|
+
});
|
|
29
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
30
|
+
root,
|
|
31
|
+
componentName: 'TextField',
|
|
32
|
+
propName: 'SelectProps',
|
|
33
|
+
slotName: 'select'
|
|
34
|
+
});
|
|
35
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
36
|
+
root,
|
|
37
|
+
componentName: 'TextField',
|
|
38
|
+
propName: 'InputLabelProps',
|
|
39
|
+
slotName: 'inputLabel'
|
|
40
|
+
});
|
|
41
|
+
(0, _movePropIntoSlotProps.default)(j, {
|
|
42
|
+
root,
|
|
43
|
+
componentName: 'TextField',
|
|
44
|
+
propName: 'FormHelperTextProps',
|
|
45
|
+
slotName: 'formHelperText'
|
|
46
|
+
});
|
|
47
|
+
return root.toSource(printOptions);
|
|
48
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _tooltipProps.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _tooltipProps = _interopRequireDefault(require("./tooltip-props"));
|