@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,10 +1,5 @@
|
|
|
1
|
-
import { z as zonosStore } from './zonosStore-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const checkoutBreakpoint = 890;
|
|
5
|
-
const isCheckoutMobile = (isMobile) => {
|
|
6
|
-
return isMobile || window.innerWidth < checkoutBreakpoint;
|
|
7
|
-
};
|
|
1
|
+
import { z as zonosStore } from './zonosStore-e6c7be3a.js';
|
|
2
|
+
import { a as log } from './localization-d8f6453b.js';
|
|
8
3
|
|
|
9
4
|
/**
|
|
10
5
|
* Submit a gtag event if the gtag function is available.
|
|
@@ -21,4 +16,4 @@ const submitGtag = (event) => {
|
|
|
21
16
|
}
|
|
22
17
|
};
|
|
23
18
|
|
|
24
|
-
export {
|
|
19
|
+
export { submitGtag as s };
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, d as getElement, c as createEvent } from './index-b5be4dc3.js';
|
|
2
|
+
import { s as stripeStore, f as stripeStorePrefetchLandedCost } from './cart-bc3bb22e.js';
|
|
3
|
+
import { b as logError, l as localizationStore } from './localization-d8f6453b.js';
|
|
4
|
+
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
5
|
+
import { d as zonosStoreFontFamily } from './zonosStore-e6c7be3a.js';
|
|
6
|
+
import { c as classes } from './classes-0d95c529.js';
|
|
7
|
+
import { g as getBorderRadius } from './getBorderRadius-e9736f7e.js';
|
|
8
|
+
import { i as isDarkColor } from './isDarkColor-e982fa09.js';
|
|
9
|
+
|
|
10
|
+
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)}";
|
|
11
|
+
const ZonosAddressStyle0 = zonosAddressCss;
|
|
12
|
+
|
|
13
|
+
const ZonosAddress = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
registerInstance(this, hostRef);
|
|
16
|
+
this.type = undefined;
|
|
17
|
+
this.titleText = undefined;
|
|
18
|
+
this.defaultAddress = null;
|
|
19
|
+
this.stripe = window.Zonos.stripe;
|
|
20
|
+
this.isDirtyAddress = false;
|
|
21
|
+
}
|
|
22
|
+
getStripeAddressInstance() {
|
|
23
|
+
if (this.type === 'billing') {
|
|
24
|
+
return {
|
|
25
|
+
stripeAddressElement: stripeStore.stripeBillingAddressElement,
|
|
26
|
+
stripeAddressEventData: stripeStore.stripeBillingAddressEventData,
|
|
27
|
+
stripeElements: stripeStore.stripeElementsForBillingAddress,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
stripeAddressElement: stripeStore.stripeAddressElement,
|
|
32
|
+
stripeAddressEventData: stripeStore.stripeAddressEventData,
|
|
33
|
+
stripeElements: stripeStore.stripeElements,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
updateAddressEventData({ event, type, }) {
|
|
37
|
+
switch (type) {
|
|
38
|
+
case 'billing':
|
|
39
|
+
stripeStore.stripeBillingAddressEventData = event;
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
stripeStore.stripeAddressEventData = event;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
// only prefetch if the address type is shipping
|
|
46
|
+
void stripeStorePrefetchLandedCost();
|
|
47
|
+
}
|
|
48
|
+
updateAddressElement({ stripeAddressElement, type, }) {
|
|
49
|
+
if (type === 'shipping') {
|
|
50
|
+
stripeStore.stripeAddressElement = stripeAddressElement;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
stripeStore.stripeBillingAddressElement = stripeAddressElement;
|
|
54
|
+
}
|
|
55
|
+
async watchInitStripe() {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
this.stripe = window.Zonos.stripe;
|
|
58
|
+
const { stripeAddressEventData, stripeElements } = this.getStripeAddressInstance();
|
|
59
|
+
if (!this.stripe || !stripeElements) {
|
|
60
|
+
logError("Stripe is not initialized. Couldn't load stripe element.");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const phone = (_a = this.defaultAddress) === null || _a === void 0 ? void 0 : _a.phone;
|
|
64
|
+
if (!phone) {
|
|
65
|
+
// remove phone from default address if it's not provided, stripe
|
|
66
|
+
// will throw error if key phone exist and its value is empty or 'undefined'.
|
|
67
|
+
(_b = this.defaultAddress) === null || _b === void 0 ? true : delete _b.phone;
|
|
68
|
+
}
|
|
69
|
+
const shippableCountries = localizationStore.shippingZoneCountries;
|
|
70
|
+
const shippingZone = shippableCountries
|
|
71
|
+
? Object.values(shippableCountries).map(country => country.code)
|
|
72
|
+
: [];
|
|
73
|
+
const addressElement = stripeElements.create('address', {
|
|
74
|
+
allowedCountries: this.type === 'shipping' ? shippingZone : [],
|
|
75
|
+
contacts: this.defaultAddress ? [this.defaultAddress] : [],
|
|
76
|
+
defaultValues: {
|
|
77
|
+
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) ||
|
|
78
|
+
localizationStore.selectedCountryCode ||
|
|
79
|
+
'AL' }),
|
|
80
|
+
firstName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName,
|
|
81
|
+
lastName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName,
|
|
82
|
+
phone: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone,
|
|
83
|
+
},
|
|
84
|
+
display: {
|
|
85
|
+
name: 'split',
|
|
86
|
+
},
|
|
87
|
+
fields: {
|
|
88
|
+
phone: 'always',
|
|
89
|
+
},
|
|
90
|
+
mode: this.type,
|
|
91
|
+
validation: {
|
|
92
|
+
phone: {
|
|
93
|
+
required: 'always',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
addressElement.mount(this.el.querySelector('.zonos--address-component'));
|
|
98
|
+
addressElement.on('change', event => {
|
|
99
|
+
const eventValue = event.value;
|
|
100
|
+
if (!this.isDirtyAddress && eventValue.address.line1.length >= 3) {
|
|
101
|
+
this.isDirtyAddress = true;
|
|
102
|
+
// stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
// scroll directly into view if it's mobile
|
|
105
|
+
if (isCheckoutMobile()) {
|
|
106
|
+
this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// scroll into the end of the page so the address placeholder won't be hidden
|
|
110
|
+
const yOffset = this.type === 'shipping' ? 100 : 600;
|
|
111
|
+
const parentWrapper = this.el.closest('.zonos--group');
|
|
112
|
+
const y = this.el.getBoundingClientRect().top + yOffset;
|
|
113
|
+
parentWrapper === null || parentWrapper === void 0 ? void 0 : parentWrapper.scrollTo({ behavior: 'smooth', top: y });
|
|
114
|
+
}
|
|
115
|
+
}, 600);
|
|
116
|
+
}
|
|
117
|
+
this.updateAddressEventData({
|
|
118
|
+
event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', empty: false, value: Object.assign(Object.assign({}, eventValue), { firstName: eventValue.firstName || eventValue.name.split(' ')[0], lastName: eventValue.lastName || eventValue.name.split(' ').pop() }) }),
|
|
119
|
+
type: this.type,
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
this.updateAddressElement({
|
|
123
|
+
stripeAddressElement: addressElement,
|
|
124
|
+
type: this.type,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
disconnectedCallback() {
|
|
128
|
+
// destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
|
|
129
|
+
const stripeElement = this.getStripeAddressInstance().stripeAddressElement;
|
|
130
|
+
stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.destroy();
|
|
131
|
+
}
|
|
132
|
+
componentDidLoad() {
|
|
133
|
+
const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
|
|
134
|
+
this.isDirtyAddress =
|
|
135
|
+
!!stripeAddressEventData &&
|
|
136
|
+
stripeAddressEventData.value.address.line1.length > 0;
|
|
137
|
+
// @Watch doesn't get trigger on initial load
|
|
138
|
+
void this.watchInitStripe();
|
|
139
|
+
}
|
|
140
|
+
render() {
|
|
141
|
+
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
142
|
+
return (h(Host, { key: 'b2aa1ee3f16ae4ebcce83b599c97aa80f09dc9d3', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'e37392d0add0ab8541f78131abdf9082fd2455b4', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'd28d1908ee2f525455b0680e25cff3040093ad74', class: "zonos--address-component" })));
|
|
143
|
+
}
|
|
144
|
+
get el() { return getElement(this); }
|
|
145
|
+
static get watchers() { return {
|
|
146
|
+
"stripe": ["watchInitStripe"]
|
|
147
|
+
}; }
|
|
148
|
+
};
|
|
149
|
+
ZonosAddress.style = ZonosAddressStyle0;
|
|
150
|
+
|
|
151
|
+
const colorPrefixes = [
|
|
152
|
+
'blue',
|
|
153
|
+
'cyan',
|
|
154
|
+
'green',
|
|
155
|
+
'orange',
|
|
156
|
+
'purple',
|
|
157
|
+
'red',
|
|
158
|
+
'gray',
|
|
159
|
+
'glass',
|
|
160
|
+
];
|
|
161
|
+
|
|
162
|
+
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:var(--amino-space-8);-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;-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)}";
|
|
163
|
+
const ZonosCheckboxStyle0 = zonosCheckboxCss;
|
|
164
|
+
|
|
165
|
+
const ZonosCheckbox = class {
|
|
166
|
+
constructor(hostRef) {
|
|
167
|
+
registerInstance(this, hostRef);
|
|
168
|
+
this.checkboxSelected = createEvent(this, "checkboxSelected", 7);
|
|
169
|
+
this.backgroundColor = 'blue';
|
|
170
|
+
this.label = undefined;
|
|
171
|
+
this.isChecked = false;
|
|
172
|
+
this.isDisabled = false;
|
|
173
|
+
this.size = 12;
|
|
174
|
+
this.fontSize = 'base';
|
|
175
|
+
this.borderStyle = undefined;
|
|
176
|
+
}
|
|
177
|
+
render() {
|
|
178
|
+
const isBackgroundVariable = colorPrefixes.includes(this.backgroundColor);
|
|
179
|
+
const backgroundColor = isBackgroundVariable
|
|
180
|
+
? `var(--amino-${this.backgroundColor}-600)`
|
|
181
|
+
: this.backgroundColor;
|
|
182
|
+
const checkmarkColor = isBackgroundVariable
|
|
183
|
+
? // use lighter color if the color is amino variable
|
|
184
|
+
`var(--amino-${this.backgroundColor}-200)`
|
|
185
|
+
: // if it's not an amino variable, use white if the background is dark, and dark if the background is light
|
|
186
|
+
!isDarkColor(backgroundColor)
|
|
187
|
+
? 'var(--amino-gray-800)'
|
|
188
|
+
: 'var(--amino-gray-0)';
|
|
189
|
+
const borderStyle = getBorderRadius(this.borderStyle, '4px');
|
|
190
|
+
return (h(Host, { key: '86ab50028bec3f6a230b3a9492d06c1b2ce250fe', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
191
|
+
'--background-color': backgroundColor,
|
|
192
|
+
'--border-radius': borderStyle,
|
|
193
|
+
'--font-family': zonosStoreFontFamily(),
|
|
194
|
+
'--size': `${this.size}px`,
|
|
195
|
+
} }, h("label", { key: '88e87bb45739707a4e3da6d378ba491899dad76c', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: 'c877ba4a2bd43aa67c394136ef4b3c71096e75aa', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
196
|
+
this.checkboxSelected.emit(e.target.checked);
|
|
197
|
+
}, type: "checkbox" }), h("span", { key: '0f40603a3cf90c38f37b05d7bfd8ed54623b07f4', class: "checkmark-container" }, h("svg", { key: '67945bb82cc05997bb40aeef14c5c0fd452a68af', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'ac2d1db7ba5c1578dbe59f4ca9755a409ab24546', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { size: this.fontSize }, this.label)))));
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
ZonosCheckbox.style = ZonosCheckboxStyle0;
|
|
201
|
+
|
|
202
|
+
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}";
|
|
203
|
+
const ZonosCollapseStyle0 = zonosCollapseCss;
|
|
204
|
+
|
|
205
|
+
const ZonosCollapse = class {
|
|
206
|
+
constructor(hostRef) {
|
|
207
|
+
registerInstance(this, hostRef);
|
|
208
|
+
this.collapsed = false;
|
|
209
|
+
this.collapseSize = 0;
|
|
210
|
+
this.height = this.el.scrollHeight;
|
|
211
|
+
}
|
|
212
|
+
getElementHeight() {
|
|
213
|
+
const fullHeight = `${this.height}px`;
|
|
214
|
+
const collapsedHeight = `${this.collapseSize}px`;
|
|
215
|
+
return this.collapsed ? collapsedHeight : fullHeight;
|
|
216
|
+
}
|
|
217
|
+
componentDidLoad() {
|
|
218
|
+
this.height = this.el.scrollHeight;
|
|
219
|
+
}
|
|
220
|
+
componentDidRender() {
|
|
221
|
+
var _a, _b, _c;
|
|
222
|
+
(_c = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('iframe')) === null || _b === void 0 ? void 0 : _b.contentWindow) === null || _c === void 0 ? void 0 : _c.addEventListener('resize', () => {
|
|
223
|
+
this.height = this.el.scrollHeight;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
render() {
|
|
227
|
+
this.height = this.el.scrollHeight;
|
|
228
|
+
return (h(Host, { key: '372c80d0d5b8d2c693b2c74bd6652430c8e4a5bb', class: 'zonos--elements zonos--collapse', style: {
|
|
229
|
+
'--font-family': zonosStoreFontFamily(),
|
|
230
|
+
height: this.getElementHeight(),
|
|
231
|
+
} }, h("div", { key: 'babd12279d1ac54092a1cff83e8e5b8ed5e81008' }, h("iframe", { key: '6d3a7845d560ba587829ba68033cd92ec8d2af5b', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'f295e17fd3178eb44dc7c0c51f87a80694fd04d7' }))));
|
|
232
|
+
}
|
|
233
|
+
get el() { return getElement(this); }
|
|
234
|
+
};
|
|
235
|
+
ZonosCollapse.style = ZonosCollapseStyle0;
|
|
236
|
+
|
|
237
|
+
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)}";
|
|
238
|
+
const ZonosLinkAuthenticationStyle0 = zonosLinkAuthenticationCss;
|
|
239
|
+
|
|
240
|
+
const ZonosLinkAuthentication = class {
|
|
241
|
+
constructor(hostRef) {
|
|
242
|
+
registerInstance(this, hostRef);
|
|
243
|
+
this.titleText = undefined;
|
|
244
|
+
this.stripe = stripeStore.stripe;
|
|
245
|
+
}
|
|
246
|
+
watchInitStripe() {
|
|
247
|
+
if (!this.stripe || !stripeStore.stripeElements) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
// Create and mount the Authentication Element in ${type} mode
|
|
251
|
+
const linkAuthenticationElement = stripeStore.stripeLinkElement ||
|
|
252
|
+
stripeStore.stripeElements.create('linkAuthentication');
|
|
253
|
+
const linkAuthenticationElementContainer = this.el.querySelector('.zonos--link-authentication-component');
|
|
254
|
+
if (!linkAuthenticationElementContainer) {
|
|
255
|
+
// eslint-disable-next-line no-console
|
|
256
|
+
console.error('Cannot find container element for linkAuthenticationElement');
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
linkAuthenticationElement.mount(linkAuthenticationElementContainer);
|
|
260
|
+
linkAuthenticationElement.on('change', event => {
|
|
261
|
+
stripeStore.stripeLinkEventData = event;
|
|
262
|
+
// run prefetch landed cost when address is changed
|
|
263
|
+
void stripeStorePrefetchLandedCost();
|
|
264
|
+
});
|
|
265
|
+
stripeStore.stripeLinkElement = linkAuthenticationElement;
|
|
266
|
+
}
|
|
267
|
+
componentDidLoad() {
|
|
268
|
+
// @Watch doesn't get trigger on initial load
|
|
269
|
+
this.watchInitStripe();
|
|
270
|
+
}
|
|
271
|
+
render() {
|
|
272
|
+
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
273
|
+
return (h(Host, { key: 'aec893e026a60bcbf81e93a3c63a842f97437dcc', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '93c2c462d3a108364d2dfbc4aeab058f87bcc7b3', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '0098e20d87cce7547fc1abf26859c0d3765407cd', class: "zonos--link-authentication-component" })));
|
|
274
|
+
}
|
|
275
|
+
get el() { return getElement(this); }
|
|
276
|
+
static get watchers() { return {
|
|
277
|
+
"stripe": ["watchInitStripe"]
|
|
278
|
+
}; }
|
|
279
|
+
};
|
|
280
|
+
ZonosLinkAuthentication.style = ZonosLinkAuthenticationStyle0;
|
|
281
|
+
|
|
282
|
+
export { ZonosAddress as zonos_address, ZonosCheckbox as zonos_checkbox, ZonosCollapse as zonos_collapse, ZonosLinkAuthentication as zonos_link_authentication };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-b5be4dc3.js';
|
|
2
|
+
import { d as zonosStoreFontFamily } from './zonosStore-e6c7be3a.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.badgeColor = 'gray';
|
|
13
|
+
this.icon = undefined;
|
|
14
|
+
this.iconRight = false;
|
|
15
|
+
this.size = 'default';
|
|
16
|
+
this.rounded = false;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, { key: '0f502b63322730f508fd7c92f231573b1dfbfd6b', class: classes(['zonos--elements zonos--badge']), style: {
|
|
20
|
+
'--font-family': zonosStoreFontFamily(),
|
|
21
|
+
} }, h("div", { key: '4ee3f0b623067625ddd79336a1854f5ab796b3b1', class: classes([
|
|
22
|
+
'zonos--badge-content',
|
|
23
|
+
this.badgeColor,
|
|
24
|
+
this.rounded && 'rounded',
|
|
25
|
+
this.iconRight && 'icon-right',
|
|
26
|
+
this.size,
|
|
27
|
+
this.bold && 'bold',
|
|
28
|
+
]) }, this.icon, h("zonos-text", { key: 'e5bdf974408416811f7666fc453ca47db58fa43f' }, h("slot", { key: 'd953b60fefe2c25aea529b9de41938cfd96a285b' })))));
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
ZonosBadge.style = ZonosBadgeStyle0;
|
|
32
|
+
|
|
33
|
+
const zonosTooltipCss = ":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 .zonos--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:var(--amino-space-12);background-color:var(--amino-gray-1200);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--amino-radius-4);z-index:100;-webkit-box-shadow:var(--amino-v3-shadow-large);box-shadow:var(--amino-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";
|
|
34
|
+
const ZonosTooltipStyle0 = zonosTooltipCss;
|
|
35
|
+
|
|
36
|
+
const ZonosTooltip = class {
|
|
37
|
+
constructor(hostRef) {
|
|
38
|
+
registerInstance(this, hostRef);
|
|
39
|
+
this.label = '';
|
|
40
|
+
this.subtitle = '';
|
|
41
|
+
this.showTooltip = false;
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return (h(Host, { key: '684561bebf9385c7e6bcca7de37e7ee5084c9692', class: "zonos--elements" }, h("div", { key: 'c116738f39d25b856b268ece410a33f91046c739', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '4073ed0766b4efaa0c25fa7febdbad4c42714dca' }), h("div", { key: '8c6b180577830aaaceb629819535dd930fc49e02', class: classes([
|
|
45
|
+
this.showTooltip && 'zonos--show-tooltip',
|
|
46
|
+
'zonos--tooltip-content',
|
|
47
|
+
]) }, h("zonos-text", { key: '7c018a9d5a7db939b59624dcc77029a5a8d621af', color: "gray-0", size: "s", type: "boldLabel" }, this.label), h("zonos-text", { key: 'c1f09eaf9cb1084ecf47334903b9ca8b944502b7', color: "gray-0", size: "xs" }, this.subtitle)))));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
ZonosTooltip.style = ZonosTooltipStyle0;
|
|
51
|
+
|
|
52
|
+
export { ZonosBadge as zonos_badge, ZonosTooltip as zonos_tooltip };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-b5be4dc3.js';
|
|
2
|
+
import { d as zonosStoreFontFamily } from './zonosStore-e6c7be3a.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
|
|
5
5
|
const zonosBannerCss = ":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{border-radius:var(--amino-radius-10);padding:var(--amino-space-16);background:var(--amino-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:\"icon header\" \". content\";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:var(--amino-space-0);grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:var(--amino-space-4)}:host(.info){background-color:var(--amino-blue-100);border:1px solid var(--amino-blue-200)}:host(.success){background-color:var(--amino-green-100);border:1px solid var(--amino-green-200)}:host(.error){background-color:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host(.warning){background-color:var(--amino-orange-100);border:1px solid var(--amino-orange-200)}";
|
|
@@ -16,7 +16,6 @@ const ZonosBanner = class {
|
|
|
16
16
|
};
|
|
17
17
|
this.bannerTitle = undefined;
|
|
18
18
|
this.intent = undefined;
|
|
19
|
-
this.class = '';
|
|
20
19
|
this.hasContent = false;
|
|
21
20
|
}
|
|
22
21
|
render() {
|
|
@@ -28,13 +27,9 @@ const ZonosBanner = class {
|
|
|
28
27
|
h("slot", { onSlotchange: this.handleSlotChange }),
|
|
29
28
|
].filter(Boolean);
|
|
30
29
|
const textColor = color === 'gray' ? 'gray-1200' : `${color}-800`;
|
|
31
|
-
return (h("div", { class: classes(['zonos--container']) }, h("div", { class: "zonos--icon-wrapper" }, h("svg", { color: primaryColor, fill: "none", height: "20", viewBox: "0 0 24 24", width: "20", xmlns: "https://www.w3.org/2000/svg" }, h("path", { "clip-rule": "evenodd", d: "M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z", "data-is-secondary-color": "true", fill: secondaryColor, "fill-rule": "evenodd" }), h("path", { "clip-rule": "evenodd", d: "M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z", fill: "currentColor", "fill-rule": "evenodd" }))), h("div", { class: "zonos--header-wrapper" }, h("zonos-text", {
|
|
30
|
+
return (h("div", { class: classes(['zonos--container']) }, h("div", { class: "zonos--icon-wrapper" }, h("svg", { color: primaryColor, fill: "none", height: "20", viewBox: "0 0 24 24", width: "20", xmlns: "https://www.w3.org/2000/svg" }, h("path", { "clip-rule": "evenodd", d: "M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z", "data-is-secondary-color": "true", fill: secondaryColor, "fill-rule": "evenodd" }), h("path", { "clip-rule": "evenodd", d: "M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z", fill: "currentColor", "fill-rule": "evenodd" }))), h("div", { class: "zonos--header-wrapper" }, h("zonos-text", { textColor: textColor, type: "label", weight: 600 }, header)), content && (h("div", { class: "zonos--content-wrapper" }, h("zonos-text", { textColor: textColor }, content)))));
|
|
32
31
|
};
|
|
33
|
-
const baseClass = classes([
|
|
34
|
-
'zonos--elements zonos--banner',
|
|
35
|
-
this.class,
|
|
36
|
-
this.intent,
|
|
37
|
-
]);
|
|
32
|
+
const baseClass = classes(['zonos--elements zonos--banner', this.intent]);
|
|
38
33
|
const font = zonosStoreFontFamily();
|
|
39
34
|
switch (this.intent) {
|
|
40
35
|
case 'error':
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, d as getElement } from './index-b5be4dc3.js';
|
|
2
|
+
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-e6c7be3a.js';
|
|
3
|
+
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-e9736f7e.js';
|
|
5
|
+
import { i as isColorVariable } from './isColorVariable-91c33804.js';
|
|
6
|
+
import { i as isDarkColor } from './isDarkColor-e982fa09.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Get theme for button text based on background color
|
|
10
|
+
*/
|
|
11
|
+
const getButtonTheme = (overrideBackground) => {
|
|
12
|
+
// use override background if it exists, otherwise use color from setting
|
|
13
|
+
const background = overrideBackground || zonosStore.appearance.colorSecondary;
|
|
14
|
+
const backgroundColor = background && isColorVariable(background)
|
|
15
|
+
? `var(--amino-${background})`
|
|
16
|
+
: background;
|
|
17
|
+
// determine theme based on background color (to change button text color if needed)
|
|
18
|
+
const buttonTheme = backgroundColor && isDarkColor(backgroundColor) ? 'DARK' : 'LIGHT';
|
|
19
|
+
return buttonTheme;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
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(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--amino-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--amino-radius-4);width:24px}";
|
|
23
|
+
const ZonosButtonStyle0 = zonosButtonCss;
|
|
24
|
+
|
|
25
|
+
const ZonosButton = class {
|
|
26
|
+
constructor(hostRef) {
|
|
27
|
+
registerInstance(this, hostRef);
|
|
28
|
+
/**
|
|
29
|
+
* Detect if the button has an content
|
|
30
|
+
*/
|
|
31
|
+
this.handleSlotChange = () => {
|
|
32
|
+
this.hasContent = true;
|
|
33
|
+
};
|
|
34
|
+
this.buttonColor = undefined;
|
|
35
|
+
this.backgroundColor = undefined;
|
|
36
|
+
this.borderStyle = undefined;
|
|
37
|
+
this.isDisabled = false;
|
|
38
|
+
this.icon = null;
|
|
39
|
+
this.iconRight = false;
|
|
40
|
+
this.size = 'sm';
|
|
41
|
+
this.variant = 'standard';
|
|
42
|
+
this.noBackground = false;
|
|
43
|
+
this.noPaddingLeft = false;
|
|
44
|
+
this.noPaddingRight = false;
|
|
45
|
+
this.loading = false;
|
|
46
|
+
this.theme = undefined;
|
|
47
|
+
this.hasIcon = !!this.icon;
|
|
48
|
+
this.hasContent = false;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Detect if the icon changes and update the state accordingly
|
|
52
|
+
*/
|
|
53
|
+
iconChangeHandler() {
|
|
54
|
+
this.hasIcon = !!this.icon;
|
|
55
|
+
}
|
|
56
|
+
clickHandler(event) {
|
|
57
|
+
if (this.loading || this.isDisabled) {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
event.stopPropagation();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
componentWillLoad() {
|
|
63
|
+
this.iconChangeHandler();
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
const disabled = this.loading || this.isDisabled;
|
|
67
|
+
/**
|
|
68
|
+
* If the parent component pass in the variant prop with `undefined` value, it would not re-assign the `undefined` value with the default value.
|
|
69
|
+
* So need to re-assign the variant prop with the default value if the value is `undefined` here.
|
|
70
|
+
*/
|
|
71
|
+
const variant = this.variant || 'standard';
|
|
72
|
+
const color = this.buttonColor && isColorVariable(this.buttonColor)
|
|
73
|
+
? `var(--amino-${this.buttonColor})`
|
|
74
|
+
: this.buttonColor;
|
|
75
|
+
// use override background if it exists, otherwise use color from setting
|
|
76
|
+
const overrideBackground = this.backgroundColor || 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 = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
|
|
79
|
+
const borderStyle = getBorderRadius(this.borderStyle);
|
|
80
|
+
const spinnerColor = buttonTheme === 'LIGHT' ? 'white' : 'black';
|
|
81
|
+
return (h(Host, { key: '817142c1d229333aee0b38864788346d2749d3d1', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
|
|
82
|
+
'--background-color': overrideBackground,
|
|
83
|
+
'--border-radius': borderStyle,
|
|
84
|
+
'--color': color,
|
|
85
|
+
'--font-family': zonosStoreFontFamily(),
|
|
86
|
+
} }, h("button", { key: '04bff1f932154f54b4af51b2fac053d40efc354f', class: classes([
|
|
87
|
+
this.hasIcon && 'has-icon',
|
|
88
|
+
this.hasContent && 'has-content',
|
|
89
|
+
this.noBackground && 'no-background',
|
|
90
|
+
this.noPaddingLeft && 'no-padding-left',
|
|
91
|
+
this.noPaddingRight && 'no-padding-right',
|
|
92
|
+
this.iconRight && 'icon-right',
|
|
93
|
+
variant,
|
|
94
|
+
this.size,
|
|
95
|
+
// only override background if variant is set to standard
|
|
96
|
+
overrideBackground &&
|
|
97
|
+
variant === 'standard' &&
|
|
98
|
+
'override-background',
|
|
99
|
+
]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'fd9bd0e9f89c3c9ab6dc9d0ac7a123542a1f5023', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
100
|
+
}
|
|
101
|
+
static get watchers() { return {
|
|
102
|
+
"icon": ["iconChangeHandler"]
|
|
103
|
+
}; }
|
|
104
|
+
};
|
|
105
|
+
ZonosButton.style = ZonosButtonStyle0;
|
|
106
|
+
|
|
107
|
+
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)}";
|
|
108
|
+
const ZonosIconStyle0 = zonosIconCss;
|
|
109
|
+
|
|
110
|
+
const ZonosIcon = class {
|
|
111
|
+
constructor(hostRef) {
|
|
112
|
+
registerInstance(this, hostRef);
|
|
113
|
+
this.autoHeight = false;
|
|
114
|
+
this.iconColor = 'gray-1200';
|
|
115
|
+
this.content = undefined;
|
|
116
|
+
this.size = 24;
|
|
117
|
+
}
|
|
118
|
+
render() {
|
|
119
|
+
if (!this.content || !this.el.shadowRoot) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
this.el.shadowRoot.innerHTML = this.content;
|
|
123
|
+
return (h(Host, { class: "zonos--elements", style: {
|
|
124
|
+
'--color': `var(--amino-${this.iconColor})`,
|
|
125
|
+
'--font-family': zonosStoreFontFamily(),
|
|
126
|
+
'--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
|
|
127
|
+
'--width': `${this.size}px`,
|
|
128
|
+
} }));
|
|
129
|
+
}
|
|
130
|
+
get el() { return getElement(this); }
|
|
131
|
+
};
|
|
132
|
+
ZonosIcon.style = ZonosIconStyle0;
|
|
133
|
+
|
|
134
|
+
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)}@-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}:host(.black) circle{stroke:var(--amino-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--amino-spinner-track-black)}:host(.white) circle{stroke:var(--amino-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--amino-spinner-track-white)}:host(.info) circle{stroke:var(--amino-blue-600)}:host(.info) circle.track{stroke:var(--amino-blue-100)}:host(.success) circle{stroke:var(--amino-green-600)}:host(.success) circle.track{stroke:var(--amino-green-100)}:host(.danger) circle{stroke:var(--amino-red-600)}:host(.danger) circle.track{stroke:var(--amino-red-100)}:host(.warning) circle{stroke:var(--amino-orange-600)}:host(.warning) circle.track{stroke:var(--amino-orange-100)}";
|
|
135
|
+
const ZonosSpinnerStyle0 = zonosSpinnerCss;
|
|
136
|
+
|
|
137
|
+
const ZonosSpinner = class {
|
|
138
|
+
constructor(hostRef) {
|
|
139
|
+
registerInstance(this, hostRef);
|
|
140
|
+
this.size = 32;
|
|
141
|
+
this.spinnerColor = undefined;
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
if (!this.el.shadowRoot) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
return (h(Host, { class: classes(['zonos--elements', this.spinnerColor]), style: {
|
|
148
|
+
'--size': `${this.size}px`,
|
|
149
|
+
} }, h("svg", { viewBox: "0 0 50 50" }, h("circle", { class: "track", cx: "25", cy: "25", fill: "none", id: "loading-spinner-circle", r: "20", "stroke-width": "5" }), h("circle", { cx: "25", cy: "25", fill: "none", id: "loading-spinner-circle", r: "20", "stroke-width": "5" }))));
|
|
150
|
+
}
|
|
151
|
+
get el() { return getElement(this); }
|
|
152
|
+
};
|
|
153
|
+
ZonosSpinner.style = ZonosSpinnerStyle0;
|
|
154
|
+
|
|
155
|
+
export { ZonosButton as zonos_button, ZonosIcon as zonos_icon, ZonosSpinner as zonos_spinner };
|