@wix/form-elements 1.135.0 → 1.136.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-DsD7xLmb.js +1010 -0
- package/dist/component/{bookings-address-rac-BK-sU26E.js → bookings-address-rac-ByaFu51U.js} +1 -1
- package/dist/component/{bookings-email-rac-DZ3HVkyn.js → bookings-email-rac-CxuvkcYw.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Ci4PHqOr.js → bookings-first-name-rac-JXLJa_7E.js} +1 -1
- package/dist/component/{bookings-header-rac-C_MYNrDA.js → bookings-header-rac-CIQTbf9d.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CdNlwyjm.js → bookings-last-name-rac-_2Xt4BPe.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CP2JcaVr.js → bookings-login-bar-rac-BUjys5i9.js} +6 -6
- package/dist/component/{bookings-phone-rac-BV8sqxil.js → bookings-phone-rac-DlsdGmOt.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DQtcYRsh.js → bookings-rich-text-rac-BvRdhL7M.js} +1 -1
- package/dist/component/{checkbox-field-rac-DPNqHTNc.js → checkbox-field-rac-Be6wicaA.js} +121 -121
- package/dist/component/{checkbox-group-field-headless-DhhynlgN.js → checkbox-group-field-headless-BJ0pGvXi.js} +19 -19
- package/dist/component/{checkbox-group-field-rac-B3zOW7qr.js → checkbox-group-field-rac-D7xqqVf6.js} +4 -4
- package/dist/component/{checkbox-group-rac-Qy03hO31.js → checkbox-group-rac-DtCS-gEH.js} +1 -1
- package/dist/component/{checkbox-rac-DYr3RaHj.js → checkbox-rac-ub7MFwY-.js} +1 -1
- package/dist/component/{contacts-address-rac-Bi-etpfX.js → contacts-address-rac-Bwsdpg11.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-D2LLjX9P.js → contacts-birthdate-rac-D54hibhb.js} +1 -1
- package/dist/component/{contacts-company-rac-C9ImoG_i.js → contacts-company-rac-CKqzgKio.js} +1 -1
- package/dist/component/{contacts-email-rac-DeGblC9V.js → contacts-email-rac-Dxm31wuY.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Xk3m57jK.js → contacts-first-name-rac-CXHsx6Vy.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BKE-1IYB.js → contacts-last-name-rac-B0S268f3.js} +1 -1
- package/dist/component/{contacts-phone-rac-CHmtTutD.js → contacts-phone-rac-DEbgIiEj.js} +1 -1
- package/dist/component/{contacts-position-rac-BS3TySLG.js → contacts-position-rac-D31uoOlR.js} +1 -1
- package/dist/component/{contacts-subscribe-rac--fpczJiB.js → contacts-subscribe-rac-DJ8NtoxZ.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CHkn8vkL.js → contacts-tax-id-rac-DTQffHAo.js} +1 -1
- package/dist/component/{date-availability-70Vb-dlb.js → date-availability-DmhJ9apH.js} +1 -1
- package/dist/component/{date-input-field-rac-BlkYEYM_.js → date-input-field-rac-BwM_q4FW.js} +52 -52
- package/dist/component/{date-input-rac-JdNFk07Q.js → date-input-rac-C93pgocp.js} +1 -1
- package/dist/component/{date-picker-field-rac-DHu11mY1.js → date-picker-field-rac-CtZL368W.js} +5 -5
- package/dist/component/{date-picker-rac-CZtWhFzM.js → date-picker-rac-4DNe6hOX.js} +1 -1
- package/dist/component/{date-time-input-field-rac-cHAALqS5.js → date-time-input-field-rac-MlCVy3Oz.js} +58 -58
- package/dist/component/{date-time-input-rac-Dz7GfoJO.js → date-time-input-rac-ByyBvFgo.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-ZNKzyWda.js → dext-checkbox-group-rac-BP76Xwiq.js} +4 -4
- package/dist/component/{dext-checkbox-rac-DfPFXrKu.js → dext-checkbox-rac-DGaKSh4Z.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BPbl65qK.js → dext-date-picker-rac-UEXbMSlL.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-D5ywbLtW.js → dext-date-time-input-rac-CsJcGK4I.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BuVsPZOU.js → dext-dropdown-rac-BzbRzloh.js} +1 -1
- package/dist/component/{dext-email-rac-DRjt3lqT.js → dext-email-rac-DufFAnTi.js} +1 -1
- package/dist/component/{dext-number-input-rac-Bzrl87fo.js → dext-number-input-rac-D6xXi7B2.js} +1 -1
- package/dist/component/{dext-phone-rac-LibvQb8h.js → dext-phone-rac-svy9CDHW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BTWnIvwW.js → dext-radio-group-rac-C4p9NuQS.js} +4 -4
- package/dist/component/{dext-rating-input-rac-DTlnOcC8.js → dext-rating-input-rac-wJ7-RFFN.js} +1 -1
- package/dist/component/{dext-tags-rac-YdeijviH.js → dext-tags-rac-D2myHrSZ.js} +4 -4
- package/dist/component/{dext-text-area-rac-CdCzQYey.js → dext-text-area-rac-B4Fw_9mF.js} +1 -1
- package/dist/component/{dext-text-input-rac-B28RTezm.js → dext-text-input-rac-DlZanFMT.js} +1 -1
- package/dist/component/{dext-url-input-rac-B0ZBPbAb.js → dext-url-input-rac-DYjl3wuk.js} +1 -1
- package/dist/component/{donation-rac-_0cwsIAq.js → donation-rac-B6LwJxik.js} +72 -72
- package/dist/component/{dropdown-field-headless-DVZnbZAM.js → dropdown-field-headless-BAt2RoAH.js} +8 -8
- package/dist/component/{dropdown-field-rac-DWCj_Grt.js → dropdown-field-rac-DFjn3ecV.js} +7 -7
- package/dist/component/{dropdown-rac-Bpo-F5sc.js → dropdown-rac-DQ6keNRI.js} +1 -1
- package/dist/component/{ecom-address-rac-vJ0ku_Ld.js → ecom-address-rac-j1T2zp0k.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DgVReM6c.js → ecom-subscription-checkbox-rac-viTaRZsk.js} +2 -2
- package/dist/component/{email-input-field-rac-BXJGOBg-.js → email-input-field-rac-5eb-1w7B.js} +46 -46
- package/dist/component/{events-repeater-rac-CrXE_ppd.js → events-repeater-rac-BtcoN_Ra.js} +23 -23
- package/dist/component/{events-rsvp-rac-BGg3P1CQ.js → events-rsvp-rac-DSzFEmty.js} +10 -10
- package/dist/component/{field-error-headless-C3eOy1_l.js → field-error-headless-Bpe041x2.js} +6 -6
- package/dist/component/{field-label-headless-BMmR_IeF.js → field-label-headless-BUuK1Ftv.js} +7 -7
- package/dist/component/{file-upload-rac-Umix6wXx.js → file-upload-rac-CfU8Ygwq.js} +50 -50
- package/dist/component/{fixed-payment-rac-CfIJCBjb.js → fixed-payment-rac-CYp7zNq8.js} +12 -12
- package/dist/component/{form-CYPNOMwk.js → form-C6lnbh2O.js} +831 -823
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-oxHUTKYV.js → header-field-rac-B7YfrhId.js} +4 -4
- package/dist/component/{header-rac-DTGV923r.js → header-rac-BtJKAKAz.js} +1 -1
- package/dist/component/{image-choice-rac-B9JGl_h7.js → image-choice-rac-Bmq7Pyg6.js} +32 -32
- package/dist/component/{index-BOKSOnDK.js → index-BjPSeVyh.js} +107 -107
- package/dist/component/{index-C_ktc-yO.js → index-CQdUOkIN.js} +5 -5
- package/dist/component/{isObjectLike-Di8V7txC.js → isObjectLike-CxNqKfU5.js} +7 -7
- package/dist/component/{multiline-address-field-rac-zgmTbXlg.js → multiline-address-field-rac-BeiUJWKd.js} +115 -115
- package/dist/component/{multiline-address-rac-Cyb3dvBf.js → multiline-address-rac-B2mocF6M.js} +1 -1
- package/dist/component/{number-input-field-rac-DquqqRy_.js → number-input-field-rac-CQX7_S2O.js} +24 -24
- package/dist/component/{number-input-rac-G2DdTbk2.js → number-input-rac-BZri-E8P.js} +1 -1
- package/dist/component/{password-rac-DJCU0F38.js → password-rac-CdwrtDJU.js} +50 -50
- package/dist/component/{payment-input-rac-DlIYza6N.js → payment-input-rac-ClQiqmjm.js} +38 -38
- package/dist/component/{phone-input-field-rac-B10TInMa.js → phone-input-field-rac-BtG_Rado.js} +56 -56
- package/dist/component/{phone-rac-BuyttJpM.js → phone-rac-CdcAMa5E.js} +1 -1
- package/dist/component/{product-list-rac-WrSJwQ_g.js → product-list-rac-Dp_YK6mo.js} +61 -61
- package/dist/component/{quiz-radio-group-rac-CHxZ_pK_.js → quiz-radio-group-rac-CorojxKD.js} +1 -1
- package/dist/component/{radio-button-module-classes-DjJU-8ZB.js → radio-button-module-classes-ZX12Fyj4.js} +3 -3
- package/dist/component/{radio-group-field-rac-BImiqcKa.js → radio-group-field-rac-BifCDpE4.js} +10 -10
- package/dist/component/{radio-group-rac-CDkJeGpN.js → radio-group-rac-CJ2fzqnY.js} +1 -1
- package/dist/component/{rating-input-field-rac-Dsr_S5qN.js → rating-input-field-rac-Dg1T0DZW.js} +28 -28
- package/dist/component/{rating-input-rac-BJUW8U93.js → rating-input-rac-Ba4YK13i.js} +1 -1
- package/dist/component/{rich-content-rac.module-BfQJqA-x.js → rich-content-rac.module-BehwBL3L.js} +3 -3
- package/dist/component/{rich-text-field-rac-DIuZbu_u.js → rich-text-field-rac-DtIWdB-S.js} +7 -7
- package/dist/component/{rich-text-rac-C39fpEiP.js → rich-text-rac-BX4eDDFw.js} +1 -1
- package/dist/component/service-dropdown-rac-68WLBlsa.js +146 -0
- package/dist/component/{services-multi-choice-rac-GVb4qA7g.js → services-multi-choice-rac-8yNdAHfS.js} +7 -7
- package/dist/component/{signature-rac-nC5pr6nB.js → signature-rac-DeVOyl5O.js} +73 -73
- package/dist/component/{submit-button-rac-eUjgrx9Q.js → submit-button-rac-IOr1g-G-.js} +12 -12
- package/dist/component/{tags-field-rac-zv30chSd.js → tags-field-rac-DaiMlAxt.js} +27 -27
- package/dist/component/{tags-rac-PnS2SxVP.js → tags-rac-BgrUkY0A.js} +1 -1
- package/dist/component/{text-area-field-rac-DLeOMD4g.js → text-area-field-rac-CLPZEY93.js} +16 -16
- package/dist/component/{text-area-rac-jZ_mh45C.js → text-area-rac-C8PdPSzX.js} +1 -1
- package/dist/component/{text-input-field-rac-DifV7Erd.js → text-input-field-rac-Dm-xU8Rg.js} +5 -5
- package/dist/component/{text-input-headless-DhVEjorY.js → text-input-headless-BEmRjL8Z.js} +6 -6
- package/dist/component/{text-input-rac-Ce4qKN9M.js → text-input-rac-C-FnaOXT.js} +1 -1
- package/dist/component/{time-input-rac-1kW3aDIo.js → time-input-rac-VmTURkiK.js} +46 -46
- package/dist/component/{url-input-field-rac-D9xXAQCq.js → url-input-field-rac-CnnS0tVx.js} +23 -23
- package/dist/component/{url-input-rac-SaAybDdN.js → url-input-rac-6nd_ccoP.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-C_MO_0JS.js → use-dropdown-option-class-name-CcZl1qrj.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-D7EMiD-M.js → use-dropdown-trigger-class-name-BNc0mkdK.js} +4 -4
- package/dist/component/{use-element-state-class-name-DZFi3Z42.js → use-element-state-class-name-BU6RXqBy.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-JAZ1mif0.js → use-hoverable-input-class-name-CkXPkbiP.js} +2 -2
- package/dist/component/{use-service-options-base-ZX4iaxzr.js → use-service-options-base-B5afDbnr.js} +4 -4
- package/dist/component/use-text-input-class-name-BB3V6Q0b.js +6 -0
- package/package.json +2 -2
- package/dist/component/appointment-rac-CYCddSl9.js +0 -1010
- package/dist/component/service-dropdown-rac-Bc9hEpx3.js +0 -146
- package/dist/component/use-text-input-class-name-XFjQX8q1.js +0 -6
package/dist/component/{number-input-field-rac-DquqqRy_.js → number-input-field-rac-CQX7_S2O.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 j, useCallback as G, useEffect as Q, useRef as U } from "react";
|
|
4
|
+
import { NumberField as Y, Input as $ } from "react-aria-components";
|
|
5
|
+
import { bj as _, bg as S, bt as z, bl as H, M as J, Y as K, G as W, u as X } from "./form-C6lnbh2O.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-Bpe041x2.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-BUuK1Ftv.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
|
-
import { s as
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
12
|
+
import { s as d } from "./field-rac.module-DfEb7pBp.js";
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-BB3V6Q0b.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
15
|
var F, L, R;
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled:
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: p, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: g } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, y = (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, x = O(s), [M, I] = j(x), T = ne(E), V = c(t, e.Label), h = c(t, e.Input), q = c(t, e.Description), k = c(t, e.Error), B = G((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -31,30 +31,30 @@ const e = ({ children: t }) => {
|
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
32
32
|
fieldId: a,
|
|
33
33
|
renderLabel: () => V,
|
|
34
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
35
|
-
"aria-labelledby":
|
|
36
|
-
value:
|
|
34
|
+
renderInput: () => /* @__PURE__ */ r.createElement(Y, {
|
|
35
|
+
"aria-labelledby": g,
|
|
36
|
+
value: M,
|
|
37
37
|
onChange: B,
|
|
38
|
-
isDisabled:
|
|
38
|
+
isDisabled: p,
|
|
39
39
|
isRequired: b,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: u,
|
|
42
42
|
onBlur: T,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
45
|
-
maxValue:
|
|
46
|
-
},
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k,
|
|
44
|
+
minValue: A ?? void 0,
|
|
45
|
+
maxValue: y ?? void 0
|
|
46
|
+
}, h),
|
|
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 } = z(), { inputId: s, ariaDescribedBy: l } = S(), { id: p, placeholder: b, validation: o, label: E, required: f } = _();
|
|
52
52
|
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
53
|
-
const m =
|
|
54
|
-
return
|
|
53
|
+
const m = U(null);
|
|
54
|
+
return H(() => {
|
|
55
55
|
var n;
|
|
56
56
|
(n = m.current) == null || n.focus();
|
|
57
|
-
},
|
|
57
|
+
}, p), /* @__PURE__ */ r.createElement($, {
|
|
58
58
|
ref: m,
|
|
59
59
|
id: s,
|
|
60
60
|
"aria-describedby": l,
|
|
@@ -76,15 +76,15 @@ const O = (t) => te(t) ?? NaN, oe = ({ content: t, locale: a }) => /* @__PURE__
|
|
|
76
76
|
}), Le = () => {
|
|
77
77
|
const t = se();
|
|
78
78
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
79
|
-
className: i(
|
|
79
|
+
className: i(J, d.label)
|
|
80
80
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
81
|
-
className: i(
|
|
81
|
+
className: i(K, d.requiredMark)
|
|
82
82
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
83
83
|
className: t
|
|
84
84
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
85
|
-
className: i(
|
|
85
|
+
className: i(W, d.error)
|
|
86
86
|
}, /* @__PURE__ */ r.createElement(ae, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
87
|
-
className: i(
|
|
87
|
+
className: i(X, d.description)
|
|
88
88
|
}, oe));
|
|
89
89
|
};
|
|
90
90
|
export {
|
|
@@ -1,21 +1,21 @@
|
|
|
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 { bj as E, bg as I, bl as O, bt as A, M as B, Y as V, G as v, u as M } from "./form-C6lnbh2O.js";
|
|
5
|
+
import { TextField as P, Group as k, Input as q, 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
|
|
9
|
-
import { E as
|
|
10
|
-
import { H as
|
|
7
|
+
import { D as U, E as G } from "./field-error-headless-Bpe041x2.js";
|
|
8
|
+
import { L as H } from "./field-label-headless-BUuK1Ftv.js";
|
|
9
|
+
import { E as W } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { H as Z } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
13
|
-
const t = ({ children:
|
|
14
|
-
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(
|
|
12
|
+
import { u as Q } from "./use-text-input-class-name-BB3V6Q0b.js";
|
|
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, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] = N(!1), F = u(o, t.Label), L = u(o, t.Control), T = u(o, t.Description), w = u(o, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(_, {
|
|
16
16
|
fieldId: l,
|
|
17
17
|
renderLabel: () => F,
|
|
18
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
18
|
+
renderInput: () => /* @__PURE__ */ e.createElement(P, {
|
|
19
19
|
"aria-labelledby": y,
|
|
20
20
|
value: s ?? "",
|
|
21
21
|
onChange: c,
|
|
@@ -25,17 +25,17 @@ const t = ({ children: r, className: o }) => {
|
|
|
25
25
|
isInvalid: i,
|
|
26
26
|
onBlur: f,
|
|
27
27
|
onFocus: C,
|
|
28
|
-
className:
|
|
28
|
+
className: r
|
|
29
29
|
}, b(L, {
|
|
30
30
|
isVisible: R,
|
|
31
|
-
onToggleVisibility: () => D((
|
|
31
|
+
onToggleVisibility: () => D((h) => !h)
|
|
32
32
|
})),
|
|
33
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T,
|
|
33
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, w)
|
|
34
34
|
});
|
|
35
|
-
},
|
|
36
|
-
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(
|
|
35
|
+
}, Y = ({ children: o, className: r, ...l }) => {
|
|
36
|
+
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(o, t.Input), i = u(o, t.Toggle);
|
|
37
37
|
return /* @__PURE__ */ e.createElement(k, {
|
|
38
|
-
className:
|
|
38
|
+
className: r,
|
|
39
39
|
isDisabled: n,
|
|
40
40
|
isInvalid: m
|
|
41
41
|
}, b(a, {
|
|
@@ -44,8 +44,8 @@ const t = ({ children: r, className: o }) => {
|
|
|
44
44
|
isVisible: s,
|
|
45
45
|
onToggleVisibility: c
|
|
46
46
|
}));
|
|
47
|
-
},
|
|
48
|
-
const { isVisible: l } =
|
|
47
|
+
}, $ = ({ className: o, ...r }) => {
|
|
48
|
+
const { isVisible: l } = r, { id: s, placeholder: c } = E(), { inputId: n, ariaDescribedBy: m } = I(), a = S(null);
|
|
49
49
|
return O(() => {
|
|
50
50
|
var i;
|
|
51
51
|
(i = a.current) == null || i.focus();
|
|
@@ -54,29 +54,29 @@ const t = ({ children: r, className: o }) => {
|
|
|
54
54
|
id: n,
|
|
55
55
|
type: l ? "text" : "password",
|
|
56
56
|
"aria-describedby": m,
|
|
57
|
-
className:
|
|
57
|
+
className: o,
|
|
58
58
|
placeholder: c
|
|
59
59
|
});
|
|
60
|
-
},
|
|
61
|
-
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l :
|
|
62
|
-
return /* @__PURE__ */ e.createElement(
|
|
60
|
+
}, z = ({ className: o, showPasswordTooltipText: r, hidePasswordTooltipText: l, children: s, ...c }) => {
|
|
61
|
+
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l : r;
|
|
62
|
+
return /* @__PURE__ */ e.createElement(j, {
|
|
63
63
|
type: "button",
|
|
64
64
|
isDisabled: a,
|
|
65
65
|
onPress: m,
|
|
66
66
|
"aria-label": i,
|
|
67
67
|
"aria-pressed": n,
|
|
68
|
-
className:
|
|
68
|
+
className: o
|
|
69
69
|
}, s == null ? void 0 : s({
|
|
70
70
|
isVisible: n
|
|
71
71
|
}));
|
|
72
72
|
};
|
|
73
|
-
t.Label =
|
|
74
|
-
t.Control =
|
|
75
|
-
t.Input =
|
|
76
|
-
t.Toggle =
|
|
77
|
-
t.Description =
|
|
78
|
-
t.Error =
|
|
79
|
-
const
|
|
73
|
+
t.Label = H;
|
|
74
|
+
t.Control = Y;
|
|
75
|
+
t.Input = $;
|
|
76
|
+
t.Toggle = z;
|
|
77
|
+
t.Description = U;
|
|
78
|
+
t.Error = G;
|
|
79
|
+
const J = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
80
80
|
viewBox: "0 0 24 24",
|
|
81
81
|
width: "20",
|
|
82
82
|
height: "20",
|
|
@@ -84,14 +84,14 @@ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
84
84
|
stroke: "currentColor",
|
|
85
85
|
strokeWidth: "1.5",
|
|
86
86
|
"aria-hidden": "true",
|
|
87
|
-
...
|
|
87
|
+
...o
|
|
88
88
|
}, /* @__PURE__ */ e.createElement("path", {
|
|
89
89
|
d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"
|
|
90
90
|
}), /* @__PURE__ */ e.createElement("circle", {
|
|
91
91
|
cx: "12",
|
|
92
92
|
cy: "12",
|
|
93
93
|
r: "3"
|
|
94
|
-
})),
|
|
94
|
+
})), K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
95
95
|
viewBox: "0 0 24 24",
|
|
96
96
|
width: "20",
|
|
97
97
|
height: "20",
|
|
@@ -99,7 +99,7 @@ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
99
99
|
stroke: "currentColor",
|
|
100
100
|
strokeWidth: "1.5",
|
|
101
101
|
"aria-hidden": "true",
|
|
102
|
-
...
|
|
102
|
+
...o
|
|
103
103
|
}, /* @__PURE__ */ e.createElement("path", {
|
|
104
104
|
d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"
|
|
105
105
|
}), /* @__PURE__ */ e.createElement("circle", {
|
|
@@ -111,32 +111,32 @@ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
111
111
|
y1: "21",
|
|
112
112
|
x2: "21",
|
|
113
113
|
y2: "3"
|
|
114
|
-
})),
|
|
115
|
-
control:
|
|
114
|
+
})), X = "_control_1malj_1", ee = "_toggleButton_1malj_15", g = {
|
|
115
|
+
control: X,
|
|
116
116
|
toggleButton: ee
|
|
117
|
-
}, te = ({ content:
|
|
118
|
-
content:
|
|
119
|
-
locale:
|
|
120
|
-
}),
|
|
121
|
-
const { t:
|
|
117
|
+
}, te = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(x, {
|
|
118
|
+
content: o,
|
|
119
|
+
locale: r
|
|
120
|
+
}), oe = () => {
|
|
121
|
+
const { t: o } = A(), r = Q(g.control);
|
|
122
122
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
123
123
|
className: d(B, p.label)
|
|
124
124
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
125
|
-
className: d(
|
|
125
|
+
className: d(V, p.requiredMark)
|
|
126
126
|
})), /* @__PURE__ */ e.createElement(t.Control, {
|
|
127
|
-
className:
|
|
127
|
+
className: r
|
|
128
128
|
}, /* @__PURE__ */ e.createElement(t.Input, {
|
|
129
|
-
className: d(p.innerInput,
|
|
129
|
+
className: d(p.innerInput, Z)
|
|
130
130
|
}), /* @__PURE__ */ e.createElement(t.Toggle, {
|
|
131
131
|
className: g.toggleButton,
|
|
132
|
-
showPasswordTooltipText:
|
|
133
|
-
hidePasswordTooltipText:
|
|
134
|
-
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(
|
|
135
|
-
className: d(
|
|
136
|
-
}, /* @__PURE__ */ e.createElement(
|
|
137
|
-
className: d(
|
|
132
|
+
showPasswordTooltipText: o("forms.widget.modals.show-password-tooltip"),
|
|
133
|
+
hidePasswordTooltipText: o("forms.widget.modals.hide-password-tooltip")
|
|
134
|
+
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(K, null) : /* @__PURE__ */ e.createElement(J, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
135
|
+
className: d(v, p.error)
|
|
136
|
+
}, /* @__PURE__ */ e.createElement(W, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
137
|
+
className: d(M, p.description)
|
|
138
138
|
}, te));
|
|
139
|
-
}, be = () => /* @__PURE__ */ e.createElement(
|
|
139
|
+
}, be = () => /* @__PURE__ */ e.createElement(oe, null);
|
|
140
140
|
export {
|
|
141
141
|
be as PasswordRAC
|
|
142
142
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import r, { useCallback as P, useRef as Q } from "react";
|
|
2
|
-
import { RicosViewer as
|
|
2
|
+
import { RicosViewer as Y } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import {
|
|
6
|
-
import { f as
|
|
7
|
-
import { D as te, E as ne } from "./field-error-headless-
|
|
8
|
-
import { L as ae } from "./field-label-headless-
|
|
4
|
+
import { TextField as w, Group as z, Input as J } from "react-aria-components";
|
|
5
|
+
import { bj as R, bg as D, bb as T, bt as K, bl as W, M as X, Y as Z, G as ee, u as re } from "./form-C6lnbh2O.js";
|
|
6
|
+
import { f as u } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as te, E as ne } from "./field-error-headless-Bpe041x2.js";
|
|
8
|
+
import { L as ae } from "./field-label-headless-BUuK1Ftv.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-DfEb7pBp.js";
|
|
14
|
-
import { u as
|
|
15
|
-
function
|
|
14
|
+
import { u as ue } from "./use-text-input-class-name-BB3V6Q0b.js";
|
|
15
|
+
function ie(e, t) {
|
|
16
16
|
return {
|
|
17
17
|
productId: e.id,
|
|
18
18
|
price: t,
|
|
@@ -27,20 +27,20 @@ function h(e) {
|
|
|
27
27
|
}
|
|
28
28
|
const n = ({ children: e }) => {
|
|
29
29
|
var O, g, A, V;
|
|
30
|
-
const { id: t, value: a, onChange: s, disabled:
|
|
30
|
+
const { id: t, value: a, onChange: s, disabled: i, readOnly: m, required: I, hasError: y, onBlur: o, onFocus: E, FieldLayout: M, validation: C } = R(), { labelId: G, prefixId: q } = 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, b] = oe({
|
|
31
31
|
sourceValue: _,
|
|
32
32
|
format: (l) => N(String(l ?? ""), c),
|
|
33
33
|
regionalFormat: c
|
|
34
34
|
}), $ = P(() => {
|
|
35
35
|
const l = N(F, c);
|
|
36
|
-
|
|
36
|
+
b(l || ""), o == null || o();
|
|
37
37
|
}, [
|
|
38
38
|
F,
|
|
39
39
|
c,
|
|
40
40
|
o,
|
|
41
|
-
|
|
42
|
-
]),
|
|
43
|
-
|
|
41
|
+
b
|
|
42
|
+
]), B = P((l) => {
|
|
43
|
+
b(l);
|
|
44
44
|
const L = h(N(l, c)), j = h(_);
|
|
45
45
|
if (L !== j) {
|
|
46
46
|
if (L === void 0) {
|
|
@@ -48,7 +48,7 @@ const n = ({ children: e }) => {
|
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
s([
|
|
51
|
-
|
|
51
|
+
ie(S, L)
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
54
|
}, [
|
|
@@ -56,33 +56,33 @@ const n = ({ children: e }) => {
|
|
|
56
56
|
S,
|
|
57
57
|
c,
|
|
58
58
|
_,
|
|
59
|
-
|
|
60
|
-
]),
|
|
59
|
+
b
|
|
60
|
+
]), U = u(e, n.Label), k = u(e, n.Input), v = u(e, n.Description), H = u(e, n.Error);
|
|
61
61
|
return /* @__PURE__ */ r.createElement(M, {
|
|
62
62
|
fieldId: t,
|
|
63
|
-
renderLabel: () =>
|
|
64
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
65
|
-
"aria-labelledby": `${
|
|
63
|
+
renderLabel: () => U,
|
|
64
|
+
renderInput: () => /* @__PURE__ */ r.createElement(w, {
|
|
65
|
+
"aria-labelledby": `${G} ${q}`,
|
|
66
66
|
value: a ? F : "",
|
|
67
|
-
onChange:
|
|
68
|
-
isDisabled:
|
|
67
|
+
onChange: B,
|
|
68
|
+
isDisabled: i,
|
|
69
69
|
isReadOnly: m,
|
|
70
|
-
isRequired:
|
|
70
|
+
isRequired: I,
|
|
71
71
|
isInvalid: y,
|
|
72
72
|
onBlur: $,
|
|
73
73
|
onFocus: E
|
|
74
|
-
},
|
|
75
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H,
|
|
74
|
+
}, k),
|
|
75
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, v)
|
|
76
76
|
});
|
|
77
77
|
}, f = ({ children: e, className: t }) => {
|
|
78
|
-
const { disabled: a, hasError: s } = R(),
|
|
79
|
-
return /* @__PURE__ */ r.createElement(
|
|
78
|
+
const { disabled: a, hasError: s } = R(), i = u(e, f.Currency), m = u(e, f.Value);
|
|
79
|
+
return /* @__PURE__ */ r.createElement(z, {
|
|
80
80
|
className: t,
|
|
81
81
|
isDisabled: a,
|
|
82
82
|
isInvalid: s
|
|
83
|
-
},
|
|
83
|
+
}, i, m);
|
|
84
84
|
}, me = ({ className: e }) => {
|
|
85
|
-
const { currency: t } = T(), { t: a } =
|
|
85
|
+
const { currency: t } = T(), { t: a } = K(), { prefixId: s } = D();
|
|
86
86
|
return t ? /* @__PURE__ */ r.createElement("span", {
|
|
87
87
|
id: s,
|
|
88
88
|
"aria-hidden": !1,
|
|
@@ -90,17 +90,17 @@ 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:
|
|
94
|
-
return
|
|
93
|
+
const { id: t, placeholder: a, label: s } = R(), { inputId: i, labelId: m, prefixId: I, ariaDescribedBy: y } = D(), o = Q(null);
|
|
94
|
+
return W(() => {
|
|
95
95
|
var E;
|
|
96
96
|
(E = o.current) == null || E.focus();
|
|
97
|
-
}, t), /* @__PURE__ */ r.createElement(
|
|
97
|
+
}, t), /* @__PURE__ */ r.createElement(J, {
|
|
98
98
|
ref: o,
|
|
99
|
-
id:
|
|
99
|
+
id: i,
|
|
100
100
|
className: e,
|
|
101
101
|
placeholder: a,
|
|
102
102
|
"aria-label": s,
|
|
103
|
-
"aria-labelledby": `${m} ${
|
|
103
|
+
"aria-labelledby": `${m} ${I}`,
|
|
104
104
|
"aria-describedby": y,
|
|
105
105
|
autoComplete: "off"
|
|
106
106
|
});
|
|
@@ -114,13 +114,13 @@ n.Error = ne;
|
|
|
114
114
|
const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", x = {
|
|
115
115
|
inputGroup: de,
|
|
116
116
|
currency: fe
|
|
117
|
-
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(
|
|
117
|
+
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(Y, {
|
|
118
118
|
content: e,
|
|
119
119
|
locale: t
|
|
120
|
-
}),
|
|
121
|
-
const e =
|
|
120
|
+
}), be = () => {
|
|
121
|
+
const e = ue(x.inputGroup);
|
|
122
122
|
return /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(n.Label, {
|
|
123
|
-
className: p(
|
|
123
|
+
className: p(X, d.label)
|
|
124
124
|
}, /* @__PURE__ */ r.createElement(n.Label.Required, {
|
|
125
125
|
className: p(Z, d.requiredMark)
|
|
126
126
|
})), /* @__PURE__ */ r.createElement(n.Input, {
|
|
@@ -134,7 +134,7 @@ const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", x = {
|
|
|
134
134
|
}, /* @__PURE__ */ r.createElement(le, null), /* @__PURE__ */ r.createElement(n.Error.Text, null)), /* @__PURE__ */ r.createElement(n.Description, {
|
|
135
135
|
className: p(re, d.description)
|
|
136
136
|
}, Ee));
|
|
137
|
-
}, Pe = () => /* @__PURE__ */ r.createElement(
|
|
137
|
+
}, Pe = () => /* @__PURE__ */ r.createElement(be, null);
|
|
138
138
|
export {
|
|
139
139
|
Pe as PaymentInputRAC
|
|
140
140
|
};
|