@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.
Files changed (197) hide show
  1. package/dist/events/index.js +2 -1
  2. package/dist/functions/mount/fetch-data.js +187 -0
  3. package/dist/functions/mount/fetch-data.spec.js +189 -0
  4. package/dist/functions/mount/index.js +132 -164
  5. package/dist/functions/mount/mount.spec.js +2 -4
  6. package/dist/functions/mount/setup-element.js +40 -0
  7. package/dist/functions/mount/setup-framepay-theme.js +95 -0
  8. package/dist/functions/mount/setup-framepay.js +5 -1
  9. package/dist/functions/mount/setup-i18n.js +33 -0
  10. package/dist/functions/mount/setup-options.js +68 -47
  11. package/dist/functions/mount/setup-options.spec.js +66 -0
  12. package/dist/functions/mount/setup-storefront.js +6 -4
  13. package/dist/functions/mount/setup-styles.js +4 -2
  14. package/dist/functions/purchase.js +129 -24
  15. package/dist/functions/purchase.spec.js +13 -10
  16. package/dist/functions/setup.js +85 -0
  17. package/dist/functions/setup.spec.js +87 -0
  18. package/dist/functions/show.js +8 -4
  19. package/dist/functions/show.spec.js +9 -5
  20. package/dist/functions/update.js +39 -24
  21. package/dist/functions/update.spec.js +0 -4
  22. package/dist/i18n/en.json +5 -2
  23. package/dist/i18n/es.json +4 -1
  24. package/dist/index.js +17 -3
  25. package/dist/index.spec.js +3 -16
  26. package/dist/loader/index.js +4 -3
  27. package/dist/storefront/index.js +33 -0
  28. package/dist/storefront/invoices.js +27 -0
  29. package/dist/storefront/models/base-model.js +18 -0
  30. package/dist/storefront/models/invoice-model.js +14 -0
  31. package/dist/storefront/models/plan-model.js +4 -35
  32. package/dist/storefront/models/product-model.js +4 -23
  33. package/dist/storefront/models/summary-model.js +12 -25
  34. package/dist/storefront/models/transaction-model.js +31 -0
  35. package/dist/storefront/payment-instruments.js +47 -0
  36. package/dist/storefront/payment-instruments.spec.js +55 -0
  37. package/dist/storefront/plans.js +10 -18
  38. package/dist/storefront/plans.spec.js +3 -13
  39. package/dist/storefront/products.js +10 -13
  40. package/dist/storefront/products.spec.js +12 -19
  41. package/dist/storefront/purchase.js +23 -12
  42. package/dist/storefront/purchase.spec.js +1 -20
  43. package/dist/storefront/ready-to-pay.js +18 -15
  44. package/dist/storefront/ready-to-pay.spec.js +2 -12
  45. package/dist/storefront/summary.js +21 -17
  46. package/dist/storefront/summary.spec.js +4 -15
  47. package/dist/storefront/transactions.js +27 -0
  48. package/dist/style/base/__snapshots__/theme.spec.js.snap +188 -45
  49. package/dist/style/base/default-theme.js +699 -0
  50. package/dist/style/base/index.js +48 -16
  51. package/dist/style/base/theme.js +16 -48
  52. package/dist/style/base/theme.spec.js +4 -15
  53. package/dist/style/components/address.js +3 -3
  54. package/dist/style/components/button.js +32 -22
  55. package/dist/style/components/divider.js +9 -9
  56. package/dist/style/components/forms/checkbox.js +12 -9
  57. package/dist/style/components/forms/field.js +18 -6
  58. package/dist/style/components/forms/form.js +2 -2
  59. package/dist/style/components/forms/input.js +54 -13
  60. package/dist/style/components/forms/label.js +39 -18
  61. package/dist/style/components/forms/select.js +54 -22
  62. package/dist/style/components/forms/validation.js +53 -6
  63. package/dist/style/components/icons.js +4 -4
  64. package/dist/style/components/loader.js +5 -3
  65. package/dist/style/components/methods.js +18 -15
  66. package/dist/style/components/overlay.js +5 -5
  67. package/dist/style/helpers/index.js +46 -46
  68. package/dist/style/index.js +3 -1
  69. package/dist/style/payment-instruments/payment-card.js +4 -4
  70. package/dist/style/utils/border.js +47 -0
  71. package/dist/style/utils/color-values.js +39 -3
  72. package/dist/style/utils/remove-empty-null.js +20 -0
  73. package/dist/style/vendor/framepay.js +11 -8
  74. package/dist/style/vendor/postmate.js +2 -2
  75. package/dist/style/views/confirmation.js +13 -13
  76. package/dist/style/views/method-selector.js +2 -2
  77. package/dist/style/views/modal.js +6 -6
  78. package/dist/style/views/result.js +4 -4
  79. package/dist/style/views/summary.js +26 -22
  80. package/dist/views/__snapshots__/summary.spec.js.snap +77 -119
  81. package/dist/views/common/iframe/base-iframe.js +2 -0
  82. package/dist/views/common/iframe/modal-iframe.js +50 -4
  83. package/dist/views/confirmation.js +19 -8
  84. package/dist/views/method-selector/generate-digital-wallet.js +12 -3
  85. package/dist/views/method-selector/generate-digital-wallet.spec.js +11 -0
  86. package/dist/views/method-selector/get-payment-methods.js +13 -2
  87. package/dist/views/method-selector/get-payment-methods.spec.js +21 -19
  88. package/dist/views/method-selector/index.js +23 -34
  89. package/dist/views/method-selector/method-selector.spec.js +50 -55
  90. package/dist/views/method-selector/mount-methods.js +5 -8
  91. package/dist/views/modal.js +8 -2
  92. package/dist/views/result.js +3 -4
  93. package/dist/views/summary.js +156 -97
  94. package/dist/views/summary.spec.js +53 -58
  95. package/package.json +4 -2
  96. package/src/events/index.js +2 -1
  97. package/src/functions/mount/fetch-data.js +152 -0
  98. package/src/functions/mount/fetch-data.spec.js +238 -0
  99. package/src/functions/mount/index.js +101 -158
  100. package/src/functions/mount/mount.spec.js +3 -5
  101. package/src/functions/mount/setup-element.js +26 -0
  102. package/src/functions/mount/setup-framepay-theme.js +82 -0
  103. package/src/functions/mount/setup-framepay.js +5 -1
  104. package/src/functions/mount/setup-i18n.js +19 -0
  105. package/src/functions/mount/setup-options.js +78 -48
  106. package/src/functions/mount/setup-options.spec.js +60 -0
  107. package/src/functions/mount/setup-storefront.js +6 -4
  108. package/src/functions/mount/setup-styles.js +4 -2
  109. package/src/functions/on.spec.js +1 -1
  110. package/src/functions/purchase.js +99 -23
  111. package/src/functions/purchase.spec.js +10 -10
  112. package/src/functions/setup.js +48 -0
  113. package/src/functions/setup.spec.js +98 -0
  114. package/src/functions/show.js +2 -4
  115. package/src/functions/show.spec.js +3 -4
  116. package/src/functions/update.js +40 -25
  117. package/src/functions/update.spec.js +0 -4
  118. package/src/i18n/en.json +5 -2
  119. package/src/i18n/es.json +4 -1
  120. package/src/index.js +9 -3
  121. package/src/index.spec.js +3 -21
  122. package/src/loader/index.js +3 -3
  123. package/src/storefront/index.js +28 -0
  124. package/src/storefront/invoices.js +11 -0
  125. package/src/storefront/models/base-model.js +10 -0
  126. package/src/storefront/models/invoice-model.js +3 -0
  127. package/src/storefront/models/plan-model.js +3 -35
  128. package/src/storefront/models/product-model.js +3 -23
  129. package/src/storefront/models/summary-model.js +12 -19
  130. package/src/storefront/models/transaction-model.js +19 -0
  131. package/src/storefront/payment-instruments.js +30 -0
  132. package/src/storefront/payment-instruments.spec.js +69 -0
  133. package/src/storefront/plans.js +6 -17
  134. package/src/storefront/plans.spec.js +4 -11
  135. package/src/storefront/products.js +8 -16
  136. package/src/storefront/products.spec.js +16 -22
  137. package/src/storefront/purchase.js +14 -16
  138. package/src/storefront/purchase.spec.js +2 -14
  139. package/src/storefront/ready-to-pay.js +13 -16
  140. package/src/storefront/ready-to-pay.spec.js +3 -10
  141. package/src/storefront/summary.js +19 -17
  142. package/src/storefront/summary.spec.js +5 -12
  143. package/src/storefront/transactions.js +11 -0
  144. package/src/style/base/__snapshots__/theme.spec.js.snap +188 -45
  145. package/src/style/base/default-theme.js +674 -0
  146. package/src/style/base/index.js +48 -16
  147. package/src/style/base/theme.js +17 -47
  148. package/src/style/base/theme.spec.js +4 -16
  149. package/src/style/components/address.js +3 -3
  150. package/src/style/components/button.js +32 -24
  151. package/src/style/components/divider.js +9 -9
  152. package/src/style/components/forms/checkbox.js +11 -11
  153. package/src/style/components/forms/field.js +18 -6
  154. package/src/style/components/forms/form.js +2 -2
  155. package/src/style/components/forms/input.js +54 -13
  156. package/src/style/components/forms/label.js +39 -18
  157. package/src/style/components/forms/select.js +54 -22
  158. package/src/style/components/forms/validation.js +53 -6
  159. package/src/style/components/icons.js +4 -4
  160. package/src/style/components/loader.js +4 -5
  161. package/src/style/components/methods.js +18 -15
  162. package/src/style/components/overlay.js +5 -5
  163. package/src/style/helpers/index.js +46 -46
  164. package/src/style/index.js +2 -1
  165. package/src/style/payment-instruments/payment-card.js +4 -4
  166. package/src/style/utils/border.js +34 -0
  167. package/src/style/utils/color-values.js +27 -1
  168. package/src/style/utils/remove-empty-null.js +10 -0
  169. package/src/style/vendor/framepay.js +11 -8
  170. package/src/style/vendor/postmate.js +2 -2
  171. package/src/style/views/confirmation.js +13 -13
  172. package/src/style/views/method-selector.js +2 -2
  173. package/src/style/views/modal.js +6 -6
  174. package/src/style/views/result.js +4 -4
  175. package/src/style/views/summary.js +26 -22
  176. package/src/views/__snapshots__/summary.spec.js.snap +77 -119
  177. package/src/views/common/iframe/base-iframe.js +2 -0
  178. package/src/views/common/iframe/modal-iframe.js +45 -3
  179. package/src/views/confirmation.js +15 -5
  180. package/src/views/method-selector/generate-digital-wallet.js +10 -3
  181. package/src/views/method-selector/generate-digital-wallet.spec.js +10 -0
  182. package/src/views/method-selector/get-payment-methods.js +7 -2
  183. package/src/views/method-selector/get-payment-methods.spec.js +26 -23
  184. package/src/views/method-selector/index.js +21 -28
  185. package/src/views/method-selector/method-selector.spec.js +49 -64
  186. package/src/views/method-selector/mount-methods.js +5 -8
  187. package/src/views/modal.js +6 -2
  188. package/src/views/result.js +4 -3
  189. package/src/views/summary.js +161 -117
  190. package/src/views/summary.spec.js +60 -75
  191. package/tests/mocks/rebilly-instruments-mock.js +37 -7
  192. package/tests/mocks/storefront-api-mock.js +8 -0
  193. package/tests/mocks/storefront-mock.js +17 -0
  194. package/dist/functions/mount/fetch-summary-data.js +0 -46
  195. package/dist/functions/mount/fetch-summary-data.spec.js +0 -43
  196. package/src/functions/mount/fetch-summary-data.js +0 -29
  197. 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
