@rebilly/instruments 2.0.0-beta → 3.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/events/index.js +2 -1
- package/dist/functions/mount/fetch-data.js +187 -0
- package/dist/functions/mount/fetch-data.spec.js +189 -0
- package/dist/functions/mount/index.js +132 -164
- package/dist/functions/mount/mount.spec.js +2 -4
- package/dist/functions/mount/setup-element.js +40 -0
- package/dist/functions/mount/setup-framepay-theme.js +95 -0
- package/dist/functions/mount/setup-framepay.js +5 -1
- package/dist/functions/mount/setup-i18n.js +33 -0
- package/dist/functions/mount/setup-options.js +68 -47
- package/dist/functions/mount/setup-options.spec.js +66 -0
- package/dist/functions/mount/setup-storefront.js +6 -4
- package/dist/functions/mount/setup-styles.js +4 -2
- package/dist/functions/purchase.js +129 -24
- package/dist/functions/purchase.spec.js +13 -10
- package/dist/functions/setup.js +85 -0
- package/dist/functions/setup.spec.js +87 -0
- package/dist/functions/show.js +8 -4
- package/dist/functions/show.spec.js +9 -5
- package/dist/functions/update.js +39 -24
- package/dist/functions/update.spec.js +0 -4
- package/dist/i18n/en.json +5 -2
- package/dist/i18n/es.json +4 -1
- package/dist/index.js +17 -3
- package/dist/index.spec.js +3 -16
- package/dist/loader/index.js +4 -3
- package/dist/storefront/index.js +33 -0
- package/dist/storefront/invoices.js +27 -0
- package/dist/storefront/models/base-model.js +18 -0
- package/dist/storefront/models/invoice-model.js +14 -0
- package/dist/storefront/models/plan-model.js +4 -35
- package/dist/storefront/models/product-model.js +4 -23
- package/dist/storefront/models/summary-model.js +12 -25
- package/dist/storefront/models/transaction-model.js +31 -0
- package/dist/storefront/payment-instruments.js +47 -0
- package/dist/storefront/payment-instruments.spec.js +55 -0
- package/dist/storefront/plans.js +10 -18
- package/dist/storefront/plans.spec.js +3 -13
- package/dist/storefront/products.js +10 -13
- package/dist/storefront/products.spec.js +12 -19
- package/dist/storefront/purchase.js +23 -12
- package/dist/storefront/purchase.spec.js +1 -20
- package/dist/storefront/ready-to-pay.js +18 -15
- package/dist/storefront/ready-to-pay.spec.js +2 -12
- package/dist/storefront/summary.js +21 -17
- package/dist/storefront/summary.spec.js +4 -15
- package/dist/storefront/transactions.js +27 -0
- package/dist/style/base/__snapshots__/theme.spec.js.snap +188 -45
- package/dist/style/base/default-theme.js +699 -0
- package/dist/style/base/index.js +48 -16
- package/dist/style/base/theme.js +16 -48
- package/dist/style/base/theme.spec.js +4 -15
- package/dist/style/components/address.js +3 -3
- package/dist/style/components/button.js +32 -22
- package/dist/style/components/divider.js +9 -9
- package/dist/style/components/forms/checkbox.js +12 -9
- package/dist/style/components/forms/field.js +18 -6
- package/dist/style/components/forms/form.js +2 -2
- package/dist/style/components/forms/input.js +54 -13
- package/dist/style/components/forms/label.js +39 -18
- package/dist/style/components/forms/select.js +54 -22
- package/dist/style/components/forms/validation.js +53 -6
- package/dist/style/components/icons.js +4 -4
- package/dist/style/components/loader.js +5 -3
- package/dist/style/components/methods.js +18 -15
- package/dist/style/components/overlay.js +5 -5
- package/dist/style/helpers/index.js +46 -46
- package/dist/style/index.js +3 -1
- package/dist/style/payment-instruments/payment-card.js +4 -4
- package/dist/style/utils/border.js +47 -0
- package/dist/style/utils/color-values.js +39 -3
- package/dist/style/utils/remove-empty-null.js +20 -0
- package/dist/style/vendor/framepay.js +11 -8
- package/dist/style/vendor/postmate.js +2 -2
- package/dist/style/views/confirmation.js +13 -13
- package/dist/style/views/method-selector.js +2 -2
- package/dist/style/views/modal.js +6 -6
- package/dist/style/views/result.js +4 -4
- package/dist/style/views/summary.js +26 -22
- package/dist/views/__snapshots__/summary.spec.js.snap +77 -119
- package/dist/views/common/iframe/base-iframe.js +2 -0
- package/dist/views/common/iframe/modal-iframe.js +50 -4
- package/dist/views/confirmation.js +19 -8
- package/dist/views/method-selector/generate-digital-wallet.js +12 -3
- package/dist/views/method-selector/generate-digital-wallet.spec.js +11 -0
- package/dist/views/method-selector/get-payment-methods.js +13 -2
- package/dist/views/method-selector/get-payment-methods.spec.js +21 -19
- package/dist/views/method-selector/index.js +23 -34
- package/dist/views/method-selector/method-selector.spec.js +50 -55
- package/dist/views/method-selector/mount-methods.js +5 -8
- package/dist/views/modal.js +8 -2
- package/dist/views/result.js +3 -4
- package/dist/views/summary.js +156 -97
- package/dist/views/summary.spec.js +53 -58
- package/package.json +4 -2
- package/src/events/index.js +2 -1
- package/src/functions/mount/fetch-data.js +152 -0
- package/src/functions/mount/fetch-data.spec.js +238 -0
- package/src/functions/mount/index.js +101 -158
- package/src/functions/mount/mount.spec.js +3 -5
- package/src/functions/mount/setup-element.js +26 -0
- package/src/functions/mount/setup-framepay-theme.js +82 -0
- package/src/functions/mount/setup-framepay.js +5 -1
- package/src/functions/mount/setup-i18n.js +19 -0
- package/src/functions/mount/setup-options.js +78 -48
- package/src/functions/mount/setup-options.spec.js +60 -0
- package/src/functions/mount/setup-storefront.js +6 -4
- package/src/functions/mount/setup-styles.js +4 -2
- package/src/functions/on.spec.js +1 -1
- package/src/functions/purchase.js +99 -23
- package/src/functions/purchase.spec.js +10 -10
- package/src/functions/setup.js +48 -0
- package/src/functions/setup.spec.js +98 -0
- package/src/functions/show.js +2 -4
- package/src/functions/show.spec.js +3 -4
- package/src/functions/update.js +40 -25
- package/src/functions/update.spec.js +0 -4
- package/src/i18n/en.json +5 -2
- package/src/i18n/es.json +4 -1
- package/src/index.js +9 -3
- package/src/index.spec.js +3 -21
- package/src/loader/index.js +3 -3
- package/src/storefront/index.js +28 -0
- package/src/storefront/invoices.js +11 -0
- package/src/storefront/models/base-model.js +10 -0
- package/src/storefront/models/invoice-model.js +3 -0
- package/src/storefront/models/plan-model.js +3 -35
- package/src/storefront/models/product-model.js +3 -23
- package/src/storefront/models/summary-model.js +12 -19
- package/src/storefront/models/transaction-model.js +19 -0
- package/src/storefront/payment-instruments.js +30 -0
- package/src/storefront/payment-instruments.spec.js +69 -0
- package/src/storefront/plans.js +6 -17
- package/src/storefront/plans.spec.js +4 -11
- package/src/storefront/products.js +8 -16
- package/src/storefront/products.spec.js +16 -22
- package/src/storefront/purchase.js +14 -16
- package/src/storefront/purchase.spec.js +2 -14
- package/src/storefront/ready-to-pay.js +13 -16
- package/src/storefront/ready-to-pay.spec.js +3 -10
- package/src/storefront/summary.js +19 -17
- package/src/storefront/summary.spec.js +5 -12
- package/src/storefront/transactions.js +11 -0
- package/src/style/base/__snapshots__/theme.spec.js.snap +188 -45
- package/src/style/base/default-theme.js +674 -0
- package/src/style/base/index.js +48 -16
- package/src/style/base/theme.js +17 -47
- package/src/style/base/theme.spec.js +4 -16
- package/src/style/components/address.js +3 -3
- package/src/style/components/button.js +32 -24
- package/src/style/components/divider.js +9 -9
- package/src/style/components/forms/checkbox.js +11 -11
- package/src/style/components/forms/field.js +18 -6
- package/src/style/components/forms/form.js +2 -2
- package/src/style/components/forms/input.js +54 -13
- package/src/style/components/forms/label.js +39 -18
- package/src/style/components/forms/select.js +54 -22
- package/src/style/components/forms/validation.js +53 -6
- package/src/style/components/icons.js +4 -4
- package/src/style/components/loader.js +4 -5
- package/src/style/components/methods.js +18 -15
- package/src/style/components/overlay.js +5 -5
- package/src/style/helpers/index.js +46 -46
- package/src/style/index.js +2 -1
- package/src/style/payment-instruments/payment-card.js +4 -4
- package/src/style/utils/border.js +34 -0
- package/src/style/utils/color-values.js +27 -1
- package/src/style/utils/remove-empty-null.js +10 -0
- package/src/style/vendor/framepay.js +11 -8
- package/src/style/vendor/postmate.js +2 -2
- package/src/style/views/confirmation.js +13 -13
- package/src/style/views/method-selector.js +2 -2
- package/src/style/views/modal.js +6 -6
- package/src/style/views/result.js +4 -4
- package/src/style/views/summary.js +26 -22
- package/src/views/__snapshots__/summary.spec.js.snap +77 -119
- package/src/views/common/iframe/base-iframe.js +2 -0
- package/src/views/common/iframe/modal-iframe.js +45 -3
- package/src/views/confirmation.js +15 -5
- package/src/views/method-selector/generate-digital-wallet.js +10 -3
- package/src/views/method-selector/generate-digital-wallet.spec.js +10 -0
- package/src/views/method-selector/get-payment-methods.js +7 -2
- package/src/views/method-selector/get-payment-methods.spec.js +26 -23
- package/src/views/method-selector/index.js +21 -28
- package/src/views/method-selector/method-selector.spec.js +49 -64
- package/src/views/method-selector/mount-methods.js +5 -8
- package/src/views/modal.js +6 -2
- package/src/views/result.js +4 -3
- package/src/views/summary.js +161 -117
- package/src/views/summary.spec.js +60 -75
- package/tests/mocks/rebilly-instruments-mock.js +37 -7
- package/tests/mocks/storefront-api-mock.js +8 -0
- package/tests/mocks/storefront-mock.js +17 -0
- package/dist/functions/mount/fetch-summary-data.js +0 -46
- package/dist/functions/mount/fetch-summary-data.spec.js +0 -43
- package/src/functions/mount/fetch-summary-data.js +0 -29
- package/src/functions/mount/fetch-summary-data.spec.js +0 -40
|
@@ -8,35 +8,56 @@ exports.label = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the label component.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const label =
|
|
11
|
+
const label = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Label
|
|
14
14
|
*/
|
|
15
15
|
.rebilly-instruments-form-field-label {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
font-size: calc(var(--rebilly-fontSizeBase) * 0.92);
|
|
17
|
+
line-height: calc(var(--rebilly-fontSizeBase) * 0.92);
|
|
18
|
+
margin-bottom: var(--rebilly-spacings-2xs);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Floating Labels */
|
|
22
|
+
.is-floating .rebilly-instruments-form-field-label {
|
|
23
|
+
font-size: var(--rebilly-fontSizeBase);
|
|
24
|
+
left: var(--rebilly-spacings-label-offset-left);
|
|
25
|
+
color: var(--rebilly-colorText);
|
|
26
|
+
top: 50%;
|
|
19
27
|
background: transparent;
|
|
20
|
-
opacity:
|
|
28
|
+
opacity: 1;
|
|
21
29
|
position: absolute;
|
|
22
|
-
transform: translateY(-50%);
|
|
23
|
-
transition:
|
|
30
|
+
transform: translateY(-50%) scale(1);
|
|
31
|
+
transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1), background 0.35s cubic-bezier(0.19, 1, 0.22, 1);
|
|
24
32
|
cursor: text;
|
|
25
33
|
pointer-events: none;
|
|
34
|
+
transform-origin: left top;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Includes Google autocomplete fix */
|
|
38
|
+
.is-floating input:-webkit-autofill + .rebilly-instruments-form-field-label,
|
|
39
|
+
.is-floating input:-webkit-autofill:hover + .rebilly-instruments-form-field-label,
|
|
40
|
+
.is-floating input:-webkit-autofill:focus + .rebilly-instruments-form-field-label,
|
|
41
|
+
.is-floating select:-webkit-autofill + .rebilly-instruments-form-field-label,
|
|
42
|
+
.is-floating select:-webkit-autofill:hover + .rebilly-instruments-form-field-label,
|
|
43
|
+
.is-floating select:-webkit-autofill:focus + .rebilly-instruments-form-field-label {
|
|
44
|
+
padding: 0 var(--rebilly-spacings-2xs);
|
|
45
|
+
left: calc(var(--rebilly-spacings-label-offset-left) - var(--rebilly-spacings-2xs));
|
|
46
|
+
line-height: 1;
|
|
47
|
+
background: var(--rebilly-colorBackground);
|
|
48
|
+
opacity: 1!important;
|
|
49
|
+
transform: translateY(-175%) scale(0.875);
|
|
26
50
|
}
|
|
27
51
|
|
|
28
|
-
.rebilly-instruments-form-field-input:
|
|
29
|
-
.rebilly-instruments-form-field-select:focus + .rebilly-instruments-form-field-label,
|
|
30
|
-
.rebilly-instruments-form-field-label.is-active {
|
|
31
|
-
padding: 0
|
|
32
|
-
left: calc(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
color: ${theme.color.text};
|
|
36
|
-
background: ${theme.color.background};
|
|
37
|
-
font-weight: 500;
|
|
52
|
+
.is-floating .rebilly-instruments-form-field-input:focus + .rebilly-instruments-form-field-label,
|
|
53
|
+
.is-floating .rebilly-instruments-form-field-select:focus + .rebilly-instruments-form-field-label,
|
|
54
|
+
.is-floating .rebilly-instruments-form-field-label.is-active {
|
|
55
|
+
padding: 0 var(--rebilly-spacings-2xs);
|
|
56
|
+
left: calc(var(--rebilly-spacings-label-offset-left) - var(--rebilly-spacings-2xs));
|
|
57
|
+
line-height: 1;
|
|
58
|
+
background: var(--rebilly-colorBackground);
|
|
38
59
|
opacity: 1;
|
|
39
|
-
|
|
60
|
+
transform: translateY(-175%) scale(0.875);
|
|
40
61
|
}
|
|
41
62
|
`;
|
|
42
63
|
|
|
@@ -8,30 +8,59 @@ exports.select = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the select component.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const select =
|
|
11
|
+
const select = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Select
|
|
14
14
|
*/
|
|
15
15
|
.rebilly-instruments-form-field-select {
|
|
16
|
-
font-size:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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);
|
|
24
26
|
box-sizing: border-box;
|
|
27
|
+
box-shadow: var(--rebilly-inputBoxShadow);
|
|
25
28
|
width: 100%;
|
|
26
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);
|
|
27
43
|
}
|
|
28
44
|
|
|
29
45
|
.rebilly-instruments-form-field-select:focus {
|
|
30
46
|
outline: none;
|
|
31
|
-
|
|
32
|
-
|
|
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);
|
|
33
56
|
}
|
|
34
57
|
|
|
58
|
+
.rebilly-instruments-form-field-select::selection {
|
|
59
|
+
color: var(--rebilly-inputSelectionColorText);
|
|
60
|
+
background: var(--rebilly-inputSelectionColorBackground);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
35
64
|
.rebilly-instruments-form-field-select:disabled {
|
|
36
65
|
opacity: 0.6;
|
|
37
66
|
}
|
|
@@ -41,22 +70,25 @@ const select = theme => `
|
|
|
41
70
|
-moz-appearance: none;
|
|
42
71
|
}
|
|
43
72
|
|
|
44
|
-
.rebilly-instruments-form-field-select + .rebilly-instruments-form-field-label {
|
|
45
|
-
font-size: ${theme.typography.fontSize};
|
|
46
|
-
opacity: 0.5;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
73
|
.rebilly-instruments-form-field-select::-ms-expand { display: none; }
|
|
50
74
|
|
|
51
75
|
.rebilly-instruments-form-field-select-arrow {
|
|
52
|
-
border: solid
|
|
76
|
+
border: solid var(--rebilly-inputColorText);
|
|
53
77
|
position: absolute;
|
|
54
|
-
width:
|
|
55
|
-
height:
|
|
78
|
+
width: var(--rebilly-spacings-xs);
|
|
79
|
+
height: var(--rebilly-spacings-xs);
|
|
56
80
|
border-width: 0 2px 2px 0;
|
|
57
|
-
|
|
58
|
-
right:
|
|
59
|
-
top:
|
|
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);
|
|
60
92
|
}
|
|
61
93
|
`;
|
|
62
94
|
|
|
@@ -8,25 +8,72 @@ exports.validation = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the form validations.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const validation =
|
|
11
|
+
const validation = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Validations
|
|
14
14
|
*/
|
|
15
15
|
.rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-input,
|
|
16
16
|
.rebilly-instruments-form-field.is-error .rebilly-instruments-form-field-select {
|
|
17
|
-
|
|
18
|
-
|
|
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);
|
|
19
66
|
}
|
|
20
67
|
|
|
21
68
|
.rebilly-instruments-form-field-error-wrapper {
|
|
22
|
-
margin-top:
|
|
23
|
-
margin-bottom:
|
|
69
|
+
margin-top: var(--rebilly-spacings-2xs);
|
|
70
|
+
margin-bottom: 0;
|
|
24
71
|
padding: 0;
|
|
25
72
|
list-style: none;
|
|
26
73
|
}
|
|
27
74
|
|
|
28
75
|
.rebilly-instruments-form-field-error-wrapper > li {
|
|
29
|
-
color:
|
|
76
|
+
color: var(--rebilly-colorDanger);
|
|
30
77
|
padding: 0;
|
|
31
78
|
}
|
|
32
79
|
`;
|
|
@@ -8,14 +8,14 @@ exports.icons = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the icons component.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const icons =
|
|
11
|
+
const icons = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Icons
|
|
14
14
|
*/
|
|
15
15
|
.rebilly-instruments-icon {
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
18
|
-
fill:
|
|
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
19
|
}
|
|
20
20
|
`;
|
|
21
21
|
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.loader = void 0;
|
|
7
7
|
|
|
8
|
+
var _colorValues = require("../utils/color-values");
|
|
9
|
+
|
|
8
10
|
// -----------------------------------------------------------------------------
|
|
9
11
|
// This file contains all styles related to the loader component.
|
|
10
12
|
// -----------------------------------------------------------------------------
|
|
@@ -21,7 +23,7 @@ const loader = theme => `
|
|
|
21
23
|
right: 0;
|
|
22
24
|
justify-content: center;
|
|
23
25
|
align-items: center;
|
|
24
|
-
background-color:
|
|
26
|
+
background-color: var(--rebilly-colorBackground);
|
|
25
27
|
z-index: 9000;
|
|
26
28
|
transition: all 200ms;
|
|
27
29
|
}
|
|
@@ -31,8 +33,8 @@ const loader = theme => `
|
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
.rebilly-instruments-loader-spinner {
|
|
34
|
-
border: 4px solid ${theme.
|
|
35
|
-
border-top: 4px solid
|
|
36
|
+
border: 4px solid ${(0, _colorValues.lighten)(theme.colorPrimary, 80)};
|
|
37
|
+
border-top: 4px solid var(--rebilly-colorPrimary);
|
|
36
38
|
border-radius: 50%;
|
|
37
39
|
width: 40px;
|
|
38
40
|
height: 40px;
|
|
@@ -8,7 +8,7 @@ exports.methods = exports.expressMethods = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the methods component.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const expressMethods =
|
|
11
|
+
const expressMethods = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Express methods
|
|
14
14
|
*/
|
|
@@ -20,9 +20,11 @@ const expressMethods = theme => `
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.rebilly-instruments-express-methods.is-compact {
|
|
23
|
-
border: 1px solid
|
|
24
|
-
padding:
|
|
25
|
-
|
|
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;
|
|
26
28
|
position: relative;
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -34,10 +36,11 @@ const expressMethods = theme => `
|
|
|
34
36
|
|
|
35
37
|
.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {
|
|
36
38
|
border-radius: 6px;
|
|
37
|
-
margin-bottom:
|
|
38
|
-
background: linear-gradient(110deg,
|
|
39
|
+
margin-bottom: var(--rebilly-spacings-xs);
|
|
40
|
+
background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);
|
|
39
41
|
background-size: 200% 100%;
|
|
40
42
|
animation: 1.5s rebillyExpressShine linear infinite;
|
|
43
|
+
height: 44px;
|
|
41
44
|
}
|
|
42
45
|
.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {
|
|
43
46
|
margin: 0;
|
|
@@ -51,7 +54,7 @@ const expressMethods = theme => `
|
|
|
51
54
|
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {
|
|
52
55
|
flex: 1 1 0px;
|
|
53
56
|
max-width: 260px;
|
|
54
|
-
margin: 0
|
|
57
|
+
margin: 0 var(--rebilly-spacings-xs);
|
|
55
58
|
}
|
|
56
59
|
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {
|
|
57
60
|
margin-left: 0;
|
|
@@ -65,17 +68,17 @@ const expressMethods = theme => `
|
|
|
65
68
|
}
|
|
66
69
|
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {
|
|
67
70
|
position: absolute;
|
|
68
|
-
top:
|
|
69
|
-
transform: translateX(-50%);
|
|
70
|
-
color:
|
|
71
|
-
padding:
|
|
72
|
-
line-height:
|
|
73
|
-
background:
|
|
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);
|
|
74
77
|
display: inline-block;
|
|
75
78
|
font-weight: 500;
|
|
76
79
|
min-height: auto;
|
|
77
80
|
margin: 0;
|
|
78
|
-
|
|
81
|
+
white-space: nowrap;
|
|
79
82
|
}
|
|
80
83
|
|
|
81
84
|
@media (max-width: 600px) {
|
|
@@ -84,7 +87,7 @@ const expressMethods = theme => `
|
|
|
84
87
|
}
|
|
85
88
|
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {
|
|
86
89
|
max-width: 100%;
|
|
87
|
-
margin: 0 0
|
|
90
|
+
margin: 0 0 var(--rebilly-spacings-xs);
|
|
88
91
|
}
|
|
89
92
|
.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {
|
|
90
93
|
margin: 0;
|
|
@@ -8,7 +8,7 @@ exports.overlay = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to the overlay component.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const overlay =
|
|
11
|
+
const overlay = () => `
|
|
12
12
|
/**
|
|
13
13
|
* Overlay
|
|
14
14
|
*/
|
|
@@ -22,10 +22,10 @@ const overlay = theme => `
|
|
|
22
22
|
display: flex;
|
|
23
23
|
justify-content: center;
|
|
24
24
|
align-items: center;
|
|
25
|
-
color: #
|
|
26
|
-
font-family:
|
|
27
|
-
font-size: calc(
|
|
28
|
-
line-height:
|
|
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
29
|
z-index: 9001
|
|
30
30
|
}
|
|
31
31
|
`;
|
|
@@ -8,52 +8,52 @@ exports.helpers = void 0;
|
|
|
8
8
|
// -----------------------------------------------------------------------------
|
|
9
9
|
// This file contains all styles related to helpers.
|
|
10
10
|
// -----------------------------------------------------------------------------
|
|
11
|
-
const helpers =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
58
|
|
|
59
59
|
exports.helpers = helpers;
|
package/dist/style/index.js
CHANGED
|
@@ -11,6 +11,8 @@ var _autoprefixer = _interopRequireDefault(require("autoprefixer"));
|
|
|
11
11
|
|
|
12
12
|
var _browserslist = require("./browserslist");
|
|
13
13
|
|
|
14
|
+
var _removeEmptyNull = _interopRequireDefault(require("./utils/remove-empty-null"));
|
|
15
|
+
|
|
14
16
|
var _theme = require("./base/theme");
|
|
15
17
|
|
|
16
18
|
var _base = require("./base");
|
|
@@ -40,7 +42,7 @@ const mainStyle = async themeOverride => {
|
|
|
40
42
|
${(0, _postmate.postmateStyle)(resolvedTheme)}
|
|
41
43
|
${(0, _helpers.helpers)(resolvedTheme)}
|
|
42
44
|
`;
|
|
43
|
-
return (0, _postcss.default)([(0, _autoprefixer.default)(_browserslist.browserslist)]).process(style, {
|
|
45
|
+
return (0, _postcss.default)([_removeEmptyNull.default, (0, _autoprefixer.default)(_browserslist.browserslist)]).process(style, {
|
|
44
46
|
from: undefined
|
|
45
47
|
}).then(result => result.css);
|
|
46
48
|
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.paymentCard = void 0;
|
|
7
7
|
|
|
8
|
-
const paymentCard =
|
|
8
|
+
const paymentCard = () => `
|
|
9
9
|
/**
|
|
10
10
|
* Payment card
|
|
11
11
|
*/
|
|
@@ -13,18 +13,18 @@ const paymentCard = theme => `
|
|
|
13
13
|
display: inline-flex;
|
|
14
14
|
width: 100%;
|
|
15
15
|
justify-content: flex-end;
|
|
16
|
-
margin-top:
|
|
16
|
+
margin-top: var(--rebilly-spacings-s);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.rebilly-instruments-payment-card-brands figure {
|
|
20
|
-
margin: 0 0 0
|
|
20
|
+
margin: 0 0 0 var(--rebilly-spacings-2xs);
|
|
21
21
|
padding: 0;
|
|
22
22
|
height: 26px;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.rebilly-instruments-payment-card-brands figure img {
|
|
26
26
|
width: 42px;
|
|
27
|
-
border-radius:
|
|
27
|
+
border-radius: 4px;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.rebilly-instruments-modal-container.rebilly-instruments-payment-card {
|
|
@@ -0,0 +1,47 @@
|
|
|
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;
|