@wix/form-elements 1.108.0 → 1.109.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-ZAp8oWbK.js → appointment-rac-C9-XwsPI.js} +60 -60
- package/dist/component/{bookings-address-rac-x-Az7vHf.js → bookings-address-rac-jrrCPWjw.js} +1 -1
- package/dist/component/{bookings-email-rac-MoF_CaqB.js → bookings-email-rac-J9-RMEbf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CWh3Rb0M.js → bookings-first-name-rac-CH7-6JmA.js} +1 -1
- package/dist/component/{bookings-header-rac-BVTiXUWk.js → bookings-header-rac-C2JV-ciN.js} +1 -1
- package/dist/component/{bookings-last-name-rac-kXRRlyHl.js → bookings-last-name-rac-0a9CwiaV.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C4Zr6kXE.js → bookings-login-bar-rac-4Mb7MQYe.js} +3 -3
- package/dist/component/{bookings-phone-rac-2rz1m_xi.js → bookings-phone-rac-vYx5r5jn.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BEjGypQw.js → bookings-rich-text-rac-CWg1FgUp.js} +1 -1
- package/dist/component/{checkbox-field-rac-DwEQLIaz.js → checkbox-field-rac-Dwx1leKA.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-BsOww_QB.js → checkbox-group-field-headless-AFWgXzx_.js} +8 -8
- package/dist/component/{checkbox-group-field-rac-DTcZcVS6.js → checkbox-group-field-rac-CO8kmWJp.js} +4 -4
- package/dist/component/{checkbox-group-rac-DQsML-pW.js → checkbox-group-rac-_79HsFF4.js} +1 -1
- package/dist/component/{checkbox-rac-irEBBOxP.js → checkbox-rac-B_tbMfjo.js} +1 -1
- package/dist/component/{contacts-address-rac-B5bSAYrm.js → contacts-address-rac-SJ5Tvzd0.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DyScj8f4.js → contacts-birthdate-rac-BU1L3sbW.js} +1 -1
- package/dist/component/{contacts-company-rac-C5X9-jXa.js → contacts-company-rac-Y4B8KhDa.js} +1 -1
- package/dist/component/{contacts-email-rac-B0vkfmrS.js → contacts-email-rac-CQW84o7C.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Cfil3U_e.js → contacts-first-name-rac-Dtai-wtH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CtPLE-7-.js → contacts-last-name-rac--ixuu3ri.js} +1 -1
- package/dist/component/{contacts-phone-rac-YkzsAoBZ.js → contacts-phone-rac-HOHfSvT-.js} +1 -1
- package/dist/component/{contacts-position-rac-BS4j8QC-.js → contacts-position-rac-BPMkh6yf.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-z_9VsEZL.js → contacts-subscribe-rac-D0_RMwJb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WFkmKyZv.js → contacts-tax-id-rac-CZJmMiVf.js} +1 -1
- package/dist/component/{date-availability-NN3rxosk.js → date-availability-C4dDHvuc.js} +1 -1
- package/dist/component/{date-input-field-rac-mdhEC3oq.js → date-input-field-rac-8oERZcqh.js} +64 -64
- package/dist/component/{date-input-rac-CGciuoTx.js → date-input-rac-CYRojmW6.js} +1 -1
- package/dist/component/{date-picker-field-rac-CRZVODfF.js → date-picker-field-rac-CIspU7No.js} +31 -31
- package/dist/component/{date-picker-rac-Bfbvjy8W.js → date-picker-rac-D0Y0zf2J.js} +1 -1
- package/dist/component/{date-time-input-field-rac-TDWBXZ44.js → date-time-input-field-rac-0daWK65I.js} +70 -70
- package/dist/component/{date-time-input-rac-DY0qdSix.js → date-time-input-rac-BemKPk1j.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BFGM7SOt.js → dext-checkbox-group-rac-BpFNn56W.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DPZvTeUZ.js → dext-checkbox-rac-DOISgubJ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Xd5kojsQ.js → dext-date-picker-rac-CNGhFg_g.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C0RIdxJW.js → dext-date-time-input-rac-BuUIvJRr.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D1m8vJvm.js → dext-dropdown-rac-DtND-Dbo.js} +1 -1
- package/dist/component/{dext-email-rac-BC81RFYY.js → dext-email-rac-CmjLFOi8.js} +1 -1
- package/dist/component/{dext-number-input-rac-Z_ih9FfX.js → dext-number-input-rac-DHTNg1dh.js} +1 -1
- package/dist/component/{dext-phone-rac-s3BOnXuI.js → dext-phone-rac-BrrU5qH_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CL3jcezs.js → dext-radio-group-rac-CD3MGfAM.js} +4 -4
- package/dist/component/{dext-rating-input-rac-wz1EyP5b.js → dext-rating-input-rac-BETGJZmt.js} +1 -1
- package/dist/component/{dext-tags-rac-BY4Rf2BP.js → dext-tags-rac-Coo9jN-T.js} +4 -4
- package/dist/component/{dext-text-area-rac-DRJzlsq8.js → dext-text-area-rac-CNWjqhUT.js} +1 -1
- package/dist/component/{dext-text-input-rac-BGcRNNAi.js → dext-text-input-rac-CCWyDexv.js} +1 -1
- package/dist/component/{dext-url-input-rac-CRAIm8yp.js → dext-url-input-rac-Dtakkgmk.js} +1 -1
- package/dist/component/{donation-rac-BlTfOIlE.js → donation-rac-BboGm_k_.js} +74 -74
- package/dist/component/{dropdown-field-headless-DhzRAMcM.js → dropdown-field-headless-BTMJGUwY.js} +10 -10
- package/dist/component/{dropdown-field-rac-DXyY5we-.js → dropdown-field-rac-CDRV8ckB.js} +3 -3
- package/dist/component/{dropdown-rac-C6YM6qxm.js → dropdown-rac-kEuU2pXW.js} +1 -1
- package/dist/component/{ecom-address-rac-CAdr7wya.js → ecom-address-rac-BgKL9ElH.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Z2VMuCbt.js → ecom-subscription-checkbox-rac-CDhJsNPD.js} +2 -2
- package/dist/component/{email-input-field-rac-DpkfunVK.js → email-input-field-rac-DdOd86NX.js} +47 -47
- package/dist/component/{events-repeater-rac-CuJkdrPo.js → events-repeater-rac-_VJ30dpB.js} +8 -8
- package/dist/component/{events-rsvp-rac-BKWlSeQ9.js → events-rsvp-rac-DA-261bq.js} +10 -10
- package/dist/component/{field-error-headless-tsg9FQ-_.js → field-error-headless-CovyN0GI.js} +11 -11
- package/dist/component/{field-label-headless-CB8dEat8.js → field-label-headless-DVvX2QaH.js} +4 -4
- package/dist/component/file-upload-rac-bhEPUJPs.js +561 -0
- package/dist/component/{fixed-payment-rac-CuIQEeHh.js → fixed-payment-rac-DmI6MeKc.js} +15 -15
- package/dist/component/{form-0jt4L5xo.js → form-BTDgyr54.js} +950 -913
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/{header-field-rac-CWVGzxKb.js → header-field-rac-C0rUjmo0.js} +4 -4
- package/dist/component/{header-rac-D6KsV-ko.js → header-rac-DRMO22PV.js} +1 -1
- package/dist/component/{image-choice-rac-CUCyVS8c.js → image-choice-rac-CQDQ7AlD.js} +9 -9
- package/dist/component/{index-iOqQidgV.js → index-B9QlosT1.js} +2 -2
- package/dist/component/{index-TJSnVtCO.js → index-CNWT9t6j.js} +43 -43
- package/dist/component/{isObjectLike-DQbx8r1c.js → isObjectLike-c0td2WCR.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DtZ1NTfD.js → multiline-address-field-rac-D8bVxRsD.js} +78 -78
- package/dist/component/{multiline-address-rac-ub-_XzHU.js → multiline-address-rac-g-6RB7o8.js} +1 -1
- package/dist/component/{number-input-field-rac-DLItn4DK.js → number-input-field-rac-BaOwQ5Ya.js} +13 -13
- package/dist/component/{number-input-rac-UuxJzqEx.js → number-input-rac-BXv8-Pnj.js} +1 -1
- package/dist/component/{password-rac-Di6q96Rn.js → password-rac-BB9XeSSZ.js} +15 -15
- package/dist/component/{payment-input-rac-CG6c4-Ge.js → payment-input-rac-DwnSV9rM.js} +44 -44
- package/dist/component/{phone-input-field-rac-D4JphCuT.js → phone-input-field-rac-CC3C4ToW.js} +50 -50
- package/dist/component/{phone-rac-_vDw2usa.js → phone-rac-DpNhSaE0.js} +1 -1
- package/dist/component/{product-list-rac-CgxRlj1f.js → product-list-rac-BAESk3B6.js} +50 -50
- package/dist/component/{quiz-radio-group-rac-bi26aGxN.js → quiz-radio-group-rac-PS6AZr63.js} +1 -1
- package/dist/component/{radio-button-module-classes-DDJq2ESf.js → radio-button-module-classes-CXcn5unY.js} +14 -14
- package/dist/component/{radio-group-field-rac-D1aMVO6l.js → radio-group-field-rac-pt8xbDfS.js} +6 -6
- package/dist/component/{radio-group-rac-HKC85M6t.js → radio-group-rac-DkzkM6N_.js} +1 -1
- package/dist/component/{rating-input-field-rac-CpRehxFB.js → rating-input-field-rac-DDHBkR4x.js} +20 -20
- package/dist/component/{rating-input-rac-BMuCZ3oj.js → rating-input-rac-CcsDmLus.js} +1 -1
- package/dist/component/{rich-content-rac.module-mZ6xoAOd.js → rich-content-rac.module-B2vsO6fj.js} +1 -1
- package/dist/component/{rich-text-field-rac-CUK8V8Kf.js → rich-text-field-rac-CvKht2eC.js} +4 -4
- package/dist/component/{rich-text-rac-B-7sR2FJ.js → rich-text-rac-CRpSffQB.js} +1 -1
- package/dist/component/{service-dropdown-rac-1DDNT5bn.js → service-dropdown-rac-BOpdXNjG.js} +33 -33
- package/dist/component/{services-multi-choice-rac-CB-6dwxz.js → services-multi-choice-rac-t0wdSt_T.js} +13 -13
- package/dist/component/{signature-rac-7XBci6P2.js → signature-rac-2LsIYYIX.js} +133 -133
- package/dist/component/{submit-button-rac-B1-Mk8Gg.js → submit-button-rac-BbE8dS35.js} +17 -17
- package/dist/component/{tags-field-rac-CQ9Y7mq-.js → tags-field-rac-BnsBxReU.js} +32 -32
- package/dist/component/{tags-rac-Visic-Ml.js → tags-rac-BFH4RINA.js} +1 -1
- package/dist/component/{text-area-field-rac-C8fP1g-w.js → text-area-field-rac-Ag7_gniM.js} +14 -14
- package/dist/component/{text-area-rac-B6yZxzxm.js → text-area-rac-ByUX0p2O.js} +1 -1
- package/dist/component/{text-input-field-rac-CNjbOxD1.js → text-input-field-rac-D3MZ8teu.js} +5 -5
- package/dist/component/{text-input-headless-Bm8PJGep.js → text-input-headless-CwONErsY.js} +3 -3
- package/dist/component/{text-input-rac-BEPC1Z-4.js → text-input-rac-DLXdAhkK.js} +1 -1
- package/dist/component/{time-input-rac-3m6C_Jp5.js → time-input-rac-Bs55lTON.js} +27 -27
- package/dist/component/{url-input-field-rac-CIk_6Lf6.js → url-input-field-rac-FG-bCh-E.js} +19 -19
- package/dist/component/{url-input-rac-DyVoygXH.js → url-input-rac-BOKuCMTe.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-McG3ayOT.js → use-dropdown-option-class-name-DjV7FW5y.js} +2 -2
- package/dist/component/{use-element-state-class-name-B9MBWX44.js → use-element-state-class-name-DB1AzkvF.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-r5G_sZsO.js → use-is-forced-open-dropdown-ifUIpuwL.js} +8 -8
- package/dist/component/{use-service-options-base-hcbkvhpw.js → use-service-options-base-B11cq0HH.js} +1 -1
- package/dist/component/{use-text-input-class-name-SnurFqAr.js → use-text-input-class-name-va1PzWFg.js} +2 -2
- package/dist/form.d.ts +18 -0
- package/package.json +2 -2
- package/dist/component/file-upload-rac-ZdgYt646.js +0 -483
|
@@ -2,21 +2,21 @@ import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import r, { useMemo as q, createContext as We, useContext as Ce, useState as be, useRef as x, useCallback as R, useEffect as Pe } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as Pt } from "react-aria";
|
|
5
|
-
import {
|
|
5
|
+
import { b4 as yt, d as Ct, a$ as Tt, b1 as It, aE as Mt, aF as wt, ay as qt, aD as V, F as K, bj as Te, aU as lt, b9 as P, b6 as T, bb as ae, b5 as Lt, aJ as xt, C as ve, aS as Bt, aW as kt, bg as $t, ba as Ut, bf as Wt, aZ as Vt, aO as Kt, aY as Yt, bc as Ht, ae as jt, I as z, U as Q, t as it, K as ge, v as Z, p as ee } from "./form-BTDgyr54.js";
|
|
6
6
|
import { f as E, a as F } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as Jt, V as Gt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { u as Xt } from "./use-is-forced-open-dropdown-
|
|
9
|
-
import { TextField as fe, Input as le, ComboBoxStateContext as Ve, ComboBox as
|
|
10
|
-
import { D as ie, E as ce } from "./field-error-headless-
|
|
11
|
-
import { L as de } from "./field-label-headless-
|
|
12
|
-
import { e as zt, c as Qt, a as Zt, r as Ot } from "./isObjectLike-
|
|
8
|
+
import { u as Xt } from "./use-is-forced-open-dropdown-ifUIpuwL.js";
|
|
9
|
+
import { TextField as fe, Input as le, ComboBoxStateContext as Ve, ComboBox as De, Popover as Se, ListBox as Re, ListBoxItem as Ae, Group as Nt, Button as gt } from "react-aria-components";
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-CovyN0GI.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-DVvX2QaH.js";
|
|
12
|
+
import { e as zt, c as Qt, a as Zt, r as Ot } from "./isObjectLike-c0td2WCR.js";
|
|
13
13
|
import { u as en } from "./use-invoke-callback-UH73A_J3.js";
|
|
14
14
|
import { C as ct } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
15
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
16
16
|
import { H as Me } from "./custom-focus-class-_483Pkwp.js";
|
|
17
17
|
import { s as C } from "./field-rac.module-B4l_0KRU.js";
|
|
18
|
-
import { u as tn } from "./use-dropdown-option-class-name-
|
|
19
|
-
import { u as nn } from "./use-text-input-class-name-
|
|
18
|
+
import { u as tn } from "./use-dropdown-option-class-name-DjV7FW5y.js";
|
|
19
|
+
import { u as nn } from "./use-text-input-class-name-va1PzWFg.js";
|
|
20
20
|
const rn = (e, t, o) => {
|
|
21
21
|
var l, a, i, s;
|
|
22
22
|
const n = (l = e.steps) == null ? void 0 : l.map((d) => {
|
|
@@ -183,7 +183,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
183
183
|
}, [
|
|
184
184
|
i,
|
|
185
185
|
s
|
|
186
|
-
]),
|
|
186
|
+
]), S = q(() => wt(), []);
|
|
187
187
|
return {
|
|
188
188
|
form: q(() => {
|
|
189
189
|
var _, g;
|
|
@@ -199,7 +199,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
199
199
|
includeHiddenFields: !0,
|
|
200
200
|
isMobile: I,
|
|
201
201
|
breakpoint: b,
|
|
202
|
-
form: ln(rn(p, N,
|
|
202
|
+
form: ln(rn(p, N, S), a, (g = (_ = i == null ? void 0 : i.predefined) == null ? void 0 : _.multilineAddressOptions) == null ? void 0 : g.fields)
|
|
203
203
|
});
|
|
204
204
|
if (!O.fields.some((v) => v.properties.hidden))
|
|
205
205
|
return O;
|
|
@@ -216,7 +216,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
216
216
|
i,
|
|
217
217
|
t,
|
|
218
218
|
N,
|
|
219
|
-
|
|
219
|
+
S,
|
|
220
220
|
f,
|
|
221
221
|
u,
|
|
222
222
|
e,
|
|
@@ -225,18 +225,18 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
225
225
|
]),
|
|
226
226
|
isMultilineAddressField: f
|
|
227
227
|
};
|
|
228
|
-
},
|
|
228
|
+
}, Dt = /* @__PURE__ */ We(void 0), Cn = ({ children: e, fields: t }) => {
|
|
229
229
|
const o = q(() => ({
|
|
230
230
|
fields: t
|
|
231
231
|
}), [
|
|
232
232
|
t
|
|
233
233
|
]);
|
|
234
|
-
return /* @__PURE__ */ r.createElement(
|
|
234
|
+
return /* @__PURE__ */ r.createElement(Dt.Provider, {
|
|
235
235
|
value: o
|
|
236
236
|
}, e);
|
|
237
237
|
};
|
|
238
238
|
function ue(e) {
|
|
239
|
-
const t = Ce(
|
|
239
|
+
const t = Ce(Dt);
|
|
240
240
|
if (!t)
|
|
241
241
|
throw new Error("useAddressFields must be used within AddressFieldsProvider");
|
|
242
242
|
return t.fields[e];
|
|
@@ -378,33 +378,33 @@ function Fn() {
|
|
|
378
378
|
bt = 1;
|
|
379
379
|
var e = Ot(), t = Ln(), o = vn(), n = "Expected a function", l = Math.max, a = Math.min;
|
|
380
380
|
function i(s, d, m) {
|
|
381
|
-
var u, y, I, b, p, f, N = 0,
|
|
381
|
+
var u, y, I, b, p, f, N = 0, S = !1, h = !1, O = !0;
|
|
382
382
|
if (typeof s != "function")
|
|
383
383
|
throw new TypeError(n);
|
|
384
|
-
d = o(d) || 0, e(m) && (
|
|
385
|
-
function A(
|
|
384
|
+
d = o(d) || 0, e(m) && (S = !!m.leading, h = "maxWait" in m, I = h ? l(o(m.maxWait) || 0, d) : I, O = "trailing" in m ? !!m.trailing : O);
|
|
385
|
+
function A(D) {
|
|
386
386
|
var J = u, Ee = y;
|
|
387
|
-
return u = y = void 0, N =
|
|
387
|
+
return u = y = void 0, N = D, b = s.apply(Ee, J), b;
|
|
388
388
|
}
|
|
389
|
-
function M(
|
|
390
|
-
return N =
|
|
389
|
+
function M(D) {
|
|
390
|
+
return N = D, p = setTimeout(v, d), S ? A(D) : b;
|
|
391
391
|
}
|
|
392
|
-
function _(
|
|
393
|
-
var J =
|
|
392
|
+
function _(D) {
|
|
393
|
+
var J = D - f, Ee = D - N, Ne = d - J;
|
|
394
394
|
return h ? a(Ne, I - Ee) : Ne;
|
|
395
395
|
}
|
|
396
|
-
function g(
|
|
397
|
-
var J =
|
|
396
|
+
function g(D) {
|
|
397
|
+
var J = D - f, Ee = D - N;
|
|
398
398
|
return f === void 0 || J >= d || J < 0 || h && Ee >= I;
|
|
399
399
|
}
|
|
400
400
|
function v() {
|
|
401
|
-
var
|
|
402
|
-
if (g(
|
|
403
|
-
return me(
|
|
404
|
-
p = setTimeout(v, _(
|
|
401
|
+
var D = t();
|
|
402
|
+
if (g(D))
|
|
403
|
+
return me(D);
|
|
404
|
+
p = setTimeout(v, _(D));
|
|
405
405
|
}
|
|
406
|
-
function me(
|
|
407
|
-
return p = void 0, O && u ? A(
|
|
406
|
+
function me(D) {
|
|
407
|
+
return p = void 0, O && u ? A(D) : (u = y = void 0, b);
|
|
408
408
|
}
|
|
409
409
|
function j() {
|
|
410
410
|
p !== void 0 && clearTimeout(p), N = 0, u = f = y = p = void 0;
|
|
@@ -413,8 +413,8 @@ function Fn() {
|
|
|
413
413
|
return p === void 0 ? b : me(t());
|
|
414
414
|
}
|
|
415
415
|
function w() {
|
|
416
|
-
var
|
|
417
|
-
if (u = arguments, y = this, f =
|
|
416
|
+
var D = t(), J = g(D);
|
|
417
|
+
if (u = arguments, y = this, f = D, J) {
|
|
418
418
|
if (p === void 0)
|
|
419
419
|
return M(f);
|
|
420
420
|
if (h)
|
|
@@ -427,8 +427,8 @@ function Fn() {
|
|
|
427
427
|
return Ue = i, Ue;
|
|
428
428
|
}
|
|
429
429
|
var hn = Fn();
|
|
430
|
-
const
|
|
431
|
-
const n = x(e), l = R(
|
|
430
|
+
const Dn = /* @__PURE__ */ xt(hn), Sn = (e, t, o = 200) => {
|
|
431
|
+
const n = x(e), l = R(Dn((...a) => {
|
|
432
432
|
n.current(...a);
|
|
433
433
|
}, o), [
|
|
434
434
|
o
|
|
@@ -447,10 +447,10 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
447
447
|
}, ft = {
|
|
448
448
|
loading: !1,
|
|
449
449
|
predictions: []
|
|
450
|
-
},
|
|
450
|
+
}, St = ({ atlas: e, onError: t }) => {
|
|
451
451
|
const [{ loading: n, predictions: l }, a] = be(ft), i = x(0), s = Rn(), d = R(() => {
|
|
452
452
|
i.current++, a(ft);
|
|
453
|
-
}, []), m =
|
|
453
|
+
}, []), m = Sn(async ({ input: u, countryCodes: y }) => {
|
|
454
454
|
if (!e || !s())
|
|
455
455
|
return;
|
|
456
456
|
if (!u) {
|
|
@@ -501,7 +501,7 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
501
501
|
e
|
|
502
502
|
]), null;
|
|
503
503
|
}, k = ({ children: e }) => {
|
|
504
|
-
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("addressLine1"), N = E(e, k.Label),
|
|
504
|
+
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("addressLine1"), N = E(e, k.Label), S = E(e, k.Input), h = E(e, k.Options), O = E(e, k.Description), A = E(e, k.Error);
|
|
505
505
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
506
506
|
fieldId: t,
|
|
507
507
|
renderLabel: () => F(N, {
|
|
@@ -516,7 +516,7 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
516
516
|
hasError: s,
|
|
517
517
|
onBlur: d,
|
|
518
518
|
onFocus: m
|
|
519
|
-
},
|
|
519
|
+
}, S, h),
|
|
520
520
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
521
521
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
522
522
|
fieldId: t,
|
|
@@ -533,20 +533,20 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
533
533
|
isInvalid: s,
|
|
534
534
|
onBlur: d,
|
|
535
535
|
onFocus: m
|
|
536
|
-
},
|
|
536
|
+
}, S),
|
|
537
537
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
538
538
|
});
|
|
539
539
|
}, An = ({ children: e, value: t, onChange: o, disabled: n, readOnly: l, required: a, hasError: i, onBlur: s, onFocus: d }) => {
|
|
540
540
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), I = Ke({
|
|
541
541
|
enabled: !0
|
|
542
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } =
|
|
542
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
543
543
|
atlas: I
|
|
544
544
|
}), N = q(() => b.map((g) => ({
|
|
545
545
|
id: g.searchId || "",
|
|
546
546
|
label: g.description || ""
|
|
547
547
|
})), [
|
|
548
548
|
b
|
|
549
|
-
]),
|
|
549
|
+
]), S = R((g) => {
|
|
550
550
|
p({
|
|
551
551
|
input: g,
|
|
552
552
|
countryCodes: y ? [
|
|
@@ -579,10 +579,10 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
579
579
|
}, [
|
|
580
580
|
d
|
|
581
581
|
]), M = E(e, k.Input), _ = E(e, k.Options);
|
|
582
|
-
return /* @__PURE__ */ r.createElement(
|
|
582
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
583
583
|
"aria-labelledby": m,
|
|
584
584
|
inputValue: t ?? "",
|
|
585
|
-
onInputChange:
|
|
585
|
+
onInputChange: S,
|
|
586
586
|
value: null,
|
|
587
587
|
onChange: h,
|
|
588
588
|
isDisabled: n,
|
|
@@ -616,7 +616,7 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
616
616
|
});
|
|
617
617
|
}, He = ({ children: e, className: t }) => {
|
|
618
618
|
const o = E(e, He.Option);
|
|
619
|
-
return /* @__PURE__ */ r.createElement(
|
|
619
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
620
620
|
className: t,
|
|
621
621
|
containerPadding: 0,
|
|
622
622
|
offset: 0
|
|
@@ -641,7 +641,7 @@ k.Options = He;
|
|
|
641
641
|
k.Description = ie;
|
|
642
642
|
k.Error = ce;
|
|
643
643
|
const re = ({ children: e }) => {
|
|
644
|
-
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: I } = Te(), b = I("field.mla-apartment.label"), p = E(e, re.Label), f = E(e, re.Input), N = E(e, re.Description),
|
|
644
|
+
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: I } = Te(), b = I("field.mla-apartment.label"), p = E(e, re.Label), f = E(e, re.Input), N = E(e, re.Description), S = E(e, re.Error);
|
|
645
645
|
return /* @__PURE__ */ r.createElement(u, {
|
|
646
646
|
fieldId: t,
|
|
647
647
|
renderLabel: () => F(p, {
|
|
@@ -658,7 +658,7 @@ const re = ({ children: e }) => {
|
|
|
658
658
|
onBlur: d,
|
|
659
659
|
onFocus: m
|
|
660
660
|
}, f),
|
|
661
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
661
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, S, N)
|
|
662
662
|
});
|
|
663
663
|
}, Tn = ({ className: e }) => {
|
|
664
664
|
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: l } = T(), a = x(null);
|
|
@@ -775,10 +775,10 @@ const wn = ({ isOpen: e }) => {
|
|
|
775
775
|
onInputKeyDown: y
|
|
776
776
|
};
|
|
777
777
|
}, Y = ({ children: e, ...t }) => {
|
|
778
|
-
const { isForcedOpen: o = !1 } = t, { id: n, value: l, onChange: a, disabled: i, readOnly: s, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: I, options: b } = P(), { labelId: p } = T(), { t: f } = Te(), { language: N } = It(),
|
|
779
|
-
value:
|
|
780
|
-
label: f(`locale-dataset.countries.${ve[
|
|
781
|
-
}), w), []).sort((w,
|
|
778
|
+
const { isForcedOpen: o = !1 } = t, { id: n, value: l, onChange: a, disabled: i, readOnly: s, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: I, options: b } = P(), { labelId: p } = T(), { t: f } = Te(), { language: N } = It(), S = q(() => (b || []).reduce((w, D) => (D.value && ve.hasOwnProperty(D.value) && w.push({
|
|
779
|
+
value: D.value,
|
|
780
|
+
label: f(`locale-dataset.countries.${ve[D.value].toUpperCase()}`)
|
|
781
|
+
}), w), []).sort((w, D) => w.label.localeCompare(D.label, N)), [
|
|
782
782
|
b,
|
|
783
783
|
f,
|
|
784
784
|
N
|
|
@@ -787,7 +787,7 @@ const wn = ({ isOpen: e }) => {
|
|
|
787
787
|
]), O = R(() => h(""), [
|
|
788
788
|
h
|
|
789
789
|
]), { onInputKeyDown: A, ...M } = At({
|
|
790
|
-
options:
|
|
790
|
+
options: S,
|
|
791
791
|
value: l,
|
|
792
792
|
commit: h,
|
|
793
793
|
clear: O,
|
|
@@ -798,7 +798,7 @@ const wn = ({ isOpen: e }) => {
|
|
|
798
798
|
renderLabel: () => F(g, {
|
|
799
799
|
label: _
|
|
800
800
|
}),
|
|
801
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
801
|
+
renderInput: () => /* @__PURE__ */ r.createElement(De, {
|
|
802
802
|
"aria-labelledby": p,
|
|
803
803
|
...M,
|
|
804
804
|
isDisabled: i,
|
|
@@ -810,7 +810,7 @@ const wn = ({ isOpen: e }) => {
|
|
|
810
810
|
}, F(v, {
|
|
811
811
|
onKeyDown: A
|
|
812
812
|
}), F(me, {
|
|
813
|
-
options:
|
|
813
|
+
options: S
|
|
814
814
|
}), /* @__PURE__ */ r.createElement(wn, {
|
|
815
815
|
isOpen: o
|
|
816
816
|
})),
|
|
@@ -849,7 +849,7 @@ Fe.Input = xn;
|
|
|
849
849
|
Fe.Trigger = Bn;
|
|
850
850
|
const je = ({ children: e, className: t, ...o }) => {
|
|
851
851
|
const { options: n } = o, l = E(e, je.Option);
|
|
852
|
-
return /* @__PURE__ */ r.createElement(
|
|
852
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
853
853
|
className: t,
|
|
854
854
|
containerPadding: 0,
|
|
855
855
|
offset: 0
|
|
@@ -910,11 +910,11 @@ function Wn({ isAutocompleteEnabled: e }) {
|
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
912
|
const $ = ({ children: e }) => {
|
|
913
|
-
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && ve[b] === ve.JP), N = (y || p) && f,
|
|
913
|
+
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && ve[b] === ve.JP), N = (y || p) && f, S = pe("zipCode"), h = E(e, $.Label), O = E(e, $.Control), A = E(e, $.Options), M = E(e, $.Description), _ = E(e, $.Error);
|
|
914
914
|
return N ? /* @__PURE__ */ r.createElement(u, {
|
|
915
915
|
fieldId: t,
|
|
916
916
|
renderLabel: () => F(h, {
|
|
917
|
-
label:
|
|
917
|
+
label: S
|
|
918
918
|
}),
|
|
919
919
|
renderInput: () => /* @__PURE__ */ r.createElement(Vn, {
|
|
920
920
|
value: o,
|
|
@@ -930,7 +930,7 @@ const $ = ({ children: e }) => {
|
|
|
930
930
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
931
931
|
fieldId: t,
|
|
932
932
|
renderLabel: () => F(h, {
|
|
933
|
-
label:
|
|
933
|
+
label: S
|
|
934
934
|
}),
|
|
935
935
|
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
936
936
|
"aria-labelledby": I,
|
|
@@ -955,7 +955,7 @@ const $ = ({ children: e }) => {
|
|
|
955
955
|
}
|
|
956
956
|
] : [], [
|
|
957
957
|
p
|
|
958
|
-
]),
|
|
958
|
+
]), S = R(async (g) => {
|
|
959
959
|
o(g);
|
|
960
960
|
const v = await b(g ?? "");
|
|
961
961
|
f(v);
|
|
@@ -976,10 +976,10 @@ const $ = ({ children: e }) => {
|
|
|
976
976
|
}, [
|
|
977
977
|
d
|
|
978
978
|
]), M = E(e, $.Control), _ = E(e, $.Options);
|
|
979
|
-
return /* @__PURE__ */ r.createElement(
|
|
979
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
980
980
|
"aria-labelledby": m,
|
|
981
981
|
inputValue: t ?? "",
|
|
982
|
-
onInputChange:
|
|
982
|
+
onInputChange: S,
|
|
983
983
|
value: null,
|
|
984
984
|
onChange: h,
|
|
985
985
|
isDisabled: n,
|
|
@@ -1023,7 +1023,7 @@ const $ = ({ children: e }) => {
|
|
|
1023
1023
|
});
|
|
1024
1024
|
}, Ge = ({ children: e, className: t }) => {
|
|
1025
1025
|
const o = E(e, Ge.Option);
|
|
1026
|
-
return /* @__PURE__ */ r.createElement(
|
|
1026
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1027
1027
|
className: t,
|
|
1028
1028
|
containerPadding: 0,
|
|
1029
1029
|
offset: 0
|
|
@@ -1049,7 +1049,7 @@ $.Options = Ge;
|
|
|
1049
1049
|
$.Description = ie;
|
|
1050
1050
|
$.Error = ce;
|
|
1051
1051
|
const U = ({ children: e }) => {
|
|
1052
|
-
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("streetName"), N = E(e, U.Label),
|
|
1052
|
+
const { id: t, value: o, onChange: n, disabled: l, readOnly: a, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("streetName"), N = E(e, U.Label), S = E(e, U.Input), h = E(e, U.Options), O = E(e, U.Description), A = E(e, U.Error);
|
|
1053
1053
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
1054
1054
|
fieldId: t,
|
|
1055
1055
|
renderLabel: () => F(N, {
|
|
@@ -1064,7 +1064,7 @@ const U = ({ children: e }) => {
|
|
|
1064
1064
|
hasError: s,
|
|
1065
1065
|
onBlur: d,
|
|
1066
1066
|
onFocus: m
|
|
1067
|
-
},
|
|
1067
|
+
}, S, h),
|
|
1068
1068
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1069
1069
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
1070
1070
|
fieldId: t,
|
|
@@ -1081,15 +1081,15 @@ const U = ({ children: e }) => {
|
|
|
1081
1081
|
isInvalid: s,
|
|
1082
1082
|
onBlur: d,
|
|
1083
1083
|
onFocus: m
|
|
1084
|
-
},
|
|
1084
|
+
}, S),
|
|
1085
1085
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1086
1086
|
});
|
|
1087
1087
|
}, Hn = ({ children: e, value: t, onChange: o, disabled: n, readOnly: l, required: a, hasError: i, onBlur: s, onFocus: d }) => {
|
|
1088
1088
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), I = Ke({
|
|
1089
1089
|
enabled: !0
|
|
1090
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } =
|
|
1090
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
1091
1091
|
atlas: I
|
|
1092
|
-
}), N = E(e, U.Input),
|
|
1092
|
+
}), N = E(e, U.Input), S = E(e, U.Options), h = q(() => b.reduce((g, v) => (v.searchId && v.description && g.push({
|
|
1093
1093
|
id: v.searchId,
|
|
1094
1094
|
label: v.description
|
|
1095
1095
|
}), g), []), [
|
|
@@ -1126,7 +1126,7 @@ const U = ({ children: e }) => {
|
|
|
1126
1126
|
}, [
|
|
1127
1127
|
d
|
|
1128
1128
|
]);
|
|
1129
|
-
return /* @__PURE__ */ r.createElement(
|
|
1129
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
1130
1130
|
"aria-labelledby": m,
|
|
1131
1131
|
inputValue: t ?? "",
|
|
1132
1132
|
onInputChange: O,
|
|
@@ -1143,7 +1143,7 @@ const U = ({ children: e }) => {
|
|
|
1143
1143
|
items: h
|
|
1144
1144
|
}, F(N, {
|
|
1145
1145
|
onFocus: _
|
|
1146
|
-
}), F(
|
|
1146
|
+
}), F(S, {
|
|
1147
1147
|
options: h
|
|
1148
1148
|
}), /* @__PURE__ */ r.createElement(Ye, {
|
|
1149
1149
|
optionCount: h.length
|
|
@@ -1163,7 +1163,7 @@ const U = ({ children: e }) => {
|
|
|
1163
1163
|
});
|
|
1164
1164
|
}, Xe = ({ children: e, className: t }) => {
|
|
1165
1165
|
const o = E(e, Xe.Option);
|
|
1166
|
-
return /* @__PURE__ */ r.createElement(
|
|
1166
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1167
1167
|
className: t,
|
|
1168
1168
|
containerPadding: 0,
|
|
1169
1169
|
offset: 0
|
|
@@ -1230,18 +1230,18 @@ const H = ({ children: e }) => {
|
|
|
1230
1230
|
return (kt(((B = f == null ? void 0 : f.subdivisions) == null ? void 0 : B.list) || [], p) || []).map((w) => ({
|
|
1231
1231
|
value: w.key,
|
|
1232
1232
|
label: I(w.displayName)
|
|
1233
|
-
})).sort((w,
|
|
1233
|
+
})).sort((w, D) => w.label.localeCompare(D.label));
|
|
1234
1234
|
}, [
|
|
1235
1235
|
p,
|
|
1236
1236
|
I,
|
|
1237
1237
|
f
|
|
1238
|
-
]),
|
|
1238
|
+
]), S = R(() => n(""), [
|
|
1239
1239
|
n
|
|
1240
1240
|
]), { onInputKeyDown: h, ...O } = At({
|
|
1241
1241
|
options: N,
|
|
1242
1242
|
value: o,
|
|
1243
1243
|
commit: n,
|
|
1244
|
-
clear:
|
|
1244
|
+
clear: S,
|
|
1245
1245
|
onBlur: d
|
|
1246
1246
|
}), A = pe("subdivision"), M = E(e, H.Label), _ = E(e, H.Control), g = E(e, H.Options), v = E(e, H.Description), me = E(e, H.Error);
|
|
1247
1247
|
return /* @__PURE__ */ r.createElement(u, {
|
|
@@ -1249,7 +1249,7 @@ const H = ({ children: e }) => {
|
|
|
1249
1249
|
renderLabel: () => F(M, {
|
|
1250
1250
|
label: A
|
|
1251
1251
|
}),
|
|
1252
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
1252
|
+
renderInput: () => /* @__PURE__ */ r.createElement(De, {
|
|
1253
1253
|
"aria-labelledby": y,
|
|
1254
1254
|
...O,
|
|
1255
1255
|
isDisabled: l,
|
|
@@ -1298,7 +1298,7 @@ he.Input = Xn;
|
|
|
1298
1298
|
he.Trigger = zn;
|
|
1299
1299
|
const ze = ({ children: e, className: t, ...o }) => {
|
|
1300
1300
|
const { options: n } = o, l = E(e, ze.Option);
|
|
1301
|
-
return /* @__PURE__ */ r.createElement(
|
|
1301
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1302
1302
|
className: t,
|
|
1303
1303
|
containerPadding: 0,
|
|
1304
1304
|
offset: 0
|
|
@@ -1332,7 +1332,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1332
1332
|
[K.MLA_STREET_NUMBER]: ar,
|
|
1333
1333
|
[K.MLA_APARTMENT]: lr
|
|
1334
1334
|
}, cr = {}, dr = [], c = ({ children: e }) => {
|
|
1335
|
-
const { id: t, form: o, value: n, onChange: l, onFieldBlur: a, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: y, target: I, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N,
|
|
1335
|
+
const { id: t, form: o, value: n, onChange: l, onFieldBlur: a, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: y, target: I, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N, S] = be(null), h = $t(), O = q(() => ({
|
|
1336
1336
|
...h,
|
|
1337
1337
|
...ir
|
|
1338
1338
|
}), [
|
|
@@ -1369,7 +1369,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1369
1369
|
n,
|
|
1370
1370
|
B,
|
|
1371
1371
|
M
|
|
1372
|
-
]),
|
|
1372
|
+
]), D = R((W, G) => {
|
|
1373
1373
|
if (B && W === ye.COUNTRY && (n == null ? void 0 : n[W]) !== G) {
|
|
1374
1374
|
l == null || l({
|
|
1375
1375
|
[ye.COUNTRY]: G
|
|
@@ -1434,7 +1434,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1434
1434
|
}, /* @__PURE__ */ r.createElement(Cn, {
|
|
1435
1435
|
fields: _t
|
|
1436
1436
|
}, /* @__PURE__ */ r.createElement("div", {
|
|
1437
|
-
ref:
|
|
1437
|
+
ref: S,
|
|
1438
1438
|
style: {
|
|
1439
1439
|
display: "contents"
|
|
1440
1440
|
}
|
|
@@ -1448,7 +1448,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1448
1448
|
formSchema: g,
|
|
1449
1449
|
form: j,
|
|
1450
1450
|
values: n ?? cr,
|
|
1451
|
-
onFieldChange:
|
|
1451
|
+
onFieldChange: D,
|
|
1452
1452
|
onBlur: a,
|
|
1453
1453
|
onFocus: i,
|
|
1454
1454
|
errors: s ?? dr,
|
package/dist/component/{number-input-field-rac-DLItn4DK.js → number-input-field-rac-BaOwQ5Ya.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 U, useCallback as j, useEffect as Q, useRef as $ } from "react";
|
|
4
|
+
import { NumberField as z, Input as G } from "react-aria-components";
|
|
5
|
+
import { b9 as _, b6 as S, bj as H, bb as J, I as K, U as W, v as X, p as Y } from "./form-BTDgyr54.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-CovyN0GI.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-DVvX2QaH.js";
|
|
9
9
|
import { g as re, c as te } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as ne } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as p } from "./field-rac.module-B4l_0KRU.js";
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-va1PzWFg.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
15
|
var F, L, R;
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: y } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, A = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum,
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: y } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, A = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, g = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, x = O(s), [T, I] = U(x), V = ne(E), h = c(t, e.Label), q = c(t, e.Input), M = c(t, e.Description), k = c(t, e.Error), B = j((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -24,16 +24,16 @@ const e = ({ children: t }) => {
|
|
|
24
24
|
D,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return Q(() => {
|
|
28
28
|
I(O(s));
|
|
29
29
|
}, [
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
32
32
|
fieldId: a,
|
|
33
33
|
renderLabel: () => h,
|
|
34
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
34
|
+
renderInput: () => /* @__PURE__ */ r.createElement(z, {
|
|
35
35
|
"aria-labelledby": y,
|
|
36
|
-
value:
|
|
36
|
+
value: T,
|
|
37
37
|
onChange: B,
|
|
38
38
|
isDisabled: d,
|
|
39
39
|
isRequired: b,
|
|
@@ -41,20 +41,20 @@ const e = ({ children: t }) => {
|
|
|
41
41
|
isInvalid: u,
|
|
42
42
|
onBlur: V,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
44
|
+
minValue: g ?? void 0,
|
|
45
45
|
maxValue: A ?? void 0
|
|
46
46
|
}, q),
|
|
47
47
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k, M)
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: t }) => {
|
|
50
50
|
var u;
|
|
51
|
-
const { t: a } =
|
|
51
|
+
const { t: a } = H(), { inputId: s, ariaDescribedBy: l } = S(), { id: d, placeholder: b, validation: o, label: E, required: f } = _();
|
|
52
52
|
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
53
53
|
const m = $(null);
|
|
54
54
|
return J(() => {
|
|
55
55
|
var n;
|
|
56
56
|
(n = m.current) == null || n.focus();
|
|
57
|
-
}, d), /* @__PURE__ */ r.createElement(
|
|
57
|
+
}, d), /* @__PURE__ */ r.createElement(G, {
|
|
58
58
|
ref: m,
|
|
59
59
|
id: s,
|
|
60
60
|
"aria-describedby": l,
|
|
@@ -1,20 +1,20 @@
|
|
|
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 M, Group as k, Input as q, Button as
|
|
4
|
+
import { b9 as E, b6 as I, bb as O, bj as A, I as B, U as v, v as V, p as P } from "./form-BTDgyr54.js";
|
|
5
|
+
import { TextField as M, Group as k, Input as q, Button as U } 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 W } from "./field-label-headless-
|
|
7
|
+
import { D as j, E as H } from "./field-error-headless-CovyN0GI.js";
|
|
8
|
+
import { L as W } from "./field-label-headless-DVvX2QaH.js";
|
|
9
9
|
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as G } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
12
|
+
import { u as Q } from "./use-text-input-class-name-va1PzWFg.js";
|
|
13
13
|
const t = ({ children: o, className: r }) => {
|
|
14
|
-
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout: _ } = E(), { labelId: y } = I(), [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
|
-
renderLabel: () =>
|
|
17
|
+
renderLabel: () => F,
|
|
18
18
|
renderInput: () => /* @__PURE__ */ e.createElement(M, {
|
|
19
19
|
"aria-labelledby": y,
|
|
20
20
|
value: s ?? "",
|
|
@@ -26,11 +26,11 @@ const t = ({ children: o, className: r }) => {
|
|
|
26
26
|
onBlur: f,
|
|
27
27
|
onFocus: C,
|
|
28
28
|
className: r
|
|
29
|
-
}, b(
|
|
29
|
+
}, b(L, {
|
|
30
30
|
isVisible: R,
|
|
31
|
-
onToggleVisibility: () =>
|
|
31
|
+
onToggleVisibility: () => D((h) => !h)
|
|
32
32
|
})),
|
|
33
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
33
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, w)
|
|
34
34
|
});
|
|
35
35
|
}, $ = ({ children: o, className: r, ...l }) => {
|
|
36
36
|
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(o, t.Input), i = u(o, t.Toggle);
|
|
@@ -59,7 +59,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
59
59
|
});
|
|
60
60
|
}, J = ({ className: o, showPasswordTooltipText: r, hidePasswordTooltipText: l, children: s, ...c }) => {
|
|
61
61
|
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l : r;
|
|
62
|
-
return /* @__PURE__ */ e.createElement(
|
|
62
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
63
63
|
type: "button",
|
|
64
64
|
isDisabled: a,
|
|
65
65
|
onPress: m,
|
|
@@ -74,8 +74,8 @@ t.Label = W;
|
|
|
74
74
|
t.Control = $;
|
|
75
75
|
t.Input = z;
|
|
76
76
|
t.Toggle = J;
|
|
77
|
-
t.Description =
|
|
78
|
-
t.Error =
|
|
77
|
+
t.Description = j;
|
|
78
|
+
t.Error = H;
|
|
79
79
|
const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
80
80
|
viewBox: "0 0 24 24",
|
|
81
81
|
width: "20",
|
|
@@ -122,7 +122,7 @@ const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
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
127
|
className: r
|
|
128
128
|
}, /* @__PURE__ */ e.createElement(t.Input, {
|
|
@@ -132,7 +132,7 @@ const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
132
132
|
showPasswordTooltipText: o("forms.widget.modals.show-password-tooltip"),
|
|
133
133
|
hidePasswordTooltipText: o("forms.widget.modals.hide-password-tooltip")
|
|
134
134
|
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
135
|
-
className: d(
|
|
135
|
+
className: d(V, p.error)
|
|
136
136
|
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
137
137
|
className: d(P, p.description)
|
|
138
138
|
}, te));
|