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

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 (79) hide show
  1. package/README.md +23 -0
  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 +2 -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-props/test-cases/expected.js +8 -6
  11. package/node/deprecations/avatar-props/test-cases/theme.expected.js +8 -7
  12. package/node/deprecations/backdrop-props/test-cases/actual.js +3 -2
  13. package/node/deprecations/backdrop-props/test-cases/expected.js +3 -3
  14. package/node/deprecations/badge-props/test-cases/expected.js +12 -5
  15. package/node/deprecations/badge-props/test-cases/theme.expected.js +12 -5
  16. package/node/deprecations/form-control-label-props/test-cases/expected.js +4 -2
  17. package/node/deprecations/form-control-label-props/test-cases/theme.expected.js +4 -3
  18. package/node/deprecations/slider-props/test-cases/expected.js +12 -4
  19. package/node/deprecations/slider-props/test-cases/theme.expected.js +12 -5
  20. package/node/deprecations/speed-dial-props/test-cases/actual.js +3 -2
  21. package/node/deprecations/speed-dial-props/test-cases/expected.js +3 -3
  22. package/node/deprecations/step-label-props/test-cases/expected.js +8 -3
  23. package/node/deprecations/step-label-props/test-cases/theme.expected.js +8 -4
  24. package/node/deprecations/text-field-props/index.js +13 -0
  25. package/node/deprecations/text-field-props/test-cases/actual.js +27 -0
  26. package/node/deprecations/text-field-props/test-cases/expected.js +31 -0
  27. package/node/deprecations/text-field-props/test-cases/theme.actual.js +13 -0
  28. package/node/deprecations/text-field-props/test-cases/theme.expected.js +15 -0
  29. package/node/deprecations/text-field-props/text-field-props.js +48 -0
  30. package/node/deprecations/utils/replaceComponentsWithSlots.js +29 -17
  31. package/node/util/migrateToVariants.js +50 -31
  32. package/node/v5.0.0/badge-overlap-value.test/actual.js +3 -4
  33. package/node/v5.0.0/badge-overlap-value.test/expected.js +3 -4
  34. package/node/v5.0.0/base-remove-component-prop.test/actual.js +4 -4
  35. package/node/v5.0.0/base-remove-component-prop.test/expected.js +4 -4
  36. package/node/v5.0.0/box-sx-prop.test/actual.js +4 -4
  37. package/node/v5.0.0/box-sx-prop.test/expected.js +3 -3
  38. package/node/v5.0.0/create-theme.test/custom-fn.actual.js +3 -4
  39. package/node/v5.0.0/create-theme.test/custom-fn.expected.js +3 -4
  40. package/node/v5.0.0/jss-to-styled.test/first.actual.js +11 -14
  41. package/node/v5.0.0/jss-to-styled.test/first.expected.js +11 -14
  42. package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +4 -4
  43. package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +4 -4
  44. package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +3 -3
  45. package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +3 -3
  46. package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +3 -3
  47. package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +3 -4
  48. package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +3 -3
  49. package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +3 -4
  50. package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +3 -3
  51. package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +3 -4
  52. package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +3 -3
  53. package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +3 -4
  54. package/node/v5.0.0/jss-to-tss-react.test/actual-mixins-pattern.js +6 -5
  55. package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +6 -5
  56. package/node/v5.0.0/preset-safe.test/actual.js +6 -4
  57. package/node/v5.0.0/preset-safe.test/expected.js +9 -6
  58. package/node/v5.0.0/table-props.test/actual.js +4 -5
  59. package/node/v5.0.0/table-props.test/expected.js +4 -5
  60. package/node/v5.0.0/theme-spacing.test/large-actual.js +10 -10
  61. package/node/v5.0.0/theme-spacing.test/large-expected.js +10 -10
  62. package/node/v5.0.0/variant-prop.test/actual.js +12 -6
  63. package/node/v5.0.0/variant-prop.test/expected.js +15 -12
  64. package/node/v5.0.0/with-mobile-dialog.test/expected.js +6 -5
  65. package/node/v5.0.0/with-width.test/expected.js +6 -5
  66. package/node/v6.0.0/styled/test-cases/BasicStyled.actual.js +55 -44
  67. package/node/v6.0.0/styled/test-cases/BasicStyled.expected.js +5 -6
  68. package/node/v6.0.0/styled/test-cases/ConditionalStyled.actual.js +80 -70
  69. package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +7 -6
  70. package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +32 -26
  71. package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +7 -6
  72. package/node/v6.0.0/styled/test-cases/ThemePaletteMode.expected.js +28 -26
  73. package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.actual.js +6 -5
  74. package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.expected.js +8 -8
  75. package/node/v6.0.0/theme-v6/test-cases/basicTheme.actual.js +254 -225
  76. package/node/v6.0.0/theme-v6/test-cases/basicTheme.expected.js +180 -162
  77. package/node/v6.0.0/theme-v6/test-cases/themeVariants.actual.js +23 -21
  78. package/node/v6.0.0/theme-v6/test-cases/themeVariants.expected.js +20 -19
  79. package/package.json +1 -1
