@zonos/elements 1.3.15-alpha.3 → 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 (373) 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 +7 -7
  12. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  13. package/dist/cjs/{zonos-button_2.cjs.entry.js → zonos-button_3.cjs.entry.js} +53 -13
  14. package/dist/cjs/zonos-card_2.cjs.entry.js +10 -10
  15. package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +135 -109
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +18 -17
  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 +12 -12
  21. package/dist/cjs/zonos-elements.cjs.js +10 -10
  22. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +8 -8
  23. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  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 +4 -4
  28. package/dist/cjs/zonos-payment.cjs.entry.js +6 -6
  29. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +6 -6
  30. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +7 -5
  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.js +1 -1
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -3
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +6 -4
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +135 -20
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
  46. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
  47. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  48. package/dist/collection/components/common/zonos-button/zonos-button.css +1 -0
  49. package/dist/collection/components/common/zonos-button/zonos-button.js +17 -8
  50. package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
  51. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +1 -0
  52. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +22 -4
  53. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  54. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  55. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  56. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  57. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +3 -3
  58. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +6 -4
  59. package/dist/collection/components/common/zonos-input/zonos-input.css +176 -0
  60. package/dist/collection/components/common/zonos-input/zonos-input.js +193 -0
  61. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  62. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  63. package/dist/collection/components/common/zonos-notification/zonos-notification.js +2 -2
  64. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  65. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +4 -2
  66. package/dist/collection/components/common/zonos-text/zonos-text.js +1 -0
  67. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  68. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  69. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  70. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +7 -8
  71. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  72. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
  73. package/dist/collection/components/main/zonos-controller.js +2 -2
  74. package/dist/collection/components/store/checkout/stripe.js +153 -14
  75. package/dist/collection/components/store/translationStore/strings.arabic.js +36 -6
  76. package/dist/collection/components/store/translationStore/strings.base.js +36 -6
  77. package/dist/collection/components/store/translationStore/strings.chinese.js +36 -6
  78. package/dist/collection/components/store/translationStore/strings.danish.js +36 -6
  79. package/dist/collection/components/store/translationStore/strings.dutch.js +36 -6
  80. package/dist/collection/components/store/translationStore/strings.french.js +36 -6
  81. package/dist/collection/components/store/translationStore/strings.german.js +36 -6
  82. package/dist/collection/components/store/translationStore/strings.hebrew.js +36 -6
  83. package/dist/collection/components/store/translationStore/strings.indonesian.js +36 -6
  84. package/dist/collection/components/store/translationStore/strings.italian.js +36 -6
  85. package/dist/collection/components/store/translationStore/strings.japanese.js +36 -6
  86. package/dist/collection/components/store/translationStore/strings.korean.js +36 -6
  87. package/dist/collection/components/store/translationStore/strings.norwegian.js +36 -6
  88. package/dist/collection/components/store/translationStore/strings.polish.js +36 -6
  89. package/dist/collection/components/store/translationStore/strings.portuguese.js +36 -6
  90. package/dist/collection/components/store/translationStore/strings.russian.js +36 -6
  91. package/dist/collection/components/store/translationStore/strings.spanish.js +36 -6
  92. package/dist/collection/components/store/translationStore/strings.swedish.js +36 -6
  93. package/dist/collection/components/store/translationStore/strings.turkish.js +36 -6
  94. package/dist/collection/components/store/translationStore/strings.vietnamese.js +36 -6
  95. package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -71
  96. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +29 -5
  97. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  98. package/dist/collection/components/utils/checkout/buildTranslateRequestBody.js +98 -0
  99. package/dist/collection/components/utils/containsNonLatinChars.js +10 -8
  100. package/dist/collection/components/utils/getBorderRadius.js +3 -5
  101. package/dist/collection/styles/stripe/defaultVariable.js +2 -2
  102. package/dist/collection/types/checkout/TranslatedText.js +1 -0
  103. package/dist/collection/types/checkout/api/ValidateAddressRequest.js +1 -0
  104. package/dist/components/containsNonLatinChars.js +21 -0
  105. package/dist/components/getBorderRadius.js +3 -5
  106. package/dist/components/stripe.js +255 -4545
  107. package/dist/components/trackConversionEvent.js +1 -1
  108. package/dist/components/translationStore.js +5131 -0
  109. package/dist/components/zonos-address-display.d.ts +11 -0
  110. package/dist/components/zonos-address-display.js +6 -0
  111. package/dist/components/zonos-address-display2.js +64 -0
  112. package/dist/components/zonos-address-form.d.ts +11 -0
  113. package/dist/components/zonos-address-form.js +6 -0
  114. package/dist/components/zonos-address-form2.js +84 -0
  115. package/dist/components/zonos-address-update-dialog.d.ts +11 -0
  116. package/dist/components/zonos-address-update-dialog.js +6 -0
  117. package/dist/components/zonos-address-update-dialog2.js +264 -0
  118. package/dist/components/zonos-address2.js +3 -93
  119. package/dist/components/zonos-badge2.js +3 -3
  120. package/dist/components/zonos-button2.js +18 -9
  121. package/dist/components/zonos-card2.js +3 -3
  122. package/dist/components/zonos-cart-items2.js +1 -1
  123. package/dist/components/zonos-cart-subtotal2.js +2 -1
  124. package/dist/components/zonos-checkbox2.js +15 -6
  125. package/dist/components/zonos-checkout-finish2.js +26 -6
  126. package/dist/components/zonos-checkout-footer2.js +2 -2
  127. package/dist/components/zonos-checkout-payment2.js +2 -1
  128. package/dist/components/zonos-checkout-progress-tabs2.js +5 -4
  129. package/dist/components/zonos-checkout.js +71 -41
  130. package/dist/components/zonos-collapse2.js +2 -2
  131. package/dist/components/zonos-component.js +1 -1
  132. package/dist/components/zonos-controller.js +2 -2
  133. package/dist/components/zonos-country-select2.js +2 -2
  134. package/dist/components/zonos-custom-message2.js +2 -2
  135. package/dist/components/zonos-customer-info2.js +170 -29
  136. package/dist/components/zonos-dialog2.js +7 -5
  137. package/dist/components/zonos-hello-dialog-footer2.js +3 -3
  138. package/dist/components/zonos-hello-dialog2.js +5 -4
  139. package/dist/components/zonos-hello.js +2 -1
  140. package/dist/components/zonos-input.d.ts +11 -0
  141. package/dist/components/zonos-input.js +6 -0
  142. package/dist/components/zonos-input2.js +78 -0
  143. package/dist/components/zonos-language-select2.js +4 -3
  144. package/dist/components/zonos-link-authentication2.js +12 -5
  145. package/dist/components/zonos-link.js +1 -1
  146. package/dist/components/zonos-logo.js +2 -2
  147. package/dist/components/zonos-notification2.js +2 -2
  148. package/dist/components/zonos-payment2.js +1 -1
  149. package/dist/components/zonos-review2.js +2 -1
  150. package/dist/components/zonos-select-dialog-header2.js +2 -2
  151. package/dist/components/zonos-shipping-rich-radio2.js +4 -2
  152. package/dist/components/zonos-shipping2.js +3 -2
  153. package/dist/components/zonos-text2.js +1 -0
  154. package/dist/components/zonos-tooltip2.js +2 -2
  155. package/dist/components/zonos-v-stack2.js +2 -2
  156. package/dist/esm/RemoveIcon-f6715b36.js +3 -0
  157. package/dist/esm/{cart-10bcd2e0.js → cart-462e89a6.js} +976 -139
  158. package/dist/esm/containsNonLatinChars-2d8810c3.js +21 -0
  159. package/dist/esm/{getBorderRadius-8129b0cb.js → getBorderRadius-567f1786.js} +4 -6
  160. package/dist/esm/index-e063389c.js +1328 -0
  161. package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
  162. package/dist/esm/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
  163. package/dist/esm/loader.js +3 -3
  164. package/dist/esm/{submitGtag-84886899.js → submitGtag-ac7c3c89.js} +21 -3
  165. package/dist/esm/zonos-address_8.entry.js +631 -0
  166. package/dist/esm/zonos-badge_2.entry.js +7 -7
  167. package/dist/esm/zonos-banner.entry.js +2 -2
  168. package/dist/esm/{zonos-button_2.entry.js → zonos-button_3.entry.js} +53 -14
  169. package/dist/esm/zonos-card_2.entry.js +10 -10
  170. package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +131 -104
  171. package/dist/esm/zonos-checkout.entry.js +13 -12
  172. package/dist/esm/zonos-component.entry.js +2 -2
  173. package/dist/esm/zonos-controller.entry.js +6 -6
  174. package/dist/esm/zonos-country-flag.entry.js +5 -5
  175. package/dist/esm/zonos-country-select_3.entry.js +12 -12
  176. package/dist/esm/zonos-elements.js +11 -11
  177. package/dist/esm/zonos-hello-dialog.entry.js +8 -8
  178. package/dist/esm/zonos-hello.entry.js +5 -5
  179. package/dist/esm/zonos-input.entry.js +53 -0
  180. package/dist/esm/zonos-link.entry.js +2 -2
  181. package/dist/esm/zonos-logo.entry.js +4 -4
  182. package/dist/esm/zonos-notification.entry.js +4 -4
  183. package/dist/esm/zonos-payment.entry.js +6 -6
  184. package/dist/esm/zonos-select-dialog-header_2.entry.js +6 -6
  185. package/dist/esm/zonos-shipping-rich-radio.entry.js +7 -5
  186. package/dist/esm/zonos-text.entry.js +3 -2
  187. package/dist/esm/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
  188. package/dist/esm-es5/RemoveIcon-f6715b36.js +1 -0
  189. package/dist/esm-es5/cart-462e89a6.js +1 -0
  190. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
  191. package/dist/esm-es5/getBorderRadius-567f1786.js +1 -0
  192. package/dist/esm-es5/index-e063389c.js +2 -0
  193. package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
  194. package/dist/esm-es5/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
  195. package/dist/esm-es5/loader.js +1 -1
  196. package/dist/esm-es5/submitGtag-ac7c3c89.js +1 -0
  197. package/dist/esm-es5/zonos-address_8.entry.js +1 -0
  198. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  199. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  200. package/dist/esm-es5/zonos-button_3.entry.js +1 -0
  201. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  202. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -0
  203. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  204. package/dist/esm-es5/zonos-component.entry.js +1 -1
  205. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  206. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  207. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  208. package/dist/esm-es5/zonos-elements.js +1 -1
  209. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  210. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  211. package/dist/esm-es5/zonos-input.entry.js +1 -0
  212. package/dist/esm-es5/zonos-link.entry.js +1 -1
  213. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  214. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  215. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  216. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  217. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  218. package/dist/esm-es5/zonos-text.entry.js +1 -1
  219. package/dist/esm-es5/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
  220. package/dist/scripts/loadStripe.js +1 -1
  221. package/dist/scripts/loadZonos.js +1 -1
  222. package/dist/scripts/stripe.js +1 -1
  223. package/dist/scripts/zonos.js +1 -1
  224. package/dist/scripts/zonosBase.js +1 -1
  225. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.d.ts +12 -0
  226. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.d.ts +28 -0
  227. package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.d.ts +96 -0
  228. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +22 -2
  229. package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
  230. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +0 -3
  231. package/dist/types/components/common/zonos-input/zonos-input.d.ts +35 -0
  232. package/dist/types/components/store/checkout/stripe.d.ts +25 -1
  233. package/dist/types/components/store/translationStore/strings.arabic.d.ts +35 -5
  234. package/dist/types/components/store/translationStore/strings.base.d.ts +35 -5
  235. package/dist/types/components/store/translationStore/strings.chinese.d.ts +35 -5
  236. package/dist/types/components/store/translationStore/strings.danish.d.ts +35 -5
  237. package/dist/types/components/store/translationStore/strings.dutch.d.ts +35 -5
  238. package/dist/types/components/store/translationStore/strings.french.d.ts +35 -5
  239. package/dist/types/components/store/translationStore/strings.german.d.ts +35 -5
  240. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +35 -5
  241. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +35 -5
  242. package/dist/types/components/store/translationStore/strings.italian.d.ts +35 -5
  243. package/dist/types/components/store/translationStore/strings.japanese.d.ts +35 -5
  244. package/dist/types/components/store/translationStore/strings.korean.d.ts +35 -5
  245. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +35 -5
  246. package/dist/types/components/store/translationStore/strings.polish.d.ts +35 -5
  247. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +35 -5
  248. package/dist/types/components/store/translationStore/strings.russian.d.ts +35 -5
  249. package/dist/types/components/store/translationStore/strings.spanish.d.ts +35 -5
  250. package/dist/types/components/store/translationStore/strings.swedish.d.ts +35 -5
  251. package/dist/types/components/store/translationStore/strings.turkish.d.ts +35 -5
  252. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +35 -5
  253. package/dist/types/components/store/translationStore.d.ts +1 -1
  254. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -10
  255. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +4 -0
  256. package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
  257. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
  258. package/dist/types/components/utils/checkout/buildTranslateRequestBody.d.ts +26 -0
  259. package/dist/types/components/utils/containsNonLatinChars.d.ts +1 -0
  260. package/dist/types/components/utils/getBorderRadius.d.ts +7 -1
  261. package/dist/types/components.d.ts +308 -6
  262. package/dist/types/types/checkout/TranslatedText.d.ts +23 -0
  263. package/dist/types/types/checkout/api/ValidateAddressRequest.d.ts +20 -0
  264. package/dist/types/types/generated/graphql.customer.types.d.ts +2 -0
  265. package/dist/types/types/generated/graphql.customer.types.ts +2 -0
  266. package/dist/zonos-elements/{p-593948b5.system.entry.js → p-029f11dd.system.entry.js} +1 -1
  267. package/dist/zonos-elements/{p-af8391bb.entry.js → p-094c0ee8.entry.js} +1 -1
  268. package/dist/zonos-elements/p-0c64dbbb.js +1 -0
  269. package/dist/zonos-elements/p-11504442.entry.js +1 -0
  270. package/dist/zonos-elements/p-11bef836.system.entry.js +1 -0
  271. package/dist/zonos-elements/{p-bc3a0f7c.entry.js → p-11f1b78c.entry.js} +1 -1
  272. package/dist/zonos-elements/p-13ddaf31.js +2 -0
  273. package/dist/zonos-elements/p-154aaf95.system.js +1 -0
  274. package/dist/zonos-elements/p-163ff5b5.system.js +2 -0
  275. package/dist/zonos-elements/{p-5ee8a685.entry.js → p-1e934274.entry.js} +1 -1
  276. package/dist/zonos-elements/p-20582e58.system.entry.js +1 -0
  277. package/dist/zonos-elements/{p-bfa8d9a4.system.entry.js → p-2439c82f.system.entry.js} +1 -1
  278. package/dist/zonos-elements/p-2670438c.system.js +1 -0
  279. package/dist/zonos-elements/p-321226b0.entry.js +1 -0
  280. package/dist/zonos-elements/{p-d149bc5d.system.entry.js → p-3221530d.system.entry.js} +1 -1
  281. package/dist/zonos-elements/{p-e9fafda6.entry.js → p-32d27535.entry.js} +1 -1
  282. package/dist/zonos-elements/p-3d10866d.entry.js +1 -0
  283. package/dist/zonos-elements/{p-1a5f8df7.entry.js → p-3d8667a7.entry.js} +1 -1
  284. package/dist/zonos-elements/p-3f05d130.system.entry.js +1 -0
  285. package/dist/zonos-elements/p-430eefd4.entry.js +1 -0
  286. package/dist/zonos-elements/{p-fc35d717.system.entry.js → p-49825866.system.entry.js} +1 -1
  287. package/dist/zonos-elements/p-5525b740.entry.js +1 -0
  288. package/dist/zonos-elements/p-578f0aad.system.js +1 -0
  289. package/dist/zonos-elements/{p-3e417d7c.entry.js → p-58a8ef6c.entry.js} +1 -1
  290. package/dist/zonos-elements/p-5d993965.js +1 -0
  291. package/dist/zonos-elements/{p-262b8e1e.system.entry.js → p-5f9c066d.system.entry.js} +1 -1
  292. package/dist/zonos-elements/{p-49120f0e.system.entry.js → p-60e262f0.system.entry.js} +1 -1
  293. package/dist/zonos-elements/p-64b594f4.js +1 -0
  294. package/dist/zonos-elements/{p-7891f8d2.entry.js → p-66471df6.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-95c864ca.system.entry.js → p-679877b1.system.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-fc4da55c.system.js → p-771fbeb3.system.js} +1 -1
  297. package/dist/zonos-elements/p-79f3c4f5.system.js +1 -0
  298. package/dist/zonos-elements/{p-e1ac5b2a.system.entry.js → p-80d78980.system.entry.js} +1 -1
  299. package/dist/zonos-elements/p-81a54668.js +1 -0
  300. package/dist/zonos-elements/p-83cc2936.js +1 -0
  301. package/dist/zonos-elements/{p-520e8e63.system.js → p-87badea9.system.js} +1 -1
  302. package/dist/zonos-elements/p-8a61a04f.system.entry.js +1 -0
  303. package/dist/zonos-elements/p-8b32f560.system.entry.js +1 -0
  304. package/dist/zonos-elements/{p-d01576d7.js → p-909a331c.js} +1 -1
  305. package/dist/zonos-elements/{p-031086ba.system.entry.js → p-94b15a5e.system.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-9768840a.system.entry.js → p-9a45fae5.system.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-24fee841.entry.js → p-9ec93319.entry.js} +1 -1
  308. package/dist/zonos-elements/p-a6d7ac46.js +1 -0
  309. package/dist/zonos-elements/{p-2a99c8b5.system.entry.js → p-a6eeb4bd.system.entry.js} +1 -1
  310. package/dist/zonos-elements/{p-1950dda7.entry.js → p-a93f2e84.entry.js} +1 -1
  311. package/dist/zonos-elements/p-aed0098c.system.js +1 -0
  312. package/dist/zonos-elements/{p-92446677.entry.js → p-b19d51e0.entry.js} +1 -1
  313. package/dist/zonos-elements/{p-46f9c93e.system.entry.js → p-b9652402.system.entry.js} +1 -1
  314. package/dist/zonos-elements/{p-d3772fd3.entry.js → p-baee62a4.entry.js} +1 -1
  315. package/dist/zonos-elements/{p-eff12c31.system.entry.js → p-bf32179a.system.entry.js} +1 -1
  316. package/dist/zonos-elements/p-cd1cc224.entry.js +1 -0
  317. package/dist/zonos-elements/{p-ae4a4634.system.entry.js → p-d1b63cec.system.entry.js} +1 -1
  318. package/dist/zonos-elements/p-d6b103d5.system.js +1 -0
  319. package/dist/zonos-elements/{p-376bdf70.entry.js → p-da6767d8.entry.js} +1 -1
  320. package/dist/zonos-elements/p-dde1383b.entry.js +1 -0
  321. package/dist/zonos-elements/p-df192668.system.js +1 -0
  322. package/dist/zonos-elements/{p-70ede197.system.entry.js → p-df24d548.system.entry.js} +1 -1
  323. package/dist/zonos-elements/{p-6743734f.entry.js → p-e7b4b756.entry.js} +1 -1
  324. package/dist/zonos-elements/{p-d41b5762.js → p-f1962041.js} +1 -1
  325. package/dist/zonos-elements/{p-a0abc499.system.entry.js → p-f3d3c754.system.entry.js} +1 -1
  326. package/dist/zonos-elements/p-f79682b5.entry.js +1 -0
  327. package/dist/zonos-elements/zonos-elements.css +3 -3
  328. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  329. package/dist/zonos-elements/zonos-elements.js +1 -1
  330. package/package.json +3 -2
  331. package/dist/cjs/index-3b4816ef.js +0 -2088
  332. package/dist/cjs/sendErrorLog-29e50f7e.js +0 -29
  333. package/dist/cjs/zonos-address_4.cjs.entry.js +0 -388
  334. package/dist/cjs/zonos-icon.cjs.entry.js +0 -39
  335. package/dist/components/sendErrorLog.js +0 -21
  336. package/dist/esm/index-0e31d804.js +0 -2055
  337. package/dist/esm/sendErrorLog-8642e94a.js +0 -26
  338. package/dist/esm/zonos-address_4.entry.js +0 -381
  339. package/dist/esm/zonos-icon.entry.js +0 -35
  340. package/dist/esm-es5/cart-10bcd2e0.js +0 -1
  341. package/dist/esm-es5/getBorderRadius-8129b0cb.js +0 -1
  342. package/dist/esm-es5/index-0e31d804.js +0 -2
  343. package/dist/esm-es5/sendErrorLog-8642e94a.js +0 -1
  344. package/dist/esm-es5/submitGtag-84886899.js +0 -1
  345. package/dist/esm-es5/zonos-address_4.entry.js +0 -1
  346. package/dist/esm-es5/zonos-button_2.entry.js +0 -1
  347. package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
  348. package/dist/esm-es5/zonos-icon.entry.js +0 -1
  349. package/dist/scripts/insertTranslations.js +0 -1
  350. package/dist/zonos-elements/p-0253aeae.entry.js +0 -1
  351. package/dist/zonos-elements/p-1264b362.entry.js +0 -1
  352. package/dist/zonos-elements/p-2244534c.js +0 -2
  353. package/dist/zonos-elements/p-2825570c.system.js +0 -2
  354. package/dist/zonos-elements/p-33abdb30.js +0 -1
  355. package/dist/zonos-elements/p-450942a3.system.js +0 -1
  356. package/dist/zonos-elements/p-48a2b8b0.entry.js +0 -1
  357. package/dist/zonos-elements/p-5ca09163.entry.js +0 -1
  358. package/dist/zonos-elements/p-5ff27485.js +0 -1
  359. package/dist/zonos-elements/p-6d9dbecb.system.entry.js +0 -1
  360. package/dist/zonos-elements/p-6e8d43de.entry.js +0 -1
  361. package/dist/zonos-elements/p-6f5761e8.js +0 -1
  362. package/dist/zonos-elements/p-78d22069.system.entry.js +0 -1
  363. package/dist/zonos-elements/p-8b44e558.system.js +0 -1
  364. package/dist/zonos-elements/p-8bc0e56a.system.entry.js +0 -1
  365. package/dist/zonos-elements/p-9350d19f.entry.js +0 -1
  366. package/dist/zonos-elements/p-9e8f1065.system.entry.js +0 -1
  367. package/dist/zonos-elements/p-a6bbf6de.system.entry.js +0 -1
  368. package/dist/zonos-elements/p-b8e8330b.system.js +0 -1
  369. package/dist/zonos-elements/p-be022d8e.entry.js +0 -1
  370. package/dist/zonos-elements/p-c6170bec.system.js +0 -1
  371. package/dist/zonos-elements/p-e705c44c.entry.js +0 -1
  372. package/dist/zonos-elements/p-ed2e94d2.js +0 -1
  373. package/dist/zonos-elements/p-f4c38bfc.system.js +0 -1
