@mui/codemod 6.0.0-alpha.6 → 6.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- 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/all/postcss.config.js +4 -1
- package/node/deprecations/autocomplete-props/autocomplete-props.js +54 -0
- package/node/deprecations/autocomplete-props/index.js +13 -0
- package/node/deprecations/autocomplete-props/test-cases/actual.js +97 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +103 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.actual.js +65 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +69 -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/circular-progress-classes/circular-progress-classes.js +77 -0
- package/node/deprecations/circular-progress-classes/index.js +13 -0
- package/node/deprecations/circular-progress-classes/postcss-plugin.js +33 -0
- package/node/deprecations/circular-progress-classes/postcss.config.js +8 -0
- package/node/deprecations/circular-progress-classes/test-cases/actual.js +7 -0
- package/node/deprecations/circular-progress-classes/test-cases/expected.js +7 -0
- package/node/deprecations/divider-props/divider-props.js +36 -30
- package/node/deprecations/divider-props/test-cases/actual.js +3 -0
- package/node/deprecations/divider-props/test-cases/expected.js +3 -0
- package/node/deprecations/divider-props/test-cases/theme.actual.js +7 -0
- package/node/deprecations/divider-props/test-cases/theme.expected.js +7 -0
- 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/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/utils/replaceComponentsWithSlots.js +29 -17
- package/node/util/migrateToVariants.js +50 -31
- 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/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/package.json +5 -5
package/README.md
CHANGED
|
@@ -259,6 +259,72 @@ npx @mui/codemod@next deprecations/alert-classes <path>
|
|
|
259
259
|
npx @mui/codemod@next deprecations/alert-props <path>
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
+
#### `autocomplete-props`
|
|
263
|
+
|
|
264
|
+
```diff
|
|
265
|
+
<Autocomplete
|
|
266
|
+
- ChipProps={{ height: 10 }}
|
|
267
|
+
- PaperComponent={CustomPaper}
|
|
268
|
+
- PopperComponent={CustomPopper}
|
|
269
|
+
- ListboxComponent={CustomListbox}
|
|
270
|
+
- ListboxProps={{ height: 12 }}
|
|
271
|
+
- componentsProps={{
|
|
272
|
+
- clearIndicator: { width: 10 },
|
|
273
|
+
- paper: { width: 12 },
|
|
274
|
+
- popper: { width: 14 },
|
|
275
|
+
- popupIndicator: { width: 16 },
|
|
276
|
+
- }}
|
|
277
|
+
+ slots={{
|
|
278
|
+
+ paper: CustomPaper,
|
|
279
|
+
+ popper: CustomPopper,
|
|
280
|
+
+ listbox: CustomListbox,
|
|
281
|
+
+ }}
|
|
282
|
+
+ slotProps={{
|
|
283
|
+
+ chip: { height: 10 },
|
|
284
|
+
+ listbox: { height: 12 },
|
|
285
|
+
+ clearIndicator: { width: 10 },
|
|
286
|
+
+ paper: { width: 12 },
|
|
287
|
+
+ popper: { width: 14 },
|
|
288
|
+
+ popupIndicator: { width: 16 },
|
|
289
|
+
+ }}
|
|
290
|
+
/>
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
```diff
|
|
294
|
+
MuiAutocomplete: {
|
|
295
|
+
defaultProps: {
|
|
296
|
+
- ChipProps: { height: 10 },
|
|
297
|
+
- PaperComponent: CustomPaper,
|
|
298
|
+
- PopperComponent: CustomPopper,
|
|
299
|
+
- ListboxComponent: CustomListbox,
|
|
300
|
+
- ListboxProps: { height: 12 },
|
|
301
|
+
- componentsProps: {
|
|
302
|
+
- clearIndicator: { width: 10 },
|
|
303
|
+
- paper: { width: 12 },
|
|
304
|
+
- popper: { width: 14 },
|
|
305
|
+
- popupIndicator: { width: 16 },
|
|
306
|
+
- }
|
|
307
|
+
+ slots: {
|
|
308
|
+
+ paper: CustomPaper,
|
|
309
|
+
+ popper: CustomPopper,
|
|
310
|
+
+ listbox: CustomListbox,
|
|
311
|
+
+ },
|
|
312
|
+
+ slotProps: {
|
|
313
|
+
+ chip: { height: 10 },
|
|
314
|
+
+ listbox: { height: 12 },
|
|
315
|
+
+ clearIndicator: { width: 10 },
|
|
316
|
+
+ paper: { width: 12 },
|
|
317
|
+
+ popper: { width: 14 },
|
|
318
|
+
+ popupIndicator: { width: 16 },
|
|
319
|
+
+ },
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
npx @mui/codemod@next deprecations/autocomplete-props <path>
|
|
326
|
+
```
|
|
327
|
+
|
|
262
328
|
#### `avatar-props`
|
|
263
329
|
|
|
264
330
|
```diff
|
|
@@ -845,6 +911,42 @@ CSS transforms:
|
|
|
845
911
|
npx @mui/codemod@next deprecations/chip-classes <path>
|
|
846
912
|
```
|
|
847
913
|
|
|
914
|
+
#### `circular-progress-classes`
|
|
915
|
+
|
|
916
|
+
JS transforms:
|
|
917
|
+
|
|
918
|
+
```diff
|
|
919
|
+
import { circularProgressClasses } from '@mui/material/CircularProgress';
|
|
920
|
+
|
|
921
|
+
MuiCircularProgress: {
|
|
922
|
+
styleOverrides: {
|
|
923
|
+
root: {
|
|
924
|
+
- [`& .${circularProgressClasses.circleDeterminate}`]: {
|
|
925
|
+
+ [`&.${circularProgressClasses.determinate} > .${circularProgressClasses.circle}`]: {
|
|
926
|
+
color: 'red',
|
|
927
|
+
},
|
|
928
|
+
- [`& .${circularProgressClasses.circleIndeterminate}`]: {
|
|
929
|
+
+ [`&.${circularProgressClasses.indeterminate} > .${circularProgressClasses.circle}`]: {
|
|
930
|
+
color: 'red',
|
|
931
|
+
},
|
|
932
|
+
},
|
|
933
|
+
},
|
|
934
|
+
},
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
CSS transforms:
|
|
938
|
+
|
|
939
|
+
```diff
|
|
940
|
+
- .MuiCircularProgress-circleDeterminate
|
|
941
|
+
+.MuiCircularProgress-determinate > .MuiCircularProgress-circle
|
|
942
|
+
- .MuiCircularProgress-circleIndeterminate
|
|
943
|
+
+.MuiCircularProgress-indeterminate > .MuiCircularProgress-circle
|
|
944
|
+
```
|
|
945
|
+
|
|
946
|
+
```bash
|
|
947
|
+
npx @mui/codemod@next deprecations/circular-progress-classes <path>
|
|
948
|
+
```
|
|
949
|
+
|
|
848
950
|
#### `divider-props`
|
|
849
951
|
|
|
850
952
|
```diff
|
|
@@ -993,6 +1095,29 @@ npx @mui/codemod@next deprecations/pagination-item-props <path>
|
|
|
993
1095
|
npx @mui/codemod@next deprecations/slider-props <path>
|
|
994
1096
|
```
|
|
995
1097
|
|
|
1098
|
+
#### `text-field-props`
|
|
1099
|
+
|
|
1100
|
+
```diff
|
|
1101
|
+
<TextField
|
|
1102
|
+
- InputProps={CustomInputProps}
|
|
1103
|
+
- inputProps={CustomHtmlInputProps}
|
|
1104
|
+
- SelectProps={CustomSelectProps}
|
|
1105
|
+
- InputLabelProps={CustomInputLabelProps}
|
|
1106
|
+
- FormHelperTextProps={CustomFormHelperProps}
|
|
1107
|
+
+ slotProps={{
|
|
1108
|
+
+ input: CustomInputProps
|
|
1109
|
+
+ htmlInput: CustomHtmlInputProps
|
|
1110
|
+
+ select: CustomSelectProps
|
|
1111
|
+
+ inputLabel: CustomInputLabelProps
|
|
1112
|
+
+ formHelper: CustomFormHelperProps
|
|
1113
|
+
+ }}
|
|
1114
|
+
/>
|
|
1115
|
+
```
|
|
1116
|
+
|
|
1117
|
+
```bash
|
|
1118
|
+
npx @mui/codemod@next deprecations/text-field-props <path>
|
|
1119
|
+
```
|
|
1120
|
+
|
|
996
1121
|
#### `toggle-button-group-classes`
|
|
997
1122
|
|
|
998
1123
|
JS transforms:
|
|
@@ -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 _Accordion = _interopRequireDefault(require("@mui/material/Accordion"));
|
|
6
5
|
var _material = require("@mui/material");
|
|
7
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -34,8 +33,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
34
33
|
TransitionProps: {
|
|
35
34
|
unmountOnExit: true
|
|
36
35
|
},
|
|
37
|
-
slots:
|
|
38
|
-
|
|
36
|
+
slots: {
|
|
37
|
+
...outerSlots
|
|
38
|
+
},
|
|
39
|
+
slotProps: {
|
|
40
|
+
...outerSlotProps
|
|
41
|
+
}
|
|
39
42
|
});
|
|
40
43
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Accordion.default, {
|
|
41
44
|
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 _Accordion = _interopRequireDefault(require("@mui/material/Accordion"));
|
|
6
5
|
var _material = require("@mui/material");
|
|
7
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -38,14 +37,16 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Accordion, {
|
|
41
|
-
slots:
|
|
40
|
+
slots: {
|
|
41
|
+
...outerSlots,
|
|
42
42
|
transition: CustomTransition
|
|
43
|
-
}
|
|
44
|
-
slotProps:
|
|
43
|
+
},
|
|
44
|
+
slotProps: {
|
|
45
|
+
...outerSlotProps,
|
|
45
46
|
transition: {
|
|
46
47
|
unmountOnExit: true
|
|
47
48
|
}
|
|
48
|
-
}
|
|
49
|
+
}
|
|
49
50
|
});
|
|
50
51
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Accordion.default, {
|
|
51
52
|
slots: {
|
|
@@ -54,11 +55,14 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
54
55
|
});
|
|
55
56
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Accordion.default, {
|
|
56
57
|
slotProps: {
|
|
57
|
-
transition:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
transition: {
|
|
59
|
+
...{
|
|
60
|
+
unmountOnExit: true
|
|
61
|
+
},
|
|
62
|
+
...{
|
|
63
|
+
id: 'test'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
62
66
|
}
|
|
63
67
|
});
|
|
64
68
|
// should skip non MUI components
|
|
@@ -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
|
MuiAccordion: {
|
|
7
5
|
defaultProps: {
|
|
@@ -29,11 +27,14 @@ fn({
|
|
|
29
27
|
MuiAccordion: {
|
|
30
28
|
defaultProps: {
|
|
31
29
|
slotProps: {
|
|
32
|
-
transition:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
transition: {
|
|
31
|
+
...{
|
|
32
|
+
unmountOnExit: true
|
|
33
|
+
},
|
|
34
|
+
...{
|
|
35
|
+
id: 'test'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -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 _Alert = _interopRequireDefault(require("@mui/material/Alert"));
|
|
6
5
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
6
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.default, {
|
|
@@ -29,7 +28,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
29
28
|
},
|
|
30
29
|
slotProps: {
|
|
31
30
|
closeIcon: slotsIconProps,
|
|
32
|
-
closeButton:
|
|
31
|
+
closeButton: {
|
|
32
|
+
...componentsButtonProps,
|
|
33
|
+
...slotsButtonProps
|
|
34
|
+
}
|
|
33
35
|
}
|
|
34
36
|
});
|
|
35
37
|
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.default, {
|
|
@@ -38,7 +40,13 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
38
40
|
closeButton: SlotsButton
|
|
39
41
|
},
|
|
40
42
|
slotProps: {
|
|
41
|
-
closeButton:
|
|
42
|
-
|
|
43
|
+
closeButton: {
|
|
44
|
+
...componentsButtonProps,
|
|
45
|
+
...slotsButtonProps
|
|
46
|
+
},
|
|
47
|
+
closeIcon: {
|
|
48
|
+
...componentsIconProps,
|
|
49
|
+
...slotsIconProps
|
|
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
|
MuiAlert: {
|
|
7
5
|
defaultProps: {
|
|
@@ -36,7 +34,10 @@ fn({
|
|
|
36
34
|
closeIcon: SlotsIcon
|
|
37
35
|
},
|
|
38
36
|
slotProps: {
|
|
39
|
-
closeButton:
|
|
37
|
+
closeButton: {
|
|
38
|
+
...componentsButtonProps,
|
|
39
|
+
...slotsButtonProps
|
|
40
|
+
},
|
|
40
41
|
closeIcon: slotsIconProps
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -50,8 +51,14 @@ fn({
|
|
|
50
51
|
closeIcon: SlotsIcon
|
|
51
52
|
},
|
|
52
53
|
slotProps: {
|
|
53
|
-
closeButton:
|
|
54
|
-
|
|
54
|
+
closeButton: {
|
|
55
|
+
...componentsButtonProps,
|
|
56
|
+
...slotsButtonProps
|
|
57
|
+
},
|
|
58
|
+
closeIcon: {
|
|
59
|
+
...componentsIconProps,
|
|
60
|
+
...slotsIconProps
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = deprecationsAll;
|
|
8
8
|
var _accordionProps = _interopRequireDefault(require("../accordion-props"));
|
|
9
|
+
var _autocompleteProps = _interopRequireDefault(require("../autocomplete-props"));
|
|
9
10
|
var _formControlLabelProps = _interopRequireDefault(require("../form-control-label-props"));
|
|
10
11
|
var _avatarProps = _interopRequireDefault(require("../avatar-props"));
|
|
11
12
|
var _dividerProps = _interopRequireDefault(require("../divider-props"));
|
|
@@ -19,13 +20,16 @@ var _toggleButtonGroupClasses = _interopRequireDefault(require("../toggle-button
|
|
|
19
20
|
var _stepLabelProps = _interopRequireDefault(require("../step-label-props"));
|
|
20
21
|
var _backdropProps = _interopRequireDefault(require("../backdrop-props"));
|
|
21
22
|
var _stepConnectorClasses = _interopRequireDefault(require("../step-connector-classes"));
|
|
23
|
+
var _circularProgressClasses = _interopRequireDefault(require("../circular-progress-classes"));
|
|
22
24
|
var _speedDialProps = _interopRequireDefault(require("../speed-dial-props"));
|
|
25
|
+
var _textFieldProps = _interopRequireDefault(require("../text-field-props"));
|
|
23
26
|
/**
|
|
24
27
|
* @param {import('jscodeshift').FileInfo} file
|
|
25
28
|
* @param {import('jscodeshift').API} api
|
|
26
29
|
*/
|
|
27
30
|
function deprecationsAll(file, api, options) {
|
|
28
31
|
file.source = (0, _accordionProps.default)(file, api, options);
|
|
32
|
+
file.source = (0, _autocompleteProps.default)(file, api, options);
|
|
29
33
|
file.source = (0, _formControlLabelProps.default)(file, api, options);
|
|
30
34
|
file.source = (0, _avatarProps.default)(file, api, options);
|
|
31
35
|
file.source = (0, _dividerProps.default)(file, api, options);
|
|
@@ -39,6 +43,8 @@ function deprecationsAll(file, api, options) {
|
|
|
39
43
|
file.source = (0, _stepLabelProps.default)(file, api, options);
|
|
40
44
|
file.source = (0, _backdropProps.default)(file, api, options);
|
|
41
45
|
file.source = (0, _stepConnectorClasses.default)(file, api, options);
|
|
46
|
+
file.source = (0, _circularProgressClasses.default)(file, api, options);
|
|
42
47
|
file.source = (0, _speedDialProps.default)(file, api, options);
|
|
48
|
+
file.source = (0, _textFieldProps.default)(file, api, options);
|
|
43
49
|
return file.source;
|
|
44
50
|
}
|
|
@@ -24,6 +24,9 @@ const {
|
|
|
24
24
|
const {
|
|
25
25
|
plugin: toggleButtonGroupClassesPlugin
|
|
26
26
|
} = require('../toggle-button-group-classes/postcss-plugin');
|
|
27
|
+
const {
|
|
28
|
+
plugin: circularProgressClassesPlugin
|
|
29
|
+
} = require('../circular-progress-classes/postcss-plugin');
|
|
27
30
|
module.exports = {
|
|
28
|
-
plugins: [accordionSummaryClassesPlugin, alertClassesPlugin, buttonClassesPlugin, buttonGroupClassesPlugin, chipClassesPlugin, paginationItemClassesPlugin, stepConnectorClassesPlugin, toggleButtonGroupClassesPlugin]
|
|
31
|
+
plugins: [accordionSummaryClassesPlugin, alertClassesPlugin, buttonClassesPlugin, buttonGroupClassesPlugin, chipClassesPlugin, circularProgressClassesPlugin, paginationItemClassesPlugin, stepConnectorClassesPlugin, toggleButtonGroupClassesPlugin]
|
|
29
32
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
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 _movePropIntoSlots = _interopRequireDefault(require("../utils/movePropIntoSlots"));
|
|
9
|
+
var _movePropIntoSlotProps = _interopRequireDefault(require("../utils/movePropIntoSlotProps"));
|
|
10
|
+
var _replaceComponentsWithSlots = _interopRequireDefault(require("../utils/replaceComponentsWithSlots"));
|
|
11
|
+
/**
|
|
12
|
+
* @param {import('jscodeshift').FileInfo} file
|
|
13
|
+
* @param {import('jscodeshift').API} api
|
|
14
|
+
*/
|
|
15
|
+
function transformer(file, api, options) {
|
|
16
|
+
const j = api.jscodeshift;
|
|
17
|
+
const root = j(file.source);
|
|
18
|
+
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
|
+
(0, _replaceComponentsWithSlots.default)(j, {
|
|
50
|
+
root,
|
|
51
|
+
componentName: 'Autocomplete'
|
|
52
|
+
});
|
|
53
|
+
return root.toSource(printOptions);
|
|
54
|
+
}
|
|
@@ -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 _autocompleteProps.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _autocompleteProps = _interopRequireDefault(require("./autocomplete-props"));
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
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
|
+
componentsProps: {
|
|
18
|
+
clearIndicator: {
|
|
19
|
+
width: 10
|
|
20
|
+
},
|
|
21
|
+
paper: {
|
|
22
|
+
width: 12
|
|
23
|
+
},
|
|
24
|
+
popper: {
|
|
25
|
+
width: 14
|
|
26
|
+
},
|
|
27
|
+
popupIndicator: {
|
|
28
|
+
width: 16
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
/*#__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
|
+
slotProps: {
|
|
43
|
+
popupIndicator: {
|
|
44
|
+
width: 20
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
componentsProps: {
|
|
48
|
+
clearIndicator: {
|
|
49
|
+
width: 10
|
|
50
|
+
},
|
|
51
|
+
paper: {
|
|
52
|
+
width: 12
|
|
53
|
+
},
|
|
54
|
+
popper: {
|
|
55
|
+
width: 14
|
|
56
|
+
},
|
|
57
|
+
popupIndicator: {
|
|
58
|
+
width: 16
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
/*#__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
|
+
componentsProps: {
|
|
73
|
+
clearIndicator: {
|
|
74
|
+
width: 10
|
|
75
|
+
},
|
|
76
|
+
paper: {
|
|
77
|
+
width: 12
|
|
78
|
+
},
|
|
79
|
+
popper: {
|
|
80
|
+
width: 14
|
|
81
|
+
},
|
|
82
|
+
popupIndicator: {
|
|
83
|
+
width: 16
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomAutocomplete, {
|
|
88
|
+
ChipProps: {
|
|
89
|
+
height: 10
|
|
90
|
+
},
|
|
91
|
+
PaperComponent: CustomPaper,
|
|
92
|
+
PopperComponent: CustomPopper,
|
|
93
|
+
ListboxComponent: CustomListbox,
|
|
94
|
+
ListboxProps: {
|
|
95
|
+
height: 12
|
|
96
|
+
}
|
|
97
|
+
});
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete"));
|
|
5
|
+
var _material = require("@mui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, {
|
|
8
|
+
slots: {
|
|
9
|
+
paper: CustomPaper,
|
|
10
|
+
popper: CustomPopper,
|
|
11
|
+
listbox: CustomListbox
|
|
12
|
+
},
|
|
13
|
+
slotProps: {
|
|
14
|
+
listbox: {
|
|
15
|
+
height: 12
|
|
16
|
+
},
|
|
17
|
+
chip: {
|
|
18
|
+
height: 10
|
|
19
|
+
},
|
|
20
|
+
clearIndicator: {
|
|
21
|
+
width: 10
|
|
22
|
+
},
|
|
23
|
+
paper: {
|
|
24
|
+
width: 12
|
|
25
|
+
},
|
|
26
|
+
popper: {
|
|
27
|
+
width: 14
|
|
28
|
+
},
|
|
29
|
+
popupIndicator: {
|
|
30
|
+
width: 16
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, {
|
|
35
|
+
slotProps: {
|
|
36
|
+
listbox: {
|
|
37
|
+
height: 12
|
|
38
|
+
},
|
|
39
|
+
chip: {
|
|
40
|
+
height: 10
|
|
41
|
+
},
|
|
42
|
+
clearIndicator: {
|
|
43
|
+
width: 10
|
|
44
|
+
},
|
|
45
|
+
paper: {
|
|
46
|
+
width: 12
|
|
47
|
+
},
|
|
48
|
+
popper: {
|
|
49
|
+
width: 14
|
|
50
|
+
},
|
|
51
|
+
popupIndicator: {
|
|
52
|
+
...{
|
|
53
|
+
width: 16
|
|
54
|
+
},
|
|
55
|
+
...{
|
|
56
|
+
width: 20
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
slots: {
|
|
61
|
+
paper: CustomPaper,
|
|
62
|
+
popper: CustomPopper,
|
|
63
|
+
listbox: CustomListbox
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Autocomplete, {
|
|
67
|
+
slots: {
|
|
68
|
+
paper: CustomPaper,
|
|
69
|
+
popper: CustomPopper,
|
|
70
|
+
listbox: CustomListbox
|
|
71
|
+
},
|
|
72
|
+
slotProps: {
|
|
73
|
+
listbox: {
|
|
74
|
+
height: 12
|
|
75
|
+
},
|
|
76
|
+
chip: {
|
|
77
|
+
height: 10
|
|
78
|
+
},
|
|
79
|
+
clearIndicator: {
|
|
80
|
+
width: 10
|
|
81
|
+
},
|
|
82
|
+
paper: {
|
|
83
|
+
width: 12
|
|
84
|
+
},
|
|
85
|
+
popper: {
|
|
86
|
+
width: 14
|
|
87
|
+
},
|
|
88
|
+
popupIndicator: {
|
|
89
|
+
width: 16
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomAutocomplete, {
|
|
94
|
+
ChipProps: {
|
|
95
|
+
height: 10
|
|
96
|
+
},
|
|
97
|
+
PaperComponent: CustomPaper,
|
|
98
|
+
PopperComponent: CustomPopper,
|
|
99
|
+
ListboxComponent: CustomListbox,
|
|
100
|
+
ListboxProps: {
|
|
101
|
+
height: 12
|
|
102
|
+
}
|
|
103
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
fn({
|
|
4
|
+
MuiAutocomplete: {
|
|
5
|
+
defaultProps: {
|
|
6
|
+
ChipProps: {
|
|
7
|
+
height: 10
|
|
8
|
+
},
|
|
9
|
+
PaperComponent: CustomPaper,
|
|
10
|
+
PopperComponent: CustomPopper,
|
|
11
|
+
ListboxComponent: CustomListbox,
|
|
12
|
+
ListboxProps: {
|
|
13
|
+
height: 12
|
|
14
|
+
},
|
|
15
|
+
componentsProps: {
|
|
16
|
+
clearIndicator: {
|
|
17
|
+
width: 10
|
|
18
|
+
},
|
|
19
|
+
paper: {
|
|
20
|
+
width: 12
|
|
21
|
+
},
|
|
22
|
+
popper: {
|
|
23
|
+
width: 14
|
|
24
|
+
},
|
|
25
|
+
popupIndicator: {
|
|
26
|
+
width: 16
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
fn({
|
|
33
|
+
MuiAutocomplete: {
|
|
34
|
+
defaultProps: {
|
|
35
|
+
ChipProps: {
|
|
36
|
+
height: 10
|
|
37
|
+
},
|
|
38
|
+
PaperComponent: CustomPaper,
|
|
39
|
+
PopperComponent: CustomPopper,
|
|
40
|
+
ListboxComponent: CustomListbox,
|
|
41
|
+
ListboxProps: {
|
|
42
|
+
height: 12
|
|
43
|
+
},
|
|
44
|
+
slotProps: {
|
|
45
|
+
popupIndicator: {
|
|
46
|
+
width: 20
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
componentsProps: {
|
|
50
|
+
clearIndicator: {
|
|
51
|
+
width: 10
|
|
52
|
+
},
|
|
53
|
+
paper: {
|
|
54
|
+
width: 12
|
|
55
|
+
},
|
|
56
|
+
popper: {
|
|
57
|
+
width: 14
|
|
58
|
+
},
|
|
59
|
+
popupIndicator: {
|
|
60
|
+
width: 16
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|