@zonos/elements 1.2.4-alpha.1 → 1.2.4-alpha.11
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/README.md +15 -1
- package/dist/cjs/{cart-4ddc2af5.js → cart-963ffc24.js} +36 -8
- package/dist/cjs/{getBorderRadius-a97a5f75.js → getBorderRadius-bf4a4276.js} +1 -1
- package/dist/cjs/{index-20cb112f.js → index-0dcccc22.js} +27 -16
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/{isDarkColor-261fcf3d.js → isDarkColor-ff6ff183.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{localization-11360fed.js → localization-994933ce.js} +46 -8
- package/dist/cjs/{submitGtag-bb093547.js → submitGtag-e047f309.js} +2 -2
- package/dist/cjs/zonos-address_2.cjs.entry.js +8 -8
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/zonos-banner.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +60 -18
- package/dist/cjs/zonos-checkout.cjs.entry.js +10 -8
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +12 -12
- package/dist/cjs/zonos-country-flag_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-elements.cjs.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-icon.cjs.entry.js +3 -3
- package/dist/cjs/zonos-notification.cjs.entry.js +3 -3
- package/dist/cjs/zonos-payment.cjs.entry.js +7 -7
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +3 -3
- package/dist/cjs/{zonosStore-a0fa5b77.js → zonosStore-b43ef5db.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +48 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +5 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +1 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +1 -0
- package/dist/collection/components/common/zonos-banner/zonos-banner.css +1 -0
- package/dist/collection/components/common/zonos-button/zonos-button.css +1 -0
- package/dist/collection/components/common/zonos-card/zonos-card.css +1 -0
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.css +1 -0
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.css +1 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +1 -0
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.css +1 -0
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +1 -0
- package/dist/collection/components/common/zonos-icon/zonos-icon.css +1 -0
- package/dist/collection/components/common/zonos-logo/zonos-logo.css +1 -0
- package/dist/collection/components/common/zonos-notification/zonos-notification.css +1 -0
- package/dist/collection/components/common/zonos-notification/zonos-notification.js +3 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.css +1 -0
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.css +1 -0
- package/dist/collection/components/common/zonos-text/zonos-text.css +1 -0
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.css +1 -0
- package/dist/collection/components/component-template/zonos-component/zonos-component.css +1 -0
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +1 -0
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +9 -6
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +1 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +1 -0
- package/dist/collection/components/main/zonos-controller.css +1 -0
- package/dist/collection/components/main/zonos-controller.js +18 -16
- package/dist/collection/components/store/checkout/cart.js +1 -1
- package/dist/collection/components/store/checkout/stripe.js +3 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +1 -0
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.css +1 -0
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.css +1 -0
- package/dist/collection/components/utils/api/calculateLandedCost.js +9 -1
- package/dist/collection/components/utils/api/checkItemRestrictions.js +1 -1
- package/dist/collection/components/utils/api/getCountries.js +1 -1
- package/dist/collection/components/utils/api/getCountryLandedCost.js +1 -1
- package/dist/collection/components/utils/api/getExchangeRate.js +1 -1
- package/dist/collection/components/utils/api/getLocaleMessages.js +1 -1
- package/dist/collection/components/utils/api/getLocalization.js +1 -1
- package/dist/collection/components/utils/api/getShippingZones.js +1 -1
- package/dist/collection/components/utils/api/{getZonosSetting.js → getZonosSettings.js} +3 -3
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +22 -0
- package/dist/collection/components/utils/handleFetch.js +19 -1
- package/dist/collection/components/utils/logging/log.js +20 -0
- package/dist/collection/environment.js +11 -10
- package/dist/collection/scripts/zonos.js +53 -0
- package/dist/collection/types/generated/graphql.customer.types.js +89 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +80 -6
- package/dist/components/cart.js +33 -5
- package/dist/components/localization.js +45 -7
- package/dist/components/zonos-address2.js +1 -1
- package/dist/components/zonos-badge2.js +1 -1
- package/dist/components/zonos-banner2.js +1 -1
- package/dist/components/zonos-button2.js +1 -1
- package/dist/components/zonos-card2.js +1 -1
- package/dist/components/zonos-cart-items2.js +1 -1
- package/dist/components/zonos-cart-subtotal2.js +1 -1
- package/dist/components/zonos-checkout-finish2.js +48 -5
- package/dist/components/zonos-checkout-payment2.js +1 -1
- package/dist/components/zonos-checkout.js +3 -1
- package/dist/components/zonos-collapse2.js +1 -1
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +6 -6
- package/dist/components/zonos-country-flag2.js +1 -1
- package/dist/components/zonos-country-select2.js +1 -1
- package/dist/components/zonos-custom-message2.js +1 -1
- package/dist/components/zonos-customer-info2.js +1 -1
- package/dist/components/zonos-dialog2.js +1 -1
- package/dist/components/zonos-hello-dialog-footer2.js +1 -1
- package/dist/components/zonos-hello-dialog2.js +1 -1
- package/dist/components/zonos-hello.js +2 -2
- package/dist/components/zonos-icon2.js +1 -1
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/components/zonos-logo2.js +1 -1
- package/dist/components/zonos-notification2.js +1 -1
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-review2.js +1 -1
- package/dist/components/zonos-shipping-rich-radio2.js +1 -1
- package/dist/components/zonos-shipping2.js +1 -1
- package/dist/components/zonos-spinner2.js +1 -1
- package/dist/components/zonos-text2.js +1 -1
- package/dist/components/zonos-v-stack2.js +1 -1
- package/dist/esm/{cart-cd87f476.js → cart-c5236eec.js} +36 -8
- package/dist/esm/{getBorderRadius-35e8acce.js → getBorderRadius-178a0a05.js} +1 -1
- package/dist/esm/{index-3617e24c.js → index-36ff6342.js} +27 -16
- package/dist/esm/index.js +6 -6
- package/dist/esm/{isDarkColor-44e9e451.js → isDarkColor-416d6047.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{localization-f573428e.js → localization-3cb32a71.js} +46 -8
- package/dist/esm/{submitGtag-75af52be.js → submitGtag-9de4957f.js} +2 -2
- package/dist/esm/zonos-address_2.entry.js +8 -8
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/zonos-banner.entry.js +3 -3
- package/dist/esm/zonos-button_2.entry.js +6 -6
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_10.entry.js +60 -18
- package/dist/esm/zonos-checkout.entry.js +10 -8
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +12 -12
- package/dist/esm/zonos-country-flag_4.entry.js +8 -8
- package/dist/esm/zonos-elements.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-icon.entry.js +3 -3
- package/dist/esm/zonos-notification.entry.js +3 -3
- package/dist/esm/zonos-payment.entry.js +7 -7
- package/dist/esm/zonos-shipping-rich-radio.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +3 -3
- package/dist/esm/{zonosStore-e0b7a5cf.js → zonosStore-61e74f58.js} +1 -1
- package/dist/esm-es5/cart-c5236eec.js +1 -0
- package/dist/esm-es5/{getBorderRadius-35e8acce.js → getBorderRadius-178a0a05.js} +1 -1
- package/dist/esm-es5/index-36ff6342.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-44e9e451.js → isDarkColor-416d6047.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-f573428e.js → localization-3cb32a71.js} +1 -1
- package/dist/esm-es5/{submitGtag-75af52be.js → submitGtag-9de4957f.js} +1 -1
- package/dist/esm-es5/zonos-address_2.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.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_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-icon.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-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-e0b7a5cf.js → zonosStore-61e74f58.js} +1 -1
- package/dist/scripts/loadZonos.js +76 -3
- package/dist/scripts/zonos.js +76 -3
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +5 -1
- package/dist/types/components/store/checkout/stripe.d.ts +1 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/{getZonosSetting.d.ts → getZonosSettings.d.ts} +1 -1
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +5 -0
- package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
- package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
- package/dist/types/scripts/zonos.d.ts +1 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +3 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +254 -7
- package/dist/types/types/generated/graphql.customer.types.ts +310 -7
- package/dist/types/types/generated/graphql.frontend.types.d.ts +210 -11
- package/dist/types/types/generated/graphql.frontend.types.ts +358 -11
- package/dist/types/types/global.d.ts +12 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-07ebdfd9.entry.js +1 -0
- package/dist/zonos-elements/{p-77a7929b.js → p-089ba905.js} +1 -1
- package/dist/zonos-elements/{p-e694312d.entry.js → p-0d536271.entry.js} +1 -1
- package/dist/zonos-elements/p-18904b7c.system.js +2 -0
- package/dist/zonos-elements/p-1d4a970b.entry.js +1 -0
- package/dist/zonos-elements/{p-80ba24a8.system.js → p-24eed2a8.system.js} +1 -1
- package/dist/zonos-elements/{p-bec21999.system.js → p-24fbe845.system.js} +1 -1
- package/dist/zonos-elements/p-2801d868.entry.js +1 -0
- package/dist/zonos-elements/p-2f43da39.system.entry.js +1 -0
- package/dist/zonos-elements/p-39013804.entry.js +1 -0
- package/dist/zonos-elements/p-3e70063e.entry.js +1 -0
- package/dist/zonos-elements/p-425996c1.js +1 -0
- package/dist/zonos-elements/p-47390db7.system.entry.js +1 -0
- package/dist/zonos-elements/p-49f09b91.entry.js +1 -0
- package/dist/zonos-elements/p-4d93275c.entry.js +1 -0
- package/dist/zonos-elements/{p-534dcbd4.system.js → p-509eb1de.system.js} +1 -1
- package/dist/zonos-elements/p-510d3aa3.system.entry.js +1 -0
- package/dist/zonos-elements/p-5554ff33.system.entry.js +1 -0
- package/dist/zonos-elements/{p-8bbad467.js → p-55f49f1e.js} +1 -1
- package/dist/zonos-elements/p-560aa686.system.entry.js +1 -0
- package/dist/zonos-elements/p-65749745.system.entry.js +1 -0
- package/dist/zonos-elements/p-67154df2.system.entry.js +1 -0
- package/dist/zonos-elements/p-684ed483.entry.js +1 -0
- package/dist/zonos-elements/p-6a72fc13.entry.js +1 -0
- package/dist/zonos-elements/p-6aa44c88.system.entry.js +1 -0
- package/dist/zonos-elements/{p-0175125e.system.js → p-6d4232a6.system.js} +1 -1
- package/dist/zonos-elements/p-7fdc8b27.system.entry.js +1 -0
- package/dist/zonos-elements/p-83c7c3f4.entry.js +1 -0
- package/dist/zonos-elements/p-89c210d6.entry.js +1 -0
- package/dist/zonos-elements/{p-779621e4.system.js → p-8a8b08e9.system.js} +1 -1
- package/dist/zonos-elements/p-8cefaae6.entry.js +1 -0
- package/dist/zonos-elements/p-938803f4.entry.js +1 -0
- package/dist/zonos-elements/p-956efa27.js +2 -0
- package/dist/zonos-elements/p-a376a37f.entry.js +1 -0
- package/dist/zonos-elements/{p-643eeb24.system.js → p-b85be1ab.system.js} +1 -1
- package/dist/zonos-elements/p-bb24e583.entry.js +1 -0
- package/dist/zonos-elements/{p-1f8b684a.js → p-bbb154a9.js} +1 -1
- package/dist/zonos-elements/p-c9348bb0.system.entry.js +1 -0
- package/dist/zonos-elements/p-d856a200.system.entry.js +1 -0
- package/dist/zonos-elements/{p-754bdfdb.system.js → p-da060b1c.system.js} +1 -1
- package/dist/zonos-elements/p-e06711b8.system.entry.js +1 -0
- package/dist/zonos-elements/p-e100f180.system.entry.js +1 -0
- package/dist/zonos-elements/{p-08298e74.entry.js → p-e1f6ab97.entry.js} +1 -1
- package/dist/zonos-elements/{p-39a5e8e0.js → p-e2c2584c.js} +1 -1
- package/dist/zonos-elements/p-e5ae22a9.system.entry.js +1 -0
- package/dist/zonos-elements/p-e98be2d0.system.entry.js +1 -0
- package/dist/zonos-elements/p-f33e1ffb.system.js +1 -0
- package/dist/zonos-elements/p-f367f2fe.system.entry.js +1 -0
- package/dist/zonos-elements/p-fbfec60c.system.entry.js +1 -0
- package/dist/zonos-elements/p-ff95f098.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +9 -7
- package/dist/esm-es5/cart-cd87f476.js +0 -1
- package/dist/esm-es5/index-3617e24c.js +0 -2
- package/dist/zonos-elements/p-03923a86.system.entry.js +0 -1
- package/dist/zonos-elements/p-1bddc7ca.system.entry.js +0 -1
- package/dist/zonos-elements/p-2228b050.entry.js +0 -1
- package/dist/zonos-elements/p-2466df77.entry.js +0 -1
- package/dist/zonos-elements/p-29b993c2.system.entry.js +0 -1
- package/dist/zonos-elements/p-2a32dc0a.system.entry.js +0 -1
- package/dist/zonos-elements/p-2a666084.entry.js +0 -1
- package/dist/zonos-elements/p-2f1e9192.system.entry.js +0 -1
- package/dist/zonos-elements/p-44ddebe4.system.entry.js +0 -1
- package/dist/zonos-elements/p-4e8b5d86.system.entry.js +0 -1
- package/dist/zonos-elements/p-5a41b5fd.entry.js +0 -1
- package/dist/zonos-elements/p-5d0eceaa.entry.js +0 -1
- package/dist/zonos-elements/p-62ccb686.entry.js +0 -1
- package/dist/zonos-elements/p-660a588b.entry.js +0 -1
- package/dist/zonos-elements/p-6affe5cc.entry.js +0 -1
- package/dist/zonos-elements/p-72ea628d.system.js +0 -1
- package/dist/zonos-elements/p-7a15d841.entry.js +0 -1
- package/dist/zonos-elements/p-7a81ccb5.system.entry.js +0 -1
- package/dist/zonos-elements/p-83d100b8.entry.js +0 -1
- package/dist/zonos-elements/p-8ebc3ca5.system.entry.js +0 -1
- package/dist/zonos-elements/p-9c78d0ca.entry.js +0 -1
- package/dist/zonos-elements/p-9ef86de7.entry.js +0 -1
- package/dist/zonos-elements/p-ab46cee9.system.entry.js +0 -1
- package/dist/zonos-elements/p-b0268bc5.entry.js +0 -1
- package/dist/zonos-elements/p-b4db1620.entry.js +0 -1
- package/dist/zonos-elements/p-bec05c21.system.js +0 -2
- package/dist/zonos-elements/p-c299049e.js +0 -1
- package/dist/zonos-elements/p-cd4f8e13.system.entry.js +0 -1
- package/dist/zonos-elements/p-ceb2cd7b.system.entry.js +0 -1
- package/dist/zonos-elements/p-cf4545ed.system.entry.js +0 -1
- package/dist/zonos-elements/p-cf8aaa17.js +0 -2
- package/dist/zonos-elements/p-dc9b318c.system.entry.js +0 -1
- package/dist/zonos-elements/p-dcf64928.system.entry.js +0 -1
- package/dist/zonos-elements/p-e1de2a1f.js +0 -1
- package/dist/zonos-elements/p-ec26fe57.entry.js +0 -1
- package/dist/zonos-elements/p-f8198015.system.entry.js +0 -1
- package/dist/zonos-elements/p-fcd4fc66.system.entry.js +0 -1
|
@@ -5,7 +5,7 @@ import { g as getBorderRadius } from './getBorderRadius.js';
|
|
|
5
5
|
import { i as isColorVariable } from './isColorVariable.js';
|
|
6
6
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
7
7
|
|
|
8
|
-
const zonosShippingRichRadioCss = ":host{font-family:var(--font-family, Inter), Inter;display:block}: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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--amino-radius-10));border-bottom-left-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--amino-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
|
8
|
+
const zonosShippingRichRadioCss = ":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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--amino-radius-10));border-bottom-left-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--amino-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
|
9
9
|
|
|
10
10
|
const ZonosShippingRichRadio = /*@__PURE__*/ proxyCustomElement(class ZonosShippingRichRadio extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
@@ -9,7 +9,7 @@ import { d as defineCustomElement$3 } from './zonos-shipping-rich-radio2.js';
|
|
|
9
9
|
import { d as defineCustomElement$2 } from './zonos-spinner2.js';
|
|
10
10
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
11
11
|
|
|
12
|
-
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:calc(100% - 10px)}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
12
|
+
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:calc(100% - 10px)}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
13
13
|
|
|
14
14
|
const ZonosShipping = /*@__PURE__*/ proxyCustomElement(class ZonosShipping extends HTMLElement {
|
|
15
15
|
constructor() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as classes } from './classes.js';
|
|
3
3
|
|
|
4
|
-
const zonosSpinnerCss = ":host{font-family:var(--font-family, Inter), Inter;display:block}: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)}:host.black{stroke:var(--amino-spinner-stroke-black)}:host.black circle.track{stroke:var(--amino-spinner-track-black)}:host.white{stroke:var(--amino-spinner-stroke-white)}:host.white circle.track{stroke:var(--amino-spinner-track-white)}:host.info{stroke:var(--amino-blue-600)}:host.info circle.track{stroke:var(--amino-blue-100)}:host.success{stroke:var(--amino-green-600)}:host.success circle.track{stroke:var(--amino-green-100)}:host.danger{stroke:var(--amino-red-600)}:host.danger circle.track{stroke:var(--amino-red-100)}:host.warning{stroke:var(--amino-orange-600)}:host.warning circle.track{stroke:var(--amino-orange-100)}@-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}";
|
|
4
|
+
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)}:host.black{stroke:var(--amino-spinner-stroke-black)}:host.black circle.track{stroke:var(--amino-spinner-track-black)}:host.white{stroke:var(--amino-spinner-stroke-white)}:host.white circle.track{stroke:var(--amino-spinner-track-white)}:host.info{stroke:var(--amino-blue-600)}:host.info circle.track{stroke:var(--amino-blue-100)}:host.success{stroke:var(--amino-green-600)}:host.success circle.track{stroke:var(--amino-green-100)}:host.danger{stroke:var(--amino-red-600)}:host.danger circle.track{stroke:var(--amino-red-100)}:host.warning{stroke:var(--amino-orange-600)}:host.warning circle.track{stroke:var(--amino-orange-100)}@-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}";
|
|
5
5
|
|
|
6
6
|
const ZonosSpinner = /*@__PURE__*/ proxyCustomElement(class ZonosSpinner extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -102,7 +102,7 @@ const textOptions = {
|
|
|
102
102
|
},
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
const zonosTextCss = ":host{font-family:var(--font-family, Inter), Inter;display:block}: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{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--amino-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--amino-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--amino-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--amino-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--amino-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--amino-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--amino-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";
|
|
105
|
+
const zonosTextCss = ":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{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--amino-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--amino-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--amino-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--amino-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--amino-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--amino-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--amino-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";
|
|
106
106
|
|
|
107
107
|
const ZonosText = /*@__PURE__*/ proxyCustomElement(class ZonosText extends HTMLElement {
|
|
108
108
|
constructor() {
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore.js';
|
|
3
3
|
import { c as classes } from './classes.js';
|
|
4
4
|
|
|
5
|
-
const zonosVStackCss = ":host{font-family:var(--font-family, Inter), Inter;display:block}: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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";
|
|
5
|
+
const zonosVStackCss = ":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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";
|
|
6
6
|
|
|
7
7
|
const VStack = /*@__PURE__*/ proxyCustomElement(class VStack extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as handleFetch, l as log, a as localizationStore, b as logError, t as translate } from './localization-
|
|
3
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
1
|
+
import { z as zonosStore, c as createStore } from './zonosStore-61e74f58.js';
|
|
2
|
+
import { h as handleFetch, l as log, a as localizationStore, b as logError, t as translate } from './localization-3cb32a71.js';
|
|
3
|
+
import { i as isDarkColor } from './isDarkColor-416d6047.js';
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-178a0a05.js';
|
|
5
5
|
|
|
6
6
|
const prepCalculateLandedCost = () => {
|
|
7
7
|
// maybe we don't need email now for prefetch the landed cost
|
|
@@ -32,9 +32,36 @@ const prepCalculateLandedCost = () => {
|
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
const triggerBuildLandedCost = async (buildLandedCost) => {
|
|
36
|
+
var _a;
|
|
37
|
+
const data = prepCalculateLandedCost();
|
|
38
|
+
const landedCost = await buildLandedCost(data.checkoutSessionId, data.contact, data.shippingAddress);
|
|
39
|
+
if (!landedCost) {
|
|
40
|
+
throw new Error('Failed to build landed cost');
|
|
41
|
+
}
|
|
42
|
+
// Validate the landed cost object to make sure the returned value from buildLandedCost has a valid schema
|
|
43
|
+
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/validate-landed-cost`, {
|
|
44
|
+
body: landedCost,
|
|
45
|
+
headers: {
|
|
46
|
+
'Content-Type': 'application/json',
|
|
47
|
+
},
|
|
48
|
+
method: 'POST',
|
|
49
|
+
});
|
|
50
|
+
if (!json || errors.length) {
|
|
51
|
+
throw new Error(`Invalid landed cost object: ${((_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message) || 'Unknown error'}`);
|
|
52
|
+
}
|
|
53
|
+
return landedCost;
|
|
54
|
+
};
|
|
55
|
+
|
|
35
56
|
const calculateLandedCost = async (abortController) => {
|
|
57
|
+
// If buildLandedCost callback is supplied, use that instead of our regular request to '/calculate-landed-cost'
|
|
58
|
+
const buildLandedCost = zonosStore.checkoutSettings.buildLandedCost;
|
|
59
|
+
if (buildLandedCost) {
|
|
60
|
+
const json = await triggerBuildLandedCost(buildLandedCost);
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
36
63
|
// request to get landed cost info
|
|
37
|
-
const url = `${"https://v1.route.js.zonos.com"}/api/calculate-landed-cost`;
|
|
64
|
+
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/calculate-landed-cost`;
|
|
38
65
|
const { errors, json } = await handleFetch(url, {
|
|
39
66
|
body: prepCalculateLandedCost(),
|
|
40
67
|
method: 'POST',
|
|
@@ -89,6 +116,7 @@ const { onChange: onChange$1, reset: reset$1, state: stripeStore, } = createStor
|
|
|
89
116
|
stripeAddressElement: null,
|
|
90
117
|
stripeAddressEventData: null,
|
|
91
118
|
stripeAddressUsedWhenFetchingLC: null,
|
|
119
|
+
stripeBillingAddressElement: null,
|
|
92
120
|
stripeElements: null,
|
|
93
121
|
stripeElementsOptions: null,
|
|
94
122
|
stripeLinkElement: null,
|
|
@@ -334,7 +362,7 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
334
362
|
return false;
|
|
335
363
|
}
|
|
336
364
|
stripeStore.isFetchingSession = true;
|
|
337
|
-
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/create-checkout-session`, {
|
|
365
|
+
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/create-checkout-session`, {
|
|
338
366
|
body: {
|
|
339
367
|
currency: ((_a = cartStore.items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode) || '',
|
|
340
368
|
itemsAmount: total,
|
|
@@ -362,7 +390,7 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
362
390
|
const stripeStoreUpdateCheckoutSession = async ({ currency, id, itemsAmount, landedCostId, presentmentCountryCode, }) => {
|
|
363
391
|
// No need to set loading state here because this function will be called under the hood to update
|
|
364
392
|
// landed cost id for the section.
|
|
365
|
-
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/update-checkout-session`, {
|
|
393
|
+
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/update-checkout-session`, {
|
|
366
394
|
body: {
|
|
367
395
|
currency,
|
|
368
396
|
id,
|
|
@@ -474,7 +502,7 @@ const cartStoreReCalculateTotal = async ({ currency, itemsAmount, landedCostId,
|
|
|
474
502
|
}
|
|
475
503
|
// update checkout session
|
|
476
504
|
if (!cartStore.checkoutSessionId) {
|
|
477
|
-
logError('Could update cart total without checkout session id');
|
|
505
|
+
logError('Could not update cart total without checkout session id');
|
|
478
506
|
return false;
|
|
479
507
|
}
|
|
480
508
|
const { json } = await stripeStoreUpdateCheckoutSession({
|
|
@@ -633,6 +633,9 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
+
// This needs to always happen so we can hide nodes that are projected
|
|
637
|
+
// to another component but don't end up in a slot
|
|
638
|
+
elm['s-hn'] = hostTagName;
|
|
636
639
|
return elm;
|
|
637
640
|
};
|
|
638
641
|
/**
|
|
@@ -757,8 +760,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
757
760
|
* @param oldCh the old children of the parent node
|
|
758
761
|
* @param newVNode the new VNode which will replace the parent
|
|
759
762
|
* @param newCh the new children of the parent node
|
|
763
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
760
764
|
*/
|
|
761
|
-
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
765
|
+
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
762
766
|
let oldStartIdx = 0;
|
|
763
767
|
let newStartIdx = 0;
|
|
764
768
|
let idxInOld = 0;
|
|
@@ -785,25 +789,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
785
789
|
else if (newEndVnode == null) {
|
|
786
790
|
newEndVnode = newCh[--newEndIdx];
|
|
787
791
|
}
|
|
788
|
-
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
792
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
789
793
|
// if the start nodes are the same then we should patch the new VNode
|
|
790
794
|
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
791
795
|
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
792
796
|
// since things are matched up in order.
|
|
793
|
-
patch(oldStartVnode, newStartVnode);
|
|
797
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
794
798
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
795
799
|
newStartVnode = newCh[++newStartIdx];
|
|
796
800
|
}
|
|
797
|
-
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
801
|
+
else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
798
802
|
// likewise, if the end nodes are the same we patch new onto old and
|
|
799
803
|
// decrement our end indices, and also likewise in this case we don't
|
|
800
804
|
// need to move any DOM Nodes.
|
|
801
|
-
patch(oldEndVnode, newEndVnode);
|
|
805
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
802
806
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
803
807
|
newEndVnode = newCh[--newEndIdx];
|
|
804
808
|
}
|
|
805
|
-
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
806
|
-
patch(oldStartVnode, newEndVnode);
|
|
809
|
+
else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
810
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
807
811
|
// We need to move the element for `oldStartVnode` into a position which
|
|
808
812
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
809
813
|
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
@@ -825,8 +829,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
825
829
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
826
830
|
newEndVnode = newCh[--newEndIdx];
|
|
827
831
|
}
|
|
828
|
-
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
829
|
-
patch(oldEndVnode, newStartVnode);
|
|
832
|
+
else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
833
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
830
834
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
831
835
|
// the same node, so since we're here we know that they are not. Thus we
|
|
832
836
|
// can move the element for `oldEndVnode` _before_ the element for
|
|
@@ -863,7 +867,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
863
867
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
864
868
|
}
|
|
865
869
|
else {
|
|
866
|
-
patch(elmToMove, newStartVnode);
|
|
870
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
867
871
|
// invalidate the matching old node so that we won't try to update it
|
|
868
872
|
// again later on
|
|
869
873
|
oldCh[idxInOld] = undefined;
|
|
@@ -914,16 +918,22 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
914
918
|
*
|
|
915
919
|
* @param leftVNode the first VNode to check
|
|
916
920
|
* @param rightVNode the second VNode to check
|
|
921
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
917
922
|
* @returns whether they're equal or not
|
|
918
923
|
*/
|
|
919
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
924
|
+
const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
920
925
|
// compare if two vnode to see if they're "technically" the same
|
|
921
926
|
// need to have the same element tag, and same key to be the same
|
|
922
927
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
923
|
-
// this will be set if
|
|
924
|
-
|
|
928
|
+
// this will be set if JSX tags in the build have `key` attrs set on them
|
|
929
|
+
// we only want to check this if we're not on the first render since on
|
|
930
|
+
// first render `leftVNode.$key$` will always be `null`, so we can be led
|
|
931
|
+
// astray and, for instance, accidentally delete a DOM node that we want to
|
|
932
|
+
// keep around.
|
|
933
|
+
if (!isInitialRender) {
|
|
925
934
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
926
935
|
}
|
|
936
|
+
return true;
|
|
927
937
|
}
|
|
928
938
|
return false;
|
|
929
939
|
};
|
|
@@ -934,8 +944,9 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
934
944
|
*
|
|
935
945
|
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
936
946
|
* @param newVNode a new VNode representing an updated version of the old one
|
|
947
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
937
948
|
*/
|
|
938
|
-
const patch = (oldVNode, newVNode) => {
|
|
949
|
+
const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
939
950
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
940
951
|
const oldChildren = oldVNode.$children$;
|
|
941
952
|
const newChildren = newVNode.$children$;
|
|
@@ -960,7 +971,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
960
971
|
if (oldChildren !== null && newChildren !== null) {
|
|
961
972
|
// looks like there's child vnodes for both the old and new vnodes
|
|
962
973
|
// so we need to call `updateChildren` to reconcile them
|
|
963
|
-
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
974
|
+
updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
|
|
964
975
|
}
|
|
965
976
|
else if (newChildren !== null) {
|
|
966
977
|
// no old child vnodes, but there are new child vnodes to add
|
|
@@ -1050,7 +1061,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1050
1061
|
scopeId = hostElm['s-sc'];
|
|
1051
1062
|
}
|
|
1052
1063
|
// synchronous patch
|
|
1053
|
-
patch(oldVNode, rootVnode);
|
|
1064
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1054
1065
|
};
|
|
1055
1066
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1056
1067
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as cartStore, a as cartStoreApplySubtotals, b as cartStoreGetShippingTransitInfo, d as cartStoreNextStep, e as cartStorePreviousStep, f as cartStoreReCalculateTotal, g as cartStoreReset, h as cartStoreUpdateItems, i as cartStoreUpdateSelectedShippingOption, j as cartStoreUpdateToErrorState } from './cart-
|
|
2
|
-
import './zonosStore-
|
|
3
|
-
import './index-
|
|
4
|
-
import './localization-
|
|
5
|
-
import './isDarkColor-
|
|
6
|
-
import './getBorderRadius-
|
|
1
|
+
export { c as cartStore, a as cartStoreApplySubtotals, b as cartStoreGetShippingTransitInfo, d as cartStoreNextStep, e as cartStorePreviousStep, f as cartStoreReCalculateTotal, g as cartStoreReset, h as cartStoreUpdateItems, i as cartStoreUpdateSelectedShippingOption, j as cartStoreUpdateToErrorState } from './cart-c5236eec.js';
|
|
2
|
+
import './zonosStore-61e74f58.js';
|
|
3
|
+
import './index-36ff6342.js';
|
|
4
|
+
import './localization-3cb32a71.js';
|
|
5
|
+
import './isDarkColor-416d6047.js';
|
|
6
|
+
import './getBorderRadius-178a0a05.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createCommonjsModule, b as commonjsGlobal } from './zonosStore-
|
|
1
|
+
import { a as createCommonjsModule, b as commonjsGlobal } from './zonosStore-61e74f58.js';
|
|
2
2
|
|
|
3
3
|
var tinycolor = createCommonjsModule(function (module, exports) {
|
|
4
4
|
// This file is autogenerated. It's used to publish CJS to npm.
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-36ff6342.js';
|
|
2
|
+
export { s as setNonce } from './index-36ff6342.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy([["zonos-text",[[1,"zonos-text",{"class":[1],"color":[1],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-country-flag_4",[[1,"zonos-country-select",{"closeCountrySelect":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[1,"zonos-country-flag",{"class":[1],"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"class":[1],"notificationArray":[32],"showNotification":[64]}]]],["zonos-badge",[[1,"zonos-badge",{"bold":[4],"color":[1],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"class":[1]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-address_2",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"class":[1],"hasContent":[32]}]]],["zonos-card_2",[[1,"zonos-card",{"actions":[16],"class":[1],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}],[1,"zonos-v-stack",{"spacing":[2],"class":[1]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"color":[1],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"zonos-button",{"class":[1],"color":[1],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"color":[1]}]]],["zonos-cart-items_10",[[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32]}],[1,"zonos-logo",{"theme":[1],"width":[1],"class":[1]}]]]], options);
|
|
6
|
+
return bootstrapLazy([["zonos-text",[[1,"zonos-text",{"class":[1],"color":[1],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-country-flag_4",[[1,"zonos-country-select",{"closeCountrySelect":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[1,"zonos-country-flag",{"class":[1],"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"class":[1],"notificationArray":[32],"showNotification":[64]}]]],["zonos-badge",[[1,"zonos-badge",{"bold":[4],"color":[1],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"class":[1]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-address_2",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"class":[1],"hasContent":[32]}]]],["zonos-card_2",[[1,"zonos-card",{"actions":[16],"class":[1],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}],[1,"zonos-v-stack",{"spacing":[2],"class":[1]}]]],["zonos-icon",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"color":[1],"content":[1],"size":[2]}]]],["zonos-button_2",[[1,"zonos-button",{"class":[1],"color":[1],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"color":[1]}]]],["zonos-cart-items_10",[[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32]}],[1,"zonos-logo",{"theme":[1],"width":[1],"class":[1]}]]]], options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-61e74f58.js';
|
|
2
2
|
|
|
3
3
|
const stringsArabic = {
|
|
4
4
|
'Above de minimis threshold for': {
|
|
@@ -3161,20 +3161,38 @@ const handleRequest = async (url, options) => {
|
|
|
3161
3161
|
};
|
|
3162
3162
|
}
|
|
3163
3163
|
};
|
|
3164
|
+
function encodeString(text) {
|
|
3165
|
+
try {
|
|
3166
|
+
// encode the string, remove the "=" at the end of the encoded string
|
|
3167
|
+
const encodedString = btoa(text).replace(/=/g, '');
|
|
3168
|
+
return encodedString;
|
|
3169
|
+
}
|
|
3170
|
+
catch (error) {
|
|
3171
|
+
// return the reverse string if the encoding failed
|
|
3172
|
+
return text
|
|
3173
|
+
.replace(/[^A-Za-z0-9]/g, '')
|
|
3174
|
+
.split('')
|
|
3175
|
+
.reverse()
|
|
3176
|
+
.join('');
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3164
3179
|
const handleFetch = async (url, _opts) => {
|
|
3165
3180
|
const opts = __rest(_opts || {}, []);
|
|
3166
3181
|
const body = opts.body ? JSON.stringify(opts.body) : undefined;
|
|
3167
3182
|
const method = opts.method || 'GET';
|
|
3183
|
+
// adding random encoded token to the url so that the request will be cached differently for each store
|
|
3184
|
+
const modifiedUrl = new URL(url);
|
|
3185
|
+
modifiedUrl.searchParams.set('zToken', encodeString(window.location.hostname));
|
|
3168
3186
|
// headers content type
|
|
3169
3187
|
const headers = Object.assign({ 'Content-Type': 'application/json', 'Zonos-Is-BigCommerce': window.Zonos.isBigCommerce.toString(), 'Zonos-Referer': window.location.hostname, 'Zonos-Version': window.Zonos.version, credentialtoken: window.Zonos.zonosApiKey }, opts.headers);
|
|
3170
3188
|
const options = Object.assign(Object.assign({}, opts), { body: method === 'GET' ? undefined : body, headers,
|
|
3171
3189
|
method });
|
|
3172
|
-
return handleRequest(
|
|
3190
|
+
return handleRequest(modifiedUrl.toString(), options);
|
|
3173
3191
|
};
|
|
3174
3192
|
|
|
3175
3193
|
const getCountries = async () => {
|
|
3176
3194
|
try {
|
|
3177
|
-
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/get-countries`, {
|
|
3195
|
+
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/get-countries`, {
|
|
3178
3196
|
method: 'GET',
|
|
3179
3197
|
});
|
|
3180
3198
|
if (errors.length || !json) {
|
|
@@ -3197,7 +3215,7 @@ const getCountryLandedCost = async (countryCode) => {
|
|
|
3197
3215
|
if (!countryCode) {
|
|
3198
3216
|
return null;
|
|
3199
3217
|
}
|
|
3200
|
-
const url = `${"https://v1.route.js.zonos.com"}/api/country-landed-cost/${countryCode}`;
|
|
3218
|
+
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/country-landed-cost/${countryCode}`;
|
|
3201
3219
|
const { errors, json } = await handleFetch(url);
|
|
3202
3220
|
if (errors.length || !json) {
|
|
3203
3221
|
logError(`Error fetching country landed cost: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
|
|
@@ -3212,7 +3230,7 @@ const getExchangeRate = async ({ country, isGuaranteed, sourceCurrency, targetCu
|
|
|
3212
3230
|
if (sourceCurrency === targetCurrency && !isGuaranteed) {
|
|
3213
3231
|
return { exchangeRate: null, maxAge: null };
|
|
3214
3232
|
}
|
|
3215
|
-
const url = `${"https://v1.route.js.zonos.com"}/api/exchange-rates?sourceCurrency=${sourceCurrency}&targetCurrency=${targetCurrency}&isGuaranteed=${isGuaranteed}&country=${country}
|
|
3233
|
+
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/exchange-rates?sourceCurrency=${sourceCurrency}&targetCurrency=${targetCurrency}&isGuaranteed=${isGuaranteed}&country=${country}`;
|
|
3216
3234
|
const { errors, json } = await handleFetch(url);
|
|
3217
3235
|
if (errors.length || !json) {
|
|
3218
3236
|
logError(`Error fetching country landed cost: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
|
|
@@ -3229,7 +3247,7 @@ const getExchangeRate = async ({ country, isGuaranteed, sourceCurrency, targetCu
|
|
|
3229
3247
|
|
|
3230
3248
|
const getLocaleMessages = async ({ countryCode, localeTo, storeId, }) => {
|
|
3231
3249
|
var _a;
|
|
3232
|
-
const url = `${"https://v1.route.js.zonos.com"}/api/locale-messages?countryCode=${countryCode}&storeId=${storeId}&localeTo=${localeTo}`;
|
|
3250
|
+
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/locale-messages?countryCode=${countryCode}&storeId=${storeId}&localeTo=${localeTo}`;
|
|
3233
3251
|
const { errors, json } = await handleFetch(url);
|
|
3234
3252
|
if (errors.length || !json) {
|
|
3235
3253
|
// eslint-disable-next-line no-console
|
|
@@ -3251,7 +3269,7 @@ const getLocalization = async () => {
|
|
|
3251
3269
|
// load and use country from session storage when zCountry query param is not present
|
|
3252
3270
|
const countryLoadedSession = window.sessionStorage.getItem('zonos--country');
|
|
3253
3271
|
const zCountry = getZCountryUrlParam(currentUrl.searchParams) || countryLoadedSession;
|
|
3254
|
-
const localizationUrl = new URL(`${"https://v1.route.js.zonos.com"}/api/localization`);
|
|
3272
|
+
const localizationUrl = new URL(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/localization`);
|
|
3255
3273
|
if (zCountry) {
|
|
3256
3274
|
localizationUrl.searchParams.set('zCountry', zCountry);
|
|
3257
3275
|
}
|
|
@@ -3274,7 +3292,7 @@ const getLocalization = async () => {
|
|
|
3274
3292
|
|
|
3275
3293
|
const getShippingZones = async () => {
|
|
3276
3294
|
var _a, _b;
|
|
3277
|
-
const url = `${"https://v1.route.js.zonos.com"}/api/shipping-zones`;
|
|
3295
|
+
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/shipping-zones`;
|
|
3278
3296
|
const { errors, json } = await handleFetch(url);
|
|
3279
3297
|
if (errors.length || !json) {
|
|
3280
3298
|
logError(`Error fetching shipping zones: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
|
|
@@ -3352,10 +3370,30 @@ const isValidSelector = (selector) => {
|
|
|
3352
3370
|
};
|
|
3353
3371
|
|
|
3354
3372
|
const log = (message, type, ...additionalInfo) => {
|
|
3373
|
+
var _a;
|
|
3355
3374
|
// if type is error and debug is false, do not log
|
|
3356
3375
|
if (!window.Zonos.debug) {
|
|
3357
3376
|
return;
|
|
3358
3377
|
}
|
|
3378
|
+
let loggingIframe = document.querySelector('iframe#zonos---debug-logging-iframe');
|
|
3379
|
+
if (!loggingIframe) {
|
|
3380
|
+
// add a hidden iframe
|
|
3381
|
+
loggingIframe = document.createElement('iframe');
|
|
3382
|
+
loggingIframe.id = 'zonos---debug-logging-iframe';
|
|
3383
|
+
loggingIframe.style.display = 'none';
|
|
3384
|
+
loggingIframe.style.opacity = '0';
|
|
3385
|
+
loggingIframe.style.position = 'absolute';
|
|
3386
|
+
loggingIframe.style.top = '-9999px';
|
|
3387
|
+
loggingIframe.style.left = '-9999px';
|
|
3388
|
+
loggingIframe.style.width = '1px';
|
|
3389
|
+
loggingIframe.style.height = '1px';
|
|
3390
|
+
loggingIframe.style.border = 'none';
|
|
3391
|
+
loggingIframe.style.overflow = 'hidden';
|
|
3392
|
+
loggingIframe.style.visibility = 'hidden';
|
|
3393
|
+
document.body.appendChild(loggingIframe);
|
|
3394
|
+
}
|
|
3395
|
+
// use the logging iframe's console to log just in case the console is disabled (overriden) by the site owner
|
|
3396
|
+
const console = ((_a = loggingIframe.contentWindow) === null || _a === void 0 ? void 0 : _a.window.console) || window.console;
|
|
3359
3397
|
switch (type) {
|
|
3360
3398
|
case 'warn':
|
|
3361
3399
|
// eslint-disable-next-line no-console
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as zonosStore } from './zonosStore-
|
|
2
|
-
import { l as log } from './localization-
|
|
1
|
+
import { z as zonosStore } from './zonosStore-61e74f58.js';
|
|
2
|
+
import { l as log } from './localization-3cb32a71.js';
|
|
3
3
|
|
|
4
4
|
const checkoutBreakpoint = 890;
|
|
5
5
|
const isCheckoutMobile = (isMobile) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, d as getElement } from './index-
|
|
2
|
-
import { s as stripeStore, m as stripeStorePrefetchLandedCost } from './cart-
|
|
3
|
-
import { b as logError, a as localizationStore } from './localization-
|
|
4
|
-
import './zonosStore-
|
|
5
|
-
import './isDarkColor-
|
|
6
|
-
import './getBorderRadius-
|
|
1
|
+
import { r as registerInstance, h, H as Host, d as getElement } from './index-36ff6342.js';
|
|
2
|
+
import { s as stripeStore, m as stripeStorePrefetchLandedCost } from './cart-c5236eec.js';
|
|
3
|
+
import { b as logError, a as localizationStore } from './localization-3cb32a71.js';
|
|
4
|
+
import './zonosStore-61e74f58.js';
|
|
5
|
+
import './isDarkColor-416d6047.js';
|
|
6
|
+
import './getBorderRadius-178a0a05.js';
|
|
7
7
|
|
|
8
|
-
const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}";
|
|
8
|
+
const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}";
|
|
9
9
|
|
|
10
10
|
const ZonosAddress = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -77,7 +77,7 @@ const ZonosAddress = class {
|
|
|
77
77
|
};
|
|
78
78
|
ZonosAddress.style = zonosAddressCss;
|
|
79
79
|
|
|
80
|
-
const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";
|
|
80
|
+
const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";
|
|
81
81
|
|
|
82
82
|
const ZonosLinkAuthentication = class {
|
|
83
83
|
constructor(hostRef) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { e as zonosStoreFontFamily } from './zonosStore-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
|
|
2
|
+
import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
|
|
5
|
-
const zonosBadgeCss = ":host{font-family:var(--font-family, Inter), Inter;display:block}: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 .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";
|
|
5
|
+
const zonosBadgeCss = ":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 .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";
|
|
6
6
|
|
|
7
7
|
const ZonosBadge = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { e as zonosStoreFontFamily } from './zonosStore-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-36ff6342.js';
|
|
2
|
+
import { e as zonosStoreFontFamily } from './zonosStore-61e74f58.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
|
|
5
|
-
const zonosBannerCss = ":host{font-family:var(--font-family, Inter), Inter;display:block}: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{border-radius:var(--amino-radius-10);padding:var(--amino-space-16);background:var(--amino-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:\"icon header\" \". content\";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:var(--amino-space-0);grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:var(--amino-space-4)}:host(.info){background-color:var(--amino-blue-100);border:1px solid var(--amino-blue-200)}:host(.success){background-color:var(--amino-green-100);border:1px solid var(--amino-green-200)}:host(.error){background-color:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host(.warning){background-color:var(--amino-orange-100);border:1px solid var(--amino-orange-200)}";
|
|
5
|
+
const zonosBannerCss = ":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{border-radius:var(--amino-radius-10);padding:var(--amino-space-16);background:var(--amino-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:\"icon header\" \". content\";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:var(--amino-space-0);grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:var(--amino-space-4)}:host(.info){background-color:var(--amino-blue-100);border:1px solid var(--amino-blue-200)}:host(.success){background-color:var(--amino-green-100);border:1px solid var(--amino-green-200)}:host(.error){background-color:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host(.warning){background-color:var(--amino-orange-100);border:1px solid var(--amino-orange-200)}";
|
|
6
6
|
|
|
7
7
|
const ZonosBanner = class {
|
|
8
8
|
constructor(hostRef) {
|