@mui/codemod 6.0.0-alpha.6 → 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 +125 -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 +6 -0
- package/node/deprecations/all/postcss.config.js +4 -1
- package/node/deprecations/autocomplete-props/autocomplete-props.js +54 -0
- package/node/deprecations/autocomplete-props/index.js +13 -0
- package/node/deprecations/autocomplete-props/test-cases/actual.js +97 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +103 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.actual.js +65 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +69 -0
- package/node/deprecations/avatar-props/test-cases/expected.js +8 -6
- package/node/deprecations/avatar-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/backdrop-props/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/circular-progress-classes/circular-progress-classes.js +77 -0
- package/node/deprecations/circular-progress-classes/index.js +13 -0
- package/node/deprecations/circular-progress-classes/postcss-plugin.js +33 -0
- package/node/deprecations/circular-progress-classes/postcss.config.js +8 -0
- package/node/deprecations/circular-progress-classes/test-cases/actual.js +7 -0
- package/node/deprecations/circular-progress-classes/test-cases/expected.js +7 -0
- package/node/deprecations/divider-props/divider-props.js +36 -30
- package/node/deprecations/divider-props/test-cases/actual.js +3 -0
- package/node/deprecations/divider-props/test-cases/expected.js +3 -0
- package/node/deprecations/divider-props/test-cases/theme.actual.js +7 -0
- package/node/deprecations/divider-props/test-cases/theme.expected.js +7 -0
- 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 +5 -5
|
@@ -1,30 +1,30 @@
|
|
|
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
|
-
|
|
23
|
+
},
|
|
24
|
+
...(theme.palette.mode === 'dark' && {
|
|
25
|
+
backgroundColor: `${alpha(orange[900], 0.5)}`,
|
|
26
|
+
border: `1px solid ${alpha(orange[800], 0.5)}`
|
|
27
|
+
})
|
|
28
28
|
})
|
|
29
29
|
}
|
|
30
30
|
},
|
|
@@ -49,110 +49,123 @@ function getCheckoutTheme(mode) {
|
|
|
49
49
|
root: ({
|
|
50
50
|
theme,
|
|
51
51
|
ownerState
|
|
52
|
-
}) => (
|
|
52
|
+
}) => ({
|
|
53
53
|
boxShadow: 'none',
|
|
54
54
|
borderRadius: theme.shape.borderRadius,
|
|
55
|
-
textTransform: 'none'
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
'
|
|
96
|
-
backgroundColor: alpha(gray[300], 0.
|
|
55
|
+
textTransform: 'none',
|
|
56
|
+
...(ownerState.size === 'small' && {
|
|
57
|
+
height: '2rem',
|
|
58
|
+
// 32px
|
|
59
|
+
padding: '0 0.5rem'
|
|
60
|
+
}),
|
|
61
|
+
...(ownerState.size === 'medium' && {
|
|
62
|
+
height: '2.5rem' // 40px
|
|
63
|
+
}),
|
|
64
|
+
...(ownerState.variant === 'contained' && ownerState.color === 'primary' && {
|
|
65
|
+
color: 'white',
|
|
66
|
+
backgroundColor: brand[300],
|
|
67
|
+
backgroundImage: `linear-gradient(to bottom, ${alpha(brand[400], 0.8)}, ${brand[500]})`,
|
|
68
|
+
boxShadow: `inset 0 2px 0 ${alpha(brand[200], 0.2)}, inset 0 -2px 0 ${alpha(brand[700], 0.4)}`,
|
|
69
|
+
border: `1px solid ${brand[500]}`,
|
|
70
|
+
'&:hover': {
|
|
71
|
+
backgroundColor: brand[700],
|
|
72
|
+
boxShadow: 'none'
|
|
73
|
+
},
|
|
74
|
+
'&:active': {
|
|
75
|
+
backgroundColor: brand[700],
|
|
76
|
+
boxShadow: `inset 0 2.5px 0 ${alpha(brand[700], 0.4)}`
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
...(ownerState.variant === 'outlined' && {
|
|
80
|
+
color: brand[700],
|
|
81
|
+
backgroundColor: alpha(brand[300], 0.1),
|
|
82
|
+
borderColor: alpha(brand[200], 0.8),
|
|
83
|
+
boxShadow: `inset 0 2px ${alpha(brand[50], 0.5)}, inset 0 -2px ${alpha(brand[200], 0.2)}`,
|
|
84
|
+
'&:hover': {
|
|
85
|
+
backgroundColor: alpha(brand[300], 0.2),
|
|
86
|
+
borderColor: alpha(brand[300], 0.5),
|
|
87
|
+
boxShadow: 'none'
|
|
88
|
+
},
|
|
89
|
+
'&:active': {
|
|
90
|
+
backgroundColor: alpha(brand[300], 0.3),
|
|
91
|
+
boxShadow: `inset 0 2.5px 0 ${alpha(brand[400], 0.2)}`,
|
|
92
|
+
backgroundImage: 'none'
|
|
93
|
+
}
|
|
94
|
+
}),
|
|
95
|
+
...(ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
|
|
96
|
+
backgroundColor: alpha(gray[300], 0.1),
|
|
97
97
|
borderColor: alpha(gray[300], 0.5),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
color
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
98
|
+
color: gray[700],
|
|
99
|
+
'&:hover': {
|
|
100
|
+
backgroundColor: alpha(gray[300], 0.3),
|
|
101
|
+
borderColor: alpha(gray[300], 0.5),
|
|
102
|
+
boxShadow: 'none'
|
|
103
|
+
},
|
|
104
|
+
'&:active': {
|
|
105
|
+
backgroundColor: alpha(gray[300], 0.4),
|
|
106
|
+
boxShadow: `inset 0 2.5px 0 ${alpha(gray[400], 0.2)}`,
|
|
107
|
+
backgroundImage: 'none'
|
|
108
|
+
}
|
|
109
|
+
}),
|
|
110
|
+
...(ownerState.variant === 'text' && ownerState.color === 'primary' && {
|
|
111
|
+
color: brand[700],
|
|
112
|
+
'&:hover': {
|
|
113
|
+
backgroundColor: alpha(brand[300], 0.3)
|
|
114
|
+
}
|
|
115
|
+
}),
|
|
116
|
+
...(ownerState.variant === 'text' && ownerState.color === 'info' && {
|
|
117
|
+
color: gray[700],
|
|
118
|
+
'&:hover': {
|
|
119
|
+
backgroundColor: alpha(gray[300], 0.3)
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
...(theme.palette.mode === 'dark' && {
|
|
123
|
+
...(ownerState.variant === 'outlined' && {
|
|
124
|
+
color: brand[200],
|
|
125
|
+
backgroundColor: alpha(brand[600], 0.1),
|
|
126
|
+
borderColor: alpha(brand[600], 0.6),
|
|
127
|
+
boxShadow: `inset 0 2.5px ${alpha(brand[400], 0.1)}, inset 0 -2px ${alpha(gray[900], 0.5)}`,
|
|
128
|
+
'&:hover': {
|
|
129
|
+
backgroundColor: alpha(brand[700], 0.2),
|
|
130
|
+
borderColor: alpha(brand[700], 0.5),
|
|
131
|
+
boxShadow: 'none'
|
|
132
|
+
},
|
|
133
|
+
'&:active': {
|
|
134
|
+
backgroundColor: alpha(brand[800], 0.2),
|
|
135
|
+
boxShadow: `inset 0 2.5px 0 ${alpha(brand[900], 0.4)}`,
|
|
136
|
+
backgroundImage: 'none'
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
139
|
+
...(ownerState.variant === 'text' && ownerState.color === 'info' && {
|
|
140
|
+
color: gray[200],
|
|
141
|
+
'&:hover': {
|
|
142
|
+
backgroundColor: alpha(gray[700], 0.3)
|
|
143
|
+
}
|
|
144
|
+
}),
|
|
145
|
+
...(ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
|
|
146
|
+
color: gray[300],
|
|
147
|
+
backgroundColor: alpha(gray[600], 0.1),
|
|
148
|
+
borderColor: alpha(gray[700], 0.5),
|
|
149
|
+
boxShadow: `inset 0 2.5px ${alpha(gray[600], 0.1)}, inset 0 -2px ${alpha(gray[900], 0.5)}`,
|
|
150
|
+
'&:hover': {
|
|
151
|
+
backgroundColor: alpha(gray[700], 0.2),
|
|
152
|
+
borderColor: alpha(gray[700], 0.5),
|
|
153
|
+
boxShadow: 'none'
|
|
154
|
+
},
|
|
155
|
+
'&:active': {
|
|
156
|
+
backgroundColor: alpha(gray[800], 0.2),
|
|
157
|
+
boxShadow: `inset 0 2.5px 0 ${alpha(gray[900], 0.4)}`,
|
|
158
|
+
backgroundImage: 'none'
|
|
159
|
+
}
|
|
160
|
+
}),
|
|
161
|
+
...(ownerState.variant === 'text' && ownerState.color === 'primary' && {
|
|
162
|
+
color: brand[200],
|
|
163
|
+
'&:hover': {
|
|
164
|
+
backgroundColor: alpha(brand[700], 0.3)
|
|
165
|
+
}
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
})
|
|
156
169
|
}
|
|
157
170
|
},
|
|
158
171
|
MuiCard: {
|
|
@@ -160,24 +173,27 @@ function getCheckoutTheme(mode) {
|
|
|
160
173
|
root: ({
|
|
161
174
|
theme,
|
|
162
175
|
ownerState
|
|
163
|
-
}) => (
|
|
176
|
+
}) => ({
|
|
164
177
|
transition: 'all 100ms ease',
|
|
165
178
|
backgroundColor: gray[50],
|
|
166
179
|
borderRadius: theme.shape.borderRadius,
|
|
167
180
|
border: `1px solid ${alpha(gray[200], 0.5)}`,
|
|
168
|
-
boxShadow: 'none'
|
|
169
|
-
}, ownerState.variant === 'outlined' && {
|
|
170
|
-
border: `1px solid ${gray[200]}`,
|
|
171
181
|
boxShadow: 'none',
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
182
|
+
...(ownerState.variant === 'outlined' && {
|
|
183
|
+
border: `1px solid ${gray[200]}`,
|
|
184
|
+
boxShadow: 'none',
|
|
185
|
+
background: `linear-gradient(to bottom, hsl(0, 0%, 100%), ${gray[50]})`
|
|
186
|
+
}),
|
|
187
|
+
...(theme.palette.mode === 'dark' && {
|
|
188
|
+
backgroundColor: alpha(gray[800], 0.6),
|
|
189
|
+
border: `1px solid ${alpha(gray[700], 0.3)}`,
|
|
190
|
+
...(ownerState.variant === 'outlined' && {
|
|
191
|
+
border: `1px solid ${alpha(gray[700], 0.4)}`,
|
|
192
|
+
boxShadow: 'none',
|
|
193
|
+
background: `linear-gradient(to bottom, ${gray[900]}, ${alpha(gray[800], 0.5)})`
|
|
194
|
+
})
|
|
195
|
+
})
|
|
196
|
+
})
|
|
181
197
|
}
|
|
182
198
|
},
|
|
183
199
|
MuiCheckbox: {
|
|
@@ -198,7 +214,7 @@ function getCheckoutTheme(mode) {
|
|
|
198
214
|
styleOverrides: {
|
|
199
215
|
root: ({
|
|
200
216
|
theme
|
|
201
|
-
}) => (
|
|
217
|
+
}) => ({
|
|
202
218
|
margin: 10,
|
|
203
219
|
height: 16,
|
|
204
220
|
width: 16,
|
|
@@ -224,19 +240,20 @@ function getCheckoutTheme(mode) {
|
|
|
224
240
|
'&:hover': {
|
|
225
241
|
backgroundColor: brand[600]
|
|
226
242
|
}
|
|
227
|
-
}
|
|
228
|
-
}, theme.palette.mode === 'dark' && {
|
|
229
|
-
borderColor: alpha(gray[700], 0.5),
|
|
230
|
-
boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
|
|
231
|
-
backgroundColor: alpha(gray[900], 0.8),
|
|
232
|
-
'&:hover': {
|
|
233
|
-
borderColor: brand[300]
|
|
234
243
|
},
|
|
235
|
-
'
|
|
236
|
-
borderColor:
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
244
|
+
...(theme.palette.mode === 'dark' && {
|
|
245
|
+
borderColor: alpha(gray[700], 0.5),
|
|
246
|
+
boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
|
|
247
|
+
backgroundColor: alpha(gray[900], 0.8),
|
|
248
|
+
'&:hover': {
|
|
249
|
+
borderColor: brand[300]
|
|
250
|
+
},
|
|
251
|
+
'&.Mui-focusVisible': {
|
|
252
|
+
borderColor: brand[400],
|
|
253
|
+
outline: `3px solid ${alpha(brand[500], 0.5)}`,
|
|
254
|
+
outlineOffset: '2px'
|
|
255
|
+
}
|
|
256
|
+
})
|
|
240
257
|
})
|
|
241
258
|
}
|
|
242
259
|
},
|
|
@@ -244,10 +261,11 @@ function getCheckoutTheme(mode) {
|
|
|
244
261
|
styleOverrides: {
|
|
245
262
|
root: ({
|
|
246
263
|
theme
|
|
247
|
-
}) => (
|
|
248
|
-
borderColor: `${alpha(gray[200], 0.8)}
|
|
249
|
-
|
|
250
|
-
|
|
264
|
+
}) => ({
|
|
265
|
+
borderColor: `${alpha(gray[200], 0.8)}`,
|
|
266
|
+
...(theme.palette.mode === 'dark' && {
|
|
267
|
+
borderColor: `${alpha(gray[700], 0.4)}`
|
|
268
|
+
})
|
|
251
269
|
})
|
|
252
270
|
}
|
|
253
271
|
},
|
|
@@ -266,24 +284,27 @@ function getCheckoutTheme(mode) {
|
|
|
266
284
|
root: ({
|
|
267
285
|
theme,
|
|
268
286
|
ownerState
|
|
269
|
-
}) => (
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
287
|
+
}) => ({
|
|
288
|
+
...(ownerState.size === 'small' && {
|
|
289
|
+
height: '2rem',
|
|
290
|
+
width: '2rem'
|
|
291
|
+
}),
|
|
292
|
+
...(ownerState.size === 'medium' && {
|
|
293
|
+
height: '2.5rem',
|
|
294
|
+
width: '2.5rem'
|
|
295
|
+
}),
|
|
276
296
|
color: brand[500],
|
|
277
297
|
'&:hover': {
|
|
278
298
|
backgroundColor: alpha(brand[300], 0.3),
|
|
279
299
|
borderColor: brand[200]
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
300
|
+
},
|
|
301
|
+
...(theme.palette.mode === 'dark' && {
|
|
302
|
+
color: brand[200],
|
|
303
|
+
'&:hover': {
|
|
304
|
+
backgroundColor: alpha(brand[600], 0.3),
|
|
305
|
+
borderColor: brand[700]
|
|
306
|
+
}
|
|
307
|
+
})
|
|
287
308
|
})
|
|
288
309
|
}
|
|
289
310
|
},
|
|
@@ -301,7 +322,7 @@ function getCheckoutTheme(mode) {
|
|
|
301
322
|
styleOverrides: {
|
|
302
323
|
root: ({
|
|
303
324
|
theme
|
|
304
|
-
}) => (
|
|
325
|
+
}) => ({
|
|
305
326
|
color: brand[700],
|
|
306
327
|
fontWeight: 500,
|
|
307
328
|
position: 'relative',
|
|
@@ -325,9 +346,10 @@ function getCheckoutTheme(mode) {
|
|
|
325
346
|
outline: `3px solid ${alpha(brand[500], 0.5)}`,
|
|
326
347
|
outlineOffset: '4px',
|
|
327
348
|
borderRadius: '2px'
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
349
|
+
},
|
|
350
|
+
...(theme.palette.mode === 'dark' && {
|
|
351
|
+
color: brand[200]
|
|
352
|
+
})
|
|
331
353
|
})
|
|
332
354
|
}
|
|
333
355
|
},
|
|
@@ -342,7 +364,7 @@ function getCheckoutTheme(mode) {
|
|
|
342
364
|
root: ({
|
|
343
365
|
theme,
|
|
344
366
|
ownerState
|
|
345
|
-
}) => (
|
|
367
|
+
}) => ({
|
|
346
368
|
'input:-webkit-autofill': {
|
|
347
369
|
WebkitBoxShadow: `0 0 0 1000px ${brand[100]} inset, 0 0 0 1px ${brand[200]}`,
|
|
348
370
|
maxHeight: '4px',
|
|
@@ -371,45 +393,48 @@ function getCheckoutTheme(mode) {
|
|
|
371
393
|
outline: `3px solid ${alpha(brand[500], 0.5)}`,
|
|
372
394
|
outlineOffset: '2px',
|
|
373
395
|
borderColor: brand[400]
|
|
374
|
-
}
|
|
375
|
-
}, ownerState.color === 'error' && {
|
|
376
|
-
borderColor: red[200],
|
|
377
|
-
color: red[500],
|
|
378
|
-
'& + .MuiFormHelperText-root': {
|
|
379
|
-
color: red[500]
|
|
380
|
-
}
|
|
381
|
-
}, theme.palette.mode === 'dark' && (0, _extends2.default)({
|
|
382
|
-
'input:-webkit-autofill': {
|
|
383
|
-
WebkitBoxShadow: `0 0 0 1000px ${brand[900]} inset, 0 0 0 1px ${brand[600]}`,
|
|
384
|
-
maxHeight: '6px',
|
|
385
|
-
borderRadius: '8px'
|
|
386
396
|
},
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
color:
|
|
397
|
+
...(ownerState.color === 'error' && {
|
|
398
|
+
borderColor: red[200],
|
|
399
|
+
color: red[500],
|
|
400
|
+
'& + .MuiFormHelperText-root': {
|
|
401
|
+
color: red[500]
|
|
392
402
|
}
|
|
393
|
-
},
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
403
|
+
}),
|
|
404
|
+
...(theme.palette.mode === 'dark' && {
|
|
405
|
+
'input:-webkit-autofill': {
|
|
406
|
+
WebkitBoxShadow: `0 0 0 1000px ${brand[900]} inset, 0 0 0 1px ${brand[600]}`,
|
|
407
|
+
maxHeight: '6px',
|
|
408
|
+
borderRadius: '8px'
|
|
409
|
+
},
|
|
410
|
+
'& .MuiInputBase-input': {
|
|
411
|
+
fontSize: '1rem',
|
|
412
|
+
'&::placeholder': {
|
|
413
|
+
opacity: 1,
|
|
414
|
+
color: gray[500]
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
borderColor: alpha(gray[700], 0.5),
|
|
418
|
+
boxShadow: '0 0 0 1.5px hsl(210, 0%, 0%) inset',
|
|
419
|
+
backgroundColor: alpha(gray[900], 0.8),
|
|
420
|
+
transition: 'border-color 120ms ease-in',
|
|
421
|
+
'&:hover': {
|
|
422
|
+
borderColor: brand[300]
|
|
423
|
+
},
|
|
424
|
+
'&.Mui-focused': {
|
|
425
|
+
borderColor: brand[400],
|
|
426
|
+
outline: `3px solid ${alpha(brand[500], 0.5)}`,
|
|
427
|
+
outlineOffset: '2px'
|
|
428
|
+
},
|
|
429
|
+
...(ownerState.color === 'error' && {
|
|
430
|
+
borderColor: red[700],
|
|
431
|
+
color: red[300],
|
|
432
|
+
'& + .MuiFormHelperText-root': {
|
|
433
|
+
color: red[300]
|
|
434
|
+
}
|
|
435
|
+
})
|
|
436
|
+
})
|
|
437
|
+
})
|
|
413
438
|
}
|
|
414
439
|
},
|
|
415
440
|
MuiPaper: {
|
|
@@ -447,7 +472,7 @@ function getCheckoutTheme(mode) {
|
|
|
447
472
|
styleOverrides: {
|
|
448
473
|
root: ({
|
|
449
474
|
theme
|
|
450
|
-
}) => (
|
|
475
|
+
}) => ({
|
|
451
476
|
color: 'transparent',
|
|
452
477
|
border: `1px solid ${gray[400]}`,
|
|
453
478
|
width: 12,
|
|
@@ -463,17 +488,18 @@ function getCheckoutTheme(mode) {
|
|
|
463
488
|
'&.Mui-completed': {
|
|
464
489
|
border: 'none',
|
|
465
490
|
color: theme.palette.success.main
|
|
466
|
-
}
|
|
467
|
-
}, theme.palette.mode === 'dark' && {
|
|
468
|
-
border: `1px solid ${gray[700]}`,
|
|
469
|
-
'&.Mui-active': {
|
|
470
|
-
border: 'none',
|
|
471
|
-
color: theme.palette.primary.light
|
|
472
491
|
},
|
|
473
|
-
'
|
|
474
|
-
border:
|
|
475
|
-
|
|
476
|
-
|
|
492
|
+
...(theme.palette.mode === 'dark' && {
|
|
493
|
+
border: `1px solid ${gray[700]}`,
|
|
494
|
+
'&.Mui-active': {
|
|
495
|
+
border: 'none',
|
|
496
|
+
color: theme.palette.primary.light
|
|
497
|
+
},
|
|
498
|
+
'&.Mui-completed': {
|
|
499
|
+
border: 'none',
|
|
500
|
+
color: theme.palette.success.light
|
|
501
|
+
}
|
|
502
|
+
})
|
|
477
503
|
})
|
|
478
504
|
}
|
|
479
505
|
},
|
|
@@ -482,11 +508,12 @@ function getCheckoutTheme(mode) {
|
|
|
482
508
|
label: ({
|
|
483
509
|
theme
|
|
484
510
|
}) => ({
|
|
485
|
-
'&.Mui-completed':
|
|
486
|
-
opacity: 0.6
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
511
|
+
'&.Mui-completed': {
|
|
512
|
+
opacity: 0.6,
|
|
513
|
+
...(theme.palette.mode === 'dark' && {
|
|
514
|
+
opacity: 0.5
|
|
515
|
+
})
|
|
516
|
+
}
|
|
490
517
|
})
|
|
491
518
|
}
|
|
492
519
|
},
|
|
@@ -494,17 +521,18 @@ function getCheckoutTheme(mode) {
|
|
|
494
521
|
styleOverrides: {
|
|
495
522
|
root: ({
|
|
496
523
|
theme
|
|
497
|
-
}) => (
|
|
524
|
+
}) => ({
|
|
498
525
|
borderRadius: theme.shape.borderRadius,
|
|
499
526
|
boxShadow: `0 1px 2px hsla(210, 0%, 0%, 0.05), 0 2px 12px ${alpha(brand[200], 0.5)}`,
|
|
500
527
|
'& .Mui-selected': {
|
|
501
528
|
color: brand[500]
|
|
502
|
-
}
|
|
503
|
-
}, theme.palette.mode === 'dark' && {
|
|
504
|
-
'& .Mui-selected': {
|
|
505
|
-
color: 'hsl(0, 0%, 100%)'
|
|
506
529
|
},
|
|
507
|
-
|
|
530
|
+
...(theme.palette.mode === 'dark' && {
|
|
531
|
+
'& .Mui-selected': {
|
|
532
|
+
color: 'hsl(0, 0%, 100%)'
|
|
533
|
+
},
|
|
534
|
+
boxShadow: `0 0 0 1px hsla(210, 0%, 0%, 0.5), 0 2px 12px ${alpha(brand[700], 0.5)}`
|
|
535
|
+
})
|
|
508
536
|
})
|
|
509
537
|
}
|
|
510
538
|
},
|
|
@@ -512,19 +540,20 @@ function getCheckoutTheme(mode) {
|
|
|
512
540
|
styleOverrides: {
|
|
513
541
|
root: ({
|
|
514
542
|
theme
|
|
515
|
-
}) => (
|
|
543
|
+
}) => ({
|
|
516
544
|
padding: '12px 16px',
|
|
517
545
|
textTransform: 'none',
|
|
518
546
|
borderRadius: theme.shape.borderRadius,
|
|
519
|
-
fontWeight: 500
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
547
|
+
fontWeight: 500,
|
|
548
|
+
...(theme.palette.mode === 'dark' && {
|
|
549
|
+
color: gray[400],
|
|
550
|
+
'&.Mui-selected': {
|
|
551
|
+
color: brand[300]
|
|
552
|
+
}
|
|
553
|
+
})
|
|
525
554
|
})
|
|
526
555
|
}
|
|
527
556
|
}
|
|
528
557
|
}
|
|
529
|
-
}
|
|
558
|
+
};
|
|
530
559
|
}
|