@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.
- package/dist/index.js +88 -107
- package/dist/index.min.js +88 -0
- package/package.json +17 -6
- package/rollup.config.js +84 -0
- package/src/functions/mount/fetch-data.js +13 -1
- package/src/functions/mount/index.js +6 -42
- package/src/functions/mount/setup-framepay-theme.js +2 -2
- package/src/functions/mount/setup-options.js +3 -0
- package/src/functions/mount/setup-user-flow.js +49 -0
- package/src/functions/purchase.js +1 -1
- package/src/functions/setup.js +1 -1
- package/src/functions/show.spec.js +1 -1
- package/src/i18n/en.json +3 -0
- package/src/i18n/index.js +1 -1
- package/src/index.js +1 -61
- package/src/instance.js +65 -0
- package/src/{index.spec.js → instance.spec.js} +2 -1
- package/src/loader/index.js +21 -1
- package/src/storefront/models/ready-to-pay-model.js +13 -2
- package/src/storefront/plans.js +8 -4
- package/src/storefront/plans.spec.js +8 -2
- package/src/storefront/products.js +8 -4
- package/src/storefront/products.spec.js +8 -2
- package/src/storefront/ready-to-pay.js +5 -4
- package/src/style/base/__snapshots__/theme.spec.js.snap +34 -2
- package/src/style/base/default-theme.js +106 -3
- package/src/style/components/button.js +17 -1
- package/src/style/components/forms/label.js +0 -5
- package/src/style/components/loader.js +2 -1
- package/src/style/payment-instruments/payment-card.js +2 -1
- package/src/style/utils/remove-empty-null.js +9 -9
- package/src/style/vendor/postmate.js +13 -0
- package/src/style/views/confirmation.js +2 -1
- package/src/views/common/iframe/base-iframe.js +2 -0
- package/src/views/common/iframe/event-listeners.js +10 -0
- package/src/views/common/iframe/method-iframe.js +3 -1
- package/src/views/confirmation.js +1 -0
- package/src/views/method-selector/express-methods/{google-pay.js → index.js} +3 -2
- package/src/views/method-selector/mount-express-methods.js +6 -18
- package/src/views/result.js +1 -0
- package/tests/mocks/rebilly-instruments-mock.js +2 -2
- package/dist/events/base-event.js +0 -66
- package/dist/events/events.spec.js +0 -18
- package/dist/events/index.js +0 -22
- package/dist/functions/destroy.js +0 -34
- package/dist/functions/destroy.spec.js +0 -69
- package/dist/functions/mount/fetch-data.js +0 -187
- package/dist/functions/mount/fetch-data.spec.js +0 -189
- package/dist/functions/mount/index.js +0 -218
- package/dist/functions/mount/mount.spec.js +0 -64
- package/dist/functions/mount/setup-element.js +0 -40
- package/dist/functions/mount/setup-framepay-theme.js +0 -95
- package/dist/functions/mount/setup-framepay.js +0 -46
- package/dist/functions/mount/setup-i18n.js +0 -33
- package/dist/functions/mount/setup-options.js +0 -99
- package/dist/functions/mount/setup-options.spec.js +0 -66
- package/dist/functions/mount/setup-storefront.js +0 -34
- package/dist/functions/mount/setup-styles.js +0 -43
- package/dist/functions/on.js +0 -40
- package/dist/functions/on.spec.js +0 -55
- package/dist/functions/purchase.js +0 -158
- package/dist/functions/purchase.spec.js +0 -74
- package/dist/functions/setup.js +0 -85
- package/dist/functions/setup.spec.js +0 -87
- package/dist/functions/show.js +0 -55
- package/dist/functions/show.spec.js +0 -61
- package/dist/functions/update.js +0 -74
- package/dist/functions/update.spec.js +0 -86
- package/dist/i18n/en.json +0 -22
- package/dist/i18n/es.json +0 -22
- package/dist/i18n/i18n.spec.js +0 -22
- package/dist/i18n/index.js +0 -72
- package/dist/index.spec.js +0 -35
- package/dist/loader/index.js +0 -94
- package/dist/loader/loader.spec.js +0 -69
- package/dist/storefront/index.js +0 -73
- package/dist/storefront/invoices.js +0 -27
- package/dist/storefront/models/base-model.js +0 -18
- package/dist/storefront/models/invoice-model.js +0 -14
- package/dist/storefront/models/plan-model.js +0 -14
- package/dist/storefront/models/product-model.js +0 -14
- package/dist/storefront/models/ready-to-pay-model.js +0 -46
- package/dist/storefront/models/summary-model.js +0 -79
- package/dist/storefront/models/transaction-model.js +0 -31
- package/dist/storefront/payment-instruments.js +0 -47
- package/dist/storefront/payment-instruments.spec.js +0 -55
- package/dist/storefront/plans.js +0 -37
- package/dist/storefront/plans.spec.js +0 -64
- package/dist/storefront/products.js +0 -40
- package/dist/storefront/products.spec.js +0 -65
- package/dist/storefront/purchase.js +0 -43
- package/dist/storefront/purchase.spec.js +0 -48
- package/dist/storefront/ready-to-pay.js +0 -58
- package/dist/storefront/ready-to-pay.spec.js +0 -69
- package/dist/storefront/storefront.spec.js +0 -15
- package/dist/storefront/summary.js +0 -55
- package/dist/storefront/summary.spec.js +0 -124
- package/dist/storefront/transactions.js +0 -27
- package/dist/style/base/__snapshots__/theme.spec.js.snap +0 -195
- package/dist/style/base/default-theme.js +0 -699
- package/dist/style/base/index.js +0 -104
- package/dist/style/base/theme.js +0 -41
- package/dist/style/base/theme.spec.js +0 -19
- package/dist/style/browserslist.js +0 -8
- package/dist/style/components/address.js +0 -64
- package/dist/style/components/button.js +0 -71
- package/dist/style/components/divider.js +0 -48
- package/dist/style/components/forms/checkbox.js +0 -86
- package/dist/style/components/forms/field.js +0 -65
- package/dist/style/components/forms/form.js +0 -28
- package/dist/style/components/forms/input.js +0 -86
- package/dist/style/components/forms/label.js +0 -69
- package/dist/style/components/forms/select.js +0 -95
- package/dist/style/components/forms/validation.js +0 -81
- package/dist/style/components/icons.js +0 -22
- package/dist/style/components/index.js +0 -57
- package/dist/style/components/loader.js +0 -50
- package/dist/style/components/methods.js +0 -108
- package/dist/style/components/overlay.js +0 -33
- package/dist/style/helpers/index.js +0 -59
- package/dist/style/index.js +0 -50
- package/dist/style/payment-instruments/content.js +0 -17
- package/dist/style/payment-instruments/index.js +0 -20
- package/dist/style/payment-instruments/payment-card.js +0 -35
- package/dist/style/utils/border.js +0 -47
- package/dist/style/utils/color-values.js +0 -58
- package/dist/style/utils/remove-empty-null.js +0 -20
- package/dist/style/vendor/framepay.js +0 -37
- package/dist/style/vendor/postmate.js +0 -17
- package/dist/style/views/confirmation.js +0 -85
- package/dist/style/views/index.js +0 -29
- package/dist/style/views/method-selector.js +0 -20
- package/dist/style/views/modal.js +0 -93
- package/dist/style/views/result.js +0 -61
- package/dist/style/views/summary.js +0 -127
- package/dist/utils/add-dom-element.js +0 -26
- package/dist/utils/format-currency.js +0 -15
- package/dist/utils/has-valid-css-selector.js +0 -11
- package/dist/utils/index.js +0 -55
- package/dist/utils/is-dom-element.js +0 -10
- package/dist/utils/process-property-as-dom-element.js +0 -38
- package/dist/utils/sleep.js +0 -10
- package/dist/views/__snapshots__/summary.spec.js.snap +0 -246
- package/dist/views/common/iframe/base-iframe.js +0 -59
- package/dist/views/common/iframe/event-listeners.js +0 -50
- package/dist/views/common/iframe/index.js +0 -19
- package/dist/views/common/iframe/method-iframe.js +0 -33
- package/dist/views/common/iframe/modal-iframe.js +0 -84
- package/dist/views/common/iframe/view-iframe.js +0 -31
- package/dist/views/common/render-utilities.js +0 -11
- package/dist/views/confirmation.js +0 -92
- package/dist/views/method-selector/__snapshots__/method-selector.spec.js.snap +0 -3
- package/dist/views/method-selector/express-methods/apple-pay.js +0 -92
- package/dist/views/method-selector/express-methods/google-pay.js +0 -31
- package/dist/views/method-selector/express-methods/paypal.js +0 -19
- package/dist/views/method-selector/generate-digital-wallet.js +0 -68
- package/dist/views/method-selector/generate-digital-wallet.spec.js +0 -135
- package/dist/views/method-selector/get-method-data.js +0 -25
- package/dist/views/method-selector/get-payment-methods.js +0 -66
- package/dist/views/method-selector/get-payment-methods.spec.js +0 -46
- package/dist/views/method-selector/index.js +0 -122
- package/dist/views/method-selector/method-selector.spec.js +0 -124
- package/dist/views/method-selector/mount-express-methods.js +0 -69
- package/dist/views/method-selector/mount-methods.js +0 -74
- package/dist/views/modal.js +0 -88
- package/dist/views/result.js +0 -40
- package/dist/views/summary.js +0 -215
- package/dist/views/summary.spec.js +0 -134
- package/src/views/method-selector/express-methods/paypal.js +0 -7
package/dist/style/base/index.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.base = void 0;
|
|
7
|
-
|
|
8
|
-
const base = theme => `
|
|
9
|
-
/* Instruments 'global' variables
|
|
10
|
-
------------------------------------------------------------ */
|
|
11
|
-
:root,
|
|
12
|
-
#rebilly-instruments-app,
|
|
13
|
-
.rebilly-instruments-content,
|
|
14
|
-
.rebilly-instruments-loader,
|
|
15
|
-
.rebilly-instruments-modal-overlay {
|
|
16
|
-
${theme.cssVars}
|
|
17
|
-
|
|
18
|
-
--rebilly-spacings-base: calc(var(--rebilly-fontSizeBase) * 1.5);
|
|
19
|
-
--rebilly-spacings-2xs: calc(var(--rebilly-spacings-base) * 0.16667);
|
|
20
|
-
--rebilly-spacings-xs: calc(var(--rebilly-spacings-base) * 0.25);
|
|
21
|
-
--rebilly-spacings-s: calc(var(--rebilly-spacings-base) * 0.5);
|
|
22
|
-
--rebilly-spacings-m: var(--rebilly-spacings-base);
|
|
23
|
-
--rebilly-spacings-l: calc(var(--rebilly-spacings-base) * 2);
|
|
24
|
-
--rebilly-spacings-xl: calc(var(--rebilly-spacings-base) * 4);
|
|
25
|
-
--rebilly-spacings-2xl: calc(var(--rebilly-spacings-base) * 4.6667);
|
|
26
|
-
|
|
27
|
-
--rebilly-spacings-input-py: calc(var(--rebilly-spacings-2xs) * 2);
|
|
28
|
-
--rebilly-spacings-input-px: calc(var(--rebilly-spacings-s) + var(--rebilly-spacings-2xs));
|
|
29
|
-
--rebilly-spacings-label-offset-left: var(--rebilly-spacings-input-px);
|
|
30
|
-
--rebilly-spacings-form-element-min-height: calc(var(--rebilly-spacings-base) * 1.83333);
|
|
31
|
-
--rebilly-spacings-button-py: var(--rebilly-spacings-input-py);
|
|
32
|
-
--rebilly-spacings-button-px: var(--rebilly-spacings-input-px);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/* Base, Typography
|
|
37
|
-
------------------------------------------------------------ */
|
|
38
|
-
/* Base setup for top level elements */
|
|
39
|
-
.rebilly-instruments-content,
|
|
40
|
-
.rebilly-instruments-method-content,
|
|
41
|
-
.rebilly-instruments-confirmation,
|
|
42
|
-
.rebilly-instruments-results {
|
|
43
|
-
color: var(--rebilly-colorText);
|
|
44
|
-
background: var(--rebilly-colorBackground);
|
|
45
|
-
font-size: var(--rebilly-fontSizeBase);
|
|
46
|
-
font-weight: var(--rebilly-fontWeightBase);
|
|
47
|
-
line-height: var(--rebilly-fontLineHeightBase, calc(var(--rebilly-fontSizeBase) * 1.5));
|
|
48
|
-
font-family: var(--rebilly-fontFamily);
|
|
49
|
-
-webkit-font-smoothing: antialiased;
|
|
50
|
-
-moz-osx-font-smoothing: grayscale;
|
|
51
|
-
text-align: left;
|
|
52
|
-
transition: all 200ms;
|
|
53
|
-
font-smooth: var(--rebilly-fontSmooth);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.rebilly-instruments-link {
|
|
57
|
-
color: var(--rebilly-colorPrimary);
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.rebilly-instruments-link:hover {
|
|
62
|
-
text-decoration: none;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.rebilly-instruments-link .rebilly-instruments-icon {
|
|
66
|
-
fill: var(--rebilly-colorPrimary);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.rebilly-instruments-link.has-icon-left,
|
|
70
|
-
.rebilly-instruments-link.has-icon-right {
|
|
71
|
-
display: inline-flex;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.rebilly-instruments-link.has-icon-left .rebilly-instruments-icon {
|
|
75
|
-
margin-right: var(--rebilly-spacings-xs);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.rebilly-instruments-link.has-icon-right .rebilly-instruments-icon {
|
|
79
|
-
margin-left: var(--rebilly-spacings-xs);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* Typography */
|
|
83
|
-
.rebilly-instruments-h1,
|
|
84
|
-
.rebilly-instruments-h2 {
|
|
85
|
-
font-weight: var(--rebilly-headingFontWeight);
|
|
86
|
-
font-family: var(--rebilly-headingFontFamily);
|
|
87
|
-
color: var(--rebilly-headingColorText);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.rebilly-instruments-h1 {
|
|
91
|
-
font-size: calc(var(--rebilly-fontSizeBase) * 1.5);
|
|
92
|
-
line-height: 1.5;
|
|
93
|
-
line-height: calc(${theme.fontLineHeightBase} * 1.5);
|
|
94
|
-
margin: 0 0 calc(var(--rebilly-spacings-base) * 1.5) 0;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.rebilly-instruments-h2 {
|
|
98
|
-
font-size: calc(var(--rebilly-fontSizeBase) * 1.125);
|
|
99
|
-
line-height: var(--rebilly-fontLineHeightBase, 1.33);
|
|
100
|
-
margin: 0 0 var(--rebilly-spacings-base) 0;
|
|
101
|
-
}
|
|
102
|
-
`;
|
|
103
|
-
|
|
104
|
-
exports.base = base;
|
package/dist/style/base/theme.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Theme = void 0;
|
|
7
|
-
|
|
8
|
-
var _defaultTheme = _interopRequireDefault(require("./default-theme"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
14
|
-
class Theme {
|
|
15
|
-
constructor(overrides = {}) {
|
|
16
|
-
this.overrides = overrides;
|
|
17
|
-
this.theme = _defaultTheme.default;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
overrideTheme() {
|
|
21
|
-
Object.keys(this.overrides).forEach(prop => {
|
|
22
|
-
this.theme[prop] = this.overrides[prop];
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get cssVars() {
|
|
27
|
-
return Object.keys(this.theme).filter(v => !Theme.nonCssProperties.includes(v)).map(p => `--rebilly-${p}: ${this.theme[p]};`).join('\n');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
build() {
|
|
31
|
-
this.overrideTheme();
|
|
32
|
-
return { ...this.theme,
|
|
33
|
-
cssVars: this.cssVars
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
exports.Theme = Theme;
|
|
40
|
-
|
|
41
|
-
_defineProperty(Theme, "nonCssProperties", ['labels']);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _theme = require("./theme");
|
|
4
|
-
|
|
5
|
-
describe('RebillyInstruments theme', () => {
|
|
6
|
-
it('builds the theme object', () => {
|
|
7
|
-
const theme = new _theme.Theme().build();
|
|
8
|
-
expect(theme).toMatchSnapshot();
|
|
9
|
-
});
|
|
10
|
-
it('properly overrides the default properties', () => {
|
|
11
|
-
const overrides = {
|
|
12
|
-
colorPrimary: 'red',
|
|
13
|
-
buttonBorderRadius: '30px'
|
|
14
|
-
};
|
|
15
|
-
const theme = new _theme.Theme(overrides).build();
|
|
16
|
-
expect(theme.colorPrimary).toEqual('red');
|
|
17
|
-
expect(theme.buttonBorderRadius).toEqual('30px');
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.address = void 0;
|
|
7
|
-
|
|
8
|
-
// -----------------------------------------------------------------------------
|
|
9
|
-
// This file contains all styles related to the address component.
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
const address = () => `
|
|
12
|
-
/**
|
|
13
|
-
* Address
|
|
14
|
-
*/
|
|
15
|
-
.rebilly-instruments-address {
|
|
16
|
-
margin: 0 0 var(--rebilly-spacings-base);
|
|
17
|
-
color: var(--rebilly-colorMutedText);
|
|
18
|
-
font-style: normal;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Address Name: Default
|
|
23
|
-
*/
|
|
24
|
-
.rebilly-instruments-address-name-default {
|
|
25
|
-
/* No style changes */
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Address Name: Combined
|
|
30
|
-
*/
|
|
31
|
-
.rebilly-instruments-address-name-combined {
|
|
32
|
-
/* No style changes */
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Address Name: Stacked
|
|
37
|
-
*/
|
|
38
|
-
.rebilly-instruments-address-name-stacked {
|
|
39
|
-
/* No style changes */
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Address Region: Default
|
|
44
|
-
*/
|
|
45
|
-
.rebilly-instruments-address-region-default {
|
|
46
|
-
/* No style changes */
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Address Region: Split
|
|
51
|
-
*/
|
|
52
|
-
.rebilly-instruments-address-region-split {
|
|
53
|
-
/* No style changes */
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Address Name: Stacked
|
|
58
|
-
*/
|
|
59
|
-
.rebilly-instruments-address-region-stacked {
|
|
60
|
-
/* No style changes */
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
63
|
-
|
|
64
|
-
exports.address = address;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.button = void 0;
|
|
7
|
-
|
|
8
|
-
// -----------------------------------------------------------------------------
|
|
9
|
-
// This file contains all styles related to the button component.
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
const button = () => `
|
|
12
|
-
/**
|
|
13
|
-
* Buttons
|
|
14
|
-
*/
|
|
15
|
-
.rebilly-instruments-button {
|
|
16
|
-
font-size: var(--rebilly-buttonFontSize);
|
|
17
|
-
font-family: var(--rebilly-buttonFontFamily);
|
|
18
|
-
line-height: var(--rebilly-buttonFontLineHeight);
|
|
19
|
-
padding: var(--rebilly-spacings-button-py) var(--rebilly-spacings-button-px);
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
background: var(--rebilly-buttonColorBackground);
|
|
22
|
-
color: var(--rebilly-buttonColorText, #FFF);
|
|
23
|
-
border-radius: var(--rebilly-buttonBorderRadius);
|
|
24
|
-
font-weight: var(--rebilly-buttonFontWeight);
|
|
25
|
-
border: var(--rebilly-buttonBorder);
|
|
26
|
-
box-shadow: var(--rebilly-buttonBoxShadow);
|
|
27
|
-
margin: calc(var(--rebilly-spacings-2xs) + var(--rebilly-spacings-s) / 2) 0;
|
|
28
|
-
width: 100%;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
min-height: 44px;
|
|
31
|
-
transition: all 0.2s ease;
|
|
32
|
-
outline: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.rebilly-instruments-button:not([disabled]):hover {
|
|
36
|
-
background: var(--rebilly-buttonHoverColorBackground);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.rebilly-instruments-button:not([disabled]):active {
|
|
40
|
-
background: var(--rebilly-buttonActiveColorBackground);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.rebilly-instruments-button.rebilly-instruments-button-secondary {
|
|
44
|
-
background: var(--rebilly-colorBackground);
|
|
45
|
-
color: var(--rebilly-buttonColorBackground);
|
|
46
|
-
border-color: var(--rebilly-buttonColorBackground);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.rebilly-instruments-button.rebilly-instruments-button-secondary:not([disabled]):hover,
|
|
50
|
-
.rebilly-instruments-button.rebilly-instruments-button-secondary:not([disabled]):active {
|
|
51
|
-
background: var(--rebilly-colorBackground);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.rebilly-instruments-button:focus {
|
|
55
|
-
box-shadow: 0 0 0 1px var(--rebilly-colorPrimary);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.rebilly-instruments-button:disabled,
|
|
59
|
-
.rebilly-instruments-button:disabled:hover {
|
|
60
|
-
cursor: not-allowed;
|
|
61
|
-
opacity: 0.6;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.rebilly-instruments-button::first-letter { text-transform: uppercase; }
|
|
65
|
-
|
|
66
|
-
.rebilly-instruments-button:first-of-type { margin-top: 0; }
|
|
67
|
-
|
|
68
|
-
.rebilly-instruments-button:last-of-type { margin-bottom: 0; }
|
|
69
|
-
`;
|
|
70
|
-
|
|
71
|
-
exports.button = button;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.divider = void 0;
|
|
7
|
-
|
|
8
|
-
// -----------------------------------------------------------------------------
|
|
9
|
-
// This file contains all styles related to the divider component.
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
const divider = () => `
|
|
12
|
-
/**
|
|
13
|
-
* Divider
|
|
14
|
-
*/
|
|
15
|
-
.rebilly-instruments-divider {
|
|
16
|
-
line-height: var(--rebilly-fontLineHeightBase, calc(var(--rebilly-fontSizeBase) * 1.5));
|
|
17
|
-
padding: var(--rebilly-spacings-base) 0;
|
|
18
|
-
margin: 0;
|
|
19
|
-
position: relative;
|
|
20
|
-
outline: 0;
|
|
21
|
-
border: 0;
|
|
22
|
-
text-align: center;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.rebilly-instruments-divider::before {
|
|
26
|
-
background: var(--rebilly-colorMutedBorder);
|
|
27
|
-
content: '';
|
|
28
|
-
position: absolute;
|
|
29
|
-
left: 0;
|
|
30
|
-
top: 50%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 1px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.rebilly-instruments-divider .rebilly-instruments-divider-label {
|
|
36
|
-
color: var(--rebilly-colorMutedText);
|
|
37
|
-
font-weight: 500;
|
|
38
|
-
text-transform: uppercase;
|
|
39
|
-
padding: 0 var(--rebilly-spacings-s);
|
|
40
|
-
line-height: calc(var(--rebilly-fontSizeBase) * 0.875);
|
|
41
|
-
background-color: var(--rebilly-colorBackground);
|
|
42
|
-
font-size: calc(var(--rebilly-fontSizeBase) * 0.875);
|
|
43
|
-
position: relative;
|
|
44
|
-
display: inline-block;
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
|
|
48
|
-
exports.divider = divider;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.checkbox = void 0;
|
|
7
|
-
|
|
8
|
-
var _colorValues = require("../../utils/color-values");
|
|
9
|
-
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
// This file contains all styles related to the checkbox component.
|
|
12
|
-
// -----------------------------------------------------------------------------
|
|
13
|
-
const checkbox = theme => `
|
|
14
|
-
/**
|
|
15
|
-
* Checkbox
|
|
16
|
-
*/
|
|
17
|
-
.rebilly-instruments-form-field-checkbox {
|
|
18
|
-
position: relative;
|
|
19
|
-
opacity: 1;
|
|
20
|
-
align-items: center;
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: row-reverse;
|
|
23
|
-
justify-content: start;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
transform: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.rebilly-instruments-form-field-checkbox > * {
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"] {
|
|
33
|
-
position: absolute;
|
|
34
|
-
opacity: 0;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
height: 0;
|
|
37
|
-
width: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.rebilly-instruments-form-field-checkbox span {
|
|
41
|
-
position: relative;
|
|
42
|
-
top: 0;
|
|
43
|
-
left: 0;
|
|
44
|
-
height: 24px;
|
|
45
|
-
width: 24px;
|
|
46
|
-
border-radius: 4px;
|
|
47
|
-
box-shadow: inset 0 0 0 1px var(--rebilly-colorMutedBorder);
|
|
48
|
-
margin-right: var(--rebilly-spacings-s);
|
|
49
|
-
background-color: transparent;
|
|
50
|
-
transition: all 200ms;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.rebilly-instruments-form-field-checkbox span:after {
|
|
54
|
-
content: '';
|
|
55
|
-
position: absolute;
|
|
56
|
-
left: 9px;
|
|
57
|
-
top: 4px;
|
|
58
|
-
opacity: 0;
|
|
59
|
-
width: 5px;
|
|
60
|
-
height: 11px;
|
|
61
|
-
border: solid var(--rebilly-colorPrimary);
|
|
62
|
-
border-width: 0 2px 2px 0;
|
|
63
|
-
-webkit-transform: rotate(45deg);
|
|
64
|
-
-ms-transform: rotate(45deg);
|
|
65
|
-
transform: rotate(45deg);
|
|
66
|
-
transition: all 200ms;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {
|
|
70
|
-
box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {
|
|
74
|
-
opacity: 1;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {
|
|
78
|
-
box-shadow: 0 0 0 2px ${(0, _colorValues.lighten)(theme.colorPrimary, 80)}, inset 0 0 0 1px var(--rebilly-colorPrimary);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {
|
|
82
|
-
opacity: 0.6;
|
|
83
|
-
}
|
|
84
|
-
`;
|
|
85
|
-
|
|
86
|
-
exports.checkbox = checkbox;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.field = void 0;
|
|
7
|
-
|
|
8
|
-
// -----------------------------------------------------------------------------
|
|
9
|
-
// This file contains all styles related to the field component.
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
const field = () => `
|
|
12
|
-
/**
|
|
13
|
-
* Field
|
|
14
|
-
*/
|
|
15
|
-
.rebilly-instruments-form-field {
|
|
16
|
-
margin: calc(var(--rebilly-spacings-xs) + var(--rebilly-spacings-s)) 0;
|
|
17
|
-
position: relative;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.rebilly-instruments-form-field.is-compact {
|
|
21
|
-
margin-top: calc(var(--rebilly-spacings-2xs) + var(--rebilly-spacings-s));
|
|
22
|
-
margin-bottom: calc(var(--rebilly-spacings-2xs) + var(--rebilly-spacings-s));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.rebilly-instruments-form-field > div {
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-wrap: wrap;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
position: relative;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* Field group */
|
|
33
|
-
.rebilly-instruments-form-field-group {
|
|
34
|
-
margin: calc(calc(var(--rebilly-spacings-xs) * -1) - var(--rebilly-spacings-s)) 0;
|
|
35
|
-
display: flex;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.rebilly-instruments-form-field-group > * {
|
|
39
|
-
flex: 1 0;
|
|
40
|
-
margin-left: var(--rebilly-spacings-xs);
|
|
41
|
-
margin-right: var(--rebilly-spacings-xs);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.rebilly-instruments-form-field-group > *:first-child {
|
|
45
|
-
margin-left: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.rebilly-instruments-form-field-group > *:last-child {
|
|
49
|
-
margin-right: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@media (max-width: 480px) {
|
|
53
|
-
.rebilly-instruments-form-field-group {
|
|
54
|
-
display: block;
|
|
55
|
-
margin: calc(var(--rebilly-spacings-2xs) + var(--rebilly-spacings-s)) 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.rebilly-instruments-form-field-group > * {
|
|
59
|
-
margin-left: 0;
|
|
60
|
-
margin-right: 0;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
`;
|
|
64
|
-
|
|
65
|
-
exports.field = field;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.form = void 0;
|
|
7
|
-
|
|
8
|
-
// -----------------------------------------------------------------------------
|
|
9
|
-
// This file contains all styles related to the form component.
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
const form = () => `
|
|
12
|
-
/**
|
|
13
|
-
* Form
|
|
14
|
-
*/
|
|
15
|
-
/* Chrome autocomplete styles */
|
|
16
|
-
.rebilly-instruments-form input:-webkit-autofill,
|
|
17
|
-
.rebilly-instruments-form input:-webkit-autofill:hover,
|
|
18
|
-
.rebilly-instruments-form input:-webkit-autofill:focus,
|
|
19
|
-
.rebilly-instruments-form select:-webkit-autofill,
|
|
20
|
-
.rebilly-instruments-form select:-webkit-autofill:hover,
|
|
21
|
-
.rebilly-instruments-form select:-webkit-autofill:focus {
|
|
22
|
-
-webkit-text-fill-color: var(--rebilly-colorText);
|
|
23
|
-
-webkit-box-shadow: 0 0 0px 1000px transparent inset;
|
|
24
|
-
transition: background-color 5000s ease-in-out 0s;
|
|
25
|
-
}
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
exports.form = form;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.input = void 0;
|
|
7
|
-
|
|
8
|
-
// -----------------------------------------------------------------------------
|
|
9
|
-
// This file contains all styles related to the input component.
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
const input = () => `
|
|
12
|
-
/**
|
|
13
|
-
* Input
|
|
14
|
-
*/
|
|
15
|
-
.rebilly-instruments-form-field-input {
|
|
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-input: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-input: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-input::placeholder {
|
|
59
|
-
color: var(--rebilly-inputPlaceholderColorText);
|
|
60
|
-
font-family: var(--rebilly-inputPlaceholderFontFamily);
|
|
61
|
-
font-size: var(--rebilly-inputPlaceholderFontSize);
|
|
62
|
-
line-height: var(--rebilly-inputPlaceholderFontLineHeight);
|
|
63
|
-
font-weight: var(--rebilly-inputPlaceholderFontWeight);
|
|
64
|
-
opacity: 1;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.rebilly-instruments-form-field-input::selection {
|
|
68
|
-
color: var(--rebilly-inputSelectionColorText);
|
|
69
|
-
background: var(--rebilly-inputSelectionColorBackground);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.rebilly-instruments-form-field-input:disabled {
|
|
73
|
-
opacity: 0.6;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Floating Labels */
|
|
77
|
-
.is-floating .rebilly-instruments-form-field-input::placeholder {
|
|
78
|
-
opacity: 0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.is-floating .rebilly-instruments-form-field-input:focus::placeholder {
|
|
82
|
-
opacity: 1;
|
|
83
|
-
}
|
|
84
|
-
`;
|
|
85
|
-
|
|
86
|
-
exports.input = input;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.label = void 0;
|
|
7
|
-
|
|
8
|
-
// -----------------------------------------------------------------------------
|
|
9
|
-
// This file contains all styles related to the label component.
|
|
10
|
-
// -----------------------------------------------------------------------------
|
|
11
|
-
const label = () => `
|
|
12
|
-
/**
|
|
13
|
-
* Label
|
|
14
|
-
*/
|
|
15
|
-
.rebilly-instruments-form-field-label {
|
|
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%;
|
|
27
|
-
background: transparent;
|
|
28
|
-
opacity: 1;
|
|
29
|
-
position: absolute;
|
|
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);
|
|
32
|
-
cursor: text;
|
|
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);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.is-floating .rebilly-instruments-form-field-select + .rebilly-instruments-form-field-label {
|
|
53
|
-
font-size: var(--rebilly-fontSizeBase);
|
|
54
|
-
opacity: 0.5;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.is-floating .rebilly-instruments-form-field-input:focus + .rebilly-instruments-form-field-label,
|
|
58
|
-
.is-floating .rebilly-instruments-form-field-select:focus + .rebilly-instruments-form-field-label,
|
|
59
|
-
.is-floating .rebilly-instruments-form-field-label.is-active {
|
|
60
|
-
padding: 0 var(--rebilly-spacings-2xs);
|
|
61
|
-
left: calc(var(--rebilly-spacings-label-offset-left) - var(--rebilly-spacings-2xs));
|
|
62
|
-
line-height: 1;
|
|
63
|
-
background: var(--rebilly-colorBackground);
|
|
64
|
-
opacity: 1;
|
|
65
|
-
transform: translateY(-175%) scale(0.875);
|
|
66
|
-
}
|
|
67
|
-
`;
|
|
68
|
-
|
|
69
|
-
exports.label = label;
|