@zonos/elements 1.3.184 → 1.3.186

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 +7919 -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 +980 -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 +7905 -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-0bf6e163.system.entry.js +1 -0
  249. package/dist/zonos-elements/p-0c676de4.entry.js +1 -0
  250. package/dist/zonos-elements/{p-739014f8.system.entry.js → p-0fdd7034.system.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-a1cfbd0a.js → p-17299200.js} +1 -1
  252. package/dist/zonos-elements/p-175e242e.entry.js +1 -0
  253. package/dist/zonos-elements/{p-58f660d4.system.entry.js → p-1b29bc5f.system.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-fe2c27c4.entry.js → p-1e612c29.entry.js} +1 -1
  255. package/dist/zonos-elements/{p-98aa88b1.js → p-2097fae5.js} +1 -1
  256. package/dist/zonos-elements/{p-81084be5.system.entry.js → p-240ee490.system.entry.js} +1 -1
  257. package/dist/zonos-elements/p-2416aaa1.system.entry.js +1 -0
  258. package/dist/zonos-elements/{p-cedf08f0.entry.js → p-313ef896.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-fa65b53d.entry.js → p-314fbfe1.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-5187ba8f.system.js → p-31e90130.system.js} +1 -1
  261. package/dist/zonos-elements/{p-4ca666ea.system.entry.js → p-341f40c2.system.entry.js} +1 -1
  262. package/dist/zonos-elements/{p-d49c6a3e.system.entry.js → p-35f33601.system.entry.js} +1 -1
  263. package/dist/zonos-elements/p-4160bbc2.system.js +1 -0
  264. package/dist/zonos-elements/p-43633269.system.js +2 -0
  265. package/dist/zonos-elements/p-443b5db2.entry.js +1 -0
  266. package/dist/zonos-elements/p-46d3e378.system.entry.js +1 -0
  267. package/dist/zonos-elements/{p-3d221556.system.entry.js → p-488ad646.system.entry.js} +1 -1
  268. package/dist/zonos-elements/p-53ffdb91.js +1 -0
  269. package/dist/zonos-elements/p-56b56caa.system.entry.js +1 -0
  270. package/dist/zonos-elements/{p-3eac4b10.entry.js → p-5f896e9a.entry.js} +1 -1
  271. package/dist/zonos-elements/{p-e8c70c7d.system.entry.js → p-609c32a3.system.entry.js} +1 -1
  272. package/dist/zonos-elements/p-64ea232c.system.entry.js +1 -0
  273. package/dist/zonos-elements/{p-f378b4d3.system.entry.js → p-678ccc3f.system.entry.js} +1 -1
  274. package/dist/zonos-elements/{p-8048932d.entry.js → p-67b904c2.entry.js} +1 -1
  275. package/dist/zonos-elements/p-6b40da70.system.js +1 -0
  276. package/dist/zonos-elements/p-6fd6af48.system.entry.js +1 -0
  277. package/dist/zonos-elements/p-70d4d436.entry.js +1 -0
  278. package/dist/zonos-elements/{p-64dbc282.entry.js → p-818d6f17.entry.js} +1 -1
  279. package/dist/zonos-elements/{p-b5b9aa6c.entry.js → p-81ee1683.entry.js} +1 -1
  280. package/dist/zonos-elements/{p-236f32c8.system.entry.js → p-89fcd305.system.entry.js} +1 -1
  281. package/dist/zonos-elements/{p-c4fa8524.system.entry.js → p-94a80d93.system.entry.js} +1 -1
  282. package/dist/zonos-elements/p-961620ae.entry.js +1 -0
  283. package/dist/zonos-elements/{p-4eff2f8a.system.entry.js → p-98e4a965.system.entry.js} +1 -1
  284. package/dist/zonos-elements/{p-5bebcfc2.system.js → p-9913c186.system.js} +1 -1
  285. package/dist/zonos-elements/{p-29e8c9e8.system.entry.js → p-991c85f1.system.entry.js} +1 -1
  286. package/dist/zonos-elements/p-995761ea.system.entry.js +1 -0
  287. package/dist/zonos-elements/p-9a7a9b1c.entry.js +1 -0
  288. package/dist/zonos-elements/{p-d367c9ae.system.entry.js → p-9f7b9d66.system.entry.js} +1 -1
  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-69f84611.entry.js → p-b2241919.entry.js} +1 -1
  293. package/dist/zonos-elements/p-b5edee66.system.js +1 -0
  294. package/dist/zonos-elements/p-b610f70c.system.js +1 -0
  295. package/dist/zonos-elements/{p-69255ed2.system.js → p-bbbaea3a.system.js} +1 -1
  296. package/dist/zonos-elements/p-c04b3f14.system.js +1 -0
  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
