@wix/form-elements 1.160.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-BmHu56e5.js → appointment-rac-3Z1wiBX6.js} +366 -359
- package/dist/component/{bookings-address-rac-DY9l2g0h.js → bookings-address-rac-2zV-a8SW.js} +1 -1
- package/dist/component/{bookings-email-rac-B5vNSOsS.js → bookings-email-rac-C1WakVnh.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CJiefCNz.js → bookings-first-name-rac-6f18uXA0.js} +1 -1
- package/dist/component/{bookings-header-rac-BFu7Ko5w.js → bookings-header-rac-BeaxlPQl.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DegMM13h.js → bookings-last-name-rac-CsLZaKfO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrA-5tBH.js → bookings-login-bar-rac-B3TRivWU.js} +5 -5
- package/dist/component/{bookings-phone-rac-DsaeqxCI.js → bookings-phone-rac-BnFEknvv.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-jRHiwqi8.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-CyoBb6Yf.js → checkbox-field-rac-DqGbxAd0.js} +45 -45
- package/dist/component/{checkbox-group-field-headless-Bv1gU3oL.js → checkbox-group-field-headless-CiobdaVa.js} +38 -38
- package/dist/component/{checkbox-group-field-rac-DasArcdV.js → checkbox-group-field-rac-Dxrc2F4x.js} +14 -14
- package/dist/component/{checkbox-group-rac-CzmufV1U.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-6C7XoUoZ.js → checkbox-rac-DhZsIMuk.js} +1 -1
- package/dist/component/{contacts-address-rac-BZobbFtz.js → contacts-address-rac--GiWpa6C.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DIzf41DS.js → contacts-birthdate-rac-CmI2nPpr.js} +1 -1
- package/dist/component/{contacts-company-rac-BiBDO28r.js → contacts-company-rac-DcSLvPnR.js} +1 -1
- package/dist/component/{contacts-email-rac-5mqokCSD.js → contacts-email-rac-BLOIHGP9.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BXe3_Nz5.js → contacts-first-name-rac-DgMCKLeE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cfqgh7u1.js → contacts-last-name-rac-tcEQP1Db.js} +1 -1
- package/dist/component/{contacts-phone-rac-cmLUWnAc.js → contacts-phone-rac-CK664cfW.js} +1 -1
- package/dist/component/{contacts-position-rac-DTyvklfN.js → contacts-position-rac-B8skwXy6.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-D-ZEX1A3.js → contacts-subscribe-rac-DQZYJjMo.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B4NYJwWt.js → contacts-tax-id-rac-Ci24ixLu.js} +1 -1
- package/dist/component/{date-availability-Dach9aRC.js → date-availability-Va6_2NAZ.js} +1 -1
- package/dist/component/{date-input-field-rac-B72mHcya.js → date-input-field-rac-lAKyuHOI.js} +98 -98
- package/dist/component/{date-input-rac-CYix11gT.js → date-input-rac-ClEesupR.js} +1 -1
- package/dist/component/{date-picker-field-rac-B8pvtPir.js → date-picker-field-rac-h45jfoso.js} +72 -72
- package/dist/component/{date-picker-rac-D6cR0zH9.js → date-picker-rac-B-pvqBn0.js} +1 -1
- package/dist/component/{date-time-input-field-rac-B7Y3Yf5l.js → date-time-input-field-rac-41QpurJp.js} +72 -72
- package/dist/component/{date-time-input-rac-DMN-noQX.js → date-time-input-rac-BQOUl7It.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Kq0GnteP.js → dext-checkbox-group-rac-C4Q6tfBD.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BY9GZ4n1.js → dext-checkbox-rac-Yo2PHNDA.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CXArIddp.js → dext-date-picker-rac-jM9x8W6a.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-B39TtxGq.js → dext-date-time-input-rac-BgW_4WIg.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3y0G8cS.js → dext-dropdown-rac-DCL7D6-G.js} +1 -1
- package/dist/component/{dext-email-rac-BIg3cq7Q.js → dext-email-rac-Dz7yBqkd.js} +1 -1
- package/dist/component/{dext-number-input-rac-27sHJ7yN.js → dext-number-input-rac-BdMjBpH9.js} +1 -1
- package/dist/component/{dext-phone-rac-CcohoFQp.js → dext-phone-rac-D2i9fXL3.js} +1 -1
- package/dist/component/{dext-radio-group-rac-eead3Gve.js → dext-radio-group-rac-Br2f1Ahx.js} +2 -2
- package/dist/component/{dext-rating-input-rac-B_E6OcBr.js → dext-rating-input-rac-OkfJ7Eb0.js} +1 -1
- package/dist/component/{dext-tags-rac-Yd9aAtnF.js → dext-tags-rac-43vDoDdM.js} +2 -2
- package/dist/component/{dext-text-area-rac-CMACri2C.js → dext-text-area-rac-C072pWO9.js} +1 -1
- package/dist/component/{dext-text-input-rac-sNjSCfQ-.js → dext-text-input-rac-BiHJpJCt.js} +1 -1
- package/dist/component/{dext-url-input-rac-DwhbzJty.js → dext-url-input-rac-YOGYMj5C.js} +1 -1
- package/dist/component/{donation-rac-BVAN3kMk.js → donation-rac-fCt3mddA.js} +106 -106
- package/dist/component/{dropdown-field-rac-DdoGigWx.js → dropdown-field-rac-EQrQJ2-C.js} +4 -4
- package/dist/component/{dropdown-rac-CRkt5w47.js → dropdown-rac-MPCcjrFd.js} +1 -1
- package/dist/component/{ecom-address-rac-C36hFHW0.js → ecom-address-rac-DSgpHqzV.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BKfQ348w.js → ecom-subscription-checkbox-rac-Dw6Ke0Fb.js} +2 -2
- package/dist/component/{email-input-field-rac-MOaISYxa.js → email-input-field-rac-DVmvH4u4.js} +80 -80
- package/dist/component/{events-repeater-rac-D6p-NgE8.js → events-repeater-rac-Uwpo7XF4.js} +25 -25
- package/dist/component/{events-rsvp-rac-DVpgN8gm.js → events-rsvp-rac-D2DJAkep.js} +4 -4
- package/dist/component/{field-error-headless-XNWmDH3E.js → field-error-headless-DAc8FpKI.js} +7 -7
- package/dist/component/{field-label-headless-CORRAJGt.js → field-label-headless-DxxwJtjh.js} +17 -17
- package/dist/component/field-rac.module-ts2t4WUO.js +25 -0
- package/dist/component/{file-upload-rac-DRMr7E4b.js → file-upload-rac-CBKIeaxX.js} +194 -194
- package/dist/component/{fixed-payment-rac-BUXzNex9.js → fixed-payment-rac-BsCDoc1p.js} +20 -20
- package/dist/component/{form-DSpx-AO8.js → form-GAuLAdjq.js} +338 -347
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CiDXlNsa.js → header-field-rac-DtZCjzLJ.js} +6 -6
- package/dist/component/{header-rac-B5Rg-h8u.js → header-rac-B1hlVDf8.js} +1 -1
- package/dist/component/image-choice-rac-DQaCg_Xk.js +155 -0
- package/dist/component/{index-CwruESwc.js → index-BaVjVNYj.js} +5 -5
- package/dist/component/{index-Bz7ZhQsF.js → index-C1EXd9jU.js} +50 -50
- package/dist/component/{isObjectLike-C5dHxHP0.js → isObjectLike-m2dqIREj.js} +3 -3
- package/dist/component/{multiline-address-field-rac-Z-qF366L.js → multiline-address-field-rac-CMMdLb-J.js} +41 -41
- package/dist/component/{multiline-address-rac-CJIHTMw5.js → multiline-address-rac-VUQNp-Tz.js} +1 -1
- package/dist/component/{number-input-field-rac-D4vf6I6N.js → number-input-field-rac-B5bsGDKm.js} +24 -24
- package/dist/component/{number-input-rac-B2jW6JUQ.js → number-input-rac-BzzW0p9R.js} +1 -1
- package/dist/component/{password-rac-DGRZ17Jl.js → password-rac-2Rr7lvNO.js} +25 -25
- package/dist/component/{payment-input-rac-BtD-tAKv.js → payment-input-rac-CEUzIrJA.js} +31 -31
- package/dist/component/{phone-input-field-rac-KD4-APhr.js → phone-input-field-rac-BDBaqAzE.js} +59 -59
- package/dist/component/{phone-rac-Cw2yccgg.js → phone-rac-BTK8-tkq.js} +1 -1
- package/dist/component/{product-list-rac-XbzTDdbp.js → product-list-rac-1QbeT5RH.js} +43 -43
- package/dist/component/{quiz-radio-group-rac-BDw_mAw5.js → quiz-radio-group-rac-tn2CzdCu.js} +1 -1
- package/dist/component/{radio-button-module-classes-CFGf0Hzh.js → radio-button-module-classes-aK1SQcLG.js} +30 -30
- package/dist/component/{radio-group-field-rac-CXN7tyVu.js → radio-group-field-rac-DlMXhW_S.js} +7 -7
- package/dist/component/{radio-group-rac-COHzqjBh.js → radio-group-rac-BmU_5tBK.js} +1 -1
- package/dist/component/{rating-input-field-rac-DCXNZgf1.js → rating-input-field-rac-DUPJUAX2.js} +27 -27
- package/dist/component/{rating-input-rac-DwQt9ML7.js → rating-input-rac-BLhkZdj8.js} +1 -1
- package/dist/component/{rich-content-rac.module-B7rPwNns.js → rich-content-rac.module-C9bGXB69.js} +5 -5
- package/dist/component/{rich-text-field-rac-DlER7NRD.js → rich-text-field-rac-CVqmsZzZ.js} +6 -6
- package/dist/component/{rich-text-rac-CjicsHA7.js → rich-text-rac-D8K6445F.js} +1 -1
- package/dist/component/{service-dropdown-rac-B81LC_6_.js → service-dropdown-rac-PR_iLdmo.js} +31 -31
- package/dist/component/{services-multi-choice-rac-BR6gZeHk.js → services-multi-choice-rac-BvMadJCf.js} +19 -19
- package/dist/component/{signature-rac-XFj7Ddtp.js → signature-rac-Cpjv6kcl.js} +235 -235
- package/dist/component/{submit-button-rac-Bz7zs_3W.js → submit-button-rac-DpDk7cMb.js} +7 -7
- package/dist/component/{tags-field-rac-DWWkNKqc.js → tags-field-rac-DnyWNHXT.js} +67 -67
- package/dist/component/{tags-rac-BXyiQ9i1.js → tags-rac-D5Do7BNm.js} +1 -1
- package/dist/component/{text-area-field-rac-DsIRYi0d.js → text-area-field-rac-DLBgla0L.js} +27 -27
- package/dist/component/{text-area-rac-CF9pDP9d.js → text-area-rac-Bfsl2gSn.js} +1 -1
- package/dist/component/{text-input-field-rac-BwIDZACz.js → text-input-field-rac-hLsUcQNw.js} +4 -4
- package/dist/component/{text-input-headless-5kQs2_Xu.js → text-input-headless-Otd7Uy7V.js} +13 -13
- package/dist/component/{text-input-rac-CRmSuw1k.js → text-input-rac-jpnc-v91.js} +1 -1
- package/dist/component/{time-input-rac-BRMNpe51.js → time-input-rac-DnjrmZZw.js} +26 -26
- package/dist/component/url-input-field-rac-C90NYHb8.js +77 -0
- package/dist/component/{url-input-rac-Dv-kp50D.js → url-input-rac-C3wfEnqs.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BQi_qE_-.js → use-dropdown-option-class-name-CYkLlKBs.js} +12 -12
- package/dist/component/{use-dropdown-trigger-class-name-bAK8aHiG.js → use-dropdown-trigger-class-name-CTt4Z67m.js} +17 -17
- package/dist/component/{use-element-state-class-name-rXM_lHug.js → use-element-state-class-name-ByDw6j7c.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-BnV_uerV.js → use-hoverable-input-class-name-Duhgtn2I.js} +3 -3
- package/dist/component/use-is-forced-open-dropdown-B5gNY4Zm.js +53 -0
- package/dist/component/{use-service-options-base-CLeE9-Tx.js → use-service-options-base-DE-QaNDw.js} +8 -8
- package/dist/component/use-text-input-class-name-CmxSw6bY.js +6 -0
- package/dist/form.d.ts +3 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DP0lkkEv.js +0 -25
- package/dist/component/image-choice-rac-CtoA_KDp.js +0 -155
- package/dist/component/url-input-field-rac-CKLS3QDk.js +0 -77
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +0 -53
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +0 -6
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import t, { useState as Y, useRef as
|
|
1
|
+
import t, { useState as Y, useRef as j, useMemo as fe, useEffect as ne, useCallback as M, createContext as he, useContext as _e } from "react";
|
|
2
2
|
import Le from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import R from "classnames";
|
|
5
|
+
import { bu as xe, bI as oe, bD as ve, aB as Ne, bG as De, au as ie, bH as ye, bv as Ee, by as z, bA as Te, bs as Se, br as Be, U as Ie, aa as Ae, b as Re, N as Ze, O as ce, G as ue, L as de, K as pe, M as Me, f as te } from "./form-GAuLAdjq.js";
|
|
6
6
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
-
import { s as $ } from "./field-rac.module-
|
|
8
|
-
import { u as me } from "./use-element-state-class-name-
|
|
9
|
-
import { DropZone as Ue, Text as we, FileTrigger as
|
|
10
|
-
import { f as L, a as
|
|
11
|
-
import { b as
|
|
12
|
-
import { L as
|
|
7
|
+
import { s as $ } from "./field-rac.module-ts2t4WUO.js";
|
|
8
|
+
import { u as me } from "./use-element-state-class-name-ByDw6j7c.js";
|
|
9
|
+
import { DropZone as Ue, Text as we, FileTrigger as He, Button as Fe, ProgressBar as Pe, VisuallyHidden as je } from "react-aria-components";
|
|
10
|
+
import { f as L, a as G } from "./find-child-C60k4CxG.js";
|
|
11
|
+
import { b as ke, a as ze, D as Ve, E as Ke } from "./field-error-headless-DAc8FpKI.js";
|
|
12
|
+
import { L as qe } from "./field-label-headless-DxxwJtjh.js";
|
|
13
13
|
const $e = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
@@ -18,161 +18,161 @@ const $e = {
|
|
|
18
18
|
Archive: ".zip, .rar, .tar, .tar.gz, .gz, .gzip, .jar, .7z, .fgz, .webarchive",
|
|
19
19
|
Model3D: ".gltf, .glb"
|
|
20
20
|
}, Ye = (e) => {
|
|
21
|
-
const { actions: n, formId:
|
|
21
|
+
const { actions: n, formId: o } = xe();
|
|
22
22
|
return async (l, s, d) => {
|
|
23
23
|
if (!(n != null && n.uploadFile) || !l.length)
|
|
24
24
|
return n != null && n.uploadFile || console.error("No uploadFile action"), l.length || console.error("No files to upload"), [];
|
|
25
|
-
const E = l.map(({ file:
|
|
26
|
-
file:
|
|
27
|
-
formId:
|
|
25
|
+
const E = l.map(({ file: r }) => n.uploadFile({
|
|
26
|
+
file: r,
|
|
27
|
+
formId: o,
|
|
28
28
|
uploadTarget: e
|
|
29
29
|
}).then((i) => {
|
|
30
|
-
const { id: x, displayName: p, url: m, isPrivate: c } = i,
|
|
30
|
+
const { id: x, displayName: p, url: m, isPrivate: c } = i, y = {
|
|
31
31
|
fileId: x,
|
|
32
|
-
displayName: p ||
|
|
32
|
+
displayName: p || r.name,
|
|
33
33
|
url: c ? void 0 : m,
|
|
34
|
-
fileType:
|
|
34
|
+
fileType: r.type || "application/octet-stream"
|
|
35
35
|
};
|
|
36
36
|
return s({
|
|
37
|
-
file:
|
|
38
|
-
uploadedFile:
|
|
39
|
-
}),
|
|
37
|
+
file: r,
|
|
38
|
+
uploadedFile: y
|
|
39
|
+
}), y;
|
|
40
40
|
}).catch((i) => {
|
|
41
|
-
d(i,
|
|
41
|
+
d(i, r);
|
|
42
42
|
}));
|
|
43
|
-
return (await Promise.all(E)).filter((
|
|
43
|
+
return (await Promise.all(E)).filter((r) => r !== void 0);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
function
|
|
47
|
-
const [
|
|
48
|
-
|
|
49
|
-
const N = fe(() =>
|
|
50
|
-
|
|
46
|
+
function Ge({ valueSliderLimit: e, value: n, explanationText: o, target: l, onChange: s, uploadFileFormats: d, onBlur: E, onFilesCleared: C }) {
|
|
47
|
+
const [r, i] = Y(We(n)), [x, p] = Y(n || []), [m, c] = Y(), y = Ye(l), { t: v } = oe(), g = ve().includes(Ne.BUTTONS_HOVER), { setFormStatus: S } = De(), I = j(!1), B = j(s);
|
|
48
|
+
B.current = s;
|
|
49
|
+
const N = fe(() => r.some((f) => f.state === "uploading"), [
|
|
50
|
+
r
|
|
51
51
|
]);
|
|
52
52
|
ne(() => {
|
|
53
|
-
I.current !== N && (I.current = N,
|
|
53
|
+
I.current !== N && (I.current = N, S(l, N ? ie.BUSY : ie.READY));
|
|
54
54
|
}, [
|
|
55
55
|
N,
|
|
56
|
-
|
|
56
|
+
S,
|
|
57
57
|
l
|
|
58
58
|
]);
|
|
59
59
|
const u = M(() => {
|
|
60
|
-
if (!
|
|
60
|
+
if (!r.length)
|
|
61
61
|
return;
|
|
62
|
-
const h =
|
|
62
|
+
const h = r.filter((f) => f.state === "uploading").length;
|
|
63
63
|
if (h) {
|
|
64
|
-
const f =
|
|
64
|
+
const f = r.filter((F) => F.state === "uploaded" && F.file.size > 0).length, _ = f / (f + h);
|
|
65
65
|
return v("form.file-upload.uploading", {
|
|
66
66
|
count: Math.round(_ * 100)
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
return v("form.file-upload.explanation-text", {
|
|
70
|
-
count:
|
|
70
|
+
count: r.length
|
|
71
71
|
});
|
|
72
72
|
}, [
|
|
73
|
-
|
|
73
|
+
r,
|
|
74
74
|
v
|
|
75
|
-
]),
|
|
76
|
-
o,
|
|
75
|
+
]), A = M(() => r.length ? r.some((f) => f.state === "uploading") ? u() : o || u() : o, [
|
|
77
76
|
r,
|
|
77
|
+
o,
|
|
78
78
|
u
|
|
79
|
-
]),
|
|
80
|
-
await
|
|
81
|
-
i((
|
|
79
|
+
]), T = M(async (h) => {
|
|
80
|
+
await y(h, ({ file: f, uploadedFile: _ }) => {
|
|
81
|
+
i((F) => F.map((b) => b.file === f ? {
|
|
82
82
|
file: f,
|
|
83
83
|
state: "uploaded"
|
|
84
|
-
} :
|
|
84
|
+
} : b)), p((F) => {
|
|
85
85
|
var w;
|
|
86
|
-
const
|
|
87
|
-
...
|
|
86
|
+
const b = [
|
|
87
|
+
...F
|
|
88
88
|
].concat(_);
|
|
89
|
-
return (w =
|
|
89
|
+
return (w = B.current) == null || w.call(B, b), b;
|
|
90
90
|
});
|
|
91
91
|
}, (f, _) => {
|
|
92
|
-
i((
|
|
92
|
+
i((F) => F.map((b) => b.file === _ ? {
|
|
93
93
|
file: _,
|
|
94
94
|
state: "error",
|
|
95
95
|
errorMessage: v("form.file-upload.error.upload-failed")
|
|
96
|
-
} :
|
|
96
|
+
} : b));
|
|
97
97
|
});
|
|
98
98
|
}, [
|
|
99
|
-
|
|
99
|
+
y,
|
|
100
100
|
v
|
|
101
|
-
]),
|
|
101
|
+
]), K = async (h) => {
|
|
102
102
|
if (m && c(void 0), h) {
|
|
103
|
-
if (
|
|
103
|
+
if (r.length + h.length > e) {
|
|
104
104
|
c(v("form.file-upload.error.upload-limit", {
|
|
105
105
|
limit: e
|
|
106
106
|
}));
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const F = Array.from(h).reduce((b, w) => (r.some((H) => H.file.name === w.name) || b.push({
|
|
110
110
|
file: w,
|
|
111
111
|
state: "uploading"
|
|
112
|
-
}),
|
|
112
|
+
}), b), []);
|
|
113
113
|
i([
|
|
114
|
-
...
|
|
115
|
-
...
|
|
116
|
-
]), await
|
|
114
|
+
...r,
|
|
115
|
+
...F
|
|
116
|
+
]), await T(F);
|
|
117
117
|
}
|
|
118
118
|
}, U = (h) => {
|
|
119
|
-
const f =
|
|
119
|
+
const f = r[h];
|
|
120
120
|
if (x && s && f.state !== "error") {
|
|
121
|
-
const _ = x.filter((
|
|
121
|
+
const _ = x.filter((b) => b.displayName !== f.file.name);
|
|
122
122
|
s(_), p(_);
|
|
123
|
-
const
|
|
124
|
-
i(
|
|
123
|
+
const F = r.filter((b) => b.file.name !== f.file.name);
|
|
124
|
+
i(F), F.length === 0 && C();
|
|
125
125
|
} else {
|
|
126
|
-
const _ =
|
|
126
|
+
const _ = r.filter((F) => F !== f);
|
|
127
127
|
i(_), _.length === 0 && C();
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, q = () => {
|
|
130
130
|
m && c(void 0), E();
|
|
131
|
-
},
|
|
131
|
+
}, W = d.map((h) => $e[h]).join(), X = M(() => {
|
|
132
132
|
i([]), p([]);
|
|
133
133
|
}, []);
|
|
134
|
-
return
|
|
135
|
-
files:
|
|
134
|
+
return ye(X), {
|
|
135
|
+
files: r,
|
|
136
136
|
limitError: m,
|
|
137
137
|
hover: g,
|
|
138
|
-
getExplanationText:
|
|
138
|
+
getExplanationText: A,
|
|
139
139
|
getStatusText: u,
|
|
140
|
-
handleChange:
|
|
140
|
+
handleChange: K,
|
|
141
141
|
handleDelete: U,
|
|
142
|
-
accept:
|
|
143
|
-
handleBlur:
|
|
142
|
+
accept: W,
|
|
143
|
+
handleBlur: q
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function We(e = []) {
|
|
147
147
|
const n = e || [];
|
|
148
148
|
try {
|
|
149
|
-
return n.map((
|
|
149
|
+
return n.map((o) => ({
|
|
150
150
|
file: new File([
|
|
151
151
|
new Int8Array(0)
|
|
152
|
-
],
|
|
153
|
-
type:
|
|
152
|
+
], o.displayName, {
|
|
153
|
+
type: o.fileType
|
|
154
154
|
}),
|
|
155
155
|
state: "uploaded"
|
|
156
156
|
}));
|
|
157
|
-
} catch (
|
|
158
|
-
console.error(
|
|
157
|
+
} catch (o) {
|
|
158
|
+
console.error(o);
|
|
159
159
|
}
|
|
160
160
|
return [];
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
function
|
|
164
|
-
const e = _e(
|
|
162
|
+
const be = /* @__PURE__ */ he(void 0);
|
|
163
|
+
function V() {
|
|
164
|
+
const e = _e(be);
|
|
165
165
|
if (typeof e > "u")
|
|
166
166
|
throw new Error("FileUpload components must be used within FileUpload");
|
|
167
167
|
return e;
|
|
168
168
|
}
|
|
169
|
-
const
|
|
170
|
-
const { ariaDescribedBy:
|
|
169
|
+
const k = ({ children: e, className: n }) => {
|
|
170
|
+
const { ariaDescribedBy: o } = Ee(), { disabled: l, hasError: s } = z(), { handleFileChange: d, limitReached: E } = V();
|
|
171
171
|
if (E)
|
|
172
172
|
return null;
|
|
173
|
-
const C = L(e,
|
|
173
|
+
const C = L(e, k.Title), r = L(e, k.Subtitle), i = L(e, k.Button);
|
|
174
174
|
return /* @__PURE__ */ t.createElement(Ue, {
|
|
175
|
-
"aria-describedby":
|
|
175
|
+
"aria-describedby": o,
|
|
176
176
|
className: n,
|
|
177
177
|
"data-invalid": s,
|
|
178
178
|
isDisabled: l,
|
|
@@ -190,44 +190,44 @@ const z = ({ children: e, className: n }) => {
|
|
|
190
190
|
}
|
|
191
191
|
}, /* @__PURE__ */ t.createElement(we, {
|
|
192
192
|
slot: "label"
|
|
193
|
-
}, C,
|
|
193
|
+
}, C, r), i);
|
|
194
194
|
}, Qe = ({ className: e, children: n }) => {
|
|
195
|
-
const { limitReached:
|
|
195
|
+
const { limitReached: o } = V();
|
|
196
196
|
return /* @__PURE__ */ t.createElement("p", {
|
|
197
197
|
className: e
|
|
198
198
|
}, n({
|
|
199
|
-
limitReached:
|
|
199
|
+
limitReached: o
|
|
200
200
|
}));
|
|
201
|
-
},
|
|
202
|
-
const { limitReached:
|
|
201
|
+
}, Je = ({ className: e, children: n }) => {
|
|
202
|
+
const { limitReached: o } = V(), { explanationText: l } = z();
|
|
203
203
|
return /* @__PURE__ */ t.createElement("p", {
|
|
204
204
|
className: e
|
|
205
205
|
}, l || n({
|
|
206
|
-
limitReached:
|
|
206
|
+
limitReached: o
|
|
207
207
|
}));
|
|
208
|
-
},
|
|
209
|
-
const { ariaDescribedBy: E, inputId: C, labelId:
|
|
210
|
-
return /* @__PURE__ */ t.createElement(
|
|
208
|
+
}, re = ({ className: e, children: n, "aria-roledescription": o, onHoverStart: l, onHoverEnd: s, onFocusChange: d }) => {
|
|
209
|
+
const { ariaDescribedBy: E, inputId: C, labelId: r, errorId: i } = Ee(), { disabled: x, required: p, onFocus: m, hasError: c, errorMessage: y } = z(), { handleFileChange: v, accept: O, multiple: g, buttonRef: S, handleBlur: I, limitError: B, files: N } = V(), u = (N == null ? void 0 : N.some((T) => T.errorMessage)) ?? !1, A = !!(c || y || B || u);
|
|
210
|
+
return /* @__PURE__ */ t.createElement(He, {
|
|
211
211
|
acceptedFileTypes: O ? O.split(",") : void 0,
|
|
212
212
|
allowsMultiple: g,
|
|
213
|
-
onSelect: (
|
|
214
|
-
if (
|
|
215
|
-
const
|
|
216
|
-
|
|
213
|
+
onSelect: (T) => {
|
|
214
|
+
if (T) {
|
|
215
|
+
const K = Array.from(T), U = new DataTransfer();
|
|
216
|
+
K.forEach((q) => U.items.add(q)), v(U.files);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
}, /* @__PURE__ */ t.createElement(
|
|
220
|
-
ref:
|
|
219
|
+
}, /* @__PURE__ */ t.createElement(Fe, {
|
|
220
|
+
ref: S,
|
|
221
221
|
id: C,
|
|
222
|
-
"aria-labelledby":
|
|
222
|
+
"aria-labelledby": r,
|
|
223
223
|
"aria-describedby": [
|
|
224
224
|
E,
|
|
225
225
|
i
|
|
226
226
|
].filter(Boolean).join(" "),
|
|
227
|
-
render: (
|
|
228
|
-
...
|
|
229
|
-
"aria-roledescription":
|
|
230
|
-
"aria-invalid":
|
|
227
|
+
render: (T) => /* @__PURE__ */ t.createElement("button", {
|
|
228
|
+
...T,
|
|
229
|
+
"aria-roledescription": o,
|
|
230
|
+
"aria-invalid": A || void 0,
|
|
231
231
|
"aria-required": p
|
|
232
232
|
}),
|
|
233
233
|
isDisabled: x,
|
|
@@ -239,47 +239,47 @@ const z = ({ children: e, className: n }) => {
|
|
|
239
239
|
onFocusChange: d
|
|
240
240
|
}, n));
|
|
241
241
|
}, Xe = ({ className: e }) => {
|
|
242
|
-
const { buttonText: n } =
|
|
242
|
+
const { buttonText: n } = z();
|
|
243
243
|
return /* @__PURE__ */ t.createElement("span", {
|
|
244
244
|
className: e
|
|
245
245
|
}, n);
|
|
246
246
|
};
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
const
|
|
252
|
-
const { file: l, index: s } =
|
|
247
|
+
re.Text = Xe;
|
|
248
|
+
k.Title = Qe;
|
|
249
|
+
k.Subtitle = Je;
|
|
250
|
+
k.Button = re;
|
|
251
|
+
const Z = ({ children: e, className: n, ...o }) => {
|
|
252
|
+
const { file: l, index: s } = o, d = l.file.name, E = L(e, Z.Name), C = L(e, Z.Remove), r = L(e, Z.Spinner), i = L(e, Z.Error);
|
|
253
253
|
return /* @__PURE__ */ t.createElement("div", {
|
|
254
254
|
className: n
|
|
255
|
-
},
|
|
255
|
+
}, G(E, {
|
|
256
256
|
fileName: d
|
|
257
|
-
}), l.state === "uploading" ?
|
|
257
|
+
}), l.state === "uploading" ? r : G(C, {
|
|
258
258
|
index: s,
|
|
259
259
|
fileName: d
|
|
260
|
-
}), l.errorMessage &&
|
|
260
|
+
}), l.errorMessage && G(i, {
|
|
261
261
|
errorMessage: l.errorMessage
|
|
262
262
|
}));
|
|
263
263
|
}, et = ({ className: e, ...n }) => {
|
|
264
|
-
const { fileName:
|
|
264
|
+
const { fileName: o } = n;
|
|
265
265
|
return /* @__PURE__ */ t.createElement("span", {
|
|
266
266
|
className: e
|
|
267
|
-
},
|
|
268
|
-
}, tt = ({ className: e, "aria-label": n, children:
|
|
269
|
-
const { fileName: s, index: d } = l, { disabled: E } =
|
|
267
|
+
}, o);
|
|
268
|
+
}, tt = ({ className: e, "aria-label": n, children: o, ...l }) => {
|
|
269
|
+
const { fileName: s, index: d } = l, { disabled: E } = z(), { handleDelete: C, fileRemoveButtonRefs: r } = V(), i = j(null);
|
|
270
270
|
ne(() => {
|
|
271
|
-
const p =
|
|
271
|
+
const p = r.current, m = s;
|
|
272
272
|
return p[m] = i, () => {
|
|
273
273
|
p[m] === i && (p[m] = void 0);
|
|
274
274
|
};
|
|
275
275
|
}, [
|
|
276
276
|
s,
|
|
277
|
-
|
|
277
|
+
r
|
|
278
278
|
]);
|
|
279
279
|
const x = () => {
|
|
280
280
|
C(d);
|
|
281
281
|
};
|
|
282
|
-
return /* @__PURE__ */ t.createElement(
|
|
282
|
+
return /* @__PURE__ */ t.createElement(Fe, {
|
|
283
283
|
ref: i,
|
|
284
284
|
"aria-disabled": E,
|
|
285
285
|
"aria-label": n,
|
|
@@ -287,54 +287,54 @@ const A = ({ children: e, className: n, ...r }) => {
|
|
|
287
287
|
onClick: x,
|
|
288
288
|
className: e,
|
|
289
289
|
isDisabled: E
|
|
290
|
-
},
|
|
291
|
-
}, ge = ({ className: e, children: n, ...
|
|
292
|
-
const { errorMessage: l } =
|
|
293
|
-
return l ? /* @__PURE__ */ t.createElement(
|
|
290
|
+
}, o);
|
|
291
|
+
}, ge = ({ className: e, children: n, ...o }) => {
|
|
292
|
+
const { errorMessage: l } = o;
|
|
293
|
+
return l ? /* @__PURE__ */ t.createElement(ze, {
|
|
294
294
|
value: l
|
|
295
295
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
296
296
|
className: e,
|
|
297
297
|
role: "alert"
|
|
298
298
|
}, n)) : null;
|
|
299
|
-
}, nt = ({ className: e, "aria-label": n, children:
|
|
299
|
+
}, nt = ({ className: e, "aria-label": n, children: o }) => /* @__PURE__ */ t.createElement(Pe, {
|
|
300
300
|
"aria-label": n,
|
|
301
301
|
className: e,
|
|
302
302
|
isIndeterminate: !0
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
ge.Text =
|
|
303
|
+
}, o);
|
|
304
|
+
Z.Name = et;
|
|
305
|
+
Z.Remove = tt;
|
|
306
|
+
Z.Spinner = nt;
|
|
307
|
+
Z.Error = ge;
|
|
308
|
+
ge.Text = ke;
|
|
309
309
|
const le = ({ children: e, className: n }) => {
|
|
310
|
-
const { files:
|
|
311
|
-
return !
|
|
310
|
+
const { files: o } = V(), l = L(e, le.File);
|
|
311
|
+
return !o || o.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
312
312
|
className: n
|
|
313
|
-
},
|
|
313
|
+
}, o.map((s, d) => G(l, {
|
|
314
314
|
key: s.file.name || d,
|
|
315
315
|
file: s,
|
|
316
316
|
index: d
|
|
317
317
|
})));
|
|
318
318
|
};
|
|
319
|
-
le.File =
|
|
320
|
-
const
|
|
321
|
-
const { t: n } =
|
|
319
|
+
le.File = Z;
|
|
320
|
+
const J = (e) => e.file.name, a = ({ children: e }) => {
|
|
321
|
+
const { t: n } = oe(), { id: o, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target: C, explanationText: r, onBlur: i, hasError: x, errorMessage: p, FieldLayout: m } = z(), c = j(null), y = j({}), v = j(!1), O = M(() => {
|
|
322
322
|
c.current ? c.current.focus() : v.current = !0;
|
|
323
|
-
}, []), { files: g, limitError:
|
|
323
|
+
}, []), { files: g, limitError: S, hover: I, getExplanationText: B, getStatusText: N, handleBlur: u, handleChange: A, handleDelete: T, accept: K } = Ge({
|
|
324
324
|
valueSliderLimit: E,
|
|
325
325
|
value: l,
|
|
326
|
-
explanationText:
|
|
326
|
+
explanationText: r,
|
|
327
327
|
target: C,
|
|
328
328
|
onChange: s,
|
|
329
329
|
uploadFileFormats: d,
|
|
330
330
|
onBlur: i,
|
|
331
331
|
onFilesCleared: O
|
|
332
|
-
}), U = M((
|
|
332
|
+
}), U = M((H) => {
|
|
333
333
|
var se;
|
|
334
|
-
const Q = g[
|
|
335
|
-
g.length > 1 && ((se = (g.filter((ee) =>
|
|
334
|
+
const Q = g[H], P = J(Q);
|
|
335
|
+
g.length > 1 && ((se = (g.filter((ee) => J(ee) !== P).map((ee) => y.current[J(ee)]).find(Boolean) ?? c).current) == null || se.focus()), T(H);
|
|
336
336
|
}, [
|
|
337
|
-
|
|
337
|
+
T,
|
|
338
338
|
g
|
|
339
339
|
]);
|
|
340
340
|
ne(() => {
|
|
@@ -342,75 +342,75 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
342
342
|
}, [
|
|
343
343
|
g
|
|
344
344
|
]);
|
|
345
|
-
const
|
|
346
|
-
handleFileChange:
|
|
345
|
+
const q = E > 1, W = g.length >= E, X = fe(() => ({
|
|
346
|
+
handleFileChange: A,
|
|
347
347
|
handleBlur: u,
|
|
348
348
|
handleDelete: U,
|
|
349
349
|
files: g,
|
|
350
|
-
accept:
|
|
351
|
-
limitReached:
|
|
352
|
-
multiple:
|
|
353
|
-
getExplanationText:
|
|
350
|
+
accept: K,
|
|
351
|
+
limitReached: W,
|
|
352
|
+
multiple: q,
|
|
353
|
+
getExplanationText: B,
|
|
354
354
|
getStatusText: N,
|
|
355
355
|
hover: I,
|
|
356
|
-
limitError:
|
|
356
|
+
limitError: S,
|
|
357
357
|
buttonRef: c,
|
|
358
|
-
fileRemoveButtonRefs:
|
|
358
|
+
fileRemoveButtonRefs: y
|
|
359
359
|
}), [
|
|
360
|
-
|
|
360
|
+
A,
|
|
361
361
|
u,
|
|
362
362
|
U,
|
|
363
363
|
g,
|
|
364
|
-
q,
|
|
365
|
-
J,
|
|
366
364
|
K,
|
|
367
|
-
|
|
365
|
+
W,
|
|
366
|
+
q,
|
|
367
|
+
B,
|
|
368
368
|
N,
|
|
369
369
|
I,
|
|
370
|
-
|
|
371
|
-
]), h = L(e, a.Label), f = L(e, a.DropZone), _ = L(e, a.Button),
|
|
372
|
-
return
|
|
373
|
-
var
|
|
370
|
+
S
|
|
371
|
+
]), h = L(e, a.Label), f = L(e, a.DropZone), _ = L(e, a.Button), F = L(e, a.Explanation), b = L(e, a.Files), w = L(e, a.Description), ae = L(e, a.Error);
|
|
372
|
+
return Te(() => {
|
|
373
|
+
var H, Q;
|
|
374
374
|
if (c.current) {
|
|
375
375
|
c.current.focus({
|
|
376
376
|
preventScroll: !0
|
|
377
377
|
});
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
(Q = (
|
|
380
|
+
(Q = (H = g.map((P) => y.current[J(P)]).find((P) => P == null ? void 0 : P.current)) == null ? void 0 : H.current) == null || Q.focus({
|
|
381
381
|
preventScroll: !0
|
|
382
382
|
});
|
|
383
|
-
},
|
|
383
|
+
}, o), /* @__PURE__ */ t.createElement(be.Provider, {
|
|
384
384
|
value: X
|
|
385
385
|
}, /* @__PURE__ */ t.createElement(m, {
|
|
386
|
-
fieldId:
|
|
386
|
+
fieldId: o,
|
|
387
387
|
renderLabel: () => h,
|
|
388
388
|
renderInput: () => f ?? _,
|
|
389
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
390
|
-
hasError: !!(x ||
|
|
391
|
-
errorMessage:
|
|
392
|
-
}), /* @__PURE__ */ t.createElement(
|
|
389
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, G(ae, {
|
|
390
|
+
hasError: !!(x || S),
|
|
391
|
+
errorMessage: S ?? p
|
|
392
|
+
}), /* @__PURE__ */ t.createElement(je, {
|
|
393
393
|
role: "status",
|
|
394
394
|
"aria-live": "polite",
|
|
395
395
|
"aria-atomic": "true"
|
|
396
396
|
}, n("form.file-upload.explanation-text", {
|
|
397
397
|
count: g.length
|
|
398
|
-
})),
|
|
398
|
+
})), F, b, w)
|
|
399
399
|
}));
|
|
400
|
-
},
|
|
401
|
-
const { files:
|
|
402
|
-
return
|
|
400
|
+
}, ot = ({ className: e, showUploadStatusOnly: n }) => {
|
|
401
|
+
const { files: o, getExplanationText: l, getStatusText: s } = V(), d = n ? s() : l();
|
|
402
|
+
return o.length === 1 || !d ? null : /* @__PURE__ */ t.createElement("p", {
|
|
403
403
|
className: e
|
|
404
404
|
}, d);
|
|
405
405
|
};
|
|
406
|
-
a.Label =
|
|
407
|
-
a.DropZone =
|
|
408
|
-
a.Button =
|
|
409
|
-
a.Explanation =
|
|
406
|
+
a.Label = qe;
|
|
407
|
+
a.DropZone = k;
|
|
408
|
+
a.Button = re;
|
|
409
|
+
a.Explanation = ot;
|
|
410
410
|
a.Files = le;
|
|
411
|
-
a.Description =
|
|
412
|
-
a.Error =
|
|
413
|
-
const
|
|
411
|
+
a.Description = Ve;
|
|
412
|
+
a.Error = Ke;
|
|
413
|
+
const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
414
414
|
viewBox: "0 0 24 24",
|
|
415
415
|
width: 24,
|
|
416
416
|
height: 24,
|
|
@@ -469,7 +469,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
469
469
|
values: "0;360",
|
|
470
470
|
repeatCount: "indefinite"
|
|
471
471
|
})));
|
|
472
|
-
}, it = "
|
|
472
|
+
}, it = "_dropZone_lyjp9_1", ct = "_dropZoneHover_lyjp9_27", ut = "_dropZoneTitle_lyjp9_64", dt = "_dropZoneSubtitle_lyjp9_69", pt = "_button_lyjp9_73", mt = "_buttonHover_lyjp9_126", ft = "_explanation_lyjp9_143", Et = "_files_lyjp9_147", Ft = "_file_lyjp9_147", bt = "_fileName_lyjp9_197", gt = "_buttonLabel_lyjp9_205", ht = "_removeButton_lyjp9_209", _t = "_spinner_lyjp9_256", Lt = "_fileError_lyjp9_272", D = {
|
|
473
473
|
dropZone: it,
|
|
474
474
|
dropZoneHover: ct,
|
|
475
475
|
dropZoneTitle: ut,
|
|
@@ -478,8 +478,8 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
478
478
|
buttonHover: mt,
|
|
479
479
|
explanation: ft,
|
|
480
480
|
files: Et,
|
|
481
|
-
file:
|
|
482
|
-
fileName:
|
|
481
|
+
file: Ft,
|
|
482
|
+
fileName: bt,
|
|
483
483
|
buttonLabel: gt,
|
|
484
484
|
removeButton: ht,
|
|
485
485
|
spinner: _t,
|
|
@@ -488,8 +488,8 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
488
488
|
content: e,
|
|
489
489
|
locale: n
|
|
490
490
|
}), xt = () => {
|
|
491
|
-
var
|
|
492
|
-
const { t: e } =
|
|
491
|
+
var S, I, B, N;
|
|
492
|
+
const { t: e } = oe(), { disabled: n, readOnly: o } = z(), l = !n && !o, s = me({
|
|
493
493
|
globalClasses: de,
|
|
494
494
|
moduleClasses: {
|
|
495
495
|
base: D.dropZone,
|
|
@@ -501,7 +501,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
501
501
|
base: D.button,
|
|
502
502
|
hover: D.buttonHover
|
|
503
503
|
}
|
|
504
|
-
}), E = (N = (
|
|
504
|
+
}), E = (N = (B = (I = (S = Se().fileUpload) == null ? void 0 : S.elementProps) == null ? void 0 : I.uploadButton) == null ? void 0 : B.elementProps) == null ? void 0 : N.icon, { wix: C, className: r, ...i } = E ?? {}, x = Be(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), p = j(null), [m, c] = Y(!1), [y, v] = Y(!1), O = M(() => {
|
|
505
505
|
var u;
|
|
506
506
|
c(!0), (u = p.current) == null || u.runAnimationForward();
|
|
507
507
|
}, []), g = M(() => {
|
|
@@ -509,14 +509,14 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
509
509
|
c(!1), (u = p.current) == null || u.runAnimationBackward();
|
|
510
510
|
}, []);
|
|
511
511
|
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
512
|
-
className:
|
|
512
|
+
className: R(Ie, $.label)
|
|
513
513
|
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
514
|
-
className:
|
|
514
|
+
className: R(Ae, $.requiredMark)
|
|
515
515
|
})), /* @__PURE__ */ t.createElement(a.DropZone, {
|
|
516
|
-
className: ({ isHovered: u, isFocused:
|
|
516
|
+
className: ({ isHovered: u, isFocused: A, isDropTarget: T }) => s({
|
|
517
517
|
isSelected: !1,
|
|
518
|
-
isHovered: u ||
|
|
519
|
-
isFocused:
|
|
518
|
+
isHovered: u || T,
|
|
519
|
+
isFocused: A,
|
|
520
520
|
isInteractive: l
|
|
521
521
|
})
|
|
522
522
|
}, /* @__PURE__ */ t.createElement(a.DropZone.Title, {
|
|
@@ -524,10 +524,10 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
524
524
|
}, ({ limitReached: u }) => e(u ? "file-upload.dropzone.limit-reached.title" : "file-upload.dropzone.title")), /* @__PURE__ */ t.createElement(a.DropZone.Subtitle, {
|
|
525
525
|
className: D.dropZoneSubtitle
|
|
526
526
|
}, ({ limitReached: u }) => e(u ? "file-upload.dropzone.limit-reached.subtitle" : "file-upload.dropzone.subtitle")), /* @__PURE__ */ t.createElement(a.DropZone.Button, {
|
|
527
|
-
className: ({ isHovered: u, isFocused:
|
|
527
|
+
className: ({ isHovered: u, isFocused: A }) => d({
|
|
528
528
|
isSelected: !1,
|
|
529
529
|
isHovered: u,
|
|
530
|
-
isFocused:
|
|
530
|
+
isFocused: A,
|
|
531
531
|
isInteractive: l
|
|
532
532
|
}),
|
|
533
533
|
"aria-roledescription": e("file-upload.aria-roledescription"),
|
|
@@ -537,18 +537,18 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
537
537
|
}, i.svg ? /* @__PURE__ */ t.createElement(Le, {
|
|
538
538
|
...i,
|
|
539
539
|
ref: p,
|
|
540
|
-
className:
|
|
541
|
-
}) : E ? null : /* @__PURE__ */ t.createElement(
|
|
542
|
-
className:
|
|
543
|
-
[ce.hover]: l && (m ||
|
|
540
|
+
className: R(Re, Ze, r)
|
|
541
|
+
}) : E ? null : /* @__PURE__ */ t.createElement(rt, null), /* @__PURE__ */ t.createElement(a.DropZone.Button.Text, {
|
|
542
|
+
className: R(ce.base, D.buttonLabel, x, {
|
|
543
|
+
[ce.hover]: l && (m || y)
|
|
544
544
|
})
|
|
545
545
|
}))), /* @__PURE__ */ t.createElement(a.Explanation, {
|
|
546
|
-
className:
|
|
546
|
+
className: R(ue, $.description, D.explanation),
|
|
547
547
|
showUploadStatusOnly: !0
|
|
548
548
|
}), /* @__PURE__ */ t.createElement(a.Files, {
|
|
549
549
|
className: D.files
|
|
550
550
|
}, /* @__PURE__ */ t.createElement(a.Files.File, {
|
|
551
|
-
className:
|
|
551
|
+
className: R(de.base, D.file)
|
|
552
552
|
}, /* @__PURE__ */ t.createElement(a.Files.File.Name, {
|
|
553
553
|
className: D.fileName
|
|
554
554
|
}), /* @__PURE__ */ t.createElement(a.Files.File.Spinner, {
|
|
@@ -558,11 +558,11 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
558
558
|
className: D.removeButton,
|
|
559
559
|
"aria-label": e("file-upload.delete-file.aria-label")
|
|
560
560
|
}, /* @__PURE__ */ t.createElement(at, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
|
|
561
|
-
className:
|
|
561
|
+
className: R(pe, $.error, D.fileError)
|
|
562
562
|
}, /* @__PURE__ */ t.createElement(lt, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
|
|
563
|
-
className:
|
|
563
|
+
className: R(ue, $.description)
|
|
564
564
|
}, Ct), /* @__PURE__ */ t.createElement(a.Error, {
|
|
565
|
-
className:
|
|
565
|
+
className: R(pe, $.error)
|
|
566
566
|
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
|
|
567
567
|
}, Ut = () => /* @__PURE__ */ t.createElement(xt, null);
|
|
568
568
|
export {
|