@zonos/elements 1.3.11-alpha.0 → 1.3.11-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 (350) hide show
  1. package/dist/cjs/{cart-7e28f026.js → cart-b34c001b.js} +92 -28
  2. package/dist/cjs/{getBorderRadius-d795f526.js → getBorderRadius-4fa738c3.js} +1 -1
  3. package/dist/cjs/getContrastColor-c72796c6.js +20 -0
  4. package/dist/cjs/{isColorVariable-41cacd82.js → isColorVariable-fff5e469.js} +1 -1
  5. package/dist/cjs/{isDarkColor-33fb96a7.js → isDarkColor-7faf0a82.js} +2 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{submitGtag-586d3206.js → submitGtag-1f1fbe1c.js} +15 -2
  8. package/dist/cjs/zonos-address_4.cjs.entry.js +15 -12
  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} +164 -53
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +249 -26
  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 +16 -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-bd2a0c59.js} +20 -2
  31. package/dist/collection/collection-manifest.json +1 -0
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -5
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +32 -22
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +76 -16
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +2 -4
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +102 -22
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +1 -1
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +43 -24
  39. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
  40. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  41. package/dist/collection/components/common/zonos-button/zonos-button.css +1 -1
  42. package/dist/collection/components/common/zonos-button/zonos-button.js +18 -4
  43. package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
  44. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +5 -5
  45. package/dist/collection/components/common/zonos-checkout-progress-tabs/assets/TabCheckmark.svg +3 -0
  46. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +103 -0
  47. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +194 -0
  48. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  49. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  50. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +1 -1
  51. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +1 -1
  52. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +5 -30
  53. package/dist/collection/components/common/zonos-icon/zonos-icon.js +9 -5
  54. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  55. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -4
  56. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  57. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +33 -7
  58. package/dist/collection/components/common/zonos-text/zonos-text.js +7 -3
  59. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  60. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  61. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  62. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +17 -2
  63. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  64. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -5
  65. package/dist/collection/components/main/zonos-controller.js +1 -1
  66. package/dist/collection/components/store/checkout/cart.js +26 -0
  67. package/dist/collection/components/store/checkout/stripe.js +3 -0
  68. package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
  69. package/dist/collection/components/store/translationStore/strings.base.js +3 -0
  70. package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
  71. package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
  72. package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
  73. package/dist/collection/components/store/translationStore/strings.french.js +3 -0
  74. package/dist/collection/components/store/translationStore/strings.german.js +3 -0
  75. package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
  76. package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
  77. package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
  78. package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
  79. package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
  80. package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
  81. package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
  82. package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
  83. package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
  84. package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
  85. package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
  86. package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
  87. package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
  88. package/dist/collection/components/store/zonosStore.js +20 -3
  89. package/dist/collection/components/stripe/zonos-address/zonos-address.js +5 -2
  90. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  91. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  92. package/dist/collection/components/utils/api/buildCartItemsByTempCart.js +24 -0
  93. package/dist/collection/components/utils/api/tempCartItem/getAttributes.js +66 -0
  94. package/dist/collection/components/utils/api/tempCartItem/getMeasurements.js +58 -0
  95. package/dist/collection/components/utils/api/trackConversionEvent.js +2 -0
  96. package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -0
  97. package/dist/collection/components/utils/createCustomEvent.js +9 -0
  98. package/dist/collection/components/utils/getContrastColor.js +16 -0
  99. package/dist/collection/components/utils/isColorVariable.js +1 -1
  100. package/dist/collection/components/utils/styles.js +12 -0
  101. package/dist/collection/scripts/zonosBase.js +1 -0
  102. package/dist/collection/styles/stripe/addressRuleStyle.js +0 -3
  103. package/dist/collection/types/checkout/api/TempCart.js +1 -0
  104. package/dist/collection/types/generated/graphql.customer.types.js +73 -0
  105. package/dist/components/getContrastColor.js +18 -0
  106. package/dist/components/isColorVariable.js +1 -1
  107. package/dist/components/isDarkColor.js +1 -1
  108. package/dist/components/stripe.js +90 -25
  109. package/dist/components/trackConversionEvent.js +3 -1
  110. package/dist/components/zonos-address2.js +5 -2
  111. package/dist/components/zonos-badge2.js +3 -3
  112. package/dist/components/zonos-button2.js +30 -4
  113. package/dist/components/zonos-card2.js +2 -2
  114. package/dist/components/zonos-checkbox2.js +3 -3
  115. package/dist/components/zonos-checkout-finish2.js +15 -7
  116. package/dist/components/zonos-checkout-footer2.js +33 -17
  117. package/dist/components/zonos-checkout-progress-tabs.d.ts +11 -0
  118. package/dist/components/zonos-checkout-progress-tabs.js +6 -0
  119. package/dist/components/zonos-checkout-progress-tabs2.js +122 -0
  120. package/dist/components/zonos-checkout.js +277 -46
  121. package/dist/components/zonos-collapse2.js +2 -2
  122. package/dist/components/zonos-component.js +1 -1
  123. package/dist/components/zonos-controller.js +2 -2
  124. package/dist/components/zonos-country-select2.js +2 -2
  125. package/dist/components/zonos-custom-message2.js +1 -1
  126. package/dist/components/zonos-dialog2.js +4 -6
  127. package/dist/components/zonos-hello-dialog-footer2.js +2 -2
  128. package/dist/components/zonos-hello-dialog2.js +2 -2
  129. package/dist/components/zonos-hello.js +17 -3
  130. package/dist/components/zonos-icon2.js +5 -1
  131. package/dist/components/zonos-language-select2.js +3 -3
  132. package/dist/components/zonos-link-authentication2.js +1 -1
  133. package/dist/components/zonos-link.js +1 -1
  134. package/dist/components/zonos-logo.js +2 -2
  135. package/dist/components/zonos-payment2.js +1 -1
  136. package/dist/components/zonos-review2.js +1 -1
  137. package/dist/components/zonos-select-dialog-header2.js +2 -2
  138. package/dist/components/zonos-shipping-rich-radio2.js +11 -1
  139. package/dist/components/zonos-shipping2.js +44 -25
  140. package/dist/components/zonos-text2.js +5 -1
  141. package/dist/components/zonos-tooltip2.js +2 -2
  142. package/dist/components/zonos-v-stack2.js +2 -2
  143. package/dist/components/zonosStore.js +20 -3
  144. package/dist/esm/{cart-5a88b4f3.js → cart-cc09eaef.js} +93 -28
  145. package/dist/esm/{getBorderRadius-5d750ab8.js → getBorderRadius-a89e45fb.js} +1 -1
  146. package/dist/esm/getContrastColor-5fbc4746.js +18 -0
  147. package/dist/esm/{isColorVariable-91c33804.js → isColorVariable-fbf2d80d.js} +1 -1
  148. package/dist/esm/{isDarkColor-c34dfed9.js → isDarkColor-6bf71e51.js} +2 -2
  149. package/dist/esm/loader.js +1 -1
  150. package/dist/esm/{submitGtag-289ddd8b.js → submitGtag-2eedb117.js} +15 -3
  151. package/dist/esm/zonos-address_4.entry.js +15 -12
  152. package/dist/esm/zonos-badge_2.entry.js +6 -6
  153. package/dist/esm/zonos-banner.entry.js +1 -1
  154. package/dist/esm/{zonos-button_3.entry.js → zonos-button_2.entry.js} +35 -36
  155. package/dist/esm/zonos-card_2.entry.js +8 -8
  156. package/dist/esm/{zonos-cart-items_9.entry.js → zonos-cart-items_10.entry.js} +164 -54
  157. package/dist/esm/zonos-checkout.entry.js +249 -26
  158. package/dist/esm/zonos-component.entry.js +1 -1
  159. package/dist/esm/zonos-controller.entry.js +5 -5
  160. package/dist/esm/zonos-country-flag.entry.js +4 -4
  161. package/dist/esm/zonos-country-select_3.entry.js +9 -9
  162. package/dist/esm/zonos-elements.js +1 -1
  163. package/dist/esm/zonos-hello-dialog.entry.js +5 -5
  164. package/dist/esm/zonos-hello.entry.js +16 -4
  165. package/dist/esm/zonos-icon.entry.js +35 -0
  166. package/dist/esm/zonos-link.entry.js +1 -1
  167. package/dist/esm/zonos-logo.entry.js +3 -3
  168. package/dist/esm/zonos-notification.entry.js +1 -1
  169. package/dist/esm/zonos-payment.entry.js +5 -5
  170. package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
  171. package/dist/esm/zonos-shipping-rich-radio.entry.js +13 -4
  172. package/dist/esm/zonos-text.entry.js +6 -2
  173. package/dist/esm/{zonosStore-aac7c6ac.js → zonosStore-c4c45591.js} +20 -3
  174. package/dist/esm-es5/cart-cc09eaef.js +1 -0
  175. package/dist/esm-es5/{getBorderRadius-5d750ab8.js → getBorderRadius-a89e45fb.js} +1 -1
  176. package/dist/esm-es5/getContrastColor-5fbc4746.js +1 -0
  177. package/dist/esm-es5/isColorVariable-fbf2d80d.js +1 -0
  178. package/dist/esm-es5/{isDarkColor-c34dfed9.js → isDarkColor-6bf71e51.js} +1 -1
  179. package/dist/esm-es5/loader.js +1 -1
  180. package/dist/esm-es5/submitGtag-2eedb117.js +1 -0
  181. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  182. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  183. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  184. package/dist/esm-es5/zonos-button_2.entry.js +1 -0
  185. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  186. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -0
  187. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  188. package/dist/esm-es5/zonos-component.entry.js +1 -1
  189. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  190. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  191. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  192. package/dist/esm-es5/zonos-elements.js +1 -1
  193. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  194. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  195. package/dist/esm-es5/zonos-icon.entry.js +1 -0
  196. package/dist/esm-es5/zonos-link.entry.js +1 -1
  197. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  198. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  199. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  200. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  201. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  202. package/dist/esm-es5/zonos-text.entry.js +1 -1
  203. package/dist/esm-es5/{zonosStore-aac7c6ac.js → zonosStore-c4c45591.js} +1 -1
  204. package/dist/scripts/getTempCartById.js +1 -0
  205. package/dist/scripts/loadZonos.js +1 -1
  206. package/dist/scripts/zonos.js +1 -1
  207. package/dist/scripts/zonosBase.js +1 -1
  208. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.d.ts +14 -2
  209. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +7 -1
  210. package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +7 -0
  211. package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -0
  212. package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -1
  213. package/dist/types/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.d.ts +29 -0
  214. package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +1 -6
  215. package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +4 -2
  216. package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +1 -1
  217. package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +7 -1
  218. package/dist/types/components/common/zonos-text/zonos-text.d.ts +3 -1
  219. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -0
  220. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +2 -1
  221. package/dist/types/components/store/checkout/cart.d.ts +19 -4
  222. package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
  223. package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
  224. package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
  225. package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
  226. package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
  227. package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
  228. package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
  229. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
  230. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
  231. package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
  232. package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
  233. package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
  234. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
  235. package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
  236. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
  237. package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
  238. package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
  239. package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
  240. package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
  241. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
  242. package/dist/types/components/store/zonosStore.d.ts +11 -2
  243. package/dist/types/components/utils/api/buildCartItemsByTempCart.d.ts +7 -0
  244. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  245. package/dist/types/components/utils/api/tempCartItem/getAttributes.d.ts +11 -0
  246. package/dist/types/components/utils/api/tempCartItem/getMeasurements.d.ts +7 -0
  247. package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
  248. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
  249. package/dist/types/components/utils/createCustomEvent.d.ts +12 -0
  250. package/dist/types/components/utils/getBorderRadius.d.ts +1 -1
  251. package/dist/types/components/utils/getContrastColor.d.ts +4 -0
  252. package/dist/types/components/utils/handleFetch.d.ts +2 -1
  253. package/dist/types/components/utils/isColorVariable.d.ts +1 -1
  254. package/dist/types/components/utils/styles.d.ts +7 -0
  255. package/dist/types/components.d.ts +69 -18
  256. package/dist/types/scripts/zonosBase.d.ts +10 -1
  257. package/dist/types/styles/stripe/addressRuleStyle.d.ts +2 -1
  258. package/dist/types/types/checkout/CheckoutConfig.d.ts +6 -1
  259. package/dist/types/types/checkout/api/TempCart.d.ts +80 -0
  260. package/dist/types/types/generated/graphql.customer.types.d.ts +97 -0
  261. package/dist/types/types/generated/graphql.customer.types.ts +135 -1
  262. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  263. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  264. package/dist/types/types/global.d.ts +10 -0
  265. package/dist/types/types/utils/deep/IDeepKeyofAtIndex.d.ts +1 -1
  266. package/dist/zonos-elements/assets/TabCheckmark.svg +3 -0
  267. package/dist/zonos-elements/{p-4ad5f307.system.entry.js → p-001518eb.system.entry.js} +1 -1
  268. package/dist/zonos-elements/p-07022f11.js +1 -0
  269. package/dist/zonos-elements/p-0fe52bae.system.entry.js +1 -0
  270. package/dist/zonos-elements/{p-14bf3658.entry.js → p-105a2e51.entry.js} +1 -1
  271. package/dist/zonos-elements/{p-a87803b7.system.entry.js → p-15cd4a76.system.entry.js} +1 -1
  272. package/dist/zonos-elements/{p-482371fb.system.entry.js → p-160cdf4e.system.entry.js} +1 -1
  273. package/dist/zonos-elements/p-167b3369.system.js +1 -0
  274. package/dist/zonos-elements/p-171eb334.entry.js +1 -0
  275. package/dist/zonos-elements/p-1bbdfae5.js +1 -0
  276. package/dist/zonos-elements/p-1d833f22.system.entry.js +1 -0
  277. package/dist/zonos-elements/{p-dad00ad3.system.entry.js → p-1df9ab6a.system.entry.js} +1 -1
  278. package/dist/zonos-elements/p-1f54c83e.entry.js +1 -0
  279. package/dist/zonos-elements/{p-27d57265.system.entry.js → p-20b080d1.system.entry.js} +1 -1
  280. package/dist/zonos-elements/{p-333da541.entry.js → p-215cd7ec.entry.js} +1 -1
  281. package/dist/zonos-elements/p-26e8f37a.entry.js +1 -0
  282. package/dist/zonos-elements/{p-77727098.system.js → p-41c2b1c5.system.js} +1 -1
  283. package/dist/zonos-elements/p-425865fd.system.entry.js +1 -0
  284. package/dist/zonos-elements/{p-5f2cb4b6.entry.js → p-43022147.entry.js} +1 -1
  285. package/dist/zonos-elements/{p-188ddbe2.entry.js → p-4515ec7b.entry.js} +1 -1
  286. package/dist/zonos-elements/{p-9db3028d.entry.js → p-470284a3.entry.js} +1 -1
  287. package/dist/zonos-elements/p-4c9367f1.entry.js +1 -0
  288. package/dist/zonos-elements/{p-770384fa.system.entry.js → p-4d7b27af.system.entry.js} +1 -1
  289. package/dist/zonos-elements/p-55519ef5.system.js +1 -0
  290. package/dist/zonos-elements/{p-8445a084.system.entry.js → p-5ba91f13.system.entry.js} +1 -1
  291. package/dist/zonos-elements/p-6484bf31.system.js +1 -0
  292. package/dist/zonos-elements/p-6a1b934d.system.entry.js +1 -0
  293. package/dist/zonos-elements/{p-a725946f.entry.js → p-6bd4b5e6.entry.js} +1 -1
  294. package/dist/zonos-elements/{p-7e355496.system.entry.js → p-6c5c5377.system.entry.js} +1 -1
  295. package/dist/zonos-elements/p-6e81adba.system.js +1 -1
  296. package/dist/zonos-elements/p-72c6bf0f.entry.js +1 -0
  297. package/dist/zonos-elements/p-7575a42a.js +1 -0
  298. package/dist/zonos-elements/p-7f9889bd.system.entry.js +1 -0
  299. package/dist/zonos-elements/{p-c1e54094.system.js → p-86034f1e.system.js} +1 -1
  300. package/dist/zonos-elements/p-9a1db995.entry.js +1 -0
  301. package/dist/zonos-elements/{p-77c54b83.js → p-9a90fb56.js} +1 -1
  302. package/dist/zonos-elements/{p-d5a9dfc7.entry.js → p-9bdcd7b6.entry.js} +1 -1
  303. package/dist/zonos-elements/{p-edbea8df.system.js → p-9db2f9d1.system.js} +1 -1
  304. package/dist/zonos-elements/p-a144d26a.system.entry.js +1 -0
  305. package/dist/zonos-elements/{p-93e51987.system.entry.js → p-a2f71e4f.system.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-6181f2d5.entry.js → p-ad499520.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-e4e1ca2f.system.entry.js → p-b4c23bb5.system.entry.js} +1 -1
  308. package/dist/zonos-elements/{p-315c1fc2.entry.js → p-b62aee3d.entry.js} +1 -1
  309. package/dist/zonos-elements/{p-e969cec9.entry.js → p-b8718429.entry.js} +1 -1
  310. package/dist/zonos-elements/{p-25fbcefe.system.entry.js → p-ba5596ae.system.entry.js} +1 -1
  311. package/dist/zonos-elements/p-beba218e.js +1 -0
  312. package/dist/zonos-elements/p-c7f11c60.entry.js +1 -0
  313. package/dist/zonos-elements/{p-febddb45.entry.js → p-d4222f1f.entry.js} +1 -1
  314. package/dist/zonos-elements/p-dde4c859.system.entry.js +1 -0
  315. package/dist/zonos-elements/p-e28ed57c.js +1 -0
  316. package/dist/zonos-elements/p-e3a3e376.entry.js +1 -0
  317. package/dist/zonos-elements/{p-a578facf.entry.js → p-e3de496a.entry.js} +1 -1
  318. package/dist/zonos-elements/{p-afcded5d.system.js → p-ed23a5df.system.js} +1 -1
  319. package/dist/zonos-elements/{p-e392e212.system.entry.js → p-ed597cc9.system.entry.js} +1 -1
  320. package/dist/zonos-elements/{p-d0d12a64.entry.js → p-f1037168.entry.js} +1 -1
  321. package/dist/zonos-elements/{p-c6de2e40.system.entry.js → p-f42bffad.system.entry.js} +1 -1
  322. package/dist/zonos-elements/{p-0b4910fe.system.entry.js → p-f62b49aa.system.entry.js} +1 -1
  323. package/dist/zonos-elements/p-fa3d0aea.js +1 -0
  324. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  325. package/package.json +1 -1
  326. package/dist/esm-es5/cart-5a88b4f3.js +0 -1
  327. package/dist/esm-es5/isColorVariable-91c33804.js +0 -1
  328. package/dist/esm-es5/submitGtag-289ddd8b.js +0 -1
  329. package/dist/esm-es5/zonos-button_3.entry.js +0 -1
  330. package/dist/esm-es5/zonos-cart-items_9.entry.js +0 -1
  331. package/dist/zonos-elements/p-144f4d31.entry.js +0 -1
  332. package/dist/zonos-elements/p-4569bc92.js +0 -1
  333. package/dist/zonos-elements/p-49a5be72.js +0 -1
  334. package/dist/zonos-elements/p-4c414a92.js +0 -1
  335. package/dist/zonos-elements/p-5c991faa.system.entry.js +0 -1
  336. package/dist/zonos-elements/p-691d8075.entry.js +0 -1
  337. package/dist/zonos-elements/p-723628b7.js +0 -1
  338. package/dist/zonos-elements/p-87c4ac09.system.entry.js +0 -1
  339. package/dist/zonos-elements/p-9f532a3f.entry.js +0 -1
  340. package/dist/zonos-elements/p-afc0460d.entry.js +0 -1
  341. package/dist/zonos-elements/p-ca6b4c1e.system.entry.js +0 -1
  342. package/dist/zonos-elements/p-d2885590.system.js +0 -1
  343. package/dist/zonos-elements/p-d7690752.system.entry.js +0 -1
  344. package/dist/zonos-elements/p-d9c65636.system.js +0 -1
  345. package/dist/zonos-elements/p-dd153a4e.entry.js +0 -1
  346. package/dist/zonos-elements/p-def8823e.entry.js +0 -1
  347. package/dist/zonos-elements/p-e4749f19.js +0 -1
  348. package/dist/zonos-elements/p-e87e8c9c.system.entry.js +0 -1
  349. package/dist/zonos-elements/p-f1170e7b.entry.js +0 -1
  350. package/dist/zonos-elements/p-fe0930e4.system.entry.js +0 -1
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const zonosStore = require('./zonosStore-d3f0173b.js');
6
+ const zonosStore = require('./zonosStore-bd2a0c59.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const getBorderRadius = require('./getBorderRadius-d795f526.js');
9
- const isColorVariable = require('./isColorVariable-41cacd82.js');
10
- const isDarkColor = require('./isDarkColor-33fb96a7.js');
8
+ const getBorderRadius = require('./getBorderRadius-4fa738c3.js');
9
+ const isColorVariable = require('./isColorVariable-fff5e469.js');
10
+ const isDarkColor = require('./isDarkColor-7faf0a82.js');
11
+ const getContrastColor = require('./getContrastColor-c72796c6.js');
11
12
 
12
13
  /**
13
14
  * Get theme for button text based on background color
@@ -23,7 +24,20 @@ const getButtonTheme = (overrideBackground) => {
23
24
  return buttonTheme;
24
25
  };
25
26
 
26
- const zonosButtonCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));margin:1px;}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--amino-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--amino-radius-4);width:24px}";
27
+ /**
28
+ * Filter out all of the undefined values from the object so we don't have undefined css variable values
29
+ */
30
+ const styles = (props) => {
31
+ // loop through the object and filter out all of the underfined values
32
+ return Object.entries(props).reduce((acc, [key, value]) => {
33
+ if (value) {
34
+ acc[key] = value;
35
+ }
36
+ return acc;
37
+ }, {});
38
+ };
39
+
40
+ const zonosButtonCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));margin:1px;}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--amino-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--subtle-hover-color, var(--amino-gray-100))}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--amino-radius-4);width:24px}";
27
41
  const ZonosButtonStyle0 = zonosButtonCss;
