@rebilly/instruments 3.13.4-beta.0 → 3.14.1-beta.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/README.md +1 -1
- package/dist/index.js +43 -66
- package/dist/index.min.js +43 -66
- package/package.json +3 -6
- package/src/functions/destroy.js +8 -2
- package/src/functions/mount/fetch-data.js +9 -2
- package/src/functions/mount/index.js +15 -10
- package/src/functions/mount/mount.spec.js +10 -11
- package/src/functions/mount/setup-framepay-theme.js +30 -72
- package/src/functions/mount/setup-options.js +2 -2
- package/src/functions/mount/{setup-styles.js → setup-styles-vars.js} +9 -7
- package/src/functions/purchase.js +2 -5
- package/src/functions/setup.js +3 -6
- package/src/functions/show.js +2 -2
- package/src/functions/show.spec.js +4 -4
- package/src/functions/update.spec.js +4 -3
- package/src/instance.js +4 -1
- package/src/loader/index.js +57 -33
- package/src/storefront/index.js +2 -5
- package/src/storefront/payment-instruments.js +7 -0
- package/src/style/base/__snapshots__/theme.spec.js.snap +136 -220
- package/src/style/base/default-theme.js +187 -14
- package/src/style/base/index.js +487 -79
- package/src/style/base/theme.js +3 -4
- package/src/style/base/theme.spec.js +2 -3
- package/src/style/index.js +4 -24
- package/src/style/utils/color-values.js +1 -1
- package/src/style/utils/minifyCss.js +14 -0
- package/src/views/common/iframe/base-iframe.js +3 -2
- package/src/views/common/iframe/event-listeners.js +12 -9
- package/src/views/common/iframe/method-iframe.js +3 -1
- package/src/views/common/iframe/modal-iframe.js +4 -2
- package/src/views/common/iframe/view-iframe.js +3 -1
- package/src/views/confirmation.js +12 -7
- package/src/views/errors.js +95 -0
- package/src/views/method-selector/express-methods.js +51 -0
- package/src/views/method-selector/generate-framepay-config.js +54 -0
- package/src/views/method-selector/generate-framepay-config.spec.js +195 -0
- package/src/views/method-selector/get-payment-methods.js +0 -1
- package/src/views/method-selector/index.js +45 -58
- package/src/views/method-selector/method-selector.spec.js +1 -1
- package/src/views/method-selector/mount-express-methods.js +66 -26
- package/src/views/modal.js +1 -1
- package/src/views/result.js +3 -3
- package/src/views/summary.js +24 -190
- package/tests/mocks/storefront-api-mock.js +48 -27
- package/src/style/browserslist.js +0 -1
- package/src/style/components/accordion.js +0 -140
- package/src/style/components/address.js +0 -55
- package/src/style/components/button.js +0 -117
- package/src/style/components/divider.js +0 -39
- package/src/style/components/forms/checkbox.js +0 -75
- package/src/style/components/forms/field.js +0 -56
- package/src/style/components/forms/form.js +0 -18
- package/src/style/components/forms/input.js +0 -77
- package/src/style/components/forms/label.js +0 -55
- package/src/style/components/forms/radio.js +0 -80
- package/src/style/components/forms/select.js +0 -86
- package/src/style/components/forms/validation.js +0 -72
- package/src/style/components/icons.js +0 -13
- package/src/style/components/index.js +0 -39
- package/src/style/components/loader.js +0 -41
- package/src/style/components/methods.js +0 -97
- package/src/style/components/overlay.js +0 -24
- package/src/style/helpers/index.js +0 -54
- package/src/style/payment-instruments/content.js +0 -8
- package/src/style/payment-instruments/index.js +0 -14
- package/src/style/payment-instruments/payment-card.js +0 -27
- package/src/style/payment-instruments/payment-instrument-list.js +0 -44
- package/src/style/payment-instruments/payment-instrument.js +0 -55
- package/src/style/utils/remove-empty-null.js +0 -10
- package/src/style/vendor/framepay.js +0 -28
- package/src/style/vendor/postmate.js +0 -18
- package/src/style/views/confirmation.js +0 -26
- package/src/style/views/index.js +0 -16
- package/src/style/views/method-selector.js +0 -11
- package/src/style/views/modal.js +0 -91
- package/src/style/views/result.js +0 -52
- package/src/style/views/summary.js +0 -118
- package/src/views/__snapshots__/summary.spec.js.snap +0 -246
- package/src/views/method-selector/express-methods/apple-pay.js +0 -92
- package/src/views/method-selector/express-methods/index.js +0 -25
- package/src/views/method-selector/mount-methods.js +0 -178
- package/src/views/summary.spec.js +0 -145
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mutedTextColor,
|
|
1
|
+
import { mutedTextColor, darken, mutedBorderColor } from '../utils/color-values';
|
|
2
2
|
import Border from '../utils/border';
|
|
3
3
|
|
|
4
4
|
const properties = {
|
|
@@ -24,13 +24,18 @@ const properties = {
|
|
|
24
24
|
colorMutedText: {
|
|
25
25
|
fallback: {
|
|
26
26
|
type: 'func',
|
|
27
|
-
value: theme => mutedTextColor(theme.colorText)
|
|
27
|
+
value: theme => mutedTextColor(theme.colorText, 60)
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
colorMutedBorder: {
|
|
31
31
|
fallback: {
|
|
32
32
|
type: 'func',
|
|
33
|
-
value: theme =>
|
|
33
|
+
value: theme => {
|
|
34
|
+
if(theme.colorTextProvided) {
|
|
35
|
+
return mutedBorderColor(theme.colorText);
|
|
36
|
+
}
|
|
37
|
+
return '#DCE3EA';
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
},
|
|
36
41
|
colorDanger: {
|
|
@@ -56,13 +61,13 @@ const properties = {
|
|
|
56
61
|
fontWeightBase: {
|
|
57
62
|
fallback: {
|
|
58
63
|
type: 'static',
|
|
59
|
-
value: '
|
|
64
|
+
value: '500',
|
|
60
65
|
}
|
|
61
66
|
},
|
|
62
67
|
fontLineHeightBase: {
|
|
63
68
|
fallback: {
|
|
64
|
-
type: '
|
|
65
|
-
value:
|
|
69
|
+
type: 'func',
|
|
70
|
+
value: theme => `calc(${theme.fontSizeBase} * 1.5)`,
|
|
66
71
|
}
|
|
67
72
|
},
|
|
68
73
|
fontSmooth: {
|
|
@@ -76,7 +81,7 @@ const properties = {
|
|
|
76
81
|
borderRadius: {
|
|
77
82
|
fallback: {
|
|
78
83
|
type: 'static',
|
|
79
|
-
value: '
|
|
84
|
+
value: '6px',
|
|
80
85
|
}
|
|
81
86
|
},
|
|
82
87
|
|
|
@@ -90,7 +95,7 @@ const properties = {
|
|
|
90
95
|
headingFontWeight: {
|
|
91
96
|
fallback: {
|
|
92
97
|
type: 'static',
|
|
93
|
-
value: '
|
|
98
|
+
value: '600',
|
|
94
99
|
}
|
|
95
100
|
},
|
|
96
101
|
headingColorText: {
|
|
@@ -127,8 +132,8 @@ const properties = {
|
|
|
127
132
|
},
|
|
128
133
|
buttonFontLineHeight: {
|
|
129
134
|
fallback: {
|
|
130
|
-
type: '
|
|
131
|
-
value: '
|
|
135
|
+
type: 'variable',
|
|
136
|
+
value: 'fontLineHeightBase',
|
|
132
137
|
}
|
|
133
138
|
},
|
|
134
139
|
buttonFontWeight: {
|
|
@@ -156,6 +161,62 @@ const properties = {
|
|
|
156
161
|
}
|
|
157
162
|
},
|
|
158
163
|
|
|
164
|
+
/** Buttons Secondary */
|
|
165
|
+
buttonSecondaryColorBackground: {
|
|
166
|
+
fallback: {
|
|
167
|
+
type: 'variable',
|
|
168
|
+
value: 'colorBackground',
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
buttonSecondaryColorText: {
|
|
172
|
+
fallback: {
|
|
173
|
+
type: 'variable',
|
|
174
|
+
value: 'colorPrimary',
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
buttonSecondaryFontFamily: {
|
|
178
|
+
fallback: {
|
|
179
|
+
type: 'variable',
|
|
180
|
+
value: 'fontFamily',
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
buttonSecondaryFontSize: {
|
|
184
|
+
fallback: {
|
|
185
|
+
type: 'variable',
|
|
186
|
+
value: 'fontSizeBase',
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
buttonSecondaryFontLineHeight: {
|
|
190
|
+
fallback: {
|
|
191
|
+
type: 'variable',
|
|
192
|
+
value: 'fontLineHeightBase',
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
buttonSecondaryFontWeight: {
|
|
196
|
+
fallback: {
|
|
197
|
+
type: 'variable',
|
|
198
|
+
value: 'fontWeightBase',
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
buttonSecondaryBorder: {
|
|
202
|
+
fallback: {
|
|
203
|
+
type: 'func',
|
|
204
|
+
value: theme => `1px solid ${theme.colorPrimary}`,
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
buttonSecondaryBorderRadius: {
|
|
208
|
+
fallback: {
|
|
209
|
+
type: 'variable',
|
|
210
|
+
value: 'borderRadius',
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
buttonSecondaryBoxShadow: {
|
|
214
|
+
fallback: {
|
|
215
|
+
type: 'static',
|
|
216
|
+
value: 'none',
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
|
|
159
220
|
/** Buttons: Hover */
|
|
160
221
|
buttonHoverColorBackground: {
|
|
161
222
|
fallback: {
|
|
@@ -222,6 +283,62 @@ const properties = {
|
|
|
222
283
|
value: 'buttonBoxShadow',
|
|
223
284
|
}
|
|
224
285
|
},
|
|
286
|
+
|
|
287
|
+
/** Buttons Secondary: Hover */
|
|
288
|
+
buttonSecondaryHoverColorBackground: {
|
|
289
|
+
fallback: {
|
|
290
|
+
type: 'variable',
|
|
291
|
+
value: 'colorBackground'
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
buttonSecondaryHoverColorText: {
|
|
295
|
+
fallback: {
|
|
296
|
+
type: 'variable',
|
|
297
|
+
value: 'buttonSecondaryColorText',
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
buttonSecondaryHoverFontFamily: {
|
|
301
|
+
fallback: {
|
|
302
|
+
type: 'variable',
|
|
303
|
+
value: 'buttonSecondaryFontFamily',
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
buttonSecondaryHoverFontSize: {
|
|
307
|
+
fallback: {
|
|
308
|
+
type: 'variable',
|
|
309
|
+
value: 'buttonSecondaryFontSize',
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
buttonSecondaryHoverFontLineHeight: {
|
|
313
|
+
fallback: {
|
|
314
|
+
type: 'variable',
|
|
315
|
+
value: 'buttonSecondaryFontLineHeight',
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
buttonSecondaryHoverFontWeight: {
|
|
319
|
+
fallback: {
|
|
320
|
+
type: 'variable',
|
|
321
|
+
value: 'buttonSecondaryFontWeight',
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
buttonSecondaryHoverBorder: {
|
|
325
|
+
fallback: {
|
|
326
|
+
type: 'variable',
|
|
327
|
+
value: 'buttonSecondaryBorder',
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
buttonSecondaryHoverBorderRadius: {
|
|
331
|
+
fallback: {
|
|
332
|
+
type: 'variable',
|
|
333
|
+
value: 'buttonSecondaryBorderRadius',
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
buttonSecondaryHoverBoxShadow: {
|
|
337
|
+
fallback: {
|
|
338
|
+
type: 'variable',
|
|
339
|
+
value: 'buttonSecondaryBoxShadow',
|
|
340
|
+
}
|
|
341
|
+
},
|
|
225
342
|
|
|
226
343
|
/** Buttons: Active */
|
|
227
344
|
buttonActiveColorBackground: {
|
|
@@ -279,6 +396,62 @@ const properties = {
|
|
|
279
396
|
}
|
|
280
397
|
},
|
|
281
398
|
|
|
399
|
+
/** Buttons Secondary: Active */
|
|
400
|
+
buttonSecondaryActiveColorBackground: {
|
|
401
|
+
fallback: {
|
|
402
|
+
type: 'variable',
|
|
403
|
+
value: 'buttonSecondaryHoverColorBackground',
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
buttonSecondaryActiveColorText: {
|
|
407
|
+
fallback: {
|
|
408
|
+
type: 'variable',
|
|
409
|
+
value: 'buttonSecondaryHoverColorText',
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
buttonSecondaryActiveFontFamily: {
|
|
413
|
+
fallback: {
|
|
414
|
+
type: 'variable',
|
|
415
|
+
value: 'buttonSecondaryHoverFontFamily',
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
buttonSecondaryActiveFontSize: {
|
|
419
|
+
fallback: {
|
|
420
|
+
type: 'variable',
|
|
421
|
+
value: 'buttonSecondaryHoverFontSize',
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
buttonSecondaryActiveFontLineHeight: {
|
|
425
|
+
fallback: {
|
|
426
|
+
type: 'variable',
|
|
427
|
+
value: 'buttonSecondaryHoverFontLineHeight',
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
buttonSecondaryActiveFontWeight: {
|
|
431
|
+
fallback: {
|
|
432
|
+
type: 'variable',
|
|
433
|
+
value: 'buttonSecondaryHoverFontWeight',
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
buttonSecondaryActiveBorder: {
|
|
437
|
+
fallback: {
|
|
438
|
+
type: 'variable',
|
|
439
|
+
value: 'buttonSecondaryHoverBorder'
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
buttonSecondaryActiveBorderRadius: {
|
|
443
|
+
fallback: {
|
|
444
|
+
type: 'variable',
|
|
445
|
+
value: 'buttonSecondaryHoverBorderRadius',
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
buttonSecondaryActiveBoxShadow: {
|
|
449
|
+
fallback: {
|
|
450
|
+
type: 'variable',
|
|
451
|
+
value: 'buttonSecondaryHoverBoxShadow',
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
|
|
282
455
|
/** Inputs: Base */
|
|
283
456
|
inputColorBackground: {
|
|
284
457
|
fallback: {
|
|
@@ -306,8 +479,8 @@ const properties = {
|
|
|
306
479
|
},
|
|
307
480
|
inputFontLineHeight: {
|
|
308
481
|
fallback: {
|
|
309
|
-
type: '
|
|
310
|
-
value: '
|
|
482
|
+
type: 'variable',
|
|
483
|
+
value: 'fontLineHeightBase',
|
|
311
484
|
}
|
|
312
485
|
},
|
|
313
486
|
inputFontWeight: {
|
|
@@ -319,7 +492,7 @@ const properties = {
|
|
|
319
492
|
inputBorder: {
|
|
320
493
|
fallback: {
|
|
321
494
|
type: 'func',
|
|
322
|
-
value: theme => `1px solid ${
|
|
495
|
+
value: theme => `1px solid ${darken(theme.colorMutedBorder, 4)}`
|
|
323
496
|
}
|
|
324
497
|
},
|
|
325
498
|
inputBorderRadius: {
|
|
@@ -461,7 +634,7 @@ const properties = {
|
|
|
461
634
|
if(theme.inputColorTextProvided) {
|
|
462
635
|
return mutedTextColor(theme.inputColorText);
|
|
463
636
|
}
|
|
464
|
-
return
|
|
637
|
+
return theme.colorMutedText;
|
|
465
638
|
}
|
|
466
639
|
}
|
|
467
640
|
},
|