@wix/form-elements 1.89.0 → 1.90.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/dist/component/{appointment-rac-DG8GUJpn.js → appointment-rac-DtPa-JZ9.js} +6 -6
- package/dist/component/{bookings-address-rac-cNBSx-Pr.js → bookings-address-rac-4l8kqoLi.js} +1 -1
- package/dist/component/{bookings-email-rac-CYdSoVWP.js → bookings-email-rac-76vUcGtU.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CQB2o8ww.js → bookings-first-name-rac-IS7LUMxg.js} +1 -1
- package/dist/component/{bookings-header-rac-CzKvQond.js → bookings-header-rac-2wTzY64_.js} +1 -1
- package/dist/component/{bookings-last-name-rac-oK1BC5Am.js → bookings-last-name-rac-nxA75igv.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CZNEy748.js → bookings-login-bar-rac-CRi1nntD.js} +21 -21
- package/dist/component/{bookings-phone-rac-D_4WfolC.js → bookings-phone-rac-DZjvHly0.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CrEfeL4P.js → bookings-rich-text-rac-CYn1wwYQ.js} +1 -1
- package/dist/component/{checkbox-field-rac-CGqshW45.js → checkbox-field-rac-DAcFLQNT.js} +49 -49
- package/dist/component/{checkbox-group-field-headless-C3_5IR-E.js → checkbox-group-field-headless-BJmS0Ce5.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DIzdgyAw.js → checkbox-group-field-rac-CeFUt2Nr.js} +9 -9
- package/dist/component/{checkbox-group-rac-EvWVfusV.js → checkbox-group-rac-eDChVoVP.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-Bb3xB1ve.js → checkbox-indicator-module-classes-mJ7hl_8K.js} +1 -1
- package/dist/component/{checkbox-rac-CT_69Jei.js → checkbox-rac-DGmZdPnl.js} +1 -1
- package/dist/component/{contacts-address-rac-M8MZd777.js → contacts-address-rac-CGS83PMu.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BS-8HeRD.js → contacts-birthdate-rac-DkP-7tZ9.js} +1 -1
- package/dist/component/{contacts-company-rac-gmgKLvic.js → contacts-company-rac-D_KYvkYe.js} +1 -1
- package/dist/component/{contacts-email-rac-QQ6E9VzX.js → contacts-email-rac-4lGD56E8.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DR7XheRo.js → contacts-first-name-rac-C5L3U9QV.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CBJgTkj5.js → contacts-last-name-rac-SL3FSAhE.js} +1 -1
- package/dist/component/{contacts-phone-rac-CTl25HdK.js → contacts-phone-rac-DkUwJ56_.js} +1 -1
- package/dist/component/{contacts-position-rac-DBDOW7QR.js → contacts-position-rac-CeKJ5oJh.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-Bjldz7ed.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-BtXc0V1S.js → contacts-tax-id-rac-D8QxyDiU.js} +1 -1
- package/dist/component/{date-availability-IQtwk-aX.js → date-availability-DdMI-zNj.js} +1 -1
- package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-Da6j7OP2.js} +99 -98
- package/dist/component/{date-input-rac-j4--xZ8s.js → date-input-rac-tlmhXr4A.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cl7ueVVn.js → date-picker-field-rac-ClNfMoR1.js} +43 -43
- package/dist/component/{date-picker-rac-BrObkuYv.js → date-picker-rac-BV3TGjsx.js} +1 -1
- package/dist/component/date-time-input-field-rac-5eHyKry0.js +424 -0
- package/dist/component/{date-time-input-rac-BShquR72.js → date-time-input-rac-DQk2ylbE.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DNXYnHDM.js → dext-checkbox-group-rac-CBj9Y7Tp.js} +2 -2
- package/dist/component/{dext-checkbox-rac-RBMWmgyT.js → dext-checkbox-rac-C1KI5I2J.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Dph_kV11.js → dext-date-picker-rac-D-8Ss0bx.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C3_gQkBT.js → dext-date-time-input-rac-CRnwLBSZ.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D34vhtST.js → dext-dropdown-rac-BVTEMS0W.js} +1 -1
- package/dist/component/{dext-email-rac-Yzf4-vSg.js → dext-email-rac-CXeM4iQj.js} +1 -1
- package/dist/component/{dext-number-input-rac-D0jZXKaI.js → dext-number-input-rac-DMh08cy5.js} +1 -1
- package/dist/component/{dext-phone-rac-bqTpmTa0.js → dext-phone-rac-E1fFjkVW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-_BhRzFAr.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DOSq-xVQ.js → dext-rating-input-rac-BRYVQOYw.js} +1 -1
- package/dist/component/{dext-tags-rac-BXtFTlL0.js → dext-tags-rac-C4iwtRcw.js} +2 -2
- package/dist/component/{dext-text-area-rac-46wwBQg_.js → dext-text-area-rac-CQ1KAhkU.js} +1 -1
- package/dist/component/{dext-text-input-rac-DVj6V1VG.js → dext-text-input-rac-xCoKhEt3.js} +1 -1
- package/dist/component/{dext-url-input-rac-B5zu9R5K.js → dext-url-input-rac-DyoEEa_v.js} +1 -1
- package/dist/component/{donation-rac-DeBMssGg.js → donation-rac-CSDVxWUj.js} +51 -51
- package/dist/component/dropdown-field-headless-BXyP9KYi.js +101 -0
- package/dist/component/dropdown-field-rac-D1Z_Jbzd.js +36 -0
- package/dist/component/{dropdown-rac-bUNYh49x.js → dropdown-rac-BEi7CMKT.js} +1 -1
- package/dist/component/{ecom-address-rac-CtrERV3f.js → ecom-address-rac-DGl7rlwa.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BrpwOSYM.js → ecom-subscription-checkbox-rac-D5HzzRQk.js} +6 -6
- package/dist/component/{email-input-field-rac-4yYxYc1a.js → email-input-field-rac-DHAK2K8E.js} +63 -63
- package/dist/component/{events-repeater-rac-B308C1JK.js → events-repeater-rac-N1mGqD4R.js} +35 -35
- package/dist/component/{events-rsvp-rac-C4_LJ3Wz.js → events-rsvp-rac-Ds9PnqHG.js} +6 -6
- package/dist/component/{field-error-headless-PMBWtb3Z.js → field-error-headless-9MKScovg.js} +12 -12
- package/dist/component/{field-label-headless-0racVfdo.js → field-label-headless-BaoLrUWJ.js} +12 -12
- package/dist/component/field-rac.module-BUvPquav.js +26 -0
- package/dist/component/{file-upload-rac-CZIHV2OL.js → file-upload-rac-CNbLRxUz.js} +116 -116
- package/dist/component/{fixed-payment-rac-COhRKeun.js → fixed-payment-rac-BFnvUksR.js} +15 -15
- package/dist/component/{form-UCnayEKT.js → form-B3YjGh0T.js} +129 -128
- package/dist/component/{form-element-classes--p2vz_Bm.js → form-element-classes-CLZXu-91.js} +79 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CpXa-NlC.js → header-field-rac-64pYqszP.js} +3 -3
- package/dist/component/{header-rac-CCsguMlZ.js → header-rac-BtPQVL59.js} +1 -1
- package/dist/component/{image-choice-rac-j2UH4Q4I.js → image-choice-rac-BsojUR1h.js} +20 -20
- package/dist/component/{index-Bxa3IDHm.js → index-CtiBRBqZ.js} +4 -4
- package/dist/component/{index-jg8dn8po.js → index-f2JBxCTd.js} +2 -2
- package/dist/component/{isObjectLike-Zw6J9g91.js → isObjectLike-BgqHLNgn.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BeFAYL7V.js → multiline-address-field-rac-CH1hCUTf.js} +575 -574
- package/dist/component/{multiline-address-rac-BYr5_DQd.js → multiline-address-rac-CkOPWXfI.js} +1 -1
- package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-B7U_08UK.js} +24 -24
- package/dist/component/{number-input-rac-Cqkj4JAF.js → number-input-rac-1jcchySg.js} +1 -1
- package/dist/component/{password-rac-D4iSs1ds.js → password-rac-CAaV8OrL.js} +21 -21
- package/dist/component/{payment-input-rac-BvBP47HP.js → payment-input-rac-B3Knhzrz.js} +25 -25
- package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BGsvxtXz.js} +185 -184
- package/dist/component/{phone-rac-BISmYt_n.js → phone-rac-BUAW-44w.js} +1 -1
- package/dist/component/{product-list-rac-C1bm-U2G.js → product-list-rac-C7Nq3ZG4.js} +43 -43
- package/dist/component/quiz-radio-group-rac-CRa3I_NR.js +13 -0
- package/dist/component/{radio-button-module-classes-blfiatlc.js → radio-button-module-classes-BEvf741q.js} +7 -7
- package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-BYTXrpnE.js} +5 -5
- package/dist/component/{radio-group-rac-Bn_W-3xz.js → radio-group-rac-138JrIhm.js} +1 -1
- package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-D5pOVdFJ.js} +24 -24
- package/dist/component/{rating-input-rac-Ci4uPo22.js → rating-input-rac-DuK1q9JB.js} +1 -1
- package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-H3hPgDtD.js} +4 -4
- package/dist/component/{rich-text-field-rac-BBRE9_Kr.js → rich-text-field-rac-Btwqm4wb.js} +5 -5
- package/dist/component/{rich-text-rac-C3MfJK-H.js → rich-text-rac-DIu8StCg.js} +1 -1
- package/dist/component/service-dropdown-rac-N8jqoUC_.js +146 -0
- package/dist/component/{services-multi-choice-rac-FDHRjDLS.js → services-multi-choice-rac-DlP0tB9d.js} +18 -18
- package/dist/component/{signature-rac-DfGPV0Mw.js → signature-rac-DuRzxIkO.js} +53 -53
- package/dist/component/{submit-button-rac-DRsqyJcl.js → submit-button-rac-DFmPp4jT.js} +7 -7
- package/dist/component/{tags-field-rac-CZ4FBGG9.js → tags-field-rac-DIgyn5P9.js} +56 -56
- package/dist/component/{tags-rac-CMHMsiwv.js → tags-rac-C6R6RHl2.js} +1 -1
- package/dist/component/text-area-field-rac-opBEx_8s.js +73 -0
- package/dist/component/{text-area-rac-BKGDa4E3.js → text-area-rac-D4iKhAqc.js} +1 -1
- package/dist/component/{text-input-field-rac-CU8eBRM4.js → text-input-field-rac-Ckp8Ierz.js} +6 -6
- package/dist/component/{text-input-headless-C1eFy2gl.js → text-input-headless-D-LXpqS3.js} +6 -6
- package/dist/component/{text-input-rac-DO0eI3ty.js → text-input-rac-ChxuJj-q.js} +1 -1
- package/dist/component/{time-input-rac-BJ0AL2Be.js → time-input-rac-C5_rEy7W.js} +23 -23
- package/dist/component/{url-input-field-rac-BtpAuKfp.js → url-input-field-rac-CBOnhquz.js} +22 -22
- package/dist/component/{url-input-rac-CjnPbcHt.js → url-input-rac-BY-BVg6r.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +28 -0
- package/dist/component/{use-element-state-class-name-X08kIFhd.js → use-element-state-class-name--YLulmsU.js} +1 -1
- package/dist/component/{use-service-options-base-DfHhMveM.js → use-service-options-base-BNLFmnHJ.js} +3 -3
- package/dist/component/{use-text-input-class-name-BAuokapo.js → use-text-input-class-name-3Xp-hNDT.js} +4 -4
- package/dist/form.d.ts +3 -0
- package/package.json +2 -2
- package/dist/component/date-time-input-field-rac-mqea6CtW.js +0 -423
- package/dist/component/dropdown-field-headless-ShcoDfPa.js +0 -84
- package/dist/component/dropdown-field-rac-DruF_YdZ.js +0 -32
- package/dist/component/field-rac.module-D06m9T9x.js +0 -24
- package/dist/component/quiz-radio-group-rac-BhNhoOSI.js +0 -13
- package/dist/component/service-dropdown-rac-DQkk3SlS.js +0 -142
- package/dist/component/text-area-field-rac-BnRuG5y8.js +0 -73
package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BGsvxtXz.js}
RENAMED
|
@@ -1,53 +1,54 @@
|
|
|
1
1
|
import { RicosViewer as ye } from "@wix/ricos/viewer";
|
|
2
2
|
import b from "classnames";
|
|
3
|
-
import t, { useMemo as B, useState as
|
|
4
|
-
import {
|
|
3
|
+
import t, { useMemo as B, useState as k, useRef as v, useEffect as T, useCallback as j, createContext as te, useContext as q } from "react";
|
|
4
|
+
import { a3 as fe, au as P, ac as ne, at as Ee, ak as M, ah as oe, am as he } from "./form-B3YjGh0T.js";
|
|
5
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
|
|
7
|
-
import { f as h, a as
|
|
8
|
-
import { D as Fe, E as De } from "./field-error-headless-
|
|
9
|
-
import { L as
|
|
10
|
-
import { N as
|
|
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 se } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as Fe, E as De } from "./field-error-headless-9MKScovg.js";
|
|
9
|
+
import { L as Re } from "./field-label-headless-BaoLrUWJ.js";
|
|
10
|
+
import { N as xe, S as Be } from "./non-modal-popover-DtIMXHbe.js";
|
|
11
11
|
import { u as Me } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
-
import
|
|
12
|
+
import ce, { AsYouType as ze, isValidPhoneNumber as $e, isSupportedCountry as Ae } from "libphonenumber-js";
|
|
13
13
|
import "libphonenumber-js/metadata.min.json";
|
|
14
14
|
import { C as W } from "./calling-country-codes-PyWuOTmF.js";
|
|
15
|
-
import { C as
|
|
16
|
-
import { E as
|
|
15
|
+
import { C as Te } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
+
import { E as we } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as J } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as _ } from "./field-rac.module-
|
|
19
|
-
import {
|
|
18
|
+
import { s as _ } from "./field-rac.module-BUvPquav.js";
|
|
19
|
+
import { B as Ue, R as ke, z as qe, D as Ve, q as Ge, i as He } from "./form-element-classes-CLZXu-91.js";
|
|
20
|
+
import { g as Ye } from "./use-dropdown-option-class-name-C1iEE28P.js";
|
|
20
21
|
function X(e) {
|
|
21
|
-
const n = e ?
|
|
22
|
+
const n = e ? ce(e) : void 0, r = n == null ? void 0 : n.country;
|
|
22
23
|
if (r)
|
|
23
24
|
return r;
|
|
24
|
-
const o = new
|
|
25
|
+
const o = new ze();
|
|
25
26
|
return e && o.input(e), o.getCountry();
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function V(e) {
|
|
28
29
|
var n;
|
|
29
|
-
return e && ((n =
|
|
30
|
+
return e && ((n = fe.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function w(e) {
|
|
32
33
|
return e === null ? null : e.replace(/[^0-9+]/g, "") || e;
|
|
33
34
|
}
|
|
34
35
|
function ee(e, n) {
|
|
35
36
|
if (e && n)
|
|
36
37
|
try {
|
|
37
|
-
const r =
|
|
38
|
-
if (o &&
|
|
38
|
+
const r = ce(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
39
|
+
if (o && $e(o))
|
|
39
40
|
return o.replace(/\s+/g, "");
|
|
40
41
|
} catch {
|
|
41
42
|
}
|
|
42
43
|
return e;
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
const { t: e } =
|
|
45
|
+
function Ke() {
|
|
46
|
+
const { t: e } = P(), { language: n } = ne();
|
|
46
47
|
return B(() => Object.keys(W).reduce((o, a) => {
|
|
47
|
-
const
|
|
48
|
-
return l &&
|
|
48
|
+
const s = W[a], l = V(s), u = e(`locale-dataset.countries.${s.toUpperCase()}`);
|
|
49
|
+
return l && Ae(a) && o.push({
|
|
49
50
|
countryName: u,
|
|
50
|
-
longCountryCode:
|
|
51
|
+
longCountryCode: s,
|
|
51
52
|
shortCountryCode: a,
|
|
52
53
|
callingCode: l
|
|
53
54
|
}), o;
|
|
@@ -56,57 +57,57 @@ function je() {
|
|
|
56
57
|
n
|
|
57
58
|
]);
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function Ze(e, n) {
|
|
60
61
|
return e.filter((r) => n && n.length > 0 ? n.includes(r.shortCountryCode) : !0);
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function je(e, n) {
|
|
63
64
|
const { countryName: r, callingCode: o, shortCountryCode: a } = e;
|
|
64
|
-
return !!(
|
|
65
|
+
return !!(U(r, n) || U(o, n) || U(a, n));
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
+
function U(e, n) {
|
|
67
68
|
return e.toLowerCase().includes(n.toLowerCase());
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
-
const [a,
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
function Qe({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange: o }) {
|
|
71
|
+
const [a, s] = k(e || ""), l = v(w(e ?? null) ?? ""), [u, i] = k(n);
|
|
72
|
+
Ee(() => {
|
|
73
|
+
s(""), l.current = "", i(n), o("");
|
|
73
74
|
});
|
|
74
75
|
const m = B(() => X(a), [
|
|
75
76
|
a
|
|
76
77
|
]);
|
|
77
|
-
|
|
78
|
+
T(() => {
|
|
78
79
|
const d = e ?? "";
|
|
79
|
-
d !== l.current && (
|
|
80
|
+
d !== l.current && (s(d), l.current = d);
|
|
80
81
|
}, [
|
|
81
82
|
e
|
|
82
|
-
]),
|
|
83
|
+
]), T(() => {
|
|
83
84
|
n && !u && i(n);
|
|
84
85
|
}, [
|
|
85
86
|
n,
|
|
86
87
|
u
|
|
87
|
-
]),
|
|
88
|
+
]), T(() => {
|
|
88
89
|
i(n ?? m);
|
|
89
90
|
}, [
|
|
90
91
|
m,
|
|
91
92
|
n
|
|
92
93
|
]);
|
|
93
|
-
const C =
|
|
94
|
-
if (
|
|
94
|
+
const C = j((d) => {
|
|
95
|
+
if (s(d), !d) {
|
|
95
96
|
l.current = "", o(null);
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
|
-
const
|
|
99
|
+
const E = X(d);
|
|
99
100
|
i((y) => {
|
|
100
|
-
const O =
|
|
101
|
-
return l.current = S ?? "", o(S),
|
|
101
|
+
const O = E || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), S = w(ee(d, O));
|
|
102
|
+
return l.current = S ?? "", o(S), E || y;
|
|
102
103
|
});
|
|
103
104
|
}, [
|
|
104
105
|
r,
|
|
105
106
|
o
|
|
106
|
-
]), p =
|
|
107
|
-
i(d),
|
|
108
|
-
const y =
|
|
109
|
-
return l.current = y ?? "", o(y),
|
|
107
|
+
]), p = j((d) => {
|
|
108
|
+
i(d), s((E) => {
|
|
109
|
+
const y = w(ee(E, d));
|
|
110
|
+
return l.current = y ?? "", o(y), E;
|
|
110
111
|
});
|
|
111
112
|
}, [
|
|
112
113
|
o
|
|
@@ -123,14 +124,14 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
123
124
|
if (!e)
|
|
124
125
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
125
126
|
return e;
|
|
126
|
-
}, ue = /* @__PURE__ */ te(null),
|
|
127
|
+
}, ue = /* @__PURE__ */ te(null), G = () => {
|
|
127
128
|
const e = q(ue);
|
|
128
129
|
if (!e)
|
|
129
130
|
throw new Error("Option sub-components must be used within Option component");
|
|
130
131
|
return e;
|
|
131
|
-
},
|
|
132
|
-
function r(
|
|
133
|
-
const u = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", m = `${
|
|
132
|
+
}, H = ({ longCountryCode: e, className: n }) => {
|
|
133
|
+
function r(s, l) {
|
|
134
|
+
const u = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", m = `${s}${l === "2x" ? "_2x" : ""}.png`;
|
|
134
135
|
return `${u}${m}`;
|
|
135
136
|
}
|
|
136
137
|
const o = r(e, "1x"), a = r(e, "2x");
|
|
@@ -142,20 +143,20 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
142
143
|
loading: "lazy",
|
|
143
144
|
className: n
|
|
144
145
|
});
|
|
145
|
-
},
|
|
146
|
+
}, c = ({ children: e }) => {
|
|
146
147
|
var I, L;
|
|
147
|
-
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry:
|
|
148
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: s, 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 = Ke(), p = B(() => Ze(C, m), [
|
|
148
149
|
C,
|
|
149
150
|
m
|
|
150
|
-
]), d = B(() => p.map((
|
|
151
|
+
]), d = B(() => p.map((x) => x.shortCountryCode), [
|
|
151
152
|
p
|
|
152
|
-
]), { currentValue:
|
|
153
|
+
]), { currentValue: E, selectedCountryCode: y, handlePhoneChange: O, handleCountryCodeChange: S } = Qe({
|
|
153
154
|
value: r,
|
|
154
|
-
defaultCountryCode:
|
|
155
|
+
defaultCountryCode: s,
|
|
155
156
|
allowedCountryCodes: d,
|
|
156
157
|
onChange: o
|
|
157
|
-
}),
|
|
158
|
-
currentValue:
|
|
158
|
+
}), $ = h(e, c.Label), F = h(e, c.Control), A = h(e, c.Description), D = h(e, c.Error), R = {
|
|
159
|
+
currentValue: E,
|
|
159
160
|
selectedCountryCode: y,
|
|
160
161
|
handlePhoneChange: O,
|
|
161
162
|
handleCountryCodeChange: S,
|
|
@@ -164,47 +165,47 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
164
165
|
popoverContainer: u
|
|
165
166
|
};
|
|
166
167
|
return /* @__PURE__ */ t.createElement(le.Provider, {
|
|
167
|
-
value:
|
|
168
|
+
value: R
|
|
168
169
|
}, /* @__PURE__ */ t.createElement(a, {
|
|
169
170
|
fieldId: n,
|
|
170
|
-
renderLabel: () =>
|
|
171
|
+
renderLabel: () => $,
|
|
171
172
|
renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
172
173
|
ref: i,
|
|
173
174
|
style: {
|
|
174
175
|
display: "contents"
|
|
175
176
|
}
|
|
176
177
|
}), F),
|
|
177
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D,
|
|
178
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, A)
|
|
178
179
|
}));
|
|
179
|
-
},
|
|
180
|
-
const { inputId: r, labelId: o } = oe(), { hasError: a, disabled:
|
|
180
|
+
}, Y = ({ children: e, className: n }) => {
|
|
181
|
+
const { inputId: r, labelId: o } = oe(), { hasError: a, disabled: s, 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 && V(p.longCountryCode) || "", E = u("field.phone.country-code.aria-label"), y = p ? `${E}, ${p.countryName}, ${d}` : E;
|
|
181
182
|
return /* @__PURE__ */ t.createElement(Be, {
|
|
182
|
-
isDisabled:
|
|
183
|
+
isDisabled: s || l,
|
|
183
184
|
id: C,
|
|
184
185
|
"aria-label": y,
|
|
185
186
|
"aria-labelledby": o ? `${o} ${C}` : void 0,
|
|
186
187
|
className: n,
|
|
187
188
|
"data-invalid": a || void 0
|
|
188
189
|
}, e);
|
|
189
|
-
},
|
|
190
|
+
}, We = ({ className: e }) => {
|
|
190
191
|
const { selectedCountryCode: n, countries: r } = N(), o = r.find((a) => a.shortCountryCode === n);
|
|
191
|
-
return o ? /* @__PURE__ */ t.createElement(
|
|
192
|
+
return o ? /* @__PURE__ */ t.createElement(H, {
|
|
192
193
|
className: e,
|
|
193
194
|
longCountryCode: o.longCountryCode
|
|
194
195
|
}) : null;
|
|
195
|
-
},
|
|
196
|
+
}, Je = ({ children: e, className: n }) => {
|
|
196
197
|
const { selectedCountryCode: r, countries: o } = N();
|
|
197
|
-
return o.some((
|
|
198
|
+
return o.some((s) => s.shortCountryCode === r) ? null : /* @__PURE__ */ t.createElement("span", {
|
|
198
199
|
className: n
|
|
199
200
|
}, e);
|
|
200
201
|
};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...
|
|
204
|
-
const { triggerRef: l, optionsRef: u } =
|
|
202
|
+
Y.Flag = We;
|
|
203
|
+
Y.EmptyState = Je;
|
|
204
|
+
const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...s }) => {
|
|
205
|
+
const { triggerRef: l, optionsRef: u } = s, { popoverContainer: i } = N(), m = h(e, g.Search), C = /* @__PURE__ */ t.createElement(ie, null, e);
|
|
205
206
|
return /* @__PURE__ */ t.createElement(ge, {
|
|
206
207
|
getContainer: () => i
|
|
207
|
-
}, /* @__PURE__ */ t.createElement(
|
|
208
|
+
}, /* @__PURE__ */ t.createElement(xe, {
|
|
208
209
|
ref: u,
|
|
209
210
|
triggerRef: l,
|
|
210
211
|
className: n,
|
|
@@ -214,8 +215,8 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
214
215
|
}, m ? /* @__PURE__ */ t.createElement(re, {
|
|
215
216
|
"aria-label": r
|
|
216
217
|
}, C) : C));
|
|
217
|
-
},
|
|
218
|
-
const { optionsRef: l } =
|
|
218
|
+
}, Xe = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...s }) => {
|
|
219
|
+
const { optionsRef: l } = s, { selectedCountryCode: u, handleCountryCodeChange: i } = N(), m = q(be);
|
|
219
220
|
return /* @__PURE__ */ t.createElement(_e, {
|
|
220
221
|
className: r,
|
|
221
222
|
isDismissable: !0
|
|
@@ -237,12 +238,12 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
237
238
|
}
|
|
238
239
|
}, e)))));
|
|
239
240
|
}, ie = ({ children: e, listBoxProps: n }) => {
|
|
240
|
-
const { countries: r } = N(), o = h(e, g.Option), a = h(e, g.Search),
|
|
241
|
+
const { countries: r } = N(), o = h(e, g.Option), a = h(e, g.Search), s = h(e, g.EmptyState), l = /* @__PURE__ */ t.createElement(ve, {
|
|
241
242
|
...n,
|
|
242
|
-
renderEmptyState:
|
|
243
|
+
renderEmptyState: s ? () => s : void 0
|
|
243
244
|
}, r.map((u) => {
|
|
244
|
-
const i =
|
|
245
|
-
return
|
|
245
|
+
const i = V(u.longCountryCode) || "";
|
|
246
|
+
return se(o, {
|
|
246
247
|
key: u.shortCountryCode,
|
|
247
248
|
countryCode: u.shortCountryCode,
|
|
248
249
|
dialingCode: i,
|
|
@@ -250,73 +251,73 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
250
251
|
longCountryCode: u.longCountryCode
|
|
251
252
|
});
|
|
252
253
|
}));
|
|
253
|
-
return a ? /* @__PURE__ */ t.createElement(
|
|
254
|
+
return a ? /* @__PURE__ */ t.createElement(Pe, {
|
|
254
255
|
filter: (u, i, m) => {
|
|
255
256
|
const C = r.find((p) => p.shortCountryCode === m.key);
|
|
256
|
-
return !!C &&
|
|
257
|
+
return !!C && je(C, i);
|
|
257
258
|
}
|
|
258
259
|
}, a, l) : l;
|
|
259
260
|
};
|
|
260
261
|
g.Popover = g;
|
|
261
|
-
g.Modal =
|
|
262
|
+
g.Modal = Xe;
|
|
262
263
|
const me = ({ className: e, children: n, "aria-label": r }) => /* @__PURE__ */ t.createElement(Oe, {
|
|
263
264
|
className: e,
|
|
264
265
|
"aria-label": r,
|
|
265
266
|
autoFocus: !0
|
|
266
|
-
}, n),
|
|
267
|
+
}, n), et = ({ className: e, placeholder: n }) => /* @__PURE__ */ t.createElement(ae, {
|
|
267
268
|
className: e,
|
|
268
269
|
placeholder: n
|
|
269
270
|
});
|
|
270
|
-
me.Input =
|
|
271
|
+
me.Input = et;
|
|
271
272
|
g.Search = me;
|
|
272
|
-
const
|
|
273
|
+
const tt = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement("div", {
|
|
273
274
|
className: n
|
|
274
275
|
}, e);
|
|
275
|
-
g.EmptyState =
|
|
276
|
-
const
|
|
277
|
-
const { countryCode: o, dialingCode: a, countryName:
|
|
276
|
+
g.EmptyState = tt;
|
|
277
|
+
const z = ({ children: e, className: n, ...r }) => {
|
|
278
|
+
const { countryCode: o, dialingCode: a, countryName: s, longCountryCode: l } = r, u = {
|
|
278
279
|
countryCode: o,
|
|
279
280
|
dialingCode: a,
|
|
280
|
-
countryName:
|
|
281
|
+
countryName: s,
|
|
281
282
|
longCountryCode: l
|
|
282
283
|
}, i = e || /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Ce, null), /* @__PURE__ */ t.createElement(de, null), /* @__PURE__ */ t.createElement(pe, null));
|
|
283
284
|
return /* @__PURE__ */ t.createElement(Se, {
|
|
284
285
|
className: n,
|
|
285
286
|
id: o,
|
|
286
|
-
textValue: `${
|
|
287
|
+
textValue: `${s} ${a}`
|
|
287
288
|
}, /* @__PURE__ */ t.createElement(ue.Provider, {
|
|
288
289
|
value: u
|
|
289
290
|
}, i));
|
|
290
291
|
}, Ce = ({ className: e }) => {
|
|
291
|
-
const { longCountryCode: n } =
|
|
292
|
-
return /* @__PURE__ */ t.createElement(
|
|
292
|
+
const { longCountryCode: n } = G();
|
|
293
|
+
return /* @__PURE__ */ t.createElement(H, {
|
|
293
294
|
className: e,
|
|
294
295
|
longCountryCode: n
|
|
295
296
|
});
|
|
296
297
|
}, de = ({ className: e }) => {
|
|
297
|
-
const { countryName: n } =
|
|
298
|
+
const { countryName: n } = G();
|
|
298
299
|
return /* @__PURE__ */ t.createElement("span", {
|
|
299
300
|
className: e
|
|
300
301
|
}, n);
|
|
301
302
|
}, pe = ({ className: e }) => {
|
|
302
|
-
const { dialingCode: n } =
|
|
303
|
+
const { dialingCode: n } = G();
|
|
303
304
|
return /* @__PURE__ */ t.createElement("span", {
|
|
304
305
|
className: e
|
|
305
306
|
}, n);
|
|
306
307
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
g.Option =
|
|
311
|
-
const
|
|
312
|
-
const { t: n } =
|
|
308
|
+
z.Flag = Ce;
|
|
309
|
+
z.Name = de;
|
|
310
|
+
z.Code = pe;
|
|
311
|
+
g.Option = z;
|
|
312
|
+
const nt = ({ className: e }) => {
|
|
313
|
+
const { t: n } = P(), { inputId: r, ariaDescribedBy: o } = oe(), { id: a, placeholder: s, disabled: l, readOnly: u, required: i, label: m, hasError: C } = M(), { currentValue: p, handlePhoneChange: d } = N(), E = v(null);
|
|
313
314
|
return he(() => {
|
|
314
315
|
var y;
|
|
315
|
-
(y =
|
|
316
|
+
(y = E.current) == null || y.focus({
|
|
316
317
|
preventScroll: !0
|
|
317
318
|
});
|
|
318
319
|
}, a), /* @__PURE__ */ t.createElement(ae, {
|
|
319
|
-
ref:
|
|
320
|
+
ref: E,
|
|
320
321
|
id: r,
|
|
321
322
|
type: "tel",
|
|
322
323
|
value: p,
|
|
@@ -327,58 +328,58 @@ const tt = ({ className: e }) => {
|
|
|
327
328
|
"aria-label": `${m}. ${n("field.phone.aria-label")}`,
|
|
328
329
|
"aria-describedby": o,
|
|
329
330
|
"aria-invalid": C,
|
|
330
|
-
placeholder:
|
|
331
|
+
placeholder: s,
|
|
331
332
|
className: e
|
|
332
333
|
});
|
|
333
|
-
},
|
|
334
|
-
const r =
|
|
334
|
+
}, ot = ({ children: e, className: n }) => {
|
|
335
|
+
const r = v(null), o = v(null), a = v(!1), { disabled: s, readOnly: l, required: u, hasError: i, showFlag: m, onFocus: C, onBlur: p } = M(), d = Me(p), { t: E } = P(), { selectedCountryCode: y, handleCountryCodeChange: O, countries: S } = N(), $ = h(e, c.CountryButton), F = h(e, c.CountryOptions.Modal), A = F ?? h(e, c.CountryOptions.Popover), D = h(e, c.PhoneNumber), R = {
|
|
335
336
|
onFocus: () => {
|
|
336
337
|
a.current || (a.current = !0, C == null || C());
|
|
337
338
|
},
|
|
338
339
|
onBlur: (L) => {
|
|
339
|
-
var
|
|
340
|
-
const
|
|
341
|
-
!((
|
|
340
|
+
var K, Z;
|
|
341
|
+
const x = L.relatedTarget;
|
|
342
|
+
!((K = r.current) != null && K.contains(x)) && !((Z = o.current) != null && Z.contains(x)) && (a.current = !1, d());
|
|
342
343
|
}
|
|
343
344
|
};
|
|
344
345
|
if (S.length === 1)
|
|
345
346
|
return /* @__PURE__ */ t.createElement(Q, {
|
|
346
347
|
ref: r,
|
|
347
348
|
className: n,
|
|
348
|
-
isDisabled:
|
|
349
|
+
isDisabled: s,
|
|
349
350
|
isInvalid: i,
|
|
350
|
-
...
|
|
351
|
-
}, m && /* @__PURE__ */ t.createElement(
|
|
351
|
+
...R
|
|
352
|
+
}, m && /* @__PURE__ */ t.createElement(H, {
|
|
352
353
|
longCountryCode: S[0].longCountryCode
|
|
353
354
|
}), D);
|
|
354
|
-
const I = /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
355
|
+
const I = /* @__PURE__ */ t.createElement(t.Fragment, null, $, se(A, {
|
|
355
356
|
triggerRef: r,
|
|
356
357
|
optionsRef: o
|
|
357
358
|
}));
|
|
358
359
|
return /* @__PURE__ */ t.createElement(Q, {
|
|
359
360
|
ref: r,
|
|
360
361
|
className: n,
|
|
361
|
-
isDisabled:
|
|
362
|
+
isDisabled: s,
|
|
362
363
|
isInvalid: i,
|
|
363
|
-
...
|
|
364
|
+
...R
|
|
364
365
|
}, F ? /* @__PURE__ */ t.createElement(Le, null, I) : /* @__PURE__ */ t.createElement(Ie, {
|
|
365
|
-
"aria-label":
|
|
366
|
+
"aria-label": E("field.phone.country-code.aria-label"),
|
|
366
367
|
value: y ?? null,
|
|
367
368
|
onChange: (L) => O(L),
|
|
368
|
-
isDisabled:
|
|
369
|
+
isDisabled: s || l,
|
|
369
370
|
isInvalid: i,
|
|
370
371
|
isRequired: u,
|
|
371
372
|
placeholder: ""
|
|
372
373
|
}, I), D);
|
|
373
374
|
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
const
|
|
375
|
+
c.Label = Re;
|
|
376
|
+
c.Control = ot;
|
|
377
|
+
c.CountryButton = Y;
|
|
378
|
+
c.CountryOptions = g;
|
|
379
|
+
c.PhoneNumber = nt;
|
|
380
|
+
c.Description = Fe;
|
|
381
|
+
c.Error = De;
|
|
382
|
+
const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
382
383
|
width: 24,
|
|
383
384
|
height: 24,
|
|
384
385
|
viewBox: "0 0 24 24",
|
|
@@ -388,7 +389,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
388
389
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
389
390
|
fillRule: "evenodd",
|
|
390
391
|
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
|
-
})),
|
|
392
|
+
})), at = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
392
393
|
width: 24,
|
|
393
394
|
height: 24,
|
|
394
395
|
viewBox: "0 0 24 24",
|
|
@@ -398,75 +399,75 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
398
399
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
399
400
|
fillRule: "evenodd",
|
|
400
401
|
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
|
-
})),
|
|
402
|
-
control:
|
|
402
|
+
})), st = "_control_rzerf_1", ct = "_countryButton_rzerf_9", lt = "_chevron_rzerf_25", ut = "_globeIcon_rzerf_34", it = "_searchIcon_rzerf_35", mt = "_flag_rzerf_44", Ct = "_phoneNumber_rzerf_59", dt = "_countryOptions_rzerf_85", pt = "_option_rzerf_93", yt = "_countrySearchContainer_rzerf_102", ft = "_countrySearch_rzerf_102", Et = "_name_rzerf_144", ht = "_code_rzerf_148", gt = "_mobileOverlay_rzerf_165", bt = "_mobileDrawer_rzerf_175", f = {
|
|
403
|
+
control: st,
|
|
403
404
|
countryButton: ct,
|
|
404
|
-
chevron:
|
|
405
|
-
globeIcon:
|
|
406
|
-
searchIcon:
|
|
407
|
-
flag:
|
|
408
|
-
phoneNumber:
|
|
409
|
-
countryOptions:
|
|
410
|
-
option:
|
|
411
|
-
countrySearchContainer:
|
|
412
|
-
countrySearch:
|
|
405
|
+
chevron: lt,
|
|
406
|
+
globeIcon: ut,
|
|
407
|
+
searchIcon: it,
|
|
408
|
+
flag: mt,
|
|
409
|
+
phoneNumber: Ct,
|
|
410
|
+
countryOptions: dt,
|
|
411
|
+
option: pt,
|
|
412
|
+
countrySearchContainer: yt,
|
|
413
|
+
countrySearch: ft,
|
|
413
414
|
name: Et,
|
|
414
|
-
code:
|
|
415
|
-
mobileOverlay:
|
|
416
|
-
mobileDrawer:
|
|
417
|
-
},
|
|
415
|
+
code: ht,
|
|
416
|
+
mobileOverlay: gt,
|
|
417
|
+
mobileDrawer: bt
|
|
418
|
+
}, _t = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(ye, {
|
|
418
419
|
content: e,
|
|
419
420
|
locale: n
|
|
420
|
-
}),
|
|
421
|
-
className:
|
|
421
|
+
}), Nt = () => /* @__PURE__ */ t.createElement("span", {
|
|
422
|
+
className: f.chevron,
|
|
422
423
|
"aria-hidden": "true"
|
|
423
|
-
}, /* @__PURE__ */ t.createElement(
|
|
424
|
-
const { t:
|
|
425
|
-
className:
|
|
426
|
-
"aria-label":
|
|
427
|
-
}, /* @__PURE__ */ t.createElement(
|
|
428
|
-
className:
|
|
429
|
-
}), /* @__PURE__ */ t.createElement(
|
|
430
|
-
className: b(
|
|
431
|
-
placeholder:
|
|
432
|
-
})),
|
|
433
|
-
className:
|
|
434
|
-
}, /* @__PURE__ */ t.createElement(
|
|
435
|
-
className:
|
|
436
|
-
}), /* @__PURE__ */ t.createElement(
|
|
437
|
-
className:
|
|
438
|
-
}), /* @__PURE__ */ t.createElement(
|
|
439
|
-
className:
|
|
424
|
+
}, /* @__PURE__ */ t.createElement(Te, null)), Vt = () => {
|
|
425
|
+
const e = Ye(_.selectOptionWithoutFocusRing, f.option, J), { t: n } = P(), { isMobile: r, PortalContainer: o } = ne(), a = /* @__PURE__ */ t.createElement(c.CountryOptions.Search, {
|
|
426
|
+
className: f.countrySearchContainer,
|
|
427
|
+
"aria-label": n("field.phone.country-search-input.aria-label")
|
|
428
|
+
}, /* @__PURE__ */ t.createElement(at, {
|
|
429
|
+
className: f.searchIcon
|
|
430
|
+
}), /* @__PURE__ */ t.createElement(c.CountryOptions.Search.Input, {
|
|
431
|
+
className: b(f.countrySearch, J),
|
|
432
|
+
placeholder: n("field.phone.country-search-input.placeholder")
|
|
433
|
+
})), s = /* @__PURE__ */ t.createElement(c.CountryOptions.EmptyState, null, n("field.phone.country-selector-dropdown.no-result")), l = /* @__PURE__ */ t.createElement(c.CountryOptions.Option, {
|
|
434
|
+
className: e
|
|
435
|
+
}, /* @__PURE__ */ t.createElement(c.CountryOptions.Option.Flag, {
|
|
436
|
+
className: f.flag
|
|
437
|
+
}), /* @__PURE__ */ t.createElement(c.CountryOptions.Option.Name, {
|
|
438
|
+
className: f.name
|
|
439
|
+
}), /* @__PURE__ */ t.createElement(c.CountryOptions.Option.Code, {
|
|
440
|
+
className: f.code
|
|
440
441
|
}));
|
|
441
|
-
return /* @__PURE__ */ t.createElement(
|
|
442
|
-
className: b(
|
|
443
|
-
}, /* @__PURE__ */ t.createElement(
|
|
444
|
-
className: b(
|
|
445
|
-
})), /* @__PURE__ */ t.createElement(
|
|
446
|
-
className: b(qe, _.input,
|
|
447
|
-
}, /* @__PURE__ */ t.createElement(
|
|
448
|
-
className:
|
|
449
|
-
}, /* @__PURE__ */ t.createElement(
|
|
450
|
-
className:
|
|
451
|
-
}), /* @__PURE__ */ t.createElement(
|
|
452
|
-
className:
|
|
453
|
-
})), /* @__PURE__ */ t.createElement(
|
|
454
|
-
className: b(_.innerInput,
|
|
455
|
-
}),
|
|
456
|
-
className: b(_.selectPopover,
|
|
457
|
-
overlayClassName:
|
|
458
|
-
portalContainer:
|
|
459
|
-
"aria-label":
|
|
460
|
-
},
|
|
461
|
-
className: b(
|
|
442
|
+
return /* @__PURE__ */ t.createElement(c, null, /* @__PURE__ */ t.createElement(c.Label, {
|
|
443
|
+
className: b(Ue, _.label)
|
|
444
|
+
}, /* @__PURE__ */ t.createElement(c.Label.Required, {
|
|
445
|
+
className: b(ke, _.requiredMark)
|
|
446
|
+
})), /* @__PURE__ */ t.createElement(c.Control, {
|
|
447
|
+
className: b(qe, _.input, f.control)
|
|
448
|
+
}, /* @__PURE__ */ t.createElement(c.CountryButton, {
|
|
449
|
+
className: f.countryButton
|
|
450
|
+
}, /* @__PURE__ */ t.createElement(c.CountryButton.Flag, {
|
|
451
|
+
className: f.flag
|
|
452
|
+
}), /* @__PURE__ */ t.createElement(c.CountryButton.EmptyState, null, /* @__PURE__ */ t.createElement(rt, {
|
|
453
|
+
className: f.globeIcon
|
|
454
|
+
})), /* @__PURE__ */ t.createElement(Nt, null)), /* @__PURE__ */ t.createElement(c.PhoneNumber, {
|
|
455
|
+
className: b(_.innerInput, f.phoneNumber)
|
|
456
|
+
}), r ? /* @__PURE__ */ t.createElement(c.CountryOptions.Modal, {
|
|
457
|
+
className: b(_.selectPopover, f.mobileDrawer),
|
|
458
|
+
overlayClassName: f.mobileOverlay,
|
|
459
|
+
portalContainer: o,
|
|
460
|
+
"aria-label": n("field.phone.country-code.aria-label")
|
|
461
|
+
}, a, s, l) : /* @__PURE__ */ t.createElement(c.CountryOptions.Popover, {
|
|
462
|
+
className: b(Ve, _.selectPopover, f.countryOptions),
|
|
462
463
|
placement: "bottom start",
|
|
463
464
|
offset: 0,
|
|
464
|
-
"aria-label":
|
|
465
|
-
},
|
|
466
|
-
className: b(
|
|
467
|
-
}, /* @__PURE__ */ t.createElement(
|
|
468
|
-
className: b(
|
|
469
|
-
},
|
|
465
|
+
"aria-label": n("field.phone.country-code.aria-label")
|
|
466
|
+
}, a, s, l)), /* @__PURE__ */ t.createElement(c.Error, {
|
|
467
|
+
className: b(Ge, _.error)
|
|
468
|
+
}, /* @__PURE__ */ t.createElement(we, null), /* @__PURE__ */ t.createElement(c.Error.Text, null)), /* @__PURE__ */ t.createElement(c.Description, {
|
|
469
|
+
className: b(He, _.description)
|
|
470
|
+
}, _t));
|
|
470
471
|
};
|
|
471
472
|
export {
|
|
472
473
|
Vt as P
|