@paypal/checkout-components 5.0.421 → 5.0.422-alpha-04293bf.0
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/dist/button.js +1 -1
- package/dist/test/button.js +1 -1
- package/package.json +1 -1
- package/src/funding/paylater/config.jsx +7 -0
- package/src/ui/buttons/styles/styleUtils.js +2 -0
- package/src/ui/buttons/styles/styleUtils.test.constants.js +731 -0
- package/src/ui/buttons/styles/styleUtils.test.js +190 -602
|
@@ -0,0 +1,731 @@
|
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
BUTTON_SIZE_STYLE,
|
|
5
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE,
|
|
6
|
+
BUTTON_REDESIGN_STYLE,
|
|
7
|
+
} from "../config";
|
|
8
|
+
import {
|
|
9
|
+
BUTTON_SIZE,
|
|
10
|
+
BUTTON_REDESIGN_SIZE,
|
|
11
|
+
BUTTON_DISABLE_MAX_HEIGHT_SIZE,
|
|
12
|
+
} from "../../../constants/button";
|
|
13
|
+
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// LEGACY RESPONSIVE STYLES
|
|
16
|
+
// ============================================================================
|
|
17
|
+
|
|
18
|
+
// expected legacy responsive styles variables
|
|
19
|
+
const expectedLegacyResponsiveStylesTiny = {
|
|
20
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.TINY],
|
|
21
|
+
buttonHeight: 25,
|
|
22
|
+
minDualWidth: 300,
|
|
23
|
+
textPercPercentage: 36,
|
|
24
|
+
smallerLabelHeight: 14,
|
|
25
|
+
labelHeight: 14,
|
|
26
|
+
pillBorderRadius: 13,
|
|
27
|
+
gap: 3,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const expectedLegacyResponsiveStylesSmall = {
|
|
31
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.SMALL],
|
|
32
|
+
buttonHeight: 25,
|
|
33
|
+
minDualWidth: 300,
|
|
34
|
+
textPercPercentage: 36,
|
|
35
|
+
smallerLabelHeight: 14,
|
|
36
|
+
labelHeight: 14,
|
|
37
|
+
pillBorderRadius: 13,
|
|
38
|
+
gap: 3,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const expectedLegacyResponsiveStylesMedium = {
|
|
42
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.MEDIUM],
|
|
43
|
+
buttonHeight: 35,
|
|
44
|
+
minDualWidth: 300,
|
|
45
|
+
textPercPercentage: 36,
|
|
46
|
+
smallerLabelHeight: 18,
|
|
47
|
+
labelHeight: 18,
|
|
48
|
+
pillBorderRadius: 18,
|
|
49
|
+
gap: 4,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const expectedLegacyResponsiveStylesLarge = {
|
|
53
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.LARGE],
|
|
54
|
+
buttonHeight: 45,
|
|
55
|
+
minDualWidth: 300,
|
|
56
|
+
textPercPercentage: 36,
|
|
57
|
+
smallerLabelHeight: 22,
|
|
58
|
+
labelHeight: 22,
|
|
59
|
+
pillBorderRadius: 23,
|
|
60
|
+
gap: 5,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const expectedLegacyResponsiveStylesHuge = {
|
|
64
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.HUGE],
|
|
65
|
+
buttonHeight: 55,
|
|
66
|
+
minDualWidth: 300,
|
|
67
|
+
textPercPercentage: 36,
|
|
68
|
+
smallerLabelHeight: 24,
|
|
69
|
+
labelHeight: 24,
|
|
70
|
+
pillBorderRadius: 28,
|
|
71
|
+
gap: 6,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// ============================================================================
|
|
75
|
+
// RESIZE LABEL RESPONSIVE STYLES
|
|
76
|
+
// ============================================================================
|
|
77
|
+
|
|
78
|
+
// expected should resize = true responsive styles variables
|
|
79
|
+
const expectedResizeLabelResponsiveStylesTiny = {
|
|
80
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.TINY],
|
|
81
|
+
buttonHeight: 25,
|
|
82
|
+
minDualWidth: 300,
|
|
83
|
+
textPercPercentage: 32,
|
|
84
|
+
smallerLabelHeight: 14,
|
|
85
|
+
labelHeight: 14,
|
|
86
|
+
pillBorderRadius: 13,
|
|
87
|
+
gap: 3,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const expectedResizeLabelResponsiveStylesSmall = {
|
|
91
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.SMALL],
|
|
92
|
+
buttonHeight: 25,
|
|
93
|
+
minDualWidth: 300,
|
|
94
|
+
textPercPercentage: 32,
|
|
95
|
+
smallerLabelHeight: 14,
|
|
96
|
+
labelHeight: 14,
|
|
97
|
+
pillBorderRadius: 13,
|
|
98
|
+
gap: 3,
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const expectedResizeLabelResponsiveStylesMedium = {
|
|
102
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.MEDIUM],
|
|
103
|
+
buttonHeight: 35,
|
|
104
|
+
minDualWidth: 300,
|
|
105
|
+
textPercPercentage: 32,
|
|
106
|
+
smallerLabelHeight: 16,
|
|
107
|
+
labelHeight: 18,
|
|
108
|
+
pillBorderRadius: 18,
|
|
109
|
+
gap: 4,
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const expectedResizeLabelResponsiveStylesLarge = {
|
|
113
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.LARGE],
|
|
114
|
+
buttonHeight: 45,
|
|
115
|
+
minDualWidth: 300,
|
|
116
|
+
textPercPercentage: 32,
|
|
117
|
+
smallerLabelHeight: 20,
|
|
118
|
+
labelHeight: 22,
|
|
119
|
+
pillBorderRadius: 23,
|
|
120
|
+
gap: 5,
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const expectedResizeLabelResponsiveStylesHuge = {
|
|
124
|
+
style: BUTTON_SIZE_STYLE[BUTTON_SIZE.HUGE],
|
|
125
|
+
buttonHeight: 55,
|
|
126
|
+
minDualWidth: 300,
|
|
127
|
+
textPercPercentage: 32,
|
|
128
|
+
smallerLabelHeight: 24,
|
|
129
|
+
labelHeight: 24,
|
|
130
|
+
pillBorderRadius: 28,
|
|
131
|
+
gap: 6,
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// ============================================================================
|
|
135
|
+
// LEGACY DISABLE MAX HEIGHT STYLES
|
|
136
|
+
// ============================================================================
|
|
137
|
+
|
|
138
|
+
// DISABLE MAX HEIGHT TESTS
|
|
139
|
+
|
|
140
|
+
// expected legacy responsive styles variables
|
|
141
|
+
const expectedLegacyDisableMaxHeightStylesTiny = {
|
|
142
|
+
APMHeight: 18,
|
|
143
|
+
applePayHeight: 25,
|
|
144
|
+
buttonHeight: 25,
|
|
145
|
+
disableHeightStyle:
|
|
146
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.TINY],
|
|
147
|
+
labelHeight: 14,
|
|
148
|
+
fontSize: 10,
|
|
149
|
+
marginTop: 1,
|
|
150
|
+
pillBorderRadius: 13,
|
|
151
|
+
spinnerSize: 13,
|
|
152
|
+
gap: 3,
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const expectedLegacyDisableMaxHeightStylesSmall = {
|
|
156
|
+
APMHeight: 20,
|
|
157
|
+
applePayHeight: 29,
|
|
158
|
+
buttonHeight: 30,
|
|
159
|
+
disableHeightStyle:
|
|
160
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.SMALL],
|
|
161
|
+
labelHeight: 16,
|
|
162
|
+
fontSize: 11,
|
|
163
|
+
marginTop: 1,
|
|
164
|
+
pillBorderRadius: 15,
|
|
165
|
+
spinnerSize: 15,
|
|
166
|
+
gap: 3,
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const expectedLegacyDisableMaxHeightStylesMediumSmall = {
|
|
170
|
+
APMHeight: 23,
|
|
171
|
+
applePayHeight: 33,
|
|
172
|
+
buttonHeight: 35,
|
|
173
|
+
disableHeightStyle:
|
|
174
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[
|
|
175
|
+
BUTTON_DISABLE_MAX_HEIGHT_SIZE.MEDIUM_SMALL
|
|
176
|
+
],
|
|
177
|
+
labelHeight: 18,
|
|
178
|
+
fontSize: 13,
|
|
179
|
+
marginTop: 1,
|
|
180
|
+
pillBorderRadius: 18,
|
|
181
|
+
spinnerSize: 18,
|
|
182
|
+
gap: 4,
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const expectedLegacyDisableMaxHeightStylesMediumBig = {
|
|
186
|
+
APMHeight: 25,
|
|
187
|
+
applePayHeight: 37,
|
|
188
|
+
buttonHeight: 40,
|
|
189
|
+
disableHeightStyle:
|
|
190
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.MEDIUM_BIG],
|
|
191
|
+
labelHeight: 20,
|
|
192
|
+
fontSize: 14,
|
|
193
|
+
marginTop: 1,
|
|
194
|
+
pillBorderRadius: 20,
|
|
195
|
+
spinnerSize: 20,
|
|
196
|
+
gap: 4,
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
const expectedLegacyDisableMaxHeightStylesLargeSmall = {
|
|
200
|
+
APMHeight: 28,
|
|
201
|
+
applePayHeight: 41,
|
|
202
|
+
buttonHeight: 45,
|
|
203
|
+
disableHeightStyle:
|
|
204
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.LARGE_SMALL],
|
|
205
|
+
labelHeight: 22,
|
|
206
|
+
fontSize: 16,
|
|
207
|
+
marginTop: 2,
|
|
208
|
+
pillBorderRadius: 23,
|
|
209
|
+
spinnerSize: 23,
|
|
210
|
+
gap: 5,
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
const expectedLegacyDisableMaxHeightStylesLargeBig = {
|
|
214
|
+
APMHeight: 30,
|
|
215
|
+
applePayHeight: 45,
|
|
216
|
+
buttonHeight: 50,
|
|
217
|
+
disableHeightStyle:
|
|
218
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.LARGE_BIG],
|
|
219
|
+
labelHeight: 24,
|
|
220
|
+
fontSize: 18,
|
|
221
|
+
marginTop: 2,
|
|
222
|
+
pillBorderRadius: 25,
|
|
223
|
+
spinnerSize: 25,
|
|
224
|
+
gap: 5,
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const expectedLegacyDisableMaxHeightStylesXL = {
|
|
228
|
+
APMHeight: 33,
|
|
229
|
+
applePayHeight: 49,
|
|
230
|
+
buttonHeight: 55,
|
|
231
|
+
disableHeightStyle:
|
|
232
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XL],
|
|
233
|
+
labelHeight: 24,
|
|
234
|
+
fontSize: 20,
|
|
235
|
+
marginTop: 2,
|
|
236
|
+
pillBorderRadius: 28,
|
|
237
|
+
spinnerSize: 28,
|
|
238
|
+
gap: 6,
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const expectedLegacyDisableMaxHeightStylesXXL = {
|
|
242
|
+
APMHeight: 38,
|
|
243
|
+
applePayHeight: 57,
|
|
244
|
+
buttonHeight: 65,
|
|
245
|
+
disableHeightStyle:
|
|
246
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XXL],
|
|
247
|
+
labelHeight: 28,
|
|
248
|
+
fontSize: 23,
|
|
249
|
+
marginTop: 2,
|
|
250
|
+
pillBorderRadius: 33,
|
|
251
|
+
spinnerSize: 33,
|
|
252
|
+
gap: 7,
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
const expectedLegacyDisableMaxHeightStylesXXXL = {
|
|
256
|
+
APMHeight: 43,
|
|
257
|
+
applePayHeight: 65,
|
|
258
|
+
buttonHeight: 75,
|
|
259
|
+
disableHeightStyle:
|
|
260
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XXXL],
|
|
261
|
+
labelHeight: 32,
|
|
262
|
+
fontSize: 27,
|
|
263
|
+
marginTop: 3,
|
|
264
|
+
pillBorderRadius: 38,
|
|
265
|
+
spinnerSize: 38,
|
|
266
|
+
gap: 7,
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
// ============================================================================
|
|
270
|
+
// RESIZE LABEL DISABLE MAX HEIGHT STYLES
|
|
271
|
+
// ============================================================================
|
|
272
|
+
|
|
273
|
+
// expected shouldResizeLabel = true style variables for disable max height
|
|
274
|
+
const expectedResizeLabelDisableMaxHeightStylesTiny = {
|
|
275
|
+
APMHeight: 18,
|
|
276
|
+
applePayHeight: 25,
|
|
277
|
+
buttonHeight: 25,
|
|
278
|
+
disableHeightStyle:
|
|
279
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.TINY],
|
|
280
|
+
labelHeight: 14,
|
|
281
|
+
fontSize: 10,
|
|
282
|
+
marginTop: 1,
|
|
283
|
+
pillBorderRadius: 13,
|
|
284
|
+
spinnerSize: 13,
|
|
285
|
+
gap: 3,
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
const expectedResizeLabelDisableMaxHeightStylesSmall = {
|
|
289
|
+
APMHeight: 20,
|
|
290
|
+
applePayHeight: 29,
|
|
291
|
+
buttonHeight: 30,
|
|
292
|
+
disableHeightStyle:
|
|
293
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.SMALL],
|
|
294
|
+
labelHeight: 16,
|
|
295
|
+
fontSize: 10,
|
|
296
|
+
marginTop: 1,
|
|
297
|
+
pillBorderRadius: 15,
|
|
298
|
+
spinnerSize: 15,
|
|
299
|
+
gap: 3,
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
const expectedResizeLabelDisableMaxHeightStylesMediumSmall = {
|
|
303
|
+
APMHeight: 23,
|
|
304
|
+
applePayHeight: 33,
|
|
305
|
+
buttonHeight: 35,
|
|
306
|
+
disableHeightStyle:
|
|
307
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[
|
|
308
|
+
BUTTON_DISABLE_MAX_HEIGHT_SIZE.MEDIUM_SMALL
|
|
309
|
+
],
|
|
310
|
+
labelHeight: 16,
|
|
311
|
+
fontSize: 11,
|
|
312
|
+
marginTop: 1,
|
|
313
|
+
pillBorderRadius: 18,
|
|
314
|
+
spinnerSize: 18,
|
|
315
|
+
gap: 4,
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
const expectedResizeLabelDisableMaxHeightStylesMediumBig = {
|
|
319
|
+
APMHeight: 25,
|
|
320
|
+
applePayHeight: 37,
|
|
321
|
+
buttonHeight: 40,
|
|
322
|
+
disableHeightStyle:
|
|
323
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.MEDIUM_BIG],
|
|
324
|
+
labelHeight: 18,
|
|
325
|
+
fontSize: 13,
|
|
326
|
+
marginTop: 1,
|
|
327
|
+
pillBorderRadius: 20,
|
|
328
|
+
spinnerSize: 20,
|
|
329
|
+
gap: 4,
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
const expectedResizeLabelDisableMaxHeightStylesLargeSmall = {
|
|
333
|
+
APMHeight: 28,
|
|
334
|
+
applePayHeight: 41,
|
|
335
|
+
buttonHeight: 45,
|
|
336
|
+
disableHeightStyle:
|
|
337
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.LARGE_SMALL],
|
|
338
|
+
labelHeight: 20,
|
|
339
|
+
fontSize: 14,
|
|
340
|
+
marginTop: 1,
|
|
341
|
+
pillBorderRadius: 23,
|
|
342
|
+
spinnerSize: 23,
|
|
343
|
+
gap: 5,
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
const expectedResizeLabelDisableMaxHeightStylesLargeBig = {
|
|
347
|
+
APMHeight: 30,
|
|
348
|
+
applePayHeight: 45,
|
|
349
|
+
buttonHeight: 50,
|
|
350
|
+
disableHeightStyle:
|
|
351
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.LARGE_BIG],
|
|
352
|
+
labelHeight: 22,
|
|
353
|
+
fontSize: 16,
|
|
354
|
+
marginTop: 2,
|
|
355
|
+
pillBorderRadius: 25,
|
|
356
|
+
spinnerSize: 25,
|
|
357
|
+
gap: 5,
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
const expectedResizeLabelDisableMaxHeightStylesXL = {
|
|
361
|
+
APMHeight: 33,
|
|
362
|
+
applePayHeight: 49,
|
|
363
|
+
buttonHeight: 55,
|
|
364
|
+
disableHeightStyle:
|
|
365
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XL],
|
|
366
|
+
labelHeight: 24,
|
|
367
|
+
fontSize: 18,
|
|
368
|
+
marginTop: 2,
|
|
369
|
+
pillBorderRadius: 28,
|
|
370
|
+
spinnerSize: 28,
|
|
371
|
+
gap: 6,
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
const expectedResizeLabelDisableMaxHeightStylesXXL = {
|
|
375
|
+
APMHeight: 38,
|
|
376
|
+
applePayHeight: 57,
|
|
377
|
+
buttonHeight: 65,
|
|
378
|
+
disableHeightStyle:
|
|
379
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XXL],
|
|
380
|
+
labelHeight: 26,
|
|
381
|
+
fontSize: 21,
|
|
382
|
+
marginTop: 2,
|
|
383
|
+
pillBorderRadius: 33,
|
|
384
|
+
spinnerSize: 33,
|
|
385
|
+
gap: 7,
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
const expectedResizeLabelDisableMaxHeightStylesXXXL = {
|
|
389
|
+
APMHeight: 43,
|
|
390
|
+
applePayHeight: 65,
|
|
391
|
+
buttonHeight: 75,
|
|
392
|
+
disableHeightStyle:
|
|
393
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XXXL],
|
|
394
|
+
labelHeight: 30,
|
|
395
|
+
fontSize: 24,
|
|
396
|
+
marginTop: 2,
|
|
397
|
+
pillBorderRadius: 38,
|
|
398
|
+
spinnerSize: 38,
|
|
399
|
+
gap: 7,
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
// ============================================================================
|
|
403
|
+
// REBRAND DISABLE MAX HEIGHT STYLES
|
|
404
|
+
// ============================================================================
|
|
405
|
+
|
|
406
|
+
// expected rebrand disable max height responsive styles variables
|
|
407
|
+
// labelHeight = Math.round(height * REBRAND_LABEL_HEIGHT_RATIO) where ratio = 0.5
|
|
408
|
+
const expectedRebrandDisableMaxHeightStylesTiny = {
|
|
409
|
+
APMHeight: 18,
|
|
410
|
+
applePayHeight: 25,
|
|
411
|
+
buttonHeight: 25,
|
|
412
|
+
disableHeightStyle:
|
|
413
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.TINY],
|
|
414
|
+
labelHeight: 13,
|
|
415
|
+
fontSize: 10,
|
|
416
|
+
marginTop: 1,
|
|
417
|
+
pillBorderRadius: 13,
|
|
418
|
+
spinnerSize: 13,
|
|
419
|
+
gap: 3,
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
const expectedRebrandDisableMaxHeightStylesSmall = {
|
|
423
|
+
APMHeight: 20,
|
|
424
|
+
applePayHeight: 29,
|
|
425
|
+
buttonHeight: 30,
|
|
426
|
+
disableHeightStyle:
|
|
427
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.SMALL],
|
|
428
|
+
labelHeight: 15,
|
|
429
|
+
fontSize: 11,
|
|
430
|
+
marginTop: 1,
|
|
431
|
+
pillBorderRadius: 15,
|
|
432
|
+
spinnerSize: 15,
|
|
433
|
+
gap: 3,
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
const expectedRebrandDisableMaxHeightStylesMediumSmall = {
|
|
437
|
+
APMHeight: 23,
|
|
438
|
+
applePayHeight: 33,
|
|
439
|
+
buttonHeight: 35,
|
|
440
|
+
disableHeightStyle:
|
|
441
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[
|
|
442
|
+
BUTTON_DISABLE_MAX_HEIGHT_SIZE.MEDIUM_SMALL
|
|
443
|
+
],
|
|
444
|
+
labelHeight: 18,
|
|
445
|
+
fontSize: 13,
|
|
446
|
+
marginTop: 1,
|
|
447
|
+
pillBorderRadius: 18,
|
|
448
|
+
spinnerSize: 18,
|
|
449
|
+
gap: 4,
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
const expectedRebrandDisableMaxHeightStylesMediumBig = {
|
|
453
|
+
APMHeight: 25,
|
|
454
|
+
applePayHeight: 37,
|
|
455
|
+
buttonHeight: 40,
|
|
456
|
+
disableHeightStyle:
|
|
457
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.MEDIUM_BIG],
|
|
458
|
+
labelHeight: 20,
|
|
459
|
+
fontSize: 14,
|
|
460
|
+
marginTop: 1,
|
|
461
|
+
pillBorderRadius: 20,
|
|
462
|
+
spinnerSize: 20,
|
|
463
|
+
gap: 4,
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
const expectedRebrandDisableMaxHeightStylesLargeSmall = {
|
|
467
|
+
APMHeight: 28,
|
|
468
|
+
applePayHeight: 41,
|
|
469
|
+
buttonHeight: 45,
|
|
470
|
+
disableHeightStyle:
|
|
471
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.LARGE_SMALL],
|
|
472
|
+
labelHeight: 23,
|
|
473
|
+
fontSize: 16,
|
|
474
|
+
marginTop: 2,
|
|
475
|
+
pillBorderRadius: 23,
|
|
476
|
+
spinnerSize: 23,
|
|
477
|
+
gap: 5,
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
const expectedRebrandDisableMaxHeightStylesLargeBig = {
|
|
481
|
+
APMHeight: 30,
|
|
482
|
+
applePayHeight: 45,
|
|
483
|
+
buttonHeight: 50,
|
|
484
|
+
disableHeightStyle:
|
|
485
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.LARGE_BIG],
|
|
486
|
+
labelHeight: 25,
|
|
487
|
+
fontSize: 18,
|
|
488
|
+
marginTop: 2,
|
|
489
|
+
pillBorderRadius: 25,
|
|
490
|
+
spinnerSize: 25,
|
|
491
|
+
gap: 5,
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
const expectedRebrandDisableMaxHeightStylesXL = {
|
|
495
|
+
APMHeight: 33,
|
|
496
|
+
applePayHeight: 49,
|
|
497
|
+
buttonHeight: 55,
|
|
498
|
+
disableHeightStyle:
|
|
499
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XL],
|
|
500
|
+
labelHeight: 28,
|
|
501
|
+
fontSize: 20,
|
|
502
|
+
marginTop: 2,
|
|
503
|
+
pillBorderRadius: 28,
|
|
504
|
+
spinnerSize: 28,
|
|
505
|
+
gap: 6,
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
const expectedRebrandDisableMaxHeightStylesXXL = {
|
|
509
|
+
APMHeight: 38,
|
|
510
|
+
applePayHeight: 57,
|
|
511
|
+
buttonHeight: 65,
|
|
512
|
+
disableHeightStyle:
|
|
513
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XXL],
|
|
514
|
+
labelHeight: 33,
|
|
515
|
+
fontSize: 23,
|
|
516
|
+
marginTop: 2,
|
|
517
|
+
pillBorderRadius: 33,
|
|
518
|
+
spinnerSize: 33,
|
|
519
|
+
gap: 7,
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
const expectedRebrandDisableMaxHeightStylesXXXL = {
|
|
523
|
+
APMHeight: 43,
|
|
524
|
+
applePayHeight: 65,
|
|
525
|
+
buttonHeight: 75,
|
|
526
|
+
disableHeightStyle:
|
|
527
|
+
BUTTON_DISABLE_MAX_HEIGHT_STYLE[BUTTON_DISABLE_MAX_HEIGHT_SIZE.XXXL],
|
|
528
|
+
labelHeight: 38,
|
|
529
|
+
fontSize: 27,
|
|
530
|
+
marginTop: 3,
|
|
531
|
+
pillBorderRadius: 38,
|
|
532
|
+
spinnerSize: 38,
|
|
533
|
+
gap: 7,
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
// ============================================================================
|
|
537
|
+
// REBRANDED RESPONSIVE STYLES
|
|
538
|
+
// ============================================================================
|
|
539
|
+
|
|
540
|
+
// expected rebrand responsive styles variables
|
|
541
|
+
const expectedRebrandedResponsiveStylesExtraSmall = {
|
|
542
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.EXTRA_SMALL],
|
|
543
|
+
buttonHeight: 20,
|
|
544
|
+
gap: 3,
|
|
545
|
+
defaultHeight: 20,
|
|
546
|
+
minHeight: 20,
|
|
547
|
+
maxHeight: 30,
|
|
548
|
+
minWidth: 50,
|
|
549
|
+
minDualWidth: 300,
|
|
550
|
+
maxWidth: 75,
|
|
551
|
+
fontSize: 10,
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
const expectedRebrandedResponsiveStylesTiny = {
|
|
555
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.TINY],
|
|
556
|
+
buttonHeight: 25,
|
|
557
|
+
gap: 3,
|
|
558
|
+
defaultHeight: 25,
|
|
559
|
+
minHeight: 25,
|
|
560
|
+
maxHeight: 30,
|
|
561
|
+
minWidth: 75,
|
|
562
|
+
minDualWidth: 300,
|
|
563
|
+
maxWidth: 200,
|
|
564
|
+
fontSize: 10,
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
const expectedRebrandedResponsiveStylesSmall = {
|
|
568
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.SMALL],
|
|
569
|
+
buttonHeight: 35,
|
|
570
|
+
gap: 4,
|
|
571
|
+
defaultHeight: 35,
|
|
572
|
+
minHeight: 30,
|
|
573
|
+
maxHeight: 35,
|
|
574
|
+
minWidth: 200,
|
|
575
|
+
minDualWidth: 300,
|
|
576
|
+
maxWidth: 250,
|
|
577
|
+
fontSize: 12,
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
const expectedRebrandedResponsiveStylesMediumSmall = {
|
|
581
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.MEDIUM_SMALL],
|
|
582
|
+
buttonHeight: 35,
|
|
583
|
+
gap: 4,
|
|
584
|
+
defaultHeight: 35,
|
|
585
|
+
minHeight: 35,
|
|
586
|
+
maxHeight: 40,
|
|
587
|
+
minWidth: 250,
|
|
588
|
+
minDualWidth: 300,
|
|
589
|
+
maxWidth: 300,
|
|
590
|
+
fontSize: 14,
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
const expectedRebrandedResponsiveStylesMediumBig = {
|
|
594
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.MEDIUM_BIG],
|
|
595
|
+
buttonHeight: 45,
|
|
596
|
+
gap: 5,
|
|
597
|
+
defaultHeight: 45,
|
|
598
|
+
minHeight: 40,
|
|
599
|
+
maxHeight: 45,
|
|
600
|
+
minWidth: 300,
|
|
601
|
+
minDualWidth: 300,
|
|
602
|
+
maxWidth: 350,
|
|
603
|
+
fontSize: 14,
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
const expectedRebrandedResponsiveStylesLargeSmall = {
|
|
607
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.LARGE_SMALL],
|
|
608
|
+
buttonHeight: 45,
|
|
609
|
+
gap: 5,
|
|
610
|
+
defaultHeight: 45,
|
|
611
|
+
minHeight: 45,
|
|
612
|
+
maxHeight: 50,
|
|
613
|
+
minWidth: 350,
|
|
614
|
+
minDualWidth: 300,
|
|
615
|
+
maxWidth: 425,
|
|
616
|
+
fontSize: 16,
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
const expectedRebrandedResponsiveStylesLargeBig = {
|
|
620
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.LARGE_BIG],
|
|
621
|
+
buttonHeight: 50,
|
|
622
|
+
gap: 5,
|
|
623
|
+
defaultHeight: 50,
|
|
624
|
+
minHeight: 50,
|
|
625
|
+
maxHeight: 55,
|
|
626
|
+
minWidth: 425,
|
|
627
|
+
minDualWidth: 300,
|
|
628
|
+
maxWidth: 500,
|
|
629
|
+
fontSize: 18,
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
const expectedRebrandedResponsiveStylesXlSmall = {
|
|
633
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.XL_SMALL],
|
|
634
|
+
buttonHeight: 55,
|
|
635
|
+
gap: 6,
|
|
636
|
+
defaultHeight: 55,
|
|
637
|
+
minHeight: 55,
|
|
638
|
+
maxHeight: 60,
|
|
639
|
+
minWidth: 500,
|
|
640
|
+
minDualWidth: 300,
|
|
641
|
+
maxWidth: 750,
|
|
642
|
+
fontSize: 18,
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
const expectedRebrandedResponsiveStylesXlBig = {
|
|
646
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.XL_BIG],
|
|
647
|
+
buttonHeight: 55,
|
|
648
|
+
pillBorderRadius: 28,
|
|
649
|
+
gap: 7,
|
|
650
|
+
defaultHeight: 55,
|
|
651
|
+
minHeight: 60,
|
|
652
|
+
maxHeight: 65,
|
|
653
|
+
minWidth: 550,
|
|
654
|
+
minDualWidth: 300,
|
|
655
|
+
maxWidth: 650,
|
|
656
|
+
fontSize: 24,
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
const expectedRebrandedResponsiveStylesXXL = {
|
|
660
|
+
style: BUTTON_REDESIGN_STYLE[BUTTON_REDESIGN_SIZE.XXL],
|
|
661
|
+
buttonHeight: 55,
|
|
662
|
+
pillBorderRadius: 28,
|
|
663
|
+
gap: 7,
|
|
664
|
+
defaultHeight: 55,
|
|
665
|
+
minHeight: 65,
|
|
666
|
+
maxHeight: 100,
|
|
667
|
+
minWidth: 650,
|
|
668
|
+
minDualWidth: 300,
|
|
669
|
+
maxWidth: 750,
|
|
670
|
+
fontSize: 26,
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
// ============================================================================
|
|
674
|
+
// EXPORTS
|
|
675
|
+
// ============================================================================
|
|
676
|
+
|
|
677
|
+
export {
|
|
678
|
+
// Legacy Responsive Styles
|
|
679
|
+
expectedLegacyResponsiveStylesTiny,
|
|
680
|
+
expectedLegacyResponsiveStylesSmall,
|
|
681
|
+
expectedLegacyResponsiveStylesMedium,
|
|
682
|
+
expectedLegacyResponsiveStylesLarge,
|
|
683
|
+
expectedLegacyResponsiveStylesHuge,
|
|
684
|
+
// Resize Label Responsive Styles
|
|
685
|
+
expectedResizeLabelResponsiveStylesTiny,
|
|
686
|
+
expectedResizeLabelResponsiveStylesSmall,
|
|
687
|
+
expectedResizeLabelResponsiveStylesMedium,
|
|
688
|
+
expectedResizeLabelResponsiveStylesLarge,
|
|
689
|
+
expectedResizeLabelResponsiveStylesHuge,
|
|
690
|
+
// Legacy Disable Max Height Styles
|
|
691
|
+
expectedLegacyDisableMaxHeightStylesTiny,
|
|
692
|
+
expectedLegacyDisableMaxHeightStylesSmall,
|
|
693
|
+
expectedLegacyDisableMaxHeightStylesMediumSmall,
|
|
694
|
+
expectedLegacyDisableMaxHeightStylesMediumBig,
|
|
695
|
+
expectedLegacyDisableMaxHeightStylesLargeSmall,
|
|
696
|
+
expectedLegacyDisableMaxHeightStylesLargeBig,
|
|
697
|
+
expectedLegacyDisableMaxHeightStylesXL,
|
|
698
|
+
expectedLegacyDisableMaxHeightStylesXXL,
|
|
699
|
+
expectedLegacyDisableMaxHeightStylesXXXL,
|
|
700
|
+
// Resize Label Disable Max Height Styles
|
|
701
|
+
expectedResizeLabelDisableMaxHeightStylesTiny,
|
|
702
|
+
expectedResizeLabelDisableMaxHeightStylesSmall,
|
|
703
|
+
expectedResizeLabelDisableMaxHeightStylesMediumSmall,
|
|
704
|
+
expectedResizeLabelDisableMaxHeightStylesMediumBig,
|
|
705
|
+
expectedResizeLabelDisableMaxHeightStylesLargeSmall,
|
|
706
|
+
expectedResizeLabelDisableMaxHeightStylesLargeBig,
|
|
707
|
+
expectedResizeLabelDisableMaxHeightStylesXL,
|
|
708
|
+
expectedResizeLabelDisableMaxHeightStylesXXL,
|
|
709
|
+
expectedResizeLabelDisableMaxHeightStylesXXXL,
|
|
710
|
+
// Rebrand Disable Max Height Styles
|
|
711
|
+
expectedRebrandDisableMaxHeightStylesTiny,
|
|
712
|
+
expectedRebrandDisableMaxHeightStylesSmall,
|
|
713
|
+
expectedRebrandDisableMaxHeightStylesMediumSmall,
|
|
714
|
+
expectedRebrandDisableMaxHeightStylesMediumBig,
|
|
715
|
+
expectedRebrandDisableMaxHeightStylesLargeSmall,
|
|
716
|
+
expectedRebrandDisableMaxHeightStylesLargeBig,
|
|
717
|
+
expectedRebrandDisableMaxHeightStylesXL,
|
|
718
|
+
expectedRebrandDisableMaxHeightStylesXXL,
|
|
719
|
+
expectedRebrandDisableMaxHeightStylesXXXL,
|
|
720
|
+
// Rebranded Responsive Styles
|
|
721
|
+
expectedRebrandedResponsiveStylesExtraSmall,
|
|
722
|
+
expectedRebrandedResponsiveStylesTiny,
|
|
723
|
+
expectedRebrandedResponsiveStylesSmall,
|
|
724
|
+
expectedRebrandedResponsiveStylesMediumSmall,
|
|
725
|
+
expectedRebrandedResponsiveStylesMediumBig,
|
|
726
|
+
expectedRebrandedResponsiveStylesLargeSmall,
|
|
727
|
+
expectedRebrandedResponsiveStylesLargeBig,
|
|
728
|
+
expectedRebrandedResponsiveStylesXlSmall,
|
|
729
|
+
expectedRebrandedResponsiveStylesXlBig,
|
|
730
|
+
expectedRebrandedResponsiveStylesXXL,
|
|
731
|
+
};
|