@zonos/elements 1.3.11-alpha.0 → 1.3.11-alpha.1
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-7e28f026.js → cart-d9e9ecfc.js} +29 -25
- package/dist/cjs/{getBorderRadius-d795f526.js → getBorderRadius-9d619bf6.js} +1 -1
- package/dist/cjs/getContrastColor-af2386af.js +20 -0
- package/dist/cjs/{isColorVariable-41cacd82.js → isColorVariable-fff5e469.js} +1 -1
- package/dist/cjs/{isDarkColor-33fb96a7.js → isDarkColor-a68274cf.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-586d3206.js → submitGtag-b7ef5d5b.js} +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +11 -11
- package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/{zonos-button_3.cjs.entry.js → zonos-button_2.cjs.entry.js} +34 -36
- package/dist/cjs/zonos-card_2.cjs.entry.js +8 -8
- package/dist/cjs/{zonos-cart-items_9.cjs.entry.js → zonos-cart-items_10.cjs.entry.js} +161 -48
- package/dist/cjs/zonos-checkout.cjs.entry.js +20 -22
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +9 -9
- 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 +4 -4
- package/dist/cjs/zonos-icon.cjs.entry.js +39 -0
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +13 -4
- package/dist/cjs/zonos-text.cjs.entry.js +6 -2
- package/dist/cjs/{zonosStore-d3f0173b.js → zonosStore-21334303.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +32 -22
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +76 -16
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +2 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +15 -17
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +43 -24
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.css +1 -1
- package/dist/collection/components/common/zonos-button/zonos-button.js +18 -4
- package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/assets/TabCheckmark.svg +3 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +102 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +193 -0
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- 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 +1 -1
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +1 -1
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -28
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +7 -3
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -4
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +27 -1
- package/dist/collection/components/common/zonos-text/zonos-text.js +7 -3
- 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 +1 -1
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +26 -0
- package/dist/collection/components/store/zonosStore.js +1 -1
- 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/getContrastColor.js +16 -0
- package/dist/collection/components/utils/isColorVariable.js +1 -1
- package/dist/collection/components/utils/styles.js +12 -0
- package/dist/components/getContrastColor.js +18 -0
- package/dist/components/isColorVariable.js +1 -1
- package/dist/components/isDarkColor.js +1 -1
- package/dist/components/stripe.js +27 -22
- package/dist/components/trackConversionEvent.js +1 -1
- package/dist/components/zonos-address2.js +1 -1
- package/dist/components/zonos-badge2.js +3 -3
- package/dist/components/zonos-button2.js +30 -4
- package/dist/components/zonos-card2.js +2 -2
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +1 -1
- package/dist/components/zonos-checkout-footer2.js +33 -17
- package/dist/components/zonos-checkout-progress-tabs.d.ts +11 -0
- package/dist/components/zonos-checkout-progress-tabs.js +6 -0
- package/dist/components/zonos-checkout-progress-tabs2.js +122 -0
- package/dist/components/zonos-checkout.js +44 -40
- package/dist/components/zonos-collapse2.js +2 -2
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +2 -2
- package/dist/components/zonos-country-select2.js +2 -2
- package/dist/components/zonos-custom-message2.js +1 -1
- package/dist/components/zonos-dialog2.js +4 -6
- package/dist/components/zonos-hello-dialog-footer2.js +2 -2
- package/dist/components/zonos-hello-dialog2.js +2 -2
- package/dist/components/zonos-hello.js +1 -1
- package/dist/components/zonos-icon2.js +5 -1
- package/dist/components/zonos-language-select2.js +3 -3
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/components/zonos-link.js +1 -1
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-review2.js +1 -1
- package/dist/components/zonos-select-dialog-header2.js +2 -2
- package/dist/components/zonos-shipping-rich-radio2.js +11 -1
- package/dist/components/zonos-shipping2.js +44 -25
- package/dist/components/zonos-text2.js +5 -1
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/components/zonosStore.js +1 -1
- package/dist/esm/{cart-5a88b4f3.js → cart-6cfd7560.js} +30 -25
- package/dist/esm/{getBorderRadius-5d750ab8.js → getBorderRadius-c5fb7746.js} +1 -1
- package/dist/esm/getContrastColor-a1a6f6aa.js +18 -0
- package/dist/esm/{isColorVariable-91c33804.js → isColorVariable-fbf2d80d.js} +1 -1
- package/dist/esm/{isDarkColor-c34dfed9.js → isDarkColor-810fcaa5.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-289ddd8b.js → submitGtag-acca574d.js} +2 -2
- package/dist/esm/zonos-address_4.entry.js +11 -11
- package/dist/esm/zonos-badge_2.entry.js +6 -6
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/{zonos-button_3.entry.js → zonos-button_2.entry.js} +35 -36
- package/dist/esm/zonos-card_2.entry.js +8 -8
- package/dist/esm/{zonos-cart-items_9.entry.js → zonos-cart-items_10.entry.js} +161 -49
- package/dist/esm/zonos-checkout.entry.js +20 -22
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +5 -5
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +9 -9
- 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 +4 -4
- package/dist/esm/zonos-icon.entry.js +35 -0
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +3 -3
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +5 -5
- package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +13 -4
- package/dist/esm/zonos-text.entry.js +6 -2
- package/dist/esm/{zonosStore-aac7c6ac.js → zonosStore-e5f3d4da.js} +1 -1
- package/dist/esm-es5/{cart-5a88b4f3.js → cart-6cfd7560.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-5d750ab8.js → getBorderRadius-c5fb7746.js} +1 -1
- package/dist/esm-es5/getContrastColor-a1a6f6aa.js +1 -0
- package/dist/esm-es5/isColorVariable-fbf2d80d.js +1 -0
- package/dist/esm-es5/{isDarkColor-c34dfed9.js → isDarkColor-810fcaa5.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-289ddd8b.js → submitGtag-acca574d.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -0
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -0
- 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-icon.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.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-aac7c6ac.js → zonosStore-e5f3d4da.js} +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.d.ts +14 -2
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +0 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +7 -0
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -0
- package/dist/types/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.d.ts +29 -0
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +0 -5
- package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +3 -1
- package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +1 -1
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
- package/dist/types/components/common/zonos-text/zonos-text.d.ts +3 -1
- package/dist/types/components/store/checkout/cart.d.ts +10 -1
- package/dist/types/components/utils/getContrastColor.d.ts +4 -0
- package/dist/types/components/utils/isColorVariable.d.ts +1 -1
- package/dist/types/components/utils/styles.d.ts +7 -0
- package/dist/types/components.d.ts +67 -14
- package/dist/zonos-elements/assets/TabCheckmark.svg +3 -0
- package/dist/zonos-elements/p-0b51de7b.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d7690752.system.entry.js → p-0dfd549e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c1e54094.system.js → p-0f414d6a.system.js} +1 -1
- package/dist/zonos-elements/{p-723628b7.js → p-0f8acb62.js} +1 -1
- package/dist/zonos-elements/{p-27d57265.system.entry.js → p-20b080d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7e355496.system.entry.js → p-212992ec.system.entry.js} +1 -1
- package/dist/zonos-elements/p-22db99c9.system.entry.js +1 -0
- package/dist/zonos-elements/{p-14bf3658.entry.js → p-26aee7a0.entry.js} +1 -1
- package/dist/zonos-elements/{p-c6de2e40.system.entry.js → p-2d5a6a7f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ca6b4c1e.system.entry.js → p-2fdec8bc.system.entry.js} +1 -1
- package/dist/zonos-elements/p-352ba771.system.js +1 -0
- package/dist/zonos-elements/p-4051a42d.js +1 -0
- package/dist/zonos-elements/p-5162f4cc.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d0d12a64.entry.js → p-51c32b3d.entry.js} +1 -1
- package/dist/zonos-elements/{p-4569bc92.js → p-55b8b98b.js} +1 -1
- package/dist/zonos-elements/p-59595553.entry.js +1 -0
- package/dist/zonos-elements/p-5a40684c.entry.js +1 -0
- package/dist/zonos-elements/{p-25fbcefe.system.entry.js → p-60ac5342.system.entry.js} +1 -1
- package/dist/zonos-elements/p-61e08de7.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e969cec9.entry.js → p-65a877e2.entry.js} +1 -1
- package/dist/zonos-elements/{p-d2885590.system.js → p-66cc1554.system.js} +1 -1
- package/dist/zonos-elements/p-6a80f7f5.entry.js +1 -0
- package/dist/zonos-elements/{p-5f2cb4b6.entry.js → p-6daa64bf.entry.js} +1 -1
- package/dist/zonos-elements/{p-77727098.system.js → p-6db032ee.system.js} +1 -1
- package/dist/zonos-elements/{p-188ddbe2.entry.js → p-6dc606c6.entry.js} +1 -1
- package/dist/zonos-elements/p-6e81adba.system.js +1 -1
- package/dist/zonos-elements/{p-4ad5f307.system.entry.js → p-7e00a5dc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a725946f.entry.js → p-817e7f8e.entry.js} +1 -1
- package/dist/zonos-elements/{p-dad00ad3.system.entry.js → p-824b8708.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-770384fa.system.entry.js → p-9a2c3874.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-edbea8df.system.js → p-9db2f9d1.system.js} +1 -1
- package/dist/zonos-elements/{p-77c54b83.js → p-a1a477c9.js} +1 -1
- package/dist/zonos-elements/{p-93e51987.system.entry.js → p-a398bc59.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-febddb45.entry.js → p-a641dfcd.entry.js} +1 -1
- package/dist/zonos-elements/p-a7bfe188.entry.js +1 -0
- package/dist/zonos-elements/{p-9db3028d.entry.js → p-ac7155d7.entry.js} +1 -1
- package/dist/zonos-elements/{p-6181f2d5.entry.js → p-ad499520.entry.js} +1 -1
- package/dist/zonos-elements/{p-a578facf.entry.js → p-b0e9226a.entry.js} +1 -1
- package/dist/zonos-elements/{p-d9c65636.system.js → p-b1ee44c6.system.js} +1 -1
- package/dist/zonos-elements/{p-e392e212.system.entry.js → p-b2c48954.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-315c1fc2.entry.js → p-b62aee3d.entry.js} +1 -1
- package/dist/zonos-elements/p-b76909ab.entry.js +1 -0
- package/dist/zonos-elements/{p-333da541.entry.js → p-b9cde0c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-482371fb.system.entry.js → p-c4862aab.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c6e44a9b.entry.js +1 -0
- package/dist/zonos-elements/p-cde25873.js +1 -0
- package/dist/zonos-elements/p-d96f8d89.system.entry.js +1 -0
- package/dist/zonos-elements/p-e2131057.entry.js +1 -0
- package/dist/zonos-elements/p-e28ed57c.js +1 -0
- package/dist/zonos-elements/{p-49a5be72.js → p-e74f27da.js} +1 -1
- package/dist/zonos-elements/{p-afcded5d.system.js → p-ed4d8d71.system.js} +1 -1
- package/dist/zonos-elements/{p-0b4910fe.system.entry.js → p-f62b49aa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a87803b7.system.entry.js → p-f8b03017.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8445a084.system.entry.js → p-fac20c60.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e4e1ca2f.system.entry.js → p-fd8c50e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d5a9dfc7.entry.js → p-ff17c03b.entry.js} +1 -1
- package/dist/zonos-elements/p-ff962844.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/isColorVariable-91c33804.js +0 -1
- package/dist/esm-es5/zonos-button_3.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +0 -1
- package/dist/zonos-elements/p-144f4d31.entry.js +0 -1
- package/dist/zonos-elements/p-4c414a92.js +0 -1
- package/dist/zonos-elements/p-5c991faa.system.entry.js +0 -1
- package/dist/zonos-elements/p-691d8075.entry.js +0 -1
- package/dist/zonos-elements/p-87c4ac09.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f532a3f.entry.js +0 -1
- package/dist/zonos-elements/p-afc0460d.entry.js +0 -1
- package/dist/zonos-elements/p-dd153a4e.entry.js +0 -1
- package/dist/zonos-elements/p-def8823e.entry.js +0 -1
- package/dist/zonos-elements/p-e4749f19.js +0 -1
- package/dist/zonos-elements/p-e87e8c9c.system.entry.js +0 -1
- package/dist/zonos-elements/p-f1170e7b.entry.js +0 -1
- package/dist/zonos-elements/p-fe0930e4.system.entry.js +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-e5f3d4da.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
5
|
-
import { i as isColorVariable } from './isColorVariable-
|
|
6
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-c5fb7746.js';
|
|
5
|
+
import { i as isColorVariable } from './isColorVariable-fbf2d80d.js';
|
|
6
|
+
import { i as isDarkColor } from './isDarkColor-810fcaa5.js';
|
|
7
|
+
import { g as getContrastColor } from './getContrastColor-a1a6f6aa.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Get theme for button text based on background color
|
|
@@ -19,7 +20,20 @@ const getButtonTheme = (overrideBackground) => {
|
|
|
19
20
|
return buttonTheme;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Filter out all of the undefined values from the object so we don't have undefined css variable values
|
|
25
|
+
*/
|
|
26
|
+
const styles = (props) => {
|
|
27
|
+
// loop through the object and filter out all of the underfined values
|
|
28
|
+
return Object.entries(props).reduce((acc, [key, value]) => {
|
|
29
|
+
if (value) {
|
|
30
|
+
acc[key] = value;
|
|
31
|
+
}
|
|
32
|
+
return acc;
|
|
33
|
+
}, {});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const zonosButtonCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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-inline-flexbox;display:inline-flex;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));margin:1px;}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--amino-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--subtle-hover-color, var(--amino-gray-100))}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--amino-radius-4);width:24px}";
|
|
23
37
|
const ZonosButtonStyle0 = zonosButtonCss;
|
|
24
38
|
|
|
25
39
|
const ZonosButton = class {
|
|
@@ -78,12 +92,23 @@ const ZonosButton = class {
|
|
|
78
92
|
const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
|
|
79
93
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
80
94
|
const spinnerColor = buttonTheme === 'LIGHT' ? 'black' : 'white';
|
|
81
|
-
return (h(Host, { key: '
|
|
95
|
+
return (h(Host, { key: '75f5e6900c6e0eb468ea639460d55f251b580200', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
82
96
|
'--background-color': overrideBackground,
|
|
83
97
|
'--border-radius': borderStyle,
|
|
84
98
|
'--color': color,
|
|
85
99
|
'--font-family': zonosStoreFontFamily(),
|
|
86
|
-
|
|
100
|
+
'--subtle-hover-color': this.buttonColor
|
|
101
|
+
? // for the subtle variant, the hover background should contrast with the text color
|
|
102
|
+
getContrastColor({
|
|
103
|
+
backgroundColor: 'white',
|
|
104
|
+
color: isColorVariable(this.buttonColor)
|
|
105
|
+
? window
|
|
106
|
+
.getComputedStyle(this.ele)
|
|
107
|
+
.getPropertyValue(`--amino-${this.buttonColor}`)
|
|
108
|
+
: this.buttonColor,
|
|
109
|
+
})
|
|
110
|
+
: undefined,
|
|
111
|
+
}) }, h("button", { key: 'fd1323ac24be622182f9b60d8b026fb0ea47fa40', class: classes([
|
|
87
112
|
this.hasIcon && 'has-icon',
|
|
88
113
|
this.hasContent && 'has-content',
|
|
89
114
|
this.noBackground && 'no-background',
|
|
@@ -96,41 +121,15 @@ const ZonosButton = class {
|
|
|
96
121
|
overrideBackground &&
|
|
97
122
|
variant === 'standard' &&
|
|
98
123
|
'override-background',
|
|
99
|
-
]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '
|
|
124
|
+
]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '92706fef0545ba24e3f943d731bffa1e844ec154', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
100
125
|
}
|
|
126
|
+
get ele() { return getElement(this); }
|
|
101
127
|
static get watchers() { return {
|
|
102
128
|
"icon": ["iconChangeHandler"]
|
|
103
129
|
}; }
|
|
104
130
|
};
|
|
105
131
|
ZonosButton.style = ZonosButtonStyle0;
|
|
106
132
|
|
|
107
|
-
const zonosIconCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";
|
|
108
|
-
const ZonosIconStyle0 = zonosIconCss;
|
|
109
|
-
|
|
110
|
-
const ZonosIcon = class {
|
|
111
|
-
constructor(hostRef) {
|
|
112
|
-
registerInstance(this, hostRef);
|
|
113
|
-
this.autoHeight = false;
|
|
114
|
-
this.iconColor = 'gray-1200';
|
|
115
|
-
this.content = undefined;
|
|
116
|
-
this.size = 24;
|
|
117
|
-
}
|
|
118
|
-
render() {
|
|
119
|
-
if (!this.content || !this.el.shadowRoot) {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
this.el.shadowRoot.innerHTML = this.content;
|
|
123
|
-
return (h(Host, { class: "zonos--elements", style: {
|
|
124
|
-
'--color': `var(--amino-${this.iconColor})`,
|
|
125
|
-
'--font-family': zonosStoreFontFamily(),
|
|
126
|
-
'--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
|
|
127
|
-
'--width': `${this.size}px`,
|
|
128
|
-
} }));
|
|
129
|
-
}
|
|
130
|
-
get el() { return getElement(this); }
|
|
131
|
-
};
|
|
132
|
-
ZonosIcon.style = ZonosIconStyle0;
|
|
133
|
-
|
|
134
133
|
const zonosSpinnerCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{position:relative;overflow:hidden;width:var(--size);height:var(--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--size);height:var(--size);stroke:var(--amino-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--amino-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--amino-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--amino-spinner-track-black)}:host(.white) circle{stroke:var(--amino-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--amino-spinner-track-white)}:host(.info) circle{stroke:var(--amino-blue-600)}:host(.info) circle.track{stroke:var(--amino-blue-100)}:host(.success) circle{stroke:var(--amino-green-600)}:host(.success) circle.track{stroke:var(--amino-green-100)}:host(.danger) circle{stroke:var(--amino-red-600)}:host(.danger) circle.track{stroke:var(--amino-red-100)}:host(.warning) circle{stroke:var(--amino-orange-600)}:host(.warning) circle.track{stroke:var(--amino-orange-100)}";
|
|
135
134
|
const ZonosSpinnerStyle0 = zonosSpinnerCss;
|
|
136
135
|
|
|
@@ -152,4 +151,4 @@ const ZonosSpinner = class {
|
|
|
152
151
|
};
|
|
153
152
|
ZonosSpinner.style = ZonosSpinnerStyle0;
|
|
154
153
|
|
|
155
|
-
export { ZonosButton as zonos_button,
|
|
154
|
+
export { ZonosButton as zonos_button, ZonosSpinner as zonos_spinner };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-dd40cc85.js';
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { d as zonosStoreFontFamily } from './zonosStore-e5f3d4da.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import {
|
|
4
|
+
import { F as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-6cfd7560.js';
|
|
5
5
|
import { l as languages } from './ILanguage-97790bee.js';
|
|
6
|
-
import './isDarkColor-
|
|
7
|
-
import './getBorderRadius-
|
|
6
|
+
import './isDarkColor-810fcaa5.js';
|
|
7
|
+
import './getBorderRadius-c5fb7746.js';
|
|
8
8
|
|
|
9
9
|
const zonosCardCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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 .styled-card{border:var(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";
|
|
10
10
|
const ZonosCardStyle0 = zonosCardCss;
|
|
@@ -20,9 +20,9 @@ const ZonosCard = class {
|
|
|
20
20
|
this.spacing = '24px';
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: 'c2f25ffa32920500b63702df35b9e30dcf28b47d', style: {
|
|
24
24
|
'--font-family': zonosStoreFontFamily(),
|
|
25
|
-
} }, h("div", { key: '
|
|
25
|
+
} }, h("div", { key: '30515451d4694d3fffffab4c23ac2b0ff0e37710', class: classes(['styled-card']), style: { padding: this.spacing } }, this.label && (h("header", { class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { type: "subheader" }, this.label), h("h-stack", { spacing: 8 }, this.actions))), h("slot", { key: 'a1ced320f20a585c7201fc5c7b0729ce8e91a176' }), (this.footerActions || this.footerContent) && (h("footer", { class: "card-footer", style: {
|
|
26
26
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
27
27
|
padding: this.spacing,
|
|
28
28
|
} }, h("div", null, this.footerContent), h("h-stack", { spacing: 8 }, this.footerActions))))));
|
|
@@ -51,9 +51,9 @@ const ZonosLanguageSelect = class {
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
const { selectedLocale } = localizationStore;
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '25e0e2be0bbac853efa9c26c1595a1d57461a1a1', class: "zonos--elements", style: {
|
|
55
55
|
'--font-family': zonosStoreFontFamily(),
|
|
56
|
-
} }, h("div", { key: '
|
|
56
|
+
} }, h("div", { key: 'b9f3a630f945570a9c0058bb0367e810b7650eb0', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: 'b30a41cc7f4eab57f15b48ffa3f7c0ad1e695e65', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'c6826b80ece54415befc388e57baa02d56472aef', 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 })))))))));
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-dd40cc85.js';
|
|
2
|
-
import { f as cartStore, t as translate,
|
|
3
|
-
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-
|
|
4
|
-
import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag } from './submitGtag-
|
|
5
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
2
|
+
import { f as cartStore, t as translate, r as handleFetch, q as stripeStoreReset, j as stripeStore, C as stripeStoreRetrievePayment, l as localizationStore, D as cartStoreUpdateSelectedShippingOption, E as cartStoreGetShippingTransitInfo } from './cart-6cfd7560.js';
|
|
3
|
+
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-e5f3d4da.js';
|
|
4
|
+
import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag } from './submitGtag-acca574d.js';
|
|
5
|
+
import { g as getBorderRadius } from './getBorderRadius-c5fb7746.js';
|
|
6
|
+
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
6
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
|
-
import { i as isDarkColor } from './isDarkColor-c34dfed9.js';
|
|
8
8
|
import { l as languages } from './ILanguage-97790bee.js';
|
|
9
|
-
import {
|
|
9
|
+
import { g as getContrastColor } from './getContrastColor-a1a6f6aa.js';
|
|
10
|
+
import { i as isColorVariable } from './isColorVariable-fbf2d80d.js';
|
|
11
|
+
import './isDarkColor-810fcaa5.js';
|
|
10
12
|
|
|
11
13
|
const formatCurrency = ({ amount, currency, showCurrencyText, }) => showCurrencyText
|
|
12
14
|
? `${new Intl.NumberFormat('en-US', {
|
|
@@ -259,33 +261,45 @@ const ZonosIcon = `<svg width="105" height="29" viewBox="0 0 105 29" fill="none"
|
|
|
259
261
|
</svg>
|
|
260
262
|
`;
|
|
261
263
|
|
|
262
|
-
const zonosCheckoutFooterCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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
|
|
264
|
+
const zonosCheckoutFooterCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{position:absolute;bottom:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);gap:var(--amino-space-16);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-12);-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{line-height:0}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--amino-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8);position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:var(--amino-space-4)}}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--amino-surface-color);-webkit-box-shadow:var(--amino-v3-shadow-xl);box-shadow:var(--amino-v3-shadow-xl);border-radius:var(--amino-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:10005;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--amino-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:var(--amino-space-32);background:var(--amino-gray-0);position:relative;padding-top:var(--amino-space-24);bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}";
|
|
263
265
|
const ZonosCheckoutFooterStyle0 = zonosCheckoutFooterCss;
|
|
264
266
|
|
|
265
267
|
const ZonosCheckoutFooter = class {
|
|
266
268
|
constructor(hostRef) {
|
|
267
269
|
registerInstance(this, hostRef);
|
|
268
|
-
this.
|
|
270
|
+
this.mobile = false;
|
|
271
|
+
this.dataTheme = undefined;
|
|
272
|
+
this.showLanguageDialog = false;
|
|
273
|
+
this.isMobile = false;
|
|
269
274
|
}
|
|
270
275
|
handleGlobalClick(e) {
|
|
271
|
-
if (!this.el.contains(e.target) && this.
|
|
272
|
-
this.
|
|
276
|
+
if (!this.el.contains(e.target) && this.showLanguageDialog) {
|
|
277
|
+
this.showLanguageDialog = false;
|
|
273
278
|
}
|
|
274
279
|
}
|
|
275
|
-
|
|
276
|
-
this.
|
|
280
|
+
toggleLanguageDialog() {
|
|
281
|
+
this.showLanguageDialog = !this.showLanguageDialog;
|
|
282
|
+
}
|
|
283
|
+
handleMobileChange() {
|
|
284
|
+
this.isMobile = isCheckoutMobile(this.mobile);
|
|
285
|
+
}
|
|
286
|
+
componentWillLoad() {
|
|
287
|
+
this.isMobile = isCheckoutMobile(this.mobile);
|
|
277
288
|
}
|
|
278
289
|
render() {
|
|
279
|
-
var _a
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
return (h(Host, { key: '
|
|
290
|
+
var _a;
|
|
291
|
+
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
292
|
+
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
293
|
+
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1200';
|
|
294
|
+
return (h(Host, { key: '2ce26e27b7c90b4d37f26197821ed1a39ddb9fae', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: '5f52ec7b5ad1659ceb9d2edb4661e5995b72afaf', class: "zonos--checkout-footer" }, h("div", { key: '5d127f033702bff94cc2db76b4695a03055ec783', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: '701b5014848ea716f7dcc22221b453146af92962', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'e2a319113905bd76473aef822780521f2be58405', class: classes([
|
|
284
295
|
'zonos--checkout-footer-dialog',
|
|
285
|
-
this.
|
|
286
|
-
]) }, h("zonos-language-select", { key: '
|
|
296
|
+
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
297
|
+
]) }, h("zonos-language-select", { key: '4fb9860a4547541f3947d349ab6056e899335952', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: '0a348521a7ccecc23a7a69019940c2421bb8420c', class: "zonos--checkout-footer-icon-wrapper" }, h("zonos-text", { key: '9adf4c24fcf1b5d0827556e9e68006860b0bb9c4', textColor: colorDesktop, type: "caption" }, "Powered by"), h("a", { key: 'a3f957e10d14d68d3973169470a21fdabb2f7a06', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '49592d8302447d007dc840de18fa78af7898f382', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 }))))));
|
|
287
298
|
}
|
|
288
299
|
get el() { return getElement(this); }
|
|
300
|
+
static get watchers() { return {
|
|
301
|
+
"mobile": ["handleMobileChange"]
|
|
302
|
+
}; }
|
|
289
303
|
};
|
|
290
304
|
ZonosCheckoutFooter.style = ZonosCheckoutFooterStyle0;
|
|
291
305
|
|
|
@@ -333,6 +347,88 @@ const ZonosCheckoutPayment = class {
|
|
|
333
347
|
};
|
|
334
348
|
ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
|
|
335
349
|
|
|
350
|
+
const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
351
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>
|
|
352
|
+
</svg>
|
|
353
|
+
`;
|
|
354
|
+
|
|
355
|
+
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
356
|
+
const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
|
|
357
|
+
|
|
358
|
+
const ZonosCheckoutProgressTabs = class {
|
|
359
|
+
constructor(hostRef) {
|
|
360
|
+
registerInstance(this, hostRef);
|
|
361
|
+
/**
|
|
362
|
+
* The total number of steps that's done
|
|
363
|
+
*/
|
|
364
|
+
this.getTotalSuccessStep = () => {
|
|
365
|
+
// include the finish step
|
|
366
|
+
const totalSteps = 4;
|
|
367
|
+
const stepDone = Object.values(cartStore.tabItems).filter(tab => tab.isDone).length + 1;
|
|
368
|
+
return `${(stepDone / totalSteps) * 100}%`;
|
|
369
|
+
};
|
|
370
|
+
this.isTabClickable = (tabValue) => {
|
|
371
|
+
const currentTab = cartStore.tabItems[tabValue];
|
|
372
|
+
if (!currentTab) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
// clickable if the tab state is done
|
|
376
|
+
if (currentTab.isDone) {
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
379
|
+
// if any of the previous tabs are not done, the tab is not clickable
|
|
380
|
+
return Object.values(cartStore.tabItems)
|
|
381
|
+
.slice(0, currentTab.index - 1)
|
|
382
|
+
.every(tab => tab.isDone);
|
|
383
|
+
};
|
|
384
|
+
this.tabColor = null;
|
|
385
|
+
this.backgroundColor = null;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Set the tab items data. This is to be used in storybook
|
|
389
|
+
*/
|
|
390
|
+
async setTabItems(tabItems) {
|
|
391
|
+
cartStore.tabItems = tabItems;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Set selected tab. Only set the tab if it's clickable
|
|
395
|
+
*/
|
|
396
|
+
async setTabSelected(tabValue) {
|
|
397
|
+
if (this.isTabClickable(tabValue)) {
|
|
398
|
+
cartStore.step = tabValue;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
render() {
|
|
402
|
+
const selectedStep = cartStore.step;
|
|
403
|
+
const labelSelectedColor = this.tabColor || zonosStore.appearance.colorSecondary;
|
|
404
|
+
// If the background color and the tab color are not contrat enough, increase the contrast of the label color
|
|
405
|
+
const contrastLabelColor = this.backgroundColor && labelSelectedColor
|
|
406
|
+
? getContrastColor({
|
|
407
|
+
backgroundColor: isColorVariable(this.backgroundColor)
|
|
408
|
+
? window
|
|
409
|
+
.getComputedStyle(this.ele)
|
|
410
|
+
.getPropertyValue(`--amino-${this.backgroundColor.replace('--amino-', '')}`)
|
|
411
|
+
: this.backgroundColor,
|
|
412
|
+
color: labelSelectedColor,
|
|
413
|
+
})
|
|
414
|
+
: labelSelectedColor;
|
|
415
|
+
return (h(Host, { key: '1fd6d6cb0f4e819f7e0a204fdc1bccbd2753154c', class: "zonos--elements", "data-theme": zonosStore.appearance.theme, style: {
|
|
416
|
+
'--color': contrastLabelColor,
|
|
417
|
+
'--progress-percent': this.getTotalSuccessStep(),
|
|
418
|
+
} }, h("div", { key: 'e7b0c9e9376461461286856553381d20bdd50bb6', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
419
|
+
const isSelected = tab.value === selectedStep;
|
|
420
|
+
return (h("button", { class: classes([
|
|
421
|
+
'zonos--tab-item',
|
|
422
|
+
tab.value === selectedStep && 'selected',
|
|
423
|
+
tab.isDone && 'done',
|
|
424
|
+
]), 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" }, tab.label)));
|
|
425
|
+
})), h("div", { key: 'e924379e523d61952e3db826daeb080917c5b468', class: "zonos--tab-progress" }, h("div", { key: '80d193a8f2099a6eb552c1c016be545b9120c6d1', class: "zonos--progress-bar-fill" }))));
|
|
426
|
+
}
|
|
427
|
+
static get assetsDirs() { return ["assets"]; }
|
|
428
|
+
get ele() { return getElement(this); }
|
|
429
|
+
};
|
|
430
|
+
ZonosCheckoutProgressTabs.style = ZonosCheckoutProgressTabsStyle0;
|
|
431
|
+
|
|
336
432
|
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:var(--amino-space-8);margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
337
433
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
338
434
|
|
|
@@ -403,7 +499,7 @@ ZonosCustomerInfo.style = ZonosCustomerInfoStyle0;
|
|
|
403
499
|
|
|
404
500
|
const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
|
|
405
501
|
|
|
406
|
-
const zonosDialogCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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 .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:white}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);
|
|
502
|
+
const zonosDialogCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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 .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:white;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";
|
|
407
503
|
const ZonosDialogStyle0 = zonosDialogCss;
|
|
408
504
|
|
|
409
505
|
const ZonosDialog = class {
|
|
@@ -428,7 +524,6 @@ const ZonosDialog = class {
|
|
|
428
524
|
this.noHeader = false;
|
|
429
525
|
this.noBodyPadding = false;
|
|
430
526
|
this.noBorder = false;
|
|
431
|
-
this.footerRightAction = null;
|
|
432
527
|
this.borderStyle = undefined;
|
|
433
528
|
this.noCloseButton = false;
|
|
434
529
|
this.noClickOutside = false;
|
|
@@ -451,7 +546,7 @@ const ZonosDialog = class {
|
|
|
451
546
|
document.body.style.overflow = 'auto';
|
|
452
547
|
}
|
|
453
548
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
454
|
-
return (h(Host, { key: '
|
|
549
|
+
return (h(Host, { key: '6bda73bd75e6bc31e73ad53849a51752396ee42d', class: classes([
|
|
455
550
|
'zonos--elements',
|
|
456
551
|
this.open && 'open',
|
|
457
552
|
this.isLoading && 'is-loading',
|
|
@@ -462,10 +557,10 @@ const ZonosDialog = class {
|
|
|
462
557
|
'--font-family': zonosStoreFontFamily(),
|
|
463
558
|
'--height': this.height || 'initial',
|
|
464
559
|
'--width': this.width,
|
|
465
|
-
} }, h("div", { key: '
|
|
560
|
+
} }, h("div", { key: 'cd3ff21820f95faee3f16e23a272e080bd7930c8', class: "zonos--backdrop" }), h("div", { key: '85af066de976e3b29505c8804e544ca0a1f8a012', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: '389491715fcb12f9c86b744e2e9c20930a2a9f25', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: 'a28ad12faab02ef30769a3234b24e749b38c46b4', class: classes([
|
|
466
561
|
'zonos--body',
|
|
467
562
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
468
|
-
]) }, h("slot", { key: '
|
|
563
|
+
]) }, h("slot", { key: '7da31d739197a17ae94df1909c93f70c1282da95' })), h("slot", { key: 'fe02670713895b786dfa6b0c30ad6553c32796cd', name: "dialog-footer" })))));
|
|
469
564
|
}
|
|
470
565
|
static get assetsDirs() { return ["assets"]; }
|
|
471
566
|
};
|
|
@@ -475,7 +570,7 @@ const ChevronDownIcon = `<svg color="var(--amino-gray-400)" fill="none" height="
|
|
|
475
570
|
|
|
476
571
|
const ChevronUpIcon = `<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
477
572
|
|
|
478
|
-
const zonosReviewCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--amino-gray-0);z-index:1}:host .zonos--total-pay{margin:var(--amino-space-
|
|
573
|
+
const zonosReviewCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--amino-gray-0);z-index:1}:host .zonos--total-pay{margin:var(--amino-space-8) 0 var(--amino-space-32)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8);background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";
|
|
479
574
|
const ZonosReviewStyle0 = zonosReviewCss;
|
|
480
575
|
|
|
481
576
|
const ZonosReview = class {
|
|
@@ -536,11 +631,13 @@ const ZonosShipping = class {
|
|
|
536
631
|
if (!selectedShippingOption) {
|
|
537
632
|
return;
|
|
538
633
|
}
|
|
634
|
+
this.isSelecting = true;
|
|
539
635
|
// save selected shipping option to store
|
|
540
636
|
const updateStatus = await cartStoreUpdateSelectedShippingOption(selectedShippingOption);
|
|
541
637
|
if (!updateStatus) {
|
|
542
638
|
return;
|
|
543
639
|
}
|
|
640
|
+
this.isSelecting = false;
|
|
544
641
|
this.disabled = false;
|
|
545
642
|
};
|
|
546
643
|
/**
|
|
@@ -549,11 +646,38 @@ const ZonosShipping = class {
|
|
|
549
646
|
this.continueClickHandler = () => {
|
|
550
647
|
this.continueClicked.emit();
|
|
551
648
|
};
|
|
649
|
+
this.initServiceLevels = () => {
|
|
650
|
+
var _a;
|
|
651
|
+
this.serviceLevels =
|
|
652
|
+
((_a = cartStore.shippingData) === null || _a === void 0 ? void 0 : _a.flatMap((item) => {
|
|
653
|
+
var _a, _b;
|
|
654
|
+
const { expectedDate, maxTransit, minTransit } = cartStoreGetShippingTransitInfo(item);
|
|
655
|
+
const sublabel = expectedDate
|
|
656
|
+
? `${translate('Expected delivery')} ${expectedDate}`
|
|
657
|
+
: '';
|
|
658
|
+
const caption = minTransit && maxTransit
|
|
659
|
+
? `(${minTransit}-${maxTransit} ${translate('business days')})`
|
|
660
|
+
: '';
|
|
661
|
+
const shippingAmount = ((_b = (_a = cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(landedCostItem => { var _a; return ((_a = landedCostItem.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating.id) === item.id; })) === null || _b === void 0 ? void 0 : _b.subtotals.shipping) || 0;
|
|
662
|
+
return {
|
|
663
|
+
caption,
|
|
664
|
+
label: item.displayName,
|
|
665
|
+
price: formatCurrency({
|
|
666
|
+
amount: shippingAmount,
|
|
667
|
+
currency: cartStore.currency,
|
|
668
|
+
}),
|
|
669
|
+
sublabel,
|
|
670
|
+
value: item.id,
|
|
671
|
+
};
|
|
672
|
+
})) || [];
|
|
673
|
+
};
|
|
552
674
|
this.continueLoading = false;
|
|
553
675
|
this.submitBtnColor = undefined;
|
|
554
676
|
this.submitBtnType = undefined;
|
|
555
677
|
this.selectedShippingMethod = null;
|
|
678
|
+
this.isSelecting = false;
|
|
556
679
|
this.disabled = true;
|
|
680
|
+
this.serviceLevels = [];
|
|
557
681
|
}
|
|
558
682
|
watchFormComplete() {
|
|
559
683
|
var _a;
|
|
@@ -565,30 +689,18 @@ const ZonosShipping = class {
|
|
|
565
689
|
});
|
|
566
690
|
}
|
|
567
691
|
}
|
|
692
|
+
componentWillLoad() {
|
|
693
|
+
this.initServiceLevels();
|
|
694
|
+
const selectedServiceLevel = this.serviceLevels.find(item => { var _a; return item.value === ((_a = cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
|
|
695
|
+
if (selectedServiceLevel) {
|
|
696
|
+
this.selectedShippingMethod = selectedServiceLevel;
|
|
697
|
+
}
|
|
698
|
+
// enable continue button if there is a selected shipping option
|
|
699
|
+
this.disabled = !selectedServiceLevel;
|
|
700
|
+
}
|
|
568
701
|
render() {
|
|
569
|
-
var _a;
|
|
570
|
-
|
|
571
|
-
var _a, _b;
|
|
572
|
-
const { expectedDate, maxTransit, minTransit } = cartStoreGetShippingTransitInfo(item);
|
|
573
|
-
const sublabel = expectedDate
|
|
574
|
-
? `${translate('Expected delivery')} ${expectedDate}`
|
|
575
|
-
: '';
|
|
576
|
-
const caption = minTransit && maxTransit
|
|
577
|
-
? `(${minTransit}-${maxTransit} ${translate('business days')})`
|
|
578
|
-
: '';
|
|
579
|
-
const shippingAmount = ((_b = (_a = cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(landedCostItem => { var _a; return ((_a = landedCostItem.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating.id) === item.id; })) === null || _b === void 0 ? void 0 : _b.subtotals.shipping) || 0;
|
|
580
|
-
return {
|
|
581
|
-
caption,
|
|
582
|
-
label: item.displayName,
|
|
583
|
-
price: formatCurrency({
|
|
584
|
-
amount: shippingAmount,
|
|
585
|
-
currency: cartStore.currency,
|
|
586
|
-
}),
|
|
587
|
-
sublabel,
|
|
588
|
-
value: item.id,
|
|
589
|
-
};
|
|
590
|
-
});
|
|
591
|
-
return (h(Host, { class: "zonos--shipping zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Shipping information')), h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !(serviceLevels === null || serviceLevels === void 0 ? void 0 : serviceLevels.length) ? (h("zonos-banner", { bannerTitle: "No shipping methods found - try editing your address or contacting support if the error persists", intent: "error" })) : (h("zonos-shipping-rich-radio", { items: serviceLevels || [], onRadioSelected: e => this.handleRadioSelected(e) })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
702
|
+
var _a, _b;
|
|
703
|
+
return (h(Host, { key: 'ab881bdb575ac0177154ffa8a2d84d668151c46d', class: "zonos--shipping zonos--elements" }, h("div", { key: 'b8738e0fb5c32b329ae03ccd2cb2d1a178a05aa8', class: "zonos--group" }, h("zonos-text", { key: 'd942ab3f4e77631145a0a38dae95999454a92b56', class: "zonos--title", type: "semiBoldSubheader" }, translate('Shipping information')), h("zonos-text", { key: '6855f44cf3458891776b3c215417bec329de89dc', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) ? (h("zonos-banner", { bannerTitle: "No shipping methods found - try editing your address or contacting support if the error persists", intent: "error" })) : (h("zonos-shipping-rich-radio", { initialSelectedValue: (_b = this.selectedShippingMethod) === null || _b === void 0 ? void 0 : _b.value, items: this.serviceLevels, onRadioSelected: e => this.handleRadioSelected(e) })), h("div", { key: '9f2c00c948230679d96ac44940c1dee45e751ded', class: "zonos--group-btn" }, h("zonos-button", { key: '8bab3848d596fef19bc7245fc87a525cf59a15c5', backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
592
704
|
// use primary type when on mobile mode
|
|
593
705
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
594
706
|
}
|
|
@@ -598,4 +710,4 @@ const ZonosShipping = class {
|
|
|
598
710
|
};
|
|
599
711
|
ZonosShipping.style = ZonosShippingStyle0;
|
|
600
712
|
|
|
601
|
-
export { ZonosCartItems as zonos_cart_items, ZonosCartSubtotal as zonos_cart_subtotal, ZonosCheckoutFinish as zonos_checkout_finish, ZonosCheckoutFooter as zonos_checkout_footer, ZonosCheckoutPayment as zonos_checkout_payment, ZonosCustomerInfo as zonos_customer_info, ZonosDialog as zonos_dialog, ZonosReview as zonos_review, ZonosShipping as zonos_shipping };
|
|
713
|
+
export { ZonosCartItems as zonos_cart_items, ZonosCartSubtotal as zonos_cart_subtotal, ZonosCheckoutFinish as zonos_checkout_finish, ZonosCheckoutFooter as zonos_checkout_footer, ZonosCheckoutPayment as zonos_checkout_payment, ZonosCheckoutProgressTabs as zonos_checkout_progress_tabs, ZonosCustomerInfo as zonos_customer_info, ZonosDialog as zonos_dialog, ZonosReview as zonos_review, ZonosShipping as zonos_shipping };
|