@zonos/elements 1.3.6 → 1.3.7-alpha.1
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/{localization-2c9f5765.js → cart-89d9fff4.js} +863 -89
- package/dist/cjs/formatStringWithLinks-52341fc7.js +17 -0
- package/dist/cjs/{getBorderRadius-b252096d.js → getBorderRadius-d8f18958.js} +1 -1
- package/dist/cjs/{isDarkColor-168002d6.js → isDarkColor-57860b44.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/submitGtag-24740560.js +55 -0
- package/dist/cjs/zonos-address_4.cjs.entry.js +36 -18
- package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +8 -8
- package/dist/cjs/zonos-card_2.cjs.entry.js +10 -8
- package/dist/cjs/zonos-cart-items_9.cjs.entry.js +66 -56
- package/dist/cjs/zonos-checkout.cjs.entry.js +170 -34
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +51 -32
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -3
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +21 -12
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +23 -19
- package/dist/cjs/zonos-hello.cjs.entry.js +51 -34
- package/dist/cjs/zonos-link.cjs.entry.js +24 -0
- package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +5 -6
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-5d94dabb.js → zonosStore-138c5555.js} +9 -7
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +1 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +27 -13
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +39 -18
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +1 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -0
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.css +54 -0
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +97 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.css +2 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +4 -4
- package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +26 -6
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +8 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +50 -11
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -3
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +2 -2
- package/dist/collection/components/store/checkout/stripe.js +29 -4
- package/dist/collection/components/store/hello/localization.js +34 -7
- package/dist/collection/components/store/zonosStore.js +9 -7
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- 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/trackConversionEvent.js +22 -0
- package/dist/collection/components/utils/checkout/isShippableCountry.js +15 -0
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +111 -0
- package/dist/collection/components/utils/formatStringWithLinks.js +13 -0
- package/dist/collection/components/utils/handleFetch.js +1 -1
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +25 -28
- package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js +2 -1
- package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js +8 -6
- package/dist/collection/components/utils/hello/initHello.js +23 -3
- package/dist/collection/components/utils/logging/log.js +20 -9
- package/dist/collection/components/utils/logging/logError.js +2 -1
- package/dist/collection/components/utils/logging/sendErrorLog.js +12 -0
- package/dist/collection/scripts/checkIfLoadVersionDomain.js +35 -0
- package/dist/collection/scripts/zonosBase.js +21 -31
- package/dist/collection/styles/stripe/addressRuleStyle.js +4 -0
- package/dist/collection/types/generated/graphql.customer.types.js +7 -4
- package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
- package/dist/components/stripe.js +4097 -7
- package/dist/components/submitGtag.js +1 -1
- package/dist/components/trackConversionEvent.js +24 -0
- package/dist/components/zonos-address2.js +2 -3
- package/dist/components/zonos-badge2.js +3 -3
- package/dist/components/zonos-button2.js +5 -5
- package/dist/components/zonos-card2.js +2 -2
- package/dist/components/zonos-cart-subtotal2.js +2 -8
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +44 -16
- package/dist/components/zonos-checkout-footer2.js +1 -1
- package/dist/components/zonos-checkout-payment2.js +2 -3
- package/dist/components/zonos-checkout.js +157 -19
- package/dist/components/zonos-collapse2.js +26 -6
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +25 -6
- package/dist/components/zonos-country-flag2.js +1 -1
- package/dist/components/zonos-country-select2.js +9 -3
- package/dist/components/zonos-custom-message2.js +18 -3
- package/dist/components/zonos-customer-info2.js +4 -3
- package/dist/components/zonos-dialog2.js +3 -3
- package/dist/components/zonos-hello-dialog-footer2.js +3 -3
- package/dist/components/zonos-hello-dialog2.js +6 -5
- package/dist/components/zonos-hello.js +23 -7
- package/dist/components/zonos-language-select2.js +3 -3
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/components/zonos-link.d.ts +11 -0
- package/dist/components/zonos-link.js +43 -0
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-review2.js +2 -8
- package/dist/components/zonos-select-dialog-header2.js +2 -2
- package/dist/components/zonos-shipping-rich-radio2.js +1 -1
- package/dist/components/zonos-shipping2.js +7 -3
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/components/zonosStore.js +9 -7
- package/dist/esm/{localization-d8f6453b.js → cart-1bbb7662.js} +846 -90
- package/dist/esm/formatStringWithLinks-9e819405.js +15 -0
- package/dist/esm/{getBorderRadius-e9736f7e.js → getBorderRadius-19787feb.js} +1 -1
- package/dist/esm/{isDarkColor-e982fa09.js → isDarkColor-2344e7a5.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/submitGtag-d3d11f1a.js +51 -0
- package/dist/esm/zonos-address_4.entry.js +33 -15
- package/dist/esm/zonos-badge_2.entry.js +6 -6
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +8 -8
- package/dist/esm/zonos-card_2.entry.js +8 -6
- package/dist/esm/zonos-cart-items_9.entry.js +47 -37
- package/dist/esm/zonos-checkout.entry.js +158 -22
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +28 -9
- package/dist/esm/zonos-country-flag.entry.js +4 -2
- package/dist/esm/zonos-country-select_3.entry.js +19 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +9 -5
- package/dist/esm/zonos-hello.entry.js +24 -7
- package/dist/esm/zonos-link.entry.js +20 -0
- package/dist/esm/zonos-logo.entry.js +3 -3
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +5 -6
- package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-e6c7be3a.js → zonosStore-00bce01b.js} +9 -7
- package/dist/esm-es5/cart-1bbb7662.js +1 -0
- package/dist/esm-es5/formatStringWithLinks-9e819405.js +1 -0
- package/dist/esm-es5/{getBorderRadius-e9736f7e.js → getBorderRadius-19787feb.js} +1 -1
- package/dist/esm-es5/{isDarkColor-e982fa09.js → isDarkColor-2344e7a5.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-d3d11f1a.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -0
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-e6c7be3a.js → zonosStore-00bce01b.js} +1 -1
- package/dist/scripts/checkIfLoadVersionDomain.js +1 -0
- package/dist/scripts/loadStripe.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/stripe.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -1
- package/dist/types/components/common/component-template/zonos-link/zonos-link.d.ts +19 -0
- package/dist/types/components/common/zonos-collapse/zonos-collapse.d.ts +1 -0
- package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +2 -0
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +9 -3
- package/dist/types/components/store/checkout/cart.d.ts +6 -3
- package/dist/types/components/store/checkout/stripe.d.ts +26 -1
- package/dist/types/components/store/hello/localization.d.ts +1 -1
- package/dist/types/components/store/zonosStore.d.ts +2 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/trackConversionEvent.d.ts +3 -0
- package/dist/types/components/utils/checkout/isShippableCountry.d.ts +1 -0
- package/dist/types/components/utils/checkout/watchBigcommerceDomesticCheckout.d.ts +20 -0
- package/dist/types/components/utils/formatStringWithLinks.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/getCurrencyElements.d.ts +1 -1
- package/dist/types/components/utils/hello/currencyConversion/getLanguageCode.d.ts +1 -1
- package/dist/types/components/utils/logging/log.d.ts +1 -1
- package/dist/types/components/utils/logging/sendErrorLog.d.ts +7 -0
- package/dist/types/components.d.ts +53 -3
- package/dist/types/scripts/checkIfLoadVersionDomain.d.ts +13 -0
- package/dist/types/scripts/zonosBase.d.ts +2 -0
- package/dist/types/types/ICountryJson.d.ts +2 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +23 -53
- package/dist/types/types/generated/graphql.customer.types.ts +42 -62
- package/dist/types/types/generated/graphql.frontend.types.d.ts +9 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +19 -1
- package/dist/zonos-elements/p-0318632a.entry.js +1 -0
- package/dist/zonos-elements/p-066c5893.system.js +1 -1
- package/dist/zonos-elements/p-07966463.entry.js +1 -0
- package/dist/zonos-elements/p-0c0aa552.js +1 -0
- package/dist/zonos-elements/p-127b480c.entry.js +1 -0
- package/dist/zonos-elements/p-135ab559.system.entry.js +1 -0
- package/dist/zonos-elements/{p-b81a0577.system.entry.js → p-143dc0d9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-32bca9c8.system.entry.js → p-14d27ce1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-15a80c4a.entry.js +1 -0
- package/dist/zonos-elements/p-17e87be1.entry.js +1 -0
- package/dist/zonos-elements/{p-0c7480a5.entry.js → p-1e0dd491.entry.js} +1 -1
- package/dist/zonos-elements/{p-a33745e9.entry.js → p-279d1c5f.entry.js} +1 -1
- package/dist/zonos-elements/p-2d6557ee.system.js +1 -0
- package/dist/zonos-elements/p-314be538.system.entry.js +1 -0
- package/dist/zonos-elements/{p-dd7729fd.system.entry.js → p-328b7f6f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-354603b3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-50287643.system.js → p-49f6a985.system.js} +1 -1
- package/dist/zonos-elements/p-57b65321.system.entry.js +1 -0
- package/dist/zonos-elements/p-58c1ddef.system.js +1 -0
- package/dist/zonos-elements/{p-06652d87.system.entry.js → p-58e2f6a1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5ee03db0.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5a113c3d.system.entry.js → p-61e5cf29.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-49a764e9.system.entry.js → p-799d8a17.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7a32526c.entry.js +1 -0
- package/dist/zonos-elements/p-7b87b82f.js +1 -0
- package/dist/zonos-elements/{p-9cbbf261.system.entry.js → p-7c45ce37.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84f4f00f.entry.js +1 -0
- package/dist/zonos-elements/{p-e8a9bc56.entry.js → p-857cfe35.entry.js} +1 -1
- package/dist/zonos-elements/p-87e9c42f.entry.js +1 -0
- package/dist/zonos-elements/{p-e99d79d9.system.js → p-91797d4e.system.js} +1 -1
- package/dist/zonos-elements/{p-17550a10.js → p-95e0fc06.js} +1 -1
- package/dist/zonos-elements/{p-7a6144b1.entry.js → p-a3cc0f84.entry.js} +1 -1
- package/dist/zonos-elements/p-a5f12396.entry.js +1 -0
- package/dist/zonos-elements/p-a87561b8.js +1 -0
- package/dist/zonos-elements/{p-ba43275e.entry.js → p-ac0a7b8f.entry.js} +1 -1
- package/dist/zonos-elements/p-ae82a9ae.js +1 -0
- package/dist/zonos-elements/p-b0462325.system.entry.js +1 -0
- package/dist/zonos-elements/p-b2c0ec71.system.entry.js +1 -0
- package/dist/zonos-elements/{p-fcc4f140.system.js → p-b4725505.system.js} +1 -1
- package/dist/zonos-elements/p-bef54fb1.entry.js +1 -0
- package/dist/zonos-elements/p-c0d431f6.system.entry.js +1 -0
- package/dist/zonos-elements/p-d054788b.system.js +1 -0
- package/dist/zonos-elements/p-d407c93a.system.entry.js +1 -0
- package/dist/zonos-elements/p-e55dd932.js +1 -0
- package/dist/zonos-elements/p-ec37439e.entry.js +1 -0
- package/dist/zonos-elements/p-edace42b.entry.js +1 -0
- package/dist/zonos-elements/p-f478c814.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7dd8e8ba.system.entry.js → p-f6eaef7b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bd6a2095.entry.js → p-f7c36fcc.entry.js} +1 -1
- package/dist/zonos-elements/p-f862b97f.system.entry.js +1 -0
- package/dist/zonos-elements/p-fd642725.entry.js +1 -0
- package/dist/zonos-elements/p-fdb72530.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a4de3fb2.entry.js → p-ff64ddc5.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/cart-b8bbf22d.js +0 -698
- package/dist/cjs/submitGtag-792fe45d.js +0 -21
- package/dist/collection/scripts/extractZonosQaUrl.js +0 -26
- package/dist/components/localization.js +0 -4016
- package/dist/esm/cart-bc3bb22e.js +0 -682
- package/dist/esm/submitGtag-bebe2cb0.js +0 -19
- package/dist/esm-es5/cart-bc3bb22e.js +0 -1
- package/dist/esm-es5/localization-d8f6453b.js +0 -1
- package/dist/esm-es5/submitGtag-bebe2cb0.js +0 -1
- package/dist/types/scripts/extractZonosQaUrl.d.ts +0 -11
- package/dist/zonos-elements/p-00d63df1.system.entry.js +0 -1
- package/dist/zonos-elements/p-04f63cea.entry.js +0 -1
- package/dist/zonos-elements/p-16b74c31.system.js +0 -1
- package/dist/zonos-elements/p-1d16a6fb.js +0 -1
- package/dist/zonos-elements/p-1ea68e3b.entry.js +0 -1
- package/dist/zonos-elements/p-1ed530cc.entry.js +0 -1
- package/dist/zonos-elements/p-289c8b1a.system.entry.js +0 -1
- package/dist/zonos-elements/p-2a00c270.system.entry.js +0 -1
- package/dist/zonos-elements/p-37f53a79.entry.js +0 -1
- package/dist/zonos-elements/p-394cf1cf.js +0 -1
- package/dist/zonos-elements/p-3ef27745.js +0 -1
- package/dist/zonos-elements/p-458fd100.system.entry.js +0 -1
- package/dist/zonos-elements/p-47fac33f.js +0 -1
- package/dist/zonos-elements/p-4fafb2a5.system.entry.js +0 -1
- package/dist/zonos-elements/p-4fb71a93.js +0 -1
- package/dist/zonos-elements/p-5276c61b.system.entry.js +0 -1
- package/dist/zonos-elements/p-6308b347.entry.js +0 -1
- package/dist/zonos-elements/p-63d1b1fe.entry.js +0 -1
- package/dist/zonos-elements/p-7347ee7c.system.entry.js +0 -1
- package/dist/zonos-elements/p-8c26a080.system.js +0 -1
- package/dist/zonos-elements/p-96aabe02.entry.js +0 -1
- package/dist/zonos-elements/p-a682fd38.system.entry.js +0 -1
- package/dist/zonos-elements/p-ba1a111a.system.entry.js +0 -1
- package/dist/zonos-elements/p-c4321084.system.entry.js +0 -1
- package/dist/zonos-elements/p-cdf114a2.entry.js +0 -1
- package/dist/zonos-elements/p-d5ae3cbb.system.entry.js +0 -1
- package/dist/zonos-elements/p-d5d7c8f5.entry.js +0 -1
- package/dist/zonos-elements/p-de339fb6.entry.js +0 -1
- package/dist/zonos-elements/p-ec25f180.entry.js +0 -1
- package/dist/zonos-elements/p-f49dfd06.system.js +0 -1
- package/dist/zonos-elements/p-f6f5f644.entry.js +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const formatStringWithLinks = (str) => {
|
|
4
|
+
// Match Markdown-style links or standalone URLs not in Markdown format
|
|
5
|
+
const linkRegex = /\[([^\]]+)\]\((https?:\/\/[^\s\)]+)\)|(https?:\/\/[^\s]+)/g;
|
|
6
|
+
const messageWithLinks = str.replace(linkRegex, (_match, text, markdownUrl, url) => {
|
|
7
|
+
if (markdownUrl) {
|
|
8
|
+
return `<zonos-link href="${markdownUrl}" target="_blank" rel="noopener noreferrer">${text}</zonos-link>`;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return `<zonos-link href="${url}" target="_blank" rel="noopener noreferrer">${url}</zonos-link>`;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return messageWithLinks;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.formatStringWithLinks = formatStringWithLinks;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["zonos-checkout.cjs",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello.cjs",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller.cjs",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-
|
|
11
|
+
return index.bootstrapLazy([["zonos-checkout.cjs",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"domesticRedirectedBtnSelector":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello.cjs",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller.cjs",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-badge_2.cjs",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3.cjs",[[1,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3.cjs",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}]]],["zonos-address_4.cjs",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_9.cjs",[[1,"zonos-checkout-footer",{"showDialog":[32]},[[4,"click","handleGlobalClick"]]],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const cart = require('./cart-89d9fff4.js');
|
|
4
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
5
|
+
|
|
6
|
+
const trackConversionEvent = async (eventName, metadata) => {
|
|
7
|
+
// If a Zonos domain, we don't want analytics to be tracked
|
|
8
|
+
if (window.location.href.includes('zonos.com')) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/track-conversion-event`;
|
|
12
|
+
const countryCode = cart.localizationStore.selectedCountryCode;
|
|
13
|
+
const organizationId = zonosStore.zonosStore.organizationId;
|
|
14
|
+
const body = {
|
|
15
|
+
countryCode,
|
|
16
|
+
eventName,
|
|
17
|
+
metadata,
|
|
18
|
+
organizationId,
|
|
19
|
+
};
|
|
20
|
+
await cart.handleFetch(url, {
|
|
21
|
+
body,
|
|
22
|
+
method: 'POST',
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const sendErrorLog = async ({ endpoint, errors, metadata }) => {
|
|
27
|
+
const errorObject = {
|
|
28
|
+
endpoint,
|
|
29
|
+
errors,
|
|
30
|
+
metadata,
|
|
31
|
+
};
|
|
32
|
+
void cart.handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
|
|
33
|
+
body: errorObject,
|
|
34
|
+
method: 'POST',
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Submit a gtag event if the gtag function is available.
|
|
40
|
+
*/
|
|
41
|
+
const submitGtag = (event) => {
|
|
42
|
+
const googleAnalyticSetting = zonosStore.zonosStore.checkoutSettings.analyticsProviders.find(item => item.type === 'GOOGLE_ANALYTICS');
|
|
43
|
+
// only submit if googleAnalytic in checkout setting is on.
|
|
44
|
+
if (!googleAnalyticSetting || (googleAnalyticSetting === null || googleAnalyticSetting === void 0 ? void 0 : googleAnalyticSetting.status) === 'DISABLED') {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (typeof window.gtag === 'function') {
|
|
48
|
+
cart.log('Zonos submits gtag event', 'log', event);
|
|
49
|
+
window.gtag('event', event, {});
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.sendErrorLog = sendErrorLog;
|
|
54
|
+
exports.submitGtag = submitGtag;
|
|
55
|
+
exports.trackConversionEvent = trackConversionEvent;
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-2c9f5765.js');
|
|
6
|
+
const cart = require('./cart-89d9fff4.js');
|
|
8
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
9
|
-
const zonosStore = require('./zonosStore-
|
|
8
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
10
9
|
const classes = require('./classes-b7918f56.js');
|
|
11
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
12
|
-
const isDarkColor = require('./isDarkColor-
|
|
10
|
+
const getBorderRadius = require('./getBorderRadius-d8f18958.js');
|
|
11
|
+
const isDarkColor = require('./isDarkColor-57860b44.js');
|
|
13
12
|
|
|
14
13
|
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)}";
|
|
15
14
|
const ZonosAddressStyle0 = zonosAddressCss;
|
|
@@ -61,7 +60,7 @@ const ZonosAddress = class {
|
|
|
61
60
|
this.stripe = window.Zonos.stripe;
|
|
62
61
|
const { stripeAddressEventData, stripeElements } = this.getStripeAddressInstance();
|
|
63
62
|
if (!this.stripe || !stripeElements) {
|
|
64
|
-
|
|
63
|
+
cart.logError("Stripe is not initialized. Couldn't load stripe element.");
|
|
65
64
|
return;
|
|
66
65
|
}
|
|
67
66
|
const phone = (_a = this.defaultAddress) === null || _a === void 0 ? void 0 : _a.phone;
|
|
@@ -70,7 +69,7 @@ const ZonosAddress = class {
|
|
|
70
69
|
// will throw error if key phone exist and its value is empty or 'undefined'.
|
|
71
70
|
(_b = this.defaultAddress) === null || _b === void 0 ? true : delete _b.phone;
|
|
72
71
|
}
|
|
73
|
-
const shippableCountries =
|
|
72
|
+
const shippableCountries = cart.localizationStore.shippingZoneCountries;
|
|
74
73
|
const shippingZone = shippableCountries
|
|
75
74
|
? Object.values(shippableCountries).map(country => country.code)
|
|
76
75
|
: [];
|
|
@@ -79,7 +78,7 @@ const ZonosAddress = class {
|
|
|
79
78
|
contacts: this.defaultAddress ? [this.defaultAddress] : [],
|
|
80
79
|
defaultValues: {
|
|
81
80
|
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) ||
|
|
82
|
-
|
|
81
|
+
cart.localizationStore.selectedCountryCode ||
|
|
83
82
|
'AL' }),
|
|
84
83
|
firstName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName,
|
|
85
84
|
lastName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName,
|
|
@@ -143,7 +142,7 @@ const ZonosAddress = class {
|
|
|
143
142
|
}
|
|
144
143
|
render() {
|
|
145
144
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
146
|
-
return (index.h(index.Host, { key: '
|
|
145
|
+
return (index.h(index.Host, { key: '8d762300d8f599a277806d861d13d2beb6a0a5a6', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: 'c355eece2f193cb0595ede434238f062b2c07c7c', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: '59c3bd68cd67c8d733fd2ca5d9f4b4114c84db4a', class: "zonos--address-component" })));
|
|
147
146
|
}
|
|
148
147
|
get el() { return index.getElement(this); }
|
|
149
148
|
static get watchers() { return {
|
|
@@ -191,14 +190,14 @@ const ZonosCheckbox = class {
|
|
|
191
190
|
? 'var(--amino-gray-800)'
|
|
192
191
|
: 'var(--amino-gray-0)';
|
|
193
192
|
const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle, '4px');
|
|
194
|
-
return (index.h(index.Host, { key: '
|
|
193
|
+
return (index.h(index.Host, { key: '5f8516f5933b739cc3f21d901e50dec1c761fa58', class: classes.classes(['zonos--elements zonos--checkbox']), style: {
|
|
195
194
|
'--background-color': backgroundColor,
|
|
196
195
|
'--border-radius': borderStyle,
|
|
197
196
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
198
197
|
'--size': `${this.size}px`,
|
|
199
|
-
} }, index.h("label", { key: '
|
|
198
|
+
} }, index.h("label", { key: '6544f51a8c892d616123ab4194d069b055e3dc86', class: classes.classes([this.isDisabled && 'disabled']) }, index.h("input", { key: '958e35bf16be575230748fccdb1a3916942c3a30', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
200
199
|
this.checkboxSelected.emit(e.target.checked);
|
|
201
|
-
}, type: "checkbox" }), index.h("span", { key: '
|
|
200
|
+
}, type: "checkbox" }), index.h("span", { key: '2c55e0a190b092dd083c433c35143e253910f54f', class: "checkmark-container" }, index.h("svg", { key: '0aa1f705b728055835159a399173a170aee4f7c0', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'd526bbafde4d4399be3f3a0a7cc87e92634d9548', "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 && (index.h("zonos-text", { size: this.fontSize }, this.label)))));
|
|
202
201
|
}
|
|
203
202
|
};
|
|
204
203
|
ZonosCheckbox.style = ZonosCheckboxStyle0;
|
|
@@ -212,6 +211,7 @@ const ZonosCollapse = class {
|
|
|
212
211
|
this.collapsed = false;
|
|
213
212
|
this.collapseSize = 0;
|
|
214
213
|
this.height = this.el.scrollHeight;
|
|
214
|
+
this.iframe = null;
|
|
215
215
|
}
|
|
216
216
|
getElementHeight() {
|
|
217
217
|
const fullHeight = `${this.height}px`;
|
|
@@ -223,16 +223,34 @@ const ZonosCollapse = class {
|
|
|
223
223
|
}
|
|
224
224
|
componentDidRender() {
|
|
225
225
|
var _a, _b, _c;
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
this.iframe =
|
|
227
|
+
((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('iframe')) || null;
|
|
228
|
+
(_c = (_b = this.iframe) === null || _b === void 0 ? void 0 : _b.contentWindow) === null || _c === void 0 ? void 0 : _c.addEventListener('resize', () => {
|
|
229
|
+
if (!this.iframe) {
|
|
230
|
+
// this should never happen since it's inside of resize callback
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.height = parseFloat(getComputedStyle(this.iframe).height);
|
|
228
234
|
});
|
|
229
235
|
}
|
|
230
236
|
render() {
|
|
231
|
-
this.
|
|
232
|
-
|
|
237
|
+
if (!this.collapsed) {
|
|
238
|
+
// wait for the collapse animation to finish, then set overflow to visible
|
|
239
|
+
setTimeout(() => {
|
|
240
|
+
// if the element collapsed state is still not changed, set overflow to visible
|
|
241
|
+
if (!this.collapsed) {
|
|
242
|
+
this.el.style.overflow = 'visible';
|
|
243
|
+
}
|
|
244
|
+
}, 300);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
// set overflow to hidden to prevent content from showing when collapsed
|
|
248
|
+
this.el.style.overflow = 'hidden';
|
|
249
|
+
}
|
|
250
|
+
return (index.h(index.Host, { key: '7ac8b898feadfb4424b3b48a98135cb18994f4e0', class: 'zonos--elements zonos--collapse', style: {
|
|
233
251
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
234
252
|
height: this.getElementHeight(),
|
|
235
|
-
} }, index.h("div", { key: '
|
|
253
|
+
} }, index.h("div", { key: '4a527ec319b59041196284d4d9a8f22b943a74e6' }, index.h("iframe", { key: '2fb51c16e13ca90561b1b1e6cab89d87e4a37a47', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), index.h("slot", { key: '6d7849f6c35be611446b0da36d657396e5ca3122' }))));
|
|
236
254
|
}
|
|
237
255
|
get el() { return index.getElement(this); }
|
|
238
256
|
};
|
|
@@ -274,7 +292,7 @@ const ZonosLinkAuthentication = class {
|
|
|
274
292
|
}
|
|
275
293
|
render() {
|
|
276
294
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
277
|
-
return (index.h(index.Host, { key: '
|
|
295
|
+
return (index.h(index.Host, { key: '62b8e4a5c1902cb2c8fe032d7c43ba68742e8c0a', class: "zonos--link-authentication zonos--elements" }, index.h("zonos-text", { key: 'b86acc15bfc6eba0c7174c1e229205b34747f57d', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: 'f0734254d41ff9f221f97143e0df1f28017b9a61', class: "zonos--link-authentication-component" })));
|
|
278
296
|
}
|
|
279
297
|
get el() { return index.getElement(this); }
|
|
280
298
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
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)}";
|
|
@@ -20,16 +20,16 @@ const ZonosBadge = class {
|
|
|
20
20
|
this.rounded = false;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (index.h(index.Host, { key: '
|
|
23
|
+
return (index.h(index.Host, { key: '1cece57ce37e04873f625d05ad5a0bea6368b46b', class: classes.classes(['zonos--elements zonos--badge']), style: {
|
|
24
24
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
25
|
-
} }, index.h("div", { key: '
|
|
25
|
+
} }, index.h("div", { key: '8caf3f2ffb7deda215c44ad0c6c0892936d526c2', class: classes.classes([
|
|
26
26
|
'zonos--badge-content',
|
|
27
27
|
this.badgeColor,
|
|
28
28
|
this.rounded && 'rounded',
|
|
29
29
|
this.iconRight && 'icon-right',
|
|
30
30
|
this.size,
|
|
31
31
|
this.bold && 'bold',
|
|
32
|
-
]) }, this.icon, index.h("zonos-text", { key: '
|
|
32
|
+
]) }, this.icon, index.h("zonos-text", { key: 'fb8ac7f09675f9cfd829ecea54c61f5c699caa00' }, index.h("slot", { key: '978bc876e427d932662a0100043e04b105e9df8d' })))));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
ZonosBadge.style = ZonosBadgeStyle0;
|
|
@@ -45,10 +45,10 @@ const ZonosTooltip = class {
|
|
|
45
45
|
this.showTooltip = false;
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (index.h(index.Host, { key: '
|
|
48
|
+
return (index.h(index.Host, { key: '4864150b0af4119fc7d87aec5af3c258fb27802d', class: "zonos--elements" }, index.h("div", { key: 'c11d3da431f9c4507bc58ec38d0b1ef21c99b584', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, index.h("slot", { key: '0a92efb2e6c17f67c2feacbd17bbddd4fb63f7da' }), index.h("div", { key: '0ea54bfaf54a2f170044d77c2b555e5da37af8ae', class: classes.classes([
|
|
49
49
|
this.showTooltip && 'zonos--show-tooltip',
|
|
50
50
|
'zonos--tooltip-content',
|
|
51
|
-
]) }, index.h("zonos-text", { key: '
|
|
51
|
+
]) }, index.h("zonos-text", { key: '73c55a7318eb36760d2779691f9ea79d2c5bf8c7', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), index.h("zonos-text", { key: '1f4106f67fc468121d7fb7fbc0ee69363bb26186', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
ZonosTooltip.style = ZonosTooltipStyle0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
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)}";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-d8f18958.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-41cacd82.js');
|
|
10
|
-
const isDarkColor = require('./isDarkColor-
|
|
10
|
+
const isDarkColor = require('./isDarkColor-57860b44.js');
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Get theme for button text based on background color
|
|
@@ -23,7 +23,7 @@ const getButtonTheme = (overrideBackground) => {
|
|
|
23
23
|
return buttonTheme;
|
|
24
24
|
};
|
|
25
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(--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}";
|
|
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;border-radius:var(--border-radius, var(--amino-radius-10))}: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));margin:1px;}: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}";
|
|
27
27
|
const ZonosButtonStyle0 = zonosButtonCss;
|
|
28
28
|
|
|
29
29
|
const ZonosButton = class {
|
|
@@ -81,13 +81,13 @@ const ZonosButton = class {
|
|
|
81
81
|
// only set theme for button to change text color if variant is standard and override background is set
|
|
82
82
|
const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
|
|
83
83
|
const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle);
|
|
84
|
-
const spinnerColor = buttonTheme === 'LIGHT' ? '
|
|
85
|
-
return (index.h(index.Host, { key: '
|
|
84
|
+
const spinnerColor = buttonTheme === 'LIGHT' ? 'black' : 'white';
|
|
85
|
+
return (index.h(index.Host, { key: 'f3374eedd37ec6293260fba7b19d66aa013d3484', class: classes.classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
|
|
86
86
|
'--background-color': overrideBackground,
|
|
87
87
|
'--border-radius': borderStyle,
|
|
88
88
|
'--color': color,
|
|
89
89
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
90
|
-
} }, index.h("button", { key: '
|
|
90
|
+
} }, index.h("button", { key: '352ce427591b20b8042dcd19ce159b77c1fc2faf', class: classes.classes([
|
|
91
91
|
this.hasIcon && 'has-icon',
|
|
92
92
|
this.hasContent && 'has-content',
|
|
93
93
|
this.noBackground && 'no-background',
|
|
@@ -100,7 +100,7 @@ const ZonosButton = class {
|
|
|
100
100
|
overrideBackground &&
|
|
101
101
|
variant === 'standard' &&
|
|
102
102
|
'override-background',
|
|
103
|
-
]), disabled: disabled }, this.loading && (index.h("div", { class: "zonos--spinner-wrapper" }, index.h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, index.h("slot", { key: '
|
|
103
|
+
]), disabled: disabled }, this.loading && (index.h("div", { class: "zonos--spinner-wrapper" }, index.h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, index.h("slot", { key: '554cc1fd9bb58d833339ae21e837d586adc248c2', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
104
104
|
}
|
|
105
105
|
static get watchers() { return {
|
|
106
106
|
"icon": ["iconChangeHandler"]
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-72767498.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-138c5555.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const
|
|
8
|
+
const cart = require('./cart-89d9fff4.js');
|
|
9
9
|
const ILanguage = require('./ILanguage-d247b45b.js');
|
|
10
|
+
require('./isDarkColor-57860b44.js');
|
|
11
|
+
require('./getBorderRadius-d8f18958.js');
|
|
10
12
|
|
|
11
13
|
const zonosCardCss = ":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 .styled-card{border:var(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";
|
|
12
14
|
const ZonosCardStyle0 = zonosCardCss;
|
|
@@ -22,9 +24,9 @@ const ZonosCard = class {
|
|
|
22
24
|
this.spacing = '24px';
|
|
23
25
|
}
|
|
24
26
|
render() {
|
|
25
|
-
return (index.h(index.Host, { key: '
|
|
27
|
+
return (index.h(index.Host, { key: 'b350f7a592ea35c3b6beaf5eefaa2ab0208975dd', style: {
|
|
26
28
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
27
|
-
} }, index.h("div", { key: '
|
|
29
|
+
} }, index.h("div", { key: '125e8b550cd8f371e28a012536722f48402774f2', class: classes.classes(['styled-card']), style: { padding: this.spacing } }, this.label && (index.h("header", { class: "card-header", style: { padding: this.spacing } }, index.h("zonos-text", { type: "subheader" }, this.label), index.h("h-stack", { spacing: 8 }, this.actions))), index.h("slot", { key: '3cf038c62910ebac736ed1c37ecf1a490c8e1d0e' }), (this.footerActions || this.footerContent) && (index.h("footer", { class: "card-footer", style: {
|
|
28
30
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
29
31
|
padding: this.spacing,
|
|
30
32
|
} }, index.h("div", null, this.footerContent), index.h("h-stack", { spacing: 8 }, this.footerActions))))));
|
|
@@ -46,16 +48,16 @@ const ZonosLanguageSelect = class {
|
|
|
46
48
|
index.registerInstance(this, hostRef);
|
|
47
49
|
this.languageSelected = (languageCode) => {
|
|
48
50
|
// mutate the selected language code in store
|
|
49
|
-
void
|
|
51
|
+
void cart.localizationStoreUpdateSelectedLocale(languageCode);
|
|
50
52
|
this.handleOnClose();
|
|
51
53
|
};
|
|
52
54
|
this.handleOnClose = () => { };
|
|
53
55
|
}
|
|
54
56
|
render() {
|
|
55
|
-
const { selectedLocale } =
|
|
56
|
-
return (index.h(index.Host, { key: '
|
|
57
|
+
const { selectedLocale } = cart.localizationStore;
|
|
58
|
+
return (index.h(index.Host, { key: 'd12676d6438941bb8d987826f68c1b72a7e02ccd', class: "zonos--elements", style: {
|
|
57
59
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
58
|
-
} }, index.h("div", { key: '
|
|
60
|
+
} }, index.h("div", { key: '259eaa6a8ae682cc96c98eaaab574757285188b9', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: '88bff024a5f678b00bf4edd7b2497177a986af4c', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a language') }), index.h("div", { key: 'be1d87991dec9ac2a3b530a0cf9129b9e191781b', class: "zonos--language-select-content" }, ILanguage.languages.map(language => (index.h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, index.h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
|