@zonos/elements 1.3.30 → 1.3.32
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/{cart-62ff7ee7.js → cart-d07e8ea1.js} +460 -41
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-a5f8eaab.js → submitGtag-f1aeac3e.js} +4 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +11 -11
- package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-button_3.cjs.entry.js +6 -3
- package/dist/cjs/zonos-card.cjs.entry.js +47 -0
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +53 -36
- package/dist/cjs/zonos-checkout.cjs.entry.js +18 -10
- 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_3.cjs.entry.js +7 -7
- 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-input.cjs.entry.js +4 -4
- package/dist/cjs/{zonos-card_2.cjs.entry.js → zonos-language-select_2.cjs.entry.js} +23 -29
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_2.cjs.entry.js +123 -0
- package/dist/cjs/zonos-v-stack.cjs.entry.js +25 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +15 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +16 -15
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/assets/CheckmarkLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +8 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +20 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +9 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +17 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +10 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +6 -6
- package/dist/collection/components/common/zonos-button/zonos-button.js +28 -4
- package/dist/collection/components/common/zonos-card/zonos-card.css +3 -1
- package/dist/collection/components/common/zonos-card/zonos-card.js +61 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-notification/zonos-notification.css +1 -1
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.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/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/store/checkout/stripe.js +0 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +23 -2
- package/dist/collection/components/store/translationStore/strings.base.js +23 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +23 -2
- package/dist/collection/components/store/translationStore/strings.french.js +23 -2
- package/dist/collection/components/store/translationStore/strings.german.js +23 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +23 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +23 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +23 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/getIsTestMode.js +1 -0
- package/dist/esm/{cart-b96aaa4f.js → cart-a90aa9ae.js} +460 -41
- package/dist/esm/index.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-6e271d76.js → submitGtag-849e2bc9.js} +4 -2
- package/dist/esm/zonos-address_8.entry.js +11 -11
- package/dist/esm/zonos-badge_2.entry.js +6 -6
- package/dist/esm/zonos-button_3.entry.js +6 -3
- package/dist/esm/zonos-card.entry.js +43 -0
- package/dist/esm/zonos-cart-items_12.entry.js +53 -36
- package/dist/esm/zonos-checkout.entry.js +18 -10
- 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_3.entry.js +7 -7
- 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-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +56 -0
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification_2.entry.js +118 -0
- package/dist/esm/zonos-v-stack.entry.js +21 -0
- package/dist/esm-es5/cart-a90aa9ae.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-849e2bc9.js +1 -0
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -0
- package/dist/esm-es5/zonos-cart-items_12.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_3.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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -0
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_2.entry.js +1 -0
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -0
- package/dist/scripts/index.d.ts +34 -6
- 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-checkout-finish/zonos-checkout-finish.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -0
- package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +2 -2
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +6 -1
- package/dist/types/components/common/zonos-card/zonos-card.d.ts +10 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +22 -1
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -0
- package/dist/types/components.d.ts +36 -6
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-057380ad.system.js +1 -0
- package/dist/zonos-elements/{p-b208fec6.system.entry.js → p-16ab16f9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1eab7a86.entry.js +1 -0
- package/dist/zonos-elements/p-21b61106.system.entry.js +1 -0
- package/dist/zonos-elements/p-22882fd6.entry.js +1 -0
- package/dist/zonos-elements/p-2a45c837.system.entry.js +1 -0
- package/dist/zonos-elements/p-2d6d0d57.js +1 -0
- package/dist/zonos-elements/{p-7664dec5.entry.js → p-344ce057.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4e38b85.entry.js → p-3523c3b4.entry.js} +1 -1
- package/dist/zonos-elements/{p-2cb880e7.system.entry.js → p-38a90e86.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9b0aa65c.system.js → p-3ba86711.system.js} +1 -1
- package/dist/zonos-elements/p-41ef293d.js +1 -0
- package/dist/zonos-elements/{p-6cb9812b.entry.js → p-63a27875.entry.js} +1 -1
- package/dist/zonos-elements/{p-9cdfb51b.system.entry.js → p-672e80e5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6c3390b7.entry.js +1 -0
- package/dist/zonos-elements/{p-666d1605.system.entry.js → p-6de51a79.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-725c2d57.entry.js → p-6f04e132.entry.js} +1 -1
- package/dist/zonos-elements/{p-10b9a681.system.entry.js → p-717faabd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a90393e0.system.entry.js → p-71882ac9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-78a839b8.entry.js → p-7a6dcfa2.entry.js} +1 -1
- package/dist/zonos-elements/p-85503e70.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9c32b924.entry.js → p-8aadefbb.entry.js} +1 -1
- package/dist/zonos-elements/p-8b771620.entry.js +1 -0
- package/dist/zonos-elements/{p-692816a7.entry.js → p-93e493ce.entry.js} +1 -1
- package/dist/zonos-elements/{p-dda78e8e.system.entry.js → p-966ab4e7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9d599745.entry.js +1 -0
- package/dist/zonos-elements/{p-3dc59d89.system.entry.js → p-9de374a7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-af0d3ca0.system.entry.js +1 -0
- package/dist/zonos-elements/p-b6c515e1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-13454044.system.entry.js → p-b903af96.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c21802e9.entry.js +1 -0
- package/dist/zonos-elements/{p-d4724ac8.entry.js → p-c3619b3d.entry.js} +1 -1
- package/dist/zonos-elements/{p-a74477a6.system.js → p-ca8fb99c.system.js} +1 -1
- package/dist/zonos-elements/p-cc965417.entry.js +1 -0
- package/dist/zonos-elements/{p-941a01be.system.entry.js → p-d2992457.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2701e08c.entry.js → p-d8c1eb99.entry.js} +1 -1
- package/dist/zonos-elements/p-da2e5289.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d8027710.system.entry.js → p-da787898.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-4a0cf47b.entry.js → p-e344cb12.entry.js} +1 -1
- package/dist/zonos-elements/p-e3c014ae.entry.js +1 -0
- package/dist/zonos-elements/p-ed333de6.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +0 -72
- package/dist/cjs/zonos-payment.cjs.entry.js +0 -58
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +0 -45
- package/dist/esm/zonos-card_2.entry.js +0 -62
- package/dist/esm/zonos-notification.entry.js +0 -68
- package/dist/esm/zonos-payment.entry.js +0 -54
- package/dist/esm/zonos-select-dialog-header_2.entry.js +0 -40
- package/dist/esm-es5/cart-b96aaa4f.js +0 -1
- package/dist/esm-es5/submitGtag-6e271d76.js +0 -1
- package/dist/esm-es5/zonos-card_2.entry.js +0 -1
- package/dist/esm-es5/zonos-notification.entry.js +0 -1
- package/dist/esm-es5/zonos-payment.entry.js +0 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +0 -1
- package/dist/zonos-elements/p-087c83a5.system.entry.js +0 -1
- package/dist/zonos-elements/p-1a40aaf4.system.js +0 -1
- package/dist/zonos-elements/p-2613b5d3.system.entry.js +0 -1
- package/dist/zonos-elements/p-27d648c3.system.entry.js +0 -1
- package/dist/zonos-elements/p-4e01d1ab.system.entry.js +0 -1
- package/dist/zonos-elements/p-5441b729.entry.js +0 -1
- package/dist/zonos-elements/p-5857ad65.entry.js +0 -1
- package/dist/zonos-elements/p-5d53f9a4.js +0 -1
- package/dist/zonos-elements/p-75ba695c.entry.js +0 -1
- package/dist/zonos-elements/p-8c9e7980.entry.js +0 -1
- package/dist/zonos-elements/p-8f8baabf.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f7c0472.entry.js +0 -1
- package/dist/zonos-elements/p-acfb9be6.system.entry.js +0 -1
- package/dist/zonos-elements/p-b468f941.js +0 -1
- package/dist/zonos-elements/p-bb5a9eaa.entry.js +0 -1
- package/dist/zonos-elements/p-be2b32f5.entry.js +0 -1
- package/dist/zonos-elements/p-c63a7dde.entry.js +0 -1
- package/dist/zonos-elements/p-f38fd0d9.system.entry.js +0 -1
|
@@ -6,6 +6,7 @@ import { translate } from "../../store/translationStore";
|
|
|
6
6
|
import { getZonosStoreTheme, zonosStore, } from "../../store/zonosStore";
|
|
7
7
|
import { buildCartItemsByTempCart } from "../../utils/api/buildCartItemsByTempCart";
|
|
8
8
|
import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
|
|
9
|
+
import { getIsTestMode } from "../../utils/checkout/getIsTestMode";
|
|
9
10
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
10
11
|
import { isShippableCountry } from "../../utils/checkout/isShippableCountry";
|
|
11
12
|
import { watchBigcommerceDomesticCheckout } from "../../utils/checkout/watchBigcommerceDomesticCheckout";
|
|
@@ -458,15 +459,18 @@ export class ZonosCheckout {
|
|
|
458
459
|
const url = window.location.href;
|
|
459
460
|
// Remove query parameters
|
|
460
461
|
const cleanUrl = url.split('?')[0];
|
|
461
|
-
|
|
462
|
+
const isTestMode = getIsTestMode();
|
|
463
|
+
this.open = false;
|
|
464
|
+
// Update the URL without query parameters only if it's not in test mode
|
|
462
465
|
/**
|
|
463
466
|
* Setting the state to null in window.history.replaceState can cause issues with rendering when using next/link and pressing the back button.
|
|
464
467
|
* @ref https://github.com/vercel/next.js/issues/33233#issuecomment-1052349396
|
|
465
468
|
**/
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
469
|
+
if (!isTestMode) {
|
|
470
|
+
window.history.replaceState(window.history.state, document.title, cleanUrl);
|
|
471
|
+
// Reload the page
|
|
472
|
+
window.location.reload();
|
|
473
|
+
}
|
|
470
474
|
}
|
|
471
475
|
handleWindowResize() {
|
|
472
476
|
this.isMobile = isCheckoutMobile(this.mobile);
|
|
@@ -487,6 +491,9 @@ export class ZonosCheckout {
|
|
|
487
491
|
this.appearanceSettingsOverride.theme = getZonosStoreTheme(this.appearanceSettingsOverride.theme);
|
|
488
492
|
}
|
|
489
493
|
}
|
|
494
|
+
handleAddressChange() {
|
|
495
|
+
stripeStoreReset();
|
|
496
|
+
}
|
|
490
497
|
componentWillLoad() {
|
|
491
498
|
void this.init();
|
|
492
499
|
this.isMobile = isCheckoutMobile(this.mobile);
|
|
@@ -537,8 +544,9 @@ export class ZonosCheckout {
|
|
|
537
544
|
: logoUrl;
|
|
538
545
|
return (h("div", { class: "zonos--logo" }, logo && (h("img", { alt: `${zonosStore.organizationName} logo`, src: logo, width: 100 }))));
|
|
539
546
|
};
|
|
547
|
+
const isTestMode = getIsTestMode();
|
|
540
548
|
const renderTopHeader = () => {
|
|
541
|
-
return (h("zonos-v-stack", null, renderLogo(), h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
549
|
+
return (h("zonos-v-stack", null, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode')))), h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
542
550
|
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
543
551
|
this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
544
552
|
};
|
|
@@ -803,6 +811,9 @@ export class ZonosCheckout {
|
|
|
803
811
|
}, {
|
|
804
812
|
"propName": "appearanceSettingsOverride",
|
|
805
813
|
"methodName": "handleAppearanceSettingsOverrideChange"
|
|
814
|
+
}, {
|
|
815
|
+
"propName": "defaultAddress",
|
|
816
|
+
"methodName": "handleAddressChange"
|
|
806
817
|
}];
|
|
807
818
|
}
|
|
808
819
|
static get listeners() {
|
|
@@ -42,7 +42,9 @@ export class ZonosReview {
|
|
|
42
42
|
return (h(Host, { class: classes([
|
|
43
43
|
'zonos--review zonos--elements',
|
|
44
44
|
this.isMobile && 'mobile',
|
|
45
|
-
]) }, h("div", { class: "zonos--title" }, h("zonos-text", { textColor: titleTextColor, type: titleTextType }, translate('Pay
|
|
45
|
+
]) }, h("div", { class: "zonos--title" }, h("zonos-text", { textColor: titleTextColor, type: titleTextType }, translate('Pay [organizationName]', {
|
|
46
|
+
organizationName: zonosStore.organizationName,
|
|
47
|
+
})), renderCollapseIcon()), h("div", { class: "zonos--total-pay" }, h("zonos-text", { type: totalTextType }, currencyFormat({
|
|
46
48
|
amount: total,
|
|
47
49
|
currency: cartStore.currency,
|
|
48
50
|
})))));
|
|
@@ -108,7 +108,7 @@ export class ZonosShipping {
|
|
|
108
108
|
if (this.showErrorBanner) {
|
|
109
109
|
this.showErrorBanner = !this.handleValidate();
|
|
110
110
|
}
|
|
111
|
-
return (h(Host, { key: '
|
|
111
|
+
return (h(Host, { key: 'a00e5aa3844a5df009db0b2364d56700f37c2d20', class: "zonos--shipping zonos--elements" }, h("div", { key: 'b9037a08517557f2a5eb7d85fde9d8b551c196a5', class: "zonos--group" }, h("zonos-text", { key: '68fa391e9df29791eacff17af55d319bd5faafcf', class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) && (h("zonos-banner", { key: '9bf0e9b1131c4412e5883c1706ae3152e7cdb13b', class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { key: '32dcef256412bb41d6a05b579d0d2ce38b8bdf6a', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !((_b = this.serviceLevels) === null || _b === void 0 ? void 0 : _b.length) ? (h("zonos-banner", { bannerTitle: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), intent: "error" })) : (h("zonos-shipping-rich-radio", { initialSelectedValue: (_c = this.selectedShippingMethod) === null || _c === void 0 ? void 0 : _c.value, items: this.serviceLevels, onRadioSelected: e => this.handleRadioSelected(e) })), h("div", { key: '47dda4f3f44377fba5ae58dd704e9858b6b9c606', class: "zonos--group-btn" }, h("zonos-button", { key: 'ca4dca0f3f14926af5864fb935cb758f54238a00', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
112
112
|
// use primary type when on mobile mode
|
|
113
113
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
114
114
|
}
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
:host .orange {
|
|
90
90
|
background-color: var(--zonos-elements-orange-100);
|
|
91
91
|
color: var(--zonos-elements-orange-800);
|
|
92
|
+
border: 1px solid var(--zonos-elements-orange-200);
|
|
92
93
|
}
|
|
93
94
|
:host .orange.bold {
|
|
94
95
|
background-color: var(--zonos-elements-orange-600);
|
|
@@ -109,4 +110,13 @@
|
|
|
109
110
|
:host .cyan.bold {
|
|
110
111
|
background-color: var(--zonos-elements-cyan-600);
|
|
111
112
|
color: var(--zonos-elements-cyan-100);
|
|
113
|
+
}
|
|
114
|
+
:host .transparent {
|
|
115
|
+
background-color: transparent;
|
|
116
|
+
border: 1px solid var(--zonos-elements-gray-200);
|
|
117
|
+
color: var(--zonos-elements-gray-800);
|
|
118
|
+
}
|
|
119
|
+
:host .transparent.bold {
|
|
120
|
+
background-color: var(--zonos-elements-glass-600);
|
|
121
|
+
color: var(--zonos-elements-gray-100);
|
|
112
122
|
}
|
|
@@ -11,16 +11,16 @@ export class ZonosBadge {
|
|
|
11
11
|
this.rounded = false;
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '4e022b4090de017818c5ba8f86e2d7684a1b8f05', class: classes(['zonos--elements zonos--badge']), style: {
|
|
15
15
|
'--font-family': zonosStoreFontFamily(),
|
|
16
|
-
} }, h("div", { key: '
|
|
16
|
+
} }, h("div", { key: '8e6a4c0fcf81939d69fd3aec91463ed6c7a2d67d', class: classes([
|
|
17
17
|
'zonos--badge-content',
|
|
18
18
|
this.badgeColor,
|
|
19
19
|
this.rounded && 'rounded',
|
|
20
20
|
this.iconRight && 'icon-right',
|
|
21
21
|
this.size,
|
|
22
22
|
this.bold && 'bold',
|
|
23
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
23
|
+
]) }, this.icon, h("zonos-text", { key: '5824866453d31abef18443179e6bc1692e9e98a3', textColor: `${this.badgeColor}-800` }, h("slot", { key: '9bc411177ae04e8fa1061098023860204fa1a5d7' })))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "zonos-badge"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -61,8 +61,8 @@ export class ZonosBadge {
|
|
|
61
61
|
"type": "string",
|
|
62
62
|
"mutable": false,
|
|
63
63
|
"complexType": {
|
|
64
|
-
"original": "ColorPrefix",
|
|
65
|
-
"resolved": "\"blue\" | \"cyan\" | \"glass\" | \"gray\" | \"green\" | \"orange\" | \"purple\" | \"red\"",
|
|
64
|
+
"original": "ColorPrefix | 'transparent'",
|
|
65
|
+
"resolved": "\"blue\" | \"cyan\" | \"glass\" | \"gray\" | \"green\" | \"orange\" | \"purple\" | \"red\" | \"transparent\"",
|
|
66
66
|
"references": {
|
|
67
67
|
"ColorPrefix": {
|
|
68
68
|
"location": "import",
|
|
@@ -78,7 +78,7 @@ export class ZonosBadge {
|
|
|
78
78
|
"name": "default",
|
|
79
79
|
"text": "24"
|
|
80
80
|
}],
|
|
81
|
-
"text": "The
|
|
81
|
+
"text": "The color of the badge"
|
|
82
82
|
},
|
|
83
83
|
"attribute": "badge-color",
|
|
84
84
|
"reflect": false,
|
|
@@ -92,6 +92,7 @@ export class ZonosButton {
|
|
|
92
92
|
this.noPaddingLeft = false;
|
|
93
93
|
this.noPaddingRight = false;
|
|
94
94
|
this.loading = false;
|
|
95
|
+
this.justifyContent = 'center';
|
|
95
96
|
this.theme = undefined;
|
|
96
97
|
this.hasIcon = !!this.icon;
|
|
97
98
|
this.hasContent = false;
|
|
@@ -120,12 +121,12 @@ export class ZonosButton {
|
|
|
120
121
|
const borderStyle = getBorderRadius({
|
|
121
122
|
overrideBorderStyle: this.borderStyle,
|
|
122
123
|
});
|
|
123
|
-
return (h(Host, { key: '
|
|
124
|
+
return (h(Host, { key: '51f49811674e7ef1efe49389afc3fc70e4f5a46c', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
124
125
|
'--background-color': backgroundColor,
|
|
125
126
|
'--border-radius': borderStyle,
|
|
126
127
|
'--color': color,
|
|
127
128
|
'--font-family': zonosStoreFontFamily(),
|
|
128
|
-
}) }, h("button", { key: '
|
|
129
|
+
}) }, h("button", { key: 'f11f4f6877a0947df57dbe5baf658b69d91fff4d', class: classes([
|
|
129
130
|
this.hasIcon && 'has-icon',
|
|
130
131
|
this.hasContent && 'has-content',
|
|
131
132
|
this.noBackground && 'no-background',
|
|
@@ -138,7 +139,9 @@ export class ZonosButton {
|
|
|
138
139
|
this.size,
|
|
139
140
|
// only override background if variant is set to standard
|
|
140
141
|
backgroundColor && variant === 'standard' && 'override-background',
|
|
141
|
-
]), disabled: disabled
|
|
142
|
+
]), disabled: disabled, style: {
|
|
143
|
+
justifyContent: this.justifyContent,
|
|
144
|
+
} }, this.loading && (h("div", { key: '35f474efa80cde690afd876863d25f3b46198ecf', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: '7476edf05b7d85d5f2f6900a7ad97c49d2216dd8', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'a4e8bfc0aef84561416ddc5f38602ed346db6f4b', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
142
145
|
}
|
|
143
146
|
static get is() { return "zonos-button"; }
|
|
144
147
|
static get encapsulation() { return "shadow"; }
|
|
@@ -196,7 +199,7 @@ export class ZonosButton {
|
|
|
196
199
|
"optional": true,
|
|
197
200
|
"docs": {
|
|
198
201
|
"tags": [],
|
|
199
|
-
"text": "The color of the button
|
|
202
|
+
"text": "The color of the button\n**NOTE**: If the button `variant` is set to 'standard', backgroundColor will be disregarded"
|
|
200
203
|
},
|
|
201
204
|
"attribute": "background-color",
|
|
202
205
|
"reflect": false
|
|
@@ -440,6 +443,27 @@ export class ZonosButton {
|
|
|
440
443
|
"reflect": false,
|
|
441
444
|
"defaultValue": "false"
|
|
442
445
|
},
|
|
446
|
+
"justifyContent": {
|
|
447
|
+
"type": "string",
|
|
448
|
+
"mutable": false,
|
|
449
|
+
"complexType": {
|
|
450
|
+
"original": "'center' | 'flex-end' | 'flex-start'",
|
|
451
|
+
"resolved": "\"center\" | \"flex-end\" | \"flex-start\"",
|
|
452
|
+
"references": {}
|
|
453
|
+
},
|
|
454
|
+
"required": false,
|
|
455
|
+
"optional": false,
|
|
456
|
+
"docs": {
|
|
457
|
+
"tags": [{
|
|
458
|
+
"name": "default",
|
|
459
|
+
"text": "'center'"
|
|
460
|
+
}],
|
|
461
|
+
"text": "The content alignment within the button"
|
|
462
|
+
},
|
|
463
|
+
"attribute": "justify-content",
|
|
464
|
+
"reflect": false,
|
|
465
|
+
"defaultValue": "'center'"
|
|
466
|
+
},
|
|
443
467
|
"theme": {
|
|
444
468
|
"type": "string",
|
|
445
469
|
"mutable": false,
|
|
@@ -33,9 +33,11 @@
|
|
|
33
33
|
|
|
34
34
|
:host .styled-card {
|
|
35
35
|
border: var(--zonos-elements-border);
|
|
36
|
-
border-radius: var(--zonos-elements-radius-6);
|
|
36
|
+
border-radius: var(--border-radius, var(--zonos-elements-radius-6));
|
|
37
37
|
padding: var(--spacing, 24px);
|
|
38
38
|
text-align: left;
|
|
39
|
+
background-color: var(--background-color);
|
|
40
|
+
overflow: hidden;
|
|
39
41
|
}
|
|
40
42
|
:host .styled-card hr {
|
|
41
43
|
margin-left: calc(var(--spacing, 24px) * -1);
|
|
@@ -2,9 +2,12 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { Host } from "@stencil/core/internal";
|
|
3
3
|
import { zonosStoreFontFamily } from "../../store/zonosStore";
|
|
4
4
|
import { classes } from "../../utils/classes";
|
|
5
|
+
import { getBorderRadius } from "../../utils/getBorderRadius";
|
|
5
6
|
export class ZonosCard {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.actions = undefined;
|
|
9
|
+
this.backgroundColor = undefined;
|
|
10
|
+
this.borderRadius = 6;
|
|
8
11
|
this.footerActions = undefined;
|
|
9
12
|
this.footerContent = undefined;
|
|
10
13
|
this.footerHeight = undefined;
|
|
@@ -12,12 +15,23 @@ export class ZonosCard {
|
|
|
12
15
|
this.spacing = '24px';
|
|
13
16
|
}
|
|
14
17
|
render() {
|
|
15
|
-
|
|
18
|
+
const backgroundColor = this.backgroundColor
|
|
19
|
+
? `var(--zonos-elements-${this.backgroundColor})`
|
|
20
|
+
: 'transparent';
|
|
21
|
+
const borderRadius = getBorderRadius({
|
|
22
|
+
customRoundRadius: `${this.borderRadius}px`,
|
|
23
|
+
overrideBorderStyle: 'ROUNDED',
|
|
24
|
+
});
|
|
25
|
+
return (h(Host, { key: 'e239a3af7d0bb71537ef94a13672ffa906adedd9', style: {
|
|
16
26
|
'--font-family': zonosStoreFontFamily(),
|
|
17
|
-
} }, h("div", { key: '
|
|
27
|
+
} }, h("div", { key: '41efc14a60719dbf847be74385d8d1c4065cee84', class: classes(['styled-card']), style: {
|
|
28
|
+
'--background-color': backgroundColor,
|
|
29
|
+
'--border-radius': borderRadius,
|
|
30
|
+
padding: this.spacing,
|
|
31
|
+
} }, this.label && (h("header", { key: '012234fa59c5c50cf78ff7a4b2dc0efaecd3cc20', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: '133ae9f43b50edca812aa0aab203febbffc07318', type: "subheader" }, this.label), h("h-stack", { key: '542c1e7b4d1f1e0751231cff9cb4ae5df3a82fa6', spacing: 8 }, this.actions))), h("slot", { key: '307ff202ce1c090f37b3f377a3f64efbea7a2e67' }), (this.footerActions || this.footerContent) && (h("footer", { key: '6641fba300b6acf06a650a73393612e774e79f1a', class: "card-footer", style: {
|
|
18
32
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
19
33
|
padding: this.spacing,
|
|
20
|
-
} }, h("div", { key: '
|
|
34
|
+
} }, h("div", { key: '40676761caaa588d4a503fe791e296829636e717' }, this.footerContent), h("h-stack", { key: 'f4f61d848c4b2e9c070b006146a88841a2f6f45f', spacing: 8 }, this.footerActions))))));
|
|
21
35
|
}
|
|
22
36
|
static get is() { return "zonos-card"; }
|
|
23
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -53,6 +67,50 @@ export class ZonosCard {
|
|
|
53
67
|
"text": "The actions to display in the header of the card"
|
|
54
68
|
}
|
|
55
69
|
},
|
|
70
|
+
"backgroundColor": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "Color",
|
|
75
|
+
"resolved": "Color | undefined",
|
|
76
|
+
"references": {
|
|
77
|
+
"Color": {
|
|
78
|
+
"location": "import",
|
|
79
|
+
"path": "src/types",
|
|
80
|
+
"id": "src/types/index.ts::Color"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": true,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": "The background color of the card"
|
|
89
|
+
},
|
|
90
|
+
"attribute": "background-color",
|
|
91
|
+
"reflect": false
|
|
92
|
+
},
|
|
93
|
+
"borderRadius": {
|
|
94
|
+
"type": "number",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "number",
|
|
98
|
+
"resolved": "number | undefined",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": true,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [{
|
|
105
|
+
"name": "default",
|
|
106
|
+
"text": "6"
|
|
107
|
+
}],
|
|
108
|
+
"text": "The border radius of the card"
|
|
109
|
+
},
|
|
110
|
+
"attribute": "border-radius",
|
|
111
|
+
"reflect": false,
|
|
112
|
+
"defaultValue": "6"
|
|
113
|
+
},
|
|
56
114
|
"footerActions": {
|
|
57
115
|
"type": "unknown",
|
|
58
116
|
"mutable": false,
|
|
@@ -36,14 +36,14 @@ export class ZonosCheckbox {
|
|
|
36
36
|
customRoundRadius: '4px',
|
|
37
37
|
overrideBorderStyle: this.borderStyle,
|
|
38
38
|
});
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: 'bf51dd642e88096e874d78023a29dd68239e8d3a', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
40
40
|
'--background-color': backgroundColor,
|
|
41
41
|
'--border-radius': borderStyle,
|
|
42
42
|
'--font-family': zonosStoreFontFamily(),
|
|
43
43
|
'--size': `${this.size}px`,
|
|
44
|
-
} }, h("label", { key: '
|
|
44
|
+
} }, h("label", { key: '3598c9f21285304499aaafbab5226d619ecf4e69', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: '277507f643404e6e44191c2d715b70f38fc6af85', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
45
45
|
this.checkboxSelected.emit(e.target.checked);
|
|
46
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
46
|
+
}, type: "checkbox" }), h("span", { key: '3f0fd0d458e8cf660fa883ceaa241e3397829548', class: "checkmark-container" }, h("svg", { key: '0d654744bea5b5696ddcf3778a155fb622022f1e', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'cc19837ee088feb7053fdaeaea0d1213cbc60775', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { key: 'cb85d59651f67a33126d37c3ebfb1e8a91b457fe', size: this.fontSize }, this.label)))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "zonos-checkbox"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -63,17 +63,17 @@ export class ZonosCheckoutProgressTabs {
|
|
|
63
63
|
color: labelSelectedColor,
|
|
64
64
|
})
|
|
65
65
|
: labelSelectedColor;
|
|
66
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: '472a2f3201149fbc99057c8c5c39f002e792c37b', class: "zonos--elements", style: {
|
|
67
67
|
'--color': contrastLabelColor,
|
|
68
68
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
69
|
-
} }, h("div", { key: '
|
|
69
|
+
} }, h("div", { key: 'bc90b6d7e6e8d9ef943473f6599588e326992814', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
70
70
|
const isSelected = tab.value === selectedStep;
|
|
71
71
|
return (h("button", { class: classes([
|
|
72
72
|
'zonos--tab-item',
|
|
73
73
|
tab.value === selectedStep && 'selected',
|
|
74
74
|
tab.isDone && 'done',
|
|
75
75
|
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, translate(tab.label))));
|
|
76
|
-
})), h("div", { key: '
|
|
76
|
+
})), h("div", { key: '3e6ac1dd03568f4bebe55449742c98fee8dca57f', class: "zonos--tab-progress" }, h("div", { key: '5590853db6942aedf74542ebd76b2696df8aa99f', class: "zonos--progress-bar-fill" }))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "zonos-checkout-progress-tabs"; }
|
|
79
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -42,10 +42,10 @@ export class ZonosCollapse {
|
|
|
42
42
|
// set overflow to hidden to prevent content from showing when collapsed
|
|
43
43
|
this.el.style.overflow = 'hidden';
|
|
44
44
|
}
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '7cc2167ab3dab1a975d141f3c58d3c5982c1645a', class: 'zonos--elements zonos--collapse', style: {
|
|
46
46
|
'--font-family': zonosStoreFontFamily(),
|
|
47
47
|
height: this.getElementHeight(),
|
|
48
|
-
} }, h("div", { key: '
|
|
48
|
+
} }, h("div", { key: '1b791702f95066643ac82402a9fcff19b0fcc706' }, h("iframe", { key: '08f678a4ce92f5600c584e329e3039bc4588ff3a', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: '83119f9ba9764c46fa7d1dd7b4c0b08c49033607' }))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "zonos-collapse"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -82,12 +82,12 @@ export class ZonosConfirmDialog {
|
|
|
82
82
|
const borderStyle = getBorderRadius();
|
|
83
83
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
84
84
|
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
85
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: 'ca8b99331f1241efe183dec928bd98cf5768e2e8', class: classes([this.dialogOpen && 'open', 'zonos--elements']), "data-dialog-type": this.dialogType, "data-theme": theme, style: {
|
|
86
86
|
'--border-radius': borderStyle,
|
|
87
87
|
'--font-family': zonosStoreFontFamily(),
|
|
88
|
-
} }, h("div", { key: '
|
|
88
|
+
} }, h("div", { key: '5f4e7750eeb7d86c229d0eb3880b642cf1f891f0', class: "zonos--backdrop", tabIndex: -1 }), h("div", { key: '962772361ce8d2c888db656d7c691cfcc2443040', "aria-hidden": "true", class: classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, h("div", { key: '4935ea105fdfdea6c525449c4a460686347a6939', class: "zonos--confirm-dialog", onBlur: () => {
|
|
89
89
|
this.focusDialog();
|
|
90
|
-
} }, h("div", { key: '
|
|
90
|
+
} }, h("div", { key: '0483bd8c2c9adba0ed521c04ab0ccfd806002a51', class: "wrapper" }, h("div", { key: 'dccd091571b48c2df046a86f4982496012951f08', class: "icon-wrapper" }, this.renderIcon()), h("div", { key: 'f6a0177b886aae16754a262326261d1a87f75dce', class: "content" }, h("div", { key: 'dc44e700a8d826d521fea7be527806faef1b1432', class: "title" }, h("zonos-text", { key: 'd42d21532cdcc276a1d1257fc6427d646003bd5d', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (h("div", { key: '2bba84f332fce9b2a9702d9c6753e41a0120ead9', class: "subtitle" }, h("zonos-text", { key: '6840ddd1b655cf9b9fc974ada6864b9cea74f943', textColor: "gray-800" }, this.dialogSubtitle)))), h("div", { key: '3ff328db3a04418d6a1e0cb34af2ab894d4910f9', class: "footer" }, this.dialogType === 'confirm' && (h("zonos-button", { key: '7a05213b60700ee83b135309bc615168fae75a40', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText || translate('Cancel'))), h("zonos-button", { key: '0fac5efc64f803d4f321ad269093119a7ffb3f20', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "zonos-confirm-dialog"; }
|
|
93
93
|
static get encapsulation() { return "shadow"; }
|
|
@@ -35,9 +35,9 @@ export class ZonosCountrySelect {
|
|
|
35
35
|
const filteredCountries = this.inputValue
|
|
36
36
|
? fuseObject.map(country => country.item)
|
|
37
37
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '58c3b982087e7f62fa914028bfe874273e9e3fde', class: "zonos--elements", style: {
|
|
39
39
|
'--font-family': zonosStoreFontFamily(),
|
|
40
|
-
} }, h("div", { key: '
|
|
40
|
+
} }, h("div", { key: '62a5b6611c4ace9413f34a91aa33c60344cb9d51', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'd2133152d1e61b4cd1dfcc42fd67f44cd2585443', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '3fd084f5165387dc1ce567db6579599cbf420916', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '176630bf445f1bb7af90fe7cec5091ea9e615e1f', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '50942a4c1a980bbac701e15060ed49dc9af64f73', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "zonos-country-select"; }
|
|
43
43
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,9 +8,9 @@ export class ZonosCustomMessage {
|
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
10
|
const messageWithLinks = formatStringWithLinks(this.message);
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '37b59a5aad442e9c20b8ed03672c73c315b45538', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, this.message && (h("zonos-card", { key: '
|
|
13
|
+
} }, this.message && (h("zonos-card", { key: '5de7e44deb7c0544789a9d2b306fc8b2cad338b8', class: "zonos--custom-message", spacing: "12px" }, h("div", { key: 'c911e94eb1d7cbaf1db2126d14a6eeed8932ff97', class: "zonos--flex-message" }, h("zonos-icon", { key: '35c7f483046b78e9dffe87370d6b2f9435bc0ec1', "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { key: 'fdbc136b2a01fd5df35a3b01aa82bb9d088083e0', innerHTML: messageWithLinks }))))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-custom-message"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -59,7 +59,7 @@ export class ZonosDialog {
|
|
|
59
59
|
const borderStyle = getBorderRadius({
|
|
60
60
|
overrideBorderStyle: this.borderStyle,
|
|
61
61
|
});
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '9478fd5dd572bc1a677146025485b74321700fba', class: classes([
|
|
63
63
|
'zonos--elements',
|
|
64
64
|
this.open && 'open',
|
|
65
65
|
this.isLoading && 'is-loading',
|
|
@@ -71,10 +71,10 @@ export class ZonosDialog {
|
|
|
71
71
|
'--height': this.height || 'initial',
|
|
72
72
|
'--min-height': this.minHeight || '500px',
|
|
73
73
|
'--width': this.width,
|
|
74
|
-
} }, h("div", { key: '
|
|
74
|
+
} }, h("div", { key: '4bc8f62202bbae238d07536f3234bdc00c6d689f', class: "zonos--backdrop" }), h("div", { key: 'da80cf2a9b0a19e4e42062a57fed91ecfe6c0bcf', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: '7bbaacf6fbb5ff70db62246254f007006146324e', class: "zonos--dialog" }, this.isLoading && (h("div", { key: 'c65e9205d105456072b4c3c7549dce937dd7f8ec', class: "zonos--loading" }, h("zonos-spinner", { key: 'ac3667841a42f0ae55831a449c07bdfadc976971', size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { key: '9e2c9ec2c4a9be64169f2f6b6473bc16516fbff1', class: "zonos--header" }, this.headerText && (h("h3", { key: '0b2086b13d7cfc14901527afbb087c40eb76895d', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: '2d2b55e65e965071f6422665eaa8be7991450a93', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, variant: "subtle" })))), h("div", { key: 'aedb5b3b307a5a04f9b806c927679d0e0c0de711', class: classes([
|
|
75
75
|
'zonos--body',
|
|
76
76
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
77
|
-
]) }, h("slot", { key: '
|
|
77
|
+
]) }, h("slot", { key: '5f55d5771bc62a54865ee3bf8a25f571bfd7fbd1' })), h("slot", { key: '95053c3ebf850f1f9796163122f9224f4190d1c9', name: "dialog-footer" })))));
|
|
78
78
|
}
|
|
79
79
|
static get is() { return "zonos-dialog"; }
|
|
80
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,17 +17,17 @@ export class ZonosInput {
|
|
|
17
17
|
this.inputChange.emit(newValue);
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'f4b7ad75b2aebce3bc05a482fe20fee290a3a4e7', class: classes([
|
|
21
21
|
'zonos--input zonos--elements',
|
|
22
22
|
this.inputSize,
|
|
23
23
|
this.isError && 'has-error',
|
|
24
24
|
]), style: {
|
|
25
25
|
'--border-radius': getBorderRadius(),
|
|
26
26
|
'--font-family': zonosStoreFontFamily(),
|
|
27
|
-
} }, h("div", { key: '
|
|
27
|
+
} }, h("div", { key: '356e16c11c1cd9edf137f69978ebaa3eb2c28d4e', class: classes([
|
|
28
28
|
'zonos--label-wrapper',
|
|
29
29
|
this.isDisabled && 'disabled',
|
|
30
|
-
]) }, h("input", { key: '
|
|
30
|
+
]) }, h("input", { key: '71659072bd58942efebb88be65ced18ad29be8ab', class: classes([
|
|
31
31
|
'zonos--floated-input',
|
|
32
32
|
!!this.inputLabel && 'has-label',
|
|
33
33
|
this.inputValue && 'has-content',
|
|
@@ -35,7 +35,7 @@ export class ZonosInput {
|
|
|
35
35
|
]), disabled: this.isDisabled, onInput: e => {
|
|
36
36
|
const input = e.target;
|
|
37
37
|
this.inputChange.emit(input.value);
|
|
38
|
-
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("label", { key: '
|
|
38
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("label", { key: 'b84c60836fc969c23aedc314c67337e8e87f2ab6', class: "zonos--floated-label", "data-label": this.inputLabel }))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "zonos-input"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -16,9 +16,9 @@ export class ZonosLanguageSelect {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
const { selectedLocale } = localizationStore;
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '6682af3d631bac1a8d3783418c30364ff7694792', class: "zonos--elements", style: {
|
|
20
20
|
'--font-family': zonosStoreFontFamily(),
|
|
21
|
-
} }, h("div", { key: '
|
|
21
|
+
} }, h("div", { key: '9f7e60bc5c4e9d1c0cc31afcbbaec444a7da630e', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: 'f790ef85eeb0bed05773d98793437ab4d6e64c8d', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: '7385a1134b21ae4b39947483ee643da021e6c54c', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "zonos-language-select"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,7 +7,7 @@ export class ZonosLink {
|
|
|
7
7
|
this.linkTitle = undefined;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'bba0da02c0dee468bd0cacd268f339f7ec4f1008', class: "zonos--elements" }, h("a", { key: '19515197e397b2b24237e77d3e89de75382c14e1', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: '63d597a3091e954c9302e461030646b38ee2396e' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "zonos-link"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,11 +10,11 @@ export class ZonosLogo {
|
|
|
10
10
|
const filterColor = this.theme === 'DARK'
|
|
11
11
|
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
12
12
|
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '08ef20244bc204125a7a308efed42cd7fc86c885', class: classes(['zonos--elements zonos--logo']), style: {
|
|
14
14
|
'--filter-color': filterColor,
|
|
15
15
|
'--font-family': zonosStoreFontFamily(),
|
|
16
16
|
'--width': this.width,
|
|
17
|
-
} }, h("img", { key: '
|
|
17
|
+
} }, h("img", { key: '9202f0619fa3874a19ca3050477719b19592d82a', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "zonos-logo"; }
|
|
20
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,11 +14,11 @@ export class ZonosRestState {
|
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
16
|
const imageUrl = this.getImageRestState();
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: 'c6b1e581578da852f6ff852c0c8ff48eba97c82b', class: classes(['zonos--elements zonos--restState']), style: {
|
|
18
18
|
'--font-family': zonosStoreFontFamily(),
|
|
19
|
-
} }, h("div", { key: '
|
|
19
|
+
} }, h("div", { key: '3c9bb31ade1e3343901fbb22bef5a123b3332a77', class: "zonos--restState-image" }, h("img", { key: '00417c062265b35f8603d90520f5efe677b76b19', alt: this.restStateType, onError: () => {
|
|
20
20
|
this.isErrorImageLoad = true;
|
|
21
|
-
}, src: imageUrl })), h("div", { key: '
|
|
21
|
+
}, src: imageUrl })), h("div", { key: '503346f06d25e04a1bc1bbfb770359817854cd64', class: "content" }, h("zonos-text", { key: 'eb580484efd22fd93530d43d04889569ced27fba', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '34972cd05b26b01b1e7877a80b79d6729b63b025', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: '703bfa3740b94e7d742804cd073347ba5f6a8855', class: "action" }, h("slot", { key: 'd0b330b60ad98bda20d35cc6802412d24ab6c536' }))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "zonos-rest-state"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js
CHANGED
|
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
|
|
|
8
8
|
this.label = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '21cd3c3e35baf172ecad7f47a76810e8f39bdeff', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, h("zonos-v-stack", { key: '
|
|
13
|
+
} }, h("zonos-v-stack", { key: '0470633326b6fca9b45a8be67e0d77819561f634', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '8713cbf368658af22bb88825d32175117d47c95b', class: "zonos--select-dialog-header" }, h("zonos-text", { key: '2f94e9f6139570398897ca55934c5244df7f82e8', type: "boldLabel" }, this.label), h("zonos-button", { key: 'c247dabcc8f487a4cc5a814fb1aa4d9a68fa4ba3', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: '26727e634ec09a3b9e3912ada3b920a87a1ba4d0' }))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-select-dialog-header"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|