@zonos/elements 1.3.18-alpha.1 → 1.3.18-alpha.2

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 (266) hide show
  1. package/dist/cjs/{cart-95209ae8.js → cart-941a31dd.js} +255 -5
  2. package/dist/cjs/{getBorderRadius-44b3eca1.js → getBorderRadius-bcb309a8.js} +1 -1
  3. package/dist/cjs/{index-654a6001.js → index-b071017b.js} +4 -1
  4. package/dist/cjs/{isDarkColor-01f45d3f.js → isDarkColor-b0393089.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{submitGtag-9d60f3bb.js → submitGtag-9210b4fe.js} +2 -2
  7. package/dist/cjs/zonos-address_8.cjs.entry.js +22 -11
  8. package/dist/cjs/zonos-badge_2.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  10. package/dist/cjs/zonos-button_3.cjs.entry.js +22 -11
  11. package/dist/cjs/zonos-card_2.cjs.entry.js +7 -7
  12. package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_11.cjs.entry.js} +112 -6
  13. package/dist/cjs/zonos-checkout.cjs.entry.js +34 -8
  14. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  16. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
  17. package/dist/cjs/zonos-country-select_3.cjs.entry.js +11 -11
  18. package/dist/cjs/zonos-elements.cjs.js +2 -2
  19. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +8 -8
  20. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  21. package/dist/cjs/zonos-input.cjs.entry.js +7 -7
  22. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-logo.cjs.entry.js +4 -4
  24. package/dist/cjs/zonos-notification.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-payment.cjs.entry.js +6 -6
  26. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +6 -6
  27. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  28. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  29. package/dist/cjs/{zonosStore-d8bb0bda.js → zonosStore-7c6205ca.js} +2 -1
  30. package/dist/collection/collection-manifest.json +1 -0
  31. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +42 -5
  32. package/dist/collection/components/common/zonos-button/zonos-button.css +12 -0
  33. package/dist/collection/components/common/zonos-button/zonos-button.js +43 -8
  34. package/dist/collection/components/common/zonos-confirm-dialog/assets/ExclamationMarkDuotoneIcon.svg +4 -0
  35. package/dist/collection/components/common/zonos-confirm-dialog/assets/HelpDuotoneIcon.svg +4 -0
  36. package/dist/collection/components/common/zonos-confirm-dialog/assets/WarningDuotoneIcon.svg +4 -0
  37. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.css +125 -0
  38. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +322 -0
  39. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  40. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  41. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +1 -4
  42. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +38 -4
  43. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  44. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  45. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  46. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  47. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  48. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  49. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  50. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  51. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
  52. package/dist/collection/components/main/zonos-controller.js +3 -3
  53. package/dist/collection/components/store/hello/localization.js +12 -2
  54. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  55. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  56. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  57. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  58. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  59. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  60. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  61. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  62. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  63. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  64. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  65. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  66. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  67. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  68. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  69. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  70. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  71. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  72. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  73. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  74. package/dist/collection/components/store/zonosStore.js +1 -0
  75. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  76. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  77. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  78. package/dist/collection/scripts/zonosBase.js +2 -1
  79. package/dist/components/stripe.js +12 -2
  80. package/dist/components/translationStore.js +240 -0
  81. package/dist/components/zonos-address2.js +1 -1
  82. package/dist/components/zonos-button2.js +20 -8
  83. package/dist/components/zonos-checkout.js +70 -37
  84. package/dist/components/zonos-component.js +1 -1
  85. package/dist/components/zonos-confirm-dialog.d.ts +11 -0
  86. package/dist/components/zonos-confirm-dialog.js +6 -0
  87. package/dist/components/zonos-confirm-dialog2.js +161 -0
  88. package/dist/components/zonos-controller.js +1 -1
  89. package/dist/components/zonos-country-select2.js +2 -2
  90. package/dist/components/zonos-custom-message2.js +2 -2
  91. package/dist/components/zonos-dialog2.js +17 -5
  92. package/dist/components/zonos-hello-dialog-footer2.js +2 -2
  93. package/dist/components/zonos-hello-dialog2.js +3 -3
  94. package/dist/components/zonos-input2.js +4 -4
  95. package/dist/components/zonos-language-select2.js +2 -2
  96. package/dist/components/zonos-link-authentication2.js +1 -1
  97. package/dist/components/zonos-logo.js +2 -2
  98. package/dist/components/zonos-payment2.js +1 -1
  99. package/dist/components/zonos-select-dialog-header2.js +2 -2
  100. package/dist/components/zonos-tooltip2.js +2 -2
  101. package/dist/components/zonos-v-stack2.js +2 -2
  102. package/dist/components/zonosStore.js +1 -0
  103. package/dist/esm/{cart-6448e883.js → cart-cc593c2b.js} +255 -5
  104. package/dist/esm/{getBorderRadius-567f1786.js → getBorderRadius-d244b4b1.js} +1 -1
  105. package/dist/esm/{index-e063389c.js → index-3b46f3c3.js} +4 -1
  106. package/dist/esm/{isDarkColor-7f62035a.js → isDarkColor-39a36e82.js} +1 -1
  107. package/dist/esm/loader.js +3 -3
  108. package/dist/esm/{submitGtag-b7d369cd.js → submitGtag-e50f903f.js} +2 -2
  109. package/dist/esm/zonos-address_8.entry.js +22 -11
  110. package/dist/esm/zonos-badge_2.entry.js +4 -4
  111. package/dist/esm/zonos-banner.entry.js +2 -2
  112. package/dist/esm/zonos-button_3.entry.js +22 -11
  113. package/dist/esm/zonos-card_2.entry.js +7 -7
  114. package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_11.entry.js} +112 -7
  115. package/dist/esm/zonos-checkout.entry.js +34 -8
  116. package/dist/esm/zonos-component.entry.js +2 -2
  117. package/dist/esm/zonos-controller.entry.js +6 -6
  118. package/dist/esm/zonos-country-flag.entry.js +5 -5
  119. package/dist/esm/zonos-country-select_3.entry.js +11 -11
  120. package/dist/esm/zonos-elements.js +3 -3
  121. package/dist/esm/zonos-hello-dialog.entry.js +8 -8
  122. package/dist/esm/zonos-hello.entry.js +5 -5
  123. package/dist/esm/zonos-input.entry.js +7 -7
  124. package/dist/esm/zonos-link.entry.js +1 -1
  125. package/dist/esm/zonos-logo.entry.js +4 -4
  126. package/dist/esm/zonos-notification.entry.js +2 -2
  127. package/dist/esm/zonos-payment.entry.js +6 -6
  128. package/dist/esm/zonos-select-dialog-header_2.entry.js +6 -6
  129. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  130. package/dist/esm/zonos-text.entry.js +2 -2
  131. package/dist/esm/{zonosStore-33ff08ff.js → zonosStore-32e33a45.js} +2 -1
  132. package/dist/esm-es5/cart-cc593c2b.js +1 -0
  133. package/dist/esm-es5/{getBorderRadius-567f1786.js → getBorderRadius-d244b4b1.js} +1 -1
  134. package/dist/esm-es5/{index-e063389c.js → index-3b46f3c3.js} +1 -1
  135. package/dist/esm-es5/{isDarkColor-7f62035a.js → isDarkColor-39a36e82.js} +1 -1
  136. package/dist/esm-es5/loader.js +1 -1
  137. package/dist/esm-es5/{submitGtag-b7d369cd.js → submitGtag-e50f903f.js} +1 -1
  138. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  139. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  140. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  141. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  142. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  143. package/dist/esm-es5/zonos-cart-items_11.entry.js +1 -0
  144. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  145. package/dist/esm-es5/zonos-component.entry.js +1 -1
  146. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  147. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  148. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  149. package/dist/esm-es5/zonos-elements.js +1 -1
  150. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  151. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  152. package/dist/esm-es5/zonos-input.entry.js +1 -1
  153. package/dist/esm-es5/zonos-link.entry.js +1 -1
  154. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  155. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  156. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  157. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  158. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  159. package/dist/esm-es5/zonos-text.entry.js +1 -1
  160. package/dist/esm-es5/{zonosStore-33ff08ff.js → zonosStore-32e33a45.js} +1 -1
  161. package/dist/scripts/loadZonos.js +1 -1
  162. package/dist/scripts/zonos.js +1 -1
  163. package/dist/scripts/zonosBase.js +1 -1
  164. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +11 -1
  165. package/dist/types/components/common/zonos-button/zonos-button.d.ts +7 -1
  166. package/dist/types/components/common/zonos-confirm-dialog/zonos-confirm-dialog.d.ts +60 -0
  167. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +6 -1
  168. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  169. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  170. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  171. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  172. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  173. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  174. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  175. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  176. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  177. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  178. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  179. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  180. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  181. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  182. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  183. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  184. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  185. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  186. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  187. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  188. package/dist/types/components/store/translationStore.d.ts +1 -1
  189. package/dist/types/components/store/zonosStore.d.ts +4 -0
  190. package/dist/types/components.d.ts +142 -5
  191. package/dist/types/scripts/zonosBase.d.ts +15 -1
  192. package/dist/types/types/checkout/CheckoutConfig.d.ts +7 -0
  193. package/dist/zonos-elements/assets/ExclamationMarkDuotoneIcon.svg +4 -0
  194. package/dist/zonos-elements/assets/HelpDuotoneIcon.svg +4 -0
  195. package/dist/zonos-elements/assets/WarningDuotoneIcon.svg +4 -0
  196. package/dist/zonos-elements/{p-d7acc81c.entry.js → p-020a9b86.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-6ea746b9.entry.js → p-04030a48.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-fe246229.system.entry.js → p-0d0f9694.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-dbee6587.entry.js → p-0e892292.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-7f48fafe.entry.js → p-0fac99e7.entry.js} +1 -1
  201. package/dist/zonos-elements/p-1795c760.system.entry.js +1 -0
  202. package/dist/zonos-elements/{p-771fbeb3.system.js → p-1b9442f6.system.js} +1 -1
  203. package/dist/zonos-elements/{p-c1f4bb4a.entry.js → p-24ac1c6f.entry.js} +1 -1
  204. package/dist/zonos-elements/p-26a60a6e.entry.js +1 -0
  205. package/dist/zonos-elements/{p-835c8928.entry.js → p-281b8bdf.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-a889c1bc.entry.js → p-2af19b63.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-582d8b27.entry.js → p-2ced091f.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-909a331c.js → p-2f759d82.js} +1 -1
  209. package/dist/zonos-elements/p-32744531.entry.js +1 -0
  210. package/dist/zonos-elements/{p-58f8cee7.system.entry.js → p-35ac375a.system.entry.js} +1 -1
  211. package/dist/zonos-elements/{p-e0706108.system.entry.js → p-3bc88c3c.system.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-36a461a6.system.entry.js → p-3e26d7b3.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-9ec93319.entry.js → p-498a0e18.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-61100d2e.system.entry.js → p-4caaaaeb.system.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-79f3c4f5.system.js → p-58e730b6.system.js} +1 -1
  216. package/dist/zonos-elements/{p-e7b4b756.entry.js → p-597b75f3.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-3be2e469.entry.js → p-5e783394.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-87badea9.system.js → p-62ecfbcc.system.js} +1 -1
  219. package/dist/zonos-elements/{p-beca252d.entry.js → p-6366e7e3.entry.js} +1 -1
  220. package/dist/zonos-elements/p-693b9985.js +1 -0
  221. package/dist/zonos-elements/{p-bf32179a.system.entry.js → p-6eda6199.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-0759a84d.system.entry.js → p-7c8ee4b9.system.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-305f27c7.entry.js → p-80442f16.entry.js} +1 -1
  224. package/dist/zonos-elements/{p-345503b7.entry.js → p-80ea85b8.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-679877b1.system.entry.js → p-8171d013.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-83cc2936.js → p-8c0b4a61.js} +1 -1
  227. package/dist/zonos-elements/{p-4dca5484.system.entry.js → p-8cd6633a.system.entry.js} +1 -1
  228. package/dist/zonos-elements/p-8da16d53.system.js +1 -0
  229. package/dist/zonos-elements/p-96b8c9ba.system.entry.js +1 -0
  230. package/dist/zonos-elements/{p-70c35519.system.entry.js → p-98a0b694.system.entry.js} +1 -1
  231. package/dist/zonos-elements/{p-fd49d864.entry.js → p-9aab3ad7.entry.js} +1 -1
  232. package/dist/zonos-elements/{p-ad088d46.system.entry.js → p-9e8d38f7.system.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-83fecb2a.entry.js → p-9e9c318b.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-e108e5ed.system.entry.js → p-a47382ae.system.entry.js} +1 -1
  235. package/dist/zonos-elements/{p-0ee61fba.system.entry.js → p-b98cdf39.system.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-3638e2ed.entry.js → p-bd9b2165.entry.js} +1 -1
  237. package/dist/zonos-elements/{p-ff403840.entry.js → p-c20e5430.entry.js} +1 -1
  238. package/dist/zonos-elements/{p-13ddaf31.js → p-ce347974.js} +1 -1
  239. package/dist/zonos-elements/{p-f71489e5.system.entry.js → p-d0bc8902.system.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-17e265c3.system.entry.js → p-d7a939df.system.entry.js} +1 -1
  241. package/dist/zonos-elements/p-d7b8c1c1.system.entry.js +1 -0
  242. package/dist/zonos-elements/{p-163ff5b5.system.js → p-d99232c5.system.js} +1 -1
  243. package/dist/zonos-elements/p-dd0fd351.entry.js +1 -0
  244. package/dist/zonos-elements/p-e015cb0e.js +1 -0
  245. package/dist/zonos-elements/p-e0bf9666.system.js +1 -0
  246. package/dist/zonos-elements/{p-b98bdbcc.system.entry.js → p-e13bfbda.system.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-2fc561ac.system.entry.js → p-e1fbd05d.system.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-7cc730b0.js → p-e553dd19.js} +1 -1
  249. package/dist/zonos-elements/p-e6fa0ebc.system.js +1 -0
  250. package/dist/zonos-elements/{p-c64eefdd.system.entry.js → p-f6546bf4.system.entry.js} +1 -1
  251. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  252. package/dist/zonos-elements/zonos-elements.js +1 -1
  253. package/package.json +2 -2
  254. package/dist/esm-es5/cart-6448e883.js +0 -1
  255. package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
  256. package/dist/zonos-elements/p-154aaf95.system.js +0 -1
  257. package/dist/zonos-elements/p-47c75f81.system.entry.js +0 -1
  258. package/dist/zonos-elements/p-54004793.system.entry.js +0 -1
  259. package/dist/zonos-elements/p-7b19cd96.entry.js +0 -1
  260. package/dist/zonos-elements/p-9c575a18.system.entry.js +0 -1
  261. package/dist/zonos-elements/p-aaf1e517.system.js +0 -1
  262. package/dist/zonos-elements/p-aff5f4ca.js +0 -1
  263. package/dist/zonos-elements/p-ca621143.entry.js +0 -1
  264. package/dist/zonos-elements/p-e3335228.entry.js +0 -1
  265. package/dist/zonos-elements/p-ef9cbb66.system.js +0 -1
  266. package/dist/zonos-elements/p-f1962041.js +0 -1
