@wix/form-elements 0.0.0-stage → 1.54.0

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 (237) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +118 -2
  3. package/dist/component/appointment-rac-DlOqbFoi.js +1005 -0
  4. package/dist/component/bookings-address-rac-CvK-P3df.js +6 -0
  5. package/dist/component/bookings-email-rac-9BEPTuox.js +6 -0
  6. package/dist/component/bookings-first-name-rac-BrU-BtPp.js +6 -0
  7. package/dist/component/bookings-header-rac-8NCL7fxp.js +8 -0
  8. package/dist/component/bookings-last-name-rac-DgLqZ1nS.js +6 -0
  9. package/dist/component/bookings-login-bar-rac-C2pzRMyt.js +74 -0
  10. package/dist/component/bookings-phone-rac-BrPBAo8B.js +6 -0
  11. package/dist/component/bookings-rich-text-rac-qpPsyIuc.js +8 -0
  12. package/dist/component/calling-country-codes-PyWuOTmF.js +243 -0
  13. package/dist/component/checkbox-field-rac-CaloY2Hs.js +625 -0
  14. package/dist/component/checkbox-group-field-headless-4HlJmarB.js +204 -0
  15. package/dist/component/checkbox-group-field-rac-B1tFZT3o.js +33 -0
  16. package/dist/component/checkbox-group-rac-C0SzN2Bx.js +6 -0
  17. package/dist/component/checkbox-rac-ssJIVvZI.js +6 -0
  18. package/dist/component/chevron-down-icon-CcpVm6B-.js +15 -0
  19. package/dist/component/contacts-address-rac-Dwf4yrGq.js +6 -0
  20. package/dist/component/contacts-birthdate-rac-C195rG5w.js +6 -0
  21. package/dist/component/contacts-company-rac-BHX6xZU8.js +6 -0
  22. package/dist/component/contacts-email-rac-CFY-m-r2.js +6 -0
  23. package/dist/component/contacts-first-name-rac-D23QFUGK.js +6 -0
  24. package/dist/component/contacts-last-name-rac-COuQB15p.js +6 -0
  25. package/dist/component/contacts-phone-rac-BfhY_I7p.js +6 -0
  26. package/dist/component/contacts-position-rac-D80_knc8.js +6 -0
  27. package/dist/component/contacts-subscribe-rac--NuPoBFm.js +13 -0
  28. package/dist/component/contacts-tax-id-rac-BURE313k.js +6 -0
  29. package/dist/component/custom-focus-class-_483Pkwp.js +4 -0
  30. package/dist/component/data-hooks-Dkw1pbRj.js +6 -0
  31. package/dist/component/date-availability-BQyNH-7j.js +49 -0
  32. package/dist/component/date-input-field-rac-BnFvhqe1.js +286 -0
  33. package/dist/component/date-input-rac-TLkITFRh.js +6 -0
  34. package/dist/component/date-picker-field-rac-BAFKYE1B.js +304 -0
  35. package/dist/component/date-picker-rac-uBJQkALE.js +6 -0
  36. package/dist/component/date-time-input-field-rac-DnOkBj7w.js +421 -0
  37. package/dist/component/date-time-input-rac-BxbWyK23.js +6 -0
  38. package/dist/component/default-limits-D7qVv_Hv.js +6 -0
  39. package/dist/component/dext-checkbox-group-rac-DnifcsEZ.js +18 -0
  40. package/dist/component/dext-checkbox-rac-D45Ok0J4.js +6 -0
  41. package/dist/component/dext-date-picker-rac-Cs47jywn.js +6 -0
  42. package/dist/component/dext-date-time-input-rac-UPwXpk2g.js +6 -0
  43. package/dist/component/dext-dropdown-rac-D18mhUDU.js +6 -0
  44. package/dist/component/dext-email-rac-B4frwTvA.js +6 -0
  45. package/dist/component/dext-number-input-rac-CoS-Fk59.js +6 -0
  46. package/dist/component/dext-phone-rac-DwR0JLia.js +6 -0
  47. package/dist/component/dext-radio-group-rac-DogWvoUg.js +18 -0
  48. package/dist/component/dext-rating-input-rac-C4NxeIto.js +6 -0
  49. package/dist/component/dext-tags-rac-DsEenrft.js +18 -0
  50. package/dist/component/dext-text-area-rac-Du-FqTqW.js +6 -0
  51. package/dist/component/dext-text-input-rac-DUE8JE9b.js +6 -0
  52. package/dist/component/dext-url-input-rac-Cn55pV9m.js +6 -0
  53. package/dist/component/donation-rac-Cjk_hFm1.js +305 -0
  54. package/dist/component/dropdown-field-headless-Dcy46MWj.js +84 -0
  55. package/dist/component/dropdown-field-rac-rMMPzKxL.js +32 -0
  56. package/dist/component/dropdown-rac-C6B8C8Yc.js +6 -0
  57. package/dist/component/ecom-address-rac-1wNixzip.js +6 -0
  58. package/dist/component/ecom-subscription-checkbox-rac-C5z68KHa.js +49 -0
  59. package/dist/component/email-input-field-rac-C7Wn2XVU.js +507 -0
  60. package/dist/component/error-icon-hZxQ6DEy.js +15 -0
  61. package/dist/component/events-repeater-rac-DTv4JD79.js +247 -0
  62. package/dist/component/events-rsvp-rac-cS7Mb04F.js +38 -0
  63. package/dist/component/field-error-headless-Dm5UCOBb.js +34 -0
  64. package/dist/component/field-label-headless-C7mDzdLq.js +52 -0
  65. package/dist/component/field-rac.module-DAPTqFDM.js +21 -0
  66. package/dist/component/fieldset-headless-CD3fds9J.js +54 -0
  67. package/dist/component/file-upload-rac-DeZvh7dy.js +484 -0
  68. package/dist/component/find-child-C60k4CxG.js +11 -0
  69. package/dist/component/fixed-payment-rac-D7t5DjVp.js +62 -0
  70. package/dist/component/form-DaOKiR16.js +8890 -0
  71. package/dist/component/form-element-classes-Bi-nNM8q.js +55 -0
  72. package/dist/component/form.css +1 -0
  73. package/dist/component/form.js +9 -0
  74. package/dist/component/format-currency-BwShJ9vM.js +44 -0
  75. package/dist/component/get-first-day-of-the-week-DvnsxYhQ.js +118 -0
  76. package/dist/component/header-field-rac-hJSXllPm.js +25 -0
  77. package/dist/component/header-rac-G_lsddOd.js +6 -0
  78. package/dist/component/headless-styles-CmcyA_pi.js +20 -0
  79. package/dist/component/helpers-HmkkXrh2.js +12 -0
  80. package/dist/component/image-choice-rac-BHyAKRDt.js +141 -0
  81. package/dist/component/index-CFW1VXFU.js +64 -0
  82. package/dist/component/index-CkCSQD3_.js +2290 -0
  83. package/dist/component/isObject-BAwJJxQ3.js +34 -0
  84. package/dist/component/messages_ar-BZXnU2Gj.js +3517 -0
  85. package/dist/component/messages_ar-L1BYLZbF.js +20 -0
  86. package/dist/component/messages_ar-PAHg01OB.js +299 -0
  87. package/dist/component/messages_bg-CO56qlOt.js +299 -0
  88. package/dist/component/messages_bg-CQcGl0Yi.js +20 -0
  89. package/dist/component/messages_bg-DgbMwIbv.js +3515 -0
  90. package/dist/component/messages_ca-BAHE5nuo.js +3515 -0
  91. package/dist/component/messages_ca-BRoHmzRw.js +20 -0
  92. package/dist/component/messages_ca-Bl6rZi_O.js +299 -0
  93. package/dist/component/messages_cs-BADd3t_h.js +3515 -0
  94. package/dist/component/messages_cs-CDyWDExk.js +298 -0
  95. package/dist/component/messages_cs-wn5UmrBw.js +20 -0
  96. package/dist/component/messages_da-BPnmb9Qb.js +20 -0
  97. package/dist/component/messages_da-BvVUWnBz.js +3515 -0
  98. package/dist/component/messages_da-DHlpaT4q.js +298 -0
  99. package/dist/component/messages_de-2czOmM8X.js +3515 -0
  100. package/dist/component/messages_de-BKgzIF1d.js +298 -0
  101. package/dist/component/messages_de-Bwx84N0O.js +20 -0
  102. package/dist/component/messages_el-BnuYMjcf.js +299 -0
  103. package/dist/component/messages_el-_D2RUBSU.js +20 -0
  104. package/dist/component/messages_el-qCyH12Uq.js +3515 -0
  105. package/dist/component/messages_en-BWaixPd6.js +3518 -0
  106. package/dist/component/messages_en-CBBcgtxs.js +296 -0
  107. package/dist/component/messages_en-DvSLxqKp.js +20 -0
  108. package/dist/component/messages_es-Cq6i2xci.js +3515 -0
  109. package/dist/component/messages_es-DlGCLaYi.js +298 -0
  110. package/dist/component/messages_es-rCKXnGf0.js +20 -0
  111. package/dist/component/messages_fi-B-ciZGqD.js +3515 -0
  112. package/dist/component/messages_fi-DzKva_Wq.js +299 -0
  113. package/dist/component/messages_fi-PCCXPo0O.js +20 -0
  114. package/dist/component/messages_fr-2im0dcYp.js +3515 -0
  115. package/dist/component/messages_fr-DMFilq1G.js +298 -0
  116. package/dist/component/messages_fr-DQa1dT9u.js +20 -0
  117. package/dist/component/messages_he-Bb1qTc2Y.js +299 -0
  118. package/dist/component/messages_he-BfIkDo1h.js +3515 -0
  119. package/dist/component/messages_he-DwIysfDp.js +20 -0
  120. package/dist/component/messages_hi-Bty6ytCh.js +3515 -0
  121. package/dist/component/messages_hi-C-6UHGbM.js +298 -0
  122. package/dist/component/messages_hi-DF1w6b6B.js +20 -0
  123. package/dist/component/messages_hr-BXzIzU3d.js +20 -0
  124. package/dist/component/messages_hr-CiU1ZVrx.js +3515 -0
  125. package/dist/component/messages_hr-tRSM9lmc.js +299 -0
  126. package/dist/component/messages_hu-ChzHFUtB.js +3515 -0
  127. package/dist/component/messages_hu-D86Taf9R.js +299 -0
  128. package/dist/component/messages_hu-Z9XpByCO.js +20 -0
  129. package/dist/component/messages_id-3952ilBE.js +20 -0
  130. package/dist/component/messages_id-CPuhTUYV.js +298 -0
  131. package/dist/component/messages_id-Ddr3ijST.js +3515 -0
  132. package/dist/component/messages_it-B-A1X4BZ.js +298 -0
  133. package/dist/component/messages_it-DnUTUabT.js +20 -0
  134. package/dist/component/messages_it-eY6GnuZC.js +3515 -0
  135. package/dist/component/messages_ja-B3PxHv2c.js +3515 -0
  136. package/dist/component/messages_ja-Ced6ZBxD.js +298 -0
  137. package/dist/component/messages_ja-Cg7CqBUL.js +20 -0
  138. package/dist/component/messages_ko-DBCjHG4c.js +3515 -0
  139. package/dist/component/messages_ko-PKIrqwPk.js +298 -0
  140. package/dist/component/messages_ko-zvhtZMGA.js +20 -0
  141. package/dist/component/messages_lt-DV3hdFsp.js +3515 -0
  142. package/dist/component/messages_lt-DywusvNm.js +20 -0
  143. package/dist/component/messages_lt-zxcCPHno.js +299 -0
  144. package/dist/component/messages_lv-BEowUv-S.js +299 -0
  145. package/dist/component/messages_lv-DggJE2f9.js +20 -0
  146. package/dist/component/messages_lv-hIonzpTs.js +3515 -0
  147. package/dist/component/messages_ms-Ca0m7bf7.js +20 -0
  148. package/dist/component/messages_ms-Cvypo0vi.js +299 -0
  149. package/dist/component/messages_ms-DoMzA8a3.js +3515 -0
  150. package/dist/component/messages_nl-CEmANR_r.js +3515 -0
  151. package/dist/component/messages_nl-CZR4TvNo.js +298 -0
  152. package/dist/component/messages_nl-DgVYmdO9.js +20 -0
  153. package/dist/component/messages_no-B2BBaGBH.js +298 -0
  154. package/dist/component/messages_no-DJfJSlDm.js +3515 -0
  155. package/dist/component/messages_no-hPkfRJQ9.js +20 -0
  156. package/dist/component/messages_pl-Bzph-WyD.js +20 -0
  157. package/dist/component/messages_pl-ChJVH7RO.js +3515 -0
  158. package/dist/component/messages_pl-rCMsbMbN.js +298 -0
  159. package/dist/component/messages_pt-Bv63V1uB.js +3515 -0
  160. package/dist/component/messages_pt-CBgCNF3T.js +20 -0
  161. package/dist/component/messages_pt-Cx0FF6uF.js +298 -0
  162. package/dist/component/messages_ro-BvLoD_wE.js +299 -0
  163. package/dist/component/messages_ro-CMzcu-9b.js +20 -0
  164. package/dist/component/messages_ro-PVRK7Gx4.js +3515 -0
  165. package/dist/component/messages_ru-8BI6MYA0.js +3515 -0
  166. package/dist/component/messages_ru-BhRKVmVC.js +298 -0
  167. package/dist/component/messages_ru-C_BaQo57.js +20 -0
  168. package/dist/component/messages_sk-Bgi_3583.js +3515 -0
  169. package/dist/component/messages_sk-CrsC7rOj.js +20 -0
  170. package/dist/component/messages_sk-CtF-ei23.js +299 -0
  171. package/dist/component/messages_sl-B5t-KKi8.js +299 -0
  172. package/dist/component/messages_sl-BFdYWVHd.js +3515 -0
  173. package/dist/component/messages_sl-NqfmyUP1.js +20 -0
  174. package/dist/component/messages_sv-Bd1CcY6G.js +3515 -0
  175. package/dist/component/messages_sv-DPRT-DpN.js +20 -0
  176. package/dist/component/messages_sv-bQwbNmjr.js +298 -0
  177. package/dist/component/messages_th-BauH9qdo.js +20 -0
  178. package/dist/component/messages_th-C_dL_PCq.js +298 -0
  179. package/dist/component/messages_th-DEWm01uD.js +3515 -0
  180. package/dist/component/messages_tl-CouXLNcW.js +299 -0
  181. package/dist/component/messages_tl-D2t9Y_ZC.js +3515 -0
  182. package/dist/component/messages_tl-UDZY8Wuk.js +20 -0
  183. package/dist/component/messages_tr-2-OHesob.js +3515 -0
  184. package/dist/component/messages_tr-CpsxYTDb.js +20 -0
  185. package/dist/component/messages_tr-DHXnlj_j.js +298 -0
  186. package/dist/component/messages_uk-CPK4y5lH.js +298 -0
  187. package/dist/component/messages_uk-DIuQ2HoD.js +3515 -0
  188. package/dist/component/messages_uk-gPkmA_ar.js +20 -0
  189. package/dist/component/messages_vi-CgxB4Ey0.js +20 -0
  190. package/dist/component/messages_vi-DZeFWgwp.js +3515 -0
  191. package/dist/component/messages_vi-Det8i7_V.js +298 -0
  192. package/dist/component/messages_zh-D53_A4N9.js +298 -0
  193. package/dist/component/messages_zh-O552w5dp.js +20 -0
  194. package/dist/component/messages_zh-nG7LNxIt.js +3515 -0
  195. package/dist/component/multiline-address-field-rac-CwLOzNF6.js +1574 -0
  196. package/dist/component/multiline-address-rac-C4JXBlFC.js +6 -0
  197. package/dist/component/non-modal-popover-DtIMXHbe.js +63 -0
  198. package/dist/component/number-input-field-rac-BOeiugCV.js +89 -0
  199. package/dist/component/number-input-rac-NqbFwW0d.js +6 -0
  200. package/dist/component/numeric-input-utils-CuBMi4-a.js +45 -0
  201. package/dist/component/options-layout-constants-DEfIEJWD.js +6 -0
  202. package/dist/component/options-rac.module-KM-VT_KY.js +7 -0
  203. package/dist/component/password-rac-DxCYgvu_.js +142 -0
  204. package/dist/component/payment-field-utils-DobiK5Xh.js +12 -0
  205. package/dist/component/payment-input-rac-C2aof0p0.js +137 -0
  206. package/dist/component/phone-input-field-rac-Cd7RFaoD.js +473 -0
  207. package/dist/component/phone-rac-4MQREqBG.js +6 -0
  208. package/dist/component/product-list-rac-CjoepDQ_.js +263 -0
  209. package/dist/component/quiz-radio-group-rac-CIwk7N3X.js +13 -0
  210. package/dist/component/radio-group-field-rac-DE2mnUHD.js +40 -0
  211. package/dist/component/radio-group-field-rac.module-DEP9BCiX.js +124 -0
  212. package/dist/component/radio-group-rac-XE6CeGnp.js +6 -0
  213. package/dist/component/rating-input-field-rac-BzAAMipp.js +130 -0
  214. package/dist/component/rating-input-rac-oIvpEVjK.js +6 -0
  215. package/dist/component/rich-content-rac.module-cis7mx3M.js +49 -0
  216. package/dist/component/rich-text-field-rac-CqkM22CI.js +22 -0
  217. package/dist/component/rich-text-rac-BKbz3TcX.js +6 -0
  218. package/dist/component/ricos-viewer-chunk-B4rfbgjA.js +5 -0
  219. package/dist/component/service-dropdown-rac-CfCMbT9d.js +142 -0
  220. package/dist/component/services-multi-choice-rac-F2h5gUOr.js +76 -0
  221. package/dist/component/signature-rac-CIRsmZhS.js +795 -0
  222. package/dist/component/submit-button-rac-BELGrClx.js +115 -0
  223. package/dist/component/tags-field-rac-B6Hg2XOI.js +201 -0
  224. package/dist/component/tags-rac-Dfv8VP7J.js +6 -0
  225. package/dist/component/text-area-field-rac-Bsd1V2Q3.js +69 -0
  226. package/dist/component/text-area-rac-BNVdI-Gq.js +6 -0
  227. package/dist/component/text-input-field-rac-DF9dD_KW.js +24 -0
  228. package/dist/component/text-input-headless-Dlao2R8f.js +44 -0
  229. package/dist/component/text-input-rac-C2p7E01b.js +6 -0
  230. package/dist/component/time-input-rac-90mLBZsX.js +152 -0
  231. package/dist/component/url-input-field-rac-bCEOlctr.js +71 -0
  232. package/dist/component/url-input-rac-D5o8b9gx.js +6 -0
  233. package/dist/component/use-invoke-callback-UH73A_J3.js +15 -0
  234. package/dist/component/use-service-options-base-DO5hy6mn.js +48 -0
  235. package/dist/component/use-synced-display-value-DcAxdn3M.js +19 -0
  236. package/dist/form.d.ts +6930 -0
  237. package/package.json +164 -3
