@wix/form-elements 1.242.0 → 1.243.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-Bab9tSUj.js → appointment-rac-D-dMrhRb.js} +43 -43
- package/dist/component/{bookings-address-rac-DcpXlUvQ.js → bookings-address-rac-B6aQ4P5I.js} +1 -1
- package/dist/component/{bookings-email-rac-Bp0i-XuQ.js → bookings-email-rac-Bh849hrc.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BWSlc38n.js → bookings-first-name-rac-C69Ind1o.js} +1 -1
- package/dist/component/{bookings-header-rac-C2jB1zfG.js → bookings-header-rac-DGUzMGRj.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BkwCVLE2.js → bookings-last-name-rac-Ch9Bm-sr.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DpGFo3D_.js → bookings-login-bar-rac-CUhHuZm-.js} +1 -1
- package/dist/component/{bookings-phone-rac-BtgTVsj2.js → bookings-phone-rac-BI4PoSu3.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DsOs6O8q.js → bookings-rich-text-rac-B4D2ZCJs.js} +1 -1
- package/dist/component/{checkbox-field-rac-DysYJ41o.js → checkbox-field-rac-zE0dzJYu.js} +81 -81
- package/dist/component/{checkbox-group-field-headless-Df-A3KXl.js → checkbox-group-field-headless-C2x-la-e.js} +44 -44
- package/dist/component/{checkbox-group-field-rac-DFnJDZWN.js → checkbox-group-field-rac-iJkQGTiJ.js} +4 -4
- package/dist/component/{checkbox-group-rac-B7TaGbZy.js → checkbox-group-rac-DoK5e4c8.js} +1 -1
- package/dist/component/{checkbox-rac-Di0BHQqP.js → checkbox-rac-8i-6GMze.js} +1 -1
- package/dist/component/{contacts-address-rac-DhSjIORz.js → contacts-address-rac-CHcRQBjy.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-B3nWdWka.js → contacts-birthdate-rac-CkSsvQ6R.js} +1 -1
- package/dist/component/{contacts-company-rac-DFYyTkvq.js → contacts-company-rac-CIsmil8s.js} +1 -1
- package/dist/component/{contacts-email-rac-DGzgN38U.js → contacts-email-rac-AEvRJfWd.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CZ3e4Pxp.js → contacts-first-name-rac-CLSJ2cna.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Dvu7FY_c.js → contacts-last-name-rac-o59dmvVn.js} +1 -1
- package/dist/component/{contacts-phone-rac-DeLq3Efe.js → contacts-phone-rac-jh-YSD-N.js} +1 -1
- package/dist/component/{contacts-position-rac-YhEGkgEL.js → contacts-position-rac-Ak4X2gV_.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DzVP-ujl.js → contacts-subscribe-rac-By9Bk1YL.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CU4sTn5G.js → contacts-tax-id-rac-B1enZgKk.js} +1 -1
- package/dist/component/{date-availability-1nR4MMNM.js → date-availability--3J2b6Ur.js} +1 -1
- package/dist/component/{date-input-field-rac-CM_aSFwq.js → date-input-field-rac-BFt0DKA9.js} +66 -66
- package/dist/component/{date-input-rac-BKDGvMhS.js → date-input-rac-D8BA8S1A.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cy3E6oIi.js → date-picker-field-rac-cwYdVf60.js} +40 -40
- package/dist/component/{date-picker-rac-P7Rt52yN.js → date-picker-rac-B7uR5ZnA.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Dy0yHP_r.js → date-time-input-field-rac-PaKyrMb9.js} +98 -98
- package/dist/component/{date-time-input-rac-Bte2ExkW.js → date-time-input-rac-Ck8Edatx.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-aDNIkDPY.js → dext-checkbox-group-rac-Cru3Lq4c.js} +2 -2
- package/dist/component/{dext-checkbox-rac-7cCDU8rx.js → dext-checkbox-rac-wtMsRxly.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CiKlP583.js → dext-date-picker-rac-B34DtxLN.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Cg0rG4Qg.js → dext-date-time-input-rac-BsdfLty5.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BqQfNIBY.js → dext-dropdown-rac-DeZYnwo7.js} +1 -1
- package/dist/component/{dext-email-rac-BfeJHd-1.js → dext-email-rac-B4GTK5H8.js} +1 -1
- package/dist/component/{dext-number-input-rac-Co2-0GIg.js → dext-number-input-rac-BIyJJ9h0.js} +1 -1
- package/dist/component/{dext-phone-rac-nruJqfOS.js → dext-phone-rac-lf64Ywlp.js} +1 -1
- package/dist/component/{dext-radio-group-rac-D4dpTCbP.js → dext-radio-group-rac-CGt1_jue.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DZdFsFwX.js → dext-rating-input-rac-CbaW1lxS.js} +1 -1
- package/dist/component/{dext-tags-rac-Bo06MMsK.js → dext-tags-rac-DnHDnzD_.js} +2 -2
- package/dist/component/{dext-text-area-rac-DFilJP7d.js → dext-text-area-rac-C8DVKWKo.js} +1 -1
- package/dist/component/{dext-text-input-rac-Btnz_-2P.js → dext-text-input-rac-DVl-1SDY.js} +1 -1
- package/dist/component/{dext-url-input-rac-YpJVis2h.js → dext-url-input-rac-CkpAMLF9.js} +1 -1
- package/dist/component/{dismiss-icon-DNnhVj3P.js → dismiss-icon-CwZIlL7w.js} +6 -6
- package/dist/component/{donation-rac-CgrtVdQ9.js → donation-rac-DCNG5ByO.js} +44 -44
- package/dist/component/{dropdown-field-rac-CWdttDy1.js → dropdown-field-rac-CVbM-0KX.js} +3 -3
- package/dist/component/{dropdown-rac-Bn29r6Vt.js → dropdown-rac-CE9IjTvE.js} +1 -1
- package/dist/component/{ecom-address-rac-DPSadNy1.js → ecom-address-rac-BD_okFDt.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-C5RN2TfZ.js → ecom-subscription-checkbox-rac-C7zdxqra.js} +2 -2
- package/dist/component/{email-input-field-rac-Bl_i7BQ3.js → email-input-field-rac-CY4wE0eP.js} +35 -35
- package/dist/component/{events-repeater-rac-8MaxRBKl.js → events-repeater-rac-Bh-TBEQG.js} +26 -26
- package/dist/component/{events-rsvp-rac-DgduOqZJ.js → events-rsvp-rac-BPhzKqUb.js} +3 -3
- package/dist/component/{field-error-headless-CBz8B75M.js → field-error-headless-D3lVhOaC.js} +1 -1
- package/dist/component/{field-label-headless-5GuAGL0Y.js → field-label-headless-CrZoTwxs.js} +5 -5
- package/dist/component/{file-upload-rac-BQbXxpk9.js → file-upload-rac-DYP83swC.js} +187 -186
- package/dist/component/{fixed-payment-rac-zRYih9qW.js → fixed-payment-rac-DY7hXK7g.js} +11 -11
- package/dist/component/{form-Bc8sA308.js → form-DpFQ9uO1.js} +3059 -2934
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C6f6tpfn.js → header-field-rac-9wOBV_rW.js} +2 -2
- package/dist/component/{header-rac-Dv-9gQlw.js → header-rac-gzKNBkq_.js} +1 -1
- package/dist/component/{image-choice-rac-DgmQKZLT.js → image-choice-rac-B6dvv6Jc.js} +25 -25
- package/dist/component/{index-Btc2rtde.js → index-CbCZUvYt.js} +2 -2
- package/dist/component/{index-BH3c1lm6.js → index-DCl2274b.js} +4 -4
- package/dist/component/{isObjectLike-DUAmJpnS.js → isObjectLike-DDBjMXgH.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CD692gBt.js → multiline-address-field-rac-CPkSpMMb.js} +210 -210
- package/dist/component/{multiline-address-rac-DRInxa21.js → multiline-address-rac-DCnk-LvE.js} +1 -1
- package/dist/component/{number-input-field-rac-D7Uf9yNQ.js → number-input-field-rac-Dt0hM2jA.js} +19 -19
- package/dist/component/{number-input-rac-C600LCBk.js → number-input-rac-pjmjC2-7.js} +1 -1
- package/dist/component/{password-rac-BLi1E4nU.js → password-rac-D9Gmp1yw.js} +32 -32
- package/dist/component/{payment-input-rac-DhtjMf3j.js → payment-input-rac-CI78trIl.js} +33 -33
- package/dist/component/{phone-input-field-rac-DcmI5WGt.js → phone-input-field-rac-BCPj6vEP.js} +39 -39
- package/dist/component/{phone-rac-KcmTZZ9n.js → phone-rac-FAGNDAR-.js} +1 -1
- package/dist/component/{product-list-rac-DqcTH4Uz.js → product-list-rac-D7n9P2wQ.js} +14 -14
- package/dist/component/{quiz-radio-group-rac-BhE36x3f.js → quiz-radio-group-rac-BO55azn2.js} +1 -1
- package/dist/component/{radio-button-module-classes-Bb8FJ98H.js → radio-button-module-classes-BIraDyOu.js} +35 -35
- package/dist/component/{radio-group-field-rac-ZRFBSw-k.js → radio-group-field-rac-BvUZ-DmS.js} +4 -4
- package/dist/component/{radio-group-rac-DJzh_9Rz.js → radio-group-rac-qc0JijX9.js} +1 -1
- package/dist/component/{rating-input-field-rac-O761Lr7O.js → rating-input-field-rac-D3u_T_la.js} +18 -18
- package/dist/component/{rating-input-rac-N5UUwsk9.js → rating-input-rac-CqlPfSQQ.js} +1 -1
- package/dist/component/{rich-content-rac.module-CyyY4g0Y.js → rich-content-rac.module-B4TapWZL.js} +7 -7
- package/dist/component/{rich-text-field-rac-G1dCddAG.js → rich-text-field-rac-LgoEQuKS.js} +4 -4
- package/dist/component/{rich-text-rac-DRls3PAt.js → rich-text-rac-1IcHKfEb.js} +1 -1
- package/dist/component/{service-dropdown-rac-CQtdLY6W.js → service-dropdown-rac-CMkRaLmg.js} +22 -22
- package/dist/component/{services-multi-choice-rac-GXHhjMdj.js → services-multi-choice-rac-DzwHkD-j.js} +7 -7
- package/dist/component/{signature-rac-Bthr2qFV.js → signature-rac-D3X5-ScB.js} +71 -71
- package/dist/component/{submit-button-rac-CZpKTkAI.js → submit-button-rac-BWL76gny.js} +15 -15
- package/dist/component/{tags-field-rac-C7tkzxNX.js → tags-field-rac-BwGeFDfH.js} +24 -24
- package/dist/component/{tags-rac-CWgu9IXx.js → tags-rac-DU7-Kl1T.js} +1 -1
- package/dist/component/{text-area-field-rac-BFRW0mfT.js → text-area-field-rac-BO_9zG3x.js} +19 -19
- package/dist/component/{text-area-rac-DaJColM3.js → text-area-rac-CG7vi5-F.js} +1 -1
- package/dist/component/{text-input-field-rac-D4QPznxH.js → text-input-field-rac-FWkVzsiY.js} +3 -3
- package/dist/component/{text-input-headless-B3LeZbMa.js → text-input-headless-COFlfx6N.js} +9 -9
- package/dist/component/{text-input-rac-D6t913v4.js → text-input-rac-D_7yUDzw.js} +1 -1
- package/dist/component/{time-input-rac-BRXeAxLy.js → time-input-rac-0Ggsm6qE.js} +24 -24
- package/dist/component/{url-input-field-rac-C7AeMSCu.js → url-input-field-rac-CH7kG_Qf.js} +25 -25
- package/dist/component/{url-input-rac-Crya6SOE.js → url-input-rac-CjBn6ZWh.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CF6Nkoi8.js → use-dropdown-option-class-name-Cy_iJyiA.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-CPKkbYSD.js → use-dropdown-trigger-class-name-Ddu4_w_z.js} +26 -26
- package/dist/component/{use-element-state-class-name-c_YzmI-w.js → use-element-state-class-name-DNjpnp27.js} +2 -2
- package/dist/component/{use-hoverable-input-class-name-DPft9EoC.js → use-hoverable-input-class-name-Wy3Ujp2_.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-DTCIHm6F.js → use-is-forced-open-dropdown-Vu0JjNY7.js} +4 -4
- package/dist/component/{use-native-mobile-input-CuS4DTkh.js → use-native-mobile-input-l8hf9N2p.js} +3 -3
- package/dist/component/{use-service-options-base-D_sHL_KM.js → use-service-options-base-Di4c__b_.js} +3 -3
- package/dist/component/use-text-input-class-name-BBZXre-_.js +6 -0
- package/package.json +2 -2
- package/dist/component/use-text-input-class-name-BCtZ8l6Q.js +0 -6
|
@@ -2,17 +2,17 @@ import r, { useRef as $, useContext as Se, useMemo as he, useCallback as y, useS
|
|
|
2
2
|
import Fe from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import { RicosViewer as we } from "@wix/ricos/viewer";
|
|
4
4
|
import F from "classnames";
|
|
5
|
-
import {
|
|
5
|
+
import { bf as xe, bI as Le, aR as Ue, F as Be, bK as Oe, bG as Pe, bW as Te, E as me, aH as oe, bO as x, bL as W, bQ as Ie, bZ as Me, bH as He, X as We, am as Ye, an as Ze, ao as Ge, b as ke, au as Ve, av as pe, M as $e, I as ze, ap as Xe, as as qe, aq as je, at as Ke, f as ne, ar as Je } from "./form-DpFQ9uO1.js";
|
|
6
6
|
import { useHover as Qe, useFocusRing as et, mergeProps as tt } from "react-aria";
|
|
7
|
-
import { RadioGroup as nt, Button as
|
|
7
|
+
import { RadioGroup as nt, Button as Ce, TextField as at, DropZone as ot, Input as st, FileTrigger as rt, RadioField as lt, RadioButton as it } from "react-aria-components";
|
|
8
8
|
import _e from "signature_pad";
|
|
9
|
-
import { f as
|
|
10
|
-
import { D as ct, E as ut } from "./field-error-headless-
|
|
11
|
-
import { L as dt } from "./field-label-headless-
|
|
9
|
+
import { f as C, a as N } from "./find-child-C60k4CxG.js";
|
|
10
|
+
import { D as ct, E as ut } from "./field-error-headless-D3lVhOaC.js";
|
|
11
|
+
import { L as dt } from "./field-label-headless-CrZoTwxs.js";
|
|
12
12
|
import { D as mt } from "./data-hooks-Dkw1pbRj.js";
|
|
13
13
|
import { E as pt } from "./error-icon-hZxQ6DEy.js";
|
|
14
14
|
import { s as ae } from "./field-rac.module-D0QzJXUv.js";
|
|
15
|
-
import { u as X } from "./use-element-state-class-name-
|
|
15
|
+
import { u as X } from "./use-element-state-class-name-DNjpnp27.js";
|
|
16
16
|
const ft = typeof r.useId == "function" ? r.useId : () => $(xe()).current, Et = ({ properties: e }) => e.uploadEnabled === !0, gt = (e, t) => e.fieldType === Be.SIGNATURE && !e.properties.hidden && !e.properties.disabled && !e.properties.readOnly && (t !== "upload" || Et(e)), ht = (e, t) => e.layout.row - t.layout.row || e.layout.column - t.layout.column, bt = (e) => {
|
|
17
17
|
var o;
|
|
18
18
|
const t = (o = Le().signature) == null ? void 0 : o.signatureMode, a = Se(Ue);
|
|
@@ -26,7 +26,7 @@ const ft = typeof r.useId == "function" ? r.useId : () => $(xe()).current, Et =
|
|
|
26
26
|
};
|
|
27
27
|
var R = /* @__PURE__ */ (function(e) {
|
|
28
28
|
return e.TEXT = "text/plain", e.POINTS = "points/json", e;
|
|
29
|
-
})({}),
|
|
29
|
+
})({}), I = /* @__PURE__ */ (function(e) {
|
|
30
30
|
return e.DRAW = "draw", e.TYPE = "type", e.UPLOAD = "upload", e;
|
|
31
31
|
})({}), A = /* @__PURE__ */ (function(e) {
|
|
32
32
|
return e.DRAW = "draw", e.TYPE = "type", e.IMAGE = "image", e.UPLOAD = "upload", e;
|
|
@@ -59,20 +59,20 @@ function Tt(e) {
|
|
|
59
59
|
const n = a.getImageData(0, 0, 1, 1);
|
|
60
60
|
return n.data[0] * 65536 + n.data[1] * 256 + n.data[2];
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const It = (e, t) => {
|
|
63
63
|
const a = Tt(e);
|
|
64
64
|
return (n, o) => {
|
|
65
65
|
const s = (o * t.width + n) * 4;
|
|
66
66
|
return t.data[s] * 65536 + t.data[s + 1] * 256 + t.data[s + 2] === a;
|
|
67
67
|
};
|
|
68
|
-
},
|
|
68
|
+
}, Ct = (e) => (t, a) => {
|
|
69
69
|
const n = (a * e.width + t) * 4;
|
|
70
70
|
return e.data[n + 3] === 0;
|
|
71
71
|
};
|
|
72
72
|
function re(e, t) {
|
|
73
73
|
const a = e.getContext("2d", {
|
|
74
74
|
willReadFrequently: !0
|
|
75
|
-
}), n = e.width, o = e.height, s = a.getImageData(0, 0, n, o), l = t ?
|
|
75
|
+
}), n = e.width, o = e.height, s = a.getImageData(0, 0, n, o), l = t ? It(t, s) : Ct(s);
|
|
76
76
|
let i = n + 1, c = -1, u = o + 1, d = -1, f = 0, m = 0;
|
|
77
77
|
for (m = 0; m < o; m++)
|
|
78
78
|
for (f = 0; f < n; f++)
|
|
@@ -284,14 +284,14 @@ const Ft = ({ value: e, onChange: t, target: a }) => {
|
|
|
284
284
|
target: e
|
|
285
285
|
}), [i, c] = q(() => {
|
|
286
286
|
if (s == null)
|
|
287
|
-
return
|
|
287
|
+
return I.DRAW;
|
|
288
288
|
switch (l == null ? void 0 : l.mimeType) {
|
|
289
289
|
case R.POINTS:
|
|
290
|
-
return
|
|
290
|
+
return I.DRAW;
|
|
291
291
|
case R.TEXT:
|
|
292
|
-
return
|
|
292
|
+
return I.TYPE;
|
|
293
293
|
default:
|
|
294
|
-
return
|
|
294
|
+
return I.UPLOAD;
|
|
295
295
|
}
|
|
296
296
|
}), { setFormStatus: u } = Te(), d = y(() => {
|
|
297
297
|
o(), u(e, oe.BUSY);
|
|
@@ -308,11 +308,11 @@ const Ft = ({ value: e, onChange: t, target: a }) => {
|
|
|
308
308
|
e
|
|
309
309
|
]), m = s != null, L = Ut(i, s, l), h = (() => {
|
|
310
310
|
switch (i) {
|
|
311
|
-
case
|
|
311
|
+
case I.DRAW:
|
|
312
312
|
return A.DRAW;
|
|
313
|
-
case
|
|
313
|
+
case I.TYPE:
|
|
314
314
|
return A.TYPE;
|
|
315
|
-
case
|
|
315
|
+
case I.UPLOAD:
|
|
316
316
|
return L != null ? A.IMAGE : A.UPLOAD;
|
|
317
317
|
default:
|
|
318
318
|
return A.DRAW;
|
|
@@ -331,9 +331,9 @@ const Ft = ({ value: e, onChange: t, target: a }) => {
|
|
|
331
331
|
handleClear: f
|
|
332
332
|
};
|
|
333
333
|
}, xt = {
|
|
334
|
-
[
|
|
335
|
-
[
|
|
336
|
-
[
|
|
334
|
+
[I.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === R.POINTS,
|
|
335
|
+
[I.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === R.TEXT,
|
|
336
|
+
[I.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== R.POINTS && (e == null ? void 0 : e.mimeType) !== R.TEXT
|
|
337
337
|
};
|
|
338
338
|
function Ut(e, t, a) {
|
|
339
339
|
return t && xt[e](a) ? t : void 0;
|
|
@@ -352,7 +352,7 @@ const Bt = (e) => {
|
|
|
352
352
|
"data-focus-visible": o || void 0
|
|
353
353
|
};
|
|
354
354
|
}, b = ({ children: e }) => {
|
|
355
|
-
const { id: t, FieldLayout: a } = x(), n =
|
|
355
|
+
const { id: t, FieldLayout: a } = x(), n = C(e, b.Label), o = C(e, b.Input), s = C(e, b.Description), l = C(e, b.Error);
|
|
356
356
|
return /* @__PURE__ */ r.createElement(a, {
|
|
357
357
|
fieldId: t,
|
|
358
358
|
renderLabel: () => n,
|
|
@@ -360,15 +360,15 @@ const Bt = (e) => {
|
|
|
360
360
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, l, s)
|
|
361
361
|
});
|
|
362
362
|
}, Ot = {
|
|
363
|
-
[
|
|
364
|
-
[
|
|
365
|
-
[
|
|
366
|
-
},
|
|
363
|
+
[I.DRAW]: A.DRAW,
|
|
364
|
+
[I.TYPE]: A.TYPE,
|
|
365
|
+
[I.UPLOAD]: A.UPLOAD
|
|
366
|
+
}, K = ({ children: e, className: t }) => {
|
|
367
367
|
const { id: a, value: n, onChange: o, target: s, readOnly: l } = x(), i = bt(a), { signatureMode: c, setSignatureMode: u, handleClear: d, clearable: f, signatureView: m, signatureValueForView: L, handleChange: h, handleBeforeChange: p } = wt({
|
|
368
368
|
target: s,
|
|
369
369
|
value: n,
|
|
370
370
|
onChange: o
|
|
371
|
-
}), g =
|
|
371
|
+
}), g = C(e, K.Header), E = C(e, K.Value), S = {
|
|
372
372
|
signatureMode: i ?? c,
|
|
373
373
|
setSignatureMode: u,
|
|
374
374
|
handleClear: d,
|
|
@@ -382,8 +382,8 @@ const Bt = (e) => {
|
|
|
382
382
|
className: t,
|
|
383
383
|
"data-hook": "signature-container"
|
|
384
384
|
}, !l && N(g, S), N(E, S));
|
|
385
|
-
},
|
|
386
|
-
const { signatureMode: n, setSignatureMode: o, clearable: s, handleClear: l } = a, { uploadEnabled: i } = x(), c =
|
|
385
|
+
}, J = ({ children: e, className: t, ...a }) => {
|
|
386
|
+
const { signatureMode: n, setSignatureMode: o, clearable: s, handleClear: l } = a, { uploadEnabled: i } = x(), c = C(e, J.Tabs), u = C(e, J.Clear);
|
|
387
387
|
return /* @__PURE__ */ r.createElement("div", {
|
|
388
388
|
className: t
|
|
389
389
|
}, N(c, {
|
|
@@ -399,9 +399,9 @@ const Bt = (e) => {
|
|
|
399
399
|
}, [
|
|
400
400
|
o
|
|
401
401
|
]), d = {
|
|
402
|
-
[
|
|
403
|
-
[
|
|
404
|
-
[
|
|
402
|
+
[I.DRAW]: C(e, M.Draw),
|
|
403
|
+
[I.TYPE]: C(e, M.Type),
|
|
404
|
+
[I.UPLOAD]: s ? C(e, M.Upload) : null
|
|
405
405
|
}, f = d[n], m = Pt(f) ? f.props.description : void 0;
|
|
406
406
|
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("div", {
|
|
407
407
|
role: "status",
|
|
@@ -421,7 +421,7 @@ const Bt = (e) => {
|
|
|
421
421
|
"aria-controls": c,
|
|
422
422
|
"data-hook": mt.SIGNATURE_FIELD_MODE_SELECT,
|
|
423
423
|
className: t
|
|
424
|
-
}, d[
|
|
424
|
+
}, d[I.DRAW], d[I.TYPE], d[I.UPLOAD]));
|
|
425
425
|
}, Pt = (e) => /* @__PURE__ */ be(e), ue = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ r.createElement(lt, {
|
|
426
426
|
value: e,
|
|
427
427
|
"aria-label": n
|
|
@@ -430,16 +430,16 @@ const Bt = (e) => {
|
|
|
430
430
|
className: a
|
|
431
431
|
}, t)), Mt = (e) => /* @__PURE__ */ r.createElement(ue, {
|
|
432
432
|
...e,
|
|
433
|
-
mode:
|
|
433
|
+
mode: I.DRAW
|
|
434
434
|
}), Ht = (e) => /* @__PURE__ */ r.createElement(ue, {
|
|
435
435
|
...e,
|
|
436
|
-
mode:
|
|
436
|
+
mode: I.TYPE
|
|
437
437
|
}), Wt = (e) => /* @__PURE__ */ r.createElement(ue, {
|
|
438
438
|
...e,
|
|
439
|
-
mode:
|
|
439
|
+
mode: I.UPLOAD
|
|
440
440
|
}), Yt = ({ children: e, className: t, "aria-label": a, ...n }) => {
|
|
441
441
|
const { handleClear: o } = n, { disabled: s, target: l } = x(), { inputId: i } = W();
|
|
442
|
-
return /* @__PURE__ */ r.createElement(
|
|
442
|
+
return /* @__PURE__ */ r.createElement(Ce, {
|
|
443
443
|
onPress: o,
|
|
444
444
|
isDisabled: s,
|
|
445
445
|
"aria-label": a,
|
|
@@ -448,7 +448,7 @@ const Bt = (e) => {
|
|
|
448
448
|
className: t
|
|
449
449
|
}, e);
|
|
450
450
|
}, H = ({ children: e, className: t, ...a }) => {
|
|
451
|
-
const { signatureView: n, signatureValueForView: o, handleChange: s, handleBeforeChange: l } = a, { disabled: i, readOnly: c, onBlur: u, onFocus: d, hasError: f } = x(), m =
|
|
451
|
+
const { signatureView: n, signatureValueForView: o, handleChange: s, handleBeforeChange: l } = a, { disabled: i, readOnly: c, onBlur: u, onFocus: d, hasError: f } = x(), m = C(e, H.Canvas), L = C(e, H.Type), h = C(e, H.Upload);
|
|
452
452
|
return /* @__PURE__ */ r.createElement("div", {
|
|
453
453
|
className: t,
|
|
454
454
|
"data-hook": "signature-input",
|
|
@@ -480,9 +480,9 @@ const Bt = (e) => {
|
|
|
480
480
|
onBlur: u,
|
|
481
481
|
onFocus: d
|
|
482
482
|
}));
|
|
483
|
-
},
|
|
484
|
-
const { value: o, onChange: s, onBeforeChange: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = n, { id: f } = x(), { inputId: m, ariaDescribedBy: L } = W(), h = ce(), p = $(), g = $(), E = $(null), S = o == null ? void 0 : o.url, [
|
|
485
|
-
|
|
483
|
+
}, Zt = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
|
|
484
|
+
const { value: o, onChange: s, onBeforeChange: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = n, { id: f } = x(), { inputId: m, ariaDescribedBy: L } = W(), h = ce(), p = $(), g = $(), E = $(null), S = o == null ? void 0 : o.url, [Z, P] = q(!1);
|
|
485
|
+
Ie(() => {
|
|
486
486
|
var _;
|
|
487
487
|
(_ = g.current) == null || _.focus({
|
|
488
488
|
preventScroll: !0
|
|
@@ -507,7 +507,7 @@ const Bt = (e) => {
|
|
|
507
507
|
}, [
|
|
508
508
|
ee,
|
|
509
509
|
s
|
|
510
|
-
]),
|
|
510
|
+
]), G = y(() => {
|
|
511
511
|
l == null || l();
|
|
512
512
|
}, [
|
|
513
513
|
l
|
|
@@ -522,15 +522,15 @@ const Bt = (e) => {
|
|
|
522
522
|
k && (p.current.fromData(k), P(!0));
|
|
523
523
|
} else
|
|
524
524
|
p.current.clear(), P(!1);
|
|
525
|
-
p.current.addEventListener("beginStroke",
|
|
525
|
+
p.current.addEventListener("beginStroke", G), p.current.addEventListener("endStroke", z), typeof ResizeObserver < "u" && !E.current && (E.current = new ResizeObserver(() => {
|
|
526
526
|
g.current && Ee(g.current, p == null ? void 0 : p.current);
|
|
527
527
|
})), (U = E.current) == null || U.observe(_);
|
|
528
528
|
} else
|
|
529
|
-
(B = E.current) == null || B.disconnect(), (D = p.current) == null || D.removeEventListener("endStroke", z), (O = p.current) == null || O.removeEventListener("beginStroke",
|
|
529
|
+
(B = E.current) == null || B.disconnect(), (D = p.current) == null || D.removeEventListener("endStroke", z), (O = p.current) == null || O.removeEventListener("beginStroke", G);
|
|
530
530
|
}, [
|
|
531
531
|
v,
|
|
532
532
|
S,
|
|
533
|
-
|
|
533
|
+
G,
|
|
534
534
|
z
|
|
535
535
|
]);
|
|
536
536
|
return le(() => {
|
|
@@ -550,14 +550,14 @@ const Bt = (e) => {
|
|
|
550
550
|
onFocus: d,
|
|
551
551
|
onBlur: u,
|
|
552
552
|
role: "img",
|
|
553
|
-
"aria-label":
|
|
553
|
+
"aria-label": Z ? a : t,
|
|
554
554
|
"aria-describedby": L
|
|
555
555
|
}));
|
|
556
556
|
}, de = ({ children: e, className: t, ...a }) => {
|
|
557
557
|
const { value: n, onChange: o, onBeforeChange: s, disabled: l, readOnly: i, onBlur: c, onFocus: u } = a, { id: d, required: f, hasError: m } = x(), { inputId: L, ariaDescribedBy: h, labelId: p } = W(), g = ce(), E = n != null && n.url ? Y(n.url) : void 0, { data: S = "" } = E ?? {
|
|
558
558
|
data: ""
|
|
559
559
|
};
|
|
560
|
-
|
|
560
|
+
Ie(() => {
|
|
561
561
|
const v = document.getElementById(L);
|
|
562
562
|
v == null || v.focus({
|
|
563
563
|
preventScroll: !0
|
|
@@ -571,7 +571,7 @@ const Bt = (e) => {
|
|
|
571
571
|
n,
|
|
572
572
|
L
|
|
573
573
|
]);
|
|
574
|
-
const
|
|
574
|
+
const Z = y((v) => {
|
|
575
575
|
s == null || s(), v.trim() ? o(ie(Ae({
|
|
576
576
|
data: v,
|
|
577
577
|
mimeType: R.TEXT
|
|
@@ -579,11 +579,11 @@ const Bt = (e) => {
|
|
|
579
579
|
}, [
|
|
580
580
|
s,
|
|
581
581
|
o
|
|
582
|
-
]), P =
|
|
582
|
+
]), P = C(e, de.Value);
|
|
583
583
|
return /* @__PURE__ */ r.createElement(at, {
|
|
584
584
|
"aria-labelledby": p,
|
|
585
585
|
value: S,
|
|
586
|
-
onChange:
|
|
586
|
+
onChange: Z,
|
|
587
587
|
onBlur: c,
|
|
588
588
|
onFocus: u,
|
|
589
589
|
isDisabled: l,
|
|
@@ -598,7 +598,7 @@ const Bt = (e) => {
|
|
|
598
598
|
inputId: L,
|
|
599
599
|
ariaDescribedBy: h
|
|
600
600
|
})));
|
|
601
|
-
},
|
|
601
|
+
}, Gt = ({ className: e, placeholder: t, ...a }) => {
|
|
602
602
|
const { inputId: n, ariaDescribedBy: o } = a;
|
|
603
603
|
return /* @__PURE__ */ r.createElement(st, {
|
|
604
604
|
id: n,
|
|
@@ -608,7 +608,7 @@ const Bt = (e) => {
|
|
|
608
608
|
className: e
|
|
609
609
|
});
|
|
610
610
|
}, Q = ({ children: e, className: t, ...a }) => {
|
|
611
|
-
const { value: n, onChange: o, disabled: s, readOnly: l, onBlur: i, onFocus: c } = a, { labelId: u, ariaDescribedBy: d } = W(), f =
|
|
611
|
+
const { value: n, onChange: o, disabled: s, readOnly: l, onBlur: i, onFocus: c } = a, { labelId: u, ariaDescribedBy: d } = W(), f = C(e, Q.Button), m = C(e, Q.Preview), L = y((p) => {
|
|
612
612
|
const g = p[0];
|
|
613
613
|
if (!g) {
|
|
614
614
|
o(null);
|
|
@@ -664,7 +664,7 @@ const Bt = (e) => {
|
|
|
664
664
|
"data-hook": "signature-image"
|
|
665
665
|
}, n.displayName || t));
|
|
666
666
|
}, se = ({ children: e, className: t, onHoverStart: a, onHoverEnd: n, onFocusChange: o, ...s }) => {
|
|
667
|
-
const { onSelectFiles: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = s, { inputId: f, ariaDescribedBy: m, labelId: L } = W(), h = ft(), g = !!
|
|
667
|
+
const { onSelectFiles: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = s, { inputId: f, ariaDescribedBy: m, labelId: L } = W(), h = ft(), g = !!C(e, se.Text) ? Ne.map(e, (E) => /* @__PURE__ */ be(E) && E.type === se.Text ? N(E, {
|
|
668
668
|
textId: h
|
|
669
669
|
}) : E) : /* @__PURE__ */ r.createElement("span", {
|
|
670
670
|
id: h
|
|
@@ -676,7 +676,7 @@ const Bt = (e) => {
|
|
|
676
676
|
onSelect: (E) => {
|
|
677
677
|
l(E ? Array.from(E) : []);
|
|
678
678
|
}
|
|
679
|
-
}, /* @__PURE__ */ r.createElement(
|
|
679
|
+
}, /* @__PURE__ */ r.createElement(Ce, {
|
|
680
680
|
id: f,
|
|
681
681
|
onBlur: u,
|
|
682
682
|
onFocus: d,
|
|
@@ -697,20 +697,20 @@ const Bt = (e) => {
|
|
|
697
697
|
}, e);
|
|
698
698
|
};
|
|
699
699
|
b.Label = dt;
|
|
700
|
-
b.Input =
|
|
700
|
+
b.Input = K;
|
|
701
701
|
b.Description = ct;
|
|
702
702
|
b.Error = ut;
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
703
|
+
K.Header = J;
|
|
704
|
+
K.Value = H;
|
|
705
|
+
J.Tabs = M;
|
|
706
|
+
J.Clear = Yt;
|
|
707
707
|
M.Draw = Mt;
|
|
708
708
|
M.Type = Ht;
|
|
709
709
|
M.Upload = Wt;
|
|
710
|
-
H.Canvas =
|
|
710
|
+
H.Canvas = Zt;
|
|
711
711
|
H.Type = de;
|
|
712
712
|
H.Upload = Q;
|
|
713
|
-
de.Value =
|
|
713
|
+
de.Value = Gt;
|
|
714
714
|
Q.Preview = kt;
|
|
715
715
|
Q.Button = se;
|
|
716
716
|
se.Text = Vt;
|
|
@@ -770,9 +770,9 @@ const $t = () => {
|
|
|
770
770
|
}, /* @__PURE__ */ r.createElement("path", {
|
|
771
771
|
fillRule: "evenodd",
|
|
772
772
|
d: "M12,4 L12,5 L8,5 L8,16 L7,16 L7,5 L3,5 L3,4 L12,4 Z M18,8 L18,9 L15,9 L15,16 L14,16 L14,9 L11,9 L11,8 L18,8 Z"
|
|
773
|
-
})),
|
|
774
|
-
container:
|
|
775
|
-
header:
|
|
773
|
+
})), Kt = "_container_13c54_1", Jt = "_header_13c54_7", Qt = "_tabs_13c54_13", en = "_tab_13c54_13", tn = "_tabHover_13c54_43", nn = "_tabSelected_13c54_48", an = "_tabIcon_13c54_78", on = "_uploadButton_13c54_85", sn = "_uploadButtonHover_13c54_138", rn = "_uploadButtonLabel_13c54_155", ln = "_clear_13c54_159", cn = "_value_13c54_191", un = "_box_13c54_196", dn = "_uploadBox_13c54_197", mn = "_dropZone_13c54_228", pn = "_dropZoneHover_13c54_243", fn = "_boxHover_13c54_280", En = "_typeInput_13c54_335", T = {
|
|
774
|
+
container: Kt,
|
|
775
|
+
header: Jt,
|
|
776
776
|
tabs: Qt,
|
|
777
777
|
tab: en,
|
|
778
778
|
tabHover: tn,
|
|
@@ -793,9 +793,9 @@ const $t = () => {
|
|
|
793
793
|
content: e,
|
|
794
794
|
locale: t
|
|
795
795
|
}), hn = () => {
|
|
796
|
-
var
|
|
796
|
+
var G, te, _, w, U, B;
|
|
797
797
|
const e = $t(), { disabled: t, readOnly: a } = x(), n = !t && !a, o = X({
|
|
798
|
-
globalClasses:
|
|
798
|
+
globalClasses: Je,
|
|
799
799
|
moduleClasses: {
|
|
800
800
|
base: T.tab,
|
|
801
801
|
hover: T.tabHover,
|
|
@@ -833,24 +833,24 @@ const $t = () => {
|
|
|
833
833
|
hover: T.dropZoneHover
|
|
834
834
|
}
|
|
835
835
|
}), f = X({
|
|
836
|
-
globalClasses:
|
|
836
|
+
globalClasses: Ke,
|
|
837
837
|
moduleClasses: {
|
|
838
838
|
base: T.uploadButton,
|
|
839
839
|
hover: T.uploadButtonHover
|
|
840
840
|
}
|
|
841
|
-
}), m = (B = (U = (w = (_ = (te = (
|
|
841
|
+
}), m = (B = (U = (w = (_ = (te = (G = Le().signature) == null ? void 0 : G.elementProps) == null ? void 0 : te.dropZone) == null ? void 0 : _.elementProps) == null ? void 0 : w.uploadButton) == null ? void 0 : U.elementProps) == null ? void 0 : B.icon, { wix: L, className: h, ...p } = m ?? {}, g = He(ne.SIGNATURE, ne.SIGNATURE_DROP_ZONE, ne.SIGNATURE_UPLOAD_BUTTON, ne.UPLOAD_BUTTON_LABEL), E = $(null), [S, Z] = q(!1), [P, v] = q(!1), ee = y(() => {
|
|
842
842
|
var D;
|
|
843
|
-
|
|
843
|
+
Z(!0), (D = E.current) == null || D.runAnimationForward();
|
|
844
844
|
}, []), z = y(() => {
|
|
845
845
|
var D;
|
|
846
|
-
|
|
846
|
+
Z(!1), (D = E.current) == null || D.runAnimationBackward();
|
|
847
847
|
}, []);
|
|
848
848
|
return /* @__PURE__ */ r.createElement(b, null, /* @__PURE__ */ r.createElement(b.Label, {
|
|
849
849
|
className: F(We, ae.label)
|
|
850
850
|
}, /* @__PURE__ */ r.createElement(b.Label.Required, {
|
|
851
851
|
className: F(Ye, ae.requiredMark)
|
|
852
852
|
})), /* @__PURE__ */ r.createElement(b.Input, {
|
|
853
|
-
className: F(
|
|
853
|
+
className: F(Ze, T.container)
|
|
854
854
|
}, /* @__PURE__ */ r.createElement(b.Input.Header, {
|
|
855
855
|
className: T.header
|
|
856
856
|
}, /* @__PURE__ */ r.createElement(b.Input.Header.Tabs, {
|
|
@@ -874,7 +874,7 @@ const $t = () => {
|
|
|
874
874
|
}, /* @__PURE__ */ r.createElement(Xt, {
|
|
875
875
|
className: T.tabIcon
|
|
876
876
|
}))), /* @__PURE__ */ r.createElement(b.Input.Header.Clear, {
|
|
877
|
-
className: F(
|
|
877
|
+
className: F(Ge, T.clear),
|
|
878
878
|
"aria-label": e.clearLabel
|
|
879
879
|
}, /* @__PURE__ */ r.createElement(zt, null))), /* @__PURE__ */ r.createElement(b.Input.Value, {
|
|
880
880
|
className: T.value
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import t, { useRef as X, useCallback as y } from "react";
|
|
2
2
|
import J from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { bO as B, bI as K, aF as $, aE as j, aC as q, aB as z, aK as G, aJ as Q, aD as Y, b as Z, aA as tt, aI as et } from "./form-DpFQ9uO1.js";
|
|
5
5
|
import { ProgressBar as nt, Button as R } from "react-aria-components";
|
|
6
6
|
import { f as l } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { u as x } from "./use-element-state-class-name-
|
|
7
|
+
import { u as x } from "./use-element-state-class-name-DNjpnp27.js";
|
|
8
8
|
function ot(e) {
|
|
9
9
|
const s = "calc(50% - 2px)";
|
|
10
10
|
return /* @__PURE__ */ t.createElement(nt, {
|
|
@@ -78,7 +78,7 @@ const r = ({ children: e }) => {
|
|
|
78
78
|
const { showSubmitButton: a, onSubmitClick: c, submitText: b, isDisabled: i, isInProgress: m, isSubmitting: C } = B();
|
|
79
79
|
if (!a)
|
|
80
80
|
return null;
|
|
81
|
-
const
|
|
81
|
+
const I = l(n, v.Label), f = l(n, v.Icon), d = l(n, v.Loader), _ = C || m;
|
|
82
82
|
return /* @__PURE__ */ t.createElement(R, {
|
|
83
83
|
className: e,
|
|
84
84
|
"aria-label": b,
|
|
@@ -88,7 +88,7 @@ const r = ({ children: e }) => {
|
|
|
88
88
|
isDisabled: i && !_,
|
|
89
89
|
"aria-disabled": _ || void 0,
|
|
90
90
|
"data-in-progress": m
|
|
91
|
-
}, m && d ? d : /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
91
|
+
}, m && d ? d : /* @__PURE__ */ t.createElement(t.Fragment, null, I ?? /* @__PURE__ */ t.createElement(D, null), f));
|
|
92
92
|
}, D = ({ className: e }) => {
|
|
93
93
|
const { submitText: o } = B();
|
|
94
94
|
return /* @__PURE__ */ t.createElement("span", {
|
|
@@ -130,7 +130,7 @@ const at = "_navigationContainer_189lv_1", rt = "_rowSpacing_189lv_6", ut = "_na
|
|
|
130
130
|
buttonWithSteps: Bt,
|
|
131
131
|
buttonHover: bt,
|
|
132
132
|
progress: St
|
|
133
|
-
},
|
|
133
|
+
}, O = () => {
|
|
134
134
|
const e = X(null), o = y(() => {
|
|
135
135
|
var n;
|
|
136
136
|
return (n = e.current) == null ? void 0 : n.runAnimationForward();
|
|
@@ -143,7 +143,7 @@ const at = "_navigationContainer_189lv_1", rt = "_rowSpacing_189lv_6", ut = "_na
|
|
|
143
143
|
onHoverStart: o,
|
|
144
144
|
onHoverEnd: s
|
|
145
145
|
};
|
|
146
|
-
},
|
|
146
|
+
}, P = ({ icon: e, iconRef: o, iconClassName: s }) => {
|
|
147
147
|
const { wix: n, className: a, ...c } = e ?? {};
|
|
148
148
|
return c.svg ? /* @__PURE__ */ t.createElement(J, {
|
|
149
149
|
...c,
|
|
@@ -152,7 +152,7 @@ const at = "_navigationContainer_189lv_1", rt = "_rowSpacing_189lv_6", ut = "_na
|
|
|
152
152
|
}) : null;
|
|
153
153
|
}, Et = () => {
|
|
154
154
|
var F, h, U, w, M, k;
|
|
155
|
-
const { hasSteps: e, showPreviousButton: o, isDisabled: s, isInProgress: n, isSubmitting: a } = B(), b = !s && !(a || n), i = K(), m = (h = (F = i.submitButton) == null ? void 0 : F.elementProps) == null ? void 0 : h.icon, C = (w = (U = i.nextButton) == null ? void 0 : U.elementProps) == null ? void 0 : w.icon,
|
|
155
|
+
const { hasSteps: e, showPreviousButton: o, isDisabled: s, isInProgress: n, isSubmitting: a } = B(), b = !s && !(a || n), i = K(), m = (h = (F = i.submitButton) == null ? void 0 : F.elementProps) == null ? void 0 : h.icon, C = (w = (U = i.nextButton) == null ? void 0 : U.elementProps) == null ? void 0 : w.icon, I = (k = (M = i.previousButton) == null ? void 0 : M.elementProps) == null ? void 0 : k.icon, f = x({
|
|
156
156
|
globalClasses: Y,
|
|
157
157
|
moduleClasses: {
|
|
158
158
|
base: p(u.navigationButton, u.previousButton),
|
|
@@ -173,14 +173,14 @@ const at = "_navigationContainer_189lv_1", rt = "_rowSpacing_189lv_6", ut = "_na
|
|
|
173
173
|
}),
|
|
174
174
|
hover: u.buttonHover
|
|
175
175
|
}
|
|
176
|
-
}), H =
|
|
176
|
+
}), H = O(), L = O(), T = O();
|
|
177
177
|
return /* @__PURE__ */ t.createElement(r, null, /* @__PURE__ */ t.createElement(r.SubmitButton, {
|
|
178
178
|
className: p({
|
|
179
179
|
[u.navigationContainer]: e,
|
|
180
180
|
[u.rowSpacing]: o
|
|
181
181
|
})
|
|
182
182
|
}, /* @__PURE__ */ t.createElement(r.SubmitButton.PreviousButton, {
|
|
183
|
-
className: ({ isHovered: N }) =>
|
|
183
|
+
className: ({ isHovered: N }) => f({
|
|
184
184
|
isSelected: !1,
|
|
185
185
|
isHovered: N
|
|
186
186
|
}),
|
|
@@ -188,8 +188,8 @@ const at = "_navigationContainer_189lv_1", rt = "_rowSpacing_189lv_6", ut = "_na
|
|
|
188
188
|
onHoverEnd: T.onHoverEnd
|
|
189
189
|
}, /* @__PURE__ */ t.createElement(r.SubmitButton.PreviousButton.Label, {
|
|
190
190
|
className: $
|
|
191
|
-
}), /* @__PURE__ */ t.createElement(r.SubmitButton.PreviousButton.Icon, null, /* @__PURE__ */ t.createElement(
|
|
192
|
-
icon:
|
|
191
|
+
}), /* @__PURE__ */ t.createElement(r.SubmitButton.PreviousButton.Icon, null, /* @__PURE__ */ t.createElement(P, {
|
|
192
|
+
icon: I,
|
|
193
193
|
iconRef: T.iconRef,
|
|
194
194
|
iconClassName: j
|
|
195
195
|
}))), /* @__PURE__ */ t.createElement(r.SubmitButton.NextButton, {
|
|
@@ -201,7 +201,7 @@ const at = "_navigationContainer_189lv_1", rt = "_rowSpacing_189lv_6", ut = "_na
|
|
|
201
201
|
onHoverEnd: L.onHoverEnd
|
|
202
202
|
}, /* @__PURE__ */ t.createElement(r.SubmitButton.NextButton.Label, {
|
|
203
203
|
className: q
|
|
204
|
-
}), /* @__PURE__ */ t.createElement(r.SubmitButton.NextButton.Icon, null, /* @__PURE__ */ t.createElement(
|
|
204
|
+
}), /* @__PURE__ */ t.createElement(r.SubmitButton.NextButton.Icon, null, /* @__PURE__ */ t.createElement(P, {
|
|
205
205
|
icon: C,
|
|
206
206
|
iconRef: L.iconRef,
|
|
207
207
|
iconClassName: z
|
|
@@ -215,14 +215,14 @@ const at = "_navigationContainer_189lv_1", rt = "_rowSpacing_189lv_6", ut = "_na
|
|
|
215
215
|
onHoverEnd: H.onHoverEnd
|
|
216
216
|
}, /* @__PURE__ */ t.createElement(r.SubmitButton.SubmitButton.Label, {
|
|
217
217
|
className: G
|
|
218
|
-
}), /* @__PURE__ */ t.createElement(r.SubmitButton.SubmitButton.Icon, null, /* @__PURE__ */ t.createElement(
|
|
218
|
+
}), /* @__PURE__ */ t.createElement(r.SubmitButton.SubmitButton.Icon, null, /* @__PURE__ */ t.createElement(P, {
|
|
219
219
|
icon: m,
|
|
220
220
|
iconRef: H.iconRef,
|
|
221
221
|
iconClassName: Q
|
|
222
222
|
})), /* @__PURE__ */ t.createElement(r.SubmitButton.SubmitButton.Loader, {
|
|
223
223
|
className: u.progress
|
|
224
224
|
}))));
|
|
225
|
-
},
|
|
225
|
+
}, ft = () => /* @__PURE__ */ t.createElement(Et, null);
|
|
226
226
|
export {
|
|
227
|
-
|
|
227
|
+
ft as SubmitButtonRAC
|
|
228
228
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
2
|
import F from "classnames";
|
|
3
|
-
import t, { useRef as S, useMemo as I, useState as
|
|
4
|
-
import { CheckboxGroup as w, TextField as z, Input as B, CheckboxField as J, CheckboxButton as
|
|
5
|
-
import {
|
|
6
|
-
import { f, a as
|
|
7
|
-
import { E as
|
|
8
|
-
import { L as P } from "./field-label-headless-
|
|
3
|
+
import t, { useRef as S, useMemo as I, useState as K, useLayoutEffect as Z, useCallback as N } from "react";
|
|
4
|
+
import { CheckboxGroup as w, TextField as z, Input as B, CheckboxField as J, CheckboxButton as Y } from "react-aria-components";
|
|
5
|
+
import { bO as y, bL as M, bX as U, bZ as T, bQ as ee, X as te, am as oe, ax as ne, M as ae, I as se, ay as re } from "./form-DpFQ9uO1.js";
|
|
6
|
+
import { f, a as k } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { E as W, D as H } from "./field-error-headless-D3lVhOaC.js";
|
|
8
|
+
import { L as P } from "./field-label-headless-CrZoTwxs.js";
|
|
9
9
|
import { F as le } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { E as ie } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as D } from "./field-rac.module-D0QzJXUv.js";
|
|
12
|
-
import { u as ce } from "./use-element-state-class-name-
|
|
13
|
-
import { u as ue } from "./use-text-input-class-name-
|
|
12
|
+
import { u as ce } from "./use-element-state-class-name-DNjpnp27.js";
|
|
13
|
+
import { u as ue } from "./use-text-input-class-name-BBZXre-_.js";
|
|
14
14
|
var de = /* @__PURE__ */ (function(e) {
|
|
15
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;
|
|
16
16
|
})({});
|
|
@@ -26,11 +26,11 @@ const v = "Other", me = (e, o) => {
|
|
|
26
26
|
const { value: o, onChange: s, addOtherLabel: i, addOtherPlaceholder: r, otherInputCharacterLimit: l, disabled: u, readOnly: p, hasError: d } = y(), { t: h } = T(), n = i || h("add-other.default-other-option-label") || v, b = I(() => me(o || [], n), [
|
|
27
27
|
o,
|
|
28
28
|
n
|
|
29
|
-
]), [c, L] =
|
|
30
|
-
|
|
29
|
+
]), [c, L] = K(b), O = S(s);
|
|
30
|
+
Z(() => {
|
|
31
31
|
O.current = s;
|
|
32
32
|
});
|
|
33
|
-
const g =
|
|
33
|
+
const g = N((E) => {
|
|
34
34
|
L(E);
|
|
35
35
|
const C = (o || []).filter((m) => !m.startsWith(`${n}:`) && m !== n), _ = E ? `${n}: ${E}` : n;
|
|
36
36
|
O.current([
|
|
@@ -70,12 +70,12 @@ const v = "Other", me = (e, o) => {
|
|
|
70
70
|
E,
|
|
71
71
|
r,
|
|
72
72
|
i
|
|
73
|
-
]), _ =
|
|
74
|
-
const G = pe(n || []),
|
|
73
|
+
]), _ = N((m) => {
|
|
74
|
+
const G = pe(n || []), x = E.filter((Q) => G.includes(Q));
|
|
75
75
|
h(m ? [
|
|
76
|
-
...
|
|
76
|
+
...x,
|
|
77
77
|
r
|
|
78
|
-
] :
|
|
78
|
+
] : x);
|
|
79
79
|
}, [
|
|
80
80
|
r,
|
|
81
81
|
h,
|
|
@@ -89,10 +89,10 @@ const v = "Other", me = (e, o) => {
|
|
|
89
89
|
isDisabled: b,
|
|
90
90
|
isReadOnly: c,
|
|
91
91
|
isInvalid: L
|
|
92
|
-
}, /* @__PURE__ */ t.createElement(
|
|
92
|
+
}, /* @__PURE__ */ t.createElement(Y, {
|
|
93
93
|
className: o,
|
|
94
94
|
"data-hook": `tags-${l ? v : i}`
|
|
95
|
-
},
|
|
95
|
+
}, k(g, {
|
|
96
96
|
value: i,
|
|
97
97
|
label: r,
|
|
98
98
|
isOther: l,
|
|
@@ -119,7 +119,7 @@ const v = "Other", me = (e, o) => {
|
|
|
119
119
|
"data-columns": l
|
|
120
120
|
}, h.map((n, b) => {
|
|
121
121
|
const c = n.value ?? n.label;
|
|
122
|
-
return
|
|
122
|
+
return k(d, {
|
|
123
123
|
key: n.isOther ? v : c,
|
|
124
124
|
value: c,
|
|
125
125
|
label: n.label,
|
|
@@ -143,7 +143,7 @@ const v = "Other", me = (e, o) => {
|
|
|
143
143
|
U(O);
|
|
144
144
|
const g = I(() => s || [], [
|
|
145
145
|
s
|
|
146
|
-
]), E = f(e, P), C = f(e, q), _ = f(e, H), m = f(e,
|
|
146
|
+
]), E = f(e, P), C = f(e, q), _ = f(e, H), m = f(e, W);
|
|
147
147
|
return /* @__PURE__ */ t.createElement(r, {
|
|
148
148
|
fieldId: o,
|
|
149
149
|
renderLabel: () => E,
|
|
@@ -174,21 +174,21 @@ a.Control = q;
|
|
|
174
174
|
a.Options = A;
|
|
175
175
|
a.OtherInput = j;
|
|
176
176
|
a.Description = H;
|
|
177
|
-
a.Error =
|
|
177
|
+
a.Error = W;
|
|
178
178
|
const he = "_control_oshjt_1", Ee = "_options_oshjt_7", be = "_option_oshjt_7", Oe = "_optionHover_oshjt_76", fe = "_optionSelected_oshjt_76", R = {
|
|
179
179
|
control: he,
|
|
180
180
|
options: Ee,
|
|
181
181
|
option: be,
|
|
182
182
|
optionHover: Oe,
|
|
183
183
|
optionSelected: fe
|
|
184
|
-
}, Ie = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(
|
|
184
|
+
}, Ie = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement(X, {
|
|
185
185
|
content: e,
|
|
186
186
|
locale: o
|
|
187
187
|
}), Le = {
|
|
188
188
|
base: R.option,
|
|
189
189
|
selected: R.optionSelected,
|
|
190
190
|
hover: R.optionHover
|
|
191
|
-
},
|
|
191
|
+
}, Ne = () => {
|
|
192
192
|
const e = ce({
|
|
193
193
|
globalClasses: re,
|
|
194
194
|
moduleClasses: Le
|
|
@@ -212,5 +212,5 @@ const he = "_control_oshjt_1", Ee = "_options_oshjt_7", be = "_option_oshjt_7",
|
|
|
212
212
|
}, Ie));
|
|
213
213
|
};
|
|
214
214
|
export {
|
|
215
|
-
|
|
215
|
+
Ne as T
|
|
216
216
|
};
|