@wix/form-elements 1.141.0 → 1.142.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-CBgveDfU.js → appointment-rac-BAwonF75.js} +85 -85
- package/dist/component/{bookings-address-rac-BJqKQGM7.js → bookings-address-rac-xhj2n7jK.js} +1 -1
- package/dist/component/{bookings-email-rac-BEBnQQtI.js → bookings-email-rac-BGjeAwgm.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CcLe5bPh.js → bookings-first-name-rac-l392yYAU.js} +1 -1
- package/dist/component/{bookings-header-rac-C2CRP5vX.js → bookings-header-rac-JwIo7hsJ.js} +1 -1
- package/dist/component/{bookings-last-name-rac-D9EPB2o-.js → bookings-last-name-rac-CJp81BPl.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DaDoExJQ.js → bookings-login-bar-rac-BiPklGE_.js} +4 -4
- package/dist/component/{bookings-phone-rac-C4rfNh9m.js → bookings-phone-rac-mQfDJGkK.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CHupwGUy.js → bookings-rich-text-rac-BOfHn2EU.js} +1 -1
- package/dist/component/{checkbox-field-rac-JA4-Un3S.js → checkbox-field-rac-CA6SeM0c.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-ikYtTUSV.js → checkbox-group-field-headless-ChLT0zKA.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CkkSPle4.js → checkbox-group-field-rac-_Fkre79S.js} +7 -7
- package/dist/component/{checkbox-group-rac-BYXab1TV.js → checkbox-group-rac-esBLJZ6Y.js} +1 -1
- package/dist/component/{checkbox-rac-MsaKpbsM.js → checkbox-rac-C3vXtbJh.js} +1 -1
- package/dist/component/{contacts-address-rac-BG5KM6Mu.js → contacts-address-rac-BuBBBt19.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CIJtY0ml.js → contacts-birthdate-rac-BMBJeVOK.js} +1 -1
- package/dist/component/{contacts-company-rac-qQxsdn-g.js → contacts-company-rac-CZl168-E.js} +1 -1
- package/dist/component/{contacts-email-rac-Cb_zFMQd.js → contacts-email-rac-CJgVzCns.js} +1 -1
- package/dist/component/{contacts-first-name-rac-L0IsiQmM.js → contacts-first-name-rac-9ZNYKQeb.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BNgF4RBx.js → contacts-last-name-rac-KgylQwHW.js} +1 -1
- package/dist/component/{contacts-phone-rac-BhOsgxwZ.js → contacts-phone-rac-DYr30FLP.js} +1 -1
- package/dist/component/{contacts-position-rac-B2JM9fSY.js → contacts-position-rac-B9BZZ3K9.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CVSWNhBY.js → contacts-subscribe-rac-DOQb2GLm.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BtdNdxYS.js → contacts-tax-id-rac-cYE1ehXN.js} +1 -1
- package/dist/component/{date-availability-BVSO1Gbz.js → date-availability-BOKvA8w-.js} +1 -1
- package/dist/component/{date-input-field-rac-DFCPKpI2.js → date-input-field-rac-BwY53gNr.js} +47 -47
- package/dist/component/{date-input-rac-CcC5JdTU.js → date-input-rac-Cgg4QJbB.js} +1 -1
- package/dist/component/{date-picker-field-rac-CAr7r5k3.js → date-picker-field-rac-0Ue6uiCM.js} +5 -5
- package/dist/component/{date-picker-rac-0WEGa3ZQ.js → date-picker-rac-CgICj33f.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DPlFlkrF.js → date-time-input-field-rac-ChRCMk7_.js} +60 -60
- package/dist/component/{date-time-input-rac-c0dm0pdf.js → date-time-input-rac-B8tRZrri.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B1db5jv3.js → dext-checkbox-group-rac-B_qjx1QD.js} +2 -2
- package/dist/component/{dext-checkbox-rac-C03w68Ta.js → dext-checkbox-rac-Bw9SyhHA.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DTjysj_k.js → dext-date-picker-rac-Bzn28zNq.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CnL2o6YR.js → dext-date-time-input-rac-7Cuk3PoA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CJxC-Wr0.js → dext-dropdown-rac-Md1VI5pc.js} +1 -1
- package/dist/component/{dext-email-rac-CewA7bXc.js → dext-email-rac-DbHwHGKz.js} +1 -1
- package/dist/component/{dext-number-input-rac--_aUE6C8.js → dext-number-input-rac-DIVk3zXL.js} +1 -1
- package/dist/component/{dext-phone-rac-_ObccrwR.js → dext-phone-rac-ZIya63UJ.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DXBCI2mT.js → dext-radio-group-rac-DV1xHkOD.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CS3VY3B3.js → dext-rating-input-rac-YRIYgeT4.js} +1 -1
- package/dist/component/{dext-tags-rac-CyTea3vl.js → dext-tags-rac-DTJ6Pz_x.js} +2 -2
- package/dist/component/{dext-text-area-rac-C_qN16CX.js → dext-text-area-rac-V-d9i95A.js} +1 -1
- package/dist/component/{dext-text-input-rac-DhqfiI_U.js → dext-text-input-rac-ccrundX-.js} +1 -1
- package/dist/component/{dext-url-input-rac-CxI4MbMH.js → dext-url-input-rac-Bd5SZ2U4.js} +1 -1
- package/dist/component/{donation-rac-BZmT89_j.js → donation-rac-BFmpW-3b.js} +23 -23
- package/dist/component/{dropdown-field-headless-CO82AsyC.js → dropdown-field-headless-C2qgeReH.js} +5 -5
- package/dist/component/{dropdown-field-rac-BqPHSq7k.js → dropdown-field-rac-Bj1YSgpT.js} +9 -9
- package/dist/component/{dropdown-rac-pOLj9tRE.js → dropdown-rac-DfdvX5I5.js} +1 -1
- package/dist/component/{ecom-address-rac-DBQ0rVmy.js → ecom-address-rac-DOWNQhhX.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BJoMvht8.js → ecom-subscription-checkbox-rac-2ELdC1ql.js} +2 -2
- package/dist/component/{email-input-field-rac-DTqYXW-m.js → email-input-field-rac-CY0U6vEM.js} +34 -34
- package/dist/component/{events-repeater-rac-3gkcVOh6.js → events-repeater-rac-C2oo_RZt.js} +4 -4
- package/dist/component/{events-rsvp-rac-DYMvnjuz.js → events-rsvp-rac-BrimIo0r.js} +8 -8
- package/dist/component/{field-error-headless-CQ8PHjtA.js → field-error-headless-r0fX50xw.js} +1 -1
- package/dist/component/{field-label-headless-BgAx-Enb.js → field-label-headless-D-kCfg8j.js} +1 -1
- package/dist/component/{file-upload-rac-B8TgLoCU.js → file-upload-rac-Beb2BcFK.js} +160 -160
- package/dist/component/{fixed-payment-rac-CRupF7Fu.js → fixed-payment-rac-DGFWYMZG.js} +9 -9
- package/dist/component/{form-BzzldBcB.js → form-DtzwuBIo.js} +296 -293
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-iFuM4bGC.js → header-field-rac-CVmGSa0E.js} +2 -2
- package/dist/component/{header-rac-CLOeCzLk.js → header-rac-C3AEJmYN.js} +1 -1
- package/dist/component/{image-choice-rac-C6UBnrn3.js → image-choice-rac-Ch-mxLgP.js} +16 -16
- package/dist/component/{index-BHGQWZ7f.js → index-CTn6AQ3A.js} +2 -2
- package/dist/component/{index-CtMQ3oqe.js → index-CmqLlW8X.js} +4 -4
- package/dist/component/{isObjectLike-BVz2g6jF.js → isObjectLike-iyypwAQL.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CKBpkEET.js → multiline-address-field-rac-DJXcb6NG.js} +41 -41
- package/dist/component/{multiline-address-rac-DcGF1aWF.js → multiline-address-rac-DcZgTx1c.js} +1 -1
- package/dist/component/{number-input-field-rac-CODTSfX-.js → number-input-field-rac-W3TqQGhC.js} +20 -20
- package/dist/component/{number-input-rac-ByT6DN8A.js → number-input-rac-CdXigsba.js} +1 -1
- package/dist/component/{password-rac-Bwnpd70V.js → password-rac-Dph6984u.js} +19 -19
- package/dist/component/{payment-input-rac-DmfJZmgO.js → payment-input-rac-D5ARk1lF.js} +23 -23
- package/dist/component/{phone-input-field-rac-B2exX67y.js → phone-input-field-rac-BUfe-B2i.js} +55 -55
- package/dist/component/{phone-rac-9HksdhZY.js → phone-rac-DTiWT1uy.js} +1 -1
- package/dist/component/{product-list-rac-DnhtTpJC.js → product-list-rac-1_Q2JYwH.js} +32 -32
- package/dist/component/{quiz-radio-group-rac-BNVLQ2YS.js → quiz-radio-group-rac-iyBhi0wJ.js} +1 -1
- package/dist/component/{radio-button-module-classes-D2nPj405.js → radio-button-module-classes-DwfobXBe.js} +3 -3
- package/dist/component/{radio-group-field-rac-BT657aHX.js → radio-group-field-rac-BkKNVwMi.js} +8 -8
- package/dist/component/{radio-group-rac-yjr7rBFf.js → radio-group-rac-CH0nkJ8V.js} +1 -1
- package/dist/component/{rating-input-field-rac-DJzVLTkF.js → rating-input-field-rac-CUUUlgZi.js} +27 -27
- package/dist/component/{rating-input-rac-Cpzm_Rbk.js → rating-input-rac-8yEiqBR5.js} +1 -1
- package/dist/component/{rich-content-rac.module-B8WTFbve.js → rich-content-rac.module-DeKU0pwh.js} +1 -1
- package/dist/component/{rich-text-field-rac-DCiBRkow.js → rich-text-field-rac-Cwd-RWTi.js} +2 -2
- package/dist/component/{rich-text-rac-DiP1GwaU.js → rich-text-rac-C5-jPNYP.js} +1 -1
- package/dist/component/{service-dropdown-rac-D5YlC7mU.js → service-dropdown-rac-DBGAnsut.js} +37 -37
- package/dist/component/{services-multi-choice-rac-D5uwtGzk.js → services-multi-choice-rac-CqEoGsuw.js} +12 -12
- package/dist/component/{signature-rac-g7pBfp7A.js → signature-rac-Cq3y66Cr.js} +36 -36
- package/dist/component/{submit-button-rac-WVz4yWjl.js → submit-button-rac-CKM7yUL4.js} +2 -2
- package/dist/component/{tags-field-rac-BS7qlHyA.js → tags-field-rac-CpJ0O9f_.js} +15 -15
- package/dist/component/{tags-rac-CQGlk8GO.js → tags-rac-BPjw67Po.js} +1 -1
- package/dist/component/{text-area-field-rac-B2rsUGoZ.js → text-area-field-rac-BG6MJuIW.js} +16 -16
- package/dist/component/{text-area-rac-CwJXAFKH.js → text-area-rac-BAS4F4VC.js} +1 -1
- package/dist/component/{text-input-field-rac-CiZ83ULN.js → text-input-field-rac-BhMktcEd.js} +5 -5
- package/dist/component/{text-input-headless-C56J6s10.js → text-input-headless-Bpjd70nh.js} +3 -3
- package/dist/component/{text-input-rac-BMSWPbrZ.js → text-input-rac-Bj21XKGA.js} +1 -1
- package/dist/component/{time-input-rac-DrKC1wiN.js → time-input-rac-DBpRHdnX.js} +12 -12
- package/dist/component/{url-input-field-rac-HPvjYmsV.js → url-input-field-rac-B_EMXVWh.js} +11 -11
- package/dist/component/{url-input-rac-gQIszvK3.js → url-input-rac-D0Ck-9KV.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-nZCgStzg.js → use-dropdown-option-class-name-CkpHwC6t.js} +21 -21
- package/dist/component/{use-dropdown-trigger-class-name-Ba9Ej9xC.js → use-dropdown-trigger-class-name-DmDwpAVn.js} +2 -2
- package/dist/component/{use-element-state-class-name-CEMjabjh.js → use-element-state-class-name-BrgdwHYP.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-BSiPBu4i.js → use-hoverable-input-class-name-qVo45l-t.js} +2 -2
- package/dist/component/{use-service-options-base-DSkh5Ayp.js → use-service-options-base-Dlqs4p0Z.js} +1 -1
- package/dist/component/use-text-input-class-name-CP2VJOso.js +6 -0
- package/dist/form.d.ts +12 -2
- package/package.json +2 -2
- package/dist/component/use-text-input-class-name-B2pSCrTD.js +0 -6
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import t, { useState as
|
|
1
|
+
import t, { useState as Y, useRef as q, 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 { bf as xe, bt as oe, bo as Ne, am as ve, br as De, af as ie, bs as Te, bg as Ee, bj as z, bl as Se, bd as Be, bc as ye,
|
|
4
|
+
import Z from "classnames";
|
|
5
|
+
import { bf as xe, bt as oe, bo as Ne, am as ve, br as De, af as ie, bs as Te, bg as Ee, bj as z, bl as Se, bd as Be, bc as ye, R as Ie, $ as Re, b as Ze, J as Ae, K as ce, u as ue, H as de, G as me, I as Me, f as te } from "./form-DtzwuBIo.js";
|
|
6
6
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
-
import { s as
|
|
8
|
-
import { u as pe } from "./use-element-state-class-name-
|
|
9
|
-
import { DropZone as
|
|
7
|
+
import { s as $ } from "./field-rac.module-DfEb7pBp.js";
|
|
8
|
+
import { u as pe } from "./use-element-state-class-name-BrgdwHYP.js";
|
|
9
|
+
import { DropZone as Ue, Text as we, FileTrigger as He, Button as Fe, ProgressBar as Pe, VisuallyHidden as qe } from "react-aria-components";
|
|
10
10
|
import { f as L, a as W } from "./find-child-C60k4CxG.js";
|
|
11
|
-
import { b as ke, a as ze, D as Ve, E as je } from "./field-error-headless-
|
|
12
|
-
import { L as Ke } from "./field-label-headless-
|
|
13
|
-
const
|
|
11
|
+
import { b as ke, a as ze, D as Ve, E as je } from "./field-error-headless-r0fX50xw.js";
|
|
12
|
+
import { L as Ke } from "./field-label-headless-D-kCfg8j.js";
|
|
13
|
+
const $e = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
16
16
|
Audio: "audio/*",
|
|
17
17
|
Document: ".ai, .cdr, .csv, .doc, .docb, .docx, .dot, .dotx, .dwg, .eps, .epub, .fla, .gpx, .ical, .icalendar, .ics, .ifb, .indd, .ipynb, .key, .kml, .kmz, .mobi, .mtf, .mtx, .numbers, .odg, .odp, .ods, .odt, .otp, .ots, .ott, .oxps, .pages, .pdf, .pdn, .pkg, .pot, .potx, .pps, .ppsx, .ppt, .pptx, .psd, .pub, .rtf, .sldx, .txt, .json, .vcf, .xcf, .xls, .xlsx, .xlt, .xltx, .xlw, .xps,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",
|
|
18
18
|
Archive: ".zip, .rar, .tar, .tar.gz, .gz, .gzip, .jar, .7z, .fgz, .webarchive",
|
|
19
19
|
Model3D: ".gltf, .glb"
|
|
20
|
-
},
|
|
20
|
+
}, Ye = (e) => {
|
|
21
21
|
const { actions: n, formId: o } = xe();
|
|
22
|
-
return async (
|
|
23
|
-
if (!(n != null && n.uploadFile) || !
|
|
24
|
-
return n != null && n.uploadFile || console.error("No uploadFile action"),
|
|
25
|
-
const E =
|
|
22
|
+
return async (l, s, d) => {
|
|
23
|
+
if (!(n != null && n.uploadFile) || !l.length)
|
|
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: r }) => n.uploadFile({
|
|
26
26
|
file: r,
|
|
27
27
|
formId: o,
|
|
28
28
|
uploadTarget: e
|
|
@@ -43,25 +43,25 @@ const Ye = {
|
|
|
43
43
|
return (await Promise.all(E)).filter((r) => r !== void 0);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
function We({ valueSliderLimit: e, value: n, explanationText: o, target:
|
|
47
|
-
const [r, i] =
|
|
46
|
+
function We({ valueSliderLimit: e, value: n, explanationText: o, target: l, onChange: s, uploadFileFormats: d, onBlur: E, onFilesCleared: C }) {
|
|
47
|
+
const [r, i] = Y(Ge(n)), [x, m] = Y(n || []), [p, c] = Y(), T = Ye(l), { t: N } = oe(), g = Ne().includes(ve.BUTTONS_HOVER), { setFormStatus: B } = De(), I = q(!1), y = q(s);
|
|
48
48
|
y.current = s;
|
|
49
49
|
const v = fe(() => r.some((f) => f.state === "uploading"), [
|
|
50
50
|
r
|
|
51
51
|
]);
|
|
52
52
|
ne(() => {
|
|
53
|
-
|
|
53
|
+
I.current !== v && (I.current = v, B(l, v ? ie.BUSY : ie.READY));
|
|
54
54
|
}, [
|
|
55
55
|
v,
|
|
56
56
|
B,
|
|
57
|
-
|
|
57
|
+
l
|
|
58
58
|
]);
|
|
59
|
-
const u =
|
|
59
|
+
const u = M(() => {
|
|
60
60
|
if (!r.length)
|
|
61
61
|
return;
|
|
62
62
|
const h = r.filter((f) => f.state === "uploading").length;
|
|
63
63
|
if (h) {
|
|
64
|
-
const f = r.filter((
|
|
64
|
+
const f = r.filter((F) => F.state === "uploaded" && F.file.size > 0).length, _ = f / (f + h);
|
|
65
65
|
return N("form.file-upload.uploading", {
|
|
66
66
|
count: Math.round(_ * 100)
|
|
67
67
|
});
|
|
@@ -72,28 +72,28 @@ function We({ valueSliderLimit: e, value: n, explanationText: o, target: a, onCh
|
|
|
72
72
|
}, [
|
|
73
73
|
r,
|
|
74
74
|
N
|
|
75
|
-
]), R =
|
|
75
|
+
]), R = M(() => r.length ? r.some((f) => f.state === "uploading") ? u() : o || u() : o, [
|
|
76
76
|
r,
|
|
77
77
|
o,
|
|
78
78
|
u
|
|
79
|
-
]), S =
|
|
79
|
+
]), S = M(async (h) => {
|
|
80
80
|
await T(h, ({ file: f, uploadedFile: _ }) => {
|
|
81
|
-
i((
|
|
81
|
+
i((F) => F.map((b) => b.file === f ? {
|
|
82
82
|
file: f,
|
|
83
83
|
state: "uploaded"
|
|
84
|
-
} :
|
|
85
|
-
var
|
|
86
|
-
const
|
|
87
|
-
...
|
|
84
|
+
} : b)), m((F) => {
|
|
85
|
+
var w;
|
|
86
|
+
const b = [
|
|
87
|
+
...F
|
|
88
88
|
].concat(_);
|
|
89
|
-
return (
|
|
89
|
+
return (w = y.current) == null || w.call(y, 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: N("form.file-upload.error.upload-failed")
|
|
96
|
-
} :
|
|
96
|
+
} : b));
|
|
97
97
|
});
|
|
98
98
|
}, [
|
|
99
99
|
T,
|
|
@@ -106,39 +106,39 @@ function We({ valueSliderLimit: e, value: n, explanationText: o, target: a, onCh
|
|
|
106
106
|
}));
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
const
|
|
110
|
-
file:
|
|
109
|
+
const F = Array.from(h).reduce((b, w) => (r.some((H) => H.file.name === w.name) || b.push({
|
|
110
|
+
file: w,
|
|
111
111
|
state: "uploading"
|
|
112
|
-
}),
|
|
112
|
+
}), b), []);
|
|
113
113
|
i([
|
|
114
114
|
...r,
|
|
115
|
-
...
|
|
116
|
-
]), await S(
|
|
115
|
+
...F
|
|
116
|
+
]), await S(F);
|
|
117
117
|
}
|
|
118
|
-
},
|
|
118
|
+
}, U = (h) => {
|
|
119
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(_), m(_);
|
|
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 _ = r.filter((
|
|
126
|
+
const _ = r.filter((F) => F !== f);
|
|
127
127
|
i(_), _.length === 0 && C();
|
|
128
128
|
}
|
|
129
129
|
}, K = () => {
|
|
130
130
|
p && c(void 0), E();
|
|
131
|
-
}, G = d.map((h) =>
|
|
131
|
+
}, G = d.map((h) => $e[h]).join(), X = M(() => {
|
|
132
132
|
i([]), m([]);
|
|
133
133
|
}, []);
|
|
134
134
|
return Te(X), {
|
|
135
135
|
files: r,
|
|
136
136
|
limitError: p,
|
|
137
|
-
hover:
|
|
137
|
+
hover: g,
|
|
138
138
|
getExplanationText: R,
|
|
139
139
|
getStatusText: u,
|
|
140
140
|
handleChange: j,
|
|
141
|
-
handleDelete:
|
|
141
|
+
handleDelete: U,
|
|
142
142
|
accept: G,
|
|
143
143
|
handleBlur: K
|
|
144
144
|
};
|
|
@@ -159,23 +159,23 @@ function Ge(e = []) {
|
|
|
159
159
|
}
|
|
160
160
|
return [];
|
|
161
161
|
}
|
|
162
|
-
const
|
|
162
|
+
const be = /* @__PURE__ */ he(void 0);
|
|
163
163
|
function V() {
|
|
164
|
-
const e = _e(
|
|
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
169
|
const k = ({ children: e, className: n }) => {
|
|
170
|
-
const { ariaDescribedBy: o } = Ee(), { disabled:
|
|
170
|
+
const { ariaDescribedBy: o } = Ee(), { disabled: l, hasError: s } = z(), { handleFileChange: d, limitReached: E } = V();
|
|
171
171
|
if (E)
|
|
172
172
|
return null;
|
|
173
173
|
const C = L(e, k.Title), r = L(e, k.Subtitle), i = L(e, k.Button);
|
|
174
|
-
return /* @__PURE__ */ t.createElement(
|
|
174
|
+
return /* @__PURE__ */ t.createElement(Ue, {
|
|
175
175
|
"aria-describedby": o,
|
|
176
176
|
className: n,
|
|
177
177
|
"data-invalid": s,
|
|
178
|
-
isDisabled:
|
|
178
|
+
isDisabled: l,
|
|
179
179
|
onDrop: async (x) => {
|
|
180
180
|
const m = [];
|
|
181
181
|
for (const p of x.items)
|
|
@@ -188,35 +188,35 @@ const k = ({ children: e, className: n }) => {
|
|
|
188
188
|
m.forEach((c) => p.items.add(c)), d(p.files);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
}, /* @__PURE__ */ t.createElement(
|
|
191
|
+
}, /* @__PURE__ */ t.createElement(we, {
|
|
192
192
|
slot: "label"
|
|
193
193
|
}, C, r), i);
|
|
194
|
-
},
|
|
194
|
+
}, Je = ({ className: e, children: n }) => {
|
|
195
195
|
const { limitReached: o } = V();
|
|
196
196
|
return /* @__PURE__ */ t.createElement("p", {
|
|
197
197
|
className: e
|
|
198
198
|
}, n({
|
|
199
199
|
limitReached: o
|
|
200
200
|
}));
|
|
201
|
-
},
|
|
202
|
-
const { limitReached: o } = V(), { explanationText:
|
|
201
|
+
}, Qe = ({ 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
206
|
limitReached: o
|
|
207
207
|
}));
|
|
208
|
-
}, re = ({ className: e, children: n, "aria-roledescription": o, onHoverStart:
|
|
209
|
-
const { ariaDescribedBy: E, inputId: C, labelId: r, errorId: i } = Ee(), { disabled: x, required: m, onFocus: p, hasError: c, errorMessage: T } = z(), { handleFileChange: N, accept: O, multiple:
|
|
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: m, onFocus: p, hasError: c, errorMessage: T } = z(), { handleFileChange: N, accept: O, multiple: g, buttonRef: B, handleBlur: I, limitError: y, files: v } = V(), u = (v == null ? void 0 : v.some((S) => S.errorMessage)) ?? !1, R = !!(c || T || y || u);
|
|
210
|
+
return /* @__PURE__ */ t.createElement(He, {
|
|
211
211
|
acceptedFileTypes: O ? O.split(",") : void 0,
|
|
212
|
-
allowsMultiple:
|
|
212
|
+
allowsMultiple: g,
|
|
213
213
|
onSelect: (S) => {
|
|
214
214
|
if (S) {
|
|
215
|
-
const j = Array.from(S),
|
|
216
|
-
j.forEach((K) =>
|
|
215
|
+
const j = Array.from(S), U = new DataTransfer();
|
|
216
|
+
j.forEach((K) => U.items.add(K)), N(U.files);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
}, /* @__PURE__ */ t.createElement(
|
|
219
|
+
}, /* @__PURE__ */ t.createElement(Fe, {
|
|
220
220
|
ref: B,
|
|
221
221
|
id: C,
|
|
222
222
|
"aria-labelledby": r,
|
|
@@ -233,8 +233,8 @@ const k = ({ children: e, className: n }) => {
|
|
|
233
233
|
isDisabled: x,
|
|
234
234
|
className: e,
|
|
235
235
|
onFocus: p,
|
|
236
|
-
onBlur:
|
|
237
|
-
onHoverStart:
|
|
236
|
+
onBlur: I,
|
|
237
|
+
onHoverStart: l,
|
|
238
238
|
onHoverEnd: s,
|
|
239
239
|
onFocusChange: d
|
|
240
240
|
}, n));
|
|
@@ -245,28 +245,28 @@ const k = ({ children: e, className: n }) => {
|
|
|
245
245
|
}, n);
|
|
246
246
|
};
|
|
247
247
|
re.Text = Xe;
|
|
248
|
-
k.Title =
|
|
249
|
-
k.Subtitle =
|
|
248
|
+
k.Title = Je;
|
|
249
|
+
k.Subtitle = Qe;
|
|
250
250
|
k.Button = re;
|
|
251
|
-
const
|
|
252
|
-
const { file:
|
|
251
|
+
const A = ({ children: e, className: n, ...o }) => {
|
|
252
|
+
const { file: l, index: s } = o, d = l.file.name, E = L(e, A.Name), C = L(e, A.Remove), r = L(e, A.Spinner), i = L(e, A.Error);
|
|
253
253
|
return /* @__PURE__ */ t.createElement("div", {
|
|
254
254
|
className: n
|
|
255
255
|
}, W(E, {
|
|
256
256
|
fileName: d
|
|
257
|
-
}),
|
|
257
|
+
}), l.state === "uploading" ? r : W(C, {
|
|
258
258
|
index: s,
|
|
259
259
|
fileName: d
|
|
260
|
-
}),
|
|
261
|
-
errorMessage:
|
|
260
|
+
}), l.errorMessage && W(i, {
|
|
261
|
+
errorMessage: l.errorMessage
|
|
262
262
|
}));
|
|
263
263
|
}, et = ({ className: e, ...n }) => {
|
|
264
264
|
const { fileName: o } = n;
|
|
265
265
|
return /* @__PURE__ */ t.createElement("span", {
|
|
266
266
|
className: e
|
|
267
267
|
}, o);
|
|
268
|
-
}, tt = ({ className: e, "aria-label": n, children: o, ...
|
|
269
|
-
const { fileName: s, index: d } =
|
|
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 = q(null);
|
|
270
270
|
ne(() => {
|
|
271
271
|
const m = r.current, p = s;
|
|
272
272
|
return m[p] = i, () => {
|
|
@@ -279,7 +279,7 @@ const M = ({ children: e, className: n, ...o }) => {
|
|
|
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,
|
|
@@ -288,101 +288,101 @@ const M = ({ children: e, className: n, ...o }) => {
|
|
|
288
288
|
className: e,
|
|
289
289
|
isDisabled: E
|
|
290
290
|
}, o);
|
|
291
|
-
},
|
|
292
|
-
const { errorMessage:
|
|
293
|
-
return
|
|
294
|
-
value:
|
|
291
|
+
}, ge = ({ className: e, children: n, ...o }) => {
|
|
292
|
+
const { errorMessage: l } = o;
|
|
293
|
+
return l ? /* @__PURE__ */ t.createElement(ze, {
|
|
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: o }) => /* @__PURE__ */ t.createElement(
|
|
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
303
|
}, o);
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
const { files: o } = V(),
|
|
304
|
+
A.Name = et;
|
|
305
|
+
A.Remove = tt;
|
|
306
|
+
A.Spinner = nt;
|
|
307
|
+
A.Error = ge;
|
|
308
|
+
ge.Text = ke;
|
|
309
|
+
const le = ({ children: e, className: n }) => {
|
|
310
|
+
const { files: o } = V(), l = L(e, le.File);
|
|
311
311
|
return !o || o.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
312
312
|
className: n
|
|
313
|
-
}, o.map((s, d) => W(
|
|
313
|
+
}, o.map((s, d) => W(l, {
|
|
314
314
|
key: s.file.name || d,
|
|
315
315
|
file: s,
|
|
316
316
|
index: d
|
|
317
317
|
})));
|
|
318
318
|
};
|
|
319
|
-
|
|
320
|
-
const
|
|
321
|
-
const { t: n } = oe(), { id: o, value:
|
|
319
|
+
le.File = A;
|
|
320
|
+
const Q = (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: m, FieldLayout: p } = z(), c = q(null), T = q({}), N = q(!1), O = M(() => {
|
|
322
322
|
c.current ? c.current.focus() : N.current = !0;
|
|
323
|
-
}, []), { files:
|
|
323
|
+
}, []), { files: g, limitError: B, hover: I, getExplanationText: y, getStatusText: v, handleBlur: u, handleChange: R, handleDelete: S, accept: j } = We({
|
|
324
324
|
valueSliderLimit: E,
|
|
325
|
-
value:
|
|
325
|
+
value: l,
|
|
326
326
|
explanationText: r,
|
|
327
327
|
target: C,
|
|
328
328
|
onChange: s,
|
|
329
329
|
uploadFileFormats: d,
|
|
330
330
|
onBlur: i,
|
|
331
331
|
onFilesCleared: O
|
|
332
|
-
}),
|
|
332
|
+
}), U = M((H) => {
|
|
333
333
|
var se;
|
|
334
|
-
const
|
|
335
|
-
|
|
334
|
+
const J = g[H], P = Q(J);
|
|
335
|
+
g.length > 1 && ((se = (g.filter((ee) => Q(ee) !== P).map((ee) => T.current[Q(ee)]).find(Boolean) ?? c).current) == null || se.focus()), S(H);
|
|
336
336
|
}, [
|
|
337
337
|
S,
|
|
338
|
-
|
|
338
|
+
g
|
|
339
339
|
]);
|
|
340
340
|
ne(() => {
|
|
341
341
|
N.current && c.current && (N.current = !1, c.current.focus());
|
|
342
342
|
}, [
|
|
343
|
-
|
|
343
|
+
g
|
|
344
344
|
]);
|
|
345
|
-
const K = E > 1, G =
|
|
345
|
+
const K = E > 1, G = g.length >= E, X = fe(() => ({
|
|
346
346
|
handleFileChange: R,
|
|
347
347
|
handleBlur: u,
|
|
348
|
-
handleDelete:
|
|
349
|
-
files:
|
|
348
|
+
handleDelete: U,
|
|
349
|
+
files: g,
|
|
350
350
|
accept: j,
|
|
351
351
|
limitReached: G,
|
|
352
352
|
multiple: K,
|
|
353
353
|
getExplanationText: y,
|
|
354
354
|
getStatusText: v,
|
|
355
|
-
hover:
|
|
355
|
+
hover: I,
|
|
356
356
|
limitError: B,
|
|
357
357
|
buttonRef: c,
|
|
358
358
|
fileRemoveButtonRefs: T
|
|
359
359
|
}), [
|
|
360
360
|
R,
|
|
361
361
|
u,
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
U,
|
|
363
|
+
g,
|
|
364
364
|
j,
|
|
365
365
|
G,
|
|
366
366
|
K,
|
|
367
367
|
y,
|
|
368
368
|
v,
|
|
369
|
-
|
|
369
|
+
I,
|
|
370
370
|
B
|
|
371
|
-
]), h = L(e,
|
|
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
372
|
return Se(() => {
|
|
373
|
-
var
|
|
373
|
+
var H, J;
|
|
374
374
|
if (c.current) {
|
|
375
375
|
c.current.focus();
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
|
-
(
|
|
379
|
-
}, o), /* @__PURE__ */ t.createElement(
|
|
378
|
+
(J = (H = g.map((P) => T.current[Q(P)]).find((P) => P == null ? void 0 : P.current)) == null ? void 0 : H.current) == null || J.focus();
|
|
379
|
+
}, o), /* @__PURE__ */ t.createElement(be.Provider, {
|
|
380
380
|
value: X
|
|
381
381
|
}, /* @__PURE__ */ t.createElement(p, {
|
|
382
382
|
fieldId: o,
|
|
383
383
|
renderLabel: () => h,
|
|
384
384
|
renderInput: () => f ?? _,
|
|
385
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, W(
|
|
385
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, W(ae, {
|
|
386
386
|
hasError: !!(x || B),
|
|
387
387
|
errorMessage: B ?? m
|
|
388
388
|
}), /* @__PURE__ */ t.createElement(qe, {
|
|
@@ -390,22 +390,22 @@ const J = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
390
390
|
"aria-live": "polite",
|
|
391
391
|
"aria-atomic": "true"
|
|
392
392
|
}, n("form.file-upload.explanation-text", {
|
|
393
|
-
count:
|
|
394
|
-
})),
|
|
393
|
+
count: g.length
|
|
394
|
+
})), F, b, w)
|
|
395
395
|
}));
|
|
396
396
|
}, ot = ({ className: e, showUploadStatusOnly: n }) => {
|
|
397
|
-
const { files: o, getExplanationText:
|
|
397
|
+
const { files: o, getExplanationText: l, getStatusText: s } = V(), d = n ? s() : l();
|
|
398
398
|
return o.length === 1 || !d ? null : /* @__PURE__ */ t.createElement("p", {
|
|
399
399
|
className: e
|
|
400
400
|
}, d);
|
|
401
401
|
};
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
402
|
+
a.Label = Ke;
|
|
403
|
+
a.DropZone = k;
|
|
404
|
+
a.Button = re;
|
|
405
|
+
a.Explanation = ot;
|
|
406
|
+
a.Files = le;
|
|
407
|
+
a.Description = Ve;
|
|
408
|
+
a.Error = je;
|
|
409
409
|
const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
410
410
|
viewBox: "0 0 24 24",
|
|
411
411
|
width: 24,
|
|
@@ -415,7 +415,7 @@ const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
415
415
|
...e
|
|
416
416
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
417
417
|
d: "M12 12 12 6 11 6 11 12 5 12 5 13 11 13 11 19 12 19 12 13 18 13 18 12z"
|
|
418
|
-
})),
|
|
418
|
+
})), lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
419
419
|
viewBox: "0 0 24 24",
|
|
420
420
|
width: 24,
|
|
421
421
|
height: 24,
|
|
@@ -424,7 +424,7 @@ const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
424
424
|
...e
|
|
425
425
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
426
426
|
d: "M12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 Z M12,20 C16.418278,20 20,16.418278 20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 Z M12.7287834,7.27532214 C12.9203342,7.46687299 13.0199347,7.73174979 13.0020527,8.00205275 L13.0020527,12.0020527 C13.0199347,12.2723557 12.9203342,12.5372325 12.7287834,12.7287834 C12.5372325,12.9203342 12.2723557,13.0199347 12.0020527,13.0020527 C11.7317498,13.0199347 11.466873,12.9203342 11.2753221,12.7287834 C11.0837713,12.5372325 10.9841708,12.2723557 11.0020527,12.0020527 L11.0020527,8.00205275 C10.9841708,7.73174979 11.0837713,7.46687299 11.2753221,7.27532214 C11.466873,7.08377129 11.7317498,6.98417081 12.0020527,7.00205275 C12.2723557,6.98417081 12.5372325,7.08377129 12.7287834,7.27532214 Z M12.7287834,15.2753221 C12.9203342,15.466873 13.0199347,15.7317498 13.0020527,16.0020527 C13.0199347,16.2723557 12.9203342,16.5372325 12.7287834,16.7287834 C12.5372325,16.9203342 12.2723557,17.0199347 12.0020527,17.0020527 C11.7317498,17.0199347 11.466873,16.9203342 11.2753221,16.7287834 C11.0837713,16.5372325 10.9841708,16.2723557 11.0020527,16.0020527 C10.9841708,15.7317498 11.0837713,15.466873 11.2753221,15.2753221 C11.466873,15.0837713 11.7317498,14.9841708 12.0020527,15.0020527 C12.2723557,14.9841708 12.5372325,15.0837713 12.7287834,15.2753221 Z"
|
|
427
|
-
})),
|
|
427
|
+
})), at = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
428
428
|
viewBox: "0 0 24 24",
|
|
429
429
|
width: 24,
|
|
430
430
|
height: 24,
|
|
@@ -465,7 +465,7 @@ const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
465
465
|
values: "0;360",
|
|
466
466
|
repeatCount: "indefinite"
|
|
467
467
|
})));
|
|
468
|
-
}, it = "_dropZone_9tg5q_1", ct = "_dropZoneHover_9tg5q_27", ut = "_dropZoneTitle_9tg5q_52", dt = "_dropZoneSubtitle_9tg5q_57", mt = "_button_9tg5q_61", pt = "_buttonHover_9tg5q_114", ft = "_explanation_9tg5q_131", Et = "_files_9tg5q_135",
|
|
468
|
+
}, it = "_dropZone_9tg5q_1", ct = "_dropZoneHover_9tg5q_27", ut = "_dropZoneTitle_9tg5q_52", dt = "_dropZoneSubtitle_9tg5q_57", mt = "_button_9tg5q_61", pt = "_buttonHover_9tg5q_114", ft = "_explanation_9tg5q_131", Et = "_files_9tg5q_135", Ft = "_file_9tg5q_135", bt = "_fileName_9tg5q_185", gt = "_buttonLabel_9tg5q_193", ht = "_removeButton_9tg5q_197", _t = "_spinner_9tg5q_244", Lt = "_fileError_9tg5q_260", D = {
|
|
469
469
|
dropZone: it,
|
|
470
470
|
dropZoneHover: ct,
|
|
471
471
|
dropZoneTitle: ut,
|
|
@@ -474,9 +474,9 @@ const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
474
474
|
buttonHover: pt,
|
|
475
475
|
explanation: ft,
|
|
476
476
|
files: Et,
|
|
477
|
-
file:
|
|
478
|
-
fileName:
|
|
479
|
-
buttonLabel:
|
|
477
|
+
file: Ft,
|
|
478
|
+
fileName: bt,
|
|
479
|
+
buttonLabel: gt,
|
|
480
480
|
removeButton: ht,
|
|
481
481
|
spinner: _t,
|
|
482
482
|
fileError: Lt
|
|
@@ -484,83 +484,83 @@ const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
484
484
|
content: e,
|
|
485
485
|
locale: n
|
|
486
486
|
}), xt = () => {
|
|
487
|
-
var B,
|
|
488
|
-
const { t: e } = oe(), { disabled: n, readOnly: o } = z(),
|
|
487
|
+
var B, I, y, v;
|
|
488
|
+
const { t: e } = oe(), { disabled: n, readOnly: o } = z(), l = !n && !o, s = pe({
|
|
489
489
|
globalClasses: de,
|
|
490
490
|
moduleClasses: {
|
|
491
491
|
base: D.dropZone,
|
|
492
492
|
hover: D.dropZoneHover
|
|
493
493
|
}
|
|
494
494
|
}), d = pe({
|
|
495
|
-
globalClasses:
|
|
495
|
+
globalClasses: Me,
|
|
496
496
|
moduleClasses: {
|
|
497
497
|
base: D.button,
|
|
498
498
|
hover: D.buttonHover
|
|
499
499
|
}
|
|
500
|
-
}), E = (v = (y = (
|
|
500
|
+
}), E = (v = (y = (I = (B = Be().fileUpload) == null ? void 0 : B.elementProps) == null ? void 0 : I.uploadButton) == null ? void 0 : y.elementProps) == null ? void 0 : v.icon, { wix: C, className: r, ...i } = E ?? {}, x = ye(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), m = q(null), [p, c] = Y(!1), [T, N] = Y(!1), O = M(() => {
|
|
501
501
|
var u;
|
|
502
502
|
c(!0), (u = m.current) == null || u.runAnimationForward();
|
|
503
|
-
}, []),
|
|
503
|
+
}, []), g = M(() => {
|
|
504
504
|
var u;
|
|
505
505
|
c(!1), (u = m.current) == null || u.runAnimationBackward();
|
|
506
506
|
}, []);
|
|
507
|
-
return /* @__PURE__ */ t.createElement(
|
|
508
|
-
className:
|
|
509
|
-
}, /* @__PURE__ */ t.createElement(
|
|
510
|
-
className:
|
|
511
|
-
})), /* @__PURE__ */ t.createElement(
|
|
507
|
+
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
508
|
+
className: Z(Ie, $.label)
|
|
509
|
+
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
510
|
+
className: Z(Re, $.requiredMark)
|
|
511
|
+
})), /* @__PURE__ */ t.createElement(a.DropZone, {
|
|
512
512
|
className: ({ isHovered: u, isFocused: R, isDropTarget: S }) => s({
|
|
513
513
|
isSelected: !1,
|
|
514
514
|
isHovered: u || S,
|
|
515
515
|
isFocused: R,
|
|
516
|
-
isInteractive:
|
|
516
|
+
isInteractive: l
|
|
517
517
|
})
|
|
518
|
-
}, /* @__PURE__ */ t.createElement(
|
|
518
|
+
}, /* @__PURE__ */ t.createElement(a.DropZone.Title, {
|
|
519
519
|
className: D.dropZoneTitle
|
|
520
|
-
}, ({ limitReached: u }) => e(u ? "file-upload.dropzone.limit-reached.title" : "file-upload.dropzone.title")), /* @__PURE__ */ t.createElement(
|
|
520
|
+
}, ({ limitReached: u }) => e(u ? "file-upload.dropzone.limit-reached.title" : "file-upload.dropzone.title")), /* @__PURE__ */ t.createElement(a.DropZone.Subtitle, {
|
|
521
521
|
className: D.dropZoneSubtitle
|
|
522
|
-
}, ({ limitReached: u }) => e(u ? "file-upload.dropzone.limit-reached.subtitle" : "file-upload.dropzone.subtitle")), /* @__PURE__ */ t.createElement(
|
|
522
|
+
}, ({ limitReached: u }) => e(u ? "file-upload.dropzone.limit-reached.subtitle" : "file-upload.dropzone.subtitle")), /* @__PURE__ */ t.createElement(a.DropZone.Button, {
|
|
523
523
|
className: ({ isHovered: u, isFocused: R }) => d({
|
|
524
524
|
isSelected: !1,
|
|
525
525
|
isHovered: u,
|
|
526
526
|
isFocused: R,
|
|
527
|
-
isInteractive:
|
|
527
|
+
isInteractive: l
|
|
528
528
|
}),
|
|
529
529
|
"aria-roledescription": e("file-upload.aria-roledescription"),
|
|
530
530
|
onHoverStart: O,
|
|
531
|
-
onHoverEnd:
|
|
531
|
+
onHoverEnd: g,
|
|
532
532
|
onFocusChange: N
|
|
533
533
|
}, i.svg ? /* @__PURE__ */ t.createElement(Le, {
|
|
534
534
|
...i,
|
|
535
535
|
ref: m,
|
|
536
|
-
className:
|
|
537
|
-
}) : E ? null : /* @__PURE__ */ t.createElement(rt, null), /* @__PURE__ */ t.createElement(
|
|
538
|
-
className:
|
|
539
|
-
[ce.hover]:
|
|
536
|
+
className: Z(Ze, Ae, r)
|
|
537
|
+
}) : E ? null : /* @__PURE__ */ t.createElement(rt, null), /* @__PURE__ */ t.createElement(a.DropZone.Button.Text, {
|
|
538
|
+
className: Z(ce.base, D.buttonLabel, x, {
|
|
539
|
+
[ce.hover]: l && (p || T)
|
|
540
540
|
})
|
|
541
|
-
}))), /* @__PURE__ */ t.createElement(
|
|
542
|
-
className:
|
|
541
|
+
}))), /* @__PURE__ */ t.createElement(a.Explanation, {
|
|
542
|
+
className: Z(ue, $.description, D.explanation),
|
|
543
543
|
showUploadStatusOnly: !0
|
|
544
|
-
}), /* @__PURE__ */ t.createElement(
|
|
544
|
+
}), /* @__PURE__ */ t.createElement(a.Files, {
|
|
545
545
|
className: D.files
|
|
546
|
-
}, /* @__PURE__ */ t.createElement(
|
|
547
|
-
className:
|
|
548
|
-
}, /* @__PURE__ */ t.createElement(
|
|
546
|
+
}, /* @__PURE__ */ t.createElement(a.Files.File, {
|
|
547
|
+
className: Z(de.base, D.file)
|
|
548
|
+
}, /* @__PURE__ */ t.createElement(a.Files.File.Name, {
|
|
549
549
|
className: D.fileName
|
|
550
|
-
}), /* @__PURE__ */ t.createElement(
|
|
550
|
+
}), /* @__PURE__ */ t.createElement(a.Files.File.Spinner, {
|
|
551
551
|
className: D.spinner,
|
|
552
552
|
"aria-label": e("file-upload.file.uploading-spinner.aria-label")
|
|
553
|
-
}, /* @__PURE__ */ t.createElement(st, null)), /* @__PURE__ */ t.createElement(
|
|
553
|
+
}, /* @__PURE__ */ t.createElement(st, null)), /* @__PURE__ */ t.createElement(a.Files.File.Remove, {
|
|
554
554
|
className: D.removeButton,
|
|
555
555
|
"aria-label": e("file-upload.delete-file.aria-label")
|
|
556
|
-
}, /* @__PURE__ */ t.createElement(
|
|
557
|
-
className:
|
|
558
|
-
}, /* @__PURE__ */ t.createElement(
|
|
559
|
-
className:
|
|
560
|
-
}, Ct), /* @__PURE__ */ t.createElement(
|
|
561
|
-
className:
|
|
562
|
-
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(
|
|
563
|
-
},
|
|
556
|
+
}, /* @__PURE__ */ t.createElement(at, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
|
|
557
|
+
className: Z(me, $.error, D.fileError)
|
|
558
|
+
}, /* @__PURE__ */ t.createElement(lt, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
|
|
559
|
+
className: Z(ue, $.description)
|
|
560
|
+
}, Ct), /* @__PURE__ */ t.createElement(a.Error, {
|
|
561
|
+
className: Z(me, $.error)
|
|
562
|
+
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
|
|
563
|
+
}, Ut = () => /* @__PURE__ */ t.createElement(xt, null);
|
|
564
564
|
export {
|
|
565
|
-
|
|
565
|
+
Ut as FileUploadRAC
|
|
566
566
|
};
|