@wix/form-elements 1.70.0 → 1.72.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-CrzIERuK.js → appointment-rac-CvecMhTP.js} +4 -4
- package/dist/component/{bookings-address-rac-Dfkpd7m-.js → bookings-address-rac-Bzh6N9eV.js} +1 -1
- package/dist/component/{bookings-email-rac-qQ7bgngn.js → bookings-email-rac-kh4HZ9zW.js} +1 -1
- package/dist/component/{bookings-first-name-rac-plgTTOzk.js → bookings-first-name-rac-DIe5Nxtm.js} +1 -1
- package/dist/component/{bookings-header-rac-B3LjHXJs.js → bookings-header-rac-CcZrhPWt.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DwDrEmTT.js → bookings-last-name-rac-DynAXyOh.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-EGRy_-2H.js → bookings-login-bar-rac-CiAreT-B.js} +1 -1
- package/dist/component/{bookings-phone-rac-BgViVOU-.js → bookings-phone-rac-Be7XP3CC.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CDwCdPHa.js → bookings-rich-text-rac-CsOSjxCm.js} +1 -1
- package/dist/component/{checkbox-field-rac-wF2nX9PW.js → checkbox-field-rac-YmbfJMcm.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-jNzvn7tN.js → checkbox-group-field-headless-DnI-niUS.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-6PaMjzeg.js → checkbox-group-field-rac-Cbv9r_IR.js} +20 -19
- package/dist/component/{checkbox-group-rac-BV9-hfo0.js → checkbox-group-rac-6W04r6Nz.js} +1 -1
- package/dist/component/{checkbox-rac-BbKD6UEX.js → checkbox-rac-Dv96xsq2.js} +1 -1
- package/dist/component/{contacts-address-rac-pDLwXVYR.js → contacts-address-rac-BQSEdyVn.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BJx3BjlB.js → contacts-birthdate-rac-CNZp5aiS.js} +1 -1
- package/dist/component/{contacts-company-rac-DyKNlrhE.js → contacts-company-rac-BwY-2pG_.js} +1 -1
- package/dist/component/{contacts-email-rac-DmYj37_A.js → contacts-email-rac-CX9LDVtk.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DeyEyMG0.js → contacts-first-name-rac-CXzh7vHC.js} +1 -1
- package/dist/component/{contacts-last-name-rac-SwBI_L_7.js → contacts-last-name-rac-y93LJlBv.js} +1 -1
- package/dist/component/{contacts-phone-rac-BRDIz_ya.js → contacts-phone-rac-zO2Y3fGa.js} +1 -1
- package/dist/component/{contacts-position-rac-DDfta8r4.js → contacts-position-rac-y7Nd4s6j.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Bx6b16b3.js → contacts-subscribe-rac-D5usboPe.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-DICtcCkJ.js → contacts-tax-id-rac-DT42qK_C.js} +1 -1
- package/dist/component/{date-availability-DM6KcDU2.js → date-availability-BUg7fwNs.js} +1 -1
- package/dist/component/{date-input-field-rac-F_DfMOXT.js → date-input-field-rac-97DJQbSL.js} +4 -4
- package/dist/component/{date-input-rac-Ho7shG41.js → date-input-rac-BTetYZVn.js} +1 -1
- package/dist/component/{date-picker-field-rac-BEXQ7hyT.js → date-picker-field-rac-BOzUTQ53.js} +5 -5
- package/dist/component/{date-picker-rac-C32DD1bT.js → date-picker-rac-Cz8QZr18.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BVbgkFtL.js → date-time-input-field-rac-Cx4a-dzv.js} +4 -4
- package/dist/component/{date-time-input-rac-DB4xpq5h.js → date-time-input-rac-BlSvC4v4.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-C2s4IBgt.js → dext-checkbox-group-rac-ijVB8NX2.js} +2 -2
- package/dist/component/{dext-checkbox-rac-NyBGiLzP.js → dext-checkbox-rac-0F6rTc_y.js} +1 -1
- package/dist/component/{dext-date-picker-rac-JKcEE1fQ.js → dext-date-picker-rac-vjt7d8gT.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DtamPz-x.js → dext-date-time-input-rac-CpJz0KtU.js} +1 -1
- package/dist/component/{dext-dropdown-rac-194Qq0or.js → dext-dropdown-rac-yUJT-sKU.js} +1 -1
- package/dist/component/{dext-email-rac-Chwg6ePI.js → dext-email-rac-D1K34PtX.js} +1 -1
- package/dist/component/{dext-number-input-rac-DORye-Si.js → dext-number-input-rac-D-7zudVq.js} +1 -1
- package/dist/component/{dext-phone-rac-jykmsttk.js → dext-phone-rac-B4HebC40.js} +1 -1
- package/dist/component/{dext-radio-group-rac-MvkExS4d.js → dext-radio-group-rac-DWL6wrD6.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DUsqZg7A.js → dext-rating-input-rac-p_FwVz4F.js} +1 -1
- package/dist/component/{dext-tags-rac-DnMlv2wO.js → dext-tags-rac-DNZ06TfG.js} +2 -2
- package/dist/component/{dext-text-area-rac-DGMWNaah.js → dext-text-area-rac-D9Ra_RXC.js} +1 -1
- package/dist/component/{dext-text-input-rac-Cv0NkJrp.js → dext-text-input-rac-gms4VXn_.js} +1 -1
- package/dist/component/{dext-url-input-rac-DpMC8935.js → dext-url-input-rac-CDZnjVL0.js} +1 -1
- package/dist/component/donation-rac-BPy2Dkj_.js +308 -0
- package/dist/component/{dropdown-field-headless-C_-tm9VD.js → dropdown-field-headless-CiK1C6eu.js} +3 -3
- package/dist/component/{dropdown-field-rac-DRKVFHE1.js → dropdown-field-rac-ByUgK0Dh.js} +2 -2
- package/dist/component/{dropdown-rac-BLqlMGTK.js → dropdown-rac-BZQe_0qb.js} +1 -1
- package/dist/component/{ecom-address-rac-BdlTO9SW.js → ecom-address-rac-Du8bSZKs.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CcF5V54K.js → ecom-subscription-checkbox-rac-ZgT_Mx5b.js} +2 -2
- package/dist/component/{email-input-field-rac-C-lfW9Ua.js → email-input-field-rac-DWXEywOx.js} +3 -3
- package/dist/component/{events-repeater-rac-sHbYZ-WY.js → events-repeater-rac-DBofzCIJ.js} +3 -3
- package/dist/component/{events-rsvp-rac-Bx_xn-K0.js → events-rsvp-rac-CYwLg3Mp.js} +2 -2
- package/dist/component/{field-error-headless-DWbRjy6q.js → field-error-headless-BAVGL8JO.js} +1 -1
- package/dist/component/{field-label-headless-DUWK0CI-.js → field-label-headless-CwSCKtI1.js} +1 -1
- package/dist/component/field-rac.module-Cac83bU5.js +21 -0
- package/dist/component/{file-upload-rac-D9NdbrRq.js → file-upload-rac-BI_SxUFD.js} +4 -4
- package/dist/component/{fixed-payment-rac-i_hkRpLX.js → fixed-payment-rac-m2iFI5v_.js} +4 -4
- package/dist/component/{form-Pr0rklwH.js → form-VD2Og15y.js} +69 -69
- package/dist/component/form-element-keys-P3mtjfCv.js +7 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C22TlZYz.js → header-field-rac-C7EKGD8f.js} +2 -2
- package/dist/component/{header-rac-CRBMp0xN.js → header-rac-CE4fzveg.js} +1 -1
- package/dist/component/image-choice-rac-CXABLqND.js +147 -0
- package/dist/component/{index-BJ-kFqI7.js → index-CHqhveZ1.js} +2 -2
- package/dist/component/{index-FZEaJpsD.js → index-DI0IAMNV.js} +4 -4
- package/dist/component/{isObjectLike-DnLDLZFA.js → isObjectLike-D_6b_ESv.js} +1 -1
- package/dist/component/{multiline-address-field-rac-c1vN8M4W.js → multiline-address-field-rac-3wB7fWdZ.js} +5 -5
- package/dist/component/{multiline-address-rac-BVd_JUMw.js → multiline-address-rac-RnXiGQRs.js} +1 -1
- package/dist/component/{number-input-field-rac-DXfWTZkC.js → number-input-field-rac-BiC2NsZQ.js} +4 -4
- package/dist/component/{number-input-rac-uUl9e8AI.js → number-input-rac-BphPpAvr.js} +1 -1
- package/dist/component/{password-rac-BDJ6HPYo.js → password-rac-DBk3CNX3.js} +4 -4
- package/dist/component/{payment-input-rac-XRcefuRt.js → payment-input-rac-DNYLuIV-.js} +4 -4
- package/dist/component/{phone-input-field-rac-DHgA6BeE.js → phone-input-field-rac-C30S0p_Y.js} +4 -4
- package/dist/component/{phone-rac-CMtVXoft.js → phone-rac-vzh9GsbA.js} +1 -1
- package/dist/component/{product-list-rac-CBLHOwHX.js → product-list-rac-DMdxtFZ1.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-CAmXql2m.js → quiz-radio-group-rac-CX9W6rGY.js} +1 -1
- package/dist/component/{radio-group-field-rac-DBjgd4cD.js → radio-group-field-rac-D7MwZqH6.js} +2 -2
- package/dist/component/{radio-group-field-rac.module-CqOyiO2g.js → radio-group-field-rac.module-DxEUzWwB.js} +3 -3
- package/dist/component/{radio-group-rac-CrEtErkv.js → radio-group-rac-BK7qn-h2.js} +1 -1
- package/dist/component/{rating-input-field-rac-BWn0usVp.js → rating-input-field-rac-CUTqEPPd.js} +4 -4
- package/dist/component/{rating-input-rac-CtidC0z2.js → rating-input-rac-Dy335I62.js} +1 -1
- package/dist/component/{rich-content-rac.module-DX2Jd5w6.js → rich-content-rac.module-DrHi1MSI.js} +1 -1
- package/dist/component/{rich-text-field-rac-CusODU1H.js → rich-text-field-rac-CMnH_2lB.js} +2 -2
- package/dist/component/{rich-text-rac-wq_vA-qU.js → rich-text-rac-Cebhj1Mq.js} +1 -1
- package/dist/component/{service-dropdown-rac--YcOnGmq.js → service-dropdown-rac-BKsuPUHs.js} +4 -4
- package/dist/component/{services-multi-choice-rac-D_kSdluR.js → services-multi-choice-rac-BCzzyhJY.js} +4 -4
- package/dist/component/{signature-rac-DBAg8bEo.js → signature-rac-TuOQR74M.js} +4 -4
- package/dist/component/{submit-button-rac-BW3P99jM.js → submit-button-rac-Ct4NVia5.js} +1 -1
- package/dist/component/tags-field-rac-DYdaPvQc.js +207 -0
- package/dist/component/{tags-rac-Bqo0dqEU.js → tags-rac-BvyXZ_95.js} +1 -1
- package/dist/component/{text-area-field-rac-DaWfCdVq.js → text-area-field-rac-YmesRjRH.js} +4 -4
- package/dist/component/{text-area-rac-BVnA5cPV.js → text-area-rac-Bk0bbyrK.js} +1 -1
- package/dist/component/{text-input-field-rac-Dm6a4jOn.js → text-input-field-rac-CW0ZR1y2.js} +2 -2
- package/dist/component/{text-input-headless-fTooOIqx.js → text-input-headless-C1m6gpFi.js} +3 -3
- package/dist/component/{text-input-rac-DA0we6AY.js → text-input-rac-5S5KE2Qr.js} +1 -1
- package/dist/component/{time-input-rac-DQ9raFL_.js → time-input-rac-CfoKMXeX.js} +4 -4
- package/dist/component/{url-input-field-rac-BEpbWAVe.js → url-input-field-rac-aQiV0Sti.js} +4 -4
- package/dist/component/{url-input-rac-Du6EqRQX.js → url-input-rac-Ko5uylZw.js} +1 -1
- package/dist/component/{use-service-options-base-OMXZXAVb.js → use-service-options-base-BagPjcuW.js} +1 -1
- package/package.json +2 -2
- package/dist/component/donation-rac-DeBx8D9a.js +0 -302
- package/dist/component/field-rac.module-DnUIb9Oh.js +0 -21
- package/dist/component/image-choice-rac-cjylrvfO.js +0 -141
- package/dist/component/tags-field-rac-DSdwley7.js +0 -201
|
@@ -2,13 +2,13 @@ import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
|
2
2
|
import l from "classnames";
|
|
3
3
|
import r, { useCallback as h, useRef as y } from "react";
|
|
4
4
|
import { TextField as N, Input as A } from "react-aria-components";
|
|
5
|
-
import { ai as E, af as d, ak as P } from "./form-
|
|
5
|
+
import { ai as E, af as d, ak as P } from "./form-VD2Og15y.js";
|
|
6
6
|
import { f as u } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as k, E as B } from "./field-error-headless-
|
|
8
|
-
import { L as M } from "./field-label-headless-
|
|
7
|
+
import { D as k, E as B } from "./field-error-headless-BAVGL8JO.js";
|
|
8
|
+
import { L as M } from "./field-label-headless-CwSCKtI1.js";
|
|
9
9
|
import { u as T } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
10
|
import { E as q } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s } from "./field-rac.module-
|
|
11
|
+
import { s } from "./field-rac.module-Cac83bU5.js";
|
|
12
12
|
import { z as v, P as U, y as g, q as x, j as w } from "./form-element-classes-BSMjWijd.js";
|
|
13
13
|
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
14
|
const { id: o, value: n, onChange: a, disabled: m, readOnly: i, required: c, hasError: I, onBlur: f, onFocus: F, FieldLayout: L } = E(), { labelId: R } = d(), p = T(f), b = u(t, e.Label), D = u(t, e.Input), _ = u(t, e.Description), C = u(t, e.Error), S = h(() => {
|
package/dist/component/{use-service-options-base-OMXZXAVb.js → use-service-options-base-BagPjcuW.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
|
|
2
|
-
import { ah as v } from "./form-
|
|
2
|
+
import { ah as v } from "./form-VD2Og15y.js";
|
|
3
3
|
const k = (h) => {
|
|
4
4
|
const { fieldType: I, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = h, [L, O] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(I), r = D((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.72.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -151,5 +151,5 @@
|
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
|
-
"falconPackageHash": "
|
|
154
|
+
"falconPackageHash": "bc715a40f19dbf6d99e496325c076986f9ec5bee59347fa7381e332a"
|
|
155
155
|
}
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import t, { useMemo as B, useCallback as L, useRef as oe } from "react";
|
|
2
|
-
import { RicosViewer as re } from "@wix/ricos/viewer";
|
|
3
|
-
import y from "classnames";
|
|
4
|
-
import { RadioGroup as ae, RadioField as Y, RadioButton as z, TextField as se, Group as le, Input as ie } from "react-aria-components";
|
|
5
|
-
import { debounce as ce } from "ts-debounce";
|
|
6
|
-
import { P as H, ai as A, af as j, as as ue, ab as v, ak as me } from "./form-Pr0rklwH.js";
|
|
7
|
-
import { f, a as b } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { a as Q } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as pe, E as de } from "./field-error-headless-DWbRjy6q.js";
|
|
10
|
-
import { L as Ie } from "./field-label-headless-DUWK0CI-.js";
|
|
11
|
-
import { N as Ee } from "./options-layout-constants-DEfIEJWD.js";
|
|
12
|
-
import { a as Ce, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
|
-
import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
|
-
import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
|
-
import { E as _e } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { s as D } from "./field-rac.module-DnUIb9Oh.js";
|
|
17
|
-
import { z as ye, P as be, k as Fe, l as Ne, m as De, y as ge, q as Le, j as Re } from "./form-element-classes-BSMjWijd.js";
|
|
18
|
-
import { o as Se } from "./options-rac.module-KM-VT_KY.js";
|
|
19
|
-
function Ae(e, n) {
|
|
20
|
-
return e.reduce((o, r) => (o[r[n]] = r, o), {});
|
|
21
|
-
}
|
|
22
|
-
function ve(e) {
|
|
23
|
-
return Ae(e, "id");
|
|
24
|
-
}
|
|
25
|
-
const Pe = 0.01;
|
|
26
|
-
function Te(e) {
|
|
27
|
-
var n;
|
|
28
|
-
return ((n = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : n.price) || "0";
|
|
29
|
-
}
|
|
30
|
-
function W(e, n) {
|
|
31
|
-
const o = Number(n || "0");
|
|
32
|
-
return {
|
|
33
|
-
productId: e.id,
|
|
34
|
-
price: e.priceType === H.DYNAMIC_PRICE ? o : String(o),
|
|
35
|
-
quantity: 1
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function Me(e) {
|
|
39
|
-
return e.find((n) => n.priceType === H.DYNAMIC_PRICE);
|
|
40
|
-
}
|
|
41
|
-
function xe(e, n) {
|
|
42
|
-
return (e == null ? void 0 : e.productId) === (n == null ? void 0 : n.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
43
|
-
}
|
|
44
|
-
function Be(e, n, o) {
|
|
45
|
-
const r = (n == null ? void 0 : n.productId) === e ? void 0 : e, s = r ? o[r] : void 0;
|
|
46
|
-
return s ? [
|
|
47
|
-
W(s, Te(s))
|
|
48
|
-
] : [];
|
|
49
|
-
}
|
|
50
|
-
const a = ({ children: e }) => {
|
|
51
|
-
const { id: n, value: o, onChange: r, disabled: s, required: m, onBlur: p, onFocus: h, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: I, hasError: O } = A(), { labelId: _ } = j(), { t: E } = ue(), { currency: P, regionalFormat: F } = v(), d = o == null ? void 0 : o[0], N = B(() => {
|
|
52
|
-
var C, x;
|
|
53
|
-
return ((x = (C = c == null ? void 0 : c.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : x.products) || [];
|
|
54
|
-
}, [
|
|
55
|
-
c
|
|
56
|
-
]), T = B(() => ve(N), [
|
|
57
|
-
N
|
|
58
|
-
]), l = B(() => u ? Me(N) : void 0, [
|
|
59
|
-
N,
|
|
60
|
-
u
|
|
61
|
-
]), J = xe(d, l), [q, M] = he({
|
|
62
|
-
sourceValue: J,
|
|
63
|
-
format: (C) => fe(String(C ?? ""), F),
|
|
64
|
-
regionalFormat: F
|
|
65
|
-
}), k = L((C) => {
|
|
66
|
-
r(Be(C, d, T)), M("");
|
|
67
|
-
}, [
|
|
68
|
-
r,
|
|
69
|
-
T,
|
|
70
|
-
d,
|
|
71
|
-
M
|
|
72
|
-
]), $ = L((C) => {
|
|
73
|
-
l && r(typeof C == "number" ? [
|
|
74
|
-
W(l, String(C))
|
|
75
|
-
] : []);
|
|
76
|
-
}, [
|
|
77
|
-
r,
|
|
78
|
-
l
|
|
79
|
-
]), V = B(() => ce($, 500), [
|
|
80
|
-
$
|
|
81
|
-
]), K = L((C) => {
|
|
82
|
-
(d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
|
|
83
|
-
const { validInput: x, validNumber: te } = Ce(C.target.value, Pe, q, F);
|
|
84
|
-
M(x), V(te);
|
|
85
|
-
}, [
|
|
86
|
-
F,
|
|
87
|
-
r,
|
|
88
|
-
d,
|
|
89
|
-
l,
|
|
90
|
-
q,
|
|
91
|
-
V,
|
|
92
|
-
M
|
|
93
|
-
]), w = (d == null ? void 0 : d.productId) || null, X = L(() => {
|
|
94
|
-
l != null && l.id && w !== l.id && k(l.id);
|
|
95
|
-
}, [
|
|
96
|
-
l == null ? void 0 : l.id,
|
|
97
|
-
w,
|
|
98
|
-
k
|
|
99
|
-
]), Z = f(e, a.Label), G = f(e, a.Control), ee = f(e, a.Description), ne = f(e, a.Error);
|
|
100
|
-
return /* @__PURE__ */ t.createElement(I, {
|
|
101
|
-
fieldId: n,
|
|
102
|
-
renderLabel: () => Z,
|
|
103
|
-
renderInput: () => /* @__PURE__ */ t.createElement(ae, {
|
|
104
|
-
"aria-labelledby": _,
|
|
105
|
-
value: w,
|
|
106
|
-
onChange: k,
|
|
107
|
-
isDisabled: s,
|
|
108
|
-
isInvalid: O,
|
|
109
|
-
isRequired: m,
|
|
110
|
-
onBlur: p,
|
|
111
|
-
onFocus: h
|
|
112
|
-
}, G ? b(G, {
|
|
113
|
-
productsById: T,
|
|
114
|
-
addOther: u,
|
|
115
|
-
customAmount: q,
|
|
116
|
-
onCustomAmountInputChange: K,
|
|
117
|
-
currency: P,
|
|
118
|
-
t: E,
|
|
119
|
-
placeholder: i === void 0 ? E("donation.other-option.placeholder") : i,
|
|
120
|
-
customAmountProductId: l == null ? void 0 : l.id,
|
|
121
|
-
onFocusCustomInput: X
|
|
122
|
-
}) : null),
|
|
123
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, ne, ee)
|
|
124
|
-
});
|
|
125
|
-
}, je = ({ children: e, className: n, ...o }) => {
|
|
126
|
-
const { productsById: r, addOther: s, customAmount: m, onCustomAmountInputChange: p, currency: h, t: c, placeholder: u, customAmountProductId: i, onFocusCustomInput: I } = o, { hasError: O } = A(), _ = f(e, a.Options), E = f(e, a.OtherInput);
|
|
127
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
128
|
-
className: n,
|
|
129
|
-
"data-invalid": O
|
|
130
|
-
}, _ ? b(_, {
|
|
131
|
-
productsById: r
|
|
132
|
-
}) : null, s && i && /* @__PURE__ */ t.createElement(Y, {
|
|
133
|
-
value: i,
|
|
134
|
-
style: {
|
|
135
|
-
position: "absolute",
|
|
136
|
-
width: "1px",
|
|
137
|
-
height: "1px",
|
|
138
|
-
padding: "0",
|
|
139
|
-
margin: "-1px",
|
|
140
|
-
overflow: "hidden",
|
|
141
|
-
clip: "rect(0, 0, 0, 0)",
|
|
142
|
-
whiteSpace: "nowrap",
|
|
143
|
-
border: "0"
|
|
144
|
-
}
|
|
145
|
-
}, /* @__PURE__ */ t.createElement(z, {
|
|
146
|
-
"aria-label": c("donation.other-option.label", "Custom amount")
|
|
147
|
-
}, c("donation.other-option.label", "Custom amount"))), E && s ? b(E, {
|
|
148
|
-
customAmount: m,
|
|
149
|
-
onCustomAmountInputChange: p,
|
|
150
|
-
currency: h,
|
|
151
|
-
t: c,
|
|
152
|
-
placeholder: u,
|
|
153
|
-
customAmountProductId: i,
|
|
154
|
-
onFocusCustomInput: I
|
|
155
|
-
}) : null);
|
|
156
|
-
}, U = ({ children: e, className: n, ...o }) => {
|
|
157
|
-
const { productsById: r } = o, { options: s, numberOfColumns: m } = A(), { isMobile: p } = v(), h = f(e, U.Option), c = p ? Ee.ONE : m;
|
|
158
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
159
|
-
className: n,
|
|
160
|
-
"data-columns": c
|
|
161
|
-
}, s.map((u) => {
|
|
162
|
-
var O;
|
|
163
|
-
const i = r[u.value], I = (O = i == null ? void 0 : i.fixedPriceOptions) == null ? void 0 : O.price;
|
|
164
|
-
return b(h, {
|
|
165
|
-
key: u.value,
|
|
166
|
-
value: u.value,
|
|
167
|
-
price: I || "0"
|
|
168
|
-
});
|
|
169
|
-
}));
|
|
170
|
-
}, R = ({ children: e, className: n, ...o }) => {
|
|
171
|
-
const { value: r, price: s } = o, { id: m } = A(), { currency: p, regionalFormat: h } = v(), c = f(e, R.Value), u = f(e, R.Currency), { isCurrencyPrefixed: i } = Q({
|
|
172
|
-
amount: s,
|
|
173
|
-
currency: p == null ? void 0 : p.code,
|
|
174
|
-
locale: h
|
|
175
|
-
}), I = oe(null);
|
|
176
|
-
me(() => {
|
|
177
|
-
var _, E;
|
|
178
|
-
(E = (_ = I.current) == null ? void 0 : _.querySelector("input")) == null || E.focus();
|
|
179
|
-
}, m);
|
|
180
|
-
const O = c ? b(c, {
|
|
181
|
-
price: s
|
|
182
|
-
}) : null;
|
|
183
|
-
return /* @__PURE__ */ t.createElement(Y, {
|
|
184
|
-
value: r
|
|
185
|
-
}, /* @__PURE__ */ t.createElement(z, {
|
|
186
|
-
className: n,
|
|
187
|
-
ref: I
|
|
188
|
-
}, /* @__PURE__ */ t.createElement(t.Fragment, null, i && u, O, !i && u)));
|
|
189
|
-
}, qe = ({ className: e, ...n }) => {
|
|
190
|
-
const { price: o } = n, { currency: r, regionalFormat: s } = v(), { value: m } = Q({
|
|
191
|
-
amount: o,
|
|
192
|
-
currency: r == null ? void 0 : r.code,
|
|
193
|
-
locale: s
|
|
194
|
-
});
|
|
195
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
196
|
-
className: e
|
|
197
|
-
}, m);
|
|
198
|
-
}, ke = ({ className: e }) => {
|
|
199
|
-
const { currency: n } = v();
|
|
200
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
201
|
-
className: e
|
|
202
|
-
}, (n == null ? void 0 : n.sign) || (n == null ? void 0 : n.code) || "");
|
|
203
|
-
};
|
|
204
|
-
R.Value = qe;
|
|
205
|
-
R.Currency = ke;
|
|
206
|
-
const S = ({ children: e, className: n, ...o }) => {
|
|
207
|
-
const { customAmount: r, onCustomAmountInputChange: s, currency: m, t: p, placeholder: h, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: I } = A(), { labelId: O, prefixId: _ } = j(), E = f(e, S.Currency), P = f(e, S.Value), F = L((N) => {
|
|
208
|
-
s({
|
|
209
|
-
target: {
|
|
210
|
-
value: N
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}, [
|
|
214
|
-
s
|
|
215
|
-
]), d = L(() => {
|
|
216
|
-
u();
|
|
217
|
-
}, [
|
|
218
|
-
u
|
|
219
|
-
]);
|
|
220
|
-
return /* @__PURE__ */ t.createElement(se, {
|
|
221
|
-
"aria-labelledby": `${O} ${_}`,
|
|
222
|
-
value: r,
|
|
223
|
-
onChange: F,
|
|
224
|
-
onFocus: d,
|
|
225
|
-
isDisabled: i,
|
|
226
|
-
isInvalid: I
|
|
227
|
-
}, /* @__PURE__ */ t.createElement(le, {
|
|
228
|
-
className: n,
|
|
229
|
-
isDisabled: i,
|
|
230
|
-
isInvalid: I
|
|
231
|
-
}, r && m && E ? b(E, {
|
|
232
|
-
currency: m,
|
|
233
|
-
t: p
|
|
234
|
-
}) : null, P ? b(P, {
|
|
235
|
-
placeholder: h,
|
|
236
|
-
customAmountProductId: c
|
|
237
|
-
}) : null));
|
|
238
|
-
}, we = ({ className: e, ...n }) => {
|
|
239
|
-
const { currency: o, t: r } = n, { prefixId: s } = j();
|
|
240
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
241
|
-
id: s,
|
|
242
|
-
"aria-hidden": !1,
|
|
243
|
-
"aria-label": Oe(r, o),
|
|
244
|
-
className: e
|
|
245
|
-
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
246
|
-
}, Ue = ({ className: e, ...n }) => {
|
|
247
|
-
const { placeholder: o, customAmountProductId: r } = n, { ariaDescribedBy: s, labelId: m, prefixId: p } = j();
|
|
248
|
-
return /* @__PURE__ */ t.createElement(ie, {
|
|
249
|
-
id: r,
|
|
250
|
-
"aria-labelledby": `${m} ${p}`,
|
|
251
|
-
"aria-describedby": s,
|
|
252
|
-
placeholder: o,
|
|
253
|
-
inputMode: "decimal",
|
|
254
|
-
autoComplete: "off",
|
|
255
|
-
className: e
|
|
256
|
-
});
|
|
257
|
-
};
|
|
258
|
-
S.Currency = we;
|
|
259
|
-
S.Value = Ue;
|
|
260
|
-
U.Option = R;
|
|
261
|
-
a.Label = Ie;
|
|
262
|
-
a.Control = je;
|
|
263
|
-
a.Options = U;
|
|
264
|
-
a.OtherInput = S;
|
|
265
|
-
a.Description = pe;
|
|
266
|
-
a.Error = de;
|
|
267
|
-
const $e = "_control_141js_1", Ve = "_options_141js_7", Ge = "_option_141js_7", Ye = "_optionCurrency_141js_89", ze = "_otherInput_141js_93", He = "_otherInputCurrency_141js_112", g = {
|
|
268
|
-
control: $e,
|
|
269
|
-
options: Ve,
|
|
270
|
-
option: Ge,
|
|
271
|
-
optionCurrency: Ye,
|
|
272
|
-
otherInput: ze,
|
|
273
|
-
otherInputCurrency: He
|
|
274
|
-
}, Qe = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(re, {
|
|
275
|
-
content: e,
|
|
276
|
-
locale: n
|
|
277
|
-
}), We = () => /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
278
|
-
className: y(ye, D.label)
|
|
279
|
-
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
280
|
-
className: y(be, D.requiredMark)
|
|
281
|
-
})), /* @__PURE__ */ t.createElement(a.Control, {
|
|
282
|
-
className: g.control
|
|
283
|
-
}, /* @__PURE__ */ t.createElement(a.Options, {
|
|
284
|
-
className: y(Fe, Se.options, g.options)
|
|
285
|
-
}, /* @__PURE__ */ t.createElement(a.Options.Option, {
|
|
286
|
-
className: ({ isSelected: e }) => y(Ne, e && De, g.option)
|
|
287
|
-
}, /* @__PURE__ */ t.createElement(a.Options.Option.Value, null), /* @__PURE__ */ t.createElement(a.Options.Option.Currency, {
|
|
288
|
-
className: g.optionCurrency
|
|
289
|
-
}))), /* @__PURE__ */ t.createElement(a.OtherInput, {
|
|
290
|
-
className: y(ge, D.input, g.otherInput)
|
|
291
|
-
}, /* @__PURE__ */ t.createElement(a.OtherInput.Currency, {
|
|
292
|
-
className: g.otherInputCurrency
|
|
293
|
-
}), /* @__PURE__ */ t.createElement(a.OtherInput.Value, {
|
|
294
|
-
className: D.innerInput
|
|
295
|
-
}))), /* @__PURE__ */ t.createElement(a.Error, {
|
|
296
|
-
className: y(Le, D.error)
|
|
297
|
-
}, /* @__PURE__ */ t.createElement(_e, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
|
|
298
|
-
className: y(Re, D.description)
|
|
299
|
-
}, Qe)), En = () => /* @__PURE__ */ t.createElement(We, null);
|
|
300
|
-
export {
|
|
301
|
-
En as DonationRAC
|
|
302
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const o = "_label_1nskk_1", n = "_requiredMark_1nskk_11", t = "_input_1nskk_16", e = "_inputGroup_1nskk_17", s = "_innerInput_1nskk_129", r = "_dropdownTrigger_1nskk_177", _ = "_dropdownIcon_1nskk_187", c = "_dropdownPopover_1nskk_206", p = "_selectPopover_1nskk_210", k = "_selectOption_1nskk_237", i = "_selectOptionWithoutFocusRing_1nskk_261", u = "_description_1nskk_267", d = "_error_1nskk_283", l = "_checkbox_1nskk_302", a = "_checkboxInput_1nskk_325", h = "_uploadButton_1nskk_420", b = {
|
|
2
|
-
label: o,
|
|
3
|
-
requiredMark: n,
|
|
4
|
-
input: t,
|
|
5
|
-
inputGroup: e,
|
|
6
|
-
innerInput: s,
|
|
7
|
-
dropdownTrigger: r,
|
|
8
|
-
dropdownIcon: _,
|
|
9
|
-
dropdownPopover: c,
|
|
10
|
-
selectPopover: p,
|
|
11
|
-
selectOption: k,
|
|
12
|
-
selectOptionWithoutFocusRing: i,
|
|
13
|
-
description: u,
|
|
14
|
-
error: d,
|
|
15
|
-
checkbox: l,
|
|
16
|
-
checkboxInput: a,
|
|
17
|
-
uploadButton: h
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
b as s
|
|
21
|
-
};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import e, { useMemo as M, useCallback as v, useRef as T } from "react";
|
|
2
|
-
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
|
-
import E from "classnames";
|
|
4
|
-
import { CheckboxGroup as x, CheckboxField as z, CheckboxButton as B } from "react-aria-components";
|
|
5
|
-
import { ai as L, af as q, ab as H, ak as P } from "./form-Pr0rklwH.js";
|
|
6
|
-
import { f as p, a as C } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as G, g as w } from "./field-label-headless-DUWK0CI-.js";
|
|
8
|
-
import { D as U, E as V } from "./field-error-headless-DWbRjy6q.js";
|
|
9
|
-
import { F as j } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
-
import { E as Q } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s as O } from "./field-rac.module-DnUIb9Oh.js";
|
|
12
|
-
import { z as $, P as J, u as K, v as W, w as X, q as Y, j as Z } from "./form-element-classes-BSMjWijd.js";
|
|
13
|
-
const a = ({ children: t }) => {
|
|
14
|
-
const { id: s, value: o, onChange: n, disabled: l, readOnly: i, required: r, onBlur: c, onFocus: m, hasError: u, FieldLayout: f } = L(), { inputId: g, labelId: b, ariaDescribedBy: _ } = q(), R = p(t, a.Label), D = p(t, a.Options), N = p(t, a.Description), S = p(t, a.Error), h = M(() => o || [], [
|
|
15
|
-
o
|
|
16
|
-
]), A = v((y) => {
|
|
17
|
-
n == null || n(y);
|
|
18
|
-
}, [
|
|
19
|
-
n
|
|
20
|
-
]);
|
|
21
|
-
return /* @__PURE__ */ e.createElement(f, {
|
|
22
|
-
fieldId: s,
|
|
23
|
-
renderLabel: () => R,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(j, {
|
|
25
|
-
id: g,
|
|
26
|
-
ariaLabelledBy: b,
|
|
27
|
-
ariaDescribedBy: _,
|
|
28
|
-
required: r,
|
|
29
|
-
onBlur: c,
|
|
30
|
-
onFocus: m
|
|
31
|
-
}, /* @__PURE__ */ e.createElement(x, {
|
|
32
|
-
"aria-labelledby": b,
|
|
33
|
-
value: h,
|
|
34
|
-
onChange: A,
|
|
35
|
-
isDisabled: l,
|
|
36
|
-
isReadOnly: i,
|
|
37
|
-
isRequired: r,
|
|
38
|
-
isInvalid: u
|
|
39
|
-
}, D)),
|
|
40
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, S, N)
|
|
41
|
-
});
|
|
42
|
-
}, F = ({ children: t, className: s }) => {
|
|
43
|
-
const { isMobile: o } = H(), { id: n, options: l, numberOfColumns: i } = L(), r = p(t, F.Option);
|
|
44
|
-
return /* @__PURE__ */ e.createElement("div", {
|
|
45
|
-
className: s,
|
|
46
|
-
"data-columns": o ? 1 : i
|
|
47
|
-
}, l == null ? void 0 : l.map((c, m) => C(r, {
|
|
48
|
-
key: c.id || c.label,
|
|
49
|
-
option: c,
|
|
50
|
-
isFirst: m === 0,
|
|
51
|
-
fieldId: n
|
|
52
|
-
})));
|
|
53
|
-
}, ee = ({ className: t }) => /* @__PURE__ */ e.createElement("div", {
|
|
54
|
-
"aria-hidden": "true",
|
|
55
|
-
className: t
|
|
56
|
-
}), te = ({ className: t, ...s }) => {
|
|
57
|
-
var m, u;
|
|
58
|
-
const { option: o } = s, { choiceImageResize: n, choiceImageAlignment: l } = L(), i = (m = o.media) == null ? void 0 : m.image;
|
|
59
|
-
if (!i)
|
|
60
|
-
return null;
|
|
61
|
-
const r = w(i, i.width, i.height);
|
|
62
|
-
if (!r)
|
|
63
|
-
return null;
|
|
64
|
-
const c = ((u = o.media) == null ? void 0 : u.altText) || o.altText || i.altText || "";
|
|
65
|
-
return /* @__PURE__ */ e.createElement("img", {
|
|
66
|
-
className: t,
|
|
67
|
-
src: r,
|
|
68
|
-
alt: c,
|
|
69
|
-
"data-fit": n,
|
|
70
|
-
"data-alignment": l,
|
|
71
|
-
"data-hook": "image-choice-option-image"
|
|
72
|
-
});
|
|
73
|
-
}, ae = ({ className: t, ...s }) => {
|
|
74
|
-
const { option: o } = s;
|
|
75
|
-
return !o.label || o.isLabelHidden ? null : /* @__PURE__ */ e.createElement("span", {
|
|
76
|
-
className: t
|
|
77
|
-
}, o.label);
|
|
78
|
-
}, d = ({ children: t, className: s, ...o }) => {
|
|
79
|
-
const { option: n, isFirst: l = !1, fieldId: i } = o, { disabled: r, readOnly: c, hasError: m } = L(), u = T(null);
|
|
80
|
-
P(() => {
|
|
81
|
-
var _;
|
|
82
|
-
l && ((_ = u.current) == null || _.focus({
|
|
83
|
-
preventScroll: !0
|
|
84
|
-
}));
|
|
85
|
-
}, i);
|
|
86
|
-
const f = p(t, d.Input), g = p(t, d.Image), b = p(t, d.Label);
|
|
87
|
-
return /* @__PURE__ */ e.createElement(z, {
|
|
88
|
-
value: n.label,
|
|
89
|
-
isDisabled: r,
|
|
90
|
-
isReadOnly: c,
|
|
91
|
-
isInvalid: m
|
|
92
|
-
}, /* @__PURE__ */ e.createElement(B, {
|
|
93
|
-
ref: u,
|
|
94
|
-
"aria-label": n.isLabelHidden ? n.label : void 0,
|
|
95
|
-
className: s,
|
|
96
|
-
"data-hook": `image-choice-${n.label}`
|
|
97
|
-
}, f, C(g, {
|
|
98
|
-
option: n
|
|
99
|
-
}), C(b, {
|
|
100
|
-
option: n
|
|
101
|
-
})));
|
|
102
|
-
};
|
|
103
|
-
d.Input = ee;
|
|
104
|
-
d.Image = te;
|
|
105
|
-
d.Label = ae;
|
|
106
|
-
a.Label = G;
|
|
107
|
-
a.Options = F;
|
|
108
|
-
F.Option = d;
|
|
109
|
-
a.Description = U;
|
|
110
|
-
a.Error = V;
|
|
111
|
-
const ne = "_options_19z29_1", oe = "_optionInput_19z29_25", se = "_option_19z29_1", ie = "_optionLabel_19z29_95", le = "_optionImage_19z29_126", I = {
|
|
112
|
-
options: ne,
|
|
113
|
-
optionInput: oe,
|
|
114
|
-
option: se,
|
|
115
|
-
optionLabel: ie,
|
|
116
|
-
optionImage: le
|
|
117
|
-
}, re = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(k, {
|
|
118
|
-
content: t,
|
|
119
|
-
locale: s
|
|
120
|
-
}), ce = () => /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
|
|
121
|
-
className: E($, O.label)
|
|
122
|
-
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
123
|
-
className: E(J, O.requiredMark)
|
|
124
|
-
})), /* @__PURE__ */ e.createElement(a.Options, {
|
|
125
|
-
className: E(K, I.options)
|
|
126
|
-
}, /* @__PURE__ */ e.createElement(a.Options.Option, {
|
|
127
|
-
className: ({ isSelected: t }) => E(W, t && X, I.option)
|
|
128
|
-
}, /* @__PURE__ */ e.createElement(a.Options.Option.Input, {
|
|
129
|
-
className: I.optionInput
|
|
130
|
-
}), /* @__PURE__ */ e.createElement(a.Options.Option.Image, {
|
|
131
|
-
className: I.optionImage
|
|
132
|
-
}), /* @__PURE__ */ e.createElement(a.Options.Option.Label, {
|
|
133
|
-
className: I.optionLabel
|
|
134
|
-
}))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
135
|
-
className: E(Y, O.error)
|
|
136
|
-
}, /* @__PURE__ */ e.createElement(Q, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
137
|
-
className: E(Z, O.description)
|
|
138
|
-
}, re)), Ce = () => /* @__PURE__ */ e.createElement(ce, null);
|
|
139
|
-
export {
|
|
140
|
-
Ce as ImageChoiceRAC
|
|
141
|
-
};
|