@rebilly/instruments 4.8.1 → 4.8.2
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/CHANGELOG.md +7 -0
- package/dist/index.js +1 -1
- package/dist/index.min.js +1 -1
- package/package.json +5 -1
- package/.babelrc +0 -26
- package/project.json +0 -31
- package/rollup.config.mjs +0 -79
- package/src/data/options-schema/index.js +0 -112
- package/src/data/options-schema/schemas/options-schema.js +0 -448
- package/src/events/base-event.js +0 -47
- package/src/events/events.spec.js +0 -11
- package/src/events/index.js +0 -15
- package/src/functions/destroy.js +0 -29
- package/src/functions/destroy.spec.js +0 -63
- package/src/functions/mount/fetch-data.js +0 -236
- package/src/functions/mount/fetch-data.spec.js +0 -317
- package/src/functions/mount/get-lead-source-data.js +0 -46
- package/src/functions/mount/get-lead-source-data.spec.js +0 -38
- package/src/functions/mount/index.js +0 -105
- package/src/functions/mount/mount.spec.js +0 -96
- package/src/functions/mount/setup-element.js +0 -29
- package/src/functions/mount/setup-framepay-theme.js +0 -104
- package/src/functions/mount/setup-framepay.js +0 -26
- package/src/functions/mount/setup-i18n.js +0 -21
- package/src/functions/mount/setup-options.js +0 -100
- package/src/functions/mount/setup-options.spec.js +0 -353
- package/src/functions/mount/setup-storefront.js +0 -23
- package/src/functions/mount/setup-styles-vars.js +0 -30
- package/src/functions/mount/setup-user-flow.js +0 -60
- package/src/functions/on.js +0 -22
- package/src/functions/on.spec.js +0 -75
- package/src/functions/purchase.js +0 -173
- package/src/functions/purchase.spec.js +0 -80
- package/src/functions/setup.js +0 -66
- package/src/functions/setup.spec.js +0 -111
- package/src/functions/show.js +0 -30
- package/src/functions/show.spec.js +0 -62
- package/src/functions/update.js +0 -40
- package/src/functions/update.spec.js +0 -104
- package/src/i18n/en.json +0 -35
- package/src/i18n/es.json +0 -32
- package/src/i18n/i18n.spec.js +0 -27
- package/src/i18n/index.js +0 -59
- package/src/index.js +0 -3
- package/src/instance.js +0 -48
- package/src/instance.spec.js +0 -44
- package/src/loader/index.js +0 -145
- package/src/loader/loader.spec.js +0 -74
- package/src/state/iframes.js +0 -23
- package/src/state/index.js +0 -64
- package/src/storefront/account-and-website.js +0 -18
- package/src/storefront/account-and-website.spec.js +0 -73
- package/src/storefront/deposit-requests.js +0 -12
- package/src/storefront/fetch-plans-from-addons-bumpOffer.js +0 -30
- package/src/storefront/fetch-products-from-plans.js +0 -59
- package/src/storefront/fetch-products-from-plans.spec.js +0 -113
- package/src/storefront/index.js +0 -78
- package/src/storefront/invoices.js +0 -23
- package/src/storefront/invoices.spec.js +0 -92
- package/src/storefront/models/account-model.js +0 -36
- package/src/storefront/models/base-model.js +0 -7
- package/src/storefront/models/deposit-request-model.js +0 -24
- package/src/storefront/models/invoice-model.js +0 -20
- package/src/storefront/models/payment-metadata.js +0 -7
- package/src/storefront/models/plan-model.js +0 -94
- package/src/storefront/models/product-model.js +0 -3
- package/src/storefront/models/ready-to-pay-model.js +0 -76
- package/src/storefront/models/summary-model.js +0 -56
- package/src/storefront/models/transaction-model.js +0 -16
- package/src/storefront/models/website-model.js +0 -3
- package/src/storefront/payment-instruments.js +0 -47
- package/src/storefront/payment-instruments.spec.js +0 -88
- package/src/storefront/purchase.js +0 -60
- package/src/storefront/purchase.spec.js +0 -53
- package/src/storefront/ready-to-pay.js +0 -96
- package/src/storefront/ready-to-pay.spec.js +0 -76
- package/src/storefront/storefront.spec.js +0 -14
- package/src/storefront/summary.js +0 -114
- package/src/storefront/summary.spec.js +0 -136
- package/src/storefront/transactions.js +0 -12
- package/src/style/base/__snapshots__/theme.spec.js.snap +0 -143
- package/src/style/base/default-theme.js +0 -955
- package/src/style/base/index.js +0 -688
- package/src/style/base/theme.js +0 -30
- package/src/style/base/theme.spec.js +0 -19
- package/src/style/index.js +0 -11
- package/src/style/utils/border.js +0 -47
- package/src/style/utils/color-values.js +0 -35
- package/src/style/utils/minifyCss.js +0 -14
- package/src/utils/add-dom-element.js +0 -17
- package/src/utils/format-currency.js +0 -8
- package/src/utils/has-valid-css-selector.js +0 -4
- package/src/utils/index.js +0 -15
- package/src/utils/is-dom-element.js +0 -3
- package/src/utils/process-property-as-dom-element.js +0 -31
- package/src/utils/quantity.js +0 -47
- package/src/utils/sleep.js +0 -5
- package/src/views/amount-selector.js +0 -46
- package/src/views/common/iframe/base-iframe.js +0 -66
- package/src/views/common/iframe/events/change-iframe-src-handler.js +0 -6
- package/src/views/common/iframe/events/dispatch-event-handler.js +0 -8
- package/src/views/common/iframe/events/resize-component-handler.js +0 -9
- package/src/views/common/iframe/events/show-error-handler.js +0 -5
- package/src/views/common/iframe/events/stop-loader-handler.js +0 -9
- package/src/views/common/iframe/events/update-addons-handler.js +0 -23
- package/src/views/common/iframe/events/update-coupons-handler.js +0 -12
- package/src/views/common/iframe/events/update-items-handler.js +0 -34
- package/src/views/common/iframe/index.js +0 -5
- package/src/views/common/iframe/modal-iframe.js +0 -82
- package/src/views/common/iframe/view-iframe.js +0 -23
- package/src/views/common/render-utilities.js +0 -4
- package/src/views/confirmation.js +0 -45
- package/src/views/errors.js +0 -115
- package/src/views/form.js +0 -61
- package/src/views/method-selector/__snapshots__/method-selector.spec.js.snap +0 -135
- package/src/views/method-selector/express-methods.js +0 -52
- package/src/views/method-selector/generate-digital-wallet.js +0 -53
- package/src/views/method-selector/generate-digital-wallet.spec.js +0 -121
- package/src/views/method-selector/generate-framepay-config.js +0 -56
- package/src/views/method-selector/generate-framepay-config.spec.js +0 -216
- package/src/views/method-selector/get-method-data.js +0 -11
- package/src/views/method-selector/get-payment-methods.js +0 -25
- package/src/views/method-selector/get-payment-methods.spec.js +0 -41
- package/src/views/method-selector/index.js +0 -223
- package/src/views/method-selector/method-selector.spec.js +0 -20
- package/src/views/method-selector/mount-bump-offer.js +0 -120
- package/src/views/method-selector/mount-express-methods.js +0 -107
- package/src/views/modal.js +0 -103
- package/src/views/result.js +0 -24
- package/src/views/summary.js +0 -38
- package/tests/async-utilities.js +0 -22
- package/tests/mocks/framepay-mock.js +0 -15
- package/tests/mocks/rebilly-api-mock.js +0 -11
- package/tests/mocks/rebilly-instruments-mock.js +0 -141
- package/tests/mocks/storefront-api-mock.js +0 -62
- package/tests/mocks/storefront-mock.js +0 -20
- package/tests/msw/server.js +0 -14
- package/tests/setup-test.js +0 -30
- package/vitest.config.js +0 -18
package/src/style/base/index.js
DELETED
|
@@ -1,688 +0,0 @@
|
|
|
1
|
-
export const vars = (theme) => `
|
|
2
|
-
/* Instruments 'global' variables
|
|
3
|
-
------------------------------------------------------------ */
|
|
4
|
-
:root {
|
|
5
|
-
${theme.cssVars}
|
|
6
|
-
|
|
7
|
-
--rebilly-fontWeight400: 400;
|
|
8
|
-
--rebilly-fontWeight500: 500;
|
|
9
|
-
--rebilly-fontWeight600: 600;
|
|
10
|
-
--rebilly-fontScaleFactor: 1.5;
|
|
11
|
-
--rebilly-fontScaleFactorS: 0.875;
|
|
12
|
-
--rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));
|
|
13
|
-
--rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);
|
|
14
|
-
|
|
15
|
-
--rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));
|
|
16
|
-
--rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);
|
|
17
|
-
--rebilly-fontMarginTopL: 0;
|
|
18
|
-
--rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);
|
|
19
|
-
|
|
20
|
-
--rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);
|
|
21
|
-
--rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);
|
|
22
|
-
--rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);
|
|
23
|
-
--rebilly-spacingM: var(--rebilly-fontLineHeightBase);
|
|
24
|
-
--rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);
|
|
25
|
-
--rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);
|
|
26
|
-
|
|
27
|
-
--rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);
|
|
28
|
-
|
|
29
|
-
--rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);
|
|
30
|
-
--rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* Base, Typography
|
|
34
|
-
------------------------------------------------------------ */
|
|
35
|
-
/* Base setup for top level elements */
|
|
36
|
-
.rebilly-instruments-content {
|
|
37
|
-
color: var(--rebilly-colorText);
|
|
38
|
-
background: var(--rebilly-colorBackground);
|
|
39
|
-
font-size: var(--rebilly-fontSizeBase);
|
|
40
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
41
|
-
line-height: var(--rebilly-fontLineHeightBase);
|
|
42
|
-
font-family: var(--rebilly-fontFamily);
|
|
43
|
-
-webkit-font-smoothing: antialiased;
|
|
44
|
-
-moz-osx-font-smoothing: grayscale;
|
|
45
|
-
text-align: left;
|
|
46
|
-
transition: all 200ms;
|
|
47
|
-
font-smooth: var(--rebilly-fontSmooth);
|
|
48
|
-
padding: 2px;
|
|
49
|
-
font-display: swap;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* Views. Method Selector
|
|
53
|
-
------------------------------------------------------------ */
|
|
54
|
-
.rebilly-instruments-method-selector.has-express-compact {
|
|
55
|
-
padding-top: var(--rebilly-spacingS);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.rebilly-instruments-amount-selector {
|
|
59
|
-
padding: 2px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* Express Methods
|
|
63
|
-
------------------------------------------------------------ */
|
|
64
|
-
@-webkit-keyframes rebillyExpressShine {
|
|
65
|
-
to {
|
|
66
|
-
background-position-x: -200%;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@keyframes rebillyExpressShine {
|
|
71
|
-
to {
|
|
72
|
-
background-position-x: -200%;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.rebilly-instruments-express-methods { padding: 2px; }
|
|
77
|
-
|
|
78
|
-
.rebilly-instruments-express-methods.is-compact {
|
|
79
|
-
border: 1px solid var(--rebilly-colorMutedBorder);
|
|
80
|
-
padding: var(--rebilly-spacingS);
|
|
81
|
-
padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));
|
|
82
|
-
padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));
|
|
83
|
-
border-radius: var(--rebilly-borderRadius);
|
|
84
|
-
position: relative;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.rebilly-instruments-express-methods .rebilly-instruments-iframe {
|
|
88
|
-
display: block;
|
|
89
|
-
margin-bottom: 0;
|
|
90
|
-
height: var(--rebilly-spacingFormElementMinHeight);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {
|
|
94
|
-
border-radius: 6px;
|
|
95
|
-
margin-bottom: var(--rebilly-spacingS);
|
|
96
|
-
background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);
|
|
97
|
-
background-size: 200% 100%;
|
|
98
|
-
-webkit-animation: 1.5s rebillyExpressShine linear infinite;
|
|
99
|
-
animation: 1.5s rebillyExpressShine linear infinite;
|
|
100
|
-
min-height: 48px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {
|
|
104
|
-
margin: 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {
|
|
108
|
-
display: -webkit-box;
|
|
109
|
-
display: -ms-flexbox;
|
|
110
|
-
display: flex;
|
|
111
|
-
-webkit-box-pack: center;
|
|
112
|
-
-ms-flex-pack: center;
|
|
113
|
-
justify-content: center;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {
|
|
117
|
-
-webkit-box-flex: 1;
|
|
118
|
-
-ms-flex: 1 1 0px;
|
|
119
|
-
flex: 1 1 0px;
|
|
120
|
-
max-width: 260px;
|
|
121
|
-
margin: 0 var(--rebilly-spacingXs);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {
|
|
125
|
-
margin-left: 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {
|
|
129
|
-
margin-right: 0;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {
|
|
133
|
-
display: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {
|
|
137
|
-
position: absolute;
|
|
138
|
-
font-family: var(--rebilly-fontFamily);
|
|
139
|
-
top: 0; left: 50%;
|
|
140
|
-
-webkit-transform: translateX(-50%) translateY(-50%);
|
|
141
|
-
transform: translateX(-50%) translateY(-50%);
|
|
142
|
-
color: var(--rebilly-colorText);
|
|
143
|
-
padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);
|
|
144
|
-
line-height: 1;
|
|
145
|
-
background: var(--rebilly-colorBackground);
|
|
146
|
-
display: inline-block;
|
|
147
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
148
|
-
min-height: auto;
|
|
149
|
-
margin: 0;
|
|
150
|
-
white-space: nowrap;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {
|
|
154
|
-
border-radius: 100px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
@media (max-width: 600px) {
|
|
158
|
-
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {
|
|
159
|
-
-webkit-box-orient: vertical;
|
|
160
|
-
-webkit-box-direction: normal;
|
|
161
|
-
-ms-flex-direction: column;
|
|
162
|
-
flex-direction: column;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {
|
|
166
|
-
max-width: 100%;
|
|
167
|
-
margin: 0 0 var(--rebilly-spacingS);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {
|
|
171
|
-
margin: 0;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Components. Divider
|
|
176
|
-
------------------------------------------------------------ */
|
|
177
|
-
.rebilly-instruments-divider {
|
|
178
|
-
line-height: var(--rebilly-fontLineHeightBase);
|
|
179
|
-
padding: var(--rebilly-spacingM) 0;
|
|
180
|
-
margin: 0;
|
|
181
|
-
position: relative;
|
|
182
|
-
outline: 0;
|
|
183
|
-
border: 0;
|
|
184
|
-
text-align: center;
|
|
185
|
-
font-family: var(--rebilly-fontFamily);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }
|
|
189
|
-
.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }
|
|
190
|
-
|
|
191
|
-
.rebilly-instruments-divider::before {
|
|
192
|
-
background: var(--rebilly-colorMutedBorder);
|
|
193
|
-
content: '';
|
|
194
|
-
position: absolute;
|
|
195
|
-
left: 0;
|
|
196
|
-
top: 50%;
|
|
197
|
-
width: 100%;
|
|
198
|
-
height: 1px;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.rebilly-instruments-divider .rebilly-instruments-divider-label {
|
|
202
|
-
color: var(--rebilly-colorMutedText);
|
|
203
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
204
|
-
padding: 0 var(--rebilly-spacingM);
|
|
205
|
-
line-height: var(--rebilly-fontLineHeightS);
|
|
206
|
-
background-color: var(--rebilly-colorBackground);
|
|
207
|
-
font-size: var(--rebilly-fontSizeS);
|
|
208
|
-
position: relative;
|
|
209
|
-
display: inline-block;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/* Components. Icons
|
|
213
|
-
------------------------------------------------------------ */
|
|
214
|
-
.rebilly-instruments-icon {
|
|
215
|
-
width: var(--rebilly-fontLineHeightBase);
|
|
216
|
-
height: var(--rebilly-fontLineHeightBase);
|
|
217
|
-
fill: var(--rebilly-colorText);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/* Components. Forms. Checkboxes
|
|
221
|
-
------------------------------------------------------------ */
|
|
222
|
-
.rebilly-instruments-form-field-checkbox {
|
|
223
|
-
position: relative;
|
|
224
|
-
opacity: 1;
|
|
225
|
-
align-items: center;
|
|
226
|
-
display: flex;
|
|
227
|
-
flex-direction: row-reverse;
|
|
228
|
-
justify-content: flex-start;
|
|
229
|
-
cursor: pointer;
|
|
230
|
-
transform: none;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.rebilly-instruments-form-field-checkbox > * {
|
|
234
|
-
cursor: pointer;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"] {
|
|
238
|
-
position: absolute;
|
|
239
|
-
opacity: 0;
|
|
240
|
-
cursor: pointer;
|
|
241
|
-
height: 0;
|
|
242
|
-
width: 0;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.rebilly-instruments-form-field-checkbox span {
|
|
246
|
-
position: relative;
|
|
247
|
-
top: 0;
|
|
248
|
-
left: 0;
|
|
249
|
-
width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));
|
|
250
|
-
height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));
|
|
251
|
-
min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));
|
|
252
|
-
border-radius: 4px;
|
|
253
|
-
box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);
|
|
254
|
-
margin-right: var(--rebilly-spacingS);
|
|
255
|
-
background-color: transparent;
|
|
256
|
-
transition: all 200ms;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.rebilly-instruments-form-field-checkbox span:after {
|
|
260
|
-
content: '';
|
|
261
|
-
position: absolute;
|
|
262
|
-
border: solid var(--rebilly-colorPrimary);
|
|
263
|
-
width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));
|
|
264
|
-
height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);
|
|
265
|
-
border-width: 2px 2px 0 0;
|
|
266
|
-
border-radius: 2px;
|
|
267
|
-
top: 50%;
|
|
268
|
-
left: 50%;
|
|
269
|
-
opacity: 0;
|
|
270
|
-
transform: translateY(-60%) translateX(-50%) rotate(135deg);
|
|
271
|
-
transition: all 0.2s ease;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {
|
|
275
|
-
box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {
|
|
279
|
-
box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {
|
|
283
|
-
opacity: 1;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {
|
|
287
|
-
opacity: 0.6;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/* Vendor, Postmate
|
|
291
|
-
------------------------------------------------------------ */
|
|
292
|
-
.rebilly-instruments-iframe {
|
|
293
|
-
border: none;
|
|
294
|
-
width: 100%;
|
|
295
|
-
height: 0;
|
|
296
|
-
padding: 0;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.rebilly-instruments-iframe-overlay {
|
|
300
|
-
top: -2px;
|
|
301
|
-
left: -2px;
|
|
302
|
-
width: calc(100vw + 2px);
|
|
303
|
-
height: 100vh;
|
|
304
|
-
min-height: calc(100vh + 4px);
|
|
305
|
-
position: fixed;
|
|
306
|
-
z-index: 99999999999999;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/* Views. Modal
|
|
310
|
-
------------------------------------------------------------ */
|
|
311
|
-
.rebilly-instruments-modal-overlay {
|
|
312
|
-
position: fixed;
|
|
313
|
-
top: 0;
|
|
314
|
-
left: 0;
|
|
315
|
-
overflow-x: hidden;
|
|
316
|
-
overflow-y: auto;
|
|
317
|
-
z-index: 1055;
|
|
318
|
-
padding: 30px;
|
|
319
|
-
width: 100%;
|
|
320
|
-
height: 100%;
|
|
321
|
-
margin: 0;
|
|
322
|
-
padding: 0;
|
|
323
|
-
-webkit-transition: all 0.12s ease-in-out;
|
|
324
|
-
transition: all 0.12s ease-in-out;
|
|
325
|
-
background-color: rgba(0,0,0,0.7);
|
|
326
|
-
opacity: 0
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.rebilly-instruments-modal-overlay.is-visible {
|
|
330
|
-
opacity: 1;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.rebilly-instruments-modal-container {
|
|
334
|
-
-webkit-transition: all .24s ease-in-out;
|
|
335
|
-
transition: all .24s ease-in-out;
|
|
336
|
-
position: relative;
|
|
337
|
-
max-width: 750px;
|
|
338
|
-
background: var(--rebilly-colorBackground);
|
|
339
|
-
margin: 50px auto 20px;
|
|
340
|
-
-webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);
|
|
341
|
-
box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);
|
|
342
|
-
border-radius: 4px;
|
|
343
|
-
-webkit-transform: translateY(-50px);
|
|
344
|
-
transform: translateY(-50px);
|
|
345
|
-
opacity: 0;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.rebilly-instruments-modal-container.is-visible {
|
|
349
|
-
-webkit-transform: translateY(0);
|
|
350
|
-
transform: translateY(0);
|
|
351
|
-
opacity: 1;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.rebilly-instruments-modal-container.is-redirect {
|
|
355
|
-
max-width: 60vw;
|
|
356
|
-
width: auto;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.rebilly-instruments-modal-content {
|
|
360
|
-
-webkit-transition: all .15s;
|
|
361
|
-
transition: all .15s;
|
|
362
|
-
padding: 20px;
|
|
363
|
-
overflow: hidden;
|
|
364
|
-
background-color: var(--rebilly-colorBackground);
|
|
365
|
-
text-align: center;
|
|
366
|
-
border-radius: 4px;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.rebilly-instruments-modal-content .rebilly-instruments-iframe {
|
|
370
|
-
-webkit-transition: all .15s;
|
|
371
|
-
transition: all .15s;
|
|
372
|
-
height: auto;
|
|
373
|
-
min-height: 360px;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {
|
|
377
|
-
padding: 0;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.rebilly-instruments-modal-close {
|
|
381
|
-
position: absolute;
|
|
382
|
-
width: 30px;
|
|
383
|
-
height: 30px;
|
|
384
|
-
top: -40px;
|
|
385
|
-
right: 0;
|
|
386
|
-
fill: #FFF;
|
|
387
|
-
cursor: pointer;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.rebilly-instruments-modal-close:hover{
|
|
391
|
-
color: #000;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
@media screen and (max-width: 480px) {
|
|
395
|
-
.rebilly-instruments-modal-container.is-redirect {
|
|
396
|
-
max-width: 96vw;
|
|
397
|
-
margin: 20px auto 20px;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/* Components. Loader
|
|
402
|
-
------------------------------------------------------------ */
|
|
403
|
-
.rebilly-instruments-loader {
|
|
404
|
-
text-align: left;
|
|
405
|
-
position: absolute;
|
|
406
|
-
top: 0;
|
|
407
|
-
bottom: 0;
|
|
408
|
-
left: 0;
|
|
409
|
-
right: 0;
|
|
410
|
-
display: none;
|
|
411
|
-
background-color: var(--rebilly-colorBackground);
|
|
412
|
-
z-index: 1000;
|
|
413
|
-
-webkit-transition: all 200ms;
|
|
414
|
-
transition: all 200ms;
|
|
415
|
-
border-radius: var(--rebilly-borderRadius);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
.rebilly-instruments-loader.is-active {
|
|
419
|
-
display: block;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/* Type */
|
|
423
|
-
.rebilly-instruments-loader p {
|
|
424
|
-
color: var(--rebilly-colorText);
|
|
425
|
-
display: inline-block;
|
|
426
|
-
margin: 0;
|
|
427
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
428
|
-
font-size: var(--rebilly-fontSizeBase);
|
|
429
|
-
line-height: var(--rebilly-fontLineHeightBase);
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.rebilly-instruments-loader small {
|
|
433
|
-
color: var(--rebilly-colorText);
|
|
434
|
-
display: inline-block;
|
|
435
|
-
margin: 0;
|
|
436
|
-
font-size: var(--rebilly-fontSizeS);
|
|
437
|
-
line-height: 1;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
/* Summary */
|
|
441
|
-
.rebilly-instruments-summary-loader-total p.total {
|
|
442
|
-
font-family: var(--rebilly-fontFamily);
|
|
443
|
-
font-size: var(--rebilly-fontSizeL);
|
|
444
|
-
font-weight: var(--rebilly-headingFontWeight);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
/* Methods */
|
|
448
|
-
.rebilly-instruments-methods-loader-card-icon {
|
|
449
|
-
width: calc(var(--rebilly-fontLineHeightBase) + 10px);
|
|
450
|
-
height: var(--rebilly-fontLineHeightBase);
|
|
451
|
-
margin-left: var(--rebilly-spacing2xs);
|
|
452
|
-
margin-bottom: var(--rebilly-spacing2xs);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }
|
|
456
|
-
|
|
457
|
-
/* Spinner */
|
|
458
|
-
.rebilly-instruments-loader-spinner {
|
|
459
|
-
top: 50%;
|
|
460
|
-
left: 50%;
|
|
461
|
-
position: absolute;
|
|
462
|
-
-webkit-transform: translate(-50%, -50%);
|
|
463
|
-
transform: translate(-50%, -50%);
|
|
464
|
-
border: 2px solid transparent;
|
|
465
|
-
border-top: 2px solid var(--rebilly-colorPrimary);
|
|
466
|
-
border-radius: 50%;
|
|
467
|
-
width: var(--rebilly-fontLineHeightBase);
|
|
468
|
-
height: var(--rebilly-fontLineHeightBase);
|
|
469
|
-
margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);
|
|
470
|
-
margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);
|
|
471
|
-
-webkit-animation: spin 0.5s ease infinite;
|
|
472
|
-
animation: spin 0.5s ease infinite;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
@-webkit-keyframes spin {
|
|
476
|
-
0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
|
|
477
|
-
100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
@keyframes spin {
|
|
481
|
-
0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
|
|
482
|
-
100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/* Utils */
|
|
486
|
-
.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }
|
|
487
|
-
.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
|
|
488
|
-
.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
|
|
489
|
-
.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }
|
|
490
|
-
|
|
491
|
-
.is-el-loading {
|
|
492
|
-
position: relative;
|
|
493
|
-
color: transparent!important;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.is-el-loading::before {
|
|
497
|
-
position: absolute;
|
|
498
|
-
content: '';
|
|
499
|
-
top: 0;
|
|
500
|
-
bottom: 0;
|
|
501
|
-
left: 0;
|
|
502
|
-
right: 0;
|
|
503
|
-
background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);
|
|
504
|
-
background-size: 200% 100%;
|
|
505
|
-
-webkit-animation: 1.5s rebillyExpressShine linear infinite;
|
|
506
|
-
animation: 1.5s rebillyExpressShine linear infinite;
|
|
507
|
-
border-radius: var(--rebilly-borderRadius);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.rebilly-instruments-loader-form-el {
|
|
511
|
-
width: 100%;
|
|
512
|
-
min-height: var(--rebilly-spacingFormElementMinHeight);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
.rebilly-instruments-loader-form-label {
|
|
516
|
-
display: -webkit-box;
|
|
517
|
-
display: -ms-flexbox;
|
|
518
|
-
display: flex;
|
|
519
|
-
margin-bottom: var(--rebilly-spacing2xs);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.rebilly-instruments-loader-form-el.is-button {
|
|
523
|
-
margin-top: var(--rebilly-spacingL);
|
|
524
|
-
text-align: center;
|
|
525
|
-
font-size: var(--rebilly-buttonFontSize);
|
|
526
|
-
font-family: var(--rebilly-buttonFontFamily);
|
|
527
|
-
line-height: var(--rebilly-buttonFontLineHeight);
|
|
528
|
-
padding: var(--rebilly-spacingS);
|
|
529
|
-
-webkit-box-sizing: border-box;
|
|
530
|
-
box-sizing: border-box;
|
|
531
|
-
background: var(--rebilly-buttonColorBackground);
|
|
532
|
-
color: transparent;
|
|
533
|
-
border-radius: var(--rebilly-buttonBorderRadius);
|
|
534
|
-
font-weight: var(--rebilly-buttonFontWeight);
|
|
535
|
-
border: var(--rebilly-buttonBorder);
|
|
536
|
-
-webkit-box-shadow: var(--rebilly-buttonBoxShadow);
|
|
537
|
-
box-shadow: var(--rebilly-buttonBoxShadow);
|
|
538
|
-
outline: none;
|
|
539
|
-
cursor: not-allowed;
|
|
540
|
-
opacity: 0.6;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {
|
|
544
|
-
border-radius: calc(var(--rebilly-borderRadius) / 2);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
/* Error
|
|
548
|
-
------------------------------------------------------------ */
|
|
549
|
-
.rebilly-instruments-error-card {
|
|
550
|
-
border: 1px solid var(--rebilly-colorDanger);
|
|
551
|
-
border-radius: var(--rebilly-borderRadius);
|
|
552
|
-
text-align: left;
|
|
553
|
-
padding: var(--rebilly-spacingS);
|
|
554
|
-
margin-bottom: var(--rebilly-spacingL);
|
|
555
|
-
}
|
|
556
|
-
.rebilly-instruments-error-card.not-closeable {
|
|
557
|
-
margin-bottom: 0;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.rebilly-instruments-error-card-header {
|
|
561
|
-
display: -webkit-box;
|
|
562
|
-
display: -ms-flexbox;
|
|
563
|
-
display: flex;
|
|
564
|
-
-webkit-box-align: center;
|
|
565
|
-
-ms-flex-align: center;
|
|
566
|
-
align-items: center;
|
|
567
|
-
-webkit-box-pack: justify;
|
|
568
|
-
-ms-flex-pack: justify;
|
|
569
|
-
justify-content: space-between;
|
|
570
|
-
width: 100%;
|
|
571
|
-
-webkit-box-align: start;
|
|
572
|
-
-ms-flex-align: start;
|
|
573
|
-
align-items: flex-start;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.rebilly-instruments-error-card-title {
|
|
577
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
578
|
-
font-size: var(--rebilly-fontSizeBase);
|
|
579
|
-
line-height: var(--rebilly-fontLineHeightBase);
|
|
580
|
-
font-family: var(--rebilly-headingFontFamily);
|
|
581
|
-
margin: 0 0 var(--rebilly-spacingS);
|
|
582
|
-
color: var(--rebilly-colorDanger);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
.rebilly-instruments-error-card-close-button {
|
|
586
|
-
cursor: pointer;
|
|
587
|
-
background: transparent;
|
|
588
|
-
border: none;
|
|
589
|
-
padding: 0;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
.rebilly-instruments-error-card-close-button svg {
|
|
593
|
-
width: var(--rebilly-fontLineHeightBase);
|
|
594
|
-
height: var(--rebilly-fontLineHeightBase);
|
|
595
|
-
fill: var(--rebilly-colorText);
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.rebilly-instruments-error-card-details {
|
|
599
|
-
padding: 0;
|
|
600
|
-
margin: 0;
|
|
601
|
-
list-style: none;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
.rebilly-instruments-error-card-details li,
|
|
605
|
-
.rebilly-instruments-error-card-message {
|
|
606
|
-
color: var(--rebilly-colorText);
|
|
607
|
-
margin: 0;
|
|
608
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
609
|
-
font-size: var(--rebilly-fontSizeBase);
|
|
610
|
-
line-height: var(--rebilly-fontLineHeightBase);
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
/* Bump offer
|
|
615
|
-
------------------------------------------------------------ */
|
|
616
|
-
.rebilly-instruments-bump-offers {
|
|
617
|
-
text-align: left;
|
|
618
|
-
margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {
|
|
622
|
-
margin-bottom: var(--rebilly-spacingS);
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {
|
|
626
|
-
width: 100%;
|
|
627
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.rebilly-instruments-bump-offer-line-item {
|
|
631
|
-
border-bottom: 1px solid var(--rebilly-colorMutedBorder);
|
|
632
|
-
padding: var(--rebilly-spacingS) 0;
|
|
633
|
-
display: flex;
|
|
634
|
-
align-items: center;
|
|
635
|
-
position: relative;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
.rebilly-instruments-bump-offer-line-item:first-child {
|
|
639
|
-
padding-top: 0;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
.rebilly-instruments-bump-offer-line-item-figure {
|
|
643
|
-
margin: 0 var(--rebilly-spacingS) 0 0;
|
|
644
|
-
flex: 0 0 auto;
|
|
645
|
-
width: 48px;
|
|
646
|
-
height: 48px;
|
|
647
|
-
border-radius: var(--rebilly-borderRadius);
|
|
648
|
-
border: 1px solid var(--rebilly-colorMutedBorder);
|
|
649
|
-
overflow: hidden;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
.rebilly-instruments-bump-offer-line-item-figure img {
|
|
653
|
-
width: 100%;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
.rebilly-instruments-bump-offer-line-item-synopsis {
|
|
657
|
-
flex: 1 2 auto;
|
|
658
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
.rebilly-instruments-bump-offer-line-item-synopsis-title {
|
|
662
|
-
margin: 0;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
.rebilly-instruments-bump-offer-line-item-synopsis-description {
|
|
666
|
-
color: var(--rebilly-colorMutedText);
|
|
667
|
-
margin: 0;
|
|
668
|
-
font-size: var(--rebilly-fontSizeS);
|
|
669
|
-
line-height: var(--rebilly-fontLineHeightS);
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
.rebilly-instruments-bump-offer-line-item-price-breakdown {
|
|
673
|
-
display: flex;
|
|
674
|
-
justify-content: center;
|
|
675
|
-
align-items: center;
|
|
676
|
-
color: var(--rebilly-colorMutedText);
|
|
677
|
-
margin: 0 0 0 var(--rebilly-spacingS);
|
|
678
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {
|
|
682
|
-
fill: var(--rebilly-colorMutedText);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {
|
|
686
|
-
color: var(--rebilly-colorText);
|
|
687
|
-
}
|
|
688
|
-
`;
|
package/src/style/base/theme.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import theme from './default-theme';
|
|
2
|
-
|
|
3
|
-
export class Theme {
|
|
4
|
-
constructor(overrides = {}) {
|
|
5
|
-
this.overrides = overrides;
|
|
6
|
-
this.theme = theme;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
static nonCssProperties = ['labels'];
|
|
10
|
-
|
|
11
|
-
overrideTheme() {
|
|
12
|
-
Object.keys(this.overrides).forEach((prop) => {
|
|
13
|
-
this.theme[prop] = this.overrides[prop];
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
get cssVars() {
|
|
18
|
-
return Object.keys(this.theme)
|
|
19
|
-
.filter((v) => !Theme.nonCssProperties.includes(v))
|
|
20
|
-
.map((p, i) => `${!i ? '' : ' '}--rebilly-${p}: ${this.theme[p]};`)
|
|
21
|
-
.join('\n');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
build() {
|
|
25
|
-
this.overrideTheme();
|
|
26
|
-
return {
|
|
27
|
-
cssVars: this.cssVars,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|