@wix/form-elements 1.132.0 → 1.133.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-DMYXIOL3.js → appointment-rac-D0mwr3TL.js} +5 -5
- package/dist/component/{bookings-address-rac-D6Ot6vm7.js → bookings-address-rac-BEnmwXax.js} +1 -1
- package/dist/component/{bookings-email-rac-CkPflUxK.js → bookings-email-rac-D56j9PXc.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BbDv4BQw.js → bookings-first-name-rac-xu3S-ih_.js} +1 -1
- package/dist/component/{bookings-header-rac-DJodBCf4.js → bookings-header-rac-hfBabv7v.js} +1 -1
- package/dist/component/{bookings-last-name-rac-C4PRt2XO.js → bookings-last-name-rac-6bMvN0Cm.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-MPcFtzUB.js → bookings-login-bar-rac-DE70Omwf.js} +1 -1
- package/dist/component/{bookings-phone-rac-BnaiOxWV.js → bookings-phone-rac-D_EHRAiU.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Cwp6pBC_.js → bookings-rich-text-rac-BxgI9Zt6.js} +1 -1
- package/dist/component/{checkbox-field-rac-BA-67OHo.js → checkbox-field-rac-BLDUOAXM.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-B20gxYEt.js → checkbox-group-field-headless-CugSJIBp.js} +3 -3
- package/dist/component/{checkbox-group-field-rac--uloIFS6.js → checkbox-group-field-rac-D4m9SmRX.js} +6 -6
- package/dist/component/{checkbox-group-rac-CYt86YIr.js → checkbox-group-rac-BYqEsCwa.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-Bqo0QILF.js → checkbox-indicator-module-classes-zXKP5rD4.js} +1 -1
- package/dist/component/{checkbox-rac-4FLDh24V.js → checkbox-rac-DkIBUAN7.js} +1 -1
- package/dist/component/{contacts-address-rac-BU2H0MEF.js → contacts-address-rac-D1tzbiTM.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DXITbTMA.js → contacts-birthdate-rac-DO-1xG0u.js} +1 -1
- package/dist/component/{contacts-company-rac-D_BKjGc8.js → contacts-company-rac-CzJK3YIo.js} +1 -1
- package/dist/component/{contacts-email-rac-CfYSUKJ3.js → contacts-email-rac-DLvMErBI.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DYZUgWsB.js → contacts-first-name-rac-3RcSXL0h.js} +1 -1
- package/dist/component/{contacts-last-name-rac-m-zqIpMB.js → contacts-last-name-rac-BYoSi_QX.js} +1 -1
- package/dist/component/{contacts-phone-rac-nJDsO_Y8.js → contacts-phone-rac-DMYn0orB.js} +1 -1
- package/dist/component/{contacts-position-rac-CAGdJXSW.js → contacts-position-rac-K1R6ihXo.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-jwP65ngO.js → contacts-subscribe-rac-DsWNSH6t.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-DUOQlZ3c.js → contacts-tax-id-rac-D7NjPiRf.js} +1 -1
- package/dist/component/{date-availability-EbJKjV1U.js → date-availability-D3n6-g3h.js} +1 -1
- package/dist/component/{date-input-field-rac-CZRcW-0J.js → date-input-field-rac-SyAmInlu.js} +7 -7
- package/dist/component/{date-input-rac-CasoMjfj.js → date-input-rac-BQNOsWz1.js} +1 -1
- package/dist/component/{date-picker-field-rac-V9MRWrj-.js → date-picker-field-rac-DO1epod7.js} +6 -6
- package/dist/component/{date-picker-rac-Cu5wTh1_.js → date-picker-rac-DQElftUu.js} +1 -1
- package/dist/component/{date-time-input-field-rac-YGqLIle1.js → date-time-input-field-rac-CV5wZSXO.js} +7 -7
- package/dist/component/{date-time-input-rac-DCEyREJI.js → date-time-input-rac-DvHwpjnk.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DLB5mAwB.js → dext-checkbox-group-rac-BfcKoslb.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DFV7ixAO.js → dext-checkbox-rac-DhadtXb5.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CEL2X1ID.js → dext-date-picker-rac-0Dmo3mrG.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-yLdCLDbQ.js → dext-date-time-input-rac-Cnh7Aqiq.js} +1 -1
- package/dist/component/{dext-dropdown-rac-ti_P0L_X.js → dext-dropdown-rac-CajXcYsB.js} +1 -1
- package/dist/component/{dext-email-rac-CnvdVz-J.js → dext-email-rac-DynJaiZt.js} +1 -1
- package/dist/component/{dext-number-input-rac-CmGt691Y.js → dext-number-input-rac-LmTKwb80.js} +1 -1
- package/dist/component/{dext-phone-rac-JEZkz4gZ.js → dext-phone-rac-Cw2roq1_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CUk6wUPl.js → dext-radio-group-rac-CaNZJrkc.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Q1J5oqhZ.js → dext-rating-input-rac-CAL1jb0q.js} +1 -1
- package/dist/component/{dext-tags-rac-DU9FLeGu.js → dext-tags-rac-BOp_amVK.js} +2 -2
- package/dist/component/{dext-text-area-rac-D1FOCK6O.js → dext-text-area-rac-6DYTHIeh.js} +1 -1
- package/dist/component/{dext-text-input-rac-Dzb5lQjK.js → dext-text-input-rac-CDWthvV3.js} +1 -1
- package/dist/component/{dext-url-input-rac-cRLFpiNR.js → dext-url-input-rac-CsS4NPYO.js} +1 -1
- package/dist/component/{donation-rac-CV-PnK1D.js → donation-rac-B7lFkotu.js} +48 -48
- package/dist/component/{dropdown-field-headless-D1e2XbNj.js → dropdown-field-headless-ajQghLaj.js} +5 -5
- package/dist/component/{dropdown-field-rac-DkeVkP9c.js → dropdown-field-rac-Bf5LQqSL.js} +5 -5
- package/dist/component/{dropdown-rac-ChlsWwyp.js → dropdown-rac-CJmA_ePl.js} +1 -1
- package/dist/component/{ecom-address-rac-DvHJ4Ym-.js → ecom-address-rac-B49ZP2qc.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D3LX7FVx.js → ecom-subscription-checkbox-rac-C8qImtxo.js} +2 -2
- package/dist/component/{email-input-field-rac-B8OCp4L9.js → email-input-field-rac-B_bEWp5N.js} +4 -4
- package/dist/component/{events-repeater-rac-BO0-VcV3.js → events-repeater-rac-DXxqmIBX.js} +6 -6
- package/dist/component/{events-rsvp-rac-CnULPDrG.js → events-rsvp-rac-BaJQLSv3.js} +4 -4
- package/dist/component/{field-error-headless-DwlihJqC.js → field-error-headless-BxEFPwKI.js} +1 -1
- package/dist/component/{field-label-headless-C_cMy8vP.js → field-label-headless-5mewgrhq.js} +1 -1
- package/dist/component/field-rac.module-BGN-O8tV.js +25 -0
- package/dist/component/{file-upload-rac-CjBKgUCk.js → file-upload-rac-D9Z1Cumr.js} +172 -171
- package/dist/component/{fixed-payment-rac-ameH1syZ.js → fixed-payment-rac-S68bqvbB.js} +4 -4
- package/dist/component/{form-GcotNutn.js → form-CPY-PtxT.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-D2fpKxIz.js → header-field-rac-r6dYbnvA.js} +2 -2
- package/dist/component/{header-rac-DdWMo2xZ.js → header-rac-C9gaKsaE.js} +1 -1
- package/dist/component/{image-choice-rac-CBaUQX8m.js → image-choice-rac-BbES5dAK.js} +27 -27
- package/dist/component/{index-CAktfVsx.js → index-C6zuIVeJ.js} +2 -2
- package/dist/component/{index-nOv_Pf2O.js → index-o-TpCHqo.js} +4 -4
- package/dist/component/{isObjectLike-t9SwprFt.js → isObjectLike-BSRiBVs9.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DpMPlfjM.js → multiline-address-field-rac-BfVIiFyM.js} +8 -8
- package/dist/component/{multiline-address-rac-D1XtQuAy.js → multiline-address-rac-BOKBExhi.js} +1 -1
- package/dist/component/{number-input-field-rac-CFFU1JrK.js → number-input-field-rac-BRKFm8aA.js} +5 -5
- package/dist/component/{number-input-rac-BDs3ngbf.js → number-input-rac-BNbCCb-g.js} +1 -1
- package/dist/component/{password-rac-jRXGfQn_.js → password-rac-BygVJf7f.js} +5 -5
- package/dist/component/{payment-input-rac-BAkJqSyU.js → payment-input-rac-CoMbHcHG.js} +5 -5
- package/dist/component/{phone-input-field-rac-D_1jDl7O.js → phone-input-field-rac-dFjxptEr.js} +106 -105
- package/dist/component/{phone-rac-DyinFMYS.js → phone-rac-Dup3AP9J.js} +1 -1
- package/dist/component/{product-list-rac-BkUvhZMi.js → product-list-rac-B62mNB_W.js} +6 -6
- package/dist/component/{quiz-radio-group-rac-Cha9jkTD.js → quiz-radio-group-rac-DPMhDtr7.js} +1 -1
- package/dist/component/{radio-button-module-classes-WQaDTnal.js → radio-button-module-classes-BMvPai_6.js} +3 -3
- package/dist/component/{radio-group-field-rac-Cr35UXlg.js → radio-group-field-rac-DPt2Zl4G.js} +5 -5
- package/dist/component/{radio-group-rac-BGRYJcwQ.js → radio-group-rac-BZyGqFzr.js} +1 -1
- package/dist/component/{rating-input-field-rac-C_X51vxl.js → rating-input-field-rac-C3E0KzV-.js} +5 -5
- package/dist/component/{rating-input-rac-B-usRVpy.js → rating-input-rac-BKLz4l_D.js} +1 -1
- package/dist/component/{rich-content-rac.module-Bed3DsK7.js → rich-content-rac.module-CQ1qa_zz.js} +1 -1
- package/dist/component/{rich-text-field-rac-SHHiInVy.js → rich-text-field-rac-BfdA5KNz.js} +2 -2
- package/dist/component/{rich-text-rac-CND63R3E.js → rich-text-rac-BFbhfFuF.js} +1 -1
- package/dist/component/{service-dropdown-rac-BdfxJ1Zq.js → service-dropdown-rac-VulpHBki.js} +6 -6
- package/dist/component/{services-multi-choice-rac-D6BdQ2xE.js → services-multi-choice-rac-CIx5UpfD.js} +7 -7
- package/dist/component/{signature-rac-xuYTsTUB.js → signature-rac-BdxMBfl9.js} +133 -132
- package/dist/component/{submit-button-rac-7YwnpPtu.js → submit-button-rac-CkuWGEyL.js} +39 -39
- package/dist/component/{tags-field-rac-ChzPiPvQ.js → tags-field-rac-DKo_Yb5i.js} +45 -45
- package/dist/component/{tags-rac-BScWp3da.js → tags-rac-BimVd3ym.js} +1 -1
- package/dist/component/{text-area-field-rac-CDEJUPgV.js → text-area-field-rac-DEiLtCnb.js} +5 -5
- package/dist/component/{text-area-rac-CwiF24AW.js → text-area-rac-CHZtsq0f.js} +1 -1
- package/dist/component/{text-input-field-rac-vg2b_7it.js → text-input-field-rac-CSHvUtRG.js} +4 -4
- package/dist/component/{text-input-headless-BdD-dAx2.js → text-input-headless-BYcExFPS.js} +3 -3
- package/dist/component/{text-input-rac-yX6rdvri.js → text-input-rac-D-R9btYo.js} +1 -1
- package/dist/component/{time-input-rac-B_kYmOwq.js → time-input-rac-wkHemVzj.js} +5 -5
- package/dist/component/{url-input-field-rac-NJqyqxLi.js → url-input-field-rac-KJEcLyFk.js} +5 -5
- package/dist/component/{url-input-rac-BqIKc9nY.js → url-input-rac-JFfEH389.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DFW55r3E.js → use-dropdown-option-class-name-BetaTWbW.js} +3 -3
- package/dist/component/{use-dropdown-trigger-class-name-Df-nqoeG.js → use-dropdown-trigger-class-name-C0ffAjFn.js} +2 -2
- package/dist/component/{use-element-state-class-name-D008EeZn.js → use-element-state-class-name-BOks3she.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-CVtF0FGy.js → use-hoverable-input-class-name-jxtCw16L.js} +3 -3
- package/dist/component/{use-service-options-base-B64QpFwc.js → use-service-options-base-q0JTA7UI.js} +1 -1
- package/dist/component/use-text-input-class-name-CTa0bC4T.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-BIBNQEOK.js +0 -25
- package/dist/component/use-text-input-class-name-BSDU7QEO.js +0 -6
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import t, { useState as J, useRef as H, useMemo as fe, useEffect as
|
|
2
|
-
import
|
|
3
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useState as J, useRef as H, useMemo as fe, useEffect as re, useCallback as M, createContext as he, useContext as _e } from "react";
|
|
2
|
+
import Le from "@wix/editor-react-components/AnimatedIcon";
|
|
3
|
+
import { RicosViewer as xe } from "@wix/ricos/viewer";
|
|
4
4
|
import R from "classnames";
|
|
5
|
-
import { bd as
|
|
5
|
+
import { bd as Ce, br as ne, bm as Ne, ak as ve, bp as De, ad as ie, bq as Te, be as Ee, bh as z, bj as Se, bb as Be, ba as ye, I as Ze, U as Re, b as Ae, a8 as Me, a9 as ce, p as de, u as ue, v as me, a7 as Ie, f as te } from "./form-CPY-PtxT.js";
|
|
6
6
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
-
import { s as K } from "./field-rac.module-
|
|
8
|
-
import { u as pe } from "./use-element-state-class-name-
|
|
9
|
-
import { DropZone as we, Text as Ue, FileTrigger as Pe, Button as be, ProgressBar as He, VisuallyHidden as
|
|
10
|
-
import { f as
|
|
11
|
-
import { b as
|
|
12
|
-
import { L as Ke } from "./field-label-headless-
|
|
7
|
+
import { s as K } from "./field-rac.module-BGN-O8tV.js";
|
|
8
|
+
import { u as pe } from "./use-element-state-class-name-BOks3she.js";
|
|
9
|
+
import { DropZone as we, Text as Ue, FileTrigger as Pe, Button as be, ProgressBar as He, VisuallyHidden as ke } from "react-aria-components";
|
|
10
|
+
import { f as x, a as $ } from "./find-child-C60k4CxG.js";
|
|
11
|
+
import { b as ze, a as Ve, D as je, E as qe } from "./field-error-headless-BxEFPwKI.js";
|
|
12
|
+
import { L as Ke } from "./field-label-headless-5mewgrhq.js";
|
|
13
13
|
const $e = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
@@ -18,16 +18,16 @@ 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:
|
|
21
|
+
const { actions: r, formId: n } = Ce();
|
|
22
22
|
return async (a, s, u) => {
|
|
23
|
-
if (!(
|
|
24
|
-
return
|
|
25
|
-
const E = a.map(({ file: o }) =>
|
|
23
|
+
if (!(r != null && r.uploadFile) || !a.length)
|
|
24
|
+
return r != null && r.uploadFile || console.error("No uploadFile action"), a.length || console.error("No files to upload"), [];
|
|
25
|
+
const E = a.map(({ file: o }) => r.uploadFile({
|
|
26
26
|
file: o,
|
|
27
|
-
formId:
|
|
27
|
+
formId: n,
|
|
28
28
|
uploadTarget: e
|
|
29
29
|
}).then((i) => {
|
|
30
|
-
const { id: N, displayName: m, url: p, isPrivate: d } = i,
|
|
30
|
+
const { id: N, displayName: m, url: p, isPrivate: d } = i, D = {
|
|
31
31
|
fileId: N,
|
|
32
32
|
displayName: m || o.name,
|
|
33
33
|
url: d ? void 0 : p,
|
|
@@ -35,21 +35,21 @@ const $e = {
|
|
|
35
35
|
};
|
|
36
36
|
return s({
|
|
37
37
|
file: o,
|
|
38
|
-
uploadedFile:
|
|
39
|
-
}),
|
|
38
|
+
uploadedFile: D
|
|
39
|
+
}), D;
|
|
40
40
|
}).catch((i) => {
|
|
41
41
|
u(i, o);
|
|
42
42
|
}));
|
|
43
43
|
return (await Promise.all(E)).filter((o) => o !== void 0);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
function We({ valueSliderLimit: e, value:
|
|
47
|
-
const [o, i] = J(Qe(
|
|
46
|
+
function We({ valueSliderLimit: e, value: r, explanationText: n, target: a, onChange: s, uploadFileFormats: u, onBlur: E, onFilesCleared: C }) {
|
|
47
|
+
const [o, i] = J(Qe(r)), [N, m] = J(r || []), [p, d] = J(), D = Ye(a), { t: _ } = ne(), F = Ne().includes(ve.BUTTONS_HOVER), { setFormStatus: T } = De(), y = H(!1), c = H(s);
|
|
48
48
|
c.current = s;
|
|
49
49
|
const S = fe(() => o.some((f) => f.state === "uploading"), [
|
|
50
50
|
o
|
|
51
51
|
]);
|
|
52
|
-
|
|
52
|
+
re(() => {
|
|
53
53
|
y.current !== S && (y.current = S, T(a, S ? ie.BUSY : ie.READY));
|
|
54
54
|
}, [
|
|
55
55
|
S,
|
|
@@ -59,25 +59,25 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: a, onCh
|
|
|
59
59
|
const Z = M(() => {
|
|
60
60
|
if (!o.length)
|
|
61
61
|
return;
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
const f = o.filter((b) => b.state === "uploaded" && b.file.size > 0).length,
|
|
65
|
-
return
|
|
66
|
-
count: Math.round(
|
|
62
|
+
const h = o.filter((f) => f.state === "uploading").length;
|
|
63
|
+
if (h) {
|
|
64
|
+
const f = o.filter((b) => b.state === "uploaded" && b.file.size > 0).length, L = f / (f + h);
|
|
65
|
+
return _("form.file-upload.uploading", {
|
|
66
|
+
count: Math.round(L * 100)
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return _("form.file-upload.explanation-text", {
|
|
70
70
|
count: o.length
|
|
71
71
|
});
|
|
72
72
|
}, [
|
|
73
73
|
o,
|
|
74
|
-
|
|
75
|
-
]), B = M(() => o.length ? o.some((f) => f.state === "uploading") ? Z() :
|
|
74
|
+
_
|
|
75
|
+
]), B = M(() => o.length ? o.some((f) => f.state === "uploading") ? Z() : n || Z() : n, [
|
|
76
76
|
o,
|
|
77
|
-
|
|
77
|
+
n,
|
|
78
78
|
Z
|
|
79
|
-
]),
|
|
80
|
-
await
|
|
79
|
+
]), j = M(async (h) => {
|
|
80
|
+
await D(h, ({ file: f, uploadedFile: L }) => {
|
|
81
81
|
i((b) => b.map((g) => g.file === f ? {
|
|
82
82
|
file: f,
|
|
83
83
|
state: "uploaded"
|
|
@@ -85,50 +85,50 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: a, onCh
|
|
|
85
85
|
var w;
|
|
86
86
|
const g = [
|
|
87
87
|
...b
|
|
88
|
-
].concat(
|
|
88
|
+
].concat(L);
|
|
89
89
|
return (w = c.current) == null || w.call(c, g), g;
|
|
90
90
|
});
|
|
91
|
-
}, (f,
|
|
92
|
-
i((b) => b.map((g) => g.file ===
|
|
93
|
-
file:
|
|
91
|
+
}, (f, L) => {
|
|
92
|
+
i((b) => b.map((g) => g.file === L ? {
|
|
93
|
+
file: L,
|
|
94
94
|
state: "error",
|
|
95
|
-
errorMessage:
|
|
95
|
+
errorMessage: _("form.file-upload.error.upload-failed")
|
|
96
96
|
} : g));
|
|
97
97
|
});
|
|
98
98
|
}, [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
]), O = async (
|
|
102
|
-
if (p && d(void 0),
|
|
103
|
-
if (o.length +
|
|
104
|
-
d(
|
|
99
|
+
D,
|
|
100
|
+
_
|
|
101
|
+
]), O = async (h) => {
|
|
102
|
+
if (p && d(void 0), h) {
|
|
103
|
+
if (o.length + h.length > e) {
|
|
104
|
+
d(_("form.file-upload.error.upload-limit", {
|
|
105
105
|
limit: e
|
|
106
106
|
}));
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
const b = Array.from(
|
|
109
|
+
const b = Array.from(h).reduce((g, w) => (o.some((U) => U.file.name === w.name) || g.push({
|
|
110
110
|
file: w,
|
|
111
111
|
state: "uploading"
|
|
112
112
|
}), g), []);
|
|
113
113
|
i([
|
|
114
114
|
...o,
|
|
115
115
|
...b
|
|
116
|
-
]), await
|
|
116
|
+
]), await j(b);
|
|
117
117
|
}
|
|
118
|
-
}, q = (
|
|
119
|
-
const f = o[
|
|
118
|
+
}, q = (h) => {
|
|
119
|
+
const f = o[h];
|
|
120
120
|
if (N && s && f.state !== "error") {
|
|
121
|
-
const
|
|
122
|
-
s(
|
|
121
|
+
const L = N.filter((g) => g.displayName !== f.file.name);
|
|
122
|
+
s(L), m(L);
|
|
123
123
|
const b = o.filter((g) => g.file.name !== f.file.name);
|
|
124
|
-
i(b), b.length === 0 &&
|
|
124
|
+
i(b), b.length === 0 && C();
|
|
125
125
|
} else {
|
|
126
|
-
const
|
|
127
|
-
i(
|
|
126
|
+
const L = o.filter((b) => b !== f);
|
|
127
|
+
i(L), L.length === 0 && C();
|
|
128
128
|
}
|
|
129
129
|
}, Y = () => {
|
|
130
130
|
p && d(void 0), E();
|
|
131
|
-
}, W = u.map((
|
|
131
|
+
}, W = u.map((h) => $e[h]).join(), X = M(() => {
|
|
132
132
|
i([]), m([]);
|
|
133
133
|
}, []);
|
|
134
134
|
return Te(X), {
|
|
@@ -144,36 +144,36 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: a, onCh
|
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
function Qe(e = []) {
|
|
147
|
-
const
|
|
147
|
+
const r = e || [];
|
|
148
148
|
try {
|
|
149
|
-
return
|
|
149
|
+
return r.map((n) => ({
|
|
150
150
|
file: new File([
|
|
151
151
|
new Int8Array(0)
|
|
152
|
-
],
|
|
153
|
-
type:
|
|
152
|
+
], n.displayName, {
|
|
153
|
+
type: n.fileType
|
|
154
154
|
}),
|
|
155
155
|
state: "uploaded"
|
|
156
156
|
}));
|
|
157
|
-
} catch (
|
|
158
|
-
console.error(
|
|
157
|
+
} catch (n) {
|
|
158
|
+
console.error(n);
|
|
159
159
|
}
|
|
160
160
|
return [];
|
|
161
161
|
}
|
|
162
|
-
const Fe = /* @__PURE__ */
|
|
163
|
-
function
|
|
164
|
-
const e =
|
|
162
|
+
const Fe = /* @__PURE__ */ he(void 0);
|
|
163
|
+
function V() {
|
|
164
|
+
const e = _e(Fe);
|
|
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: r }) => {
|
|
170
|
+
const { ariaDescribedBy: n } = Ee(), { disabled: a, hasError: s } = z(), { handleFileChange: u, limitReached: E } = V();
|
|
171
171
|
if (E)
|
|
172
172
|
return null;
|
|
173
|
-
const
|
|
173
|
+
const C = x(e, k.Title), o = x(e, k.Subtitle), i = x(e, k.Button);
|
|
174
174
|
return /* @__PURE__ */ t.createElement(we, {
|
|
175
|
-
"aria-describedby":
|
|
176
|
-
className:
|
|
175
|
+
"aria-describedby": n,
|
|
176
|
+
className: r,
|
|
177
177
|
"data-invalid": s,
|
|
178
178
|
isDisabled: a,
|
|
179
179
|
onDrop: async (N) => {
|
|
@@ -190,43 +190,43 @@ const j = ({ children: e, className: n }) => {
|
|
|
190
190
|
}
|
|
191
191
|
}, /* @__PURE__ */ t.createElement(Ue, {
|
|
192
192
|
slot: "label"
|
|
193
|
-
},
|
|
194
|
-
}, Ge = ({ className: e, children:
|
|
195
|
-
const { limitReached:
|
|
193
|
+
}, C, o), i);
|
|
194
|
+
}, Ge = ({ className: e, children: r }) => {
|
|
195
|
+
const { limitReached: n } = V();
|
|
196
196
|
return /* @__PURE__ */ t.createElement("p", {
|
|
197
197
|
className: e
|
|
198
|
-
},
|
|
199
|
-
limitReached:
|
|
198
|
+
}, r({
|
|
199
|
+
limitReached: n
|
|
200
200
|
}));
|
|
201
|
-
}, Je = ({ className: e, children:
|
|
202
|
-
const { limitReached:
|
|
201
|
+
}, Je = ({ className: e, children: r }) => {
|
|
202
|
+
const { limitReached: n } = V(), { explanationText: a } = z();
|
|
203
203
|
return /* @__PURE__ */ t.createElement("p", {
|
|
204
204
|
className: e
|
|
205
|
-
}, a ||
|
|
206
|
-
limitReached:
|
|
205
|
+
}, a || r({
|
|
206
|
+
limitReached: n
|
|
207
207
|
}));
|
|
208
|
-
}, oe = ({ className: e, children:
|
|
209
|
-
const { ariaDescribedBy: u, inputId: E, labelId:
|
|
208
|
+
}, oe = ({ className: e, children: r, "aria-roledescription": n, onHoverStart: a, onHoverEnd: s }) => {
|
|
209
|
+
const { ariaDescribedBy: u, inputId: E, labelId: C, errorId: o } = Ee(), { disabled: i, required: N, onFocus: m, hasError: p, errorMessage: d } = z(), { handleFileChange: D, accept: _, multiple: I, buttonRef: F, handleBlur: T, limitError: y, files: c } = V(), S = (c == null ? void 0 : c.some((B) => B.errorMessage)) ?? !1, Z = !!(p || d || y || S);
|
|
210
210
|
return /* @__PURE__ */ t.createElement(Pe, {
|
|
211
|
-
acceptedFileTypes:
|
|
211
|
+
acceptedFileTypes: _ ? _.split(",") : void 0,
|
|
212
212
|
allowsMultiple: I,
|
|
213
213
|
onSelect: (B) => {
|
|
214
214
|
if (B) {
|
|
215
|
-
const
|
|
216
|
-
|
|
215
|
+
const j = Array.from(B), O = new DataTransfer();
|
|
216
|
+
j.forEach((q) => O.items.add(q)), D(O.files);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}, /* @__PURE__ */ t.createElement(be, {
|
|
220
220
|
ref: F,
|
|
221
221
|
id: E,
|
|
222
|
-
"aria-labelledby":
|
|
222
|
+
"aria-labelledby": C,
|
|
223
223
|
"aria-describedby": [
|
|
224
224
|
u,
|
|
225
225
|
o
|
|
226
226
|
].filter(Boolean).join(" "),
|
|
227
227
|
render: (B) => /* @__PURE__ */ t.createElement("button", {
|
|
228
228
|
...B,
|
|
229
|
-
"aria-roledescription":
|
|
229
|
+
"aria-roledescription": n,
|
|
230
230
|
"aria-invalid": Z || void 0,
|
|
231
231
|
"aria-required": N
|
|
232
232
|
}),
|
|
@@ -236,37 +236,37 @@ const j = ({ children: e, className: n }) => {
|
|
|
236
236
|
onBlur: T,
|
|
237
237
|
onHoverStart: a,
|
|
238
238
|
onHoverEnd: s
|
|
239
|
-
},
|
|
239
|
+
}, r));
|
|
240
240
|
}, Xe = ({ className: e }) => {
|
|
241
|
-
const { buttonText:
|
|
241
|
+
const { buttonText: r } = z();
|
|
242
242
|
return /* @__PURE__ */ t.createElement("span", {
|
|
243
243
|
className: e
|
|
244
|
-
},
|
|
244
|
+
}, r);
|
|
245
245
|
};
|
|
246
246
|
oe.Text = Xe;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
const A = ({ children: e, className:
|
|
251
|
-
const { file: a, index: s } =
|
|
247
|
+
k.Title = Ge;
|
|
248
|
+
k.Subtitle = Je;
|
|
249
|
+
k.Button = oe;
|
|
250
|
+
const A = ({ children: e, className: r, ...n }) => {
|
|
251
|
+
const { file: a, index: s } = n, u = a.file.name, E = x(e, A.Name), C = x(e, A.Remove), o = x(e, A.Spinner), i = x(e, A.Error);
|
|
252
252
|
return /* @__PURE__ */ t.createElement("div", {
|
|
253
|
-
className:
|
|
253
|
+
className: r
|
|
254
254
|
}, $(E, {
|
|
255
255
|
fileName: u
|
|
256
|
-
}), a.state === "uploading" ? o : $(
|
|
256
|
+
}), a.state === "uploading" ? o : $(C, {
|
|
257
257
|
index: s,
|
|
258
258
|
fileName: u
|
|
259
259
|
}), a.errorMessage && $(i, {
|
|
260
260
|
errorMessage: a.errorMessage
|
|
261
261
|
}));
|
|
262
|
-
}, et = ({ className: e, ...
|
|
263
|
-
const { fileName:
|
|
262
|
+
}, et = ({ className: e, ...r }) => {
|
|
263
|
+
const { fileName: n } = r;
|
|
264
264
|
return /* @__PURE__ */ t.createElement("span", {
|
|
265
265
|
className: e
|
|
266
|
-
},
|
|
267
|
-
}, tt = ({ className: e, "aria-label":
|
|
268
|
-
const { fileName: s, index: u } = a, { disabled: E } =
|
|
269
|
-
|
|
266
|
+
}, n);
|
|
267
|
+
}, tt = ({ className: e, "aria-label": r, children: n, ...a }) => {
|
|
268
|
+
const { fileName: s, index: u } = a, { disabled: E } = z(), { handleDelete: C, fileRemoveButtonRefs: o } = V(), i = H(null);
|
|
269
|
+
re(() => {
|
|
270
270
|
const m = o.current, p = s;
|
|
271
271
|
return m[p] = i, () => {
|
|
272
272
|
m[p] === i && (m[p] = void 0);
|
|
@@ -276,40 +276,40 @@ const A = ({ children: e, className: n, ...r }) => {
|
|
|
276
276
|
o
|
|
277
277
|
]);
|
|
278
278
|
const N = () => {
|
|
279
|
-
|
|
279
|
+
C(u);
|
|
280
280
|
};
|
|
281
281
|
return /* @__PURE__ */ t.createElement(be, {
|
|
282
282
|
ref: i,
|
|
283
283
|
"aria-disabled": E,
|
|
284
|
-
"aria-label":
|
|
284
|
+
"aria-label": r,
|
|
285
285
|
"aria-description": s,
|
|
286
286
|
onClick: N,
|
|
287
287
|
className: e,
|
|
288
288
|
isDisabled: E
|
|
289
|
-
},
|
|
290
|
-
}, ge = ({ className: e, children:
|
|
291
|
-
const { errorMessage: a } =
|
|
292
|
-
return a ? /* @__PURE__ */ t.createElement(
|
|
289
|
+
}, n);
|
|
290
|
+
}, ge = ({ className: e, children: r, ...n }) => {
|
|
291
|
+
const { errorMessage: a } = n;
|
|
292
|
+
return a ? /* @__PURE__ */ t.createElement(Ve, {
|
|
293
293
|
value: a
|
|
294
294
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
295
295
|
className: e,
|
|
296
296
|
role: "alert"
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
"aria-label":
|
|
297
|
+
}, r)) : null;
|
|
298
|
+
}, rt = ({ className: e, "aria-label": r, children: n }) => /* @__PURE__ */ t.createElement(He, {
|
|
299
|
+
"aria-label": r,
|
|
300
300
|
className: e,
|
|
301
301
|
isIndeterminate: !0
|
|
302
|
-
},
|
|
302
|
+
}, n);
|
|
303
303
|
A.Name = et;
|
|
304
304
|
A.Remove = tt;
|
|
305
|
-
A.Spinner =
|
|
305
|
+
A.Spinner = rt;
|
|
306
306
|
A.Error = ge;
|
|
307
|
-
ge.Text =
|
|
308
|
-
const ae = ({ children: e, className:
|
|
309
|
-
const { files:
|
|
310
|
-
return !
|
|
311
|
-
className:
|
|
312
|
-
},
|
|
307
|
+
ge.Text = ze;
|
|
308
|
+
const ae = ({ children: e, className: r }) => {
|
|
309
|
+
const { files: n } = V(), a = x(e, ae.File);
|
|
310
|
+
return !n || n.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
311
|
+
className: r
|
|
312
|
+
}, n.map((s, u) => $(a, {
|
|
313
313
|
key: s.file.name || u,
|
|
314
314
|
file: s,
|
|
315
315
|
index: u
|
|
@@ -317,13 +317,13 @@ const ae = ({ children: e, className: n }) => {
|
|
|
317
317
|
};
|
|
318
318
|
ae.File = A;
|
|
319
319
|
const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
320
|
-
const { t:
|
|
321
|
-
d.current ? d.current.focus() :
|
|
322
|
-
}, []), { files: F, limitError: T, hover: y, getExplanationText: c, getStatusText: S, handleBlur: Z, handleChange: B, handleDelete:
|
|
320
|
+
const { t: r } = ne(), { id: n, value: a, onChange: s, uploadFileFormats: u, valueSliderLimit: E, target: C, explanationText: o, onBlur: i, hasError: N, errorMessage: m, FieldLayout: p } = z(), d = H(null), D = H({}), _ = H(!1), I = M(() => {
|
|
321
|
+
d.current ? d.current.focus() : _.current = !0;
|
|
322
|
+
}, []), { files: F, limitError: T, hover: y, getExplanationText: c, getStatusText: S, handleBlur: Z, handleChange: B, handleDelete: j, accept: O } = We({
|
|
323
323
|
valueSliderLimit: E,
|
|
324
324
|
value: a,
|
|
325
325
|
explanationText: o,
|
|
326
|
-
target:
|
|
326
|
+
target: C,
|
|
327
327
|
onChange: s,
|
|
328
328
|
uploadFileFormats: u,
|
|
329
329
|
onBlur: i,
|
|
@@ -331,13 +331,13 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
331
331
|
}), q = M((U) => {
|
|
332
332
|
var se;
|
|
333
333
|
const Q = F[U], P = G(Q);
|
|
334
|
-
F.length > 1 && ((se = (F.filter((ee) => G(ee) !== P).map((ee) =>
|
|
334
|
+
F.length > 1 && ((se = (F.filter((ee) => G(ee) !== P).map((ee) => D.current[G(ee)]).find(Boolean) ?? d).current) == null || se.focus()), j(U);
|
|
335
335
|
}, [
|
|
336
|
-
|
|
336
|
+
j,
|
|
337
337
|
F
|
|
338
338
|
]);
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
re(() => {
|
|
340
|
+
_.current && d.current && (_.current = !1, d.current.focus());
|
|
341
341
|
}, [
|
|
342
342
|
F
|
|
343
343
|
]);
|
|
@@ -354,7 +354,7 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
354
354
|
hover: y,
|
|
355
355
|
limitError: T,
|
|
356
356
|
buttonRef: d,
|
|
357
|
-
fileRemoveButtonRefs:
|
|
357
|
+
fileRemoveButtonRefs: D
|
|
358
358
|
}), [
|
|
359
359
|
B,
|
|
360
360
|
Z,
|
|
@@ -367,43 +367,43 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
367
367
|
S,
|
|
368
368
|
y,
|
|
369
369
|
T
|
|
370
|
-
]),
|
|
370
|
+
]), h = x(e, l.Label), f = x(e, l.DropZone), L = x(e, l.Button), b = x(e, l.Explanation), g = x(e, l.Files), w = x(e, l.Description), le = x(e, l.Error);
|
|
371
371
|
return Se(() => {
|
|
372
372
|
var U, Q;
|
|
373
373
|
if (d.current) {
|
|
374
374
|
d.current.focus();
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
377
|
-
(Q = (U = F.map((P) =>
|
|
378
|
-
},
|
|
377
|
+
(Q = (U = F.map((P) => D.current[G(P)]).find((P) => P == null ? void 0 : P.current)) == null ? void 0 : U.current) == null || Q.focus();
|
|
378
|
+
}, n), /* @__PURE__ */ t.createElement(Fe.Provider, {
|
|
379
379
|
value: X
|
|
380
380
|
}, /* @__PURE__ */ t.createElement(p, {
|
|
381
|
-
fieldId:
|
|
382
|
-
renderLabel: () =>
|
|
383
|
-
renderInput: () => f ??
|
|
381
|
+
fieldId: n,
|
|
382
|
+
renderLabel: () => h,
|
|
383
|
+
renderInput: () => f ?? L,
|
|
384
384
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, $(le, {
|
|
385
385
|
hasError: !!(N || T),
|
|
386
386
|
errorMessage: T ?? m
|
|
387
|
-
}), /* @__PURE__ */ t.createElement(
|
|
387
|
+
}), /* @__PURE__ */ t.createElement(ke, {
|
|
388
388
|
role: "status",
|
|
389
389
|
"aria-live": "polite",
|
|
390
390
|
"aria-atomic": "true"
|
|
391
|
-
},
|
|
391
|
+
}, r("form.file-upload.explanation-text", {
|
|
392
392
|
count: F.length
|
|
393
393
|
})), b, g, w)
|
|
394
394
|
}));
|
|
395
|
-
},
|
|
396
|
-
const { files:
|
|
397
|
-
return
|
|
395
|
+
}, nt = ({ className: e, showUploadStatusOnly: r }) => {
|
|
396
|
+
const { files: n, getExplanationText: a, getStatusText: s } = V(), u = r ? s() : a();
|
|
397
|
+
return n.length === 1 || !u ? null : /* @__PURE__ */ t.createElement("p", {
|
|
398
398
|
className: e
|
|
399
399
|
}, u);
|
|
400
400
|
};
|
|
401
401
|
l.Label = Ke;
|
|
402
|
-
l.DropZone =
|
|
402
|
+
l.DropZone = k;
|
|
403
403
|
l.Button = oe;
|
|
404
|
-
l.Explanation =
|
|
404
|
+
l.Explanation = nt;
|
|
405
405
|
l.Files = ae;
|
|
406
|
-
l.Description =
|
|
406
|
+
l.Description = je;
|
|
407
407
|
l.Error = qe;
|
|
408
408
|
const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
409
409
|
viewBox: "0 0 24 24",
|
|
@@ -433,7 +433,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
433
433
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
434
434
|
d: "M17,17 C17,18.6568542 15.6568542,20 14,20 L9,20 C7.34314575,20 6,18.6568542 6,17 L6,7 L5,7 L5,6 L18,6 L18,7 L17,7 L17,17 Z M9,9 L10,9 L10,16 L9,16 L9,9 Z M11,9 L12,9 L12,16 L11,16 L11,9 Z M13,9 L14,9 L14,16 L13,16 L13,9 Z M7,17 C7,18.1045695 7.8954305,19 9,19 L14,19 C15.1045695,19 16,18.1045695 16,17 L16,7 L7,7 L7,17 Z M13,6 L13,5 L10,5 L10,6 L9,6 L9,5 C9,4.44771525 9.44771525,4 10,4 L13,4 C13.5522847,4 14,4.44771525 14,5 L14,6 L13,6 Z"
|
|
435
435
|
})), st = () => {
|
|
436
|
-
const
|
|
436
|
+
const r = "calc(50% - 2px)";
|
|
437
437
|
return /* @__PURE__ */ t.createElement("svg", {
|
|
438
438
|
fill: "none",
|
|
439
439
|
width: "100%",
|
|
@@ -442,11 +442,11 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
442
442
|
}, /* @__PURE__ */ t.createElement("circle", {
|
|
443
443
|
cx: "50%",
|
|
444
444
|
cy: "50%",
|
|
445
|
-
r
|
|
445
|
+
r
|
|
446
446
|
}), /* @__PURE__ */ t.createElement("circle", {
|
|
447
447
|
cx: "50%",
|
|
448
448
|
cy: "50%",
|
|
449
|
-
r
|
|
449
|
+
r,
|
|
450
450
|
// Normalize the path length to 100 so we can easily set stroke-dashoffset to a fixed arc.
|
|
451
451
|
pathLength: "100",
|
|
452
452
|
// Add extra gap between dashes so the arc reads correctly in Chrome.
|
|
@@ -464,7 +464,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
464
464
|
values: "0;360",
|
|
465
465
|
repeatCount: "indefinite"
|
|
466
466
|
})));
|
|
467
|
-
}, it = "
|
|
467
|
+
}, it = "_dropZone_crf8e_1", ct = "_dropZoneHover_crf8e_27", dt = "_dropZoneTitle_crf8e_52", ut = "_dropZoneSubtitle_crf8e_57", mt = "_button_crf8e_61", pt = "_buttonHover_crf8e_114", ft = "_explanation_crf8e_131", Et = "_files_crf8e_135", bt = "_file_crf8e_135", Ft = "_fileName_crf8e_185", gt = "_buttonLabel_crf8e_193", ht = "_removeButton_crf8e_197", _t = "_spinner_crf8e_243", Lt = "_fileError_crf8e_259", v = {
|
|
468
468
|
dropZone: it,
|
|
469
469
|
dropZoneHover: ct,
|
|
470
470
|
dropZoneTitle: dt,
|
|
@@ -475,30 +475,31 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
475
475
|
files: Et,
|
|
476
476
|
file: bt,
|
|
477
477
|
fileName: Ft,
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
478
|
+
buttonLabel: gt,
|
|
479
|
+
removeButton: ht,
|
|
480
|
+
spinner: _t,
|
|
481
|
+
fileError: Lt
|
|
482
|
+
}, xt = ({ content: e, locale: r }) => /* @__PURE__ */ t.createElement(xe, {
|
|
482
483
|
content: e,
|
|
483
|
-
locale:
|
|
484
|
+
locale: r
|
|
484
485
|
}), Ct = () => {
|
|
485
486
|
var I, F, T, y;
|
|
486
|
-
const { t: e } =
|
|
487
|
+
const { t: e } = ne(), { disabled: r, readOnly: n } = z(), a = !r && !n, s = pe({
|
|
487
488
|
globalClasses: ue,
|
|
488
489
|
moduleClasses: {
|
|
489
|
-
base:
|
|
490
|
-
hover:
|
|
490
|
+
base: v.dropZone,
|
|
491
|
+
hover: v.dropZoneHover
|
|
491
492
|
}
|
|
492
493
|
}), u = pe({
|
|
493
494
|
globalClasses: Ie,
|
|
494
495
|
moduleClasses: {
|
|
495
|
-
base:
|
|
496
|
-
hover:
|
|
496
|
+
base: v.button,
|
|
497
|
+
hover: v.buttonHover
|
|
497
498
|
}
|
|
498
|
-
}), E = (y = (T = (F = (I = Be().dropZone) == null ? void 0 : I.elementProps) == null ? void 0 : F.uploadButton) == null ? void 0 : T.elementProps) == null ? void 0 : y.icon, { wix:
|
|
499
|
+
}), E = (y = (T = (F = (I = Be().dropZone) == null ? void 0 : I.elementProps) == null ? void 0 : F.uploadButton) == null ? void 0 : T.elementProps) == null ? void 0 : y.icon, { wix: C, className: o, ...i } = E ?? {}, N = ye(te.DROP_ZONE, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), m = H(null), [p, d] = J(!1), D = M(() => {
|
|
499
500
|
var c;
|
|
500
501
|
d(!0), (c = m.current) == null || c.runAnimationForward();
|
|
501
|
-
}, []),
|
|
502
|
+
}, []), _ = M(() => {
|
|
502
503
|
var c;
|
|
503
504
|
d(!1), (c = m.current) == null || c.runAnimationBackward();
|
|
504
505
|
}, []);
|
|
@@ -513,9 +514,9 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
513
514
|
isInteractive: a
|
|
514
515
|
})
|
|
515
516
|
}, /* @__PURE__ */ t.createElement(l.DropZone.Title, {
|
|
516
|
-
className:
|
|
517
|
+
className: v.dropZoneTitle
|
|
517
518
|
}, ({ limitReached: c }) => e(c ? "file-upload.dropzone.limit-reached.title" : "file-upload.dropzone.title")), /* @__PURE__ */ t.createElement(l.DropZone.Subtitle, {
|
|
518
|
-
className:
|
|
519
|
+
className: v.dropZoneSubtitle
|
|
519
520
|
}, ({ limitReached: c }) => e(c ? "file-upload.dropzone.limit-reached.subtitle" : "file-upload.dropzone.subtitle")), /* @__PURE__ */ t.createElement(l.DropZone.Button, {
|
|
520
521
|
className: ({ isHovered: c }) => u({
|
|
521
522
|
isSelected: !1,
|
|
@@ -523,39 +524,39 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
523
524
|
isInteractive: a
|
|
524
525
|
}),
|
|
525
526
|
"aria-roledescription": e("file-upload.aria-roledescription"),
|
|
526
|
-
onHoverStart:
|
|
527
|
-
onHoverEnd:
|
|
528
|
-
}, i.svg ? /* @__PURE__ */ t.createElement(
|
|
527
|
+
onHoverStart: D,
|
|
528
|
+
onHoverEnd: _
|
|
529
|
+
}, i.svg ? /* @__PURE__ */ t.createElement(Le, {
|
|
529
530
|
...i,
|
|
530
531
|
ref: m,
|
|
531
532
|
className: R(Ae, Me, o)
|
|
532
533
|
}) : E ? null : /* @__PURE__ */ t.createElement(ot, null), /* @__PURE__ */ t.createElement(l.DropZone.Button.Text, {
|
|
533
|
-
className: R(ce.base, N, {
|
|
534
|
+
className: R(ce.base, v.buttonLabel, N, {
|
|
534
535
|
[ce.hover]: a && p
|
|
535
536
|
})
|
|
536
537
|
}))), /* @__PURE__ */ t.createElement(l.Explanation, {
|
|
537
|
-
className: R(de, K.description,
|
|
538
|
+
className: R(de, K.description, v.explanation),
|
|
538
539
|
showUploadStatusOnly: !0
|
|
539
540
|
}), /* @__PURE__ */ t.createElement(l.Files, {
|
|
540
|
-
className:
|
|
541
|
+
className: v.files
|
|
541
542
|
}, /* @__PURE__ */ t.createElement(l.Files.File, {
|
|
542
|
-
className: R(ue.base,
|
|
543
|
+
className: R(ue.base, v.file)
|
|
543
544
|
}, /* @__PURE__ */ t.createElement(l.Files.File.Name, {
|
|
544
|
-
className:
|
|
545
|
+
className: v.fileName
|
|
545
546
|
}), /* @__PURE__ */ t.createElement(l.Files.File.Spinner, {
|
|
546
|
-
className:
|
|
547
|
+
className: v.spinner,
|
|
547
548
|
"aria-label": e("file-upload.file.uploading-spinner.aria-label")
|
|
548
549
|
}, /* @__PURE__ */ t.createElement(st, null)), /* @__PURE__ */ t.createElement(l.Files.File.Remove, {
|
|
549
|
-
className:
|
|
550
|
+
className: v.removeButton,
|
|
550
551
|
"aria-label": e("file-upload.delete-file.aria-label")
|
|
551
552
|
}, /* @__PURE__ */ t.createElement(lt, null)), /* @__PURE__ */ t.createElement(l.Files.File.Error, {
|
|
552
|
-
className: R(me, K.error,
|
|
553
|
+
className: R(me, K.error, v.fileError)
|
|
553
554
|
}, /* @__PURE__ */ t.createElement(at, null), /* @__PURE__ */ t.createElement(l.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(l.Description, {
|
|
554
555
|
className: R(de, K.description)
|
|
555
|
-
},
|
|
556
|
+
}, xt), /* @__PURE__ */ t.createElement(l.Error, {
|
|
556
557
|
className: R(me, K.error)
|
|
557
558
|
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)));
|
|
558
|
-
},
|
|
559
|
+
}, wt = () => /* @__PURE__ */ t.createElement(Ct, null);
|
|
559
560
|
export {
|
|
560
|
-
|
|
561
|
+
wt as FileUploadRAC
|
|
561
562
|
};
|