- const _alphaColor = new _values.default(color);
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 = theme => `
8
+ const framepayStyle = () => `
9
9
  .rebilly-instruments-framepay .rebilly-framepay {
10
- box-shadow: none;
11
- min-height: ${theme.space.form.minHeight};
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: ${theme.color.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
- border: 1px solid ${theme.color.primary};
19
- box-shadow: 0 0 0 1px ${theme.color.primary};
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: 1px solid ${theme.color.errorText};
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 = theme => `
8
+ const postmateStyle = () => `
9
9
  .rebilly-instruments-iframe {
10
10
  border: none;
11
11
  width: 100%;
12
- min-height: ${theme.space.form.minHeight};
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 = theme => `
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: ${theme.space.m};
22
- margin-left: -${theme.space.xs};
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: ${theme.space.s};
31
+ margin-left: var(--rebilly-spacings-s);
32
32
  }
33
33
 
34
34
  .rebilly-instruments-confirmation-address-actions {
35
- margin-top: ${theme.space.m};
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 ${theme.space.xs} 0 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 ${theme.space.xs};
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 ${theme.space.l};
52
+ margin: 0 0 var(--rebilly-spacings-l);
53
53
  }
54
54
 
55
55
  .rebilly-instruments-confirmation-payment-method figure {
56
- margin: 0 ${theme.space.xxs} 0 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: ${theme.borderRadius};
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 ${theme.space.s};
73
+ margin: 0 0 0 var(--rebilly-spacings-s);
74
74
  }
75
75
 
76
76
  .rebilly-instruments-confirmation-payment-method-last4 {
77
- margin: 0 ${theme.space.s};
77
+ margin: 0 var(--rebilly-spacings-s);
78
78
  }
79
79
 
80
80
  .rebilly-instruments-confirmation-payment-method-exp {
81
- color: ${theme.getComputed.color.mutedText};
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 = theme => `
11
+ const methodSelector = () => `
12
12
  /**
13
13
  * Method selector
14
14
  */
15
15
  .rebilly-instruments-method-selector.has-express-compact {
16
- padding-top: ${theme.space.s};
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 = theme => `
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: ${theme.color.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: ${theme.borderRadius};
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: ${theme.color.background};
63
+ background-color: var(--rebilly-colorBackground);
64
64
  text-align: center;
65
- border-radius: ${theme.borderRadius};
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: #ffffff;
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 = theme => `
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 ${theme.space.m} 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: ${theme.color.primary};
27
+ stroke: var(--rebilly-colorPrimary);
28
28
  }
29
29
 
30
30
  .rebilly-instruments-results-icon.is-error g {
31
- stroke: ${theme.color.errorText};
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 = theme => `
11
+ const summary = () => `
12
12
  /**
13
13
  * Summary
14
14
  */
15
15
  .rebilly-instruments-summary-line-item {
16
- border-bottom: 1px solid ${theme.getComputed.color.mutedBorder};
17
- padding: ${theme.space.s} 0;
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 ${theme.space.s} 0 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: ${theme.borderRadius};
33
- border: 1px solid ${theme.getComputed.color.mutedBorder};
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: ${theme.getComputed.color.mutedText};
51
+ color: var(--rebilly-colorMutedText);
52
52
  margin: 0;
53
- font-size: 14px;
54
- line-height: 14px;
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: ${theme.getComputed.color.mutedText};
62
- margin: 0 0 0 ${theme.spaceS};
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: ${theme.getComputed.color.mutedText};
66
+ fill: var(--rebilly-colorMutedText);
67
67
  }
68
68
 
69
69
  .rebilly-instruments-summary-line-item-price-breakdown-unit-price {
70
- color: ${theme.color.text};
70
+ color: var(--rebilly-colorText);
71
71
  }
72
72
 
73
73
  .rebilly-instruments-summary-breakdown table {
74
74
  width: 100%;
75
- margin: ${theme.space.xs} 0;
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: ${theme.space.s};
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: ${theme.space.xs};
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: ${theme.space.s} 0;
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: 24px;
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: ${theme.typography.fontSize};
120
+ font-size: var(--rebilly-fontSizeBase);
117
121
  font-weight: normal;
118
- color: ${theme.getComputed.color.mutedText};
119
- margin-right: ${theme.space.s};
122
+ color: var(--rebilly-colorMutedText);
123
+ margin-right: var(--rebilly-spacings-s);
120
124
  }
121
125
  `;
122
126