@wix/form-elements 1.134.0 → 1.136.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-DsD7xLmb.js +1010 -0
- package/dist/component/{bookings-address-rac-F39MfGmX.js → bookings-address-rac-ByaFu51U.js} +1 -1
- package/dist/component/{bookings-email-rac-D4CurQjr.js → bookings-email-rac-CxuvkcYw.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Bz9o1eLl.js → bookings-first-name-rac-JXLJa_7E.js} +1 -1
- package/dist/component/{bookings-header-rac-6mfX0WGf.js → bookings-header-rac-CIQTbf9d.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CD1-B7Ao.js → bookings-last-name-rac-_2Xt4BPe.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-2eQkfhBb.js → bookings-login-bar-rac-BUjys5i9.js} +6 -6
- package/dist/component/{bookings-phone-rac-X6sSnHiH.js → bookings-phone-rac-DlsdGmOt.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-f2artJnn.js → bookings-rich-text-rac-BvRdhL7M.js} +1 -1
- package/dist/component/{checkbox-field-rac-DoZ9bcw3.js → checkbox-field-rac-Be6wicaA.js} +121 -121
- package/dist/component/{checkbox-group-field-headless-B-d37T4z.js → checkbox-group-field-headless-BJ0pGvXi.js} +19 -19
- package/dist/component/{checkbox-group-field-rac-0qYHz3g1.js → checkbox-group-field-rac-D7xqqVf6.js} +4 -4
- package/dist/component/{checkbox-group-rac-BqUJdAju.js → checkbox-group-rac-DtCS-gEH.js} +1 -1
- package/dist/component/{checkbox-rac-BN-qNzpH.js → checkbox-rac-ub7MFwY-.js} +1 -1
- package/dist/component/{contacts-address-rac-B7vWOTFf.js → contacts-address-rac-Bwsdpg11.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-Dl0OatzW.js → contacts-birthdate-rac-D54hibhb.js} +1 -1
- package/dist/component/{contacts-company-rac-DIeGU0Bf.js → contacts-company-rac-CKqzgKio.js} +1 -1
- package/dist/component/{contacts-email-rac-BCH6ogWv.js → contacts-email-rac-Dxm31wuY.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Cx-USWmx.js → contacts-first-name-rac-CXHsx6Vy.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CUZdJI9J.js → contacts-last-name-rac-B0S268f3.js} +1 -1
- package/dist/component/{contacts-phone-rac-hNCW_2UC.js → contacts-phone-rac-DEbgIiEj.js} +1 -1
- package/dist/component/{contacts-position-rac-CJfOgxZc.js → contacts-position-rac-D31uoOlR.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-69721_c9.js → contacts-subscribe-rac-DJ8NtoxZ.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CXXBqWIm.js → contacts-tax-id-rac-DTQffHAo.js} +1 -1
- package/dist/component/{date-availability-NQGPIrdZ.js → date-availability-DmhJ9apH.js} +1 -1
- package/dist/component/{date-input-field-rac-C-we-suG.js → date-input-field-rac-BwM_q4FW.js} +52 -52
- package/dist/component/{date-input-rac-Cif7Bqxc.js → date-input-rac-C93pgocp.js} +1 -1
- package/dist/component/{date-picker-field-rac-CHDkTXVH.js → date-picker-field-rac-CtZL368W.js} +5 -5
- package/dist/component/{date-picker-rac-DdhgbY6W.js → date-picker-rac-4DNe6hOX.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BjtDbiqE.js → date-time-input-field-rac-MlCVy3Oz.js} +58 -58
- package/dist/component/{date-time-input-rac-BDP5SN-i.js → date-time-input-rac-ByyBvFgo.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CkF41kIR.js → dext-checkbox-group-rac-BP76Xwiq.js} +4 -4
- package/dist/component/{dext-checkbox-rac-DjYpsxmq.js → dext-checkbox-rac-DGaKSh4Z.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BxXZLogr.js → dext-date-picker-rac-UEXbMSlL.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-e4y_JjEx.js → dext-date-time-input-rac-CsJcGK4I.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DsjB3ZX7.js → dext-dropdown-rac-BzbRzloh.js} +1 -1
- package/dist/component/{dext-email-rac-ClPp1g4D.js → dext-email-rac-DufFAnTi.js} +1 -1
- package/dist/component/{dext-number-input-rac-D2nZNzyN.js → dext-number-input-rac-D6xXi7B2.js} +1 -1
- package/dist/component/{dext-phone-rac-PNiQZ-Lr.js → dext-phone-rac-svy9CDHW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DUltmMHM.js → dext-radio-group-rac-C4p9NuQS.js} +4 -4
- package/dist/component/{dext-rating-input-rac-C_apsfGT.js → dext-rating-input-rac-wJ7-RFFN.js} +1 -1
- package/dist/component/{dext-tags-rac-DkB_CmOD.js → dext-tags-rac-D2myHrSZ.js} +4 -4
- package/dist/component/{dext-text-area-rac-CfoIK0S7.js → dext-text-area-rac-B4Fw_9mF.js} +1 -1
- package/dist/component/{dext-text-input-rac-CIOXlk6U.js → dext-text-input-rac-DlZanFMT.js} +1 -1
- package/dist/component/{dext-url-input-rac-UHJAs3ck.js → dext-url-input-rac-DYjl3wuk.js} +1 -1
- package/dist/component/{donation-rac-BJfvVi_d.js → donation-rac-B6LwJxik.js} +72 -72
- package/dist/component/{dropdown-field-headless-0DB-T-3t.js → dropdown-field-headless-BAt2RoAH.js} +8 -8
- package/dist/component/{dropdown-field-rac-DB-pd2a8.js → dropdown-field-rac-DFjn3ecV.js} +7 -7
- package/dist/component/{dropdown-rac-4T4zRBVy.js → dropdown-rac-DQ6keNRI.js} +1 -1
- package/dist/component/{ecom-address-rac-BjWD1sRX.js → ecom-address-rac-j1T2zp0k.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CYCufut6.js → ecom-subscription-checkbox-rac-viTaRZsk.js} +2 -2
- package/dist/component/{email-input-field-rac-DlLoY9jB.js → email-input-field-rac-5eb-1w7B.js} +46 -46
- package/dist/component/{events-repeater-rac-CPHJbWcZ.js → events-repeater-rac-BtcoN_Ra.js} +23 -23
- package/dist/component/{events-rsvp-rac-NXf8Fv3A.js → events-rsvp-rac-DSzFEmty.js} +10 -10
- package/dist/component/{field-error-headless-C-wyL0uw.js → field-error-headless-Bpe041x2.js} +6 -6
- package/dist/component/{field-label-headless-32mvEUId.js → field-label-headless-BUuK1Ftv.js} +7 -7
- package/dist/component/{file-upload-rac-BicD_Bhj.js → file-upload-rac-CfU8Ygwq.js} +50 -50
- package/dist/component/{fixed-payment-rac-DxHalHUv.js → fixed-payment-rac-CYp7zNq8.js} +12 -12
- package/dist/component/{form-B2wZnWX9.js → form-C6lnbh2O.js} +1948 -1896
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C47Te_oW.js → header-field-rac-B7YfrhId.js} +4 -4
- package/dist/component/{header-rac-ChDYKTx5.js → header-rac-BtJKAKAz.js} +1 -1
- package/dist/component/{image-choice-rac-CqTBWpcY.js → image-choice-rac-Bmq7Pyg6.js} +32 -32
- package/dist/component/{index-BF_Aifc-.js → index-BjPSeVyh.js} +107 -107
- package/dist/component/{index-Br8x_xx8.js → index-CQdUOkIN.js} +5 -5
- package/dist/component/{isObjectLike-D4VXbd0T.js → isObjectLike-CxNqKfU5.js} +7 -7
- package/dist/component/{multiline-address-field-rac-DYcfzGJb.js → multiline-address-field-rac-BeiUJWKd.js} +115 -115
- package/dist/component/{multiline-address-rac-DcGDGyL-.js → multiline-address-rac-B2mocF6M.js} +1 -1
- package/dist/component/{number-input-field-rac-C_Fh8oeD.js → number-input-field-rac-CQX7_S2O.js} +24 -24
- package/dist/component/{number-input-rac-J2tCaAYx.js → number-input-rac-BZri-E8P.js} +1 -1
- package/dist/component/{password-rac-wlfBhft8.js → password-rac-CdwrtDJU.js} +50 -50
- package/dist/component/{payment-input-rac-DKxy3uE0.js → payment-input-rac-ClQiqmjm.js} +38 -38
- package/dist/component/{phone-input-field-rac-ClXUOLpB.js → phone-input-field-rac-BtG_Rado.js} +56 -56
- package/dist/component/{phone-rac-D0-Poz1e.js → phone-rac-CdcAMa5E.js} +1 -1
- package/dist/component/{product-list-rac-TF5fgLyc.js → product-list-rac-Dp_YK6mo.js} +61 -61
- package/dist/component/{quiz-radio-group-rac-BX4V_6wg.js → quiz-radio-group-rac-CorojxKD.js} +1 -1
- package/dist/component/{radio-button-module-classes-D8UpzVUK.js → radio-button-module-classes-ZX12Fyj4.js} +3 -3
- package/dist/component/{radio-group-field-rac-C0zCVtjj.js → radio-group-field-rac-BifCDpE4.js} +10 -10
- package/dist/component/{radio-group-rac-DrKqgPRT.js → radio-group-rac-CJ2fzqnY.js} +1 -1
- package/dist/component/{rating-input-field-rac-DjxfTgv5.js → rating-input-field-rac-Dg1T0DZW.js} +28 -28
- package/dist/component/{rating-input-rac-DO4Bpdj3.js → rating-input-rac-Ba4YK13i.js} +1 -1
- package/dist/component/{rich-content-rac.module-DUNKiTkT.js → rich-content-rac.module-BehwBL3L.js} +3 -3
- package/dist/component/{rich-text-field-rac-DIOTzVwj.js → rich-text-field-rac-DtIWdB-S.js} +7 -7
- package/dist/component/{rich-text-rac-C_E_vEGz.js → rich-text-rac-BX4eDDFw.js} +1 -1
- package/dist/component/service-dropdown-rac-68WLBlsa.js +146 -0
- package/dist/component/{services-multi-choice-rac-D40hZhBB.js → services-multi-choice-rac-8yNdAHfS.js} +7 -7
- package/dist/component/{signature-rac-CKXpb2WN.js → signature-rac-DeVOyl5O.js} +73 -73
- package/dist/component/{submit-button-rac-CDS-vtXq.js → submit-button-rac-IOr1g-G-.js} +12 -12
- package/dist/component/{tags-field-rac-CdQWq8k5.js → tags-field-rac-DaiMlAxt.js} +27 -27
- package/dist/component/{tags-rac-BwChqdGx.js → tags-rac-BgrUkY0A.js} +1 -1
- package/dist/component/{text-area-field-rac-VCFJuHx4.js → text-area-field-rac-CLPZEY93.js} +16 -16
- package/dist/component/{text-area-rac-BICVNsdn.js → text-area-rac-C8PdPSzX.js} +1 -1
- package/dist/component/{text-input-field-rac-C9gyRhcK.js → text-input-field-rac-Dm-xU8Rg.js} +5 -5
- package/dist/component/{text-input-headless-BdkaD-re.js → text-input-headless-BEmRjL8Z.js} +6 -6
- package/dist/component/{text-input-rac-B7buOGbq.js → text-input-rac-C-FnaOXT.js} +1 -1
- package/dist/component/{time-input-rac-CSFhEYi0.js → time-input-rac-VmTURkiK.js} +46 -46
- package/dist/component/{url-input-field-rac-BIXokgHy.js → url-input-field-rac-CnnS0tVx.js} +23 -23
- package/dist/component/{url-input-rac-tTN0GaTH.js → url-input-rac-6nd_ccoP.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-C6zB6TNA.js → use-dropdown-option-class-name-CcZl1qrj.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-CEq68SuK.js → use-dropdown-trigger-class-name-BNc0mkdK.js} +4 -4
- package/dist/component/{use-element-state-class-name-BFZzVwqe.js → use-element-state-class-name-BU6RXqBy.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-CzZmczhf.js → use-hoverable-input-class-name-CkXPkbiP.js} +2 -2
- package/dist/component/{use-service-options-base-DOCVW9ax.js → use-service-options-base-B5afDbnr.js} +4 -4
- package/dist/component/use-text-input-class-name-BB3V6Q0b.js +6 -0
- package/package.json +2 -2
- package/dist/component/appointment-rac-CZHb5jGz.js +0 -1010
- package/dist/component/service-dropdown-rac-B3gQT9Tj.js +0 -146
- package/dist/component/use-text-input-class-name-BNX3qkmh.js +0 -6
package/dist/component/{phone-input-field-rac-ClXUOLpB.js → phone-input-field-rac-BtG_Rado.js}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import t, { useMemo as j, useState as $, useRef as F, useEffect as k, useCallback as Z, createContext as ee, useContext as
|
|
4
|
-
import {
|
|
2
|
+
import h from "classnames";
|
|
3
|
+
import t, { useMemo as j, useState as $, useRef as F, useEffect as k, useCallback as Z, createContext as ee, useContext as G, useId as de } from "react";
|
|
4
|
+
import { b2 as ye, bt as w, bb as te, bs as Ee, bj as D, bg as ne, bl as fe, M as ge, Y as he, L as be, O as Oe, G as _e, u as Ne } from "./form-C6lnbh2O.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as Se } from "react-aria";
|
|
6
6
|
import { Dialog as oe, OverlayTriggerStateContext as Le, ModalOverlay as Ie, Modal as ve, SearchField as Pe, Group as q, ListBoxItem as Fe, DialogTrigger as we, Select as De, Input as re, Autocomplete as Be } from "react-aria-components";
|
|
7
|
-
import { f as
|
|
8
|
-
import { D as Re, E as xe } from "./field-error-headless-
|
|
9
|
-
import { L as Me } from "./field-label-headless-
|
|
7
|
+
import { f as g, a as I } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as Re, E as xe } from "./field-error-headless-Bpe041x2.js";
|
|
9
|
+
import { L as Me } from "./field-label-headless-BUuK1Ftv.js";
|
|
10
10
|
import { N as Te, S as je } from "./non-modal-popover-D-u13tmp.js";
|
|
11
11
|
import { u as $e } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
-
import { a as Ae, u as ke } from "./use-dropdown-trigger-class-name-
|
|
13
|
-
import { V as Ue, u as Ve } from "./use-dropdown-option-class-name-
|
|
14
|
-
import ae, { AsYouType as qe, isValidPhoneNumber as
|
|
12
|
+
import { a as Ae, u as ke } from "./use-dropdown-trigger-class-name-BNc0mkdK.js";
|
|
13
|
+
import { V as Ue, u as Ve } from "./use-dropdown-option-class-name-CcZl1qrj.js";
|
|
14
|
+
import ae, { AsYouType as qe, isValidPhoneNumber as Ge, isSupportedCountry as Ye } from "libphonenumber-js";
|
|
15
15
|
import "libphonenumber-js/metadata.min.json";
|
|
16
16
|
import { C as Q } from "./calling-country-codes-PyWuOTmF.js";
|
|
17
|
-
import { C as
|
|
18
|
-
import { E as
|
|
17
|
+
import { C as He } from "./chevron-down-icon-CcpVm6B-.js";
|
|
18
|
+
import { E as ze } from "./error-icon-hZxQ6DEy.js";
|
|
19
19
|
import { H as W } from "./custom-focus-class-_483Pkwp.js";
|
|
20
20
|
import { s as O } from "./field-rac.module-DfEb7pBp.js";
|
|
21
|
-
import { u as
|
|
21
|
+
import { u as Ke } from "./use-text-input-class-name-BB3V6Q0b.js";
|
|
22
22
|
function J(e) {
|
|
23
23
|
const n = e ? ae(e) : void 0, r = n == null ? void 0 : n.country;
|
|
24
24
|
if (r)
|
|
@@ -26,7 +26,7 @@ function J(e) {
|
|
|
26
26
|
const o = new qe();
|
|
27
27
|
return e && o.input(e), o.getCountry();
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Y(e) {
|
|
30
30
|
var n;
|
|
31
31
|
return e && ((n = ye.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
32
32
|
}
|
|
@@ -37,7 +37,7 @@ function X(e, n) {
|
|
|
37
37
|
if (e && n)
|
|
38
38
|
try {
|
|
39
39
|
const r = ae(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
40
|
-
if (o &&
|
|
40
|
+
if (o && Ge(o))
|
|
41
41
|
return o.replace(/\s+/g, "");
|
|
42
42
|
} catch {
|
|
43
43
|
}
|
|
@@ -46,8 +46,8 @@ function X(e, n) {
|
|
|
46
46
|
function Ze() {
|
|
47
47
|
const { t: e } = w(), { language: n } = te();
|
|
48
48
|
return j(() => Object.keys(Q).reduce((o, a) => {
|
|
49
|
-
const c = Q[a], l =
|
|
50
|
-
return l &&
|
|
49
|
+
const c = Q[a], l = Y(c), i = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
50
|
+
return l && Ye(a) && o.push({
|
|
51
51
|
countryName: i,
|
|
52
52
|
longCountryCode: c,
|
|
53
53
|
shortCountryCode: a,
|
|
@@ -121,16 +121,16 @@ function Je({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
124
|
-
const e =
|
|
124
|
+
const e = G(se);
|
|
125
125
|
if (!e)
|
|
126
126
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
127
127
|
return e;
|
|
128
|
-
}, ce = /* @__PURE__ */ ee(null),
|
|
129
|
-
const e =
|
|
128
|
+
}, ce = /* @__PURE__ */ ee(null), H = () => {
|
|
129
|
+
const e = G(ce);
|
|
130
130
|
if (!e)
|
|
131
131
|
throw new Error("Option sub-components must be used within Option component");
|
|
132
132
|
return e;
|
|
133
|
-
},
|
|
133
|
+
}, z = ({ 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/", m = `${c}${l === "2x" ? "_2x" : ""}.png`;
|
|
136
136
|
return `${i}${m}`;
|
|
@@ -156,7 +156,7 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
156
156
|
defaultCountryCode: c,
|
|
157
157
|
allowedCountryCodes: p,
|
|
158
158
|
onChange: o
|
|
159
|
-
}), B =
|
|
159
|
+
}), B = g(e, s.Label), R = g(e, s.Control), x = g(e, s.Description), M = g(e, s.Error), v = {
|
|
160
160
|
currentValue: f,
|
|
161
161
|
selectedCountryCode: y,
|
|
162
162
|
handlePhoneChange: L,
|
|
@@ -178,8 +178,8 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
178
178
|
}), R),
|
|
179
179
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, M, x)
|
|
180
180
|
}));
|
|
181
|
-
},
|
|
182
|
-
const { labelId: r } = ne(), { hasError: o, disabled: a, readOnly: c } = D(), { t: l } = w(), { selectedCountryCode: i, countries: u } = _(), m = de(), C = i ? u.find((y) => y.shortCountryCode === i) : void 0, d = C &&
|
|
181
|
+
}, K = ({ children: e, className: n }) => {
|
|
182
|
+
const { labelId: r } = ne(), { hasError: o, disabled: a, readOnly: c } = D(), { t: l } = w(), { selectedCountryCode: i, countries: u } = _(), m = de(), C = i ? u.find((y) => y.shortCountryCode === i) : void 0, d = C && Y(C.longCountryCode) || "", p = l("field.phone.country-code.aria-label"), f = C ? `${p}, ${C.countryName}, ${d}` : p;
|
|
183
183
|
return /* @__PURE__ */ t.createElement(je, {
|
|
184
184
|
isDisabled: a || c,
|
|
185
185
|
id: m,
|
|
@@ -190,7 +190,7 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
190
190
|
}, e);
|
|
191
191
|
}, Xe = ({ 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(z, {
|
|
194
194
|
className: e,
|
|
195
195
|
longCountryCode: o.longCountryCode
|
|
196
196
|
}) : null;
|
|
@@ -200,10 +200,10 @@ const se = /* @__PURE__ */ ee(null), _ = () => {
|
|
|
200
200
|
className: n
|
|
201
201
|
}, e);
|
|
202
202
|
};
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
K.Flag = Xe;
|
|
204
|
+
K.EmptyState = et;
|
|
205
205
|
const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...c }) => {
|
|
206
|
-
const { triggerRef: l, optionsRef: i, isForcedOpen: u, isOpen: m } = c, { popoverContainer: C } = _(), d =
|
|
206
|
+
const { triggerRef: l, optionsRef: i, isForcedOpen: u, isOpen: m } = c, { popoverContainer: C } = _(), d = g(e, b.Search);
|
|
207
207
|
if (!m)
|
|
208
208
|
return null;
|
|
209
209
|
const p = /* @__PURE__ */ t.createElement(le, {
|
|
@@ -222,7 +222,7 @@ const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
222
222
|
"aria-label": r
|
|
223
223
|
}, p) : p));
|
|
224
224
|
}, tt = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...c }) => {
|
|
225
|
-
const { optionsRef: l } = c, { selectedCountryCode: i, handleCountryCodeChange: u } = _(), m =
|
|
225
|
+
const { optionsRef: l } = c, { selectedCountryCode: i, handleCountryCodeChange: u } = _(), m = G(Le);
|
|
226
226
|
return /* @__PURE__ */ t.createElement(Ie, {
|
|
227
227
|
className: r,
|
|
228
228
|
isDismissable: !0
|
|
@@ -245,12 +245,12 @@ const b = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
245
245
|
}
|
|
246
246
|
}, e)))));
|
|
247
247
|
}, le = ({ children: e, listBoxProps: n, isForcedOpen: r }) => {
|
|
248
|
-
const { countries: o } = _(), a =
|
|
248
|
+
const { countries: o } = _(), a = g(e, b.Option), c = g(e, b.Search), l = g(e, b.EmptyState), i = /* @__PURE__ */ t.createElement(Ue, {
|
|
249
249
|
isForcedOpen: r === !0,
|
|
250
250
|
...n,
|
|
251
251
|
renderEmptyState: l ? () => l : void 0
|
|
252
252
|
}, o.map((u) => {
|
|
253
|
-
const m =
|
|
253
|
+
const m = Y(u.longCountryCode) || "";
|
|
254
254
|
return I(a, {
|
|
255
255
|
key: u.shortCountryCode,
|
|
256
256
|
countryCode: u.shortCountryCode,
|
|
@@ -303,18 +303,18 @@ const A = ({ children: e, className: n, ...r }) => {
|
|
|
303
303
|
value: i
|
|
304
304
|
}, u));
|
|
305
305
|
}, ie = ({ className: e }) => {
|
|
306
|
-
const { longCountryCode: n } =
|
|
307
|
-
return /* @__PURE__ */ t.createElement(
|
|
306
|
+
const { longCountryCode: n } = H();
|
|
307
|
+
return /* @__PURE__ */ t.createElement(z, {
|
|
308
308
|
className: e,
|
|
309
309
|
longCountryCode: n
|
|
310
310
|
});
|
|
311
311
|
}, me = ({ className: e }) => {
|
|
312
|
-
const { countryName: n } =
|
|
312
|
+
const { countryName: n } = H();
|
|
313
313
|
return /* @__PURE__ */ t.createElement("span", {
|
|
314
314
|
className: e
|
|
315
315
|
}, n);
|
|
316
316
|
}, pe = ({ className: e }) => {
|
|
317
|
-
const { dialingCode: n } =
|
|
317
|
+
const { dialingCode: n } = H();
|
|
318
318
|
return /* @__PURE__ */ t.createElement("span", {
|
|
319
319
|
className: e
|
|
320
320
|
}, n);
|
|
@@ -358,15 +358,15 @@ const rt = ({ className: e }) => {
|
|
|
358
358
|
isOpen: f,
|
|
359
359
|
allowsEmptyCollection: !0,
|
|
360
360
|
onOpenChange: o ? void 0 : m
|
|
361
|
-
},
|
|
361
|
+
}, g(e, s.CountryButton), I(g(e, s.CountryOptions.Popover), {
|
|
362
362
|
...r,
|
|
363
363
|
isOpen: f
|
|
364
364
|
}));
|
|
365
365
|
}, st = ({ children: e, ...n }) => {
|
|
366
366
|
const r = n;
|
|
367
|
-
return /* @__PURE__ */ t.createElement(we, null,
|
|
367
|
+
return /* @__PURE__ */ t.createElement(we, null, g(e, s.CountryButton), I(g(e, s.CountryOptions.Modal), r));
|
|
368
368
|
}, ct = ({ children: e, className: n }) => {
|
|
369
|
-
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: m, onBlur: C } = D(), d = $e(C), { countries: p } = _(), f =
|
|
369
|
+
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: m, onBlur: C } = D(), d = $e(C), { countries: p } = _(), f = g(e, s.CountryDrawer), y = g(e, s.CountryPopover), L = g(e, s.PhoneNumber), N = p.length > 1, B = Ae(c) && !!y && N, R = typeof n == "function" ? ({ isHovered: v, isFocusWithin: S }) => n({
|
|
370
370
|
hasCountryOptions: N,
|
|
371
371
|
isHovered: v,
|
|
372
372
|
isFocusWithin: S
|
|
@@ -390,7 +390,7 @@ const rt = ({ className: e }) => {
|
|
|
390
390
|
isDisabled: l,
|
|
391
391
|
isInvalid: i,
|
|
392
392
|
...M
|
|
393
|
-
}, u && /* @__PURE__ */ t.createElement(
|
|
393
|
+
}, u && /* @__PURE__ */ t.createElement(z, {
|
|
394
394
|
longCountryCode: p[0].longCountryCode
|
|
395
395
|
}), L) : /* @__PURE__ */ t.createElement(q, {
|
|
396
396
|
ref: r,
|
|
@@ -402,7 +402,7 @@ const rt = ({ className: e }) => {
|
|
|
402
402
|
};
|
|
403
403
|
s.Label = Me;
|
|
404
404
|
s.Control = ct;
|
|
405
|
-
s.CountryButton =
|
|
405
|
+
s.CountryButton = K;
|
|
406
406
|
s.CountryDrawer = st;
|
|
407
407
|
s.CountryPopover = at;
|
|
408
408
|
s.CountryOptions = b;
|
|
@@ -429,7 +429,7 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
429
429
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
430
430
|
fillRule: "evenodd",
|
|
431
431
|
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"
|
|
432
|
-
})), it = "_control_o9wij_1", mt = "_countryButton_o9wij_9", pt = "_drawerButton_o9wij_25", Ct = "_popoverButton_o9wij_34", dt = "_chevron_o9wij_39", yt = "_globeIcon_o9wij_48", Et = "_searchIcon_o9wij_56", ft = "_flag_o9wij_61",
|
|
432
|
+
})), it = "_control_o9wij_1", mt = "_countryButton_o9wij_9", pt = "_drawerButton_o9wij_25", Ct = "_popoverButton_o9wij_34", dt = "_chevron_o9wij_39", yt = "_globeIcon_o9wij_48", Et = "_searchIcon_o9wij_56", ft = "_flag_o9wij_61", gt = "_option_o9wij_67", ht = "_phoneNumber_o9wij_80", bt = "_countryOptions_o9wij_106", Ot = "_countrySearch_o9wij_123", _t = "_mobileDrawer_o9wij_131", Nt = "_name_o9wij_140", St = "_code_o9wij_144", Lt = "_mobileOverlay_o9wij_161", E = {
|
|
433
433
|
control: it,
|
|
434
434
|
countryButton: mt,
|
|
435
435
|
drawerButton: pt,
|
|
@@ -438,8 +438,8 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
438
438
|
globeIcon: yt,
|
|
439
439
|
searchIcon: Et,
|
|
440
440
|
flag: ft,
|
|
441
|
-
option:
|
|
442
|
-
phoneNumber:
|
|
441
|
+
option: gt,
|
|
442
|
+
phoneNumber: ht,
|
|
443
443
|
countryOptions: bt,
|
|
444
444
|
countrySearch: Ot,
|
|
445
445
|
mobileDrawer: _t,
|
|
@@ -452,14 +452,14 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
452
452
|
}), vt = () => /* @__PURE__ */ t.createElement("span", {
|
|
453
453
|
className: E.chevron,
|
|
454
454
|
"aria-hidden": "true"
|
|
455
|
-
}, /* @__PURE__ */ t.createElement(
|
|
456
|
-
const e = Ve(O.selectOptionWithoutFocusRing, E.option, W), n = ke(E.control), r =
|
|
455
|
+
}, /* @__PURE__ */ t.createElement(He, null)), Zt = () => {
|
|
456
|
+
const e = Ve(O.selectOptionWithoutFocusRing, E.option, W), n = ke(E.control), r = Ke(E.countrySearch), { t: o } = w(), { PortalContainer: a } = te(), c = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
457
457
|
className: r,
|
|
458
458
|
"aria-label": o("field.phone.country-search-input.aria-label")
|
|
459
459
|
}, /* @__PURE__ */ t.createElement(ut, {
|
|
460
460
|
className: E.searchIcon
|
|
461
461
|
}), /* @__PURE__ */ t.createElement(s.CountryOptions.Search.Input, {
|
|
462
|
-
className:
|
|
462
|
+
className: h(O.innerInput, W),
|
|
463
463
|
placeholder: o("field.phone.country-search-input.placeholder")
|
|
464
464
|
})), 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, {
|
|
465
465
|
className: E.flag
|
|
@@ -475,31 +475,31 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
475
475
|
className: E.code
|
|
476
476
|
}));
|
|
477
477
|
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
478
|
-
className:
|
|
478
|
+
className: h(ge, O.label)
|
|
479
479
|
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
480
|
-
className:
|
|
480
|
+
className: h(he, O.requiredMark)
|
|
481
481
|
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
482
|
-
className: ({ hasCountryOptions: m, ...C }) => m ? n(C) :
|
|
482
|
+
className: ({ hasCountryOptions: m, ...C }) => m ? n(C) : h(be, O.input, E.control)
|
|
483
483
|
}, /* @__PURE__ */ t.createElement(s.CountryDrawer, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
484
|
-
className:
|
|
484
|
+
className: h(E.countryButton, E.drawerButton)
|
|
485
485
|
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Modal, {
|
|
486
|
-
className:
|
|
486
|
+
className: h(O.selectPopover, E.mobileDrawer),
|
|
487
487
|
overlayClassName: E.mobileOverlay,
|
|
488
488
|
portalContainer: a,
|
|
489
489
|
"aria-label": o("field.phone.country-code.aria-label")
|
|
490
490
|
}, c, l, u)), /* @__PURE__ */ t.createElement(s.CountryPopover, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
491
|
-
className:
|
|
491
|
+
className: h(E.countryButton, E.popoverButton)
|
|
492
492
|
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
|
|
493
|
-
className:
|
|
493
|
+
className: h(Oe, O.selectPopover, E.countryOptions),
|
|
494
494
|
placement: "bottom start",
|
|
495
495
|
offset: 0,
|
|
496
496
|
"aria-label": o("field.phone.country-code.aria-label")
|
|
497
497
|
}, c, l, u)), /* @__PURE__ */ t.createElement(s.PhoneNumber, {
|
|
498
|
-
className:
|
|
498
|
+
className: h(O.innerInput, E.phoneNumber)
|
|
499
499
|
})), /* @__PURE__ */ t.createElement(s.Error, {
|
|
500
|
-
className:
|
|
501
|
-
}, /* @__PURE__ */ t.createElement(
|
|
502
|
-
className:
|
|
500
|
+
className: h(_e, O.error)
|
|
501
|
+
}, /* @__PURE__ */ t.createElement(ze, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
502
|
+
className: h(Ne, O.description)
|
|
503
503
|
}, It));
|
|
504
504
|
};
|
|
505
505
|
export {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
3
|
-
import
|
|
4
|
-
import { CheckboxField as
|
|
5
|
-
import {
|
|
1
|
+
import t, { useMemo as K, useCallback as v, useRef as U } from "react";
|
|
2
|
+
import { RicosViewer as $ } from "@wix/ricos/viewer";
|
|
3
|
+
import _ from "classnames";
|
|
4
|
+
import { CheckboxField as z, CheckboxButton as j, NumberField as X, Group as Y, Button as Q, Input as J } from "react-aria-components";
|
|
5
|
+
import { bj as x, bg as W, bb as V, bt as Z, bl as ee, M as te, Y as ne, P as ae, S as oe, R as re, L as se, G as le, u as ie, Q as ce } from "./form-C6lnbh2O.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-BUuK1Ftv.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-Bpe041x2.js";
|
|
10
10
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
11
|
-
import { g as
|
|
12
|
-
import { S as
|
|
11
|
+
import { g as be } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
|
+
import { S as _e } from "./selection-indicator-XQ8MYHUQ.js";
|
|
13
13
|
import { E as fe } from "./error-icon-hZxQ6DEy.js";
|
|
14
14
|
import { C as Ie } from "./checkbox-indicator-module-classes-6173wvuW.js";
|
|
15
15
|
import { s as q } from "./field-rac.module-DfEb7pBp.js";
|
|
16
16
|
import { o as w } from "./options-rac.module-_THNq6Qq.js";
|
|
17
|
-
import { u as
|
|
18
|
-
var
|
|
17
|
+
import { u as Le } from "./use-element-state-class-name-BU6RXqBy.js";
|
|
18
|
+
var Oe = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), k = /* @__PURE__ */ (function(e) {
|
|
21
21
|
return e.oneByOne = "one-by-one", e.onlyOne = "only-one", e.many = "many", e;
|
|
@@ -28,10 +28,10 @@ function Ce({ maxItems: e, products: a } = {}) {
|
|
|
28
28
|
}
|
|
29
29
|
const o = ({ children: e }) => {
|
|
30
30
|
var D;
|
|
31
|
-
const { id: a, value: s, onChange: n, disabled: r, readOnly: c, required: y, onBlur:
|
|
31
|
+
const { id: a, value: s, onChange: n, disabled: r, readOnly: c, required: y, onBlur: L, onFocus: l, hasError: u, validation: m, FieldLayout: p } = x(), { inputId: M, labelId: N, ariaDescribedBy: h } = W(), b = I(e, o.Label), g = I(e, o.Options), A = I(e, o.Description), O = I(e, o.Error), i = K(() => s || [], [
|
|
32
32
|
s
|
|
33
|
-
]), T = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F =
|
|
34
|
-
const d = i.filter((
|
|
33
|
+
]), T = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F = v((S, R) => {
|
|
34
|
+
const d = i.filter((H) => H.productId !== S.productId), B = R ? [
|
|
35
35
|
...d,
|
|
36
36
|
S
|
|
37
37
|
] : d;
|
|
@@ -42,13 +42,13 @@ const o = ({ children: e }) => {
|
|
|
42
42
|
]);
|
|
43
43
|
return /* @__PURE__ */ t.createElement(p, {
|
|
44
44
|
fieldId: a,
|
|
45
|
-
renderLabel: () =>
|
|
45
|
+
renderLabel: () => b,
|
|
46
46
|
renderInput: () => /* @__PURE__ */ t.createElement(ye, {
|
|
47
|
-
id:
|
|
47
|
+
id: M,
|
|
48
48
|
ariaLabelledBy: N,
|
|
49
49
|
ariaDescribedBy: h,
|
|
50
50
|
required: y,
|
|
51
|
-
onBlur:
|
|
51
|
+
onBlur: L,
|
|
52
52
|
onFocus: l
|
|
53
53
|
}, g ? f(g, {
|
|
54
54
|
allowMany: T,
|
|
@@ -58,40 +58,40 @@ 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, A)
|
|
62
62
|
});
|
|
63
|
-
},
|
|
64
|
-
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly:
|
|
63
|
+
}, G = ({ children: e, className: a, ...s }) => {
|
|
64
|
+
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: L, hasError: l } = s, { options: u, validation: m, imageResize: p } = x(), { currency: M } = V(), { t: N } = Z(), h = I(e, o.Option);
|
|
65
65
|
return /* @__PURE__ */ t.createElement("div", {
|
|
66
66
|
className: a
|
|
67
|
-
}, u == null ? void 0 : u.map((
|
|
67
|
+
}, u == null ? void 0 : u.map((b, 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 ===
|
|
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 === b.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", O = be(N, M), i = r.find((R) => R.productId === b.value);
|
|
70
70
|
return f(h, {
|
|
71
|
-
key:
|
|
72
|
-
option:
|
|
71
|
+
key: b.id || b.value || b.label,
|
|
72
|
+
option: b,
|
|
73
73
|
price: A,
|
|
74
74
|
quantity: i == null ? void 0 : i.quantity,
|
|
75
75
|
isSelected: !!i,
|
|
76
76
|
allowMany: n,
|
|
77
77
|
onProductChange: c,
|
|
78
78
|
disabled: y,
|
|
79
|
-
readOnly:
|
|
79
|
+
readOnly: L,
|
|
80
80
|
hasError: l,
|
|
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, ...s }) => {
|
|
87
|
-
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany:
|
|
87
|
+
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany: L, onProductChange: l, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: M, imageResize: N, isFirst: h } = s, { id: b } = x(), g = U(null), A = U(null), O = 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
|
-
},
|
|
94
|
-
const D =
|
|
93
|
+
}, b);
|
|
94
|
+
const D = v((d) => {
|
|
95
95
|
l({
|
|
96
96
|
productId: n.value,
|
|
97
97
|
price: r,
|
|
@@ -101,7 +101,7 @@ const o = ({ children: e }) => {
|
|
|
101
101
|
l,
|
|
102
102
|
n.value,
|
|
103
103
|
r
|
|
104
|
-
]), S =
|
|
104
|
+
]), S = v((d) => {
|
|
105
105
|
l({
|
|
106
106
|
productId: n.value,
|
|
107
107
|
price: r,
|
|
@@ -111,11 +111,11 @@ const o = ({ children: e }) => {
|
|
|
111
111
|
l,
|
|
112
112
|
n.value,
|
|
113
113
|
r
|
|
114
|
-
]), R = `${n.label} ${
|
|
115
|
-
return
|
|
114
|
+
]), R = `${n.label} ${M} ${r}`;
|
|
115
|
+
return L ? /* @__PURE__ */ t.createElement("div", {
|
|
116
116
|
className: a,
|
|
117
117
|
"data-hook": "product"
|
|
118
|
-
},
|
|
118
|
+
}, O ? f(O, {
|
|
119
119
|
option: n,
|
|
120
120
|
imageResize: N
|
|
121
121
|
}) : null, i ? f(i, {
|
|
@@ -130,7 +130,7 @@ const o = ({ children: e }) => {
|
|
|
130
130
|
hasError: p,
|
|
131
131
|
ariaLabel: R,
|
|
132
132
|
inputRef: h ? A : void 0
|
|
133
|
-
}) : null) : /* @__PURE__ */ t.createElement(
|
|
133
|
+
}) : null) : /* @__PURE__ */ t.createElement(z, {
|
|
134
134
|
isSelected: y,
|
|
135
135
|
onChange: D,
|
|
136
136
|
isDisabled: u,
|
|
@@ -141,7 +141,7 @@ const o = ({ children: e }) => {
|
|
|
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 ? f(O, {
|
|
145
145
|
option: n,
|
|
146
146
|
imageResize: N
|
|
147
147
|
}) : null, i ? f(i, {
|
|
@@ -158,14 +158,14 @@ const o = ({ children: e }) => {
|
|
|
158
158
|
const { option: s, imageResize: n } = a, r = (l = s.media) == null ? void 0 : l.image;
|
|
159
159
|
if (!r)
|
|
160
160
|
return null;
|
|
161
|
-
const c = n ===
|
|
161
|
+
const c = n === Oe.fit, y = me(r, 96, 96, c ? "fit" : "fill");
|
|
162
162
|
if (!y)
|
|
163
163
|
return null;
|
|
164
|
-
const
|
|
164
|
+
const L = r.altText || s.label || "";
|
|
165
165
|
return /* @__PURE__ */ t.createElement("img", {
|
|
166
166
|
className: e,
|
|
167
167
|
src: y,
|
|
168
|
-
alt:
|
|
168
|
+
alt: L,
|
|
169
169
|
"data-fit": c ? "contain" : "cover",
|
|
170
170
|
"data-hook": "product-image"
|
|
171
171
|
});
|
|
@@ -186,11 +186,11 @@ const o = ({ children: e }) => {
|
|
|
186
186
|
"data-hook": "product-price"
|
|
187
187
|
}, c);
|
|
188
188
|
}, De = ({ className: e, ...a }) => {
|
|
189
|
-
const { quantity: s, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel:
|
|
189
|
+
const { quantity: s, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel: L, inputRef: l } = a, u = v((p) => {
|
|
190
190
|
n(p < 0 ? 0 : p);
|
|
191
191
|
}, [
|
|
192
192
|
n
|
|
193
|
-
]), m =
|
|
193
|
+
]), m = v((p) => {
|
|
194
194
|
p.key === "Home" && (p.preventDefault(), u(0));
|
|
195
195
|
}, [
|
|
196
196
|
u
|
|
@@ -203,14 +203,14 @@ const o = ({ children: e }) => {
|
|
|
203
203
|
isDisabled: r,
|
|
204
204
|
isReadOnly: c,
|
|
205
205
|
isInvalid: y,
|
|
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(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: l
|
|
215
215
|
}), /* @__PURE__ */ t.createElement(Q, {
|
|
216
216
|
slot: "increment"
|
|
@@ -219,11 +219,11 @@ const o = ({ children: e }) => {
|
|
|
219
219
|
E.Image = Re;
|
|
220
220
|
E.Label = ge;
|
|
221
221
|
E.Price = Fe;
|
|
222
|
-
E.Input =
|
|
222
|
+
E.Input = _e;
|
|
223
223
|
E.Quantity = De;
|
|
224
|
-
|
|
224
|
+
G.Option = E;
|
|
225
225
|
o.Label = ue;
|
|
226
|
-
o.Options =
|
|
226
|
+
o.Options = G;
|
|
227
227
|
o.Option = E;
|
|
228
228
|
o.Description = de;
|
|
229
229
|
o.Error = Ee;
|
|
@@ -235,38 +235,38 @@ const Se = "_options_519is_1", Pe = "_option_519is_1", Ne = "_optionInput_519is_
|
|
|
235
235
|
optionLabel: Ae,
|
|
236
236
|
optionPrice: Te,
|
|
237
237
|
quantity: qe
|
|
238
|
-
},
|
|
238
|
+
}, Me = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement($, {
|
|
239
239
|
content: e,
|
|
240
240
|
locale: a
|
|
241
|
-
}),
|
|
242
|
-
const e =
|
|
241
|
+
}), ve = () => {
|
|
242
|
+
const e = Le({
|
|
243
243
|
globalClasses: ce,
|
|
244
244
|
moduleClasses: Ie
|
|
245
245
|
});
|
|
246
246
|
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
247
|
-
className:
|
|
247
|
+
className: _(te, q.label)
|
|
248
248
|
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
249
|
-
className:
|
|
249
|
+
className: _(ne, q.requiredMark)
|
|
250
250
|
})), /* @__PURE__ */ t.createElement(o.Options, {
|
|
251
|
-
className:
|
|
251
|
+
className: _(ae, w.options, P.options)
|
|
252
252
|
}, /* @__PURE__ */ t.createElement(o.Option, {
|
|
253
|
-
className:
|
|
253
|
+
className: _(q.checkbox, P.option)
|
|
254
254
|
}, /* @__PURE__ */ t.createElement(o.Option.Image, {
|
|
255
255
|
className: P.optionImage
|
|
256
256
|
}), /* @__PURE__ */ t.createElement(o.Option.Label, {
|
|
257
|
-
className:
|
|
257
|
+
className: _(oe, w.optionLabel, P.optionLabel)
|
|
258
258
|
}), /* @__PURE__ */ t.createElement(o.Option.Price, {
|
|
259
|
-
className:
|
|
259
|
+
className: _(re, P.optionPrice)
|
|
260
260
|
}), /* @__PURE__ */ t.createElement(o.Option.Input, {
|
|
261
|
-
className: (a) =>
|
|
261
|
+
className: (a) => _(e(a), P.optionInput)
|
|
262
262
|
}), /* @__PURE__ */ t.createElement(o.Option.Quantity, {
|
|
263
|
-
className:
|
|
263
|
+
className: _(se, q.inputGroup, P.quantity)
|
|
264
264
|
}))), /* @__PURE__ */ t.createElement(o.Error, {
|
|
265
|
-
className:
|
|
265
|
+
className: _(le, q.error)
|
|
266
266
|
}, /* @__PURE__ */ t.createElement(fe, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
267
|
-
className:
|
|
268
|
-
},
|
|
269
|
-
}, Ze = () => /* @__PURE__ */ t.createElement(
|
|
267
|
+
className: _(ie, q.description)
|
|
268
|
+
}, Me));
|
|
269
|
+
}, Ze = () => /* @__PURE__ */ t.createElement(ve, null);
|
|
270
270
|
export {
|
|
271
271
|
Ze as ProductListRAC
|
|
272
272
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import a, { useRef as F, 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 {
|
|
3
|
+
import { bj as g, bg as $, bt as D, bl as x } from "./form-C6lnbh2O.js";
|
|
4
4
|
import { f as d, a as v } 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-Bpe041x2.js";
|
|
6
|
+
import { L as M } from "./field-label-headless-BUuK1Ftv.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), S = (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-C0zCVtjj.js → radio-group-field-rac-BifCDpE4.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
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-ZX12Fyj4.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as r } from "./field-rac.module-DfEb7pBp.js";
|
|
7
|
-
import {
|
|
7
|
+
import { M as i, Y as E, T as p, U as O, G as R, u as _, V as I } from "./form-C6lnbh2O.js";
|
|
8
8
|
import { o as L } from "./options-rac.module-_THNq6Qq.js";
|
|
9
|
-
import { u
|
|
10
|
-
import { u } from "./use-text-input-class-name-
|
|
9
|
+
import { u } from "./use-element-state-class-name-BU6RXqBy.js";
|
|
10
|
+
import { u as N } from "./use-text-input-class-name-BB3V6Q0b.js";
|
|
11
11
|
const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: l
|
|
14
|
-
}),
|
|
15
|
-
const o =
|
|
14
|
+
}), G = () => {
|
|
15
|
+
const o = u({
|
|
16
16
|
globalClasses: I,
|
|
17
17
|
moduleClasses: n
|
|
18
|
-
}), l =
|
|
18
|
+
}), l = N();
|
|
19
19
|
return /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
|
|
20
20
|
className: t(i, r.label)
|
|
21
21
|
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
@@ -31,15 +31,15 @@ const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
31
31
|
}), /* @__PURE__ */ e.createElement(a.Option.Control, {
|
|
32
32
|
className: o
|
|
33
33
|
}), /* @__PURE__ */ e.createElement(a.Option.Label, {
|
|
34
|
-
className: t(
|
|
34
|
+
className: t(O, s.optionLabel)
|
|
35
35
|
}), /* @__PURE__ */ e.createElement(a.Option.OtherInput, {
|
|
36
36
|
className: l
|
|
37
37
|
}))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
38
|
-
className: t(
|
|
38
|
+
className: t(R, r.error)
|
|
39
39
|
}, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
40
40
|
className: t(_, r.description)
|
|
41
41
|
}, D));
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
G as R
|
|
45
45
|
};
|