@zonos/elements 1.3.15-alpha.3 → 1.3.15
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/RemoveIcon-6c79a2a1.js +5 -0
- package/dist/cjs/{cart-1b1d39af.js → cart-db549f04.js} +976 -138
- package/dist/cjs/containsNonLatinChars-2be5129b.js +24 -0
- package/dist/cjs/{getBorderRadius-c8cc2bb3.js → getBorderRadius-44b3eca1.js} +4 -6
- package/dist/cjs/index-654a6001.js +1361 -0
- package/dist/cjs/isCheckoutMobile-f491ca7c.js +8 -0
- package/dist/cjs/{isDarkColor-f5473002.js → isDarkColor-01f45d3f.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{submitGtag-ab287a34.js → submitGtag-fd8acad5.js} +21 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +642 -0
- package/dist/cjs/zonos-badge_2.cjs.entry.js +7 -7
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/{zonos-button_2.cjs.entry.js → zonos-button_3.cjs.entry.js} +53 -13
- package/dist/cjs/zonos-card_2.cjs.entry.js +10 -10
- package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +135 -109
- package/dist/cjs/zonos-checkout.cjs.entry.js +18 -17
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +12 -12
- package/dist/cjs/zonos-elements.cjs.js +10 -10
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +8 -8
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-input.cjs.entry.js +57 -0
- package/dist/cjs/zonos-link.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +4 -4
- package/dist/cjs/zonos-notification.cjs.entry.js +4 -4
- package/dist/cjs/zonos-payment.cjs.entry.js +6 -6
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +7 -5
- package/dist/cjs/zonos-text.cjs.entry.js +3 -2
- package/dist/cjs/{zonosStore-aee974e0.js → zonosStore-d8bb0bda.js} +1 -1
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.css +62 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +80 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.css +59 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +148 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.css +115 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +429 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +6 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +135 -20
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- 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 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +17 -8
- package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +1 -0
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +22 -4
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- 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 +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +3 -3
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +6 -4
- package/dist/collection/components/common/zonos-input/zonos-input.css +176 -0
- package/dist/collection/components/common/zonos-input/zonos-input.js +193 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-notification/zonos-notification.js +2 -2
- 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 +4 -2
- package/dist/collection/components/common/zonos-text/zonos-text.js +1 -0
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +7 -8
- 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 +3 -3
- package/dist/collection/components/main/zonos-controller.js +2 -2
- package/dist/collection/components/store/checkout/stripe.js +153 -14
- package/dist/collection/components/store/translationStore/strings.arabic.js +36 -6
- package/dist/collection/components/store/translationStore/strings.base.js +36 -6
- package/dist/collection/components/store/translationStore/strings.chinese.js +36 -6
- package/dist/collection/components/store/translationStore/strings.danish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.dutch.js +36 -6
- package/dist/collection/components/store/translationStore/strings.french.js +36 -6
- package/dist/collection/components/store/translationStore/strings.german.js +36 -6
- package/dist/collection/components/store/translationStore/strings.hebrew.js +36 -6
- package/dist/collection/components/store/translationStore/strings.indonesian.js +36 -6
- package/dist/collection/components/store/translationStore/strings.italian.js +36 -6
- package/dist/collection/components/store/translationStore/strings.japanese.js +36 -6
- package/dist/collection/components/store/translationStore/strings.korean.js +36 -6
- package/dist/collection/components/store/translationStore/strings.norwegian.js +36 -6
- package/dist/collection/components/store/translationStore/strings.polish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.portuguese.js +36 -6
- package/dist/collection/components/store/translationStore/strings.russian.js +36 -6
- package/dist/collection/components/store/translationStore/strings.spanish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.swedish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.turkish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +36 -6
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -71
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +29 -5
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/buildTranslateRequestBody.js +98 -0
- package/dist/collection/components/utils/containsNonLatinChars.js +10 -8
- package/dist/collection/components/utils/getBorderRadius.js +3 -5
- package/dist/collection/styles/stripe/defaultVariable.js +2 -2
- package/dist/collection/types/checkout/TranslatedText.js +1 -0
- package/dist/collection/types/checkout/api/ValidateAddressRequest.js +1 -0
- package/dist/components/containsNonLatinChars.js +21 -0
- package/dist/components/getBorderRadius.js +3 -5
- package/dist/components/stripe.js +255 -4545
- package/dist/components/trackConversionEvent.js +1 -1
- package/dist/components/translationStore.js +5131 -0
- package/dist/components/zonos-address-display.d.ts +11 -0
- package/dist/components/zonos-address-display.js +6 -0
- package/dist/components/zonos-address-display2.js +64 -0
- package/dist/components/zonos-address-form.d.ts +11 -0
- package/dist/components/zonos-address-form.js +6 -0
- package/dist/components/zonos-address-form2.js +84 -0
- package/dist/components/zonos-address-update-dialog.d.ts +11 -0
- package/dist/components/zonos-address-update-dialog.js +6 -0
- package/dist/components/zonos-address-update-dialog2.js +264 -0
- package/dist/components/zonos-address2.js +3 -93
- package/dist/components/zonos-badge2.js +3 -3
- package/dist/components/zonos-button2.js +18 -9
- package/dist/components/zonos-card2.js +3 -3
- package/dist/components/zonos-cart-items2.js +1 -1
- package/dist/components/zonos-cart-subtotal2.js +2 -1
- package/dist/components/zonos-checkbox2.js +15 -6
- package/dist/components/zonos-checkout-finish2.js +26 -6
- package/dist/components/zonos-checkout-footer2.js +2 -2
- package/dist/components/zonos-checkout-payment2.js +2 -1
- package/dist/components/zonos-checkout-progress-tabs2.js +5 -4
- package/dist/components/zonos-checkout.js +71 -41
- 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 +2 -2
- package/dist/components/zonos-customer-info2.js +170 -29
- package/dist/components/zonos-dialog2.js +7 -5
- package/dist/components/zonos-hello-dialog-footer2.js +3 -3
- package/dist/components/zonos-hello-dialog2.js +5 -4
- package/dist/components/zonos-hello.js +2 -1
- package/dist/components/zonos-input.d.ts +11 -0
- package/dist/components/zonos-input.js +6 -0
- package/dist/components/zonos-input2.js +78 -0
- package/dist/components/zonos-language-select2.js +4 -3
- package/dist/components/zonos-link-authentication2.js +12 -5
- package/dist/components/zonos-link.js +1 -1
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-notification2.js +2 -2
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-review2.js +2 -1
- package/dist/components/zonos-select-dialog-header2.js +2 -2
- package/dist/components/zonos-shipping-rich-radio2.js +4 -2
- package/dist/components/zonos-shipping2.js +3 -2
- package/dist/components/zonos-text2.js +1 -0
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/esm/RemoveIcon-f6715b36.js +3 -0
- package/dist/esm/{cart-10bcd2e0.js → cart-462e89a6.js} +976 -139
- package/dist/esm/containsNonLatinChars-2d8810c3.js +21 -0
- package/dist/esm/{getBorderRadius-8129b0cb.js → getBorderRadius-567f1786.js} +4 -6
- package/dist/esm/index-e063389c.js +1328 -0
- package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
- package/dist/esm/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{submitGtag-84886899.js → submitGtag-ac7c3c89.js} +21 -3
- package/dist/esm/zonos-address_8.entry.js +631 -0
- package/dist/esm/zonos-badge_2.entry.js +7 -7
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/{zonos-button_2.entry.js → zonos-button_3.entry.js} +53 -14
- package/dist/esm/zonos-card_2.entry.js +10 -10
- package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +131 -104
- package/dist/esm/zonos-checkout.entry.js +13 -12
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +6 -6
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_3.entry.js +12 -12
- package/dist/esm/zonos-elements.js +11 -11
- package/dist/esm/zonos-hello-dialog.entry.js +8 -8
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-input.entry.js +53 -0
- package/dist/esm/zonos-link.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +4 -4
- package/dist/esm/zonos-notification.entry.js +4 -4
- package/dist/esm/zonos-payment.entry.js +6 -6
- package/dist/esm/zonos-select-dialog-header_2.entry.js +6 -6
- package/dist/esm/zonos-shipping-rich-radio.entry.js +7 -5
- package/dist/esm/zonos-text.entry.js +3 -2
- package/dist/esm/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
- package/dist/esm-es5/RemoveIcon-f6715b36.js +1 -0
- package/dist/esm-es5/cart-462e89a6.js +1 -0
- package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
- package/dist/esm-es5/getBorderRadius-567f1786.js +1 -0
- package/dist/esm-es5/index-e063389c.js +2 -0
- package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
- package/dist/esm-es5/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-ac7c3c89.js +1 -0
- package/dist/esm-es5/zonos-address_8.entry.js +1 -0
- 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_3.entry.js +1 -0
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.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-input.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-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
- package/dist/scripts/loadStripe.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/stripe.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-address-update-dialog/zonos-address-display/zonos-address-display.d.ts +12 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.d.ts +28 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.d.ts +96 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +22 -2
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +0 -3
- package/dist/types/components/common/zonos-input/zonos-input.d.ts +35 -0
- package/dist/types/components/store/checkout/stripe.d.ts +25 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.base.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.danish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.french.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.german.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.italian.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.korean.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.polish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.russian.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +35 -5
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -10
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +4 -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/checkout/buildTranslateRequestBody.d.ts +26 -0
- package/dist/types/components/utils/containsNonLatinChars.d.ts +1 -0
- package/dist/types/components/utils/getBorderRadius.d.ts +7 -1
- package/dist/types/components.d.ts +308 -6
- package/dist/types/types/checkout/TranslatedText.d.ts +23 -0
- package/dist/types/types/checkout/api/ValidateAddressRequest.d.ts +20 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +2 -0
- package/dist/types/types/generated/graphql.customer.types.ts +2 -0
- package/dist/zonos-elements/{p-593948b5.system.entry.js → p-029f11dd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-af8391bb.entry.js → p-094c0ee8.entry.js} +1 -1
- package/dist/zonos-elements/p-0c64dbbb.js +1 -0
- package/dist/zonos-elements/p-11504442.entry.js +1 -0
- package/dist/zonos-elements/p-11bef836.system.entry.js +1 -0
- package/dist/zonos-elements/{p-bc3a0f7c.entry.js → p-11f1b78c.entry.js} +1 -1
- package/dist/zonos-elements/p-13ddaf31.js +2 -0
- package/dist/zonos-elements/p-154aaf95.system.js +1 -0
- package/dist/zonos-elements/p-163ff5b5.system.js +2 -0
- package/dist/zonos-elements/{p-5ee8a685.entry.js → p-1e934274.entry.js} +1 -1
- package/dist/zonos-elements/p-20582e58.system.entry.js +1 -0
- package/dist/zonos-elements/{p-bfa8d9a4.system.entry.js → p-2439c82f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2670438c.system.js +1 -0
- package/dist/zonos-elements/p-321226b0.entry.js +1 -0
- package/dist/zonos-elements/{p-d149bc5d.system.entry.js → p-3221530d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e9fafda6.entry.js → p-32d27535.entry.js} +1 -1
- package/dist/zonos-elements/p-3d10866d.entry.js +1 -0
- package/dist/zonos-elements/{p-1a5f8df7.entry.js → p-3d8667a7.entry.js} +1 -1
- package/dist/zonos-elements/p-3f05d130.system.entry.js +1 -0
- package/dist/zonos-elements/p-430eefd4.entry.js +1 -0
- package/dist/zonos-elements/{p-fc35d717.system.entry.js → p-49825866.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5525b740.entry.js +1 -0
- package/dist/zonos-elements/p-578f0aad.system.js +1 -0
- package/dist/zonos-elements/{p-3e417d7c.entry.js → p-58a8ef6c.entry.js} +1 -1
- package/dist/zonos-elements/p-5d993965.js +1 -0
- package/dist/zonos-elements/{p-262b8e1e.system.entry.js → p-5f9c066d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-49120f0e.system.entry.js → p-60e262f0.system.entry.js} +1 -1
- package/dist/zonos-elements/p-64b594f4.js +1 -0
- package/dist/zonos-elements/{p-7891f8d2.entry.js → p-66471df6.entry.js} +1 -1
- package/dist/zonos-elements/{p-95c864ca.system.entry.js → p-679877b1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fc4da55c.system.js → p-771fbeb3.system.js} +1 -1
- package/dist/zonos-elements/p-79f3c4f5.system.js +1 -0
- package/dist/zonos-elements/{p-e1ac5b2a.system.entry.js → p-80d78980.system.entry.js} +1 -1
- package/dist/zonos-elements/p-81a54668.js +1 -0
- package/dist/zonos-elements/p-83cc2936.js +1 -0
- package/dist/zonos-elements/{p-520e8e63.system.js → p-87badea9.system.js} +1 -1
- package/dist/zonos-elements/p-8a61a04f.system.entry.js +1 -0
- package/dist/zonos-elements/p-8b32f560.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d01576d7.js → p-909a331c.js} +1 -1
- package/dist/zonos-elements/{p-031086ba.system.entry.js → p-94b15a5e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9768840a.system.entry.js → p-9a45fae5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-24fee841.entry.js → p-9ec93319.entry.js} +1 -1
- package/dist/zonos-elements/p-a6d7ac46.js +1 -0
- package/dist/zonos-elements/{p-2a99c8b5.system.entry.js → p-a6eeb4bd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1950dda7.entry.js → p-a93f2e84.entry.js} +1 -1
- package/dist/zonos-elements/p-aed0098c.system.js +1 -0
- package/dist/zonos-elements/{p-92446677.entry.js → p-b19d51e0.entry.js} +1 -1
- package/dist/zonos-elements/{p-46f9c93e.system.entry.js → p-b9652402.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3772fd3.entry.js → p-baee62a4.entry.js} +1 -1
- package/dist/zonos-elements/{p-eff12c31.system.entry.js → p-bf32179a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cd1cc224.entry.js +1 -0
- package/dist/zonos-elements/{p-ae4a4634.system.entry.js → p-d1b63cec.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d6b103d5.system.js +1 -0
- package/dist/zonos-elements/{p-376bdf70.entry.js → p-da6767d8.entry.js} +1 -1
- package/dist/zonos-elements/p-dde1383b.entry.js +1 -0
- package/dist/zonos-elements/p-df192668.system.js +1 -0
- package/dist/zonos-elements/{p-70ede197.system.entry.js → p-df24d548.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6743734f.entry.js → p-e7b4b756.entry.js} +1 -1
- package/dist/zonos-elements/{p-d41b5762.js → p-f1962041.js} +1 -1
- package/dist/zonos-elements/{p-a0abc499.system.entry.js → p-f3d3c754.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f79682b5.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.css +3 -3
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/index-3b4816ef.js +0 -2088
- package/dist/cjs/sendErrorLog-29e50f7e.js +0 -29
- package/dist/cjs/zonos-address_4.cjs.entry.js +0 -388
- package/dist/cjs/zonos-icon.cjs.entry.js +0 -39
- package/dist/components/sendErrorLog.js +0 -21
- package/dist/esm/index-0e31d804.js +0 -2055
- package/dist/esm/sendErrorLog-8642e94a.js +0 -26
- package/dist/esm/zonos-address_4.entry.js +0 -381
- package/dist/esm/zonos-icon.entry.js +0 -35
- package/dist/esm-es5/cart-10bcd2e0.js +0 -1
- package/dist/esm-es5/getBorderRadius-8129b0cb.js +0 -1
- package/dist/esm-es5/index-0e31d804.js +0 -2
- package/dist/esm-es5/sendErrorLog-8642e94a.js +0 -1
- package/dist/esm-es5/submitGtag-84886899.js +0 -1
- package/dist/esm-es5/zonos-address_4.entry.js +0 -1
- package/dist/esm-es5/zonos-button_2.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
- package/dist/esm-es5/zonos-icon.entry.js +0 -1
- package/dist/scripts/insertTranslations.js +0 -1
- package/dist/zonos-elements/p-0253aeae.entry.js +0 -1
- package/dist/zonos-elements/p-1264b362.entry.js +0 -1
- package/dist/zonos-elements/p-2244534c.js +0 -2
- package/dist/zonos-elements/p-2825570c.system.js +0 -2
- package/dist/zonos-elements/p-33abdb30.js +0 -1
- package/dist/zonos-elements/p-450942a3.system.js +0 -1
- package/dist/zonos-elements/p-48a2b8b0.entry.js +0 -1
- package/dist/zonos-elements/p-5ca09163.entry.js +0 -1
- package/dist/zonos-elements/p-5ff27485.js +0 -1
- package/dist/zonos-elements/p-6d9dbecb.system.entry.js +0 -1
- package/dist/zonos-elements/p-6e8d43de.entry.js +0 -1
- package/dist/zonos-elements/p-6f5761e8.js +0 -1
- package/dist/zonos-elements/p-78d22069.system.entry.js +0 -1
- package/dist/zonos-elements/p-8b44e558.system.js +0 -1
- package/dist/zonos-elements/p-8bc0e56a.system.entry.js +0 -1
- package/dist/zonos-elements/p-9350d19f.entry.js +0 -1
- package/dist/zonos-elements/p-9e8f1065.system.entry.js +0 -1
- package/dist/zonos-elements/p-a6bbf6de.system.entry.js +0 -1
- package/dist/zonos-elements/p-b8e8330b.system.js +0 -1
- package/dist/zonos-elements/p-be022d8e.entry.js +0 -1
- package/dist/zonos-elements/p-c6170bec.system.js +0 -1
- package/dist/zonos-elements/p-e705c44c.entry.js +0 -1
- package/dist/zonos-elements/p-ed2e94d2.js +0 -1
- package/dist/zonos-elements/p-f4c38bfc.system.js +0 -1
|
@@ -1,25 +1,60 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
|
-
import { stripeStore, } from "../../../store/checkout/stripe";
|
|
2
|
+
import { stripeStore, stripeStoreTranslateAddressToLatin, } from "../../../store/checkout/stripe";
|
|
3
3
|
import { translate } from "../../../store/translationStore";
|
|
4
|
+
import { getZonosStoreTheme, zonosStore, } from "../../../store/zonosStore";
|
|
4
5
|
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
6
|
+
import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
|
|
5
7
|
import { submitGtag } from "../../../utils/submitGtag";
|
|
6
8
|
export class ZonosCustomerInfo {
|
|
7
9
|
constructor() {
|
|
8
10
|
/**
|
|
9
|
-
*
|
|
11
|
+
* Handler for invalid characters in the address
|
|
10
12
|
*/
|
|
11
|
-
this.
|
|
12
|
-
if
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
this.handleInvalidCharacters = async () => {
|
|
14
|
+
// Do nothing if the allowed character sets is ALL
|
|
15
|
+
if (zonosStore.checkoutSettings.allowedCharacterSets === 'ALL') {
|
|
16
|
+
return { hasInvalidCharacters: false };
|
|
17
|
+
}
|
|
18
|
+
// Check if the address contains Non-Latin characters
|
|
19
|
+
this.invalidShippingCharacterList = stripeStore.stripeAddressEventData
|
|
20
|
+
? this.checkInvalidCharacters(stripeStore.stripeAddressEventData)
|
|
21
|
+
: null;
|
|
22
|
+
// if the shipping is the same as billing, we don't need to check the billing address
|
|
23
|
+
this.invalidBillingCharacterList = !stripeStore.stripeShippingSameAsBilling
|
|
24
|
+
? this.checkInvalidCharacters(stripeStore.stripeBillingAddressEventData)
|
|
25
|
+
: null;
|
|
26
|
+
const hasInvalidCharacters = !!this.invalidShippingCharacterList || !!this.invalidBillingCharacterList;
|
|
27
|
+
// send data to our api to translate the invalid characters
|
|
28
|
+
if (hasInvalidCharacters) {
|
|
29
|
+
// open the dialog
|
|
30
|
+
this.openAddressValidationDialog = true;
|
|
31
|
+
this.isValidatingAddress = true;
|
|
32
|
+
await stripeStoreTranslateAddressToLatin({
|
|
33
|
+
addressInvalidCharactersList: this.invalidShippingCharacterList,
|
|
34
|
+
billingAddressInvalidCharactersList: this.invalidBillingCharacterList,
|
|
35
|
+
});
|
|
36
|
+
this.isValidatingAddress = false;
|
|
37
|
+
}
|
|
38
|
+
return { hasInvalidCharacters };
|
|
39
|
+
};
|
|
40
|
+
this.transformTranslatedAddressToStripeEvent = ({ submitData, type, }) => {
|
|
41
|
+
let stripeEventDataObj = type === 'shippingAddress'
|
|
42
|
+
? stripeStore.stripeAddressEventData
|
|
43
|
+
: stripeStore.stripeBillingAddressEventData;
|
|
44
|
+
const submitDataByKey = submitData[type];
|
|
45
|
+
// this should never happen as they can only go to this step if the address is complete
|
|
46
|
+
if (!stripeEventDataObj || !submitDataByKey) {
|
|
21
47
|
return;
|
|
22
48
|
}
|
|
49
|
+
// overwrite the address object with the new data
|
|
50
|
+
stripeEventDataObj = Object.assign(Object.assign({}, stripeEventDataObj), { complete: true, value: Object.assign(Object.assign({}, stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value), { address: Object.assign(Object.assign({}, stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value.address), { city: submitDataByKey.city ||
|
|
51
|
+
(stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value.address.city) ||
|
|
52
|
+
'', line1: submitDataByKey.line1, line2: submitDataByKey.line2, postal_code: submitDataByKey.postal_code, state: submitDataByKey.state }), firstName: submitDataByKey.name.split(' ')[0], lastName: submitDataByKey.name.split(' ')[1], name: submitDataByKey.name }) });
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* handler for continue button click
|
|
56
|
+
*/
|
|
57
|
+
this.continueClickHandler = async () => {
|
|
23
58
|
if (!this.handleValidate()) {
|
|
24
59
|
// scroll to the top zonos-banner
|
|
25
60
|
setTimeout(() => {
|
|
@@ -34,6 +69,11 @@ export class ZonosCustomerInfo {
|
|
|
34
69
|
return;
|
|
35
70
|
}
|
|
36
71
|
this.showErrorBanner = false;
|
|
72
|
+
// check if the address contains invalid characters
|
|
73
|
+
const { hasInvalidCharacters } = await this.handleInvalidCharacters();
|
|
74
|
+
if (hasInvalidCharacters) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
37
77
|
this.continueClicked.emit();
|
|
38
78
|
// submit google tag when the form is complete
|
|
39
79
|
submitGtag('zonos-checkout-customer-info');
|
|
@@ -54,28 +94,83 @@ export class ZonosCustomerInfo {
|
|
|
54
94
|
}
|
|
55
95
|
return true;
|
|
56
96
|
};
|
|
97
|
+
this.prepareAddressObject = (stripeAddressEventData) => {
|
|
98
|
+
var _a;
|
|
99
|
+
const addressValue = stripeAddressEventData.value;
|
|
100
|
+
return {
|
|
101
|
+
city: addressValue.address.city || '',
|
|
102
|
+
country: addressValue.address.country,
|
|
103
|
+
email: ((_a = stripeStore.stripeLinkEventData) === null || _a === void 0 ? void 0 : _a.value.email) || '',
|
|
104
|
+
line1: addressValue.address.line1 || '',
|
|
105
|
+
line2: addressValue.address.line2 || '',
|
|
106
|
+
name: addressValue.name || '',
|
|
107
|
+
phone: addressValue.phone || '',
|
|
108
|
+
postal_code: addressValue.address.postal_code || '',
|
|
109
|
+
state: addressValue.address.state || '',
|
|
110
|
+
};
|
|
111
|
+
};
|
|
57
112
|
this.continueLoading = false;
|
|
58
113
|
this.submitBtnType = undefined;
|
|
59
114
|
this.submitBtnColor = undefined;
|
|
115
|
+
this.isMobile = false;
|
|
60
116
|
this.defaultAddress = null;
|
|
61
117
|
this.showErrorBanner = false;
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
118
|
+
this.isValidatingAddress = false;
|
|
119
|
+
this.invalidShippingCharacterList = null;
|
|
120
|
+
this.invalidBillingCharacterList = null;
|
|
121
|
+
this.openAddressValidationDialog = false;
|
|
122
|
+
}
|
|
123
|
+
checkInvalidCharacters(address) {
|
|
124
|
+
if (!address) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
// Do nothing if the allowed character sets is ALL or the address is incomplete
|
|
128
|
+
if (!address.complete ||
|
|
129
|
+
zonosStore.checkoutSettings.allowedCharacterSets === 'ALL') {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
const { address: addressValue, firstName, lastName, name } = address.value;
|
|
133
|
+
const { city, country, line1, line2, postal_code, state } = addressValue;
|
|
134
|
+
const invalidList = containsNonLatinChars({
|
|
135
|
+
city,
|
|
136
|
+
country,
|
|
137
|
+
line1,
|
|
138
|
+
line2: line2 || '',
|
|
139
|
+
name: name || `${firstName} ${lastName}`,
|
|
140
|
+
postal_code,
|
|
141
|
+
state,
|
|
142
|
+
});
|
|
143
|
+
if (!Object.keys(invalidList).length) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
return invalidList;
|
|
64
147
|
}
|
|
65
148
|
render() {
|
|
149
|
+
var _a;
|
|
66
150
|
if (!stripeStore.stripeElements) {
|
|
67
151
|
return null;
|
|
68
152
|
}
|
|
69
153
|
const showBilling = !stripeStore.stripeShippingSameAsBilling;
|
|
154
|
+
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
155
|
+
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
70
156
|
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
71
157
|
if (this.showErrorBanner) {
|
|
72
158
|
this.showErrorBanner = !this.handleValidate();
|
|
73
159
|
}
|
|
74
|
-
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress,
|
|
160
|
+
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { defaultEmail: (_a = this.defaultAddress) === null || _a === void 0 ? void 0 : _a.email, titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" }), h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
75
161
|
stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
76
|
-
} }), h("zonos-collapse", { collapsed: !showBilling }, h("zonos-address", { defaultAddress: this.defaultAddress,
|
|
162
|
+
} }), h("zonos-collapse", { collapsed: !showBilling }, h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Billing address'), type: "billing" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
77
163
|
// use primary type when on mobile mode
|
|
78
|
-
variant: this.submitBtnType }, translate('Continue to shipping'))))
|
|
164
|
+
variant: this.submitBtnType }, translate('Continue to shipping')))), stripeStore.stripeAddressEventData && (h("zonos-address-update-dialog", { billingAddress: !stripeStore.stripeShippingSameAsBilling &&
|
|
165
|
+
stripeStore.stripeBillingAddressEventData
|
|
166
|
+
? this.prepareAddressObject(stripeStore.stripeBillingAddressEventData)
|
|
167
|
+
: null, "data-theme": theme, dialogLoading: this.isValidatingAddress, dialogOpen: this.openAddressValidationDialog, isMobile: this.isMobile, onCloseDialog: () => (this.openAddressValidationDialog = false), onContinueClicked: e => {
|
|
168
|
+
const submitData = e.detail;
|
|
169
|
+
this.transformTranslatedAddressToStripeEvent({
|
|
170
|
+
submitData,
|
|
171
|
+
type: 'shippingAddress',
|
|
172
|
+
});
|
|
173
|
+
}, shippingAddress: this.prepareAddressObject(stripeStore.stripeAddressEventData), translatedBillingAddress: stripeStore.translatedAddress.billingAddress, translatedShippingAddress: stripeStore.translatedAddress.address }))));
|
|
79
174
|
}
|
|
80
175
|
static get is() { return "zonos-customer-info"; }
|
|
81
176
|
static get encapsulation() { return "scoped"; }
|
|
@@ -148,12 +243,30 @@ export class ZonosCustomerInfo {
|
|
|
148
243
|
"attribute": "submit-btn-color",
|
|
149
244
|
"reflect": false
|
|
150
245
|
},
|
|
246
|
+
"isMobile": {
|
|
247
|
+
"type": "boolean",
|
|
248
|
+
"mutable": false,
|
|
249
|
+
"complexType": {
|
|
250
|
+
"original": "boolean",
|
|
251
|
+
"resolved": "boolean",
|
|
252
|
+
"references": {}
|
|
253
|
+
},
|
|
254
|
+
"required": false,
|
|
255
|
+
"optional": false,
|
|
256
|
+
"docs": {
|
|
257
|
+
"tags": [],
|
|
258
|
+
"text": "Whether or not the dialog is open"
|
|
259
|
+
},
|
|
260
|
+
"attribute": "is-mobile",
|
|
261
|
+
"reflect": false,
|
|
262
|
+
"defaultValue": "false"
|
|
263
|
+
},
|
|
151
264
|
"defaultAddress": {
|
|
152
265
|
"type": "unknown",
|
|
153
266
|
"mutable": false,
|
|
154
267
|
"complexType": {
|
|
155
268
|
"original": "ContactOption | null",
|
|
156
|
-
"resolved": "null | { address: { city: string; country: string; line1: string; line2?: string | undefined; postal_code: string; state: string; }; name: string; phone?: string | undefined; }",
|
|
269
|
+
"resolved": "null | { address: { city: string; country: string; line1: string; line2?: string | undefined; postal_code: string; state: string; }; email: string; name: string; phone?: string | undefined; }",
|
|
157
270
|
"references": {
|
|
158
271
|
"ContactOption": {
|
|
159
272
|
"location": "import",
|
|
@@ -175,8 +288,10 @@ export class ZonosCustomerInfo {
|
|
|
175
288
|
static get states() {
|
|
176
289
|
return {
|
|
177
290
|
"showErrorBanner": {},
|
|
178
|
-
"
|
|
179
|
-
"
|
|
291
|
+
"isValidatingAddress": {},
|
|
292
|
+
"invalidShippingCharacterList": {},
|
|
293
|
+
"invalidBillingCharacterList": {},
|
|
294
|
+
"openAddressValidationDialog": {}
|
|
180
295
|
};
|
|
181
296
|
}
|
|
182
297
|
static get events() {
|
|
@@ -91,7 +91,7 @@ export class ZonosShipping {
|
|
|
91
91
|
if (this.showErrorBanner) {
|
|
92
92
|
this.showErrorBanner = !this.handleValidate();
|
|
93
93
|
}
|
|
94
|
-
return (h(Host, { key: '
|
|
94
|
+
return (h(Host, { key: '032c917dd5510a6a5801f0bf86a84bcf4096759e', class: "zonos--shipping zonos--elements" }, h("div", { key: 'b5052414ae56dc46908e53a1676acf96701bafa8', class: "zonos--group" }, h("zonos-text", { key: '41bb421c0fc620f8373be5453e872e83ad19150e', class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) && (h("zonos-banner", { key: '4b0119b9c1991ab31c15220ed26f0eac18c7229e', class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { key: '61ea64f33b2b4bd54c4f2c4d273bac9e13d67040', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !((_b = this.serviceLevels) === null || _b === void 0 ? void 0 : _b.length) ? (h("zonos-banner", { bannerTitle: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), intent: "error" })) : (h("zonos-shipping-rich-radio", { initialSelectedValue: (_c = this.selectedShippingMethod) === null || _c === void 0 ? void 0 : _c.value, items: this.serviceLevels, onRadioSelected: e => this.handleRadioSelected(e) })), h("div", { key: '1908b7445ef7158402882265af8a357f48096937', class: "zonos--group-btn" }, h("zonos-button", { key: 'b73ca7298b5c020c237703e4ce1f9b877cb96605', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
95
95
|
// use primary type when on mobile mode
|
|
96
96
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
97
97
|
}
|
|
@@ -7,7 +7,7 @@ export class ZonosLink {
|
|
|
7
7
|
this.linkTitle = undefined;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '595aa56bf6c9503434d265b62a85a5fcbf0e7bec', class: "zonos--elements" }, h("a", { key: '3e355af783529c0fa77ff2c351476c92ec128ec3', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: '45607e8fa7448a96f6914270baaeab2f0d03944e' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "zonos-link"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,16 +11,16 @@ export class ZonosBadge {
|
|
|
11
11
|
this.rounded = false;
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: 'c68ba6ef2bcb35c94ecf2b11379be748aa998198', class: classes(['zonos--elements zonos--badge']), style: {
|
|
15
15
|
'--font-family': zonosStoreFontFamily(),
|
|
16
|
-
} }, h("div", { key: '
|
|
16
|
+
} }, h("div", { key: '7f200effb42296a21829c292101ef3300b041327', class: classes([
|
|
17
17
|
'zonos--badge-content',
|
|
18
18
|
this.badgeColor,
|
|
19
19
|
this.rounded && 'rounded',
|
|
20
20
|
this.iconRight && 'icon-right',
|
|
21
21
|
this.size,
|
|
22
22
|
this.bold && 'bold',
|
|
23
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
23
|
+
]) }, this.icon, h("zonos-text", { key: '4358e95cb29ec6a82e32213b268612aadf8772c6' }, h("slot", { key: 'ab76831e3691a896179e06896d33ed771e4bbdf9' })))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "zonos-badge"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -229,6 +229,7 @@
|
|
|
229
229
|
}
|
|
230
230
|
:host button:not(.override-background).subtle:not([disabled]):hover {
|
|
231
231
|
background: var(--amino-gray-500);
|
|
232
|
+
color: var(--amino-gray-0);
|
|
232
233
|
}
|
|
233
234
|
:host button:not(.override-background).subtle:not([disabled]):active {
|
|
234
235
|
background: var(--amino-gray-200);
|
|
@@ -52,26 +52,35 @@ export class ZonosButton {
|
|
|
52
52
|
* So need to re-assign the variant prop with the default value if the value is `undefined` here.
|
|
53
53
|
*/
|
|
54
54
|
const variant = this.variant || 'standard';
|
|
55
|
-
const color = this.buttonColor && isColorVariable(this.buttonColor)
|
|
56
|
-
? `var(--amino-${this.buttonColor})`
|
|
57
|
-
: this.buttonColor;
|
|
58
55
|
// use override background if it exists, otherwise use color from setting
|
|
59
56
|
const overrideBackground = this.backgroundColor || zonosStore.appearance.colorSecondary;
|
|
60
57
|
// only set theme for button to change text color if variant is standard and override background is set
|
|
61
58
|
const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
|
|
62
|
-
const borderStyle = getBorderRadius(
|
|
59
|
+
const borderStyle = getBorderRadius({
|
|
60
|
+
overrideBorderStyle: this.borderStyle,
|
|
61
|
+
});
|
|
63
62
|
const backgroundActualColor = isColorVariable(overrideBackground) && overrideBackground
|
|
64
63
|
? window.getComputedStyle(this.ele).getPropertyValue(overrideBackground)
|
|
65
64
|
: overrideBackground;
|
|
65
|
+
// use the variable if it's a color variable, otherwise use the color
|
|
66
|
+
const color = this.buttonColor && isColorVariable(this.buttonColor)
|
|
67
|
+
? `var(--amino-${this.buttonColor})`
|
|
68
|
+
: this.buttonColor;
|
|
69
|
+
// set contrast color if background color is dark for all variants except subtle
|
|
70
|
+
const contrastColor = this.variant !== 'subtle' &&
|
|
71
|
+
backgroundActualColor &&
|
|
72
|
+
isDarkColor(backgroundActualColor)
|
|
73
|
+
? 'white'
|
|
74
|
+
: color;
|
|
66
75
|
const spinnerColor = backgroundActualColor && isDarkColor(backgroundActualColor)
|
|
67
76
|
? 'white'
|
|
68
77
|
: 'black';
|
|
69
|
-
return (h(Host, { key: '
|
|
78
|
+
return (h(Host, { key: '10bfc0423b83cc231fb22fdc430a1e5de66705fc', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
70
79
|
'--background-color': overrideBackground,
|
|
71
80
|
'--border-radius': borderStyle,
|
|
72
|
-
'--color':
|
|
81
|
+
'--color': contrastColor,
|
|
73
82
|
'--font-family': zonosStoreFontFamily(),
|
|
74
|
-
}) }, h("button", { key: '
|
|
83
|
+
}) }, h("button", { key: '1feab99eec063d35c53ed8c308ac7675988e565c', class: classes([
|
|
75
84
|
this.hasIcon && 'has-icon',
|
|
76
85
|
this.hasContent && 'has-content',
|
|
77
86
|
this.noBackground && 'no-background',
|
|
@@ -84,7 +93,7 @@ export class ZonosButton {
|
|
|
84
93
|
overrideBackground &&
|
|
85
94
|
variant === 'standard' &&
|
|
86
95
|
'override-background',
|
|
87
|
-
]), disabled: disabled }, this.loading && (h("div", { key: '
|
|
96
|
+
]), disabled: disabled }, this.loading && (h("div", { key: '4c7ad847266e626638762aeecfec011fbac3189b', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: 'd433f729bb10922694c27314a31d5159095ef4a9', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '06f32dc6cb7e10b1acbbde8bf1a0f663ea458608', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
88
97
|
}
|
|
89
98
|
static get is() { return "zonos-button"; }
|
|
90
99
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,12 +12,12 @@ export class ZonosCard {
|
|
|
12
12
|
this.spacing = '24px';
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '206169280db67be5e74382c5beccfad87ec9068a', style: {
|
|
16
16
|
'--font-family': zonosStoreFontFamily(),
|
|
17
|
-
} }, h("div", { key: '
|
|
17
|
+
} }, h("div", { key: '4a1c7eab9b5420295ce3ec30cfd59985be35d912', class: classes(['styled-card']), style: { padding: this.spacing } }, this.label && (h("header", { key: '75454e5d9eacdfdf842a9a220deab467625e497b', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: 'bc9c7d3500cef41237dbe53f27ab398103be55dd', type: "subheader" }, this.label), h("h-stack", { key: '29d68a483bfc61ddfb9deeb63272a8221759513c', spacing: 8 }, this.actions))), h("slot", { key: '0ad416c6cdb0b1fc2c922b8569cf35a4009263cc' }), (this.footerActions || this.footerContent) && (h("footer", { key: '469110ce0f0f81cbee4ef67e79d3be17933bcf2e', class: "card-footer", style: {
|
|
18
18
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
19
19
|
padding: this.spacing,
|
|
20
|
-
} }, h("div", { key: '
|
|
20
|
+
} }, h("div", { key: '9044d9f3c81935119f668deb188f16cb1cb243bb' }, this.footerContent), h("h-stack", { key: '3f258ed6b07b8973b0bf753c7ab6427d67bf210c', spacing: 8 }, this.footerActions))))));
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "zonos-card"; }
|
|
23
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,6 +14,12 @@ export class ZonosCheckbox {
|
|
|
14
14
|
this.fontSize = 'base';
|
|
15
15
|
this.borderStyle = undefined;
|
|
16
16
|
}
|
|
17
|
+
onClick() {
|
|
18
|
+
if (this.isDisabled) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
this.checkboxSelected.emit(!this.isChecked);
|
|
22
|
+
}
|
|
17
23
|
render() {
|
|
18
24
|
const isBackgroundVariable = colorPrefixes.includes(this.backgroundColor);
|
|
19
25
|
const backgroundColor = isBackgroundVariable
|
|
@@ -26,15 +32,18 @@ export class ZonosCheckbox {
|
|
|
26
32
|
!isDarkColor(backgroundColor)
|
|
27
33
|
? 'var(--amino-gray-800)'
|
|
28
34
|
: 'var(--amino-gray-0)';
|
|
29
|
-
const borderStyle = getBorderRadius(
|
|
30
|
-
|
|
35
|
+
const borderStyle = getBorderRadius({
|
|
36
|
+
customRoundRadius: '4px',
|
|
37
|
+
overrideBorderStyle: this.borderStyle,
|
|
38
|
+
});
|
|
39
|
+
return (h(Host, { key: '8a3d5f66a7fb956dcb063f1b375bfb80856a80c4', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
31
40
|
'--background-color': backgroundColor,
|
|
32
41
|
'--border-radius': borderStyle,
|
|
33
42
|
'--font-family': zonosStoreFontFamily(),
|
|
34
43
|
'--size': `${this.size}px`,
|
|
35
|
-
} }, h("label", { key: '
|
|
44
|
+
} }, h("label", { key: '95dc70a3821652e588706b570b40272a5f124b7f', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: 'ef61adbd2246fbb934a17b31ea62cd5ce4ff88f7', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
36
45
|
this.checkboxSelected.emit(e.target.checked);
|
|
37
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
46
|
+
}, type: "checkbox" }), h("span", { key: '0587bf8dc5ee1477d91360e20d521efd9853c554', class: "checkmark-container" }, h("svg", { key: '3b7abf05f170aa2c4a31f76763c79ce975a543bc', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '7d16a3850fbdca9fd3af7fa1f64a1715497b9c7b', "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", { key: '305600e6860aeba8dfa0f3019d51d1bf91498310', size: this.fontSize }, this.label)))));
|
|
38
47
|
}
|
|
39
48
|
static get is() { return "zonos-checkbox"; }
|
|
40
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -215,4 +224,13 @@ export class ZonosCheckbox {
|
|
|
215
224
|
}
|
|
216
225
|
}];
|
|
217
226
|
}
|
|
227
|
+
static get listeners() {
|
|
228
|
+
return [{
|
|
229
|
+
"name": "click",
|
|
230
|
+
"method": "onClick",
|
|
231
|
+
"target": undefined,
|
|
232
|
+
"capture": false,
|
|
233
|
+
"passive": true
|
|
234
|
+
}];
|
|
235
|
+
}
|
|
218
236
|
}
|
|
@@ -63,17 +63,17 @@ export class ZonosCheckoutProgressTabs {
|
|
|
63
63
|
color: labelSelectedColor,
|
|
64
64
|
})
|
|
65
65
|
: labelSelectedColor;
|
|
66
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: '97800b058d8cb5617f8604c9c5702e2f8e8d943b', class: "zonos--elements", style: {
|
|
67
67
|
'--color': contrastLabelColor,
|
|
68
68
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
69
|
-
} }, h("div", { key: '
|
|
69
|
+
} }, h("div", { key: 'ceea1729e3b2776700ef8eb0c20cecd65005fa75', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
70
70
|
const isSelected = tab.value === selectedStep;
|
|
71
71
|
return (h("button", { class: classes([
|
|
72
72
|
'zonos--tab-item',
|
|
73
73
|
tab.value === selectedStep && 'selected',
|
|
74
74
|
tab.isDone && 'done',
|
|
75
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: '
|
|
76
|
+
})), h("div", { key: '793ff1a1712c7fcdd309b58ce69f90e8ff14bfa7', class: "zonos--tab-progress" }, h("div", { key: '8fd846cade13695c42d8006427c4d7fd667edc37', class: "zonos--progress-bar-fill" }))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "zonos-checkout-progress-tabs"; }
|
|
79
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '514e75d41d29d70b4ca60230288ae183200b1e12', class: 'zonos--elements zonos--collapse', style: {
|
|
46
46
|
'--font-family': zonosStoreFontFamily(),
|
|
47
47
|
height: this.getElementHeight(),
|
|
48
|
-
} }, h("div", { key: '
|
|
48
|
+
} }, h("div", { key: '068aee1d13bde4c83ea8582b34844da7452c907c' }, h("iframe", { key: 'b22fd8ad898a098c244cb817dc6951854505efca', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'b54783376005085e379c7b8d43218ead1bf8e8ac' }))));
|
|
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: '1b37f326e23e3afaba1428cc23add2e5c425f0b9', class: "zonos--elements", style: {
|
|
39
39
|
'--font-family': zonosStoreFontFamily(),
|
|
40
|
-
} }, h("div", { key: '
|
|
40
|
+
} }, h("div", { key: '966ab933f1bcd754e64fc43dc2013f6cde0f043b', class: "zonos--country-select" }, h("zonos-v-stack", { key: '77d6412871658e9fc8e59df130d3b95df68c5e0b', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '17d0413090d9637aa17234d19a3549b9828a3a86', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '08aa6bd77273095d0b1753c6b423a283b638cc69', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: 'e1e770226aa2ad9c74681d8291797ff676217f09', 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,9 +8,9 @@ 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: 'c2cec226eb9236205d0c4b234bb393e4663d982f', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, this.message && (h("zonos-card", { key: '
|
|
13
|
+
} }, this.message && (h("zonos-card", { key: '51814b00b14061891914753a950b6a3dc852c0f0', class: "zonos--custom-message", spacing: "12px" }, h("div", { key: '4f7298eb552d9f0e1b6ded333c298df3d4fbbee2', class: "zonos--flex-message" }, h("zonos-icon", { key: '0a1fb171e1365a845e1e0855466058ced6c57f12', "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { key: 'dd714a4f1fd3e1ebe55586c5c8c6941928eb2862', innerHTML: messageWithLinks }))))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-custom-message"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
:host .zonos--backdrop {
|
|
42
42
|
width: 100vw;
|
|
43
43
|
height: 100vh;
|
|
44
|
-
left:
|
|
45
|
-
top:
|
|
44
|
+
left: 0;
|
|
45
|
+
top: 0;
|
|
46
46
|
background: var(--amino-backdrop-color);
|
|
47
47
|
z-index: -999;
|
|
48
48
|
opacity: 0;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
align-items: center;
|
|
60
60
|
justify-content: center;
|
|
61
61
|
z-index: 10002;
|
|
62
|
-
background:
|
|
62
|
+
background: var(--amino-gray-0);
|
|
63
63
|
border-radius: var(--border-radius, var(--amino-radius-10));
|
|
64
64
|
}
|
|
65
65
|
:host .zonos--dialog-layout {
|
|
@@ -46,8 +46,10 @@ export class ZonosDialog {
|
|
|
46
46
|
else {
|
|
47
47
|
document.body.style.overflow = 'auto';
|
|
48
48
|
}
|
|
49
|
-
const borderStyle = getBorderRadius(
|
|
50
|
-
|
|
49
|
+
const borderStyle = getBorderRadius({
|
|
50
|
+
overrideBorderStyle: this.borderStyle,
|
|
51
|
+
});
|
|
52
|
+
return (h(Host, { key: '48eb2701a74a7973d3502fd1fdc65ce85a6d71ed', class: classes([
|
|
51
53
|
'zonos--elements',
|
|
52
54
|
this.open && 'open',
|
|
53
55
|
this.isLoading && 'is-loading',
|
|
@@ -58,10 +60,10 @@ export class ZonosDialog {
|
|
|
58
60
|
'--font-family': zonosStoreFontFamily(),
|
|
59
61
|
'--height': this.height || 'initial',
|
|
60
62
|
'--width': this.width,
|
|
61
|
-
} }, h("div", { key: '
|
|
63
|
+
} }, h("div", { key: 'b408d792740d8854bab8ea60bd50ce894a75a836', class: "zonos--backdrop" }), h("div", { key: '04affcf48e0b209fa8dacc74039dad536ed9cd9b', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'c615792a60b2fa51a74af265b7c944a64e9ff18d', class: "zonos--dialog" }, this.isLoading && (h("div", { key: '78d3b571f75c6037fdd694b4621fb9eae48d8ce0', class: "zonos--loading" }, h("zonos-spinner", { key: 'bd96037d5fe1717ebeae5b1ba27b96aa9ec9253d', size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { key: 'cc057cbed99107d7d234d08d38e67cbf0140dc66', class: "zonos--header" }, this.headerText && (h("h3", { key: '587fff6b04981f1c24b44736b3b40044480f68ba', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: '9a1944508996cd8ccb87f68ae175564528af3c4c', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: 'b563c1939c32489b63516cd4dd14df58a32a08cf', class: classes([
|
|
62
64
|
'zonos--body',
|
|
63
65
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
64
|
-
]) }, h("slot", { key: '
|
|
66
|
+
]) }, h("slot", { key: '39d66d136f630afbac7ced146d3a8ac60d3c9672' })), h("slot", { key: '5bace66c84150024d0203f89fbf8f5c263cb7472', name: "dialog-footer" })))));
|
|
65
67
|
}
|
|
66
68
|
static get is() { return "zonos-dialog"; }
|
|
67
69
|
static get encapsulation() { return "shadow"; }
|