@zonos/elements 1.3.11-alpha.0 → 1.3.11-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-7e28f026.js → cart-b34c001b.js} +92 -28
- package/dist/cjs/{getBorderRadius-d795f526.js → getBorderRadius-4fa738c3.js} +1 -1
- package/dist/cjs/getContrastColor-c72796c6.js +20 -0
- package/dist/cjs/{isColorVariable-41cacd82.js → isColorVariable-fff5e469.js} +1 -1
- package/dist/cjs/{isDarkColor-33fb96a7.js → isDarkColor-7faf0a82.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-586d3206.js → submitGtag-1f1fbe1c.js} +15 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +15 -12
- package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/{zonos-button_3.cjs.entry.js → zonos-button_2.cjs.entry.js} +34 -36
- package/dist/cjs/zonos-card_2.cjs.entry.js +8 -8
- package/dist/cjs/{zonos-cart-items_9.cjs.entry.js → zonos-cart-items_10.cjs.entry.js} +164 -53
- package/dist/cjs/zonos-checkout.cjs.entry.js +249 -26
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +9 -9
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +16 -4
- package/dist/cjs/zonos-icon.cjs.entry.js +39 -0
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +13 -4
- package/dist/cjs/zonos-text.cjs.entry.js +6 -2
- package/dist/cjs/{zonosStore-d3f0173b.js → zonosStore-bd2a0c59.js} +20 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +32 -22
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +76 -16
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +2 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +102 -22
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +43 -24
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.css +1 -1
- package/dist/collection/components/common/zonos-button/zonos-button.js +18 -4
- package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +5 -5
- package/dist/collection/components/common/zonos-checkout-progress-tabs/assets/TabCheckmark.svg +3 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +103 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +194 -0
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +1 -1
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +1 -1
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +5 -30
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +9 -5
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -4
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +33 -7
- package/dist/collection/components/common/zonos-text/zonos-text.js +7 -3
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +17 -2
- 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 +5 -5
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +26 -0
- package/dist/collection/components/store/checkout/stripe.js +3 -0
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- package/dist/collection/components/store/zonosStore.js +20 -3
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +5 -2
- 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/buildCartItemsByTempCart.js +24 -0
- package/dist/collection/components/utils/api/tempCartItem/getAttributes.js +66 -0
- package/dist/collection/components/utils/api/tempCartItem/getMeasurements.js +58 -0
- package/dist/collection/components/utils/api/trackConversionEvent.js +2 -0
- package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -0
- package/dist/collection/components/utils/createCustomEvent.js +9 -0
- package/dist/collection/components/utils/getContrastColor.js +16 -0
- package/dist/collection/components/utils/isColorVariable.js +1 -1
- package/dist/collection/components/utils/styles.js +12 -0
- package/dist/collection/scripts/zonosBase.js +1 -0
- package/dist/collection/styles/stripe/addressRuleStyle.js +0 -3
- package/dist/collection/types/checkout/api/TempCart.js +1 -0
- package/dist/collection/types/generated/graphql.customer.types.js +73 -0
- package/dist/components/getContrastColor.js +18 -0
- package/dist/components/isColorVariable.js +1 -1
- package/dist/components/isDarkColor.js +1 -1
- package/dist/components/stripe.js +90 -25
- package/dist/components/trackConversionEvent.js +3 -1
- package/dist/components/zonos-address2.js +5 -2
- package/dist/components/zonos-badge2.js +3 -3
- package/dist/components/zonos-button2.js +30 -4
- package/dist/components/zonos-card2.js +2 -2
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +15 -7
- package/dist/components/zonos-checkout-footer2.js +33 -17
- package/dist/components/zonos-checkout-progress-tabs.d.ts +11 -0
- package/dist/components/zonos-checkout-progress-tabs.js +6 -0
- package/dist/components/zonos-checkout-progress-tabs2.js +122 -0
- package/dist/components/zonos-checkout.js +277 -46
- package/dist/components/zonos-collapse2.js +2 -2
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +2 -2
- package/dist/components/zonos-country-select2.js +2 -2
- package/dist/components/zonos-custom-message2.js +1 -1
- package/dist/components/zonos-dialog2.js +4 -6
- package/dist/components/zonos-hello-dialog-footer2.js +2 -2
- package/dist/components/zonos-hello-dialog2.js +2 -2
- package/dist/components/zonos-hello.js +17 -3
- package/dist/components/zonos-icon2.js +5 -1
- package/dist/components/zonos-language-select2.js +3 -3
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/components/zonos-link.js +1 -1
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-review2.js +1 -1
- package/dist/components/zonos-select-dialog-header2.js +2 -2
- package/dist/components/zonos-shipping-rich-radio2.js +11 -1
- package/dist/components/zonos-shipping2.js +44 -25
- package/dist/components/zonos-text2.js +5 -1
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/components/zonosStore.js +20 -3
- package/dist/esm/{cart-5a88b4f3.js → cart-cc09eaef.js} +93 -28
- package/dist/esm/{getBorderRadius-5d750ab8.js → getBorderRadius-a89e45fb.js} +1 -1
- package/dist/esm/getContrastColor-5fbc4746.js +18 -0
- package/dist/esm/{isColorVariable-91c33804.js → isColorVariable-fbf2d80d.js} +1 -1
- package/dist/esm/{isDarkColor-c34dfed9.js → isDarkColor-6bf71e51.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-289ddd8b.js → submitGtag-2eedb117.js} +15 -3
- package/dist/esm/zonos-address_4.entry.js +15 -12
- package/dist/esm/zonos-badge_2.entry.js +6 -6
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/{zonos-button_3.entry.js → zonos-button_2.entry.js} +35 -36
- package/dist/esm/zonos-card_2.entry.js +8 -8
- package/dist/esm/{zonos-cart-items_9.entry.js → zonos-cart-items_10.entry.js} +164 -54
- package/dist/esm/zonos-checkout.entry.js +249 -26
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +5 -5
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +9 -9
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +16 -4
- package/dist/esm/zonos-icon.entry.js +35 -0
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +3 -3
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +5 -5
- package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +13 -4
- package/dist/esm/zonos-text.entry.js +6 -2
- package/dist/esm/{zonosStore-aac7c6ac.js → zonosStore-c4c45591.js} +20 -3
- package/dist/esm-es5/cart-cc09eaef.js +1 -0
- package/dist/esm-es5/{getBorderRadius-5d750ab8.js → getBorderRadius-a89e45fb.js} +1 -1
- package/dist/esm-es5/getContrastColor-5fbc4746.js +1 -0
- package/dist/esm-es5/isColorVariable-fbf2d80d.js +1 -0
- package/dist/esm-es5/{isDarkColor-c34dfed9.js → isDarkColor-6bf71e51.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-2eedb117.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -0
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-icon.entry.js +1 -0
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-aac7c6ac.js → zonosStore-c4c45591.js} +1 -1
- package/dist/scripts/getTempCartById.js +1 -0
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.d.ts +14 -2
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +7 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +7 -0
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -0
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -1
- package/dist/types/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.d.ts +29 -0
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +1 -6
- package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +4 -2
- package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +1 -1
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +7 -1
- package/dist/types/components/common/zonos-text/zonos-text.d.ts +3 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +2 -1
- package/dist/types/components/store/checkout/cart.d.ts +19 -4
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/store/zonosStore.d.ts +11 -2
- package/dist/types/components/utils/api/buildCartItemsByTempCart.d.ts +7 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/tempCartItem/getAttributes.d.ts +11 -0
- package/dist/types/components/utils/api/tempCartItem/getMeasurements.d.ts +7 -0
- package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
- package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
- package/dist/types/components/utils/createCustomEvent.d.ts +12 -0
- package/dist/types/components/utils/getBorderRadius.d.ts +1 -1
- package/dist/types/components/utils/getContrastColor.d.ts +4 -0
- package/dist/types/components/utils/handleFetch.d.ts +2 -1
- package/dist/types/components/utils/isColorVariable.d.ts +1 -1
- package/dist/types/components/utils/styles.d.ts +7 -0
- package/dist/types/components.d.ts +69 -18
- package/dist/types/scripts/zonosBase.d.ts +10 -1
- package/dist/types/styles/stripe/addressRuleStyle.d.ts +2 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +6 -1
- package/dist/types/types/checkout/api/TempCart.d.ts +80 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +97 -0
- package/dist/types/types/generated/graphql.customer.types.ts +135 -1
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/global.d.ts +10 -0
- package/dist/types/types/utils/deep/IDeepKeyofAtIndex.d.ts +1 -1
- package/dist/zonos-elements/assets/TabCheckmark.svg +3 -0
- package/dist/zonos-elements/{p-4ad5f307.system.entry.js → p-001518eb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-07022f11.js +1 -0
- package/dist/zonos-elements/p-0fe52bae.system.entry.js +1 -0
- package/dist/zonos-elements/{p-14bf3658.entry.js → p-105a2e51.entry.js} +1 -1
- package/dist/zonos-elements/{p-a87803b7.system.entry.js → p-15cd4a76.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-482371fb.system.entry.js → p-160cdf4e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-167b3369.system.js +1 -0
- package/dist/zonos-elements/p-171eb334.entry.js +1 -0
- package/dist/zonos-elements/p-1bbdfae5.js +1 -0
- package/dist/zonos-elements/p-1d833f22.system.entry.js +1 -0
- package/dist/zonos-elements/{p-dad00ad3.system.entry.js → p-1df9ab6a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1f54c83e.entry.js +1 -0
- package/dist/zonos-elements/{p-27d57265.system.entry.js → p-20b080d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-333da541.entry.js → p-215cd7ec.entry.js} +1 -1
- package/dist/zonos-elements/p-26e8f37a.entry.js +1 -0
- package/dist/zonos-elements/{p-77727098.system.js → p-41c2b1c5.system.js} +1 -1
- package/dist/zonos-elements/p-425865fd.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5f2cb4b6.entry.js → p-43022147.entry.js} +1 -1
- package/dist/zonos-elements/{p-188ddbe2.entry.js → p-4515ec7b.entry.js} +1 -1
- package/dist/zonos-elements/{p-9db3028d.entry.js → p-470284a3.entry.js} +1 -1
- package/dist/zonos-elements/p-4c9367f1.entry.js +1 -0
- package/dist/zonos-elements/{p-770384fa.system.entry.js → p-4d7b27af.system.entry.js} +1 -1
- package/dist/zonos-elements/p-55519ef5.system.js +1 -0
- package/dist/zonos-elements/{p-8445a084.system.entry.js → p-5ba91f13.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6484bf31.system.js +1 -0
- package/dist/zonos-elements/p-6a1b934d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a725946f.entry.js → p-6bd4b5e6.entry.js} +1 -1
- package/dist/zonos-elements/{p-7e355496.system.entry.js → p-6c5c5377.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6e81adba.system.js +1 -1
- package/dist/zonos-elements/p-72c6bf0f.entry.js +1 -0
- package/dist/zonos-elements/p-7575a42a.js +1 -0
- package/dist/zonos-elements/p-7f9889bd.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c1e54094.system.js → p-86034f1e.system.js} +1 -1
- package/dist/zonos-elements/p-9a1db995.entry.js +1 -0
- package/dist/zonos-elements/{p-77c54b83.js → p-9a90fb56.js} +1 -1
- package/dist/zonos-elements/{p-d5a9dfc7.entry.js → p-9bdcd7b6.entry.js} +1 -1
- package/dist/zonos-elements/{p-edbea8df.system.js → p-9db2f9d1.system.js} +1 -1
- package/dist/zonos-elements/p-a144d26a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-93e51987.system.entry.js → p-a2f71e4f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6181f2d5.entry.js → p-ad499520.entry.js} +1 -1
- package/dist/zonos-elements/{p-e4e1ca2f.system.entry.js → p-b4c23bb5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-315c1fc2.entry.js → p-b62aee3d.entry.js} +1 -1
- package/dist/zonos-elements/{p-e969cec9.entry.js → p-b8718429.entry.js} +1 -1
- package/dist/zonos-elements/{p-25fbcefe.system.entry.js → p-ba5596ae.system.entry.js} +1 -1
- package/dist/zonos-elements/p-beba218e.js +1 -0
- package/dist/zonos-elements/p-c7f11c60.entry.js +1 -0
- package/dist/zonos-elements/{p-febddb45.entry.js → p-d4222f1f.entry.js} +1 -1
- package/dist/zonos-elements/p-dde4c859.system.entry.js +1 -0
- package/dist/zonos-elements/p-e28ed57c.js +1 -0
- package/dist/zonos-elements/p-e3a3e376.entry.js +1 -0
- package/dist/zonos-elements/{p-a578facf.entry.js → p-e3de496a.entry.js} +1 -1
- package/dist/zonos-elements/{p-afcded5d.system.js → p-ed23a5df.system.js} +1 -1
- package/dist/zonos-elements/{p-e392e212.system.entry.js → p-ed597cc9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d0d12a64.entry.js → p-f1037168.entry.js} +1 -1
- package/dist/zonos-elements/{p-c6de2e40.system.entry.js → p-f42bffad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b4910fe.system.entry.js → p-f62b49aa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fa3d0aea.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-5a88b4f3.js +0 -1
- package/dist/esm-es5/isColorVariable-91c33804.js +0 -1
- package/dist/esm-es5/submitGtag-289ddd8b.js +0 -1
- package/dist/esm-es5/zonos-button_3.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +0 -1
- package/dist/zonos-elements/p-144f4d31.entry.js +0 -1
- package/dist/zonos-elements/p-4569bc92.js +0 -1
- package/dist/zonos-elements/p-49a5be72.js +0 -1
- package/dist/zonos-elements/p-4c414a92.js +0 -1
- package/dist/zonos-elements/p-5c991faa.system.entry.js +0 -1
- package/dist/zonos-elements/p-691d8075.entry.js +0 -1
- package/dist/zonos-elements/p-723628b7.js +0 -1
- package/dist/zonos-elements/p-87c4ac09.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f532a3f.entry.js +0 -1
- package/dist/zonos-elements/p-afc0460d.entry.js +0 -1
- package/dist/zonos-elements/p-ca6b4c1e.system.entry.js +0 -1
- package/dist/zonos-elements/p-d2885590.system.js +0 -1
- package/dist/zonos-elements/p-d7690752.system.entry.js +0 -1
- package/dist/zonos-elements/p-d9c65636.system.js +0 -1
- package/dist/zonos-elements/p-dd153a4e.entry.js +0 -1
- package/dist/zonos-elements/p-def8823e.entry.js +0 -1
- package/dist/zonos-elements/p-e4749f19.js +0 -1
- package/dist/zonos-elements/p-e87e8c9c.system.entry.js +0 -1
- package/dist/zonos-elements/p-f1170e7b.entry.js +0 -1
- package/dist/zonos-elements/p-fe0930e4.system.entry.js +0 -1
|
@@ -4,6 +4,7 @@ import { c as classes } from './classes.js';
|
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius.js';
|
|
5
5
|
import { i as isColorVariable } from './isColorVariable.js';
|
|
6
6
|
import { i as isDarkColor } from './isDarkColor.js';
|
|
7
|
+
import { g as getContrastColor } from './getContrastColor.js';
|
|
7
8
|
import { d as defineCustomElement$1 } from './zonos-spinner2.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -20,7 +21,20 @@ const getButtonTheme = (overrideBackground) => {
|
|
|
20
21
|
return buttonTheme;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Filter out all of the undefined values from the object so we don't have undefined css variable values
|
|
26
|
+
*/
|
|
27
|
+
const styles = (props) => {
|
|
28
|
+
// loop through the object and filter out all of the underfined values
|
|
29
|
+
return Object.entries(props).reduce((acc, [key, value]) => {
|
|
30
|
+
if (value) {
|
|
31
|
+
acc[key] = value;
|
|
32
|
+
}
|
|
33
|
+
return acc;
|
|
34
|
+
}, {});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const zonosButtonCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));margin:1px;}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--amino-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--subtle-hover-color, var(--amino-gray-100))}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--amino-radius-4);width:24px}";
|
|
24
38
|
const ZonosButtonStyle0 = zonosButtonCss;
|
|
25
39
|
|
|
26
40
|
const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends HTMLElement {
|
|
@@ -81,12 +95,23 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
|
|
|
81
95
|
const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
|
|
82
96
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
83
97
|
const spinnerColor = buttonTheme === 'LIGHT' ? 'black' : 'white';
|
|
84
|
-
return (h(Host, { key: '
|
|
98
|
+
return (h(Host, { key: '75f5e6900c6e0eb468ea639460d55f251b580200', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
85
99
|
'--background-color': overrideBackground,
|
|
86
100
|
'--border-radius': borderStyle,
|
|
87
101
|
'--color': color,
|
|
88
102
|
'--font-family': zonosStoreFontFamily(),
|
|
89
|
-
|
|
103
|
+
'--subtle-hover-color': this.buttonColor
|
|
104
|
+
? // for the subtle variant, the hover background should contrast with the text color
|
|
105
|
+
getContrastColor({
|
|
106
|
+
backgroundColor: 'white',
|
|
107
|
+
color: isColorVariable(this.buttonColor)
|
|
108
|
+
? window
|
|
109
|
+
.getComputedStyle(this.ele)
|
|
110
|
+
.getPropertyValue(`--amino-${this.buttonColor}`)
|
|
111
|
+
: this.buttonColor,
|
|
112
|
+
})
|
|
113
|
+
: undefined,
|
|
114
|
+
}) }, h("button", { key: 'fd1323ac24be622182f9b60d8b026fb0ea47fa40', class: classes([
|
|
90
115
|
this.hasIcon && 'has-icon',
|
|
91
116
|
this.hasContent && 'has-content',
|
|
92
117
|
this.noBackground && 'no-background',
|
|
@@ -99,8 +124,9 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
|
|
|
99
124
|
overrideBackground &&
|
|
100
125
|
variant === 'standard' &&
|
|
101
126
|
'override-background',
|
|
102
|
-
]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '
|
|
127
|
+
]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '92706fef0545ba24e3f943d731bffa1e844ec154', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
103
128
|
}
|
|
129
|
+
get ele() { return this; }
|
|
104
130
|
static get watchers() { return {
|
|
105
131
|
"icon": ["iconChangeHandler"]
|
|
106
132
|
}; }
|
|
@@ -19,9 +19,9 @@ const ZonosCard = /*@__PURE__*/ proxyCustomElement(class ZonosCard extends HTMLE
|
|
|
19
19
|
this.spacing = '24px';
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: 'c2f25ffa32920500b63702df35b9e30dcf28b47d', style: {
|
|
23
23
|
'--font-family': zonosStoreFontFamily(),
|
|
24
|
-
} }, h("div", { key: '
|
|
24
|
+
} }, h("div", { key: '30515451d4694d3fffffab4c23ac2b0ff0e37710', class: classes(['styled-card']), style: { padding: this.spacing } }, this.label && (h("header", { class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { type: "subheader" }, this.label), h("h-stack", { spacing: 8 }, this.actions))), h("slot", { key: 'a1ced320f20a585c7201fc5c7b0729ce8e91a176' }), (this.footerActions || this.footerContent) && (h("footer", { class: "card-footer", style: {
|
|
25
25
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
26
26
|
padding: this.spacing,
|
|
27
27
|
} }, h("div", null, this.footerContent), h("h-stack", { spacing: 8 }, this.footerActions))))));
|
|
@@ -46,14 +46,14 @@ const ZonosCheckbox = /*@__PURE__*/ proxyCustomElement(class ZonosCheckbox exten
|
|
|
46
46
|
? 'var(--amino-gray-800)'
|
|
47
47
|
: 'var(--amino-gray-0)';
|
|
48
48
|
const borderStyle = getBorderRadius(this.borderStyle, '4px');
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '2ae2a0d33d34aafe96cc91e1cd7c7ee530dede4b', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
50
50
|
'--background-color': backgroundColor,
|
|
51
51
|
'--border-radius': borderStyle,
|
|
52
52
|
'--font-family': zonosStoreFontFamily(),
|
|
53
53
|
'--size': `${this.size}px`,
|
|
54
|
-
} }, h("label", { key: '
|
|
54
|
+
} }, h("label", { key: 'b9630027581a9f20374c2dfe88faa94cb50203c9', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: 'd1b2411d9f906692f18514a15df1bb290f662164', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
55
55
|
this.checkboxSelected.emit(e.target.checked);
|
|
56
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
56
|
+
}, type: "checkbox" }), h("span", { key: '8fc3cda232615f446aff5db71cd992de5327b8e7', class: "checkmark-container" }, h("svg", { key: '5b91a7a26abfd80850eb3c2bb2e045ef73abfd7a', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '2046a40a75da63ac288c5def90d82ab0d0e0523c', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { size: this.fontSize }, this.label)))));
|
|
57
57
|
}
|
|
58
58
|
static get style() { return ZonosCheckboxStyle0; }
|
|
59
59
|
}, [1, "zonos-checkbox", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { r as handleFetch, q as stripeStoreReset, c as cartStore, s as stripeStore, u as stripeStoreRetrievePayment, t as translate } from './stripe.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore.js';
|
|
4
4
|
import { t as trackConversionEvent } from './trackConversionEvent.js';
|
|
5
5
|
import { g as getBorderRadius } from './getBorderRadius.js';
|
|
@@ -9,6 +9,16 @@ import { d as defineCustomElement$3 } from './zonos-icon2.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
|
+
/**
|
|
13
|
+
* Strongly typed custom event creation for all available events in zonos-checkout project
|
|
14
|
+
*/
|
|
15
|
+
const createCustomEvent = (eventName, detail) => {
|
|
16
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
17
|
+
return new CustomEvent(eventName, {
|
|
18
|
+
detail,
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
12
22
|
const sendErrorLog = async ({ endpoint, errors, metadata }) => {
|
|
13
23
|
const userAgentData = 'userAgentData' in window.navigator
|
|
14
24
|
? // userAgentData is not yet supported in all browsers
|
|
@@ -126,10 +136,8 @@ const ZonosCheckoutFinish = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout
|
|
|
126
136
|
void trackConversionEvent('checkout_paymentInfoCompleted', {
|
|
127
137
|
paymentMethod,
|
|
128
138
|
});
|
|
129
|
-
const successEvent =
|
|
130
|
-
|
|
131
|
-
message: 'Zonos Checkout successfully processed order',
|
|
132
|
-
},
|
|
139
|
+
const successEvent = createCustomEvent('zonos-checkout-success', {
|
|
140
|
+
message: 'Zonos Checkout successfully processed order',
|
|
133
141
|
});
|
|
134
142
|
document.dispatchEvent(successEvent);
|
|
135
143
|
}
|
|
@@ -179,7 +187,7 @@ const ZonosCheckoutFinish = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout
|
|
|
179
187
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
180
188
|
// return acc + item.quantity;
|
|
181
189
|
// }, 0);
|
|
182
|
-
return (h(Host, { key: '
|
|
190
|
+
return (h(Host, { key: '8c2087b3a0578cbbd7979fff5e6b696a4325e548', class: "zonos--checkout-finish zonos--elements", style: {
|
|
183
191
|
'--border-radius': getBorderRadius(this.borderRadius),
|
|
184
192
|
} }, this.isLoading && (h("div", { class: "loading-wrapper" }, h("zonos-spinner", null))), !this.isLoading && (h(Fragment, null, h("div", { class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", null, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Keep shopping')))))));
|
|
185
193
|
}
|
|
@@ -229,4 +237,4 @@ function defineCustomElement() {
|
|
|
229
237
|
} });
|
|
230
238
|
}
|
|
231
239
|
|
|
232
|
-
export { ZonosCheckoutFinish as Z, defineCustomElement as d, sendErrorLog as s };
|
|
240
|
+
export { ZonosCheckoutFinish as Z, createCustomEvent as c, defineCustomElement as d, sendErrorLog as s };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { a as localizationStore } from './stripe.js';
|
|
3
|
-
import {
|
|
3
|
+
import { i as isCheckoutMobile } from './isCheckoutMobile.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
|
-
import { i as isDarkColor } from './isDarkColor.js';
|
|
6
5
|
import { l as languages } from './ILanguage.js';
|
|
7
6
|
import { d as defineCustomElement$7 } from './zonos-button2.js';
|
|
8
7
|
import { d as defineCustomElement$6 } from './zonos-icon2.js';
|
|
@@ -24,7 +23,7 @@ const ZonosIcon = `<svg width="105" height="29" viewBox="0 0 105 29" fill="none"
|
|
|
24
23
|
</svg>
|
|
25
24
|
`;
|
|
26
25
|
|
|
27
|
-
const zonosCheckoutFooterCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host
|
|
26
|
+
const zonosCheckoutFooterCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:absolute;bottom:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);gap:var(--amino-space-16);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-12);-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{line-height:0}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--amino-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8);position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:var(--amino-space-4)}}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--amino-surface-color);-webkit-box-shadow:var(--amino-v3-shadow-xl);box-shadow:var(--amino-v3-shadow-xl);border-radius:var(--amino-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:10005;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--amino-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:var(--amino-space-32);background:var(--amino-gray-0);position:relative;padding-top:var(--amino-space-24);bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}";
|
|
28
27
|
const ZonosCheckoutFooterStyle0 = zonosCheckoutFooterCss;
|
|
29
28
|
|
|
30
29
|
const ZonosCheckoutFooter = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutFooter extends HTMLElement {
|
|
@@ -32,31 +31,48 @@ const ZonosCheckoutFooter = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout
|
|
|
32
31
|
super();
|
|
33
32
|
this.__registerHost();
|
|
34
33
|
this.__attachShadow();
|
|
35
|
-
this.
|
|
34
|
+
this.mobile = false;
|
|
35
|
+
this.dataTheme = undefined;
|
|
36
|
+
this.showLanguageDialog = false;
|
|
37
|
+
this.isMobile = false;
|
|
36
38
|
}
|
|
37
39
|
handleGlobalClick(e) {
|
|
38
|
-
if (!this.el.contains(e.target) && this.
|
|
39
|
-
this.
|
|
40
|
+
if (!this.el.contains(e.target) && this.showLanguageDialog) {
|
|
41
|
+
this.showLanguageDialog = false;
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
this.
|
|
44
|
+
toggleLanguageDialog() {
|
|
45
|
+
this.showLanguageDialog = !this.showLanguageDialog;
|
|
46
|
+
}
|
|
47
|
+
handleMobileChange() {
|
|
48
|
+
this.isMobile = isCheckoutMobile(this.mobile);
|
|
49
|
+
}
|
|
50
|
+
componentWillLoad() {
|
|
51
|
+
this.isMobile = isCheckoutMobile(this.mobile);
|
|
44
52
|
}
|
|
45
53
|
render() {
|
|
46
|
-
var _a
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
return (h(Host, { key: '
|
|
54
|
+
var _a;
|
|
55
|
+
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
56
|
+
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
57
|
+
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1200';
|
|
58
|
+
return (h(Host, { key: '2ce26e27b7c90b4d37f26197821ed1a39ddb9fae', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: '5f52ec7b5ad1659ceb9d2edb4661e5995b72afaf', class: "zonos--checkout-footer" }, h("div", { key: '5d127f033702bff94cc2db76b4695a03055ec783', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: '701b5014848ea716f7dcc22221b453146af92962', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'e2a319113905bd76473aef822780521f2be58405', class: classes([
|
|
51
59
|
'zonos--checkout-footer-dialog',
|
|
52
|
-
this.
|
|
53
|
-
]) }, h("zonos-language-select", { key: '
|
|
60
|
+
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
61
|
+
]) }, h("zonos-language-select", { key: '4fb9860a4547541f3947d349ab6056e899335952', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: '0a348521a7ccecc23a7a69019940c2421bb8420c', class: "zonos--checkout-footer-icon-wrapper" }, h("zonos-text", { key: '9adf4c24fcf1b5d0827556e9e68006860b0bb9c4', textColor: colorDesktop, type: "caption" }, "Powered by"), h("a", { key: 'a3f957e10d14d68d3973169470a21fdabb2f7a06', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '49592d8302447d007dc840de18fa78af7898f382', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 }))))));
|
|
54
62
|
}
|
|
55
63
|
get el() { return this; }
|
|
64
|
+
static get watchers() { return {
|
|
65
|
+
"mobile": ["handleMobileChange"]
|
|
66
|
+
}; }
|
|
56
67
|
static get style() { return ZonosCheckoutFooterStyle0; }
|
|
57
68
|
}, [1, "zonos-checkout-footer", {
|
|
58
|
-
"
|
|
59
|
-
|
|
69
|
+
"mobile": [4],
|
|
70
|
+
"dataTheme": [1, "data-theme"],
|
|
71
|
+
"showLanguageDialog": [32],
|
|
72
|
+
"isMobile": [32]
|
|
73
|
+
}, [[4, "click", "handleGlobalClick"]], {
|
|
74
|
+
"mobile": ["handleMobileChange"]
|
|
75
|
+
}]);
|
|
60
76
|
function defineCustomElement() {
|
|
61
77
|
if (typeof customElements === "undefined") {
|
|
62
78
|
return;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ZonosCheckoutProgressTabs extends Components.ZonosCheckoutProgressTabs, HTMLElement {}
|
|
4
|
+
export const ZonosCheckoutProgressTabs: {
|
|
5
|
+
prototype: ZonosCheckoutProgressTabs;
|
|
6
|
+
new (): ZonosCheckoutProgressTabs;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Z as ZonosCheckoutProgressTabs$1, d as defineCustomElement$1 } from './zonos-checkout-progress-tabs2.js';
|
|
2
|
+
|
|
3
|
+
const ZonosCheckoutProgressTabs = ZonosCheckoutProgressTabs$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { ZonosCheckoutProgressTabs, defineCustomElement };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as cartStore, t as translate } from './stripe.js';
|
|
3
|
+
import { z as zonosStore } from './zonosStore.js';
|
|
4
|
+
import { c as classes } from './classes.js';
|
|
5
|
+
import { g as getContrastColor } from './getContrastColor.js';
|
|
6
|
+
import { i as isColorVariable } from './isColorVariable.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './zonos-icon2.js';
|
|
8
|
+
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
9
|
+
|
|
10
|
+
const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>
|
|
12
|
+
</svg>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
16
|
+
const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
|
|
17
|
+
|
|
18
|
+
const ZonosCheckoutProgressTabs = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutProgressTabs extends HTMLElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.__registerHost();
|
|
22
|
+
this.__attachShadow();
|
|
23
|
+
/**
|
|
24
|
+
* The total number of steps that's done
|
|
25
|
+
*/
|
|
26
|
+
this.getTotalSuccessStep = () => {
|
|
27
|
+
// include the finish step
|
|
28
|
+
const totalSteps = 4;
|
|
29
|
+
const stepDone = Object.values(cartStore.tabItems).filter(tab => tab.isDone).length + 1;
|
|
30
|
+
return `${(stepDone / totalSteps) * 100}%`;
|
|
31
|
+
};
|
|
32
|
+
this.isTabClickable = (tabValue) => {
|
|
33
|
+
const currentTab = cartStore.tabItems[tabValue];
|
|
34
|
+
if (!currentTab) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
// clickable if the tab state is done
|
|
38
|
+
if (currentTab.isDone) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
// if any of the previous tabs are not done, the tab is not clickable
|
|
42
|
+
return Object.values(cartStore.tabItems)
|
|
43
|
+
.slice(0, currentTab.index - 1)
|
|
44
|
+
.every(tab => tab.isDone);
|
|
45
|
+
};
|
|
46
|
+
this.tabColor = null;
|
|
47
|
+
this.backgroundColor = null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Set the tab items data. This is to be used in storybook
|
|
51
|
+
*/
|
|
52
|
+
async setTabItems(tabItems) {
|
|
53
|
+
cartStore.tabItems = tabItems;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Set selected tab. Only set the tab if it's clickable
|
|
57
|
+
*/
|
|
58
|
+
async setTabSelected(tabValue) {
|
|
59
|
+
if (this.isTabClickable(tabValue)) {
|
|
60
|
+
cartStore.step = tabValue;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
const selectedStep = cartStore.step;
|
|
65
|
+
const labelSelectedColor = this.tabColor || zonosStore.appearance.colorSecondary;
|
|
66
|
+
// If the background color and the tab color are not contrat enough, increase the contrast of the label color
|
|
67
|
+
const contrastLabelColor = this.backgroundColor && labelSelectedColor
|
|
68
|
+
? getContrastColor({
|
|
69
|
+
backgroundColor: isColorVariable(this.backgroundColor)
|
|
70
|
+
? window
|
|
71
|
+
.getComputedStyle(this.ele)
|
|
72
|
+
.getPropertyValue(`--amino-${this.backgroundColor.replace('--amino-', '')}`)
|
|
73
|
+
: this.backgroundColor,
|
|
74
|
+
color: labelSelectedColor,
|
|
75
|
+
})
|
|
76
|
+
: labelSelectedColor;
|
|
77
|
+
return (h(Host, { key: 'e79dc4967096d3b6f0ac25d58f02e77f773c8e95', class: "zonos--elements", style: {
|
|
78
|
+
'--color': contrastLabelColor,
|
|
79
|
+
'--progress-percent': this.getTotalSuccessStep(),
|
|
80
|
+
} }, h("div", { key: '20e500d31c28ee0705c1999e0f258b679af9d73a', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
81
|
+
const isSelected = tab.value === selectedStep;
|
|
82
|
+
return (h("button", { class: classes([
|
|
83
|
+
'zonos--tab-item',
|
|
84
|
+
tab.value === selectedStep && 'selected',
|
|
85
|
+
tab.isDone && 'done',
|
|
86
|
+
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, translate(tab.label))));
|
|
87
|
+
})), h("div", { key: '129502b873f339192ef5f4c67ac8c06d533ccfca', class: "zonos--tab-progress" }, h("div", { key: '728a074d6a411b400be30929bf9a5fdc8431745d', class: "zonos--progress-bar-fill" }))));
|
|
88
|
+
}
|
|
89
|
+
static get assetsDirs() { return ["assets"]; }
|
|
90
|
+
get ele() { return this; }
|
|
91
|
+
static get style() { return ZonosCheckoutProgressTabsStyle0; }
|
|
92
|
+
}, [1, "zonos-checkout-progress-tabs", {
|
|
93
|
+
"tabColor": [1, "tab-color"],
|
|
94
|
+
"backgroundColor": [1, "background-color"],
|
|
95
|
+
"setTabItems": [64],
|
|
96
|
+
"setTabSelected": [64]
|
|
97
|
+
}]);
|
|
98
|
+
function defineCustomElement() {
|
|
99
|
+
if (typeof customElements === "undefined") {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const components = ["zonos-checkout-progress-tabs", "zonos-icon", "zonos-text"];
|
|
103
|
+
components.forEach(tagName => { switch (tagName) {
|
|
104
|
+
case "zonos-checkout-progress-tabs":
|
|
105
|
+
if (!customElements.get(tagName)) {
|
|
106
|
+
customElements.define(tagName, ZonosCheckoutProgressTabs);
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
case "zonos-icon":
|
|
110
|
+
if (!customElements.get(tagName)) {
|
|
111
|
+
defineCustomElement$2();
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case "zonos-text":
|
|
115
|
+
if (!customElements.get(tagName)) {
|
|
116
|
+
defineCustomElement$1();
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
} });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { ZonosCheckoutProgressTabs as Z, defineCustomElement as d };
|