@@ -1,31 +1,31 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = getCheckoutTheme;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
7
  var _jsxRuntime = require("react/jsx-runtime");
10
8
  function getCheckoutTheme(mode) {
11
- return (0, _extends2.default)({}, getDesignTokens(mode), {
9
+ return {
10
+ ...getDesignTokens(mode),
12
11
  components: {
13
12
  MuiAlert: {
14
13
  styleOverrides: {
15
14
  root: ({
16
15
  theme
17
- }) => (0, _extends2.default)({
16
+ }) => ({
18
17
  borderRadius: 10,
19
18
  backgroundColor: orange[100],
20
19
  color: theme.palette.text.primary,
21
20
  border: `1px solid ${alpha(orange[300], 0.5)}`,
22
21
  '& .MuiAlert-icon': {
23
22
  color: orange[500]
24
- }
25
- }, theme.applyStyles("dark", {
26
- backgroundColor: `${alpha(orange[900], 0.5)}`,
27
- border: `1px solid ${alpha(orange[800], 0.5)}`
28
- }))
23
+ },
24
+ ...theme.applyStyles("dark", {
25
+ backgroundColor: `${alpha(orange[900], 0.5)}`,
26
+ border: `1px solid ${alpha(orange[800], 0.5)}`
27
+ })
28
+ })
29
29
  }
30
30
  },
31
31
  MuiButtonBase: {
@@ -154,65 +154,73 @@ function getCheckoutTheme(mode) {
154
154
  props: {
155
155
  variant: 'outlined'
156
156
  },
157
- style: (0, _extends2.default)({}, theme.applyStyles("dark", {
158
- color: brand[200],
159
- backgroundColor: alpha(brand[600], 0.1),
160
- borderColor: alpha(brand[600], 0.6),
161
- boxShadow: `inset 0 2.5px ${alpha(brand[400], 0.1)}, inset 0 -2px ${alpha(gray[900], 0.5)}`,
162
- '&:hover': {
163
- backgroundColor: alpha(brand[700], 0.2),
164
- borderColor: alpha(brand[700], 0.5),
165
- boxShadow: 'none'
166
- },
167
- '&:active': {
168
- backgroundColor: alpha(brand[800], 0.2),
169
- boxShadow: `inset 0 2.5px 0 ${alpha(brand[900], 0.4)}`,
170
- backgroundImage: 'none'
171
- }
172
- }))
157
+ style: {
158
+ ...theme.applyStyles("dark", {
159
+ color: brand[200],
160
+ backgroundColor: alpha(brand[600], 0.1),
161
+ borderColor: alpha(brand[600], 0.6),
162
+ boxShadow: `inset 0 2.5px ${alpha(brand[400], 0.1)}, inset 0 -2px ${alpha(gray[900], 0.5)}`,
163
+ '&:hover': {
164
+ backgroundColor: alpha(brand[700], 0.2),
165
+ borderColor: alpha(brand[700], 0.5),
166
+ boxShadow: 'none'
167
+ },
168
+ '&:active': {
169
+ backgroundColor: alpha(brand[800], 0.2),
170
+ boxShadow: `inset 0 2.5px 0 ${alpha(brand[900], 0.4)}`,
171
+ backgroundImage: 'none'
172
+ }
173
+ })
174
+ }
173
175
  }, {
174
176
  props: {
175
177
  color: 'info',
176
178
  variant: 'text'
177
179
  },
178
- style: (0, _extends2.default)({}, theme.applyStyles("dark", {
179
- color: gray[200],
180
- '&:hover': {
181
- backgroundColor: alpha(gray[700], 0.3)
182
- }
183
- }))
180
+ style: {
181
+ ...theme.applyStyles("dark", {
182
+ color: gray[200],
183
+ '&:hover': {
184
+ backgroundColor: alpha(gray[700], 0.3)
185
+ }
186
+ })
187
+ }
184
188
  }, {
185
189
  props: {
186
190
  color: 'secondary',
187
191
  variant: 'outlined'
188
192
  },
189
- style: (0, _extends2.default)({}, theme.applyStyles("dark", {
190
- color: gray[300],
191
- backgroundColor: alpha(gray[600], 0.1),
192
- borderColor: alpha(gray[700], 0.5),
193
- boxShadow: `inset 0 2.5px ${alpha(gray[600], 0.1)}, inset 0 -2px ${alpha(gray[900], 0.5)}`,
194
- '&:hover': {
195
- backgroundColor: alpha(gray[700], 0.2),
193
+ style: {
194
+ ...theme.applyStyles("dark", {
195
+ color: gray[300],
196
+ backgroundColor: alpha(gray[600], 0.1),
196
197
  borderColor: alpha(gray[700], 0.5),
197
- boxShadow: 'none'
198
- },
199
- '&:active': {
200
- backgroundColor: alpha(gray[800], 0.2),
201
- boxShadow: `inset 0 2.5px 0 ${alpha(gray[900], 0.4)}`,
202
- backgroundImage: 'none'
203
- }
204
- }))
198
+ boxShadow: `inset 0 2.5px ${alpha(gray[600], 0.1)}, inset 0 -2px ${alpha(gray[900], 0.5)}`,
199
+ '&:hover': {
200
+ backgroundColor: alpha(gray[700], 0.2),
201
+ borderColor: alpha(gray[700], 0.5),
202
+ boxShadow: 'none'
203
+ },
204
+ '&:active': {
205
+ backgroundColor: alpha(gray[800], 0.2),
206
+ boxShadow: `inset 0 2.5px 0 ${alpha(gray[900], 0.4)}`,
207
+ backgroundImage: 'none'
208
+ }
209
+ })
210
+ }
205
211
  }, {
206
212
  props: {
207
213
  color: 'primary',
208
214
  variant: 'text'
209
215
  },
210
- style: (0, _extends2.default)({}, theme.applyStyles("dark", {
211
- color: brand[200],
212
- '&:hover': {
213
- backgroundColor: alpha(brand[700], 0.3)
214
- }
215
- }))
216
+ style: {
217
+ ...theme.applyStyles("dark", {
218
+ color: brand[200],
219
+ '&:hover': {
220
+ backgroundColor: alpha(brand[700], 0.3)
221
+ }
222
+ })
223
+ }
216
224
  }]
217
225
  })
