@zonos/elements 1.3.142 → 1.3.143
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/cjs/TaxId-4632639d.js +29 -0
- package/dist/cjs/{cart-199b0751.js → cart-6ac8dc06.js} +251 -1
- package/dist/cjs/index.cjs.js +10 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-4f1ee604.js → paypal-ea8b4ca0.js} +1 -1
- package/dist/cjs/{zonos-address_7.cjs.entry.js → zonos-address_8.cjs.entry.js} +59 -4
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +25 -4
- package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +22 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +162 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +220 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/stripe.js +9 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
- package/dist/collection/components/store/translationStore/strings.base.js +12 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
- package/dist/collection/components/store/translationStore/strings.french.js +12 -0
- package/dist/collection/components/store/translationStore/strings.german.js +12 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
- package/dist/collection/types/checkout/TaxId.js +24 -0
- package/dist/collection/types/generated/graphql.internal.types.js +52 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/TaxId-915ef042.js +26 -0
- package/dist/esm/{cart-cf87ec6f.js → cart-acba54d0.js} +251 -1
- package/dist/esm/index.js +8 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-b7124cc4.js → paypal-3401f757.js} +1 -1
- package/dist/esm/{zonos-address_7.entry.js → zonos-address_8.entry.js} +59 -5
- package/dist/esm/zonos-cart-items_13.entry.js +25 -4
- package/dist/esm/zonos-checkout.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +5 -5
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +4 -4
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/TaxId-915ef042.js +1 -0
- package/dist/esm-es5/cart-acba54d0.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-b7124cc4.js → paypal-3401f757.js} +1 -1
- package/dist/esm-es5/{zonos-address_7.entry.js → zonos-address_8.entry.js} +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +109 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +5 -0
- package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +42 -0
- package/dist/types/components/store/checkout/stripe.d.ts +8 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components.d.ts +100 -0
- package/dist/types/types/checkout/TaxId.d.ts +20 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +71 -109
- package/dist/types/types/generated/graphql.internal.types.ts +91 -98
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-2949faf3.entry.js → p-0ab29580.entry.js} +1 -1
- package/dist/zonos-elements/{p-c1b098de.system.js → p-0b5c9f89.system.js} +1 -1
- package/dist/zonos-elements/{p-2d514c1d.system.entry.js → p-0db28495.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9b720cf4.entry.js → p-1198c874.entry.js} +1 -1
- package/dist/zonos-elements/p-12a6b7bd.system.js +1 -0
- package/dist/zonos-elements/{p-232963d3.system.entry.js → p-2ab5e362.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8c487480.entry.js → p-302f5d25.entry.js} +1 -1
- package/dist/zonos-elements/p-386325ae.system.js +1 -0
- package/dist/zonos-elements/{p-2e152517.system.entry.js → p-38d0c496.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-65069140.entry.js → p-3f991022.entry.js} +1 -1
- package/dist/zonos-elements/{p-2c19f5e2.entry.js → p-4c7f0417.entry.js} +1 -1
- package/dist/zonos-elements/{p-72256333.entry.js → p-54058b57.entry.js} +1 -1
- package/dist/zonos-elements/p-5bd927f2.js +1 -0
- package/dist/zonos-elements/{p-f295030e.system.entry.js → p-654fc23d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ebdd9b64.system.entry.js → p-6a8862a6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e54432c.system.entry.js → p-78e4f877.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-983f23a1.system.entry.js → p-8ac02349.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ded984d9.system.entry.js → p-8e30228d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-076388d3.entry.js → p-8f26cc7e.entry.js} +1 -1
- package/dist/zonos-elements/{p-2b8cddb7.entry.js → p-9d7a860c.entry.js} +1 -1
- package/dist/zonos-elements/p-9da2d116.entry.js +1 -0
- package/dist/zonos-elements/{p-a8bd492d.system.entry.js → p-9e84f647.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a08ea336.js +1 -0
- package/dist/zonos-elements/p-a4f045d4.js +17 -0
- package/dist/zonos-elements/{p-68d79b58.entry.js → p-ab6973a5.entry.js} +1 -1
- package/dist/zonos-elements/{p-58a09715.entry.js → p-b2ea7adb.entry.js} +1 -1
- package/dist/zonos-elements/p-c437d76c.system.js +1 -0
- package/dist/zonos-elements/{p-3cb4468f.system.entry.js → p-d1afd314.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d381288e.entry.js → p-d3867033.entry.js} +1 -1
- package/dist/zonos-elements/{p-0920500d.entry.js → p-d9511c4a.entry.js} +1 -1
- package/dist/zonos-elements/{p-d198421b.system.entry.js → p-dba6147b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b490b0a.system.entry.js → p-df9c0bfa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e9964a5a.system.js +1 -1
- package/dist/zonos-elements/{p-3cf30d83.entry.js → p-f2d07062.entry.js} +1 -1
- package/dist/zonos-elements/{p-673b4402.system.entry.js → p-f9aef1fc.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fa538a74.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-cf87ec6f.js +0 -1
- package/dist/zonos-elements/p-0cda2818.system.js +0 -1
- package/dist/zonos-elements/p-0d2cf216.entry.js +0 -1
- package/dist/zonos-elements/p-272052bd.system.entry.js +0 -1
- package/dist/zonos-elements/p-3d82e70e.js +0 -1
- package/dist/zonos-elements/p-6271e108.js +0 -17
- package/dist/zonos-elements/p-866bb93e.system.js +0 -1
|
@@ -6,9 +6,9 @@ const index = require('./index-b678ce0c.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-8971eb65.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-f97c99ad.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-6ac8dc06.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-864d3c53.js');
|
|
11
|
-
const paypal = require('./paypal-
|
|
11
|
+
const paypal = require('./paypal-ea8b4ca0.js');
|
|
12
12
|
require('./isDarkColor-434d71dd.js');
|
|
13
13
|
|
|
14
14
|
const zonosNotificationCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";
|
|
@@ -111,7 +111,7 @@ const ZonosPayment = class {
|
|
|
111
111
|
}
|
|
112
112
|
render() {
|
|
113
113
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
114
|
-
return (index.h(index.Host, { key: '
|
|
114
|
+
return (index.h(index.Host, { key: 'adcbeae4dadcaff59781ae47f779032e9fe43f5c', class: "zonos--payment zonos--elements" }, this.titleText && (index.h("zonos-text", { key: 'c83017ca67410a6715cacf6c0e524ed7b4304837', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("div", { key: '55c6d6dde8efaffec4411a838c62b7ede3efe30a', class: "zonos--payment-component" }), index.h("div", { key: 'd27b440253222daf94e4a6ad862c901efa54bfe5', class: "zonos--payment-paypal-container" })));
|
|
115
115
|
}
|
|
116
116
|
get el() { return index.getElement(this); }
|
|
117
117
|
static get watchers() { return {
|
|
@@ -165,7 +165,7 @@ const ZonosPaypalPayment = class {
|
|
|
165
165
|
void this.loadPaypal();
|
|
166
166
|
}
|
|
167
167
|
render() {
|
|
168
|
-
return (index.h(index.Host, { key: '
|
|
168
|
+
return (index.h(index.Host, { key: '7be3c38f702c8fb105c54e652774f69fbbcfd34c', class: "zonos--paypal-payment zonos--elements" }, index.h("div", { key: '6845b53c2a5d1f2637f3ae9d867d2c6de48ab1b5', class: "zonos--payment-paypal-container" })));
|
|
169
169
|
}
|
|
170
170
|
get el() { return index.getElement(this); }
|
|
171
171
|
};
|
|
@@ -17,9 +17,9 @@ const ZonosToggle = class {
|
|
|
17
17
|
this.value = undefined;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (index.h(index.Host, { key: '
|
|
20
|
+
return (index.h(index.Host, { key: '01958140c90fdadecbfca64fe65dbf1132af2cc1', class: classes.classes(['zonos--elements zonos--toggle']), style: {
|
|
21
21
|
'--zonos--font-family': zonosStore.zonosStoreFontFamily(),
|
|
22
|
-
} }, index.h("div", { key: '
|
|
22
|
+
} }, index.h("div", { key: '5362589929c25b5ba897d23a308f6dd2759c4ac0', class: "wrapper" }, this.options.map(option => {
|
|
23
23
|
const selected = option.value === this.value;
|
|
24
24
|
return (index.h("button", { class: classes.classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
|
|
25
25
|
this.toggleChanged.emit(option.value);
|
|
@@ -16,10 +16,10 @@ const ZonosTooltip = class {
|
|
|
16
16
|
this.showTooltip = false;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (index.h(index.Host, { key: '
|
|
19
|
+
return (index.h(index.Host, { key: 'fa16c20a254958721bcc44dbe96f6588545e86f0', class: "zonos--elements" }, index.h("div", { key: '0e57607df02b12d5df9fb84b64c8345b40b2e823', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, index.h("slot", { key: '9faf457a730046b789a5b822fb6ab89d88970d59' }), index.h("div", { key: 'f85dbf49e172f9a1c1b57443b1ea22d819b4099c', class: classes.classes([
|
|
20
20
|
this.showTooltip && 'zonos--show-tooltip',
|
|
21
21
|
'zonos--tooltip-content',
|
|
22
|
-
]) }, index.h("zonos-text", { key: '
|
|
22
|
+
]) }, index.h("zonos-text", { key: '6e90bfe3f346cbe5d49aab4e03c868b3138aeca7', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), index.h("zonos-text", { key: '1c10f75f13ae427737fcf4ece41b9f7ba13fb76d', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
ZonosTooltip.style = ZonosTooltipStyle0;
|
|
@@ -15,9 +15,9 @@ const VStack = class {
|
|
|
15
15
|
this.spacing = 24;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h(index.Host, { key: '
|
|
18
|
+
return (index.h(index.Host, { key: '32154740511a038c4ca04ad55bc7d77d96496654', style: {
|
|
19
19
|
'--zonos--font-family': zonosStore.zonosStoreFontFamily(),
|
|
20
|
-
} }, index.h("div", { key: '
|
|
20
|
+
} }, index.h("div", { key: 'f80f8b0e51554a3db9efa960706ac9bb450155cb', class: classes.classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, index.h("slot", { key: '711a207eb1b4c59672be4df8b19a3c7200d44f29' }))));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
VStack.style = ZonosVStackStyle0;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"components/common/zonos-logo/zonos-logo.js",
|
|
37
37
|
"components/common/zonos-rest-state/zonos-rest-state.js",
|
|
38
38
|
"components/common/zonos-select-dialog-header/zonos-select-dialog-header.js",
|
|
39
|
+
"components/common/zonos-stripe-input/zonos-stripe-input.js",
|
|
39
40
|
"components/common/zonos-text/zonos-text.js",
|
|
40
41
|
"components/common/zonos-toggle/zonos-toggle.js",
|
|
41
42
|
"components/common/zonos-tooltip/zonos-tooltip.js",
|
|
@@ -5,6 +5,7 @@ import { getZonosStoreTheme, zonosStore, } from "../../../store/zonosStore";
|
|
|
5
5
|
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
6
6
|
import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
|
|
7
7
|
import { submitGtag } from "../../../utils/submitGtag";
|
|
8
|
+
import { countryRequireTaxId, shipToTaxIdLabels, } from "../../../../types/checkout/Tax";
|
|
8
9
|
export class ZonosCustomerInfo {
|
|
9
10
|
constructor() {
|
|
10
11
|
/**
|
|
@@ -166,6 +167,26 @@ export class ZonosCustomerInfo {
|
|
|
166
167
|
}
|
|
167
168
|
return invalidList;
|
|
168
169
|
}
|
|
170
|
+
isInTaxIdCountry(countryCode) {
|
|
171
|
+
return countryRequireTaxId.includes(countryCode);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Render tax id input based on ship to country code
|
|
175
|
+
*/
|
|
176
|
+
renderTaxIdInput(countryCode) {
|
|
177
|
+
// Don't render tax id input if the country is not provided
|
|
178
|
+
if (!countryCode) {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
const isCountryRequireTaxId = this.isInTaxIdCountry(countryCode);
|
|
182
|
+
if (!isCountryRequireTaxId) {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
const taxIdInputInfo = shipToTaxIdLabels[countryCode];
|
|
186
|
+
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', onInputChange: (event) => {
|
|
187
|
+
stripeStore.taxId = event.detail;
|
|
188
|
+
} })));
|
|
189
|
+
}
|
|
169
190
|
render() {
|
|
170
191
|
var _a, _b;
|
|
171
192
|
if (!stripeStore.stripeElements) {
|
|
@@ -190,7 +211,7 @@ export class ZonosCustomerInfo {
|
|
|
190
211
|
if (this.showErrorBanner) {
|
|
191
212
|
this.showErrorBanner = !this.handleValidate();
|
|
192
213
|
}
|
|
193
|
-
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { defaultEmail: (_b = this.defaultAddress) === null || _b === void 0 ? void 0 : _b.email, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" }), h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
214
|
+
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { defaultEmail: (_b = this.defaultAddress) === null || _b === void 0 ? void 0 : _b.email, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" }), this.renderTaxIdInput(this.shippingCountry), h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
194
215
|
stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
195
216
|
} }), h("zonos-collapse", { collapsed: !showBilling }, h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Billing address'), type: "billing" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
196
217
|
// use primary type when on mobile mode
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: var(--zonos--font-family, Inter), Inter;
|
|
3
|
+
display: block;
|
|
4
|
+
white-space: normal;
|
|
5
|
+
}
|
|
6
|
+
:host * {
|
|
7
|
+
font-family: var(--zonos--font-family, Inter), Inter;
|
|
8
|
+
}
|
|
9
|
+
:host img {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
:host dl,
|
|
13
|
+
:host dd,
|
|
14
|
+
:host h1,
|
|
15
|
+
:host h2,
|
|
16
|
+
:host h3,
|
|
17
|
+
:host h4,
|
|
18
|
+
:host h5,
|
|
19
|
+
:host h6,
|
|
20
|
+
:host hr,
|
|
21
|
+
:host figure,
|
|
22
|
+
:host p,
|
|
23
|
+
:host pre {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* All sets of variable are here */
|
|
28
|
+
/* smooth font rendering */
|
|
29
|
+
:host {
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
-webkit-font-smoothing: antialiased;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host {
|
|
35
|
+
--zonos--background-color: #f1f1f1;
|
|
36
|
+
--zonos--local-glowing-color: 0 0 0 3px hsla(0, 0%, 100%, 25%),
|
|
37
|
+
0 0 0 1px var(--zonos--primary-color);
|
|
38
|
+
--zonos--border: 1px solid #e8e8e8;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host(.dark) {
|
|
42
|
+
color-scheme: dark;
|
|
43
|
+
--zonos--background-color: #30313d;
|
|
44
|
+
--zonos--local-glowing-color: 0px 2px 4px rgba(0, 0, 0, 0.5),
|
|
45
|
+
0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),
|
|
46
|
+
0 1px 1px 0 rgba(255, 255, 255, 0.12);
|
|
47
|
+
--zonos--border: 1px solid var(--zonos--primary-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host {
|
|
51
|
+
margin: 1px;
|
|
52
|
+
height: calc(var(--zonos-elements-size-xl) - 2px);
|
|
53
|
+
/**disabled state */
|
|
54
|
+
}
|
|
55
|
+
:host .zonos--label-wrapper {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: row;
|
|
59
|
+
height: 100%;
|
|
60
|
+
width: 100%;
|
|
61
|
+
background: var(--zonos--background-color);
|
|
62
|
+
border-radius: var(--zonos--border-radius);
|
|
63
|
+
border: var(--zonos--border);
|
|
64
|
+
outline-offset: 0;
|
|
65
|
+
outline-width: 2px;
|
|
66
|
+
}
|
|
67
|
+
:host .zonos--floated-input {
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
position: relative;
|
|
70
|
+
padding: 0 16px;
|
|
71
|
+
outline: none;
|
|
72
|
+
transition: var(--zonos-elements-transition);
|
|
73
|
+
width: 100%;
|
|
74
|
+
border-radius: var(--zonos--border-radius);
|
|
75
|
+
background: var(--zonos--background-color);
|
|
76
|
+
border: var(--zonos--border);
|
|
77
|
+
order: 2;
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
font-size: var(--zonos--font-size);
|
|
80
|
+
}
|
|
81
|
+
:host .zonos--floated-input :-internal-autofill-selected {
|
|
82
|
+
border-radius: var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6);
|
|
83
|
+
}
|
|
84
|
+
:host .zonos--floated-input :-internal-autofill-selected + label + div {
|
|
85
|
+
background-color: #e8f0fe;
|
|
86
|
+
}
|
|
87
|
+
:host .zonos--floated-input.has-label {
|
|
88
|
+
padding: 24px 4px 2px 16px;
|
|
89
|
+
}
|
|
90
|
+
:host .zonos--floated-input.has-label.has-input-prefix {
|
|
91
|
+
padding-left: 0;
|
|
92
|
+
}
|
|
93
|
+
:host .zonos--floated-input.has-label.has-input-prefix + .zonos--floated-label label {
|
|
94
|
+
margin-left: 0;
|
|
95
|
+
}
|
|
96
|
+
:host .zonos--floated-input:not(.has-label)::placeholder {
|
|
97
|
+
opacity: var(--zonos-elements-opacity-disabled);
|
|
98
|
+
}
|
|
99
|
+
:host .zonos--floated-input::placeholder {
|
|
100
|
+
transition: var(--zonos-elements-transition);
|
|
101
|
+
opacity: 0;
|
|
102
|
+
}
|
|
103
|
+
:host .zonos--floated-input:focus {
|
|
104
|
+
outline: none;
|
|
105
|
+
border: var(--zonos--border);
|
|
106
|
+
}
|
|
107
|
+
:host .zonos--floated-input:focus + .zonos--floated-label::after {
|
|
108
|
+
box-shadow: var(--zonos--glowing-color, var(--zonos--local-glowing-color));
|
|
109
|
+
}
|
|
110
|
+
:host .zonos--floated-input.has-error + .zonos--floated-label::after {
|
|
111
|
+
box-shadow: 0 0 0 2px #df1b41;
|
|
112
|
+
}
|
|
113
|
+
:host .zonos--floated-input.has-content::placeholder, :host .zonos--floated-input:focus::placeholder {
|
|
114
|
+
opacity: var(--zonos-elements-opacity-disabled);
|
|
115
|
+
}
|
|
116
|
+
:host .zonos--floated-input.has-content + .zonos--floated-label label, :host .zonos--floated-input:focus + .zonos--floated-label label {
|
|
117
|
+
top: 11px;
|
|
118
|
+
transform: scale(0.8);
|
|
119
|
+
}
|
|
120
|
+
:host .zonos--floated-input:-webkit-autofill, :host .zonos--floated-input:-moz-autofill {
|
|
121
|
+
background-color: var(--zonos-elements-input-background);
|
|
122
|
+
color: var(--zonos-elements-text-color);
|
|
123
|
+
}
|
|
124
|
+
:host .zonos--floated-label {
|
|
125
|
+
display: block;
|
|
126
|
+
max-height: 0;
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
order: 1;
|
|
129
|
+
}
|
|
130
|
+
:host .zonos--floated-label label {
|
|
131
|
+
color: var(--zonos-elements-gray-800);
|
|
132
|
+
position: absolute;
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
line-height: 16px;
|
|
135
|
+
display: inline-block;
|
|
136
|
+
filter: blur(0);
|
|
137
|
+
transform-origin: left top;
|
|
138
|
+
transition: var(--zonos-elements-transition);
|
|
139
|
+
margin-left: 16px;
|
|
140
|
+
top: calc(50% - 8px);
|
|
141
|
+
z-index: 1;
|
|
142
|
+
}
|
|
143
|
+
:host .zonos--floated-label::after {
|
|
144
|
+
content: "";
|
|
145
|
+
position: absolute;
|
|
146
|
+
left: 0;
|
|
147
|
+
right: 0;
|
|
148
|
+
top: 0;
|
|
149
|
+
bottom: 0;
|
|
150
|
+
border-radius: var(--zonos--border-radius);
|
|
151
|
+
}
|
|
152
|
+
:host .disabled .zonos--floated-label {
|
|
153
|
+
pointer-events: inherit;
|
|
154
|
+
}
|
|
155
|
+
:host .disabled .zonos--floated-label::after {
|
|
156
|
+
cursor: not-allowed;
|
|
157
|
+
z-index: 1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:host(.dark) .zonos--label-wrapper {
|
|
161
|
+
background: #30313d;
|
|
162
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import { zonosStore, zonosStoreFontFamily, } from "../../store/zonosStore";
|
|
3
|
+
import { classes } from "../../utils/classes";
|
|
4
|
+
import { getBorderRadius } from "../../utils/getBorderRadius";
|
|
5
|
+
import { isDarkColor } from "../../utils/isDarkColor";
|
|
6
|
+
/**
|
|
7
|
+
* This component is input that has similar style to Stripe since we will use it with other Stripe elements when we don't want to use Link authentication element
|
|
8
|
+
*/
|
|
9
|
+
export class ZonosStripeInput {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.inputValue = '';
|
|
12
|
+
this.inputLabel = undefined;
|
|
13
|
+
this.overridePrimaryColor = undefined;
|
|
14
|
+
this.overrideSecondaryColor = undefined;
|
|
15
|
+
this.isDisabled = false;
|
|
16
|
+
this.isError = false;
|
|
17
|
+
this.inputPlaceholder = '';
|
|
18
|
+
this.value = this.inputValue;
|
|
19
|
+
}
|
|
20
|
+
onInputValueChange(newValue) {
|
|
21
|
+
this.value = newValue;
|
|
22
|
+
this.inputChange.emit(newValue);
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
const primaryColor = this.overridePrimaryColor || zonosStore.appearance.colorPrimary;
|
|
26
|
+
const secondaryColor = this.overrideSecondaryColor || zonosStore.appearance.colorSecondary;
|
|
27
|
+
const isDark = primaryColor && isDarkColor(primaryColor);
|
|
28
|
+
const fontSize = zonosStore.appearance.fontSizeInputValue || 16;
|
|
29
|
+
return (h(Host, { key: 'cc1e63bf6a09749b4310fd55bb6f728879e3c160', class: classes([
|
|
30
|
+
'zonos--input zonos--elements',
|
|
31
|
+
isDark && 'dark',
|
|
32
|
+
this.isError && 'has-error',
|
|
33
|
+
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: {
|
|
34
|
+
'--zonos--border-radius': getBorderRadius(),
|
|
35
|
+
'--zonos--font-family': zonosStoreFontFamily(),
|
|
36
|
+
'--zonos--font-size': `${fontSize}px`,
|
|
37
|
+
'--zonos--primary-color': secondaryColor,
|
|
38
|
+
} }, h("div", { key: '62294a559ba63fbf80cedbe16e3dca97540c8d4a', class: classes([
|
|
39
|
+
'zonos--label-wrapper',
|
|
40
|
+
this.isDisabled && 'disabled',
|
|
41
|
+
]) }, h("input", { key: '7e7d2a9d16b34240945119356f1b801ff0e0d4ae', class: classes([
|
|
42
|
+
'zonos--floated-input',
|
|
43
|
+
!!this.inputLabel && 'has-label',
|
|
44
|
+
this.value && 'has-content',
|
|
45
|
+
this.isError && 'has-error',
|
|
46
|
+
]), disabled: this.isDisabled, id: "zonos--input", onInput: e => {
|
|
47
|
+
const input = e.target;
|
|
48
|
+
this.inputChange.emit(input.value);
|
|
49
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("div", { key: 'e8340ce1583c0ce2d3659631a3400c2b72c81258', class: "zonos--floated-label" }, h("label", { key: 'daa8f068ebabfa9d77ed85d0e8070b45f7803f92', htmlFor: "zonos--input" }, this.inputLabel)))));
|
|
50
|
+
}
|
|
51
|
+
static get is() { return "zonos-stripe-input"; }
|
|
52
|
+
static get encapsulation() { return "shadow"; }
|
|
53
|
+
static get originalStyleUrls() {
|
|
54
|
+
return {
|
|
55
|
+
"$": ["zonos-stripe-input.scss"]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static get styleUrls() {
|
|
59
|
+
return {
|
|
60
|
+
"$": ["zonos-stripe-input.css"]
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get properties() {
|
|
64
|
+
return {
|
|
65
|
+
"inputValue": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "string",
|
|
70
|
+
"resolved": "string",
|
|
71
|
+
"references": {}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": "Value of the stripeInput"
|
|
78
|
+
},
|
|
79
|
+
"attribute": "input-value",
|
|
80
|
+
"reflect": false,
|
|
81
|
+
"defaultValue": "''"
|
|
82
|
+
},
|
|
83
|
+
"inputLabel": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "string",
|
|
88
|
+
"resolved": "string",
|
|
89
|
+
"references": {}
|
|
90
|
+
},
|
|
91
|
+
"required": true,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": "Input label"
|
|
96
|
+
},
|
|
97
|
+
"attribute": "input-label",
|
|
98
|
+
"reflect": false
|
|
99
|
+
},
|
|
100
|
+
"overridePrimaryColor": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "string",
|
|
105
|
+
"resolved": "string | undefined",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": true,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "Primary color to override primary color from appearance primary color in setting."
|
|
113
|
+
},
|
|
114
|
+
"attribute": "override-primary-color",
|
|
115
|
+
"reflect": false
|
|
116
|
+
},
|
|
117
|
+
"overrideSecondaryColor": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "string",
|
|
122
|
+
"resolved": "string | undefined",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": true,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "Secondary color to override secondary color from appearance secondary color in setting"
|
|
130
|
+
},
|
|
131
|
+
"attribute": "override-secondary-color",
|
|
132
|
+
"reflect": false
|
|
133
|
+
},
|
|
134
|
+
"isDisabled": {
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"mutable": false,
|
|
137
|
+
"complexType": {
|
|
138
|
+
"original": "boolean",
|
|
139
|
+
"resolved": "boolean",
|
|
140
|
+
"references": {}
|
|
141
|
+
},
|
|
142
|
+
"required": false,
|
|
143
|
+
"optional": false,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": "Disables the input"
|
|
147
|
+
},
|
|
148
|
+
"attribute": "is-disabled",
|
|
149
|
+
"reflect": false,
|
|
150
|
+
"defaultValue": "false"
|
|
151
|
+
},
|
|
152
|
+
"isError": {
|
|
153
|
+
"type": "boolean",
|
|
154
|
+
"mutable": false,
|
|
155
|
+
"complexType": {
|
|
156
|
+
"original": "boolean",
|
|
157
|
+
"resolved": "boolean",
|
|
158
|
+
"references": {}
|
|
159
|
+
},
|
|
160
|
+
"required": false,
|
|
161
|
+
"optional": false,
|
|
162
|
+
"docs": {
|
|
163
|
+
"tags": [],
|
|
164
|
+
"text": "Error state of the input"
|
|
165
|
+
},
|
|
166
|
+
"attribute": "is-error",
|
|
167
|
+
"reflect": false,
|
|
168
|
+
"defaultValue": "false"
|
|
169
|
+
},
|
|
170
|
+
"inputPlaceholder": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "string",
|
|
175
|
+
"resolved": "string",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Placeholder for the input"
|
|
183
|
+
},
|
|
184
|
+
"attribute": "input-placeholder",
|
|
185
|
+
"reflect": false,
|
|
186
|
+
"defaultValue": "''"
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
static get states() {
|
|
191
|
+
return {
|
|
192
|
+
"value": {}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
static get events() {
|
|
196
|
+
return [{
|
|
197
|
+
"method": "inputChange",
|
|
198
|
+
"name": "inputChange",
|
|
199
|
+
"bubbles": true,
|
|
200
|
+
"cancelable": true,
|
|
201
|
+
"composed": true,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": "Event to emit when input value changes"
|
|
205
|
+
},
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "string",
|
|
208
|
+
"resolved": "string",
|
|
209
|
+
"references": {}
|
|
210
|
+
}
|
|
211
|
+
}];
|
|
212
|
+
}
|
|
213
|
+
static get elementRef() { return "el"; }
|
|
214
|
+
static get watchers() {
|
|
215
|
+
return [{
|
|
216
|
+
"propName": "inputValue",
|
|
217
|
+
"methodName": "onInputValueChange"
|
|
218
|
+
}];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -7,9 +7,9 @@ export class ZonosToggle {
|
|
|
7
7
|
this.value = undefined;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '01958140c90fdadecbfca64fe65dbf1132af2cc1', class: classes(['zonos--elements zonos--toggle']), style: {
|
|
11
11
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
12
|
-
} }, h("div", { key: '
|
|
12
|
+
} }, h("div", { key: '5362589929c25b5ba897d23a308f6dd2759c4ac0', class: "wrapper" }, this.options.map(option => {
|
|
13
13
|
const selected = option.value === this.value;
|
|
14
14
|
return (h("button", { class: classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
|
|
15
15
|
this.toggleChanged.emit(option.value);
|
|
@@ -7,10 +7,10 @@ export class ZonosTooltip {
|
|
|
7
7
|
this.showTooltip = false;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'fa16c20a254958721bcc44dbe96f6588545e86f0', class: "zonos--elements" }, h("div", { key: '0e57607df02b12d5df9fb84b64c8345b40b2e823', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '9faf457a730046b789a5b822fb6ab89d88970d59' }), h("div", { key: 'f85dbf49e172f9a1c1b57443b1ea22d819b4099c', class: classes([
|
|
11
11
|
this.showTooltip && 'zonos--show-tooltip',
|
|
12
12
|
'zonos--tooltip-content',
|
|
13
|
-
]) }, h("zonos-text", { key: '
|
|
13
|
+
]) }, h("zonos-text", { key: '6e90bfe3f346cbe5d49aab4e03c868b3138aeca7', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '1c10f75f13ae427737fcf4ece41b9f7ba13fb76d', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-tooltip"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,9 +7,9 @@ export class VStack {
|
|
|
7
7
|
this.spacing = 24;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '32154740511a038c4ca04ad55bc7d77d96496654', style: {
|
|
11
11
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
12
|
-
} }, h("div", { key: '
|
|
12
|
+
} }, h("div", { key: 'f80f8b0e51554a3db9efa960706ac9bb450155cb', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '711a207eb1b4c59672be4df8b19a3c7200d44f29' }))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "zonos-v-stack"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,12 +56,12 @@ export class ZonosVirtualScroll {
|
|
|
56
56
|
} }, this.renderItem(i)));
|
|
57
57
|
accHeight += itemHeight;
|
|
58
58
|
}
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '0f132a5b60586fb22d1d5536aa7abef6199e0748' }, h("div", { key: 'a947229cd3d53b79312855cf8ddf8c9985035e1e',
|
|
60
60
|
// to capture scroll action
|
|
61
61
|
class: "scroller", style: {
|
|
62
62
|
height: `${this.totalHeight}px`,
|
|
63
63
|
width: `${W}px`,
|
|
64
|
-
} }), h("div", { key: '
|
|
64
|
+
} }), h("div", { key: '63013fe7bc53d76152fda74e7b6ef054e7c3a9ef',
|
|
65
65
|
// to display items
|
|
66
66
|
class: "item-container", ref: el => (this.container = el), style: {
|
|
67
67
|
height: `${this.totalHeight}px`,
|
|
@@ -10,7 +10,7 @@ export class ZonosComponent {
|
|
|
10
10
|
return format(this.first, this.middle, this.last);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return h("div", { key: '
|
|
13
|
+
return h("div", { key: '63b0c771133fd495f36e2c67601d64d6e56f5f2b' }, "Hello, World! I'm ", this.getText());
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-component"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,9 +18,9 @@ export class ZonosHelloDialogFooter {
|
|
|
18
18
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
19
19
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
20
20
|
const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: 'f84d021e99271bd6a00da32edd35fdc5e0520c5a', class: "zonos--elements" }, h("div", { key: 'db35a5022b1ef1a70e3cace021fcc14d6e8ea987', class: "zonos--hello-dialog-footer", style: {
|
|
22
22
|
'--zonos--primary-color': primaryColor,
|
|
23
|
-
} }, h("a", { key: '
|
|
23
|
+
} }, h("a", { key: 'bbbc50bf395e2658239e2a1a0342122b04e43a5f', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '3c80a7ba8dd9509d45bde7de20e7689f632aedc8', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: 'add64f376e48cc71f6b5672aafe7b1ef62ab2354', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'a0a5059ad4a48b2cc3ea05696aa79ffce33b4bf2', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '2608dba553f846c5016e8395dbce079beda0aa5a', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "zonos-hello-dialog-footer"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|