@wix/form-elements 1.172.0 → 1.173.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-DZ0SFXmL.js → appointment-rac-DIV9zgmZ.js} +80 -80
- package/dist/component/{bookings-address-rac-BW9grc77.js → bookings-address-rac-C5cT4gkX.js} +1 -1
- package/dist/component/{bookings-email-rac-D8gMaAfB.js → bookings-email-rac-CQEhRS7N.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CAjcs7b6.js → bookings-first-name-rac-BwdasJXd.js} +1 -1
- package/dist/component/{bookings-header-rac-BhKZ1kku.js → bookings-header-rac-CWzKq3yr.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DpsMDuU0.js → bookings-last-name-rac-CoVWqEy5.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BVdWmKS8.js → bookings-login-bar-rac-DwoI-iRQ.js} +4 -4
- package/dist/component/{bookings-phone-rac-DsqNi2mI.js → bookings-phone-rac-WAZU-1kD.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-elM4Ne3f.js → bookings-rich-text-rac-I5Uo-q87.js} +1 -1
- package/dist/component/{checkbox-field-rac-BU4E73fD.js → checkbox-field-rac-CKbKBNcQ.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-6yJdIbP2.js → checkbox-group-field-headless-7PMj-zW6.js} +47 -47
- package/dist/component/{checkbox-group-field-rac-CojbCWSF.js → checkbox-group-field-rac-BZ-YgEYR.js} +4 -4
- package/dist/component/{checkbox-group-rac-3qUVUc-C.js → checkbox-group-rac-CED8h4qI.js} +1 -1
- package/dist/component/{checkbox-rac-DwbTapd_.js → checkbox-rac-CbpEXMBz.js} +1 -1
- package/dist/component/{contacts-address-rac-BL7XDZuP.js → contacts-address-rac-F3Ui7iJu.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DeJYIHAg.js → contacts-birthdate-rac-CcxRV3RQ.js} +1 -1
- package/dist/component/{contacts-company-rac-BeImf5uc.js → contacts-company-rac-mDY20HzW.js} +1 -1
- package/dist/component/{contacts-email-rac-CtacwrZ0.js → contacts-email-rac-CoBPNuCj.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CAdOqOOA.js → contacts-first-name-rac-DzbpBmNm.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Db9mHzCW.js → contacts-last-name-rac-DEmV-MNE.js} +1 -1
- package/dist/component/{contacts-phone-rac-W0OLEbzL.js → contacts-phone-rac-BlEpatWP.js} +1 -1
- package/dist/component/{contacts-position-rac-CV4Ibt4Z.js → contacts-position-rac-DlZahRQc.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CQ3Q1pjZ.js → contacts-subscribe-rac-LXCEPvXl.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-Dux-pk6r.js → contacts-tax-id-rac-DS0SDAtC.js} +1 -1
- package/dist/component/{date-availability-RkX-Qw7G.js → date-availability-DTFyrU8J.js} +1 -1
- package/dist/component/{date-input-field-rac-CYCT6qoa.js → date-input-field-rac-D7Pv-hqW.js} +62 -62
- package/dist/component/{date-input-rac-BkYZ7q_o.js → date-input-rac-BEsh54Gz.js} +1 -1
- package/dist/component/{date-picker-field-rac-eMidYtsl.js → date-picker-field-rac-DJirD93a.js} +15 -15
- package/dist/component/{date-picker-rac-D23rxZcF.js → date-picker-rac-B1fUqj_w.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BjIj4dXQ.js → date-time-input-field-rac-CPFaQUXF.js} +38 -38
- package/dist/component/{date-time-input-rac-BSGAdk9L.js → date-time-input-rac-CAozBO0e.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Xmb5IKrb.js → dext-checkbox-group-rac-B0yqJoj8.js} +2 -2
- package/dist/component/{dext-checkbox-rac-2eA7y0ld.js → dext-checkbox-rac-yZaUdHz1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CmLxVGGT.js → dext-date-picker-rac-AJ7XIW-h.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Cd9nwSjb.js → dext-date-time-input-rac-CPs79sUY.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BKdQ0nGS.js → dext-dropdown-rac-W2QzqPG4.js} +1 -1
- package/dist/component/{dext-email-rac-07zDPxyf.js → dext-email-rac-CCW1Dk1m.js} +1 -1
- package/dist/component/{dext-number-input-rac-DRvGuppY.js → dext-number-input-rac-BAInaxoF.js} +1 -1
- package/dist/component/{dext-phone-rac-CKtTVjFg.js → dext-phone-rac-CYYgZiFW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BsBmMufq.js → dext-radio-group-rac-Dqvmxoai.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CcFSTAIh.js → dext-rating-input-rac-CWl7X0zW.js} +1 -1
- package/dist/component/{dext-tags-rac-CCTDlCvX.js → dext-tags-rac-BpAfPh55.js} +2 -2
- package/dist/component/{dext-text-area-rac-Cif8po9h.js → dext-text-area-rac-CLTg8XXH.js} +1 -1
- package/dist/component/{dext-text-input-rac-2118X4iF.js → dext-text-input-rac-BV-F-ZsP.js} +1 -1
- package/dist/component/{dext-url-input-rac-DDImGkQe.js → dext-url-input-rac-B9wHRaZr.js} +1 -1
- package/dist/component/{donation-rac-Dnylss1d.js → donation-rac-Be4swKWD.js} +50 -50
- package/dist/component/{dropdown-field-rac-DDI4ZgZH.js → dropdown-field-rac-BFEB_WuX.js} +3 -3
- package/dist/component/{dropdown-rac-DX0Z3R_8.js → dropdown-rac-Dz7QtFVB.js} +1 -1
- package/dist/component/{ecom-address-rac-D9MeEQsk.js → ecom-address-rac-Bu6msDgo.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DKJ9j5dj.js → ecom-subscription-checkbox-rac-BRovQqrM.js} +2 -2
- package/dist/component/{email-input-field-rac-DaKrmlwe.js → email-input-field-rac-EERVxm6G.js} +42 -42
- package/dist/component/{events-repeater-rac-DWrOLT0Y.js → events-repeater-rac-xs0pooBs.js} +49 -49
- package/dist/component/{events-rsvp-rac-YBTR1tR0.js → events-rsvp-rac-CMi-8EqK.js} +3 -3
- package/dist/component/{field-error-headless-jksFrezt.js → field-error-headless-DbFXeaud.js} +8 -8
- package/dist/component/{field-label-headless-BBvJAVxI.js → field-label-headless-CWOYHPsb.js} +11 -11
- package/dist/component/{file-upload-rac-CgdmfUZG.js → file-upload-rac-vbMTIdDc.js} +61 -61
- package/dist/component/{fixed-payment-rac-v6rKwzFs.js → fixed-payment-rac-BRk7ams_.js} +7 -7
- package/dist/component/{form-BsiK682r.js → form-BjeODFzx.js} +238 -237
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BuXybl7K.js → header-field-rac-CQexwZn7.js} +2 -2
- package/dist/component/{header-rac-CDyaLosW.js → header-rac-CYbPDl4_.js} +1 -1
- package/dist/component/{image-choice-rac-BRlMroBw.js → image-choice-rac-DDvlaK6K.js} +15 -15
- package/dist/component/{index-BanOeCAF.js → index-B6wFpWpe.js} +4 -4
- package/dist/component/{index-y9URYGEE.js → index-Bs9ypEe2.js} +6 -6
- package/dist/component/{isObjectLike-BG9nJ-rx.js → isObjectLike-Xcw2hQQ6.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DRAkxI1l.js → multiline-address-field-rac-CYJR-MUz.js} +209 -209
- package/dist/component/{multiline-address-rac-JjTzWsEb.js → multiline-address-rac-DO1j_w6S.js} +1 -1
- package/dist/component/{number-input-field-rac-QrouG7Hv.js → number-input-field-rac-C-qvd8v9.js} +18 -18
- package/dist/component/{number-input-rac-DGmE7cLv.js → number-input-rac-CQSaifZE.js} +1 -1
- package/dist/component/{password-rac-DeyY228m.js → password-rac-CqnbZtR_.js} +28 -28
- package/dist/component/{payment-input-rac-DmIennLi.js → payment-input-rac-CbOcztkp.js} +28 -28
- package/dist/component/{phone-input-field-rac-F7e74TGA.js → phone-input-field-rac-BQ187I2C.js} +55 -55
- package/dist/component/{phone-rac-CQfB2CQD.js → phone-rac-CbA2xqF3.js} +1 -1
- package/dist/component/{product-list-rac--GGG8vvO.js → product-list-rac-MxB9tRiE.js} +103 -103
- package/dist/component/{quiz-radio-group-rac-DF2C2vNq.js → quiz-radio-group-rac-IViaDVRW.js} +1 -1
- package/dist/component/{radio-button-module-classes-DmpNo6F2.js → radio-button-module-classes-jtnooKMO.js} +33 -33
- package/dist/component/{radio-group-field-rac-BGcPYfKO.js → radio-group-field-rac-g3SQGJPp.js} +4 -4
- package/dist/component/{radio-group-rac-CqysUMCE.js → radio-group-rac-D8wmzlbu.js} +1 -1
- package/dist/component/{rating-input-field-rac-D-ei917Y.js → rating-input-field-rac-BqPXKKdi.js} +15 -15
- package/dist/component/{rating-input-rac-a9zJ74fw.js → rating-input-rac-CeZIpOmm.js} +1 -1
- package/dist/component/{rich-content-rac.module-CvyLVlXL.js → rich-content-rac.module-BLgdpRh_.js} +5 -5
- package/dist/component/{rich-text-field-rac-vf19nvyw.js → rich-text-field-rac-BpSVobCQ.js} +6 -6
- package/dist/component/{rich-text-rac-Cx_wpoxC.js → rich-text-rac-DqpaqbFH.js} +1 -1
- package/dist/component/{service-dropdown-rac-DITzKQxd.js → service-dropdown-rac-DKgtga1t.js} +30 -30
- package/dist/component/{services-multi-choice-rac-BtisN0Aq.js → services-multi-choice-rac-CAyB0b4q.js} +9 -9
- package/dist/component/{signature-rac-DUeIoS5O.js → signature-rac-DC20YN4f.js} +97 -97
- package/dist/component/{submit-button-rac-C8h6zeTw.js → submit-button-rac-ClWtqIkR.js} +30 -30
- package/dist/component/{tags-field-rac-CjFuiB0n.js → tags-field-rac-DHM9k8uf.js} +18 -18
- package/dist/component/{tags-rac-BO7rwyLl.js → tags-rac-Clg50jwY.js} +1 -1
- package/dist/component/{text-area-field-rac-CgUx3nQ0.js → text-area-field-rac-B2qJZ6wR.js} +16 -16
- package/dist/component/{text-area-rac-WgXYXIaf.js → text-area-rac-BwsVk7u7.js} +1 -1
- package/dist/component/{text-input-field-rac-DaxWFha-.js → text-input-field-rac-BQbo-3Ly.js} +6 -6
- package/dist/component/{text-input-headless-hjuRJTZN.js → text-input-headless-WICGIHcN.js} +3 -3
- package/dist/component/{text-input-rac-BzumrJBj.js → text-input-rac-D7BRYDZr.js} +1 -1
- package/dist/component/{time-input-rac-2FEkpQ7M.js → time-input-rac-Dnp-0_Js.js} +22 -22
- package/dist/component/{url-input-field-rac-BZ9f8D8I.js → url-input-field-rac-MC13zKST.js} +19 -19
- package/dist/component/{url-input-rac-D-AVlxkD.js → url-input-rac-DfAtTmKv.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DwAAtzgX.js → use-dropdown-option-class-name-CVUEosg4.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-D-6n9YVG.js → use-dropdown-trigger-class-name-BHLG7EB-.js} +25 -25
- package/dist/component/{use-element-state-class-name-C5auxwhj.js → use-element-state-class-name-BVJylHPn.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-Nd2jqfz4.js → use-hoverable-input-class-name-DO9ctJ81.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-CKaHhCqp.js → use-is-forced-open-dropdown-Czuo32Nq.js} +8 -8
- package/dist/component/{use-service-options-base-CvluFheT.js → use-service-options-base-DUuGIm38.js} +1 -1
- package/dist/component/use-text-input-class-name-LEnNGX0a.js +6 -0
- package/package.json +2 -2
- package/dist/component/use-text-input-class-name-DGTlYJxC.js +0 -6
package/dist/component/{number-input-field-rac-QrouG7Hv.js → number-input-field-rac-C-qvd8v9.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 Q, useCallback as U, useEffect as X, useRef as $ } from "react";
|
|
4
|
+
import { NumberField as j, Input as z } from "react-aria-components";
|
|
5
|
+
import { bL as _, bI as S, bV as G, bN as H, X as J, am as K, M as W, I as Y } from "./form-BjeODFzx.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-DbFXeaud.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-CWOYHPsb.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-ts2t4WUO.js";
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-LEnNGX0a.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
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: y } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, A = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum,
|
|
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: y } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, A = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, V = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, g = O(s), [x, I] = Q(g), M = ne(E), T = c(t, e.Label), h = c(t, e.Input), q = c(t, e.Description), k = c(t, e.Error), B = U((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -24,14 +24,14 @@ const e = ({ children: t }) => {
|
|
|
24
24
|
D,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return X(() => {
|
|
28
28
|
I(O(s));
|
|
29
29
|
}, [
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
32
32
|
fieldId: a,
|
|
33
|
-
renderLabel: () =>
|
|
34
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
33
|
+
renderLabel: () => T,
|
|
34
|
+
renderInput: () => /* @__PURE__ */ r.createElement(j, {
|
|
35
35
|
"aria-labelledby": y,
|
|
36
36
|
value: x,
|
|
37
37
|
onChange: B,
|
|
@@ -39,24 +39,24 @@ const e = ({ children: t }) => {
|
|
|
39
39
|
isRequired: b,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: u,
|
|
42
|
-
onBlur:
|
|
42
|
+
onBlur: M,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
44
|
+
minValue: V ?? void 0,
|
|
45
45
|
maxValue: A ?? void 0
|
|
46
46
|
}, h),
|
|
47
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 } = G(), { 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 = $(null);
|
|
54
|
+
return H(() => {
|
|
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(z, {
|
|
60
60
|
ref: m,
|
|
61
61
|
id: s,
|
|
62
62
|
"aria-describedby": l,
|
|
@@ -78,9 +78,9 @@ const O = (t) => te(t) ?? NaN, oe = ({ content: t, locale: a }) => /* @__PURE__
|
|
|
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(J, p.label)
|
|
82
82
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
83
|
-
className: i(
|
|
83
|
+
className: i(K, p.requiredMark)
|
|
84
84
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
85
85
|
className: t
|
|
86
86
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as h, 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 U, Button as
|
|
4
|
+
import { bL as E, bI as I, bN as A, bV as B, X as V, am as v, M, I as P } from "./form-BjeODFzx.js";
|
|
5
|
+
import { TextField as k, Group as q, Input as U, 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 W } from "./field-error-headless-DbFXeaud.js";
|
|
8
|
+
import { L as Z } from "./field-label-headless-CWOYHPsb.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-ts2t4WUO.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as X } from "./use-text-input-class-name-LEnNGX0a.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: _, FieldLayout: y } = E(), { labelId:
|
|
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: L } = I(), [R, D] = h(!1), F = u(o, t.Label), T = u(o, t.Control), w = u(o, t.Description), N = u(o, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(y, {
|
|
16
16
|
fieldId: l,
|
|
17
|
-
renderLabel: () =>
|
|
17
|
+
renderLabel: () => F,
|
|
18
18
|
renderInput: () => /* @__PURE__ */ e.createElement(k, {
|
|
19
19
|
autoComplete: _,
|
|
20
|
-
"aria-labelledby":
|
|
20
|
+
"aria-labelledby": L,
|
|
21
21
|
value: s ?? "",
|
|
22
22
|
onChange: c,
|
|
23
23
|
isDisabled: n,
|
|
@@ -28,12 +28,12 @@ const t = ({ children: o, className: r }) => {
|
|
|
28
28
|
onFocus: C,
|
|
29
29
|
className: r
|
|
30
30
|
}, b(T, {
|
|
31
|
-
isVisible:
|
|
32
|
-
onToggleVisibility: () =>
|
|
31
|
+
isVisible: R,
|
|
32
|
+
onToggleVisibility: () => D((S) => !S)
|
|
33
33
|
})),
|
|
34
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w,
|
|
34
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w, N)
|
|
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,7 +45,7 @@ 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
50
|
return A(() => {
|
|
51
51
|
var i;
|
|
@@ -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(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 =
|
|
78
|
-
t.Input =
|
|
79
|
-
t.Toggle =
|
|
80
|
-
t.Description =
|
|
77
|
+
t.Control = $;
|
|
78
|
+
t.Input = z;
|
|
79
|
+
t.Toggle = J;
|
|
80
|
+
t.Description = H;
|
|
81
81
|
t.Error = W;
|
|
82
|
-
const
|
|
82
|
+
const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
83
83
|
viewBox: "0 0 24 24",
|
|
84
84
|
width: "20",
|
|
85
85
|
height: "20",
|
|
@@ -121,21 +121,21 @@ const J = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
121
121
|
content: o,
|
|
122
122
|
locale: r
|
|
123
123
|
}), re = () => {
|
|
124
|
-
const { t: o } = B(), r =
|
|
124
|
+
const { t: o } = B(), 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(Y, null) : /* @__PURE__ */ e.createElement(
|
|
138
|
-
className: d(
|
|
137
|
+
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(Y, null) : /* @__PURE__ */ e.createElement(K, 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(P, p.description)
|
|
141
141
|
}, oe));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import r, { useCallback as P, useRef as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import r, { useCallback as P, useRef as X } from "react";
|
|
2
|
+
import { RicosViewer as j } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
4
|
+
import { TextField as w, Group as z, Input as J } from "react-aria-components";
|
|
5
|
+
import { bL as D, bI as R, bD as M, bV as K, bN as W, X as Y, am as Z, M as ee, I as re } from "./form-BjeODFzx.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-
|
|
7
|
+
import { D as te, E as ne } from "./field-error-headless-DbFXeaud.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-CWOYHPsb.js";
|
|
9
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-ts2t4WUO.js";
|
|
14
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
14
|
+
import { u as ie } from "./use-text-input-class-name-LEnNGX0a.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
@@ -19,15 +19,15 @@ 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,
|
|
30
|
-
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: b, hasError: y, onBlur: o, onFocus: E, FieldLayout: T, validation: C } =
|
|
29
|
+
var O, g, V, A;
|
|
30
|
+
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: b, hasError: y, onBlur: o, onFocus: E, FieldLayout: T, validation: C } = D(), { labelId: q, prefixId: G } = R(), { regionalFormat: c } = M(), S = (V = (g = (O = C == null ? void 0 : C.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : g.products) == null ? void 0 : V[0], _ = (A = a == null ? void 0 : a.at(0)) == null ? void 0 : A.price, [F, I] = oe({
|
|
31
31
|
sourceValue: _,
|
|
32
32
|
format: (l) => N(String(l ?? ""), c),
|
|
33
33
|
regionalFormat: c
|
|
@@ -39,10 +39,10 @@ const n = ({ children: e }) => {
|
|
|
39
39
|
c,
|
|
40
40
|
o,
|
|
41
41
|
I
|
|
42
|
-
]),
|
|
42
|
+
]), v = P((l) => {
|
|
43
43
|
I(l);
|
|
44
|
-
const L =
|
|
45
|
-
if (L !==
|
|
44
|
+
const L = h(N(l, c)), Q = h(_);
|
|
45
|
+
if (L !== Q) {
|
|
46
46
|
if (L === void 0) {
|
|
47
47
|
s(null);
|
|
48
48
|
return;
|
|
@@ -57,32 +57,32 @@ const n = ({ children: e }) => {
|
|
|
57
57
|
c,
|
|
58
58
|
_,
|
|
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
|
-
renderLabel: () =>
|
|
64
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
63
|
+
renderLabel: () => B,
|
|
64
|
+
renderInput: () => /* @__PURE__ */ r.createElement(w, {
|
|
65
65
|
"aria-labelledby": `${q} ${G}`,
|
|
66
66
|
value: a ? F : "",
|
|
67
|
-
onChange:
|
|
67
|
+
onChange: v,
|
|
68
68
|
isDisabled: u,
|
|
69
69
|
isReadOnly: m,
|
|
70
70
|
isRequired: b,
|
|
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 } = D(), u = i(e, f.Currency), m = i(e, f.Value);
|
|
79
|
+
return /* @__PURE__ */ r.createElement(z, {
|
|
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 } = K(), { prefixId: s } = R();
|
|
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 } = D(), { inputId: u, labelId: m, prefixId: b, ariaDescribedBy: y } = R(), o = X(null);
|
|
94
94
|
return W(() => {
|
|
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(J, {
|
|
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", x = {
|
|
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(j, {
|
|
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
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", h = {
|
|
|
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, {
|