@@ -0,0 +1,507 @@
1
+ import { RicosViewer as ie } from "@wix/ricos/viewer";
2
+ import x from "classnames";
3
+ import u, { createContext as z, useContext as Z, createElement as H, isValidElement as U, cloneElement as R, useState as le, useCallback as me, useEffect as ue } from "react";
4
+ import { TextField as pe } from "react-aria-components";
5
+ import { ad as fe, aq as ge, ab as ve, c as ye, ag as Ee, ak as de, ae as be, f as Se } from "./form-DaOKiR16.js";
6
+ import { f as L } from "./find-child-C60k4CxG.js";
7
+ import ee from "@babel/runtime/helpers/objectWithoutProperties";
8
+ import M from "@babel/runtime/helpers/typeof";
9
+ import Oe from "@babel/runtime/helpers/defineProperty";
10
+ import he from "html-parse-stringify";
11
+ import Ie from "@babel/runtime/helpers/classCallCheck";
12
+ import Ne from "@babel/runtime/helpers/createClass";
13
+ import { T as B } from "./text-input-headless-Dlao2R8f.js";
14
+ import { E as Ae } from "./error-icon-hZxQ6DEy.js";
15
+ import { s as C } from "./field-rac.module-DAPTqFDM.js";
16
+ import { r as Fe, H as ke, q as Te, l as De, h as xe, R as je } from "./form-element-classes-Bi-nNM8q.js";
17
+ var Le = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Ce = {
18
+ "&": "&",
19
+ "&": "&",
20
+ "&lt;": "<",
21
+ "&#60;": "<",
22
+ "&gt;": ">",
23
+ "&#62;": ">",
24
+ "&apos;": "'",
25
+ "&#39;": "'",
26
+ "&quot;": '"',
27
+ "&#34;": '"',
28
+ "&nbsp;": " ",
29
+ "&#160;": " ",
30
+ "&copy;": "©",
31
+ "&#169;": "©",
32
+ "&reg;": "®",
33
+ "&#174;": "®",
34
+ "&hellip;": "…",
35
+ "&#8230;": "…",
36
+ "&#x2F;": "/",
37
+ "&#47;": "/"
38
+ }, Me = function(t) {
39
+ return Ce[t];
40
+ }, Pe = function(t) {
41
+ return t.replace(Le, Me);
42
+ }, _e = {
43
+ bindI18n: "languageChanged",
44
+ bindI18nStore: "",
45
+ transEmptyNodeValue: "",
46
+ transSupportBasicHtmlNodes: !0,
47
+ transWrapTextNodes: "",
48
+ transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
49
+ useSuspense: !0,
50
+ unescape: Pe
51
+ }, we, Re = z();
52
+ function He() {
53
+ return _e;
54
+ }
55
+ (function() {
56
+ function e() {
57
+ Ie(this, e), this.usedNamespaces = {};
58
+ }
59
+ return Ne(e, [{
60
+ key: "addUsedNamespaces",
61
+ value: function(a) {
62
+ var o = this;
63
+ a.forEach(function(c) {
64
+ o.usedNamespaces[c] || (o.usedNamespaces[c] = !0);
65
+ });
66
+ }
67
+ }, {
68
+ key: "getUsedNamespaces",
69
+ value: function() {
70
+ return Object.keys(this.usedNamespaces);
71
+ }
72
+ }]), e;
73
+ })();
74
+ function Ke() {
75
+ return we;
76
+ }
77
+ function K() {
78
+ if (console && console.warn) {
79
+ for (var e, t = arguments.length, a = new Array(t), o = 0; o < t; o++)
80
+ a[o] = arguments[o];
81
+ typeof a[0] == "string" && (a[0] = "react-i18next:: ".concat(a[0])), (e = console).warn.apply(e, a);
82
+ }
83
+ }
84
+ var J = {};
85
+ function Ue() {
86
+ for (var e = arguments.length, t = new Array(e), a = 0; a < e; a++)
87
+ t[a] = arguments[a];
88
+ typeof t[0] == "string" && J[t[0]] || (typeof t[0] == "string" && (J[t[0]] = /* @__PURE__ */ new Date()), K.apply(void 0, t));
89
+ }
90
+ var Be = ["format"], qe = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
91
+ function Q(e, t) {
92
+ var a = Object.keys(e);
93
+ if (Object.getOwnPropertySymbols) {
94
+ var o = Object.getOwnPropertySymbols(e);
95
+ t && (o = o.filter(function(c) {
96
+ return Object.getOwnPropertyDescriptor(e, c).enumerable;
97
+ })), a.push.apply(a, o);
98
+ }
99
+ return a;
100
+ }
101
+ function p(e) {
102
+ for (var t = 1; t < arguments.length; t++) {
103
+ var a = arguments[t] != null ? arguments[t] : {};
104
+ t % 2 ? Q(Object(a), !0).forEach(function(o) {
105
+ Oe(e, o, a[o]);
106
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : Q(Object(a)).forEach(function(o) {
107
+ Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(a, o));
108
+ });
109
+ }
110
+ return e;
111
+ }
112
+ function Y(e, t) {
113
+ if (!e) return !1;
114
+ var a = e.props ? e.props.children : e.children;
115
+ return t ? a.length > 0 : !!a;
116
+ }
117
+ function G(e) {
118
+ return e ? e.props ? e.props.children : e.children : [];
119
+ }
120
+ function Ve(e) {
121
+ return Object.prototype.toString.call(e) !== "[object Array]" ? !1 : e.every(function(t) {
122
+ return U(t);
123
+ });
124
+ }
125
+ function P(e) {
126
+ return Array.isArray(e) ? e : [e];
127
+ }
128
+ function Ye(e, t) {
129
+ var a = p({}, t);
130
+ return a.props = Object.assign(e.props, t.props), a;
131
+ }
132
+ function te(e, t) {
133
+ if (!e) return "";
134
+ var a = "", o = P(e), c = t.transSupportBasicHtmlNodes && t.transKeepBasicHtmlNodesFor ? t.transKeepBasicHtmlNodesFor : [];
135
+ return o.forEach(function(r, g) {
136
+ if (typeof r == "string")
137
+ a += "".concat(r);
138
+ else if (U(r)) {
139
+ var v = Object.keys(r.props).length, d = c.indexOf(r.type) > -1, b = r.props.children;
140
+ if (!b && d && v === 0)
141
+ a += "<".concat(r.type, "/>");
142
+ else if (!b && (!d || v !== 0))
143
+ a += "<".concat(g, "></").concat(g, ">");
144
+ else if (r.props.i18nIsDynamicList)
145
+ a += "<".concat(g, "></").concat(g, ">");
146
+ else if (d && v === 1 && typeof b == "string")
147
+ a += "<".concat(r.type, ">").concat(b, "</").concat(r.type, ">");
148
+ else {
149
+ var T = te(b, t);
150
+ a += "<".concat(g, ">").concat(T, "</").concat(g, ">");
151
+ }
152
+ } else if (r === null)
153
+ K("Trans: the passed in value is invalid - seems you passed in a null child.");
154
+ else if (M(r) === "object") {
155
+ var O = r.format, F = ee(r, Be), A = Object.keys(F);
156
+ if (A.length === 1) {
157
+ var S = O ? "".concat(A[0], ", ").concat(O) : A[0];
158
+ a += "{{".concat(S, "}}");
159
+ } else
160
+ K("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.", r);
161
+ } else
162
+ K("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.", r);
163
+ }), a;
164
+ }
165
+ function Ge(e, t, a, o, c, r) {
166
+ if (t === "") return [];
167
+ var g = o.transKeepBasicHtmlNodesFor || [], v = t && new RegExp(g.join("|")).test(t);
168
+ if (!e && !v) return [t];
169
+ var d = {};
170
+ function b(y) {
171
+ var h = P(y);
172
+ h.forEach(function(s) {
173
+ typeof s != "string" && (Y(s) ? b(G(s)) : M(s) === "object" && !U(s) && Object.assign(d, s));
174
+ });
175
+ }
176
+ b(e);
177
+ var T = he.parse("<0>".concat(t, "</0>")), O = p(p({}, d), c);
178
+ function F(y, h, s) {
179
+ var i = G(y), I = S(i, h.children, s);
180
+ return Ve(i) && I.length === 0 ? i : I;
181
+ }
182
+ function A(y, h, s, i, I) {
183
+ y.dummy && (y.children = h), s.push(R(y, p(p({}, y.props), {}, {
184
+ key: i
185
+ }), I ? void 0 : h));
186
+ }
187
+ function S(y, h, s) {
188
+ var i = P(y), I = P(h);
189
+ return I.reduce(function(l, n, E) {
190
+ var k = n.children && n.children[0] && n.children[0].content && a.services.interpolator.interpolate(n.children[0].content, O, a.language);
191
+ if (n.type === "tag") {
192
+ var N = i[parseInt(n.name, 10)];
193
+ !N && s.length === 1 && s[0][n.name] && (N = s[0][n.name]), N || (N = {});
194
+ var m = Object.keys(n.attrs).length !== 0 ? Ye({
195
+ props: n.attrs
196
+ }, N) : N, D = U(m), q = D && Y(n, !0) && !n.voidElement, _ = v && M(m) === "object" && m.dummy && !D, w = M(e) === "object" && e !== null && Object.hasOwnProperty.call(e, n.name);
197
+ if (typeof m == "string") {
198
+ var V = a.services.interpolator.interpolate(m, O, a.language);
199
+ l.push(V);
200
+ } else if (Y(m) || q) {
201
+ var ne = F(m, n, s);
202
+ A(m, ne, l, E);
203
+ } else if (_) {
204
+ var oe = S(i, n.children, s);
205
+ l.push(R(m, p(p({}, m.props), {}, {
206
+ key: E
207
+ }), oe));
208
+ } else if (Number.isNaN(parseFloat(n.name)))
209
+ if (w) {
210
+ var re = F(m, n, s);
211
+ A(m, re, l, E, n.voidElement);
212
+ } else if (o.transSupportBasicHtmlNodes && g.indexOf(n.name) > -1)
213
+ if (n.voidElement)
214
+ l.push(H(n.name, {
215
+ key: "".concat(n.name, "-").concat(E)
216
+ }));
217
+ else {
218
+ var se = S(i, n.children, s);
219
+ l.push(H(n.name, {
220
+ key: "".concat(n.name, "-").concat(E)
221
+ }, se));
222
+ }
223
+ else if (n.voidElement)
224
+ l.push("<".concat(n.name, " />"));
225
+ else {
226
+ var ce = S(i, n.children, s);
227
+ l.push("<".concat(n.name, ">").concat(ce, "</").concat(n.name, ">"));
228
+ }
229
+ else if (M(m) === "object" && !D) {
230
+ var $ = n.children[0] ? k : null;
231
+ $ && l.push($);
232
+ } else n.children.length === 1 && k ? l.push(R(m, p(p({}, m.props), {}, {
233
+ key: E
234
+ }), k)) : l.push(R(m, p(p({}, m.props), {}, {
235
+ key: E
236
+ })));
237
+ } else if (n.type === "text") {
238
+ var W = o.transWrapTextNodes, X = r ? o.unescape(a.services.interpolator.interpolate(n.content, O, a.language)) : a.services.interpolator.interpolate(n.content, O, a.language);
239
+ W ? l.push(H(W, {
240
+ key: "".concat(n.name, "-").concat(E)
241
+ }, X)) : l.push(X);
242
+ }
243
+ return l;
244
+ }, []);
245
+ }
246
+ var j = S([{
247
+ dummy: !0,
248
+ children: e || []
249
+ }], T, P(e || []));
250
+ return G(j[0]);
251
+ }
252
+ function $e(e) {
253
+ var t = e.children, a = e.count, o = e.parent, c = e.i18nKey, r = e.context, g = e.tOptions, v = g === void 0 ? {} : g, d = e.values, b = e.defaults, T = e.components, O = e.ns, F = e.i18n, A = e.t, S = e.shouldUnescape, j = ee(e, qe), y = Z(Re) || {}, h = y.i18n, s = y.defaultNS, i = F || h || Ke();
254
+ if (!i)
255
+ return Ue("You will need to pass in an i18next instance by using i18nextReactModule"), t;
256
+ var I = A || i.t.bind(i) || function(V) {
257
+ return V;
258
+ };
259
+ r && (v.context = r);
260
+ var l = p(p({}, He()), i.options && i.options.react), n = O || I.ns || s || i.options && i.options.defaultNS;
261
+ n = typeof n == "string" ? [n] : n || ["translation"];
262
+ var E = b || te(t, l) || l.transEmptyNodeValue || c, k = l.hashTransKey, N = c || (k ? k(E) : E), m = d ? v.interpolation : {
263
+ interpolation: p(p({}, v.interpolation), {}, {
264
+ prefix: "#$?",
265
+ suffix: "?$#"
266
+ })
267
+ }, D = p(p(p(p({}, v), {}, {
268
+ count: a
269
+ }, d), m), {}, {
270
+ defaultValue: E,
271
+ ns: n
272
+ }), q = N ? I(N, D) : E, _ = Ge(T || t, q, i, l, D, S), w = o !== void 0 ? o : l.defaultTransParent;
273
+ return w ? H(w, j, _) : _;
274
+ }
275
+ const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */ z(void 0);
276
+ function Je() {
277
+ const e = Z(ae);
278
+ if (e === void 0)
279
+ throw new Error("useEmailSuggestion must be used inside <EmailInput>");
280
+ return e;
281
+ }
282
+ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__PURE__ */ u.createElement(ae.Provider, {
283
+ value: {
284
+ activeSuggestion: e,
285
+ applySuggestion: t
286
+ }
287
+ }, a), ze = ({ className: e }) => {
288
+ const { suggestionId: t } = fe(), { activeSuggestion: a, applySuggestion: o } = Je(), { t: c, i18n: r } = ge();
289
+ return /* @__PURE__ */ u.createElement("div", {
290
+ id: t,
291
+ "data-hook": We,
292
+ "aria-live": "polite",
293
+ className: e
294
+ }, a ? /* @__PURE__ */ u.createElement($e, {
295
+ i18n: r,
296
+ t: c,
297
+ i18nKey: "input.email.mistype-check.suggestion",
298
+ values: {
299
+ email: a
300
+ },
301
+ components: [
302
+ /* @__PURE__ */ u.createElement("button", {
303
+ key: "0",
304
+ type: "button",
305
+ "data-hook": Xe,
306
+ "aria-label": c("input.email.mistype-check.fix-aria-label", {
307
+ email: a
308
+ }),
309
+ onClick: o
310
+ })
311
+ ]
312
+ }) : null);
313
+ }, Ze = {
314
+ "aol.com": [
315
+ "aaol.com",
316
+ "aol.con",
317
+ "aool.com",
318
+ "aol.cpm"
319
+ ],
320
+ "gmail.com": [
321
+ "ail.com",
322
+ "gail.com",
323
+ "gamail.com",
324
+ "gamil.com",
325
+ "gemail.com",
326
+ "gmai.com",
327
+ "gmail.cm",
328
+ "gmail.cmo",
329
+ "gmail.co",
330
+ "gmail.com.com",
331
+ "gmail.con",
332
+ "gmailc.om",
333
+ "gmaill.com",
334
+ "gmaim.com",
335
+ "gmal.com",
336
+ "gmali.com",
337
+ "gmaol.com",
338
+ "gmeil.com",
339
+ "gmial.com",
340
+ "gmqil.com",
341
+ "gmsil.com",
342
+ "gnail.com",
343
+ "hmail.com",
344
+ "fmail.com",
345
+ "gmail.cpm",
346
+ "gmail.vom",
347
+ "gmail.comm"
348
+ ],
349
+ "hotmail.com": [
350
+ "hitmail.com",
351
+ "homail.com",
352
+ "hotmai.com",
353
+ "hotmail.con",
354
+ "hotmaill.com",
355
+ "hotmal.com",
356
+ "hotmali.com",
357
+ "hotmaol.com",
358
+ "hotmial.com",
359
+ "htmail.com",
360
+ "hormail.com",
361
+ "hotmail.cpm",
362
+ "hotmil.com"
363
+ ],
364
+ "icloud.com": [
365
+ "iclod.com",
366
+ "iclou.com",
367
+ "icloud.con",
368
+ "icloude.com",
369
+ "iclould.com",
370
+ "icolud.com",
371
+ "icoud.com",
372
+ "ivloud.com",
373
+ "icloud.cpm"
374
+ ],
375
+ "outlook.com": [
376
+ "otlook.com",
377
+ "outllook.com",
378
+ "outlok.com",
379
+ "outlook.con",
380
+ "outlookk.com",
381
+ "outloook.com",
382
+ "outook.com",
383
+ "outlook.cpm"
384
+ ],
385
+ "yahoo.com": [
386
+ "yagoo.com",
387
+ "yaho.com",
388
+ "yahoo.con",
389
+ "yahooo.com",
390
+ "yahou.com",
391
+ "yaoo.com",
392
+ "yhaoo.com",
393
+ "yhoo.com",
394
+ "yajoo.com",
395
+ "yahoo.cpm"
396
+ ],
397
+ "live.com": [
398
+ "live.con",
399
+ "liv.com",
400
+ "lve.com",
401
+ "live.cpm"
402
+ ],
403
+ "msn.com": [
404
+ "msn.con",
405
+ "msn.com.com",
406
+ "mmsn.com",
407
+ "msn.cpm"
408
+ ],
409
+ "me.com": [
410
+ "me.con",
411
+ "me.cpm"
412
+ ],
413
+ "mac.com": [
414
+ "mac.con",
415
+ "mac.cpm"
416
+ ],
417
+ "comcast.net": [
418
+ "comcast.ne",
419
+ "comcast.nt",
420
+ "comcast.netc",
421
+ "comcast.nrt",
422
+ "comcast.net.net"
423
+ ]
424
+ }, et = new Map(Object.entries(Ze).flatMap(([e, t]) => t.map((a) => [
425
+ a,
426
+ e
427
+ ]))), tt = (e) => {
428
+ const t = e.trim(), a = t.lastIndexOf("@");
429
+ if (a <= 0 || a === t.length - 1)
430
+ return null;
431
+ const o = t.slice(0, a), c = t.slice(a + 1).toLowerCase(), r = et.get(c);
432
+ return r ? `${o}@${r}` : null;
433
+ }, at = ({ email: e, hasError: t }) => {
434
+ const { isExperimentEnabled: a } = ve(), o = a(ye.CHECK_EMAIL_MISTYPE), c = tt((e ?? "").trim()), [r, g] = le(!1), v = me(() => {
435
+ g(o && !t && c !== null);
436
+ }, [
437
+ o,
438
+ t,
439
+ c
440
+ ]);
441
+ return ue(() => {
442
+ g(!1);
443
+ }, [
444
+ e,
445
+ t
446
+ ]), {
447
+ isMistyped: r,
448
+ suggestedEmail: c,
449
+ validate: v
450
+ };
451
+ }, f = ({ children: e }) => {
452
+ const { id: t, value: a, onChange: o, disabled: c, readOnly: r, required: g, hasError: v, onBlur: d, onFocus: b, error: T, description: O, FieldLayout: F } = Ee(), { isMistyped: A, suggestedEmail: S, validate: j } = at({
453
+ email: a,
454
+ hasError: v
455
+ }), { setFocusedFieldId: y } = de(), s = A && (!r && !c) && S ? S : void 0, i = be(t, T, O, s), I = () => {
456
+ o(s), y(t);
457
+ }, l = () => {
458
+ j(), d == null || d();
459
+ }, n = L(e, f.Label), E = L(e, f.Input), k = L(e, f.Description), N = L(e, f.Error), m = L(e, f.Suggestion);
460
+ return /* @__PURE__ */ u.createElement(Se.Provider, {
461
+ value: i
462
+ }, /* @__PURE__ */ u.createElement(Qe, {
463
+ activeSuggestion: s,
464
+ applySuggestion: I
465
+ }, /* @__PURE__ */ u.createElement(F, {
466
+ fieldId: t,
467
+ renderLabel: () => n,
468
+ renderInput: () => /* @__PURE__ */ u.createElement(pe, {
469
+ "aria-labelledby": i.labelId,
470
+ value: a ?? "",
471
+ onChange: o,
472
+ isDisabled: c,
473
+ isReadOnly: r,
474
+ isRequired: g,
475
+ isInvalid: v,
476
+ onBlur: l,
477
+ onFocus: b
478
+ }, E),
479
+ renderDescription: () => /* @__PURE__ */ u.createElement(u.Fragment, null, N, m, k)
480
+ })));
481
+ };
482
+ f.Label = B.Label;
483
+ f.Input = B.Input;
484
+ f.Description = B.Description;
485
+ f.Error = B.Error;
486
+ f.Suggestion = ze;
487
+ const nt = "_suggestion_di65n_1", ot = {
488
+ suggestion: nt
489
+ }, rt = ({ content: e, locale: t }) => /* @__PURE__ */ u.createElement(ie, {
490
+ content: e,
491
+ locale: t
492
+ }), ht = () => /* @__PURE__ */ u.createElement(f, null, /* @__PURE__ */ u.createElement(f.Label, {
493
+ className: x(Fe, C.label)
494
+ }, /* @__PURE__ */ u.createElement(f.Label.Required, {
495
+ className: x(ke, C.requiredMark)
496
+ })), /* @__PURE__ */ u.createElement(f.Input, {
497
+ className: x(Te, C.input)
498
+ }), /* @__PURE__ */ u.createElement(f.Error, {
499
+ className: x(De, C.error)
500
+ }, /* @__PURE__ */ u.createElement(Ae, null), /* @__PURE__ */ u.createElement(f.Error.Text, null)), /* @__PURE__ */ u.createElement(f.Description, {
501
+ className: x(xe, C.description)
502
+ }, rt), /* @__PURE__ */ u.createElement(f.Suggestion, {
503
+ className: x(je, ot.suggestion)
504
+ }));
505
+ export {
506
+ ht as E
507
+ };
@@ -0,0 +1,15 @@
1
+ import e from "react";
2
+ const o = (r) => /* @__PURE__ */ e.createElement("svg", {
3
+ viewBox: "0 0 20 20",
4
+ width: 20,
5
+ height: 20,
6
+ fill: "currentColor",
7
+ "aria-hidden": "true",
8
+ ...r
9
+ }, /* @__PURE__ */ e.createElement("path", {
10
+ fillRule: "evenodd",
11
+ d: "M9.5,3 C13.084,3 16,5.916 16,9.5 C16,13.084 13.084,16 9.5,16 C5.916,16 3,13.084 3,9.5 C3,5.916 5.916,3 9.5,3 Z M9.5,4 C6.467,4 4,6.467 4,9.5 C4,12.533 6.467,15 9.5,15 C12.533,15 15,12.533 15,9.5 C15,6.467 12.533,4 9.5,4 Z M10,11 L10,12 L9,12 L9,11 L10,11 Z M10,7 L10,10 L9,10 L9,7 L10,7 Z"
12
+ }));
13
+ export {
14
+ o as E
15
+ };