@wix/form-elements 1.136.0 → 1.137.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-DsD7xLmb.js → appointment-rac-DETLNlLb.js} +4 -4
- package/dist/component/{bookings-address-rac-ByaFu51U.js → bookings-address-rac-ZLK-g-4b.js} +1 -1
- package/dist/component/{bookings-email-rac-CxuvkcYw.js → bookings-email-rac-C-406Pj1.js} +1 -1
- package/dist/component/{bookings-first-name-rac-JXLJa_7E.js → bookings-first-name-rac-ClxJPAU2.js} +1 -1
- package/dist/component/{bookings-header-rac-CIQTbf9d.js → bookings-header-rac-B_xKyowA.js} +1 -1
- package/dist/component/{bookings-last-name-rac-_2Xt4BPe.js → bookings-last-name-rac-DcExtGsO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BUjys5i9.js → bookings-login-bar-rac-B5Gpk-kG.js} +1 -1
- package/dist/component/{bookings-phone-rac-DlsdGmOt.js → bookings-phone-rac-DJSSDoRL.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BvRdhL7M.js → bookings-rich-text-rac-D-v6z1Fs.js} +1 -1
- package/dist/component/{checkbox-field-rac-Be6wicaA.js → checkbox-field-rac-DJmjpsmU.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-BJ0pGvXi.js → checkbox-group-field-headless-C4A_Kv1U.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-D7xqqVf6.js → checkbox-group-field-rac-M1l5h3ii.js} +4 -4
- package/dist/component/{checkbox-group-rac-DtCS-gEH.js → checkbox-group-rac-DRdzHVfR.js} +1 -1
- package/dist/component/{checkbox-rac-ub7MFwY-.js → checkbox-rac-Cyhg2Wvd.js} +1 -1
- package/dist/component/{contacts-address-rac-Bwsdpg11.js → contacts-address-rac-BQvrTPCI.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-D54hibhb.js → contacts-birthdate-rac-DIMg-UlR.js} +1 -1
- package/dist/component/{contacts-company-rac-CKqzgKio.js → contacts-company-rac-OgWSVsmZ.js} +1 -1
- package/dist/component/{contacts-email-rac-Dxm31wuY.js → contacts-email-rac-39IQYxTe.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CXHsx6Vy.js → contacts-first-name-rac-CjwVQGS7.js} +1 -1
- package/dist/component/{contacts-last-name-rac-B0S268f3.js → contacts-last-name-rac-C6ftvjMG.js} +1 -1
- package/dist/component/{contacts-phone-rac-DEbgIiEj.js → contacts-phone-rac-ldsxrFQH.js} +1 -1
- package/dist/component/{contacts-position-rac-D31uoOlR.js → contacts-position-rac-3RzQeh2P.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DJ8NtoxZ.js → contacts-subscribe-rac-CfuH705u.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-DTQffHAo.js → contacts-tax-id-rac-D85Dm5Pa.js} +1 -1
- package/dist/component/{date-availability-DmhJ9apH.js → date-availability-DcYOAszO.js} +1 -1
- package/dist/component/{date-input-field-rac-BwM_q4FW.js → date-input-field-rac-D4cr7NGI.js} +6 -6
- package/dist/component/{date-input-rac-C93pgocp.js → date-input-rac-BwJwmoZr.js} +1 -1
- package/dist/component/{date-picker-field-rac-CtZL368W.js → date-picker-field-rac-C-IM7SHk.js} +5 -5
- package/dist/component/{date-picker-rac-4DNe6hOX.js → date-picker-rac-BkAp8Bgb.js} +1 -1
- package/dist/component/{date-time-input-field-rac-MlCVy3Oz.js → date-time-input-field-rac-DGCd-WUh.js} +6 -6
- package/dist/component/{date-time-input-rac-ByyBvFgo.js → date-time-input-rac-ClLzxACj.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BP76Xwiq.js → dext-checkbox-group-rac-DI26D3eR.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DGaKSh4Z.js → dext-checkbox-rac-CRJq1RxN.js} +1 -1
- package/dist/component/{dext-date-picker-rac-UEXbMSlL.js → dext-date-picker-rac-CvzQs_Te.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CsJcGK4I.js → dext-date-time-input-rac-Dtysjtim.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BzbRzloh.js → dext-dropdown-rac-DHGo26Az.js} +1 -1
- package/dist/component/{dext-email-rac-DufFAnTi.js → dext-email-rac-BpnNEdVF.js} +1 -1
- package/dist/component/{dext-number-input-rac-D6xXi7B2.js → dext-number-input-rac-C5iW_ei6.js} +1 -1
- package/dist/component/{dext-phone-rac-svy9CDHW.js → dext-phone-rac-KCTWlcaK.js} +1 -1
- package/dist/component/{dext-radio-group-rac-C4p9NuQS.js → dext-radio-group-rac-ad6j8I4s.js} +2 -2
- package/dist/component/{dext-rating-input-rac-wJ7-RFFN.js → dext-rating-input-rac-B4AvCMi0.js} +1 -1
- package/dist/component/{dext-tags-rac-D2myHrSZ.js → dext-tags-rac-BMathc_H.js} +2 -2
- package/dist/component/{dext-text-area-rac-B4Fw_9mF.js → dext-text-area-rac-Xb-pGhSZ.js} +1 -1
- package/dist/component/{dext-text-input-rac-DlZanFMT.js → dext-text-input-rac-CSE8qfGF.js} +1 -1
- package/dist/component/{dext-url-input-rac-DYjl3wuk.js → dext-url-input-rac-Bq4iz5z9.js} +1 -1
- package/dist/component/donation-rac-DRUbysCr.js +306 -0
- package/dist/component/{dropdown-field-headless-BAt2RoAH.js → dropdown-field-headless-DO592qOP.js} +5 -5
- package/dist/component/{dropdown-field-rac-DFjn3ecV.js → dropdown-field-rac-C2yjQI-C.js} +4 -4
- package/dist/component/{dropdown-rac-DQ6keNRI.js → dropdown-rac-DlrGt2kE.js} +1 -1
- package/dist/component/{ecom-address-rac-j1T2zp0k.js → ecom-address-rac-D_StW_li.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-viTaRZsk.js → ecom-subscription-checkbox-rac-CrdttyUU.js} +2 -2
- package/dist/component/{email-input-field-rac-5eb-1w7B.js → email-input-field-rac-DqXazwV3.js} +3 -3
- package/dist/component/{events-repeater-rac-BtcoN_Ra.js → events-repeater-rac-DDpRs7rY.js} +4 -4
- package/dist/component/{events-rsvp-rac-DSzFEmty.js → events-rsvp-rac-BN9axMYX.js} +3 -3
- package/dist/component/{field-error-headless-Bpe041x2.js → field-error-headless-JU1yiTVE.js} +1 -1
- package/dist/component/{field-label-headless-BUuK1Ftv.js → field-label-headless-CD4_8Ros.js} +1 -1
- package/dist/component/{file-upload-rac-CfU8Ygwq.js → file-upload-rac-CQTx6hEf.js} +4 -4
- package/dist/component/{fixed-payment-rac-CYp7zNq8.js → fixed-payment-rac-B5cRBcxY.js} +3 -3
- package/dist/component/{form-C6lnbh2O.js → form-Mla9_phC.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-B7YfrhId.js → header-field-rac-B_F66ChH.js} +2 -2
- package/dist/component/{header-rac-BtJKAKAz.js → header-rac-BX6Df8ej.js} +1 -1
- package/dist/component/{image-choice-rac-Bmq7Pyg6.js → image-choice-rac-Ce01EhFJ.js} +4 -4
- package/dist/component/{index-CQdUOkIN.js → index-Ch7II1GU.js} +2 -2
- package/dist/component/{index-BjPSeVyh.js → index-DoIW9Cb6.js} +4 -4
- package/dist/component/{isObjectLike-CxNqKfU5.js → isObjectLike-C1TnJWn6.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BeiUJWKd.js → multiline-address-field-rac-DVDEcHtq.js} +7 -7
- package/dist/component/{multiline-address-rac-B2mocF6M.js → multiline-address-rac-BJ8ln_G5.js} +1 -1
- package/dist/component/{number-input-field-rac-CQX7_S2O.js → number-input-field-rac-DTfx9YgL.js} +4 -4
- package/dist/component/{number-input-rac-BZri-E8P.js → number-input-rac-pg7cmYpS.js} +1 -1
- package/dist/component/{password-rac-CdwrtDJU.js → password-rac-D8BKTB_H.js} +4 -4
- package/dist/component/{payment-input-rac-ClQiqmjm.js → payment-input-rac-HBquclKy.js} +4 -4
- package/dist/component/{phone-input-field-rac-BtG_Rado.js → phone-input-field-rac-Fgfg5HwA.js} +6 -6
- package/dist/component/{phone-rac-CdcAMa5E.js → phone-rac-pivMTIyc.js} +1 -1
- package/dist/component/{product-list-rac-Dp_YK6mo.js → product-list-rac-DauIxK2R.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-CorojxKD.js → quiz-radio-group-rac-B0OtjxKf.js} +1 -1
- package/dist/component/{radio-button-module-classes-ZX12Fyj4.js → radio-button-module-classes-Cu3KM625.js} +3 -3
- package/dist/component/{radio-group-field-rac-BifCDpE4.js → radio-group-field-rac-0dJHtf3G.js} +4 -4
- package/dist/component/{radio-group-rac-CJ2fzqnY.js → radio-group-rac-CqtO1JqM.js} +1 -1
- package/dist/component/{rating-input-field-rac-Dg1T0DZW.js → rating-input-field-rac-CMny6OSF.js} +4 -4
- package/dist/component/{rating-input-rac-Ba4YK13i.js → rating-input-rac-DA4iU_-m.js} +1 -1
- package/dist/component/{rich-content-rac.module-BehwBL3L.js → rich-content-rac.module-CZX0cZst.js} +1 -1
- package/dist/component/{rich-text-field-rac-DtIWdB-S.js → rich-text-field-rac-Dtm6xFcj.js} +2 -2
- package/dist/component/{rich-text-rac-BX4eDDFw.js → rich-text-rac-ClqIW5ds.js} +1 -1
- package/dist/component/{service-dropdown-rac-68WLBlsa.js → service-dropdown-rac-_4T1OZGq.js} +5 -5
- package/dist/component/{services-multi-choice-rac-8yNdAHfS.js → services-multi-choice-rac-BVim-jnM.js} +5 -5
- package/dist/component/{signature-rac-DeVOyl5O.js → signature-rac-D7w8WTLO.js} +4 -4
- package/dist/component/{submit-button-rac-IOr1g-G-.js → submit-button-rac-BkUDj1dU.js} +2 -2
- package/dist/component/{tags-field-rac-DaiMlAxt.js → tags-field-rac-Di1aK4E2.js} +5 -5
- package/dist/component/{tags-rac-BgrUkY0A.js → tags-rac-CJ5f4Doi.js} +1 -1
- package/dist/component/{text-area-field-rac-CLPZEY93.js → text-area-field-rac-DFjrT9fs.js} +4 -4
- package/dist/component/{text-area-rac-C8PdPSzX.js → text-area-rac-DBANidv_.js} +1 -1
- package/dist/component/{text-input-field-rac-Dm-xU8Rg.js → text-input-field-rac-DJDzqR6d.js} +3 -3
- package/dist/component/{text-input-headless-BEmRjL8Z.js → text-input-headless-CG4wbxMG.js} +3 -3
- package/dist/component/{text-input-rac-C-FnaOXT.js → text-input-rac-V0tK1Gj2.js} +1 -1
- package/dist/component/{time-input-rac-VmTURkiK.js → time-input-rac-LSoyg8Ao.js} +4 -4
- package/dist/component/{url-input-field-rac-CnnS0tVx.js → url-input-field-rac-DI0SdDI0.js} +4 -4
- package/dist/component/{url-input-rac-6nd_ccoP.js → url-input-rac-obx2Uf2F.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CcZl1qrj.js → use-dropdown-option-class-name-BM-NiVtO.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-BNc0mkdK.js → use-dropdown-trigger-class-name-BHwQ-wZa.js} +2 -2
- package/dist/component/{use-element-state-class-name-BU6RXqBy.js → use-element-state-class-name-DAYz5X_i.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-CkXPkbiP.js → use-hoverable-input-class-name-DZ-4NGpv.js} +2 -2
- package/dist/component/{use-service-options-base-B5afDbnr.js → use-service-options-base-BOjt2sg9.js} +1 -1
- package/dist/component/use-text-input-class-name-Bqj4OoIw.js +6 -0
- package/package.json +2 -2
- package/dist/component/donation-rac-B6LwJxik.js +0 -314
- package/dist/component/use-text-input-class-name-BB3V6Q0b.js +0 -6
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import n, { useMemo as q, useCallback as S, useRef as te } from "react";
|
|
2
|
+
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
3
|
+
import L from "classnames";
|
|
4
|
+
import { ToggleButtonGroup as oe, TextField as re, Group as se, ToggleButton as ae, Input as le } from "react-aria-components";
|
|
5
|
+
import { debounce as ce } from "ts-debounce";
|
|
6
|
+
import { az as j, bj as T, bg as P, bt as ie, bb as x, bl as ue, M as me, Y as pe, v as de, G as Ie, u as Ce, w as Ee } from "./form-Mla9_phC.js";
|
|
7
|
+
import { f as O, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { a as z } from "./format-currency-BwShJ9vM.js";
|
|
9
|
+
import { D as fe, E as Oe } from "./field-error-headless-JU1yiTVE.js";
|
|
10
|
+
import { L as be } from "./field-label-headless-CD4_8Ros.js";
|
|
11
|
+
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
+
import { a as _e, b as he } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
|
+
import { g as Ne } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
|
+
import { u as ge } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
|
+
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
+
import { s as v } from "./field-rac.module-DfEb7pBp.js";
|
|
17
|
+
import { o as De } from "./options-rac.module-_THNq6Qq.js";
|
|
18
|
+
import { u as Se } from "./use-element-state-class-name-DAYz5X_i.js";
|
|
19
|
+
import { u as Le } from "./use-text-input-class-name-Bqj4OoIw.js";
|
|
20
|
+
function ve(e, t) {
|
|
21
|
+
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
22
|
+
}
|
|
23
|
+
function Re(e) {
|
|
24
|
+
return ve(e, "id");
|
|
25
|
+
}
|
|
26
|
+
const Ae = 0.01;
|
|
27
|
+
function Te(e) {
|
|
28
|
+
var t;
|
|
29
|
+
return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
|
|
30
|
+
}
|
|
31
|
+
function w(e, t) {
|
|
32
|
+
const o = Number(t || "0");
|
|
33
|
+
return {
|
|
34
|
+
productId: e.id,
|
|
35
|
+
price: e.priceType === j.DYNAMIC_PRICE ? o : String(o),
|
|
36
|
+
quantity: 1
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function Pe(e) {
|
|
40
|
+
return e.find((t) => t.priceType === j.DYNAMIC_PRICE);
|
|
41
|
+
}
|
|
42
|
+
function Me(e, t) {
|
|
43
|
+
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
44
|
+
}
|
|
45
|
+
const s = ({ children: e }) => {
|
|
46
|
+
const { id: t, value: o, onChange: r, required: l, onBlur: i, onFocus: C, validation: u, addOther: E, addOtherPlaceholder: p, FieldLayout: f } = T(), { inputId: c, labelId: d, ariaDescribedBy: y } = P(), { t: m } = ie(), { currency: g, regionalFormat: _ } = x(), b = o == null ? void 0 : o[0], D = q(() => {
|
|
47
|
+
var I, h;
|
|
48
|
+
return ((h = (I = u == null ? void 0 : u.predefined) == null ? void 0 : I.paymentOptions) == null ? void 0 : h.products) || [];
|
|
49
|
+
}, [
|
|
50
|
+
u
|
|
51
|
+
]), M = q(() => Re(D), [
|
|
52
|
+
D
|
|
53
|
+
]), a = q(() => E ? Pe(D) : void 0, [
|
|
54
|
+
D,
|
|
55
|
+
E
|
|
56
|
+
]), K = Me(b, a), [V, B] = ge({
|
|
57
|
+
sourceValue: K,
|
|
58
|
+
format: (I) => he(String(I ?? ""), _),
|
|
59
|
+
regionalFormat: _
|
|
60
|
+
}), H = S((I) => {
|
|
61
|
+
const h = I === void 0 ? void 0 : M[I];
|
|
62
|
+
r(h ? [
|
|
63
|
+
w(h, Te(h))
|
|
64
|
+
] : []), B("");
|
|
65
|
+
}, [
|
|
66
|
+
r,
|
|
67
|
+
M,
|
|
68
|
+
B
|
|
69
|
+
]), k = S((I) => {
|
|
70
|
+
a && r(typeof I == "number" ? [
|
|
71
|
+
w(a, String(I))
|
|
72
|
+
] : []);
|
|
73
|
+
}, [
|
|
74
|
+
r,
|
|
75
|
+
a
|
|
76
|
+
]), G = q(() => ce(k, 500), [
|
|
77
|
+
k
|
|
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, V, _);
|
|
81
|
+
B(h), G(ee);
|
|
82
|
+
}, [
|
|
83
|
+
_,
|
|
84
|
+
r,
|
|
85
|
+
b,
|
|
86
|
+
a,
|
|
87
|
+
V,
|
|
88
|
+
G,
|
|
89
|
+
B
|
|
90
|
+
]), U = (b == null ? void 0 : b.productId) || null, W = S(() => {
|
|
91
|
+
a != null && a.id && U !== a.id && H(a.id);
|
|
92
|
+
}, [
|
|
93
|
+
a == null ? void 0 : a.id,
|
|
94
|
+
U,
|
|
95
|
+
H
|
|
96
|
+
]), J = O(e, s.Label), Y = O(e, s.Control), X = O(e, s.Description), Z = O(e, s.Error);
|
|
97
|
+
return /* @__PURE__ */ n.createElement(f, {
|
|
98
|
+
fieldId: t,
|
|
99
|
+
renderLabel: () => J,
|
|
100
|
+
renderInput: () => /* @__PURE__ */ n.createElement(ye, {
|
|
101
|
+
id: c,
|
|
102
|
+
ariaLabelledBy: d,
|
|
103
|
+
ariaDescribedBy: y,
|
|
104
|
+
required: l,
|
|
105
|
+
onBlur: i,
|
|
106
|
+
onFocus: C
|
|
107
|
+
}, Y ? F(Y, {
|
|
108
|
+
productsById: M,
|
|
109
|
+
selectedValue: U,
|
|
110
|
+
onSelectProduct: H,
|
|
111
|
+
addOther: E,
|
|
112
|
+
customAmount: V,
|
|
113
|
+
onCustomAmountInputChange: Q,
|
|
114
|
+
currency: g,
|
|
115
|
+
t: m,
|
|
116
|
+
placeholder: p === void 0 ? m("donation.other-option.placeholder") : p,
|
|
117
|
+
customAmountProductId: a == null ? void 0 : a.id,
|
|
118
|
+
onFocusCustomInput: W
|
|
119
|
+
}) : null),
|
|
120
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, Z, X)
|
|
121
|
+
});
|
|
122
|
+
}, Be = ({ children: e, className: t, ...o }) => {
|
|
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 } = T(), g = O(e, s.Options), _ = O(e, s.OtherInput);
|
|
124
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
125
|
+
className: t,
|
|
126
|
+
"data-invalid": m
|
|
127
|
+
}, g ? F(g, {
|
|
128
|
+
productsById: r,
|
|
129
|
+
selectedValue: l,
|
|
130
|
+
onSelectProduct: i
|
|
131
|
+
}) : null, _ && C ? F(_, {
|
|
132
|
+
customAmount: u,
|
|
133
|
+
onCustomAmountInputChange: E,
|
|
134
|
+
currency: p,
|
|
135
|
+
t: f,
|
|
136
|
+
placeholder: c,
|
|
137
|
+
customAmountProductId: d,
|
|
138
|
+
onFocusCustomInput: y
|
|
139
|
+
}) : null);
|
|
140
|
+
}, $ = ({ children: e, className: t, ...o }) => {
|
|
141
|
+
const { productsById: r, selectedValue: l, onSelectProduct: i } = o, { options: C, numberOfColumns: u, disabled: E } = T(), { labelId: p } = P(), f = O(e, $.Option);
|
|
142
|
+
return /* @__PURE__ */ n.createElement(oe, {
|
|
143
|
+
className: t,
|
|
144
|
+
"data-columns": u,
|
|
145
|
+
"aria-labelledby": p,
|
|
146
|
+
selectionMode: "single",
|
|
147
|
+
selectedKeys: l ? [
|
|
148
|
+
l
|
|
149
|
+
] : [],
|
|
150
|
+
onSelectionChange: (c) => i([
|
|
151
|
+
...c
|
|
152
|
+
][0]),
|
|
153
|
+
isDisabled: E
|
|
154
|
+
}, C.map((c) => {
|
|
155
|
+
var m;
|
|
156
|
+
const d = r[c.value], y = (m = d == null ? void 0 : d.fixedPriceOptions) == null ? void 0 : m.price;
|
|
157
|
+
return F(f, {
|
|
158
|
+
key: c.value,
|
|
159
|
+
value: c.value,
|
|
160
|
+
price: y || "0"
|
|
161
|
+
});
|
|
162
|
+
}));
|
|
163
|
+
}, R = ({ children: e, className: t, ...o }) => {
|
|
164
|
+
const { value: r, price: l } = o, { id: i, hasError: C } = T(), { currency: u, regionalFormat: E } = x(), p = O(e, R.Value), f = O(e, R.Currency), { isCurrencyPrefixed: c } = z({
|
|
165
|
+
amount: l,
|
|
166
|
+
currency: u == null ? void 0 : u.code,
|
|
167
|
+
locale: E
|
|
168
|
+
}), d = te(null);
|
|
169
|
+
ue(() => {
|
|
170
|
+
var m;
|
|
171
|
+
(m = d.current) == null || m.focus();
|
|
172
|
+
}, i);
|
|
173
|
+
const y = p ? F(p, {
|
|
174
|
+
price: l
|
|
175
|
+
}) : null;
|
|
176
|
+
return /* @__PURE__ */ n.createElement(ae, {
|
|
177
|
+
id: r,
|
|
178
|
+
className: t,
|
|
179
|
+
ref: d,
|
|
180
|
+
"data-invalid": C || void 0
|
|
181
|
+
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && f, y, !c && f));
|
|
182
|
+
}, qe = ({ className: e, ...t }) => {
|
|
183
|
+
const { price: o } = t, { currency: r, regionalFormat: l } = x(), { value: i } = z({
|
|
184
|
+
amount: o,
|
|
185
|
+
currency: r == null ? void 0 : r.code,
|
|
186
|
+
locale: l
|
|
187
|
+
});
|
|
188
|
+
return /* @__PURE__ */ n.createElement("span", {
|
|
189
|
+
className: e
|
|
190
|
+
}, i);
|
|
191
|
+
}, xe = ({ className: e }) => {
|
|
192
|
+
const { currency: t } = x();
|
|
193
|
+
return /* @__PURE__ */ n.createElement("span", {
|
|
194
|
+
className: e
|
|
195
|
+
}, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
|
|
196
|
+
};
|
|
197
|
+
R.Value = qe;
|
|
198
|
+
R.Currency = xe;
|
|
199
|
+
const A = ({ children: e, className: t, ...o }) => {
|
|
200
|
+
const { customAmount: r, onCustomAmountInputChange: l, currency: i, t: C, placeholder: u, customAmountProductId: E, onFocusCustomInput: p } = o, { disabled: f, hasError: c } = T(), { labelId: d, prefixId: y } = P(), m = O(e, A.Currency), g = O(e, A.Value), _ = S((D) => {
|
|
201
|
+
l({
|
|
202
|
+
target: {
|
|
203
|
+
value: D
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}, [
|
|
207
|
+
l
|
|
208
|
+
]), b = S(() => {
|
|
209
|
+
p();
|
|
210
|
+
}, [
|
|
211
|
+
p
|
|
212
|
+
]);
|
|
213
|
+
return /* @__PURE__ */ n.createElement(re, {
|
|
214
|
+
"aria-labelledby": `${d} ${y}`,
|
|
215
|
+
value: r,
|
|
216
|
+
onChange: _,
|
|
217
|
+
onFocus: b,
|
|
218
|
+
isDisabled: f,
|
|
219
|
+
isInvalid: c
|
|
220
|
+
}, /* @__PURE__ */ n.createElement(se, {
|
|
221
|
+
className: t,
|
|
222
|
+
isDisabled: f,
|
|
223
|
+
isInvalid: c
|
|
224
|
+
}, r && i && m ? F(m, {
|
|
225
|
+
currency: i,
|
|
226
|
+
t: C
|
|
227
|
+
}) : null, g ? F(g, {
|
|
228
|
+
placeholder: u,
|
|
229
|
+
customAmountProductId: E
|
|
230
|
+
}) : null));
|
|
231
|
+
}, Ve = ({ className: e, ...t }) => {
|
|
232
|
+
const { currency: o, t: r } = t, { prefixId: l } = P();
|
|
233
|
+
return /* @__PURE__ */ n.createElement("span", {
|
|
234
|
+
id: l,
|
|
235
|
+
"aria-hidden": !1,
|
|
236
|
+
"aria-label": Ne(r, o),
|
|
237
|
+
className: e
|
|
238
|
+
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
239
|
+
}, He = ({ className: e, ...t }) => {
|
|
240
|
+
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: l, labelId: i, prefixId: C } = P();
|
|
241
|
+
return /* @__PURE__ */ n.createElement(le, {
|
|
242
|
+
id: r,
|
|
243
|
+
"aria-labelledby": `${i} ${C}`,
|
|
244
|
+
"aria-describedby": l,
|
|
245
|
+
placeholder: o,
|
|
246
|
+
inputMode: "decimal",
|
|
247
|
+
autoComplete: "off",
|
|
248
|
+
className: e
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
A.Currency = Ve;
|
|
252
|
+
A.Value = He;
|
|
253
|
+
$.Option = R;
|
|
254
|
+
s.Label = be;
|
|
255
|
+
s.Control = Be;
|
|
256
|
+
s.Options = $;
|
|
257
|
+
s.OtherInput = A;
|
|
258
|
+
s.Description = fe;
|
|
259
|
+
s.Error = Oe;
|
|
260
|
+
const Ue = "_control_n5tqu_1", $e = "_option_n5tqu_7", ke = "_optionHover_n5tqu_37", Ge = "_optionSelected_n5tqu_37", Ye = "_optionCurrency_n5tqu_87", we = "_otherInput_n5tqu_91", je = "_otherInputCurrency_n5tqu_110", N = {
|
|
261
|
+
control: Ue,
|
|
262
|
+
option: $e,
|
|
263
|
+
optionHover: ke,
|
|
264
|
+
optionSelected: Ge,
|
|
265
|
+
optionCurrency: Ye,
|
|
266
|
+
otherInput: we,
|
|
267
|
+
otherInputCurrency: je
|
|
268
|
+
}, ze = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(ne, {
|
|
269
|
+
content: e,
|
|
270
|
+
locale: t
|
|
271
|
+
}), Ke = {
|
|
272
|
+
base: N.option,
|
|
273
|
+
selected: N.optionSelected,
|
|
274
|
+
hover: N.optionHover
|
|
275
|
+
}, Qe = () => {
|
|
276
|
+
const e = Le(N.otherInput), t = Se({
|
|
277
|
+
globalClasses: Ee,
|
|
278
|
+
moduleClasses: Ke
|
|
279
|
+
});
|
|
280
|
+
return /* @__PURE__ */ n.createElement(s, null, /* @__PURE__ */ n.createElement(s.Label, {
|
|
281
|
+
className: L(me, v.label)
|
|
282
|
+
}, /* @__PURE__ */ n.createElement(s.Label.Required, {
|
|
283
|
+
className: L(pe, v.requiredMark)
|
|
284
|
+
})), /* @__PURE__ */ n.createElement(s.Control, {
|
|
285
|
+
className: N.control
|
|
286
|
+
}, /* @__PURE__ */ n.createElement(s.Options, {
|
|
287
|
+
className: L(de, De.options, N.options)
|
|
288
|
+
}, /* @__PURE__ */ n.createElement(s.Options.Option, {
|
|
289
|
+
className: t
|
|
290
|
+
}, /* @__PURE__ */ n.createElement(s.Options.Option.Value, null), /* @__PURE__ */ n.createElement(s.Options.Option.Currency, {
|
|
291
|
+
className: N.optionCurrency
|
|
292
|
+
}))), /* @__PURE__ */ n.createElement(s.OtherInput, {
|
|
293
|
+
className: e
|
|
294
|
+
}, /* @__PURE__ */ n.createElement(s.OtherInput.Currency, {
|
|
295
|
+
className: N.otherInputCurrency
|
|
296
|
+
}), /* @__PURE__ */ n.createElement(s.OtherInput.Value, {
|
|
297
|
+
className: v.innerInput
|
|
298
|
+
}))), /* @__PURE__ */ n.createElement(s.Error, {
|
|
299
|
+
className: L(Ie, v.error)
|
|
300
|
+
}, /* @__PURE__ */ n.createElement(Fe, null), /* @__PURE__ */ n.createElement(s.Error.Text, null)), /* @__PURE__ */ n.createElement(s.Description, {
|
|
301
|
+
className: L(Ce, v.description)
|
|
302
|
+
}, ze));
|
|
303
|
+
}, Ct = () => /* @__PURE__ */ n.createElement(Qe, null);
|
|
304
|
+
export {
|
|
305
|
+
Ct as DonationRAC
|
|
306
|
+
};
|
package/dist/component/{dropdown-field-headless-BAt2RoAH.js → dropdown-field-headless-DO592qOP.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import e, { useState as b, useCallback as g, useRef as k } from "react";
|
|
2
2
|
import { UNSAFE_PortalProvider as q } from "react-aria";
|
|
3
3
|
import { Select as M, SelectValue as j, ListBoxItem as H } from "react-aria-components";
|
|
4
|
-
import { bj as E, bg as O, bl as U } from "./form-
|
|
4
|
+
import { bj as E, bg as O, bl as U } from "./form-Mla9_phC.js";
|
|
5
5
|
import { f as d, a as F } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as Y, E as z } from "./field-error-headless-
|
|
7
|
-
import { L as G } from "./field-label-headless-
|
|
6
|
+
import { D as Y, E as z } from "./field-error-headless-JU1yiTVE.js";
|
|
7
|
+
import { L as G } from "./field-label-headless-CD4_8Ros.js";
|
|
8
8
|
import { E as J, S as K, N as Q } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
-
import { a as W } from "./use-dropdown-trigger-class-name-
|
|
10
|
-
import { V as X } from "./use-dropdown-option-class-name-
|
|
9
|
+
import { a as W } from "./use-dropdown-trigger-class-name-BHwQ-wZa.js";
|
|
10
|
+
import { V as X } from "./use-dropdown-option-class-name-BM-NiVtO.js";
|
|
11
11
|
const r = ({ children: n }) => {
|
|
12
12
|
const { id: l, value: a, defaultValue: o, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: L, onFocus: y, FieldLayout: C, hasError: D } = E(), [I, h] = b(!1), p = W(l), [P, S] = b(null), T = a && u.some((c) => (c.value ?? c.label) === a) ? a : o || null, { labelId: B } = O(), N = g((c) => {
|
|
13
13
|
s || t(typeof c == "string" ? c : null);
|
|
@@ -1,14 +1,14 @@
|
|
|
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-field-headless-
|
|
4
|
+
import { D as r } from "./dropdown-field-headless-DO592qOP.js";
|
|
5
5
|
import { C as n } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
6
|
import { E as l } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { H as c } from "./custom-focus-class-_483Pkwp.js";
|
|
8
8
|
import { s as o } from "./field-rac.module-DfEb7pBp.js";
|
|
9
|
-
import { M as i, Y as p, O as E, G as _, u as D } from "./form-
|
|
10
|
-
import { u as O } from "./use-dropdown-option-class-name-
|
|
11
|
-
import { u as C } from "./use-dropdown-trigger-class-name-
|
|
9
|
+
import { M as i, Y as p, O as E, G as _, u as D } from "./form-Mla9_phC.js";
|
|
10
|
+
import { u as O } from "./use-dropdown-option-class-name-BM-NiVtO.js";
|
|
11
|
+
import { u as C } from "./use-dropdown-trigger-class-name-BHwQ-wZa.js";
|
|
12
12
|
const R = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
13
13
|
content: t,
|
|
14
14
|
locale: s
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o, { useMemo as n } from "react";
|
|
2
|
-
import { bj as a, bt as c, al as i } from "./form-
|
|
3
|
-
import { C as l } from "./checkbox-field-rac-
|
|
2
|
+
import { bj as a, bt as c, al as i } from "./form-Mla9_phC.js";
|
|
3
|
+
import { C as l } from "./checkbox-field-rac-DJmjpsmU.js";
|
|
4
4
|
const p = (e) => ({
|
|
5
5
|
nodes: [
|
|
6
6
|
{
|
package/dist/component/{email-input-field-rac-5eb-1w7B.js → email-input-field-rac-DqXazwV3.js}
RENAMED
|
@@ -2,7 +2,7 @@ import { RicosViewer as ie } from "@wix/ricos/viewer";
|
|
|
2
2
|
import D from "classnames";
|
|
3
3
|
import u, { createContext as z, useContext as Z, createElement as R, isValidElement as B, cloneElement as w, useState as le, useCallback as me, useEffect as ue } from "react";
|
|
4
4
|
import { TextField as pe } from "react-aria-components";
|
|
5
|
-
import { bg as fe, bt as ge, be as ve, d as ye, bj as Ee, bn as de, bh as be, aj as Se, M as Oe, Y as he, G as Ie, u as Ne, a5 as Ae } from "./form-
|
|
5
|
+
import { bg as fe, bt as ge, be as ve, d as ye, bj as Ee, bn as de, bh as be, aj as Se, M as Oe, Y as he, G as Ie, u as Ne, a5 as Ae } from "./form-Mla9_phC.js";
|
|
6
6
|
import { f as C } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import ee from "@babel/runtime/helpers/objectWithoutProperties";
|
|
8
8
|
import L from "@babel/runtime/helpers/typeof";
|
|
@@ -10,10 +10,10 @@ import Fe from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
import ke from "html-parse-stringify";
|
|
11
11
|
import Te from "@babel/runtime/helpers/classCallCheck";
|
|
12
12
|
import je from "@babel/runtime/helpers/createClass";
|
|
13
|
-
import { T as U } from "./text-input-headless-
|
|
13
|
+
import { T as U } from "./text-input-headless-CG4wbxMG.js";
|
|
14
14
|
import { E as xe } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { s as H } from "./field-rac.module-DfEb7pBp.js";
|
|
16
|
-
import { u as De } from "./use-text-input-class-name-
|
|
16
|
+
import { u as De } from "./use-text-input-class-name-Bqj4OoIw.js";
|
|
17
17
|
var Ce = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Le = {
|
|
18
18
|
"&": "&",
|
|
19
19
|
"&": "&",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import t, { useState as $, useMemo as h, useCallback as V, useRef as x } from "react";
|
|
2
2
|
import M from "classnames";
|
|
3
3
|
import { NumberField as z, CheckboxField as J, CheckboxButton as Q, Group as W, Input as Y, Button as w } from "react-aria-components";
|
|
4
|
-
import { bp as q, bq as H, bf as K, bk as P, aH as Z, bj as y, bg as X, bl as j, an as ee, M as te, n as se, s as ne, r as oe } from "./form-
|
|
4
|
+
import { bp as q, bq as H, bf as K, bk as P, aH as Z, bj as y, bg as X, bl as j, an as ee, M as te, n as se, s as ne, r as oe } from "./form-Mla9_phC.js";
|
|
5
5
|
import { f as b, a as L } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { L as re } from "./field-label-headless-
|
|
6
|
+
import { L as re } from "./field-label-headless-CD4_8Ros.js";
|
|
7
7
|
import { S as ae } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
8
|
import { u as le } from "./use-invoke-callback-UH73A_J3.js";
|
|
9
9
|
import { C as k } from "./chevron-down-icon-CcpVm6B-.js";
|
|
10
10
|
import { C as ce } from "./checkbox-indicator-module-classes-6173wvuW.js";
|
|
11
11
|
import { s as v } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as ue } from "./use-element-state-class-name-
|
|
13
|
-
import { u as me } from "./use-text-input-class-name-
|
|
12
|
+
import { u as ue } from "./use-element-state-class-name-DAYz5X_i.js";
|
|
13
|
+
import { u as me } from "./use-text-input-class-name-Bqj4OoIw.js";
|
|
14
14
|
const ie = [], de = ({ id: e, fields: s, layout: a, value: o, onChange: n, errors: l = ie, validation: c }) => {
|
|
15
15
|
const [m, i] = $((o == null ? void 0 : o.length) || 0), u = h(() => o ?? [], [
|
|
16
16
|
o
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
3
3
|
import s from "classnames";
|
|
4
|
-
import { a, s as n, R as c } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s as n, R as c } from "./radio-button-module-classes-Cu3KM625.js";
|
|
5
5
|
import { E as i } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as o } from "./field-rac.module-DfEb7pBp.js";
|
|
7
|
-
import { M as E, Y as p, T as R, U as O, G as _, u as L, V as D } from "./form-
|
|
7
|
+
import { M as E, Y as p, T as R, U as O, G as _, u as L, V as D } from "./form-Mla9_phC.js";
|
|
8
8
|
import { o as I } from "./options-rac.module-_THNq6Qq.js";
|
|
9
|
-
import { u as S } from "./use-element-state-class-name-
|
|
9
|
+
import { u as S } from "./use-element-state-class-name-DAYz5X_i.js";
|
|
10
10
|
const e = ({ children: r, className: l }) => /* @__PURE__ */ t.createElement(a, {
|
|
11
11
|
className: l
|
|
12
12
|
}, r);
|
package/dist/component/{field-error-headless-Bpe041x2.js → field-error-headless-JU1yiTVE.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import t, { createContext as m, useContext as M } from "react";
|
|
2
|
-
import { bj as c, bg as i, bb as b, aU as f, aV as x } from "./form-
|
|
2
|
+
import { bj as c, bg as i, bb as b, aU as f, aV as x } from "./form-Mla9_phC.js";
|
|
3
3
|
const H = ({ className: r, children: e }) => {
|
|
4
4
|
const { description: s, target: o } = c(), { descriptionId: a } = i(), { language: n } = b();
|
|
5
5
|
return s ? /* @__PURE__ */ t.createElement("div", {
|
package/dist/component/{field-label-headless-BUuK1Ftv.js → field-label-headless-CD4_8Ros.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bj as m, aA as d, aB as p, bg as B, bt as D } from "./form-
|
|
1
|
+
import { bj as m, aA as d, aB as p, bg as B, bt as D } from "./form-Mla9_phC.js";
|
|
2
2
|
import l from "react";
|
|
3
3
|
import { f as g } from "./find-child-C60k4CxG.js";
|
|
4
4
|
import { sdk as L } from "@wix/image-kit";
|
|
@@ -2,14 +2,14 @@ import t, { useState as $, useRef as q, useMemo as fe, useEffect as ne, useCallb
|
|
|
2
2
|
import Le from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
4
4
|
import M from "classnames";
|
|
5
|
-
import { bf as xe, bt as oe, bo as Ne, am as ve, br as De, af as ie, bs as Te, bg as Ee, bj as z, bl as Se, bd as Be, bc as ye, M as Ze, Y as Re, b as Me, aa as Ae, ab as ce, u as ue, z as de, G as me, a9 as Ie, f as te } from "./form-
|
|
5
|
+
import { bf as xe, bt as oe, bo as Ne, am as ve, br as De, af as ie, bs as Te, bg as Ee, bj as z, bl as Se, bd as Be, bc as ye, M as Ze, Y as Re, b as Me, aa as Ae, ab as ce, u as ue, z as de, G as me, a9 as Ie, f as te } from "./form-Mla9_phC.js";
|
|
6
6
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { s as Y } from "./field-rac.module-DfEb7pBp.js";
|
|
8
|
-
import { u as pe } from "./use-element-state-class-name-
|
|
8
|
+
import { u as pe } from "./use-element-state-class-name-DAYz5X_i.js";
|
|
9
9
|
import { DropZone as we, Text as Ue, FileTrigger as Pe, Button as be, ProgressBar as He, VisuallyHidden as qe } from "react-aria-components";
|
|
10
10
|
import { f as L, a as W } from "./find-child-C60k4CxG.js";
|
|
11
|
-
import { b as ke, a as ze, D as Ve, E as je } from "./field-error-headless-
|
|
12
|
-
import { L as Ke } from "./field-label-headless-
|
|
11
|
+
import { b as ke, a as ze, D as Ve, E as je } from "./field-error-headless-JU1yiTVE.js";
|
|
12
|
+
import { L as Ke } from "./field-label-headless-CD4_8Ros.js";
|
|
13
13
|
const Ye = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import t, { useMemo as _ } from "react";
|
|
2
2
|
import { RicosViewer as A } from "@wix/ricos/viewer";
|
|
3
3
|
import u from "classnames";
|
|
4
|
-
import { bj as C, bb as I, bg as P, M as N, N as O, u as S } from "./form-
|
|
4
|
+
import { bj as C, bb as I, bg as P, M as N, N as O, u as S } from "./form-Mla9_phC.js";
|
|
5
5
|
import { f as c, a as x } from "./find-child-C60k4CxG.js";
|
|
6
6
|
import { f as R } from "./format-currency-BwShJ9vM.js";
|
|
7
|
-
import { D as v, E as M } from "./field-error-headless-
|
|
8
|
-
import { L as g } from "./field-label-headless-
|
|
7
|
+
import { D as v, E as M } from "./field-error-headless-JU1yiTVE.js";
|
|
8
|
+
import { L as g } from "./field-label-headless-CD4_8Ros.js";
|
|
9
9
|
import { s as L } from "./field-rac.module-DfEb7pBp.js";
|
|
10
10
|
const e = ({ children: r }) => {
|
|
11
11
|
var p;
|