218
226
  }
@@ -221,16 +229,16 @@ function getCheckoutTheme(mode) {
221
229
  styleOverrides: {
222
230
  root: ({
223
231
  theme
224
- }) => (0, _extends2.default)({
232
+ }) => ({
225
233
  transition: 'all 100ms ease',
226
234
  backgroundColor: gray[50],
227
235
  borderRadius: theme.shape.borderRadius,
228
236
  border: `1px solid ${alpha(gray[200], 0.5)}`,
229
- boxShadow: 'none'
230
- }, theme.applyStyles("dark", {
231
- backgroundColor: alpha(gray[800], 0.6),
232
- border: `1px solid ${alpha(gray[700], 0.3)}`
233
- }), {
237
+ boxShadow: 'none',
238
+ ...theme.applyStyles("dark", {
239
+ backgroundColor: alpha(gray[800], 0.6),
240
+ border: `1px solid ${alpha(gray[700], 0.3)}`
241
+ }),
234
242
  variants: [{
235
243
  props: {
236
244
  variant: 'outlined'
@@ -244,11 +252,13 @@ function getCheckoutTheme(mode) {
244
252
  props: {
245
253
  variant: 'outlined'
246
254
  },
247
- style: (0, _extends2.default)({}, theme.applyStyles("dark", {
248
- border: `1px solid ${alpha(gray[700], 0.4)}`,
249
- boxShadow: 'none',
250
- background: `linear-gradient(to bottom, ${gray[900]}, ${alpha(gray[800], 0.5)})`
251
- }))
255
+ style: {
256
+ ...theme.applyStyles("dark", {
257
+ border: `1px solid ${alpha(gray[700], 0.4)}`,
258
+ boxShadow: 'none',
259
+ background: `linear-gradient(to bottom, ${gray[900]}, ${alpha(gray[800], 0.5)})`
260
+ })
261
+ }
252
262
  }]
253
263
  })
254
264
  }
@@ -271,7 +281,7 @@ function getCheckoutTheme(mode) {
271
281
  styleOverrides: {
272
282
  root: ({
273
283
  theme
274
- }) => (0, _extends2.default)({
284
+ }) => ({
275
285
  margin: 10,
276
286
  height: 16,
277
287
  width: 16,
@@ -297,31 +307,33 @@ function getCheckoutTheme(mode) {
297
307
  '&:hover': {
298
308
  backgroundColor: brand[600]
299
309
  }
300
- }
301
- }, theme.applyStyles("dark", {
302
- borderColor: alpha(gray[700], 0.5),
303
- boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
304
- backgroundColor: alpha(gray[900], 0.8),
305
- '&:hover': {
306
- borderColor: brand[300]
307
310
  },
308
- '&.Mui-focusVisible': {
309
- borderColor: brand[400],
310
- outline: `3px solid ${alpha(brand[500], 0.5)}`,
311
- outlineOffset: '2px'
312
- }
313
- }))
311
+ ...theme.applyStyles("dark", {
312
+ borderColor: alpha(gray[700], 0.5),
313
+ boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
314
+ backgroundColor: alpha(gray[900], 0.8),
315
+ '&:hover': {
316
+ borderColor: brand[300]
317
+ },
318
+ '&.Mui-focusVisible': {
319
+ borderColor: brand[400],
320
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
321
+ outlineOffset: '2px'
322
+ }
323
+ })
324
+ })
314
325
  }
315
326
  },
316
327
  MuiDivider: {
317
328
  styleOverrides: {
318
329
  root: ({
319
330
  theme
320
- }) => (0, _extends2.default)({
321
- borderColor: `${alpha(gray[200], 0.8)}`
322
- }, theme.applyStyles("dark", {
323
- borderColor: `${alpha(gray[700], 0.4)}`
324
- }))
331
+ }) => ({
332
+ borderColor: `${alpha(gray[200], 0.8)}`,
333
+ ...theme.applyStyles("dark", {
334
+ borderColor: `${alpha(gray[700], 0.4)}`
335
+ })
336
+ })
325
337
  }
