@wix/form-elements 1.62.0 → 1.64.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-Dqib2upI.js → appointment-rac-DojiZqx9.js} +35 -35
- package/dist/component/{bookings-address-rac-E-qq4-KG.js → bookings-address-rac-Bm_lQchD.js} +1 -1
- package/dist/component/{bookings-email-rac-DA_Hwn2j.js → bookings-email-rac-vwuy0kW8.js} +1 -1
- package/dist/component/{bookings-first-name-rac-o1n3lnRo.js → bookings-first-name-rac-BbWuLoeg.js} +1 -1
- package/dist/component/{bookings-header-rac-DQ0YvhxZ.js → bookings-header-rac-DVknNH29.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BqL_84Sg.js → bookings-last-name-rac-BnT3Cq0b.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CAN7roRc.js → bookings-login-bar-rac-DKi-VAXc.js} +16 -16
- package/dist/component/{bookings-phone-rac-CCJVdvkd.js → bookings-phone-rac-Bfy8rheB.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CCklquEC.js → bookings-rich-text-rac-DGiBDcXw.js} +1 -1
- package/dist/component/checkbox-field-rac-CYADRY54.js +1312 -0
- package/dist/component/checkbox-group-field-headless-BDAFpX5F.js +210 -0
- package/dist/component/checkbox-group-field-rac-2YUsOmDI.js +40 -0
- package/dist/component/{checkbox-group-rac-DWPClKpf.js → checkbox-group-rac-CQf1C9H5.js} +1 -1
- package/dist/component/{checkbox-rac-CvbOws2U.js → checkbox-rac-Bjv8jZjs.js} +1 -1
- package/dist/component/{contacts-address-rac-CWFHC5LT.js → contacts-address-rac-BBTiEec9.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DPmJPp8M.js → contacts-birthdate-rac-XReeFHVW.js} +1 -1
- package/dist/component/{contacts-company-rac-UWP9uDqI.js → contacts-company-rac-B-fUQszu.js} +1 -1
- package/dist/component/{contacts-email-rac-BCkkWYhr.js → contacts-email-rac-DBtcCcsV.js} +1 -1
- package/dist/component/{contacts-first-name-rac-KNRf92yT.js → contacts-first-name-rac-mkwU3706.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C_EotEpo.js → contacts-last-name-rac-DY5N-AZx.js} +1 -1
- package/dist/component/{contacts-phone-rac-DJGEWLsl.js → contacts-phone-rac-Ce1rMz_z.js} +1 -1
- package/dist/component/{contacts-position-rac-s1pZ662O.js → contacts-position-rac-B65H8PDu.js} +1 -1
- package/dist/component/contacts-subscribe-rac-BxO8rIyL.js +13 -0
- package/dist/component/{contacts-tax-id-rac-3MUvKEqW.js → contacts-tax-id-rac-Jtt0ySK2.js} +1 -1
- package/dist/component/{date-availability-CRsSX5_d.js → date-availability-B8UwvTJa.js} +1 -1
- package/dist/component/{date-input-field-rac-DPo7waqI.js → date-input-field-rac-RL2a0xoD.js} +23 -23
- package/dist/component/{date-input-rac-DsY8ehb1.js → date-input-rac-ak3G7V07.js} +1 -1
- package/dist/component/{date-picker-field-rac-BtzlxVDB.js → date-picker-field-rac-SL_Roltf.js} +31 -31
- package/dist/component/{date-picker-rac-C-Aw6W87.js → date-picker-rac-ByrM0YIX.js} +1 -1
- package/dist/component/{date-time-input-field-rac-zre1vJ2m.js → date-time-input-field-rac-DOE7xcKi.js} +87 -87
- package/dist/component/{date-time-input-rac-CUvTUzbT.js → date-time-input-rac-BA-GyrAc.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D4mhJU8E.js → dext-checkbox-group-rac-EwUnBO80.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BeYmKpAZ.js → dext-checkbox-rac-CIRKi4B5.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Mr0M3sNQ.js → dext-date-picker-rac-BYO_Q1zM.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-dgxfrHUw.js → dext-date-time-input-rac-BOahPeaH.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CdZOoA5M.js → dext-dropdown-rac-sTD_r-0H.js} +1 -1
- package/dist/component/{dext-email-rac-TBiHlKjv.js → dext-email-rac-e-2_h3he.js} +1 -1
- package/dist/component/{dext-number-input-rac-S78swyZ9.js → dext-number-input-rac-D6LACzWl.js} +1 -1
- package/dist/component/{dext-phone-rac-BhIaSHez.js → dext-phone-rac-kUycy5Od.js} +1 -1
- package/dist/component/{dext-radio-group-rac-B4xG4N8A.js → dext-radio-group-rac-DPD2UkrV.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Bp2Pi5cP.js → dext-rating-input-rac-DUsnrl9W.js} +1 -1
- package/dist/component/{dext-tags-rac-Bnjgmyk-.js → dext-tags-rac-D6z69HuO.js} +2 -2
- package/dist/component/{dext-text-area-rac-f1nJTM_n.js → dext-text-area-rac-C-DVtFJ1.js} +1 -1
- package/dist/component/{dext-text-input-rac-B9m6oI-e.js → dext-text-input-rac-CIa2MdC6.js} +1 -1
- package/dist/component/{dext-url-input-rac-CfEUdRdY.js → dext-url-input-rac-8rVVW5us.js} +1 -1
- package/dist/component/{donation-rac-BqKbQD_H.js → donation-rac-BjmSBabc.js} +62 -62
- package/dist/component/{dropdown-field-headless-CzoD076g.js → dropdown-field-headless-DReo519l.js} +5 -5
- package/dist/component/{dropdown-field-rac-5kD98Ubc.js → dropdown-field-rac-DzrjA2O6.js} +7 -7
- package/dist/component/{dropdown-rac-C9NpsRYi.js → dropdown-rac-CS7oLTp_.js} +1 -1
- package/dist/component/{ecom-address-rac-DdvJEnAO.js → ecom-address-rac-EIb88J_6.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D7Lf1ETL.js → ecom-subscription-checkbox-rac-CE0Ks6qS.js} +5 -5
- package/dist/component/{email-input-field-rac-DUordV5X.js → email-input-field-rac-BScZxYHw.js} +47 -47
- package/dist/component/{events-repeater-rac-B1yDrnvJ.js → events-repeater-rac-Y0rH2Jli.js} +66 -66
- package/dist/component/{events-rsvp-rac-B65NtAMH.js → events-rsvp-rac-BiAYVv_b.js} +12 -12
- package/dist/component/{field-error-headless-DP4WSQU3.js → field-error-headless-DrnFrGun.js} +4 -4
- package/dist/component/{field-label-headless-BKmi7Fjg.js → field-label-headless-BIYf1BIh.js} +7 -7
- package/dist/component/field-rac.module-CWkwwhq4.js +21 -0
- package/dist/component/{file-upload-rac-DAg_G0_l.js → file-upload-rac-br--tZLp.js} +83 -83
- package/dist/component/{fixed-payment-rac-yO1w1gE2.js → fixed-payment-rac-XEtrsaMy.js} +15 -15
- package/dist/component/{form-D6A2hUbV.js → form-9yjqDnxY.js} +2719 -2709
- package/dist/component/form-element-classes-KRzHUNLu.js +57 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-D3Bi6tTS.js → header-field-rac-CLELgzqY.js} +5 -5
- package/dist/component/{header-rac-Blv89pdS.js → header-rac-D8KGkVVp.js} +1 -1
- package/dist/component/{image-choice-rac-BLUZRNm0.js → image-choice-rac-Cl09CLP4.js} +30 -30
- package/dist/component/{index-BiYk1mJi.js → index-C4y71e1i.js} +2 -2
- package/dist/component/{index-Cv3_acT1.js → index-PHkE0Ru4.js} +4 -4
- package/dist/component/isObjectLike-srCDplej.js +86 -0
- package/dist/component/multiline-address-field-rac-CsBLI9y-.js +1613 -0
- package/dist/component/{multiline-address-rac-B9yHNebZ.js → multiline-address-rac-DFDPFfXh.js} +1 -1
- package/dist/component/{number-input-field-rac-SaC7jFUi.js → number-input-field-rac-DZRR7gdt.js} +19 -19
- package/dist/component/{number-input-rac-KYcJJPrs.js → number-input-rac-BCS5lkff.js} +1 -1
- package/dist/component/{password-rac-CD5bSL2g.js → password-rac-ClDGgR3E.js} +27 -27
- package/dist/component/{payment-input-rac-BlAscmFz.js → payment-input-rac-COydWmUE.js} +34 -34
- package/dist/component/{phone-input-field-rac-D-AosrgV.js → phone-input-field-rac-DYCibqe1.js} +54 -54
- package/dist/component/{phone-rac-DXLYlz5G.js → phone-rac-BS-dmWkJ.js} +1 -1
- package/dist/component/{product-list-rac-CGt4Gnj4.js → product-list-rac-hxOhaA-r.js} +84 -84
- package/dist/component/quiz-radio-group-rac-BT-YZO2Q.js +13 -0
- package/dist/component/{radio-group-field-rac-D8NS7qDq.js → radio-group-field-rac-DKqWnMBJ.js} +3 -3
- package/dist/component/{radio-group-field-rac.module-wK26tCZq.js → radio-group-field-rac.module-BwUynK_5.js} +9 -9
- package/dist/component/{radio-group-rac-HalDjwk1.js → radio-group-rac-DHURQZKK.js} +1 -1
- package/dist/component/{rating-input-field-rac-BBhMkSyL.js → rating-input-field-rac-CZRdSVrf.js} +37 -37
- package/dist/component/{rating-input-rac-BpgFnNoD.js → rating-input-rac-BaH52DYm.js} +1 -1
- package/dist/component/{rich-content-rac.module-BgJ2fteu.js → rich-content-rac.module-ILBfxEmN.js} +4 -4
- package/dist/component/{rich-text-field-rac-BZfCgvHc.js → rich-text-field-rac-B58q8Is7.js} +7 -7
- package/dist/component/{rich-text-rac-CG3V04Gr.js → rich-text-rac-DGbZh1eX.js} +1 -1
- package/dist/component/{service-dropdown-rac-Bc_y-R5O.js → service-dropdown-rac-DUiNIbdv.js} +42 -42
- package/dist/component/{services-multi-choice-rac-BeBdZpRV.js → services-multi-choice-rac-B7y9s2l8.js} +29 -29
- package/dist/component/{signature-rac-DNdpHxFp.js → signature-rac-CydpvQJZ.js} +37 -37
- package/dist/component/{submit-button-rac-Bogk1xYc.js → submit-button-rac-OO53h4H8.js} +8 -8
- package/dist/component/{tags-field-rac-COJG3T_9.js → tags-field-rac-eX3d3JEH.js} +50 -50
- package/dist/component/{tags-rac-DsaUqJ4w.js → tags-rac-CdIB_48Z.js} +1 -1
- package/dist/component/{text-area-field-rac-BVq5p83p.js → text-area-field-rac-Bir5Q7gz.js} +22 -22
- package/dist/component/{text-area-rac-D-uiOy62.js → text-area-rac-Ct1UNU04.js} +1 -1
- package/dist/component/{text-input-field-rac-wYvY_eBR.js → text-input-field-rac-onGUXC9J.js} +6 -6
- package/dist/component/{text-input-headless-BsL6OYhp.js → text-input-headless-Bs9m7QFg.js} +10 -10
- package/dist/component/{text-input-rac-Bu8kXhrN.js → text-input-rac-DK4nEw4D.js} +1 -1
- package/dist/component/{time-input-rac-PWXUi1qL.js → time-input-rac-BCG9ktFa.js} +40 -40
- package/dist/component/{url-input-field-rac-B4qgrssx.js → url-input-field-rac-mUkrVTcL.js} +25 -25
- package/dist/component/{url-input-rac-Bo51kTsG.js → url-input-rac-Cl7LFYlr.js} +1 -1
- package/dist/component/{use-service-options-base-Du6B6AP9.js → use-service-options-base-BYVuKRj2.js} +8 -8
- package/dist/form.d.ts +3 -1
- package/package.json +2 -14
- package/dist/component/checkbox-field-rac-DhAEMdL9.js +0 -625
- package/dist/component/checkbox-group-field-headless-EGVW3vG0.js +0 -204
- package/dist/component/checkbox-group-field-rac-DUDWNOwV.js +0 -33
- package/dist/component/contacts-subscribe-rac-D_2wIX9p.js +0 -13
- package/dist/component/field-rac.module-DtugsLiL.js +0 -21
- package/dist/component/form-element-classes-Bi-nNM8q.js +0 -55
- package/dist/component/isObject-BAwJJxQ3.js +0 -34
- package/dist/component/multiline-address-field-rac-_Sb56AEM.js +0 -1574
- package/dist/component/quiz-radio-group-rac-DaStzNZZ.js +0 -13
package/dist/component/{number-input-field-rac-SaC7jFUi.js → number-input-field-rac-DZRR7gdt.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as v } from "@wix/ricos/viewer";
|
|
2
2
|
import m from "classnames";
|
|
3
|
-
import r, { useState as U, useCallback as
|
|
4
|
-
import { NumberField as
|
|
5
|
-
import {
|
|
3
|
+
import r, { useState as U, useCallback as j, useEffect as J, useRef as Q } from "react";
|
|
4
|
+
import { NumberField as $, Input as z } from "react-aria-components";
|
|
5
|
+
import { ai as C, af as S, as as G, ak as H } from "./form-9yjqDnxY.js";
|
|
6
6
|
import { f as d } 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-DrnFrGun.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-BIYf1BIh.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 i } from "./field-rac.module-
|
|
13
|
-
import {
|
|
12
|
+
import { s as i } from "./field-rac.module-CWkwwhq4.js";
|
|
13
|
+
import { t as re, J as te, s as ne, n as ae, j as se } from "./form-element-classes-KRzHUNLu.js";
|
|
14
14
|
const e = ({ children: n }) => {
|
|
15
15
|
var D, L, R;
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled: p, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: u, hasError: c, validation: t } = C(), { labelId: A } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1,
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: p, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: u, hasError: c, validation: t } = C(), { labelId: A } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1, y = (L = t == null ? void 0 : t.number) == null ? void 0 : L.maximum, M = (R = t == null ? void 0 : t.number) == null ? void 0 : R.minimum, T = _(s), [V, I] = U(T), g = w(b), h = d(n, e.Label), k = d(n, e.Input), q = d(n, e.Description), x = d(n, e.Error), B = j((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -24,34 +24,34 @@ const e = ({ children: n }) => {
|
|
|
24
24
|
F,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return J(() => {
|
|
28
28
|
I(_(s));
|
|
29
29
|
}, [
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(u, {
|
|
32
32
|
fieldId: a,
|
|
33
|
-
renderLabel: () =>
|
|
34
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
33
|
+
renderLabel: () => h,
|
|
34
|
+
renderInput: () => /* @__PURE__ */ r.createElement($, {
|
|
35
35
|
"aria-labelledby": A,
|
|
36
|
-
value:
|
|
36
|
+
value: V,
|
|
37
37
|
onChange: B,
|
|
38
38
|
isDisabled: p,
|
|
39
39
|
isRequired: E,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: c,
|
|
42
|
-
onBlur:
|
|
42
|
+
onBlur: g,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
45
|
-
maxValue:
|
|
46
|
-
},
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
44
|
+
minValue: M ?? void 0,
|
|
45
|
+
maxValue: y ?? void 0
|
|
46
|
+
}, k),
|
|
47
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, x, q)
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: n }) => {
|
|
50
50
|
var c;
|
|
51
51
|
const { t: a } = G(), { inputId: s, ariaDescribedBy: l } = S(), { id: p, placeholder: E, validation: o, label: b, required: f } = C();
|
|
52
52
|
(c = o == null ? void 0 : o.number) != null && c.multipleOf;
|
|
53
|
-
const u =
|
|
54
|
-
return
|
|
53
|
+
const u = Q(null);
|
|
54
|
+
return H(() => {
|
|
55
55
|
var t;
|
|
56
56
|
(t = u.current) == null || t.focus();
|
|
57
57
|
}, p), /* @__PURE__ */ r.createElement(z, {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as h, useRef as N } from "react";
|
|
2
2
|
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ai as p, af as I, ak as x, as as A } from "./form-9yjqDnxY.js";
|
|
5
|
+
import { TextField as B, Group as P, Input as V, Button as v } from "react-aria-components";
|
|
6
6
|
import { f as E, a as g } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as
|
|
8
|
-
import { L as
|
|
7
|
+
import { D as M, E as k } from "./field-error-headless-DrnFrGun.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-BIYf1BIh.js";
|
|
9
9
|
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
-
import { H } from "./custom-focus-class-_483Pkwp.js";
|
|
11
|
-
import { s as u } from "./field-rac.module-
|
|
12
|
-
import {
|
|
10
|
+
import { H as j } from "./custom-focus-class-_483Pkwp.js";
|
|
11
|
+
import { s as u } from "./field-rac.module-CWkwwhq4.js";
|
|
12
|
+
import { t as H, J as W, s as Z, n as G, j as J } from "./form-element-classes-KRzHUNLu.js";
|
|
13
13
|
const t = ({ children: r, className: o }) => {
|
|
14
|
-
const { id: i, value: s, onChange: c, disabled: l, readOnly: m, required: n, hasError: a, onBlur: f, onFocus: _, FieldLayout: y } = p(), { labelId: C } = I(), [F, L] =
|
|
14
|
+
const { id: i, value: s, onChange: c, disabled: l, readOnly: m, required: n, hasError: a, onBlur: f, onFocus: _, FieldLayout: y } = p(), { labelId: C } = I(), [F, L] = h(!1), R = E(r, t.Label), D = E(r, t.Control), T = E(r, t.Description), S = E(r, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(y, {
|
|
16
16
|
fieldId: i,
|
|
17
17
|
renderLabel: () => R,
|
|
18
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
18
|
+
renderInput: () => /* @__PURE__ */ e.createElement(B, {
|
|
19
19
|
"aria-labelledby": C,
|
|
20
20
|
value: s ?? "",
|
|
21
21
|
onChange: c,
|
|
@@ -28,13 +28,13 @@ const t = ({ children: r, className: o }) => {
|
|
|
28
28
|
className: o
|
|
29
29
|
}, g(D, {
|
|
30
30
|
isVisible: F,
|
|
31
|
-
onToggleVisibility: () => L((
|
|
31
|
+
onToggleVisibility: () => L((w) => !w)
|
|
32
32
|
})),
|
|
33
33
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, S)
|
|
34
34
|
});
|
|
35
|
-
},
|
|
35
|
+
}, Q = ({ children: r, className: o, ...i }) => {
|
|
36
36
|
const { isVisible: s, onToggleVisibility: c } = i, { disabled: l, hasError: m } = p(), n = E(r, t.Input), a = E(r, t.Toggle);
|
|
37
|
-
return /* @__PURE__ */ e.createElement(
|
|
37
|
+
return /* @__PURE__ */ e.createElement(P, {
|
|
38
38
|
className: o,
|
|
39
39
|
isDisabled: l,
|
|
40
40
|
isInvalid: m
|
|
@@ -44,12 +44,12 @@ const t = ({ children: r, className: o }) => {
|
|
|
44
44
|
isVisible: s,
|
|
45
45
|
onToggleVisibility: c
|
|
46
46
|
}));
|
|
47
|
-
},
|
|
47
|
+
}, $ = ({ className: r, ...o }) => {
|
|
48
48
|
const { isVisible: i } = o, { id: s, placeholder: c } = p(), { inputId: l, ariaDescribedBy: m } = I(), n = N(null);
|
|
49
|
-
return
|
|
49
|
+
return x(() => {
|
|
50
50
|
var a;
|
|
51
51
|
(a = n.current) == null || a.focus();
|
|
52
|
-
}, s), /* @__PURE__ */ e.createElement(
|
|
52
|
+
}, s), /* @__PURE__ */ e.createElement(V, {
|
|
53
53
|
ref: n,
|
|
54
54
|
id: l,
|
|
55
55
|
type: i ? "text" : "password",
|
|
@@ -57,9 +57,9 @@ const t = ({ children: r, className: o }) => {
|
|
|
57
57
|
className: r,
|
|
58
58
|
placeholder: c
|
|
59
59
|
});
|
|
60
|
-
},
|
|
60
|
+
}, z = ({ className: r, showPasswordTooltipText: o, hidePasswordTooltipText: i, children: s, ...c }) => {
|
|
61
61
|
const { isVisible: l, onToggleVisibility: m } = c, { disabled: n } = p(), a = l ? i : o;
|
|
62
|
-
return /* @__PURE__ */ e.createElement(
|
|
62
|
+
return /* @__PURE__ */ e.createElement(v, {
|
|
63
63
|
type: "button",
|
|
64
64
|
isDisabled: n,
|
|
65
65
|
onPress: m,
|
|
@@ -70,12 +70,12 @@ const t = ({ children: r, className: o }) => {
|
|
|
70
70
|
isVisible: l
|
|
71
71
|
}));
|
|
72
72
|
};
|
|
73
|
-
t.Label =
|
|
74
|
-
t.Control =
|
|
75
|
-
t.Input =
|
|
76
|
-
t.Toggle =
|
|
73
|
+
t.Label = q;
|
|
74
|
+
t.Control = Q;
|
|
75
|
+
t.Input = $;
|
|
76
|
+
t.Toggle = z;
|
|
77
77
|
t.Description = M;
|
|
78
|
-
t.Error =
|
|
78
|
+
t.Error = k;
|
|
79
79
|
const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
80
80
|
viewBox: "0 0 24 24",
|
|
81
81
|
width: "20",
|
|
@@ -118,15 +118,15 @@ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
118
118
|
content: r,
|
|
119
119
|
locale: o
|
|
120
120
|
}), re = () => {
|
|
121
|
-
const { t: r } =
|
|
121
|
+
const { t: r } = A();
|
|
122
122
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
123
|
-
className: d(
|
|
123
|
+
className: d(H, u.label)
|
|
124
124
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
125
125
|
className: d(W, u.requiredMark)
|
|
126
126
|
})), /* @__PURE__ */ e.createElement(t.Control, {
|
|
127
127
|
className: d(Z, u.input, b.control)
|
|
128
128
|
}, /* @__PURE__ */ e.createElement(t.Input, {
|
|
129
|
-
className: d(u.innerInput,
|
|
129
|
+
className: d(u.innerInput, j)
|
|
130
130
|
}), /* @__PURE__ */ e.createElement(t.Toggle, {
|
|
131
131
|
className: b.toggleButton,
|
|
132
132
|
showPasswordTooltipText: r("forms.widget.modals.show-password-tooltip"),
|
|
@@ -134,7 +134,7 @@ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
134
134
|
}, ({ isVisible: o }) => o ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
135
135
|
className: d(G, u.error)
|
|
136
136
|
}, /* @__PURE__ */ e.createElement(U, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
137
|
-
className: d(
|
|
137
|
+
className: d(J, u.description)
|
|
138
138
|
}, te));
|
|
139
139
|
}, ge = () => /* @__PURE__ */ e.createElement(re, null);
|
|
140
140
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import r, { useCallback as V, useRef as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import r, { useCallback as V, useRef as J } from "react";
|
|
2
|
+
import { RicosViewer as Q } from "@wix/ricos/viewer";
|
|
3
3
|
import i from "classnames";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
4
|
+
import { TextField as w, Group as z, Input as K } from "react-aria-components";
|
|
5
|
+
import { ai as D, af as S, ab as x, as as W, ak as X } from "./form-9yjqDnxY.js";
|
|
6
6
|
import { f as m } 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-
|
|
7
|
+
import { D as Y, E as Z } from "./field-error-headless-DrnFrGun.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-BIYf1BIh.js";
|
|
9
9
|
import { f as R, 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 u } from "./field-rac.module-
|
|
14
|
-
import {
|
|
13
|
+
import { s as u } from "./field-rac.module-CWkwwhq4.js";
|
|
14
|
+
import { t as se, J as oe, s as le, n as ce, j as ie } from "./form-element-classes-KRzHUNLu.js";
|
|
15
15
|
function ue(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
@@ -26,8 +26,8 @@ function h(e) {
|
|
|
26
26
|
return Number.isNaN(t) ? void 0 : t;
|
|
27
27
|
}
|
|
28
28
|
const n = ({ children: e }) => {
|
|
29
|
-
var O,
|
|
30
|
-
const { id: t, value: a, onChange: s, disabled: p, readOnly: d, required: y, hasError: b, onBlur: o, onFocus:
|
|
29
|
+
var O, A, g, P;
|
|
30
|
+
const { id: t, value: a, onChange: s, disabled: p, readOnly: d, required: y, hasError: b, onBlur: o, onFocus: E, FieldLayout: M, validation: _ } = D(), { labelId: q, prefixId: G } = S(), { regionalFormat: c } = x(), N = (g = (A = (O = _ == null ? void 0 : _.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : A.products) == null ? void 0 : g[0], C = (P = a == null ? void 0 : a.at(0)) == null ? void 0 : P.price, [F, I] = te({
|
|
31
31
|
sourceValue: C,
|
|
32
32
|
format: (l) => R(String(l ?? ""), c),
|
|
33
33
|
regionalFormat: c
|
|
@@ -41,8 +41,8 @@ const n = ({ children: e }) => {
|
|
|
41
41
|
I
|
|
42
42
|
]), U = V((l) => {
|
|
43
43
|
I(l);
|
|
44
|
-
const L = h(R(l, c)),
|
|
45
|
-
if (L !==
|
|
44
|
+
const L = h(R(l, c)), j = h(C);
|
|
45
|
+
if (L !== j) {
|
|
46
46
|
if (L === void 0) {
|
|
47
47
|
s(null);
|
|
48
48
|
return;
|
|
@@ -57,12 +57,12 @@ const n = ({ children: e }) => {
|
|
|
57
57
|
c,
|
|
58
58
|
C,
|
|
59
59
|
I
|
|
60
|
-
]),
|
|
61
|
-
return /* @__PURE__ */ r.createElement(
|
|
60
|
+
]), k = m(e, n.Label), B = m(e, n.Input), v = m(e, n.Description), H = m(e, n.Error);
|
|
61
|
+
return /* @__PURE__ */ r.createElement(M, {
|
|
62
62
|
fieldId: t,
|
|
63
|
-
renderLabel: () =>
|
|
64
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
65
|
-
"aria-labelledby": `${
|
|
63
|
+
renderLabel: () => k,
|
|
64
|
+
renderInput: () => /* @__PURE__ */ r.createElement(w, {
|
|
65
|
+
"aria-labelledby": `${q} ${G}`,
|
|
66
66
|
value: a ? F : "",
|
|
67
67
|
onChange: U,
|
|
68
68
|
isDisabled: p,
|
|
@@ -70,19 +70,19 @@ const n = ({ children: e }) => {
|
|
|
70
70
|
isRequired: y,
|
|
71
71
|
isInvalid: b,
|
|
72
72
|
onBlur: $,
|
|
73
|
-
onFocus:
|
|
74
|
-
},
|
|
75
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
73
|
+
onFocus: E
|
|
74
|
+
}, B),
|
|
75
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, v)
|
|
76
76
|
});
|
|
77
|
-
},
|
|
78
|
-
const { disabled: a, hasError: s } = D(), p = m(e,
|
|
79
|
-
return /* @__PURE__ */ r.createElement(
|
|
77
|
+
}, f = ({ children: e, className: t }) => {
|
|
78
|
+
const { disabled: a, hasError: s } = D(), p = m(e, f.Currency), d = m(e, f.Value);
|
|
79
|
+
return /* @__PURE__ */ r.createElement(z, {
|
|
80
80
|
className: t,
|
|
81
81
|
isDisabled: a,
|
|
82
82
|
isInvalid: s
|
|
83
83
|
}, p, d);
|
|
84
84
|
}, me = ({ className: e }) => {
|
|
85
|
-
const { currency: t } =
|
|
85
|
+
const { currency: t } = x(), { t: a } = W(), { prefixId: s } = S();
|
|
86
86
|
return t ? /* @__PURE__ */ r.createElement("span", {
|
|
87
87
|
id: s,
|
|
88
88
|
"aria-hidden": !1,
|
|
@@ -90,10 +90,10 @@ 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 } = D(), { inputId: p, labelId: d, prefixId: y, ariaDescribedBy: b } = S(), o =
|
|
93
|
+
const { id: t, placeholder: a, label: s } = D(), { inputId: p, labelId: d, prefixId: y, ariaDescribedBy: b } = S(), o = J(null);
|
|
94
94
|
return X(() => {
|
|
95
|
-
var
|
|
96
|
-
(
|
|
95
|
+
var E;
|
|
96
|
+
(E = o.current) == null || E.focus();
|
|
97
97
|
}, t), /* @__PURE__ */ r.createElement(K, {
|
|
98
98
|
ref: o,
|
|
99
99
|
id: p,
|
|
@@ -105,16 +105,16 @@ const n = ({ children: e }) => {
|
|
|
105
105
|
autoComplete: "off"
|
|
106
106
|
});
|
|
107
107
|
};
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
f.Currency = me;
|
|
109
|
+
f.Value = pe;
|
|
110
110
|
n.Label = ee;
|
|
111
|
-
n.Input =
|
|
111
|
+
n.Input = f;
|
|
112
112
|
n.Description = Y;
|
|
113
113
|
n.Error = Z;
|
|
114
|
-
const de = "_inputGroup_vuy4u_1",
|
|
114
|
+
const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", T = {
|
|
115
115
|
inputGroup: de,
|
|
116
|
-
currency:
|
|
117
|
-
},
|
|
116
|
+
currency: fe
|
|
117
|
+
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(Q, {
|
|
118
118
|
content: e,
|
|
119
119
|
locale: t
|
|
120
120
|
}), Ie = () => /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(n.Label, {
|
|
@@ -131,7 +131,7 @@ const de = "_inputGroup_vuy4u_1", Ee = "_currency_vuy4u_14", T = {
|
|
|
131
131
|
className: i(ce, u.error)
|
|
132
132
|
}, /* @__PURE__ */ r.createElement(ne, null), /* @__PURE__ */ r.createElement(n.Error.Text, null)), /* @__PURE__ */ r.createElement(n.Description, {
|
|
133
133
|
className: i(ie, u.description)
|
|
134
|
-
},
|
|
134
|
+
}, Ee)), Ve = () => /* @__PURE__ */ r.createElement(Ie, null);
|
|
135
135
|
export {
|
|
136
136
|
Ve as PaymentInputRAC
|
|
137
137
|
};
|