@wix/form-elements 1.106.0 → 1.108.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-D2F4vgf1.js → appointment-rac-ZAp8oWbK.js} +289 -290
- package/dist/component/{bookings-address-rac-_5S8J8_i.js → bookings-address-rac-x-Az7vHf.js} +1 -1
- package/dist/component/{bookings-email-rac-6vmDR9nS.js → bookings-email-rac-MoF_CaqB.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DtTJ4T2K.js → bookings-first-name-rac-CWh3Rb0M.js} +1 -1
- package/dist/component/{bookings-header-rac-B3dsEwzR.js → bookings-header-rac-BVTiXUWk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-B3idkbi8.js → bookings-last-name-rac-kXRRlyHl.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CrRBcQwT.js → bookings-login-bar-rac-C4Zr6kXE.js} +23 -24
- package/dist/component/{bookings-phone-rac-BE0yWNnj.js → bookings-phone-rac-2rz1m_xi.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CYo1l0-6.js → bookings-rich-text-rac-BEjGypQw.js} +1 -1
- package/dist/component/{checkbox-field-rac-boTtXVEt.js → checkbox-field-rac-DwEQLIaz.js} +66 -67
- package/dist/component/{checkbox-group-field-headless-DnkUvDm8.js → checkbox-group-field-headless-BsOww_QB.js} +37 -37
- package/dist/component/{checkbox-group-field-rac-DrDTgHMg.js → checkbox-group-field-rac-DTcZcVS6.js} +6 -6
- package/dist/component/{checkbox-group-rac-v3ozUBpo.js → checkbox-group-rac-DQsML-pW.js} +1 -1
- package/dist/component/{checkbox-rac-YSLE-RnG.js → checkbox-rac-irEBBOxP.js} +1 -1
- package/dist/component/{contacts-address-rac-C653yaHZ.js → contacts-address-rac-B5bSAYrm.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BeAQ6shx.js → contacts-birthdate-rac-DyScj8f4.js} +1 -1
- package/dist/component/{contacts-company-rac-BglKOoTG.js → contacts-company-rac-C5X9-jXa.js} +1 -1
- package/dist/component/{contacts-email-rac-D6m7ynfc.js → contacts-email-rac-B0vkfmrS.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Dgxn0tUJ.js → contacts-first-name-rac-Cfil3U_e.js} +1 -1
- package/dist/component/{contacts-last-name-rac-1UyIuRKH.js → contacts-last-name-rac-CtPLE-7-.js} +1 -1
- package/dist/component/{contacts-phone-rac-BQ77BlW4.js → contacts-phone-rac-YkzsAoBZ.js} +1 -1
- package/dist/component/{contacts-position-rac-BUDUv7lv.js → contacts-position-rac-BS4j8QC-.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DdtA0qKW.js → contacts-subscribe-rac-z_9VsEZL.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WUaKcNl0.js → contacts-tax-id-rac-WFkmKyZv.js} +1 -1
- package/dist/component/{date-availability-XjBFq8jt.js → date-availability-NN3rxosk.js} +1 -1
- package/dist/component/{date-input-field-rac-aY2zuuKs.js → date-input-field-rac-mdhEC3oq.js} +88 -89
- package/dist/component/{date-input-rac-DRiP2_97.js → date-input-rac-CGciuoTx.js} +1 -1
- package/dist/component/{date-picker-field-rac-Bzl-d3Uj.js → date-picker-field-rac-CRZVODfF.js} +90 -91
- package/dist/component/{date-picker-rac-DHHUh8vn.js → date-picker-rac-Bfbvjy8W.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DP_StuLr.js → date-time-input-field-rac-TDWBXZ44.js} +76 -77
- package/dist/component/{date-time-input-rac-B11KIxsf.js → date-time-input-rac-DY0qdSix.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BHZBqyWv.js → dext-checkbox-group-rac-BFGM7SOt.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BIlAqEvV.js → dext-checkbox-rac-DPZvTeUZ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CHBXNrZi.js → dext-date-picker-rac-Xd5kojsQ.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BYtliKry.js → dext-date-time-input-rac-C0RIdxJW.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C2VPSFV5.js → dext-dropdown-rac-D1m8vJvm.js} +1 -1
- package/dist/component/{dext-email-rac-Fnb0Ggcs.js → dext-email-rac-BC81RFYY.js} +1 -1
- package/dist/component/{dext-number-input-rac-DopfSyFi.js → dext-number-input-rac-Z_ih9FfX.js} +1 -1
- package/dist/component/{dext-phone-rac-Rn4i_2rc.js → dext-phone-rac-s3BOnXuI.js} +1 -1
- package/dist/component/{dext-radio-group-rac-bNaskJpK.js → dext-radio-group-rac-CL3jcezs.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DL6ZZd7d.js → dext-rating-input-rac-wz1EyP5b.js} +1 -1
- package/dist/component/{dext-tags-rac-TsUPoImO.js → dext-tags-rac-BY4Rf2BP.js} +2 -2
- package/dist/component/{dext-text-area-rac-BIuY7LTd.js → dext-text-area-rac-DRJzlsq8.js} +1 -1
- package/dist/component/{dext-text-input-rac-CSYPW0Qi.js → dext-text-input-rac-BGcRNNAi.js} +1 -1
- package/dist/component/{dext-url-input-rac-_g0lqGfW.js → dext-url-input-rac-CRAIm8yp.js} +1 -1
- package/dist/component/{donation-rac-BYKFtsyR.js → donation-rac-BlTfOIlE.js} +83 -84
- package/dist/component/{dropdown-field-headless-CBaqlNZi.js → dropdown-field-headless-DhzRAMcM.js} +12 -12
- package/dist/component/{dropdown-field-rac-CCAGSMm3.js → dropdown-field-rac-DXyY5we-.js} +5 -5
- package/dist/component/{dropdown-rac-C_EqUsZ1.js → dropdown-rac-C6YM6qxm.js} +1 -1
- package/dist/component/{ecom-address-rac-Bw9eH0iF.js → ecom-address-rac-CAdr7wya.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B5PVOO2a.js → ecom-subscription-checkbox-rac-Z2VMuCbt.js} +6 -6
- package/dist/component/{email-input-field-rac-B2kqQ6yo.js → email-input-field-rac-DpkfunVK.js} +53 -54
- package/dist/component/{events-repeater-rac--4OnUxWE.js → events-repeater-rac-CuJkdrPo.js} +61 -62
- package/dist/component/{events-rsvp-rac-CczCoo3T.js → events-rsvp-rac-BKWlSeQ9.js} +8 -8
- package/dist/component/{field-error-headless-D3-1L5sf.js → field-error-headless-tsg9FQ-_.js} +12 -12
- package/dist/component/{field-label-headless-Du4ckIVy.js → field-label-headless-CB8dEat8.js} +11 -11
- package/dist/component/{file-upload-rac-DbdkUbWM.js → file-upload-rac-ZdgYt646.js} +67 -68
- package/dist/component/{fixed-payment-rac-f9-01iDN.js → fixed-payment-rac-CuIQEeHh.js} +20 -21
- package/dist/component/{form-DQauhsho.js → form-0jt4L5xo.js} +3045 -2896
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/header-field-rac-CWVGzxKb.js +24 -0
- package/dist/component/{header-rac-CR9T3Pnu.js → header-rac-D6KsV-ko.js} +1 -1
- package/dist/component/{image-choice-rac-DJ_8v467.js → image-choice-rac-CUCyVS8c.js} +29 -30
- package/dist/component/{index-BB7d_9Dv.js → index-TJSnVtCO.js} +72 -72
- package/dist/component/{index-CcUTIUWM.js → index-iOqQidgV.js} +12 -12
- package/dist/component/{isObjectLike-xvPa_08X.js → isObjectLike-DQbx8r1c.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CyaFOloE.js → multiline-address-field-rac-DtZ1NTfD.js} +186 -187
- package/dist/component/{multiline-address-rac-CaHGUN_f.js → multiline-address-rac-ub-_XzHU.js} +1 -1
- package/dist/component/number-input-field-rac-DLItn4DK.js +92 -0
- package/dist/component/{number-input-rac-DMKX6nhk.js → number-input-rac-UuxJzqEx.js} +1 -1
- package/dist/component/{password-rac-0RUXPAn6.js → password-rac-Di6q96Rn.js} +37 -38
- package/dist/component/{payment-input-rac-CHSZ3-Lt.js → payment-input-rac-CG6c4-Ge.js} +52 -53
- package/dist/component/{phone-input-field-rac-JmIFcP1e.js → phone-input-field-rac-D4JphCuT.js} +75 -76
- package/dist/component/{phone-rac-BLRnAPXP.js → phone-rac-_vDw2usa.js} +1 -1
- package/dist/component/{product-list-rac-BkF5tDwt.js → product-list-rac-CgxRlj1f.js} +73 -74
- package/dist/component/{quiz-radio-group-rac-32cCMTUS.js → quiz-radio-group-rac-bi26aGxN.js} +1 -1
- package/dist/component/{radio-button-module-classes-IOulhuSH.js → radio-button-module-classes-DDJq2ESf.js} +33 -33
- package/dist/component/{radio-group-field-rac-CJwku6e0.js → radio-group-field-rac-D1aMVO6l.js} +4 -4
- package/dist/component/{radio-group-rac-BiW-9Abj.js → radio-group-rac-HKC85M6t.js} +1 -1
- package/dist/component/{rating-input-field-rac-B9cwaROK.js → rating-input-field-rac-CpRehxFB.js} +42 -43
- package/dist/component/{rating-input-rac-BpwlNvzQ.js → rating-input-rac-BMuCZ3oj.js} +1 -1
- package/dist/component/{rich-content-rac.module-B1uyPmtK.js → rich-content-rac.module-mZ6xoAOd.js} +4 -4
- package/dist/component/rich-text-field-rac-CUK8V8Kf.js +21 -0
- package/dist/component/{rich-text-rac-VfeZxS27.js → rich-text-rac-B-7sR2FJ.js} +1 -1
- package/dist/component/{service-dropdown-rac-BCfs8IhW.js → service-dropdown-rac-1DDNT5bn.js} +43 -44
- package/dist/component/{services-multi-choice-rac-CCqdF_7P.js → services-multi-choice-rac-CB-6dwxz.js} +21 -22
- package/dist/component/{signature-rac-DOyMo3u0.js → signature-rac-7XBci6P2.js} +35 -36
- package/dist/component/{submit-button-rac-C2uA5DeE.js → submit-button-rac-B1-Mk8Gg.js} +21 -22
- package/dist/component/{tags-field-rac-C_uIw2by.js → tags-field-rac-CQ9Y7mq-.js} +49 -50
- package/dist/component/{tags-rac-1pQ-fpe_.js → tags-rac-Visic-Ml.js} +1 -1
- package/dist/component/{text-area-field-rac-DqlOkm7e.js → text-area-field-rac-C8fP1g-w.js} +31 -32
- package/dist/component/{text-area-rac-DPdkrFcH.js → text-area-rac-B6yZxzxm.js} +1 -1
- package/dist/component/{text-input-field-rac-CmXm6r1w.js → text-input-field-rac-CNjbOxD1.js} +5 -5
- package/dist/component/{text-input-headless-DD__2DFf.js → text-input-headless-Bm8PJGep.js} +12 -12
- package/dist/component/{text-input-rac-DRHyQEH7.js → text-input-rac-BEPC1Z-4.js} +1 -1
- package/dist/component/{time-input-rac-BJPIymQY.js → time-input-rac-3m6C_Jp5.js} +41 -42
- package/dist/component/url-input-field-rac-CIk_6Lf6.js +74 -0
- package/dist/component/{url-input-rac-C0ChQUzq.js → url-input-rac-DyVoygXH.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-McG3ayOT.js +21 -0
- package/dist/component/{use-element-state-class-name-BatTc2bw.js → use-element-state-class-name-B9MBWX44.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-B0jiPTmS.js → use-is-forced-open-dropdown-r5G_sZsO.js} +7 -7
- package/dist/component/{use-service-options-base-oeE7xszw.js → use-service-options-base-hcbkvhpw.js} +7 -7
- package/dist/component/use-text-input-class-name-SnurFqAr.js +23 -0
- package/dist/form.d.ts +3 -1
- package/package.json +2 -2
- package/dist/component/form-element-classes-bLFmhsKw.js +0 -137
- package/dist/component/header-field-rac-DamDk5BR.js +0 -25
- package/dist/component/number-input-field-rac-BuYUzDWV.js +0 -93
- package/dist/component/rich-text-field-rac-C_qE7Ykg.js +0 -22
- package/dist/component/url-input-field-rac-CFDYkZ6I.js +0 -75
- package/dist/component/use-dropdown-option-class-name-3L5ZmNLK.js +0 -21
- package/dist/component/use-text-input-class-name-LQ5S-NLh.js +0 -24
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import s, { useRef as W, useCallback as I, useState as
|
|
1
|
+
import s, { useRef as W, useCallback as I, useState as K, useEffect as Q, useMemo as De, isValidElement as we } from "react";
|
|
2
2
|
import { RicosViewer as Re } from "@wix/ricos/viewer";
|
|
3
3
|
import v from "classnames";
|
|
4
4
|
import { useHover as ve, useFocusRing as xe, mergeProps as Se } from "react-aria";
|
|
5
5
|
import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as _e, RadioField as Pe, RadioButton as Ne } from "react-aria-components";
|
|
6
6
|
import he from "signature_pad";
|
|
7
|
-
import {
|
|
7
|
+
import { az as Ue, b1 as Oe, aZ as Be, bd as ge, E as ce, a2 as G, b5 as A, b2 as H, b7 as Ee, bf as Me, H as ue, T as We, G as B, _ as He, u as Ye, p as ke } from "./form-0jt4L5xo.js";
|
|
8
8
|
import { f as T, a as F } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { D as
|
|
10
|
-
import { L as
|
|
11
|
-
import { D as
|
|
12
|
-
import { E as
|
|
13
|
-
import { s as
|
|
14
|
-
import { v as ue, J as Ve, u as B, Q as ze, o as Ze, j as Xe } from "./form-element-classes-bLFmhsKw.js";
|
|
9
|
+
import { D as $e, E as ze } from "./field-error-headless-tsg9FQ-_.js";
|
|
10
|
+
import { L as Ve } from "./field-label-headless-CB8dEat8.js";
|
|
11
|
+
import { D as Ze } from "./data-hooks-Dkw1pbRj.js";
|
|
12
|
+
import { E as Xe } from "./error-icon-hZxQ6DEy.js";
|
|
13
|
+
import { s as z } from "./field-rac.module-B4l_0KRU.js";
|
|
15
14
|
const Ge = typeof s.useId == "function" ? s.useId : () => W(Ue()).current;
|
|
16
15
|
var w = /* @__PURE__ */ (function(e) {
|
|
17
16
|
return e.TEXT = "text/plain", e.POINTS = "points/json", e;
|
|
@@ -43,7 +42,7 @@ const qe = (e) => {
|
|
|
43
42
|
]);
|
|
44
43
|
};
|
|
45
44
|
function je(e) {
|
|
46
|
-
const a =
|
|
45
|
+
const a = V(1, 1).getContext("2d");
|
|
47
46
|
a.fillStyle = e, a.fillRect(0, 0, 1, 1);
|
|
48
47
|
const n = a.getImageData(0, 0, 1, 1);
|
|
49
48
|
return n.data[0] * 65536 + n.data[1] * 256 + n.data[2];
|
|
@@ -54,14 +53,14 @@ const Je = (e, t) => {
|
|
|
54
53
|
const o = (r * t.width + n) * 4;
|
|
55
54
|
return t.data[o] * 65536 + t.data[o + 1] * 256 + t.data[o + 2] === a;
|
|
56
55
|
};
|
|
57
|
-
},
|
|
56
|
+
}, Ke = (e) => (t, a) => {
|
|
58
57
|
const n = (a * e.width + t) * 4;
|
|
59
58
|
return e.data[n + 3] === 0;
|
|
60
59
|
};
|
|
61
60
|
function J(e, t) {
|
|
62
61
|
const a = e.getContext("2d", {
|
|
63
62
|
willReadFrequently: !0
|
|
64
|
-
}), n = e.width, r = e.height, o = a.getImageData(0, 0, n, r), i = t ? Je(t, o) :
|
|
63
|
+
}), n = e.width, r = e.height, o = a.getImageData(0, 0, n, r), i = t ? Je(t, o) : Ke(o);
|
|
65
64
|
let l = n + 1, c = -1, d = r + 1, u = -1, f = 0, m = 0;
|
|
66
65
|
for (m = 0; m < r; m++)
|
|
67
66
|
for (f = 0; f < n; f++)
|
|
@@ -72,7 +71,7 @@ function J(e, t) {
|
|
|
72
71
|
const p = a.getImageData(l, d, h, E), L = document.createElement("canvas"), y = L.getContext("2d");
|
|
73
72
|
return L.width = h, L.height = E, t ? (y.fillStyle = t, y.fillRect(0, 0, h, E)) : y.clearRect(0, 0, h, E), y.putImageData(p, 0, 0), L;
|
|
74
73
|
}
|
|
75
|
-
function
|
|
74
|
+
function V(e, t, a) {
|
|
76
75
|
const n = document.createElement("canvas");
|
|
77
76
|
if (n.width = e, n.height = t, a) {
|
|
78
77
|
const r = n.getContext("2d", {
|
|
@@ -82,11 +81,11 @@ function z(e, t, a) {
|
|
|
82
81
|
}
|
|
83
82
|
return n;
|
|
84
83
|
}
|
|
85
|
-
function
|
|
84
|
+
function Qe(e, t) {
|
|
86
85
|
return new Promise((a, n) => {
|
|
87
86
|
const r = new Image();
|
|
88
87
|
r.onload = () => {
|
|
89
|
-
const o =
|
|
88
|
+
const o = V(r.width, r.height), i = o.getContext("2d", {
|
|
90
89
|
willReadFrequently: !0
|
|
91
90
|
});
|
|
92
91
|
i == null || i.drawImage(r, 0, 0), a(o);
|
|
@@ -94,7 +93,7 @@ function Ke(e, t) {
|
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
95
|
function de(e, t, a, n) {
|
|
97
|
-
const r = e.width, o = e.height, i = 1, l = a / o, c = Math.min(l, i), d = r * c, u = o * c, f =
|
|
96
|
+
const r = e.width, o = e.height, i = 1, l = a / o, c = Math.min(l, i), d = r * c, u = o * c, f = V(d, u), m = f.getContext("2d");
|
|
98
97
|
return n && m && (m.fillStyle = n, m.fillRect(0, 0, d, u)), m == null || m.drawImage(e, 0, 0, r, o, 0, 0, d, u), f;
|
|
99
98
|
}
|
|
100
99
|
function me(e, t) {
|
|
@@ -187,7 +186,7 @@ async function ot(e, t) {
|
|
|
187
186
|
return e;
|
|
188
187
|
const n = a.mimeType;
|
|
189
188
|
if (n === w.TEXT) {
|
|
190
|
-
const r =
|
|
189
|
+
const r = V(M * 20, M, 1);
|
|
191
190
|
nt(r, a.data, "black", t, "white");
|
|
192
191
|
const o = J(r, "white");
|
|
193
192
|
return (o == null ? void 0 : o.toDataURL("image/jpeg", 0.7)) ?? null;
|
|
@@ -199,13 +198,13 @@ async function ot(e, t) {
|
|
|
199
198
|
const o = r.map((u) => ({
|
|
200
199
|
...u,
|
|
201
200
|
penColor: "black"
|
|
202
|
-
})), i =
|
|
201
|
+
})), i = V(M * 20, M, Math.max(window.devicePixelRatio || 1, 1));
|
|
203
202
|
new he(i).fromData(o);
|
|
204
203
|
const c = J(i);
|
|
205
204
|
return c ? de(c, void 0, M, "white").toDataURL("image/jpeg", 0.7) : null;
|
|
206
205
|
}
|
|
207
206
|
if (n != null && n.startsWith("image/")) {
|
|
208
|
-
const r = await
|
|
207
|
+
const r = await Qe(e), o = J(r);
|
|
209
208
|
return o ? de(o, void 0, M).toDataURL("image/jpeg", 0.7) : null;
|
|
210
209
|
}
|
|
211
210
|
return e;
|
|
@@ -216,8 +215,8 @@ async function st(e, t) {
|
|
|
216
215
|
return rt(a, "signature");
|
|
217
216
|
}
|
|
218
217
|
const it = ({ value: e, onChange: t, target: a }) => {
|
|
219
|
-
const [n, r] =
|
|
220
|
-
|
|
218
|
+
const [n, r] = K(e), { isRTL: o } = Be(), i = qe(a), { setFormStatus: l } = ge(), c = W();
|
|
219
|
+
Q(() => {
|
|
221
220
|
e === ce && r(ce);
|
|
222
221
|
}, [
|
|
223
222
|
e
|
|
@@ -271,7 +270,7 @@ const it = ({ value: e, onChange: t, target: a }) => {
|
|
|
271
270
|
value: t,
|
|
272
271
|
onChange: a,
|
|
273
272
|
target: e
|
|
274
|
-
}), [l, c] =
|
|
273
|
+
}), [l, c] = K(() => {
|
|
275
274
|
if (o == null)
|
|
276
275
|
return b.DRAW;
|
|
277
276
|
switch (i == null ? void 0 : i.mimeType) {
|
|
@@ -401,7 +400,7 @@ const dt = (e) => {
|
|
|
401
400
|
isDisabled: i,
|
|
402
401
|
"aria-labelledby": l,
|
|
403
402
|
"aria-controls": c,
|
|
404
|
-
"data-hook":
|
|
403
|
+
"data-hook": Ze.SIGNATURE_FIELD_MODE_SELECT,
|
|
405
404
|
className: t
|
|
406
405
|
}, u[b.DRAW], u[b.TYPE], u[b.UPLOAD]));
|
|
407
406
|
}, mt = (e) => /* @__PURE__ */ we(e), ne = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ s.createElement(Pe, {
|
|
@@ -463,7 +462,7 @@ const dt = (e) => {
|
|
|
463
462
|
onFocus: u
|
|
464
463
|
}));
|
|
465
464
|
}, Et = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
|
|
466
|
-
const { value: r, onChange: o, onBeforeChange: i, disabled: l, readOnly: c, onBlur: d, onFocus: u } = n, { id: f } = A(), { inputId: m, ariaDescribedBy: h } = H(), E = te(), p = W(), L = W(), y = W(null), x = r == null ? void 0 : r.url, [U, Y] =
|
|
465
|
+
const { value: r, onChange: o, onBeforeChange: i, disabled: l, readOnly: c, onBlur: d, onFocus: u } = n, { id: f } = A(), { inputId: m, ariaDescribedBy: h } = H(), E = te(), p = W(), L = W(), y = W(null), x = r == null ? void 0 : r.url, [U, Y] = K(!1);
|
|
467
466
|
Ee(() => {
|
|
468
467
|
var D;
|
|
469
468
|
(D = L.current) == null || D.focus();
|
|
@@ -513,7 +512,7 @@ const dt = (e) => {
|
|
|
513
512
|
j,
|
|
514
513
|
q
|
|
515
514
|
]);
|
|
516
|
-
return
|
|
515
|
+
return Q(() => {
|
|
517
516
|
p.current && (c || l ? p.current.off() : p.current.on());
|
|
518
517
|
}, [
|
|
519
518
|
l,
|
|
@@ -542,7 +541,7 @@ const dt = (e) => {
|
|
|
542
541
|
R == null || R.focus({
|
|
543
542
|
preventScroll: !0
|
|
544
543
|
});
|
|
545
|
-
}, u),
|
|
544
|
+
}, u), Q(() => {
|
|
546
545
|
if (!n) {
|
|
547
546
|
const R = document.getElementById(h);
|
|
548
547
|
R && (R.value = "");
|
|
@@ -652,10 +651,10 @@ const dt = (e) => {
|
|
|
652
651
|
id: f
|
|
653
652
|
}, e));
|
|
654
653
|
};
|
|
655
|
-
g.Label =
|
|
654
|
+
g.Label = Ve;
|
|
656
655
|
g.Input = Z;
|
|
657
|
-
g.Description =
|
|
658
|
-
g.Error =
|
|
656
|
+
g.Description = $e;
|
|
657
|
+
g.Error = ze;
|
|
659
658
|
Z.Header = X;
|
|
660
659
|
Z.Value = P;
|
|
661
660
|
X.Tabs = _;
|
|
@@ -740,9 +739,9 @@ const Tt = () => {
|
|
|
740
739
|
}), Ot = () => {
|
|
741
740
|
const e = Tt();
|
|
742
741
|
return /* @__PURE__ */ s.createElement(g, null, /* @__PURE__ */ s.createElement(g.Label, {
|
|
743
|
-
className: v(ue,
|
|
742
|
+
className: v(ue, z.label)
|
|
744
743
|
}, /* @__PURE__ */ s.createElement(g.Label.Required, {
|
|
745
|
-
className: v(
|
|
744
|
+
className: v(We, z.requiredMark)
|
|
746
745
|
})), /* @__PURE__ */ s.createElement(g.Input, null, /* @__PURE__ */ s.createElement(g.Input.Header, {
|
|
747
746
|
className: C.header
|
|
748
747
|
}, /* @__PURE__ */ s.createElement(g.Input.Header.Tabs, {
|
|
@@ -783,13 +782,13 @@ const Tt = () => {
|
|
|
783
782
|
className: v(B, C.uploadBox),
|
|
784
783
|
imageAlt: e.imageAlt
|
|
785
784
|
}, /* @__PURE__ */ s.createElement(g.Input.Value.Upload.Button, {
|
|
786
|
-
className: v(
|
|
785
|
+
className: v(He, z.uploadButton)
|
|
787
786
|
}, e.uploadLabel)))), /* @__PURE__ */ s.createElement(g.Error, {
|
|
788
|
-
className: v(
|
|
789
|
-
}, /* @__PURE__ */ s.createElement(
|
|
790
|
-
className: v(
|
|
787
|
+
className: v(Ye, z.error)
|
|
788
|
+
}, /* @__PURE__ */ s.createElement(Xe, null), /* @__PURE__ */ s.createElement(g.Error.Text, null)), /* @__PURE__ */ s.createElement(g.Description, {
|
|
789
|
+
className: v(ke, z.description)
|
|
791
790
|
}, Ut));
|
|
792
|
-
},
|
|
791
|
+
}, jt = () => /* @__PURE__ */ s.createElement(Ot, null);
|
|
793
792
|
export {
|
|
794
|
-
|
|
793
|
+
jt as SignatureRAC
|
|
795
794
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import t, { useRef as y, useCallback as f } from "react";
|
|
2
2
|
import P from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import b from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import { ProgressBar as
|
|
4
|
+
import { b5 as B, a$ as h, a0 as A, $ as I, a3 as O, a5 as w, b as F, a4 as R } from "./form-0jt4L5xo.js";
|
|
5
|
+
import { ProgressBar as k, Button as N } from "react-aria-components";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
|
|
8
|
-
function U(n) {
|
|
7
|
+
function M(n) {
|
|
9
8
|
const s = "calc(50% - 2px)";
|
|
10
|
-
return /* @__PURE__ */ t.createElement(
|
|
9
|
+
return /* @__PURE__ */ t.createElement(k, {
|
|
11
10
|
...n,
|
|
12
11
|
isIndeterminate: !0
|
|
13
12
|
}, ({ percentage: e, isIndeterminate: r }) => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("svg", {
|
|
@@ -82,22 +81,22 @@ const u = ({ children: n }) => {
|
|
|
82
81
|
return /* @__PURE__ */ t.createElement("span", {
|
|
83
82
|
className: n
|
|
84
83
|
}, o);
|
|
85
|
-
},
|
|
84
|
+
}, U = ({ children: n }) => /* @__PURE__ */ t.createElement(t.Fragment, null, n), D = ({ className: n }) => /* @__PURE__ */ t.createElement("span", {
|
|
86
85
|
className: n
|
|
87
|
-
}, /* @__PURE__ */ t.createElement(
|
|
86
|
+
}, /* @__PURE__ */ t.createElement(M, null));
|
|
88
87
|
i.Label = T;
|
|
89
|
-
i.Icon =
|
|
90
|
-
i.Loader =
|
|
88
|
+
i.Icon = U;
|
|
89
|
+
i.Loader = D;
|
|
91
90
|
_.PreviousButton = C;
|
|
92
91
|
_.NextButton = x;
|
|
93
92
|
_.SubmitButton = i;
|
|
94
93
|
u.SubmitButton = _;
|
|
95
|
-
const
|
|
96
|
-
navigationContainer:
|
|
97
|
-
rowSpacing:
|
|
98
|
-
navigationButton:
|
|
99
|
-
nextButton:
|
|
100
|
-
previousButton:
|
|
94
|
+
const H = "_navigationContainer_nvvyn_1", W = "_rowSpacing_nvvyn_6", $ = "_navigationButton_nvvyn_10", V = "_nextButton_nvvyn_24", X = "_previousButton_nvvyn_47", j = "_button_nvvyn_90", q = "_buttonNoSteps_nvvyn_133", z = "_buttonWithSteps_nvvyn_137", G = "_progress_nvvyn_165", a = {
|
|
95
|
+
navigationContainer: H,
|
|
96
|
+
rowSpacing: W,
|
|
97
|
+
navigationButton: $,
|
|
98
|
+
nextButton: V,
|
|
99
|
+
previousButton: X,
|
|
101
100
|
button: j,
|
|
102
101
|
buttonNoSteps: q,
|
|
103
102
|
buttonWithSteps: z,
|
|
@@ -117,26 +116,26 @@ const D = "_navigationContainer_nvvyn_1", H = "_rowSpacing_nvvyn_6", V = "_navig
|
|
|
117
116
|
[a.rowSpacing]: o
|
|
118
117
|
})
|
|
119
118
|
}, /* @__PURE__ */ t.createElement(u.SubmitButton.PreviousButton, {
|
|
120
|
-
className: b(
|
|
119
|
+
className: b(A, a.navigationButton, a.previousButton)
|
|
121
120
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.NextButton, {
|
|
122
|
-
className: b(
|
|
121
|
+
className: b(I, a.navigationButton, a.nextButton)
|
|
123
122
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton, {
|
|
124
|
-
className: b(
|
|
123
|
+
className: b(O, a.button, {
|
|
125
124
|
[a.buttonNoSteps]: !n,
|
|
126
125
|
[a.buttonWithSteps]: n
|
|
127
126
|
}),
|
|
128
127
|
onHoverStart: p,
|
|
129
128
|
onHoverEnd: E
|
|
130
129
|
}, /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Label, {
|
|
131
|
-
className:
|
|
130
|
+
className: w
|
|
132
131
|
}), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Icon, null, r.svg ? /* @__PURE__ */ t.createElement(P, {
|
|
133
132
|
...r,
|
|
134
133
|
ref: S,
|
|
135
|
-
className: b(
|
|
134
|
+
className: b(F, R, e)
|
|
136
135
|
}) : null), /* @__PURE__ */ t.createElement(u.SubmitButton.SubmitButton.Loader, {
|
|
137
136
|
className: a.progress
|
|
138
137
|
}))));
|
|
139
|
-
},
|
|
138
|
+
}, et = () => /* @__PURE__ */ t.createElement(J, null);
|
|
140
139
|
export {
|
|
141
|
-
|
|
140
|
+
et as SubmitButtonRAC
|
|
142
141
|
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
2
|
import y from "classnames";
|
|
3
|
-
import t, { useMemo as I, useState as
|
|
4
|
-
import { CheckboxGroup as B, TextField as
|
|
5
|
-
import {
|
|
6
|
-
import { f as
|
|
7
|
-
import { E as
|
|
8
|
-
import { L as $ } from "./field-label-headless-
|
|
9
|
-
import { F as
|
|
10
|
-
import { E as
|
|
3
|
+
import t, { useMemo as I, useState as j, useRef as N, useLayoutEffect as w, useCallback as W } from "react";
|
|
4
|
+
import { CheckboxGroup as B, TextField as J, Input as K, CheckboxField as Y, CheckboxButton as Z } from "react-aria-components";
|
|
5
|
+
import { b5 as v, b2 as M, bf as S, b7 as U, H as ee, T as te, W as oe, u as ne, p as ae, X as re } from "./form-0jt4L5xo.js";
|
|
6
|
+
import { f as O, a as k } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as x, D as H } from "./field-error-headless-tsg9FQ-_.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-CB8dEat8.js";
|
|
9
|
+
import { F as se } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
+
import { E as le } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as D } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import {
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as ce } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
12
|
+
import { u as ie } from "./use-element-state-class-name-B9MBWX44.js";
|
|
13
|
+
import { u as ce } from "./use-text-input-class-name-SnurFqAr.js";
|
|
15
14
|
var ue = /* @__PURE__ */ (function(e) {
|
|
16
15
|
return e[e.FREE_FLOW = 0] = "FREE_FLOW", e[e.ONE = 1] = "ONE", e[e.TWO = 2] = "TWO", e[e.THREE = 3] = "THREE", e;
|
|
17
16
|
})({});
|
|
18
|
-
const
|
|
17
|
+
const R = "Other", de = (e, o) => {
|
|
19
18
|
const r = o.length + 2;
|
|
20
19
|
return (e.find((i) => i.startsWith(`${o}: `)) || "").slice(r);
|
|
21
20
|
}, me = (e) => e.map((o) => o.value ?? o.label), P = ({ className: e, ...o }) => {
|
|
@@ -24,14 +23,14 @@ const v = "Other", de = (e, o) => {
|
|
|
24
23
|
className: e
|
|
25
24
|
}, a);
|
|
26
25
|
}, q = ({ className: e }) => {
|
|
27
|
-
const { value: o, onChange: a, addOtherLabel: r, addOtherPlaceholder: l, otherInputCharacterLimit: i, disabled: u, readOnly: m, hasError: d } =
|
|
26
|
+
const { value: o, onChange: a, addOtherLabel: r, addOtherPlaceholder: l, otherInputCharacterLimit: i, disabled: u, readOnly: m, hasError: d } = v(), { t: p } = S(), n = r || p("add-other.default-other-option-label") || R, b = I(() => de(o || [], n), [
|
|
28
27
|
o,
|
|
29
28
|
n
|
|
30
|
-
]), [c, L] =
|
|
29
|
+
]), [c, L] = j(b), f = N(a);
|
|
31
30
|
w(() => {
|
|
32
31
|
f.current = a;
|
|
33
32
|
});
|
|
34
|
-
const g =
|
|
33
|
+
const g = W((h) => {
|
|
35
34
|
L(h);
|
|
36
35
|
const C = (o || []).filter((E) => !E.startsWith(`${n}:`) && E !== n), _ = h ? `${n}: ${h}` : n;
|
|
37
36
|
f.current([
|
|
@@ -42,14 +41,14 @@ const v = "Other", de = (e, o) => {
|
|
|
42
41
|
o,
|
|
43
42
|
n
|
|
44
43
|
]);
|
|
45
|
-
return /* @__PURE__ */ t.createElement(
|
|
44
|
+
return /* @__PURE__ */ t.createElement(J, {
|
|
46
45
|
value: c,
|
|
47
46
|
onChange: g,
|
|
48
47
|
isDisabled: u,
|
|
49
48
|
isReadOnly: m,
|
|
50
49
|
isInvalid: d,
|
|
51
50
|
"aria-label": n
|
|
52
|
-
}, /* @__PURE__ */ t.createElement(
|
|
51
|
+
}, /* @__PURE__ */ t.createElement(K, {
|
|
53
52
|
"data-hook": "tags-other-input",
|
|
54
53
|
"data-filled": c ? !0 : void 0,
|
|
55
54
|
placeholder: l,
|
|
@@ -57,22 +56,22 @@ const v = "Other", de = (e, o) => {
|
|
|
57
56
|
className: e
|
|
58
57
|
}));
|
|
59
58
|
}, T = ({ children: e, className: o, ...a }) => {
|
|
60
|
-
const { value: r, label: l, isOther: i, isFirstOption: u } = a, { id: m, value: d, onChange: p, options: n, disabled:
|
|
59
|
+
const { value: r, label: l, isOther: i, isFirstOption: u } = a, { id: m, value: d, onChange: p, options: n, disabled: b, readOnly: c, hasError: L } = v(), f = N(null);
|
|
61
60
|
U(() => {
|
|
62
61
|
var E;
|
|
63
62
|
u && ((E = f.current) == null || E.focus({
|
|
64
63
|
preventScroll: !0
|
|
65
64
|
}));
|
|
66
65
|
}, m);
|
|
67
|
-
const g =
|
|
66
|
+
const g = O(e, P), h = I(() => d || [], [
|
|
68
67
|
d
|
|
69
68
|
]), C = I(() => i ? h.find((E) => E === l || E.startsWith(`${l}: `)) || l : r, [
|
|
70
69
|
i,
|
|
71
70
|
h,
|
|
72
71
|
l,
|
|
73
72
|
r
|
|
74
|
-
]), _ =
|
|
75
|
-
const G = me(n || []), A = h.filter((
|
|
73
|
+
]), _ = W((E) => {
|
|
74
|
+
const G = me(n || []), A = h.filter((Q) => G.includes(Q));
|
|
76
75
|
p(E ? [
|
|
77
76
|
...A,
|
|
78
77
|
l
|
|
@@ -87,20 +86,20 @@ const v = "Other", de = (e, o) => {
|
|
|
87
86
|
inputRef: f,
|
|
88
87
|
value: C,
|
|
89
88
|
onChange: i ? _ : void 0,
|
|
90
|
-
isDisabled:
|
|
89
|
+
isDisabled: b,
|
|
91
90
|
isReadOnly: c,
|
|
92
91
|
isInvalid: L
|
|
93
92
|
}, /* @__PURE__ */ t.createElement(Z, {
|
|
94
93
|
className: o,
|
|
95
|
-
"data-hook": `tags-${i ?
|
|
96
|
-
},
|
|
94
|
+
"data-hook": `tags-${i ? R : r}`
|
|
95
|
+
}, k(g, {
|
|
97
96
|
value: r,
|
|
98
97
|
label: l,
|
|
99
98
|
isOther: i,
|
|
100
99
|
isFirstOption: u
|
|
101
100
|
})));
|
|
102
101
|
}, V = ({ children: e, className: o }) => {
|
|
103
|
-
const { options: a, addOther: r, addOtherLabel: l, numberOfColumns: i = ue.FREE_FLOW } =
|
|
102
|
+
const { options: a, addOther: r, addOtherLabel: l, numberOfColumns: i = ue.FREE_FLOW } = v(), { t: u } = S(), m = l || u("add-other.default-other-option-label") || R, d = O(e, T), p = I(() => {
|
|
104
103
|
const n = a || [];
|
|
105
104
|
return r ? [
|
|
106
105
|
...n,
|
|
@@ -118,18 +117,18 @@ const v = "Other", de = (e, o) => {
|
|
|
118
117
|
return p.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
119
118
|
className: o,
|
|
120
119
|
"data-columns": i
|
|
121
|
-
}, p.map((n,
|
|
120
|
+
}, p.map((n, b) => {
|
|
122
121
|
const c = n.value ?? n.label;
|
|
123
|
-
return
|
|
124
|
-
key: n.isOther ?
|
|
122
|
+
return k(d, {
|
|
123
|
+
key: n.isOther ? R : c,
|
|
125
124
|
value: c,
|
|
126
125
|
label: n.label,
|
|
127
126
|
isOther: n.isOther,
|
|
128
|
-
isFirstOption:
|
|
127
|
+
isFirstOption: b === 0
|
|
129
128
|
});
|
|
130
129
|
}));
|
|
131
130
|
}, z = ({ children: e, className: o }) => {
|
|
132
|
-
const { addOther: a, addOtherLabel: r, hasError: l, readOnly: i, value: u } =
|
|
131
|
+
const { addOther: a, addOtherLabel: r, hasError: l, readOnly: i, value: u } = v(), { t: m } = S(), d = r || m("add-other.default-other-option-label") || R, p = O(e, V), n = O(e, q), b = I(() => !a || !u ? !1 : u.some((c) => c === d || c.startsWith(`${d}:`)), [
|
|
133
132
|
a,
|
|
134
133
|
u,
|
|
135
134
|
d
|
|
@@ -138,16 +137,16 @@ const v = "Other", de = (e, o) => {
|
|
|
138
137
|
className: o,
|
|
139
138
|
"data-invalid": l,
|
|
140
139
|
"data-readonly": i
|
|
141
|
-
}, p,
|
|
140
|
+
}, p, b && n);
|
|
142
141
|
}, s = ({ children: e }) => {
|
|
143
|
-
const { id: o, value: a, onChange: r, FieldLayout: l, required: i, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } =
|
|
142
|
+
const { id: o, value: a, onChange: r, FieldLayout: l, required: i, disabled: u, readOnly: m, hasError: d, onBlur: p, onFocus: n } = v(), { inputId: b, labelId: c, ariaDescribedBy: L } = M(), f = I(() => a || [], [
|
|
144
143
|
a
|
|
145
|
-
]), g =
|
|
144
|
+
]), g = O(e, $), h = O(e, z), C = O(e, H), _ = O(e, x);
|
|
146
145
|
return /* @__PURE__ */ t.createElement(l, {
|
|
147
146
|
fieldId: o,
|
|
148
147
|
renderLabel: () => g,
|
|
149
|
-
renderInput: () => /* @__PURE__ */ t.createElement(
|
|
150
|
-
id:
|
|
148
|
+
renderInput: () => /* @__PURE__ */ t.createElement(se, {
|
|
149
|
+
id: b,
|
|
151
150
|
ariaLabelledBy: c,
|
|
152
151
|
ariaDescribedBy: L,
|
|
153
152
|
required: i,
|
|
@@ -172,33 +171,33 @@ s.Control = z;
|
|
|
172
171
|
s.Options = V;
|
|
173
172
|
s.OtherInput = q;
|
|
174
173
|
s.Description = H;
|
|
175
|
-
s.Error =
|
|
176
|
-
const pe = "_control_11yzo_1", he = "_options_11yzo_8", Ee = "_option_11yzo_8",
|
|
174
|
+
s.Error = x;
|
|
175
|
+
const pe = "_control_11yzo_1", he = "_options_11yzo_8", Ee = "_option_11yzo_8", be = "_optionHover_11yzo_80", Oe = "_optionSelected_11yzo_80", F = {
|
|
177
176
|
control: pe,
|
|
178
177
|
options: he,
|
|
179
178
|
option: Ee,
|
|
180
|
-
optionHover:
|
|
181
|
-
optionSelected:
|
|
182
|
-
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(
|
|
179
|
+
optionHover: be,
|
|
180
|
+
optionSelected: Oe
|
|
181
|
+
}, fe = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(X, {
|
|
183
182
|
content: e,
|
|
184
183
|
locale: o
|
|
185
184
|
}), Ie = {
|
|
186
185
|
base: F.option,
|
|
187
186
|
selected: F.optionSelected,
|
|
188
187
|
hover: F.optionHover
|
|
189
|
-
},
|
|
188
|
+
}, Ne = () => {
|
|
190
189
|
const e = ie({
|
|
191
|
-
globalClasses:
|
|
190
|
+
globalClasses: re,
|
|
192
191
|
moduleClasses: Ie
|
|
193
192
|
}), o = ce();
|
|
194
193
|
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
195
|
-
className: y(
|
|
194
|
+
className: y(ee, D.label)
|
|
196
195
|
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
197
|
-
className: y(
|
|
196
|
+
className: y(te, D.requiredMark)
|
|
198
197
|
})), /* @__PURE__ */ t.createElement(s.Control, {
|
|
199
198
|
className: F.control
|
|
200
199
|
}, /* @__PURE__ */ t.createElement(s.Options, {
|
|
201
|
-
className: y(
|
|
200
|
+
className: y(oe, F.options)
|
|
202
201
|
}, /* @__PURE__ */ t.createElement(s.Options.Option, {
|
|
203
202
|
className: ({ isSelected: a, isHovered: r }) => e({
|
|
204
203
|
isSelected: a,
|
|
@@ -207,11 +206,11 @@ const pe = "_control_11yzo_1", he = "_options_11yzo_8", Ee = "_option_11yzo_8",
|
|
|
207
206
|
}, /* @__PURE__ */ t.createElement(s.Options.Option.Label, null))), /* @__PURE__ */ t.createElement(s.OtherInput, {
|
|
208
207
|
className: o
|
|
209
208
|
})), /* @__PURE__ */ t.createElement(s.Error, {
|
|
210
|
-
className: y(
|
|
211
|
-
}, /* @__PURE__ */ t.createElement(
|
|
212
|
-
className: y(
|
|
209
|
+
className: y(ne, D.error)
|
|
210
|
+
}, /* @__PURE__ */ t.createElement(le, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
211
|
+
className: y(ae, D.description)
|
|
213
212
|
}, fe));
|
|
214
213
|
};
|
|
215
214
|
export {
|
|
216
|
-
|
|
215
|
+
Ne as T
|
|
217
216
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
2
|
-
import
|
|
3
|
-
import r, { useCallback as
|
|
1
|
+
import { RicosViewer as T } from "@wix/ricos/viewer";
|
|
2
|
+
import o from "classnames";
|
|
3
|
+
import r, { useCallback as N, useRef as O } from "react";
|
|
4
4
|
import { TextField as S, TextArea as y } from "react-aria-components";
|
|
5
|
-
import {
|
|
5
|
+
import { b5 as p, b2 as d, b7 as x, H as g, T as h, u as v, p as M } from "./form-0jt4L5xo.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
9
|
-
import { E as
|
|
7
|
+
import { D as q, E as B } from "./field-error-headless-tsg9FQ-_.js";
|
|
8
|
+
import { L as k } from "./field-label-headless-CB8dEat8.js";
|
|
9
|
+
import { E as P } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as c } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import {
|
|
12
|
-
import { u as V } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
11
|
+
import { u as V } from "./use-text-input-class-name-SnurFqAr.js";
|
|
13
12
|
const e = ({ children: t }) => {
|
|
14
|
-
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly:
|
|
13
|
+
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: b, FieldLayout: I, hasError: f } = p(), { labelId: F } = d(), L = N((A) => {
|
|
15
14
|
s(A);
|
|
16
15
|
}, [
|
|
17
16
|
s
|
|
@@ -24,19 +23,19 @@ const e = ({ children: t }) => {
|
|
|
24
23
|
value: m ?? "",
|
|
25
24
|
onChange: L,
|
|
26
25
|
isDisabled: u,
|
|
27
|
-
isReadOnly:
|
|
26
|
+
isReadOnly: l,
|
|
28
27
|
isRequired: n,
|
|
29
|
-
isInvalid:
|
|
28
|
+
isInvalid: f,
|
|
30
29
|
onBlur: E,
|
|
31
|
-
onFocus:
|
|
30
|
+
onFocus: b
|
|
32
31
|
}, D),
|
|
33
32
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, C, _)
|
|
34
33
|
});
|
|
35
|
-
},
|
|
34
|
+
}, w = ({ className: t }) => {
|
|
36
35
|
const { inputId: a, ariaDescribedBy: m } = d(), { id: s, placeholder: u } = p(), n = O(null);
|
|
37
36
|
return x(() => {
|
|
38
|
-
var
|
|
39
|
-
(
|
|
37
|
+
var l;
|
|
38
|
+
(l = n.current) == null || l.focus();
|
|
40
39
|
}, s), /* @__PURE__ */ r.createElement(y, {
|
|
41
40
|
ref: n,
|
|
42
41
|
id: a,
|
|
@@ -45,29 +44,29 @@ const e = ({ children: t }) => {
|
|
|
45
44
|
className: t
|
|
46
45
|
});
|
|
47
46
|
};
|
|
48
|
-
e.Label =
|
|
49
|
-
e.Input =
|
|
50
|
-
e.Description =
|
|
51
|
-
e.Error =
|
|
52
|
-
const
|
|
53
|
-
input:
|
|
54
|
-
},
|
|
47
|
+
e.Label = k;
|
|
48
|
+
e.Input = w;
|
|
49
|
+
e.Description = q;
|
|
50
|
+
e.Error = B;
|
|
51
|
+
const H = "_input_ug5v8_1", Q = {
|
|
52
|
+
input: H
|
|
53
|
+
}, U = ({ content: t, locale: a }) => /* @__PURE__ */ r.createElement(T, {
|
|
55
54
|
content: t,
|
|
56
55
|
locale: a
|
|
57
|
-
}),
|
|
58
|
-
const t = V(
|
|
56
|
+
}), re = () => {
|
|
57
|
+
const t = V(Q.input);
|
|
59
58
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
60
|
-
className:
|
|
59
|
+
className: o(g, c.label)
|
|
61
60
|
}, /* @__PURE__ */ r.createElement(e.Label.Required, {
|
|
62
|
-
className:
|
|
61
|
+
className: o(h, c.requiredMark)
|
|
63
62
|
})), /* @__PURE__ */ r.createElement(e.Input, {
|
|
64
63
|
className: t
|
|
65
64
|
}), /* @__PURE__ */ r.createElement(e.Error, {
|
|
66
|
-
className:
|
|
67
|
-
}, /* @__PURE__ */ r.createElement(
|
|
68
|
-
className:
|
|
69
|
-
},
|
|
65
|
+
className: o(v, c.error)
|
|
66
|
+
}, /* @__PURE__ */ r.createElement(P, null), /* @__PURE__ */ r.createElement(e.Error.Text, null)), /* @__PURE__ */ r.createElement(e.Description, {
|
|
67
|
+
className: o(M, c.description)
|
|
68
|
+
}, U));
|
|
70
69
|
};
|
|
71
70
|
export {
|
|
72
|
-
|
|
71
|
+
re as T
|
|
73
72
|
};
|