@zonos/elements 1.3.11-alpha.0 → 1.3.11-alpha.1

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 (264) hide show
  1. package/dist/cjs/{cart-7e28f026.js → cart-d9e9ecfc.js} +29 -25
  2. package/dist/cjs/{getBorderRadius-d795f526.js → getBorderRadius-9d619bf6.js} +1 -1
  3. package/dist/cjs/getContrastColor-af2386af.js +20 -0
  4. package/dist/cjs/{isColorVariable-41cacd82.js → isColorVariable-fff5e469.js} +1 -1
  5. package/dist/cjs/{isDarkColor-33fb96a7.js → isDarkColor-a68274cf.js} +2 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{submitGtag-586d3206.js → submitGtag-b7ef5d5b.js} +2 -2
  8. package/dist/cjs/zonos-address_4.cjs.entry.js +11 -11
  9. package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
  10. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  11. package/dist/cjs/{zonos-button_3.cjs.entry.js → zonos-button_2.cjs.entry.js} +34 -36
  12. package/dist/cjs/zonos-card_2.cjs.entry.js +8 -8
  13. package/dist/cjs/{zonos-cart-items_9.cjs.entry.js → zonos-cart-items_10.cjs.entry.js} +161 -48
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +20 -22
  15. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  16. package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
  17. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  18. package/dist/cjs/zonos-country-select_3.cjs.entry.js +9 -9
  19. package/dist/cjs/zonos-elements.cjs.js +1 -1
  20. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
  21. package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
  22. package/dist/cjs/zonos-icon.cjs.entry.js +39 -0
  23. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
  25. package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
  27. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +5 -5
  28. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +13 -4
  29. package/dist/cjs/zonos-text.cjs.entry.js +6 -2
  30. package/dist/cjs/{zonosStore-d3f0173b.js → zonosStore-21334303.js} +1 -1
  31. package/dist/collection/collection-manifest.json +1 -0
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +32 -22
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +76 -16
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +2 -4
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +15 -17
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +1 -1
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +43 -24
  38. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
  39. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  40. package/dist/collection/components/common/zonos-button/zonos-button.css +1 -1
  41. package/dist/collection/components/common/zonos-button/zonos-button.js +18 -4
  42. package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
  43. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  44. package/dist/collection/components/common/zonos-checkout-progress-tabs/assets/TabCheckmark.svg +3 -0
  45. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +102 -0
  46. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +193 -0
  47. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  48. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  49. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +1 -1
  50. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +1 -1
  51. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -28
  52. package/dist/collection/components/common/zonos-icon/zonos-icon.js +7 -3
  53. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  54. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -4
  55. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  56. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +27 -1
  57. package/dist/collection/components/common/zonos-text/zonos-text.js +7 -3
  58. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  59. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  60. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  61. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  62. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +1 -1
  63. package/dist/collection/components/main/zonos-controller.js +1 -1
  64. package/dist/collection/components/store/checkout/cart.js +26 -0
  65. package/dist/collection/components/store/zonosStore.js +1 -1
  66. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  67. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  68. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  69. package/dist/collection/components/utils/getContrastColor.js +16 -0
  70. package/dist/collection/components/utils/isColorVariable.js +1 -1
  71. package/dist/collection/components/utils/styles.js +12 -0
  72. package/dist/components/getContrastColor.js +18 -0
  73. package/dist/components/isColorVariable.js +1 -1
  74. package/dist/components/isDarkColor.js +1 -1
  75. package/dist/components/stripe.js +27 -22
  76. package/dist/components/trackConversionEvent.js +1 -1
  77. package/dist/components/zonos-address2.js +1 -1
  78. package/dist/components/zonos-badge2.js +3 -3
  79. package/dist/components/zonos-button2.js +30 -4
  80. package/dist/components/zonos-card2.js +2 -2
  81. package/dist/components/zonos-checkbox2.js +3 -3
  82. package/dist/components/zonos-checkout-finish2.js +1 -1
  83. package/dist/components/zonos-checkout-footer2.js +33 -17
  84. package/dist/components/zonos-checkout-progress-tabs.d.ts +11 -0
  85. package/dist/components/zonos-checkout-progress-tabs.js +6 -0
  86. package/dist/components/zonos-checkout-progress-tabs2.js +122 -0
  87. package/dist/components/zonos-checkout.js +44 -40
  88. package/dist/components/zonos-collapse2.js +2 -2
  89. package/dist/components/zonos-component.js +1 -1
  90. package/dist/components/zonos-controller.js +2 -2
  91. package/dist/components/zonos-country-select2.js +2 -2
  92. package/dist/components/zonos-custom-message2.js +1 -1
  93. package/dist/components/zonos-dialog2.js +4 -6
  94. package/dist/components/zonos-hello-dialog-footer2.js +2 -2
  95. package/dist/components/zonos-hello-dialog2.js +2 -2
  96. package/dist/components/zonos-hello.js +1 -1
  97. package/dist/components/zonos-icon2.js +5 -1
  98. package/dist/components/zonos-language-select2.js +3 -3
  99. package/dist/components/zonos-link-authentication2.js +1 -1
  100. package/dist/components/zonos-link.js +1 -1
  101. package/dist/components/zonos-logo.js +2 -2
  102. package/dist/components/zonos-payment2.js +1 -1
  103. package/dist/components/zonos-review2.js +1 -1
  104. package/dist/components/zonos-select-dialog-header2.js +2 -2
  105. package/dist/components/zonos-shipping-rich-radio2.js +11 -1
  106. package/dist/components/zonos-shipping2.js +44 -25
  107. package/dist/components/zonos-text2.js +5 -1
  108. package/dist/components/zonos-tooltip2.js +2 -2
  109. package/dist/components/zonos-v-stack2.js +2 -2
  110. package/dist/components/zonosStore.js +1 -1
  111. package/dist/esm/{cart-5a88b4f3.js → cart-6cfd7560.js} +30 -25
  112. package/dist/esm/{getBorderRadius-5d750ab8.js → getBorderRadius-c5fb7746.js} +1 -1
  113. package/dist/esm/getContrastColor-a1a6f6aa.js +18 -0
  114. package/dist/esm/{isColorVariable-91c33804.js → isColorVariable-fbf2d80d.js} +1 -1
  115. package/dist/esm/{isDarkColor-c34dfed9.js → isDarkColor-810fcaa5.js} +2 -2
  116. package/dist/esm/loader.js +1 -1
  117. package/dist/esm/{submitGtag-289ddd8b.js → submitGtag-acca574d.js} +2 -2
  118. package/dist/esm/zonos-address_4.entry.js +11 -11
  119. package/dist/esm/zonos-badge_2.entry.js +6 -6
  120. package/dist/esm/zonos-banner.entry.js +1 -1
  121. package/dist/esm/{zonos-button_3.entry.js → zonos-button_2.entry.js} +35 -36
  122. package/dist/esm/zonos-card_2.entry.js +8 -8
  123. package/dist/esm/{zonos-cart-items_9.entry.js → zonos-cart-items_10.entry.js} +161 -49
  124. package/dist/esm/zonos-checkout.entry.js +20 -22
  125. package/dist/esm/zonos-component.entry.js +1 -1
  126. package/dist/esm/zonos-controller.entry.js +5 -5
  127. package/dist/esm/zonos-country-flag.entry.js +4 -4
  128. package/dist/esm/zonos-country-select_3.entry.js +9 -9
  129. package/dist/esm/zonos-elements.js +1 -1
  130. package/dist/esm/zonos-hello-dialog.entry.js +5 -5
  131. package/dist/esm/zonos-hello.entry.js +4 -4
  132. package/dist/esm/zonos-icon.entry.js +35 -0
  133. package/dist/esm/zonos-link.entry.js +1 -1
  134. package/dist/esm/zonos-logo.entry.js +3 -3
  135. package/dist/esm/zonos-notification.entry.js +1 -1
  136. package/dist/esm/zonos-payment.entry.js +5 -5
  137. package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
  138. package/dist/esm/zonos-shipping-rich-radio.entry.js +13 -4
  139. package/dist/esm/zonos-text.entry.js +6 -2
  140. package/dist/esm/{zonosStore-aac7c6ac.js → zonosStore-e5f3d4da.js} +1 -1
  141. package/dist/esm-es5/{cart-5a88b4f3.js → cart-6cfd7560.js} +1 -1
  142. package/dist/esm-es5/{getBorderRadius-5d750ab8.js → getBorderRadius-c5fb7746.js} +1 -1
  143. package/dist/esm-es5/getContrastColor-a1a6f6aa.js +1 -0
  144. package/dist/esm-es5/isColorVariable-fbf2d80d.js +1 -0
  145. package/dist/esm-es5/{isDarkColor-c34dfed9.js → isDarkColor-810fcaa5.js} +1 -1
  146. package/dist/esm-es5/loader.js +1 -1
  147. package/dist/esm-es5/{submitGtag-289ddd8b.js → submitGtag-acca574d.js} +1 -1
  148. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  149. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  150. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  151. package/dist/esm-es5/zonos-button_2.entry.js +1 -0
  152. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  153. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -0
  154. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  155. package/dist/esm-es5/zonos-component.entry.js +1 -1
  156. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  157. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  158. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  159. package/dist/esm-es5/zonos-elements.js +1 -1
  160. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  161. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  162. package/dist/esm-es5/zonos-icon.entry.js +1 -0
  163. package/dist/esm-es5/zonos-link.entry.js +1 -1
  164. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  165. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  166. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  167. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  168. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  169. package/dist/esm-es5/zonos-text.entry.js +1 -1
  170. package/dist/esm-es5/{zonosStore-aac7c6ac.js → zonosStore-e5f3d4da.js} +1 -1
  171. package/dist/scripts/loadZonos.js +1 -1
  172. package/dist/scripts/zonos.js +1 -1
  173. package/dist/scripts/zonosBase.js +1 -1
  174. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.d.ts +14 -2
  175. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +0 -1
  176. package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +7 -0
  177. package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -0
  178. package/dist/types/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.d.ts +29 -0
  179. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +0 -5
  180. package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +3 -1
  181. package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +1 -1
  182. package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
  183. package/dist/types/components/common/zonos-text/zonos-text.d.ts +3 -1
  184. package/dist/types/components/store/checkout/cart.d.ts +10 -1
  185. package/dist/types/components/utils/getContrastColor.d.ts +4 -0
  186. package/dist/types/components/utils/isColorVariable.d.ts +1 -1
  187. package/dist/types/components/utils/styles.d.ts +7 -0
  188. package/dist/types/components.d.ts +67 -14
  189. package/dist/zonos-elements/assets/TabCheckmark.svg +3 -0
  190. package/dist/zonos-elements/p-0b51de7b.system.entry.js +1 -0
  191. package/dist/zonos-elements/{p-d7690752.system.entry.js → p-0dfd549e.system.entry.js} +1 -1
  192. package/dist/zonos-elements/{p-c1e54094.system.js → p-0f414d6a.system.js} +1 -1
  193. package/dist/zonos-elements/{p-723628b7.js → p-0f8acb62.js} +1 -1
  194. package/dist/zonos-elements/{p-27d57265.system.entry.js → p-20b080d1.system.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-7e355496.system.entry.js → p-212992ec.system.entry.js} +1 -1
  196. package/dist/zonos-elements/p-22db99c9.system.entry.js +1 -0
  197. package/dist/zonos-elements/{p-14bf3658.entry.js → p-26aee7a0.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-c6de2e40.system.entry.js → p-2d5a6a7f.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-ca6b4c1e.system.entry.js → p-2fdec8bc.system.entry.js} +1 -1
  200. package/dist/zonos-elements/p-352ba771.system.js +1 -0
  201. package/dist/zonos-elements/p-4051a42d.js +1 -0
  202. package/dist/zonos-elements/p-5162f4cc.system.entry.js +1 -0
  203. package/dist/zonos-elements/{p-d0d12a64.entry.js → p-51c32b3d.entry.js} +1 -1
  204. package/dist/zonos-elements/{p-4569bc92.js → p-55b8b98b.js} +1 -1
  205. package/dist/zonos-elements/p-59595553.entry.js +1 -0
  206. package/dist/zonos-elements/p-5a40684c.entry.js +1 -0
  207. package/dist/zonos-elements/{p-25fbcefe.system.entry.js → p-60ac5342.system.entry.js} +1 -1
  208. package/dist/zonos-elements/p-61e08de7.system.entry.js +1 -0
  209. package/dist/zonos-elements/{p-e969cec9.entry.js → p-65a877e2.entry.js} +1 -1
  210. package/dist/zonos-elements/{p-d2885590.system.js → p-66cc1554.system.js} +1 -1
  211. package/dist/zonos-elements/p-6a80f7f5.entry.js +1 -0
  212. package/dist/zonos-elements/{p-5f2cb4b6.entry.js → p-6daa64bf.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-77727098.system.js → p-6db032ee.system.js} +1 -1
  214. package/dist/zonos-elements/{p-188ddbe2.entry.js → p-6dc606c6.entry.js} +1 -1
  215. package/dist/zonos-elements/p-6e81adba.system.js +1 -1
  216. package/dist/zonos-elements/{p-4ad5f307.system.entry.js → p-7e00a5dc.system.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-a725946f.entry.js → p-817e7f8e.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-dad00ad3.system.entry.js → p-824b8708.system.entry.js} +1 -1
  219. package/dist/zonos-elements/{p-770384fa.system.entry.js → p-9a2c3874.system.entry.js} +1 -1
  220. package/dist/zonos-elements/{p-edbea8df.system.js → p-9db2f9d1.system.js} +1 -1
  221. package/dist/zonos-elements/{p-77c54b83.js → p-a1a477c9.js} +1 -1
  222. package/dist/zonos-elements/{p-93e51987.system.entry.js → p-a398bc59.system.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-febddb45.entry.js → p-a641dfcd.entry.js} +1 -1
  224. package/dist/zonos-elements/p-a7bfe188.entry.js +1 -0
  225. package/dist/zonos-elements/{p-9db3028d.entry.js → p-ac7155d7.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-6181f2d5.entry.js → p-ad499520.entry.js} +1 -1
  227. package/dist/zonos-elements/{p-a578facf.entry.js → p-b0e9226a.entry.js} +1 -1
  228. package/dist/zonos-elements/{p-d9c65636.system.js → p-b1ee44c6.system.js} +1 -1
  229. package/dist/zonos-elements/{p-e392e212.system.entry.js → p-b2c48954.system.entry.js} +1 -1
  230. package/dist/zonos-elements/{p-315c1fc2.entry.js → p-b62aee3d.entry.js} +1 -1
  231. package/dist/zonos-elements/p-b76909ab.entry.js +1 -0
  232. package/dist/zonos-elements/{p-333da541.entry.js → p-b9cde0c3.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-482371fb.system.entry.js → p-c4862aab.system.entry.js} +1 -1
  234. package/dist/zonos-elements/p-c6e44a9b.entry.js +1 -0
  235. package/dist/zonos-elements/p-cde25873.js +1 -0
  236. package/dist/zonos-elements/p-d96f8d89.system.entry.js +1 -0
  237. package/dist/zonos-elements/p-e2131057.entry.js +1 -0
  238. package/dist/zonos-elements/p-e28ed57c.js +1 -0
  239. package/dist/zonos-elements/{p-49a5be72.js → p-e74f27da.js} +1 -1
  240. package/dist/zonos-elements/{p-afcded5d.system.js → p-ed4d8d71.system.js} +1 -1
  241. package/dist/zonos-elements/{p-0b4910fe.system.entry.js → p-f62b49aa.system.entry.js} +1 -1
  242. package/dist/zonos-elements/{p-a87803b7.system.entry.js → p-f8b03017.system.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-8445a084.system.entry.js → p-fac20c60.system.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-e4e1ca2f.system.entry.js → p-fd8c50e8.system.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-d5a9dfc7.entry.js → p-ff17c03b.entry.js} +1 -1
  246. package/dist/zonos-elements/p-ff962844.entry.js +1 -0
  247. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  248. package/package.json +1 -1
  249. package/dist/esm-es5/isColorVariable-91c33804.js +0 -1
  250. package/dist/esm-es5/zonos-button_3.entry.js +0 -1
  251. package/dist/esm-es5/zonos-cart-items_9.entry.js +0 -1
  252. package/dist/zonos-elements/p-144f4d31.entry.js +0 -1
  253. package/dist/zonos-elements/p-4c414a92.js +0 -1
  254. package/dist/zonos-elements/p-5c991faa.system.entry.js +0 -1
  255. package/dist/zonos-elements/p-691d8075.entry.js +0 -1
  256. package/dist/zonos-elements/p-87c4ac09.system.entry.js +0 -1
  257. package/dist/zonos-elements/p-9f532a3f.entry.js +0 -1
  258. package/dist/zonos-elements/p-afc0460d.entry.js +0 -1
  259. package/dist/zonos-elements/p-dd153a4e.entry.js +0 -1
  260. package/dist/zonos-elements/p-def8823e.entry.js +0 -1
  261. package/dist/zonos-elements/p-e4749f19.js +0 -1
  262. package/dist/zonos-elements/p-e87e8c9c.system.entry.js +0 -1
  263. package/dist/zonos-elements/p-f1170e7b.entry.js +0 -1
  264. package/dist/zonos-elements/p-fe0930e4.system.entry.js +0 -1