326
338
  },
327
339
  MuiFormLabel: {
@@ -338,19 +350,19 @@ function getCheckoutTheme(mode) {
338
350
  styleOverrides: {
339
351
  root: ({
340
352
  theme
341
- }) => (0, _extends2.default)({
353
+ }) => ({
342
354
  color: brand[500],
343
355
  '&:hover': {
344
356
  backgroundColor: alpha(brand[300], 0.3),
345
357
  borderColor: brand[200]
346
- }
347
- }, theme.applyStyles("dark", {
348
- color: brand[200],
349
- '&:hover': {
350
- backgroundColor: alpha(brand[600], 0.3),
351
- borderColor: brand[700]
352
- }
353
- }), {
358
+ },
359
+ ...theme.applyStyles("dark", {
360
+ color: brand[200],
361
+ '&:hover': {
362
+ backgroundColor: alpha(brand[600], 0.3),
363
+ borderColor: brand[700]
364
+ }
365
+ }),
354
366
  variants: [{
355
367
  props: {
356
368
  size: 'small'
@@ -385,7 +397,7 @@ function getCheckoutTheme(mode) {
385
397
  styleOverrides: {
386
398
  root: ({
387
399
  theme
388
- }) => (0, _extends2.default)({
400
+ }) => ({
389
401
  color: brand[700],
390
402
  fontWeight: 500,
391
403
  position: 'relative',
@@ -409,10 +421,11 @@ function getCheckoutTheme(mode) {
409
421
  outline: `3px solid ${alpha(brand[500], 0.5)}`,
410
422
  outlineOffset: '4px',
411
423
  borderRadius: '2px'
412
- }
413
- }, theme.applyStyles("dark", {
414
- color: brand[200]
415
- }))
424
+ },
425
+ ...theme.applyStyles("dark", {
426
+ color: brand[200]
427
+ })
428
+ })
416
429
  }
417
430
  },
418
431
  MuiOutlinedInput: {
@@ -425,7 +438,7 @@ function getCheckoutTheme(mode) {
425
438
  },
426
439
  root: ({
427
440
  theme
428
- }) => (0, _extends2.default)({
441
+ }) => ({
429
442
  'input:-webkit-autofill': {
430
443
  WebkitBoxShadow: `0 0 0 1000px ${brand[100]} inset, 0 0 0 1px ${brand[200]}`,
431
444
  maxHeight: '4px',
@@ -454,33 +467,33 @@ function getCheckoutTheme(mode) {
454
467
  outline: `3px solid ${alpha(brand[500], 0.5)}`,
455
468
  outlineOffset: '2px',
456
469
  borderColor: brand[400]
457
- }
458
- }, theme.applyStyles("dark", {
459
- 'input:-webkit-autofill': {
460
- WebkitBoxShadow: `0 0 0 1000px ${brand[900]} inset, 0 0 0 1px ${brand[600]}`,
461
- maxHeight: '6px',
462
- borderRadius: '8px'
463
470
  },
464
- '& .MuiInputBase-input': {
465
- fontSize: '1rem',
466
- '&::placeholder': {
467
- opacity: 1,
468
- color: gray[500]
471
+ ...theme.applyStyles("dark", {
472
+ 'input:-webkit-autofill': {
473
+ WebkitBoxShadow: `0 0 0 1000px ${brand[900]} inset, 0 0 0 1px ${brand[600]}`,
474
+ maxHeight: '6px',
475
+ borderRadius: '8px'
476
+ },
477
+ '& .MuiInputBase-input': {
478
+ fontSize: '1rem',
479
+ '&::placeholder': {
480
+ opacity: 1,
481
+ color: gray[500]
482
+ }
483
+ },
484
+ borderColor: alpha(gray[700], 0.5),
485
+ boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
486
+ backgroundColor: alpha(gray[900], 0.8),
487
+ transition: 'border-color 120ms ease-in',
488
+ '&:hover': {
489
+ borderColor: brand[300]
490
+ },
491
+ '&.Mui-focused': {
492
+ borderColor: brand[400],
493
+ outline: `3px solid ${alpha(brand[500], 0.5)}`,
494
+ outlineOffset: '2px'
469
495
  }
470
- },
471
- borderColor: alpha(gray[700], 0.5),
472
- boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
473
- backgroundColor: alpha(gray[900], 0.8),
474
- transition: 'border-color 120ms ease-in',
475
- '&:hover': {
476
- borderColor: brand[300]
477
- },
478
- '&.Mui-focused': {
479
- borderColor: brand[400],
480
- outline: `3px solid ${alpha(brand[500], 0.5)}`,
481
- outlineOffset: '2px'
482
- }
483
- }), {
496
+ }),
484
497
  variants: [{
485
498
  props: {
486
499
  color: 'error'
@@ -496,13 +509,15 @@ function getCheckoutTheme(mode) {
496
509
  props: {
497
510
  color: 'error'
498
511
  },
499
- style: (0, _extends2.default)({}, theme.applyStyles("dark", {
500
- borderColor: red[700],
501
- color: red[300],
502
- '& + .MuiFormHelperText-root': {
503
- color: red[300]
504
- }
505
- }))
512
+ style: {
513
+ ...theme.applyStyles("dark", {
514
+ borderColor: red[700],
515
+ color: red[300],
516
+ '& + .MuiFormHelperText-root': {
517
+ color: red[300]
518
+ }
519
+ })
520
+ }
506
521
  }]
507
522
  })
508
523
  }
@@ -533,7 +548,7 @@ function getCheckoutTheme(mode) {
533
548
  styleOverrides: {
534
549
  root: ({
535
550
  theme
536
- }) => (0, _extends2.default)({
551
+ }) => ({
537
552
  color: 'transparent',
538
553
  border: `1px solid ${gray[400]}`,
539
554
  width: 12,
@@ -549,18 +564,18 @@ function getCheckoutTheme(mode) {
549
564
  '&.Mui-completed': {
550
565
  border: 'none',
551
566
  color: theme.palette.success.main
552
- }
553
- }, theme.applyStyles("dark", {
554
- border: `1px solid ${gray[700]}`,
555
- '&.Mui-active': {
556
- border: 'none',
557
- color: theme.palette.primary.light
558
567
  },
559
- '&.Mui-completed': {
560
- border: 'none',
561
- color: theme.palette.success.light
562
- }
563
- }), {
568
+ ...theme.applyStyles("dark", {
569
+ border: `1px solid ${gray[700]}`,
570
+ '&.Mui-active': {
571
+ border: 'none',
572
+ color: theme.palette.primary.light
573
+ },
574
+ '&.Mui-completed': {
575
+ border: 'none',
576
+ color: theme.palette.success.light
577
+ }
578
+ }),
564
579
  variants: [{
565
580
  props: {
566
581
  completed: true
@@ -578,11 +593,12 @@ function getCheckoutTheme(mode) {
578
593
  label: ({
579
594
  theme
580
595
  }) => ({
581
- '&.Mui-completed': (0, _extends2.default)({
582
- opacity: 0.6
583
- }, theme.applyStyles("dark", {
584
- opacity: 0.5
585
- }))
596
+ '&.Mui-completed': {
597
+ opacity: 0.6,
598
+ ...theme.applyStyles("dark", {
599
+ opacity: 0.5
600
+ })
601
+ }
586
602
  })
587
603
  }
588
604
  },
@@ -590,37 +606,39 @@ function getCheckoutTheme(mode) {
590
606
  styleOverrides: {
591
607
  root: ({
592
608
  theme
593
- }) => (0, _extends2.default)({
609
+ }) => ({
594
610
  borderRadius: theme.shape.borderRadius,
595
611
  boxShadow: `0 1px 2px hsla(210, 0%, 0%, 0.05), 0 2px 12px ${alpha(brand[200], 0.5)}`,
596
612
  '& .Mui-selected': {
597
613
  color: brand[500]
598
- }
599
- }, theme.applyStyles("dark", {
600
- '& .Mui-selected': {
601
- color: 'hsl(0, 0%, 100%)'
602
614
  },
603
- boxShadow: `0 0 0 1px hsla(210, 0%, 0%, 0.5), 0 2px 12px ${alpha(brand[700], 0.5)}`
604
- }))
615
+ ...theme.applyStyles("dark", {
616
+ '& .Mui-selected': {
617
+ color: 'hsl(0, 0%, 100%)'
618
+ },
619
+ boxShadow: `0 0 0 1px hsla(210, 0%, 0%, 0.5), 0 2px 12px ${alpha(brand[700], 0.5)}`
620
+ })
621
+ })
605
622
  }
606
623
  },
607
624
  MuiToggleButton: {
608
625
  styleOverrides: {
609
626
  root: ({
610
627
  theme
611
- }) => (0, _extends2.default)({
628
+ }) => ({
612
629
  padding: '12px 16px',
613
630
  textTransform: 'none',
614
631
  borderRadius: theme.shape.borderRadius,
615
- fontWeight: 500
616
- }, theme.applyStyles("dark", {
617
- color: gray[400],
618
- '&.Mui-selected': {
619
- color: brand[300]
620
- }
621
- }))
632
+ fontWeight: 500,
633
+ ...theme.applyStyles("dark", {
634
+ color: gray[400],
635
+ '&.Mui-selected': {
636
+ color: brand[300]
637
+ }
638
+ })
639
+ })
622
640
  }
623
641
  }
624
642
  }
625
- });
643
+ };
626
644
  }
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = getCheckoutTheme;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
7
  function getCheckoutTheme(mode) {
10
- return (0, _extends2.default)({}, getDesignTokens(mode), {
8
+ return {
9
+ ...getDesignTokens(mode),
11
10
  components: {
12
11
  MuiStepIcon: {
13
12
  variants: [{
@@ -23,7 +22,7 @@ function getCheckoutTheme(mode) {
23
22
  root: ({
24
23
  theme,
25
24
  ownerState
26
- }) => (0, _extends2.default)({
25
+ }) => ({
27
26
  color: 'transparent',
28
27
  border: `1px solid ${gray[400]}`,
29
28
  width: 12,
@@ -39,25 +38,28 @@ function getCheckoutTheme(mode) {
39
38
  '&.Mui-completed': {
40
39
  border: 'none',
41
40
  color: theme.palette.success.main
42
- }
43
- }, ownerState.size === 'large' && {
44
- width: 20,
45
- height: 20
46
- }, theme.palette.mode === 'dark' && (0, _extends2.default)({
47
- border: `1px solid ${gray[700]}`,
48
- '&.Mui-active': {
49
- border: 'none',
50
- color: theme.palette.primary.light
51
41
  },
52
- '&.Mui-completed': {
53
- border: 'none',
54
- color: theme.palette.success.light
55
- }
56
- }, ownerState.variant === 'shadow' && {
57
- boxShadow: theme.shadows[2]
58
- }))
42
+ ...(ownerState.size === 'large' && {
43
+ width: 20,
44
+ height: 20
45
+ }),
46
+ ...(theme.palette.mode === 'dark' && {
47
+ border: `1px solid ${gray[700]}`,
48
+ '&.Mui-active': {
49
+ border: 'none',
50
+ color: theme.palette.primary.light
51
+ },
52
+ '&.Mui-completed': {
53
+ border: 'none',
54
+ color: theme.palette.success.light
55
+ },
56
+ ...(ownerState.variant === 'shadow' && {
57
+ boxShadow: theme.shadows[2]
58
+ })
59
+ })
60
+ })
59
61
  }
60
62
  }
61
63
  }
62
- });
64
+ };
63
65
  }
@@ -1,19 +1,18 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = getCheckoutTheme;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
7
  function getCheckoutTheme(mode) {
10
- return (0, _extends2.default)({}, getDesignTokens(mode), {
8
+ return {
9
+ ...getDesignTokens(mode),
11
10
  components: {
12
11
  MuiStepIcon: {
13
12
  styleOverrides: {
14
13
  root: ({
15
14
  theme
16
- }) => (0, _extends2.default)({
15
+ }) => ({
17
16
  color: 'transparent',
18
17
  border: `1px solid ${gray[400]}`,
19
18
  width: 12,
@@ -29,18 +28,18 @@ function getCheckoutTheme(mode) {
29
28
  '&.Mui-completed': {
30
29
  border: 'none',
31
30
  color: theme.palette.success.main
32
- }
33
- }, theme.applyStyles("dark", {
34
- border: `1px solid ${gray[700]}`,
35
- '&.Mui-active': {
36
- border: 'none',
37
- color: theme.palette.primary.light
38
31
  },
39
- '&.Mui-completed': {
40
- border: 'none',
41
- color: theme.palette.success.light
42
- }
43
- }), {
32
+ ...theme.applyStyles("dark", {
33
+ border: `1px solid ${gray[700]}`,
34
+ '&.Mui-active': {
35
+ border: 'none',
36
+ color: theme.palette.primary.light
37
+ },
38
+ '&.Mui-completed': {
39
+ border: 'none',
40
+ color: theme.palette.success.light
41
+ }
42
+ }),
44
43
  variants: [{
45
44
  props: {
46
45
  size: 'large'
@@ -53,9 +52,11 @@ function getCheckoutTheme(mode) {
53
52
  props: {
54
53
  variant: 'shadow'
55
54
  },
56
- style: (0, _extends2.default)({}, theme.applyStyles("dark", {
57
- boxShadow: theme.shadows[2]
58
- }))
55
+ style: {
56
+ ...theme.applyStyles("dark", {
57
+ boxShadow: theme.shadows[2]
58
+ })
59
+ }
59
60
  }, {
60
61
  props: {
61
62
  completed: true
@@ -69,5 +70,5 @@ function getCheckoutTheme(mode) {
69
70
  }
70
71
  }
71
72
  }
72
- });
73
+ };
73
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/codemod",
3
- "version": "6.0.0-alpha.7",
3
+ "version": "6.0.0-alpha.8",
4
4
  "bin": "./codemod.js",
5
5
  "private": false,
6
6
  "author": "MUI Team",