@zonos/elements 1.3.4 → 1.3.5
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-f31374d4.js → cart-c1b0915c.js} +15 -4
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/isCheckoutMobile-f491ca7c.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-42f29b3a.js → submitGtag-bd6e9b42.js} +0 -6
- package/dist/cjs/zonos-address_2.cjs.entry.js +57 -27
- package/dist/cjs/zonos-button_2.cjs.entry.js +15 -11
- package/dist/cjs/zonos-card_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +20 -19
- package/dist/cjs/zonos-checkout.cjs.entry.js +16 -18
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +6 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +9 -12
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +7 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +2 -2
- package/dist/collection/components/common/zonos-button/zonos-button.css +2 -2
- package/dist/collection/components/common/zonos-button/zonos-button.js +13 -9
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +1 -1
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.css +41 -35
- 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 +2 -2
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +3 -1
- package/dist/collection/components/store/checkout/stripe.js +8 -3
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +57 -26
- 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/api/calculateLandedCost.js +6 -1
- package/dist/components/cart.js +15 -4
- package/dist/components/isCheckoutMobile.js +6 -0
- package/dist/components/zonos-address2.js +57 -26
- package/dist/components/zonos-button2.js +14 -10
- package/dist/components/zonos-checkout-payment2.js +3 -3
- package/dist/components/zonos-checkout.js +12 -14
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +1 -1
- package/dist/components/zonos-custom-message2.js +1 -1
- package/dist/components/zonos-customer-info2.js +3 -3
- package/dist/components/zonos-dialog2.js +3 -3
- package/dist/components/zonos-hello-dialog-footer2.js +2 -2
- package/dist/components/zonos-hello-dialog2.js +2 -2
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/components/zonos-logo2.js +2 -2
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-review2.js +3 -7
- package/dist/components/zonos-shipping2.js +3 -3
- package/dist/components/zonos-spinner2.js +1 -1
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/esm/{cart-c9124cc3.js → cart-7e7c7585.js} +15 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-a7d07aec.js → submitGtag-776c5e10.js} +1 -6
- package/dist/esm/zonos-address_2.entry.js +57 -27
- package/dist/esm/zonos-button_2.entry.js +15 -11
- package/dist/esm/zonos-card_2.entry.js +2 -2
- package/dist/esm/zonos-cart-items_10.entry.js +18 -17
- package/dist/esm/zonos-checkout.entry.js +13 -15
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag_4.entry.js +3 -3
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-payment.entry.js +2 -2
- package/dist/esm-es5/cart-7e7c7585.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-776c5e10.js +1 -0
- package/dist/esm-es5/zonos-address_2.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-payment.entry.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/store/checkout/stripe.d.ts +1 -0
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +5 -0
- package/dist/types/components/utils/checkout/isCheckoutMobile.d.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-09c5dc1b.system.entry.js +1 -0
- package/dist/zonos-elements/p-1156ae5d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7cae86a0.system.entry.js → p-120df5be.system.entry.js} +1 -1
- package/dist/zonos-elements/p-174239da.system.js +1 -0
- package/dist/zonos-elements/{p-f7b1dfd0.system.entry.js → p-18e09138.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2589a038.system.entry.js +1 -0
- package/dist/zonos-elements/{p-ffc91e42.entry.js → p-31fa76da.entry.js} +1 -1
- package/dist/zonos-elements/{p-afed9236.entry.js → p-3319e4db.entry.js} +1 -1
- package/dist/zonos-elements/{p-9f3cad08.entry.js → p-357f0c61.entry.js} +1 -1
- package/dist/zonos-elements/{p-c134eecd.system.js → p-4d0861e9.system.js} +1 -1
- package/dist/zonos-elements/p-54ef8ff3.entry.js +1 -0
- package/dist/zonos-elements/{p-eb96f893.system.entry.js → p-626b5a52.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6444a4b9.entry.js +1 -0
- package/dist/zonos-elements/{p-26edde4d.system.entry.js → p-65f4af1a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-661bc488.entry.js +1 -0
- package/dist/zonos-elements/p-6c47083f.entry.js +1 -0
- package/dist/zonos-elements/p-6d454281.entry.js +1 -0
- package/dist/zonos-elements/p-78886ed6.system.entry.js +1 -0
- package/dist/zonos-elements/p-81a54668.js +1 -0
- package/dist/zonos-elements/{p-5d91e45c.entry.js → p-aca66e4b.entry.js} +1 -1
- package/dist/zonos-elements/p-aed0098c.system.js +1 -0
- package/dist/zonos-elements/p-af910392.js +1 -0
- package/dist/zonos-elements/p-b035f9e5.system.js +1 -1
- package/dist/zonos-elements/{p-43220d68.entry.js → p-b58d2231.entry.js} +1 -1
- package/dist/zonos-elements/p-cfe4a318.js +1 -0
- package/dist/zonos-elements/p-e4a2a1b0.system.entry.js +1 -0
- package/dist/zonos-elements/p-ead79548.system.js +1 -0
- package/dist/zonos-elements/{p-62851827.system.entry.js → p-eb631432.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-c9124cc3.js +0 -1
- package/dist/esm-es5/submitGtag-a7d07aec.js +0 -1
- package/dist/zonos-elements/p-139fc767.entry.js +0 -1
- package/dist/zonos-elements/p-2ac66cea.system.entry.js +0 -1
- package/dist/zonos-elements/p-39d12bf0.entry.js +0 -1
- package/dist/zonos-elements/p-3d965e88.entry.js +0 -1
- package/dist/zonos-elements/p-51a40ddf.system.js +0 -1
- package/dist/zonos-elements/p-741a1402.system.entry.js +0 -1
- package/dist/zonos-elements/p-83bb8727.system.entry.js +0 -1
- package/dist/zonos-elements/p-97e659b7.entry.js +0 -1
- package/dist/zonos-elements/p-b494d540.entry.js +0 -1
- package/dist/zonos-elements/p-b87fa3a1.js +0 -1
- package/dist/zonos-elements/p-d170748c.system.entry.js +0 -1
- package/dist/zonos-elements/p-e59b6648.js +0 -1
- package/dist/zonos-elements/p-ee8b44c0.system.js +0 -1
- package/dist/zonos-elements/p-efd1544b.system.entry.js +0 -1
|
@@ -20,7 +20,7 @@ const getButtonTheme = (overrideBackground) => {
|
|
|
20
20
|
return buttonTheme;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
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}: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));}: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(--amino-gray-200)}:host button[disabled] .zonos--spinner-wrapper{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)}: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)}:host button:not(.override-background).subtle:not([disabled]):hover{background: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)}";
|
|
23
|
+
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}: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));}: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)}: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)}:host button:not(.override-background).subtle:not([disabled]):hover{background: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)}";
|
|
24
24
|
const ZonosButtonStyle0 = zonosButtonCss;
|
|
25
25
|
|
|
26
26
|
const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends HTMLElement {
|
|
@@ -68,35 +68,39 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
|
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
70
|
const disabled = this.loading || this.isDisabled;
|
|
71
|
+
/**
|
|
72
|
+
* If the parent component pass in the variant prop with `undefined` value, it would not re-assign the `undefined` value with the default value.
|
|
73
|
+
* So need to re-assign the variant prop with the default value if the value is `undefined` here.
|
|
74
|
+
*/
|
|
75
|
+
const variant = this.variant || 'standard';
|
|
71
76
|
const color = this.color && isColorVariable(this.color)
|
|
72
77
|
? `var(--amino-${this.color})`
|
|
73
78
|
: this.color;
|
|
74
79
|
// use override background if it exists, otherwise use color from setting
|
|
75
80
|
const overrideBackground = this.backgroundColor || zonosStore.appearance.colorSecondary;
|
|
76
81
|
// only set theme for button to change text color if variant is standard and override background is set
|
|
77
|
-
const buttonTheme =
|
|
78
|
-
? getButtonTheme(overrideBackground)
|
|
79
|
-
: undefined;
|
|
82
|
+
const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
|
|
80
83
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
81
|
-
|
|
84
|
+
const spinnerColor = buttonTheme === 'LIGHT' ? 'white' : 'black';
|
|
85
|
+
return (h(Host, { key: 'e1ad2eb31ad09c8671debc2e32d83af21085b912', class: classes(['zonos--elements', this.class]), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
|
|
82
86
|
'--background-color': overrideBackground,
|
|
83
87
|
'--border-radius': borderStyle,
|
|
84
88
|
'--color': color,
|
|
85
89
|
'--font-family': zonosStoreFontFamily(),
|
|
86
|
-
} }, h("button", { key: '
|
|
90
|
+
} }, h("button", { key: '0a087bf98251899711a71d69a89473479fc78c4f', class: classes([
|
|
87
91
|
this.hasIcon && 'has-icon',
|
|
88
92
|
this.hasContent && 'has-content',
|
|
89
93
|
this.noBackground && 'no-background',
|
|
90
94
|
this.noPaddingLeft && 'no-padding-left',
|
|
91
95
|
this.noPaddingRight && 'no-padding-right',
|
|
92
96
|
this.iconRight && 'icon-right',
|
|
93
|
-
|
|
97
|
+
variant,
|
|
94
98
|
this.size,
|
|
95
99
|
// only override background if variant is set to standard
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
overrideBackground &&
|
|
101
|
+
variant === 'standard' &&
|
|
98
102
|
'override-background',
|
|
99
|
-
]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { size: 16 }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '
|
|
103
|
+
]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { color: spinnerColor, size: 16 }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'd80e58786f16bff52592a759679290a3a5ed0954', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
100
104
|
}
|
|
101
105
|
static get watchers() { return {
|
|
102
106
|
"icon": ["iconChangeHandler"]
|
|
@@ -9,7 +9,7 @@ import { d as defineCustomElement$3 } from './zonos-payment2.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 zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:
|
|
12
|
+
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}";
|
|
13
13
|
const ZonosCheckoutPaymentStyle0 = zonosCheckoutPaymentCss;
|
|
14
14
|
|
|
15
15
|
const ZonosCheckoutPayment = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutPayment extends HTMLElement {
|
|
@@ -41,12 +41,12 @@ const ZonosCheckoutPayment = /*@__PURE__*/ proxyCustomElement(class ZonosCheckou
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
this.disabled = !((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
44
|
-
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null)
|
|
44
|
+
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, "is-disabled": this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
45
45
|
// use primary type when on mobile mode
|
|
46
46
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
47
47
|
amount: cartStore.total,
|
|
48
48
|
currency: cartStore.currency,
|
|
49
|
-
})))));
|
|
49
|
+
}))))));
|
|
50
50
|
}
|
|
51
51
|
static get watchers() { return {
|
|
52
52
|
"disabled": ["watchFormComplete"]
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/cor
|
|
|
2
2
|
import { l as initStripeElements, c as cartStore, h as cartStoreUpdateItems, g as cartStoreReset, s as stripeStore, m as stripeStoreInitCheckoutSession, j as cartStoreUpdateToErrorState, k as stripeStorePrefetchLandedCost, d as cartStoreNextStep, n as stripeStoreConfirmPayment, o as stripeStoreReset, e as cartStorePreviousStep } from './cart.js';
|
|
3
3
|
import { b as localizationStore, a as log, t as translate } from './localization.js';
|
|
4
4
|
import { z as zonosStore, m as mergeConfig } from './zonosStore.js';
|
|
5
|
-
import { i as isCheckoutMobile
|
|
5
|
+
import { i as isCheckoutMobile } from './isCheckoutMobile.js';
|
|
6
6
|
import { c as classes } from './classes.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius.js';
|
|
8
8
|
import { i as isDarkColor } from './isDarkColor.js';
|
|
@@ -24,6 +24,7 @@ import { d as defineCustomElement$b } from './zonos-icon2.js';
|
|
|
24
24
|
import { d as defineCustomElement$a } from './zonos-link-authentication2.js';
|
|
25
25
|
import { d as defineCustomElement$9 } from './zonos-logo2.js';
|
|
26
26
|
import { d as defineCustomElement$8 } from './zonos-payment2.js';
|
|
27
|
+
import { d as defineCustomElement$7 } from './zonos-review2.js';
|
|
27
28
|
import { d as defineCustomElement$6 } from './zonos-shipping2.js';
|
|
28
29
|
import { d as defineCustomElement$5 } from './zonos-shipping-rich-radio2.js';
|
|
29
30
|
import { d as defineCustomElement$4 } from './zonos-spinner2.js';
|
|
@@ -39,7 +40,7 @@ const MessageIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none"
|
|
|
39
40
|
|
|
40
41
|
const RemoveIcon = `<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
41
42
|
|
|
42
|
-
const zonosCheckoutCss = ".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-48) var(--amino-space-56)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0);padding-bottom:var(--amino-space-80)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--footer.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;position:absolute;bottom:var(--amino-space-32);right:var(--amino-space-56);gap:var(--amino-space-8)}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;
|
|
43
|
+
const zonosCheckoutCss = ".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-48) var(--amino-space-56)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0);padding-bottom:var(--amino-space-80)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--footer.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;position:absolute;bottom:var(--amino-space-32);right:var(--amino-space-56);gap:var(--amino-space-8)}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:var(--amino-space-8)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.mobile.sc-zonos-checkout-h .zonos--footer.sc-zonos-checkout{bottom:0;left:0;padding:var(--amino-space-12);position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-gray-0)}";
|
|
43
44
|
const ZonosCheckoutStyle0 = zonosCheckoutCss;
|
|
44
45
|
|
|
45
46
|
const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout extends HTMLElement {
|
|
@@ -47,11 +48,12 @@ const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout ext
|
|
|
47
48
|
super();
|
|
48
49
|
this.__registerHost();
|
|
49
50
|
this.applyStripeTheme = async () => {
|
|
50
|
-
var _a, _b, _c;
|
|
51
|
+
var _a, _b, _c, _d;
|
|
51
52
|
const theme = ((_a = this.appearanceSettingsOverride) === null || _a === void 0 ? void 0 : _a.theme) || zonosStore.appearance.theme;
|
|
52
53
|
await initStripeElements({
|
|
53
54
|
overrideBorderRaidus: (_b = this.appearanceSettingsOverride) === null || _b === void 0 ? void 0 : _b.style,
|
|
54
55
|
overridePrimaryColor: (_c = this.appearanceSettingsOverride) === null || _c === void 0 ? void 0 : _c.colorPrimary,
|
|
56
|
+
overrideSecondaryColor: (_d = this.appearanceSettingsOverride) === null || _d === void 0 ? void 0 : _d.colorSecondary,
|
|
55
57
|
// only override theme or theme from appearance if it's mobile
|
|
56
58
|
overrideTheme: this.isMobile ? theme : undefined,
|
|
57
59
|
});
|
|
@@ -375,31 +377,27 @@ const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout ext
|
|
|
375
377
|
// only use submit button color if it's on desktop
|
|
376
378
|
const submitButtonColor = !this.isMobile ? colorSecondary : undefined;
|
|
377
379
|
const { customMessages } = localizationStore;
|
|
378
|
-
const defaultMessage = (
|
|
379
|
-
'Know about duties and taxes before you buy. Shop with confidence!';
|
|
380
|
+
const defaultMessage = (_a = customMessages.find(x => x.pageName === 'checkout_default')) === null || _a === void 0 ? void 0 : _a.message;
|
|
380
381
|
const localePageEnum = this.getCurrentLocalePageEnum();
|
|
381
382
|
const filteredMessages = customMessages.filter(x => x.pageName === localePageEnum);
|
|
382
383
|
const renderLogo = () => (h("div", { class: "zonos--logo" }, logoUrl && (h("img", { alt: `${zonosStore.organizationName} logo`, src: logoUrl, width: 100 }))));
|
|
383
384
|
const renderTopHeader = () => (h("zonos-v-stack", null, renderLogo(), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message }))), h("div", null, h("zonos-button", { class: "zonos--back-button", icon: h("zonos-icon", { content: LeftArrow }), noBackground: true, noPaddingLeft: true, noPaddingRight: true, onClick: () => this.handleBackClick(), theme: leftSideTheme }, translate('Back')))));
|
|
384
385
|
const renderFooter = () => hasFooter && (h("div", { class: "zonos--footer", "data-theme": rightSideTheme }, h("zonos-text", { type: "hintText" }, translate('Powered by')), h("zonos-logo", { theme: rightSideTheme, width: "100px" })));
|
|
385
386
|
const renderContent = () => {
|
|
386
|
-
var _a;
|
|
387
|
-
const submitBtnType = this.isMobile ? 'primary' : undefined;
|
|
388
|
-
const reviewElementSize = (_a = this.zonosReviewRef) === null || _a === void 0 ? void 0 : _a.scrollHeight;
|
|
389
387
|
return (h("div", { class: 'zonos--content', style: {
|
|
390
388
|
'--border-radius': getBorderRadius(style),
|
|
391
389
|
} }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, h("div", { class: "zonos--left", "data-theme": leftSideTheme, style: {
|
|
392
390
|
'--primary-color': !this.isMobile ? colorPrimary : '',
|
|
393
|
-
} }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor
|
|
394
|
-
// only collapse on mobile
|
|
395
|
-
collapsed: this.collapseReviewMobile && this.isMobile }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
391
|
+
} }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isMobile && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
396
392
|
// do nothing if it's not mobile
|
|
397
393
|
if (!this.isMobile) {
|
|
398
394
|
return;
|
|
399
395
|
}
|
|
400
|
-
this.collapseReviewMobile =
|
|
401
|
-
|
|
402
|
-
|
|
396
|
+
this.collapseReviewMobile = !this.collapseReviewMobile;
|
|
397
|
+
} }), h("zonos-collapse", {
|
|
398
|
+
// only collapse on mobile
|
|
399
|
+
collapsed: this.collapseReviewMobile && this.isMobile
|
|
400
|
+
}, h("zonos-cart-items", null))), h("zonos-v-stack", { spacing: 16 }, h("zonos-cart-subtotal", null), h("zonos-custom-message", { class: "zonos--checkout-default-message", icon: MessageIcon, message: defaultMessage }))), !this.isMobile && renderFooter()), this.isMobile && renderFooter())), (cartStore.step === 'finish' || cartStore.step === 'error') && (h("div", { class: "zonos--done", "data-theme": rightSideTheme }, h("div", { class: "zonos--header" }, renderLogo(), h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.handleFinishClick(), theme: rightSideTheme })), h("zonos-checkout-finish", { borderRadius: style, onCloseClick: () => this.handleFinishClick(), overrideNotification: cartStore.step === 'error' && !!cartStore.error
|
|
403
401
|
? Object.assign(Object.assign({}, cartStore.error), { type: 'error' }) : undefined, storybookForceStatus: this.storybookPaymentStatusOverride })))));
|
|
404
402
|
};
|
|
405
403
|
return (h(Host, { class: classes([
|
|
@@ -20,7 +20,7 @@ const ZonosComponent$1 = /*@__PURE__*/ proxyCustomElement(class ZonosComponent e
|
|
|
20
20
|
return format(this.first, this.middle, this.last);
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return h("div", { key: '
|
|
23
|
+
return h("div", { key: 'a61bec010f8c7a8b9979d4c5ec4a84153b780a7e' }, "Hello, World! I'm ", this.getText());
|
|
24
24
|
}
|
|
25
25
|
static get style() { return ZonosComponentStyle0; }
|
|
26
26
|
}, [1, "zonos-component", {
|
|
@@ -209,7 +209,7 @@ const ZonosController$1 = /*@__PURE__*/ proxyCustomElement(class ZonosController
|
|
|
209
209
|
zonosStore.organizationName = organizationName;
|
|
210
210
|
}
|
|
211
211
|
render() {
|
|
212
|
-
return h(Host, { key: '
|
|
212
|
+
return h(Host, { key: 'ff6eb2466864a217c485484d381e6f2531631e49', class: "zonos--elements" });
|
|
213
213
|
}
|
|
214
214
|
static get style() { return ZonosControllerStyle0; }
|
|
215
215
|
}, [1, "zonos-controller", {
|
|
@@ -18,7 +18,7 @@ const ZonosCustomMessage = /*@__PURE__*/ proxyCustomElement(class ZonosCustomMes
|
|
|
18
18
|
render() {
|
|
19
19
|
return (h(Host, { key: 'eb6b2a907ef77d5e2da0d9cb1bee4b77f814e5cb', class: "zonos--elements", style: {
|
|
20
20
|
'--font-family': zonosStoreFontFamily(),
|
|
21
|
-
} }, h("zonos-card", {
|
|
21
|
+
} }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { content: this.icon }), h("zonos-text", null, this.message))))));
|
|
22
22
|
}
|
|
23
23
|
static get style() { return ZonosCustomMessageStyle0; }
|
|
24
24
|
}, [1, "zonos-custom-message", {
|
|
@@ -8,7 +8,7 @@ import { d as defineCustomElement$3 } from './zonos-link-authentication2.js';
|
|
|
8
8
|
import { d as defineCustomElement$2 } from './zonos-spinner2.js';
|
|
9
9
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
10
10
|
|
|
11
|
-
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--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{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:
|
|
11
|
+
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--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:0;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%}";
|
|
12
12
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
13
13
|
|
|
14
14
|
const ZonosCustomerInfo = /*@__PURE__*/ proxyCustomElement(class ZonosCustomerInfo extends HTMLElement {
|
|
@@ -43,9 +43,9 @@ const ZonosCustomerInfo = /*@__PURE__*/ proxyCustomElement(class ZonosCustomerIn
|
|
|
43
43
|
this.disabled =
|
|
44
44
|
!((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete) ||
|
|
45
45
|
!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete);
|
|
46
|
-
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" })
|
|
46
|
+
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" }), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
47
47
|
// use primary type when on mobile mode
|
|
48
|
-
variant: this.submitBtnType }, translate('Continue to shipping')))));
|
|
48
|
+
variant: this.submitBtnType }, translate('Continue to shipping'))))));
|
|
49
49
|
}
|
|
50
50
|
static get watchers() { return {
|
|
51
51
|
"disabled": ["watchFormComplete"]
|
|
@@ -58,7 +58,7 @@ const ZonosDialog = /*@__PURE__*/ proxyCustomElement(class ZonosDialog extends H
|
|
|
58
58
|
document.body.style.overflow = 'auto';
|
|
59
59
|
}
|
|
60
60
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
61
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: 'deb6bd5cdd044f1ca4e2b04484b0b54a40574b4f', class: classes([
|
|
62
62
|
'zonos--elements',
|
|
63
63
|
this.open && 'open',
|
|
64
64
|
this.isLoading && 'is-loading',
|
|
@@ -69,10 +69,10 @@ const ZonosDialog = /*@__PURE__*/ proxyCustomElement(class ZonosDialog extends H
|
|
|
69
69
|
'--font-family': zonosStoreFontFamily(),
|
|
70
70
|
'--height': this.height || 'initial',
|
|
71
71
|
'--width': this.width,
|
|
72
|
-
} }, h("div", { key: '
|
|
72
|
+
} }, h("div", { key: '10ed0a3736547ef162a2b439bb81ddffc0bc920d', class: "zonos--backdrop" }), h("div", { key: '895ed2094a0b0863ba13fdbc46a8d9071f1330b8', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: '8d83b4cc34a360f7e943776869fc5388576fb0f7', 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", { content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: '4c04cafeda45b8e4b6abc622e140c71507449f57', class: classes([
|
|
73
73
|
'zonos--body',
|
|
74
74
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
75
|
-
]) }, h("slot", { key: '
|
|
75
|
+
]) }, h("slot", { key: '524448bf4beb9024750c94d280c874f032de7902' })), this.footerRightAction && (h("div", { class: "zonos--footer" }, h("div", { class: "zonos--footer-right-action" }, this.footerRightAction)))))));
|
|
76
76
|
}
|
|
77
77
|
static get assetsDirs() { return ["assets"]; }
|
|
78
78
|
static get style() { return ZonosDialogStyle0; }
|
|
@@ -29,9 +29,9 @@ const ZonosHelloDialogFooter = /*@__PURE__*/ proxyCustomElement(class ZonosHello
|
|
|
29
29
|
var _a, _b;
|
|
30
30
|
const primaryColor = (_a = this.appearanceSettings) === null || _a === void 0 ? void 0 : _a.colorPrimary;
|
|
31
31
|
const footerTheme = primaryColor && isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: '724259a8adaa1cb5c760f36b14be99c55d6c29e2', class: "zonos--elements" }, h("div", { key: 'cb27d219f7a0f948a939b221143c3f0f252b0eeb', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
|
|
33
33
|
'--primary-color': (_b = this.appearanceSettings) === null || _b === void 0 ? void 0 : _b.colorPrimary,
|
|
34
|
-
} }, h("a", { key: '
|
|
34
|
+
} }, h("a", { key: 'd04f060e7db6e2c964dc2c4252dbbc7b69fba7db', href: "https://zonos.com", target: "_blank" }, h("zonos-icon", { key: 'ed138c417f139f84a5466a4228925e2aa908cd12', autoHeight: true, color: "gray-1200", content: ZonosIcon, size: 108 })), h("zonos-button", { key: '07b300a1950adfaf154c173a49cec722df74172c', icon: h("zonos-icon", { color: "gray-700", content: ChevronDownIcon }), iconRight: true, onClick: () => this.setShowCountrySelect(true), variant: "outline" }, localizationStore.selectedCountryCode))));
|
|
35
35
|
}
|
|
36
36
|
static get style() { return ZonosHelloDialogFooterStyle0; }
|
|
37
37
|
}, [1, "zonos-hello-dialog-footer", {
|
|
@@ -128,14 +128,14 @@ const ZonosHelloDialog = /*@__PURE__*/ proxyCustomElement(class ZonosHelloDialog
|
|
|
128
128
|
translate('Know about duties and taxes before you buy. Shop with confidence!');
|
|
129
129
|
const currentPage = this.getCurrentPageEnum();
|
|
130
130
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
131
|
-
return (h(Host, { key: '
|
|
131
|
+
return (h(Host, { key: '56fcc25e2fabf8c2f1edf727a64d213f18729c00', class: "zonos--elements" }, h("div", { key: 'c83e357cd266c605015e136eb23906bd4385e7f5', "aria-hidden": "true", class: classes([
|
|
132
132
|
'zonos--hello-dialog',
|
|
133
133
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
134
134
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
135
135
|
!!this.mobileLocationOverride &&
|
|
136
136
|
'zonos--hello-dialog-mobile-override',
|
|
137
137
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
138
|
-
]), ref: el => el && (this.dialogRef = el) }, h("div", { key: '
|
|
138
|
+
]), ref: el => el && (this.dialogRef = el) }, h("div", { key: '8d5811f45f2cfe8bd1c0ca3131d99ebc69b7b00d', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '137ea59ae312bee3817292dde42e2e718e70001b', class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), this.showCountrySelect ? (h("div", null, h("zonos-country-select", { closeCountrySelect: () => this.setShowCountrySelect(false) }))) : (h("div", null, h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { color: "gray-800" }, defaultMessage)), h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
|
|
139
139
|
var _a;
|
|
140
140
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { color: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
141
141
|
}), h("zonos-card", { spacing: "12px" }, h("zonos-v-stack", { spacing: 12 }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { content: BagIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))))), !this.showCountrySelect && (h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value) })))));
|
|
@@ -39,7 +39,7 @@ const ZonosLinkAuthentication = /*@__PURE__*/ proxyCustomElement(class ZonosLink
|
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
41
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
42
|
-
return (h(Host, { key: '
|
|
42
|
+
return (h(Host, { key: '5d02895b441a5713b83e7b3c4b784ab4b6743f54', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '5bd33edd16f1511111bfcb497e0767f938172b05', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'd5a90ce88adaed9f2369af4692506d5d072c021d', class: "zonos--link-authentication-component" })));
|
|
43
43
|
}
|
|
44
44
|
get el() { return this; }
|
|
45
45
|
static get watchers() { return {
|
|
@@ -18,11 +18,11 @@ const ZonosLogo = /*@__PURE__*/ proxyCustomElement(class ZonosLogo extends HTMLE
|
|
|
18
18
|
const filterColor = this.theme === 'DARK'
|
|
19
19
|
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
20
20
|
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '25b7723a73f8f8c7a28e8b2730b88f18d4f11fb7', class: classes(['zonos--elements zonos--logo', this.class]), style: {
|
|
22
22
|
'--filter-color': filterColor,
|
|
23
23
|
'--font-family': zonosStoreFontFamily(),
|
|
24
24
|
'--width': this.width,
|
|
25
|
-
} }, h("img", { key: '
|
|
25
|
+
} }, h("img", { key: 'e7f15f665c2d3c579e8727f1dceefea0fd438d5d', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
|
|
26
26
|
}
|
|
27
27
|
static get assetsDirs() { return ["assets"]; }
|
|
28
28
|
static get style() { return ZonosLogoStyle0; }
|
|
@@ -40,7 +40,7 @@ const ZonosPayment = /*@__PURE__*/ proxyCustomElement(class ZonosPayment extends
|
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
42
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '365e346a6cda504bdbc825ff8e25b7492bf1d19b', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: 'f76c3b4ef941ecc8cb99ac3593b9d902eda5b1e7', class: "zonos--payment-component" })));
|
|
44
44
|
}
|
|
45
45
|
get el() { return this; }
|
|
46
46
|
static get watchers() { return {
|
|
@@ -2,21 +2,17 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { c as cartStore } from './cart.js';
|
|
3
3
|
import { t as translate } from './localization.js';
|
|
4
4
|
import { z as zonosStore } from './zonosStore.js';
|
|
5
|
+
import { i as isCheckoutMobile } from './isCheckoutMobile.js';
|
|
5
6
|
import { c as classes } from './classes.js';
|
|
6
7
|
import { f as formatCurrency } from './formatCurrency.js';
|
|
7
8
|
import { d as defineCustomElement$2 } from './zonos-icon2.js';
|
|
8
9
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
9
10
|
|
|
10
|
-
const checkoutBreakpoint = 890;
|
|
11
|
-
const isCheckoutMobile = (isMobile) => {
|
|
12
|
-
return isMobile || window.innerWidth < checkoutBreakpoint;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
11
|
const ChevronDownIcon = `<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="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
16
12
|
|
|
17
13
|
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>`;
|
|
18
14
|
|
|
19
|
-
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 .zonos--total-pay{margin:var(--amino-space-16) 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)}: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}";
|
|
15
|
+
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-16) 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}";
|
|
20
16
|
const ZonosReviewStyle0 = zonosReviewCss;
|
|
21
17
|
|
|
22
18
|
const ZonosReview = /*@__PURE__*/ proxyCustomElement(class ZonosReview extends HTMLElement {
|
|
@@ -94,4 +90,4 @@ function defineCustomElement() {
|
|
|
94
90
|
} });
|
|
95
91
|
}
|
|
96
92
|
|
|
97
|
-
export { ZonosReview as Z, defineCustomElement as d
|
|
93
|
+
export { ZonosReview as Z, defineCustomElement as d };
|
|
@@ -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;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:
|
|
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{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
13
13
|
const ZonosShippingStyle0 = zonosShippingCss;
|
|
14
14
|
|
|
15
15
|
const ZonosShipping = /*@__PURE__*/ proxyCustomElement(class ZonosShipping extends HTMLElement {
|
|
@@ -75,9 +75,9 @@ const ZonosShipping = /*@__PURE__*/ proxyCustomElement(class ZonosShipping exten
|
|
|
75
75
|
value: item.id,
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
|
-
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) }))
|
|
78
|
+
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, "is-disabled": this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
79
79
|
// use primary type when on mobile mode
|
|
80
|
-
variant: this.submitBtnType }, translate('Go to payment'))));
|
|
80
|
+
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
81
81
|
}
|
|
82
82
|
static get watchers() { return {
|
|
83
83
|
"disabled": ["watchFormComplete"]
|
|
@@ -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;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)}
|
|
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)}@-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)}";
|
|
5
5
|
const ZonosSpinnerStyle0 = zonosSpinnerCss;
|
|
6
6
|
|
|
7
7
|
const ZonosSpinner = /*@__PURE__*/ proxyCustomElement(class ZonosSpinner extends HTMLElement {
|
|
@@ -14,9 +14,9 @@ const VStack = /*@__PURE__*/ proxyCustomElement(class VStack extends HTMLElement
|
|
|
14
14
|
this.class = '';
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: '2bd82aba32704cc02da767522c39853c6e223297', style: {
|
|
18
18
|
'--font-family': zonosStoreFontFamily(),
|
|
19
|
-
} }, h("div", { key: '
|
|
19
|
+
} }, h("div", { key: '22afa237aa1ac8a5ab61adcfa7a0ccabad316b28', class: classes(['vstack', this.class]), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '5f2645af6b1f4178cb87248e03e9bb3d1c8201ee' }))));
|
|
20
20
|
}
|
|
21
21
|
static get style() { return ZonosVStackStyle0; }
|
|
22
22
|
}, [1, "zonos-v-stack", {
|
|
@@ -54,6 +54,7 @@ const triggerBuildLandedCost = async (buildLandedCost) => {
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
const calculateLandedCost = async (abortController) => {
|
|
57
|
+
var _a;
|
|
57
58
|
// If buildLandedCost callback is supplied, use that instead of our regular request to '/calculate-landed-cost'
|
|
58
59
|
const buildLandedCost = zonosStore.checkoutSettings.buildLandedCost;
|
|
59
60
|
if (buildLandedCost) {
|
|
@@ -68,7 +69,11 @@ const calculateLandedCost = async (abortController) => {
|
|
|
68
69
|
signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal,
|
|
69
70
|
});
|
|
70
71
|
if (errors.length || !json) {
|
|
71
|
-
|
|
72
|
+
const isAbortedRequest = ((_a = errors[0]) === null || _a === void 0 ? void 0 : _a.message) === 'The user aborted a request.';
|
|
73
|
+
const errorMessage = isAbortedRequest
|
|
74
|
+
? 'The landed cost calculation request was aborted to initiate a new one.'
|
|
75
|
+
: 'Failed to calculate landed cost';
|
|
76
|
+
throw new Error(errorMessage);
|
|
72
77
|
}
|
|
73
78
|
return json;
|
|
74
79
|
};
|
|
@@ -125,8 +130,9 @@ const { onChange: onChange$1, reset: reset$1, state: stripeStore, } = createStor
|
|
|
125
130
|
stripePaymentElement: null,
|
|
126
131
|
stripePaymentEventData: null,
|
|
127
132
|
}));
|
|
128
|
-
const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryColor, overrideTheme, }) => {
|
|
133
|
+
const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryColor, overrideSecondaryColor, overrideTheme, }) => {
|
|
129
134
|
const primaryColor = overridePrimaryColor || zonosStore.appearance.colorPrimary;
|
|
135
|
+
const secondaryColor = overrideSecondaryColor || zonosStore.appearance.colorSecondary;
|
|
130
136
|
const themeBasedColor = primaryColor && isDarkColor(primaryColor) ? 'night' : 'flat';
|
|
131
137
|
// if overrideTheme is provided, use it. Otherwise, use theme based on primary color
|
|
132
138
|
const theme = overrideTheme === 'DARK' ? 'night' : 'flat';
|
|
@@ -136,10 +142,12 @@ const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryC
|
|
|
136
142
|
rules: Object.assign({}, addressRuleStyle({ theme: 'LIGHT' })),
|
|
137
143
|
// get contrast theme color base on primary color
|
|
138
144
|
theme: overrideTheme ? theme : themeBasedColor,
|
|
139
|
-
variables: Object.assign({}, defaultVariable({
|
|
145
|
+
variables: Object.assign(Object.assign({}, defaultVariable({
|
|
140
146
|
borderStyle: overrideBorderRaidus,
|
|
141
147
|
theme: 'LIGHT',
|
|
142
|
-
})),
|
|
148
|
+
})), {
|
|
149
|
+
// use the button background color for input glow color
|
|
150
|
+
colorPrimary: secondaryColor }),
|
|
143
151
|
},
|
|
144
152
|
clientSecret,
|
|
145
153
|
locale: localizationStore.selectedLocale,
|
|
@@ -157,6 +165,7 @@ const initStripeElements = async (props) => {
|
|
|
157
165
|
clientSecret,
|
|
158
166
|
overrideBorderRaidus: props === null || props === void 0 ? void 0 : props.overrideBorderRaidus,
|
|
159
167
|
overridePrimaryColor: props === null || props === void 0 ? void 0 : props.overridePrimaryColor,
|
|
168
|
+
overrideSecondaryColor: props === null || props === void 0 ? void 0 : props.overrideSecondaryColor,
|
|
160
169
|
overrideTheme: props === null || props === void 0 ? void 0 : props.overrideTheme,
|
|
161
170
|
});
|
|
162
171
|
// compare with the previous options to see if we need to update
|
|
@@ -479,6 +488,8 @@ const cartStoreReset = () => {
|
|
|
479
488
|
reset();
|
|
480
489
|
};
|
|
481
490
|
const cartStoreUpdateToErrorState = ({ messages, title, }) => {
|
|
491
|
+
cartStoreReset();
|
|
492
|
+
stripeStoreReset();
|
|
482
493
|
cartStore.step = 'error';
|
|
483
494
|
cartStore.error = {
|
|
484
495
|
messages,
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-7e7c7585.js';
|
|
2
2
|
import './zonosStore-e59617f8.js';
|
|
3
3
|
import './index-81a199ef.js';
|
|
4
4
|
import './localization-5d83fde2.js';
|