@wix/form-elements 0.0.0-stage → 1.53.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.
- package/LICENSE +21 -0
- package/README.md +118 -2
- package/dist/component/appointment-rac-Qa4fzPC_.js +1005 -0
- package/dist/component/bookings-address-rac-D9M-ozbl.js +6 -0
- package/dist/component/bookings-email-rac-BsQBkcmz.js +6 -0
- package/dist/component/bookings-first-name-rac-B3Ttwrj1.js +6 -0
- package/dist/component/bookings-header-rac-D1SGpqGf.js +8 -0
- package/dist/component/bookings-last-name-rac-B9O--4tU.js +6 -0
- package/dist/component/bookings-login-bar-rac-CHzNCOWx.js +74 -0
- package/dist/component/bookings-phone-rac-DhCGxcEU.js +6 -0
- package/dist/component/bookings-rich-text-rac-CftLqeZI.js +8 -0
- package/dist/component/calling-country-codes-PyWuOTmF.js +243 -0
- package/dist/component/checkbox-field-rac-B4NsTbRK.js +625 -0
- package/dist/component/checkbox-group-field-headless-qntvm5XF.js +204 -0
- package/dist/component/checkbox-group-field-rac-DwHc_GX9.js +33 -0
- package/dist/component/checkbox-group-rac-C1L8G1Y6.js +6 -0
- package/dist/component/checkbox-rac-DfbwQtOy.js +6 -0
- package/dist/component/chevron-down-icon-CcpVm6B-.js +15 -0
- package/dist/component/contacts-address-rac-Bstl5CRy.js +6 -0
- package/dist/component/contacts-birthdate-rac-DA4ijdaj.js +6 -0
- package/dist/component/contacts-company-rac-m0NA2GWU.js +6 -0
- package/dist/component/contacts-email-rac-DPVSYPew.js +6 -0
- package/dist/component/contacts-first-name-rac-C-JRqRzG.js +6 -0
- package/dist/component/contacts-last-name-rac-COBf-dyW.js +6 -0
- package/dist/component/contacts-phone-rac-Cw70dW7b.js +6 -0
- package/dist/component/contacts-position-rac-CMz19BR-.js +6 -0
- package/dist/component/contacts-subscribe-rac-KpLlwquo.js +13 -0
- package/dist/component/contacts-tax-id-rac-_uTLfEkF.js +6 -0
- package/dist/component/custom-focus-class-_483Pkwp.js +4 -0
- package/dist/component/data-hooks-Dkw1pbRj.js +6 -0
- package/dist/component/date-availability-DPHhHaFW.js +49 -0
- package/dist/component/date-input-field-rac-BrdGNXKw.js +286 -0
- package/dist/component/date-input-rac-D93biRsl.js +6 -0
- package/dist/component/date-picker-field-rac-ByhJ3Koo.js +304 -0
- package/dist/component/date-picker-rac-CuwcuCmJ.js +6 -0
- package/dist/component/date-time-input-field-rac-DY1u3LS6.js +421 -0
- package/dist/component/date-time-input-rac-BuGAMm_l.js +6 -0
- package/dist/component/default-limits-D7qVv_Hv.js +6 -0
- package/dist/component/dext-checkbox-group-rac-C3jCmtB7.js +18 -0
- package/dist/component/dext-checkbox-rac-dOvFH4gX.js +6 -0
- package/dist/component/dext-date-picker-rac-Bq6xFRoL.js +6 -0
- package/dist/component/dext-date-time-input-rac-9BE7wXiZ.js +6 -0
- package/dist/component/dext-dropdown-rac-j2ACAxk6.js +6 -0
- package/dist/component/dext-email-rac-CLoZGIl3.js +6 -0
- package/dist/component/dext-number-input-rac-D8IxqGdJ.js +6 -0
- package/dist/component/dext-phone-rac-B2Y-Ou4W.js +6 -0
- package/dist/component/dext-radio-group-rac-C88xnXTc.js +18 -0
- package/dist/component/dext-rating-input-rac-BArLS_bA.js +6 -0
- package/dist/component/dext-tags-rac-B9tKb852.js +18 -0
- package/dist/component/dext-text-area-rac-cBh24v0g.js +6 -0
- package/dist/component/dext-text-input-rac-B75yIKQa.js +6 -0
- package/dist/component/dext-url-input-rac-Da6T681p.js +6 -0
- package/dist/component/donation-rac-A0HtRtbH.js +305 -0
- package/dist/component/dropdown-field-headless-CYpFgZ3H.js +84 -0
- package/dist/component/dropdown-field-rac-B5emHw3_.js +32 -0
- package/dist/component/dropdown-rac-CRj3gKMe.js +6 -0
- package/dist/component/ecom-address-rac-ClBWgRGU.js +6 -0
- package/dist/component/ecom-subscription-checkbox-rac-DLvoidqP.js +49 -0
- package/dist/component/email-input-field-rac-Dq1HVu3Y.js +507 -0
- package/dist/component/error-icon-hZxQ6DEy.js +15 -0
- package/dist/component/events-repeater-rac-BwbNXM88.js +247 -0
- package/dist/component/events-rsvp-rac-BzVK7JNO.js +38 -0
- package/dist/component/field-error-headless-D40GACk4.js +34 -0
- package/dist/component/field-label-headless-Beq2Tn6V.js +52 -0
- package/dist/component/field-rac.module-DXfwku6m.js +21 -0
- package/dist/component/fieldset-headless-CD3fds9J.js +54 -0
- package/dist/component/file-upload-rac-BHqXPy1r.js +484 -0
- package/dist/component/find-child-C60k4CxG.js +11 -0
- package/dist/component/fixed-payment-rac-CSmY8yrQ.js +62 -0
- package/dist/component/form-Dn-MrArr.js +8890 -0
- package/dist/component/form-element-classes-Bi-nNM8q.js +55 -0
- package/dist/component/form.css +1 -0
- package/dist/component/form.js +9 -0
- package/dist/component/format-currency-BwShJ9vM.js +44 -0
- package/dist/component/get-first-day-of-the-week-DvnsxYhQ.js +118 -0
- package/dist/component/header-field-rac-DlUZ8kEf.js +25 -0
- package/dist/component/header-rac-CKAFxlLV.js +6 -0
- package/dist/component/headless-styles-CmcyA_pi.js +20 -0
- package/dist/component/helpers-HmkkXrh2.js +12 -0
- package/dist/component/image-choice-rac-DHtMOk8B.js +141 -0
- package/dist/component/index-0TWILUAM.js +64 -0
- package/dist/component/index-DS4A9cSk.js +2290 -0
- package/dist/component/isObject-BAwJJxQ3.js +34 -0
- package/dist/component/messages_ar-BZXnU2Gj.js +3517 -0
- package/dist/component/messages_ar-L1BYLZbF.js +20 -0
- package/dist/component/messages_ar-PAHg01OB.js +299 -0
- package/dist/component/messages_bg-CO56qlOt.js +299 -0
- package/dist/component/messages_bg-CQcGl0Yi.js +20 -0
- package/dist/component/messages_bg-DgbMwIbv.js +3515 -0
- package/dist/component/messages_ca-BAHE5nuo.js +3515 -0
- package/dist/component/messages_ca-BRoHmzRw.js +20 -0
- package/dist/component/messages_ca-Bl6rZi_O.js +299 -0
- package/dist/component/messages_cs-BADd3t_h.js +3515 -0
- package/dist/component/messages_cs-CDyWDExk.js +298 -0
- package/dist/component/messages_cs-wn5UmrBw.js +20 -0
- package/dist/component/messages_da-BPnmb9Qb.js +20 -0
- package/dist/component/messages_da-BvVUWnBz.js +3515 -0
- package/dist/component/messages_da-DHlpaT4q.js +298 -0
- package/dist/component/messages_de-2czOmM8X.js +3515 -0
- package/dist/component/messages_de-BKgzIF1d.js +298 -0
- package/dist/component/messages_de-Bwx84N0O.js +20 -0
- package/dist/component/messages_el-BnuYMjcf.js +299 -0
- package/dist/component/messages_el-_D2RUBSU.js +20 -0
- package/dist/component/messages_el-qCyH12Uq.js +3515 -0
- package/dist/component/messages_en-BWaixPd6.js +3518 -0
- package/dist/component/messages_en-CBBcgtxs.js +296 -0
- package/dist/component/messages_en-DvSLxqKp.js +20 -0
- package/dist/component/messages_es-Cq6i2xci.js +3515 -0
- package/dist/component/messages_es-DlGCLaYi.js +298 -0
- package/dist/component/messages_es-rCKXnGf0.js +20 -0
- package/dist/component/messages_fi-B-ciZGqD.js +3515 -0
- package/dist/component/messages_fi-DzKva_Wq.js +299 -0
- package/dist/component/messages_fi-PCCXPo0O.js +20 -0
- package/dist/component/messages_fr-2im0dcYp.js +3515 -0
- package/dist/component/messages_fr-DMFilq1G.js +298 -0
- package/dist/component/messages_fr-DQa1dT9u.js +20 -0
- package/dist/component/messages_he-Bb1qTc2Y.js +299 -0
- package/dist/component/messages_he-BfIkDo1h.js +3515 -0
- package/dist/component/messages_he-DwIysfDp.js +20 -0
- package/dist/component/messages_hi-Bty6ytCh.js +3515 -0
- package/dist/component/messages_hi-C-6UHGbM.js +298 -0
- package/dist/component/messages_hi-DF1w6b6B.js +20 -0
- package/dist/component/messages_hr-BXzIzU3d.js +20 -0
- package/dist/component/messages_hr-CiU1ZVrx.js +3515 -0
- package/dist/component/messages_hr-tRSM9lmc.js +299 -0
- package/dist/component/messages_hu-ChzHFUtB.js +3515 -0
- package/dist/component/messages_hu-D86Taf9R.js +299 -0
- package/dist/component/messages_hu-Z9XpByCO.js +20 -0
- package/dist/component/messages_id-3952ilBE.js +20 -0
- package/dist/component/messages_id-CPuhTUYV.js +298 -0
- package/dist/component/messages_id-Ddr3ijST.js +3515 -0
- package/dist/component/messages_it-B-A1X4BZ.js +298 -0
- package/dist/component/messages_it-DnUTUabT.js +20 -0
- package/dist/component/messages_it-eY6GnuZC.js +3515 -0
- package/dist/component/messages_ja-B3PxHv2c.js +3515 -0
- package/dist/component/messages_ja-Ced6ZBxD.js +298 -0
- package/dist/component/messages_ja-Cg7CqBUL.js +20 -0
- package/dist/component/messages_ko-DBCjHG4c.js +3515 -0
- package/dist/component/messages_ko-PKIrqwPk.js +298 -0
- package/dist/component/messages_ko-zvhtZMGA.js +20 -0
- package/dist/component/messages_lt-DV3hdFsp.js +3515 -0
- package/dist/component/messages_lt-DywusvNm.js +20 -0
- package/dist/component/messages_lt-zxcCPHno.js +299 -0
- package/dist/component/messages_lv-BEowUv-S.js +299 -0
- package/dist/component/messages_lv-DggJE2f9.js +20 -0
- package/dist/component/messages_lv-hIonzpTs.js +3515 -0
- package/dist/component/messages_ms-Ca0m7bf7.js +20 -0
- package/dist/component/messages_ms-Cvypo0vi.js +299 -0
- package/dist/component/messages_ms-DoMzA8a3.js +3515 -0
- package/dist/component/messages_nl-CEmANR_r.js +3515 -0
- package/dist/component/messages_nl-CZR4TvNo.js +298 -0
- package/dist/component/messages_nl-DgVYmdO9.js +20 -0
- package/dist/component/messages_no-B2BBaGBH.js +298 -0
- package/dist/component/messages_no-DJfJSlDm.js +3515 -0
- package/dist/component/messages_no-hPkfRJQ9.js +20 -0
- package/dist/component/messages_pl-Bzph-WyD.js +20 -0
- package/dist/component/messages_pl-ChJVH7RO.js +3515 -0
- package/dist/component/messages_pl-rCMsbMbN.js +298 -0
- package/dist/component/messages_pt-Bv63V1uB.js +3515 -0
- package/dist/component/messages_pt-CBgCNF3T.js +20 -0
- package/dist/component/messages_pt-Cx0FF6uF.js +298 -0
- package/dist/component/messages_ro-BvLoD_wE.js +299 -0
- package/dist/component/messages_ro-CMzcu-9b.js +20 -0
- package/dist/component/messages_ro-PVRK7Gx4.js +3515 -0
- package/dist/component/messages_ru-8BI6MYA0.js +3515 -0
- package/dist/component/messages_ru-BhRKVmVC.js +298 -0
- package/dist/component/messages_ru-C_BaQo57.js +20 -0
- package/dist/component/messages_sk-Bgi_3583.js +3515 -0
- package/dist/component/messages_sk-CrsC7rOj.js +20 -0
- package/dist/component/messages_sk-CtF-ei23.js +299 -0
- package/dist/component/messages_sl-B5t-KKi8.js +299 -0
- package/dist/component/messages_sl-BFdYWVHd.js +3515 -0
- package/dist/component/messages_sl-NqfmyUP1.js +20 -0
- package/dist/component/messages_sv-Bd1CcY6G.js +3515 -0
- package/dist/component/messages_sv-DPRT-DpN.js +20 -0
- package/dist/component/messages_sv-bQwbNmjr.js +298 -0
- package/dist/component/messages_th-BauH9qdo.js +20 -0
- package/dist/component/messages_th-C_dL_PCq.js +298 -0
- package/dist/component/messages_th-DEWm01uD.js +3515 -0
- package/dist/component/messages_tl-CouXLNcW.js +299 -0
- package/dist/component/messages_tl-D2t9Y_ZC.js +3515 -0
- package/dist/component/messages_tl-UDZY8Wuk.js +20 -0
- package/dist/component/messages_tr-2-OHesob.js +3515 -0
- package/dist/component/messages_tr-CpsxYTDb.js +20 -0
- package/dist/component/messages_tr-DHXnlj_j.js +298 -0
- package/dist/component/messages_uk-CPK4y5lH.js +298 -0
- package/dist/component/messages_uk-DIuQ2HoD.js +3515 -0
- package/dist/component/messages_uk-gPkmA_ar.js +20 -0
- package/dist/component/messages_vi-CgxB4Ey0.js +20 -0
- package/dist/component/messages_vi-DZeFWgwp.js +3515 -0
- package/dist/component/messages_vi-Det8i7_V.js +298 -0
- package/dist/component/messages_zh-D53_A4N9.js +298 -0
- package/dist/component/messages_zh-O552w5dp.js +20 -0
- package/dist/component/messages_zh-nG7LNxIt.js +3515 -0
- package/dist/component/multiline-address-field-rac-C0PUrp9n.js +1574 -0
- package/dist/component/multiline-address-rac-BuIrCxJO.js +6 -0
- package/dist/component/non-modal-popover-DtIMXHbe.js +63 -0
- package/dist/component/number-input-field-rac-DY3hBv5k.js +89 -0
- package/dist/component/number-input-rac-LU2RRhXv.js +6 -0
- package/dist/component/numeric-input-utils-CuBMi4-a.js +45 -0
- package/dist/component/options-layout-constants-DEfIEJWD.js +6 -0
- package/dist/component/options-rac.module-KM-VT_KY.js +7 -0
- package/dist/component/password-rac-CKUa-xXB.js +142 -0
- package/dist/component/payment-field-utils-DobiK5Xh.js +12 -0
- package/dist/component/payment-input-rac-4-nB0Dtf.js +137 -0
- package/dist/component/phone-input-field-rac-D-WSiybW.js +473 -0
- package/dist/component/phone-rac-CHpAV4y9.js +6 -0
- package/dist/component/product-list-rac-43aeb4bH.js +263 -0
- package/dist/component/quiz-radio-group-rac-CIp82PU6.js +13 -0
- package/dist/component/radio-group-field-rac-Ctu5L43b.js +40 -0
- package/dist/component/radio-group-field-rac.module-xWCK2zEh.js +124 -0
- package/dist/component/radio-group-rac-C2z9k9zW.js +6 -0
- package/dist/component/rating-input-field-rac-FGf61_-a.js +130 -0
- package/dist/component/rating-input-rac-B4_5V8X4.js +6 -0
- package/dist/component/rich-content-rac.module-DuFIPLXP.js +49 -0
- package/dist/component/rich-text-field-rac-B1PbdTgi.js +22 -0
- package/dist/component/rich-text-rac-D1PDXRg5.js +6 -0
- package/dist/component/ricos-viewer-chunk-B4rfbgjA.js +5 -0
- package/dist/component/service-dropdown-rac-DIFcHwYR.js +142 -0
- package/dist/component/services-multi-choice-rac-BVgZsVc2.js +76 -0
- package/dist/component/signature-rac-DoznfA7u.js +795 -0
- package/dist/component/submit-button-rac-DQFhhUWx.js +115 -0
- package/dist/component/tags-field-rac-F3yYmtiN.js +201 -0
- package/dist/component/tags-rac-BkJ8931D.js +6 -0
- package/dist/component/text-area-field-rac-BQXCdqvK.js +69 -0
- package/dist/component/text-area-rac-CI4idsCI.js +6 -0
- package/dist/component/text-input-field-rac-Di3rvMr8.js +24 -0
- package/dist/component/text-input-headless-BFldUMDr.js +44 -0
- package/dist/component/text-input-rac-v2DSKy7B.js +6 -0
- package/dist/component/time-input-rac-CcbyfeiV.js +152 -0
- package/dist/component/url-input-field-rac-CcMmHuDT.js +71 -0
- package/dist/component/url-input-rac-DtbctKi2.js +6 -0
- package/dist/component/use-invoke-callback-UH73A_J3.js +15 -0
- package/dist/component/use-service-options-base-Cr8hJp01.js +48 -0
- package/dist/component/use-synced-display-value-DcAxdn3M.js +19 -0
- package/dist/form.d.ts +6930 -0
- 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-Dn-MrArr.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-BFldUMDr.js";
|
|
14
|
+
import { E as Ae } from "./error-icon-hZxQ6DEy.js";
|
|
15
|
+
import { s as C } from "./field-rac.module-DXfwku6m.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
|
+
"<": "<",
|
|
21
|
+
"<": "<",
|
|
22
|
+
">": ">",
|
|
23
|
+
">": ">",
|
|
24
|
+
"'": "'",
|
|
25
|
+
"'": "'",
|
|
26
|
+
""": '"',
|
|
27
|
+
""": '"',
|
|
28
|
+
" ": " ",
|
|
29
|
+
" ": " ",
|
|
30
|
+
"©": "©",
|
|
31
|
+
"©": "©",
|
|
32
|
+
"®": "®",
|
|
33
|
+
"®": "®",
|
|
34
|
+
"…": "…",
|
|
35
|
+
"…": "…",
|
|
36
|
+
"/": "/",
|
|
37
|
+
"/": "/"
|
|
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
|
+
};
|