@wix/form-elements 1.216.0 → 1.218.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-obvkIxlW.js → appointment-rac-BHOy_R7-.js} +4 -4
- package/dist/component/{bookings-address-rac-CZa9a87G.js → bookings-address-rac-BCrQv66p.js} +1 -1
- package/dist/component/{bookings-email-rac-m6v3w8mr.js → bookings-email-rac-DmRfdxfb.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Mofwr9rJ.js → bookings-first-name-rac-BXO3f2gd.js} +1 -1
- package/dist/component/{bookings-header-rac-Do1DvJ7m.js → bookings-header-rac-CO6AOevd.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BlRF6uxD.js → bookings-last-name-rac-BJBEASFi.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-dEw_cBua.js → bookings-login-bar-rac-BIAIfq4E.js} +5 -5
- package/dist/component/{bookings-phone-rac-DSHi8EoI.js → bookings-phone-rac-Ccj4N7sU.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-D1pEioKF.js → bookings-rich-text-rac-B3HZ904h.js} +1 -1
- package/dist/component/{checkbox-field-rac-DB6OkQVn.js → checkbox-field-rac-CMLQboNZ.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-DaZpfrAT.js → checkbox-group-field-headless-BoPu_anP.js} +41 -41
- package/dist/component/{checkbox-group-field-rac-DQyoeeOu.js → checkbox-group-field-rac-DDkB4mAS.js} +4 -4
- package/dist/component/{checkbox-group-rac-K1CohuW5.js → checkbox-group-rac-CYRjp2pd.js} +1 -1
- package/dist/component/{checkbox-rac-CGPLFefU.js → checkbox-rac-CZtOcpN3.js} +1 -1
- package/dist/component/{contacts-address-rac-D_whIRtO.js → contacts-address-rac-CTcU_s2X.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-yvBgsleM.js → contacts-birthdate-rac-CfoYd88-.js} +1 -1
- package/dist/component/{contacts-company-rac-dv-M3X8Q.js → contacts-company-rac-BFa1_U3K.js} +1 -1
- package/dist/component/{contacts-email-rac-CKFkxHeH.js → contacts-email-rac-DnAo-YRv.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DH_mqqVL.js → contacts-first-name-rac-CXaZzVt1.js} +1 -1
- package/dist/component/{contacts-last-name-rac-D1hViu7t.js → contacts-last-name-rac-DfpXadTk.js} +1 -1
- package/dist/component/{contacts-phone-rac-D5lEUsgX.js → contacts-phone-rac-CCwC37Ud.js} +1 -1
- package/dist/component/{contacts-position-rac-C5WN-obt.js → contacts-position-rac-CvMNYTKL.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C0TeOnX-.js → contacts-subscribe-rac-vL2jR6hR.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-K4f8cUph.js → contacts-tax-id-rac-CrFhrlkk.js} +1 -1
- package/dist/component/{date-availability-ta65eupL.js → date-availability-5zvsa_GI.js} +1 -1
- package/dist/component/{date-input-field-rac-Bqkxxe1x.js → date-input-field-rac-BQuCwFBz.js} +43 -43
- package/dist/component/{date-input-rac-DOrOad7M.js → date-input-rac-DKzwySbG.js} +1 -1
- package/dist/component/{date-picker-field-rac-dOXkkSun.js → date-picker-field-rac-D-B3bNeU.js} +35 -35
- package/dist/component/{date-picker-rac-D8KBZ1cw.js → date-picker-rac-DjYsBhgo.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BCHUvKca.js → date-time-input-field-rac-BECpkgB2.js} +30 -30
- package/dist/component/{date-time-input-rac-BDFKogee.js → date-time-input-rac-FbqGdzfB.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D5KPRINX.js → dext-checkbox-group-rac-BtSRkEFa.js} +2 -2
- package/dist/component/{dext-checkbox-rac-x-lXF3ag.js → dext-checkbox-rac-BnC_NNyy.js} +1 -1
- package/dist/component/{dext-date-picker-rac-B5K5u_Ps.js → dext-date-picker-rac-okrwxNz9.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-iVMwamqD.js → dext-date-time-input-rac-DHKRYBUe.js} +1 -1
- package/dist/component/{dext-dropdown-rac-B44HQTxy.js → dext-dropdown-rac-1T_Ufw_J.js} +1 -1
- package/dist/component/{dext-email-rac-B7QAR6VC.js → dext-email-rac-BY3bKE0q.js} +1 -1
- package/dist/component/{dext-number-input-rac-CNa31Dkr.js → dext-number-input-rac-CFnKXD1l.js} +1 -1
- package/dist/component/{dext-phone-rac-28tGCd-t.js → dext-phone-rac-LT9InJXw.js} +1 -1
- package/dist/component/{dext-radio-group-rac-Bl2Ge5R5.js → dext-radio-group-rac-BUebk1mz.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BkH9oIi5.js → dext-rating-input-rac-Drk4nKuW.js} +1 -1
- package/dist/component/{dext-tags-rac-B5FVVp1v.js → dext-tags-rac-BcW2-hht.js} +2 -2
- package/dist/component/{dext-text-area-rac-DKm2CHff.js → dext-text-area-rac-ew2HEDVz.js} +1 -1
- package/dist/component/{dext-text-input-rac-BC55g3Hi.js → dext-text-input-rac-BhhGEp-y.js} +1 -1
- package/dist/component/{dext-url-input-rac-BhoiLcDo.js → dext-url-input-rac-DKPl-POV.js} +1 -1
- package/dist/component/{donation-rac-BKjG_IJW.js → donation-rac-B9w7zHLs.js} +50 -50
- package/dist/component/{dropdown-field-rac-B7Xh6cx8.js → dropdown-field-rac-CyIgQ8Wg.js} +3 -3
- package/dist/component/{dropdown-rac-D8P7PqXg.js → dropdown-rac-D4zhCab8.js} +1 -1
- package/dist/component/{ecom-address-rac-pQw85I2u.js → ecom-address-rac-Cgc5vi9N.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CtHEpz27.js → ecom-subscription-checkbox-rac-Ci19HUzq.js} +2 -2
- package/dist/component/{email-input-field-rac-DJKj9_MB.js → email-input-field-rac-DX-z3AgN.js} +29 -29
- package/dist/component/{events-repeater-rac-ByGRYJRW.js → events-repeater-rac-XGxIXTW0.js} +29 -29
- package/dist/component/{events-rsvp-rac-CxCauRvS.js → events-rsvp-rac-CMEcer8W.js} +3 -3
- package/dist/component/{field-error-headless-Eh1lMElk.js → field-error-headless-fX6PeZaI.js} +1 -1
- package/dist/component/{field-label-headless-BqMxU6y-.js → field-label-headless-CoLjciGG.js} +5 -5
- package/dist/component/{file-upload-rac-C-3Xb3kq.js → file-upload-rac-N6_i0ky0.js} +88 -88
- package/dist/component/{fixed-payment-rac-XxysAIq7.js → fixed-payment-rac-DB6BtjkX.js} +7 -7
- package/dist/component/{form-DQjFn9dy.js → form-cgY_BDTU.js} +1444 -1426
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C9tk53e6.js → header-field-rac-CwNoeHks.js} +2 -2
- package/dist/component/{header-rac-CrgF_o1e.js → header-rac-DefKb4Vd.js} +1 -1
- package/dist/component/{image-choice-rac-N7NLy50u.js → image-choice-rac-CZFYVSzP.js} +25 -25
- package/dist/component/{index-CUqQt_K0.js → index-D1ybDmS5.js} +2 -2
- package/dist/component/{index-D539Cefk.js → index-DUVXPUGc.js} +513 -462
- package/dist/component/{isObjectLike-BXMsjR41.js → isObjectLike-93vxyYs1.js} +1 -1
- package/dist/component/multiline-address-field-rac-BN_Tnrno.js +1738 -0
- package/dist/component/{multiline-address-rac-C-8KYUEy.js → multiline-address-rac-CoF0BwJI.js} +1 -1
- package/dist/component/{number-input-field-rac-DrpgAvrT.js → number-input-field-rac-BVdfzTwW.js} +21 -21
- package/dist/component/{number-input-rac-hZ1UmeEv.js → number-input-rac-D-A2ybtN.js} +1 -1
- package/dist/component/{password-rac-DU5Zii-x.js → password-rac-CbUBNreW.js} +26 -26
- package/dist/component/{payment-input-rac-BzDtJSoa.js → payment-input-rac-BXdDXgXp.js} +46 -46
- package/dist/component/{phone-input-field-rac-CBviQ-on.js → phone-input-field-rac-CjmpG7p9.js} +57 -57
- package/dist/component/{phone-rac-B4n-wlvj.js → phone-rac-D3g5Pi2p.js} +1 -1
- package/dist/component/{product-list-rac-CYxJDesp.js → product-list-rac-gJvJaUnQ.js} +35 -35
- package/dist/component/{quiz-radio-group-rac-BLGXjhrS.js → quiz-radio-group-rac-YCKwAv5G.js} +1 -1
- package/dist/component/{radio-button-module-classes-D0gXibxL.js → radio-button-module-classes-2nfcqSJp.js} +15 -15
- package/dist/component/{radio-group-field-rac-D3JvbED7.js → radio-group-field-rac-BBYaCpeZ.js} +4 -4
- package/dist/component/{radio-group-rac-CTk1SQPS.js → radio-group-rac-fYuYtO48.js} +1 -1
- package/dist/component/{rating-input-field-rac-hDcxRY-7.js → rating-input-field-rac-sPYk1nWc.js} +20 -20
- package/dist/component/{rating-input-rac-CaEUM0ek.js → rating-input-rac-CiWqxkPO.js} +1 -1
- package/dist/component/{rich-content-rac.module-D11y-VmE.js → rich-content-rac.module-BjcbV5CK.js} +5 -5
- package/dist/component/{rich-text-field-rac-BNB_Ek6y.js → rich-text-field-rac-DY0vRG7M.js} +4 -4
- package/dist/component/{rich-text-rac-Jo_aEgLC.js → rich-text-rac-BngE_MAC.js} +1 -1
- package/dist/component/{service-dropdown-rac-CzSP8CC_.js → service-dropdown-rac-Db53P8Fm.js} +13 -13
- package/dist/component/{services-multi-choice-rac-aS5N5-xK.js → services-multi-choice-rac-Cr791rTd.js} +9 -9
- package/dist/component/{signature-rac-_tiY8h_q.js → signature-rac-BCNYIwad.js} +41 -41
- package/dist/component/{submit-button-rac-DKc6QhMf.js → submit-button-rac-CyyEQGsz.js} +10 -10
- package/dist/component/{tags-field-rac-BCO7fpBv.js → tags-field-rac-k3HHiR5C.js} +24 -24
- package/dist/component/{tags-rac-q3HNn7ue.js → tags-rac-nOXYrsHv.js} +1 -1
- package/dist/component/{text-area-field-rac-BtQ8MQSN.js → text-area-field-rac-CwpxShM0.js} +22 -22
- package/dist/component/{text-area-rac-Dc2q2Oxx.js → text-area-rac-CkKcWyW5.js} +1 -1
- package/dist/component/{text-input-field-rac-DO5PDRBN.js → text-input-field-rac-DvIwNwn3.js} +3 -3
- package/dist/component/{text-input-headless-BGSp91Fx.js → text-input-headless-vfGxjFpa.js} +9 -9
- package/dist/component/{text-input-rac-B2OO3yVY.js → text-input-rac-DoVI2HNp.js} +1 -1
- package/dist/component/{time-input-rac-BICb4Q3S.js → time-input-rac-DPbbdnl3.js} +16 -16
- package/dist/component/{url-input-field-rac-ptvkhiHT.js → url-input-field-rac-CiZi4oVe.js} +20 -20
- package/dist/component/{url-input-rac-DOLmuZEu.js → url-input-rac-C-IvLpA8.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CJmAINAg.js → use-dropdown-option-class-name-CMgoymWE.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-DA0MtxzO.js → use-dropdown-trigger-class-name-BH0PyTH_.js} +24 -24
- package/dist/component/{use-element-state-class-name-ByxBZ_3F.js → use-element-state-class-name-DiZjY9WE.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-lKS_yzxr.js → use-hoverable-input-class-name-QpNEvrdn.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-ByGtfX25.js → use-is-forced-open-dropdown-CHh9nGJz.js} +4 -4
- package/dist/component/{use-service-options-base-CsY2G8DG.js → use-service-options-base-BGB82e2d.js} +4 -4
- package/dist/component/use-text-input-class-name-_CjB7lhB.js +6 -0
- package/package.json +2 -2
- package/dist/component/multiline-address-field-rac-B3NKIdbr.js +0 -1664
- package/dist/component/use-text-input-class-name-CbJQlesN.js +0 -6
package/dist/component/{phone-input-field-rac-CBviQ-on.js → phone-input-field-rac-CjmpG7p9.js}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { RicosViewer as ye } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import t, { useMemo as A, useState as T, useRef as F, useEffect as k, useCallback as Z, createContext as ne, useContext as
|
|
4
|
-
import { bv as fe,
|
|
2
|
+
import b from "classnames";
|
|
3
|
+
import t, { useMemo as A, useState as T, useRef as F, useEffect as k, useCallback as Z, createContext as ne, useContext as Y, useId as Ee } from "react";
|
|
4
|
+
import { bv as fe, bY as D, bF as oe, bX as he, bN as w, bK as re, bP as ge, bW as be, X as Oe, am as _e, a3 as Q, M as Ne, I as Le, a5 as Pe, a4 as Se, a2 as Ie } from "./form-cgY_BDTU.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as ve } from "react-aria";
|
|
6
6
|
import { Dialog as ae, OverlayTriggerStateContext as Fe, ModalOverlay as De, Modal as we, SearchField as Be, Group as U, ListBoxItem as Re, DialogTrigger as xe, Select as Me, Input as se, Autocomplete as je } from "react-aria-components";
|
|
7
7
|
import ce, { AsYouType as $e, isValidPhoneNumber as Ae, isSupportedCountry as Te } from "libphonenumber-js";
|
|
8
8
|
import "libphonenumber-js/metadata.min.json";
|
|
9
|
-
import { f as h, a as
|
|
10
|
-
import { D as Ve, E as ke } from "./field-error-headless-
|
|
11
|
-
import { L as He } from "./field-label-headless-
|
|
9
|
+
import { f as h, a as S } from "./find-child-C60k4CxG.js";
|
|
10
|
+
import { D as Ve, E as ke } from "./field-error-headless-fX6PeZaI.js";
|
|
11
|
+
import { L as He } from "./field-label-headless-CoLjciGG.js";
|
|
12
12
|
import { N as Ue, S as qe } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { u as
|
|
14
|
-
import { d as
|
|
15
|
-
import { V as
|
|
16
|
-
import { C as
|
|
13
|
+
import { u as Ke } from "./use-invoke-callback-UH73A_J3.js";
|
|
14
|
+
import { d as Ye } from "./use-is-forced-open-dropdown-CHh9nGJz.js";
|
|
15
|
+
import { V as Ge, a as ze } from "./use-dropdown-option-class-name-CMgoymWE.js";
|
|
16
|
+
import { C as J } from "./calling-country-codes-PyWuOTmF.js";
|
|
17
17
|
import { C as We } from "./chevron-down-icon-CcpVm6B-.js";
|
|
18
18
|
import { E as Xe } from "./error-icon-hZxQ6DEy.js";
|
|
19
19
|
import { H as ee } from "./custom-focus-class-_483Pkwp.js";
|
|
20
|
-
import { s as
|
|
21
|
-
import { u as te } from "./use-hoverable-input-class-name-
|
|
20
|
+
import { s as O } from "./field-rac.module-DcyJyi2B.js";
|
|
21
|
+
import { u as te } from "./use-hoverable-input-class-name-QpNEvrdn.js";
|
|
22
22
|
function q(e) {
|
|
23
23
|
const n = e ? ce(e) : void 0, r = n == null ? void 0 : n.country;
|
|
24
24
|
if (r)
|
|
@@ -26,14 +26,14 @@ function q(e) {
|
|
|
26
26
|
const o = new $e();
|
|
27
27
|
return e && o.input(e), o.getCountry();
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function G(e) {
|
|
30
30
|
var n;
|
|
31
31
|
return e && ((n = fe.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
32
32
|
}
|
|
33
33
|
function $(e) {
|
|
34
34
|
return e === null ? null : e.replace(/[^0-9+]/g, "") || e;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function K(e, n) {
|
|
37
37
|
if (e && n)
|
|
38
38
|
try {
|
|
39
39
|
const r = ce(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
@@ -49,12 +49,12 @@ const Ze = (e, n) => {
|
|
|
49
49
|
if (!r)
|
|
50
50
|
return;
|
|
51
51
|
const { defaultCountry: o, validation: a } = n, c = (u = (i = a == null ? void 0 : a.string) == null ? void 0 : i.phoneOptions) == null ? void 0 : u.allowedCountryCodes, l = q(r) || o || ((c == null ? void 0 : c.length) === 1 ? c[0] : void 0);
|
|
52
|
-
return $(
|
|
52
|
+
return $(K(r, l)) ?? void 0;
|
|
53
53
|
};
|
|
54
|
-
function
|
|
54
|
+
function Qe() {
|
|
55
55
|
const { t: e } = D(), { language: n } = oe();
|
|
56
|
-
return A(() => Object.keys(
|
|
57
|
-
const c =
|
|
56
|
+
return A(() => Object.keys(J).reduce((o, a) => {
|
|
57
|
+
const c = J[a], l = G(c), i = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
58
58
|
return l && Te(a) && o.push({
|
|
59
59
|
countryName: i,
|
|
60
60
|
longCountryCode: c,
|
|
@@ -66,7 +66,7 @@ function Je() {
|
|
|
66
66
|
n
|
|
67
67
|
]);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Je(e, n) {
|
|
70
70
|
return e.filter((r) => n && n.length > 0 ? n.includes(r.shortCountryCode) : !0);
|
|
71
71
|
}
|
|
72
72
|
function et(e, n) {
|
|
@@ -107,7 +107,7 @@ function tt({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
107
107
|
}
|
|
108
108
|
const E = q(m);
|
|
109
109
|
u((y) => {
|
|
110
|
-
const
|
|
110
|
+
const P = E || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), N = $(K(m, P));
|
|
111
111
|
return l.current = N ?? "", o(N), E || y;
|
|
112
112
|
});
|
|
113
113
|
}, [
|
|
@@ -115,7 +115,7 @@ function tt({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
115
115
|
o
|
|
116
116
|
]), d = Z((m) => {
|
|
117
117
|
u(m), c((E) => {
|
|
118
|
-
const y = $(
|
|
118
|
+
const y = $(K(E, m));
|
|
119
119
|
return l.current = y ?? "", o(y), E;
|
|
120
120
|
});
|
|
121
121
|
}, [
|
|
@@ -129,12 +129,12 @@ function tt({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
const le = /* @__PURE__ */ ne(null), _ = () => {
|
|
132
|
-
const e =
|
|
132
|
+
const e = Y(le);
|
|
133
133
|
if (!e)
|
|
134
134
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
135
135
|
return e;
|
|
136
136
|
}, ue = /* @__PURE__ */ ne(null), z = () => {
|
|
137
|
-
const e =
|
|
137
|
+
const e = Y(ue);
|
|
138
138
|
if (!e)
|
|
139
139
|
throw new Error("Option sub-components must be used within Option component");
|
|
140
140
|
return e;
|
|
@@ -154,12 +154,12 @@ const le = /* @__PURE__ */ ne(null), _ = () => {
|
|
|
154
154
|
});
|
|
155
155
|
}, s = ({ children: e }) => {
|
|
156
156
|
var L, v;
|
|
157
|
-
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = w(), [i, u] = T(null), p = (v = (L = l == null ? void 0 : l.string) == null ? void 0 : L.phoneOptions) == null ? void 0 : v.allowedCountryCodes, C =
|
|
157
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = w(), [i, u] = T(null), p = (v = (L = l == null ? void 0 : l.string) == null ? void 0 : L.phoneOptions) == null ? void 0 : v.allowedCountryCodes, C = Qe(), d = A(() => Je(C, p), [
|
|
158
158
|
C,
|
|
159
159
|
p
|
|
160
160
|
]), m = A(() => d.map((j) => j.shortCountryCode), [
|
|
161
161
|
d
|
|
162
|
-
]), { currentValue: E, selectedCountryCode: y, handlePhoneChange:
|
|
162
|
+
]), { currentValue: E, selectedCountryCode: y, handlePhoneChange: P, handleCountryCodeChange: N } = tt({
|
|
163
163
|
value: r,
|
|
164
164
|
defaultCountryCode: c,
|
|
165
165
|
allowedCountryCodes: m,
|
|
@@ -167,7 +167,7 @@ const le = /* @__PURE__ */ ne(null), _ = () => {
|
|
|
167
167
|
}), B = h(e, s.Label), R = h(e, s.Control), x = h(e, s.Description), M = h(e, s.Error), I = {
|
|
168
168
|
currentValue: E,
|
|
169
169
|
selectedCountryCode: y,
|
|
170
|
-
handlePhoneChange:
|
|
170
|
+
handlePhoneChange: P,
|
|
171
171
|
handleCountryCodeChange: N,
|
|
172
172
|
countryCodes: m,
|
|
173
173
|
countries: d,
|
|
@@ -187,7 +187,7 @@ const le = /* @__PURE__ */ ne(null), _ = () => {
|
|
|
187
187
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, M, x)
|
|
188
188
|
}));
|
|
189
189
|
}, X = ({ children: e, className: n }) => {
|
|
190
|
-
const { labelId: r } = re(), { hasError: o, disabled: a, readOnly: c } = w(), { t: l } = D(), { selectedCountryCode: i, countries: u } = _(), p = Ee(), C = i ? u.find((y) => y.shortCountryCode === i) : void 0, d = C &&
|
|
190
|
+
const { labelId: r } = re(), { hasError: o, disabled: a, readOnly: c } = w(), { t: l } = D(), { selectedCountryCode: i, countries: u } = _(), p = Ee(), C = i ? u.find((y) => y.shortCountryCode === i) : void 0, d = C && G(C.longCountryCode) || "", m = l("field.phone.country-code.aria-label"), E = C ? `${m}, ${C.countryName}, ${d}` : m;
|
|
191
191
|
return /* @__PURE__ */ t.createElement(qe, {
|
|
192
192
|
isDisabled: a || c,
|
|
193
193
|
id: p,
|
|
@@ -230,7 +230,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
230
230
|
"aria-label": r
|
|
231
231
|
}, m) : m));
|
|
232
232
|
}, rt = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...c }) => {
|
|
233
|
-
const { optionsRef: l } = c, { selectedCountryCode: i, handleCountryCodeChange: u } = _(), p =
|
|
233
|
+
const { optionsRef: l } = c, { selectedCountryCode: i, handleCountryCodeChange: u } = _(), p = Y(Fe);
|
|
234
234
|
return /* @__PURE__ */ t.createElement(De, {
|
|
235
235
|
className: r,
|
|
236
236
|
isDismissable: !0
|
|
@@ -253,13 +253,13 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
253
253
|
}
|
|
254
254
|
}, e)))));
|
|
255
255
|
}, ie = ({ children: e, listBoxProps: n, isForcedOpen: r }) => {
|
|
256
|
-
const { countries: o } = _(), a = h(e, g.Option), c = h(e, g.Search), l = h(e, g.EmptyState), i = /* @__PURE__ */ t.createElement(
|
|
256
|
+
const { countries: o } = _(), a = h(e, g.Option), c = h(e, g.Search), l = h(e, g.EmptyState), i = /* @__PURE__ */ t.createElement(Ge, {
|
|
257
257
|
isForcedOpen: r === !0,
|
|
258
258
|
...n,
|
|
259
259
|
renderEmptyState: l ? () => l : void 0
|
|
260
260
|
}, o.map((u) => {
|
|
261
|
-
const p =
|
|
262
|
-
return
|
|
261
|
+
const p = G(u.longCountryCode) || "";
|
|
262
|
+
return S(a, {
|
|
263
263
|
key: u.shortCountryCode,
|
|
264
264
|
countryCode: u.shortCountryCode,
|
|
265
265
|
dialingCode: p,
|
|
@@ -272,7 +272,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
272
272
|
const d = o.find((m) => m.shortCountryCode === C.key);
|
|
273
273
|
return !!d && et(d, p);
|
|
274
274
|
}
|
|
275
|
-
}, r ?
|
|
275
|
+
}, r ? S(c, {
|
|
276
276
|
autoFocus: !1
|
|
277
277
|
}) : c, i) : i;
|
|
278
278
|
};
|
|
@@ -338,7 +338,7 @@ const ct = ({ className: e }) => {
|
|
|
338
338
|
(y = E.current) == null || y.focus({
|
|
339
339
|
preventScroll: !0
|
|
340
340
|
});
|
|
341
|
-
}, a),
|
|
341
|
+
}, a), be(E, Ze), /* @__PURE__ */ t.createElement(se, {
|
|
342
342
|
ref: E,
|
|
343
343
|
id: r,
|
|
344
344
|
type: "tel",
|
|
@@ -367,15 +367,15 @@ const ct = ({ className: e }) => {
|
|
|
367
367
|
isOpen: E,
|
|
368
368
|
allowsEmptyCollection: !0,
|
|
369
369
|
onOpenChange: o ? void 0 : p
|
|
370
|
-
}, h(e, s.CountryButton),
|
|
370
|
+
}, h(e, s.CountryButton), S(h(e, s.CountryOptions.Popover), {
|
|
371
371
|
...r,
|
|
372
372
|
isOpen: E
|
|
373
373
|
}));
|
|
374
374
|
}, ut = ({ children: e, ...n }) => {
|
|
375
375
|
const r = n;
|
|
376
|
-
return /* @__PURE__ */ t.createElement(xe, null, h(e, s.CountryButton),
|
|
376
|
+
return /* @__PURE__ */ t.createElement(xe, null, h(e, s.CountryButton), S(h(e, s.CountryOptions.Modal), r));
|
|
377
377
|
}, it = ({ children: e, className: n }) => {
|
|
378
|
-
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: p, onBlur: C } = w(), d =
|
|
378
|
+
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: p, onBlur: C } = w(), d = Ke(C), { countries: m } = _(), E = h(e, s.CountryDrawer), y = h(e, s.CountryPopover), P = h(e, s.PhoneNumber), N = m.length > 1, B = Ye(c) && !!y && N, R = typeof n == "function" ? ({ isHovered: I, isFocusWithin: L }) => n({
|
|
379
379
|
hasCountryOptions: N,
|
|
380
380
|
isHovered: I,
|
|
381
381
|
isFocusWithin: L
|
|
@@ -401,13 +401,13 @@ const ct = ({ className: e }) => {
|
|
|
401
401
|
...M
|
|
402
402
|
}, u && /* @__PURE__ */ t.createElement(W, {
|
|
403
403
|
longCountryCode: m[0].longCountryCode
|
|
404
|
-
}),
|
|
404
|
+
}), P) : /* @__PURE__ */ t.createElement(U, {
|
|
405
405
|
ref: r,
|
|
406
406
|
className: R,
|
|
407
407
|
isDisabled: l,
|
|
408
408
|
isInvalid: i,
|
|
409
409
|
...M
|
|
410
|
-
}, !B &&
|
|
410
|
+
}, !B && S(E, x), S(y, x), P);
|
|
411
411
|
};
|
|
412
412
|
s.Label = He;
|
|
413
413
|
s.Control = it;
|
|
@@ -438,7 +438,7 @@ const mt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
438
438
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
439
439
|
fillRule: "evenodd",
|
|
440
440
|
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"
|
|
441
|
-
})), Ct = "_control_o9wij_1", dt = "_countryButton_o9wij_9", yt = "_drawerButton_o9wij_25", Et = "_popoverButton_o9wij_34", ft = "_chevron_o9wij_39", ht = "_globeIcon_o9wij_48", gt = "_searchIcon_o9wij_56",
|
|
441
|
+
})), Ct = "_control_o9wij_1", dt = "_countryButton_o9wij_9", yt = "_drawerButton_o9wij_25", Et = "_popoverButton_o9wij_34", ft = "_chevron_o9wij_39", ht = "_globeIcon_o9wij_48", gt = "_searchIcon_o9wij_56", bt = "_flag_o9wij_61", Ot = "_option_o9wij_67", _t = "_phoneNumber_o9wij_80", Nt = "_countryOptions_o9wij_106", Lt = "_countrySearch_o9wij_123", Pt = "_mobileDrawer_o9wij_131", St = "_name_o9wij_140", It = "_code_o9wij_144", vt = "_mobileOverlay_o9wij_161", f = {
|
|
442
442
|
control: Ct,
|
|
443
443
|
countryButton: dt,
|
|
444
444
|
drawerButton: yt,
|
|
@@ -446,13 +446,13 @@ const mt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
446
446
|
chevron: ft,
|
|
447
447
|
globeIcon: ht,
|
|
448
448
|
searchIcon: gt,
|
|
449
|
-
flag:
|
|
450
|
-
option:
|
|
449
|
+
flag: bt,
|
|
450
|
+
option: Ot,
|
|
451
451
|
phoneNumber: _t,
|
|
452
452
|
countryOptions: Nt,
|
|
453
453
|
countrySearch: Lt,
|
|
454
|
-
mobileDrawer:
|
|
455
|
-
name:
|
|
454
|
+
mobileDrawer: Pt,
|
|
455
|
+
name: St,
|
|
456
456
|
code: It,
|
|
457
457
|
mobileOverlay: vt
|
|
458
458
|
}, Ft = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(ye, {
|
|
@@ -461,10 +461,10 @@ const mt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
461
461
|
}), Dt = () => /* @__PURE__ */ t.createElement("span", {
|
|
462
462
|
className: f.chevron,
|
|
463
463
|
"aria-hidden": "true"
|
|
464
|
-
}, /* @__PURE__ */ t.createElement(We, null)),
|
|
465
|
-
const e = ze(
|
|
464
|
+
}, /* @__PURE__ */ t.createElement(We, null)), Qt = () => {
|
|
465
|
+
const e = ze(Se, O.selectOptionWithoutFocusRing, f.option, ee), n = te(Ie, [
|
|
466
466
|
f.control
|
|
467
|
-
]), r = te(
|
|
467
|
+
]), r = te(Pe, [
|
|
468
468
|
f.countrySearch
|
|
469
469
|
]), { t: o } = D(), { PortalContainer: a } = oe(), c = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
470
470
|
className: r,
|
|
@@ -472,7 +472,7 @@ const mt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
472
472
|
}, /* @__PURE__ */ t.createElement(pt, {
|
|
473
473
|
className: f.searchIcon
|
|
474
474
|
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Search.Input, {
|
|
475
|
-
className: O
|
|
475
|
+
className: b(O.innerInput, ee),
|
|
476
476
|
placeholder: o("field.phone.country-search-input.placeholder")
|
|
477
477
|
})), l = /* @__PURE__ */ t.createElement(s.CountryOptions.EmptyState, null, o("field.phone.country-selector-dropdown.no-result")), i = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(s.CountryButton.Flag, {
|
|
478
478
|
className: f.flag
|
|
@@ -488,33 +488,33 @@ const mt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
488
488
|
className: f.code
|
|
489
489
|
}));
|
|
490
490
|
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
491
|
-
className:
|
|
491
|
+
className: b(Oe, O.label)
|
|
492
492
|
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
493
|
-
className:
|
|
493
|
+
className: b(_e, O.requiredMark)
|
|
494
494
|
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
495
495
|
className: ({ hasCountryOptions: p, ...C }) => n(C)
|
|
496
496
|
}, /* @__PURE__ */ t.createElement(s.CountryDrawer, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
497
|
-
className:
|
|
497
|
+
className: b(f.countryButton, f.drawerButton)
|
|
498
498
|
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Modal, {
|
|
499
|
-
className:
|
|
499
|
+
className: b(Q, O.selectPopover, f.mobileDrawer),
|
|
500
500
|
overlayClassName: f.mobileOverlay,
|
|
501
501
|
portalContainer: a,
|
|
502
502
|
"aria-label": o("field.phone.country-code.aria-label")
|
|
503
503
|
}, c, l, u)), /* @__PURE__ */ t.createElement(s.CountryPopover, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
504
|
-
className:
|
|
504
|
+
className: b(f.countryButton, f.popoverButton)
|
|
505
505
|
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
|
|
506
|
-
className:
|
|
506
|
+
className: b(Q, O.selectPopover, f.countryOptions),
|
|
507
507
|
placement: "bottom start",
|
|
508
508
|
offset: 0,
|
|
509
509
|
"aria-label": o("field.phone.country-code.aria-label")
|
|
510
510
|
}, c, l, u)), /* @__PURE__ */ t.createElement(s.PhoneNumber, {
|
|
511
|
-
className: O
|
|
511
|
+
className: b(O.innerInput, f.phoneNumber)
|
|
512
512
|
})), /* @__PURE__ */ t.createElement(s.Error, {
|
|
513
|
-
className:
|
|
513
|
+
className: b(Ne, O.error)
|
|
514
514
|
}, /* @__PURE__ */ t.createElement(Xe, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
515
|
-
className:
|
|
515
|
+
className: b(Le, O.description)
|
|
516
516
|
}, Ft));
|
|
517
517
|
};
|
|
518
518
|
export {
|
|
519
|
-
|
|
519
|
+
Qt as P
|
|
520
520
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as H, useCallback as v, useRef as x } from "react";
|
|
2
|
+
import { RicosViewer as $ } from "@wix/ricos/viewer";
|
|
3
3
|
import y from "classnames";
|
|
4
|
-
import { CheckboxField as
|
|
5
|
-
import {
|
|
4
|
+
import { CheckboxField as z, CheckboxButton as X, NumberField as Y, Group as j, Button as Q, Input as J } from "react-aria-components";
|
|
5
|
+
import { bN as U, bK as W, bF as V, bY as Z, bP as ee, X as te, am as ne, a6 as ae, a7 as oe, aa as re, a9 as le, ab as se, M as ie, I as ce, a8 as ue } from "./form-cgY_BDTU.js";
|
|
6
6
|
import { f, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as me, g as pe } from "./field-label-headless-
|
|
7
|
+
import { L as me, g as pe } from "./field-label-headless-CoLjciGG.js";
|
|
8
8
|
import { f as de } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as Ee, E as _e } from "./field-error-headless-
|
|
9
|
+
import { D as Ee, E as _e } from "./field-error-headless-fX6PeZaI.js";
|
|
10
10
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as Ie } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as be } from "./selection-indicator-XQ8MYHUQ.js";
|
|
13
13
|
import { E as fe } from "./error-icon-hZxQ6DEy.js";
|
|
14
|
-
import { C as
|
|
14
|
+
import { C as Le } from "./checkbox-indicator-module-classes-DOxE4UQg.js";
|
|
15
15
|
import { s as A } from "./field-rac.module-DcyJyi2B.js";
|
|
16
16
|
import { o as w } from "./options-rac.module-_THNq6Qq.js";
|
|
17
|
-
import { u as
|
|
17
|
+
import { u as Oe } from "./use-element-state-class-name-DiZjY9WE.js";
|
|
18
18
|
var Ce = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), k = /* @__PURE__ */ (function(e) {
|
|
@@ -28,10 +28,10 @@ function Re({ maxItems: e, products: a } = {}) {
|
|
|
28
28
|
}
|
|
29
29
|
const o = ({ children: e }) => {
|
|
30
30
|
var D;
|
|
31
|
-
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: _, onBlur:
|
|
31
|
+
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: _, onBlur: L, onFocus: s, hasError: u, validation: m, FieldLayout: p } = U(), { inputId: M, labelId: N, ariaDescribedBy: h } = W(), I = f(e, o.Label), g = f(e, o.Options), q = f(e, o.Description), O = f(e, o.Error), i = H(() => l || [], [
|
|
32
32
|
l
|
|
33
33
|
]), T = Re((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F = v((S, R) => {
|
|
34
|
-
const d = i.filter((
|
|
34
|
+
const d = i.filter((G) => G.productId !== S.productId), B = R ? [
|
|
35
35
|
...d,
|
|
36
36
|
S
|
|
37
37
|
] : d;
|
|
@@ -48,7 +48,7 @@ const o = ({ children: e }) => {
|
|
|
48
48
|
ariaLabelledBy: N,
|
|
49
49
|
ariaDescribedBy: h,
|
|
50
50
|
required: _,
|
|
51
|
-
onBlur:
|
|
51
|
+
onBlur: L,
|
|
52
52
|
onFocus: s
|
|
53
53
|
}, g ? b(g, {
|
|
54
54
|
allowMany: T,
|
|
@@ -58,15 +58,15 @@ const o = ({ children: e }) => {
|
|
|
58
58
|
readOnly: c,
|
|
59
59
|
hasError: u
|
|
60
60
|
}) : null),
|
|
61
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
61
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, O, q)
|
|
62
62
|
});
|
|
63
|
-
},
|
|
64
|
-
const { allowMany: n, productValues: r, onProductChange: c, disabled: _, readOnly:
|
|
63
|
+
}, K = ({ children: e, className: a, ...l }) => {
|
|
64
|
+
const { allowMany: n, productValues: r, onProductChange: c, disabled: _, readOnly: L, hasError: s } = l, { options: u, validation: m, imageResize: p } = U(), { currency: M } = V(), { t: N } = Z(), h = f(e, o.Option);
|
|
65
65
|
return /* @__PURE__ */ t.createElement("div", {
|
|
66
66
|
className: a
|
|
67
67
|
}, u == null ? void 0 : u.map((I, g) => {
|
|
68
68
|
var C, T, F, D, S;
|
|
69
|
-
const q = ((S = (D = (F = (T = (C = m == null ? void 0 : m.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : T.products) == null ? void 0 : F.find((R) => R.id === I.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0",
|
|
69
|
+
const q = ((S = (D = (F = (T = (C = m == null ? void 0 : m.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : T.products) == null ? void 0 : F.find((R) => R.id === I.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", O = Ie(N, M), i = r.find((R) => R.productId === I.value);
|
|
70
70
|
return b(h, {
|
|
71
71
|
key: I.id || I.value || I.label,
|
|
72
72
|
option: I,
|
|
@@ -76,15 +76,15 @@ const o = ({ children: e }) => {
|
|
|
76
76
|
allowMany: n,
|
|
77
77
|
onProductChange: c,
|
|
78
78
|
disabled: _,
|
|
79
|
-
readOnly:
|
|
79
|
+
readOnly: L,
|
|
80
80
|
hasError: s,
|
|
81
|
-
currencyAriaLabel:
|
|
81
|
+
currencyAriaLabel: O,
|
|
82
82
|
imageResize: p,
|
|
83
83
|
isFirst: g === 0
|
|
84
84
|
});
|
|
85
85
|
}));
|
|
86
86
|
}, E = ({ children: e, className: a, ...l }) => {
|
|
87
|
-
const { option: n, price: r, quantity: c = 0, isSelected: _, allowMany:
|
|
87
|
+
const { option: n, price: r, quantity: c = 0, isSelected: _, allowMany: L, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: M, imageResize: N, isFirst: h } = l, { id: I } = U(), g = x(null), q = x(null), O = f(e, E.Image), i = f(e, E.Label), C = f(e, E.Price), T = f(e, E.Input), F = f(e, E.Quantity);
|
|
88
88
|
ee(() => {
|
|
89
89
|
var d;
|
|
90
90
|
h && ((d = g.current ?? q.current) == null || d.focus({
|
|
@@ -112,10 +112,10 @@ const o = ({ children: e }) => {
|
|
|
112
112
|
n.value,
|
|
113
113
|
r
|
|
114
114
|
]), R = `${n.label} ${M} ${r}`;
|
|
115
|
-
return
|
|
115
|
+
return L ? /* @__PURE__ */ t.createElement("div", {
|
|
116
116
|
className: a,
|
|
117
117
|
"data-hook": "product"
|
|
118
|
-
},
|
|
118
|
+
}, O ? b(O, {
|
|
119
119
|
option: n,
|
|
120
120
|
imageResize: N
|
|
121
121
|
}) : null, i ? b(i, {
|
|
@@ -130,18 +130,18 @@ const o = ({ children: e }) => {
|
|
|
130
130
|
hasError: p,
|
|
131
131
|
ariaLabel: R,
|
|
132
132
|
inputRef: h ? q : void 0
|
|
133
|
-
}) : null) : /* @__PURE__ */ t.createElement(
|
|
133
|
+
}) : null) : /* @__PURE__ */ t.createElement(z, {
|
|
134
134
|
isSelected: _,
|
|
135
135
|
onChange: D,
|
|
136
136
|
isDisabled: u,
|
|
137
137
|
isReadOnly: m,
|
|
138
138
|
isInvalid: p,
|
|
139
139
|
"aria-label": R
|
|
140
|
-
}, /* @__PURE__ */ t.createElement(
|
|
140
|
+
}, /* @__PURE__ */ t.createElement(X, {
|
|
141
141
|
ref: g,
|
|
142
142
|
className: a,
|
|
143
143
|
"data-hook": "product"
|
|
144
|
-
}, ({ isHovered: d, isFocused: B }) => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
144
|
+
}, ({ isHovered: d, isFocused: B }) => /* @__PURE__ */ t.createElement(t.Fragment, null, O ? b(O, {
|
|
145
145
|
option: n,
|
|
146
146
|
imageResize: N
|
|
147
147
|
}) : null, i ? b(i, {
|
|
@@ -161,11 +161,11 @@ const o = ({ children: e }) => {
|
|
|
161
161
|
const c = n === Ce.fit, _ = pe(r, 96, 96, c ? "fit" : "fill");
|
|
162
162
|
if (!_)
|
|
163
163
|
return null;
|
|
164
|
-
const
|
|
164
|
+
const L = r.altText || l.label || "";
|
|
165
165
|
return /* @__PURE__ */ t.createElement("img", {
|
|
166
166
|
className: e,
|
|
167
167
|
src: _,
|
|
168
|
-
alt:
|
|
168
|
+
alt: L,
|
|
169
169
|
"data-fit": c ? "contain" : "cover",
|
|
170
170
|
"data-hook": "product-image"
|
|
171
171
|
});
|
|
@@ -186,7 +186,7 @@ const o = ({ children: e }) => {
|
|
|
186
186
|
"data-hook": "product-price"
|
|
187
187
|
}, c);
|
|
188
188
|
}, Se = ({ className: e, ...a }) => {
|
|
189
|
-
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: _, ariaLabel:
|
|
189
|
+
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: _, ariaLabel: L, inputRef: s } = a, u = v((p) => {
|
|
190
190
|
n(p < 0 ? 0 : p);
|
|
191
191
|
}, [
|
|
192
192
|
n
|
|
@@ -195,7 +195,7 @@ const o = ({ children: e }) => {
|
|
|
195
195
|
}, [
|
|
196
196
|
u
|
|
197
197
|
]);
|
|
198
|
-
return /* @__PURE__ */ t.createElement(
|
|
198
|
+
return /* @__PURE__ */ t.createElement(Y, {
|
|
199
199
|
value: l,
|
|
200
200
|
onChange: u,
|
|
201
201
|
minValue: 0,
|
|
@@ -203,14 +203,14 @@ const o = ({ children: e }) => {
|
|
|
203
203
|
isDisabled: r,
|
|
204
204
|
isReadOnly: c,
|
|
205
205
|
isInvalid: _,
|
|
206
|
-
"aria-label":
|
|
206
|
+
"aria-label": L,
|
|
207
207
|
className: e,
|
|
208
208
|
"data-hook": "product-quantity"
|
|
209
|
-
}, /* @__PURE__ */ t.createElement(
|
|
209
|
+
}, /* @__PURE__ */ t.createElement(j, {
|
|
210
210
|
onKeyDown: m
|
|
211
211
|
}, /* @__PURE__ */ t.createElement(Q, {
|
|
212
212
|
slot: "decrement"
|
|
213
|
-
}, "-"), /* @__PURE__ */ t.createElement(
|
|
213
|
+
}, "-"), /* @__PURE__ */ t.createElement(J, {
|
|
214
214
|
ref: s
|
|
215
215
|
}), /* @__PURE__ */ t.createElement(Q, {
|
|
216
216
|
slot: "increment"
|
|
@@ -221,9 +221,9 @@ E.Label = Fe;
|
|
|
221
221
|
E.Price = De;
|
|
222
222
|
E.Input = be;
|
|
223
223
|
E.Quantity = Se;
|
|
224
|
-
|
|
224
|
+
K.Option = E;
|
|
225
225
|
o.Label = me;
|
|
226
|
-
o.Options =
|
|
226
|
+
o.Options = K;
|
|
227
227
|
o.Option = E;
|
|
228
228
|
o.Description = Ee;
|
|
229
229
|
o.Error = _e;
|
|
@@ -235,13 +235,13 @@ const Pe = "_options_110dq_1", Ne = "_option_110dq_1", he = "_optionInput_110dq_
|
|
|
235
235
|
optionLabel: Te,
|
|
236
236
|
optionPrice: Ae,
|
|
237
237
|
quantity: Me
|
|
238
|
-
}, ve = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(
|
|
238
|
+
}, ve = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement($, {
|
|
239
239
|
content: e,
|
|
240
240
|
locale: a
|
|
241
241
|
}), ke = () => {
|
|
242
|
-
const e =
|
|
242
|
+
const e = Oe({
|
|
243
243
|
globalClasses: ue,
|
|
244
|
-
moduleClasses:
|
|
244
|
+
moduleClasses: Le
|
|
245
245
|
});
|
|
246
246
|
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
247
247
|
className: y(te, A.label)
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import a, { useRef as S, useState as B, useEffect as H, useCallback as P } from "react";
|
|
2
2
|
import { RadioGroup as k, RadioField as A, RadioButton as G, TextField as $, Input as q } from "react-aria-components";
|
|
3
|
-
import {
|
|
3
|
+
import { bN as g, bK as x, bW as K, bY as D, bP as U } from "./form-cgY_BDTU.js";
|
|
4
4
|
import { f as u, a as L } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as
|
|
6
|
-
import { L as
|
|
5
|
+
import { D as M, E as W } from "./field-error-headless-fX6PeZaI.js";
|
|
6
|
+
import { L as Y } from "./field-label-headless-CoLjciGG.js";
|
|
7
7
|
import { S as j } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
8
|
const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), F = (e, t) => !!t && !w(e, t), z = (e, t) => {
|
|
9
9
|
const l = t ? t.length + 2 : 0;
|
|
10
10
|
return e.slice(l);
|
|
11
11
|
}, i = ({ children: e, className: t }) => {
|
|
12
12
|
const { id: n, value: l, onChange: h, disabled: p, readOnly: O, required: m, onBlur: E, onFocus: b, hasError: r, FieldLayout: c, options: o } = g(), { inputId: f, labelId: C, ariaDescribedBy: I } = x(), s = S(null);
|
|
13
|
-
|
|
14
|
-
const _ = u(e, i.Label), R = u(e, i.Options),
|
|
13
|
+
K(s);
|
|
14
|
+
const _ = u(e, i.Label), R = u(e, i.Options), N = u(e, i.Description), V = u(e, i.Error), T = F(o, l) ? v : l || null;
|
|
15
15
|
return /* @__PURE__ */ a.createElement(c, {
|
|
16
16
|
fieldId: n,
|
|
17
17
|
renderLabel: () => L(_, {
|
|
@@ -32,9 +32,9 @@ const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
32
32
|
onBlur: E,
|
|
33
33
|
onFocus: b
|
|
34
34
|
}, R),
|
|
35
|
-
renderDescription: () => /* @__PURE__ */ a.createElement(a.Fragment, null,
|
|
35
|
+
renderDescription: () => /* @__PURE__ */ a.createElement(a.Fragment, null, V, N)
|
|
36
36
|
});
|
|
37
|
-
},
|
|
37
|
+
}, J = ({ children: e, className: t }) => {
|
|
38
38
|
const { options: n, addOther: l, addOtherLabel: h, id: p, numberOfColumns: O, hasError: m } = g(), { t: E } = D(), b = u(e, i.Option), r = S(null), c = h || E("add-other.default-other-option-label") || v;
|
|
39
39
|
return U(() => {
|
|
40
40
|
var o;
|
|
@@ -74,12 +74,12 @@ const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
74
74
|
}), L(b, {
|
|
75
75
|
label: h
|
|
76
76
|
})))), p && f && o);
|
|
77
|
-
},
|
|
77
|
+
}, Q = ({ className: e, ...t }) => {
|
|
78
78
|
const { label: n } = t;
|
|
79
79
|
return /* @__PURE__ */ a.createElement("span", {
|
|
80
80
|
className: e
|
|
81
81
|
}, n);
|
|
82
|
-
},
|
|
82
|
+
}, X = (e) => null, Z = ({ className: e }) => {
|
|
83
83
|
const { value: t, onChange: n, addOtherLabel: l, addOtherPlaceholder: h, otherInputCharacterLimit: p, disabled: O, readOnly: m, options: E } = g(), { t: b } = D(), r = S(null), c = F(E, t), o = l || b("add-other.default-other-option-label") || v, [f, C] = B(c && t ? z(t, l) : "");
|
|
84
84
|
H(() => {
|
|
85
85
|
var s;
|
|
@@ -108,15 +108,15 @@ const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
108
108
|
maxLength: p
|
|
109
109
|
}));
|
|
110
110
|
};
|
|
111
|
-
d.Label =
|
|
112
|
-
d.Input =
|
|
111
|
+
d.Label = Q;
|
|
112
|
+
d.Input = X;
|
|
113
113
|
d.Control = j;
|
|
114
114
|
d.OtherInput = Z;
|
|
115
|
-
i.Label =
|
|
116
|
-
i.Options =
|
|
115
|
+
i.Label = Y;
|
|
116
|
+
i.Options = J;
|
|
117
117
|
i.Option = d;
|
|
118
|
-
i.Description =
|
|
119
|
-
i.Error =
|
|
118
|
+
i.Description = M;
|
|
119
|
+
i.Error = W;
|
|
120
120
|
const ee = "_labelImage_1u9f2_1", te = "_option_1u9f2_26", oe = "_optionInput_1u9f2_32", ne = "_optionControl_1u9f2_50", le = "_optionControlHover_1u9f2_72", ae = "_optionControlSelected_1u9f2_90", re = "_optionLabel_1u9f2_137", y = {
|
|
121
121
|
labelImage: ee,
|
|
122
122
|
option: te,
|
package/dist/component/{radio-group-field-rac-D3JvbED7.js → radio-group-field-rac-BBYaCpeZ.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
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-2nfcqSJp.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as r } from "./field-rac.module-DcyJyi2B.js";
|
|
7
|
-
import { X as i, am as E, ac as p, ad as O, M as R, I as _, ae as I } from "./form-
|
|
7
|
+
import { X as i, am as E, ac as p, ad as O, M as R, I as _, ae as I } from "./form-cgY_BDTU.js";
|
|
8
8
|
import { o as L } from "./options-rac.module-_THNq6Qq.js";
|
|
9
|
-
import { u as N } from "./use-element-state-class-name-
|
|
10
|
-
import { u } from "./use-text-input-class-name-
|
|
9
|
+
import { u as N } from "./use-element-state-class-name-DiZjY9WE.js";
|
|
10
|
+
import { u } from "./use-text-input-class-name-_CjB7lhB.js";
|
|
11
11
|
const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: l
|