@wix/form-elements 1.158.0 → 1.160.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-m5-FH9kU.js → appointment-rac-BmHu56e5.js} +63 -63
- package/dist/component/{bookings-address-rac-VtG7wH0l.js → bookings-address-rac-DY9l2g0h.js} +1 -1
- package/dist/component/{bookings-email-rac-C8T3aTQH.js → bookings-email-rac-B5vNSOsS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BlhIWWNj.js → bookings-first-name-rac-CJiefCNz.js} +1 -1
- package/dist/component/{bookings-header-rac-adwR7PKJ.js → bookings-header-rac-BFu7Ko5w.js} +1 -1
- package/dist/component/{bookings-last-name-rac-z5z1GJQL.js → bookings-last-name-rac-DegMM13h.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DMgVxy8J.js → bookings-login-bar-rac-DrA-5tBH.js} +7 -7
- package/dist/component/{bookings-phone-rac-DS7ffO6T.js → bookings-phone-rac-DsaeqxCI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BNWI0o60.js → bookings-rich-text-rac-jRHiwqi8.js} +1 -1
- package/dist/component/{checkbox-field-rac-CUKZ9NHF.js → checkbox-field-rac-CyoBb6Yf.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-Didam2ZD.js → checkbox-group-field-headless-Bv1gU3oL.js} +54 -54
- package/dist/component/{checkbox-group-field-rac-C3WCeVA8.js → checkbox-group-field-rac-DasArcdV.js} +6 -6
- package/dist/component/{checkbox-group-rac-Bkq-wm7_.js → checkbox-group-rac-CzmufV1U.js} +1 -1
- package/dist/component/{checkbox-rac-66ga9Lph.js → checkbox-rac-6C7XoUoZ.js} +1 -1
- package/dist/component/{contacts-address-rac-DSOk97te.js → contacts-address-rac-BZobbFtz.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-1qguKm9O.js → contacts-birthdate-rac-DIzf41DS.js} +1 -1
- package/dist/component/{contacts-company-rac-Chefzmw3.js → contacts-company-rac-BiBDO28r.js} +1 -1
- package/dist/component/{contacts-email-rac-DG6eAnz2.js → contacts-email-rac-5mqokCSD.js} +1 -1
- package/dist/component/{contacts-first-name-rac-tSGE0w5w.js → contacts-first-name-rac-BXe3_Nz5.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BjZWfbM5.js → contacts-last-name-rac-Cfqgh7u1.js} +1 -1
- package/dist/component/{contacts-phone-rac-jfGNKLoZ.js → contacts-phone-rac-cmLUWnAc.js} +1 -1
- package/dist/component/{contacts-position-rac-kv8I-m_Q.js → contacts-position-rac-DTyvklfN.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-BkUG0AMs.js → contacts-subscribe-rac-D-ZEX1A3.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BtFrK_Ci.js → contacts-tax-id-rac-B4NYJwWt.js} +1 -1
- package/dist/component/{date-availability-_A9DS6za.js → date-availability-Dach9aRC.js} +1 -1
- package/dist/component/date-input-field-rac-B72mHcya.js +309 -0
- package/dist/component/{date-input-rac-CpseQkV4.js → date-input-rac-CYix11gT.js} +1 -1
- package/dist/component/{date-picker-field-rac-B4gjhxG6.js → date-picker-field-rac-B8pvtPir.js} +86 -86
- package/dist/component/{date-picker-rac-DDJfUDCM.js → date-picker-rac-D6cR0zH9.js} +1 -1
- package/dist/component/date-time-input-field-rac-B7Y3Yf5l.js +441 -0
- package/dist/component/{date-time-input-rac-BkvcyU3H.js → date-time-input-rac-DMN-noQX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-UWDhIjU-.js → dext-checkbox-group-rac-Kq0GnteP.js} +2 -2
- package/dist/component/{dext-checkbox-rac-q9UJnqsC.js → dext-checkbox-rac-BY9GZ4n1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-C164FDSF.js → dext-date-picker-rac-CXArIddp.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BvbnfRYU.js → dext-date-time-input-rac-B39TtxGq.js} +1 -1
- package/dist/component/{dext-dropdown-rac-z0xU1mRO.js → dext-dropdown-rac-C3y0G8cS.js} +1 -1
- package/dist/component/{dext-email-rac-BkiWpfNw.js → dext-email-rac-BIg3cq7Q.js} +1 -1
- package/dist/component/{dext-number-input-rac-DeQWO-RK.js → dext-number-input-rac-27sHJ7yN.js} +1 -1
- package/dist/component/{dext-phone-rac-CGlVpadW.js → dext-phone-rac-CcohoFQp.js} +1 -1
- package/dist/component/dext-radio-group-rac-eead3Gve.js +18 -0
- package/dist/component/{dext-rating-input-rac-ibIctxU_.js → dext-rating-input-rac-B_E6OcBr.js} +1 -1
- package/dist/component/{dext-tags-rac-snCgM6u0.js → dext-tags-rac-Yd9aAtnF.js} +2 -2
- package/dist/component/{dext-text-area-rac-BHVs8ixR.js → dext-text-area-rac-CMACri2C.js} +1 -1
- package/dist/component/{dext-text-input-rac-DGI747Od.js → dext-text-input-rac-sNjSCfQ-.js} +1 -1
- package/dist/component/{dext-url-input-rac-CpO2VDPE.js → dext-url-input-rac-DwhbzJty.js} +1 -1
- package/dist/component/{donation-rac-Ck6HkRcW.js → donation-rac-BVAN3kMk.js} +90 -90
- package/dist/component/{dropdown-field-rac-e5MjWn5B.js → dropdown-field-rac-DdoGigWx.js} +14 -14
- package/dist/component/{dropdown-rac-B2jprC8G.js → dropdown-rac-CRkt5w47.js} +1 -1
- package/dist/component/{ecom-address-rac-D0stOqRv.js → ecom-address-rac-C36hFHW0.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BRzaQKx3.js → ecom-subscription-checkbox-rac-BKfQ348w.js} +2 -2
- package/dist/component/{email-input-field-rac-0UIjNipg.js → email-input-field-rac-MOaISYxa.js} +59 -59
- package/dist/component/{events-repeater-rac-BBQZzP7U.js → events-repeater-rac-D6p-NgE8.js} +20 -20
- package/dist/component/{events-rsvp-rac-Ck7BXGKy.js → events-rsvp-rac-DVpgN8gm.js} +18 -18
- package/dist/component/{field-error-headless-vApyo-y9.js → field-error-headless-XNWmDH3E.js} +4 -4
- package/dist/component/{field-label-headless-C8-ShLxy.js → field-label-headless-CORRAJGt.js} +4 -4
- package/dist/component/{file-upload-rac-BzWJOM6C.js → file-upload-rac-DRMr7E4b.js} +89 -89
- package/dist/component/{fixed-payment-rac-C4_xI103.js → fixed-payment-rac-BUXzNex9.js} +18 -18
- package/dist/component/{form-D7ulDPh1.js → form-DSpx-AO8.js} +785 -728
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BnBbhsOZ.js → header-field-rac-CiDXlNsa.js} +6 -6
- package/dist/component/{header-rac-CEWayr6b.js → header-rac-B5Rg-h8u.js} +1 -1
- package/dist/component/{image-choice-rac-DTZrz6oP.js → image-choice-rac-CtoA_KDp.js} +44 -44
- package/dist/component/{index-CKtw7kvn.js → index-Bz7ZhQsF.js} +53 -53
- package/dist/component/{index-DBbgIHYT.js → index-CwruESwc.js} +5 -5
- package/dist/component/{isObjectLike-BHfPE26c.js → isObjectLike-C5dHxHP0.js} +11 -11
- package/dist/component/multiline-address-field-rac-Z-qF366L.js +1664 -0
- package/dist/component/{multiline-address-rac-YQj_QROS.js → multiline-address-rac-CJIHTMw5.js} +1 -1
- package/dist/component/{number-input-field-rac-A7xM2c6F.js → number-input-field-rac-D4vf6I6N.js} +29 -29
- package/dist/component/{number-input-rac-DeDatLY5.js → number-input-rac-B2jW6JUQ.js} +1 -1
- package/dist/component/{password-rac-7Si7JHee.js → password-rac-DGRZ17Jl.js} +29 -29
- package/dist/component/{payment-input-rac-D4JKZl-5.js → payment-input-rac-BtD-tAKv.js} +27 -27
- package/dist/component/phone-input-field-rac-KD4-APhr.js +512 -0
- package/dist/component/{phone-rac-Y2mWnseb.js → phone-rac-Cw2yccgg.js} +1 -1
- package/dist/component/{product-list-rac-CYUcNqf3.js → product-list-rac-XbzTDdbp.js} +33 -33
- package/dist/component/{quiz-radio-group-rac-f3O7fksW.js → quiz-radio-group-rac-BDw_mAw5.js} +1 -1
- package/dist/component/{radio-button-module-classes-BgVUqcvD.js → radio-button-module-classes-CFGf0Hzh.js} +23 -23
- package/dist/component/{radio-group-field-rac-DrOiyk5C.js → radio-group-field-rac-CXN7tyVu.js} +6 -6
- package/dist/component/{radio-group-rac-Btt_bz_K.js → radio-group-rac-COHzqjBh.js} +1 -1
- package/dist/component/{rating-input-field-rac-CwN7wyaw.js → rating-input-field-rac-DCXNZgf1.js} +37 -37
- package/dist/component/{rating-input-rac-sTy0SV3L.js → rating-input-rac-DwQt9ML7.js} +1 -1
- package/dist/component/{rich-content-rac.module-C11w9mXa.js → rich-content-rac.module-B7rPwNns.js} +8 -8
- package/dist/component/{rich-text-field-rac-kGwuDtNs.js → rich-text-field-rac-DlER7NRD.js} +4 -4
- package/dist/component/{rich-text-rac-T4ic2hrA.js → rich-text-rac-CjicsHA7.js} +1 -1
- package/dist/component/service-dropdown-rac-B81LC_6_.js +145 -0
- package/dist/component/{services-multi-choice-rac-CLQ4dLxO.js → services-multi-choice-rac-BR6gZeHk.js} +16 -16
- package/dist/component/{signature-rac-DLiFeCNL.js → signature-rac-XFj7Ddtp.js} +69 -69
- package/dist/component/{submit-button-rac-CccO80E1.js → submit-button-rac-Bz7zs_3W.js} +12 -12
- package/dist/component/{tags-field-rac-DaghCGJU.js → tags-field-rac-DWWkNKqc.js} +79 -79
- package/dist/component/{tags-rac-3ly5shW2.js → tags-rac-BXyiQ9i1.js} +1 -1
- package/dist/component/{text-area-field-rac-2-TYC5Lb.js → text-area-field-rac-DsIRYi0d.js} +21 -21
- package/dist/component/{text-area-rac-Bx0pgw80.js → text-area-rac-CF9pDP9d.js} +1 -1
- package/dist/component/{text-input-field-rac-Dyur2Wby.js → text-input-field-rac-BwIDZACz.js} +5 -5
- package/dist/component/{text-input-headless-DZ-Pjpm4.js → text-input-headless-5kQs2_Xu.js} +14 -14
- package/dist/component/{text-input-rac-BuBtJDX_.js → text-input-rac-CRmSuw1k.js} +1 -1
- package/dist/component/{time-input-rac-AlDEpfXZ.js → time-input-rac-BRMNpe51.js} +20 -20
- package/dist/component/{url-input-field-rac-BzP4-8yP.js → url-input-field-rac-CKLS3QDk.js} +17 -17
- package/dist/component/{url-input-rac-DaBXuedf.js → url-input-rac-Dv-kp50D.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BQi_qE_-.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-bAK8aHiG.js +96 -0
- package/dist/component/{use-element-state-class-name-DY0UyIQg.js → use-element-state-class-name-rXM_lHug.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C_Wh4Qfc.js → use-hoverable-input-class-name-BnV_uerV.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +53 -0
- package/dist/component/{use-service-options-base-DgSaAuGy.js → use-service-options-base-CLeE9-Tx.js} +10 -10
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +6 -0
- package/dist/form.d.ts +8 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-QZUxFX5e.js +0 -303
- package/dist/component/date-time-input-field-rac-DcwKQKHf.js +0 -433
- package/dist/component/dext-radio-group-rac-D8hMWNIQ.js +0 -18
- package/dist/component/dropdown-field-headless-Bv6LrkeA.js +0 -93
- package/dist/component/multiline-address-field-rac-jhcWn4wT.js +0 -1659
- package/dist/component/phone-input-field-rac-GxcQ_Pyl.js +0 -508
- package/dist/component/service-dropdown-rac-BfliE4hs.js +0 -145
- package/dist/component/use-dropdown-trigger-class-name-BKOFwNvc.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-Bw_IFUKt.js +0 -48
- package/dist/component/use-text-input-class-name-DFMQAg_E.js +0 -6
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import n, { useMemo as x, useCallback as S, useRef as te } from "react";
|
|
2
2
|
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
3
|
-
import
|
|
3
|
+
import v from "classnames";
|
|
4
4
|
import { ToggleButtonGroup as oe, TextField as re, Group as se, ToggleButton as ae, Input as le } from "react-aria-components";
|
|
5
5
|
import { debounce as ce } from "ts-debounce";
|
|
6
|
-
import {
|
|
7
|
-
import { f as
|
|
8
|
-
import { a as
|
|
9
|
-
import { D as fe, E as
|
|
10
|
-
import { L as
|
|
11
|
-
import { F as
|
|
6
|
+
import { aP as Y, bz as P, bw as T, bJ as ie, br as V, bB as ue, V as me, ab as pe, G as de, L as Ie, z as Ce, H as Ee } from "./form-DSpx-AO8.js";
|
|
7
|
+
import { f as O, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { a as J } from "./format-currency-BwShJ9vM.js";
|
|
9
|
+
import { D as fe, E as Oe } from "./field-error-headless-XNWmDH3E.js";
|
|
10
|
+
import { L as be } from "./field-label-headless-CORRAJGt.js";
|
|
11
|
+
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { a as _e, b as he } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
13
|
import { g as Ne } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
14
|
import { u as ge } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
15
|
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { s as
|
|
16
|
+
import { s as L } from "./field-rac.module-DP0lkkEv.js";
|
|
17
17
|
import { o as De } from "./options-rac.module-_THNq6Qq.js";
|
|
18
|
-
import { u as Se } from "./use-element-state-class-name-
|
|
19
|
-
import { u as
|
|
20
|
-
function
|
|
18
|
+
import { u as Se } from "./use-element-state-class-name-rXM_lHug.js";
|
|
19
|
+
import { u as ve } from "./use-text-input-class-name-DIKWvfkm.js";
|
|
20
|
+
function Le(e, t) {
|
|
21
21
|
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
22
22
|
}
|
|
23
23
|
function Re(e) {
|
|
24
|
-
return
|
|
24
|
+
return Le(e, "id");
|
|
25
25
|
}
|
|
26
26
|
const Ae = 0.01;
|
|
27
|
-
function
|
|
27
|
+
function Pe(e) {
|
|
28
28
|
var t;
|
|
29
29
|
return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function z(e, t) {
|
|
32
32
|
const o = Number(t || "0");
|
|
33
33
|
return {
|
|
34
34
|
productId: e.id,
|
|
35
|
-
price: e.priceType ===
|
|
35
|
+
price: e.priceType === Y.DYNAMIC_PRICE ? o : String(o),
|
|
36
36
|
quantity: 1
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return e.find((t) => t.priceType ===
|
|
39
|
+
function Te(e) {
|
|
40
|
+
return e.find((t) => t.priceType === Y.DYNAMIC_PRICE);
|
|
41
41
|
}
|
|
42
42
|
function Be(e, t) {
|
|
43
43
|
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
44
44
|
}
|
|
45
45
|
const s = ({ children: e }) => {
|
|
46
|
-
const { id: t, value: o, onChange: r, required: l, onBlur: i, onFocus: C, validation: u, addOther: E, addOtherPlaceholder:
|
|
46
|
+
const { id: t, value: o, onChange: r, required: l, onBlur: i, onFocus: C, validation: u, addOther: E, addOtherPlaceholder: p, FieldLayout: f } = P(), { inputId: c, labelId: d, ariaDescribedBy: y } = T(), { t: m } = ie(), { currency: g, regionalFormat: _ } = V(), b = o == null ? void 0 : o[0], D = x(() => {
|
|
47
47
|
var I, h;
|
|
48
48
|
return ((h = (I = u == null ? void 0 : u.predefined) == null ? void 0 : I.paymentOptions) == null ? void 0 : h.products) || [];
|
|
49
49
|
}, [
|
|
50
50
|
u
|
|
51
51
|
]), B = x(() => Re(D), [
|
|
52
52
|
D
|
|
53
|
-
]), a = x(() => E ?
|
|
53
|
+
]), a = x(() => E ? Te(D) : void 0, [
|
|
54
54
|
D,
|
|
55
55
|
E
|
|
56
|
-
]),
|
|
57
|
-
sourceValue:
|
|
56
|
+
]), K = Be(b, a), [H, M] = ge({
|
|
57
|
+
sourceValue: K,
|
|
58
58
|
format: (I) => he(String(I ?? ""), _),
|
|
59
59
|
regionalFormat: _
|
|
60
60
|
}), q = S((I) => {
|
|
61
61
|
const h = I === void 0 ? void 0 : B[I];
|
|
62
62
|
r(h ? [
|
|
63
|
-
|
|
63
|
+
z(h, Pe(h))
|
|
64
64
|
] : []), M("");
|
|
65
65
|
}, [
|
|
66
66
|
r,
|
|
@@ -68,59 +68,59 @@ const s = ({ children: e }) => {
|
|
|
68
68
|
M
|
|
69
69
|
]), k = S((I) => {
|
|
70
70
|
a && r(typeof I == "number" ? [
|
|
71
|
-
|
|
71
|
+
z(a, String(I))
|
|
72
72
|
] : []);
|
|
73
73
|
}, [
|
|
74
74
|
r,
|
|
75
75
|
a
|
|
76
|
-
]),
|
|
76
|
+
]), G = x(() => ce(k, 500), [
|
|
77
77
|
k
|
|
78
|
-
]),
|
|
79
|
-
(
|
|
80
|
-
const { validInput: h, validNumber: ee } = _e(I.target.value, Ae,
|
|
81
|
-
M(h),
|
|
78
|
+
]), Q = S((I) => {
|
|
79
|
+
(b == null ? void 0 : b.productId) !== (a == null ? void 0 : a.id) && r(void 0);
|
|
80
|
+
const { validInput: h, validNumber: ee } = _e(I.target.value, Ae, H, _);
|
|
81
|
+
M(h), G(ee);
|
|
82
82
|
}, [
|
|
83
83
|
_,
|
|
84
84
|
r,
|
|
85
|
-
|
|
85
|
+
b,
|
|
86
86
|
a,
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
H,
|
|
88
|
+
G,
|
|
89
89
|
M
|
|
90
|
-
]), U = (
|
|
90
|
+
]), U = (b == null ? void 0 : b.productId) || null, W = S(() => {
|
|
91
91
|
a != null && a.id && U !== a.id && q(a.id);
|
|
92
92
|
}, [
|
|
93
93
|
a == null ? void 0 : a.id,
|
|
94
94
|
U,
|
|
95
95
|
q
|
|
96
|
-
]),
|
|
96
|
+
]), j = O(e, s.Label), w = O(e, s.Control), X = O(e, s.Description), Z = O(e, s.Error);
|
|
97
97
|
return /* @__PURE__ */ n.createElement(f, {
|
|
98
98
|
fieldId: t,
|
|
99
|
-
renderLabel: () =>
|
|
100
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
99
|
+
renderLabel: () => j,
|
|
100
|
+
renderInput: () => /* @__PURE__ */ n.createElement(ye, {
|
|
101
101
|
id: c,
|
|
102
|
-
ariaLabelledBy:
|
|
103
|
-
ariaDescribedBy:
|
|
102
|
+
ariaLabelledBy: d,
|
|
103
|
+
ariaDescribedBy: y,
|
|
104
104
|
required: l,
|
|
105
105
|
onBlur: i,
|
|
106
106
|
onFocus: C
|
|
107
|
-
},
|
|
107
|
+
}, w ? F(w, {
|
|
108
108
|
productsById: B,
|
|
109
109
|
selectedValue: U,
|
|
110
110
|
onSelectProduct: q,
|
|
111
111
|
addOther: E,
|
|
112
|
-
customAmount:
|
|
113
|
-
onCustomAmountInputChange:
|
|
112
|
+
customAmount: H,
|
|
113
|
+
onCustomAmountInputChange: Q,
|
|
114
114
|
currency: g,
|
|
115
115
|
t: m,
|
|
116
|
-
placeholder:
|
|
116
|
+
placeholder: p === void 0 ? m("donation.other-option.placeholder") : p,
|
|
117
117
|
customAmountProductId: a == null ? void 0 : a.id,
|
|
118
|
-
onFocusCustomInput:
|
|
118
|
+
onFocusCustomInput: W
|
|
119
119
|
}) : null),
|
|
120
120
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, Z, X)
|
|
121
121
|
});
|
|
122
122
|
}, Me = ({ children: e, className: t, ...o }) => {
|
|
123
|
-
const { productsById: r, selectedValue: l, onSelectProduct: i, addOther: C, customAmount: u, onCustomAmountInputChange: E, currency:
|
|
123
|
+
const { productsById: r, selectedValue: l, onSelectProduct: i, addOther: C, customAmount: u, onCustomAmountInputChange: E, currency: p, t: f, placeholder: c, customAmountProductId: d, onFocusCustomInput: y } = o, { hasError: m } = P(), g = O(e, s.Options), _ = O(e, s.OtherInput);
|
|
124
124
|
return /* @__PURE__ */ n.createElement("div", {
|
|
125
125
|
className: t,
|
|
126
126
|
"data-invalid": m
|
|
@@ -131,18 +131,18 @@ const s = ({ children: e }) => {
|
|
|
131
131
|
}) : null, _ && C ? F(_, {
|
|
132
132
|
customAmount: u,
|
|
133
133
|
onCustomAmountInputChange: E,
|
|
134
|
-
currency:
|
|
134
|
+
currency: p,
|
|
135
135
|
t: f,
|
|
136
136
|
placeholder: c,
|
|
137
|
-
customAmountProductId:
|
|
138
|
-
onFocusCustomInput:
|
|
137
|
+
customAmountProductId: d,
|
|
138
|
+
onFocusCustomInput: y
|
|
139
139
|
}) : null);
|
|
140
140
|
}, $ = ({ children: e, className: t, ...o }) => {
|
|
141
|
-
const { productsById: r, selectedValue: l, onSelectProduct: i } = o, { options: C, numberOfColumns: u, disabled: E } =
|
|
141
|
+
const { productsById: r, selectedValue: l, onSelectProduct: i } = o, { options: C, numberOfColumns: u, disabled: E } = P(), { labelId: p } = T(), f = O(e, $.Option);
|
|
142
142
|
return /* @__PURE__ */ n.createElement(oe, {
|
|
143
143
|
className: t,
|
|
144
144
|
"data-columns": u,
|
|
145
|
-
"aria-labelledby":
|
|
145
|
+
"aria-labelledby": p,
|
|
146
146
|
selectionMode: "single",
|
|
147
147
|
selectedKeys: l ? [
|
|
148
148
|
l
|
|
@@ -153,36 +153,36 @@ const s = ({ children: e }) => {
|
|
|
153
153
|
isDisabled: E
|
|
154
154
|
}, C.map((c) => {
|
|
155
155
|
var m;
|
|
156
|
-
const
|
|
156
|
+
const d = r[c.value], y = (m = d == null ? void 0 : d.fixedPriceOptions) == null ? void 0 : m.price;
|
|
157
157
|
return F(f, {
|
|
158
158
|
key: c.value,
|
|
159
159
|
value: c.value,
|
|
160
|
-
price:
|
|
160
|
+
price: y || "0"
|
|
161
161
|
});
|
|
162
162
|
}));
|
|
163
163
|
}, R = ({ children: e, className: t, ...o }) => {
|
|
164
|
-
const { value: r, price: l } = o, { id: i, hasError: C } =
|
|
164
|
+
const { value: r, price: l } = o, { id: i, hasError: C } = P(), { currency: u, regionalFormat: E } = V(), p = O(e, R.Value), f = O(e, R.Currency), { isCurrencyPrefixed: c } = J({
|
|
165
165
|
amount: l,
|
|
166
166
|
currency: u == null ? void 0 : u.code,
|
|
167
167
|
locale: E
|
|
168
|
-
}),
|
|
168
|
+
}), d = te(null);
|
|
169
169
|
ue(() => {
|
|
170
170
|
var m;
|
|
171
|
-
(m =
|
|
171
|
+
(m = d.current) == null || m.focus({
|
|
172
172
|
preventScroll: !0
|
|
173
173
|
});
|
|
174
174
|
}, i);
|
|
175
|
-
const
|
|
175
|
+
const y = p ? F(p, {
|
|
176
176
|
price: l
|
|
177
177
|
}) : null;
|
|
178
178
|
return /* @__PURE__ */ n.createElement(ae, {
|
|
179
179
|
id: r,
|
|
180
180
|
className: t,
|
|
181
|
-
ref:
|
|
181
|
+
ref: d,
|
|
182
182
|
"data-invalid": C || void 0
|
|
183
|
-
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && f,
|
|
183
|
+
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && f, y, !c && f));
|
|
184
184
|
}, xe = ({ className: e, ...t }) => {
|
|
185
|
-
const { price: o } = t, { currency: r, regionalFormat: l } =
|
|
185
|
+
const { price: o } = t, { currency: r, regionalFormat: l } = V(), { value: i } = J({
|
|
186
186
|
amount: o,
|
|
187
187
|
currency: r == null ? void 0 : r.code,
|
|
188
188
|
locale: l
|
|
@@ -190,16 +190,16 @@ const s = ({ children: e }) => {
|
|
|
190
190
|
return /* @__PURE__ */ n.createElement("span", {
|
|
191
191
|
className: e
|
|
192
192
|
}, i);
|
|
193
|
-
},
|
|
194
|
-
const { currency: t } =
|
|
193
|
+
}, Ve = ({ className: e }) => {
|
|
194
|
+
const { currency: t } = V();
|
|
195
195
|
return /* @__PURE__ */ n.createElement("span", {
|
|
196
196
|
className: e
|
|
197
197
|
}, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
|
|
198
198
|
};
|
|
199
199
|
R.Value = xe;
|
|
200
|
-
R.Currency =
|
|
200
|
+
R.Currency = Ve;
|
|
201
201
|
const A = ({ children: e, className: t, ...o }) => {
|
|
202
|
-
const { customAmount: r, onCustomAmountInputChange: l, currency: i, t: C, placeholder: u, customAmountProductId: E, onFocusCustomInput:
|
|
202
|
+
const { customAmount: r, onCustomAmountInputChange: l, currency: i, t: C, placeholder: u, customAmountProductId: E, onFocusCustomInput: p } = o, { disabled: f, hasError: c } = P(), { labelId: d, prefixId: y } = T(), m = O(e, A.Currency), g = O(e, A.Value), _ = S((D) => {
|
|
203
203
|
l({
|
|
204
204
|
target: {
|
|
205
205
|
value: D
|
|
@@ -207,16 +207,16 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
207
207
|
});
|
|
208
208
|
}, [
|
|
209
209
|
l
|
|
210
|
-
]),
|
|
211
|
-
|
|
210
|
+
]), b = S(() => {
|
|
211
|
+
p();
|
|
212
212
|
}, [
|
|
213
|
-
|
|
213
|
+
p
|
|
214
214
|
]);
|
|
215
215
|
return /* @__PURE__ */ n.createElement(re, {
|
|
216
|
-
"aria-labelledby": `${
|
|
216
|
+
"aria-labelledby": `${d} ${y}`,
|
|
217
217
|
value: r,
|
|
218
218
|
onChange: _,
|
|
219
|
-
onFocus:
|
|
219
|
+
onFocus: b,
|
|
220
220
|
isDisabled: f,
|
|
221
221
|
isInvalid: c
|
|
222
222
|
}, /* @__PURE__ */ n.createElement(se, {
|
|
@@ -230,8 +230,8 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
230
230
|
placeholder: u,
|
|
231
231
|
customAmountProductId: E
|
|
232
232
|
}) : null));
|
|
233
|
-
},
|
|
234
|
-
const { currency: o, t: r } = t, { prefixId: l } =
|
|
233
|
+
}, He = ({ className: e, ...t }) => {
|
|
234
|
+
const { currency: o, t: r } = t, { prefixId: l } = T();
|
|
235
235
|
return /* @__PURE__ */ n.createElement("span", {
|
|
236
236
|
id: l,
|
|
237
237
|
"aria-hidden": !1,
|
|
@@ -239,7 +239,7 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
239
239
|
className: e
|
|
240
240
|
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
241
241
|
}, qe = ({ className: e, ...t }) => {
|
|
242
|
-
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: l, labelId: i, prefixId: C } =
|
|
242
|
+
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: l, labelId: i, prefixId: C } = T();
|
|
243
243
|
return /* @__PURE__ */ n.createElement(le, {
|
|
244
244
|
id: r,
|
|
245
245
|
"aria-labelledby": `${i} ${C}`,
|
|
@@ -250,43 +250,43 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
250
250
|
className: e
|
|
251
251
|
});
|
|
252
252
|
};
|
|
253
|
-
A.Currency =
|
|
253
|
+
A.Currency = He;
|
|
254
254
|
A.Value = qe;
|
|
255
255
|
$.Option = R;
|
|
256
|
-
s.Label =
|
|
256
|
+
s.Label = be;
|
|
257
257
|
s.Control = Me;
|
|
258
258
|
s.Options = $;
|
|
259
259
|
s.OtherInput = A;
|
|
260
260
|
s.Description = fe;
|
|
261
|
-
s.Error =
|
|
262
|
-
const Ue = "
|
|
261
|
+
s.Error = Oe;
|
|
262
|
+
const Ue = "_control_lovol_1", $e = "_option_lovol_7", ke = "_optionHover_lovol_39", Ge = "_optionSelected_lovol_39", we = "_optionCurrency_lovol_92", ze = "_otherInput_lovol_96", Ye = "_otherInputCurrency_lovol_118", N = {
|
|
263
263
|
control: Ue,
|
|
264
264
|
option: $e,
|
|
265
265
|
optionHover: ke,
|
|
266
|
-
optionSelected:
|
|
267
|
-
optionCurrency:
|
|
268
|
-
otherInput:
|
|
269
|
-
otherInputCurrency:
|
|
270
|
-
},
|
|
266
|
+
optionSelected: Ge,
|
|
267
|
+
optionCurrency: we,
|
|
268
|
+
otherInput: ze,
|
|
269
|
+
otherInputCurrency: Ye
|
|
270
|
+
}, Je = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(ne, {
|
|
271
271
|
content: e,
|
|
272
272
|
locale: t
|
|
273
|
-
}),
|
|
273
|
+
}), Ke = {
|
|
274
274
|
base: N.option,
|
|
275
275
|
selected: N.optionSelected,
|
|
276
276
|
hover: N.optionHover
|
|
277
|
-
},
|
|
278
|
-
const e =
|
|
277
|
+
}, Qe = () => {
|
|
278
|
+
const e = ve(N.otherInput), t = Se({
|
|
279
279
|
globalClasses: Ee,
|
|
280
|
-
moduleClasses:
|
|
280
|
+
moduleClasses: Ke
|
|
281
281
|
});
|
|
282
282
|
return /* @__PURE__ */ n.createElement(s, null, /* @__PURE__ */ n.createElement(s.Label, {
|
|
283
|
-
className:
|
|
283
|
+
className: v(me, L.label)
|
|
284
284
|
}, /* @__PURE__ */ n.createElement(s.Label.Required, {
|
|
285
|
-
className:
|
|
285
|
+
className: v(pe, L.requiredMark)
|
|
286
286
|
})), /* @__PURE__ */ n.createElement(s.Control, {
|
|
287
287
|
className: N.control
|
|
288
288
|
}, /* @__PURE__ */ n.createElement(s.Options, {
|
|
289
|
-
className:
|
|
289
|
+
className: v(de, De.options, N.options)
|
|
290
290
|
}, /* @__PURE__ */ n.createElement(s.Options.Option, {
|
|
291
291
|
className: t
|
|
292
292
|
}, /* @__PURE__ */ n.createElement(s.Options.Option.Value, null), /* @__PURE__ */ n.createElement(s.Options.Option.Currency, {
|
|
@@ -296,13 +296,13 @@ const Ue = "_control_1sfyd_1", $e = "_option_1sfyd_7", ke = "_optionHover_1sfyd_
|
|
|
296
296
|
}, /* @__PURE__ */ n.createElement(s.OtherInput.Currency, {
|
|
297
297
|
className: N.otherInputCurrency
|
|
298
298
|
}), /* @__PURE__ */ n.createElement(s.OtherInput.Value, {
|
|
299
|
-
className:
|
|
299
|
+
className: L.innerInput
|
|
300
300
|
}))), /* @__PURE__ */ n.createElement(s.Error, {
|
|
301
|
-
className:
|
|
301
|
+
className: v(Ie, L.error)
|
|
302
302
|
}, /* @__PURE__ */ n.createElement(Fe, null), /* @__PURE__ */ n.createElement(s.Error.Text, null)), /* @__PURE__ */ n.createElement(s.Description, {
|
|
303
|
-
className:
|
|
304
|
-
},
|
|
305
|
-
}, Ct = () => /* @__PURE__ */ n.createElement(
|
|
303
|
+
className: v(Ce, L.description)
|
|
304
|
+
}, Je));
|
|
305
|
+
}, Ct = () => /* @__PURE__ */ n.createElement(Qe, null);
|
|
306
306
|
export {
|
|
307
307
|
Ct as DonationRAC
|
|
308
308
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { D as r } from "./dropdown-
|
|
5
|
-
import { C as
|
|
6
|
-
import { E as
|
|
7
|
-
import { H as
|
|
4
|
+
import { u as n, D as r } from "./use-dropdown-trigger-class-name-bAK8aHiG.js";
|
|
5
|
+
import { C as l } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
|
+
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
+
import { H as i } from "./custom-focus-class-_483Pkwp.js";
|
|
8
8
|
import { s as o } from "./field-rac.module-DP0lkkEv.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { V as p, ab as E, I as D, L as _, z as O } from "./form-DSpx-AO8.js";
|
|
10
|
+
import { u as R } from "./use-dropdown-option-class-name-BQi_qE_-.js";
|
|
11
11
|
const C = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: t,
|
|
13
13
|
locale: s
|
|
14
14
|
}), w = () => {
|
|
15
|
-
const t =
|
|
15
|
+
const t = n(o.dropdownTrigger), s = R(i);
|
|
16
16
|
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
17
|
-
className: a(
|
|
17
|
+
className: a(p, o.label)
|
|
18
18
|
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
19
|
-
className: a(
|
|
19
|
+
className: a(E, o.requiredMark)
|
|
20
20
|
})), /* @__PURE__ */ e.createElement(r.Trigger, {
|
|
21
21
|
className: t
|
|
22
|
-
}, /* @__PURE__ */ e.createElement(
|
|
22
|
+
}, /* @__PURE__ */ e.createElement(l, {
|
|
23
23
|
className: o.dropdownIcon
|
|
24
24
|
})), /* @__PURE__ */ e.createElement(r.Options, {
|
|
25
|
-
className: a(
|
|
25
|
+
className: a(D, o.selectPopover, o.dropdownPopover)
|
|
26
26
|
}, /* @__PURE__ */ e.createElement(r.Options.Option, {
|
|
27
27
|
className: s
|
|
28
28
|
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
29
|
-
className: a(
|
|
30
|
-
}, /* @__PURE__ */ e.createElement(
|
|
31
|
-
className: a(
|
|
29
|
+
className: a(_, o.error)
|
|
30
|
+
}, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
31
|
+
className: a(O, o.description)
|
|
32
32
|
}, C));
|
|
33
33
|
};
|
|
34
34
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o, { useMemo as n } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { C as l } from "./checkbox-field-rac-
|
|
2
|
+
import { bz as a, bJ as c, aB as i } from "./form-DSpx-AO8.js";
|
|
3
|
+
import { C as l } from "./checkbox-field-rac-CyoBb6Yf.js";
|
|
4
4
|
const p = (e) => ({
|
|
5
5
|
nodes: [
|
|
6
6
|
{
|