@@ -68,6 +68,7 @@ export class ZonosCheckout {
68
68
  this.domesticRedirectedBtnSelector = '#zonos--domestic-redirected-checkout-button';
69
69
  this.legacyCheckoutHiddenBtnSelector = '#legacy-checkout-hidden-button';
70
70
  this.isLegacyCheckout = false;
71
+ this.confirmDialogOpen = false;
71
72
  }
72
73
  /**
73
74
  * Init cart info handler event
@@ -76,10 +77,27 @@ export class ZonosCheckout {
76
77
  const cartItems = e.detail;
77
78
  void cartStoreUpdateItems(cartItems);
78
79
  }
80
+ async handleKeyPress(e) {
81
+ if (e.key === 'Escape') {
82
+ void this.closeDialogHandler();
83
+ }
84
+ }
79
85
  /**
80
86
  * Close dialog action
81
87
  */
82
- async closeDialogHandler() {
88
+ async closeDialogHandler(props) {
89
+ var _a, _b;
90
+ if (!this.open) {
91
+ // Do nothing if the checkout is not even open
92
+ return;
93
+ }
94
+ // Only proceed when user select confirmed.
95
+ if (!(props === null || props === void 0 ? void 0 : props.confirmed)) {
96
+ this.confirmDialogOpen = true;
97
+ return;
98
+ }
99
+ // Close the confirm dialog
100
+ this.confirmDialogOpen = false;
83
101
  submitGtag('zonos-checkout-close');
84
102
  this.open = this.forceDialogOpen || false;
85
103
  if (!this.preview && cartStore.step === 'finish') {
@@ -90,6 +108,10 @@ export class ZonosCheckout {
90
108
  cartStore.step = 'customer-info';
91
109
  // reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
92
110
  cartStoreResetTabItems();
111
+ /**
112
+ * Trigger callback when the checkout is closed
113
+ */
114
+ (_b = (_a = zonosStore.checkoutSettings).onClose) === null || _b === void 0 ? void 0 : _b.call(_a);
93
115
  }
94
116
  async buildCartAndInit() {
95
117
  // if tempCartUUID is provided, use it instead of buildCartDetail
@@ -494,7 +516,11 @@ export class ZonosCheckout {
494
516
  hasFooter && 'has-footer',
495
517
  this.preview && 'preview',
496
518
  this.isMobile && 'mobile',
497
- ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent()))));
519
+ ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-confirm-dialog", { dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
520
+ this.confirmDialogOpen = false;
521
+ },
522
+ // Mark user selected confirm to close the dialog
523
+ onConfirmClicked: () => this.closeDialogHandler({ confirmed: true }) })));
498
524
  }
