@zonos/elements 1.3.31 → 1.3.33

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 (243) hide show
  1. package/dist/cjs/{cart-62ff7ee7.js → cart-11b47252.js} +463 -43
  2. package/dist/cjs/index.cjs.js +12 -5
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{submitGtag-a5f8eaab.js → submitGtag-3a1d091e.js} +4 -1
  5. package/dist/cjs/zonos-address_8.cjs.entry.js +11 -11
  6. package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
  7. package/dist/cjs/zonos-button_3.cjs.entry.js +6 -3
  8. package/dist/cjs/zonos-card.cjs.entry.js +47 -0
  9. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +53 -36
  10. package/dist/cjs/zonos-checkout.cjs.entry.js +21 -11
  11. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-controller.cjs.entry.js +3 -2
  13. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-country-select_3.cjs.entry.js +7 -7
  15. package/dist/cjs/zonos-elements.cjs.js +1 -1
  16. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
  17. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  18. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  19. package/dist/cjs/{zonos-card_2.cjs.entry.js → zonos-language-select_2.cjs.entry.js} +23 -29
  20. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  21. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-notification_2.cjs.entry.js +123 -0
  23. package/dist/cjs/zonos-v-stack.cjs.entry.js +25 -0
  24. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +15 -4
  25. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +16 -15
  26. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  27. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/assets/CheckmarkLineIcon.svg +1 -0
  28. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/assets/RemoveLineIcon.svg +1 -0
  29. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +8 -0
  30. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +20 -4
  31. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +9 -0
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +20 -7
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -1
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
  35. package/dist/collection/components/common/zonos-badge/zonos-badge.css +10 -0
  36. package/dist/collection/components/common/zonos-badge/zonos-badge.js +6 -6
  37. package/dist/collection/components/common/zonos-button/zonos-button.js +28 -4
  38. package/dist/collection/components/common/zonos-card/zonos-card.css +3 -1
  39. package/dist/collection/components/common/zonos-card/zonos-card.js +61 -3
  40. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  41. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  42. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  43. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  44. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  45. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  46. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  47. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  48. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  49. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  50. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  51. package/dist/collection/components/common/zonos-notification/zonos-notification.css +1 -1
  52. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  53. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  54. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  55. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  56. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  57. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  58. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  59. package/dist/collection/components/main/zonos-controller.js +2 -1
  60. package/dist/collection/components/store/checkout/stripe.js +0 -1
  61. package/dist/collection/components/store/hello/localization.js +3 -2
  62. package/dist/collection/components/store/translationStore/strings.arabic.js +23 -2
  63. package/dist/collection/components/store/translationStore/strings.base.js +23 -2
  64. package/dist/collection/components/store/translationStore/strings.chinese.js +23 -2
  65. package/dist/collection/components/store/translationStore/strings.danish.js +23 -2
  66. package/dist/collection/components/store/translationStore/strings.dutch.js +23 -2
  67. package/dist/collection/components/store/translationStore/strings.french.js +23 -2
  68. package/dist/collection/components/store/translationStore/strings.german.js +23 -2
  69. package/dist/collection/components/store/translationStore/strings.hebrew.js +23 -2
  70. package/dist/collection/components/store/translationStore/strings.indonesian.js +23 -2
  71. package/dist/collection/components/store/translationStore/strings.italian.js +23 -2
  72. package/dist/collection/components/store/translationStore/strings.japanese.js +23 -2
  73. package/dist/collection/components/store/translationStore/strings.korean.js +23 -2
  74. package/dist/collection/components/store/translationStore/strings.norwegian.js +23 -2
  75. package/dist/collection/components/store/translationStore/strings.polish.js +23 -2
  76. package/dist/collection/components/store/translationStore/strings.portuguese.js +23 -2
  77. package/dist/collection/components/store/translationStore/strings.russian.js +23 -2
  78. package/dist/collection/components/store/translationStore/strings.spanish.js +23 -2
  79. package/dist/collection/components/store/translationStore/strings.swedish.js +23 -2
  80. package/dist/collection/components/store/translationStore/strings.turkish.js +23 -2
  81. package/dist/collection/components/store/translationStore/strings.vietnamese.js +23 -2
  82. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  83. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  84. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  85. package/dist/collection/components/utils/checkout/getIsTestMode.js +1 -0
  86. package/dist/collection/scripts/_zonosBase.js +8 -1
  87. package/dist/esm/{cart-b96aaa4f.js → cart-22ba08ec.js} +463 -43
  88. package/dist/esm/index.js +12 -5
  89. package/dist/esm/loader.js +1 -1
  90. package/dist/esm/{submitGtag-6e271d76.js → submitGtag-1435eec8.js} +4 -2
  91. package/dist/esm/zonos-address_8.entry.js +11 -11
  92. package/dist/esm/zonos-badge_2.entry.js +6 -6
  93. package/dist/esm/zonos-button_3.entry.js +6 -3
  94. package/dist/esm/zonos-card.entry.js +43 -0
  95. package/dist/esm/zonos-cart-items_12.entry.js +53 -36
  96. package/dist/esm/zonos-checkout.entry.js +21 -11
  97. package/dist/esm/zonos-component.entry.js +1 -1
  98. package/dist/esm/zonos-controller.entry.js +3 -2
  99. package/dist/esm/zonos-country-flag.entry.js +1 -1
  100. package/dist/esm/zonos-country-select_3.entry.js +7 -7
  101. package/dist/esm/zonos-elements.js +1 -1
  102. package/dist/esm/zonos-hello-dialog.entry.js +5 -5
  103. package/dist/esm/zonos-hello.entry.js +1 -1
  104. package/dist/esm/zonos-input.entry.js +4 -4
  105. package/dist/esm/zonos-language-select_2.entry.js +56 -0
  106. package/dist/esm/zonos-link.entry.js +1 -1
  107. package/dist/esm/zonos-logo.entry.js +2 -2
  108. package/dist/esm/zonos-notification_2.entry.js +118 -0
  109. package/dist/esm/zonos-v-stack.entry.js +21 -0
  110. package/dist/esm-es5/cart-22ba08ec.js +1 -0
  111. package/dist/esm-es5/index.js +1 -1
  112. package/dist/esm-es5/loader.js +1 -1
  113. package/dist/esm-es5/submitGtag-1435eec8.js +1 -0
  114. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  115. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  116. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  117. package/dist/esm-es5/zonos-card.entry.js +1 -0
  118. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  119. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  120. package/dist/esm-es5/zonos-component.entry.js +1 -1
  121. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  122. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  123. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  124. package/dist/esm-es5/zonos-elements.js +1 -1
  125. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  126. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  127. package/dist/esm-es5/zonos-input.entry.js +1 -1
  128. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -0
  129. package/dist/esm-es5/zonos-link.entry.js +1 -1
  130. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  131. package/dist/esm-es5/zonos-notification_2.entry.js +1 -0
  132. package/dist/esm-es5/zonos-v-stack.entry.js +1 -0
  133. package/dist/scripts/index.d.ts +39 -6
  134. package/dist/scripts/index.js +1 -1
  135. package/dist/scripts/loadZonos.js +1 -1
  136. package/dist/scripts/zonos.js +1 -1
  137. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
  138. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +1 -0
  139. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -0
  140. package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +2 -2
  141. package/dist/types/components/common/zonos-button/zonos-button.d.ts +6 -1
  142. package/dist/types/components/common/zonos-card/zonos-card.d.ts +10 -0
  143. package/dist/types/components/store/translationStore/strings.arabic.d.ts +22 -1
  144. package/dist/types/components/store/translationStore/strings.base.d.ts +22 -1
  145. package/dist/types/components/store/translationStore/strings.chinese.d.ts +22 -1
  146. package/dist/types/components/store/translationStore/strings.danish.d.ts +22 -1
  147. package/dist/types/components/store/translationStore/strings.dutch.d.ts +22 -1
  148. package/dist/types/components/store/translationStore/strings.french.d.ts +22 -1
  149. package/dist/types/components/store/translationStore/strings.german.d.ts +22 -1
  150. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +22 -1
  151. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +22 -1
  152. package/dist/types/components/store/translationStore/strings.italian.d.ts +22 -1
  153. package/dist/types/components/store/translationStore/strings.japanese.d.ts +22 -1
  154. package/dist/types/components/store/translationStore/strings.korean.d.ts +22 -1
  155. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +22 -1
  156. package/dist/types/components/store/translationStore/strings.polish.d.ts +22 -1
  157. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +22 -1
  158. package/dist/types/components/store/translationStore/strings.russian.d.ts +22 -1
  159. package/dist/types/components/store/translationStore/strings.spanish.d.ts +22 -1
  160. package/dist/types/components/store/translationStore/strings.swedish.d.ts +22 -1
  161. package/dist/types/components/store/translationStore/strings.turkish.d.ts +22 -1
  162. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +22 -1
  163. package/dist/types/components/store/translationStore.d.ts +1 -1
  164. package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -0
  165. package/dist/types/components.d.ts +36 -6
  166. package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
  167. package/dist/zonos-elements/index.esm.js +1 -1
  168. package/dist/zonos-elements/p-11672829.js +1 -0
  169. package/dist/zonos-elements/p-22882fd6.entry.js +1 -0
  170. package/dist/zonos-elements/{p-b208fec6.system.entry.js → p-28e6963b.system.entry.js} +1 -1
  171. package/dist/zonos-elements/p-2a45c837.system.entry.js +1 -0
  172. package/dist/zonos-elements/{p-c4e38b85.entry.js → p-3523c3b4.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-692816a7.entry.js → p-35604380.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-78a839b8.entry.js → p-36bb4360.entry.js} +1 -1
  175. package/dist/zonos-elements/p-3b95a9a3.entry.js +1 -0
  176. package/dist/zonos-elements/p-450eb8ff.system.js +1 -0
  177. package/dist/zonos-elements/p-478357b0.system.entry.js +1 -0
  178. package/dist/zonos-elements/p-56152835.system.entry.js +1 -0
  179. package/dist/zonos-elements/{p-6cb9812b.entry.js → p-63a27875.entry.js} +1 -1
  180. package/dist/zonos-elements/p-6c3390b7.entry.js +1 -0
  181. package/dist/zonos-elements/{p-9c32b924.entry.js → p-6f589755.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-a90393e0.system.entry.js → p-71882ac9.system.entry.js} +1 -1
  183. package/dist/zonos-elements/p-74bd6150.entry.js +1 -0
  184. package/dist/zonos-elements/{p-9b0aa65c.system.js → p-7624013b.system.js} +1 -1
  185. package/dist/zonos-elements/p-84997f2e.js +1 -0
  186. package/dist/zonos-elements/{p-2cb880e7.system.entry.js → p-88129ef9.system.entry.js} +1 -1
  187. package/dist/zonos-elements/p-95d52a24.system.entry.js +1 -0
  188. package/dist/zonos-elements/{p-dda78e8e.system.entry.js → p-966ab4e7.system.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-3dc59d89.system.entry.js → p-9de374a7.system.entry.js} +1 -1
  190. package/dist/zonos-elements/{p-666d1605.system.entry.js → p-a0b17e0b.system.entry.js} +1 -1
  191. package/dist/zonos-elements/{p-7664dec5.entry.js → p-b5825bb7.entry.js} +1 -1
  192. package/dist/zonos-elements/p-b8a4b345.system.entry.js +1 -0
  193. package/dist/zonos-elements/{p-13454044.system.entry.js → p-b903af96.system.entry.js} +1 -1
  194. package/dist/zonos-elements/p-c21802e9.entry.js +1 -0
  195. package/dist/zonos-elements/{p-d4724ac8.entry.js → p-c3619b3d.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-9cdfb51b.system.entry.js → p-cdb53aaf.system.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-941a01be.system.entry.js → p-d2992457.system.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-2701e08c.entry.js → p-d8c1eb99.entry.js} +1 -1
  199. package/dist/zonos-elements/p-da2e5289.system.entry.js +1 -0
  200. package/dist/zonos-elements/p-dafa2b79.system.js +1 -0
  201. package/dist/zonos-elements/p-ddb1cfe2.entry.js +1 -0
  202. package/dist/zonos-elements/{p-d8027710.system.entry.js → p-dec21ca2.system.entry.js} +1 -1
  203. package/dist/zonos-elements/p-e09df465.entry.js +1 -0
  204. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  205. package/dist/zonos-elements/p-e3c014ae.entry.js +1 -0
  206. package/dist/zonos-elements/{p-10b9a681.system.entry.js → p-eb566457.system.entry.js} +1 -1
  207. package/dist/zonos-elements/p-ed333de6.system.entry.js +1 -0
  208. package/dist/zonos-elements/{p-725c2d57.entry.js → p-fa7e2a01.entry.js} +1 -1
  209. package/dist/zonos-elements/{p-4a0cf47b.entry.js → p-fe296307.entry.js} +1 -1
  210. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  211. package/package.json +1 -1
  212. package/dist/cjs/zonos-notification.cjs.entry.js +0 -72
  213. package/dist/cjs/zonos-payment.cjs.entry.js +0 -58
  214. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +0 -45
  215. package/dist/esm/zonos-card_2.entry.js +0 -62
  216. package/dist/esm/zonos-notification.entry.js +0 -68
  217. package/dist/esm/zonos-payment.entry.js +0 -54
  218. package/dist/esm/zonos-select-dialog-header_2.entry.js +0 -40
  219. package/dist/esm-es5/cart-b96aaa4f.js +0 -1
  220. package/dist/esm-es5/submitGtag-6e271d76.js +0 -1
  221. package/dist/esm-es5/zonos-card_2.entry.js +0 -1
  222. package/dist/esm-es5/zonos-notification.entry.js +0 -1
  223. package/dist/esm-es5/zonos-payment.entry.js +0 -1
  224. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +0 -1
  225. package/dist/zonos-elements/p-087c83a5.system.entry.js +0 -1
  226. package/dist/zonos-elements/p-1a40aaf4.system.js +0 -1
  227. package/dist/zonos-elements/p-2613b5d3.system.entry.js +0 -1
  228. package/dist/zonos-elements/p-27d648c3.system.entry.js +0 -1
  229. package/dist/zonos-elements/p-4e01d1ab.system.entry.js +0 -1
  230. package/dist/zonos-elements/p-5441b729.entry.js +0 -1
  231. package/dist/zonos-elements/p-5857ad65.entry.js +0 -1
  232. package/dist/zonos-elements/p-5d53f9a4.js +0 -1
  233. package/dist/zonos-elements/p-75ba695c.entry.js +0 -1
  234. package/dist/zonos-elements/p-89664e49.system.js +0 -1
  235. package/dist/zonos-elements/p-8c9e7980.entry.js +0 -1
  236. package/dist/zonos-elements/p-8f8baabf.system.entry.js +0 -1
  237. package/dist/zonos-elements/p-9f7c0472.entry.js +0 -1
  238. package/dist/zonos-elements/p-acfb9be6.system.entry.js +0 -1
  239. package/dist/zonos-elements/p-b468f941.js +0 -1
  240. package/dist/zonos-elements/p-bb5a9eaa.entry.js +0 -1
  241. package/dist/zonos-elements/p-be2b32f5.entry.js +0 -1
  242. package/dist/zonos-elements/p-c63a7dde.entry.js +0 -1
  243. package/dist/zonos-elements/p-f38fd0d9.system.entry.js +0 -1
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-62ff7ee7.js');
6
+ const cart = require('./cart-11b47252.js');
7
7
  const zonosStore = require('./zonosStore-4c6c85da.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
@@ -217,18 +217,18 @@ const ZonosHelloDialog = class {
217
217
  const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
218
218
  const currentPage = this.getCurrentPageEnum();
219
219
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
220
- return (index.h(index.Host, { key: '1194b1466981cf8ba04d726eff3ba34b19510258', class: "zonos--elements" }, index.h("div", { key: 'ffea099f72ff3f42ddbd5b5947a5b8ca0f3d206d', "aria-hidden": "true", class: classes.classes([
220
+ return (index.h(index.Host, { key: 'af2c46bcc413205d644a2b94ee2ff568d3d004f2', class: "zonos--elements" }, index.h("div", { key: '67a563de9e702e370d057ee3cc45bc0c14feedc5', "aria-hidden": "true", class: classes.classes([
221
221
  'zonos--hello-dialog',
222
222
  animateLeft && 'zonos--hello-dialog-animate-from-left',
223
223
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
224
224
  !!this.mobileLocationOverride &&
225
225
  'zonos--hello-dialog-mobile-override',
226
226
  this.isOpen && 'zonos--hello-dialog-open',
227
- ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: '7396d7cd91c69f77d5f2f4ae9a088b1a763c6988' }, index.h("div", { key: 'aedfda83797a58fc2a0432a89503cbc7774d5c8b', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: '0c9ad53d902ce7c45cdf9192dbe8ea7f9f46f7d4', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), index.h("zonos-v-stack", { key: '9a359684275e946fc26bdc6ea7b8a371bf49dea5', spacing: 24 }, index.h("zonos-country-flag", { key: 'ca230fb4426ecb39febb0972d9a6ce15435c4e1d', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: '17bbc6a70143a9165b8f088b5b2ea1e6e69622ed', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: '33c66273d9fd8330ee4cf2bfcdf5b454a89e0ae0', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: '57cfdcd587ab62fad99016a389771d3a169ad297', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: '28b9b9e7967e81ca50bc4d0cfe45c9545a8b9dde', spacing: 8 }, this.restrictedItems.map(item => {
227
+ ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: '412a8d2f4c01e4ff216feb92a979be5987bcd8c7' }, index.h("div", { key: 'b2921acfc77c6a402a14256a6f1c28607f6533e7', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: 'aa623c0533a5f852dab7f0f98d6dc26f62ef899a', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), index.h("zonos-v-stack", { key: '4fdac9331a5b2506a5ca1c7c1b6bfecf822bfcd9', spacing: 24 }, index.h("zonos-country-flag", { key: '57afef45e0bebe9bdfa715306f6ec2c30aca8dc1', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: '954b970c82fd631efadbd9c916e8bad78f0e1321', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: 'cde98a9636e6150d6cab009970938a0cf61bc05a', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: 'b63fc79317f23854737c1f2dd2cbde38f3841f2a', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: 'e115a03222d2271b358c3f1ae3feb938bafcdbef', spacing: 8 }, this.restrictedItems.map(item => {
228
228
  var _a;
229
229
  return item && (index.h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (index.h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
230
- }), index.h("zonos-card", { key: '94ef9064b4e523c3f0fc9cd50142da36f003006d', spacing: "12px" }, index.h("zonos-v-stack", { key: '01b3550b5b080d106eaecedf78b13275e01ae159', spacing: 12 }, index.h("div", { key: '19b1ba3e12dab87250d3ad19a5dc8e13b6f871d6', class: "zonos--flex-message" }, index.h("zonos-icon", { key: '9773bf4ad57752437a367c2093de0737693bf588', "aria-label": "Duty de minimis", content: ImportIcon }), index.h("zonos-text", { key: '4c75d971f37db399e6f4332a6c92b53758629b6b' }, dutyDeMinimisMessage)), index.h("div", { key: '52640f51d3664582d7bb3c26f2d2d17d82ad856e', class: "zonos--flex-message" }, index.h("zonos-icon", { key: '9afe9273e6b19aada01018152a64973449b87094', "aria-label": "Tax de minimis", content: MoneyIcon }), index.h("zonos-text", { key: 'b2481af13570471cc2907c48b54c7039ec31e92c' }, taxDeMinimisMessage)), additionalInformation === null || additionalInformation === void 0 ? void 0 :
231
- additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), index.h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: 'a6b2d31ee922db13cf9987a823e99d6088c392b0', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: '21d187502c3f0ccef0c351f09aa943566228944f' }, index.h("zonos-country-select", { key: '3dbd522e8a5004c2a1ed766ba92c9d0387f845d8', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: '686d8bba48fefd49bf2bf15dc295fb79b9cd5299' }, index.h("zonos-language-select", { key: '22ba1b42ec7ba1808fd806ad3529a377d34b4ac8', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
230
+ }), index.h("zonos-card", { key: '6f5ef13c8ce1171b99c148f43f491ced8f29cd57', spacing: "12px" }, index.h("zonos-v-stack", { key: '816a373a6dcf69976279af51f09d136f18c6b4a8', spacing: 12 }, index.h("div", { key: '51fc31937cb4885c7a98ee5fbc0755a00158f172', class: "zonos--flex-message" }, index.h("zonos-icon", { key: 'bc659d649b3a7f046225270870e7ae31597027f4', "aria-label": "Duty de minimis", content: ImportIcon }), index.h("zonos-text", { key: 'e63ce2eb6f381718ca26962c7429f266bf8cf8d9' }, dutyDeMinimisMessage)), index.h("div", { key: '6f49eac81be52709ad8f35c04cccd7d2fec03b7a', class: "zonos--flex-message" }, index.h("zonos-icon", { key: 'd95f29c3c42480c89a34e831740cfdbb3d64c058', "aria-label": "Tax de minimis", content: MoneyIcon }), index.h("zonos-text", { key: 'c226092fef030070af3af1d45debab989fb4f1b7' }, taxDeMinimisMessage)), additionalInformation === null || additionalInformation === void 0 ? void 0 :
231
+ additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), index.h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: '32739e817940a937b59380197934ced91f2afc50', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: 'be58e393680370837ae35d5d4f85f77cf9620db2' }, index.h("zonos-country-select", { key: 'bc5c7e086513a44f817e5769acf2ca382b01fcc4', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: '7cbee089b9661602bb23e5e2821030d04891f18a' }, index.h("zonos-language-select", { key: '55d654b2b339cfd83e3fe9814d914a382a891af3', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
232
232
  }
233
233
  static get assetsDirs() { return ["assets"]; }
234
234
  static get watchers() { return {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
6
  const zonosStore = require('./zonosStore-4c6c85da.js');
7
- const cart = require('./cart-62ff7ee7.js');
7
+ const cart = require('./cart-11b47252.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const logError = require('./logError-4e2f2020.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
@@ -27,17 +27,17 @@ const ZonosInput = class {
27
27
  this.inputChange.emit(newValue);
28
28
  }
29
29
  render() {
30
- return (index.h(index.Host, { key: 'f2bf9e34ef694f026eceed1327603659bbd4c5a4', class: classes.classes([
30
+ return (index.h(index.Host, { key: 'f4b7ad75b2aebce3bc05a482fe20fee290a3a4e7', class: classes.classes([
31
31
  'zonos--input zonos--elements',
32
32
  this.inputSize,
33
33
  this.isError && 'has-error',
34
34
  ]), style: {
35
35
  '--border-radius': getBorderRadius.getBorderRadius(),
36
36
  '--font-family': zonosStore.zonosStoreFontFamily(),
37
- } }, index.h("div", { key: '0fe9066fc683f6a683c494209fa29b10c0076dc5', class: classes.classes([
37
+ } }, index.h("div", { key: '356e16c11c1cd9edf137f69978ebaa3eb2c28d4e', class: classes.classes([
38
38
  'zonos--label-wrapper',
39
39
  this.isDisabled && 'disabled',
40
- ]) }, index.h("input", { key: 'f185418ddc6a83e829a9d2dd44a021288f00d4d5', class: classes.classes([
40
+ ]) }, index.h("input", { key: '71659072bd58942efebb88be65ced18ad29be8ab', class: classes.classes([
41
41
  'zonos--floated-input',
42
42
  !!this.inputLabel && 'has-label',
43
43
  this.inputValue && 'has-content',
@@ -45,7 +45,7 @@ const ZonosInput = class {
45
45
  ]), disabled: this.isDisabled, onInput: e => {
46
46
  const input = e.target;
47
47
  this.inputChange.emit(input.value);
48
- }, placeholder: this.inputPlaceholder, type: "text", value: this.value }), index.h("label", { key: '3d4ab801e27af15d819b17db226f0d5f719ac903', class: "zonos--floated-label", "data-label": this.inputLabel }))));
48
+ }, placeholder: this.inputPlaceholder, type: "text", value: this.value }), index.h("label", { key: 'b84c60836fc969c23aedc314c67337e8e87f2ab6', class: "zonos--floated-label", "data-label": this.inputLabel }))));
49
49
  }
50
50
  get el() { return index.getElement(this); }
51
51
  static get watchers() { return {
@@ -3,38 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
+ const cart = require('./cart-11b47252.js');
6
7
  const zonosStore = require('./zonosStore-4c6c85da.js');
7
- const classes = require('./classes-b7918f56.js');
8
- const cart = require('./cart-62ff7ee7.js');
9
8
  const ILanguage = require('./ILanguage-98b04442.js');
10
9
  require('./logError-4e2f2020.js');
11
10
  require('./isDarkColor-371a3b1a.js');
12
11
  require('./getBorderRadius-074b46ef.js');
13
12
 
14
- const zonosCardCss = ":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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos-elements-radius-6);padding:var(--spacing, 24px);text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";
15
- const ZonosCardStyle0 = zonosCardCss;
16
-
17
- const ZonosCard = class {
18
- constructor(hostRef) {
19
- index.registerInstance(this, hostRef);
20
- this.actions = undefined;
21
- this.footerActions = undefined;
22
- this.footerContent = undefined;
23
- this.footerHeight = undefined;
24
- this.label = undefined;
25
- this.spacing = '24px';
26
- }
27
- render() {
28
- return (index.h(index.Host, { key: '0e52ca31db6c2f956da1910d6e0a222b588c1bcc', style: {
29
- '--font-family': zonosStore.zonosStoreFontFamily(),
30
- } }, index.h("div", { key: '69f391d821f88cbee4b0c586a8323b1dd68d7fd3', class: classes.classes(['styled-card']), style: { padding: this.spacing } }, this.label && (index.h("header", { key: '4568a1d7c354830e6e65e31b20b38140aaab9d01', class: "card-header", style: { padding: this.spacing } }, index.h("zonos-text", { key: 'e0a6b7a3776916f8208c27373878041807d91960', type: "subheader" }, this.label), index.h("h-stack", { key: 'c5f8d01b2f477b16ab9387081987eae64b156e76', spacing: 8 }, this.actions))), index.h("slot", { key: '6001acfaae8ba37456a7c23bae5c44a91da074f9' }), (this.footerActions || this.footerContent) && (index.h("footer", { key: '78b926a323a5f1375c8120d5aa8b1ab2a4f3fa4a', class: "card-footer", style: {
31
- height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
32
- padding: this.spacing,
33
- } }, index.h("div", { key: '2bd0c86b75096c2ee786d4a9b16a3d6e385fbbf1' }, this.footerContent), index.h("h-stack", { key: '7a3f840ac9678a905338a99b8327115bc8199789', spacing: 8 }, this.footerActions))))));
34
- }
35
- };
36
- ZonosCard.style = ZonosCardStyle0;
37
-
38
13
  const GreenCheckDuotoneIcon = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
39
14
  <path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>
40
15
  <path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>
@@ -56,12 +31,31 @@ const ZonosLanguageSelect = class {
56
31
  }
57
32
  render() {
58
33
  const { selectedLocale } = cart.localizationStore;
59
- return (index.h(index.Host, { key: '34580123b768ce983c0c9c6fa309bdb1d6756a5a', class: "zonos--elements", style: {
34
+ return (index.h(index.Host, { key: '6682af3d631bac1a8d3783418c30364ff7694792', class: "zonos--elements", style: {
60
35
  '--font-family': zonosStore.zonosStoreFontFamily(),
61
- } }, index.h("div", { key: '6e86352a45b5d9ad0e5ed5dac330367a49a6c6fe', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: 'd5b55cbb2858a2c0a6aa6ce0ea0d50eecc7360e8', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a language') }), index.h("div", { key: 'c9aeb075428357c4cb15d9a2b09df7c8d6b01b11', class: "zonos--language-select-content" }, ILanguage.languages.map(language => (index.h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, index.h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
36
+ } }, index.h("div", { key: '9f7e60bc5c4e9d1c0cc31afcbbaec444a7da630e', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: 'f790ef85eeb0bed05773d98793437ab4d6e64c8d', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a language') }), index.h("div", { key: '7385a1134b21ae4b39947483ee643da021e6c54c', class: "zonos--language-select-content" }, ILanguage.languages.map(language => (index.h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, index.h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
62
37
  }
63
38
  };
64
39
  ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
65
40
 
66
- exports.zonos_card = ZonosCard;
41
+ const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
42
+
43
+ const zonosSelectDialogHeaderCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";
44
+ const ZonosSelectDialogHeaderStyle0 = zonosSelectDialogHeaderCss;
45
+
46
+ const ZonosSelectDialogHeader = class {
47
+ constructor(hostRef) {
48
+ index.registerInstance(this, hostRef);
49
+ this.handleOnClose = () => { };
50
+ this.label = '';
51
+ }
52
+ render() {
53
+ return (index.h(index.Host, { key: '21cd3c3e35baf172ecad7f47a76810e8f39bdeff', class: "zonos--elements", style: {
54
+ '--font-family': zonosStore.zonosStoreFontFamily(),
55
+ } }, index.h("zonos-v-stack", { key: '0470633326b6fca9b45a8be67e0d77819561f634', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, index.h("div", { key: '8713cbf368658af22bb88825d32175117d47c95b', class: "zonos--select-dialog-header" }, index.h("zonos-text", { key: '2f94e9f6139570398897ca55934c5244df7f82e8', type: "boldLabel" }, this.label), index.h("zonos-button", { key: 'c247dabcc8f487a4cc5a814fb1aa4d9a68fa4ba3', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), index.h("slot", { key: '26727e634ec09a3b9e3912ada3b920a87a1ba4d0' }))));
56
+ }
57
+ };
58
+ ZonosSelectDialogHeader.style = ZonosSelectDialogHeaderStyle0;
59
+
67
60
  exports.zonos_language_select = ZonosLanguageSelect;
61
+ exports.zonos_select_dialog_header = ZonosSelectDialogHeader;
@@ -16,7 +16,7 @@ const ZonosLink = class {
16
16
  this.linkTitle = undefined;
17
17
  }
18
18
  render() {
19
- return (index.h(index.Host, { key: 'a148ed9b4d285cd39b63da348dcfcc11f4973f04', class: "zonos--elements" }, index.h("a", { key: '121b299148c4227c0b500ecb6ded03470476aa90', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, index.h("slot", { key: 'cf6637f399d3c069bd6ea3d0f3a900fd0740afc5' }))));
19
+ return (index.h(index.Host, { key: 'bba0da02c0dee468bd0cacd268f339f7ec4f1008', class: "zonos--elements" }, index.h("a", { key: '19515197e397b2b24237e77d3e89de75382c14e1', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, index.h("slot", { key: '63d597a3091e954c9302e461030646b38ee2396e' }))));
20
20
  }
21
21
  };
22
22
  ZonosLink.style = ZonosLinkStyle0;
@@ -19,11 +19,11 @@ const ZonosLogo = class {
19
19
  const filterColor = this.theme === 'DARK'
20
20
  ? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
21
21
  : 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
22
- return (index.h(index.Host, { key: 'c790c72d413c586a873c5046a1aee797c1f0af36', class: classes.classes(['zonos--elements zonos--logo']), style: {
22
+ return (index.h(index.Host, { key: '08ef20244bc204125a7a308efed42cd7fc86c885', class: classes.classes(['zonos--elements zonos--logo']), style: {
23
23
  '--filter-color': filterColor,
24
24
  '--font-family': zonosStore.zonosStoreFontFamily(),
25
25
  '--width': this.width,
26
- } }, index.h("img", { key: '68efd2097a0d8488308de0b50bef30cc67deb6fa', alt: "Zonos Logo", src: index.getAssetPath('./assets/ZonosLogo.png') })));
26
+ } }, index.h("img", { key: '9202f0619fa3874a19ca3050477719b19592d82a', alt: "Zonos Logo", src: index.getAssetPath('./assets/ZonosLogo.png') })));
27
27
  }
28
28
  static get assetsDirs() { return ["assets"]; }
29
29
  };
@@ -0,0 +1,123 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-b071017b.js');
6
+ const zonosStore = require('./zonosStore-4c6c85da.js');
7
+ const classes = require('./classes-b7918f56.js');
8
+ const cart = require('./cart-11b47252.js');
9
+ const logError = require('./logError-4e2f2020.js');
10
+ require('./isDarkColor-371a3b1a.js');
11
+ require('./getBorderRadius-074b46ef.js');
12
+
13
+ const zonosNotificationCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";
14
+ const ZonosNotificationStyle0 = zonosNotificationCss;
15
+
16
+ const ZonosNotification = class {
17
+ constructor(hostRef) {
18
+ index.registerInstance(this, hostRef);
19
+ this.notificationArray = [];
20
+ }
21
+ /**
22
+ * Show a notification
23
+ */
24
+ async showNotification(notification) {
25
+ // random generate id
26
+ const id = `id-${Math.random().toString(36).substring(2, 9)}`;
27
+ const notificationItem = Object.assign(Object.assign({}, notification), { id, timeout: notification.timeout || 5000, transitionClass: '', type: notification.type || 'success' });
28
+ this.notificationArray = [...this.notificationArray, notificationItem];
29
+ setTimeout(() => {
30
+ this.updateTransitionClass({
31
+ id,
32
+ transitionClass: 'show',
33
+ });
34
+ }, 50);
35
+ setTimeout(() => {
36
+ this.removeNotification(id);
37
+ }, notificationItem.timeout);
38
+ }
39
+ updateTransitionClass({ id, transitionClass, }) {
40
+ this.notificationArray = this.notificationArray.map(notification => {
41
+ if (notification.id === id) {
42
+ return Object.assign(Object.assign({}, notification), { transitionClass });
43
+ }
44
+ return notification;
45
+ });
46
+ }
47
+ /**
48
+ * Remove a notification
49
+ */
50
+ removeNotification(id) {
51
+ // add hide class before removing the item 100ms to trigger animation
52
+ this.updateTransitionClass({
53
+ id,
54
+ transitionClass: '',
55
+ });
56
+ setTimeout(() => {
57
+ this.notificationArray = this.notificationArray.filter(notification => notification.id !== id);
58
+ }, 300);
59
+ }
60
+ render() {
61
+ return (index.h(index.Host, { key: '17c08c90c6c1dfade4e43451c196127a0f53429e', class: classes.classes(['zonos--elements zonos--notification']), style: {
62
+ '--font-family': zonosStore.zonosStoreFontFamily(),
63
+ } }, index.h("div", { key: '6624419d86a5c7518539069dbc5c9d7c08262c75', class: "zonos--notification-items" }, this.notificationArray.map(notification => {
64
+ return (index.h("div", { "aria-hidden": "true", class: classes.classes([
65
+ 'zonos--notification-item',
66
+ notification.type,
67
+ notification.transitionClass,
68
+ ]), key: notification.id, onClick: () => {
69
+ this.removeNotification(notification.id);
70
+ } }, index.h("zonos-text", { textColor: "gray-0" }, notification.message)));
71
+ }))));
72
+ }
73
+ };
74
+ ZonosNotification.style = ZonosNotificationStyle0;
75
+
76
+ const zonosPaymentCss = ".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}";
77
+ const ZonosPaymentStyle0 = zonosPaymentCss;
78
+
79
+ const ZonosPayment = class {
80
+ constructor(hostRef) {
81
+ index.registerInstance(this, hostRef);
82
+ this.titleText = undefined;
83
+ this.stripe = cart.stripeStore.stripe;
84
+ this.stripeElements = cart.stripeStore.stripeElements;
85
+ }
86
+ watchInitStripe() {
87
+ if (!this.stripeElements) {
88
+ return;
89
+ }
90
+ // Create and mount the Authentication Element in ${type} mode
91
+ const paymentElement = cart.stripeStore.stripePaymentElement ||
92
+ this.stripeElements.create('payment', {
93
+ layout: 'tabs',
94
+ });
95
+ const paymentElementContainer = this.el.querySelector('.zonos--payment-component');
96
+ if (!paymentElementContainer) {
97
+ logError.logError('Cannot find container element for paymentElement');
98
+ return;
99
+ }
100
+ paymentElement.mount(paymentElementContainer);
101
+ paymentElement.on('change', event => {
102
+ cart.stripeStore.stripePaymentEventData = event;
103
+ });
104
+ cart.stripeStore.stripePaymentElement = paymentElement;
105
+ }
106
+ componentDidLoad() {
107
+ // @Watch doesn't get trigger on initial load
108
+ this.watchInitStripe();
109
+ }
110
+ render() {
111
+ // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
112
+ return (index.h(index.Host, { key: '870d7a4cb6132332368d356488c5eedd1dea16f3', class: "zonos--payment zonos--elements" }, this.titleText && (index.h("zonos-text", { key: '7aef62f6daae0c5b59caa685c4255fb78eebc1be', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("div", { key: '073976bceadf5f8efa78d0b1f6098e94bfa3d1a6', class: "zonos--payment-component" })));
113
+ }
114
+ get el() { return index.getElement(this); }
115
+ static get watchers() { return {
116
+ "stripeElements": ["watchInitStripe"],
117
+ "stripe": ["watchInitStripe"]
118
+ }; }
119
+ };
120
+ ZonosPayment.style = ZonosPaymentStyle0;
121
+
122
+ exports.zonos_notification = ZonosNotification;
123
+ exports.zonos_payment = ZonosPayment;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-b071017b.js');
6
+ const zonosStore = require('./zonosStore-4c6c85da.js');
7
+ const classes = require('./classes-b7918f56.js');
8
+
9
+ const zonosVStackCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";
10
+ const ZonosVStackStyle0 = zonosVStackCss;
11
+
12
+ const VStack = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.spacing = 24;
16
+ }
17
+ render() {
18
+ return (index.h(index.Host, { key: '8cdee94089af0eac57784a7914e169f363472577', style: {
19
+ '--font-family': zonosStore.zonosStoreFontFamily(),
20
+ } }, index.h("div", { key: 'd60da826d77b4cf7e5349b75927fc746f0053ddd', class: classes.classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, index.h("slot", { key: '97b0e8232cbac73938225e1310712c1607997073' }))));
21
+ }
22
+ };
23
+ VStack.style = ZonosVStackStyle0;
24
+
25
+ exports.zonos_v_stack = VStack;
@@ -43,14 +43,17 @@
43
43
  margin-bottom: 24px;
44
44
  border-radius: var(--border-radius, 10px);
45
45
  gap: 24px;
46
- max-width: 360px;
47
- min-width: 300px;
48
- width: auto;
49
- margin: auto;
50
46
  margin-top: 24px;
51
47
  background-color: var(--zonos-elements-gray-50);
52
48
  padding: 20px;
53
49
  }
50
+ :host .zonos--finish-details {
51
+ max-width: 536px;
52
+ min-width: 300px;
53
+ line-height: 24px;
54
+ width: 0 auto;
55
+ margin: auto;
56
+ }
54
57
  :host zonos-button {
55
58
  width: 100%;
56
59
  }
@@ -59,4 +62,12 @@
59
62
  display: flex;
60
63
  justify-content: center;
61
64
  align-items: center;
65
+ }
66
+ :host .zonos--finish-button-wrapper {
67
+ display: flex;
68
+ justify-content: center;
69
+ gap: 16px;
70
+ margin: 0 auto;
71
+ margin-top: 48px;
72
+ max-width: 300px;
62
73
  }
@@ -4,6 +4,7 @@ import { stripeStore, stripeStoreReset, stripeStoreRetrievePayment, } from "../.
4
4
  import { translate } from "../../../store/translationStore";
5
5
  import { zonosStore } from "../../../store/zonosStore";
6
6
  import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
7
+ import { getIsTestMode } from "../../../utils/checkout/getIsTestMode";
7
8
  import { createCustomEvent } from "../../../utils/createCustomEvent";
8
9
  import { getBorderRadius } from "../../../utils/getBorderRadius";
9
10
  import { handleFetch } from "../../../utils/handleFetch";
@@ -31,16 +32,20 @@ export class ZonosCheckoutFinish {
31
32
  }));
32
33
  return json;
33
34
  };
34
- this.handleSuccessBehavior = (orderId) => {
35
+ this.redirectToUrl = (url) => {
36
+ // reset store and checkout session id before redirecting
37
+ stripeStoreReset();
38
+ cartStore.checkoutSessionId = null;
39
+ window.location.href = url;
40
+ };
41
+ this.handleSuccessBehavior = () => {
42
+ var _a;
35
43
  const { successBehavior } = zonosStore.checkoutSettings;
36
44
  switch (successBehavior) {
37
45
  case 'REDIRECT_TO_SUCCESS_PAGE': {
38
46
  const redirectUrl = zonosStore.checkoutSettings.successRedirectUrl;
39
47
  if (redirectUrl) {
40
- // reset store and checkout session id before redirecting
41
- stripeStoreReset();
42
- cartStore.checkoutSessionId = null;
43
- window.location.href = `${redirectUrl}?zOrderNumber=${orderId}`;
48
+ this.redirectToUrl(`${redirectUrl}?zOrderNumber=${(_a = this.order) === null || _a === void 0 ? void 0 : _a.id}`);
44
49
  }
45
50
  // If no redirect URL, break and display Zonos success page
46
51
  break;
@@ -61,7 +66,7 @@ export class ZonosCheckoutFinish {
61
66
  if (order) {
62
67
  void trackConversionEvent('checkout_orderCompleted');
63
68
  this.order = order;
64
- this.handleSuccessBehavior(order.id);
69
+ this.handleSuccessBehavior();
65
70
  }
66
71
  else if (!order && attempts < 5) {
67
72
  // Wait for 1 second before the next attempt
@@ -165,18 +170,14 @@ export class ZonosCheckoutFinish {
165
170
  void this.checkPaymentStatus();
166
171
  }
167
172
  render() {
168
- // TODO: Keeping this code for when we have a UI for order details
169
- // const orderTotal = this.order?.amountSubtotals
170
- // ? Object.values(this.order.amountSubtotals).reduce((a, b) => a + b, 0)
171
- // : 0;
172
- // const totalItems = this.order?.items?.reduce((acc, item) => {
173
- // return acc + item.quantity;
174
- // }, 0);
175
- return (h(Host, { key: 'c6a7067f7f9c0c58605dbf7e1ac3cc7c469d2688', class: "zonos--checkout-finish zonos--elements", style: {
173
+ var _a, _b;
174
+ const orderId = ((_a = this.order) === null || _a === void 0 ? void 0 : _a.accountOrderNumber) || ((_b = this.order) === null || _b === void 0 ? void 0 : _b.id);
175
+ const isTestMode = getIsTestMode();
176
+ return (h(Host, { key: 'd36ab5e23e09a467b2616ade463baec9626c0157', class: "zonos--checkout-finish zonos--elements", style: {
176
177
  '--border-radius': getBorderRadius({
177
178
  overrideBorderStyle: this.borderRadius,
178
179
  }),
179
- } }, this.isLoading && (h("div", { key: '5d21e038191edb2135af4fa888c092f35d7d4d13', class: "loading-wrapper" }, h("zonos-spinner", { key: 'c2159b75682659e42f22f944a656a55d20e7268e' }))), !this.isLoading && (h(Fragment, null, h("div", { key: 'c51c81e44edad85e69468666a114021ebbd91a64', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '5ce3ef22c69de3a56af46541e7f768369378328a', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '1bf1911133314aa6b8dd20b7da91f84be2161b86' }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: 'b5a2311dcca4852b7bee7f9abfa8de868a44fc4c', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))))));
180
+ } }, this.isLoading && (h("div", { key: '58181470e5a3e75655bde5bf91ac4a857a8144f8', class: "loading-wrapper" }, h("zonos-spinner", { key: 'b1aba8ef89c9fbce271d6c3226f32e0a0dd1561d' }))), !this.isLoading && (h("div", { key: 'd02576373b5a3affc73906e125d443ce12e6c8d6', class: "zonos--finish-details" }, h("div", { key: 'ba06598ed291e565663c5b321e9419215cd2832a', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '55c453a319a693280518a4b2c2f502a1cc90dc2a', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), orderId && (h("zonos-badge", { key: '31042753fb3a1ef5155314c1d55abc067c6a6d31', badgeColor: "transparent" }, orderId)), h("zonos-text", { key: 'e9eceec74357986169f829a1c650f1e4b1605245', textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: '7c6e8b61be1bf7cc3c84ed369f438af7b1ad60c0', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText)), isTestMode && cartStore.step === 'finish' && (h("div", { key: 'bb567e9a67e6895b7f3c97e6d02584ba9f279acd', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '50afe47a9e5d25759b4f82bb619f5de7fc56f260', backgroundColor: "gray-0", buttonColor: "gray-1200", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '6cf9d0d670aa07ade295aa5ef3781dcd65e4d812', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
180
181
  }
181
182
  static get is() { return "zonos-checkout-finish"; }
182
183
  static get encapsulation() { return "shadow"; }
@@ -33,10 +33,10 @@ export class ZonosCheckoutFooter {
33
33
  const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
34
34
  // reverse color when on desktop. With the coversheet backdrop, the color should be white
35
35
  const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1200';
36
- return (h(Host, { key: 'c66117f4ec54d24eba7e22271294aeb08746a9e1', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: 'a7b49ac9b5d52c2289c46c6b24c6082e68db64b5', class: "zonos--checkout-footer" }, h("div", { key: 'b2c4beb76236c9fe2eb58d0a27ecddf266c7a103', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: 'b981389f14c0b5696208dbb7ad3fabf0687a168f', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'c0d5b4ab335af157789395632cf4278f55ace3fb', class: classes([
36
+ return (h(Host, { key: '23b8596ab642089e7109ef9f33e5c8f2f864fc04', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: '38a8d22389df15c429101560758e4aedabf67bfd', class: "zonos--checkout-footer" }, h("div", { key: '9767bbecf5daad5163372382504c4846a6f547c0', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: '1d66d656e6f305fbef4b2a5a360fdb7ac458f989', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'daa1cdff45356cb0b6f78b2ae37f009ef313d174', class: classes([
37
37
  'zonos--checkout-footer-dialog',
38
38
  this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
39
- ]) }, h("zonos-language-select", { key: 'd1442fb364997399f35d657e9f5823da34872c71', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: 'ff8ee730b995a5d8a7b9a3939b96444958390ca5', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: 'b2e896b9b37b1b0ba2bbb77034c7b0f6cf5c16a7', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: 'd1fe8d2bc28f3606b2f766659d52496ad4603c17', textColor: colorDesktop }, "Privacy policy")), h("div", { key: '4875d6ad0e0efc60f299a2db427608bf23b062f6', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: '13e2c1634ba3d8070f9ff14205fa3c3e9f8f5843', textColor: colorDesktop }, "Powered by"), h("a", { key: 'e00bec78174a8de0963c1a5caf721fd352dc9490', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '5910c724a05c686a7642385955a3faa042efe654', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 })))))));
39
+ ]) }, h("zonos-language-select", { key: '243ea828fbda5c8a046faa98783683b31e4a3780', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: 'c159a511f58d07c378f4d95edbcdc09782a95961', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: '3ea84395f0dd0264a83a46f1aa1e7ab6a348caef', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: 'a59a40f9753cb520352e6c1f838291adaf9192f8', textColor: colorDesktop }, "Privacy policy")), h("div", { key: '26c23f55dd4033d98127bff82807a1512f84854e', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: 'af7d46c29c4f3fd800e66b06ad93869151cd115b', textColor: colorDesktop }, "Powered by"), h("a", { key: 'e1d393aed20e5c923a9b2ab4b0c136cd64a9f0fe', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '7e4119c1f187585321b821a394c82038dfaac838', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 })))))));
40
40
  }
41
41
  static get is() { return "zonos-checkout-footer"; }
42
42
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1 @@
1
+ <svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>
@@ -35,6 +35,7 @@
35
35
  overflow: hidden;
36
36
  display: flex;
37
37
  flex-direction: column;
38
+ flex: 1;
38
39
  }
39
40
  :host .zonos--title {
40
41
  margin-bottom: 24px;
@@ -43,6 +44,9 @@
43
44
  margin-bottom: 20px;
44
45
  overflow: auto;
45
46
  padding: 5px;
47
+ display: flex;
48
+ flex-direction: column;
49
+ flex: 1;
46
50
  }
47
51
  :host .zonos--group::-webkit-scrollbar {
48
52
  width: 10px;
@@ -81,4 +85,8 @@
81
85
  }
82
86
  :host .zonos--group-btn zonos-button {
83
87
  width: 100%;
88
+ }
89
+ :host .zonos--test-cards {
90
+ margin-top: auto;
91
+ padding-top: 16px;
84
92
  }
@@ -2,8 +2,13 @@ import { h, Host, } from "@stencil/core";
2
2
  import { cartStore } from "../../../store/checkout/cart";
3
3
  import { stripeStore } from "../../../store/checkout/stripe";
4
4
  import { translate } from "../../../store/translationStore";
5
+ import { getIsTestMode } from "../../../utils/checkout/getIsTestMode";
5
6
  import { currencyFormat } from "../../../utils/hello/currencyConversion/currencyFormat";
6
7
  import { submitGtag } from "../../../utils/submitGtag";
8
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
9
+ import CheckmarkLineIcon from "./assets/CheckmarkLineIcon.svg";
10
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
11
+ import RemoveLineIcon from "./assets/RemoveLineIcon.svg";
7
12
  export class ZonosCheckoutPayment {
8
13
  constructor() {
9
14
  this.handleValidate = () => {
@@ -22,6 +27,14 @@ export class ZonosCheckoutPayment {
22
27
  // submit google tag when the form is complete
23
28
  submitGtag('zonos-checkout-payment-info');
24
29
  };
30
+ this.copyCardToClipboard = (cardNumber) => {
31
+ void navigator.clipboard.writeText(cardNumber);
32
+ window.Zonos.showNotification({
33
+ message: translate('Card number copied to clipboard'),
34
+ timeout: 4000,
35
+ type: 'success',
36
+ });
37
+ };
25
38
  this.paymentError = false;
26
39
  this.submitBtnType = undefined;
27
40
  this.continueLoading = false;
@@ -36,12 +49,15 @@ export class ZonosCheckoutPayment {
36
49
  if (this.showErrorBanner) {
37
50
  this.showErrorBanner = !this.handleValidate();
38
51
  }
52
+ const isTestMode = getIsTestMode();
39
53
  return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
40
54
  // use primary type when on mobile mode
41
- variant: this.submitBtnType }, "Pay", ' ', currencyFormat({
42
- amount: cartStore.total,
43
- currency: cartStore.currency,
44
- }))))));
55
+ variant: this.submitBtnType }, translate('Pay [orderTotal]', {
56
+ orderTotal: currencyFormat({
57
+ amount: cartStore.total,
58
+ currency: cartStore.currency,
59
+ }),
60
+ }))), isTestMode && (h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, h("zonos-v-stack", { spacing: 16 }, h("div", null, h("zonos-text", { type: "semiBoldLabel" }, translate('Test cards')), h("zonos-text", { textColor: "gray-700" }, translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), h("zonos-button", { icon: h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, translate('Success'), " (****4242)"), h("zonos-button", { icon: h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, translate('Failure'), " (****0002)")), h("zonos-notification", null))))));
45
61
  }
46
62
  static get is() { return "zonos-checkout-payment"; }
47
63
  static get encapsulation() { return "scoped"; }
@@ -95,6 +95,7 @@
95
95
  :host .zonos--left {
96
96
  display: flex;
97
97
  flex-direction: column;
98
+ position: relative;
98
99
  }
99
100
  :host .zonos--left .zonos--wrapper {
100
101
  padding: 0 8px 8px;
@@ -121,6 +122,14 @@
121
122
  flex-direction: column;
122
123
  max-height: 100%;
123
124
  }
125
+ :host .zonos--logo-wrapper {
126
+ display: flex;
127
+ gap: 16px;
128
+ align-items: center;
129
+ }
130
+ :host .zonos--logo-wrapper > * {
131
+ height: fit-content;
132
+ }
124
133
  :host .zonos--logo {
125
134
  display: flex;
126
135
  align-items: center;