@mui/codemod 6.0.0-dev.240424162023-9968b4889d → 6.0.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 +1037 -294
- package/codemod.js +0 -2
- 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 +38 -14
- package/node/deprecations/all/postcss.config.js +10 -1
- package/node/deprecations/autocomplete-props/autocomplete-props.js +22 -0
- package/node/deprecations/autocomplete-props/index.js +13 -0
- package/node/deprecations/autocomplete-props/test-cases/actual.js +75 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +75 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.actual.js +47 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +47 -0
- package/node/deprecations/avatar-group-props/avatar-group-props.js +81 -0
- package/node/deprecations/avatar-group-props/index.js +13 -0
- package/node/deprecations/avatar-group-props/test-cases/actual.js +56 -0
- package/node/deprecations/avatar-group-props/test-cases/expected.js +58 -0
- package/node/deprecations/avatar-group-props/test-cases/theme.actual.js +48 -0
- package/node/deprecations/avatar-group-props/test-cases/theme.expected.js +50 -0
- package/node/deprecations/avatar-props/test-cases/expected.js +8 -6
- package/node/deprecations/avatar-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/backdrop-props/backdrop-props.js +3 -5
- package/node/deprecations/backdrop-props/test-cases/actual.js +30 -13
- package/node/deprecations/backdrop-props/test-cases/expected.js +23 -13
- package/node/deprecations/backdrop-props/test-cases/theme.actual.js +32 -6
- package/node/deprecations/backdrop-props/test-cases/theme.expected.js +27 -5
- 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 +28 -15
- package/node/deprecations/divider-props/test-cases/actual.js +3 -0
- package/node/deprecations/divider-props/test-cases/expected.js +5 -8
- package/node/deprecations/divider-props/test-cases/theme.actual.js +28 -0
- package/node/deprecations/divider-props/test-cases/theme.expected.js +25 -0
- package/node/deprecations/filled-input-props/filled-input-props.js +22 -0
- package/node/deprecations/filled-input-props/index.js +13 -0
- package/node/deprecations/filled-input-props/test-cases/actual.js +60 -0
- package/node/deprecations/filled-input-props/test-cases/expected.js +52 -0
- package/node/deprecations/filled-input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/filled-input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/form-control-label-props/form-control-label-props.js +22 -0
- package/node/deprecations/form-control-label-props/index.js +13 -0
- package/node/deprecations/form-control-label-props/test-cases/actual.js +21 -0
- package/node/deprecations/form-control-label-props/test-cases/expected.js +21 -0
- package/node/deprecations/form-control-label-props/test-cases/theme.actual.js +23 -0
- package/node/deprecations/form-control-label-props/test-cases/theme.expected.js +23 -0
- package/node/deprecations/grid-props/grid-props.js +51 -0
- package/node/deprecations/grid-props/index.js +13 -0
- package/node/deprecations/grid-props/test-cases/actual.js +25 -0
- package/node/deprecations/grid-props/test-cases/expected.js +23 -0
- package/node/deprecations/grid-props/test-cases/theme.actual.js +24 -0
- package/node/deprecations/grid-props/test-cases/theme.expected.js +23 -0
- package/node/deprecations/image-list-item-bar-classes/image-list-item-bar-classes.js +77 -0
- package/node/deprecations/image-list-item-bar-classes/index.js +13 -0
- package/node/deprecations/image-list-item-bar-classes/postcss-plugin.js +39 -0
- package/node/deprecations/image-list-item-bar-classes/postcss.config.js +8 -0
- package/node/deprecations/image-list-item-bar-classes/test-cases/actual.js +11 -0
- package/node/deprecations/image-list-item-bar-classes/test-cases/expected.js +11 -0
- package/node/deprecations/input-base-props/index.js +13 -0
- package/node/deprecations/input-base-props/input-base-props.js +22 -0
- package/node/deprecations/input-base-props/test-cases/actual.js +60 -0
- package/node/deprecations/input-base-props/test-cases/expected.js +52 -0
- package/node/deprecations/input-base-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/input-base-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/input-props/index.js +13 -0
- package/node/deprecations/input-props/input-props.js +22 -0
- package/node/deprecations/input-props/test-cases/actual.js +60 -0
- package/node/deprecations/input-props/test-cases/expected.js +52 -0
- package/node/deprecations/input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/list-item-props/index.js +13 -0
- package/node/deprecations/list-item-props/list-item-props.js +22 -0
- package/node/deprecations/list-item-props/test-cases/actual.js +43 -0
- package/node/deprecations/list-item-props/test-cases/expected.js +40 -0
- package/node/deprecations/list-item-props/test-cases/theme.actual.js +56 -0
- package/node/deprecations/list-item-props/test-cases/theme.expected.js +53 -0
- package/node/deprecations/modal-props/index.js +13 -0
- package/node/deprecations/modal-props/modal-props.js +22 -0
- package/node/deprecations/modal-props/test-cases/actual.js +43 -0
- package/node/deprecations/modal-props/test-cases/expected.js +40 -0
- package/node/deprecations/modal-props/test-cases/theme.actual.js +56 -0
- package/node/deprecations/modal-props/test-cases/theme.expected.js +53 -0
- package/node/deprecations/outlined-input-props/index.js +13 -0
- package/node/deprecations/outlined-input-props/outlined-input-props.js +22 -0
- package/node/deprecations/outlined-input-props/test-cases/actual.js +60 -0
- package/node/deprecations/outlined-input-props/test-cases/expected.js +52 -0
- package/node/deprecations/outlined-input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/outlined-input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/pagination-item-props/index.js +13 -0
- package/node/deprecations/pagination-item-props/pagination-item-props.js +22 -0
- package/node/deprecations/pagination-item-props/test-cases/actual.js +27 -0
- package/node/deprecations/pagination-item-props/test-cases/expected.js +21 -0
- package/node/deprecations/pagination-item-props/test-cases/theme.actual.js +28 -0
- package/node/deprecations/pagination-item-props/test-cases/theme.expected.js +26 -0
- package/node/deprecations/popper-props/index.js +13 -0
- package/node/deprecations/popper-props/popper-props.js +22 -0
- package/node/deprecations/popper-props/test-cases/actual.js +27 -0
- package/node/deprecations/popper-props/test-cases/expected.js +24 -0
- package/node/deprecations/popper-props/test-cases/theme.actual.js +32 -0
- package/node/deprecations/popper-props/test-cases/theme.expected.js +29 -0
- package/node/deprecations/slider-props/test-cases/expected.js +12 -4
- package/node/deprecations/slider-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/speed-dial-props/index.js +13 -0
- package/node/deprecations/speed-dial-props/speed-dial-props.js +31 -0
- package/node/deprecations/speed-dial-props/test-cases/actual.js +41 -0
- package/node/deprecations/speed-dial-props/test-cases/expected.js +54 -0
- package/node/deprecations/speed-dial-props/test-cases/theme.actual.js +33 -0
- package/node/deprecations/speed-dial-props/test-cases/theme.expected.js +40 -0
- package/node/deprecations/step-label-props/step-label-props.js +0 -14
- package/node/deprecations/step-label-props/test-cases/actual.js +0 -23
- package/node/deprecations/step-label-props/test-cases/expected.js +4 -26
- package/node/deprecations/step-label-props/test-cases/theme.actual.js +0 -22
- package/node/deprecations/step-label-props/test-cases/theme.expected.js +4 -28
- package/node/deprecations/tab-classes/index.js +13 -0
- package/node/deprecations/tab-classes/postcss-plugin.js +30 -0
- package/node/deprecations/tab-classes/postcss.config.js +8 -0
- package/node/deprecations/tab-classes/tab-classes.js +53 -0
- package/node/deprecations/tab-classes/test-cases/actual.js +5 -0
- package/node/deprecations/tab-classes/test-cases/expected.js +5 -0
- package/node/deprecations/table-sort-label-classes/index.js +13 -0
- package/node/deprecations/table-sort-label-classes/postcss-plugin.js +33 -0
- package/node/deprecations/table-sort-label-classes/postcss.config.js +8 -0
- package/node/deprecations/table-sort-label-classes/table-sort-label-classes.js +77 -0
- package/node/deprecations/table-sort-label-classes/test-cases/actual.js +7 -0
- package/node/deprecations/table-sort-label-classes/test-cases/expected.js +7 -0
- package/node/deprecations/text-field-props/index.js +13 -0
- package/node/deprecations/text-field-props/test-cases/actual.js +27 -0
- package/node/deprecations/text-field-props/test-cases/expected.js +31 -0
- package/node/deprecations/text-field-props/test-cases/theme.actual.js +13 -0
- package/node/deprecations/text-field-props/test-cases/theme.expected.js +15 -0
- package/node/deprecations/text-field-props/text-field-props.js +48 -0
- package/node/deprecations/tooltip-props/index.js +13 -0
- package/node/deprecations/tooltip-props/test-cases/actual.js +92 -0
- package/node/deprecations/tooltip-props/test-cases/expected.js +84 -0
- package/node/deprecations/tooltip-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/tooltip-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/tooltip-props/tooltip-props.js +22 -0
- package/node/deprecations/typography-props/index.js +13 -0
- package/node/deprecations/typography-props/test-cases/actual.js +80 -0
- package/node/deprecations/typography-props/test-cases/expected.js +86 -0
- package/node/deprecations/typography-props/test-cases/theme.actual.js +85 -0
- package/node/deprecations/typography-props/test-cases/theme.expected.js +86 -0
- package/node/deprecations/typography-props/typography-props.js +81 -0
- package/node/deprecations/utils/movePropIntoSlotProps.js +4 -12
- package/node/deprecations/utils/movePropIntoSlots.js +4 -12
- package/node/deprecations/utils/replaceComponentsWithSlots.js +32 -25
- package/node/util/getReturnExpression.js +19 -0
- package/node/util/migrateToVariants.js +586 -0
- package/node/util/propsToObject.js +2 -6
- package/node/util/renameClassKey.js +1 -2
- package/node/v0.15.0/import-path.js +2 -2
- package/node/v5.0.0/avatar-circle-circular.js +2 -4
- package/node/v5.0.0/badge-overlap-value.js +4 -7
- 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-hook-imports.js +1 -2
- 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/base-remove-unstyled-suffix.js +1 -2
- package/node/v5.0.0/base-remove-unstyled-suffix.test/actual.js +5 -5
- package/node/v5.0.0/base-remove-unstyled-suffix.test/expected.js +4 -4
- package/node/v5.0.0/base-rename-components-to-slots.js +1 -1
- package/node/v5.0.0/base-use-named-exports.js +5 -8
- package/node/v5.0.0/box-sx-prop.js +1 -2
- 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/button-color-prop.js +1 -2
- package/node/v5.0.0/chip-variant-prop.js +1 -2
- package/node/v5.0.0/circularprogress-variant.js +2 -4
- 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/fab-variant.js +2 -4
- package/node/v5.0.0/grid-list-component.test/actual.js +1 -1
- package/node/v5.0.0/grid-list-component.test/expected.js +1 -1
- package/node/v5.0.0/joy-avatar-remove-imgProps.js +3 -7
- package/node/v5.0.0/joy-rename-components-to-slots.js +1 -1
- package/node/v5.0.0/joy-rename-row-prop.js +1 -2
- package/node/v5.0.0/joy-text-field-to-input.js +4 -7
- 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.js +4 -6
- 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/actual-withStyles.js +4 -4
- package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +6 -5
- package/node/v5.0.0/jss-to-tss-react.test/expected-withStyles.js +4 -4
- package/node/v5.0.0/link-underline-hover.js +1 -4
- package/node/v5.0.0/pagination-round-circular.js +3 -8
- 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/root-ref.test/expected.js +4 -4
- package/node/v5.0.0/skeleton-variant.js +3 -5
- package/node/v5.0.0/table-props.js +4 -9
- 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/tabs-scroll-buttons.js +4 -5
- package/node/v5.0.0/theme-spacing.test/large-actual.js +11 -11
- package/node/v5.0.0/theme-spacing.test/large-expected.js +11 -11
- 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/all/v6-all.js +4 -5
- package/node/v6.0.0/grid-v2-props/grid-v2-props.js +142 -0
- package/node/v6.0.0/grid-v2-props/index.js +13 -0
- package/node/v6.0.0/grid-v2-props/test-cases/actual.js +89 -0
- package/node/v6.0.0/grid-v2-props/test-cases/custom-breakpoints.actual.js +18 -0
- package/node/v6.0.0/grid-v2-props/test-cases/custom-breakpoints.expected.js +22 -0
- package/node/v6.0.0/grid-v2-props/test-cases/expected.js +101 -0
- package/node/v6.0.0/list-item-button-prop/index.js +13 -0
- package/node/v6.0.0/list-item-button-prop/list-item-button-prop.js +93 -0
- package/node/v6.0.0/list-item-button-prop/test-cases/actual.js +31 -0
- package/node/v6.0.0/list-item-button-prop/test-cases/expected.js +20 -0
- package/node/v6.0.0/list-item-button-prop/test-cases/theme.actual.js +20 -0
- package/node/v6.0.0/list-item-button-prop/test-cases/theme.expected.js +24 -0
- package/node/v6.0.0/styled/styled-v6.js +2 -415
- 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 +98 -61
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +54 -29
- package/node/v6.0.0/styled/test-cases/DynamicPropsStyled.actual.js +39 -0
- package/node/v6.0.0/styled/test-cases/DynamicPropsStyled.expected.js +65 -0
- package/node/v6.0.0/styled/test-cases/LogicalStyled.actual.js +31 -1
- package/node/v6.0.0/styled/test-cases/LogicalStyled.expected.js +39 -1
- package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +33 -28
- package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +20 -22
- package/node/v6.0.0/styled/test-cases/ThemePaletteMode.expected.js +28 -26
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.actual.js +6 -5
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.expected.js +8 -8
- package/node/v6.0.0/sx-prop/index.js +13 -0
- package/node/v6.0.0/sx-prop/sx-v6.js +411 -0
- package/node/v6.0.0/sx-prop/test-cases/basic-sx.actual.js +36 -0
- package/node/v6.0.0/sx-prop/test-cases/basic-sx.expected.js +46 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-applyStyles.actual.js +89 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-applyStyles.expected.js +82 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-condition.actual.js +92 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-condition.expected.js +89 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.actual.js +55 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.expected.js +88 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.actual.js +107 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.expected.js +120 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.actual.js +49 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.expected.js +64 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-inheritance.actual.js +17 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-inheritance.expected.js +17 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-line-break.actual.js +69 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-line-break.expected.js +69 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-value-callback.actual.js +102 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-value-callback.expected.js +111 -0
- package/node/v6.0.0/system-props/index.js +13 -0
- package/node/v6.0.0/system-props/removeSystemProps.js +233 -0
- package/node/v6.0.0/system-props/test-cases/system-props.actual.js +83 -0
- package/node/v6.0.0/system-props/test-cases/system-props.expected.js +98 -0
- package/node/v6.0.0/theme-v6/index.js +13 -0
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.actual.js +559 -0
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.expected.js +644 -0
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.actual.js +65 -0
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.expected.js +74 -0
- package/node/v6.0.0/theme-v6/theme-v6.js +86 -0
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Some of the codemods also run [postcss](https://github.com/postcss/postcss) plug
|
|
|
14
14
|
<!-- #default-branch-switch -->
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npx @mui/codemod@
|
|
17
|
+
npx @mui/codemod@latest <codemod> <paths...>
|
|
18
18
|
|
|
19
19
|
Applies a `@mui/codemod` to the specified paths
|
|
20
20
|
|
|
@@ -34,10 +34,10 @@ Options:
|
|
|
34
34
|
--jscodeshift [string] [default: false]
|
|
35
35
|
|
|
36
36
|
Examples:
|
|
37
|
-
npx @mui/codemod@
|
|
38
|
-
npx @mui/codemod@
|
|
37
|
+
npx @mui/codemod@latest v4.0.0/theme-spacing-api src
|
|
38
|
+
npx @mui/codemod@latest v5.0.0/component-rename-prop src --
|
|
39
39
|
--component=Grid --from=prop --to=newProp
|
|
40
|
-
npx @mui/codemod@
|
|
40
|
+
npx @mui/codemod@latest v5.0.0/preset-safe src --parser=flow
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### jscodeshift options
|
|
@@ -45,7 +45,7 @@ Examples:
|
|
|
45
45
|
To pass more options directly to jscodeshift, use `--jscodeshift="..."`. For example:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
npx @mui/codemod@
|
|
48
|
+
npx @mui/codemod@latest --jscodeshift="--run-in-band --verbose=2"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
See all available options [here](https://github.com/facebook/jscodeshift#usage-cli).
|
|
@@ -56,12 +56,12 @@ Options to [recast](https://github.com/benjamn/recast)'s printer can be provided
|
|
|
56
56
|
through jscodeshift's `printOptions` command line argument
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
npx @mui/codemod@
|
|
59
|
+
npx @mui/codemod@latest <transform> <path> --jscodeshift="--printOptions='{\"quote\":\"double\"}'"
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## Included scripts
|
|
63
63
|
|
|
64
|
-
- [
|
|
64
|
+
- [Deprecations](#deprecations)
|
|
65
65
|
- [v6](#v600)
|
|
66
66
|
- [v5](#v500)
|
|
67
67
|
- [v4](#v400)
|
|
@@ -71,7 +71,7 @@ npx @mui/codemod@next <transform> <path> --jscodeshift="--printOptions='{\"quote
|
|
|
71
71
|
### Deprecations
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
npx @mui/codemod@
|
|
74
|
+
npx @mui/codemod@latest deprecations/all <path>
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
#### `all`
|
|
@@ -90,7 +90,7 @@ A combination of all deprecations.
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
npx @mui/codemod@
|
|
93
|
+
npx @mui/codemod@latest deprecations/accordion-props <path>
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
#### `accordion-summary-classes`
|
|
@@ -106,7 +106,7 @@ JS transforms:
|
|
|
106
106
|
- [`& .${accordionSummaryClasses.contentGutters}`]: {
|
|
107
107
|
+ [`&.${accordionSummaryClasses.gutters} .${accordionSummaryClasses.content}`]: {
|
|
108
108
|
color: 'red',
|
|
109
|
-
|
|
109
|
+
},
|
|
110
110
|
},
|
|
111
111
|
},
|
|
112
112
|
},
|
|
@@ -119,7 +119,7 @@ JS transforms:
|
|
|
119
119
|
- '& .MuiAccordionSummary-contentGutters': {
|
|
120
120
|
+ '&.MuiAccordionSummary-gutters .MuiAccordionSummary-content': {
|
|
121
121
|
color: 'red',
|
|
122
|
-
|
|
122
|
+
},
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
},
|
|
@@ -130,11 +130,10 @@ CSS transforms:
|
|
|
130
130
|
```diff
|
|
131
131
|
-.MuiAccordionSummary-root .MuiAccordionSummary-contentGutters
|
|
132
132
|
+.MuiAccordionSummary-root.MuiAccordionSummary-gutters .MuiAccordionSummary-content
|
|
133
|
-
/>
|
|
134
133
|
```
|
|
135
134
|
|
|
136
135
|
```bash
|
|
137
|
-
npx @mui/codemod@
|
|
136
|
+
npx @mui/codemod@latest deprecations/accordion-summary-classes <path>
|
|
138
137
|
```
|
|
139
138
|
|
|
140
139
|
#### `alert-classes`
|
|
@@ -150,51 +149,51 @@ JS transforms:
|
|
|
150
149
|
- [`&.${alertClasses.standardSuccess}`]: {
|
|
151
150
|
+ [`&.${alertClasses.standard}.${alertClasses.colorSuccess}`]: {
|
|
152
151
|
color: 'red',
|
|
153
|
-
|
|
152
|
+
},
|
|
154
153
|
- [`&.${alertClasses.standardInfo}`]: {
|
|
155
154
|
+ [`&.${alertClasses.standard}.${alertClasses.colorInfo}`]: {
|
|
156
155
|
color: 'red',
|
|
157
|
-
|
|
156
|
+
},
|
|
158
157
|
- [`&.${alertClasses.standardWarning}`]: {
|
|
159
158
|
+ [`&.${alertClasses.standard}.${alertClasses.colorWarning}`]: {
|
|
160
159
|
color: 'red',
|
|
161
|
-
|
|
160
|
+
},
|
|
162
161
|
- [`&.${alertClasses.standardError}`]: {
|
|
163
162
|
+ [`&.${alertClasses.standard}.${alertClasses.colorError}`]: {
|
|
164
163
|
color: 'red',
|
|
165
|
-
|
|
164
|
+
},
|
|
166
165
|
- [`&.${alertClasses.outlinedSuccess}`]: {
|
|
167
166
|
+ [`&.${alertClasses.outlined}.${alertClasses.colorSuccess}`]: {
|
|
168
167
|
color: 'red',
|
|
169
|
-
|
|
168
|
+
},
|
|
170
169
|
- [`&.${alertClasses.outlinedInfo}`]: {
|
|
171
170
|
+ [`&.${alertClasses.outlined}.${alertClasses.colorInfo}`]: {
|
|
172
171
|
color: 'red',
|
|
173
|
-
|
|
172
|
+
},
|
|
174
173
|
- [`&.${alertClasses.outlinedWarning}`]: {
|
|
175
174
|
+ [`&.${alertClasses.outlined}.${alertClasses.colorWarning}`]: {
|
|
176
175
|
color: 'red',
|
|
177
|
-
|
|
176
|
+
},
|
|
178
177
|
- [`&.${alertClasses.outlinedError}`]: {
|
|
179
178
|
+ [`&.${alertClasses.outlined}.${alertClasses.colorError}`]: {
|
|
180
179
|
color: 'red',
|
|
181
|
-
|
|
180
|
+
},
|
|
182
181
|
- [`&.${alertClasses.filledSuccess}`]: {
|
|
183
182
|
+ [`&.${alertClasses.filled}.${alertClasses.colorSuccess}`]: {
|
|
184
183
|
color: 'red',
|
|
185
|
-
|
|
184
|
+
},
|
|
186
185
|
- [`&.${alertClasses.filledInfo}`]: {
|
|
187
186
|
+ [`&.${alertClasses.filled}.${alertClasses.colorInfo}`]: {
|
|
188
187
|
color: 'red',
|
|
189
|
-
|
|
188
|
+
},
|
|
190
189
|
- [`&.${alertClasses.filledWarning}`]: {
|
|
191
190
|
+ [`&.${alertClasses.filled}.${alertClasses.colorWarning}`]: {
|
|
192
191
|
color: 'red',
|
|
193
|
-
|
|
192
|
+
},
|
|
194
193
|
- [`&.${alertClasses.filledError}`]: {
|
|
195
194
|
+ [`&.${alertClasses.filled}.${alertClasses.colorError}`]: {
|
|
196
195
|
color: 'red',
|
|
197
|
-
|
|
196
|
+
},
|
|
198
197
|
},
|
|
199
198
|
},
|
|
200
199
|
},
|
|
@@ -230,7 +229,7 @@ CSS transforms:
|
|
|
230
229
|
```
|
|
231
230
|
|
|
232
231
|
```bash
|
|
233
|
-
npx @mui/codemod@
|
|
232
|
+
npx @mui/codemod@latest deprecations/alert-classes <path>
|
|
234
233
|
```
|
|
235
234
|
|
|
236
235
|
#### `alert-props`
|
|
@@ -238,8 +237,8 @@ npx @mui/codemod@next deprecations/alert-classes <path>
|
|
|
238
237
|
```diff
|
|
239
238
|
<Alert
|
|
240
239
|
- components={{ CloseButton: CustomButton }}
|
|
241
|
-
+ slots={{ closeButton: CustomButton }}
|
|
242
240
|
- componentsProps={{ closeButton: { testid: 'test-id' } }}
|
|
241
|
+
+ slots={{ closeButton: CustomButton }}
|
|
243
242
|
+ slotProps={{ closeButton: { testid: 'test-id' } }}
|
|
244
243
|
/>
|
|
245
244
|
```
|
|
@@ -248,15 +247,129 @@ npx @mui/codemod@next deprecations/alert-classes <path>
|
|
|
248
247
|
MuiAlert: {
|
|
249
248
|
defaultProps: {
|
|
250
249
|
- components: { CloseButton: CustomButton }
|
|
251
|
-
+ slots: { closeButton: CustomButton },
|
|
252
250
|
- componentsProps: { closeButton: { testid: 'test-id' }}
|
|
251
|
+
+ slots: { closeButton: CustomButton },
|
|
253
252
|
+ slotProps: { closeButton: { testid: 'test-id' } },
|
|
254
|
-
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
npx @mui/codemod@latest deprecations/alert-props <path>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
#### `autocomplete-props`
|
|
262
|
+
|
|
263
|
+
```diff
|
|
264
|
+
<Autocomplete
|
|
265
|
+
- ChipProps={{ height: 10 }}
|
|
266
|
+
- PaperComponent={CustomPaper}
|
|
267
|
+
- PopperComponent={CustomPopper}
|
|
268
|
+
- ListboxComponent={CustomListbox}
|
|
269
|
+
- ListboxProps={{ height: 12 }}
|
|
270
|
+
- componentsProps={{
|
|
271
|
+
- clearIndicator: { width: 10 },
|
|
272
|
+
- paper: { width: 12 },
|
|
273
|
+
- popper: { width: 14 },
|
|
274
|
+
- popupIndicator: { width: 16 },
|
|
275
|
+
- }}
|
|
276
|
+
+ slots={{
|
|
277
|
+
+ paper: CustomPaper,
|
|
278
|
+
+ popper: CustomPopper,
|
|
279
|
+
+ listbox: CustomListbox,
|
|
280
|
+
+ }}
|
|
281
|
+
+ slotProps={{
|
|
282
|
+
+ chip: { height: 10 },
|
|
283
|
+
+ listbox: { height: 12 },
|
|
284
|
+
+ clearIndicator: { width: 10 },
|
|
285
|
+
+ paper: { width: 12 },
|
|
286
|
+
+ popper: { width: 14 },
|
|
287
|
+
+ popupIndicator: { width: 16 },
|
|
288
|
+
+ }}
|
|
289
|
+
/>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
```diff
|
|
293
|
+
MuiAutocomplete: {
|
|
294
|
+
defaultProps: {
|
|
295
|
+
- ChipProps: { height: 10 },
|
|
296
|
+
- PaperComponent: CustomPaper,
|
|
297
|
+
- PopperComponent: CustomPopper,
|
|
298
|
+
- ListboxComponent: CustomListbox,
|
|
299
|
+
- ListboxProps: { height: 12 },
|
|
300
|
+
- componentsProps: {
|
|
301
|
+
- clearIndicator: { width: 10 },
|
|
302
|
+
- paper: { width: 12 },
|
|
303
|
+
- popper: { width: 14 },
|
|
304
|
+
- popupIndicator: { width: 16 },
|
|
305
|
+
- }
|
|
306
|
+
+ slots: {
|
|
307
|
+
+ paper: CustomPaper,
|
|
308
|
+
+ popper: CustomPopper,
|
|
309
|
+
+ listbox: CustomListbox,
|
|
310
|
+
+ },
|
|
311
|
+
+ slotProps: {
|
|
312
|
+
+ chip: { height: 10 },
|
|
313
|
+
+ listbox: { height: 12 },
|
|
314
|
+
+ clearIndicator: { width: 10 },
|
|
315
|
+
+ paper: { width: 12 },
|
|
316
|
+
+ popper: { width: 14 },
|
|
317
|
+
+ popupIndicator: { width: 16 },
|
|
318
|
+
+ },
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
npx @mui/codemod@latest deprecations/autocomplete-props <path>
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
#### `avatar-group-props`
|
|
328
|
+
|
|
329
|
+
```diff
|
|
330
|
+
<AvatarGroup
|
|
331
|
+
- componentsProps={{
|
|
332
|
+
- additionalAvatar: { color: 'red' },
|
|
333
|
+
+ slotProps={{
|
|
334
|
+
+ surplus: { color: 'red' },
|
|
335
|
+
}}
|
|
336
|
+
/>
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
```diff
|
|
340
|
+
<AvatarGroup
|
|
341
|
+
slotProps={{
|
|
342
|
+
- additionalAvatar: { color: 'red' },
|
|
343
|
+
+ surplus: { color: 'red' },
|
|
344
|
+
}}
|
|
345
|
+
/>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
```diff
|
|
349
|
+
MuiAvatarGroup: {
|
|
350
|
+
defaultProps: {
|
|
351
|
+
- componentsProps: {
|
|
352
|
+
- additionalAvatar: { color: 'red' },
|
|
353
|
+
+ slotProps: {
|
|
354
|
+
+ surplus: { color: 'red' },
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
```diff
|
|
361
|
+
MuiAvatarGroup: {
|
|
362
|
+
defaultProps: {
|
|
363
|
+
slotProps: {
|
|
364
|
+
- additionalAvatar: { color: 'red' },
|
|
365
|
+
+ surplus: { color: 'red' },
|
|
366
|
+
},
|
|
367
|
+
},
|
|
255
368
|
},
|
|
256
369
|
```
|
|
257
370
|
|
|
258
371
|
```bash
|
|
259
|
-
npx @mui/codemod@
|
|
372
|
+
npx @mui/codemod@latest deprecations/avatar-group-props <path>
|
|
260
373
|
```
|
|
261
374
|
|
|
262
375
|
#### `avatar-props`
|
|
@@ -270,22 +383,42 @@ npx @mui/codemod@next deprecations/alert-props <path>
|
|
|
270
383
|
+ img: {
|
|
271
384
|
+ onError: () => {},
|
|
272
385
|
+ onLoad: () => {},
|
|
273
|
-
+ }
|
|
386
|
+
+ },
|
|
274
387
|
}}
|
|
275
|
-
|
|
388
|
+
/>
|
|
276
389
|
```
|
|
277
390
|
|
|
278
391
|
#### `backdrop-props`
|
|
279
392
|
|
|
280
393
|
```diff
|
|
281
394
|
<Backdrop
|
|
282
|
-
-
|
|
283
|
-
|
|
395
|
+
- components={{ Root: CustomRoot }}
|
|
396
|
+
- componentsProps={{ root: { testid: 'test-id' } }}
|
|
397
|
+
+ slots={{ root: CustomRoot }}
|
|
398
|
+
+ slotProps={{ root: { testid: 'test-id' } }}
|
|
399
|
+
/>
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
```diff
|
|
403
|
+
MuiBackdrop: {
|
|
404
|
+
defaultProps: {
|
|
405
|
+
- components: { Root: CustomRoot }
|
|
406
|
+
- componentsProps: { root: { testid: 'root-id' } }
|
|
407
|
+
+ slots: { root: CustomRoot },
|
|
408
|
+
+ slotProps: { root: { testid: 'root-id' } },
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
```diff
|
|
414
|
+
<Backdrop
|
|
415
|
+
- TransitionComponent={CustomTransition}
|
|
416
|
+
+ slots={{ transition: CustomTransition }}
|
|
284
417
|
/>
|
|
285
418
|
```
|
|
286
419
|
|
|
287
420
|
```bash
|
|
288
|
-
npx @mui/codemod@
|
|
421
|
+
npx @mui/codemod@latest deprecations/backdrop-props <path>
|
|
289
422
|
```
|
|
290
423
|
|
|
291
424
|
#### `badge-props`
|
|
@@ -293,8 +426,8 @@ npx @mui/codemod@next deprecations/backdrop-props <path>
|
|
|
293
426
|
```diff
|
|
294
427
|
<Badge
|
|
295
428
|
- components={{ Root: CustomRoot }}
|
|
296
|
-
+ slots={{ root: CustomRoot }}
|
|
297
429
|
- componentsProps={{ root: { testid: 'test-id' } }}
|
|
430
|
+
+ slots={{ root: CustomRoot }}
|
|
298
431
|
+ slotProps={{ root: { testid: 'test-id' } }}
|
|
299
432
|
/>
|
|
300
433
|
```
|
|
@@ -303,15 +436,15 @@ npx @mui/codemod@next deprecations/backdrop-props <path>
|
|
|
303
436
|
MuiBadge: {
|
|
304
437
|
defaultProps: {
|
|
305
438
|
- components: { Root: CustomRoot }
|
|
306
|
-
+ slots: { root: CustomRoot },
|
|
307
439
|
- componentsProps: { root: { testid: 'test-id' }}
|
|
440
|
+
+ slots: { root: CustomRoot },
|
|
308
441
|
+ slotProps: { root: { testid: 'test-id' } },
|
|
309
442
|
},
|
|
310
443
|
},
|
|
311
444
|
```
|
|
312
445
|
|
|
313
446
|
```bash
|
|
314
|
-
npx @mui/codemod@
|
|
447
|
+
npx @mui/codemod@latest deprecations/badge-props <path>
|
|
315
448
|
```
|
|
316
449
|
|
|
317
450
|
#### `button-classes`
|
|
@@ -327,135 +460,135 @@ JS transforms:
|
|
|
327
460
|
- [`&.${buttonClasses.textInherit}`]: {
|
|
328
461
|
+ [`&.${buttonClasses.text}.${buttonClasses.colorInherit}`]: {
|
|
329
462
|
color: 'red',
|
|
330
|
-
|
|
463
|
+
},
|
|
331
464
|
- [`&.${buttonClasses.textPrimary}`]: {
|
|
332
465
|
+ [`&.${buttonClasses.text}.${buttonClasses.colorPrimary}`]: {
|
|
333
466
|
color: 'red',
|
|
334
|
-
|
|
467
|
+
},
|
|
335
468
|
- [`&.${buttonClasses.textSecondary}`]: {
|
|
336
469
|
+ [`&.${buttonClasses.text}.${buttonClasses.colorSecondary}`]: {
|
|
337
470
|
color: 'red',
|
|
338
|
-
|
|
471
|
+
},
|
|
339
472
|
- [`&.${buttonClasses.textSuccess}`]: {
|
|
340
473
|
+ [`&.${buttonClasses.text}.${buttonClasses.colorSuccess}`]: {
|
|
341
474
|
color: 'red',
|
|
342
|
-
|
|
475
|
+
},
|
|
343
476
|
- [`&.${buttonClasses.textError}`]: {
|
|
344
477
|
+ [`&.${buttonClasses.text}.${buttonClasses.colorError}`]: {
|
|
345
478
|
color: 'red',
|
|
346
|
-
|
|
479
|
+
},
|
|
347
480
|
- [`&.${buttonClasses.textInfo}`]: {
|
|
348
481
|
+ [`&.${buttonClasses.text}.${buttonClasses.colorInfo}`]: {
|
|
349
482
|
color: 'red',
|
|
350
|
-
|
|
483
|
+
},
|
|
351
484
|
- [`&.${buttonClasses.textWarning}`]: {
|
|
352
485
|
+ [`&.${buttonClasses.text}.${buttonClasses.colorWarning}`]: {
|
|
353
486
|
color: 'red',
|
|
354
|
-
|
|
487
|
+
},
|
|
355
488
|
- [`&.${buttonClasses.outlinedInherit}`]: {
|
|
356
489
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.colorInherit}`]: {
|
|
357
490
|
color: 'red',
|
|
358
|
-
|
|
491
|
+
},
|
|
359
492
|
- [`&.${buttonClasses.outlinedPrimary}`]: {
|
|
360
493
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.colorPrimary}`]: {
|
|
361
494
|
color: 'red',
|
|
362
|
-
|
|
495
|
+
},
|
|
363
496
|
- [`&.${buttonClasses.outlinedSecondary}`]: {
|
|
364
497
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.colorSecondary}`]: {
|
|
365
498
|
color: 'red',
|
|
366
|
-
|
|
499
|
+
},
|
|
367
500
|
- [`&.${buttonClasses.outlinedSuccess}`]: {
|
|
368
501
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.colorSuccess}`]: {
|
|
369
502
|
color: 'red',
|
|
370
|
-
|
|
503
|
+
},
|
|
371
504
|
- [`&.${buttonClasses.outlinedError}`]: {
|
|
372
505
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.colorError}`]: {
|
|
373
506
|
color: 'red',
|
|
374
|
-
|
|
507
|
+
},
|
|
375
508
|
- [`&.${buttonClasses.outlinedInfo}`]: {
|
|
376
509
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.colorInfo}`]: {
|
|
377
510
|
color: 'red',
|
|
378
|
-
|
|
511
|
+
},
|
|
379
512
|
- [`&.${buttonClasses.outlinedWarning}`]: {
|
|
380
513
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.colorWarning}`]: {
|
|
381
514
|
color: 'red',
|
|
382
|
-
|
|
515
|
+
},
|
|
383
516
|
- [`&.${buttonClasses.containedInherit}`]: {
|
|
384
517
|
+ [`&.${buttonClasses.contained}.${buttonClasses.colorInherit}`]: {
|
|
385
518
|
color: 'red',
|
|
386
|
-
|
|
519
|
+
},
|
|
387
520
|
- [`&.${buttonClasses.containedPrimary}`]: {
|
|
388
521
|
+ [`&.${buttonClasses.contained}.${buttonClasses.colorPrimary}`]: {
|
|
389
522
|
color: 'red',
|
|
390
|
-
|
|
523
|
+
},
|
|
391
524
|
- [`&.${buttonClasses.containedSecondary}`]: {
|
|
392
525
|
+ [`&.${buttonClasses.contained}.${buttonClasses.colorSecondary}`]: {
|
|
393
526
|
color: 'red',
|
|
394
|
-
|
|
527
|
+
},
|
|
395
528
|
- [`&.${buttonClasses.containedSuccess}`]: {
|
|
396
529
|
+ [`&.${buttonClasses.contained}.${buttonClasses.colorSuccess}`]: {
|
|
397
530
|
color: 'red',
|
|
398
|
-
|
|
531
|
+
},
|
|
399
532
|
- [`&.${buttonClasses.containedError}`]: {
|
|
400
533
|
+ [`&.${buttonClasses.contained}.${buttonClasses.colorError}`]: {
|
|
401
534
|
color: 'red',
|
|
402
|
-
|
|
535
|
+
},
|
|
403
536
|
- [`&.${buttonClasses.containedInfo}`]: {
|
|
404
537
|
+ [`&.${buttonClasses.contained}.${buttonClasses.colorInfo}`]: {
|
|
405
538
|
color: 'red',
|
|
406
|
-
|
|
539
|
+
},
|
|
407
540
|
- [`&.${buttonClasses.containedWarning}`]: {
|
|
408
541
|
+ [`&.${buttonClasses.contained}.${buttonClasses.colorWarning}`]: {
|
|
409
542
|
color: 'red',
|
|
410
|
-
|
|
543
|
+
},
|
|
411
544
|
- [`&.${buttonClasses.containedSizeSmall}`]: {
|
|
412
545
|
+ [`&.${buttonClasses.contained}.${buttonClasses.sizeSmall}`]: {
|
|
413
546
|
color: 'red',
|
|
414
|
-
|
|
547
|
+
},
|
|
415
548
|
- [`&.${buttonClasses.containedSizeMedium}`]: {
|
|
416
549
|
+ [`&.${buttonClasses.contained}.${buttonClasses.sizeMedium}`]: {
|
|
417
550
|
color: 'red',
|
|
418
|
-
|
|
551
|
+
},
|
|
419
552
|
- [`&.${buttonClasses.containedSizeLarge}`]: {
|
|
420
553
|
+ [`&.${buttonClasses.contained}.${buttonClasses.sizeLarge}`]: {
|
|
421
554
|
color: 'red',
|
|
422
|
-
|
|
555
|
+
},
|
|
423
556
|
- [`&.${buttonClasses.textSizeSmall}`]: {
|
|
424
557
|
+ [`&.${buttonClasses.text}.${buttonClasses.sizeSmall}`]: {
|
|
425
558
|
color: 'red',
|
|
426
|
-
|
|
559
|
+
},
|
|
427
560
|
- [`&.${buttonClasses.textSizeMedium}`]: {
|
|
428
561
|
+ [`&.${buttonClasses.text}.${buttonClasses.sizeMedium}`]: {
|
|
429
562
|
color: 'red',
|
|
430
|
-
|
|
563
|
+
},
|
|
431
564
|
- [`&.${buttonClasses.textSizeLarge}`]: {
|
|
432
565
|
+ [`&.${buttonClasses.text}.${buttonClasses.sizeLarge}`]: {
|
|
433
566
|
color: 'red',
|
|
434
|
-
|
|
567
|
+
},
|
|
435
568
|
- [`&.${buttonClasses.outlinedSizeSmall}`]: {
|
|
436
569
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.sizeSmall}`]: {
|
|
437
570
|
color: 'red',
|
|
438
|
-
|
|
571
|
+
},
|
|
439
572
|
- [`&.${buttonClasses.outlinedSizeMedium}`]: {
|
|
440
573
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.sizeMedium}`]: {
|
|
441
574
|
color: 'red',
|
|
442
|
-
|
|
575
|
+
},
|
|
443
576
|
- [`&.${buttonClasses.outlinedSizeLarge}`]: {
|
|
444
577
|
+ [`&.${buttonClasses.outlined}.${buttonClasses.sizeLarge}`]: {
|
|
445
578
|
color: 'red',
|
|
446
|
-
|
|
579
|
+
},
|
|
447
580
|
- [`& .${buttonClasses.iconSizeSmall}`]: {
|
|
448
581
|
+ [`&.${buttonClasses.sizeSmall} > .${buttonClasses.icon}`]: {
|
|
449
582
|
color: 'red',
|
|
450
|
-
|
|
583
|
+
},
|
|
451
584
|
- [`& .${buttonClasses.iconSizeMedium}`]: {
|
|
452
585
|
+ [`&.${buttonClasses.sizeMedium} > .${buttonClasses.icon}`]: {
|
|
453
586
|
color: 'red',
|
|
454
|
-
|
|
587
|
+
},
|
|
455
588
|
- [`& .${buttonClasses.iconSizeLarge}`]: {
|
|
456
589
|
+ [`&.${buttonClasses.sizeLarge} > .${buttonClasses.icon}`]: {
|
|
457
590
|
color: 'red',
|
|
458
|
-
|
|
591
|
+
},
|
|
459
592
|
},
|
|
460
593
|
},
|
|
461
594
|
},
|
|
@@ -530,11 +663,10 @@ CSS transforms:
|
|
|
530
663
|
+.MuiButton-root.MuiButton-sizeMedium > .MuiButton-icon
|
|
531
664
|
-.MuiButton-root .MuiButton-iconSizeLarge
|
|
532
665
|
+.MuiButton-root.MuiButton-sizeLarge > .MuiButton-icon
|
|
533
|
-
/>
|
|
534
666
|
```
|
|
535
667
|
|
|
536
668
|
```bash
|
|
537
|
-
npx @mui/codemod@
|
|
669
|
+
npx @mui/codemod@latest deprecations/button-classes <path>
|
|
538
670
|
```
|
|
539
671
|
|
|
540
672
|
#### `button-group-classes`
|
|
@@ -550,71 +682,71 @@ JS transforms:
|
|
|
550
682
|
- [`& .${buttonGroupClasses.groupedHorizontal}`]: {
|
|
551
683
|
+ [`&.${buttonGroupClasses.horizontal} > .${buttonGroupClasses.grouped}`]: {
|
|
552
684
|
color: 'red',
|
|
553
|
-
|
|
685
|
+
},
|
|
554
686
|
- [`& .${buttonGroupClasses.groupedVertical}`]: {
|
|
555
687
|
+ [`&.${buttonGroupClasses.vertical} > .${buttonGroupClasses.grouped}`]: {
|
|
556
688
|
color: 'red',
|
|
557
|
-
|
|
689
|
+
},
|
|
558
690
|
- [`& .${buttonGroupClasses.groupedText}`]: {
|
|
559
691
|
+ [`&.${buttonGroupClasses.text} > .${buttonGroupClasses.grouped}`]: {
|
|
560
692
|
color: 'red',
|
|
561
|
-
|
|
693
|
+
},
|
|
562
694
|
- [`& .${buttonGroupClasses.groupedTextHorizontal}`]: {
|
|
563
695
|
+ [`&.${buttonGroupClasses.text}.${buttonGroupClasses.horizontal} > .${buttonGroupClasses.grouped}`]: {
|
|
564
696
|
color: 'red',
|
|
565
|
-
|
|
697
|
+
},
|
|
566
698
|
- [`& .${buttonGroupClasses.groupedTextVertical}`]: {
|
|
567
699
|
+ [`&.${buttonGroupClasses.text}.${buttonGroupClasses.vertical} > .${buttonGroupClasses.grouped}`]: {
|
|
568
700
|
color: 'red',
|
|
569
|
-
|
|
701
|
+
},
|
|
570
702
|
- [`& .${buttonGroupClasses.groupedTextPrimary}`]: {
|
|
571
703
|
+ [`&.${buttonGroupClasses.text}.${buttonGroupClasses.colorPrimary} > .${buttonGroupClasses.grouped}`]: {
|
|
572
704
|
color: 'red',
|
|
573
|
-
|
|
705
|
+
},
|
|
574
706
|
- [`& .${buttonGroupClasses.groupedTextSecondary}`]: {
|
|
575
707
|
+ [`&.${buttonGroupClasses.text}.${buttonGroupClasses.colorSecondary} > .${buttonGroupClasses.grouped}`]: {
|
|
576
708
|
color: 'red',
|
|
577
|
-
|
|
709
|
+
},
|
|
578
710
|
- [`& .${buttonGroupClasses.groupedOutlined}`]: {
|
|
579
711
|
+ [`&.${buttonGroupClasses.outlined} > .${buttonGroupClasses.grouped}`]: {
|
|
580
712
|
color: 'red',
|
|
581
|
-
|
|
713
|
+
},
|
|
582
714
|
- [`& .${buttonGroupClasses.groupedOutlinedHorizontal}`]: {
|
|
583
715
|
+ [`&.${buttonGroupClasses.outlined}.${buttonGroupClasses.horizontal} > .${buttonGroupClasses.grouped}`]: {
|
|
584
716
|
color: 'red',
|
|
585
|
-
|
|
717
|
+
},
|
|
586
718
|
- [`& .${buttonGroupClasses.groupedOutlinedVertical}`]: {
|
|
587
719
|
+ [`&.${buttonGroupClasses.outlined}.${buttonGroupClasses.vertical} > .${buttonGroupClasses.grouped}`]: {
|
|
588
720
|
color: 'red',
|
|
589
|
-
|
|
721
|
+
},
|
|
590
722
|
- [`& .${buttonGroupClasses.groupedOutlinedPrimary}`]: {
|
|
591
723
|
+ [`&.${buttonGroupClasses.outlined}.${buttonGroupClasses.colorPrimary} > .${buttonGroupClasses.grouped}`]: {
|
|
592
724
|
color: 'red',
|
|
593
|
-
|
|
725
|
+
},
|
|
594
726
|
- [`& .${buttonGroupClasses.groupedOutlinedSecondary}`]: {
|
|
595
727
|
+ [`&.${buttonGroupClasses.outlined}.${buttonGroupClasses.colorSecondary} > .${buttonGroupClasses.grouped}`]: {
|
|
596
728
|
color: 'red',
|
|
597
|
-
|
|
729
|
+
},
|
|
598
730
|
- [`& .${buttonGroupClasses.groupedContained}`]: {
|
|
599
731
|
+ [`&.${buttonGroupClasses.contained} > .${buttonGroupClasses.grouped}`]: {
|
|
600
732
|
color: 'red',
|
|
601
|
-
|
|
733
|
+
},
|
|
602
734
|
- [`& .${buttonGroupClasses.groupedContainedHorizontal}`]: {
|
|
603
735
|
+ [`&.${buttonGroupClasses.contained}.${buttonGroupClasses.horizontal} > .${buttonGroupClasses.grouped}`]: {
|
|
604
736
|
color: 'red',
|
|
605
|
-
|
|
737
|
+
},
|
|
606
738
|
- [`& .${buttonGroupClasses.groupedContainedVertical}`]: {
|
|
607
739
|
+ [`&.${buttonGroupClasses.contained}.${buttonGroupClasses.vertical} > .${buttonGroupClasses.grouped}`]: {
|
|
608
740
|
color: 'red',
|
|
609
|
-
|
|
741
|
+
},
|
|
610
742
|
- [`& .${buttonGroupClasses.groupedContainedPrimary}`]: {
|
|
611
743
|
+ [`&.${buttonGroupClasses.contained}.${buttonGroupClasses.colorPrimary} > .${buttonGroupClasses.grouped}`]: {
|
|
612
744
|
color: 'red',
|
|
613
|
-
|
|
745
|
+
},
|
|
614
746
|
- [`& .${buttonGroupClasses.groupedContainedSecondary}`]: {
|
|
615
747
|
+ [`&.${buttonGroupClasses.contained}.${buttonGroupClasses.colorSecondary} > .${buttonGroupClasses.grouped}`]: {
|
|
616
748
|
color: 'red',
|
|
617
|
-
|
|
749
|
+
},
|
|
618
750
|
},
|
|
619
751
|
},
|
|
620
752
|
},
|
|
@@ -668,7 +800,6 @@ npx @mui/codemod@latest deprecations/button-group-classes <path>
|
|
|
668
800
|
JS transforms:
|
|
669
801
|
|
|
670
802
|
```diff
|
|
671
|
-
|
|
672
803
|
import { chipClasses } from '@mui/material/Chip';
|
|
673
804
|
|
|
674
805
|
MuiChip: {
|
|
@@ -677,107 +808,107 @@ JS transforms:
|
|
|
677
808
|
- [`&.${chipClasses.clickableColorPrimary}`]: {
|
|
678
809
|
+ [`&.${chipClasses.clickable}.${chipClasses.colorPrimary}`]: {
|
|
679
810
|
color: 'red',
|
|
680
|
-
|
|
811
|
+
},
|
|
681
812
|
- [`&.${chipClasses.clickableColorSecondary}`]: {
|
|
682
813
|
+ [`&.${chipClasses.clickable}.${chipClasses.colorSecondary}`]: {
|
|
683
814
|
color: 'red',
|
|
684
|
-
|
|
815
|
+
},
|
|
685
816
|
- [`&.${chipClasses.deletableColorPrimary}`]: {
|
|
686
817
|
+ [`&.${chipClasses.deletable}.${chipClasses.colorPrimary}`]: {
|
|
687
818
|
color: 'red',
|
|
688
|
-
|
|
819
|
+
},
|
|
689
820
|
- [`&.${chipClasses.deletableColorSecondary}`]: {
|
|
690
821
|
+ [`&.${chipClasses.deletable}.${chipClasses.colorSecondary}`]: {
|
|
691
822
|
color: 'red',
|
|
692
|
-
|
|
823
|
+
},
|
|
693
824
|
- [`&.${chipClasses.outlinedPrimary}`]: {
|
|
694
825
|
+ [`&.${chipClasses.outlined}.${chipClasses.colorPrimary}`]: {
|
|
695
826
|
color: 'red',
|
|
696
|
-
|
|
827
|
+
},
|
|
697
828
|
- [`&.${chipClasses.outlinedSecondary}`]: {
|
|
698
829
|
+ [`&.${chipClasses.outlined}.${chipClasses.colorSecondary}`]: {
|
|
699
830
|
color: 'red',
|
|
700
|
-
|
|
831
|
+
},
|
|
701
832
|
- [`&.${chipClasses.filledPrimary}`]: {
|
|
702
833
|
+ [`&.${chipClasses.filled}.${chipClasses.colorPrimary}`]: {
|
|
703
834
|
color: 'red',
|
|
704
|
-
|
|
835
|
+
},
|
|
705
836
|
- [`&.${chipClasses.filledSecondary}`]: {
|
|
706
837
|
+ [`&.${chipClasses.filled}.${chipClasses.colorSecondary}`]: {
|
|
707
838
|
color: 'red',
|
|
708
|
-
|
|
839
|
+
},
|
|
709
840
|
- [`& .${chipClasses.avatarSmall}`]: {
|
|
710
841
|
+ [`&.${chipClasses.sizeSmall} > .${chipClasses.avatar}`]: {
|
|
711
842
|
color: 'red',
|
|
712
|
-
|
|
843
|
+
},
|
|
713
844
|
- [`& .${chipClasses.avatarMedium}`]: {
|
|
714
845
|
+ [`&.${chipClasses.sizeMedium} > .${chipClasses.avatar}`]: {
|
|
715
846
|
color: 'red',
|
|
716
|
-
|
|
847
|
+
},
|
|
717
848
|
- [`& .${chipClasses.avatarColorPrimary}`]: {
|
|
718
849
|
+ [`&.${chipClasses.colorPrimary} > .${chipClasses.avatar}`]: {
|
|
719
850
|
color: 'red',
|
|
720
|
-
|
|
851
|
+
},
|
|
721
852
|
- [`& .${chipClasses.avatarColorSecondary}`]: {
|
|
722
853
|
+ [`&.${chipClasses.colorSecondary} > .${chipClasses.avatar}`]: {
|
|
723
854
|
color: 'red',
|
|
724
|
-
|
|
855
|
+
},
|
|
725
856
|
- [`& .${chipClasses.iconSmall}`]: {
|
|
726
857
|
+ [`&.${chipClasses.sizeSmall} > .${chipClasses.icon}`]: {
|
|
727
858
|
color: 'red',
|
|
728
|
-
|
|
859
|
+
},
|
|
729
860
|
- [`& .${chipClasses.iconMedium}`]: {
|
|
730
861
|
+ [`&.${chipClasses.sizeMedium} > .${chipClasses.icon}`]: {
|
|
731
862
|
color: 'red',
|
|
732
|
-
|
|
863
|
+
},
|
|
733
864
|
- [`& .${chipClasses.iconColorPrimary}`]: {
|
|
734
865
|
+ [`&.${chipClasses.colorPrimary} > .${chipClasses.icon}`]: {
|
|
735
866
|
color: 'red',
|
|
736
|
-
|
|
867
|
+
},
|
|
737
868
|
- [`& .${chipClasses.iconColorSecondary}`]: {
|
|
738
869
|
+ [`&.${chipClasses.colorSecondary} > .${chipClasses.icon}`]: {
|
|
739
870
|
color: 'red',
|
|
740
|
-
|
|
871
|
+
},
|
|
741
872
|
- [`& .${chipClasses.labelSmall}`]: {
|
|
742
873
|
+ [`&.${chipClasses.sizeSmall} > .${chipClasses.label}`]: {
|
|
743
874
|
color: 'red',
|
|
744
|
-
|
|
875
|
+
},
|
|
745
876
|
- [`& .${chipClasses.labelMedium}`]: {
|
|
746
877
|
+ [`&.${chipClasses.sizeMedium} > .${chipClasses.label}`]: {
|
|
747
878
|
color: 'red',
|
|
748
|
-
|
|
879
|
+
},
|
|
749
880
|
- [`& .${chipClasses.deleteIconSmall}`]: {
|
|
750
881
|
+ [`&.${chipClasses.sizeSmall} > .${chipClasses.deleteIcon}`]: {
|
|
751
882
|
color: 'red',
|
|
752
|
-
|
|
883
|
+
},
|
|
753
884
|
- [`& .${chipClasses.deleteIconMedium}`]: {
|
|
754
885
|
+ [`&.${chipClasses.sizeMedium} > .${chipClasses.deleteIcon}`]: {
|
|
755
886
|
color: 'red',
|
|
756
|
-
|
|
887
|
+
},
|
|
757
888
|
- [`& .${chipClasses.deleteIconColorPrimary}`]: {
|
|
758
889
|
+ [`&.${chipClasses.colorPrimary} > .${chipClasses.deleteIcon}`]: {
|
|
759
890
|
color: 'red',
|
|
760
|
-
|
|
891
|
+
},
|
|
761
892
|
- [`& .${chipClasses.deleteIconColorSecondary}`]: {
|
|
762
893
|
+ [`&.${chipClasses.colorSecondary} > .${chipClasses.deleteIcon}`]: {
|
|
763
894
|
color: 'red',
|
|
764
|
-
|
|
895
|
+
},
|
|
765
896
|
- [`& .${chipClasses.deleteIconOutlinedColorPrimary}`]: {
|
|
766
897
|
+ [`&.${chipClasses.outlined}.${chipClasses.colorPrimary} > .${chipClasses.deleteIcon}`]: {
|
|
767
898
|
color: 'red',
|
|
768
|
-
|
|
899
|
+
},
|
|
769
900
|
- [`& .${chipClasses.deleteIconOutlinedColorSecondary}`]: {
|
|
770
901
|
+ [`&.${chipClasses.outlined}.${chipClasses.colorSecondary} > .${chipClasses.deleteIcon}`]: {
|
|
771
902
|
color: 'red',
|
|
772
|
-
|
|
903
|
+
},
|
|
773
904
|
- [`& .${chipClasses.deleteIconFilledColorPrimary}`]: {
|
|
774
905
|
+ [`&.${chipClasses.filled}.${chipClasses.colorPrimary} > .${chipClasses.deleteIcon}`]: {
|
|
775
906
|
color: 'red',
|
|
776
|
-
|
|
907
|
+
},
|
|
777
908
|
- [`& .${chipClasses.deleteIconFilledColorSecondary}`]: {
|
|
778
909
|
+ [`&.${chipClasses.filled}.${chipClasses.colorSecondary} > .${chipClasses.deleteIcon}`]: {
|
|
779
910
|
color: 'red',
|
|
780
|
-
|
|
911
|
+
},
|
|
781
912
|
},
|
|
782
913
|
},
|
|
783
914
|
},
|
|
@@ -842,64 +973,27 @@ CSS transforms:
|
|
|
842
973
|
```
|
|
843
974
|
|
|
844
975
|
```bash
|
|
845
|
-
npx @mui/codemod@
|
|
846
|
-
```
|
|
847
|
-
|
|
848
|
-
#### `divider-props`
|
|
849
|
-
|
|
850
|
-
```diff
|
|
851
|
-
<Divider
|
|
852
|
-
- light
|
|
853
|
-
+ sx={{opacity: "0.6"}}
|
|
854
|
-
/>
|
|
855
|
-
```
|
|
856
|
-
|
|
857
|
-
```bash
|
|
858
|
-
npx @mui/codemod@next deprecations/divider-props <path>
|
|
976
|
+
npx @mui/codemod@latest deprecations/chip-classes <path>
|
|
859
977
|
```
|
|
860
978
|
|
|
861
|
-
#### `
|
|
979
|
+
#### `circular-progress-classes`
|
|
862
980
|
|
|
863
981
|
JS transforms:
|
|
864
982
|
|
|
865
983
|
```diff
|
|
866
|
-
import {
|
|
984
|
+
import { circularProgressClasses } from '@mui/material/CircularProgress';
|
|
867
985
|
|
|
868
|
-
|
|
986
|
+
MuiCircularProgress: {
|
|
869
987
|
styleOverrides: {
|
|
870
988
|
root: {
|
|
871
|
-
- [
|
|
872
|
-
+ [`&.${
|
|
873
|
-
color: 'red',
|
|
874
|
-
},
|
|
875
|
-
- [`&.${paginationItemClasses.textSecondary}`]: {
|
|
876
|
-
+ [`&.${paginationItemClasses.text}.${paginationItemClasses.colorSecondary}`]: {
|
|
877
|
-
color: 'red',
|
|
878
|
-
},
|
|
879
|
-
- [`&.${paginationItemClasses.outlinedPrimary}`]: {
|
|
880
|
-
+ [`&.${paginationItemClasses.outlined}.${paginationItemClasses.colorPrimary}`]: {
|
|
881
|
-
color: 'red',
|
|
882
|
-
},
|
|
883
|
-
- [`&.${paginationItemClasses.outlinedSecondary}`]: {
|
|
884
|
-
+ [`&.${paginationItemClasses.outlined}.${paginationItemClasses.colorSecondary}`]: {
|
|
885
|
-
color: 'red',
|
|
886
|
-
},
|
|
887
|
-
- '&.MuiPaginationItem-textPrimary': {
|
|
888
|
-
+ '&.MuiPaginationItem-text.MuiPaginationItem-colorPrimary': {
|
|
889
|
-
color: 'red',
|
|
890
|
-
},
|
|
891
|
-
- '&.MuiPaginationItem-textSecondary': {
|
|
892
|
-
+ '&.MuiPaginationItem-text.MuiPaginationItem-colorSecondary': {
|
|
893
|
-
color: 'red',
|
|
894
|
-
},
|
|
895
|
-
- '&.MuiPaginationItem-outlinedPrimary': {
|
|
896
|
-
+ '&.MuiPaginationItem-outlined.MuiPaginationItem-colorPrimary': {
|
|
989
|
+
- [`& .${circularProgressClasses.circleDeterminate}`]: {
|
|
990
|
+
+ [`&.${circularProgressClasses.determinate} > .${circularProgressClasses.circle}`]: {
|
|
897
991
|
color: 'red',
|
|
898
|
-
|
|
899
|
-
-
|
|
900
|
-
+
|
|
992
|
+
},
|
|
993
|
+
- [`& .${circularProgressClasses.circleIndeterminate}`]: {
|
|
994
|
+
+ [`&.${circularProgressClasses.indeterminate} > .${circularProgressClasses.circle}`]: {
|
|
901
995
|
color: 'red',
|
|
902
|
-
|
|
996
|
+
},
|
|
903
997
|
},
|
|
904
998
|
},
|
|
905
999
|
},
|
|
@@ -908,64 +1002,146 @@ JS transforms:
|
|
|
908
1002
|
CSS transforms:
|
|
909
1003
|
|
|
910
1004
|
```diff
|
|
911
|
-
-.
|
|
912
|
-
+.
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
+.MuiPaginationItem-outlined.MuiPaginationItem-secondary
|
|
1005
|
+
-.MuiCircularProgress-circleDeterminate
|
|
1006
|
+
+.MuiCircularProgress-determinate > .MuiCircularProgress-circle
|
|
1007
|
+
```
|
|
1008
|
+
|
|
1009
|
+
```diff
|
|
1010
|
+
-.MuiCircularProgress-circleIndeterminate
|
|
1011
|
+
+.MuiCircularProgress-indeterminate > .MuiCircularProgress-circle
|
|
919
1012
|
```
|
|
920
1013
|
|
|
921
1014
|
```bash
|
|
922
|
-
npx @mui/codemod@
|
|
1015
|
+
npx @mui/codemod@latest deprecations/circular-progress-classes <path>
|
|
923
1016
|
```
|
|
924
1017
|
|
|
925
|
-
#### `
|
|
1018
|
+
#### `divider-props`
|
|
926
1019
|
|
|
927
1020
|
```diff
|
|
928
|
-
<
|
|
929
|
-
-
|
|
930
|
-
+
|
|
931
|
-
|
|
932
|
-
|
|
1021
|
+
<Divider
|
|
1022
|
+
- light
|
|
1023
|
+
+ sx={{ opacity: 0.6 }}
|
|
1024
|
+
/>
|
|
1025
|
+
```
|
|
1026
|
+
|
|
1027
|
+
```bash
|
|
1028
|
+
npx @mui/codemod@latest deprecations/divider-props <path>
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
#### `filled-input-props`
|
|
1032
|
+
|
|
1033
|
+
```diff
|
|
1034
|
+
<FilledInput
|
|
1035
|
+
- components={{ Input: CustomInput, Root: CustomRoot }}
|
|
1036
|
+
- componentsProps={{ input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }}
|
|
1037
|
+
+ slots={{ input: CustomInput, root: CustomRoot }}
|
|
1038
|
+
+ slotProps={{ input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }}
|
|
933
1039
|
/>
|
|
934
1040
|
```
|
|
935
1041
|
|
|
936
1042
|
```diff
|
|
937
|
-
|
|
1043
|
+
MuiFilledInput: {
|
|
938
1044
|
defaultProps: {
|
|
939
|
-
- components: {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
+ slotProps: {
|
|
943
|
-
|
|
1045
|
+
- components: { Input: CustomInput, Root: CustomRoot }
|
|
1046
|
+
- componentsProps: { input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }
|
|
1047
|
+
+ slots: { input: CustomInput, root: CustomRoot },
|
|
1048
|
+
+ slotProps: { input: { id: 'test-input-id' }, root: { id: 'test-root-id' } },
|
|
1049
|
+
},
|
|
944
1050
|
},
|
|
945
1051
|
```
|
|
946
1052
|
|
|
947
1053
|
```bash
|
|
948
|
-
npx @mui/codemod@
|
|
1054
|
+
npx @mui/codemod@latest deprecations/filled-input-props <path>
|
|
949
1055
|
```
|
|
950
1056
|
|
|
951
|
-
#### `
|
|
1057
|
+
#### `form-control-label-props`
|
|
952
1058
|
|
|
953
|
-
|
|
1059
|
+
```diff
|
|
1060
|
+
<FormControlLabel
|
|
1061
|
+
- componentsProps={{ typography: typographyProps }}
|
|
1062
|
+
+ slotProps={{ typography: typographyProps }}
|
|
1063
|
+
/>
|
|
1064
|
+
```
|
|
954
1065
|
|
|
955
1066
|
```diff
|
|
956
|
-
|
|
1067
|
+
MuiFormControlLabel: {
|
|
1068
|
+
defaultProps: {
|
|
1069
|
+
- componentsProps={{ typography: typographyProps }}
|
|
1070
|
+
+ slotProps={{ typography: typographyProps }}
|
|
1071
|
+
},
|
|
1072
|
+
},
|
|
1073
|
+
```
|
|
957
1074
|
|
|
958
|
-
|
|
1075
|
+
```bash
|
|
1076
|
+
npx @mui/codemod@latest deprecations/form-control-label-props <path>
|
|
1077
|
+
|
|
1078
|
+
```
|
|
1079
|
+
|
|
1080
|
+
#### `list-item-props`
|
|
1081
|
+
|
|
1082
|
+
```diff
|
|
1083
|
+
<ListItem
|
|
1084
|
+
- components={{ Root: CustomRoot }}
|
|
1085
|
+
- componentsProps={{ root: { testid: 'test-id' } }}
|
|
1086
|
+
+ slots={{ root: CustomRoot }}
|
|
1087
|
+
+ slotProps={{ root: { testid: 'test-id' } }}
|
|
1088
|
+
/>
|
|
1089
|
+
```
|
|
1090
|
+
|
|
1091
|
+
```diff
|
|
1092
|
+
MuiListItem: {
|
|
1093
|
+
defaultProps: {
|
|
1094
|
+
- components: { Root: CustomRoot }
|
|
1095
|
+
- componentsProps: { root: { testid: 'test-id' }}
|
|
1096
|
+
+ slots: { root: CustomRoot },
|
|
1097
|
+
+ slotProps: { root: { testid: 'test-id' } },
|
|
1098
|
+
},
|
|
1099
|
+
},
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
```bash
|
|
1103
|
+
npx @mui/codemod@latest deprecations/list-item-props <path>
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
#### `grid-props`
|
|
1107
|
+
|
|
1108
|
+
```diff
|
|
1109
|
+
<Grid
|
|
1110
|
+
- wrap="nowrap"
|
|
1111
|
+
+ flexWrap="nowrap"
|
|
1112
|
+
/>
|
|
1113
|
+
```
|
|
1114
|
+
|
|
1115
|
+
```bash
|
|
1116
|
+
npx @mui/codemod@latest deprecations/grid-props <path>
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
#### `image-list-item-bar-classes`
|
|
1120
|
+
|
|
1121
|
+
JS transforms:
|
|
1122
|
+
|
|
1123
|
+
```diff
|
|
1124
|
+
import { imageListItemBarClasses } from '@mui/material/ImageListItemBar';
|
|
1125
|
+
|
|
1126
|
+
MuiImageListItemBar: {
|
|
959
1127
|
styleOverrides: {
|
|
960
1128
|
root: {
|
|
961
|
-
- [`& .${
|
|
962
|
-
+ [`&.${
|
|
1129
|
+
- [`& .${imageListItemBarClasses.titleWrapBelow}`]: {
|
|
1130
|
+
+ [`&.${imageListItemBarClasses.positionBelow} > .${imageListItemBarClasses.titleWrap}`]: {
|
|
963
1131
|
color: 'red',
|
|
964
|
-
|
|
965
|
-
- [`& .${
|
|
966
|
-
+ [`&.${
|
|
1132
|
+
},
|
|
1133
|
+
- [`& .${imageListItemBarClasses.titleWrapActionPosLeft}`]: {
|
|
1134
|
+
+ [`&.${imageListItemBarClasses.actionPositionLeft} > .${imageListItemBarClasses.titleWrap}`]: {
|
|
967
1135
|
color: 'red',
|
|
968
|
-
|
|
1136
|
+
},
|
|
1137
|
+
- [`& .${imageListItemBarClasses.titleWrapActionPosRight}`]: {
|
|
1138
|
+
+ [`&.${imageListItemBarClasses.actionPositionRight} > .${imageListItemBarClasses.titleWrap}`]: {
|
|
1139
|
+
color: 'red',
|
|
1140
|
+
},
|
|
1141
|
+
- [`& .${imageListItemBarClasses.actionIconActionPosLeft}`]: {
|
|
1142
|
+
+ [`&.${imageListItemBarClasses.actionPositionLeft} > .${imageListItemBarClasses.actionIcon}`]: {
|
|
1143
|
+
color: 'red',
|
|
1144
|
+
},
|
|
969
1145
|
},
|
|
970
1146
|
},
|
|
971
1147
|
},
|
|
@@ -974,15 +1150,318 @@ JS transforms:
|
|
|
974
1150
|
CSS transforms:
|
|
975
1151
|
|
|
976
1152
|
```diff
|
|
977
|
-
|
|
978
|
-
+.
|
|
979
|
-
|
|
980
|
-
|
|
1153
|
+
- .MuiImageListItemBar-titleWrapBelow
|
|
1154
|
+
+.MuiImageListItemBar-positionBelow > .MuiImageListItemBar-titleWrap
|
|
1155
|
+
```
|
|
1156
|
+
|
|
1157
|
+
```diff
|
|
1158
|
+
- .MuiImageListItemBar-titleWrapActionPosLeft
|
|
1159
|
+
+.MuiImageListItemBar-actionPositionLeft > .MuiImageListItemBar-titleWrap
|
|
1160
|
+
```
|
|
1161
|
+
|
|
1162
|
+
```diff
|
|
1163
|
+
- .MuiImageListItemBar-titleWrapActionPosRight
|
|
1164
|
+
+.MuiImageListItemBar-actionPositionRight > .MuiImageListItemBar-titleWrap
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
```diff
|
|
1168
|
+
- .MuiImageListItemBar-actionIconActionPosLeft
|
|
1169
|
+
+.MuiImageListItemBar-actionPositionLeft > .MuiImageListItemBar-actionIcon
|
|
1170
|
+
```
|
|
1171
|
+
|
|
1172
|
+
```bash
|
|
1173
|
+
npx @mui/codemod@latest deprecations/image-list-item-bar-classes <path>
|
|
1174
|
+
```
|
|
1175
|
+
|
|
1176
|
+
#### `input-base-props`
|
|
1177
|
+
|
|
1178
|
+
```diff
|
|
1179
|
+
<InputBase
|
|
1180
|
+
- components={{ Input: CustomInput, Root: CustomRoot }}
|
|
1181
|
+
- componentsProps={{ input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }}
|
|
1182
|
+
+ slots={{ input: CustomInput, root: CustomRoot }}
|
|
1183
|
+
+ slotProps={{ input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }}
|
|
981
1184
|
/>
|
|
982
1185
|
```
|
|
983
1186
|
|
|
1187
|
+
```diff
|
|
1188
|
+
MuiInputBase: {
|
|
1189
|
+
defaultProps: {
|
|
1190
|
+
- components: { Input: CustomInput, Root: CustomRoot }
|
|
1191
|
+
- componentsProps: { input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }
|
|
1192
|
+
+ slots: { input: CustomInput, root: CustomRoot },
|
|
1193
|
+
+ slotProps: { input: { id: 'test-input-id' }, root: { id: 'test-root-id' } },
|
|
1194
|
+
},
|
|
1195
|
+
},
|
|
1196
|
+
```
|
|
1197
|
+
|
|
984
1198
|
```bash
|
|
985
|
-
npx @mui/codemod@latest deprecations/
|
|
1199
|
+
npx @mui/codemod@latest deprecations/input-base-props <path>
|
|
1200
|
+
```
|
|
1201
|
+
|
|
1202
|
+
#### `input-props`
|
|
1203
|
+
|
|
1204
|
+
```diff
|
|
1205
|
+
<Input
|
|
1206
|
+
- components={{ Input: CustomInput, Root: CustomRoot }}
|
|
1207
|
+
- componentsProps={{ input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }}
|
|
1208
|
+
+ slots={{ input: CustomInput, root: CustomRoot }}
|
|
1209
|
+
+ slotProps={{ input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }}
|
|
1210
|
+
/>
|
|
1211
|
+
```
|
|
1212
|
+
|
|
1213
|
+
```diff
|
|
1214
|
+
MuiInput: {
|
|
1215
|
+
defaultProps: {
|
|
1216
|
+
- components: { Input: CustomInput, Root: CustomRoot }
|
|
1217
|
+
- componentsProps: { input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }
|
|
1218
|
+
+ slots: { input: CustomInput, root: CustomRoot },
|
|
1219
|
+
+ slotProps: { input: { id: 'test-input-id' }, root: { id: 'test-root-id' } },
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
```
|
|
1223
|
+
|
|
1224
|
+
```bash
|
|
1225
|
+
npx @mui/codemod@latest deprecations/input-props <path>
|
|
1226
|
+
```
|
|
1227
|
+
|
|
1228
|
+
#### `modal-props`
|
|
1229
|
+
|
|
1230
|
+
```diff
|
|
1231
|
+
<Modal
|
|
1232
|
+
- components={{ Root: CustomRoot, Backdrop: CustomBackdrop }}
|
|
1233
|
+
- componentsProps={{ root: { testid: 'root-id' }, backdrop: { testid: 'backdrop-id' } }}
|
|
1234
|
+
+ slots={{ root: CustomRoot, backdrop: CustomBackdrop }}
|
|
1235
|
+
+ slotProps={{ root: { testid: 'root-id' }, backdrop: { testid: 'backdrop-id' } }}
|
|
1236
|
+
/>
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
```diff
|
|
1240
|
+
MuiModal: {
|
|
1241
|
+
defaultProps: {
|
|
1242
|
+
- components: { Root: CustomRoot, Backdrop: CustomBackdrop }
|
|
1243
|
+
- componentsProps: { root: { testid: 'root-id' }, backdrop: { testid: 'backdrop-id' }}
|
|
1244
|
+
+ slots: { root: CustomRoot, backdrop: CustomBackdrop },
|
|
1245
|
+
+ slotProps: { root: { testid: 'root-id' }, backdrop: { testid: 'backdrop-id' } },
|
|
1246
|
+
},
|
|
1247
|
+
},
|
|
1248
|
+
```
|
|
1249
|
+
|
|
1250
|
+
```bash
|
|
1251
|
+
npx @mui/codemod@latest deprecations/modal-props <path>
|
|
1252
|
+
```
|
|
1253
|
+
|
|
1254
|
+
#### `pagination-item-classes`
|
|
1255
|
+
|
|
1256
|
+
JS transforms:
|
|
1257
|
+
|
|
1258
|
+
```diff
|
|
1259
|
+
import { paginationItemClasses } from '@mui/material/PaginationItem';
|
|
1260
|
+
|
|
1261
|
+
MuiPaginationItem: {
|
|
1262
|
+
styleOverrides: {
|
|
1263
|
+
root: {
|
|
1264
|
+
- [`&.${paginationItemClasses.textPrimary}`]: {
|
|
1265
|
+
+ [`&.${paginationItemClasses.text}.${paginationItemClasses.colorPrimary}`]: {
|
|
1266
|
+
color: 'red',
|
|
1267
|
+
},
|
|
1268
|
+
- [`&.${paginationItemClasses.textSecondary}`]: {
|
|
1269
|
+
+ [`&.${paginationItemClasses.text}.${paginationItemClasses.colorSecondary}`]: {
|
|
1270
|
+
color: 'red',
|
|
1271
|
+
},
|
|
1272
|
+
- [`&.${paginationItemClasses.outlinedPrimary}`]: {
|
|
1273
|
+
+ [`&.${paginationItemClasses.outlined}.${paginationItemClasses.colorPrimary}`]: {
|
|
1274
|
+
color: 'red',
|
|
1275
|
+
},
|
|
1276
|
+
- [`&.${paginationItemClasses.outlinedSecondary}`]: {
|
|
1277
|
+
+ [`&.${paginationItemClasses.outlined}.${paginationItemClasses.colorSecondary}`]: {
|
|
1278
|
+
color: 'red',
|
|
1279
|
+
},
|
|
1280
|
+
- '&.MuiPaginationItem-textPrimary': {
|
|
1281
|
+
+ '&.MuiPaginationItem-text.MuiPaginationItem-colorPrimary': {
|
|
1282
|
+
color: 'red',
|
|
1283
|
+
},
|
|
1284
|
+
- '&.MuiPaginationItem-textSecondary': {
|
|
1285
|
+
+ '&.MuiPaginationItem-text.MuiPaginationItem-colorSecondary': {
|
|
1286
|
+
color: 'red',
|
|
1287
|
+
},
|
|
1288
|
+
- '&.MuiPaginationItem-outlinedPrimary': {
|
|
1289
|
+
+ '&.MuiPaginationItem-outlined.MuiPaginationItem-colorPrimary': {
|
|
1290
|
+
color: 'red',
|
|
1291
|
+
},
|
|
1292
|
+
- '&.MuiPaginationItem-outlinedSecondary': {
|
|
1293
|
+
+ '&.MuiPaginationItem-outlined.MuiPaginationItem-colorSecondary': {
|
|
1294
|
+
color: 'red',
|
|
1295
|
+
},
|
|
1296
|
+
},
|
|
1297
|
+
},
|
|
1298
|
+
},
|
|
1299
|
+
```
|
|
1300
|
+
|
|
1301
|
+
CSS transforms:
|
|
1302
|
+
|
|
1303
|
+
```diff
|
|
1304
|
+
-.MuiPaginationItem-textPrimary
|
|
1305
|
+
+.MuiPaginationItem-text.MuiPaginationItem-primary
|
|
1306
|
+
-.MuiPaginationItem-textSecondary
|
|
1307
|
+
+.MuiPaginationItem-text.MuiPaginationItem-secondary
|
|
1308
|
+
-.MuiPaginationItem-outlinedPrimary
|
|
1309
|
+
+.MuiPaginationItem-outlined.MuiPaginationItem-primary
|
|
1310
|
+
-.MuiPaginationItem-outlinedSecondary
|
|
1311
|
+
+.MuiPaginationItem-outlined.MuiPaginationItem-secondary
|
|
1312
|
+
```
|
|
1313
|
+
|
|
1314
|
+
```bash
|
|
1315
|
+
npx @mui/codemod@latest deprecations/pagination-item-classes <path>
|
|
1316
|
+
```
|
|
1317
|
+
|
|
1318
|
+
#### `pagination-item-props`
|
|
1319
|
+
|
|
1320
|
+
```diff
|
|
1321
|
+
<PaginationItem
|
|
1322
|
+
- components={{ first: FirstIcon, last: LastIcon, next: NextIcon, previous: PreviousIcons }}
|
|
1323
|
+
+ slots={{ first: FirstIcon, last: LastIcon, next: NextIcon, previous: PreviousIcons }}
|
|
1324
|
+
/>
|
|
1325
|
+
```
|
|
1326
|
+
|
|
1327
|
+
```diff
|
|
1328
|
+
MuiPaginationItem: {
|
|
1329
|
+
defaultProps: {
|
|
1330
|
+
- components: { first: FirstIcon, last: LastIcon, next: NextIcon, previous: PreviousIcons }
|
|
1331
|
+
+ slots: { first: FirstIcon, last: LastIcon, next: NextIcon, previous: PreviousIcons }
|
|
1332
|
+
},
|
|
1333
|
+
},
|
|
1334
|
+
```
|
|
1335
|
+
|
|
1336
|
+
```bash
|
|
1337
|
+
npx @mui/codemod@latest deprecations/pagination-item-props <path>
|
|
1338
|
+
```
|
|
1339
|
+
|
|
1340
|
+
#### `popper-props`
|
|
1341
|
+
|
|
1342
|
+
```diff
|
|
1343
|
+
<Popper
|
|
1344
|
+
- components={{ Root: CustomRoot }}
|
|
1345
|
+
- componentsProps={{ root: { testid: 'test-id' } }}
|
|
1346
|
+
+ slots={{ root: CustomRoot }}
|
|
1347
|
+
+ slotProps={{ root: { testid: 'test-id' } }}
|
|
1348
|
+
/>
|
|
1349
|
+
```
|
|
1350
|
+
|
|
1351
|
+
```diff
|
|
1352
|
+
MuiPopper: {
|
|
1353
|
+
defaultProps: {
|
|
1354
|
+
- components: { Root: CustomRoot }
|
|
1355
|
+
- componentsProps: { root: { testid: 'test-id' }}
|
|
1356
|
+
+ slots: { root: CustomRoot },
|
|
1357
|
+
+ slotProps: { root: { testid: 'test-id' } },
|
|
1358
|
+
},
|
|
1359
|
+
},
|
|
1360
|
+
```
|
|
1361
|
+
|
|
1362
|
+
```bash
|
|
1363
|
+
npx @mui/codemod@latest deprecations/popper-props <path>
|
|
1364
|
+
```
|
|
1365
|
+
|
|
1366
|
+
#### `outlined-input-props`
|
|
1367
|
+
|
|
1368
|
+
```diff
|
|
1369
|
+
<OutlinedInput
|
|
1370
|
+
- components={{ Input: CustomInput, Root: CustomRoot }}
|
|
1371
|
+
- componentsProps={{ input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }}
|
|
1372
|
+
+ slots={{ input: CustomInput, root: CustomRoot }}
|
|
1373
|
+
+ slotProps={{ input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }}
|
|
1374
|
+
/>
|
|
1375
|
+
```
|
|
1376
|
+
|
|
1377
|
+
```diff
|
|
1378
|
+
MuiOutlinedInput: {
|
|
1379
|
+
defaultProps: {
|
|
1380
|
+
- components: { Input: CustomInput, Root: CustomRoot }
|
|
1381
|
+
- componentsProps: { input: { id: 'test-input-id' }, root: { id: 'test-root-id' } }
|
|
1382
|
+
+ slots: { input: CustomInput, root: CustomRoot },
|
|
1383
|
+
+ slotProps: { input: { id: 'test-input-id' }, root: { id: 'test-root-id' } },
|
|
1384
|
+
},
|
|
1385
|
+
},
|
|
1386
|
+
```
|
|
1387
|
+
|
|
1388
|
+
```bash
|
|
1389
|
+
npx @mui/codemod@latest deprecations/outlined-input-props <path>
|
|
1390
|
+
```
|
|
1391
|
+
|
|
1392
|
+
#### `slider-props`
|
|
1393
|
+
|
|
1394
|
+
```diff
|
|
1395
|
+
<Slider
|
|
1396
|
+
- components={{ Track: CustomTrack }}
|
|
1397
|
+
- componentsProps={{ track: { testid: 'test-id' } }}
|
|
1398
|
+
+ slots={{ track: CustomTrack }}
|
|
1399
|
+
+ slotProps={{ track: { testid: 'test-id' } }}
|
|
1400
|
+
/>
|
|
1401
|
+
```
|
|
1402
|
+
|
|
1403
|
+
```diff
|
|
1404
|
+
MuiSlider: {
|
|
1405
|
+
defaultProps: {
|
|
1406
|
+
- components: { Track: CustomTrack }
|
|
1407
|
+
- componentsProps: { track: { testid: 'test-id' }}
|
|
1408
|
+
+ slots: { track: CustomTrack },
|
|
1409
|
+
+ slotProps: { track: { testid: 'test-id' } },
|
|
1410
|
+
},
|
|
1411
|
+
},
|
|
1412
|
+
```
|
|
1413
|
+
|
|
1414
|
+
```bash
|
|
1415
|
+
npx @mui/codemod@latest deprecations/slider-props <path>
|
|
1416
|
+
```
|
|
1417
|
+
|
|
1418
|
+
#### `tooltip-props`
|
|
1419
|
+
|
|
1420
|
+
```diff
|
|
1421
|
+
<Tooltip
|
|
1422
|
+
- components={{ Arrow: CustomArrow }}
|
|
1423
|
+
- componentsProps={{ arrow: { testid: 'test-id' } }}
|
|
1424
|
+
+ slots={{ arrow: CustomArrow }}
|
|
1425
|
+
+ slotProps={{ arrow: { testid: 'test-id' } }}
|
|
1426
|
+
/>
|
|
1427
|
+
```
|
|
1428
|
+
|
|
1429
|
+
```diff
|
|
1430
|
+
MuiTooltip: {
|
|
1431
|
+
defaultProps: {
|
|
1432
|
+
- components: { Arrow: CustomArrow }
|
|
1433
|
+
+ slots: { arrow: CustomArrow },
|
|
1434
|
+
- componentsProps: { arrow: { testid: 'test-id' }}
|
|
1435
|
+
+ slotProps: { arrow: { testid: 'test-id' } },
|
|
1436
|
+
},
|
|
1437
|
+
},
|
|
1438
|
+
```
|
|
1439
|
+
|
|
1440
|
+
```bash
|
|
1441
|
+
npx @mui/codemod@latest deprecations/tooltip-props <path>
|
|
1442
|
+
```
|
|
1443
|
+
|
|
1444
|
+
#### `step-connector-classes`
|
|
1445
|
+
|
|
1446
|
+
JS transforms:
|
|
1447
|
+
|
|
1448
|
+
```diff
|
|
1449
|
+
import { stepConnectorClasses } from '@mui/material/StepConnector';
|
|
1450
|
+
|
|
1451
|
+
MuiStepConnector: {
|
|
1452
|
+
styleOverrides: {
|
|
1453
|
+
root: {
|
|
1454
|
+
- [`& .${stepConnectorClasses.lineHorizontal}`]: {
|
|
1455
|
+
+ [`&.${stepConnectorClasses.horizontal} > .${stepConnectorClasses.line}`]: {
|
|
1456
|
+
color: 'red',
|
|
1457
|
+
},
|
|
1458
|
+
- [`& .${stepConnectorClasses.lineVertical}`]: {
|
|
1459
|
+
+ [`&.${stepConnectorClasses.vertical} > .${stepConnectorClasses.line}`]: {
|
|
1460
|
+
color: 'red',
|
|
1461
|
+
},
|
|
1462
|
+
},
|
|
1463
|
+
},
|
|
1464
|
+
},
|
|
986
1465
|
```
|
|
987
1466
|
|
|
988
1467
|
#### `step-label-props`
|
|
@@ -1013,27 +1492,49 @@ npx @mui/codemod@latest deprecations/toggle-button-group-classes <path>
|
|
|
1013
1492
|
|
|
1014
1493
|
```bash
|
|
1015
1494
|
npx @mui/codemod@latest deprecations/step-label-props <path>
|
|
1495
|
+
```
|
|
1496
|
+
|
|
1497
|
+
#### `text-field-props`
|
|
1016
1498
|
|
|
1499
|
+
```diff
|
|
1500
|
+
<TextField
|
|
1501
|
+
- InputProps={CustomInputProps}
|
|
1502
|
+
- inputProps={CustomHtmlInputProps}
|
|
1503
|
+
- SelectProps={CustomSelectProps}
|
|
1504
|
+
- InputLabelProps={CustomInputLabelProps}
|
|
1505
|
+
- FormHelperTextProps={CustomFormHelperProps}
|
|
1506
|
+
+ slotProps={{
|
|
1507
|
+
+ input: CustomInputProps,
|
|
1508
|
+
+ htmlInput: CustomHtmlInputProps,
|
|
1509
|
+
+ select: CustomSelectProps,
|
|
1510
|
+
+ inputLabel: CustomInputLabelProps,
|
|
1511
|
+
+ formHelper: CustomFormHelperProps,
|
|
1512
|
+
+ }}
|
|
1513
|
+
/>
|
|
1017
1514
|
```
|
|
1018
1515
|
|
|
1019
|
-
|
|
1516
|
+
```bash
|
|
1517
|
+
npx @mui/codemod@latest deprecations/text-field-props <path>
|
|
1518
|
+
```
|
|
1519
|
+
|
|
1520
|
+
#### `toggle-button-group-classes`
|
|
1020
1521
|
|
|
1021
1522
|
JS transforms:
|
|
1022
1523
|
|
|
1023
1524
|
```diff
|
|
1024
|
-
import {
|
|
1525
|
+
import { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
1025
1526
|
|
|
1026
|
-
|
|
1527
|
+
MuiToggleButtonGroup: {
|
|
1027
1528
|
styleOverrides: {
|
|
1028
1529
|
root: {
|
|
1029
|
-
- [`& .${
|
|
1030
|
-
+ [`&.${
|
|
1530
|
+
- [`& .${toggleButtonGroupClasses.groupedHorizontal}`]: {
|
|
1531
|
+
+ [`&.${toggleButtonGroupClasses.horizontal} > .${toggleButtonGroupClasses.grouped}`]: {
|
|
1031
1532
|
color: 'red',
|
|
1032
|
-
|
|
1033
|
-
- [`& .${
|
|
1034
|
-
+ [`&.${
|
|
1533
|
+
},
|
|
1534
|
+
- [`& .${toggleButtonGroupClasses.groupedVertical}`]: {
|
|
1535
|
+
+ [`&.${toggleButtonGroupClasses.vertical} > .${toggleButtonGroupClasses.grouped}`]: {
|
|
1035
1536
|
color: 'red',
|
|
1036
|
-
|
|
1537
|
+
},
|
|
1037
1538
|
},
|
|
1038
1539
|
},
|
|
1039
1540
|
},
|
|
@@ -1042,19 +1543,231 @@ JS transforms:
|
|
|
1042
1543
|
CSS transforms:
|
|
1043
1544
|
|
|
1044
1545
|
```diff
|
|
1045
|
-
- .
|
|
1546
|
+
-.MuiToggleButtonGroup-root .MuiToggleButtonGroup-groupedHorizontal
|
|
1547
|
+
+.MuiToggleButtonGroup-root.MuiToggleButtonGroup-horizontal > .MuiToggleButtonGroup-grouped
|
|
1548
|
+
```
|
|
1549
|
+
|
|
1550
|
+
```diff
|
|
1551
|
+
-.MuiToggleButtonGroup-root .MuiToggleButtonGroup-groupedVertical
|
|
1552
|
+
+.MuiToggleButtonGroup-root.MuiToggleButtonGroup-vertical > .MuiToggleButtonGroup-grouped
|
|
1553
|
+
```
|
|
1554
|
+
|
|
1555
|
+
```bash
|
|
1556
|
+
npx @mui/codemod@latest deprecations/toggle-button-group-classes <path>
|
|
1557
|
+
```
|
|
1558
|
+
|
|
1559
|
+
CSS transforms:
|
|
1560
|
+
|
|
1561
|
+
```diff
|
|
1562
|
+
-.MuiStepConnector-lineHorizontal
|
|
1046
1563
|
+.MuiStepConnector-horizontal > .MuiStepConnector-line
|
|
1047
|
-
|
|
1564
|
+
```
|
|
1565
|
+
|
|
1566
|
+
```diff
|
|
1567
|
+
-.MuiStepConnector-lineVertical
|
|
1048
1568
|
+.MuiStepConnector-vertical > .MuiStepConnector-line
|
|
1049
1569
|
```
|
|
1050
1570
|
|
|
1051
1571
|
```bash
|
|
1052
|
-
npx @mui/codemod@
|
|
1572
|
+
npx @mui/codemod@latest deprecations/step-connector-classes <path>
|
|
1573
|
+
```
|
|
1574
|
+
|
|
1575
|
+
#### `tab-classes`
|
|
1576
|
+
|
|
1577
|
+
JS transforms:
|
|
1578
|
+
|
|
1579
|
+
```diff
|
|
1580
|
+
import { tabClasses } from '@mui/material/Tab';
|
|
1581
|
+
|
|
1582
|
+
MuiTab: {
|
|
1583
|
+
styleOverrides: {
|
|
1584
|
+
root: {
|
|
1585
|
+
- [`& .${tabClasses.iconWrapper}`]: {
|
|
1586
|
+
+ [`& .${tabClasses.icon}`]: {
|
|
1587
|
+
color: 'red',
|
|
1588
|
+
},
|
|
1589
|
+
},
|
|
1590
|
+
},
|
|
1591
|
+
},
|
|
1592
|
+
```
|
|
1593
|
+
|
|
1594
|
+
CSS transforms:
|
|
1595
|
+
|
|
1596
|
+
```diff
|
|
1597
|
+
-.MuiTab-iconWrapper
|
|
1598
|
+
+.MuiTab-icon
|
|
1599
|
+
```
|
|
1600
|
+
|
|
1601
|
+
```bash
|
|
1602
|
+
npx @mui/codemod@latest deprecations/tab-classes <path>
|
|
1603
|
+
```
|
|
1604
|
+
|
|
1605
|
+
#### `table-sort-label-classes`
|
|
1606
|
+
|
|
1607
|
+
JS transforms:
|
|
1608
|
+
|
|
1609
|
+
```diff
|
|
1610
|
+
import { tableSortLabelClasses } from '@mui/material/TableSortLabel';
|
|
1611
|
+
|
|
1612
|
+
MuiTableSortLabel: {
|
|
1613
|
+
styleOverrides: {
|
|
1614
|
+
root: {
|
|
1615
|
+
- [`& .${tableSortLabelClasses.iconDirectionDesc}`]: {
|
|
1616
|
+
+ [`&.${tableSortLabelClasses.directionDesc} > .${tableSortLabelClasses.icon}`]: {
|
|
1617
|
+
color: 'red',
|
|
1618
|
+
},
|
|
1619
|
+
- [`& .${tableSortLabelClasses.iconDirectionAsc}`]: {
|
|
1620
|
+
+ [`&.${tableSortLabelClasses.directionAsc} > .${tableSortLabelClasses.icon}`]: {
|
|
1621
|
+
color: 'red',
|
|
1622
|
+
},
|
|
1623
|
+
},
|
|
1624
|
+
},
|
|
1625
|
+
},
|
|
1626
|
+
```
|
|
1627
|
+
|
|
1628
|
+
CSS transforms:
|
|
1629
|
+
|
|
1630
|
+
```diff
|
|
1631
|
+
-.MuiTableSortLabel-iconDirectionDesc
|
|
1632
|
+
+.MuiTableSortLabel-directionDesc > .MuiTableSortLabel-icon
|
|
1633
|
+
```
|
|
1634
|
+
|
|
1635
|
+
```diff
|
|
1636
|
+
-.MuiTableSortLabel-iconDirectionAsc
|
|
1637
|
+
+.MuiTableSortLabel-directionAsc > .MuiTableSortLabel-icon
|
|
1638
|
+
```
|
|
1639
|
+
|
|
1640
|
+
```bash
|
|
1641
|
+
npx @mui/codemod@latest deprecations/table-sort-label-classes <path>
|
|
1642
|
+
```
|
|
1643
|
+
|
|
1644
|
+
#### `typography-props`
|
|
1645
|
+
|
|
1646
|
+
```diff
|
|
1647
|
+
<Typography
|
|
1648
|
+
- paragraph
|
|
1649
|
+
+ sx={{ marginBottom: '16px' }}
|
|
1650
|
+
/>
|
|
1651
|
+
```
|
|
1652
|
+
|
|
1653
|
+
```diff
|
|
1654
|
+
MuiTypography: {
|
|
1655
|
+
defaultProps: {
|
|
1656
|
+
- paragraph: true
|
|
1657
|
+
+ sx: { marginBottom: '16px' },
|
|
1658
|
+
},
|
|
1659
|
+
},
|
|
1660
|
+
```
|
|
1661
|
+
|
|
1662
|
+
```bash
|
|
1663
|
+
npx @mui/codemod@latest deprecations/typography-props <path>
|
|
1053
1664
|
```
|
|
1054
1665
|
|
|
1055
1666
|
### v6.0.0
|
|
1056
1667
|
|
|
1057
|
-
#### `
|
|
1668
|
+
#### `sx-prop`
|
|
1669
|
+
|
|
1670
|
+
```bash
|
|
1671
|
+
npx @mui/codemod@latest v6.0.0/sx-prop <path>
|
|
1672
|
+
```
|
|
1673
|
+
|
|
1674
|
+
Update the usage of the `sx` prop to be compatible with `@pigment-css/react`.
|
|
1675
|
+
|
|
1676
|
+
```diff
|
|
1677
|
+
<Box
|
|
1678
|
+
- sx={{
|
|
1679
|
+
- backgroundColor: (theme) =>
|
|
1680
|
+
- theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900],
|
|
1681
|
+
- }}
|
|
1682
|
+
+ sx={theme => ({
|
|
1683
|
+
+ backgroundColor: theme.palette.grey[900],
|
|
1684
|
+
+ ...theme.applyStyles("light", {
|
|
1685
|
+
+ backgroundColor: theme.palette.grey[100]
|
|
1686
|
+
+ })
|
|
1687
|
+
+ })}
|
|
1688
|
+
/>
|
|
1689
|
+
```
|
|
1690
|
+
|
|
1691
|
+
#### `system-props`
|
|
1692
|
+
|
|
1693
|
+
```bash
|
|
1694
|
+
npx @mui/codemod@latest v6.0.0/system-props <path>
|
|
1695
|
+
```
|
|
1696
|
+
|
|
1697
|
+
Remove system props and add them to the `sx` prop.
|
|
1698
|
+
|
|
1699
|
+
```diff
|
|
1700
|
+
-<Box ml="2px" py={1} color="primary.main" />
|
|
1701
|
+
+<Box sx={{ ml: '2px', py: 1, color: 'primary.main' }} />
|
|
1702
|
+
```
|
|
1703
|
+
|
|
1704
|
+
#### `theme-v6`
|
|
1705
|
+
|
|
1706
|
+
```bash
|
|
1707
|
+
npx @mui/codemod@latest v6.0.0/theme-v6 <path>
|
|
1708
|
+
```
|
|
1709
|
+
|
|
1710
|
+
Update the theme creation from `@mui/system@v5` to be compatible with `@pigment-css/react`.
|
|
1711
|
+
|
|
1712
|
+
- replace palette mode conditional with `theme.applyStyles()`
|
|
1713
|
+
- replace `ownerState` with `variants`
|
|
1714
|
+
- move theme variants to the root slot
|
|
1715
|
+
|
|
1716
|
+
```diff
|
|
1717
|
+
createTheme({
|
|
1718
|
+
components: {
|
|
1719
|
+
MuiButton: {
|
|
1720
|
+
- variants: [
|
|
1721
|
+
- {
|
|
1722
|
+
- props: { color: 'primary' },
|
|
1723
|
+
- style: {
|
|
1724
|
+
- color: 'red',
|
|
1725
|
+
- },
|
|
1726
|
+
- },
|
|
1727
|
+
- ],
|
|
1728
|
+
styleOverrides: {
|
|
1729
|
+
- root: ({ theme, ownerState }) => ({
|
|
1730
|
+
+ root: ({ theme }) => ({
|
|
1731
|
+
...ownerState.variant === 'contained' && {
|
|
1732
|
+
backgroundColor: alpha(theme.palette.primary.main, 0.8),
|
|
1733
|
+
...theme.palette.mode === 'dark' && {
|
|
1734
|
+
backgroundColor: alpha(theme.palette.primary.light, 0.9),
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
+ variants: [
|
|
1738
|
+
+ {
|
|
1739
|
+
+ prop: { variant: 'contained' },
|
|
1740
|
+
+ style: {
|
|
1741
|
+
+ backgroundColor: alpha(theme.palette.primary.main, 0.8),
|
|
1742
|
+
+ },
|
|
1743
|
+
+ },
|
|
1744
|
+
+ {
|
|
1745
|
+
+ prop: { variant: 'contained' },
|
|
1746
|
+
+ style: {
|
|
1747
|
+
+ ...theme.applyStyles('dark', {
|
|
1748
|
+
+ backgroundColor: alpha(theme.palette.primary.light, 0.9),
|
|
1749
|
+
+ })
|
|
1750
|
+
+ },
|
|
1751
|
+
+ },
|
|
1752
|
+
+ {
|
|
1753
|
+
+ prop: { color: 'primary' },
|
|
1754
|
+
+ style: {
|
|
1755
|
+
+ color: 'red',
|
|
1756
|
+
+ },
|
|
1757
|
+
+ },
|
|
1758
|
+
+ ],
|
|
1759
|
+
})
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
})
|
|
1764
|
+
```
|
|
1765
|
+
|
|
1766
|
+
#### `styled`
|
|
1767
|
+
|
|
1768
|
+
```bash
|
|
1769
|
+
npx @mui/codemod@latest v6.0.0/styled <path>
|
|
1770
|
+
```
|
|
1058
1771
|
|
|
1059
1772
|
Updates the usage of `styled` from `@mui/system@v5` to be compatible with `@pigment-css/react`.
|
|
1060
1773
|
|
|
@@ -1124,6 +1837,36 @@ However, it has some **limitations**:
|
|
|
1124
1837
|
}));
|
|
1125
1838
|
```
|
|
1126
1839
|
|
|
1840
|
+
#### `grid-v2-props`
|
|
1841
|
+
|
|
1842
|
+
```bash
|
|
1843
|
+
npx @mui/codemod@latest v6.0.0/grid-v2-props <path>
|
|
1844
|
+
```
|
|
1845
|
+
|
|
1846
|
+
Updates the usage of the `@mui/material/Grid2`, `@mui/system/Grid`, and `@mui/joy/Grid` components to their updated APIs.
|
|
1847
|
+
|
|
1848
|
+
```diff
|
|
1849
|
+
<Grid
|
|
1850
|
+
- xs={12}
|
|
1851
|
+
- sm={6}
|
|
1852
|
+
- xsOffset={2}
|
|
1853
|
+
- smOffset={3}
|
|
1854
|
+
+ size={{ xs: 12, sm: 6 }}
|
|
1855
|
+
+ offset={{ xs: 2, sm: 3 }}
|
|
1856
|
+
/>
|
|
1857
|
+
```
|
|
1858
|
+
|
|
1859
|
+
You can provide the theme breakpoints via options, for example, `--jscodeshift='--muiBreakpoints=mobile,desktop'`, to use your custom breakpoints in the transformation.
|
|
1860
|
+
|
|
1861
|
+
```bash
|
|
1862
|
+
npx @mui/codemod@latest v6.0.0/grid-v2-props <path> --jscodeshift='--muiBreakpoints=mobile,desktop'
|
|
1863
|
+
```
|
|
1864
|
+
|
|
1865
|
+
```diff
|
|
1866
|
+
- <Grid mobile={12} mobileOffset={2} desktop={6} desktopOffset={4} >
|
|
1867
|
+
+ <Grid size={{ mobile: 12, desktop: 6 }} offset={{ mobile: 2, desktop: 4 }} >
|
|
1868
|
+
```
|
|
1869
|
+
|
|
1127
1870
|
### v5.0.0
|
|
1128
1871
|
|
|
1129
1872
|
#### `base-use-named-exports`
|
|
@@ -1142,7 +1885,7 @@ This codemod updates the import and re-export statements.
|
|
|
1142
1885
|
```
|
|
1143
1886
|
|
|
1144
1887
|
```bash
|
|
1145
|
-
npx @mui/codemod@
|
|
1888
|
+
npx @mui/codemod@latest v5.0.0/base-use-named-exports <path>
|
|
1146
1889
|
```
|
|
1147
1890
|
|
|
1148
1891
|
#### `base-remove-unstyled-suffix`
|
|
@@ -1155,7 +1898,7 @@ The `Unstyled` suffix has been removed from all Base UI component names, includ
|
|
|
1155
1898
|
```
|
|
1156
1899
|
|
|
1157
1900
|
```bash
|
|
1158
|
-
npx @mui/codemod@
|
|
1901
|
+
npx @mui/codemod@latest v5.0.0/base-remove-unstyled-suffix <path>
|
|
1159
1902
|
```
|
|
1160
1903
|
|
|
1161
1904
|
#### `base-remove-component-prop`
|
|
@@ -1170,7 +1913,7 @@ This change only affects Base UI components.
|
|
|
1170
1913
|
```
|
|
1171
1914
|
|
|
1172
1915
|
```bash
|
|
1173
|
-
npx @mui/codemod@
|
|
1916
|
+
npx @mui/codemod@latest v5.0.0/base-remove-component-prop <path>
|
|
1174
1917
|
```
|
|
1175
1918
|
|
|
1176
1919
|
#### `rename-css-variables`
|
|
@@ -1185,7 +1928,7 @@ Updates the names of the CSS variables of the Joy UI components to adapt to the
|
|
|
1185
1928
|
```
|
|
1186
1929
|
|
|
1187
1930
|
```bash
|
|
1188
|
-
npx @mui/codemod@
|
|
1931
|
+
npx @mui/codemod@latest v5.0.0/rename-css-variables <path>
|
|
1189
1932
|
```
|
|
1190
1933
|
|
|
1191
1934
|
#### `base-hook-imports`
|
|
@@ -1198,7 +1941,7 @@ Updates the sources of the imports of the Base UI hooks to adapt to the new dir
|
|
|
1198
1941
|
```
|
|
1199
1942
|
|
|
1200
1943
|
```bash
|
|
1201
|
-
npx @mui/codemod@
|
|
1944
|
+
npx @mui/codemod@latest v5.0.0/base-hook-imports <path>
|
|
1202
1945
|
```
|
|
1203
1946
|
|
|
1204
1947
|
#### `joy-rename-classname-prefix`
|
|
@@ -1213,7 +1956,7 @@ Renames the classname prefix from `'Joy'` to `'Mui'` for Joy UI components.
|
|
|
1213
1956
|
```
|
|
1214
1957
|
|
|
1215
1958
|
```bash
|
|
1216
|
-
npx @mui/codemod@
|
|
1959
|
+
npx @mui/codemod@latest v5.0.0/joy-rename-classname-prefix <path>
|
|
1217
1960
|
```
|
|
1218
1961
|
|
|
1219
1962
|
#### `joy-rename-row-prop`
|
|
@@ -1223,12 +1966,12 @@ Transforms `row` prop to `orientation` prop across `Card`, `List` and `RadioGrou
|
|
|
1223
1966
|
```diff
|
|
1224
1967
|
<Card
|
|
1225
1968
|
- row
|
|
1226
|
-
+ orientation=
|
|
1969
|
+
+ orientation="horizontal"
|
|
1227
1970
|
/>;
|
|
1228
1971
|
```
|
|
1229
1972
|
|
|
1230
1973
|
```bash
|
|
1231
|
-
npx @mui/codemod@
|
|
1974
|
+
npx @mui/codemod@latest v5.0.0/joy-rename-row-prop <path>
|
|
1232
1975
|
```
|
|
1233
1976
|
|
|
1234
1977
|
#### `joy-avatar-remove-imgProps`
|
|
@@ -1246,12 +1989,12 @@ This change only affects Joy UI Avatar component.
|
|
|
1246
1989
|
```
|
|
1247
1990
|
|
|
1248
1991
|
```bash
|
|
1249
|
-
npx @mui/codemod@
|
|
1992
|
+
npx @mui/codemod@latest v5.0.0/joy-avatar-remove-imgProps <path>
|
|
1250
1993
|
```
|
|
1251
1994
|
|
|
1252
1995
|
#### `joy-text-field-to-input`
|
|
1253
1996
|
|
|
1254
|
-
Replace `<TextField>` with composition of
|
|
1997
|
+
Replace `<TextField>` with a composition of input components:
|
|
1255
1998
|
|
|
1256
1999
|
This change only affects Joy UI components.
|
|
1257
2000
|
|
|
@@ -1304,7 +2047,7 @@ This change only affects Joy UI components.
|
|
|
1304
2047
|
```
|
|
1305
2048
|
|
|
1306
2049
|
```bash
|
|
1307
|
-
npx @mui/codemod@
|
|
2050
|
+
npx @mui/codemod@latest v5.0.0/joy-text-field-to-input <path>
|
|
1308
2051
|
```
|
|
1309
2052
|
|
|
1310
2053
|
#### `joy-rename-components-to-slots`
|
|
@@ -1323,7 +2066,7 @@ This change only affects Joy UI components.
|
|
|
1323
2066
|
```
|
|
1324
2067
|
|
|
1325
2068
|
```bash
|
|
1326
|
-
npx @mui/codemod@
|
|
2069
|
+
npx @mui/codemod@latest v5.0.0/joy-rename-components-to-slots <path>
|
|
1327
2070
|
```
|
|
1328
2071
|
|
|
1329
2072
|
The associated breaking change was done in [#34997](https://github.com/mui/material-ui/pull/34997).
|
|
@@ -1333,7 +2076,7 @@ The associated breaking change was done in [#34997](https://github.com/mui/mater
|
|
|
1333
2076
|
Rename the imports of Date and Time Pickers from `@mui/lab` to `@mui/x-date-pickers` and `@mui/x-date-pickers-pro`.
|
|
1334
2077
|
|
|
1335
2078
|
```bash
|
|
1336
|
-
npx @mui/codemod@
|
|
2079
|
+
npx @mui/codemod@latest v5.0.0/date-pickers-moved-to-x <path>
|
|
1337
2080
|
```
|
|
1338
2081
|
|
|
1339
2082
|
#### `tree-view-moved-to-x`
|
|
@@ -1341,7 +2084,7 @@ npx @mui/codemod@next v5.0.0/date-pickers-moved-to-x <path>
|
|
|
1341
2084
|
Rename the imports of Tree View from `@mui/lab` to `@mui/x-tree-view`.
|
|
1342
2085
|
|
|
1343
2086
|
```bash
|
|
1344
|
-
npx @mui/codemod@
|
|
2087
|
+
npx @mui/codemod@latest v5.0.0/tree-view-moved-to-x <path>
|
|
1345
2088
|
```
|
|
1346
2089
|
|
|
1347
2090
|
#### 🚀 `preset-safe`
|
|
@@ -1349,7 +2092,7 @@ npx @mui/codemod@next v5.0.0/tree-view-moved-to-x <path>
|
|
|
1349
2092
|
A combination of all important transformers for migrating v4 to v5. ⚠️ This codemod should be run only once.
|
|
1350
2093
|
|
|
1351
2094
|
```bash
|
|
1352
|
-
npx @mui/codemod@
|
|
2095
|
+
npx @mui/codemod@latest v5.0.0/preset-safe <path|folder>
|
|
1353
2096
|
```
|
|
1354
2097
|
|
|
1355
2098
|
The list includes these transformers
|
|
@@ -1416,7 +2159,7 @@ Imports and inserts `adaptV4Theme` into `createTheme` (or `createMuiTheme`)
|
|
|
1416
2159
|
```
|
|
1417
2160
|
|
|
1418
2161
|
```bash
|
|
1419
|
-
npx @mui/codemod@
|
|
2162
|
+
npx @mui/codemod@latest v5.0.0/adapter-v4 <path>
|
|
1420
2163
|
```
|
|
1421
2164
|
|
|
1422
2165
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme).
|
|
@@ -1433,7 +2176,7 @@ Renames `Autocomplete`'s `closeIcon` prop to `clearIcon`.
|
|
|
1433
2176
|
<!-- #default-branch-switch -->
|
|
1434
2177
|
|
|
1435
2178
|
```bash
|
|
1436
|
-
npx @mui/codemod@
|
|
2179
|
+
npx @mui/codemod@latest v5.0.0/autocomplete-rename-closeicon <path>
|
|
1437
2180
|
```
|
|
1438
2181
|
|
|
1439
2182
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#autocomplete).
|
|
@@ -1452,7 +2195,7 @@ Renames `Autocomplete`'s `getOptionSelected` to `isOptionEqualToValue`.
|
|
|
1452
2195
|
<!-- #default-branch-switch -->
|
|
1453
2196
|
|
|
1454
2197
|
```bash
|
|
1455
|
-
npx @mui/codemod@
|
|
2198
|
+
npx @mui/codemod@latest v5.0.0/autocomplete-rename-option <path>
|
|
1456
2199
|
```
|
|
1457
2200
|
|
|
1458
2201
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#autocomplete).
|
|
@@ -1471,7 +2214,7 @@ Updates the `Avatar`'s `variant` value and `classes` key from 'circle' to 'circu
|
|
|
1471
2214
|
<!-- #default-branch-switch -->
|
|
1472
2215
|
|
|
1473
2216
|
```bash
|
|
1474
|
-
npx @mui/codemod@
|
|
2217
|
+
npx @mui/codemod@latest v5.0.0/avatar-circle-circular <path>
|
|
1475
2218
|
```
|
|
1476
2219
|
|
|
1477
2220
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#avatar).
|
|
@@ -1506,7 +2249,7 @@ Renames the badge's props.
|
|
|
1506
2249
|
<!-- #default-branch-switch -->
|
|
1507
2250
|
|
|
1508
2251
|
```bash
|
|
1509
|
-
npx @mui/codemod@
|
|
2252
|
+
npx @mui/codemod@latest v5.0.0/badge-overlap-value <path>
|
|
1510
2253
|
```
|
|
1511
2254
|
|
|
1512
2255
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#badge).
|
|
@@ -1530,7 +2273,7 @@ This change only affects Base UI components.
|
|
|
1530
2273
|
<!-- #default-branch-switch -->
|
|
1531
2274
|
|
|
1532
2275
|
```bash
|
|
1533
|
-
npx @mui/codemod@
|
|
2276
|
+
npx @mui/codemod@latest v5.0.0/base-rename-components-to-slots <path>
|
|
1534
2277
|
```
|
|
1535
2278
|
|
|
1536
2279
|
The associated breaking change was done in [#34693](https://github.com/mui/material-ui/pull/34693).
|
|
@@ -1549,7 +2292,7 @@ Updates the Box API from separate system props to `sx`.
|
|
|
1549
2292
|
<!-- #default-branch-switch -->
|
|
1550
2293
|
|
|
1551
2294
|
```bash
|
|
1552
|
-
npx @mui/codemod@
|
|
2295
|
+
npx @mui/codemod@latest v5.0.0/box-borderradius-values <path>
|
|
1553
2296
|
```
|
|
1554
2297
|
|
|
1555
2298
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#box).
|
|
@@ -1564,7 +2307,7 @@ Renames the Box `css` prop to `sx`
|
|
|
1564
2307
|
```
|
|
1565
2308
|
|
|
1566
2309
|
```bash
|
|
1567
|
-
npx @mui/codemod@
|
|
2310
|
+
npx @mui/codemod@latest v5.0.0/box-rename-css <path>
|
|
1568
2311
|
```
|
|
1569
2312
|
|
|
1570
2313
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#box).
|
|
@@ -1585,7 +2328,7 @@ Renames the Box `grid*Gap` props.
|
|
|
1585
2328
|
<!-- #default-branch-switch -->
|
|
1586
2329
|
|
|
1587
2330
|
```bash
|
|
1588
|
-
npx @mui/codemod@
|
|
2331
|
+
npx @mui/codemod@latest v5.0.0/box-rename-gap <path>
|
|
1589
2332
|
```
|
|
1590
2333
|
|
|
1591
2334
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#box).
|
|
@@ -1602,7 +2345,7 @@ Removes the outdated `color` prop values.
|
|
|
1602
2345
|
<!-- #default-branch-switch -->
|
|
1603
2346
|
|
|
1604
2347
|
```bash
|
|
1605
|
-
npx @mui/codemod@
|
|
2348
|
+
npx @mui/codemod@latest v5.0.0/button-color-prop <path>
|
|
1606
2349
|
```
|
|
1607
2350
|
|
|
1608
2351
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#button).
|
|
@@ -1619,7 +2362,7 @@ Removes the Chip `variant` prop if the value is `"default"`.
|
|
|
1619
2362
|
<!-- #default-branch-switch -->
|
|
1620
2363
|
|
|
1621
2364
|
```bash
|
|
1622
|
-
npx @mui/codemod@
|
|
2365
|
+
npx @mui/codemod@latest v5.0.0/chip-variant-prop <path>
|
|
1623
2366
|
```
|
|
1624
2367
|
|
|
1625
2368
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#chip).
|
|
@@ -1636,7 +2379,7 @@ Renames the CircularProgress `static` variant to `determinate`.
|
|
|
1636
2379
|
<!-- #default-branch-switch -->
|
|
1637
2380
|
|
|
1638
2381
|
```bash
|
|
1639
|
-
npx @mui/codemod@
|
|
2382
|
+
npx @mui/codemod@latest v5.0.0/circularprogress-variant <path>
|
|
1640
2383
|
```
|
|
1641
2384
|
|
|
1642
2385
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#circularprogress).
|
|
@@ -1655,7 +2398,7 @@ Renames `Collapse`'s `collapsedHeight` prop to `collapsedSize`.
|
|
|
1655
2398
|
<!-- #default-branch-switch -->
|
|
1656
2399
|
|
|
1657
2400
|
```bash
|
|
1658
|
-
npx @mui/codemod@
|
|
2401
|
+
npx @mui/codemod@latest v5.0.0/collapse-rename-collapsedheight <path>
|
|
1659
2402
|
```
|
|
1660
2403
|
|
|
1661
2404
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#collapse).
|
|
@@ -1674,7 +2417,7 @@ A generic codemod to rename any component prop.
|
|
|
1674
2417
|
<!-- #default-branch-switch -->
|
|
1675
2418
|
|
|
1676
2419
|
```bash
|
|
1677
|
-
npx @mui/codemod@
|
|
2420
|
+
npx @mui/codemod@latest v5.0.0/component-rename-prop <path> -- --component=Grid --from=prop --to=newProp
|
|
1678
2421
|
```
|
|
1679
2422
|
|
|
1680
2423
|
#### `core-styles-import`
|
|
@@ -1687,7 +2430,7 @@ Renames private import from `core/styles/*` to `core/styles`
|
|
|
1687
2430
|
```
|
|
1688
2431
|
|
|
1689
2432
|
```bash
|
|
1690
|
-
npx @mui/codemod@
|
|
2433
|
+
npx @mui/codemod@latest v5.0.0/core-styles-import <path>
|
|
1691
2434
|
```
|
|
1692
2435
|
|
|
1693
2436
|
#### `create-theme`
|
|
@@ -1700,7 +2443,7 @@ Renames the function `createMuiTheme` to `createTheme`
|
|
|
1700
2443
|
```
|
|
1701
2444
|
|
|
1702
2445
|
```bash
|
|
1703
|
-
npx @mui/codemod@
|
|
2446
|
+
npx @mui/codemod@latest v5.0.0/create-theme <path>
|
|
1704
2447
|
```
|
|
1705
2448
|
|
|
1706
2449
|
#### `dialog-props`
|
|
@@ -1713,7 +2456,7 @@ Remove `disableBackdropClick` prop from `<Dialog>`
|
|
|
1713
2456
|
```
|
|
1714
2457
|
|
|
1715
2458
|
```bash
|
|
1716
|
-
npx @mui/codemod@
|
|
2459
|
+
npx @mui/codemod@latest v5.0.0/dialog-props <path>
|
|
1717
2460
|
```
|
|
1718
2461
|
|
|
1719
2462
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#dialog).
|
|
@@ -1728,7 +2471,7 @@ Remove `disableTypography` prop from `<DialogTitle>`
|
|
|
1728
2471
|
```
|
|
1729
2472
|
|
|
1730
2473
|
```bash
|
|
1731
|
-
npx @mui/codemod@
|
|
2474
|
+
npx @mui/codemod@latest v5.0.0/dialog-title-props <path>
|
|
1732
2475
|
```
|
|
1733
2476
|
|
|
1734
2477
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#dialog).
|
|
@@ -1745,7 +2488,7 @@ Adds `prepend: true` to Emotion `createCache`
|
|
|
1745
2488
|
```
|
|
1746
2489
|
|
|
1747
2490
|
```bash
|
|
1748
|
-
npx @mui/codemod@
|
|
2491
|
+
npx @mui/codemod@latest v5.0.0/create-theme <path>
|
|
1749
2492
|
```
|
|
1750
2493
|
|
|
1751
2494
|
#### `expansion-panel-component`
|
|
@@ -1753,7 +2496,7 @@ npx @mui/codemod@next v5.0.0/create-theme <path>
|
|
|
1753
2496
|
Renames `ExpansionPanel*` to `Accordion*`
|
|
1754
2497
|
|
|
1755
2498
|
```bash
|
|
1756
|
-
npx @mui/codemod@
|
|
2499
|
+
npx @mui/codemod@latest v5.0.0/expansion-panel-component <path>
|
|
1757
2500
|
```
|
|
1758
2501
|
|
|
1759
2502
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#expansionpanel).
|
|
@@ -1766,7 +2509,7 @@ You can find more details about this breaking change in [the migration guide](ht
|
|
|
1766
2509
|
```
|
|
1767
2510
|
|
|
1768
2511
|
```bash
|
|
1769
|
-
npx @mui/codemod@
|
|
2512
|
+
npx @mui/codemod@latest v5.0.0/fab-variant <path>
|
|
1770
2513
|
```
|
|
1771
2514
|
|
|
1772
2515
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#fab).
|
|
@@ -1786,7 +2529,7 @@ Renames the `fade` style utility import and calls to `alpha`.
|
|
|
1786
2529
|
<!-- #default-branch-switch -->
|
|
1787
2530
|
|
|
1788
2531
|
```bash
|
|
1789
|
-
npx @mui/codemod@
|
|
2532
|
+
npx @mui/codemod@latest v5.0.0/fade-rename-alpha <path>
|
|
1790
2533
|
```
|
|
1791
2534
|
|
|
1792
2535
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#styles).
|
|
@@ -1803,7 +2546,7 @@ Renames `Grid`'s `justify` prop to `justifyContent`.
|
|
|
1803
2546
|
<!-- #default-branch-switch -->
|
|
1804
2547
|
|
|
1805
2548
|
```bash
|
|
1806
|
-
npx @mui/codemod@
|
|
2549
|
+
npx @mui/codemod@latest v5.0.0/grid-justify-justifycontent <path>
|
|
1807
2550
|
```
|
|
1808
2551
|
|
|
1809
2552
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#grid).
|
|
@@ -1813,7 +2556,7 @@ You can find more details about this breaking change in [the migration guide](ht
|
|
|
1813
2556
|
Renames `GridList*` to `ImageList*`
|
|
1814
2557
|
|
|
1815
2558
|
```bash
|
|
1816
|
-
npx @mui/codemod@
|
|
2559
|
+
npx @mui/codemod@latest v5.0.0/grid-list-component <path>
|
|
1817
2560
|
```
|
|
1818
2561
|
|
|
1819
2562
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#gridlist).
|
|
@@ -1830,7 +2573,7 @@ Adds `size="large"` if `size` is not defined to get the same appearance as v4.
|
|
|
1830
2573
|
```
|
|
1831
2574
|
|
|
1832
2575
|
```bash
|
|
1833
|
-
npx @mui/codemod@
|
|
2576
|
+
npx @mui/codemod@latest v5.0.0/icon-button-size <path>
|
|
1834
2577
|
```
|
|
1835
2578
|
|
|
1836
2579
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#iconbutton).
|
|
@@ -1895,7 +2638,7 @@ Replace JSS styling with `makeStyles` or `withStyles` to `styled` API.
|
|
|
1895
2638
|
```
|
|
1896
2639
|
|
|
1897
2640
|
```bash
|
|
1898
|
-
npx @mui/codemod@
|
|
2641
|
+
npx @mui/codemod@latest v5.0.0/jss-to-styled <path>
|
|
1899
2642
|
```
|
|
1900
2643
|
|
|
1901
2644
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#1-use-styled-or-sx-api).
|
|
@@ -1967,7 +2710,7 @@ Migrate JSS styling with `makeStyles` or `withStyles` to the corresponding `tss-
|
|
|
1967
2710
|
```
|
|
1968
2711
|
|
|
1969
2712
|
```bash
|
|
1970
|
-
npx @mui/codemod@
|
|
2713
|
+
npx @mui/codemod@latest v5.0.0/jss-to-tss-react <path>
|
|
1971
2714
|
```
|
|
1972
2715
|
|
|
1973
2716
|
The following scenarios are not currently handled by this codemod and will be marked with a
|
|
@@ -1995,7 +2738,7 @@ Apply `underline="hover"` to `<Link />` that does not define `underline` prop (t
|
|
|
1995
2738
|
```
|
|
1996
2739
|
|
|
1997
2740
|
```bash
|
|
1998
|
-
npx @mui/codemod@
|
|
2741
|
+
npx @mui/codemod@latest v5.0.0/link-underline-hover <path>
|
|
1999
2742
|
```
|
|
2000
2743
|
|
|
2001
2744
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#link).
|
|
@@ -2033,7 +2776,7 @@ Moves JSS imports to `@material-ui/styles`
|
|
|
2033
2776
|
```
|
|
2034
2777
|
|
|
2035
2778
|
```bash
|
|
2036
|
-
npx @mui/codemod@
|
|
2779
|
+
npx @mui/codemod@latest v5.0.0/material-ui-styles <path>
|
|
2037
2780
|
```
|
|
2038
2781
|
|
|
2039
2782
|
#### `material-ui-types`
|
|
@@ -2046,7 +2789,7 @@ Renames `Omit` import from `@material-ui/types` to `DistributiveOmit`
|
|
|
2046
2789
|
```
|
|
2047
2790
|
|
|
2048
2791
|
```bash
|
|
2049
|
-
npx @mui/codemod@
|
|
2792
|
+
npx @mui/codemod@latest v5.0.0/material-ui-types <path>
|
|
2050
2793
|
```
|
|
2051
2794
|
|
|
2052
2795
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#material-ui-types).
|
|
@@ -2063,7 +2806,7 @@ Removes `disableBackdropClick` and `onEscapeKeyDown` from `<Modal>`
|
|
|
2063
2806
|
```
|
|
2064
2807
|
|
|
2065
2808
|
```bash
|
|
2066
|
-
npx @mui/codemod@
|
|
2809
|
+
npx @mui/codemod@latest v5.0.0/modal-props <path>
|
|
2067
2810
|
```
|
|
2068
2811
|
|
|
2069
2812
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#modal).
|
|
@@ -2087,7 +2830,7 @@ or
|
|
|
2087
2830
|
<!-- #default-branch-switch -->
|
|
2088
2831
|
|
|
2089
2832
|
```bash
|
|
2090
|
-
npx @mui/codemod@
|
|
2833
|
+
npx @mui/codemod@latest v5.0.0/moved-lab-modules <path>
|
|
2091
2834
|
```
|
|
2092
2835
|
|
|
2093
2836
|
You can find more details about this breaking change in the migration guide.
|
|
@@ -2112,7 +2855,7 @@ Renames `Pagination*`'s `shape` values from 'round' to 'circular'.
|
|
|
2112
2855
|
```
|
|
2113
2856
|
|
|
2114
2857
|
```bash
|
|
2115
|
-
npx @mui/codemod@
|
|
2858
|
+
npx @mui/codemod@latest v5.0.0/pagination-round-circular <path>
|
|
2116
2859
|
```
|
|
2117
2860
|
|
|
2118
2861
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#pagination).
|
|
@@ -2131,7 +2874,7 @@ Fix private import paths.
|
|
|
2131
2874
|
<!-- #default-branch-switch -->
|
|
2132
2875
|
|
|
2133
2876
|
```bash
|
|
2134
|
-
npx @mui/codemod@
|
|
2877
|
+
npx @mui/codemod@latest v5.0.0/optimal-imports <path>
|
|
2135
2878
|
```
|
|
2136
2879
|
|
|
2137
2880
|
#### `root-ref`
|
|
@@ -2139,7 +2882,7 @@ npx @mui/codemod@next v5.0.0/optimal-imports <path>
|
|
|
2139
2882
|
Removes `RootRef` from the codebase.
|
|
2140
2883
|
|
|
2141
2884
|
```bash
|
|
2142
|
-
npx @mui/codemod@
|
|
2885
|
+
npx @mui/codemod@latest v5.0.0/root-ref <path>
|
|
2143
2886
|
```
|
|
2144
2887
|
|
|
2145
2888
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#rootref).
|
|
@@ -2154,7 +2897,7 @@ You can find more details about this breaking change in [the migration guide](ht
|
|
|
2154
2897
|
```
|
|
2155
2898
|
|
|
2156
2899
|
```bash
|
|
2157
|
-
npx @mui/codemod@
|
|
2900
|
+
npx @mui/codemod@latest v5.0.0/skeleton-variant <path>
|
|
2158
2901
|
```
|
|
2159
2902
|
|
|
2160
2903
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#skeleton).
|
|
@@ -2164,7 +2907,7 @@ You can find more details about this breaking change in [the migration guide](ht
|
|
|
2164
2907
|
Applies `StyledEngineProvider` to the files that contains `ThemeProvider`.
|
|
2165
2908
|
|
|
2166
2909
|
```bash
|
|
2167
|
-
npx @mui/codemod@
|
|
2910
|
+
npx @mui/codemod@latest v5.0.0/styled-engine-provider <path>
|
|
2168
2911
|
```
|
|
2169
2912
|
|
|
2170
2913
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-style-changes/#style-library).
|
|
@@ -2190,7 +2933,7 @@ Renames props in `Table*` components.
|
|
|
2190
2933
|
```
|
|
2191
2934
|
|
|
2192
2935
|
```bash
|
|
2193
|
-
npx @mui/codemod@
|
|
2936
|
+
npx @mui/codemod@latest v5.0.0/table-props <path>
|
|
2194
2937
|
```
|
|
2195
2938
|
|
|
2196
2939
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#table).
|
|
@@ -2209,7 +2952,7 @@ Renames the `Tabs`'s `scrollButtons` prop values.
|
|
|
2209
2952
|
```
|
|
2210
2953
|
|
|
2211
2954
|
```bash
|
|
2212
|
-
npx @mui/codemod@
|
|
2955
|
+
npx @mui/codemod@latest v5.0.0/tabs-scroll-buttons <path>
|
|
2213
2956
|
```
|
|
2214
2957
|
|
|
2215
2958
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#tabs).
|
|
@@ -2228,7 +2971,7 @@ Renames `TextField`'s rows props.
|
|
|
2228
2971
|
```
|
|
2229
2972
|
|
|
2230
2973
|
```bash
|
|
2231
|
-
npx @mui/codemod@
|
|
2974
|
+
npx @mui/codemod@latest v5.0.0/textarea-minmax-rows <path>
|
|
2232
2975
|
```
|
|
2233
2976
|
|
|
2234
2977
|
You can find more details about this breaking change in the migration guide.
|
|
@@ -2241,7 +2984,7 @@ You can find more details about this breaking change in the migration guide.
|
|
|
2241
2984
|
Adds `DefaultTheme` module augmentation to TypeScript projects.
|
|
2242
2985
|
|
|
2243
2986
|
```bash
|
|
2244
|
-
npx @mui/codemod@
|
|
2987
|
+
npx @mui/codemod@latest v5.0.0/theme-augment <path>
|
|
2245
2988
|
```
|
|
2246
2989
|
|
|
2247
2990
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#material-ui-styles).
|
|
@@ -2260,7 +3003,7 @@ Updates breakpoint values to match new logic. ⚠️ This mod is not idempotent,
|
|
|
2260
3003
|
<!-- #default-branch-switch -->
|
|
2261
3004
|
|
|
2262
3005
|
```bash
|
|
2263
|
-
npx @mui/codemod@
|
|
3006
|
+
npx @mui/codemod@latest v5.0.0/theme-breakpoints <path>
|
|
2264
3007
|
```
|
|
2265
3008
|
|
|
2266
3009
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme).
|
|
@@ -2270,7 +3013,7 @@ You can find more details about this breaking change in [the migration guide](ht
|
|
|
2270
3013
|
Renames `theme.breakpoints.width('md')` to `theme.breakpoints.values.md`.
|
|
2271
3014
|
|
|
2272
3015
|
```bash
|
|
2273
|
-
npx @mui/codemod@
|
|
3016
|
+
npx @mui/codemod@latest v5.0.0/theme-breakpoints-width <path>
|
|
2274
3017
|
```
|
|
2275
3018
|
|
|
2276
3019
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme).
|
|
@@ -2283,7 +3026,7 @@ You can find more details about this breaking change in [the migration guide](ht
|
|
|
2283
3026
|
```
|
|
2284
3027
|
|
|
2285
3028
|
```bash
|
|
2286
|
-
npx @mui/codemod@
|
|
3029
|
+
npx @mui/codemod@latest v5.0.0/theme-options <path>
|
|
2287
3030
|
```
|
|
2288
3031
|
|
|
2289
3032
|
#### `theme-palette-mode`
|
|
@@ -2305,7 +3048,7 @@ Renames `type` to `mode`.
|
|
|
2305
3048
|
```
|
|
2306
3049
|
|
|
2307
3050
|
```bash
|
|
2308
|
-
npx @mui/codemod@
|
|
3051
|
+
npx @mui/codemod@latest v5.0.0/theme-palette-mode <path>
|
|
2309
3052
|
```
|
|
2310
3053
|
|
|
2311
3054
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme).
|
|
@@ -2315,7 +3058,7 @@ You can find more details about this breaking change in [the migration guide](ht
|
|
|
2315
3058
|
Renames `MuiThemeProvider` to `ThemeProvider`.
|
|
2316
3059
|
|
|
2317
3060
|
```bash
|
|
2318
|
-
npx @mui/codemod@
|
|
3061
|
+
npx @mui/codemod@latest v5.0.0/theme-provider <path>
|
|
2319
3062
|
```
|
|
2320
3063
|
|
|
2321
3064
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#material-ui-core-styles).
|
|
@@ -2334,7 +3077,7 @@ Removes the 'px' suffix from some template strings.
|
|
|
2334
3077
|
<!-- #default-branch-switch -->
|
|
2335
3078
|
|
|
2336
3079
|
```bash
|
|
2337
|
-
npx @mui/codemod@
|
|
3080
|
+
npx @mui/codemod@latest v5.0.0/theme-spacing <path>
|
|
2338
3081
|
```
|
|
2339
3082
|
|
|
2340
3083
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme).
|
|
@@ -2349,7 +3092,7 @@ Renames `theme.typography.round($number)` to `Math.round($number * 1e5) / 1e5`.
|
|
|
2349
3092
|
```
|
|
2350
3093
|
|
|
2351
3094
|
```bash
|
|
2352
|
-
npx @mui/codemod@
|
|
3095
|
+
npx @mui/codemod@latest v5.0.0/theme-typography-round <path>
|
|
2353
3096
|
```
|
|
2354
3097
|
|
|
2355
3098
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#theme).
|
|
@@ -2367,7 +3110,7 @@ Converts all `@mui/material` submodule imports to the root module:
|
|
|
2367
3110
|
<!-- #default-branch-switch -->
|
|
2368
3111
|
|
|
2369
3112
|
```bash
|
|
2370
|
-
npx @mui/codemod@
|
|
3113
|
+
npx @mui/codemod@latest v5.0.0/top-level-imports <path>
|
|
2371
3114
|
```
|
|
2372
3115
|
|
|
2373
3116
|
Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's useful.
|
|
@@ -2377,7 +3120,7 @@ Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's u
|
|
|
2377
3120
|
Renames import `transitions` to `createTransitions`
|
|
2378
3121
|
|
|
2379
3122
|
```bash
|
|
2380
|
-
npx @mui/codemod@
|
|
3123
|
+
npx @mui/codemod@latest v5.0.0/transitions <path>
|
|
2381
3124
|
```
|
|
2382
3125
|
|
|
2383
3126
|
#### `use-autocomplete`
|
|
@@ -2390,7 +3133,7 @@ Renames `useAutocomplete` related import from lab to core
|
|
|
2390
3133
|
```
|
|
2391
3134
|
|
|
2392
3135
|
```bash
|
|
2393
|
-
npx @mui/codemod@
|
|
3136
|
+
npx @mui/codemod@latest v5.0.0/use-autocomplete <path>
|
|
2394
3137
|
```
|
|
2395
3138
|
|
|
2396
3139
|
#### `use-transitionprops`
|
|
@@ -2419,7 +3162,7 @@ Updates Dialog, Menu, Popover, and Snackbar to use the `TransitionProps` prop to
|
|
|
2419
3162
|
<!-- #default-branch-switch -->
|
|
2420
3163
|
|
|
2421
3164
|
```bash
|
|
2422
|
-
npx @mui/codemod@
|
|
3165
|
+
npx @mui/codemod@latest v5.0.0/use-transitionprops <path>
|
|
2423
3166
|
```
|
|
2424
3167
|
|
|
2425
3168
|
You can find more details about this breaking change in [the migration guide](/material-ui/migration/v5-component-changes/#dialog).
|
|
@@ -2449,7 +3192,7 @@ The diff should look like this:
|
|
|
2449
3192
|
<!-- #default-branch-switch -->
|
|
2450
3193
|
|
|
2451
3194
|
```bash
|
|
2452
|
-
npx @mui/codemod@
|
|
3195
|
+
npx @mui/codemod@latest v5.0.0/variant-prop <path>
|
|
2453
3196
|
```
|
|
2454
3197
|
|
|
2455
3198
|
#### `with-mobile-dialog`
|
|
@@ -2463,7 +3206,7 @@ Removes imported `withMobileDialog`, and inserts hardcoded version to prevent ap
|
|
|
2463
3206
|
```
|
|
2464
3207
|
|
|
2465
3208
|
```bash
|
|
2466
|
-
npx @mui/codemod@
|
|
3209
|
+
npx @mui/codemod@latest v5.0.0/with-mobile-dialog <path>
|
|
2467
3210
|
```
|
|
2468
3211
|
|
|
2469
3212
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-component-changes/#dialog).
|
|
@@ -2479,7 +3222,7 @@ Removes `withWidth` import, and inserts hardcoded version to prevent application
|
|
|
2479
3222
|
```
|
|
2480
3223
|
|
|
2481
3224
|
```bash
|
|
2482
|
-
npx @mui/codemod@
|
|
3225
|
+
npx @mui/codemod@latest v5.0.0/with-width <path>
|
|
2483
3226
|
```
|
|
2484
3227
|
|
|
2485
3228
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/v5-style-changes/#material-ui-core-styles).
|
|
@@ -2540,7 +3283,7 @@ Replace every occurrence of `material-ui` related package with the new package n
|
|
|
2540
3283
|
```
|
|
2541
3284
|
|
|
2542
3285
|
```bash
|
|
2543
|
-
npx @mui/codemod@
|
|
3286
|
+
npx @mui/codemod@latest v5.0.0/mui-replace <path>
|
|
2544
3287
|
```
|
|
2545
3288
|
|
|
2546
3289
|
You can find more details about this breaking change in [the migration guide](https://mui.com/material-ui/migration/migration-v4/#update-material-ui-version).
|
|
@@ -2560,7 +3303,7 @@ The diff should look like this:
|
|
|
2560
3303
|
<!-- #default-branch-switch -->
|
|
2561
3304
|
|
|
2562
3305
|
```bash
|
|
2563
|
-
npx @mui/codemod@
|
|
3306
|
+
npx @mui/codemod@latest v4.0.0/theme-spacing-api <path>
|
|
2564
3307
|
```
|
|
2565
3308
|
|
|
2566
3309
|
This codemod tries to perform a basic expression simplification which can be improved for expressions that use more than one operation.
|
|
@@ -2587,7 +3330,7 @@ Converts all `@material-ui/core` imports more than 1 level deep to the optimal f
|
|
|
2587
3330
|
<!-- #default-branch-switch -->
|
|
2588
3331
|
|
|
2589
3332
|
```bash
|
|
2590
|
-
npx @mui/codemod@
|
|
3333
|
+
npx @mui/codemod@latest v4.0.0/optimal-imports <path>
|
|
2591
3334
|
```
|
|
2592
3335
|
|
|
2593
3336
|
Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's useful.
|
|
@@ -2605,7 +3348,7 @@ Converts all `@material-ui/core` submodule imports to the root module:
|
|
|
2605
3348
|
<!-- #default-branch-switch -->
|
|
2606
3349
|
|
|
2607
3350
|
```bash
|
|
2608
|
-
npx @mui/codemod@
|
|
3351
|
+
npx @mui/codemod@latest v4.0.0/top-level-imports <path>
|
|
2609
3352
|
```
|
|
2610
3353
|
|
|
2611
3354
|
Head to https://mui.com/guides/minimizing-bundle-size/ to understand when it's useful.
|
|
@@ -2626,7 +3369,7 @@ The diff should look like this:
|
|
|
2626
3369
|
<!-- #default-branch-switch -->
|
|
2627
3370
|
|
|
2628
3371
|
```bash
|
|
2629
|
-
npx @mui/codemod@
|
|
3372
|
+
npx @mui/codemod@latest v1.0.0/import-path <path>
|
|
2630
3373
|
```
|
|
2631
3374
|
|
|
2632
3375
|
**Notice**: if you are migrating from pre-v1.0, and your imports use `material-ui`, you will need to manually find and replace all references to `material-ui` in your code to `@material-ui/core`. E.g.:
|
|
@@ -2653,7 +3396,7 @@ The diff should look like this:
|
|
|
2653
3396
|
<!-- #default-branch-switch -->
|
|
2654
3397
|
|
|
2655
3398
|
```bash
|
|
2656
|
-
npx @mui/codemod@
|
|
3399
|
+
npx @mui/codemod@latest v1.0.0/color-imports <path>
|
|
2657
3400
|
```
|
|
2658
3401
|
|
|
2659
3402
|
**additional options**
|
|
@@ -2661,7 +3404,7 @@ npx @mui/codemod@next v1.0.0/color-imports <path>
|
|
|
2661
3404
|
<!-- #default-branch-switch -->
|
|
2662
3405
|
|
|
2663
3406
|
```bash
|
|
2664
|
-
npx @mui/codemod@
|
|
3407
|
+
npx @mui/codemod@latest v1.0.0/color-imports <path> -- --importPath='mui/styles/colors' --targetPath='mui/colors'
|
|
2665
3408
|
```
|
|
2666
3409
|
|
|
2667
3410
|
#### `svg-icon-imports`
|
|
@@ -2679,7 +3422,7 @@ The diff should look like this:
|
|
|
2679
3422
|
<!-- #default-branch-switch -->
|
|
2680
3423
|
|
|
2681
3424
|
```bash
|
|
2682
|
-
npx @mui/codemod@
|
|
3425
|
+
npx @mui/codemod@latest v1.0.0/svg-icon-imports <path>
|
|
2683
3426
|
```
|
|
2684
3427
|
|
|
2685
3428
|
#### `menu-item-primary-text`
|
|
@@ -2697,7 +3440,7 @@ The diff should look like this:
|
|
|
2697
3440
|
<!-- #default-branch-switch -->
|
|
2698
3441
|
|
|
2699
3442
|
```bash
|
|
2700
|
-
npx @mui/codemod@
|
|
3443
|
+
npx @mui/codemod@latest v1.0.0/menu-item-primary-text <path>
|
|
2701
3444
|
```
|
|
2702
3445
|
|
|
2703
3446
|
### v0.15.0
|
|
@@ -2721,5 +3464,5 @@ The diff should look like this:
|
|
|
2721
3464
|
<!-- #default-branch-switch -->
|
|
2722
3465
|
|
|
2723
3466
|
```bash
|
|
2724
|
-
npx @mui/codemod@
|
|
3467
|
+
npx @mui/codemod@latest v0.15.0/import-path <path>
|
|
2725
3468
|
```
|