@rebilly/instruments 3.0.0-beta.0 → 3.1.2-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 (169) hide show
  1. package/dist/index.js +88 -107
  2. package/dist/index.min.js +88 -0
  3. package/package.json +17 -6
  4. package/rollup.config.js +84 -0
  5. package/src/functions/mount/fetch-data.js +13 -1
  6. package/src/functions/mount/index.js +6 -42
  7. package/src/functions/mount/setup-framepay-theme.js +2 -2
  8. package/src/functions/mount/setup-options.js +3 -0
  9. package/src/functions/mount/setup-user-flow.js +49 -0
  10. package/src/functions/purchase.js +1 -1
  11. package/src/functions/setup.js +1 -1
  12. package/src/functions/show.spec.js +1 -1
  13. package/src/i18n/en.json +3 -0
  14. package/src/i18n/index.js +1 -1
  15. package/src/index.js +1 -61
  16. package/src/instance.js +65 -0
  17. package/src/{index.spec.js → instance.spec.js} +2 -1
  18. package/src/loader/index.js +21 -1
  19. package/src/storefront/models/ready-to-pay-model.js +13 -2
  20. package/src/storefront/plans.js +8 -4
  21. package/src/storefront/plans.spec.js +8 -2
  22. package/src/storefront/products.js +8 -4
  23. package/src/storefront/products.spec.js +8 -2
  24. package/src/storefront/ready-to-pay.js +5 -4
  25. package/src/style/base/__snapshots__/theme.spec.js.snap +34 -2
  26. package/src/style/base/default-theme.js +106 -3
  27. package/src/style/components/button.js +17 -1
  28. package/src/style/components/forms/label.js +0 -5
  29. package/src/style/components/loader.js +2 -1
  30. package/src/style/payment-instruments/payment-card.js +2 -1
  31. package/src/style/utils/remove-empty-null.js +9 -9
  32. package/src/style/vendor/postmate.js +13 -0
  33. package/src/style/views/confirmation.js +2 -1
  34. package/src/views/common/iframe/base-iframe.js +2 -0
  35. package/src/views/common/iframe/event-listeners.js +10 -0
  36. package/src/views/common/iframe/method-iframe.js +3 -1
  37. package/src/views/confirmation.js +1 -0
  38. package/src/views/method-selector/express-methods/{google-pay.js → index.js} +3 -2
  39. package/src/views/method-selector/mount-express-methods.js +6 -18
  40. package/src/views/result.js +1 -0
  41. package/tests/mocks/rebilly-instruments-mock.js +2 -2
  42. package/dist/events/base-event.js +0 -66
  43. package/dist/events/events.spec.js +0 -18
  44. package/dist/events/index.js +0 -22
  45. package/dist/functions/destroy.js +0 -34
  46. package/dist/functions/destroy.spec.js +0 -69
  47. package/dist/functions/mount/fetch-data.js +0 -187
  48. package/dist/functions/mount/fetch-data.spec.js +0 -189
  49. package/dist/functions/mount/index.js +0 -218
  50. package/dist/functions/mount/mount.spec.js +0 -64
  51. package/dist/functions/mount/setup-element.js +0 -40
  52. package/dist/functions/mount/setup-framepay-theme.js +0 -95
  53. package/dist/functions/mount/setup-framepay.js +0 -46
  54. package/dist/functions/mount/setup-i18n.js +0 -33
  55. package/dist/functions/mount/setup-options.js +0 -99
  56. package/dist/functions/mount/setup-options.spec.js +0 -66
  57. package/dist/functions/mount/setup-storefront.js +0 -34
  58. package/dist/functions/mount/setup-styles.js +0 -43
  59. package/dist/functions/on.js +0 -40
  60. package/dist/functions/on.spec.js +0 -55
  61. package/dist/functions/purchase.js +0 -158
  62. package/dist/functions/purchase.spec.js +0 -74
  63. package/dist/functions/setup.js +0 -85
  64. package/dist/functions/setup.spec.js +0 -87
  65. package/dist/functions/show.js +0 -55
  66. package/dist/functions/show.spec.js +0 -61
  67. package/dist/functions/update.js +0 -74
  68. package/dist/functions/update.spec.js +0 -86
  69. package/dist/i18n/en.json +0 -22
  70. package/dist/i18n/es.json +0 -22
  71. package/dist/i18n/i18n.spec.js +0 -22
  72. package/dist/i18n/index.js +0 -72
  73. package/dist/index.spec.js +0 -35
  74. package/dist/loader/index.js +0 -94
  75. package/dist/loader/loader.spec.js +0 -69
  76. package/dist/storefront/index.js +0 -73
  77. package/dist/storefront/invoices.js +0 -27
  78. package/dist/storefront/models/base-model.js +0 -18
  79. package/dist/storefront/models/invoice-model.js +0 -14
  80. package/dist/storefront/models/plan-model.js +0 -14
  81. package/dist/storefront/models/product-model.js +0 -14
  82. package/dist/storefront/models/ready-to-pay-model.js +0 -46
  83. package/dist/storefront/models/summary-model.js +0 -79
  84. package/dist/storefront/models/transaction-model.js +0 -31
  85. package/dist/storefront/payment-instruments.js +0 -47
  86. package/dist/storefront/payment-instruments.spec.js +0 -55
  87. package/dist/storefront/plans.js +0 -37
  88. package/dist/storefront/plans.spec.js +0 -64
  89. package/dist/storefront/products.js +0 -40
  90. package/dist/storefront/products.spec.js +0 -65
  91. package/dist/storefront/purchase.js +0 -43
  92. package/dist/storefront/purchase.spec.js +0 -48
  93. package/dist/storefront/ready-to-pay.js +0 -58
  94. package/dist/storefront/ready-to-pay.spec.js +0 -69
  95. package/dist/storefront/storefront.spec.js +0 -15
  96. package/dist/storefront/summary.js +0 -55
  97. package/dist/storefront/summary.spec.js +0 -124
  98. package/dist/storefront/transactions.js +0 -27
  99. package/dist/style/base/__snapshots__/theme.spec.js.snap +0 -195
  100. package/dist/style/base/default-theme.js +0 -699
  101. package/dist/style/base/index.js +0 -104
  102. package/dist/style/base/theme.js +0 -41
  103. package/dist/style/base/theme.spec.js +0 -19
  104. package/dist/style/browserslist.js +0 -8
  105. package/dist/style/components/address.js +0 -64
  106. package/dist/style/components/button.js +0 -71
  107. package/dist/style/components/divider.js +0 -48
  108. package/dist/style/components/forms/checkbox.js +0 -86
  109. package/dist/style/components/forms/field.js +0 -65
  110. package/dist/style/components/forms/form.js +0 -28
  111. package/dist/style/components/forms/input.js +0 -86
  112. package/dist/style/components/forms/label.js +0 -69
  113. package/dist/style/components/forms/select.js +0 -95
  114. package/dist/style/components/forms/validation.js +0 -81
  115. package/dist/style/components/icons.js +0 -22
  116. package/dist/style/components/index.js +0 -57
  117. package/dist/style/components/loader.js +0 -50
  118. package/dist/style/components/methods.js +0 -108
  119. package/dist/style/components/overlay.js +0 -33
  120. package/dist/style/helpers/index.js +0 -59
  121. package/dist/style/index.js +0 -50
  122. package/dist/style/payment-instruments/content.js +0 -17
  123. package/dist/style/payment-instruments/index.js +0 -20
  124. package/dist/style/payment-instruments/payment-card.js +0 -35
  125. package/dist/style/utils/border.js +0 -47
  126. package/dist/style/utils/color-values.js +0 -58
  127. package/dist/style/utils/remove-empty-null.js +0 -20
  128. package/dist/style/vendor/framepay.js +0 -37
  129. package/dist/style/vendor/postmate.js +0 -17
  130. package/dist/style/views/confirmation.js +0 -85
  131. package/dist/style/views/index.js +0 -29
  132. package/dist/style/views/method-selector.js +0 -20
  133. package/dist/style/views/modal.js +0 -93
  134. package/dist/style/views/result.js +0 -61
  135. package/dist/style/views/summary.js +0 -127
  136. package/dist/utils/add-dom-element.js +0 -26
  137. package/dist/utils/format-currency.js +0 -15
  138. package/dist/utils/has-valid-css-selector.js +0 -11
  139. package/dist/utils/index.js +0 -55
  140. package/dist/utils/is-dom-element.js +0 -10
  141. package/dist/utils/process-property-as-dom-element.js +0 -38
  142. package/dist/utils/sleep.js +0 -10
  143. package/dist/views/__snapshots__/summary.spec.js.snap +0 -246
  144. package/dist/views/common/iframe/base-iframe.js +0 -59
  145. package/dist/views/common/iframe/event-listeners.js +0 -50
  146. package/dist/views/common/iframe/index.js +0 -19
  147. package/dist/views/common/iframe/method-iframe.js +0 -33
  148. package/dist/views/common/iframe/modal-iframe.js +0 -84
  149. package/dist/views/common/iframe/view-iframe.js +0 -31
  150. package/dist/views/common/render-utilities.js +0 -11
  151. package/dist/views/confirmation.js +0 -92
  152. package/dist/views/method-selector/__snapshots__/method-selector.spec.js.snap +0 -3
  153. package/dist/views/method-selector/express-methods/apple-pay.js +0 -92
  154. package/dist/views/method-selector/express-methods/google-pay.js +0 -31
  155. package/dist/views/method-selector/express-methods/paypal.js +0 -19
  156. package/dist/views/method-selector/generate-digital-wallet.js +0 -68
  157. package/dist/views/method-selector/generate-digital-wallet.spec.js +0 -135
  158. package/dist/views/method-selector/get-method-data.js +0 -25
  159. package/dist/views/method-selector/get-payment-methods.js +0 -66
  160. package/dist/views/method-selector/get-payment-methods.spec.js +0 -46
  161. package/dist/views/method-selector/index.js +0 -122
  162. package/dist/views/method-selector/method-selector.spec.js +0 -124
  163. package/dist/views/method-selector/mount-express-methods.js +0 -69
  164. package/dist/views/method-selector/mount-methods.js +0 -74
  165. package/dist/views/modal.js +0 -88
  166. package/dist/views/result.js +0 -40
  167. package/dist/views/summary.js +0 -215
  168. package/dist/views/summary.spec.js +0 -134
  169. package/src/views/method-selector/express-methods/paypal.js +0 -7