499
525
  static get is() { return "zonos-checkout"; }
500
526
  static get encapsulation() { return "scoped"; }
@@ -627,15 +653,20 @@ export class ZonosCheckout {
627
653
  "storybookPaymentStatusOverride": {},
628
654
  "domesticRedirectedBtnSelector": {},
629
655
  "legacyCheckoutHiddenBtnSelector": {},
630
- "isLegacyCheckout": {}
656
+ "isLegacyCheckout": {},
657
+ "confirmDialogOpen": {}
631
658
  };
632
659
  }
633
660
  static get methods() {
634
661
  return {
635
662
  "closeDialogHandler": {
636
663
  "complexType": {
637
- "signature": "() => Promise<void>",
638
- "parameters": [],
664
+ "signature": "(props?: { confirmed: boolean; }) => Promise<void>",
665
+ "parameters": [{
666
+ "name": "props",
667
+ "type": "{ confirmed: boolean; } | undefined",
668
+ "docs": ""
669
+ }],
639
670
  "references": {
640
671
  "Promise": {
641
672
  "location": "global",
@@ -717,6 +748,12 @@ export class ZonosCheckout {
717
748
  "target": "body",
718
749
  "capture": false,
719
750
  "passive": false
751
+ }, {
752
+ "name": "keydown",
753
+ "method": "handleKeyPress",
754
+ "target": "document",
755
+ "capture": false,
756
+ "passive": false
720
757
  }, {
721
758
  "name": "resize",
722
759
  "method": "handleWindowResize",
@@ -73,6 +73,18 @@
73
73
  margin: 1px;
74
74
  /** Button size */
75
75
  }
76
+ :host button:not([disabled]):hover {
77
+ background-image: var(--zonos-elements-button-standard-hover);
78
+ }
79
+ :host button:not([disabled]):active {
80
+ background: var(--zonos-elements-gray-700);
81
+ }
82
+ :host button:not([disabled]):focus {
83
+ box-shadow: var(--zonos-elements-focus-button);
84
+ }
85
+ :host button.with-box-shadow {
86
+ box-shadow: var(--zonos-elements-shadow-button-standard);
87
+ }
76
88
  :host button.sm.no-background, :host button.md.no-background, :host button.lg.no-background {
77
89
  background: none;
78
90
  outline: none;
@@ -14,6 +14,7 @@ export class ZonosButton {
14
14
  this.handleSlotChange = () => {
15
15
  this.hasContent = true;
16
16
  };
17
+ this.getColorVarProperty = (color) => color.replace('var(', '').replace(')', '');
17
18
  this.buttonColor = undefined;
18
19
  this.backgroundColor = undefined;
19
20
  this.borderStyle = undefined;
@@ -23,6 +24,7 @@ export class ZonosButton {
23
24
  this.size = 'sm';
24
25
  this.variant = 'standard';
25
26
  this.noBackground = false;
27
+ this.withBoxShadow = false;
26
28
  this.noPaddingLeft = false;
27
29
  this.noPaddingRight = false;
28
30
  this.loading = false;
@@ -52,15 +54,22 @@ export class ZonosButton {
52
54
  * So need to re-assign the variant prop with the default value if the value is `undefined` here.
53
55
  */
54
56
  const variant = this.variant || 'standard';
57
+ // use the variable if it's a color variable, otherwise use the color
58
+ const backgroundColor = this.backgroundColor && isColorVariable(this.backgroundColor)
59
+ ? `var(--zonos-elements-${this.backgroundColor})`
60
+ : this.backgroundColor;
55
61
  // use override background if it exists, otherwise use color from setting
56
- const overrideBackground = this.backgroundColor || zonosStore.appearance.colorSecondary;
62
+ const overrideBackground = backgroundColor || zonosStore.appearance.colorSecondary;
57
63
  // only set theme for button to change text color if variant is standard and override background is set
58
64
  const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
59
65
  const borderStyle = getBorderRadius({
60
66
  overrideBorderStyle: this.borderStyle,
61
67
  });
62
- const backgroundActualColor = isColorVariable(overrideBackground) && overrideBackground
63
- ? window.getComputedStyle(this.ele).getPropertyValue(overrideBackground)
68
+ const backgroundActualColor = overrideBackground &&
69
+ isColorVariable(this.getColorVarProperty(overrideBackground))
70
+ ? window
71
+ .getComputedStyle(this.ele)
72
+ .getPropertyValue(this.getColorVarProperty(overrideBackground))
64
73
  : overrideBackground;
65
74
  // use the variable if it's a color variable, otherwise use the color
66
75
  const color = this.buttonColor && isColorVariable(this.buttonColor)
@@ -75,28 +84,30 @@ export class ZonosButton {
75
84
  const spinnerColor = backgroundActualColor && isDarkColor(backgroundActualColor)
76
85
  ? 'white'
77
86
  : 'black';
78
- return (h(Host, { key: 'f5fd039f9ceeacae2448a09228bacc1bd6476be7', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
87
+ return (h(Host, { key: '6e361b1a80fd43a72a99a8201ca5d7cb86404656', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
79
88
  '--background-color': overrideBackground,
80
89
  '--border-radius': borderStyle,
81
90
  '--color': contrastColor,
82
91
  '--font-family': zonosStoreFontFamily(),
83
- }) }, h("button", { key: 'bcd3c7bf52464dd1e7485cdac6b0e3defbf63af3', class: classes([
92
+ }) }, h("button", { key: 'fd4335b2d9bfe74b509f1355fa620dc4c53f58c6', class: classes([
84
93
  this.hasIcon && 'has-icon',
85
94
  this.hasContent && 'has-content',
86
95
  this.noBackground && 'no-background',
87
96
  this.noPaddingLeft && 'no-padding-left',
88
97
  this.noPaddingRight && 'no-padding-right',
89
98
  this.iconRight && 'icon-right',
99
+ this.withBoxShadow && 'with-box-shadow',
90
100
  variant,
91
101
  this.size,
92
102
  // only override background if variant is set to standard
93
103
  overrideBackground &&
94
104
  variant === 'standard' &&
95
105
  'override-background',
96
- ]), disabled: disabled }, this.loading && (h("div", { key: 'ea73d8c4b4973f3a8ed6e5b85c2236c0f20b4c6f', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: 'cdbe444e0aee0e64facd757a1b5ebd74208359e0', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'e7a46cced38d7916873e5dea8aff4c33e137cdf6', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
106
+ ]), disabled: disabled }, this.loading && (h("div", { key: '7b37a1d30604de0d9e1f5d07bf6034724dcd8875', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: 'e4e3cbda9ae02c2ac9a7c17767bda93076ea67ad', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'e9b7287f2c4d9143f04103fe43d3f4dfd669341e', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
97
107
  }
98
108
  static get is() { return "zonos-button"; }
99
109
  static get encapsulation() { return "shadow"; }
110
+ static get delegatesFocus() { return true; }
100
111
  static get originalStyleUrls() {
101
112
  return {
102
113
  "$": ["zonos-button.scss"]
@@ -288,8 +299,14 @@ export class ZonosButton {
288
299
  "required": false,
289
300
  "optional": false,
290
301
  "docs": {
291
- "tags": [],
292
- "text": "The variance of the button\n**NOTE**: If the button `variant` is set to 'standard', backgroundColor will be disregarded"
302
+ "tags": [{
303
+ "name": "note",
304
+ "text": "If the button `variant` is set to 'standard', backgroundColor will be disregarded"
305
+ }, {
306
+ "name": "default",
307
+ "text": "standard"
308
+ }],
309
+ "text": "The variance of the button"
293
310
  },
294
311
  "attribute": "variant",
295
312
  "reflect": false,
@@ -316,6 +333,24 @@ export class ZonosButton {
316
333
  "reflect": false,
317
334
  "defaultValue": "false"
318
335
  },
336
+ "withBoxShadow": {
337
+ "type": "boolean",
338
+ "mutable": false,
339
+ "complexType": {
340
+ "original": "boolean",
341
+ "resolved": "boolean",
342
+ "references": {}
343
+ },
344
+ "required": false,
345
+ "optional": false,
346
+ "docs": {
347
+ "tags": [],
348
+ "text": "Whether or not the button has a box shadow"
349
+ },
350
+ "attribute": "with-box-shadow",
351
+ "reflect": false,
352
+ "defaultValue": "false"
353
+ },
319
354
  "noPaddingLeft": {
320
355
  "type": "boolean",
321
356
  "mutable": false,
@@ -0,0 +1,4 @@
1
+ <svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">
2
+ <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>
3
+ <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">
2
+ <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>
3
+ <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">
2
+ <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>
3
+ <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>
4
+ </svg>
@@ -0,0 +1,125 @@
1
+ :host {
2
+ font-family: var(--font-family, Inter), Inter;
3
+ display: block;
4
+ white-space: normal;
5
+ }
6
+ :host * {
7
+ font-family: var(--font-family, Inter), Inter;
8
+ }
9
+ :host img {
10
+ max-width: 100%;
11
+ }
12
+ :host dl,
13
+ :host dd,
14
+ :host h1,
15
+ :host h2,
16
+ :host h3,
17
+ :host h4,
18
+ :host h5,
19
+ :host h6,
20
+ :host hr,
21
+ :host figure,
22
+ :host p,
23
+ :host pre {
24
+ margin: 0;
25
+ }
26
+
27
+ /* All sets of variable are here */
28
+ /* smooth font rendering */
29
+ :host {
30
+ -moz-osx-font-smoothing: grayscale;
31
+ -webkit-font-smoothing: antialiased;
32
+ }
33
+
34
+ :host .zonos--backdrop,
35
+ :host .zonos--confirm-layout {
36
+ opacity: 0;
37
+ z-index: -999;
38
+ visibility: hidden;
39
+ transition: opacity 0.3s, visibility 0.3s;
40
+ }
41
+ :host .zonos--backdrop {
42
+ width: 100vw;
43
+ height: 100vh;
44
+ left: 0;
45
+ top: 0;
46
+ background: var(--zonos-elements-backdrop-color);
47
+ position: fixed;
48
+ }
49
+ :host .zonos--confirm-layout {
50
+ width: 100vw;
51
+ height: 100vh;
52
+ left: 0;
53
+ top: 0;
54
+ position: fixed;
55
+ display: flex;
56
+ justify-content: center;
57
+ align-items: center;
58
+ color: var(--zonos-elements-text-color);
59
+ }
60
+ :host .zonos--confirm-dialog {
61
+ position: relative;
62
+ background: var(--zonos-elements-gray-0);
63
+ max-width: 90vw;
64
+ max-height: 90vh;
65
+ width: 350px;
66
+ border-radius: var(--border-radius, 10px);
67
+ outline: none;
68
+ box-shadow: var(--zonos-elements-v3-shadow-xxl);
69
+ border: var(--zonos-elements-border);
70
+ display: flex;
71
+ flex-direction: column;
72
+ }
73
+ :host .wrapper {
74
+ display: flex;
75
+ flex-direction: column;
76
+ align-items: center;
77
+ justify-content: center;
78
+ padding: 24px;
79
+ gap: 24px;
80
+ }
81
+ :host .icon-wrapper {
82
+ display: inline-flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ height: 40px;
86
+ width: 40px;
87
+ border-radius: 50%;
88
+ background: var(--zonos-elements-blue-100);
89
+ }
90
+ :host .warn .icon-wrapper {
91
+ background: var(--zonos-elements-orange-100);
92
+ }
93
+ :host .danger .icon-wrapper {
94
+ background: var(--zonos-elements-red-100);
95
+ }
96
+ :host .footer {
97
+ display: flex;
98
+ width: 100%;
99
+ gap: 8px;
100
+ }
101
+ :host .footer zonos-button {
102
+ flex: 1;
103
+ }
104
+ :host .content {
105
+ display: flex;
106
+ gap: 8px;
107
+ flex-direction: column;
108
+ }
109
+ :host .content zonos-text {
110
+ text-align: center;
111
+ }
112
+
113
+ :host(.open) .zonos--confirm-layout,
114
+ :host(.open) .zonos--backdrop {
115
+ visibility: visible;
116
+ }
117
+ :host(.open) .zonos--backdrop {
118
+ z-index: 10003;
119
+ opacity: 0.65;
120
+ }
121
+ :host(.open) .zonos--confirm-layout {
122
+ opacity: 1;
123
+ z-index: 10004;
124
+ transform: scale(1);
125
+ }