@zonos/elements 1.3.7-alpha.0 → 1.3.7-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/dist/cjs/{cart-ecc80eb0.js → cart-89d9fff4.js} +150 -95
  2. package/dist/cjs/formatStringWithLinks-52341fc7.js +17 -0
  3. package/dist/cjs/{getBorderRadius-834c321d.js → getBorderRadius-d8f18958.js} +1 -1
  4. package/dist/cjs/{isDarkColor-924e6a7a.js → isDarkColor-57860b44.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/submitGtag-24740560.js +55 -0
  7. package/dist/cjs/zonos-address_4.cjs.entry.js +20 -14
  8. package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
  9. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-button_3.cjs.entry.js +8 -8
  11. package/dist/cjs/zonos-card_2.cjs.entry.js +8 -8
  12. package/dist/cjs/zonos-cart-items_9.cjs.entry.js +35 -33
  13. package/dist/cjs/zonos-checkout.cjs.entry.js +158 -21
  14. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  15. package/dist/cjs/zonos-controller.cjs.entry.js +28 -8
  16. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  17. package/dist/cjs/zonos-country-select_3.cjs.entry.js +18 -10
  18. package/dist/cjs/zonos-elements.cjs.js +1 -1
  19. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -7
  20. package/dist/cjs/zonos-hello.cjs.entry.js +24 -9
  21. package/dist/cjs/zonos-link.cjs.entry.js +24 -0
  22. package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
  23. package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
  25. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +5 -5
  26. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  28. package/dist/cjs/{zonosStore-49d4c92a.js → zonosStore-138c5555.js} +5 -3
  29. package/dist/collection/collection-manifest.json +1 -0
  30. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +1 -6
  31. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +19 -10
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +39 -18
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +2 -0
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +1 -6
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +3 -0
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -0
  39. package/dist/collection/components/common/component-template/zonos-link/zonos-link.css +54 -0
  40. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +97 -0
  41. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  42. package/dist/collection/components/common/zonos-button/zonos-button.css +2 -0
  43. package/dist/collection/components/common/zonos-button/zonos-button.js +4 -4
  44. package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
  45. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  46. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +13 -6
  47. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +8 -2
  48. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -2
  49. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  50. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  51. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  52. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  53. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
  54. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  55. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  56. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  57. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +50 -11
  58. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  59. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -3
  60. package/dist/collection/components/main/zonos-controller.js +1 -1
  61. package/dist/collection/components/store/checkout/cart.js +2 -2
  62. package/dist/collection/components/store/checkout/stripe.js +26 -4
  63. package/dist/collection/components/store/hello/localization.js +7 -6
  64. package/dist/collection/components/store/zonosStore.js +5 -3
  65. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  66. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  67. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  68. package/dist/collection/components/utils/api/trackConversionEvent.js +22 -0
  69. package/dist/collection/components/utils/checkout/isShippableCountry.js +15 -0
  70. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +111 -0
  71. package/dist/collection/components/utils/formatStringWithLinks.js +13 -0
  72. package/dist/collection/components/utils/handleFetch.js +1 -1
  73. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +25 -28
  74. package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js +2 -1
  75. package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js +8 -6
  76. package/dist/collection/components/utils/hello/initHello.js +23 -3
  77. package/dist/collection/components/utils/logging/log.js +20 -9
  78. package/dist/collection/components/utils/logging/logError.js +2 -1
  79. package/dist/collection/components/utils/logging/sendErrorLog.js +12 -0
  80. package/dist/collection/scripts/checkIfLoadVersionDomain.js +35 -0
  81. package/dist/collection/scripts/zonosBase.js +21 -31
  82. package/dist/collection/styles/stripe/addressRuleStyle.js +4 -0
  83. package/dist/collection/types/generated/graphql.customer.types.js +1 -4
  84. package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
  85. package/dist/components/stripe.js +145 -93
  86. package/dist/components/trackConversionEvent.js +24 -0
  87. package/dist/components/zonos-address2.js +1 -1
  88. package/dist/components/zonos-badge2.js +3 -3
  89. package/dist/components/zonos-button2.js +5 -5
  90. package/dist/components/zonos-card2.js +2 -2
  91. package/dist/components/zonos-cart-subtotal2.js +1 -6
  92. package/dist/components/zonos-checkbox2.js +3 -3
  93. package/dist/components/zonos-checkout-finish2.js +32 -12
  94. package/dist/components/zonos-checkout-payment2.js +1 -1
  95. package/dist/components/zonos-checkout.js +157 -18
  96. package/dist/components/zonos-collapse2.js +13 -6
  97. package/dist/components/zonos-component.js +1 -1
  98. package/dist/components/zonos-controller.js +25 -5
  99. package/dist/components/zonos-country-select2.js +9 -3
  100. package/dist/components/zonos-custom-message2.js +18 -3
  101. package/dist/components/zonos-customer-info2.js +3 -1
  102. package/dist/components/zonos-dialog2.js +3 -3
  103. package/dist/components/zonos-hello-dialog-footer2.js +2 -2
  104. package/dist/components/zonos-hello-dialog2.js +6 -5
  105. package/dist/components/zonos-hello.js +23 -7
  106. package/dist/components/zonos-language-select2.js +3 -3
  107. package/dist/components/zonos-link-authentication2.js +1 -1
  108. package/dist/components/zonos-link.d.ts +11 -0
  109. package/dist/components/zonos-link.js +43 -0
  110. package/dist/components/zonos-logo.js +2 -2
  111. package/dist/components/zonos-payment2.js +1 -1
  112. package/dist/components/zonos-review2.js +1 -6
  113. package/dist/components/zonos-select-dialog-header2.js +2 -2
  114. package/dist/components/zonos-shipping-rich-radio2.js +1 -1
  115. package/dist/components/zonos-shipping2.js +7 -2
  116. package/dist/components/zonos-tooltip2.js +2 -2
  117. package/dist/components/zonos-v-stack2.js +2 -2
  118. package/dist/components/zonosStore.js +5 -3
  119. package/dist/esm/{cart-2a0a6871.js → cart-1bbb7662.js} +148 -96
  120. package/dist/esm/formatStringWithLinks-9e819405.js +15 -0
  121. package/dist/esm/{getBorderRadius-0c7dfcf0.js → getBorderRadius-19787feb.js} +1 -1
  122. package/dist/esm/{isDarkColor-d0a57fd2.js → isDarkColor-2344e7a5.js} +1 -1
  123. package/dist/esm/loader.js +1 -1
  124. package/dist/esm/submitGtag-d3d11f1a.js +51 -0
  125. package/dist/esm/zonos-address_4.entry.js +20 -14
  126. package/dist/esm/zonos-badge_2.entry.js +6 -6
  127. package/dist/esm/zonos-banner.entry.js +1 -1
  128. package/dist/esm/zonos-button_3.entry.js +8 -8
  129. package/dist/esm/zonos-card_2.entry.js +8 -8
  130. package/dist/esm/zonos-cart-items_9.entry.js +35 -33
  131. package/dist/esm/zonos-checkout.entry.js +158 -21
  132. package/dist/esm/zonos-component.entry.js +1 -1
  133. package/dist/esm/zonos-controller.entry.js +28 -8
  134. package/dist/esm/zonos-country-flag.entry.js +4 -4
  135. package/dist/esm/zonos-country-select_3.entry.js +19 -11
  136. package/dist/esm/zonos-elements.js +1 -1
  137. package/dist/esm/zonos-hello-dialog.entry.js +9 -7
  138. package/dist/esm/zonos-hello.entry.js +24 -9
  139. package/dist/esm/zonos-link.entry.js +20 -0
  140. package/dist/esm/zonos-logo.entry.js +3 -3
  141. package/dist/esm/zonos-notification.entry.js +1 -1
  142. package/dist/esm/zonos-payment.entry.js +5 -5
  143. package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
  144. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  145. package/dist/esm/zonos-text.entry.js +1 -1
  146. package/dist/esm/{zonosStore-dec6bd7e.js → zonosStore-00bce01b.js} +5 -3
  147. package/dist/esm-es5/{cart-2a0a6871.js → cart-1bbb7662.js} +1 -1
  148. package/dist/esm-es5/formatStringWithLinks-9e819405.js +1 -0
  149. package/dist/esm-es5/{getBorderRadius-0c7dfcf0.js → getBorderRadius-19787feb.js} +1 -1
  150. package/dist/esm-es5/{isDarkColor-d0a57fd2.js → isDarkColor-2344e7a5.js} +1 -1
  151. package/dist/esm-es5/loader.js +1 -1
  152. package/dist/esm-es5/submitGtag-d3d11f1a.js +1 -0
  153. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  154. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  155. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  156. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  157. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  158. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
  159. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  160. package/dist/esm-es5/zonos-component.entry.js +1 -1
  161. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  162. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  163. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  164. package/dist/esm-es5/zonos-elements.js +1 -1
  165. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  166. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  167. package/dist/esm-es5/zonos-link.entry.js +1 -0
  168. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  169. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  170. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  171. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  172. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  173. package/dist/esm-es5/zonos-text.entry.js +1 -1
  174. package/dist/esm-es5/{zonosStore-dec6bd7e.js → zonosStore-00bce01b.js} +1 -1
  175. package/dist/scripts/checkIfLoadVersionDomain.js +1 -0
  176. package/dist/scripts/loadStripe.js +1 -1
  177. package/dist/scripts/loadZonos.js +1 -1
  178. package/dist/scripts/stripe.js +1 -1
  179. package/dist/scripts/zonos.js +1 -1
  180. package/dist/scripts/zonosBase.js +1 -1
  181. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -1
  182. package/dist/types/components/common/component-template/zonos-link/zonos-link.d.ts +19 -0
  183. package/dist/types/components/common/zonos-collapse/zonos-collapse.d.ts +1 -0
  184. package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +2 -0
  185. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +9 -3
  186. package/dist/types/components/store/checkout/cart.d.ts +6 -3
  187. package/dist/types/components/store/checkout/stripe.d.ts +22 -1
  188. package/dist/types/components/store/hello/localization.d.ts +1 -1
  189. package/dist/types/components/store/zonosStore.d.ts +1 -0
  190. package/dist/types/components/utils/api/trackConversionEvent.d.ts +3 -0
  191. package/dist/types/components/utils/checkout/isShippableCountry.d.ts +1 -0
  192. package/dist/types/components/utils/checkout/watchBigcommerceDomesticCheckout.d.ts +20 -0
  193. package/dist/types/components/utils/formatStringWithLinks.d.ts +1 -0
  194. package/dist/types/components/utils/hello/currencyConversion/getCurrencyElements.d.ts +1 -1
  195. package/dist/types/components/utils/logging/log.d.ts +1 -1
  196. package/dist/types/components/utils/logging/sendErrorLog.d.ts +7 -0
  197. package/dist/types/components.d.ts +53 -3
  198. package/dist/types/scripts/checkIfLoadVersionDomain.d.ts +13 -0
  199. package/dist/types/scripts/zonosBase.d.ts +2 -0
  200. package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
  201. package/dist/types/types/generated/graphql.customer.types.d.ts +8 -53
  202. package/dist/types/types/generated/graphql.customer.types.ts +18 -62
  203. package/dist/types/types/generated/graphql.frontend.types.d.ts +8 -0
  204. package/dist/types/types/generated/graphql.frontend.types.ts +18 -0
  205. package/dist/zonos-elements/p-0318632a.entry.js +1 -0
  206. package/dist/zonos-elements/p-066c5893.system.js +1 -1
  207. package/dist/zonos-elements/p-07966463.entry.js +1 -0
  208. package/dist/zonos-elements/p-0c0aa552.js +1 -0
  209. package/dist/zonos-elements/p-127b480c.entry.js +1 -0
  210. package/dist/zonos-elements/p-135ab559.system.entry.js +1 -0
  211. package/dist/zonos-elements/{p-e855966f.system.entry.js → p-143dc0d9.system.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-55970b10.system.entry.js → p-14d27ce1.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-a93c594f.entry.js → p-15a80c4a.entry.js} +1 -1
  214. package/dist/zonos-elements/p-17e87be1.entry.js +1 -0
  215. package/dist/zonos-elements/{p-a95c034c.entry.js → p-1e0dd491.entry.js} +1 -1
  216. package/dist/zonos-elements/{p-34efed1d.entry.js → p-279d1c5f.entry.js} +1 -1
  217. package/dist/zonos-elements/p-2d6557ee.system.js +1 -0
  218. package/dist/zonos-elements/p-314be538.system.entry.js +1 -0
  219. package/dist/zonos-elements/{p-79b910bf.system.entry.js → p-328b7f6f.system.entry.js} +1 -1
  220. package/dist/zonos-elements/p-354603b3.system.entry.js +1 -0
  221. package/dist/zonos-elements/{p-591eb6dd.system.js → p-49f6a985.system.js} +1 -1
  222. package/dist/zonos-elements/p-57b65321.system.entry.js +1 -0
  223. package/dist/zonos-elements/{p-5b44abc8.system.js → p-58c1ddef.system.js} +1 -1
  224. package/dist/zonos-elements/{p-06652d87.system.entry.js → p-58e2f6a1.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-7d1d862f.system.entry.js → p-5ee03db0.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-88a55076.system.entry.js → p-61e5cf29.system.entry.js} +1 -1
  227. package/dist/zonos-elements/{p-67737613.system.entry.js → p-799d8a17.system.entry.js} +1 -1
  228. package/dist/zonos-elements/p-7a32526c.entry.js +1 -0
  229. package/dist/zonos-elements/p-7b87b82f.js +1 -0
  230. package/dist/zonos-elements/{p-e2770968.system.entry.js → p-7c45ce37.system.entry.js} +1 -1
  231. package/dist/zonos-elements/p-84f4f00f.entry.js +1 -0
  232. package/dist/zonos-elements/{p-2d2e1831.entry.js → p-857cfe35.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-dfd3edcf.entry.js → p-87e9c42f.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-ec4d08b3.system.js → p-91797d4e.system.js} +1 -1
  235. package/dist/zonos-elements/{p-34c03be2.js → p-95e0fc06.js} +1 -1
  236. package/dist/zonos-elements/{p-afe40057.entry.js → p-a3cc0f84.entry.js} +1 -1
  237. package/dist/zonos-elements/p-a5f12396.entry.js +1 -0
  238. package/dist/zonos-elements/p-a87561b8.js +1 -0
  239. package/dist/zonos-elements/{p-e161a08c.entry.js → p-ac0a7b8f.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-9878a770.js → p-ae82a9ae.js} +1 -1
  241. package/dist/zonos-elements/p-b0462325.system.entry.js +1 -0
  242. package/dist/zonos-elements/{p-1f85a98c.system.entry.js → p-b2c0ec71.system.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-549c181b.system.js → p-b4725505.system.js} +1 -1
  244. package/dist/zonos-elements/p-bef54fb1.entry.js +1 -0
  245. package/dist/zonos-elements/{p-0c72fb79.system.entry.js → p-c0d431f6.system.entry.js} +1 -1
  246. package/dist/zonos-elements/p-d054788b.system.js +1 -0
  247. package/dist/zonos-elements/{p-375c472a.system.entry.js → p-d407c93a.system.entry.js} +1 -1
  248. package/dist/zonos-elements/p-e55dd932.js +1 -0
  249. package/dist/zonos-elements/p-ec37439e.entry.js +1 -0
  250. package/dist/zonos-elements/p-edace42b.entry.js +1 -0
  251. package/dist/zonos-elements/{p-cc63a29f.system.entry.js → p-f478c814.system.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-8aeb4679.system.entry.js → p-f6eaef7b.system.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-c7098c3b.entry.js → p-f7c36fcc.entry.js} +1 -1
  254. package/dist/zonos-elements/p-f862b97f.system.entry.js +1 -0
  255. package/dist/zonos-elements/p-fd642725.entry.js +1 -0
  256. package/dist/zonos-elements/p-fdb72530.system.entry.js +1 -0
  257. package/dist/zonos-elements/{p-a4de3fb2.entry.js → p-ff64ddc5.entry.js} +1 -1
  258. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  259. package/package.json +1 -1
  260. package/dist/cjs/submitGtag-907e71d3.js +0 -21
  261. package/dist/collection/scripts/extractZonosQaUrl.js +0 -26
  262. package/dist/esm/submitGtag-a38aed23.js +0 -19
  263. package/dist/esm-es5/submitGtag-a38aed23.js +0 -1
  264. package/dist/types/scripts/extractZonosQaUrl.d.ts +0 -11
  265. package/dist/zonos-elements/p-0057e374.entry.js +0 -1
  266. package/dist/zonos-elements/p-290c3670.entry.js +0 -1
  267. package/dist/zonos-elements/p-2f1e1cbb.system.entry.js +0 -1
  268. package/dist/zonos-elements/p-33080cde.system.entry.js +0 -1
  269. package/dist/zonos-elements/p-561e44d6.entry.js +0 -1
  270. package/dist/zonos-elements/p-5c4dc123.js +0 -1
  271. package/dist/zonos-elements/p-656c836b.entry.js +0 -1
  272. package/dist/zonos-elements/p-8d645a00.entry.js +0 -1
  273. package/dist/zonos-elements/p-a219689f.entry.js +0 -1
  274. package/dist/zonos-elements/p-a3d72a33.entry.js +0 -1
  275. package/dist/zonos-elements/p-b10ff468.entry.js +0 -1
  276. package/dist/zonos-elements/p-b6992dc2.system.entry.js +0 -1
  277. package/dist/zonos-elements/p-bce46c41.js +0 -1
  278. package/dist/zonos-elements/p-c56d4a44.entry.js +0 -1
  279. package/dist/zonos-elements/p-cbb1e700.system.js +0 -1
  280. package/dist/zonos-elements/p-cd8bd5e9.system.entry.js +0 -1
  281. package/dist/zonos-elements/p-d36faf87.system.entry.js +0 -1
  282. package/dist/zonos-elements/p-e2c6ad57.entry.js +0 -1
  283. package/dist/zonos-elements/p-ea93943a.system.entry.js +0 -1
  284. package/dist/zonos-elements/p-f455e08c.js +0 -1
@@ -0,0 +1,97 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class ZonosLink {
3
+ constructor() {
4
+ this.href = '';
5
+ this.rel = undefined;
6
+ this.target = undefined;
7
+ this.linkTitle = undefined;
8
+ }
9
+ render() {
10
+ return (h(Host, { key: '99bf9ff46cf84f424739b76d3da8a8c770c0a88f', class: "zonos--elements" }, h("a", { key: 'bd3553a33f27b4815a7b0573a34862093242b456', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: 'ad80829c1ca5cd9b0e2dd62542025eeecf436196' }))));
11
+ }
12
+ static get is() { return "zonos-link"; }
13
+ static get encapsulation() { return "shadow"; }
14
+ static get originalStyleUrls() {
15
+ return {
16
+ "$": ["zonos-link.scss"]
17
+ };
18
+ }
19
+ static get styleUrls() {
20
+ return {
21
+ "$": ["zonos-link.css"]
22
+ };
23
+ }
24
+ static get properties() {
25
+ return {
26
+ "href": {
27
+ "type": "string",
28
+ "mutable": false,
29
+ "complexType": {
30
+ "original": "string",
31
+ "resolved": "string",
32
+ "references": {}
33
+ },
34
+ "required": false,
35
+ "optional": false,
36
+ "docs": {
37
+ "tags": [],
38
+ "text": "The href for the link"
39
+ },
40
+ "attribute": "href",
41
+ "reflect": false,
42
+ "defaultValue": "''"
43
+ },
44
+ "rel": {
45
+ "type": "string",
46
+ "mutable": false,
47
+ "complexType": {
48
+ "original": "string",
49
+ "resolved": "string | undefined",
50
+ "references": {}
51
+ },
52
+ "required": false,
53
+ "optional": true,
54
+ "docs": {
55
+ "tags": [],
56
+ "text": "The rel attribute for the link"
57
+ },
58
+ "attribute": "rel",
59
+ "reflect": false
60
+ },
61
+ "target": {
62
+ "type": "string",
63
+ "mutable": false,
64
+ "complexType": {
65
+ "original": "string",
66
+ "resolved": "string | undefined",
67
+ "references": {}
68
+ },
69
+ "required": false,
70
+ "optional": true,
71
+ "docs": {
72
+ "tags": [],
73
+ "text": "The target attribute for the link"
74
+ },
75
+ "attribute": "target",
76
+ "reflect": false
77
+ },
78
+ "linkTitle": {
79
+ "type": "string",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "string",
83
+ "resolved": "string | undefined",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": true,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "The title attribute for the link"
91
+ },
92
+ "attribute": "link-title",
93
+ "reflect": false
94
+ }
95
+ };
96
+ }
97
+ }
@@ -11,16 +11,16 @@ export class ZonosBadge {
11
11
  this.rounded = false;
12
12
  }
