@wix/form-elements 1.80.0 → 1.81.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-BYisg594.js → appointment-rac-DmwbqZse.js} +82 -82
- package/dist/component/{bookings-address-rac-CsILj67y.js → bookings-address-rac-RCzVU87c.js} +1 -1
- package/dist/component/{bookings-email-rac-CVmAPK_5.js → bookings-email-rac-Df_Wte1_.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Dh41-RQ_.js → bookings-first-name-rac-BmdRGYxF.js} +1 -1
- package/dist/component/{bookings-header-rac-B6Fgfiz5.js → bookings-header-rac-DewQWtkZ.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CuY8aaXv.js → bookings-last-name-rac-DmmNBuqy.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-B8JBcGs8.js → bookings-login-bar-rac-QskvFo0C.js} +5 -5
- package/dist/component/{bookings-phone-rac-Bspc3F7g.js → bookings-phone-rac-7wn8IXna.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-B1o0ZcfK.js → bookings-rich-text-rac-B5nk0BlD.js} +1 -1
- package/dist/component/{checkbox-field-rac-thaR4lXB.js → checkbox-field-rac-BnVNfYWL.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-DryeaW7l.js → checkbox-group-field-headless-Bx5Y-RMP.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CJfbT13O.js → checkbox-group-field-rac-CZW28rj5.js} +7 -7
- package/dist/component/{checkbox-group-rac-BwI7UHzO.js → checkbox-group-rac-B20t8dTB.js} +1 -1
- package/dist/component/{checkbox-rac-HRTKCRY4.js → checkbox-rac-ifC6qSE8.js} +1 -1
- package/dist/component/{contacts-address-rac-BIn9plXb.js → contacts-address-rac-XJRKvPlp.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-oGP8bO3I.js → contacts-birthdate-rac-CKYESrPO.js} +1 -1
- package/dist/component/{contacts-company-rac-ChdjTt8-.js → contacts-company-rac-BXwEeb0p.js} +1 -1
- package/dist/component/{contacts-email-rac-BUluFo-o.js → contacts-email-rac-D8Yspo_m.js} +1 -1
- package/dist/component/{contacts-first-name-rac-tmboINSq.js → contacts-first-name-rac-mvCGP1LJ.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BaD5OBVf.js → contacts-last-name-rac-Clg9RXal.js} +1 -1
- package/dist/component/{contacts-phone-rac-BoX2-IEP.js → contacts-phone-rac-qEwjhByI.js} +1 -1
- package/dist/component/{contacts-position-rac-BNDskehr.js → contacts-position-rac-Bh8fvf2M.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CVaQG4Qy.js → contacts-subscribe-rac-DEQ2XkZo.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-Dxgxcv7c.js → contacts-tax-id-rac-0DUZ4tJz.js} +1 -1
- package/dist/component/{date-availability-BbrBYxgL.js → date-availability-2ek2RtXx.js} +1 -1
- package/dist/component/{date-input-field-rac-oibxt2dz.js → date-input-field-rac-Bp4SQB-t.js} +29 -29
- package/dist/component/{date-input-rac-h2vrPoah.js → date-input-rac-CYsJcMe5.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cr9PMglz.js → date-picker-field-rac-BGQvnSYI.js} +9 -9
- package/dist/component/{date-picker-rac-8BOHRpaJ.js → date-picker-rac-BVncggYR.js} +1 -1
- package/dist/component/{date-time-input-field-rac-C7CZ4i6-.js → date-time-input-field-rac-B1mggelc.js} +33 -33
- package/dist/component/{date-time-input-rac-BARK1BJc.js → date-time-input-rac-DzdCno0L.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CWc0W-zr.js → dext-checkbox-group-rac-CNCpeolD.js} +2 -2
- package/dist/component/{dext-checkbox-rac-NKcTYwpg.js → dext-checkbox-rac-BYDQ58Mo.js} +1 -1
- package/dist/component/{dext-date-picker-rac-SllyCpYt.js → dext-date-picker-rac-aYYk8Nrl.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-JT9Pa7TG.js → dext-date-time-input-rac-v2v974p5.js} +1 -1
- package/dist/component/{dext-dropdown-rac-aBU9t_U4.js → dext-dropdown-rac-C846KZCe.js} +1 -1
- package/dist/component/{dext-email-rac-DKoJiyjE.js → dext-email-rac-izjbfME9.js} +1 -1
- package/dist/component/{dext-number-input-rac-BHkzAyzd.js → dext-number-input-rac-CnOFsD7l.js} +1 -1
- package/dist/component/{dext-phone-rac-Ou-fxcN5.js → dext-phone-rac-D8GMXD88.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CH0WlRsF.js → dext-radio-group-rac-BtiyGCRh.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D_jXx_VN.js → dext-rating-input-rac-BHJ1kitb.js} +1 -1
- package/dist/component/{dext-tags-rac-DBaT-lQT.js → dext-tags-rac-CvNjwS5R.js} +2 -2
- package/dist/component/{dext-text-area-rac-DWcCktYi.js → dext-text-area-rac-X5L0Q3sC.js} +1 -1
- package/dist/component/{dext-text-input-rac-CBX2wgW-.js → dext-text-input-rac-swkyAJqC.js} +1 -1
- package/dist/component/{dext-url-input-rac-DaqWDzIt.js → dext-url-input-rac-BYlXOAkz.js} +1 -1
- package/dist/component/donation-rac-CDWLBZZM.js +318 -0
- package/dist/component/{dropdown-field-headless-D7mOjVEJ.js → dropdown-field-headless-JJzbZvps.js} +3 -3
- package/dist/component/{dropdown-field-rac-DsRuMFo4.js → dropdown-field-rac-BodpIQ9Q.js} +5 -5
- package/dist/component/{dropdown-rac-8Fe66UGi.js → dropdown-rac-Bfbxxx9k.js} +1 -1
- package/dist/component/{ecom-address-rac-DbR_WEgu.js → ecom-address-rac-BCnsL5tr.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-ByQsK79_.js → ecom-subscription-checkbox-rac-CNSdI_ty.js} +3 -3
- package/dist/component/{email-input-field-rac-BS0bFS0-.js → email-input-field-rac-Btaa4O5T.js} +48 -48
- package/dist/component/{events-repeater-rac-xhXarOw_.js → events-repeater-rac-xBwqJddt.js} +10 -10
- package/dist/component/{events-rsvp-rac-BLq-ro2E.js → events-rsvp-rac-D90PwkHd.js} +3 -3
- package/dist/component/{field-error-headless-C7IUibkK.js → field-error-headless-BErhh9GG.js} +1 -1
- package/dist/component/{field-label-headless-BQFy2iAr.js → field-label-headless-BGyK-5xW.js} +1 -1
- package/dist/component/{file-upload-rac-B84R44Bt.js → file-upload-rac-MxH3CVml.js} +21 -21
- package/dist/component/{fixed-payment-rac-D7Asu-Ws.js → fixed-payment-rac-DpBA9irF.js} +10 -10
- package/dist/component/{form-element-classes-BuM-vthE.js → form-element-classes-jC8D0LnK.js} +77 -63
- package/dist/component/{form-BmioUKtQ.js → form-f0tqdMye.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CN5SyZpH.js → header-field-rac-BXxFqu9u.js} +3 -3
- package/dist/component/{header-rac-B9ITu2YO.js → header-rac-BN70esac.js} +1 -1
- package/dist/component/image-choice-rac-DLBGIBXL.js +158 -0
- package/dist/component/{index-3q1aCLZ8.js → index-BvB-uE1H.js} +2 -2
- package/dist/component/{index-CvWMG1x1.js → index-DXLEHYlA.js} +4 -4
- package/dist/component/{isObjectLike-xDv2bEeI.js → isObjectLike-BYOX5XY4.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BLDqei5I.js → multiline-address-field-rac-fcQYnPlO.js} +52 -52
- package/dist/component/{multiline-address-rac-Dy9Km8P8.js → multiline-address-rac-D82Gbj3n.js} +1 -1
- package/dist/component/{number-input-field-rac-Dxu4WHzh.js → number-input-field-rac-B0-4Rz3w.js} +16 -16
- package/dist/component/{number-input-rac-hHEmwPao.js → number-input-rac-Bnsvb-SO.js} +1 -1
- package/dist/component/{password-rac-CEylicEt.js → password-rac-BdBjFa8y.js} +15 -15
- package/dist/component/{payment-input-rac-bvK_YQ78.js → payment-input-rac-DkAGOvaF.js} +18 -18
- package/dist/component/{phone-input-field-rac-CqYNWmiA.js → phone-input-field-rac-Ce_wuE46.js} +54 -54
- package/dist/component/{phone-rac-C72xrPL6.js → phone-rac-DslINtcH.js} +1 -1
- package/dist/component/{product-list-rac-DbftZgIh.js → product-list-rac-C4P_SOyG.js} +25 -25
- package/dist/component/{quiz-radio-group-rac-Bkg5poft.js → quiz-radio-group-rac-noy4fmD8.js} +2 -2
- package/dist/component/{radio-button-module-classes-Do4JmHrh.js → radio-button-module-classes-DXQ1UlmI.js} +3 -3
- package/dist/component/{radio-group-field-rac-BkoqJYp4.js → radio-group-field-rac-CYBDq7R1.js} +5 -5
- package/dist/component/{radio-group-rac-BGp1iRNt.js → radio-group-rac-CGHQFyJY.js} +1 -1
- package/dist/component/{rating-input-field-rac-Bozwq2E7.js → rating-input-field-rac-elaferlI.js} +18 -18
- package/dist/component/{rating-input-rac-Cxha4VPg.js → rating-input-rac-fnOtTKN8.js} +1 -1
- package/dist/component/{rich-content-rac.module-ZXCfVPY-.js → rich-content-rac.module-DbwuwQeo.js} +1 -1
- package/dist/component/{rich-text-field-rac-Ct4KowMZ.js → rich-text-field-rac-DtcQC8zU.js} +3 -3
- package/dist/component/{rich-text-rac-Cek5wjXa.js → rich-text-rac-CuT97sby.js} +1 -1
- package/dist/component/{service-dropdown-rac-B3K93XxF.js → service-dropdown-rac-rk2tzikX.js} +24 -24
- package/dist/component/{services-multi-choice-rac-2RTQqyG6.js → services-multi-choice-rac-BMQyF_xs.js} +7 -7
- package/dist/component/{signature-rac-BIbRkW1j.js → signature-rac-DeV9C6ta.js} +41 -41
- package/dist/component/{submit-button-rac-DofUaqHk.js → submit-button-rac-BpN-FYtM.js} +2 -2
- package/dist/component/tags-field-rac-ByC9DnyH.js +217 -0
- package/dist/component/{tags-rac-DuMX91gd.js → tags-rac-Dabz4jHd.js} +1 -1
- package/dist/component/{text-area-field-rac-BbHdTAJP.js → text-area-field-rac-CtSa8XW_.js} +14 -14
- package/dist/component/{text-area-rac-B9lDzZAb.js → text-area-rac-CDLF-_56.js} +1 -1
- package/dist/component/{text-input-field-rac-B_csZjOh.js → text-input-field-rac-C6fQYKhI.js} +5 -5
- package/dist/component/{text-input-headless-CVOWyi55.js → text-input-headless-BwVLU9cp.js} +3 -3
- package/dist/component/{text-input-rac-DowwSRpa.js → text-input-rac-CoGTzfo1.js} +1 -1
- package/dist/component/{time-input-rac-D9SXITBr.js → time-input-rac-DQDupKTA.js} +17 -17
- package/dist/component/{url-input-field-rac-BxT0Lgly.js → url-input-field-rac-4T8gcMHH.js} +8 -8
- package/dist/component/{url-input-rac-GX9rvIJd.js → url-input-rac-_d6XRdKX.js} +1 -1
- package/dist/component/{use-element-state-class-name-nCwOVSGM.js → use-element-state-class-name-BqmaTba3.js} +1 -1
- package/dist/component/{use-service-options-base-BO3Ackpl.js → use-service-options-base-CRgxxz7b.js} +1 -1
- package/package.json +2 -2
- package/dist/component/donation-rac-D1rcPi17.js +0 -307
- package/dist/component/image-choice-rac-9ncRxwZd.js +0 -146
- package/dist/component/tags-field-rac-DTOthwA5.js +0 -206
package/dist/component/{phone-input-field-rac-CqYNWmiA.js → phone-input-field-rac-Ce_wuE46.js}
RENAMED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { RicosViewer as ye } from "@wix/ricos/viewer";
|
|
2
2
|
import b from "classnames";
|
|
3
|
-
import t, { useMemo as B, useState as V, useRef as
|
|
4
|
-
import { a2 as Ee, as as
|
|
3
|
+
import t, { useMemo as B, useState as V, useRef as v, useEffect as w, useCallback as j, createContext as te, useContext as q } from "react";
|
|
4
|
+
import { a2 as Ee, as as P, ab as ne, ar as fe, ai as M, af as oe, ak as he } from "./form-f0tqdMye.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as ge } from "react-aria";
|
|
6
|
-
import { Dialog as re, OverlayTriggerStateContext as be, ModalOverlay as _e, Modal as Ne, SearchField as Oe, ListBoxItem as Se, Group as Q, DialogTrigger as Le, Select as Ie, Input as ae, ListBox as
|
|
6
|
+
import { Dialog as re, OverlayTriggerStateContext as be, ModalOverlay as _e, Modal as Ne, SearchField as Oe, ListBoxItem as Se, Group as Q, DialogTrigger as Le, Select as Ie, Input as ae, ListBox as ve, Autocomplete as Pe } from "react-aria-components";
|
|
7
7
|
import { f as h, a as ce } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as Fe, E as De } from "./field-error-headless-
|
|
9
|
-
import { L as
|
|
10
|
-
import { N as
|
|
8
|
+
import { D as Fe, E as De } from "./field-error-headless-BErhh9GG.js";
|
|
9
|
+
import { L as xe } from "./field-label-headless-BGyK-5xW.js";
|
|
10
|
+
import { N as Re, S as Be } from "./non-modal-popover-DtIMXHbe.js";
|
|
11
11
|
import { u as Me } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
-
import se, { AsYouType as
|
|
12
|
+
import se, { AsYouType as Ae, isValidPhoneNumber as $e, isSupportedCountry as Te } from "libphonenumber-js";
|
|
13
13
|
import "libphonenumber-js/metadata.min.json";
|
|
14
14
|
import { C as W } from "./calling-country-codes-PyWuOTmF.js";
|
|
15
15
|
import { C as we } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Ue } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as J } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as _ } from "./field-rac.module-ColNPUt0.js";
|
|
19
|
-
import {
|
|
19
|
+
import { y as ke, O as Ve, x as qe, A as Ge, o as He, i as Ye } from "./form-element-classes-jC8D0LnK.js";
|
|
20
20
|
function X(e) {
|
|
21
21
|
const n = e ? se(e) : void 0, r = n == null ? void 0 : n.country;
|
|
22
22
|
if (r)
|
|
23
23
|
return r;
|
|
24
|
-
const o = new
|
|
24
|
+
const o = new Ae();
|
|
25
25
|
return e && o.input(e), o.getCountry();
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function G(e) {
|
|
28
28
|
var n;
|
|
29
29
|
return e && ((n = Ee.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
30
30
|
}
|
|
@@ -35,16 +35,16 @@ function ee(e, n) {
|
|
|
35
35
|
if (e && n)
|
|
36
36
|
try {
|
|
37
37
|
const r = se(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
38
|
-
if (o &&
|
|
38
|
+
if (o && $e(o))
|
|
39
39
|
return o.replace(/\s+/g, "");
|
|
40
40
|
} catch {
|
|
41
41
|
}
|
|
42
42
|
return e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const { t: e } =
|
|
44
|
+
function ze() {
|
|
45
|
+
const { t: e } = P(), { language: n } = ne();
|
|
46
46
|
return B(() => Object.keys(W).reduce((o, a) => {
|
|
47
|
-
const c = W[a], l =
|
|
47
|
+
const c = W[a], l = G(c), u = e(`locale-dataset.countries.${c.toUpperCase()}`);
|
|
48
48
|
return l && Te(a) && o.push({
|
|
49
49
|
countryName: u,
|
|
50
50
|
longCountryCode: c,
|
|
@@ -67,7 +67,7 @@ function k(e, n) {
|
|
|
67
67
|
return e.toLowerCase().includes(n.toLowerCase());
|
|
68
68
|
}
|
|
69
69
|
function je({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange: o }) {
|
|
70
|
-
const [a, c] = V(e || ""), l =
|
|
70
|
+
const [a, c] = V(e || ""), l = v(U(e ?? null) ?? ""), [u, i] = V(n);
|
|
71
71
|
fe(() => {
|
|
72
72
|
c(""), l.current = "", i(n), o("");
|
|
73
73
|
});
|
|
@@ -123,12 +123,12 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
123
123
|
if (!e)
|
|
124
124
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
125
125
|
return e;
|
|
126
|
-
}, ue = /* @__PURE__ */ te(null),
|
|
126
|
+
}, ue = /* @__PURE__ */ te(null), H = () => {
|
|
127
127
|
const e = q(ue);
|
|
128
128
|
if (!e)
|
|
129
129
|
throw new Error("Option sub-components must be used within Option component");
|
|
130
130
|
return e;
|
|
131
|
-
},
|
|
131
|
+
}, Y = ({ longCountryCode: e, className: n }) => {
|
|
132
132
|
function r(c, l) {
|
|
133
133
|
const u = "https://static.parastorage.com/services/linguist-flags/1.1005.0/assets/flags/square/", m = `${c}${l === "2x" ? "_2x" : ""}.png`;
|
|
134
134
|
return `${u}${m}`;
|
|
@@ -144,17 +144,17 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
144
144
|
});
|
|
145
145
|
}, s = ({ children: e }) => {
|
|
146
146
|
var I, L;
|
|
147
|
-
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = M(), [u, i] = V(null), m = (L = (I = l == null ? void 0 : l.string) == null ? void 0 : I.phoneOptions) == null ? void 0 : L.allowedCountryCodes, C =
|
|
147
|
+
const { id: n, value: r, onChange: o, FieldLayout: a, defaultCountry: c, validation: l } = M(), [u, i] = V(null), m = (L = (I = l == null ? void 0 : l.string) == null ? void 0 : I.phoneOptions) == null ? void 0 : L.allowedCountryCodes, C = ze(), p = B(() => Ke(C, m), [
|
|
148
148
|
C,
|
|
149
149
|
m
|
|
150
|
-
]), d = B(() => p.map((
|
|
150
|
+
]), d = B(() => p.map((R) => R.shortCountryCode), [
|
|
151
151
|
p
|
|
152
152
|
]), { currentValue: f, selectedCountryCode: y, handlePhoneChange: O, handleCountryCodeChange: S } = je({
|
|
153
153
|
value: r,
|
|
154
154
|
defaultCountryCode: c,
|
|
155
155
|
allowedCountryCodes: d,
|
|
156
156
|
onChange: o
|
|
157
|
-
}),
|
|
157
|
+
}), $ = h(e, s.Label), F = h(e, s.Control), T = h(e, s.Description), D = h(e, s.Error), x = {
|
|
158
158
|
currentValue: f,
|
|
159
159
|
selectedCountryCode: y,
|
|
160
160
|
handlePhoneChange: O,
|
|
@@ -164,10 +164,10 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
164
164
|
popoverContainer: u
|
|
165
165
|
};
|
|
166
166
|
return /* @__PURE__ */ t.createElement(le.Provider, {
|
|
167
|
-
value:
|
|
167
|
+
value: x
|
|
168
168
|
}, /* @__PURE__ */ t.createElement(a, {
|
|
169
169
|
fieldId: n,
|
|
170
|
-
renderLabel: () =>
|
|
170
|
+
renderLabel: () => $,
|
|
171
171
|
renderInput: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
172
172
|
ref: i,
|
|
173
173
|
style: {
|
|
@@ -176,8 +176,8 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
176
176
|
}), F),
|
|
177
177
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, T)
|
|
178
178
|
}));
|
|
179
|
-
},
|
|
180
|
-
const { inputId: r, labelId: o } = oe(), { hasError: a, disabled: c, readOnly: l } = M(), { t: u } =
|
|
179
|
+
}, z = ({ children: e, className: n }) => {
|
|
180
|
+
const { inputId: r, labelId: o } = oe(), { hasError: a, disabled: c, readOnly: l } = M(), { t: u } = P(), { selectedCountryCode: i, countries: m } = N(), C = `${r}-country`, p = i ? m.find((O) => O.shortCountryCode === i) : void 0, d = p && G(p.longCountryCode) || "", f = u("field.phone.country-code.aria-label"), y = p ? `${f}, ${p.countryName}, ${d}` : f;
|
|
181
181
|
return /* @__PURE__ */ t.createElement(Be, {
|
|
182
182
|
isDisabled: c || l,
|
|
183
183
|
id: C,
|
|
@@ -188,7 +188,7 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
188
188
|
}, e);
|
|
189
189
|
}, Qe = ({ className: e }) => {
|
|
190
190
|
const { selectedCountryCode: n, countries: r } = N(), o = r.find((a) => a.shortCountryCode === n);
|
|
191
|
-
return o ? /* @__PURE__ */ t.createElement(
|
|
191
|
+
return o ? /* @__PURE__ */ t.createElement(Y, {
|
|
192
192
|
className: e,
|
|
193
193
|
longCountryCode: o.longCountryCode
|
|
194
194
|
}) : null;
|
|
@@ -198,13 +198,13 @@ const le = /* @__PURE__ */ te(null), N = () => {
|
|
|
198
198
|
className: n
|
|
199
199
|
}, e);
|
|
200
200
|
};
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
z.Flag = Qe;
|
|
202
|
+
z.EmptyState = We;
|
|
203
203
|
const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a, ...c }) => {
|
|
204
204
|
const { triggerRef: l, optionsRef: u } = c, { popoverContainer: i } = N(), m = h(e, g.Search), C = /* @__PURE__ */ t.createElement(ie, null, e);
|
|
205
205
|
return /* @__PURE__ */ t.createElement(ge, {
|
|
206
206
|
getContainer: () => i
|
|
207
|
-
}, /* @__PURE__ */ t.createElement(
|
|
207
|
+
}, /* @__PURE__ */ t.createElement(Re, {
|
|
208
208
|
ref: u,
|
|
209
209
|
triggerRef: l,
|
|
210
210
|
className: n,
|
|
@@ -237,11 +237,11 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
237
237
|
}
|
|
238
238
|
}, e)))));
|
|
239
239
|
}, ie = ({ children: e, listBoxProps: n }) => {
|
|
240
|
-
const { countries: r } = N(), o = h(e, g.Option), a = h(e, g.Search), c = h(e, g.EmptyState), l = /* @__PURE__ */ t.createElement(
|
|
240
|
+
const { countries: r } = N(), o = h(e, g.Option), a = h(e, g.Search), c = h(e, g.EmptyState), l = /* @__PURE__ */ t.createElement(ve, {
|
|
241
241
|
...n,
|
|
242
242
|
renderEmptyState: c ? () => c : void 0
|
|
243
243
|
}, r.map((u) => {
|
|
244
|
-
const i =
|
|
244
|
+
const i = G(u.longCountryCode) || "";
|
|
245
245
|
return ce(o, {
|
|
246
246
|
key: u.shortCountryCode,
|
|
247
247
|
countryCode: u.shortCountryCode,
|
|
@@ -250,7 +250,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
250
250
|
longCountryCode: u.longCountryCode
|
|
251
251
|
});
|
|
252
252
|
}));
|
|
253
|
-
return a ? /* @__PURE__ */ t.createElement(
|
|
253
|
+
return a ? /* @__PURE__ */ t.createElement(Pe, {
|
|
254
254
|
filter: (u, i, m) => {
|
|
255
255
|
const C = r.find((p) => p.shortCountryCode === m.key);
|
|
256
256
|
return !!C && Ze(C, i);
|
|
@@ -273,7 +273,7 @@ const et = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement("d
|
|
|
273
273
|
className: n
|
|
274
274
|
}, e);
|
|
275
275
|
g.EmptyState = et;
|
|
276
|
-
const
|
|
276
|
+
const A = ({ children: e, className: n, ...r }) => {
|
|
277
277
|
const { countryCode: o, dialingCode: a, countryName: c, longCountryCode: l } = r, u = {
|
|
278
278
|
countryCode: o,
|
|
279
279
|
dialingCode: a,
|
|
@@ -288,28 +288,28 @@ const $ = ({ children: e, className: n, ...r }) => {
|
|
|
288
288
|
value: u
|
|
289
289
|
}, i));
|
|
290
290
|
}, Ce = ({ className: e }) => {
|
|
291
|
-
const { longCountryCode: n } =
|
|
292
|
-
return /* @__PURE__ */ t.createElement(
|
|
291
|
+
const { longCountryCode: n } = H();
|
|
292
|
+
return /* @__PURE__ */ t.createElement(Y, {
|
|
293
293
|
className: e,
|
|
294
294
|
longCountryCode: n
|
|
295
295
|
});
|
|
296
296
|
}, de = ({ className: e }) => {
|
|
297
|
-
const { countryName: n } =
|
|
297
|
+
const { countryName: n } = H();
|
|
298
298
|
return /* @__PURE__ */ t.createElement("span", {
|
|
299
299
|
className: e
|
|
300
300
|
}, n);
|
|
301
301
|
}, pe = ({ className: e }) => {
|
|
302
|
-
const { dialingCode: n } =
|
|
302
|
+
const { dialingCode: n } = H();
|
|
303
303
|
return /* @__PURE__ */ t.createElement("span", {
|
|
304
304
|
className: e
|
|
305
305
|
}, n);
|
|
306
306
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
g.Option =
|
|
307
|
+
A.Flag = Ce;
|
|
308
|
+
A.Name = de;
|
|
309
|
+
A.Code = pe;
|
|
310
|
+
g.Option = A;
|
|
311
311
|
const tt = ({ className: e }) => {
|
|
312
|
-
const { t: n } =
|
|
312
|
+
const { t: n } = P(), { inputId: r, ariaDescribedBy: o } = oe(), { id: a, placeholder: c, disabled: l, readOnly: u, required: i, label: m, hasError: C } = M(), { currentValue: p, handlePhoneChange: d } = N(), f = v(null);
|
|
313
313
|
return he(() => {
|
|
314
314
|
var y;
|
|
315
315
|
(y = f.current) == null || y.focus({
|
|
@@ -331,14 +331,14 @@ const tt = ({ className: e }) => {
|
|
|
331
331
|
className: e
|
|
332
332
|
});
|
|
333
333
|
}, nt = ({ children: e, className: n }) => {
|
|
334
|
-
const r =
|
|
334
|
+
const r = v(null), o = v(null), a = v(!1), { disabled: c, readOnly: l, required: u, hasError: i, showFlag: m, onFocus: C, onBlur: p } = M(), d = Me(p), { t: f } = P(), { selectedCountryCode: y, handleCountryCodeChange: O, countries: S } = N(), $ = h(e, s.CountryButton), F = h(e, s.CountryOptions.Modal), T = F ?? h(e, s.CountryOptions.Popover), D = h(e, s.PhoneNumber), x = {
|
|
335
335
|
onFocus: () => {
|
|
336
336
|
a.current || (a.current = !0, C == null || C());
|
|
337
337
|
},
|
|
338
338
|
onBlur: (L) => {
|
|
339
339
|
var K, Z;
|
|
340
|
-
const
|
|
341
|
-
!((K = r.current) != null && K.contains(
|
|
340
|
+
const R = L.relatedTarget;
|
|
341
|
+
!((K = r.current) != null && K.contains(R)) && !((Z = o.current) != null && Z.contains(R)) && (a.current = !1, d());
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
344
|
if (S.length === 1)
|
|
@@ -347,11 +347,11 @@ const tt = ({ className: e }) => {
|
|
|
347
347
|
className: n,
|
|
348
348
|
isDisabled: c,
|
|
349
349
|
isInvalid: i,
|
|
350
|
-
...
|
|
351
|
-
}, m && /* @__PURE__ */ t.createElement(
|
|
350
|
+
...x
|
|
351
|
+
}, m && /* @__PURE__ */ t.createElement(Y, {
|
|
352
352
|
longCountryCode: S[0].longCountryCode
|
|
353
353
|
}), D);
|
|
354
|
-
const I = /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
354
|
+
const I = /* @__PURE__ */ t.createElement(t.Fragment, null, $, ce(T, {
|
|
355
355
|
triggerRef: r,
|
|
356
356
|
optionsRef: o
|
|
357
357
|
}));
|
|
@@ -360,7 +360,7 @@ const tt = ({ className: e }) => {
|
|
|
360
360
|
className: n,
|
|
361
361
|
isDisabled: c,
|
|
362
362
|
isInvalid: i,
|
|
363
|
-
...
|
|
363
|
+
...x
|
|
364
364
|
}, F ? /* @__PURE__ */ t.createElement(Le, null, I) : /* @__PURE__ */ t.createElement(Ie, {
|
|
365
365
|
"aria-label": f("field.phone.country-code.aria-label"),
|
|
366
366
|
value: y ?? null,
|
|
@@ -371,9 +371,9 @@ const tt = ({ className: e }) => {
|
|
|
371
371
|
placeholder: ""
|
|
372
372
|
}, I), D);
|
|
373
373
|
};
|
|
374
|
-
s.Label =
|
|
374
|
+
s.Label = xe;
|
|
375
375
|
s.Control = nt;
|
|
376
|
-
s.CountryButton =
|
|
376
|
+
s.CountryButton = z;
|
|
377
377
|
s.CountryOptions = g;
|
|
378
378
|
s.PhoneNumber = tt;
|
|
379
379
|
s.Description = Fe;
|
|
@@ -421,7 +421,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
421
421
|
className: E.chevron,
|
|
422
422
|
"aria-hidden": "true"
|
|
423
423
|
}, /* @__PURE__ */ t.createElement(we, null)), Vt = () => {
|
|
424
|
-
const { t: e } =
|
|
424
|
+
const { t: e } = P(), { isMobile: n, PortalContainer: r } = ne(), o = /* @__PURE__ */ t.createElement(s.CountryOptions.Search, {
|
|
425
425
|
className: E.countrySearchContainer,
|
|
426
426
|
"aria-label": e("field.phone.country-search-input.aria-label")
|
|
427
427
|
}, /* @__PURE__ */ t.createElement(rt, {
|
|
@@ -458,14 +458,14 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
458
458
|
portalContainer: r,
|
|
459
459
|
"aria-label": e("field.phone.country-code.aria-label")
|
|
460
460
|
}, o, a, c) : /* @__PURE__ */ t.createElement(s.CountryOptions.Popover, {
|
|
461
|
-
className: b(
|
|
461
|
+
className: b(Ge, _.selectPopover, E.countryOptions),
|
|
462
462
|
placement: "bottom start",
|
|
463
463
|
offset: 0,
|
|
464
464
|
"aria-label": e("field.phone.country-code.aria-label")
|
|
465
465
|
}, o, a, c)), /* @__PURE__ */ t.createElement(s.Error, {
|
|
466
|
-
className: b(
|
|
466
|
+
className: b(He, _.error)
|
|
467
467
|
}, /* @__PURE__ */ t.createElement(Ue, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
468
|
-
className: b(
|
|
468
|
+
className: b(Ye, _.description)
|
|
469
469
|
}, bt));
|
|
470
470
|
};
|
|
471
471
|
export {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as $, useCallback as x, useRef as B } from "react";
|
|
2
|
+
import { RicosViewer as z } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
|
-
import { CheckboxField as
|
|
5
|
-
import { ai as k, af as Y, ab as w, as as Z, ak as ee } from "./form-
|
|
6
|
-
import { f as
|
|
7
|
-
import { L as te, g as ne } from "./field-label-headless-
|
|
4
|
+
import { CheckboxField as G, CheckboxButton as X, NumberField as j, Group as J, Button as U, Input as W } from "react-aria-components";
|
|
5
|
+
import { ai as k, af as Y, ab as w, as as Z, ak as ee } from "./form-f0tqdMye.js";
|
|
6
|
+
import { f as O, a as I } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { L as te, g as ne } from "./field-label-headless-BGyK-5xW.js";
|
|
8
8
|
import { f as ae } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as oe, E as re } from "./field-error-headless-
|
|
9
|
+
import { D as oe, E as re } from "./field-error-headless-BErhh9GG.js";
|
|
10
10
|
import { F as le } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as ie } from "./selection-indicator-XQ8MYHUQ.js";
|
|
13
13
|
import { E as ce } from "./error-icon-hZxQ6DEy.js";
|
|
14
14
|
import { C as ue } from "./checkbox-indicator-module-classes-DqzGZQRQ.js";
|
|
15
15
|
import { s as T } from "./field-rac.module-ColNPUt0.js";
|
|
16
|
-
import {
|
|
16
|
+
import { y as me, O as pe, B as de, E as Ee, D as ye, x as fe, o as _e, i as Ie, C as Oe } from "./form-element-classes-jC8D0LnK.js";
|
|
17
17
|
import { o as Q } from "./options-rac.module-KM-VT_KY.js";
|
|
18
|
-
import { u as
|
|
18
|
+
import { u as be } from "./use-element-state-class-name-BqmaTba3.js";
|
|
19
19
|
var Le = /* @__PURE__ */ (function(e) {
|
|
20
20
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
21
21
|
})({}), M = /* @__PURE__ */ (function(e) {
|
|
@@ -29,14 +29,14 @@ function Ce({ maxItems: e, products: a } = {}) {
|
|
|
29
29
|
}
|
|
30
30
|
const o = ({ children: e }) => {
|
|
31
31
|
var D;
|
|
32
|
-
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur:
|
|
32
|
+
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur: b, onFocus: s, hasError: u, validation: m, FieldLayout: p } = k(), { inputId: q, labelId: N, ariaDescribedBy: h } = Y(), f = O(e, o.Label), g = O(e, o.Options), v = O(e, o.Description), L = O(e, o.Error), i = $(() => l || [], [
|
|
33
33
|
l
|
|
34
34
|
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === M.many, F = x((S, R) => {
|
|
35
|
-
const d = i.filter((
|
|
35
|
+
const d = i.filter((K) => K.productId !== S.productId), H = R ? [
|
|
36
36
|
...d,
|
|
37
37
|
S
|
|
38
38
|
] : d;
|
|
39
|
-
n == null || n(
|
|
39
|
+
n == null || n(H);
|
|
40
40
|
}, [
|
|
41
41
|
i,
|
|
42
42
|
n
|
|
@@ -49,7 +49,7 @@ const o = ({ children: e }) => {
|
|
|
49
49
|
ariaLabelledBy: N,
|
|
50
50
|
ariaDescribedBy: h,
|
|
51
51
|
required: y,
|
|
52
|
-
onBlur:
|
|
52
|
+
onBlur: b,
|
|
53
53
|
onFocus: s
|
|
54
54
|
}, g ? I(g, {
|
|
55
55
|
allowMany: A,
|
|
@@ -62,7 +62,7 @@ const o = ({ children: e }) => {
|
|
|
62
62
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, v)
|
|
63
63
|
});
|
|
64
64
|
}, V = ({ children: e, className: a, ...l }) => {
|
|
65
|
-
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly:
|
|
65
|
+
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: b, hasError: s } = l, { options: u, validation: m, imageResize: p } = k(), { currency: q } = w(), { t: N } = Z(), h = O(e, o.Option);
|
|
66
66
|
return /* @__PURE__ */ t.createElement("div", {
|
|
67
67
|
className: a
|
|
68
68
|
}, u == null ? void 0 : u.map((f, g) => {
|
|
@@ -77,7 +77,7 @@ const o = ({ children: e }) => {
|
|
|
77
77
|
allowMany: n,
|
|
78
78
|
onProductChange: c,
|
|
79
79
|
disabled: y,
|
|
80
|
-
readOnly:
|
|
80
|
+
readOnly: b,
|
|
81
81
|
hasError: s,
|
|
82
82
|
currencyAriaLabel: L,
|
|
83
83
|
imageResize: p,
|
|
@@ -85,7 +85,7 @@ const o = ({ children: e }) => {
|
|
|
85
85
|
});
|
|
86
86
|
}));
|
|
87
87
|
}, E = ({ children: e, className: a, ...l }) => {
|
|
88
|
-
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany:
|
|
88
|
+
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany: b, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: q, imageResize: N, isFirst: h } = l, { id: f } = k(), g = B(null), v = B(null), L = O(e, E.Image), i = O(e, E.Label), C = O(e, E.Price), A = O(e, E.Input), F = O(e, E.Quantity);
|
|
89
89
|
ee(() => {
|
|
90
90
|
var d;
|
|
91
91
|
h && ((d = g.current ?? v.current) == null || d.focus({
|
|
@@ -113,7 +113,7 @@ const o = ({ children: e }) => {
|
|
|
113
113
|
n.value,
|
|
114
114
|
r
|
|
115
115
|
]), R = `${n.label} ${q} ${r}`;
|
|
116
|
-
return
|
|
116
|
+
return b ? /* @__PURE__ */ t.createElement("div", {
|
|
117
117
|
className: a,
|
|
118
118
|
"data-hook": "product"
|
|
119
119
|
}, L ? I(L, {
|
|
@@ -131,7 +131,7 @@ const o = ({ children: e }) => {
|
|
|
131
131
|
hasError: p,
|
|
132
132
|
ariaLabel: R,
|
|
133
133
|
inputRef: h ? v : void 0
|
|
134
|
-
}) : null) : /* @__PURE__ */ t.createElement(
|
|
134
|
+
}) : null) : /* @__PURE__ */ t.createElement(G, {
|
|
135
135
|
isSelected: y,
|
|
136
136
|
onChange: D,
|
|
137
137
|
isDisabled: u,
|
|
@@ -161,11 +161,11 @@ const o = ({ children: e }) => {
|
|
|
161
161
|
const c = n === Le.fit, y = ne(r, 96, 96, c ? "fit" : "fill");
|
|
162
162
|
if (!y)
|
|
163
163
|
return null;
|
|
164
|
-
const
|
|
164
|
+
const b = r.altText || l.label || "";
|
|
165
165
|
return /* @__PURE__ */ t.createElement("img", {
|
|
166
166
|
className: e,
|
|
167
167
|
src: y,
|
|
168
|
-
alt:
|
|
168
|
+
alt: b,
|
|
169
169
|
"data-fit": c ? "contain" : "cover",
|
|
170
170
|
"data-hook": "product-image"
|
|
171
171
|
});
|
|
@@ -186,7 +186,7 @@ const o = ({ children: e }) => {
|
|
|
186
186
|
"data-hook": "product-price"
|
|
187
187
|
}, c);
|
|
188
188
|
}, De = ({ className: e, ...a }) => {
|
|
189
|
-
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel:
|
|
189
|
+
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel: b, inputRef: s } = a, u = x((p) => {
|
|
190
190
|
n(p < 0 ? 0 : p);
|
|
191
191
|
}, [
|
|
192
192
|
n
|
|
@@ -203,7 +203,7 @@ const o = ({ children: e }) => {
|
|
|
203
203
|
isDisabled: r,
|
|
204
204
|
isReadOnly: c,
|
|
205
205
|
isInvalid: y,
|
|
206
|
-
"aria-label":
|
|
206
|
+
"aria-label": b,
|
|
207
207
|
className: e,
|
|
208
208
|
"data-hook": "product-quantity"
|
|
209
209
|
}, /* @__PURE__ */ t.createElement(J, {
|
|
@@ -235,12 +235,12 @@ const Se = "_options_11x4v_1", Pe = "_option_11x4v_1", Ne = "_optionInput_11x4v_
|
|
|
235
235
|
optionLabel: ve,
|
|
236
236
|
optionPrice: Ae,
|
|
237
237
|
quantity: Te
|
|
238
|
-
}, qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(
|
|
238
|
+
}, qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(z, {
|
|
239
239
|
content: e,
|
|
240
240
|
locale: a
|
|
241
241
|
}), xe = () => {
|
|
242
|
-
const e =
|
|
243
|
-
globalClasses:
|
|
242
|
+
const e = be({
|
|
243
|
+
globalClasses: Oe,
|
|
244
244
|
moduleClasses: ue
|
|
245
245
|
});
|
|
246
246
|
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
package/dist/component/{quiz-radio-group-rac-Bkg5poft.js → quiz-radio-group-rac-noy4fmD8.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _ from "react";
|
|
2
|
-
import { R } from "./radio-group-field-rac-
|
|
3
|
-
import {
|
|
2
|
+
import { R } from "./radio-group-field-rac-CYBDq7R1.js";
|
|
3
|
+
import { I as o, H as r, G as O } from "./form-element-classes-jC8D0LnK.js";
|
|
4
4
|
const e = () => /* @__PURE__ */ _.createElement(R, {
|
|
5
5
|
classes: {
|
|
6
6
|
container: O,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import l, { useRef as S, useState as V, useEffect as B, useCallback as T } from "react";
|
|
2
2
|
import { RadioGroup as H, RadioField as k, RadioButton as M, TextField as U, Input as A } from "react-aria-components";
|
|
3
|
-
import { ai as v, af as G, as as F, ab as P, ak as $ } from "./form-
|
|
3
|
+
import { ai as v, af as G, as as F, ab as P, ak as $ } from "./form-f0tqdMye.js";
|
|
4
4
|
import { f as p, a as y } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as q, E as x } from "./field-error-headless-
|
|
6
|
-
import { L as j } from "./field-label-headless-
|
|
5
|
+
import { D as q, E as x } from "./field-error-headless-BErhh9GG.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-BGyK-5xW.js";
|
|
7
7
|
import { N as w } from "./options-layout-constants-DEfIEJWD.js";
|
|
8
8
|
import { S as z } from "./selection-indicator-XQ8MYHUQ.js";
|
|
9
9
|
const L = "Other", J = (e, t) => e == null ? void 0 : e.find((o) => (o.value ?? o.label) === t), R = (e, t) => !!t && !J(e, t), K = (e, t) => {
|
package/dist/component/{radio-group-field-rac-BkoqJYp4.js → radio-group-field-rac-CYBDq7R1.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RicosViewer as n } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { a, s as o, R as m } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s as o, R as m } from "./radio-button-module-classes-DXQ1UlmI.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s } from "./field-rac.module-ColNPUt0.js";
|
|
7
|
-
import {
|
|
8
|
-
import { u as D } from "./use-element-state-class-name-
|
|
7
|
+
import { L as i, K as E, J as _, y as O, O as R, x as p, o as L, i as I } from "./form-element-classes-jC8D0LnK.js";
|
|
8
|
+
import { u as D } from "./use-element-state-class-name-BqmaTba3.js";
|
|
9
9
|
const N = ({ content: r, locale: l }) => /* @__PURE__ */ e.createElement(n, {
|
|
10
10
|
content: r,
|
|
11
11
|
locale: l
|
|
@@ -19,9 +19,9 @@ const N = ({ content: r, locale: l }) => /* @__PURE__ */ e.createElement(n, {
|
|
|
19
19
|
moduleClasses: m
|
|
20
20
|
});
|
|
21
21
|
return /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
|
|
22
|
-
className: t(
|
|
22
|
+
className: t(O, s.label)
|
|
23
23
|
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
24
|
-
className: t(
|
|
24
|
+
className: t(R, s.requiredMark)
|
|
25
25
|
}), /* @__PURE__ */ e.createElement(a.Label.Image, {
|
|
26
26
|
className: o.labelImage
|
|
27
27
|
})), /* @__PURE__ */ e.createElement(a.Options, {
|
package/dist/component/{rating-input-field-rac-Bozwq2E7.js → rating-input-field-rac-elaferlI.js}
RENAMED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as D } from "@wix/ricos/viewer";
|
|
2
2
|
import m from "classnames";
|
|
3
|
-
import e, { useCallback as
|
|
4
|
-
import { ai as b, af as v, as as
|
|
5
|
-
import { RadioGroup as
|
|
6
|
-
import { f as u, a as
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as G } from "./field-label-headless-
|
|
3
|
+
import e, { useCallback as N, useState as O, useRef as A } from "react";
|
|
4
|
+
import { ai as b, af as v, as as M } from "./form-f0tqdMye.js";
|
|
5
|
+
import { RadioGroup as T, RadioField as H, RadioButton as w } from "react-aria-components";
|
|
6
|
+
import { f as u, a as B } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as P, E as q } from "./field-error-headless-BErhh9GG.js";
|
|
8
|
+
import { L as G } from "./field-label-headless-BGyK-5xW.js";
|
|
9
9
|
import { E as k } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as g } from "./field-rac.module-ColNPUt0.js";
|
|
11
|
-
import {
|
|
12
|
-
import { u as J } from "./use-element-state-class-name-
|
|
11
|
+
import { y as x, O as U, M as z, o as Q, i as Z, N as j } from "./form-element-classes-jC8D0LnK.js";
|
|
12
|
+
import { u as J } from "./use-element-state-class-name-BqmaTba3.js";
|
|
13
13
|
const t = ({ children: a }) => {
|
|
14
|
-
const { id: n, value: r, onChange: l, disabled: o, readOnly: d, required: c, hasError: i, onBlur: E, onFocus: C, FieldLayout: R } = b(), { labelId: _ } = v(), L =
|
|
14
|
+
const { id: n, value: r, onChange: l, disabled: o, readOnly: d, required: c, hasError: i, onBlur: E, onFocus: C, FieldLayout: R } = b(), { labelId: _ } = v(), L = N((y) => l(Number(y)), [
|
|
15
15
|
l
|
|
16
16
|
]), f = u(a, t.Label), s = u(a, t.Ratings), S = u(a, t.Description), h = u(a, t.Error);
|
|
17
17
|
return /* @__PURE__ */ e.createElement(R, {
|
|
18
18
|
fieldId: n,
|
|
19
19
|
renderLabel: () => f,
|
|
20
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
20
|
+
renderInput: () => /* @__PURE__ */ e.createElement(T, {
|
|
21
21
|
"aria-labelledby": _,
|
|
22
22
|
value: r ? String(r) : void 0,
|
|
23
23
|
onChange: L,
|
|
@@ -46,7 +46,7 @@ const t = ({ children: a }) => {
|
|
|
46
46
|
className: n,
|
|
47
47
|
"data-invalid": d,
|
|
48
48
|
"data-readonly": o
|
|
49
|
-
}, L.map((s) =>
|
|
49
|
+
}, L.map((s) => B(_, {
|
|
50
50
|
key: s,
|
|
51
51
|
value: s,
|
|
52
52
|
isSelected: f(s),
|
|
@@ -65,7 +65,7 @@ const t = ({ children: a }) => {
|
|
|
65
65
|
whiteSpace: "nowrap"
|
|
66
66
|
}, F = ({ className: a, children: n, ...r }) => {
|
|
67
67
|
const { value: l, isSelected: o, onHoverChange: d, label: c } = r;
|
|
68
|
-
return /* @__PURE__ */ e.createElement(
|
|
68
|
+
return /* @__PURE__ */ e.createElement(H, {
|
|
69
69
|
value: l
|
|
70
70
|
}, /* @__PURE__ */ e.createElement(w, {
|
|
71
71
|
className: ({ isHovered: i }) => typeof a == "function" ? a({
|
|
@@ -85,7 +85,7 @@ I.Rating = F;
|
|
|
85
85
|
t.Label = G;
|
|
86
86
|
t.Ratings = I;
|
|
87
87
|
t.Rating = F;
|
|
88
|
-
t.Description =
|
|
88
|
+
t.Description = P;
|
|
89
89
|
t.Error = q;
|
|
90
90
|
const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
91
91
|
viewBox: "0 0 32 32",
|
|
@@ -102,7 +102,7 @@ const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
102
102
|
rating: Y,
|
|
103
103
|
ratingSelected: $,
|
|
104
104
|
ratingHover: V
|
|
105
|
-
}, ee = ({ content: a, locale: n }) => /* @__PURE__ */ e.createElement(
|
|
105
|
+
}, ee = ({ content: a, locale: n }) => /* @__PURE__ */ e.createElement(D, {
|
|
106
106
|
content: a,
|
|
107
107
|
locale: n
|
|
108
108
|
}), te = {
|
|
@@ -110,16 +110,16 @@ const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
110
110
|
selected: p.ratingSelected,
|
|
111
111
|
hover: p.ratingHover
|
|
112
112
|
}, ge = () => {
|
|
113
|
-
const { t: a } =
|
|
113
|
+
const { t: a } = M(), n = J({
|
|
114
114
|
globalClasses: j,
|
|
115
115
|
moduleClasses: te
|
|
116
116
|
});
|
|
117
117
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
118
118
|
className: m(x, g.label)
|
|
119
119
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
120
|
-
className: m(
|
|
120
|
+
className: m(U, g.requiredMark)
|
|
121
121
|
})), /* @__PURE__ */ e.createElement(t.Ratings, {
|
|
122
|
-
className: m(
|
|
122
|
+
className: m(z, p.ratings),
|
|
123
123
|
getReactionLabel: (r) => a("rating-input.a11y.reaction-label", {
|
|
124
124
|
count: r
|
|
125
125
|
})
|
package/dist/component/{rich-content-rac.module-ZXCfVPY-.js → rich-content-rac.module-DbwuwQeo.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import { ai as a, ab as i, as as T } from "./form-
|
|
2
|
+
import { ai as a, ab as i, as as T } from "./form-f0tqdMye.js";
|
|
3
3
|
import { Button as d } from "react-aria-components";
|
|
4
4
|
import { D as r } from "./data-hooks-Dkw1pbRj.js";
|
|
5
5
|
import { truncateRichContent as _ } from "@wix/ricos/content";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import l from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { ai as m, L as i, W as u, Z as R } from "./form-
|
|
4
|
-
import { u as T, R as C, s as d, T as p } from "./rich-content-rac.module-
|
|
5
|
-
import {
|
|
3
|
+
import { ai as m, L as i, W as u, Z as R } from "./form-f0tqdMye.js";
|
|
4
|
+
import { u as T, R as C, s as d, T as p } from "./rich-content-rac.module-DbwuwQeo.js";
|
|
5
|
+
import { a4 as g } from "./form-element-classes-jC8D0LnK.js";
|
|
6
6
|
const h = {
|
|
7
7
|
colorPalette: R(),
|
|
8
8
|
customStyles: u()
|