@wix/form-elements 1.75.0 → 1.76.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-BQsFMmBg.js +1016 -0
- package/dist/component/{bookings-address-rac-VXnUSx8U.js → bookings-address-rac-AJNyTdok.js} +1 -1
- package/dist/component/{bookings-email-rac-B2_ad7Y2.js → bookings-email-rac-BHZ0MFgI.js} +1 -1
- package/dist/component/{bookings-first-name-rac-9BAY5vLx.js → bookings-first-name-rac-Bw5FuWNX.js} +1 -1
- package/dist/component/{bookings-header-rac-B6IgiMOA.js → bookings-header-rac-C1M2Pg1f.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DoXEDO8K.js → bookings-last-name-rac-DKkPY0CO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DprQIFyj.js → bookings-login-bar-rac-P6pziSl1.js} +2 -2
- package/dist/component/{bookings-phone-rac-VMoXtejZ.js → bookings-phone-rac-CiOZWKHz.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DSzD2jBy.js → bookings-rich-text-rac-D9ZComtY.js} +1 -1
- package/dist/component/{checkbox-field-rac-BLihwz3C.js → checkbox-field-rac-4zG3Sf1c.js} +18 -17
- package/dist/component/{checkbox-group-field-headless-BItyo_iD.js → checkbox-group-field-headless-DN2aNw9g.js} +4 -4
- package/dist/component/{checkbox-group-field-rac-Bov3yFC6.js → checkbox-group-field-rac-B1qhet83.js} +12 -11
- package/dist/component/{checkbox-group-rac-Fit-qssk.js → checkbox-group-rac-DGsE7xGu.js} +1 -1
- package/dist/component/checkbox-indicator-module-classes-BcScu147.js +17 -0
- package/dist/component/{checkbox-rac-CSsY83Nx.js → checkbox-rac-CFWQW9_K.js} +1 -1
- package/dist/component/{contacts-address-rac-iJuzUQe4.js → contacts-address-rac-G5ZH3Odo.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-0g2e8cQP.js → contacts-birthdate-rac-C7TDUfT0.js} +1 -1
- package/dist/component/{contacts-company-rac-BC0tK4WQ.js → contacts-company-rac-8queUhWT.js} +1 -1
- package/dist/component/{contacts-email-rac-dkuclkiH.js → contacts-email-rac-CYOs5N_I.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BSUkCuht.js → contacts-first-name-rac-D8Goc_Ym.js} +1 -1
- package/dist/component/{contacts-last-name-rac-08bjVdN2.js → contacts-last-name-rac-lBmtuEnr.js} +1 -1
- package/dist/component/{contacts-phone-rac-DVb0Z_0M.js → contacts-phone-rac-DSUWUNBX.js} +1 -1
- package/dist/component/{contacts-position-rac-AGUDkv7U.js → contacts-position-rac-wA-aw5Id.js} +1 -1
- package/dist/component/contacts-subscribe-rac-CAbBbFxZ.js +13 -0
- package/dist/component/{contacts-tax-id-rac-C7moEz5b.js → contacts-tax-id-rac-BpjVM1Ye.js} +1 -1
- package/dist/component/{date-availability-DagbE0C8.js → date-availability-CeiMjrtD.js} +1 -1
- package/dist/component/{date-input-field-rac-BWHKsJGy.js → date-input-field-rac-CVaajAFM.js} +4 -4
- package/dist/component/{date-input-rac-BlZlmf-s.js → date-input-rac-DhEzawuM.js} +1 -1
- package/dist/component/{date-picker-field-rac-BSNbYirD.js → date-picker-field-rac-1Q6yyNmK.js} +8 -8
- package/dist/component/{date-picker-rac-D3IWMst5.js → date-picker-rac-BCGtmXMJ.js} +1 -1
- package/dist/component/{date-time-input-field-rac-YKTwuIUs.js → date-time-input-field-rac-Dd-HNgKP.js} +16 -16
- package/dist/component/{date-time-input-rac-CZRsKm1P.js → date-time-input-rac-CsCWEsH5.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BE7ILz-f.js → dext-checkbox-group-rac-CauN5uuV.js} +2 -2
- package/dist/component/{dext-checkbox-rac-B6-94A1N.js → dext-checkbox-rac-q-g9gDnw.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Bx2hUFNm.js → dext-date-picker-rac-CZT3dTLv.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DPKD6quz.js → dext-date-time-input-rac-DVUoZZbX.js} +1 -1
- package/dist/component/{dext-dropdown-rac-WrSfNRa5.js → dext-dropdown-rac-GRltutt5.js} +1 -1
- package/dist/component/{dext-email-rac-8PSMKNYG.js → dext-email-rac-74Y8S9GA.js} +1 -1
- package/dist/component/{dext-number-input-rac-b9YSzEkN.js → dext-number-input-rac-CF9d_GTl.js} +1 -1
- package/dist/component/{dext-phone-rac-CkapN3c1.js → dext-phone-rac-DObx_gOd.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CfNMkwUa.js → dext-radio-group-rac-CzU9KX5_.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cun_t7HQ.js → dext-rating-input-rac-BjRwwgXr.js} +1 -1
- package/dist/component/{dext-tags-rac-DLZ91c3w.js → dext-tags-rac-Vif4x1yF.js} +2 -2
- package/dist/component/{dext-text-area-rac-N9A7QfYw.js → dext-text-area-rac-DmZwl_ax.js} +1 -1
- package/dist/component/{dext-text-input-rac-XbVzAPHH.js → dext-text-input-rac-B6FVbjUM.js} +1 -1
- package/dist/component/{dext-url-input-rac-BiaWZ49r.js → dext-url-input-rac-17Dj3ICM.js} +1 -1
- package/dist/component/{donation-rac-BEIBjLHK.js → donation-rac-bgHep0Xi.js} +119 -119
- package/dist/component/{dropdown-field-headless-CQfZ3zPD.js → dropdown-field-headless-BGfJ1FyZ.js} +3 -3
- package/dist/component/{dropdown-field-rac-ubZN_Abg.js → dropdown-field-rac-DGiysJQY.js} +2 -2
- package/dist/component/{dropdown-rac-CHYFrEjY.js → dropdown-rac-FHjz8fKp.js} +1 -1
- package/dist/component/{ecom-address-rac-C7qJlrsv.js → ecom-address-rac-DSbpf4z8.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CONIZsTy.js → ecom-subscription-checkbox-rac-DiZWNwnt.js} +3 -3
- package/dist/component/{email-input-field-rac-Dg0p6WZe.js → email-input-field-rac-BQKK2O7L.js} +48 -48
- package/dist/component/{events-repeater-rac-BoxNl7gn.js → events-repeater-rac-Dudnyhal.js} +21 -20
- package/dist/component/{events-rsvp-rac-BU5d2n4k.js → events-rsvp-rac-008H5Ska.js} +2 -2
- package/dist/component/{field-error-headless-uQOcm2Ak.js → field-error-headless-C5ZsFUKv.js} +1 -1
- package/dist/component/{field-label-headless-Bzh7f2Ji.js → field-label-headless-CS5OYsiI.js} +1 -1
- package/dist/component/{file-upload-rac-BTt-rJE5.js → file-upload-rac-bQ2QOO8Q.js} +36 -36
- package/dist/component/{fixed-payment-rac-1NOx3D-U.js → fixed-payment-rac-B6FvXoCU.js} +6 -6
- package/dist/component/{form-DCmjj8mZ.js → form-BpHElSwH.js} +69 -69
- package/dist/component/{form-element-classes-Dn33C01k.js → form-element-classes-BXNs5k3q.js} +59 -51
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-lyvjy6h2.js → header-field-rac-D4UYcmok.js} +3 -3
- package/dist/component/{header-rac-B4iPEbNj.js → header-rac-KavPiBdn.js} +1 -1
- package/dist/component/{image-choice-rac-CmEG-waj.js → image-choice-rac-BJQqBhBD.js} +19 -19
- package/dist/component/{index-UZsDOe8e.js → index-RSEYrQef.js} +2 -2
- package/dist/component/{index-D-CKLZBh.js → index-Y8iTxLat.js} +4 -4
- package/dist/component/{isObjectLike-BSGOU4jF.js → isObjectLike-jwHec4Ap.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Dz0NEjSO.js → multiline-address-field-rac-D4Ibno80.js} +67 -67
- package/dist/component/{multiline-address-rac-D_MAanxb.js → multiline-address-rac-CrTSjzBN.js} +1 -1
- package/dist/component/{number-input-field-rac-CvjeAm-W.js → number-input-field-rac-DW1SjB-Z.js} +16 -16
- package/dist/component/{number-input-rac-oKo2Wx_c.js → number-input-rac-CdE_hRbA.js} +1 -1
- package/dist/component/{password-rac-CrnkKtfp.js → password-rac-BCxl5mMQ.js} +9 -9
- package/dist/component/{payment-input-rac-BoVdGyvV.js → payment-input-rac-DmO4s4ue.js} +15 -15
- package/dist/component/{phone-input-field-rac-DksXoAnr.js → phone-input-field-rac-BYAnwk5h.js} +36 -36
- package/dist/component/{phone-rac-BR0iX5TL.js → phone-rac-gS4k9Yn8.js} +1 -1
- package/dist/component/{product-list-rac-C4rvv5k-.js → product-list-rac-CO0o3yOg.js} +50 -49
- package/dist/component/{quiz-radio-group-rac-BxKmUUf8.js → quiz-radio-group-rac-Dhk7nkzb.js} +2 -2
- package/dist/component/{radio-group-field-rac-Dj4rkkKF.js → radio-group-field-rac-DdlyQ3m6.js} +2 -2
- package/dist/component/{radio-group-field-rac.module-CeBLm9QF.js → radio-group-field-rac.module-emin6sSc.js} +3 -3
- package/dist/component/{radio-group-rac-BpnfptSZ.js → radio-group-rac-B-9q91fJ.js} +1 -1
- package/dist/component/{rating-input-field-rac-BP0928qI.js → rating-input-field-rac-VDaJKq-n.js} +17 -17
- package/dist/component/{rating-input-rac-DaEgvjIS.js → rating-input-rac-BVO62LmE.js} +1 -1
- package/dist/component/{rich-content-rac.module-zvvH-tWq.js → rich-content-rac.module-CdiaAjxG.js} +1 -1
- package/dist/component/{rich-text-field-rac-CFCRiMl_.js → rich-text-field-rac-C4RrbyEX.js} +3 -3
- package/dist/component/{rich-text-rac-BRuLnyN4.js → rich-text-rac-BG376ww9.js} +1 -1
- package/dist/component/{service-dropdown-rac-C82l5y0C.js → service-dropdown-rac-Dy6-OpVR.js} +10 -10
- package/dist/component/{services-multi-choice-rac-BAHBSgAT.js → services-multi-choice-rac-BKW9MP_b.js} +21 -20
- package/dist/component/{signature-rac-CIkm3SCW.js → signature-rac-Cxgixp4o.js} +4 -4
- package/dist/component/{submit-button-rac-Bz-X9Tbo.js → submit-button-rac-BqPJ7WPI.js} +2 -2
- package/dist/component/{tags-field-rac-Dn8VyPzT.js → tags-field-rac-wwqpztG7.js} +23 -23
- package/dist/component/{tags-rac-BJpVdunR.js → tags-rac-DUxITYxU.js} +1 -1
- package/dist/component/{text-area-field-rac-Pp9HnCS5.js → text-area-field-rac-Cen6O33S.js} +6 -6
- package/dist/component/{text-area-rac-DbwAFdel.js → text-area-rac-CRlO56GA.js} +1 -1
- package/dist/component/{text-input-field-rac-x4ByKmBv.js → text-input-field-rac-CbnKn03g.js} +2 -2
- package/dist/component/{text-input-headless-fbiKci5q.js → text-input-headless-C_NTJmLe.js} +3 -3
- package/dist/component/{text-input-rac-jyCKxyCt.js → text-input-rac-DvwV7Igm.js} +1 -1
- package/dist/component/{time-input-rac-C5Cvmxtt.js → time-input-rac-TSEXiODs.js} +12 -12
- package/dist/component/{url-input-field-rac-CGpCEn2A.js → url-input-field-rac-Cxgh9T8s.js} +4 -4
- package/dist/component/{url-input-rac-DhFL8fGq.js → url-input-rac-DNw-Jg1U.js} +1 -1
- package/dist/component/use-element-state-class-name-CC65g9mT.js +15 -0
- package/dist/component/{use-service-options-base-CgT1IKB3.js → use-service-options-base-EFrxTpGm.js} +1 -1
- package/package.json +2 -2
- package/dist/component/appointment-rac-7xVKSm2N.js +0 -1005
- package/dist/component/contacts-subscribe-rac-6jAQHibT.js +0 -13
- package/dist/component/use-element-state-class-name-Bnw7sY9P.js +0 -29
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import { ai as e, h as o } from "./form-
|
|
3
|
-
import { T as s } from "./tags-field-rac-
|
|
2
|
+
import { ai as e, h as o } from "./form-BpHElSwH.js";
|
|
3
|
+
import { T as s } from "./tags-field-rac-wwqpztG7.js";
|
|
4
4
|
import { b as a } from "./default-limits-D7qVv_Hv.js";
|
|
5
5
|
const l = () => {
|
|
6
6
|
const t = {
|
|
@@ -1,118 +1,118 @@
|
|
|
1
1
|
import t, { useMemo as B, useCallback as L, useRef as oe } from "react";
|
|
2
2
|
import { RicosViewer as re } from "@wix/ricos/viewer";
|
|
3
3
|
import y from "classnames";
|
|
4
|
-
import { P as
|
|
5
|
-
import { RadioGroup as ie, RadioField as
|
|
4
|
+
import { P as Q, ai as A, af as k, as as ae, ab as v, ak as se, ac as le } from "./form-BpHElSwH.js";
|
|
5
|
+
import { RadioGroup as ie, RadioField as j, RadioButton as z, TextField as ce, Group as ue, Input as me } from "react-aria-components";
|
|
6
6
|
import { debounce as pe } from "ts-debounce";
|
|
7
7
|
import { f as O, a as N } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { a as
|
|
9
|
-
import { D as de, E as Ee } from "./field-error-headless-
|
|
10
|
-
import { L as Ie } from "./field-label-headless-
|
|
8
|
+
import { a as H } from "./format-currency-BwShJ9vM.js";
|
|
9
|
+
import { D as de, E as Ee } from "./field-error-headless-C5ZsFUKv.js";
|
|
10
|
+
import { L as Ie } from "./field-label-headless-CS5OYsiI.js";
|
|
11
11
|
import { N as Ce } from "./options-layout-constants-DEfIEJWD.js";
|
|
12
12
|
import { a as Oe, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
13
|
import { g as _e } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
14
|
import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
15
|
import { E as ye } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { s as
|
|
17
|
-
import {
|
|
16
|
+
import { s as g } from "./field-rac.module-DjmaTYkc.js";
|
|
17
|
+
import { z as Ne, Q as be, j as Fe, k as ge, l as De, y as Le, p as Re, i as Se, F as Ae } from "./form-element-classes-BXNs5k3q.js";
|
|
18
18
|
import { o as ve } from "./options-rac.module-KM-VT_KY.js";
|
|
19
19
|
function Te(e, n) {
|
|
20
20
|
return e.reduce((o, r) => (o[r[n]] = r, o), {});
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function xe(e) {
|
|
23
23
|
return Te(e, "id");
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
25
|
+
const Me = 0.01;
|
|
26
|
+
function Pe(e) {
|
|
27
27
|
var n;
|
|
28
28
|
return ((n = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : n.price) || "0";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function K(e, n) {
|
|
31
31
|
const o = Number(n || "0");
|
|
32
32
|
return {
|
|
33
33
|
productId: e.id,
|
|
34
|
-
price: e.priceType ===
|
|
34
|
+
price: e.priceType === Q.DYNAMIC_PRICE ? o : String(o),
|
|
35
35
|
quantity: 1
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
function Be(e) {
|
|
39
|
-
return e.find((n) => n.priceType ===
|
|
39
|
+
return e.find((n) => n.priceType === Q.DYNAMIC_PRICE);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function ke(e, n) {
|
|
42
42
|
return (e == null ? void 0 : e.productId) === (n == null ? void 0 : n.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const r = (n == null ? void 0 : n.productId) === e ? void 0 : e,
|
|
46
|
-
return
|
|
47
|
-
|
|
44
|
+
function qe(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
|
+
K(s, Pe(s))
|
|
48
48
|
] : [];
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
const { id: n, value: o, onChange: r, disabled:
|
|
52
|
-
var C,
|
|
53
|
-
return ((
|
|
50
|
+
const a = ({ children: e }) => {
|
|
51
|
+
const { id: n, value: o, onChange: r, disabled: s, required: m, onBlur: p, onFocus: _, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: E, hasError: f } = A(), { labelId: h } = k(), { t: I } = ae(), { currency: T, regionalFormat: b } = v(), d = o == null ? void 0 : o[0], F = B(() => {
|
|
52
|
+
var C, P;
|
|
53
|
+
return ((P = (C = c == null ? void 0 : c.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : P.products) || [];
|
|
54
54
|
}, [
|
|
55
55
|
c
|
|
56
|
-
]),
|
|
56
|
+
]), x = B(() => xe(F), [
|
|
57
57
|
F
|
|
58
58
|
]), l = B(() => u ? Be(F) : void 0, [
|
|
59
59
|
F,
|
|
60
60
|
u
|
|
61
|
-
]),
|
|
62
|
-
sourceValue:
|
|
61
|
+
]), W = ke(d, l), [q, M] = he({
|
|
62
|
+
sourceValue: W,
|
|
63
63
|
format: (C) => fe(String(C ?? ""), b),
|
|
64
64
|
regionalFormat: b
|
|
65
|
-
}),
|
|
66
|
-
r(
|
|
65
|
+
}), w = L((C) => {
|
|
66
|
+
r(qe(C, d, x)), M("");
|
|
67
67
|
}, [
|
|
68
68
|
r,
|
|
69
|
-
|
|
69
|
+
x,
|
|
70
70
|
d,
|
|
71
|
-
|
|
72
|
-
]),
|
|
71
|
+
M
|
|
72
|
+
]), V = L((C) => {
|
|
73
73
|
l && r(typeof C == "number" ? [
|
|
74
|
-
|
|
74
|
+
K(l, String(C))
|
|
75
75
|
] : []);
|
|
76
76
|
}, [
|
|
77
77
|
r,
|
|
78
78
|
l
|
|
79
|
-
]),
|
|
80
|
-
|
|
79
|
+
]), Y = B(() => pe(V, 500), [
|
|
80
|
+
V
|
|
81
81
|
]), J = L((C) => {
|
|
82
82
|
(d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
|
|
83
|
-
const { validInput:
|
|
84
|
-
P
|
|
83
|
+
const { validInput: P, validNumber: te } = Oe(C.target.value, Me, q, b);
|
|
84
|
+
M(P), Y(te);
|
|
85
85
|
}, [
|
|
86
86
|
b,
|
|
87
87
|
r,
|
|
88
88
|
d,
|
|
89
89
|
l,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
]),
|
|
94
|
-
l != null && l.id &&
|
|
90
|
+
q,
|
|
91
|
+
Y,
|
|
92
|
+
M
|
|
93
|
+
]), U = (d == null ? void 0 : d.productId) || null, X = L(() => {
|
|
94
|
+
l != null && l.id && U !== l.id && w(l.id);
|
|
95
95
|
}, [
|
|
96
96
|
l == null ? void 0 : l.id,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
]), Z = O(e,
|
|
97
|
+
U,
|
|
98
|
+
w
|
|
99
|
+
]), Z = O(e, a.Label), G = O(e, a.Control), ee = O(e, a.Description), ne = O(e, a.Error);
|
|
100
100
|
return /* @__PURE__ */ t.createElement(E, {
|
|
101
101
|
fieldId: n,
|
|
102
102
|
renderLabel: () => Z,
|
|
103
103
|
renderInput: () => /* @__PURE__ */ t.createElement(ie, {
|
|
104
104
|
"aria-labelledby": h,
|
|
105
|
-
value:
|
|
106
|
-
onChange:
|
|
107
|
-
isDisabled:
|
|
105
|
+
value: U,
|
|
106
|
+
onChange: w,
|
|
107
|
+
isDisabled: s,
|
|
108
108
|
isInvalid: f,
|
|
109
109
|
isRequired: m,
|
|
110
110
|
onBlur: p,
|
|
111
111
|
onFocus: _
|
|
112
|
-
},
|
|
113
|
-
productsById:
|
|
112
|
+
}, G ? N(G, {
|
|
113
|
+
productsById: x,
|
|
114
114
|
addOther: u,
|
|
115
|
-
customAmount:
|
|
115
|
+
customAmount: q,
|
|
116
116
|
onCustomAmountInputChange: J,
|
|
117
117
|
currency: T,
|
|
118
118
|
t: I,
|
|
@@ -122,14 +122,14 @@ const s = ({ children: e }) => {
|
|
|
122
122
|
}) : null),
|
|
123
123
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, ne, ee)
|
|
124
124
|
});
|
|
125
|
-
},
|
|
126
|
-
const { productsById: r, addOther:
|
|
125
|
+
}, we = ({ children: e, className: n, ...o }) => {
|
|
126
|
+
const { productsById: r, addOther: s, customAmount: m, onCustomAmountInputChange: p, currency: _, t: c, placeholder: u, customAmountProductId: i, onFocusCustomInput: E } = o, { hasError: f } = A(), h = O(e, a.Options), I = O(e, a.OtherInput);
|
|
127
127
|
return /* @__PURE__ */ t.createElement("div", {
|
|
128
128
|
className: n,
|
|
129
129
|
"data-invalid": f
|
|
130
130
|
}, h ? N(h, {
|
|
131
131
|
productsById: r
|
|
132
|
-
}) : null,
|
|
132
|
+
}) : null, s && i && /* @__PURE__ */ t.createElement(j, {
|
|
133
133
|
value: i,
|
|
134
134
|
style: {
|
|
135
135
|
position: "absolute",
|
|
@@ -142,9 +142,9 @@ const s = ({ children: e }) => {
|
|
|
142
142
|
whiteSpace: "nowrap",
|
|
143
143
|
border: "0"
|
|
144
144
|
}
|
|
145
|
-
}, /* @__PURE__ */ t.createElement(
|
|
145
|
+
}, /* @__PURE__ */ t.createElement(z, {
|
|
146
146
|
"aria-label": c("donation.other-option.label", "Custom amount")
|
|
147
|
-
}, c("donation.other-option.label", "Custom amount"))), I &&
|
|
147
|
+
}, c("donation.other-option.label", "Custom amount"))), I && s ? N(I, {
|
|
148
148
|
customAmount: m,
|
|
149
149
|
onCustomAmountInputChange: p,
|
|
150
150
|
currency: _,
|
|
@@ -153,12 +153,12 @@ const s = ({ children: e }) => {
|
|
|
153
153
|
customAmountProductId: i,
|
|
154
154
|
onFocusCustomInput: E
|
|
155
155
|
}) : null);
|
|
156
|
-
},
|
|
157
|
-
const { productsById: r } = o, { options:
|
|
156
|
+
}, $ = ({ children: e, className: n, ...o }) => {
|
|
157
|
+
const { productsById: r } = o, { options: s, numberOfColumns: m } = A(), { isMobile: p } = v(), _ = O(e, $.Option), c = p ? Ce.ONE : m;
|
|
158
158
|
return /* @__PURE__ */ t.createElement("div", {
|
|
159
159
|
className: n,
|
|
160
160
|
"data-columns": c
|
|
161
|
-
},
|
|
161
|
+
}, s.map((u) => {
|
|
162
162
|
var f;
|
|
163
163
|
const i = r[u.value], E = (f = i == null ? void 0 : i.fixedPriceOptions) == null ? void 0 : f.price;
|
|
164
164
|
return N(_, {
|
|
@@ -168,50 +168,50 @@ const s = ({ children: e }) => {
|
|
|
168
168
|
});
|
|
169
169
|
}));
|
|
170
170
|
}, R = ({ children: e, className: n, ...o }) => {
|
|
171
|
-
const { value: r, price:
|
|
172
|
-
amount:
|
|
171
|
+
const { value: r, price: s } = o, { id: m } = A(), { currency: p, regionalFormat: _ } = v(), c = O(e, R.Value), u = O(e, R.Currency), { isCurrencyPrefixed: i } = H({
|
|
172
|
+
amount: s,
|
|
173
173
|
currency: p == null ? void 0 : p.code,
|
|
174
174
|
locale: _
|
|
175
175
|
}), E = oe(null);
|
|
176
|
-
|
|
176
|
+
se(() => {
|
|
177
177
|
var h, I;
|
|
178
178
|
(I = (h = E.current) == null ? void 0 : h.querySelector("input")) == null || I.focus();
|
|
179
179
|
}, m);
|
|
180
180
|
const f = c ? N(c, {
|
|
181
|
-
price:
|
|
181
|
+
price: s
|
|
182
182
|
}) : null;
|
|
183
|
-
return /* @__PURE__ */ t.createElement(
|
|
183
|
+
return /* @__PURE__ */ t.createElement(j, {
|
|
184
184
|
value: r
|
|
185
|
-
}, /* @__PURE__ */ t.createElement(
|
|
185
|
+
}, /* @__PURE__ */ t.createElement(z, {
|
|
186
186
|
className: n,
|
|
187
187
|
ref: E
|
|
188
188
|
}, /* @__PURE__ */ t.createElement(t.Fragment, null, i && u, f, !i && u)));
|
|
189
|
-
},
|
|
190
|
-
const { price: o } = n, { currency: r, regionalFormat:
|
|
189
|
+
}, Ue = ({ className: e, ...n }) => {
|
|
190
|
+
const { price: o } = n, { currency: r, regionalFormat: s } = v(), { value: m } = H({
|
|
191
191
|
amount: o,
|
|
192
192
|
currency: r == null ? void 0 : r.code,
|
|
193
|
-
locale:
|
|
193
|
+
locale: s
|
|
194
194
|
});
|
|
195
195
|
return /* @__PURE__ */ t.createElement("span", {
|
|
196
196
|
className: e
|
|
197
197
|
}, m);
|
|
198
|
-
},
|
|
198
|
+
}, $e = ({ className: e }) => {
|
|
199
199
|
const { currency: n } = v();
|
|
200
200
|
return /* @__PURE__ */ t.createElement("span", {
|
|
201
201
|
className: e
|
|
202
202
|
}, (n == null ? void 0 : n.sign) || (n == null ? void 0 : n.code) || "");
|
|
203
203
|
};
|
|
204
|
-
R.Value =
|
|
205
|
-
R.Currency =
|
|
204
|
+
R.Value = Ue;
|
|
205
|
+
R.Currency = $e;
|
|
206
206
|
const S = ({ children: e, className: n, ...o }) => {
|
|
207
|
-
const { customAmount: r, onCustomAmountInputChange:
|
|
208
|
-
|
|
207
|
+
const { customAmount: r, onCustomAmountInputChange: s, currency: m, t: p, placeholder: _, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: E } = A(), { labelId: f, prefixId: h } = k(), I = O(e, S.Currency), T = O(e, S.Value), b = L((F) => {
|
|
208
|
+
s({
|
|
209
209
|
target: {
|
|
210
210
|
value: F
|
|
211
211
|
}
|
|
212
212
|
});
|
|
213
213
|
}, [
|
|
214
|
-
|
|
214
|
+
s
|
|
215
215
|
]), d = L(() => {
|
|
216
216
|
u();
|
|
217
217
|
}, [
|
|
@@ -235,72 +235,72 @@ const S = ({ children: e, className: n, ...o }) => {
|
|
|
235
235
|
placeholder: _,
|
|
236
236
|
customAmountProductId: c
|
|
237
237
|
}) : null));
|
|
238
|
-
},
|
|
239
|
-
const { currency: o, t: r } = n, { prefixId:
|
|
238
|
+
}, Ve = ({ className: e, ...n }) => {
|
|
239
|
+
const { currency: o, t: r } = n, { prefixId: s } = k();
|
|
240
240
|
return /* @__PURE__ */ t.createElement("span", {
|
|
241
|
-
id:
|
|
241
|
+
id: s,
|
|
242
242
|
"aria-hidden": !1,
|
|
243
243
|
"aria-label": _e(r, o),
|
|
244
244
|
className: e
|
|
245
245
|
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
246
|
-
},
|
|
247
|
-
const { placeholder: o, customAmountProductId: r } = n, { ariaDescribedBy:
|
|
246
|
+
}, Ye = ({ className: e, ...n }) => {
|
|
247
|
+
const { placeholder: o, customAmountProductId: r } = n, { ariaDescribedBy: s, labelId: m, prefixId: p } = k();
|
|
248
248
|
return /* @__PURE__ */ t.createElement(me, {
|
|
249
249
|
id: r,
|
|
250
250
|
"aria-labelledby": `${m} ${p}`,
|
|
251
|
-
"aria-describedby":
|
|
251
|
+
"aria-describedby": s,
|
|
252
252
|
placeholder: o,
|
|
253
253
|
inputMode: "decimal",
|
|
254
254
|
autoComplete: "off",
|
|
255
255
|
className: e
|
|
256
256
|
});
|
|
257
257
|
};
|
|
258
|
-
S.Currency =
|
|
259
|
-
S.Value =
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
control:
|
|
269
|
-
options:
|
|
270
|
-
option:
|
|
271
|
-
optionCurrency:
|
|
272
|
-
otherInput:
|
|
273
|
-
otherInputCurrency:
|
|
274
|
-
},
|
|
258
|
+
S.Currency = Ve;
|
|
259
|
+
S.Value = Ye;
|
|
260
|
+
$.Option = R;
|
|
261
|
+
a.Label = Ie;
|
|
262
|
+
a.Control = we;
|
|
263
|
+
a.Options = $;
|
|
264
|
+
a.OtherInput = S;
|
|
265
|
+
a.Description = de;
|
|
266
|
+
a.Error = Ee;
|
|
267
|
+
const Ge = "_control_11glx_1", Qe = "_options_11glx_7", je = "_option_11glx_7", ze = "_optionCurrency_11glx_89", He = "_otherInput_11glx_93", Ke = "_otherInputCurrency_11glx_112", D = {
|
|
268
|
+
control: Ge,
|
|
269
|
+
options: Qe,
|
|
270
|
+
option: je,
|
|
271
|
+
optionCurrency: ze,
|
|
272
|
+
otherInput: He,
|
|
273
|
+
otherInputCurrency: Ke
|
|
274
|
+
}, We = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(re, {
|
|
275
275
|
content: e,
|
|
276
276
|
locale: n
|
|
277
277
|
}), Je = () => {
|
|
278
278
|
const e = le(Ae.DONATION_OPTION);
|
|
279
|
-
return /* @__PURE__ */ t.createElement(
|
|
280
|
-
className: y(Ne,
|
|
281
|
-
}, /* @__PURE__ */ t.createElement(
|
|
282
|
-
className: y(be,
|
|
283
|
-
})), /* @__PURE__ */ t.createElement(
|
|
284
|
-
className:
|
|
285
|
-
}, /* @__PURE__ */ t.createElement(
|
|
286
|
-
className: y(Fe, ve.options,
|
|
287
|
-
}, /* @__PURE__ */ t.createElement(
|
|
288
|
-
className: ({ isSelected: n }) => y(
|
|
289
|
-
[
|
|
279
|
+
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
280
|
+
className: y(Ne, g.label)
|
|
281
|
+
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
282
|
+
className: y(be, g.requiredMark)
|
|
283
|
+
})), /* @__PURE__ */ t.createElement(a.Control, {
|
|
284
|
+
className: D.control
|
|
285
|
+
}, /* @__PURE__ */ t.createElement(a.Options, {
|
|
286
|
+
className: y(Fe, ve.options, D.options)
|
|
287
|
+
}, /* @__PURE__ */ t.createElement(a.Options.Option, {
|
|
288
|
+
className: ({ isSelected: n }) => y(ge, D.option, e, {
|
|
289
|
+
[De]: n
|
|
290
290
|
})
|
|
291
|
-
}, /* @__PURE__ */ t.createElement(
|
|
292
|
-
className:
|
|
293
|
-
}))), /* @__PURE__ */ t.createElement(
|
|
294
|
-
className: y(Le,
|
|
295
|
-
}, /* @__PURE__ */ t.createElement(
|
|
296
|
-
className:
|
|
297
|
-
}), /* @__PURE__ */ t.createElement(
|
|
298
|
-
className:
|
|
299
|
-
}))), /* @__PURE__ */ t.createElement(
|
|
300
|
-
className: y(Re,
|
|
301
|
-
}, /* @__PURE__ */ t.createElement(ye, null), /* @__PURE__ */ t.createElement(
|
|
302
|
-
className: y(Se,
|
|
303
|
-
},
|
|
291
|
+
}, /* @__PURE__ */ t.createElement(a.Options.Option.Value, null), /* @__PURE__ */ t.createElement(a.Options.Option.Currency, {
|
|
292
|
+
className: D.optionCurrency
|
|
293
|
+
}))), /* @__PURE__ */ t.createElement(a.OtherInput, {
|
|
294
|
+
className: y(Le, g.input, D.otherInput)
|
|
295
|
+
}, /* @__PURE__ */ t.createElement(a.OtherInput.Currency, {
|
|
296
|
+
className: D.otherInputCurrency
|
|
297
|
+
}), /* @__PURE__ */ t.createElement(a.OtherInput.Value, {
|
|
298
|
+
className: g.innerInput
|
|
299
|
+
}))), /* @__PURE__ */ t.createElement(a.Error, {
|
|
300
|
+
className: y(Re, g.error)
|
|
301
|
+
}, /* @__PURE__ */ t.createElement(ye, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
|
|
302
|
+
className: y(Se, g.description)
|
|
303
|
+
}, We));
|
|
304
304
|
}, On = () => /* @__PURE__ */ t.createElement(Je, null);
|
|
305
305
|
export {
|
|
306
306
|
On as DonationRAC
|
package/dist/component/{dropdown-field-headless-CQfZ3zPD.js → dropdown-field-headless-BGfJ1FyZ.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import e, { useState as E, useCallback as g, useRef as q } from "react";
|
|
2
2
|
import { UNSAFE_PortalProvider as A } from "react-aria";
|
|
3
3
|
import { Select as w, SelectValue as M, ListBox as U, ListBoxItem as _ } from "react-aria-components";
|
|
4
|
-
import { ai as p, af as b, ak as j } from "./form-
|
|
4
|
+
import { ai as p, af as b, ak as j } from "./form-BpHElSwH.js";
|
|
5
5
|
import { f as d, a as z } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as G, E as H } from "./field-error-headless-
|
|
7
|
-
import { L as J } from "./field-label-headless-
|
|
6
|
+
import { D as G, E as H } from "./field-error-headless-C5ZsFUKv.js";
|
|
7
|
+
import { L as J } from "./field-label-headless-CS5OYsiI.js";
|
|
8
8
|
import { S as K, N as Q } from "./non-modal-popover-DtIMXHbe.js";
|
|
9
9
|
const n = ({ children: t }) => {
|
|
10
10
|
const { id: o, value: r, defaultValue: l, options: a = [], readOnly: s, onChange: u, placeholder: m, disabled: i, required: v, onBlur: O, onFocus: y, FieldLayout: F, hasError: C } = p(), [D, L] = E(!1), [h, I] = E(null), B = r && a.some((c) => (c.value ?? c.label) === r) ? r : l || null, { labelId: N } = b(), P = g((c) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { D as o } from "./dropdown-field-headless-
|
|
4
|
+
import { D as o } from "./dropdown-field-headless-BGfJ1FyZ.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 r } from "./field-rac.module-DjmaTYkc.js";
|
|
9
|
-
import {
|
|
9
|
+
import { z as i, Q as E, y as p, B as _, p as S, i as R } from "./form-element-classes-BXNs5k3q.js";
|
|
10
10
|
const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
11
11
|
content: a,
|
|
12
12
|
locale: s
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o, { useMemo as a } from "react";
|
|
2
|
-
import { ai as n, as as c, h as i } from "./form-
|
|
3
|
-
import { C } from "./checkbox-field-rac-
|
|
4
|
-
import { n as l, o as m, m as p } from "./form-element-classes-
|
|
2
|
+
import { ai as n, as as c, h as i } from "./form-BpHElSwH.js";
|
|
3
|
+
import { C } from "./checkbox-field-rac-4zG3Sf1c.js";
|
|
4
|
+
import { n as l, o as m, m as p } from "./form-element-classes-BXNs5k3q.js";
|
|
5
5
|
const _ = (e) => ({
|
|
6
6
|
nodes: [
|
|
7
7
|
{
|