@zonos/elements 1.3.184 → 1.3.185

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 (343) hide show
  1. package/dist/cjs/{cart-3d0c0f0b.js → cart-f9df3ac8.js} +3209 -10
  2. package/dist/cjs/debounce-3eaa4f7e.js +357 -0
  3. package/dist/cjs/{getBorderRadius-94ef609c.js → getBorderRadius-87f3b69c.js} +1 -1
  4. package/dist/cjs/getGenericSettingsOverride-c0ca32b9.js +104 -0
  5. package/dist/cjs/helpers-5bdbb68c.js +100 -0
  6. package/dist/cjs/{index-2f90486e.js → index-0993f42d.js} +15 -3
  7. package/dist/cjs/index.cjs.js +19 -8
  8. package/dist/cjs/{isDarkColor-ec4a4e7d.js → isDarkColor-d0c67c3d.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/{paypal-9eaa9196.js → paypal-5e73c8f5.js} +3 -3
  11. package/dist/cjs/zonos-address_11.cjs.entry.js +7917 -0
  12. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-button_3.cjs.entry.js +18 -7
  15. package/dist/cjs/zonos-card.cjs.entry.js +3 -3
  16. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +113 -21
  17. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -7
  18. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-controller.cjs.entry.js +225 -7
  21. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
  22. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
  23. package/dist/cjs/zonos-elements.cjs.js +2 -2
  24. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +8 -8
  25. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -9
  26. package/dist/cjs/zonos-hello.cjs.entry.js +7 -358
  27. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  28. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
  29. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  30. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  31. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  32. package/dist/cjs/zonos-stripe-input.cjs.entry.js +31 -12
  33. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
  35. package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
  36. package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
  37. package/dist/cjs/{zonosStore-3812b318.js → zonosStore-adc42868.js} +2 -1
  38. package/dist/collection/collection-manifest.json +4 -0
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +3 -3
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +11 -0
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +22 -0
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -1
  43. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +162 -17
  44. package/dist/collection/components/common/zonos-button/zonos-button.js +14 -3
  45. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +5 -3
  46. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +2 -2
  47. package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +0 -6
  48. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +2 -2
  49. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +2 -3
  50. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +105 -8
  51. package/dist/collection/components/common/zonos-stripe-phone-input/assets/ChevronDownIcon.svg +1 -0
  52. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.css +222 -0
  53. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +481 -0
  54. package/dist/collection/components/common/zonos-stripe-select/assets/ChevronDownIcon.svg +1 -0
  55. package/dist/collection/components/common/zonos-stripe-select/assets/RemoveLineIcon.svg +1 -0
  56. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.css +178 -0
  57. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +455 -0
  58. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  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/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  62. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  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 +4 -4
  65. package/dist/collection/components/main/zonos-controller.js +24 -1
  66. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  67. package/dist/collection/components/store/checkout/stripe.js +24 -7
  68. package/dist/collection/components/store/translationStore/strings.arabic.js +159 -0
  69. package/dist/collection/components/store/translationStore/strings.base.js +161 -0
  70. package/dist/collection/components/store/translationStore/strings.chinese.js +159 -0
  71. package/dist/collection/components/store/translationStore/strings.danish.js +159 -0
  72. package/dist/collection/components/store/translationStore/strings.dutch.js +159 -0
  73. package/dist/collection/components/store/translationStore/strings.french.js +159 -0
  74. package/dist/collection/components/store/translationStore/strings.german.js +159 -0
  75. package/dist/collection/components/store/translationStore/strings.hebrew.js +159 -0
  76. package/dist/collection/components/store/translationStore/strings.indonesian.js +159 -0
  77. package/dist/collection/components/store/translationStore/strings.italian.js +159 -0
  78. package/dist/collection/components/store/translationStore/strings.japanese.js +159 -0
  79. package/dist/collection/components/store/translationStore/strings.korean.js +159 -0
  80. package/dist/collection/components/store/translationStore/strings.norwegian.js +159 -0
  81. package/dist/collection/components/store/translationStore/strings.polish.js +159 -0
  82. package/dist/collection/components/store/translationStore/strings.portuguese.js +159 -0
  83. package/dist/collection/components/store/translationStore/strings.russian.js +159 -0
  84. package/dist/collection/components/store/translationStore/strings.spanish.js +159 -0
  85. package/dist/collection/components/store/translationStore/strings.swedish.js +159 -0
  86. package/dist/collection/components/store/translationStore/strings.turkish.js +159 -0
  87. package/dist/collection/components/store/translationStore/strings.vietnamese.js +159 -0
  88. package/dist/collection/components/store/zonosStore.js +1 -0
  89. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  90. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/assets/RemoveIcon.svg +1 -0
  91. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.css +86 -0
  92. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +192 -0
  93. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +67 -0
  94. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +978 -0
  95. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  96. package/dist/collection/components/utils/api/getGenericSettingsOverride.js +10 -0
  97. package/dist/collection/components/utils/api/getZonosSettings.js +7 -1
  98. package/dist/collection/components/utils/checkout/form/helpers.js +95 -0
  99. package/dist/collection/components/utils/checkout/form/isValidZip.js +18 -0
  100. package/dist/collection/components/utils/iframe/CheckoutAddressService.js +193 -0
  101. package/dist/collection/components/utils/iframe/IframeHelpers.js +86 -0
  102. package/dist/collection/components/utils/mergeAddress.js +5 -0
  103. package/dist/collection/constants/phone-formats.js +658 -0
  104. package/dist/collection/scripts/_getCartInfoById.js +7 -1
  105. package/dist/collection/scripts/_zonosBase.js +7 -0
  106. package/dist/collection/types/CountryFields.js +1 -0
  107. package/dist/collection/types/checkout/form/CustomAddressErrors.js +1 -0
  108. package/dist/collection/types/generated/graphql.frontend.types.js +9 -0
  109. package/dist/collection/types/generated/graphql.internal.types.js +96 -0
  110. package/dist/collection/types/index.js +0 -1
  111. package/dist/esm/{cart-3fb04f1f.js → cart-4725a63b.js} +3209 -10
  112. package/dist/esm/debounce-3cf0793c.js +355 -0
  113. package/dist/esm/{getBorderRadius-ada3ccad.js → getBorderRadius-a9a48f79.js} +1 -1
  114. package/dist/esm/getGenericSettingsOverride-0bc3e118.js +99 -0
  115. package/dist/esm/helpers-2f6955b1.js +97 -0
  116. package/dist/esm/{index-d82f06f2.js → index-a457c60c.js} +15 -3
  117. package/dist/esm/index.js +19 -8
  118. package/dist/esm/{isDarkColor-446fccb7.js → isDarkColor-62cbddb5.js} +1 -1
  119. package/dist/esm/loader.js +3 -3
  120. package/dist/esm/{paypal-1f2e863c.js → paypal-a09943f4.js} +3 -3
  121. package/dist/esm/zonos-address_11.entry.js +7903 -0
  122. package/dist/esm/zonos-badge.entry.js +2 -2
  123. package/dist/esm/zonos-banner.entry.js +2 -2
  124. package/dist/esm/zonos-button_3.entry.js +18 -7
  125. package/dist/esm/zonos-card.entry.js +3 -3
  126. package/dist/esm/zonos-cart-items_13.entry.js +113 -21
  127. package/dist/esm/zonos-checkout.entry.js +9 -7
  128. package/dist/esm/zonos-collapse.entry.js +2 -2
  129. package/dist/esm/zonos-component.entry.js +2 -2
  130. package/dist/esm/zonos-controller.entry.js +225 -7
  131. package/dist/esm/zonos-country-flag.entry.js +5 -5
  132. package/dist/esm/zonos-country-select_4.entry.js +10 -10
  133. package/dist/esm/zonos-elements.js +3 -3
  134. package/dist/esm/zonos-empty-state-payment_4.entry.js +8 -8
  135. package/dist/esm/zonos-hello-dialog.entry.js +9 -9
  136. package/dist/esm/zonos-hello.entry.js +6 -357
  137. package/dist/esm/zonos-input.entry.js +3 -3
  138. package/dist/esm/zonos-language-select_2.entry.js +5 -5
  139. package/dist/esm/zonos-link.entry.js +1 -1
  140. package/dist/esm/zonos-logo.entry.js +2 -2
  141. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  142. package/dist/esm/zonos-stripe-input.entry.js +31 -12
  143. package/dist/esm/zonos-text.entry.js +2 -2
  144. package/dist/esm/zonos-toggle.entry.js +4 -4
  145. package/dist/esm/zonos-tooltip.entry.js +3 -3
  146. package/dist/esm/zonos-v-stack.entry.js +4 -4
  147. package/dist/esm/{zonosStore-d3c5a0a5.js → zonosStore-1ce34e04.js} +2 -1
  148. package/dist/esm-es5/cart-4725a63b.js +1 -0
  149. package/dist/esm-es5/debounce-3cf0793c.js +1 -0
  150. package/dist/esm-es5/{getBorderRadius-ada3ccad.js → getBorderRadius-a9a48f79.js} +1 -1
  151. package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +1 -0
  152. package/dist/esm-es5/helpers-2f6955b1.js +1 -0
  153. package/dist/esm-es5/index-a457c60c.js +2 -0
  154. package/dist/esm-es5/index.js +1 -1
  155. package/dist/esm-es5/{isDarkColor-446fccb7.js → isDarkColor-62cbddb5.js} +1 -1
  156. package/dist/esm-es5/loader.js +1 -1
  157. package/dist/esm-es5/{paypal-1f2e863c.js → paypal-a09943f4.js} +1 -1
  158. package/dist/esm-es5/zonos-address_11.entry.js +1 -0
  159. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  160. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  161. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  162. package/dist/esm-es5/zonos-card.entry.js +1 -1
  163. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  164. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  165. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  166. package/dist/esm-es5/zonos-component.entry.js +1 -1
  167. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  168. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  169. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  170. package/dist/esm-es5/zonos-elements.js +1 -1
  171. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  172. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  173. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  174. package/dist/esm-es5/zonos-input.entry.js +1 -1
  175. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  176. package/dist/esm-es5/zonos-link.entry.js +1 -1
  177. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  178. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  179. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  180. package/dist/esm-es5/zonos-text.entry.js +1 -1
  181. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  182. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  183. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  184. package/dist/esm-es5/{zonosStore-d3c5a0a5.js → zonosStore-1ce34e04.js} +1 -1
  185. package/dist/scripts/index.d.ts +3985 -3371
  186. package/dist/scripts/index.js +1 -1
  187. package/dist/scripts/loadZonos.js +1 -1
  188. package/dist/scripts/zonos.js +1 -1
  189. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +4 -0
  190. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +28 -1
  191. package/dist/types/components/common/zonos-button/zonos-button.d.ts +4 -0
  192. package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
  193. package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +22 -0
  194. package/dist/types/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.d.ts +88 -0
  195. package/dist/types/components/common/zonos-stripe-select/zonos-stripe-select.d.ts +86 -0
  196. package/dist/types/components/main/zonos-controller.d.ts +1 -0
  197. package/dist/types/components/store/checkout/stripe.d.ts +9 -0
  198. package/dist/types/components/store/translationStore/strings.arabic.d.ts +159 -0
  199. package/dist/types/components/store/translationStore/strings.base.d.ts +159 -0
  200. package/dist/types/components/store/translationStore/strings.chinese.d.ts +159 -0
  201. package/dist/types/components/store/translationStore/strings.danish.d.ts +159 -0
  202. package/dist/types/components/store/translationStore/strings.dutch.d.ts +159 -0
  203. package/dist/types/components/store/translationStore/strings.french.d.ts +159 -0
  204. package/dist/types/components/store/translationStore/strings.german.d.ts +159 -0
  205. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +159 -0
  206. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +159 -0
  207. package/dist/types/components/store/translationStore/strings.italian.d.ts +159 -0
  208. package/dist/types/components/store/translationStore/strings.japanese.d.ts +159 -0
  209. package/dist/types/components/store/translationStore/strings.korean.d.ts +159 -0
  210. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +159 -0
  211. package/dist/types/components/store/translationStore/strings.polish.d.ts +159 -0
  212. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +159 -0
  213. package/dist/types/components/store/translationStore/strings.russian.d.ts +159 -0
  214. package/dist/types/components/store/translationStore/strings.spanish.d.ts +159 -0
  215. package/dist/types/components/store/translationStore/strings.swedish.d.ts +159 -0
  216. package/dist/types/components/store/translationStore/strings.turkish.d.ts +159 -0
  217. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +159 -0
  218. package/dist/types/components/store/zonosStore.d.ts +6 -1
  219. package/dist/types/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.d.ts +38 -0
  220. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +150 -0
  221. package/dist/types/components/utils/api/getGenericSettingsOverride.d.ts +5 -0
  222. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  223. package/dist/types/components/utils/api/getZonosSettings.d.ts +2 -2
  224. package/dist/types/components/utils/checkout/form/helpers.d.ts +19 -0
  225. package/dist/types/components/utils/checkout/form/isValidZip.d.ts +5 -0
  226. package/dist/types/components/utils/iframe/CheckoutAddressService.d.ts +38 -0
  227. package/dist/types/components/utils/iframe/IframeHelpers.d.ts +81 -0
  228. package/dist/types/components/utils/mergeAddress.d.ts +4 -0
  229. package/dist/types/components/utils/resetToSelectedTab.d.ts +1 -1
  230. package/dist/types/components.d.ts +472 -4
  231. package/dist/types/constants/phone-formats.d.ts +5 -0
  232. package/dist/types/environment.d.ts +1 -1
  233. package/dist/types/scripts/_zonosBase.d.ts +13 -1
  234. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +1 -0
  235. package/dist/types/types/CountryFields.d.ts +40 -0
  236. package/dist/types/types/checkout/form/CustomAddressErrors.d.ts +13 -0
  237. package/dist/types/types/generated/graphql.frontend.types.d.ts +164 -1
  238. package/dist/types/types/generated/graphql.frontend.types.ts +145 -1
  239. package/dist/types/types/generated/graphql.internal.types.d.ts +127 -0
  240. package/dist/types/types/generated/graphql.internal.types.ts +155 -0
  241. package/dist/types/types/global.d.ts +1 -0
  242. package/dist/types/types/index.d.ts +1 -1
  243. package/dist/types/types/utils/ZonosSettings.d.ts +17 -0
  244. package/dist/zonos-elements/index.esm.js +1 -1
  245. package/dist/zonos-elements/{p-4622cca6.entry.js → p-0104d3ba.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-7cb87ea7.system.entry.js → p-04303b56.system.entry.js} +1 -1
  247. package/dist/zonos-elements/p-06f798ee.system.js +1 -0
  248. package/dist/zonos-elements/{p-739014f8.system.entry.js → p-0fdd7034.system.entry.js} +1 -1
  249. package/dist/zonos-elements/p-15dd7ea4.system.entry.js +1 -0
  250. package/dist/zonos-elements/{p-a1cfbd0a.js → p-17299200.js} +1 -1
  251. package/dist/zonos-elements/{p-58f660d4.system.entry.js → p-1b29bc5f.system.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-fe2c27c4.entry.js → p-1e612c29.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-98aa88b1.js → p-2097fae5.js} +1 -1
  254. package/dist/zonos-elements/{p-81084be5.system.entry.js → p-240ee490.system.entry.js} +1 -1
  255. package/dist/zonos-elements/p-2416aaa1.system.entry.js +1 -0
  256. package/dist/zonos-elements/{p-cedf08f0.entry.js → p-313ef896.entry.js} +1 -1
  257. package/dist/zonos-elements/{p-fa65b53d.entry.js → p-314fbfe1.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-5187ba8f.system.js → p-31e90130.system.js} +1 -1
  259. package/dist/zonos-elements/{p-4ca666ea.system.entry.js → p-341f40c2.system.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-d49c6a3e.system.entry.js → p-35f33601.system.entry.js} +1 -1
  261. package/dist/zonos-elements/p-4160bbc2.system.js +1 -0
  262. package/dist/zonos-elements/p-43633269.system.js +2 -0
  263. package/dist/zonos-elements/p-443b5db2.entry.js +1 -0
  264. package/dist/zonos-elements/p-46d3e378.system.entry.js +1 -0
  265. package/dist/zonos-elements/{p-3d221556.system.entry.js → p-488ad646.system.entry.js} +1 -1
  266. package/dist/zonos-elements/p-53ffdb91.js +1 -0
  267. package/dist/zonos-elements/p-56b56caa.system.entry.js +1 -0
  268. package/dist/zonos-elements/p-5e15616f.entry.js +1 -0
  269. package/dist/zonos-elements/{p-3eac4b10.entry.js → p-5f896e9a.entry.js} +1 -1
  270. package/dist/zonos-elements/{p-e8c70c7d.system.entry.js → p-609c32a3.system.entry.js} +1 -1
  271. package/dist/zonos-elements/p-64ea232c.system.entry.js +1 -0
  272. package/dist/zonos-elements/{p-f378b4d3.system.entry.js → p-678ccc3f.system.entry.js} +1 -1
  273. package/dist/zonos-elements/{p-8048932d.entry.js → p-67b904c2.entry.js} +1 -1
  274. package/dist/zonos-elements/p-6b40da70.system.js +1 -0
  275. package/dist/zonos-elements/p-70d4d436.entry.js +1 -0
  276. package/dist/zonos-elements/{p-64dbc282.entry.js → p-818d6f17.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-b5b9aa6c.entry.js → p-81ee1683.entry.js} +1 -1
  278. package/dist/zonos-elements/{p-236f32c8.system.entry.js → p-89fcd305.system.entry.js} +1 -1
  279. package/dist/zonos-elements/{p-c4fa8524.system.entry.js → p-94a80d93.system.entry.js} +1 -1
  280. package/dist/zonos-elements/p-961620ae.entry.js +1 -0
  281. package/dist/zonos-elements/{p-4eff2f8a.system.entry.js → p-98e4a965.system.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-5bebcfc2.system.js → p-9913c186.system.js} +1 -1
  283. package/dist/zonos-elements/{p-29e8c9e8.system.entry.js → p-991c85f1.system.entry.js} +1 -1
  284. package/dist/zonos-elements/p-995761ea.system.entry.js +1 -0
  285. package/dist/zonos-elements/p-9a6eb099.entry.js +1 -0
  286. package/dist/zonos-elements/p-9a7a9b1c.entry.js +1 -0
  287. package/dist/zonos-elements/{p-d367c9ae.system.entry.js → p-9f7b9d66.system.entry.js} +1 -1
  288. package/dist/zonos-elements/p-a2dab25e.system.entry.js +1 -0
  289. package/dist/zonos-elements/{p-587568b5.entry.js → p-aaff5dcc.entry.js} +1 -1
  290. package/dist/zonos-elements/{p-3731e7f5.entry.js → p-abc66a0b.entry.js} +1 -1
  291. package/dist/zonos-elements/{p-eb294265.entry.js → p-aca3a2bb.entry.js} +1 -1
  292. package/dist/zonos-elements/p-afa34aff.system.js +1 -0
  293. package/dist/zonos-elements/{p-69f84611.entry.js → p-b2241919.entry.js} +1 -1
  294. package/dist/zonos-elements/p-b5edee66.system.js +1 -0
  295. package/dist/zonos-elements/p-b610f70c.system.js +1 -0
  296. package/dist/zonos-elements/{p-69255ed2.system.js → p-bbbaea3a.system.js} +1 -1
  297. package/dist/zonos-elements/p-c137dc82.js +2 -0
  298. package/dist/zonos-elements/{p-be9e1818.system.entry.js → p-c140a0bd.system.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-de221545.entry.js → p-cf6ae7dc.entry.js} +1 -1
  300. package/dist/zonos-elements/{p-90633d63.entry.js → p-d0f4b6c3.entry.js} +1 -1
  301. package/dist/zonos-elements/{p-112aecac.js → p-de462b9b.js} +2 -2
  302. package/dist/zonos-elements/{p-107b08c1.entry.js → p-e5d081d8.entry.js} +1 -1
  303. package/dist/zonos-elements/p-e7b0c156.js +1 -0
  304. package/dist/zonos-elements/{p-30fdcbee.js → p-e892fb29.js} +1 -1
  305. package/dist/zonos-elements/p-e90cb997.entry.js +1 -0
  306. package/dist/zonos-elements/{p-db3f381d.entry.js → p-e91b244c.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-41dfc828.entry.js → p-e99354d5.entry.js} +1 -1
  308. package/dist/zonos-elements/p-ea6d87a1.system.js +1 -0
  309. package/dist/zonos-elements/p-eef5b0cc.js +1 -0
  310. package/dist/zonos-elements/{p-d0944cc8.system.entry.js → p-f3f27bf2.system.entry.js} +1 -1
  311. package/dist/zonos-elements/{p-0e63259c.system.entry.js → p-f4cc688e.system.entry.js} +1 -1
  312. package/dist/zonos-elements/{p-cc6d9f7d.entry.js → p-f7d3e48b.entry.js} +1 -1
  313. package/dist/zonos-elements/p-fa6de0f3.js +1 -0
  314. package/dist/zonos-elements/{p-c5c8f803.system.entry.js → p-fd348fd4.system.entry.js} +1 -1
  315. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  316. package/dist/zonos-elements/zonos-elements.js +1 -1
  317. package/package.json +3 -1
  318. package/dist/cjs/zonos-address_7.cjs.entry.js +0 -772
  319. package/dist/esm/zonos-address_7.entry.js +0 -762
  320. package/dist/esm-es5/cart-3fb04f1f.js +0 -1
  321. package/dist/esm-es5/index-d82f06f2.js +0 -2
  322. package/dist/esm-es5/zonos-address_7.entry.js +0 -1
  323. package/dist/zonos-elements/p-09041efe.entry.js +0 -1
  324. package/dist/zonos-elements/p-16e4cdb1.entry.js +0 -1
  325. package/dist/zonos-elements/p-43feb95e.entry.js +0 -1
  326. package/dist/zonos-elements/p-46f6e5e9.system.js +0 -1
  327. package/dist/zonos-elements/p-4caffd96.system.js +0 -2
  328. package/dist/zonos-elements/p-642bf613.system.entry.js +0 -1
  329. package/dist/zonos-elements/p-6c0c8722.system.entry.js +0 -1
  330. package/dist/zonos-elements/p-7decb19b.entry.js +0 -1
  331. package/dist/zonos-elements/p-829f6a40.entry.js +0 -1
  332. package/dist/zonos-elements/p-8f640b28.entry.js +0 -1
  333. package/dist/zonos-elements/p-a69dbe14.js +0 -1
  334. package/dist/zonos-elements/p-ab68ad11.js +0 -2
  335. package/dist/zonos-elements/p-b1020237.system.js +0 -1
  336. package/dist/zonos-elements/p-bc0f885e.system.entry.js +0 -1
  337. package/dist/zonos-elements/p-c6d96a42.system.js +0 -1
  338. package/dist/zonos-elements/p-ce853f8f.system.entry.js +0 -1
  339. package/dist/zonos-elements/p-d5d39db4.system.entry.js +0 -1
  340. package/dist/zonos-elements/p-e4f8114a.system.js +0 -1
  341. package/dist/zonos-elements/p-e99e75dd.system.entry.js +0 -1
  342. package/dist/zonos-elements/p-f66a5c7c.system.entry.js +0 -1
  343. package/dist/zonos-elements/p-febb90e0.entry.js +0 -1
@@ -14,12 +14,30 @@ export const stringsVietnamese = {
14
14
  Address: {
15
15
  value: 'Địa chỉ',
16
16
  },
17
+ 'Address 2': {
18
+ value: 'Địa chỉ 2',
19
+ },
17
20
  'Address line 1': {
18
21
  value: 'Dòng địa chỉ 1',
19
22
  },
20
23
  'Address line 2': {
21
24
  value: 'Dòng địa chỉ 2',
22
25
  },
26
+ 'Address line 3': {
27
+ value: 'Dòng địa chỉ 3',
28
+ },
29
+ Address1: {
30
+ value: 'Address1',
31
+ },
32
+ Address2: {
33
+ value: 'Địa chỉ2',
34
+ },
35
+ Address3: {
36
+ value: 'Address3',
37
+ },
38
+ 'Adresa vulytsi': {
39
+ value: 'Địa chỉ đường phố',
40
+ },
23
41
  'An unexpected error occurred when processing PayPal order.': {
24
42
  value: 'Đã xảy ra lỗi bất ngờ khi xử lý đơn hàng PayPal.',
25
43
  },
@@ -29,6 +47,9 @@ export const stringsVietnamese = {
29
47
  'Are you sure?': {
30
48
  value: 'Bạn có chắc không?',
31
49
  },
50
+ Area: {
51
+ value: 'Khu vực',
52
+ },
32
53
  Back: {
33
54
  value: 'Quay lại',
34
55
  },
@@ -41,6 +62,9 @@ export const stringsVietnamese = {
41
62
  'By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level.': {
42
63
  value: 'Bằng cách thanh toán bằng USD, thẻ của bạn sẽ bị tính phí trực tiếp mà không cần chuyển đổi tiền tệ. Tuy nhiên, sử dụng thẻ không dựa trên USD có thể dẫn đến phí chuyển đổi tiền tệ bổ sung ở cấp ngân hàng.',
43
64
  },
65
+ CEDEX: {
66
+ value: 'CEDEX',
67
+ },
44
68
  'CPF/CNPJ number': {
45
69
  value: 'Số CPF/CNPJ',
46
70
  },
@@ -56,6 +80,9 @@ export const stringsVietnamese = {
56
80
  City: {
57
81
  value: 'Thành phố',
58
82
  },
83
+ 'City/Town': {
84
+ value: 'Thành phố/Thị trấn',
85
+ },
59
86
  'Click to copy the card number. Use any future expiration date and three number CVC.': {
60
87
  value: 'Nhấp để sao chép số thẻ. Sử dụng bất kỳ ngày hết hạn nào trong tương lai và CVC ba chữ số.',
61
88
  },
@@ -65,6 +92,12 @@ export const stringsVietnamese = {
65
92
  Close: {
66
93
  value: 'Đóng',
67
94
  },
95
+ 'Code postal': {
96
+ value: 'Mã bưu điện',
97
+ },
98
+ Commune: {
99
+ value: 'Công xã',
100
+ },
68
101
  'Company name (optional)': {
69
102
  value: 'Tên công ty (tùy chọn)',
70
103
  },
@@ -80,6 +113,12 @@ export const stringsVietnamese = {
80
113
  Country: {
81
114
  value: 'Quốc gia',
82
115
  },
116
+ County: {
117
+ value: 'Hạt',
118
+ },
119
+ 'County or sector': {
120
+ value: 'Huyện hoặc khu vực',
121
+ },
83
122
  Customer: {
84
123
  value: 'Khách hàng',
85
124
  },
@@ -92,9 +131,21 @@ export const stringsVietnamese = {
92
131
  'Delivery options': {
93
132
  value: 'Tùy chọn giao hàng',
94
133
  },
134
+ Department: {
135
+ value: 'Phòng ban',
136
+ },
137
+ Derzhava: {
138
+ value: 'Derzhava',
139
+ },
95
140
  Discounts: {
96
141
  value: 'Giảm giá',
97
142
  },
143
+ District: {
144
+ value: 'Quận',
145
+ },
146
+ 'Do/Si': {
147
+ value: 'Do/Si',
148
+ },
98
149
  "Don't close": {
99
150
  value: 'Đừng đóng',
100
151
  },
@@ -119,6 +170,9 @@ export const stringsVietnamese = {
119
170
  Email: {
120
171
  value: 'Email',
121
172
  },
173
+ Emirate: {
174
+ value: 'Tiểu vương quốc',
175
+ },
122
176
  'Error creating Checkout': {
123
177
  value: 'Lỗi khi tạo phiên thanh toán',
124
178
  },
@@ -143,6 +197,9 @@ export const stringsVietnamese = {
143
197
  'Go to payment': {
144
198
  value: 'Đi đến thanh toán',
145
199
  },
200
+ Gorod: {
201
+ value: 'Gorod',
202
+ },
146
203
  Guaranteed: {
147
204
  value: 'Đảm bảo',
148
205
  },
@@ -152,12 +209,18 @@ export const stringsVietnamese = {
152
209
  'Hide non-prepaid options': {
153
210
  value: 'Ẩn các tùy chọn chưa trả trước',
154
211
  },
212
+ Indeks: {
213
+ value: 'Chỉ số',
214
+ },
155
215
  'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
156
216
  value: 'Định dạng RFC không hợp lệ. Phải chỉ có 12–13 chữ cái viết hoa và số.',
157
217
  },
158
218
  'Invalid promo code': {
159
219
  value: 'Mã khuyến mãi không hợp lệ',
160
220
  },
221
+ Island: {
222
+ value: 'Đảo',
223
+ },
161
224
  'It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
162
225
  value: 'Có vẻ như bạn đã đặt hàng gần đây ([date] lúc [time]) với số đơn hàng #[orderNumber]. Kiểm tra email của bạn để xác nhận đơn hàng. Bạn có chắc chắn muốn đặt hàng khác không?',
163
226
  },
@@ -170,15 +233,27 @@ export const stringsVietnamese = {
170
233
  'Know about duties and taxes before you buy. Shop with confidence!': {
171
234
  value: 'Tìm hiểu về thuế và phí trước khi mua hàng. Mua sắm với sự tự tin!',
172
235
  },
236
+ Kodepos: {
237
+ value: 'Mã bưu điện',
238
+ },
173
239
  'Last name': {
174
240
  value: 'Họ',
175
241
  },
176
242
  'Learn more.': {
177
243
  value: 'Tìm hiểu thêm.',
178
244
  },
245
+ Locality: {
246
+ value: 'Địa phương',
247
+ },
179
248
  'Missing required fields. Make sure all fields are completed.': {
180
249
  value: 'Thiếu trường bắt buộc. Đảm bảo tất cả các trường đã được hoàn thành.',
181
250
  },
251
+ Misto: {
252
+ value: 'Hỗn hợp',
253
+ },
254
+ Municipality: {
255
+ value: 'Thành phố',
256
+ },
182
257
  Name: {
183
258
  value: 'Tên',
184
259
  },
@@ -209,6 +284,9 @@ export const stringsVietnamese = {
209
284
  OK: {
210
285
  value: 'OK',
211
286
  },
287
+ Oblast: {
288
+ value: 'Tỉnh',
289
+ },
212
290
  'Order complete!': {
213
291
  value: 'Đơn hàng đã hoàn thành!',
214
292
  },
@@ -218,6 +296,9 @@ export const stringsVietnamese = {
218
296
  'Orders to [countryName] must be over [threshold] to ship.': {
219
297
  value: 'Đơn hàng đến [countryName] phải trên [threshold] mới được gửi.',
220
298
  },
299
+ Parish: {
300
+ value: 'Giáo xứ',
301
+ },
221
302
  'Pay [orderTotal]': {
222
303
  value: 'Thanh toán [orderTotal]',
223
304
  },
@@ -257,12 +338,30 @@ export const stringsVietnamese = {
257
338
  'Please enter a valid email address.': {
258
339
  value: 'Vui lòng nhập địa chỉ email hợp lệ.',
259
340
  },
341
+ 'Please provide a mobile phone number.': {
342
+ value: 'Vui lòng cung cấp số điện thoại di động.',
343
+ },
344
+ 'Please provide your first name.': {
345
+ value: 'Vui lòng cung cấp tên của bạn.',
346
+ },
347
+ 'Please provide your last name.': {
348
+ value: 'Vui lòng cung cấp họ của bạn.',
349
+ },
350
+ 'Poshtovyy indeks': {
351
+ value: 'Mã bưu điện',
352
+ },
260
353
  'Postal code': {
261
354
  value: 'Mã bưu điện',
262
355
  },
356
+ Postcode: {
357
+ value: 'Mã bưu điện',
358
+ },
263
359
  'Powered by': {
264
360
  value: 'Nền tảng cung cấp bởi',
265
361
  },
362
+ Prefecture: {
363
+ value: 'Tỉnh',
364
+ },
266
365
  'Prepay duties and taxes at checkout': {
267
366
  value: 'Thanh toán trước thuế và phí khi thanh toán',
268
367
  },
@@ -290,12 +389,18 @@ export const stringsVietnamese = {
290
389
  'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
291
390
  value: 'Giá sản phẩm đã bao gồm thuế. Không có thuế bổ sung sẽ được thêm vào khi thanh toán, ngoại trừ một số trường hợp hiếm hoi.',
292
391
  },
392
+ Province: {
393
+ value: 'Tỉnh',
394
+ },
293
395
  Quantity: {
294
396
  value: 'Số lượng',
295
397
  },
296
398
  'RFC number': {
297
399
  value: 'Số RFC',
298
400
  },
401
+ Region: {
402
+ value: 'Khu vực',
403
+ },
299
404
  Reload: {
300
405
  value: 'Tải lại',
301
406
  },
@@ -314,9 +419,15 @@ export const stringsVietnamese = {
314
419
  'Search countries': {
315
420
  value: 'Tìm kiếm quốc gia',
316
421
  },
422
+ Sector: {
423
+ value: 'Khu vực',
424
+ },
317
425
  'See duty and tax thresholds': {
318
426
  value: 'Xem ngưỡng thuế nhập khẩu và thuế',
319
427
  },
428
+ Select: {
429
+ value: 'Chọn',
430
+ },
320
431
  'Select a country': {
321
432
  value: 'Chọn một quốc gia',
322
433
  },
@@ -359,9 +470,27 @@ export const stringsVietnamese = {
359
470
  State: {
360
471
  value: 'Bang',
361
472
  },
473
+ 'State or Territory': {
474
+ value: 'Bang hoặc Lãnh thổ',
475
+ },
476
+ 'State or province': {
477
+ value: 'Bang hoặc tỉnh',
478
+ },
362
479
  'State/Province': {
363
480
  value: 'Bang/Tỉnh',
364
481
  },
482
+ 'Street address': {
483
+ value: 'Địa chỉ đường phố',
484
+ },
485
+ 'Street address 2': {
486
+ value: 'Địa chỉ đường phố 2',
487
+ },
488
+ 'Street address 3': {
489
+ value: 'Địa chỉ đường phố 3',
490
+ },
491
+ 'Street or avenue': {
492
+ value: 'Đường phố hoặc đại lộ',
493
+ },
365
494
  Success: {
366
495
  value: 'Thành công',
367
496
  },
@@ -380,6 +509,9 @@ export const stringsVietnamese = {
380
509
  'Test mode': {
381
510
  value: 'Chế độ kiểm tra',
382
511
  },
512
+ 'The field is incomplete': {
513
+ value: 'Trường chưa hoàn thành',
514
+ },
383
515
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
384
516
  value: 'Các mặt hàng sau không thể được vận chuyển đến quốc gia của bạn và không được tính vào tổng số giỏ hàng của bạn.',
385
517
  },
@@ -398,9 +530,21 @@ export const stringsVietnamese = {
398
530
  'To ensure delivery all address details must be in Latin characters.': {
399
531
  value: 'Để đảm bảo giao hàng, tất cả chi tiết địa chỉ phải bằng ký tự Latinh.',
400
532
  },
533
+ Town: {
534
+ value: 'Thị trấn',
535
+ },
536
+ 'Town / City': {
537
+ value: 'Thị trấn / Thành phố',
538
+ },
539
+ 'Town or city': {
540
+ value: 'Thị trấn hoặc thành phố',
541
+ },
401
542
  'Translated address': {
402
543
  value: 'Địa chỉ đã dịch',
403
544
  },
545
+ Ulica: {
546
+ value: 'Đường phố',
547
+ },
404
548
  'Unable to check inventory. Please try again.': {
405
549
  value: 'Không thể kiểm tra hàng tồn kho. Vui lòng thử lại.',
406
550
  },
@@ -419,6 +563,9 @@ export const stringsVietnamese = {
419
563
  'Update your address': {
420
564
  value: 'Cập nhật địa chỉ của bạn',
421
565
  },
566
+ Village: {
567
+ value: 'Làng',
568
+ },
422
569
  "We couldn't complete your payment. Please verify the payment details and try again.": {
423
570
  value: 'Chúng tôi không thể hoàn tất thanh toán của bạn. Vui lòng xác minh thông tin thanh toán và thử lại.',
424
571
  },
@@ -449,9 +596,15 @@ export const stringsVietnamese = {
449
596
  "You're all set!": {
450
597
  value: 'Bạn đã sẵn sàng!',
451
598
  },
599
+ 'Your [zipLabel] is invalid': {
600
+ value: '[zipLabel] của bạn không hợp lệ',
601
+ },
452
602
  'Your checkout session has expired. Please reload the page to continue.': {
453
603
  value: 'Phiên thanh toán của bạn đã hết hạn. Vui lòng tải lại trang để tiếp tục.',
454
604
  },
605
+ 'Your mobile phone number is incomplete.': {
606
+ value: 'Số điện thoại di động của bạn chưa đầy đủ.',
607
+ },
455
608
  'Your order has been successfully placed.': {
456
609
  value: 'Đơn hàng của bạn đã được đặt thành công.',
457
610
  },
@@ -461,6 +614,12 @@ export const stringsVietnamese = {
461
614
  'Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.': {
462
615
  value: 'Phương thức thanh toán bạn chọn yêu cầu xác minh bổ sung. Vui lòng làm theo hướng dẫn của nhà cung cấp thanh toán của bạn để hoàn tất giao dịch.',
463
616
  },
617
+ 'ZIP code': {
618
+ value: 'Mã bưu điện',
619
+ },
620
+ Zip: {
621
+ value: 'Mã bưu điện',
622
+ },
464
623
  '[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
465
624
  value: '[percentage] GST phải trả cho bất kỳ đơn hàng nào trên [threshold], cùng với phí giao dịch nhập khẩu và thuế MPI.',
466
625
  },
@@ -9,6 +9,7 @@ const { dispose: zonosStoreDispose, reset, state: zonosStore, } = createStore(()
9
9
  theme: 'LIGHT',
10
10
  zonosAttribution: 'DISABLED',
11
11
  },
12
+ checkoutAddressService: null,
12
13
  checkoutSettings: {
13
14
  allowedCharacterSets: 'ALL',
14
15
  allowedSettlementCurrencies: 'LOCAL',
@@ -219,7 +219,7 @@ export class ZonosAddress {
219
219
  this.isAddressFilled = true;
220
220
  }
221
221
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
222
- return (h(Host, { key: 'f31fc745e5c024dd2b594a26a0a81ebe3a5f8060', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '7b51df49edb4d7abbff9733b1e220771caca7f12', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), h("div", { key: '781cd2076d8319979bb5ed2ea3bb24dfa97f7010', class: "zonos--address-component" })));
222
+ return (h(Host, { key: '89bb6f1ba14507b1e40ae8fff9a01050c3ac4686', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'd93eb2a0fd3b7aeadfd9c8cdf9190d769042533a', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), h("div", { key: '3d72d447b9ae884c1ec7b6f412a1cad0e78c989c', class: "zonos--address-component" })));
223
223
  }
224
224
  static get is() { return "zonos-address"; }
225
225
  static get encapsulation() { return "scoped"; }
@@ -0,0 +1 @@
1
+ <svg color="var(--zonos-elements-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--zonos-elements-gray-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>
@@ -0,0 +1,86 @@
1
+ :host {
2
+ font-family: var(--zonos--font-family, Inter), Inter;
3
+ display: block;
4
+ white-space: normal;
5
+ }
6
+ :host * {
7
+ font-family: var(--zonos--font-family, Inter), Inter;
8
+ }
9
+ :host img {
10
+ max-width: 100%;
11
+ }
12
+ :host dl,
13
+ :host dd,
14
+ :host h1,
15
+ :host h2,
16
+ :host h3,
17
+ :host h4,
18
+ :host h5,
19
+ :host h6,
20
+ :host hr,
21
+ :host figure,
22
+ :host p,
23
+ :host pre {
24
+ margin: 0;
25
+ }
26
+
27
+ /* All sets of variable are here */
28
+ /* smooth font rendering */
29
+ :host {
30
+ -moz-osx-font-smoothing: grayscale;
31
+ -webkit-font-smoothing: antialiased;
32
+ }
33
+
34
+ :host {
35
+ position: relative;
36
+ }
37
+ :host .wrapper {
38
+ position: absolute;
39
+ margin-top: 4px;
40
+ top: 100%;
41
+ left: 0;
42
+ right: 0;
43
+ z-index: 3;
44
+ max-height: 300px;
45
+ overflow-y: auto;
46
+ border-radius: var(--zonos--border-radius, var(--zonos-elements-radius-10));
47
+ box-shadow: var(--zonos-elements-shadow-select-active);
48
+ display: flex;
49
+ flex-direction: column;
50
+ list-style: none;
51
+ padding: 0;
52
+ background-color: var(--zonos-elements-surface-color);
53
+ }
54
+ :host .wrapper .option {
55
+ padding: 8px;
56
+ background-color: var(--zonos-elements-surface-color);
57
+ outline: none;
58
+ border: none;
59
+ text-align: left;
60
+ }
61
+ :host .wrapper .option.last-hovered {
62
+ background-color: var(--zonos-elements-gray-100);
63
+ }
64
+ :host .wrapper .option .highlight {
65
+ font-weight: 600;
66
+ color: var(--zonos-elements-gray-1000);
67
+ }
68
+ :host .wrapper > .powered-by {
69
+ padding: 8px;
70
+ display: flex;
71
+ flex-direction: row;
72
+ align-items: center;
73
+ }
74
+ :host .wrapper > .powered-by .powered-by-container {
75
+ display: flex;
76
+ flex-direction: row;
77
+ align-items: center;
78
+ gap: 5px;
79
+ flex: 1;
80
+ }
81
+ :host .wrapper > .suggestion {
82
+ cursor: pointer;
83
+ }
84
+ :host .wrapper > .suggestion:hover {
85
+ background-color: var(--zonos-elements-gray-100);
86
+ }
@@ -0,0 +1,192 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { h, Host, } from "@stencil/core";
3
+ import { classes } from "../../../utils/classes";
4
+ import { getBorderRadius } from "../../../utils/getBorderRadius";
5
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
6
+ import RemoveIcon from "./assets/RemoveIcon.svg";
7
+ /**
8
+ * This component is a wrapper for the stripe authentication element that would render default style object
9
+ */
10
+ export class ZonosAddressSuggestions {
11
+ constructor() {
12
+ /**
13
+ * Handle clicks outside of the suggestions component
14
+ */
15
+ this.handleClickOutside = (event) => {
16
+ if (!this.el.contains(event.target)) {
17
+ this.localSuggestions = [];
18
+ }
19
+ };
20
+ this.type = undefined;
21
+ this.suggestions = [];
22
+ this.selectedSuggestionId = null;
23
+ this.localSuggestions = [];
24
+ this.lastHoveredSuggestionId = null;
25
+ }
26
+ suggestionsChanged() {
27
+ var _a, _b;
28
+ this.localSuggestions = this.suggestions;
29
+ // set last hovered suggestion id to the first suggestion id
30
+ this.lastHoveredSuggestionId = (_b = (_a = this.suggestions[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;
31
+ }
32
+ componentDidLoad() {
33
+ document.addEventListener('click', this.handleClickOutside);
34
+ }
35
+ disconnectedCallback() {
36
+ document.removeEventListener('click', this.handleClickOutside);
37
+ }
38
+ /**
39
+ * Split text into segments based on matches array for highlighting
40
+ */
41
+ getHighlightedText(text, matches) {
42
+ if (!(matches === null || matches === void 0 ? void 0 : matches.length))
43
+ return [{ isMatch: false, text }];
44
+ const segments = [];
45
+ let lastIndex = 0;
46
+ // Sort matches by startOffset to process in order
47
+ const sortedMatches = [...matches].sort((a, b) => a.startOffset - b.startOffset);
48
+ sortedMatches.forEach(match => {
49
+ // Add non-matching segment before match if exists
50
+ if (match.startOffset > lastIndex) {
51
+ segments.push({
52
+ isMatch: false,
53
+ text: text.slice(lastIndex, match.startOffset),
54
+ });
55
+ }
56
+ // Add matching segment
57
+ segments.push({
58
+ isMatch: true,
59
+ text: text.slice(match.startOffset, match.endOffset),
60
+ });
61
+ lastIndex = match.endOffset;
62
+ });
63
+ // Add remaining non-matching text if exists
64
+ if (lastIndex < text.length) {
65
+ segments.push({
66
+ isMatch: false,
67
+ text: text.slice(lastIndex),
68
+ });
69
+ }
70
+ return segments;
71
+ }
72
+ render() {
73
+ return (h(Host, { key: '88eff73526172a10854d2ae18b5b54afd3fd4b28', class: "zonos--address-suggestions", role: "group", style: {
74
+ '--zonos--border-radius': getBorderRadius(),
75
+ } }, h("ul", { key: 'f55c95ab39906d2bcb6edc6d5379ec6c70f5277a', "aria-label": "Suggestions", class: "wrapper", role: "listbox" }, !!this.localSuggestions.length && (h("li", { key: 'b7ca181e48f18ac7c0d2c8cfc1b05fec6df5827f', "aria-selected": false, class: "powered-by option", role: "option" }, h("div", { key: '07577044166b2cbfbec0cf96786266d74dd1c098', class: "powered-by-container" }, h("zonos-text", { key: '3780f4763666ac08cfe7083749b5f781b74e4e66', type: "caption" }, "Suggestions powered by"), h("zonos-text", { key: '73c5d1db8a235cae3ebc2af0eba89d91ade8a6a1', type: "semiBoldLabel" }, "Google")), h("zonos-button", { key: '6d6058329ced6bae0f04ce4e80da07506f706847', "aria-label": "Clear suggestions", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => {
76
+ this.localSuggestions = [];
77
+ } }))), this.localSuggestions.map(suggestion => (
78
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events
79
+ h("li", { "aria-selected": this.selectedSuggestionId === suggestion.id, class: classes([
80
+ 'suggestion',
81
+ 'option',
82
+ this.lastHoveredSuggestionId === suggestion.id &&
83
+ 'last-hovered',
84
+ ]), key: suggestion.id, onClick: () => {
85
+ this.selectedSuggestionId = suggestion.id;
86
+ this.suggestionSelected.emit({
87
+ placeId: suggestion.id,
88
+ type: this.type,
89
+ });
90
+ }, onMouseEnter: () => {
91
+ this.lastHoveredSuggestionId = suggestion.id;
92
+ }, role: "option", tabIndex: 0 }, h("zonos-text", null, this.getHighlightedText(suggestion.place, suggestion.matches).map((segment, index) => (h("span", { class: segment.isMatch ? 'highlight' : undefined, key: `${index}-${segment.text}` }, segment.text))))))))));
93
+ }
94
+ static get is() { return "zonos-address-suggestions"; }
95
+ static get encapsulation() { return "shadow"; }
96
+ static get originalStyleUrls() {
97
+ return {
98
+ "$": ["zonos-address-suggestions.scss"]
99
+ };
100
+ }
101
+ static get styleUrls() {
102
+ return {
103
+ "$": ["zonos-address-suggestions.css"]
104
+ };
105
+ }
106
+ static get assetsDirs() { return ["assets"]; }
107
+ static get properties() {
108
+ return {
109
+ "type": {
110
+ "type": "string",
111
+ "mutable": false,
112
+ "complexType": {
113
+ "original": "'billing' | 'shipping'",
114
+ "resolved": "\"billing\" | \"shipping\"",
115
+ "references": {}
116
+ },
117
+ "required": true,
118
+ "optional": false,
119
+ "docs": {
120
+ "tags": [],
121
+ "text": "Type of the address suggestions"
122
+ },
123
+ "getter": false,
124
+ "setter": false,
125
+ "attribute": "type",
126
+ "reflect": false
127
+ },
128
+ "suggestions": {
129
+ "type": "unknown",
130
+ "mutable": false,
131
+ "complexType": {
132
+ "original": "IframeSuggestionsResponsePayload['suggestions']",
133
+ "resolved": "{ id: string; matches: { endOffset: number; startOffset: number; }[]; place: string; }[]",
134
+ "references": {
135
+ "IframeSuggestionsResponsePayload": {
136
+ "location": "import",
137
+ "path": "src/components/utils/iframe/IframeHelpers",
138
+ "id": "src/components/utils/iframe/IframeHelpers.ts::IframeSuggestionsResponsePayload"
139
+ }
140
+ }
141
+ },
142
+ "required": false,
143
+ "optional": false,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": "Suggestions to display"
147
+ },
148
+ "getter": false,
149
+ "setter": false,
150
+ "defaultValue": "[]"
151
+ }
152
+ };
153
+ }
154
+ static get states() {
155
+ return {
156
+ "selectedSuggestionId": {},
157
+ "localSuggestions": {},
158
+ "lastHoveredSuggestionId": {}
159
+ };
160
+ }
161
+ static get events() {
162
+ return [{
163
+ "method": "suggestionSelected",
164
+ "name": "suggestionSelected",
165
+ "bubbles": true,
166
+ "cancelable": true,
167
+ "composed": true,
168
+ "docs": {
169
+ "tags": [],
170
+ "text": "Event emitted when a suggestion is selected"
171
+ },
172
+ "complexType": {
173
+ "original": "EventPayloadMap['placeSelected']",
174
+ "resolved": "{ placeId: string; type: \"billing\" | \"shipping\"; }",
175
+ "references": {
176
+ "EventPayloadMap": {
177
+ "location": "import",
178
+ "path": "src/components/utils/iframe/IframeHelpers",
179
+ "id": "src/components/utils/iframe/IframeHelpers.ts::EventPayloadMap"
180
+ }
181
+ }
182
+ }
183
+ }];
184
+ }
185
+ static get elementRef() { return "el"; }
186
+ static get watchers() {
187
+ return [{
188
+ "propName": "suggestions",
189
+ "methodName": "suggestionsChanged"
190
+ }];
191
+ }
192
+ }