@wix/form-elements 1.89.0 → 1.90.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-DG8GUJpn.js → appointment-rac-DtPa-JZ9.js} +6 -6
- package/dist/component/{bookings-address-rac-cNBSx-Pr.js → bookings-address-rac-4l8kqoLi.js} +1 -1
- package/dist/component/{bookings-email-rac-CYdSoVWP.js → bookings-email-rac-76vUcGtU.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CQB2o8ww.js → bookings-first-name-rac-IS7LUMxg.js} +1 -1
- package/dist/component/{bookings-header-rac-CzKvQond.js → bookings-header-rac-2wTzY64_.js} +1 -1
- package/dist/component/{bookings-last-name-rac-oK1BC5Am.js → bookings-last-name-rac-nxA75igv.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CZNEy748.js → bookings-login-bar-rac-CRi1nntD.js} +21 -21
- package/dist/component/{bookings-phone-rac-D_4WfolC.js → bookings-phone-rac-DZjvHly0.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CrEfeL4P.js → bookings-rich-text-rac-CYn1wwYQ.js} +1 -1
- package/dist/component/{checkbox-field-rac-CGqshW45.js → checkbox-field-rac-DAcFLQNT.js} +49 -49
- package/dist/component/{checkbox-group-field-headless-C3_5IR-E.js → checkbox-group-field-headless-BJmS0Ce5.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DIzdgyAw.js → checkbox-group-field-rac-CeFUt2Nr.js} +9 -9
- package/dist/component/{checkbox-group-rac-EvWVfusV.js → checkbox-group-rac-eDChVoVP.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-Bb3xB1ve.js → checkbox-indicator-module-classes-mJ7hl_8K.js} +1 -1
- package/dist/component/{checkbox-rac-CT_69Jei.js → checkbox-rac-DGmZdPnl.js} +1 -1
- package/dist/component/{contacts-address-rac-M8MZd777.js → contacts-address-rac-CGS83PMu.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BS-8HeRD.js → contacts-birthdate-rac-DkP-7tZ9.js} +1 -1
- package/dist/component/{contacts-company-rac-gmgKLvic.js → contacts-company-rac-D_KYvkYe.js} +1 -1
- package/dist/component/{contacts-email-rac-QQ6E9VzX.js → contacts-email-rac-4lGD56E8.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DR7XheRo.js → contacts-first-name-rac-C5L3U9QV.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CBJgTkj5.js → contacts-last-name-rac-SL3FSAhE.js} +1 -1
- package/dist/component/{contacts-phone-rac-CTl25HdK.js → contacts-phone-rac-DkUwJ56_.js} +1 -1
- package/dist/component/{contacts-position-rac-DBDOW7QR.js → contacts-position-rac-CeKJ5oJh.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-Bjldz7ed.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-BtXc0V1S.js → contacts-tax-id-rac-D8QxyDiU.js} +1 -1
- package/dist/component/{date-availability-IQtwk-aX.js → date-availability-DdMI-zNj.js} +1 -1
- package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-Da6j7OP2.js} +99 -98
- package/dist/component/{date-input-rac-j4--xZ8s.js → date-input-rac-tlmhXr4A.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cl7ueVVn.js → date-picker-field-rac-ClNfMoR1.js} +43 -43
- package/dist/component/{date-picker-rac-BrObkuYv.js → date-picker-rac-BV3TGjsx.js} +1 -1
- package/dist/component/date-time-input-field-rac-5eHyKry0.js +424 -0
- package/dist/component/{date-time-input-rac-BShquR72.js → date-time-input-rac-DQk2ylbE.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DNXYnHDM.js → dext-checkbox-group-rac-CBj9Y7Tp.js} +2 -2
- package/dist/component/{dext-checkbox-rac-RBMWmgyT.js → dext-checkbox-rac-C1KI5I2J.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Dph_kV11.js → dext-date-picker-rac-D-8Ss0bx.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C3_gQkBT.js → dext-date-time-input-rac-CRnwLBSZ.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D34vhtST.js → dext-dropdown-rac-BVTEMS0W.js} +1 -1
- package/dist/component/{dext-email-rac-Yzf4-vSg.js → dext-email-rac-CXeM4iQj.js} +1 -1
- package/dist/component/{dext-number-input-rac-D0jZXKaI.js → dext-number-input-rac-DMh08cy5.js} +1 -1
- package/dist/component/{dext-phone-rac-bqTpmTa0.js → dext-phone-rac-E1fFjkVW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-_BhRzFAr.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DOSq-xVQ.js → dext-rating-input-rac-BRYVQOYw.js} +1 -1
- package/dist/component/{dext-tags-rac-BXtFTlL0.js → dext-tags-rac-C4iwtRcw.js} +2 -2
- package/dist/component/{dext-text-area-rac-46wwBQg_.js → dext-text-area-rac-CQ1KAhkU.js} +1 -1
- package/dist/component/{dext-text-input-rac-DVj6V1VG.js → dext-text-input-rac-xCoKhEt3.js} +1 -1
- package/dist/component/{dext-url-input-rac-B5zu9R5K.js → dext-url-input-rac-DyoEEa_v.js} +1 -1
- package/dist/component/{donation-rac-DeBMssGg.js → donation-rac-CSDVxWUj.js} +51 -51
- package/dist/component/dropdown-field-headless-BXyP9KYi.js +101 -0
- package/dist/component/dropdown-field-rac-D1Z_Jbzd.js +36 -0
- package/dist/component/{dropdown-rac-bUNYh49x.js → dropdown-rac-BEi7CMKT.js} +1 -1
- package/dist/component/{ecom-address-rac-CtrERV3f.js → ecom-address-rac-DGl7rlwa.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BrpwOSYM.js → ecom-subscription-checkbox-rac-D5HzzRQk.js} +6 -6
- package/dist/component/{email-input-field-rac-4yYxYc1a.js → email-input-field-rac-DHAK2K8E.js} +63 -63
- package/dist/component/{events-repeater-rac-B308C1JK.js → events-repeater-rac-N1mGqD4R.js} +35 -35
- package/dist/component/{events-rsvp-rac-C4_LJ3Wz.js → events-rsvp-rac-Ds9PnqHG.js} +6 -6
- package/dist/component/{field-error-headless-PMBWtb3Z.js → field-error-headless-9MKScovg.js} +12 -12
- package/dist/component/{field-label-headless-0racVfdo.js → field-label-headless-BaoLrUWJ.js} +12 -12
- package/dist/component/field-rac.module-BUvPquav.js +26 -0
- package/dist/component/{file-upload-rac-CZIHV2OL.js → file-upload-rac-CNbLRxUz.js} +116 -116
- package/dist/component/{fixed-payment-rac-COhRKeun.js → fixed-payment-rac-BFnvUksR.js} +15 -15
- package/dist/component/{form-UCnayEKT.js → form-B3YjGh0T.js} +129 -128
- package/dist/component/{form-element-classes--p2vz_Bm.js → form-element-classes-CLZXu-91.js} +79 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CpXa-NlC.js → header-field-rac-64pYqszP.js} +3 -3
- package/dist/component/{header-rac-CCsguMlZ.js → header-rac-BtPQVL59.js} +1 -1
- package/dist/component/{image-choice-rac-j2UH4Q4I.js → image-choice-rac-BsojUR1h.js} +20 -20
- package/dist/component/{index-Bxa3IDHm.js → index-CtiBRBqZ.js} +4 -4
- package/dist/component/{index-jg8dn8po.js → index-f2JBxCTd.js} +2 -2
- package/dist/component/{isObjectLike-Zw6J9g91.js → isObjectLike-BgqHLNgn.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BeFAYL7V.js → multiline-address-field-rac-CH1hCUTf.js} +575 -574
- package/dist/component/{multiline-address-rac-BYr5_DQd.js → multiline-address-rac-CkOPWXfI.js} +1 -1
- package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-B7U_08UK.js} +24 -24
- package/dist/component/{number-input-rac-Cqkj4JAF.js → number-input-rac-1jcchySg.js} +1 -1
- package/dist/component/{password-rac-D4iSs1ds.js → password-rac-CAaV8OrL.js} +21 -21
- package/dist/component/{payment-input-rac-BvBP47HP.js → payment-input-rac-B3Knhzrz.js} +25 -25
- package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BGsvxtXz.js} +185 -184
- package/dist/component/{phone-rac-BISmYt_n.js → phone-rac-BUAW-44w.js} +1 -1
- package/dist/component/{product-list-rac-C1bm-U2G.js → product-list-rac-C7Nq3ZG4.js} +43 -43
- package/dist/component/quiz-radio-group-rac-CRa3I_NR.js +13 -0
- package/dist/component/{radio-button-module-classes-blfiatlc.js → radio-button-module-classes-BEvf741q.js} +7 -7
- package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-BYTXrpnE.js} +5 -5
- package/dist/component/{radio-group-rac-Bn_W-3xz.js → radio-group-rac-138JrIhm.js} +1 -1
- package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-D5pOVdFJ.js} +24 -24
- package/dist/component/{rating-input-rac-Ci4uPo22.js → rating-input-rac-DuK1q9JB.js} +1 -1
- package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-H3hPgDtD.js} +4 -4
- package/dist/component/{rich-text-field-rac-BBRE9_Kr.js → rich-text-field-rac-Btwqm4wb.js} +5 -5
- package/dist/component/{rich-text-rac-C3MfJK-H.js → rich-text-rac-DIu8StCg.js} +1 -1
- package/dist/component/service-dropdown-rac-N8jqoUC_.js +146 -0
- package/dist/component/{services-multi-choice-rac-FDHRjDLS.js → services-multi-choice-rac-DlP0tB9d.js} +18 -18
- package/dist/component/{signature-rac-DfGPV0Mw.js → signature-rac-DuRzxIkO.js} +53 -53
- package/dist/component/{submit-button-rac-DRsqyJcl.js → submit-button-rac-DFmPp4jT.js} +7 -7
- package/dist/component/{tags-field-rac-CZ4FBGG9.js → tags-field-rac-DIgyn5P9.js} +56 -56
- package/dist/component/{tags-rac-CMHMsiwv.js → tags-rac-C6R6RHl2.js} +1 -1
- package/dist/component/text-area-field-rac-opBEx_8s.js +73 -0
- package/dist/component/{text-area-rac-BKGDa4E3.js → text-area-rac-D4iKhAqc.js} +1 -1
- package/dist/component/{text-input-field-rac-CU8eBRM4.js → text-input-field-rac-Ckp8Ierz.js} +6 -6
- package/dist/component/{text-input-headless-C1eFy2gl.js → text-input-headless-D-LXpqS3.js} +6 -6
- package/dist/component/{text-input-rac-DO0eI3ty.js → text-input-rac-ChxuJj-q.js} +1 -1
- package/dist/component/{time-input-rac-BJ0AL2Be.js → time-input-rac-C5_rEy7W.js} +23 -23
- package/dist/component/{url-input-field-rac-BtpAuKfp.js → url-input-field-rac-CBOnhquz.js} +22 -22
- package/dist/component/{url-input-rac-CjnPbcHt.js → url-input-rac-BY-BVg6r.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +28 -0
- package/dist/component/{use-element-state-class-name-X08kIFhd.js → use-element-state-class-name--YLulmsU.js} +1 -1
- package/dist/component/{use-service-options-base-DfHhMveM.js → use-service-options-base-BNLFmnHJ.js} +3 -3
- package/dist/component/{use-text-input-class-name-BAuokapo.js → use-text-input-class-name-3Xp-hNDT.js} +4 -4
- package/dist/form.d.ts +3 -0
- package/package.json +2 -2
- package/dist/component/date-time-input-field-rac-mqea6CtW.js +0 -423
- package/dist/component/dropdown-field-headless-ShcoDfPa.js +0 -84
- package/dist/component/dropdown-field-rac-DruF_YdZ.js +0 -32
- package/dist/component/field-rac.module-D06m9T9x.js +0 -24
- package/dist/component/quiz-radio-group-rac-BhNhoOSI.js +0 -13
- package/dist/component/service-dropdown-rac-DQkk3SlS.js +0 -142
- package/dist/component/text-area-field-rac-BnRuG5y8.js +0 -73
package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-B7U_08UK.js}
RENAMED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import r, { useState as
|
|
3
|
+
import r, { useState as Q, useCallback as U, useEffect as $, useRef as j } from "react";
|
|
4
4
|
import { NumberField as z, Input as G } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { ak as _, ah as S, au as H, am as J } from "./form-B3YjGh0T.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as K, E as W } from "./field-error-headless-
|
|
8
|
-
import { L as X } from "./field-label-headless-
|
|
7
|
+
import { D as K, E as W } from "./field-error-headless-9MKScovg.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-BaoLrUWJ.js";
|
|
9
9
|
import { g as Y, c as Z } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as w } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ee } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
-
import { s as p } from "./field-rac.module-
|
|
13
|
-
import {
|
|
14
|
-
import { u as se } from "./use-text-input-class-name-
|
|
12
|
+
import { s as p } from "./field-rac.module-BUvPquav.js";
|
|
13
|
+
import { B as re, R as te, q as ae, i as ne } from "./form-element-classes-CLZXu-91.js";
|
|
14
|
+
import { u as se } from "./use-text-input-class-name-3Xp-hNDT.js";
|
|
15
15
|
const e = ({ children: t }) => {
|
|
16
|
-
var F,
|
|
17
|
-
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1,
|
|
16
|
+
var F, R, L;
|
|
17
|
+
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1, A = (R = a == null ? void 0 : a.number) == null ? void 0 : R.maximum, g = (L = a == null ? void 0 : a.number) == null ? void 0 : L.minimum, h = O(s), [q, I] = Q(h), x = w(b), T = c(t, e.Label), V = c(t, e.Input), k = c(t, e.Description), B = c(t, e.Error), M = U((N) => {
|
|
18
18
|
if (N === void 0 || Number.isNaN(N)) {
|
|
19
19
|
l(""), I(NaN);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const v = Y(D), C = Number(N.toFixed(v));
|
|
23
23
|
l(C), I(C);
|
|
24
24
|
}, [
|
|
25
25
|
D,
|
|
26
26
|
l
|
|
27
27
|
]);
|
|
28
|
-
return
|
|
28
|
+
return $(() => {
|
|
29
29
|
I(O(s));
|
|
30
30
|
}, [
|
|
31
31
|
s
|
|
32
32
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
33
33
|
fieldId: n,
|
|
34
|
-
renderLabel: () =>
|
|
34
|
+
renderLabel: () => T,
|
|
35
35
|
renderInput: () => /* @__PURE__ */ r.createElement(z, {
|
|
36
36
|
"aria-labelledby": y,
|
|
37
|
-
value:
|
|
38
|
-
onChange:
|
|
37
|
+
value: q,
|
|
38
|
+
onChange: M,
|
|
39
39
|
isDisabled: d,
|
|
40
40
|
isRequired: E,
|
|
41
41
|
isReadOnly: o,
|
|
42
42
|
isInvalid: u,
|
|
43
|
-
onBlur:
|
|
43
|
+
onBlur: x,
|
|
44
44
|
onFocus: f,
|
|
45
|
-
minValue:
|
|
46
|
-
maxValue:
|
|
47
|
-
},
|
|
48
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
45
|
+
minValue: g ?? void 0,
|
|
46
|
+
maxValue: A ?? void 0
|
|
47
|
+
}, V),
|
|
48
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, B, k)
|
|
49
49
|
});
|
|
50
50
|
}, le = ({ className: t }) => {
|
|
51
51
|
var u;
|
|
52
52
|
const { t: n } = H(), { inputId: s, ariaDescribedBy: l } = S(), { id: d, placeholder: E, validation: o, label: b, required: f } = _();
|
|
53
53
|
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
54
|
-
const m =
|
|
54
|
+
const m = j(null);
|
|
55
55
|
return J(() => {
|
|
56
56
|
var a;
|
|
57
57
|
(a = m.current) == null || a.focus();
|
|
@@ -71,10 +71,10 @@ e.Label = X;
|
|
|
71
71
|
e.Input = le;
|
|
72
72
|
e.Description = K;
|
|
73
73
|
e.Error = W;
|
|
74
|
-
const O = (t) => Z(t) ?? NaN, oe = ({ content: t, locale: n }) => /* @__PURE__ */ r.createElement(
|
|
74
|
+
const O = (t) => Z(t) ?? NaN, oe = ({ content: t, locale: n }) => /* @__PURE__ */ r.createElement(P, {
|
|
75
75
|
content: t,
|
|
76
76
|
locale: n
|
|
77
|
-
}),
|
|
77
|
+
}), Le = () => {
|
|
78
78
|
const t = se();
|
|
79
79
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
80
80
|
className: i(re, p.label)
|
|
@@ -89,5 +89,5 @@ const O = (t) => Z(t) ?? NaN, oe = ({ content: t, locale: n }) => /* @__PURE__ *
|
|
|
89
89
|
}, oe));
|
|
90
90
|
};
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
Le as N
|
|
93
93
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import e, { useState as N, useRef as S } from "react";
|
|
2
2
|
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import { TextField as
|
|
4
|
+
import { ak as E, ah as I, am as O, au as B } from "./form-B3YjGh0T.js";
|
|
5
|
+
import { TextField as A, Group as V, Input as v, Button as P } from "react-aria-components";
|
|
6
6
|
import { f as u, a as g } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as k } from "./field-error-headless-
|
|
8
|
-
import { L as q } from "./field-label-headless-
|
|
9
|
-
import { E as
|
|
10
|
-
import { H as
|
|
11
|
-
import { s as p } from "./field-rac.module-
|
|
12
|
-
import {
|
|
13
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
7
|
+
import { D as M, E as k } from "./field-error-headless-9MKScovg.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-BaoLrUWJ.js";
|
|
9
|
+
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { H as j } from "./custom-focus-class-_483Pkwp.js";
|
|
11
|
+
import { s as p } from "./field-rac.module-BUvPquav.js";
|
|
12
|
+
import { B as H, R as W, q as Z, i as G } from "./form-element-classes-CLZXu-91.js";
|
|
13
|
+
import { u as Q } from "./use-text-input-class-name-3Xp-hNDT.js";
|
|
14
14
|
const t = ({ children: o, className: r }) => {
|
|
15
|
-
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout:
|
|
16
|
-
return /* @__PURE__ */ e.createElement(
|
|
15
|
+
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] = N(!1), F = u(o, t.Label), L = u(o, t.Control), T = u(o, t.Description), h = u(o, t.Error);
|
|
16
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
17
17
|
fieldId: l,
|
|
18
18
|
renderLabel: () => F,
|
|
19
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
20
|
-
"aria-labelledby":
|
|
19
|
+
renderInput: () => /* @__PURE__ */ e.createElement(A, {
|
|
20
|
+
"aria-labelledby": y,
|
|
21
21
|
value: s ?? "",
|
|
22
22
|
onChange: c,
|
|
23
23
|
isDisabled: n,
|
|
@@ -29,13 +29,13 @@ const t = ({ children: o, className: r }) => {
|
|
|
29
29
|
className: r
|
|
30
30
|
}, g(L, {
|
|
31
31
|
isVisible: R,
|
|
32
|
-
onToggleVisibility: () => D((
|
|
32
|
+
onToggleVisibility: () => D((w) => !w)
|
|
33
33
|
})),
|
|
34
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T,
|
|
34
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, h)
|
|
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
|
-
return /* @__PURE__ */ e.createElement(
|
|
38
|
+
return /* @__PURE__ */ e.createElement(V, {
|
|
39
39
|
className: r,
|
|
40
40
|
isDisabled: n,
|
|
41
41
|
isInvalid: m
|
|
@@ -50,7 +50,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
50
50
|
return O(() => {
|
|
51
51
|
var i;
|
|
52
52
|
(i = a.current) == null || i.focus();
|
|
53
|
-
}, s), /* @__PURE__ */ e.createElement(
|
|
53
|
+
}, s), /* @__PURE__ */ e.createElement(v, {
|
|
54
54
|
ref: a,
|
|
55
55
|
id: n,
|
|
56
56
|
type: l ? "text" : "password",
|
|
@@ -60,7 +60,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
60
60
|
});
|
|
61
61
|
}, J = ({ className: o, showPasswordTooltipText: r, hidePasswordTooltipText: l, children: s, ...c }) => {
|
|
62
62
|
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l : r;
|
|
63
|
-
return /* @__PURE__ */ e.createElement(
|
|
63
|
+
return /* @__PURE__ */ e.createElement(P, {
|
|
64
64
|
type: "button",
|
|
65
65
|
isDisabled: a,
|
|
66
66
|
onPress: m,
|
|
@@ -119,7 +119,7 @@ const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
119
119
|
content: o,
|
|
120
120
|
locale: r
|
|
121
121
|
}), oe = () => {
|
|
122
|
-
const { t: o } =
|
|
122
|
+
const { t: o } = B(), r = Q(b.control);
|
|
123
123
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
124
124
|
className: d(H, p.label)
|
|
125
125
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
@@ -127,14 +127,14 @@ const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
127
127
|
})), /* @__PURE__ */ e.createElement(t.Control, {
|
|
128
128
|
className: r
|
|
129
129
|
}, /* @__PURE__ */ e.createElement(t.Input, {
|
|
130
|
-
className: d(p.innerInput,
|
|
130
|
+
className: d(p.innerInput, j)
|
|
131
131
|
}), /* @__PURE__ */ e.createElement(t.Toggle, {
|
|
132
132
|
className: b.toggleButton,
|
|
133
133
|
showPasswordTooltipText: o("forms.widget.modals.show-password-tooltip"),
|
|
134
134
|
hidePasswordTooltipText: o("forms.widget.modals.hide-password-tooltip")
|
|
135
135
|
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
136
136
|
className: d(Z, p.error)
|
|
137
|
-
}, /* @__PURE__ */ e.createElement(
|
|
137
|
+
}, /* @__PURE__ */ e.createElement(U, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
138
138
|
className: d(G, p.description)
|
|
139
139
|
}, te));
|
|
140
140
|
}, be = () => /* @__PURE__ */ e.createElement(oe, null);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import r, { useCallback as
|
|
1
|
+
import r, { useCallback as P, useRef as j } from "react";
|
|
2
2
|
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
4
|
import { TextField as z, Group as J, Input as K } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { ak as N, ah as D, ac as T, au as W, am as X } from "./form-B3YjGh0T.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Y, E as Z } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
9
|
-
import { f as
|
|
7
|
+
import { D as Y, E as Z } from "./field-error-headless-9MKScovg.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-BaoLrUWJ.js";
|
|
9
|
+
import { f as L, g as re } from "./payment-field-utils-DobiK5Xh.js";
|
|
10
10
|
import { u as te } from "./use-synced-display-value-DcAxdn3M.js";
|
|
11
11
|
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { H as ae } from "./custom-focus-class-_483Pkwp.js";
|
|
13
|
-
import { s as d } from "./field-rac.module-
|
|
14
|
-
import {
|
|
15
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
13
|
+
import { s as d } from "./field-rac.module-BUvPquav.js";
|
|
14
|
+
import { B as se, R as oe, q as le, i as ce } from "./form-element-classes-CLZXu-91.js";
|
|
15
|
+
import { u as ie } from "./use-text-input-class-name-3Xp-hNDT.js";
|
|
16
16
|
function ue(e, t) {
|
|
17
17
|
return {
|
|
18
18
|
productId: e.id,
|
|
@@ -27,29 +27,29 @@ function h(e) {
|
|
|
27
27
|
return Number.isNaN(t) ? void 0 : t;
|
|
28
28
|
}
|
|
29
29
|
const n = ({ children: e }) => {
|
|
30
|
-
var O, g, A,
|
|
31
|
-
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: y, hasError: b, onBlur: o, onFocus: E, FieldLayout:
|
|
30
|
+
var O, g, A, V;
|
|
31
|
+
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: y, hasError: b, onBlur: o, onFocus: E, FieldLayout: q, validation: C } = N(), { labelId: M, prefixId: G } = D(), { regionalFormat: c } = T(), 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, I] = te({
|
|
32
32
|
sourceValue: _,
|
|
33
|
-
format: (l) =>
|
|
33
|
+
format: (l) => L(String(l ?? ""), c),
|
|
34
34
|
regionalFormat: c
|
|
35
|
-
}), $ =
|
|
36
|
-
const l =
|
|
35
|
+
}), $ = P(() => {
|
|
36
|
+
const l = L(F, c);
|
|
37
37
|
I(l || ""), o == null || o();
|
|
38
38
|
}, [
|
|
39
39
|
F,
|
|
40
40
|
c,
|
|
41
41
|
o,
|
|
42
42
|
I
|
|
43
|
-
]), B =
|
|
43
|
+
]), B = P((l) => {
|
|
44
44
|
I(l);
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
if (
|
|
45
|
+
const R = h(L(l, c)), Q = h(_);
|
|
46
|
+
if (R !== Q) {
|
|
47
|
+
if (R === void 0) {
|
|
48
48
|
s(null);
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
s([
|
|
52
|
-
ue(S,
|
|
52
|
+
ue(S, R)
|
|
53
53
|
]);
|
|
54
54
|
}
|
|
55
55
|
}, [
|
|
@@ -58,12 +58,12 @@ const n = ({ children: e }) => {
|
|
|
58
58
|
c,
|
|
59
59
|
_,
|
|
60
60
|
I
|
|
61
|
-
]),
|
|
62
|
-
return /* @__PURE__ */ r.createElement(
|
|
61
|
+
]), k = i(e, n.Label), U = i(e, n.Input), v = i(e, n.Description), H = i(e, n.Error);
|
|
62
|
+
return /* @__PURE__ */ r.createElement(q, {
|
|
63
63
|
fieldId: t,
|
|
64
|
-
renderLabel: () =>
|
|
64
|
+
renderLabel: () => k,
|
|
65
65
|
renderInput: () => /* @__PURE__ */ r.createElement(z, {
|
|
66
|
-
"aria-labelledby": `${
|
|
66
|
+
"aria-labelledby": `${M} ${G}`,
|
|
67
67
|
value: a ? F : "",
|
|
68
68
|
onChange: B,
|
|
69
69
|
isDisabled: u,
|
|
@@ -72,11 +72,11 @@ const n = ({ children: e }) => {
|
|
|
72
72
|
isInvalid: b,
|
|
73
73
|
onBlur: $,
|
|
74
74
|
onFocus: E
|
|
75
|
-
},
|
|
75
|
+
}, U),
|
|
76
76
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, v)
|
|
77
77
|
});
|
|
78
78
|
}, f = ({ children: e, className: t }) => {
|
|
79
|
-
const { disabled: a, hasError: s } =
|
|
79
|
+
const { disabled: a, hasError: s } = N(), u = i(e, f.Currency), m = i(e, f.Value);
|
|
80
80
|
return /* @__PURE__ */ r.createElement(J, {
|
|
81
81
|
className: t,
|
|
82
82
|
isDisabled: a,
|
|
@@ -91,7 +91,7 @@ const n = ({ children: e }) => {
|
|
|
91
91
|
className: e
|
|
92
92
|
}, t.sign || t.code) : null;
|
|
93
93
|
}, pe = ({ className: e }) => {
|
|
94
|
-
const { id: t, placeholder: a, label: s } =
|
|
94
|
+
const { id: t, placeholder: a, label: s } = N(), { inputId: u, labelId: m, prefixId: y, ariaDescribedBy: b } = D(), o = j(null);
|
|
95
95
|
return X(() => {
|
|
96
96
|
var E;
|
|
97
97
|
(E = o.current) == null || E.focus();
|