@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.
- package/README.md +23 -0
- package/node/deprecations/accordion-props/test-cases/actual.js +6 -3
- package/node/deprecations/accordion-props/test-cases/expected.js +14 -10
- package/node/deprecations/accordion-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/alert-props/test-cases/expected.js +12 -4
- package/node/deprecations/alert-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/all/deprecations-all.js +2 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +8 -6
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/avatar-props/test-cases/expected.js +8 -6
- package/node/deprecations/avatar-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/backdrop-props/test-cases/actual.js +3 -2
- package/node/deprecations/backdrop-props/test-cases/expected.js +3 -3
- package/node/deprecations/badge-props/test-cases/expected.js +12 -5
- package/node/deprecations/badge-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/form-control-label-props/test-cases/expected.js +4 -2
- package/node/deprecations/form-control-label-props/test-cases/theme.expected.js +4 -3
- package/node/deprecations/slider-props/test-cases/expected.js +12 -4
- package/node/deprecations/slider-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/speed-dial-props/test-cases/actual.js +3 -2
- package/node/deprecations/speed-dial-props/test-cases/expected.js +3 -3
- package/node/deprecations/step-label-props/test-cases/expected.js +8 -3
- package/node/deprecations/step-label-props/test-cases/theme.expected.js +8 -4
- package/node/deprecations/text-field-props/index.js +13 -0
- package/node/deprecations/text-field-props/test-cases/actual.js +27 -0
- package/node/deprecations/text-field-props/test-cases/expected.js +31 -0
- package/node/deprecations/text-field-props/test-cases/theme.actual.js +13 -0
- package/node/deprecations/text-field-props/test-cases/theme.expected.js +15 -0
- package/node/deprecations/text-field-props/text-field-props.js +48 -0
- package/node/deprecations/utils/replaceComponentsWithSlots.js +29 -17
- package/node/util/migrateToVariants.js +50 -31
- package/node/v5.0.0/badge-overlap-value.test/actual.js +3 -4
- package/node/v5.0.0/badge-overlap-value.test/expected.js +3 -4
- package/node/v5.0.0/base-remove-component-prop.test/actual.js +4 -4
- package/node/v5.0.0/base-remove-component-prop.test/expected.js +4 -4
- package/node/v5.0.0/box-sx-prop.test/actual.js +4 -4
- package/node/v5.0.0/box-sx-prop.test/expected.js +3 -3
- package/node/v5.0.0/create-theme.test/custom-fn.actual.js +3 -4
- package/node/v5.0.0/create-theme.test/custom-fn.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/first.actual.js +11 -14
- package/node/v5.0.0/jss-to-styled.test/first.expected.js +11 -14
- package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +4 -4
- package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +4 -4
- package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +3 -4
- package/node/v5.0.0/jss-to-tss-react.test/actual-mixins-pattern.js +6 -5
- package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +6 -5
- package/node/v5.0.0/preset-safe.test/actual.js +6 -4
- package/node/v5.0.0/preset-safe.test/expected.js +9 -6
- package/node/v5.0.0/table-props.test/actual.js +4 -5
- package/node/v5.0.0/table-props.test/expected.js +4 -5
- package/node/v5.0.0/theme-spacing.test/large-actual.js +10 -10
- package/node/v5.0.0/theme-spacing.test/large-expected.js +10 -10
- package/node/v5.0.0/variant-prop.test/actual.js +12 -6
- package/node/v5.0.0/variant-prop.test/expected.js +15 -12
- package/node/v5.0.0/with-mobile-dialog.test/expected.js +6 -5
- package/node/v5.0.0/with-width.test/expected.js +6 -5
- package/node/v6.0.0/styled/test-cases/BasicStyled.actual.js +55 -44
- package/node/v6.0.0/styled/test-cases/BasicStyled.expected.js +5 -6
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.actual.js +80 -70
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +7 -6
- package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +32 -26
- package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +7 -6
- package/node/v6.0.0/styled/test-cases/ThemePaletteMode.expected.js +28 -26
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.actual.js +6 -5
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.expected.js +8 -8
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.actual.js +254 -225
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.expected.js +180 -162
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.actual.js +23 -21
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.expected.js +20 -19
- 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
|
|
9
|
+
return {
|
|
10
|
+
...getDesignTokens(mode),
|
|
12
11
|
components: {
|
|
13
12
|
MuiAlert: {
|
|
14
13
|
styleOverrides: {
|
|
15
14
|
root: ({
|
|
16
15
|
theme
|
|
17
|
-
}) => (
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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
|
-
}) => (
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
}) => (
|
|
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
|
-
|
|
309
|
-
borderColor:
|
|
310
|
-
|
|
311
|
-
|
|
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
|
-
}) => (
|
|
321
|
-
borderColor: `${alpha(gray[200], 0.8)}
|
|
322
|
-
|
|
323
|
-
|
|
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
|
-
}) => (
|
|
353
|
+
}) => ({
|
|
342
354
|
color: brand[500],
|
|
343
355
|
'&:hover': {
|
|
344
356
|
backgroundColor: alpha(brand[300], 0.3),
|
|
345
357
|
borderColor: brand[200]
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
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
|
-
}) => (
|
|
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
|
-
|
|
414
|
-
|
|
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
|
-
}) => (
|
|
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
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
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:
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
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
|
-
}) => (
|
|
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
|
-
|
|
560
|
-
border:
|
|
561
|
-
|
|
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':
|
|
582
|
-
opacity: 0.6
|
|
583
|
-
|
|
584
|
-
|
|
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
|
-
}) => (
|
|
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
|
-
|
|
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
|
-
}) => (
|
|
628
|
+
}) => ({
|
|
612
629
|
padding: '12px 16px',
|
|
613
630
|
textTransform: 'none',
|
|
614
631
|
borderRadius: theme.shape.borderRadius,
|
|
615
|
-
fontWeight: 500
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
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
|
|
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
|
-
}) => (
|
|
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
|
-
'
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
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
|
|
8
|
+
return {
|
|
9
|
+
...getDesignTokens(mode),
|
|
11
10
|
components: {
|
|
12
11
|
MuiStepIcon: {
|
|
13
12
|
styleOverrides: {
|
|
14
13
|
root: ({
|
|
15
14
|
theme
|
|
16
|
-
}) => (
|
|
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
|
-
|
|
40
|
-
border:
|
|
41
|
-
|
|
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:
|
|
57
|
-
|
|
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
|
}
|