13
13
  render() {
14
- return (h(Host, { key: '0f502b63322730f508fd7c92f231573b1dfbfd6b', class: classes(['zonos--elements zonos--badge']), style: {
14
+ return (h(Host, { key: '1cece57ce37e04873f625d05ad5a0bea6368b46b', class: classes(['zonos--elements zonos--badge']), style: {
15
15
  '--font-family': zonosStoreFontFamily(),
16
- } }, h("div", { key: '4ee3f0b623067625ddd79336a1854f5ab796b3b1', class: classes([
16
+ } }, h("div", { key: '8caf3f2ffb7deda215c44ad0c6c0892936d526c2', class: classes([
17
17
  'zonos--badge-content',
18
18
  this.badgeColor,
19
19
  this.rounded && 'rounded',
20
20
  this.iconRight && 'icon-right',
21
21
  this.size,
22
22
  this.bold && 'bold',
23
- ]) }, this.icon, h("zonos-text", { key: 'e5bdf974408416811f7666fc453ca47db58fa43f' }, h("slot", { key: 'd953b60fefe2c25aea529b9de41938cfd96a285b' })))));
23
+ ]) }, this.icon, h("zonos-text", { key: 'fb8ac7f09675f9cfd829ecea54c61f5c699caa00' }, h("slot", { key: '978bc876e427d932662a0100043e04b105e9df8d' })))));
24
24
  }