@@ -0,0 +1,193 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { cartStore, } from "../../store/checkout/cart";
3
+ import { zonosStore } from "../../store/zonosStore";
4
+ import { classes } from "../../utils/classes";
5
+ import { getContrastColor } from "../../utils/getContrastColor";
6
+ import { isColorVariable } from "../../utils/isColorVariable";
7
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
8
+ import TabCheckmark from "./assets/TabCheckmark.svg";
9
+ export class ZonosCheckoutProgressTabs {
10
+ constructor() {
11
+ /**
12
+ * The total number of steps that's done
13
+ */
14
+ this.getTotalSuccessStep = () => {
15
+ // include the finish step
16
+ const totalSteps = 4;
17
+ const stepDone = Object.values(cartStore.tabItems).filter(tab => tab.isDone).length + 1;
18
+ return `${(stepDone / totalSteps) * 100}%`;
19
+ };
20
+ this.isTabClickable = (tabValue) => {
21
+ const currentTab = cartStore.tabItems[tabValue];
22
+ if (!currentTab) {
23
+ return false;
24
+ }
25
+ // clickable if the tab state is done
26
+ if (currentTab.isDone) {
27
+ return true;
28
+ }
29
+ // if any of the previous tabs are not done, the tab is not clickable
30
+ return Object.values(cartStore.tabItems)
31
+ .slice(0, currentTab.index - 1)
32
+ .every(tab => tab.isDone);
33
+ };
34
+ this.tabColor = null;
35
+ this.backgroundColor = null;
36
+ }
37
+ /**
38
+ * Set the tab items data. This is to be used in storybook
39
+ */
40
+ async setTabItems(tabItems) {
41
+ cartStore.tabItems = tabItems;
42
+ }
43
+ /**
44
+ * Set selected tab. Only set the tab if it's clickable
45
+ */
46
+ async setTabSelected(tabValue) {
47
+ if (this.isTabClickable(tabValue)) {
48
+ cartStore.step = tabValue;
49
+ }
50
+ }
51
+ render() {
52
+ const selectedStep = cartStore.step;
53
+ const labelSelectedColor = this.tabColor || zonosStore.appearance.colorSecondary;
54
+ // If the background color and the tab color are not contrat enough, increase the contrast of the label color
55
+ const contrastLabelColor = this.backgroundColor && labelSelectedColor
56
+ ? getContrastColor({
57
+ backgroundColor: isColorVariable(this.backgroundColor)
58
+ ? window
59
+ .getComputedStyle(this.ele)
60
+ .getPropertyValue(`--amino-${this.backgroundColor.replace('--amino-', '')}`)
61
+ : this.backgroundColor,
62
+ color: labelSelectedColor,
63
+ })
64
+ : labelSelectedColor;
65
+ return (h(Host, { key: '1fd6d6cb0f4e819f7e0a204fdc1bccbd2753154c', class: "zonos--elements", "data-theme": zonosStore.appearance.theme, style: {
66
+ '--color': contrastLabelColor,
67
+ '--progress-percent': this.getTotalSuccessStep(),
68
+ } }, h("div", { key: 'e7b0c9e9376461461286856553381d20bdd50bb6', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
69
+ const isSelected = tab.value === selectedStep;
70
+ return (h("button", { class: classes([
71
+ 'zonos--tab-item',
72
+ tab.value === selectedStep && 'selected',
73
+ tab.isDone && 'done',
74
+ ]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, tab.label)));
75
+ })), h("div", { key: 'e924379e523d61952e3db826daeb080917c5b468', class: "zonos--tab-progress" }, h("div", { key: '80d193a8f2099a6eb552c1c016be545b9120c6d1', class: "zonos--progress-bar-fill" }))));
76
+ }
77
+ static get is() { return "zonos-checkout-progress-tabs"; }
78
+ static get encapsulation() { return "shadow"; }
79
+ static get originalStyleUrls() {
80
+ return {
81
+ "$": ["zonos-checkout-progress-tabs.scss"]
82
+ };
83
+ }
84
+ static get styleUrls() {
85
+ return {
86
+ "$": ["zonos-checkout-progress-tabs.css"]
87
+ };
88
+ }
89
+ static get assetsDirs() { return ["assets"]; }
90
+ static get properties() {
91
+ return {
92
+ "tabColor": {
93
+ "type": "string",
94
+ "mutable": false,
95
+ "complexType": {
96
+ "original": "string | null",
97
+ "resolved": "null | string | undefined",
98
+ "references": {}
99
+ },
100
+ "required": false,
101
+ "optional": true,
102
+ "docs": {
103
+ "tags": [],
104
+ "text": "Color of the tab progress bar and label, override the secondary color of the appearance settings"
105
+ },
106
+ "attribute": "tab-color",
107
+ "reflect": false,
108
+ "defaultValue": "null"
109
+ },
110
+ "backgroundColor": {
111
+ "type": "string",
112
+ "mutable": false,
113
+ "complexType": {
114
+ "original": "Color | (string & { _placeholder?: never }) | null",
115
+ "resolved": "Color | (string & { _placeholder?: undefined; }) | null | undefined",
116
+ "references": {
117
+ "Color": {
118
+ "location": "import",
119
+ "path": "src/types/styles/Color",
120
+ "id": "src/types/styles/Color.ts::Color"
121
+ }
122
+ }
123
+ },
124
+ "required": false,
125
+ "optional": true,
126
+ "docs": {
127
+ "tags": [],
128
+ "text": "Background color of the parent that's wrapped around the tab progress bar"
129
+ },
130
+ "attribute": "background-color",
131
+ "reflect": false,
132
+ "defaultValue": "null"
133
+ }
134
+ };
135
+ }
136
+ static get methods() {
137
+ return {
138
+ "setTabItems": {
139
+ "complexType": {
140
+ "signature": "(tabItems: TabItems) => Promise<void>",
141
+ "parameters": [{
142
+ "name": "tabItems",
143
+ "type": "{ \"customer-info\": TabItem; shipping: TabItem; payment: TabItem; }",
144
+ "docs": ""
145
+ }],
146
+ "references": {
147
+ "Promise": {
148
+ "location": "global",
149
+ "id": "global::Promise"
150
+ },
151
+ "TabItems": {
152
+ "location": "import",
153
+ "path": "src/components/store/checkout/cart",
154
+ "id": "src/components/store/checkout/cart.ts::TabItems"
155
+ }
156
+ },
157
+ "return": "Promise<void>"
158
+ },
159
+ "docs": {
160
+ "text": "Set the tab items data. This is to be used in storybook",
161
+ "tags": []
162
+ }
163
+ },
164
+ "setTabSelected": {
165
+ "complexType": {
166
+ "signature": "(tabValue: TabItem['value']) => Promise<void>",
167
+ "parameters": [{
168
+ "name": "tabValue",
169
+ "type": "\"customer-info\" | \"shipping\" | \"payment\"",
170
+ "docs": ""
171
+ }],
172
+ "references": {
173
+ "Promise": {
174
+ "location": "global",
175
+ "id": "global::Promise"
176
+ },
177
+ "TabItem": {
178
+ "location": "import",
179
+ "path": "src/components/store/checkout/cart",
180
+ "id": "src/components/store/checkout/cart.ts::TabItem"
181
+ }
182
+ },
183
+ "return": "Promise<void>"
184
+ },
185
+ "docs": {
186
+ "text": "Set selected tab. Only set the tab if it's clickable",
187
+ "tags": []
188
+ }
189
+ }
190
+ };
191
+ }
192
+ static get elementRef() { return "ele"; }
193
+ }
@@ -42,10 +42,10 @@ export class ZonosCollapse {
42
42
  // set overflow to hidden to prevent content from showing when collapsed
43
43
  this.el.style.overflow = 'hidden';
44
44
  }
