@wix/form-elements 1.146.0 → 1.147.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-scUix9QX.js → appointment-rac-BG5-bIZU.js} +98 -98
- package/dist/component/{bookings-address-rac-CKemkJOO.js → bookings-address-rac-8e8PqKsp.js} +1 -1
- package/dist/component/{bookings-email-rac-CDqdhPAB.js → bookings-email-rac-CtlnU8ws.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DEy_7Hjb.js → bookings-first-name-rac-CrivNlXM.js} +1 -1
- package/dist/component/{bookings-header-rac-Bl4xy9lB.js → bookings-header-rac-DWDAjfqq.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CsL9xQ1W.js → bookings-last-name-rac-qAthWem2.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DkHYQ4No.js → bookings-login-bar-rac-BNyUDqlM.js} +6 -6
- package/dist/component/{bookings-phone-rac-BoBiFwbV.js → bookings-phone-rac-Tc39XLr7.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DZZnPKWA.js → bookings-rich-text-rac-CPNaPtFK.js} +1 -1
- package/dist/component/{checkbox-field-rac-UgLmJxB-.js → checkbox-field-rac-DEa78Tpf.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-C809nB0Q.js → checkbox-group-field-headless-BxBaMg29.js} +68 -68
- package/dist/component/{checkbox-group-field-rac-u4i4wG21.js → checkbox-group-field-rac-CRRP03Qk.js} +7 -7
- package/dist/component/{checkbox-group-rac-DBAQhSo3.js → checkbox-group-rac-TOofMGl3.js} +1 -1
- package/dist/component/{checkbox-rac-FDQVsI5-.js → checkbox-rac-CHMHr8Ry.js} +1 -1
- package/dist/component/{contacts-address-rac-DnArylPa.js → contacts-address-rac-Bc5yDvTL.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C19jhGEO.js → contacts-birthdate-rac-Ubtg5ncv.js} +1 -1
- package/dist/component/{contacts-company-rac-Dxs0hs_i.js → contacts-company-rac-BksH9IoV.js} +1 -1
- package/dist/component/{contacts-email-rac-D-H43L8r.js → contacts-email-rac-DDPEtMAm.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DwV5NESk.js → contacts-first-name-rac-DUlCvEdx.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C5v2xurf.js → contacts-last-name-rac-BikqNgUr.js} +1 -1
- package/dist/component/{contacts-phone-rac-D9a5x-xl.js → contacts-phone-rac-B4OEgM_8.js} +1 -1
- package/dist/component/{contacts-position-rac-DfsgOv-k.js → contacts-position-rac-BfybzySV.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-B-Hho0Kb.js → contacts-subscribe-rac-CMHb33v1.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-q6TQkB4b.js → contacts-tax-id-rac-C-qEqwO5.js} +1 -1
- package/dist/component/{date-availability-CMDvf5VU.js → date-availability-DZ3J3LLm.js} +1 -1
- package/dist/component/{date-input-field-rac-C1WLUct3.js → date-input-field-rac-DeL5vuE7.js} +39 -39
- package/dist/component/{date-input-rac-cNQ-nr4D.js → date-input-rac-Di6TQvFf.js} +1 -1
- package/dist/component/{date-picker-field-rac-mx11z-MO.js → date-picker-field-rac-BcdpTkjV.js} +107 -103
- package/dist/component/{date-picker-rac-DeTz17zC.js → date-picker-rac-Brne65gr.js} +1 -1
- package/dist/component/{date-time-input-field-rac-feQ2E1eU.js → date-time-input-field-rac-BtQfAxRp.js} +49 -49
- package/dist/component/{date-time-input-rac-G0s0xP4v.js → date-time-input-rac-DM_HXiqV.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BcTN1nJb.js → dext-checkbox-group-rac-WTVwhGG0.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DX0TOrCO.js → dext-checkbox-rac-BR5YwmLQ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CpDp11oa.js → dext-date-picker-rac-DvDuRGYi.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BRvO8izU.js → dext-date-time-input-rac-C6RgbaVv.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DGZ4Yi_X.js → dext-dropdown-rac-CWjSdcZx.js} +1 -1
- package/dist/component/{dext-email-rac-B9YCFHB4.js → dext-email-rac-D-C1gVTq.js} +1 -1
- package/dist/component/{dext-number-input-rac-D890dBZf.js → dext-number-input-rac-YKzZS2ZG.js} +1 -1
- package/dist/component/{dext-phone-rac-BAQftbXo.js → dext-phone-rac-CFZlEH2a.js} +1 -1
- package/dist/component/dext-radio-group-rac-DiH0wIIl.js +18 -0
- package/dist/component/{dext-rating-input-rac-BqQKVaHo.js → dext-rating-input-rac-D0s-i0qO.js} +1 -1
- package/dist/component/{dext-tags-rac-zxxKcNUe.js → dext-tags-rac-Br48OQQ5.js} +2 -2
- package/dist/component/{dext-text-area-rac-Ctp9SwPg.js → dext-text-area-rac-6jG8gJ7i.js} +1 -1
- package/dist/component/{dext-text-input-rac-c_QMlyjr.js → dext-text-input-rac-FAJTCXuf.js} +1 -1
- package/dist/component/{dext-url-input-rac-96pv15aC.js → dext-url-input-rac-BoMP8sQB.js} +1 -1
- package/dist/component/{donation-rac-GEWKSLJY.js → donation-rac-DNi4p-v5.js} +69 -69
- package/dist/component/{dropdown-field-headless-C3OxMhLE.js → dropdown-field-headless-7SCC-xOC.js} +27 -27
- package/dist/component/{dropdown-field-rac-CCXfBmSc.js → dropdown-field-rac-CMzZh6J6.js} +8 -9
- package/dist/component/{dropdown-rac-CR7hswXE.js → dropdown-rac-qeugpHXY.js} +1 -1
- package/dist/component/{ecom-address-rac-khMuxEFD.js → ecom-address-rac-D8b_L5md.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CAi_AHpb.js → ecom-subscription-checkbox-rac-BnAuR9La.js} +5 -5
- package/dist/component/{email-input-field-rac-B83mY2lg.js → email-input-field-rac-CunXRyc5.js} +62 -62
- package/dist/component/{events-repeater-rac-ClEwXgmb.js → events-repeater-rac-DMjyIOkB.js} +17 -17
- package/dist/component/{events-rsvp-rac-BJ5q2SVR.js → events-rsvp-rac-BsuDPq2K.js} +8 -8
- package/dist/component/{field-error-headless-CsYQCsiT.js → field-error-headless-E8WjFr_n.js} +6 -6
- package/dist/component/{field-label-headless-Yg_1PMSg.js → field-label-headless-BakLOu5E.js} +15 -15
- package/dist/component/{file-upload-rac-DJsuI_lR.js → file-upload-rac-Clu_c--0.js} +43 -43
- package/dist/component/{fixed-payment-rac-BMFe9wxU.js → fixed-payment-rac-CzAXxsb-.js} +12 -12
- package/dist/component/{form-Bed4Kfz8.js → form-DHAKwnLt.js} +311 -305
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +2 -2
- package/dist/component/{header-field-rac-DPQTrOSZ.js → header-field-rac-CwmVpz3r.js} +4 -4
- package/dist/component/{header-rac-CzXsuLmE.js → header-rac-ahkGRjSy.js} +1 -1
- package/dist/component/{image-choice-rac-R_4pbOSr.js → image-choice-rac-BwxkkdUu.js} +17 -17
- package/dist/component/{index-qSZCe_WC.js → index-BFi_n6B7.js} +2 -2
- package/dist/component/{index-DZxHlvzt.js → index-BQf23zZi.js} +91 -91
- package/dist/component/{isObjectLike-B-a5uaU-.js → isObjectLike-DHcMRYYH.js} +15 -15
- package/dist/component/{multiline-address-field-rac-rv4IZZy_.js → multiline-address-field-rac-C6xaqNOk.js} +60 -60
- package/dist/component/{multiline-address-rac-DZ7cYtgn.js → multiline-address-rac-DF4TFuDx.js} +1 -1
- package/dist/component/{number-input-field-rac-CL9iXKIf.js → number-input-field-rac-uVJ3SBv2.js} +27 -27
- package/dist/component/{number-input-rac-BeGn6qJR.js → number-input-rac-D6ERhrSM.js} +1 -1
- package/dist/component/{password-rac-DfvhdsKG.js → password-rac-CAiC0ZKl.js} +23 -23
- package/dist/component/{payment-input-rac-BmMfi5rf.js → payment-input-rac-Bu25xvby.js} +26 -26
- package/dist/component/{phone-input-field-rac-DW0a1pXs.js → phone-input-field-rac-32qUvCsC.js} +45 -45
- package/dist/component/{phone-rac-quZjJ08H.js → phone-rac-mNrpj30q.js} +1 -1
- package/dist/component/{product-list-rac-Ci0KB7sN.js → product-list-rac-zHdM9rHw.js} +53 -53
- package/dist/component/{quiz-radio-group-rac--UUtGx2t.js → quiz-radio-group-rac-BaSlT8w3.js} +1 -1
- package/dist/component/{radio-button-module-classes-CqdBGknT.js → radio-button-module-classes-BdWjkBlX.js} +9 -9
- package/dist/component/{radio-group-field-rac-w8fHpFKJ.js → radio-group-field-rac-DI0UgTBr.js} +12 -12
- package/dist/component/{radio-group-rac-jO8aghii.js → radio-group-rac-D2ESG8J4.js} +1 -1
- package/dist/component/{rating-input-field-rac-BRc2PtqE.js → rating-input-field-rac-BYT2XqOK.js} +26 -26
- package/dist/component/{rating-input-rac-D9zs06xR.js → rating-input-rac-D-5CmVAX.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv3ZmD00.js → rich-content-rac.module-Dp9Advo9.js} +8 -8
- package/dist/component/{rich-text-field-rac-BmWuIfA8.js → rich-text-field-rac-COEUwoXQ.js} +4 -4
- package/dist/component/{rich-text-rac-BnqnrvB1.js → rich-text-rac-CQZLjBQ0.js} +1 -1
- package/dist/component/{service-dropdown-rac-Cl81KfJU.js → service-dropdown-rac-BTtJVFv8.js} +44 -45
- package/dist/component/{services-multi-choice-rac-sQ1NF9hY.js → services-multi-choice-rac-hbY3g0Kb.js} +11 -11
- package/dist/component/{signature-rac-Huairu7V.js → signature-rac-CTCNclwL.js} +67 -67
- package/dist/component/{submit-button-rac-Dpg7N0TG.js → submit-button-rac-kKGeVgsG.js} +25 -25
- package/dist/component/{tags-field-rac-BQ8TEqXH.js → tags-field-rac-CVf7oQr_.js} +35 -35
- package/dist/component/{tags-rac-CFOmyCCc.js → tags-rac-DiX1_nTT.js} +1 -1
- package/dist/component/{text-area-field-rac-DNiMa7d3.js → text-area-field-rac-IhBNXiDl.js} +22 -22
- package/dist/component/{text-area-rac-kLFe-KbZ.js → text-area-rac-DHevCtFF.js} +1 -1
- package/dist/component/{text-input-field-rac-CqENSUUX.js → text-input-field-rac-Da3_wTdh.js} +5 -5
- package/dist/component/{text-input-headless-BdPkEeK2.js → text-input-headless-DcZRRXCp.js} +9 -9
- package/dist/component/{text-input-rac-uYQEfOtE.js → text-input-rac-564LIZ1_.js} +1 -1
- package/dist/component/{time-input-rac-BYoojlJ9.js → time-input-rac-p-Nnsxp_.js} +54 -54
- package/dist/component/{url-input-field-rac-BioH7kuz.js → url-input-field-rac-DjrcpRtm.js} +25 -25
- package/dist/component/{url-input-rac-D2VSSyqW.js → url-input-rac-B3brpyop.js} +1 -1
- package/dist/component/use-dropdown-trigger-class-name-BWTT7ltv.js +117 -0
- package/dist/component/{use-element-state-class-name-oiKCauK-.js → use-element-state-class-name-CUZuhFvZ.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BW3nCyhG.js → use-hoverable-input-class-name-ugX8-g4E.js} +6 -6
- package/dist/component/use-is-forced-open-dropdown-DUZMvWpk.js +48 -0
- package/dist/component/{use-service-options-base-DXG60hA5.js → use-service-options-base-hqO9Ev38.js} +6 -6
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +6 -0
- package/dist/form.d.ts +5 -0
- package/package.json +2 -2
- package/dist/component/dext-radio-group-rac-CtEjnu_X.js +0 -18
- package/dist/component/use-dropdown-option-class-name-BEmvU-Gg.js +0 -115
- package/dist/component/use-dropdown-trigger-class-name-qj9skLWZ.js +0 -40
- package/dist/component/use-text-input-class-name-BhQFcXYH.js +0 -6
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aL as c } from "./form-DHAKwnLt.js";
|
|
2
2
|
var b, d;
|
|
3
|
-
function
|
|
3
|
+
function L() {
|
|
4
4
|
if (d) return b;
|
|
5
5
|
d = 1;
|
|
6
6
|
var r = typeof c == "object" && c && c.Object === Object && c;
|
|
7
7
|
return b = r, b;
|
|
8
8
|
}
|
|
9
9
|
var f, S;
|
|
10
|
-
function
|
|
10
|
+
function k() {
|
|
11
11
|
if (S) return f;
|
|
12
12
|
S = 1;
|
|
13
|
-
var r =
|
|
13
|
+
var r = L(), e = typeof self == "object" && self && self.Object === Object && self, t = r || e || Function("return this")();
|
|
14
14
|
return f = t, f;
|
|
15
15
|
}
|
|
16
16
|
var s, O;
|
|
17
17
|
function R() {
|
|
18
18
|
if (O) return s;
|
|
19
19
|
O = 1;
|
|
20
|
-
var r =
|
|
20
|
+
var r = k(), e = r.Symbol;
|
|
21
21
|
return s = e, s;
|
|
22
22
|
}
|
|
23
23
|
var g, _;
|
|
24
|
-
function
|
|
24
|
+
function I() {
|
|
25
25
|
if (_) return g;
|
|
26
26
|
_ = 1;
|
|
27
27
|
var r = R(), e = Object.prototype, t = e.hasOwnProperty, i = e.toString, o = r ? r.toStringTag : void 0;
|
|
@@ -48,17 +48,17 @@ function P() {
|
|
|
48
48
|
return l = t, l;
|
|
49
49
|
}
|
|
50
50
|
var j, q;
|
|
51
|
-
function
|
|
51
|
+
function N() {
|
|
52
52
|
if (q) return j;
|
|
53
53
|
q = 1;
|
|
54
|
-
var r = R(), e =
|
|
54
|
+
var r = R(), e = I(), t = P(), i = "[object Null]", o = "[object Undefined]", u = r ? r.toStringTag : void 0;
|
|
55
55
|
function n(a) {
|
|
56
56
|
return a == null ? a === void 0 ? o : i : u && u in Object(a) ? e(a) : t(a);
|
|
57
57
|
}
|
|
58
58
|
return j = n, j;
|
|
59
59
|
}
|
|
60
60
|
var v, m;
|
|
61
|
-
function
|
|
61
|
+
function U() {
|
|
62
62
|
if (m) return v;
|
|
63
63
|
m = 1;
|
|
64
64
|
function r(e) {
|
|
@@ -68,7 +68,7 @@ function N() {
|
|
|
68
68
|
return v = r, v;
|
|
69
69
|
}
|
|
70
70
|
var T, p;
|
|
71
|
-
function
|
|
71
|
+
function z() {
|
|
72
72
|
if (p) return T;
|
|
73
73
|
p = 1;
|
|
74
74
|
function r(e) {
|
|
@@ -77,10 +77,10 @@ function U() {
|
|
|
77
77
|
return T = r, T;
|
|
78
78
|
}
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
z as a,
|
|
81
81
|
R as b,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
N as c,
|
|
83
|
+
L as d,
|
|
84
|
+
k as e,
|
|
85
|
+
U as r
|
|
86
86
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { RicosViewer as G } from "@wix/ricos/viewer";
|
|
2
2
|
import L from "classnames";
|
|
3
|
-
import r, { useMemo as q, createContext as
|
|
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 {
|
|
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-DHAKwnLt.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
|
|
9
|
-
import { TextField as fe, Input as le, ComboBoxStateContext 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
|
|
13
|
-
import { V as en, u as tn } from "./use-dropdown-
|
|
8
|
+
import { a as Xt } from "./use-is-forced-open-dropdown-DUZMvWpk.js";
|
|
9
|
+
import { TextField as fe, Input as le, ComboBoxStateContext as We, ComboBox as he, Popover as De, ListBox as Te, ListBoxItem as Se, Group as Lt, Button as Nt } from "react-aria-components";
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-E8WjFr_n.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-BakLOu5E.js";
|
|
12
|
+
import { e as Gt, c as zt, a as Qt, r as gt } from "./isObjectLike-DHcMRYYH.js";
|
|
13
|
+
import { V as Zt, a as en, u as tn } from "./use-dropdown-trigger-class-name-BWTT7ltv.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
18
|
import { s as I } from "./field-rac.module-DfEb7pBp.js";
|
|
19
|
-
import { u as rn } from "./use-text-input-class-name-
|
|
19
|
+
import { u as rn } from "./use-text-input-class-name-wp9dzpEy.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) => {
|
|
@@ -51,7 +51,7 @@ function sn(e, t, o = !1) {
|
|
|
51
51
|
const { country: n, subdivision: a, city: l, addressLine: i, streetAddress: s, addressLine2: d, postalCode: m } = e, u = {};
|
|
52
52
|
return t ? (n && (u.country = n), a && (u.subdivision = a), l && (u.city = l), i ? u.addressLine = i : s != null && s.formattedAddressLine && (u.addressLine = s == null ? void 0 : s.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.streetName = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.streetName = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.streetNumber = s.number)) : (n && (u.country = n), a && (u.subdivision = a), l && (u.city = l), i ? u.address_line = i : s != null && s.formattedAddressLine && (u.address_line = s == null ? void 0 : s.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.street_name = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.street_name = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.street_number = s.number)), u;
|
|
53
53
|
}
|
|
54
|
-
const Ot = /* @__PURE__ */
|
|
54
|
+
const Ot = /* @__PURE__ */ Ve({
|
|
55
55
|
onAddressSelect: () => {
|
|
56
56
|
}
|
|
57
57
|
}), an = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
|
|
@@ -69,7 +69,7 @@ const Ot = /* @__PURE__ */ We({
|
|
|
69
69
|
function Ie() {
|
|
70
70
|
return Ce(Ot);
|
|
71
71
|
}
|
|
72
|
-
const vt = /* @__PURE__ */
|
|
72
|
+
const vt = /* @__PURE__ */ Ve(void 0), ln = ({ children: e, countryCode: t }) => {
|
|
73
73
|
const o = q(() => ({
|
|
74
74
|
countryCode: t
|
|
75
75
|
}), [
|
|
@@ -167,15 +167,15 @@ const dn = (e, t) => e.map((o) => ({
|
|
|
167
167
|
fields: i
|
|
168
168
|
};
|
|
169
169
|
}, yn = () => ({
|
|
170
|
-
country:
|
|
171
|
-
subdivision:
|
|
172
|
-
city:
|
|
173
|
-
address_line:
|
|
174
|
-
address_line_2:
|
|
175
|
-
postal_code:
|
|
176
|
-
street_name:
|
|
177
|
-
street_number:
|
|
178
|
-
apartment:
|
|
170
|
+
country: W(),
|
|
171
|
+
subdivision: W(),
|
|
172
|
+
city: W(),
|
|
173
|
+
address_line: W(),
|
|
174
|
+
address_line_2: W(),
|
|
175
|
+
postal_code: W(),
|
|
176
|
+
street_name: W(),
|
|
177
|
+
street_number: W(),
|
|
178
|
+
apartment: W()
|
|
179
179
|
}), Cn = ({ id: e, target: t, fieldType: o, form: n, country: a, fieldSettings: l, validation: i, required: s }) => {
|
|
180
180
|
const [d] = be(yn), { isExperimentEnabled: m } = ft(), u = m(yt.USE_FIELDS_V2), { getCountryAddressForm: y } = Pt(), { isMobile: C, breakpoint: b } = Ct(), p = y(a), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = q(() => {
|
|
181
181
|
var O;
|
|
@@ -225,7 +225,7 @@ const dn = (e, t) => e.map((o) => ({
|
|
|
225
225
|
]),
|
|
226
226
|
isMultilineAddressField: f
|
|
227
227
|
};
|
|
228
|
-
}, ht = /* @__PURE__ */
|
|
228
|
+
}, ht = /* @__PURE__ */ Ve(void 0), In = ({ children: e, fields: t }) => {
|
|
229
229
|
const o = q(() => ({
|
|
230
230
|
fields: t
|
|
231
231
|
}), [
|
|
@@ -284,7 +284,7 @@ ne.Input = Ln;
|
|
|
284
284
|
ne.Description = ie;
|
|
285
285
|
ne.Error = ce;
|
|
286
286
|
const Ke = ({ enabled: e }) => {
|
|
287
|
-
const { actions: t } = It(), [o, n] = be(
|
|
287
|
+
const { actions: t } = It(), [o, n] = be(W()), a = R(() => n(W()), []);
|
|
288
288
|
return q(() => {
|
|
289
289
|
const { predict: l, getPlace: i, searchByPostalCode: s } = t ?? {};
|
|
290
290
|
if (!(!e || !l || !i || !s))
|
|
@@ -314,7 +314,7 @@ var qe, ct;
|
|
|
314
314
|
function Nn() {
|
|
315
315
|
if (ct) return qe;
|
|
316
316
|
ct = 1;
|
|
317
|
-
var e =
|
|
317
|
+
var e = Gt(), t = function() {
|
|
318
318
|
return e.Date.now();
|
|
319
319
|
};
|
|
320
320
|
return qe = t, qe;
|
|
@@ -345,7 +345,7 @@ var ke, mt;
|
|
|
345
345
|
function vn() {
|
|
346
346
|
if (mt) return ke;
|
|
347
347
|
mt = 1;
|
|
348
|
-
var e =
|
|
348
|
+
var e = zt(), t = Qt(), o = "[object Symbol]";
|
|
349
349
|
function n(a) {
|
|
350
350
|
return typeof a == "symbol" || t(a) && e(a) == o;
|
|
351
351
|
}
|
|
@@ -373,9 +373,9 @@ function Fn() {
|
|
|
373
373
|
}
|
|
374
374
|
return $e = d, $e;
|
|
375
375
|
}
|
|
376
|
-
var
|
|
376
|
+
var Ue, Et;
|
|
377
377
|
function hn() {
|
|
378
|
-
if (Et) return
|
|
378
|
+
if (Et) return Ue;
|
|
379
379
|
Et = 1;
|
|
380
380
|
var e = gt(), t = Nn(), o = Fn(), n = "Expected a function", a = Math.max, l = Math.min;
|
|
381
381
|
function i(s, d, m) {
|
|
@@ -425,7 +425,7 @@ function hn() {
|
|
|
425
425
|
}
|
|
426
426
|
return M.cancel = j, M.flush = B, M;
|
|
427
427
|
}
|
|
428
|
-
return
|
|
428
|
+
return Ue = i, Ue;
|
|
429
429
|
}
|
|
430
430
|
var Dn = hn();
|
|
431
431
|
const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
@@ -490,7 +490,7 @@ const Sn = /* @__PURE__ */ qt(Dn), Rn = (e, t, o = 200) => {
|
|
|
490
490
|
clearPredictions: d
|
|
491
491
|
};
|
|
492
492
|
}, Ye = ({ optionCount: e }) => {
|
|
493
|
-
const t = Ce(
|
|
493
|
+
const t = Ce(We), o = x(t);
|
|
494
494
|
o.current = t;
|
|
495
495
|
const n = x(e);
|
|
496
496
|
return _e(() => {
|
|
@@ -719,7 +719,7 @@ oe.Input = Mn;
|
|
|
719
719
|
oe.Description = ie;
|
|
720
720
|
oe.Error = ce;
|
|
721
721
|
const qn = ({ isOpen: e }) => {
|
|
722
|
-
const t = Ce(
|
|
722
|
+
const t = Ce(We), o = x(!1);
|
|
723
723
|
return _e(() => {
|
|
724
724
|
e && t && !t.isOpen && t.open(null, "manual"), e && (t == null ? void 0 : t.selectionManager.focusedKey) != null && t.selectionManager.setFocusedKey(null), !e && o.current && (t == null || t.close()), o.current = e;
|
|
725
725
|
}, [
|
|
@@ -727,7 +727,7 @@ const qn = ({ isOpen: e }) => {
|
|
|
727
727
|
t
|
|
728
728
|
]), null;
|
|
729
729
|
}, St = ({ readOnly: e, disabled: t } = {}) => {
|
|
730
|
-
const o = Ce(
|
|
730
|
+
const o = Ce(We);
|
|
731
731
|
return R(() => {
|
|
732
732
|
!o || o.isOpen || e || t || o.open(null, "manual");
|
|
733
733
|
}, [
|
|
@@ -859,7 +859,7 @@ const je = ({ children: e, className: t, ...o }) => {
|
|
|
859
859
|
className: t,
|
|
860
860
|
containerPadding: 0,
|
|
861
861
|
offset: 0
|
|
862
|
-
}, /* @__PURE__ */ r.createElement(
|
|
862
|
+
}, /* @__PURE__ */ r.createElement(Zt, {
|
|
863
863
|
isForcedOpen: a
|
|
864
864
|
}, n.map((i) => F(l, {
|
|
865
865
|
key: i.value,
|
|
@@ -880,12 +880,12 @@ Y.Control = ve;
|
|
|
880
880
|
Y.Options = je;
|
|
881
881
|
Y.Description = ie;
|
|
882
882
|
Y.Error = ce;
|
|
883
|
-
const
|
|
884
|
-
function
|
|
883
|
+
const Un = /(\d{7})|(\d{3}-\d{4})/;
|
|
884
|
+
function Vn(e) {
|
|
885
885
|
var t;
|
|
886
|
-
return (t = e.match(
|
|
886
|
+
return (t = e.match(Un)) == null ? void 0 : t[0];
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function Wn({ isAutocompleteEnabled: e }) {
|
|
889
889
|
const t = x({
|
|
890
890
|
hasAddress: !1
|
|
891
891
|
}), o = Ke({
|
|
@@ -893,7 +893,7 @@ function Un({ isAutocompleteEnabled: e }) {
|
|
|
893
893
|
});
|
|
894
894
|
return {
|
|
895
895
|
searchByPostalCode: R(async (a) => {
|
|
896
|
-
const l =
|
|
896
|
+
const l = Vn(a);
|
|
897
897
|
if (l) {
|
|
898
898
|
if (t.current.postalCode === l && t.current.hasAddress)
|
|
899
899
|
return t.current.address;
|
|
@@ -954,11 +954,11 @@ const $ = ({ children: e }) => {
|
|
|
954
954
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, w)
|
|
955
955
|
});
|
|
956
956
|
}, Kn = ({ children: e, value: t, onChange: o, disabled: n, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
957
|
-
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), [y, C] = be(!1), { searchByPostalCode: b } =
|
|
957
|
+
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), [y, C] = be(!1), { searchByPostalCode: b } = Wn({
|
|
958
958
|
isAutocompleteEnabled: y
|
|
959
959
|
}), [p, f] = be(), N = q(() => p ? [
|
|
960
960
|
{
|
|
961
|
-
id:
|
|
961
|
+
id: W(),
|
|
962
962
|
label: p.formattedAddress || ""
|
|
963
963
|
}
|
|
964
964
|
] : [], [
|
|
@@ -1057,8 +1057,8 @@ $.Control = Je;
|
|
|
1057
1057
|
$.Options = Xe;
|
|
1058
1058
|
$.Description = ie;
|
|
1059
1059
|
$.Error = ce;
|
|
1060
|
-
const
|
|
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,
|
|
1060
|
+
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), S = E(e, U.Input), h = E(e, U.Options), O = E(e, U.Description), A = E(e, U.Error);
|
|
1062
1062
|
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
1063
1063
|
fieldId: t,
|
|
1064
1064
|
renderLabel: () => F(N, {
|
|
@@ -1098,7 +1098,7 @@ const V = ({ children: e }) => {
|
|
|
1098
1098
|
enabled: !0
|
|
1099
1099
|
}), { predictions: b, updatePredictions: p, clearPredictions: f } = Dt({
|
|
1100
1100
|
atlas: C
|
|
1101
|
-
}), N = E(e,
|
|
1101
|
+
}), N = E(e, U.Input), S = E(e, U.Options), h = q(() => b.reduce((g, v) => (v.searchId && v.description && g.push({
|
|
1102
1102
|
id: v.searchId,
|
|
1103
1103
|
label: v.description
|
|
1104
1104
|
}), g), []), [
|
|
@@ -1192,11 +1192,11 @@ const V = ({ children: e }) => {
|
|
|
1192
1192
|
}, n);
|
|
1193
1193
|
};
|
|
1194
1194
|
Ge.Option = Xn;
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1195
|
+
U.Label = de;
|
|
1196
|
+
U.Input = Jn;
|
|
1197
|
+
U.Options = Ge;
|
|
1198
|
+
U.Description = ie;
|
|
1199
|
+
U.Error = ce;
|
|
1200
1200
|
const se = ({ children: e }) => {
|
|
1201
1201
|
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(), C = pe("streetNumber"), b = E(e, se.Label), p = E(e, se.Input), f = E(e, se.Description), N = E(e, se.Error);
|
|
1202
1202
|
return /* @__PURE__ */ r.createElement(u, {
|
|
@@ -1348,12 +1348,12 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1348
1348
|
...cr
|
|
1349
1349
|
}), [
|
|
1350
1350
|
h
|
|
1351
|
-
]), { isExperimentEnabled: A } = ft(), w = A(yt.STREETLESS_LOCALITY_FALLBACK), { validateFields: _ } = $t(), g =
|
|
1351
|
+
]), { isExperimentEnabled: A } = ft(), w = A(yt.STREETLESS_LOCALITY_FALLBACK), { validateFields: _ } = $t(), g = Ut(), v = It(), me = q(() => ({
|
|
1352
1352
|
...v,
|
|
1353
1353
|
actions: {
|
|
1354
1354
|
predict: Kt,
|
|
1355
|
-
getPlace:
|
|
1356
|
-
searchByPostalCode:
|
|
1355
|
+
getPlace: Wt,
|
|
1356
|
+
searchByPostalCode: Vt,
|
|
1357
1357
|
...v.actions
|
|
1358
1358
|
}
|
|
1359
1359
|
}), [
|
|
@@ -1367,10 +1367,10 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1367
1367
|
fieldSettings: m,
|
|
1368
1368
|
validation: y,
|
|
1369
1369
|
required: p
|
|
1370
|
-
}), M = R((
|
|
1370
|
+
}), M = R((V) => {
|
|
1371
1371
|
if (!n)
|
|
1372
1372
|
return;
|
|
1373
|
-
const X = sn(
|
|
1373
|
+
const X = sn(V, B, w), Re = {
|
|
1374
1374
|
...X,
|
|
1375
1375
|
[ye.COUNTRY]: X[ye.COUNTRY] ?? n[ye.COUNTRY]
|
|
1376
1376
|
};
|
|
@@ -1380,8 +1380,8 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1380
1380
|
n,
|
|
1381
1381
|
B,
|
|
1382
1382
|
w
|
|
1383
|
-
]), D = R((
|
|
1384
|
-
if (B &&
|
|
1383
|
+
]), D = R((V, X) => {
|
|
1384
|
+
if (B && V === ye.COUNTRY && (n == null ? void 0 : n[V]) !== X) {
|
|
1385
1385
|
a == null || a({
|
|
1386
1386
|
[ye.COUNTRY]: X
|
|
1387
1387
|
});
|
|
@@ -1389,19 +1389,19 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1389
1389
|
}
|
|
1390
1390
|
a == null || a({
|
|
1391
1391
|
...n,
|
|
1392
|
-
[
|
|
1392
|
+
[V]: X
|
|
1393
1393
|
});
|
|
1394
1394
|
}, [
|
|
1395
1395
|
a,
|
|
1396
1396
|
n,
|
|
1397
1397
|
B
|
|
1398
|
-
]), J = R(async (
|
|
1399
|
-
...
|
|
1398
|
+
]), J = R(async (V) => _(B ? [
|
|
1399
|
+
...V,
|
|
1400
1400
|
{
|
|
1401
1401
|
path: `${C}/${ye.COUNTRY}`,
|
|
1402
1402
|
value: n == null ? void 0 : n.country
|
|
1403
1403
|
}
|
|
1404
|
-
] :
|
|
1404
|
+
] : V), [
|
|
1405
1405
|
n,
|
|
1406
1406
|
C,
|
|
1407
1407
|
_,
|
|
@@ -1409,7 +1409,7 @@ const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("cit
|
|
|
1409
1409
|
]);
|
|
1410
1410
|
Yt(t, () => {
|
|
1411
1411
|
var Re;
|
|
1412
|
-
const
|
|
1412
|
+
const V = s == null ? void 0 : s[0], X = (Re = j == null ? void 0 : j.fields) == null ? void 0 : Re.find((at) => "target" in at && at.target === (V == null ? void 0 : V.errorPath));
|
|
1413
1413
|
return X == null ? void 0 : X.id;
|
|
1414
1414
|
});
|
|
1415
1415
|
const Ee = Xt(t), Ne = F(E(e, c.Country), {
|
|
@@ -1474,7 +1474,7 @@ c.City = oe;
|
|
|
1474
1474
|
c.AddressLine = k;
|
|
1475
1475
|
c.AddressLine2 = ne;
|
|
1476
1476
|
c.PostalCode = $;
|
|
1477
|
-
c.StreetName =
|
|
1477
|
+
c.StreetName = U;
|
|
1478
1478
|
c.StreetNumber = se;
|
|
1479
1479
|
c.Apartment = re;
|
|
1480
1480
|
const mr = "_postalCodeControl_1tire_1", pr = "_comboControl_1tire_5", Er = "_comboTrigger_1tire_19", Ae = {
|
|
@@ -1482,7 +1482,7 @@ const mr = "_postalCodeControl_1tire_1", pr = "_comboControl_1tire_5", Er = "_co
|
|
|
1482
1482
|
comboControl: pr,
|
|
1483
1483
|
comboTrigger: Er
|
|
1484
1484
|
}, wr = () => {
|
|
1485
|
-
const e =
|
|
1485
|
+
const e = en(Ae.comboControl), t = rn(), o = tn(we);
|
|
1486
1486
|
return /* @__PURE__ */ r.createElement(c, null, /* @__PURE__ */ r.createElement(c.Country, null, /* @__PURE__ */ r.createElement(c.Country.Label, {
|
|
1487
1487
|
className: L(z, I.label)
|
|
1488
1488
|
}, /* @__PURE__ */ r.createElement(c.Country.Label.Required, {
|
package/dist/component/{number-input-field-rac-CL9iXKIf.js → number-input-field-rac-uVJ3SBv2.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import r, { useState as
|
|
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 {
|
|
5
|
+
import { bo as _, bl as S, by as G, bq as J, S as K, a0 as W, H as X, v as Y } from "./form-DHAKwnLt.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-E8WjFr_n.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-BakLOu5E.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 d } from "./field-rac.module-DfEb7pBp.js";
|
|
13
|
+
import { u as se } from "./use-text-input-class-name-wp9dzpEy.js";
|
|
14
14
|
const e = ({ children: t }) => {
|
|
15
|
-
var F,
|
|
16
|
-
const { id: a, value: s, onChange: l, disabled:
|
|
15
|
+
var F, L, R;
|
|
16
|
+
const { id: a, value: s, onChange: l, disabled: p, required: b, readOnly: o, onBlur: E, onFocus: f, FieldLayout: m, hasError: u, validation: n } = _(), { labelId: y } = S(), D = ((F = n == null ? void 0 : n.number) == null ? void 0 : F.multipleOf) || 1, A = (L = n == null ? void 0 : n.number) == null ? void 0 : L.maximum, g = (R = n == null ? void 0 : n.number) == null ? void 0 : R.minimum, 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;
|
|
@@ -24,37 +24,37 @@ const e = ({ children: t }) => {
|
|
|
24
24
|
D,
|
|
25
25
|
l
|
|
26
26
|
]);
|
|
27
|
-
return
|
|
27
|
+
return U(() => {
|
|
28
28
|
I(O(s));
|
|
29
29
|
}, [
|
|
30
30
|
s
|
|
31
31
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
32
32
|
fieldId: a,
|
|
33
|
-
renderLabel: () =>
|
|
33
|
+
renderLabel: () => V,
|
|
34
34
|
renderInput: () => /* @__PURE__ */ r.createElement(j, {
|
|
35
|
-
"aria-labelledby":
|
|
36
|
-
value:
|
|
35
|
+
"aria-labelledby": y,
|
|
36
|
+
value: x,
|
|
37
37
|
onChange: B,
|
|
38
|
-
isDisabled:
|
|
38
|
+
isDisabled: p,
|
|
39
39
|
isRequired: b,
|
|
40
40
|
isReadOnly: o,
|
|
41
41
|
isInvalid: u,
|
|
42
|
-
onBlur:
|
|
42
|
+
onBlur: T,
|
|
43
43
|
onFocus: f,
|
|
44
|
-
minValue:
|
|
45
|
-
maxValue:
|
|
46
|
-
},
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
44
|
+
minValue: g ?? void 0,
|
|
45
|
+
maxValue: A ?? void 0
|
|
46
|
+
}, h),
|
|
47
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, k, M)
|
|
48
48
|
});
|
|
49
49
|
}, le = ({ className: t }) => {
|
|
50
50
|
var u;
|
|
51
|
-
const { t: a } =
|
|
51
|
+
const { t: a } = G(), { inputId: s, ariaDescribedBy: l } = S(), { id: p, placeholder: b, validation: o, label: E, required: f } = _();
|
|
52
52
|
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
53
|
-
const m =
|
|
53
|
+
const m = $(null);
|
|
54
54
|
return J(() => {
|
|
55
55
|
var n;
|
|
56
56
|
(n = m.current) == null || n.focus();
|
|
57
|
-
},
|
|
57
|
+
}, p), /* @__PURE__ */ r.createElement(z, {
|
|
58
58
|
ref: m,
|
|
59
59
|
id: s,
|
|
60
60
|
"aria-describedby": l,
|
|
@@ -73,20 +73,20 @@ e.Error = w;
|
|
|
73
73
|
const O = (t) => te(t) ?? NaN, oe = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(P, {
|
|
74
74
|
content: t,
|
|
75
75
|
locale: a
|
|
76
|
-
}),
|
|
76
|
+
}), Le = () => {
|
|
77
77
|
const t = se();
|
|
78
78
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
79
|
-
className: i(K,
|
|
79
|
+
className: i(K, d.label)
|
|
80
80
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
81
|
-
className: i(W,
|
|
81
|
+
className: i(W, d.requiredMark)
|
|
82
82
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
83
83
|
className: t
|
|
84
84
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
85
|
-
className: i(X,
|
|
85
|
+
className: i(X, d.error)
|
|
86
86
|
}, /* @__PURE__ */ r.createElement(ae, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
87
|
-
className: i(Y,
|
|
87
|
+
className: i(Y, d.description)
|
|
88
88
|
}, oe));
|
|
89
89
|
};
|
|
90
90
|
export {
|
|
91
|
-
|
|
91
|
+
Le as N
|
|
92
92
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as N, useRef as x } from "react";
|
|
2
2
|
import { RicosViewer as O } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import { TextField as k, Group as q, Input as
|
|
4
|
+
import { bo as E, bl as I, bq as A, by as B, S as v, a0 as V, H as P, v as M } from "./form-DHAKwnLt.js";
|
|
5
|
+
import { TextField as k, Group as q, Input as H, Button as U } from "react-aria-components";
|
|
6
6
|
import { f as u, a as b } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
9
|
-
import { E as
|
|
10
|
-
import { H as
|
|
7
|
+
import { D as j, E as W } from "./field-error-headless-E8WjFr_n.js";
|
|
8
|
+
import { L as Z } from "./field-label-headless-BakLOu5E.js";
|
|
9
|
+
import { E as G } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-DfEb7pBp.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as $ } from "./use-text-input-class-name-wp9dzpEy.js";
|
|
13
13
|
const t = ({ children: o, className: r }) => {
|
|
14
|
-
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, autoComplete:
|
|
15
|
-
return /* @__PURE__ */ e.createElement(
|
|
14
|
+
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, autoComplete: y, FieldLayout: _ } = E(), { labelId: R } = I(), [D, F] = N(!1), L = u(o, t.Label), T = u(o, t.Control), w = u(o, t.Description), S = u(o, t.Error);
|
|
15
|
+
return /* @__PURE__ */ e.createElement(_, {
|
|
16
16
|
fieldId: l,
|
|
17
17
|
renderLabel: () => L,
|
|
18
18
|
renderInput: () => /* @__PURE__ */ e.createElement(k, {
|
|
19
|
-
autoComplete:
|
|
19
|
+
autoComplete: y,
|
|
20
20
|
"aria-labelledby": R,
|
|
21
21
|
value: s ?? "",
|
|
22
22
|
onChange: c,
|
|
@@ -29,9 +29,9 @@ const t = ({ children: o, className: r }) => {
|
|
|
29
29
|
className: r
|
|
30
30
|
}, b(T, {
|
|
31
31
|
isVisible: D,
|
|
32
|
-
onToggleVisibility: () => F((
|
|
32
|
+
onToggleVisibility: () => F((h) => !h)
|
|
33
33
|
})),
|
|
34
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w,
|
|
34
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, w, S)
|
|
35
35
|
});
|
|
36
36
|
}, z = ({ children: o, className: r, ...l }) => {
|
|
37
37
|
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(o, t.Input), i = u(o, t.Toggle);
|
|
@@ -50,7 +50,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
50
50
|
return A(() => {
|
|
51
51
|
var i;
|
|
52
52
|
(i = a.current) == null || i.focus();
|
|
53
|
-
}, s), /* @__PURE__ */ e.createElement(
|
|
53
|
+
}, s), /* @__PURE__ */ e.createElement(H, {
|
|
54
54
|
ref: a,
|
|
55
55
|
id: n,
|
|
56
56
|
type: l ? "text" : "password",
|
|
@@ -60,7 +60,7 @@ const t = ({ children: o, className: r }) => {
|
|
|
60
60
|
});
|
|
61
61
|
}, K = ({ className: o, showPasswordTooltipText: r, hidePasswordTooltipText: l, children: s, ...c }) => {
|
|
62
62
|
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l : r;
|
|
63
|
-
return /* @__PURE__ */ e.createElement(
|
|
63
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
64
64
|
type: "button",
|
|
65
65
|
isDisabled: a,
|
|
66
66
|
onPress: m,
|
|
@@ -71,12 +71,12 @@ const t = ({ children: o, className: r }) => {
|
|
|
71
71
|
isVisible: n
|
|
72
72
|
}));
|
|
73
73
|
};
|
|
74
|
-
t.Label =
|
|
74
|
+
t.Label = Z;
|
|
75
75
|
t.Control = z;
|
|
76
76
|
t.Input = J;
|
|
77
77
|
t.Toggle = K;
|
|
78
|
-
t.Description =
|
|
79
|
-
t.Error =
|
|
78
|
+
t.Description = j;
|
|
79
|
+
t.Error = W;
|
|
80
80
|
const X = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
81
81
|
viewBox: "0 0 24 24",
|
|
82
82
|
width: "20",
|
|
@@ -119,22 +119,22 @@ const X = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
119
119
|
content: o,
|
|
120
120
|
locale: r
|
|
121
121
|
}), re = () => {
|
|
122
|
-
const { t: o } = B(), r =
|
|
122
|
+
const { t: o } = B(), r = $(g.control);
|
|
123
123
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
124
|
-
className: d(
|
|
124
|
+
className: d(v, p.label)
|
|
125
125
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
126
|
-
className: d(
|
|
126
|
+
className: d(V, p.requiredMark)
|
|
127
127
|
})), /* @__PURE__ */ e.createElement(t.Control, {
|
|
128
128
|
className: r
|
|
129
129
|
}, /* @__PURE__ */ e.createElement(t.Input, {
|
|
130
|
-
className: d(p.innerInput,
|
|
130
|
+
className: d(p.innerInput, Q)
|
|
131
131
|
}), /* @__PURE__ */ e.createElement(t.Toggle, {
|
|
132
132
|
className: g.toggleButton,
|
|
133
133
|
showPasswordTooltipText: o("forms.widget.modals.show-password-tooltip"),
|
|
134
134
|
hidePasswordTooltipText: o("forms.widget.modals.hide-password-tooltip")
|
|
135
135
|
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(Y, null) : /* @__PURE__ */ e.createElement(X, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
136
136
|
className: d(P, p.error)
|
|
137
|
-
}, /* @__PURE__ */ e.createElement(
|
|
137
|
+
}, /* @__PURE__ */ e.createElement(G, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
138
138
|
className: d(M, p.description)
|
|
139
139
|
}, oe));
|
|
140
140
|
}, ge = () => /* @__PURE__ */ e.createElement(re, null);
|