@mui/codemod 7.1.0 → 7.2.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 +32 -0
- package/codemod.js +8 -0
- package/deprecations/accordion-props/accordion-props.js +2 -0
- package/deprecations/accordion-props/test-cases/package.actual.js +68 -0
- package/deprecations/accordion-props/test-cases/package.expected.js +74 -0
- package/deprecations/accordion-summary-classes/accordion-summary-classes.js +1 -1
- package/deprecations/accordion-summary-classes/test-cases/package.actual.js +54 -0
- package/deprecations/accordion-summary-classes/test-cases/package.expected.js +54 -0
- package/deprecations/alert-classes/alert-classes.js +1 -1
- package/deprecations/alert-classes/test-cases/package.actual.js +27 -0
- package/deprecations/alert-classes/test-cases/package.expected.js +27 -0
- package/deprecations/alert-props/alert-props.js +1 -0
- package/deprecations/alert-props/test-cases/package.actual.js +60 -0
- package/deprecations/alert-props/test-cases/package.expected.js +52 -0
- package/deprecations/all/deprecations-all.js +2 -0
- package/deprecations/autocomplete-props/autocomplete-props.js +7 -0
- package/deprecations/autocomplete-props/test-cases/package.actual.js +113 -0
- package/deprecations/autocomplete-props/test-cases/package.expected.js +125 -0
- package/deprecations/avatar-group-props/avatar-group-props.js +4 -2
- package/deprecations/avatar-group-props/test-cases/package.actual.js +56 -0
- package/deprecations/avatar-group-props/test-cases/package.expected.js +58 -0
- package/deprecations/avatar-props/avatar-props.js +2 -1
- package/deprecations/avatar-props/test-cases/package.actual.js +36 -0
- package/deprecations/avatar-props/test-cases/package.expected.js +42 -0
- package/deprecations/backdrop-props/backdrop-props.js +2 -0
- package/deprecations/backdrop-props/test-cases/package.actual.js +81 -0
- package/deprecations/backdrop-props/test-cases/package.expected.js +81 -0
- package/deprecations/badge-props/badge-props.js +2 -1
- package/deprecations/badge-props/test-cases/package.actual.js +59 -0
- package/deprecations/badge-props/test-cases/package.expected.js +51 -0
- package/deprecations/button-classes/button-classes.js +1 -1
- package/deprecations/button-classes/test-cases/package.actual.js +69 -0
- package/deprecations/button-classes/test-cases/package.expected.js +69 -0
- package/deprecations/button-group-classes/button-group-classes.js +1 -1
- package/deprecations/button-group-classes/test-cases/package.actual.js +37 -0
- package/deprecations/button-group-classes/test-cases/package.expected.js +37 -0
- package/deprecations/card-header-props/card-header-props.js +2 -0
- package/deprecations/card-header-props/test-cases/package.actual.js +66 -0
- package/deprecations/card-header-props/test-cases/package.expected.js +78 -0
- package/deprecations/chip-classes/chip-classes.js +1 -1
- package/deprecations/chip-classes/test-cases/package.actual.js +55 -0
- package/deprecations/chip-classes/test-cases/package.expected.js +55 -0
- package/deprecations/circular-progress-classes/circular-progress-classes.js +1 -1
- package/deprecations/circular-progress-classes/test-cases/package.actual.js +7 -0
- package/deprecations/circular-progress-classes/test-cases/package.expected.js +7 -0
- package/deprecations/dialog-classes/dialog-classes.js +1 -1
- package/deprecations/dialog-classes/test-cases/package.actual.js +7 -0
- package/deprecations/dialog-classes/test-cases/package.expected.js +7 -0
- package/deprecations/dialog-props/dialog-props.js +40 -0
- package/deprecations/dialog-props/index.js +13 -0
- package/deprecations/dialog-props/test-cases/actual.js +47 -0
- package/deprecations/dialog-props/test-cases/expected.js +60 -0
- package/deprecations/dialog-props/test-cases/package.actual.js +47 -0
- package/deprecations/dialog-props/test-cases/package.expected.js +60 -0
- package/deprecations/dialog-props/test-cases/theme.actual.js +36 -0
- package/deprecations/dialog-props/test-cases/theme.expected.js +43 -0
- package/deprecations/divider-props/divider-props.js +3 -1
- package/deprecations/divider-props/test-cases/package.actual.js +45 -0
- package/deprecations/divider-props/test-cases/package.expected.js +50 -0
- package/deprecations/drawer-classes/drawer-classes.js +1 -1
- package/deprecations/drawer-classes/test-cases/package.actual.js +19 -0
- package/deprecations/drawer-classes/test-cases/package.expected.js +19 -0
- package/deprecations/drawer-props/drawer-props.js +8 -0
- package/deprecations/drawer-props/test-cases/package.actual.js +73 -0
- package/deprecations/drawer-props/test-cases/package.expected.js +97 -0
- package/deprecations/filled-input-props/filled-input-props.js +1 -0
- package/deprecations/filled-input-props/test-cases/package.actual.js +60 -0
- package/deprecations/filled-input-props/test-cases/package.expected.js +52 -0
- package/deprecations/form-control-label-props/form-control-label-props.js +1 -0
- package/deprecations/form-control-label-props/test-cases/package.actual.js +21 -0
- package/deprecations/form-control-label-props/test-cases/package.expected.js +21 -0
- package/deprecations/image-list-item-bar-classes/image-list-item-bar-classes.js +1 -1
- package/deprecations/image-list-item-bar-classes/test-cases/package.actual.js +11 -0
- package/deprecations/image-list-item-bar-classes/test-cases/package.expected.js +11 -0
- package/deprecations/input-base-classes/input-base-classes.js +1 -1
- package/deprecations/input-base-classes/test-cases/package.actual.js +13 -0
- package/deprecations/input-base-classes/test-cases/package.expected.js +13 -0
- package/deprecations/input-base-props/input-base-props.js +1 -0
- package/deprecations/input-base-props/test-cases/package.actual.js +60 -0
- package/deprecations/input-base-props/test-cases/package.expected.js +52 -0
- package/deprecations/input-props/input-props.js +1 -0
- package/deprecations/input-props/test-cases/package.actual.js +60 -0
- package/deprecations/input-props/test-cases/package.expected.js +52 -0
- package/deprecations/linear-progress-classes/linear-progress-classes.js +1 -1
- package/deprecations/linear-progress-classes/test-cases/package.actual.js +21 -0
- package/deprecations/linear-progress-classes/test-cases/package.expected.js +21 -0
- package/deprecations/list-item-props/list-item-props.js +3 -0
- package/deprecations/list-item-props/test-cases/package.actual.js +49 -0
- package/deprecations/list-item-props/test-cases/package.expected.js +50 -0
- package/deprecations/list-item-text-props/list-item-text-props.js +3 -0
- package/deprecations/list-item-text-props/test-cases/package.actual.js +21 -0
- package/deprecations/list-item-text-props/test-cases/package.expected.js +27 -0
- package/deprecations/menu-props/menu-props.js +3 -0
- package/deprecations/menu-props/test-cases/package.actual.js +67 -0
- package/deprecations/menu-props/test-cases/package.expected.js +83 -0
- package/deprecations/mobile-stepper-props/mobile-stepper-props.js +1 -0
- package/deprecations/mobile-stepper-props/test-cases/package.actual.js +30 -0
- package/deprecations/mobile-stepper-props/test-cases/package.expected.js +34 -0
- package/deprecations/modal-props/modal-props.js +3 -0
- package/deprecations/modal-props/test-cases/package.actual.js +49 -0
- package/deprecations/modal-props/test-cases/package.expected.js +50 -0
- package/deprecations/outlined-input-props/outlined-input-props.js +1 -0
- package/deprecations/outlined-input-props/test-cases/package.actual.js +60 -0
- package/deprecations/outlined-input-props/test-cases/package.expected.js +52 -0
- package/deprecations/pagination-item-classes/pagination-item-classes.js +1 -1
- package/deprecations/pagination-item-classes/test-cases/package.actual.js +108 -0
- package/deprecations/pagination-item-classes/test-cases/package.expected.js +108 -0
- package/deprecations/pagination-item-props/pagination-item-props.js +1 -0
- package/deprecations/pagination-item-props/test-cases/package.actual.js +27 -0
- package/deprecations/pagination-item-props/test-cases/package.expected.js +21 -0
- package/deprecations/popover-props/popover-props.js +5 -0
- package/deprecations/popover-props/test-cases/package.actual.js +73 -0
- package/deprecations/popover-props/test-cases/package.expected.js +89 -0
- package/deprecations/popper-props/popper-props.js +1 -0
- package/deprecations/popper-props/test-cases/package.actual.js +27 -0
- package/deprecations/popper-props/test-cases/package.expected.js +24 -0
- package/deprecations/rating-props/rating-props.js +1 -0
- package/deprecations/rating-props/test-cases/package.actual.js +37 -0
- package/deprecations/rating-props/test-cases/package.expected.js +53 -0
- package/deprecations/select-classes/select-classes.js +1 -1
- package/deprecations/select-classes/test-cases/package.actual.js +9 -0
- package/deprecations/select-classes/test-cases/package.expected.js +9 -0
- package/deprecations/slider-classes/slider-classes.js +1 -1
- package/deprecations/slider-classes/test-cases/package.actual.js +19 -0
- package/deprecations/slider-classes/test-cases/package.expected.js +19 -0
- package/deprecations/slider-props/slider-props.js +1 -0
- package/deprecations/slider-props/test-cases/package.actual.js +60 -0
- package/deprecations/slider-props/test-cases/package.expected.js +52 -0
- package/deprecations/snackbar-props/snackbar-props.js +4 -0
- package/deprecations/snackbar-props/test-cases/package.actual.js +54 -0
- package/deprecations/snackbar-props/test-cases/package.expected.js +67 -0
- package/deprecations/speed-dial-action-props/speed-dial-action-props.js +5 -0
- package/deprecations/speed-dial-action-props/test-cases/package.actual.js +56 -0
- package/deprecations/speed-dial-action-props/test-cases/package.expected.js +104 -0
- package/deprecations/speed-dial-props/speed-dial-props.js +2 -0
- package/deprecations/speed-dial-props/test-cases/package.actual.js +41 -0
- package/deprecations/speed-dial-props/test-cases/package.expected.js +54 -0
- package/deprecations/step-connector-classes/step-connector-classes.js +1 -1
- package/deprecations/step-connector-classes/test-cases/package.actual.js +7 -0
- package/deprecations/step-connector-classes/test-cases/package.expected.js +7 -0
- package/deprecations/step-content-props/step-content-props.js +2 -0
- package/deprecations/step-content-props/test-cases/package.actual.js +65 -0
- package/deprecations/step-content-props/test-cases/package.expected.js +74 -0
- package/deprecations/step-label-props/step-label-props.js +3 -0
- package/deprecations/step-label-props/test-cases/package.actual.js +44 -0
- package/deprecations/step-label-props/test-cases/package.expected.js +48 -0
- package/deprecations/tab-classes/tab-classes.js +1 -1
- package/deprecations/tab-classes/test-cases/package.actual.js +5 -0
- package/deprecations/tab-classes/test-cases/package.expected.js +5 -0
- package/deprecations/table-pagination-props/table-pagination-props.js +2 -0
- package/deprecations/table-pagination-props/test-cases/package.actual.js +62 -0
- package/deprecations/table-pagination-props/test-cases/package.expected.js +72 -0
- package/deprecations/table-sort-label-classes/table-sort-label-classes.js +1 -1
- package/deprecations/table-sort-label-classes/test-cases/package.actual.js +7 -0
- package/deprecations/table-sort-label-classes/test-cases/package.expected.js +7 -0
- package/deprecations/tabs-classes/tabs-classes.js +1 -1
- package/deprecations/tabs-classes/test-cases/package.actual.js +7 -0
- package/deprecations/tabs-classes/test-cases/package.expected.js +7 -0
- package/deprecations/tabs-props/tabs-props.js +3 -0
- package/deprecations/tabs-props/test-cases/package.actual.js +33 -0
- package/deprecations/tabs-props/test-cases/package.expected.js +41 -0
- package/deprecations/text-field-props/test-cases/package.actual.js +27 -0
- package/deprecations/text-field-props/test-cases/package.expected.js +31 -0
- package/deprecations/text-field-props/text-field-props.js +5 -0
- package/deprecations/toggle-button-group-classes/test-cases/package.actual.js +7 -0
- package/deprecations/toggle-button-group-classes/test-cases/package.expected.js +7 -0
- package/deprecations/toggle-button-group-classes/toggle-button-group-classes.js +1 -1
- package/deprecations/tooltip-props/test-cases/package.actual.js +141 -0
- package/deprecations/tooltip-props/test-cases/package.expected.js +141 -0
- package/deprecations/tooltip-props/tooltip-props.js +5 -0
- package/deprecations/typography-props/test-cases/package.actual.js +88 -0
- package/deprecations/typography-props/test-cases/package.expected.js +98 -0
- package/deprecations/typography-props/typography-props.js +1 -0
- package/deprecations/utils/movePropIntoSlotProps.js +2 -10
- package/deprecations/utils/movePropIntoSlots.js +2 -10
- package/deprecations/utils/replaceComponentsWithSlots.js +3 -13
- package/package.json +5 -5
- package/util/findComponentJSX.js +4 -3
- package/v6.0.0/grid-v2-props/grid-v2-props.js +5 -0
- package/v6.0.0/grid-v2-props/test-cases/package.actual.js +91 -0
- package/v6.0.0/grid-v2-props/test-cases/package.expected.js +91 -0
- package/v6.0.0/list-item-button-prop/list-item-button-prop.js +8 -4
- package/v6.0.0/list-item-button-prop/test-cases/package.actual.js +31 -0
- package/v6.0.0/list-item-button-prop/test-cases/package.expected.js +20 -0
- package/v7.0.0/grid-props/grid-props.js +5 -0
- package/v7.0.0/grid-props/test-cases/package.actual.js +91 -0
- package/v7.0.0/grid-props/test-cases/package.expected.js +91 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Autocomplete = _interopRequireDefault(require("@org/ui/material/Autocomplete"));
|
|
5
|
+
var _material = require("@org/ui/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
|
+
componentsProps: {
|
|
89
|
+
clearIndicator: {
|
|
90
|
+
width: 10
|
|
91
|
+
},
|
|
92
|
+
paper: {
|
|
93
|
+
width: 12
|
|
94
|
+
},
|
|
95
|
+
popper: {
|
|
96
|
+
width: 14
|
|
97
|
+
},
|
|
98
|
+
popupIndicator: {
|
|
99
|
+
width: 16
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomAutocomplete, {
|
|
104
|
+
ChipProps: {
|
|
105
|
+
height: 10
|
|
106
|
+
},
|
|
107
|
+
PaperComponent: CustomPaper,
|
|
108
|
+
PopperComponent: CustomPopper,
|
|
109
|
+
ListboxComponent: CustomListbox,
|
|
110
|
+
ListboxProps: {
|
|
111
|
+
height: 12
|
|
112
|
+
}
|
|
113
|
+
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Autocomplete = _interopRequireDefault(require("@org/ui/material/Autocomplete"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, {
|
|
8
|
+
slots: {
|
|
9
|
+
paper: CustomPaper,
|
|
10
|
+
popper: CustomPopper
|
|
11
|
+
},
|
|
12
|
+
slotProps: {
|
|
13
|
+
chip: {
|
|
14
|
+
height: 10
|
|
15
|
+
},
|
|
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
|
+
listbox: {
|
|
29
|
+
component: CustomListbox,
|
|
30
|
+
...{
|
|
31
|
+
height: 12
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, {
|
|
37
|
+
slotProps: {
|
|
38
|
+
chip: {
|
|
39
|
+
height: 10
|
|
40
|
+
},
|
|
41
|
+
clearIndicator: {
|
|
42
|
+
width: 10
|
|
43
|
+
},
|
|
44
|
+
paper: {
|
|
45
|
+
width: 12
|
|
46
|
+
},
|
|
47
|
+
popper: {
|
|
48
|
+
width: 14
|
|
49
|
+
},
|
|
50
|
+
popupIndicator: {
|
|
51
|
+
...{
|
|
52
|
+
width: 16
|
|
53
|
+
},
|
|
54
|
+
...{
|
|
55
|
+
width: 20
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
listbox: {
|
|
59
|
+
component: CustomListbox,
|
|
60
|
+
...{
|
|
61
|
+
height: 12
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
slots: {
|
|
66
|
+
paper: CustomPaper,
|
|
67
|
+
popper: CustomPopper
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Autocomplete, {
|
|
71
|
+
slots: {
|
|
72
|
+
paper: CustomPaper,
|
|
73
|
+
popper: CustomPopper
|
|
74
|
+
},
|
|
75
|
+
slotProps: {
|
|
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
|
+
listbox: {
|
|
92
|
+
component: CustomListbox,
|
|
93
|
+
...{
|
|
94
|
+
height: 12
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomAutocomplete, {
|
|
100
|
+
componentsProps: {
|
|
101
|
+
clearIndicator: {
|
|
102
|
+
width: 10
|
|
103
|
+
},
|
|
104
|
+
paper: {
|
|
105
|
+
width: 12
|
|
106
|
+
},
|
|
107
|
+
popper: {
|
|
108
|
+
width: 14
|
|
109
|
+
},
|
|
110
|
+
popupIndicator: {
|
|
111
|
+
width: 16
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomAutocomplete, {
|
|
116
|
+
ChipProps: {
|
|
117
|
+
height: 10
|
|
118
|
+
},
|
|
119
|
+
PaperComponent: CustomPaper,
|
|
120
|
+
PopperComponent: CustomPopper,
|
|
121
|
+
ListboxComponent: CustomListbox,
|
|
122
|
+
ListboxProps: {
|
|
123
|
+
height: 12
|
|
124
|
+
}
|
|
125
|
+
});
|
|
@@ -18,13 +18,15 @@ function transformer(file, api, options) {
|
|
|
18
18
|
const printOptions = options.printOptions;
|
|
19
19
|
(0, _replaceComponentsWithSlots.default)(j, {
|
|
20
20
|
root,
|
|
21
|
-
componentName: 'AvatarGroup'
|
|
21
|
+
componentName: 'AvatarGroup',
|
|
22
|
+
packageName: options.packageName
|
|
22
23
|
});
|
|
23
24
|
|
|
24
25
|
// replace `slotProps.additionalAvatar` with `slotProps.surplus` in JSX
|
|
25
26
|
(0, _findComponentJSX.default)(j, {
|
|
26
27
|
root,
|
|
27
|
-
componentName: 'AvatarGroup'
|
|
28
|
+
componentName: 'AvatarGroup',
|
|
29
|
+
packageName: options.packageName
|
|
28
30
|
}, elementPath => {
|
|
29
31
|
const slotPropsIndex = elementPath.node.openingElement.attributes.findIndex(attr => attr.type === 'JSXAttribute' && attr.name.name === 'slotProps');
|
|
30
32
|
if (slotPropsIndex !== -1) {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _AvatarGroup = _interopRequireDefault(require("@org/ui/material/AvatarGroup"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_AvatarGroup.default, {
|
|
8
|
+
componentsProps: {
|
|
9
|
+
additionalAvatar: {
|
|
10
|
+
color: "red"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AvatarGroup, {
|
|
15
|
+
componentsProps: {
|
|
16
|
+
additionalAvatar: {
|
|
17
|
+
color: "red"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AvatarGroup, {
|
|
22
|
+
componentsProps: {
|
|
23
|
+
additionalAvatar: {
|
|
24
|
+
color: "red"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
slotProps: {
|
|
28
|
+
additionalAvatar: {
|
|
29
|
+
color: "blue"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AvatarGroup, {
|
|
34
|
+
componentsProps: {
|
|
35
|
+
additionalAvatar: {
|
|
36
|
+
color: "red"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
slotProps: {
|
|
40
|
+
additionalAvatar: {
|
|
41
|
+
color: "blue"
|
|
42
|
+
},
|
|
43
|
+
surplus: {
|
|
44
|
+
color: "yellow"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// should skip non MUI components
|
|
50
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiAvatarGroup, {
|
|
51
|
+
componentsProps: {
|
|
52
|
+
additionalAvatar: {
|
|
53
|
+
color: "red"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _AvatarGroup = _interopRequireDefault(require("@org/ui/material/AvatarGroup"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_AvatarGroup.default, {
|
|
8
|
+
slotProps: {
|
|
9
|
+
surplus: {
|
|
10
|
+
color: "red"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AvatarGroup, {
|
|
15
|
+
slotProps: {
|
|
16
|
+
surplus: {
|
|
17
|
+
color: "red"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AvatarGroup, {
|
|
22
|
+
slotProps: {
|
|
23
|
+
surplus: {
|
|
24
|
+
...{
|
|
25
|
+
color: "red"
|
|
26
|
+
},
|
|
27
|
+
...{
|
|
28
|
+
color: "blue"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AvatarGroup, {
|
|
34
|
+
slotProps: {
|
|
35
|
+
surplus: {
|
|
36
|
+
...{
|
|
37
|
+
...{
|
|
38
|
+
color: "red"
|
|
39
|
+
},
|
|
40
|
+
...{
|
|
41
|
+
color: "blue"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
...{
|
|
45
|
+
color: "yellow"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// should skip non MUI components
|
|
52
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiAvatarGroup, {
|
|
53
|
+
componentsProps: {
|
|
54
|
+
additionalAvatar: {
|
|
55
|
+
color: "red"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Avatar = _interopRequireDefault(require("@org/ui/material/Avatar"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
8
|
+
imgProps: {
|
|
9
|
+
onError: () => {},
|
|
10
|
+
onLoad: () => {}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
|
|
14
|
+
imgProps: {
|
|
15
|
+
onError: () => {},
|
|
16
|
+
onLoad: () => {}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
|
|
20
|
+
imgProps: {
|
|
21
|
+
onLoad: () => {}
|
|
22
|
+
},
|
|
23
|
+
slotProps: {
|
|
24
|
+
img: {
|
|
25
|
+
onError: () => {}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// should skip non MUI components
|
|
31
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiAvatar, {
|
|
32
|
+
imgProps: {
|
|
33
|
+
onError: () => {},
|
|
34
|
+
onLoad: () => {}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Avatar = _interopRequireDefault(require("@org/ui/material/Avatar"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
8
|
+
slotProps: {
|
|
9
|
+
img: {
|
|
10
|
+
onError: () => {},
|
|
11
|
+
onLoad: () => {}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
|
|
16
|
+
slotProps: {
|
|
17
|
+
img: {
|
|
18
|
+
onError: () => {},
|
|
19
|
+
onLoad: () => {}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
|
|
24
|
+
slotProps: {
|
|
25
|
+
img: {
|
|
26
|
+
...{
|
|
27
|
+
onLoad: () => {}
|
|
28
|
+
},
|
|
29
|
+
...{
|
|
30
|
+
onError: () => {}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// should skip non MUI components
|
|
37
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiAvatar, {
|
|
38
|
+
imgProps: {
|
|
39
|
+
onError: () => {},
|
|
40
|
+
onLoad: () => {}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -17,10 +17,12 @@ function transformer(file, api, options) {
|
|
|
17
17
|
const printOptions = options.printOptions;
|
|
18
18
|
(0, _replaceComponentsWithSlots.default)(j, {
|
|
19
19
|
root,
|
|
20
|
+
packageName: options.packageName,
|
|
20
21
|
componentName: 'Backdrop'
|
|
21
22
|
});
|
|
22
23
|
(0, _movePropIntoSlots.default)(j, {
|
|
23
24
|
root,
|
|
25
|
+
packageName: options.packageName,
|
|
24
26
|
componentName: 'Backdrop',
|
|
25
27
|
propName: 'TransitionComponent',
|
|
26
28
|
slotName: 'transition'
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Backdrop = _interopRequireDefault(require("@org/ui/material/Backdrop"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
8
|
+
TransitionComponent: CustomTransition
|
|
9
|
+
});
|
|
10
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
11
|
+
TransitionComponent: CustomTransition
|
|
12
|
+
});
|
|
13
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
14
|
+
TransitionComponent: CustomTransition,
|
|
15
|
+
slots: {
|
|
16
|
+
root: 'div'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
/*#__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
|
+
slots: {
|
|
28
|
+
root: 'div',
|
|
29
|
+
transition: SlotTransition
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// should skip non MUI components
|
|
34
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiBackdrop, {
|
|
35
|
+
TransitionComponent: CustomTransition
|
|
36
|
+
});
|
|
37
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
38
|
+
components: {
|
|
39
|
+
Root: ComponentsRoot
|
|
40
|
+
},
|
|
41
|
+
componentsProps: {
|
|
42
|
+
root: componentsRootProps
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
46
|
+
components: {
|
|
47
|
+
Root: ComponentsRoot
|
|
48
|
+
},
|
|
49
|
+
slotProps: {
|
|
50
|
+
root: slotsRootProps
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
54
|
+
slots: {
|
|
55
|
+
root: SlotsRoot
|
|
56
|
+
},
|
|
57
|
+
componentsProps: {
|
|
58
|
+
root: componentsRootProps
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
62
|
+
slots: {
|
|
63
|
+
root: SlotsRoot
|
|
64
|
+
},
|
|
65
|
+
components: {
|
|
66
|
+
Root: ComponentsRoot
|
|
67
|
+
},
|
|
68
|
+
slotProps: {
|
|
69
|
+
root: slotsRootProps
|
|
70
|
+
},
|
|
71
|
+
componentsProps: {
|
|
72
|
+
root: componentsRootProps
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// should skip non MUI components
|
|
77
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiBackdrop, {
|
|
78
|
+
components: {
|
|
79
|
+
Root: ComponentsRoot
|
|
80
|
+
}
|
|
81
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _Backdrop = _interopRequireDefault(require("@org/ui/material/Backdrop"));
|
|
5
|
+
var _material = require("@org/ui/material");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
8
|
+
slots: {
|
|
9
|
+
transition: CustomTransition
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
13
|
+
slots: {
|
|
14
|
+
transition: CustomTransition
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
18
|
+
slots: {
|
|
19
|
+
root: 'div',
|
|
20
|
+
transition: CustomTransition
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
24
|
+
slots: {
|
|
25
|
+
...outerSlots,
|
|
26
|
+
transition: CustomTransition
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
30
|
+
slots: {
|
|
31
|
+
root: 'div',
|
|
32
|
+
transition: SlotTransition
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// should skip non MUI components
|
|
37
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiBackdrop, {
|
|
38
|
+
TransitionComponent: CustomTransition
|
|
39
|
+
});
|
|
40
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
41
|
+
slots: {
|
|
42
|
+
root: ComponentsRoot
|
|
43
|
+
},
|
|
44
|
+
slotProps: {
|
|
45
|
+
root: componentsRootProps
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
49
|
+
slotProps: {
|
|
50
|
+
root: slotsRootProps
|
|
51
|
+
},
|
|
52
|
+
slots: {
|
|
53
|
+
root: ComponentsRoot
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
57
|
+
slots: {
|
|
58
|
+
root: SlotsRoot
|
|
59
|
+
},
|
|
60
|
+
slotProps: {
|
|
61
|
+
root: componentsRootProps
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Backdrop, {
|
|
65
|
+
slots: {
|
|
66
|
+
root: SlotsRoot
|
|
67
|
+
},
|
|
68
|
+
slotProps: {
|
|
69
|
+
root: {
|
|
70
|
+
...componentsRootProps,
|
|
71
|
+
...slotsRootProps
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// should skip non MUI components
|
|
77
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(NonMuiBackdrop, {
|
|
78
|
+
components: {
|
|
79
|
+
Root: ComponentsRoot
|
|
80
|
+
}
|
|
81
|
+
});
|
|
@@ -16,7 +16,8 @@ function transformer(file, api, options) {
|
|
|
16
16
|
const printOptions = options.printOptions;
|
|
17
17
|
(0, _replaceComponentsWithSlots.default)(j, {
|
|
18
18
|
root,
|
|
19
|
-
componentName: 'Badge'
|
|
19
|
+
componentName: 'Badge',
|
|
20
|
+
packageName: options.packageName
|
|
20
21
|
});
|
|
21
22
|
return root.toSource(printOptions);
|
|
22
23
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _material = require("@org/ui/material");
|
|
4
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Badge, {
|
|
6
|
+
components: {
|
|
7
|
+
root: ComponentsRoot
|
|
8
|
+
},
|
|
9
|
+
componentsProps: {
|
|
10
|
+
root: componentsRootProps
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Badge, {
|
|
14
|
+
slots: {
|
|
15
|
+
badge: SlotsBadge
|
|
16
|
+
},
|
|
17
|
+
components: {
|
|
18
|
+
root: ComponentsRoot
|
|
19
|
+
},
|
|
20
|
+
slotProps: {
|
|
21
|
+
badge: slotsBadgeProps
|
|
22
|
+
},
|
|
23
|
+
componentsProps: {
|
|
24
|
+
root: componentsRootProps
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Badge, {
|
|
28
|
+
slots: {
|
|
29
|
+
root: SlotsRoot,
|
|
30
|
+
badge: SlotsBadge
|
|
31
|
+
},
|
|
32
|
+
components: {
|
|
33
|
+
root: ComponentsRoot
|
|
34
|
+
},
|
|
35
|
+
slotProps: {
|
|
36
|
+
root: slotsRootProps,
|
|
37
|
+
badge: slotsBadgeProps
|
|
38
|
+
},
|
|
39
|
+
componentsProps: {
|
|
40
|
+
root: componentsRootProps
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Badge, {
|
|
44
|
+
slots: {
|
|
45
|
+
root: SlotsRoot,
|
|
46
|
+
badge: SlotsBadge
|
|
47
|
+
},
|
|
48
|
+
components: {
|
|
49
|
+
root: ComponentsRoot
|
|
50
|
+
},
|
|
51
|
+
slotProps: {
|
|
52
|
+
root: slotsRootProps,
|
|
53
|
+
badge: slotsBadgeProps
|
|
54
|
+
},
|
|
55
|
+
componentsProps: {
|
|
56
|
+
root: componentsRootProps,
|
|
57
|
+
badge: componentsBadgeProps
|
|
58
|
+
}
|
|
59
|
+
});
|