@mui/codemod 5.11.14 → 5.12.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
CHANGED
|
@@ -79,7 +79,7 @@ npx @mui/codemod v5.0.0/rename-css-variables <path>
|
|
|
79
79
|
|
|
80
80
|
#### `base-hook-imports`
|
|
81
81
|
|
|
82
|
-
Updates the sources of the imports of the
|
|
82
|
+
Updates the sources of the imports of the Base UI hooks to adapt to the new directories of the hooks.
|
|
83
83
|
|
|
84
84
|
```diff
|
|
85
85
|
- import { useBadge } from '@mui/base/BadgeUnstyled';
|
|
@@ -397,7 +397,7 @@ You can find more details about this breaking change in [the migration guide](ht
|
|
|
397
397
|
Renames the `components` and `componentsProps` props to `slots` and `slotProps`, respectively.
|
|
398
398
|
Also, changes `slots`' fields names to camelCase.
|
|
399
399
|
|
|
400
|
-
This change only affects
|
|
400
|
+
This change only affects Base UI components.
|
|
401
401
|
|
|
402
402
|
```diff
|
|
403
403
|
<BadgeUnstyled
|
package/codemod.js
CHANGED
|
File without changes
|
|
@@ -30,7 +30,7 @@ function transformer(file, api, options) {
|
|
|
30
30
|
if (node.imported.name === 'Theme') {
|
|
31
31
|
hasTheme = true;
|
|
32
32
|
}
|
|
33
|
-
if (node.imported.name === 'ThemeProvider' || node.imported.
|
|
33
|
+
if (node.imported.name === 'ThemeProvider' || node.imported.name === 'MuiThemeProvider') {
|
|
34
34
|
isRootFile = true;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
@@ -186,7 +186,7 @@ const NewStartScreen = () => {
|
|
|
186
186
|
}, category.name))
|
|
187
187
|
});
|
|
188
188
|
};
|
|
189
|
-
function
|
|
189
|
+
function DocSearchHit(props) {
|
|
190
190
|
const {
|
|
191
191
|
children,
|
|
192
192
|
hit
|
|
@@ -205,7 +205,7 @@ function DocSearcHit(props) {
|
|
|
205
205
|
text = 'Joy UI';
|
|
206
206
|
}
|
|
207
207
|
if (pathname.startsWith('/base/')) {
|
|
208
|
-
text = '
|
|
208
|
+
text = 'Base UI';
|
|
209
209
|
}
|
|
210
210
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
211
211
|
label: text,
|
|
@@ -238,7 +238,7 @@ function DocSearcHit(props) {
|
|
|
238
238
|
children: children
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
process.env.NODE_ENV !== "production" ?
|
|
241
|
+
process.env.NODE_ENV !== "production" ? DocSearchHit.propTypes = {
|
|
242
242
|
children: _propTypes.default.node,
|
|
243
243
|
hit: _propTypes.default.object.isRequired
|
|
244
244
|
} : void 0;
|
|
@@ -358,7 +358,7 @@ function AppSearch() {
|
|
|
358
358
|
});
|
|
359
359
|
});
|
|
360
360
|
},
|
|
361
|
-
hitComponent:
|
|
361
|
+
hitComponent: DocSearchHit,
|
|
362
362
|
initialScrollY: typeof window !== 'undefined' ? window.scrollY : undefined,
|
|
363
363
|
onClose: onClose,
|
|
364
364
|
navigator: keyboardNavigator
|
|
@@ -186,7 +186,7 @@ const NewStartScreen = () => {
|
|
|
186
186
|
}, category.name))
|
|
187
187
|
});
|
|
188
188
|
};
|
|
189
|
-
function
|
|
189
|
+
function DocSearchHit(props) {
|
|
190
190
|
const {
|
|
191
191
|
children,
|
|
192
192
|
hit
|
|
@@ -205,7 +205,7 @@ function DocSearcHit(props) {
|
|
|
205
205
|
text = 'Joy UI';
|
|
206
206
|
}
|
|
207
207
|
if (pathname.startsWith('/base/')) {
|
|
208
|
-
text = '
|
|
208
|
+
text = 'Base UI';
|
|
209
209
|
}
|
|
210
210
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
211
211
|
label: text,
|
|
@@ -238,7 +238,7 @@ function DocSearcHit(props) {
|
|
|
238
238
|
children: children
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
process.env.NODE_ENV !== "production" ?
|
|
241
|
+
process.env.NODE_ENV !== "production" ? DocSearchHit.propTypes = {
|
|
242
242
|
children: _propTypes.default.node,
|
|
243
243
|
hit: _propTypes.default.object.isRequired
|
|
244
244
|
} : void 0;
|
|
@@ -358,7 +358,7 @@ function AppSearch() {
|
|
|
358
358
|
});
|
|
359
359
|
});
|
|
360
360
|
},
|
|
361
|
-
hitComponent:
|
|
361
|
+
hitComponent: DocSearchHit,
|
|
362
362
|
initialScrollY: typeof window !== 'undefined' ? window.scrollY : undefined,
|
|
363
363
|
onClose: onClose,
|
|
364
364
|
navigator: keyboardNavigator
|