45
- return (h(Host, { key: '7ac8b898feadfb4424b3b48a98135cb18994f4e0', class: 'zonos--elements zonos--collapse', style: {
45
+ return (h(Host, { key: '032f5818dd8394b5111927907c8fa135a55fef5c', class: 'zonos--elements zonos--collapse', style: {
46
46
  '--font-family': zonosStoreFontFamily(),
47
47
  height: this.getElementHeight(),
48
- } }, h("div", { key: '4a527ec319b59041196284d4d9a8f22b943a74e6' }, h("iframe", { key: '2fb51c16e13ca90561b1b1e6cab89d87e4a37a47', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: '6d7849f6c35be611446b0da36d657396e5ca3122' }))));
48
+ } }, h("div", { key: '5ddbf406c93f37c9e23375f11dd8439934c0d2a5' }, h("iframe", { key: 'b3efa8bc198918dbb3284e8ce658ffca6249eaa8', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'ffcd123c3a046e62855a650da9972cde94a7774c' }))));
49
49
  }
50
50
  static get is() { return "zonos-collapse"; }
51
51
  static get encapsulation() { return "shadow"; }
@@ -35,9 +35,9 @@ export class ZonosCountrySelect {
35
35
  const filteredCountries = this.inputValue
36
36
  ? fuseObject.map(country => country.item)
37
37
  : countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
38
- return (h(Host, { key: '2b8e15643f92ac489706aff7623b1d1efdebce70', class: "zonos--elements", style: {
38
+ return (h(Host, { key: '0024a7061a593cf3c92fd7f6b5916aaac3a835c9', class: "zonos--elements", style: {
39
39
  '--font-family': zonosStoreFontFamily(),
40
- } }, h("div", { key: '06b0c7765d8144ca102c9033e74cf1edb14743ac', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'f2af99575f518acb753448f7cb1f7aecd790de9d', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '296b92c476439aace00f6817b452a3fd3e1d353d', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: 'd988b856392f88a66bcc3016ccf55107bda4a411', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '4376bec824141dd7d2dbfb84f465ac4a48e1d050', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
40
+ } }, h("div", { key: 'e6ef5d8cc13e731c94ee5ef037c02eac36d9bce6', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'f698da7688757b6728e99e0cecb21ac4ce586d30', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'd37801e6023262a582d3ecc6e3a39f505f7e82b8', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '6f053c963f5e25b5285a94070336650537bbdad3', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '3d3e180b204bf9fa0893fec7839f1d0d5c4740c1', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
41
41
  }
42
42
  static get is() { return "zonos-country-select"; }
43
43
  static get encapsulation() { return "shadow"; }
@@ -8,7 +8,7 @@ export class ZonosCustomMessage {
8
8
  }
9
9
  render() {
10
10
  const messageWithLinks = formatStringWithLinks(this.message);
11
- return (h(Host, { key: '73091a3267f0989e8820800054aebc75168dc5d6', class: "zonos--elements", style: {
11
+ return (h(Host, { key: 'b09b7025fb55c4323aaa24ccb7e410d1638bed8a', class: "zonos--elements", style: {
12
12
  '--font-family': zonosStoreFontFamily(),
13
13
  } }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { innerHTML: messageWithLinks }))))));
14
14
  }
@@ -60,6 +60,7 @@
60
60
  justify-content: center;
61
61
  z-index: 10002;
62
62
  background: white;
63
+ border-radius: var(--border-radius, var(--amino-radius-10));
63
64
  }
64
65
  :host .zonos--dialog-layout {
65
66
  width: 100vw;
@@ -86,7 +87,6 @@
86
87
  outline: none;
87
88
  box-shadow: var(--amino-v3-shadow-xxl);
88
89
  border: var(--amino-border);
89
- overflow: hidden;
90
90
  display: flex;
91
91
  flex-direction: column;
92
92
  }
@@ -25,7 +25,6 @@ export class ZonosDialog {
25
25
  this.noHeader = false;
26
26
  this.noBodyPadding = false;
27
27
  this.noBorder = false;
28
- this.footerRightAction = null;
29
28
  this.borderStyle = undefined;
30
29
  this.noCloseButton = false;
31
30
  this.noClickOutside = false;
@@ -48,7 +47,7 @@ export class ZonosDialog {
48
47
  document.body.style.overflow = 'auto';
49
48
  }
50
49
  const borderStyle = getBorderRadius(this.borderStyle);
51
- return (h(Host, { key: '3927d9cf0ebbd8b497a0ec42328c4392925d198a', class: classes([
50
+ return (h(Host, { key: '6bda73bd75e6bc31e73ad53849a51752396ee42d', class: classes([
52
51
  'zonos--elements',
53
52
  this.open && 'open',
54
53
  this.isLoading && 'is-loading',
@@ -59,10 +58,10 @@ export class ZonosDialog {
59
58
  '--font-family': zonosStoreFontFamily(),
60
59
  '--height': this.height || 'initial',
61
60
  '--width': this.width,
62
- } }, h("div", { key: 'df93af61bfd856db3a572cdb98f60a8dd5c5bb7d', class: "zonos--backdrop" }), h("div", { key: 'f306feb4858dff642fbfd731e5aad849a8f29941', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'b914ea2e54fb2af825008ae28e235c461dce67e9', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: '19219c0c8d167bbacec992ba10b1fe0f31a8b8f6', class: classes([
61
+ } }, h("div", { key: 'cd3ff21820f95faee3f16e23a272e080bd7930c8', class: "zonos--backdrop" }), h("div", { key: '85af066de976e3b29505c8804e544ca0a1f8a012', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: '389491715fcb12f9c86b744e2e9c20930a2a9f25', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: 'a28ad12faab02ef30769a3234b24e749b38c46b4', class: classes([
63
62
  'zonos--body',
64
63
  this.noBodyPadding && 'zonos--no-body-padding',
65
- ]) }, h("slot", { key: '38f9b83418dacd47cc2395f253a32ff0a6723d54' })), this.footerRightAction && (h("div", { class: "zonos--footer" }, h("div", { class: "zonos--footer-right-action" }, this.footerRightAction)))))));
64
+ ]) }, h("slot", { key: '7da31d739197a17ae94df1909c93f70c1282da95' })), h("slot", { key: 'fe02670713895b786dfa6b0c30ad6553c32796cd', name: "dialog-footer" })))));
66
65
  }
67
66
  static get is() { return "zonos-dialog"; }
68
67
  static get encapsulation() { return "shadow"; }
@@ -219,30 +218,6 @@ export class ZonosDialog {
219
218
  "reflect": false,
220
219
  "defaultValue": "false"
221
220
  },
222
- "footerRightAction": {
223
- "type": "unknown",
224
- "mutable": false,
225
- "complexType": {
226
- "original": "HTMLElement | null",
227
- "resolved": "HTMLElement | null",
228
- "references": {
229
- "HTMLElement": {
230
- "location": "global",
231
- "id": "global::HTMLElement"
232
- }
233
- }
234
- },
235
- "required": false,
236
- "optional": false,
237
- "docs": {
238
- "tags": [{
239
- "name": "default",
240
- "text": "null"
241
- }],
242
- "text": "The right area for the action in the footer"
243
- },
244
- "defaultValue": "null"
245
- },
246
221
  "borderStyle": {
247
222
  "type": "string",
248
223
  "mutable": false,
@@ -1,5 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { zonosStoreFontFamily } from "../../store/zonosStore";
3
+ import { isColorVariable } from "../../utils/isColorVariable";
3
4
  export class ZonosIcon {
4
5
  constructor() {
5
6
  this.autoHeight = false;
@@ -11,9 +12,12 @@ export class ZonosIcon {
11
12
  if (!this.content || !this.el.shadowRoot) {
12
13
  return null;
13
14
  }
15
+ const iconColor = isColorVariable(this.iconColor)
16
+ ? `var(--amino-${this.iconColor})`
17
+ : this.iconColor;
14
18
  this.el.shadowRoot.innerHTML = this.content;
15
19
  return (h(Host, { class: "zonos--elements", style: {
16
- '--color': `var(--amino-${this.iconColor})`,
20
+ '--color': iconColor,
17
21
  '--font-family': zonosStoreFontFamily(),
18
22
  '--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
19
23
  '--width': `${this.size}px`,
@@ -58,8 +62,8 @@ export class ZonosIcon {
58
62
  "type": "string",
59
63
  "mutable": false,
60
64
  "complexType": {
61
- "original": "Color",
62
- "resolved": "\"blue-100\" | \"blue-200\" | \"blue-300\" | \"blue-400\" | \"blue-500\" | \"blue-600\" | \"blue-700\" | \"blue-800\" | \"blue-900\" | \"blue-1000\" | \"cyan-100\" | \"cyan-200\" | \"cyan-300\" | \"cyan-400\" | \"cyan-500\" | \"cyan-600\" | \"cyan-700\" | \"cyan-800\" | \"cyan-900\" | \"cyan-1000\" | \"green-100\" | \"green-200\" | \"green-300\" | \"green-400\" | \"green-500\" | \"green-600\" | \"green-700\" | \"green-800\" | \"green-900\" | \"green-1000\" | \"orange-100\" | \"orange-200\" | \"orange-300\" | \"orange-400\" | \"orange-500\" | \"orange-600\" | \"orange-700\" | \"orange-800\" | \"orange-900\" | \"orange-1000\" | \"purple-100\" | \"purple-200\" | \"purple-300\" | \"purple-400\" | \"purple-500\" | \"purple-600\" | \"purple-700\" | \"purple-800\" | \"purple-900\" | \"purple-1000\" | \"red-100\" | \"red-200\" | \"red-300\" | \"red-400\" | \"red-500\" | \"red-600\" | \"red-700\" | \"red-800\" | \"red-900\" | \"red-1000\" | \"gray-100\" | \"gray-200\" | \"gray-300\" | \"gray-400\" | \"gray-500\" | \"gray-600\" | \"gray-700\" | \"gray-800\" | \"gray-900\" | \"gray-1000\" | \"glass-100\" | \"glass-200\" | \"glass-300\" | \"glass-400\" | \"glass-500\" | \"glass-600\" | \"glass-700\" | \"glass-800\" | \"glass-900\" | \"glass-1000\" | \"gray-0\" | \"gray-50\" | \"glass-0\" | \"glass-50\" | \"gray-1100\" | \"gray-1200\" | \"glass-1100\" | \"glass-1200\"",
65
+ "original": "Color | (string & { _placeholder?: never })",
66
+ "resolved": "Color | (string & { _placeholder?: undefined; })",
63
67
  "references": {
64
68
  "Color": {
65
69
  "location": "import",
@@ -16,9 +16,9 @@ export class ZonosLanguageSelect {
16
16
  }
17
17
  render() {
18
18
  const { selectedLocale } = localizationStore;
19
- return (h(Host, { key: 'd12676d6438941bb8d987826f68c1b72a7e02ccd', class: "zonos--elements", style: {
19
+ return (h(Host, { key: '25e0e2be0bbac853efa9c26c1595a1d57461a1a1', class: "zonos--elements", style: {
20
20
  '--font-family': zonosStoreFontFamily(),
21
- } }, h("div", { key: '259eaa6a8ae682cc96c98eaaab574757285188b9', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '88bff024a5f678b00bf4edd7b2497177a986af4c', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'be1d87991dec9ac2a3b530a0cf9129b9e191781b', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
21
+ } }, h("div", { key: 'b9f3a630f945570a9c0058bb0367e810b7650eb0', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: 'b30a41cc7f4eab57f15b48ffa3f7c0ad1e695e65', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'c6826b80ece54415befc388e57baa02d56472aef', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
22
22
  }
23
23
  static get is() { return "zonos-language-select"; }
24
24
  static get encapsulation() { return "shadow"; }
@@ -10,11 +10,11 @@ export class ZonosLogo {
10
10
  const filterColor = this.theme === 'DARK'
11
11
  ? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
12
12
  : 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
13
- return (h(Host, { key: 'b93db6ec62ecaacb3ded0ab07dd2f38ed488f8d1', class: classes(['zonos--elements zonos--logo']), style: {
13
+ return (h(Host, { key: '483016f5ffe43ea7742e895b5335212da6ec1d18', class: classes(['zonos--elements zonos--logo']), style: {
14
14
  '--filter-color': filterColor,
15
15
  '--font-family': zonosStoreFontFamily(),
16
16
  '--width': this.width,
17
- } }, h("img", { key: '026162477b24250e4204318fa3018b1cfd383ab5', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
17
+ } }, h("img", { key: 'aed23717de194da43d48ee7b068f3e7568c0bbb3', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
18
18
  }
19
19
  static get is() { return "zonos-logo"; }
20
20
  static get encapsulation() { return "shadow"; }
@@ -40,8 +40,8 @@ export class ZonosLogo {
40
40
  "references": {
41
41
  "ElementsUiTheme": {
42
42
  "location": "import",
43
- "path": "src/types",
44
- "id": "src/types/index.ts::ElementsUiTheme"
43
+ "path": "src/types/generated/graphql.customer.types",
44
+ "id": "src/types/generated/graphql.customer.types.ts::ElementsUiTheme"
45
45
  }
46
46
  }
47
47
  },
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
8
8
  this.label = '';
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: 'd0882c22934d6f9635bd0b31af5703283cd0a1be', class: "zonos--elements", style: {
11
+ return (h(Host, { key: 'e7867deee86e4a155c21db2618eafd6f3c6cea3b', class: "zonos--elements", style: {
12
12
  '--font-family': zonosStoreFontFamily(),
13
- } }, h("zonos-v-stack", { key: '2e227c5bdeeeb0fa772847267007df5aea2e0824', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: 'c43b72c938069ff1a99a985b3b388a785f94d100', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'b1008e43ca022ca1e1b63a60ab5c347d1228396e', type: "boldLabel" }, this.label), h("zonos-button", { key: '4722586c58eac765ded4a7baeeca8eb58d44dd0a', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: '36babf745ea5de00c82823520134b1dfcfc9d16d' }))));
13
+ } }, h("zonos-v-stack", { key: 'f7aedb0f819b61da26afd53add628bcddcca5d8a', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '7ec77c24a440a5d42965f657502506c769d3098c', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'bab0ffc53edd20840438e82c0067c1eae8f13ec7', type: "boldLabel" }, this.label), h("zonos-button", { key: 'a85fc2b745b25c07bcccfe60eb1f1e722c7999c2', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: 'fe932e62edd5f679061c76a62650885d4337363c' }))));
14
14
  }
15
15
  static get is() { return "zonos-select-dialog-header"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -24,11 +24,20 @@ export class ZonosShippingRichRadio {
24
24
  this.borderColor = undefined;
25
25
  this.borderStyle = undefined;
26
26
  this.theme = undefined;
27
+ this.initialSelectedValue = undefined;
27
28
  this.selectedItem = null;
28
29
  }
30
+ componentWillLoad() {
31
+ // Set initial selected item
32
+ if (this.initialSelectedValue) {
33
+ this.selectedItem =
34
+ this.items.find(item => item.value === this.initialSelectedValue) ||
35
+ null;
36
+ }
37
+ }
29
38
  render() {
30
39
  var _a;
31
- return (h(Host, { key: '0dc36a16b2f51816755010c46b416b8b1f4b4744', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--font-family': zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
40
+ return (h(Host, { key: '3633e3be9f679c54647d475c9d1831428410302b', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--font-family': zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
32
41
  var _a;
33
42
  const selected = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value) === item.value;
34
43
  return (h("div", { "aria-hidden": "true", class: classes([
@@ -140,6 +149,23 @@ export class ZonosShippingRichRadio {
140
149
  },
141
150
  "attribute": "theme",
142
151
  "reflect": false
152
+ },
153
+ "initialSelectedValue": {
154
+ "type": "any",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "string | number",
158
+ "resolved": "number | string | undefined",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": true,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": "Initial selected value"
166
+ },
167
+ "attribute": "initial-selected-value",
168
+ "reflect": false
143
169
  }
144
170
  };
145
171
  }
@@ -1,6 +1,7 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { zonosStoreFontFamily } from "../../store/zonosStore";
3
3
  import { classes } from "../../utils/classes";
4
+ import { isColorVariable } from "../../utils/isColorVariable";
4
5
  import { textOptions, } from "../../../types/styles/Text";
5
6
  export class ZonosText {
6
7
  constructor() {
@@ -22,6 +23,9 @@ export class ZonosText {
22
23
  const textSize = this.size || size || defaultSize;
23
24
  const textWeight = this.weight || weight || defaultWeight;
24
25
  const textTag = tag || defaultTag;
26
+ const actualTextColor = isColorVariable(this.textColor)
27
+ ? `var(--amino-${this.textColor})`
28
+ : this.textColor;
25
29
  const renderText = () => {
26
30
  switch (textTag) {
27
31
  case 'h2':
@@ -41,7 +45,7 @@ export class ZonosText {
41
45
  `zonos--text-size-${textSize}`,
42
46
  `zonos--text-weight-${textWeight}`,
43
47
  ]), style: {
44
- '--color': this.textColor ? `var(--amino-${this.textColor})` : '',
48
+ '--color': actualTextColor,
45
49
  '--font-family': zonosStoreFontFamily(),
46
50
  } }, renderText()));
47
51
  }
@@ -63,8 +67,8 @@ export class ZonosText {
63
67
  "type": "string",
64
68
  "mutable": false,
65
69
  "complexType": {
66
- "original": "Color",
67
- "resolved": "\"blue-100\" | \"blue-200\" | \"blue-300\" | \"blue-400\" | \"blue-500\" | \"blue-600\" | \"blue-700\" | \"blue-800\" | \"blue-900\" | \"blue-1000\" | \"cyan-100\" | \"cyan-200\" | \"cyan-300\" | \"cyan-400\" | \"cyan-500\" | \"cyan-600\" | \"cyan-700\" | \"cyan-800\" | \"cyan-900\" | \"cyan-1000\" | \"green-100\" | \"green-200\" | \"green-300\" | \"green-400\" | \"green-500\" | \"green-600\" | \"green-700\" | \"green-800\" | \"green-900\" | \"green-1000\" | \"orange-100\" | \"orange-200\" | \"orange-300\" | \"orange-400\" | \"orange-500\" | \"orange-600\" | \"orange-700\" | \"orange-800\" | \"orange-900\" | \"orange-1000\" | \"purple-100\" | \"purple-200\" | \"purple-300\" | \"purple-400\" | \"purple-500\" | \"purple-600\" | \"purple-700\" | \"purple-800\" | \"purple-900\" | \"purple-1000\" | \"red-100\" | \"red-200\" | \"red-300\" | \"red-400\" | \"red-500\" | \"red-600\" | \"red-700\" | \"red-800\" | \"red-900\" | \"red-1000\" | \"gray-100\" | \"gray-200\" | \"gray-300\" | \"gray-400\" | \"gray-500\" | \"gray-600\" | \"gray-700\" | \"gray-800\" | \"gray-900\" | \"gray-1000\" | \"glass-100\" | \"glass-200\" | \"glass-300\" | \"glass-400\" | \"glass-500\" | \"glass-600\" | \"glass-700\" | \"glass-800\" | \"glass-900\" | \"glass-1000\" | \"gray-0\" | \"gray-50\" | \"glass-0\" | \"glass-50\" | \"gray-1100\" | \"gray-1200\" | \"glass-1100\" | \"glass-1200\"",
70
+ "original": "Color | (string & { _placeholder?: never })",
71
+ "resolved": "Color | (string & { _placeholder?: undefined; })",
68
72
  "references": {
69
73
  "Color": {
70
74
  "location": "import",
@@ -7,10 +7,10 @@ export class ZonosTooltip {
7
7
  this.showTooltip = false;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '4864150b0af4119fc7d87aec5af3c258fb27802d', class: "zonos--elements" }, h("div", { key: 'c11d3da431f9c4507bc58ec38d0b1ef21c99b584', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '0a92efb2e6c17f67c2feacbd17bbddd4fb63f7da' }), h("div", { key: '0ea54bfaf54a2f170044d77c2b555e5da37af8ae', class: classes([
10
+ return (h(Host, { key: 'a23ad45e8f96b88b0feaf17690c6bdb75aacb12c', class: "zonos--elements" }, h("div", { key: 'b057f5ae304921f5fd50536cb5b7fb493120f1e7', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '396ac2ec3fcc8d49f8a346d1059cb096ef2e2874' }), h("div", { key: '4aa607dcc9c4c675224e9d7effd1e8ad2bdee097', class: classes([
11
11
  this.showTooltip && 'zonos--show-tooltip',
12
12
  'zonos--tooltip-content',
13
- ]) }, h("zonos-text", { key: '73c55a7318eb36760d2779691f9ea79d2c5bf8c7', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '1f4106f67fc468121d7fb7fbc0ee69363bb26186', size: "xs", textColor: "gray-0" }, this.subtitle)))));
13
+ ]) }, h("zonos-text", { key: 'e69a1883f21f277be88e892a99ae6e66a9829a1c', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: 'cb901c3cd7d0931f157eddef8fe4286fbd66b66b', size: "xs", textColor: "gray-0" }, this.subtitle)))));
14
14
  }
15
15
  static get is() { return "zonos-tooltip"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -7,9 +7,9 @@ export class VStack {
7
7
  this.spacing = 24;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: 'a5d1a84d5b25d1a49abec676731eaf76f703e998', style: {
10
+ return (h(Host, { key: '3d9977f4c55f7f1047ec94dcc3a3c40105559c00', style: {
11
11
  '--font-family': zonosStoreFontFamily(),
12
- } }, h("div", { key: '456c8e1865a752dd258989888c45dfbdfd2c4f66', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '2d3260c6b74d3def822acb98733f70a97a79f3fa' }))));
12
+ } }, h("div", { key: 'aa910d4f9a11d3d1a66836aed442726241b73273', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: 'ec50cc05f71018b4b6fef1288f1371ddde030a3a' }))));
13
13
  }
14
14
  static get is() { return "zonos-v-stack"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -10,7 +10,7 @@ export class ZonosComponent {
10
10
  return format(this.first, this.middle, this.last);
11
11
  }
12
12
  render() {
13
- return h("div", { key: '3b7429a0c03b00f0a80e15a94bebd08aedaafe51' }, "Hello, World! I'm ", this.getText());
13
+ return h("div", { key: '9a5547114b58b739fb5d783f551bc345f067779d' }, "Hello, World! I'm ", this.getText());
14
14
  }
15
15
  static get is() { return "zonos-component"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -17,9 +17,9 @@ export class ZonosHelloDialogFooter {
17
17
  const primaryColor = (_a = this.appearanceSettings) === null || _a === void 0 ? void 0 : _a.colorPrimary;
18
18
  const footerTheme = primaryColor && isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
19
19
  const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
20
- return (h(Host, { key: 'f97688788d9f6d1a640f054a2a22dbae6955b83c', class: "zonos--elements" }, h("div", { key: '3539323f9044acef3890fc072bdd981e2495fc18', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
20
+ return (h(Host, { key: 'ae185b9859f64fea077e093af2decc170f24170b', class: "zonos--elements" }, h("div", { key: 'c472973505ab6cde075af193df735d0524fc35a0', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
21
21
  '--primary-color': (_c = this.appearanceSettings) === null || _c === void 0 ? void 0 : _c.colorPrimary,
22
- } }, h("a", { key: '5e30052240f87211c6f0092ef6a27c217f3ecefb', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'c60142bcd26086c2944ac3464885ca1f96e5cfbe', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), h("div", { key: '67297b4c557ee5b49a4406a459588f2924183195', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '9348bff826187730f36d191f7e01f516f2b9785c', buttonColor: "gray-1200", icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'ecf1a8639e8e92a07a0e774abb560de53c19587c', buttonColor: "gray-1200", icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
22
+ } }, h("a", { key: '95cb8c09a3a3f566365f0044d6fcdcf6a82facee', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'e11df129f087f9de259c2f24bd294f8d0a881e0d', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), h("div", { key: 'df26ef41d24395a2db6d8e3c9dc83a62e0e707ef', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '9b1797c3fdd17044fecb6ae4526d3c053d1ab59a', buttonColor: "gray-1200", icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'eac17e7e84dc2a80abfcbaed3753512e6358f8db', buttonColor: "gray-1200", icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
23
23
  }
24
24
  static get is() { return "zonos-hello-dialog-footer"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -97,7 +97,7 @@ export class ZonosHelloDialog {
97
97
  const defaultMessage = formatStringWithLinks(defaultMessageStr);
98
98
  const currentPage = this.getCurrentPageEnum();
99
99
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
100
- return (h(Host, { key: 'd5ac86955cf9f9a22e47fe2154dee6e10f6a9361', class: "zonos--elements" }, h("div", { key: 'd34dd3f937330cd5fdd2d7a11dc321c215983146', "aria-hidden": "true", class: classes([
100
+ return (h(Host, { key: 'a9e9d5946604f86ea0680af79ece9e079d4d00d7', class: "zonos--elements" }, h("div", { key: '47ed38de794c10b5689778257d134006c109c101', "aria-hidden": "true", class: classes([
101
101
  'zonos--hello-dialog',
102
102
  animateLeft && 'zonos--hello-dialog-animate-from-left',
103
103
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
@@ -152,7 +152,7 @@ export class ZonosController {
152
152
  zonosStore.organizationName = organizationName;
153
153
  }
154
154
  render() {
155
- return h(Host, { key: '0b734aaa82bd08277fb3a2694197b13242a4d0a6', class: "zonos--elements" });
155
+ return h(Host, { key: 'bd56d32009707ec9042ae5f8a87de7a7cedcca73', class: "zonos--elements" });
156
156
  }
157
157
  static get is() { return "zonos-controller"; }
158
158
  static get encapsulation() { return "shadow"; }
@@ -9,6 +9,7 @@ import { logError } from "../../utils/logging/logError";
9
9
  const { onChange, reset, state: cartStore, } = createStore(() => ({
10
10
  checkoutSessionId: sessionStorage.getItem('zonos--checkout-session-id') || null,
11
11
  currency: 'USD',
12
+ doneSteps: [],
12
13
  dutiesTaxFees: 0,
13
14
  error: null,
14
15
  exchangeRate: null,
@@ -24,6 +25,27 @@ const { onChange, reset, state: cartStore, } = createStore(() => ({
24
25
  shippingData: null,
25
26
  step: 'customer-info',
26
27
  subtotal: 0,
28
+ tabItems: {
29
+ 'customer-info': {
30
+ index: 1,
31
+ isDone: false,
32
+ label: 'Customer',
33
+ value: 'customer-info',
34
+ },
35
+ shipping: {
36
+ index: 2,
37
+ isDone: false,
38
+ label: 'Delivery',
39
+ value: 'shipping',
40
+ },
41
+ // eslint-disable-next-line sort-keys/sort-keys-fix
42
+ payment: {
43
+ index: 3,
44
+ isDone: false,
45
+ label: 'Payment',
46
+ value: 'payment',
47
+ },
48
+ },
27
49
  total: 0,
28
50
  }));
29
51
  /**
@@ -187,9 +209,13 @@ const cartStoreResetSelectedShippingOption = () => {
187
209
  const cartStoreNextStep = () => {
188
210
  if (cartStore.step === 'customer-info') {
189
211
  cartStore.step = 'shipping';
212
+ // set customer-info step to done
213
+ cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: true }) });
190
214
  }
191
215
  else if (cartStore.step === 'shipping') {
192
216
  cartStore.step = 'payment';
217
+ // set shipping step to done
218
+ cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: true }) });
193
219
  }
194
220
  else if (cartStore.step === 'payment') {
195
221
  cartStore.step = 'finish';