@rebilly/instruments 2.0.0-beta → 3.0.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/dist/events/index.js +2 -1
- package/dist/functions/mount/fetch-data.js +187 -0
- package/dist/functions/mount/fetch-data.spec.js +189 -0
- package/dist/functions/mount/index.js +132 -164
- package/dist/functions/mount/mount.spec.js +2 -4
- package/dist/functions/mount/setup-element.js +40 -0
- package/dist/functions/mount/setup-framepay-theme.js +95 -0
- package/dist/functions/mount/setup-framepay.js +5 -1
- package/dist/functions/mount/setup-i18n.js +33 -0
- package/dist/functions/mount/setup-options.js +68 -47
- package/dist/functions/mount/setup-options.spec.js +66 -0
- package/dist/functions/mount/setup-storefront.js +6 -4
- package/dist/functions/mount/setup-styles.js +4 -2
- package/dist/functions/purchase.js +129 -24
- package/dist/functions/purchase.spec.js +13 -10
- package/dist/functions/setup.js +85 -0
- package/dist/functions/setup.spec.js +87 -0
- package/dist/functions/show.js +8 -4
- package/dist/functions/show.spec.js +9 -5
- package/dist/functions/update.js +39 -24
- package/dist/functions/update.spec.js +0 -4
- package/dist/i18n/en.json +5 -2
- package/dist/i18n/es.json +4 -1
- package/dist/index.js +17 -3
- package/dist/index.spec.js +3 -16
- package/dist/loader/index.js +4 -3
- package/dist/storefront/index.js +33 -0
- package/dist/storefront/invoices.js +27 -0
- package/dist/storefront/models/base-model.js +18 -0
- package/dist/storefront/models/invoice-model.js +14 -0
- package/dist/storefront/models/plan-model.js +4 -35
- package/dist/storefront/models/product-model.js +4 -23
- package/dist/storefront/models/summary-model.js +12 -25
- package/dist/storefront/models/transaction-model.js +31 -0
- package/dist/storefront/payment-instruments.js +47 -0
- package/dist/storefront/payment-instruments.spec.js +55 -0
- package/dist/storefront/plans.js +10 -18
- package/dist/storefront/plans.spec.js +3 -13
- package/dist/storefront/products.js +10 -13
- package/dist/storefront/products.spec.js +12 -19
- package/dist/storefront/purchase.js +23 -12
- package/dist/storefront/purchase.spec.js +1 -20
- package/dist/storefront/ready-to-pay.js +18 -15
- package/dist/storefront/ready-to-pay.spec.js +2 -12
- package/dist/storefront/summary.js +21 -17
- package/dist/storefront/summary.spec.js +4 -15
- package/dist/storefront/transactions.js +27 -0
- package/dist/style/base/__snapshots__/theme.spec.js.snap +188 -45
- package/dist/style/base/default-theme.js +699 -0
- package/dist/style/base/index.js +48 -16
- package/dist/style/base/theme.js +16 -48
- package/dist/style/base/theme.spec.js +4 -15
- package/dist/style/components/address.js +3 -3
- package/dist/style/components/button.js +32 -22
- package/dist/style/components/divider.js +9 -9
- package/dist/style/components/forms/checkbox.js +12 -9
- package/dist/style/components/forms/field.js +18 -6
- package/dist/style/components/forms/form.js +2 -2
- package/dist/style/components/forms/input.js +54 -13
- package/dist/style/components/forms/label.js +39 -18
- package/dist/style/components/forms/select.js +54 -22
- package/dist/style/components/forms/validation.js +53 -6
- package/dist/style/components/icons.js +4 -4
- package/dist/style/components/loader.js +5 -3
- package/dist/style/components/methods.js +18 -15
- package/dist/style/components/overlay.js +5 -5
- package/dist/style/helpers/index.js +46 -46
- package/dist/style/index.js +3 -1
- package/dist/style/payment-instruments/payment-card.js +4 -4
- package/dist/style/utils/border.js +47 -0
- package/dist/style/utils/color-values.js +39 -3
- package/dist/style/utils/remove-empty-null.js +20 -0
- package/dist/style/vendor/framepay.js +11 -8
- package/dist/style/vendor/postmate.js +2 -2
- package/dist/style/views/confirmation.js +13 -13
- package/dist/style/views/method-selector.js +2 -2
- package/dist/style/views/modal.js +6 -6
- package/dist/style/views/result.js +4 -4
- package/dist/style/views/summary.js +26 -22
- package/dist/views/__snapshots__/summary.spec.js.snap +77 -119
- package/dist/views/common/iframe/base-iframe.js +2 -0
- package/dist/views/common/iframe/modal-iframe.js +50 -4
- package/dist/views/confirmation.js +19 -8
- package/dist/views/method-selector/generate-digital-wallet.js +12 -3
- package/dist/views/method-selector/generate-digital-wallet.spec.js +11 -0
- package/dist/views/method-selector/get-payment-methods.js +13 -2
- package/dist/views/method-selector/get-payment-methods.spec.js +21 -19
- package/dist/views/method-selector/index.js +23 -34
- package/dist/views/method-selector/method-selector.spec.js +50 -55
- package/dist/views/method-selector/mount-methods.js +5 -8
- package/dist/views/modal.js +8 -2
- package/dist/views/result.js +3 -4
- package/dist/views/summary.js +156 -97
- package/dist/views/summary.spec.js +53 -58
- package/package.json +4 -2
- package/src/events/index.js +2 -1
- package/src/functions/mount/fetch-data.js +152 -0
- package/src/functions/mount/fetch-data.spec.js +238 -0
- package/src/functions/mount/index.js +101 -158
- package/src/functions/mount/mount.spec.js +3 -5
- package/src/functions/mount/setup-element.js +26 -0
- package/src/functions/mount/setup-framepay-theme.js +82 -0
- package/src/functions/mount/setup-framepay.js +5 -1
- package/src/functions/mount/setup-i18n.js +19 -0
- package/src/functions/mount/setup-options.js +78 -48
- package/src/functions/mount/setup-options.spec.js +60 -0
- package/src/functions/mount/setup-storefront.js +6 -4
- package/src/functions/mount/setup-styles.js +4 -2
- package/src/functions/on.spec.js +1 -1
- package/src/functions/purchase.js +99 -23
- package/src/functions/purchase.spec.js +10 -10
- package/src/functions/setup.js +48 -0
- package/src/functions/setup.spec.js +98 -0
- package/src/functions/show.js +2 -4
- package/src/functions/show.spec.js +3 -4
- package/src/functions/update.js +40 -25
- package/src/functions/update.spec.js +0 -4
- package/src/i18n/en.json +5 -2
- package/src/i18n/es.json +4 -1
- package/src/index.js +9 -3
- package/src/index.spec.js +3 -21
- package/src/loader/index.js +3 -3
- package/src/storefront/index.js +28 -0
- package/src/storefront/invoices.js +11 -0
- package/src/storefront/models/base-model.js +10 -0
- package/src/storefront/models/invoice-model.js +3 -0
- package/src/storefront/models/plan-model.js +3 -35
- package/src/storefront/models/product-model.js +3 -23
- package/src/storefront/models/summary-model.js +12 -19
- package/src/storefront/models/transaction-model.js +19 -0
- package/src/storefront/payment-instruments.js +30 -0
- package/src/storefront/payment-instruments.spec.js +69 -0
- package/src/storefront/plans.js +6 -17
- package/src/storefront/plans.spec.js +4 -11
- package/src/storefront/products.js +8 -16
- package/src/storefront/products.spec.js +16 -22
- package/src/storefront/purchase.js +14 -16
- package/src/storefront/purchase.spec.js +2 -14
- package/src/storefront/ready-to-pay.js +13 -16
- package/src/storefront/ready-to-pay.spec.js +3 -10
- package/src/storefront/summary.js +19 -17
- package/src/storefront/summary.spec.js +5 -12
- package/src/storefront/transactions.js +11 -0
- package/src/style/base/__snapshots__/theme.spec.js.snap +188 -45
- package/src/style/base/default-theme.js +674 -0
- package/src/style/base/index.js +48 -16
- package/src/style/base/theme.js +17 -47
- package/src/style/base/theme.spec.js +4 -16
- package/src/style/components/address.js +3 -3
- package/src/style/components/button.js +32 -24
- package/src/style/components/divider.js +9 -9
- package/src/style/components/forms/checkbox.js +11 -11
- package/src/style/components/forms/field.js +18 -6
- package/src/style/components/forms/form.js +2 -2
- package/src/style/components/forms/input.js +54 -13
- package/src/style/components/forms/label.js +39 -18
- package/src/style/components/forms/select.js +54 -22
- package/src/style/components/forms/validation.js +53 -6
- package/src/style/components/icons.js +4 -4
- package/src/style/components/loader.js +4 -5
- package/src/style/components/methods.js +18 -15
- package/src/style/components/overlay.js +5 -5
- package/src/style/helpers/index.js +46 -46
- package/src/style/index.js +2 -1
- package/src/style/payment-instruments/payment-card.js +4 -4
- package/src/style/utils/border.js +34 -0
- package/src/style/utils/color-values.js +27 -1
- package/src/style/utils/remove-empty-null.js +10 -0
- package/src/style/vendor/framepay.js +11 -8
- package/src/style/vendor/postmate.js +2 -2
- package/src/style/views/confirmation.js +13 -13
- package/src/style/views/method-selector.js +2 -2
- package/src/style/views/modal.js +6 -6
- package/src/style/views/result.js +4 -4
- package/src/style/views/summary.js +26 -22
- package/src/views/__snapshots__/summary.spec.js.snap +77 -119
- package/src/views/common/iframe/base-iframe.js +2 -0
- package/src/views/common/iframe/modal-iframe.js +45 -3
- package/src/views/confirmation.js +15 -5
- package/src/views/method-selector/generate-digital-wallet.js +10 -3
- package/src/views/method-selector/generate-digital-wallet.spec.js +10 -0
- package/src/views/method-selector/get-payment-methods.js +7 -2
- package/src/views/method-selector/get-payment-methods.spec.js +26 -23
- package/src/views/method-selector/index.js +21 -28
- package/src/views/method-selector/method-selector.spec.js +49 -64
- package/src/views/method-selector/mount-methods.js +5 -8
- package/src/views/modal.js +6 -2
- package/src/views/result.js +4 -3
- package/src/views/summary.js +161 -117
- package/src/views/summary.spec.js +60 -75
- package/tests/mocks/rebilly-instruments-mock.js +37 -7
- package/tests/mocks/storefront-api-mock.js +8 -0
- package/tests/mocks/storefront-mock.js +17 -0
- package/dist/functions/mount/fetch-summary-data.js +0 -46
- package/dist/functions/mount/fetch-summary-data.spec.js +0 -43
- package/src/functions/mount/fetch-summary-data.js +0 -29
- package/src/functions/mount/fetch-summary-data.spec.js +0 -40
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.alphaColor = alphaColor;
|
|
7
|
-
exports.colorValues = void 0;
|
|
7
|
+
exports.lighten = exports.darken = exports.mutedBorderColor = exports.mutedTextColor = exports.colorValues = void 0;
|
|
8
8
|
|
|
9
9
|
var _values = _interopRequireDefault(require("values.js"));
|
|
10
10
|
|
|
@@ -15,8 +15,44 @@ const colorValues = color => new _values.default(color);
|
|
|
15
15
|
exports.colorValues = colorValues;
|
|
16
16
|
|
|
17
17
|
function alphaColor(color, alphaValue = 1) {
|
|
18
|
-
|
|
18
|
+
if (color === null) {
|
|
19
|
+
return color;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const _alphaColor = colorValues(color);
|
|
19
23
|
|
|
20
24
|
_alphaColor.alpha = alphaValue;
|
|
21
25
|
return _alphaColor.rgbString();
|
|
22
|
-
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const mutedTextColor = color => alphaColor(color, 0.6);
|
|
29
|
+
|
|
30
|
+
exports.mutedTextColor = mutedTextColor;
|
|
31
|
+
|
|
32
|
+
const mutedBorderColor = color => alphaColor(color, 0.25);
|
|
33
|
+
|
|
34
|
+
exports.mutedBorderColor = mutedBorderColor;
|
|
35
|
+
|
|
36
|
+
const darken = (color, percent) => {
|
|
37
|
+
if (color === null) {
|
|
38
|
+
return color;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const _color = colorValues(color);
|
|
42
|
+
|
|
43
|
+
return _color.shade(percent).hexString();
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.darken = darken;
|
|
47
|
+
|
|
48
|
+
const lighten = (color, percent) => {
|
|
49
|
+
if (color === null) {
|
|
50
|
+
return color;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const _color = colorValues(color);
|
|
54
|
+
|
|
55
|
+
return _color.tint(percent).hexString();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.lighten = lighten;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _postcss = _interopRequireDefault(require("postcss"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = _postcss.default.plugin('postcss-remove-empty-null', () => root => {
|
|
13
|
+
root.walkDecls(decl => {
|
|
14
|
+
if ((decl.value === '\'\'' || decl.value === '""' || decl.value.includes('null')) && decl.prop !== 'content') {
|
|
15
|
+
decl.remove();
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
exports.default = _default;
|
|
@@ -5,22 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.framepayStyle = void 0;
|
|
7
7
|
|
|
8
|
-
const framepayStyle =
|
|
8
|
+
const framepayStyle = () => `
|
|
9
9
|
.rebilly-instruments-framepay .rebilly-framepay {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
border: 1px solid ${theme.getComputed.color.mutedBorder};
|
|
10
|
+
min-height: var(--rebilly-spacings-form-element-min-height);
|
|
11
|
+
border: var(--rebilly-inputBorder);
|
|
13
12
|
margin-bottom: 0;
|
|
14
|
-
background:
|
|
13
|
+
background: var(--rebilly-inputColorBackground);
|
|
14
|
+
border-radius: var(--rebilly-inputBorderRadius);
|
|
15
|
+
box-shadow: var(--rebilly-inputBoxShadow);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
.rebilly-instruments-framepay .rebilly-framepay.rebilly-framepay-focus {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
background: var(--rebilly-inputFocusColorBackground);
|
|
20
|
+
border: var(--rebilly-inputFocusBorder);
|
|
21
|
+
border-radius: var(--rebilly-inputFocusBorderRadius);
|
|
22
|
+
box-shadow: var(--rebilly-inputFocusBoxShadow);
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
.rebilly-instruments-framepay .rebilly-framepay.rebilly-framepay-invalid {
|
|
23
|
-
border:
|
|
26
|
+
border-color: var(--rebilly-colorDanger);
|
|
24
27
|
box-shadow: none;
|
|
25
28
|
}
|
|
26
29
|
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.postmateStyle = void 0;
|
|
7
7
|
|
|
8
|
-
const postmateStyle =
|
|
8
|
+
const postmateStyle = () => `
|
|
9
9
|
.rebilly-instruments-iframe {
|
|
10
10
|
border: none;
|
|
11
11
|
width: 100%;
|
|
12
|
-
min-height:
|
|
12
|
+
min-height: var(--rebilly-spacings-form-element-min-height);
|
|
13
13
|
transition: all 0.2s ease;
|
|
14
14
|
}
|
|
15
15
|
`;
|
|
@@ -8,7 +8,7 @@ exports.confirmation = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the confirmation view.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const confirmation =
|
|
11
|
+
const confirmation = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Confirmation
|
|
14
14
|
*/
|
|
@@ -18,8 +18,8 @@ const confirmation = theme => `
|
|
|
18
18
|
|
|
19
19
|
.rebilly-instruments-confirmation-go-back-link {
|
|
20
20
|
display: inline-block;
|
|
21
|
-
margin-bottom:
|
|
22
|
-
margin-left:
|
|
21
|
+
margin-bottom: var(--rebilly-spacings-base);
|
|
22
|
+
margin-left: calc(var(--rebilly-spacings-xs) * -1);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.rebilly-instruments-confirmation-address-title {
|
|
@@ -28,20 +28,20 @@ const confirmation = theme => `
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.rebilly-instruments-confirmation-address-title .rebilly-instruments-link {
|
|
31
|
-
margin-left:
|
|
31
|
+
margin-left: var(--rebilly-spacings-s);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.rebilly-instruments-confirmation-address-actions {
|
|
35
|
-
margin-top:
|
|
35
|
+
margin-top: var(--rebilly-spacings-base);
|
|
36
36
|
display: flex;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.rebilly-instruments-confirmation-address-actions :first-child {
|
|
40
|
-
margin: 0
|
|
40
|
+
margin: 0 var(--rebilly-spacings-xs) 0 0;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.rebilly-instruments-confirmation-address-actions :last-child {
|
|
44
|
-
margin: 0 0 0
|
|
44
|
+
margin: 0 0 0 var(--rebilly-spacings-xs);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.rebilly-instruments-confirmation-payment-method {
|
|
@@ -49,18 +49,18 @@ const confirmation = theme => `
|
|
|
49
49
|
align-items: center;
|
|
50
50
|
justify-content: space-between;
|
|
51
51
|
height: 26px;
|
|
52
|
-
margin: 0 0
|
|
52
|
+
margin: 0 0 var(--rebilly-spacings-l);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.rebilly-instruments-confirmation-payment-method figure {
|
|
56
|
-
margin: 0
|
|
56
|
+
margin: 0 var(--rebilly-spacings-2xs) 0 0;
|
|
57
57
|
height: 26px;
|
|
58
58
|
padding: 0;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.rebilly-instruments-confirmation-payment-method figure img {
|
|
62
62
|
width: 42px;
|
|
63
|
-
border-radius:
|
|
63
|
+
border-radius: 4px;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.rebilly-instruments-confirmation-payment-method-brand,
|
|
@@ -70,15 +70,15 @@ const confirmation = theme => `
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
.rebilly-instruments-confirmation-payment-method-brand {
|
|
73
|
-
margin: 0 0 0
|
|
73
|
+
margin: 0 0 0 var(--rebilly-spacings-s);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.rebilly-instruments-confirmation-payment-method-last4 {
|
|
77
|
-
margin: 0
|
|
77
|
+
margin: 0 var(--rebilly-spacings-s);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.rebilly-instruments-confirmation-payment-method-exp {
|
|
81
|
-
color:
|
|
81
|
+
color: var(--rebilly-colorMutedText);
|
|
82
82
|
}
|
|
83
83
|
`;
|
|
84
84
|
|
|
@@ -8,12 +8,12 @@ exports.methodSelector = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the selector view.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const methodSelector =
|
|
11
|
+
const methodSelector = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Method selector
|
|
14
14
|
*/
|
|
15
15
|
.rebilly-instruments-method-selector.has-express-compact {
|
|
16
|
-
padding-top:
|
|
16
|
+
padding-top: var(--rebilly-spacings-s);
|
|
17
17
|
}
|
|
18
18
|
`;
|
|
19
19
|
|
|
@@ -8,7 +8,7 @@ exports.modal = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the modal view.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const modal =
|
|
11
|
+
const modal = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Modal
|
|
14
14
|
*/
|
|
@@ -38,10 +38,10 @@ const modal = theme => `
|
|
|
38
38
|
transition: all .24s ease-in-out;
|
|
39
39
|
position: relative;
|
|
40
40
|
max-width: 800px;
|
|
41
|
-
background:
|
|
41
|
+
background: var(--rebilly-colorBackground);
|
|
42
42
|
margin: 50px auto 20px;
|
|
43
43
|
box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);
|
|
44
|
-
border-radius:
|
|
44
|
+
border-radius: 4px;
|
|
45
45
|
transform: translateY(-50px);
|
|
46
46
|
opacity: 0;
|
|
47
47
|
}
|
|
@@ -60,9 +60,9 @@ const modal = theme => `
|
|
|
60
60
|
transition: all .15s;
|
|
61
61
|
padding: 20px;
|
|
62
62
|
overflow: hidden;
|
|
63
|
-
background-color:
|
|
63
|
+
background-color: var(--rebilly-colorBackground);
|
|
64
64
|
text-align: center;
|
|
65
|
-
border-radius:
|
|
65
|
+
border-radius: 4px;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.rebilly-instruments-modal-content .rebilly-instruments-iframe {
|
|
@@ -81,7 +81,7 @@ const modal = theme => `
|
|
|
81
81
|
height: 30px;
|
|
82
82
|
top: -40px;
|
|
83
83
|
right: 0;
|
|
84
|
-
fill: #
|
|
84
|
+
fill: #FFF;
|
|
85
85
|
cursor: pointer;
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -8,7 +8,7 @@ exports.result = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the result view.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const result =
|
|
11
|
+
const result = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Result
|
|
14
14
|
*/
|
|
@@ -19,16 +19,16 @@ const result = theme => `
|
|
|
19
19
|
|
|
20
20
|
.rebilly-instruments-results-icon {
|
|
21
21
|
width: 160px;
|
|
22
|
-
margin: 0 auto
|
|
22
|
+
margin: 0 auto var(--rebilly-spacings-base) auto;
|
|
23
23
|
display: block;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.rebilly-instruments-results-icon g {
|
|
27
|
-
stroke:
|
|
27
|
+
stroke: var(--rebilly-colorPrimary);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.rebilly-instruments-results-icon.is-error g {
|
|
31
|
-
stroke:
|
|
31
|
+
stroke: var(--rebilly-colorDanger);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.rebilly-instruments-results-icon path {
|
|
@@ -8,13 +8,13 @@ exports.summary = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the summary view.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const summary =
|
|
11
|
+
const summary = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Summary
|
|
14
14
|
*/
|
|
15
15
|
.rebilly-instruments-summary-line-item {
|
|
16
|
-
border-bottom: 1px solid
|
|
17
|
-
padding:
|
|
16
|
+
border-bottom: 1px solid var(--rebilly-colorMutedBorder);
|
|
17
|
+
padding: var(--rebilly-spacings-s) 0;
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
position: relative;
|
|
@@ -25,12 +25,12 @@ const summary = theme => `
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.rebilly-instruments-summary-line-item-figure {
|
|
28
|
-
margin: 0
|
|
28
|
+
margin: 0 var(--rebilly-spacings-s) 0 0;
|
|
29
29
|
flex: 0 0 auto;
|
|
30
30
|
width: 48px;
|
|
31
31
|
height: 48px;
|
|
32
|
-
border-radius:
|
|
33
|
-
border: 1px solid
|
|
32
|
+
border-radius: var(--rebilly-borderRadius);
|
|
33
|
+
border: 1px solid var(--rebilly-colorMutedBorder);
|
|
34
34
|
overflow: hidden;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -48,31 +48,31 @@ const summary = theme => `
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.rebilly-instruments-summary-line-item-synopsis-description {
|
|
51
|
-
color:
|
|
51
|
+
color: var(--rebilly-colorMutedText);
|
|
52
52
|
margin: 0;
|
|
53
|
-
font-size:
|
|
54
|
-
line-height:
|
|
53
|
+
font-size: calc(var(--rebilly-fontSizeBase) * 0.875);
|
|
54
|
+
line-height: 1;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.rebilly-instruments-summary-line-item-price-breakdown {
|
|
58
58
|
display: flex;
|
|
59
59
|
justify-content: center;
|
|
60
60
|
align-items: center;
|
|
61
|
-
color:
|
|
62
|
-
margin: 0 0 0
|
|
61
|
+
color: var(--rebilly-colorMutedText);
|
|
62
|
+
margin: 0 0 0 var(--rebilly-spacings-s);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.rebilly-instruments-summary-line-item-price-breakdown .rebilly-instruments-icon {
|
|
66
|
-
fill:
|
|
66
|
+
fill: var(--rebilly-colorMutedText);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.rebilly-instruments-summary-line-item-price-breakdown-unit-price {
|
|
70
|
-
color:
|
|
70
|
+
color: var(--rebilly-colorText);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.rebilly-instruments-summary-breakdown table {
|
|
74
74
|
width: 100%;
|
|
75
|
-
margin:
|
|
75
|
+
margin: var(--rebilly-spacings-xs) 0;
|
|
76
76
|
color: inherit;
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -89,34 +89,38 @@ const summary = theme => `
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.rebilly-instruments-summary-breakdown table tr td:first-child {
|
|
92
|
-
padding-right:
|
|
92
|
+
padding-right: var(--rebilly-spacings-s);
|
|
93
93
|
font-weight: 500;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
.rebilly-instruments-summary-breakdown table {
|
|
97
|
+
border-bottom: 1px solid var(--rebilly-colorMutedBorder);
|
|
98
|
+
padding-bottom: var(--rebilly-spacings-xs);
|
|
99
|
+
}
|
|
100
|
+
|
|
96
101
|
.rebilly-instruments-summary-breakdown-total {
|
|
97
|
-
padding-top:
|
|
102
|
+
padding-top: var(--rebilly-spacings-xs);
|
|
98
103
|
display: flex;
|
|
99
|
-
border-top: 1px solid ${theme.getComputed.color.mutedBorder};
|
|
100
104
|
align-items: center;
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
.rebilly-instruments-summary-breakdown-total p {
|
|
104
|
-
margin:
|
|
108
|
+
margin: var(--rebilly-spacings-s) 0;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
.rebilly-instruments-summary-breakdown-total-amount {
|
|
108
112
|
flex: 1 2 80%;
|
|
109
|
-
font-size:
|
|
113
|
+
font-size: calc(var(--rebilly-fontSizeBase) * 1.5);
|
|
110
114
|
font-weight: 500;
|
|
111
115
|
text-align: right;
|
|
112
116
|
font-weight: bold;
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
.rebilly-instruments-summary-breakdown-total-amount-currency {
|
|
116
|
-
font-size:
|
|
120
|
+
font-size: var(--rebilly-fontSizeBase);
|
|
117
121
|
font-weight: normal;
|
|
118
|
-
color:
|
|
119
|
-
margin-right:
|
|
122
|
+
color: var(--rebilly-colorMutedText);
|
|
123
|
+
margin-right: var(--rebilly-spacings-s);
|
|
120
124
|
}
|
|
121
125
|
`;
|
|
122
126
|
|