@mui/codemod 5.10.12 → 5.10.16
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/node/util/getJSExports.js +0 -6
- package/node/util/memoize.js +0 -4
- package/node/util/propsToObject.js +0 -6
- package/node/util/readFile.js +0 -6
- package/node/util/renameClassKey.js +0 -2
- package/node/util/renameProps.js +0 -1
- package/node/v0.15.0/import-path.js +0 -6
- package/node/v0.15.0/import-path.test/actual.js +0 -5
- package/node/v0.15.0/import-path.test/expected.js +0 -5
- package/node/v1.0.0/color-imports.js +12 -17
- package/node/v1.0.0/color-imports.test/actual.js +0 -3
- package/node/v1.0.0/color-imports.test/expected.js +0 -9
- package/node/v1.0.0/import-path.js +4 -8
- package/node/v1.0.0/import-path.test/actual.js +0 -28
- package/node/v1.0.0/import-path.test/expected.js +0 -61
- package/node/v1.0.0/menu-item-primary-text.js +0 -2
- package/node/v1.0.0/menu-item-primary-text.test/actual.js +1 -3
- package/node/v1.0.0/menu-item-primary-text.test/expected.js +1 -3
- package/node/v1.0.0/svg-icon-imports.js +6 -7
- package/node/v1.0.0/svg-icon-imports.test/actual.js +0 -4
- package/node/v1.0.0/svg-icon-imports.test/expected.js +0 -4
- package/node/v4.0.0/optimal-imports.js +0 -26
- package/node/v4.0.0/optimal-imports.test/actual.js +0 -64
- package/node/v4.0.0/optimal-imports.test/expected.js +0 -62
- package/node/v4.0.0/theme-spacing-api.js +7 -19
- package/node/v4.0.0/theme-spacing-api.test/actual.js +0 -11
- package/node/v4.0.0/theme-spacing-api.test/actual_destructured.js +0 -9
- package/node/v4.0.0/theme-spacing-api.test/expected.js +0 -11
- package/node/v4.0.0/theme-spacing-api.test/expected_destructured.js +0 -9
- package/node/v4.0.0/top-level-imports.js +2 -22
- package/node/v4.0.0/top-level-imports.test/actual.js +0 -58
- package/node/v4.0.0/top-level-imports.test/expected.js +0 -3
- package/node/v5.0.0/adapter-v4.js +3 -11
- package/node/v5.0.0/adapter-v4.test/actual.js +0 -1
- package/node/v5.0.0/adapter-v4.test/core-import.actual.js +0 -2
- package/node/v5.0.0/adapter-v4.test/core-import.expected.js +0 -2
- package/node/v5.0.0/adapter-v4.test/expected.js +0 -1
- package/node/v5.0.0/adapter-v4.test/no-styles-import.actual.js +0 -2
- package/node/v5.0.0/adapter-v4.test/no-styles-import.expected.js +0 -3
- package/node/v5.0.0/autocomplete-rename-closeicon.js +0 -3
- package/node/v5.0.0/autocomplete-rename-closeicon.test/actual.js +1 -3
- package/node/v5.0.0/autocomplete-rename-closeicon.test/expected.js +1 -3
- package/node/v5.0.0/autocomplete-rename-option.js +0 -3
- package/node/v5.0.0/autocomplete-rename-option.test/actual.js +1 -3
- package/node/v5.0.0/autocomplete-rename-option.test/expected.js +1 -3
- package/node/v5.0.0/avatar-circle-circular.js +0 -4
- package/node/v5.0.0/avatar-circle-circular.test/actual.js +1 -3
- package/node/v5.0.0/avatar-circle-circular.test/expected.js +1 -3
- package/node/v5.0.0/badge-overlap-value.js +0 -6
- package/node/v5.0.0/badge-overlap-value.test/actual.js +1 -5
- package/node/v5.0.0/badge-overlap-value.test/expected.js +1 -5
- package/node/v5.0.0/base-rename-components-to-slots.js +1 -11
- package/node/v5.0.0/base-rename-components-to-slots.test/actual.js +3 -9
- package/node/v5.0.0/base-rename-components-to-slots.test/expected.js +3 -9
- package/node/v5.0.0/box-borderradius-values.js +2 -2
- package/node/v5.0.0/box-borderradius-values.test/actual.js +1 -3
- package/node/v5.0.0/box-borderradius-values.test/expected.js +1 -3
- package/node/v5.0.0/box-rename-css.js +0 -3
- package/node/v5.0.0/box-rename-css.test/actual.js +1 -3
- package/node/v5.0.0/box-rename-css.test/expected.js +1 -3
- package/node/v5.0.0/box-rename-gap.js +0 -3
- package/node/v5.0.0/box-rename-gap.test/actual.js +1 -3
- package/node/v5.0.0/box-rename-gap.test/expected.js +1 -3
- package/node/v5.0.0/box-sx-prop.js +1 -5
- package/node/v5.0.0/box-sx-prop.test/actual.js +0 -10
- package/node/v5.0.0/box-sx-prop.test/alias-actual.js +0 -5
- package/node/v5.0.0/box-sx-prop.test/alias-expected.js +0 -4
- package/node/v5.0.0/box-sx-prop.test/expected.js +0 -10
- package/node/v5.0.0/button-color-prop.js +0 -2
- package/node/v5.0.0/button-color-prop.test/actual.js +1 -3
- package/node/v5.0.0/button-color-prop.test/expected.js +1 -3
- package/node/v5.0.0/chip-variant-prop.js +0 -2
- package/node/v5.0.0/chip-variant-prop.test/actual.js +1 -3
- package/node/v5.0.0/chip-variant-prop.test/expected.js +1 -3
- package/node/v5.0.0/circularprogress-variant.js +0 -4
- package/node/v5.0.0/circularprogress-variant.test/actual.js +1 -3
- package/node/v5.0.0/circularprogress-variant.test/expected.js +1 -3
- package/node/v5.0.0/collapse-rename-collapsedheight.js +0 -4
- package/node/v5.0.0/collapse-rename-collapsedheight.test/actual.js +1 -3
- package/node/v5.0.0/collapse-rename-collapsedheight.test/expected.js +1 -3
- package/node/v5.0.0/component-rename-prop.js +0 -3
- package/node/v5.0.0/component-rename-prop.test/actual.js +1 -3
- package/node/v5.0.0/component-rename-prop.test/expected.js +1 -3
- package/node/v5.0.0/core-styles-import.js +0 -3
- package/node/v5.0.0/core-styles-import.test/actual.js +0 -4
- package/node/v5.0.0/create-theme.js +0 -5
- package/node/v5.0.0/create-theme.test/actual.js +0 -2
- package/node/v5.0.0/create-theme.test/core-import.actual.js +0 -1
- package/node/v5.0.0/create-theme.test/core-import.expected.js +0 -1
- package/node/v5.0.0/create-theme.test/custom-fn.actual.js +0 -6
- package/node/v5.0.0/create-theme.test/custom-fn.expected.js +0 -6
- package/node/v5.0.0/create-theme.test/expected.js +0 -2
- package/node/v5.0.0/date-pickers-moved-to-x.js +1 -10
- package/node/v5.0.0/date-pickers-moved-to-x.test/actual-sub-module.js +0 -31
- package/node/v5.0.0/date-pickers-moved-to-x.test/expected-root-community.js +0 -1
- package/node/v5.0.0/date-pickers-moved-to-x.test/expected-root-pro.js +0 -1
- package/node/v5.0.0/date-pickers-moved-to-x.test/expected-sub-module.js +0 -29
- package/node/v5.0.0/dialog-props.js +0 -1
- package/node/v5.0.0/dialog-props.test/actual.js +1 -3
- package/node/v5.0.0/dialog-props.test/expected.js +1 -3
- package/node/v5.0.0/dialog-title-props.js +0 -1
- package/node/v5.0.0/dialog-title-props.test/actual.js +1 -3
- package/node/v5.0.0/dialog-title-props.test/expected.js +1 -3
- package/node/v5.0.0/emotion-prepend-cache.js +0 -3
- package/node/v5.0.0/emotion-prepend-cache.test/custom-naming.actual.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/custom-naming.expected.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/default-naming.actual.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/default-naming.expected.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/replace-existing-prepend.actual.js +0 -2
- package/node/v5.0.0/emotion-prepend-cache.test/replace-existing-prepend.expected.js +0 -2
- package/node/v5.0.0/expansion-panel-component.js +0 -1
- package/node/v5.0.0/expansion-panel-component.test/actual.js +1 -8
- package/node/v5.0.0/expansion-panel-component.test/expected.js +1 -8
- package/node/v5.0.0/fab-variant.js +0 -4
- package/node/v5.0.0/fab-variant.test/actual.js +1 -3
- package/node/v5.0.0/fab-variant.test/expected.js +1 -3
- package/node/v5.0.0/fade-rename-alpha.js +0 -3
- package/node/v5.0.0/fade-rename-alpha.test/actual.js +0 -2
- package/node/v5.0.0/fade-rename-alpha.test/expected.js +0 -2
- package/node/v5.0.0/grid-justify-justifycontent.js +0 -3
- package/node/v5.0.0/grid-justify-justifycontent.test/actual.js +1 -3
- package/node/v5.0.0/grid-justify-justifycontent.test/expected.js +1 -3
- package/node/v5.0.0/grid-list-component.js +0 -1
- package/node/v5.0.0/grid-list-component.test/actual.js +1 -7
- package/node/v5.0.0/grid-list-component.test/expected.js +1 -7
- package/node/v5.0.0/hidden-down-props.js +0 -3
- package/node/v5.0.0/icon-button-size.js +0 -2
- package/node/v5.0.0/icon-button-size.test/actual.js +1 -3
- package/node/v5.0.0/icon-button-size.test/expected.js +1 -3
- package/node/v5.0.0/jss-to-styled.js +20 -102
- package/node/v5.0.0/jss-to-styled.test/Anonymous.actual.js +0 -9
- package/node/v5.0.0/jss-to-styled.test/Anonymous.expected.js +0 -8
- package/node/v5.0.0/jss-to-styled.test/eighth.actual.js +0 -30
- package/node/v5.0.0/jss-to-styled.test/eighth.expected.js +2 -31
- package/node/v5.0.0/jss-to-styled.test/eleventh.actual.js +0 -7
- package/node/v5.0.0/jss-to-styled.test/eleventh.expected.js +0 -7
- package/node/v5.0.0/jss-to-styled.test/exportClass.actual.js +0 -8
- package/node/v5.0.0/jss-to-styled.test/exportClass.expected.js +0 -10
- package/node/v5.0.0/jss-to-styled.test/exportFunction.actual.js +0 -8
- package/node/v5.0.0/jss-to-styled.test/exportFunction.expected.js +0 -9
- package/node/v5.0.0/jss-to-styled.test/fifth.actual.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/fifth.expected.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/first.actual.js +1 -32
- package/node/v5.0.0/jss-to-styled.test/first.expected.js +1 -32
- package/node/v5.0.0/jss-to-styled.test/fourth.actual.js +0 -11
- package/node/v5.0.0/jss-to-styled.test/fourth.expected.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/multipleWithStyles.actual.js +0 -9
- package/node/v5.0.0/jss-to-styled.test/multipleWithStyles.expected.js +2 -9
- package/node/v5.0.0/jss-to-styled.test/nineth.actual.js +0 -8
- package/node/v5.0.0/jss-to-styled.test/nineth.expected.js +2 -8
- package/node/v5.0.0/jss-to-styled.test/second.actual.js +0 -13
- package/node/v5.0.0/jss-to-styled.test/second.expected.js +0 -13
- package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +3 -27
- package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +3 -26
- package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +2 -23
- package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +2 -22
- package/node/v5.0.0/jss-to-styled.test/tenth.actual.js +0 -6
- package/node/v5.0.0/jss-to-styled.test/tenth.expected.js +2 -7
- package/node/v5.0.0/jss-to-styled.test/third.actual.js +0 -11
- package/node/v5.0.0/jss-to-styled.test/third.expected.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/twelfth.actual.js +0 -7
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +0 -11
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +0 -10
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +0 -10
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +0 -12
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +0 -10
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +0 -11
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +0 -10
- package/node/v5.0.0/jss-to-tss-react.js +0 -70
- package/node/v5.0.0/jss-to-tss-react.test/actual-from-material-ui-core-styles.js +1 -8
- package/node/v5.0.0/jss-to-tss-react.test/actual-from-material-ui-core.js +0 -9
- package/node/v5.0.0/jss-to-tss-react.test/actual-from-mui-styles-makeStyles.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/actual-from-mui-styles.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/actual-mixins-pattern.js +1 -10
- package/node/v5.0.0/jss-to-tss-react.test/actual-todo-comments.js +0 -12
- package/node/v5.0.0/jss-to-tss-react.test/actual-typescript-docs-example-params.js +0 -7
- package/node/v5.0.0/jss-to-tss-react.test/actual-typescript-docs-example.js +0 -10
- package/node/v5.0.0/jss-to-tss-react.test/actual-typescript.js +1 -9
- package/node/v5.0.0/jss-to-tss-react.test/actual-withStyles.js +0 -16
- package/node/v5.0.0/jss-to-tss-react.test/expected-from-material-ui-core-styles.js +1 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-from-material-ui-core.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-from-mui-styles-makeStyles.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-from-mui-styles.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +1 -9
- package/node/v5.0.0/jss-to-tss-react.test/expected-todo-comments.js +13 -18
- package/node/v5.0.0/jss-to-tss-react.test/expected-typescript-docs-example-params.js +0 -5
- package/node/v5.0.0/jss-to-tss-react.test/expected-typescript-docs-example.js +0 -8
- package/node/v5.0.0/jss-to-tss-react.test/expected-typescript.js +1 -9
- package/node/v5.0.0/jss-to-tss-react.test/expected-withStyles.js +0 -17
- package/node/v5.0.0/link-underline-hover.js +1 -4
- package/node/v5.0.0/link-underline-hover.test/actual.js +1 -7
- package/node/v5.0.0/link-underline-hover.test/expected.js +1 -7
- package/node/v5.0.0/material-ui-styles.js +7 -11
- package/node/v5.0.0/material-ui-styles.test/core-import.actual.js +0 -1
- package/node/v5.0.0/material-ui-styles.test/core-import.expected.js +0 -12
- package/node/v5.0.0/material-ui-styles.test/expected.js +0 -12
- package/node/v5.0.0/material-ui-styles.test/single-import.expected.js +0 -1
- package/node/v5.0.0/material-ui-styles.test/types-import.actual.js +0 -1
- package/node/v5.0.0/material-ui-styles.test/types-import.expected.js +0 -2
- package/node/v5.0.0/material-ui-types.js +0 -5
- package/node/v5.0.0/modal-props.js +0 -7
- package/node/v5.0.0/modal-props.test/actual.js +1 -3
- package/node/v5.0.0/modal-props.test/expected.js +2 -3
- package/node/v5.0.0/moved-lab-modules.js +1 -4
- package/node/v5.0.0/moved-lab-modules.test/actual.js +0 -3
- package/node/v5.0.0/moved-lab-modules.test/expected.js +0 -3
- package/node/v5.0.0/mui-replace.js +0 -1
- package/node/v5.0.0/mui-replace.test/actual.js +12 -24
- package/node/v5.0.0/mui-replace.test/expected.js +12 -24
- package/node/v5.0.0/optimal-imports.js +0 -28
- package/node/v5.0.0/optimal-imports.test/actual.js +0 -11
- package/node/v5.0.0/optimal-imports.test/expected.js +0 -8
- package/node/v5.0.0/pagination-round-circular.js +0 -5
- package/node/v5.0.0/pagination-round-circular.test/actual.js +1 -3
- package/node/v5.0.0/pagination-round-circular.test/expected.js +1 -3
- package/node/v5.0.0/preset-safe.js +2 -53
- package/node/v5.0.0/preset-safe.test/actual.js +0 -41
- package/node/v5.0.0/preset-safe.test/expected.js +0 -43
- package/node/v5.0.0/root-ref.js +0 -1
- package/node/v5.0.0/root-ref.test/actual.js +1 -4
- package/node/v5.0.0/root-ref.test/expected.js +1 -2
- package/node/v5.0.0/skeleton-variant.js +0 -6
- package/node/v5.0.0/skeleton-variant.test/actual.js +1 -3
- package/node/v5.0.0/skeleton-variant.test/expected.js +1 -3
- package/node/v5.0.0/styled-engine-provider.js +1 -8
- package/node/v5.0.0/styled-engine-provider.test/mui-theme-provider.actual.js +0 -9
- package/node/v5.0.0/styled-engine-provider.test/mui-theme-provider.expected.js +0 -9
- package/node/v5.0.0/styled-engine-provider.test/theme-provider.actual.js +0 -9
- package/node/v5.0.0/styled-engine-provider.test/theme-provider.expected.js +0 -9
- package/node/v5.0.0/table-props.js +0 -6
- package/node/v5.0.0/table-props.test/actual.js +1 -5
- package/node/v5.0.0/table-props.test/expected.js +1 -5
- package/node/v5.0.0/tabs-scroll-buttons.js +0 -4
- package/node/v5.0.0/tabs-scroll-buttons.test/actual.js +1 -3
- package/node/v5.0.0/tabs-scroll-buttons.test/expected.js +1 -3
- package/node/v5.0.0/textarea-minmax-rows.js +0 -3
- package/node/v5.0.0/textarea-minmax-rows.test/actual.js +1 -3
- package/node/v5.0.0/textarea-minmax-rows.test/expected.js +1 -3
- package/node/v5.0.0/theme-augment.js +1 -8
- package/node/v5.0.0/theme-breakpoints-width.js +0 -1
- package/node/v5.0.0/theme-breakpoints.js +1 -3
- package/node/v5.0.0/theme-options.js +0 -1
- package/node/v5.0.0/theme-options.test/actual.js +0 -1
- package/node/v5.0.0/theme-options.test/expected.js +0 -1
- package/node/v5.0.0/theme-palette-mode.js +0 -1
- package/node/v5.0.0/theme-provider.js +0 -4
- package/node/v5.0.0/theme-provider.test/actual.js +0 -3
- package/node/v5.0.0/theme-provider.test/core-import.actual.js +0 -3
- package/node/v5.0.0/theme-provider.test/core-import.expected.js +0 -3
- package/node/v5.0.0/theme-provider.test/expected.js +0 -3
- package/node/v5.0.0/theme-spacing.js +12 -8
- package/node/v5.0.0/theme-spacing.test/actual.js +0 -1
- package/node/v5.0.0/theme-spacing.test/expected.js +0 -2
- package/node/v5.0.0/theme-spacing.test/large-actual.js +5 -56
- package/node/v5.0.0/theme-spacing.test/large-expected.js +5 -56
- package/node/v5.0.0/theme-typography-round.js +0 -1
- package/node/v5.0.0/top-level-imports.js +0 -22
- package/node/v5.0.0/top-level-imports.test/actual.js +0 -60
- package/node/v5.0.0/top-level-imports.test/expected.js +0 -4
- package/node/v5.0.0/transitions.js +0 -6
- package/node/v5.0.0/transitions.test/actual.js +1 -4
- package/node/v5.0.0/transitions.test/expected.js +2 -4
- package/node/v5.0.0/use-autocomplete.js +0 -3
- package/node/v5.0.0/use-autocomplete.test/actual.js +0 -1
- package/node/v5.0.0/use-autocomplete.test/expected.js +0 -3
- package/node/v5.0.0/use-transitionprops.js +1 -4
- package/node/v5.0.0/use-transitionprops.test/actual.js +1 -3
- package/node/v5.0.0/use-transitionprops.test/expected.js +1 -3
- package/node/v5.0.0/variant-prop.js +0 -4
- package/node/v5.0.0/variant-prop.test/actual.js +0 -15
- package/node/v5.0.0/variant-prop.test/expected.js +0 -15
- package/node/v5.0.0/with-mobile-dialog.js +0 -5
- package/node/v5.0.0/with-mobile-dialog.test/actual.js +0 -9
- package/node/v5.0.0/with-mobile-dialog.test/expected.js +2 -11
- package/node/v5.0.0/with-width.js +0 -4
- package/node/v5.0.0/with-width.test/actual.js +0 -9
- package/node/v5.0.0/with-width.test/expected.js +2 -11
- package/package.json +6 -6
|
@@ -4,33 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
function transformComponentsProp(attributeNode) {
|
|
9
8
|
attributeNode.name.name = 'slots';
|
|
10
9
|
const valueExpression = attributeNode.value.expression;
|
|
11
|
-
|
|
12
10
|
if ((valueExpression == null ? void 0 : valueExpression.type) !== 'ObjectExpression') {
|
|
13
11
|
return;
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
valueExpression.properties.forEach(property => {
|
|
17
14
|
property.key.name = property.key.name[0].toLowerCase() + property.key.name.slice(1);
|
|
18
|
-
|
|
19
15
|
if (property.shorthand) {
|
|
20
16
|
property.shorthand = false;
|
|
21
17
|
}
|
|
22
18
|
});
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
function transformComponentsPropsProp(attributeNode) {
|
|
26
21
|
attributeNode.name.name = 'slotProps';
|
|
27
22
|
}
|
|
23
|
+
|
|
28
24
|
/**
|
|
29
25
|
* @param {import('jscodeshift').FileInfo} file
|
|
30
26
|
* @param {import('jscodeshift').API} api
|
|
31
27
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
28
|
function transformer(file, api, options) {
|
|
35
29
|
const j = api.jscodeshift;
|
|
36
30
|
const root = j(file.source);
|
|
@@ -40,21 +34,17 @@ function transformer(file, api, options) {
|
|
|
40
34
|
if (!path.node.openingElement.name.name.endsWith('Unstyled')) {
|
|
41
35
|
return;
|
|
42
36
|
}
|
|
43
|
-
|
|
44
37
|
path.node.openingElement.attributes.forEach(node => {
|
|
45
38
|
if (node.type !== 'JSXAttribute') {
|
|
46
39
|
return;
|
|
47
40
|
}
|
|
48
|
-
|
|
49
41
|
switch (node.name.name) {
|
|
50
42
|
case 'components':
|
|
51
43
|
transformComponentsProp(node);
|
|
52
44
|
break;
|
|
53
|
-
|
|
54
45
|
case 'componentsProps':
|
|
55
46
|
transformComponentsPropsProp(node);
|
|
56
47
|
break;
|
|
57
|
-
|
|
58
48
|
default:
|
|
59
49
|
}
|
|
60
50
|
});
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsx)(BadgeUnstyled, {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeUnstyled, {
|
|
7
5
|
components: {
|
|
8
6
|
Root,
|
|
9
7
|
Badge: CustomBadge
|
|
@@ -17,9 +15,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
});
|
|
20
|
-
|
|
21
|
-
/*#__PURE__*/
|
|
22
|
-
(0, _jsxRuntime.jsx)(InputUnstyled, {
|
|
18
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(InputUnstyled, {
|
|
23
19
|
components: {
|
|
24
20
|
Input: CustomInput,
|
|
25
21
|
Root: CustomRoot
|
|
@@ -33,9 +29,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
33
29
|
}
|
|
34
30
|
}
|
|
35
31
|
});
|
|
36
|
-
|
|
37
|
-
/*#__PURE__*/
|
|
38
|
-
(0, _jsxRuntime.jsx)(Badge, {
|
|
32
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Badge, {
|
|
39
33
|
components: {
|
|
40
34
|
Root,
|
|
41
35
|
Badge: CustomBadge
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsx)(BadgeUnstyled, {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeUnstyled, {
|
|
7
5
|
slots: {
|
|
8
6
|
root: Root,
|
|
9
7
|
badge: CustomBadge
|
|
@@ -17,9 +15,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
});
|
|
20
|
-
|
|
21
|
-
/*#__PURE__*/
|
|
22
|
-
(0, _jsxRuntime.jsx)(InputUnstyled, {
|
|
18
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(InputUnstyled, {
|
|
23
19
|
slots: {
|
|
24
20
|
input: CustomInput,
|
|
25
21
|
root: CustomRoot
|
|
@@ -33,9 +29,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
33
29
|
}
|
|
34
30
|
}
|
|
35
31
|
});
|
|
36
|
-
|
|
37
|
-
/*#__PURE__*/
|
|
38
|
-
(0, _jsxRuntime.jsx)(Badge, {
|
|
32
|
+
/*#__PURE__*/(0, _jsxRuntime.jsx)(Badge, {
|
|
39
33
|
components: {
|
|
40
34
|
Root,
|
|
41
35
|
Badge: CustomBadge
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @param {import('jscodeshift').FileInfo} file
|
|
10
9
|
* @param {import('jscodeshift').API} api
|
|
@@ -17,7 +16,8 @@ function transformer(file, api, options) {
|
|
|
17
16
|
if (node.type === 'JSXAttribute' && node.name.name === 'borderRadius') {
|
|
18
17
|
// borderRadius={16} => borderRadius="16px"
|
|
19
18
|
if (node.value.type === 'JSXExpressionContainer') {
|
|
20
|
-
node.value = j.stringLiteral(`${node.value.expression.value}px`);
|
|
19
|
+
node.value = j.stringLiteral(`${node.value.expression.value}px`);
|
|
20
|
+
// borderRadius="borderRadius" => borderRadius={1}
|
|
21
21
|
} else if (node.value.value === 'borderRadius') {
|
|
22
22
|
node.value = j.jsxExpressionContainer(j.numericLiteral(1));
|
|
23
23
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
8
6
|
borderRadius: "borderRadius"
|
|
9
7
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
8
6
|
borderRadius: 1
|
|
9
7
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = transformer;
|
|
9
|
-
|
|
10
8
|
var _renameProps = _interopRequireDefault(require("../util/renameProps"));
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* @param {import('jscodeshift').FileInfo} file
|
|
14
11
|
* @param {import('jscodeshift').API} api
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = transformer;
|
|
9
|
-
|
|
10
8
|
var _renameProps = _interopRequireDefault(require("../util/renameProps"));
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* @param {import('jscodeshift').FileInfo} file
|
|
14
11
|
* @param {import('jscodeshift').API} api
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = transformer;
|
|
9
|
-
|
|
10
8
|
var _propsToObject = _interopRequireDefault(require("../util/propsToObject"));
|
|
11
|
-
|
|
12
9
|
const props = ['border', 'borderTop', 'borderRight', 'borderBottom', 'borderLeft', 'borderColor', 'borderRadius', 'displayPrint', 'display', 'overflow', 'textOverflow', 'visibility', 'whiteSpace', 'flexDirection', 'flexWrap', 'justifyContent', 'alignItems', 'alignContent', 'order', 'flex', 'flexGrow', 'flexShrink', 'alignSelf', 'color', 'bgcolor', 'position', 'zIndex', 'top', 'right', 'bottom', 'left', 'boxShadow', 'width', 'maxWidth', 'minWidth', 'height', 'maxHeight', 'minHeight', 'boxSizing', 'm', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'letterSpacing', 'lineHeight', 'textAlign'];
|
|
10
|
+
|
|
13
11
|
/**
|
|
14
12
|
* @param {import('jscodeshift').FileInfo} file
|
|
15
13
|
* @param {import('jscodeshift').API} api
|
|
16
14
|
*/
|
|
17
|
-
|
|
18
15
|
function transformer(file, api, options) {
|
|
19
16
|
const j = api.jscodeshift;
|
|
20
17
|
const root = j(file.source);
|
|
@@ -25,7 +22,6 @@ function transformer(file, api, options) {
|
|
|
25
22
|
root.find(j.ImportDeclaration).forEach(path => {
|
|
26
23
|
if (path.node.source.value.match(/^(@mui\/material|@material-ui\/core)$/)) {
|
|
27
24
|
var _path$node$specifiers;
|
|
28
|
-
|
|
29
25
|
if (((_path$node$specifiers = path.node.specifiers[0]) == null ? void 0 : _path$node$specifiers.type) === 'ImportNamespaceSpecifier') {
|
|
30
26
|
aliasName = path.node.specifiers[0].local.name;
|
|
31
27
|
}
|
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = BoxComponent;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _Box = _interopRequireDefault(require("@material-ui/core/Box"));
|
|
15
|
-
|
|
16
11
|
var _Button2 = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
var _Button;
|
|
21
|
-
|
|
22
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
16
|
function BoxComponent(props) {
|
|
27
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
28
18
|
border: "1px dashed grey",
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var UI = _interopRequireWildcard(require("@material-ui/core"));
|
|
4
|
-
|
|
5
4
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
6
|
-
|
|
7
5
|
var _UI$Box;
|
|
8
|
-
|
|
9
6
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
-
|
|
11
7
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
-
|
|
13
8
|
const Foo = () => _UI$Box || (_UI$Box = /*#__PURE__*/(0, _jsxRuntime.jsx)(UI.Box, {
|
|
14
9
|
px: 2
|
|
15
10
|
}));
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var UI = _interopRequireWildcard(require("@material-ui/core"));
|
|
4
|
-
|
|
5
4
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
6
|
-
|
|
7
5
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
8
|
-
|
|
9
6
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
-
|
|
11
7
|
const Foo = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(UI.Box, {
|
|
12
8
|
sx: {
|
|
13
9
|
px: 2
|
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = BoxComponent;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _Box = _interopRequireDefault(require("@material-ui/core/Box"));
|
|
15
|
-
|
|
16
11
|
var _Button2 = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
var _Button;
|
|
21
|
-
|
|
22
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
16
|
function BoxComponent(props) {
|
|
27
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
28
18
|
sx: {
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @param {import('jscodeshift').FileInfo} file
|
|
10
9
|
* @param {import('jscodeshift').API} api
|
|
@@ -16,7 +15,6 @@ function transformer(file, api, options) {
|
|
|
16
15
|
const attributes = path.node.openingElement.attributes;
|
|
17
16
|
attributes.forEach((node, index) => {
|
|
18
17
|
var _node$value$expressio;
|
|
19
|
-
|
|
20
18
|
if (node.type === 'JSXAttribute' && node.name.name === 'color' && (node.value.value === 'default' || ((_node$value$expressio = node.value.expression) == null ? void 0 : _node$value$expressio.value) === 'default')) {
|
|
21
19
|
delete attributes[index];
|
|
22
20
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {
|
|
8
6
|
color: "primary"
|
|
9
7
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {
|
|
8
6
|
color: "primary"
|
|
9
7
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {})]
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @param {import('jscodeshift').FileInfo} file
|
|
10
9
|
* @param {import('jscodeshift').API} api
|
|
@@ -16,7 +15,6 @@ function transformer(file, api, options) {
|
|
|
16
15
|
const attributes = path.node.openingElement.attributes;
|
|
17
16
|
attributes.forEach((node, index) => {
|
|
18
17
|
var _node$value$expressio;
|
|
19
|
-
|
|
20
18
|
if (node.type === 'JSXAttribute' && node.name.name === 'variant' && (node.value.value === 'default' || ((_node$value$expressio = node.value.expression) == null ? void 0 : _node$value$expressio.value) === 'default')) {
|
|
21
19
|
delete attributes[index];
|
|
22
20
|
}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @param {import('jscodeshift').FileInfo} file
|
|
10
9
|
* @param {import('jscodeshift').API} api
|
|
@@ -15,14 +14,11 @@ function transformer(file, api, options) {
|
|
|
15
14
|
return j(file.source).findJSXElements('CircularProgress').forEach(path => {
|
|
16
15
|
path.node.openingElement.attributes.forEach(node => {
|
|
17
16
|
var _node$value$expressio;
|
|
18
|
-
|
|
19
17
|
if (node.type === 'JSXAttribute' && node.name.name === 'variant' && (node.value.value === 'static' || ((_node$value$expressio = node.value.expression) == null ? void 0 : _node$value$expressio.value) === 'static')) {
|
|
20
18
|
node.value = j.literal('determinate');
|
|
21
19
|
}
|
|
22
|
-
|
|
23
20
|
if (node.type === 'JSXAttribute' && node.name.name === 'classes') {
|
|
24
21
|
var _node$value, _node$value$expressio2, _node$value$expressio3;
|
|
25
|
-
|
|
26
22
|
(_node$value = node.value) == null ? void 0 : (_node$value$expressio2 = _node$value.expression) == null ? void 0 : (_node$value$expressio3 = _node$value$expressio2.properties) == null ? void 0 : _node$value$expressio3.forEach(subNode => {
|
|
27
23
|
if (subNode.key.name === 'static') {
|
|
28
24
|
subNode.key.name = 'determinate';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
|
|
8
6
|
variant: "static",
|
|
9
7
|
classes: {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CircularProgress, {
|
|
8
6
|
variant: "determinate",
|
|
9
7
|
classes: {
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = transformer;
|
|
9
|
-
|
|
10
8
|
var _renameProps = _interopRequireDefault(require("../util/renameProps"));
|
|
11
|
-
|
|
12
9
|
var _renameClassKey = _interopRequireDefault(require("../util/renameClassKey"));
|
|
13
|
-
|
|
14
10
|
function transformer(file, api, options) {
|
|
15
11
|
const j = api.jscodeshift;
|
|
16
12
|
const root = j(file.source);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Collapse, {
|
|
8
6
|
collapsedHeight: 40
|
|
9
7
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Collapse, {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Collapse, {
|
|
8
6
|
collapsedSize: 40
|
|
9
7
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Collapse, {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = transformer;
|
|
9
|
-
|
|
10
8
|
var _renameProps = _interopRequireDefault(require("../util/renameProps"));
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* @param {import('jscodeshift').FileInfo} file
|
|
14
11
|
* @param {import('jscodeshift').API} api
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
8
6
|
prop: "value"
|
|
9
7
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
|
|
5
|
-
/*#__PURE__*/
|
|
6
|
-
(0, _jsxRuntime.jsxs)("div", {
|
|
4
|
+
/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
7
5
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
8
6
|
newProp: "value"
|
|
9
7
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @param {import('jscodeshift').FileInfo} file
|
|
10
9
|
* @param {import('jscodeshift').API} api
|
|
@@ -21,10 +20,8 @@ function transformer(file, api, options) {
|
|
|
21
20
|
if (s.type === 'ImportDefaultSpecifier') {
|
|
22
21
|
return j.importSpecifier(j.identifier(s.local.name));
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
return s;
|
|
26
24
|
});
|
|
27
|
-
|
|
28
25
|
if (!importStyles) {
|
|
29
26
|
importStyles = j.importDeclaration(specifiers, j.literal('@material-ui/core/styles'));
|
|
30
27
|
path.insertBefore(importStyles);
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _colorManipulator = require("@material-ui/core/styles/colorManipulator");
|
|
6
|
-
|
|
7
5
|
var _overrides = require("@material-ui/core/styles/overrides");
|
|
8
|
-
|
|
9
6
|
var _makeStyles = _interopRequireDefault(require("@material-ui/core/styles/makeStyles"));
|
|
10
|
-
|
|
11
7
|
var _styles = require("@material-ui/core/styles");
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = transformer;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* @param {import('jscodeshift').FileInfo} file
|
|
10
9
|
* @param {import('jscodeshift').API} api
|
|
@@ -15,7 +14,6 @@ function transformer(file, api, options) {
|
|
|
15
14
|
const printOptions = options.printOptions || {
|
|
16
15
|
quote: 'single'
|
|
17
16
|
};
|
|
18
|
-
|
|
19
17
|
if (file.source.match(/(function\s*createTheme|const\s*createTheme)/g)) {
|
|
20
18
|
root.find(j.ImportDeclaration).filter(({
|
|
21
19
|
node
|
|
@@ -29,7 +27,6 @@ function transformer(file, api, options) {
|
|
|
29
27
|
delete node.specifiers[index];
|
|
30
28
|
}
|
|
31
29
|
});
|
|
32
|
-
|
|
33
30
|
if (localName) {
|
|
34
31
|
node.specifiers.push(j.importSpecifier(j.identifier('createTheme'), j.identifier(localName)));
|
|
35
32
|
}
|
|
@@ -47,7 +44,6 @@ function transformer(file, api, options) {
|
|
|
47
44
|
previousVarName = specifier.local.name;
|
|
48
45
|
specifier.local.name = 'createTheme';
|
|
49
46
|
}
|
|
50
|
-
|
|
51
47
|
if (specifier.imported && specifier.imported.name === 'createMuiTheme') {
|
|
52
48
|
previousVarName = specifier.local.name;
|
|
53
49
|
specifier.local = null;
|
|
@@ -65,6 +61,5 @@ function transformer(file, api, options) {
|
|
|
65
61
|
node.callee.name = 'createTheme';
|
|
66
62
|
});
|
|
67
63
|
}
|
|
68
|
-
|
|
69
64
|
return root.toSource(printOptions);
|
|
70
65
|
}
|