@mui/codemod 6.0.0-dev.240424162023-9968b4889d → 6.0.0-rc.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 +948 -205
- 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
|
@@ -61,7 +61,7 @@ npx @mui/codemod@next <transform> <path> --jscodeshift="--printOptions='{\"quote
|
|
|
61
61
|
|
|
62
62
|
## Included scripts
|
|
63
63
|
|
|
64
|
-
- [
|
|
64
|
+
- [Deprecations](#deprecations)
|
|
65
65
|
- [v6](#v600)
|
|
66
66
|
- [v5](#v500)
|
|
67
67
|
- [v4](#v400)
|
|
@@ -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,7 +130,6 @@ 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
|
|
@@ -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
|
},
|
|
@@ -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,10 +247,10 @@ 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
|
+
},
|
|
255
254
|
},
|
|
256
255
|
```
|
|
257
256
|
|
|
@@ -259,6 +258,120 @@ npx @mui/codemod@next deprecations/alert-classes <path>
|
|
|
259
258
|
npx @mui/codemod@next deprecations/alert-props <path>
|
|
260
259
|
```
|
|
261
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@next 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
|
+
},
|
|
368
|
+
},
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
npx @mui/codemod@next deprecations/avatar-group-props <path>
|
|
373
|
+
```
|
|
374
|
+
|
|
262
375
|
#### `avatar-props`
|
|
263
376
|
|
|
264
377
|
```diff
|
|
@@ -270,17 +383,37 @@ 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
|
|
|
@@ -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,8 +436,8 @@ 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
|
},
|
|
@@ -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,7 +663,6 @@ 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
|
|
@@ -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
|
},
|
|
@@ -845,61 +976,24 @@ CSS transforms:
|
|
|
845
976
|
npx @mui/codemod@next deprecations/chip-classes <path>
|
|
846
977
|
```
|
|
847
978
|
|
|
848
|
-
#### `
|
|
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>
|
|
859
|
-
```
|
|
860
|
-
|
|
861
|
-
#### `pagination-item-classes`
|
|
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
|
-
+ [`&.${
|
|
989
|
+
- [`& .${circularProgressClasses.circleDeterminate}`]: {
|
|
990
|
+
+ [`&.${circularProgressClasses.determinate} > .${circularProgressClasses.circle}`]: {
|
|
873
991
|
color: 'red',
|
|
874
|
-
|
|
875
|
-
- [
|
|
876
|
-
+ [`&.${
|
|
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': {
|
|
897
|
-
color: 'red',
|
|
898
|
-
},
|
|
899
|
-
- '&.MuiPaginationItem-outlinedSecondary': {
|
|
900
|
-
+ '&.MuiPaginationItem-outlined.MuiPaginationItem-colorSecondary': {
|
|
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@next deprecations/
|
|
1015
|
+
npx @mui/codemod@next deprecations/circular-progress-classes <path>
|
|
923
1016
|
```
|
|
924
1017
|
|
|
925
|
-
#### `
|
|
1018
|
+
#### `divider-props`
|
|
926
1019
|
|
|
927
1020
|
```diff
|
|
928
|
-
<
|
|
929
|
-
-
|
|
930
|
-
+
|
|
931
|
-
- componentsProps={{ track: { testid: 'test-id' } }}
|
|
932
|
-
+ slotProps={{ track: { testid: 'test-id' } }}
|
|
1021
|
+
<Divider
|
|
1022
|
+
- light
|
|
1023
|
+
+ sx={{ opacity: 0.6 }}
|
|
933
1024
|
/>
|
|
934
1025
|
```
|
|
935
1026
|
|
|
936
|
-
```diff
|
|
937
|
-
MuiSlider: {
|
|
938
|
-
defaultProps: {
|
|
939
|
-
- components: { Track: CustomTrack }
|
|
940
|
-
+ slots: { track: CustomTrack },
|
|
941
|
-
- componentsProps: { track: { testid: 'test-id' }}
|
|
942
|
-
+ slotProps: { track: { testid: 'test-id' } },
|
|
943
|
-
},
|
|
944
|
-
},
|
|
945
|
-
```
|
|
946
|
-
|
|
947
1027
|
```bash
|
|
948
|
-
npx @mui/codemod@next deprecations/
|
|
1028
|
+
npx @mui/codemod@next deprecations/divider-props <path>
|
|
949
1029
|
```
|
|
950
1030
|
|
|
951
|
-
#### `
|
|
1031
|
+
#### `filled-input-props`
|
|
952
1032
|
|
|
953
|
-
|
|
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' } }}
|
|
1039
|
+
/>
|
|
1040
|
+
```
|
|
954
1041
|
|
|
955
1042
|
```diff
|
|
956
|
-
|
|
1043
|
+
MuiFilledInput: {
|
|
1044
|
+
defaultProps: {
|
|
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
|
+
},
|
|
1050
|
+
},
|
|
1051
|
+
```
|
|
957
1052
|
|
|
958
|
-
|
|
1053
|
+
```bash
|
|
1054
|
+
npx @mui/codemod@next deprecations/filled-input-props <path>
|
|
1055
|
+
```
|
|
1056
|
+
|
|
1057
|
+
#### `form-control-label-props`
|
|
1058
|
+
|
|
1059
|
+
```diff
|
|
1060
|
+
<FormControlLabel
|
|
1061
|
+
- componentsProps={{ typography: typographyProps }}
|
|
1062
|
+
+ slotProps={{ typography: typographyProps }}
|
|
1063
|
+
/>
|
|
1064
|
+
```
|
|
1065
|
+
|
|
1066
|
+
```diff
|
|
1067
|
+
MuiFormControlLabel: {
|
|
1068
|
+
defaultProps: {
|
|
1069
|
+
- componentsProps={{ typography: typographyProps }}
|
|
1070
|
+
+ slotProps={{ typography: typographyProps }}
|
|
1071
|
+
},
|
|
1072
|
+
},
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1075
|
+
```bash
|
|
1076
|
+
npx @mui/codemod@next 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@next 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@next 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@next 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@
|
|
1199
|
+
npx @mui/codemod@next 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@next 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@next 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@next 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@next 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@next 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@next 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@next 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@next 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`
|
|
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
|
+
/>
|
|
1514
|
+
```
|
|
1016
1515
|
|
|
1516
|
+
```bash
|
|
1517
|
+
npx @mui/codemod@next deprecations/text-field-props <path>
|
|
1017
1518
|
```
|
|
1018
1519
|
|
|
1019
|
-
#### `
|
|
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,9 +1543,28 @@ 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
|
|
|
@@ -1052,9 +1572,202 @@ CSS transforms:
|
|
|
1052
1572
|
npx @mui/codemod@next deprecations/step-connector-classes <path>
|
|
1053
1573
|
```
|
|
1054
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@next 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@next 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@next deprecations/typography-props <path>
|
|
1664
|
+
```
|
|
1665
|
+
|
|
1055
1666
|
### v6.0.0
|
|
1056
1667
|
|
|
1057
|
-
#### `
|
|
1668
|
+
#### `sx-prop`
|
|
1669
|
+
|
|
1670
|
+
```bash
|
|
1671
|
+
npx @mui/codemod@next 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@next 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@next 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@next 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@next 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@next 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`
|
|
@@ -1223,7 +1966,7 @@ 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
|
|
|
@@ -1251,7 +1994,7 @@ npx @mui/codemod@next v5.0.0/joy-avatar-remove-imgProps <path>
|
|
|
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
|
|