@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,26 +0,0 @@
|
|
|
1
|
-
import { u as handleFetch } from './cart-10bcd2e0.js';
|
|
2
|
-
|
|
3
|
-
const checkoutBreakpoint = 890;
|
|
4
|
-
const isCheckoutMobile = (isMobile) => {
|
|
5
|
-
return isMobile || window.innerWidth < checkoutBreakpoint;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const sendErrorLog = async ({ endpoint, errors, metadata }) => {
|
|
9
|
-
const userAgentData = 'userAgentData' in window.navigator
|
|
10
|
-
? // userAgentData is not yet supported in all browsers
|
|
11
|
-
window.navigator.userAgentData
|
|
12
|
-
: null;
|
|
13
|
-
const errorObject = {
|
|
14
|
-
endpoint,
|
|
15
|
-
errors,
|
|
16
|
-
metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
17
|
-
? userAgentData
|
|
18
|
-
: window.navigator.userAgent }, metadata),
|
|
19
|
-
};
|
|
20
|
-
void handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
|
|
21
|
-
body: errorObject,
|
|
22
|
-
method: 'POST',
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export { isCheckoutMobile as i, sendErrorLog as s };
|
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-0e31d804.js';
|
|
2
|
-
import { k as stripeStore, d as logError, l as localizationStore, t as translate, o as stripeStorePrefetchLandedCost } from './cart-10bcd2e0.js';
|
|
3
|
-
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
|
|
4
|
-
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-8642e94a.js';
|
|
5
|
-
import { c as classes } from './classes-0d95c529.js';
|
|
6
|
-
import { g as getBorderRadius } from './getBorderRadius-8129b0cb.js';
|
|
7
|
-
import { i as isDarkColor } from './isDarkColor-7a6d2d14.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Check if the given address object contains non-latin characters
|
|
11
|
-
* @returns an object with the same keys as the input object, and a boolean value indicating if the value contains non-latin characters
|
|
12
|
-
*/
|
|
13
|
-
const containsNonLatinChars = (params) => {
|
|
14
|
-
const specialCharacters = /[ʼˮ՚ߴߵ']{1}/u;
|
|
15
|
-
/**
|
|
16
|
-
* This regex matches any character that is not a latin character, punctuation, symbol, number, separator, control, or mark
|
|
17
|
-
* I limited the character found to 1 in the regex, so that we can return early if we find any non-latin character
|
|
18
|
-
**/
|
|
19
|
-
const nonLatinRegex = /[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;
|
|
20
|
-
const nonLatinValueList = Object.entries(params).reduce((prev, [key, value]) => nonLatinRegex.test(value) &&
|
|
21
|
-
// allow special characters like web apostrophe and quotation mark
|
|
22
|
-
!specialCharacters.test(value)
|
|
23
|
-
? Object.assign(Object.assign({}, prev), { [key]: true }) : prev, {});
|
|
24
|
-
return nonLatinValueList;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
|
|
28
|
-
const ZonosAddressStyle0 = zonosAddressCss;
|
|
29
|
-
|
|
30
|
-
const mappedFields = {
|
|
31
|
-
city: 'City',
|
|
32
|
-
country: 'Country',
|
|
33
|
-
line1: 'Address line 1',
|
|
34
|
-
line2: 'Address line 2',
|
|
35
|
-
name: 'Name',
|
|
36
|
-
postal_code: 'Postal code',
|
|
37
|
-
state: 'State',
|
|
38
|
-
};
|
|
39
|
-
const ZonosAddress = class {
|
|
40
|
-
constructor(hostRef) {
|
|
41
|
-
registerInstance(this, hostRef);
|
|
42
|
-
this.invalidCharacters = createEvent(this, "invalidCharacters", 7);
|
|
43
|
-
this.type = undefined;
|
|
44
|
-
this.titleText = undefined;
|
|
45
|
-
this.defaultAddress = null;
|
|
46
|
-
this.stripe = window.Zonos.stripe;
|
|
47
|
-
this.reportedInvalidCharacters = false;
|
|
48
|
-
this.invalidCharacterList = null;
|
|
49
|
-
this.isDirtyAddress = false;
|
|
50
|
-
}
|
|
51
|
-
getStripeAddressInstance() {
|
|
52
|
-
if (this.type === 'billing') {
|
|
53
|
-
return {
|
|
54
|
-
stripeAddressElement: stripeStore.stripeBillingAddressElement,
|
|
55
|
-
stripeAddressEventData: stripeStore.stripeBillingAddressEventData,
|
|
56
|
-
stripeElements: stripeStore.stripeElementsForBillingAddress,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
stripeAddressElement: stripeStore.stripeAddressElement,
|
|
61
|
-
stripeAddressEventData: stripeStore.stripeAddressEventData,
|
|
62
|
-
stripeElements: stripeStore.stripeElements,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
updateAddressEventData({ event, type, }) {
|
|
66
|
-
switch (type) {
|
|
67
|
-
case 'billing':
|
|
68
|
-
stripeStore.stripeBillingAddressEventData = event;
|
|
69
|
-
break;
|
|
70
|
-
default:
|
|
71
|
-
stripeStore.stripeAddressEventData = event;
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
const invalidCharacterList = this.checkInvalidCharacters(event);
|
|
75
|
-
this.invalidCharacterList = invalidCharacterList;
|
|
76
|
-
this.invalidCharacters.emit(!!invalidCharacterList);
|
|
77
|
-
}
|
|
78
|
-
updateAddressElement({ stripeAddressElement, type, }) {
|
|
79
|
-
if (type === 'shipping') {
|
|
80
|
-
stripeStore.stripeAddressElement = stripeAddressElement;
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
stripeStore.stripeBillingAddressElement = stripeAddressElement;
|
|
84
|
-
}
|
|
85
|
-
checkInvalidCharacters(address) {
|
|
86
|
-
// Do nothing if the allowed character sets is ALL or the address is incomplete
|
|
87
|
-
if (!address.complete ||
|
|
88
|
-
zonosStore.checkoutSettings.allowedCharacterSets === 'ALL') {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
const { address: addressValue, firstName, lastName, name } = address.value;
|
|
92
|
-
const { city, country, line1, line2, postal_code, state } = addressValue;
|
|
93
|
-
const invalidList = containsNonLatinChars({
|
|
94
|
-
city,
|
|
95
|
-
country,
|
|
96
|
-
line1,
|
|
97
|
-
line2: line2 || '',
|
|
98
|
-
name: name || `${firstName} ${lastName}`,
|
|
99
|
-
postal_code,
|
|
100
|
-
state,
|
|
101
|
-
});
|
|
102
|
-
if (!Object.keys(invalidList).length) {
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
// send error event only once so we know what value is invalid
|
|
106
|
-
if (!this.reportedInvalidCharacters) {
|
|
107
|
-
this.reportedInvalidCharacters = true;
|
|
108
|
-
void sendErrorLog({
|
|
109
|
-
endpoint: 'NonLatinInput',
|
|
110
|
-
errors: Object.keys(invalidList).map(fieldName => {
|
|
111
|
-
var _a;
|
|
112
|
-
if (fieldName !== 'name') {
|
|
113
|
-
// trim all number so we don't send sensitive information
|
|
114
|
-
const trimmedAddress = (_a = addressValue[fieldName]) === null || _a === void 0 ? void 0 : _a.replace(/[\d\w]+/g, '');
|
|
115
|
-
return `Invalid character found ${fieldName}: "${trimmedAddress}"`;
|
|
116
|
-
}
|
|
117
|
-
const customerName = name || `${firstName} ${lastName}`;
|
|
118
|
-
const trimmedName = customerName.replace(/[\d\w]+/g, '');
|
|
119
|
-
return `Invalid character found ${fieldName}: "${trimmedName}"`;
|
|
120
|
-
}),
|
|
121
|
-
metadata: {},
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
return invalidList;
|
|
125
|
-
}
|
|
126
|
-
async watchInitStripe() {
|
|
127
|
-
var _a, _b;
|
|
128
|
-
this.stripe = window.Zonos.stripe;
|
|
129
|
-
const { stripeAddressEventData, stripeElements } = this.getStripeAddressInstance();
|
|
130
|
-
if (!this.stripe || !stripeElements) {
|
|
131
|
-
logError("Stripe is not initialized. Couldn't load stripe element.");
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
const phone = (_a = this.defaultAddress) === null || _a === void 0 ? void 0 : _a.phone;
|
|
135
|
-
if (!phone) {
|
|
136
|
-
// remove phone from default address if it's not provided, stripe
|
|
137
|
-
// will throw error if key phone exist and its value is empty or 'undefined'.
|
|
138
|
-
(_b = this.defaultAddress) === null || _b === void 0 ? true : delete _b.phone;
|
|
139
|
-
}
|
|
140
|
-
const shippableCountries = localizationStore.shippingZoneCountries;
|
|
141
|
-
const shippingZone = shippableCountries
|
|
142
|
-
? Object.values(shippableCountries).map(country => country.code)
|
|
143
|
-
: [];
|
|
144
|
-
const addressElement = stripeElements.create('address', {
|
|
145
|
-
allowedCountries: this.type === 'shipping' ? shippingZone : [],
|
|
146
|
-
// only show the default address if stripeAddressEventData is not provided
|
|
147
|
-
contacts: this.defaultAddress && !stripeAddressEventData
|
|
148
|
-
? [this.defaultAddress]
|
|
149
|
-
: [],
|
|
150
|
-
defaultValues: {
|
|
151
|
-
address: Object.assign(Object.assign({}, stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address), { country: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
|
|
152
|
-
localizationStore.selectedCountryCode ||
|
|
153
|
-
'AL' }),
|
|
154
|
-
firstName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName,
|
|
155
|
-
lastName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName,
|
|
156
|
-
phone: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone,
|
|
157
|
-
},
|
|
158
|
-
display: {
|
|
159
|
-
name: 'split',
|
|
160
|
-
},
|
|
161
|
-
fields: {
|
|
162
|
-
phone: 'always',
|
|
163
|
-
},
|
|
164
|
-
mode: this.type,
|
|
165
|
-
validation: {
|
|
166
|
-
phone: {
|
|
167
|
-
required: 'always',
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
});
|
|
171
|
-
addressElement.mount(this.el.querySelector('.zonos--address-component'));
|
|
172
|
-
addressElement.on('change', event => {
|
|
173
|
-
const eventValue = event.value;
|
|
174
|
-
if (!this.isDirtyAddress && eventValue.address.line1.length >= 3) {
|
|
175
|
-
this.isDirtyAddress = true;
|
|
176
|
-
// stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
|
|
177
|
-
setTimeout(() => {
|
|
178
|
-
// scroll directly into view if it's mobile
|
|
179
|
-
if (isCheckoutMobile()) {
|
|
180
|
-
this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
// scroll into the end of the page so the address placeholder won't be hidden
|
|
184
|
-
const yOffset = this.type === 'shipping' ? 100 : 600;
|
|
185
|
-
const parentWrapper = this.el.closest('.zonos--group');
|
|
186
|
-
const y = this.el.getBoundingClientRect().top + yOffset;
|
|
187
|
-
parentWrapper === null || parentWrapper === void 0 ? void 0 : parentWrapper.scrollTo({ behavior: 'smooth', top: y });
|
|
188
|
-
}
|
|
189
|
-
}, 600);
|
|
190
|
-
}
|
|
191
|
-
this.updateAddressEventData({
|
|
192
|
-
event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', value: Object.assign(Object.assign({}, eventValue), { firstName: eventValue.firstName || eventValue.name.split(' ')[0], lastName: eventValue.lastName || eventValue.name.split(' ')[1] }) }),
|
|
193
|
-
type: this.type,
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
this.updateAddressElement({
|
|
197
|
-
stripeAddressElement: addressElement,
|
|
198
|
-
type: this.type,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
disconnectedCallback() {
|
|
202
|
-
// destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
|
|
203
|
-
const stripeElement = this.getStripeAddressInstance().stripeAddressElement;
|
|
204
|
-
stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.destroy();
|
|
205
|
-
}
|
|
206
|
-
componentDidLoad() {
|
|
207
|
-
const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
|
|
208
|
-
this.isDirtyAddress =
|
|
209
|
-
!!stripeAddressEventData &&
|
|
210
|
-
stripeAddressEventData.value.address.line1.length > 0;
|
|
211
|
-
// @Watch doesn't get trigger on initial load
|
|
212
|
-
void this.watchInitStripe();
|
|
213
|
-
setTimeout(() => {
|
|
214
|
-
// check if the address contains invalid characters after address is loaded
|
|
215
|
-
const newStripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
|
|
216
|
-
if (newStripeAddressEventData) {
|
|
217
|
-
this.checkInvalidCharacters(newStripeAddressEventData);
|
|
218
|
-
}
|
|
219
|
-
}, 500);
|
|
220
|
-
}
|
|
221
|
-
render() {
|
|
222
|
-
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
223
|
-
return (h(Host, { key: 'd5100d824d84c5e5b238f4877d489ca1b3f7b886', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '0fd51ddf9b08b4f62aa75a5f2e919d40e52f6fc3', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '3a53ec2a36e96639ec5437b928d4be4b84fb3aff', class: "zonos--address-component" }), this.invalidCharacterList && (h("zonos-banner", { key: '1141be407cff5b6741a40a06712a71e881d3a082', bannerTitle: translate('Please resolve the following errors:'), intent: "error" }, Object.keys(this.invalidCharacterList).map(fieldName => (h("zonos-text", null, `- ${translate(mappedFields[fieldName])}: ${translate('only supports Latin characters (A-Z, a-z)')}`)))))));
|
|
224
|
-
}
|
|
225
|
-
get el() { return getElement(this); }
|
|
226
|
-
static get watchers() { return {
|
|
227
|
-
"stripe": ["watchInitStripe"]
|
|
228
|
-
}; }
|
|
229
|
-
};
|
|
230
|
-
ZonosAddress.style = ZonosAddressStyle0;
|
|
231
|
-
|
|
232
|
-
const colorPrefixes = [
|
|
233
|
-
'blue',
|
|
234
|
-
'cyan',
|
|
235
|
-
'green',
|
|
236
|
-
'orange',
|
|
237
|
-
'purple',
|
|
238
|
-
'red',
|
|
239
|
-
'gray',
|
|
240
|
-
'glass',
|
|
241
|
-
];
|
|
242
|
-
|
|
243
|
-
const zonosCheckboxCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";
|
|
244
|
-
const ZonosCheckboxStyle0 = zonosCheckboxCss;
|
|
245
|
-
|
|
246
|
-
const ZonosCheckbox = class {
|
|
247
|
-
constructor(hostRef) {
|
|
248
|
-
registerInstance(this, hostRef);
|
|
249
|
-
this.checkboxSelected = createEvent(this, "checkboxSelected", 7);
|
|
250
|
-
this.backgroundColor = 'blue';
|
|
251
|
-
this.label = undefined;
|
|
252
|
-
this.isChecked = false;
|
|
253
|
-
this.isDisabled = false;
|
|
254
|
-
this.size = 12;
|
|
255
|
-
this.fontSize = 'base';
|
|
256
|
-
this.borderStyle = undefined;
|
|
257
|
-
}
|
|
258
|
-
render() {
|
|
259
|
-
const isBackgroundVariable = colorPrefixes.includes(this.backgroundColor);
|
|
260
|
-
const backgroundColor = isBackgroundVariable
|
|
261
|
-
? `var(--amino-${this.backgroundColor}-600)`
|
|
262
|
-
: this.backgroundColor;
|
|
263
|
-
const checkmarkColor = isBackgroundVariable
|
|
264
|
-
? // use lighter color if the color is amino variable
|
|
265
|
-
`var(--amino-${this.backgroundColor}-200)`
|
|
266
|
-
: // if it's not an amino variable, use white if the background is dark, and dark if the background is light
|
|
267
|
-
!isDarkColor(backgroundColor)
|
|
268
|
-
? 'var(--amino-gray-800)'
|
|
269
|
-
: 'var(--amino-gray-0)';
|
|
270
|
-
const borderStyle = getBorderRadius(this.borderStyle, '4px');
|
|
271
|
-
return (h(Host, { key: '1383262a5cca00ede5154fbdf37bbabb8cbcd501', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
272
|
-
'--background-color': backgroundColor,
|
|
273
|
-
'--border-radius': borderStyle,
|
|
274
|
-
'--font-family': zonosStoreFontFamily(),
|
|
275
|
-
'--size': `${this.size}px`,
|
|
276
|
-
} }, h("label", { key: 'aa01d0b1eebb53587f8d2d344e3b1d01a6a7a683', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: '166eef6010570137110f8548c9eb76f32e5616e9', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
277
|
-
this.checkboxSelected.emit(e.target.checked);
|
|
278
|
-
}, type: "checkbox" }), h("span", { key: 'd98289266cd4e78dd1e5c9b89019d0dd4927e4d0', class: "checkmark-container" }, h("svg", { key: 'e179fe12a77e0c7f1f48bc943ff472d0a75e05d5', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '147acf112b6d28fa30af8e8c7fe8d7f998a507ab', "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: 'b83bb5bb1881580be3d0ab3ed83157a0c0ce3f8e', size: this.fontSize }, this.label)))));
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
ZonosCheckbox.style = ZonosCheckboxStyle0;
|
|
282
|
-
|
|
283
|
-
const zonosCollapseCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";
|
|
284
|
-
const ZonosCollapseStyle0 = zonosCollapseCss;
|
|
285
|
-
|
|
286
|
-
const ZonosCollapse = class {
|
|
287
|
-
constructor(hostRef) {
|
|
288
|
-
registerInstance(this, hostRef);
|
|
289
|
-
this.collapsed = false;
|
|
290
|
-
this.collapseSize = 0;
|
|
291
|
-
this.height = this.el.scrollHeight;
|
|
292
|
-
this.iframe = null;
|
|
293
|
-
}
|
|
294
|
-
getElementHeight() {
|
|
295
|
-
const fullHeight = `${this.height}px`;
|
|
296
|
-
const collapsedHeight = `${this.collapseSize}px`;
|
|
297
|
-
return this.collapsed ? collapsedHeight : fullHeight;
|
|
298
|
-
}
|
|
299
|
-
componentDidLoad() {
|
|
300
|
-
this.height = this.el.scrollHeight;
|
|
301
|
-
}
|
|
302
|
-
componentDidRender() {
|
|
303
|
-
var _a, _b, _c;
|
|
304
|
-
this.iframe =
|
|
305
|
-
((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('iframe')) || null;
|
|
306
|
-
(_c = (_b = this.iframe) === null || _b === void 0 ? void 0 : _b.contentWindow) === null || _c === void 0 ? void 0 : _c.addEventListener('resize', () => {
|
|
307
|
-
if (!this.iframe) {
|
|
308
|
-
// this should never happen since it's inside of resize callback
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
this.height = parseFloat(getComputedStyle(this.iframe).height);
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
render() {
|
|
315
|
-
if (!this.collapsed) {
|
|
316
|
-
// wait for the collapse animation to finish, then set overflow to visible
|
|
317
|
-
setTimeout(() => {
|
|
318
|
-
// if the element collapsed state is still not changed, set overflow to visible
|
|
319
|
-
if (!this.collapsed) {
|
|
320
|
-
this.el.style.overflow = 'visible';
|
|
321
|
-
}
|
|
322
|
-
}, 300);
|
|
323
|
-
}
|
|
324
|
-
else {
|
|
325
|
-
// set overflow to hidden to prevent content from showing when collapsed
|
|
326
|
-
this.el.style.overflow = 'hidden';
|
|
327
|
-
}
|
|
328
|
-
return (h(Host, { key: 'ec163c2c73f38e479ba22bb3bea5dbe2f156170b', class: 'zonos--elements zonos--collapse', style: {
|
|
329
|
-
'--font-family': zonosStoreFontFamily(),
|
|
330
|
-
height: this.getElementHeight(),
|
|
331
|
-
} }, h("div", { key: 'ab8b73ff44968d8e2f3dcf75439b09da36fdfb22' }, h("iframe", { key: '0b6d3518382c4c17a6eacb07c1617e84c7301c39', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: '752d9054dadf8905e22cfcca81bb966c2d3ce8d3' }))));
|
|
332
|
-
}
|
|
333
|
-
get el() { return getElement(this); }
|
|
334
|
-
};
|
|
335
|
-
ZonosCollapse.style = ZonosCollapseStyle0;
|
|
336
|
-
|
|
337
|
-
const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}";
|
|
338
|
-
const ZonosLinkAuthenticationStyle0 = zonosLinkAuthenticationCss;
|
|
339
|
-
|
|
340
|
-
const ZonosLinkAuthentication = class {
|
|
341
|
-
constructor(hostRef) {
|
|
342
|
-
registerInstance(this, hostRef);
|
|
343
|
-
this.titleText = undefined;
|
|
344
|
-
this.stripe = stripeStore.stripe;
|
|
345
|
-
}
|
|
346
|
-
watchInitStripe() {
|
|
347
|
-
if (!this.stripe || !stripeStore.stripeElements) {
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
// Create and mount the Authentication Element in ${type} mode
|
|
351
|
-
const linkAuthenticationElement = stripeStore.stripeLinkElement ||
|
|
352
|
-
stripeStore.stripeElements.create('linkAuthentication');
|
|
353
|
-
const linkAuthenticationElementContainer = this.el.querySelector('.zonos--link-authentication-component');
|
|
354
|
-
if (!linkAuthenticationElementContainer) {
|
|
355
|
-
logError('Cannot find container element for linkAuthenticationElement');
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
linkAuthenticationElement.mount(linkAuthenticationElementContainer);
|
|
359
|
-
linkAuthenticationElement.on('change', event => {
|
|
360
|
-
stripeStore.stripeLinkEventData = event;
|
|
361
|
-
// run prefetch landed cost when address is changed
|
|
362
|
-
void stripeStorePrefetchLandedCost();
|
|
363
|
-
});
|
|
364
|
-
stripeStore.stripeLinkElement = linkAuthenticationElement;
|
|
365
|
-
}
|
|
366
|
-
componentDidLoad() {
|
|
367
|
-
// @Watch doesn't get trigger on initial load
|
|
368
|
-
this.watchInitStripe();
|
|
369
|
-
}
|
|
370
|
-
render() {
|
|
371
|
-
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
372
|
-
return (h(Host, { key: '97c3c388d1a035e6a46ecdbd3bc66d80a589b19f', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: 'e799af821045b2c1792d2971843afa0c7d3ece5b', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'eaf9be27a11d279c13f261e1312ee8a46e4620f7', class: "zonos--link-authentication-component" })));
|
|
373
|
-
}
|
|
374
|
-
get el() { return getElement(this); }
|
|
375
|
-
static get watchers() { return {
|
|
376
|
-
"stripe": ["watchInitStripe"]
|
|
377
|
-
}; }
|
|
378
|
-
};
|
|
379
|
-
ZonosLinkAuthentication.style = ZonosLinkAuthenticationStyle0;
|
|
380
|
-
|
|
381
|
-
export { ZonosAddress as zonos_address, ZonosCheckbox as zonos_checkbox, ZonosCollapse as zonos_collapse, ZonosLinkAuthentication as zonos_link_authentication };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, d as getElement, H as Host } from './index-0e31d804.js';
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
|
|
3
|
-
import { i as isColorVariable } from './isColorVariable-fbf2d80d.js';
|
|
4
|
-
|
|
5
|
-
const zonosIconCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";
|
|
6
|
-
const ZonosIconStyle0 = zonosIconCss;
|
|
7
|
-
|
|
8
|
-
const ZonosIcon = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.autoHeight = false;
|
|
12
|
-
this.iconColor = 'gray-1200';
|
|
13
|
-
this.content = undefined;
|
|
14
|
-
this.size = 24;
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
if (!this.content || !this.el.shadowRoot) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
const iconColor = isColorVariable(this.iconColor)
|
|
21
|
-
? `var(--amino-${this.iconColor})`
|
|
22
|
-
: this.iconColor;
|
|
23
|
-
this.el.shadowRoot.innerHTML = this.content;
|
|
24
|
-
return (h(Host, { class: "zonos--elements", style: {
|
|
25
|
-
'--color': iconColor,
|
|
26
|
-
'--font-family': zonosStoreFontFamily(),
|
|
27
|
-
'--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
|
|
28
|
-
'--width': `${this.size}px`,
|
|
29
|
-
} }));
|
|
30
|
-
}
|
|
31
|
-
get el() { return getElement(this); }
|
|
32
|
-
};
|
|
33
|
-
ZonosIcon.style = ZonosIconStyle0;
|
|
34
|
-
|
|
35
|
-
export { ZonosIcon as zonos_icon };
|