@wix/form-elements 1.166.0 → 1.167.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-BXpWILhi.js → appointment-rac-BbXyKTd7.js} +72 -72
- package/dist/component/{bookings-address-rac-Cf--TgsR.js → bookings-address-rac-VJkR_U9L.js} +1 -1
- package/dist/component/{bookings-email-rac-BtB8owOl.js → bookings-email-rac-_EupwXpQ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CBFDjB_k.js → bookings-first-name-rac-DTZixHYj.js} +1 -1
- package/dist/component/{bookings-header-rac-CrJORcuL.js → bookings-header-rac-BKbKTv5g.js} +1 -1
- package/dist/component/{bookings-last-name-rac-erG4ldFt.js → bookings-last-name-rac-BDy860-C.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Di4qLQUH.js → bookings-login-bar-rac-DgNP-YNZ.js} +5 -5
- package/dist/component/{bookings-phone-rac-DdM48Obh.js → bookings-phone-rac-B_I6n96b.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Cl8zOiU1.js → bookings-rich-text-rac-prYPbIiz.js} +1 -1
- package/dist/component/{checkbox-field-rac-CzIDF6aj.js → checkbox-field-rac-C-4PXuxG.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-B8tsQCwV.js → checkbox-group-field-headless-D16bAcaq.js} +35 -35
- package/dist/component/{checkbox-group-field-rac-h02K8CPA.js → checkbox-group-field-rac-GUQ5dO_s.js} +4 -4
- package/dist/component/{checkbox-group-rac-GfebLnuS.js → checkbox-group-rac-Bl6xL5-H.js} +1 -1
- package/dist/component/{checkbox-rac-Dn24U4oG.js → checkbox-rac-Blg0KVyP.js} +1 -1
- package/dist/component/{contacts-address-rac-CtVtIwOV.js → contacts-address-rac-BfOhCAj8.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CK2odpbJ.js → contacts-birthdate-rac-DYBvDh62.js} +1 -1
- package/dist/component/{contacts-company-rac-ue8vAn9A.js → contacts-company-rac-DIJr7zjA.js} +1 -1
- package/dist/component/{contacts-email-rac-lleErjYl.js → contacts-email-rac-DjmqELhC.js} +1 -1
- package/dist/component/{contacts-first-name-rac-D5wtz4Z1.js → contacts-first-name-rac-DGNll7gw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cj9GKWBY.js → contacts-last-name-rac-BJ8AZYQN.js} +1 -1
- package/dist/component/{contacts-phone-rac-BP6unckw.js → contacts-phone-rac-BC-QtpEN.js} +1 -1
- package/dist/component/{contacts-position-rac-XjUdZglr.js → contacts-position-rac-BQia__74.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Dnpbgw5C.js → contacts-subscribe-rac-CTFptz01.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-pNFMOZl6.js → contacts-tax-id-rac-Cy72Jouc.js} +1 -1
- package/dist/component/{date-availability-BRA7k6ep.js → date-availability-BC6updcS.js} +1 -1
- package/dist/component/{date-input-field-rac-B15XH-D_.js → date-input-field-rac-b_T1yf8D.js} +38 -38
- package/dist/component/{date-input-rac-B7XvsFeB.js → date-input-rac-KkRyWRP_.js} +1 -1
- package/dist/component/{date-picker-field-rac-BNgKcgVi.js → date-picker-field-rac-BLWVJbTJ.js} +6 -6
- package/dist/component/{date-picker-rac-P54cHP86.js → date-picker-rac-DKCQza7v.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Dt-jUznP.js → date-time-input-field-rac-CZxZW6fz.js} +45 -45
- package/dist/component/{date-time-input-rac-DHmOLCvg.js → date-time-input-rac-DQ-iBwmr.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Bo2ZRcJc.js → dext-checkbox-group-rac-kp1Jbwt-.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BdA2i9PR.js → dext-checkbox-rac-CBm9cRUz.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BME9ZDFy.js → dext-date-picker-rac-DsVKWsRy.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-owEU8r5-.js → dext-date-time-input-rac-CO26-8Qo.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BAeN43fo.js → dext-dropdown-rac-eRzu2C-y.js} +1 -1
- package/dist/component/{dext-email-rac-D7HBfCis.js → dext-email-rac-DDrZzE_G.js} +1 -1
- package/dist/component/{dext-number-input-rac-DEB2ji5S.js → dext-number-input-rac-Dj7sInLk.js} +1 -1
- package/dist/component/{dext-phone-rac-TOfFCmhD.js → dext-phone-rac-g8M77F7m.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DGsQLres.js → dext-radio-group-rac-BjhygC0R.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CFcRQeE7.js → dext-rating-input-rac-BraNjvyA.js} +1 -1
- package/dist/component/{dext-tags-rac-CGsaKVfb.js → dext-tags-rac-B5mAIuDi.js} +2 -2
- package/dist/component/{dext-text-area-rac-BqbLXOdt.js → dext-text-area-rac-D_YBnaWi.js} +1 -1
- package/dist/component/{dext-text-input-rac-CpXfQV53.js → dext-text-input-rac-BzeWH1jv.js} +1 -1
- package/dist/component/{dext-url-input-rac-Bbm3_OG9.js → dext-url-input-rac-Cn0h_vx3.js} +1 -1
- package/dist/component/{donation-rac-DvBAOz6H.js → donation-rac-CQRdHxWh.js} +46 -46
- package/dist/component/{dropdown-field-rac-BW0UDoBO.js → dropdown-field-rac-C7LL0W5Z.js} +3 -3
- package/dist/component/{dropdown-rac-B6ZD6Qgb.js → dropdown-rac-Nb2VyJ0x.js} +1 -1
- package/dist/component/{ecom-address-rac-Dnv9Yswd.js → ecom-address-rac-_c2YIIwg.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BVqvUwn4.js → ecom-subscription-checkbox-rac-Bma7TAVj.js} +2 -2
- package/dist/component/{email-input-field-rac-CuaMcfZR.js → email-input-field-rac-2E2tEaS5.js} +47 -47
- package/dist/component/events-repeater-rac-COWHYBFD.js +280 -0
- package/dist/component/{events-rsvp-rac-D4hSrIsE.js → events-rsvp-rac-CXp8j19Y.js} +3 -3
- package/dist/component/{field-error-headless-NGaTm3dF.js → field-error-headless-S-ugOQQX.js} +7 -7
- package/dist/component/{field-label-headless-Bx1UjEcp.js → field-label-headless-_n4I0_tX.js} +14 -14
- package/dist/component/{file-upload-rac-oOnemmUg.js → file-upload-rac-DCH_iwDg.js} +79 -79
- package/dist/component/{fixed-payment-rac-C9YkIvQO.js → fixed-payment-rac-CYkKJUfM.js} +14 -14
- package/dist/component/{form-sH9m0ReT.js → form-jK8ezTss.js} +1110 -1109
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-N5Oclne_.js → header-field-rac-DnbjI6W5.js} +6 -6
- package/dist/component/{header-rac-CTmSJdoY.js → header-rac-DKUICrni.js} +1 -1
- package/dist/component/{image-choice-rac-BYZ61yof.js → image-choice-rac-B_9ponST.js} +4 -4
- package/dist/component/{index-B56GTN_5.js → index-BxdMzOvN.js} +68 -68
- package/dist/component/{index-SHZx7XzS.js → index-ZYnsxY-a.js} +2 -2
- package/dist/component/{isObjectLike-BFpR7Q-o.js → isObjectLike-BW-9QEQl.js} +9 -9
- package/dist/component/{multiline-address-field-rac-DvMyN2gF.js → multiline-address-field-rac-k-P0ijWG.js} +40 -40
- package/dist/component/{multiline-address-rac-Cfv0QzzV.js → multiline-address-rac-Bbn9mNDa.js} +1 -1
- package/dist/component/{number-input-field-rac-CWQw7p2k.js → number-input-field-rac--lom-B_X.js} +7 -7
- package/dist/component/{number-input-rac-DJ2Nh9Vm.js → number-input-rac-Bhbd6T9S.js} +1 -1
- package/dist/component/{password-rac-ayoa5FQV.js → password-rac-BV_uTHb3.js} +14 -14
- package/dist/component/{payment-input-rac-CBjP_xjz.js → payment-input-rac-cawyGN_t.js} +28 -28
- package/dist/component/{phone-input-field-rac-BWOEiUK7.js → phone-input-field-rac-CsElHRto.js} +67 -67
- package/dist/component/{phone-rac-Dp7FouV3.js → phone-rac-XrHN5Nko.js} +1 -1
- package/dist/component/{product-list-rac-D_EoPXl-.js → product-list-rac-cxv_xz7K.js} +30 -30
- package/dist/component/{quiz-radio-group-rac-RWM0riuU.js → quiz-radio-group-rac-DGaxOPE1.js} +1 -1
- package/dist/component/{radio-button-module-classes-nK-xhmxh.js → radio-button-module-classes-Xv2Jn01x.js} +21 -21
- package/dist/component/{radio-group-field-rac-Cc-pvwZn.js → radio-group-field-rac-DgGqgTql.js} +4 -4
- package/dist/component/{radio-group-rac-xvesuLSn.js → radio-group-rac-Bh0E-oe1.js} +1 -1
- package/dist/component/{rating-input-field-rac-BgMRUXQy.js → rating-input-field-rac-C3YLV971.js} +10 -10
- package/dist/component/{rating-input-rac-CeZtJR2S.js → rating-input-rac-CfcC5EUh.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv7PIbmM.js → rich-content-rac.module-DUjzLGtX.js} +5 -5
- package/dist/component/{rich-text-field-rac-CmbNBe2u.js → rich-text-field-rac-BmguoJhk.js} +5 -5
- package/dist/component/{rich-text-rac-9hwPCQXl.js → rich-text-rac-BWhHcq25.js} +1 -1
- package/dist/component/{service-dropdown-rac-2Wjgmo75.js → service-dropdown-rac-C5oX-ql7.js} +30 -30
- package/dist/component/{services-multi-choice-rac-cZ7elBhc.js → services-multi-choice-rac-C1fem9NB.js} +12 -12
- package/dist/component/{signature-rac-BfE2328G.js → signature-rac-BtHqiWj1.js} +62 -62
- package/dist/component/{submit-button-rac-oYO7pska.js → submit-button-rac-OYeKJFF8.js} +39 -39
- package/dist/component/{tags-field-rac-B-_LzCFU.js → tags-field-rac-kA2RSijL.js} +37 -37
- package/dist/component/{tags-rac-D5bRM462.js → tags-rac-B_2qCZGu.js} +1 -1
- package/dist/component/{text-area-field-rac-fwtICvjX.js → text-area-field-rac-DeO609Mv.js} +17 -17
- package/dist/component/{text-area-rac-C4EkhfB5.js → text-area-rac-BAQFBOZd.js} +1 -1
- package/dist/component/{text-input-field-rac-CxZYUtxX.js → text-input-field-rac-CCcKwuLZ.js} +3 -3
- package/dist/component/{text-input-headless-DK5wBGBb.js → text-input-headless-D8-jkaYm.js} +8 -8
- package/dist/component/{text-input-rac-FS49SxCK.js → text-input-rac-BVcgjj8g.js} +1 -1
- package/dist/component/{time-input-rac-CDUVS7kp.js → time-input-rac-BYctyHgU.js} +11 -11
- package/dist/component/{url-input-field-rac-B2ypvh7T.js → url-input-field-rac-COC9qgcs.js} +23 -23
- package/dist/component/{url-input-rac-DbJx2T1R.js → url-input-rac-BZXLh0Ej.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-0ZlT4g7h.js → use-dropdown-option-class-name-BTltqRl1.js} +2 -2
- package/dist/component/use-dropdown-trigger-class-name-BjJZfl3i.js +98 -0
- package/dist/component/{use-element-state-class-name-DCAoZgWT.js → use-element-state-class-name-CkT6Ga8t.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BvP8fzTQ.js → use-hoverable-input-class-name-BkoSr6tr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-B-eR29aQ.js → use-is-forced-open-dropdown-fo_NCnSk.js} +1 -1
- package/dist/component/{use-service-options-base-BF_peAsS.js → use-service-options-base-Wp8RZ4Z8.js} +1 -1
- package/dist/component/use-text-input-class-name-DS7i03Gk.js +6 -0
- package/package.json +2 -2
- package/dist/component/events-repeater-rac-CNsh8NRh.js +0 -271
- package/dist/component/use-dropdown-trigger-class-name-PItHRYWo.js +0 -96
- package/dist/component/use-text-input-class-name-CQf8yep5.js +0 -6
package/dist/component/{phone-input-field-rac-BWOEiUK7.js → phone-input-field-rac-CsElHRto.js}
RENAMED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as ye } from "@wix/ricos/viewer";
|
|
2
2
|
import b from "classnames";
|
|
3
|
-
import t, { useMemo as j, useState as A, useRef as F, useEffect as k, useCallback as z, createContext as
|
|
4
|
-
import {
|
|
3
|
+
import t, { useMemo as j, useState as A, useRef as F, useEffect as k, useCallback as z, createContext as ne, useContext as q, useId as Ee } from "react";
|
|
4
|
+
import { bm as fe, bN as D, bv as oe, bM as he, bD as w, bA as re, bF as ge, U as be, af as Oe, Z as Q, K as _e, G as Ne, $ as Le, _ as Se, Y as Ie } from "./form-jK8ezTss.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as Pe } from "react-aria";
|
|
6
|
-
import { Dialog as
|
|
6
|
+
import { Dialog as ae, OverlayTriggerStateContext as ve, ModalOverlay as Fe, Modal as De, SearchField as we, Group as H, ListBoxItem as Be, DialogTrigger as Re, Select as xe, Input as se, 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 $e, E as je } from "./field-error-headless-
|
|
9
|
-
import { L as Ae } from "./field-label-headless-
|
|
8
|
+
import { D as $e, E as je } from "./field-error-headless-S-ugOQQX.js";
|
|
9
|
+
import { L as Ae } from "./field-label-headless-_n4I0_tX.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
|
|
13
|
-
import { V as
|
|
14
|
-
import
|
|
12
|
+
import { b as Ue } from "./use-is-forced-open-dropdown-fo_NCnSk.js";
|
|
13
|
+
import { V as He, a as qe } from "./use-dropdown-option-class-name-BTltqRl1.js";
|
|
14
|
+
import ce, { AsYouType as Ge, isValidPhoneNumber as Ye, isSupportedCountry as Ke } from "libphonenumber-js";
|
|
15
15
|
import "libphonenumber-js/metadata.min.json";
|
|
16
|
-
import { C as
|
|
16
|
+
import { C as W } from "./calling-country-codes-PyWuOTmF.js";
|
|
17
17
|
import { C as Ze } from "./chevron-down-icon-CcpVm6B-.js";
|
|
18
18
|
import { E as ze } from "./error-icon-hZxQ6DEy.js";
|
|
19
|
-
import { H as
|
|
19
|
+
import { H as J } from "./custom-focus-class-_483Pkwp.js";
|
|
20
20
|
import { s as O } from "./field-rac.module-ts2t4WUO.js";
|
|
21
|
-
import { u as
|
|
22
|
-
function
|
|
23
|
-
const n = e ?
|
|
21
|
+
import { u as X } from "./use-hoverable-input-class-name-BkoSr6tr.js";
|
|
22
|
+
function ee(e) {
|
|
23
|
+
const n = e ? ce(e) : void 0, r = n == null ? void 0 : n.country;
|
|
24
24
|
if (r)
|
|
25
25
|
return r;
|
|
26
26
|
const o = new Ge();
|
|
@@ -28,15 +28,15 @@ function X(e) {
|
|
|
28
28
|
}
|
|
29
29
|
function G(e) {
|
|
30
30
|
var n;
|
|
31
|
-
return e && ((n =
|
|
31
|
+
return e && ((n = fe.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
32
32
|
}
|
|
33
33
|
function V(e) {
|
|
34
34
|
return e === null ? null : e.replace(/[^0-9+]/g, "") || e;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function te(e, n) {
|
|
37
37
|
if (e && n)
|
|
38
38
|
try {
|
|
39
|
-
const r =
|
|
39
|
+
const r = ce(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
40
40
|
if (o && Ye(o))
|
|
41
41
|
return o.replace(/\s+/g, "");
|
|
42
42
|
} catch {
|
|
@@ -44,9 +44,9 @@ function ee(e, n) {
|
|
|
44
44
|
return e;
|
|
45
45
|
}
|
|
46
46
|
function Qe() {
|
|
47
|
-
const { t: e } = D(), { language: n } =
|
|
48
|
-
return j(() => Object.keys(
|
|
49
|
-
const c =
|
|
47
|
+
const { t: e } = D(), { language: n } = oe();
|
|
48
|
+
return j(() => Object.keys(W).reduce((o, a) => {
|
|
49
|
+
const c = W[a], l = G(c), i = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
50
50
|
return l && Ke(a) && o.push({
|
|
51
51
|
countryName: i,
|
|
52
52
|
longCountryCode: c,
|
|
@@ -63,17 +63,17 @@ function We(e, n) {
|
|
|
63
63
|
}
|
|
64
64
|
function Je(e, n) {
|
|
65
65
|
const { countryName: r, callingCode: o, shortCountryCode: a } = e;
|
|
66
|
-
return !!(
|
|
66
|
+
return !!(U(r, n) || U(o, n) || U(a, n));
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function U(e, n) {
|
|
69
69
|
return e.toLowerCase().includes(n.toLowerCase());
|
|
70
70
|
}
|
|
71
71
|
function Xe({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange: o }) {
|
|
72
72
|
const [a, c] = A(e || ""), l = F(V(e ?? null) ?? ""), [i, u] = A(n);
|
|
73
|
-
|
|
73
|
+
he(() => {
|
|
74
74
|
c(""), l.current = "", u(n), o("");
|
|
75
75
|
});
|
|
76
|
-
const p = j(() =>
|
|
76
|
+
const p = j(() => ee(a), [
|
|
77
77
|
a
|
|
78
78
|
]);
|
|
79
79
|
k(() => {
|
|
@@ -97,9 +97,9 @@ function Xe({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
97
97
|
l.current = "", o(null);
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
-
const f =
|
|
100
|
+
const f = ee(m);
|
|
101
101
|
u((y) => {
|
|
102
|
-
const S = f || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), N = V(
|
|
102
|
+
const S = f || y || ((r == null ? void 0 : r.length) === 1 ? r[0] : void 0), N = V(te(m, S));
|
|
103
103
|
return l.current = N ?? "", o(N), f || y;
|
|
104
104
|
});
|
|
105
105
|
}, [
|
|
@@ -107,7 +107,7 @@ function Xe({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
107
107
|
o
|
|
108
108
|
]), d = z((m) => {
|
|
109
109
|
u(m), c((f) => {
|
|
110
|
-
const y = V(
|
|
110
|
+
const y = V(te(f, m));
|
|
111
111
|
return l.current = y ?? "", o(y), f;
|
|
112
112
|
});
|
|
113
113
|
}, [
|
|
@@ -120,13 +120,13 @@ function Xe({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
120
120
|
handleCountryCodeChange: d
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
const
|
|
124
|
-
const e = q(
|
|
123
|
+
const le = /* @__PURE__ */ ne(null), _ = () => {
|
|
124
|
+
const e = q(le);
|
|
125
125
|
if (!e)
|
|
126
126
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
127
127
|
return e;
|
|
128
|
-
},
|
|
129
|
-
const e = q(
|
|
128
|
+
}, ue = /* @__PURE__ */ ne(null), Y = () => {
|
|
129
|
+
const e = q(ue);
|
|
130
130
|
if (!e)
|
|
131
131
|
throw new Error("Option sub-components must be used within Option component");
|
|
132
132
|
return e;
|
|
@@ -165,7 +165,7 @@ const ce = /* @__PURE__ */ te(null), _ = () => {
|
|
|
165
165
|
countries: d,
|
|
166
166
|
popoverContainer: i
|
|
167
167
|
};
|
|
168
|
-
return /* @__PURE__ */ t.createElement(
|
|
168
|
+
return /* @__PURE__ */ t.createElement(le.Provider, {
|
|
169
169
|
value: P
|
|
170
170
|
}, /* @__PURE__ */ t.createElement(a, {
|
|
171
171
|
fieldId: n,
|
|
@@ -179,7 +179,7 @@ const ce = /* @__PURE__ */ te(null), _ = () => {
|
|
|
179
179
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, M, x)
|
|
180
180
|
}));
|
|
181
181
|
}, Z = ({ children: e, className: n }) => {
|
|
182
|
-
const { labelId: r } =
|
|
182
|
+
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"), f = C ? `${m}, ${C.countryName}, ${d}` : m;
|
|
183
183
|
return /* @__PURE__ */ t.createElement(ke, {
|
|
184
184
|
isDisabled: a || c,
|
|
185
185
|
id: p,
|
|
@@ -206,7 +206,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
206
206
|
const { triggerRef: l, optionsRef: i, isForcedOpen: u, isOpen: p } = c, { popoverContainer: C } = _(), d = h(e, g.Search);
|
|
207
207
|
if (!p)
|
|
208
208
|
return null;
|
|
209
|
-
const m = /* @__PURE__ */ t.createElement(
|
|
209
|
+
const m = /* @__PURE__ */ t.createElement(ie, {
|
|
210
210
|
isForcedOpen: u
|
|
211
211
|
}, e);
|
|
212
212
|
return /* @__PURE__ */ t.createElement(Pe, {
|
|
@@ -218,7 +218,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
218
218
|
placement: o,
|
|
219
219
|
offset: a,
|
|
220
220
|
containerPadding: 0
|
|
221
|
-
}, d && !u ? /* @__PURE__ */ t.createElement(
|
|
221
|
+
}, d && !u ? /* @__PURE__ */ t.createElement(ae, {
|
|
222
222
|
"aria-label": r
|
|
223
223
|
}, m) : m));
|
|
224
224
|
}, nt = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...c }) => {
|
|
@@ -229,9 +229,9 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
229
229
|
}, /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(De, {
|
|
230
230
|
ref: l,
|
|
231
231
|
className: n
|
|
232
|
-
}, /* @__PURE__ */ t.createElement(
|
|
232
|
+
}, /* @__PURE__ */ t.createElement(ae, {
|
|
233
233
|
"aria-label": o
|
|
234
|
-
}, /* @__PURE__ */ t.createElement(
|
|
234
|
+
}, /* @__PURE__ */ t.createElement(ie, {
|
|
235
235
|
listBoxProps: {
|
|
236
236
|
"aria-label": o,
|
|
237
237
|
selectionMode: "single",
|
|
@@ -244,8 +244,8 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
}, e)))));
|
|
247
|
-
},
|
|
248
|
-
const { countries: o } = _(), a = h(e, g.Option), c = h(e, g.Search), l = h(e, g.EmptyState), i = /* @__PURE__ */ t.createElement(
|
|
247
|
+
}, ie = ({ children: e, listBoxProps: n, isForcedOpen: r }) => {
|
|
248
|
+
const { countries: o } = _(), a = h(e, g.Option), c = h(e, g.Search), l = h(e, g.EmptyState), i = /* @__PURE__ */ t.createElement(He, {
|
|
249
249
|
isForcedOpen: r === !0,
|
|
250
250
|
...n,
|
|
251
251
|
renderEmptyState: l ? () => l : void 0
|
|
@@ -270,20 +270,20 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
270
270
|
};
|
|
271
271
|
g.Popover = g;
|
|
272
272
|
g.Modal = nt;
|
|
273
|
-
const
|
|
273
|
+
const me = ({ className: e, children: n, "aria-label": r, ...o }) => {
|
|
274
274
|
const { autoFocus: a = !0 } = o;
|
|
275
275
|
return /* @__PURE__ */ t.createElement(we, {
|
|
276
276
|
"aria-label": r,
|
|
277
277
|
autoFocus: a
|
|
278
|
-
}, /* @__PURE__ */ t.createElement(
|
|
278
|
+
}, /* @__PURE__ */ t.createElement(H, {
|
|
279
279
|
className: e
|
|
280
280
|
}, n));
|
|
281
|
-
}, ot = ({ className: e, placeholder: n }) => /* @__PURE__ */ t.createElement(
|
|
281
|
+
}, ot = ({ className: e, placeholder: n }) => /* @__PURE__ */ t.createElement(se, {
|
|
282
282
|
className: e,
|
|
283
283
|
placeholder: n
|
|
284
284
|
});
|
|
285
|
-
|
|
286
|
-
g.Search =
|
|
285
|
+
me.Input = ot;
|
|
286
|
+
g.Search = me;
|
|
287
287
|
const rt = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement("div", {
|
|
288
288
|
className: n
|
|
289
289
|
}, e);
|
|
@@ -294,43 +294,43 @@ const T = ({ children: e, className: n, ...r }) => {
|
|
|
294
294
|
dialingCode: a,
|
|
295
295
|
countryName: c,
|
|
296
296
|
longCountryCode: l
|
|
297
|
-
}, u = e || /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
297
|
+
}, u = e || /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(pe, null), /* @__PURE__ */ t.createElement(Ce, null), /* @__PURE__ */ t.createElement(de, null));
|
|
298
298
|
return /* @__PURE__ */ t.createElement(Be, {
|
|
299
299
|
className: n,
|
|
300
300
|
id: o,
|
|
301
301
|
textValue: `${c} ${a}`
|
|
302
|
-
}, /* @__PURE__ */ t.createElement(
|
|
302
|
+
}, /* @__PURE__ */ t.createElement(ue.Provider, {
|
|
303
303
|
value: i
|
|
304
304
|
}, u));
|
|
305
|
-
},
|
|
305
|
+
}, pe = ({ className: e }) => {
|
|
306
306
|
const { longCountryCode: n } = Y();
|
|
307
307
|
return /* @__PURE__ */ t.createElement(K, {
|
|
308
308
|
className: e,
|
|
309
309
|
longCountryCode: n
|
|
310
310
|
});
|
|
311
|
-
},
|
|
311
|
+
}, Ce = ({ className: e }) => {
|
|
312
312
|
const { countryName: n } = Y();
|
|
313
313
|
return /* @__PURE__ */ t.createElement("span", {
|
|
314
314
|
className: e
|
|
315
315
|
}, n);
|
|
316
|
-
},
|
|
316
|
+
}, de = ({ className: e }) => {
|
|
317
317
|
const { dialingCode: n } = Y();
|
|
318
318
|
return /* @__PURE__ */ t.createElement("span", {
|
|
319
319
|
className: e
|
|
320
320
|
}, n);
|
|
321
321
|
};
|
|
322
|
-
T.Flag =
|
|
323
|
-
T.Name =
|
|
324
|
-
T.Code =
|
|
322
|
+
T.Flag = pe;
|
|
323
|
+
T.Name = Ce;
|
|
324
|
+
T.Code = de;
|
|
325
325
|
g.Option = T;
|
|
326
326
|
const at = ({ className: e }) => {
|
|
327
|
-
const { t: n } = D(), { inputId: r, ariaDescribedBy: o } =
|
|
328
|
-
return
|
|
327
|
+
const { t: n } = D(), { inputId: r, ariaDescribedBy: o } = re(), { id: a, placeholder: c, disabled: l, readOnly: i, required: u, label: p, hasError: C } = w(), { currentValue: d, handlePhoneChange: m } = _(), f = F(null);
|
|
328
|
+
return ge(() => {
|
|
329
329
|
var y;
|
|
330
330
|
(y = f.current) == null || y.focus({
|
|
331
331
|
preventScroll: !0
|
|
332
332
|
});
|
|
333
|
-
}, a), /* @__PURE__ */ t.createElement(
|
|
333
|
+
}, a), /* @__PURE__ */ t.createElement(se, {
|
|
334
334
|
ref: f,
|
|
335
335
|
id: r,
|
|
336
336
|
type: "tel",
|
|
@@ -367,7 +367,7 @@ const at = ({ className: e }) => {
|
|
|
367
367
|
const r = n;
|
|
368
368
|
return /* @__PURE__ */ t.createElement(Re, null, h(e, s.CountryButton), I(h(e, s.CountryOptions.Modal), r));
|
|
369
369
|
}, lt = ({ children: e, className: n }) => {
|
|
370
|
-
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: p, onBlur: C } = w(), d = Ve(C), { countries: m } = _(), f = h(e, s.CountryDrawer), y = h(e, s.CountryPopover), S = h(e, s.PhoneNumber), N = m.length > 1, B =
|
|
370
|
+
const r = F(null), o = F(null), a = F(!1), { id: c, disabled: l, hasError: i, showFlag: u, onFocus: p, onBlur: C } = w(), d = Ve(C), { countries: m } = _(), f = h(e, s.CountryDrawer), y = h(e, s.CountryPopover), S = h(e, s.PhoneNumber), N = m.length > 1, B = Ue(c) && !!y && N, R = typeof n == "function" ? ({ isHovered: P, isFocusWithin: L }) => n({
|
|
371
371
|
hasCountryOptions: N,
|
|
372
372
|
isHovered: P,
|
|
373
373
|
isFocusWithin: L
|
|
@@ -385,7 +385,7 @@ const at = ({ className: e }) => {
|
|
|
385
385
|
!((v = r.current) != null && v.contains(L)) && !(($ = o.current) != null && $.contains(L)) && (a.current = !1, d());
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
-
return m.length === 1 ? /* @__PURE__ */ t.createElement(
|
|
388
|
+
return m.length === 1 ? /* @__PURE__ */ t.createElement(H, {
|
|
389
389
|
ref: r,
|
|
390
390
|
className: R,
|
|
391
391
|
isDisabled: l,
|
|
@@ -393,7 +393,7 @@ const at = ({ className: e }) => {
|
|
|
393
393
|
...M
|
|
394
394
|
}, u && /* @__PURE__ */ t.createElement(K, {
|
|
395
395
|
longCountryCode: m[0].longCountryCode
|
|
396
|
-
}), S) : /* @__PURE__ */ t.createElement(
|
|
396
|
+
}), S) : /* @__PURE__ */ t.createElement(H, {
|
|
397
397
|
ref: r,
|
|
398
398
|
className: R,
|
|
399
399
|
isDisabled: l,
|
|
@@ -447,24 +447,24 @@ const ut = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
447
447
|
name: Lt,
|
|
448
448
|
code: St,
|
|
449
449
|
mobileOverlay: It
|
|
450
|
-
}, Pt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(
|
|
450
|
+
}, Pt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(ye, {
|
|
451
451
|
content: e,
|
|
452
452
|
locale: n
|
|
453
453
|
}), vt = () => /* @__PURE__ */ t.createElement("span", {
|
|
454
454
|
className: E.chevron,
|
|
455
455
|
"aria-hidden": "true"
|
|
456
456
|
}, /* @__PURE__ */ t.createElement(Ze, null)), Qt = () => {
|
|
457
|
-
const e = qe(Se, O.selectOptionWithoutFocusRing, E.option,
|
|
457
|
+
const e = qe(Se, O.selectOptionWithoutFocusRing, E.option, J), n = X(Ie, [
|
|
458
458
|
E.control
|
|
459
|
-
]), r =
|
|
459
|
+
]), r = X(Le, [
|
|
460
460
|
E.countrySearch
|
|
461
|
-
]), { t: o } = D(), { PortalContainer: a } =
|
|
461
|
+
]), { t: o } = D(), { PortalContainer: a } = oe(), c = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
462
462
|
className: r,
|
|
463
463
|
"aria-label": o("field.phone.country-search-input.aria-label")
|
|
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, J),
|
|
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
|
|
@@ -480,22 +480,22 @@ const ut = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
480
480
|
className: E.code
|
|
481
481
|
}));
|
|
482
482
|
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
483
|
-
className: b(
|
|
483
|
+
className: b(be, O.label)
|
|
484
484
|
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
485
|
-
className: b(
|
|
485
|
+
className: b(Oe, O.requiredMark)
|
|
486
486
|
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
487
487
|
className: ({ hasCountryOptions: p, ...C }) => n(C)
|
|
488
488
|
}, /* @__PURE__ */ t.createElement(s.CountryDrawer, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
489
489
|
className: b(E.countryButton, E.drawerButton)
|
|
490
490
|
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Modal, {
|
|
491
|
-
className: b(O.selectPopover, E.mobileDrawer),
|
|
491
|
+
className: b(Q, O.selectPopover, E.mobileDrawer),
|
|
492
492
|
overlayClassName: E.mobileOverlay,
|
|
493
493
|
portalContainer: a,
|
|
494
494
|
"aria-label": o("field.phone.country-code.aria-label")
|
|
495
495
|
}, c, l, u)), /* @__PURE__ */ t.createElement(s.CountryPopover, null, /* @__PURE__ */ t.createElement(s.CountryButton, {
|
|
496
496
|
className: b(E.countryButton, E.popoverButton)
|
|
497
497
|
}, i), /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
|
|
498
|
-
className: b(
|
|
498
|
+
className: b(Q, O.selectPopover, E.countryOptions),
|
|
499
499
|
placement: "bottom start",
|
|
500
500
|
offset: 0,
|
|
501
501
|
"aria-label": o("field.phone.country-code.aria-label")
|
|
@@ -1,20 +1,20 @@
|
|
|
1
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
|
-
import
|
|
3
|
+
import f from "classnames";
|
|
4
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 {
|
|
6
|
-
import { f as I, a as
|
|
7
|
-
import { L as ue, g as me } from "./field-label-headless-
|
|
5
|
+
import { bD as U, bA as W, bv as w, bN as Z, bF as ee, U as te, af 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-jK8ezTss.js";
|
|
6
|
+
import { f as I, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { L as ue, g as me } from "./field-label-headless-_n4I0_tX.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-S-ugOQQX.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
|
-
import { S as
|
|
13
|
-
import { E as
|
|
12
|
+
import { S as fe } from "./selection-indicator-XQ8MYHUQ.js";
|
|
13
|
+
import { E as be } from "./error-icon-hZxQ6DEy.js";
|
|
14
14
|
import { C as Ie } from "./checkbox-indicator-module-classes-DUTR4mcg.js";
|
|
15
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-CkT6Ga8t.js";
|
|
18
18
|
var Le = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), k = /* @__PURE__ */ (function(e) {
|
|
@@ -50,7 +50,7 @@ const o = ({ children: e }) => {
|
|
|
50
50
|
required: y,
|
|
51
51
|
onBlur: O,
|
|
52
52
|
onFocus: s
|
|
53
|
-
}, g ?
|
|
53
|
+
}, g ? b(g, {
|
|
54
54
|
allowMany: T,
|
|
55
55
|
productValues: i,
|
|
56
56
|
onProductChange: F,
|
|
@@ -67,7 +67,7 @@ const o = ({ children: e }) => {
|
|
|
67
67
|
}, u == null ? void 0 : u.map((_, g) => {
|
|
68
68
|
var C, T, F, D, S;
|
|
69
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
|
-
return
|
|
70
|
+
return b(h, {
|
|
71
71
|
key: _.id || _.value || _.label,
|
|
72
72
|
option: _,
|
|
73
73
|
price: A,
|
|
@@ -115,14 +115,14 @@ const o = ({ children: e }) => {
|
|
|
115
115
|
return O ? /* @__PURE__ */ t.createElement("div", {
|
|
116
116
|
className: a,
|
|
117
117
|
"data-hook": "product"
|
|
118
|
-
}, L ?
|
|
118
|
+
}, L ? b(L, {
|
|
119
119
|
option: n,
|
|
120
120
|
imageResize: N
|
|
121
|
-
}) : null, i ?
|
|
121
|
+
}) : null, i ? b(i, {
|
|
122
122
|
label: n.label
|
|
123
|
-
}) : null, C ?
|
|
123
|
+
}) : null, C ? b(C, {
|
|
124
124
|
price: r
|
|
125
|
-
}) : null, F ?
|
|
125
|
+
}) : null, F ? b(F, {
|
|
126
126
|
quantity: c,
|
|
127
127
|
onQuantityChange: S,
|
|
128
128
|
disabled: u,
|
|
@@ -141,14 +141,14 @@ 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, L ?
|
|
144
|
+
}, ({ isHovered: d, isFocused: B }) => /* @__PURE__ */ t.createElement(t.Fragment, null, L ? b(L, {
|
|
145
145
|
option: n,
|
|
146
146
|
imageResize: N
|
|
147
|
-
}) : null, i ?
|
|
147
|
+
}) : null, i ? b(i, {
|
|
148
148
|
label: n.label
|
|
149
|
-
}) : null, C ?
|
|
149
|
+
}) : null, C ? b(C, {
|
|
150
150
|
price: r
|
|
151
|
-
}) : null,
|
|
151
|
+
}) : null, b(T, {
|
|
152
152
|
isSelected: y,
|
|
153
153
|
isHovered: d,
|
|
154
154
|
isFocused: B
|
|
@@ -219,7 +219,7 @@ 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 = fe;
|
|
223
223
|
E.Quantity = De;
|
|
224
224
|
V.Option = E;
|
|
225
225
|
o.Label = ue;
|
|
@@ -244,27 +244,27 @@ const Se = "_options_1jnru_1", Pe = "_option_1jnru_1", Ne = "_optionInput_1jnru_
|
|
|
244
244
|
moduleClasses: Ie
|
|
245
245
|
});
|
|
246
246
|
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
247
|
-
className:
|
|
247
|
+
className: f(te, q.label)
|
|
248
248
|
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
249
|
-
className:
|
|
249
|
+
className: f(ne, q.requiredMark)
|
|
250
250
|
})), /* @__PURE__ */ t.createElement(o.Options, {
|
|
251
|
-
className:
|
|
251
|
+
className: f(ae, j.options, P.options)
|
|
252
252
|
}, /* @__PURE__ */ t.createElement(o.Option, {
|
|
253
|
-
className:
|
|
253
|
+
className: f(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: f(oe, j.optionLabel, P.optionLabel)
|
|
258
258
|
}), /* @__PURE__ */ t.createElement(o.Option.Price, {
|
|
259
|
-
className:
|
|
259
|
+
className: f(re, P.optionPrice)
|
|
260
260
|
}), /* @__PURE__ */ t.createElement(o.Option.Input, {
|
|
261
|
-
className: (a) =>
|
|
261
|
+
className: (a) => f(e(a), P.optionInput)
|
|
262
262
|
}), /* @__PURE__ */ t.createElement(o.Option.Quantity, {
|
|
263
|
-
className:
|
|
263
|
+
className: f(le, q.inputGroup, P.quantity)
|
|
264
264
|
}))), /* @__PURE__ */ t.createElement(o.Error, {
|
|
265
|
-
className:
|
|
266
|
-
}, /* @__PURE__ */ t.createElement(
|
|
267
|
-
className:
|
|
265
|
+
className: f(se, q.error)
|
|
266
|
+
}, /* @__PURE__ */ t.createElement(be, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
267
|
+
className: f(ie, q.description)
|
|
268
268
|
}, ve));
|
|
269
269
|
}, Ze = () => /* @__PURE__ */ t.createElement(Me, null);
|
|
270
270
|
export {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import a, { useRef as F, useState as T, useEffect as B, useCallback as H } from "react";
|
|
2
2
|
import { RadioGroup as A, RadioField as k, RadioButton as G, TextField as P, Input as $ } from "react-aria-components";
|
|
3
|
-
import {
|
|
3
|
+
import { bD as g, bA as q, bN as D, bF as x } from "./form-jK8ezTss.js";
|
|
4
4
|
import { f as u, a as L } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as M } from "./field-error-headless-
|
|
6
|
-
import { L as j } from "./field-label-headless-
|
|
5
|
+
import { D as U, E as M } from "./field-error-headless-S-ugOQQX.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-_n4I0_tX.js";
|
|
7
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),
|
|
8
|
+
const v = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), y = (e, t) => !!t && !z(e, t), J = (e, t) => {
|
|
9
9
|
const l = t ? t.length + 2 : 0;
|
|
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: C, ariaDescribedBy:
|
|
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 } = q(), s = u(e, i.Label), _ = u(e, i.Options), R = u(e, i.Description), N = u(e, i.Error), V = y(o, l) ? v : l || null;
|
|
13
13
|
return /* @__PURE__ */ a.createElement(c, {
|
|
14
14
|
fieldId: n,
|
|
15
15
|
renderLabel: () => L(s, {
|
|
@@ -19,7 +19,7 @@ const v = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
19
19
|
id: f,
|
|
20
20
|
className: t,
|
|
21
21
|
"aria-labelledby": C,
|
|
22
|
-
"aria-describedby":
|
|
22
|
+
"aria-describedby": I,
|
|
23
23
|
value: V,
|
|
24
24
|
onChange: h,
|
|
25
25
|
isDisabled: p,
|
|
@@ -28,7 +28,7 @@ const v = "Other", z = (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
|
+
}, _),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ a.createElement(a.Fragment, null, N, R)
|
|
33
33
|
});
|
|
34
34
|
}, K = ({ children: e, className: t }) => {
|
|
@@ -55,8 +55,8 @@ const v = "Other", z = (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 I;
|
|
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 ? y(E, m) : m === l, C = (I = r == null ? void 0 : r.props) == null ? void 0 : I.className;
|
|
60
60
|
return /* @__PURE__ */ a.createElement("div", {
|
|
61
61
|
className: t
|
|
62
62
|
}, /* @__PURE__ */ a.createElement(k, {
|
|
@@ -64,9 +64,9 @@ const v = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
64
64
|
}, /* @__PURE__ */ a.createElement(G, {
|
|
65
65
|
ref: O,
|
|
66
66
|
className: C
|
|
67
|
-
}, ({ isSelected: s, isHovered:
|
|
67
|
+
}, ({ isSelected: s, isHovered: _, isFocused: R }) => /* @__PURE__ */ a.createElement(a.Fragment, null, L(c, {
|
|
68
68
|
isSelected: s,
|
|
69
|
-
isHovered:
|
|
69
|
+
isHovered: _,
|
|
70
70
|
isFocused: R
|
|
71
71
|
}), L(b, {
|
|
72
72
|
label: h
|
|
@@ -77,16 +77,16 @@ const v = "Other", z = (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 = y(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 I = H((s) => {
|
|
88
|
+
let _;
|
|
89
|
+
s ? _ = `${l}: ${s}` : _ = o, n(_), C(s);
|
|
90
90
|
}, [
|
|
91
91
|
n,
|
|
92
92
|
l,
|
|
@@ -95,7 +95,7 @@ const v = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
95
95
|
return /* @__PURE__ */ a.createElement(P, {
|
|
96
96
|
"aria-label": o,
|
|
97
97
|
value: f,
|
|
98
|
-
onChange:
|
|
98
|
+
onChange: I,
|
|
99
99
|
isDisabled: O,
|
|
100
100
|
isReadOnly: m
|
|
101
101
|
}, /* @__PURE__ */ a.createElement($, {
|
|
@@ -114,7 +114,7 @@ i.Options = K;
|
|
|
114
114
|
i.Option = d;
|
|
115
115
|
i.Description = U;
|
|
116
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",
|
|
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", S = {
|
|
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: S.optionControl,
|
|
127
|
+
selected: S.optionControlSelected,
|
|
128
|
+
hover: S.optionControlHover
|
|
129
129
|
};
|
|
130
130
|
export {
|
|
131
131
|
pe as R,
|
|
132
132
|
i as a,
|
|
133
|
-
|
|
133
|
+
S as s
|
|
134
134
|
};
|
package/dist/component/{radio-group-field-rac-Cc-pvwZn.js → radio-group-field-rac-DgGqgTql.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-Xv2Jn01x.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as r } from "./field-rac.module-ts2t4WUO.js";
|
|
7
|
-
import { U as i,
|
|
7
|
+
import { U as i, af as E, a5 as p, a6 as O, K as R, G as _, a7 as I } from "./form-jK8ezTss.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-CkT6Ga8t.js";
|
|
10
|
+
import { u } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
11
11
|
const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: l
|