@mui/codemod 7.1.0 → 7.1.1

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.
Files changed (178) hide show
  1. package/README.md +10 -0
  2. package/codemod.js +8 -0
  3. package/deprecations/accordion-props/accordion-props.js +2 -0
  4. package/deprecations/accordion-props/test-cases/package.actual.js +68 -0
  5. package/deprecations/accordion-props/test-cases/package.expected.js +74 -0
  6. package/deprecations/accordion-summary-classes/accordion-summary-classes.js +1 -1
  7. package/deprecations/accordion-summary-classes/test-cases/package.actual.js +54 -0
  8. package/deprecations/accordion-summary-classes/test-cases/package.expected.js +54 -0
  9. package/deprecations/alert-classes/alert-classes.js +1 -1
  10. package/deprecations/alert-classes/test-cases/package.actual.js +27 -0
  11. package/deprecations/alert-classes/test-cases/package.expected.js +27 -0
  12. package/deprecations/alert-props/alert-props.js +1 -0
  13. package/deprecations/alert-props/test-cases/package.actual.js +60 -0
  14. package/deprecations/alert-props/test-cases/package.expected.js +52 -0
  15. package/deprecations/autocomplete-props/autocomplete-props.js +7 -0
  16. package/deprecations/autocomplete-props/test-cases/package.actual.js +113 -0
  17. package/deprecations/autocomplete-props/test-cases/package.expected.js +125 -0
  18. package/deprecations/avatar-group-props/avatar-group-props.js +4 -2
  19. package/deprecations/avatar-group-props/test-cases/package.actual.js +56 -0
  20. package/deprecations/avatar-group-props/test-cases/package.expected.js +58 -0
  21. package/deprecations/avatar-props/avatar-props.js +2 -1
  22. package/deprecations/avatar-props/test-cases/package.actual.js +36 -0
  23. package/deprecations/avatar-props/test-cases/package.expected.js +42 -0
  24. package/deprecations/backdrop-props/backdrop-props.js +2 -0
  25. package/deprecations/backdrop-props/test-cases/package.actual.js +81 -0
  26. package/deprecations/backdrop-props/test-cases/package.expected.js +81 -0
  27. package/deprecations/badge-props/badge-props.js +2 -1
  28. package/deprecations/badge-props/test-cases/package.actual.js +59 -0
  29. package/deprecations/badge-props/test-cases/package.expected.js +51 -0
  30. package/deprecations/button-classes/button-classes.js +1 -1
  31. package/deprecations/button-classes/test-cases/package.actual.js +69 -0
  32. package/deprecations/button-classes/test-cases/package.expected.js +69 -0
  33. package/deprecations/button-group-classes/button-group-classes.js +1 -1
  34. package/deprecations/button-group-classes/test-cases/package.actual.js +37 -0
  35. package/deprecations/button-group-classes/test-cases/package.expected.js +37 -0
  36. package/deprecations/card-header-props/card-header-props.js +2 -0
  37. package/deprecations/card-header-props/test-cases/package.actual.js +66 -0
  38. package/deprecations/card-header-props/test-cases/package.expected.js +78 -0
  39. package/deprecations/chip-classes/chip-classes.js +1 -1
  40. package/deprecations/chip-classes/test-cases/package.actual.js +55 -0
  41. package/deprecations/chip-classes/test-cases/package.expected.js +55 -0
  42. package/deprecations/circular-progress-classes/circular-progress-classes.js +1 -1
  43. package/deprecations/circular-progress-classes/test-cases/package.actual.js +7 -0
  44. package/deprecations/circular-progress-classes/test-cases/package.expected.js +7 -0
  45. package/deprecations/dialog-classes/dialog-classes.js +1 -1
  46. package/deprecations/dialog-classes/test-cases/package.actual.js +7 -0
  47. package/deprecations/dialog-classes/test-cases/package.expected.js +7 -0
  48. package/deprecations/divider-props/divider-props.js +3 -1
  49. package/deprecations/divider-props/test-cases/package.actual.js +45 -0
  50. package/deprecations/divider-props/test-cases/package.expected.js +50 -0
  51. package/deprecations/drawer-classes/drawer-classes.js +1 -1
  52. package/deprecations/drawer-classes/test-cases/package.actual.js +19 -0
  53. package/deprecations/drawer-classes/test-cases/package.expected.js +19 -0
  54. package/deprecations/drawer-props/drawer-props.js +8 -0
  55. package/deprecations/drawer-props/test-cases/package.actual.js +73 -0
  56. package/deprecations/drawer-props/test-cases/package.expected.js +97 -0
  57. package/deprecations/filled-input-props/filled-input-props.js +1 -0
  58. package/deprecations/filled-input-props/test-cases/package.actual.js +60 -0
  59. package/deprecations/filled-input-props/test-cases/package.expected.js +52 -0
  60. package/deprecations/form-control-label-props/form-control-label-props.js +1 -0
  61. package/deprecations/form-control-label-props/test-cases/package.actual.js +21 -0
  62. package/deprecations/form-control-label-props/test-cases/package.expected.js +21 -0
  63. package/deprecations/image-list-item-bar-classes/image-list-item-bar-classes.js +1 -1
  64. package/deprecations/image-list-item-bar-classes/test-cases/package.actual.js +11 -0
  65. package/deprecations/image-list-item-bar-classes/test-cases/package.expected.js +11 -0
  66. package/deprecations/input-base-classes/input-base-classes.js +1 -1
  67. package/deprecations/input-base-classes/test-cases/package.actual.js +13 -0
  68. package/deprecations/input-base-classes/test-cases/package.expected.js +13 -0
  69. package/deprecations/input-base-props/input-base-props.js +1 -0
  70. package/deprecations/input-base-props/test-cases/package.actual.js +60 -0
  71. package/deprecations/input-base-props/test-cases/package.expected.js +52 -0
  72. package/deprecations/input-props/input-props.js +1 -0
  73. package/deprecations/input-props/test-cases/package.actual.js +60 -0
  74. package/deprecations/input-props/test-cases/package.expected.js +52 -0
  75. package/deprecations/linear-progress-classes/linear-progress-classes.js +1 -1
  76. package/deprecations/linear-progress-classes/test-cases/package.actual.js +21 -0
  77. package/deprecations/linear-progress-classes/test-cases/package.expected.js +21 -0
  78. package/deprecations/list-item-props/list-item-props.js +3 -0
  79. package/deprecations/list-item-props/test-cases/package.actual.js +49 -0
  80. package/deprecations/list-item-props/test-cases/package.expected.js +50 -0
  81. package/deprecations/list-item-text-props/list-item-text-props.js +3 -0
  82. package/deprecations/list-item-text-props/test-cases/package.actual.js +21 -0
  83. package/deprecations/list-item-text-props/test-cases/package.expected.js +27 -0
  84. package/deprecations/menu-props/menu-props.js +3 -0
  85. package/deprecations/menu-props/test-cases/package.actual.js +67 -0
  86. package/deprecations/menu-props/test-cases/package.expected.js +83 -0
  87. package/deprecations/mobile-stepper-props/mobile-stepper-props.js +1 -0
  88. package/deprecations/mobile-stepper-props/test-cases/package.actual.js +30 -0
  89. package/deprecations/mobile-stepper-props/test-cases/package.expected.js +34 -0
  90. package/deprecations/modal-props/modal-props.js +3 -0
  91. package/deprecations/modal-props/test-cases/package.actual.js +49 -0
  92. package/deprecations/modal-props/test-cases/package.expected.js +50 -0
  93. package/deprecations/outlined-input-props/outlined-input-props.js +1 -0
  94. package/deprecations/outlined-input-props/test-cases/package.actual.js +60 -0
  95. package/deprecations/outlined-input-props/test-cases/package.expected.js +52 -0
  96. package/deprecations/pagination-item-classes/pagination-item-classes.js +1 -1
  97. package/deprecations/pagination-item-classes/test-cases/package.actual.js +108 -0
  98. package/deprecations/pagination-item-classes/test-cases/package.expected.js +108 -0
  99. package/deprecations/pagination-item-props/pagination-item-props.js +1 -0
  100. package/deprecations/pagination-item-props/test-cases/package.actual.js +27 -0
  101. package/deprecations/pagination-item-props/test-cases/package.expected.js +21 -0
  102. package/deprecations/popover-props/popover-props.js +5 -0
  103. package/deprecations/popover-props/test-cases/package.actual.js +73 -0
  104. package/deprecations/popover-props/test-cases/package.expected.js +89 -0
  105. package/deprecations/popper-props/popper-props.js +1 -0
  106. package/deprecations/popper-props/test-cases/package.actual.js +27 -0
  107. package/deprecations/popper-props/test-cases/package.expected.js +24 -0
  108. package/deprecations/rating-props/rating-props.js +1 -0
  109. package/deprecations/rating-props/test-cases/package.actual.js +37 -0
  110. package/deprecations/rating-props/test-cases/package.expected.js +53 -0
  111. package/deprecations/select-classes/select-classes.js +1 -1
  112. package/deprecations/select-classes/test-cases/package.actual.js +9 -0
  113. package/deprecations/select-classes/test-cases/package.expected.js +9 -0
  114. package/deprecations/slider-classes/slider-classes.js +1 -1
  115. package/deprecations/slider-classes/test-cases/package.actual.js +19 -0
  116. package/deprecations/slider-classes/test-cases/package.expected.js +19 -0
  117. package/deprecations/slider-props/slider-props.js +1 -0
  118. package/deprecations/slider-props/test-cases/package.actual.js +60 -0
  119. package/deprecations/slider-props/test-cases/package.expected.js +52 -0
  120. package/deprecations/snackbar-props/snackbar-props.js +4 -0
  121. package/deprecations/snackbar-props/test-cases/package.actual.js +54 -0
  122. package/deprecations/snackbar-props/test-cases/package.expected.js +67 -0
  123. package/deprecations/speed-dial-action-props/speed-dial-action-props.js +5 -0
  124. package/deprecations/speed-dial-action-props/test-cases/package.actual.js +56 -0
  125. package/deprecations/speed-dial-action-props/test-cases/package.expected.js +104 -0
  126. package/deprecations/speed-dial-props/speed-dial-props.js +2 -0
  127. package/deprecations/speed-dial-props/test-cases/package.actual.js +41 -0
  128. package/deprecations/speed-dial-props/test-cases/package.expected.js +54 -0
  129. package/deprecations/step-connector-classes/step-connector-classes.js +1 -1
  130. package/deprecations/step-connector-classes/test-cases/package.actual.js +7 -0
  131. package/deprecations/step-connector-classes/test-cases/package.expected.js +7 -0
  132. package/deprecations/step-content-props/step-content-props.js +2 -0
  133. package/deprecations/step-content-props/test-cases/package.actual.js +65 -0
  134. package/deprecations/step-content-props/test-cases/package.expected.js +74 -0
  135. package/deprecations/step-label-props/step-label-props.js +3 -0
  136. package/deprecations/step-label-props/test-cases/package.actual.js +44 -0
  137. package/deprecations/step-label-props/test-cases/package.expected.js +48 -0
  138. package/deprecations/tab-classes/tab-classes.js +1 -1
  139. package/deprecations/tab-classes/test-cases/package.actual.js +5 -0
  140. package/deprecations/tab-classes/test-cases/package.expected.js +5 -0
  141. package/deprecations/table-pagination-props/table-pagination-props.js +2 -0
  142. package/deprecations/table-pagination-props/test-cases/package.actual.js +62 -0
  143. package/deprecations/table-pagination-props/test-cases/package.expected.js +72 -0
  144. package/deprecations/table-sort-label-classes/table-sort-label-classes.js +1 -1
  145. package/deprecations/table-sort-label-classes/test-cases/package.actual.js +7 -0
  146. package/deprecations/table-sort-label-classes/test-cases/package.expected.js +7 -0
  147. package/deprecations/tabs-classes/tabs-classes.js +1 -1
  148. package/deprecations/tabs-classes/test-cases/package.actual.js +7 -0
  149. package/deprecations/tabs-classes/test-cases/package.expected.js +7 -0
  150. package/deprecations/tabs-props/tabs-props.js +3 -0
  151. package/deprecations/tabs-props/test-cases/package.actual.js +33 -0
  152. package/deprecations/tabs-props/test-cases/package.expected.js +41 -0
  153. package/deprecations/text-field-props/test-cases/package.actual.js +27 -0
  154. package/deprecations/text-field-props/test-cases/package.expected.js +31 -0
  155. package/deprecations/text-field-props/text-field-props.js +5 -0
  156. package/deprecations/toggle-button-group-classes/test-cases/package.actual.js +7 -0
  157. package/deprecations/toggle-button-group-classes/test-cases/package.expected.js +7 -0
  158. package/deprecations/toggle-button-group-classes/toggle-button-group-classes.js +1 -1
  159. package/deprecations/tooltip-props/test-cases/package.actual.js +141 -0
  160. package/deprecations/tooltip-props/test-cases/package.expected.js +141 -0
  161. package/deprecations/tooltip-props/tooltip-props.js +5 -0
  162. package/deprecations/typography-props/test-cases/package.actual.js +88 -0
  163. package/deprecations/typography-props/test-cases/package.expected.js +98 -0
  164. package/deprecations/typography-props/typography-props.js +1 -0
  165. package/deprecations/utils/movePropIntoSlotProps.js +2 -10
  166. package/deprecations/utils/movePropIntoSlots.js +2 -10
  167. package/deprecations/utils/replaceComponentsWithSlots.js +3 -13
  168. package/package.json +1 -1
  169. package/util/findComponentJSX.js +4 -3
  170. package/v6.0.0/grid-v2-props/grid-v2-props.js +5 -0
  171. package/v6.0.0/grid-v2-props/test-cases/package.actual.js +91 -0
  172. package/v6.0.0/grid-v2-props/test-cases/package.expected.js +91 -0
  173. package/v6.0.0/list-item-button-prop/list-item-button-prop.js +8 -4
  174. package/v6.0.0/list-item-button-prop/test-cases/package.actual.js +31 -0
  175. package/v6.0.0/list-item-button-prop/test-cases/package.expected.js +20 -0
  176. package/v7.0.0/grid-props/grid-props.js +5 -0
  177. package/v7.0.0/grid-props/test-cases/package.actual.js +91 -0
  178. package/v7.0.0/grid-props/test-cases/package.expected.js +91 -0
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _TablePagination = _interopRequireDefault(require("@org/ui/material/TablePagination"));
5
+ var _material = require("@org/ui/material");
6
+ var _jsxRuntime = require("react/jsx-runtime");
7
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_TablePagination.default, {
8
+ slots: {
9
+ actions: "div"
10
+ },
11
+ slotProps: {
12
+ select: {
13
+ native: true
14
+ }
15
+ }
16
+ });
17
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_TablePagination.default, {
18
+ slots: {
19
+ actions: 'div',
20
+ select: 'div'
21
+ },
22
+ slotProps: {
23
+ select: {
24
+ native: true
25
+ }
26
+ }
27
+ });
28
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_TablePagination.default, {
29
+ slots: {
30
+ root: 'div',
31
+ actions: "div"
32
+ },
33
+ slotProps: {
34
+ root: {
35
+ 'aria-label': ''
36
+ },
37
+ select: {
38
+ native: true
39
+ }
40
+ }
41
+ });
42
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_TablePagination.default, {
43
+ slots: {
44
+ actions: () => null
45
+ },
46
+ slotProps: {
47
+ select: {
48
+ ...{
49
+ native: true
50
+ },
51
+ ...{
52
+ native: false
53
+ }
54
+ }
55
+ }
56
+ });
57
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TablePagination, {
58
+ slots: {
59
+ actions: "div"
60
+ },
61
+ slotProps: {
62
+ select: {
63
+ native: true
64
+ }
65
+ }
66
+ });
67
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTablePagination, {
68
+ ActionsComponent: "div",
69
+ SelectProps: {
70
+ native: true
71
+ }
72
+ });
@@ -18,7 +18,7 @@ function transformer(file, api, options) {
18
18
  replacementSelector
19
19
  }) => {
20
20
  const replacementSelectorPrefix = '&';
21
- root.find(j.ImportDeclaration).filter(path => path.node.source.value.match(/^@mui\/material\/TableSortLabel$/)).forEach(path => {
21
+ root.find(j.ImportDeclaration).filter(path => path.node.source.value.match(new RegExp(`^${options.packageName || '@mui/material'}(/TableSortLabel)?$`))).forEach(path => {
22
22
  path.node.specifiers.forEach(specifier => {
23
23
  if (specifier.type === 'ImportSpecifier' && specifier.imported.name === 'tableSortLabelClasses') {
24
24
  const deprecatedAtomicClass = deprecatedClass.replace(`${deprecatedClass.split('-')[0]}-`, '');
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ var _TableSortLabel = require("@org/ui/material/TableSortLabel");
4
+ '& .MuiTableSortLabel-iconDirectionDesc';
5
+ '& .MuiTableSortLabel-iconDirectionAsc';
6
+ `& .${_TableSortLabel.tableSortLabelClasses.iconDirectionDesc}`;
7
+ `& .${_TableSortLabel.tableSortLabelClasses.iconDirectionAsc}`;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ var _TableSortLabel = require("@org/ui/material/TableSortLabel");
4
+ "&.MuiTableSortLabel-directionDesc > .MuiTableSortLabel-icon";
5
+ "&.MuiTableSortLabel-directionAsc > .MuiTableSortLabel-icon";
6
+ `&.${_TableSortLabel.tableSortLabelClasses.directionDesc} > .${_TableSortLabel.tableSortLabelClasses.icon}`;
7
+ `&.${_TableSortLabel.tableSortLabelClasses.directionAsc} > .${_TableSortLabel.tableSortLabelClasses.icon}`;
@@ -18,7 +18,7 @@ function transformer(file, api, options) {
18
18
  replacementSelector
19
19
  }) => {
20
20
  const replacementSelectorPrefix = '&';
21
- root.find(j.ImportDeclaration).filter(path => path.node.source.value.match(/^@mui\/material\/Tabs$/)).forEach(path => {
21
+ root.find(j.ImportDeclaration).filter(path => path.node.source.value.match(new RegExp(`^${options.packageName || '@mui/material'}(/Tabs)?$`))).forEach(path => {
22
22
  path.node.specifiers.forEach(specifier => {
23
23
  if (specifier.type === 'ImportSpecifier' && specifier.imported.name === 'tabsClasses') {
24
24
  const deprecatedAtomicClass = deprecatedClass.replace(`${deprecatedClass.split('-')[0]}-`, '');
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ var _Tabs = require("@org/ui/material/Tabs");
4
+ '&.MuiTabs-flexContainer';
5
+ '&.MuiTabs-flexContainerVertical';
6
+ `&.${_Tabs.tabsClasses.flexContainer}`;
7
+ `&.${_Tabs.tabsClasses.flexContainerVertical}`;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ var _Tabs = require("@org/ui/material/Tabs");
4
+ "&.MuiTabs-list";
5
+ "&.MuiTabs-list.MuiTabs-vertical";
6
+ `&.${_Tabs.tabsClasses.list}`;
7
+ `&.${_Tabs.tabsClasses.list}.${_Tabs.tabsClasses.vertical}`;
@@ -17,18 +17,21 @@ function transformer(file, api, options) {
17
17
  const printOptions = options.printOptions;
18
18
  (0, _movePropIntoSlots.default)(j, {
19
19
  root,
20
+ packageName: options.packageName,
20
21
  componentName: 'Tabs',
21
22
  propName: 'ScrollButtonComponent',
22
23
  slotName: 'scrollButton'
23
24
  });
24
25
  (0, _movePropIntoSlotProps.default)(j, {
25
26
  root,
27
+ packageName: options.packageName,
26
28
  componentName: 'Tabs',
27
29
  propName: 'TabScrollButtonProps',
28
30
  slotName: 'scrollButton'
29
31
  });
30
32
  (0, _movePropIntoSlotProps.default)(j, {
31
33
  root,
34
+ packageName: options.packageName,
32
35
  componentName: 'Tabs',
33
36
  propName: 'TabIndicatorProps',
34
37
  slotName: 'indicator'
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _Tabs = _interopRequireDefault(require("@org/ui/material/Tabs"));
5
+ var _material = require("@org/ui/material");
6
+ var _jsxRuntime = require("react/jsx-runtime");
7
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tabs.default, {
8
+ ScrollButtonComponent: CustomScrollButton,
9
+ TabScrollButtonProps: {
10
+ disableRipple: true
11
+ },
12
+ TabIndicatorProps: {
13
+ className: 'indicator'
14
+ }
15
+ });
16
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tabs, {
17
+ ScrollButtonComponent: CustomScrollButton,
18
+ TabScrollButtonProps: {
19
+ disableRipple: true
20
+ },
21
+ TabIndicatorProps: {
22
+ className: 'indicator'
23
+ }
24
+ });
25
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTabs, {
26
+ ScrollButtonComponent: CustomScrollButton,
27
+ TabScrollButtonProps: {
28
+ disableRipple: true
29
+ },
30
+ TabIndicatorProps: {
31
+ className: 'indicator'
32
+ }
33
+ });
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _Tabs = _interopRequireDefault(require("@org/ui/material/Tabs"));
5
+ var _material = require("@org/ui/material");
6
+ var _jsxRuntime = require("react/jsx-runtime");
7
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tabs.default, {
8
+ slots: {
9
+ scrollButton: CustomScrollButton
10
+ },
11
+ slotProps: {
12
+ scrollButton: {
13
+ disableRipple: true
14
+ },
15
+ indicator: {
16
+ className: 'indicator'
17
+ }
18
+ }
19
+ });
20
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tabs, {
21
+ slots: {
22
+ scrollButton: CustomScrollButton
23
+ },
24
+ slotProps: {
25
+ scrollButton: {
26
+ disableRipple: true
27
+ },
28
+ indicator: {
29
+ className: 'indicator'
30
+ }
31
+ }
32
+ });
33
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTabs, {
34
+ ScrollButtonComponent: CustomScrollButton,
35
+ TabScrollButtonProps: {
36
+ disableRipple: true
37
+ },
38
+ TabIndicatorProps: {
39
+ className: 'indicator'
40
+ }
41
+ });
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _TextField = _interopRequireDefault(require("@org/ui/material/TextField"));
5
+ var _material = require("@org/ui/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").default;
4
+ var _TextField = _interopRequireDefault(require("@org/ui/material/TextField"));
5
+ var _material = require("@org/ui/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
+ });
@@ -16,30 +16,35 @@ function transformer(file, api, options) {
16
16
  const printOptions = options.printOptions;
17
17
  (0, _movePropIntoSlotProps.default)(j, {
18
18
  root,
19
+ packageName: options.packageName,
19
20
  componentName: 'TextField',
20
21
  propName: 'InputProps',
21
22
  slotName: 'input'
22
23
  });
23
24
  (0, _movePropIntoSlotProps.default)(j, {
24
25
  root,
26
+ packageName: options.packageName,
25
27
  componentName: 'TextField',
26
28
  propName: 'inputProps',
27
29
  slotName: 'htmlInput'
28
30
  });
29
31
  (0, _movePropIntoSlotProps.default)(j, {
30
32
  root,
33
+ packageName: options.packageName,
31
34
  componentName: 'TextField',
32
35
  propName: 'SelectProps',
33
36
  slotName: 'select'
34
37
  });
35
38
  (0, _movePropIntoSlotProps.default)(j, {
36
39
  root,
40
+ packageName: options.packageName,
37
41
  componentName: 'TextField',
38
42
  propName: 'InputLabelProps',
39
43
  slotName: 'inputLabel'
40
44
  });
41
45
  (0, _movePropIntoSlotProps.default)(j, {
42
46
  root,
47
+ packageName: options.packageName,
43
48
  componentName: 'TextField',
44
49
  propName: 'FormHelperTextProps',
45
50
  slotName: 'formHelperText'
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ var _ToggleButtonGroup = require("@org/ui/material/ToggleButtonGroup");
4
+ '& .MuiToggleButtonGroup-groupedHorizontal';
5
+ '& .MuiToggleButtonGroup-groupedVertical';
6
+ `& .${_ToggleButtonGroup.toggleButtonGroupClasses.groupedHorizontal}`;
7
+ `& .${_ToggleButtonGroup.toggleButtonGroupClasses.groupedVertical}`;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ var _ToggleButtonGroup = require("@org/ui/material/ToggleButtonGroup");
4
+ "&.MuiToggleButtonGroup-horizontal > .MuiToggleButtonGroup-grouped";
5
+ "&.MuiToggleButtonGroup-vertical > .MuiToggleButtonGroup-grouped";
6
+ `&.${_ToggleButtonGroup.toggleButtonGroupClasses.horizontal} > .${_ToggleButtonGroup.toggleButtonGroupClasses.grouped}`;
7
+ `&.${_ToggleButtonGroup.toggleButtonGroupClasses.vertical} > .${_ToggleButtonGroup.toggleButtonGroupClasses.grouped}`;
@@ -18,7 +18,7 @@ function transformer(file, api, options) {
18
18
  replacementSelector
19
19
  }) => {
20
20
  const replacementSelectorPrefix = '&';
21
- root.find(j.ImportDeclaration).filter(path => path.node.source.value.match(/^@mui\/material\/ToggleButtonGroup$/)).forEach(path => {
21
+ root.find(j.ImportDeclaration).filter(path => path.node.source.value.match(new RegExp(`^${options.packageName || '@mui/material'}(/ToggleButtonGroup)?$`))).forEach(path => {
22
22
  path.node.specifiers.forEach(specifier => {
23
23
  if (specifier.type === 'ImportSpecifier' && specifier.imported.name === 'toggleButtonGroupClasses') {
24
24
  const deprecatedAtomicClass = deprecatedClass.replace(`${deprecatedClass.split('-')[0]}-`, '');
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _Tooltip = _interopRequireDefault(require("@org/ui/material/Tooltip"));
5
+ var _material = require("@org/ui/material");
6
+ var _jsxRuntime = require("react/jsx-runtime");
7
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
8
+ components: {
9
+ Arrow: ComponentsArrow,
10
+ Popper: ComponentsPopper,
11
+ Tooltip: ComponentsTooltip,
12
+ Transition: ComponentsTransition
13
+ },
14
+ componentsProps: {
15
+ arrow: componentsArrowProps,
16
+ popper: componentsPopperProps,
17
+ tooltip: componentsTooltipProps,
18
+ transition: componentsTransitionProps
19
+ }
20
+ });
21
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
22
+ slots: {
23
+ tooltip: SlotsTooltip
24
+ },
25
+ components: {
26
+ Arrow: ComponentsArrow
27
+ },
28
+ slotProps: {
29
+ tooltip: slotsTooltipProps
30
+ },
31
+ componentsProps: {
32
+ arrow: componentsArrowProps
33
+ }
34
+ });
35
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
36
+ slots: {
37
+ tooltip: SlotsTooltip,
38
+ arrow: SlotsArrow
39
+ },
40
+ components: {
41
+ Arrow: ComponentsArrow
42
+ },
43
+ slotProps: {
44
+ tooltip: slotsTooltipProps,
45
+ arrow: slotsArrowProps
46
+ },
47
+ componentsProps: {
48
+ arrow: componentsArrowProps
49
+ }
50
+ });
51
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
52
+ slots: {
53
+ tooltip: SlotsTooltip,
54
+ arrow: SlotsArrow
55
+ },
56
+ components: {
57
+ Arrow: ComponentsArrow
58
+ },
59
+ slotProps: {
60
+ tooltip: slotsTooltipProps,
61
+ arrow: slotsArrowProps
62
+ },
63
+ componentsProps: {
64
+ arrow: componentsArrowProps,
65
+ tooltip: componentsTooltipProps
66
+ }
67
+ });
68
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
69
+ slots: {
70
+ arrow: SlotsArrow,
71
+ popper: SlotsPopper,
72
+ tooltip: SlotsTooltip,
73
+ transition: SlotsTransition
74
+ },
75
+ components: {
76
+ Arrow: ComponentsArrow,
77
+ Popper: ComponentsPopper,
78
+ Tooltip: ComponentsTooltip,
79
+ Transition: ComponentsTransition
80
+ },
81
+ slotProps: {
82
+ arrow: slotsArrowProps,
83
+ popper: slotsPopperProps,
84
+ tooltip: slotsTooltipProps,
85
+ transition: slotsTransitionProps
86
+ },
87
+ componentsProps: {
88
+ arrow: componentsArrowProps,
89
+ popper: componentsPopperProps,
90
+ tooltip: componentsTooltipProps,
91
+ transition: componentsTransitionProps
92
+ }
93
+ });
94
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
95
+ PopperComponent: CustomPopper,
96
+ TransitionComponent: CustomTransition,
97
+ PopperProps: {
98
+ disablePortal: true
99
+ },
100
+ TransitionProps: {
101
+ timeout: 200
102
+ }
103
+ });
104
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
105
+ PopperComponent: CustomPopper,
106
+ TransitionComponent: CustomTransition,
107
+ PopperProps: {
108
+ disablePortal: true
109
+ },
110
+ TransitionProps: {
111
+ timeout: 200
112
+ },
113
+ slotProps: {
114
+ tooltip: {
115
+ height: 20
116
+ }
117
+ },
118
+ slots: {
119
+ tooltip: "div"
120
+ }
121
+ });
122
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
123
+ PopperComponent: CustomPopper,
124
+ TransitionComponent: CustomTransition,
125
+ PopperProps: {
126
+ disablePortal: true
127
+ },
128
+ TransitionProps: {
129
+ timeout: 200
130
+ }
131
+ });
132
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTooltip, {
133
+ PopperComponent: CustomPopper,
134
+ TransitionComponent: CustomTransition,
135
+ PopperProps: {
136
+ disablePortal: true
137
+ },
138
+ TransitionProps: {
139
+ timeout: 200
140
+ }
141
+ });
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _Tooltip = _interopRequireDefault(require("@org/ui/material/Tooltip"));
5
+ var _material = require("@org/ui/material");
6
+ var _jsxRuntime = require("react/jsx-runtime");
7
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
8
+ slots: {
9
+ arrow: ComponentsArrow,
10
+ popper: ComponentsPopper,
11
+ tooltip: ComponentsTooltip,
12
+ transition: ComponentsTransition
13
+ },
14
+ slotProps: {
15
+ arrow: componentsArrowProps,
16
+ popper: componentsPopperProps,
17
+ tooltip: componentsTooltipProps,
18
+ transition: componentsTransitionProps
19
+ }
20
+ });
21
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
22
+ slots: {
23
+ tooltip: SlotsTooltip,
24
+ arrow: ComponentsArrow
25
+ },
26
+ slotProps: {
27
+ tooltip: slotsTooltipProps,
28
+ arrow: componentsArrowProps
29
+ }
30
+ });
31
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
32
+ slots: {
33
+ tooltip: SlotsTooltip,
34
+ arrow: SlotsArrow
35
+ },
36
+ slotProps: {
37
+ tooltip: slotsTooltipProps,
38
+ arrow: {
39
+ ...componentsArrowProps,
40
+ ...slotsArrowProps
41
+ }
42
+ }
43
+ });
44
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
45
+ slots: {
46
+ tooltip: SlotsTooltip,
47
+ arrow: SlotsArrow
48
+ },
49
+ slotProps: {
50
+ arrow: {
51
+ ...componentsArrowProps,
52
+ ...slotsArrowProps
53
+ },
54
+ tooltip: {
55
+ ...componentsTooltipProps,
56
+ ...slotsTooltipProps
57
+ }
58
+ }
59
+ });
60
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
61
+ slots: {
62
+ arrow: SlotsArrow,
63
+ popper: SlotsPopper,
64
+ tooltip: SlotsTooltip,
65
+ transition: SlotsTransition
66
+ },
67
+ slotProps: {
68
+ arrow: {
69
+ ...componentsArrowProps,
70
+ ...slotsArrowProps
71
+ },
72
+ popper: {
73
+ ...componentsPopperProps,
74
+ ...slotsPopperProps
75
+ },
76
+ tooltip: {
77
+ ...componentsTooltipProps,
78
+ ...slotsTooltipProps
79
+ },
80
+ transition: {
81
+ ...componentsTransitionProps,
82
+ ...slotsTransitionProps
83
+ }
84
+ }
85
+ });
86
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
87
+ slots: {
88
+ popper: CustomPopper,
89
+ transition: CustomTransition
90
+ },
91
+ slotProps: {
92
+ popper: {
93
+ disablePortal: true
94
+ },
95
+ transition: {
96
+ timeout: 200
97
+ }
98
+ }
99
+ });
100
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
101
+ slotProps: {
102
+ tooltip: {
103
+ height: 20
104
+ },
105
+ popper: {
106
+ disablePortal: true
107
+ },
108
+ transition: {
109
+ timeout: 200
110
+ }
111
+ },
112
+ slots: {
113
+ tooltip: "div",
114
+ popper: CustomPopper,
115
+ transition: CustomTransition
116
+ }
117
+ });
118
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
119
+ slots: {
120
+ popper: CustomPopper,
121
+ transition: CustomTransition
122
+ },
123
+ slotProps: {
124
+ popper: {
125
+ disablePortal: true
126
+ },
127
+ transition: {
128
+ timeout: 200
129
+ }
130
+ }
131
+ });
132
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTooltip, {
133
+ PopperComponent: CustomPopper,
134
+ TransitionComponent: CustomTransition,
135
+ PopperProps: {
136
+ disablePortal: true
137
+ },
138
+ TransitionProps: {
139
+ timeout: 200
140
+ }
141
+ });
@@ -18,28 +18,33 @@ function transformer(file, api, options) {
18
18
  const printOptions = options.printOptions;
19
19
  (0, _replaceComponentsWithSlots.default)(j, {
20
20
  root,
21
+ packageName: options.packageName,
21
22
  componentName: 'Tooltip'
22
23
  });
23
24
  (0, _movePropIntoSlots.default)(j, {
24
25
  root,
26
+ packageName: options.packageName,
25
27
  componentName: 'Tooltip',
26
28
  propName: 'PopperComponent',
27
29
  slotName: 'popper'
28
30
  });
29
31
  (0, _movePropIntoSlotProps.default)(j, {
30
32
  root,
33
+ packageName: options.packageName,
31
34
  componentName: 'Tooltip',
32
35
  propName: 'PopperProps',
33
36
  slotName: 'popper'
34
37
  });
35
38
  (0, _movePropIntoSlots.default)(j, {
36
39
  root,
40
+ packageName: options.packageName,
37
41
  componentName: 'Tooltip',
38
42
  propName: 'TransitionComponent',
39
43
  slotName: 'transition'
40
44
  });
41
45
  (0, _movePropIntoSlotProps.default)(j, {
42
46
  root,
47
+ packageName: options.packageName,
43
48
  componentName: 'Tooltip',
44
49
  propName: 'TransitionProps',
45
50
  slotName: 'transition'