@zonos/elements 1.3.5 → 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-c1b0915c.js → cart-b8bbf22d.js} +62 -19
- package/dist/cjs/{getBorderRadius-cd7ef574.js → getBorderRadius-b252096d.js} +8 -4
- package/dist/cjs/index.cjs.js +0 -21
- 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-bd6e9b42.js → submitGtag-792fe45d.js} +2 -2
- 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_2.cjs.entry.js → zonos-button_3.cjs.entry.js} +42 -15
- 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} +75 -84
- package/dist/cjs/zonos-checkout.cjs.entry.js +12 -13
- 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.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +12 -21
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +9 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
- 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.js +1 -1
- 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 +18 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +9 -28
- 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.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/stripe.js +28 -7
- 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 +63 -24
- 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/isDarkColor.js +1 -1
- package/dist/components/localization.js +365 -1
- package/dist/components/{cart.js → stripe.js} +273 -228
- package/dist/components/submitGtag.js +1 -1
- package/dist/components/zonos-address2.js +65 -26
- package/dist/components/zonos-badge2.js +8 -10
- package/dist/components/zonos-banner2.js +3 -9
- package/dist/components/zonos-button2.js +10 -12
- 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 +2 -2
- package/dist/components/zonos-checkout.js +75 -52
- 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 +30 -10
- 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 +4 -4
- 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 +2 -2
- package/dist/components/zonos-spinner2.js +3 -3
- 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-7e7c7585.js → cart-bc3bb22e.js} +63 -18
- package/dist/esm/getBorderRadius-e9736f7e.js +20 -0
- package/dist/esm/index.js +1 -6
- 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-776c5e10.js → submitGtag-bebe2cb0.js} +2 -2
- 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_2.entry.js → zonos-button_3.entry.js} +42 -16
- 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} +75 -83
- package/dist/esm/zonos-checkout.entry.js +12 -13
- 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/{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-776c5e10.js → submitGtag-bebe2cb0.js} +1 -1
- 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 +8 -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 +3 -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/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-626b5a52.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-120df5be.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-eb631432.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-af910392.js → p-3ef27745.js} +1 -1
- package/dist/zonos-elements/{p-18e09138.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-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-aca66e4b.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-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-b58d2231.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-ead79548.system.js → p-f49dfd06.system.js} +1 -1
- package/dist/zonos-elements/{p-31fa76da.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 -161
- package/dist/cjs/zonos-badge.cjs.entry.js +0 -38
- 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 -156
- package/dist/esm/zonos-badge.entry.js +0 -34
- package/dist/esm/zonos-icon.entry.js +0 -31
- package/dist/esm-es5/cart-7e7c7585.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/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-09c5dc1b.system.entry.js +0 -1
- package/dist/zonos-elements/p-1156ae5d.system.entry.js +0 -1
- package/dist/zonos-elements/p-12ecf765.system.js +0 -1
- package/dist/zonos-elements/p-174239da.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-2589a038.system.entry.js +0 -1
- package/dist/zonos-elements/p-3319e4db.entry.js +0 -1
- package/dist/zonos-elements/p-357f0c61.entry.js +0 -1
- package/dist/zonos-elements/p-410045c5.system.entry.js +0 -1
- package/dist/zonos-elements/p-4d0861e9.system.js +0 -1
- package/dist/zonos-elements/p-54ef8ff3.entry.js +0 -1
- package/dist/zonos-elements/p-6444a4b9.entry.js +0 -1
- package/dist/zonos-elements/p-65f4af1a.system.entry.js +0 -1
- package/dist/zonos-elements/p-661bc488.entry.js +0 -1
- package/dist/zonos-elements/p-6c47083f.entry.js +0 -1
- package/dist/zonos-elements/p-6d454281.entry.js +0 -1
- package/dist/zonos-elements/p-7748735d.entry.js +0 -1
- package/dist/zonos-elements/p-78886ed6.system.entry.js +0 -1
- package/dist/zonos-elements/p-8ebc0b64.js +0 -1
- package/dist/zonos-elements/p-a6f2e282.system.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-bd02a65c.entry.js +0 -1
- package/dist/zonos-elements/p-bea31a7b.system.entry.js +0 -1
- package/dist/zonos-elements/p-cfe4a318.js +0 -1
- package/dist/zonos-elements/p-e4a2a1b0.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/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,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as stripeStore,
|
|
3
|
-
import { l as logError,
|
|
2
|
+
import { s as stripeStore, a as stripeStorePrefetchLandedCost } from './stripe.js';
|
|
3
|
+
import { l as logError, a as localizationStore } from './localization.js';
|
|
4
4
|
import { i as isCheckoutMobile } from './isCheckoutMobile.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
6
6
|
|
|
@@ -15,13 +15,46 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
|
|
|
15
15
|
this.titleText = undefined;
|
|
16
16
|
this.defaultAddress = null;
|
|
17
17
|
this.stripe = window.Zonos.stripe;
|
|
18
|
-
this.isDirtyAddress =
|
|
19
|
-
|
|
18
|
+
this.isDirtyAddress = false;
|
|
19
|
+
}
|
|
20
|
+
getStripeAddressInstance() {
|
|
21
|
+
if (this.type === 'billing') {
|
|
22
|
+
return {
|
|
23
|
+
stripeAddressElement: stripeStore.stripeBillingAddressElement,
|
|
24
|
+
stripeAddressEventData: stripeStore.stripeBillingAddressEventData,
|
|
25
|
+
stripeElements: stripeStore.stripeElementsForBillingAddress,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
stripeAddressElement: stripeStore.stripeAddressElement,
|
|
30
|
+
stripeAddressEventData: stripeStore.stripeAddressEventData,
|
|
31
|
+
stripeElements: stripeStore.stripeElements,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
updateAddressEventData({ event, type, }) {
|
|
35
|
+
switch (type) {
|
|
36
|
+
case 'billing':
|
|
37
|
+
stripeStore.stripeBillingAddressEventData = event;
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
stripeStore.stripeAddressEventData = event;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
// only prefetch if the address type is shipping
|
|
44
|
+
void stripeStorePrefetchLandedCost();
|
|
45
|
+
}
|
|
46
|
+
updateAddressElement({ stripeAddressElement, type, }) {
|
|
47
|
+
if (type === 'shipping') {
|
|
48
|
+
stripeStore.stripeAddressElement = stripeAddressElement;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
stripeStore.stripeBillingAddressElement = stripeAddressElement;
|
|
20
52
|
}
|
|
21
53
|
async watchInitStripe() {
|
|
22
|
-
var _a, _b
|
|
54
|
+
var _a, _b;
|
|
23
55
|
this.stripe = window.Zonos.stripe;
|
|
24
|
-
|
|
56
|
+
const { stripeAddressEventData, stripeElements } = this.getStripeAddressInstance();
|
|
57
|
+
if (!this.stripe || !stripeElements) {
|
|
25
58
|
logError("Stripe is not initialized. Couldn't load stripe element.");
|
|
26
59
|
return;
|
|
27
60
|
}
|
|
@@ -32,21 +65,19 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
|
|
|
32
65
|
(_b = this.defaultAddress) === null || _b === void 0 ? true : delete _b.phone;
|
|
33
66
|
}
|
|
34
67
|
const shippableCountries = localizationStore.shippingZoneCountries;
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
mode: 'automatic',
|
|
41
|
-
},
|
|
68
|
+
const shippingZone = shippableCountries
|
|
69
|
+
? Object.values(shippableCountries).map(country => country.code)
|
|
70
|
+
: [];
|
|
71
|
+
const addressElement = stripeElements.create('address', {
|
|
72
|
+
allowedCountries: this.type === 'shipping' ? shippingZone : [],
|
|
42
73
|
contacts: this.defaultAddress ? [this.defaultAddress] : [],
|
|
43
74
|
defaultValues: {
|
|
44
|
-
address: Object.assign(Object.assign({},
|
|
75
|
+
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) ||
|
|
45
76
|
localizationStore.selectedCountryCode ||
|
|
46
77
|
'AL' }),
|
|
47
|
-
firstName:
|
|
48
|
-
lastName:
|
|
49
|
-
phone:
|
|
78
|
+
firstName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName,
|
|
79
|
+
lastName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName,
|
|
80
|
+
phone: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone,
|
|
50
81
|
},
|
|
51
82
|
display: {
|
|
52
83
|
name: 'split',
|
|
@@ -74,31 +105,39 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
|
|
|
74
105
|
}
|
|
75
106
|
else {
|
|
76
107
|
// scroll into the end of the page so the address placeholder won't be hidden
|
|
77
|
-
const yOffset = 100;
|
|
108
|
+
const yOffset = this.type === 'shipping' ? 100 : 600;
|
|
78
109
|
const parentWrapper = this.el.closest('.zonos--group');
|
|
79
110
|
const y = this.el.getBoundingClientRect().top + yOffset;
|
|
80
111
|
parentWrapper === null || parentWrapper === void 0 ? void 0 : parentWrapper.scrollTo({ behavior: 'smooth', top: y });
|
|
81
112
|
}
|
|
82
|
-
},
|
|
113
|
+
}, 600);
|
|
83
114
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
115
|
+
this.updateAddressEventData({
|
|
116
|
+
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() }) }),
|
|
117
|
+
type: this.type,
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
this.updateAddressElement({
|
|
121
|
+
stripeAddressElement: addressElement,
|
|
122
|
+
type: this.type,
|
|
87
123
|
});
|
|
88
|
-
stripeStore.stripeAddressElement = addressElement;
|
|
89
124
|
}
|
|
90
125
|
disconnectedCallback() {
|
|
91
|
-
var _a;
|
|
92
126
|
// destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
|
|
93
|
-
|
|
127
|
+
const stripeElement = this.getStripeAddressInstance().stripeAddressElement;
|
|
128
|
+
stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.destroy();
|
|
94
129
|
}
|
|
95
130
|
componentDidLoad() {
|
|
131
|
+
const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
|
|
132
|
+
this.isDirtyAddress =
|
|
133
|
+
!!stripeAddressEventData &&
|
|
134
|
+
stripeAddressEventData.value.address.line1.length > 0;
|
|
96
135
|
// @Watch doesn't get trigger on initial load
|
|
97
136
|
void this.watchInitStripe();
|
|
98
137
|
}
|
|
99
138
|
render() {
|
|
100
139
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
101
|
-
return (h(Host, { key: '
|
|
140
|
+
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" })));
|
|
102
141
|
}
|
|
103
142
|
get el() { return this; }
|
|
104
143
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { a as zonosStoreFontFamily } from './zonosStore.js';
|
|
3
3
|
import { c as classes } from './classes.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
5
5
|
|
|
@@ -12,34 +12,32 @@ const ZonosBadge = /*@__PURE__*/ proxyCustomElement(class ZonosBadge extends HTM
|
|
|
12
12
|
this.__registerHost();
|
|
13
13
|
this.__attachShadow();
|
|
14
14
|
this.bold = false;
|
|
15
|
-
this.
|
|
15
|
+
this.badgeColor = 'gray';
|
|
16
16
|
this.icon = undefined;
|
|
17
17
|
this.iconRight = false;
|
|
18
18
|
this.size = 'default';
|
|
19
19
|
this.rounded = false;
|
|
20
|
-
this.class = '';
|
|
21
20
|
}
|
|
22
21
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '0f502b63322730f508fd7c92f231573b1dfbfd6b', class: classes(['zonos--elements zonos--badge']), style: {
|
|
24
23
|
'--font-family': zonosStoreFontFamily(),
|
|
25
|
-
} }, h("div", { key: '
|
|
24
|
+
} }, h("div", { key: '4ee3f0b623067625ddd79336a1854f5ab796b3b1', class: classes([
|
|
26
25
|
'zonos--badge-content',
|
|
27
|
-
this.
|
|
26
|
+
this.badgeColor,
|
|
28
27
|
this.rounded && 'rounded',
|
|
29
28
|
this.iconRight && 'icon-right',
|
|
30
29
|
this.size,
|
|
31
30
|
this.bold && 'bold',
|
|
32
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
31
|
+
]) }, this.icon, h("zonos-text", { key: 'e5bdf974408416811f7666fc453ca47db58fa43f' }, h("slot", { key: 'd953b60fefe2c25aea529b9de41938cfd96a285b' })))));
|
|
33
32
|
}
|
|
34
33
|
static get style() { return ZonosBadgeStyle0; }
|
|
35
34
|
}, [1, "zonos-badge", {
|
|
36
35
|
"bold": [4],
|
|
37
|
-
"
|
|
36
|
+
"badgeColor": [1, "badge-color"],
|
|
38
37
|
"icon": [16],
|
|
39
38
|
"iconRight": [4, "icon-right"],
|
|
40
39
|
"size": [1],
|
|
41
|
-
"rounded": [4]
|
|
42
|
-
"class": [1]
|
|
40
|
+
"rounded": [4]
|
|
43
41
|
}]);
|
|
44
42
|
function defineCustomElement() {
|
|
45
43
|
if (typeof customElements === "undefined") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { a as zonosStoreFontFamily } from './zonosStore.js';
|
|
3
3
|
import { c as classes } from './classes.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
5
5
|
|
|
@@ -19,7 +19,6 @@ const ZonosBanner = /*@__PURE__*/ proxyCustomElement(class ZonosBanner extends H
|
|
|
19
19
|
};
|
|
20
20
|
this.bannerTitle = undefined;
|
|
21
21
|
this.intent = undefined;
|
|
22
|
-
this.class = '';
|
|
23
22
|
this.hasContent = false;
|
|
24
23
|
}
|
|
25
24
|
render() {
|
|
@@ -31,13 +30,9 @@ const ZonosBanner = /*@__PURE__*/ proxyCustomElement(class ZonosBanner extends H
|
|
|
31
30
|
h("slot", { onSlotchange: this.handleSlotChange }),
|
|
32
31
|
].filter(Boolean);
|
|
33
32
|
const textColor = color === 'gray' ? 'gray-1200' : `${color}-800`;
|
|
34
|
-
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", {
|
|
33
|
+
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)))));
|
|
35
34
|
};
|
|
36
|
-
const baseClass = classes([
|
|
37
|
-
'zonos--elements zonos--banner',
|
|
38
|
-
this.class,
|
|
39
|
-
this.intent,
|
|
40
|
-
]);
|
|
35
|
+
const baseClass = classes(['zonos--elements zonos--banner', this.intent]);
|
|
41
36
|
const font = zonosStoreFontFamily();
|
|
42
37
|
switch (this.intent) {
|
|
43
38
|
case 'error':
|
|
@@ -76,7 +71,6 @@ const ZonosBanner = /*@__PURE__*/ proxyCustomElement(class ZonosBanner extends H
|
|
|
76
71
|
}, [1, "zonos-banner", {
|
|
77
72
|
"bannerTitle": [1, "banner-title"],
|
|
78
73
|
"intent": [1],
|
|
79
|
-
"class": [1],
|
|
80
74
|
"hasContent": [32]
|
|
81
75
|
}]);
|
|
82
76
|
function defineCustomElement() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { z as zonosStore,
|
|
2
|
+
import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore.js';
|
|
3
3
|
import { c as classes } from './classes.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius.js';
|
|
5
5
|
import { i as isColorVariable } from './isColorVariable.js';
|
|
@@ -20,7 +20,7 @@ const getButtonTheme = (overrideBackground) => {
|
|
|
20
20
|
return buttonTheme;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
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)}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color)}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}";
|
|
23
|
+
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}";
|
|
24
24
|
const ZonosButtonStyle0 = zonosButtonCss;
|
|
25
25
|
|
|
26
26
|
const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends HTMLElement {
|
|
@@ -34,8 +34,7 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
|
|
|
34
34
|
this.handleSlotChange = () => {
|
|
35
35
|
this.hasContent = true;
|
|
36
36
|
};
|
|
37
|
-
this.
|
|
38
|
-
this.color = undefined;
|
|
37
|
+
this.buttonColor = undefined;
|
|
39
38
|
this.backgroundColor = undefined;
|
|
40
39
|
this.borderStyle = undefined;
|
|
41
40
|
this.isDisabled = false;
|
|
@@ -73,21 +72,21 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
|
|
|
73
72
|
* So need to re-assign the variant prop with the default value if the value is `undefined` here.
|
|
74
73
|
*/
|
|
75
74
|
const variant = this.variant || 'standard';
|
|
76
|
-
const color = this.
|
|
77
|
-
? `var(--amino-${this.
|
|
78
|
-
: this.
|
|
75
|
+
const color = this.buttonColor && isColorVariable(this.buttonColor)
|
|
76
|
+
? `var(--amino-${this.buttonColor})`
|
|
77
|
+
: this.buttonColor;
|
|
79
78
|
// use override background if it exists, otherwise use color from setting
|
|
80
79
|
const overrideBackground = this.backgroundColor || zonosStore.appearance.colorSecondary;
|
|
81
80
|
// only set theme for button to change text color if variant is standard and override background is set
|
|
82
81
|
const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
|
|
83
82
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
84
83
|
const spinnerColor = buttonTheme === 'LIGHT' ? 'white' : 'black';
|
|
85
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '817142c1d229333aee0b38864788346d2749d3d1', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
|
|
86
85
|
'--background-color': overrideBackground,
|
|
87
86
|
'--border-radius': borderStyle,
|
|
88
87
|
'--color': color,
|
|
89
88
|
'--font-family': zonosStoreFontFamily(),
|
|
90
|
-
} }, h("button", { key: '
|
|
89
|
+
} }, h("button", { key: '04bff1f932154f54b4af51b2fac053d40efc354f', class: classes([
|
|
91
90
|
this.hasIcon && 'has-icon',
|
|
92
91
|
this.hasContent && 'has-content',
|
|
93
92
|
this.noBackground && 'no-background',
|
|
@@ -100,15 +99,14 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
|
|
|
100
99
|
overrideBackground &&
|
|
101
100
|
variant === 'standard' &&
|
|
102
101
|
'override-background',
|
|
103
|
-
]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", {
|
|
102
|
+
]), 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)));
|
|
104
103
|
}
|
|
105
104
|
static get watchers() { return {
|
|
106
105
|
"icon": ["iconChangeHandler"]
|
|
107
106
|
}; }
|
|
108
107
|
static get style() { return ZonosButtonStyle0; }
|
|
109
108
|
}, [1, "zonos-button", {
|
|
110
|
-
"
|
|
111
|
-
"color": [1],
|
|
109
|
+
"buttonColor": [1, "button-color"],
|
|
112
110
|
"backgroundColor": [1, "background-color"],
|
|
113
111
|
"borderStyle": [1, "border-style"],
|
|
114
112
|
"isDisabled": [4, "is-disabled"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { a as zonosStoreFontFamily } from './zonosStore.js';
|
|
3
3
|
import { c as classes } from './classes.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
5
5
|
|
|
@@ -12,7 +12,6 @@ const ZonosCard = /*@__PURE__*/ proxyCustomElement(class ZonosCard extends HTMLE
|
|
|
12
12
|
this.__registerHost();
|
|
13
13
|
this.__attachShadow();
|
|
14
14
|
this.actions = undefined;
|
|
15
|
-
this.class = undefined;
|
|
16
15
|
this.footerActions = undefined;
|
|
17
16
|
this.footerContent = undefined;
|
|
18
17
|
this.footerHeight = undefined;
|
|
@@ -20,9 +19,9 @@ const ZonosCard = /*@__PURE__*/ proxyCustomElement(class ZonosCard extends HTMLE
|
|
|
20
19
|
this.spacing = '24px';
|
|
21
20
|
}
|
|
22
21
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '8581e04d45e7061bff02485ad9a9a22920b5fe84', style: {
|
|
24
23
|
'--font-family': zonosStoreFontFamily(),
|
|
25
|
-
} }, h("div", { key: '
|
|
24
|
+
} }, h("div", { key: '5e2038438e0885602c2e15808a34d62e86c95035', class: classes(['styled-card']), style: { padding: this.spacing } }, this.label && (h("header", { class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { type: "subheader" }, this.label), h("h-stack", { spacing: 8 }, this.actions))), h("slot", { key: 'b7cbddad1cc08256ae9192349fe5a44302b6d79e' }), (this.footerActions || this.footerContent) && (h("footer", { class: "card-footer", style: {
|
|
26
25
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
27
26
|
padding: this.spacing,
|
|
28
27
|
} }, h("div", null, this.footerContent), h("h-stack", { spacing: 8 }, this.footerActions))))));
|
|
@@ -30,7 +29,6 @@ const ZonosCard = /*@__PURE__*/ proxyCustomElement(class ZonosCard extends HTMLE
|
|
|
30
29
|
static get style() { return ZonosCardStyle0; }
|
|
31
30
|
}, [1, "zonos-card", {
|
|
32
31
|
"actions": [16],
|
|
33
|
-
"class": [1],
|
|
34
32
|
"footerActions": [16],
|
|
35
33
|
"footerContent": [16],
|
|
36
34
|
"footerHeight": [2, "footer-height"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, getAssetPath, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as cartStore } from './
|
|
2
|
+
import { c as cartStore } from './stripe.js';
|
|
3
3
|
import { f as formatCurrency } from './formatCurrency.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
5
5
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as cartStore } from './
|
|
2
|
+
import { c as cartStore } from './stripe.js';
|
|
3
3
|
import { t as translate } from './localization.js';
|
|
4
4
|
import { f as formatCurrency } from './formatCurrency.js';
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
5
|
+
import { d as defineCustomElement$4 } from './zonos-badge2.js';
|
|
6
|
+
import { d as defineCustomElement$3 } from './zonos-icon2.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './zonos-text2.js';
|
|
8
|
+
import { d as defineCustomElement$1 } from './zonos-tooltip2.js';
|
|
8
9
|
|
|
9
10
|
const InfoIcon = `<svg viewBox="0 0 17 16" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
10
11
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.96704 8.00065C1.96704 4.31875 4.93024 1.33398 8.58554 1.33398C12.2408 1.33398 15.204 4.31875 15.204 8.00065C15.204 11.6826 12.2408 14.6673 8.58554 14.6673C4.93024 14.6673 1.96704 11.6825 1.96704 8.00065Z" fill="#C5C6CA"/>
|
|
@@ -38,7 +39,7 @@ const ZonosCartSubtotal = /*@__PURE__*/ proxyCustomElement(class ZonosCartSubtot
|
|
|
38
39
|
amount: cartStore.shipping,
|
|
39
40
|
currency: cartStore.currency,
|
|
40
41
|
})
|
|
41
|
-
: '-')), showDutyTaxesInfo && (h("tr", { class: "zonos--row zonos--cart-duties" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("div", { class: "zonos--title-with-icon" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-icon", { content: InfoIcon, size: 16 })), !!cartStore.isSelectedShippingAboveDeminimis && (h("zonos-text", {
|
|
42
|
+
: '-')), showDutyTaxesInfo && (h("tr", { class: "zonos--row zonos--cart-duties" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("div", { class: "zonos--title-with-icon" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-tooltip", { label: translate('Nothing due at the door') }, h("zonos-icon", { "aria-label": "Learn more about duties, taxes, and fees", content: InfoIcon, size: 16 }))), !!cartStore.isSelectedShippingAboveDeminimis && (h("zonos-text", { textColor: "gray-800", type: "body" }, translate('Order is over the de minimis threshold for both duty and tax')))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxFees
|
|
42
43
|
? formatCurrency({
|
|
43
44
|
amount: cartStore.dutiesTaxFees,
|
|
44
45
|
currency: cartStore.currency,
|
|
@@ -59,7 +60,7 @@ function defineCustomElement() {
|
|
|
59
60
|
if (typeof customElements === "undefined") {
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
|
-
const components = ["zonos-cart-subtotal", "zonos-badge", "zonos-icon", "zonos-text"];
|
|
63
|
+
const components = ["zonos-cart-subtotal", "zonos-badge", "zonos-icon", "zonos-text", "zonos-tooltip"];
|
|
63
64
|
components.forEach(tagName => { switch (tagName) {
|
|
64
65
|
case "zonos-cart-subtotal":
|
|
65
66
|
if (!customElements.get(tagName)) {
|
|
@@ -68,15 +69,20 @@ function defineCustomElement() {
|
|
|
68
69
|
break;
|
|
69
70
|
case "zonos-badge":
|
|
70
71
|
if (!customElements.get(tagName)) {
|
|
71
|
-
defineCustomElement$
|
|
72
|
+
defineCustomElement$4();
|
|
72
73
|
}
|
|
73
74
|
break;
|
|
74
75
|
case "zonos-icon":
|
|
75
76
|
if (!customElements.get(tagName)) {
|
|
76
|
-
defineCustomElement$
|
|
77
|
+
defineCustomElement$3();
|
|
77
78
|
}
|
|
78
79
|
break;
|
|
79
80
|
case "zonos-text":
|
|
81
|
+
if (!customElements.get(tagName)) {
|
|
82
|
+
defineCustomElement$2();
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
case "zonos-tooltip":
|
|
80
86
|
if (!customElements.get(tagName)) {
|
|
81
87
|
defineCustomElement$1();
|
|
82
88
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ZonosCheckbox extends Components.ZonosCheckbox, HTMLElement {}
|
|
4
|
+
export const ZonosCheckbox: {
|
|
5
|
+
prototype: ZonosCheckbox;
|
|
6
|
+
new (): ZonosCheckbox;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as zonosStoreFontFamily } from './zonosStore.js';
|
|
3
|
+
import { c as classes } from './classes.js';
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius.js';
|
|
5
|
+
import { i as isDarkColor } from './isDarkColor.js';
|
|
6
|
+
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
7
|
+
|
|
8
|
+
const colorPrefixes = [
|
|
9
|
+
'blue',
|
|
10
|
+
'cyan',
|
|
11
|
+
'green',
|
|
12
|
+
'orange',
|
|
13
|
+
'purple',
|
|
14
|
+
'red',
|
|
15
|
+
'gray',
|
|
16
|
+
'glass',
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
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)}";
|
|
20
|
+
const ZonosCheckboxStyle0 = zonosCheckboxCss;
|
|
21
|
+
|
|
22
|
+
const ZonosCheckbox = /*@__PURE__*/ proxyCustomElement(class ZonosCheckbox extends HTMLElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.__registerHost();
|
|
26
|
+
this.__attachShadow();
|
|
27
|
+
this.checkboxSelected = createEvent(this, "checkboxSelected", 7);
|
|
28
|
+
this.backgroundColor = 'blue';
|
|
29
|
+
this.label = undefined;
|
|
30
|
+
this.isChecked = false;
|
|
31
|
+
this.isDisabled = false;
|
|
32
|
+
this.size = 12;
|
|
33
|
+
this.fontSize = 'base';
|
|
34
|
+
this.borderStyle = undefined;
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
const isBackgroundVariable = colorPrefixes.includes(this.backgroundColor);
|
|
38
|
+
const backgroundColor = isBackgroundVariable
|
|
39
|
+
? `var(--amino-${this.backgroundColor}-600)`
|
|
40
|
+
: this.backgroundColor;
|
|
41
|
+
const checkmarkColor = isBackgroundVariable
|
|
42
|
+
? // use lighter color if the color is amino variable
|
|
43
|
+
`var(--amino-${this.backgroundColor}-200)`
|
|
44
|
+
: // if it's not an amino variable, use white if the background is dark, and dark if the background is light
|
|
45
|
+
!isDarkColor(backgroundColor)
|
|
46
|
+
? 'var(--amino-gray-800)'
|
|
47
|
+
: 'var(--amino-gray-0)';
|
|
48
|
+
const borderStyle = getBorderRadius(this.borderStyle, '4px');
|
|
49
|
+
return (h(Host, { key: '86ab50028bec3f6a230b3a9492d06c1b2ce250fe', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
50
|
+
'--background-color': backgroundColor,
|
|
51
|
+
'--border-radius': borderStyle,
|
|
52
|
+
'--font-family': zonosStoreFontFamily(),
|
|
53
|
+
'--size': `${this.size}px`,
|
|
54
|
+
} }, h("label", { key: '88e87bb45739707a4e3da6d378ba491899dad76c', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: 'c877ba4a2bd43aa67c394136ef4b3c71096e75aa', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
55
|
+
this.checkboxSelected.emit(e.target.checked);
|
|
56
|
+
}, 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)))));
|
|
57
|
+
}
|
|
58
|
+
static get style() { return ZonosCheckboxStyle0; }
|
|
59
|
+
}, [1, "zonos-checkbox", {
|
|
60
|
+
"backgroundColor": [1, "background-color"],
|
|
61
|
+
"label": [1],
|
|
62
|
+
"isChecked": [4, "is-checked"],
|
|
63
|
+
"isDisabled": [4, "is-disabled"],
|
|
64
|
+
"size": [2],
|
|
65
|
+
"fontSize": [1, "font-size"],
|
|
66
|
+
"borderStyle": [1, "border-style"]
|
|
67
|
+
}]);
|
|
68
|
+
function defineCustomElement() {
|
|
69
|
+
if (typeof customElements === "undefined") {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const components = ["zonos-checkbox", "zonos-text"];
|
|
73
|
+
components.forEach(tagName => { switch (tagName) {
|
|
74
|
+
case "zonos-checkbox":
|
|
75
|
+
if (!customElements.get(tagName)) {
|
|
76
|
+
customElements.define(tagName, ZonosCheckbox);
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
case "zonos-text":
|
|
80
|
+
if (!customElements.get(tagName)) {
|
|
81
|
+
defineCustomElement$1();
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
} });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { ZonosCheckbox as Z, defineCustomElement as d };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as stripeStore,
|
|
2
|
+
import { s as stripeStore, l as stripeStoreRetrievePayment, j as stripeStoreReset, c as cartStore } from './stripe.js';
|
|
3
3
|
import { h as handleFetch, t as translate } from './localization.js';
|
|
4
4
|
import { z as zonosStore } from './zonosStore.js';
|
|
5
5
|
import { g as getBorderRadius } from './getBorderRadius.js';
|
|
@@ -145,9 +145,9 @@ const ZonosCheckoutFinish = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout
|
|
|
145
145
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
146
146
|
// return acc + item.quantity;
|
|
147
147
|
// }, 0);
|
|
148
|
-
return (h(Host, { key: '
|
|
148
|
+
return (h(Host, { key: '9a09eb68e5e6d256f72798bb5119ad1ff467fd70', class: "zonos--checkout-finish zonos--elements", style: {
|
|
149
149
|
'--border-radius': getBorderRadius(this.borderRadius),
|
|
150
|
-
} }, this.isLoading && (h("div", { class: "loading-wrapper" }, h("zonos-spinner", null))), !this.isLoading && (h(Fragment, null, h("div", { class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", {
|
|
150
|
+
} }, this.isLoading && (h("div", { class: "loading-wrapper" }, h("zonos-spinner", null))), !this.isLoading && (h(Fragment, null, h("div", { class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", null, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Keep shopping')))))));
|
|
151
151
|
}
|
|
152
152
|
static get assetsDirs() { return ["assets"]; }
|
|
153
153
|
static get style() { return ZonosCheckoutFinishStyle0; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ZonosCheckoutFooter extends Components.ZonosCheckoutFooter, HTMLElement {}
|
|
4
|
+
export const ZonosCheckoutFooter: {
|
|
5
|
+
prototype: ZonosCheckoutFooter;
|
|
6
|
+
new (): ZonosCheckoutFooter;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|