@wix/form-elements 1.110.0 → 1.111.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-CfPs6AsU.js → appointment-rac-BZ9sCf_L.js} +4 -4
- package/dist/component/{bookings-address-rac-XkgsBu8i.js → bookings-address-rac-DDisJZwl.js} +1 -1
- package/dist/component/{bookings-email-rac-CyESeQLD.js → bookings-email-rac-ovewChXn.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CFY5Qwk9.js → bookings-first-name-rac-CyudJnHy.js} +1 -1
- package/dist/component/{bookings-header-rac-lRsebspV.js → bookings-header-rac-BSN_BoC0.js} +1 -1
- package/dist/component/{bookings-last-name-rac-B7J2K4oK.js → bookings-last-name-rac-SdX5IANy.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BD97U76_.js → bookings-login-bar-rac-COQ2BOsY.js} +1 -1
- package/dist/component/{bookings-phone-rac-CpgDCLTp.js → bookings-phone-rac-DlUfTzEz.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DQUQMN3s.js → bookings-rich-text-rac-Dx0uxbQc.js} +1 -1
- package/dist/component/{checkbox-field-rac-CcOW4yol.js → checkbox-field-rac-DueJINhA.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-DiBxnwOj.js → checkbox-group-field-headless-wj9ITlbE.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-BCzS44NM.js → checkbox-group-field-rac-CrD849TZ.js} +4 -4
- package/dist/component/{checkbox-group-rac-C2oHVikX.js → checkbox-group-rac-Wdz1ShJh.js} +1 -1
- package/dist/component/{checkbox-rac-DPhswfJ9.js → checkbox-rac-BC7A8y2w.js} +1 -1
- package/dist/component/{contacts-address-rac-Cjqot4Vo.js → contacts-address-rac-DoWo8zyH.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C3uYlFa3.js → contacts-birthdate-rac-CEXkyOuk.js} +1 -1
- package/dist/component/{contacts-company-rac-BDmDrlJm.js → contacts-company-rac-CYaVpLCk.js} +1 -1
- package/dist/component/{contacts-email-rac-9NI8430K.js → contacts-email-rac-teBI-Rpu.js} +1 -1
- package/dist/component/{contacts-first-name-rac-PNgDNwXZ.js → contacts-first-name-rac-BOPuOgk1.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Dkf8oYRe.js → contacts-last-name-rac-DdRhuv9q.js} +1 -1
- package/dist/component/{contacts-phone-rac-BefG0umR.js → contacts-phone-rac-BMiop0kR.js} +1 -1
- package/dist/component/{contacts-position-rac-8ZWMa74Q.js → contacts-position-rac-C8iM62rN.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Dj0k_O2C.js → contacts-subscribe-rac-CkToH-f2.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-Dbz0SEH9.js → contacts-tax-id-rac-JM0KJre8.js} +1 -1
- package/dist/component/{date-availability-CpZYBX1d.js → date-availability-DJyvNJ6w.js} +1 -1
- package/dist/component/{date-input-field-rac-8CkusNEQ.js → date-input-field-rac-CStB2jP7.js} +6 -6
- package/dist/component/{date-input-rac-CH1ke9-c.js → date-input-rac-DUSJH8am.js} +1 -1
- package/dist/component/{date-picker-field-rac-pZQhHvZc.js → date-picker-field-rac-6xffgnXB.js} +5 -5
- package/dist/component/{date-picker-rac-BOdzNgu6.js → date-picker-rac-Dpe0w0G6.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DDUZvi8G.js → date-time-input-field-rac-CX39V3G1.js} +6 -6
- package/dist/component/{date-time-input-rac-DkjW7KId.js → date-time-input-rac-DBVMIbom.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Cjx062TO.js → dext-checkbox-group-rac-CAxyCWQY.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CIqsZ8Cf.js → dext-checkbox-rac-CRBzElbv.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BYQN00yy.js → dext-date-picker-rac-DNzXwBkg.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Bh-HYZ_X.js → dext-date-time-input-rac-D2W3buJP.js} +1 -1
- package/dist/component/{dext-dropdown-rac-rnkUqsSx.js → dext-dropdown-rac-CTTreT77.js} +1 -1
- package/dist/component/{dext-email-rac-DtW_DadC.js → dext-email-rac-BwI4-hML.js} +1 -1
- package/dist/component/{dext-number-input-rac-DTfdLXFG.js → dext-number-input-rac-DT5pQiC3.js} +1 -1
- package/dist/component/{dext-phone-rac-D3anV8iB.js → dext-phone-rac-MA6wyUxM.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CIO_2H7F.js → dext-radio-group-rac-3PYEgYHn.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Bdtbwo1W.js → dext-rating-input-rac-I3e9k3Tp.js} +1 -1
- package/dist/component/{dext-tags-rac-DT4_lRM0.js → dext-tags-rac-Bf4tEUAW.js} +2 -2
- package/dist/component/{dext-text-area-rac-BgMlIgik.js → dext-text-area-rac-5oOAM6zJ.js} +1 -1
- package/dist/component/{dext-text-input-rac-DDc6-lsN.js → dext-text-input-rac-8nHhvQfO.js} +1 -1
- package/dist/component/{dext-url-input-rac-CrOT7XQf.js → dext-url-input-rac-DSAfDqx1.js} +1 -1
- package/dist/component/{donation-rac-CORUAfww.js → donation-rac-DJiD7Fel.js} +5 -5
- package/dist/component/{dropdown-field-headless-B-82vlHV.js → dropdown-field-headless-B_W8kD-t.js} +4 -4
- package/dist/component/{dropdown-field-rac-AYGyhYSH.js → dropdown-field-rac-IDVaMgoc.js} +3 -3
- package/dist/component/{dropdown-rac-g-zqV-y4.js → dropdown-rac-I2ZO66jF.js} +1 -1
- package/dist/component/{ecom-address-rac-BQqh4QrW.js → ecom-address-rac-B1knDuog.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Cf7Ou6Om.js → ecom-subscription-checkbox-rac-BQPJb2kl.js} +2 -2
- package/dist/component/{email-input-field-rac-BFrfF6TW.js → email-input-field-rac-DsjMnxGw.js} +3 -3
- package/dist/component/{events-repeater-rac-CNifjThM.js → events-repeater-rac-CT7scvgS.js} +4 -4
- package/dist/component/{events-rsvp-rac-CnW7CNdo.js → events-rsvp-rac-Dcrc1yxR.js} +3 -3
- package/dist/component/{field-error-headless-BLgaEh1d.js → field-error-headless-DRkkbv__.js} +1 -1
- package/dist/component/{field-label-headless-C8NbnF9M.js → field-label-headless-m633nF93.js} +1 -1
- package/dist/component/{file-upload-rac-Yk44koqY.js → file-upload-rac-DaExm5ny.js} +4 -4
- package/dist/component/{fixed-payment-rac-r_OUP_KD.js → fixed-payment-rac-BglZ8zc0.js} +3 -3
- package/dist/component/{form-DC8xFBa_.js → form-CY-iFZdC.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-6NOymbBc.js → header-field-rac-B6Mzqr3b.js} +2 -2
- package/dist/component/{header-rac-DzK8Cg5s.js → header-rac-CB2NDeCJ.js} +1 -1
- package/dist/component/{image-choice-rac-CcCInqrr.js → image-choice-rac-gtYrnTGg.js} +4 -4
- package/dist/component/{index-B_72TOzS.js → index-Ozpoh9do.js} +2 -2
- package/dist/component/{index-CGbawBGb.js → index-wR-OU2AH.js} +4 -4
- package/dist/component/{isObjectLike-BziKAUTi.js → isObjectLike-DsBVSQ_O.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CJw6HvHY.js → multiline-address-field-rac-Z4hKy_B_.js} +7 -7
- package/dist/component/{multiline-address-rac-B_GR1nkJ.js → multiline-address-rac-DWV0BZHX.js} +1 -1
- package/dist/component/{number-input-field-rac-CXFmpNWL.js → number-input-field-rac-DKpSb1S_.js} +4 -4
- package/dist/component/{number-input-rac-sr4Dhnxa.js → number-input-rac-Di7Q8CH9.js} +1 -1
- package/dist/component/{password-rac-BwBEPYo3.js → password-rac-B9RT0izw.js} +4 -4
- package/dist/component/{payment-input-rac-BcLSkgtK.js → payment-input-rac-DdGNnPcd.js} +4 -4
- package/dist/component/phone-input-field-rac-B-5gHBXY.js +503 -0
- package/dist/component/{phone-rac-B_QYTg28.js → phone-rac-CmZwJyH7.js} +1 -1
- package/dist/component/{product-list-rac-C7YDHPj_.js → product-list-rac-BInJ4cw_.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-Be1v1PyS.js → quiz-radio-group-rac-B1EIBOt5.js} +1 -1
- package/dist/component/{radio-button-module-classes-k9DhZ1Fd.js → radio-button-module-classes-CjDU2x_m.js} +3 -3
- package/dist/component/{radio-group-field-rac-BDEAYQH5.js → radio-group-field-rac-DAwCG8w2.js} +4 -4
- package/dist/component/{radio-group-rac-DcmSrcGy.js → radio-group-rac-CExbY0aw.js} +1 -1
- package/dist/component/{rating-input-field-rac-CcO3-3O3.js → rating-input-field-rac-DTeubyLu.js} +4 -4
- package/dist/component/{rating-input-rac-wl8G35Xv.js → rating-input-rac-P7Fdwrm3.js} +1 -1
- package/dist/component/{rich-content-rac.module-CzZ6x_Yf.js → rich-content-rac.module-DgQubdPj.js} +1 -1
- package/dist/component/{rich-text-field-rac-B4l_YgG7.js → rich-text-field-rac-8dkTMWKw.js} +2 -2
- package/dist/component/{rich-text-rac-BlW4v4gg.js → rich-text-rac-C6u_hF5R.js} +1 -1
- package/dist/component/{service-dropdown-rac-CJTrm0iL.js → service-dropdown-rac-CTSCew5q.js} +4 -4
- package/dist/component/{services-multi-choice-rac-BkiL2Pct.js → services-multi-choice-rac-BUFJHq-l.js} +5 -5
- package/dist/component/{signature-rac-_fTng53p.js → signature-rac-yO924Qfv.js} +3 -3
- package/dist/component/{submit-button-rac-EmqyRMuE.js → submit-button-rac-BurhcqZP.js} +1 -1
- package/dist/component/{tags-field-rac-CTlZZLdv.js → tags-field-rac-qbNQcwnE.js} +5 -5
- package/dist/component/{tags-rac-xd-CpByf.js → tags-rac-DVHcpxNG.js} +1 -1
- package/dist/component/{text-area-field-rac-Dap_aF4j.js → text-area-field-rac-BKhGX0CL.js} +4 -4
- package/dist/component/{text-area-rac-rKSZi3gu.js → text-area-rac-CHHEDeUX.js} +1 -1
- package/dist/component/{text-input-field-rac-GBsaUY0A.js → text-input-field-rac-BGitxCuC.js} +3 -3
- package/dist/component/{text-input-headless-SHtvSa6y.js → text-input-headless-BBn1G2s9.js} +3 -3
- package/dist/component/{text-input-rac-v4R17Vxm.js → text-input-rac-CHX-U7Kp.js} +1 -1
- package/dist/component/{time-input-rac-DgnhZSjV.js → time-input-rac-Bp6B2gO3.js} +4 -4
- package/dist/component/{url-input-field-rac-BuTadRMy.js → url-input-field-rac-CPibLAWz.js} +4 -4
- package/dist/component/{url-input-rac-BpVSwqpz.js → url-input-rac-Bj4PV2YJ.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-Cwfh_4oi.js → use-dropdown-option-class-name-CE1u4RLT.js} +2 -2
- package/dist/component/{use-element-state-class-name-BF7I_Ju7.js → use-element-state-class-name-Dn_LpP1k.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-BMuhxge2.js → use-is-forced-open-dropdown-B2mdY7ku.js} +1 -1
- package/dist/component/{use-service-options-base-DfyQZjmw.js → use-service-options-base-DBvqU30V.js} +1 -1
- package/dist/component/{use-text-input-class-name-ixt7gTGg.js → use-text-input-class-name-BUW0svzK.js} +2 -2
- package/package.json +2 -2
- package/dist/component/phone-input-field-rac-4kp5xRJZ.js +0 -487
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
2
|
+
import g from "classnames";
|
|
3
|
+
import t, { useMemo as A, useState as T, useRef as P, useEffect as k, useCallback as W, createContext as ee, useContext as H, useId as de } from "react";
|
|
4
|
+
import { aU as ye, bj as F, b1 as te, bi as Ee, b9 as D, b6 as ne, bb as fe, I as he, U as ge, t as be, H as Oe, K as _e, v as Ne, p as Se } from "./form-CY-iFZdC.js";
|
|
5
|
+
import { UNSAFE_PortalProvider as Le } from "react-aria";
|
|
6
|
+
import { Dialog as oe, OverlayTriggerStateContext as Ie, ModalOverlay as ve, Modal as Pe, SearchField as Fe, Group as G, ListBoxItem as De, DialogTrigger as Be, Select as Re, Input as re, ListBox as xe, Autocomplete as we } from "react-aria-components";
|
|
7
|
+
import { f as h, a as L } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as Me, E as Ae } from "./field-error-headless-DRkkbv__.js";
|
|
9
|
+
import { L as Te } from "./field-label-headless-m633nF93.js";
|
|
10
|
+
import { N as $e, S as Ue } from "./non-modal-popover-DtIMXHbe.js";
|
|
11
|
+
import { u as ke } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
+
import { u as Ve } from "./use-is-forced-open-dropdown-B2mdY7ku.js";
|
|
13
|
+
import ae, { AsYouType as qe, isValidPhoneNumber as Ge, isSupportedCountry as He } from "libphonenumber-js";
|
|
14
|
+
import "libphonenumber-js/metadata.min.json";
|
|
15
|
+
import { C as Z } from "./calling-country-codes-PyWuOTmF.js";
|
|
16
|
+
import { C as Ke } from "./chevron-down-icon-CcpVm6B-.js";
|
|
17
|
+
import { E as Ye } from "./error-icon-hZxQ6DEy.js";
|
|
18
|
+
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
19
|
+
import { s as O } from "./field-rac.module-B4l_0KRU.js";
|
|
20
|
+
import { u as je } from "./use-dropdown-option-class-name-CE1u4RLT.js";
|
|
21
|
+
import { u as ze } from "./use-text-input-class-name-BUW0svzK.js";
|
|
22
|
+
function J(e) {
|
|
23
|
+
const n = e ? ae(e) : void 0, o = n == null ? void 0 : n.country;
|
|
24
|
+
if (o)
|
|
25
|
+
return o;
|
|
26
|
+
const r = new qe();
|
|
27
|
+
return e && r.input(e), r.getCountry();
|
|
28
|
+
}
|
|
29
|
+
function K(e) {
|
|
30
|
+
var n;
|
|
31
|
+
return e && ((n = ye.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
32
|
+
}
|
|
33
|
+
function V(e) {
|
|
34
|
+
return e === null ? null : e.replace(/[^0-9+]/g, "") || e;
|
|
35
|
+
}
|
|
36
|
+
function X(e, n) {
|
|
37
|
+
if (e && n)
|
|
38
|
+
try {
|
|
39
|
+
const o = ae(e, n), r = o == null ? void 0 : o.formatInternational();
|
|
40
|
+
if (r && Ge(r))
|
|
41
|
+
return r.replace(/\s+/g, "");
|
|
42
|
+
} catch {
|
|
43
|
+
}
|
|
44
|
+
return e;
|
|
45
|
+
}
|
|
46
|
+
function We() {
|
|
47
|
+
const { t: e } = F(), { language: n } = te();
|
|
48
|
+
return A(() => Object.keys(Z).reduce((r, a) => {
|
|
49
|
+
const c = Z[a], l = K(c), u = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
50
|
+
return l && He(a) && r.push({
|
|
51
|
+
countryName: u,
|
|
52
|
+
longCountryCode: c,
|
|
53
|
+
shortCountryCode: a,
|
|
54
|
+
callingCode: l
|
|
55
|
+
}), r;
|
|
56
|
+
}, []).sort((r, a) => r.countryName.localeCompare(a.countryName, n)), [
|
|
57
|
+
e,
|
|
58
|
+
n
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
function Ze(e, n) {
|
|
62
|
+
return e.filter((o) => n && n.length > 0 ? n.includes(o.shortCountryCode) : !0);
|
|
63
|
+
}
|
|
64
|
+
function Qe(e, n) {
|
|
65
|
+
const { countryName: o, callingCode: r, shortCountryCode: a } = e;
|
|
66
|
+
return !!(q(o, n) || q(r, n) || q(a, n));
|
|
67
|
+
}
|
|
68
|
+
function q(e, n) {
|
|
69
|
+
return e.toLowerCase().includes(n.toLowerCase());
|
|
70
|
+
}
|
|
71
|
+
function Je({ value: e, defaultCountryCode: n, allowedCountryCodes: o, onChange: r }) {
|
|
72
|
+
const [a, c] = T(e || ""), l = P(V(e ?? null) ?? ""), [u, i] = T(n);
|
|
73
|
+
Ee(() => {
|
|
74
|
+
c(""), l.current = "", i(n), r("");
|
|
75
|
+
});
|
|
76
|
+
const p = A(() => J(a), [
|
|
77
|
+
a
|
|
78
|
+
]);
|
|
79
|
+
k(() => {
|
|
80
|
+
const m = e ?? "";
|
|
81
|
+
m !== l.current && (c(m), l.current = m);
|
|
82
|
+
}, [
|
|
83
|
+
e
|
|
84
|
+
]), k(() => {
|
|
85
|
+
n && !u && i(n);
|
|
86
|
+
}, [
|
|
87
|
+
n,
|
|
88
|
+
u
|
|
89
|
+
]), k(() => {
|
|
90
|
+
i(n ?? p);
|
|
91
|
+
}, [
|
|
92
|
+
p,
|
|
93
|
+
n
|
|
94
|
+
]);
|
|
95
|
+
const C = W((m) => {
|
|
96
|
+
if (c(m), !m) {
|
|
97
|
+
l.current = "", r(null);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const f = J(m);
|
|
101
|
+
i((d) => {
|
|
102
|
+
const S = f || d || ((o == null ? void 0 : o.length) === 1 ? o[0] : void 0), N = V(X(m, S));
|
|
103
|
+
return l.current = N ?? "", r(N), f || d;
|
|
104
|
+
});
|
|
105
|
+
}, [
|
|
106
|
+
o,
|
|
107
|
+
r
|
|
108
|
+
]), y = W((m) => {
|
|
109
|
+
i(m), c((f) => {
|
|
110
|
+
const d = V(X(f, m));
|
|
111
|
+
return l.current = d ?? "", r(d), f;
|
|
112
|
+
});
|
|
113
|
+
}, [
|
|
114
|
+
r
|
|
115
|
+
]);
|
|
116
|
+
return {
|
|
117
|
+
currentValue: a,
|
|
118
|
+
selectedCountryCode: u,
|
|
119
|
+
handlePhoneChange: C,
|
|
120
|
+
handleCountryCodeChange: y
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
124
|
+
const e = H(se);
|
|
125
|
+
if (!e)
|
|
126
|
+
throw new Error("Phone input components must be used within PhoneInput component");
|
|
127
|
+
return e;
|
|
128
|
+
}, ce = /* @__PURE__ */ ee(null), Y = () => {
|
|
129
|
+
const e = H(ce);
|
|
130
|
+
if (!e)
|
|
131
|
+
throw new Error("Option sub-components must be used within Option component");
|
|
132
|
+
return e;
|
|
133
|
+
}, j = ({ longCountryCode: e, className: n }) => {
|
|
134
|
+
function o(c, l) {
|
|
135
|
+
const u = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", p = `${c}${l === "2x" ? "_2x" : ""}.png`;
|
|
136
|
+
return `${u}${p}`;
|
|
137
|
+
}
|
|
138
|
+
const r = o(e, "1x"), a = o(e, "2x");
|
|
139
|
+
return /* @__PURE__ */ t.createElement("img", {
|
|
140
|
+
src: r,
|
|
141
|
+
srcSet: `${r} 1x, ${a} 2x`,
|
|
142
|
+
alt: "",
|
|
143
|
+
"aria-hidden": "true",
|
|
144
|
+
loading: "lazy",
|
|
145
|
+
className: n
|
|
146
|
+
});
|
|
147
|
+
}, s = ({ children: e }) => {
|
|
148
|
+
var I, v;
|
|
149
|
+
const { id: n, value: o, onChange: r, FieldLayout: a, defaultCountry: c, validation: l } = D(), [u, i] = T(null), p = (v = (I = l == null ? void 0 : l.string) == null ? void 0 : I.phoneOptions) == null ? void 0 : v.allowedCountryCodes, C = We(), y = A(() => Ze(C, p), [
|
|
150
|
+
C,
|
|
151
|
+
p
|
|
152
|
+
]), m = A(() => y.map((M) => M.shortCountryCode), [
|
|
153
|
+
y
|
|
154
|
+
]), { currentValue: f, selectedCountryCode: d, handlePhoneChange: S, handleCountryCodeChange: N } = Je({
|
|
155
|
+
value: o,
|
|
156
|
+
defaultCountryCode: c,
|
|
157
|
+
allowedCountryCodes: m,
|
|
158
|
+
onChange: r
|
|
159
|
+
}), B = h(e, s.Label), R = h(e, s.Control), x = h(e, s.Description), w = h(e, s.Error), U = {
|
|
160
|
+
currentValue: f,
|
|
161
|
+
selectedCountryCode: d,
|
|
162
|
+
handlePhoneChange: S,
|
|
163
|
+
handleCountryCodeChange: N,
|
|
164
|
+
countryCodes: m,
|
|
165
|
+
countries: y,
|
|
166
|
+
popoverContainer: u
|
|
167
|
+
};
|
|
168
|
+
return /* @__PURE__ */ t.createElement(se.Provider, {
|
|
169
|
+
value: U
|
|
170
|
+
}, /* @__PURE__ */ t.createElement(a, {
|
|
171
|
+
fieldId: n,
|
|
172
|
+
renderLabel: () => B,
|
|
173
|
+
renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
174
|
+
ref: i,
|
|
175
|
+
style: {
|
|
176
|
+
display: "contents"
|
|
177
|
+
}
|
|
178
|
+
}), R),
|
|
179
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, w, x)
|
|
180
|
+
}));
|
|
181
|
+
}, z = ({ children: e, className: n }) => {
|
|
182
|
+
const { labelId: o } = ne(), { hasError: r, disabled: a, readOnly: c } = D(), { t: l } = F(), { selectedCountryCode: u, countries: i } = _(), p = de(), C = u ? i.find((d) => d.shortCountryCode === u) : void 0, y = C && K(C.longCountryCode) || "", m = l("field.phone.country-code.aria-label"), f = C ? `${m}, ${C.countryName}, ${y}` : m;
|
|
183
|
+
return /* @__PURE__ */ t.createElement(Ue, {
|
|
184
|
+
isDisabled: a || c,
|
|
185
|
+
id: p,
|
|
186
|
+
"aria-label": f,
|
|
187
|
+
"aria-labelledby": o ? `${o} ${p}` : void 0,
|
|
188
|
+
className: n,
|
|
189
|
+
"data-invalid": r || void 0
|
|
190
|
+
}, e);
|
|
191
|
+
}, Xe = ({ className: e }) => {
|
|
192
|
+
const { selectedCountryCode: n, countries: o } = _(), r = o.find((a) => a.shortCountryCode === n);
|
|
193
|
+
return r ? /* @__PURE__ */ t.createElement(j, {
|
|
194
|
+
className: e,
|
|
195
|
+
longCountryCode: r.longCountryCode
|
|
196
|
+
}) : null;
|
|
197
|
+
}, et = ({ children: e, className: n }) => {
|
|
198
|
+
const { selectedCountryCode: o, countries: r } = _();
|
|
199
|
+
return r.some((c) => c.shortCountryCode === o) ? null : /* @__PURE__ */ t.createElement("span", {
|
|
200
|
+
className: n
|
|
201
|
+
}, e);
|
|
202
|
+
};
|
|
203
|
+
z.Flag = Xe;
|
|
204
|
+
z.EmptyState = et;
|
|
205
|
+
const b = ({ children: e, className: n, "aria-label": o, placement: r, offset: a, ...c }) => {
|
|
206
|
+
const { triggerRef: l, optionsRef: u, isForcedOpen: i, isOpen: p } = c, { popoverContainer: C } = _(), y = h(e, b.Search);
|
|
207
|
+
if (!p)
|
|
208
|
+
return null;
|
|
209
|
+
const m = /* @__PURE__ */ t.createElement(le, {
|
|
210
|
+
isForcedOpen: i
|
|
211
|
+
}, e);
|
|
212
|
+
return /* @__PURE__ */ t.createElement(Le, {
|
|
213
|
+
getContainer: () => C
|
|
214
|
+
}, /* @__PURE__ */ t.createElement($e, {
|
|
215
|
+
ref: u,
|
|
216
|
+
triggerRef: l,
|
|
217
|
+
className: n,
|
|
218
|
+
placement: r,
|
|
219
|
+
offset: a,
|
|
220
|
+
containerPadding: 0
|
|
221
|
+
}, y && !i ? /* @__PURE__ */ t.createElement(oe, {
|
|
222
|
+
"aria-label": o
|
|
223
|
+
}, m) : m));
|
|
224
|
+
}, tt = ({ children: e, className: n, overlayClassName: o, "aria-label": r, portalContainer: a = t.Fragment, ...c }) => {
|
|
225
|
+
const { optionsRef: l } = c, { selectedCountryCode: u, handleCountryCodeChange: i } = _(), p = H(Ie);
|
|
226
|
+
return /* @__PURE__ */ t.createElement(ve, {
|
|
227
|
+
className: o,
|
|
228
|
+
isDismissable: !0
|
|
229
|
+
}, /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(Pe, {
|
|
230
|
+
ref: l,
|
|
231
|
+
className: n
|
|
232
|
+
}, /* @__PURE__ */ t.createElement(oe, {
|
|
233
|
+
"aria-label": r
|
|
234
|
+
}, /* @__PURE__ */ t.createElement(le, {
|
|
235
|
+
listBoxProps: {
|
|
236
|
+
"aria-label": r,
|
|
237
|
+
selectionMode: "single",
|
|
238
|
+
selectedKeys: u ? [
|
|
239
|
+
u
|
|
240
|
+
] : [],
|
|
241
|
+
onAction: (C) => {
|
|
242
|
+
i(C), p == null || p.close();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}, e)))));
|
|
246
|
+
}, le = ({ children: e, listBoxProps: n, isForcedOpen: o }) => {
|
|
247
|
+
const { countries: r } = _(), a = h(e, b.Option), c = h(e, b.Search), l = h(e, b.EmptyState), u = /* @__PURE__ */ t.createElement(xe, {
|
|
248
|
+
...n,
|
|
249
|
+
renderEmptyState: l ? () => l : void 0
|
|
250
|
+
}, r.map((i) => {
|
|
251
|
+
const p = K(i.longCountryCode) || "";
|
|
252
|
+
return L(a, {
|
|
253
|
+
key: i.shortCountryCode,
|
|
254
|
+
countryCode: i.shortCountryCode,
|
|
255
|
+
dialingCode: p,
|
|
256
|
+
countryName: i.countryName,
|
|
257
|
+
longCountryCode: i.longCountryCode
|
|
258
|
+
});
|
|
259
|
+
}));
|
|
260
|
+
return c ? /* @__PURE__ */ t.createElement(we, {
|
|
261
|
+
filter: (i, p, C) => {
|
|
262
|
+
const y = r.find((m) => m.shortCountryCode === C.key);
|
|
263
|
+
return !!y && Qe(y, p);
|
|
264
|
+
}
|
|
265
|
+
}, o ? L(c, {
|
|
266
|
+
autoFocus: !1
|
|
267
|
+
}) : c, u) : u;
|
|
268
|
+
};
|
|
269
|
+
b.Popover = b;
|
|
270
|
+
b.Modal = tt;
|
|
271
|
+
const ue = ({ className: e, children: n, "aria-label": o, ...r }) => {
|
|
272
|
+
const { autoFocus: a = !0 } = r;
|
|
273
|
+
return /* @__PURE__ */ t.createElement(Fe, {
|
|
274
|
+
"aria-label": o,
|
|
275
|
+
autoFocus: a
|
|
276
|
+
}, /* @__PURE__ */ t.createElement(G, {
|
|
277
|
+
className: e
|
|
278
|
+
}, n));
|
|
279
|
+
}, nt = ({ className: e, placeholder: n }) => /* @__PURE__ */ t.createElement(re, {
|
|
280
|
+
className: e,
|
|
281
|
+
placeholder: n
|
|
282
|
+
});
|
|
283
|
+
ue.Input = nt;
|
|
284
|
+
b.Search = ue;
|
|
285
|
+
const ot = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement("div", {
|
|
286
|
+
className: n
|
|
287
|
+
}, e);
|
|
288
|
+
b.EmptyState = ot;
|
|
289
|
+
const $ = ({ children: e, className: n, ...o }) => {
|
|
290
|
+
const { countryCode: r, dialingCode: a, countryName: c, longCountryCode: l } = o, u = {
|
|
291
|
+
countryCode: r,
|
|
292
|
+
dialingCode: a,
|
|
293
|
+
countryName: c,
|
|
294
|
+
longCountryCode: l
|
|
295
|
+
}, i = e || /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ie, null), /* @__PURE__ */ t.createElement(me, null), /* @__PURE__ */ t.createElement(pe, null));
|
|
296
|
+
return /* @__PURE__ */ t.createElement(De, {
|
|
297
|
+
className: n,
|
|
298
|
+
id: r,
|
|
299
|
+
textValue: `${c} ${a}`
|
|
300
|
+
}, /* @__PURE__ */ t.createElement(ce.Provider, {
|
|
301
|
+
value: u
|
|
302
|
+
}, i));
|
|
303
|
+
}, ie = ({ className: e }) => {
|
|
304
|
+
const { longCountryCode: n } = Y();
|
|
305
|
+
return /* @__PURE__ */ t.createElement(j, {
|
|
306
|
+
className: e,
|
|
307
|
+
longCountryCode: n
|
|
308
|
+
});
|
|
309
|
+
}, me = ({ className: e }) => {
|
|
310
|
+
const { countryName: n } = Y();
|
|
311
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
312
|
+
className: e
|
|
313
|
+
}, n);
|
|
314
|
+
}, pe = ({ className: e }) => {
|
|
315
|
+
const { dialingCode: n } = Y();
|
|
316
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
317
|
+
className: e
|
|
318
|
+
}, n);
|
|
319
|
+
};
|
|
320
|
+
$.Flag = ie;
|
|
321
|
+
$.Name = me;
|
|
322
|
+
$.Code = pe;
|
|
323
|
+
b.Option = $;
|
|
324
|
+
const rt = ({ className: e }) => {
|
|
325
|
+
const { t: n } = F(), { inputId: o, ariaDescribedBy: r } = ne(), { id: a, placeholder: c, disabled: l, readOnly: u, required: i, label: p, hasError: C } = D(), { currentValue: y, handlePhoneChange: m } = _(), f = P(null);
|
|
326
|
+
return fe(() => {
|
|
327
|
+
var d;
|
|
328
|
+
(d = f.current) == null || d.focus({
|
|
329
|
+
preventScroll: !0
|
|
330
|
+
});
|
|
331
|
+
}, a), /* @__PURE__ */ t.createElement(re, {
|
|
332
|
+
ref: f,
|
|
333
|
+
id: o,
|
|
334
|
+
type: "tel",
|
|
335
|
+
value: y,
|
|
336
|
+
onChange: (d) => m(d.target.value),
|
|
337
|
+
disabled: l,
|
|
338
|
+
readOnly: u,
|
|
339
|
+
required: i,
|
|
340
|
+
"aria-label": `${p}. ${n("field.phone.aria-label")}`,
|
|
341
|
+
"aria-describedby": r,
|
|
342
|
+
"aria-invalid": C,
|
|
343
|
+
placeholder: c,
|
|
344
|
+
className: e
|
|
345
|
+
});
|
|
346
|
+
}, at = ({ children: e, ...n }) => {
|
|
347
|
+
const o = n, { isForcedOpen: r } = o, { disabled: a, readOnly: c, required: l, hasError: u } = D(), [i, p] = T(!1), { t: C } = F(), { selectedCountryCode: y, handleCountryCodeChange: m } = _(), f = r || i && !a && !c;
|
|
348
|
+
return /* @__PURE__ */ t.createElement(Re, {
|
|
349
|
+
"aria-label": C("field.phone.country-code.aria-label"),
|
|
350
|
+
value: y ?? null,
|
|
351
|
+
onChange: (d) => m(d),
|
|
352
|
+
isDisabled: a || c,
|
|
353
|
+
isInvalid: u,
|
|
354
|
+
isRequired: l,
|
|
355
|
+
placeholder: "",
|
|
356
|
+
isOpen: f,
|
|
357
|
+
allowsEmptyCollection: !0,
|
|
358
|
+
onOpenChange: r ? void 0 : p
|
|
359
|
+
}, h(e, s.CountryButton), L(h(e, s.CountryOptions.Popover), {
|
|
360
|
+
...o,
|
|
361
|
+
isOpen: f
|
|
362
|
+
}));
|
|
363
|
+
}, st = ({ children: e, ...n }) => {
|
|
364
|
+
const o = n;
|
|
365
|
+
return /* @__PURE__ */ t.createElement(Be, null, h(e, s.CountryButton), L(h(e, s.CountryOptions.Modal), o));
|
|
366
|
+
}, ct = ({ children: e, className: n }) => {
|
|
367
|
+
const o = P(null), r = P(null), a = P(!1), { id: c, disabled: l, hasError: u, showFlag: i, onFocus: p, onBlur: C } = D(), y = ke(C), { countries: m } = _(), f = h(e, s.CountryDrawer), d = h(e, s.CountryPopover), S = h(e, s.PhoneNumber), N = m.length > 1, B = Ve(c) && !!d && N, R = typeof n == "function" ? n({
|
|
368
|
+
hasCountryOptions: N
|
|
369
|
+
}) : n, x = {
|
|
370
|
+
triggerRef: o,
|
|
371
|
+
optionsRef: r,
|
|
372
|
+
isForcedOpen: B
|
|
373
|
+
}, w = {
|
|
374
|
+
onFocus: () => {
|
|
375
|
+
a.current || (a.current = !0, p == null || p());
|
|
376
|
+
},
|
|
377
|
+
onBlur: (U) => {
|
|
378
|
+
var v, M;
|
|
379
|
+
const I = U.relatedTarget;
|
|
380
|
+
!((v = o.current) != null && v.contains(I)) && !((M = r.current) != null && M.contains(I)) && (a.current = !1, y());
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
return m.length === 1 ? /* @__PURE__ */ t.createElement(G, {
|
|
384
|
+
ref: o,
|
|
385
|
+
className: R,
|
|
386
|
+
isDisabled: l,
|
|
387
|
+
isInvalid: u,
|
|
388
|
+
...w
|
|
389
|
+
}, i && /* @__PURE__ */ t.createElement(j, {
|
|
390
|
+
longCountryCode: m[0].longCountryCode
|
|
391
|
+
}), S) : /* @__PURE__ */ t.createElement(G, {
|
|
392
|
+
ref: o,
|
|
393
|
+
className: R,
|
|
394
|
+
isDisabled: l,
|
|
395
|
+
isInvalid: u,
|
|
396
|
+
...w
|
|
397
|
+
}, !B && L(f, x), L(d, x), S);
|
|
398
|
+
};
|
|
399
|
+
s.Label = Te;
|
|
400
|
+
s.Control = ct;
|
|
401
|
+
s.CountryButton = z;
|
|
402
|
+
s.CountryDrawer = st;
|
|
403
|
+
s.CountryPopover = at;
|
|
404
|
+
s.CountryOptions = b;
|
|
405
|
+
s.PhoneNumber = rt;
|
|
406
|
+
s.Description = Me;
|
|
407
|
+
s.Error = Ae;
|
|
408
|
+
const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
409
|
+
width: 24,
|
|
410
|
+
height: 24,
|
|
411
|
+
viewBox: "0 0 24 24",
|
|
412
|
+
fill: "currentColor",
|
|
413
|
+
"aria-hidden": "true",
|
|
414
|
+
...e
|
|
415
|
+
}, /* @__PURE__ */ t.createElement("path", {
|
|
416
|
+
fillRule: "evenodd",
|
|
417
|
+
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"
|
|
418
|
+
})), ut = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
419
|
+
width: 24,
|
|
420
|
+
height: 24,
|
|
421
|
+
viewBox: "0 0 24 24",
|
|
422
|
+
fill: "currentColor",
|
|
423
|
+
"aria-hidden": "true",
|
|
424
|
+
...e
|
|
425
|
+
}, /* @__PURE__ */ t.createElement("path", {
|
|
426
|
+
fillRule: "evenodd",
|
|
427
|
+
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"
|
|
428
|
+
})), it = "_control_rc3mn_1", mt = "_countryButton_rc3mn_9", pt = "_drawerButton_rc3mn_25", Ct = "_popoverButton_rc3mn_34", dt = "_chevron_rc3mn_39", yt = "_globeIcon_rc3mn_48", Et = "_searchIcon_rc3mn_49", ft = "_flag_rc3mn_58", ht = "_phoneNumber_rc3mn_73", gt = "_countryOptions_rc3mn_99", bt = "_option_rc3mn_107", Ot = "_countrySearch_rc3mn_116", _t = "_mobileDrawer_rc3mn_124", Nt = "_name_rc3mn_133", St = "_code_rc3mn_137", Lt = "_mobileOverlay_rc3mn_154", E = {
|
|
429
|
+
control: it,
|
|
430
|
+
countryButton: mt,
|
|
431
|
+
drawerButton: pt,
|
|
432
|
+
popoverButton: Ct,
|
|
433
|
+
chevron: dt,
|
|
434
|
+
globeIcon: yt,
|
|
435
|
+
searchIcon: Et,
|
|
436
|
+
flag: ft,
|
|
437
|
+
phoneNumber: ht,
|
|
438
|
+
countryOptions: gt,
|
|
439
|
+
option: bt,
|
|
440
|
+
countrySearch: Ot,
|
|
441
|
+
mobileDrawer: _t,
|
|
442
|
+
name: Nt,
|
|
443
|
+
code: St,
|
|
444
|
+
mobileOverlay: Lt
|
|
445
|
+
}, It = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(Ce, {
|
|
446
|
+
content: e,
|
|
447
|
+
locale: n
|
|
448
|
+
}), vt = () => /* @__PURE__ */ t.createElement("span", {
|
|
449
|
+
className: E.chevron,
|
|
450
|
+
"aria-hidden": "true"
|
|
451
|
+
}, /* @__PURE__ */ t.createElement(Ke, null)), Wt = () => {
|
|
452
|
+
const e = je(O.selectOptionWithoutFocusRing, E.option, Q), n = ze(E.countrySearch), { t: o } = F(), { PortalContainer: r } = te(), a = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
453
|
+
className: n,
|
|
454
|
+
"aria-label": o("field.phone.country-search-input.aria-label")
|
|
455
|
+
}, /* @__PURE__ */ t.createElement(ut, {
|
|
456
|
+
className: E.searchIcon
|
|
457
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Search.Input, {
|
|
458
|
+
className: g(O.innerInput, Q),
|
|
459
|
+
placeholder: o("field.phone.country-search-input.placeholder")
|
|
460
|
+
})), c = /* @__PURE__ */ t.createElement(s.CountryOptions.EmptyState, null, o("field.phone.country-selector-dropdown.no-result")), l = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(s.CountryButton.Flag, {
|
|
461
|
+
className: E.flag
|
|
462
|
+
}), /* @__PURE__ */ t.createElement(s.CountryButton.EmptyState, null, /* @__PURE__ */ t.createElement(lt, {
|
|
463
|
+
className: E.globeIcon
|
|
464
|
+
})), /* @__PURE__ */ t.createElement(vt, null)), u = /* @__PURE__ */ t.createElement(s.CountryOptions.Option, {
|
|
465
|
+
className: e
|
|
466
|
+
}, /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Flag, {
|
|
467
|
+
className: E.flag
|
|
468
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Name, {
|
|
469
|
+
className: E.name
|
|
470
|
+
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Option.Code, {
|
|
471
|
+
className: E.code
|
|
472
|
+
}));
|
|
473
|
+
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
474
|
+
className: g(he, O.label)
|
|
475
|
+
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
476
|
+
className: g(ge, O.requiredMark)
|
|
477
|
+
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
478
|
+
className: ({ hasCountryOptions: i }) => g(i ? be : Oe, O.input, E.control)
|
|
479
|
+
}, /* @__PURE__ */ t.createElement(s.CountryDrawer, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
480
|
+
className: g(E.countryButton, E.drawerButton)
|
|
481
|
+
}, l), /* @__PURE__ */ t.createElement(s.CountryOptions.Modal, {
|
|
482
|
+
className: g(O.selectPopover, E.mobileDrawer),
|
|
483
|
+
overlayClassName: E.mobileOverlay,
|
|
484
|
+
portalContainer: r,
|
|
485
|
+
"aria-label": o("field.phone.country-code.aria-label")
|
|
486
|
+
}, a, c, u)), /* @__PURE__ */ t.createElement(s.CountryPopover, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
487
|
+
className: g(E.countryButton, E.popoverButton)
|
|
488
|
+
}, l), /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
|
|
489
|
+
className: g(_e, O.selectPopover, E.countryOptions),
|
|
490
|
+
placement: "bottom start",
|
|
491
|
+
offset: 0,
|
|
492
|
+
"aria-label": o("field.phone.country-code.aria-label")
|
|
493
|
+
}, a, c, u)), /* @__PURE__ */ t.createElement(s.PhoneNumber, {
|
|
494
|
+
className: g(O.innerInput, E.phoneNumber)
|
|
495
|
+
})), /* @__PURE__ */ t.createElement(s.Error, {
|
|
496
|
+
className: g(Ne, O.error)
|
|
497
|
+
}, /* @__PURE__ */ t.createElement(Ye, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
498
|
+
className: g(Se, O.description)
|
|
499
|
+
}, It));
|
|
500
|
+
};
|
|
501
|
+
export {
|
|
502
|
+
Wt as P
|
|
503
|
+
};
|
|
@@ -2,11 +2,11 @@ import t, { useMemo as $, useCallback as M, useRef as B } from "react";
|
|
|
2
2
|
import { RicosViewer as z } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
4
|
import { CheckboxField as G, CheckboxButton as j, NumberField as X, Group as J, Button as U, Input as W } from "react-aria-components";
|
|
5
|
-
import { b9 as k, b6 as Y, b1 as w, bj as Z, bb as ee, I as te, U as ne, L as ae, O as oe, N as re, H as le, v as se, p as ie, M as ce } from "./form-
|
|
5
|
+
import { b9 as k, b6 as Y, b1 as w, bj as Z, bb as ee, I as te, U as ne, L as ae, O as oe, N as re, H as le, v as se, p as ie, M as ce } from "./form-CY-iFZdC.js";
|
|
6
6
|
import { f as I, a as f } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as ue, g as me } from "./field-label-headless-
|
|
7
|
+
import { L as ue, g as me } from "./field-label-headless-m633nF93.js";
|
|
8
8
|
import { f as pe } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as de, E as Ee } from "./field-error-headless-
|
|
9
|
+
import { D as de, E as Ee } from "./field-error-headless-DRkkbv__.js";
|
|
10
10
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as be } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as _e } from "./selection-indicator-XQ8MYHUQ.js";
|
|
@@ -14,7 +14,7 @@ import { E as fe } from "./error-icon-hZxQ6DEy.js";
|
|
|
14
14
|
import { C as Ie } from "./checkbox-indicator-module-classes-BpeSpGsW.js";
|
|
15
15
|
import { s as T } from "./field-rac.module-B4l_0KRU.js";
|
|
16
16
|
import { o as Q } from "./options-rac.module-CTDdATiz.js";
|
|
17
|
-
import { u as Oe } from "./use-element-state-class-name-
|
|
17
|
+
import { u as Oe } from "./use-element-state-class-name-Dn_LpP1k.js";
|
|
18
18
|
var Le = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), x = /* @__PURE__ */ (function(e) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import a, { useRef as S, useState as V, useEffect as T, useCallback as B } from "react";
|
|
2
2
|
import { RadioGroup as H, RadioField as k, RadioButton as A, TextField as G, Input as P } from "react-aria-components";
|
|
3
|
-
import { b9 as v, b6 as $, bj as F, bb as x } from "./form-
|
|
3
|
+
import { b9 as v, b6 as $, bj as F, bb as x } from "./form-CY-iFZdC.js";
|
|
4
4
|
import { f as u, a as g } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as j } from "./field-error-headless-
|
|
6
|
-
import { L as M } from "./field-label-headless-
|
|
5
|
+
import { D as U, E as j } from "./field-error-headless-DRkkbv__.js";
|
|
6
|
+
import { L as M } from "./field-label-headless-m633nF93.js";
|
|
7
7
|
import { S as w } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
8
|
const L = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), y = (e, t) => !!t && !z(e, t), J = (e, t) => {
|
|
9
9
|
const l = t ? t.length + 2 : 0;
|
package/dist/component/{radio-group-field-rac-BDEAYQH5.js → radio-group-field-rac-DAwCG8w2.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { a, s, R as n } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s, R as n } from "./radio-button-module-classes-CjDU2x_m.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as r } from "./field-rac.module-B4l_0KRU.js";
|
|
7
|
-
import { I as E, U as i, P as p, Q as R, v as O, p as _, R as I } from "./form-
|
|
8
|
-
import { u as L } from "./use-element-state-class-name-
|
|
9
|
-
import { u as N } from "./use-text-input-class-name-
|
|
7
|
+
import { I as E, U as i, P as p, Q as R, v as O, p as _, R as I } from "./form-CY-iFZdC.js";
|
|
8
|
+
import { u as L } from "./use-element-state-class-name-Dn_LpP1k.js";
|
|
9
|
+
import { u as N } from "./use-text-input-class-name-BUW0svzK.js";
|
|
10
10
|
const u = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
11
11
|
content: o,
|
|
12
12
|
locale: l
|
package/dist/component/{rating-input-field-rac-CcO3-3O3.js → rating-input-field-rac-DTeubyLu.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as y } from "@wix/ricos/viewer";
|
|
2
2
|
import m from "classnames";
|
|
3
3
|
import e, { useCallback as N, useState as O, useRef as A } from "react";
|
|
4
|
-
import { b9 as I, b6 as v, bj as T, I as H, U as M, S as w, v as B, p as P, T as q } from "./form-
|
|
4
|
+
import { b9 as I, b6 as v, bj as T, I as H, U as M, S as w, v as B, p as P, T as q } from "./form-CY-iFZdC.js";
|
|
5
5
|
import { RadioGroup as G, RadioField as k, RadioButton as x } from "react-aria-components";
|
|
6
6
|
import { f as u, a as U } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as j, E as z } from "./field-error-headless-
|
|
8
|
-
import { L as Q } from "./field-label-headless-
|
|
7
|
+
import { D as j, E as z } from "./field-error-headless-DRkkbv__.js";
|
|
8
|
+
import { L as Q } from "./field-label-headless-m633nF93.js";
|
|
9
9
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as g } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import { u as J } from "./use-element-state-class-name-
|
|
11
|
+
import { u as J } from "./use-element-state-class-name-Dn_LpP1k.js";
|
|
12
12
|
const t = ({ children: a }) => {
|
|
13
13
|
const { id: n, value: r, onChange: o, disabled: l, readOnly: d, required: c, hasError: i, onBlur: E, onFocus: C, FieldLayout: R } = I(), { labelId: _ } = v(), L = N((D) => o(Number(D)), [
|
|
14
14
|
o
|
package/dist/component/{rich-content-rac.module-CzZ6x_Yf.js → rich-content-rac.module-DgQubdPj.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import { b9 as a, b1 as i, bj as T } from "./form-
|
|
2
|
+
import { b9 as a, b1 as i, bj as T } from "./form-CY-iFZdC.js";
|
|
3
3
|
import { Button as d } from "react-aria-components";
|
|
4
4
|
import { D as r } from "./data-hooks-Dkw1pbRj.js";
|
|
5
5
|
import { truncateRichContent as _ } from "@wix/ricos/content";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import l from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { b9 as m, an as i, a5 as u, aM as R, aP as T } from "./form-
|
|
4
|
-
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-
|
|
3
|
+
import { b9 as m, an as i, a5 as u, aM as R, aP as T } from "./form-CY-iFZdC.js";
|
|
4
|
+
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-DgQubdPj.js";
|
|
5
5
|
const h = {
|
|
6
6
|
colorPalette: T(),
|
|
7
7
|
customStyles: R()
|
package/dist/component/{service-dropdown-rac-CJTrm0iL.js → service-dropdown-rac-CTSCew5q.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import t, { useRef as b, useMemo as g, useCallback as D, useEffect as P } from "react";
|
|
2
2
|
import { RicosViewer as T } from "@wix/ricos/viewer";
|
|
3
3
|
import u from "classnames";
|
|
4
|
-
import { b5 as w, bj as A, F as M, b9 as y, b1 as U, ac as V, I as x, U as H, t as W, K as k, v as q, p as B } from "./form-
|
|
5
|
-
import { u as G } from "./use-service-options-base-
|
|
6
|
-
import { D as d } from "./dropdown-field-headless-
|
|
4
|
+
import { b5 as w, bj as A, F as M, b9 as y, b1 as U, ac as V, I as x, U as H, t as W, K as k, v as q, p as B } from "./form-CY-iFZdC.js";
|
|
5
|
+
import { u as G } from "./use-service-options-base-DBvqU30V.js";
|
|
6
|
+
import { D as d } from "./dropdown-field-headless-B_W8kD-t.js";
|
|
7
7
|
import { C as j } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
8
|
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
9
9
|
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
10
10
|
import { s as i } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import { u as Y } from "./use-dropdown-option-class-name-
|
|
11
|
+
import { u as Y } from "./use-dropdown-option-class-name-CE1u4RLT.js";
|
|
12
12
|
const z = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
13
13
|
const { actions: r } = w(), { t: h } = A(), { addOther: n, addOtherLabel: p } = e, c = p || h("add-other.default-other-option-label"), a = b(!0), E = g(() => {
|
|
14
14
|
var s;
|