@wix/form-elements 1.64.0 → 1.65.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-DojiZqx9.js → appointment-rac-0kUk8XQJ.js} +35 -35
- package/dist/component/{bookings-address-rac-Bm_lQchD.js → bookings-address-rac-BUM0wpw0.js} +1 -1
- package/dist/component/{bookings-email-rac-vwuy0kW8.js → bookings-email-rac-BHlvupVS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BbWuLoeg.js → bookings-first-name-rac-Bwn6xv1U.js} +1 -1
- package/dist/component/{bookings-header-rac-DVknNH29.js → bookings-header-rac-BkRvQMi4.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BnT3Cq0b.js → bookings-last-name-rac-DRTj4VdX.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DKi-VAXc.js → bookings-login-bar-rac-D-2Bt7Kx.js} +2 -2
- package/dist/component/{bookings-phone-rac-Bfy8rheB.js → bookings-phone-rac-CTcHHpDr.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DGiBDcXw.js → bookings-rich-text-rac-n-w9iWII.js} +1 -1
- package/dist/component/{checkbox-field-rac-CYADRY54.js → checkbox-field-rac-BamOJv3P.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-BDAFpX5F.js → checkbox-group-field-headless-BmKJbEi0.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-2YUsOmDI.js → checkbox-group-field-rac-CC8qfj0Y.js} +6 -6
- package/dist/component/{checkbox-group-rac-CQf1C9H5.js → checkbox-group-rac-CsrP7zD5.js} +1 -1
- package/dist/component/{checkbox-rac-Bjv8jZjs.js → checkbox-rac-X6E-fJ8k.js} +1 -1
- package/dist/component/{contacts-address-rac-BBTiEec9.js → contacts-address-rac-oYnkIZ6m.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-XReeFHVW.js → contacts-birthdate-rac-B7p8LgYA.js} +1 -1
- package/dist/component/{contacts-company-rac-B-fUQszu.js → contacts-company-rac-cjLRO5J-.js} +1 -1
- package/dist/component/{contacts-email-rac-DBtcCcsV.js → contacts-email-rac-BlJJSkGK.js} +1 -1
- package/dist/component/{contacts-first-name-rac-mkwU3706.js → contacts-first-name-rac-Nl-MDndn.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DY5N-AZx.js → contacts-last-name-rac-DhxAobRI.js} +1 -1
- package/dist/component/{contacts-phone-rac-Ce1rMz_z.js → contacts-phone-rac-CZLWlH0T.js} +1 -1
- package/dist/component/{contacts-position-rac-B65H8PDu.js → contacts-position-rac-DlKC0lCU.js} +1 -1
- package/dist/component/contacts-subscribe-rac-POSKh1Ta.js +13 -0
- package/dist/component/{contacts-tax-id-rac-Jtt0ySK2.js → contacts-tax-id-rac-uyBKxOJn.js} +1 -1
- package/dist/component/{date-availability-B8UwvTJa.js → date-availability-DnFJD1aS.js} +1 -1
- package/dist/component/{date-input-field-rac-RL2a0xoD.js → date-input-field-rac-DojzGm-i.js} +30 -30
- package/dist/component/{date-input-rac-ak3G7V07.js → date-input-rac-BaPKcAuU.js} +1 -1
- package/dist/component/{date-picker-field-rac-SL_Roltf.js → date-picker-field-rac-C1rzJMV8.js} +16 -16
- package/dist/component/{date-picker-rac-ByrM0YIX.js → date-picker-rac-BHsOfkYn.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DOE7xcKi.js → date-time-input-field-rac-B4jAAxU8.js} +15 -15
- package/dist/component/{date-time-input-rac-BA-GyrAc.js → date-time-input-rac-XyL5z_ma.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-EwUnBO80.js → dext-checkbox-group-rac-DzpdOP3i.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CIRKi4B5.js → dext-checkbox-rac-BUWkvW5s.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BYO_Q1zM.js → dext-date-picker-rac-CR0PUoOn.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BOahPeaH.js → dext-date-time-input-rac-D3WhLSKK.js} +1 -1
- package/dist/component/{dext-dropdown-rac-sTD_r-0H.js → dext-dropdown-rac-BJ1UfAIM.js} +1 -1
- package/dist/component/{dext-email-rac-e-2_h3he.js → dext-email-rac-xk_5C79-.js} +1 -1
- package/dist/component/{dext-number-input-rac-D6LACzWl.js → dext-number-input-rac-Cu1Sqoac.js} +1 -1
- package/dist/component/{dext-phone-rac-kUycy5Od.js → dext-phone-rac-S34qxXwg.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DPD2UkrV.js → dext-radio-group-rac-DXnAk_eU.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DUsnrl9W.js → dext-rating-input-rac-ewGpgB63.js} +1 -1
- package/dist/component/{dext-tags-rac-D6z69HuO.js → dext-tags-rac-BApZKGqP.js} +2 -2
- package/dist/component/{dext-text-area-rac-C-DVtFJ1.js → dext-text-area-rac-DBtuaiwM.js} +1 -1
- package/dist/component/{dext-text-input-rac-CIa2MdC6.js → dext-text-input-rac-qI8VECmA.js} +1 -1
- package/dist/component/{dext-url-input-rac-8rVVW5us.js → dext-url-input-rac-C6vzqNjn.js} +1 -1
- package/dist/component/donation-rac-BDVKvG4j.js +302 -0
- package/dist/component/{dropdown-field-headless-DReo519l.js → dropdown-field-headless-DBl8vGed.js} +3 -3
- package/dist/component/{dropdown-field-rac-DzrjA2O6.js → dropdown-field-rac-O6G7_kSn.js} +7 -7
- package/dist/component/{dropdown-rac-CS7oLTp_.js → dropdown-rac-BImZ5Jwe.js} +1 -1
- package/dist/component/{ecom-address-rac-EIb88J_6.js → ecom-address-rac-BU4XZ_Do.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CE0Ks6qS.js → ecom-subscription-checkbox-rac-DLzpoNYm.js} +5 -5
- package/dist/component/{email-input-field-rac-BScZxYHw.js → email-input-field-rac-Ui0p35z5.js} +59 -59
- package/dist/component/{events-repeater-rac-Y0rH2Jli.js → events-repeater-rac-bPKOOOit.js} +8 -8
- package/dist/component/{events-rsvp-rac-BiAYVv_b.js → events-rsvp-rac-lsRBBfPQ.js} +12 -12
- package/dist/component/{field-error-headless-DrnFrGun.js → field-error-headless-D6iejMQP.js} +1 -1
- package/dist/component/{field-label-headless-BIYf1BIh.js → field-label-headless-BWLfU3YB.js} +1 -1
- package/dist/component/field-rac.module-DnUIb9Oh.js +21 -0
- package/dist/component/{file-upload-rac-br--tZLp.js → file-upload-rac-DqKL8QQZ.js} +87 -87
- package/dist/component/{fixed-payment-rac-XEtrsaMy.js → fixed-payment-rac-BDtRB8w2.js} +9 -9
- package/dist/component/{form-9yjqDnxY.js → form-CtWkUmxc.js} +69 -69
- package/dist/component/form-element-classes-BSMjWijd.js +63 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CLELgzqY.js → header-field-rac-BLM8RCDY.js} +3 -3
- package/dist/component/{header-rac-D8KGkVVp.js → header-rac-DViRwafg.js} +1 -1
- package/dist/component/image-choice-rac-D76t2y-b.js +141 -0
- package/dist/component/{index-PHkE0Ru4.js → index--iRBHLXJ.js} +4 -4
- package/dist/component/{index-C4y71e1i.js → index-pEItT2oo.js} +2 -2
- package/dist/component/{isObjectLike-srCDplej.js → isObjectLike-968AHV2b.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CsBLI9y-.js → multiline-address-field-rac-CObOc8KE.js} +98 -98
- package/dist/component/{multiline-address-rac-DFDPFfXh.js → multiline-address-rac-1qVZkN41.js} +1 -1
- package/dist/component/{number-input-field-rac-DZRR7gdt.js → number-input-field-rac-CPQ3u0N7.js} +20 -20
- package/dist/component/{number-input-rac-BCS5lkff.js → number-input-rac-Bq1UyUPZ.js} +1 -1
- package/dist/component/{password-rac-ClDGgR3E.js → password-rac-BZPK1VkN.js} +9 -9
- package/dist/component/{payment-input-rac-COydWmUE.js → payment-input-rac-CQrV0WmN.js} +11 -11
- package/dist/component/{phone-input-field-rac-DYCibqe1.js → phone-input-field-rac-DzUE1-RF.js} +56 -56
- package/dist/component/{phone-rac-BS-dmWkJ.js → phone-rac-BovOZ7V5.js} +1 -1
- package/dist/component/{product-list-rac-hxOhaA-r.js → product-list-rac-CeGm1_WN.js} +22 -22
- package/dist/component/quiz-radio-group-rac-Lw2thQqC.js +13 -0
- package/dist/component/{radio-group-field-rac-DKqWnMBJ.js → radio-group-field-rac-BSVmjEgZ.js} +8 -8
- package/dist/component/{radio-group-field-rac.module-BwUynK_5.js → radio-group-field-rac.module-Cb3mm0f2.js} +3 -3
- package/dist/component/{radio-group-rac-DHURQZKK.js → radio-group-rac-BHhOCSQ2.js} +1 -1
- package/dist/component/{rating-input-field-rac-CZRdSVrf.js → rating-input-field-rac-BvbBZZDO.js} +21 -21
- package/dist/component/{rating-input-rac-BaH52DYm.js → rating-input-rac-DDe1EBpt.js} +1 -1
- package/dist/component/{rich-content-rac.module-ILBfxEmN.js → rich-content-rac.module-BacYkzEv.js} +1 -1
- package/dist/component/{rich-text-field-rac-B58q8Is7.js → rich-text-field-rac-D1W0mUjr.js} +5 -5
- package/dist/component/{rich-text-rac-DGbZh1eX.js → rich-text-rac-B-cOn0RU.js} +1 -1
- package/dist/component/{service-dropdown-rac-DUiNIbdv.js → service-dropdown-rac-CebfMkGP.js} +22 -22
- package/dist/component/{services-multi-choice-rac-B7y9s2l8.js → services-multi-choice-rac-C4bF1xhB.js} +29 -29
- package/dist/component/{signature-rac-CydpvQJZ.js → signature-rac-DWWT65Ez.js} +46 -46
- package/dist/component/{submit-button-rac-OO53h4H8.js → submit-button-rac-_mgn4ChE.js} +2 -2
- package/dist/component/{tags-field-rac-eX3d3JEH.js → tags-field-rac-7coCWj0y.js} +59 -59
- package/dist/component/{tags-rac-CdIB_48Z.js → tags-rac-rgsn8Os0.js} +1 -1
- package/dist/component/{text-area-field-rac-Bir5Q7gz.js → text-area-field-rac-5lUQxnNM.js} +15 -15
- package/dist/component/{text-area-rac-Ct1UNU04.js → text-area-rac-DpGOBzN3.js} +1 -1
- package/dist/component/{text-input-field-rac-onGUXC9J.js → text-input-field-rac-CgWadDfM.js} +3 -3
- package/dist/component/{text-input-headless-Bs9m7QFg.js → text-input-headless-fhxuPytc.js} +3 -3
- package/dist/component/{text-input-rac-DK4nEw4D.js → text-input-rac-kgWS3UUV.js} +1 -1
- package/dist/component/{time-input-rac-BCG9ktFa.js → time-input-rac-CuLUJcBH.js} +15 -15
- package/dist/component/{url-input-field-rac-mUkrVTcL.js → url-input-field-rac-CAGHb2na.js} +18 -18
- package/dist/component/{url-input-rac-Cl7LFYlr.js → url-input-rac-s5_SVi0h.js} +1 -1
- package/dist/component/{use-service-options-base-BYVuKRj2.js → use-service-options-base-CYAEJ75H.js} +1 -1
- package/package.json +2 -2
- package/dist/component/contacts-subscribe-rac-BxO8rIyL.js +0 -13
- package/dist/component/donation-rac-BjmSBabc.js +0 -305
- package/dist/component/field-rac.module-CWkwwhq4.js +0 -21
- package/dist/component/form-element-classes-KRzHUNLu.js +0 -57
- package/dist/component/image-choice-rac-Cl09CLP4.js +0 -141
- package/dist/component/quiz-radio-group-rac-BT-YZO2Q.js +0 -13
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as G } from "@wix/ricos/viewer";
|
|
2
2
|
import C from "classnames";
|
|
3
3
|
import n, { useMemo as w, createContext as We, useContext as De, useState as ye, useRef as B, useCallback as D, useEffect as Ve } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as _t } from "react-aria";
|
|
5
|
-
import { ad as bt, c as ft, a9 as Pt, ab as yt, G as Tt, H as
|
|
5
|
+
import { ad as bt, c as ft, a9 as Pt, ab as yt, G as Tt, H as qt, u as Mt, z as V, F as K, as as qe, a2 as at, ai as P, af as T, ak as le, ae as Ct, Q as wt, C as he, a0 as xt, a4 as Bt, ap as kt, aj as $t, ao as Ut, a7 as Wt, Y as Vt, a6 as Kt, al as Yt, j as jt } from "./form-CtWkUmxc.js";
|
|
6
6
|
import { f as E, a as h } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as Ht, V as Jt } from "./headless-styles-CmcyA_pi.js";
|
|
8
8
|
import { TextField as Ce, Input as ie, ComboBoxStateContext as It, ComboBox as Re, Popover as Ae, ListBox as _e, ListBoxItem as Pe, Group as Lt, Button as Nt } from "react-aria-components";
|
|
9
|
-
import { D as ce, E as de } from "./field-error-headless-
|
|
10
|
-
import { L as ue } from "./field-label-headless-
|
|
11
|
-
import { e as
|
|
9
|
+
import { D as ce, E as de } from "./field-error-headless-D6iejMQP.js";
|
|
10
|
+
import { L as ue } from "./field-label-headless-BWLfU3YB.js";
|
|
11
|
+
import { e as zt, c as Gt, a as Xt, r as Ot } from "./isObjectLike-968AHV2b.js";
|
|
12
12
|
import { u as Qt } from "./use-invoke-callback-UH73A_J3.js";
|
|
13
13
|
import { C as lt } from "./chevron-down-icon-CcpVm6B-.js";
|
|
14
|
-
import { E as
|
|
14
|
+
import { E as X } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { H as fe } from "./custom-focus-class-_483Pkwp.js";
|
|
16
|
-
import { s as f } from "./field-rac.module-
|
|
17
|
-
import {
|
|
16
|
+
import { s as f } from "./field-rac.module-DnUIb9Oh.js";
|
|
17
|
+
import { z as Q, P as Z, y as ee, C as ge, q as te, j as ne } from "./form-element-classes-BSMjWijd.js";
|
|
18
18
|
const Zt = (e, t, o) => {
|
|
19
19
|
var a, l, i, s;
|
|
20
20
|
const r = (a = e.steps) == null ? void 0 : a.map((d) => {
|
|
@@ -81,7 +81,7 @@ function Ne() {
|
|
|
81
81
|
const e = De(vt);
|
|
82
82
|
return e == null ? void 0 : e.countryCode;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Me(e) {
|
|
85
85
|
return e != null;
|
|
86
86
|
}
|
|
87
87
|
function rn(e, t, o) {
|
|
@@ -95,10 +95,10 @@ function rn(e, t, o) {
|
|
|
95
95
|
...r.view,
|
|
96
96
|
...l
|
|
97
97
|
},
|
|
98
|
-
...
|
|
98
|
+
...Me(a) && {
|
|
99
99
|
hidden: !a
|
|
100
100
|
},
|
|
101
|
-
...
|
|
101
|
+
...Me(i) && Me(r.validation) && {
|
|
102
102
|
validation: {
|
|
103
103
|
...r.validation,
|
|
104
104
|
required: i
|
|
@@ -181,7 +181,7 @@ const on = (e, t) => e.map((o) => ({
|
|
|
181
181
|
}, [
|
|
182
182
|
i,
|
|
183
183
|
s
|
|
184
|
-
]), F = w(() =>
|
|
184
|
+
]), F = w(() => qt(), []);
|
|
185
185
|
return {
|
|
186
186
|
form: w(() => {
|
|
187
187
|
var _, O;
|
|
@@ -190,7 +190,7 @@ const on = (e, t) => e.map((o) => ({
|
|
|
190
190
|
...r,
|
|
191
191
|
fields: on(r.fields, d)
|
|
192
192
|
};
|
|
193
|
-
const g =
|
|
193
|
+
const g = Mt({
|
|
194
194
|
useFieldsV2: u,
|
|
195
195
|
path: t,
|
|
196
196
|
parentId: e,
|
|
@@ -201,10 +201,10 @@ const on = (e, t) => e.map((o) => ({
|
|
|
201
201
|
});
|
|
202
202
|
if (!g.fields.some((v) => v.properties.hidden))
|
|
203
203
|
return g;
|
|
204
|
-
const
|
|
204
|
+
const q = un(g);
|
|
205
205
|
return {
|
|
206
|
-
...
|
|
207
|
-
fields:
|
|
206
|
+
...q,
|
|
207
|
+
fields: q.fields.filter((v) => !v.properties.hidden)
|
|
208
208
|
};
|
|
209
209
|
}, [
|
|
210
210
|
p,
|
|
@@ -240,7 +240,7 @@ function me(e) {
|
|
|
240
240
|
return t.fields[e];
|
|
241
241
|
}
|
|
242
242
|
function be(e) {
|
|
243
|
-
const { t } =
|
|
243
|
+
const { t } = qe(), o = Ne(), r = o && at.getCountryByShortKey(o), l = (r ? r.addressPartDisplayNames : at.getDefaultAddressDisplayNames())[e];
|
|
244
244
|
return l ? t(l) : "";
|
|
245
245
|
}
|
|
246
246
|
const re = ({ children: e }) => {
|
|
@@ -311,7 +311,7 @@ var we, it;
|
|
|
311
311
|
function fn() {
|
|
312
312
|
if (it) return we;
|
|
313
313
|
it = 1;
|
|
314
|
-
var e =
|
|
314
|
+
var e = zt(), t = function() {
|
|
315
315
|
return e.Date.now();
|
|
316
316
|
};
|
|
317
317
|
return we = t, we;
|
|
@@ -342,7 +342,7 @@ var ke, ut;
|
|
|
342
342
|
function In() {
|
|
343
343
|
if (ut) return ke;
|
|
344
344
|
ut = 1;
|
|
345
|
-
var e =
|
|
345
|
+
var e = Gt(), t = Xt(), o = "[object Symbol]";
|
|
346
346
|
function r(a) {
|
|
347
347
|
return typeof a == "symbol" || t(a) && e(a) == o;
|
|
348
348
|
}
|
|
@@ -384,7 +384,7 @@ function Nn() {
|
|
|
384
384
|
var J = u, Ee = I;
|
|
385
385
|
return u = I = void 0, N = A, b = s.apply(Ee, J), b;
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function q(A) {
|
|
388
388
|
return N = A, p = setTimeout(v, d), F ? R(A) : b;
|
|
389
389
|
}
|
|
390
390
|
function _(A) {
|
|
@@ -407,20 +407,20 @@ function Nn() {
|
|
|
407
407
|
function x() {
|
|
408
408
|
p !== void 0 && clearTimeout(p), N = 0, u = y = I = p = void 0;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function M() {
|
|
411
411
|
return p === void 0 ? b : pe(t());
|
|
412
412
|
}
|
|
413
413
|
function H() {
|
|
414
414
|
var A = t(), J = O(A);
|
|
415
415
|
if (u = arguments, I = this, y = A, J) {
|
|
416
416
|
if (p === void 0)
|
|
417
|
-
return
|
|
417
|
+
return q(y);
|
|
418
418
|
if (S)
|
|
419
419
|
return clearTimeout(p), p = setTimeout(v, d), R(y);
|
|
420
420
|
}
|
|
421
421
|
return p === void 0 && (p = setTimeout(v, d)), b;
|
|
422
422
|
}
|
|
423
|
-
return H.cancel = x, H.flush =
|
|
423
|
+
return H.cancel = x, H.flush = M, H;
|
|
424
424
|
}
|
|
425
425
|
return Ue = i, Ue;
|
|
426
426
|
}
|
|
@@ -576,7 +576,7 @@ const gn = /* @__PURE__ */ wt(On), vn = (e, t, o = 200) => {
|
|
|
576
576
|
d == null || d();
|
|
577
577
|
}, [
|
|
578
578
|
d
|
|
579
|
-
]),
|
|
579
|
+
]), q = E(e, k.Input), _ = E(e, k.Options);
|
|
580
580
|
return /* @__PURE__ */ n.createElement(Re, {
|
|
581
581
|
"aria-labelledby": m,
|
|
582
582
|
inputValue: t ?? "",
|
|
@@ -592,7 +592,7 @@ const gn = /* @__PURE__ */ wt(On), vn = (e, t, o = 200) => {
|
|
|
592
592
|
allowsCustomValue: !0,
|
|
593
593
|
menuTrigger: "input",
|
|
594
594
|
items: N
|
|
595
|
-
}, h(
|
|
595
|
+
}, h(q, {
|
|
596
596
|
onFocus: R
|
|
597
597
|
}), h(_, {
|
|
598
598
|
options: N
|
|
@@ -639,7 +639,7 @@ k.Options = je;
|
|
|
639
639
|
k.Description = ce;
|
|
640
640
|
k.Error = de;
|
|
641
641
|
const oe = ({ children: e }) => {
|
|
642
|
-
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), { t: L } =
|
|
642
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), { t: L } = qe(), b = L("field.mla-apartment.label"), p = E(e, oe.Label), y = E(e, oe.Input), N = E(e, oe.Description), F = E(e, oe.Error);
|
|
643
643
|
return /* @__PURE__ */ n.createElement(u, {
|
|
644
644
|
fieldId: t,
|
|
645
645
|
renderLabel: () => h(p, {
|
|
@@ -765,10 +765,10 @@ const Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
|
765
765
|
onInputKeyDown: I
|
|
766
766
|
};
|
|
767
767
|
}, Y = ({ children: e }) => {
|
|
768
|
-
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, options: I } = P(), { labelId: L } = T(), { t: b } =
|
|
769
|
-
value:
|
|
770
|
-
label: b(`locale-dataset.countries.${he[
|
|
771
|
-
}), x), []).sort((x,
|
|
768
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, options: I } = P(), { labelId: L } = T(), { t: b } = qe(), { language: p } = yt(), y = w(() => (I || []).reduce((x, M) => (M.value && he.hasOwnProperty(M.value) && x.push({
|
|
769
|
+
value: M.value,
|
|
770
|
+
label: b(`locale-dataset.countries.${he[M.value].toUpperCase()}`)
|
|
771
|
+
}), x), []).sort((x, M) => x.label.localeCompare(M.label, p)), [
|
|
772
772
|
I,
|
|
773
773
|
b,
|
|
774
774
|
p
|
|
@@ -782,10 +782,10 @@ const Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
|
782
782
|
commit: N,
|
|
783
783
|
clear: F,
|
|
784
784
|
onBlur: d
|
|
785
|
-
}), R = be("country"),
|
|
785
|
+
}), R = be("country"), q = E(e, Y.Label), _ = E(e, Y.Control), O = E(e, Y.Options), v = E(e, Y.Description), pe = E(e, Y.Error);
|
|
786
786
|
return /* @__PURE__ */ n.createElement(u, {
|
|
787
787
|
fieldId: t,
|
|
788
|
-
renderLabel: () => h(
|
|
788
|
+
renderLabel: () => h(q, {
|
|
789
789
|
label: R
|
|
790
790
|
}),
|
|
791
791
|
renderInput: () => /* @__PURE__ */ n.createElement(Re, {
|
|
@@ -846,7 +846,7 @@ const He = ({ children: e, className: t, ...o }) => {
|
|
|
846
846
|
value: l.value,
|
|
847
847
|
label: l.label
|
|
848
848
|
}))));
|
|
849
|
-
},
|
|
849
|
+
}, qn = ({ className: e, ...t }) => {
|
|
850
850
|
const { value: o, label: r } = t;
|
|
851
851
|
return /* @__PURE__ */ n.createElement(Pe, {
|
|
852
852
|
className: e,
|
|
@@ -854,16 +854,16 @@ const He = ({ children: e, className: t, ...o }) => {
|
|
|
854
854
|
textValue: r
|
|
855
855
|
}, r);
|
|
856
856
|
};
|
|
857
|
-
He.Option =
|
|
857
|
+
He.Option = qn;
|
|
858
858
|
Y.Label = ue;
|
|
859
859
|
Y.Control = Fe;
|
|
860
860
|
Y.Options = He;
|
|
861
861
|
Y.Description = ce;
|
|
862
862
|
Y.Error = de;
|
|
863
|
-
const
|
|
863
|
+
const Mn = /(\d{7})|(\d{3}-\d{4})/;
|
|
864
864
|
function wn(e) {
|
|
865
865
|
var t;
|
|
866
|
-
return (t = e.match(
|
|
866
|
+
return (t = e.match(Mn)) == null ? void 0 : t[0];
|
|
867
867
|
}
|
|
868
868
|
function xn({ isAutocompleteEnabled: e }) {
|
|
869
869
|
const t = B({
|
|
@@ -898,7 +898,7 @@ function xn({ isAutocompleteEnabled: e }) {
|
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
900
|
const $ = ({ children: e }) => {
|
|
901
|
-
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: I } = P(), { labelId: L } = T(), b = Ne(), { autocompleteEnabled: p } = Le(), y = !!(b && he[b] === he.JP), N = (I || p) && y, F = be("zipCode"), S = E(e, $.Label), g = E(e, $.Control), R = E(e, $.Options),
|
|
901
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: I } = P(), { labelId: L } = T(), b = Ne(), { autocompleteEnabled: p } = Le(), y = !!(b && he[b] === he.JP), N = (I || p) && y, F = be("zipCode"), S = E(e, $.Label), g = E(e, $.Control), R = E(e, $.Options), q = E(e, $.Description), _ = E(e, $.Error);
|
|
902
902
|
return N ? /* @__PURE__ */ n.createElement(u, {
|
|
903
903
|
fieldId: t,
|
|
904
904
|
renderLabel: () => h(S, {
|
|
@@ -914,7 +914,7 @@ const $ = ({ children: e }) => {
|
|
|
914
914
|
onBlur: d,
|
|
915
915
|
onFocus: m
|
|
916
916
|
}, g, R),
|
|
917
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _,
|
|
917
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, q)
|
|
918
918
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
919
919
|
fieldId: t,
|
|
920
920
|
renderLabel: () => h(S, {
|
|
@@ -931,7 +931,7 @@ const $ = ({ children: e }) => {
|
|
|
931
931
|
onBlur: d,
|
|
932
932
|
onFocus: m
|
|
933
933
|
}, g),
|
|
934
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _,
|
|
934
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, q)
|
|
935
935
|
});
|
|
936
936
|
}, Bn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
937
937
|
const { labelId: m } = T(), { onAddressSelect: u } = Le(), [I, L] = ye(!1), { searchByPostalCode: b } = xn({
|
|
@@ -963,7 +963,7 @@ const $ = ({ children: e }) => {
|
|
|
963
963
|
L(!0), d == null || d();
|
|
964
964
|
}, [
|
|
965
965
|
d
|
|
966
|
-
]),
|
|
966
|
+
]), q = E(e, $.Control), _ = E(e, $.Options);
|
|
967
967
|
return /* @__PURE__ */ n.createElement(Re, {
|
|
968
968
|
"aria-labelledby": m,
|
|
969
969
|
inputValue: t ?? "",
|
|
@@ -979,7 +979,7 @@ const $ = ({ children: e }) => {
|
|
|
979
979
|
allowsCustomValue: !0,
|
|
980
980
|
menuTrigger: "input",
|
|
981
981
|
items: N
|
|
982
|
-
}, h(
|
|
982
|
+
}, h(q, {
|
|
983
983
|
onFocus: R
|
|
984
984
|
}), h(_, {
|
|
985
985
|
options: N
|
|
@@ -1009,8 +1009,8 @@ const $ = ({ children: e }) => {
|
|
|
1009
1009
|
placeholder: r,
|
|
1010
1010
|
onFocus: i
|
|
1011
1011
|
});
|
|
1012
|
-
},
|
|
1013
|
-
const o = E(e,
|
|
1012
|
+
}, ze = ({ children: e, className: t }) => {
|
|
1013
|
+
const o = E(e, ze.Option);
|
|
1014
1014
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1015
1015
|
className: t,
|
|
1016
1016
|
containerPadding: 0,
|
|
@@ -1029,11 +1029,11 @@ const $ = ({ children: e }) => {
|
|
|
1029
1029
|
textValue: r
|
|
1030
1030
|
}, r);
|
|
1031
1031
|
};
|
|
1032
|
-
|
|
1032
|
+
ze.Option = $n;
|
|
1033
1033
|
Je.Input = kn;
|
|
1034
1034
|
$.Label = ue;
|
|
1035
1035
|
$.Control = Je;
|
|
1036
|
-
$.Options =
|
|
1036
|
+
$.Options = ze;
|
|
1037
1037
|
$.Description = ce;
|
|
1038
1038
|
$.Error = de;
|
|
1039
1039
|
const U = ({ children: e }) => {
|
|
@@ -1104,7 +1104,7 @@ const U = ({ children: e }) => {
|
|
|
1104
1104
|
u,
|
|
1105
1105
|
y,
|
|
1106
1106
|
L
|
|
1107
|
-
]),
|
|
1107
|
+
]), q = D(() => {
|
|
1108
1108
|
y(), s == null || s();
|
|
1109
1109
|
}, [
|
|
1110
1110
|
s,
|
|
@@ -1124,7 +1124,7 @@ const U = ({ children: e }) => {
|
|
|
1124
1124
|
isReadOnly: a,
|
|
1125
1125
|
isRequired: l,
|
|
1126
1126
|
isInvalid: i,
|
|
1127
|
-
onBlur:
|
|
1127
|
+
onBlur: q,
|
|
1128
1128
|
onFocus: _,
|
|
1129
1129
|
allowsCustomValue: !0,
|
|
1130
1130
|
menuTrigger: "input",
|
|
@@ -1149,8 +1149,8 @@ const U = ({ children: e }) => {
|
|
|
1149
1149
|
placeholder: r,
|
|
1150
1150
|
onFocus: i
|
|
1151
1151
|
});
|
|
1152
|
-
},
|
|
1153
|
-
const o = E(e,
|
|
1152
|
+
}, Ge = ({ children: e, className: t }) => {
|
|
1153
|
+
const o = E(e, Ge.Option);
|
|
1154
1154
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1155
1155
|
className: t,
|
|
1156
1156
|
containerPadding: 0,
|
|
@@ -1169,10 +1169,10 @@ const U = ({ children: e }) => {
|
|
|
1169
1169
|
textValue: r
|
|
1170
1170
|
}, r);
|
|
1171
1171
|
};
|
|
1172
|
-
|
|
1172
|
+
Ge.Option = Vn;
|
|
1173
1173
|
U.Label = ue;
|
|
1174
1174
|
U.Input = Wn;
|
|
1175
|
-
U.Options =
|
|
1175
|
+
U.Options = Ge;
|
|
1176
1176
|
U.Description = ce;
|
|
1177
1177
|
U.Error = de;
|
|
1178
1178
|
const ae = ({ children: e }) => {
|
|
@@ -1213,9 +1213,9 @@ ae.Input = Kn;
|
|
|
1213
1213
|
ae.Description = ce;
|
|
1214
1214
|
ae.Error = de;
|
|
1215
1215
|
const j = ({ children: e }) => {
|
|
1216
|
-
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), { t: L } =
|
|
1217
|
-
var
|
|
1218
|
-
return (Bt(((
|
|
1216
|
+
const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), { t: L } = qe(), b = Ne(), p = b ? he[b] : void 0, y = b && xt.getCountryByShortKey(b), N = w(() => {
|
|
1217
|
+
var M;
|
|
1218
|
+
return (Bt(((M = y == null ? void 0 : y.subdivisions) == null ? void 0 : M.list) || [], p) || []).map((H) => ({
|
|
1219
1219
|
value: H.key,
|
|
1220
1220
|
label: L(H.displayName)
|
|
1221
1221
|
})).sort((H, A) => H.label.localeCompare(A.label));
|
|
@@ -1231,10 +1231,10 @@ const j = ({ children: e }) => {
|
|
|
1231
1231
|
commit: r,
|
|
1232
1232
|
clear: F,
|
|
1233
1233
|
onBlur: d
|
|
1234
|
-
}), R = be("subdivision"),
|
|
1234
|
+
}), R = be("subdivision"), q = E(e, j.Label), _ = E(e, j.Control), O = E(e, j.Options), v = E(e, j.Description), pe = E(e, j.Error);
|
|
1235
1235
|
return /* @__PURE__ */ n.createElement(u, {
|
|
1236
1236
|
fieldId: t,
|
|
1237
|
-
renderLabel: () => h(
|
|
1237
|
+
renderLabel: () => h(q, {
|
|
1238
1238
|
label: R
|
|
1239
1239
|
}),
|
|
1240
1240
|
renderInput: () => /* @__PURE__ */ n.createElement(Re, {
|
|
@@ -1284,8 +1284,8 @@ const j = ({ children: e }) => {
|
|
|
1284
1284
|
}, e);
|
|
1285
1285
|
Se.Input = Yn;
|
|
1286
1286
|
Se.Trigger = jn;
|
|
1287
|
-
const
|
|
1288
|
-
const { options: r } = o, a = E(e,
|
|
1287
|
+
const Xe = ({ children: e, className: t, ...o }) => {
|
|
1288
|
+
const { options: r } = o, a = E(e, Xe.Option);
|
|
1289
1289
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1290
1290
|
className: t,
|
|
1291
1291
|
containerPadding: 0,
|
|
@@ -1303,17 +1303,17 @@ const ze = ({ children: e, className: t, ...o }) => {
|
|
|
1303
1303
|
textValue: r
|
|
1304
1304
|
}, r);
|
|
1305
1305
|
};
|
|
1306
|
-
|
|
1306
|
+
Xe.Option = Hn;
|
|
1307
1307
|
j.Label = ue;
|
|
1308
1308
|
j.Control = Se;
|
|
1309
|
-
j.Options =
|
|
1309
|
+
j.Options = Xe;
|
|
1310
1310
|
j.Description = ce;
|
|
1311
1311
|
j.Error = de;
|
|
1312
|
-
const Jn = () => me("country"),
|
|
1312
|
+
const Jn = () => me("country"), zn = () => me("subdivision"), Gn = () => me("city"), Xn = () => me("addressLine"), Qn = () => me("addressLine2"), Zn = () => me("postalCode"), er = () => me("streetName"), tr = () => me("streetNumber"), nr = () => me("apartment"), rr = {
|
|
1313
1313
|
[K.MLA_COUNTRY]: Jn,
|
|
1314
|
-
[K.MLA_SUBDIVISION]:
|
|
1315
|
-
[K.MLA_CITY]:
|
|
1316
|
-
[K.MLA_ADDRESS_LINE]:
|
|
1314
|
+
[K.MLA_SUBDIVISION]: zn,
|
|
1315
|
+
[K.MLA_CITY]: Gn,
|
|
1316
|
+
[K.MLA_ADDRESS_LINE]: Xn,
|
|
1317
1317
|
[K.MLA_ADDRESS_LINE_2]: Qn,
|
|
1318
1318
|
[K.MLA_POSTAL_CODE]: Zn,
|
|
1319
1319
|
[K.MLA_STREET_NAME]: er,
|
|
@@ -1325,7 +1325,7 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1325
1325
|
...rr
|
|
1326
1326
|
}), [
|
|
1327
1327
|
S
|
|
1328
|
-
]), { isExperimentEnabled: R } = bt(),
|
|
1328
|
+
]), { isExperimentEnabled: R } = bt(), q = R(ft.STREETLESS_LOCALITY_FALLBACK), { validateFields: _ } = $t(), O = Ut(), v = Ct(), pe = w(() => ({
|
|
1329
1329
|
...v,
|
|
1330
1330
|
actions: {
|
|
1331
1331
|
predict: Kt,
|
|
@@ -1335,7 +1335,7 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1335
1335
|
}
|
|
1336
1336
|
}), [
|
|
1337
1337
|
v
|
|
1338
|
-
]), { form: x, isMultilineAddressField:
|
|
1338
|
+
]), { form: x, isMultilineAddressField: M } = pn({
|
|
1339
1339
|
id: t,
|
|
1340
1340
|
target: L,
|
|
1341
1341
|
fieldType: y,
|
|
@@ -1347,32 +1347,32 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1347
1347
|
}), H = D((W) => {
|
|
1348
1348
|
if (!r)
|
|
1349
1349
|
return;
|
|
1350
|
-
const
|
|
1351
|
-
...
|
|
1352
|
-
[Ie.COUNTRY]:
|
|
1350
|
+
const z = en(W, M, q), Te = {
|
|
1351
|
+
...z,
|
|
1352
|
+
[Ie.COUNTRY]: z[Ie.COUNTRY] ?? r[Ie.COUNTRY]
|
|
1353
1353
|
};
|
|
1354
1354
|
a == null || a(Te);
|
|
1355
1355
|
}, [
|
|
1356
1356
|
a,
|
|
1357
1357
|
r,
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
]), A = D((W,
|
|
1361
|
-
if (
|
|
1358
|
+
M,
|
|
1359
|
+
q
|
|
1360
|
+
]), A = D((W, z) => {
|
|
1361
|
+
if (M && W === Ie.COUNTRY && (r == null ? void 0 : r[W]) !== z) {
|
|
1362
1362
|
a == null || a({
|
|
1363
|
-
[Ie.COUNTRY]:
|
|
1363
|
+
[Ie.COUNTRY]: z
|
|
1364
1364
|
});
|
|
1365
1365
|
return;
|
|
1366
1366
|
}
|
|
1367
1367
|
a == null || a({
|
|
1368
1368
|
...r,
|
|
1369
|
-
[W]:
|
|
1369
|
+
[W]: z
|
|
1370
1370
|
});
|
|
1371
1371
|
}, [
|
|
1372
1372
|
a,
|
|
1373
1373
|
r,
|
|
1374
|
-
|
|
1375
|
-
]), J = D(async (W) => _(
|
|
1374
|
+
M
|
|
1375
|
+
]), J = D(async (W) => _(M ? [
|
|
1376
1376
|
...W,
|
|
1377
1377
|
{
|
|
1378
1378
|
path: `${L}/${Ie.COUNTRY}`,
|
|
@@ -1382,12 +1382,12 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1382
1382
|
r,
|
|
1383
1383
|
L,
|
|
1384
1384
|
_,
|
|
1385
|
-
|
|
1385
|
+
M
|
|
1386
1386
|
]);
|
|
1387
1387
|
Yt(t, () => {
|
|
1388
1388
|
var Te;
|
|
1389
|
-
const W = s == null ? void 0 : s[0],
|
|
1390
|
-
return
|
|
1389
|
+
const W = s == null ? void 0 : s[0], z = (Te = x == null ? void 0 : x.fields) == null ? void 0 : Te.find((st) => "target" in st && st.target === (W == null ? void 0 : W.errorPath));
|
|
1390
|
+
return z == null ? void 0 : z.id;
|
|
1391
1391
|
});
|
|
1392
1392
|
const Ee = E(e, c.Country), Oe = E(e, c.Subdivision), Qe = E(e, c.City), Ze = E(e, c.AddressLine), et = E(e, c.AddressLine2), tt = E(e, c.PostalCode), nt = E(e, c.StreetName), rt = E(e, c.StreetNumber), ot = E(e, c.Apartment), At = w(() => ({
|
|
1393
1393
|
country: Ee,
|
|
@@ -1474,9 +1474,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1474
1474
|
className: C(f.selectOption, fe)
|
|
1475
1475
|
})), /* @__PURE__ */ n.createElement(c.Country.Error, {
|
|
1476
1476
|
className: C(te, f.error)
|
|
1477
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1477
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Country.Description, {
|
|
1478
1478
|
className: C(ne, f.description)
|
|
1479
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1479
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1480
1480
|
content: e,
|
|
1481
1481
|
locale: t
|
|
1482
1482
|
}))), /* @__PURE__ */ n.createElement(c.AddressLine, null, /* @__PURE__ */ n.createElement(c.AddressLine.Label, {
|
|
@@ -1491,9 +1491,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1491
1491
|
className: C(f.selectOption, fe)
|
|
1492
1492
|
})), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
|
|
1493
1493
|
className: C(te, f.error)
|
|
1494
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1494
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine.Description, {
|
|
1495
1495
|
className: C(ne, f.description)
|
|
1496
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1496
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1497
1497
|
content: e,
|
|
1498
1498
|
locale: t
|
|
1499
1499
|
}))), /* @__PURE__ */ n.createElement(c.AddressLine2, null, /* @__PURE__ */ n.createElement(c.AddressLine2.Label, {
|
|
@@ -1504,9 +1504,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1504
1504
|
className: C(ee, f.input)
|
|
1505
1505
|
}), /* @__PURE__ */ n.createElement(c.AddressLine2.Error, {
|
|
1506
1506
|
className: C(te, f.error)
|
|
1507
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1507
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine2.Description, {
|
|
1508
1508
|
className: C(ne, f.description)
|
|
1509
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1509
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1510
1510
|
content: e,
|
|
1511
1511
|
locale: t
|
|
1512
1512
|
}))), /* @__PURE__ */ n.createElement(c.City, null, /* @__PURE__ */ n.createElement(c.City.Label, {
|
|
@@ -1517,9 +1517,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1517
1517
|
className: C(ee, f.input)
|
|
1518
1518
|
}), /* @__PURE__ */ n.createElement(c.City.Error, {
|
|
1519
1519
|
className: C(te, f.error)
|
|
1520
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1520
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.City.Error.Text, null)), /* @__PURE__ */ n.createElement(c.City.Description, {
|
|
1521
1521
|
className: C(ne, f.description)
|
|
1522
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1522
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1523
1523
|
content: e,
|
|
1524
1524
|
locale: t
|
|
1525
1525
|
}))), /* @__PURE__ */ n.createElement(c.PostalCode, null, /* @__PURE__ */ n.createElement(c.PostalCode.Label, {
|
|
@@ -1536,9 +1536,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1536
1536
|
className: C(f.selectOption, fe)
|
|
1537
1537
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
|
|
1538
1538
|
className: C(te, f.error)
|
|
1539
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1539
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ n.createElement(c.PostalCode.Description, {
|
|
1540
1540
|
className: C(ne, f.description)
|
|
1541
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1541
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1542
1542
|
content: e,
|
|
1543
1543
|
locale: t
|
|
1544
1544
|
}))), /* @__PURE__ */ n.createElement(c.Subdivision, null, /* @__PURE__ */ n.createElement(c.Subdivision.Label, {
|
|
@@ -1559,9 +1559,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1559
1559
|
className: C(f.selectOption, fe)
|
|
1560
1560
|
})), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
|
|
1561
1561
|
className: C(te, f.error)
|
|
1562
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1562
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Subdivision.Description, {
|
|
1563
1563
|
className: C(ne, f.description)
|
|
1564
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1564
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1565
1565
|
content: e,
|
|
1566
1566
|
locale: t
|
|
1567
1567
|
}))), /* @__PURE__ */ n.createElement(c.StreetName, null, /* @__PURE__ */ n.createElement(c.StreetName.Label, {
|
|
@@ -1576,9 +1576,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1576
1576
|
className: C(f.selectOption, fe)
|
|
1577
1577
|
})), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
|
|
1578
1578
|
className: C(te, f.error)
|
|
1579
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1579
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetName.Description, {
|
|
1580
1580
|
className: C(ne, f.description)
|
|
1581
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1581
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1582
1582
|
content: e,
|
|
1583
1583
|
locale: t
|
|
1584
1584
|
}))), /* @__PURE__ */ n.createElement(c.StreetNumber, null, /* @__PURE__ */ n.createElement(c.StreetNumber.Label, {
|
|
@@ -1589,9 +1589,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1589
1589
|
className: C(ee, f.input)
|
|
1590
1590
|
}), /* @__PURE__ */ n.createElement(c.StreetNumber.Error, {
|
|
1591
1591
|
className: C(te, f.error)
|
|
1592
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1592
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetNumber.Description, {
|
|
1593
1593
|
className: C(ne, f.description)
|
|
1594
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1594
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1595
1595
|
content: e,
|
|
1596
1596
|
locale: t
|
|
1597
1597
|
}))), /* @__PURE__ */ n.createElement(c.Apartment, null, /* @__PURE__ */ n.createElement(c.Apartment.Label, {
|
|
@@ -1602,9 +1602,9 @@ const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_co
|
|
|
1602
1602
|
className: C(ee, f.input)
|
|
1603
1603
|
}), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
|
|
1604
1604
|
className: C(te, f.error)
|
|
1605
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1605
|
+
}, /* @__PURE__ */ n.createElement(X, null), /* @__PURE__ */ n.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Apartment.Description, {
|
|
1606
1606
|
className: C(ne, f.description)
|
|
1607
|
-
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(
|
|
1607
|
+
}, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(G, {
|
|
1608
1608
|
content: e,
|
|
1609
1609
|
locale: t
|
|
1610
1610
|
}))));
|
package/dist/component/{number-input-field-rac-DZRR7gdt.js → number-input-field-rac-CPQ3u0N7.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as v } from "@wix/ricos/viewer";
|
|
2
2
|
import m from "classnames";
|
|
3
|
-
import r, { useState as U, useCallback as j, useEffect as
|
|
4
|
-
import { NumberField as $, Input as
|
|
5
|
-
import { ai as C, af as S, as as
|
|
3
|
+
import r, { useState as U, useCallback as j, useEffect as z, useRef as Q } from "react";
|
|
4
|
+
import { NumberField as $, Input as G } from "react-aria-components";
|
|
5
|
+
import { ai as C, af as S, as as H, ak as J } from "./form-CtWkUmxc.js";
|
|
6
6
|
import { f as d } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as K, E as W } from "./field-error-headless-
|
|
8
|
-
import { L as X } from "./field-label-headless-
|
|
7
|
+
import { D as K, E as W } from "./field-error-headless-D6iejMQP.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-BWLfU3YB.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
|
-
import { s as i } from "./field-rac.module-
|
|
13
|
-
import {
|
|
12
|
+
import { s as i } from "./field-rac.module-DnUIb9Oh.js";
|
|
13
|
+
import { z as re, P as te, y as ne, q as ae, j as se } from "./form-element-classes-BSMjWijd.js";
|
|
14
14
|
const e = ({ children: n }) => {
|
|
15
15
|
var D, L, R;
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled: p, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: u, hasError: c, validation: t } = C(), { labelId:
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: p, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: u, hasError: c, validation: t } = C(), { labelId: y } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1, A = (L = t == null ? void 0 : t.number) == null ? void 0 : L.maximum, q = (R = t == null ? void 0 : t.number) == null ? void 0 : R.minimum, M = _(s), [T, I] = U(M), V = w(b), g = d(n, e.Label), h = d(n, e.Input), k = d(n, e.Description), x = d(n, e.Error), B = j((N) => {
|
|
17
17
|
if (N === void 0 || Number.isNaN(N)) {
|
|
18
18
|
l(""), I(NaN);
|
|
19
19
|
return;
|
|
@@ -24,37 +24,37 @@ const e = ({ children: n }) => {
|
|
|
24
24
|
F,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return z(() => {
|
|
28
28
|
I(_(s));
|
|
29
29
|
}, [
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(u, {
|
|
32
32
|
fieldId: a,
|
|
33
|
-
renderLabel: () =>
|
|
33
|
+
renderLabel: () => g,
|
|
34
34
|
renderInput: () => /* @__PURE__ */ r.createElement($, {
|
|
35
|
-
"aria-labelledby":
|
|
36
|
-
value:
|
|
35
|
+
"aria-labelledby": y,
|
|
36
|
+
value: T,
|
|
37
37
|
onChange: B,
|
|
38
38
|
isDisabled: p,
|
|
39
39
|
isRequired: E,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: c,
|
|
42
|
-
onBlur:
|
|
42
|
+
onBlur: V,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
45
|
-
maxValue:
|
|
46
|
-
},
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, x,
|
|
44
|
+
minValue: q ?? void 0,
|
|
45
|
+
maxValue: A ?? void 0
|
|
46
|
+
}, h),
|
|
47
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, x, k)
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: n }) => {
|
|
50
50
|
var c;
|
|
51
|
-
const { t: a } =
|
|
51
|
+
const { t: a } = H(), { inputId: s, ariaDescribedBy: l } = S(), { id: p, placeholder: E, validation: o, label: b, required: f } = C();
|
|
52
52
|
(c = o == null ? void 0 : o.number) != null && c.multipleOf;
|
|
53
53
|
const u = Q(null);
|
|
54
|
-
return
|
|
54
|
+
return J(() => {
|
|
55
55
|
var t;
|
|
56
56
|
(t = u.current) == null || t.focus();
|
|
57
|
-
}, p), /* @__PURE__ */ r.createElement(
|
|
57
|
+
}, p), /* @__PURE__ */ r.createElement(G, {
|
|
58
58
|
ref: u,
|
|
59
59
|
id: s,
|
|
60
60
|
"aria-describedby": l,
|