@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.
- package/LICENSE +21 -0
- package/README.md +118 -2
- package/dist/component/appointment-rac-DlOqbFoi.js +1005 -0
- package/dist/component/bookings-address-rac-CvK-P3df.js +6 -0
- package/dist/component/bookings-email-rac-9BEPTuox.js +6 -0
- package/dist/component/bookings-first-name-rac-BrU-BtPp.js +6 -0
- package/dist/component/bookings-header-rac-8NCL7fxp.js +8 -0
- package/dist/component/bookings-last-name-rac-DgLqZ1nS.js +6 -0
- package/dist/component/bookings-login-bar-rac-C2pzRMyt.js +74 -0
- package/dist/component/bookings-phone-rac-BrPBAo8B.js +6 -0
- package/dist/component/bookings-rich-text-rac-qpPsyIuc.js +8 -0
- package/dist/component/calling-country-codes-PyWuOTmF.js +243 -0
- package/dist/component/checkbox-field-rac-CaloY2Hs.js +625 -0
- package/dist/component/checkbox-group-field-headless-4HlJmarB.js +204 -0
- package/dist/component/checkbox-group-field-rac-B1tFZT3o.js +33 -0
- package/dist/component/checkbox-group-rac-C0SzN2Bx.js +6 -0
- package/dist/component/checkbox-rac-ssJIVvZI.js +6 -0
- package/dist/component/chevron-down-icon-CcpVm6B-.js +15 -0
- package/dist/component/contacts-address-rac-Dwf4yrGq.js +6 -0
- package/dist/component/contacts-birthdate-rac-C195rG5w.js +6 -0
- package/dist/component/contacts-company-rac-BHX6xZU8.js +6 -0
- package/dist/component/contacts-email-rac-CFY-m-r2.js +6 -0
- package/dist/component/contacts-first-name-rac-D23QFUGK.js +6 -0
- package/dist/component/contacts-last-name-rac-COuQB15p.js +6 -0
- package/dist/component/contacts-phone-rac-BfhY_I7p.js +6 -0
- package/dist/component/contacts-position-rac-D80_knc8.js +6 -0
- package/dist/component/contacts-subscribe-rac--NuPoBFm.js +13 -0
- package/dist/component/contacts-tax-id-rac-BURE313k.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-BQyNH-7j.js +49 -0
- package/dist/component/date-input-field-rac-BnFvhqe1.js +286 -0
- package/dist/component/date-input-rac-TLkITFRh.js +6 -0
- package/dist/component/date-picker-field-rac-BAFKYE1B.js +304 -0
- package/dist/component/date-picker-rac-uBJQkALE.js +6 -0
- package/dist/component/date-time-input-field-rac-DnOkBj7w.js +421 -0
- package/dist/component/date-time-input-rac-BxbWyK23.js +6 -0
- package/dist/component/default-limits-D7qVv_Hv.js +6 -0
- package/dist/component/dext-checkbox-group-rac-DnifcsEZ.js +18 -0
- package/dist/component/dext-checkbox-rac-D45Ok0J4.js +6 -0
- package/dist/component/dext-date-picker-rac-Cs47jywn.js +6 -0
- package/dist/component/dext-date-time-input-rac-UPwXpk2g.js +6 -0
- package/dist/component/dext-dropdown-rac-D18mhUDU.js +6 -0
- package/dist/component/dext-email-rac-B4frwTvA.js +6 -0
- package/dist/component/dext-number-input-rac-CoS-Fk59.js +6 -0
- package/dist/component/dext-phone-rac-DwR0JLia.js +6 -0
- package/dist/component/dext-radio-group-rac-DogWvoUg.js +18 -0
- package/dist/component/dext-rating-input-rac-C4NxeIto.js +6 -0
- package/dist/component/dext-tags-rac-DsEenrft.js +18 -0
- package/dist/component/dext-text-area-rac-Du-FqTqW.js +6 -0
- package/dist/component/dext-text-input-rac-DUE8JE9b.js +6 -0
- package/dist/component/dext-url-input-rac-Cn55pV9m.js +6 -0
- package/dist/component/donation-rac-Cjk_hFm1.js +305 -0
- package/dist/component/dropdown-field-headless-Dcy46MWj.js +84 -0
- package/dist/component/dropdown-field-rac-rMMPzKxL.js +32 -0
- package/dist/component/dropdown-rac-C6B8C8Yc.js +6 -0
- package/dist/component/ecom-address-rac-1wNixzip.js +6 -0
- package/dist/component/ecom-subscription-checkbox-rac-C5z68KHa.js +49 -0
- package/dist/component/email-input-field-rac-C7Wn2XVU.js +507 -0
- package/dist/component/error-icon-hZxQ6DEy.js +15 -0
- package/dist/component/events-repeater-rac-DTv4JD79.js +247 -0
- package/dist/component/events-rsvp-rac-cS7Mb04F.js +38 -0
- package/dist/component/field-error-headless-Dm5UCOBb.js +34 -0
- package/dist/component/field-label-headless-C7mDzdLq.js +52 -0
- package/dist/component/field-rac.module-DAPTqFDM.js +21 -0
- package/dist/component/fieldset-headless-CD3fds9J.js +54 -0
- package/dist/component/file-upload-rac-DeZvh7dy.js +484 -0
- package/dist/component/find-child-C60k4CxG.js +11 -0
- package/dist/component/fixed-payment-rac-D7t5DjVp.js +62 -0
- package/dist/component/form-DaOKiR16.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-hJSXllPm.js +25 -0
- package/dist/component/header-rac-G_lsddOd.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-BHyAKRDt.js +141 -0
- package/dist/component/index-CFW1VXFU.js +64 -0
- package/dist/component/index-CkCSQD3_.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-CwLOzNF6.js +1574 -0
- package/dist/component/multiline-address-rac-C4JXBlFC.js +6 -0
- package/dist/component/non-modal-popover-DtIMXHbe.js +63 -0
- package/dist/component/number-input-field-rac-BOeiugCV.js +89 -0
- package/dist/component/number-input-rac-NqbFwW0d.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-DxCYgvu_.js +142 -0
- package/dist/component/payment-field-utils-DobiK5Xh.js +12 -0
- package/dist/component/payment-input-rac-C2aof0p0.js +137 -0
- package/dist/component/phone-input-field-rac-Cd7RFaoD.js +473 -0
- package/dist/component/phone-rac-4MQREqBG.js +6 -0
- package/dist/component/product-list-rac-CjoepDQ_.js +263 -0
- package/dist/component/quiz-radio-group-rac-CIwk7N3X.js +13 -0
- package/dist/component/radio-group-field-rac-DE2mnUHD.js +40 -0
- package/dist/component/radio-group-field-rac.module-DEP9BCiX.js +124 -0
- package/dist/component/radio-group-rac-XE6CeGnp.js +6 -0
- package/dist/component/rating-input-field-rac-BzAAMipp.js +130 -0
- package/dist/component/rating-input-rac-oIvpEVjK.js +6 -0
- package/dist/component/rich-content-rac.module-cis7mx3M.js +49 -0
- package/dist/component/rich-text-field-rac-CqkM22CI.js +22 -0
- package/dist/component/rich-text-rac-BKbz3TcX.js +6 -0
- package/dist/component/ricos-viewer-chunk-B4rfbgjA.js +5 -0
- package/dist/component/service-dropdown-rac-CfCMbT9d.js +142 -0
- package/dist/component/services-multi-choice-rac-F2h5gUOr.js +76 -0
- package/dist/component/signature-rac-CIRsmZhS.js +795 -0
- package/dist/component/submit-button-rac-BELGrClx.js +115 -0
- package/dist/component/tags-field-rac-B6Hg2XOI.js +201 -0
- package/dist/component/tags-rac-Dfv8VP7J.js +6 -0
- package/dist/component/text-area-field-rac-Bsd1V2Q3.js +69 -0
- package/dist/component/text-area-rac-BNVdI-Gq.js +6 -0
- package/dist/component/text-input-field-rac-DF9dD_KW.js +24 -0
- package/dist/component/text-input-headless-Dlao2R8f.js +44 -0
- package/dist/component/text-input-rac-C2p7E01b.js +6 -0
- package/dist/component/time-input-rac-90mLBZsX.js +152 -0
- package/dist/component/url-input-field-rac-bCEOlctr.js +71 -0
- package/dist/component/url-input-rac-D5o8b9gx.js +6 -0
- package/dist/component/use-invoke-callback-UH73A_J3.js +15 -0
- package/dist/component/use-service-options-base-DO5hy6mn.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,473 @@
|
|
|
1
|
+
import { RicosViewer as ye } from "@wix/ricos/viewer";
|
|
2
|
+
import b from "classnames";
|
|
3
|
+
import t, { useMemo as B, useState as k, useRef as v, useEffect as w, useCallback as j, createContext as te, useContext as V } from "react";
|
|
4
|
+
import { a1 as Ee, aq as P, aa as ne, ap as fe, ag as M, ad as oe, ai as he } from "./form-DaOKiR16.js";
|
|
5
|
+
import { UNSAFE_PortalProvider as ge } from "react-aria";
|
|
6
|
+
import { Dialog as re, OverlayTriggerStateContext as be, ModalOverlay as _e, Modal as Ne, SearchField as Oe, ListBoxItem as Se, Group as Q, DialogTrigger as Le, Select as Ie, Input as ae, ListBox as ve, Autocomplete as Pe } from "react-aria-components";
|
|
7
|
+
import { f as h, a as ce } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as Fe, E as De } from "./field-error-headless-Dm5UCOBb.js";
|
|
9
|
+
import { L as Re } from "./field-label-headless-C7mDzdLq.js";
|
|
10
|
+
import { N as xe, S as Be } from "./non-modal-popover-DtIMXHbe.js";
|
|
11
|
+
import { u as Me } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
+
import se, { AsYouType as $e, isValidPhoneNumber as Ae, isSupportedCountry as Te } from "libphonenumber-js";
|
|
13
|
+
import "libphonenumber-js/metadata.min.json";
|
|
14
|
+
import { C as W } from "./calling-country-codes-PyWuOTmF.js";
|
|
15
|
+
import { C as we } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
+
import { E as Ue } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
+
import { H as J } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
+
import { s as _ } from "./field-rac.module-DAPTqFDM.js";
|
|
19
|
+
import { r as qe, H as ke, q as Ve, u as He, l as Ge, h as Ye } from "./form-element-classes-Bi-nNM8q.js";
|
|
20
|
+
function X(e) {
|
|
21
|
+
const n = e ? se(e) : void 0, r = n == null ? void 0 : n.country;
|
|
22
|
+
if (r)
|
|
23
|
+
return r;
|
|
24
|
+
const o = new $e();
|
|
25
|
+
return e && o.input(e), o.getCountry();
|
|
26
|
+
}
|
|
27
|
+
function H(e) {
|
|
28
|
+
var n;
|
|
29
|
+
return e && ((n = Ee.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
30
|
+
}
|
|
31
|
+
function U(e) {
|
|
32
|
+
return e === null ? null : e.replace(/[^0-9+]/g, "") || e;
|
|
33
|
+
}
|
|
34
|
+
function ee(e, n) {
|
|
35
|
+
if (e && n)
|
|
36
|
+
try {
|
|
37
|
+
const r = se(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
38
|
+
if (o && Ae(o))
|
|
39
|
+
return o.replace(/\s+/g, "");
|
|
40
|
+
} catch {
|
|
41
|
+
}
|
|
42
|
+
return e;
|
|
43
|
+
}
|
|
44
|
+
function ze() {
|
|
45
|
+
const { t: e } = P(), { language: n } = ne();
|
|
46
|
+
return B(() => Object.keys(W).reduce((o, a) => {
|
|
47
|
+
const c = W[a], l = H(c), u = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
48
|
+
return l && Te(a) && o.push({
|
|
49
|
+
countryName: u,
|
|
50
|
+
longCountryCode: c,
|
|
51
|
+
shortCountryCode: a,
|
|
52
|
+
callingCode: l
|
|
53
|
+
}), o;
|
|
54
|
+
}, []).sort((o, a) => o.countryName.localeCompare(a.countryName, n)), [
|
|
55
|
+
e,
|
|
56
|
+
n
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
59
|
+
function Ke(e, n) {
|
|
60
|
+
return e.filter((r) => n && n.length > 0 ? n.includes(r.shortCountryCode) : !0);
|
|
61
|
+
}
|
|
62
|
+
function Ze(e, n) {
|
|
63
|
+
const { countryName: r, callingCode: o, shortCountryCode: a } = e;
|
|
64
|
+
return !!(q(r, n) || q(o, n) || q(a, n));
|
|
65
|
+
}
|
|
66
|
+
function q(e, n) {
|
|
67
|
+
return e.toLowerCase().includes(n.toLowerCase());
|
|
68
|
+
}
|
|
69
|
+
function je({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange: o }) {
|
|
70
|
+
const [a, c] = k(e || ""), l = v(U(e ?? null) ?? ""), [u, i] = k(n);
|
|
71
|
+
fe(() => {
|
|
72
|
+
c(""), l.current = "", i(n), o("");
|
|
73
|
+
});
|
|
74
|
+
const m = B(() => X(a), [
|
|
75
|
+
a
|
|
76
|
+
]);
|
|
77
|
+
w(() => {
|
|
78
|
+
const d = e ?? "";
|
|
79
|
+
d !== l.current && (c(d), l.current = d);
|
|
80
|
+
}, [
|
|
81
|
+
e
|
|
82
|
+
]), w(() => {
|
|
83
|
+
n && !u && i(n);
|
|
84
|
+
}, [
|
|
85
|
+
n,
|
|
86
|
+
u
|
|
87
|
+
]), w(() => {
|
|
88
|
+
i(n ?? m);
|
|
89
|
+
}, [
|
|
90
|
+
m,
|
|
91
|
+
n
|
|
92
|
+
]);
|
|
93
|
+
const C = j((d) => {
|
|
94
|
+
if (c(d), !d) {
|
|
95
|
+
l.current = "", o(null);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const f = X(d);
|
|
99
|
+
i((y) => {
|
|
100
|
+
const O = f || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), S = U(ee(d, O));
|
|
101
|
+
return l.current = S ?? "", o(S), f || y;
|
|
102
|
+
});
|
|
103
|
+
}, [
|
|
104
|
+
r,
|
|
105
|
+
o
|
|
106
|
+
]), p = j((d) => {
|
|
107
|
+
i(d), c((f) => {
|
|
108
|
+
const y = U(ee(f, d));
|
|
109
|
+
return l.current = y ?? "", o(y), f;
|
|
110
|
+
});
|
|
111
|
+
}, [
|
|
112
|
+
o
|
|
113
|
+
]);
|
|
114
|
+
return {
|
|
115
|
+
currentValue: a,
|
|
116
|
+
selectedCountryCode: u,
|
|
117
|
+
handlePhoneChange: C,
|
|
118
|
+
handleCountryCodeChange: p
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
const le = /* @__PURE__ */ te(null), N = () => {
|
|
122
|
+
const e = V(le);
|
|
123
|
+
if (!e)
|
|
124
|
+
throw new Error("Phone input components must be used within PhoneInput component");
|
|
125
|
+
return e;
|
|
126
|
+
}, ue = /* @__PURE__ */ te(null), G = () => {
|
|
127
|
+
const e = V(ue);
|
|
128
|
+
if (!e)
|
|
129
|
+
throw new Error("Option sub-components must be used within Option component");
|
|
130
|
+
return e;
|
|
131
|
+
}, Y = ({ longCountryCode: e, className: n }) => {
|
|
132
|
+
function r(c, l) {
|
|
133
|
+
const u = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", m = `${c}${l === "2x" ? "_2x" : ""}.png`;
|
|
134
|
+
return `${u}${m}`;
|
|
135
|
+
}
|
|
136
|
+
const o = r(e, "1x"), a = r(e, "2x");
|
|
137
|
+
return /* @__PURE__ */ t.createElement("img", {
|
|
138
|
+
src: o,
|
|
139
|
+
srcSet: `${o} 1x, ${a} 2x`,
|
|
140
|
+
alt: "",
|
|
141
|
+
"aria-hidden": "true",
|
|
142
|
+
loading: "lazy",
|
|
143
|
+
className: n
|
|
144
|
+
});
|
|
145
|
+
}, s = ({ children: e }) => {
|
|
146
|
+
var I, L;
|
|
147
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = M(), [u, i] = k(null), m = (L = (I = l == null ? void 0 : l.string) == null ? void 0 : I.phoneOptions) == null ? void 0 : L.allowedCountryCodes, C = ze(), p = B(() => Ke(C, m), [
|
|
148
|
+
C,
|
|
149
|
+
m
|
|
150
|
+
]), d = B(() => p.map((x) => x.shortCountryCode), [
|
|
151
|
+
p
|
|
152
|
+
]), { currentValue: f, selectedCountryCode: y, handlePhoneChange: O, handleCountryCodeChange: S } = je({
|
|
153
|
+
value: r,
|
|
154
|
+
defaultCountryCode: c,
|
|
155
|
+
allowedCountryCodes: d,
|
|
156
|
+
onChange: o
|
|
157
|
+
}), A = h(e, s.Label), F = h(e, s.Control), T = h(e, s.Description), D = h(e, s.Error), R = {
|
|
158
|
+
currentValue: f,
|
|
159
|
+
selectedCountryCode: y,
|
|
160
|
+
handlePhoneChange: O,
|
|
161
|
+
handleCountryCodeChange: S,
|
|
162
|
+
countryCodes: d,
|
|
163
|
+
countries: p,
|
|
164
|
+
popoverContainer: u
|
|
165
|
+
};
|
|
166
|
+
return /* @__PURE__ */ t.createElement(le.Provider, {
|
|
167
|
+
value: R
|
|
168
|
+
}, /* @__PURE__ */ t.createElement(a, {
|
|
169
|
+
fieldId: n,
|
|
170
|
+
renderLabel: () => A,
|
|
171
|
+
renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
172
|
+
ref: i,
|
|
173
|
+
style: {
|
|
174
|
+
display: "contents"
|
|
175
|
+
}
|
|
176
|
+
}), F),
|
|
177
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, T)
|
|
178
|
+
}));
|
|
179
|
+
}, z = ({ children: e, className: n }) => {
|
|
180
|
+
const { inputId: r, labelId: o } = oe(), { hasError: a, disabled: c, readOnly: l } = M(), { t: u } = P(), { selectedCountryCode: i, countries: m } = N(), C = `${r}-country`, p = i ? m.find((O) => O.shortCountryCode === i) : void 0, d = p && H(p.longCountryCode) || "", f = u("field.phone.country-code.aria-label"), y = p ? `${f}, ${p.countryName}, ${d}` : f;
|
|
181
|
+
return /* @__PURE__ */ t.createElement(Be, {
|
|
182
|
+
isDisabled: c || l,
|
|
183
|
+
id: C,
|
|
184
|
+
"aria-label": y,
|
|
185
|
+
"aria-labelledby": o ? `${o} ${C}` : void 0,
|
|
186
|
+
className: n,
|
|
187
|
+
"data-invalid": a || void 0
|
|
188
|
+
}, e);
|
|
189
|
+
}, Qe = ({ className: e }) => {
|
|
190
|
+
const { selectedCountryCode: n, countries: r } = N(), o = r.find((a) => a.shortCountryCode === n);
|
|
191
|
+
return o ? /* @__PURE__ */ t.createElement(Y, {
|
|
192
|
+
className: e,
|
|
193
|
+
longCountryCode: o.longCountryCode
|
|
194
|
+
}) : null;
|
|
195
|
+
}, We = ({ children: e, className: n }) => {
|
|
196
|
+
const { selectedCountryCode: r, countries: o } = N();
|
|
197
|
+
return o.some((c) => c.shortCountryCode === r) ? null : /* @__PURE__ */ t.createElement("span", {
|
|
198
|
+
className: n
|
|
199
|
+
}, e);
|
|
200
|
+
};
|
|
201
|
+
z.Flag = Qe;
|
|
202
|
+
z.EmptyState = We;
|
|
203
|
+
const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...c }) => {
|
|
204
|
+
const { triggerRef: l, optionsRef: u } = c, { popoverContainer: i } = N(), m = h(e, g.Search), C = /* @__PURE__ */ t.createElement(ie, null, e);
|
|
205
|
+
return /* @__PURE__ */ t.createElement(ge, {
|
|
206
|
+
getContainer: () => i
|
|
207
|
+
}, /* @__PURE__ */ t.createElement(xe, {
|
|
208
|
+
ref: u,
|
|
209
|
+
triggerRef: l,
|
|
210
|
+
className: n,
|
|
211
|
+
placement: o,
|
|
212
|
+
offset: a,
|
|
213
|
+
containerPadding: 0
|
|
214
|
+
}, m ? /* @__PURE__ */ t.createElement(re, {
|
|
215
|
+
"aria-label": r
|
|
216
|
+
}, C) : C));
|
|
217
|
+
}, Je = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...c }) => {
|
|
218
|
+
const { optionsRef: l } = c, { selectedCountryCode: u, handleCountryCodeChange: i } = N(), m = V(be);
|
|
219
|
+
return /* @__PURE__ */ t.createElement(_e, {
|
|
220
|
+
className: r,
|
|
221
|
+
isDismissable: !0
|
|
222
|
+
}, /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(Ne, {
|
|
223
|
+
ref: l,
|
|
224
|
+
className: n
|
|
225
|
+
}, /* @__PURE__ */ t.createElement(re, {
|
|
226
|
+
"aria-label": o
|
|
227
|
+
}, /* @__PURE__ */ t.createElement(ie, {
|
|
228
|
+
listBoxProps: {
|
|
229
|
+
"aria-label": o,
|
|
230
|
+
selectionMode: "single",
|
|
231
|
+
selectedKeys: u ? [
|
|
232
|
+
u
|
|
233
|
+
] : [],
|
|
234
|
+
onAction: (C) => {
|
|
235
|
+
i(C), m == null || m.close();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}, e)))));
|
|
239
|
+
}, ie = ({ children: e, listBoxProps: n }) => {
|
|
240
|
+
const { countries: r } = N(), o = h(e, g.Option), a = h(e, g.Search), c = h(e, g.EmptyState), l = /* @__PURE__ */ t.createElement(ve, {
|
|
241
|
+
...n,
|
|
242
|
+
renderEmptyState: c ? () => c : void 0
|
|
243
|
+
}, r.map((u) => {
|
|
244
|
+
const i = H(u.longCountryCode) || "";
|
|
245
|
+
return ce(o, {
|
|
246
|
+
key: u.shortCountryCode,
|
|
247
|
+
countryCode: u.shortCountryCode,
|
|
248
|
+
dialingCode: i,
|
|
249
|
+
countryName: u.countryName,
|
|
250
|
+
longCountryCode: u.longCountryCode
|
|
251
|
+
});
|
|
252
|
+
}));
|
|
253
|
+
return a ? /* @__PURE__ */ t.createElement(Pe, {
|
|
254
|
+
filter: (u, i, m) => {
|
|
255
|
+
const C = r.find((p) => p.shortCountryCode === m.key);
|
|
256
|
+
return !!C && Ze(C, i);
|
|
257
|
+
}
|
|
258
|
+
}, a, l) : l;
|
|
259
|
+
};
|
|
260
|
+
g.Popover = g;
|
|
261
|
+
g.Modal = Je;
|
|
262
|
+
const me = ({ className: e, children: n, "aria-label": r }) => /* @__PURE__ */ t.createElement(Oe, {
|
|
263
|
+
className: e,
|
|
264
|
+
"aria-label": r,
|
|
265
|
+
autoFocus: !0
|
|
266
|
+
}, n), Xe = ({ className: e, placeholder: n }) => /* @__PURE__ */ t.createElement(ae, {
|
|
267
|
+
className: e,
|
|
268
|
+
placeholder: n
|
|
269
|
+
});
|
|
270
|
+
me.Input = Xe;
|
|
271
|
+
g.Search = me;
|
|
272
|
+
const et = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement("div", {
|
|
273
|
+
className: n
|
|
274
|
+
}, e);
|
|
275
|
+
g.EmptyState = et;
|
|
276
|
+
const $ = ({ children: e, className: n, ...r }) => {
|
|
277
|
+
const { countryCode: o, dialingCode: a, countryName: c, longCountryCode: l } = r, u = {
|
|
278
|
+
countryCode: o,
|
|
279
|
+
dialingCode: a,
|
|
280
|
+
countryName: c,
|
|
281
|
+
longCountryCode: l
|
|
282
|
+
}, i = e || /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Ce, null), /* @__PURE__ */ t.createElement(de, null), /* @__PURE__ */ t.createElement(pe, null));
|
|
283
|
+
return /* @__PURE__ */ t.createElement(Se, {
|
|
284
|
+
className: n,
|
|
285
|
+
id: o,
|
|
286
|
+
textValue: `${c} ${a}`
|
|
287
|
+
}, /* @__PURE__ */ t.createElement(ue.Provider, {
|
|
288
|
+
value: u
|
|
289
|
+
}, i));
|
|
290
|
+
}, Ce = ({ className: e }) => {
|
|
291
|
+
const { longCountryCode: n } = G();
|
|
292
|
+
return /* @__PURE__ */ t.createElement(Y, {
|
|
293
|
+
className: e,
|
|
294
|
+
longCountryCode: n
|
|
295
|
+
});
|
|
296
|
+
}, de = ({ className: e }) => {
|
|
297
|
+
const { countryName: n } = G();
|
|
298
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
299
|
+
className: e
|
|
300
|
+
}, n);
|
|
301
|
+
}, pe = ({ className: e }) => {
|
|
302
|
+
const { dialingCode: n } = G();
|
|
303
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
304
|
+
className: e
|
|
305
|
+
}, n);
|
|
306
|
+
};
|
|
307
|
+
$.Flag = Ce;
|
|
308
|
+
$.Name = de;
|
|
309
|
+
$.Code = pe;
|
|
310
|
+
g.Option = $;
|
|
311
|
+
const tt = ({ className: e }) => {
|
|
312
|
+
const { t: n } = P(), { inputId: r, ariaDescribedBy: o } = oe(), { id: a, placeholder: c, disabled: l, readOnly: u, required: i, label: m, hasError: C } = M(), { currentValue: p, handlePhoneChange: d } = N(), f = v(null);
|
|
313
|
+
return he(() => {
|
|
314
|
+
var y;
|
|
315
|
+
(y = f.current) == null || y.focus({
|
|
316
|
+
preventScroll: !0
|
|
317
|
+
});
|
|
318
|
+
}, a), /* @__PURE__ */ t.createElement(ae, {
|
|
319
|
+
ref: f,
|
|
320
|
+
id: r,
|
|
321
|
+
type: "tel",
|
|
322
|
+
value: p,
|
|
323
|
+
onChange: (y) => d(y.target.value),
|
|
324
|
+
disabled: l,
|
|
325
|
+
readOnly: u,
|
|
326
|
+
required: i,
|
|
327
|
+
"aria-label": `${m}. ${n("field.phone.aria-label")}`,
|
|
328
|
+
"aria-describedby": o,
|
|
329
|
+
"aria-invalid": C,
|
|
330
|
+
placeholder: c,
|
|
331
|
+
className: e
|
|
332
|
+
});
|
|
333
|
+
}, nt = ({ children: e, className: n }) => {
|
|
334
|
+
const r = v(null), o = v(null), a = v(!1), { disabled: c, readOnly: l, required: u, hasError: i, showFlag: m, onFocus: C, onBlur: p } = M(), d = Me(p), { t: f } = P(), { selectedCountryCode: y, handleCountryCodeChange: O, countries: S } = N(), A = h(e, s.CountryButton), F = h(e, s.CountryOptions.Modal), T = F ?? h(e, s.CountryOptions.Popover), D = h(e, s.PhoneNumber), R = {
|
|
335
|
+
onFocus: () => {
|
|
336
|
+
a.current || (a.current = !0, C == null || C());
|
|
337
|
+
},
|
|
338
|
+
onBlur: (L) => {
|
|
339
|
+
var K, Z;
|
|
340
|
+
const x = L.relatedTarget;
|
|
341
|
+
!((K = r.current) != null && K.contains(x)) && !((Z = o.current) != null && Z.contains(x)) && (a.current = !1, d());
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
if (S.length === 1)
|
|
345
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
346
|
+
ref: r,
|
|
347
|
+
className: n,
|
|
348
|
+
isDisabled: c,
|
|
349
|
+
isInvalid: i,
|
|
350
|
+
...R
|
|
351
|
+
}, m && /* @__PURE__ */ t.createElement(Y, {
|
|
352
|
+
longCountryCode: S[0].longCountryCode
|
|
353
|
+
}), D);
|
|
354
|
+
const I = /* @__PURE__ */ t.createElement(t.Fragment, null, A, ce(T, {
|
|
355
|
+
triggerRef: r,
|
|
356
|
+
optionsRef: o
|
|
357
|
+
}));
|
|
358
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
359
|
+
ref: r,
|
|
360
|
+
className: n,
|
|
361
|
+
isDisabled: c,
|
|
362
|
+
isInvalid: i,
|
|
363
|
+
...R
|
|
364
|
+
}, F ? /* @__PURE__ */ t.createElement(Le, null, I) : /* @__PURE__ */ t.createElement(Ie, {
|
|
365
|
+
"aria-label": f("field.phone.country-code.aria-label"),
|
|
366
|
+
value: y ?? null,
|
|
367
|
+
onChange: (L) => O(L),
|
|
368
|
+
isDisabled: c || l,
|
|
369
|
+
isInvalid: i,
|
|
370
|
+
isRequired: u,
|
|
371
|
+
placeholder: ""
|
|
372
|
+
}, I), D);
|
|
373
|
+
};
|
|
374
|
+
s.Label = Re;
|
|
375
|
+
s.Control = nt;
|
|
376
|
+
s.CountryButton = z;
|
|
377
|
+
s.CountryOptions = g;
|
|
378
|
+
s.PhoneNumber = tt;
|
|
379
|
+
s.Description = Fe;
|
|
380
|
+
s.Error = De;
|
|
381
|
+
const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
382
|
+
width: 24,
|
|
383
|
+
height: 24,
|
|
384
|
+
viewBox: "0 0 24 24",
|
|
385
|
+
fill: "currentColor",
|
|
386
|
+
"aria-hidden": "true",
|
|
387
|
+
...e
|
|
388
|
+
}, /* @__PURE__ */ t.createElement("path", {
|
|
389
|
+
fillRule: "evenodd",
|
|
390
|
+
d: "M11.5,19 C11.331,19 11.166,18.985 11,18.975 L11,16.5 C11,16.224 10.776,16 10.5,16 L9.5,16 C9.224,16 9,15.775 9,15.5 L9,12.5 C9,12.366 8.947,12.238 8.852,12.145 L4.804,8.14 C6.04,5.688 8.573,4 11.5,4 C12.76,4 13.946,4.315 14.989,4.866 L15,6.497 C15.001,6.631 14.949,6.757 14.855,6.853 C14.76,6.947 14.634,7 14.5,7 L12.339,7 C12.207,7 12.08,7.053 11.986,7.146 L10.146,8.983 C10.053,9.077 10,9.204 10,9.337 L10,10.5 C10,11.325 10.672,11.999 11.499,12 L15.293,12 L17,13.707 L17,16.582 C15.629,18.064 13.674,19 11.5,19 M4,11.5 C4,10.673 4.14,9.879 4.388,9.135 L8,12.709 L8,15.5 C8,16.327 8.673,17 9.5,17 L10,17 L10,18.849 C6.581,18.152 4,15.122 4,11.5 M19,11.5 C19,12.856 18.632,14.127 18,15.226 L18,13.5 C18,13.367 17.947,13.24 17.854,13.146 L15.854,11.146 C15.76,11.053 15.633,11 15.5,11 L11.5,11 C11.224,11 11,10.775 11,10.5 L11,9.544 L12.546,8 L14.5,8 C14.902,8 15.281,7.843 15.564,7.557 C15.848,7.271 16.003,6.892 16,6.49 L15.993,5.51 C17.814,6.879 19,9.051 19,11.5 M11.5,3 C6.813,3 3,6.813 3,11.5 C3,16.187 6.813,20 11.5,20 C16.187,20 20,16.187 20,11.5 C20,6.813 16.187,3 11.5,3"
|
|
391
|
+
})), rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
392
|
+
width: 24,
|
|
393
|
+
height: 24,
|
|
394
|
+
viewBox: "0 0 24 24",
|
|
395
|
+
fill: "currentColor",
|
|
396
|
+
"aria-hidden": "true",
|
|
397
|
+
...e
|
|
398
|
+
}, /* @__PURE__ */ t.createElement("path", {
|
|
399
|
+
fillRule: "evenodd",
|
|
400
|
+
d: "M6.6108,14.3887 C5.5718,13.3497 4.9998,11.9687 4.9998,10.4997 C4.9998,9.0317 5.5718,7.6507 6.6108,6.6117 C7.6498,5.5727 9.0308,4.9997 10.4998,4.9997 C11.9688,4.9997 13.3498,5.5727 14.3888,6.6117 C15.4278,7.6507 15.9998,9.0317 15.9998,10.4997 C15.9998,11.9687 15.4278,13.3497 14.3888,14.3887 C13.3498,15.4277 11.9688,15.9997 10.4998,15.9997 C9.0308,15.9997 7.6498,15.4277 6.6108,14.3887 L6.6108,14.3887 Z M20.0028,19.2957 L15.4328,14.7247 C16.4438,13.5477 16.9998,12.0687 16.9998,10.4997 C16.9998,8.7637 16.3238,7.1317 15.0958,5.9047 C13.8688,4.6767 12.2358,3.9997 10.4998,3.9997 C8.7638,3.9997 7.1318,4.6767 5.9038,5.9047 C4.6758,7.1317 3.9998,8.7637 3.9998,10.4997 C3.9998,12.2367 4.6758,13.8677 5.9038,15.0957 C7.1318,16.3237 8.7638,16.9997 10.4998,16.9997 C12.0688,16.9997 13.5478,16.4437 14.7258,15.4317 L19.2958,20.0027 L20.0028,19.2957 Z"
|
|
401
|
+
})), at = "_control_5ca23_1", ct = "_countryButton_5ca23_9", st = "_chevron_5ca23_25", lt = "_globeIcon_5ca23_34", ut = "_searchIcon_5ca23_35", it = "_flag_5ca23_44", mt = "_phoneNumber_5ca23_59", Ct = "_countryOptions_5ca23_85", dt = "_option_5ca23_93", pt = "_countrySearchContainer_5ca23_102", yt = "_countrySearch_5ca23_102", Et = "_name_5ca23_144", ft = "_code_5ca23_148", ht = "_mobileOverlay_5ca23_164", gt = "_mobileDrawer_5ca23_174", E = {
|
|
402
|
+
control: at,
|
|
403
|
+
countryButton: ct,
|
|
404
|
+
chevron: st,
|
|
405
|
+
globeIcon: lt,
|
|
406
|
+
searchIcon: ut,
|
|
407
|
+
flag: it,
|
|
408
|
+
phoneNumber: mt,
|
|
409
|
+
countryOptions: Ct,
|
|
410
|
+
option: dt,
|
|
411
|
+
countrySearchContainer: pt,
|
|
412
|
+
countrySearch: yt,
|
|
413
|
+
name: Et,
|
|
414
|
+
code: ft,
|
|
415
|
+
mobileOverlay: ht,
|
|
416
|
+
mobileDrawer: gt
|
|
417
|
+
}, bt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(ye, {
|
|
418
|
+
content: e,
|
|
419
|
+
locale: n
|
|
420
|
+
}), _t = () => /* @__PURE__ */ t.createElement("span", {
|
|
421
|
+
className: E.chevron,
|
|
422
|
+
"aria-hidden": "true"
|
|
423
|
+
}, /* @__PURE__ */ t.createElement(we, null)), kt = () => {
|
|
424
|
+
const { t: e } = P(), { isMobile: n, PortalContainer: r } = ne(), o = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
425
|
+
className: E.countrySearchContainer,
|
|
426
|
+
"aria-label": e("field.phone.country-search-input.aria-label")
|
|
427
|
+
}, /* @__PURE__ */ t.createElement(rt, {
|
|
428
|
+
className: E.searchIcon
|
|
429
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Search.Input, {
|
|
430
|
+
className: b(E.countrySearch, J),
|
|
431
|
+
placeholder: e("field.phone.country-search-input.placeholder")
|
|
432
|
+
})), a = /* @__PURE__ */ t.createElement(s.CountryOptions.EmptyState, null, e("field.phone.country-selector-dropdown.no-result")), c = /* @__PURE__ */ t.createElement(s.CountryOptions.Option, {
|
|
433
|
+
className: b(_.selectOption, _.selectOptionWithoutFocusRing, E.option, J)
|
|
434
|
+
}, /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Flag, {
|
|
435
|
+
className: E.flag
|
|
436
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Name, {
|
|
437
|
+
className: E.name
|
|
438
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Code, {
|
|
439
|
+
className: E.code
|
|
440
|
+
}));
|
|
441
|
+
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
442
|
+
className: b(qe, _.label)
|
|
443
|
+
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
444
|
+
className: b(ke, _.requiredMark)
|
|
445
|
+
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
446
|
+
className: b(Ve, _.input, E.control)
|
|
447
|
+
}, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
448
|
+
className: E.countryButton
|
|
449
|
+
}, /* @__PURE__ */ t.createElement(s.CountryButton.Flag, {
|
|
450
|
+
className: E.flag
|
|
451
|
+
}), /* @__PURE__ */ t.createElement(s.CountryButton.EmptyState, null, /* @__PURE__ */ t.createElement(ot, {
|
|
452
|
+
className: E.globeIcon
|
|
453
|
+
})), /* @__PURE__ */ t.createElement(_t, null)), /* @__PURE__ */ t.createElement(s.PhoneNumber, {
|
|
454
|
+
className: b(_.innerInput, E.phoneNumber)
|
|
455
|
+
}), n ? /* @__PURE__ */ t.createElement(s.CountryOptions.Modal, {
|
|
456
|
+
className: b(_.selectPopover, E.mobileDrawer),
|
|
457
|
+
overlayClassName: E.mobileOverlay,
|
|
458
|
+
portalContainer: r,
|
|
459
|
+
"aria-label": e("field.phone.country-code.aria-label")
|
|
460
|
+
}, o, a, c) : /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
|
|
461
|
+
className: b(He, _.selectPopover, E.countryOptions),
|
|
462
|
+
placement: "bottom start",
|
|
463
|
+
offset: 0,
|
|
464
|
+
"aria-label": e("field.phone.country-code.aria-label")
|
|
465
|
+
}, o, a, c)), /* @__PURE__ */ t.createElement(s.Error, {
|
|
466
|
+
className: b(Ge, _.error)
|
|
467
|
+
}, /* @__PURE__ */ t.createElement(Ue, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
468
|
+
className: b(Ye, _.description)
|
|
469
|
+
}, bt));
|
|
470
|
+
};
|
|
471
|
+
export {
|
|
472
|
+
kt as P
|
|
473
|
+
};
|