@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
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { cartStore, } from "../../store/checkout/cart";
|
|
3
|
+
import { translate } from "../../store/translationStore";
|
|
4
|
+
import { zonosStore } from "../../store/zonosStore";
|
|
5
|
+
import { classes } from "../../utils/classes";
|
|
6
|
+
import { getContrastColor } from "../../utils/getContrastColor";
|
|
7
|
+
import { isColorVariable } from "../../utils/isColorVariable";
|
|
8
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
9
|
+
import TabCheckmark from "./assets/TabCheckmark.svg";
|
|
10
|
+
export class ZonosCheckoutProgressTabs {
|
|
11
|
+
constructor() {
|
|
12
|
+
/**
|
|
13
|
+
* The total number of steps that's done
|
|
14
|
+
*/
|
|
15
|
+
this.getTotalSuccessStep = () => {
|
|
16
|
+
// include the finish step
|
|
17
|
+
const totalSteps = 4;
|
|
18
|
+
const stepDone = Object.values(cartStore.tabItems).filter(tab => tab.isDone).length + 1;
|
|
19
|
+
return `${(stepDone / totalSteps) * 100}%`;
|
|
20
|
+
};
|
|
21
|
+
this.isTabClickable = (tabValue) => {
|
|
22
|
+
const currentTab = cartStore.tabItems[tabValue];
|
|
23
|
+
if (!currentTab) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
// clickable if the tab state is done
|
|
27
|
+
if (currentTab.isDone) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
// if any of the previous tabs are not done, the tab is not clickable
|
|
31
|
+
return Object.values(cartStore.tabItems)
|
|
32
|
+
.slice(0, currentTab.index - 1)
|
|
33
|
+
.every(tab => tab.isDone);
|
|
34
|
+
};
|
|
35
|
+
this.tabColor = null;
|
|
36
|
+
this.backgroundColor = null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Set the tab items data. This is to be used in storybook
|
|
40
|
+
*/
|
|
41
|
+
async setTabItems(tabItems) {
|
|
42
|
+
cartStore.tabItems = tabItems;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Set selected tab. Only set the tab if it's clickable
|
|
46
|
+
*/
|
|
47
|
+
async setTabSelected(tabValue) {
|
|
48
|
+
if (this.isTabClickable(tabValue)) {
|
|
49
|
+
cartStore.step = tabValue;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
const selectedStep = cartStore.step;
|
|
54
|
+
const labelSelectedColor = this.tabColor || zonosStore.appearance.colorSecondary;
|
|
55
|
+
// If the background color and the tab color are not contrat enough, increase the contrast of the label color
|
|
56
|
+
const contrastLabelColor = this.backgroundColor && labelSelectedColor
|
|
57
|
+
? getContrastColor({
|
|
58
|
+
backgroundColor: isColorVariable(this.backgroundColor)
|
|
59
|
+
? window
|
|
60
|
+
.getComputedStyle(this.ele)
|
|
61
|
+
.getPropertyValue(`--amino-${this.backgroundColor.replace('--amino-', '')}`)
|
|
62
|
+
: this.backgroundColor,
|
|
63
|
+
color: labelSelectedColor,
|
|
64
|
+
})
|
|
65
|
+
: labelSelectedColor;
|
|
66
|
+
return (h(Host, { key: 'e79dc4967096d3b6f0ac25d58f02e77f773c8e95', class: "zonos--elements", style: {
|
|
67
|
+
'--color': contrastLabelColor,
|
|
68
|
+
'--progress-percent': this.getTotalSuccessStep(),
|
|
69
|
+
} }, h("div", { key: '20e500d31c28ee0705c1999e0f258b679af9d73a', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
70
|
+
const isSelected = tab.value === selectedStep;
|
|
71
|
+
return (h("button", { class: classes([
|
|
72
|
+
'zonos--tab-item',
|
|
73
|
+
tab.value === selectedStep && 'selected',
|
|
74
|
+
tab.isDone && 'done',
|
|
75
|
+
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, translate(tab.label))));
|
|
76
|
+
})), h("div", { key: '129502b873f339192ef5f4c67ac8c06d533ccfca', class: "zonos--tab-progress" }, h("div", { key: '728a074d6a411b400be30929bf9a5fdc8431745d', class: "zonos--progress-bar-fill" }))));
|
|
77
|
+
}
|
|
78
|
+
static get is() { return "zonos-checkout-progress-tabs"; }
|
|
79
|
+
static get encapsulation() { return "shadow"; }
|
|
80
|
+
static get originalStyleUrls() {
|
|
81
|
+
return {
|
|
82
|
+
"$": ["zonos-checkout-progress-tabs.scss"]
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
static get styleUrls() {
|
|
86
|
+
return {
|
|
87
|
+
"$": ["zonos-checkout-progress-tabs.css"]
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
static get assetsDirs() { return ["assets"]; }
|
|
91
|
+
static get properties() {
|
|
92
|
+
return {
|
|
93
|
+
"tabColor": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "string | null",
|
|
98
|
+
"resolved": "null | string | undefined",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": true,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": "Color of the tab progress bar and label, override the secondary color of the appearance settings"
|
|
106
|
+
},
|
|
107
|
+
"attribute": "tab-color",
|
|
108
|
+
"reflect": false,
|
|
109
|
+
"defaultValue": "null"
|
|
110
|
+
},
|
|
111
|
+
"backgroundColor": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"mutable": false,
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "Color | (string & { _placeholder?: never }) | null",
|
|
116
|
+
"resolved": "Color | (string & { _placeholder?: undefined; }) | null | undefined",
|
|
117
|
+
"references": {
|
|
118
|
+
"Color": {
|
|
119
|
+
"location": "import",
|
|
120
|
+
"path": "src/types/styles/Color",
|
|
121
|
+
"id": "src/types/styles/Color.ts::Color"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": true,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "Background color of the parent that's wrapped around the tab progress bar"
|
|
130
|
+
},
|
|
131
|
+
"attribute": "background-color",
|
|
132
|
+
"reflect": false,
|
|
133
|
+
"defaultValue": "null"
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static get methods() {
|
|
138
|
+
return {
|
|
139
|
+
"setTabItems": {
|
|
140
|
+
"complexType": {
|
|
141
|
+
"signature": "(tabItems: TabItems) => Promise<void>",
|
|
142
|
+
"parameters": [{
|
|
143
|
+
"name": "tabItems",
|
|
144
|
+
"type": "{ \"customer-info\": TabItem; shipping: TabItem; payment: TabItem; }",
|
|
145
|
+
"docs": ""
|
|
146
|
+
}],
|
|
147
|
+
"references": {
|
|
148
|
+
"Promise": {
|
|
149
|
+
"location": "global",
|
|
150
|
+
"id": "global::Promise"
|
|
151
|
+
},
|
|
152
|
+
"TabItems": {
|
|
153
|
+
"location": "import",
|
|
154
|
+
"path": "src/components/store/checkout/cart",
|
|
155
|
+
"id": "src/components/store/checkout/cart.ts::TabItems"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"return": "Promise<void>"
|
|
159
|
+
},
|
|
160
|
+
"docs": {
|
|
161
|
+
"text": "Set the tab items data. This is to be used in storybook",
|
|
162
|
+
"tags": []
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"setTabSelected": {
|
|
166
|
+
"complexType": {
|
|
167
|
+
"signature": "(tabValue: TabItem['value']) => Promise<void>",
|
|
168
|
+
"parameters": [{
|
|
169
|
+
"name": "tabValue",
|
|
170
|
+
"type": "\"customer-info\" | \"shipping\" | \"payment\"",
|
|
171
|
+
"docs": ""
|
|
172
|
+
}],
|
|
173
|
+
"references": {
|
|
174
|
+
"Promise": {
|
|
175
|
+
"location": "global",
|
|
176
|
+
"id": "global::Promise"
|
|
177
|
+
},
|
|
178
|
+
"TabItem": {
|
|
179
|
+
"location": "import",
|
|
180
|
+
"path": "src/components/store/checkout/cart",
|
|
181
|
+
"id": "src/components/store/checkout/cart.ts::TabItem"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"return": "Promise<void>"
|
|
185
|
+
},
|
|
186
|
+
"docs": {
|
|
187
|
+
"text": "Set selected tab. Only set the tab if it's clickable",
|
|
188
|
+
"tags": []
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
static get elementRef() { return "ele"; }
|
|
194
|
+
}
|
|
@@ -42,10 +42,10 @@ export class ZonosCollapse {
|
|
|
42
42
|
// set overflow to hidden to prevent content from showing when collapsed
|
|
43
43
|
this.el.style.overflow = 'hidden';
|
|
44
44
|
}
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '032f5818dd8394b5111927907c8fa135a55fef5c', class: 'zonos--elements zonos--collapse', style: {
|
|
46
46
|
'--font-family': zonosStoreFontFamily(),
|
|
47
47
|
height: this.getElementHeight(),
|
|
48
|
-
} }, h("div", { key: '
|
|
48
|
+
} }, h("div", { key: '5ddbf406c93f37c9e23375f11dd8439934c0d2a5' }, h("iframe", { key: 'b3efa8bc198918dbb3284e8ce658ffca6249eaa8', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'ffcd123c3a046e62855a650da9972cde94a7774c' }))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "zonos-collapse"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -35,9 +35,9 @@ export class ZonosCountrySelect {
|
|
|
35
35
|
const filteredCountries = this.inputValue
|
|
36
36
|
? fuseObject.map(country => country.item)
|
|
37
37
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '0024a7061a593cf3c92fd7f6b5916aaac3a835c9', class: "zonos--elements", style: {
|
|
39
39
|
'--font-family': zonosStoreFontFamily(),
|
|
40
|
-
} }, h("div", { key: '
|
|
40
|
+
} }, h("div", { key: 'e6ef5d8cc13e731c94ee5ef037c02eac36d9bce6', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'f698da7688757b6728e99e0cecb21ac4ce586d30', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'd37801e6023262a582d3ecc6e3a39f505f7e82b8', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '6f053c963f5e25b5285a94070336650537bbdad3', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '3d3e180b204bf9fa0893fec7839f1d0d5c4740c1', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "zonos-country-select"; }
|
|
43
43
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,7 +8,7 @@ export class ZonosCustomMessage {
|
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
10
|
const messageWithLinks = formatStringWithLinks(this.message);
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: 'b09b7025fb55c4323aaa24ccb7e410d1638bed8a', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
13
|
} }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { innerHTML: messageWithLinks }))))));
|
|
14
14
|
}
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
justify-content: center;
|
|
61
61
|
z-index: 10002;
|
|
62
62
|
background: white;
|
|
63
|
+
border-radius: var(--border-radius, var(--amino-radius-10));
|
|
63
64
|
}
|
|
64
65
|
:host .zonos--dialog-layout {
|
|
65
66
|
width: 100vw;
|
|
@@ -86,7 +87,6 @@
|
|
|
86
87
|
outline: none;
|
|
87
88
|
box-shadow: var(--amino-v3-shadow-xxl);
|
|
88
89
|
border: var(--amino-border);
|
|
89
|
-
overflow: hidden;
|
|
90
90
|
display: flex;
|
|
91
91
|
flex-direction: column;
|
|
92
92
|
}
|
|
@@ -25,7 +25,6 @@ export class ZonosDialog {
|
|
|
25
25
|
this.noHeader = false;
|
|
26
26
|
this.noBodyPadding = false;
|
|
27
27
|
this.noBorder = false;
|
|
28
|
-
this.footerRightAction = null;
|
|
29
28
|
this.borderStyle = undefined;
|
|
30
29
|
this.noCloseButton = false;
|
|
31
30
|
this.noClickOutside = false;
|
|
@@ -48,7 +47,7 @@ export class ZonosDialog {
|
|
|
48
47
|
document.body.style.overflow = 'auto';
|
|
49
48
|
}
|
|
50
49
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
51
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'f0aee4766d2c62f3f4feff18c99dba62ea97ca06', class: classes([
|
|
52
51
|
'zonos--elements',
|
|
53
52
|
this.open && 'open',
|
|
54
53
|
this.isLoading && 'is-loading',
|
|
@@ -59,10 +58,10 @@ export class ZonosDialog {
|
|
|
59
58
|
'--font-family': zonosStoreFontFamily(),
|
|
60
59
|
'--height': this.height || 'initial',
|
|
61
60
|
'--width': this.width,
|
|
62
|
-
} }, h("div", { key: '
|
|
61
|
+
} }, h("div", { key: '42e8afd7ddc94ab9ec4951f4221e32729256694e', class: "zonos--backdrop" }), h("div", { key: '035c21c65ae5cabc12b41b6ad1684fa4dbc5b92e', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'b9a3299c9fb920f9af5783506b0489122b2eae11', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: 'f5e5a75782ca6acd4a2c004756b800f3c2558129', class: classes([
|
|
63
62
|
'zonos--body',
|
|
64
63
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
65
|
-
]) }, h("slot", { key: '
|
|
64
|
+
]) }, h("slot", { key: '3fe4ec47852e99f1dc5b6a7a84a8b918594b8b7f' })), h("slot", { key: '5515f4109274b178249c05c6e6c91fdc30ce528a', name: "dialog-footer" })))));
|
|
66
65
|
}
|
|
67
66
|
static get is() { return "zonos-dialog"; }
|
|
68
67
|
static get encapsulation() { return "shadow"; }
|
|
@@ -219,30 +218,6 @@ export class ZonosDialog {
|
|
|
219
218
|
"reflect": false,
|
|
220
219
|
"defaultValue": "false"
|
|
221
220
|
},
|
|
222
|
-
"footerRightAction": {
|
|
223
|
-
"type": "unknown",
|
|
224
|
-
"mutable": false,
|
|
225
|
-
"complexType": {
|
|
226
|
-
"original": "HTMLElement | null",
|
|
227
|
-
"resolved": "HTMLElement | null",
|
|
228
|
-
"references": {
|
|
229
|
-
"HTMLElement": {
|
|
230
|
-
"location": "global",
|
|
231
|
-
"id": "global::HTMLElement"
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
"required": false,
|
|
236
|
-
"optional": false,
|
|
237
|
-
"docs": {
|
|
238
|
-
"tags": [{
|
|
239
|
-
"name": "default",
|
|
240
|
-
"text": "null"
|
|
241
|
-
}],
|
|
242
|
-
"text": "The right area for the action in the footer"
|
|
243
|
-
},
|
|
244
|
-
"defaultValue": "null"
|
|
245
|
-
},
|
|
246
221
|
"borderStyle": {
|
|
247
222
|
"type": "string",
|
|
248
223
|
"mutable": false,
|
|
@@ -252,8 +227,8 @@ export class ZonosDialog {
|
|
|
252
227
|
"references": {
|
|
253
228
|
"ElementsUiStyle": {
|
|
254
229
|
"location": "import",
|
|
255
|
-
"path": "src/types",
|
|
256
|
-
"id": "src/types/
|
|
230
|
+
"path": "src/types/generated/graphql.customer.types",
|
|
231
|
+
"id": "src/types/generated/graphql.customer.types.ts::ElementsUiStyle"
|
|
257
232
|
}
|
|
258
233
|
}
|
|
259
234
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { zonosStoreFontFamily } from "../../store/zonosStore";
|
|
3
|
+
import { isColorVariable } from "../../utils/isColorVariable";
|
|
3
4
|
export class ZonosIcon {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.autoHeight = false;
|
|
@@ -11,9 +12,12 @@ export class ZonosIcon {
|
|
|
11
12
|
if (!this.content || !this.el.shadowRoot) {
|
|
12
13
|
return null;
|
|
13
14
|
}
|
|
15
|
+
const iconColor = isColorVariable(this.iconColor)
|
|
16
|
+
? `var(--amino-${this.iconColor})`
|
|
17
|
+
: this.iconColor;
|
|
14
18
|
this.el.shadowRoot.innerHTML = this.content;
|
|
15
19
|
return (h(Host, { class: "zonos--elements", style: {
|
|
16
|
-
'--color':
|
|
20
|
+
'--color': iconColor,
|
|
17
21
|
'--font-family': zonosStoreFontFamily(),
|
|
18
22
|
'--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
|
|
19
23
|
'--width': `${this.size}px`,
|
|
@@ -58,13 +62,13 @@ export class ZonosIcon {
|
|
|
58
62
|
"type": "string",
|
|
59
63
|
"mutable": false,
|
|
60
64
|
"complexType": {
|
|
61
|
-
"original": "Color",
|
|
62
|
-
"resolved": "
|
|
65
|
+
"original": "Color | (string & { _placeholder?: never })",
|
|
66
|
+
"resolved": "Color | (string & { _placeholder?: undefined; })",
|
|
63
67
|
"references": {
|
|
64
68
|
"Color": {
|
|
65
69
|
"location": "import",
|
|
66
|
-
"path": "src/types",
|
|
67
|
-
"id": "src/types/
|
|
70
|
+
"path": "src/types/styles/Color",
|
|
71
|
+
"id": "src/types/styles/Color.ts::Color"
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
},
|
|
@@ -16,9 +16,9 @@ export class ZonosLanguageSelect {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
const { selectedLocale } = localizationStore;
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '25e0e2be0bbac853efa9c26c1595a1d57461a1a1', class: "zonos--elements", style: {
|
|
20
20
|
'--font-family': zonosStoreFontFamily(),
|
|
21
|
-
} }, h("div", { key: '
|
|
21
|
+
} }, h("div", { key: 'b9f3a630f945570a9c0058bb0367e810b7650eb0', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: 'b30a41cc7f4eab57f15b48ffa3f7c0ad1e695e65', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'c6826b80ece54415befc388e57baa02d56472aef', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "zonos-language-select"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,11 +10,11 @@ export class ZonosLogo {
|
|
|
10
10
|
const filterColor = this.theme === 'DARK'
|
|
11
11
|
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
12
12
|
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '483016f5ffe43ea7742e895b5335212da6ec1d18', class: classes(['zonos--elements zonos--logo']), style: {
|
|
14
14
|
'--filter-color': filterColor,
|
|
15
15
|
'--font-family': zonosStoreFontFamily(),
|
|
16
16
|
'--width': this.width,
|
|
17
|
-
} }, h("img", { key: '
|
|
17
|
+
} }, h("img", { key: 'aed23717de194da43d48ee7b068f3e7568c0bbb3', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "zonos-logo"; }
|
|
20
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,8 +40,8 @@ export class ZonosLogo {
|
|
|
40
40
|
"references": {
|
|
41
41
|
"ElementsUiTheme": {
|
|
42
42
|
"location": "import",
|
|
43
|
-
"path": "src/types",
|
|
44
|
-
"id": "src/types/
|
|
43
|
+
"path": "src/types/generated/graphql.customer.types",
|
|
44
|
+
"id": "src/types/generated/graphql.customer.types.ts::ElementsUiTheme"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
},
|
package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js
CHANGED
|
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
|
|
|
8
8
|
this.label = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: 'e7867deee86e4a155c21db2618eafd6f3c6cea3b', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, h("zonos-v-stack", { key: '
|
|
13
|
+
} }, h("zonos-v-stack", { key: 'f7aedb0f819b61da26afd53add628bcddcca5d8a', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '7ec77c24a440a5d42965f657502506c769d3098c', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'bab0ffc53edd20840438e82c0067c1eae8f13ec7', type: "boldLabel" }, this.label), h("zonos-button", { key: 'a85fc2b745b25c07bcccfe60eb1f1e722c7999c2', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: 'fe932e62edd5f679061c76a62650885d4337363c' }))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-select-dialog-header"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js
CHANGED
|
@@ -24,11 +24,20 @@ export class ZonosShippingRichRadio {
|
|
|
24
24
|
this.borderColor = undefined;
|
|
25
25
|
this.borderStyle = undefined;
|
|
26
26
|
this.theme = undefined;
|
|
27
|
+
this.initialSelectedValue = undefined;
|
|
27
28
|
this.selectedItem = null;
|
|
28
29
|
}
|
|
30
|
+
componentWillLoad() {
|
|
31
|
+
// Set initial selected item
|
|
32
|
+
if (this.initialSelectedValue) {
|
|
33
|
+
this.selectedItem =
|
|
34
|
+
this.items.find(item => item.value === this.initialSelectedValue) ||
|
|
35
|
+
null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
29
38
|
render() {
|
|
30
39
|
var _a;
|
|
31
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: 'a1c2ace211e4d0b9d63a784028cc725bab7229e7', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--font-family': zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
|
|
32
41
|
var _a;
|
|
33
42
|
const selected = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value) === item.value;
|
|
34
43
|
return (h("div", { "aria-hidden": "true", class: classes([
|
|
@@ -81,8 +90,8 @@ export class ZonosShippingRichRadio {
|
|
|
81
90
|
"references": {
|
|
82
91
|
"Color": {
|
|
83
92
|
"location": "import",
|
|
84
|
-
"path": "src/types",
|
|
85
|
-
"id": "src/types/
|
|
93
|
+
"path": "src/types/styles/Color",
|
|
94
|
+
"id": "src/types/styles/Color.ts::Color"
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
97
|
},
|
|
@@ -104,8 +113,8 @@ export class ZonosShippingRichRadio {
|
|
|
104
113
|
"references": {
|
|
105
114
|
"ElementsUiStyle": {
|
|
106
115
|
"location": "import",
|
|
107
|
-
"path": "src/types",
|
|
108
|
-
"id": "src/types/
|
|
116
|
+
"path": "src/types/generated/graphql.customer.types",
|
|
117
|
+
"id": "src/types/generated/graphql.customer.types.ts::ElementsUiStyle"
|
|
109
118
|
}
|
|
110
119
|
}
|
|
111
120
|
},
|
|
@@ -127,8 +136,8 @@ export class ZonosShippingRichRadio {
|
|
|
127
136
|
"references": {
|
|
128
137
|
"ElementsUiTheme": {
|
|
129
138
|
"location": "import",
|
|
130
|
-
"path": "src/types",
|
|
131
|
-
"id": "src/types/
|
|
139
|
+
"path": "src/types/generated/graphql.customer.types",
|
|
140
|
+
"id": "src/types/generated/graphql.customer.types.ts::ElementsUiTheme"
|
|
132
141
|
}
|
|
133
142
|
}
|
|
134
143
|
},
|
|
@@ -140,6 +149,23 @@ export class ZonosShippingRichRadio {
|
|
|
140
149
|
},
|
|
141
150
|
"attribute": "theme",
|
|
142
151
|
"reflect": false
|
|
152
|
+
},
|
|
153
|
+
"initialSelectedValue": {
|
|
154
|
+
"type": "any",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "string | number",
|
|
158
|
+
"resolved": "number | string | undefined",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": true,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": "Initial selected value"
|
|
166
|
+
},
|
|
167
|
+
"attribute": "initial-selected-value",
|
|
168
|
+
"reflect": false
|
|
143
169
|
}
|
|
144
170
|
};
|
|
145
171
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { zonosStoreFontFamily } from "../../store/zonosStore";
|
|
3
3
|
import { classes } from "../../utils/classes";
|
|
4
|
+
import { isColorVariable } from "../../utils/isColorVariable";
|
|
4
5
|
import { textOptions, } from "../../../types/styles/Text";
|
|
5
6
|
export class ZonosText {
|
|
6
7
|
constructor() {
|
|
@@ -22,6 +23,9 @@ export class ZonosText {
|
|
|
22
23
|
const textSize = this.size || size || defaultSize;
|
|
23
24
|
const textWeight = this.weight || weight || defaultWeight;
|
|
24
25
|
const textTag = tag || defaultTag;
|
|
26
|
+
const actualTextColor = isColorVariable(this.textColor)
|
|
27
|
+
? `var(--amino-${this.textColor})`
|
|
28
|
+
: this.textColor;
|
|
25
29
|
const renderText = () => {
|
|
26
30
|
switch (textTag) {
|
|
27
31
|
case 'h2':
|
|
@@ -41,7 +45,7 @@ export class ZonosText {
|
|
|
41
45
|
`zonos--text-size-${textSize}`,
|
|
42
46
|
`zonos--text-weight-${textWeight}`,
|
|
43
47
|
]), style: {
|
|
44
|
-
'--color':
|
|
48
|
+
'--color': actualTextColor,
|
|
45
49
|
'--font-family': zonosStoreFontFamily(),
|
|
46
50
|
} }, renderText()));
|
|
47
51
|
}
|
|
@@ -63,8 +67,8 @@ export class ZonosText {
|
|
|
63
67
|
"type": "string",
|
|
64
68
|
"mutable": false,
|
|
65
69
|
"complexType": {
|
|
66
|
-
"original": "Color",
|
|
67
|
-
"resolved": "
|
|
70
|
+
"original": "Color | (string & { _placeholder?: never })",
|
|
71
|
+
"resolved": "Color | (string & { _placeholder?: undefined; })",
|
|
68
72
|
"references": {
|
|
69
73
|
"Color": {
|
|
70
74
|
"location": "import",
|
|
@@ -7,10 +7,10 @@ export class ZonosTooltip {
|
|
|
7
7
|
this.showTooltip = false;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'a23ad45e8f96b88b0feaf17690c6bdb75aacb12c', class: "zonos--elements" }, h("div", { key: 'b057f5ae304921f5fd50536cb5b7fb493120f1e7', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '396ac2ec3fcc8d49f8a346d1059cb096ef2e2874' }), h("div", { key: '4aa607dcc9c4c675224e9d7effd1e8ad2bdee097', class: classes([
|
|
11
11
|
this.showTooltip && 'zonos--show-tooltip',
|
|
12
12
|
'zonos--tooltip-content',
|
|
13
|
-
]) }, h("zonos-text", { key: '
|
|
13
|
+
]) }, h("zonos-text", { key: 'e69a1883f21f277be88e892a99ae6e66a9829a1c', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: 'cb901c3cd7d0931f157eddef8fe4286fbd66b66b', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-tooltip"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,9 +7,9 @@ export class VStack {
|
|
|
7
7
|
this.spacing = 24;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '3d9977f4c55f7f1047ec94dcc3a3c40105559c00', style: {
|
|
11
11
|
'--font-family': zonosStoreFontFamily(),
|
|
12
|
-
} }, h("div", { key: '
|
|
12
|
+
} }, h("div", { key: 'aa910d4f9a11d3d1a66836aed442726241b73273', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: 'ec50cc05f71018b4b6fef1288f1371ddde030a3a' }))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "zonos-v-stack"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class ZonosComponent {
|
|
|
10
10
|
return format(this.first, this.middle, this.last);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return h("div", { key: '
|
|
13
|
+
return h("div", { key: '9a5547114b58b739fb5d783f551bc345f067779d' }, "Hello, World! I'm ", this.getText());
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-component"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import debounce from "lodash/debounce";
|
|
3
3
|
import { localizationStore } from "../../store/hello/localization";
|
|
4
4
|
import { translate } from "../../store/translationStore";
|
|
5
|
-
import { zonosStore, } from "../../store/zonosStore";
|
|
5
|
+
import { getZonosStoreTheme, zonosStore, } from "../../store/zonosStore";
|
|
6
6
|
import { classes } from "../../utils/classes";
|
|
7
7
|
import { currencyConvert } from "../../utils/hello/currencyConversion/currencyConvert";
|
|
8
8
|
import { currencyConvertAndFormat } from "../../utils/hello/currencyConversion/currencyConvertAndFormat";
|
|
@@ -204,6 +204,8 @@ export class ZonosHello {
|
|
|
204
204
|
this.helloRef.setAttribute('data-zonos-hello-loaded', '');
|
|
205
205
|
this.updateHelloOnPageChange();
|
|
206
206
|
this.watchPriceChange();
|
|
207
|
+
// update theme to browser preference theme if appearance theme is system
|
|
208
|
+
this.handleAppearanceSettingsOverrideChange();
|
|
207
209
|
clearInterval(initInterval);
|
|
208
210
|
}
|
|
209
211
|
}, 100);
|
|
@@ -250,6 +252,13 @@ export class ZonosHello {
|
|
|
250
252
|
handleResize() {
|
|
251
253
|
debounce(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
|
|
252
254
|
}
|
|
255
|
+
handleAppearanceSettingsOverrideChange() {
|
|
256
|
+
var _a;
|
|
257
|
+
if ((_a = this.appearanceSettingsOverride) === null || _a === void 0 ? void 0 : _a.theme) {
|
|
258
|
+
// update theme to browser preference theme if appearance theme is system
|
|
259
|
+
this.appearanceSettingsOverride.theme = getZonosStoreTheme(this.appearanceSettingsOverride.theme);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
253
262
|
render() {
|
|
254
263
|
var _a, _b;
|
|
255
264
|
const isExcludedUrl = (_a = zonosStore.helloSettings.excludedUrlPatterns) === null || _a === void 0 ? void 0 : _a.some(pattern => new RegExp(pattern).test(window.location.href));
|
|
@@ -508,6 +517,12 @@ export class ZonosHello {
|
|
|
508
517
|
}
|
|
509
518
|
};
|
|
510
519
|
}
|
|
520
|
+
static get watchers() {
|
|
521
|
+
return [{
|
|
522
|
+
"propName": "appearanceSettingsOverride",
|
|
523
|
+
"methodName": "handleAppearanceSettingsOverrideChange"
|
|
524
|
+
}];
|
|
525
|
+
}
|
|
511
526
|
static get listeners() {
|
|
512
527
|
return [{
|
|
513
528
|
"name": "resize",
|