@wix/form-elements 1.80.0 → 1.82.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-BYisg594.js → appointment-rac-DmwbqZse.js} +82 -82
- package/dist/component/{bookings-address-rac-CsILj67y.js → bookings-address-rac-RCzVU87c.js} +1 -1
- package/dist/component/{bookings-email-rac-CVmAPK_5.js → bookings-email-rac-Df_Wte1_.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Dh41-RQ_.js → bookings-first-name-rac-BmdRGYxF.js} +1 -1
- package/dist/component/{bookings-header-rac-B6Fgfiz5.js → bookings-header-rac-DewQWtkZ.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CuY8aaXv.js → bookings-last-name-rac-DmmNBuqy.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-B8JBcGs8.js → bookings-login-bar-rac-QskvFo0C.js} +5 -5
- package/dist/component/{bookings-phone-rac-Bspc3F7g.js → bookings-phone-rac-7wn8IXna.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-B1o0ZcfK.js → bookings-rich-text-rac-B5nk0BlD.js} +1 -1
- package/dist/component/{checkbox-field-rac-thaR4lXB.js → checkbox-field-rac-BnVNfYWL.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-DryeaW7l.js → checkbox-group-field-headless-Bx5Y-RMP.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CJfbT13O.js → checkbox-group-field-rac-CZW28rj5.js} +7 -7
- package/dist/component/{checkbox-group-rac-BwI7UHzO.js → checkbox-group-rac-B20t8dTB.js} +1 -1
- package/dist/component/{checkbox-rac-HRTKCRY4.js → checkbox-rac-ifC6qSE8.js} +1 -1
- package/dist/component/{contacts-address-rac-BIn9plXb.js → contacts-address-rac-XJRKvPlp.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-oGP8bO3I.js → contacts-birthdate-rac-CKYESrPO.js} +1 -1
- package/dist/component/{contacts-company-rac-ChdjTt8-.js → contacts-company-rac-BXwEeb0p.js} +1 -1
- package/dist/component/{contacts-email-rac-BUluFo-o.js → contacts-email-rac-D8Yspo_m.js} +1 -1
- package/dist/component/{contacts-first-name-rac-tmboINSq.js → contacts-first-name-rac-mvCGP1LJ.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BaD5OBVf.js → contacts-last-name-rac-Clg9RXal.js} +1 -1
- package/dist/component/{contacts-phone-rac-BoX2-IEP.js → contacts-phone-rac-qEwjhByI.js} +1 -1
- package/dist/component/{contacts-position-rac-BNDskehr.js → contacts-position-rac-Bh8fvf2M.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CVaQG4Qy.js → contacts-subscribe-rac-DEQ2XkZo.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-Dxgxcv7c.js → contacts-tax-id-rac-0DUZ4tJz.js} +1 -1
- package/dist/component/{date-availability-BbrBYxgL.js → date-availability-2ek2RtXx.js} +1 -1
- package/dist/component/{date-input-field-rac-oibxt2dz.js → date-input-field-rac-Bp4SQB-t.js} +29 -29
- package/dist/component/{date-input-rac-h2vrPoah.js → date-input-rac-CYsJcMe5.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cr9PMglz.js → date-picker-field-rac-BGQvnSYI.js} +9 -9
- package/dist/component/{date-picker-rac-8BOHRpaJ.js → date-picker-rac-BVncggYR.js} +1 -1
- package/dist/component/{date-time-input-field-rac-C7CZ4i6-.js → date-time-input-field-rac-B1mggelc.js} +33 -33
- package/dist/component/{date-time-input-rac-BARK1BJc.js → date-time-input-rac-DzdCno0L.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CWc0W-zr.js → dext-checkbox-group-rac-CNCpeolD.js} +2 -2
- package/dist/component/{dext-checkbox-rac-NKcTYwpg.js → dext-checkbox-rac-BYDQ58Mo.js} +1 -1
- package/dist/component/{dext-date-picker-rac-SllyCpYt.js → dext-date-picker-rac-aYYk8Nrl.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-JT9Pa7TG.js → dext-date-time-input-rac-v2v974p5.js} +1 -1
- package/dist/component/{dext-dropdown-rac-aBU9t_U4.js → dext-dropdown-rac-C846KZCe.js} +1 -1
- package/dist/component/{dext-email-rac-DKoJiyjE.js → dext-email-rac-izjbfME9.js} +1 -1
- package/dist/component/{dext-number-input-rac-BHkzAyzd.js → dext-number-input-rac-CnOFsD7l.js} +1 -1
- package/dist/component/{dext-phone-rac-Ou-fxcN5.js → dext-phone-rac-D8GMXD88.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CH0WlRsF.js → dext-radio-group-rac-BtiyGCRh.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D_jXx_VN.js → dext-rating-input-rac-BHJ1kitb.js} +1 -1
- package/dist/component/{dext-tags-rac-DBaT-lQT.js → dext-tags-rac-CvNjwS5R.js} +2 -2
- package/dist/component/{dext-text-area-rac-DWcCktYi.js → dext-text-area-rac-X5L0Q3sC.js} +1 -1
- package/dist/component/{dext-text-input-rac-CBX2wgW-.js → dext-text-input-rac-swkyAJqC.js} +1 -1
- package/dist/component/{dext-url-input-rac-DaqWDzIt.js → dext-url-input-rac-BYlXOAkz.js} +1 -1
- package/dist/component/donation-rac-CDWLBZZM.js +318 -0
- package/dist/component/{dropdown-field-headless-D7mOjVEJ.js → dropdown-field-headless-JJzbZvps.js} +3 -3
- package/dist/component/{dropdown-field-rac-DsRuMFo4.js → dropdown-field-rac-BodpIQ9Q.js} +5 -5
- package/dist/component/{dropdown-rac-8Fe66UGi.js → dropdown-rac-Bfbxxx9k.js} +1 -1
- package/dist/component/{ecom-address-rac-DbR_WEgu.js → ecom-address-rac-BCnsL5tr.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-ByQsK79_.js → ecom-subscription-checkbox-rac-CNSdI_ty.js} +3 -3
- package/dist/component/{email-input-field-rac-BS0bFS0-.js → email-input-field-rac-Btaa4O5T.js} +48 -48
- package/dist/component/{events-repeater-rac-xhXarOw_.js → events-repeater-rac-xBwqJddt.js} +10 -10
- package/dist/component/{events-rsvp-rac-BLq-ro2E.js → events-rsvp-rac-D90PwkHd.js} +3 -3
- package/dist/component/{field-error-headless-C7IUibkK.js → field-error-headless-BErhh9GG.js} +1 -1
- package/dist/component/{field-label-headless-BQFy2iAr.js → field-label-headless-BGyK-5xW.js} +1 -1
- package/dist/component/{file-upload-rac-B84R44Bt.js → file-upload-rac-MxH3CVml.js} +21 -21
- package/dist/component/{fixed-payment-rac-D7Asu-Ws.js → fixed-payment-rac-DpBA9irF.js} +10 -10
- package/dist/component/{form-element-classes-BuM-vthE.js → form-element-classes-jC8D0LnK.js} +77 -63
- package/dist/component/{form-BmioUKtQ.js → form-f0tqdMye.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CN5SyZpH.js → header-field-rac-BXxFqu9u.js} +3 -3
- package/dist/component/{header-rac-B9ITu2YO.js → header-rac-BN70esac.js} +1 -1
- package/dist/component/image-choice-rac-DLBGIBXL.js +158 -0
- package/dist/component/{index-3q1aCLZ8.js → index-BvB-uE1H.js} +2 -2
- package/dist/component/{index-CvWMG1x1.js → index-DXLEHYlA.js} +4 -4
- package/dist/component/{isObjectLike-xDv2bEeI.js → isObjectLike-BYOX5XY4.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BLDqei5I.js → multiline-address-field-rac-fcQYnPlO.js} +52 -52
- package/dist/component/{multiline-address-rac-Dy9Km8P8.js → multiline-address-rac-D82Gbj3n.js} +1 -1
- package/dist/component/{number-input-field-rac-Dxu4WHzh.js → number-input-field-rac-B0-4Rz3w.js} +16 -16
- package/dist/component/{number-input-rac-hHEmwPao.js → number-input-rac-Bnsvb-SO.js} +1 -1
- package/dist/component/{password-rac-CEylicEt.js → password-rac-BdBjFa8y.js} +15 -15
- package/dist/component/{payment-input-rac-bvK_YQ78.js → payment-input-rac-DkAGOvaF.js} +18 -18
- package/dist/component/{phone-input-field-rac-CqYNWmiA.js → phone-input-field-rac-Ce_wuE46.js} +54 -54
- package/dist/component/{phone-rac-C72xrPL6.js → phone-rac-DslINtcH.js} +1 -1
- package/dist/component/{product-list-rac-DbftZgIh.js → product-list-rac-C4P_SOyG.js} +25 -25
- package/dist/component/{quiz-radio-group-rac-Bkg5poft.js → quiz-radio-group-rac-noy4fmD8.js} +2 -2
- package/dist/component/{radio-button-module-classes-Do4JmHrh.js → radio-button-module-classes-DXQ1UlmI.js} +3 -3
- package/dist/component/{radio-group-field-rac-BkoqJYp4.js → radio-group-field-rac-CYBDq7R1.js} +5 -5
- package/dist/component/{radio-group-rac-BGp1iRNt.js → radio-group-rac-CGHQFyJY.js} +1 -1
- package/dist/component/{rating-input-field-rac-Bozwq2E7.js → rating-input-field-rac-elaferlI.js} +18 -18
- package/dist/component/{rating-input-rac-Cxha4VPg.js → rating-input-rac-fnOtTKN8.js} +1 -1
- package/dist/component/{rich-content-rac.module-ZXCfVPY-.js → rich-content-rac.module-DbwuwQeo.js} +1 -1
- package/dist/component/{rich-text-field-rac-Ct4KowMZ.js → rich-text-field-rac-DtcQC8zU.js} +3 -3
- package/dist/component/{rich-text-rac-Cek5wjXa.js → rich-text-rac-CuT97sby.js} +1 -1
- package/dist/component/{service-dropdown-rac-B3K93XxF.js → service-dropdown-rac-rk2tzikX.js} +24 -24
- package/dist/component/{services-multi-choice-rac-2RTQqyG6.js → services-multi-choice-rac-BMQyF_xs.js} +7 -7
- package/dist/component/{signature-rac-BIbRkW1j.js → signature-rac-DeV9C6ta.js} +41 -41
- package/dist/component/{submit-button-rac-DofUaqHk.js → submit-button-rac-BpN-FYtM.js} +2 -2
- package/dist/component/tags-field-rac-ByC9DnyH.js +217 -0
- package/dist/component/{tags-rac-DuMX91gd.js → tags-rac-Dabz4jHd.js} +1 -1
- package/dist/component/{text-area-field-rac-BbHdTAJP.js → text-area-field-rac-CtSa8XW_.js} +14 -14
- package/dist/component/{text-area-rac-B9lDzZAb.js → text-area-rac-CDLF-_56.js} +1 -1
- package/dist/component/{text-input-field-rac-B_csZjOh.js → text-input-field-rac-C6fQYKhI.js} +5 -5
- package/dist/component/{text-input-headless-CVOWyi55.js → text-input-headless-BwVLU9cp.js} +3 -3
- package/dist/component/{text-input-rac-DowwSRpa.js → text-input-rac-CoGTzfo1.js} +1 -1
- package/dist/component/{time-input-rac-D9SXITBr.js → time-input-rac-DQDupKTA.js} +17 -17
- package/dist/component/{url-input-field-rac-BxT0Lgly.js → url-input-field-rac-4T8gcMHH.js} +8 -8
- package/dist/component/{url-input-rac-GX9rvIJd.js → url-input-rac-_d6XRdKX.js} +1 -1
- package/dist/component/{use-element-state-class-name-nCwOVSGM.js → use-element-state-class-name-BqmaTba3.js} +1 -1
- package/dist/component/{use-service-options-base-BO3Ackpl.js → use-service-options-base-CRgxxz7b.js} +1 -1
- package/package.json +2 -2
- package/dist/component/donation-rac-D1rcPi17.js +0 -307
- package/dist/component/image-choice-rac-9ncRxwZd.js +0 -146
- package/dist/component/tags-field-rac-DTOthwA5.js +0 -206
package/dist/component/{text-input-field-rac-B_csZjOh.js → text-input-field-rac-C6fQYKhI.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { T as r } from "./text-input-headless-
|
|
4
|
+
import { T as r } from "./text-input-headless-BwVLU9cp.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as a } from "./field-rac.module-ColNPUt0.js";
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
7
|
+
import { y as n, O as c, x as E, o as i, i as R } from "./form-element-classes-jC8D0LnK.js";
|
|
8
|
+
const _ = ({ content: s, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
9
9
|
content: s,
|
|
10
10
|
locale: l
|
|
11
11
|
}), N = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
@@ -17,8 +17,8 @@ const R = ({ content: s, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
17
17
|
}), /* @__PURE__ */ e.createElement(r.Error, {
|
|
18
18
|
className: t(i, a.error)
|
|
19
19
|
}, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
20
|
-
className: t(
|
|
21
|
-
},
|
|
20
|
+
className: t(R, a.description)
|
|
21
|
+
}, _));
|
|
22
22
|
export {
|
|
23
23
|
N as T
|
|
24
24
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import t, { useRef as L } from "react";
|
|
2
2
|
import { TextField as R, Input as v } from "react-aria-components";
|
|
3
|
-
import { ai as d, af as c, ak as T } from "./form-
|
|
3
|
+
import { ai as d, af as c, ak as T } from "./form-f0tqdMye.js";
|
|
4
4
|
import { f as a } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as g, E as h } from "./field-error-headless-
|
|
6
|
-
import { L as x } from "./field-label-headless-
|
|
5
|
+
import { D as g, E as h } from "./field-error-headless-BErhh9GG.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-BGyK-5xW.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
8
|
const { id: s, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: f, FieldLayout: b } = d(), { labelId: E } = c(), I = a(r, e.Label), F = a(r, e.Input), y = a(r, e.Description), D = a(r, e.Error);
|
|
9
9
|
return /* @__PURE__ */ t.createElement(b, {
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import e, { useCallback as H, useRef as V, useContext as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import e, { useCallback as H, useRef as V, useContext as x } from "react";
|
|
2
|
+
import { RicosViewer as k } from "@wix/ricos/viewer";
|
|
3
3
|
import c from "classnames";
|
|
4
|
-
import { parseTime as
|
|
5
|
-
import { TimeField as
|
|
6
|
-
import { ai as p, af as j, as as T, ak as
|
|
4
|
+
import { parseTime as q } from "@internationalized/date";
|
|
5
|
+
import { TimeField as v, DateInput as B, DateSegment as h, TimeFieldStateContext as U } from "react-aria-components";
|
|
6
|
+
import { ai as p, af as j, as as T, ak as Q } from "./form-f0tqdMye.js";
|
|
7
7
|
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { L as J } from "./field-label-headless-
|
|
8
|
+
import { D as z, E as G } from "./field-error-headless-BErhh9GG.js";
|
|
9
|
+
import { L as J } from "./field-label-headless-BGyK-5xW.js";
|
|
10
10
|
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { H as S } from "./custom-focus-class-_483Pkwp.js";
|
|
12
12
|
import { s as E } from "./field-rac.module-ColNPUt0.js";
|
|
13
|
-
import {
|
|
13
|
+
import { y as W, O as X, x as Y, o as Z, i as $ } from "./form-element-classes-jC8D0LnK.js";
|
|
14
14
|
const r = ({ children: t }) => {
|
|
15
15
|
const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: f, use24HourFormat: b, FieldLayout: I, hasError: C } = p(), { inputId: L, ariaDescribedBy: g, labelId: D } = j(), R = H((M) => {
|
|
16
16
|
const w = ae(M);
|
|
17
17
|
o(w);
|
|
18
18
|
}, [
|
|
19
19
|
o
|
|
20
|
-
]), y = m(t, r.Label), N = m(t, r.Time),
|
|
20
|
+
]), y = m(t, r.Label), N = m(t, r.Time), O = m(t, r.Description), P = m(t, r.Error), A = ne(l);
|
|
21
21
|
return /* @__PURE__ */ e.createElement(I, {
|
|
22
22
|
fieldId: n,
|
|
23
23
|
renderLabel: () => y,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
24
|
+
renderInput: () => /* @__PURE__ */ e.createElement(v, {
|
|
25
25
|
"aria-labelledby": D,
|
|
26
26
|
id: L,
|
|
27
27
|
"aria-describedby": g,
|
|
28
|
-
value:
|
|
28
|
+
value: A,
|
|
29
29
|
onChange: R,
|
|
30
30
|
isDisabled: i,
|
|
31
31
|
isReadOnly: s,
|
|
@@ -35,7 +35,7 @@ const r = ({ children: t }) => {
|
|
|
35
35
|
onFocus: f,
|
|
36
36
|
hourCycle: b ? 24 : 12
|
|
37
37
|
}, N),
|
|
38
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
38
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, P, O)
|
|
39
39
|
});
|
|
40
40
|
}, u = ({ children: t, className: n }) => {
|
|
41
41
|
const { hasError: l } = p(), o = m(t, u.Hour), i = m(t, u.Minute), s = m(t, u.Period);
|
|
@@ -66,7 +66,7 @@ const r = ({ children: t }) => {
|
|
|
66
66
|
});
|
|
67
67
|
}, ee = ({ className: t, ...n }) => {
|
|
68
68
|
const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = T(), a = V(null);
|
|
69
|
-
|
|
69
|
+
Q(() => {
|
|
70
70
|
var f;
|
|
71
71
|
(f = a.current) == null || f.focus();
|
|
72
72
|
}, l);
|
|
@@ -89,7 +89,7 @@ const r = ({ children: t }) => {
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
}, re = ({ className: t, ...n }) => {
|
|
92
|
-
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s =
|
|
92
|
+
const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = x(U), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
|
|
93
93
|
return /* @__PURE__ */ e.createElement(h, {
|
|
94
94
|
segment: o,
|
|
95
95
|
className: t,
|
|
@@ -104,13 +104,13 @@ u.Minute = te;
|
|
|
104
104
|
u.Period = re;
|
|
105
105
|
r.Label = J;
|
|
106
106
|
r.Time = u;
|
|
107
|
-
r.Description =
|
|
107
|
+
r.Description = z;
|
|
108
108
|
r.Error = G;
|
|
109
109
|
function ne(t) {
|
|
110
110
|
if (!t)
|
|
111
111
|
return null;
|
|
112
112
|
try {
|
|
113
|
-
return
|
|
113
|
+
return q(t);
|
|
114
114
|
} catch {
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
@@ -130,7 +130,7 @@ const oe = "_time_1wbmw_1", se = "_hour_1wbmw_14", le = "_minute_1wbmw_15", ie =
|
|
|
130
130
|
hour: se,
|
|
131
131
|
minute: le,
|
|
132
132
|
period: ie
|
|
133
|
-
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(
|
|
133
|
+
}, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(k, {
|
|
134
134
|
content: t,
|
|
135
135
|
locale: n
|
|
136
136
|
}), me = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
@@ -2,14 +2,14 @@ import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
|
2
2
|
import l from "classnames";
|
|
3
3
|
import r, { useCallback as h, useRef as y } from "react";
|
|
4
4
|
import { TextField as N, Input as A } from "react-aria-components";
|
|
5
|
-
import { ai as E, af as d, ak as
|
|
5
|
+
import { ai as E, af as d, ak as k } from "./form-f0tqdMye.js";
|
|
6
6
|
import { f as u } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
7
|
+
import { D as B, E as M } from "./field-error-headless-BErhh9GG.js";
|
|
8
|
+
import { L as P } from "./field-label-headless-BGyK-5xW.js";
|
|
9
9
|
import { u as T } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
10
|
import { E as v } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s } from "./field-rac.module-ColNPUt0.js";
|
|
12
|
-
import {
|
|
12
|
+
import { y as U, O as g, x as q, o as x, i as w } from "./form-element-classes-jC8D0LnK.js";
|
|
13
13
|
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
14
|
const { id: o, value: n, onChange: a, disabled: m, readOnly: i, required: c, hasError: I, onBlur: f, onFocus: F, FieldLayout: L } = E(), { labelId: R } = d(), p = T(f), b = u(t, e.Label), D = u(t, e.Input), _ = u(t, e.Description), C = u(t, e.Error), S = h(() => {
|
|
15
15
|
a(V(n)), p();
|
|
@@ -36,7 +36,7 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
36
36
|
});
|
|
37
37
|
}, W = ({ className: t }) => {
|
|
38
38
|
const { id: o, placeholder: n } = E(), { inputId: a, ariaDescribedBy: m } = d(), i = y(null);
|
|
39
|
-
return
|
|
39
|
+
return k(() => {
|
|
40
40
|
var c;
|
|
41
41
|
(c = i.current) == null || c.focus();
|
|
42
42
|
}, o), /* @__PURE__ */ r.createElement(A, {
|
|
@@ -48,10 +48,10 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
|
|
|
48
48
|
placeholder: n
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
e.Label =
|
|
51
|
+
e.Label = P;
|
|
52
52
|
e.Input = W;
|
|
53
|
-
e.Description =
|
|
54
|
-
e.Error =
|
|
53
|
+
e.Description = B;
|
|
54
|
+
e.Error = M;
|
|
55
55
|
const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
|
|
56
56
|
content: t,
|
|
57
57
|
locale: o
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import d from "classnames";
|
|
2
|
-
import { ac as s } from "./form-
|
|
2
|
+
import { ac as s } from "./form-f0tqdMye.js";
|
|
3
3
|
const E = ({ globalClasses: e, moduleClasses: t }) => {
|
|
4
4
|
var c;
|
|
5
5
|
const r = ((c = s(e.key)) == null ? void 0 : c.split(/\s+/)) ?? [], m = r.includes(e.selected), o = r.includes(e.hover);
|
package/dist/component/{use-service-options-base-BO3Ackpl.js → use-service-options-base-CRgxxz7b.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
|
|
2
|
-
import { ah as v } from "./form-
|
|
2
|
+
import { ah as v } from "./form-f0tqdMye.js";
|
|
3
3
|
const k = (h) => {
|
|
4
4
|
const { fieldType: I, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = h, [L, O] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(I), r = D((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.82.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -151,5 +151,5 @@
|
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
|
-
"falconPackageHash": "
|
|
154
|
+
"falconPackageHash": "db40d7d28b6f8133fa23c3e988f9d61d091dd06ed55cb7ead11bf3a5"
|
|
155
155
|
}
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import t, { useMemo as B, useCallback as L, useRef as oe } from "react";
|
|
2
|
-
import { RicosViewer as re } from "@wix/ricos/viewer";
|
|
3
|
-
import y from "classnames";
|
|
4
|
-
import { P as j, ai as A, af as k, as as ae, ab as v, ak as se, ac as le } from "./form-BmioUKtQ.js";
|
|
5
|
-
import { RadioGroup as ie, RadioField as z, RadioButton as H, TextField as ce, Group as ue, Input as me } from "react-aria-components";
|
|
6
|
-
import { debounce as pe } from "ts-debounce";
|
|
7
|
-
import { f as O, a as N } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { a as K } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as de, E as Ee } from "./field-error-headless-C7IUibkK.js";
|
|
10
|
-
import { L as Ie } from "./field-label-headless-BQFy2iAr.js";
|
|
11
|
-
import { N as Ce } from "./options-layout-constants-DEfIEJWD.js";
|
|
12
|
-
import { a as Oe, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
|
-
import { g as _e } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
|
-
import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
|
-
import { E as ye } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { s as g } from "./field-rac.module-ColNPUt0.js";
|
|
17
|
-
import { z as Ne, P 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-BuM-vthE.js";
|
|
18
|
-
import { o as ve } from "./options-rac.module-KM-VT_KY.js";
|
|
19
|
-
function Te(e, n) {
|
|
20
|
-
return e.reduce((o, r) => (o[r[n]] = r, o), {});
|
|
21
|
-
}
|
|
22
|
-
function xe(e) {
|
|
23
|
-
return Te(e, "id");
|
|
24
|
-
}
|
|
25
|
-
const Me = 0.01;
|
|
26
|
-
function Pe(e) {
|
|
27
|
-
var n;
|
|
28
|
-
return ((n = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : n.price) || "0";
|
|
29
|
-
}
|
|
30
|
-
function Q(e, n) {
|
|
31
|
-
const o = Number(n || "0");
|
|
32
|
-
return {
|
|
33
|
-
productId: e.id,
|
|
34
|
-
price: e.priceType === j.DYNAMIC_PRICE ? o : String(o),
|
|
35
|
-
quantity: 1
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function Be(e) {
|
|
39
|
-
return e.find((n) => n.priceType === j.DYNAMIC_PRICE);
|
|
40
|
-
}
|
|
41
|
-
function ke(e, n) {
|
|
42
|
-
return (e == null ? void 0 : e.productId) === (n == null ? void 0 : n.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
43
|
-
}
|
|
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
|
-
Q(s, Pe(s))
|
|
48
|
-
] : [];
|
|
49
|
-
}
|
|
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
|
-
}, [
|
|
55
|
-
c
|
|
56
|
-
]), x = B(() => xe(F), [
|
|
57
|
-
F
|
|
58
|
-
]), l = B(() => u ? Be(F) : void 0, [
|
|
59
|
-
F,
|
|
60
|
-
u
|
|
61
|
-
]), W = ke(d, l), [q, M] = he({
|
|
62
|
-
sourceValue: W,
|
|
63
|
-
format: (C) => fe(String(C ?? ""), b),
|
|
64
|
-
regionalFormat: b
|
|
65
|
-
}), w = L((C) => {
|
|
66
|
-
r(qe(C, d, x)), M("");
|
|
67
|
-
}, [
|
|
68
|
-
r,
|
|
69
|
-
x,
|
|
70
|
-
d,
|
|
71
|
-
M
|
|
72
|
-
]), V = L((C) => {
|
|
73
|
-
l && r(typeof C == "number" ? [
|
|
74
|
-
Q(l, String(C))
|
|
75
|
-
] : []);
|
|
76
|
-
}, [
|
|
77
|
-
r,
|
|
78
|
-
l
|
|
79
|
-
]), Y = B(() => pe(V, 500), [
|
|
80
|
-
V
|
|
81
|
-
]), J = L((C) => {
|
|
82
|
-
(d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
|
|
83
|
-
const { validInput: P, validNumber: te } = Oe(C.target.value, Me, q, b);
|
|
84
|
-
M(P), Y(te);
|
|
85
|
-
}, [
|
|
86
|
-
b,
|
|
87
|
-
r,
|
|
88
|
-
d,
|
|
89
|
-
l,
|
|
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
|
-
}, [
|
|
96
|
-
l == null ? void 0 : l.id,
|
|
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
|
-
return /* @__PURE__ */ t.createElement(E, {
|
|
101
|
-
fieldId: n,
|
|
102
|
-
renderLabel: () => Z,
|
|
103
|
-
renderInput: () => /* @__PURE__ */ t.createElement(ie, {
|
|
104
|
-
"aria-labelledby": h,
|
|
105
|
-
value: U,
|
|
106
|
-
onChange: w,
|
|
107
|
-
isDisabled: s,
|
|
108
|
-
isInvalid: f,
|
|
109
|
-
isRequired: m,
|
|
110
|
-
onBlur: p,
|
|
111
|
-
onFocus: _
|
|
112
|
-
}, G ? N(G, {
|
|
113
|
-
productsById: x,
|
|
114
|
-
addOther: u,
|
|
115
|
-
customAmount: q,
|
|
116
|
-
onCustomAmountInputChange: J,
|
|
117
|
-
currency: T,
|
|
118
|
-
t: I,
|
|
119
|
-
placeholder: i === void 0 ? I("donation.other-option.placeholder") : i,
|
|
120
|
-
customAmountProductId: l == null ? void 0 : l.id,
|
|
121
|
-
onFocusCustomInput: X
|
|
122
|
-
}) : null),
|
|
123
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, ne, ee)
|
|
124
|
-
});
|
|
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
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
128
|
-
className: n,
|
|
129
|
-
"data-invalid": f
|
|
130
|
-
}, h ? N(h, {
|
|
131
|
-
productsById: r
|
|
132
|
-
}) : null, s && i && /* @__PURE__ */ t.createElement(z, {
|
|
133
|
-
value: i,
|
|
134
|
-
style: {
|
|
135
|
-
position: "absolute",
|
|
136
|
-
width: "1px",
|
|
137
|
-
height: "1px",
|
|
138
|
-
padding: "0",
|
|
139
|
-
margin: "-1px",
|
|
140
|
-
overflow: "hidden",
|
|
141
|
-
clip: "rect(0, 0, 0, 0)",
|
|
142
|
-
whiteSpace: "nowrap",
|
|
143
|
-
border: "0"
|
|
144
|
-
}
|
|
145
|
-
}, /* @__PURE__ */ t.createElement(H, {
|
|
146
|
-
"aria-label": c("donation.other-option.label", "Custom amount")
|
|
147
|
-
}, c("donation.other-option.label", "Custom amount"))), I && s ? N(I, {
|
|
148
|
-
customAmount: m,
|
|
149
|
-
onCustomAmountInputChange: p,
|
|
150
|
-
currency: _,
|
|
151
|
-
t: c,
|
|
152
|
-
placeholder: u,
|
|
153
|
-
customAmountProductId: i,
|
|
154
|
-
onFocusCustomInput: E
|
|
155
|
-
}) : null);
|
|
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
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
159
|
-
className: n,
|
|
160
|
-
"data-columns": c
|
|
161
|
-
}, s.map((u) => {
|
|
162
|
-
var f;
|
|
163
|
-
const i = r[u.value], E = (f = i == null ? void 0 : i.fixedPriceOptions) == null ? void 0 : f.price;
|
|
164
|
-
return N(_, {
|
|
165
|
-
key: u.value,
|
|
166
|
-
value: u.value,
|
|
167
|
-
price: E || "0"
|
|
168
|
-
});
|
|
169
|
-
}));
|
|
170
|
-
}, R = ({ children: e, className: n, ...o }) => {
|
|
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 } = K({
|
|
172
|
-
amount: s,
|
|
173
|
-
currency: p == null ? void 0 : p.code,
|
|
174
|
-
locale: _
|
|
175
|
-
}), E = oe(null);
|
|
176
|
-
se(() => {
|
|
177
|
-
var h, I;
|
|
178
|
-
(I = (h = E.current) == null ? void 0 : h.querySelector("input")) == null || I.focus();
|
|
179
|
-
}, m);
|
|
180
|
-
const f = c ? N(c, {
|
|
181
|
-
price: s
|
|
182
|
-
}) : null;
|
|
183
|
-
return /* @__PURE__ */ t.createElement(z, {
|
|
184
|
-
value: r
|
|
185
|
-
}, /* @__PURE__ */ t.createElement(H, {
|
|
186
|
-
className: n,
|
|
187
|
-
ref: E
|
|
188
|
-
}, /* @__PURE__ */ t.createElement(t.Fragment, null, i && u, f, !i && u)));
|
|
189
|
-
}, Ue = ({ className: e, ...n }) => {
|
|
190
|
-
const { price: o } = n, { currency: r, regionalFormat: s } = v(), { value: m } = K({
|
|
191
|
-
amount: o,
|
|
192
|
-
currency: r == null ? void 0 : r.code,
|
|
193
|
-
locale: s
|
|
194
|
-
});
|
|
195
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
196
|
-
className: e
|
|
197
|
-
}, m);
|
|
198
|
-
}, $e = ({ className: e }) => {
|
|
199
|
-
const { currency: n } = v();
|
|
200
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
201
|
-
className: e
|
|
202
|
-
}, (n == null ? void 0 : n.sign) || (n == null ? void 0 : n.code) || "");
|
|
203
|
-
};
|
|
204
|
-
R.Value = Ue;
|
|
205
|
-
R.Currency = $e;
|
|
206
|
-
const S = ({ children: e, className: n, ...o }) => {
|
|
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
|
-
target: {
|
|
210
|
-
value: F
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}, [
|
|
214
|
-
s
|
|
215
|
-
]), d = L(() => {
|
|
216
|
-
u();
|
|
217
|
-
}, [
|
|
218
|
-
u
|
|
219
|
-
]);
|
|
220
|
-
return /* @__PURE__ */ t.createElement(ce, {
|
|
221
|
-
"aria-labelledby": `${f} ${h}`,
|
|
222
|
-
value: r,
|
|
223
|
-
onChange: b,
|
|
224
|
-
onFocus: d,
|
|
225
|
-
isDisabled: i,
|
|
226
|
-
isInvalid: E
|
|
227
|
-
}, /* @__PURE__ */ t.createElement(ue, {
|
|
228
|
-
className: n,
|
|
229
|
-
isDisabled: i,
|
|
230
|
-
isInvalid: E
|
|
231
|
-
}, r && m && I ? N(I, {
|
|
232
|
-
currency: m,
|
|
233
|
-
t: p
|
|
234
|
-
}) : null, T ? N(T, {
|
|
235
|
-
placeholder: _,
|
|
236
|
-
customAmountProductId: c
|
|
237
|
-
}) : null));
|
|
238
|
-
}, Ve = ({ className: e, ...n }) => {
|
|
239
|
-
const { currency: o, t: r } = n, { prefixId: s } = k();
|
|
240
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
241
|
-
id: s,
|
|
242
|
-
"aria-hidden": !1,
|
|
243
|
-
"aria-label": _e(r, o),
|
|
244
|
-
className: e
|
|
245
|
-
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
246
|
-
}, Ye = ({ className: e, ...n }) => {
|
|
247
|
-
const { placeholder: o, customAmountProductId: r } = n, { ariaDescribedBy: s, labelId: m, prefixId: p } = k();
|
|
248
|
-
return /* @__PURE__ */ t.createElement(me, {
|
|
249
|
-
id: r,
|
|
250
|
-
"aria-labelledby": `${m} ${p}`,
|
|
251
|
-
"aria-describedby": s,
|
|
252
|
-
placeholder: o,
|
|
253
|
-
inputMode: "decimal",
|
|
254
|
-
autoComplete: "off",
|
|
255
|
-
className: e
|
|
256
|
-
});
|
|
257
|
-
};
|
|
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", je = "_options_11glx_7", ze = "_option_11glx_7", He = "_optionCurrency_11glx_89", Ke = "_otherInput_11glx_93", Qe = "_otherInputCurrency_11glx_112", D = {
|
|
268
|
-
control: Ge,
|
|
269
|
-
options: je,
|
|
270
|
-
option: ze,
|
|
271
|
-
optionCurrency: He,
|
|
272
|
-
otherInput: Ke,
|
|
273
|
-
otherInputCurrency: Qe
|
|
274
|
-
}, We = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(re, {
|
|
275
|
-
content: e,
|
|
276
|
-
locale: n
|
|
277
|
-
}), Je = () => {
|
|
278
|
-
const e = le(Ae.DONATION_OPTION);
|
|
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
|
-
})
|
|
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
|
-
}, On = () => /* @__PURE__ */ t.createElement(Je, null);
|
|
305
|
-
export {
|
|
306
|
-
On as DonationRAC
|
|
307
|
-
};
|