@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
@@ -0,0 +1,194 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { cartStore, } from "../../store/checkout/cart";
3
+ import { translate } from "../../store/translationStore";
4
+ import { zonosStore } from "../../store/zonosStore";
5
+ import { classes } from "../../utils/classes";
6
+ import { getContrastColor } from "../../utils/getContrastColor";
7
+ import { isColorVariable } from "../../utils/isColorVariable";
8
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
9
+ import TabCheckmark from "./assets/TabCheckmark.svg";
10
+ export class ZonosCheckoutProgressTabs {
11
+ constructor() {
12
+ /**
13
+ * The total number of steps that's done
14
+ */
15
+ this.getTotalSuccessStep = () => {
16
+ // include the finish step
17
+ const totalSteps = 4;
18
+ const stepDone = Object.values(cartStore.tabItems).filter(tab => tab.isDone).length + 1;
19
+ return `${(stepDone / totalSteps) * 100}%`;
20
+ };
21
+ this.isTabClickable = (tabValue) => {
22
+ const currentTab = cartStore.tabItems[tabValue];
23
+ if (!currentTab) {
24
+ return false;
25
+ }
26
+ // clickable if the tab state is done
27
+ if (currentTab.isDone) {
28
+ return true;
29
+ }
30
+ // if any of the previous tabs are not done, the tab is not clickable
31
+ return Object.values(cartStore.tabItems)
32
+ .slice(0, currentTab.index - 1)
33
+ .every(tab => tab.isDone);
34
+ };
35
+ this.tabColor = null;
36
+ this.backgroundColor = null;
37
+ }
38
+ /**
39
+ * Set the tab items data. This is to be used in storybook
40
+ */
41
+ async setTabItems(tabItems) {
42
+ cartStore.tabItems = tabItems;
43
+ }
44
+ /**
45
+ * Set selected tab. Only set the tab if it's clickable
46
+ */
47
+ async setTabSelected(tabValue) {
48
+ if (this.isTabClickable(tabValue)) {
49
+ cartStore.step = tabValue;
50
+ }
51
+ }
52
+ render() {
53
+ const selectedStep = cartStore.step;
54
+ const labelSelectedColor = this.tabColor || zonosStore.appearance.colorSecondary;
55
+ // If the background color and the tab color are not contrat enough, increase the contrast of the label color
56
+ const contrastLabelColor = this.backgroundColor && labelSelectedColor
57
+ ? getContrastColor({
58
+ backgroundColor: isColorVariable(this.backgroundColor)
59
+ ? window
60
+ .getComputedStyle(this.ele)
61
+ .getPropertyValue(`--amino-${this.backgroundColor.replace('--amino-', '')}`)
62
+ : this.backgroundColor,
63
+ color: labelSelectedColor,
64
+ })
65
+ : labelSelectedColor;
66
+ return (h(Host, { key: 'e79dc4967096d3b6f0ac25d58f02e77f773c8e95', class: "zonos--elements", style: {
67
+ '--color': contrastLabelColor,
68
+ '--progress-percent': this.getTotalSuccessStep(),
69
+ } }, h("div", { key: '20e500d31c28ee0705c1999e0f258b679af9d73a', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
70
+ const isSelected = tab.value === selectedStep;
71
+ return (h("button", { class: classes([
72
+ 'zonos--tab-item',
73
+ tab.value === selectedStep && 'selected',
74
+ tab.isDone && 'done',
75
+ ]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, translate(tab.label))));
76
+ })), h("div", { key: '129502b873f339192ef5f4c67ac8c06d533ccfca', class: "zonos--tab-progress" }, h("div", { key: '728a074d6a411b400be30929bf9a5fdc8431745d', class: "zonos--progress-bar-fill" }))));
77
+ }
78
+ static get is() { return "zonos-checkout-progress-tabs"; }
79
+ static get encapsulation() { return "shadow"; }
80
+ static get originalStyleUrls() {
81
+ return {
82
+ "$": ["zonos-checkout-progress-tabs.scss"]
83
+ };
84
+ }
85
+ static get styleUrls() {
86
+ return {
87
+ "$": ["zonos-checkout-progress-tabs.css"]
88
+ };
89
+ }
90
+ static get assetsDirs() { return ["assets"]; }
91
+ static get properties() {
92
+ return {
93
+ "tabColor": {
94
+ "type": "string",
95
+ "mutable": false,
96
+ "complexType": {
97
+ "original": "string | null",
98
+ "resolved": "null | string | undefined",
99
+ "references": {}
100
+ },
101
+ "required": false,
102
+ "optional": true,
103
+ "docs": {
104
+ "tags": [],
105
+ "text": "Color of the tab progress bar and label, override the secondary color of the appearance settings"
106
+ },
107
+ "attribute": "tab-color",
108
+ "reflect": false,
109
+ "defaultValue": "null"
110
+ },
111
+ "backgroundColor": {
112
+ "type": "string",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "Color | (string & { _placeholder?: never }) | null",
116
+ "resolved": "Color | (string & { _placeholder?: undefined; }) | null | undefined",
117
+ "references": {
118
+ "Color": {
119
+ "location": "import",
120
+ "path": "src/types/styles/Color",
121
+ "id": "src/types/styles/Color.ts::Color"
122
+ }
123
+ }
124
+ },
125
+ "required": false,
126
+ "optional": true,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": "Background color of the parent that's wrapped around the tab progress bar"
130
+ },
131
+ "attribute": "background-color",
132
+ "reflect": false,
133
+ "defaultValue": "null"
134
+ }
135
+ };
136
+ }
137
+ static get methods() {
138
+ return {
139
+ "setTabItems": {
140
+ "complexType": {
141
+ "signature": "(tabItems: TabItems) => Promise<void>",
142
+ "parameters": [{
143
+ "name": "tabItems",
144
+ "type": "{ \"customer-info\": TabItem; shipping: TabItem; payment: TabItem; }",
145
+ "docs": ""
146
+ }],
147
+ "references": {
148
+ "Promise": {
149
+ "location": "global",
150
+ "id": "global::Promise"
151
+ },
152
+ "TabItems": {
153
+ "location": "import",
154
+ "path": "src/components/store/checkout/cart",
155
+ "id": "src/components/store/checkout/cart.ts::TabItems"
156
+ }
157
+ },
158
+ "return": "Promise<void>"
159
+ },
160
+ "docs": {
161
+ "text": "Set the tab items data. This is to be used in storybook",
162
+ "tags": []
163
+ }
164
+ },
165
+ "setTabSelected": {
166
+ "complexType": {
167
+ "signature": "(tabValue: TabItem['value']) => Promise<void>",
168
+ "parameters": [{
169
+ "name": "tabValue",
170
+ "type": "\"customer-info\" | \"shipping\" | \"payment\"",
171
+ "docs": ""
172
+ }],
173
+ "references": {
174
+ "Promise": {
175
+ "location": "global",
176
+ "id": "global::Promise"
177
+ },
178
+ "TabItem": {
179
+ "location": "import",
180
+ "path": "src/components/store/checkout/cart",
181
+ "id": "src/components/store/checkout/cart.ts::TabItem"
182
+ }
183
+ },
184
+ "return": "Promise<void>"
185
+ },
186
+ "docs": {
187
+ "text": "Set selected tab. Only set the tab if it's clickable",
188
+ "tags": []
189
+ }
190
+ }
191
+ };
192
+ }
193
+ static get elementRef() { return "ele"; }
194
+ }
@@ -42,10 +42,10 @@ export class ZonosCollapse {
42
42
  // set overflow to hidden to prevent content from showing when collapsed
43
43
  this.el.style.overflow = 'hidden';
44
44
  }
