@mui/codemod 6.0.0-alpha.7 → 6.0.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/README.md +227 -30
  2. package/node/deprecations/accordion-props/test-cases/actual.js +6 -3
  3. package/node/deprecations/accordion-props/test-cases/expected.js +14 -10
  4. package/node/deprecations/accordion-props/test-cases/theme.expected.js +8 -7
  5. package/node/deprecations/alert-props/test-cases/expected.js +12 -4
  6. package/node/deprecations/alert-props/test-cases/theme.expected.js +12 -5
  7. package/node/deprecations/all/deprecations-all.js +6 -0
  8. package/node/deprecations/autocomplete-props/test-cases/expected.js +8 -6
  9. package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +8 -7
  10. package/node/deprecations/avatar-group-props/avatar-group-props.js +87 -0
  11. package/node/deprecations/avatar-group-props/index.js +13 -0
  12. package/node/deprecations/avatar-group-props/test-cases/actual.js +56 -0
  13. package/node/deprecations/avatar-group-props/test-cases/expected.js +58 -0
  14. package/node/deprecations/avatar-group-props/test-cases/theme.actual.js +48 -0
  15. package/node/deprecations/avatar-group-props/test-cases/theme.expected.js +50 -0
  16. package/node/deprecations/avatar-props/test-cases/expected.js +8 -6
  17. package/node/deprecations/avatar-props/test-cases/theme.expected.js +8 -7
  18. package/node/deprecations/backdrop-props/test-cases/actual.js +3 -2
  19. package/node/deprecations/backdrop-props/test-cases/expected.js +3 -3
  20. package/node/deprecations/badge-props/test-cases/expected.js +12 -5
  21. package/node/deprecations/badge-props/test-cases/theme.expected.js +12 -5
  22. package/node/deprecations/form-control-label-props/test-cases/expected.js +4 -2
  23. package/node/deprecations/form-control-label-props/test-cases/theme.expected.js +4 -3
  24. package/node/deprecations/grid-props/grid-props.js +51 -0
  25. package/node/deprecations/grid-props/index.js +13 -0
  26. package/node/deprecations/grid-props/test-cases/actual.js +25 -0
  27. package/node/deprecations/grid-props/test-cases/expected.js +23 -0
  28. package/node/deprecations/grid-props/test-cases/theme.actual.js +24 -0
  29. package/node/deprecations/grid-props/test-cases/theme.expected.js +23 -0
  30. package/node/deprecations/list-item-props/index.js +13 -0
  31. package/node/deprecations/list-item-props/list-item-props.js +22 -0
  32. package/node/deprecations/list-item-props/test-cases/actual.js +43 -0
  33. package/node/deprecations/list-item-props/test-cases/expected.js +40 -0
  34. package/node/deprecations/list-item-props/test-cases/theme.actual.js +56 -0
  35. package/node/deprecations/list-item-props/test-cases/theme.expected.js +53 -0
  36. package/node/deprecations/popper-props/index.js +13 -0
  37. package/node/deprecations/popper-props/popper-props.js +22 -0
  38. package/node/deprecations/popper-props/test-cases/actual.js +27 -0
  39. package/node/deprecations/popper-props/test-cases/expected.js +24 -0
  40. package/node/deprecations/popper-props/test-cases/theme.actual.js +32 -0
  41. package/node/deprecations/popper-props/test-cases/theme.expected.js +29 -0
  42. package/node/deprecations/slider-props/test-cases/expected.js +12 -4
  43. package/node/deprecations/slider-props/test-cases/theme.expected.js +12 -5
  44. package/node/deprecations/speed-dial-props/test-cases/actual.js +3 -2
  45. package/node/deprecations/speed-dial-props/test-cases/expected.js +3 -3
  46. package/node/deprecations/step-label-props/test-cases/expected.js +8 -3
  47. package/node/deprecations/step-label-props/test-cases/theme.expected.js +8 -4
  48. package/node/deprecations/text-field-props/index.js +13 -0
  49. package/node/deprecations/text-field-props/test-cases/actual.js +27 -0
  50. package/node/deprecations/text-field-props/test-cases/expected.js +31 -0
  51. package/node/deprecations/text-field-props/test-cases/theme.actual.js +13 -0
  52. package/node/deprecations/text-field-props/test-cases/theme.expected.js +15 -0
  53. package/node/deprecations/text-field-props/text-field-props.js +48 -0
  54. package/node/deprecations/tooltip-props/index.js +13 -0
  55. package/node/deprecations/tooltip-props/test-cases/actual.js +92 -0
  56. package/node/deprecations/tooltip-props/test-cases/expected.js +84 -0
  57. package/node/deprecations/tooltip-props/test-cases/theme.actual.js +73 -0
  58. package/node/deprecations/tooltip-props/test-cases/theme.expected.js +65 -0
  59. package/node/deprecations/tooltip-props/tooltip-props.js +22 -0
  60. package/node/deprecations/utils/replaceComponentsWithSlots.js +29 -17
  61. package/node/util/migrateToVariants.js +198 -121
  62. package/node/v5.0.0/badge-overlap-value.test/actual.js +3 -4
  63. package/node/v5.0.0/badge-overlap-value.test/expected.js +3 -4
  64. package/node/v5.0.0/base-remove-component-prop.test/actual.js +4 -4
  65. package/node/v5.0.0/base-remove-component-prop.test/expected.js +4 -4
  66. package/node/v5.0.0/box-sx-prop.test/actual.js +4 -4
  67. package/node/v5.0.0/box-sx-prop.test/expected.js +3 -3
  68. package/node/v5.0.0/create-theme.test/custom-fn.actual.js +3 -4
  69. package/node/v5.0.0/create-theme.test/custom-fn.expected.js +3 -4
  70. package/node/v5.0.0/jss-to-styled.test/first.actual.js +11 -14
  71. package/node/v5.0.0/jss-to-styled.test/first.expected.js +11 -14
  72. package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +4 -4
  73. package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +4 -4
  74. package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +3 -3
  75. package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +3 -3
  76. package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +3 -3
  77. package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +3 -4
  78. package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +3 -3
  79. package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +3 -4
  80. package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +3 -3
  81. package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +3 -4
  82. package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +3 -3
  83. package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +3 -4
  84. package/node/v5.0.0/jss-to-tss-react.test/actual-mixins-pattern.js +6 -5
  85. package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +6 -5
  86. package/node/v5.0.0/preset-safe.test/actual.js +6 -4
  87. package/node/v5.0.0/preset-safe.test/expected.js +9 -6
  88. package/node/v5.0.0/table-props.test/actual.js +4 -5
  89. package/node/v5.0.0/table-props.test/expected.js +4 -5
  90. package/node/v5.0.0/theme-spacing.test/large-actual.js +10 -10
  91. package/node/v5.0.0/theme-spacing.test/large-expected.js +10 -10
  92. package/node/v5.0.0/variant-prop.test/actual.js +12 -6
  93. package/node/v5.0.0/variant-prop.test/expected.js +15 -12
  94. package/node/v5.0.0/with-mobile-dialog.test/expected.js +6 -5
  95. package/node/v5.0.0/with-width.test/expected.js +6 -5
  96. package/node/v6.0.0/styled/test-cases/BasicStyled.actual.js +55 -44
  97. package/node/v6.0.0/styled/test-cases/BasicStyled.expected.js +5 -6
  98. package/node/v6.0.0/styled/test-cases/ConditionalStyled.actual.js +80 -70
  99. package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +7 -6
  100. package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +32 -26
  101. package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +7 -6
  102. package/node/v6.0.0/styled/test-cases/ThemePaletteMode.expected.js +28 -26
  103. package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.actual.js +6 -5
  104. package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.expected.js +8 -8
  105. package/node/v6.0.0/sx-prop/index.js +13 -0
  106. package/node/v6.0.0/sx-prop/sx-v6.js +355 -0
  107. package/node/v6.0.0/sx-prop/test-cases/basic-sx.actual.js +36 -0
  108. package/node/v6.0.0/sx-prop/test-cases/basic-sx.expected.js +46 -0
  109. package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.actual.js +41 -0
  110. package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.expected.js +71 -0
  111. package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.actual.js +87 -0
  112. package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.expected.js +102 -0
  113. package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.actual.js +49 -0
  114. package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.expected.js +64 -0
  115. package/node/v6.0.0/system-props/index.js +13 -0
  116. package/node/v6.0.0/system-props/removeSystemProps.js +242 -0
  117. package/node/v6.0.0/system-props/test-cases/system-props.actual.js +79 -0
  118. package/node/v6.0.0/system-props/test-cases/system-props.expected.js +92 -0
  119. package/node/v6.0.0/theme-v6/test-cases/basicTheme.actual.js +254 -225
  120. package/node/v6.0.0/theme-v6/test-cases/basicTheme.expected.js +180 -162
  121. package/node/v6.0.0/theme-v6/test-cases/themeVariants.actual.js +23 -21
  122. package/node/v6.0.0/theme-v6/test-cases/themeVariants.expected.js +20 -19
  123. package/node/v6.0.0/theme-v6/theme-v6.js +2 -2
  124. package/package.json +4 -4
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
5
+ sx: theme => ({
6
+ backgroundImage: "var(--items-imageDark)",
7
+ ...theme.applyStyles("light", {
8
+ backgroundImage: "var(--items-imageLight)"
9
+ })
10
+ }),
11
+ style: {
12
+ "--items-imageLight": items[selectedItemIndex].imageLight,
13
+ "--items-imageDark": items[selectedItemIndex].imageDark
14
+ }
15
+ });
16
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
17
+ style: {
18
+ "--items-imageLight": items[selectedItemIndex].imageLight,
19
+ "--items-imageDark": items[selectedItemIndex].imageDark,
20
+ ...props.style
21
+ },
22
+ sx: theme => ({
23
+ backgroundImage: "var(--items-imageDark)",
24
+ ...theme.applyStyles("light", {
25
+ backgroundImage: "var(--items-imageLight)"
26
+ })
27
+ })
28
+ });
29
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
30
+ style: {
31
+ "--items-imageLight": items[selectedItemIndex].imageLight,
32
+ "--items-imageDark": items[selectedItemIndex].imageDark,
33
+ color: 'red',
34
+ ...props.style
35
+ },
36
+ sx: theme => ({
37
+ backgroundImage: "var(--items-imageDark)",
38
+ ...theme.applyStyles("light", {
39
+ backgroundImage: "var(--items-imageLight)"
40
+ })
41
+ })
42
+ });
43
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
44
+ ...props,
45
+ sx: theme => ({
46
+ backgroundImage: "var(--items-imageDark)",
47
+ ...theme.applyStyles("light", {
48
+ backgroundImage: "var(--items-imageLight)"
49
+ })
50
+ }),
51
+ style: {
52
+ "--items-imageLight": items[selectedItemIndex].imageLight,
53
+ "--items-imageDark": items[selectedItemIndex].imageDark,
54
+ ...props.style
55
+ }
56
+ });
57
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Paper, {
58
+ sx: {
59
+ position: 'relative',
60
+ backgroundColor: 'grey.800',
61
+ color: '#fff',
62
+ mb: 4,
63
+ backgroundSize: 'cover',
64
+ backgroundRepeat: 'no-repeat',
65
+ backgroundPosition: 'center',
66
+ backgroundImage: `url(${"var(--post-image)"})`
67
+ },
68
+ style: {
69
+ "--post-image": post.image
70
+ }
71
+ });
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
5
+ sx: {
6
+ mb: 1,
7
+ display: 'flex',
8
+ justifyContent: 'space-between',
9
+ alignItems: 'center',
10
+ gap: 2,
11
+ color: tier.title === 'Professional' ? 'grey.100' : '',
12
+ backgroundColor: theme => theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900],
13
+ borderBottom: theme => `1px solid ${theme.palette.mode === 'light' ? 'grey.200' : 'grey.800'}`
14
+ }
15
+ });
16
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
17
+ sx: theme => ({
18
+ p: 2,
19
+ display: 'flex',
20
+ flexDirection: 'column',
21
+ gap: 4,
22
+ ...(tier.title === 'Professional' && {
23
+ border: 'none',
24
+ boxShadow: theme.palette.mode === 'light' ? `0 8px 12px hsla(210, 98%, 42%, 0.2)` : `0 8px 12px hsla(0, 0%, 0%, 0.8)`,
25
+ background: 'radial-gradient(circle at 50% 0%, hsl(210, 98%, 35%), hsl(210, 100%, 16%))'
26
+ })
27
+ })
28
+ });
29
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
30
+ component: Button,
31
+ onClick: () => handleItemClick(index),
32
+ sx: theme => ({
33
+ p: 3,
34
+ height: 'fit-content',
35
+ width: '100%',
36
+ background: 'none',
37
+ ...(selectedItemIndex === index && {
38
+ backgroundColor: 'action.selected',
39
+ borderColor: theme.palette.mode === 'light' ? 'primary.light' : 'primary.dark'
40
+ }),
41
+ '&:hover': {
42
+ background: theme.palette.mode === 'light' ? 'linear-gradient(to bottom right, hsla(210, 100%, 97%, 0.5) 25%, hsla(210, 100%, 90%, 0.3) 100%)' : 'linear-gradient(to right bottom, hsla(210, 100%, 12%, 0.2) 25%, hsla(210, 100%, 16%, 0.2) 100%)',
43
+ borderColor: theme.palette.mode === 'light' ? 'primary.light' : 'primary.dark',
44
+ boxShadow: theme.palette.mode === 'light' ? '0px 2px 8px hsla(0, 0%, 0%, 0.1)' : '0px 1px 8px hsla(210, 100%, 25%, 0.5) '
45
+ }
46
+ })
47
+ }, index);
48
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CreditCardRoundedIcon, {
49
+ fontSize: "small",
50
+ sx: theme => ({
51
+ color: theme.palette.mode === 'light' ? 'grey.400' : 'grey.600',
52
+ ...(paymentType === 'creditCard' && {
53
+ color: 'primary.main'
54
+ })
55
+ })
56
+ });
57
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
58
+ edge: "start",
59
+ color: "inherit",
60
+ "aria-label": "open drawer",
61
+ onClick: toggleDrawer,
62
+ sx: {
63
+ marginRight: '36px',
64
+ ...(open && {
65
+ display: 'none'
66
+ })
67
+ },
68
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuIcon, {})
69
+ });
70
+ /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
71
+ sx: [{
72
+ ...(selectedItemIndex === index && {
73
+ backgroundColor: 'action.selected',
74
+ borderColor: theme.palette.mode === 'light' ? 'primary.light' : 'primary.dark'
75
+ })
76
+ }, theme => ({
77
+ color: theme.palette.mode === 'light' ? 'grey.400' : 'grey.600',
78
+ ...(paymentType === 'creditCard' && {
79
+ color: 'primary.main'
80
+ })
81
+ }), {
82
+ marginRight: '36px',
83
+ ...(open && {
84
+ display: 'none'
85
+ })
86
+ }]
87
+ });
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
5
+ sx: theme => ({
6
+ mb: 1,
7
+ display: 'flex',
8
+ justifyContent: 'space-between',
9
+ alignItems: 'center',
10
+ gap: 2,
11
+ backgroundColor: theme.palette.grey[900],
12
+ borderBottom: `1px solid ${'grey.800'}`,
13
+ ...theme.applyStyles("light", {
14
+ backgroundColor: theme.palette.grey[100],
15
+ borderBottom: `1px solid ${'grey.200'}`
16
+ })
17
+ })
18
+ });
19
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
20
+ sx: [theme => ({
21
+ p: 2,
22
+ display: 'flex',
23
+ flexDirection: 'column',
24
+ gap: 4
25
+ }), tier.title === 'Professional' && (theme => ({
26
+ border: 'none',
27
+ boxShadow: `0 8px 12px hsla(0, 0%, 0%, 0.8)`,
28
+ background: 'radial-gradient(circle at 50% 0%, hsl(210, 98%, 35%), hsl(210, 100%, 16%))',
29
+ ...theme.applyStyles("light", {
30
+ boxShadow: `0 8px 12px hsla(210, 98%, 42%, 0.2)`
31
+ })
32
+ }))]
33
+ });
34
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
35
+ component: Button,
36
+ onClick: () => handleItemClick(index),
37
+ sx: [theme => ({
38
+ p: 3,
39
+ height: 'fit-content',
40
+ width: '100%',
41
+ background: 'none',
42
+ '&:hover': {
43
+ background: 'linear-gradient(to right bottom, hsla(210, 100%, 12%, 0.2) 25%, hsla(210, 100%, 16%, 0.2) 100%)',
44
+ borderColor: 'primary.dark',
45
+ boxShadow: '0px 1px 8px hsla(210, 100%, 25%, 0.5) ',
46
+ ...theme.applyStyles("light", {
47
+ background: 'linear-gradient(to bottom right, hsla(210, 100%, 97%, 0.5) 25%, hsla(210, 100%, 90%, 0.3) 100%)',
48
+ borderColor: 'primary.light',
49
+ boxShadow: '0px 2px 8px hsla(0, 0%, 0%, 0.1)'
50
+ })
51
+ }
52
+ }), selectedItemIndex === index && (theme => ({
53
+ backgroundColor: 'action.selected',
54
+ borderColor: 'primary.dark',
55
+ ...theme.applyStyles("light", {
56
+ borderColor: 'primary.light'
57
+ })
58
+ }))]
59
+ }, index);
60
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(CreditCardRoundedIcon, {
61
+ fontSize: "small",
62
+ sx: [theme => ({
63
+ color: 'grey.600',
64
+ ...theme.applyStyles("light", {
65
+ color: 'grey.400'
66
+ })
67
+ }), paymentType === 'creditCard' && {
68
+ color: 'primary.main'
69
+ }]
70
+ });
71
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
72
+ edge: "start",
73
+ color: "inherit",
74
+ "aria-label": "open drawer",
75
+ onClick: toggleDrawer,
76
+ sx: [{
77
+ marginRight: '36px'
78
+ }, open && {
79
+ display: 'none'
80
+ }],
81
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuIcon, {})
82
+ });
83
+ /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
84
+ sx: [selectedItemIndex === index && (theme => ({
85
+ backgroundColor: 'action.selected',
86
+ borderColor: 'primary.dark',
87
+ ...theme.applyStyles("light", {
88
+ borderColor: 'primary.light'
89
+ })
90
+ })), theme => ({
91
+ color: 'grey.600',
92
+ ...theme.applyStyles("light", {
93
+ color: 'grey.400'
94
+ })
95
+ }), paymentType === 'creditCard' && {
96
+ color: 'primary.main'
97
+ }, {
98
+ marginRight: '36px'
99
+ }, open && {
100
+ display: 'none'
101
+ }]
102
+ });
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Accordion, {
5
+ expanded: expanded,
6
+ onChange: handleExpansion,
7
+ slotProps: {
8
+ transition: {
9
+ timeout: 400
10
+ }
11
+ },
12
+ sx: {
13
+ '& .MuiAccordion-region': {
14
+ height: expanded ? 'auto' : 0
15
+ },
16
+ '& .MuiAccordionDetails-root': {
17
+ display: expanded ? 'block' : 'none'
18
+ }
19
+ }
20
+ });
21
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
22
+ sx: {
23
+ display: 'flex',
24
+ flexDirection: {
25
+ xs: 'column-reverse',
26
+ sm: 'row'
27
+ },
28
+ justifyContent: activeStep !== 0 ? 'space-between' : 'flex-end',
29
+ alignItems: 'end',
30
+ flexGrow: 1,
31
+ gap: 1,
32
+ pb: {
33
+ xs: 12,
34
+ sm: 0
35
+ },
36
+ mt: {
37
+ xs: 2,
38
+ sm: 0
39
+ },
40
+ mb: '60px'
41
+ }
42
+ });
43
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
44
+ sx: {
45
+ display: 'flex',
46
+ alignItems: 'baseline',
47
+ color: tier.title === 'Professional' ? 'grey.50' : undefined
48
+ }
49
+ });
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var _jsxRuntime = require("react/jsx-runtime");
4
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Accordion, {
5
+ expanded: expanded,
6
+ onChange: handleExpansion,
7
+ slotProps: {
8
+ transition: {
9
+ timeout: 400
10
+ }
11
+ },
12
+ sx: [expanded ? {
13
+ '& .MuiAccordion-region': {
14
+ height: 'auto'
15
+ }
16
+ } : {
17
+ '& .MuiAccordion-region': {
18
+ height: 0
19
+ }
20
+ }, expanded ? {
21
+ '& .MuiAccordionDetails-root': {
22
+ display: 'block'
23
+ }
24
+ } : {
25
+ '& .MuiAccordionDetails-root': {
26
+ display: 'none'
27
+ }
28
+ }]
29
+ });
30
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
31
+ sx: [{
32
+ display: 'flex',
33
+ flexDirection: {
34
+ xs: 'column-reverse',
35
+ sm: 'row'
36
+ },
37
+ alignItems: 'end',
38
+ flexGrow: 1,
39
+ gap: 1,
40
+ pb: {
41
+ xs: 12,
42
+ sm: 0
43
+ },
44
+ mt: {
45
+ xs: 2,
46
+ sm: 0
47
+ },
48
+ mb: '60px'
49
+ }, activeStep !== 0 ? {
50
+ justifyContent: 'space-between'
51
+ } : {
52
+ justifyContent: 'flex-end'
53
+ }]
54
+ });
55
+ /*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
56
+ sx: [{
57
+ display: 'flex',
58
+ alignItems: 'baseline'
59
+ }, tier.title === 'Professional' ? {
60
+ color: 'grey.50'
61
+ } : {
62
+ color: null
63
+ }]
64
+ });
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "default", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _removeSystemProps.default;
11
+ }
12
+ });
13
+ var _removeSystemProps = _interopRequireDefault(require("./removeSystemProps"));
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = removeSystemProps;
7
+ // from `packages/mui-system/src/styleFunctionSx/defaultSxConfig.js`
8
+ const defaultSxConfig = {
9
+ // borders
10
+ border: {},
11
+ borderTop: {},
12
+ borderRight: {},
13
+ borderBottom: {},
14
+ borderLeft: {},
15
+ borderColor: {},
16
+ borderTopColor: {},
17
+ borderRightColor: {},
18
+ borderBottomColor: {},
19
+ borderLeftColor: {},
20
+ outline: {},
21
+ outlineColor: {},
22
+ borderRadius: {},
23
+ color: {},
24
+ bgcolor: {},
25
+ backgroundColor: {},
26
+ p: {},
27
+ pt: {},
28
+ pr: {},
29
+ pb: {},
30
+ pl: {},
31
+ px: {},
32
+ py: {},
33
+ padding: {},
34
+ paddingTop: {},
35
+ paddingRight: {},
36
+ paddingBottom: {},
37
+ paddingLeft: {},
38
+ paddingX: {},
39
+ paddingY: {},
40
+ paddingInline: {},
41
+ paddingInlineStart: {},
42
+ paddingInlineEnd: {},
43
+ paddingBlock: {},
44
+ paddingBlockStart: {},
45
+ paddingBlockEnd: {},
46
+ m: {},
47
+ mt: {},
48
+ mr: {},
49
+ mb: {},
50
+ ml: {},
51
+ mx: {},
52
+ my: {},
53
+ margin: {},
54
+ marginTop: {},
55
+ marginRight: {},
56
+ marginBottom: {},
57
+ marginLeft: {},
58
+ marginX: {},
59
+ marginY: {},
60
+ marginInline: {},
61
+ marginInlineStart: {},
62
+ marginInlineEnd: {},
63
+ marginBlock: {},
64
+ marginBlockStart: {},
65
+ marginBlockEnd: {},
66
+ // display
67
+ displayPrint: {},
68
+ display: {},
69
+ overflow: {},
70
+ textOverflow: {},
71
+ visibility: {},
72
+ whiteSpace: {},
73
+ // flexbox
74
+ flexBasis: {},
75
+ flexDirection: {},
76
+ flexWrap: {},
77
+ justifyContent: {},
78
+ alignItems: {},
79
+ alignContent: {},
80
+ order: {},
81
+ flex: {},
82
+ flexGrow: {},
83
+ flexShrink: {},
84
+ alignSelf: {},
85
+ justifyItems: {},
86
+ justifySelf: {},
87
+ // grid
88
+ gap: {},
89
+ rowGap: {},
90
+ columnGap: {},
91
+ gridColumn: {},
92
+ gridRow: {},
93
+ gridAutoFlow: {},
94
+ gridAutoColumns: {},
95
+ gridAutoRows: {},
96
+ gridTemplateColumns: {},
97
+ gridTemplateRows: {},
98
+ gridTemplateAreas: {},
99
+ gridArea: {},
100
+ // positions
101
+ position: {},
102
+ zIndex: {},
103
+ top: {},
104
+ right: {},
105
+ bottom: {},
106
+ left: {},
107
+ // shadows
108
+ boxShadow: {},
109
+ // sizing
110
+ width: {},
111
+ maxWidth: {},
112
+ minWidth: {},
113
+ height: {},
114
+ maxHeight: {},
115
+ minHeight: {},
116
+ boxSizing: {},
117
+ // typography
118
+ font: {},
119
+ fontFamily: {},
120
+ fontSize: {},
121
+ fontStyle: {},
122
+ fontWeight: {},
123
+ letterSpacing: {},
124
+ textTransform: {},
125
+ lineHeight: {},
126
+ textAlign: {},
127
+ typography: {}
128
+ };
129
+ const systemProps = Object.keys(defaultSxConfig);
130
+ const components = ['Box', 'Stack', 'Typography', 'Link', 'Grid'];
131
+
132
+ /**
133
+ * @param {import('jscodeshift').FileInfo} file
134
+ * @param {import('jscodeshift').API} api
135
+ */
136
+ function removeSystemProps(file, api, options) {
137
+ var _file$path, _file$path2;
138
+ if ((_file$path = file.path) != null && _file$path.endsWith('.json') || (_file$path2 = file.path) != null && _file$path2.endsWith('.d.ts')) {
139
+ return file.source;
140
+ }
141
+ const j = api.jscodeshift;
142
+ const root = j(file.source);
143
+ const printOptions = options.printOptions;
144
+ const deprecatedElements = [];
145
+ const customReplacement = {
146
+ Typography: {
147
+ matcher: (key, val) => {
148
+ var _val$value;
149
+ return key !== 'color' || ((_val$value = val.value) == null ? void 0 : _val$value.includes('.')) && val.value !== 'inherit' || val.value === 'divider';
150
+ }
151
+ },
152
+ Link: {
153
+ matcher: key => key !== 'color'
154
+ }
155
+ };
156
+ const elementReplacement = {};
157
+ root.find(j.ImportDeclaration, decl => decl.source.value.includes('@mui')).forEach(decl => {
158
+ decl.node.specifiers.forEach(spec => {
159
+ if (spec.type === 'ImportSpecifier') {
160
+ if (components.includes(spec.imported.name)) {
161
+ deprecatedElements.push(spec.local.name);
162
+ }
163
+ }
164
+ if (spec.type === 'ImportDefaultSpecifier') {
165
+ const name = decl.node.source.value.split('/').pop();
166
+ if (components.includes(name)) {
167
+ deprecatedElements.push(spec.local.name);
168
+ if (customReplacement[name]) {
169
+ elementReplacement[spec.local.name] = customReplacement[name];
170
+ }
171
+ }
172
+ }
173
+ });
174
+ });
175
+ root.find(j.JSXElement, {
176
+ openingElement: {
177
+ name: {
178
+ name: name => {
179
+ return deprecatedElements.includes(name);
180
+ }
181
+ }
182
+ }
183
+ }).forEach(el => {
184
+ var _el$value, _sxNodesArray$;
185
+ const sx = j.objectExpression([]);
186
+ const elementName = (_el$value = el.value) == null || (_el$value = _el$value.openingElement) == null || (_el$value = _el$value.name) == null ? void 0 : _el$value.name;
187
+ const sxNodes = j(el).find(j.JSXAttribute).filter(path => path.parent.parent.node === el.node && path.node.name.name === 'sx');
188
+ const sxNodesArray = sxNodes.nodes() || [];
189
+ const existingSxValue = (_sxNodesArray$ = sxNodesArray[0]) == null || (_sxNodesArray$ = _sxNodesArray$.value) == null ? void 0 : _sxNodesArray$.expression;
190
+ let spreadElement = null;
191
+ el.node.openingElement.attributes.forEach(attr => {
192
+ if (attr.type === 'JSXSpreadAttribute') {
193
+ spreadElement = attr;
194
+ }
195
+ });
196
+ const attrToPrune = ['sx'];
197
+ el.node.openingElement.attributes.forEach(attr => {
198
+ var _attr$name, _attr$name2;
199
+ if (attr.type === 'JSXSpreadAttribute' || !attr.value || !systemProps.includes(attr == null || (_attr$name = attr.name) == null ? void 0 : _attr$name.name)) {
200
+ return;
201
+ }
202
+ const key = attr == null || (_attr$name2 = attr.name) == null ? void 0 : _attr$name2.name;
203
+ const literal = attr == null ? void 0 : attr.value;
204
+ const val = literal.type === 'JSXExpressionContainer' ? literal.expression : literal;
205
+ const shouldPrune = !elementReplacement[elementName] || elementReplacement[elementName].matcher(key, val);
206
+ if (key && val) {
207
+ if (shouldPrune) {
208
+ sx.properties.push(j.property('init', j.identifier(key), val));
209
+ attrToPrune.push(key);
210
+ }
211
+ }
212
+ });
213
+ if (sx.properties.length) {
214
+ el.node.openingElement.attributes = el.node.openingElement.attributes.filter(attr => {
215
+ var _attr$name3;
216
+ return attr.type !== 'JSXAttribute' || !attrToPrune.includes(attr == null || (_attr$name3 = attr.name) == null ? void 0 : _attr$name3.name);
217
+ });
218
+ let finalSx;
219
+ if (!existingSxValue) {
220
+ finalSx = sx;
221
+ } else if ((existingSxValue == null ? void 0 : existingSxValue.type) === 'ObjectExpression') {
222
+ sx.properties.push(...existingSxValue.properties);
223
+ finalSx = sx;
224
+ } else if ((existingSxValue == null ? void 0 : existingSxValue.type) === 'ArrayExpression') {
225
+ existingSxValue.elements = [sx, ...existingSxValue.elements];
226
+ finalSx = existingSxValue;
227
+ } else {
228
+ finalSx = j.arrayExpression([sx, existingSxValue.type === 'Identifier' ? j.spreadElement(j.conditionalExpression(j.callExpression(j.memberExpression(j.identifier('Array'), j.identifier('isArray')), [existingSxValue]), existingSxValue, j.arrayExpression([existingSxValue]))) : existingSxValue]);
229
+ }
230
+ if (spreadElement && spreadElement.argument.type === 'Identifier') {
231
+ if (finalSx.type === 'ObjectExpression') {
232
+ const propSx = j.memberExpression(spreadElement.argument, j.identifier('sx'));
233
+ finalSx = j.arrayExpression([finalSx, j.spreadElement(j.conditionalExpression(j.callExpression(j.memberExpression(j.identifier('Array'), j.identifier('isArray')), [propSx]), propSx, j.arrayExpression([propSx])))]);
234
+ } else if (finalSx.type === 'ArrayExpression') {
235
+ finalSx.elements.push(j.memberExpression(spreadElement.argument, j.identifier('sx')));
236
+ }
237
+ }
238
+ el.node.openingElement.attributes.push(j.jsxAttribute(j.jsxIdentifier('sx'), j.jsxExpressionContainer(finalSx)));
239
+ }
240
+ });
241
+ return root.toSource(printOptions);
242
+ }