@@ -1,95 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.select = void 0;
7
-
8
- // -----------------------------------------------------------------------------
9
- // This file contains all styles related to the select component.
10
- // -----------------------------------------------------------------------------
11
- const select = () => `
12
- /**
13
- * Select
14
- */
15
- .rebilly-instruments-form-field-select {
16
- font-size: var(--rebilly-inputFontSize);
17
- font-family: var(--rebilly-inputFontFamily);
18
- font-weight: var(--rebilly-inputFontWeight);
19
- line-height: var(--rebilly-inputFontLineHeight);
20
- padding: var(--rebilly-spacings-input-py) var(--rebilly-spacings-input-px);
21
- min-height: var(--rebilly-spacings-form-element-min-height);
22
- border: var(--rebilly-inputBorder);
23
- border-radius: var(--rebilly-inputBorderRadius);
24
- color: var(--rebilly-inputColorText);
25
- background: var(--rebilly-inputColorBackground);
26
- box-sizing: border-box;
27
- box-shadow: var(--rebilly-inputBoxShadow);
28
- width: 100%;
29
- transition: all 200ms;
30
- order: 1;
31
- }
32
-
33
- .rebilly-instruments-form-field-select:hover {
34
- background: var(--rebilly-inputHoverColorBackground);
35
- color: var(--rebilly-inputHoverColorText);
36
- font-family: var(--rebilly-inputHoverFontFamily);
37
- font-size: var(--rebilly-inputHoverFontSize);
38
- line-height: var(--rebilly-inputHoverFontLineHeight);
39
- font-weight: var(--rebilly-inputHoverFontWeight);
40
- border: var(--rebilly-inputHoverBorder);
41
- border-radius: var(--rebilly-inputHoverBorderRadius);
42
- box-shadow: var(--rebilly-inputHoverBoxShadow);
43
- }
44
-
45
- .rebilly-instruments-form-field-select:focus {
46
- outline: none;
47
- background: var(--rebilly-inputFocusColorBackground);
48
- color: var(--rebilly-inputFocusColorText);
49
- font-family: var(--rebilly-inputFocusFontFamily);
50
- font-size: var(--rebilly-inputFocusFontSize);
51
- line-height: var(--rebilly-inputFocusFontLineHeight);
52
- font-weight: var(--rebilly-inputFocusFontWeight);
53
- border: var(--rebilly-inputFocusBorder);
54
- border-radius: var(--rebilly-inputFocusBorderRadius);
55
- box-shadow: var(--rebilly-inputFocusBoxShadow);
56
- }
57
-
58
- .rebilly-instruments-form-field-select::selection {
59
- color: var(--rebilly-inputSelectionColorText);
60
- background: var(--rebilly-inputSelectionColorBackground);
61
- }
62
-
63
-
64
- .rebilly-instruments-form-field-select:disabled {
65
- opacity: 0.6;
66
- }
67
-
68
- .rebilly-instruments-form-field-select {
69
- -webkit-appearance: none;
70
- -moz-appearance: none;
71
- }
72
-
73
- .rebilly-instruments-form-field-select::-ms-expand { display: none; }
74
-
75
- .rebilly-instruments-form-field-select-arrow {
76
- border: solid var(--rebilly-inputColorText);
77
- position: absolute;
78
- width: var(--rebilly-spacings-xs);
79
- height: var(--rebilly-spacings-xs);
80
- border-width: 0 2px 2px 0;
81
- border-radius: 1px;
82
- right: var(--rebilly-spacings-s);
83
- top: 50%;
84
- margin-top: calc(var(--rebilly-inputFontSize) * 0.875 - var(--rebilly-spacings-xs));
85
- transform: translateY(-50%) rotate(45deg);
86
- }
87
-
88
- .is-floating .rebilly-instruments-form-field-select-arrow {
89
- top: 50%;
90
- margin-top: 0;
91
- transform: translateY(-50%) rotate(45deg);
92
- }
93
- `;
94
-
95
- exports.select = select;
@@ -1,81 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.validation = void 0;
7
-
8
- // -----------------------------------------------------------------------------
9
- // This file contains all styles related to the form validations.
10
- // -----------------------------------------------------------------------------
11
- const validation = () => `
12
- /**
13
- * Validations
14
- */
15
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input,
16
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select {
17
- font-family: var(--rebilly-inputErrorFontFamily);
18
- font-size: var(--rebilly-inputErrorFontSize);
19
- font-weight: var(--rebilly-inputErrorFontWeight);
20
- line-height: var(--rebilly-inputErrorFontLineHeight);
21
- background: var(--rebilly-inputErrorColorBackground);
22
- color: var(--rebilly-inputErrorColorText);
23
- border: var(--rebilly-inputErrorBorder);
24
- border-radius: var(--rebilly-inputErrorBorderRadius);
25
- box-shadow: var(--rebilly-inputErrorBoxShadow);
26
- }
27
-
28
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input:hover,
29
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select:hover {
30
- font-family: var(--rebilly-inputErrorHoverFontFamily);
31
- font-size: var(--rebilly-inputErrorHoverFontSize);
32
- font-weight: var(--rebilly-inputErrorHoverFontWeight);
33
- line-height: var(--rebilly-inputErrorHoverFontLineHeight);
34
- background: var(--rebilly-inputErrorHoverColorBackground);
35
- color: var(--rebilly-inputErrorHoverColorText);
36
- border: var(--rebilly-inputErrorHoverBorder);
37
- border-radius: var(--rebilly-inputErrorHoverBorderRadius);
38
- box-shadow: var(--rebilly-inputErrorHoverBoxShadow);
39
- }
40
-
41
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input:focus,
42
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select:focus {
43
- font-family: var(--rebilly-inputErrorFocusFontFamily);
44
- font-size: var(--rebilly-inputErrorFocusFontSize);
45
- font-weight: var(--rebilly-inputErrorFocusFontWeight);
46
- line-height: var(--rebilly-inputErrorFocusFontLineHeight);
47
- background: var(--rebilly-inputErrorFocusColorBackground);
48
- color: var(--rebilly-inputErrorFocusColorText);
49
- border: var(--rebilly-inputErrorFocusBorder);
50
- border-radius: var(--rebilly-inputErrorFocusBorderRadius);
51
- box-shadow: var(--rebilly-inputErrorFocusBoxShadow);
52
- }
53
-
54
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input::placeholder {
55
- color: var(--rebilly-inputErrorPlaceholderColorText);
56
- font-family: var(--rebilly-inputErrorPlaceholderFontFamily);
57
- font-size: var(--rebilly-inputErrorPlaceholderFontSize);
58
- line-height: var(--rebilly-inputErrorPlaceholderFontLineHeight);
59
- font-weight: var(--rebilly-inputErrorPlaceholderFontWeight);
60
- }
61
-
62
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input::selection,
63
- .rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select::selection {
64
- color: var(--rebilly-inputErrorSelectionColorText);
65
- background: var(--rebilly-inputErrorSelectionColorBackground);
66
- }
67
-
68
- .rebilly-instruments-form-field-error-wrapper {
69
- margin-top: var(--rebilly-spacings-2xs);
70
- margin-bottom: 0;
71
- padding: 0;
72
- list-style: none;
73
- }
74
-
75
- .rebilly-instruments-form-field-error-wrapper > li {
76
- color: var(--rebilly-colorDanger);
77
- padding: 0;
78
- }
79
- `;
80
-
81
- exports.validation = validation;
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.icons = void 0;
7
-
8
- // -----------------------------------------------------------------------------
9
- // This file contains all styles related to the icons component.
10
- // -----------------------------------------------------------------------------
11
- const icons = () => `
12
- /**
13
- * Icons
14
- */
15
- .rebilly-instruments-icon {
16
- width: var(--rebilly-fontLineHeightBase, calc(var(--rebilly-fontSizeBase) * 1.5));
17
- height: var(--rebilly-fontLineHeightBase, calc(var(--rebilly-fontSizeBase) * 1.5));
18
- fill: var(--rebilly-colorText);
19
- }
20
- `;
21
-
22
- exports.icons = icons;
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.components = void 0;
7
-
8
- var _methods = require("./methods");
9
-
10
- var _form = require("./forms/form");
11
-
12
- var _checkbox = require("./forms/checkbox");
13
-
14
- var _field = require("./forms/field");
15
-
16
- var _input = require("./forms/input");
17
-
18
- var _label = require("./forms/label");
19
-
20
- var _select = require("./forms/select");
21
-
22
- var _validation = require("./forms/validation");
23
-
24
- var _button = require("./button");
25
-
26
- var _divider = require("./divider");
27
-
28
- var _loader = require("./loader");
29
-
30
- var _icons = require("./icons");
31
-
32
- var _address = require("./address");
33
-
34
- var _overlay = require("./overlay");
35
-
36
- // Order of components matters for style cascade
37
- const components = theme => `
38
- /* Components
39
- ------------------------------------------------------------ */
40
- ${(0, _methods.expressMethods)(theme)}
41
- ${(0, _methods.methods)()}
42
- ${(0, _form.form)(theme)}
43
- ${(0, _field.field)(theme)}
44
- ${(0, _input.input)(theme)}
45
- ${(0, _select.select)(theme)}
46
- ${(0, _label.label)(theme)}
47
- ${(0, _checkbox.checkbox)(theme)}
48
- ${(0, _validation.validation)(theme)}
49
- ${(0, _button.button)(theme)}
50
- ${(0, _divider.divider)(theme)}
51
- ${(0, _loader.loader)(theme)}
52
- ${(0, _icons.icons)(theme)}
53
- ${(0, _address.address)(theme)}
54
- ${(0, _overlay.overlay)(theme)}
55
- `;
56
-
57
- exports.components = components;
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.loader = void 0;
7
-
8
- var _colorValues = require("../utils/color-values");
9
-
10
- // -----------------------------------------------------------------------------
11
- // This file contains all styles related to the loader component.
12
- // -----------------------------------------------------------------------------
13
- const loader = theme => `
14
- /**
15
- * Loader
16
- */
17
- .rebilly-instruments-loader {
18
- display: none;
19
- position: absolute;
20
- top: 0;
21
- bottom: 0;
22
- left: 0;
23
- right: 0;
24
- justify-content: center;
25
- align-items: center;
26
- background-color: var(--rebilly-colorBackground);
27
- z-index: 9000;
28
- transition: all 200ms;
29
- }
30
-
31
- .rebilly-instruments-loader.is-active {
32
- display: flex;
33
- }
34
-
35
- .rebilly-instruments-loader-spinner {
36
- border: 4px solid ${(0, _colorValues.lighten)(theme.colorPrimary, 80)};
37
- border-top: 4px solid var(--rebilly-colorPrimary);
38
- border-radius: 50%;
39
- width: 40px;
40
- height: 40px;
41
- animation: spin 0.5s ease infinite;
42
- }
43
-
44
- @keyframes spin {
45
- 0% { transform: rotate(0deg); }
46
- 100% { transform: rotate(360deg); }
47
- }
48
- `;
49
-
50
- exports.loader = loader;
@@ -1,108 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.methods = exports.expressMethods = void 0;
7
-
8
- // -----------------------------------------------------------------------------
9
- // This file contains all styles related to the methods component.
10
- // -----------------------------------------------------------------------------
11
- const expressMethods = () => `
12
- /**
13
- * Express methods
14
- */
15
-
16
- @keyframes rebillyExpressShine {
17
- to {
18
- background-position-x: -200%;
19
- }
20
- }
21
-
22
- .rebilly-instruments-express-methods.is-compact {
23
- border: 1px solid var(--rebilly-colorMutedBorder);
24
- padding: var(--rebilly-spacings-s);
25
- padding-top: calc(var(--rebilly-spacings-xs) + var(--rebilly-spacings-s));
26
- padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacings-2xs));
27
- border-radius: 4px;
28
- position: relative;
29
- }
30
-
31
- .rebilly-instruments-express-methods .rebilly-instruments-iframe {
32
- display: block;
33
- margin-bottom: 0;
34
- height: 44px;
35
- }
36
-
37
- .rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {
38
- border-radius: 6px;
39
- margin-bottom: var(--rebilly-spacings-xs);
40
- background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);
41
- background-size: 200% 100%;
42
- animation: 1.5s rebillyExpressShine linear infinite;
43
- height: 44px;
44
- }
45
- .rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {
46
- margin: 0;
47
- }
48
-
49
- .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {
50
- display: flex;
51
- justify-content: center;
52
- }
53
-
54
- .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {
55
- flex: 1 1 0px;
56
- max-width: 260px;
57
- margin: 0 var(--rebilly-spacings-xs);
58
- }
59
- .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {
60
- margin-left: 0;
61
- }
62
- .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {
63
- margin-right: 0;
64
- }
65
-
66
- .rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {
67
- display: none;
68
- }
69
- .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {
70
- position: absolute;
71
- top: 0; left: 50%;
72
- transform: translateX(-50%) translateY(-50%);
73
- color: var(--rebilly-colorText);
74
- padding: var(--rebilly-spacings-2xs) var(--rebilly-spacings-s);
75
- line-height: 1;
76
- background: var(--rebilly-colorBackground);
77
- display: inline-block;
78
- font-weight: 500;
79
- min-height: auto;
80
- margin: 0;
81
- white-space: nowrap;
82
- }
83
-
84
- @media (max-width: 600px) {
85
- .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {
86
- flex-direction: column;
87
- }
88
- .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {
89
- max-width: 100%;
90
- margin: 0 0 var(--rebilly-spacings-xs);
91
- }
92
- .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {
93
- margin: 0;
94
- }
95
- }
96
- `;
97
-
98
- exports.expressMethods = expressMethods;
99
-
100
- const methods = () => `
101
- /**
102
- * Methods
103
- */
104
-
105
- .rebilly-instruments-methods {}
106
- `;
107
-
108
- exports.methods = methods;
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.overlay = void 0;
7
-
8
- // -----------------------------------------------------------------------------
9
- // This file contains all styles related to the overlay component.
10
- // -----------------------------------------------------------------------------
11
- const overlay = () => `
12
- /**
13
- * Overlay
14
- */
15
- .rebilly-instruments-overlay {
16
- position: fixed;
17
- left: 0;
18
- right: 0;
19
- top: 0;
20
- bottom: 0;
21
- background: rgba(0,0,0,0.8);
22
- display: flex;
23
- justify-content: center;
24
- align-items: center;
25
- color: #FFF;
26
- font-family: var(--rebilly-fontFamily);
27
- font-size: calc(var(--rebilly-fontSizeBase) * 1.12);
28
- line-height: var(--rebilly-fontLineHeightBase, calc(var(--rebilly-fontSizeBase) * 1.5));
29
- z-index: 9001
30
- }
31
- `;
32
-
33
- exports.overlay = overlay;
@@ -1,59 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.helpers = void 0;
7
-
8
- // -----------------------------------------------------------------------------
9
- // This file contains all styles related to helpers.
10
- // -----------------------------------------------------------------------------
11
- const helpers = () => `
12
- /* Helpers
13
- ------------------------------------------------------------ */
14
- .rebilly-instruments-helper-visually-hidden {
15
- border: 0;
16
- clip: rect(0 0 0 0);
17
- height: 1px;
18
- margin: -1px;
19
- overflow: hidden;
20
- padding: 0;
21
- position: absolute;
22
- width: 1px;
23
- }
24
-
25
- .rebilly-instruments-helper-mt-xxs { margin-top: var(--rebilly-spacings-2xs) !important }
26
- .rebilly-instruments-helper-mt-xs { margin-top: var(--rebilly-spacings-xs) !important }
27
- .rebilly-instruments-helper-mt-s { margin-top: var(--rebilly-spacings-s) !important }
28
- .rebilly-instruments-helper-mt-m { margin-top: var(--rebilly-spacings-base) !important }
29
- .rebilly-instruments-helper-mt-l { margin-top: var(--rebilly-spacings-l) !important }
30
- .rebilly-instruments-helper-mt-xl { margin-top: var(--rebilly-spacings-xl) !important }
31
- .rebilly-instruments-helper-mt-xxl { margin-top: var(--rebilly-spacings-2xl) !important }
32
- .rebilly-instruments-helper-mt-0 { margin-top: 0!important }
33
- .rebilly-instruments-helper-mr-xxs { margin-right: var(--rebilly-spacings-2xs) !important }
34
- .rebilly-instruments-helper-mr-xs { margin-right: var(--rebilly-spacings-xs) !important }
35
- .rebilly-instruments-helper-mr-s { margin-right: var(--rebilly-spacings-s) !important }
36
- .rebilly-instruments-helper-mr-m { margin-right: var(--rebilly-spacings-base) !important }
37
- .rebilly-instruments-helper-mr-l { margin-right: var(--rebilly-spacings-l) !important }
38
- .rebilly-instruments-helper-mr-xl { margin-right: var(--rebilly-spacings-xl) !important }
39
- .rebilly-instruments-helper-mr-xxl { margin-right: var(--rebilly-spacings-2xl) !important }
40
- .rebilly-instruments-helper-mr-0 { margin-right: 0!important }
41
- .rebilly-instruments-helper-mb-xxs { margin-bottom: var(--rebilly-spacings-2xs) !important }
42
- .rebilly-instruments-helper-mb-xs { margin-bottom: var(--rebilly-spacings-xs) !important }
43
- .rebilly-instruments-helper-mb-s { margin-bottom: var(--rebilly-spacings-s) !important }
44
- .rebilly-instruments-helper-mb-m { margin-bottom: var(--rebilly-spacings-base) !important }
45
- .rebilly-instruments-helper-mb-l { margin-bottom: var(--rebilly-spacings-l) !important }
46
- .rebilly-instruments-helper-mb-xl { margin-bottom: var(--rebilly-spacings-xl) !important }
47
- .rebilly-instruments-helper-mb-xxl { margin-bottom: var(--rebilly-spacings-2xl) !important }
48
- .rebilly-instruments-helper-mb-0 { margin-bottom: 0!important }
49
- .rebilly-instruments-helper-ml-xxs { margin-left: var(--rebilly-spacings-2xs) !important }
50
- .rebilly-instruments-helper-ml-xs { margin-left: var(--rebilly-spacings-xs) !important }
51
- .rebilly-instruments-helper-ml-s { margin-left: var(--rebilly-spacings-s) !important }
52
- .rebilly-instruments-helper-ml-m { margin-left: var(--rebilly-spacings-base) !important }
53
- .rebilly-instruments-helper-ml-l { margin-left: var(--rebilly-spacings-l) !important }
54
- .rebilly-instruments-helper-ml-xl { margin-left: var(--rebilly-spacings-xl) !important }
55
- .rebilly-instruments-helper-ml-xxl { margin-left: var(--rebilly-spacings-2xl) !important }
56
- .rebilly-instruments-helper-ml-0 { margin-left: 0!important }
57
- `;
58
-
59
- exports.helpers = helpers;
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.mainStyle = void 0;
7
-
8
- var _postcss = _interopRequireDefault(require("postcss"));
9
-
10
- var _autoprefixer = _interopRequireDefault(require("autoprefixer"));
11
-
12
- var _browserslist = require("./browserslist");
13
-
14
- var _removeEmptyNull = _interopRequireDefault(require("./utils/remove-empty-null"));
15
-
16
- var _theme = require("./base/theme");
17
-
18
- var _base = require("./base");
19
-
20
- var _framepay = require("./vendor/framepay");
21
-
22
- var _postmate = require("./vendor/postmate");
23
-
24
- var _components = require("./components");
25
-
26
- var _paymentInstruments = require("./payment-instruments");
27
-
28
- var _views = require("./views");
29
-
30
- var _helpers = require("./helpers");
31
-
32
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
-
34
- const mainStyle = async themeOverride => {
35
- const resolvedTheme = new _theme.Theme(themeOverride).build();
36
- const style = `
37
- ${(0, _base.base)(resolvedTheme)}
38
- ${(0, _components.components)(resolvedTheme)}
39
- ${(0, _views.views)(resolvedTheme)}
40
- ${(0, _paymentInstruments.paymentInstruments)(resolvedTheme)}
41
- ${(0, _framepay.framepayStyle)(resolvedTheme)}
42
- ${(0, _postmate.postmateStyle)(resolvedTheme)}
43
- ${(0, _helpers.helpers)(resolvedTheme)}
44
- `;
45
- return (0, _postcss.default)([_removeEmptyNull.default, (0, _autoprefixer.default)(_browserslist.browserslist)]).process(style, {
46
- from: undefined
47
- }).then(result => result.css);
48
- };
49
-
50
- exports.mainStyle = mainStyle;
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.methodContent = void 0;
7
-
8
- const methodContent = () => `
9
- /**
10
- * Content
11
- */
12
- .rebilly-instruments-method-content {
13
- padding: 2px;
14
- }
15
- `;
16
-
17
- exports.methodContent = methodContent;
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.paymentInstruments = void 0;
7
-
8
- var _content = require("./content");
9
-
10
- var _paymentCard = require("./payment-card");
11
-
12
- // Order of components matters for style cascade
13
- const paymentInstruments = theme => `
14
- /* Payment instruments
15
- ------------------------------------------------------------ */
16
- ${(0, _content.methodContent)()}
17
- ${(0, _paymentCard.paymentCard)(theme)}
18
- `;
19
-
20
- exports.paymentInstruments = paymentInstruments;
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.paymentCard = void 0;
7
-
8
- const paymentCard = () => `
9
- /**
10
- * Payment card
11
- */
12
- .rebilly-instruments-payment-card-brands {
13
- display: inline-flex;
14
- width: 100%;
15
- justify-content: flex-end;
16
- margin-top: var(--rebilly-spacings-s);
17
- }
18
-
19
- .rebilly-instruments-payment-card-brands figure {
20
- margin: 0 0 0 var(--rebilly-spacings-2xs);
21
- padding: 0;
22
- height: 26px;
23
- }
24
-
25
- .rebilly-instruments-payment-card-brands figure img {
26
- width: 42px;
27
- border-radius: 4px;
28
- }
29
-
30
- .rebilly-instruments-modal-container.rebilly-instruments-payment-card {
31
- max-width: 600px;
32
- }
33
- `;
34
-
35
- exports.paymentCard = paymentCard;
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
-
10
- class Border {
11
- constructor(str) {
12
- _defineProperty(this, "allStyles", ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset', 'initial', 'inherit']);
13
-
14
- this.str = str || '';
15
- const style = this.allStyles.find(s => this.str.includes(s));
16
- const borderProps = this.str.split(style).map(a => a.trim());
17
- this.border = [borderProps[0], style, borderProps[1]];
18
- }
19
-
20
- get stylePosition() {
21
- let stylePosition = 0;
22
-
23
- if (this.border.length === 3) {
24
- stylePosition = 1;
25
- } else if (this.border.length === 2) {
26
- if (this.allStyles.includes(this.border[0])) {
27
- stylePosition = 0;
28
- } else {
29
- stylePosition = 1;
30
- }
31
- }
32
-
33
- return stylePosition;
34
- }
35
-
36
- updateColor(color) {
37
- this.border[this.stylePosition + 1] = color;
38
- return this;
39
- }
40
-
41
- get value() {
42
- return this.border.join(' ');
43
- }
44
-
45
- }
46
-
47
- exports.default = Border;