45
- return (h(Host, { key: '7ac8b898feadfb4424b3b48a98135cb18994f4e0', class: 'zonos--elements zonos--collapse', style: {
45
+ return (h(Host, { key: '032f5818dd8394b5111927907c8fa135a55fef5c', class: 'zonos--elements zonos--collapse', style: {
46
46
  '--font-family': zonosStoreFontFamily(),
47
47
  height: this.getElementHeight(),
48
- } }, h("div", { key: '4a527ec319b59041196284d4d9a8f22b943a74e6' }, h("iframe", { key: '2fb51c16e13ca90561b1b1e6cab89d87e4a37a47', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: '6d7849f6c35be611446b0da36d657396e5ca3122' }))));
48
+ } }, h("div", { key: '5ddbf406c93f37c9e23375f11dd8439934c0d2a5' }, h("iframe", { key: 'b3efa8bc198918dbb3284e8ce658ffca6249eaa8', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'ffcd123c3a046e62855a650da9972cde94a7774c' }))));
49
49
  }
50
50
  static get is() { return "zonos-collapse"; }
51
51
  static get encapsulation() { return "shadow"; }
@@ -35,9 +35,9 @@ export class ZonosCountrySelect {
35
35
  const filteredCountries = this.inputValue
36
36
  ? fuseObject.map(country => country.item)
37
37
  : countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
38
- return (h(Host, { key: '2b8e15643f92ac489706aff7623b1d1efdebce70', class: "zonos--elements", style: {
38
+ return (h(Host, { key: '0024a7061a593cf3c92fd7f6b5916aaac3a835c9', class: "zonos--elements", style: {
39
39
  '--font-family': zonosStoreFontFamily(),
40
- } }, h("div", { key: '06b0c7765d8144ca102c9033e74cf1edb14743ac', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'f2af99575f518acb753448f7cb1f7aecd790de9d', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '296b92c476439aace00f6817b452a3fd3e1d353d', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: 'd988b856392f88a66bcc3016ccf55107bda4a411', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '4376bec824141dd7d2dbfb84f465ac4a48e1d050', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
40
+ } }, h("div", { key: 'e6ef5d8cc13e731c94ee5ef037c02eac36d9bce6', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'f698da7688757b6728e99e0cecb21ac4ce586d30', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'd37801e6023262a582d3ecc6e3a39f505f7e82b8', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '6f053c963f5e25b5285a94070336650537bbdad3', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '3d3e180b204bf9fa0893fec7839f1d0d5c4740c1', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
41
41
  }
42
42
  static get is() { return "zonos-country-select"; }
43
43
  static get encapsulation() { return "shadow"; }
@@ -8,7 +8,7 @@ export class ZonosCustomMessage {
8
8
  }
9
9
  render() {
10
10
  const messageWithLinks = formatStringWithLinks(this.message);
11
- return (h(Host, { key: '73091a3267f0989e8820800054aebc75168dc5d6', class: "zonos--elements", style: {
11
+ return (h(Host, { key: 'b09b7025fb55c4323aaa24ccb7e410d1638bed8a', class: "zonos--elements", style: {
12
12
  '--font-family': zonosStoreFontFamily(),
13
13
  } }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { innerHTML: messageWithLinks }))))));
14
14
  }
@@ -60,6 +60,7 @@
60
60
  justify-content: center;
61
61
  z-index: 10002;
62
62
  background: white;
63
+ border-radius: var(--border-radius, var(--amino-radius-10));
63
64
  }
64
65
  :host .zonos--dialog-layout {
65
66
  width: 100vw;
@@ -86,7 +87,6 @@
86
87
  outline: none;
87
88
  box-shadow: var(--amino-v3-shadow-xxl);
88
89
  border: var(--amino-border);
89
- overflow: hidden;
90
90
  display: flex;
91
91
  flex-direction: column;
92
92
  }
@@ -25,7 +25,6 @@ export class ZonosDialog {
25
25
  this.noHeader = false;
26
26
  this.noBodyPadding = false;
27
27
  this.noBorder = false;
28
- this.footerRightAction = null;
29
28
  this.borderStyle = undefined;
30
29
  this.noCloseButton = false;
31
30
  this.noClickOutside = false;
@@ -48,7 +47,7 @@ export class ZonosDialog {
48
47
  document.body.style.overflow = 'auto';
49
48
  }
50
49
  const borderStyle = getBorderRadius(this.borderStyle);
51
- return (h(Host, { key: '3927d9cf0ebbd8b497a0ec42328c4392925d198a', class: classes([
50
+ return (h(Host, { key: 'f0aee4766d2c62f3f4feff18c99dba62ea97ca06', class: classes([
52
51
  'zonos--elements',
53
52
  this.open && 'open',
54
53
  this.isLoading && 'is-loading',
@@ -59,10 +58,10 @@ export class ZonosDialog {
59
58
  '--font-family': zonosStoreFontFamily(),
60
59
  '--height': this.height || 'initial',
61
60
  '--width': this.width,
62
- } }, h("div", { key: 'df93af61bfd856db3a572cdb98f60a8dd5c5bb7d', class: "zonos--backdrop" }), h("div", { key: 'f306feb4858dff642fbfd731e5aad849a8f29941', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'b914ea2e54fb2af825008ae28e235c461dce67e9', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: '19219c0c8d167bbacec992ba10b1fe0f31a8b8f6', class: classes([
61
+ } }, h("div", { key: '42e8afd7ddc94ab9ec4951f4221e32729256694e', class: "zonos--backdrop" }), h("div", { key: '035c21c65ae5cabc12b41b6ad1684fa4dbc5b92e', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: 'b9a3299c9fb920f9af5783506b0489122b2eae11', class: "zonos--dialog" }, this.isLoading && (h("div", { class: "zonos--loading" }, h("zonos-spinner", { size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { class: "zonos--header" }, this.headerText && (h("h3", { class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: 'f5e5a75782ca6acd4a2c004756b800f3c2558129', class: classes([
63
62
  'zonos--body',
64
63
  this.noBodyPadding && 'zonos--no-body-padding',
65
- ]) }, h("slot", { key: '38f9b83418dacd47cc2395f253a32ff0a6723d54' })), this.footerRightAction && (h("div", { class: "zonos--footer" }, h("div", { class: "zonos--footer-right-action" }, this.footerRightAction)))))));
64
+ ]) }, h("slot", { key: '3fe4ec47852e99f1dc5b6a7a84a8b918594b8b7f' })), h("slot", { key: '5515f4109274b178249c05c6e6c91fdc30ce528a', name: "dialog-footer" })))));
66
65
  }
67
66
  static get is() { return "zonos-dialog"; }
68
67
  static get encapsulation() { return "shadow"; }
@@ -219,30 +218,6 @@ export class ZonosDialog {
219
218
  "reflect": false,
220
219
  "defaultValue": "false"
221
220
  },
222
- "footerRightAction": {
223
- "type": "unknown",
224
- "mutable": false,
225
- "complexType": {
226
- "original": "HTMLElement | null",
227
- "resolved": "HTMLElement | null",
228
- "references": {
229
- "HTMLElement": {
230
- "location": "global",
231
- "id": "global::HTMLElement"
232
- }
233
- }
234
- },
235
- "required": false,
236
- "optional": false,
237
- "docs": {
238
- "tags": [{
239
- "name": "default",
240
- "text": "null"
241
- }],
242
- "text": "The right area for the action in the footer"
243
- },
244
- "defaultValue": "null"
245
- },
246
221
  "borderStyle": {
247
222
  "type": "string",
248
223
  "mutable": false,
@@ -252,8 +227,8 @@ export class ZonosDialog {
252
227
  "references": {
253
228
  "ElementsUiStyle": {
254
229
  "location": "import",
255
- "path": "src/types",
256
- "id": "src/types/index.ts::ElementsUiStyle"
230
+ "path": "src/types/generated/graphql.customer.types",
231
+ "id": "src/types/generated/graphql.customer.types.ts::ElementsUiStyle"
257
232
  }
258
233
  }
259
234
  },
@@ -1,5 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { zonosStoreFontFamily } from "../../store/zonosStore";
3
+ import { isColorVariable } from "../../utils/isColorVariable";
3
4
  export class ZonosIcon {
4
5
  constructor() {
5
6
  this.autoHeight = false;
@@ -11,9 +12,12 @@ export class ZonosIcon {
11
12
  if (!this.content || !this.el.shadowRoot) {
12
13
  return null;
13
14
  }
15
+ const iconColor = isColorVariable(this.iconColor)
16
+ ? `var(--amino-${this.iconColor})`
17
+ : this.iconColor;
14
18
  this.el.shadowRoot.innerHTML = this.content;
15
19
  return (h(Host, { class: "zonos--elements", style: {
16
- '--color': `var(--amino-${this.iconColor})`,
20
+ '--color': iconColor,
17
21
  '--font-family': zonosStoreFontFamily(),
18
22
  '--height': `${this.autoHeight ? 'auto' : `${this.size}px`}`,
19
23
  '--width': `${this.size}px`,
@@ -58,13 +62,13 @@ export class ZonosIcon {
58
62
  "type": "string",
59
63
  "mutable": false,
60
64
  "complexType": {
61
- "original": "Color",
62
- "resolved": "\"blue-100\" | \"blue-200\" | \"blue-300\" | \"blue-400\" | \"blue-500\" | \"blue-600\" | \"blue-700\" | \"blue-800\" | \"blue-900\" | \"blue-1000\" | \"cyan-100\" | \"cyan-200\" | \"cyan-300\" | \"cyan-400\" | \"cyan-500\" | \"cyan-600\" | \"cyan-700\" | \"cyan-800\" | \"cyan-900\" | \"cyan-1000\" | \"green-100\" | \"green-200\" | \"green-300\" | \"green-400\" | \"green-500\" | \"green-600\" | \"green-700\" | \"green-800\" | \"green-900\" | \"green-1000\" | \"orange-100\" | \"orange-200\" | \"orange-300\" | \"orange-400\" | \"orange-500\" | \"orange-600\" | \"orange-700\" | \"orange-800\" | \"orange-900\" | \"orange-1000\" | \"purple-100\" | \"purple-200\" | \"purple-300\" | \"purple-400\" | \"purple-500\" | \"purple-600\" | \"purple-700\" | \"purple-800\" | \"purple-900\" | \"purple-1000\" | \"red-100\" | \"red-200\" | \"red-300\" | \"red-400\" | \"red-500\" | \"red-600\" | \"red-700\" | \"red-800\" | \"red-900\" | \"red-1000\" | \"gray-100\" | \"gray-200\" | \"gray-300\" | \"gray-400\" | \"gray-500\" | \"gray-600\" | \"gray-700\" | \"gray-800\" | \"gray-900\" | \"gray-1000\" | \"glass-100\" | \"glass-200\" | \"glass-300\" | \"glass-400\" | \"glass-500\" | \"glass-600\" | \"glass-700\" | \"glass-800\" | \"glass-900\" | \"glass-1000\" | \"gray-0\" | \"gray-50\" | \"glass-0\" | \"glass-50\" | \"gray-1100\" | \"gray-1200\" | \"glass-1100\" | \"glass-1200\"",
65
+ "original": "Color | (string & { _placeholder?: never })",
66
+ "resolved": "Color | (string & { _placeholder?: undefined; })",
63
67
  "references": {
64
68
  "Color": {
65
69
  "location": "import",
66
- "path": "src/types",
67
- "id": "src/types/index.ts::Color"
70
+ "path": "src/types/styles/Color",
71
+ "id": "src/types/styles/Color.ts::Color"
68
72
  }
69
73
  }
70
74
  },
@@ -16,9 +16,9 @@ export class ZonosLanguageSelect {
16
16
  }
17
17
  render() {
18
18
  const { selectedLocale } = localizationStore;
19
- return (h(Host, { key: 'd12676d6438941bb8d987826f68c1b72a7e02ccd', class: "zonos--elements", style: {
19
+ return (h(Host, { key: '25e0e2be0bbac853efa9c26c1595a1d57461a1a1', class: "zonos--elements", style: {
20
20
  '--font-family': zonosStoreFontFamily(),
21
- } }, h("div", { key: '259eaa6a8ae682cc96c98eaaab574757285188b9', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '88bff024a5f678b00bf4edd7b2497177a986af4c', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'be1d87991dec9ac2a3b530a0cf9129b9e191781b', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
21
+ } }, h("div", { key: 'b9f3a630f945570a9c0058bb0367e810b7650eb0', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: 'b30a41cc7f4eab57f15b48ffa3f7c0ad1e695e65', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'c6826b80ece54415befc388e57baa02d56472aef', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
22
22
  }
23
23
  static get is() { return "zonos-language-select"; }
24
24
  static get encapsulation() { return "shadow"; }
@@ -10,11 +10,11 @@ export class ZonosLogo {
10
10
  const filterColor = this.theme === 'DARK'
11
11
  ? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
12
12
  : 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
13
- return (h(Host, { key: 'b93db6ec62ecaacb3ded0ab07dd2f38ed488f8d1', class: classes(['zonos--elements zonos--logo']), style: {
13
+ return (h(Host, { key: '483016f5ffe43ea7742e895b5335212da6ec1d18', class: classes(['zonos--elements zonos--logo']), style: {
14
14
  '--filter-color': filterColor,
15
15
  '--font-family': zonosStoreFontFamily(),
16
16
  '--width': this.width,
17
- } }, h("img", { key: '026162477b24250e4204318fa3018b1cfd383ab5', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
17
+ } }, h("img", { key: 'aed23717de194da43d48ee7b068f3e7568c0bbb3', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
18
18
  }
19
19
  static get is() { return "zonos-logo"; }
20
20
  static get encapsulation() { return "shadow"; }
@@ -40,8 +40,8 @@ export class ZonosLogo {
40
40
  "references": {
41
41
  "ElementsUiTheme": {
42
42
  "location": "import",
43
- "path": "src/types",
44
- "id": "src/types/index.ts::ElementsUiTheme"
43
+ "path": "src/types/generated/graphql.customer.types",
44
+ "id": "src/types/generated/graphql.customer.types.ts::ElementsUiTheme"
45
45
  }
46
46
  }
47
47
  },
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
8
8
  this.label = '';
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: 'd0882c22934d6f9635bd0b31af5703283cd0a1be', class: "zonos--elements", style: {
11
+ return (h(Host, { key: 'e7867deee86e4a155c21db2618eafd6f3c6cea3b', class: "zonos--elements", style: {
12
12
  '--font-family': zonosStoreFontFamily(),
13
- } }, h("zonos-v-stack", { key: '2e227c5bdeeeb0fa772847267007df5aea2e0824', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: 'c43b72c938069ff1a99a985b3b388a785f94d100', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'b1008e43ca022ca1e1b63a60ab5c347d1228396e', type: "boldLabel" }, this.label), h("zonos-button", { key: '4722586c58eac765ded4a7baeeca8eb58d44dd0a', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: '36babf745ea5de00c82823520134b1dfcfc9d16d' }))));
13
+ } }, h("zonos-v-stack", { key: 'f7aedb0f819b61da26afd53add628bcddcca5d8a', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '7ec77c24a440a5d42965f657502506c769d3098c', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'bab0ffc53edd20840438e82c0067c1eae8f13ec7', type: "boldLabel" }, this.label), h("zonos-button", { key: 'a85fc2b745b25c07bcccfe60eb1f1e722c7999c2', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: 'fe932e62edd5f679061c76a62650885d4337363c' }))));
14
14
  }
15
15
  static get is() { return "zonos-select-dialog-header"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -24,11 +24,20 @@ export class ZonosShippingRichRadio {
24
24
  this.borderColor = undefined;
25
25
  this.borderStyle = undefined;
26
26
  this.theme = undefined;
27
+ this.initialSelectedValue = undefined;
27
28
  this.selectedItem = null;
28
29
  }
30
+ componentWillLoad() {
31
+ // Set initial selected item
32
+ if (this.initialSelectedValue) {
33
+ this.selectedItem =
34
+ this.items.find(item => item.value === this.initialSelectedValue) ||
35
+ null;
36
+ }
37
+ }
29
38
  render() {
30
39
  var _a;
31
- return (h(Host, { key: '0dc36a16b2f51816755010c46b416b8b1f4b4744', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--font-family': zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
40
+ return (h(Host, { key: 'a1c2ace211e4d0b9d63a784028cc725bab7229e7', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--font-family': zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
32
41
  var _a;
33
42
  const selected = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value) === item.value;
34
43
  return (h("div", { "aria-hidden": "true", class: classes([
@@ -81,8 +90,8 @@ export class ZonosShippingRichRadio {
81
90
  "references": {
82
91
  "Color": {
83
92
  "location": "import",
84
- "path": "src/types",
85
- "id": "src/types/index.ts::Color"
93
+ "path": "src/types/styles/Color",
94
+ "id": "src/types/styles/Color.ts::Color"
86
95
  }
87
96
  }
88
97
  },
@@ -104,8 +113,8 @@ export class ZonosShippingRichRadio {
104
113
  "references": {
105
114
  "ElementsUiStyle": {
106
115
  "location": "import",
107
- "path": "src/types",
108
- "id": "src/types/index.ts::ElementsUiStyle"
116
+ "path": "src/types/generated/graphql.customer.types",
117
+ "id": "src/types/generated/graphql.customer.types.ts::ElementsUiStyle"
109
118
  }
110
119
  }
111
120
  },
@@ -127,8 +136,8 @@ export class ZonosShippingRichRadio {
127
136
  "references": {
128
137
  "ElementsUiTheme": {
129
138
  "location": "import",
130
- "path": "src/types",
131
- "id": "src/types/index.ts::ElementsUiTheme"
139
+ "path": "src/types/generated/graphql.customer.types",
140
+ "id": "src/types/generated/graphql.customer.types.ts::ElementsUiTheme"
132
141
  }
133
142
  }
134
143
  },
@@ -140,6 +149,23 @@ export class ZonosShippingRichRadio {
140
149
  },
141
150
  "attribute": "theme",
142
151
  "reflect": false
152
+ },
153
+ "initialSelectedValue": {
154
+ "type": "any",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "string | number",
158
+ "resolved": "number | string | undefined",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": true,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": "Initial selected value"
166
+ },
167
+ "attribute": "initial-selected-value",
168
+ "reflect": false
143
169
  }
144
170
  };
145
171
  }
@@ -1,6 +1,7 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { zonosStoreFontFamily } from "../../store/zonosStore";
3
3
  import { classes } from "../../utils/classes";
4
+ import { isColorVariable } from "../../utils/isColorVariable";
4
5
  import { textOptions, } from "../../../types/styles/Text";
5
6
  export class ZonosText {
6
7
  constructor() {
@@ -22,6 +23,9 @@ export class ZonosText {
22
23
  const textSize = this.size || size || defaultSize;
23
24
  const textWeight = this.weight || weight || defaultWeight;
24
25
  const textTag = tag || defaultTag;
26
+ const actualTextColor = isColorVariable(this.textColor)
27
+ ? `var(--amino-${this.textColor})`
28
+ : this.textColor;
25
29
  const renderText = () => {
26
30
  switch (textTag) {
27
31
  case 'h2':
@@ -41,7 +45,7 @@ export class ZonosText {
41
45
  `zonos--text-size-${textSize}`,
42
46
  `zonos--text-weight-${textWeight}`,
43
47
  ]), style: {
44
- '--color': this.textColor ? `var(--amino-${this.textColor})` : '',
48
+ '--color': actualTextColor,
45
49
  '--font-family': zonosStoreFontFamily(),
46
50
  } }, renderText()));
47
51
  }
@@ -63,8 +67,8 @@ export class ZonosText {
63
67
  "type": "string",
64
68
  "mutable": false,
65
69
  "complexType": {
66
- "original": "Color",
67
- "resolved": "\"blue-100\" | \"blue-200\" | \"blue-300\" | \"blue-400\" | \"blue-500\" | \"blue-600\" | \"blue-700\" | \"blue-800\" | \"blue-900\" | \"blue-1000\" | \"cyan-100\" | \"cyan-200\" | \"cyan-300\" | \"cyan-400\" | \"cyan-500\" | \"cyan-600\" | \"cyan-700\" | \"cyan-800\" | \"cyan-900\" | \"cyan-1000\" | \"green-100\" | \"green-200\" | \"green-300\" | \"green-400\" | \"green-500\" | \"green-600\" | \"green-700\" | \"green-800\" | \"green-900\" | \"green-1000\" | \"orange-100\" | \"orange-200\" | \"orange-300\" | \"orange-400\" | \"orange-500\" | \"orange-600\" | \"orange-700\" | \"orange-800\" | \"orange-900\" | \"orange-1000\" | \"purple-100\" | \"purple-200\" | \"purple-300\" | \"purple-400\" | \"purple-500\" | \"purple-600\" | \"purple-700\" | \"purple-800\" | \"purple-900\" | \"purple-1000\" | \"red-100\" | \"red-200\" | \"red-300\" | \"red-400\" | \"red-500\" | \"red-600\" | \"red-700\" | \"red-800\" | \"red-900\" | \"red-1000\" | \"gray-100\" | \"gray-200\" | \"gray-300\" | \"gray-400\" | \"gray-500\" | \"gray-600\" | \"gray-700\" | \"gray-800\" | \"gray-900\" | \"gray-1000\" | \"glass-100\" | \"glass-200\" | \"glass-300\" | \"glass-400\" | \"glass-500\" | \"glass-600\" | \"glass-700\" | \"glass-800\" | \"glass-900\" | \"glass-1000\" | \"gray-0\" | \"gray-50\" | \"glass-0\" | \"glass-50\" | \"gray-1100\" | \"gray-1200\" | \"glass-1100\" | \"glass-1200\"",
70
+ "original": "Color | (string & { _placeholder?: never })",
71
+ "resolved": "Color | (string & { _placeholder?: undefined; })",
68
72
  "references": {
69
73
  "Color": {
70
74
  "location": "import",
@@ -7,10 +7,10 @@ export class ZonosTooltip {
7
7
  this.showTooltip = false;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '4864150b0af4119fc7d87aec5af3c258fb27802d', class: "zonos--elements" }, h("div", { key: 'c11d3da431f9c4507bc58ec38d0b1ef21c99b584', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '0a92efb2e6c17f67c2feacbd17bbddd4fb63f7da' }), h("div", { key: '0ea54bfaf54a2f170044d77c2b555e5da37af8ae', class: classes([
10
+ return (h(Host, { key: 'a23ad45e8f96b88b0feaf17690c6bdb75aacb12c', class: "zonos--elements" }, h("div", { key: 'b057f5ae304921f5fd50536cb5b7fb493120f1e7', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '396ac2ec3fcc8d49f8a346d1059cb096ef2e2874' }), h("div", { key: '4aa607dcc9c4c675224e9d7effd1e8ad2bdee097', class: classes([
11
11
  this.showTooltip && 'zonos--show-tooltip',
12
12
  'zonos--tooltip-content',
13
- ]) }, h("zonos-text", { key: '73c55a7318eb36760d2779691f9ea79d2c5bf8c7', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '1f4106f67fc468121d7fb7fbc0ee69363bb26186', size: "xs", textColor: "gray-0" }, this.subtitle)))));
13
+ ]) }, h("zonos-text", { key: 'e69a1883f21f277be88e892a99ae6e66a9829a1c', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: 'cb901c3cd7d0931f157eddef8fe4286fbd66b66b', size: "xs", textColor: "gray-0" }, this.subtitle)))));
14
14
  }
15
15
  static get is() { return "zonos-tooltip"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -7,9 +7,9 @@ export class VStack {
7
7
  this.spacing = 24;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: 'a5d1a84d5b25d1a49abec676731eaf76f703e998', style: {
10
+ return (h(Host, { key: '3d9977f4c55f7f1047ec94dcc3a3c40105559c00', style: {
11
11
  '--font-family': zonosStoreFontFamily(),
12
- } }, h("div", { key: '456c8e1865a752dd258989888c45dfbdfd2c4f66', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '2d3260c6b74d3def822acb98733f70a97a79f3fa' }))));
12
+ } }, h("div", { key: 'aa910d4f9a11d3d1a66836aed442726241b73273', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: 'ec50cc05f71018b4b6fef1288f1371ddde030a3a' }))));
13
13
  }
14
14
  static get is() { return "zonos-v-stack"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -10,7 +10,7 @@ export class ZonosComponent {
10
10
  return format(this.first, this.middle, this.last);
11
11
  }
12
12
  render() {
13
- return h("div", { key: '3b7429a0c03b00f0a80e15a94bebd08aedaafe51' }, "Hello, World! I'm ", this.getText());
13
+ return h("div", { key: '9a5547114b58b739fb5d783f551bc345f067779d' }, "Hello, World! I'm ", this.getText());
14
14
  }
15
15
  static get is() { return "zonos-component"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -1,8 +1,8 @@
1
- import { h, Host } from "@stencil/core";
1
+ import { h, Host, } from "@stencil/core";
2
2
  import debounce from "lodash/debounce";
3
3
  import { localizationStore } from "../../store/hello/localization";
4
4
  import { translate } from "../../store/translationStore";
5
- import { zonosStore, } from "../../store/zonosStore";
5
+ import { getZonosStoreTheme, zonosStore, } from "../../store/zonosStore";
6
6
  import { classes } from "../../utils/classes";
7
7
  import { currencyConvert } from "../../utils/hello/currencyConversion/currencyConvert";
8
8
  import { currencyConvertAndFormat } from "../../utils/hello/currencyConversion/currencyConvertAndFormat";
@@ -204,6 +204,8 @@ export class ZonosHello {
204
204
  this.helloRef.setAttribute('data-zonos-hello-loaded', '');
205
205
  this.updateHelloOnPageChange();
206
206
  this.watchPriceChange();
207
+ // update theme to browser preference theme if appearance theme is system
208
+ this.handleAppearanceSettingsOverrideChange();
207
209
  clearInterval(initInterval);
208
210
  }
209
211
  }, 100);
@@ -250,6 +252,13 @@ export class ZonosHello {
250
252
  handleResize() {
251
253
  debounce(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
252
254
  }
255
+ handleAppearanceSettingsOverrideChange() {
256
+ var _a;
257
+ if ((_a = this.appearanceSettingsOverride) === null || _a === void 0 ? void 0 : _a.theme) {
258
+ // update theme to browser preference theme if appearance theme is system
259
+ this.appearanceSettingsOverride.theme = getZonosStoreTheme(this.appearanceSettingsOverride.theme);
260
+ }
261
+ }
253
262
  render() {
254
263
  var _a, _b;
255
264
  const isExcludedUrl = (_a = zonosStore.helloSettings.excludedUrlPatterns) === null || _a === void 0 ? void 0 : _a.some(pattern => new RegExp(pattern).test(window.location.href));
@@ -508,6 +517,12 @@ export class ZonosHello {
508
517
  }
509
518
  };
510
519
  }
520
+ static get watchers() {
521
+ return [{
522
+ "propName": "appearanceSettingsOverride",
523
+ "methodName": "handleAppearanceSettingsOverrideChange"
524
+ }];
525
+ }
511
526
  static get listeners() {
512
527
  return [{
513
528
  "name": "resize",