@zonos/elements 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. package/dist/cjs/ILanguage-d247b45b.js +26 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  3. package/dist/cjs/{cart-c1b0915c.js → cart-b8bbf22d.js} +62 -19
  4. package/dist/cjs/{getBorderRadius-cd7ef574.js → getBorderRadius-b252096d.js} +8 -4
  5. package/dist/cjs/index.cjs.js +0 -21
  6. package/dist/cjs/{isDarkColor-5eda1323.js → isDarkColor-168002d6.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +5 -3
  8. package/dist/cjs/{localization-d43e1540.js → localization-2c9f5765.js} +366 -1
  9. package/dist/cjs/{submitGtag-bd6e9b42.js → submitGtag-792fe45d.js} +2 -2
  10. package/dist/cjs/zonos-address_4.cjs.entry.js +289 -0
  11. package/dist/cjs/zonos-badge_2.cjs.entry.js +57 -0
  12. package/dist/cjs/zonos-banner.cjs.entry.js +4 -9
  13. package/dist/cjs/{zonos-button_2.cjs.entry.js → zonos-button_3.cjs.entry.js} +42 -15
  14. package/dist/cjs/zonos-card_2.cjs.entry.js +26 -14
  15. package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +75 -84
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +12 -13
  17. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +40 -0
  20. package/dist/cjs/{zonos-country-flag_4.cjs.entry.js → zonos-country-select_3.cjs.entry.js} +29 -55
  21. package/dist/cjs/zonos-elements.cjs.js +6 -4
  22. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +13 -8
  23. package/dist/cjs/zonos-hello.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-logo.cjs.entry.js +32 -0
  25. package/dist/cjs/zonos-notification.cjs.entry.js +5 -6
  26. package/dist/cjs/zonos-payment.cjs.entry.js +7 -7
  27. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +45 -0
  28. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +4 -4
  29. package/dist/cjs/zonos-text.cjs.entry.js +4 -6
  30. package/dist/cjs/{zonosStore-b88b5671.js → zonosStore-5d94dabb.js} +1 -1
  31. package/dist/collection/collection-manifest.json +6 -1
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +1 -1
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -5
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/chevronDownIcon.svg +1 -0
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/globe.svg +3 -0
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIcon.svg +5 -0
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +126 -0
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +60 -0
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +1 -1
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +12 -21
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -5
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +9 -0
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -3
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
  46. package/dist/collection/components/common/zonos-badge/zonos-badge.js +7 -26
  47. package/dist/collection/components/common/zonos-banner/zonos-banner.js +2 -25
  48. package/dist/collection/components/common/zonos-button/zonos-button.css +18 -0
  49. package/dist/collection/components/common/zonos-button/zonos-button.js +9 -28
  50. package/dist/collection/components/common/zonos-card/zonos-card.js +2 -20
  51. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +82 -0
  52. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +218 -0
  53. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  54. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +1 -20
  55. package/dist/collection/components/common/zonos-country-select/assets/greenCheckDuotone.svg +4 -0
  56. package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +11 -10
  57. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -11
  58. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  59. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  60. package/dist/collection/components/common/zonos-icon/zonos-icon.js +4 -4
  61. package/dist/collection/components/common/zonos-language-select/assets/greenCheckDuotone.svg +4 -0
  62. package/dist/collection/components/common/zonos-language-select/zonos-language-select.css +61 -0
  63. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +58 -0
  64. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -21
  65. package/dist/collection/components/common/zonos-notification/zonos-notification.js +3 -26
  66. package/dist/collection/components/common/zonos-select-dialog-header/assets/removeIcon.svg +1 -0
  67. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.css +45 -0
  68. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +68 -0
  69. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
  70. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -4
  71. package/dist/collection/components/common/zonos-text/zonos-text.js +4 -24
  72. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.css +55 -0
  73. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +72 -0
  74. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -21
  75. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  76. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/globe.svg +3 -0
  77. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +10 -0
  78. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +27 -5
  79. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +16 -2
  80. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +11 -5
  81. package/dist/collection/components/main/zonos-controller.js +1 -1
  82. package/dist/collection/components/store/checkout/stripe.js +28 -7
  83. package/dist/collection/components/store/hello/localization.js +5 -1
  84. package/dist/collection/components/store/translationStore/strings.arabic.js +18 -0
  85. package/dist/collection/components/store/translationStore/strings.base.js +18 -0
  86. package/dist/collection/components/store/translationStore/strings.chinese.js +18 -0
  87. package/dist/collection/components/store/translationStore/strings.danish.js +18 -0
  88. package/dist/collection/components/store/translationStore/strings.dutch.js +18 -0
  89. package/dist/collection/components/store/translationStore/strings.french.js +18 -0
  90. package/dist/collection/components/store/translationStore/strings.german.js +18 -0
  91. package/dist/collection/components/store/translationStore/strings.hebrew.js +18 -0
  92. package/dist/collection/components/store/translationStore/strings.indonesian.js +18 -0
  93. package/dist/collection/components/store/translationStore/strings.italian.js +18 -0
  94. package/dist/collection/components/store/translationStore/strings.japanese.js +18 -0
  95. package/dist/collection/components/store/translationStore/strings.korean.js +18 -0
  96. package/dist/collection/components/store/translationStore/strings.norwegian.js +18 -0
  97. package/dist/collection/components/store/translationStore/strings.polish.js +18 -0
  98. package/dist/collection/components/store/translationStore/strings.portuguese.js +18 -0
  99. package/dist/collection/components/store/translationStore/strings.russian.js +18 -0
  100. package/dist/collection/components/store/translationStore/strings.spanish.js +18 -0
  101. package/dist/collection/components/store/translationStore/strings.swedish.js +18 -0
  102. package/dist/collection/components/store/translationStore/strings.turkish.js +18 -0
  103. package/dist/collection/components/store/translationStore/strings.vietnamese.js +18 -0
  104. package/dist/collection/components/stripe/zonos-address/zonos-address.js +63 -24
  105. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  106. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  107. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +19 -1
  108. package/dist/collection/components/utils/api/triggerBuildLandedCost.js +11 -5
  109. package/dist/collection/components/utils/getBorderRadius.js +7 -3
  110. package/dist/collection/types/ILanguage.js +22 -0
  111. package/dist/collection/types/generated/graphql.customer.types.js +13 -0
  112. package/dist/collection/types/index.js +0 -1
  113. package/dist/collection/types/styles/Color.js +9 -0
  114. package/dist/components/ILanguage.js +24 -0
  115. package/dist/components/getBorderRadius.js +7 -3
  116. package/dist/components/index.js +0 -1
  117. package/dist/components/isDarkColor.js +1 -1
  118. package/dist/components/localization.js +365 -1
  119. package/dist/components/{cart.js → stripe.js} +273 -228
  120. package/dist/components/submitGtag.js +1 -1
  121. package/dist/components/zonos-address2.js +65 -26
  122. package/dist/components/zonos-badge2.js +8 -10
  123. package/dist/components/zonos-banner2.js +3 -9
  124. package/dist/components/zonos-button2.js +10 -12
  125. package/dist/components/zonos-card2.js +3 -5
  126. package/dist/components/zonos-cart-items2.js +1 -1
  127. package/dist/components/zonos-cart-subtotal2.js +14 -8
  128. package/dist/components/zonos-checkbox.d.ts +11 -0
  129. package/dist/components/zonos-checkbox.js +6 -0
  130. package/dist/components/zonos-checkbox2.js +87 -0
  131. package/dist/components/zonos-checkout-finish2.js +3 -3
  132. package/dist/components/zonos-checkout-footer.d.ts +11 -0
  133. package/dist/components/zonos-checkout-footer.js +6 -0
  134. package/dist/components/zonos-checkout-footer2.js +109 -0
  135. package/dist/components/zonos-checkout-payment2.js +2 -2
  136. package/dist/components/zonos-checkout.js +75 -52
  137. package/dist/components/zonos-collapse2.js +3 -3
  138. package/dist/components/zonos-component.js +1 -1
  139. package/dist/components/zonos-controller.js +4 -4
  140. package/dist/components/zonos-country-flag2.js +3 -5
  141. package/dist/components/zonos-country-select2.js +26 -19
  142. package/dist/components/zonos-custom-message2.js +3 -3
  143. package/dist/components/zonos-customer-info2.js +30 -10
  144. package/dist/components/zonos-dialog2.js +4 -4
  145. package/dist/components/zonos-hello-dialog-footer2.js +23 -10
  146. package/dist/components/zonos-hello-dialog2.js +41 -23
  147. package/dist/components/zonos-hello.js +31 -19
  148. package/dist/components/zonos-icon2.js +4 -4
  149. package/dist/components/zonos-language-select.d.ts +11 -0
  150. package/dist/components/zonos-language-select.js +6 -0
  151. package/dist/components/zonos-language-select2.js +87 -0
  152. package/dist/components/zonos-link-authentication2.js +2 -2
  153. package/dist/components/zonos-logo.js +44 -1
  154. package/dist/components/zonos-notification2.js +4 -6
  155. package/dist/components/zonos-payment2.js +2 -2
  156. package/dist/components/zonos-review2.js +4 -4
  157. package/dist/components/zonos-select-dialog-header.d.ts +11 -0
  158. package/dist/components/zonos-select-dialog-header.js +6 -0
  159. package/dist/components/zonos-select-dialog-header2.js +71 -0
  160. package/dist/components/zonos-shipping-rich-radio2.js +2 -2
  161. package/dist/components/zonos-shipping2.js +2 -2
  162. package/dist/components/zonos-spinner2.js +3 -3
  163. package/dist/components/zonos-text2.js +4 -7
  164. package/dist/components/zonos-tooltip.d.ts +11 -0
  165. package/dist/components/zonos-tooltip.js +6 -0
  166. package/dist/components/zonos-tooltip2.js +48 -0
  167. package/dist/components/zonos-v-stack2.js +4 -6
  168. package/dist/components/zonosStore.js +1 -1
  169. package/dist/esm/ILanguage-97790bee.js +24 -0
  170. package/dist/esm/app-globals-0f993ce5.js +3 -0
  171. package/dist/esm/{cart-7e7c7585.js → cart-bc3bb22e.js} +63 -18
  172. package/dist/esm/getBorderRadius-e9736f7e.js +20 -0
  173. package/dist/esm/index.js +1 -6
  174. package/dist/esm/{isDarkColor-8696cb70.js → isDarkColor-e982fa09.js} +1 -1
  175. package/dist/esm/loader.js +6 -4
  176. package/dist/esm/{localization-5d83fde2.js → localization-d8f6453b.js} +366 -2
  177. package/dist/esm/{submitGtag-776c5e10.js → submitGtag-bebe2cb0.js} +2 -2
  178. package/dist/esm/zonos-address_4.entry.js +282 -0
  179. package/dist/esm/zonos-badge_2.entry.js +52 -0
  180. package/dist/esm/zonos-banner.entry.js +4 -9
  181. package/dist/esm/{zonos-button_2.entry.js → zonos-button_3.entry.js} +42 -16
  182. package/dist/esm/zonos-card_2.entry.js +26 -14
  183. package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +75 -83
  184. package/dist/esm/zonos-checkout.entry.js +12 -13
  185. package/dist/esm/zonos-component.entry.js +2 -2
  186. package/dist/esm/zonos-controller.entry.js +7 -7
  187. package/dist/esm/zonos-country-flag.entry.js +36 -0
  188. package/dist/esm/{zonos-country-flag_4.entry.js → zonos-country-select_3.entry.js} +30 -55
  189. package/dist/esm/zonos-elements.js +7 -5
  190. package/dist/esm/zonos-hello-dialog.entry.js +13 -8
  191. package/dist/esm/zonos-hello.entry.js +3 -3
  192. package/dist/esm/zonos-logo.entry.js +28 -0
  193. package/dist/esm/zonos-notification.entry.js +5 -6
  194. package/dist/esm/zonos-payment.entry.js +7 -7
  195. package/dist/esm/zonos-select-dialog-header_2.entry.js +40 -0
  196. package/dist/esm/zonos-shipping-rich-radio.entry.js +4 -4
  197. package/dist/esm/zonos-text.entry.js +4 -6
  198. package/dist/esm/{zonosStore-e59617f8.js → zonosStore-e6c7be3a.js} +1 -1
  199. package/dist/esm-es5/ILanguage-97790bee.js +1 -0
  200. package/dist/esm-es5/app-globals-0f993ce5.js +1 -0
  201. package/dist/esm-es5/cart-bc3bb22e.js +1 -0
  202. package/dist/esm-es5/getBorderRadius-e9736f7e.js +1 -0
  203. package/dist/esm-es5/index.js +0 -1
  204. package/dist/esm-es5/{isDarkColor-8696cb70.js → isDarkColor-e982fa09.js} +1 -1
  205. package/dist/esm-es5/loader.js +1 -1
  206. package/dist/esm-es5/localization-d8f6453b.js +1 -0
  207. package/dist/esm-es5/{submitGtag-776c5e10.js → submitGtag-bebe2cb0.js} +1 -1
  208. package/dist/esm-es5/zonos-address_4.entry.js +1 -0
  209. package/dist/esm-es5/zonos-badge_2.entry.js +1 -0
  210. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  211. package/dist/esm-es5/zonos-button_3.entry.js +1 -0
  212. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  213. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -0
  214. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  215. package/dist/esm-es5/zonos-component.entry.js +1 -1
  216. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  217. package/dist/esm-es5/zonos-country-flag.entry.js +1 -0
  218. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -0
  219. package/dist/esm-es5/zonos-elements.js +1 -1
  220. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  221. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  222. package/dist/esm-es5/zonos-logo.entry.js +1 -0
  223. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  224. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  225. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -0
  226. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  227. package/dist/esm-es5/zonos-text.entry.js +1 -1
  228. package/dist/esm-es5/{zonosStore-e59617f8.js → zonosStore-e6c7be3a.js} +1 -1
  229. package/dist/scripts/insertTranslations.js +1 -0
  230. package/dist/scripts/loadZonos.js +1 -1
  231. package/dist/scripts/zonos.js +1 -1
  232. package/dist/scripts/zonosBase.js +1 -1
  233. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +2 -1
  234. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.d.ts +7 -0
  235. package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +1 -5
  236. package/dist/types/components/common/zonos-banner/zonos-banner.d.ts +0 -4
  237. package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -5
  238. package/dist/types/components/common/zonos-card/zonos-card.d.ts +0 -4
  239. package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +42 -0
  240. package/dist/types/components/common/zonos-country-flag/zonos-country-flag.d.ts +0 -4
  241. package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +1 -1
  242. package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +1 -1
  243. package/dist/types/components/common/zonos-language-select/zonos-language-select.d.ts +9 -0
  244. package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +0 -4
  245. package/dist/types/components/common/zonos-notification/zonos-notification.d.ts +0 -4
  246. package/dist/types/components/common/zonos-select-dialog-header/zonos-select-dialog-header.d.ts +12 -0
  247. package/dist/types/components/common/zonos-spinner/zonos-spinner.d.ts +1 -1
  248. package/dist/types/components/common/zonos-text/zonos-text.d.ts +1 -5
  249. package/dist/types/components/common/zonos-tooltip/zonos-tooltip.d.ts +12 -0
  250. package/dist/types/components/common/zonos-v-stack/zonos-v-stack.d.ts +0 -4
  251. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.d.ts +5 -0
  252. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +2 -0
  253. package/dist/types/components/store/checkout/stripe.d.ts +8 -0
  254. package/dist/types/components/store/hello/localization.d.ts +2 -1
  255. package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -0
  256. package/dist/types/components/store/translationStore/strings.base.d.ts +18 -0
  257. package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -0
  258. package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -0
  259. package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -0
  260. package/dist/types/components/store/translationStore/strings.french.d.ts +18 -0
  261. package/dist/types/components/store/translationStore/strings.german.d.ts +18 -0
  262. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -0
  263. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -0
  264. package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -0
  265. package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -0
  266. package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -0
  267. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -0
  268. package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -0
  269. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -0
  270. package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -0
  271. package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -0
  272. package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -0
  273. package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -0
  274. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -0
  275. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +3 -0
  276. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  277. package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +18 -2
  278. package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
  279. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
  280. package/dist/types/components/utils/getBorderRadius.d.ts +1 -1
  281. package/dist/types/components.d.ts +242 -116
  282. package/dist/types/types/ILanguage.d.ts +81 -0
  283. package/dist/types/types/checkout/CheckoutConfig.d.ts +3 -3
  284. package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +13 -0
  285. package/dist/types/types/generated/graphql.customer.types.d.ts +16 -4
  286. package/dist/types/types/generated/graphql.customer.types.ts +21 -4
  287. package/dist/types/types/generated/graphql.frontend.types.d.ts +6 -6
  288. package/dist/types/types/generated/graphql.frontend.types.ts +14 -4
  289. package/dist/types/types/index.d.ts +1 -1
  290. package/dist/types/types/styles/Color.d.ts +2 -0
  291. package/dist/zonos-elements/index.esm.js +0 -1
  292. package/dist/zonos-elements/{p-626b5a52.system.entry.js → p-00d63df1.system.entry.js} +1 -1
  293. package/dist/zonos-elements/p-04f63cea.entry.js +1 -0
  294. package/dist/zonos-elements/{p-120df5be.system.entry.js → p-06652d87.system.entry.js} +1 -1
  295. package/dist/zonos-elements/p-066c5893.system.js +1 -0
  296. package/dist/zonos-elements/p-0c7480a5.entry.js +1 -0
  297. package/dist/zonos-elements/p-16ad90ca.js +1 -0
  298. package/dist/zonos-elements/p-16b74c31.system.js +1 -0
  299. package/dist/zonos-elements/{p-0024f8c2.js → p-17550a10.js} +1 -1
  300. package/dist/zonos-elements/p-1d16a6fb.js +1 -0
  301. package/dist/zonos-elements/p-1ea68e3b.entry.js +1 -0
  302. package/dist/zonos-elements/{p-28d7b75d.entry.js → p-1ed530cc.entry.js} +1 -1
  303. package/dist/zonos-elements/p-289c8b1a.system.entry.js +1 -0
  304. package/dist/zonos-elements/{p-eb631432.system.entry.js → p-2a00c270.system.entry.js} +1 -1
  305. package/dist/zonos-elements/{p-be23cc91.system.entry.js → p-32bca9c8.system.entry.js} +1 -1
  306. package/dist/zonos-elements/p-37f53a79.entry.js +1 -0
  307. package/dist/zonos-elements/p-394cf1cf.js +1 -0
  308. package/dist/zonos-elements/{p-af910392.js → p-3ef27745.js} +1 -1
  309. package/dist/zonos-elements/{p-18e09138.system.entry.js → p-458fd100.system.entry.js} +1 -1
  310. package/dist/zonos-elements/{p-e8da4463.js → p-47fac33f.js} +1 -1
  311. package/dist/zonos-elements/p-49a764e9.system.entry.js +1 -0
  312. package/dist/zonos-elements/p-4fafb2a5.system.entry.js +1 -0
  313. package/dist/zonos-elements/p-4fb71a93.js +1 -0
  314. package/dist/zonos-elements/{p-dc09ca69.system.js → p-50287643.system.js} +1 -1
  315. package/dist/zonos-elements/p-50ea2036.system.js +1 -0
  316. package/dist/zonos-elements/p-5276c61b.system.entry.js +1 -0
  317. package/dist/zonos-elements/p-56ba5cbf.system.js +1 -0
  318. package/dist/zonos-elements/{p-5a0264e8.system.entry.js → p-5a113c3d.system.entry.js} +1 -1
  319. package/dist/zonos-elements/p-6308b347.entry.js +1 -0
  320. package/dist/zonos-elements/p-63d1b1fe.entry.js +1 -0
  321. package/dist/zonos-elements/p-7347ee7c.system.entry.js +1 -0
  322. package/dist/zonos-elements/p-7a6144b1.entry.js +1 -0
  323. package/dist/zonos-elements/p-7dd8e8ba.system.entry.js +1 -0
  324. package/dist/zonos-elements/p-8c26a080.system.js +1 -0
  325. package/dist/zonos-elements/p-96aabe02.entry.js +1 -0
  326. package/dist/zonos-elements/p-9cbbf261.system.entry.js +1 -0
  327. package/dist/zonos-elements/p-a33745e9.entry.js +1 -0
  328. package/dist/zonos-elements/{p-aca66e4b.entry.js → p-a4de3fb2.entry.js} +1 -1
  329. package/dist/zonos-elements/p-a682fd38.system.entry.js +1 -0
  330. package/dist/zonos-elements/p-abe7524f.system.js +1 -0
  331. package/dist/zonos-elements/{p-73174d0c.system.entry.js → p-b81a0577.system.entry.js} +1 -1
  332. package/dist/zonos-elements/p-ba1a111a.system.entry.js +1 -0
  333. package/dist/zonos-elements/p-ba43275e.entry.js +1 -0
  334. package/dist/zonos-elements/p-bd6a2095.entry.js +1 -0
  335. package/dist/zonos-elements/{p-f82e000f.system.entry.js → p-c4321084.system.entry.js} +1 -1
  336. package/dist/zonos-elements/{p-b58d2231.entry.js → p-cdf114a2.entry.js} +1 -1
  337. package/dist/zonos-elements/p-d5ae3cbb.system.entry.js +1 -0
  338. package/dist/zonos-elements/p-d5d7c8f5.entry.js +1 -0
  339. package/dist/zonos-elements/p-dd7729fd.system.entry.js +1 -0
  340. package/dist/zonos-elements/p-de339fb6.entry.js +1 -0
  341. package/dist/zonos-elements/p-e1255160.js +1 -0
  342. package/dist/zonos-elements/p-e8a9bc56.entry.js +1 -0
  343. package/dist/zonos-elements/{p-7f68c103.system.js → p-e99d79d9.system.js} +1 -1
  344. package/dist/zonos-elements/p-ec25f180.entry.js +1 -0
  345. package/dist/zonos-elements/{p-ead79548.system.js → p-f49dfd06.system.js} +1 -1
  346. package/dist/zonos-elements/{p-31fa76da.entry.js → p-f6f5f644.entry.js} +1 -1
  347. package/dist/zonos-elements/p-fcc4f140.system.js +1 -0
  348. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  349. package/dist/zonos-elements/zonos-elements.js +1 -1
  350. package/package.json +17 -18
  351. package/dist/cjs/zonos-address_2.cjs.entry.js +0 -161
  352. package/dist/cjs/zonos-badge.cjs.entry.js +0 -38
  353. package/dist/cjs/zonos-icon.cjs.entry.js +0 -35
  354. package/dist/collection/components/common/zonos-country-select/assets/arrowLeftBlue.svg +0 -1
  355. package/dist/components/zonos-logo2.js +0 -48
  356. package/dist/esm/getBorderRadius-9e4cb3b1.js +0 -16
  357. package/dist/esm/zonos-address_2.entry.js +0 -156
  358. package/dist/esm/zonos-badge.entry.js +0 -34
  359. package/dist/esm/zonos-icon.entry.js +0 -31
  360. package/dist/esm-es5/cart-7e7c7585.js +0 -1
  361. package/dist/esm-es5/getBorderRadius-9e4cb3b1.js +0 -1
  362. package/dist/esm-es5/localization-5d83fde2.js +0 -1
  363. package/dist/esm-es5/zonos-address_2.entry.js +0 -1
  364. package/dist/esm-es5/zonos-badge.entry.js +0 -1
  365. package/dist/esm-es5/zonos-button_2.entry.js +0 -1
  366. package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
  367. package/dist/esm-es5/zonos-country-flag_4.entry.js +0 -1
  368. package/dist/esm-es5/zonos-icon.entry.js +0 -1
  369. package/dist/zonos-elements/p-027abb50.entry.js +0 -1
  370. package/dist/zonos-elements/p-09c5dc1b.system.entry.js +0 -1
  371. package/dist/zonos-elements/p-1156ae5d.system.entry.js +0 -1
  372. package/dist/zonos-elements/p-12ecf765.system.js +0 -1
  373. package/dist/zonos-elements/p-174239da.system.js +0 -1
  374. package/dist/zonos-elements/p-1c00ffea.system.entry.js +0 -1
  375. package/dist/zonos-elements/p-21793192.entry.js +0 -1
  376. package/dist/zonos-elements/p-2589a038.system.entry.js +0 -1
  377. package/dist/zonos-elements/p-3319e4db.entry.js +0 -1
  378. package/dist/zonos-elements/p-357f0c61.entry.js +0 -1
  379. package/dist/zonos-elements/p-410045c5.system.entry.js +0 -1
  380. package/dist/zonos-elements/p-4d0861e9.system.js +0 -1
  381. package/dist/zonos-elements/p-54ef8ff3.entry.js +0 -1
  382. package/dist/zonos-elements/p-6444a4b9.entry.js +0 -1
  383. package/dist/zonos-elements/p-65f4af1a.system.entry.js +0 -1
  384. package/dist/zonos-elements/p-661bc488.entry.js +0 -1
  385. package/dist/zonos-elements/p-6c47083f.entry.js +0 -1
  386. package/dist/zonos-elements/p-6d454281.entry.js +0 -1
  387. package/dist/zonos-elements/p-7748735d.entry.js +0 -1
  388. package/dist/zonos-elements/p-78886ed6.system.entry.js +0 -1
  389. package/dist/zonos-elements/p-8ebc0b64.js +0 -1
  390. package/dist/zonos-elements/p-a6f2e282.system.js +0 -1
  391. package/dist/zonos-elements/p-b035f9e5.system.js +0 -1
  392. package/dist/zonos-elements/p-b1ffb37b.entry.js +0 -1
  393. package/dist/zonos-elements/p-bd02a65c.entry.js +0 -1
  394. package/dist/zonos-elements/p-bea31a7b.system.entry.js +0 -1
  395. package/dist/zonos-elements/p-cfe4a318.js +0 -1
  396. package/dist/zonos-elements/p-e4a2a1b0.system.entry.js +0 -1
  397. package/dist/zonos-elements/p-f2733cc7.js +0 -1
  398. package/dist/zonos-elements/p-f342e7c7.entry.js +0 -1
  399. /package/dist/cjs/{index-3ead02fe.js → index-72767498.js} +0 -0
  400. /package/dist/esm/{index-81a199ef.js → index-b5be4dc3.js} +0 -0
  401. /package/dist/esm-es5/{index-81a199ef.js → index-b5be4dc3.js} +0 -0
  402. /package/dist/zonos-elements/{p-4d8545e1.js → p-58127116.js} +0 -0
  403. /package/dist/zonos-elements/{p-4d39efb6.system.js → p-d1ab0823.system.js} +0 -0
@@ -1 +0,0 @@
1
- import{r as o,h as r,H as a}from"./p-4d8545e1.js";import{d as s}from"./p-e8da4463.js";import{c as e}from"./p-b4b7f705.js";const t=class{constructor(r){o(this,r),this.handleSlotChange=()=>{this.hasContent=!0},this.bannerTitle=void 0,this.intent=void 0,this.class="",this.hasContent=!1}render(){const o=({color:o})=>{const a=`var(--amino-${o}-800)`,s=`var(--amino-${o}-300)`,[t,n]=[this.bannerTitle,r("slot",{onSlotchange:this.handleSlotChange})].filter(Boolean),i="gray"===o?"gray-1200":`${o}-800`;return r("div",{class:e(["zonos--container"])},r("div",{class:"zonos--icon-wrapper"},r("svg",{color:a,fill:"none",height:"20",viewBox:"0 0 24 24",width:"20",xmlns:"https://www.w3.org/2000/svg"},r("path",{"clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z","data-is-secondary-color":"true",fill:s,"fill-rule":"evenodd"}),r("path",{"clip-rule":"evenodd",d:"M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z",fill:"currentColor","fill-rule":"evenodd"}))),r("div",{class:"zonos--header-wrapper"},r("zonos-text",{color:i,type:"label",weight:600},t)),n&&r("div",{class:"zonos--content-wrapper"},r("zonos-text",{color:i},n)))},t=e(["zonos--elements zonos--banner",this.class,this.intent]),n=s();switch(this.intent){case"error":return r(a,{class:t,style:{"--font-family":n}},o({color:"red"}));case"info":return r(a,{class:t,style:{"--font-family":n}},o({color:"blue"}));case"success":return r(a,{class:t,style:{"--font-family":n}},o({color:"green"}));case"warning":return r(a,{class:t,style:{"--font-family":n}},o({color:"orange"}));default:return r(a,{class:t,style:{"--font-family":n}},o({color:"gray"}))}}};t.style=':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{border-radius:var(--amino-radius-10);padding:var(--amino-space-16);background:var(--amino-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:"icon header" ". content";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:var(--amino-space-0);grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:var(--amino-space-4)}:host(.info){background-color:var(--amino-blue-100);border:1px solid var(--amino-blue-200)}:host(.success){background-color:var(--amino-green-100);border:1px solid var(--amino-green-200)}:host(.error){background-color:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host(.warning){background-color:var(--amino-orange-100);border:1px solid var(--amino-orange-200)}';export{t as zonos_banner}
@@ -1 +0,0 @@
1
- System.register(["./p-4d39efb6.system.js","./p-dc09ca69.system.js","./p-23e7c655.system.js"],(function(o){"use strict";var a,r,n,e,t;return{setters:[function(o){a=o.r;r=o.h;n=o.H},function(o){e=o.d},function(o){t=o.c}],execute:function(){var s=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";var i=s;var l=o("zonos_badge",function(){function o(o){a(this,o);this.bold=false;this.color="gray";this.icon=undefined;this.iconRight=false;this.size="default";this.rounded=false;this.class=""}o.prototype.render=function(){return r(n,{key:"2d111e91f403ef5c03f742f5dabe9491623be91d",class:t(["zonos--elements zonos--badge",this.class]),style:{"--font-family":e()}},r("div",{key:"e6debe091b732b857f180cee19bec4be435ea524",class:t(["zonos--badge-content",this.color,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,r("zonos-text",{key:"e92c97d77fa5ce279059953f7d7fbc5a0030aa5d"},r("slot",{key:"c93852c3225ba57dd26c26300254f348e349f9ad"}))))};return o}());l.style=i}}}));
@@ -1 +0,0 @@
1
- import{z as e,c as t}from"./p-e8da4463.js";import{h as o,l as n,a as r,b as s,t as i}from"./p-8ebc0b64.js";import{i as a}from"./p-0024f8c2.js";import{g as l}from"./p-f2733cc7.js";const d=()=>{const e=m.stripeLinkEventData,t=m.stripeAddressEventData;if(!t||!t.complete)throw new Error("Missing stripe address data");return{checkoutSessionId:E.checkoutSessionId||"",contact:{email:(null==e?void 0:e.value.email)||"",firstName:t.value.firstName||"",lastName:t.value.lastName||"",phone:t.value.phone||""},items:E.items.map((e=>e)),shippingAddress:{addressLine1:t.value.address.line1,addressLine2:t.value.address.line2||"",city:t.value.address.city,country:t.value.address.country,postalCode:t.value.address.postal_code,state:t.value.address.state}}},c=({borderStyle:e,theme:t})=>"DARK"===t?{borderRadius:l(e),colorBackground:"#101117",colorBackgroundText:"#C5C6CA",colorText:"#C5C6CA",colorTextPlaceholder:"#C5C6CA"}:{borderRadius:l(e)},{onChange:u,reset:p,state:m}=t((()=>({clientSecret:sessionStorage.getItem("zonos--client-secret")||null,fetchingLandedCostAbordController:null,isFetchingLandedCost:!1,isFetchingSession:!1,stripe:null,stripeAddressElement:null,stripeAddressEventData:null,stripeAddressUsedWhenFetchingLC:null,stripeBillingAddressElement:null,stripeElements:null,stripeElementsOptions:null,stripeLinkElement:null,stripeLinkEventData:null,stripeLinkUsedWhenFetchingLC:null,stripePaymentElement:null,stripePaymentEventData:null}))),h=async t=>{var o;const s=m.clientSecret;if(m.stripe){if(s){const i=(({clientSecret:t,overrideBorderRaidus:o,overridePrimaryColor:n,overrideSecondaryColor:s,overrideTheme:i})=>{const l=n||e.appearance.colorPrimary,d=s||e.appearance.colorSecondary,u=l&&a(l)?"night":"flat",p="DARK"===i?"night":"flat";return{appearance:{labels:"floating",rules:Object.assign({},{".Input":{padding:"0",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"8px",paddingTop:"6px"}}),theme:i?p:u,variables:Object.assign(Object.assign({},c({borderStyle:o,theme:"LIGHT"})),{colorPrimary:d})},clientSecret:t,locale:r.selectedLocale}})({clientSecret:s,overrideBorderRaidus:null==t?void 0:t.overrideBorderRaidus,overridePrimaryColor:null==t?void 0:t.overridePrimaryColor,overrideSecondaryColor:null==t?void 0:t.overrideSecondaryColor,overrideTheme:null==t?void 0:t.overrideTheme}),l=JSON.stringify(i)===JSON.stringify(m.stripeElementsOptions);if(!m.stripeElements)return m.stripeElements=null===(o=m.stripe)||void 0===o?void 0:o.elements(i),m.stripeElementsOptions=i,void n("Stripe elements initialized");l||(m.stripeElements.update(i),m.stripeElementsOptions=i),n("Stripe elements initialized")}}else n("Skip. Stripe is not initialized")},v=()=>{sessionStorage.removeItem("zonos--client-secret"),p(),m.stripe=window.Zonos.stripe},g=async()=>{var t,n,r,i;const a=!!(null===(t=m.stripeAddressEventData)||void 0===t?void 0:t.complete),l=!!(null===(n=m.stripeLinkEventData)||void 0===n?void 0:n.complete),c=(()=>{var e,t,o,n;if(!m.fetchingLandedCostAbordController)return!1;const r=JSON.stringify(null===(e=m.stripeLinkUsedWhenFetchingLC)||void 0===e?void 0:e.value)!==JSON.stringify(null===(t=m.stripeLinkEventData)||void 0===t?void 0:t.value),s=JSON.stringify(null===(o=m.stripeAddressUsedWhenFetchingLC)||void 0===o?void 0:o.value)!==JSON.stringify(null===(n=m.stripeAddressEventData)||void 0===n?void 0:n.value);return r||s})();if(c&&(null===(r=m.fetchingLandedCostAbordController)||void 0===r||r.abort(),m.fetchingLandedCostAbordController=null),a&&l&&(c||!m.isFetchingLandedCost)){m.isFetchingLandedCost=!0,m.stripeAddressEventData&&(m.stripeAddressUsedWhenFetchingLC=Object.assign({},m.stripeAddressEventData)),m.stripeLinkEventData&&(m.stripeLinkUsedWhenFetchingLC=Object.assign({},m.stripeLinkEventData));try{const t=new AbortController;m.fetchingLandedCostAbordController=t;const{checkoutSessionWorkflow:n,shipmentRatingCalculateWorkflow:r}=await(async t=>{var n;const r=e.checkoutSettings.buildLandedCost;if(r){const e=await(async e=>{var t;const n=d(),r=await e(n.checkoutSessionId,n.contact,n.shippingAddress);if(!r)throw new Error("Failed to build landed cost");const{errors:s,json:i}=await o("https://v1.route.js.zonos.com/api/zonos-elements/validate-landed-cost",{body:r,headers:{"Content-Type":"application/json"},method:"POST"});if(!i||s.length)throw new Error(`Invalid landed cost object: ${(null===(t=s.find(Boolean))||void 0===t?void 0:t.message)||"Unknown error"}`);return r})(r);return e}const{errors:s,json:i}=await o("https://v1.route.js.zonos.com/api/zonos-elements/calculate-landed-cost",{body:d(),method:"POST",signal:null==t?void 0:t.signal});if(s.length||!i){const e="The user aborted a request."===(null===(n=s[0])||void 0===n?void 0:n.message);throw new Error(e?"The landed cost calculation request was aborted to initiate a new one.":"Failed to calculate landed cost")}return i})(t);m.fetchingLandedCostAbordController=null,E.landedCostData=(null==n?void 0:n.filter(Boolean))||null,E.shippingData=(null==r?void 0:r.filter(Boolean))||null;const s=null===(i=E.landedCostData)||void 0===i?void 0:i.find(Boolean),a=s?s.subtotals:null;a&&A({exchangeRate:a.exchangeRate,items:a.items,landedCostTotal:0,presentmentCurrencyCode:a.presentmentCurrencyCode,shipping:0,total:a.items})}catch(e){s(e)}m.isFetchingLandedCost=!1}},y=e=>{let t=[],o=!0;switch(e){case"succeeded":t=[i("Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us."),"","",i("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.")],o=!1;break;case"requires_capture":case"processing":t=[i("Payment processing. We'll update you when payment is received.")],o=!1;break;case"requires_payment_method":t=[i("Payment failed. Please try another payment method.")];break;default:t=[i("Something went wrong.")]}return{isError:o,messages:t}},f=async({clientSecret:e,storybookForceStatus:t})=>{if(t){const{isError:e,messages:o}=y(t);return{error:e,messages:o}}const o=e||m.clientSecret;if(!m.stripe||!o)return s("Failed to retrieve payment intent. Stripe is not initialized"),{error:!0,message:[i("Something went wrong.")]};const{paymentIntent:n}=await m.stripe.retrievePaymentIntent(o),r=null==n?void 0:n.status,{isError:a,messages:l}=y(r);return{error:a,messages:l}},w=async()=>{var e,t,o;const n=!!(null===(e=m.stripePaymentEventData)||void 0===e?void 0:e.complete),r=m.stripeElements,s=m.stripe;if(s&&r&&n&&m.clientSecret){const{error:e}=await s.confirmPayment({confirmParams:{receipt_email:null===(o=null===(t=m.stripeLinkEventData)||void 0===t?void 0:t.value)||void 0===o?void 0:o.email,return_url:window.location.href},elements:r,redirect:"if_required"});if(e){if("card_error"===e.type||"validation_error"===e.type)throw new Error(e.message);if("invalid_request_error"===e.type&&"payment_intent_unexpected_state"===e.code)return;throw new Error("An unexpected error occurred.")}}},S=async()=>{var e;const t=E.items.reduce(((e,t)=>e+t.amount*t.quantity),0);if(!t||!r.targetCurrency)return s("Fail to create checkout session - invalid total or currency"),!1;m.isFetchingSession=!0;const{errors:i,json:a}=await o("https://v1.route.js.zonos.com/api/zonos-elements/create-checkout-session",{body:{currency:(null===(e=E.items.find(Boolean))||void 0===e?void 0:e.currencyCode)||"",itemsAmount:t,presentmentCountryCode:r.selectedCountryCode||null},method:"POST"});if(m.isFetchingSession=!1,i.length||!a)return s("Error occurs when creating checkout session",JSON.stringify(i,null,2)),!1;const l=a.checkoutSessionCreate;return m.clientSecret=l.clientSecret,E.checkoutSessionId=l.id,A(Object.assign(Object.assign({},l.subtotals),{landedCostTotal:0,shipping:0,total:l.subtotals.items})),n("Exchange rate updated for cart items (checkout session create)","info",E.exchangeRate),n("done-init-checkout-session"),!0};u("clientSecret",(e=>{e&&m.stripe&&sessionStorage.setItem("zonos--client-secret",e),e||sessionStorage.removeItem("zonos--client-secret")}));const C=e=>{const t=new Date,o=e.getTime()-t.getTime();return Math.floor(o/864e5)},{onChange:b,reset:k,state:E}=t((()=>({checkoutSessionId:sessionStorage.getItem("zonos--checkout-session-id")||null,currency:"USD",dutiesTaxFees:0,error:null,exchangeRate:null,isSelectedShippingAboveDeminimis:!1,isSelectedShippingGuarantee:!1,items:[],landedCostData:null,selectedLandedCost:null,selectedShippingOption:null,selectedShippingOptionExpectedDate:"",selectedShippingOptionTransitTime:"",shipping:0,shippingData:null,step:"customer-info",subtotal:0,total:0}))),O=e=>{const t=e.minTransitAt?C(new Date(e.minTransitAt)):"",o=e.maxTransitAt?C(new Date(e.maxTransitAt)):"";return{expectedDate:e.minTransitAt?(({date:e,formatOptions:t={day:"numeric",weekday:"long",year:"numeric"}})=>new Intl.DateTimeFormat("en-US",t).format(e))({date:new Date(e.minTransitAt)}):"",maxTransit:o,minTransit:t}},T=()=>{sessionStorage.removeItem("zonos--checkout-session-id"),k()},j=({messages:e,title:t})=>{T(),v(),E.step="error",E.error={messages:e,title:t}},A=e=>{E.exchangeRate=e.exchangeRate,E.dutiesTaxFees=e.landedCostTotal,E.subtotal=e.items,E.total=e.total,E.currency=e.presentmentCurrencyCode},x=async({currency:e,itemsAmount:t,landedCostId:a})=>{if(a&&E.selectedLandedCost&&(A(E.selectedLandedCost.subtotals),n("Exchange rate updated for cart items (landed cost subtotal)","info",E.exchangeRate)),!E.checkoutSessionId)return s("Could not update cart total without checkout session id"),!1;const{json:l}=await(async({currency:e,id:t,itemsAmount:n,landedCostId:r,presentmentCountryCode:i})=>{const{errors:a,json:l}=await o("https://v1.route.js.zonos.com/api/zonos-elements/update-checkout-session",{body:{currency:e,id:t,itemsAmount:n,landedCostId:r,presentmentCountryCode:i},method:"POST"});return a.length||!l?(s("Error occurs when updating checkout session",JSON.stringify(a,null,2)),{errors:a,json:l}):{errors:[],json:l}})({currency:e,id:E.checkoutSessionId,itemsAmount:t,landedCostId:a,presentmentCountryCode:r.selectedCountryCode});return l?(a||(A(l.checkoutSessionUpdate.subtotals),n("Exchange rate updated for cart items (checkout session update)","info",E.exchangeRate)),!0):(s("Error occurs when updating checkout session"),j({messages:[i("There's been an error updating your checkout session. Please reload and try again or contact support if the error persists")],title:i("Error updating Checkout")}),!1)},z=async e=>{var t,o,n,r,s;E.selectedShippingOption=e;const{expectedDate:i,maxTransit:a,minTransit:l}=O(E.selectedShippingOption);E.selectedShippingOptionExpectedDate=i,E.selectedShippingOptionTransitTime=l&&a?`${l}-${a}`:`${l||a}`;const d=null===(t=E.landedCostData)||void 0===t?void 0:t.find((e=>{var t,o,n;return(null===(o=null===(t=e.landedCost)||void 0===t?void 0:t.shipmentRating)||void 0===o?void 0:o.id)===(null===(n=E.selectedShippingOption)||void 0===n?void 0:n.id)}));if(E.selectedLandedCost=d||null,!d)return!1;E.shipping=d.subtotals.shipping;const c="ZONOS"===(null===(o=null==d?void 0:d.landedCost)||void 0===o?void 0:o.landedCostGuaranteeCode),u=!!(null===(r=null===(n=null==d?void 0:d.landedCost)||void 0===n?void 0:n.deMinimis)||void 0===r?void 0:r.find((e=>["DUTY","TAX"].includes(e.type)&&"ABOVE"===e.threshold)));return E.isSelectedShippingAboveDeminimis=u,E.isSelectedShippingGuarantee=c,await x({landedCostId:null===(s=d.landedCost)||void 0===s?void 0:s.id})};b("checkoutSessionId",(()=>{E.checkoutSessionId?sessionStorage.setItem("zonos--checkout-session-id",E.checkoutSessionId):sessionStorage.removeItem("zonos--checkout-session-id")}));const D=async e=>{var t;E.items=e;const o=null===(t=e.find(Boolean))||void 0===t?void 0:t.currencyCode,n=e.reduce(((e,t)=>e+t.amount*t.quantity),0);o&&n&&(E.currency=o,m.isFetchingSession=!0,await x({currency:o,itemsAmount:n}),m.isFetchingSession=!1)},P=()=>{"customer-info"===E.step?E.step="shipping":"shipping"===E.step?E.step="payment":"payment"===E.step&&(E.step="finish")},B=()=>{"payment"===E.step?E.step="shipping":"shipping"===E.step&&(E.step="customer-info",E.selectedShippingOption=null,E.isSelectedShippingAboveDeminimis=!1,E.isSelectedShippingGuarantee=!1,E.selectedShippingOptionExpectedDate="",E.selectedShippingOptionTransitTime="",E.shipping=0)};export{A as a,O as b,E as c,P as d,B as e,x as f,T as g,D as h,z as i,j,h as k,S as l,g as m,w as n,v as o,f as p,m as s}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(n,t,o,s){function e(n){return n instanceof o?n:new o((function(t){t(n)}))}return new(o||(o=Promise))((function(o,i){function a(n){try{r(s.next(n))}catch(n){i(n)}}function c(n){try{r(s["throw"](n))}catch(n){i(n)}}function r(n){n.done?o(n.value):e(n.value).then(a,c)}r((s=s.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,e,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(n){return function(t){return r([n,t])}}function r(c){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(o=0)),o)try{if(s=1,e&&(i=c[0]&2?e["return"]:c[0]?e["throw"]||((i=e["return"])&&i.call(e),0):e.next)&&!(i=i.call(e,c[1])).done)return i;if(e=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:o.label++;return{value:c[1],done:false};case 5:o.label++;e=c[1];c=[0];continue;case 7:c=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){o=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(c[0]===6&&o.label<i[1]){o.label=i[1];i=c;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(c);break}if(i[2])o.ops.pop();o.trys.pop();continue}c=t.call(n,o)}catch(n){c=[6,n];e=0}finally{s=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-4d39efb6.system.js","./p-174239da.system.js","./p-a6f2e282.system.js","./p-aed0098c.system.js","./p-dc09ca69.system.js","./p-7f68c103.system.js","./p-12ecf765.system.js"],(function(n){"use strict";var t,o,s,e,i,a,c,r,d;return{setters:[function(n){t=n.r;o=n.h;s=n.H;e=n.d},function(n){i=n.s;a=n.m},function(n){c=n.b;r=n.a},function(n){d=n.i},function(){},function(){},function(){}],execute:function(){var u=".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:var(--amino-space-16)}";var h=u;var l=n("zonos_address",function(){function n(n){t(this,n);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.isDirtyAddress=!!i.stripeAddressEventData&&i.stripeAddressEventData.value.address.line1.length>0}n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,o,s,e,u,h,l,f,z;var m=this;return __generator(this,(function(b){this.stripe=window.Zonos.stripe;if(!this.stripe||!i.stripeElements){c("Stripe is not initialized. Couldn't load stripe element.");return[2]}l=(n=this.defaultAddress)===null||n===void 0?void 0:n.phone;if(!l){(t=this.defaultAddress)===null||t===void 0?true:delete t.phone}f=r.shippingZoneCountries;z=i.stripeElements.create("address",{allowedCountries:f?Object.values(f).map((function(n){return n.code})):[],autocomplete:{mode:"automatic"},contacts:this.defaultAddress?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},(o=i.stripeAddressEventData)===null||o===void 0?void 0:o.value.address),{country:((s=i.stripeAddressEventData)===null||s===void 0?void 0:s.value.address.country)||r.selectedCountryCode||"AL"}),firstName:(e=i.stripeAddressEventData)===null||e===void 0?void 0:e.value.firstName,lastName:(u=i.stripeAddressEventData)===null||u===void 0?void 0:u.value.lastName,phone:(h=i.stripeAddressEventData)===null||h===void 0?void 0:h.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});z.mount(this.el.querySelector(".zonos--address-component"));z.on("change",(function(n){var t=n.value;if(!m.isDirtyAddress&&t.address.line1.length>=3){m.isDirtyAddress=true;setTimeout((function(){if(d()){m.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var n=100;var t=m.el.closest(".zonos--group");var o=m.el.getBoundingClientRect().top+n;t===null||t===void 0?void 0:t.scrollTo({behavior:"smooth",top:o})}}),400)}i.stripeAddressEventData=Object.assign(Object.assign({},n),{elementMode:"shipping",elementType:"address",empty:false,value:Object.assign(Object.assign({},t),{firstName:t.firstName||t.name.split(" ")[0],lastName:t.lastName||t.name.split(" ").pop()})});void a()}));i.stripeAddressElement=z;return[2]}))}))};n.prototype.disconnectedCallback=function(){var n;(n=i.stripeAddressElement)===null||n===void 0?void 0:n.destroy()};n.prototype.componentDidLoad=function(){void this.watchInitStripe()};n.prototype.render=function(){return o(s,{key:"41014c1af1c8f8f5bb37caf358a6cec124e66f30",class:"zonos--address zonos--elements"},o("zonos-text",{key:"5d8dcc4b44f7fe7b089b630ec6ca7b2177fef371",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"da0fe9760d7ca8dbc089481ac1dcb7c0a7c6553f",class:"zonos--address-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());l.style=h;var f=".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:var(--amino-space-16)}";var z=f;var m=n("zonos_link_authentication",function(){function n(n){t(this,n);this.titleText=undefined;this.stripe=i.stripe}n.prototype.watchInitStripe=function(){if(!this.stripe||!i.stripeElements){return}var n=i.stripeLinkElement||i.stripeElements.create("linkAuthentication");var t=this.el.querySelector(".zonos--link-authentication-component");if(!t){console.error("Cannot find container element for linkAuthenticationElement");return}n.mount(t);n.on("change",(function(n){i.stripeLinkEventData=n;void a()}));i.stripeLinkElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return o(s,{key:"5d02895b441a5713b83e7b3c4b784ab4b6743f54",class:"zonos--link-authentication zonos--elements"},o("zonos-text",{key:"5bd33edd16f1511111bfcb497e0767f938172b05",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"d5a90ce88adaed9f2369af4692506d5d072c021d",class:"zonos--link-authentication-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());m.style=z}}}));
@@ -1 +0,0 @@
1
- import{z as p}from"./p-e8da4463.js";const x=x=>x?"SHARP"===x?"0px":"10px":"SHARP"===p.appearance.style?"0px":"10px";export{x as g}
@@ -1 +0,0 @@
1
- import{r as e,h as t,H as s}from"./p-4d8545e1.js";import{d as o}from"./p-e8da4463.js";import{c as i}from"./p-b4b7f705.js";const a={pageHeader:{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",weight:900},secondaryPageHeader:{label:'Secondary Page Header (3XL) • 34px, 500 "Medium"',size:"3xl",tag:"h2",weight:500},header:{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},descriptionHeader:{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},title:{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",weight:600},boldSubheader:{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:700},semiBoldSubheader:{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",weight:600},subheader:{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:500},boldLabel:{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:700},semiBoldLabel:{label:"Semi Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:600},label:{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:500},body:{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",weight:400},smallHeader:{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",weight:600},caption:{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",weight:400},hintText:{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",weight:400}},h=class{constructor(t){e(this,t),this.class="",this.color="gray-1200",this.size=void 0,this.type="body",this.weight=void 0,this.content=void 0,this.ready=!1}componentDidRender(){setTimeout((()=>{this.ready=!0}),100)}render(){const{size:e,tag:h,weight:l}=a.body,{size:n,tag:r,weight:z}=a[this.type],x=r||h;return t(s,{class:i([`zonos--text-size-${this.size||n||e}`,`zonos--text-weight-${this.weight||z||l}`,this.class]),style:{"--color":this.color?`var(--amino-${this.color})`:"","--font-family":o()}},(()=>{switch(x){case"h2":return t("h2",null,t("slot",null));case"h3":return t("h3",null,t("slot",null));case"h4":return t("h4",null,t("slot",null));case"h5":return t("h5",null,t("slot",null));default:return t("span",null,t("slot",null))}})())}};h.style=":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{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--amino-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--amino-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--amino-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--amino-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--amino-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--amino-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--amino-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";export{h as zonos_text}