@wix/form-elements 1.63.0 → 1.64.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-B1VVk_Ui.js → appointment-rac-DojiZqx9.js} +35 -35
- package/dist/component/{bookings-address-rac-IQeHFdHT.js → bookings-address-rac-Bm_lQchD.js} +1 -1
- package/dist/component/{bookings-email-rac-z26A790r.js → bookings-email-rac-vwuy0kW8.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Djf0GPP4.js → bookings-first-name-rac-BbWuLoeg.js} +1 -1
- package/dist/component/{bookings-header-rac-CXOzAOpz.js → bookings-header-rac-DVknNH29.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CbB8alM9.js → bookings-last-name-rac-BnT3Cq0b.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CXrLx7Pn.js → bookings-login-bar-rac-DKi-VAXc.js} +5 -5
- package/dist/component/{bookings-phone-rac-DGYx7h5g.js → bookings-phone-rac-Bfy8rheB.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-viJG57XF.js → bookings-rich-text-rac-DGiBDcXw.js} +1 -1
- package/dist/component/{checkbox-field-rac-e-RAmupX.js → checkbox-field-rac-CYADRY54.js} +5 -5
- package/dist/component/checkbox-group-field-headless-BDAFpX5F.js +210 -0
- package/dist/component/checkbox-group-field-rac-2YUsOmDI.js +40 -0
- package/dist/component/{checkbox-group-rac-CDfDTWqz.js → checkbox-group-rac-CQf1C9H5.js} +1 -1
- package/dist/component/{checkbox-rac-BRBKYD_5.js → checkbox-rac-Bjv8jZjs.js} +1 -1
- package/dist/component/{contacts-address-rac-BtWWQi77.js → contacts-address-rac-BBTiEec9.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DaEUXJTf.js → contacts-birthdate-rac-XReeFHVW.js} +1 -1
- package/dist/component/{contacts-company-rac-IgRyjtcM.js → contacts-company-rac-B-fUQszu.js} +1 -1
- package/dist/component/{contacts-email-rac-BS1MDrMk.js → contacts-email-rac-DBtcCcsV.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BAvXypDF.js → contacts-first-name-rac-mkwU3706.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C289RYPl.js → contacts-last-name-rac-DY5N-AZx.js} +1 -1
- package/dist/component/{contacts-phone-rac-DIpyskam.js → contacts-phone-rac-Ce1rMz_z.js} +1 -1
- package/dist/component/{contacts-position-rac-nPeh3lKU.js → contacts-position-rac-B65H8PDu.js} +1 -1
- package/dist/component/contacts-subscribe-rac-BxO8rIyL.js +13 -0
- package/dist/component/{contacts-tax-id-rac-C4WB-SR0.js → contacts-tax-id-rac-Jtt0ySK2.js} +1 -1
- package/dist/component/{date-availability-HHjPx4Uv.js → date-availability-B8UwvTJa.js} +1 -1
- package/dist/component/{date-input-field-rac-GFgFcpX2.js → date-input-field-rac-RL2a0xoD.js} +33 -33
- package/dist/component/{date-input-rac-B9BUEIA-.js → date-input-rac-ak3G7V07.js} +1 -1
- package/dist/component/{date-picker-field-rac-BfjYIIuY.js → date-picker-field-rac-SL_Roltf.js} +31 -31
- package/dist/component/{date-picker-rac-Bd2UN0ZF.js → date-picker-rac-ByrM0YIX.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CAXnxLQP.js → date-time-input-field-rac-DOE7xcKi.js} +36 -36
- package/dist/component/{date-time-input-rac-BuJ3Awlh.js → date-time-input-rac-BA-GyrAc.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DKp4cBVa.js → dext-checkbox-group-rac-EwUnBO80.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BMu_k06A.js → dext-checkbox-rac-CIRKi4B5.js} +1 -1
- package/dist/component/{dext-date-picker-rac-L3sdldhT.js → dext-date-picker-rac-BYO_Q1zM.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-UmabFzDN.js → dext-date-time-input-rac-BOahPeaH.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DbjgYaG-.js → dext-dropdown-rac-sTD_r-0H.js} +1 -1
- package/dist/component/{dext-email-rac-rNudrOOK.js → dext-email-rac-e-2_h3he.js} +1 -1
- package/dist/component/{dext-number-input-rac-hw1FTrJL.js → dext-number-input-rac-D6LACzWl.js} +1 -1
- package/dist/component/{dext-phone-rac-DrZ_Vwv2.js → dext-phone-rac-kUycy5Od.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DAt2ax-I.js → dext-radio-group-rac-DPD2UkrV.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BW2Ike11.js → dext-rating-input-rac-DUsnrl9W.js} +1 -1
- package/dist/component/{dext-tags-rac-DDzwlKrR.js → dext-tags-rac-D6z69HuO.js} +2 -2
- package/dist/component/{dext-text-area-rac-D0xf4z3z.js → dext-text-area-rac-C-DVtFJ1.js} +1 -1
- package/dist/component/{dext-text-input-rac-Da04OLmq.js → dext-text-input-rac-CIa2MdC6.js} +1 -1
- package/dist/component/{dext-url-input-rac-B-g4xTqh.js → dext-url-input-rac-8rVVW5us.js} +1 -1
- package/dist/component/{donation-rac-gKeq72jg.js → donation-rac-BjmSBabc.js} +60 -60
- package/dist/component/{dropdown-field-headless-Js5TxdU4.js → dropdown-field-headless-DReo519l.js} +16 -16
- package/dist/component/{dropdown-field-rac-BDxcvX00.js → dropdown-field-rac-DzrjA2O6.js} +7 -7
- package/dist/component/{dropdown-rac-B5UHNzV-.js → dropdown-rac-CS7oLTp_.js} +1 -1
- package/dist/component/{ecom-address-rac-0zm4bX37.js → ecom-address-rac-EIb88J_6.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DCXoI33l.js → ecom-subscription-checkbox-rac-CE0Ks6qS.js} +5 -5
- package/dist/component/{email-input-field-rac-svf6hUHF.js → email-input-field-rac-BScZxYHw.js} +47 -47
- package/dist/component/{events-repeater-rac-DMIqzuVK.js → events-repeater-rac-Y0rH2Jli.js} +45 -45
- package/dist/component/{events-rsvp-rac-B_YD4ckO.js → events-rsvp-rac-BiAYVv_b.js} +12 -12
- package/dist/component/{field-error-headless-DTKnr5Zx.js → field-error-headless-DrnFrGun.js} +3 -3
- package/dist/component/{field-label-headless-DV4aNd5Y.js → field-label-headless-BIYf1BIh.js} +4 -4
- package/dist/component/field-rac.module-CWkwwhq4.js +21 -0
- package/dist/component/{file-upload-rac-lGKJjG3m.js → file-upload-rac-br--tZLp.js} +73 -73
- package/dist/component/{fixed-payment-rac-BVS6glii.js → fixed-payment-rac-XEtrsaMy.js} +11 -11
- package/dist/component/{form-DzjdnO7t.js → form-9yjqDnxY.js} +1563 -1556
- package/dist/component/form-element-classes-KRzHUNLu.js +57 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-tzBH-8Yh.js → header-field-rac-CLELgzqY.js} +7 -7
- package/dist/component/{header-rac-6thQAvVF.js → header-rac-D8KGkVVp.js} +1 -1
- package/dist/component/{image-choice-rac-Dx1b-saW.js → image-choice-rac-Cl09CLP4.js} +14 -14
- package/dist/component/{index-DIP7KB8P.js → index-C4y71e1i.js} +2 -2
- package/dist/component/{index-Lnx0829a.js → index-PHkE0Ru4.js} +4 -4
- package/dist/component/{isObjectLike-B_1KizZV.js → isObjectLike-srCDplej.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BY2SUp2d.js → multiline-address-field-rac-CsBLI9y-.js} +80 -80
- package/dist/component/{multiline-address-rac-BL8Yp4F0.js → multiline-address-rac-DFDPFfXh.js} +1 -1
- package/dist/component/{number-input-field-rac-x0yFmXbe.js → number-input-field-rac-DZRR7gdt.js} +16 -16
- package/dist/component/{number-input-rac-pJXc2YsD.js → number-input-rac-BCS5lkff.js} +1 -1
- package/dist/component/{password-rac-B4XCP64b.js → password-rac-ClDGgR3E.js} +16 -16
- package/dist/component/{payment-input-rac-CZdOAjK4.js → payment-input-rac-COydWmUE.js} +28 -28
- package/dist/component/{phone-input-field-rac-DO_V5Z_T.js → phone-input-field-rac-DYCibqe1.js} +42 -42
- package/dist/component/{phone-rac-D16nLDjP.js → phone-rac-BS-dmWkJ.js} +1 -1
- package/dist/component/{product-list-rac-DER8gVqy.js → product-list-rac-hxOhaA-r.js} +75 -75
- package/dist/component/quiz-radio-group-rac-BT-YZO2Q.js +13 -0
- package/dist/component/{radio-group-field-rac-Dt2pU0VV.js → radio-group-field-rac-DKqWnMBJ.js} +3 -3
- package/dist/component/{radio-group-field-rac.module--sO0VqCA.js → radio-group-field-rac.module-BwUynK_5.js} +7 -7
- package/dist/component/{radio-group-rac-CqCmtkNQ.js → radio-group-rac-DHURQZKK.js} +1 -1
- package/dist/component/{rating-input-field-rac-xDrHHcL2.js → rating-input-field-rac-CZRdSVrf.js} +30 -30
- package/dist/component/{rating-input-rac-Bo5E9N87.js → rating-input-rac-BaH52DYm.js} +1 -1
- package/dist/component/{rich-content-rac.module-CJXbNca9.js → rich-content-rac.module-ILBfxEmN.js} +1 -1
- package/dist/component/{rich-text-field-rac-CkV0Z9F-.js → rich-text-field-rac-B58q8Is7.js} +5 -5
- package/dist/component/{rich-text-rac-59DbKpXz.js → rich-text-rac-DGbZh1eX.js} +1 -1
- package/dist/component/{service-dropdown-rac-BLnflnUr.js → service-dropdown-rac-DUiNIbdv.js} +45 -45
- package/dist/component/services-multi-choice-rac-B7y9s2l8.js +76 -0
- package/dist/component/{signature-rac-Bb5IaS28.js → signature-rac-CydpvQJZ.js} +25 -25
- package/dist/component/{submit-button-rac-Bjyi8sUA.js → submit-button-rac-OO53h4H8.js} +6 -6
- package/dist/component/{tags-field-rac-C_VO3_69.js → tags-field-rac-eX3d3JEH.js} +44 -44
- package/dist/component/{tags-rac-CKiutCWe.js → tags-rac-CdIB_48Z.js} +1 -1
- package/dist/component/{text-area-field-rac-Cg-vIhFe.js → text-area-field-rac-Bir5Q7gz.js} +17 -17
- package/dist/component/{text-area-rac-tMFx38UD.js → text-area-rac-Ct1UNU04.js} +1 -1
- package/dist/component/{text-input-field-rac-CgN_2hOD.js → text-input-field-rac-onGUXC9J.js} +6 -6
- package/dist/component/{text-input-headless-CkhvKrFp.js → text-input-headless-Bs9m7QFg.js} +11 -11
- package/dist/component/{text-input-rac-BsyBgd3b.js → text-input-rac-DK4nEw4D.js} +1 -1
- package/dist/component/{time-input-rac-BxRVJtHE.js → time-input-rac-BCG9ktFa.js} +35 -35
- package/dist/component/{url-input-field-rac-B_1yVniS.js → url-input-field-rac-mUkrVTcL.js} +24 -24
- package/dist/component/{url-input-rac-D8VrKYVe.js → url-input-rac-Cl7LFYlr.js} +1 -1
- package/dist/component/{use-service-options-base-Ci9gIluo.js → use-service-options-base-BYVuKRj2.js} +6 -6
- package/dist/form.d.ts +3 -1
- package/package.json +2 -2
- package/dist/component/checkbox-group-field-headless-Cvia4lL6.js +0 -204
- package/dist/component/checkbox-group-field-rac-BXxk90dk.js +0 -33
- package/dist/component/contacts-subscribe-rac-Ci5OLk68.js +0 -13
- package/dist/component/field-rac.module-DtugsLiL.js +0 -21
- package/dist/component/form-element-classes-Bi-nNM8q.js +0 -55
- package/dist/component/quiz-radio-group-rac-BgTmHHi4.js +0 -13
- package/dist/component/services-multi-choice-rac-C-bFjwx8.js +0 -76
package/dist/component/{dext-radio-group-rac-DAt2ax-I.js → dext-radio-group-rac-DPD2UkrV.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { R as p } from "./radio-group-field-rac-
|
|
2
|
+
import { ai as e, h as t } from "./form-9yjqDnxY.js";
|
|
3
|
+
import { R as p } from "./radio-group-field-rac-DKqWnMBJ.js";
|
|
4
4
|
import { a } from "./default-limits-D7qVv_Hv.js";
|
|
5
5
|
const l = () => {
|
|
6
6
|
const o = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { T as s } from "./tags-field-rac-
|
|
2
|
+
import { ai as e, h as o } from "./form-9yjqDnxY.js";
|
|
3
|
+
import { T as s } from "./tags-field-rac-eX3d3JEH.js";
|
|
4
4
|
import { b as a } from "./default-limits-D7qVv_Hv.js";
|
|
5
5
|
const l = () => {
|
|
6
6
|
const t = {
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import n, { useMemo as w, useCallback as
|
|
1
|
+
import n, { useMemo as w, useCallback as D, useRef as ae } from "react";
|
|
2
2
|
import { RicosViewer as se } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
|
-
import { RadioGroup as le, RadioField as j, RadioButton as
|
|
4
|
+
import { RadioGroup as le, RadioField as j, RadioButton as J, TextField as ce, Input as ie } from "react-aria-components";
|
|
5
5
|
import { debounce as ue } from "ts-debounce";
|
|
6
|
-
import { P as
|
|
6
|
+
import { P as Q, ai as P, af as V, as as me, ab as M, ak as pe } from "./form-9yjqDnxY.js";
|
|
7
7
|
import { f as h, a as g } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { a as
|
|
9
|
-
import { D as de, E as Ie } from "./field-error-headless-
|
|
10
|
-
import { L as Ce } from "./field-label-headless-
|
|
8
|
+
import { a as W } from "./format-currency-BwShJ9vM.js";
|
|
9
|
+
import { D as de, E as Ie } from "./field-error-headless-DrnFrGun.js";
|
|
10
|
+
import { L as Ce } from "./field-label-headless-BIYf1BIh.js";
|
|
11
11
|
import { N as Ee } from "./options-layout-constants-DEfIEJWD.js";
|
|
12
12
|
import { a as fe, b as he } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
13
|
import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
14
|
import { u as ye } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
15
|
import { E as _e } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { s as
|
|
17
|
-
import {
|
|
18
|
-
import { o as
|
|
19
|
-
function
|
|
16
|
+
import { s as R } from "./field-rac.module-CWkwwhq4.js";
|
|
17
|
+
import { t as be, J as ge, h as Y, v as B, n as Fe, j as Ne } from "./form-element-classes-KRzHUNLu.js";
|
|
18
|
+
import { o as ve } from "./options-rac.module-KM-VT_KY.js";
|
|
19
|
+
function De(e, t) {
|
|
20
20
|
return e.reduce((r, o) => (r[o[t]] = o, r), {});
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
22
|
+
function Le(e) {
|
|
23
|
+
return De(e, "id");
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const Re = 0.01;
|
|
26
26
|
function Se(e) {
|
|
27
27
|
var t;
|
|
28
28
|
return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
|
|
@@ -31,12 +31,12 @@ function K(e, t) {
|
|
|
31
31
|
const r = Number(t || "0");
|
|
32
32
|
return {
|
|
33
33
|
productId: e.id,
|
|
34
|
-
price: e.priceType ===
|
|
34
|
+
price: e.priceType === Q.DYNAMIC_PRICE ? r : String(r),
|
|
35
35
|
quantity: 1
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
function Ae(e) {
|
|
39
|
-
return e.find((t) => t.priceType ===
|
|
39
|
+
return e.find((t) => t.priceType === Q.DYNAMIC_PRICE);
|
|
40
40
|
}
|
|
41
41
|
function Pe(e, t) {
|
|
42
42
|
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
@@ -53,7 +53,7 @@ const a = ({ children: e }) => {
|
|
|
53
53
|
return ((T = (f = u == null ? void 0 : u.predefined) == null ? void 0 : f.paymentOptions) == null ? void 0 : T.products) || [];
|
|
54
54
|
}, [
|
|
55
55
|
u
|
|
56
|
-
]),
|
|
56
|
+
]), L = w(() => Le(N), [
|
|
57
57
|
N
|
|
58
58
|
]), l = w(() => m ? Ae(N) : void 0, [
|
|
59
59
|
N,
|
|
@@ -62,55 +62,55 @@ const a = ({ children: e }) => {
|
|
|
62
62
|
sourceValue: X,
|
|
63
63
|
format: (f) => he(String(f ?? ""), F),
|
|
64
64
|
regionalFormat: F
|
|
65
|
-
}), z =
|
|
66
|
-
o(Me(f, C,
|
|
65
|
+
}), z = D((f) => {
|
|
66
|
+
o(Me(f, C, L)), x("");
|
|
67
67
|
}, [
|
|
68
68
|
o,
|
|
69
|
-
|
|
69
|
+
L,
|
|
70
70
|
C,
|
|
71
71
|
x
|
|
72
|
-
]), $ =
|
|
72
|
+
]), $ = D((f) => {
|
|
73
73
|
l && o(typeof f == "number" ? [
|
|
74
74
|
K(l, String(f))
|
|
75
75
|
] : []);
|
|
76
76
|
}, [
|
|
77
77
|
o,
|
|
78
78
|
l
|
|
79
|
-
]),
|
|
79
|
+
]), G = w(() => ue($, 500), [
|
|
80
80
|
$
|
|
81
|
-
]), Z =
|
|
81
|
+
]), Z = D((f) => {
|
|
82
82
|
(C == null ? void 0 : C.productId) !== (l == null ? void 0 : l.id) && o(void 0);
|
|
83
|
-
const { validInput: T, validNumber: re } = fe(f.target.value,
|
|
84
|
-
x(T),
|
|
83
|
+
const { validInput: T, validNumber: re } = fe(f.target.value, Re, q, F);
|
|
84
|
+
x(T), G(re);
|
|
85
85
|
}, [
|
|
86
86
|
F,
|
|
87
87
|
o,
|
|
88
88
|
C,
|
|
89
89
|
l,
|
|
90
90
|
q,
|
|
91
|
-
|
|
91
|
+
G,
|
|
92
92
|
x
|
|
93
|
-
]),
|
|
94
|
-
l != null && l.id &&
|
|
93
|
+
]), k = (C == null ? void 0 : C.productId) || null, ee = D(() => {
|
|
94
|
+
l != null && l.id && k !== l.id && z(l.id);
|
|
95
95
|
}, [
|
|
96
96
|
l == null ? void 0 : l.id,
|
|
97
|
-
|
|
97
|
+
k,
|
|
98
98
|
z
|
|
99
|
-
]), te = h(e, a.Label),
|
|
99
|
+
]), te = h(e, a.Label), H = h(e, a.Control), ne = h(e, a.Description), oe = h(e, a.Error);
|
|
100
100
|
return /* @__PURE__ */ n.createElement(O, {
|
|
101
101
|
fieldId: t,
|
|
102
102
|
renderLabel: () => te,
|
|
103
103
|
renderInput: () => /* @__PURE__ */ n.createElement(le, {
|
|
104
104
|
"aria-labelledby": p,
|
|
105
|
-
value:
|
|
105
|
+
value: k,
|
|
106
106
|
onChange: z,
|
|
107
107
|
isDisabled: s,
|
|
108
108
|
isInvalid: E,
|
|
109
109
|
isRequired: c,
|
|
110
110
|
onBlur: i,
|
|
111
111
|
onFocus: y
|
|
112
|
-
},
|
|
113
|
-
productsById:
|
|
112
|
+
}, H ? g(H, {
|
|
113
|
+
productsById: L,
|
|
114
114
|
addOther: m,
|
|
115
115
|
customAmount: q,
|
|
116
116
|
onCustomAmountInputChange: Z,
|
|
@@ -141,8 +141,8 @@ const a = ({ children: e }) => {
|
|
|
141
141
|
customAmountProductId: I,
|
|
142
142
|
onFocusCustomInput: O
|
|
143
143
|
}) : null);
|
|
144
|
-
},
|
|
145
|
-
const { productsById: o, addOther: s, customAmountProductId: c, t: i } = r, { options: y, numberOfColumns: u } = P(), { isMobile: m } = M(), I = h(e,
|
|
144
|
+
}, U = ({ children: e, className: t, ...r }) => {
|
|
145
|
+
const { productsById: o, addOther: s, customAmountProductId: c, t: i } = r, { options: y, numberOfColumns: u } = P(), { isMobile: m } = M(), I = h(e, U.Option), O = m ? Ee.ONE : u;
|
|
146
146
|
return /* @__PURE__ */ n.createElement("div", {
|
|
147
147
|
className: t,
|
|
148
148
|
"data-columns": O
|
|
@@ -167,11 +167,11 @@ const a = ({ children: e }) => {
|
|
|
167
167
|
whiteSpace: "nowrap",
|
|
168
168
|
border: "0"
|
|
169
169
|
}
|
|
170
|
-
}, /* @__PURE__ */ n.createElement(
|
|
170
|
+
}, /* @__PURE__ */ n.createElement(J, {
|
|
171
171
|
"aria-label": i("donation.other-option.label", "Custom amount")
|
|
172
172
|
}, i("donation.other-option.label", "Custom amount"))));
|
|
173
173
|
}, S = ({ children: e, className: t, ...r }) => {
|
|
174
|
-
const { value: o, price: s } = r, { id: c } = P(), { currency: i, regionalFormat: y } = M(), u = h(e, S.Value), m = h(e, S.Currency), { isCurrencyPrefixed: I } =
|
|
174
|
+
const { value: o, price: s } = r, { id: c } = P(), { currency: i, regionalFormat: y } = M(), u = h(e, S.Value), m = h(e, S.Currency), { isCurrencyPrefixed: I } = W({
|
|
175
175
|
amount: s,
|
|
176
176
|
currency: i == null ? void 0 : i.code,
|
|
177
177
|
locale: y
|
|
@@ -185,12 +185,12 @@ const a = ({ children: e }) => {
|
|
|
185
185
|
}) : null;
|
|
186
186
|
return /* @__PURE__ */ n.createElement(j, {
|
|
187
187
|
value: o
|
|
188
|
-
}, /* @__PURE__ */ n.createElement(
|
|
188
|
+
}, /* @__PURE__ */ n.createElement(J, {
|
|
189
189
|
className: t,
|
|
190
190
|
ref: O
|
|
191
191
|
}, /* @__PURE__ */ n.createElement(n.Fragment, null, I && m, E, !I && m)));
|
|
192
192
|
}, Te = ({ className: e, ...t }) => {
|
|
193
|
-
const { price: r } = t, { currency: o, regionalFormat: s } = M(), { value: c } =
|
|
193
|
+
const { price: r } = t, { currency: o, regionalFormat: s } = M(), { value: c } = W({
|
|
194
194
|
amount: r,
|
|
195
195
|
currency: o == null ? void 0 : o.code,
|
|
196
196
|
locale: s
|
|
@@ -207,15 +207,15 @@ const a = ({ children: e }) => {
|
|
|
207
207
|
S.Value = Te;
|
|
208
208
|
S.Currency = we;
|
|
209
209
|
const A = ({ children: e, className: t, ...r }) => {
|
|
210
|
-
const { customAmount: o, onCustomAmountInputChange: s, currency: c, t: i, placeholder: y, customAmountProductId: u, onFocusCustomInput: m } = r, { disabled: I, hasError: O } = P(), { labelId: E, prefixId: p } = V(), d = h(e, A.Currency), b = h(e, A.Value), F =
|
|
210
|
+
const { customAmount: o, onCustomAmountInputChange: s, currency: c, t: i, placeholder: y, customAmountProductId: u, onFocusCustomInput: m } = r, { disabled: I, hasError: O } = P(), { labelId: E, prefixId: p } = V(), d = h(e, A.Currency), b = h(e, A.Value), F = D((L) => {
|
|
211
211
|
s({
|
|
212
212
|
target: {
|
|
213
|
-
value:
|
|
213
|
+
value: L
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
216
|
}, [
|
|
217
217
|
s
|
|
218
|
-
]), C =
|
|
218
|
+
]), C = D(() => {
|
|
219
219
|
m();
|
|
220
220
|
}, [
|
|
221
221
|
m
|
|
@@ -258,48 +258,48 @@ const A = ({ children: e, className: t, ...r }) => {
|
|
|
258
258
|
};
|
|
259
259
|
A.Currency = Be;
|
|
260
260
|
A.Value = Ve;
|
|
261
|
-
|
|
261
|
+
U.Option = S;
|
|
262
262
|
a.Label = Ce;
|
|
263
263
|
a.Control = xe;
|
|
264
|
-
a.Options =
|
|
264
|
+
a.Options = U;
|
|
265
265
|
a.OtherInput = A;
|
|
266
266
|
a.Description = de;
|
|
267
267
|
a.Error = Ie;
|
|
268
|
-
const qe = "_control_7gwzv_1", ze = "_option_7gwzv_7",
|
|
268
|
+
const qe = "_control_7gwzv_1", ze = "_option_7gwzv_7", ke = "_optionCurrency_7gwzv_91", Ue = "_otherInput_7gwzv_95", $e = "_otherInputValue_7gwzv_112", Ge = "_otherInputCurrency_7gwzv_165", v = {
|
|
269
269
|
control: qe,
|
|
270
270
|
option: ze,
|
|
271
|
-
optionCurrency:
|
|
272
|
-
otherInput:
|
|
271
|
+
optionCurrency: ke,
|
|
272
|
+
otherInput: Ue,
|
|
273
273
|
otherInputValue: $e,
|
|
274
|
-
otherInputCurrency:
|
|
275
|
-
},
|
|
274
|
+
otherInputCurrency: Ge
|
|
275
|
+
}, He = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(se, {
|
|
276
276
|
content: e,
|
|
277
277
|
locale: t
|
|
278
278
|
}), Ye = () => /* @__PURE__ */ n.createElement(a, null, /* @__PURE__ */ n.createElement(a.Label, {
|
|
279
|
-
className: _(be,
|
|
279
|
+
className: _(be, R.label)
|
|
280
280
|
}, /* @__PURE__ */ n.createElement(a.Label.Required, {
|
|
281
|
-
className: _(ge,
|
|
281
|
+
className: _(ge, R.requiredMark)
|
|
282
282
|
})), /* @__PURE__ */ n.createElement(a.Control, {
|
|
283
|
-
className:
|
|
283
|
+
className: v.control
|
|
284
284
|
}, /* @__PURE__ */ n.createElement(a.Options, {
|
|
285
|
-
className:
|
|
285
|
+
className: ve.options
|
|
286
286
|
}, /* @__PURE__ */ n.createElement(a.Options.Option, {
|
|
287
|
-
className: _(Y,
|
|
287
|
+
className: _(Y, v.option)
|
|
288
288
|
}, /* @__PURE__ */ n.createElement(a.Options.Option.Value, {
|
|
289
289
|
className: B
|
|
290
290
|
}), /* @__PURE__ */ n.createElement(a.Options.Option.Currency, {
|
|
291
|
-
className: _(B,
|
|
291
|
+
className: _(B, v.optionCurrency)
|
|
292
292
|
}))), /* @__PURE__ */ n.createElement(a.OtherInput, {
|
|
293
|
-
className: _(Y,
|
|
293
|
+
className: _(Y, R.input, v.otherInput)
|
|
294
294
|
}, /* @__PURE__ */ n.createElement(a.OtherInput.Currency, {
|
|
295
|
-
className: _(B,
|
|
295
|
+
className: _(B, v.otherInputCurrency)
|
|
296
296
|
}), /* @__PURE__ */ n.createElement(a.OtherInput.Value, {
|
|
297
|
-
className: _(B,
|
|
297
|
+
className: _(B, v.otherInputValue)
|
|
298
298
|
}))), /* @__PURE__ */ n.createElement(a.Error, {
|
|
299
|
-
className: _(Fe,
|
|
299
|
+
className: _(Fe, R.error)
|
|
300
300
|
}, /* @__PURE__ */ n.createElement(_e, null), /* @__PURE__ */ n.createElement(a.Error.Text, null)), /* @__PURE__ */ n.createElement(a.Description, {
|
|
301
|
-
className: _(Ne,
|
|
302
|
-
},
|
|
301
|
+
className: _(Ne, R.description)
|
|
302
|
+
}, He)), mt = () => /* @__PURE__ */ n.createElement(Ye, null);
|
|
303
303
|
export {
|
|
304
304
|
mt as DonationRAC
|
|
305
305
|
};
|
package/dist/component/{dropdown-field-headless-Js5TxdU4.js → dropdown-field-headless-DReo519l.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
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
|
-
import { Select as
|
|
4
|
-
import {
|
|
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-9yjqDnxY.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-DrnFrGun.js";
|
|
7
|
+
import { L as J } from "./field-label-headless-BIYf1BIh.js";
|
|
8
8
|
import { S as K, N as Q } from "./non-modal-popover-DtIMXHbe.js";
|
|
9
9
|
const n = ({ children: t }) => {
|
|
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:
|
|
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) => {
|
|
11
11
|
s || u(typeof c == "string" ? c : null);
|
|
12
12
|
}, [
|
|
13
13
|
u,
|
|
14
14
|
s
|
|
15
|
-
]), S = g((c) =>
|
|
15
|
+
]), S = g((c) => L(c && !i && !s), [
|
|
16
16
|
i,
|
|
17
17
|
s
|
|
18
|
-
]), T = d(t, n.Label), x = d(t, n.Trigger), V = d(t, n.Options),
|
|
18
|
+
]), T = d(t, n.Label), x = d(t, n.Trigger), V = d(t, n.Options), k = d(t, n.Description), R = d(t, n.Error);
|
|
19
19
|
return /* @__PURE__ */ e.createElement(F, {
|
|
20
20
|
fieldId: o,
|
|
21
21
|
renderLabel: () => T,
|
|
@@ -25,25 +25,25 @@ const n = ({ children: t }) => {
|
|
|
25
25
|
display: "contents"
|
|
26
26
|
}
|
|
27
27
|
}), /* @__PURE__ */ e.createElement(A, {
|
|
28
|
-
getContainer: () =>
|
|
29
|
-
}, /* @__PURE__ */ e.createElement(
|
|
28
|
+
getContainer: () => h
|
|
29
|
+
}, /* @__PURE__ */ e.createElement(w, {
|
|
30
30
|
"aria-labelledby": N,
|
|
31
31
|
value: B,
|
|
32
|
-
isOpen:
|
|
32
|
+
isOpen: D && !i && !s,
|
|
33
33
|
onOpenChange: S,
|
|
34
34
|
onChange: P,
|
|
35
35
|
isDisabled: i,
|
|
36
|
-
isInvalid:
|
|
36
|
+
isInvalid: C,
|
|
37
37
|
isRequired: v,
|
|
38
38
|
placeholder: m,
|
|
39
39
|
onBlur: O,
|
|
40
40
|
onFocus: y
|
|
41
41
|
}, x, V))),
|
|
42
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
42
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, R, k)
|
|
43
43
|
});
|
|
44
44
|
}, W = ({ children: t, className: o }) => {
|
|
45
45
|
const { inputId: r, ariaDescribedBy: l } = b(), { id: a, hasError: s, isLoading: u } = p(), m = q(null);
|
|
46
|
-
return
|
|
46
|
+
return j(() => {
|
|
47
47
|
var i;
|
|
48
48
|
(i = m.current) == null || i.focus();
|
|
49
49
|
}, a), /* @__PURE__ */ e.createElement(K, {
|
|
@@ -53,21 +53,21 @@ const n = ({ children: t }) => {
|
|
|
53
53
|
className: o,
|
|
54
54
|
"data-invalid": s || void 0,
|
|
55
55
|
"data-loading": u || void 0
|
|
56
|
-
}, /* @__PURE__ */ e.createElement(
|
|
56
|
+
}, /* @__PURE__ */ e.createElement(M, null), t);
|
|
57
57
|
}, f = ({ children: t, className: o }) => {
|
|
58
58
|
const { options: r = [] } = p(), l = d(t, f.Option);
|
|
59
59
|
return /* @__PURE__ */ e.createElement(Q, {
|
|
60
60
|
className: o,
|
|
61
61
|
containerPadding: 0,
|
|
62
62
|
offset: 0
|
|
63
|
-
}, /* @__PURE__ */ e.createElement(
|
|
63
|
+
}, /* @__PURE__ */ e.createElement(U, null, r.map((a) => z(l, {
|
|
64
64
|
key: a.value ?? a.label,
|
|
65
65
|
value: a.value ?? a.label,
|
|
66
66
|
label: a.label
|
|
67
67
|
}))));
|
|
68
68
|
}, X = ({ className: t, ...o }) => {
|
|
69
69
|
const { value: r, label: l } = o;
|
|
70
|
-
return /* @__PURE__ */ e.createElement(
|
|
70
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
71
71
|
className: t,
|
|
72
72
|
id: r,
|
|
73
73
|
textValue: l
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as n } 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-DReo519l.js";
|
|
5
5
|
import { C as m } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
|
-
import { E as
|
|
6
|
+
import { E as l } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { H as c } from "./custom-focus-class-_483Pkwp.js";
|
|
8
|
-
import { s as r } from "./field-rac.module-
|
|
9
|
-
import {
|
|
10
|
-
const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(
|
|
8
|
+
import { s as r } from "./field-rac.module-CWkwwhq4.js";
|
|
9
|
+
import { t as E, J as i, s as p, w as _, n as S, j as R } from "./form-element-classes-KRzHUNLu.js";
|
|
10
|
+
const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(n, {
|
|
11
11
|
content: a,
|
|
12
12
|
locale: s
|
|
13
13
|
}), u = () => /* @__PURE__ */ e.createElement(o, null, /* @__PURE__ */ e.createElement(o.Label, {
|
|
@@ -24,7 +24,7 @@ const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(l, {
|
|
|
24
24
|
className: t(r.selectOption, c)
|
|
25
25
|
})), /* @__PURE__ */ e.createElement(o.Error, {
|
|
26
26
|
className: t(S, r.error)
|
|
27
|
-
}, /* @__PURE__ */ e.createElement(
|
|
27
|
+
}, /* @__PURE__ */ e.createElement(l, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
|
|
28
28
|
className: t(R, r.description)
|
|
29
29
|
}, D));
|
|
30
30
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o, { useMemo as a } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { C } from "./checkbox-field-rac-
|
|
4
|
-
import {
|
|
2
|
+
import { ai as n, as as c, h as i } from "./form-9yjqDnxY.js";
|
|
3
|
+
import { C } from "./checkbox-field-rac-CYADRY54.js";
|
|
4
|
+
import { l, m, k as p } from "./form-element-classes-KRzHUNLu.js";
|
|
5
5
|
const _ = (e) => ({
|
|
6
6
|
nodes: [
|
|
7
7
|
{
|
|
@@ -38,8 +38,8 @@ const _ = (e) => ({
|
|
|
38
38
|
}
|
|
39
39
|
}, /* @__PURE__ */ o.createElement(C, {
|
|
40
40
|
classes: {
|
|
41
|
-
container:
|
|
42
|
-
label:
|
|
41
|
+
container: p,
|
|
42
|
+
label: m,
|
|
43
43
|
control: l
|
|
44
44
|
}
|
|
45
45
|
}));
|