25
25
  static get is() { return "zonos-badge"; }
26
26
  static get encapsulation() { return "shadow"; }
@@ -33,6 +33,7 @@
33
33
 
34
34
  :host {
35
35
  display: inline-flex;
36
+ border-radius: var(--border-radius, var(--amino-radius-10));
36
37
  }
37
38
  :host .zonos--spinner-wrapper {
38
39
  position: absolute;
@@ -69,6 +70,7 @@
69
70
  white-space: nowrap;
70
71
  padding: var(--amino-space-8) var(--amino-space-24);
71
72
  color: var(--color, var(--amino-gray-1200));
73
+ margin: 1px;
72
74
  /** Button size */
73
75
  }
74
76
  :host button.sm.no-background, :host button.md.no-background, :host button.lg.no-background {
@@ -58,13 +58,13 @@ export class ZonosButton {
58
58
  // only set theme for button to change text color if variant is standard and override background is set
59
59
  const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
60
60
  const borderStyle = getBorderRadius(this.borderStyle);
61
- const spinnerColor = buttonTheme === 'LIGHT' ? 'white' : 'black';
62
- return (h(Host, { key: '817142c1d229333aee0b38864788346d2749d3d1', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
61
+ const spinnerColor = buttonTheme === 'LIGHT' ? 'black' : 'white';
62
+ return (h(Host, { key: 'f3374eedd37ec6293260fba7b19d66aa013d3484', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
63
63
  '--background-color': overrideBackground,
64
64
  '--border-radius': borderStyle,
65
65
  '--color': color,
66
66
  '--font-family': zonosStoreFontFamily(),
67
- } }, h("button", { key: '04bff1f932154f54b4af51b2fac053d40efc354f', class: classes([
67
+ } }, h("button", { key: '352ce427591b20b8042dcd19ce159b77c1fc2faf', class: classes([
68
68
  this.hasIcon && 'has-icon',
69
69
  this.hasContent && 'has-content',
70
70
  this.noBackground && 'no-background',
@@ -77,7 +77,7 @@ export class ZonosButton {
77
77
  overrideBackground &&
78
78
  variant === 'standard' &&
79
79
  'override-background',
80
- ]), 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)));
80
+ ]), 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: '554cc1fd9bb58d833339ae21e837d586adc248c2', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
81
81
  }
82
82
  static get is() { return "zonos-button"; }
83
83
  static get encapsulation() { return "shadow"; }
@@ -12,9 +12,9 @@ export class ZonosCard {
12
12
  this.spacing = '24px';
13
13
  }
14
14
  render() {
15
- return (h(Host, { key: '8581e04d45e7061bff02485ad9a9a22920b5fe84', style: {
15
+ return (h(Host, { key: 'b350f7a592ea35c3b6beaf5eefaa2ab0208975dd', style: {
16
16
  '--font-family': zonosStoreFontFamily(),
17
- } }, 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: {
17
+ } }, h("div", { key: '125e8b550cd8f371e28a012536722f48402774f2', 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: '3cf038c62910ebac736ed1c37ecf1a490c8e1d0e' }), (this.footerActions || this.footerContent) && (h("footer", { class: "card-footer", style: {
18
18
  height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
19
19
  padding: this.spacing,
20
20
  } }, h("div", null, this.footerContent), h("h-stack", { spacing: 8 }, this.footerActions))))));
@@ -27,14 +27,14 @@ export class ZonosCheckbox {
27
27
  ? 'var(--amino-gray-800)'
28
28
  : 'var(--amino-gray-0)';
29
29
  const borderStyle = getBorderRadius(this.borderStyle, '4px');
30
- return (h(Host, { key: '86ab50028bec3f6a230b3a9492d06c1b2ce250fe', class: classes(['zonos--elements zonos--checkbox']), style: {
30
+ return (h(Host, { key: '5f8516f5933b739cc3f21d901e50dec1c761fa58', class: classes(['zonos--elements zonos--checkbox']), style: {
31
31
  '--background-color': backgroundColor,
32
32
  '--border-radius': borderStyle,
33
33
  '--font-family': zonosStoreFontFamily(),
34
34
  '--size': `${this.size}px`,
35
- } }, h("label", { key: '88e87bb45739707a4e3da6d378ba491899dad76c', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: 'c877ba4a2bd43aa67c394136ef4b3c71096e75aa', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
35
+ } }, h("label", { key: '6544f51a8c892d616123ab4194d069b055e3dc86', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: '958e35bf16be575230748fccdb1a3916942c3a30', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
36
36
  this.checkboxSelected.emit(e.target.checked);
37
- }, 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)))));
37
+ }, type: "checkbox" }), h("span", { key: '2c55e0a190b092dd083c433c35143e253910f54f', class: "checkmark-container" }, h("svg", { key: '0aa1f705b728055835159a399173a170aee4f7c0', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'd526bbafde4d4399be3f3a0a7cc87e92634d9548', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { size: this.fontSize }, this.label)))));
38
38
  }
39
39
  static get is() { return "zonos-checkbox"; }
40
40
  static get encapsulation() { return "shadow"; }
@@ -6,6 +6,7 @@ export class ZonosCollapse {
6
6
  this.collapsed = false;
7
7
  this.collapseSize = 0;
8
8
  this.height = this.el.scrollHeight;
9
+ this.iframe = null;
9
10
  }
10
11
  getElementHeight() {
11
12
  const fullHeight = `${this.height}px`;
@@ -17,12 +18,17 @@ export class ZonosCollapse {
17
18
  }
18
19
  componentDidRender() {
19
20
  var _a, _b, _c;
20
- (_c = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('iframe')) === null || _b === void 0 ? void 0 : _b.contentWindow) === null || _c === void 0 ? void 0 : _c.addEventListener('resize', () => {
21
- this.height = this.el.scrollHeight;
21
+ this.iframe =
22
+ ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('iframe')) || null;
23
+ (_c = (_b = this.iframe) === null || _b === void 0 ? void 0 : _b.contentWindow) === null || _c === void 0 ? void 0 : _c.addEventListener('resize', () => {
24
+ if (!this.iframe) {
25
+ // this should never happen since it's inside of resize callback
26
+ return;
27
+ }
28
+ this.height = parseFloat(getComputedStyle(this.iframe).height);
22
29
  });
23
30
  }
24
31
  render() {
25
- this.height = this.el.scrollHeight;
26
32
  if (!this.collapsed) {
27
33
  // wait for the collapse animation to finish, then set overflow to visible
28
34
  setTimeout(() => {
@@ -36,10 +42,10 @@ export class ZonosCollapse {
36
42
  // set overflow to hidden to prevent content from showing when collapsed
37
43
  this.el.style.overflow = 'hidden';
38
44
  }
39
- return (h(Host, { key: 'cbec79617b603172a6c3c41d29ee093f61eead92', class: 'zonos--elements zonos--collapse', style: {
45
+ return (h(Host, { key: '7ac8b898feadfb4424b3b48a98135cb18994f4e0', class: 'zonos--elements zonos--collapse', style: {
40
46
  '--font-family': zonosStoreFontFamily(),
41
47
  height: this.getElementHeight(),
42
- } }, h("div", { key: '6e72b98c155ee436bbaabce3d7b58294bb6ccc7a' }, h("iframe", { key: 'ef3306219530d635fa320099727a3574d5800285', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'a66b3d6d08a12f0c184a5c4294afdb2c340fe95d' }))));
48
+ } }, h("div", { key: '4a527ec319b59041196284d4d9a8f22b943a74e6' }, h("iframe", { key: '2fb51c16e13ca90561b1b1e6cab89d87e4a37a47', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: '6d7849f6c35be611446b0da36d657396e5ca3122' }))));
43
49
  }
44
50
  static get is() { return "zonos-collapse"; }
45
51
  static get encapsulation() { return "shadow"; }
@@ -95,7 +101,8 @@ export class ZonosCollapse {
95
101
  }
96
102
  static get states() {
97
103
  return {
98
- "height": {}
104
+ "height": {},
105
+ "iframe": {}
99
106
  };
100
107
  }
101
108
  static get elementRef() { return "el"; }
@@ -18,6 +18,11 @@ export class ZonosCountrySelect {
18
18
  this.handleOnClose = () => { };
19
19
  this.inputValue = '';
20
20
  }
21
+ componentDidRender() {
22
+ var _a, _b;
23
+ // focus the input on render
24
+ (_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-select-input')) === null || _b === void 0 ? void 0 : _b.focus();
25
+ }
21
26
  render() {
22
27
  const { shippingZoneCountries } = localizationStore;
23
28
  const countries = shippingZoneCountries
@@ -30,9 +35,9 @@ export class ZonosCountrySelect {
30
35
  const filteredCountries = this.inputValue
31
36
  ? fuseObject.map(country => country.item)
32
37
  : countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
33
- return (h(Host, { key: 'fb1115a06814daaf8ebb7d9e282fdd1bd944121f', class: "zonos--elements", style: {
38
+ return (h(Host, { key: '2b8e15643f92ac489706aff7623b1d1efdebce70', class: "zonos--elements", style: {
34
39
  '--font-family': zonosStoreFontFamily(),
35
- } }, h("div", { key: 'eb9eb7dba8f170c6190fd29e670b002ecb39a849', class: "zonos--country-select" }, h("zonos-v-stack", { key: '4667474f03efbad9fbb0ea4153d16b49a7f2803f', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'c2777f838d9d376878e1218868ed8df0d28dc5f2', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '1e41b3888bce97a94ff88c4b3b3389cc8d4de096', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: 'ba89ae931e2a0e564112d9989d8074674906a297', class: "zonos--country-select-content" }, filteredCountries.map(country => (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", { color: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
40
+ } }, h("div", { key: '06b0c7765d8144ca102c9033e74cf1edb14743ac', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'f2af99575f518acb753448f7cb1f7aecd790de9d', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '296b92c476439aace00f6817b452a3fd3e1d353d', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: 'd988b856392f88a66bcc3016ccf55107bda4a411', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '4376bec824141dd7d2dbfb84f465ac4a48e1d050', class: "zonos--country-select-content" }, filteredCountries.map(country => (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 })))))))));
36
41
  }
37
42
  static get is() { return "zonos-country-select"; }
38
43
  static get encapsulation() { return "shadow"; }
@@ -74,4 +79,5 @@ export class ZonosCountrySelect {
74
79
  "inputValue": {}
75
80
  };
76
81
  }
82
+ static get elementRef() { return "ele"; }
77
83
  }
@@ -1,14 +1,16 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { zonosStoreFontFamily } from "../../store/zonosStore";
3
+ import { formatStringWithLinks } from "../../utils/formatStringWithLinks";
3
4
  export class ZonosCustomMessage {
4
5
  constructor() {
5
6
  this.icon = '';
6
7
  this.message = '';
7
8
  }
8
9
  render() {
9
- return (h(Host, { key: '6c16aa29406415995c2289c2fe3d22dbe08fbd23', class: "zonos--elements", style: {
10
+ const messageWithLinks = formatStringWithLinks(this.message);
11
+ return (h(Host, { key: '73091a3267f0989e8820800054aebc75168dc5d6', class: "zonos--elements", style: {
10
12
  '--font-family': zonosStoreFontFamily(),
11
- } }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message", content: this.icon }), h("zonos-text", null, this.message))))));
13
+ } }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { innerHTML: messageWithLinks }))))));
12
14
  }
13
15
  static get is() { return "zonos-custom-message"; }
14
16
  static get encapsulation() { return "shadow"; }
@@ -48,7 +48,7 @@ export class ZonosDialog {
48
48
  document.body.style.overflow = 'auto';
49
49
  }
50
50
  const borderStyle = getBorderRadius(this.borderStyle);
51
- return (h(Host, { key: 'dd232b16db7f6a6216f91af19c8b735b7eb528c7', class: classes([
51
+ return (h(Host, { key: '3927d9cf0ebbd8b497a0ec42328c4392925d198a', class: classes([
52
52
  'zonos--elements',
53
53
  this.open && 'open',
54
54
  this.isLoading && 'is-loading',
@@ -59,10 +59,10 @@ export class ZonosDialog {
59
59
  '--font-family': zonosStoreFontFamily(),
60
60
  '--height': this.height || 'initial',
61
61
  '--width': this.width,
62
- } }, h("div", { key: '23751fcbfe7a51856589d45feb59ed51ca3f86fa', class: "zonos--backdrop" }), h("div", { key: '3f5af0c470ad69e68b978753ece8d2687c99ab7c', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'e137a76e1a3e2cfc6403628fe804eb23d1bb1282', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: '46e89cdfaffd1190f4916206deb452002f40f24f', class: classes([
62
+ } }, h("div", { key: 'df93af61bfd856db3a572cdb98f60a8dd5c5bb7d', class: "zonos--backdrop" }), h("div", { key: 'f306feb4858dff642fbfd731e5aad849a8f29941', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'b914ea2e54fb2af825008ae28e235c461dce67e9', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: '19219c0c8d167bbacec992ba10b1fe0f31a8b8f6', class: classes([
63
63
  'zonos--body',
64
64
  this.noBodyPadding && 'zonos--no-body-padding',
65
- ]) }, h("slot", { key: 'e8acb4a5e48ad4a0aeb057799f5abeb56eb8d1ea' })), this.footerRightAction && (h("div", { class: "zonos--footer" }, h("div", { class: "zonos--footer-right-action" }, this.footerRightAction)))))));
65
+ ]) }, h("slot", { key: '38f9b83418dacd47cc2395f253a32ff0a6723d54' })), this.footerRightAction && (h("div", { class: "zonos--footer" }, h("div", { class: "zonos--footer-right-action" }, this.footerRightAction)))))));
66
66
  }
67
67
  static get is() { return "zonos-dialog"; }
68
68
  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: 'c90288e341c50d113cc63d09e864ddfa346d55a1', class: "zonos--elements", style: {
19
+ return (h(Host, { key: 'd12676d6438941bb8d987826f68c1b72a7e02ccd', class: "zonos--elements", style: {
20
20
  '--font-family': zonosStoreFontFamily(),
21
- } }, h("div", { key: '4dabc3c9ab177e5545942c725490af64cb9608c3', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '95f111f3774a568ea44204858fe503fa7c1915f3', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'c2634e3b006f3d14c67ee78c0c9befdb21cecc72', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { color: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
21
+ } }, h("div", { key: '259eaa6a8ae682cc96c98eaaab574757285188b9', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '88bff024a5f678b00bf4edd7b2497177a986af4c', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'be1d87991dec9ac2a3b530a0cf9129b9e191781b', 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"; }
@@ -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: '5e97dd0219dde036eef02757f055354390b18c3d', class: classes(['zonos--elements zonos--logo']), style: {
13
+ return (h(Host, { key: 'b93db6ec62ecaacb3ded0ab07dd2f38ed488f8d1', 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: '44c720d0a7bf3cf5a6bd783f21c8493d3a53ec70', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
17
+ } }, h("img", { key: '026162477b24250e4204318fa3018b1cfd383ab5', 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"; }
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
8
8
  this.label = '';
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: '737dcae414b2538bf4c0b5c932a78acb9eeb1e93', class: "zonos--elements", style: {
11
+ return (h(Host, { key: 'd0882c22934d6f9635bd0b31af5703283cd0a1be', class: "zonos--elements", style: {
12
12
  '--font-family': zonosStoreFontFamily(),
13
- } }, h("zonos-v-stack", { key: '8cfde0f03e03ad011c8f8f4517c3b47ba8c03746', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '5c5044ad46e156ad4cde26df0bb57c6690a11e42', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'a10b9b48834c6eabd9d20f44b8c8dc4927d53bd1', type: "boldLabel" }, this.label), h("zonos-button", { key: '50d74c5e97f2c224a437fde48b6d2a30b14fc1fe', 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: 'd875d9cfddaf37f1ca0a2bb01a3ba3da10c2fda0' }))));
13
+ } }, h("zonos-v-stack", { key: '2e227c5bdeeeb0fa772847267007df5aea2e0824', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: 'c43b72c938069ff1a99a985b3b388a785f94d100', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'b1008e43ca022ca1e1b63a60ab5c347d1228396e', type: "boldLabel" }, this.label), h("zonos-button", { key: '4722586c58eac765ded4a7baeeca8eb58d44dd0a', 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: '36babf745ea5de00c82823520134b1dfcfc9d16d' }))));
14
14
  }
15
15
  static get is() { return "zonos-select-dialog-header"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -34,7 +34,7 @@ export class ZonosShippingRichRadio {
34
34
  return (h("div", { "aria-hidden": "true", class: classes([
35
35
  'zonos--shipping-rich-radio-item',
36
36
  selected && 'selected',
37
- ]), onClick: () => this.handleRichRadioSelect(item) }, h("input", { checked: selected, class: "zonos--shipping-rich-radio-input", name: "zonos--shipping-rich-radio", type: "radio", value: item.value }), h("div", { class: "zonos--shipping-info" }, h("div", { class: "zonos--shipping-detail" }, h("zonos-text", { class: "zonos--shipping-label", type: "label" }, item.label), (item.sublabel || item.caption) && (h("div", { class: "zonos--sub-detail" }, item.sublabel && (h("zonos-text", { textColor: "gray-800" }, item.sublabel)), item.caption && (h("zonos-text", { textColor: "gray-400" }, item.caption))))), h("zonos-text", { type: "semiBoldLabel" }, item.price))));
37
+ ]), onClick: () => this.handleRichRadioSelect(item) }, h("input", { checked: selected, class: "zonos--shipping-rich-radio-input", name: "zonos--shipping-rich-radio", type: "radio", value: item.value }), h("div", { class: "zonos--shipping-info" }, h("div", { class: "zonos--shipping-detail" }, h("zonos-text", { class: "zonos--shipping-label", type: "label" }, item.label), (item.sublabel || item.caption) && (h("div", { class: "zonos--sub-detail" }, item.sublabel && (h("zonos-text", { textColor: "gray-800" }, item.sublabel)), item.caption && (h("zonos-text", { textColor: "gray-600" }, item.caption))))), h("zonos-text", { type: "semiBoldLabel" }, item.price))));
38
38
  })));
39
39
  }
40
40
  static get is() { return "zonos-shipping-rich-radio"; }
@@ -7,10 +7,10 @@ export class ZonosTooltip {
7
7
  this.showTooltip = false;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '684561bebf9385c7e6bcca7de37e7ee5084c9692', class: "zonos--elements" }, h("div", { key: 'c116738f39d25b856b268ece410a33f91046c739', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '4073ed0766b4efaa0c25fa7febdbad4c42714dca' }), h("div", { key: '8c6b180577830aaaceb629819535dd930fc49e02', class: classes([
10
+ return (h(Host, { key: '4864150b0af4119fc7d87aec5af3c258fb27802d', class: "zonos--elements" }, h("div", { key: 'c11d3da431f9c4507bc58ec38d0b1ef21c99b584', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '0a92efb2e6c17f67c2feacbd17bbddd4fb63f7da' }), h("div", { key: '0ea54bfaf54a2f170044d77c2b555e5da37af8ae', class: classes([
11
11
  this.showTooltip && 'zonos--show-tooltip',
12
12
  'zonos--tooltip-content',
13
- ]) }, h("zonos-text", { key: '7c018a9d5a7db939b59624dcc77029a5a8d621af', color: "gray-0", size: "s", type: "boldLabel" }, this.label), h("zonos-text", { key: 'c1f09eaf9cb1084ecf47334903b9ca8b944502b7', color: "gray-0", size: "xs" }, this.subtitle)))));
13
+ ]) }, h("zonos-text", { key: '73c55a7318eb36760d2779691f9ea79d2c5bf8c7', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '1f4106f67fc468121d7fb7fbc0ee69363bb26186', 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: 'a26c7c4898b81deb569731adb63505ded3155fdf', style: {
10
+ return (h(Host, { key: 'a5d1a84d5b25d1a49abec676731eaf76f703e998', style: {
11
11
  '--font-family': zonosStoreFontFamily(),
12
- } }, h("div", { key: 'd4af21dc024bbd12b5240dff4f2689416ad4d808', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '298de42d875520fad5a720eedcf2b8664b39ae85' }))));
12
+ } }, h("div", { key: '456c8e1865a752dd258989888c45dfbdfd2c4f66', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '2d3260c6b74d3def822acb98733f70a97a79f3fa' }))));
13
13
  }
