@wix/form-elements 1.63.0 → 1.64.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-B1VVk_Ui.js → appointment-rac-DojiZqx9.js} +35 -35
- package/dist/component/{bookings-address-rac-IQeHFdHT.js → bookings-address-rac-Bm_lQchD.js} +1 -1
- package/dist/component/{bookings-email-rac-z26A790r.js → bookings-email-rac-vwuy0kW8.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Djf0GPP4.js → bookings-first-name-rac-BbWuLoeg.js} +1 -1
- package/dist/component/{bookings-header-rac-CXOzAOpz.js → bookings-header-rac-DVknNH29.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CbB8alM9.js → bookings-last-name-rac-BnT3Cq0b.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CXrLx7Pn.js → bookings-login-bar-rac-DKi-VAXc.js} +5 -5
- package/dist/component/{bookings-phone-rac-DGYx7h5g.js → bookings-phone-rac-Bfy8rheB.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-viJG57XF.js → bookings-rich-text-rac-DGiBDcXw.js} +1 -1
- package/dist/component/{checkbox-field-rac-e-RAmupX.js → checkbox-field-rac-CYADRY54.js} +5 -5
- package/dist/component/checkbox-group-field-headless-BDAFpX5F.js +210 -0
- package/dist/component/checkbox-group-field-rac-2YUsOmDI.js +40 -0
- package/dist/component/{checkbox-group-rac-CDfDTWqz.js → checkbox-group-rac-CQf1C9H5.js} +1 -1
- package/dist/component/{checkbox-rac-BRBKYD_5.js → checkbox-rac-Bjv8jZjs.js} +1 -1
- package/dist/component/{contacts-address-rac-BtWWQi77.js → contacts-address-rac-BBTiEec9.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DaEUXJTf.js → contacts-birthdate-rac-XReeFHVW.js} +1 -1
- package/dist/component/{contacts-company-rac-IgRyjtcM.js → contacts-company-rac-B-fUQszu.js} +1 -1
- package/dist/component/{contacts-email-rac-BS1MDrMk.js → contacts-email-rac-DBtcCcsV.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BAvXypDF.js → contacts-first-name-rac-mkwU3706.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C289RYPl.js → contacts-last-name-rac-DY5N-AZx.js} +1 -1
- package/dist/component/{contacts-phone-rac-DIpyskam.js → contacts-phone-rac-Ce1rMz_z.js} +1 -1
- package/dist/component/{contacts-position-rac-nPeh3lKU.js → contacts-position-rac-B65H8PDu.js} +1 -1
- package/dist/component/contacts-subscribe-rac-BxO8rIyL.js +13 -0
- package/dist/component/{contacts-tax-id-rac-C4WB-SR0.js → contacts-tax-id-rac-Jtt0ySK2.js} +1 -1
- package/dist/component/{date-availability-HHjPx4Uv.js → date-availability-B8UwvTJa.js} +1 -1
- package/dist/component/{date-input-field-rac-GFgFcpX2.js → date-input-field-rac-RL2a0xoD.js} +33 -33
- package/dist/component/{date-input-rac-B9BUEIA-.js → date-input-rac-ak3G7V07.js} +1 -1
- package/dist/component/{date-picker-field-rac-BfjYIIuY.js → date-picker-field-rac-SL_Roltf.js} +31 -31
- package/dist/component/{date-picker-rac-Bd2UN0ZF.js → date-picker-rac-ByrM0YIX.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CAXnxLQP.js → date-time-input-field-rac-DOE7xcKi.js} +36 -36
- package/dist/component/{date-time-input-rac-BuJ3Awlh.js → date-time-input-rac-BA-GyrAc.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DKp4cBVa.js → dext-checkbox-group-rac-EwUnBO80.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BMu_k06A.js → dext-checkbox-rac-CIRKi4B5.js} +1 -1
- package/dist/component/{dext-date-picker-rac-L3sdldhT.js → dext-date-picker-rac-BYO_Q1zM.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-UmabFzDN.js → dext-date-time-input-rac-BOahPeaH.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DbjgYaG-.js → dext-dropdown-rac-sTD_r-0H.js} +1 -1
- package/dist/component/{dext-email-rac-rNudrOOK.js → dext-email-rac-e-2_h3he.js} +1 -1
- package/dist/component/{dext-number-input-rac-hw1FTrJL.js → dext-number-input-rac-D6LACzWl.js} +1 -1
- package/dist/component/{dext-phone-rac-DrZ_Vwv2.js → dext-phone-rac-kUycy5Od.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DAt2ax-I.js → dext-radio-group-rac-DPD2UkrV.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BW2Ike11.js → dext-rating-input-rac-DUsnrl9W.js} +1 -1
- package/dist/component/{dext-tags-rac-DDzwlKrR.js → dext-tags-rac-D6z69HuO.js} +2 -2
- package/dist/component/{dext-text-area-rac-D0xf4z3z.js → dext-text-area-rac-C-DVtFJ1.js} +1 -1
- package/dist/component/{dext-text-input-rac-Da04OLmq.js → dext-text-input-rac-CIa2MdC6.js} +1 -1
- package/dist/component/{dext-url-input-rac-B-g4xTqh.js → dext-url-input-rac-8rVVW5us.js} +1 -1
- package/dist/component/{donation-rac-gKeq72jg.js → donation-rac-BjmSBabc.js} +60 -60
- package/dist/component/{dropdown-field-headless-Js5TxdU4.js → dropdown-field-headless-DReo519l.js} +16 -16
- package/dist/component/{dropdown-field-rac-BDxcvX00.js → dropdown-field-rac-DzrjA2O6.js} +7 -7
- package/dist/component/{dropdown-rac-B5UHNzV-.js → dropdown-rac-CS7oLTp_.js} +1 -1
- package/dist/component/{ecom-address-rac-0zm4bX37.js → ecom-address-rac-EIb88J_6.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DCXoI33l.js → ecom-subscription-checkbox-rac-CE0Ks6qS.js} +5 -5
- package/dist/component/{email-input-field-rac-svf6hUHF.js → email-input-field-rac-BScZxYHw.js} +47 -47
- package/dist/component/{events-repeater-rac-DMIqzuVK.js → events-repeater-rac-Y0rH2Jli.js} +45 -45
- package/dist/component/{events-rsvp-rac-B_YD4ckO.js → events-rsvp-rac-BiAYVv_b.js} +12 -12
- package/dist/component/{field-error-headless-DTKnr5Zx.js → field-error-headless-DrnFrGun.js} +3 -3
- package/dist/component/{field-label-headless-DV4aNd5Y.js → field-label-headless-BIYf1BIh.js} +4 -4
- package/dist/component/field-rac.module-CWkwwhq4.js +21 -0
- package/dist/component/{file-upload-rac-lGKJjG3m.js → file-upload-rac-br--tZLp.js} +73 -73
- package/dist/component/{fixed-payment-rac-BVS6glii.js → fixed-payment-rac-XEtrsaMy.js} +11 -11
- package/dist/component/{form-DzjdnO7t.js → form-9yjqDnxY.js} +1563 -1556
- package/dist/component/form-element-classes-KRzHUNLu.js +57 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-tzBH-8Yh.js → header-field-rac-CLELgzqY.js} +7 -7
- package/dist/component/{header-rac-6thQAvVF.js → header-rac-D8KGkVVp.js} +1 -1
- package/dist/component/{image-choice-rac-Dx1b-saW.js → image-choice-rac-Cl09CLP4.js} +14 -14
- package/dist/component/{index-DIP7KB8P.js → index-C4y71e1i.js} +2 -2
- package/dist/component/{index-Lnx0829a.js → index-PHkE0Ru4.js} +4 -4
- package/dist/component/{isObjectLike-B_1KizZV.js → isObjectLike-srCDplej.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BY2SUp2d.js → multiline-address-field-rac-CsBLI9y-.js} +80 -80
- package/dist/component/{multiline-address-rac-BL8Yp4F0.js → multiline-address-rac-DFDPFfXh.js} +1 -1
- package/dist/component/{number-input-field-rac-x0yFmXbe.js → number-input-field-rac-DZRR7gdt.js} +16 -16
- package/dist/component/{number-input-rac-pJXc2YsD.js → number-input-rac-BCS5lkff.js} +1 -1
- package/dist/component/{password-rac-B4XCP64b.js → password-rac-ClDGgR3E.js} +16 -16
- package/dist/component/{payment-input-rac-CZdOAjK4.js → payment-input-rac-COydWmUE.js} +28 -28
- package/dist/component/{phone-input-field-rac-DO_V5Z_T.js → phone-input-field-rac-DYCibqe1.js} +42 -42
- package/dist/component/{phone-rac-D16nLDjP.js → phone-rac-BS-dmWkJ.js} +1 -1
- package/dist/component/{product-list-rac-DER8gVqy.js → product-list-rac-hxOhaA-r.js} +75 -75
- package/dist/component/quiz-radio-group-rac-BT-YZO2Q.js +13 -0
- package/dist/component/{radio-group-field-rac-Dt2pU0VV.js → radio-group-field-rac-DKqWnMBJ.js} +3 -3
- package/dist/component/{radio-group-field-rac.module--sO0VqCA.js → radio-group-field-rac.module-BwUynK_5.js} +7 -7
- package/dist/component/{radio-group-rac-CqCmtkNQ.js → radio-group-rac-DHURQZKK.js} +1 -1
- package/dist/component/{rating-input-field-rac-xDrHHcL2.js → rating-input-field-rac-CZRdSVrf.js} +30 -30
- package/dist/component/{rating-input-rac-Bo5E9N87.js → rating-input-rac-BaH52DYm.js} +1 -1
- package/dist/component/{rich-content-rac.module-CJXbNca9.js → rich-content-rac.module-ILBfxEmN.js} +1 -1
- package/dist/component/{rich-text-field-rac-CkV0Z9F-.js → rich-text-field-rac-B58q8Is7.js} +5 -5
- package/dist/component/{rich-text-rac-59DbKpXz.js → rich-text-rac-DGbZh1eX.js} +1 -1
- package/dist/component/{service-dropdown-rac-BLnflnUr.js → service-dropdown-rac-DUiNIbdv.js} +45 -45
- package/dist/component/services-multi-choice-rac-B7y9s2l8.js +76 -0
- package/dist/component/{signature-rac-Bb5IaS28.js → signature-rac-CydpvQJZ.js} +25 -25
- package/dist/component/{submit-button-rac-Bjyi8sUA.js → submit-button-rac-OO53h4H8.js} +6 -6
- package/dist/component/{tags-field-rac-C_VO3_69.js → tags-field-rac-eX3d3JEH.js} +44 -44
- package/dist/component/{tags-rac-CKiutCWe.js → tags-rac-CdIB_48Z.js} +1 -1
- package/dist/component/{text-area-field-rac-Cg-vIhFe.js → text-area-field-rac-Bir5Q7gz.js} +17 -17
- package/dist/component/{text-area-rac-tMFx38UD.js → text-area-rac-Ct1UNU04.js} +1 -1
- package/dist/component/{text-input-field-rac-CgN_2hOD.js → text-input-field-rac-onGUXC9J.js} +6 -6
- package/dist/component/{text-input-headless-CkhvKrFp.js → text-input-headless-Bs9m7QFg.js} +11 -11
- package/dist/component/{text-input-rac-BsyBgd3b.js → text-input-rac-DK4nEw4D.js} +1 -1
- package/dist/component/{time-input-rac-BxRVJtHE.js → time-input-rac-BCG9ktFa.js} +35 -35
- package/dist/component/{url-input-field-rac-B_1yVniS.js → url-input-field-rac-mUkrVTcL.js} +24 -24
- package/dist/component/{url-input-rac-D8VrKYVe.js → url-input-rac-Cl7LFYlr.js} +1 -1
- package/dist/component/{use-service-options-base-Ci9gIluo.js → use-service-options-base-BYVuKRj2.js} +6 -6
- package/dist/form.d.ts +3 -1
- package/package.json +2 -2
- package/dist/component/checkbox-group-field-headless-Cvia4lL6.js +0 -204
- package/dist/component/checkbox-group-field-rac-BXxk90dk.js +0 -33
- package/dist/component/contacts-subscribe-rac-Ci5OLk68.js +0 -13
- package/dist/component/field-rac.module-DtugsLiL.js +0 -21
- package/dist/component/form-element-classes-Bi-nNM8q.js +0 -55
- package/dist/component/quiz-radio-group-rac-BgTmHHi4.js +0 -13
- package/dist/component/services-multi-choice-rac-C-bFjwx8.js +0 -76
|
@@ -2,19 +2,19 @@ import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
|
2
2
|
import C from "classnames";
|
|
3
3
|
import n, { useMemo as w, createContext as We, useContext as De, useState as ye, useRef as B, useCallback as D, useEffect as Ve } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as _t } from "react-aria";
|
|
5
|
-
import {
|
|
5
|
+
import { ad as bt, c as ft, a9 as Pt, ab as yt, G as Tt, H as Mt, u as qt, z as V, F as K, as as Me, a2 as at, ai as P, af as T, ak as le, ae as Ct, Q as wt, C as he, a0 as xt, a4 as Bt, ap as kt, aj as $t, ao as Ut, a7 as Wt, Y as Vt, a6 as Kt, al as Yt, j as jt } from "./form-9yjqDnxY.js";
|
|
6
6
|
import { f as E, a as h } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { F as
|
|
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 Gt, c as Xt, a as zt, r as Ot } from "./isObjectLike-
|
|
9
|
+
import { D as ce, E as de } from "./field-error-headless-DrnFrGun.js";
|
|
10
|
+
import { L as ue } from "./field-label-headless-BIYf1BIh.js";
|
|
11
|
+
import { e as Gt, c as Xt, a as zt, r as Ot } from "./isObjectLike-srCDplej.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
14
|
import { E as z } 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-CWkwwhq4.js";
|
|
17
|
+
import { t as Q, J as Z, s as ee, w as ge, n as te, j as ne } from "./form-element-classes-KRzHUNLu.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 qe(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
|
+
...qe(a) && {
|
|
99
99
|
hidden: !a
|
|
100
100
|
},
|
|
101
|
-
...
|
|
101
|
+
...qe(i) && qe(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(() => Mt(), []);
|
|
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 = qt({
|
|
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 M = un(g);
|
|
205
205
|
return {
|
|
206
|
-
...
|
|
207
|
-
fields:
|
|
206
|
+
...M,
|
|
207
|
+
fields: M.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 } = Me(), 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 }) => {
|
|
@@ -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 M(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 q() {
|
|
411
411
|
return p === void 0 ? b : pe(t());
|
|
412
412
|
}
|
|
413
|
-
function
|
|
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 M(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
|
|
423
|
+
return H.cancel = x, H.flush = q, 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
|
+
]), M = 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(M, {
|
|
596
596
|
onFocus: R
|
|
597
597
|
}), h(_, {
|
|
598
598
|
options: N
|
|
@@ -612,8 +612,8 @@ const gn = /* @__PURE__ */ wt(On), vn = (e, t, o = 200) => {
|
|
|
612
612
|
placeholder: r,
|
|
613
613
|
onFocus: i
|
|
614
614
|
});
|
|
615
|
-
},
|
|
616
|
-
const o = E(e,
|
|
615
|
+
}, je = ({ children: e, className: t }) => {
|
|
616
|
+
const o = E(e, je.Option);
|
|
617
617
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
618
618
|
className: t,
|
|
619
619
|
containerPadding: 0,
|
|
@@ -632,14 +632,14 @@ const gn = /* @__PURE__ */ wt(On), vn = (e, t, o = 200) => {
|
|
|
632
632
|
textValue: r
|
|
633
633
|
}, r);
|
|
634
634
|
};
|
|
635
|
-
|
|
635
|
+
je.Option = Dn;
|
|
636
636
|
k.Label = ue;
|
|
637
637
|
k.Input = Sn;
|
|
638
|
-
k.Options =
|
|
638
|
+
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 } = Me(), 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 } = Me(), { language: p } = yt(), y = w(() => (I || []).reduce((x, q) => (q.value && he.hasOwnProperty(q.value) && x.push({
|
|
769
|
+
value: q.value,
|
|
770
|
+
label: b(`locale-dataset.countries.${he[q.value].toUpperCase()}`)
|
|
771
|
+
}), x), []).sort((x, q) => x.label.localeCompare(q.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"), M = 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(M, {
|
|
789
789
|
label: R
|
|
790
790
|
}),
|
|
791
791
|
renderInput: () => /* @__PURE__ */ n.createElement(Re, {
|
|
@@ -835,8 +835,8 @@ const Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
|
835
835
|
}, e);
|
|
836
836
|
Fe.Input = Pn;
|
|
837
837
|
Fe.Trigger = Tn;
|
|
838
|
-
const
|
|
839
|
-
const { options: r } = o, a = E(e,
|
|
838
|
+
const He = ({ children: e, className: t, ...o }) => {
|
|
839
|
+
const { options: r } = o, a = E(e, He.Option);
|
|
840
840
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
841
841
|
className: t,
|
|
842
842
|
containerPadding: 0,
|
|
@@ -846,7 +846,7 @@ const je = ({ children: e, className: t, ...o }) => {
|
|
|
846
846
|
value: l.value,
|
|
847
847
|
label: l.label
|
|
848
848
|
}))));
|
|
849
|
-
},
|
|
849
|
+
}, Mn = ({ 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 je = ({ children: e, className: t, ...o }) => {
|
|
|
854
854
|
textValue: r
|
|
855
855
|
}, r);
|
|
856
856
|
};
|
|
857
|
-
|
|
857
|
+
He.Option = Mn;
|
|
858
858
|
Y.Label = ue;
|
|
859
859
|
Y.Control = Fe;
|
|
860
|
-
Y.Options =
|
|
860
|
+
Y.Options = He;
|
|
861
861
|
Y.Description = ce;
|
|
862
862
|
Y.Error = de;
|
|
863
|
-
const
|
|
863
|
+
const qn = /(\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(qn)) == 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), M = 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, _, M)
|
|
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, _, M)
|
|
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
|
+
]), M = 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(M, {
|
|
983
983
|
onFocus: R
|
|
984
984
|
}), h(_, {
|
|
985
985
|
options: N
|
|
@@ -1104,7 +1104,7 @@ const U = ({ children: e }) => {
|
|
|
1104
1104
|
u,
|
|
1105
1105
|
y,
|
|
1106
1106
|
L
|
|
1107
|
-
]),
|
|
1107
|
+
]), M = 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: M,
|
|
1128
1128
|
onFocus: _,
|
|
1129
1129
|
allowsCustomValue: !0,
|
|
1130
1130
|
menuTrigger: "input",
|
|
@@ -1212,13 +1212,13 @@ ae.Label = ue;
|
|
|
1212
1212
|
ae.Input = Kn;
|
|
1213
1213
|
ae.Description = ce;
|
|
1214
1214
|
ae.Error = de;
|
|
1215
|
-
const
|
|
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(((
|
|
1219
|
-
value:
|
|
1220
|
-
label: L(
|
|
1221
|
-
})).sort((
|
|
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 } = Me(), b = Ne(), p = b ? he[b] : void 0, y = b && xt.getCountryByShortKey(b), N = w(() => {
|
|
1217
|
+
var q;
|
|
1218
|
+
return (Bt(((q = y == null ? void 0 : y.subdivisions) == null ? void 0 : q.list) || [], p) || []).map((H) => ({
|
|
1219
|
+
value: H.key,
|
|
1220
|
+
label: L(H.displayName)
|
|
1221
|
+
})).sort((H, A) => H.label.localeCompare(A.label));
|
|
1222
1222
|
}, [
|
|
1223
1223
|
p,
|
|
1224
1224
|
L,
|
|
@@ -1231,10 +1231,10 @@ const H = ({ children: e }) => {
|
|
|
1231
1231
|
commit: r,
|
|
1232
1232
|
clear: F,
|
|
1233
1233
|
onBlur: d
|
|
1234
|
-
}), R = be("subdivision"),
|
|
1234
|
+
}), R = be("subdivision"), M = 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(M, {
|
|
1238
1238
|
label: R
|
|
1239
1239
|
}),
|
|
1240
1240
|
renderInput: () => /* @__PURE__ */ n.createElement(Re, {
|
|
@@ -1279,11 +1279,11 @@ const H = ({ children: e }) => {
|
|
|
1279
1279
|
onClick: u,
|
|
1280
1280
|
onKeyDown: d
|
|
1281
1281
|
});
|
|
1282
|
-
},
|
|
1282
|
+
}, jn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(Nt, {
|
|
1283
1283
|
className: t
|
|
1284
1284
|
}, e);
|
|
1285
1285
|
Se.Input = Yn;
|
|
1286
|
-
Se.Trigger =
|
|
1286
|
+
Se.Trigger = jn;
|
|
1287
1287
|
const ze = ({ children: e, className: t, ...o }) => {
|
|
1288
1288
|
const { options: r } = o, a = E(e, ze.Option);
|
|
1289
1289
|
return /* @__PURE__ */ n.createElement(Ae, {
|
|
@@ -1295,7 +1295,7 @@ const ze = ({ children: e, className: t, ...o }) => {
|
|
|
1295
1295
|
value: l.value,
|
|
1296
1296
|
label: l.label
|
|
1297
1297
|
}))));
|
|
1298
|
-
},
|
|
1298
|
+
}, Hn = ({ className: e, ...t }) => {
|
|
1299
1299
|
const { value: o, label: r } = t;
|
|
1300
1300
|
return /* @__PURE__ */ n.createElement(Pe, {
|
|
1301
1301
|
className: e,
|
|
@@ -1303,12 +1303,12 @@ const ze = ({ children: e, className: t, ...o }) => {
|
|
|
1303
1303
|
textValue: r
|
|
1304
1304
|
}, r);
|
|
1305
1305
|
};
|
|
1306
|
-
ze.Option =
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1306
|
+
ze.Option = Hn;
|
|
1307
|
+
j.Label = ue;
|
|
1308
|
+
j.Control = Se;
|
|
1309
|
+
j.Options = ze;
|
|
1310
|
+
j.Description = ce;
|
|
1311
|
+
j.Error = de;
|
|
1312
1312
|
const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("city"), zn = () => me("addressLine"), Qn = () => me("addressLine2"), Zn = () => me("postalCode"), er = () => me("streetName"), tr = () => me("streetNumber"), nr = () => me("apartment"), rr = {
|
|
1313
1313
|
[K.MLA_COUNTRY]: Jn,
|
|
1314
1314
|
[K.MLA_SUBDIVISION]: Gn,
|
|
@@ -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(), M = 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: q } = pn({
|
|
1339
1339
|
id: t,
|
|
1340
1340
|
target: L,
|
|
1341
1341
|
fieldType: y,
|
|
@@ -1344,10 +1344,10 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1344
1344
|
fieldSettings: m,
|
|
1345
1345
|
validation: I,
|
|
1346
1346
|
required: p
|
|
1347
|
-
}),
|
|
1347
|
+
}), H = D((W) => {
|
|
1348
1348
|
if (!r)
|
|
1349
1349
|
return;
|
|
1350
|
-
const G = en(W,
|
|
1350
|
+
const G = en(W, q, M), Te = {
|
|
1351
1351
|
...G,
|
|
1352
1352
|
[Ie.COUNTRY]: G[Ie.COUNTRY] ?? r[Ie.COUNTRY]
|
|
1353
1353
|
};
|
|
@@ -1355,10 +1355,10 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1355
1355
|
}, [
|
|
1356
1356
|
a,
|
|
1357
1357
|
r,
|
|
1358
|
-
|
|
1359
|
-
|
|
1358
|
+
q,
|
|
1359
|
+
M
|
|
1360
1360
|
]), A = D((W, G) => {
|
|
1361
|
-
if (
|
|
1361
|
+
if (q && W === Ie.COUNTRY && (r == null ? void 0 : r[W]) !== G) {
|
|
1362
1362
|
a == null || a({
|
|
1363
1363
|
[Ie.COUNTRY]: G
|
|
1364
1364
|
});
|
|
@@ -1371,8 +1371,8 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1371
1371
|
}, [
|
|
1372
1372
|
a,
|
|
1373
1373
|
r,
|
|
1374
|
-
|
|
1375
|
-
]), J = D(async (W) => _(
|
|
1374
|
+
q
|
|
1375
|
+
]), J = D(async (W) => _(q ? [
|
|
1376
1376
|
...W,
|
|
1377
1377
|
{
|
|
1378
1378
|
path: `${L}/${Ie.COUNTRY}`,
|
|
@@ -1382,7 +1382,7 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1382
1382
|
r,
|
|
1383
1383
|
L,
|
|
1384
1384
|
_,
|
|
1385
|
-
|
|
1385
|
+
q
|
|
1386
1386
|
]);
|
|
1387
1387
|
Yt(t, () => {
|
|
1388
1388
|
var Te;
|
|
@@ -1416,7 +1416,7 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1416
1416
|
countryCode: r == null ? void 0 : r.country
|
|
1417
1417
|
}, /* @__PURE__ */ n.createElement(tn, {
|
|
1418
1418
|
autocompleteEnabled: b,
|
|
1419
|
-
onAddressSelect:
|
|
1419
|
+
onAddressSelect: H
|
|
1420
1420
|
}, /* @__PURE__ */ n.createElement(En, {
|
|
1421
1421
|
fields: At
|
|
1422
1422
|
}, /* @__PURE__ */ n.createElement("div", {
|
|
@@ -1427,10 +1427,10 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1427
1427
|
}), /* @__PURE__ */ n.createElement(_t, {
|
|
1428
1428
|
getContainer: () => N
|
|
1429
1429
|
}, /* @__PURE__ */ n.createElement("fieldset", {
|
|
1430
|
-
style:
|
|
1430
|
+
style: Ht
|
|
1431
1431
|
}, /* @__PURE__ */ n.createElement("legend", {
|
|
1432
1432
|
style: Jt
|
|
1433
|
-
}, u), /* @__PURE__ */ n.createElement(
|
|
1433
|
+
}, u), /* @__PURE__ */ n.createElement(jt, {
|
|
1434
1434
|
formSchema: O,
|
|
1435
1435
|
form: x,
|
|
1436
1436
|
values: r ?? or,
|
|
@@ -1444,7 +1444,7 @@ const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("cit
|
|
|
1444
1444
|
}))))))) : null;
|
|
1445
1445
|
};
|
|
1446
1446
|
c.Country = Y;
|
|
1447
|
-
c.Subdivision =
|
|
1447
|
+
c.Subdivision = j;
|
|
1448
1448
|
c.City = se;
|
|
1449
1449
|
c.AddressLine = k;
|
|
1450
1450
|
c.AddressLine2 = re;
|
package/dist/component/{number-input-field-rac-x0yFmXbe.js → number-input-field-rac-DZRR7gdt.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
|
|
3
|
+
import r, { useState as U, useCallback as j, useEffect as J, useRef as Q } from "react";
|
|
4
4
|
import { NumberField as $, Input as z } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { ai as C, af as S, as as G, ak as H } from "./form-9yjqDnxY.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-DrnFrGun.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-BIYf1BIh.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-CWkwwhq4.js";
|
|
13
|
+
import { t as re, J as te, s as ne, n as ae, j as se } from "./form-element-classes-KRzHUNLu.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: A } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1,
|
|
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: A } = S(), F = ((D = t == null ? void 0 : t.number) == null ? void 0 : D.multipleOf) || 1, y = (L = t == null ? void 0 : t.number) == null ? void 0 : L.maximum, M = (R = t == null ? void 0 : t.number) == null ? void 0 : R.minimum, T = _(s), [V, I] = U(T), g = w(b), h = d(n, e.Label), k = d(n, e.Input), q = 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,34 +24,34 @@ const e = ({ children: n }) => {
|
|
|
24
24
|
F,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return J(() => {
|
|
28
28
|
I(_(s));
|
|
29
29
|
}, [
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(u, {
|
|
32
32
|
fieldId: a,
|
|
33
|
-
renderLabel: () =>
|
|
33
|
+
renderLabel: () => h,
|
|
34
34
|
renderInput: () => /* @__PURE__ */ r.createElement($, {
|
|
35
35
|
"aria-labelledby": A,
|
|
36
|
-
value:
|
|
36
|
+
value: V,
|
|
37
37
|
onChange: B,
|
|
38
38
|
isDisabled: p,
|
|
39
39
|
isRequired: E,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: c,
|
|
42
|
-
onBlur:
|
|
42
|
+
onBlur: g,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
45
|
-
maxValue:
|
|
46
|
-
},
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
44
|
+
minValue: M ?? void 0,
|
|
45
|
+
maxValue: y ?? void 0
|
|
46
|
+
}, k),
|
|
47
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, x, q)
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: n }) => {
|
|
50
50
|
var c;
|
|
51
51
|
const { t: a } = G(), { 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 H(() => {
|
|
55
55
|
var t;
|
|
56
56
|
(t = u.current) == null || t.focus();
|
|
57
57
|
}, p), /* @__PURE__ */ r.createElement(z, {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as h, useRef as N } from "react";
|
|
2
2
|
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { ai as p, af as I, ak as x, as as A } from "./form-9yjqDnxY.js";
|
|
5
5
|
import { TextField as B, Group as P, Input as V, Button as v } from "react-aria-components";
|
|
6
6
|
import { f as E, a as g } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as k } from "./field-error-headless-
|
|
8
|
-
import { L as q } from "./field-label-headless-
|
|
7
|
+
import { D as M, E as k } from "./field-error-headless-DrnFrGun.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-BIYf1BIh.js";
|
|
9
9
|
import { E as U } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as j } from "./custom-focus-class-_483Pkwp.js";
|
|
11
|
-
import { s as u } from "./field-rac.module-
|
|
12
|
-
import {
|
|
11
|
+
import { s as u } from "./field-rac.module-CWkwwhq4.js";
|
|
12
|
+
import { t as H, J as W, s as Z, n as G, j as J } from "./form-element-classes-KRzHUNLu.js";
|
|
13
13
|
const t = ({ children: r, className: o }) => {
|
|
14
|
-
const { id: i, value: s, onChange: c, disabled: l, readOnly: m, required: n, hasError: a, onBlur: f, onFocus: _, FieldLayout: y } = p(), { labelId: C } = I(), [F, L] =
|
|
14
|
+
const { id: i, value: s, onChange: c, disabled: l, readOnly: m, required: n, hasError: a, onBlur: f, onFocus: _, FieldLayout: y } = p(), { labelId: C } = I(), [F, L] = h(!1), R = E(r, t.Label), D = E(r, t.Control), T = E(r, t.Description), S = E(r, t.Error);
|
|
15
15
|
return /* @__PURE__ */ e.createElement(y, {
|
|
16
16
|
fieldId: i,
|
|
17
17
|
renderLabel: () => R,
|
|
@@ -28,11 +28,11 @@ const t = ({ children: r, className: o }) => {
|
|
|
28
28
|
className: o
|
|
29
29
|
}, g(D, {
|
|
30
30
|
isVisible: F,
|
|
31
|
-
onToggleVisibility: () => L((
|
|
31
|
+
onToggleVisibility: () => L((w) => !w)
|
|
32
32
|
})),
|
|
33
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T,
|
|
33
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, S)
|
|
34
34
|
});
|
|
35
|
-
},
|
|
35
|
+
}, Q = ({ children: r, className: o, ...i }) => {
|
|
36
36
|
const { isVisible: s, onToggleVisibility: c } = i, { disabled: l, hasError: m } = p(), n = E(r, t.Input), a = E(r, t.Toggle);
|
|
37
37
|
return /* @__PURE__ */ e.createElement(P, {
|
|
38
38
|
className: o,
|
|
@@ -44,7 +44,7 @@ const t = ({ children: r, className: o }) => {
|
|
|
44
44
|
isVisible: s,
|
|
45
45
|
onToggleVisibility: c
|
|
46
46
|
}));
|
|
47
|
-
},
|
|
47
|
+
}, $ = ({ className: r, ...o }) => {
|
|
48
48
|
const { isVisible: i } = o, { id: s, placeholder: c } = p(), { inputId: l, ariaDescribedBy: m } = I(), n = N(null);
|
|
49
49
|
return x(() => {
|
|
50
50
|
var a;
|
|
@@ -57,7 +57,7 @@ const t = ({ children: r, className: o }) => {
|
|
|
57
57
|
className: r,
|
|
58
58
|
placeholder: c
|
|
59
59
|
});
|
|
60
|
-
},
|
|
60
|
+
}, z = ({ className: r, showPasswordTooltipText: o, hidePasswordTooltipText: i, children: s, ...c }) => {
|
|
61
61
|
const { isVisible: l, onToggleVisibility: m } = c, { disabled: n } = p(), a = l ? i : o;
|
|
62
62
|
return /* @__PURE__ */ e.createElement(v, {
|
|
63
63
|
type: "button",
|
|
@@ -71,9 +71,9 @@ const t = ({ children: r, className: o }) => {
|
|
|
71
71
|
}));
|
|
72
72
|
};
|
|
73
73
|
t.Label = q;
|
|
74
|
-
t.Control =
|
|
75
|
-
t.Input =
|
|
76
|
-
t.Toggle =
|
|
74
|
+
t.Control = Q;
|
|
75
|
+
t.Input = $;
|
|
76
|
+
t.Toggle = z;
|
|
77
77
|
t.Description = M;
|
|
78
78
|
t.Error = k;
|
|
79
79
|
const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
@@ -134,7 +134,7 @@ const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
134
134
|
}, ({ isVisible: o }) => o ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
135
135
|
className: d(G, u.error)
|
|
136
136
|
}, /* @__PURE__ */ e.createElement(U, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
137
|
-
className: d(
|
|
137
|
+
className: d(J, u.description)
|
|
138
138
|
}, te));
|
|
139
139
|
}, ge = () => /* @__PURE__ */ e.createElement(re, null);
|
|
140
140
|
export {
|