@zonos/elements 1.3.40 → 1.3.41
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/{cart-775440b7.js → cart-497bb434.js} +63 -3
- package/dist/cjs/{getBorderRadius-9ae7890c.js → getBorderRadius-4413e191.js} +1 -1
- package/dist/cjs/{index-ef8b2c76.js → index-d56e0a8b.js} +9 -3
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{isDarkColor-5f56770b.js → isDarkColor-4eb96a1e.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{paypal-25c84e33.js → paypal-e65a287a.js} +3 -3
- package/dist/cjs/{sendErrorLog-7818b288.js → sendErrorLog-c3c315a9.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +10 -10
- package/dist/cjs/zonos-badge_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +10 -10
- package/dist/cjs/zonos-checkout.cjs.entry.js +7 -7
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/{zonos-country-select_3.cjs.entry.js → zonos-country-select_4.cjs.entry.js} +100 -14
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -9
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-input.cjs.entry.js +7 -7
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +9 -9
- package/dist/cjs/zonos-link.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +4 -4
- package/dist/cjs/zonos-notification_3.cjs.entry.js +8 -8
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
- package/dist/cjs/{zonosStore-b6c72408.js → zonosStore-56401fdb.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +8 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +14 -4
- 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-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- 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/common/zonos-virtual-scroll/zonos-virtual-scroll.css +46 -0
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +177 -0
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- 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/esm/{cart-e9cd8286.js → cart-f53c9f90.js} +63 -3
- package/dist/esm/{getBorderRadius-3c75c4c1.js → getBorderRadius-3ba98361.js} +1 -1
- package/dist/esm/{index-5a37ccde.js → index-86b8247e.js} +9 -3
- package/dist/esm/index.js +4 -4
- package/dist/esm/{isDarkColor-3eb31a6d.js → isDarkColor-3119e351.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{paypal-da2b3db1.js → paypal-72296ae6.js} +3 -3
- package/dist/esm/{sendErrorLog-2fcf78a2.js → sendErrorLog-f8d3ec4b.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +10 -10
- package/dist/esm/zonos-badge_2.entry.js +4 -4
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-card.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +10 -10
- package/dist/esm/zonos-checkout.entry.js +7 -7
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +6 -6
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/{zonos-country-select_3.entry.js → zonos-country-select_4.entry.js} +100 -15
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +9 -9
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-input.entry.js +7 -7
- package/dist/esm/zonos-language-select_2.entry.js +9 -9
- package/dist/esm/zonos-link.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +4 -4
- package/dist/esm/zonos-notification_3.entry.js +8 -8
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +4 -4
- package/dist/esm/{zonosStore-425abc1b.js → zonosStore-8fc9ceb2.js} +1 -1
- package/dist/esm-es5/cart-f53c9f90.js +1 -0
- package/dist/esm-es5/{getBorderRadius-3c75c4c1.js → getBorderRadius-3ba98361.js} +1 -1
- package/dist/esm-es5/{index-5a37ccde.js → index-86b8247e.js} +2 -2
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-3eb31a6d.js → isDarkColor-3119e351.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-da2b3db1.js → paypal-72296ae6.js} +1 -1
- package/dist/esm-es5/{sendErrorLog-2fcf78a2.js → sendErrorLog-f8d3ec4b.js} +1 -1
- package/dist/esm-es5/zonos-address_8.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.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.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_4.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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.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/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-425abc1b.js → zonosStore-8fc9ceb2.js} +1 -1
- package/dist/scripts/index.d.ts +79 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/common/zonos-virtual-scroll/zonos-virtual-scroll.d.ts +32 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components.d.ts +79 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-5f68f356.system.entry.js → p-0229282c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-92bebe7a.js → p-04054425.js} +1 -1
- package/dist/zonos-elements/{p-f98f7066.js → p-05cdd3b4.js} +1 -1
- package/dist/zonos-elements/p-0f9804e3.entry.js +1 -0
- package/dist/zonos-elements/{p-d6135575.js → p-12266c9e.js} +1 -1
- package/dist/zonos-elements/{p-2c03ac78.system.entry.js → p-14067782.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1a89c54a.js +1 -0
- package/dist/zonos-elements/{p-1daa3b1e.system.entry.js → p-1e4f7997.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c87113fb.system.entry.js → p-1ee2fa70.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-efdc7748.entry.js → p-25633055.entry.js} +1 -1
- package/dist/zonos-elements/{p-b2007124.system.js → p-40c21634.system.js} +1 -1
- package/dist/zonos-elements/p-4db5be24.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e6efc2e1.system.entry.js → p-4f454a91.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-da15b587.system.entry.js → p-52947dab.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8d149b99.entry.js → p-52fa9aab.entry.js} +1 -1
- package/dist/zonos-elements/{p-3da1bc42.js → p-52fb6876.js} +1 -1
- package/dist/zonos-elements/{p-d95cb86a.system.js → p-539974db.system.js} +1 -1
- package/dist/zonos-elements/{p-15ecad81.entry.js → p-5922c099.entry.js} +1 -1
- package/dist/zonos-elements/p-5b7da777.js +2 -0
- package/dist/zonos-elements/{p-ca58f16e.system.entry.js → p-5fe10991.system.entry.js} +1 -1
- package/dist/zonos-elements/p-678f1888.entry.js +1 -0
- package/dist/zonos-elements/{p-c5a5512a.system.entry.js → p-67f22fbf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-890f5788.js → p-6ac72711.js} +1 -1
- package/dist/zonos-elements/{p-01bd2187.system.entry.js → p-6bb0b7d2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e252d86f.entry.js → p-6de1c78a.entry.js} +1 -1
- package/dist/zonos-elements/{p-d9d5ee2f.entry.js → p-6de38759.entry.js} +1 -1
- package/dist/zonos-elements/{p-445fb353.system.entry.js → p-6fbb4565.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d46fa40a.entry.js → p-706d2bad.entry.js} +1 -1
- package/dist/zonos-elements/{p-61842b4f.system.entry.js → p-717028a2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dc6a17fe.system.entry.js → p-7833fa53.system.entry.js} +1 -1
- package/dist/zonos-elements/p-79fd4f3c.system.js +1 -0
- package/dist/zonos-elements/{p-1b499bcc.system.js → p-8809964a.system.js} +1 -1
- package/dist/zonos-elements/{p-54101ed6.entry.js → p-8b01aafb.entry.js} +1 -1
- package/dist/zonos-elements/{p-f643035f.entry.js → p-9220f63d.entry.js} +1 -1
- package/dist/zonos-elements/{p-3496183d.entry.js → p-9420f9db.entry.js} +1 -1
- package/dist/zonos-elements/p-9525cc44.system.js +1 -0
- package/dist/zonos-elements/{p-5e55dcbc.entry.js → p-9a319774.entry.js} +1 -1
- package/dist/zonos-elements/{p-657be9e9.entry.js → p-9d1f13c2.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a5d1a12.system.entry.js → p-9eadd9a7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-70b024ad.system.entry.js → p-a3e2592b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-14b53e8f.system.entry.js → p-ab11cca6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3447ef24.system.js → p-b3e825dc.system.js} +1 -1
- package/dist/zonos-elements/{p-fa02dd07.system.entry.js → p-b689309d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3996d025.system.js → p-c460665d.system.js} +1 -1
- package/dist/zonos-elements/{p-6897be29.entry.js → p-c4617501.entry.js} +1 -1
- package/dist/zonos-elements/{p-97dadd90.system.entry.js → p-c4bb2949.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fa95c3dc.entry.js → p-c7301a88.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -0
- package/dist/zonos-elements/{p-3b6a7200.entry.js → p-d86c89e3.entry.js} +1 -1
- package/dist/zonos-elements/{p-7f96d3b4.entry.js → p-dc368ad5.entry.js} +1 -1
- package/dist/zonos-elements/{p-bfa5ec2b.entry.js → p-de53d9c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-c55a5fe4.system.entry.js → p-df69fa38.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-71037fe5.entry.js → p-e07bf9ea.entry.js} +1 -1
- package/dist/zonos-elements/{p-2bfb5e4b.system.entry.js → p-e8f7fb29.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-36df9785.entry.js → p-f35ee203.entry.js} +1 -1
- package/dist/zonos-elements/{p-b55b557a.system.js → p-fd061229.system.js} +2 -2
- package/dist/zonos-elements/{p-3d98f422.system.entry.js → p-fd54fbb9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-916adba7.entry.js → p-fdb4347f.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-e9cd8286.js +0 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +0 -1
- package/dist/zonos-elements/p-1debb7b2.entry.js +0 -1
- package/dist/zonos-elements/p-54971a77.system.js +0 -1
- package/dist/zonos-elements/p-6f39051c.system.entry.js +0 -1
- package/dist/zonos-elements/p-7dd54a63.entry.js +0 -1
- package/dist/zonos-elements/p-800db524.system.js +0 -1
- package/dist/zonos-elements/p-94279862.system.js +0 -1
- package/dist/zonos-elements/p-dd61b7a0.js +0 -2
- package/dist/zonos-elements/p-fb63bd03.js +0 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-d56e0a8b.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-4413e191.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-6f5a9608.js');
|
|
10
10
|
|
|
11
11
|
const zonosShippingRichRadioCss = ":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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-d56e0a8b.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const isColorVariable = require('./isColorVariable-6f5a9608.js');
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-d56e0a8b.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosVStackCss = ":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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";
|
|
@@ -15,9 +15,9 @@ const VStack = class {
|
|
|
15
15
|
this.spacing = 24;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h(index.Host, { key: '
|
|
18
|
+
return (index.h(index.Host, { key: 'e542ff8bbefa3223f157ad4bd6e537af8e5d5a5d', style: {
|
|
19
19
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
20
|
-
} }, index.h("div", { key: '
|
|
20
|
+
} }, index.h("div", { key: '9bd1cc8fdf94265d7d2767d507af7ad21d77234d', class: classes.classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, index.h("slot", { key: 'c8a294410e4c1348405c53283cf4dba176d5b27b' }))));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
VStack.style = ZonosVStackStyle0;
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"components/common/zonos-text/zonos-text.js",
|
|
39
39
|
"components/common/zonos-tooltip/zonos-tooltip.js",
|
|
40
40
|
"components/common/zonos-v-stack/zonos-v-stack.js",
|
|
41
|
+
"components/common/zonos-virtual-scroll/zonos-virtual-scroll.js",
|
|
41
42
|
"components/component-template/zonos-component/zonos-component.js",
|
|
42
43
|
"components/hello/zonos-hello/zonos-hello.js",
|
|
43
44
|
"components/hello/zonos-hello-dialog/zonos-hello-dialog.js",
|
|
@@ -51,6 +51,14 @@
|
|
|
51
51
|
padding: 16px;
|
|
52
52
|
padding-top: 0px;
|
|
53
53
|
}
|
|
54
|
+
:host .zonos--country-select .zonos--country-select-content .no-country {
|
|
55
|
+
position: absolute;
|
|
56
|
+
left: 17px;
|
|
57
|
+
}
|
|
58
|
+
:host .zonos--country-select .zonos--country-select-content .zonos--country-filter-content {
|
|
59
|
+
height: 300px;
|
|
60
|
+
display: block;
|
|
61
|
+
}
|
|
54
62
|
:host .zonos--country-select .zonos--country-select-country {
|
|
55
63
|
display: flex;
|
|
56
64
|
gap: 16px;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import Fuse from "fuse.js";
|
|
3
3
|
import { localizationStore, localizationStoreUpdateSelectedCountryCode, } from "../../store/hello/localization";
|
|
4
|
+
import { translate } from "../../store/translationStore";
|
|
4
5
|
import { zonosStoreFontFamily } from "../../store/zonosStore";
|
|
5
6
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
6
7
|
import GreenCheckDuotoneIcon from "./assets/greenCheckDuotone.svg";
|
|
@@ -16,7 +17,7 @@ export class ZonosCountrySelect {
|
|
|
16
17
|
const input = event.target;
|
|
17
18
|
this.inputValue = input.value;
|
|
18
19
|
// query the country list container
|
|
19
|
-
const countryListSelector = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-
|
|
20
|
+
const countryListSelector = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-content');
|
|
20
21
|
// scroll to top every time the input changes
|
|
21
22
|
if (countryListSelector) {
|
|
22
23
|
countryListSelector.scrollTop = 0;
|
|
@@ -28,21 +29,30 @@ export class ZonosCountrySelect {
|
|
|
28
29
|
componentDidRender() {
|
|
29
30
|
var _a, _b;
|
|
30
31
|
// focus the input on render
|
|
31
|
-
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-
|
|
32
|
+
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-content')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
32
33
|
}
|
|
33
34
|
render() {
|
|
34
35
|
const { helloCountryList } = localizationStore;
|
|
35
36
|
const countries = helloCountryList ? Object.values(helloCountryList) : [];
|
|
36
37
|
const fuse = new Fuse(countries, {
|
|
38
|
+
includeScore: true,
|
|
37
39
|
keys: ['displayName'],
|
|
40
|
+
threshold: 0.3,
|
|
38
41
|
});
|
|
39
42
|
const fuseObject = fuse.search(this.inputValue.toLowerCase());
|
|
40
43
|
const filteredCountries = this.inputValue
|
|
41
44
|
? fuseObject.map(country => country.item)
|
|
42
45
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
43
|
-
|
|
46
|
+
const isEmpty = !filteredCountries.length;
|
|
47
|
+
return (h(Host, { key: '1e17d188428f8caeb495389f7870c3052d3cfb4a', class: "zonos--elements", style: {
|
|
44
48
|
'--font-family': zonosStoreFontFamily(),
|
|
45
|
-
} }, h("div", { key: '
|
|
49
|
+
} }, h("div", { key: '2f6d0f239a4fad7c48349878b53dc8cb426aa022', class: "zonos--country-select" }, h("zonos-v-stack", { key: '76ad667603fce800457dae6d8951abe97e5db9d8', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '091416c3c6b91d3b50dd033d8bca0df79841871b', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '0c5d12e941bf7824594ebdd4b353ba833b6d9418', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), value: this.inputValue }))), h("div", { key: '9ff13fd2b3528ddff2bd379baa0b2ec919a6f928', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: '9cf46a7a706d335930eeedcc3663571c5dbaaafc', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '297237f0e2179ea95a49ae4872f6cc216026dd47', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
|
|
50
|
+
const country = filteredCountries[index];
|
|
51
|
+
if (!country) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 }))));
|
|
55
|
+
} })))));
|
|
46
56
|
}
|
|
47
57
|
static get is() { return "zonos-country-select"; }
|
|
48
58
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,9 +8,9 @@ export class ZonosCustomMessage {
|
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
10
|
const messageWithLinks = formatStringWithLinks(this.message);
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: 'd6d31b58cf5396c136d81a5969b418c79229c930', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, this.message && (h("zonos-card", { key: '
|
|
13
|
+
} }, this.message && (h("zonos-card", { key: '4c62131117e23bbe475fb6f59a5e9bba8bc7d552', class: "zonos--custom-message", spacing: "12px" }, h("div", { key: '7ec3cbde2204fe0fa3b52844109bf0379677d567', class: "zonos--flex-message" }, h("zonos-icon", { key: 'cad94039767bd3d93fe9995aee34e8eb42fb707c', "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { key: 'f5bd77fafded83fefd99c45f0a78cf5c72459e47', innerHTML: messageWithLinks }))))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-custom-message"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -59,7 +59,7 @@ export class ZonosDialog {
|
|
|
59
59
|
const borderStyle = getBorderRadius({
|
|
60
60
|
overrideBorderStyle: this.borderStyle,
|
|
61
61
|
});
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '03735385e07c7f6c8a87df42ad95f8c9d9533668', class: classes([
|
|
63
63
|
'zonos--elements',
|
|
64
64
|
this.open && 'open',
|
|
65
65
|
this.isLoading && 'is-loading',
|
|
@@ -71,10 +71,10 @@ export class ZonosDialog {
|
|
|
71
71
|
'--height': this.height || 'initial',
|
|
72
72
|
'--min-height': this.minHeight || '500px',
|
|
73
73
|
'--width': this.width,
|
|
74
|
-
} }, h("div", { key: '
|
|
74
|
+
} }, h("div", { key: 'da5d599e1a247f7e3364e6f5c9b2eae3db9539f5', class: "zonos--backdrop" }), h("div", { key: 'cda1a996d9521c2e0b307f7a03ca3ee3d4915b8d', class: "zonos--dialog-layout", inert: !this.open, onClick: this.clickOutsideDialogHandler }, h("div", { key: '471d8a069d4f580233bdb3e9e971efdb268ef57d', class: "zonos--dialog" }, this.isLoading && (h("div", { key: '57220007aabcaef133c2c0782fa238cc43d63964', class: "zonos--loading" }, h("zonos-spinner", { key: '0298b754341abd61ec07706128d05df5332f915d', size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { key: '5103dbc1c7593a8042505f767d8290825f9d10e7', class: "zonos--header" }, this.headerText && (h("h3", { key: 'a2d9cd4c8cb359aa64cf104a172ca960068c20a0', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: 'de9bf8a949344d19fcb8bfb496719282553be194', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, variant: "subtle" })))), h("div", { key: '1ec2cdca0f186cd0b28602580022ed0cb4b0eec9', class: classes([
|
|
75
75
|
'zonos--body',
|
|
76
76
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
77
|
-
]) }, h("slot", { key: '
|
|
77
|
+
]) }, h("slot", { key: '5071d921f48bf792a951a390d83b121e32771668' })), h("slot", { key: 'c1818ac301afc845f5b14fd0f2ac9a1fd3a27b99', name: "dialog-footer" })))));
|
|
78
78
|
}
|
|
79
79
|
static get is() { return "zonos-dialog"; }
|
|
80
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,17 +17,17 @@ export class ZonosInput {
|
|
|
17
17
|
this.inputChange.emit(newValue);
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '66ab3a9ec4ac4f78e448008824471cecd4775e78', class: classes([
|
|
21
21
|
'zonos--input zonos--elements',
|
|
22
22
|
this.inputSize,
|
|
23
23
|
this.isError && 'has-error',
|
|
24
24
|
]), style: {
|
|
25
25
|
'--border-radius': getBorderRadius(),
|
|
26
26
|
'--font-family': zonosStoreFontFamily(),
|
|
27
|
-
} }, h("div", { key: '
|
|
27
|
+
} }, h("div", { key: 'cef0295dea117c8bf0b8f3dc090f7c34648b9b31', class: classes([
|
|
28
28
|
'zonos--label-wrapper',
|
|
29
29
|
this.isDisabled && 'disabled',
|
|
30
|
-
]) }, h("input", { key: '
|
|
30
|
+
]) }, h("input", { key: 'a5c9e0791292046e9520bf8d186f6dc76a23ba64', class: classes([
|
|
31
31
|
'zonos--floated-input',
|
|
32
32
|
!!this.inputLabel && 'has-label',
|
|
33
33
|
this.inputValue && 'has-content',
|
|
@@ -35,7 +35,7 @@ export class ZonosInput {
|
|
|
35
35
|
]), disabled: this.isDisabled, onInput: e => {
|
|
36
36
|
const input = e.target;
|
|
37
37
|
this.inputChange.emit(input.value);
|
|
38
|
-
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("label", { key: '
|
|
38
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("label", { key: '25f51d372fdb0819fe316bcbfce429d63ded358f', class: "zonos--floated-label", "data-label": this.inputLabel }))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "zonos-input"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -16,9 +16,9 @@ export class ZonosLanguageSelect {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
const { selectedLocale } = localizationStore;
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '448f89b5870956b6e9455968134b94c9409a983d', class: "zonos--elements", style: {
|
|
20
20
|
'--font-family': zonosStoreFontFamily(),
|
|
21
|
-
} }, h("div", { key: '
|
|
21
|
+
} }, h("div", { key: '23841aa801d68da4b537cfaab5ea89405ec66a9f', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '5fc1b45aa0cb27c94163c2dace5ce4ad63215dfc', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: '7030fb276a05eea0e7333add3219b5316495662c', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "zonos-language-select"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,7 +7,7 @@ export class ZonosLink {
|
|
|
7
7
|
this.linkTitle = undefined;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'a5913bea95608f1f1a95186664d2032a4aff66ec', class: "zonos--elements" }, h("a", { key: 'dffb72ba6d1820669b1dbd9e841a242cbe58d860', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: '774219d208dce4b32dcc715b827b1d85fc5dfe5e' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "zonos-link"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,11 +10,11 @@ export class ZonosLogo {
|
|
|
10
10
|
const filterColor = this.theme === 'DARK'
|
|
11
11
|
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
12
12
|
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '8737fef033ef8114ca67be72b2f598897a6929b3', class: classes(['zonos--elements zonos--logo']), style: {
|
|
14
14
|
'--filter-color': filterColor,
|
|
15
15
|
'--font-family': zonosStoreFontFamily(),
|
|
16
16
|
'--width': this.width,
|
|
17
|
-
} }, h("img", { key: '
|
|
17
|
+
} }, h("img", { key: 'd5a15f2f8f891f865c7eb46268ae2f113ad1d3b4', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "zonos-logo"; }
|
|
20
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,11 +14,11 @@ export class ZonosRestState {
|
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
16
|
const imageUrl = this.getImageRestState();
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: 'a87be11591bfc71ad5133ceeea1f6b396cd98055', class: classes(['zonos--elements zonos--restState']), style: {
|
|
18
18
|
'--font-family': zonosStoreFontFamily(),
|
|
19
|
-
} }, h("div", { key: '
|
|
19
|
+
} }, h("div", { key: 'c317f01e0ac745e6ef91df1247b98c72aa340ce8', class: "zonos--restState-image" }, h("img", { key: '34947c09f8bcb76b21a547d8f5e0aa88d957a760', alt: this.restStateType, onError: () => {
|
|
20
20
|
this.isErrorImageLoad = true;
|
|
21
|
-
}, src: imageUrl })), h("div", { key: '
|
|
21
|
+
}, src: imageUrl })), h("div", { key: '6e5ea4207cafd572ad947e10526d20c38b24764f', class: "content" }, h("zonos-text", { key: '2dcb142426419451a0543ef2a110d7e8c713879f', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '440fe0d032979b56316cc9dc58c67d2c62795f3a', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: '2c9d2542bee1dc37202204529d8dd09b9c0592fa', class: "action" }, h("slot", { key: 'a50f0d183dd80a5c8509c8d3b839e342c661a33f' }))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "zonos-rest-state"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js
CHANGED
|
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
|
|
|
8
8
|
this.label = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '8ac4e1bcd64f6a2073e1161fec76c9b117345ada', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, h("zonos-v-stack", { key: '
|
|
13
|
+
} }, h("zonos-v-stack", { key: 'fe4a184a8bed7aceb4c3f8d341fed50380587c77', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '2176069a11ba20c7408ef898044f2ba68eea4a80', class: "zonos--select-dialog-header" }, h("zonos-text", { key: '45b9d890484881a15c4fa7a7e4028f9887cc942e', type: "boldLabel" }, this.label), h("zonos-button", { key: '65f0d9ea7b6dee35d23aa6fca19fd686190b667f', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: '758fce95d668ad755745687d3fcf1a6a307061bc' }))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-select-dialog-header"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,10 +7,10 @@ export class ZonosTooltip {
|
|
|
7
7
|
this.showTooltip = false;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '24f3b1f73cc320540ab3700213004c267ea04658', class: "zonos--elements" }, h("div", { key: '7f52acf90cb5b9f1fd5efdc4fedc4d61a893a646', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '1871529e8b75c44a71bf1f5bc9e60b81bbc598d2' }), h("div", { key: 'c0b9c9c1b3fef5f766d2bad4c5bea48f3d6bbb6f', class: classes([
|
|
11
11
|
this.showTooltip && 'zonos--show-tooltip',
|
|
12
12
|
'zonos--tooltip-content',
|
|
13
|
-
]) }, h("zonos-text", { key: '
|
|
13
|
+
]) }, h("zonos-text", { key: '3b106cb439877dffa101f15fb01aff980a64c7cb', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: 'c0005051e6e1b614b7739718e1a262f6043d56f5', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-tooltip"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,9 +7,9 @@ export class VStack {
|
|
|
7
7
|
this.spacing = 24;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'e542ff8bbefa3223f157ad4bd6e537af8e5d5a5d', style: {
|
|
11
11
|
'--font-family': zonosStoreFontFamily(),
|
|
12
|
-
} }, h("div", { key: '
|
|
12
|
+
} }, h("div", { key: '9bd1cc8fdf94265d7d2767d507af7ad21d77234d', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: 'c8a294410e4c1348405c53283cf4dba176d5b27b' }))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "zonos-v-stack"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: var(--font-family, Inter), Inter;
|
|
3
|
+
display: block;
|
|
4
|
+
white-space: normal;
|
|
5
|
+
}
|
|
6
|
+
:host * {
|
|
7
|
+
font-family: var(--font-family, Inter), Inter;
|
|
8
|
+
}
|
|
9
|
+
:host img {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
:host dl,
|
|
13
|
+
:host dd,
|
|
14
|
+
:host h1,
|
|
15
|
+
:host h2,
|
|
16
|
+
:host h3,
|
|
17
|
+
:host h4,
|
|
18
|
+
:host h5,
|
|
19
|
+
:host h6,
|
|
20
|
+
:host hr,
|
|
21
|
+
:host figure,
|
|
22
|
+
:host p,
|
|
23
|
+
:host pre {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* All sets of variable are here */
|
|
28
|
+
/* smooth font rendering */
|
|
29
|
+
:host {
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
-webkit-font-smoothing: antialiased;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host {
|
|
35
|
+
overflow: scroll;
|
|
36
|
+
}
|
|
37
|
+
:host .scroller {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
}
|
|
40
|
+
:host .item-container {
|
|
41
|
+
position: relative;
|
|
42
|
+
display: inline-block;
|
|
43
|
+
}
|
|
44
|
+
:host .item-container .item {
|
|
45
|
+
position: absolute;
|
|
46
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* The idea is from
|
|
4
|
+
* @ref https://github.com/beenotung/stencil-virtual-scroll/blob/master/src/components/virtual-scroll-list/virtual-scroll-list.scss
|
|
5
|
+
* @ref https://github.dev/ionic-team/ionic-framework/blob/v6.7.5/core/src/components/virtual-scroll/virtual-scroll.tsx
|
|
6
|
+
*/
|
|
7
|
+
export class ZonosVirtualScroll {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.scrollListener = (_ev) => {
|
|
10
|
+
this.scrollTop = this.ele.scrollTop;
|
|
11
|
+
};
|
|
12
|
+
this.container = undefined;
|
|
13
|
+
this.renderItem = undefined;
|
|
14
|
+
this.itemWidth = undefined;
|
|
15
|
+
this.fallbackItemHeight = undefined;
|
|
16
|
+
this.itemHeights = undefined;
|
|
17
|
+
this.scrollTop = 0;
|
|
18
|
+
this.totalHeight = 1;
|
|
19
|
+
}
|
|
20
|
+
updateTotalHeight() {
|
|
21
|
+
this.totalHeight = this.itemHeights.reduce((acc, height) => acc + (height || this.fallbackItemHeight), 0);
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
this.ele.addEventListener('scroll', this.scrollListener);
|
|
25
|
+
this.updateTotalHeight();
|
|
26
|
+
}
|
|
27
|
+
disconnectedCallback() {
|
|
28
|
+
this.ele.removeEventListener('scroll', this.scrollListener);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
const W = this.ele.clientWidth;
|
|
32
|
+
const H = this.ele.clientHeight;
|
|
33
|
+
const heights = this.itemHeights;
|
|
34
|
+
const fallbackItemHeight = this.fallbackItemHeight;
|
|
35
|
+
const N = this.itemHeights.length;
|
|
36
|
+
const scrollTop = this.scrollTop;
|
|
37
|
+
const children = [];
|
|
38
|
+
let accHeight = 0;
|
|
39
|
+
// buffer for pre-rendering for item outside of viewport
|
|
40
|
+
const buffer = 100;
|
|
41
|
+
for (let i = 0; i < N; i++) {
|
|
42
|
+
const itemHeight = heights[i] || fallbackItemHeight;
|
|
43
|
+
if (scrollTop > accHeight + itemHeight + buffer) {
|
|
44
|
+
accHeight += itemHeight;
|
|
45
|
+
continue; // this item is above the viewport
|
|
46
|
+
}
|
|
47
|
+
if (scrollTop + H < accHeight - buffer) {
|
|
48
|
+
break; // this item is below the viewport
|
|
49
|
+
}
|
|
50
|
+
const x = 0;
|
|
51
|
+
const y = accHeight;
|
|
52
|
+
children.push(h("div", { class: "item", style: {
|
|
53
|
+
height: `${itemHeight}px`,
|
|
54
|
+
transform: `translate(${x}px,${y}px)`,
|
|
55
|
+
width: this.itemWidth ? `${this.itemWidth}px` : `${W}px`,
|
|
56
|
+
} }, this.renderItem(i)));
|
|
57
|
+
accHeight += itemHeight;
|
|
58
|
+
}
|
|
59
|
+
return (h(Host, { key: '6faa73cacfefee42781f87e6f697980941139d12' }, h("div", { key: '5411c13934b8b997f68bc6678e6e1c475d6d453c',
|
|
60
|
+
// to capture scroll action
|
|
61
|
+
class: "scroller", style: {
|
|
62
|
+
height: `${this.totalHeight}px`,
|
|
63
|
+
width: `${W}px`,
|
|
64
|
+
} }), h("div", { key: '46c402a5a0df3242b9022e16b15d5e348210bc32',
|
|
65
|
+
// to display items
|
|
66
|
+
class: "item-container", ref: el => (this.container = el), style: {
|
|
67
|
+
height: `${this.totalHeight}px`,
|
|
68
|
+
left: `${-W}px`,
|
|
69
|
+
} }, children)));
|
|
70
|
+
}
|
|
71
|
+
static get is() { return "zonos-virtual-scroll"; }
|
|
72
|
+
static get encapsulation() { return "scoped"; }
|
|
73
|
+
static get originalStyleUrls() {
|
|
74
|
+
return {
|
|
75
|
+
"$": ["zonos-virtual-scroll.scss"]
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
static get styleUrls() {
|
|
79
|
+
return {
|
|
80
|
+
"$": ["zonos-virtual-scroll.css"]
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
static get properties() {
|
|
84
|
+
return {
|
|
85
|
+
"renderItem": {
|
|
86
|
+
"type": "unknown",
|
|
87
|
+
"mutable": false,
|
|
88
|
+
"complexType": {
|
|
89
|
+
"original": "(\n itemIndex: number,\n ) =>\n | HTMLElement\n | Promise<HTMLElement>\n | HTMLElement[]\n | Promise<HTMLElement[]>\n | Promise<HTMLElement>[]",
|
|
90
|
+
"resolved": "(itemIndex: number) => HTMLElement | HTMLElement[] | Promise<HTMLElement> | Promise<HTMLElement[]> | Promise<HTMLElement>[]",
|
|
91
|
+
"references": {
|
|
92
|
+
"HTMLElement": {
|
|
93
|
+
"location": "global",
|
|
94
|
+
"id": "global::HTMLElement"
|
|
95
|
+
},
|
|
96
|
+
"Promise": {
|
|
97
|
+
"location": "global",
|
|
98
|
+
"id": "global::Promise"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": true,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": "Render item"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"itemWidth": {
|
|
110
|
+
"type": "number",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "number",
|
|
114
|
+
"resolved": "number | undefined",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": true,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Width of each item"
|
|
122
|
+
},
|
|
123
|
+
"attribute": "item-width",
|
|
124
|
+
"reflect": false
|
|
125
|
+
},
|
|
126
|
+
"fallbackItemHeight": {
|
|
127
|
+
"type": "number",
|
|
128
|
+
"mutable": false,
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "number",
|
|
131
|
+
"resolved": "number",
|
|
132
|
+
"references": {}
|
|
133
|
+
},
|
|
134
|
+
"required": true,
|
|
135
|
+
"optional": false,
|
|
136
|
+
"docs": {
|
|
137
|
+
"tags": [],
|
|
138
|
+
"text": "Height that is used as a fallback if height is not provided"
|
|
139
|
+
},
|
|
140
|
+
"attribute": "fallback-item-height",
|
|
141
|
+
"reflect": false
|
|
142
|
+
},
|
|
143
|
+
"itemHeights": {
|
|
144
|
+
"type": "unknown",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "number[]",
|
|
148
|
+
"resolved": "number[]",
|
|
149
|
+
"references": {}
|
|
150
|
+
},
|
|
151
|
+
"required": true,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": "Heights list of each item"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
static get states() {
|
|
161
|
+
return {
|
|
162
|
+
"container": {},
|
|
163
|
+
"scrollTop": {},
|
|
164
|
+
"totalHeight": {}
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
static get elementRef() { return "ele"; }
|
|
168
|
+
static get watchers() {
|
|
169
|
+
return [{
|
|
170
|
+
"propName": "itemHeights",
|
|
171
|
+
"methodName": "updateTotalHeight"
|
|
172
|
+
}, {
|
|
173
|
+
"propName": "fallbackItemHeight",
|
|
174
|
+
"methodName": "updateTotalHeight"
|
|
175
|
+
}];
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -10,7 +10,7 @@ export class ZonosComponent {
|
|
|
10
10
|
return format(this.first, this.middle, this.last);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return h("div", { key: '
|
|
13
|
+
return h("div", { key: 'ece01ba1df61d0c15e60d2cf9fffbf4c01268612' }, "Hello, World! I'm ", this.getText());
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-component"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,9 +18,9 @@ export class ZonosHelloDialogFooter {
|
|
|
18
18
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
19
19
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
20
20
|
const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: 'a9b52a67a2db1967fe6fde4f19dc8d2785469f8a', class: "zonos--elements" }, h("div", { key: '1b36f45f0f00fe2b6494fb04373b12b4848b9484', class: "zonos--hello-dialog-footer", style: {
|
|
22
22
|
'--primary-color': primaryColor,
|
|
23
|
-
} }, h("a", { key: '
|
|
23
|
+
} }, h("a", { key: '7ca110d30f9266d021069af41766588ffce3d2ad', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'f9f4866c18bc75577e5a3961ffdd67f48977fd68', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: '2bacafbd2c2d9c79935b7a2c69ae9fd3e1ede48a', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'a223f6706d319da505e8f013bff6863a433effd3', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'aa94f1e06b80f6bec8433c3c8a7b066f0d91df08', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "zonos-hello-dialog-footer"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -198,18 +198,18 @@ export class ZonosHelloDialog {
|
|
|
198
198
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
199
199
|
const currentPage = this.getCurrentPageEnum();
|
|
200
200
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
201
|
-
return (h(Host, { key: '
|
|
201
|
+
return (h(Host, { key: '7dec47839d142b9d3580dffda8b8eea28af9974f', class: "zonos--elements" }, h("div", { key: 'ea71e8885de2be45be5a2dcc9dbe44ef99261102', class: classes([
|
|
202
202
|
'zonos--hello-dialog',
|
|
203
203
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
204
204
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
205
205
|
!!this.mobileLocationOverride &&
|
|
206
206
|
'zonos--hello-dialog-mobile-override',
|
|
207
207
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
208
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
208
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '2e66e1610e534de2fd4f4f5bce29e899f6c65877' }, h("div", { key: '598ffd431b5fcab10f7a7cb3c453fd959abdd881', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '68998e9634998a6b6d244540776c2bc18fb54c27', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '660c8ae672b70185a046280d9e27b3fce8ad3e00', spacing: 24 }, h("zonos-country-flag", { key: '46f9733add5cf8038944e2c7c48a14f6f39f831a', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'e0571eae7cfd1a6555b16dd3ac450a8545095231', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: 'fffa08e2519973aafc2813246b7df2f9e4895a0d', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: 'ef78eead5a3fd2ce7ad881deb6472ca70e18032d', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: 'cd2632bb7a2655a240715601c32df6c807c283a1', spacing: 8 }, this.restrictedItems.map(item => {
|
|
209
209
|
var _a;
|
|
210
210
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
211
|
-
}), h("zonos-card", { key: '
|
|
212
|
-
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '
|
|
211
|
+
}), h("zonos-card", { key: 'ad5f69b84e2fd80864a6772216aa28b6558f12c4', spacing: "12px" }, h("zonos-v-stack", { key: '86b8c89c17b9b1348bf56c9a6fa2be3de11cb841', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
212
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '2dc162a5dc40d781009379ef8276ebcd38a26494', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'a86eaaa8536432db2d4e63c3d3b4122349edeba6' }, h("zonos-country-select", { key: '2d0ec209c2500763b1656f07f8685818ee329e1e', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: 'd1c7f801e301635028dd2f6a478a93d72fc968f7' }, h("zonos-language-select", { key: '95e40b3c1e44d437d466fbc704c7e95ebdf8ec3c', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
213
213
|
}
|
|
214
214
|
static get is() { return "zonos-hello-dialog"; }
|
|
215
215
|
static get encapsulation() { return "shadow"; }
|