@wix/form-elements 1.161.0 → 1.162.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-BubC8I9X.js → appointment-rac-3Z1wiBX6.js} +123 -123
- package/dist/component/{bookings-address-rac-BbwvVs86.js → bookings-address-rac-2zV-a8SW.js} +1 -1
- package/dist/component/{bookings-email-rac-C2HCkcfa.js → bookings-email-rac-C1WakVnh.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Uy7c5EBs.js → bookings-first-name-rac-6f18uXA0.js} +1 -1
- package/dist/component/{bookings-header-rac-nmwsWRjS.js → bookings-header-rac-BeaxlPQl.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BAioQLCg.js → bookings-last-name-rac-CsLZaKfO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CO6vOBjG.js → bookings-login-bar-rac-B3TRivWU.js} +6 -6
- package/dist/component/{bookings-phone-rac-Cr16h-_R.js → bookings-phone-rac-BnFEknvv.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CHLH3jd7.js → bookings-rich-text-rac-CFPqDZay.js} +1 -1
- package/dist/component/{calendar.module-CKCBG_Pg.js → calendar.module-BMUyMVja.js} +19 -19
- package/dist/component/{checkbox-field-rac-CMwmwFMD.js → checkbox-field-rac-DqGbxAd0.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-BNs_S-nT.js → checkbox-group-field-headless-CiobdaVa.js} +27 -27
- package/dist/component/{checkbox-group-field-rac-BA60EPAN.js → checkbox-group-field-rac-Dxrc2F4x.js} +6 -6
- package/dist/component/{checkbox-group-rac-BJZ4Oer9.js → checkbox-group-rac-C3tL4YSr.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-akWZsZNn.js → checkbox-indicator-module-classes-DUTR4mcg.js} +1 -1
- package/dist/component/{checkbox-rac-KsVlI6_V.js → checkbox-rac-DhZsIMuk.js} +1 -1
- package/dist/component/{contacts-address-rac-CRYkz87z.js → contacts-address-rac--GiWpa6C.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BIz-1-ZX.js → contacts-birthdate-rac-CmI2nPpr.js} +1 -1
- package/dist/component/{contacts-company-rac-B8G__j6I.js → contacts-company-rac-DcSLvPnR.js} +1 -1
- package/dist/component/{contacts-email-rac-Dztkvp5i.js → contacts-email-rac-BLOIHGP9.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CVSEWpLU.js → contacts-first-name-rac-DgMCKLeE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Blz4M5bk.js → contacts-last-name-rac-tcEQP1Db.js} +1 -1
- package/dist/component/{contacts-phone-rac-CPCE5soY.js → contacts-phone-rac-CK664cfW.js} +1 -1
- package/dist/component/{contacts-position-rac-Dd_kBjqG.js → contacts-position-rac-B8skwXy6.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C6AlsP10.js → contacts-subscribe-rac-DQZYJjMo.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CQ1n29zI.js → contacts-tax-id-rac-Ci24ixLu.js} +1 -1
- package/dist/component/{date-availability-DDj1j0z5.js → date-availability-Va6_2NAZ.js} +1 -1
- package/dist/component/{date-input-field-rac-D5r1n_ah.js → date-input-field-rac-lAKyuHOI.js} +89 -89
- package/dist/component/{date-input-rac-Cyi5mU_P.js → date-input-rac-ClEesupR.js} +1 -1
- package/dist/component/{date-picker-field-rac-CeG391Zo.js → date-picker-field-rac-h45jfoso.js} +54 -54
- package/dist/component/{date-picker-rac-Ci9aHgav.js → date-picker-rac-B-pvqBn0.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CrbYEbJJ.js → date-time-input-field-rac-41QpurJp.js} +80 -80
- package/dist/component/{date-time-input-rac-DDJLkqs0.js → date-time-input-rac-BQOUl7It.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-C3ftVHBA.js → dext-checkbox-group-rac-C4Q6tfBD.js} +4 -4
- package/dist/component/{dext-checkbox-rac-BGLYWn68.js → dext-checkbox-rac-Yo2PHNDA.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Cy9RlDlt.js → dext-date-picker-rac-jM9x8W6a.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-88ZoTd5e.js → dext-date-time-input-rac-BgW_4WIg.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CPxDUuk9.js → dext-dropdown-rac-DCL7D6-G.js} +1 -1
- package/dist/component/{dext-email-rac-BAvQwDPA.js → dext-email-rac-Dz7yBqkd.js} +1 -1
- package/dist/component/{dext-number-input-rac-D7HYQVKq.js → dext-number-input-rac-BdMjBpH9.js} +1 -1
- package/dist/component/{dext-phone-rac--FhcplSI.js → dext-phone-rac-D2i9fXL3.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DBz8iCKW.js → dext-radio-group-rac-Br2f1Ahx.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cv7nThfe.js → dext-rating-input-rac-OkfJ7Eb0.js} +1 -1
- package/dist/component/{dext-tags-rac-CRUUc5dr.js → dext-tags-rac-43vDoDdM.js} +2 -2
- package/dist/component/{dext-text-area-rac-DQBQXV1L.js → dext-text-area-rac-C072pWO9.js} +1 -1
- package/dist/component/{dext-text-input-rac-4CpM581y.js → dext-text-input-rac-BiHJpJCt.js} +1 -1
- package/dist/component/{dext-url-input-rac-0C1jTEr9.js → dext-url-input-rac-YOGYMj5C.js} +1 -1
- package/dist/component/{donation-rac-Cgt0ZE50.js → donation-rac-fCt3mddA.js} +98 -98
- package/dist/component/{dropdown-field-rac-DlGKR7pZ.js → dropdown-field-rac-EQrQJ2-C.js} +4 -4
- package/dist/component/{dropdown-rac-CYFW_3x_.js → dropdown-rac-MPCcjrFd.js} +1 -1
- package/dist/component/{ecom-address-rac-CQfQHpXC.js → ecom-address-rac-DSgpHqzV.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D2v2Upvz.js → ecom-subscription-checkbox-rac-Dw6Ke0Fb.js} +2 -2
- package/dist/component/{email-input-field-rac-CVw25yRo.js → email-input-field-rac-DVmvH4u4.js} +48 -48
- package/dist/component/{events-repeater-rac-BCVUcmFj.js → events-repeater-rac-Uwpo7XF4.js} +24 -24
- package/dist/component/{events-rsvp-rac-DwbqEr8z.js → events-rsvp-rac-D2DJAkep.js} +4 -4
- package/dist/component/{field-error-headless-XnVcMmsL.js → field-error-headless-DAc8FpKI.js} +8 -8
- package/dist/component/{field-label-headless-BRTLT2Yt.js → field-label-headless-DxxwJtjh.js} +17 -17
- package/dist/component/field-rac.module-ts2t4WUO.js +25 -0
- package/dist/component/{file-upload-rac-Dkwg9Jk4.js → file-upload-rac-CBKIeaxX.js} +163 -163
- package/dist/component/{fixed-payment-rac-ST98xAa2.js → fixed-payment-rac-BsCDoc1p.js} +18 -18
- package/dist/component/{form-BUqSKOvc.js → form-GAuLAdjq.js} +326 -336
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CzNTGYWq.js → header-field-rac-DtZCjzLJ.js} +6 -6
- package/dist/component/{header-rac-DUt6AIAE.js → header-rac-B1hlVDf8.js} +1 -1
- package/dist/component/image-choice-rac-DQaCg_Xk.js +155 -0
- package/dist/component/{index-cZZeAuuu.js → index-BaVjVNYj.js} +2 -2
- package/dist/component/{index-CDO22hht.js → index-C1EXd9jU.js} +69 -69
- package/dist/component/{isObjectLike-cs4bARpC.js → isObjectLike-m2dqIREj.js} +3 -3
- package/dist/component/{multiline-address-field-rac-vcEWhUCV.js → multiline-address-field-rac-CMMdLb-J.js} +41 -41
- package/dist/component/{multiline-address-rac-WQaI2eUX.js → multiline-address-rac-VUQNp-Tz.js} +1 -1
- package/dist/component/{number-input-field-rac-CBUMqATk.js → number-input-field-rac-B5bsGDKm.js} +24 -24
- package/dist/component/{number-input-rac-B4j5hyzS.js → number-input-rac-BzzW0p9R.js} +1 -1
- package/dist/component/{password-rac-DwLyf45N.js → password-rac-2Rr7lvNO.js} +17 -17
- package/dist/component/{payment-input-rac-D0Od---y.js → payment-input-rac-CEUzIrJA.js} +32 -32
- package/dist/component/{phone-input-field-rac-COlu9IeC.js → phone-input-field-rac-BDBaqAzE.js} +48 -48
- package/dist/component/{phone-rac-Dh4RacOF.js → phone-rac-BTK8-tkq.js} +1 -1
- package/dist/component/{product-list-rac-D7zHDE2D.js → product-list-rac-1QbeT5RH.js} +26 -26
- package/dist/component/{quiz-radio-group-rac-1AaKphJt.js → quiz-radio-group-rac-tn2CzdCu.js} +1 -1
- package/dist/component/{radio-button-module-classes-VqaP6vpA.js → radio-button-module-classes-aK1SQcLG.js} +34 -34
- package/dist/component/{radio-group-field-rac-Cp3LRN3C.js → radio-group-field-rac-DlMXhW_S.js} +5 -5
- package/dist/component/{radio-group-rac-KhmhzYGf.js → radio-group-rac-BmU_5tBK.js} +1 -1
- package/dist/component/{rating-input-field-rac-10n6ciCr.js → rating-input-field-rac-DUPJUAX2.js} +30 -30
- package/dist/component/{rating-input-rac-XZjjY2Gp.js → rating-input-rac-BLhkZdj8.js} +1 -1
- package/dist/component/{rich-content-rac.module-kMwDoLBa.js → rich-content-rac.module-C9bGXB69.js} +5 -5
- package/dist/component/{rich-text-field-rac-H5bd8fAt.js → rich-text-field-rac-CVqmsZzZ.js} +4 -4
- package/dist/component/{rich-text-rac-88GSQR62.js → rich-text-rac-D8K6445F.js} +1 -1
- package/dist/component/{service-dropdown-rac-B1_Xr_X3.js → service-dropdown-rac-PR_iLdmo.js} +26 -26
- package/dist/component/{services-multi-choice-rac-DWp_Llbi.js → services-multi-choice-rac-BvMadJCf.js} +15 -15
- package/dist/component/{signature-rac-zN_6KRDp.js → signature-rac-Cpjv6kcl.js} +235 -235
- package/dist/component/{submit-button-rac-Dv6UarYX.js → submit-button-rac-DpDk7cMb.js} +7 -7
- package/dist/component/{tags-field-rac-sVN6MHfJ.js → tags-field-rac-DnyWNHXT.js} +75 -75
- package/dist/component/{tags-rac-DhTHs_XN.js → tags-rac-D5Do7BNm.js} +1 -1
- package/dist/component/{text-area-field-rac-DrWkww7W.js → text-area-field-rac-DLBgla0L.js} +19 -19
- package/dist/component/{text-area-rac-CXXh-ZdY.js → text-area-rac-Bfsl2gSn.js} +1 -1
- package/dist/component/{text-input-field-rac-C2YiMr-g.js → text-input-field-rac-hLsUcQNw.js} +4 -4
- package/dist/component/{text-input-headless-BJMNbsMY.js → text-input-headless-Otd7Uy7V.js} +11 -11
- package/dist/component/{text-input-rac-CpsPh7FH.js → text-input-rac-jpnc-v91.js} +1 -1
- package/dist/component/{time-input-rac-DG_1KxS4.js → time-input-rac-DnjrmZZw.js} +20 -20
- package/dist/component/url-input-field-rac-C90NYHb8.js +77 -0
- package/dist/component/{url-input-rac-BTStO0NP.js → url-input-rac-C3wfEnqs.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DbMMg1ws.js → use-dropdown-option-class-name-CYkLlKBs.js} +12 -12
- package/dist/component/{use-dropdown-trigger-class-name-Yes4kC_0.js → use-dropdown-trigger-class-name-CTt4Z67m.js} +19 -19
- package/dist/component/{use-element-state-class-name-DlncY4hk.js → use-element-state-class-name-ByDw6j7c.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C__zqP5j.js → use-hoverable-input-class-name-Duhgtn2I.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DnK_MQRO.js → use-is-forced-open-dropdown-B5gNY4Zm.js} +4 -4
- package/dist/component/{use-service-options-base-DKJe52Vk.js → use-service-options-base-DE-QaNDw.js} +3 -3
- package/dist/component/use-text-input-class-name-CmxSw6bY.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DP0lkkEv.js +0 -25
- package/dist/component/image-choice-rac-DuBgrSt2.js +0 -155
- package/dist/component/url-input-field-rac-twxRREnl.js +0 -77
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +0 -6
package/dist/component/{phone-input-field-rac-COlu9IeC.js → phone-input-field-rac-BDBaqAzE.js}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { RicosViewer as de } from "@wix/ricos/viewer";
|
|
2
2
|
import b from "classnames";
|
|
3
|
-
import t, { useMemo as
|
|
4
|
-
import {
|
|
3
|
+
import t, { useMemo as j, useState as A, useRef as F, useEffect as k, useCallback as z, createContext as te, useContext as q, useId as ye } from "react";
|
|
4
|
+
import { bh as Ee, bI as D, bq as ne, bH as fe, by as w, bv as oe, bA as he, U as ge, aa as be, Z as Oe, K as _e, G as Ne, $ as Le, _ as Se, Y as Ie } from "./form-GAuLAdjq.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as Pe } from "react-aria";
|
|
6
6
|
import { Dialog as re, OverlayTriggerStateContext as ve, ModalOverlay as Fe, Modal as De, SearchField as we, Group as U, ListBoxItem as Be, DialogTrigger as Re, Select as xe, Input as ae, Autocomplete as Me } from "react-aria-components";
|
|
7
7
|
import { f as h, a as I } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { L as Ae } from "./field-label-headless-
|
|
8
|
+
import { D as $e, E as je } from "./field-error-headless-DAc8FpKI.js";
|
|
9
|
+
import { L as Ae } from "./field-label-headless-DxxwJtjh.js";
|
|
10
10
|
import { N as Te, S as ke } from "./non-modal-popover-D-u13tmp.js";
|
|
11
11
|
import { u as Ve } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
-
import { b as He } from "./use-is-forced-open-dropdown-
|
|
13
|
-
import { V as Ue, a as qe } from "./use-dropdown-option-class-name-
|
|
14
|
-
import se, { AsYouType as Ge, isValidPhoneNumber as
|
|
12
|
+
import { b as He } from "./use-is-forced-open-dropdown-B5gNY4Zm.js";
|
|
13
|
+
import { V as Ue, a as qe } from "./use-dropdown-option-class-name-CYkLlKBs.js";
|
|
14
|
+
import se, { AsYouType as Ge, isValidPhoneNumber as Ye, isSupportedCountry as Ke } from "libphonenumber-js";
|
|
15
15
|
import "libphonenumber-js/metadata.min.json";
|
|
16
|
-
import { C as
|
|
17
|
-
import { C as
|
|
18
|
-
import { E as
|
|
19
|
-
import { H as
|
|
20
|
-
import { s as O } from "./field-rac.module-
|
|
21
|
-
import { u as
|
|
16
|
+
import { C as Q } from "./calling-country-codes-PyWuOTmF.js";
|
|
17
|
+
import { C as Ze } from "./chevron-down-icon-CcpVm6B-.js";
|
|
18
|
+
import { E as ze } from "./error-icon-hZxQ6DEy.js";
|
|
19
|
+
import { H as W } from "./custom-focus-class-_483Pkwp.js";
|
|
20
|
+
import { s as O } from "./field-rac.module-ts2t4WUO.js";
|
|
21
|
+
import { u as J } from "./use-hoverable-input-class-name-Duhgtn2I.js";
|
|
22
22
|
function X(e) {
|
|
23
23
|
const n = e ? se(e) : void 0, r = n == null ? void 0 : n.country;
|
|
24
24
|
if (r)
|
|
@@ -37,17 +37,17 @@ function ee(e, n) {
|
|
|
37
37
|
if (e && n)
|
|
38
38
|
try {
|
|
39
39
|
const r = se(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
40
|
-
if (o &&
|
|
40
|
+
if (o && Ye(o))
|
|
41
41
|
return o.replace(/\s+/g, "");
|
|
42
42
|
} catch {
|
|
43
43
|
}
|
|
44
44
|
return e;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Qe() {
|
|
47
47
|
const { t: e } = D(), { language: n } = ne();
|
|
48
|
-
return
|
|
49
|
-
const c =
|
|
50
|
-
return l &&
|
|
48
|
+
return j(() => Object.keys(Q).reduce((o, a) => {
|
|
49
|
+
const c = Q[a], l = G(c), i = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
50
|
+
return l && Ke(a) && o.push({
|
|
51
51
|
countryName: i,
|
|
52
52
|
longCountryCode: c,
|
|
53
53
|
shortCountryCode: a,
|
|
@@ -58,10 +58,10 @@ function Ze() {
|
|
|
58
58
|
n
|
|
59
59
|
]);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function We(e, n) {
|
|
62
62
|
return e.filter((r) => n && n.length > 0 ? n.includes(r.shortCountryCode) : !0);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Je(e, n) {
|
|
65
65
|
const { countryName: r, callingCode: o, shortCountryCode: a } = e;
|
|
66
66
|
return !!(H(r, n) || H(o, n) || H(a, n));
|
|
67
67
|
}
|
|
@@ -73,7 +73,7 @@ function Xe({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
73
73
|
fe(() => {
|
|
74
74
|
c(""), l.current = "", u(n), o("");
|
|
75
75
|
});
|
|
76
|
-
const p =
|
|
76
|
+
const p = j(() => X(a), [
|
|
77
77
|
a
|
|
78
78
|
]);
|
|
79
79
|
k(() => {
|
|
@@ -92,7 +92,7 @@ function Xe({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
92
92
|
p,
|
|
93
93
|
n
|
|
94
94
|
]);
|
|
95
|
-
const C =
|
|
95
|
+
const C = z((m) => {
|
|
96
96
|
if (c(m), !m) {
|
|
97
97
|
l.current = "", o(null);
|
|
98
98
|
return;
|
|
@@ -105,7 +105,7 @@ function Xe({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
105
105
|
}, [
|
|
106
106
|
r,
|
|
107
107
|
o
|
|
108
|
-
]), d =
|
|
108
|
+
]), d = z((m) => {
|
|
109
109
|
u(m), c((f) => {
|
|
110
110
|
const y = V(ee(f, m));
|
|
111
111
|
return l.current = y ?? "", o(y), f;
|
|
@@ -125,12 +125,12 @@ const ce = /* @__PURE__ */ te(null), _ = () => {
|
|
|
125
125
|
if (!e)
|
|
126
126
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
127
127
|
return e;
|
|
128
|
-
}, le = /* @__PURE__ */ te(null),
|
|
128
|
+
}, le = /* @__PURE__ */ te(null), Y = () => {
|
|
129
129
|
const e = q(le);
|
|
130
130
|
if (!e)
|
|
131
131
|
throw new Error("Option sub-components must be used within Option component");
|
|
132
132
|
return e;
|
|
133
|
-
},
|
|
133
|
+
}, K = ({ longCountryCode: e, className: n }) => {
|
|
134
134
|
function r(c, l) {
|
|
135
135
|
const i = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", p = `${c}${l === "2x" ? "_2x" : ""}.png`;
|
|
136
136
|
return `${i}${p}`;
|
|
@@ -146,10 +146,10 @@ const ce = /* @__PURE__ */ te(null), _ = () => {
|
|
|
146
146
|
});
|
|
147
147
|
}, s = ({ children: e }) => {
|
|
148
148
|
var L, v;
|
|
149
|
-
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = w(), [i, u] = A(null), p = (v = (L = l == null ? void 0 : l.string) == null ? void 0 : L.phoneOptions) == null ? void 0 : v.allowedCountryCodes, C =
|
|
149
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = w(), [i, u] = A(null), p = (v = (L = l == null ? void 0 : l.string) == null ? void 0 : L.phoneOptions) == null ? void 0 : v.allowedCountryCodes, C = Qe(), d = j(() => We(C, p), [
|
|
150
150
|
C,
|
|
151
151
|
p
|
|
152
|
-
]), m =
|
|
152
|
+
]), m = j(() => d.map(($) => $.shortCountryCode), [
|
|
153
153
|
d
|
|
154
154
|
]), { currentValue: f, selectedCountryCode: y, handlePhoneChange: S, handleCountryCodeChange: N } = Xe({
|
|
155
155
|
value: r,
|
|
@@ -178,7 +178,7 @@ const ce = /* @__PURE__ */ te(null), _ = () => {
|
|
|
178
178
|
}), R),
|
|
179
179
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, M, x)
|
|
180
180
|
}));
|
|
181
|
-
},
|
|
181
|
+
}, Z = ({ children: e, className: n }) => {
|
|
182
182
|
const { labelId: r } = oe(), { hasError: o, disabled: a, readOnly: c } = w(), { t: l } = D(), { selectedCountryCode: i, countries: u } = _(), p = ye(), C = i ? u.find((y) => y.shortCountryCode === i) : void 0, d = C && G(C.longCountryCode) || "", m = l("field.phone.country-code.aria-label"), f = C ? `${m}, ${C.countryName}, ${d}` : m;
|
|
183
183
|
return /* @__PURE__ */ t.createElement(ke, {
|
|
184
184
|
isDisabled: a || c,
|
|
@@ -190,7 +190,7 @@ const ce = /* @__PURE__ */ te(null), _ = () => {
|
|
|
190
190
|
}, e);
|
|
191
191
|
}, et = ({ className: e }) => {
|
|
192
192
|
const { selectedCountryCode: n, countries: r } = _(), o = r.find((a) => a.shortCountryCode === n);
|
|
193
|
-
return o ? /* @__PURE__ */ t.createElement(
|
|
193
|
+
return o ? /* @__PURE__ */ t.createElement(K, {
|
|
194
194
|
className: e,
|
|
195
195
|
longCountryCode: o.longCountryCode
|
|
196
196
|
}) : null;
|
|
@@ -200,8 +200,8 @@ const ce = /* @__PURE__ */ te(null), _ = () => {
|
|
|
200
200
|
className: n
|
|
201
201
|
}, e);
|
|
202
202
|
};
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
Z.Flag = et;
|
|
204
|
+
Z.EmptyState = tt;
|
|
205
205
|
const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...c }) => {
|
|
206
206
|
const { triggerRef: l, optionsRef: i, isForcedOpen: u, isOpen: p } = c, { popoverContainer: C } = _(), d = h(e, g.Search);
|
|
207
207
|
if (!p)
|
|
@@ -262,7 +262,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
262
262
|
return c ? /* @__PURE__ */ t.createElement(Me, {
|
|
263
263
|
filter: (u, p, C) => {
|
|
264
264
|
const d = o.find((m) => m.shortCountryCode === C.key);
|
|
265
|
-
return !!d &&
|
|
265
|
+
return !!d && Je(d, p);
|
|
266
266
|
}
|
|
267
267
|
}, r ? I(c, {
|
|
268
268
|
autoFocus: !1
|
|
@@ -303,18 +303,18 @@ const T = ({ children: e, className: n, ...r }) => {
|
|
|
303
303
|
value: i
|
|
304
304
|
}, u));
|
|
305
305
|
}, me = ({ className: e }) => {
|
|
306
|
-
const { longCountryCode: n } =
|
|
307
|
-
return /* @__PURE__ */ t.createElement(
|
|
306
|
+
const { longCountryCode: n } = Y();
|
|
307
|
+
return /* @__PURE__ */ t.createElement(K, {
|
|
308
308
|
className: e,
|
|
309
309
|
longCountryCode: n
|
|
310
310
|
});
|
|
311
311
|
}, pe = ({ className: e }) => {
|
|
312
|
-
const { countryName: n } =
|
|
312
|
+
const { countryName: n } = Y();
|
|
313
313
|
return /* @__PURE__ */ t.createElement("span", {
|
|
314
314
|
className: e
|
|
315
315
|
}, n);
|
|
316
316
|
}, Ce = ({ className: e }) => {
|
|
317
|
-
const { dialingCode: n } =
|
|
317
|
+
const { dialingCode: n } = Y();
|
|
318
318
|
return /* @__PURE__ */ t.createElement("span", {
|
|
319
319
|
className: e
|
|
320
320
|
}, n);
|
|
@@ -380,9 +380,9 @@ const at = ({ className: e }) => {
|
|
|
380
380
|
a.current || (a.current = !0, p == null || p());
|
|
381
381
|
},
|
|
382
382
|
onBlur: (P) => {
|
|
383
|
-
var v,
|
|
383
|
+
var v, $;
|
|
384
384
|
const L = P.relatedTarget;
|
|
385
|
-
!((v = r.current) != null && v.contains(L)) && !((
|
|
385
|
+
!((v = r.current) != null && v.contains(L)) && !(($ = o.current) != null && $.contains(L)) && (a.current = !1, d());
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
388
|
return m.length === 1 ? /* @__PURE__ */ t.createElement(U, {
|
|
@@ -391,7 +391,7 @@ const at = ({ className: e }) => {
|
|
|
391
391
|
isDisabled: l,
|
|
392
392
|
isInvalid: i,
|
|
393
393
|
...M
|
|
394
|
-
}, u && /* @__PURE__ */ t.createElement(
|
|
394
|
+
}, u && /* @__PURE__ */ t.createElement(K, {
|
|
395
395
|
longCountryCode: m[0].longCountryCode
|
|
396
396
|
}), S) : /* @__PURE__ */ t.createElement(U, {
|
|
397
397
|
ref: r,
|
|
@@ -403,13 +403,13 @@ const at = ({ className: e }) => {
|
|
|
403
403
|
};
|
|
404
404
|
s.Label = Ae;
|
|
405
405
|
s.Control = lt;
|
|
406
|
-
s.CountryButton =
|
|
406
|
+
s.CountryButton = Z;
|
|
407
407
|
s.CountryDrawer = ct;
|
|
408
408
|
s.CountryPopover = st;
|
|
409
409
|
s.CountryOptions = g;
|
|
410
410
|
s.PhoneNumber = at;
|
|
411
|
-
s.Description =
|
|
412
|
-
s.Error =
|
|
411
|
+
s.Description = $e;
|
|
412
|
+
s.Error = je;
|
|
413
413
|
const ut = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
414
414
|
width: 24,
|
|
415
415
|
height: 24,
|
|
@@ -453,10 +453,10 @@ const ut = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
453
453
|
}), vt = () => /* @__PURE__ */ t.createElement("span", {
|
|
454
454
|
className: E.chevron,
|
|
455
455
|
"aria-hidden": "true"
|
|
456
|
-
}, /* @__PURE__ */ t.createElement(
|
|
457
|
-
const e = qe(Se, O.selectOptionWithoutFocusRing, E.option,
|
|
456
|
+
}, /* @__PURE__ */ t.createElement(Ze, null)), Qt = () => {
|
|
457
|
+
const e = qe(Se, O.selectOptionWithoutFocusRing, E.option, W), n = J(Ie, [
|
|
458
458
|
E.control
|
|
459
|
-
]), r =
|
|
459
|
+
]), r = J(Le, [
|
|
460
460
|
E.countrySearch
|
|
461
461
|
]), { t: o } = D(), { PortalContainer: a } = ne(), c = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
462
462
|
className: r,
|
|
@@ -464,7 +464,7 @@ const ut = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
464
464
|
}, /* @__PURE__ */ t.createElement(it, {
|
|
465
465
|
className: E.searchIcon
|
|
466
466
|
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Search.Input, {
|
|
467
|
-
className: b(O.innerInput,
|
|
467
|
+
className: b(O.innerInput, W),
|
|
468
468
|
placeholder: o("field.phone.country-search-input.placeholder")
|
|
469
469
|
})), 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, {
|
|
470
470
|
className: E.flag
|
|
@@ -503,10 +503,10 @@ const ut = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
503
503
|
className: b(O.innerInput, E.phoneNumber)
|
|
504
504
|
})), /* @__PURE__ */ t.createElement(s.Error, {
|
|
505
505
|
className: b(_e, O.error)
|
|
506
|
-
}, /* @__PURE__ */ t.createElement(
|
|
506
|
+
}, /* @__PURE__ */ t.createElement(ze, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
507
507
|
className: b(Ne, O.description)
|
|
508
508
|
}, Pt));
|
|
509
509
|
};
|
|
510
510
|
export {
|
|
511
|
-
|
|
511
|
+
Qt as P
|
|
512
512
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import t, { useMemo as G, useCallback as
|
|
1
|
+
import t, { useMemo as G, useCallback as M, useRef as x } from "react";
|
|
2
2
|
import { RicosViewer as H } from "@wix/ricos/viewer";
|
|
3
3
|
import b from "classnames";
|
|
4
|
-
import { CheckboxField as $, CheckboxButton as z, NumberField as
|
|
5
|
-
import {
|
|
4
|
+
import { CheckboxField as $, CheckboxButton as z, NumberField as X, Group as Y, Button as Q, Input as J } from "react-aria-components";
|
|
5
|
+
import { by as U, bv as W, bq as w, bI as Z, bA as ee, U as te, aa as ne, a0 as ae, a3 as oe, a2 as re, a4 as le, K as se, G as ie, a1 as ce } from "./form-GAuLAdjq.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-DxxwJtjh.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-DAc8FpKI.js";
|
|
10
10
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as _e } 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 Ie } from "./checkbox-indicator-module-classes-
|
|
15
|
-
import { s as q } from "./field-rac.module-
|
|
14
|
+
import { C as Ie } from "./checkbox-indicator-module-classes-DUTR4mcg.js";
|
|
15
|
+
import { s as q } from "./field-rac.module-ts2t4WUO.js";
|
|
16
16
|
import { o as j } from "./options-rac.module-_THNq6Qq.js";
|
|
17
|
-
import { u as Oe } from "./use-element-state-class-name-
|
|
17
|
+
import { u as Oe } from "./use-element-state-class-name-ByDw6j7c.js";
|
|
18
18
|
var Le = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), k = /* @__PURE__ */ (function(e) {
|
|
@@ -28,9 +28,9 @@ function Ce({ 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: y, onBlur: O, onFocus: s, hasError: u, validation: m, FieldLayout: p } =
|
|
31
|
+
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur: O, onFocus: s, hasError: u, validation: m, FieldLayout: p } = U(), { inputId: v, labelId: N, ariaDescribedBy: h } = W(), _ = I(e, o.Label), g = I(e, o.Options), A = I(e, o.Description), L = I(e, o.Error), i = G(() => l || [], [
|
|
32
32
|
l
|
|
33
|
-
]), T = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F =
|
|
33
|
+
]), T = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F = M((S, R) => {
|
|
34
34
|
const d = i.filter((K) => K.productId !== S.productId), B = R ? [
|
|
35
35
|
...d,
|
|
36
36
|
S
|
|
@@ -44,7 +44,7 @@ const o = ({ children: e }) => {
|
|
|
44
44
|
fieldId: a,
|
|
45
45
|
renderLabel: () => _,
|
|
46
46
|
renderInput: () => /* @__PURE__ */ t.createElement(ye, {
|
|
47
|
-
id:
|
|
47
|
+
id: v,
|
|
48
48
|
ariaLabelledBy: N,
|
|
49
49
|
ariaDescribedBy: h,
|
|
50
50
|
required: y,
|
|
@@ -61,12 +61,12 @@ const o = ({ children: e }) => {
|
|
|
61
61
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, A)
|
|
62
62
|
});
|
|
63
63
|
}, V = ({ children: e, className: a, ...l }) => {
|
|
64
|
-
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: O, hasError: s } = l, { options: u, validation: m, imageResize: p } =
|
|
64
|
+
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: O, hasError: s } = l, { options: u, validation: m, imageResize: p } = U(), { currency: v } = w(), { t: N } = Z(), h = I(e, o.Option);
|
|
65
65
|
return /* @__PURE__ */ t.createElement("div", {
|
|
66
66
|
className: a
|
|
67
67
|
}, u == null ? void 0 : u.map((_, g) => {
|
|
68
68
|
var C, T, F, D, S;
|
|
69
|
-
const A = ((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 === _.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", L = _e(N,
|
|
69
|
+
const A = ((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 === _.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", L = _e(N, v), i = r.find((R) => R.productId === _.value);
|
|
70
70
|
return f(h, {
|
|
71
71
|
key: _.id || _.value || _.label,
|
|
72
72
|
option: _,
|
|
@@ -84,14 +84,14 @@ const o = ({ children: e }) => {
|
|
|
84
84
|
});
|
|
85
85
|
}));
|
|
86
86
|
}, E = ({ children: e, className: a, ...l }) => {
|
|
87
|
-
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany: O, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel:
|
|
87
|
+
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany: O, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: v, imageResize: N, isFirst: h } = l, { id: _ } = U(), g = x(null), A = x(null), L = I(e, E.Image), i = I(e, E.Label), C = I(e, E.Price), T = I(e, E.Input), F = I(e, E.Quantity);
|
|
88
88
|
ee(() => {
|
|
89
89
|
var d;
|
|
90
90
|
h && ((d = g.current ?? A.current) == null || d.focus({
|
|
91
91
|
preventScroll: !0
|
|
92
92
|
}));
|
|
93
93
|
}, _);
|
|
94
|
-
const D =
|
|
94
|
+
const D = M((d) => {
|
|
95
95
|
s({
|
|
96
96
|
productId: n.value,
|
|
97
97
|
price: r,
|
|
@@ -101,7 +101,7 @@ const o = ({ children: e }) => {
|
|
|
101
101
|
s,
|
|
102
102
|
n.value,
|
|
103
103
|
r
|
|
104
|
-
]), S =
|
|
104
|
+
]), S = M((d) => {
|
|
105
105
|
s({
|
|
106
106
|
productId: n.value,
|
|
107
107
|
price: r,
|
|
@@ -111,7 +111,7 @@ const o = ({ children: e }) => {
|
|
|
111
111
|
s,
|
|
112
112
|
n.value,
|
|
113
113
|
r
|
|
114
|
-
]), R = `${n.label} ${
|
|
114
|
+
]), R = `${n.label} ${v} ${r}`;
|
|
115
115
|
return O ? /* @__PURE__ */ t.createElement("div", {
|
|
116
116
|
className: a,
|
|
117
117
|
"data-hook": "product"
|
|
@@ -186,16 +186,16 @@ const o = ({ children: e }) => {
|
|
|
186
186
|
"data-hook": "product-price"
|
|
187
187
|
}, c);
|
|
188
188
|
}, De = ({ className: e, ...a }) => {
|
|
189
|
-
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel: O, inputRef: s } = a, u =
|
|
189
|
+
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel: O, inputRef: s } = a, u = M((p) => {
|
|
190
190
|
n(p < 0 ? 0 : p);
|
|
191
191
|
}, [
|
|
192
192
|
n
|
|
193
|
-
]), m =
|
|
193
|
+
]), m = M((p) => {
|
|
194
194
|
p.key === "Home" && (p.preventDefault(), u(0));
|
|
195
195
|
}, [
|
|
196
196
|
u
|
|
197
197
|
]);
|
|
198
|
-
return /* @__PURE__ */ t.createElement(
|
|
198
|
+
return /* @__PURE__ */ t.createElement(X, {
|
|
199
199
|
value: l,
|
|
200
200
|
onChange: u,
|
|
201
201
|
minValue: 0,
|
|
@@ -206,11 +206,11 @@ const o = ({ children: e }) => {
|
|
|
206
206
|
"aria-label": O,
|
|
207
207
|
className: e,
|
|
208
208
|
"data-hook": "product-quantity"
|
|
209
|
-
}, /* @__PURE__ */ t.createElement(
|
|
209
|
+
}, /* @__PURE__ */ t.createElement(Y, {
|
|
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"
|
|
@@ -235,10 +235,10 @@ const Se = "_options_1jnru_1", Pe = "_option_1jnru_1", Ne = "_optionInput_1jnru_
|
|
|
235
235
|
optionLabel: Ae,
|
|
236
236
|
optionPrice: Te,
|
|
237
237
|
quantity: qe
|
|
238
|
-
},
|
|
238
|
+
}, ve = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(H, {
|
|
239
239
|
content: e,
|
|
240
240
|
locale: a
|
|
241
|
-
}),
|
|
241
|
+
}), Me = () => {
|
|
242
242
|
const e = Oe({
|
|
243
243
|
globalClasses: ce,
|
|
244
244
|
moduleClasses: Ie
|
|
@@ -265,8 +265,8 @@ const Se = "_options_1jnru_1", Pe = "_option_1jnru_1", Ne = "_optionInput_1jnru_
|
|
|
265
265
|
className: b(se, q.error)
|
|
266
266
|
}, /* @__PURE__ */ t.createElement(fe, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
267
267
|
className: b(ie, q.description)
|
|
268
|
-
},
|
|
269
|
-
}, Ze = () => /* @__PURE__ */ t.createElement(
|
|
268
|
+
}, ve));
|
|
269
|
+
}, Ze = () => /* @__PURE__ */ t.createElement(Me, null);
|
|
270
270
|
export {
|
|
271
271
|
Ze as ProductListRAC
|
|
272
272
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import a, { useRef as F, useState as T, useEffect as B, useCallback as H } from "react";
|
|
2
|
-
import { RadioGroup as A, RadioField as k, RadioButton as
|
|
3
|
-
import {
|
|
2
|
+
import { RadioGroup as A, RadioField as k, RadioButton as G, TextField as P, Input as $ } from "react-aria-components";
|
|
3
|
+
import { by as g, bv as q, bI as D, bA as x } from "./form-GAuLAdjq.js";
|
|
4
4
|
import { f as u, a as L } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as
|
|
6
|
-
import { L as
|
|
7
|
-
import { S as
|
|
8
|
-
const v = "Other",
|
|
5
|
+
import { D as U, E as M } from "./field-error-headless-DAc8FpKI.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-DxxwJtjh.js";
|
|
7
|
+
import { S as w } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
|
+
const v = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), S = (e, t) => !!t && !z(e, t), J = (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
|
-
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:
|
|
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: _ } = q(), s = u(e, i.Label), I = u(e, i.Options), R = u(e, i.Description), N = u(e, i.Error), V = S(o, l) ? v : l || null;
|
|
13
13
|
return /* @__PURE__ */ a.createElement(c, {
|
|
14
14
|
fieldId: n,
|
|
15
15
|
renderLabel: () => L(s, {
|
|
@@ -18,8 +18,8 @@ const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
18
18
|
renderInput: () => /* @__PURE__ */ a.createElement(A, {
|
|
19
19
|
id: f,
|
|
20
20
|
className: t,
|
|
21
|
-
"aria-labelledby":
|
|
22
|
-
"aria-describedby":
|
|
21
|
+
"aria-labelledby": C,
|
|
22
|
+
"aria-describedby": _,
|
|
23
23
|
value: V,
|
|
24
24
|
onChange: h,
|
|
25
25
|
isDisabled: p,
|
|
@@ -28,12 +28,12 @@ const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
28
28
|
isInvalid: r,
|
|
29
29
|
onBlur: E,
|
|
30
30
|
onFocus: b
|
|
31
|
-
},
|
|
31
|
+
}, I),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ a.createElement(a.Fragment, null, N, R)
|
|
33
33
|
});
|
|
34
|
-
},
|
|
34
|
+
}, K = ({ children: e, className: t }) => {
|
|
35
35
|
const { options: n, addOther: l, addOtherLabel: h, id: p, numberOfColumns: O, hasError: m } = g(), { t: E } = D(), b = u(e, i.Option), r = F(null), c = h || E("add-other.default-other-option-label") || v;
|
|
36
|
-
return
|
|
36
|
+
return x(() => {
|
|
37
37
|
var o;
|
|
38
38
|
(o = r.current) == null || o.focus({
|
|
39
39
|
preventScroll: !0
|
|
@@ -55,18 +55,18 @@ const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
55
55
|
isOther: !0
|
|
56
56
|
}));
|
|
57
57
|
}, d = ({ children: e, className: t, ...n }) => {
|
|
58
|
-
var
|
|
59
|
-
const { value: l, label: h, isOther: p = !1, radioRef: O } = n, { value: m, options: E } = g(), b = u(e, d.Label), r = u(e, d.Input), c = u(e, d.Control), o = u(e, d.OtherInput), f = p ?
|
|
58
|
+
var _;
|
|
59
|
+
const { value: l, label: h, isOther: p = !1, radioRef: O } = n, { value: m, options: E } = g(), b = u(e, d.Label), r = u(e, d.Input), c = u(e, d.Control), o = u(e, d.OtherInput), f = p ? S(E, m) : m === l, C = (_ = r == null ? void 0 : r.props) == null ? void 0 : _.className;
|
|
60
60
|
return /* @__PURE__ */ a.createElement("div", {
|
|
61
61
|
className: t
|
|
62
62
|
}, /* @__PURE__ */ a.createElement(k, {
|
|
63
63
|
value: l
|
|
64
|
-
}, /* @__PURE__ */ a.createElement(
|
|
64
|
+
}, /* @__PURE__ */ a.createElement(G, {
|
|
65
65
|
ref: O,
|
|
66
|
-
className:
|
|
67
|
-
}, ({ isSelected: s, isHovered:
|
|
66
|
+
className: C
|
|
67
|
+
}, ({ isSelected: s, isHovered: I, isFocused: R }) => /* @__PURE__ */ a.createElement(a.Fragment, null, L(c, {
|
|
68
68
|
isSelected: s,
|
|
69
|
-
isHovered:
|
|
69
|
+
isHovered: I,
|
|
70
70
|
isFocused: R
|
|
71
71
|
}), L(b, {
|
|
72
72
|
label: h
|
|
@@ -77,28 +77,28 @@ const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
77
77
|
className: e
|
|
78
78
|
}, n);
|
|
79
79
|
}, W = (e) => null, X = ({ className: e }) => {
|
|
80
|
-
const { value: t, onChange: n, addOtherLabel: l, addOtherPlaceholder: h, otherInputCharacterLimit: p, disabled: O, readOnly: m, options: E } = g(), { t: b } = D(), r = F(null), c =
|
|
80
|
+
const { value: t, onChange: n, addOtherLabel: l, addOtherPlaceholder: h, otherInputCharacterLimit: p, disabled: O, readOnly: m, options: E } = g(), { t: b } = D(), r = F(null), c = S(E, t), o = l || b("add-other.default-other-option-label") || v, [f, C] = T(c && t ? J(t, l) : "");
|
|
81
81
|
B(() => {
|
|
82
82
|
var s;
|
|
83
83
|
c && r.current && ((s = r.current) == null || s.focus());
|
|
84
84
|
}, [
|
|
85
85
|
c
|
|
86
86
|
]);
|
|
87
|
-
const
|
|
88
|
-
let
|
|
89
|
-
s ?
|
|
87
|
+
const _ = H((s) => {
|
|
88
|
+
let I;
|
|
89
|
+
s ? I = `${l}: ${s}` : I = o, n(I), C(s);
|
|
90
90
|
}, [
|
|
91
91
|
n,
|
|
92
92
|
l,
|
|
93
93
|
o
|
|
94
94
|
]);
|
|
95
|
-
return /* @__PURE__ */ a.createElement(
|
|
95
|
+
return /* @__PURE__ */ a.createElement(P, {
|
|
96
96
|
"aria-label": o,
|
|
97
97
|
value: f,
|
|
98
|
-
onChange:
|
|
98
|
+
onChange: _,
|
|
99
99
|
isDisabled: O,
|
|
100
100
|
isReadOnly: m
|
|
101
|
-
}, /* @__PURE__ */ a.createElement(
|
|
101
|
+
}, /* @__PURE__ */ a.createElement($, {
|
|
102
102
|
ref: r,
|
|
103
103
|
className: e,
|
|
104
104
|
placeholder: h,
|
|
@@ -107,14 +107,14 @@ const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
107
107
|
};
|
|
108
108
|
d.Label = Q;
|
|
109
109
|
d.Input = W;
|
|
110
|
-
d.Control =
|
|
110
|
+
d.Control = w;
|
|
111
111
|
d.OtherInput = X;
|
|
112
|
-
i.Label =
|
|
113
|
-
i.Options =
|
|
112
|
+
i.Label = j;
|
|
113
|
+
i.Options = K;
|
|
114
114
|
i.Option = d;
|
|
115
115
|
i.Description = U;
|
|
116
|
-
i.Error =
|
|
117
|
-
const Y = "_labelImage_1u9f2_1", Z = "_option_1u9f2_26", ee = "_optionInput_1u9f2_32", te = "_optionControl_1u9f2_50", oe = "_optionControlHover_1u9f2_72", ne = "_optionControlSelected_1u9f2_90", le = "_optionLabel_1u9f2_137",
|
|
116
|
+
i.Error = M;
|
|
117
|
+
const Y = "_labelImage_1u9f2_1", Z = "_option_1u9f2_26", ee = "_optionInput_1u9f2_32", te = "_optionControl_1u9f2_50", oe = "_optionControlHover_1u9f2_72", ne = "_optionControlSelected_1u9f2_90", le = "_optionLabel_1u9f2_137", y = {
|
|
118
118
|
labelImage: Y,
|
|
119
119
|
option: Z,
|
|
120
120
|
optionInput: ee,
|
|
@@ -123,12 +123,12 @@ const Y = "_labelImage_1u9f2_1", Z = "_option_1u9f2_26", ee = "_optionInput_1u9f
|
|
|
123
123
|
optionControlSelected: ne,
|
|
124
124
|
optionLabel: le
|
|
125
125
|
}, pe = {
|
|
126
|
-
base:
|
|
127
|
-
selected:
|
|
128
|
-
hover:
|
|
126
|
+
base: y.optionControl,
|
|
127
|
+
selected: y.optionControlSelected,
|
|
128
|
+
hover: y.optionControlHover
|
|
129
129
|
};
|
|
130
130
|
export {
|
|
131
131
|
pe as R,
|
|
132
132
|
i as a,
|
|
133
|
-
|
|
133
|
+
y as s
|
|
134
134
|
};
|
package/dist/component/{radio-group-field-rac-Cp3LRN3C.js → radio-group-field-rac-DlMXhW_S.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-aK1SQcLG.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as r } from "./field-rac.module-
|
|
7
|
-
import {
|
|
6
|
+
import { s as r } from "./field-rac.module-ts2t4WUO.js";
|
|
7
|
+
import { U as i, aa as E, a5 as p, a6 as O, K as R, G as _, a7 as I } from "./form-GAuLAdjq.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-ByDw6j7c.js";
|
|
10
|
+
import { u } from "./use-text-input-class-name-CmxSw6bY.js";
|
|
11
11
|
const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: l
|