@wix/form-elements 1.159.0 → 1.161.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-CpiyUOXo.js → appointment-rac-BubC8I9X.js} +388 -381
- package/dist/component/{bookings-address-rac-BBEUV1t7.js → bookings-address-rac-BbwvVs86.js} +1 -1
- package/dist/component/{bookings-email-rac-DdfoeLFV.js → bookings-email-rac-C2HCkcfa.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DH39yvQ-.js → bookings-first-name-rac-Uy7c5EBs.js} +1 -1
- package/dist/component/{bookings-header-rac-StLm7b4I.js → bookings-header-rac-nmwsWRjS.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DHZMPMOO.js → bookings-last-name-rac-BAioQLCg.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrHp1ojM.js → bookings-login-bar-rac-CO6vOBjG.js} +5 -5
- package/dist/component/{bookings-phone-rac-6aGjbavK.js → bookings-phone-rac-Cr16h-_R.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DBlGZUM5.js → bookings-rich-text-rac-CHLH3jd7.js} +1 -1
- package/dist/component/{checkbox-field-rac-Cna1Va1X.js → checkbox-field-rac-CMwmwFMD.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-m_-10Mdx.js → checkbox-group-field-headless-BNs_S-nT.js} +50 -50
- package/dist/component/{checkbox-group-field-rac-BSCi5hmx.js → checkbox-group-field-rac-BA60EPAN.js} +12 -12
- package/dist/component/{checkbox-group-rac-BWYQZmAI.js → checkbox-group-rac-BJZ4Oer9.js} +1 -1
- package/dist/component/{checkbox-rac-BsUTfSUf.js → checkbox-rac-KsVlI6_V.js} +1 -1
- package/dist/component/{contacts-address-rac-DwCLW8rV.js → contacts-address-rac-CRYkz87z.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DnNgxbKb.js → contacts-birthdate-rac-BIz-1-ZX.js} +1 -1
- package/dist/component/{contacts-company-rac-BQqXzpNl.js → contacts-company-rac-B8G__j6I.js} +1 -1
- package/dist/component/{contacts-email-rac-BINnZzxp.js → contacts-email-rac-Dztkvp5i.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DBWKFkIU.js → contacts-first-name-rac-CVSEWpLU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-D_-qrF7I.js → contacts-last-name-rac-Blz4M5bk.js} +1 -1
- package/dist/component/{contacts-phone-rac-7n7JkSDr.js → contacts-phone-rac-CPCE5soY.js} +1 -1
- package/dist/component/{contacts-position-rac-DvXP8nvT.js → contacts-position-rac-Dd_kBjqG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DnLnV5Gm.js → contacts-subscribe-rac-C6AlsP10.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BJVWhvYW.js → contacts-tax-id-rac-CQ1n29zI.js} +1 -1
- package/dist/component/{date-availability-Df807-eN.js → date-availability-DDj1j0z5.js} +1 -1
- package/dist/component/date-input-field-rac-D5r1n_ah.js +309 -0
- package/dist/component/{date-input-rac-CSB3MWHW.js → date-input-rac-Cyi5mU_P.js} +1 -1
- package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-CeG391Zo.js} +79 -79
- package/dist/component/{date-picker-rac-Fp8_pxtf.js → date-picker-rac-Ci9aHgav.js} +1 -1
- package/dist/component/date-time-input-field-rac-CrbYEbJJ.js +441 -0
- package/dist/component/{date-time-input-rac-wctMR4uM.js → date-time-input-rac-DDJLkqs0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-erMPfwFL.js → dext-checkbox-group-rac-C3ftVHBA.js} +4 -4
- package/dist/component/{dext-checkbox-rac-DQSq9Lqd.js → dext-checkbox-rac-BGLYWn68.js} +1 -1
- package/dist/component/{dext-date-picker-rac-RCLcd1VV.js → dext-date-picker-rac-Cy9RlDlt.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DMolWzvy.js → dext-date-time-input-rac-88ZoTd5e.js} +1 -1
- package/dist/component/{dext-dropdown-rac-wQ2GJL4V.js → dext-dropdown-rac-CPxDUuk9.js} +1 -1
- package/dist/component/{dext-email-rac-BtymBVTW.js → dext-email-rac-BAvQwDPA.js} +1 -1
- package/dist/component/{dext-number-input-rac-DHPiK0Z3.js → dext-number-input-rac-D7HYQVKq.js} +1 -1
- package/dist/component/{dext-phone-rac-C58vHEEe.js → dext-phone-rac--FhcplSI.js} +1 -1
- package/dist/component/dext-radio-group-rac-DBz8iCKW.js +18 -0
- package/dist/component/{dext-rating-input-rac-DI0k3tVa.js → dext-rating-input-rac-Cv7nThfe.js} +1 -1
- package/dist/component/{dext-tags-rac-DmF6ctvQ.js → dext-tags-rac-CRUUc5dr.js} +2 -2
- package/dist/component/{dext-text-area-rac-Bv6ridbR.js → dext-text-area-rac-DQBQXV1L.js} +1 -1
- package/dist/component/{dext-text-input-rac-DoTAdUgU.js → dext-text-input-rac-4CpM581y.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuoMS6g2.js → dext-url-input-rac-0C1jTEr9.js} +1 -1
- package/dist/component/{donation-rac-CjZalSgn.js → donation-rac-Cgt0ZE50.js} +79 -79
- package/dist/component/{dropdown-field-rac-By_fpqhx.js → dropdown-field-rac-DlGKR7pZ.js} +14 -14
- package/dist/component/{dropdown-rac-BnIEC4RX.js → dropdown-rac-CYFW_3x_.js} +1 -1
- package/dist/component/{ecom-address-rac-B6Usk1Ty.js → ecom-address-rac-CQfQHpXC.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B4B0wzlC.js → ecom-subscription-checkbox-rac-D2v2Upvz.js} +2 -2
- package/dist/component/{email-input-field-rac-Df3KI3_v.js → email-input-field-rac-CVw25yRo.js} +39 -39
- package/dist/component/{events-repeater-rac-B2iBk8lV.js → events-repeater-rac-BCVUcmFj.js} +25 -25
- package/dist/component/{events-rsvp-rac-xl_qCIh3.js → events-rsvp-rac-DwbqEr8z.js} +18 -18
- package/dist/component/{field-error-headless-DWc76YmY.js → field-error-headless-XnVcMmsL.js} +3 -3
- package/dist/component/{field-label-headless-DKBKqI2X.js → field-label-headless-BRTLT2Yt.js} +16 -16
- package/dist/component/{file-upload-rac-BVj4cRqe.js → file-upload-rac-Dkwg9Jk4.js} +118 -118
- package/dist/component/{fixed-payment-rac-BS1Hb4hg.js → fixed-payment-rac-ST98xAa2.js} +13 -13
- package/dist/component/{form-BTUoOcqB.js → form-BUqSKOvc.js} +785 -727
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DTJ_Us6u.js → header-field-rac-CzNTGYWq.js} +6 -6
- package/dist/component/{header-rac-CvYp0Jjo.js → header-rac-DUt6AIAE.js} +1 -1
- package/dist/component/{image-choice-rac--qrYqKJl.js → image-choice-rac-DuBgrSt2.js} +23 -23
- package/dist/component/{index-DIl9BH2M.js → index-CDO22hht.js} +66 -66
- package/dist/component/{index-CoEV4QEy.js → index-cZZeAuuu.js} +2 -2
- package/dist/component/{isObjectLike-CLN09X5V.js → isObjectLike-cs4bARpC.js} +11 -11
- package/dist/component/multiline-address-field-rac-vcEWhUCV.js +1664 -0
- package/dist/component/{multiline-address-rac-DtaAJjbR.js → multiline-address-rac-WQaI2eUX.js} +1 -1
- package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-CBUMqATk.js} +23 -23
- package/dist/component/{number-input-rac-BlciEPLN.js → number-input-rac-B4j5hyzS.js} +1 -1
- package/dist/component/{password-rac-BvvQgafk.js → password-rac-DwLyf45N.js} +27 -27
- package/dist/component/{payment-input-rac-CSRyOPPr.js → payment-input-rac-D0Od---y.js} +31 -31
- package/dist/component/phone-input-field-rac-COlu9IeC.js +512 -0
- package/dist/component/{phone-rac-DMP1MoRs.js → phone-rac-Dh4RacOF.js} +1 -1
- package/dist/component/{product-list-rac-WQ9Qhzum.js → product-list-rac-D7zHDE2D.js} +39 -39
- package/dist/component/{quiz-radio-group-rac-DzrL3-gZ.js → quiz-radio-group-rac-1AaKphJt.js} +1 -1
- package/dist/component/{radio-button-module-classes-CJk18LzO.js → radio-button-module-classes-VqaP6vpA.js} +30 -30
- package/dist/component/{radio-group-field-rac-DGoMoSgo.js → radio-group-field-rac-Cp3LRN3C.js} +8 -8
- package/dist/component/{radio-group-rac-DhAELVNV.js → radio-group-rac-KhmhzYGf.js} +1 -1
- package/dist/component/{rating-input-field-rac-CFoesqmC.js → rating-input-field-rac-10n6ciCr.js} +39 -39
- package/dist/component/{rating-input-rac-CFMIxche.js → rating-input-rac-XZjjY2Gp.js} +1 -1
- package/dist/component/{rich-content-rac.module-xJ03MegT.js → rich-content-rac.module-kMwDoLBa.js} +8 -8
- package/dist/component/{rich-text-field-rac-CBMY4JOB.js → rich-text-field-rac-H5bd8fAt.js} +4 -4
- package/dist/component/{rich-text-rac-CvZ7s1Ct.js → rich-text-rac-88GSQR62.js} +1 -1
- package/dist/component/service-dropdown-rac-B1_Xr_X3.js +145 -0
- package/dist/component/{services-multi-choice-rac-fXOov4K7.js → services-multi-choice-rac-DWp_Llbi.js} +11 -11
- package/dist/component/{signature-rac-CG_Q9Oxr.js → signature-rac-zN_6KRDp.js} +82 -82
- package/dist/component/{submit-button-rac-DAsovEp2.js → submit-button-rac-Dv6UarYX.js} +12 -12
- package/dist/component/{tags-field-rac-9mpOMPLm.js → tags-field-rac-sVN6MHfJ.js} +43 -43
- package/dist/component/{tags-rac-CNBJ08wS.js → tags-rac-DhTHs_XN.js} +1 -1
- package/dist/component/{text-area-field-rac-D4aTm7CM.js → text-area-field-rac-DrWkww7W.js} +19 -19
- package/dist/component/{text-area-rac-DoKiH_Kv.js → text-area-rac-CXXh-ZdY.js} +1 -1
- package/dist/component/{text-input-field-rac-BbvPB26b.js → text-input-field-rac-C2YiMr-g.js} +5 -5
- package/dist/component/text-input-headless-BJMNbsMY.js +47 -0
- package/dist/component/{text-input-rac-1ac1EKad.js → text-input-rac-CpsPh7FH.js} +1 -1
- package/dist/component/{time-input-rac-BS0rR-89.js → time-input-rac-DG_1KxS4.js} +20 -20
- package/dist/component/{url-input-field-rac-DbO6ATng.js → url-input-field-rac-twxRREnl.js} +19 -19
- package/dist/component/{url-input-rac-DHuny3d-.js → url-input-rac-BTStO0NP.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-DbMMg1ws.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-Yes4kC_0.js +96 -0
- package/dist/component/{use-element-state-class-name-BUsFQfoW.js → use-element-state-class-name-DlncY4hk.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C2l3G8gb.js → use-hoverable-input-class-name-C__zqP5j.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-DnK_MQRO.js +53 -0
- package/dist/component/{use-service-options-base-D_enm38a.js → use-service-options-base-DKJe52Vk.js} +6 -6
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +6 -0
- package/dist/form.d.ts +11 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-CEuPElMH.js +0 -303
- package/dist/component/date-time-input-field-rac-DG5KSBHe.js +0 -433
- package/dist/component/dext-radio-group-rac-Cp-I94HW.js +0 -18
- package/dist/component/dropdown-field-headless-BYEjiIUf.js +0 -93
- package/dist/component/multiline-address-field-rac-BjWzx-LH.js +0 -1659
- package/dist/component/phone-input-field-rac-BVWzH_TY.js +0 -508
- package/dist/component/service-dropdown-rac-B627AgPG.js +0 -145
- package/dist/component/text-input-headless-BGaBRrP1.js +0 -47
- package/dist/component/use-dropdown-trigger-class-name-rcGBzxI1.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-CoOk4W4i.js +0 -48
- package/dist/component/use-text-input-class-name-BLtPQoYE.js +0 -6
package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-CBUMqATk.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import r, { useState as
|
|
4
|
-
import { NumberField as
|
|
5
|
-
import {
|
|
3
|
+
import r, { useState as G, useCallback as K, useEffect as Q, useRef as U } from "react";
|
|
4
|
+
import { NumberField as W, Input as $ } from "react-aria-components";
|
|
5
|
+
import { bA as _, bx as S, bK as j, bC as z, W as H, ac as J, M as X, G as Y } from "./form-BUqSKOvc.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Z, E as w } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
7
|
+
import { D as Z, E as w } from "./field-error-headless-XnVcMmsL.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-BRTLT2Yt.js";
|
|
9
9
|
import { g as re, c as te } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as ne } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as p } from "./field-rac.module-DP0lkkEv.js";
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-D9tJTR-b.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
|
-
var F,
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId:
|
|
15
|
+
var F, L, R;
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: A } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, x = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, y = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, g = O(s), [M, I] = G(g), T = ne(E), V = c(t, e.Label), h = c(t, e.Input), q = c(t, e.Description), k = c(t, e.Error), B = K((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -24,16 +24,16 @@ const e = ({ children: t }) => {
|
|
|
24
24
|
D,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return Q(() => {
|
|
28
28
|
I(O(s));
|
|
29
29
|
}, [
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
32
32
|
fieldId: a,
|
|
33
33
|
renderLabel: () => V,
|
|
34
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
35
|
-
"aria-labelledby":
|
|
36
|
-
value:
|
|
34
|
+
renderInput: () => /* @__PURE__ */ r.createElement(W, {
|
|
35
|
+
"aria-labelledby": A,
|
|
36
|
+
value: M,
|
|
37
37
|
onChange: B,
|
|
38
38
|
isDisabled: d,
|
|
39
39
|
isRequired: b,
|
|
@@ -41,22 +41,22 @@ const e = ({ children: t }) => {
|
|
|
41
41
|
isInvalid: u,
|
|
42
42
|
onBlur: T,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
45
|
-
maxValue:
|
|
44
|
+
minValue: y ?? void 0,
|
|
45
|
+
maxValue: x ?? void 0
|
|
46
46
|
}, h),
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k,
|
|
47
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k, q)
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: t }) => {
|
|
50
50
|
var u;
|
|
51
|
-
const { t: a } =
|
|
51
|
+
const { t: a } = j(), { inputId: s, ariaDescribedBy: l } = S(), { id: d, placeholder: b, validation: o, label: E, required: f } = _();
|
|
52
52
|
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
53
|
-
const m =
|
|
54
|
-
return
|
|
53
|
+
const m = U(null);
|
|
54
|
+
return z(() => {
|
|
55
55
|
var n;
|
|
56
56
|
(n = m.current) == null || n.focus({
|
|
57
57
|
preventScroll: !0
|
|
58
58
|
});
|
|
59
|
-
}, d), /* @__PURE__ */ r.createElement(
|
|
59
|
+
}, d), /* @__PURE__ */ r.createElement($, {
|
|
60
60
|
ref: m,
|
|
61
61
|
id: s,
|
|
62
62
|
"aria-describedby": l,
|
|
@@ -75,12 +75,12 @@ e.Error = w;
|
|
|
75
75
|
const O = (t) => te(t) ?? NaN, oe = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(P, {
|
|
76
76
|
content: t,
|
|
77
77
|
locale: a
|
|
78
|
-
}),
|
|
78
|
+
}), Le = () => {
|
|
79
79
|
const t = se();
|
|
80
80
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
81
|
-
className: i(
|
|
81
|
+
className: i(H, p.label)
|
|
82
82
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
83
|
-
className: i(
|
|
83
|
+
className: i(J, p.requiredMark)
|
|
84
84
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
85
85
|
className: t
|
|
86
86
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
@@ -90,5 +90,5 @@ const O = (t) => te(t) ?? NaN, oe = ({ content: t, locale: a }) => /* @__PURE__
|
|
|
90
90
|
}, oe));
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
Le as N
|
|
94
94
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import e, { useState as N, useRef as x } from "react";
|
|
2
2
|
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import { TextField as k, Group as q, Input as
|
|
4
|
+
import { bA as E, bx as I, bC as A, bK as B, W as v, ac as V, M, G as P } from "./form-BUqSKOvc.js";
|
|
5
|
+
import { TextField as k, Group as q, Input as U, Button as W } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as j, E as
|
|
8
|
-
import { L as
|
|
9
|
-
import { E as
|
|
10
|
-
import { H as
|
|
7
|
+
import { D as j, E as G } from "./field-error-headless-XnVcMmsL.js";
|
|
8
|
+
import { L as H } from "./field-label-headless-BRTLT2Yt.js";
|
|
9
|
+
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { H as K } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-DP0lkkEv.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as Q } from "./use-text-input-class-name-D9tJTR-b.js";
|
|
13
13
|
const t = ({ children: o, className: r }) => {
|
|
14
|
-
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, autoComplete:
|
|
15
|
-
return /* @__PURE__ */ e.createElement(
|
|
14
|
+
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, autoComplete: _, FieldLayout: y } = E(), { labelId: R } = I(), [D, F] = N(!1), L = u(o, t.Label), T = u(o, t.Control), w = u(o, t.Description), S = u(o, t.Error);
|
|
15
|
+
return /* @__PURE__ */ e.createElement(y, {
|
|
16
16
|
fieldId: l,
|
|
17
17
|
renderLabel: () => L,
|
|
18
18
|
renderInput: () => /* @__PURE__ */ e.createElement(k, {
|
|
19
|
-
autoComplete:
|
|
19
|
+
autoComplete: _,
|
|
20
20
|
"aria-labelledby": R,
|
|
21
21
|
value: s ?? "",
|
|
22
22
|
onChange: c,
|
|
@@ -33,7 +33,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
33
33
|
})),
|
|
34
34
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w, S)
|
|
35
35
|
});
|
|
36
|
-
},
|
|
36
|
+
}, $ = ({ children: o, className: r, ...l }) => {
|
|
37
37
|
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(o, t.Input), i = u(o, t.Toggle);
|
|
38
38
|
return /* @__PURE__ */ e.createElement(q, {
|
|
39
39
|
className: r,
|
|
@@ -45,14 +45,14 @@ const t = ({ children: o, className: r }) => {
|
|
|
45
45
|
isVisible: s,
|
|
46
46
|
onToggleVisibility: c
|
|
47
47
|
}));
|
|
48
|
-
},
|
|
48
|
+
}, z = ({ className: o, ...r }) => {
|
|
49
49
|
const { isVisible: l } = r, { id: s, placeholder: c } = E(), { inputId: n, ariaDescribedBy: m } = I(), a = x(null);
|
|
50
|
-
return
|
|
50
|
+
return A(() => {
|
|
51
51
|
var i;
|
|
52
52
|
(i = a.current) == null || i.focus({
|
|
53
53
|
preventScroll: !0
|
|
54
54
|
});
|
|
55
|
-
}, s), /* @__PURE__ */ e.createElement(
|
|
55
|
+
}, s), /* @__PURE__ */ e.createElement(U, {
|
|
56
56
|
ref: a,
|
|
57
57
|
id: n,
|
|
58
58
|
type: l ? "text" : "password",
|
|
@@ -60,9 +60,9 @@ const t = ({ children: o, className: r }) => {
|
|
|
60
60
|
className: o,
|
|
61
61
|
placeholder: c
|
|
62
62
|
});
|
|
63
|
-
},
|
|
63
|
+
}, J = ({ className: o, showPasswordTooltipText: r, hidePasswordTooltipText: l, children: s, ...c }) => {
|
|
64
64
|
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l : r;
|
|
65
|
-
return /* @__PURE__ */ e.createElement(
|
|
65
|
+
return /* @__PURE__ */ e.createElement(W, {
|
|
66
66
|
type: "button",
|
|
67
67
|
isDisabled: a,
|
|
68
68
|
onPress: m,
|
|
@@ -73,12 +73,12 @@ const t = ({ children: o, className: r }) => {
|
|
|
73
73
|
isVisible: n
|
|
74
74
|
}));
|
|
75
75
|
};
|
|
76
|
-
t.Label =
|
|
77
|
-
t.Control =
|
|
78
|
-
t.Input =
|
|
79
|
-
t.Toggle =
|
|
76
|
+
t.Label = H;
|
|
77
|
+
t.Control = $;
|
|
78
|
+
t.Input = z;
|
|
79
|
+
t.Toggle = J;
|
|
80
80
|
t.Description = j;
|
|
81
|
-
t.Error =
|
|
81
|
+
t.Error = G;
|
|
82
82
|
const X = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
83
83
|
viewBox: "0 0 24 24",
|
|
84
84
|
width: "20",
|
|
@@ -121,23 +121,23 @@ const X = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
121
121
|
content: o,
|
|
122
122
|
locale: r
|
|
123
123
|
}), re = () => {
|
|
124
|
-
const { t: o } =
|
|
124
|
+
const { t: o } = B(), r = Q(g.control);
|
|
125
125
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
126
|
-
className: d(
|
|
126
|
+
className: d(v, p.label)
|
|
127
127
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
128
128
|
className: d(V, p.requiredMark)
|
|
129
129
|
})), /* @__PURE__ */ e.createElement(t.Control, {
|
|
130
130
|
className: r
|
|
131
131
|
}, /* @__PURE__ */ e.createElement(t.Input, {
|
|
132
|
-
className: d(p.innerInput,
|
|
132
|
+
className: d(p.innerInput, K)
|
|
133
133
|
}), /* @__PURE__ */ e.createElement(t.Toggle, {
|
|
134
134
|
className: g.toggleButton,
|
|
135
135
|
showPasswordTooltipText: o("forms.widget.modals.show-password-tooltip"),
|
|
136
136
|
hidePasswordTooltipText: o("forms.widget.modals.hide-password-tooltip")
|
|
137
137
|
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(Y, null) : /* @__PURE__ */ e.createElement(X, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
138
|
-
className: d(
|
|
139
|
-
}, /* @__PURE__ */ e.createElement(
|
|
140
|
-
className: d(
|
|
138
|
+
className: d(M, p.error)
|
|
139
|
+
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
140
|
+
className: d(P, p.description)
|
|
141
141
|
}, oe));
|
|
142
142
|
}, ge = () => /* @__PURE__ */ e.createElement(re, null);
|
|
143
143
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import r, { useCallback as P, useRef as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import r, { useCallback as P, useRef as Q } from "react";
|
|
2
|
+
import { RicosViewer as W } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
4
|
+
import { TextField as j, Group as w, Input as z } from "react-aria-components";
|
|
5
|
+
import { bA as R, bx as D, bs as M, bK as J, bC as X, W as Y, ac as Z, M as ee, G as re } from "./form-BUqSKOvc.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as te, E as ne } from "./field-error-headless-
|
|
8
|
-
import { L as ae } from "./field-label-headless-
|
|
9
|
-
import { f as
|
|
7
|
+
import { D as te, E as ne } from "./field-error-headless-XnVcMmsL.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-BRTLT2Yt.js";
|
|
9
|
+
import { f as N, g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
10
10
|
import { u as oe } from "./use-synced-display-value-DcAxdn3M.js";
|
|
11
11
|
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { H as ce } from "./custom-focus-class-_483Pkwp.js";
|
|
13
13
|
import { s as d } from "./field-rac.module-DP0lkkEv.js";
|
|
14
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
14
|
+
import { u as ie } from "./use-text-input-class-name-D9tJTR-b.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
@@ -19,7 +19,7 @@ function ue(e, t) {
|
|
|
19
19
|
quantity: 1
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function x(e) {
|
|
23
23
|
if (e == null || e === "")
|
|
24
24
|
return;
|
|
25
25
|
const t = Number(String(e).replace(/,/g, "."));
|
|
@@ -27,12 +27,12 @@ function h(e) {
|
|
|
27
27
|
}
|
|
28
28
|
const n = ({ children: e }) => {
|
|
29
29
|
var O, g, A, V;
|
|
30
|
-
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: I, hasError: y, onBlur: o, onFocus: E, FieldLayout:
|
|
30
|
+
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: I, hasError: y, onBlur: o, onFocus: E, FieldLayout: T, validation: C } = R(), { labelId: G, prefixId: q } = D(), { regionalFormat: c } = M(), S = (A = (g = (O = C == null ? void 0 : C.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : g.products) == null ? void 0 : A[0], _ = (V = a == null ? void 0 : a.at(0)) == null ? void 0 : V.price, [F, b] = oe({
|
|
31
31
|
sourceValue: _,
|
|
32
|
-
format: (l) =>
|
|
32
|
+
format: (l) => N(String(l ?? ""), c),
|
|
33
33
|
regionalFormat: c
|
|
34
34
|
}), $ = P(() => {
|
|
35
|
-
const l =
|
|
35
|
+
const l = N(F, c);
|
|
36
36
|
b(l || ""), o == null || o();
|
|
37
37
|
}, [
|
|
38
38
|
F,
|
|
@@ -41,14 +41,14 @@ const n = ({ children: e }) => {
|
|
|
41
41
|
b
|
|
42
42
|
]), v = P((l) => {
|
|
43
43
|
b(l);
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
if (
|
|
44
|
+
const L = x(N(l, c)), K = x(_);
|
|
45
|
+
if (L !== K) {
|
|
46
|
+
if (L === void 0) {
|
|
47
47
|
s(null);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
s([
|
|
51
|
-
ue(S,
|
|
51
|
+
ue(S, L)
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
54
|
}, [
|
|
@@ -57,12 +57,12 @@ const n = ({ children: e }) => {
|
|
|
57
57
|
c,
|
|
58
58
|
_,
|
|
59
59
|
b
|
|
60
|
-
]), B = i(e, n.Label),
|
|
61
|
-
return /* @__PURE__ */ r.createElement(
|
|
60
|
+
]), B = i(e, n.Label), U = i(e, n.Input), k = i(e, n.Description), H = i(e, n.Error);
|
|
61
|
+
return /* @__PURE__ */ r.createElement(T, {
|
|
62
62
|
fieldId: t,
|
|
63
63
|
renderLabel: () => B,
|
|
64
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
65
|
-
"aria-labelledby": `${
|
|
64
|
+
renderInput: () => /* @__PURE__ */ r.createElement(j, {
|
|
65
|
+
"aria-labelledby": `${G} ${q}`,
|
|
66
66
|
value: a ? F : "",
|
|
67
67
|
onChange: v,
|
|
68
68
|
isDisabled: u,
|
|
@@ -71,18 +71,18 @@ const n = ({ children: e }) => {
|
|
|
71
71
|
isInvalid: y,
|
|
72
72
|
onBlur: $,
|
|
73
73
|
onFocus: E
|
|
74
|
-
},
|
|
75
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
74
|
+
}, U),
|
|
75
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, k)
|
|
76
76
|
});
|
|
77
77
|
}, f = ({ children: e, className: t }) => {
|
|
78
|
-
const { disabled: a, hasError: s } =
|
|
79
|
-
return /* @__PURE__ */ r.createElement(
|
|
78
|
+
const { disabled: a, hasError: s } = R(), u = i(e, f.Currency), m = i(e, f.Value);
|
|
79
|
+
return /* @__PURE__ */ r.createElement(w, {
|
|
80
80
|
className: t,
|
|
81
81
|
isDisabled: a,
|
|
82
82
|
isInvalid: s
|
|
83
83
|
}, u, m);
|
|
84
84
|
}, me = ({ className: e }) => {
|
|
85
|
-
const { currency: t } =
|
|
85
|
+
const { currency: t } = M(), { t: a } = J(), { prefixId: s } = D();
|
|
86
86
|
return t ? /* @__PURE__ */ r.createElement("span", {
|
|
87
87
|
id: s,
|
|
88
88
|
"aria-hidden": !1,
|
|
@@ -90,13 +90,13 @@ const n = ({ children: e }) => {
|
|
|
90
90
|
className: e
|
|
91
91
|
}, t.sign || t.code) : null;
|
|
92
92
|
}, pe = ({ className: e }) => {
|
|
93
|
-
const { id: t, placeholder: a, label: s } =
|
|
93
|
+
const { id: t, placeholder: a, label: s } = R(), { inputId: u, labelId: m, prefixId: I, ariaDescribedBy: y } = D(), o = Q(null);
|
|
94
94
|
return X(() => {
|
|
95
95
|
var E;
|
|
96
96
|
(E = o.current) == null || E.focus({
|
|
97
97
|
preventScroll: !0
|
|
98
98
|
});
|
|
99
|
-
}, t), /* @__PURE__ */ r.createElement(
|
|
99
|
+
}, t), /* @__PURE__ */ r.createElement(z, {
|
|
100
100
|
ref: o,
|
|
101
101
|
id: u,
|
|
102
102
|
className: e,
|
|
@@ -114,14 +114,14 @@ n.Label = ae;
|
|
|
114
114
|
n.Input = f;
|
|
115
115
|
n.Description = te;
|
|
116
116
|
n.Error = ne;
|
|
117
|
-
const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14",
|
|
117
|
+
const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", h = {
|
|
118
118
|
inputGroup: de,
|
|
119
119
|
currency: fe
|
|
120
|
-
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(
|
|
120
|
+
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(W, {
|
|
121
121
|
content: e,
|
|
122
122
|
locale: t
|
|
123
123
|
}), be = () => {
|
|
124
|
-
const e = ie(
|
|
124
|
+
const e = ie(h.inputGroup);
|
|
125
125
|
return /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(n.Label, {
|
|
126
126
|
className: p(Y, d.label)
|
|
127
127
|
}, /* @__PURE__ */ r.createElement(n.Label.Required, {
|
|
@@ -129,7 +129,7 @@ const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", x = {
|
|
|
129
129
|
})), /* @__PURE__ */ r.createElement(n.Input, {
|
|
130
130
|
className: e
|
|
131
131
|
}, /* @__PURE__ */ r.createElement(n.Input.Currency, {
|
|
132
|
-
className:
|
|
132
|
+
className: h.currency
|
|
133
133
|
}), /* @__PURE__ */ r.createElement(n.Input.Value, {
|
|
134
134
|
className: p(d.innerInput, ce)
|
|
135
135
|
})), /* @__PURE__ */ r.createElement(n.Error, {
|