14
14
  static get is() { return "zonos-v-stack"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -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: 'cf376a9b1970bd04cdadf820112c081666c8bef2' }, "Hello, World! I'm ", this.getText());
13
+ return h("div", { key: '3b7429a0c03b00f0a80e15a94bebd08aedaafe51' }, "Hello, World! I'm ", this.getText());
14
14
  }
15
15
  static get is() { return "zonos-component"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -101,7 +101,6 @@ export class ZonosHello {
101
101
  this.reloadHelloData = async () => {
102
102
  await this.handleItemRestrictions();
103
103
  this.triggerShowPeekMessage();
104
- void this.displayCurrency();
105
104
  };
106
105
  this.handleProductCountChange = debounce(() => {
107
106
  const { productTitleElementSelector } = zonosStore.helloSettings;
@@ -124,6 +123,14 @@ export class ZonosHello {
124
123
  subtree: true,
125
124
  });
126
125
  };
126
+ this.watchPriceChange = () => {
127
+ const observer = new MutationObserver(() => void this.displayCurrency());
128
+ observer.observe(document.body, {
129
+ attributes: true,
130
+ childList: true,
131
+ subtree: true,
132
+ });
133
+ };
127
134
  this.updateHelloOnPageChange = () => {
128
135
  // If the product count changes on the same url (loading more products), update the peek message and item restrictions
129
136
  this.watchProductCountChange();
@@ -195,6 +202,7 @@ export class ZonosHello {
195
202
  if (zonosStore.loadedConfig) {
196
203
  this.helloRef.setAttribute('data-zonos-hello-loaded', '');
197
204
  this.updateHelloOnPageChange();
205
+ this.watchPriceChange();
198
206
  clearInterval(initInterval);
199
207
  }
200
208
  }, 100);
@@ -216,21 +224,28 @@ export class ZonosHello {
216
224
  * @returns string
217
225
  */
218
226
  async convertAndFormat(value) {
219
- currencyConvertAndFormat(value);
227
+ return currencyConvertAndFormat(value);
220
228
  }
221
229
  /**
222
230
  * This method will convert the currency and return the converted value
223
231
  * @returns number
224
232
  */
225
233
  async convert(value) {
226
- currencyConvert(value);
234
+ return currencyConvert(value);
227
235
  }
228
236
  /**
229
237
  * This method will format the currency and return the formatted string
230
238
  * @returns number
231
239
  */
232
240
  async format(value) {
233
- currencyFormat(value);
241
+ return currencyFormat(value);
242
+ }
243
+ /**
244
+ * This method show the hello dialog
245
+ * @returns void
246
+ */
247
+ async openHelloDialog(value) {
248
+ this.changeShowDialog(value);
234
249
  }
235
250
  handleResize() {
236
251
  debounce(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
@@ -267,7 +282,7 @@ export class ZonosHello {
267
282
  !!this.allRestrictedItems.length &&
268
283
  'zonos--hello-has-restrictions',
269
284
  ]), onClick: () => {
270
- this.changeShowDialog(!this.showDialog);
285
+ void this.changeShowDialog(!this.showDialog);
271
286
  }, onMouseEnter: () => this.enableShowPeekMessage(), onMouseLeave: () => (this.showPeekMessage = false), ref: el => el && (this.helloRef = el) }, h("zonos-text", { class: "zonos--hello-message" }, this.peekMessage), selectedCountryCode && (h("div", { class: "zonos--hello-country-flag-wrapper" }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode })))), h("div", { class: classes([
272
287
  'zonos--hello-dialog-wrapper',
273
288
  this.mobileLocationOverride &&
@@ -397,7 +412,7 @@ export class ZonosHello {
397
412
  },
398
413
  "convertAndFormat": {
399
414
  "complexType": {
400
- "signature": "(value: number) => Promise<void>",
415
+ "signature": "(value: number) => Promise<string>",
401
416
  "parameters": [{
402
417
  "name": "value",
403
418
  "type": "number",
@@ -409,7 +424,7 @@ export class ZonosHello {
409
424
  "id": "global::Promise"
410
425
  }
411
426
  },
412
- "return": "Promise<void>"
427
+ "return": "Promise<string>"
413
428
  },
414
429
  "docs": {
415
430
  "text": "This method will call convert and format, and return the converted and formatted string",
@@ -421,7 +436,7 @@ export class ZonosHello {
421
436
  },
422
437
  "convert": {
423
438
  "complexType": {
424
- "signature": "(value: number) => Promise<void>",
439
+ "signature": "(value: number) => Promise<number>",
425
440
  "parameters": [{
426
441
  "name": "value",
427
442
  "type": "number",
@@ -433,7 +448,7 @@ export class ZonosHello {
433
448
  "id": "global::Promise"
434
449
  }
435
450
  },
436
- "return": "Promise<void>"
451
+ "return": "Promise<number>"
437
452
  },
438
453
  "docs": {
439
454
  "text": "This method will convert the currency and return the converted value",
@@ -445,7 +460,7 @@ export class ZonosHello {
445
460
  },
446
461
  "format": {
447
462
  "complexType": {
448
- "signature": "(value: number) => Promise<void>",
463
+ "signature": "(value: number) => Promise<string>",
449
464
  "parameters": [{
450
465
  "name": "value",
451
466
  "type": "number",
@@ -457,7 +472,7 @@ export class ZonosHello {
457
472
  "id": "global::Promise"
458
473
  }
459
474
  },
460
- "return": "Promise<void>"
475
+ "return": "Promise<string>"
461
476
  },
462
477
  "docs": {
463
478
  "text": "This method will format the currency and return the formatted string",
@@ -466,6 +481,30 @@ export class ZonosHello {
466
481
  "text": "number"
467
482
  }]
468
483
  }
484
+ },
485
+ "openHelloDialog": {
486
+ "complexType": {
487
+ "signature": "(value: boolean) => Promise<void>",
488
+ "parameters": [{
489
+ "name": "value",
490
+ "type": "boolean",
491
+ "docs": ""
492
+ }],
493
+ "references": {
494
+ "Promise": {
495
+ "location": "global",
496
+ "id": "global::Promise"
497
+ }
498
+ },
499
+ "return": "Promise<void>"
500
+ },
501
+ "docs": {
502
+ "text": "This method show the hello dialog",
503
+ "tags": [{
504
+ "name": "returns",
505
+ "text": "void"
506
+ }]
507
+ }
469
508
  }
470
509
  };
471
510
  }
@@ -17,9 +17,9 @@ export class ZonosHelloDialogFooter {
17
17
  const primaryColor = (_a = this.appearanceSettings) === null || _a === void 0 ? void 0 : _a.colorPrimary;
18
18
  const footerTheme = primaryColor && isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
19
19
  const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
20
- return (h(Host, { key: 'a3a6ab0e4af4981cc83802be1433c3c41da58c19', class: "zonos--elements" }, h("div", { key: 'fdea45d1b4d83055a3d17918a5ae78f43a7e0042', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
20
+ return (h(Host, { key: 'f97688788d9f6d1a640f054a2a22dbae6955b83c', class: "zonos--elements" }, h("div", { key: '3539323f9044acef3890fc072bdd981e2495fc18', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
21
21
  '--primary-color': (_c = this.appearanceSettings) === null || _c === void 0 ? void 0 : _c.colorPrimary,
22
- } }, h("a", { key: '4d4e995052049238d4c522ff8501dddbe25e29d5', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '4ca16c024473660f74cfc7a3d506b8ba4ebf7362', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), h("div", { key: 'dd1da686f8345431c3805898f374e5fb22e27289', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'd5c34c75c5006710ff6d0426d43f07a5ade41827', buttonColor: "gray-1200", icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '43759ce87473b10e078f14dce529db502a5edd4d', buttonColor: "gray-1200", 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)))));
22
+ } }, h("a", { key: '5e30052240f87211c6f0092ef6a27c217f3ecefb', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'c60142bcd26086c2944ac3464885ca1f96e5cfbe', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), h("div", { key: '67297b4c557ee5b49a4406a459588f2924183195', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '9348bff826187730f36d191f7e01f516f2b9785c', buttonColor: "gray-1200", icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'ecf1a8639e8e92a07a0e774abb560de53c19587c', buttonColor: "gray-1200", 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)))));
23
23
  }
24
24
  static get is() { return "zonos-hello-dialog-footer"; }
25
25
  static get encapsulation() { return "shadow"; }