@wix/form-elements 1.217.0 → 1.218.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-BwV-BiuM.js → appointment-rac-BHOy_R7-.js} +4 -4
- package/dist/component/{bookings-address-rac-60s8mINA.js → bookings-address-rac-BCrQv66p.js} +1 -1
- package/dist/component/{bookings-email-rac-CD180ofz.js → bookings-email-rac-DmRfdxfb.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DPj9TLDZ.js → bookings-first-name-rac-BXO3f2gd.js} +1 -1
- package/dist/component/{bookings-header-rac-DWAqHAC3.js → bookings-header-rac-CO6AOevd.js} +1 -1
- package/dist/component/{bookings-last-name-rac-C-0GchtO.js → bookings-last-name-rac-BJBEASFi.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DpVUsgYV.js → bookings-login-bar-rac-BIAIfq4E.js} +5 -5
- package/dist/component/{bookings-phone-rac-DSw3Wpi6.js → bookings-phone-rac-Ccj4N7sU.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BcfuuhqF.js → bookings-rich-text-rac-B3HZ904h.js} +1 -1
- package/dist/component/{checkbox-field-rac-CxN4DXcm.js → checkbox-field-rac-CMLQboNZ.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-Cxytn3cY.js → checkbox-group-field-headless-BoPu_anP.js} +41 -41
- package/dist/component/{checkbox-group-field-rac-COySLANT.js → checkbox-group-field-rac-DDkB4mAS.js} +4 -4
- package/dist/component/{checkbox-group-rac-C36q50g-.js → checkbox-group-rac-CYRjp2pd.js} +1 -1
- package/dist/component/{checkbox-rac-CPRna7wo.js → checkbox-rac-CZtOcpN3.js} +1 -1
- package/dist/component/{contacts-address-rac-C9WfyF_C.js → contacts-address-rac-CTcU_s2X.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DI_n6KW2.js → contacts-birthdate-rac-CfoYd88-.js} +1 -1
- package/dist/component/{contacts-company-rac-C2L3jLDV.js → contacts-company-rac-BFa1_U3K.js} +1 -1
- package/dist/component/{contacts-email-rac-BXxC1EQz.js → contacts-email-rac-DnAo-YRv.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DDNYc6DW.js → contacts-first-name-rac-CXaZzVt1.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C8kg5uC1.js → contacts-last-name-rac-DfpXadTk.js} +1 -1
- package/dist/component/{contacts-phone-rac-GBwlIMQi.js → contacts-phone-rac-CCwC37Ud.js} +1 -1
- package/dist/component/{contacts-position-rac-sI-eyBLH.js → contacts-position-rac-CvMNYTKL.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DI3nlzX4.js → contacts-subscribe-rac-vL2jR6hR.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CRq4rhb6.js → contacts-tax-id-rac-CrFhrlkk.js} +1 -1
- package/dist/component/{date-availability-17HTB6Bn.js → date-availability-5zvsa_GI.js} +1 -1
- package/dist/component/{date-input-field-rac-BLO1qQSi.js → date-input-field-rac-BQuCwFBz.js} +43 -43
- package/dist/component/{date-input-rac-Zryc6o9F.js → date-input-rac-DKzwySbG.js} +1 -1
- package/dist/component/{date-picker-field-rac-COGESH_j.js → date-picker-field-rac-D-B3bNeU.js} +35 -35
- package/dist/component/{date-picker-rac-BR5X3Gg4.js → date-picker-rac-DjYsBhgo.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CKbGhDKq.js → date-time-input-field-rac-BECpkgB2.js} +30 -30
- package/dist/component/{date-time-input-rac-DnP-sVbv.js → date-time-input-rac-FbqGdzfB.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-O9bQHdjz.js → dext-checkbox-group-rac-BtSRkEFa.js} +2 -2
- package/dist/component/{dext-checkbox-rac-3Eqa1NNz.js → dext-checkbox-rac-BnC_NNyy.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BYjvDil-.js → dext-date-picker-rac-okrwxNz9.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BLX3xG9x.js → dext-date-time-input-rac-DHKRYBUe.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BwpbF2-Z.js → dext-dropdown-rac-1T_Ufw_J.js} +1 -1
- package/dist/component/{dext-email-rac-DUNmxVKy.js → dext-email-rac-BY3bKE0q.js} +1 -1
- package/dist/component/{dext-number-input-rac-D2rZrzXe.js → dext-number-input-rac-CFnKXD1l.js} +1 -1
- package/dist/component/{dext-phone-rac-C9dvhFCl.js → dext-phone-rac-LT9InJXw.js} +1 -1
- package/dist/component/{dext-radio-group-rac-D8mUfv1Y.js → dext-radio-group-rac-BUebk1mz.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BY8MRBDl.js → dext-rating-input-rac-Drk4nKuW.js} +1 -1
- package/dist/component/{dext-tags-rac-DBKnRkUI.js → dext-tags-rac-BcW2-hht.js} +2 -2
- package/dist/component/{dext-text-area-rac-BYVMZ7HH.js → dext-text-area-rac-ew2HEDVz.js} +1 -1
- package/dist/component/{dext-text-input-rac-B6Ga232R.js → dext-text-input-rac-BhhGEp-y.js} +1 -1
- package/dist/component/{dext-url-input-rac-Cgu1URth.js → dext-url-input-rac-DKPl-POV.js} +1 -1
- package/dist/component/{donation-rac-DL1TnDAO.js → donation-rac-B9w7zHLs.js} +50 -50
- package/dist/component/{dropdown-field-rac-KYozl4DF.js → dropdown-field-rac-CyIgQ8Wg.js} +3 -3
- package/dist/component/{dropdown-rac-DiqI7QHS.js → dropdown-rac-D4zhCab8.js} +1 -1
- package/dist/component/{ecom-address-rac-Cmb0daDG.js → ecom-address-rac-Cgc5vi9N.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B7AuYQA2.js → ecom-subscription-checkbox-rac-Ci19HUzq.js} +2 -2
- package/dist/component/{email-input-field-rac-DocV1aB9.js → email-input-field-rac-DX-z3AgN.js} +29 -29
- package/dist/component/{events-repeater-rac-B0Qqfo8D.js → events-repeater-rac-XGxIXTW0.js} +29 -29
- package/dist/component/{events-rsvp-rac-fv3hIzAL.js → events-rsvp-rac-CMEcer8W.js} +3 -3
- package/dist/component/{field-error-headless-Dfvu9FuO.js → field-error-headless-fX6PeZaI.js} +1 -1
- package/dist/component/{field-label-headless-Cxyl3wGC.js → field-label-headless-CoLjciGG.js} +5 -5
- package/dist/component/{file-upload-rac-Je_--JfX.js → file-upload-rac-N6_i0ky0.js} +88 -88
- package/dist/component/{fixed-payment-rac-BnXYEIDe.js → fixed-payment-rac-DB6BtjkX.js} +7 -7
- package/dist/component/{form-a7SUDn8q.js → form-cgY_BDTU.js} +1444 -1426
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-D6gL7ZE_.js → header-field-rac-CwNoeHks.js} +2 -2
- package/dist/component/{header-rac-DEkEGPwy.js → header-rac-DefKb4Vd.js} +1 -1
- package/dist/component/{image-choice-rac-Br7ZpUIc.js → image-choice-rac-CZFYVSzP.js} +25 -25
- package/dist/component/{index-nfuicG4V.js → index-D1ybDmS5.js} +2 -2
- package/dist/component/{index-CCtGcc8K.js → index-DUVXPUGc.js} +4 -4
- package/dist/component/{isObjectLike-zLoHjg3a.js → isObjectLike-93vxyYs1.js} +1 -1
- package/dist/component/multiline-address-field-rac-BN_Tnrno.js +1738 -0
- package/dist/component/{multiline-address-rac-CyM0O2ZV.js → multiline-address-rac-CoF0BwJI.js} +1 -1
- package/dist/component/{number-input-field-rac-orHx_sCp.js → number-input-field-rac-BVdfzTwW.js} +21 -21
- package/dist/component/{number-input-rac-CF5v19rL.js → number-input-rac-D-A2ybtN.js} +1 -1
- package/dist/component/{password-rac-BSWihZvF.js → password-rac-CbUBNreW.js} +26 -26
- package/dist/component/{payment-input-rac-CeAz10YA.js → payment-input-rac-BXdDXgXp.js} +46 -46
- package/dist/component/{phone-input-field-rac-BefHQnSh.js → phone-input-field-rac-CjmpG7p9.js} +57 -57
- package/dist/component/{phone-rac-C5jSEw_g.js → phone-rac-D3g5Pi2p.js} +1 -1
- package/dist/component/{product-list-rac-C0UIu3qw.js → product-list-rac-gJvJaUnQ.js} +35 -35
- package/dist/component/{quiz-radio-group-rac-Bya6uEoi.js → quiz-radio-group-rac-YCKwAv5G.js} +1 -1
- package/dist/component/{radio-button-module-classes-YEfiQQtW.js → radio-button-module-classes-2nfcqSJp.js} +15 -15
- package/dist/component/{radio-group-field-rac-DZWxn-QY.js → radio-group-field-rac-BBYaCpeZ.js} +4 -4
- package/dist/component/{radio-group-rac-DsL2Ttyk.js → radio-group-rac-fYuYtO48.js} +1 -1
- package/dist/component/{rating-input-field-rac-BioYAy-_.js → rating-input-field-rac-sPYk1nWc.js} +20 -20
- package/dist/component/{rating-input-rac-DahZMbKa.js → rating-input-rac-CiWqxkPO.js} +1 -1
- package/dist/component/{rich-content-rac.module-pvsjrr7Y.js → rich-content-rac.module-BjcbV5CK.js} +5 -5
- package/dist/component/{rich-text-field-rac-H-mxitKA.js → rich-text-field-rac-DY0vRG7M.js} +4 -4
- package/dist/component/{rich-text-rac-CPfXGilA.js → rich-text-rac-BngE_MAC.js} +1 -1
- package/dist/component/{service-dropdown-rac-C2qfLOFr.js → service-dropdown-rac-Db53P8Fm.js} +13 -13
- package/dist/component/{services-multi-choice-rac-D7-sJi_t.js → services-multi-choice-rac-Cr791rTd.js} +9 -9
- package/dist/component/{signature-rac-DuQuR2U3.js → signature-rac-BCNYIwad.js} +41 -41
- package/dist/component/{submit-button-rac-DrUDtzCX.js → submit-button-rac-CyyEQGsz.js} +10 -10
- package/dist/component/{tags-field-rac-D8gyv5Kk.js → tags-field-rac-k3HHiR5C.js} +24 -24
- package/dist/component/{tags-rac-Be588VqA.js → tags-rac-nOXYrsHv.js} +1 -1
- package/dist/component/{text-area-field-rac-hezqhMgQ.js → text-area-field-rac-CwpxShM0.js} +22 -22
- package/dist/component/{text-area-rac-B_KUlOes.js → text-area-rac-CkKcWyW5.js} +1 -1
- package/dist/component/{text-input-field-rac-BWRz4111.js → text-input-field-rac-DvIwNwn3.js} +3 -3
- package/dist/component/{text-input-headless-BUNQFfZw.js → text-input-headless-vfGxjFpa.js} +9 -9
- package/dist/component/{text-input-rac-DdfHXZ8B.js → text-input-rac-DoVI2HNp.js} +1 -1
- package/dist/component/{time-input-rac-CUTavG2g.js → time-input-rac-DPbbdnl3.js} +16 -16
- package/dist/component/{url-input-field-rac-CG5yrtux.js → url-input-field-rac-CiZi4oVe.js} +20 -20
- package/dist/component/{url-input-rac-DMw4tPKk.js → url-input-rac-C-IvLpA8.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CHW3T4PQ.js → use-dropdown-option-class-name-CMgoymWE.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-6UsjW0rS.js → use-dropdown-trigger-class-name-BH0PyTH_.js} +24 -24
- package/dist/component/{use-element-state-class-name-YRDhi6Zr.js → use-element-state-class-name-DiZjY9WE.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-arCOozPK.js → use-hoverable-input-class-name-QpNEvrdn.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-NJIAuz_W.js → use-is-forced-open-dropdown-CHh9nGJz.js} +4 -4
- package/dist/component/{use-service-options-base-nhf-7Ope.js → use-service-options-base-BGB82e2d.js} +4 -4
- package/dist/component/use-text-input-class-name-_CjB7lhB.js +6 -0
- package/package.json +2 -2
- package/dist/component/multiline-address-field-rac-Bgfked1m.js +0 -1664
- package/dist/component/use-text-input-class-name-C9496S5f.js +0 -6
package/dist/component/{number-input-field-rac-orHx_sCp.js → number-input-field-rac-BVdfzTwW.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as U } from "@wix/ricos/viewer";
|
|
2
2
|
import d from "classnames";
|
|
3
|
-
import t, { useState as
|
|
4
|
-
import { NumberField as
|
|
5
|
-
import {
|
|
3
|
+
import t, { useState as W, useCallback as X, useEffect as Y, useRef as $ } from "react";
|
|
4
|
+
import { NumberField as j, Input as v } from "react-aria-components";
|
|
5
|
+
import { bN as _, bK as S, bY as z, bP as G, bW as H, X as J, am as Z, M as w, I as ee } from "./form-cgY_BDTU.js";
|
|
6
6
|
import { c as y, g as x } from "./numeric-input-utils-CuBMi4-a.js";
|
|
7
7
|
import { f as p } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as re, E as te } from "./field-error-headless-
|
|
9
|
-
import { L as ne } from "./field-label-headless-
|
|
8
|
+
import { D as re, E as te } from "./field-error-headless-fX6PeZaI.js";
|
|
9
|
+
import { L as ne } from "./field-label-headless-CoLjciGG.js";
|
|
10
10
|
import { u as se } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as b } from "./field-rac.module-DcyJyi2B.js";
|
|
13
|
-
import { u as me } from "./use-text-input-class-name-
|
|
13
|
+
import { u as me } from "./use-text-input-class-name-_CjB7lhB.js";
|
|
14
14
|
const le = (r, { validation: s }) => {
|
|
15
15
|
const a = y(r.value.trim());
|
|
16
16
|
if (a === void 0)
|
|
@@ -19,50 +19,50 @@ const le = (r, { validation: s }) => {
|
|
|
19
19
|
return Math.min(Math.max(l, u ?? -1 / 0), o ?? 1 / 0);
|
|
20
20
|
}, e = ({ children: r }) => {
|
|
21
21
|
var D, L, R;
|
|
22
|
-
const { id: s, value: a, onChange: m, disabled: u, required: o, readOnly: l, onBlur: f, onFocus: E, FieldLayout: i, hasError: c, validation: n } = _(), { labelId:
|
|
22
|
+
const { id: s, value: a, onChange: m, disabled: u, required: o, readOnly: l, onBlur: f, onFocus: E, FieldLayout: i, hasError: c, validation: n } = _(), { labelId: h } = S(), F = ((D = n == null ? void 0 : n.number) == null ? void 0 : D.multipleOf) || 1, M = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, A = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, V = C(a), [g, I] = W(V), T = se(f), q = p(r, e.Label), k = p(r, e.Input), B = p(r, e.Description), P = p(r, e.Error), K = X((N) => {
|
|
23
23
|
if (N === void 0 || Number.isNaN(N)) {
|
|
24
24
|
m(""), I(NaN);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
const
|
|
27
|
+
const Q = x(F), O = Number(N.toFixed(Q));
|
|
28
28
|
m(O), I(O);
|
|
29
29
|
}, [
|
|
30
30
|
F,
|
|
31
31
|
m
|
|
32
32
|
]);
|
|
33
|
-
return
|
|
33
|
+
return Y(() => {
|
|
34
34
|
I(C(a));
|
|
35
35
|
}, [
|
|
36
36
|
a
|
|
37
37
|
]), /* @__PURE__ */ t.createElement(i, {
|
|
38
38
|
fieldId: s,
|
|
39
39
|
renderLabel: () => q,
|
|
40
|
-
renderInput: () => /* @__PURE__ */ t.createElement(
|
|
41
|
-
"aria-labelledby":
|
|
40
|
+
renderInput: () => /* @__PURE__ */ t.createElement(j, {
|
|
41
|
+
"aria-labelledby": h,
|
|
42
42
|
value: g,
|
|
43
|
-
onChange:
|
|
43
|
+
onChange: K,
|
|
44
44
|
isDisabled: u,
|
|
45
45
|
isRequired: o,
|
|
46
46
|
isReadOnly: l,
|
|
47
47
|
isInvalid: c,
|
|
48
48
|
onBlur: T,
|
|
49
49
|
onFocus: E,
|
|
50
|
-
minValue:
|
|
51
|
-
maxValue:
|
|
50
|
+
minValue: A ?? void 0,
|
|
51
|
+
maxValue: M ?? void 0
|
|
52
52
|
}, k),
|
|
53
53
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, P, B)
|
|
54
54
|
});
|
|
55
55
|
}, ue = ({ className: r }) => {
|
|
56
56
|
var c;
|
|
57
|
-
const { t: s } =
|
|
57
|
+
const { t: s } = z(), { inputId: a, ariaDescribedBy: m } = S(), { id: u, placeholder: o, validation: l, label: f, required: E } = _();
|
|
58
58
|
(c = l == null ? void 0 : l.number) != null && c.multipleOf;
|
|
59
|
-
const i =
|
|
60
|
-
return
|
|
59
|
+
const i = $(null);
|
|
60
|
+
return G(() => {
|
|
61
61
|
var n;
|
|
62
62
|
(n = i.current) == null || n.focus({
|
|
63
63
|
preventScroll: !0
|
|
64
64
|
});
|
|
65
|
-
}, u),
|
|
65
|
+
}, u), H(i, le), /* @__PURE__ */ t.createElement(v, {
|
|
66
66
|
ref: i,
|
|
67
67
|
id: a,
|
|
68
68
|
"aria-describedby": m,
|
|
@@ -78,13 +78,13 @@ e.Label = ne;
|
|
|
78
78
|
e.Input = ue;
|
|
79
79
|
e.Description = re;
|
|
80
80
|
e.Error = te;
|
|
81
|
-
const C = (r) => y(r) ?? NaN, oe = ({ content: r, locale: s }) => /* @__PURE__ */ t.createElement(
|
|
81
|
+
const C = (r) => y(r) ?? NaN, oe = ({ content: r, locale: s }) => /* @__PURE__ */ t.createElement(U, {
|
|
82
82
|
content: r,
|
|
83
83
|
locale: s
|
|
84
84
|
}), Oe = () => {
|
|
85
85
|
const r = me();
|
|
86
86
|
return /* @__PURE__ */ t.createElement(e, null, /* @__PURE__ */ t.createElement(e.Label, {
|
|
87
|
-
className: d(
|
|
87
|
+
className: d(J, b.label)
|
|
88
88
|
}, /* @__PURE__ */ t.createElement(e.Label.Required, {
|
|
89
89
|
className: d(Z, b.requiredMark)
|
|
90
90
|
})), /* @__PURE__ */ t.createElement(e.Input, {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import e, { useState as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import e, { useState as S, useRef as x } from "react";
|
|
2
|
+
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import { TextField as q, Group as U, Input as
|
|
4
|
+
import { bN as E, bK as I, bP as A, bW as B, bY as P, X as V, am as v, M, I as k } from "./form-cgY_BDTU.js";
|
|
5
|
+
import { TextField as q, Group as U, Input as W, Button as j } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as Z } from "./field-label-headless-
|
|
7
|
+
import { D as H, E as K } from "./field-error-headless-fX6PeZaI.js";
|
|
8
|
+
import { L as Z } from "./field-label-headless-CoLjciGG.js";
|
|
9
9
|
import { E as G } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
-
import { H as
|
|
10
|
+
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-DcyJyi2B.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as X } from "./use-text-input-class-name-_CjB7lhB.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: y, FieldLayout: _ } = E(), { labelId: R } = I(), [D, F] =
|
|
14
|
+
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, autoComplete: y, FieldLayout: _ } = E(), { labelId: R } = I(), [D, F] = S(!1), L = u(o, t.Label), T = u(o, t.Control), h = u(o, t.Description), w = u(o, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(_, {
|
|
16
16
|
fieldId: l,
|
|
17
17
|
renderLabel: () => L,
|
|
@@ -29,11 +29,11 @@ const t = ({ children: o, className: r }) => {
|
|
|
29
29
|
className: r
|
|
30
30
|
}, b(T, {
|
|
31
31
|
isVisible: D,
|
|
32
|
-
onToggleVisibility: () => F((
|
|
32
|
+
onToggleVisibility: () => F((N) => !N)
|
|
33
33
|
})),
|
|
34
34
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, h, w)
|
|
35
35
|
});
|
|
36
|
-
},
|
|
36
|
+
}, Y = ({ 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(U, {
|
|
39
39
|
className: r,
|
|
@@ -46,13 +46,13 @@ const t = ({ children: o, className: r }) => {
|
|
|
46
46
|
onToggleVisibility: c
|
|
47
47
|
}));
|
|
48
48
|
}, $ = ({ className: o, ...r }) => {
|
|
49
|
-
const { isVisible: l } = r, { id: s, placeholder: c } = E(), { inputId: n, ariaDescribedBy: m } = I(), a =
|
|
50
|
-
return
|
|
49
|
+
const { isVisible: l } = r, { id: s, placeholder: c } = E(), { inputId: n, ariaDescribedBy: m } = I(), a = x(null);
|
|
50
|
+
return A(() => {
|
|
51
51
|
var i;
|
|
52
52
|
(i = a.current) == null || i.focus({
|
|
53
53
|
preventScroll: !0
|
|
54
54
|
});
|
|
55
|
-
}, s),
|
|
55
|
+
}, s), B(a), /* @__PURE__ */ e.createElement(W, {
|
|
56
56
|
ref: a,
|
|
57
57
|
id: n,
|
|
58
58
|
type: l ? "text" : "password",
|
|
@@ -62,7 +62,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
62
62
|
});
|
|
63
63
|
}, z = ({ 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(j, {
|
|
66
66
|
type: "button",
|
|
67
67
|
isDisabled: a,
|
|
68
68
|
onPress: m,
|
|
@@ -74,12 +74,12 @@ const t = ({ children: o, className: r }) => {
|
|
|
74
74
|
}));
|
|
75
75
|
};
|
|
76
76
|
t.Label = Z;
|
|
77
|
-
t.Control =
|
|
77
|
+
t.Control = Y;
|
|
78
78
|
t.Input = $;
|
|
79
79
|
t.Toggle = z;
|
|
80
|
-
t.Description =
|
|
81
|
-
t.Error =
|
|
82
|
-
const
|
|
80
|
+
t.Description = H;
|
|
81
|
+
t.Error = K;
|
|
82
|
+
const J = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
83
83
|
viewBox: "0 0 24 24",
|
|
84
84
|
width: "20",
|
|
85
85
|
height: "20",
|
|
@@ -117,25 +117,25 @@ const Y = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
117
117
|
})), te = "_control_1malj_1", oe = "_toggleButton_1malj_15", g = {
|
|
118
118
|
control: te,
|
|
119
119
|
toggleButton: oe
|
|
120
|
-
}, re = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(
|
|
120
|
+
}, re = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(O, {
|
|
121
121
|
content: o,
|
|
122
122
|
locale: r
|
|
123
123
|
}), se = () => {
|
|
124
|
-
const { t: o } =
|
|
124
|
+
const { t: o } = P(), r = X(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
|
-
className: d(
|
|
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, Q)
|
|
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
|
-
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(ee, null) : /* @__PURE__ */ e.createElement(
|
|
138
|
-
className: d(
|
|
137
|
+
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(ee, null) : /* @__PURE__ */ e.createElement(J, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
138
|
+
className: d(M, p.error)
|
|
139
139
|
}, /* @__PURE__ */ e.createElement(G, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
140
140
|
className: d(k, p.description)
|
|
141
141
|
}, re));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import r, { useCallback as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import r, { useCallback as V, useRef as Q } from "react";
|
|
2
|
+
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
4
|
+
import { TextField as Y, Group as j, Input as w } from "react-aria-components";
|
|
5
|
+
import { bN as R, bK as D, bF as M, bY as z, bP as J, X as W, am as Z, M as ee, I as re } from "./form-cgY_BDTU.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-fX6PeZaI.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-CoLjciGG.js";
|
|
9
|
+
import { f as L, 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-DcyJyi2B.js";
|
|
14
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
14
|
+
import { u as ie } from "./use-text-input-class-name-_CjB7lhB.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
@@ -19,70 +19,70 @@ function ue(e, t) {
|
|
|
19
19
|
quantity: 1
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function h(e) {
|
|
23
23
|
if (e == null || e === "")
|
|
24
24
|
return;
|
|
25
25
|
const t = Number(String(e).replace(/,/g, "."));
|
|
26
26
|
return Number.isNaN(t) ? void 0 : t;
|
|
27
27
|
}
|
|
28
28
|
const n = ({ children: e }) => {
|
|
29
|
-
var O, g, A,
|
|
30
|
-
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: b, hasError: y, onBlur: o, onFocus:
|
|
31
|
-
sourceValue:
|
|
32
|
-
format: (l) =>
|
|
29
|
+
var O, g, A, P;
|
|
30
|
+
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: b, hasError: y, onBlur: o, onFocus: E, FieldLayout: T, validation: C } = R(), { labelId: q, prefixId: G } = 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], F = (P = a == null ? void 0 : a.at(0)) == null ? void 0 : P.price, [_, I] = oe({
|
|
31
|
+
sourceValue: F,
|
|
32
|
+
format: (l) => L(String(l ?? ""), c),
|
|
33
33
|
regionalFormat: c
|
|
34
|
-
}), $ =
|
|
35
|
-
const l =
|
|
34
|
+
}), $ = V(() => {
|
|
35
|
+
const l = L(_, c);
|
|
36
36
|
I(l || ""), o == null || o();
|
|
37
37
|
}, [
|
|
38
|
-
|
|
38
|
+
_,
|
|
39
39
|
c,
|
|
40
40
|
o,
|
|
41
41
|
I
|
|
42
|
-
]), v =
|
|
42
|
+
]), v = V((l) => {
|
|
43
43
|
I(l);
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
if (
|
|
44
|
+
const N = h(L(l, c)), K = h(F);
|
|
45
|
+
if (N !== K) {
|
|
46
|
+
if (N === void 0) {
|
|
47
47
|
s(null);
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
s([
|
|
51
|
-
ue(S,
|
|
51
|
+
ue(S, N)
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
54
|
}, [
|
|
55
55
|
s,
|
|
56
56
|
S,
|
|
57
57
|
c,
|
|
58
|
-
|
|
58
|
+
F,
|
|
59
59
|
I
|
|
60
60
|
]), B = i(e, n.Label), U = i(e, n.Input), k = i(e, n.Description), H = i(e, n.Error);
|
|
61
61
|
return /* @__PURE__ */ r.createElement(T, {
|
|
62
62
|
fieldId: t,
|
|
63
63
|
renderLabel: () => B,
|
|
64
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
64
|
+
renderInput: () => /* @__PURE__ */ r.createElement(Y, {
|
|
65
65
|
"aria-labelledby": `${q} ${G}`,
|
|
66
|
-
value: a ?
|
|
66
|
+
value: a ? _ : "",
|
|
67
67
|
onChange: v,
|
|
68
68
|
isDisabled: u,
|
|
69
69
|
isReadOnly: m,
|
|
70
70
|
isRequired: b,
|
|
71
71
|
isInvalid: y,
|
|
72
72
|
onBlur: $,
|
|
73
|
-
onFocus:
|
|
73
|
+
onFocus: E
|
|
74
74
|
}, U),
|
|
75
75
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, k)
|
|
76
76
|
});
|
|
77
|
-
},
|
|
78
|
-
const { disabled: a, hasError: s } = R(), u = i(e,
|
|
79
|
-
return /* @__PURE__ */ r.createElement(
|
|
77
|
+
}, f = ({ children: e, className: t }) => {
|
|
78
|
+
const { disabled: a, hasError: s } = R(), u = i(e, f.Currency), m = i(e, f.Value);
|
|
79
|
+
return /* @__PURE__ */ r.createElement(j, {
|
|
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 } = z(), { 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 } = R(), { inputId: u, labelId: m, prefixId: b, ariaDescribedBy: y } = D(), o =
|
|
94
|
-
return
|
|
95
|
-
var
|
|
96
|
-
(
|
|
93
|
+
const { id: t, placeholder: a, label: s } = R(), { inputId: u, labelId: m, prefixId: b, ariaDescribedBy: y } = D(), o = Q(null);
|
|
94
|
+
return J(() => {
|
|
95
|
+
var E;
|
|
96
|
+
(E = o.current) == null || E.focus({
|
|
97
97
|
preventScroll: !0
|
|
98
98
|
});
|
|
99
|
-
}, t), /* @__PURE__ */ r.createElement(
|
|
99
|
+
}, t), /* @__PURE__ */ r.createElement(w, {
|
|
100
100
|
ref: o,
|
|
101
101
|
id: u,
|
|
102
102
|
className: e,
|
|
@@ -108,36 +108,36 @@ const n = ({ children: e }) => {
|
|
|
108
108
|
autoComplete: "off"
|
|
109
109
|
});
|
|
110
110
|
};
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
f.Currency = me;
|
|
112
|
+
f.Value = pe;
|
|
113
113
|
n.Label = ae;
|
|
114
|
-
n.Input =
|
|
114
|
+
n.Input = f;
|
|
115
115
|
n.Description = te;
|
|
116
116
|
n.Error = ne;
|
|
117
|
-
const de = "_inputGroup_vuy4u_1",
|
|
117
|
+
const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", x = {
|
|
118
118
|
inputGroup: de,
|
|
119
|
-
currency:
|
|
120
|
-
},
|
|
119
|
+
currency: fe
|
|
120
|
+
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(X, {
|
|
121
121
|
content: e,
|
|
122
122
|
locale: t
|
|
123
123
|
}), Ie = () => {
|
|
124
|
-
const e = ie(
|
|
124
|
+
const e = ie(x.inputGroup);
|
|
125
125
|
return /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(n.Label, {
|
|
126
|
-
className: p(
|
|
126
|
+
className: p(W, d.label)
|
|
127
127
|
}, /* @__PURE__ */ r.createElement(n.Label.Required, {
|
|
128
128
|
className: p(Z, d.requiredMark)
|
|
129
129
|
})), /* @__PURE__ */ r.createElement(n.Input, {
|
|
130
130
|
className: e
|
|
131
131
|
}, /* @__PURE__ */ r.createElement(n.Input.Currency, {
|
|
132
|
-
className:
|
|
132
|
+
className: x.currency
|
|
133
133
|
}), /* @__PURE__ */ r.createElement(n.Input.Value, {
|
|
134
134
|
className: p(d.innerInput, ce)
|
|
135
135
|
})), /* @__PURE__ */ r.createElement(n.Error, {
|
|
136
136
|
className: p(ee, d.error)
|
|
137
137
|
}, /* @__PURE__ */ r.createElement(le, null), /* @__PURE__ */ r.createElement(n.Error.Text, null)), /* @__PURE__ */ r.createElement(n.Description, {
|
|
138
138
|
className: p(re, d.description)
|
|
139
|
-
},
|
|
140
|
-
},
|
|
139
|
+
}, Ee));
|
|
140
|
+
}, Ve = () => /* @__PURE__ */ r.createElement(Ie, null);
|
|
141
141
|
export {
|
|
142
|
-
|
|
142
|
+
Ve as PaymentInputRAC
|
|
143
143
|
};
|