28
42
 
29
43
  const ZonosButton = class {
@@ -82,12 +96,23 @@ const ZonosButton = class {
82
96
  const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
83
97
  const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle);
84
98
  const spinnerColor = buttonTheme === 'LIGHT' ? 'black' : 'white';
85
- return (index.h(index.Host, { key: 'f3374eedd37ec6293260fba7b19d66aa013d3484', class: classes.classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
99
+ return (index.h(index.Host, { key: '75f5e6900c6e0eb468ea639460d55f251b580200', class: classes.classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
86
100
  '--background-color': overrideBackground,
87
101
  '--border-radius': borderStyle,
88
102
  '--color': color,
89
103
  '--font-family': zonosStore.zonosStoreFontFamily(),
90
- } }, index.h("button", { key: '352ce427591b20b8042dcd19ce159b77c1fc2faf', class: classes.classes([
104
+ '--subtle-hover-color': this.buttonColor
105
+ ? // for the subtle variant, the hover background should contrast with the text color
106
+ getContrastColor.getContrastColor({
107
+ backgroundColor: 'white',
108
+ color: isColorVariable.isColorVariable(this.buttonColor)
109
+ ? window
110
+ .getComputedStyle(this.ele)
111
+ .getPropertyValue(`--amino-${this.buttonColor}`)
112
+ : this.buttonColor,
113
+ })
114
+ : undefined,
115
+ }) }, index.h("button", { key: 'fd1323ac24be622182f9b60d8b026fb0ea47fa40', class: classes.classes([
91
116
  this.hasIcon && 'has-icon',
92
117
  this.hasContent && 'has-content',
93
118
  this.noBackground && 'no-background',
@@ -100,41 +125,15 @@ const ZonosButton = class {
100
125
  overrideBackground &&
101
126
  variant === 'standard' &&
102
127
  'override-background',
103
- ]), disabled: disabled }, this.loading && (index.h("div", { class: "zonos--spinner-wrapper" }, index.h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, index.h("slot", { key: '554cc1fd9bb58d833339ae21e837d586adc248c2', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
128
+ ]), disabled: disabled }, this.loading && (index.h("div", { class: "zonos--spinner-wrapper" }, index.h("zonos-spinner", { size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, index.h("slot", { key: '92706fef0545ba24e3f943d731bffa1e844ec154', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
104
129
  }
130
+ get ele() { return index.getElement(this); }
105
131
  static get watchers() { return {
106
132
  "icon": ["iconChangeHandler"]
107
133
  }; }
108
134
  };
109
135
  ZonosButton.style = ZonosButtonStyle0;
110
136
 
111
- const zonosIconCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";
112
- const ZonosIconStyle0 = zonosIconCss;
113
-
114
- const ZonosIcon = class {
115
- constructor(hostRef) {
116
- index.registerInstance(this, hostRef);
117
- this.autoHeight = false;
118
- this.iconColor = 'gray-1200';
119
- this.content = undefined;
120
- this.size = 24;
121
- }
122
- render() {
123
- if (!this.content || !this.el.shadowRoot) {
124
- return null;
125
- }
126
- this.el.shadowRoot.innerHTML = this.content;
127
- return (index.h(index.Host, { class: "zonos--elements", style: {
128
- '--color': `var(--amino-${this.iconColor})`,
129
- '--font-family': zonosStore.zonosStoreFontFamily(),
130
- '--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
131
- '--width': `${this.size}px`,
132
- } }));
133
- }
134
- get el() { return index.getElement(this); }
135
- };
136
- ZonosIcon.style = ZonosIconStyle0;
137
-
138
137
  const zonosSpinnerCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative;overflow:hidden;width:var(--size);height:var(--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--size);height:var(--size);stroke:var(--amino-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--amino-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--amino-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--amino-spinner-track-black)}:host(.white) circle{stroke:var(--amino-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--amino-spinner-track-white)}:host(.info) circle{stroke:var(--amino-blue-600)}:host(.info) circle.track{stroke:var(--amino-blue-100)}:host(.success) circle{stroke:var(--amino-green-600)}:host(.success) circle.track{stroke:var(--amino-green-100)}:host(.danger) circle{stroke:var(--amino-red-600)}:host(.danger) circle.track{stroke:var(--amino-red-100)}:host(.warning) circle{stroke:var(--amino-orange-600)}:host(.warning) circle.track{stroke:var(--amino-orange-100)}";
139
138
  const ZonosSpinnerStyle0 = zonosSpinnerCss;
140
139
 
@@ -157,5 +156,4 @@ const ZonosSpinner = class {
157
156
  ZonosSpinner.style = ZonosSpinnerStyle0;
158
157
 
159
158
  exports.zonos_button = ZonosButton;
160
- exports.zonos_icon = ZonosIcon;
161
159
  exports.zonos_spinner = ZonosSpinner;
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const zonosStore = require('./zonosStore-d3f0173b.js');
6
+ const zonosStore = require('./zonosStore-bd2a0c59.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const cart = require('./cart-7e28f026.js');
8
+ const cart = require('./cart-b34c001b.js');
9
9
  const ILanguage = require('./ILanguage-d247b45b.js');
10
- require('./isDarkColor-33fb96a7.js');
11
- require('./getBorderRadius-d795f526.js');
10
+ require('./isDarkColor-7faf0a82.js');
11
+ require('./getBorderRadius-4fa738c3.js');
12
12
 
13
13
  const zonosCardCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";
14
14
  const ZonosCardStyle0 = zonosCardCss;
@@ -24,9 +24,9 @@ const ZonosCard = class {
24
24
  this.spacing = '24px';
25
25
  }
26
26
  render() {
27
- return (index.h(index.Host, { key: 'b350f7a592ea35c3b6beaf5eefaa2ab0208975dd', style: {
27
+ return (index.h(index.Host, { key: 'c2f25ffa32920500b63702df35b9e30dcf28b47d', style: {
28
28
  '--font-family': zonosStore.zonosStoreFontFamily(),
29
- } }, index.h("div", { key: '125e8b550cd8f371e28a012536722f48402774f2', class: classes.classes(['styled-card']), style: { padding: this.spacing } }, this.label && (index.h("header", { class: "card-header", style: { padding: this.spacing } }, index.h("zonos-text", { type: "subheader" }, this.label), index.h("h-stack", { spacing: 8 }, this.actions))), index.h("slot", { key: '3cf038c62910ebac736ed1c37ecf1a490c8e1d0e' }), (this.footerActions || this.footerContent) && (index.h("footer", { class: "card-footer", style: {
29
+ } }, index.h("div", { key: '30515451d4694d3fffffab4c23ac2b0ff0e37710', class: classes.classes(['styled-card']), style: { padding: this.spacing } }, this.label && (index.h("header", { class: "card-header", style: { padding: this.spacing } }, index.h("zonos-text", { type: "subheader" }, this.label), index.h("h-stack", { spacing: 8 }, this.actions))), index.h("slot", { key: 'a1ced320f20a585c7201fc5c7b0729ce8e91a176' }), (this.footerActions || this.footerContent) && (index.h("footer", { class: "card-footer", style: {
30
30
  height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
31
31
  padding: this.spacing,
32
32
  } }, index.h("div", null, this.footerContent), index.h("h-stack", { spacing: 8 }, this.footerActions))))));
@@ -55,9 +55,9 @@ const ZonosLanguageSelect = class {
55
55
  }
56
56
  render() {
57
57
  const { selectedLocale } = cart.localizationStore;
58
- return (index.h(index.Host, { key: 'd12676d6438941bb8d987826f68c1b72a7e02ccd', class: "zonos--elements", style: {
58
+ return (index.h(index.Host, { key: '25e0e2be0bbac853efa9c26c1595a1d57461a1a1', class: "zonos--elements", style: {
59
59
  '--font-family': zonosStore.zonosStoreFontFamily(),
60
- } }, index.h("div", { key: '259eaa6a8ae682cc96c98eaaab574757285188b9', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: '88bff024a5f678b00bf4edd7b2497177a986af4c', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a language') }), index.h("div", { key: 'be1d87991dec9ac2a3b530a0cf9129b9e191781b', class: "zonos--language-select-content" }, ILanguage.languages.map(language => (index.h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, index.h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
60
+ } }, index.h("div", { key: 'b9f3a630f945570a9c0058bb0367e810b7650eb0', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: 'b30a41cc7f4eab57f15b48ffa3f7c0ad1e695e65', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a language') }), index.h("div", { key: 'c6826b80ece54415befc388e57baa02d56472aef', class: "zonos--language-select-content" }, ILanguage.languages.map(language => (index.h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, index.h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
61
61
  }
62
62
  };
63
63
  ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
@@ -3,14 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const cart = require('./cart-7e28f026.js');
7
- const zonosStore = require('./zonosStore-d3f0173b.js');
8
- const submitGtag = require('./submitGtag-586d3206.js');
9
- const getBorderRadius = require('./getBorderRadius-d795f526.js');
6
+ const cart = require('./cart-b34c001b.js');
7
+ const zonosStore = require('./zonosStore-bd2a0c59.js');
8
+ const submitGtag = require('./submitGtag-1f1fbe1c.js');
9
+ const getBorderRadius = require('./getBorderRadius-4fa738c3.js');
10
+ const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
10
11
  const classes = require('./classes-b7918f56.js');
11
- const isDarkColor = require('./isDarkColor-33fb96a7.js');
12
12
  const ILanguage = require('./ILanguage-d247b45b.js');
13
- const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
13
+ const getContrastColor = require('./getContrastColor-c72796c6.js');
14
+ const isColorVariable = require('./isColorVariable-fff5e469.js');
15
+ require('./isDarkColor-7faf0a82.js');
14
16
 
15
17
  const formatCurrency = ({ amount, currency, showCurrencyText, }) => showCurrencyText
16
18
  ? `${new Intl.NumberFormat('en-US', {
@@ -190,10 +192,8 @@ const ZonosCheckoutFinish = class {
190
192
  void submitGtag.trackConversionEvent('checkout_paymentInfoCompleted', {
191
193
  paymentMethod,
192
194
  });
193
- const successEvent = new CustomEvent('zonos-checkout-success', {
194
- detail: {
195
- message: 'Zonos Checkout successfully processed order',
196
- },
195
+ const successEvent = submitGtag.createCustomEvent('zonos-checkout-success', {
196
+ message: 'Zonos Checkout successfully processed order',
197
197
  });
198
198
  document.dispatchEvent(successEvent);
199
199
  }
@@ -243,7 +243,7 @@ const ZonosCheckoutFinish = class {
243
243
  // const totalItems = this.order?.items?.reduce((acc, item) => {
244
244
  // return acc + item.quantity;
245
245
  // }, 0);
246
- return (index.h(index.Host, { key: 'd3e8a30ddfffe0cee18ff29edf839775f7a9d8ec', class: "zonos--checkout-finish zonos--elements", style: {
246
+ return (index.h(index.Host, { key: '8c2087b3a0578cbbd7979fff5e6b696a4325e548', class: "zonos--checkout-finish zonos--elements", style: {
247
247
  '--border-radius': getBorderRadius.getBorderRadius(this.borderRadius),
248
248
  } }, this.isLoading && (index.h("div", { class: "loading-wrapper" }, index.h("zonos-spinner", null))), !this.isLoading && (index.h(index.Fragment, null, index.h("div", { class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon$1, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", null, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), index.h("zonos-button", { onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, cart.translate('Keep shopping')))))));
249
249
  }
@@ -263,33 +263,45 @@ const ZonosIcon = `<svg width="105" height="29" viewBox="0 0 105 29" fill="none"
263
263
  </svg>
264
264
  `;
265
265
 
266
- const zonosCheckoutFooterCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--checkout-footer{position:absolute;bottom:0;left:0;right:0;gap:var(--amino-space-16);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-top:var(--amino-border);padding:var(--amino-space-12);-ms-flex-align:center;align-items:center;background:var(--amino-surface-color-secondary)}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{line-height:0px}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--amino-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8);position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:var(--amino-space-4)}}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--amino-surface-color);-webkit-box-shadow:var(--amino-v3-shadow-xl);box-shadow:var(--amino-v3-shadow-xl);border-radius:var(--amino-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:10005;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--amino-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}@media (max-width: 768px){:host .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column;gap:var(--amino-space-32);background-color:var(--amino-surface-color);border-top:none;position:relative;padding-top:var(--amino-space-24)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}}";
266
+ const zonosCheckoutFooterCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:absolute;bottom:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);gap:var(--amino-space-16);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-12);-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{line-height:0}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--amino-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8);position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:var(--amino-space-4)}}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--amino-surface-color);-webkit-box-shadow:var(--amino-v3-shadow-xl);box-shadow:var(--amino-v3-shadow-xl);border-radius:var(--amino-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:10005;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--amino-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:var(--amino-space-32);background:var(--amino-gray-0);position:relative;padding-top:var(--amino-space-24);bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}";
267
267
  const ZonosCheckoutFooterStyle0 = zonosCheckoutFooterCss;
268
268
 
269
269
  const ZonosCheckoutFooter = class {
270
270
  constructor(hostRef) {
271
271
  index.registerInstance(this, hostRef);
272
- this.showDialog = false;
272
+ this.mobile = false;
273
+ this.dataTheme = undefined;
274
+ this.showLanguageDialog = false;
275
+ this.isMobile = false;
273
276
  }
274
277
  handleGlobalClick(e) {
275
- if (!this.el.contains(e.target) && this.showDialog) {
276
- this.showDialog = false;
278
+ if (!this.el.contains(e.target) && this.showLanguageDialog) {
279
+ this.showLanguageDialog = false;
277
280
  }
278
281
  }
279
- toggleDialog() {
280
- this.showDialog = !this.showDialog;
282
+ toggleLanguageDialog() {
283
+ this.showLanguageDialog = !this.showLanguageDialog;
284
+ }
285
+ handleMobileChange() {
286
+ this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
287
+ }
288
+ componentWillLoad() {
289
+ this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
281
290
  }
282
291
  render() {
283
- var _a, _b;
284
- const primaryColor = (_a = zonosStore.zonosStore.appearance) === null || _a === void 0 ? void 0 : _a.colorPrimary;
285
- const footerTheme = primaryColor && isDarkColor.isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
286
- const languageLabel = (_b = ILanguage.languages.find(x => x.code === cart.localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.label;
287
- return (index.h(index.Host, { key: 'cadd2ef8877c716cdeb1f5f40642e41cabc2a55d', class: "zonos--elements" }, index.h("div", { key: '480995fd1ca7bc41702d15dd40d64e02a9ba09dd', class: "zonos--checkout-footer", "data-theme": footerTheme, style: { '--primary-color': primaryColor } }, index.h("div", { key: 'b83ebb3203542f7f4a227b50b26010cbeb914294', class: "zonos--checkout-locale-wrapper" }, index.h("zonos-button", { key: '66ad21d85629d159b4ff3341e82c92d6bd19ceca', class: "zonos--checkout-footer-language-button", icon: index.h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: "gray-700" }), onClick: () => this.toggleDialog(), variant: "subtle" }, languageLabel), index.h("div", { key: '1e8dce34f3866570f267233644c6d5549cf02c9b', class: classes.classes([
292
+ var _a;
293
+ const languageLabel = (_a = ILanguage.languages.find(x => x.code === cart.localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
294
+ // reverse color when on desktop. With the coversheet backdrop, the color should be white
295
+ const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1200';
296
+ return (index.h(index.Host, { key: '2ce26e27b7c90b4d37f26197821ed1a39ddb9fae', class: classes.classes(['zonos--elements', this.isMobile && 'mobile']) }, index.h("div", { key: '5f52ec7b5ad1659ceb9d2edb4661e5995b72afaf', class: "zonos--checkout-footer" }, index.h("div", { key: '5d127f033702bff94cc2db76b4695a03055ec783', class: "zonos--checkout-locale-wrapper" }, index.h("zonos-button", { key: '701b5014848ea716f7dcc22221b453146af92962', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: index.h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), index.h("div", { key: 'e2a319113905bd76473aef822780521f2be58405', class: classes.classes([
288
297
  'zonos--checkout-footer-dialog',
289
- this.showDialog && 'zonos--checkout-footer-dialog-open',
290
- ]) }, index.h("zonos-language-select", { key: '194aeb20273058577d2cbf3b72eef5f7152129e6', handleOnClose: () => this.toggleDialog() }))), index.h("div", { key: '56b5f28d98eeb5390b59da3dfbc072f967e945a0', class: "zonos--checkout-footer-icon-wrapper" }, index.h("zonos-text", { key: 'b098a9c89d4855d388372b20c94ee3582cc4e9df', type: "caption" }, "Powered by"), index.h("a", { key: '0652328fc74701168e5ddec2e0662208498e4557', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, index.h("zonos-icon", { key: '826323504ca56c3216524d3a9a49f820162aeb85', autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 }))))));
298
+ this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
299
+ ]) }, index.h("zonos-language-select", { key: '4fb9860a4547541f3947d349ab6056e899335952', handleOnClose: () => this.toggleLanguageDialog() }))), index.h("div", { key: '0a348521a7ccecc23a7a69019940c2421bb8420c', class: "zonos--checkout-footer-icon-wrapper" }, index.h("zonos-text", { key: '9adf4c24fcf1b5d0827556e9e68006860b0bb9c4', textColor: colorDesktop, type: "caption" }, "Powered by"), index.h("a", { key: 'a3f957e10d14d68d3973169470a21fdabb2f7a06', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, index.h("zonos-icon", { key: '49592d8302447d007dc840de18fa78af7898f382', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 }))))));
291
300
  }
292
301
  get el() { return index.getElement(this); }
302
+ static get watchers() { return {
303
+ "mobile": ["handleMobileChange"]
304
+ }; }
293
305
  };
294
306
  ZonosCheckoutFooter.style = ZonosCheckoutFooterStyle0;
295
307
 
@@ -337,6 +349,88 @@ const ZonosCheckoutPayment = class {
337
349
  };
338
350
  ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
339
351
 
352
+ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
353
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>
354
+ </svg>
355
+ `;
356
+
357
+ const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
358
+ const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
359
+
360
+ const ZonosCheckoutProgressTabs = class {
361
+ constructor(hostRef) {
362
+ index.registerInstance(this, hostRef);
363
+ /**
364
+ * The total number of steps that's done
365
+ */
366
+ this.getTotalSuccessStep = () => {
367
+ // include the finish step
368
+ const totalSteps = 4;
369
+ const stepDone = Object.values(cart.cartStore.tabItems).filter(tab => tab.isDone).length + 1;
370
+ return `${(stepDone / totalSteps) * 100}%`;
371
+ };
372
+ this.isTabClickable = (tabValue) => {
373
+ const currentTab = cart.cartStore.tabItems[tabValue];
374
+ if (!currentTab) {
375
+ return false;
376
+ }
377
+ // clickable if the tab state is done
378
+ if (currentTab.isDone) {
379
+ return true;
380
+ }
381
+ // if any of the previous tabs are not done, the tab is not clickable
382
+ return Object.values(cart.cartStore.tabItems)
383
+ .slice(0, currentTab.index - 1)
384
+ .every(tab => tab.isDone);
385
+ };
386
+ this.tabColor = null;
387
+ this.backgroundColor = null;
388
+ }
389
+ /**
390
+ * Set the tab items data. This is to be used in storybook
391
+ */
392
+ async setTabItems(tabItems) {
393
+ cart.cartStore.tabItems = tabItems;
394
+ }
395
+ /**
396
+ * Set selected tab. Only set the tab if it's clickable
397
+ */
398
+ async setTabSelected(tabValue) {
399
+ if (this.isTabClickable(tabValue)) {
400
+ cart.cartStore.step = tabValue;
401
+ }
402
+ }
403
+ render() {
404
+ const selectedStep = cart.cartStore.step;
405
+ const labelSelectedColor = this.tabColor || zonosStore.zonosStore.appearance.colorSecondary;
406
+ // If the background color and the tab color are not contrat enough, increase the contrast of the label color
407
+ const contrastLabelColor = this.backgroundColor && labelSelectedColor
408
+ ? getContrastColor.getContrastColor({
409
+ backgroundColor: isColorVariable.isColorVariable(this.backgroundColor)
410
+ ? window
411
+ .getComputedStyle(this.ele)
412
+ .getPropertyValue(`--amino-${this.backgroundColor.replace('--amino-', '')}`)
413
+ : this.backgroundColor,
414
+ color: labelSelectedColor,
415
+ })
416
+ : labelSelectedColor;
417
+ return (index.h(index.Host, { key: 'e79dc4967096d3b6f0ac25d58f02e77f773c8e95', class: "zonos--elements", style: {
418
+ '--color': contrastLabelColor,
419
+ '--progress-percent': this.getTotalSuccessStep(),
420
+ } }, index.h("div", { key: '20e500d31c28ee0705c1999e0f258b679af9d73a', class: "zonos--tab-wrapper" }, Object.values(cart.cartStore.tabItems).map((tab, index$1) => {
421
+ const isSelected = tab.value === selectedStep;
422
+ return (index.h("button", { class: classes.classes([
423
+ 'zonos--tab-item',
424
+ tab.value === selectedStep && 'selected',
425
+ tab.isDone && 'done',
426
+ ]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cart.cartStore.step = tab.value) }, index.h("div", { class: "zonos--tab-index" }, index.h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index$1 + 1), index.h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), index.h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, cart.translate(tab.label))));
427
+ })), index.h("div", { key: '129502b873f339192ef5f4c67ac8c06d533ccfca', class: "zonos--tab-progress" }, index.h("div", { key: '728a074d6a411b400be30929bf9a5fdc8431745d', class: "zonos--progress-bar-fill" }))));
428
+ }
429
+ static get assetsDirs() { return ["assets"]; }
430
+ get ele() { return index.getElement(this); }
431
+ };
432
+ ZonosCheckoutProgressTabs.style = ZonosCheckoutProgressTabsStyle0;
433
+
340
434
  const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:var(--amino-space-8);margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
341
435
  const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
342
436
 
@@ -407,7 +501,7 @@ ZonosCustomerInfo.style = ZonosCustomerInfoStyle0;
407
501
 
408
502
  const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
409
503
 
410
- const zonosDialogCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:white}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";
504
+ const zonosDialogCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:white;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";
411
505
  const ZonosDialogStyle0 = zonosDialogCss;
412
506
 
413
507
  const ZonosDialog = class {
@@ -432,7 +526,6 @@ const ZonosDialog = class {
432
526
  this.noHeader = false;
433
527
  this.noBodyPadding = false;
434
528
  this.noBorder = false;
435
- this.footerRightAction = null;
436
529
  this.borderStyle = undefined;
437
530
  this.noCloseButton = false;
438
531
  this.noClickOutside = false;
@@ -455,7 +548,7 @@ const ZonosDialog = class {
455
548
  document.body.style.overflow = 'auto';
456
549
  }
457
550
  const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle);
458
- return (index.h(index.Host, { key: '3927d9cf0ebbd8b497a0ec42328c4392925d198a', class: classes.classes([
551
+ return (index.h(index.Host, { key: 'f0aee4766d2c62f3f4feff18c99dba62ea97ca06', class: classes.classes([
459
552
  'zonos--elements',
460
553
  this.open && 'open',
461
554
  this.isLoading && 'is-loading',
@@ -466,10 +559,10 @@ const ZonosDialog = class {
466
559
  '--font-family': zonosStore.zonosStoreFontFamily(),
467
560
  '--height': this.height || 'initial',
468
561
  '--width': this.width,
469
- } }, index.h("div", { key: 'df93af61bfd856db3a572cdb98f60a8dd5c5bb7d', class: "zonos--backdrop" }), index.h("div", { key: 'f306feb4858dff642fbfd731e5aad849a8f29941', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, index.h("div", { key: 'b914ea2e54fb2af825008ae28e235c461dce67e9', class: "zonos--dialog" }, this.isLoading && (index.h("div", { class: "zonos--loading" }, index.h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (index.h("div", { class: "zonos--header" }, this.headerText && (index.h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), index.h("div", { key: '19219c0c8d167bbacec992ba10b1fe0f31a8b8f6', class: classes.classes([
562
+ } }, index.h("div", { key: '42e8afd7ddc94ab9ec4951f4221e32729256694e', class: "zonos--backdrop" }), index.h("div", { key: '035c21c65ae5cabc12b41b6ad1684fa4dbc5b92e', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, index.h("div", { key: 'b9a3299c9fb920f9af5783506b0489122b2eae11', class: "zonos--dialog" }, this.isLoading && (index.h("div", { class: "zonos--loading" }, index.h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (index.h("div", { class: "zonos--header" }, this.headerText && (index.h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), index.h("div", { key: 'f5e5a75782ca6acd4a2c004756b800f3c2558129', class: classes.classes([
470
563
  'zonos--body',
471
564
  this.noBodyPadding && 'zonos--no-body-padding',
472
- ]) }, index.h("slot", { key: '38f9b83418dacd47cc2395f253a32ff0a6723d54' })), this.footerRightAction && (index.h("div", { class: "zonos--footer" }, index.h("div", { class: "zonos--footer-right-action" }, this.footerRightAction)))))));
565
+ ]) }, index.h("slot", { key: '3fe4ec47852e99f1dc5b6a7a84a8b918594b8b7f' })), index.h("slot", { key: '5515f4109274b178249c05c6e6c91fdc30ce528a', name: "dialog-footer" })))));
473
566
  }
474
567
  static get assetsDirs() { return ["assets"]; }
475
568
  };
@@ -479,7 +572,7 @@ const ChevronDownIcon = `<svg color="var(--amino-gray-400)" fill="none" height="
479
572
 
480
573
  const ChevronUpIcon = `<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
481
574
 
482
- const zonosReviewCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:-webkit-sticky;position:sticky;top:0;background-color:var(--amino-gray-0);z-index:1}:host .zonos--total-pay{margin:var(--amino-space-16) 0 var(--amino-space-32)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8);background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";
575
+ const zonosReviewCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:-webkit-sticky;position:sticky;top:0;background-color:var(--amino-gray-0);z-index:1}:host .zonos--total-pay{margin:var(--amino-space-8) 0 var(--amino-space-24)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8);background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";
483
576
  const ZonosReviewStyle0 = zonosReviewCss;
484
577
 
485
578
  const ZonosReview = class {
@@ -540,11 +633,13 @@ const ZonosShipping = class {
540
633
  if (!selectedShippingOption) {
541
634
  return;
542
635
  }
636
+ this.isSelecting = true;
543
637
  // save selected shipping option to store
544
638
  const updateStatus = await cart.cartStoreUpdateSelectedShippingOption(selectedShippingOption);
545
639
  if (!updateStatus) {
546
640
  return;
547
641
  }
642
+ this.isSelecting = false;
548
643
  this.disabled = false;
549
644
  };
550
645
  /**
@@ -553,11 +648,38 @@ const ZonosShipping = class {
553
648
  this.continueClickHandler = () => {
554
649
  this.continueClicked.emit();
555
650
  };
651
+ this.initServiceLevels = () => {
652
+ var _a;
653
+ this.serviceLevels =
654
+ ((_a = cart.cartStore.shippingData) === null || _a === void 0 ? void 0 : _a.flatMap((item) => {
655
+ var _a, _b;
656
+ const { expectedDate, maxTransit, minTransit } = cart.cartStoreGetShippingTransitInfo(item);
657
+ const sublabel = expectedDate
658
+ ? `${cart.translate('Expected delivery')} ${expectedDate}`
659
+ : '';
660
+ const caption = minTransit && maxTransit
661
+ ? `(${minTransit}-${maxTransit} ${cart.translate('business days')})`
662
+ : '';
663
+ const shippingAmount = ((_b = (_a = cart.cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(landedCostItem => { var _a; return ((_a = landedCostItem.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating.id) === item.id; })) === null || _b === void 0 ? void 0 : _b.subtotals.shipping) || 0;
664
+ return {
665
+ caption,
666
+ label: item.displayName,
667
+ price: formatCurrency({
668
+ amount: shippingAmount,
669
+ currency: cart.cartStore.currency,
670
+ }),
671
+ sublabel,
672
+ value: item.id,
673
+ };
674
+ })) || [];
675
+ };
556
676
  this.continueLoading = false;
557
677
  this.submitBtnColor = undefined;
558
678
  this.submitBtnType = undefined;
559
679
  this.selectedShippingMethod = null;
680
+ this.isSelecting = false;
560
681
  this.disabled = true;
682
+ this.serviceLevels = [];
561
683
  }
562
684
  watchFormComplete() {
563
685
  var _a;
@@ -569,30 +691,18 @@ const ZonosShipping = class {
569
691
  });
570
692
  }
571
693
  }
694
+ componentWillLoad() {
695
+ this.initServiceLevels();
696
+ const selectedServiceLevel = this.serviceLevels.find(item => { var _a; return item.value === ((_a = cart.cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
697
+ if (selectedServiceLevel) {
698
+ this.selectedShippingMethod = selectedServiceLevel;
699
+ }
700
+ // enable continue button if there is a selected shipping option
701
+ this.disabled = !selectedServiceLevel;
702
+ }
572
703
  render() {
573
- var _a;
574
- const serviceLevels = (_a = cart.cartStore.shippingData) === null || _a === void 0 ? void 0 : _a.flatMap((item) => {
575
- var _a, _b;
576
- const { expectedDate, maxTransit, minTransit } = cart.cartStoreGetShippingTransitInfo(item);
577
- const sublabel = expectedDate
578
- ? `${cart.translate('Expected delivery')} ${expectedDate}`
579
- : '';
580
- const caption = minTransit && maxTransit
581
- ? `(${minTransit}-${maxTransit} ${cart.translate('business days')})`
582
- : '';
583
- const shippingAmount = ((_b = (_a = cart.cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(landedCostItem => { var _a; return ((_a = landedCostItem.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating.id) === item.id; })) === null || _b === void 0 ? void 0 : _b.subtotals.shipping) || 0;
584
- return {
585
- caption,
586
- label: item.displayName,
587
- price: formatCurrency({
588
- amount: shippingAmount,
589
- currency: cart.cartStore.currency,
590
- }),
591
- sublabel,
592
- value: item.id,
593
- };
594
- });
595
- return (index.h(index.Host, { class: "zonos--shipping zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Shipping information')), index.h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, cart.translate('Shipping method')), !(serviceLevels === null || serviceLevels === void 0 ? void 0 : serviceLevels.length) ? (index.h("zonos-banner", { bannerTitle: "No shipping methods found - try editing your address or contacting support if the error persists", intent: "error" })) : (index.h("zonos-shipping-rich-radio", { items: serviceLevels || [], onRadioSelected: e => this.handleRadioSelected(e) })), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
704
+ var _a, _b;
705
+ return (index.h(index.Host, { key: 'ab881bdb575ac0177154ffa8a2d84d668151c46d', class: "zonos--shipping zonos--elements" }, index.h("div", { key: 'b8738e0fb5c32b329ae03ccd2cb2d1a178a05aa8', class: "zonos--group" }, index.h("zonos-text", { key: 'd942ab3f4e77631145a0a38dae95999454a92b56', class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Shipping information')), index.h("zonos-text", { key: '6855f44cf3458891776b3c215417bec329de89dc', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, cart.translate('Shipping method')), !((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) ? (index.h("zonos-banner", { bannerTitle: cart.translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), intent: "error" })) : (index.h("zonos-shipping-rich-radio", { initialSelectedValue: (_b = this.selectedShippingMethod) === null || _b === void 0 ? void 0 : _b.value, items: this.serviceLevels, onRadioSelected: e => this.handleRadioSelected(e) })), index.h("div", { key: 'f6398edeecd18c603680ad6c7c8e1aa5f5cebe4a', class: "zonos--group-btn" }, index.h("zonos-button", { key: 'a548fb385ed341308ff86e615d9088e7cd4ec34d', backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
596
706
  // use primary type when on mobile mode
597
707
  variant: this.submitBtnType }, cart.translate('Go to payment'))))));
598
708
  }
@@ -607,6 +717,7 @@ exports.zonos_cart_subtotal = ZonosCartSubtotal;
607
717
  exports.zonos_checkout_finish = ZonosCheckoutFinish;
608
718
  exports.zonos_checkout_footer = ZonosCheckoutFooter;
609
719
  exports.zonos_checkout_payment = ZonosCheckoutPayment;
720
+ exports.zonos_checkout_progress_tabs = ZonosCheckoutProgressTabs;
610
721
  exports.zonos_customer_info = ZonosCustomerInfo;
611
722
  exports.zonos_dialog = ZonosDialog;
612
723
  exports.zonos_review = ZonosReview;