@wix/form-elements 1.105.0 → 1.106.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-DaBg4fM3.js → appointment-rac-D2F4vgf1.js} +5 -5
- package/dist/component/{bookings-address-rac-CkCIr0yY.js → bookings-address-rac-_5S8J8_i.js} +1 -1
- package/dist/component/{bookings-email-rac--o2G6bDi.js → bookings-email-rac-6vmDR9nS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-KilnnzGd.js → bookings-first-name-rac-DtTJ4T2K.js} +1 -1
- package/dist/component/{bookings-header-rac-D9PwyQVM.js → bookings-header-rac-B3dsEwzR.js} +1 -1
- package/dist/component/{bookings-last-name-rac-qWHHoFsL.js → bookings-last-name-rac-B3idkbi8.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CA9lwDip.js → bookings-login-bar-rac-CrRBcQwT.js} +4 -4
- package/dist/component/{bookings-phone-rac-CJwbY3yf.js → bookings-phone-rac-BE0yWNnj.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-B-7cedEB.js → bookings-rich-text-rac-CYo1l0-6.js} +1 -1
- package/dist/component/{checkbox-field-rac-D5YjimAI.js → checkbox-field-rac-boTtXVEt.js} +16 -20
- package/dist/component/{checkbox-group-field-headless-BJl8C2Lz.js → checkbox-group-field-headless-DnkUvDm8.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CLDKYOsh.js → checkbox-group-field-rac-DrDTgHMg.js} +11 -11
- package/dist/component/{checkbox-group-rac-DfOsQWr7.js → checkbox-group-rac-v3ozUBpo.js} +1 -1
- package/dist/component/{checkbox-rac-DMDIZxxN.js → checkbox-rac-YSLE-RnG.js} +1 -1
- package/dist/component/{contacts-address-rac-CrpSPX3x.js → contacts-address-rac-C653yaHZ.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-B3vrz3B5.js → contacts-birthdate-rac-BeAQ6shx.js} +1 -1
- package/dist/component/{contacts-company-rac-Nd4-07pv.js → contacts-company-rac-BglKOoTG.js} +1 -1
- package/dist/component/{contacts-email-rac-DlKJXGue.js → contacts-email-rac-D6m7ynfc.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CgfaCG0O.js → contacts-first-name-rac-Dgxn0tUJ.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DmSqTPzC.js → contacts-last-name-rac-1UyIuRKH.js} +1 -1
- package/dist/component/{contacts-phone-rac-C9X_5axq.js → contacts-phone-rac-BQ77BlW4.js} +1 -1
- package/dist/component/{contacts-position-rac-DeJrqxtm.js → contacts-position-rac-BUDUv7lv.js} +1 -1
- package/dist/component/contacts-subscribe-rac-DdtA0qKW.js +6 -0
- package/dist/component/{contacts-tax-id-rac-6pMwtJyC.js → contacts-tax-id-rac-WUaKcNl0.js} +1 -1
- package/dist/component/{date-availability-DfL_xDci.js → date-availability-XjBFq8jt.js} +1 -1
- package/dist/component/{date-input-field-rac-DvlY0Ffu.js → date-input-field-rac-aY2zuuKs.js} +13 -13
- package/dist/component/{date-input-rac-Dr_MtbFO.js → date-input-rac-DRiP2_97.js} +1 -1
- package/dist/component/{date-picker-field-rac-D42hJF0j.js → date-picker-field-rac-Bzl-d3Uj.js} +27 -27
- package/dist/component/{date-picker-rac-CtoqWMPa.js → date-picker-rac-DHHUh8vn.js} +1 -1
- package/dist/component/{date-time-input-field-rac-C1rf0_aD.js → date-time-input-field-rac-DP_StuLr.js} +26 -26
- package/dist/component/{date-time-input-rac-gFwBZVcJ.js → date-time-input-rac-B11KIxsf.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B0dh55yz.js → dext-checkbox-group-rac-BHZBqyWv.js} +2 -2
- package/dist/component/{dext-checkbox-rac-RQ7hpkFn.js → dext-checkbox-rac-BIlAqEvV.js} +1 -1
- package/dist/component/{dext-date-picker-rac-sJEfD5E6.js → dext-date-picker-rac-CHBXNrZi.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BxPE1oVN.js → dext-date-time-input-rac-BYtliKry.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BimIan_Z.js → dext-dropdown-rac-C2VPSFV5.js} +1 -1
- package/dist/component/{dext-email-rac-CjrC85Va.js → dext-email-rac-Fnb0Ggcs.js} +1 -1
- package/dist/component/{dext-number-input-rac-CkMRmcJQ.js → dext-number-input-rac-DopfSyFi.js} +1 -1
- package/dist/component/{dext-phone-rac-DO3qV3WL.js → dext-phone-rac-Rn4i_2rc.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CUaqRQSf.js → dext-radio-group-rac-bNaskJpK.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CIRU2af7.js → dext-rating-input-rac-DL6ZZd7d.js} +1 -1
- package/dist/component/{dext-tags-rac-DHqXtqOo.js → dext-tags-rac-TsUPoImO.js} +2 -2
- package/dist/component/{dext-text-area-rac-yBONPzSt.js → dext-text-area-rac-BIuY7LTd.js} +1 -1
- package/dist/component/{dext-text-input-rac-CdhAUC2i.js → dext-text-input-rac-CSYPW0Qi.js} +1 -1
- package/dist/component/{dext-url-input-rac-B4IQEsp2.js → dext-url-input-rac-_g0lqGfW.js} +1 -1
- package/dist/component/{donation-rac-D-rWK7OY.js → donation-rac-BYKFtsyR.js} +55 -55
- package/dist/component/{dropdown-field-headless-CeDAK-PU.js → dropdown-field-headless-CBaqlNZi.js} +4 -4
- package/dist/component/{dropdown-field-rac-BzqUmKJ1.js → dropdown-field-rac-CCAGSMm3.js} +5 -5
- package/dist/component/{dropdown-rac-CHO-8WoH.js → dropdown-rac-C_EqUsZ1.js} +1 -1
- package/dist/component/{ecom-address-rac-BZVqOncl.js → ecom-address-rac-Bw9eH0iF.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BpILYYtb.js → ecom-subscription-checkbox-rac-B5PVOO2a.js} +10 -17
- package/dist/component/{email-input-field-rac-Cb6ECUnT.js → email-input-field-rac-B2kqQ6yo.js} +12 -12
- package/dist/component/{events-repeater-rac-BaYgjHjJ.js → events-repeater-rac--4OnUxWE.js} +53 -53
- package/dist/component/{events-rsvp-rac-CK0hpQKD.js → events-rsvp-rac-CczCoo3T.js} +12 -12
- package/dist/component/{field-error-headless-CN2-F78X.js → field-error-headless-D3-1L5sf.js} +1 -1
- package/dist/component/{field-label-headless-Ca6NcX2l.js → field-label-headless-Du4ckIVy.js} +1 -1
- package/dist/component/{file-upload-rac-C0DqDLp2.js → file-upload-rac-DbdkUbWM.js} +79 -79
- package/dist/component/{fixed-payment-rac-C5qNAT_7.js → fixed-payment-rac-f9-01iDN.js} +7 -7
- package/dist/component/{form-D1xJH87b.js → form-DQauhsho.js} +69 -69
- package/dist/component/form-element-classes-bLFmhsKw.js +137 -0
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BN-Ib7VY.js → header-field-rac-DamDk5BR.js} +3 -3
- package/dist/component/{header-rac-CE0NjfoF.js → header-rac-CR9T3Pnu.js} +1 -1
- package/dist/component/{image-choice-rac-D6dIXR_x.js → image-choice-rac-DJ_8v467.js} +12 -12
- package/dist/component/{index-CcsZgBFf.js → index-BB7d_9Dv.js} +4 -4
- package/dist/component/{index-DOd4eW8z.js → index-CcUTIUWM.js} +2 -2
- package/dist/component/{isObjectLike-DfUDKPeo.js → isObjectLike-xvPa_08X.js} +1 -1
- package/dist/component/{multiline-address-field-rac-jJ5HMakk.js → multiline-address-field-rac-CyaFOloE.js} +79 -79
- package/dist/component/{multiline-address-rac-GQF9HaNq.js → multiline-address-rac-CaHGUN_f.js} +1 -1
- package/dist/component/{number-input-field-rac-DRgq3Ll0.js → number-input-field-rac-BuYUzDWV.js} +14 -14
- package/dist/component/{number-input-rac-C2VoBZeq.js → number-input-rac-DMKX6nhk.js} +1 -1
- package/dist/component/{password-rac-DP8d_92z.js → password-rac-0RUXPAn6.js} +37 -37
- package/dist/component/{payment-input-rac-BycHF-zC.js → payment-input-rac-CHSZ3-Lt.js} +16 -16
- package/dist/component/{phone-input-field-rac-C3_-Dc35.js → phone-input-field-rac-JmIFcP1e.js} +28 -28
- package/dist/component/{phone-rac-DAxScWRl.js → phone-rac-BLRnAPXP.js} +1 -1
- package/dist/component/{product-list-rac-Bxdu4NFP.js → product-list-rac-BkF5tDwt.js} +9 -9
- package/dist/component/quiz-radio-group-rac-32cCMTUS.js +6 -0
- package/dist/component/{radio-button-module-classes-D71u96Y9.js → radio-button-module-classes-IOulhuSH.js} +3 -3
- package/dist/component/radio-group-field-rac-CJwku6e0.js +46 -0
- package/dist/component/{radio-group-rac-DqdjCYmd.js → radio-group-rac-BiW-9Abj.js} +1 -1
- package/dist/component/{rating-input-field-rac-C4Ztlh1u.js → rating-input-field-rac-B9cwaROK.js} +29 -29
- package/dist/component/{rating-input-rac-B4lF_LX7.js → rating-input-rac-BpwlNvzQ.js} +1 -1
- package/dist/component/{rich-content-rac.module-CmW7FwmQ.js → rich-content-rac.module-B1uyPmtK.js} +1 -1
- package/dist/component/{rich-text-field-rac-MwKpKbvj.js → rich-text-field-rac-C_qE7Ykg.js} +3 -3
- package/dist/component/{rich-text-rac-DcMBqEFb.js → rich-text-rac-VfeZxS27.js} +1 -1
- package/dist/component/{service-dropdown-rac-CZWVFnR8.js → service-dropdown-rac-BCfs8IhW.js} +17 -17
- package/dist/component/{services-multi-choice-rac-DvHcWQHS.js → services-multi-choice-rac-CCqdF_7P.js} +6 -6
- package/dist/component/{signature-rac-CMTAWkaY.js → signature-rac-DOyMo3u0.js} +72 -72
- package/dist/component/{submit-button-rac-HnfWQ8wg.js → submit-button-rac-C2uA5DeE.js} +11 -11
- package/dist/component/{tags-field-rac-BuqOeG7-.js → tags-field-rac-C_uIw2by.js} +35 -35
- package/dist/component/{tags-rac-FbHwPPKs.js → tags-rac-1pQ-fpe_.js} +1 -1
- package/dist/component/{text-area-field-rac-Bq224M1o.js → text-area-field-rac-DqlOkm7e.js} +22 -22
- package/dist/component/{text-area-rac-COcGlAYk.js → text-area-rac-DPdkrFcH.js} +1 -1
- package/dist/component/{text-input-field-rac-CTS4jFhC.js → text-input-field-rac-CmXm6r1w.js} +5 -5
- package/dist/component/{text-input-headless-QVLKSgJE.js → text-input-headless-DD__2DFf.js} +3 -3
- package/dist/component/{text-input-rac-BCCkVVG9.js → text-input-rac-DRHyQEH7.js} +1 -1
- package/dist/component/{time-input-rac-7n8d5ppJ.js → time-input-rac-BJPIymQY.js} +21 -21
- package/dist/component/{url-input-field-rac-ChPfhq6I.js → url-input-field-rac-CFDYkZ6I.js} +14 -14
- package/dist/component/{url-input-rac-cFZ8HC3U.js → url-input-rac-C0ChQUzq.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-Cf2B9xAE.js → use-dropdown-option-class-name-3L5ZmNLK.js} +2 -2
- package/dist/component/{use-element-state-class-name-DF2VZawA.js → use-element-state-class-name-BatTc2bw.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-B_knxuKJ.js → use-is-forced-open-dropdown-B0jiPTmS.js} +1 -1
- package/dist/component/{use-service-options-base-Clx3S0du.js → use-service-options-base-oeE7xszw.js} +1 -1
- package/dist/component/{use-text-input-class-name-MbmOF6tH.js → use-text-input-class-name-LQ5S-NLh.js} +3 -3
- package/package.json +2 -2
- package/dist/component/contacts-subscribe-rac-Dv-QNZZc.js +0 -13
- package/dist/component/form-element-classes-BtKlobUX.js +0 -192
- package/dist/component/quiz-radio-group-rac-mAn0MuPW.js +0 -13
- package/dist/component/radio-group-field-rac-eij4o0_R.js +0 -50
|
@@ -2,22 +2,22 @@ import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import r, { useMemo as w, createContext as Ue, 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 { af as yt, c as Ct, aa as Tt, ac as It, H as Mt, J as qt, v as wt, G as V, F as K, au as Te, a3 as lt, ak as P, ah as T, am as ae, ag as Lt, T as xt, C as ve, a1 as Bt, a5 as kt, ar as $t, al as Wt, aq as Ut, a8 as Vt, Z as Kt, a7 as Yt, an as Ht, j as jt } from "./form-
|
|
5
|
+
import { af as yt, c as Ct, aa as Tt, ac as It, H as Mt, J as qt, v as wt, G as V, F as K, au as Te, a3 as lt, ak as P, ah as T, am as ae, ag as Lt, T as xt, C as ve, a1 as Bt, a5 as kt, ar as $t, al as Wt, aq as Ut, a8 as Vt, Z as Kt, a7 as Yt, an as Ht, j as jt } from "./form-DQauhsho.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-B0jiPTmS.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-D3-1L5sf.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-Du4ckIVy.js";
|
|
12
|
+
import { e as zt, c as Qt, a as Zt, r as Ot } from "./isObjectLike-xvPa_08X.js";
|
|
13
13
|
import { u as en } from "./use-invoke-callback-UH73A_J3.js";
|
|
14
14
|
import { C as it } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
15
|
import { E as z } 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 {
|
|
19
|
-
import { u as tn } from "./use-dropdown-option-class-name-
|
|
20
|
-
import { u as nn } from "./use-text-input-class-name-
|
|
18
|
+
import { v as Q, J as Z, n as ct, x as ge, o as ee, j as te } from "./form-element-classes-bLFmhsKw.js";
|
|
19
|
+
import { u as tn } from "./use-dropdown-option-class-name-3L5ZmNLK.js";
|
|
20
|
+
import { u as nn } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
21
21
|
const rn = (e, t, o) => {
|
|
22
22
|
var l, a, i, s;
|
|
23
23
|
const n = (l = e.steps) == null ? void 0 : l.map((d) => {
|
|
@@ -184,7 +184,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
184
184
|
}, [
|
|
185
185
|
i,
|
|
186
186
|
s
|
|
187
|
-
]),
|
|
187
|
+
]), S = w(() => qt(), []);
|
|
188
188
|
return {
|
|
189
189
|
form: w(() => {
|
|
190
190
|
var _, g;
|
|
@@ -200,7 +200,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
200
200
|
includeHiddenFields: !0,
|
|
201
201
|
isMobile: I,
|
|
202
202
|
breakpoint: b,
|
|
203
|
-
form: ln(rn(p, N,
|
|
203
|
+
form: ln(rn(p, N, S), a, (g = (_ = i == null ? void 0 : i.predefined) == null ? void 0 : _.multilineAddressOptions) == null ? void 0 : g.fields)
|
|
204
204
|
});
|
|
205
205
|
if (!O.fields.some((v) => v.properties.hidden))
|
|
206
206
|
return O;
|
|
@@ -217,7 +217,7 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
217
217
|
i,
|
|
218
218
|
t,
|
|
219
219
|
N,
|
|
220
|
-
|
|
220
|
+
S,
|
|
221
221
|
f,
|
|
222
222
|
u,
|
|
223
223
|
e,
|
|
@@ -226,18 +226,18 @@ const cn = (e, t) => e.map((o) => ({
|
|
|
226
226
|
]),
|
|
227
227
|
isMultilineAddressField: f
|
|
228
228
|
};
|
|
229
|
-
},
|
|
229
|
+
}, Dt = /* @__PURE__ */ Ue(void 0), Cn = ({ children: e, fields: t }) => {
|
|
230
230
|
const o = w(() => ({
|
|
231
231
|
fields: t
|
|
232
232
|
}), [
|
|
233
233
|
t
|
|
234
234
|
]);
|
|
235
|
-
return /* @__PURE__ */ r.createElement(
|
|
235
|
+
return /* @__PURE__ */ r.createElement(Dt.Provider, {
|
|
236
236
|
value: o
|
|
237
237
|
}, e);
|
|
238
238
|
};
|
|
239
239
|
function ue(e) {
|
|
240
|
-
const t = Ce(
|
|
240
|
+
const t = Ce(Dt);
|
|
241
241
|
if (!t)
|
|
242
242
|
throw new Error("useAddressFields must be used within AddressFieldsProvider");
|
|
243
243
|
return t.fields[e];
|
|
@@ -379,33 +379,33 @@ function Fn() {
|
|
|
379
379
|
bt = 1;
|
|
380
380
|
var e = Ot(), t = Ln(), o = vn(), n = "Expected a function", l = Math.max, a = Math.min;
|
|
381
381
|
function i(s, d, m) {
|
|
382
|
-
var u, y, I, b, p, f, N = 0,
|
|
382
|
+
var u, y, I, b, p, f, N = 0, S = !1, h = !1, O = !0;
|
|
383
383
|
if (typeof s != "function")
|
|
384
384
|
throw new TypeError(n);
|
|
385
|
-
d = o(d) || 0, e(m) && (
|
|
386
|
-
function A(
|
|
385
|
+
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);
|
|
386
|
+
function A(D) {
|
|
387
387
|
var J = u, Ee = y;
|
|
388
|
-
return u = y = void 0, N =
|
|
388
|
+
return u = y = void 0, N = D, b = s.apply(Ee, J), b;
|
|
389
389
|
}
|
|
390
|
-
function M(
|
|
391
|
-
return N =
|
|
390
|
+
function M(D) {
|
|
391
|
+
return N = D, p = setTimeout(v, d), S ? A(D) : b;
|
|
392
392
|
}
|
|
393
|
-
function _(
|
|
394
|
-
var J =
|
|
393
|
+
function _(D) {
|
|
394
|
+
var J = D - f, Ee = D - N, Ne = d - J;
|
|
395
395
|
return h ? a(Ne, I - Ee) : Ne;
|
|
396
396
|
}
|
|
397
|
-
function g(
|
|
398
|
-
var J =
|
|
397
|
+
function g(D) {
|
|
398
|
+
var J = D - f, Ee = D - N;
|
|
399
399
|
return f === void 0 || J >= d || J < 0 || h && Ee >= I;
|
|
400
400
|
}
|
|
401
401
|
function v() {
|
|
402
|
-
var
|
|
403
|
-
if (g(
|
|
404
|
-
return me(
|
|
405
|
-
p = setTimeout(v, _(
|
|
402
|
+
var D = t();
|
|
403
|
+
if (g(D))
|
|
404
|
+
return me(D);
|
|
405
|
+
p = setTimeout(v, _(D));
|
|
406
406
|
}
|
|
407
|
-
function me(
|
|
408
|
-
return p = void 0, O && u ? A(
|
|
407
|
+
function me(D) {
|
|
408
|
+
return p = void 0, O && u ? A(D) : (u = y = void 0, b);
|
|
409
409
|
}
|
|
410
410
|
function j() {
|
|
411
411
|
p !== void 0 && clearTimeout(p), N = 0, u = f = y = p = void 0;
|
|
@@ -414,8 +414,8 @@ function Fn() {
|
|
|
414
414
|
return p === void 0 ? b : me(t());
|
|
415
415
|
}
|
|
416
416
|
function q() {
|
|
417
|
-
var
|
|
418
|
-
if (u = arguments, y = this, f =
|
|
417
|
+
var D = t(), J = g(D);
|
|
418
|
+
if (u = arguments, y = this, f = D, J) {
|
|
419
419
|
if (p === void 0)
|
|
420
420
|
return M(f);
|
|
421
421
|
if (h)
|
|
@@ -428,8 +428,8 @@ function Fn() {
|
|
|
428
428
|
return We = i, We;
|
|
429
429
|
}
|
|
430
430
|
var hn = Fn();
|
|
431
|
-
const
|
|
432
|
-
const n = x(e), l = R(
|
|
431
|
+
const Dn = /* @__PURE__ */ xt(hn), Sn = (e, t, o = 200) => {
|
|
432
|
+
const n = x(e), l = R(Dn((...a) => {
|
|
433
433
|
n.current(...a);
|
|
434
434
|
}, o), [
|
|
435
435
|
o
|
|
@@ -448,10 +448,10 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
448
448
|
}, ft = {
|
|
449
449
|
loading: !1,
|
|
450
450
|
predictions: []
|
|
451
|
-
},
|
|
451
|
+
}, St = ({ atlas: e, onError: t }) => {
|
|
452
452
|
const [{ loading: n, predictions: l }, a] = be(ft), i = x(0), s = Rn(), d = R(() => {
|
|
453
453
|
i.current++, a(ft);
|
|
454
|
-
}, []), m =
|
|
454
|
+
}, []), m = Sn(async ({ input: u, countryCodes: y }) => {
|
|
455
455
|
if (!e || !s())
|
|
456
456
|
return;
|
|
457
457
|
if (!u) {
|
|
@@ -502,7 +502,7 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
502
502
|
e
|
|
503
503
|
]), null;
|
|
504
504
|
}, k = ({ children: e }) => {
|
|
505
|
-
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),
|
|
505
|
+
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);
|
|
506
506
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
507
507
|
fieldId: t,
|
|
508
508
|
renderLabel: () => F(N, {
|
|
@@ -517,7 +517,7 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
517
517
|
hasError: s,
|
|
518
518
|
onBlur: d,
|
|
519
519
|
onFocus: m
|
|
520
|
-
},
|
|
520
|
+
}, S, h),
|
|
521
521
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
522
522
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
523
523
|
fieldId: t,
|
|
@@ -534,20 +534,20 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
534
534
|
isInvalid: s,
|
|
535
535
|
onBlur: d,
|
|
536
536
|
onFocus: m
|
|
537
|
-
},
|
|
537
|
+
}, S),
|
|
538
538
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
539
539
|
});
|
|
540
540
|
}, An = ({ children: e, value: t, onChange: o, disabled: n, readOnly: l, required: a, hasError: i, onBlur: s, onFocus: d }) => {
|
|
541
541
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), I = Ke({
|
|
542
542
|
enabled: !0
|
|
543
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } =
|
|
543
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
544
544
|
atlas: I
|
|
545
545
|
}), N = w(() => b.map((g) => ({
|
|
546
546
|
id: g.searchId || "",
|
|
547
547
|
label: g.description || ""
|
|
548
548
|
})), [
|
|
549
549
|
b
|
|
550
|
-
]),
|
|
550
|
+
]), S = R((g) => {
|
|
551
551
|
p({
|
|
552
552
|
input: g,
|
|
553
553
|
countryCodes: y ? [
|
|
@@ -580,10 +580,10 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
580
580
|
}, [
|
|
581
581
|
d
|
|
582
582
|
]), M = E(e, k.Input), _ = E(e, k.Options);
|
|
583
|
-
return /* @__PURE__ */ r.createElement(
|
|
583
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
584
584
|
"aria-labelledby": m,
|
|
585
585
|
inputValue: t ?? "",
|
|
586
|
-
onInputChange:
|
|
586
|
+
onInputChange: S,
|
|
587
587
|
value: null,
|
|
588
588
|
onChange: h,
|
|
589
589
|
isDisabled: n,
|
|
@@ -617,7 +617,7 @@ const Sn = /* @__PURE__ */ xt(hn), Dn = (e, t, o = 200) => {
|
|
|
617
617
|
});
|
|
618
618
|
}, He = ({ children: e, className: t }) => {
|
|
619
619
|
const o = E(e, He.Option);
|
|
620
|
-
return /* @__PURE__ */ r.createElement(
|
|
620
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
621
621
|
className: t,
|
|
622
622
|
containerPadding: 0,
|
|
623
623
|
offset: 0
|
|
@@ -642,7 +642,7 @@ k.Options = He;
|
|
|
642
642
|
k.Description = ie;
|
|
643
643
|
k.Error = ce;
|
|
644
644
|
const re = ({ children: e }) => {
|
|
645
|
-
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),
|
|
645
|
+
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);
|
|
646
646
|
return /* @__PURE__ */ r.createElement(u, {
|
|
647
647
|
fieldId: t,
|
|
648
648
|
renderLabel: () => F(p, {
|
|
@@ -659,7 +659,7 @@ const re = ({ children: e }) => {
|
|
|
659
659
|
onBlur: d,
|
|
660
660
|
onFocus: m
|
|
661
661
|
}, f),
|
|
662
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
662
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, S, N)
|
|
663
663
|
});
|
|
664
664
|
}, Tn = ({ className: e }) => {
|
|
665
665
|
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: l } = T(), a = x(null);
|
|
@@ -776,10 +776,10 @@ const qn = ({ isOpen: e }) => {
|
|
|
776
776
|
onInputKeyDown: y
|
|
777
777
|
};
|
|
778
778
|
}, Y = ({ children: e, ...t }) => {
|
|
779
|
-
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(),
|
|
780
|
-
value:
|
|
781
|
-
label: f(`locale-dataset.countries.${ve[
|
|
782
|
-
}), q), []).sort((q,
|
|
779
|
+
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 = w(() => (b || []).reduce((q, D) => (D.value && ve.hasOwnProperty(D.value) && q.push({
|
|
780
|
+
value: D.value,
|
|
781
|
+
label: f(`locale-dataset.countries.${ve[D.value].toUpperCase()}`)
|
|
782
|
+
}), q), []).sort((q, D) => q.label.localeCompare(D.label, N)), [
|
|
783
783
|
b,
|
|
784
784
|
f,
|
|
785
785
|
N
|
|
@@ -788,7 +788,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
788
788
|
]), O = R(() => h(""), [
|
|
789
789
|
h
|
|
790
790
|
]), { onInputKeyDown: A, ...M } = At({
|
|
791
|
-
options:
|
|
791
|
+
options: S,
|
|
792
792
|
value: l,
|
|
793
793
|
commit: h,
|
|
794
794
|
clear: O,
|
|
@@ -799,7 +799,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
799
799
|
renderLabel: () => F(g, {
|
|
800
800
|
label: _
|
|
801
801
|
}),
|
|
802
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
802
|
+
renderInput: () => /* @__PURE__ */ r.createElement(De, {
|
|
803
803
|
"aria-labelledby": p,
|
|
804
804
|
...M,
|
|
805
805
|
isDisabled: i,
|
|
@@ -811,7 +811,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
811
811
|
}, F(v, {
|
|
812
812
|
onKeyDown: A
|
|
813
813
|
}), F(me, {
|
|
814
|
-
options:
|
|
814
|
+
options: S
|
|
815
815
|
}), /* @__PURE__ */ r.createElement(qn, {
|
|
816
816
|
isOpen: o
|
|
817
817
|
})),
|
|
@@ -850,7 +850,7 @@ Fe.Input = xn;
|
|
|
850
850
|
Fe.Trigger = Bn;
|
|
851
851
|
const je = ({ children: e, className: t, ...o }) => {
|
|
852
852
|
const { options: n } = o, l = E(e, je.Option);
|
|
853
|
-
return /* @__PURE__ */ r.createElement(
|
|
853
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
854
854
|
className: t,
|
|
855
855
|
containerPadding: 0,
|
|
856
856
|
offset: 0
|
|
@@ -911,11 +911,11 @@ function Un({ isAutocompleteEnabled: e }) {
|
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
913
|
const $ = ({ children: e }) => {
|
|
914
|
-
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,
|
|
914
|
+
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);
|
|
915
915
|
return N ? /* @__PURE__ */ r.createElement(u, {
|
|
916
916
|
fieldId: t,
|
|
917
917
|
renderLabel: () => F(h, {
|
|
918
|
-
label:
|
|
918
|
+
label: S
|
|
919
919
|
}),
|
|
920
920
|
renderInput: () => /* @__PURE__ */ r.createElement(Vn, {
|
|
921
921
|
value: o,
|
|
@@ -931,7 +931,7 @@ const $ = ({ children: e }) => {
|
|
|
931
931
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
932
932
|
fieldId: t,
|
|
933
933
|
renderLabel: () => F(h, {
|
|
934
|
-
label:
|
|
934
|
+
label: S
|
|
935
935
|
}),
|
|
936
936
|
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
937
937
|
"aria-labelledby": I,
|
|
@@ -956,7 +956,7 @@ const $ = ({ children: e }) => {
|
|
|
956
956
|
}
|
|
957
957
|
] : [], [
|
|
958
958
|
p
|
|
959
|
-
]),
|
|
959
|
+
]), S = R(async (g) => {
|
|
960
960
|
o(g);
|
|
961
961
|
const v = await b(g ?? "");
|
|
962
962
|
f(v);
|
|
@@ -977,10 +977,10 @@ const $ = ({ children: e }) => {
|
|
|
977
977
|
}, [
|
|
978
978
|
d
|
|
979
979
|
]), M = E(e, $.Control), _ = E(e, $.Options);
|
|
980
|
-
return /* @__PURE__ */ r.createElement(
|
|
980
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
981
981
|
"aria-labelledby": m,
|
|
982
982
|
inputValue: t ?? "",
|
|
983
|
-
onInputChange:
|
|
983
|
+
onInputChange: S,
|
|
984
984
|
value: null,
|
|
985
985
|
onChange: h,
|
|
986
986
|
isDisabled: n,
|
|
@@ -1024,7 +1024,7 @@ const $ = ({ children: e }) => {
|
|
|
1024
1024
|
});
|
|
1025
1025
|
}, Ge = ({ children: e, className: t }) => {
|
|
1026
1026
|
const o = E(e, Ge.Option);
|
|
1027
|
-
return /* @__PURE__ */ r.createElement(
|
|
1027
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1028
1028
|
className: t,
|
|
1029
1029
|
containerPadding: 0,
|
|
1030
1030
|
offset: 0
|
|
@@ -1050,7 +1050,7 @@ $.Options = Ge;
|
|
|
1050
1050
|
$.Description = ie;
|
|
1051
1051
|
$.Error = ce;
|
|
1052
1052
|
const W = ({ children: e }) => {
|
|
1053
|
-
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, W.Label),
|
|
1053
|
+
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, W.Label), S = E(e, W.Input), h = E(e, W.Options), O = E(e, W.Description), A = E(e, W.Error);
|
|
1054
1054
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
1055
1055
|
fieldId: t,
|
|
1056
1056
|
renderLabel: () => F(N, {
|
|
@@ -1065,7 +1065,7 @@ const W = ({ children: e }) => {
|
|
|
1065
1065
|
hasError: s,
|
|
1066
1066
|
onBlur: d,
|
|
1067
1067
|
onFocus: m
|
|
1068
|
-
},
|
|
1068
|
+
}, S, h),
|
|
1069
1069
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1070
1070
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
1071
1071
|
fieldId: t,
|
|
@@ -1082,15 +1082,15 @@ const W = ({ children: e }) => {
|
|
|
1082
1082
|
isInvalid: s,
|
|
1083
1083
|
onBlur: d,
|
|
1084
1084
|
onFocus: m
|
|
1085
|
-
},
|
|
1085
|
+
}, S),
|
|
1086
1086
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1087
1087
|
});
|
|
1088
1088
|
}, Hn = ({ children: e, value: t, onChange: o, disabled: n, readOnly: l, required: a, hasError: i, onBlur: s, onFocus: d }) => {
|
|
1089
1089
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), I = Ke({
|
|
1090
1090
|
enabled: !0
|
|
1091
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } =
|
|
1091
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
1092
1092
|
atlas: I
|
|
1093
|
-
}), N = E(e, W.Input),
|
|
1093
|
+
}), N = E(e, W.Input), S = E(e, W.Options), h = w(() => b.reduce((g, v) => (v.searchId && v.description && g.push({
|
|
1094
1094
|
id: v.searchId,
|
|
1095
1095
|
label: v.description
|
|
1096
1096
|
}), g), []), [
|
|
@@ -1127,7 +1127,7 @@ const W = ({ children: e }) => {
|
|
|
1127
1127
|
}, [
|
|
1128
1128
|
d
|
|
1129
1129
|
]);
|
|
1130
|
-
return /* @__PURE__ */ r.createElement(
|
|
1130
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
1131
1131
|
"aria-labelledby": m,
|
|
1132
1132
|
inputValue: t ?? "",
|
|
1133
1133
|
onInputChange: O,
|
|
@@ -1144,7 +1144,7 @@ const W = ({ children: e }) => {
|
|
|
1144
1144
|
items: h
|
|
1145
1145
|
}, F(N, {
|
|
1146
1146
|
onFocus: _
|
|
1147
|
-
}), F(
|
|
1147
|
+
}), F(S, {
|
|
1148
1148
|
options: h
|
|
1149
1149
|
}), /* @__PURE__ */ r.createElement(Ye, {
|
|
1150
1150
|
optionCount: h.length
|
|
@@ -1164,7 +1164,7 @@ const W = ({ children: e }) => {
|
|
|
1164
1164
|
});
|
|
1165
1165
|
}, Xe = ({ children: e, className: t }) => {
|
|
1166
1166
|
const o = E(e, Xe.Option);
|
|
1167
|
-
return /* @__PURE__ */ r.createElement(
|
|
1167
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1168
1168
|
className: t,
|
|
1169
1169
|
containerPadding: 0,
|
|
1170
1170
|
offset: 0
|
|
@@ -1231,18 +1231,18 @@ const H = ({ children: e }) => {
|
|
|
1231
1231
|
return (kt(((B = f == null ? void 0 : f.subdivisions) == null ? void 0 : B.list) || [], p) || []).map((q) => ({
|
|
1232
1232
|
value: q.key,
|
|
1233
1233
|
label: I(q.displayName)
|
|
1234
|
-
})).sort((q,
|
|
1234
|
+
})).sort((q, D) => q.label.localeCompare(D.label));
|
|
1235
1235
|
}, [
|
|
1236
1236
|
p,
|
|
1237
1237
|
I,
|
|
1238
1238
|
f
|
|
1239
|
-
]),
|
|
1239
|
+
]), S = R(() => n(""), [
|
|
1240
1240
|
n
|
|
1241
1241
|
]), { onInputKeyDown: h, ...O } = At({
|
|
1242
1242
|
options: N,
|
|
1243
1243
|
value: o,
|
|
1244
1244
|
commit: n,
|
|
1245
|
-
clear:
|
|
1245
|
+
clear: S,
|
|
1246
1246
|
onBlur: d
|
|
1247
1247
|
}), 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);
|
|
1248
1248
|
return /* @__PURE__ */ r.createElement(u, {
|
|
@@ -1250,7 +1250,7 @@ const H = ({ children: e }) => {
|
|
|
1250
1250
|
renderLabel: () => F(M, {
|
|
1251
1251
|
label: A
|
|
1252
1252
|
}),
|
|
1253
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
1253
|
+
renderInput: () => /* @__PURE__ */ r.createElement(De, {
|
|
1254
1254
|
"aria-labelledby": y,
|
|
1255
1255
|
...O,
|
|
1256
1256
|
isDisabled: l,
|
|
@@ -1299,7 +1299,7 @@ he.Input = Xn;
|
|
|
1299
1299
|
he.Trigger = zn;
|
|
1300
1300
|
const ze = ({ children: e, className: t, ...o }) => {
|
|
1301
1301
|
const { options: n } = o, l = E(e, ze.Option);
|
|
1302
|
-
return /* @__PURE__ */ r.createElement(
|
|
1302
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1303
1303
|
className: t,
|
|
1304
1304
|
containerPadding: 0,
|
|
1305
1305
|
offset: 0
|
|
@@ -1333,7 +1333,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1333
1333
|
[K.MLA_STREET_NUMBER]: ar,
|
|
1334
1334
|
[K.MLA_APARTMENT]: lr
|
|
1335
1335
|
}, cr = {}, dr = [], c = ({ children: e }) => {
|
|
1336
|
-
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,
|
|
1336
|
+
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 = w(() => ({
|
|
1337
1337
|
...h,
|
|
1338
1338
|
...ir
|
|
1339
1339
|
}), [
|
|
@@ -1370,7 +1370,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1370
1370
|
n,
|
|
1371
1371
|
B,
|
|
1372
1372
|
M
|
|
1373
|
-
]),
|
|
1373
|
+
]), D = R((U, G) => {
|
|
1374
1374
|
if (B && U === ye.COUNTRY && (n == null ? void 0 : n[U]) !== G) {
|
|
1375
1375
|
l == null || l({
|
|
1376
1376
|
[ye.COUNTRY]: G
|
|
@@ -1435,7 +1435,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1435
1435
|
}, /* @__PURE__ */ r.createElement(Cn, {
|
|
1436
1436
|
fields: _t
|
|
1437
1437
|
}, /* @__PURE__ */ r.createElement("div", {
|
|
1438
|
-
ref:
|
|
1438
|
+
ref: S,
|
|
1439
1439
|
style: {
|
|
1440
1440
|
display: "contents"
|
|
1441
1441
|
}
|
|
@@ -1449,7 +1449,7 @@ const Zn = () => ue("country"), er = () => ue("subdivision"), tr = () => ue("cit
|
|
|
1449
1449
|
formSchema: g,
|
|
1450
1450
|
form: j,
|
|
1451
1451
|
values: n ?? cr,
|
|
1452
|
-
onFieldChange:
|
|
1452
|
+
onFieldChange: D,
|
|
1453
1453
|
onBlur: a,
|
|
1454
1454
|
onFocus: i,
|
|
1455
1455
|
errors: s ?? dr,
|
package/dist/component/{number-input-field-rac-DRgq3Ll0.js → number-input-field-rac-BuYUzDWV.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import r, { useState as j, useCallback as
|
|
4
|
-
import { NumberField as
|
|
5
|
-
import { ak as _, ah as S, au as
|
|
3
|
+
import r, { useState as j, useCallback as J, useEffect as Q, useRef as U } from "react";
|
|
4
|
+
import { NumberField as $, Input as z } from "react-aria-components";
|
|
5
|
+
import { ak as _, ah as S, au as G, am as H } from "./form-DQauhsho.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as K, E as W } from "./field-error-headless-
|
|
8
|
-
import { L as X } from "./field-label-headless-
|
|
7
|
+
import { D as K, E as W } from "./field-error-headless-D3-1L5sf.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-Du4ckIVy.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 p } from "./field-rac.module-B4l_0KRU.js";
|
|
13
|
-
import {
|
|
14
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { v as re, J as te, o as ae, j as ne } from "./form-element-classes-bLFmhsKw.js";
|
|
14
|
+
import { u as se } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
15
15
|
const e = ({ children: t }) => {
|
|
16
16
|
var F, L, R;
|
|
17
|
-
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1, A = (L = a == null ? void 0 : a.number) == null ? void 0 : L.maximum, g = (R = a == null ? void 0 : a.number) == null ? void 0 : R.minimum, h = O(s), [x, I] = j(h), T = w(b), V = c(t, e.Label), k = c(t, e.Input), q = c(t, e.Description), M = c(t, e.Error), B =
|
|
17
|
+
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1, A = (L = a == null ? void 0 : a.number) == null ? void 0 : L.maximum, g = (R = a == null ? void 0 : a.number) == null ? void 0 : R.minimum, h = O(s), [x, I] = j(h), T = w(b), V = c(t, e.Label), k = c(t, e.Input), q = c(t, e.Description), M = c(t, e.Error), B = J((N) => {
|
|
18
18
|
if (N === void 0 || Number.isNaN(N)) {
|
|
19
19
|
l(""), I(NaN);
|
|
20
20
|
return;
|
|
@@ -25,14 +25,14 @@ const e = ({ children: t }) => {
|
|
|
25
25
|
D,
|
|
26
26
|
l
|
|
27
27
|
]);
|
|
28
|
-
return
|
|
28
|
+
return Q(() => {
|
|
29
29
|
I(O(s));
|
|
30
30
|
}, [
|
|
31
31
|
s
|
|
32
32
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
33
33
|
fieldId: n,
|
|
34
34
|
renderLabel: () => V,
|
|
35
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
35
|
+
renderInput: () => /* @__PURE__ */ r.createElement($, {
|
|
36
36
|
"aria-labelledby": y,
|
|
37
37
|
value: x,
|
|
38
38
|
onChange: B,
|
|
@@ -49,13 +49,13 @@ const e = ({ children: t }) => {
|
|
|
49
49
|
});
|
|
50
50
|
}, le = ({ className: t }) => {
|
|
51
51
|
var u;
|
|
52
|
-
const { t: n } =
|
|
52
|
+
const { t: n } = G(), { inputId: s, ariaDescribedBy: l } = S(), { id: d, placeholder: E, validation: o, label: b, required: f } = _();
|
|
53
53
|
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
54
|
-
const m =
|
|
55
|
-
return
|
|
54
|
+
const m = U(null);
|
|
55
|
+
return H(() => {
|
|
56
56
|
var a;
|
|
57
57
|
(a = m.current) == null || a.focus();
|
|
58
|
-
}, d), /* @__PURE__ */ r.createElement(
|
|
58
|
+
}, d), /* @__PURE__ */ r.createElement(z, {
|
|
59
59
|
ref: m,
|
|
60
60
|
id: s,
|
|
61
61
|
"aria-describedby": l,
|