@wix/form-elements 1.80.0 → 1.81.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-BYisg594.js → appointment-rac-DmwbqZse.js} +82 -82
- package/dist/component/{bookings-address-rac-CsILj67y.js → bookings-address-rac-RCzVU87c.js} +1 -1
- package/dist/component/{bookings-email-rac-CVmAPK_5.js → bookings-email-rac-Df_Wte1_.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Dh41-RQ_.js → bookings-first-name-rac-BmdRGYxF.js} +1 -1
- package/dist/component/{bookings-header-rac-B6Fgfiz5.js → bookings-header-rac-DewQWtkZ.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CuY8aaXv.js → bookings-last-name-rac-DmmNBuqy.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-B8JBcGs8.js → bookings-login-bar-rac-QskvFo0C.js} +5 -5
- package/dist/component/{bookings-phone-rac-Bspc3F7g.js → bookings-phone-rac-7wn8IXna.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-B1o0ZcfK.js → bookings-rich-text-rac-B5nk0BlD.js} +1 -1
- package/dist/component/{checkbox-field-rac-thaR4lXB.js → checkbox-field-rac-BnVNfYWL.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-DryeaW7l.js → checkbox-group-field-headless-Bx5Y-RMP.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CJfbT13O.js → checkbox-group-field-rac-CZW28rj5.js} +7 -7
- package/dist/component/{checkbox-group-rac-BwI7UHzO.js → checkbox-group-rac-B20t8dTB.js} +1 -1
- package/dist/component/{checkbox-rac-HRTKCRY4.js → checkbox-rac-ifC6qSE8.js} +1 -1
- package/dist/component/{contacts-address-rac-BIn9plXb.js → contacts-address-rac-XJRKvPlp.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-oGP8bO3I.js → contacts-birthdate-rac-CKYESrPO.js} +1 -1
- package/dist/component/{contacts-company-rac-ChdjTt8-.js → contacts-company-rac-BXwEeb0p.js} +1 -1
- package/dist/component/{contacts-email-rac-BUluFo-o.js → contacts-email-rac-D8Yspo_m.js} +1 -1
- package/dist/component/{contacts-first-name-rac-tmboINSq.js → contacts-first-name-rac-mvCGP1LJ.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BaD5OBVf.js → contacts-last-name-rac-Clg9RXal.js} +1 -1
- package/dist/component/{contacts-phone-rac-BoX2-IEP.js → contacts-phone-rac-qEwjhByI.js} +1 -1
- package/dist/component/{contacts-position-rac-BNDskehr.js → contacts-position-rac-Bh8fvf2M.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CVaQG4Qy.js → contacts-subscribe-rac-DEQ2XkZo.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-Dxgxcv7c.js → contacts-tax-id-rac-0DUZ4tJz.js} +1 -1
- package/dist/component/{date-availability-BbrBYxgL.js → date-availability-2ek2RtXx.js} +1 -1
- package/dist/component/{date-input-field-rac-oibxt2dz.js → date-input-field-rac-Bp4SQB-t.js} +29 -29
- package/dist/component/{date-input-rac-h2vrPoah.js → date-input-rac-CYsJcMe5.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cr9PMglz.js → date-picker-field-rac-BGQvnSYI.js} +9 -9
- package/dist/component/{date-picker-rac-8BOHRpaJ.js → date-picker-rac-BVncggYR.js} +1 -1
- package/dist/component/{date-time-input-field-rac-C7CZ4i6-.js → date-time-input-field-rac-B1mggelc.js} +33 -33
- package/dist/component/{date-time-input-rac-BARK1BJc.js → date-time-input-rac-DzdCno0L.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CWc0W-zr.js → dext-checkbox-group-rac-CNCpeolD.js} +2 -2
- package/dist/component/{dext-checkbox-rac-NKcTYwpg.js → dext-checkbox-rac-BYDQ58Mo.js} +1 -1
- package/dist/component/{dext-date-picker-rac-SllyCpYt.js → dext-date-picker-rac-aYYk8Nrl.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-JT9Pa7TG.js → dext-date-time-input-rac-v2v974p5.js} +1 -1
- package/dist/component/{dext-dropdown-rac-aBU9t_U4.js → dext-dropdown-rac-C846KZCe.js} +1 -1
- package/dist/component/{dext-email-rac-DKoJiyjE.js → dext-email-rac-izjbfME9.js} +1 -1
- package/dist/component/{dext-number-input-rac-BHkzAyzd.js → dext-number-input-rac-CnOFsD7l.js} +1 -1
- package/dist/component/{dext-phone-rac-Ou-fxcN5.js → dext-phone-rac-D8GMXD88.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CH0WlRsF.js → dext-radio-group-rac-BtiyGCRh.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D_jXx_VN.js → dext-rating-input-rac-BHJ1kitb.js} +1 -1
- package/dist/component/{dext-tags-rac-DBaT-lQT.js → dext-tags-rac-CvNjwS5R.js} +2 -2
- package/dist/component/{dext-text-area-rac-DWcCktYi.js → dext-text-area-rac-X5L0Q3sC.js} +1 -1
- package/dist/component/{dext-text-input-rac-CBX2wgW-.js → dext-text-input-rac-swkyAJqC.js} +1 -1
- package/dist/component/{dext-url-input-rac-DaqWDzIt.js → dext-url-input-rac-BYlXOAkz.js} +1 -1
- package/dist/component/donation-rac-CDWLBZZM.js +318 -0
- package/dist/component/{dropdown-field-headless-D7mOjVEJ.js → dropdown-field-headless-JJzbZvps.js} +3 -3
- package/dist/component/{dropdown-field-rac-DsRuMFo4.js → dropdown-field-rac-BodpIQ9Q.js} +5 -5
- package/dist/component/{dropdown-rac-8Fe66UGi.js → dropdown-rac-Bfbxxx9k.js} +1 -1
- package/dist/component/{ecom-address-rac-DbR_WEgu.js → ecom-address-rac-BCnsL5tr.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-ByQsK79_.js → ecom-subscription-checkbox-rac-CNSdI_ty.js} +3 -3
- package/dist/component/{email-input-field-rac-BS0bFS0-.js → email-input-field-rac-Btaa4O5T.js} +48 -48
- package/dist/component/{events-repeater-rac-xhXarOw_.js → events-repeater-rac-xBwqJddt.js} +10 -10
- package/dist/component/{events-rsvp-rac-BLq-ro2E.js → events-rsvp-rac-D90PwkHd.js} +3 -3
- package/dist/component/{field-error-headless-C7IUibkK.js → field-error-headless-BErhh9GG.js} +1 -1
- package/dist/component/{field-label-headless-BQFy2iAr.js → field-label-headless-BGyK-5xW.js} +1 -1
- package/dist/component/{file-upload-rac-B84R44Bt.js → file-upload-rac-MxH3CVml.js} +21 -21
- package/dist/component/{fixed-payment-rac-D7Asu-Ws.js → fixed-payment-rac-DpBA9irF.js} +10 -10
- package/dist/component/{form-element-classes-BuM-vthE.js → form-element-classes-jC8D0LnK.js} +77 -63
- package/dist/component/{form-BmioUKtQ.js → form-f0tqdMye.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CN5SyZpH.js → header-field-rac-BXxFqu9u.js} +3 -3
- package/dist/component/{header-rac-B9ITu2YO.js → header-rac-BN70esac.js} +1 -1
- package/dist/component/image-choice-rac-DLBGIBXL.js +158 -0
- package/dist/component/{index-3q1aCLZ8.js → index-BvB-uE1H.js} +2 -2
- package/dist/component/{index-CvWMG1x1.js → index-DXLEHYlA.js} +4 -4
- package/dist/component/{isObjectLike-xDv2bEeI.js → isObjectLike-BYOX5XY4.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BLDqei5I.js → multiline-address-field-rac-fcQYnPlO.js} +52 -52
- package/dist/component/{multiline-address-rac-Dy9Km8P8.js → multiline-address-rac-D82Gbj3n.js} +1 -1
- package/dist/component/{number-input-field-rac-Dxu4WHzh.js → number-input-field-rac-B0-4Rz3w.js} +16 -16
- package/dist/component/{number-input-rac-hHEmwPao.js → number-input-rac-Bnsvb-SO.js} +1 -1
- package/dist/component/{password-rac-CEylicEt.js → password-rac-BdBjFa8y.js} +15 -15
- package/dist/component/{payment-input-rac-bvK_YQ78.js → payment-input-rac-DkAGOvaF.js} +18 -18
- package/dist/component/{phone-input-field-rac-CqYNWmiA.js → phone-input-field-rac-Ce_wuE46.js} +54 -54
- package/dist/component/{phone-rac-C72xrPL6.js → phone-rac-DslINtcH.js} +1 -1
- package/dist/component/{product-list-rac-DbftZgIh.js → product-list-rac-C4P_SOyG.js} +25 -25
- package/dist/component/{quiz-radio-group-rac-Bkg5poft.js → quiz-radio-group-rac-noy4fmD8.js} +2 -2
- package/dist/component/{radio-button-module-classes-Do4JmHrh.js → radio-button-module-classes-DXQ1UlmI.js} +3 -3
- package/dist/component/{radio-group-field-rac-BkoqJYp4.js → radio-group-field-rac-CYBDq7R1.js} +5 -5
- package/dist/component/{radio-group-rac-BGp1iRNt.js → radio-group-rac-CGHQFyJY.js} +1 -1
- package/dist/component/{rating-input-field-rac-Bozwq2E7.js → rating-input-field-rac-elaferlI.js} +18 -18
- package/dist/component/{rating-input-rac-Cxha4VPg.js → rating-input-rac-fnOtTKN8.js} +1 -1
- package/dist/component/{rich-content-rac.module-ZXCfVPY-.js → rich-content-rac.module-DbwuwQeo.js} +1 -1
- package/dist/component/{rich-text-field-rac-Ct4KowMZ.js → rich-text-field-rac-DtcQC8zU.js} +3 -3
- package/dist/component/{rich-text-rac-Cek5wjXa.js → rich-text-rac-CuT97sby.js} +1 -1
- package/dist/component/{service-dropdown-rac-B3K93XxF.js → service-dropdown-rac-rk2tzikX.js} +24 -24
- package/dist/component/{services-multi-choice-rac-2RTQqyG6.js → services-multi-choice-rac-BMQyF_xs.js} +7 -7
- package/dist/component/{signature-rac-BIbRkW1j.js → signature-rac-DeV9C6ta.js} +41 -41
- package/dist/component/{submit-button-rac-DofUaqHk.js → submit-button-rac-BpN-FYtM.js} +2 -2
- package/dist/component/tags-field-rac-ByC9DnyH.js +217 -0
- package/dist/component/{tags-rac-DuMX91gd.js → tags-rac-Dabz4jHd.js} +1 -1
- package/dist/component/{text-area-field-rac-BbHdTAJP.js → text-area-field-rac-CtSa8XW_.js} +14 -14
- package/dist/component/{text-area-rac-B9lDzZAb.js → text-area-rac-CDLF-_56.js} +1 -1
- package/dist/component/{text-input-field-rac-B_csZjOh.js → text-input-field-rac-C6fQYKhI.js} +5 -5
- package/dist/component/{text-input-headless-CVOWyi55.js → text-input-headless-BwVLU9cp.js} +3 -3
- package/dist/component/{text-input-rac-DowwSRpa.js → text-input-rac-CoGTzfo1.js} +1 -1
- package/dist/component/{time-input-rac-D9SXITBr.js → time-input-rac-DQDupKTA.js} +17 -17
- package/dist/component/{url-input-field-rac-BxT0Lgly.js → url-input-field-rac-4T8gcMHH.js} +8 -8
- package/dist/component/{url-input-rac-GX9rvIJd.js → url-input-rac-_d6XRdKX.js} +1 -1
- package/dist/component/{use-element-state-class-name-nCwOVSGM.js → use-element-state-class-name-BqmaTba3.js} +1 -1
- package/dist/component/{use-service-options-base-BO3Ackpl.js → use-service-options-base-CRgxxz7b.js} +1 -1
- package/package.json +2 -2
- package/dist/component/donation-rac-D1rcPi17.js +0 -307
- package/dist/component/image-choice-rac-9ncRxwZd.js +0 -146
- package/dist/component/tags-field-rac-DTOthwA5.js +0 -206
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as R, V as _, Q as de, s as O, g as Ge, B as Be, N as qe, I as He, l as A, P as Ee, v as re, S as Fe, b as B, m as M, a3 as Te, o as je, n as he, p as q } from "./form-
|
|
2
|
-
import { _ as Mn } from "./form-
|
|
1
|
+
import { d as R, V as _, Q as de, s as O, g as Ge, B as Be, N as qe, I as He, l as A, P as Ee, v as re, S as Fe, b as B, m as M, a3 as Te, o as je, n as he, p as q } from "./form-f0tqdMye.js";
|
|
2
|
+
import { _ as Mn } from "./form-f0tqdMye.js";
|
|
3
3
|
import Xe from "ajv";
|
|
4
4
|
import ke from "ajv-errors";
|
|
5
5
|
import We from "ajv-formats";
|
|
6
6
|
import Ke from "fast-deep-equal";
|
|
7
7
|
import { parsePhoneNumber as ze, parsePhoneNumberWithError as Ve, ParseError as Ze } from "libphonenumber-js/max";
|
|
8
8
|
import Je from "libphonenumber-js/metadata.max.json";
|
|
9
|
-
import { p as Qe, i as et } from "./date-availability-
|
|
10
|
-
import { a as Sn } from "./date-availability-
|
|
9
|
+
import { p as Qe, i as et } from "./date-availability-2ek2RtXx.js";
|
|
10
|
+
import { a as Sn } from "./date-availability-2ek2RtXx.js";
|
|
11
11
|
import { C as tt } from "./calling-country-codes-PyWuOTmF.js";
|
|
12
12
|
function rt(e) {
|
|
13
13
|
var t, r;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
2
|
import C from "classnames";
|
|
3
3
|
import n, { useMemo as w, createContext as We, useContext as De, useState as ye, useRef as B, useCallback as D, useEffect as Ve } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as _t } from "react-aria";
|
|
5
|
-
import { ad as bt, c as ft, a9 as Pt, ab as yt, G as Tt, H as Mt, u as qt, z as V, F as K, as as Me, a2 as at, ai as P, af as T, ak as le, ae as Ct, Q as wt, C as he, a0 as xt, a4 as Bt, ap as kt, aj as $t, ao as Ut, a7 as Wt, Y as Vt, a6 as Kt, al as Yt, j as Ht } from "./form-
|
|
5
|
+
import { ad as bt, c as ft, a9 as Pt, ab as yt, G as Tt, H as Mt, u as qt, z as V, F as K, as as Me, a2 as at, ai as P, af as T, ak as le, ae as Ct, Q as wt, C as he, a0 as xt, a4 as Bt, ap as kt, aj as $t, ao as Ut, a7 as Wt, Y as Vt, a6 as Kt, al as Yt, j as Ht } from "./form-f0tqdMye.js";
|
|
6
6
|
import { f as E, a as h } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
|
|
8
8
|
import { TextField as Ce, Input as ie, ComboBoxStateContext as It, ComboBox as Re, Popover as Ae, ListBox as _e, ListBoxItem as Pe, Group as Lt, Button as Nt } from "react-aria-components";
|
|
9
|
-
import { D as ce, E as de } from "./field-error-headless-
|
|
10
|
-
import { L as ue } from "./field-label-headless-
|
|
11
|
-
import { e as
|
|
9
|
+
import { D as ce, E as de } from "./field-error-headless-BErhh9GG.js";
|
|
10
|
+
import { L as ue } from "./field-label-headless-BGyK-5xW.js";
|
|
11
|
+
import { e as Gt, c as Xt, a as zt, r as Ot } from "./isObjectLike-BYOX5XY4.js";
|
|
12
12
|
import { u as Qt } from "./use-invoke-callback-UH73A_J3.js";
|
|
13
13
|
import { C as lt } from "./chevron-down-icon-CcpVm6B-.js";
|
|
14
|
-
import { E as
|
|
14
|
+
import { E as z } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { H as fe } from "./custom-focus-class-_483Pkwp.js";
|
|
16
16
|
import { s as f } from "./field-rac.module-ColNPUt0.js";
|
|
17
|
-
import {
|
|
17
|
+
import { y as Q, O as Z, x as ee, A as ge, o as te, i as ne } from "./form-element-classes-jC8D0LnK.js";
|
|
18
18
|
const Zt = (e, t, o) => {
|
|
19
19
|
var a, l, i, s;
|
|
20
20
|
const r = (a = e.steps) == null ? void 0 : a.map((d) => {
|
|
@@ -311,7 +311,7 @@ var we, it;
|
|
|
311
311
|
function fn() {
|
|
312
312
|
if (it) return we;
|
|
313
313
|
it = 1;
|
|
314
|
-
var e =
|
|
314
|
+
var e = Gt(), t = function() {
|
|
315
315
|
return e.Date.now();
|
|
316
316
|
};
|
|
317
317
|
return we = t, we;
|
|
@@ -342,7 +342,7 @@ var ke, ut;
|
|
|
342
342
|
function In() {
|
|
343
343
|
if (ut) return ke;
|
|
344
344
|
ut = 1;
|
|
345
|
-
var e =
|
|
345
|
+
var e = Xt(), t = zt(), o = "[object Symbol]";
|
|
346
346
|
function r(a) {
|
|
347
347
|
return typeof a == "symbol" || t(a) && e(a) == o;
|
|
348
348
|
}
|
|
@@ -1009,8 +1009,8 @@ const $ = ({ children: e }) => {
|
|
|
1009
1009
|
placeholder: r,
|
|
1010
1010
|
onFocus: i
|
|
1011
1011
|
});
|
|
1012
|
-
},
|
|
1013
|
-
const o = E(e,
|
|
1012
|
+
}, Ge = ({ children: e, className: t }) => {
|
|
1013
|
+
const o = E(e, Ge.Option);
|
|
1014
1014
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1015
1015
|
className: t,
|
|
1016
1016
|
containerPadding: 0,
|
|
@@ -1029,11 +1029,11 @@ const $ = ({ children: e }) => {
|
|
|
1029
1029
|
textValue: r
|
|
1030
1030
|
}, r);
|
|
1031
1031
|
};
|
|
1032
|
-
|
|
1032
|
+
Ge.Option = $n;
|
|
1033
1033
|
Je.Input = kn;
|
|
1034
1034
|
$.Label = ue;
|
|
1035
1035
|
$.Control = Je;
|
|
1036
|
-
$.Options =
|
|
1036
|
+
$.Options = Ge;
|
|
1037
1037
|
$.Description = ce;
|
|
1038
1038
|
$.Error = de;
|
|
1039
1039
|
const U = ({ children: e }) => {
|
|
@@ -1149,8 +1149,8 @@ const U = ({ children: e }) => {
|
|
|
1149
1149
|
placeholder: r,
|
|
1150
1150
|
onFocus: i
|
|
1151
1151
|
});
|
|
1152
|
-
},
|
|
1153
|
-
const o = E(e,
|
|
1152
|
+
}, Xe = ({ children: e, className: t }) => {
|
|
1153
|
+
const o = E(e, Xe.Option);
|
|
1154
1154
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1155
1155
|
className: t,
|
|
1156
1156
|
containerPadding: 0,
|
|
@@ -1169,10 +1169,10 @@ const U = ({ children: e }) => {
|
|
|
1169
1169
|
textValue: r
|
|
1170
1170
|
}, r);
|
|
1171
1171
|
};
|
|
1172
|
-
|
|
1172
|
+
Xe.Option = Vn;
|
|
1173
1173
|
U.Label = ue;
|
|
1174
1174
|
U.Input = Wn;
|
|
1175
|
-
U.Options =
|
|
1175
|
+
U.Options = Xe;
|
|
1176
1176
|
U.Description = ce;
|
|
1177
1177
|
U.Error = de;
|
|
1178
1178
|
const ae = ({ children: e }) => {
|
|
@@ -1284,8 +1284,8 @@ const H = ({ children: e }) => {
|
|
|
1284
1284
|
}, e);
|
|
1285
1285
|
Se.Input = Yn;
|
|
1286
1286
|
Se.Trigger = Hn;
|
|
1287
|
-
const
|
|
1288
|
-
const { options: r } = o, a = E(e,
|
|
1287
|
+
const ze = ({ children: e, className: t, ...o }) => {
|
|
1288
|
+
const { options: r } = o, a = E(e, ze.Option);
|
|
1289
1289
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1290
1290
|
className: t,
|
|
1291
1291
|
containerPadding: 0,
|
|
@@ -1303,17 +1303,17 @@ const Xe = ({ children: e, className: t, ...o }) => {
|
|
|
1303
1303
|
textValue: r
|
|
1304
1304
|
}, r);
|
|
1305
1305
|
};
|
|
1306
|
-
|
|
1306
|
+
ze.Option = jn;
|
|
1307
1307
|
H.Label = ue;
|
|
1308
1308
|
H.Control = Se;
|
|
1309
|
-
H.Options =
|
|
1309
|
+
H.Options = ze;
|
|
1310
1310
|
H.Description = ce;
|
|
1311
1311
|
H.Error = de;
|
|
1312
|
-
const Jn = () => me("country"),
|
|
1312
|
+
const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("city"), zn = () => me("addressLine"), Qn = () => me("addressLine2"), Zn = () => me("postalCode"), er = () => me("streetName"), tr = () => me("streetNumber"), nr = () => me("apartment"), rr = {
|
|
1313
1313
|
[K.MLA_COUNTRY]: Jn,
|
|
1314
|
-
[K.MLA_SUBDIVISION]:
|
|
1315
|
-
[K.MLA_CITY]:
|
|
1316
|
-
[K.MLA_ADDRESS_LINE]:
|
|
1314
|
+
[K.MLA_SUBDIVISION]: Gn,
|
|
1315
|
+
[K.MLA_CITY]: Xn,
|
|
1316
|
+
[K.MLA_ADDRESS_LINE]: zn,
|
|
1317
1317
|
[K.MLA_ADDRESS_LINE_2]: Qn,
|
|
1318
1318
|
[K.MLA_POSTAL_CODE]: Zn,
|
|
1319
1319
|
[K.MLA_STREET_NAME]: er,
|
|
@@ -1347,9 +1347,9 @@ const Jn = () => me("country"), zn = () => me("subdivision"), Gn = () => me("cit
|
|
|
1347
1347
|
}), j = D((W) => {
|
|
1348
1348
|
if (!r)
|
|
1349
1349
|
return;
|
|
1350
|
-
const
|
|
1351
|
-
...
|
|
1352
|
-
[Ie.COUNTRY]:
|
|
1350
|
+
const G = en(W, q, M), Te = {
|
|
1351
|
+
...G,
|
|
1352
|
+
[Ie.COUNTRY]: G[Ie.COUNTRY] ?? r[Ie.COUNTRY]
|
|
1353
1353
|
};
|
|
1354
1354
|
a == null || a(Te);
|
|
1355
1355
|
}, [
|
|
@@ -1357,16 +1357,16 @@ const Jn = () => me("country"), zn = () => me("subdivision"), Gn = () => me("cit
|
|
|
1357
1357
|
r,
|
|
1358
1358
|
q,
|
|
1359
1359
|
M
|
|
1360
|
-
]), A = D((W,
|
|
1361
|
-
if (q && W === Ie.COUNTRY && (r == null ? void 0 : r[W]) !==
|
|
1360
|
+
]), A = D((W, G) => {
|
|
1361
|
+
if (q && W === Ie.COUNTRY && (r == null ? void 0 : r[W]) !== G) {
|
|
1362
1362
|
a == null || a({
|
|
1363
|
-
[Ie.COUNTRY]:
|
|
1363
|
+
[Ie.COUNTRY]: G
|
|
1364
1364
|
});
|
|
1365
1365
|
return;
|
|
1366
1366
|
}
|
|
1367
1367
|
a == null || a({
|
|
1368
1368
|
...r,
|
|
1369
|
-
[W]:
|
|
1369
|
+
[W]: G
|
|
1370
1370
|
});
|
|
1371
1371
|
}, [
|
|
1372
1372
|
a,
|
|
@@ -1386,8 +1386,8 @@ const Jn = () => me("country"), zn = () => me("subdivision"), Gn = () => me("cit
|
|
|
1386
1386
|
]);
|
|
1387
1387
|
Yt(t, () => {
|
|
1388
1388
|
var Te;
|
|
1389
|
-
const W = s == null ? void 0 : s[0],
|
|
1390
|
-
return
|
|
1389
|
+
const W = s == null ? void 0 : s[0], G = (Te = x == null ? void 0 : x.fields) == null ? void 0 : Te.find((st) => "target" in st && st.target === (W == null ? void 0 : W.errorPath));
|
|
1390
|
+
return G == null ? void 0 : G.id;
|
|
1391
1391
|
});
|
|
1392
1392
|
const Ee = E(e, c.Country), Oe = E(e, c.Subdivision), Qe = E(e, c.City), Ze = E(e, c.AddressLine), et = E(e, c.AddressLine2), tt = E(e, c.PostalCode), nt = E(e, c.StreetName), rt = E(e, c.StreetNumber), ot = E(e, c.Apartment), At = w(() => ({
|
|
1393
1393
|
country: Ee,
|
|
@@ -1474,9 +1474,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1474
1474
|
className: C(f.selectOption, fe)
|
|
1475
1475
|
})), /* @__PURE__ */ n.createElement(c.Country.Error, {
|
|
1476
1476
|
className: C(te, f.error)
|
|
1477
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1477
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Country.Description, {
|
|
1478
1478
|
className: C(ne, f.description)
|
|
1479
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1479
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1480
1480
|
content: e,
|
|
1481
1481
|
locale: t
|
|
1482
1482
|
}))), /* @__PURE__ */ n.createElement(c.AddressLine, null, /* @__PURE__ */ n.createElement(c.AddressLine.Label, {
|
|
@@ -1491,9 +1491,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1491
1491
|
className: C(f.selectOption, fe)
|
|
1492
1492
|
})), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
|
|
1493
1493
|
className: C(te, f.error)
|
|
1494
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1494
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine.Description, {
|
|
1495
1495
|
className: C(ne, f.description)
|
|
1496
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1496
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1497
1497
|
content: e,
|
|
1498
1498
|
locale: t
|
|
1499
1499
|
}))), /* @__PURE__ */ n.createElement(c.AddressLine2, null, /* @__PURE__ */ n.createElement(c.AddressLine2.Label, {
|
|
@@ -1504,9 +1504,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1504
1504
|
className: C(ee, f.input)
|
|
1505
1505
|
}), /* @__PURE__ */ n.createElement(c.AddressLine2.Error, {
|
|
1506
1506
|
className: C(te, f.error)
|
|
1507
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1507
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine2.Description, {
|
|
1508
1508
|
className: C(ne, f.description)
|
|
1509
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1509
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1510
1510
|
content: e,
|
|
1511
1511
|
locale: t
|
|
1512
1512
|
}))), /* @__PURE__ */ n.createElement(c.City, null, /* @__PURE__ */ n.createElement(c.City.Label, {
|
|
@@ -1517,9 +1517,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1517
1517
|
className: C(ee, f.input)
|
|
1518
1518
|
}), /* @__PURE__ */ n.createElement(c.City.Error, {
|
|
1519
1519
|
className: C(te, f.error)
|
|
1520
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1520
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.City.Error.Text, null)), /* @__PURE__ */ n.createElement(c.City.Description, {
|
|
1521
1521
|
className: C(ne, f.description)
|
|
1522
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1522
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1523
1523
|
content: e,
|
|
1524
1524
|
locale: t
|
|
1525
1525
|
}))), /* @__PURE__ */ n.createElement(c.PostalCode, null, /* @__PURE__ */ n.createElement(c.PostalCode.Label, {
|
|
@@ -1536,9 +1536,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1536
1536
|
className: C(f.selectOption, fe)
|
|
1537
1537
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
|
|
1538
1538
|
className: C(te, f.error)
|
|
1539
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1539
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ n.createElement(c.PostalCode.Description, {
|
|
1540
1540
|
className: C(ne, f.description)
|
|
1541
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1541
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1542
1542
|
content: e,
|
|
1543
1543
|
locale: t
|
|
1544
1544
|
}))), /* @__PURE__ */ n.createElement(c.Subdivision, null, /* @__PURE__ */ n.createElement(c.Subdivision.Label, {
|
|
@@ -1559,9 +1559,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1559
1559
|
className: C(f.selectOption, fe)
|
|
1560
1560
|
})), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
|
|
1561
1561
|
className: C(te, f.error)
|
|
1562
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1562
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Subdivision.Description, {
|
|
1563
1563
|
className: C(ne, f.description)
|
|
1564
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1564
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1565
1565
|
content: e,
|
|
1566
1566
|
locale: t
|
|
1567
1567
|
}))), /* @__PURE__ */ n.createElement(c.StreetName, null, /* @__PURE__ */ n.createElement(c.StreetName.Label, {
|
|
@@ -1576,9 +1576,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1576
1576
|
className: C(f.selectOption, fe)
|
|
1577
1577
|
})), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
|
|
1578
1578
|
className: C(te, f.error)
|
|
1579
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1579
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetName.Description, {
|
|
1580
1580
|
className: C(ne, f.description)
|
|
1581
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1581
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1582
1582
|
content: e,
|
|
1583
1583
|
locale: t
|
|
1584
1584
|
}))), /* @__PURE__ */ n.createElement(c.StreetNumber, null, /* @__PURE__ */ n.createElement(c.StreetNumber.Label, {
|
|
@@ -1589,9 +1589,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1589
1589
|
className: C(ee, f.input)
|
|
1590
1590
|
}), /* @__PURE__ */ n.createElement(c.StreetNumber.Error, {
|
|
1591
1591
|
className: C(te, f.error)
|
|
1592
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1592
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetNumber.Description, {
|
|
1593
1593
|
className: C(ne, f.description)
|
|
1594
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1594
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1595
1595
|
content: e,
|
|
1596
1596
|
locale: t
|
|
1597
1597
|
}))), /* @__PURE__ */ n.createElement(c.Apartment, null, /* @__PURE__ */ n.createElement(c.Apartment.Label, {
|
|
@@ -1602,9 +1602,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1602
1602
|
className: C(ee, f.input)
|
|
1603
1603
|
}), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
|
|
1604
1604
|
className: C(te, f.error)
|
|
1605
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1605
|
+
}, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Apartment.Description, {
|
|
1606
1606
|
className: C(ne, f.description)
|
|
1607
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1607
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
|
|
1608
1608
|
content: e,
|
|
1609
1609
|
locale: t
|
|
1610
1610
|
}))));
|
package/dist/component/{number-input-field-rac-Dxu4WHzh.js → number-input-field-rac-B0-4Rz3w.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 { ai as C, af as S, as as H, ak as J } from "./form-
|
|
3
|
+
import r, { useState as U, useCallback as Q, useEffect as $, useRef as j } from "react";
|
|
4
|
+
import { NumberField as z, Input as G } from "react-aria-components";
|
|
5
|
+
import { ai as C, af as S, as as H, ak as J } from "./form-f0tqdMye.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-BErhh9GG.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-BGyK-5xW.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
12
|
import { s as i } from "./field-rac.module-ColNPUt0.js";
|
|
13
|
-
import {
|
|
13
|
+
import { y as re, O as te, x as ne, o as ae, i as se } from "./form-element-classes-jC8D0LnK.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: y } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1, A = (L = t == null ? void 0 : t.number) == null ? void 0 : L.maximum,
|
|
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: y } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1, A = (L = t == null ? void 0 : t.number) == null ? void 0 : L.maximum, x = (R = t == null ? void 0 : t.number) == null ? void 0 : R.minimum, M = _(s), [T, I] = U(M), V = w(b), g = d(n, e.Label), h = d(n, e.Input), k = d(n, e.Description), q = d(n, e.Error), B = Q((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -24,33 +24,33 @@ const e = ({ children: n }) => {
|
|
|
24
24
|
F,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return $(() => {
|
|
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: () => g,
|
|
34
|
+
renderInput: () => /* @__PURE__ */ r.createElement(z, {
|
|
35
35
|
"aria-labelledby": y,
|
|
36
|
-
value:
|
|
36
|
+
value: T,
|
|
37
37
|
onChange: B,
|
|
38
38
|
isDisabled: p,
|
|
39
39
|
isRequired: E,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: c,
|
|
42
|
-
onBlur:
|
|
42
|
+
onBlur: V,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
44
|
+
minValue: x ?? void 0,
|
|
45
45
|
maxValue: A ?? void 0
|
|
46
|
-
},
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
46
|
+
}, h),
|
|
47
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, q, k)
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: n }) => {
|
|
50
50
|
var c;
|
|
51
51
|
const { t: a } = H(), { 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 =
|
|
53
|
+
const u = j(null);
|
|
54
54
|
return J(() => {
|
|
55
55
|
var t;
|
|
56
56
|
(t = u.current) == null || t.focus();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
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 { ai as
|
|
4
|
+
import { ai as p, af as I, ak as x, as as A } from "./form-f0tqdMye.js";
|
|
5
5
|
import { TextField as B, Group as P, Input as V, Button as v } from "react-aria-components";
|
|
6
|
-
import { f as
|
|
7
|
-
import { D as M, E as k } from "./field-error-headless-
|
|
8
|
-
import { L as q } from "./field-label-headless-
|
|
6
|
+
import { f as E, a as g } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as M, E as k } from "./field-error-headless-BErhh9GG.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-BGyK-5xW.js";
|
|
9
9
|
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as j } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as u } from "./field-rac.module-ColNPUt0.js";
|
|
12
|
-
import {
|
|
12
|
+
import { y as H, O as W, x as Z, o as G, i as Q } from "./form-element-classes-jC8D0LnK.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 } =
|
|
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,
|
|
@@ -32,8 +32,8 @@ const t = ({ children: r, className: o }) => {
|
|
|
32
32
|
})),
|
|
33
33
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, S)
|
|
34
34
|
});
|
|
35
|
-
},
|
|
36
|
-
const { isVisible: s, onToggleVisibility: c } = i, { disabled: l, hasError: m } =
|
|
35
|
+
}, $ = ({ children: r, className: o, ...i }) => {
|
|
36
|
+
const { isVisible: s, onToggleVisibility: c } = i, { disabled: l, hasError: m } = p(), n = E(r, t.Input), a = E(r, t.Toggle);
|
|
37
37
|
return /* @__PURE__ */ e.createElement(P, {
|
|
38
38
|
className: o,
|
|
39
39
|
isDisabled: l,
|
|
@@ -44,8 +44,8 @@ const t = ({ children: r, className: o }) => {
|
|
|
44
44
|
isVisible: s,
|
|
45
45
|
onToggleVisibility: c
|
|
46
46
|
}));
|
|
47
|
-
},
|
|
48
|
-
const { isVisible: i } = o, { id: s, placeholder: c } =
|
|
47
|
+
}, z = ({ className: r, ...o }) => {
|
|
48
|
+
const { isVisible: i } = o, { id: s, placeholder: c } = p(), { inputId: l, ariaDescribedBy: m } = I(), n = N(null);
|
|
49
49
|
return x(() => {
|
|
50
50
|
var a;
|
|
51
51
|
(a = n.current) == null || a.focus();
|
|
@@ -58,7 +58,7 @@ const t = ({ children: r, className: o }) => {
|
|
|
58
58
|
placeholder: c
|
|
59
59
|
});
|
|
60
60
|
}, J = ({ className: r, showPasswordTooltipText: o, hidePasswordTooltipText: i, children: s, ...c }) => {
|
|
61
|
-
const { isVisible: l, onToggleVisibility: m } = c, { disabled: n } =
|
|
61
|
+
const { isVisible: l, onToggleVisibility: m } = c, { disabled: n } = p(), a = l ? i : o;
|
|
62
62
|
return /* @__PURE__ */ e.createElement(v, {
|
|
63
63
|
type: "button",
|
|
64
64
|
isDisabled: n,
|
|
@@ -71,8 +71,8 @@ const t = ({ children: r, className: o }) => {
|
|
|
71
71
|
}));
|
|
72
72
|
};
|
|
73
73
|
t.Label = q;
|
|
74
|
-
t.Control =
|
|
75
|
-
t.Input =
|
|
74
|
+
t.Control = $;
|
|
75
|
+
t.Input = z;
|
|
76
76
|
t.Toggle = J;
|
|
77
77
|
t.Description = M;
|
|
78
78
|
t.Error = k;
|
|
@@ -132,9 +132,9 @@ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
132
132
|
showPasswordTooltipText: r("forms.widget.modals.show-password-tooltip"),
|
|
133
133
|
hidePasswordTooltipText: r("forms.widget.modals.hide-password-tooltip")
|
|
134
134
|
}, ({ isVisible: o }) => o ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
135
|
-
className: d(
|
|
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(Q, 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 w } from "@wix/ricos/viewer";
|
|
3
3
|
import i from "classnames";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import { ai as D, af as S, ab as
|
|
4
|
+
import { TextField as z, Group as J, Input as K } from "react-aria-components";
|
|
5
|
+
import { ai as D, af as S, ab as T, as as W, ak as X } from "./form-f0tqdMye.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-BErhh9GG.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-BGyK-5xW.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
13
|
import { s as u } from "./field-rac.module-ColNPUt0.js";
|
|
14
|
-
import {
|
|
14
|
+
import { y as se, O as oe, x as le, o as ce, i as ie } from "./form-element-classes-jC8D0LnK.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, A,
|
|
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 } =
|
|
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 } = T(), 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)), Q = h(C);
|
|
45
|
+
if (L !== Q) {
|
|
46
46
|
if (L === void 0) {
|
|
47
47
|
s(null);
|
|
48
48
|
return;
|
|
@@ -61,7 +61,7 @@ const n = ({ children: e }) => {
|
|
|
61
61
|
return /* @__PURE__ */ r.createElement(M, {
|
|
62
62
|
fieldId: t,
|
|
63
63
|
renderLabel: () => k,
|
|
64
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
64
|
+
renderInput: () => /* @__PURE__ */ r.createElement(z, {
|
|
65
65
|
"aria-labelledby": `${q} ${G}`,
|
|
66
66
|
value: a ? F : "",
|
|
67
67
|
onChange: U,
|
|
@@ -82,7 +82,7 @@ const n = ({ children: e }) => {
|
|
|
82
82
|
isInvalid: s
|
|
83
83
|
}, p, d);
|
|
84
84
|
}, me = ({ className: e }) => {
|
|
85
|
-
const { currency: t } =
|
|
85
|
+
const { currency: t } = T(), { t: a } = W(), { prefixId: s } = S();
|
|
86
86
|
return t ? /* @__PURE__ */ r.createElement("span", {
|
|
87
87
|
id: s,
|
|
88
88
|
"aria-hidden": !1,
|
|
@@ -90,7 +90,7 @@ 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
95
|
var E;
|
|
96
96
|
(E = o.current) == null || E.focus();
|
|
@@ -111,10 +111,10 @@ n.Label = ee;
|
|
|
111
111
|
n.Input = f;
|
|
112
112
|
n.Description = Y;
|
|
113
113
|
n.Error = Z;
|
|
114
|
-
const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14",
|
|
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(w, {
|
|
118
118
|
content: e,
|
|
119
119
|
locale: t
|
|
120
120
|
}), Ie = () => /* @__PURE__ */ r.createElement(n, null, /* @__PURE__ */ r.createElement(n.Label, {
|
|
@@ -122,9 +122,9 @@ const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", T = {
|
|
|
122
122
|
}, /* @__PURE__ */ r.createElement(n.Label.Required, {
|
|
123
123
|
className: i(oe, u.requiredMark)
|
|
124
124
|
})), /* @__PURE__ */ r.createElement(n.Input, {
|
|
125
|
-
className: i(le, u.input,
|
|
125
|
+
className: i(le, u.input, x.inputGroup)
|
|
126
126
|
}, /* @__PURE__ */ r.createElement(n.Input.Currency, {
|
|
127
|
-
className:
|
|
127
|
+
className: x.currency
|
|
128
128
|
}), /* @__PURE__ */ r.createElement(n.Input.Value, {
|
|
129
129
|
className: i(u.innerInput, ae)
|
|
130
130
|
})), /* @__PURE__ */ r.createElement(n.Error, {
|