@wix/form-elements 1.161.0 → 1.162.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-BubC8I9X.js → appointment-rac-3Z1wiBX6.js} +123 -123
- package/dist/component/{bookings-address-rac-BbwvVs86.js → bookings-address-rac-2zV-a8SW.js} +1 -1
- package/dist/component/{bookings-email-rac-C2HCkcfa.js → bookings-email-rac-C1WakVnh.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Uy7c5EBs.js → bookings-first-name-rac-6f18uXA0.js} +1 -1
- package/dist/component/{bookings-header-rac-nmwsWRjS.js → bookings-header-rac-BeaxlPQl.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BAioQLCg.js → bookings-last-name-rac-CsLZaKfO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CO6vOBjG.js → bookings-login-bar-rac-B3TRivWU.js} +6 -6
- package/dist/component/{bookings-phone-rac-Cr16h-_R.js → bookings-phone-rac-BnFEknvv.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CHLH3jd7.js → bookings-rich-text-rac-CFPqDZay.js} +1 -1
- package/dist/component/{calendar.module-CKCBG_Pg.js → calendar.module-BMUyMVja.js} +19 -19
- package/dist/component/{checkbox-field-rac-CMwmwFMD.js → checkbox-field-rac-DqGbxAd0.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-BNs_S-nT.js → checkbox-group-field-headless-CiobdaVa.js} +27 -27
- package/dist/component/{checkbox-group-field-rac-BA60EPAN.js → checkbox-group-field-rac-Dxrc2F4x.js} +6 -6
- package/dist/component/{checkbox-group-rac-BJZ4Oer9.js → checkbox-group-rac-C3tL4YSr.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-akWZsZNn.js → checkbox-indicator-module-classes-DUTR4mcg.js} +1 -1
- package/dist/component/{checkbox-rac-KsVlI6_V.js → checkbox-rac-DhZsIMuk.js} +1 -1
- package/dist/component/{contacts-address-rac-CRYkz87z.js → contacts-address-rac--GiWpa6C.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BIz-1-ZX.js → contacts-birthdate-rac-CmI2nPpr.js} +1 -1
- package/dist/component/{contacts-company-rac-B8G__j6I.js → contacts-company-rac-DcSLvPnR.js} +1 -1
- package/dist/component/{contacts-email-rac-Dztkvp5i.js → contacts-email-rac-BLOIHGP9.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CVSEWpLU.js → contacts-first-name-rac-DgMCKLeE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Blz4M5bk.js → contacts-last-name-rac-tcEQP1Db.js} +1 -1
- package/dist/component/{contacts-phone-rac-CPCE5soY.js → contacts-phone-rac-CK664cfW.js} +1 -1
- package/dist/component/{contacts-position-rac-Dd_kBjqG.js → contacts-position-rac-B8skwXy6.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C6AlsP10.js → contacts-subscribe-rac-DQZYJjMo.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CQ1n29zI.js → contacts-tax-id-rac-Ci24ixLu.js} +1 -1
- package/dist/component/{date-availability-DDj1j0z5.js → date-availability-Va6_2NAZ.js} +1 -1
- package/dist/component/{date-input-field-rac-D5r1n_ah.js → date-input-field-rac-lAKyuHOI.js} +89 -89
- package/dist/component/{date-input-rac-Cyi5mU_P.js → date-input-rac-ClEesupR.js} +1 -1
- package/dist/component/{date-picker-field-rac-CeG391Zo.js → date-picker-field-rac-h45jfoso.js} +54 -54
- package/dist/component/{date-picker-rac-Ci9aHgav.js → date-picker-rac-B-pvqBn0.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CrbYEbJJ.js → date-time-input-field-rac-41QpurJp.js} +80 -80
- package/dist/component/{date-time-input-rac-DDJLkqs0.js → date-time-input-rac-BQOUl7It.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-C3ftVHBA.js → dext-checkbox-group-rac-C4Q6tfBD.js} +4 -4
- package/dist/component/{dext-checkbox-rac-BGLYWn68.js → dext-checkbox-rac-Yo2PHNDA.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Cy9RlDlt.js → dext-date-picker-rac-jM9x8W6a.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-88ZoTd5e.js → dext-date-time-input-rac-BgW_4WIg.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CPxDUuk9.js → dext-dropdown-rac-DCL7D6-G.js} +1 -1
- package/dist/component/{dext-email-rac-BAvQwDPA.js → dext-email-rac-Dz7yBqkd.js} +1 -1
- package/dist/component/{dext-number-input-rac-D7HYQVKq.js → dext-number-input-rac-BdMjBpH9.js} +1 -1
- package/dist/component/{dext-phone-rac--FhcplSI.js → dext-phone-rac-D2i9fXL3.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DBz8iCKW.js → dext-radio-group-rac-Br2f1Ahx.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cv7nThfe.js → dext-rating-input-rac-OkfJ7Eb0.js} +1 -1
- package/dist/component/{dext-tags-rac-CRUUc5dr.js → dext-tags-rac-43vDoDdM.js} +2 -2
- package/dist/component/{dext-text-area-rac-DQBQXV1L.js → dext-text-area-rac-C072pWO9.js} +1 -1
- package/dist/component/{dext-text-input-rac-4CpM581y.js → dext-text-input-rac-BiHJpJCt.js} +1 -1
- package/dist/component/{dext-url-input-rac-0C1jTEr9.js → dext-url-input-rac-YOGYMj5C.js} +1 -1
- package/dist/component/{donation-rac-Cgt0ZE50.js → donation-rac-fCt3mddA.js} +98 -98
- package/dist/component/{dropdown-field-rac-DlGKR7pZ.js → dropdown-field-rac-EQrQJ2-C.js} +4 -4
- package/dist/component/{dropdown-rac-CYFW_3x_.js → dropdown-rac-MPCcjrFd.js} +1 -1
- package/dist/component/{ecom-address-rac-CQfQHpXC.js → ecom-address-rac-DSgpHqzV.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D2v2Upvz.js → ecom-subscription-checkbox-rac-Dw6Ke0Fb.js} +2 -2
- package/dist/component/{email-input-field-rac-CVw25yRo.js → email-input-field-rac-DVmvH4u4.js} +48 -48
- package/dist/component/{events-repeater-rac-BCVUcmFj.js → events-repeater-rac-Uwpo7XF4.js} +24 -24
- package/dist/component/{events-rsvp-rac-DwbqEr8z.js → events-rsvp-rac-D2DJAkep.js} +4 -4
- package/dist/component/{field-error-headless-XnVcMmsL.js → field-error-headless-DAc8FpKI.js} +8 -8
- package/dist/component/{field-label-headless-BRTLT2Yt.js → field-label-headless-DxxwJtjh.js} +17 -17
- package/dist/component/field-rac.module-ts2t4WUO.js +25 -0
- package/dist/component/{file-upload-rac-Dkwg9Jk4.js → file-upload-rac-CBKIeaxX.js} +163 -163
- package/dist/component/{fixed-payment-rac-ST98xAa2.js → fixed-payment-rac-BsCDoc1p.js} +18 -18
- package/dist/component/{form-BUqSKOvc.js → form-GAuLAdjq.js} +326 -336
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CzNTGYWq.js → header-field-rac-DtZCjzLJ.js} +6 -6
- package/dist/component/{header-rac-DUt6AIAE.js → header-rac-B1hlVDf8.js} +1 -1
- package/dist/component/image-choice-rac-DQaCg_Xk.js +155 -0
- package/dist/component/{index-cZZeAuuu.js → index-BaVjVNYj.js} +2 -2
- package/dist/component/{index-CDO22hht.js → index-C1EXd9jU.js} +69 -69
- package/dist/component/{isObjectLike-cs4bARpC.js → isObjectLike-m2dqIREj.js} +3 -3
- package/dist/component/{multiline-address-field-rac-vcEWhUCV.js → multiline-address-field-rac-CMMdLb-J.js} +41 -41
- package/dist/component/{multiline-address-rac-WQaI2eUX.js → multiline-address-rac-VUQNp-Tz.js} +1 -1
- package/dist/component/{number-input-field-rac-CBUMqATk.js → number-input-field-rac-B5bsGDKm.js} +24 -24
- package/dist/component/{number-input-rac-B4j5hyzS.js → number-input-rac-BzzW0p9R.js} +1 -1
- package/dist/component/{password-rac-DwLyf45N.js → password-rac-2Rr7lvNO.js} +17 -17
- package/dist/component/{payment-input-rac-D0Od---y.js → payment-input-rac-CEUzIrJA.js} +32 -32
- package/dist/component/{phone-input-field-rac-COlu9IeC.js → phone-input-field-rac-BDBaqAzE.js} +48 -48
- package/dist/component/{phone-rac-Dh4RacOF.js → phone-rac-BTK8-tkq.js} +1 -1
- package/dist/component/{product-list-rac-D7zHDE2D.js → product-list-rac-1QbeT5RH.js} +26 -26
- package/dist/component/{quiz-radio-group-rac-1AaKphJt.js → quiz-radio-group-rac-tn2CzdCu.js} +1 -1
- package/dist/component/{radio-button-module-classes-VqaP6vpA.js → radio-button-module-classes-aK1SQcLG.js} +34 -34
- package/dist/component/{radio-group-field-rac-Cp3LRN3C.js → radio-group-field-rac-DlMXhW_S.js} +5 -5
- package/dist/component/{radio-group-rac-KhmhzYGf.js → radio-group-rac-BmU_5tBK.js} +1 -1
- package/dist/component/{rating-input-field-rac-10n6ciCr.js → rating-input-field-rac-DUPJUAX2.js} +30 -30
- package/dist/component/{rating-input-rac-XZjjY2Gp.js → rating-input-rac-BLhkZdj8.js} +1 -1
- package/dist/component/{rich-content-rac.module-kMwDoLBa.js → rich-content-rac.module-C9bGXB69.js} +5 -5
- package/dist/component/{rich-text-field-rac-H5bd8fAt.js → rich-text-field-rac-CVqmsZzZ.js} +4 -4
- package/dist/component/{rich-text-rac-88GSQR62.js → rich-text-rac-D8K6445F.js} +1 -1
- package/dist/component/{service-dropdown-rac-B1_Xr_X3.js → service-dropdown-rac-PR_iLdmo.js} +26 -26
- package/dist/component/{services-multi-choice-rac-DWp_Llbi.js → services-multi-choice-rac-BvMadJCf.js} +15 -15
- package/dist/component/{signature-rac-zN_6KRDp.js → signature-rac-Cpjv6kcl.js} +235 -235
- package/dist/component/{submit-button-rac-Dv6UarYX.js → submit-button-rac-DpDk7cMb.js} +7 -7
- package/dist/component/{tags-field-rac-sVN6MHfJ.js → tags-field-rac-DnyWNHXT.js} +75 -75
- package/dist/component/{tags-rac-DhTHs_XN.js → tags-rac-D5Do7BNm.js} +1 -1
- package/dist/component/{text-area-field-rac-DrWkww7W.js → text-area-field-rac-DLBgla0L.js} +19 -19
- package/dist/component/{text-area-rac-CXXh-ZdY.js → text-area-rac-Bfsl2gSn.js} +1 -1
- package/dist/component/{text-input-field-rac-C2YiMr-g.js → text-input-field-rac-hLsUcQNw.js} +4 -4
- package/dist/component/{text-input-headless-BJMNbsMY.js → text-input-headless-Otd7Uy7V.js} +11 -11
- package/dist/component/{text-input-rac-CpsPh7FH.js → text-input-rac-jpnc-v91.js} +1 -1
- package/dist/component/{time-input-rac-DG_1KxS4.js → time-input-rac-DnjrmZZw.js} +20 -20
- package/dist/component/url-input-field-rac-C90NYHb8.js +77 -0
- package/dist/component/{url-input-rac-BTStO0NP.js → url-input-rac-C3wfEnqs.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DbMMg1ws.js → use-dropdown-option-class-name-CYkLlKBs.js} +12 -12
- package/dist/component/{use-dropdown-trigger-class-name-Yes4kC_0.js → use-dropdown-trigger-class-name-CTt4Z67m.js} +19 -19
- package/dist/component/{use-element-state-class-name-DlncY4hk.js → use-element-state-class-name-ByDw6j7c.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C__zqP5j.js → use-hoverable-input-class-name-Duhgtn2I.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DnK_MQRO.js → use-is-forced-open-dropdown-B5gNY4Zm.js} +4 -4
- package/dist/component/{use-service-options-base-DKJe52Vk.js → use-service-options-base-DE-QaNDw.js} +3 -3
- package/dist/component/use-text-input-class-name-CmxSw6bY.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DP0lkkEv.js +0 -25
- package/dist/component/image-choice-rac-DuBgrSt2.js +0 -155
- package/dist/component/url-input-field-rac-twxRREnl.js +0 -77
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +0 -6
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s, { useRef as $, useContext as Ne, useMemo as be, useCallback as _, useState as q, useEffect as le, Children as Fe, isValidElement as Le } from "react";
|
|
2
2
|
import we from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import { RicosViewer as xe } from "@wix/ricos/viewer";
|
|
4
4
|
import F from "classnames";
|
|
5
|
-
import {
|
|
5
|
+
import { b0 as Ue, bs as Te, aE as Be, F as Oe, bu as Pe, bq as Me, bG as Ce, E as me, au as oe, by as x, bv as W, bA as Ie, bI as He, br as We, U as Ye, aa as Ge, ab as Ze, G as pe, b as ke, ah as Ve, ai as fe, K as $e, ac as ze, af as Xe, ad as qe, ag as je, f as ne, ae as Ke } from "./form-GAuLAdjq.js";
|
|
6
6
|
import { useHover as Je, useFocusRing as Qe, mergeProps as et } from "react-aria";
|
|
7
|
-
import { RadioGroup as tt, Button as ye, TextField as nt, DropZone as at, Input as ot, FileTrigger as
|
|
7
|
+
import { RadioGroup as tt, Button as ye, TextField as nt, DropZone as at, Input as ot, FileTrigger as rt, RadioField as st, RadioButton as lt } from "react-aria-components";
|
|
8
8
|
import _e from "signature_pad";
|
|
9
9
|
import { f as I, a as N } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as it, E as ct } from "./field-error-headless-
|
|
11
|
-
import { L as ut } from "./field-label-headless-
|
|
10
|
+
import { D as it, E as ct } from "./field-error-headless-DAc8FpKI.js";
|
|
11
|
+
import { L as ut } from "./field-label-headless-DxxwJtjh.js";
|
|
12
12
|
import { D as dt } from "./data-hooks-Dkw1pbRj.js";
|
|
13
13
|
import { E as mt } from "./error-icon-hZxQ6DEy.js";
|
|
14
|
-
import { s as ae } from "./field-rac.module-
|
|
15
|
-
import { u as
|
|
16
|
-
const pt = typeof
|
|
14
|
+
import { s as ae } from "./field-rac.module-ts2t4WUO.js";
|
|
15
|
+
import { u as X } from "./use-element-state-class-name-ByDw6j7c.js";
|
|
16
|
+
const pt = typeof s.useId == "function" ? s.useId : () => $(Ue()).current, ft = ({ properties: e }) => e.uploadEnabled === !0, Et = (e, t) => e.fieldType === Oe.SIGNATURE && !e.properties.hidden && !e.properties.disabled && !e.properties.readOnly && (t !== "upload" || ft(e)), gt = (e, t) => e.layout.row - t.layout.row || e.layout.column - t.layout.column, ht = (e) => {
|
|
17
17
|
var o;
|
|
18
18
|
const t = (o = Te().signature) == null ? void 0 : o.signatureMode, a = Ne(Be);
|
|
19
19
|
return be(() => {
|
|
20
|
-
var
|
|
21
|
-
return a && !a.parentId && t ? (
|
|
20
|
+
var r;
|
|
21
|
+
return a && !a.parentId && t ? (r = a.fields.filter((l) => Et(l, t)).sort(gt)[0]) == null ? void 0 : r.id : void 0;
|
|
22
22
|
}, [
|
|
23
23
|
a,
|
|
24
24
|
t
|
|
@@ -36,11 +36,11 @@ const bt = (e) => {
|
|
|
36
36
|
return _(async (o) => {
|
|
37
37
|
if (!n)
|
|
38
38
|
throw new Error("No uploadFile action");
|
|
39
|
-
const
|
|
39
|
+
const r = await n({
|
|
40
40
|
file: o,
|
|
41
41
|
formId: a,
|
|
42
42
|
uploadTarget: e
|
|
43
|
-
}), { id: l, displayName: i, url: c, isPrivate: u } =
|
|
43
|
+
}), { id: l, displayName: i, url: c, isPrivate: u } = r;
|
|
44
44
|
return {
|
|
45
45
|
fileId: l,
|
|
46
46
|
displayName: i || o.name,
|
|
@@ -62,26 +62,26 @@ function Lt(e) {
|
|
|
62
62
|
const Tt = (e, t) => {
|
|
63
63
|
const a = Lt(e);
|
|
64
64
|
return (n, o) => {
|
|
65
|
-
const
|
|
66
|
-
return t.data[
|
|
65
|
+
const r = (o * t.width + n) * 4;
|
|
66
|
+
return t.data[r] * 65536 + t.data[r + 1] * 256 + t.data[r + 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
|
-
function
|
|
72
|
+
function se(e, t) {
|
|
73
73
|
const a = e.getContext("2d", {
|
|
74
74
|
willReadFrequently: !0
|
|
75
|
-
}), n = e.width, o = e.height,
|
|
75
|
+
}), n = e.width, o = e.height, r = a.getImageData(0, 0, n, o), l = t ? Tt(t, r) : Ct(r);
|
|
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++)
|
|
79
79
|
l(f, m) || (i > f && (i = f), c < f && (c = f), u > m && (u = m), d < m && (d = m));
|
|
80
|
-
const L = c - i,
|
|
81
|
-
if (L < 0 ||
|
|
80
|
+
const L = c - i, h = d - u;
|
|
81
|
+
if (L < 0 || h < 0)
|
|
82
82
|
return null;
|
|
83
|
-
const p = a.getImageData(i, u, L,
|
|
84
|
-
return
|
|
83
|
+
const p = a.getImageData(i, u, L, h), g = document.createElement("canvas"), E = g.getContext("2d");
|
|
84
|
+
return g.width = L, g.height = h, t ? (E.fillStyle = t, E.fillRect(0, 0, L, h)) : E.clearRect(0, 0, L, h), E.putImageData(p, 0, 0), g;
|
|
85
85
|
}
|
|
86
86
|
function j(e, t, a) {
|
|
87
87
|
const n = document.createElement("canvas");
|
|
@@ -97,22 +97,22 @@ function It(e, t) {
|
|
|
97
97
|
return new Promise((a, n) => {
|
|
98
98
|
const o = new Image();
|
|
99
99
|
o.onload = () => {
|
|
100
|
-
const
|
|
100
|
+
const r = j(o.width, o.height), l = r.getContext("2d", {
|
|
101
101
|
willReadFrequently: !0
|
|
102
102
|
});
|
|
103
|
-
l == null || l.drawImage(o, 0, 0), a(
|
|
103
|
+
l == null || l.drawImage(o, 0, 0), a(r);
|
|
104
104
|
}, o.onerror = n, o.src = e;
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const o = e.width,
|
|
109
|
-
return n && m && (m.fillStyle = n, m.fillRect(0, 0, u, d)), m == null || m.drawImage(e, 0, 0, o,
|
|
107
|
+
function Ee(e, t, a, n) {
|
|
108
|
+
const o = e.width, r = e.height, l = 1, i = a / r, c = Math.min(i, l), u = o * c, d = r * c, f = j(u, d), m = f.getContext("2d");
|
|
109
|
+
return n && m && (m.fillStyle = n, m.fillRect(0, 0, u, d)), m == null || m.drawImage(e, 0, 0, o, r, 0, 0, u, d), f;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
const a = e.getContext("2d"), n = e.offsetWidth, o = e.offsetHeight,
|
|
113
|
-
return (e.width !== l || e.height !== i) && a ? (e.width = l, e.height = i, a.scale(
|
|
111
|
+
function ge(e, t) {
|
|
112
|
+
const a = e.getContext("2d"), n = e.offsetWidth, o = e.offsetHeight, r = Math.max(window.devicePixelRatio || 1, 1), l = n * r, i = o * r;
|
|
113
|
+
return (e.width !== l || e.height !== i) && a ? (e.width = l, e.height = i, a.scale(r, r), t == null || t.redraw(), !0) : !1;
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const V = 480, yt = (e) => Se({
|
|
116
116
|
data: JSON.stringify(e),
|
|
117
117
|
mimeType: A.POINTS
|
|
118
118
|
}), ve = (e) => {
|
|
@@ -124,7 +124,7 @@ const k = 480, yt = (e) => Se({
|
|
|
124
124
|
return null;
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
|
-
},
|
|
127
|
+
}, he = 0.8, De = "Madefor";
|
|
128
128
|
function Ae(e, t) {
|
|
129
129
|
const { width: a, actualBoundingBoxAscent: n, actualBoundingBoxDescent: o } = t.measureText(e);
|
|
130
130
|
return {
|
|
@@ -134,18 +134,18 @@ function Ae(e, t) {
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
function _t(e, t) {
|
|
137
|
-
const a = t.getContext("2d"), n = t.offsetWidth || t.width,
|
|
138
|
-
a.font = `${
|
|
139
|
-
const { width: i, height: c } = Ae(e, a), u =
|
|
137
|
+
const a = t.getContext("2d"), n = t.offsetWidth || t.width, r = (t.offsetHeight || t.height) * he, l = n * he;
|
|
138
|
+
a.font = `${r}px ${De}`;
|
|
139
|
+
const { width: i, height: c } = Ae(e, a), u = r / (i / l), d = r / (c / r);
|
|
140
140
|
return Math.min(u, d);
|
|
141
141
|
}
|
|
142
142
|
function vt(e, t, a = "black", n = !1, o) {
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
const i = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: u, height: d, offsetY: f } = Ae(t,
|
|
146
|
-
|
|
143
|
+
const r = e.getContext("2d"), l = _t(t, e);
|
|
144
|
+
r.font = `${l}px ${De}`, r.textBaseline = "top";
|
|
145
|
+
const i = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: u, height: d, offsetY: f } = Ae(t, r);
|
|
146
|
+
r.fillStyle = o, r.fillRect(0, 0, i, c), r.fillStyle = a;
|
|
147
147
|
const m = (i - u) / 2;
|
|
148
|
-
|
|
148
|
+
r.fillText(t, n ? i - m : m, (c - d) / 2 + f);
|
|
149
149
|
}
|
|
150
150
|
const Re = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
|
|
151
151
|
function Dt(e) {
|
|
@@ -176,10 +176,10 @@ function At(e, t) {
|
|
|
176
176
|
const o = new Uint8Array(n);
|
|
177
177
|
for (; n--; )
|
|
178
178
|
o[n] = a.data.charCodeAt(n);
|
|
179
|
-
const
|
|
179
|
+
const r = a.mimeType.split("/")[1] ?? "txt";
|
|
180
180
|
return new File([
|
|
181
181
|
o
|
|
182
|
-
], `${t}.${
|
|
182
|
+
], `${t}.${r}`, {
|
|
183
183
|
type: a.mimeType
|
|
184
184
|
});
|
|
185
185
|
}
|
|
@@ -198,26 +198,26 @@ async function Rt(e, t) {
|
|
|
198
198
|
return e;
|
|
199
199
|
const n = a.mimeType;
|
|
200
200
|
if (n === A.TEXT) {
|
|
201
|
-
const o = j(
|
|
201
|
+
const o = j(V * 20, V, 1);
|
|
202
202
|
vt(o, a.data, "black", t, "white");
|
|
203
|
-
const
|
|
204
|
-
return (
|
|
203
|
+
const r = se(o, "white");
|
|
204
|
+
return (r == null ? void 0 : r.toDataURL("image/jpeg", 0.7)) ?? null;
|
|
205
205
|
}
|
|
206
206
|
if (n === A.POINTS) {
|
|
207
207
|
const o = ve(e);
|
|
208
208
|
if (!o)
|
|
209
209
|
return null;
|
|
210
|
-
const
|
|
210
|
+
const r = o.map((d) => ({
|
|
211
211
|
...d,
|
|
212
212
|
penColor: "black"
|
|
213
|
-
})), l = j(
|
|
214
|
-
new _e(l).fromData(
|
|
215
|
-
const c =
|
|
216
|
-
return c ?
|
|
213
|
+
})), l = j(V * 20, V, Math.max(window.devicePixelRatio || 1, 1));
|
|
214
|
+
new _e(l).fromData(r);
|
|
215
|
+
const c = se(l);
|
|
216
|
+
return c ? Ee(c, void 0, V, "white").toDataURL("image/jpeg", 0.7) : null;
|
|
217
217
|
}
|
|
218
218
|
if (n != null && n.startsWith("image/")) {
|
|
219
|
-
const o = await It(e),
|
|
220
|
-
return
|
|
219
|
+
const o = await It(e), r = se(o);
|
|
220
|
+
return r ? Ee(r, void 0, V).toDataURL("image/jpeg", 0.7) : null;
|
|
221
221
|
}
|
|
222
222
|
return e;
|
|
223
223
|
}
|
|
@@ -227,7 +227,7 @@ async function St(e, t) {
|
|
|
227
227
|
return At(a, "signature");
|
|
228
228
|
}
|
|
229
229
|
const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
230
|
-
const [n, o] =
|
|
230
|
+
const [n, o] = q(e), { isRTL: r } = Me(), l = bt(a), { setFormStatus: i } = Ce(), c = $();
|
|
231
231
|
le(() => {
|
|
232
232
|
e === me && o(me);
|
|
233
233
|
}, [
|
|
@@ -235,15 +235,15 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
235
235
|
]);
|
|
236
236
|
const u = _(() => {
|
|
237
237
|
c.current && (clearTimeout(c.current), c.current = null);
|
|
238
|
-
}, []), d = n == null ? void 0 : n[0], f = d != null && d.url ? Y(d.url) : void 0, m = _(async (
|
|
238
|
+
}, []), d = n == null ? void 0 : n[0], f = d != null && d.url ? Y(d.url) : void 0, m = _(async (h) => {
|
|
239
239
|
try {
|
|
240
|
-
const p = (
|
|
240
|
+
const p = (h == null ? void 0 : h.url) ?? "";
|
|
241
241
|
if (Dt(p)) {
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
const
|
|
242
|
+
const g = await St(p, r);
|
|
243
|
+
if (g) {
|
|
244
|
+
const E = await l(g);
|
|
245
245
|
t([
|
|
246
|
-
|
|
246
|
+
E
|
|
247
247
|
]);
|
|
248
248
|
} else
|
|
249
249
|
o(void 0), t(void 0);
|
|
@@ -255,18 +255,18 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
255
255
|
}, [
|
|
256
256
|
i,
|
|
257
257
|
a,
|
|
258
|
-
|
|
258
|
+
r,
|
|
259
259
|
l,
|
|
260
260
|
t
|
|
261
261
|
]);
|
|
262
262
|
return {
|
|
263
|
-
handleChange: _((
|
|
264
|
-
const p = (
|
|
265
|
-
c.current = setTimeout(() => m(
|
|
263
|
+
handleChange: _((h) => {
|
|
264
|
+
const p = (g) => {
|
|
265
|
+
c.current = setTimeout(() => m(g), 1500);
|
|
266
266
|
};
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
]), p(
|
|
267
|
+
h ? (c.current && (clearTimeout(c.current), c.current = null), o([
|
|
268
|
+
h
|
|
269
|
+
]), p(h)) : (t == null || t(null), o(void 0), i(a, oe.READY));
|
|
270
270
|
}, [
|
|
271
271
|
m,
|
|
272
272
|
t,
|
|
@@ -278,12 +278,12 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
278
278
|
cancelUpload: u
|
|
279
279
|
};
|
|
280
280
|
}, Ft = ({ target: e, value: t, onChange: a }) => {
|
|
281
|
-
const { handleChange: n, cancelUpload: o, signature:
|
|
281
|
+
const { handleChange: n, cancelUpload: o, signature: r, decodedValue: l } = Nt({
|
|
282
282
|
value: t,
|
|
283
283
|
onChange: a,
|
|
284
284
|
target: e
|
|
285
|
-
}), [i, c] =
|
|
286
|
-
if (
|
|
285
|
+
}), [i, c] = q(() => {
|
|
286
|
+
if (r == null)
|
|
287
287
|
return C.DRAW;
|
|
288
288
|
switch (l == null ? void 0 : l.mimeType) {
|
|
289
289
|
case A.POINTS:
|
|
@@ -306,7 +306,7 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
306
306
|
n,
|
|
307
307
|
u,
|
|
308
308
|
e
|
|
309
|
-
]), m =
|
|
309
|
+
]), m = r != null, L = xt(i, r, l), h = (() => {
|
|
310
310
|
switch (i) {
|
|
311
311
|
case C.DRAW:
|
|
312
312
|
return R.DRAW;
|
|
@@ -319,12 +319,12 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
|
|
|
319
319
|
}
|
|
320
320
|
})();
|
|
321
321
|
return {
|
|
322
|
-
signature:
|
|
322
|
+
signature: r,
|
|
323
323
|
decodedValue: l,
|
|
324
324
|
signatureMode: i,
|
|
325
325
|
clearable: m,
|
|
326
326
|
signatureValueForView: L,
|
|
327
|
-
signatureView:
|
|
327
|
+
signatureView: h,
|
|
328
328
|
handleChange: n,
|
|
329
329
|
setSignatureMode: c,
|
|
330
330
|
handleBeforeChange: d,
|
|
@@ -352,58 +352,58 @@ const Ut = (e) => {
|
|
|
352
352
|
"data-focus-visible": o || void 0
|
|
353
353
|
};
|
|
354
354
|
}, b = ({ children: e }) => {
|
|
355
|
-
const { id: t, FieldLayout: a } = x(), n = I(e, b.Label), o = I(e, b.Input),
|
|
356
|
-
return /* @__PURE__ */
|
|
355
|
+
const { id: t, FieldLayout: a } = x(), n = I(e, b.Label), o = I(e, b.Input), r = I(e, b.Description), l = I(e, b.Error);
|
|
356
|
+
return /* @__PURE__ */ s.createElement(a, {
|
|
357
357
|
fieldId: t,
|
|
358
358
|
renderLabel: () => n,
|
|
359
359
|
renderInput: () => o,
|
|
360
|
-
renderDescription: () => /* @__PURE__ */
|
|
360
|
+
renderDescription: () => /* @__PURE__ */ s.createElement(s.Fragment, null, l, r)
|
|
361
361
|
});
|
|
362
362
|
}, Bt = {
|
|
363
363
|
[C.DRAW]: R.DRAW,
|
|
364
364
|
[C.TYPE]: R.TYPE,
|
|
365
365
|
[C.UPLOAD]: R.UPLOAD
|
|
366
366
|
}, K = ({ children: e, className: t }) => {
|
|
367
|
-
const { id: a, value: n, onChange: o, target:
|
|
368
|
-
target:
|
|
367
|
+
const { id: a, value: n, onChange: o, target: r, readOnly: l } = x(), i = ht(a), { signatureMode: c, setSignatureMode: u, handleClear: d, clearable: f, signatureView: m, signatureValueForView: L, handleChange: h, handleBeforeChange: p } = Ft({
|
|
368
|
+
target: r,
|
|
369
369
|
value: n,
|
|
370
370
|
onChange: o
|
|
371
|
-
}),
|
|
371
|
+
}), g = I(e, K.Header), E = I(e, K.Value), S = {
|
|
372
372
|
signatureMode: i ?? c,
|
|
373
373
|
setSignatureMode: u,
|
|
374
374
|
handleClear: d,
|
|
375
375
|
clearable: f,
|
|
376
376
|
signatureView: i ? Bt[i] : m,
|
|
377
377
|
signatureValueForView: i ? void 0 : L,
|
|
378
|
-
handleChange:
|
|
378
|
+
handleChange: h,
|
|
379
379
|
handleBeforeChange: p
|
|
380
380
|
};
|
|
381
|
-
return /* @__PURE__ */
|
|
381
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
382
382
|
className: t,
|
|
383
383
|
"data-hook": "signature-container"
|
|
384
|
-
}, !l && N(
|
|
384
|
+
}, !l && N(g, S), N(E, S));
|
|
385
385
|
}, J = ({ children: e, className: t, ...a }) => {
|
|
386
|
-
const { signatureMode: n, setSignatureMode: o, clearable:
|
|
387
|
-
return /* @__PURE__ */
|
|
386
|
+
const { signatureMode: n, setSignatureMode: o, clearable: r, handleClear: l } = a, { uploadEnabled: i } = x(), c = I(e, J.Tabs), u = I(e, J.Clear);
|
|
387
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
388
388
|
className: t
|
|
389
389
|
}, N(c, {
|
|
390
390
|
signatureMode: n,
|
|
391
391
|
setSignatureMode: o,
|
|
392
392
|
uploadEnabled: i
|
|
393
|
-
}),
|
|
393
|
+
}), r && N(u, {
|
|
394
394
|
handleClear: l
|
|
395
395
|
}));
|
|
396
396
|
}, M = ({ children: e, className: t, ...a }) => {
|
|
397
|
-
const { signatureMode: n, setSignatureMode: o, uploadEnabled:
|
|
397
|
+
const { signatureMode: n, setSignatureMode: o, uploadEnabled: r } = a, { disabled: l } = x(), { labelId: i, inputId: c } = W(), u = _((L) => {
|
|
398
398
|
o(L);
|
|
399
399
|
}, [
|
|
400
400
|
o
|
|
401
401
|
]), d = {
|
|
402
402
|
[C.DRAW]: I(e, M.Draw),
|
|
403
403
|
[C.TYPE]: I(e, M.Type),
|
|
404
|
-
[C.UPLOAD]:
|
|
404
|
+
[C.UPLOAD]: r ? I(e, M.Upload) : null
|
|
405
405
|
}, f = d[n], m = Ot(f) ? f.props.description : void 0;
|
|
406
|
-
return /* @__PURE__ */
|
|
406
|
+
return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", {
|
|
407
407
|
role: "status",
|
|
408
408
|
"aria-live": "polite",
|
|
409
409
|
style: {
|
|
@@ -413,7 +413,7 @@ const Ut = (e) => {
|
|
|
413
413
|
height: "1px",
|
|
414
414
|
overflow: "hidden"
|
|
415
415
|
}
|
|
416
|
-
}, m), /* @__PURE__ */
|
|
416
|
+
}, m), /* @__PURE__ */ s.createElement(tt, {
|
|
417
417
|
value: n,
|
|
418
418
|
onChange: u,
|
|
419
419
|
isDisabled: l,
|
|
@@ -422,34 +422,34 @@ const Ut = (e) => {
|
|
|
422
422
|
"data-hook": dt.SIGNATURE_FIELD_MODE_SELECT,
|
|
423
423
|
className: t
|
|
424
424
|
}, d[C.DRAW], d[C.TYPE], d[C.UPLOAD]));
|
|
425
|
-
}, Ot = (e) => /* @__PURE__ */ Le(e), ue = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */
|
|
425
|
+
}, Ot = (e) => /* @__PURE__ */ Le(e), ue = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ s.createElement(st, {
|
|
426
426
|
value: e,
|
|
427
427
|
"aria-label": n
|
|
428
|
-
}, /* @__PURE__ */
|
|
428
|
+
}, /* @__PURE__ */ s.createElement(lt, {
|
|
429
429
|
"data-hook": `signature-mode-${e}`,
|
|
430
430
|
className: a
|
|
431
|
-
}, t)), Pt = (e) => /* @__PURE__ */
|
|
431
|
+
}, t)), Pt = (e) => /* @__PURE__ */ s.createElement(ue, {
|
|
432
432
|
...e,
|
|
433
433
|
mode: C.DRAW
|
|
434
|
-
}), Mt = (e) => /* @__PURE__ */
|
|
434
|
+
}), Mt = (e) => /* @__PURE__ */ s.createElement(ue, {
|
|
435
435
|
...e,
|
|
436
436
|
mode: C.TYPE
|
|
437
|
-
}), Ht = (e) => /* @__PURE__ */
|
|
437
|
+
}), Ht = (e) => /* @__PURE__ */ s.createElement(ue, {
|
|
438
438
|
...e,
|
|
439
439
|
mode: C.UPLOAD
|
|
440
440
|
}), Wt = ({ children: e, className: t, "aria-label": a, ...n }) => {
|
|
441
|
-
const { handleClear: o } = n, { disabled:
|
|
442
|
-
return /* @__PURE__ */
|
|
441
|
+
const { handleClear: o } = n, { disabled: r, target: l } = x(), { inputId: i } = W();
|
|
442
|
+
return /* @__PURE__ */ s.createElement(ye, {
|
|
443
443
|
onPress: o,
|
|
444
|
-
isDisabled:
|
|
444
|
+
isDisabled: r,
|
|
445
445
|
"aria-label": a,
|
|
446
446
|
"aria-controls": i,
|
|
447
447
|
"data-hook": `clear-${l}`,
|
|
448
448
|
className: t
|
|
449
449
|
}, e);
|
|
450
450
|
}, H = ({ children: e, className: t, ...a }) => {
|
|
451
|
-
const { signatureView: n, signatureValueForView: o, handleChange:
|
|
452
|
-
return /* @__PURE__ */
|
|
451
|
+
const { signatureView: n, signatureValueForView: o, handleChange: r, handleBeforeChange: l } = a, { disabled: i, readOnly: c, onBlur: u, onFocus: d, hasError: f } = x(), m = I(e, H.Canvas), L = I(e, H.Type), h = I(e, H.Upload);
|
|
452
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
453
453
|
className: t,
|
|
454
454
|
"data-hook": "signature-input",
|
|
455
455
|
"data-invalid": f,
|
|
@@ -457,7 +457,7 @@ const Ut = (e) => {
|
|
|
457
457
|
"data-readonly": c
|
|
458
458
|
}, n === R.DRAW && N(m, {
|
|
459
459
|
value: o,
|
|
460
|
-
onChange:
|
|
460
|
+
onChange: r,
|
|
461
461
|
onBeforeChange: l,
|
|
462
462
|
disabled: i,
|
|
463
463
|
readOnly: c,
|
|
@@ -465,15 +465,15 @@ const Ut = (e) => {
|
|
|
465
465
|
onFocus: d
|
|
466
466
|
}), n === R.TYPE && N(L, {
|
|
467
467
|
value: o,
|
|
468
|
-
onChange:
|
|
468
|
+
onChange: r,
|
|
469
469
|
onBeforeChange: l,
|
|
470
470
|
disabled: i,
|
|
471
471
|
readOnly: c,
|
|
472
472
|
onBlur: u,
|
|
473
473
|
onFocus: d
|
|
474
|
-
}), (n === R.UPLOAD || n === R.IMAGE) && N(
|
|
474
|
+
}), (n === R.UPLOAD || n === R.IMAGE) && N(h, {
|
|
475
475
|
value: o,
|
|
476
|
-
onChange:
|
|
476
|
+
onChange: r,
|
|
477
477
|
onBeforeChange: l,
|
|
478
478
|
disabled: i,
|
|
479
479
|
readOnly: c,
|
|
@@ -481,10 +481,10 @@ const Ut = (e) => {
|
|
|
481
481
|
onFocus: d
|
|
482
482
|
}));
|
|
483
483
|
}, Yt = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
|
|
484
|
-
const { value: o, onChange:
|
|
484
|
+
const { value: o, onChange: r, 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, [G, P] = q(!1);
|
|
485
485
|
Ie(() => {
|
|
486
486
|
var y;
|
|
487
|
-
(y =
|
|
487
|
+
(y = g.current) == null || y.focus({
|
|
488
488
|
preventScroll: !0
|
|
489
489
|
});
|
|
490
490
|
}, f);
|
|
@@ -500,48 +500,48 @@ const Ut = (e) => {
|
|
|
500
500
|
return "";
|
|
501
501
|
const y = (U = p.current) == null ? void 0 : U.toData();
|
|
502
502
|
return y ? yt(y) : ((B = p.current) == null ? void 0 : B.toDataURL()) ?? "";
|
|
503
|
-
}, []),
|
|
503
|
+
}, []), z = _(() => {
|
|
504
504
|
var w;
|
|
505
505
|
const y = (w = p.current) == null ? void 0 : w.isEmpty();
|
|
506
|
-
P(!y),
|
|
506
|
+
P(!y), r(ie(ee()));
|
|
507
507
|
}, [
|
|
508
508
|
ee,
|
|
509
|
-
|
|
510
|
-
]),
|
|
509
|
+
r
|
|
510
|
+
]), Z = _(() => {
|
|
511
511
|
l == null || l();
|
|
512
512
|
}, [
|
|
513
513
|
l
|
|
514
514
|
]), te = _((y) => {
|
|
515
515
|
var U, B, D, O;
|
|
516
516
|
if (y != null) {
|
|
517
|
-
if (
|
|
517
|
+
if (g.current = y, p.current = new _e(y, {
|
|
518
518
|
...v,
|
|
519
519
|
penColor: getComputedStyle(y).color || void 0
|
|
520
|
-
}),
|
|
521
|
-
const
|
|
522
|
-
|
|
520
|
+
}), ge(g.current, p.current), S) {
|
|
521
|
+
const k = ve(S);
|
|
522
|
+
k && (p.current.fromData(k), P(!0));
|
|
523
523
|
} else
|
|
524
524
|
p.current.clear(), P(!1);
|
|
525
|
-
p.current.addEventListener("beginStroke",
|
|
526
|
-
|
|
527
|
-
})), (U =
|
|
525
|
+
p.current.addEventListener("beginStroke", Z), p.current.addEventListener("endStroke", z), typeof ResizeObserver < "u" && !E.current && (E.current = new ResizeObserver(() => {
|
|
526
|
+
g.current && ge(g.current, p == null ? void 0 : p.current);
|
|
527
|
+
})), (U = E.current) == null || U.observe(y);
|
|
528
528
|
} else
|
|
529
|
-
(B =
|
|
529
|
+
(B = E.current) == null || B.disconnect(), (D = p.current) == null || D.removeEventListener("endStroke", z), (O = p.current) == null || O.removeEventListener("beginStroke", Z);
|
|
530
530
|
}, [
|
|
531
531
|
v,
|
|
532
532
|
S,
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
Z,
|
|
534
|
+
z
|
|
535
535
|
]);
|
|
536
536
|
return le(() => {
|
|
537
537
|
p.current && (c || i ? p.current.off() : p.current.on());
|
|
538
538
|
}, [
|
|
539
539
|
i,
|
|
540
540
|
c
|
|
541
|
-
]), /* @__PURE__ */
|
|
541
|
+
]), /* @__PURE__ */ s.createElement("div", {
|
|
542
542
|
className: e,
|
|
543
|
-
...
|
|
544
|
-
}, /* @__PURE__ */
|
|
543
|
+
...h
|
|
544
|
+
}, /* @__PURE__ */ s.createElement("canvas", {
|
|
545
545
|
ref: te,
|
|
546
546
|
id: m,
|
|
547
547
|
"data-hook": "signature-canvas",
|
|
@@ -550,11 +550,11 @@ const Ut = (e) => {
|
|
|
550
550
|
onFocus: d,
|
|
551
551
|
onBlur: u,
|
|
552
552
|
role: "img",
|
|
553
|
-
"aria-label":
|
|
553
|
+
"aria-label": G ? a : t,
|
|
554
554
|
"aria-describedby": L
|
|
555
555
|
}));
|
|
556
556
|
}, de = ({ children: e, className: t, ...a }) => {
|
|
557
|
-
const { value: n, onChange: o, onBeforeChange:
|
|
557
|
+
const { value: n, onChange: o, onBeforeChange: r, 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(() => {
|
|
@@ -571,19 +571,19 @@ const Ut = (e) => {
|
|
|
571
571
|
n,
|
|
572
572
|
L
|
|
573
573
|
]);
|
|
574
|
-
const
|
|
575
|
-
|
|
574
|
+
const G = _((v) => {
|
|
575
|
+
r == null || r(), v.trim() ? o(ie(Se({
|
|
576
576
|
data: v,
|
|
577
577
|
mimeType: A.TEXT
|
|
578
578
|
}))) : o(null);
|
|
579
579
|
}, [
|
|
580
|
-
|
|
580
|
+
r,
|
|
581
581
|
o
|
|
582
582
|
]), P = I(e, de.Value);
|
|
583
|
-
return /* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ s.createElement(nt, {
|
|
584
584
|
"aria-labelledby": p,
|
|
585
585
|
value: S,
|
|
586
|
-
onChange:
|
|
586
|
+
onChange: G,
|
|
587
587
|
onBlur: c,
|
|
588
588
|
onFocus: u,
|
|
589
589
|
isDisabled: l,
|
|
@@ -591,16 +591,16 @@ const Ut = (e) => {
|
|
|
591
591
|
isRequired: f,
|
|
592
592
|
isInvalid: m,
|
|
593
593
|
validationBehavior: "aria"
|
|
594
|
-
}, /* @__PURE__ */
|
|
594
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
595
595
|
className: t,
|
|
596
|
-
...
|
|
596
|
+
...g
|
|
597
597
|
}, N(P, {
|
|
598
598
|
inputId: L,
|
|
599
|
-
ariaDescribedBy:
|
|
599
|
+
ariaDescribedBy: h
|
|
600
600
|
})));
|
|
601
|
-
},
|
|
601
|
+
}, Gt = ({ className: e, placeholder: t, ...a }) => {
|
|
602
602
|
const { inputId: n, ariaDescribedBy: o } = a;
|
|
603
|
-
return /* @__PURE__ */
|
|
603
|
+
return /* @__PURE__ */ s.createElement(ot, {
|
|
604
604
|
id: n,
|
|
605
605
|
"data-hook": "signature-text",
|
|
606
606
|
"aria-describedby": o,
|
|
@@ -608,34 +608,34 @@ const Ut = (e) => {
|
|
|
608
608
|
className: e
|
|
609
609
|
});
|
|
610
610
|
}, Q = ({ children: e, className: t, ...a }) => {
|
|
611
|
-
const { value: n, onChange: o, disabled:
|
|
612
|
-
const
|
|
613
|
-
if (!
|
|
611
|
+
const { value: n, onChange: o, disabled: r, readOnly: l, onBlur: i, onFocus: c } = a, { labelId: u, ariaDescribedBy: d } = W(), f = I(e, Q.Button), m = I(e, Q.Preview), L = _((p) => {
|
|
612
|
+
const g = p[0];
|
|
613
|
+
if (!g) {
|
|
614
614
|
o(null);
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
o(ie(
|
|
620
|
-
},
|
|
617
|
+
const E = new FileReader();
|
|
618
|
+
E.onload = () => {
|
|
619
|
+
o(ie(E.result, g.name));
|
|
620
|
+
}, E.readAsDataURL(g);
|
|
621
621
|
}, [
|
|
622
622
|
o
|
|
623
623
|
]);
|
|
624
624
|
return n && Ut(n) ? N(m, {
|
|
625
625
|
value: n
|
|
626
|
-
}) ?? null : /* @__PURE__ */
|
|
626
|
+
}) ?? null : /* @__PURE__ */ s.createElement(at, {
|
|
627
627
|
className: t,
|
|
628
|
-
isDisabled:
|
|
628
|
+
isDisabled: r || l,
|
|
629
629
|
"aria-labelledby": u,
|
|
630
630
|
"aria-describedby": d,
|
|
631
631
|
"data-hook": "signature-upload-drop-zone",
|
|
632
632
|
onDrop: async (p) => {
|
|
633
|
-
for (const
|
|
634
|
-
if (
|
|
635
|
-
const
|
|
636
|
-
if (
|
|
633
|
+
for (const g of p.items)
|
|
634
|
+
if (g.kind === "file" && g.type.startsWith("image/")) {
|
|
635
|
+
const E = await g.getFile();
|
|
636
|
+
if (E) {
|
|
637
637
|
L([
|
|
638
|
-
|
|
638
|
+
E
|
|
639
639
|
]);
|
|
640
640
|
return;
|
|
641
641
|
}
|
|
@@ -643,55 +643,55 @@ const Ut = (e) => {
|
|
|
643
643
|
}
|
|
644
644
|
}, N(f, {
|
|
645
645
|
onSelectFiles: L,
|
|
646
|
-
disabled:
|
|
646
|
+
disabled: r,
|
|
647
647
|
readOnly: l,
|
|
648
648
|
onBlur: i,
|
|
649
649
|
onFocus: c
|
|
650
650
|
}));
|
|
651
|
-
},
|
|
652
|
-
const { value: n } = a, { inputId: o } = W(),
|
|
653
|
-
return /* @__PURE__ */
|
|
651
|
+
}, Zt = ({ className: e, imageAlt: t, ...a }) => {
|
|
652
|
+
const { value: n } = a, { inputId: o } = W(), r = ce();
|
|
653
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
654
654
|
className: e,
|
|
655
655
|
"data-has-value": !0,
|
|
656
|
-
...
|
|
657
|
-
}, n.url ? /* @__PURE__ */
|
|
656
|
+
...r
|
|
657
|
+
}, n.url ? /* @__PURE__ */ s.createElement("img", {
|
|
658
658
|
id: o,
|
|
659
659
|
src: n.url,
|
|
660
660
|
alt: n.displayName || t,
|
|
661
661
|
"data-hook": "signature-image"
|
|
662
|
-
}) : /* @__PURE__ */
|
|
662
|
+
}) : /* @__PURE__ */ s.createElement("span", {
|
|
663
663
|
id: o,
|
|
664
664
|
"data-hook": "signature-image"
|
|
665
665
|
}, n.displayName || t));
|
|
666
|
-
},
|
|
667
|
-
const { onSelectFiles: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } =
|
|
668
|
-
textId:
|
|
669
|
-
}) :
|
|
670
|
-
id:
|
|
666
|
+
}, re = ({ children: e, className: t, onHoverStart: a, onHoverEnd: n, onFocusChange: o, ...r }) => {
|
|
667
|
+
const { onSelectFiles: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = r, { inputId: f, ariaDescribedBy: m, labelId: L } = W(), h = pt(), g = !!I(e, re.Text) ? Fe.map(e, (E) => /* @__PURE__ */ Le(E) && E.type === re.Text ? N(E, {
|
|
668
|
+
textId: h
|
|
669
|
+
}) : E) : /* @__PURE__ */ s.createElement("span", {
|
|
670
|
+
id: h
|
|
671
671
|
}, e);
|
|
672
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ s.createElement(rt, {
|
|
673
673
|
acceptedFileTypes: [
|
|
674
674
|
"image/*"
|
|
675
675
|
],
|
|
676
|
-
onSelect: (
|
|
677
|
-
l(
|
|
676
|
+
onSelect: (E) => {
|
|
677
|
+
l(E ? Array.from(E) : []);
|
|
678
678
|
}
|
|
679
|
-
}, /* @__PURE__ */
|
|
679
|
+
}, /* @__PURE__ */ s.createElement(ye, {
|
|
680
680
|
id: f,
|
|
681
681
|
onBlur: u,
|
|
682
682
|
onFocus: d,
|
|
683
683
|
isDisabled: i || c,
|
|
684
|
-
"aria-labelledby": `${L} ${
|
|
684
|
+
"aria-labelledby": `${L} ${h}`,
|
|
685
685
|
"aria-describedby": m,
|
|
686
686
|
"data-hook": "signature-upload",
|
|
687
687
|
className: t,
|
|
688
688
|
onHoverStart: a,
|
|
689
689
|
onHoverEnd: n,
|
|
690
690
|
onFocusChange: o
|
|
691
|
-
},
|
|
692
|
-
},
|
|
691
|
+
}, g));
|
|
692
|
+
}, kt = ({ children: e, className: t, ...a }) => {
|
|
693
693
|
const { textId: n } = a;
|
|
694
|
-
return /* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */ s.createElement("span", {
|
|
695
695
|
id: n,
|
|
696
696
|
className: t
|
|
697
697
|
}, e);
|
|
@@ -710,11 +710,11 @@ M.Upload = Ht;
|
|
|
710
710
|
H.Canvas = Yt;
|
|
711
711
|
H.Type = de;
|
|
712
712
|
H.Upload = Q;
|
|
713
|
-
de.Value =
|
|
714
|
-
Q.Preview =
|
|
715
|
-
Q.Button =
|
|
716
|
-
|
|
717
|
-
const
|
|
713
|
+
de.Value = Gt;
|
|
714
|
+
Q.Preview = Zt;
|
|
715
|
+
Q.Button = re;
|
|
716
|
+
re.Text = kt;
|
|
717
|
+
const Vt = () => {
|
|
718
718
|
const { t: e } = He();
|
|
719
719
|
return {
|
|
720
720
|
drawLabel: e("field.signature.mode.draw.label"),
|
|
@@ -730,47 +730,47 @@ const kt = () => {
|
|
|
730
730
|
imageAlt: e("field.signature.a11y.state.signed"),
|
|
731
731
|
uploadLabel: e("field.signature.settings.upload-button.label")
|
|
732
732
|
};
|
|
733
|
-
},
|
|
733
|
+
}, $t = (e) => /* @__PURE__ */ s.createElement("svg", {
|
|
734
734
|
viewBox: "0 0 24 24",
|
|
735
735
|
width: 24,
|
|
736
736
|
height: 24,
|
|
737
737
|
fill: "currentColor",
|
|
738
738
|
"aria-hidden": "true",
|
|
739
739
|
...e
|
|
740
|
-
}, /* @__PURE__ */
|
|
740
|
+
}, /* @__PURE__ */ s.createElement("path", {
|
|
741
741
|
fillRule: "evenodd",
|
|
742
742
|
d: "M13.5,3 C14.327,3 15,3.673 15,4.5 L15,4.5 L15,5 L19,5 L19,6 L18,6 L18,17.5 C18,18.879 16.878,20 15.5,20 L15.5,20 L7.5,20 C6.122,20 5,18.879 5,17.5 L5,17.5 L5,6 L4,6 L4,5 L8,5 L8,4.5 C8,3.673 8.673,3 9.5,3 L9.5,3 Z M17,6 L6,6 L6,17.5 C6,18.327 6.673,19 7.5,19 L7.5,19 L15.5,19 C16.327,19 17,18.327 17,17.5 L17,17.5 L17,6 Z M10,9 L10,16 L9,16 L9,9 L10,9 Z M14,9 L14,16 L13,16 L13,9 L14,9 Z M13.5,4 L9.5,4 C9.224,4 9,4.225 9,4.5 L9,4.5 L9,5 L14,5 L14,4.5 C14,4.225 13.776,4 13.5,4 L13.5,4 Z"
|
|
743
|
-
})),
|
|
743
|
+
})), zt = (e) => /* @__PURE__ */ s.createElement("svg", {
|
|
744
744
|
viewBox: "0 0 24 24",
|
|
745
745
|
width: 24,
|
|
746
746
|
height: 24,
|
|
747
747
|
fill: "currentColor",
|
|
748
748
|
"aria-hidden": "true",
|
|
749
749
|
...e
|
|
750
|
-
}, /* @__PURE__ */
|
|
750
|
+
}, /* @__PURE__ */ s.createElement("path", {
|
|
751
751
|
fillRule: "evenodd",
|
|
752
752
|
d: "M4.9937,15.9971 L4.9937,18.4971 C4.9937,18.7721 5.2177,18.9971 5.4937,18.9971 L5.4937,18.9971 L17.4937,18.9971 C17.7697,18.9971 17.9937,18.7721 17.9937,18.4971 L17.9937,18.4971 L17.9937,15.9971 L18.9937,15.9971 L18.9937,18.4971 C18.9937,19.3241 18.3207,19.9971 17.4937,19.9971 L17.4937,19.9971 L5.4937,19.9971 C4.6657,19.9971 3.9937,19.3241 3.9937,18.4971 L3.9937,18.4971 L3.9937,15.9971 L4.9937,15.9971 Z M11.9933,4 L11.9933,14.078 L15.0293,11.043 L15.7363,11.75 L11.4933,15.992 L7.2513,11.75 L7.9583,11.043 L10.9933,14.078 L10.9933,4 L11.9933,4 Z"
|
|
753
|
-
})),
|
|
753
|
+
})), Xt = (e) => /* @__PURE__ */ s.createElement("svg", {
|
|
754
754
|
viewBox: "0 0 24 24",
|
|
755
755
|
width: 24,
|
|
756
756
|
height: 24,
|
|
757
757
|
fill: "currentColor",
|
|
758
758
|
"aria-hidden": "true",
|
|
759
759
|
...e
|
|
760
|
-
}, /* @__PURE__ */
|
|
760
|
+
}, /* @__PURE__ */ s.createElement("path", {
|
|
761
761
|
fillRule: "evenodd",
|
|
762
762
|
d: "M18.8525,7.543 L17.7515,8.644 L15.3565,6.248 L16.4575,5.147 C16.5555,5.05 16.6835,5.001 16.8105,5.001 C16.9385,5.001 17.0665,5.05 17.1645,5.147 L18.8525,6.835 C19.0475,7.03 19.0475,7.348 18.8525,7.543 L18.8525,7.543 Z M8.1895,18.206 C8.1185,18.276 8.0275,18.324 7.9295,18.344 L5.1275,18.873 L5.6575,16.07 C5.6755,15.972 5.7225,15.882 5.7945,15.811 L14.6495,6.955 L17.0445,9.351 L8.1895,18.206 Z M19.5595,6.128 L17.8715,4.44 C17.2865,3.856 16.3355,3.856 15.7505,4.44 L5.0875,15.103 C4.8735,15.317 4.7295,15.588 4.6745,15.886 L4.0085,19.407 C3.9775,19.569 4.0295,19.736 4.1465,19.854 C4.2415,19.948 4.3685,20 4.4995,20 C4.5305,20 4.5615,19.997 4.5925,19.991 L8.1165,19.326 C8.4145,19.269 8.6855,19.125 8.8965,18.912 L19.5595,8.25 C20.1445,7.665 20.1445,6.713 19.5595,6.128 L19.5595,6.128 Z"
|
|
763
|
-
})),
|
|
763
|
+
})), qt = (e) => /* @__PURE__ */ s.createElement("svg", {
|
|
764
764
|
viewBox: "0 0 20 20",
|
|
765
765
|
width: 24,
|
|
766
766
|
height: 24,
|
|
767
767
|
fill: "currentColor",
|
|
768
768
|
"aria-hidden": "true",
|
|
769
769
|
...e
|
|
770
|
-
}, /* @__PURE__ */
|
|
770
|
+
}, /* @__PURE__ */ s.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
|
-
})), jt = "
|
|
773
|
+
})), jt = "_container_1irea_1", Kt = "_header_1irea_7", Jt = "_tabs_1irea_13", Qt = "_tab_1irea_13", en = "_tabHover_1irea_43", tn = "_tabSelected_1irea_48", nn = "_tabIcon_1irea_78", an = "_uploadButton_1irea_85", on = "_uploadButtonHover_1irea_138", rn = "_uploadButtonLabel_1irea_155", sn = "_clear_1irea_159", ln = "_value_1irea_191", cn = "_box_1irea_196", un = "_uploadBox_1irea_197", dn = "_dropZone_1irea_228", mn = "_dropZoneHover_1irea_244", pn = "_boxHover_1irea_281", fn = "_typeInput_1irea_336", T = {
|
|
774
774
|
container: jt,
|
|
775
775
|
header: Kt,
|
|
776
776
|
tabs: Jt,
|
|
@@ -780,8 +780,8 @@ const kt = () => {
|
|
|
780
780
|
tabIcon: nn,
|
|
781
781
|
uploadButton: an,
|
|
782
782
|
uploadButtonHover: on,
|
|
783
|
-
uploadButtonLabel:
|
|
784
|
-
clear:
|
|
783
|
+
uploadButtonLabel: rn,
|
|
784
|
+
clear: sn,
|
|
785
785
|
value: ln,
|
|
786
786
|
box: cn,
|
|
787
787
|
uploadBox: un,
|
|
@@ -789,25 +789,25 @@ const kt = () => {
|
|
|
789
789
|
dropZoneHover: mn,
|
|
790
790
|
boxHover: pn,
|
|
791
791
|
typeInput: fn
|
|
792
|
-
},
|
|
792
|
+
}, En = ({ content: e, locale: t }) => /* @__PURE__ */ s.createElement(xe, {
|
|
793
793
|
content: e,
|
|
794
794
|
locale: t
|
|
795
|
-
}),
|
|
796
|
-
var
|
|
797
|
-
const e =
|
|
795
|
+
}), gn = () => {
|
|
796
|
+
var Z, te, y, w, U, B;
|
|
797
|
+
const e = Vt(), { disabled: t, readOnly: a } = x(), n = !t && !a, o = X({
|
|
798
798
|
globalClasses: Ke,
|
|
799
799
|
moduleClasses: {
|
|
800
800
|
base: T.tab,
|
|
801
801
|
hover: T.tabHover,
|
|
802
802
|
selected: T.tabSelected
|
|
803
803
|
}
|
|
804
|
-
}),
|
|
804
|
+
}), r = ({ isSelected: D, isHovered: O, isFocused: k }) => o({
|
|
805
805
|
isSelected: D,
|
|
806
806
|
isHovered: O,
|
|
807
|
-
isFocused:
|
|
807
|
+
isFocused: k,
|
|
808
808
|
isInteractive: n
|
|
809
|
-
}), i =
|
|
810
|
-
globalClasses:
|
|
809
|
+
}), i = X({
|
|
810
|
+
globalClasses: ze,
|
|
811
811
|
moduleClasses: {
|
|
812
812
|
base: T.box,
|
|
813
813
|
hover: T.boxHover
|
|
@@ -816,8 +816,8 @@ const kt = () => {
|
|
|
816
816
|
isSelected: !1,
|
|
817
817
|
isHovered: !1,
|
|
818
818
|
isInteractive: n
|
|
819
|
-
}), u =
|
|
820
|
-
globalClasses:
|
|
819
|
+
}), u = X({
|
|
820
|
+
globalClasses: Xe,
|
|
821
821
|
moduleClasses: {
|
|
822
822
|
base: T.box,
|
|
823
823
|
hover: T.boxHover
|
|
@@ -826,78 +826,78 @@ const kt = () => {
|
|
|
826
826
|
isSelected: !1,
|
|
827
827
|
isHovered: !1,
|
|
828
828
|
isInteractive: n
|
|
829
|
-
}), d =
|
|
830
|
-
globalClasses:
|
|
829
|
+
}), d = X({
|
|
830
|
+
globalClasses: qe,
|
|
831
831
|
moduleClasses: {
|
|
832
832
|
base: T.dropZone,
|
|
833
833
|
hover: T.dropZoneHover
|
|
834
834
|
}
|
|
835
|
-
}), f =
|
|
835
|
+
}), f = X({
|
|
836
836
|
globalClasses: je,
|
|
837
837
|
moduleClasses: {
|
|
838
838
|
base: T.uploadButton,
|
|
839
839
|
hover: T.uploadButtonHover
|
|
840
840
|
}
|
|
841
|
-
}), m = (B = (U = (w = (y = (te = (
|
|
841
|
+
}), m = (B = (U = (w = (y = (te = (Z = Te().signature) == null ? void 0 : Z.elementProps) == null ? void 0 : te.dropZone) == null ? void 0 : y.elementProps) == null ? void 0 : w.uploadButton) == null ? void 0 : U.elementProps) == null ? void 0 : B.icon, { wix: L, className: h, ...p } = m ?? {}, g = We(ne.SIGNATURE, ne.SIGNATURE_DROP_ZONE, ne.SIGNATURE_UPLOAD_BUTTON, ne.UPLOAD_BUTTON_LABEL), E = $(null), [S, G] = q(!1), [P, v] = q(!1), ee = _(() => {
|
|
842
842
|
var D;
|
|
843
|
-
|
|
844
|
-
}, []),
|
|
843
|
+
G(!0), (D = E.current) == null || D.runAnimationForward();
|
|
844
|
+
}, []), z = _(() => {
|
|
845
845
|
var D;
|
|
846
|
-
|
|
846
|
+
G(!1), (D = E.current) == null || D.runAnimationBackward();
|
|
847
847
|
}, []);
|
|
848
|
-
return /* @__PURE__ */
|
|
848
|
+
return /* @__PURE__ */ s.createElement(b, null, /* @__PURE__ */ s.createElement(b.Label, {
|
|
849
849
|
className: F(Ye, ae.label)
|
|
850
|
-
}, /* @__PURE__ */
|
|
851
|
-
className: F(
|
|
852
|
-
})), /* @__PURE__ */
|
|
853
|
-
className: F(
|
|
854
|
-
}, /* @__PURE__ */
|
|
850
|
+
}, /* @__PURE__ */ s.createElement(b.Label.Required, {
|
|
851
|
+
className: F(Ge, ae.requiredMark)
|
|
852
|
+
})), /* @__PURE__ */ s.createElement(b.Input, {
|
|
853
|
+
className: F(Ze, T.container)
|
|
854
|
+
}, /* @__PURE__ */ s.createElement(b.Input.Header, {
|
|
855
855
|
className: T.header
|
|
856
|
-
}, /* @__PURE__ */
|
|
856
|
+
}, /* @__PURE__ */ s.createElement(b.Input.Header.Tabs, {
|
|
857
857
|
className: T.tabs
|
|
858
|
-
}, /* @__PURE__ */
|
|
859
|
-
className:
|
|
858
|
+
}, /* @__PURE__ */ s.createElement(b.Input.Header.Tabs.Draw, {
|
|
859
|
+
className: r,
|
|
860
860
|
"aria-label": e.drawLabel,
|
|
861
861
|
description: e.drawDescription
|
|
862
|
-
}, /* @__PURE__ */
|
|
862
|
+
}, /* @__PURE__ */ s.createElement(Xt, {
|
|
863
863
|
className: T.tabIcon
|
|
864
|
-
})), /* @__PURE__ */
|
|
865
|
-
className:
|
|
864
|
+
})), /* @__PURE__ */ s.createElement(b.Input.Header.Tabs.Type, {
|
|
865
|
+
className: r,
|
|
866
866
|
"aria-label": e.typeLabel,
|
|
867
867
|
description: e.typeDescription
|
|
868
|
-
}, /* @__PURE__ */
|
|
868
|
+
}, /* @__PURE__ */ s.createElement(qt, {
|
|
869
869
|
className: T.tabIcon
|
|
870
|
-
})), /* @__PURE__ */
|
|
871
|
-
className:
|
|
870
|
+
})), /* @__PURE__ */ s.createElement(b.Input.Header.Tabs.Upload, {
|
|
871
|
+
className: r,
|
|
872
872
|
"aria-label": e.uploadModeLabel,
|
|
873
873
|
description: e.uploadDescription
|
|
874
|
-
}, /* @__PURE__ */
|
|
874
|
+
}, /* @__PURE__ */ s.createElement(zt, {
|
|
875
875
|
className: T.tabIcon
|
|
876
|
-
}))), /* @__PURE__ */
|
|
876
|
+
}))), /* @__PURE__ */ s.createElement(b.Input.Header.Clear, {
|
|
877
877
|
className: F(pe, T.clear),
|
|
878
878
|
"aria-label": e.clearLabel
|
|
879
|
-
}, /* @__PURE__ */
|
|
879
|
+
}, /* @__PURE__ */ s.createElement($t, null))), /* @__PURE__ */ s.createElement(b.Input.Value, {
|
|
880
880
|
className: T.value
|
|
881
|
-
}, /* @__PURE__ */
|
|
881
|
+
}, /* @__PURE__ */ s.createElement(b.Input.Value.Canvas, {
|
|
882
882
|
className: i,
|
|
883
883
|
emptyLabel: e.emptyLabel,
|
|
884
884
|
signedLabel: e.signedLabel
|
|
885
|
-
}), /* @__PURE__ */
|
|
885
|
+
}), /* @__PURE__ */ s.createElement(b.Input.Value.Type, {
|
|
886
886
|
className: u
|
|
887
|
-
}, /* @__PURE__ */
|
|
887
|
+
}, /* @__PURE__ */ s.createElement(b.Input.Value.Type.Value, {
|
|
888
888
|
className: T.typeInput,
|
|
889
889
|
placeholder: e.placeholder
|
|
890
|
-
})), /* @__PURE__ */
|
|
891
|
-
className: ({ isHovered: D, isFocused: O, isDropTarget:
|
|
890
|
+
})), /* @__PURE__ */ s.createElement(b.Input.Value.Upload, {
|
|
891
|
+
className: ({ isHovered: D, isFocused: O, isDropTarget: k }) => F(T.uploadBox, d({
|
|
892
892
|
isSelected: !1,
|
|
893
|
-
isHovered: D ||
|
|
893
|
+
isHovered: D || k,
|
|
894
894
|
isFocused: O,
|
|
895
895
|
isInteractive: n
|
|
896
896
|
}))
|
|
897
|
-
}, /* @__PURE__ */
|
|
897
|
+
}, /* @__PURE__ */ s.createElement(b.Input.Value.Upload.Preview, {
|
|
898
898
|
className: F(T.uploadBox, i),
|
|
899
899
|
imageAlt: e.imageAlt
|
|
900
|
-
}), /* @__PURE__ */
|
|
900
|
+
}), /* @__PURE__ */ s.createElement(b.Input.Value.Upload.Button, {
|
|
901
901
|
className: ({ isHovered: D, isFocused: O }) => f({
|
|
902
902
|
isSelected: !1,
|
|
903
903
|
isHovered: D,
|
|
@@ -905,22 +905,22 @@ const kt = () => {
|
|
|
905
905
|
isInteractive: n
|
|
906
906
|
}),
|
|
907
907
|
onHoverStart: ee,
|
|
908
|
-
onHoverEnd:
|
|
908
|
+
onHoverEnd: z,
|
|
909
909
|
onFocusChange: v
|
|
910
|
-
}, p.svg ? /* @__PURE__ */
|
|
910
|
+
}, p.svg ? /* @__PURE__ */ s.createElement(we, {
|
|
911
911
|
...p,
|
|
912
|
-
ref:
|
|
913
|
-
className: F(
|
|
914
|
-
}) : null, /* @__PURE__ */
|
|
915
|
-
className: F(fe.base, T.uploadButtonLabel,
|
|
912
|
+
ref: E,
|
|
913
|
+
className: F(ke, Ve, h)
|
|
914
|
+
}) : null, /* @__PURE__ */ s.createElement(b.Input.Value.Upload.Button.Text, {
|
|
915
|
+
className: F(fe.base, T.uploadButtonLabel, g, {
|
|
916
916
|
[fe.hover]: n && (S || P)
|
|
917
917
|
})
|
|
918
|
-
}, e.uploadLabel))))), /* @__PURE__ */
|
|
919
|
-
className: F(
|
|
920
|
-
}, /* @__PURE__ */
|
|
918
|
+
}, e.uploadLabel))))), /* @__PURE__ */ s.createElement(b.Error, {
|
|
919
|
+
className: F($e, ae.error)
|
|
920
|
+
}, /* @__PURE__ */ s.createElement(mt, null), /* @__PURE__ */ s.createElement(b.Error.Text, null)), /* @__PURE__ */ s.createElement(b.Description, {
|
|
921
921
|
className: F(pe, ae.description)
|
|
922
|
-
},
|
|
923
|
-
}, wn = () => /* @__PURE__ */
|
|
922
|
+
}, En));
|
|
923
|
+
}, wn = () => /* @__PURE__ */ s.createElement(gn, null);
|
|
924
924
|
export {
|
|
925
925
|
wn as SignatureRAC
|
|
926
926
|
};
|