@@ -1,29 +0,0 @@
1
- 'use strict';
2
-
3
- const cart = require('./cart-1b1d39af.js');
4
-
5
- const checkoutBreakpoint = 890;
6
- const isCheckoutMobile = (isMobile) => {
7
- return isMobile || window.innerWidth < checkoutBreakpoint;
8
- };
9
-
10
- const sendErrorLog = async ({ endpoint, errors, metadata }) => {
11
- const userAgentData = 'userAgentData' in window.navigator
12
- ? // userAgentData is not yet supported in all browsers
13
- window.navigator.userAgentData
14
- : null;
15
- const errorObject = {
16
- endpoint,
17
- errors,
18
- metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
19
- ? userAgentData
20
- : window.navigator.userAgent }, metadata),
21
- };
22
- void cart.handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
23
- body: errorObject,
24
- method: 'POST',
25
- });
26
- };
27
-
28
- exports.isCheckoutMobile = isCheckoutMobile;
29
- exports.sendErrorLog = sendErrorLog;
@@ -1,388 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-1b1d39af.js');
7
- const zonosStore = require('./zonosStore-aee974e0.js');
8
- const sendErrorLog = require('./sendErrorLog-29e50f7e.js');
9
- const classes = require('./classes-b7918f56.js');
10
- const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
11
- const isDarkColor = require('./isDarkColor-f5473002.js');
12
-
13
- /**
14
- * Check if the given address object contains non-latin characters
15
- * @returns an object with the same keys as the input object, and a boolean value indicating if the value contains non-latin characters
16
- */
17
- const containsNonLatinChars = (params) => {
18
- const specialCharacters = /[ʼˮ՚ߴߵ']{1}/u;
19
- /**
20
- * This regex matches any character that is not a latin character, punctuation, symbol, number, separator, control, or mark
21
- * I limited the character found to 1 in the regex, so that we can return early if we find any non-latin character
22
- **/
23
- const nonLatinRegex = /[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;
24
- const nonLatinValueList = Object.entries(params).reduce((prev, [key, value]) => nonLatinRegex.test(value) &&
25
- // allow special characters like web apostrophe and quotation mark
26
- !specialCharacters.test(value)
27
- ? Object.assign(Object.assign({}, prev), { [key]: true }) : prev, {});
28
- return nonLatinValueList;
29
- };
30
-
31
- const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
32
- const ZonosAddressStyle0 = zonosAddressCss;
33
-
34
- const mappedFields = {
35
- city: 'City',
36
- country: 'Country',
37
- line1: 'Address line 1',
38
- line2: 'Address line 2',
39
- name: 'Name',
40
- postal_code: 'Postal code',
41
- state: 'State',
42
- };
43
- const ZonosAddress = class {
44
- constructor(hostRef) {
45
- index.registerInstance(this, hostRef);
46
- this.invalidCharacters = index.createEvent(this, "invalidCharacters", 7);
47
- this.type = undefined;
48
- this.titleText = undefined;
49
- this.defaultAddress = null;
50
- this.stripe = window.Zonos.stripe;
51
- this.reportedInvalidCharacters = false;
52
- this.invalidCharacterList = null;
53
- this.isDirtyAddress = false;
54
- }
55
- getStripeAddressInstance() {
56
- if (this.type === 'billing') {
57
- return {
58
- stripeAddressElement: cart.stripeStore.stripeBillingAddressElement,
59
- stripeAddressEventData: cart.stripeStore.stripeBillingAddressEventData,
60
- stripeElements: cart.stripeStore.stripeElementsForBillingAddress,
61
- };
62
- }
63
- return {
64
- stripeAddressElement: cart.stripeStore.stripeAddressElement,
65
- stripeAddressEventData: cart.stripeStore.stripeAddressEventData,
66
- stripeElements: cart.stripeStore.stripeElements,
67
- };
68
- }
69
- updateAddressEventData({ event, type, }) {
70
- switch (type) {
71
- case 'billing':
72
- cart.stripeStore.stripeBillingAddressEventData = event;
73
- break;
74
- default:
75
- cart.stripeStore.stripeAddressEventData = event;
76
- break;
77
- }
78
- const invalidCharacterList = this.checkInvalidCharacters(event);
79
- this.invalidCharacterList = invalidCharacterList;
80
- this.invalidCharacters.emit(!!invalidCharacterList);
81
- }
82
- updateAddressElement({ stripeAddressElement, type, }) {
83
- if (type === 'shipping') {
84
- cart.stripeStore.stripeAddressElement = stripeAddressElement;
85
- return;
86
- }
87
- cart.stripeStore.stripeBillingAddressElement = stripeAddressElement;
88
- }
89
- checkInvalidCharacters(address) {
90
- // Do nothing if the allowed character sets is ALL or the address is incomplete
91
- if (!address.complete ||
92
- zonosStore.zonosStore.checkoutSettings.allowedCharacterSets === 'ALL') {
93
- return null;
94
- }
95
- const { address: addressValue, firstName, lastName, name } = address.value;
96
- const { city, country, line1, line2, postal_code, state } = addressValue;
97
- const invalidList = containsNonLatinChars({
98
- city,
99
- country,
100
- line1,
101
- line2: line2 || '',
102
- name: name || `${firstName} ${lastName}`,
103
- postal_code,
104
- state,
105
- });
106
- if (!Object.keys(invalidList).length) {
107
- return null;
108
- }
109
- // send error event only once so we know what value is invalid
110
- if (!this.reportedInvalidCharacters) {
111
- this.reportedInvalidCharacters = true;
112
- void sendErrorLog.sendErrorLog({
113
- endpoint: 'NonLatinInput',
114
- errors: Object.keys(invalidList).map(fieldName => {
115
- var _a;
116
- if (fieldName !== 'name') {
117
- // trim all number so we don't send sensitive information
118
- const trimmedAddress = (_a = addressValue[fieldName]) === null || _a === void 0 ? void 0 : _a.replace(/[\d\w]+/g, '');
119
- return `Invalid character found ${fieldName}: "${trimmedAddress}"`;
120
- }
121
- const customerName = name || `${firstName} ${lastName}`;
122
- const trimmedName = customerName.replace(/[\d\w]+/g, '');
123
- return `Invalid character found ${fieldName}: "${trimmedName}"`;
124
- }),
125
- metadata: {},
126
- });
127
- }
128
- return invalidList;
129
- }
130
- async watchInitStripe() {
131
- var _a, _b;
132
- this.stripe = window.Zonos.stripe;
133
- const { stripeAddressEventData, stripeElements } = this.getStripeAddressInstance();
134
- if (!this.stripe || !stripeElements) {
135
- cart.logError("Stripe is not initialized. Couldn't load stripe element.");
136
- return;
137
- }
138
- const phone = (_a = this.defaultAddress) === null || _a === void 0 ? void 0 : _a.phone;
139
- if (!phone) {
140
- // remove phone from default address if it's not provided, stripe
141
- // will throw error if key phone exist and its value is empty or 'undefined'.
142
- (_b = this.defaultAddress) === null || _b === void 0 ? true : delete _b.phone;
143
- }
144
- const shippableCountries = cart.localizationStore.shippingZoneCountries;
145
- const shippingZone = shippableCountries
146
- ? Object.values(shippableCountries).map(country => country.code)
147
- : [];
148
- const addressElement = stripeElements.create('address', {
149
- allowedCountries: this.type === 'shipping' ? shippingZone : [],
150
- // only show the default address if stripeAddressEventData is not provided
151
- contacts: this.defaultAddress && !stripeAddressEventData
152
- ? [this.defaultAddress]
153
- : [],
154
- defaultValues: {
155
- address: Object.assign(Object.assign({}, stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address), { country: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
156
- cart.localizationStore.selectedCountryCode ||
157
- 'AL' }),
158
- firstName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName,
159
- lastName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName,
160
- phone: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone,
161
- },
162
- display: {
163
- name: 'split',
164
- },
165
- fields: {
166
- phone: 'always',
167
- },
168
- mode: this.type,
169
- validation: {
170
- phone: {
171
- required: 'always',
172
- },
173
- },
174
- });
175
- addressElement.mount(this.el.querySelector('.zonos--address-component'));
176
- addressElement.on('change', event => {
177
- const eventValue = event.value;
178
- if (!this.isDirtyAddress && eventValue.address.line1.length >= 3) {
179
- this.isDirtyAddress = true;
180
- // stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
181
- setTimeout(() => {
182
- // scroll directly into view if it's mobile
183
- if (sendErrorLog.isCheckoutMobile()) {
184
- this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
185
- }
186
- else {
187
- // scroll into the end of the page so the address placeholder won't be hidden
188
- const yOffset = this.type === 'shipping' ? 100 : 600;
189
- const parentWrapper = this.el.closest('.zonos--group');
190
- const y = this.el.getBoundingClientRect().top + yOffset;
191
- parentWrapper === null || parentWrapper === void 0 ? void 0 : parentWrapper.scrollTo({ behavior: 'smooth', top: y });
192
- }
193
- }, 600);
194
- }
195
- this.updateAddressEventData({
196
- event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', value: Object.assign(Object.assign({}, eventValue), { firstName: eventValue.firstName || eventValue.name.split(' ')[0], lastName: eventValue.lastName || eventValue.name.split(' ')[1] }) }),
197
- type: this.type,
198
- });
199
- });
200
- this.updateAddressElement({
201
- stripeAddressElement: addressElement,
202
- type: this.type,
203
- });
204
- }
205
- disconnectedCallback() {
206
- // destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
207
- const stripeElement = this.getStripeAddressInstance().stripeAddressElement;
208
- stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.destroy();
209
- }
210
- componentDidLoad() {
211
- const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
212
- this.isDirtyAddress =
213
- !!stripeAddressEventData &&
214
- stripeAddressEventData.value.address.line1.length > 0;
215
- // @Watch doesn't get trigger on initial load
216
- void this.watchInitStripe();
217
- setTimeout(() => {
218
- // check if the address contains invalid characters after address is loaded
219
- const newStripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
220
- if (newStripeAddressEventData) {
221
- this.checkInvalidCharacters(newStripeAddressEventData);
222
- }
223
- }, 500);
224
- }
225
- render() {
226
- // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
227
- return (index.h(index.Host, { key: 'd5100d824d84c5e5b238f4877d489ca1b3f7b886', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: '0fd51ddf9b08b4f62aa75a5f2e919d40e52f6fc3', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: '3a53ec2a36e96639ec5437b928d4be4b84fb3aff', class: "zonos--address-component" }), this.invalidCharacterList && (index.h("zonos-banner", { key: '1141be407cff5b6741a40a06712a71e881d3a082', bannerTitle: cart.translate('Please resolve the following errors:'), intent: "error" }, Object.keys(this.invalidCharacterList).map(fieldName => (index.h("zonos-text", null, `- ${cart.translate(mappedFields[fieldName])}: ${cart.translate('only supports Latin characters (A-Z, a-z)')}`)))))));
228
- }
229
- get el() { return index.getElement(this); }
230
- static get watchers() { return {
231
- "stripe": ["watchInitStripe"]
232
- }; }
233
- };
234
- ZonosAddress.style = ZonosAddressStyle0;
235
-
236
- const colorPrefixes = [
237
- 'blue',
238
- 'cyan',
239
- 'green',
240
- 'orange',
241
- 'purple',
242
- 'red',
243
- 'gray',
244
- 'glass',
245
- ];
246
-
247
- const zonosCheckboxCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";
248
- const ZonosCheckboxStyle0 = zonosCheckboxCss;
249
-
250
- const ZonosCheckbox = class {
251
- constructor(hostRef) {
252
- index.registerInstance(this, hostRef);
253
- this.checkboxSelected = index.createEvent(this, "checkboxSelected", 7);
254
- this.backgroundColor = 'blue';
255
- this.label = undefined;
256
- this.isChecked = false;
257
- this.isDisabled = false;
258
- this.size = 12;
259
- this.fontSize = 'base';
260
- this.borderStyle = undefined;
261
- }
262
- render() {
263
- const isBackgroundVariable = colorPrefixes.includes(this.backgroundColor);
264
- const backgroundColor = isBackgroundVariable
265
- ? `var(--amino-${this.backgroundColor}-600)`
266
- : this.backgroundColor;
267
- const checkmarkColor = isBackgroundVariable
268
- ? // use lighter color if the color is amino variable
269
- `var(--amino-${this.backgroundColor}-200)`
270
- : // if it's not an amino variable, use white if the background is dark, and dark if the background is light
271
- !isDarkColor.isDarkColor(backgroundColor)
272
- ? 'var(--amino-gray-800)'
273
- : 'var(--amino-gray-0)';
274
- const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle, '4px');
275
- return (index.h(index.Host, { key: '1383262a5cca00ede5154fbdf37bbabb8cbcd501', class: classes.classes(['zonos--elements zonos--checkbox']), style: {
276
- '--background-color': backgroundColor,
277
- '--border-radius': borderStyle,
278
- '--font-family': zonosStore.zonosStoreFontFamily(),
279
- '--size': `${this.size}px`,
280
- } }, index.h("label", { key: 'aa01d0b1eebb53587f8d2d344e3b1d01a6a7a683', class: classes.classes([this.isDisabled && 'disabled']) }, index.h("input", { key: '166eef6010570137110f8548c9eb76f32e5616e9', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
281
- this.checkboxSelected.emit(e.target.checked);
282
- }, type: "checkbox" }), index.h("span", { key: 'd98289266cd4e78dd1e5c9b89019d0dd4927e4d0', class: "checkmark-container" }, index.h("svg", { key: 'e179fe12a77e0c7f1f48bc943ff472d0a75e05d5', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '147acf112b6d28fa30af8e8c7fe8d7f998a507ab', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (index.h("zonos-text", { key: 'b83bb5bb1881580be3d0ab3ed83157a0c0ce3f8e', size: this.fontSize }, this.label)))));
283
- }
284
- };
285
- ZonosCheckbox.style = ZonosCheckboxStyle0;
286
-
287
- const zonosCollapseCss = ":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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";
288
- const ZonosCollapseStyle0 = zonosCollapseCss;
289
-
290
- const ZonosCollapse = class {
291
- constructor(hostRef) {
292
- index.registerInstance(this, hostRef);
293
- this.collapsed = false;
294
- this.collapseSize = 0;
295
- this.height = this.el.scrollHeight;
296
- this.iframe = null;
297
- }
298
- getElementHeight() {
299
- const fullHeight = `${this.height}px`;
300
- const collapsedHeight = `${this.collapseSize}px`;
301
- return this.collapsed ? collapsedHeight : fullHeight;
302
- }
303
- componentDidLoad() {
304
- this.height = this.el.scrollHeight;
305
- }
306
- componentDidRender() {
307
- var _a, _b, _c;
308
- this.iframe =
309
- ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('iframe')) || null;
310
- (_c = (_b = this.iframe) === null || _b === void 0 ? void 0 : _b.contentWindow) === null || _c === void 0 ? void 0 : _c.addEventListener('resize', () => {
311
- if (!this.iframe) {
312
- // this should never happen since it's inside of resize callback
313
- return;
314
- }
315
- this.height = parseFloat(getComputedStyle(this.iframe).height);
316
- });
317
- }
318
- render() {
319
- if (!this.collapsed) {
320
- // wait for the collapse animation to finish, then set overflow to visible
321
- setTimeout(() => {
322
- // if the element collapsed state is still not changed, set overflow to visible
323
- if (!this.collapsed) {
324
- this.el.style.overflow = 'visible';
325
- }
326
- }, 300);
327
- }
328
- else {
329
- // set overflow to hidden to prevent content from showing when collapsed
330
- this.el.style.overflow = 'hidden';
331
- }
332
- return (index.h(index.Host, { key: 'ec163c2c73f38e479ba22bb3bea5dbe2f156170b', class: 'zonos--elements zonos--collapse', style: {
333
- '--font-family': zonosStore.zonosStoreFontFamily(),
334
- height: this.getElementHeight(),
335
- } }, index.h("div", { key: 'ab8b73ff44968d8e2f3dcf75439b09da36fdfb22' }, index.h("iframe", { key: '0b6d3518382c4c17a6eacb07c1617e84c7301c39', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), index.h("slot", { key: '752d9054dadf8905e22cfcca81bb966c2d3ce8d3' }))));
336
- }
337
- get el() { return index.getElement(this); }
338
- };
339
- ZonosCollapse.style = ZonosCollapseStyle0;
340
-
341
- const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}";
342
- const ZonosLinkAuthenticationStyle0 = zonosLinkAuthenticationCss;
343
-
344
- const ZonosLinkAuthentication = class {
345
- constructor(hostRef) {
346
- index.registerInstance(this, hostRef);
347
- this.titleText = undefined;
348
- this.stripe = cart.stripeStore.stripe;
349
- }
350
- watchInitStripe() {
351
- if (!this.stripe || !cart.stripeStore.stripeElements) {
352
- return;
353
- }
354
- // Create and mount the Authentication Element in ${type} mode
355
- const linkAuthenticationElement = cart.stripeStore.stripeLinkElement ||
356
- cart.stripeStore.stripeElements.create('linkAuthentication');
357
- const linkAuthenticationElementContainer = this.el.querySelector('.zonos--link-authentication-component');
358
- if (!linkAuthenticationElementContainer) {
359
- cart.logError('Cannot find container element for linkAuthenticationElement');
360
- return;
361
- }
362
- linkAuthenticationElement.mount(linkAuthenticationElementContainer);
363
- linkAuthenticationElement.on('change', event => {
364
- cart.stripeStore.stripeLinkEventData = event;
365
- // run prefetch landed cost when address is changed
366
- void cart.stripeStorePrefetchLandedCost();
367
- });
368
- cart.stripeStore.stripeLinkElement = linkAuthenticationElement;
369
- }
370
- componentDidLoad() {
371
- // @Watch doesn't get trigger on initial load
372
- this.watchInitStripe();
373
- }
374
- render() {
375
- // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
376
- return (index.h(index.Host, { key: '97c3c388d1a035e6a46ecdbd3bc66d80a589b19f', class: "zonos--link-authentication zonos--elements" }, index.h("zonos-text", { key: 'e799af821045b2c1792d2971843afa0c7d3ece5b', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: 'eaf9be27a11d279c13f261e1312ee8a46e4620f7', class: "zonos--link-authentication-component" })));
377
- }
378
- get el() { return index.getElement(this); }
379
- static get watchers() { return {
380
- "stripe": ["watchInitStripe"]
381
- }; }
382
- };
383
- ZonosLinkAuthentication.style = ZonosLinkAuthenticationStyle0;
384
-
385
- exports.zonos_address = ZonosAddress;
386
- exports.zonos_checkbox = ZonosCheckbox;
387
- exports.zonos_collapse = ZonosCollapse;
388
- exports.zonos_link_authentication = ZonosLinkAuthentication;
@@ -1,39 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-3b4816ef.js');
6
- const zonosStore = require('./zonosStore-aee974e0.js');
7
- const isColorVariable = require('./isColorVariable-fff5e469.js');
8
-
9
- const zonosIconCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";
10
- const ZonosIconStyle0 = zonosIconCss;
11
-
12
- const ZonosIcon = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- this.autoHeight = false;
16
- this.iconColor = 'gray-1200';
17
- this.content = undefined;
18
- this.size = 24;
19
- }
20
- render() {
21
- if (!this.content || !this.el.shadowRoot) {
22
- return null;
23
- }
24
- const iconColor = isColorVariable.isColorVariable(this.iconColor)
25
- ? `var(--amino-${this.iconColor})`
26
- : this.iconColor;
27
- this.el.shadowRoot.innerHTML = this.content;
28
- return (index.h(index.Host, { class: "zonos--elements", style: {
29
- '--color': iconColor,
30
- '--font-family': zonosStore.zonosStoreFontFamily(),
31
- '--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
32
- '--width': `${this.size}px`,
33
- } }));
34
- }
35
- get el() { return index.getElement(this); }
36
- };
37
- ZonosIcon.style = ZonosIconStyle0;
38
-
39
- exports.zonos_icon = ZonosIcon;
@@ -1,21 +0,0 @@
1
- import { h as handleFetch } from './stripe.js';
2
-
3
- const sendErrorLog = async ({ endpoint, errors, metadata }) => {
4
- const userAgentData = 'userAgentData' in window.navigator
5
- ? // userAgentData is not yet supported in all browsers
6
- window.navigator.userAgentData
7
- : null;
8
- const errorObject = {
9
- endpoint,
10
- errors,
11
- metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
12
- ? userAgentData
13
- : window.navigator.userAgent }, metadata),
14
- };
15
- void handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
16
- body: errorObject,
17
- method: 'POST',
18
- });
19
- };
20
-
21
- export { sendErrorLog as s };