@wix/form-elements 1.147.0 → 1.149.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-BG5-bIZU.js → appointment-rac-CeJ6tmgt.js} +93 -89
- package/dist/component/{bookings-address-rac-8e8PqKsp.js → bookings-address-rac-CEObYEbj.js} +1 -1
- package/dist/component/{bookings-email-rac-CtlnU8ws.js → bookings-email-rac-DmW99D5W.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CrivNlXM.js → bookings-first-name-rac-GmKet4hL.js} +1 -1
- package/dist/component/{bookings-header-rac-DWDAjfqq.js → bookings-header-rac-C_J1YzAq.js} +1 -1
- package/dist/component/{bookings-last-name-rac-qAthWem2.js → bookings-last-name-rac-Bj-gwK0F.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BNyUDqlM.js → bookings-login-bar-rac-ol4QLAP6.js} +1 -1
- package/dist/component/{bookings-phone-rac-Tc39XLr7.js → bookings-phone-rac-oaCG294y.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CPNaPtFK.js → bookings-rich-text-rac-sMiikQgk.js} +1 -1
- package/dist/component/{checkbox-field-rac-DEa78Tpf.js → checkbox-field-rac-DxGaRbDj.js} +9 -7
- package/dist/component/{checkbox-group-field-headless-BxBaMg29.js → checkbox-group-field-headless-C3ZaCvQz.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CRRP03Qk.js → checkbox-group-field-rac-CMj-kfFN.js} +6 -6
- package/dist/component/{checkbox-group-rac-TOofMGl3.js → checkbox-group-rac-DpOT4H7g.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-6173wvuW.js → checkbox-indicator-module-classes-akWZsZNn.js} +1 -1
- package/dist/component/{checkbox-rac-CHMHr8Ry.js → checkbox-rac-CwdOkW8r.js} +1 -1
- package/dist/component/{contacts-address-rac-Bc5yDvTL.js → contacts-address-rac-CQvt1Epy.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-Ubtg5ncv.js → contacts-birthdate-rac-VRGtjIMf.js} +1 -1
- package/dist/component/{contacts-company-rac-BksH9IoV.js → contacts-company-rac-B_XDJTL9.js} +1 -1
- package/dist/component/{contacts-email-rac-DDPEtMAm.js → contacts-email-rac-BJ0EdzZo.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DUlCvEdx.js → contacts-first-name-rac-DzBzJXj7.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BikqNgUr.js → contacts-last-name-rac-DAHlHpW7.js} +1 -1
- package/dist/component/{contacts-phone-rac-B4OEgM_8.js → contacts-phone-rac-C4D1TMqv.js} +1 -1
- package/dist/component/{contacts-position-rac-BfybzySV.js → contacts-position-rac-g0CJQJLc.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CMHb33v1.js → contacts-subscribe-rac-C54jQIum.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-C-qEqwO5.js → contacts-tax-id-rac-D_JlmKJb.js} +1 -1
- package/dist/component/{date-availability-DZ3J3LLm.js → date-availability-CFp_AHpE.js} +1 -1
- package/dist/component/{date-input-field-rac-DeL5vuE7.js → date-input-field-rac-CxOU5_P5.js} +75 -69
- package/dist/component/{date-input-rac-Di6TQvFf.js → date-input-rac-CEuyvgIp.js} +1 -1
- package/dist/component/{date-picker-field-rac-BcdpTkjV.js → date-picker-field-rac-DC8gw2Qe.js} +10 -8
- package/dist/component/{date-picker-rac-Brne65gr.js → date-picker-rac-B8prCy1F.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BtQfAxRp.js → date-time-input-field-rac-FwScqIVQ.js} +115 -109
- package/dist/component/{date-time-input-rac-DM_HXiqV.js → date-time-input-rac-gdstXM2G.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-WTVwhGG0.js → dext-checkbox-group-rac-DdEAXUYC.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BR5YwmLQ.js → dext-checkbox-rac-DYgl82IR.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DvDuRGYi.js → dext-date-picker-rac-SaO61461.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C6RgbaVv.js → dext-date-time-input-rac-CQ2klkyf.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CWjSdcZx.js → dext-dropdown-rac-CYINWMm2.js} +1 -1
- package/dist/component/{dext-email-rac-D-C1gVTq.js → dext-email-rac-7e49-L1S.js} +1 -1
- package/dist/component/{dext-number-input-rac-YKzZS2ZG.js → dext-number-input-rac-BxECUZaK.js} +1 -1
- package/dist/component/{dext-phone-rac-CFZlEH2a.js → dext-phone-rac-BCUCWcrF.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DiH0wIIl.js → dext-radio-group-rac-Bs_64hFW.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D0s-i0qO.js → dext-rating-input-rac-Bl-MBjGQ.js} +1 -1
- package/dist/component/{dext-tags-rac-Br48OQQ5.js → dext-tags-rac-D98sEqwj.js} +2 -2
- package/dist/component/{dext-text-area-rac-6jG8gJ7i.js → dext-text-area-rac-Dsbsk2z4.js} +1 -1
- package/dist/component/{dext-text-input-rac-FAJTCXuf.js → dext-text-input-rac-vYtTnV5G.js} +1 -1
- package/dist/component/{dext-url-input-rac-BoMP8sQB.js → dext-url-input-rac-tJJZOvtn.js} +1 -1
- package/dist/component/{donation-rac-DNi4p-v5.js → donation-rac-CPPSHRbF.js} +60 -58
- package/dist/component/{dropdown-field-headless-7SCC-xOC.js → dropdown-field-headless-BWbsB155.js} +29 -27
- package/dist/component/{dropdown-field-rac-CMzZh6J6.js → dropdown-field-rac-BYyLHTVV.js} +4 -4
- package/dist/component/{dropdown-rac-qeugpHXY.js → dropdown-rac-CyWVQHvW.js} +1 -1
- package/dist/component/{ecom-address-rac-D8b_L5md.js → ecom-address-rac-DLWEUZg7.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BnAuR9La.js → ecom-subscription-checkbox-rac-DY-Vzmr5.js} +2 -2
- package/dist/component/{email-input-field-rac-CunXRyc5.js → email-input-field-rac-00Q0cH3p.js} +4 -4
- package/dist/component/{events-repeater-rac-DMjyIOkB.js → events-repeater-rac-C_TDB0VL.js} +12 -8
- package/dist/component/{events-rsvp-rac-BsuDPq2K.js → events-rsvp-rac-Cly4TgEv.js} +4 -4
- package/dist/component/{field-error-headless-E8WjFr_n.js → field-error-headless-sUpR20_V.js} +1 -1
- package/dist/component/{field-label-headless-BakLOu5E.js → field-label-headless-xEHyxl62.js} +1 -1
- package/dist/component/field-rac.module-DP0lkkEv.js +25 -0
- package/dist/component/{file-upload-rac-Clu_c--0.js → file-upload-rac-BLTYhgrR.js} +148 -144
- package/dist/component/{fixed-payment-rac-CzAXxsb-.js → fixed-payment-rac-BBSzAU8U.js} +4 -4
- package/dist/component/{form-DHAKwnLt.js → form-DbRjIc40.js} +2212 -2217
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CwmVpz3r.js → header-field-rac-DdF0EtGw.js} +2 -2
- package/dist/component/{header-rac-ahkGRjSy.js → header-rac-CQzVj2se.js} +1 -1
- package/dist/component/{image-choice-rac-BwxkkdUu.js → image-choice-rac-F4il5nrs.js} +32 -32
- package/dist/component/{index-BFi_n6B7.js → index-3lV2ezGk.js} +2 -2
- package/dist/component/{index-BQf23zZi.js → index-ClGqqyFk.js} +4 -4
- package/dist/component/{isObjectLike-DHcMRYYH.js → isObjectLike-CbFuWC1b.js} +1 -1
- package/dist/component/{multiline-address-field-rac-C6xaqNOk.js → multiline-address-field-rac-Bhkmy-UH.js} +106 -88
- package/dist/component/{multiline-address-rac-DF4TFuDx.js → multiline-address-rac-CH6ZAJ_l.js} +1 -1
- package/dist/component/{number-input-field-rac-uVJ3SBv2.js → number-input-field-rac-DEBHQQqw.js} +16 -14
- package/dist/component/{number-input-rac-D6ERhrSM.js → number-input-rac-DL3ReqMc.js} +1 -1
- package/dist/component/{password-rac-CAiC0ZKl.js → password-rac-Bo7Va46-.js} +13 -11
- package/dist/component/{payment-input-rac-Bu25xvby.js → payment-input-rac-CyT2kcLF.js} +13 -11
- package/dist/component/{phone-input-field-rac-32qUvCsC.js → phone-input-field-rac-CKCkS2mG.js} +7 -7
- package/dist/component/{phone-rac-mNrpj30q.js → phone-rac-BcW_3aA5.js} +1 -1
- package/dist/component/{product-list-rac-zHdM9rHw.js → product-list-rac-Cxu5KYQ1.js} +49 -49
- package/dist/component/{quiz-radio-group-rac-BaSlT8w3.js → quiz-radio-group-rac-Bam3nw3m.js} +1 -1
- package/dist/component/radio-button-module-classes-D6cil49f.js +134 -0
- package/dist/component/{radio-group-field-rac-DI0UgTBr.js → radio-group-field-rac-BgWnXO5Q.js} +5 -5
- package/dist/component/{radio-group-rac-D2ESG8J4.js → radio-group-rac-BMepx9xD.js} +1 -1
- package/dist/component/{rating-input-field-rac-BYT2XqOK.js → rating-input-field-rac-BmdQzQ1t.js} +5 -5
- package/dist/component/{rating-input-rac-D-5CmVAX.js → rating-input-rac-BuNTgro2.js} +1 -1
- package/dist/component/{rich-content-rac.module-Dp9Advo9.js → rich-content-rac.module-DIShgYK1.js} +1 -1
- package/dist/component/{rich-text-field-rac-COEUwoXQ.js → rich-text-field-rac-CfcWsMcr.js} +2 -2
- package/dist/component/{rich-text-rac-CQZLjBQ0.js → rich-text-rac-CbpbC1i1.js} +1 -1
- package/dist/component/{service-dropdown-rac-BTtJVFv8.js → service-dropdown-rac-_ph-8eMR.js} +5 -5
- package/dist/component/{services-multi-choice-rac-hbY3g0Kb.js → services-multi-choice-rac-VS-18f_N.js} +7 -7
- package/dist/component/{signature-rac-CTCNclwL.js → signature-rac-CgCdt4im.js} +286 -284
- package/dist/component/{submit-button-rac-kKGeVgsG.js → submit-button-rac-CAnahSZG.js} +2 -2
- package/dist/component/{tags-field-rac-CVf7oQr_.js → tags-field-rac-TdxHJoT1.js} +75 -75
- package/dist/component/{tags-rac-DiX1_nTT.js → tags-rac-ivZy_kqq.js} +1 -1
- package/dist/component/{text-area-field-rac-IhBNXiDl.js → text-area-field-rac-C4dg7l8s.js} +15 -13
- package/dist/component/{text-area-rac-DHevCtFF.js → text-area-rac-Dqcg7ApJ.js} +1 -1
- package/dist/component/{text-input-field-rac-Da3_wTdh.js → text-input-field-rac-C6VjmvWa.js} +4 -4
- package/dist/component/text-input-headless-CUsCjQmX.js +47 -0
- package/dist/component/{text-input-rac-564LIZ1_.js → text-input-rac-CMFWBJKG.js} +1 -1
- package/dist/component/{time-input-rac-p-Nnsxp_.js → time-input-rac-cbG7WRTS.js} +29 -27
- package/dist/component/{url-input-field-rac-DjrcpRtm.js → url-input-field-rac-7yh9eqH3.js} +20 -18
- package/dist/component/{url-input-rac-B3brpyop.js → url-input-rac-D_rkLxU0.js} +1 -1
- package/dist/component/{use-dropdown-trigger-class-name-BWTT7ltv.js → use-dropdown-trigger-class-name-B53A0SXh.js} +4 -4
- package/dist/component/{use-element-state-class-name-CUZuhFvZ.js → use-element-state-class-name-glM9I1ZZ.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-ugX8-g4E.js → use-hoverable-input-class-name-DpOCZ2hg.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DUZMvWpk.js → use-is-forced-open-dropdown-B0M0FaQ-.js} +1 -1
- package/dist/component/{use-service-options-base-hqO9Ev38.js → use-service-options-base-CqZd8Yl3.js} +1 -1
- package/dist/component/use-text-input-class-name-DPUN9lls.js +6 -0
- package/dist/form.d.ts +3 -3
- package/package.json +2 -2
- package/dist/component/field-rac.module-DfEb7pBp.js +0 -25
- package/dist/component/radio-button-module-classes-BdWjkBlX.js +0 -132
- package/dist/component/text-input-headless-DcZRRXCp.js +0 -45
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +0 -6
|
@@ -2,21 +2,21 @@ import { RicosViewer as G } from "@wix/ricos/viewer";
|
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import r, { useMemo as q, createContext as Ve, useContext as Ce, useState as be, useRef as x, useCallback as R, useEffect as _e } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as _t } from "react-aria";
|
|
5
|
-
import { bj as ft, d as yt, be as Pt, bg as Ct, aT as Tt, aU as wt, aM as Mt, aS as W, F as K, by as Pe, b7 as lt, bo as P, bl as T, bq as ae, bk as It, aY as qt, C as Oe, b5 as xt, b9 as Bt, bv as kt, bp as $t, bu as Ut, bc as Vt, b1 as Wt, bb as Kt, br as Yt, as as Ht, S as z, a0 as Q, y as ge, H as Z, v as ee } from "./form-
|
|
5
|
+
import { bj as ft, d as yt, be as Pt, bg as Ct, aT as Tt, aU as wt, aM as Mt, aS as W, F as K, by as Pe, b7 as lt, bo as P, bl as T, bq as ae, bk as It, aY as qt, C as Oe, b5 as xt, b9 as Bt, bv as kt, bp as $t, bu as Ut, bc as Vt, b1 as Wt, bb as Kt, br as Yt, as as Ht, S as z, a0 as Q, y as ge, H as Z, v as ee } from "./form-DbRjIc40.js";
|
|
6
6
|
import { f as E, a as F } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { a as Xt } from "./use-is-forced-open-dropdown-
|
|
9
|
-
import { TextField as fe, Input as le, ComboBoxStateContext as We, ComboBox as he, Popover 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 Gt, c as zt, a as Qt, r as gt } from "./isObjectLike-
|
|
13
|
-
import { V as Zt, a as en, u as tn } from "./use-dropdown-trigger-class-name-
|
|
8
|
+
import { a as Xt } from "./use-is-forced-open-dropdown-B0M0FaQ-.js";
|
|
9
|
+
import { TextField as fe, Input as le, ComboBoxStateContext as We, ComboBox as he, Popover as Se, ListBox as Te, ListBoxItem as De, Group as Lt, Button as Nt } from "react-aria-components";
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-sUpR20_V.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-xEHyxl62.js";
|
|
12
|
+
import { e as Gt, c as zt, a as Qt, r as gt } from "./isObjectLike-CbFuWC1b.js";
|
|
13
|
+
import { V as Zt, a as en, u as tn } from "./use-dropdown-trigger-class-name-B53A0SXh.js";
|
|
14
14
|
import { u as nn } from "./use-invoke-callback-UH73A_J3.js";
|
|
15
15
|
import { C as it } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as we } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as I } from "./field-rac.module-
|
|
19
|
-
import { u as rn } from "./use-text-input-class-name-
|
|
18
|
+
import { s as I } from "./field-rac.module-DP0lkkEv.js";
|
|
19
|
+
import { u as rn } from "./use-text-input-class-name-DPUN9lls.js";
|
|
20
20
|
const on = (e, t, o) => {
|
|
21
21
|
var a, l, i, s;
|
|
22
22
|
const n = (a = e.steps) == null ? void 0 : a.map((d) => {
|
|
@@ -183,7 +183,7 @@ const dn = (e, t) => e.map((o) => ({
|
|
|
183
183
|
}, [
|
|
184
184
|
i,
|
|
185
185
|
s
|
|
186
|
-
]),
|
|
186
|
+
]), D = q(() => wt(), []);
|
|
187
187
|
return {
|
|
188
188
|
form: q(() => {
|
|
189
189
|
var _, g;
|
|
@@ -199,7 +199,7 @@ const dn = (e, t) => e.map((o) => ({
|
|
|
199
199
|
includeHiddenFields: !0,
|
|
200
200
|
isMobile: C,
|
|
201
201
|
breakpoint: b,
|
|
202
|
-
form: cn(on(p, N,
|
|
202
|
+
form: cn(on(p, N, D), l, (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 dn = (e, t) => e.map((o) => ({
|
|
|
216
216
|
i,
|
|
217
217
|
t,
|
|
218
218
|
N,
|
|
219
|
-
|
|
219
|
+
D,
|
|
220
220
|
f,
|
|
221
221
|
u,
|
|
222
222
|
e,
|
|
@@ -269,7 +269,9 @@ const ne = ({ children: e }) => {
|
|
|
269
269
|
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: a } = T(), l = x(null);
|
|
270
270
|
return ae(() => {
|
|
271
271
|
var i;
|
|
272
|
-
(i = l.current) == null || i.focus(
|
|
272
|
+
(i = l.current) == null || i.focus({
|
|
273
|
+
preventScroll: !0
|
|
274
|
+
});
|
|
273
275
|
}, t), /* @__PURE__ */ r.createElement(le, {
|
|
274
276
|
ref: l,
|
|
275
277
|
id: n,
|
|
@@ -379,33 +381,33 @@ function hn() {
|
|
|
379
381
|
Et = 1;
|
|
380
382
|
var e = gt(), t = Nn(), o = Fn(), n = "Expected a function", a = Math.max, l = Math.min;
|
|
381
383
|
function i(s, d, m) {
|
|
382
|
-
var u, y, C, b, p, f, N = 0,
|
|
384
|
+
var u, y, C, b, p, f, N = 0, D = !1, h = !1, O = !0;
|
|
383
385
|
if (typeof s != "function")
|
|
384
386
|
throw new TypeError(n);
|
|
385
|
-
d = o(d) || 0, e(m) && (
|
|
386
|
-
function A(
|
|
387
|
+
d = o(d) || 0, e(m) && (D = !!m.leading, h = "maxWait" in m, C = h ? a(o(m.maxWait) || 0, d) : C, O = "trailing" in m ? !!m.trailing : O);
|
|
388
|
+
function A(S) {
|
|
387
389
|
var J = u, Ee = y;
|
|
388
|
-
return u = y = void 0, N =
|
|
390
|
+
return u = y = void 0, N = S, b = s.apply(Ee, J), b;
|
|
389
391
|
}
|
|
390
|
-
function w(
|
|
391
|
-
return N =
|
|
392
|
+
function w(S) {
|
|
393
|
+
return N = S, p = setTimeout(v, d), D ? A(S) : b;
|
|
392
394
|
}
|
|
393
|
-
function _(
|
|
394
|
-
var J =
|
|
395
|
+
function _(S) {
|
|
396
|
+
var J = S - f, Ee = S - N, Ne = d - J;
|
|
395
397
|
return h ? l(Ne, C - Ee) : Ne;
|
|
396
398
|
}
|
|
397
|
-
function g(
|
|
398
|
-
var J =
|
|
399
|
+
function g(S) {
|
|
400
|
+
var J = S - f, Ee = S - N;
|
|
399
401
|
return f === void 0 || J >= d || J < 0 || h && Ee >= C;
|
|
400
402
|
}
|
|
401
403
|
function v() {
|
|
402
|
-
var
|
|
403
|
-
if (g(
|
|
404
|
-
return me(
|
|
405
|
-
p = setTimeout(v, _(
|
|
404
|
+
var S = t();
|
|
405
|
+
if (g(S))
|
|
406
|
+
return me(S);
|
|
407
|
+
p = setTimeout(v, _(S));
|
|
406
408
|
}
|
|
407
|
-
function me(
|
|
408
|
-
return p = void 0, O && u ? A(
|
|
409
|
+
function me(S) {
|
|
410
|
+
return p = void 0, O && u ? A(S) : (u = y = void 0, b);
|
|
409
411
|
}
|
|
410
412
|
function j() {
|
|
411
413
|
p !== void 0 && clearTimeout(p), N = 0, u = f = y = p = void 0;
|
|
@@ -414,8 +416,8 @@ function hn() {
|
|
|
414
416
|
return p === void 0 ? b : me(t());
|
|
415
417
|
}
|
|
416
418
|
function M() {
|
|
417
|
-
var
|
|
418
|
-
if (u = arguments, y = this, f =
|
|
419
|
+
var S = t(), J = g(S);
|
|
420
|
+
if (u = arguments, y = this, f = S, J) {
|
|
419
421
|
if (p === void 0)
|
|
420
422
|
return w(f);
|
|
421
423
|
if (h)
|
|
@@ -427,9 +429,9 @@ function hn() {
|
|
|
427
429
|
}
|
|
428
430
|
return Ue = i, Ue;
|
|
429
431
|
}
|
|
430
|
-
var
|
|
431
|
-
const
|
|
432
|
-
const n = x(e), a = R(
|
|
432
|
+
var Sn = hn();
|
|
433
|
+
const Dn = /* @__PURE__ */ qt(Sn), Rn = (e, t, o = 200) => {
|
|
434
|
+
const n = x(e), a = R(Dn((...l) => {
|
|
433
435
|
n.current(...l);
|
|
434
436
|
}, o), [
|
|
435
437
|
o
|
|
@@ -448,7 +450,7 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
448
450
|
}, bt = {
|
|
449
451
|
loading: !1,
|
|
450
452
|
predictions: []
|
|
451
|
-
},
|
|
453
|
+
}, St = ({ atlas: e, onError: t }) => {
|
|
452
454
|
const [{ loading: n, predictions: a }, l] = be(bt), i = x(0), s = An(), d = R(() => {
|
|
453
455
|
i.current++, l(bt);
|
|
454
456
|
}, []), m = Rn(async ({ input: u, countryCodes: y }) => {
|
|
@@ -502,7 +504,7 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
502
504
|
e
|
|
503
505
|
]), null;
|
|
504
506
|
}, k = ({ children: e }) => {
|
|
505
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("addressLine1"), N = E(e, k.Label),
|
|
507
|
+
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("addressLine1"), N = E(e, k.Label), D = E(e, k.Input), h = E(e, k.Options), O = E(e, k.Description), A = E(e, k.Error);
|
|
506
508
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
507
509
|
fieldId: t,
|
|
508
510
|
renderLabel: () => F(N, {
|
|
@@ -517,7 +519,7 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
517
519
|
hasError: s,
|
|
518
520
|
onBlur: d,
|
|
519
521
|
onFocus: m
|
|
520
|
-
},
|
|
522
|
+
}, D, h),
|
|
521
523
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
522
524
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
523
525
|
fieldId: t,
|
|
@@ -534,20 +536,20 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
534
536
|
isInvalid: s,
|
|
535
537
|
onBlur: d,
|
|
536
538
|
onFocus: m
|
|
537
|
-
},
|
|
539
|
+
}, D),
|
|
538
540
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
539
541
|
});
|
|
540
542
|
}, _n = ({ children: e, value: t, onChange: o, disabled: n, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
541
543
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), C = Ke({
|
|
542
544
|
enabled: !0
|
|
543
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } =
|
|
545
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
544
546
|
atlas: C
|
|
545
547
|
}), N = q(() => b.map((g) => ({
|
|
546
548
|
id: g.searchId || "",
|
|
547
549
|
label: g.description || ""
|
|
548
550
|
})), [
|
|
549
551
|
b
|
|
550
|
-
]),
|
|
552
|
+
]), D = R((g) => {
|
|
551
553
|
p({
|
|
552
554
|
input: g,
|
|
553
555
|
countryCodes: y ? [
|
|
@@ -583,7 +585,7 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
583
585
|
return /* @__PURE__ */ r.createElement(he, {
|
|
584
586
|
"aria-labelledby": m,
|
|
585
587
|
inputValue: t ?? "",
|
|
586
|
-
onInputChange:
|
|
588
|
+
onInputChange: D,
|
|
587
589
|
value: null,
|
|
588
590
|
onChange: h,
|
|
589
591
|
isDisabled: n,
|
|
@@ -606,7 +608,9 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
606
608
|
const { id: o, placeholder: n } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = x(null);
|
|
607
609
|
return ae(() => {
|
|
608
610
|
var d;
|
|
609
|
-
(d = s.current) == null || d.focus(
|
|
611
|
+
(d = s.current) == null || d.focus({
|
|
612
|
+
preventScroll: !0
|
|
613
|
+
});
|
|
610
614
|
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
611
615
|
ref: s,
|
|
612
616
|
id: a,
|
|
@@ -618,7 +622,7 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
618
622
|
});
|
|
619
623
|
}, He = ({ children: e, className: t }) => {
|
|
620
624
|
const o = E(e, He.Option);
|
|
621
|
-
return /* @__PURE__ */ r.createElement(
|
|
625
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
622
626
|
className: t,
|
|
623
627
|
containerPadding: 0,
|
|
624
628
|
offset: 0
|
|
@@ -630,7 +634,7 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
630
634
|
})));
|
|
631
635
|
}, Tn = ({ className: e, ...t }) => {
|
|
632
636
|
const { id: o, label: n } = t;
|
|
633
|
-
return /* @__PURE__ */ r.createElement(
|
|
637
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
634
638
|
className: e,
|
|
635
639
|
id: o,
|
|
636
640
|
textValue: n
|
|
@@ -643,7 +647,7 @@ k.Options = He;
|
|
|
643
647
|
k.Description = ie;
|
|
644
648
|
k.Error = ce;
|
|
645
649
|
const re = ({ children: e }) => {
|
|
646
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: C } = Pe(), b = C("field.mla-apartment.label"), p = E(e, re.Label), f = E(e, re.Input), N = E(e, re.Description),
|
|
650
|
+
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: C } = Pe(), b = C("field.mla-apartment.label"), p = E(e, re.Label), f = E(e, re.Input), N = E(e, re.Description), D = E(e, re.Error);
|
|
647
651
|
return /* @__PURE__ */ r.createElement(u, {
|
|
648
652
|
fieldId: t,
|
|
649
653
|
renderLabel: () => F(p, {
|
|
@@ -660,13 +664,15 @@ const re = ({ children: e }) => {
|
|
|
660
664
|
onBlur: d,
|
|
661
665
|
onFocus: m
|
|
662
666
|
}, f),
|
|
663
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
667
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, D, N)
|
|
664
668
|
});
|
|
665
669
|
}, wn = ({ className: e }) => {
|
|
666
670
|
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: a } = T(), l = x(null);
|
|
667
671
|
return ae(() => {
|
|
668
672
|
var i;
|
|
669
|
-
(i = l.current) == null || i.focus(
|
|
673
|
+
(i = l.current) == null || i.focus({
|
|
674
|
+
preventScroll: !0
|
|
675
|
+
});
|
|
670
676
|
}, t), /* @__PURE__ */ r.createElement(le, {
|
|
671
677
|
ref: l,
|
|
672
678
|
id: n,
|
|
@@ -704,7 +710,9 @@ const oe = ({ children: e }) => {
|
|
|
704
710
|
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: a } = T(), l = x(null);
|
|
705
711
|
return ae(() => {
|
|
706
712
|
var i;
|
|
707
|
-
(i = l.current) == null || i.focus(
|
|
713
|
+
(i = l.current) == null || i.focus({
|
|
714
|
+
preventScroll: !0
|
|
715
|
+
});
|
|
708
716
|
}, t), /* @__PURE__ */ r.createElement(le, {
|
|
709
717
|
ref: l,
|
|
710
718
|
id: n,
|
|
@@ -726,7 +734,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
726
734
|
e,
|
|
727
735
|
t
|
|
728
736
|
]), null;
|
|
729
|
-
},
|
|
737
|
+
}, Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
730
738
|
const o = Ce(We);
|
|
731
739
|
return R(() => {
|
|
732
740
|
!o || o.isOpen || e || t || o.open(null, "manual");
|
|
@@ -779,10 +787,10 @@ const qn = ({ isOpen: e }) => {
|
|
|
779
787
|
onInputKeyDown: y
|
|
780
788
|
};
|
|
781
789
|
}, Y = ({ children: e, ...t }) => {
|
|
782
|
-
const { isForcedOpen: o = !1 } = t, { id: n, value: a, onChange: l, disabled: i, readOnly: s, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: C, options: b } = P(), { labelId: p } = T(), { t: f } = Pe(), { language: N } = Ct(),
|
|
783
|
-
value:
|
|
784
|
-
label: f(`locale-dataset.countries.${Oe[
|
|
785
|
-
}), M), []).sort((M,
|
|
790
|
+
const { isForcedOpen: o = !1 } = t, { id: n, value: a, onChange: l, disabled: i, readOnly: s, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: C, options: b } = P(), { labelId: p } = T(), { t: f } = Pe(), { language: N } = Ct(), D = q(() => (b || []).reduce((M, S) => (S.value && Oe.hasOwnProperty(S.value) && M.push({
|
|
791
|
+
value: S.value,
|
|
792
|
+
label: f(`locale-dataset.countries.${Oe[S.value].toUpperCase()}`)
|
|
793
|
+
}), M), []).sort((M, S) => M.label.localeCompare(S.label, N)), [
|
|
786
794
|
b,
|
|
787
795
|
f,
|
|
788
796
|
N
|
|
@@ -791,7 +799,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
791
799
|
]), O = R(() => h(""), [
|
|
792
800
|
h
|
|
793
801
|
]), { onInputKeyDown: A, ...w } = Rt({
|
|
794
|
-
options:
|
|
802
|
+
options: D,
|
|
795
803
|
value: a,
|
|
796
804
|
commit: h,
|
|
797
805
|
clear: O,
|
|
@@ -814,7 +822,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
814
822
|
}, F(v, {
|
|
815
823
|
onKeyDown: A
|
|
816
824
|
}), F(me, {
|
|
817
|
-
options:
|
|
825
|
+
options: D,
|
|
818
826
|
isForcedOpen: o
|
|
819
827
|
}), /* @__PURE__ */ r.createElement(qn, {
|
|
820
828
|
isOpen: o
|
|
@@ -831,13 +839,15 @@ const qn = ({ isOpen: e }) => {
|
|
|
831
839
|
onKeyDown: l
|
|
832
840
|
}), s);
|
|
833
841
|
}, Bn = ({ className: e, ...t }) => {
|
|
834
|
-
const { id: o, placeholder: n, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = x(null), u =
|
|
842
|
+
const { id: o, placeholder: n, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = x(null), u = Dt({
|
|
835
843
|
readOnly: a,
|
|
836
844
|
disabled: l
|
|
837
845
|
});
|
|
838
846
|
return ae(() => {
|
|
839
847
|
var y;
|
|
840
|
-
(y = m.current) == null || y.focus(
|
|
848
|
+
(y = m.current) == null || y.focus({
|
|
849
|
+
preventScroll: !0
|
|
850
|
+
});
|
|
841
851
|
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
842
852
|
ref: m,
|
|
843
853
|
id: i,
|
|
@@ -855,7 +865,7 @@ ve.Input = Bn;
|
|
|
855
865
|
ve.Trigger = kn;
|
|
856
866
|
const je = ({ children: e, className: t, ...o }) => {
|
|
857
867
|
const { options: n, isForcedOpen: a } = o, l = E(e, je.Option);
|
|
858
|
-
return /* @__PURE__ */ r.createElement(
|
|
868
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
859
869
|
className: t,
|
|
860
870
|
containerPadding: 0,
|
|
861
871
|
offset: 0
|
|
@@ -868,7 +878,7 @@ const je = ({ children: e, className: t, ...o }) => {
|
|
|
868
878
|
}))));
|
|
869
879
|
}, $n = ({ className: e, ...t }) => {
|
|
870
880
|
const { value: o, label: n } = t;
|
|
871
|
-
return /* @__PURE__ */ r.createElement(
|
|
881
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
872
882
|
className: e,
|
|
873
883
|
id: o,
|
|
874
884
|
textValue: n
|
|
@@ -918,11 +928,11 @@ function Wn({ isAutocompleteEnabled: e }) {
|
|
|
918
928
|
};
|
|
919
929
|
}
|
|
920
930
|
const $ = ({ children: e }) => {
|
|
921
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && Oe[b] === Oe.JP), N = (y || p) && f,
|
|
931
|
+
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && Oe[b] === Oe.JP), N = (y || p) && f, D = pe("zipCode"), h = E(e, $.Label), O = E(e, $.Control), A = E(e, $.Options), w = E(e, $.Description), _ = E(e, $.Error);
|
|
922
932
|
return N ? /* @__PURE__ */ r.createElement(u, {
|
|
923
933
|
fieldId: t,
|
|
924
934
|
renderLabel: () => F(h, {
|
|
925
|
-
label:
|
|
935
|
+
label: D
|
|
926
936
|
}),
|
|
927
937
|
renderInput: () => /* @__PURE__ */ r.createElement(Kn, {
|
|
928
938
|
value: o,
|
|
@@ -938,7 +948,7 @@ const $ = ({ children: e }) => {
|
|
|
938
948
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
939
949
|
fieldId: t,
|
|
940
950
|
renderLabel: () => F(h, {
|
|
941
|
-
label:
|
|
951
|
+
label: D
|
|
942
952
|
}),
|
|
943
953
|
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
944
954
|
"aria-labelledby": C,
|
|
@@ -963,7 +973,7 @@ const $ = ({ children: e }) => {
|
|
|
963
973
|
}
|
|
964
974
|
] : [], [
|
|
965
975
|
p
|
|
966
|
-
]),
|
|
976
|
+
]), D = R(async (g) => {
|
|
967
977
|
o(g);
|
|
968
978
|
const v = await b(g ?? "");
|
|
969
979
|
f(v);
|
|
@@ -987,7 +997,7 @@ const $ = ({ children: e }) => {
|
|
|
987
997
|
return /* @__PURE__ */ r.createElement(he, {
|
|
988
998
|
"aria-labelledby": m,
|
|
989
999
|
inputValue: t ?? "",
|
|
990
|
-
onInputChange:
|
|
1000
|
+
onInputChange: D,
|
|
991
1001
|
value: null,
|
|
992
1002
|
onChange: h,
|
|
993
1003
|
isDisabled: n,
|
|
@@ -1020,7 +1030,9 @@ const $ = ({ children: e }) => {
|
|
|
1020
1030
|
const { id: o, placeholder: n } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = x(null);
|
|
1021
1031
|
return ae(() => {
|
|
1022
1032
|
var d;
|
|
1023
|
-
(d = s.current) == null || d.focus(
|
|
1033
|
+
(d = s.current) == null || d.focus({
|
|
1034
|
+
preventScroll: !0
|
|
1035
|
+
});
|
|
1024
1036
|
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
1025
1037
|
ref: s,
|
|
1026
1038
|
id: a,
|
|
@@ -1032,7 +1044,7 @@ const $ = ({ children: e }) => {
|
|
|
1032
1044
|
});
|
|
1033
1045
|
}, Xe = ({ children: e, className: t }) => {
|
|
1034
1046
|
const o = E(e, Xe.Option);
|
|
1035
|
-
return /* @__PURE__ */ r.createElement(
|
|
1047
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1036
1048
|
className: t,
|
|
1037
1049
|
containerPadding: 0,
|
|
1038
1050
|
offset: 0
|
|
@@ -1044,7 +1056,7 @@ const $ = ({ children: e }) => {
|
|
|
1044
1056
|
})));
|
|
1045
1057
|
}, Hn = ({ className: e, ...t }) => {
|
|
1046
1058
|
const { id: o, label: n } = t;
|
|
1047
|
-
return /* @__PURE__ */ r.createElement(
|
|
1059
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
1048
1060
|
className: e,
|
|
1049
1061
|
id: o,
|
|
1050
1062
|
textValue: n
|
|
@@ -1058,7 +1070,7 @@ $.Options = Xe;
|
|
|
1058
1070
|
$.Description = ie;
|
|
1059
1071
|
$.Error = ce;
|
|
1060
1072
|
const U = ({ children: e }) => {
|
|
1061
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("streetName"), N = E(e, U.Label),
|
|
1073
|
+
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("streetName"), N = E(e, U.Label), D = E(e, U.Input), h = E(e, U.Options), O = E(e, U.Description), A = E(e, U.Error);
|
|
1062
1074
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
1063
1075
|
fieldId: t,
|
|
1064
1076
|
renderLabel: () => F(N, {
|
|
@@ -1073,7 +1085,7 @@ const U = ({ children: e }) => {
|
|
|
1073
1085
|
hasError: s,
|
|
1074
1086
|
onBlur: d,
|
|
1075
1087
|
onFocus: m
|
|
1076
|
-
},
|
|
1088
|
+
}, D, h),
|
|
1077
1089
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1078
1090
|
}) : /* @__PURE__ */ r.createElement(u, {
|
|
1079
1091
|
fieldId: t,
|
|
@@ -1090,15 +1102,15 @@ const U = ({ children: e }) => {
|
|
|
1090
1102
|
isInvalid: s,
|
|
1091
1103
|
onBlur: d,
|
|
1092
1104
|
onFocus: m
|
|
1093
|
-
},
|
|
1105
|
+
}, D),
|
|
1094
1106
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1095
1107
|
});
|
|
1096
1108
|
}, jn = ({ children: e, value: t, onChange: o, disabled: n, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
1097
1109
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), C = Ke({
|
|
1098
1110
|
enabled: !0
|
|
1099
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } =
|
|
1111
|
+
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
1100
1112
|
atlas: C
|
|
1101
|
-
}), N = E(e, U.Input),
|
|
1113
|
+
}), N = E(e, U.Input), D = E(e, U.Options), h = q(() => b.reduce((g, v) => (v.searchId && v.description && g.push({
|
|
1102
1114
|
id: v.searchId,
|
|
1103
1115
|
label: v.description
|
|
1104
1116
|
}), g), []), [
|
|
@@ -1152,7 +1164,7 @@ const U = ({ children: e }) => {
|
|
|
1152
1164
|
items: h
|
|
1153
1165
|
}, F(N, {
|
|
1154
1166
|
onFocus: _
|
|
1155
|
-
}), F(
|
|
1167
|
+
}), F(D, {
|
|
1156
1168
|
options: h
|
|
1157
1169
|
}), /* @__PURE__ */ r.createElement(Ye, {
|
|
1158
1170
|
optionCount: h.length
|
|
@@ -1161,7 +1173,9 @@ const U = ({ children: e }) => {
|
|
|
1161
1173
|
const { id: o, placeholder: n } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = x(null);
|
|
1162
1174
|
return ae(() => {
|
|
1163
1175
|
var d;
|
|
1164
|
-
(d = s.current) == null || d.focus(
|
|
1176
|
+
(d = s.current) == null || d.focus({
|
|
1177
|
+
preventScroll: !0
|
|
1178
|
+
});
|
|
1165
1179
|
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
1166
1180
|
ref: s,
|
|
1167
1181
|
id: a,
|
|
@@ -1173,7 +1187,7 @@ const U = ({ children: e }) => {
|
|
|
1173
1187
|
});
|
|
1174
1188
|
}, Ge = ({ children: e, className: t }) => {
|
|
1175
1189
|
const o = E(e, Ge.Option);
|
|
1176
|
-
return /* @__PURE__ */ r.createElement(
|
|
1190
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1177
1191
|
className: t,
|
|
1178
1192
|
containerPadding: 0,
|
|
1179
1193
|
offset: 0
|
|
@@ -1185,7 +1199,7 @@ const U = ({ children: e }) => {
|
|
|
1185
1199
|
})));
|
|
1186
1200
|
}, Xn = ({ className: e, ...t }) => {
|
|
1187
1201
|
const { id: o, label: n } = t;
|
|
1188
|
-
return /* @__PURE__ */ r.createElement(
|
|
1202
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
1189
1203
|
className: e,
|
|
1190
1204
|
id: o,
|
|
1191
1205
|
textValue: n
|
|
@@ -1221,7 +1235,9 @@ const se = ({ children: e }) => {
|
|
|
1221
1235
|
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: a } = T(), l = x(null);
|
|
1222
1236
|
return ae(() => {
|
|
1223
1237
|
var i;
|
|
1224
|
-
(i = l.current) == null || i.focus(
|
|
1238
|
+
(i = l.current) == null || i.focus({
|
|
1239
|
+
preventScroll: !0
|
|
1240
|
+
});
|
|
1225
1241
|
}, t), /* @__PURE__ */ r.createElement(le, {
|
|
1226
1242
|
ref: l,
|
|
1227
1243
|
id: n,
|
|
@@ -1240,18 +1256,18 @@ const H = ({ children: e }) => {
|
|
|
1240
1256
|
return (Bt(((B = f == null ? void 0 : f.subdivisions) == null ? void 0 : B.list) || [], p) || []).map((M) => ({
|
|
1241
1257
|
value: M.key,
|
|
1242
1258
|
label: C(M.displayName)
|
|
1243
|
-
})).sort((M,
|
|
1259
|
+
})).sort((M, S) => M.label.localeCompare(S.label));
|
|
1244
1260
|
}, [
|
|
1245
1261
|
p,
|
|
1246
1262
|
C,
|
|
1247
1263
|
f
|
|
1248
|
-
]),
|
|
1264
|
+
]), D = R(() => n(""), [
|
|
1249
1265
|
n
|
|
1250
1266
|
]), { onInputKeyDown: h, ...O } = Rt({
|
|
1251
1267
|
options: N,
|
|
1252
1268
|
value: o,
|
|
1253
1269
|
commit: n,
|
|
1254
|
-
clear:
|
|
1270
|
+
clear: D,
|
|
1255
1271
|
onBlur: d
|
|
1256
1272
|
}), A = pe("subdivision"), w = E(e, H.Label), _ = E(e, H.Control), g = E(e, H.Options), v = E(e, H.Description), me = E(e, H.Error);
|
|
1257
1273
|
return /* @__PURE__ */ r.createElement(u, {
|
|
@@ -1285,13 +1301,15 @@ const H = ({ children: e }) => {
|
|
|
1285
1301
|
onKeyDown: l
|
|
1286
1302
|
}), s);
|
|
1287
1303
|
}, zn = ({ className: e, ...t }) => {
|
|
1288
|
-
const { id: o, placeholder: n, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = x(null), u =
|
|
1304
|
+
const { id: o, placeholder: n, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = x(null), u = Dt({
|
|
1289
1305
|
readOnly: a,
|
|
1290
1306
|
disabled: l
|
|
1291
1307
|
});
|
|
1292
1308
|
return ae(() => {
|
|
1293
1309
|
var y;
|
|
1294
|
-
(y = m.current) == null || y.focus(
|
|
1310
|
+
(y = m.current) == null || y.focus({
|
|
1311
|
+
preventScroll: !0
|
|
1312
|
+
});
|
|
1295
1313
|
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
1296
1314
|
ref: m,
|
|
1297
1315
|
id: i,
|
|
@@ -1309,7 +1327,7 @@ Fe.Input = zn;
|
|
|
1309
1327
|
Fe.Trigger = Qn;
|
|
1310
1328
|
const ze = ({ children: e, className: t, ...o }) => {
|
|
1311
1329
|
const { options: n } = o, a = E(e, ze.Option);
|
|
1312
|
-
return /* @__PURE__ */ r.createElement(
|
|
1330
|
+
return /* @__PURE__ */ r.createElement(Se, {
|
|
1313
1331
|
className: t,
|
|
1314
1332
|
containerPadding: 0,
|
|
1315
1333
|
offset: 0
|
|
@@ -1320,7 +1338,7 @@ const ze = ({ children: e, className: t, ...o }) => {
|
|
|
1320
1338
|
}))));
|
|
1321
1339
|
}, Zn = ({ className: e, ...t }) => {
|
|
1322
1340
|
const { value: o, label: n } = t;
|
|
1323
|
-
return /* @__PURE__ */ r.createElement(
|
|
1341
|
+
return /* @__PURE__ */ r.createElement(De, {
|
|
1324
1342
|
className: e,
|
|
1325
1343
|
id: o,
|
|
1326
1344
|
textValue: n
|
|
@@ -1343,7 +1361,7 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1343
1361
|
[K.MLA_STREET_NUMBER]: lr,
|
|
1344
1362
|
[K.MLA_APARTMENT]: ir
|
|
1345
1363
|
}, dr = {}, ur = [], c = ({ children: e }) => {
|
|
1346
|
-
const { id: t, form: o, value: n, onChange: a, onFieldBlur: l, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: y, target: C, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N,
|
|
1364
|
+
const { id: t, form: o, value: n, onChange: a, onFieldBlur: l, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: y, target: C, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N, D] = be(null), h = kt(), O = q(() => ({
|
|
1347
1365
|
...h,
|
|
1348
1366
|
...cr
|
|
1349
1367
|
}), [
|
|
@@ -1380,7 +1398,7 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1380
1398
|
n,
|
|
1381
1399
|
B,
|
|
1382
1400
|
w
|
|
1383
|
-
]),
|
|
1401
|
+
]), S = R((V, X) => {
|
|
1384
1402
|
if (B && V === ye.COUNTRY && (n == null ? void 0 : n[V]) !== X) {
|
|
1385
1403
|
a == null || a({
|
|
1386
1404
|
[ye.COUNTRY]: X
|
|
@@ -1445,7 +1463,7 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1445
1463
|
}, /* @__PURE__ */ r.createElement(In, {
|
|
1446
1464
|
fields: At
|
|
1447
1465
|
}, /* @__PURE__ */ r.createElement("div", {
|
|
1448
|
-
ref:
|
|
1466
|
+
ref: D,
|
|
1449
1467
|
style: {
|
|
1450
1468
|
display: "contents"
|
|
1451
1469
|
}
|
|
@@ -1459,7 +1477,7 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1459
1477
|
formSchema: g,
|
|
1460
1478
|
form: j,
|
|
1461
1479
|
values: n ?? dr,
|
|
1462
|
-
onFieldChange:
|
|
1480
|
+
onFieldChange: S,
|
|
1463
1481
|
onBlur: l,
|
|
1464
1482
|
onFocus: i,
|
|
1465
1483
|
errors: s ?? ur,
|
package/dist/component/{number-input-field-rac-uVJ3SBv2.js → number-input-field-rac-DEBHQQqw.js}
RENAMED
|
@@ -2,18 +2,18 @@ import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useState as H, useCallback as Q, useEffect as U, useRef as $ } from "react";
|
|
4
4
|
import { NumberField as j, Input as z } from "react-aria-components";
|
|
5
|
-
import { bo as
|
|
5
|
+
import { bo as S, bl as _, by as G, bq as J, S as K, a0 as W, H as X, v as Y } from "./form-DbRjIc40.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-sUpR20_V.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-xEHyxl62.js";
|
|
9
9
|
import { g as re, c as te } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as ne } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ae } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
-
import { s as
|
|
13
|
-
import { u as se } from "./use-text-input-class-name-
|
|
12
|
+
import { s as p } from "./field-rac.module-DP0lkkEv.js";
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-DPUN9lls.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
15
|
var F, L, R;
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled:
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: d, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = S(), { labelId: y } = _(), 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, q = O(s), [x, I] = H(q), T = ne(E), V = c(t, e.Label), h = c(t, e.Input), M = c(t, e.Description), k = c(t, e.Error), B = Q((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -35,7 +35,7 @@ const e = ({ children: t }) => {
|
|
|
35
35
|
"aria-labelledby": y,
|
|
36
36
|
value: x,
|
|
37
37
|
onChange: B,
|
|
38
|
-
isDisabled:
|
|
38
|
+
isDisabled: d,
|
|
39
39
|
isRequired: b,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: u,
|
|
@@ -48,13 +48,15 @@ const e = ({ children: t }) => {
|
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: t }) => {
|
|
50
50
|
var u;
|
|
51
|
-
const { t: a } = G(), { inputId: s, ariaDescribedBy: l } =
|
|
51
|
+
const { t: a } = G(), { inputId: s, ariaDescribedBy: l } = _(), { id: d, placeholder: b, validation: o, label: E, required: f } = S();
|
|
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
|
-
(n = m.current) == null || n.focus(
|
|
57
|
-
|
|
56
|
+
(n = m.current) == null || n.focus({
|
|
57
|
+
preventScroll: !0
|
|
58
|
+
});
|
|
59
|
+
}, d), /* @__PURE__ */ r.createElement(z, {
|
|
58
60
|
ref: m,
|
|
59
61
|
id: s,
|
|
60
62
|
"aria-describedby": l,
|
|
@@ -76,15 +78,15 @@ const O = (t) => te(t) ?? NaN, oe = ({ content: t, locale: a }) => /* @__PURE__
|
|
|
76
78
|
}), Le = () => {
|
|
77
79
|
const t = se();
|
|
78
80
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
79
|
-
className: i(K,
|
|
81
|
+
className: i(K, p.label)
|
|
80
82
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
81
|
-
className: i(W,
|
|
83
|
+
className: i(W, p.requiredMark)
|
|
82
84
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
83
85
|
className: t
|
|
84
86
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
85
|
-
className: i(X,
|
|
87
|
+
className: i(X, p.error)
|
|
86
88
|
}, /* @__PURE__ */ r.createElement(ae, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
87
|
-
className: i(Y,
|
|
89
|
+
className: i(Y, p.description)
|
|
88
90
|
}, oe));
|
|
89
91
|
};
|
|
90
92
|
export {
|