@wix/form-elements 1.107.0 → 1.109.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-D2F4vgf1.js → appointment-rac-C9-XwsPI.js} +295 -296
- package/dist/component/{bookings-address-rac-_5S8J8_i.js → bookings-address-rac-jrrCPWjw.js} +1 -1
- package/dist/component/{bookings-email-rac-6vmDR9nS.js → bookings-email-rac-J9-RMEbf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DtTJ4T2K.js → bookings-first-name-rac-CH7-6JmA.js} +1 -1
- package/dist/component/{bookings-header-rac-B3dsEwzR.js → bookings-header-rac-C2JV-ciN.js} +1 -1
- package/dist/component/{bookings-last-name-rac-B3idkbi8.js → bookings-last-name-rac-0a9CwiaV.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CrRBcQwT.js → bookings-login-bar-rac-4Mb7MQYe.js} +21 -22
- package/dist/component/{bookings-phone-rac-BE0yWNnj.js → bookings-phone-rac-vYx5r5jn.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CYo1l0-6.js → bookings-rich-text-rac-CWg1FgUp.js} +1 -1
- package/dist/component/{checkbox-field-rac-boTtXVEt.js → checkbox-field-rac-Dwx1leKA.js} +27 -28
- package/dist/component/{checkbox-group-field-headless-DnkUvDm8.js → checkbox-group-field-headless-AFWgXzx_.js} +41 -41
- package/dist/component/{checkbox-group-field-rac-DrDTgHMg.js → checkbox-group-field-rac-CO8kmWJp.js} +6 -6
- package/dist/component/{checkbox-group-rac-v3ozUBpo.js → checkbox-group-rac-_79HsFF4.js} +1 -1
- package/dist/component/{checkbox-rac-YSLE-RnG.js → checkbox-rac-B_tbMfjo.js} +1 -1
- package/dist/component/{contacts-address-rac-C653yaHZ.js → contacts-address-rac-SJ5Tvzd0.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BeAQ6shx.js → contacts-birthdate-rac-BU1L3sbW.js} +1 -1
- package/dist/component/{contacts-company-rac-BglKOoTG.js → contacts-company-rac-Y4B8KhDa.js} +1 -1
- package/dist/component/{contacts-email-rac-D6m7ynfc.js → contacts-email-rac-CQW84o7C.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Dgxn0tUJ.js → contacts-first-name-rac-Dtai-wtH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-1UyIuRKH.js → contacts-last-name-rac--ixuu3ri.js} +1 -1
- package/dist/component/{contacts-phone-rac-BQ77BlW4.js → contacts-phone-rac-HOHfSvT-.js} +1 -1
- package/dist/component/{contacts-position-rac-BUDUv7lv.js → contacts-position-rac-BPMkh6yf.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DdtA0qKW.js → contacts-subscribe-rac-D0_RMwJb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WUaKcNl0.js → contacts-tax-id-rac-CZJmMiVf.js} +1 -1
- package/dist/component/{date-availability-XjBFq8jt.js → date-availability-C4dDHvuc.js} +1 -1
- package/dist/component/{date-input-field-rac-aY2zuuKs.js → date-input-field-rac-8oERZcqh.js} +79 -80
- package/dist/component/{date-input-rac-DRiP2_97.js → date-input-rac-CYRojmW6.js} +1 -1
- package/dist/component/{date-picker-field-rac-Bzl-d3Uj.js → date-picker-field-rac-CIspU7No.js} +87 -88
- package/dist/component/{date-picker-rac-DHHUh8vn.js → date-picker-rac-D0Y0zf2J.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DP_StuLr.js → date-time-input-field-rac-0daWK65I.js} +73 -74
- package/dist/component/{date-time-input-rac-B11KIxsf.js → date-time-input-rac-BemKPk1j.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BHZBqyWv.js → dext-checkbox-group-rac-BpFNn56W.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BIlAqEvV.js → dext-checkbox-rac-DOISgubJ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CHBXNrZi.js → dext-date-picker-rac-CNGhFg_g.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BYtliKry.js → dext-date-time-input-rac-BuUIvJRr.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C2VPSFV5.js → dext-dropdown-rac-DtND-Dbo.js} +1 -1
- package/dist/component/{dext-email-rac-Fnb0Ggcs.js → dext-email-rac-CmjLFOi8.js} +1 -1
- package/dist/component/{dext-number-input-rac-DopfSyFi.js → dext-number-input-rac-DHTNg1dh.js} +1 -1
- package/dist/component/{dext-phone-rac-Rn4i_2rc.js → dext-phone-rac-BrrU5qH_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-bNaskJpK.js → dext-radio-group-rac-CD3MGfAM.js} +4 -4
- package/dist/component/{dext-rating-input-rac-DL6ZZd7d.js → dext-rating-input-rac-BETGJZmt.js} +1 -1
- package/dist/component/{dext-tags-rac-TsUPoImO.js → dext-tags-rac-Coo9jN-T.js} +4 -4
- package/dist/component/{dext-text-area-rac-BIuY7LTd.js → dext-text-area-rac-CNWjqhUT.js} +1 -1
- package/dist/component/{dext-text-input-rac-CSYPW0Qi.js → dext-text-input-rac-CCWyDexv.js} +1 -1
- package/dist/component/{dext-url-input-rac-_g0lqGfW.js → dext-url-input-rac-Dtakkgmk.js} +1 -1
- package/dist/component/{donation-rac-BYKFtsyR.js → donation-rac-BboGm_k_.js} +101 -102
- package/dist/component/{dropdown-field-headless-CBaqlNZi.js → dropdown-field-headless-BTMJGUwY.js} +16 -16
- package/dist/component/{dropdown-field-rac-CCAGSMm3.js → dropdown-field-rac-CDRV8ckB.js} +5 -5
- package/dist/component/{dropdown-rac-C_EqUsZ1.js → dropdown-rac-kEuU2pXW.js} +1 -1
- package/dist/component/{ecom-address-rac-Bw9eH0iF.js → ecom-address-rac-BgKL9ElH.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B5PVOO2a.js → ecom-subscription-checkbox-rac-CDhJsNPD.js} +6 -6
- package/dist/component/{email-input-field-rac-B2kqQ6yo.js → email-input-field-rac-DdOd86NX.js} +54 -55
- package/dist/component/{events-repeater-rac--4OnUxWE.js → events-repeater-rac-_VJ30dpB.js} +62 -63
- package/dist/component/{events-rsvp-rac-CczCoo3T.js → events-rsvp-rac-DA-261bq.js} +5 -5
- package/dist/component/{field-error-headless-D3-1L5sf.js → field-error-headless-CovyN0GI.js} +8 -8
- package/dist/component/{field-label-headless-Du4ckIVy.js → field-label-headless-DVvX2QaH.js} +11 -11
- package/dist/component/file-upload-rac-bhEPUJPs.js +561 -0
- package/dist/component/fixed-payment-rac-DmI6MeKc.js +61 -0
- package/dist/component/{form-DQauhsho.js → form-BTDgyr54.js} +3430 -3244
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/header-field-rac-C0rUjmo0.js +24 -0
- package/dist/component/{header-rac-CR9T3Pnu.js → header-rac-DRMO22PV.js} +1 -1
- package/dist/component/{image-choice-rac-DJ_8v467.js → image-choice-rac-CQDQ7AlD.js} +32 -33
- package/dist/component/{index-CcUTIUWM.js → index-B9QlosT1.js} +12 -12
- package/dist/component/{index-BB7d_9Dv.js → index-CNWT9t6j.js} +66 -66
- package/dist/component/{isObjectLike-xvPa_08X.js → isObjectLike-c0td2WCR.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CyaFOloE.js → multiline-address-field-rac-D8bVxRsD.js} +124 -125
- package/dist/component/{multiline-address-rac-CaHGUN_f.js → multiline-address-rac-g-6RB7o8.js} +1 -1
- package/dist/component/number-input-field-rac-BaOwQ5Ya.js +92 -0
- package/dist/component/{number-input-rac-DMKX6nhk.js → number-input-rac-BXv8-Pnj.js} +1 -1
- package/dist/component/{password-rac-0RUXPAn6.js → password-rac-BB9XeSSZ.js} +36 -37
- package/dist/component/{payment-input-rac-CHSZ3-Lt.js → payment-input-rac-DwnSV9rM.js} +41 -42
- package/dist/component/{phone-input-field-rac-JmIFcP1e.js → phone-input-field-rac-CC3C4ToW.js} +56 -57
- package/dist/component/{phone-rac-BLRnAPXP.js → phone-rac-DpNhSaE0.js} +1 -1
- package/dist/component/{product-list-rac-BkF5tDwt.js → product-list-rac-BAESk3B6.js} +74 -75
- package/dist/component/{quiz-radio-group-rac-32cCMTUS.js → quiz-radio-group-rac-PS6AZr63.js} +1 -1
- package/dist/component/{radio-button-module-classes-IOulhuSH.js → radio-button-module-classes-CXcn5unY.js} +30 -30
- package/dist/component/{radio-group-field-rac-CJwku6e0.js → radio-group-field-rac-pt8xbDfS.js} +6 -6
- package/dist/component/{radio-group-rac-BiW-9Abj.js → radio-group-rac-DkzkM6N_.js} +1 -1
- package/dist/component/{rating-input-field-rac-B9cwaROK.js → rating-input-field-rac-DDHBkR4x.js} +43 -44
- package/dist/component/{rating-input-rac-BpwlNvzQ.js → rating-input-rac-CcsDmLus.js} +1 -1
- package/dist/component/{rich-content-rac.module-B1uyPmtK.js → rich-content-rac.module-B2vsO6fj.js} +4 -4
- package/dist/component/rich-text-field-rac-CvKht2eC.js +21 -0
- package/dist/component/{rich-text-rac-VfeZxS27.js → rich-text-rac-CRpSffQB.js} +1 -1
- package/dist/component/{service-dropdown-rac-BCfs8IhW.js → service-dropdown-rac-BOpdXNjG.js} +36 -37
- package/dist/component/{services-multi-choice-rac-CCqdF_7P.js → services-multi-choice-rac-t0wdSt_T.js} +20 -21
- package/dist/component/{signature-rac-DOyMo3u0.js → signature-rac-2LsIYYIX.js} +141 -142
- package/dist/component/{submit-button-rac-C2uA5DeE.js → submit-button-rac-BbE8dS35.js} +26 -27
- package/dist/component/{tags-field-rac-C_uIw2by.js → tags-field-rac-BnsBxReU.js} +44 -45
- package/dist/component/{tags-rac-1pQ-fpe_.js → tags-rac-BFH4RINA.js} +1 -1
- package/dist/component/{text-area-field-rac-DqlOkm7e.js → text-area-field-rac-Ag7_gniM.js} +28 -29
- package/dist/component/{text-area-rac-DPdkrFcH.js → text-area-rac-ByUX0p2O.js} +1 -1
- package/dist/component/{text-input-field-rac-CmXm6r1w.js → text-input-field-rac-D3MZ8teu.js} +3 -3
- package/dist/component/{text-input-headless-DD__2DFf.js → text-input-headless-CwONErsY.js} +12 -12
- package/dist/component/{text-input-rac-DRHyQEH7.js → text-input-rac-DLXdAhkK.js} +1 -1
- package/dist/component/{time-input-rac-BJPIymQY.js → time-input-rac-Bs55lTON.js} +33 -34
- package/dist/component/url-input-field-rac-FG-bCh-E.js +74 -0
- package/dist/component/{url-input-rac-C0ChQUzq.js → url-input-rac-BOKuCMTe.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-DjV7FW5y.js +21 -0
- package/dist/component/{use-element-state-class-name-BatTc2bw.js → use-element-state-class-name-DB1AzkvF.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-B0jiPTmS.js → use-is-forced-open-dropdown-ifUIpuwL.js} +7 -7
- package/dist/component/{use-service-options-base-oeE7xszw.js → use-service-options-base-B11cq0HH.js} +7 -7
- package/dist/component/use-text-input-class-name-va1PzWFg.js +23 -0
- package/dist/form.d.ts +21 -1
- package/package.json +2 -2
- package/dist/component/file-upload-rac-DbdkUbWM.js +0 -484
- package/dist/component/fixed-payment-rac-f9-01iDN.js +0 -62
- package/dist/component/form-element-classes-bLFmhsKw.js +0 -137
- package/dist/component/header-field-rac-DamDk5BR.js +0 -25
- package/dist/component/number-input-field-rac-BuYUzDWV.js +0 -93
- package/dist/component/rich-text-field-rac-C_qE7Ykg.js +0 -22
- package/dist/component/url-input-field-rac-CFDYkZ6I.js +0 -75
- package/dist/component/use-dropdown-option-class-name-3L5ZmNLK.js +0 -21
- package/dist/component/use-text-input-class-name-LQ5S-NLh.js +0 -24
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import n, { useMemo as M, useCallback as D, useRef as re } from "react";
|
|
2
2
|
import { RicosViewer as se } from "@wix/ricos/viewer";
|
|
3
3
|
import F from "classnames";
|
|
4
|
-
import { RadioGroup as ae, RadioField as Y, RadioButton as
|
|
4
|
+
import { RadioGroup as ae, RadioField as Y, RadioButton as Q, TextField as le, Group as ie, Input as ce } from "react-aria-components";
|
|
5
5
|
import { debounce as ue } from "ts-debounce";
|
|
6
|
-
import {
|
|
7
|
-
import { f as E, a as
|
|
8
|
-
import { a as
|
|
9
|
-
import { D as
|
|
10
|
-
import { L as
|
|
11
|
-
import { a as
|
|
12
|
-
import { g as
|
|
13
|
-
import { u as
|
|
14
|
-
import { E as
|
|
6
|
+
import { aq as W, b9 as L, b6 as B, bj as me, b1 as j, bb as pe, I as de, U as Ie, q as fe, v as Ce, p as Ee, r as he } from "./form-BTDgyr54.js";
|
|
7
|
+
import { f as E, a as y } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { a as z } from "./format-currency-BwShJ9vM.js";
|
|
9
|
+
import { D as Oe, E as be } from "./field-error-headless-CovyN0GI.js";
|
|
10
|
+
import { L as _e } from "./field-label-headless-DVvX2QaH.js";
|
|
11
|
+
import { a as ye, b as ge } from "./numeric-input-utils-CuBMi4-a.js";
|
|
12
|
+
import { g as Ne } from "./payment-field-utils-DobiK5Xh.js";
|
|
13
|
+
import { u as Fe } from "./use-synced-display-value-DcAxdn3M.js";
|
|
14
|
+
import { E as De } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { s as v } from "./field-rac.module-B4l_0KRU.js";
|
|
16
|
-
import { v as ye, J as be, k as ge, o as Ne, j as Fe, l as De } from "./form-element-classes-bLFmhsKw.js";
|
|
17
16
|
import { o as G } from "./options-rac.module-CTDdATiz.js";
|
|
18
|
-
import { u as ve } from "./use-element-state-class-name-
|
|
19
|
-
import { u as Se } from "./use-text-input-class-name-
|
|
17
|
+
import { u as ve } from "./use-element-state-class-name-DB1AzkvF.js";
|
|
18
|
+
import { u as Se } from "./use-text-input-class-name-va1PzWFg.js";
|
|
20
19
|
function Re(e, t) {
|
|
21
20
|
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
22
21
|
}
|
|
@@ -28,16 +27,16 @@ function Te(e) {
|
|
|
28
27
|
var t;
|
|
29
28
|
return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
|
|
30
29
|
}
|
|
31
|
-
function
|
|
30
|
+
function J(e, t) {
|
|
32
31
|
const o = Number(t || "0");
|
|
33
32
|
return {
|
|
34
33
|
productId: e.id,
|
|
35
|
-
price: e.priceType ===
|
|
34
|
+
price: e.priceType === W.DYNAMIC_PRICE ? o : String(o),
|
|
36
35
|
quantity: 1
|
|
37
36
|
};
|
|
38
37
|
}
|
|
39
38
|
function Pe(e) {
|
|
40
|
-
return e.find((t) => t.priceType ===
|
|
39
|
+
return e.find((t) => t.priceType === W.DYNAMIC_PRICE);
|
|
41
40
|
}
|
|
42
41
|
function xe(e, t) {
|
|
43
42
|
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
@@ -45,11 +44,11 @@ function xe(e, t) {
|
|
|
45
44
|
function Me(e, t, o) {
|
|
46
45
|
const r = (t == null ? void 0 : t.productId) === e ? void 0 : e, a = r ? o[r] : void 0;
|
|
47
46
|
return a ? [
|
|
48
|
-
|
|
47
|
+
J(a, Te(a))
|
|
49
48
|
] : [];
|
|
50
49
|
}
|
|
51
50
|
const s = ({ children: e }) => {
|
|
52
|
-
const { id: t, value: o, onChange: r, disabled: a, required: u, onBlur: m, onFocus:
|
|
51
|
+
const { id: t, value: o, onChange: r, disabled: a, required: u, onBlur: m, onFocus: I, validation: i, addOther: p, addOtherPlaceholder: c, FieldLayout: h, hasError: _ } = L(), { labelId: O } = B(), { t: f } = me(), { currency: A, regionalFormat: g } = j(), d = o == null ? void 0 : o[0], N = M(() => {
|
|
53
52
|
var C, x;
|
|
54
53
|
return ((x = (C = i == null ? void 0 : i.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : x.products) || [];
|
|
55
54
|
}, [
|
|
@@ -59,76 +58,76 @@ const s = ({ children: e }) => {
|
|
|
59
58
|
]), l = M(() => p ? Pe(N) : void 0, [
|
|
60
59
|
N,
|
|
61
60
|
p
|
|
62
|
-
]), K = xe(d, l), [
|
|
61
|
+
]), K = xe(d, l), [q, P] = Fe({
|
|
63
62
|
sourceValue: K,
|
|
64
|
-
format: (C) =>
|
|
63
|
+
format: (C) => ge(String(C ?? ""), g),
|
|
65
64
|
regionalFormat: g
|
|
66
|
-
}),
|
|
65
|
+
}), w = D((C) => {
|
|
67
66
|
r(Me(C, d, T)), P("");
|
|
68
67
|
}, [
|
|
69
68
|
r,
|
|
70
69
|
T,
|
|
71
70
|
d,
|
|
72
71
|
P
|
|
73
|
-
]),
|
|
72
|
+
]), k = D((C) => {
|
|
74
73
|
l && r(typeof C == "number" ? [
|
|
75
|
-
|
|
74
|
+
J(l, String(C))
|
|
76
75
|
] : []);
|
|
77
76
|
}, [
|
|
78
77
|
r,
|
|
79
78
|
l
|
|
80
|
-
]), $ = M(() => ue(
|
|
81
|
-
|
|
79
|
+
]), $ = M(() => ue(k, 500), [
|
|
80
|
+
k
|
|
82
81
|
]), X = D((C) => {
|
|
83
82
|
(d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
|
|
84
|
-
const { validInput: x, validNumber: oe } =
|
|
83
|
+
const { validInput: x, validNumber: oe } = ye(C.target.value, Ae, q, g);
|
|
85
84
|
P(x), $(oe);
|
|
86
85
|
}, [
|
|
87
86
|
g,
|
|
88
87
|
r,
|
|
89
88
|
d,
|
|
90
89
|
l,
|
|
91
|
-
|
|
90
|
+
q,
|
|
92
91
|
$,
|
|
93
92
|
P
|
|
94
|
-
]),
|
|
95
|
-
l != null && l.id &&
|
|
93
|
+
]), H = (d == null ? void 0 : d.productId) || null, Z = D(() => {
|
|
94
|
+
l != null && l.id && H !== l.id && w(l.id);
|
|
96
95
|
}, [
|
|
97
96
|
l == null ? void 0 : l.id,
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
H,
|
|
98
|
+
w
|
|
100
99
|
]), ee = E(e, s.Label), V = E(e, s.Control), te = E(e, s.Description), ne = E(e, s.Error);
|
|
101
100
|
return /* @__PURE__ */ n.createElement(h, {
|
|
102
101
|
fieldId: t,
|
|
103
102
|
renderLabel: () => ee,
|
|
104
103
|
renderInput: () => /* @__PURE__ */ n.createElement(ae, {
|
|
105
104
|
"aria-labelledby": O,
|
|
106
|
-
value:
|
|
107
|
-
onChange:
|
|
105
|
+
value: H,
|
|
106
|
+
onChange: w,
|
|
108
107
|
isDisabled: a,
|
|
109
|
-
isInvalid:
|
|
108
|
+
isInvalid: _,
|
|
110
109
|
isRequired: u,
|
|
111
110
|
onBlur: m,
|
|
112
|
-
onFocus:
|
|
113
|
-
}, V ?
|
|
111
|
+
onFocus: I
|
|
112
|
+
}, V ? y(V, {
|
|
114
113
|
productsById: T,
|
|
115
114
|
addOther: p,
|
|
116
|
-
customAmount:
|
|
115
|
+
customAmount: q,
|
|
117
116
|
onCustomAmountInputChange: X,
|
|
118
117
|
currency: A,
|
|
119
|
-
t:
|
|
120
|
-
placeholder: c === void 0 ?
|
|
118
|
+
t: f,
|
|
119
|
+
placeholder: c === void 0 ? f("donation.other-option.placeholder") : c,
|
|
121
120
|
customAmountProductId: l == null ? void 0 : l.id,
|
|
122
121
|
onFocusCustomInput: Z
|
|
123
122
|
}) : null),
|
|
124
123
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, ne, te)
|
|
125
124
|
});
|
|
126
125
|
}, Be = ({ children: e, className: t, ...o }) => {
|
|
127
|
-
const { productsById: r, addOther: a, customAmount: u, onCustomAmountInputChange: m, currency:
|
|
126
|
+
const { productsById: r, addOther: a, customAmount: u, onCustomAmountInputChange: m, currency: I, t: i, placeholder: p, customAmountProductId: c, onFocusCustomInput: h } = o, { hasError: _ } = L(), O = E(e, s.Options), f = E(e, s.OtherInput);
|
|
128
127
|
return /* @__PURE__ */ n.createElement("div", {
|
|
129
128
|
className: t,
|
|
130
|
-
"data-invalid":
|
|
131
|
-
}, O ?
|
|
129
|
+
"data-invalid": _
|
|
130
|
+
}, O ? y(O, {
|
|
132
131
|
productsById: r
|
|
133
132
|
}) : null, a && c && /* @__PURE__ */ n.createElement(Y, {
|
|
134
133
|
value: c,
|
|
@@ -143,52 +142,52 @@ const s = ({ children: e }) => {
|
|
|
143
142
|
whiteSpace: "nowrap",
|
|
144
143
|
border: "0"
|
|
145
144
|
}
|
|
146
|
-
}, /* @__PURE__ */ n.createElement(
|
|
145
|
+
}, /* @__PURE__ */ n.createElement(Q, {
|
|
147
146
|
"aria-label": i("donation.other-option.label", "Custom amount")
|
|
148
|
-
}, i("donation.other-option.label", "Custom amount"))),
|
|
147
|
+
}, i("donation.other-option.label", "Custom amount"))), f && a ? y(f, {
|
|
149
148
|
customAmount: u,
|
|
150
149
|
onCustomAmountInputChange: m,
|
|
151
|
-
currency:
|
|
150
|
+
currency: I,
|
|
152
151
|
t: i,
|
|
153
152
|
placeholder: p,
|
|
154
153
|
customAmountProductId: c,
|
|
155
154
|
onFocusCustomInput: h
|
|
156
155
|
}) : null);
|
|
157
|
-
},
|
|
158
|
-
const { productsById: r } = o, { options: a, numberOfColumns: u } = L(), m = E(e,
|
|
156
|
+
}, U = ({ children: e, className: t, ...o }) => {
|
|
157
|
+
const { productsById: r } = o, { options: a, numberOfColumns: u } = L(), m = E(e, U.Option);
|
|
159
158
|
return /* @__PURE__ */ n.createElement("div", {
|
|
160
159
|
className: t,
|
|
161
160
|
"data-columns": u
|
|
162
|
-
}, a.map((
|
|
161
|
+
}, a.map((I) => {
|
|
163
162
|
var c;
|
|
164
|
-
const i = r[
|
|
165
|
-
return
|
|
166
|
-
key:
|
|
167
|
-
value:
|
|
163
|
+
const i = r[I.value], p = (c = i == null ? void 0 : i.fixedPriceOptions) == null ? void 0 : c.price;
|
|
164
|
+
return y(m, {
|
|
165
|
+
key: I.value,
|
|
166
|
+
value: I.value,
|
|
168
167
|
price: p || "0"
|
|
169
168
|
});
|
|
170
169
|
}));
|
|
171
170
|
}, S = ({ children: e, className: t, ...o }) => {
|
|
172
|
-
const { value: r, price: a } = o, { id: u } = L(), { currency: m, regionalFormat:
|
|
171
|
+
const { value: r, price: a } = o, { id: u } = L(), { currency: m, regionalFormat: I } = j(), i = E(e, S.Value), p = E(e, S.Currency), { isCurrencyPrefixed: c } = z({
|
|
173
172
|
amount: a,
|
|
174
173
|
currency: m == null ? void 0 : m.code,
|
|
175
|
-
locale:
|
|
174
|
+
locale: I
|
|
176
175
|
}), h = re(null);
|
|
177
176
|
pe(() => {
|
|
178
|
-
var O,
|
|
179
|
-
(
|
|
177
|
+
var O, f;
|
|
178
|
+
(f = (O = h.current) == null ? void 0 : O.querySelector("input")) == null || f.focus();
|
|
180
179
|
}, u);
|
|
181
|
-
const
|
|
180
|
+
const _ = i ? y(i, {
|
|
182
181
|
price: a
|
|
183
182
|
}) : null;
|
|
184
183
|
return /* @__PURE__ */ n.createElement(Y, {
|
|
185
184
|
value: r
|
|
186
|
-
}, /* @__PURE__ */ n.createElement(
|
|
185
|
+
}, /* @__PURE__ */ n.createElement(Q, {
|
|
187
186
|
className: t,
|
|
188
187
|
ref: h
|
|
189
|
-
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && p,
|
|
188
|
+
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && p, _, !c && p)));
|
|
190
189
|
}, je = ({ className: e, ...t }) => {
|
|
191
|
-
const { price: o } = t, { currency: r, regionalFormat: a } = j(), { value: u } =
|
|
190
|
+
const { price: o } = t, { currency: r, regionalFormat: a } = j(), { value: u } = z({
|
|
192
191
|
amount: o,
|
|
193
192
|
currency: r == null ? void 0 : r.code,
|
|
194
193
|
locale: a
|
|
@@ -196,16 +195,16 @@ const s = ({ children: e }) => {
|
|
|
196
195
|
return /* @__PURE__ */ n.createElement("span", {
|
|
197
196
|
className: e
|
|
198
197
|
}, u);
|
|
199
|
-
},
|
|
198
|
+
}, qe = ({ className: e }) => {
|
|
200
199
|
const { currency: t } = j();
|
|
201
200
|
return /* @__PURE__ */ n.createElement("span", {
|
|
202
201
|
className: e
|
|
203
202
|
}, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
|
|
204
203
|
};
|
|
205
204
|
S.Value = je;
|
|
206
|
-
S.Currency =
|
|
205
|
+
S.Currency = qe;
|
|
207
206
|
const R = ({ children: e, className: t, ...o }) => {
|
|
208
|
-
const { customAmount: r, onCustomAmountInputChange: a, currency: u, t: m, placeholder:
|
|
207
|
+
const { customAmount: r, onCustomAmountInputChange: a, currency: u, t: m, placeholder: I, customAmountProductId: i, onFocusCustomInput: p } = o, { disabled: c, hasError: h } = L(), { labelId: _, prefixId: O } = B(), f = E(e, R.Currency), A = E(e, R.Value), g = D((N) => {
|
|
209
208
|
a({
|
|
210
209
|
target: {
|
|
211
210
|
value: N
|
|
@@ -219,7 +218,7 @@ const R = ({ children: e, className: t, ...o }) => {
|
|
|
219
218
|
p
|
|
220
219
|
]);
|
|
221
220
|
return /* @__PURE__ */ n.createElement(le, {
|
|
222
|
-
"aria-labelledby": `${
|
|
221
|
+
"aria-labelledby": `${_} ${O}`,
|
|
223
222
|
value: r,
|
|
224
223
|
onChange: g,
|
|
225
224
|
onFocus: d,
|
|
@@ -229,22 +228,22 @@ const R = ({ children: e, className: t, ...o }) => {
|
|
|
229
228
|
className: t,
|
|
230
229
|
isDisabled: c,
|
|
231
230
|
isInvalid: h
|
|
232
|
-
}, r && u &&
|
|
231
|
+
}, r && u && f ? y(f, {
|
|
233
232
|
currency: u,
|
|
234
233
|
t: m
|
|
235
|
-
}) : null, A ?
|
|
236
|
-
placeholder:
|
|
234
|
+
}) : null, A ? y(A, {
|
|
235
|
+
placeholder: I,
|
|
237
236
|
customAmountProductId: i
|
|
238
237
|
}) : null));
|
|
239
|
-
},
|
|
238
|
+
}, we = ({ className: e, ...t }) => {
|
|
240
239
|
const { currency: o, t: r } = t, { prefixId: a } = B();
|
|
241
240
|
return /* @__PURE__ */ n.createElement("span", {
|
|
242
241
|
id: a,
|
|
243
242
|
"aria-hidden": !1,
|
|
244
|
-
"aria-label":
|
|
243
|
+
"aria-label": Ne(r, o),
|
|
245
244
|
className: e
|
|
246
245
|
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
247
|
-
},
|
|
246
|
+
}, He = ({ className: e, ...t }) => {
|
|
248
247
|
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: a, labelId: u, prefixId: m } = B();
|
|
249
248
|
return /* @__PURE__ */ n.createElement(ce, {
|
|
250
249
|
id: r,
|
|
@@ -256,63 +255,63 @@ const R = ({ children: e, className: t, ...o }) => {
|
|
|
256
255
|
className: e
|
|
257
256
|
});
|
|
258
257
|
};
|
|
259
|
-
R.Currency =
|
|
260
|
-
R.Value =
|
|
261
|
-
|
|
262
|
-
s.Label =
|
|
258
|
+
R.Currency = we;
|
|
259
|
+
R.Value = He;
|
|
260
|
+
U.Option = S;
|
|
261
|
+
s.Label = _e;
|
|
263
262
|
s.Control = Be;
|
|
264
|
-
s.Options =
|
|
263
|
+
s.Options = U;
|
|
265
264
|
s.OtherInput = R;
|
|
266
|
-
s.Description =
|
|
267
|
-
s.Error =
|
|
268
|
-
const
|
|
269
|
-
control:
|
|
270
|
-
options:
|
|
265
|
+
s.Description = Oe;
|
|
266
|
+
s.Error = be;
|
|
267
|
+
const Ue = "_control_1fjsf_1", ke = "_options_1fjsf_7", $e = "_option_1fjsf_7", Ve = "_optionHover_1fjsf_44", Ge = "_optionSelected_1fjsf_44", Ye = "_optionCurrency_1fjsf_94", Qe = "_otherInput_1fjsf_98", We = "_otherInputCurrency_1fjsf_117", b = {
|
|
268
|
+
control: Ue,
|
|
269
|
+
options: ke,
|
|
271
270
|
option: $e,
|
|
272
271
|
optionHover: Ve,
|
|
273
272
|
optionSelected: Ge,
|
|
274
273
|
optionCurrency: Ye,
|
|
275
|
-
otherInput:
|
|
276
|
-
otherInputCurrency:
|
|
277
|
-
},
|
|
274
|
+
otherInput: Qe,
|
|
275
|
+
otherInputCurrency: We
|
|
276
|
+
}, ze = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(se, {
|
|
278
277
|
content: e,
|
|
279
278
|
locale: t
|
|
280
|
-
}),
|
|
281
|
-
base:
|
|
282
|
-
selected:
|
|
283
|
-
hover:
|
|
279
|
+
}), Je = {
|
|
280
|
+
base: b.option,
|
|
281
|
+
selected: b.optionSelected,
|
|
282
|
+
hover: b.optionHover
|
|
284
283
|
}, Ke = () => {
|
|
285
|
-
const e = Se(
|
|
286
|
-
globalClasses:
|
|
287
|
-
moduleClasses:
|
|
284
|
+
const e = Se(b.otherInput), t = ve({
|
|
285
|
+
globalClasses: he,
|
|
286
|
+
moduleClasses: Je
|
|
288
287
|
});
|
|
289
288
|
return /* @__PURE__ */ n.createElement(s, null, /* @__PURE__ */ n.createElement(s.Label, {
|
|
290
|
-
className: F(
|
|
289
|
+
className: F(de, v.label)
|
|
291
290
|
}, /* @__PURE__ */ n.createElement(s.Label.Required, {
|
|
292
|
-
className: F(
|
|
291
|
+
className: F(Ie, v.requiredMark)
|
|
293
292
|
})), /* @__PURE__ */ n.createElement(s.Control, {
|
|
294
|
-
className: F(
|
|
293
|
+
className: F(b.control, G.group)
|
|
295
294
|
}, /* @__PURE__ */ n.createElement(s.Options, {
|
|
296
|
-
className: F(
|
|
295
|
+
className: F(fe, G.options, b.options)
|
|
297
296
|
}, /* @__PURE__ */ n.createElement(s.Options.Option, {
|
|
298
297
|
className: ({ isSelected: o, isHovered: r }) => t({
|
|
299
298
|
isSelected: o,
|
|
300
299
|
isHovered: r
|
|
301
300
|
})
|
|
302
301
|
}, /* @__PURE__ */ n.createElement(s.Options.Option.Value, null), /* @__PURE__ */ n.createElement(s.Options.Option.Currency, {
|
|
303
|
-
className:
|
|
302
|
+
className: b.optionCurrency
|
|
304
303
|
}))), /* @__PURE__ */ n.createElement(s.OtherInput, {
|
|
305
304
|
className: e
|
|
306
305
|
}, /* @__PURE__ */ n.createElement(s.OtherInput.Currency, {
|
|
307
|
-
className:
|
|
306
|
+
className: b.otherInputCurrency
|
|
308
307
|
}), /* @__PURE__ */ n.createElement(s.OtherInput.Value, {
|
|
309
308
|
className: v.innerInput
|
|
310
309
|
}))), /* @__PURE__ */ n.createElement(s.Error, {
|
|
311
|
-
className: F(
|
|
312
|
-
}, /* @__PURE__ */ n.createElement(
|
|
313
|
-
className: F(
|
|
314
|
-
},
|
|
315
|
-
},
|
|
310
|
+
className: F(Ce, v.error)
|
|
311
|
+
}, /* @__PURE__ */ n.createElement(De, null), /* @__PURE__ */ n.createElement(s.Error.Text, null)), /* @__PURE__ */ n.createElement(s.Description, {
|
|
312
|
+
className: F(Ee, v.description)
|
|
313
|
+
}, ze));
|
|
314
|
+
}, Ct = () => /* @__PURE__ */ n.createElement(Ke, null);
|
|
316
315
|
export {
|
|
317
|
-
|
|
316
|
+
Ct as DonationRAC
|
|
318
317
|
};
|
package/dist/component/{dropdown-field-headless-CBaqlNZi.js → dropdown-field-headless-BTMJGUwY.js}
RENAMED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as E, useCallback as g, useRef as A } from "react";
|
|
2
2
|
import { UNSAFE_PortalProvider as M } from "react-aria";
|
|
3
3
|
import { Select as U, SelectValue as _, ListBox as j, ListBoxItem as z } from "react-aria-components";
|
|
4
|
-
import {
|
|
4
|
+
import { b9 as f, b6 as O, bb as G } from "./form-BTDgyr54.js";
|
|
5
5
|
import { f as d, a as F } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as H, E as J } from "./field-error-headless-
|
|
7
|
-
import { L as K } from "./field-label-headless-
|
|
6
|
+
import { D as H, E as J } from "./field-error-headless-CovyN0GI.js";
|
|
7
|
+
import { L as K } from "./field-label-headless-DVvX2QaH.js";
|
|
8
8
|
import { S as Q, N as W } from "./non-modal-popover-DtIMXHbe.js";
|
|
9
|
-
import { u as X } from "./use-is-forced-open-dropdown-
|
|
9
|
+
import { u as X } from "./use-is-forced-open-dropdown-ifUIpuwL.js";
|
|
10
10
|
const r = ({ children: n }) => {
|
|
11
|
-
const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: t, placeholder: m, disabled: i, required: v, onBlur: y, onFocus: D, FieldLayout:
|
|
11
|
+
const { id: l, value: a, defaultValue: s, options: u = [], readOnly: o, onChange: t, placeholder: m, disabled: i, required: v, onBlur: y, onFocus: D, FieldLayout: C, hasError: I } = f(), [L, h] = E(!1), p = X(l), [B, N] = E(null), P = a && u.some((c) => (c.value ?? c.label) === a) ? a : s || null, { labelId: S } = O(), T = g((c) => {
|
|
12
12
|
o || t(typeof c == "string" ? c : null);
|
|
13
13
|
}, [
|
|
14
14
|
t,
|
|
15
15
|
o
|
|
16
|
-
]), x =
|
|
16
|
+
]), x = g((c) => h(c && !i && !o), [
|
|
17
17
|
i,
|
|
18
18
|
o
|
|
19
|
-
]), V = d(n, r.Label),
|
|
20
|
-
return /* @__PURE__ */ e.createElement(
|
|
19
|
+
]), V = d(n, r.Label), R = d(n, r.Trigger), k = d(n, r.Options), q = d(n, r.Description), w = d(n, r.Error);
|
|
20
|
+
return /* @__PURE__ */ e.createElement(C, {
|
|
21
21
|
fieldId: l,
|
|
22
22
|
renderLabel: () => V,
|
|
23
23
|
renderInput: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
|
|
@@ -30,16 +30,16 @@ const r = ({ children: n }) => {
|
|
|
30
30
|
}, /* @__PURE__ */ e.createElement(U, {
|
|
31
31
|
"aria-labelledby": S,
|
|
32
32
|
value: P,
|
|
33
|
-
isOpen: p ||
|
|
33
|
+
isOpen: p || L && !i && !o,
|
|
34
34
|
onOpenChange: p ? void 0 : x,
|
|
35
35
|
onChange: T,
|
|
36
36
|
isDisabled: i,
|
|
37
|
-
isInvalid:
|
|
37
|
+
isInvalid: I,
|
|
38
38
|
isRequired: v,
|
|
39
39
|
placeholder: m,
|
|
40
40
|
onBlur: y,
|
|
41
41
|
onFocus: D
|
|
42
|
-
},
|
|
42
|
+
}, R, F(k, {
|
|
43
43
|
isForcedOpen: p
|
|
44
44
|
})))),
|
|
45
45
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w, q)
|
|
@@ -57,8 +57,8 @@ const r = ({ children: n }) => {
|
|
|
57
57
|
"data-invalid": o || void 0,
|
|
58
58
|
"data-loading": t || void 0
|
|
59
59
|
}, /* @__PURE__ */ e.createElement(_, null), n);
|
|
60
|
-
},
|
|
61
|
-
const { isForcedOpen: s } = a, { options: u = [] } = f(), o = d(n,
|
|
60
|
+
}, b = ({ children: n, className: l, ...a }) => {
|
|
61
|
+
const { isForcedOpen: s } = a, { options: u = [] } = f(), o = d(n, b.Option);
|
|
62
62
|
return /* @__PURE__ */ e.createElement(W, {
|
|
63
63
|
className: l,
|
|
64
64
|
containerPadding: 0,
|
|
@@ -78,10 +78,10 @@ const r = ({ children: n }) => {
|
|
|
78
78
|
textValue: s
|
|
79
79
|
}, s);
|
|
80
80
|
};
|
|
81
|
-
|
|
81
|
+
b.Option = Z;
|
|
82
82
|
r.Label = K;
|
|
83
83
|
r.Trigger = Y;
|
|
84
|
-
r.Options =
|
|
84
|
+
r.Options = b;
|
|
85
85
|
r.Description = H;
|
|
86
86
|
r.Error = J;
|
|
87
87
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
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 r } from "./dropdown-field-headless-
|
|
4
|
+
import { D as r } from "./dropdown-field-headless-BTMJGUwY.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-B4l_0KRU.js";
|
|
9
|
-
import {
|
|
10
|
-
import { u as O } from "./use-dropdown-option-class-name-
|
|
9
|
+
import { I as i, U as p, t as E, K as _, v as R, p as D } from "./form-BTDgyr54.js";
|
|
10
|
+
import { u as O } from "./use-dropdown-option-class-name-DjV7FW5y.js";
|
|
11
11
|
const S = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: a,
|
|
13
13
|
locale: s
|
|
@@ -16,9 +16,9 @@ const S = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
16
16
|
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
17
17
|
className: t(i, o.label)
|
|
18
18
|
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
19
|
-
className: t(
|
|
19
|
+
className: t(p, o.requiredMark)
|
|
20
20
|
})), /* @__PURE__ */ e.createElement(r.Trigger, {
|
|
21
|
-
className: t(
|
|
21
|
+
className: t(E, o.input, o.dropdownTrigger)
|
|
22
22
|
}, /* @__PURE__ */ e.createElement(n, {
|
|
23
23
|
className: o.dropdownIcon
|
|
24
24
|
})), /* @__PURE__ */ e.createElement(r.Options, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import o, { useMemo as
|
|
2
|
-
import {
|
|
3
|
-
import { C as l } from "./checkbox-field-rac-
|
|
1
|
+
import o, { useMemo as n } from "react";
|
|
2
|
+
import { b9 as a, bj as c, ac as i } from "./form-BTDgyr54.js";
|
|
3
|
+
import { C as l } from "./checkbox-field-rac-Dwx1leKA.js";
|
|
4
4
|
const p = (e) => ({
|
|
5
5
|
nodes: [
|
|
6
6
|
{
|
|
@@ -24,8 +24,8 @@ const p = (e) => ({
|
|
|
24
24
|
id: "8k8yy2"
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
|
-
}),
|
|
28
|
-
const e =
|
|
27
|
+
}), u = () => {
|
|
28
|
+
const e = a(), { t } = c(), r = n(() => p(t), [
|
|
29
29
|
t
|
|
30
30
|
]), s = {
|
|
31
31
|
...e,
|
|
@@ -38,5 +38,5 @@ const p = (e) => ({
|
|
|
38
38
|
}, /* @__PURE__ */ o.createElement(l, null));
|
|
39
39
|
};
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
u as EcomSubscriptionCheckboxRAC
|
|
42
42
|
};
|