@zonos/elements 1.3.15-alpha.2 → 1.3.15

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 (415) hide show
  1. package/dist/cjs/RemoveIcon-6c79a2a1.js +5 -0
  2. package/dist/cjs/{cart-1b1d39af.js → cart-db549f04.js} +976 -138
  3. package/dist/cjs/containsNonLatinChars-2be5129b.js +24 -0
  4. package/dist/cjs/{getBorderRadius-c8cc2bb3.js → getBorderRadius-44b3eca1.js} +4 -6
  5. package/dist/cjs/index-654a6001.js +1361 -0
  6. package/dist/cjs/isCheckoutMobile-f491ca7c.js +8 -0
  7. package/dist/cjs/{isDarkColor-f5473002.js → isDarkColor-01f45d3f.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/{submitGtag-ab287a34.js → submitGtag-fd8acad5.js} +21 -2
  10. package/dist/cjs/zonos-address_8.cjs.entry.js +642 -0
  11. package/dist/cjs/zonos-badge_2.cjs.entry.js +9 -9
  12. package/dist/cjs/zonos-banner.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-button_3.cjs.entry.js +192 -0
  14. package/dist/cjs/zonos-card_2.cjs.entry.js +12 -12
  15. package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +144 -118
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +19 -18
  17. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
  20. package/dist/cjs/zonos-country-select_3.cjs.entry.js +14 -14
  21. package/dist/cjs/zonos-elements.cjs.js +10 -10
  22. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -9
  23. package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
  24. package/dist/cjs/zonos-input.cjs.entry.js +57 -0
  25. package/dist/cjs/zonos-link.cjs.entry.js +2 -2
  26. package/dist/cjs/zonos-logo.cjs.entry.js +4 -4
  27. package/dist/cjs/zonos-notification.cjs.entry.js +5 -5
  28. package/dist/cjs/zonos-payment.cjs.entry.js +7 -7
  29. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +7 -7
  30. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +8 -6
  31. package/dist/cjs/zonos-text.cjs.entry.js +3 -2
  32. package/dist/cjs/{zonosStore-aee974e0.js → zonosStore-d8bb0bda.js} +1 -1
  33. package/dist/collection/collection-manifest.json +5 -1
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.css +62 -0
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +80 -0
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.css +59 -0
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +148 -0
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.css +115 -0
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +429 -0
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +1 -1
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +2 -2
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +4 -4
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -3
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +9 -9
  46. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +5 -5
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +16 -16
  49. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +6 -4
  50. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +8 -8
  51. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +135 -20
  52. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +5 -5
  53. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +7 -7
  54. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
  55. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
  56. package/dist/collection/components/common/zonos-badge/zonos-badge.css +1 -1
  57. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  58. package/dist/collection/components/common/zonos-banner/zonos-banner.css +3 -3
  59. package/dist/collection/components/common/zonos-button/zonos-button.css +10 -9
  60. package/dist/collection/components/common/zonos-button/zonos-button.js +17 -8
  61. package/dist/collection/components/common/zonos-card/zonos-card.css +9 -9
  62. package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
  63. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +2 -1
  64. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +22 -4
  65. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +1 -1
  66. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  67. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  68. package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +5 -5
  69. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  70. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.css +1 -1
  71. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  72. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +6 -6
  73. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +6 -4
  74. package/dist/collection/components/common/zonos-input/zonos-input.css +176 -0
  75. package/dist/collection/components/common/zonos-input/zonos-input.js +193 -0
  76. package/dist/collection/components/common/zonos-language-select/zonos-language-select.css +4 -4
  77. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  78. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  79. package/dist/collection/components/common/zonos-notification/zonos-notification.css +3 -3
  80. package/dist/collection/components/common/zonos-notification/zonos-notification.js +2 -2
  81. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.css +1 -1
  82. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  83. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.css +2 -2
  84. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +4 -2
  85. package/dist/collection/components/common/zonos-text/zonos-text.js +1 -0
  86. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.css +1 -1
  87. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  88. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  89. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  90. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +18 -18
  91. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +10 -52
  92. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  93. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +4 -4
  94. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
  95. package/dist/collection/components/main/zonos-controller.js +2 -2
  96. package/dist/collection/components/store/checkout/stripe.js +153 -14
  97. package/dist/collection/components/store/translationStore/strings.arabic.js +36 -6
  98. package/dist/collection/components/store/translationStore/strings.base.js +36 -6
  99. package/dist/collection/components/store/translationStore/strings.chinese.js +36 -6
  100. package/dist/collection/components/store/translationStore/strings.danish.js +36 -6
  101. package/dist/collection/components/store/translationStore/strings.dutch.js +36 -6
  102. package/dist/collection/components/store/translationStore/strings.french.js +36 -6
  103. package/dist/collection/components/store/translationStore/strings.german.js +36 -6
  104. package/dist/collection/components/store/translationStore/strings.hebrew.js +36 -6
  105. package/dist/collection/components/store/translationStore/strings.indonesian.js +36 -6
  106. package/dist/collection/components/store/translationStore/strings.italian.js +36 -6
  107. package/dist/collection/components/store/translationStore/strings.japanese.js +36 -6
  108. package/dist/collection/components/store/translationStore/strings.korean.js +36 -6
  109. package/dist/collection/components/store/translationStore/strings.norwegian.js +36 -6
  110. package/dist/collection/components/store/translationStore/strings.polish.js +36 -6
  111. package/dist/collection/components/store/translationStore/strings.portuguese.js +36 -6
  112. package/dist/collection/components/store/translationStore/strings.russian.js +36 -6
  113. package/dist/collection/components/store/translationStore/strings.spanish.js +36 -6
  114. package/dist/collection/components/store/translationStore/strings.swedish.js +36 -6
  115. package/dist/collection/components/store/translationStore/strings.turkish.js +36 -6
  116. package/dist/collection/components/store/translationStore/strings.vietnamese.js +36 -6
  117. package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -2
  118. package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -71
  119. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.css +1 -1
  120. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +29 -5
  121. package/dist/collection/components/stripe/zonos-payment/zonos-payment.css +1 -1
  122. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  123. package/dist/collection/components/utils/checkout/buildTranslateRequestBody.js +98 -0
  124. package/dist/collection/components/utils/containsNonLatinChars.js +10 -8
  125. package/dist/collection/components/utils/getBorderRadius.js +3 -5
  126. package/dist/collection/styles/stripe/defaultVariable.js +2 -2
  127. package/dist/collection/types/checkout/TranslatedText.js +1 -0
  128. package/dist/collection/types/checkout/api/ValidateAddressRequest.js +1 -0
  129. package/dist/components/containsNonLatinChars.js +21 -0
  130. package/dist/components/getBorderRadius.js +3 -5
  131. package/dist/components/stripe.js +255 -4545
  132. package/dist/components/trackConversionEvent.js +1 -1
  133. package/dist/components/translationStore.js +5131 -0
  134. package/dist/components/zonos-address-display.d.ts +11 -0
  135. package/dist/components/zonos-address-display.js +6 -0
  136. package/dist/components/zonos-address-display2.js +64 -0
  137. package/dist/components/zonos-address-form.d.ts +11 -0
  138. package/dist/components/zonos-address-form.js +6 -0
  139. package/dist/components/zonos-address-form2.js +84 -0
  140. package/dist/components/zonos-address-update-dialog.d.ts +11 -0
  141. package/dist/components/zonos-address-update-dialog.js +6 -0
  142. package/dist/components/zonos-address-update-dialog2.js +264 -0
  143. package/dist/components/zonos-address2.js +4 -94
  144. package/dist/components/zonos-badge2.js +4 -4
  145. package/dist/components/zonos-banner2.js +1 -1
  146. package/dist/components/zonos-button2.js +18 -9
  147. package/dist/components/zonos-card2.js +4 -4
  148. package/dist/components/zonos-cart-items2.js +2 -2
  149. package/dist/components/zonos-cart-subtotal2.js +3 -2
  150. package/dist/components/zonos-checkbox2.js +15 -6
  151. package/dist/components/zonos-checkout-finish2.js +27 -7
  152. package/dist/components/zonos-checkout-footer2.js +3 -3
  153. package/dist/components/zonos-checkout-payment2.js +3 -2
  154. package/dist/components/zonos-checkout-progress-tabs2.js +6 -5
  155. package/dist/components/zonos-checkout.js +72 -42
  156. package/dist/components/zonos-collapse2.js +2 -2
  157. package/dist/components/zonos-component.js +1 -1
  158. package/dist/components/zonos-controller.js +2 -2
  159. package/dist/components/zonos-country-select2.js +3 -3
  160. package/dist/components/zonos-custom-message2.js +3 -3
  161. package/dist/components/zonos-customer-info2.js +171 -30
  162. package/dist/components/zonos-dialog2.js +7 -5
  163. package/dist/components/zonos-hello-dialog-footer2.js +3 -3
  164. package/dist/components/zonos-hello-dialog2.js +6 -5
  165. package/dist/components/zonos-hello.js +3 -2
  166. package/dist/components/zonos-input.d.ts +11 -0
  167. package/dist/components/zonos-input.js +6 -0
  168. package/dist/components/zonos-input2.js +78 -0
  169. package/dist/components/zonos-language-select2.js +5 -4
  170. package/dist/components/zonos-link-authentication2.js +13 -6
  171. package/dist/components/zonos-link.js +1 -1
  172. package/dist/components/zonos-logo.js +2 -2
  173. package/dist/components/zonos-notification2.js +3 -3
  174. package/dist/components/zonos-payment2.js +2 -2
  175. package/dist/components/zonos-review2.js +3 -2
  176. package/dist/components/zonos-select-dialog-header2.js +3 -3
  177. package/dist/components/zonos-shipping-rich-radio2.js +5 -3
  178. package/dist/components/zonos-shipping2.js +4 -3
  179. package/dist/components/zonos-text2.js +1 -0
  180. package/dist/components/zonos-tooltip2.js +3 -3
  181. package/dist/components/zonos-v-stack2.js +2 -2
  182. package/dist/esm/RemoveIcon-f6715b36.js +3 -0
  183. package/dist/esm/{cart-10bcd2e0.js → cart-462e89a6.js} +976 -139
  184. package/dist/esm/containsNonLatinChars-2d8810c3.js +21 -0
  185. package/dist/esm/{getBorderRadius-8129b0cb.js → getBorderRadius-567f1786.js} +4 -6
  186. package/dist/esm/index-e063389c.js +1328 -0
  187. package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
  188. package/dist/esm/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
  189. package/dist/esm/loader.js +3 -3
  190. package/dist/esm/{submitGtag-84886899.js → submitGtag-ac7c3c89.js} +21 -3
  191. package/dist/esm/zonos-address_8.entry.js +631 -0
  192. package/dist/esm/zonos-badge_2.entry.js +9 -9
  193. package/dist/esm/zonos-banner.entry.js +3 -3
  194. package/dist/esm/zonos-button_3.entry.js +186 -0
  195. package/dist/esm/zonos-card_2.entry.js +12 -12
  196. package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +140 -113
  197. package/dist/esm/zonos-checkout.entry.js +14 -13
  198. package/dist/esm/zonos-component.entry.js +2 -2
  199. package/dist/esm/zonos-controller.entry.js +6 -6
  200. package/dist/esm/zonos-country-flag.entry.js +5 -5
  201. package/dist/esm/zonos-country-select_3.entry.js +14 -14
  202. package/dist/esm/zonos-elements.js +11 -11
  203. package/dist/esm/zonos-hello-dialog.entry.js +9 -9
  204. package/dist/esm/zonos-hello.entry.js +6 -6
  205. package/dist/esm/zonos-input.entry.js +53 -0
  206. package/dist/esm/zonos-link.entry.js +2 -2
  207. package/dist/esm/zonos-logo.entry.js +4 -4
  208. package/dist/esm/zonos-notification.entry.js +5 -5
  209. package/dist/esm/zonos-payment.entry.js +7 -7
  210. package/dist/esm/zonos-select-dialog-header_2.entry.js +7 -7
  211. package/dist/esm/zonos-shipping-rich-radio.entry.js +8 -6
  212. package/dist/esm/zonos-text.entry.js +3 -2
  213. package/dist/esm/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
  214. package/dist/esm-es5/RemoveIcon-f6715b36.js +1 -0
  215. package/dist/esm-es5/cart-462e89a6.js +1 -0
  216. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
  217. package/dist/esm-es5/getBorderRadius-567f1786.js +1 -0
  218. package/dist/esm-es5/index-e063389c.js +2 -0
  219. package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
  220. package/dist/esm-es5/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
  221. package/dist/esm-es5/loader.js +1 -1
  222. package/dist/esm-es5/submitGtag-ac7c3c89.js +1 -0
  223. package/dist/esm-es5/zonos-address_8.entry.js +1 -0
  224. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  225. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  226. package/dist/esm-es5/zonos-button_3.entry.js +1 -0
  227. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  228. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -0
  229. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  230. package/dist/esm-es5/zonos-component.entry.js +1 -1
  231. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  232. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  233. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  234. package/dist/esm-es5/zonos-elements.js +1 -1
  235. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  236. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  237. package/dist/esm-es5/zonos-input.entry.js +1 -0
  238. package/dist/esm-es5/zonos-link.entry.js +1 -1
  239. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  240. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  241. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  242. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  243. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  244. package/dist/esm-es5/zonos-text.entry.js +1 -1
  245. package/dist/esm-es5/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
  246. package/dist/scripts/loadStripe.js +1 -1
  247. package/dist/scripts/loadZonos.js +1 -1
  248. package/dist/scripts/stripe.js +1 -1
  249. package/dist/scripts/zonos.js +1 -1
  250. package/dist/scripts/zonosBase.js +1 -1
  251. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.d.ts +12 -0
  252. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.d.ts +28 -0
  253. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.d.ts +96 -0
  254. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +22 -2
  255. package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
  256. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +0 -3
  257. package/dist/types/components/common/zonos-input/zonos-input.d.ts +35 -0
  258. package/dist/types/components/store/checkout/stripe.d.ts +25 -1
  259. package/dist/types/components/store/translationStore/strings.arabic.d.ts +35 -5
  260. package/dist/types/components/store/translationStore/strings.base.d.ts +35 -5
  261. package/dist/types/components/store/translationStore/strings.chinese.d.ts +35 -5
  262. package/dist/types/components/store/translationStore/strings.danish.d.ts +35 -5
  263. package/dist/types/components/store/translationStore/strings.dutch.d.ts +35 -5
  264. package/dist/types/components/store/translationStore/strings.french.d.ts +35 -5
  265. package/dist/types/components/store/translationStore/strings.german.d.ts +35 -5
  266. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +35 -5
  267. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +35 -5
  268. package/dist/types/components/store/translationStore/strings.italian.d.ts +35 -5
  269. package/dist/types/components/store/translationStore/strings.japanese.d.ts +35 -5
  270. package/dist/types/components/store/translationStore/strings.korean.d.ts +35 -5
  271. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +35 -5
  272. package/dist/types/components/store/translationStore/strings.polish.d.ts +35 -5
  273. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +35 -5
  274. package/dist/types/components/store/translationStore/strings.russian.d.ts +35 -5
  275. package/dist/types/components/store/translationStore/strings.spanish.d.ts +35 -5
  276. package/dist/types/components/store/translationStore/strings.swedish.d.ts +35 -5
  277. package/dist/types/components/store/translationStore/strings.turkish.d.ts +35 -5
  278. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +35 -5
  279. package/dist/types/components/store/translationStore.d.ts +1 -1
  280. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -10
  281. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +4 -0
  282. package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
  283. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
  284. package/dist/types/components/utils/checkout/buildTranslateRequestBody.d.ts +26 -0
  285. package/dist/types/components/utils/containsNonLatinChars.d.ts +1 -0
  286. package/dist/types/components/utils/getBorderRadius.d.ts +7 -1
  287. package/dist/types/components.d.ts +308 -6
  288. package/dist/types/types/checkout/TranslatedText.d.ts +23 -0
  289. package/dist/types/types/checkout/api/ValidateAddressRequest.d.ts +20 -0
  290. package/dist/types/types/generated/graphql.customer.types.d.ts +2 -0
  291. package/dist/types/types/generated/graphql.customer.types.ts +2 -0
  292. package/dist/zonos-elements/p-029f11dd.system.entry.js +1 -0
  293. package/dist/zonos-elements/{p-2ee0d779.entry.js → p-094c0ee8.entry.js} +1 -1
  294. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  295. package/dist/zonos-elements/p-11504442.entry.js +1 -0
  296. package/dist/zonos-elements/p-11bef836.system.entry.js +1 -0
  297. package/dist/zonos-elements/{p-bc3a0f7c.entry.js → p-11f1b78c.entry.js} +1 -1
  298. package/dist/zonos-elements/p-13ddaf31.js +2 -0
  299. package/dist/zonos-elements/p-154aaf95.system.js +1 -0
  300. package/dist/zonos-elements/p-163ff5b5.system.js +2 -0
  301. package/dist/zonos-elements/{p-32b4e9c3.entry.js → p-1e934274.entry.js} +1 -1
  302. package/dist/zonos-elements/p-20582e58.system.entry.js +1 -0
  303. package/dist/zonos-elements/p-2439c82f.system.entry.js +1 -0
  304. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  305. package/dist/zonos-elements/p-321226b0.entry.js +1 -0
  306. package/dist/zonos-elements/p-3221530d.system.entry.js +1 -0
  307. package/dist/zonos-elements/{p-97534044.entry.js → p-32d27535.entry.js} +1 -1
  308. package/dist/zonos-elements/p-3d10866d.entry.js +1 -0
  309. package/dist/zonos-elements/{p-1a5f8df7.entry.js → p-3d8667a7.entry.js} +1 -1
  310. package/dist/zonos-elements/p-3f05d130.system.entry.js +1 -0
  311. package/dist/zonos-elements/p-430eefd4.entry.js +1 -0
  312. package/dist/zonos-elements/p-49825866.system.entry.js +1 -0
  313. package/dist/zonos-elements/p-5525b740.entry.js +1 -0
  314. package/dist/zonos-elements/p-578f0aad.system.js +1 -0
  315. package/dist/zonos-elements/p-58a8ef6c.entry.js +1 -0
  316. package/dist/zonos-elements/p-5d993965.js +1 -0
  317. package/dist/zonos-elements/{p-262b8e1e.system.entry.js → p-5f9c066d.system.entry.js} +1 -1
  318. package/dist/zonos-elements/p-60e262f0.system.entry.js +1 -0
  319. package/dist/zonos-elements/p-64b594f4.js +1 -0
  320. package/dist/zonos-elements/p-66471df6.entry.js +1 -0
  321. package/dist/zonos-elements/{p-95c864ca.system.entry.js → p-679877b1.system.entry.js} +1 -1
  322. package/dist/zonos-elements/{p-fc4da55c.system.js → p-771fbeb3.system.js} +1 -1
  323. package/dist/zonos-elements/p-79f3c4f5.system.js +1 -0
  324. package/dist/zonos-elements/{p-e1ac5b2a.system.entry.js → p-80d78980.system.entry.js} +1 -1
  325. package/dist/zonos-elements/p-81a54668.js +1 -0
  326. package/dist/zonos-elements/p-83cc2936.js +1 -0
  327. package/dist/zonos-elements/{p-520e8e63.system.js → p-87badea9.system.js} +1 -1
  328. package/dist/zonos-elements/p-8a61a04f.system.entry.js +1 -0
  329. package/dist/zonos-elements/p-8b32f560.system.entry.js +1 -0
  330. package/dist/zonos-elements/{p-d01576d7.js → p-909a331c.js} +1 -1
  331. package/dist/zonos-elements/p-94b15a5e.system.entry.js +1 -0
  332. package/dist/zonos-elements/p-9a45fae5.system.entry.js +1 -0
  333. package/dist/zonos-elements/{p-24fee841.entry.js → p-9ec93319.entry.js} +1 -1
  334. package/dist/zonos-elements/p-a6d7ac46.js +1 -0
  335. package/dist/zonos-elements/p-a6eeb4bd.system.entry.js +1 -0
  336. package/dist/zonos-elements/p-a93f2e84.entry.js +1 -0
  337. package/dist/zonos-elements/p-aed0098c.system.js +1 -0
  338. package/dist/zonos-elements/p-b19d51e0.entry.js +1 -0
  339. package/dist/zonos-elements/{p-46f9c93e.system.entry.js → p-b9652402.system.entry.js} +1 -1
  340. package/dist/zonos-elements/{p-13b55282.entry.js → p-baee62a4.entry.js} +1 -1
  341. package/dist/zonos-elements/{p-eff12c31.system.entry.js → p-bf32179a.system.entry.js} +1 -1
  342. package/dist/zonos-elements/p-cd1cc224.entry.js +1 -0
  343. package/dist/zonos-elements/p-d1b63cec.system.entry.js +1 -0
  344. package/dist/zonos-elements/p-d6b103d5.system.js +1 -0
  345. package/dist/zonos-elements/{p-376bdf70.entry.js → p-da6767d8.entry.js} +1 -1
  346. package/dist/zonos-elements/p-dde1383b.entry.js +1 -0
  347. package/dist/zonos-elements/p-df192668.system.js +1 -0
  348. package/dist/zonos-elements/{p-70ede197.system.entry.js → p-df24d548.system.entry.js} +1 -1
  349. package/dist/zonos-elements/{p-6743734f.entry.js → p-e7b4b756.entry.js} +1 -1
  350. package/dist/zonos-elements/{p-d41b5762.js → p-f1962041.js} +1 -1
  351. package/dist/zonos-elements/p-f3d3c754.system.entry.js +1 -0
  352. package/dist/zonos-elements/p-f79682b5.entry.js +1 -0
  353. package/dist/zonos-elements/zonos-elements.css +3 -3
  354. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  355. package/dist/zonos-elements/zonos-elements.js +1 -1
  356. package/package.json +3 -2
  357. package/dist/cjs/index-3b4816ef.js +0 -2088
  358. package/dist/cjs/sendErrorLog-29e50f7e.js +0 -29
  359. package/dist/cjs/zonos-address_4.cjs.entry.js +0 -388
  360. package/dist/cjs/zonos-button_2.cjs.entry.js +0 -152
  361. package/dist/cjs/zonos-icon.cjs.entry.js +0 -39
  362. package/dist/components/sendErrorLog.js +0 -21
  363. package/dist/esm/index-0e31d804.js +0 -2055
  364. package/dist/esm/sendErrorLog-8642e94a.js +0 -26
  365. package/dist/esm/zonos-address_4.entry.js +0 -381
  366. package/dist/esm/zonos-button_2.entry.js +0 -147
  367. package/dist/esm/zonos-icon.entry.js +0 -35
  368. package/dist/esm-es5/cart-10bcd2e0.js +0 -1
  369. package/dist/esm-es5/getBorderRadius-8129b0cb.js +0 -1
  370. package/dist/esm-es5/index-0e31d804.js +0 -2
  371. package/dist/esm-es5/sendErrorLog-8642e94a.js +0 -1
  372. package/dist/esm-es5/submitGtag-84886899.js +0 -1
  373. package/dist/esm-es5/zonos-address_4.entry.js +0 -1
  374. package/dist/esm-es5/zonos-button_2.entry.js +0 -1
  375. package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
  376. package/dist/esm-es5/zonos-icon.entry.js +0 -1
  377. package/dist/scripts/insertTranslations.js +0 -1
  378. package/dist/zonos-elements/p-066b5ca3.entry.js +0 -1
  379. package/dist/zonos-elements/p-0a0d45e9.system.entry.js +0 -1
  380. package/dist/zonos-elements/p-2244534c.js +0 -2
  381. package/dist/zonos-elements/p-2693da50.system.entry.js +0 -1
  382. package/dist/zonos-elements/p-2825570c.system.js +0 -2
  383. package/dist/zonos-elements/p-33abdb30.js +0 -1
  384. package/dist/zonos-elements/p-450942a3.system.js +0 -1
  385. package/dist/zonos-elements/p-46b4010c.entry.js +0 -1
  386. package/dist/zonos-elements/p-509717bc.system.entry.js +0 -1
  387. package/dist/zonos-elements/p-5ca09163.entry.js +0 -1
  388. package/dist/zonos-elements/p-5ff27485.js +0 -1
  389. package/dist/zonos-elements/p-6f5761e8.js +0 -1
  390. package/dist/zonos-elements/p-6fb15797.system.entry.js +0 -1
  391. package/dist/zonos-elements/p-73acb3eb.system.entry.js +0 -1
  392. package/dist/zonos-elements/p-7432179a.system.entry.js +0 -1
  393. package/dist/zonos-elements/p-8126011d.entry.js +0 -1
  394. package/dist/zonos-elements/p-8b44e558.system.js +0 -1
  395. package/dist/zonos-elements/p-8c568b87.entry.js +0 -1
  396. package/dist/zonos-elements/p-92d85125.system.entry.js +0 -1
  397. package/dist/zonos-elements/p-9b385237.entry.js +0 -1
  398. package/dist/zonos-elements/p-9fc92940.entry.js +0 -1
  399. package/dist/zonos-elements/p-a6bbf6de.system.entry.js +0 -1
  400. package/dist/zonos-elements/p-ad0a2581.entry.js +0 -1
  401. package/dist/zonos-elements/p-b4c3dcda.entry.js +0 -1
  402. package/dist/zonos-elements/p-b8e8330b.system.js +0 -1
  403. package/dist/zonos-elements/p-be022d8e.entry.js +0 -1
  404. package/dist/zonos-elements/p-c6170bec.system.js +0 -1
  405. package/dist/zonos-elements/p-c9e137e1.system.entry.js +0 -1
  406. package/dist/zonos-elements/p-d0d78094.system.entry.js +0 -1
  407. package/dist/zonos-elements/p-d1ba7e52.system.entry.js +0 -1
  408. package/dist/zonos-elements/p-d29895ed.system.entry.js +0 -1
  409. package/dist/zonos-elements/p-dac861bb.entry.js +0 -1
  410. package/dist/zonos-elements/p-e010f227.system.entry.js +0 -1
  411. package/dist/zonos-elements/p-e703c902.entry.js +0 -1
  412. package/dist/zonos-elements/p-e8a41797.system.entry.js +0 -1
  413. package/dist/zonos-elements/p-ed2e94d2.js +0 -1
  414. package/dist/zonos-elements/p-f2b60329.system.entry.js +0 -1
  415. package/dist/zonos-elements/p-f4c38bfc.system.js +0 -1
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ZonosAddressDisplay extends Components.ZonosAddressDisplay, HTMLElement {}
4
+ export const ZonosAddressDisplay: {
5
+ prototype: ZonosAddressDisplay;
6
+ new (): ZonosAddressDisplay;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { Z as ZonosAddressDisplay$1, d as defineCustomElement$1 } from './zonos-address-display2.js';
2
+
3
+ const ZonosAddressDisplay = ZonosAddressDisplay$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { ZonosAddressDisplay, defineCustomElement };
@@ -0,0 +1,64 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { a as localizationStore } from './stripe.js';
3
+ import { a as translate } from './translationStore.js';
4
+ import { i as isTextContainsNonLatinChars } from './containsNonLatinChars.js';
5
+ import { d as defineCustomElement$2 } from './zonos-country-flag2.js';
6
+ import { d as defineCustomElement$1 } from './zonos-text2.js';
7
+
8
+ const zonosAddressDisplayCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:\", \";color:var(--amino-gray-1200);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}";
9
+ const ZonosAddressDisplayStyle0 = zonosAddressDisplayCss;
10
+
11
+ const ZonosAddressDisplay = /*@__PURE__*/ proxyCustomElement(class ZonosAddressDisplay extends HTMLElement {
12
+ constructor() {
13
+ super();
14
+ this.__registerHost();
15
+ this.__attachShadow();
16
+ this.currentAddress = undefined;
17
+ this.addressType = undefined;
18
+ }
19
+ render() {
20
+ var _a;
21
+ const { city, country, email, line1, line2, name, phone, postal_code, state, } = this.currentAddress;
22
+ const shippingZoneCountry = (_a = localizationStore.shippingZoneCountries) === null || _a === void 0 ? void 0 : _a[country];
23
+ const renderEnteredInfoText = ({ bold, content, }) => {
24
+ const textColor = isTextContainsNonLatinChars(content)
25
+ ? 'red-600'
26
+ : 'gray-1200';
27
+ return (h("zonos-text", { textColor: textColor, type: bold ? 'boldLabel' : 'body' }, content));
28
+ };
29
+ return (h(Host, { class: "zonos--address-form zonos--elements" }, h("div", { class: "zonos--title" }, h("zonos-text", { textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
30
+ ? translate('Shipping')
31
+ : translate('Billing'))), h("div", { class: "zonos--address-group" }, name && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), shippingZoneCountry && (h("div", { class: "zonos--address-line" }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: shippingZoneCountry.code }), ' ', renderEnteredInfoText({
32
+ content: shippingZoneCountry.displayName,
33
+ }))))));
34
+ }
35
+ static get style() { return ZonosAddressDisplayStyle0; }
36
+ }, [1, "zonos-address-display", {
37
+ "currentAddress": [16],
38
+ "addressType": [1, "address-type"]
39
+ }]);
40
+ function defineCustomElement() {
41
+ if (typeof customElements === "undefined") {
42
+ return;
43
+ }
44
+ const components = ["zonos-address-display", "zonos-country-flag", "zonos-text"];
45
+ components.forEach(tagName => { switch (tagName) {
46
+ case "zonos-address-display":
47
+ if (!customElements.get(tagName)) {
48
+ customElements.define(tagName, ZonosAddressDisplay);
49
+ }
50
+ break;
51
+ case "zonos-country-flag":
52
+ if (!customElements.get(tagName)) {
53
+ defineCustomElement$2();
54
+ }
55
+ break;
56
+ case "zonos-text":
57
+ if (!customElements.get(tagName)) {
58
+ defineCustomElement$1();
59
+ }
60
+ break;
61
+ } });
62
+ }
63
+
64
+ export { ZonosAddressDisplay as Z, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ZonosAddressForm extends Components.ZonosAddressForm, HTMLElement {}
4
+ export const ZonosAddressForm: {
5
+ prototype: ZonosAddressForm;
6
+ new (): ZonosAddressForm;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { Z as ZonosAddressForm$1, d as defineCustomElement$1 } from './zonos-address-form2.js';
2
+
3
+ const ZonosAddressForm = ZonosAddressForm$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { ZonosAddressForm, defineCustomElement };
@@ -0,0 +1,84 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { a as translate } from './translationStore.js';
3
+ import { i as isTextContainsNonLatinChars } from './containsNonLatinChars.js';
4
+ import { d as defineCustomElement$2 } from './zonos-input2.js';
5
+ import { d as defineCustomElement$1 } from './zonos-text2.js';
6
+
7
+ const zonosAddressFormCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";
8
+ const ZonosAddressFormStyle0 = zonosAddressFormCss;
9
+
10
+ const ZonosAddressForm = /*@__PURE__*/ proxyCustomElement(class ZonosAddressForm extends HTMLElement {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ this.addressChange = createEvent(this, "addressChange", 7);
16
+ this.onInputChange = ({ key, value, }) => {
17
+ this.addressChange.emit(Object.assign(Object.assign({}, this.localAddress), { [key]: value }));
18
+ };
19
+ this.currentAddress = undefined;
20
+ this.translatedAddress = undefined;
21
+ this.addressType = undefined;
22
+ this.localAddress = this.currentAddress;
23
+ }
24
+ watchCurrentAddress() {
25
+ var _a, _b, _c, _d, _e, _f;
26
+ const { city, line1, line2, name, postal_code, state } = this.currentAddress;
27
+ // Update the local address when the current address changes
28
+ // If translated address is available, use that instead
29
+ this.localAddress = Object.assign(Object.assign({}, this.currentAddress), { city: ((_a = this.translatedAddress.city) === null || _a === void 0 ? void 0 : _a[city]) || city, line1: ((_b = this.translatedAddress.line1) === null || _b === void 0 ? void 0 : _b[line1]) || line1, line2: ((_c = this.translatedAddress.line2) === null || _c === void 0 ? void 0 : _c[line2]) || line2, name: ((_d = this.translatedAddress.name) === null || _d === void 0 ? void 0 : _d[name]) || name, postal_code: ((_e = this.translatedAddress.postal_code) === null || _e === void 0 ? void 0 : _e[postal_code]) || postal_code, state: ((_f = this.translatedAddress.state) === null || _f === void 0 ? void 0 : _f[state]) || state });
30
+ }
31
+ componentWillLoad() {
32
+ this.watchCurrentAddress();
33
+ }
34
+ render() {
35
+ const { city, country, line1, line2, name, phone, postal_code, state } = this.localAddress;
36
+ const firstName = name.split(' ')[0] || '';
37
+ const lastName = name.split(' ')[1] || '';
38
+ return (h(Host, { key: '9c1ee87200d1f90e9dfac58c49aabba1777373a9', class: "zonos--address-form zonos--elements" }, h("div", { key: 'eec3416268ff2324fd751408552705086905423d', class: "zonos--title" }, h("zonos-text", { key: 'a4c254f78420dcfc712e1a83b20dd3ac9e64c460', textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
39
+ ? translate('Shipping')
40
+ : translate('Billing'))), h("div", { key: 'b8109545d282fb8c06a2e791c30088018d6ffec0', class: "zonos--address-group" }, h("div", { key: '833a395984cd75242e5d97697fd6566f11932d1b', class: "zonos--contact" }, h("zonos-text", { key: 'e60f574e95162aabf6465b878fc9b16c708e8029', type: "label" }, translate('Contact')), h("zonos-input", { key: '24cd24a362a1bbc76d0c91718c48ae32baa20ae6', class: "zonos--form-email", inputLabel: translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), h("div", { key: '84e64ef44eb3b39ac7ab542e07d7a52a95377cae', class: "zonos--name zonos--address-row" }, h("zonos-input", { key: '26621aca0d57a7fee743874b8d11af5f58c91b69', class: "zonos--form-first-name", inputLabel: translate('First name'), inputValue: firstName, isError: isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
41
+ key: 'name',
42
+ value: `${e.detail} ${lastName}`,
43
+ }) }), h("zonos-input", { key: '01e3e5038b4a4311dd5874a1213f936451dc300d', class: "zonos--form-last-name", inputLabel: translate('Last name'), inputValue: lastName, isError: isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
44
+ key: 'name',
45
+ value: `${firstName} ${e.detail}`,
46
+ }) }))), h("div", { key: 'eb42dece28082ff16a453110b3208de5b44b9fdb', class: "zonos--address" }, h("zonos-text", { key: '3557122c716533be7b36a8bd395ea616a7061665', type: "label" }, translate('Address')), h("zonos-input", { key: 'bcc7d84d530f2f3a10537117eb6ef143df7cc8e2', class: "zonos--form-country", inputLabel: translate('Country'), inputValue: country, isDisabled: true }), h("zonos-input", { key: '6ce78e25151a129b69b501cf768604134a395e85', class: "zonos--form-line1", inputLabel: translate('Address line 1'), inputValue: line1, isError: isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), h("zonos-input", { key: '6f7a18010e2d8131327154a31ba58544df56768c', class: "zonos--form-line2", inputLabel: translate('Address line 2'), inputValue: line2, isError: isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), h("div", { key: '48afbf7a3cbd26fddfea4f2799005a51b1c3d3c6', class: "zonos--address-row" }, h("zonos-input", { key: '6decf8c430d8d25b2c555b110009da74e0ac9e5f', class: "zonos--form-city", inputLabel: translate('City'), inputValue: city, isError: isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), h("zonos-input", { key: '065e1be213d3cfec7749ab32890f96b0b484a25a', class: "zonos--form-state", inputLabel: translate('State/Province'), inputValue: state, isError: isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), h("zonos-input", { key: 'a69244bf84c9fd007c9ad4aad2b6cc6d44420775', class: "zonos--form-postal-code", inputLabel: translate('Postal code'), inputValue: postal_code, isError: isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), h("zonos-input", { key: '0bcc89de1ecc4aae8a69d74eff42dfd117ada40b', class: "zonos--form-phone", inputLabel: translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
47
+ }
48
+ static get watchers() { return {
49
+ "translatedAddress": ["watchCurrentAddress"]
50
+ }; }
51
+ static get style() { return ZonosAddressFormStyle0; }
52
+ }, [1, "zonos-address-form", {
53
+ "currentAddress": [16],
54
+ "translatedAddress": [16],
55
+ "addressType": [1, "address-type"],
56
+ "localAddress": [32]
57
+ }, undefined, {
58
+ "translatedAddress": ["watchCurrentAddress"]
59
+ }]);
60
+ function defineCustomElement() {
61
+ if (typeof customElements === "undefined") {
62
+ return;
63
+ }
64
+ const components = ["zonos-address-form", "zonos-input", "zonos-text"];
65
+ components.forEach(tagName => { switch (tagName) {
66
+ case "zonos-address-form":
67
+ if (!customElements.get(tagName)) {
68
+ customElements.define(tagName, ZonosAddressForm);
69
+ }
70
+ break;
71
+ case "zonos-input":
72
+ if (!customElements.get(tagName)) {
73
+ defineCustomElement$2();
74
+ }
75
+ break;
76
+ case "zonos-text":
77
+ if (!customElements.get(tagName)) {
78
+ defineCustomElement$1();
79
+ }
80
+ break;
81
+ } });
82
+ }
83
+
84
+ export { ZonosAddressForm as Z, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ZonosAddressUpdateDialog extends Components.ZonosAddressUpdateDialog, HTMLElement {}
4
+ export const ZonosAddressUpdateDialog: {
5
+ prototype: ZonosAddressUpdateDialog;
6
+ new (): ZonosAddressUpdateDialog;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { Z as ZonosAddressUpdateDialog$1, d as defineCustomElement$1 } from './zonos-address-update-dialog2.js';
2
+
3
+ const ZonosAddressUpdateDialog = ZonosAddressUpdateDialog$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { ZonosAddressUpdateDialog, defineCustomElement };
@@ -0,0 +1,264 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { a as translate } from './translationStore.js';
3
+ import { z as zonosStore } from './zonosStore.js';
4
+ import { c as classes } from './classes.js';
5
+ import { c as containsNonLatinChars } from './containsNonLatinChars.js';
6
+ import { d as defineCustomElement$9 } from './zonos-address-display2.js';
7
+ import { d as defineCustomElement$8 } from './zonos-address-form2.js';
8
+ import { d as defineCustomElement$7 } from './zonos-button2.js';
9
+ import { d as defineCustomElement$6 } from './zonos-country-flag2.js';
10
+ import { d as defineCustomElement$5 } from './zonos-dialog2.js';
11
+ import { d as defineCustomElement$4 } from './zonos-icon2.js';
12
+ import { d as defineCustomElement$3 } from './zonos-input2.js';
13
+ import { d as defineCustomElement$2 } from './zonos-spinner2.js';
14
+ import { d as defineCustomElement$1 } from './zonos-text2.js';
15
+
16
+ const RemoveIcon = `<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
17
+
18
+ const zonosAddressUpdateDialogCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--amino-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--amino-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--amino-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";
19
+ const ZonosAddressUpdateDialogStyle0 = zonosAddressUpdateDialogCss;
20
+
21
+ const ZonosAddressUpdateDialog = /*@__PURE__*/ proxyCustomElement(class ZonosAddressUpdateDialog extends HTMLElement {
22
+ constructor() {
23
+ super();
24
+ this.__registerHost();
25
+ this.__attachShadow();
26
+ this.closeDialog = createEvent(this, "closeDialog", 7);
27
+ this.continueClicked = createEvent(this, "continueClicked", 7);
28
+ /**
29
+ * handler for close button click
30
+ */
31
+ this.closeDialogHandler = () => {
32
+ this.closeDialog.emit();
33
+ };
34
+ /**
35
+ * Extract value from translated object
36
+ */
37
+ this.getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
38
+ var _a, _b, _c, _d, _e, _f;
39
+ const { city, line1, line2, name, postal_code, state } = currentAddress;
40
+ return {
41
+ city: ((_a = translatedAddress.city) === null || _a === void 0 ? void 0 : _a[city]) || city,
42
+ line1: ((_b = translatedAddress.line1) === null || _b === void 0 ? void 0 : _b[line1]) || line1,
43
+ line2: ((_c = translatedAddress.line2) === null || _c === void 0 ? void 0 : _c[line2]) || line2,
44
+ name: ((_d = translatedAddress.name) === null || _d === void 0 ? void 0 : _d[name]) || name,
45
+ postal_code: ((_e = translatedAddress.postal_code) === null || _e === void 0 ? void 0 : _e[postal_code]) || postal_code,
46
+ state: ((_f = translatedAddress.state) === null || _f === void 0 ? void 0 : _f[state]) || state,
47
+ };
48
+ };
49
+ /**
50
+ * handler for continue button click
51
+ */
52
+ this.continueClickHandler = async () => {
53
+ var _a, _b, _c;
54
+ // set spinner for the continue button
55
+ this.continueLoading = true;
56
+ const translatedBillingAddress = this.billingAddress
57
+ ? this.getTranslatedAddress({
58
+ currentAddress: this.billingAddress,
59
+ translatedAddress: this.translatedBillingAddressState,
60
+ })
61
+ : null;
62
+ const translatedShippingAddress = this.getTranslatedAddress({
63
+ currentAddress: this.shippingAddress,
64
+ translatedAddress: this.translatedShippingAddressState,
65
+ });
66
+ // check to see if there are still non-latin characters in the translated address
67
+ const shippingNonlatinChars = containsNonLatinChars(Object.assign(Object.assign({}, translatedShippingAddress), { country: this.shippingAddress.country }));
68
+ // get list of non-latin characters field in the billing address
69
+ const billingNonLatinChars = translatedBillingAddress &&
70
+ this.billingAddress &&
71
+ containsNonLatinChars(Object.assign(Object.assign({}, translatedBillingAddress), { country: this.billingAddress.country }));
72
+ const shippingHasNonLatinChars = !!Object.keys(shippingNonlatinChars)
73
+ .length;
74
+ const billingHasNonLatinChars = !!billingNonLatinChars && !!Object.keys(billingNonLatinChars).length;
75
+ // if there are non-latin characters in the translated address, scroll to the error input so user can see and fix it
76
+ if (shippingHasNonLatinChars || billingHasNonLatinChars) {
77
+ // get scroll top of the first input has "has-error" class
78
+ const addressForms = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('zonos-address-form');
79
+ const shippingAddressForm = addressForms === null || addressForms === void 0 ? void 0 : addressForms[0];
80
+ const billingAddressForm = addressForms === null || addressForms === void 0 ? void 0 : addressForms[1];
81
+ const errorInput = ((_b = shippingAddressForm === null || shippingAddressForm === void 0 ? void 0 : shippingAddressForm.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.has-error')) ||
82
+ ((_c = billingAddressForm === null || billingAddressForm === void 0 ? void 0 : billingAddressForm.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.has-error'));
83
+ // scroll to the first error input
84
+ if (errorInput) {
85
+ errorInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
86
+ }
87
+ this.continueLoading = false;
88
+ return;
89
+ }
90
+ // Submit the translated address to the parent component
91
+ this.continueClicked.emit({
92
+ billingAddress: translatedBillingAddress,
93
+ shippingAddress: translatedShippingAddress,
94
+ });
95
+ };
96
+ /**
97
+ * This function builds a state object for a translated address.
98
+ * It takes the current and translated address as input and returns an object where each field is an object itself.
99
+ * The key of each field's object is the current address's field value and the value is the corresponding translated address's field value.
100
+ *
101
+ * @param {Object} params - The parameters for the function.
102
+ * @param {EnteredInfo} params.currentAddress - The current address information.
103
+ * @param {EnteredInfo} params.translatedAddress - The translated address information.
104
+ *
105
+ */
106
+ this.buildTranslateAddressState = ({ currentAddress, translatedAddress, }) => {
107
+ const { city, line1, line2, name, postal_code, state } = currentAddress;
108
+ return {
109
+ city: {
110
+ [city]: translatedAddress.city,
111
+ },
112
+ line1: {
113
+ [line1]: translatedAddress.line1,
114
+ },
115
+ line2: {
116
+ [line2]: translatedAddress.line2,
117
+ },
118
+ name: {
119
+ [name]: translatedAddress.name,
120
+ },
121
+ postal_code: {
122
+ [postal_code]: translatedAddress.postal_code,
123
+ },
124
+ state: {
125
+ [state]: translatedAddress.state,
126
+ },
127
+ };
128
+ };
129
+ this.continueLoading = false;
130
+ this.dialogLoading = undefined;
131
+ this.dialogOpen = false;
132
+ this.submitBtnType = undefined;
133
+ this.submitBtnColor = undefined;
134
+ this.isMobile = false;
135
+ this.shippingAddress = undefined;
136
+ this.billingAddress = undefined;
137
+ this.translatedShippingAddress = undefined;
138
+ this.translatedBillingAddress = undefined;
139
+ this.showErrorBanner = false;
140
+ this.translatedShippingAddressState = {};
141
+ this.translatedBillingAddressState = {};
142
+ }
143
+ watchTranslatedShippingAddress() {
144
+ this.translatedShippingAddressState = this.translatedShippingAddress;
145
+ }
146
+ watchTranslatedBillingAddress() {
147
+ this.translatedBillingAddressState = this.translatedBillingAddress;
148
+ }
149
+ componentWillLoad() {
150
+ // update the state with the initial props
151
+ this.watchTranslatedBillingAddress();
152
+ this.watchTranslatedShippingAddress();
153
+ }
154
+ render() {
155
+ // dialog background white, so when the button background is also white, we need to change the button type to outline so it's visible
156
+ const submitBtnColor = this.submitBtnColor || zonosStore.appearance.colorSecondary;
157
+ const submitBtnType = submitBtnColor === '#ffffff'
158
+ ? 'outline'
159
+ : this.submitBtnType || 'standard';
160
+ const billing = this.billingAddress;
161
+ const shipping = this.shippingAddress;
162
+ return (h(Host, { key: '03535edacb348258592641baa349e9dcf14bf78c', class: classes([
163
+ 'zonos--address-update-dialog zonos--elements',
164
+ this.isMobile && 'mobile',
165
+ ]) }, h("zonos-dialog", { key: 'c16871425dffe955d422ffa5b9aee1ece0da2890', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialog.emit(), open: this.dialogOpen, width: "568px" }, h("div", { key: 'e4fad501f7cfedc5783774d8b1bf785d6947d3c8', class: "zonos--body" }, h("div", { key: '973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0', class: "zonos--dialog-header" }, h("div", { key: '89c82b6ff3723056d161560da22bd16a992afee7', class: "zonos--dialog-title" }, h("zonos-text", { key: 'bf92ef0b40ea67a492164fedb95dd68b7d023e85', type: "title" }, translate('Update your address')), h("zonos-button", { key: '4e7a1905c976cec396db5c34f633b383bba0d55a', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("zonos-text", { key: '47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38' }, translate('To ensure delivery all address details must be in Latin characters.'))), h("div", { key: '28d9804f0a18f143ce541c2c511cbfa21a2a416f', class: "zonos--group" }, h("zonos-text", { key: '43ec5a9fc8594d065b256952ca8e9392fba03839', class: "zonos--what-you-entered", type: "semiBoldLabel" }, translate('What you entered')), h("div", { key: 'b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1', class: "zonos--address-display-group" }, h("zonos-address-display", { key: '152c53176a46575677723ca47386e484c659927a', addressType: "shipping", currentAddress: shipping }), billing && (h("zonos-address-display", { key: '6c7ac2b49d121c26ce45f09a1eac9ef456d45910', addressType: "billing", currentAddress: billing }))), h("div", { key: '2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d', class: "zonos--address-form-section" }, h("zonos-text", { key: '87d3380072a049ccde71ba1b752aedd36830348b', type: "semiBoldLabel" }, translate('Translated address')), h("zonos-address-form", { key: '2cb36251c6549da05e272183b2c37478b4166fea', addressType: "shipping", class: "zonos--shipping-address-form", currentAddress: shipping, onAddressChange: e => {
166
+ const address = e.detail;
167
+ this.translatedShippingAddressState =
168
+ this.buildTranslateAddressState({
169
+ currentAddress: shipping,
170
+ translatedAddress: address,
171
+ });
172
+ }, translatedAddress: this.translatedShippingAddressState }), billing && (h("zonos-address-form", { key: '9bf5ebd6fb08851716a72c855451bfeb3ee0ed68', addressType: "billing", class: "zonos--billing-address-form", currentAddress: billing, onAddressChange: e => {
173
+ const address = e.detail;
174
+ this.translatedBillingAddressState =
175
+ this.buildTranslateAddressState({
176
+ currentAddress: billing,
177
+ translatedAddress: address,
178
+ });
179
+ }, translatedAddress: this.translatedBillingAddressState })))), h("div", { key: '621df9c8919973b37c62aca5727bde3635086a6b', class: "zonos--group-btn" }, h("div", { key: '95e9fd31418abc8e89ceef24af7cc251ee45ac93', class: "zonos--button-wrapper" }, h("zonos-button", { key: 'bef31fc81e7cc0f2b3f7ab875a29978b07865b6a', class: "zonos--cancel-btn", onClick: () => this.closeDialogHandler(), variant: "subtle" }, translate('Cancel')), h("zonos-button", { key: '9d183153541766b421c3420681c1159ffa599682', backgroundColor: this.submitBtnColor, class: "zonos--update-btn", loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "sm", variant: submitBtnType }, translate('Update address'))))))));
180
+ }
181
+ get el() { return this; }
182
+ static get watchers() { return {
183
+ "translatedShippingAddress": ["watchTranslatedShippingAddress"],
184
+ "translatedBillingAddress": ["watchTranslatedBillingAddress"]
185
+ }; }
186
+ static get style() { return ZonosAddressUpdateDialogStyle0; }
187
+ }, [1, "zonos-address-update-dialog", {
188
+ "continueLoading": [4, "continue-loading"],
189
+ "dialogLoading": [4, "dialog-loading"],
190
+ "dialogOpen": [4, "dialog-open"],
191
+ "submitBtnType": [1, "submit-btn-type"],
192
+ "submitBtnColor": [1, "submit-btn-color"],
193
+ "isMobile": [4, "is-mobile"],
194
+ "shippingAddress": [16],
195
+ "billingAddress": [16],
196
+ "translatedShippingAddress": [16],
197
+ "translatedBillingAddress": [16],
198
+ "showErrorBanner": [32],
199
+ "translatedShippingAddressState": [32],
200
+ "translatedBillingAddressState": [32]
201
+ }, undefined, {
202
+ "translatedShippingAddress": ["watchTranslatedShippingAddress"],
203
+ "translatedBillingAddress": ["watchTranslatedBillingAddress"]
204
+ }]);
205
+ function defineCustomElement() {
206
+ if (typeof customElements === "undefined") {
207
+ return;
208
+ }
209
+ const components = ["zonos-address-update-dialog", "zonos-address-display", "zonos-address-form", "zonos-button", "zonos-country-flag", "zonos-dialog", "zonos-icon", "zonos-input", "zonos-spinner", "zonos-text"];
210
+ components.forEach(tagName => { switch (tagName) {
211
+ case "zonos-address-update-dialog":
212
+ if (!customElements.get(tagName)) {
213
+ customElements.define(tagName, ZonosAddressUpdateDialog);
214
+ }
215
+ break;
216
+ case "zonos-address-display":
217
+ if (!customElements.get(tagName)) {
218
+ defineCustomElement$9();
219
+ }
220
+ break;
221
+ case "zonos-address-form":
222
+ if (!customElements.get(tagName)) {
223
+ defineCustomElement$8();
224
+ }
225
+ break;
226
+ case "zonos-button":
227
+ if (!customElements.get(tagName)) {
228
+ defineCustomElement$7();
229
+ }
230
+ break;
231
+ case "zonos-country-flag":
232
+ if (!customElements.get(tagName)) {
233
+ defineCustomElement$6();
234
+ }
235
+ break;
236
+ case "zonos-dialog":
237
+ if (!customElements.get(tagName)) {
238
+ defineCustomElement$5();
239
+ }
240
+ break;
241
+ case "zonos-icon":
242
+ if (!customElements.get(tagName)) {
243
+ defineCustomElement$4();
244
+ }
245
+ break;
246
+ case "zonos-input":
247
+ if (!customElements.get(tagName)) {
248
+ defineCustomElement$3();
249
+ }
250
+ break;
251
+ case "zonos-spinner":
252
+ if (!customElements.get(tagName)) {
253
+ defineCustomElement$2();
254
+ }
255
+ break;
256
+ case "zonos-text":
257
+ if (!customElements.get(tagName)) {
258
+ defineCustomElement$1();
259
+ }
260
+ break;
261
+ } });
262
+ }
263
+
264
+ export { RemoveIcon as R, ZonosAddressUpdateDialog as Z, defineCustomElement as d };