@@ -0,0 +1,481 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ import { AsYouType, isPossibleNumber, parsePhoneNumberFromString as parsePhoneNumber, } from "libphonenumber-js";
3
+ import { translate } from "../../store/translationStore";
4
+ import { zonosStore, zonosStoreFontFamily, } from "../../store/zonosStore";
5
+ import { inheritAriaAttributes, inheritAttributes, } from "../../utils/checkout/form/helpers";
6
+ import { classes } from "../../utils/classes";
7
+ import { getBorderRadius } from "../../utils/getBorderRadius";
8
+ import { isDarkColor } from "../../utils/isDarkColor";
9
+ // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
10
+ import ChevronDownIcon from "./assets/ChevronDownIcon.svg";
11
+ let inputId = 0;
12
+ export class ZonosStripePhoneInput {
13
+ constructor() {
14
+ this.inputId = `zonos--phone-input-${++inputId}`;
15
+ /**
16
+ * Inherited attributes from the host element
17
+ */
18
+ this.inheritedAttributes = {};
19
+ this.handleCountryChange = (event) => {
20
+ var _a;
21
+ const select = event.target;
22
+ const country = (_a = this.countryOptions) === null || _a === void 0 ? void 0 : _a[select.value];
23
+ this.selectedCountry = country;
24
+ // Update the phone formatter to use the new country code
25
+ this.updatePhoneFormatter();
26
+ const { isEmpty, valid, wrongFormat } = this.validatePhoneNumber();
27
+ this.inputValueChange.emit({
28
+ countryCode: (country === null || country === void 0 ? void 0 : country.countryCode) || null,
29
+ isEmpty,
30
+ phoneNumber: this.phoneNumber,
31
+ valid,
32
+ wrongFormat,
33
+ });
34
+ };
35
+ this.handlePhoneChange = (event) => {
36
+ var _a, _b;
37
+ const input = event.target;
38
+ const rawValue = input.value.replace(/[^0-9]/g, '');
39
+ if (this.asYouType) {
40
+ this.asYouType.reset();
41
+ const formatted = this.asYouType.input(rawValue);
42
+ // Get the full number (including the country code) from the formatter (e.g. +17022920000)
43
+ this.phoneNumber = ((_a = this.asYouType.getNumber()) === null || _a === void 0 ? void 0 : _a.number) || '';
44
+ input.value = formatted;
45
+ }
46
+ else {
47
+ this.phoneNumber = rawValue;
48
+ }
49
+ const { isEmpty, valid, wrongFormat } = this.validatePhoneNumber();
50
+ this.inputValueChange.emit({
51
+ countryCode: ((_b = this.selectedCountry) === null || _b === void 0 ? void 0 : _b.countryCode) || null,
52
+ isEmpty,
53
+ phoneNumber: this.phoneNumber,
54
+ valid,
55
+ wrongFormat,
56
+ });
57
+ };
58
+ this.handleFocus = () => {
59
+ this.isFocused = true;
60
+ };
61
+ this.handleBlur = () => {
62
+ this.isFocused = false;
63
+ };
64
+ // Type guard to check if the country code is in the country options
65
+ this.isCountryCode = (countryCode) => {
66
+ var _a;
67
+ return ((_a = this.countryOptions) === null || _a === void 0 ? void 0 : _a[countryCode]) !== undefined;
68
+ };
69
+ this.initPhoneNumberValue = () => {
70
+ var _a;
71
+ if (!this.countryOptions) {
72
+ return;
73
+ }
74
+ // Guess the country code from the phone number
75
+ const guessedPhoneNumberCountryCode = (_a = parsePhoneNumber(this.inputValue || '', {
76
+ defaultCountry: this.countryCode,
77
+ })) === null || _a === void 0 ? void 0 : _a.country;
78
+ // If the guessed country code is not in the country options, use the provided country code
79
+ const countryCode = guessedPhoneNumberCountryCode &&
80
+ this.isCountryCode(guessedPhoneNumberCountryCode)
81
+ ? guessedPhoneNumberCountryCode
82
+ : this.countryCode;
83
+ // Get the first available country from the options
84
+ const firstCountry = Object.values(this.countryOptions).find(Boolean);
85
+ // If no country code is provided, set the first available country
86
+ if (!countryCode) {
87
+ this.selectedCountry = firstCountry;
88
+ const { isEmpty, valid, wrongFormat } = this.validatePhoneNumber();
89
+ // Emit the change event so the parent component can update the state to the first country
90
+ this.inputValueChange.emit({
91
+ countryCode: (firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.countryCode) || null,
92
+ isEmpty,
93
+ phoneNumber: this.phoneNumber,
94
+ valid,
95
+ wrongFormat,
96
+ });
97
+ return;
98
+ }
99
+ this.selectedCountry =
100
+ this.countryOptions[countryCode] || firstCountry;
101
+ this.phoneNumber = this.inputValue || '';
102
+ // Update the phone formatter to use the new country code
103
+ this.updatePhoneFormatter();
104
+ };
105
+ this.autoComplete = '';
106
+ this.countryOptions = null;
107
+ this.disabled = false;
108
+ this.error = undefined;
109
+ this.inputLabel = undefined;
110
+ this.overridePrimaryColor = undefined;
111
+ this.overrideSecondaryColor = undefined;
112
+ this.inputValue = undefined;
113
+ this.countryCode = null;
114
+ this.minWidth = undefined;
115
+ this.selectedCountry = undefined;
116
+ this.phoneNumber = '';
117
+ this.isFocused = false;
118
+ this.isSelectOpen = false;
119
+ }
120
+ onCountryOptionsChange() {
121
+ // Re-initialize the phone number value when the country options change
122
+ this.initPhoneNumberValue();
123
+ }
124
+ onSelectedCountryChange() {
125
+ this.updatePhoneFormatter();
126
+ }
127
+ onPhoneNumberChange() {
128
+ this.phoneNumber = this.inputValue || '';
129
+ this.updatePhoneFormatter();
130
+ }
131
+ validatePhoneNumber() {
132
+ var _a;
133
+ if (!this.phoneNumber) {
134
+ return {
135
+ isEmpty: true,
136
+ valid: false,
137
+ wrongFormat: false,
138
+ };
139
+ }
140
+ // Just accept the phone number if the formatter is not available
141
+ const fullNumber = ((_a = this.asYouType.getNumber()) === null || _a === void 0 ? void 0 : _a.number) || '';
142
+ const isValid = isPossibleNumber(fullNumber);
143
+ return {
144
+ isEmpty: false,
145
+ valid: isValid,
146
+ wrongFormat: !isValid,
147
+ };
148
+ }
149
+ /**
150
+ * Update the phone formatter to use the new country code
151
+ */
152
+ updatePhoneFormatter() {
153
+ var _a, _b, _c, _d;
154
+ const firstCountry = Object.values(this.countryOptions || []).find(Boolean);
155
+ const countryCode = ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.countryCode) || (firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.countryCode) || 'US';
156
+ this.asYouType = new AsYouType(countryCode);
157
+ if (this.phoneNumber) {
158
+ // Re-format existing number with new formatter
159
+ this.asYouType.input(this.phoneNumber);
160
+ if (this.inputRef) {
161
+ this.inputRef.value =
162
+ ((_b = this.asYouType.getNumber()) === null || _b === void 0 ? void 0 : _b.formatNational()) || '';
163
+ const { isEmpty, valid, wrongFormat } = this.validatePhoneNumber();
164
+ // emit the change event
165
+ this.inputValueChange.emit({
166
+ countryCode: ((_c = this.selectedCountry) === null || _c === void 0 ? void 0 : _c.countryCode) || null,
167
+ isEmpty,
168
+ phoneNumber: ((_d = this.asYouType.getNumber()) === null || _d === void 0 ? void 0 : _d.number) || '',
169
+ valid,
170
+ wrongFormat,
171
+ });
172
+ }
173
+ }
174
+ }
175
+ componentWillLoad() {
176
+ this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, [
177
+ 'tabindex',
178
+ 'title',
179
+ 'data-form-type',
180
+ 'dir',
181
+ ]));
182
+ this.initPhoneNumberValue();
183
+ }
184
+ componentDidLoad() {
185
+ this.initPhoneNumberValue();
186
+ }
187
+ render() {
188
+ var _a;
189
+ const primaryColor = this.overridePrimaryColor || zonosStore.appearance.colorPrimary;
190
+ const secondaryColor = this.overrideSecondaryColor || zonosStore.appearance.colorSecondary;
191
+ const isDark = primaryColor && isDarkColor(primaryColor);
192
+ const fontSize = zonosStore.appearance.fontSizeInputValue || 16;
193
+ const hasContent = !!this.phoneNumber;
194
+ const countryOptionsList = this.countryOptions
195
+ ? Object.values(this.countryOptions).filter(Boolean)
196
+ : [];
197
+ return (h(Host, { key: 'ece9737db2ea37d1e75a8840e911221a6604ead2', class: classes([
198
+ 'zonos--phone-input zonos--elements',
199
+ isDark && 'dark',
200
+ ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: 'b3cda8bc90655aab7c45b8dce02f615236e73e0f', class: classes([
201
+ 'zonos--label-wrapper',
202
+ this.disabled && 'disabled',
203
+ this.isFocused && 'focused',
204
+ hasContent && 'has-content',
205
+ this.error && 'has-error',
206
+ this.inputLabel && 'has-label',
207
+ ]) }, h("select", { key: '43c8539ccc6d4a2dee364c540c552a737cf450ed', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
208
+ var _a;
209
+ return (h("option", { key: option.countryCode, selected: option.countryCode === ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.countryCode), value: option.countryCode }, option.displayName, " (+", option.phoneCode, ")"));
210
+ })), h("div", { key: '50609301fd2740f213b9f4c3385dd1628e663265', class: "zonos--input-group" }, h("div", { key: '5920176f0986fbeb623469a2d99d7b7182b95150', class: "zonos--select-wrapper" }, h("div", { key: 'c96f9003f77cbd2f3ee2bfc9ae453307a3c08d3b', class: "zonos--country-select" }, h("div", { key: '3afef887d3f8ebfd421e887364ba660f1435236c', class: "zonos--country-select-content" }, this.selectedCountry && (h("div", { key: 'aa2c0384d1f5139af73e5d21fa2b728c1a3a1251', class: "zonos--country-select-selected" }, h("div", { key: '9ea7d3e818b50a279979cb89248e8c46bb66da0e', class: "zonos--country-flag-wrapper" }, h("zonos-country-flag", { key: '1c49374c7e5051ac640b1dbe20aab27e485eecd4', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), h("div", { key: 'f95d8a3f59bd62b8d488350015bd52be310cfe85', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), h("div", { key: 'e69bbd00f23ed3997bcbea13842b49600b6abe81', class: "zonos--select-chevron-wrapper" }, h("zonos-icon", { key: 'a20941918412c6cad3e03ba3684fd9f6c2db8bd8', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))))), h("div", { key: 'fb832d25cb005ce39082ff7829000d13a35b453b', class: classes([
211
+ 'zonos--input-container',
212
+ this.inputLabel && 'has-label',
213
+ hasContent && 'has-content',
214
+ ]) }, h("input", Object.assign({ key: '8a5fa81c091f92937e448a60175241b6e906af68' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (h("div", { key: '269197d54f8226a66f1033fce49a793fe4790341', class: "zonos--floated-label" }, h("label", { key: '7d3b810eba257a877ff4370457af8f4117c8a82f', htmlFor: this.inputId }, this.inputLabel || translate('Phone number'))))))), this.error && (h("zonos-text", { key: 'ba21514e60b298d4d353d92246e91eadd1e6d744', textColor: "red-600" }, this.error))));
215
+ }
216
+ static get is() { return "zonos-stripe-phone-input"; }
217
+ static get encapsulation() { return "scoped"; }
218
+ static get originalStyleUrls() {
219
+ return {
220
+ "$": ["zonos-stripe-phone-input.scss"]
221
+ };
222
+ }
223
+ static get styleUrls() {
224
+ return {
225
+ "$": ["zonos-stripe-phone-input.css"]
226
+ };
227
+ }
228
+ static get properties() {
229
+ return {
230
+ "autoComplete": {
231
+ "type": "string",
232
+ "mutable": false,
233
+ "complexType": {
234
+ "original": "string",
235
+ "resolved": "string",
236
+ "references": {}
237
+ },
238
+ "required": false,
239
+ "optional": false,
240
+ "docs": {
241
+ "tags": [],
242
+ "text": "The autoComplete attribute for the phone input"
243
+ },
244
+ "getter": false,
245
+ "setter": false,
246
+ "attribute": "auto-complete",
247
+ "reflect": false,
248
+ "defaultValue": "''"
249
+ },
250
+ "countryOptions": {
251
+ "type": "unknown",
252
+ "mutable": false,
253
+ "complexType": {
254
+ "original": "GenericZonosSettings['countryFields'] | null",
255
+ "resolved": "null | undefined | { AD: CountryFields; AE: CountryFields; AF: CountryFields; AG: CountryFields; AI: CountryFields; AL: CountryFields; AM: CountryFields; AO: CountryFields; AQ: CountryFields; AR: CountryFields; AS: CountryFields; AT: CountryFields; AU: CountryFields; AW: CountryFields; AX: CountryFields; AZ: CountryFields; BA: CountryFields; BB: CountryFields; BD: CountryFields; BE: CountryFields; BF: CountryFields; BG: CountryFields; BH: CountryFields; BI: CountryFields; BJ: CountryFields; BL: CountryFields; BM: CountryFields; BN: CountryFields; BO: CountryFields; BQ: CountryFields; BR: CountryFields; BS: CountryFields; BT: CountryFields; BV: CountryFields; BW: CountryFields; BY: CountryFields; BZ: CountryFields; CA: CountryFields; CC: CountryFields; CD: CountryFields; CF: CountryFields; CG: CountryFields; CH: CountryFields; CI: CountryFields; CK: CountryFields; CL: CountryFields; CM: CountryFields; CN: CountryFields; CO: CountryFields; CR: CountryFields; CU: CountryFields; CV: CountryFields; CW: CountryFields; CX: CountryFields; CY: CountryFields; CZ: CountryFields; DE: CountryFields; DJ: CountryFields; DK: CountryFields; DM: CountryFields; DO: CountryFields; DZ: CountryFields; EC: CountryFields; EE: CountryFields; EG: CountryFields; EH: CountryFields; ER: CountryFields; ES: CountryFields; ET: CountryFields; FI: CountryFields; FJ: CountryFields; FK: CountryFields; FM: CountryFields; FO: CountryFields; FR: CountryFields; GA: CountryFields; GB: CountryFields; GD: CountryFields; GE: CountryFields; GF: CountryFields; GG: CountryFields; GH: CountryFields; GI: CountryFields; GL: CountryFields; GM: CountryFields; GN: CountryFields; GP: CountryFields; GQ: CountryFields; GR: CountryFields; GS: CountryFields; GT: CountryFields; GU: CountryFields; GW: CountryFields; GY: CountryFields; HK: CountryFields; HM: CountryFields; HN: CountryFields; HR: CountryFields; HT: CountryFields; HU: CountryFields; IC: CountryFields; ID: CountryFields; IE: CountryFields; IL: CountryFields; IM: CountryFields; IN: CountryFields; IO: CountryFields; IQ: CountryFields; IR: CountryFields; IS: CountryFields; IT: CountryFields; JE: CountryFields; JM: CountryFields; JO: CountryFields; JP: CountryFields; KE: CountryFields; KG: CountryFields; KH: CountryFields; KI: CountryFields; KM: CountryFields; KN: CountryFields; KP: CountryFields; KR: CountryFields; KW: CountryFields; KY: CountryFields; KZ: CountryFields; LA: CountryFields; LB: CountryFields; LC: CountryFields; LI: CountryFields; LK: CountryFields; LR: CountryFields; LS: CountryFields; LT: CountryFields; LU: CountryFields; LV: CountryFields; LY: CountryFields; MA: CountryFields; MC: CountryFields; MD: CountryFields; ME: CountryFields; MF: CountryFields; MG: CountryFields; MH: CountryFields; MK: CountryFields; ML: CountryFields; MM: CountryFields; MN: CountryFields; MO: CountryFields; MP: CountryFields; MQ: CountryFields; MR: CountryFields; MS: CountryFields; MT: CountryFields; MU: CountryFields; MV: CountryFields; MW: CountryFields; MX: CountryFields; MY: CountryFields; MZ: CountryFields; NA: CountryFields; NC: CountryFields; NE: CountryFields; NF: CountryFields; NG: CountryFields; NI: CountryFields; NL: CountryFields; NO: CountryFields; NP: CountryFields; NR: CountryFields; NU: CountryFields; NZ: CountryFields; OM: CountryFields; PA: CountryFields; PE: CountryFields; PF: CountryFields; PG: CountryFields; PH: CountryFields; PK: CountryFields; PL: CountryFields; PM: CountryFields; PN: CountryFields; PR: CountryFields; PS: CountryFields; PT: CountryFields; PW: CountryFields; PY: CountryFields; QA: CountryFields; RE: CountryFields; RO: CountryFields; RS: CountryFields; RU: CountryFields; RW: CountryFields; SA: CountryFields; SB: CountryFields; SC: CountryFields; SD: CountryFields; SE: CountryFields; SG: CountryFields; SH: CountryFields; SI: CountryFields; SJ: CountryFields; SK: CountryFields; SL: CountryFields; SM: CountryFields; SN: CountryFields; SO: CountryFields; SR: CountryFields; SS: CountryFields; ST: CountryFields; SV: CountryFields; SX: CountryFields; SY: CountryFields; SZ: CountryFields; TC: CountryFields; TD: CountryFields; TF: CountryFields; TG: CountryFields; TH: CountryFields; TJ: CountryFields; TK: CountryFields; TL: CountryFields; TM: CountryFields; TN: CountryFields; TO: CountryFields; TR: CountryFields; TT: CountryFields; TV: CountryFields; TW: CountryFields; TZ: CountryFields; UA: CountryFields; UG: CountryFields; UM: CountryFields; US: CountryFields; UY: CountryFields; UZ: CountryFields; VA: CountryFields; VC: CountryFields; VE: CountryFields; VG: CountryFields; VI: CountryFields; VN: CountryFields; VU: CountryFields; WF: CountryFields; WS: CountryFields; YE: CountryFields; YT: CountryFields; ZA: CountryFields; ZM: CountryFields; ZW: CountryFields; }",
256
+ "references": {
257
+ "GenericZonosSettings": {
258
+ "location": "import",
259
+ "path": "src/types/utils/ZonosSettings",
260
+ "id": "src/types/utils/ZonosSettings.ts::GenericZonosSettings"
261
+ }
262
+ }
263
+ },
264
+ "required": false,
265
+ "optional": false,
266
+ "docs": {
267
+ "tags": [],
268
+ "text": "Available country options for the select dropdown"
269
+ },
270
+ "getter": false,
271
+ "setter": false,
272
+ "defaultValue": "null"
273
+ },
274
+ "disabled": {
275
+ "type": "boolean",
276
+ "mutable": false,
277
+ "complexType": {
278
+ "original": "boolean",
279
+ "resolved": "boolean",
280
+ "references": {}
281
+ },
282
+ "required": false,
283
+ "optional": false,
284
+ "docs": {
285
+ "tags": [],
286
+ "text": "Whether the input is disabled"
287
+ },
288
+ "getter": false,
289
+ "setter": false,
290
+ "attribute": "disabled",
291
+ "reflect": false,
292
+ "defaultValue": "false"
293
+ },
294
+ "error": {
295
+ "type": "string",
296
+ "mutable": false,
297
+ "complexType": {
298
+ "original": "string",
299
+ "resolved": "string | undefined",
300
+ "references": {}
301
+ },
302
+ "required": false,
303
+ "optional": true,
304
+ "docs": {
305
+ "tags": [],
306
+ "text": "Error message to display"
307
+ },
308
+ "getter": false,
309
+ "setter": false,
310
+ "attribute": "error",
311
+ "reflect": false
312
+ },
313
+ "inputLabel": {
314
+ "type": "string",
315
+ "mutable": false,
316
+ "complexType": {
317
+ "original": "string",
318
+ "resolved": "string | undefined",
319
+ "references": {}
320
+ },
321
+ "required": false,
322
+ "optional": true,
323
+ "docs": {
324
+ "tags": [],
325
+ "text": "Label text for the input"
326
+ },
327
+ "getter": false,
328
+ "setter": false,
329
+ "attribute": "input-label",
330
+ "reflect": false
331
+ },
332
+ "overridePrimaryColor": {
333
+ "type": "string",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "string",
337
+ "resolved": "string | undefined",
338
+ "references": {}
339
+ },
340
+ "required": false,
341
+ "optional": true,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": "Override the primary color"
345
+ },
346
+ "getter": false,
347
+ "setter": false,
348
+ "attribute": "override-primary-color",
349
+ "reflect": false
350
+ },
351
+ "overrideSecondaryColor": {
352
+ "type": "string",
353
+ "mutable": false,
354
+ "complexType": {
355
+ "original": "string",
356
+ "resolved": "string | undefined",
357
+ "references": {}
358
+ },
359
+ "required": false,
360
+ "optional": true,
361
+ "docs": {
362
+ "tags": [],
363
+ "text": "Override the secondary color"
364
+ },
365
+ "getter": false,
366
+ "setter": false,
367
+ "attribute": "override-secondary-color",
368
+ "reflect": false
369
+ },
370
+ "inputValue": {
371
+ "type": "string",
372
+ "mutable": false,
373
+ "complexType": {
374
+ "original": "string",
375
+ "resolved": "string | undefined",
376
+ "references": {}
377
+ },
378
+ "required": false,
379
+ "optional": true,
380
+ "docs": {
381
+ "tags": [],
382
+ "text": "Current value of the phone input"
383
+ },
384
+ "getter": false,
385
+ "setter": false,
386
+ "attribute": "input-value",
387
+ "reflect": false
388
+ },
389
+ "countryCode": {
390
+ "type": "string",
391
+ "mutable": false,
392
+ "complexType": {
393
+ "original": "CountryCode | null",
394
+ "resolved": "CountryCode | null",
395
+ "references": {
396
+ "CountryCode": {
397
+ "location": "import",
398
+ "path": "src/types/generated/graphql.internal.types",
399
+ "id": "src/types/generated/graphql.internal.types.ts::CountryCode"
400
+ }
401
+ }
402
+ },
403
+ "required": false,
404
+ "optional": false,
405
+ "docs": {
406
+ "tags": [],
407
+ "text": "The country code of the phone input"
408
+ },
409
+ "getter": false,
410
+ "setter": false,
411
+ "attribute": "country-code",
412
+ "reflect": false,
413
+ "defaultValue": "null"
414
+ },
415
+ "minWidth": {
416
+ "type": "string",
417
+ "mutable": false,
418
+ "complexType": {
419
+ "original": "string",
420
+ "resolved": "string | undefined",
421
+ "references": {}
422
+ },
423
+ "required": false,
424
+ "optional": true,
425
+ "docs": {
426
+ "tags": [],
427
+ "text": "Minimum width of the phone input"
428
+ },
429
+ "getter": false,
430
+ "setter": false,
431
+ "attribute": "min-width",
432
+ "reflect": false
433
+ }
434
+ };
435
+ }
436
+ static get states() {
437
+ return {
438
+ "selectedCountry": {},
439
+ "phoneNumber": {},
440
+ "isFocused": {},
441
+ "isSelectOpen": {}
442
+ };
443
+ }
444
+ static get events() {
445
+ return [{
446
+ "method": "inputValueChange",
447
+ "name": "inputValueChange",
448
+ "bubbles": true,
449
+ "cancelable": true,
450
+ "composed": true,
451
+ "docs": {
452
+ "tags": [],
453
+ "text": "Emitted when the country or phone number changes"
454
+ },
455
+ "complexType": {
456
+ "original": "{\n countryCode: CountryCode | null;\n isEmpty: boolean;\n phoneNumber: string;\n valid: boolean;\n wrongFormat: boolean;\n }",
457
+ "resolved": "{ countryCode: CountryCode | null; isEmpty: boolean; phoneNumber: string; valid: boolean; wrongFormat: boolean; }",
458
+ "references": {
459
+ "CountryCode": {
460
+ "location": "import",
461
+ "path": "src/types/generated/graphql.internal.types",
462
+ "id": "src/types/generated/graphql.internal.types.ts::CountryCode"
463
+ }
464
+ }
465
+ }
466
+ }];
467
+ }
468
+ static get elementRef() { return "el"; }
469
+ static get watchers() {
470
+ return [{
471
+ "propName": "countryOptions",
472
+ "methodName": "onCountryOptionsChange"
473
+ }, {
474
+ "propName": "selectedCountry",
475
+ "methodName": "onSelectedCountryChange"
476
+ }, {
477
+ "propName": "inputValue",
478
+ "methodName": "onPhoneNumberChange"
479
+ }];
480
+ }
481
+ }
@@ -0,0 +1 @@
1
+ <svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>
@@ -0,0 +1 @@
1
+ <svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>
@@ -0,0 +1,178 @@
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
+ --zonos--background-color: #f1f1f1;
36
+ --zonos--local-glowing-color: 0 0 0 3px hsla(0, 0%, 100%, 25%),
37
+ 0 0 0 1px var(--zonos--primary-color);
38
+ --zonos--border: 1px solid #e8e8e8;
39
+ }
40
+
41
+ :host(.dark) {
42
+ color-scheme: dark;
43
+ --zonos--background-color: #30313d;
44
+ --zonos--local-glowing-color: 0px 2px 4px rgba(0, 0, 0, 0.5),
45
+ 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),
46
+ 0 1px 1px 0 rgba(255, 255, 255, 0.12);
47
+ --zonos--border: 1px solid var(--zonos--primary-color);
48
+ }
49
+
50
+ :host {
51
+ margin: 1px;
52
+ position: relative;
53
+ min-width: var(--zonos--min-width, unset);
54
+ /**disabled state */
55
+ }
56
+ :host .zonos--label-wrapper {
57
+ position: relative;
58
+ display: flex;
59
+ flex-direction: row;
60
+ height: calc(var(--zonos-elements-size-xl) - 4px);
61
+ width: 100%;
62
+ background: var(--zonos--background-color);
63
+ border-radius: var(--zonos--border-radius);
64
+ border: var(--zonos--border);
65
+ outline-offset: 0;
66
+ outline-width: 2px;
67
+ }
68
+ :host .zonos--floated-select {
69
+ box-sizing: border-box;
70
+ position: relative;
71
+ padding: 0 36px 0 16px;
72
+ outline: none;
73
+ transition: var(--zonos-elements-transition);
74
+ width: 100%;
75
+ border-radius: var(--zonos--border-radius);
76
+ background: var(--zonos--background-color);
77
+ border: var(--zonos--border);
78
+ order: 2;
79
+ font-weight: 400;
80
+ font-size: var(--zonos--font-size);
81
+ color: var(--zonos--background-color);
82
+ appearance: none;
83
+ cursor: pointer;
84
+ }
85
+ :host .zonos--floated-select.has-label {
86
+ padding: 24px 36px 2px 16px;
87
+ }
88
+ :host .zonos--floated-select:focus {
89
+ outline: none;
90
+ border: var(--zonos--border);
91
+ }
92
+ :host .zonos--floated-select:focus ~ .zonos--floated-label::after {
93
+ box-shadow: var(--zonos--glowing-color, var(--zonos--local-glowing-color));
94
+ }
95
+ :host .zonos--floated-select.has-error + .zonos--floated-label::after {
96
+ box-shadow: 0 0 0 2px #df1b41;
97
+ }
98
+ :host .zonos--floated-select.has-content, :host .zonos--floated-select:focus {
99
+ color: var(--zonos-elements-text-color);
100
+ }
101
+ :host .zonos--floated-select.has-content ~ .zonos--floated-label label, :host .zonos--floated-select:focus ~ .zonos--floated-label label {
102
+ top: 11px;
103
+ transform: scale(0.8);
104
+ }
105
+ :host .zonos--floated-select:-webkit-autofill, :host .zonos--floated-select:-moz-autofill {
106
+ background-color: var(--zonos-elements-input-background);
107
+ color: var(--zonos-elements-text-color);
108
+ }
109
+ :host .zonos--floated-select option {
110
+ background-color: var(--zonos--background-color);
111
+ color: inherit;
112
+ }
113
+ :host .zonos--floated-label {
114
+ display: block;
115
+ max-height: 0;
116
+ pointer-events: none;
117
+ order: 1;
118
+ }
119
+ :host .zonos--floated-label label {
120
+ color: var(--zonos-elements-gray-800);
121
+ position: absolute;
122
+ font-size: 16px;
123
+ line-height: 16px;
124
+ display: inline-block;
125
+ filter: blur(0);
126
+ transform-origin: left top;
127
+ transition: var(--zonos-elements-transition);
128
+ margin-left: 16px;
129
+ top: calc(50% - 8px);
130
+ z-index: 1;
131
+ }
132
+ :host .zonos--floated-label::after {
133
+ content: "";
134
+ position: absolute;
135
+ left: 0;
136
+ right: 0;
137
+ top: 0;
138
+ bottom: 0;
139
+ border-radius: var(--zonos--border-radius);
140
+ }
141
+ :host .zonos--actions-wrapper {
142
+ position: absolute;
143
+ right: 8px;
144
+ top: 50%;
145
+ transform: translateY(-50%);
146
+ z-index: 1;
147
+ pointer-events: none;
148
+ display: flex;
149
+ }
150
+ :host .zonos--select-chevron {
151
+ cursor: pointer;
152
+ color: var(--zonos-elements-gray-800);
153
+ z-index: 1;
154
+ }
155
+ :host .disabled .zonos--floated-label {
156
+ pointer-events: inherit;
157
+ }
158
+ :host .disabled .zonos--floated-label::after {
159
+ cursor: not-allowed;
160
+ z-index: 1;
161
+ }
162
+ :host .disabled .zonos--select-chevron {
163
+ opacity: 0.5;
164
+ }
165
+
166
+ .zonos--clear-button {
167
+ background: none;
168
+ border: none;
169
+ pointer-events: auto;
170
+ cursor: pointer;
171
+ }
172
+ .zonos--clear-button:hover {
173
+ filter: brightness(0.8);
174
+ }
175
+
176
+ :host(.dark) .zonos--label-wrapper {
177
+ background: #30313d;
178
+ }