@zonos/elements 1.3.5-alpha.0 → 1.3.6
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/ILanguage-d247b45b.js +26 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/{cart-f038cf46.js → cart-b8bbf22d.js} +71 -22
- package/dist/cjs/{getBorderRadius-cd7ef574.js → getBorderRadius-b252096d.js} +8 -4
- package/dist/cjs/index.cjs.js +0 -21
- package/dist/cjs/isCheckoutMobile-f491ca7c.js +8 -0
- package/dist/cjs/{isDarkColor-5eda1323.js → isDarkColor-168002d6.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -3
- package/dist/cjs/{localization-d43e1540.js → localization-2c9f5765.js} +366 -1
- package/dist/cjs/{submitGtag-42f29b3a.js → submitGtag-792fe45d.js} +2 -8
- package/dist/cjs/zonos-address_4.cjs.entry.js +289 -0
- package/dist/cjs/zonos-badge_2.cjs.entry.js +57 -0
- package/dist/cjs/zonos-banner.cjs.entry.js +4 -9
- package/dist/cjs/zonos-button_3.cjs.entry.js +161 -0
- package/dist/cjs/zonos-card_2.cjs.entry.js +26 -14
- package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +84 -92
- package/dist/cjs/zonos-checkout.cjs.entry.js +23 -26
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +40 -0
- package/dist/cjs/{zonos-country-flag_4.cjs.entry.js → zonos-country-select_3.cjs.entry.js} +29 -55
- package/dist/cjs/zonos-elements.cjs.js +6 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +13 -8
- package/dist/cjs/zonos-hello.cjs.entry.js +3 -3
- package/dist/cjs/zonos-logo.cjs.entry.js +32 -0
- package/dist/cjs/zonos-notification.cjs.entry.js +5 -6
- package/dist/cjs/zonos-payment.cjs.entry.js +7 -7
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +45 -0
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +4 -6
- package/dist/cjs/{zonosStore-b88b5671.js → zonosStore-5d94dabb.js} +1 -1
- package/dist/collection/collection-manifest.json +6 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/chevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/globe.svg +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIcon.svg +5 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +126 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +60 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +18 -23
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +11 -15
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +14 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +13 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +7 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +7 -26
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +2 -25
- package/dist/collection/components/common/zonos-button/zonos-button.css +20 -2
- package/dist/collection/components/common/zonos-button/zonos-button.js +19 -34
- package/dist/collection/components/common/zonos-card/zonos-card.js +2 -20
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +82 -0
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +218 -0
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +1 -20
- package/dist/collection/components/common/zonos-country-select/assets/greenCheckDuotone.svg +4 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +11 -10
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -11
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +4 -4
- package/dist/collection/components/common/zonos-language-select/assets/greenCheckDuotone.svg +4 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.css +61 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +58 -0
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -21
- package/dist/collection/components/common/zonos-notification/zonos-notification.js +3 -26
- package/dist/collection/components/common/zonos-select-dialog-header/assets/removeIcon.svg +1 -0
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.css +45 -0
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +68 -0
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.css +41 -35
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -4
- package/dist/collection/components/common/zonos-text/zonos-text.js +4 -24
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.css +55 -0
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +72 -0
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -21
- 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/assets/globe.svg +3 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +10 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +27 -5
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +16 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +11 -5
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +3 -1
- package/dist/collection/components/store/checkout/stripe.js +36 -10
- package/dist/collection/components/store/hello/localization.js +5 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +18 -0
- package/dist/collection/components/store/translationStore/strings.base.js +18 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +18 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +18 -0
- package/dist/collection/components/store/translationStore/strings.french.js +18 -0
- package/dist/collection/components/store/translationStore/strings.german.js +18 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +18 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +18 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +18 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +18 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +18 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +18 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +18 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +18 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +18 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +81 -21
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +19 -1
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +11 -5
- package/dist/collection/components/utils/getBorderRadius.js +7 -3
- package/dist/collection/types/ILanguage.js +22 -0
- package/dist/collection/types/generated/graphql.customer.types.js +13 -0
- package/dist/collection/types/index.js +0 -1
- package/dist/collection/types/styles/Color.js +9 -0
- package/dist/components/ILanguage.js +24 -0
- package/dist/components/getBorderRadius.js +7 -3
- package/dist/components/index.js +0 -1
- package/dist/components/isCheckoutMobile.js +6 -0
- package/dist/components/isDarkColor.js +1 -1
- package/dist/components/localization.js +365 -1
- package/dist/components/{cart.js → stripe.js} +280 -229
- package/dist/components/submitGtag.js +1 -1
- package/dist/components/zonos-address2.js +83 -23
- package/dist/components/zonos-badge2.js +8 -10
- package/dist/components/zonos-banner2.js +3 -9
- package/dist/components/zonos-button2.js +20 -18
- package/dist/components/zonos-card2.js +3 -5
- package/dist/components/zonos-cart-items2.js +1 -1
- package/dist/components/zonos-cart-subtotal2.js +14 -8
- package/dist/components/zonos-checkbox.d.ts +11 -0
- package/dist/components/zonos-checkbox.js +6 -0
- package/dist/components/zonos-checkbox2.js +87 -0
- package/dist/components/zonos-checkout-finish2.js +3 -3
- package/dist/components/zonos-checkout-footer.d.ts +11 -0
- package/dist/components/zonos-checkout-footer.js +6 -0
- package/dist/components/zonos-checkout-footer2.js +109 -0
- package/dist/components/zonos-checkout-payment2.js +4 -4
- package/dist/components/zonos-checkout.js +83 -62
- package/dist/components/zonos-collapse2.js +3 -3
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +4 -4
- package/dist/components/zonos-country-flag2.js +3 -5
- package/dist/components/zonos-country-select2.js +26 -19
- package/dist/components/zonos-custom-message2.js +3 -3
- package/dist/components/zonos-customer-info2.js +31 -11
- package/dist/components/zonos-dialog2.js +4 -4
- package/dist/components/zonos-hello-dialog-footer2.js +23 -10
- package/dist/components/zonos-hello-dialog2.js +41 -23
- package/dist/components/zonos-hello.js +31 -19
- package/dist/components/zonos-icon2.js +4 -4
- package/dist/components/zonos-language-select.d.ts +11 -0
- package/dist/components/zonos-language-select.js +6 -0
- package/dist/components/zonos-language-select2.js +87 -0
- package/dist/components/zonos-link-authentication2.js +2 -2
- package/dist/components/zonos-logo.js +44 -1
- package/dist/components/zonos-notification2.js +4 -6
- package/dist/components/zonos-payment2.js +2 -2
- package/dist/components/zonos-review2.js +7 -11
- package/dist/components/zonos-select-dialog-header.d.ts +11 -0
- package/dist/components/zonos-select-dialog-header.js +6 -0
- package/dist/components/zonos-select-dialog-header2.js +71 -0
- package/dist/components/zonos-shipping-rich-radio2.js +2 -2
- package/dist/components/zonos-shipping2.js +4 -4
- package/dist/components/zonos-spinner2.js +4 -4
- package/dist/components/zonos-text2.js +4 -7
- package/dist/components/zonos-tooltip.d.ts +11 -0
- package/dist/components/zonos-tooltip.js +6 -0
- package/dist/components/zonos-tooltip2.js +48 -0
- package/dist/components/zonos-v-stack2.js +4 -6
- package/dist/components/zonosStore.js +1 -1
- package/dist/esm/ILanguage-97790bee.js +24 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/{cart-ba9b0d4c.js → cart-bc3bb22e.js} +72 -21
- package/dist/esm/getBorderRadius-e9736f7e.js +20 -0
- package/dist/esm/index.js +1 -6
- package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
- package/dist/esm/{isDarkColor-8696cb70.js → isDarkColor-e982fa09.js} +1 -1
- package/dist/esm/loader.js +6 -4
- package/dist/esm/{localization-5d83fde2.js → localization-d8f6453b.js} +366 -2
- package/dist/esm/{submitGtag-a7d07aec.js → submitGtag-bebe2cb0.js} +3 -8
- package/dist/esm/zonos-address_4.entry.js +282 -0
- package/dist/esm/zonos-badge_2.entry.js +52 -0
- package/dist/esm/zonos-banner.entry.js +4 -9
- package/dist/esm/zonos-button_3.entry.js +155 -0
- package/dist/esm/zonos-card_2.entry.js +26 -14
- package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +82 -89
- package/dist/esm/zonos-checkout.entry.js +20 -23
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +36 -0
- package/dist/esm/{zonos-country-flag_4.entry.js → zonos-country-select_3.entry.js} +30 -55
- package/dist/esm/zonos-elements.js +7 -5
- package/dist/esm/zonos-hello-dialog.entry.js +13 -8
- package/dist/esm/zonos-hello.entry.js +3 -3
- package/dist/esm/zonos-logo.entry.js +28 -0
- package/dist/esm/zonos-notification.entry.js +5 -6
- package/dist/esm/zonos-payment.entry.js +7 -7
- package/dist/esm/zonos-select-dialog-header_2.entry.js +40 -0
- package/dist/esm/zonos-shipping-rich-radio.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +4 -6
- package/dist/esm/{zonosStore-e59617f8.js → zonosStore-e6c7be3a.js} +1 -1
- package/dist/esm-es5/ILanguage-97790bee.js +1 -0
- package/dist/esm-es5/app-globals-0f993ce5.js +1 -0
- package/dist/esm-es5/cart-bc3bb22e.js +1 -0
- package/dist/esm-es5/getBorderRadius-e9736f7e.js +1 -0
- package/dist/esm-es5/index.js +0 -1
- package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
- package/dist/esm-es5/{isDarkColor-8696cb70.js → isDarkColor-e982fa09.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-d8f6453b.js +1 -0
- package/dist/esm-es5/submitGtag-bebe2cb0.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -0
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -0
- 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 -0
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -0
- 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-logo.entry.js +1 -0
- 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 -0
- 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-e59617f8.js → zonosStore-e6c7be3a.js} +1 -1
- package/dist/scripts/insertTranslations.js +1 -0
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +2 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.d.ts +7 -0
- package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +1 -5
- package/dist/types/components/common/zonos-banner/zonos-banner.d.ts +0 -4
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -5
- package/dist/types/components/common/zonos-card/zonos-card.d.ts +0 -4
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +42 -0
- package/dist/types/components/common/zonos-country-flag/zonos-country-flag.d.ts +0 -4
- package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +1 -1
- package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +1 -1
- package/dist/types/components/common/zonos-language-select/zonos-language-select.d.ts +9 -0
- package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +0 -4
- package/dist/types/components/common/zonos-notification/zonos-notification.d.ts +0 -4
- package/dist/types/components/common/zonos-select-dialog-header/zonos-select-dialog-header.d.ts +12 -0
- package/dist/types/components/common/zonos-spinner/zonos-spinner.d.ts +1 -1
- package/dist/types/components/common/zonos-text/zonos-text.d.ts +1 -5
- package/dist/types/components/common/zonos-tooltip/zonos-tooltip.d.ts +12 -0
- package/dist/types/components/common/zonos-v-stack/zonos-v-stack.d.ts +0 -4
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.d.ts +5 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +2 -0
- package/dist/types/components/store/checkout/stripe.d.ts +9 -0
- package/dist/types/components/store/hello/localization.d.ts +2 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -0
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +7 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +18 -2
- 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/isCheckoutMobile.d.ts +1 -1
- package/dist/types/components/utils/getBorderRadius.d.ts +1 -1
- package/dist/types/components.d.ts +242 -116
- package/dist/types/types/ILanguage.d.ts +81 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +3 -3
- package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +13 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +16 -4
- package/dist/types/types/generated/graphql.customer.types.ts +21 -4
- package/dist/types/types/generated/graphql.frontend.types.d.ts +6 -6
- package/dist/types/types/generated/graphql.frontend.types.ts +14 -4
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/styles/Color.d.ts +2 -0
- package/dist/zonos-elements/index.esm.js +0 -1
- package/dist/zonos-elements/{p-eb96f893.system.entry.js → p-00d63df1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-04f63cea.entry.js +1 -0
- package/dist/zonos-elements/{p-7cae86a0.system.entry.js → p-06652d87.system.entry.js} +1 -1
- package/dist/zonos-elements/p-066c5893.system.js +1 -0
- package/dist/zonos-elements/p-0c7480a5.entry.js +1 -0
- package/dist/zonos-elements/p-16ad90ca.js +1 -0
- package/dist/zonos-elements/p-16b74c31.system.js +1 -0
- package/dist/zonos-elements/{p-0024f8c2.js → p-17550a10.js} +1 -1
- package/dist/zonos-elements/p-1d16a6fb.js +1 -0
- package/dist/zonos-elements/p-1ea68e3b.entry.js +1 -0
- package/dist/zonos-elements/{p-28d7b75d.entry.js → p-1ed530cc.entry.js} +1 -1
- package/dist/zonos-elements/p-289c8b1a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-8970e202.system.entry.js → p-2a00c270.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-be23cc91.system.entry.js → p-32bca9c8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-37f53a79.entry.js +1 -0
- package/dist/zonos-elements/p-394cf1cf.js +1 -0
- package/dist/zonos-elements/p-3ef27745.js +1 -0
- package/dist/zonos-elements/{p-7beaee33.system.entry.js → p-458fd100.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e8da4463.js → p-47fac33f.js} +1 -1
- package/dist/zonos-elements/p-49a764e9.system.entry.js +1 -0
- package/dist/zonos-elements/p-4fafb2a5.system.entry.js +1 -0
- package/dist/zonos-elements/p-4fb71a93.js +1 -0
- package/dist/zonos-elements/{p-dc09ca69.system.js → p-50287643.system.js} +1 -1
- package/dist/zonos-elements/p-50ea2036.system.js +1 -0
- package/dist/zonos-elements/p-5276c61b.system.entry.js +1 -0
- package/dist/zonos-elements/p-56ba5cbf.system.js +1 -0
- package/dist/zonos-elements/{p-5a0264e8.system.entry.js → p-5a113c3d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6308b347.entry.js +1 -0
- package/dist/zonos-elements/p-63d1b1fe.entry.js +1 -0
- package/dist/zonos-elements/p-7347ee7c.system.entry.js +1 -0
- package/dist/zonos-elements/p-7a6144b1.entry.js +1 -0
- package/dist/zonos-elements/p-7dd8e8ba.system.entry.js +1 -0
- package/dist/zonos-elements/p-81a54668.js +1 -0
- package/dist/zonos-elements/p-8c26a080.system.js +1 -0
- package/dist/zonos-elements/p-96aabe02.entry.js +1 -0
- package/dist/zonos-elements/p-9cbbf261.system.entry.js +1 -0
- package/dist/zonos-elements/p-a33745e9.entry.js +1 -0
- package/dist/zonos-elements/{p-5d91e45c.entry.js → p-a4de3fb2.entry.js} +1 -1
- package/dist/zonos-elements/p-a682fd38.system.entry.js +1 -0
- package/dist/zonos-elements/p-abe7524f.system.js +1 -0
- package/dist/zonos-elements/p-aed0098c.system.js +1 -0
- package/dist/zonos-elements/{p-73174d0c.system.entry.js → p-b81a0577.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ba1a111a.system.entry.js +1 -0
- package/dist/zonos-elements/p-ba43275e.entry.js +1 -0
- package/dist/zonos-elements/p-bd6a2095.entry.js +1 -0
- package/dist/zonos-elements/{p-f82e000f.system.entry.js → p-c4321084.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-824ebf9d.entry.js → p-cdf114a2.entry.js} +1 -1
- package/dist/zonos-elements/p-d5ae3cbb.system.entry.js +1 -0
- package/dist/zonos-elements/p-d5d7c8f5.entry.js +1 -0
- package/dist/zonos-elements/p-dd7729fd.system.entry.js +1 -0
- package/dist/zonos-elements/p-de339fb6.entry.js +1 -0
- package/dist/zonos-elements/p-e1255160.js +1 -0
- package/dist/zonos-elements/p-e8a9bc56.entry.js +1 -0
- package/dist/zonos-elements/{p-7f68c103.system.js → p-e99d79d9.system.js} +1 -1
- package/dist/zonos-elements/p-ec25f180.entry.js +1 -0
- package/dist/zonos-elements/p-f49dfd06.system.js +1 -0
- package/dist/zonos-elements/{p-1165b6e5.entry.js → p-f6f5f644.entry.js} +1 -1
- package/dist/zonos-elements/p-fcc4f140.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +17 -18
- package/dist/cjs/zonos-address_2.cjs.entry.js +0 -141
- package/dist/cjs/zonos-badge.cjs.entry.js +0 -38
- package/dist/cjs/zonos-button_2.cjs.entry.js +0 -130
- package/dist/cjs/zonos-icon.cjs.entry.js +0 -35
- package/dist/collection/components/common/zonos-country-select/assets/arrowLeftBlue.svg +0 -1
- package/dist/components/zonos-logo2.js +0 -48
- package/dist/esm/getBorderRadius-9e4cb3b1.js +0 -16
- package/dist/esm/zonos-address_2.entry.js +0 -136
- package/dist/esm/zonos-badge.entry.js +0 -34
- package/dist/esm/zonos-button_2.entry.js +0 -125
- package/dist/esm/zonos-icon.entry.js +0 -31
- package/dist/esm-es5/cart-ba9b0d4c.js +0 -1
- package/dist/esm-es5/getBorderRadius-9e4cb3b1.js +0 -1
- package/dist/esm-es5/localization-5d83fde2.js +0 -1
- package/dist/esm-es5/submitGtag-a7d07aec.js +0 -1
- package/dist/esm-es5/zonos-address_2.entry.js +0 -1
- package/dist/esm-es5/zonos-badge.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-country-flag_4.entry.js +0 -1
- package/dist/esm-es5/zonos-icon.entry.js +0 -1
- package/dist/zonos-elements/p-027abb50.entry.js +0 -1
- package/dist/zonos-elements/p-12c19be6.system.entry.js +0 -1
- package/dist/zonos-elements/p-12ecf765.system.js +0 -1
- package/dist/zonos-elements/p-1c00ffea.system.entry.js +0 -1
- package/dist/zonos-elements/p-21793192.entry.js +0 -1
- package/dist/zonos-elements/p-245997d9.js +0 -1
- package/dist/zonos-elements/p-26edde4d.system.entry.js +0 -1
- package/dist/zonos-elements/p-39d12bf0.entry.js +0 -1
- package/dist/zonos-elements/p-3d965e88.entry.js +0 -1
- package/dist/zonos-elements/p-410045c5.system.entry.js +0 -1
- package/dist/zonos-elements/p-59343e23.system.js +0 -1
- package/dist/zonos-elements/p-7748735d.entry.js +0 -1
- package/dist/zonos-elements/p-839f6cd9.entry.js +0 -1
- package/dist/zonos-elements/p-83bb8727.system.entry.js +0 -1
- package/dist/zonos-elements/p-8ebc0b64.js +0 -1
- package/dist/zonos-elements/p-9f3cad08.entry.js +0 -1
- package/dist/zonos-elements/p-a6f2e282.system.js +0 -1
- package/dist/zonos-elements/p-afed9236.entry.js +0 -1
- package/dist/zonos-elements/p-b035f9e5.system.js +0 -1
- package/dist/zonos-elements/p-b1ffb37b.entry.js +0 -1
- package/dist/zonos-elements/p-b87fa3a1.js +0 -1
- package/dist/zonos-elements/p-bd02a65c.entry.js +0 -1
- package/dist/zonos-elements/p-be4bc6bc.entry.js +0 -1
- package/dist/zonos-elements/p-bea31a7b.system.entry.js +0 -1
- package/dist/zonos-elements/p-c3d75f4f.system.js +0 -1
- package/dist/zonos-elements/p-da2387d2.system.entry.js +0 -1
- package/dist/zonos-elements/p-dcf1e1b4.system.entry.js +0 -1
- package/dist/zonos-elements/p-ee8b44c0.system.js +0 -1
- package/dist/zonos-elements/p-efd1544b.system.entry.js +0 -1
- package/dist/zonos-elements/p-f2733cc7.js +0 -1
- package/dist/zonos-elements/p-f342e7c7.entry.js +0 -1
- package/dist/zonos-elements/p-fdb9568e.entry.js +0 -1
- /package/dist/cjs/{index-3ead02fe.js → index-72767498.js} +0 -0
- /package/dist/esm/{index-81a199ef.js → index-b5be4dc3.js} +0 -0
- /package/dist/esm-es5/{index-81a199ef.js → index-b5be4dc3.js} +0 -0
- /package/dist/zonos-elements/{p-4d8545e1.js → p-58127116.js} +0 -0
- /package/dist/zonos-elements/{p-4d39efb6.system.js → p-d1ab0823.system.js} +0 -0
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-3ead02fe.js');
|
|
6
|
-
const cart = require('./cart-f038cf46.js');
|
|
7
|
-
const localization = require('./localization-d43e1540.js');
|
|
8
|
-
require('./zonosStore-b88b5671.js');
|
|
9
|
-
require('./isDarkColor-5eda1323.js');
|
|
10
|
-
require('./getBorderRadius-cd7ef574.js');
|
|
11
|
-
|
|
12
|
-
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:var(--amino-space-16)}";
|
|
13
|
-
const ZonosAddressStyle0 = zonosAddressCss;
|
|
14
|
-
|
|
15
|
-
const ZonosAddress = class {
|
|
16
|
-
constructor(hostRef) {
|
|
17
|
-
index.registerInstance(this, hostRef);
|
|
18
|
-
this.type = undefined;
|
|
19
|
-
this.titleText = undefined;
|
|
20
|
-
this.defaultAddress = null;
|
|
21
|
-
this.stripe = window.Zonos.stripe;
|
|
22
|
-
}
|
|
23
|
-
async watchInitStripe() {
|
|
24
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
25
|
-
this.stripe = window.Zonos.stripe;
|
|
26
|
-
if (!this.stripe || !cart.stripeStore.stripeElements) {
|
|
27
|
-
localization.logError("Stripe is not initialized. Couldn't load stripe element.");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const phone = (_a = this.defaultAddress) === null || _a === void 0 ? void 0 : _a.phone;
|
|
31
|
-
if (!phone) {
|
|
32
|
-
// remove phone from default address if it's not provided, stripe
|
|
33
|
-
// will throw error if key phone exist and its value is empty or 'undefined'.
|
|
34
|
-
(_b = this.defaultAddress) === null || _b === void 0 ? true : delete _b.phone;
|
|
35
|
-
}
|
|
36
|
-
const shippableCountries = localization.localizationStore.shippingZoneCountries;
|
|
37
|
-
const addressElement = cart.stripeStore.stripeElements.create('address', {
|
|
38
|
-
allowedCountries: shippableCountries
|
|
39
|
-
? Object.values(shippableCountries).map(country => country.code)
|
|
40
|
-
: [],
|
|
41
|
-
autocomplete: {
|
|
42
|
-
mode: 'automatic',
|
|
43
|
-
},
|
|
44
|
-
contacts: this.defaultAddress ? [this.defaultAddress] : [],
|
|
45
|
-
defaultValues: {
|
|
46
|
-
address: Object.assign(Object.assign({}, (_c = cart.stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address), { country: ((_d = cart.stripeStore.stripeAddressEventData) === null || _d === void 0 ? void 0 : _d.value.address.country) ||
|
|
47
|
-
localization.localizationStore.selectedCountryCode ||
|
|
48
|
-
'AL' }),
|
|
49
|
-
firstName: (_e = cart.stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value.firstName,
|
|
50
|
-
lastName: (_f = cart.stripeStore.stripeAddressEventData) === null || _f === void 0 ? void 0 : _f.value.lastName,
|
|
51
|
-
phone: (_g = cart.stripeStore.stripeAddressEventData) === null || _g === void 0 ? void 0 : _g.value.phone,
|
|
52
|
-
},
|
|
53
|
-
display: {
|
|
54
|
-
name: 'split',
|
|
55
|
-
},
|
|
56
|
-
fields: {
|
|
57
|
-
phone: 'always',
|
|
58
|
-
},
|
|
59
|
-
mode: this.type,
|
|
60
|
-
validation: {
|
|
61
|
-
phone: {
|
|
62
|
-
required: 'always',
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
addressElement.mount(this.el.querySelector('.zonos--address-component'));
|
|
67
|
-
addressElement.on('change', event => {
|
|
68
|
-
const eventValue = event.value;
|
|
69
|
-
cart.stripeStore.stripeAddressEventData = Object.assign(Object.assign({}, event), { elementMode: 'shipping', elementType: 'address', empty: false, value: Object.assign(Object.assign({}, eventValue), { firstName: eventValue.firstName || eventValue.name.split(' ')[0], lastName: eventValue.lastName || eventValue.name.split(' ').pop() }) });
|
|
70
|
-
// run prefetch landed cost when address is changed
|
|
71
|
-
void cart.stripeStorePrefetchLandedCost();
|
|
72
|
-
});
|
|
73
|
-
cart.stripeStore.stripeAddressElement = addressElement;
|
|
74
|
-
}
|
|
75
|
-
disconnectedCallback() {
|
|
76
|
-
var _a;
|
|
77
|
-
// destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
|
|
78
|
-
(_a = cart.stripeStore.stripeAddressElement) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
79
|
-
}
|
|
80
|
-
componentDidLoad() {
|
|
81
|
-
// @Watch doesn't get trigger on initial load
|
|
82
|
-
void this.watchInitStripe();
|
|
83
|
-
}
|
|
84
|
-
render() {
|
|
85
|
-
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
86
|
-
return (index.h(index.Host, { key: 'f376a81e62581bff4ac25d53f11c8e53408f9e7e', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: 'bdc1a8b7414cae0e79c90e0685700590cd920468', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: 'fe384f4c0e508a9f8ddff8fa579c504c3f18e7bb', class: "zonos--address-component" })));
|
|
87
|
-
}
|
|
88
|
-
get el() { return index.getElement(this); }
|
|
89
|
-
static get watchers() { return {
|
|
90
|
-
"stripe": ["watchInitStripe"]
|
|
91
|
-
}; }
|
|
92
|
-
};
|
|
93
|
-
ZonosAddress.style = ZonosAddressStyle0;
|
|
94
|
-
|
|
95
|
-
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:var(--amino-space-16)}";
|
|
96
|
-
const ZonosLinkAuthenticationStyle0 = zonosLinkAuthenticationCss;
|
|
97
|
-
|
|
98
|
-
const ZonosLinkAuthentication = class {
|
|
99
|
-
constructor(hostRef) {
|
|
100
|
-
index.registerInstance(this, hostRef);
|
|
101
|
-
this.titleText = undefined;
|
|
102
|
-
this.stripe = cart.stripeStore.stripe;
|
|
103
|
-
}
|
|
104
|
-
watchInitStripe() {
|
|
105
|
-
if (!this.stripe || !cart.stripeStore.stripeElements) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
// Create and mount the Authentication Element in ${type} mode
|
|
109
|
-
const linkAuthenticationElement = cart.stripeStore.stripeLinkElement ||
|
|
110
|
-
cart.stripeStore.stripeElements.create('linkAuthentication');
|
|
111
|
-
const linkAuthenticationElementContainer = this.el.querySelector('.zonos--link-authentication-component');
|
|
112
|
-
if (!linkAuthenticationElementContainer) {
|
|
113
|
-
// eslint-disable-next-line no-console
|
|
114
|
-
console.error('Cannot find container element for linkAuthenticationElement');
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
linkAuthenticationElement.mount(linkAuthenticationElementContainer);
|
|
118
|
-
linkAuthenticationElement.on('change', event => {
|
|
119
|
-
cart.stripeStore.stripeLinkEventData = event;
|
|
120
|
-
// run prefetch landed cost when address is changed
|
|
121
|
-
void cart.stripeStorePrefetchLandedCost();
|
|
122
|
-
});
|
|
123
|
-
cart.stripeStore.stripeLinkElement = linkAuthenticationElement;
|
|
124
|
-
}
|
|
125
|
-
componentDidLoad() {
|
|
126
|
-
// @Watch doesn't get trigger on initial load
|
|
127
|
-
this.watchInitStripe();
|
|
128
|
-
}
|
|
129
|
-
render() {
|
|
130
|
-
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
131
|
-
return (index.h(index.Host, { key: '48ec92ca8a1500c3b8e85222c3df069c32074e72', class: "zonos--link-authentication zonos--elements" }, index.h("zonos-text", { key: '9060fab8ab9f88157ee6951af830e106e6ff9509', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: 'dac7e96170d15faa8c1013fb298ae86e2ce99f0b', class: "zonos--link-authentication-component" })));
|
|
132
|
-
}
|
|
133
|
-
get el() { return index.getElement(this); }
|
|
134
|
-
static get watchers() { return {
|
|
135
|
-
"stripe": ["watchInitStripe"]
|
|
136
|
-
}; }
|
|
137
|
-
};
|
|
138
|
-
ZonosLinkAuthentication.style = ZonosLinkAuthenticationStyle0;
|
|
139
|
-
|
|
140
|
-
exports.zonos_address = ZonosAddress;
|
|
141
|
-
exports.zonos_link_authentication = ZonosLinkAuthentication;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-3ead02fe.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-b88b5671.js');
|
|
7
|
-
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
|
|
9
|
-
const zonosBadgeCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";
|
|
10
|
-
const ZonosBadgeStyle0 = zonosBadgeCss;
|
|
11
|
-
|
|
12
|
-
const ZonosBadge = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.bold = false;
|
|
16
|
-
this.color = 'gray';
|
|
17
|
-
this.icon = undefined;
|
|
18
|
-
this.iconRight = false;
|
|
19
|
-
this.size = 'default';
|
|
20
|
-
this.rounded = false;
|
|
21
|
-
this.class = '';
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
return (index.h(index.Host, { key: '2d111e91f403ef5c03f742f5dabe9491623be91d', class: classes.classes(['zonos--elements zonos--badge', this.class]), style: {
|
|
25
|
-
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
26
|
-
} }, index.h("div", { key: 'e6debe091b732b857f180cee19bec4be435ea524', class: classes.classes([
|
|
27
|
-
'zonos--badge-content',
|
|
28
|
-
this.color,
|
|
29
|
-
this.rounded && 'rounded',
|
|
30
|
-
this.iconRight && 'icon-right',
|
|
31
|
-
this.size,
|
|
32
|
-
this.bold && 'bold',
|
|
33
|
-
]) }, this.icon, index.h("zonos-text", { key: 'e92c97d77fa5ce279059953f7d7fbc5a0030aa5d' }, index.h("slot", { key: 'c93852c3225ba57dd26c26300254f348e349f9ad' })))));
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
ZonosBadge.style = ZonosBadgeStyle0;
|
|
37
|
-
|
|
38
|
-
exports.zonos_badge = ZonosBadge;
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-3ead02fe.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-b88b5671.js');
|
|
7
|
-
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-cd7ef574.js');
|
|
9
|
-
const isColorVariable = require('./isColorVariable-41cacd82.js');
|
|
10
|
-
const isDarkColor = require('./isDarkColor-5eda1323.js');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Get theme for button text based on background color
|
|
14
|
-
*/
|
|
15
|
-
const getButtonTheme = (overrideBackground) => {
|
|
16
|
-
// use override background if it exists, otherwise use color from setting
|
|
17
|
-
const background = overrideBackground || zonosStore.zonosStore.appearance.colorSecondary;
|
|
18
|
-
const backgroundColor = background && isColorVariable.isColorVariable(background)
|
|
19
|
-
? `var(--amino-${background})`
|
|
20
|
-
: background;
|
|
21
|
-
// determine theme based on background color (to change button text color if needed)
|
|
22
|
-
const buttonTheme = backgroundColor && isDarkColor.isDarkColor(backgroundColor) ? 'DARK' : 'LIGHT';
|
|
23
|
-
return buttonTheme;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const zonosButtonCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--amino-gray-200)}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-200)}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color)}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}";
|
|
27
|
-
const ZonosButtonStyle0 = zonosButtonCss;
|
|
28
|
-
|
|
29
|
-
const ZonosButton = class {
|
|
30
|
-
constructor(hostRef) {
|
|
31
|
-
index.registerInstance(this, hostRef);
|
|
32
|
-
/**
|
|
33
|
-
* Detect if the button has an content
|
|
34
|
-
*/
|
|
35
|
-
this.handleSlotChange = () => {
|
|
36
|
-
this.hasContent = true;
|
|
37
|
-
};
|
|
38
|
-
this.class = '';
|
|
39
|
-
this.color = undefined;
|
|
40
|
-
this.backgroundColor = undefined;
|
|
41
|
-
this.borderStyle = undefined;
|
|
42
|
-
this.isDisabled = false;
|
|
43
|
-
this.icon = null;
|
|
44
|
-
this.iconRight = false;
|
|
45
|
-
this.size = 'sm';
|
|
46
|
-
this.variant = 'standard';
|
|
47
|
-
this.noBackground = false;
|
|
48
|
-
this.noPaddingLeft = false;
|
|
49
|
-
this.noPaddingRight = false;
|
|
50
|
-
this.loading = false;
|
|
51
|
-
this.theme = undefined;
|
|
52
|
-
this.hasIcon = !!this.icon;
|
|
53
|
-
this.hasContent = false;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Detect if the icon changes and update the state accordingly
|
|
57
|
-
*/
|
|
58
|
-
iconChangeHandler() {
|
|
59
|
-
this.hasIcon = !!this.icon;
|
|
60
|
-
}
|
|
61
|
-
clickHandler(event) {
|
|
62
|
-
if (this.loading || this.isDisabled) {
|
|
63
|
-
event.preventDefault();
|
|
64
|
-
event.stopPropagation();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
componentWillLoad() {
|
|
68
|
-
this.iconChangeHandler();
|
|
69
|
-
}
|
|
70
|
-
render() {
|
|
71
|
-
const disabled = this.loading || this.isDisabled;
|
|
72
|
-
const color = this.color && isColorVariable.isColorVariable(this.color)
|
|
73
|
-
? `var(--amino-${this.color})`
|
|
74
|
-
: this.color;
|
|
75
|
-
// use override background if it exists, otherwise use color from setting
|
|
76
|
-
const overrideBackground = this.backgroundColor || zonosStore.zonosStore.appearance.colorSecondary;
|
|
77
|
-
// only set theme for button to change text color if variant is standard and override background is set
|
|
78
|
-
const buttonTheme = this.variant === 'standard'
|
|
79
|
-
? getButtonTheme(overrideBackground)
|
|
80
|
-
: undefined;
|
|
81
|
-
const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle);
|
|
82
|
-
return (index.h(index.Host, { key: 'af41b1035e5ea776d47580647a65997bb41730e3', class: classes.classes(['zonos--elements', this.class]), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
|
|
83
|
-
'--background-color': overrideBackground,
|
|
84
|
-
'--border-radius': borderStyle,
|
|
85
|
-
'--color': color,
|
|
86
|
-
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
87
|
-
} }, index.h("button", { key: 'af3fdc9aa0440cf5a7e49c4c0c76826d7a700d32', class: classes.classes([
|
|
88
|
-
this.hasIcon && 'has-icon',
|
|
89
|
-
this.hasContent && 'has-content',
|
|
90
|
-
this.noBackground && 'no-background',
|
|
91
|
-
this.noPaddingLeft && 'no-padding-left',
|
|
92
|
-
this.noPaddingRight && 'no-padding-right',
|
|
93
|
-
this.iconRight && 'icon-right',
|
|
94
|
-
this.variant,
|
|
95
|
-
this.size,
|
|
96
|
-
// only override background if variant is set to standard
|
|
97
|
-
this.backgroundColor &&
|
|
98
|
-
this.variant === 'standard' &&
|
|
99
|
-
'override-background',
|
|
100
|
-
]), disabled: disabled }, this.loading && (index.h("div", { class: "zonos--spinner-wrapper" }, index.h("zonos-spinner", { size: 16 }))), !this.loading && !this.iconRight && this.icon, index.h("slot", { key: '32b6a079ba98ab9d62b5df34ddc15e4ac7a87a8e', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
101
|
-
}
|
|
102
|
-
static get watchers() { return {
|
|
103
|
-
"icon": ["iconChangeHandler"]
|
|
104
|
-
}; }
|
|
105
|
-
};
|
|
106
|
-
ZonosButton.style = ZonosButtonStyle0;
|
|
107
|
-
|
|
108
|
-
const zonosSpinnerCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative;overflow:hidden;width:var(--size);height:var(--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--size);height:var(--size);stroke:var(--amino-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--amino-gray-200)}:host.black{stroke:var(--amino-spinner-stroke-black)}:host.black circle.track{stroke:var(--amino-spinner-track-black)}:host.white{stroke:var(--amino-spinner-stroke-white)}:host.white circle.track{stroke:var(--amino-spinner-track-white)}:host.info{stroke:var(--amino-blue-600)}:host.info circle.track{stroke:var(--amino-blue-100)}:host.success{stroke:var(--amino-green-600)}:host.success circle.track{stroke:var(--amino-green-100)}:host.danger{stroke:var(--amino-red-600)}:host.danger circle.track{stroke:var(--amino-red-100)}:host.warning{stroke:var(--amino-orange-600)}:host.warning circle.track{stroke:var(--amino-orange-100)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}";
|
|
109
|
-
const ZonosSpinnerStyle0 = zonosSpinnerCss;
|
|
110
|
-
|
|
111
|
-
const ZonosSpinner = class {
|
|
112
|
-
constructor(hostRef) {
|
|
113
|
-
index.registerInstance(this, hostRef);
|
|
114
|
-
this.size = 32;
|
|
115
|
-
this.color = undefined;
|
|
116
|
-
}
|
|
117
|
-
render() {
|
|
118
|
-
if (!this.el.shadowRoot) {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
return (index.h(index.Host, { class: classes.classes(['zonos--elements', this.color]), style: {
|
|
122
|
-
'--size': `${this.size}px`,
|
|
123
|
-
} }, index.h("svg", { viewBox: "0 0 50 50" }, index.h("circle", { class: "track", cx: "25", cy: "25", fill: "none", id: "loading-spinner-circle", r: "20", "stroke-width": "5" }), index.h("circle", { cx: "25", cy: "25", fill: "none", id: "loading-spinner-circle", r: "20", "stroke-width": "5" }))));
|
|
124
|
-
}
|
|
125
|
-
get el() { return index.getElement(this); }
|
|
126
|
-
};
|
|
127
|
-
ZonosSpinner.style = ZonosSpinnerStyle0;
|
|
128
|
-
|
|
129
|
-
exports.zonos_button = ZonosButton;
|
|
130
|
-
exports.zonos_spinner = ZonosSpinner;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-3ead02fe.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-b88b5671.js');
|
|
7
|
-
|
|
8
|
-
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)}";
|
|
9
|
-
const ZonosIconStyle0 = zonosIconCss;
|
|
10
|
-
|
|
11
|
-
const ZonosIcon = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.autoHeight = false;
|
|
15
|
-
this.color = 'gray-1200';
|
|
16
|
-
this.content = undefined;
|
|
17
|
-
this.size = 24;
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
if (!this.content || !this.el.shadowRoot) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
this.el.shadowRoot.innerHTML = this.content;
|
|
24
|
-
return (index.h(index.Host, { class: "zonos--elements", style: {
|
|
25
|
-
'--color': `var(--amino-${this.color})`,
|
|
26
|
-
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
27
|
-
'--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
|
|
28
|
-
'--width': `${this.size}px`,
|
|
29
|
-
} }));
|
|
30
|
-
}
|
|
31
|
-
get el() { return index.getElement(this); }
|
|
32
|
-
};
|
|
33
|
-
ZonosIcon.style = ZonosIconStyle0;
|
|
34
|
-
|
|
35
|
-
exports.zonos_icon = ZonosIcon;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg" color="var(--amino-blue-600)"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host, getAssetPath } from '@stencil/core/internal/client';
|
|
2
|
-
import { b as zonosStoreFontFamily } from './zonosStore.js';
|
|
3
|
-
import { c as classes } from './classes.js';
|
|
4
|
-
|
|
5
|
-
const zonosLogoCss = ":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 img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";
|
|
6
|
-
const ZonosLogoStyle0 = zonosLogoCss;
|
|
7
|
-
|
|
8
|
-
const ZonosLogo = /*@__PURE__*/ proxyCustomElement(class ZonosLogo extends HTMLElement {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
this.__registerHost();
|
|
12
|
-
this.__attachShadow();
|
|
13
|
-
this.theme = 'LIGHT';
|
|
14
|
-
this.width = 'auto';
|
|
15
|
-
this.class = '';
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
const filterColor = this.theme === 'DARK'
|
|
19
|
-
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
20
|
-
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
21
|
-
return (h(Host, { key: '7ddd949ab91ed0c61ee34ce6ee80da54b3ba3664', class: classes(['zonos--elements zonos--logo', this.class]), style: {
|
|
22
|
-
'--filter-color': filterColor,
|
|
23
|
-
'--font-family': zonosStoreFontFamily(),
|
|
24
|
-
'--width': this.width,
|
|
25
|
-
} }, h("img", { key: '1a8d98f7d836f253a21654c84ab0251969362e2f', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
|
|
26
|
-
}
|
|
27
|
-
static get assetsDirs() { return ["assets"]; }
|
|
28
|
-
static get style() { return ZonosLogoStyle0; }
|
|
29
|
-
}, [1, "zonos-logo", {
|
|
30
|
-
"theme": [1],
|
|
31
|
-
"width": [1],
|
|
32
|
-
"class": [1]
|
|
33
|
-
}]);
|
|
34
|
-
function defineCustomElement() {
|
|
35
|
-
if (typeof customElements === "undefined") {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const components = ["zonos-logo"];
|
|
39
|
-
components.forEach(tagName => { switch (tagName) {
|
|
40
|
-
case "zonos-logo":
|
|
41
|
-
if (!customElements.get(tagName)) {
|
|
42
|
-
customElements.define(tagName, ZonosLogo);
|
|
43
|
-
}
|
|
44
|
-
break;
|
|
45
|
-
} });
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { ZonosLogo as Z, defineCustomElement as d };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z as zonosStore } from './zonosStore-e59617f8.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Get the border radius for the elements based on the style
|
|
5
|
-
* @param overrideBorderStyle
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
const getBorderRadius = (overrideBorderStyle) => {
|
|
9
|
-
if (overrideBorderStyle) {
|
|
10
|
-
// If the override is set, use that, otherwise use the default radius style
|
|
11
|
-
return overrideBorderStyle === 'SHARP' ? '0px' : '10px';
|
|
12
|
-
}
|
|
13
|
-
return zonosStore.appearance.style === 'SHARP' ? '0px' : '10px';
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { getBorderRadius as g };
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, d as getElement } from './index-81a199ef.js';
|
|
2
|
-
import { s as stripeStore, m as stripeStorePrefetchLandedCost } from './cart-ba9b0d4c.js';
|
|
3
|
-
import { b as logError, a as localizationStore } from './localization-5d83fde2.js';
|
|
4
|
-
import './zonosStore-e59617f8.js';
|
|
5
|
-
import './isDarkColor-8696cb70.js';
|
|
6
|
-
import './getBorderRadius-9e4cb3b1.js';
|
|
7
|
-
|
|
8
|
-
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:var(--amino-space-16)}";
|
|
9
|
-
const ZonosAddressStyle0 = zonosAddressCss;
|
|
10
|
-
|
|
11
|
-
const ZonosAddress = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
registerInstance(this, hostRef);
|
|
14
|
-
this.type = undefined;
|
|
15
|
-
this.titleText = undefined;
|
|
16
|
-
this.defaultAddress = null;
|
|
17
|
-
this.stripe = window.Zonos.stripe;
|
|
18
|
-
}
|
|
19
|
-
async watchInitStripe() {
|
|
20
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
21
|
-
this.stripe = window.Zonos.stripe;
|
|
22
|
-
if (!this.stripe || !stripeStore.stripeElements) {
|
|
23
|
-
logError("Stripe is not initialized. Couldn't load stripe element.");
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const phone = (_a = this.defaultAddress) === null || _a === void 0 ? void 0 : _a.phone;
|
|
27
|
-
if (!phone) {
|
|
28
|
-
// remove phone from default address if it's not provided, stripe
|
|
29
|
-
// will throw error if key phone exist and its value is empty or 'undefined'.
|
|
30
|
-
(_b = this.defaultAddress) === null || _b === void 0 ? true : delete _b.phone;
|
|
31
|
-
}
|
|
32
|
-
const shippableCountries = localizationStore.shippingZoneCountries;
|
|
33
|
-
const addressElement = stripeStore.stripeElements.create('address', {
|
|
34
|
-
allowedCountries: shippableCountries
|
|
35
|
-
? Object.values(shippableCountries).map(country => country.code)
|
|
36
|
-
: [],
|
|
37
|
-
autocomplete: {
|
|
38
|
-
mode: 'automatic',
|
|
39
|
-
},
|
|
40
|
-
contacts: this.defaultAddress ? [this.defaultAddress] : [],
|
|
41
|
-
defaultValues: {
|
|
42
|
-
address: Object.assign(Object.assign({}, (_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address), { country: ((_d = stripeStore.stripeAddressEventData) === null || _d === void 0 ? void 0 : _d.value.address.country) ||
|
|
43
|
-
localizationStore.selectedCountryCode ||
|
|
44
|
-
'AL' }),
|
|
45
|
-
firstName: (_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value.firstName,
|
|
46
|
-
lastName: (_f = stripeStore.stripeAddressEventData) === null || _f === void 0 ? void 0 : _f.value.lastName,
|
|
47
|
-
phone: (_g = stripeStore.stripeAddressEventData) === null || _g === void 0 ? void 0 : _g.value.phone,
|
|
48
|
-
},
|
|
49
|
-
display: {
|
|
50
|
-
name: 'split',
|
|
51
|
-
},
|
|
52
|
-
fields: {
|
|
53
|
-
phone: 'always',
|
|
54
|
-
},
|
|
55
|
-
mode: this.type,
|
|
56
|
-
validation: {
|
|
57
|
-
phone: {
|
|
58
|
-
required: 'always',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
addressElement.mount(this.el.querySelector('.zonos--address-component'));
|
|
63
|
-
addressElement.on('change', event => {
|
|
64
|
-
const eventValue = event.value;
|
|
65
|
-
stripeStore.stripeAddressEventData = Object.assign(Object.assign({}, event), { elementMode: 'shipping', elementType: 'address', empty: false, value: Object.assign(Object.assign({}, eventValue), { firstName: eventValue.firstName || eventValue.name.split(' ')[0], lastName: eventValue.lastName || eventValue.name.split(' ').pop() }) });
|
|
66
|
-
// run prefetch landed cost when address is changed
|
|
67
|
-
void stripeStorePrefetchLandedCost();
|
|
68
|
-
});
|
|
69
|
-
stripeStore.stripeAddressElement = addressElement;
|
|
70
|
-
}
|
|
71
|
-
disconnectedCallback() {
|
|
72
|
-
var _a;
|
|
73
|
-
// destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
|
|
74
|
-
(_a = stripeStore.stripeAddressElement) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
75
|
-
}
|
|
76
|
-
componentDidLoad() {
|
|
77
|
-
// @Watch doesn't get trigger on initial load
|
|
78
|
-
void this.watchInitStripe();
|
|
79
|
-
}
|
|
80
|
-
render() {
|
|
81
|
-
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
82
|
-
return (h(Host, { key: 'f376a81e62581bff4ac25d53f11c8e53408f9e7e', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'bdc1a8b7414cae0e79c90e0685700590cd920468', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'fe384f4c0e508a9f8ddff8fa579c504c3f18e7bb', class: "zonos--address-component" })));
|
|
83
|
-
}
|
|
84
|
-
get el() { return getElement(this); }
|
|
85
|
-
static get watchers() { return {
|
|
86
|
-
"stripe": ["watchInitStripe"]
|
|
87
|
-
}; }
|
|
88
|
-
};
|
|
89
|
-
ZonosAddress.style = ZonosAddressStyle0;
|
|
90
|
-
|
|
91
|
-
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:var(--amino-space-16)}";
|
|
92
|
-
const ZonosLinkAuthenticationStyle0 = zonosLinkAuthenticationCss;
|
|
93
|
-
|
|
94
|
-
const ZonosLinkAuthentication = class {
|
|
95
|
-
constructor(hostRef) {
|
|
96
|
-
registerInstance(this, hostRef);
|
|
97
|
-
this.titleText = undefined;
|
|
98
|
-
this.stripe = stripeStore.stripe;
|
|
99
|
-
}
|
|
100
|
-
watchInitStripe() {
|
|
101
|
-
if (!this.stripe || !stripeStore.stripeElements) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
// Create and mount the Authentication Element in ${type} mode
|
|
105
|
-
const linkAuthenticationElement = stripeStore.stripeLinkElement ||
|
|
106
|
-
stripeStore.stripeElements.create('linkAuthentication');
|
|
107
|
-
const linkAuthenticationElementContainer = this.el.querySelector('.zonos--link-authentication-component');
|
|
108
|
-
if (!linkAuthenticationElementContainer) {
|
|
109
|
-
// eslint-disable-next-line no-console
|
|
110
|
-
console.error('Cannot find container element for linkAuthenticationElement');
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
linkAuthenticationElement.mount(linkAuthenticationElementContainer);
|
|
114
|
-
linkAuthenticationElement.on('change', event => {
|
|
115
|
-
stripeStore.stripeLinkEventData = event;
|
|
116
|
-
// run prefetch landed cost when address is changed
|
|
117
|
-
void stripeStorePrefetchLandedCost();
|
|
118
|
-
});
|
|
119
|
-
stripeStore.stripeLinkElement = linkAuthenticationElement;
|
|
120
|
-
}
|
|
121
|
-
componentDidLoad() {
|
|
122
|
-
// @Watch doesn't get trigger on initial load
|
|
123
|
-
this.watchInitStripe();
|
|
124
|
-
}
|
|
125
|
-
render() {
|
|
126
|
-
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
127
|
-
return (h(Host, { key: '48ec92ca8a1500c3b8e85222c3df069c32074e72', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '9060fab8ab9f88157ee6951af830e106e6ff9509', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'dac7e96170d15faa8c1013fb298ae86e2ce99f0b', class: "zonos--link-authentication-component" })));
|
|
128
|
-
}
|
|
129
|
-
get el() { return getElement(this); }
|
|
130
|
-
static get watchers() { return {
|
|
131
|
-
"stripe": ["watchInitStripe"]
|
|
132
|
-
}; }
|
|
133
|
-
};
|
|
134
|
-
ZonosLinkAuthentication.style = ZonosLinkAuthenticationStyle0;
|
|
135
|
-
|
|
136
|
-
export { ZonosAddress as zonos_address, ZonosLinkAuthentication as zonos_link_authentication };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-81a199ef.js';
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-e59617f8.js';
|
|
3
|
-
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
|
|
5
|
-
const zonosBadgeCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";
|
|
6
|
-
const ZonosBadgeStyle0 = zonosBadgeCss;
|
|
7
|
-
|
|
8
|
-
const ZonosBadge = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.bold = false;
|
|
12
|
-
this.color = 'gray';
|
|
13
|
-
this.icon = undefined;
|
|
14
|
-
this.iconRight = false;
|
|
15
|
-
this.size = 'default';
|
|
16
|
-
this.rounded = false;
|
|
17
|
-
this.class = '';
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return (h(Host, { key: '2d111e91f403ef5c03f742f5dabe9491623be91d', class: classes(['zonos--elements zonos--badge', this.class]), style: {
|
|
21
|
-
'--font-family': zonosStoreFontFamily(),
|
|
22
|
-
} }, h("div", { key: 'e6debe091b732b857f180cee19bec4be435ea524', class: classes([
|
|
23
|
-
'zonos--badge-content',
|
|
24
|
-
this.color,
|
|
25
|
-
this.rounded && 'rounded',
|
|
26
|
-
this.iconRight && 'icon-right',
|
|
27
|
-
this.size,
|
|
28
|
-
this.bold && 'bold',
|
|
29
|
-
]) }, this.icon, h("zonos-text", { key: 'e92c97d77fa5ce279059953f7d7fbc5a0030aa5d' }, h("slot", { key: 'c93852c3225ba57dd26c26300254f348e349f9ad' })))));
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
ZonosBadge.style = ZonosBadgeStyle0;
|
|
33
|
-
|
|
34
|
-
export { ZonosBadge as zonos_badge };
|