@wix/form-elements 1.161.0 → 1.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-BubC8I9X.js → appointment-rac-Cskf9hxi.js} +123 -123
- package/dist/component/{bookings-address-rac-BbwvVs86.js → bookings-address-rac-C18tuPai.js} +1 -1
- package/dist/component/{bookings-email-rac-C2HCkcfa.js → bookings-email-rac-C2GL3cJg.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Uy7c5EBs.js → bookings-first-name-rac-IEklnchg.js} +1 -1
- package/dist/component/{bookings-header-rac-nmwsWRjS.js → bookings-header-rac-iwcrj5Kj.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BAioQLCg.js → bookings-last-name-rac-CXZfq3Rw.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CO6vOBjG.js → bookings-login-bar-rac-DP0MBFTm.js} +6 -6
- package/dist/component/{bookings-phone-rac-Cr16h-_R.js → bookings-phone-rac-uJGk_tzr.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CHLH3jd7.js → bookings-rich-text-rac-BerRAnFy.js} +1 -1
- package/dist/component/{calendar.module-CKCBG_Pg.js → calendar.module-BMUyMVja.js} +19 -19
- package/dist/component/{checkbox-field-rac-CMwmwFMD.js → checkbox-field-rac-BBftIi_U.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-BNs_S-nT.js → checkbox-group-field-headless-BiQ4coe6.js} +27 -27
- package/dist/component/{checkbox-group-field-rac-BA60EPAN.js → checkbox-group-field-rac-moHc5Cyu.js} +6 -6
- package/dist/component/{checkbox-group-rac-BJZ4Oer9.js → checkbox-group-rac-iuPzxN7i.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-akWZsZNn.js → checkbox-indicator-module-classes-DUTR4mcg.js} +1 -1
- package/dist/component/{checkbox-rac-KsVlI6_V.js → checkbox-rac-BwfHAeFo.js} +1 -1
- package/dist/component/{contacts-address-rac-CRYkz87z.js → contacts-address-rac-DuyEL5YR.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BIz-1-ZX.js → contacts-birthdate-rac-Mkoplu3x.js} +1 -1
- package/dist/component/{contacts-company-rac-B8G__j6I.js → contacts-company-rac-B-3QghQg.js} +1 -1
- package/dist/component/{contacts-email-rac-Dztkvp5i.js → contacts-email-rac-CqooKQl8.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CVSEWpLU.js → contacts-first-name-rac-CAOu0GIH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Blz4M5bk.js → contacts-last-name-rac-Cd-wCTC3.js} +1 -1
- package/dist/component/{contacts-phone-rac-CPCE5soY.js → contacts-phone-rac-OGE6eaJc.js} +1 -1
- package/dist/component/{contacts-position-rac-Dd_kBjqG.js → contacts-position-rac-eSsV63RC.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C6AlsP10.js → contacts-subscribe-rac-19d4uPR-.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CQ1n29zI.js → contacts-tax-id-rac-TtyrAftZ.js} +1 -1
- package/dist/component/{date-availability-DDj1j0z5.js → date-availability-CudIaav_.js} +1 -1
- package/dist/component/{date-input-field-rac-D5r1n_ah.js → date-input-field-rac-DzMiQLxS.js} +89 -89
- package/dist/component/{date-input-rac-Cyi5mU_P.js → date-input-rac-BWfmwcmK.js} +1 -1
- package/dist/component/{date-picker-field-rac-CeG391Zo.js → date-picker-field-rac-w4Wf-m0I.js} +54 -54
- package/dist/component/{date-picker-rac-Ci9aHgav.js → date-picker-rac-Bejo7tOm.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CrbYEbJJ.js → date-time-input-field-rac-D6JPrbGb.js} +80 -80
- package/dist/component/{date-time-input-rac-DDJLkqs0.js → date-time-input-rac-CAK5NgC4.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-C3ftVHBA.js → dext-checkbox-group-rac-BqoHMQwI.js} +4 -4
- package/dist/component/{dext-checkbox-rac-BGLYWn68.js → dext-checkbox-rac-BEis8bxo.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Cy9RlDlt.js → dext-date-picker-rac-DDQTy3BG.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-88ZoTd5e.js → dext-date-time-input-rac-Dp3UEXEu.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CPxDUuk9.js → dext-dropdown-rac-DisXIXNb.js} +1 -1
- package/dist/component/{dext-email-rac-BAvQwDPA.js → dext-email-rac-CBv4umUC.js} +1 -1
- package/dist/component/{dext-number-input-rac-D7HYQVKq.js → dext-number-input-rac-0UNC_1Ac.js} +1 -1
- package/dist/component/{dext-phone-rac--FhcplSI.js → dext-phone-rac-CQVzz499.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DBz8iCKW.js → dext-radio-group-rac-3lhx-xxX.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cv7nThfe.js → dext-rating-input-rac-2fwxV3iY.js} +1 -1
- package/dist/component/{dext-tags-rac-CRUUc5dr.js → dext-tags-rac-DCL78ClS.js} +2 -2
- package/dist/component/{dext-text-area-rac-DQBQXV1L.js → dext-text-area-rac-WTCWYySB.js} +1 -1
- package/dist/component/{dext-text-input-rac-4CpM581y.js → dext-text-input-rac-DMCzSYAI.js} +1 -1
- package/dist/component/{dext-url-input-rac-0C1jTEr9.js → dext-url-input-rac-Bzvt5zTa.js} +1 -1
- package/dist/component/{donation-rac-Cgt0ZE50.js → donation-rac-B3YHu0bl.js} +98 -98
- package/dist/component/{dropdown-field-rac-DlGKR7pZ.js → dropdown-field-rac-y4GPpf0W.js} +4 -4
- package/dist/component/{dropdown-rac-CYFW_3x_.js → dropdown-rac-Dj7OnxJL.js} +1 -1
- package/dist/component/{ecom-address-rac-CQfQHpXC.js → ecom-address-rac-Bnc60jDw.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D2v2Upvz.js → ecom-subscription-checkbox-rac-CesTpjav.js} +2 -2
- package/dist/component/{email-input-field-rac-CVw25yRo.js → email-input-field-rac-BT2FrAEM.js} +48 -48
- package/dist/component/{events-repeater-rac-BCVUcmFj.js → events-repeater-rac-CA2yjEEk.js} +24 -24
- package/dist/component/{events-rsvp-rac-DwbqEr8z.js → events-rsvp-rac-wVpVt7-p.js} +4 -4
- package/dist/component/{field-error-headless-XnVcMmsL.js → field-error-headless-CX95bMbk.js} +8 -8
- package/dist/component/{field-label-headless-BRTLT2Yt.js → field-label-headless-niuFY6Mw.js} +17 -17
- package/dist/component/field-rac.module-ts2t4WUO.js +25 -0
- package/dist/component/{file-upload-rac-Dkwg9Jk4.js → file-upload-rac-ByO8l8lE.js} +142 -142
- package/dist/component/{fixed-payment-rac-ST98xAa2.js → fixed-payment-rac-BNDAdNeQ.js} +18 -18
- package/dist/component/{form-BUqSKOvc.js → form-CCQN_rPn.js} +326 -336
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CzNTGYWq.js → header-field-rac-C1RySfYy.js} +6 -6
- package/dist/component/{header-rac-DUt6AIAE.js → header-rac-BaFPV0vy.js} +1 -1
- package/dist/component/image-choice-rac-BShUj92P.js +155 -0
- package/dist/component/{index-cZZeAuuu.js → index-0_YjLphg.js} +2 -2
- package/dist/component/{index-CDO22hht.js → index-DHLfweXD.js} +69 -69
- package/dist/component/{isObjectLike-cs4bARpC.js → isObjectLike-D7tbAd6O.js} +3 -3
- package/dist/component/{multiline-address-field-rac-vcEWhUCV.js → multiline-address-field-rac-CFJKE5vA.js} +41 -41
- package/dist/component/{multiline-address-rac-WQaI2eUX.js → multiline-address-rac-BlzCkwEH.js} +1 -1
- package/dist/component/{number-input-field-rac-CBUMqATk.js → number-input-field-rac-XqxdqTRV.js} +24 -24
- package/dist/component/{number-input-rac-B4j5hyzS.js → number-input-rac-CQTg0QSm.js} +1 -1
- package/dist/component/{password-rac-DwLyf45N.js → password-rac-DPE-U2xs.js} +17 -17
- package/dist/component/{payment-input-rac-D0Od---y.js → payment-input-rac-oOh04431.js} +32 -32
- package/dist/component/{phone-input-field-rac-COlu9IeC.js → phone-input-field-rac-DW2vQhjC.js} +48 -48
- package/dist/component/{phone-rac-Dh4RacOF.js → phone-rac-BB9B-Hpl.js} +1 -1
- package/dist/component/{product-list-rac-D7zHDE2D.js → product-list-rac-K53VvPJV.js} +26 -26
- package/dist/component/{quiz-radio-group-rac-1AaKphJt.js → quiz-radio-group-rac-gikcMV2I.js} +1 -1
- package/dist/component/{radio-button-module-classes-VqaP6vpA.js → radio-button-module-classes-CY883yGO.js} +34 -34
- package/dist/component/{radio-group-field-rac-Cp3LRN3C.js → radio-group-field-rac-BOEWcfT9.js} +5 -5
- package/dist/component/{radio-group-rac-KhmhzYGf.js → radio-group-rac-gKhmLMm3.js} +1 -1
- package/dist/component/{rating-input-field-rac-10n6ciCr.js → rating-input-field-rac-83FXIVpy.js} +30 -30
- package/dist/component/{rating-input-rac-XZjjY2Gp.js → rating-input-rac-XDwakrtR.js} +1 -1
- package/dist/component/{rich-content-rac.module-kMwDoLBa.js → rich-content-rac.module-Bdx8hK3J.js} +5 -5
- package/dist/component/{rich-text-field-rac-H5bd8fAt.js → rich-text-field-rac-ksEKBaYG.js} +4 -4
- package/dist/component/{rich-text-rac-88GSQR62.js → rich-text-rac-XEFBeQrz.js} +1 -1
- package/dist/component/{service-dropdown-rac-B1_Xr_X3.js → service-dropdown-rac-CjFiqV1n.js} +26 -26
- package/dist/component/{services-multi-choice-rac-DWp_Llbi.js → services-multi-choice-rac-DNut4K3I.js} +15 -15
- package/dist/component/{signature-rac-zN_6KRDp.js → signature-rac-BhWPZpwu.js} +108 -108
- package/dist/component/{submit-button-rac-Dv6UarYX.js → submit-button-rac-CWmz_JCl.js} +7 -7
- package/dist/component/{tags-field-rac-sVN6MHfJ.js → tags-field-rac-D9P1jVrz.js} +75 -75
- package/dist/component/{tags-rac-DhTHs_XN.js → tags-rac-0zEd-xYa.js} +1 -1
- package/dist/component/{text-area-field-rac-DrWkww7W.js → text-area-field-rac-D_55oi2b.js} +19 -19
- package/dist/component/{text-area-rac-CXXh-ZdY.js → text-area-rac-CpkFyXCH.js} +1 -1
- package/dist/component/{text-input-field-rac-C2YiMr-g.js → text-input-field-rac-b7RXb4Ob.js} +4 -4
- package/dist/component/{text-input-headless-BJMNbsMY.js → text-input-headless-b1TEpdit.js} +11 -11
- package/dist/component/{text-input-rac-CpsPh7FH.js → text-input-rac-CoVcg1S0.js} +1 -1
- package/dist/component/{time-input-rac-DG_1KxS4.js → time-input-rac-DE7OyzgQ.js} +20 -20
- package/dist/component/url-input-field-rac-_yxWlb3a.js +77 -0
- package/dist/component/{url-input-rac-BTStO0NP.js → url-input-rac-wguMUqug.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DbMMg1ws.js → use-dropdown-option-class-name-DdQ0sFRF.js} +12 -12
- package/dist/component/{use-dropdown-trigger-class-name-Yes4kC_0.js → use-dropdown-trigger-class-name-hB8KYv-I.js} +19 -19
- package/dist/component/{use-element-state-class-name-DlncY4hk.js → use-element-state-class-name-C2tQgxUX.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C__zqP5j.js → use-hoverable-input-class-name-C8iuzofb.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DnK_MQRO.js → use-is-forced-open-dropdown-DkIrJPsK.js} +4 -4
- package/dist/component/{use-service-options-base-DKJe52Vk.js → use-service-options-base-B-xAR-tx.js} +3 -3
- package/dist/component/use-text-input-class-name-CK4rZeSM.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DP0lkkEv.js +0 -25
- package/dist/component/image-choice-rac-DuBgrSt2.js +0 -155
- package/dist/component/url-input-field-rac-twxRREnl.js +0 -77
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +0 -6
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import t, { useState as
|
|
1
|
+
import t, { useState as Y, useRef as P, useMemo as fe, useEffect as ne, useCallback as Z, 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 {
|
|
6
|
-
import { E as
|
|
7
|
-
import { s as $ } from "./field-rac.module-
|
|
8
|
-
import { u as
|
|
9
|
-
import { DropZone as
|
|
10
|
-
import { f as L, a as
|
|
11
|
-
import { b as ze, a as Ve, D as Ke, E as je } from "./field-error-headless-
|
|
12
|
-
import { L as qe } from "./field-label-headless-
|
|
4
|
+
import A from "classnames";
|
|
5
|
+
import { bu as xe, bI as re, bD as ve, aB as Ne, bG as De, au as ie, bH as ye, bv as Ee, by as V, bA as Te, bs as Se, br as Be, U as we, aa as Ie, b as Ae, N as Re, O as ce, G as ue, L as de, K as me, M as Ze, f as te } from "./form-CCQN_rPn.js";
|
|
6
|
+
import { E as Me } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
+
import { s as $ } from "./field-rac.module-ts2t4WUO.js";
|
|
8
|
+
import { u as pe } from "./use-element-state-class-name-C2tQgxUX.js";
|
|
9
|
+
import { DropZone as Oe, Text as Ue, FileTrigger as ke, Button as Fe, ProgressBar as He, VisuallyHidden as Pe } from "react-aria-components";
|
|
10
|
+
import { f as L, a as G } from "./find-child-C60k4CxG.js";
|
|
11
|
+
import { b as ze, a as Ve, D as Ke, E as je } from "./field-error-headless-CX95bMbk.js";
|
|
12
|
+
import { L as qe } from "./field-label-headless-niuFY6Mw.js";
|
|
13
13
|
const $e = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
@@ -17,7 +17,7 @@ const $e = {
|
|
|
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: r } = xe();
|
|
22
22
|
return async (l, s, d) => {
|
|
23
23
|
if (!(n != null && n.uploadFile) || !l.length)
|
|
@@ -27,36 +27,36 @@ const $e = {
|
|
|
27
27
|
formId: r,
|
|
28
28
|
uploadTarget: e
|
|
29
29
|
}).then((i) => {
|
|
30
|
-
const { id: x, displayName:
|
|
30
|
+
const { id: x, displayName: m, url: p, isPrivate: c } = i, y = {
|
|
31
31
|
fileId: x,
|
|
32
|
-
displayName:
|
|
33
|
-
url: c ? void 0 :
|
|
32
|
+
displayName: m || o.name,
|
|
33
|
+
url: c ? void 0 : p,
|
|
34
34
|
fileType: o.type || "application/octet-stream"
|
|
35
35
|
};
|
|
36
36
|
return s({
|
|
37
37
|
file: o,
|
|
38
|
-
uploadedFile:
|
|
39
|
-
}),
|
|
38
|
+
uploadedFile: y
|
|
39
|
+
}), y;
|
|
40
40
|
}).catch((i) => {
|
|
41
41
|
d(i, o);
|
|
42
42
|
}));
|
|
43
43
|
return (await Promise.all(E)).filter((o) => o !== void 0);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
function
|
|
47
|
-
const [o, i] =
|
|
48
|
-
|
|
46
|
+
function Ge({ valueSliderLimit: e, value: n, explanationText: r, target: l, onChange: s, uploadFileFormats: d, onBlur: E, onFilesCleared: C }) {
|
|
47
|
+
const [o, i] = Y(We(n)), [x, m] = Y(n || []), [p, c] = Y(), y = Ye(l), { t: v } = re(), g = ve().includes(Ne.BUTTONS_HOVER), { setFormStatus: S } = De(), w = P(!1), B = P(s);
|
|
48
|
+
B.current = s;
|
|
49
49
|
const N = fe(() => o.some((f) => f.state === "uploading"), [
|
|
50
50
|
o
|
|
51
51
|
]);
|
|
52
52
|
ne(() => {
|
|
53
|
-
|
|
53
|
+
w.current !== N && (w.current = N, S(l, N ? ie.BUSY : ie.READY));
|
|
54
54
|
}, [
|
|
55
55
|
N,
|
|
56
|
-
|
|
56
|
+
S,
|
|
57
57
|
l
|
|
58
58
|
]);
|
|
59
|
-
const u =
|
|
59
|
+
const u = Z(() => {
|
|
60
60
|
if (!o.length)
|
|
61
61
|
return;
|
|
62
62
|
const h = o.filter((f) => f.state === "uploading").length;
|
|
@@ -72,21 +72,21 @@ function Ye({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
72
72
|
}, [
|
|
73
73
|
o,
|
|
74
74
|
v
|
|
75
|
-
]),
|
|
75
|
+
]), I = Z(() => o.length ? o.some((f) => f.state === "uploading") ? u() : r || u() : r, [
|
|
76
76
|
o,
|
|
77
77
|
r,
|
|
78
78
|
u
|
|
79
|
-
]),
|
|
80
|
-
await
|
|
79
|
+
]), T = Z(async (h) => {
|
|
80
|
+
await y(h, ({ file: f, uploadedFile: _ }) => {
|
|
81
81
|
i((F) => F.map((b) => b.file === f ? {
|
|
82
82
|
file: f,
|
|
83
83
|
state: "uploaded"
|
|
84
|
-
} : b)),
|
|
84
|
+
} : b)), m((F) => {
|
|
85
85
|
var U;
|
|
86
86
|
const b = [
|
|
87
87
|
...F
|
|
88
88
|
].concat(_);
|
|
89
|
-
return (U =
|
|
89
|
+
return (U = B.current) == null || U.call(B, b), b;
|
|
90
90
|
});
|
|
91
91
|
}, (f, _) => {
|
|
92
92
|
i((F) => F.map((b) => b.file === _ ? {
|
|
@@ -96,30 +96,30 @@ function Ye({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
96
96
|
} : b));
|
|
97
97
|
});
|
|
98
98
|
}, [
|
|
99
|
-
|
|
99
|
+
y,
|
|
100
100
|
v
|
|
101
101
|
]), j = async (h) => {
|
|
102
|
-
if (
|
|
102
|
+
if (p && c(void 0), h) {
|
|
103
103
|
if (o.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 F = Array.from(h).reduce((b, U) => (o.some((
|
|
109
|
+
const F = Array.from(h).reduce((b, U) => (o.some((k) => k.file.name === U.name) || b.push({
|
|
110
110
|
file: U,
|
|
111
111
|
state: "uploading"
|
|
112
112
|
}), b), []);
|
|
113
113
|
i([
|
|
114
114
|
...o,
|
|
115
115
|
...F
|
|
116
|
-
]), await
|
|
116
|
+
]), await T(F);
|
|
117
117
|
}
|
|
118
|
-
},
|
|
118
|
+
}, O = (h) => {
|
|
119
119
|
const f = o[h];
|
|
120
120
|
if (x && s && f.state !== "error") {
|
|
121
121
|
const _ = x.filter((b) => b.displayName !== f.file.name);
|
|
122
|
-
s(_),
|
|
122
|
+
s(_), m(_);
|
|
123
123
|
const F = o.filter((b) => b.file.name !== f.file.name);
|
|
124
124
|
i(F), F.length === 0 && C();
|
|
125
125
|
} else {
|
|
@@ -127,23 +127,23 @@ function Ye({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
127
127
|
i(_), _.length === 0 && C();
|
|
128
128
|
}
|
|
129
129
|
}, q = () => {
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
i([]),
|
|
130
|
+
p && c(void 0), E();
|
|
131
|
+
}, W = d.map((h) => $e[h]).join(), X = Z(() => {
|
|
132
|
+
i([]), m([]);
|
|
133
133
|
}, []);
|
|
134
|
-
return
|
|
134
|
+
return ye(X), {
|
|
135
135
|
files: o,
|
|
136
|
-
limitError:
|
|
136
|
+
limitError: p,
|
|
137
137
|
hover: g,
|
|
138
|
-
getExplanationText:
|
|
138
|
+
getExplanationText: I,
|
|
139
139
|
getStatusText: u,
|
|
140
140
|
handleChange: j,
|
|
141
|
-
handleDelete:
|
|
142
|
-
accept:
|
|
141
|
+
handleDelete: O,
|
|
142
|
+
accept: W,
|
|
143
143
|
handleBlur: q
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function We(e = []) {
|
|
147
147
|
const n = e || [];
|
|
148
148
|
try {
|
|
149
149
|
return n.map((r) => ({
|
|
@@ -171,27 +171,27 @@ const z = ({ children: e, className: n }) => {
|
|
|
171
171
|
if (E)
|
|
172
172
|
return null;
|
|
173
173
|
const C = L(e, z.Title), o = L(e, z.Subtitle), i = L(e, z.Button);
|
|
174
|
-
return /* @__PURE__ */ t.createElement(
|
|
174
|
+
return /* @__PURE__ */ t.createElement(Oe, {
|
|
175
175
|
"aria-describedby": r,
|
|
176
176
|
className: n,
|
|
177
177
|
"data-invalid": s,
|
|
178
178
|
isDisabled: l,
|
|
179
179
|
onDrop: async (x) => {
|
|
180
|
-
const
|
|
181
|
-
for (const
|
|
182
|
-
if (
|
|
183
|
-
const c = await
|
|
184
|
-
c &&
|
|
180
|
+
const m = [];
|
|
181
|
+
for (const p of x.items)
|
|
182
|
+
if (p.kind === "file") {
|
|
183
|
+
const c = await p.getFile();
|
|
184
|
+
c && m.push(c);
|
|
185
185
|
}
|
|
186
|
-
if (
|
|
187
|
-
const
|
|
188
|
-
|
|
186
|
+
if (m.length > 0) {
|
|
187
|
+
const p = new DataTransfer();
|
|
188
|
+
m.forEach((c) => p.items.add(c)), d(p.files);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}, /* @__PURE__ */ t.createElement(Ue, {
|
|
192
192
|
slot: "label"
|
|
193
193
|
}, C, o), i);
|
|
194
|
-
},
|
|
194
|
+
}, Qe = ({ className: e, children: n }) => {
|
|
195
195
|
const { limitReached: r } = K();
|
|
196
196
|
return /* @__PURE__ */ t.createElement("p", {
|
|
197
197
|
className: e
|
|
@@ -206,34 +206,34 @@ const z = ({ children: e, className: n }) => {
|
|
|
206
206
|
limitReached: r
|
|
207
207
|
}));
|
|
208
208
|
}, oe = ({ className: e, children: n, "aria-roledescription": r, onHoverStart: l, onHoverEnd: s, onFocusChange: d }) => {
|
|
209
|
-
const { ariaDescribedBy: E, inputId: C, labelId: o, errorId: i } = Ee(), { disabled: x, required:
|
|
210
|
-
return /* @__PURE__ */ t.createElement(
|
|
211
|
-
acceptedFileTypes:
|
|
209
|
+
const { ariaDescribedBy: E, inputId: C, labelId: o, errorId: i } = Ee(), { disabled: x, required: m, onFocus: p, hasError: c, errorMessage: y } = V(), { handleFileChange: v, accept: M, multiple: g, buttonRef: S, handleBlur: w, limitError: B, files: N } = K(), u = (N == null ? void 0 : N.some((T) => T.errorMessage)) ?? !1, I = !!(c || y || B || u);
|
|
210
|
+
return /* @__PURE__ */ t.createElement(ke, {
|
|
211
|
+
acceptedFileTypes: M ? M.split(",") : void 0,
|
|
212
212
|
allowsMultiple: g,
|
|
213
|
-
onSelect: (
|
|
214
|
-
if (
|
|
215
|
-
const j = Array.from(
|
|
216
|
-
j.forEach((q) =>
|
|
213
|
+
onSelect: (T) => {
|
|
214
|
+
if (T) {
|
|
215
|
+
const j = Array.from(T), O = new DataTransfer();
|
|
216
|
+
j.forEach((q) => O.items.add(q)), v(O.files);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}, /* @__PURE__ */ t.createElement(Fe, {
|
|
220
|
-
ref:
|
|
220
|
+
ref: S,
|
|
221
221
|
id: C,
|
|
222
222
|
"aria-labelledby": o,
|
|
223
223
|
"aria-describedby": [
|
|
224
224
|
E,
|
|
225
225
|
i
|
|
226
226
|
].filter(Boolean).join(" "),
|
|
227
|
-
render: (
|
|
228
|
-
...
|
|
227
|
+
render: (T) => /* @__PURE__ */ t.createElement("button", {
|
|
228
|
+
...T,
|
|
229
229
|
"aria-roledescription": r,
|
|
230
|
-
"aria-invalid":
|
|
231
|
-
"aria-required":
|
|
230
|
+
"aria-invalid": I || void 0,
|
|
231
|
+
"aria-required": m
|
|
232
232
|
}),
|
|
233
233
|
isDisabled: x,
|
|
234
234
|
className: e,
|
|
235
|
-
onFocus:
|
|
236
|
-
onBlur:
|
|
235
|
+
onFocus: p,
|
|
236
|
+
onBlur: w,
|
|
237
237
|
onHoverStart: l,
|
|
238
238
|
onHoverEnd: s,
|
|
239
239
|
onFocusChange: d
|
|
@@ -245,19 +245,19 @@ const z = ({ children: e, className: n }) => {
|
|
|
245
245
|
}, n);
|
|
246
246
|
};
|
|
247
247
|
oe.Text = Xe;
|
|
248
|
-
z.Title =
|
|
248
|
+
z.Title = Qe;
|
|
249
249
|
z.Subtitle = Je;
|
|
250
250
|
z.Button = oe;
|
|
251
|
-
const
|
|
252
|
-
const { file: l, index: s } = r, d = l.file.name, E = L(e,
|
|
251
|
+
const R = ({ children: e, className: n, ...r }) => {
|
|
252
|
+
const { file: l, index: s } = r, d = l.file.name, E = L(e, R.Name), C = L(e, R.Remove), o = L(e, R.Spinner), i = L(e, R.Error);
|
|
253
253
|
return /* @__PURE__ */ t.createElement("div", {
|
|
254
254
|
className: n
|
|
255
|
-
},
|
|
255
|
+
}, G(E, {
|
|
256
256
|
fileName: d
|
|
257
|
-
}), l.state === "uploading" ? o :
|
|
257
|
+
}), l.state === "uploading" ? o : 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 }) => {
|
|
@@ -266,11 +266,11 @@ const Z = ({ children: e, className: n, ...r }) => {
|
|
|
266
266
|
className: e
|
|
267
267
|
}, r);
|
|
268
268
|
}, tt = ({ className: e, "aria-label": n, children: r, ...l }) => {
|
|
269
|
-
const { fileName: s, index: d } = l, { disabled: E } = V(), { handleDelete: C, fileRemoveButtonRefs: o } = K(), i =
|
|
269
|
+
const { fileName: s, index: d } = l, { disabled: E } = V(), { handleDelete: C, fileRemoveButtonRefs: o } = K(), i = P(null);
|
|
270
270
|
ne(() => {
|
|
271
|
-
const
|
|
272
|
-
return p
|
|
273
|
-
p
|
|
271
|
+
const m = o.current, p = s;
|
|
272
|
+
return m[p] = i, () => {
|
|
273
|
+
m[p] === i && (m[p] = void 0);
|
|
274
274
|
};
|
|
275
275
|
}, [
|
|
276
276
|
s,
|
|
@@ -301,26 +301,26 @@ const Z = ({ children: e, className: n, ...r }) => {
|
|
|
301
301
|
className: e,
|
|
302
302
|
isIndeterminate: !0
|
|
303
303
|
}, r);
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
304
|
+
R.Name = et;
|
|
305
|
+
R.Remove = tt;
|
|
306
|
+
R.Spinner = nt;
|
|
307
|
+
R.Error = ge;
|
|
308
308
|
ge.Text = ze;
|
|
309
309
|
const le = ({ children: e, className: n }) => {
|
|
310
310
|
const { files: r } = K(), l = L(e, le.File);
|
|
311
311
|
return !r || r.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
312
312
|
className: n
|
|
313
|
-
}, r.map((s, d) =>
|
|
313
|
+
}, r.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 =
|
|
319
|
+
le.File = R;
|
|
320
320
|
const J = (e) => e.file.name, a = ({ children: e }) => {
|
|
321
|
-
const { t: n } = re(), { id: r, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target: C, explanationText: o, onBlur: i, hasError: x, errorMessage:
|
|
321
|
+
const { t: n } = re(), { id: r, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target: C, explanationText: o, onBlur: i, hasError: x, errorMessage: m, FieldLayout: p } = V(), c = P(null), y = P({}), v = P(!1), M = Z(() => {
|
|
322
322
|
c.current ? c.current.focus() : v.current = !0;
|
|
323
|
-
}, []), { files: g, limitError:
|
|
323
|
+
}, []), { files: g, limitError: S, hover: w, getExplanationText: B, getStatusText: N, handleBlur: u, handleChange: I, handleDelete: T, accept: j } = Ge({
|
|
324
324
|
valueSliderLimit: E,
|
|
325
325
|
value: l,
|
|
326
326
|
explanationText: o,
|
|
@@ -328,13 +328,13 @@ const J = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
328
328
|
onChange: s,
|
|
329
329
|
uploadFileFormats: d,
|
|
330
330
|
onBlur: i,
|
|
331
|
-
onFilesCleared:
|
|
332
|
-
}),
|
|
331
|
+
onFilesCleared: M
|
|
332
|
+
}), O = Z((k) => {
|
|
333
333
|
var se;
|
|
334
|
-
const
|
|
335
|
-
g.length > 1 && ((se = (g.filter((ee) => J(ee) !== H).map((ee) =>
|
|
334
|
+
const Q = g[k], H = J(Q);
|
|
335
|
+
g.length > 1 && ((se = (g.filter((ee) => J(ee) !== H).map((ee) => y.current[J(ee)]).find(Boolean) ?? c).current) == null || se.focus()), T(k);
|
|
336
336
|
}, [
|
|
337
|
-
|
|
337
|
+
T,
|
|
338
338
|
g
|
|
339
339
|
]);
|
|
340
340
|
ne(() => {
|
|
@@ -342,54 +342,54 @@ const J = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
342
342
|
}, [
|
|
343
343
|
g
|
|
344
344
|
]);
|
|
345
|
-
const q = E > 1,
|
|
346
|
-
handleFileChange:
|
|
345
|
+
const q = E > 1, W = g.length >= E, X = fe(() => ({
|
|
346
|
+
handleFileChange: I,
|
|
347
347
|
handleBlur: u,
|
|
348
|
-
handleDelete:
|
|
348
|
+
handleDelete: O,
|
|
349
349
|
files: g,
|
|
350
350
|
accept: j,
|
|
351
|
-
limitReached:
|
|
351
|
+
limitReached: W,
|
|
352
352
|
multiple: q,
|
|
353
|
-
getExplanationText:
|
|
353
|
+
getExplanationText: B,
|
|
354
354
|
getStatusText: N,
|
|
355
|
-
hover:
|
|
356
|
-
limitError:
|
|
355
|
+
hover: w,
|
|
356
|
+
limitError: S,
|
|
357
357
|
buttonRef: c,
|
|
358
|
-
fileRemoveButtonRefs:
|
|
358
|
+
fileRemoveButtonRefs: y
|
|
359
359
|
}), [
|
|
360
|
-
|
|
360
|
+
I,
|
|
361
361
|
u,
|
|
362
|
-
|
|
362
|
+
O,
|
|
363
363
|
g,
|
|
364
364
|
j,
|
|
365
|
-
|
|
365
|
+
W,
|
|
366
366
|
q,
|
|
367
|
-
|
|
367
|
+
B,
|
|
368
368
|
N,
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
w,
|
|
370
|
+
S
|
|
371
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), U = L(e, a.Description), ae = L(e, a.Error);
|
|
372
|
-
return
|
|
373
|
-
var
|
|
372
|
+
return Te(() => {
|
|
373
|
+
var k, Q;
|
|
374
374
|
if (c.current) {
|
|
375
375
|
c.current.focus({
|
|
376
376
|
preventScroll: !0
|
|
377
377
|
});
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
(
|
|
380
|
+
(Q = (k = g.map((H) => y.current[J(H)]).find((H) => H == null ? void 0 : H.current)) == null ? void 0 : k.current) == null || Q.focus({
|
|
381
381
|
preventScroll: !0
|
|
382
382
|
});
|
|
383
383
|
}, r), /* @__PURE__ */ t.createElement(be.Provider, {
|
|
384
384
|
value: X
|
|
385
|
-
}, /* @__PURE__ */ t.createElement(
|
|
385
|
+
}, /* @__PURE__ */ t.createElement(p, {
|
|
386
386
|
fieldId: r,
|
|
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 ?? m
|
|
392
|
+
}), /* @__PURE__ */ t.createElement(Pe, {
|
|
393
393
|
role: "status",
|
|
394
394
|
"aria-live": "polite",
|
|
395
395
|
"aria-atomic": "true"
|
|
@@ -469,13 +469,13 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
469
469
|
values: "0;360",
|
|
470
470
|
repeatCount: "indefinite"
|
|
471
471
|
})));
|
|
472
|
-
}, it = "
|
|
472
|
+
}, it = "_dropZone_1rkyw_1", ct = "_dropZoneHover_1rkyw_26", ut = "_dropZoneTitle_1rkyw_63", dt = "_dropZoneSubtitle_1rkyw_68", mt = "_button_1rkyw_72", pt = "_buttonHover_1rkyw_125", ft = "_explanation_1rkyw_142", Et = "_files_1rkyw_146", Ft = "_file_1rkyw_146", bt = "_fileName_1rkyw_195", gt = "_buttonLabel_1rkyw_203", ht = "_removeButton_1rkyw_207", _t = "_spinner_1rkyw_254", Lt = "_fileError_1rkyw_270", D = {
|
|
473
473
|
dropZone: it,
|
|
474
474
|
dropZoneHover: ct,
|
|
475
475
|
dropZoneTitle: ut,
|
|
476
476
|
dropZoneSubtitle: dt,
|
|
477
|
-
button:
|
|
478
|
-
buttonHover:
|
|
477
|
+
button: mt,
|
|
478
|
+
buttonHover: pt,
|
|
479
479
|
explanation: ft,
|
|
480
480
|
files: Et,
|
|
481
481
|
file: Ft,
|
|
@@ -488,35 +488,35 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
488
488
|
content: e,
|
|
489
489
|
locale: n
|
|
490
490
|
}), xt = () => {
|
|
491
|
-
var
|
|
492
|
-
const { t: e } = re(), { disabled: n, readOnly: r } = V(), l = !n && !r, s =
|
|
491
|
+
var S, w, B, N;
|
|
492
|
+
const { t: e } = re(), { disabled: n, readOnly: r } = V(), l = !n && !r, s = pe({
|
|
493
493
|
globalClasses: de,
|
|
494
494
|
moduleClasses: {
|
|
495
495
|
base: D.dropZone,
|
|
496
496
|
hover: D.dropZoneHover
|
|
497
497
|
}
|
|
498
|
-
}), d =
|
|
499
|
-
globalClasses:
|
|
498
|
+
}), d = pe({
|
|
499
|
+
globalClasses: Ze,
|
|
500
500
|
moduleClasses: {
|
|
501
501
|
base: D.button,
|
|
502
502
|
hover: D.buttonHover
|
|
503
503
|
}
|
|
504
|
-
}), E = (N = (
|
|
504
|
+
}), E = (N = (B = (w = (S = Se().fileUpload) == null ? void 0 : S.elementProps) == null ? void 0 : w.uploadButton) == null ? void 0 : B.elementProps) == null ? void 0 : N.icon, { wix: C, className: o, ...i } = E ?? {}, x = Be(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), m = P(null), [p, c] = Y(!1), [y, v] = Y(!1), M = Z(() => {
|
|
505
505
|
var u;
|
|
506
|
-
c(!0), (u =
|
|
507
|
-
}, []), g =
|
|
506
|
+
c(!0), (u = m.current) == null || u.runAnimationForward();
|
|
507
|
+
}, []), g = Z(() => {
|
|
508
508
|
var u;
|
|
509
|
-
c(!1), (u =
|
|
509
|
+
c(!1), (u = m.current) == null || u.runAnimationBackward();
|
|
510
510
|
}, []);
|
|
511
511
|
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
512
|
-
className:
|
|
512
|
+
className: A(we, $.label)
|
|
513
513
|
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
514
|
-
className:
|
|
514
|
+
className: A(Ie, $.requiredMark)
|
|
515
515
|
})), /* @__PURE__ */ t.createElement(a.DropZone, {
|
|
516
|
-
className: ({ isHovered: u, isFocused:
|
|
516
|
+
className: ({ isHovered: u, isFocused: I, isDropTarget: T }) => s({
|
|
517
517
|
isSelected: !1,
|
|
518
|
-
isHovered: u ||
|
|
519
|
-
isFocused:
|
|
518
|
+
isHovered: u || T,
|
|
519
|
+
isFocused: I,
|
|
520
520
|
isInteractive: l
|
|
521
521
|
})
|
|
522
522
|
}, /* @__PURE__ */ t.createElement(a.DropZone.Title, {
|
|
@@ -524,31 +524,31 @@ 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: I }) => d({
|
|
528
528
|
isSelected: !1,
|
|
529
529
|
isHovered: u,
|
|
530
|
-
isFocused:
|
|
530
|
+
isFocused: I,
|
|
531
531
|
isInteractive: l
|
|
532
532
|
}),
|
|
533
533
|
"aria-roledescription": e("file-upload.aria-roledescription"),
|
|
534
|
-
onHoverStart:
|
|
534
|
+
onHoverStart: M,
|
|
535
535
|
onHoverEnd: g,
|
|
536
536
|
onFocusChange: v
|
|
537
537
|
}, i.svg ? /* @__PURE__ */ t.createElement(Le, {
|
|
538
538
|
...i,
|
|
539
|
-
ref:
|
|
540
|
-
className:
|
|
539
|
+
ref: m,
|
|
540
|
+
className: A(Ae, Re, o)
|
|
541
541
|
}) : E ? null : /* @__PURE__ */ t.createElement(ot, null), /* @__PURE__ */ t.createElement(a.DropZone.Button.Text, {
|
|
542
|
-
className:
|
|
543
|
-
[ce.hover]: l && (
|
|
542
|
+
className: A(ce.base, D.buttonLabel, x, {
|
|
543
|
+
[ce.hover]: l && (p || y)
|
|
544
544
|
})
|
|
545
545
|
}))), /* @__PURE__ */ t.createElement(a.Explanation, {
|
|
546
|
-
className:
|
|
546
|
+
className: A(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: A(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,13 +558,13 @@ 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: A(me, $.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: A(ue, $.description)
|
|
564
564
|
}, Ct), /* @__PURE__ */ t.createElement(a.Error, {
|
|
565
|
-
className:
|
|
566
|
-
}, /* @__PURE__ */ t.createElement(
|
|
567
|
-
},
|
|
565
|
+
className: A(me, $.error)
|
|
566
|
+
}, /* @__PURE__ */ t.createElement(Me, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
|
|
567
|
+
}, Ot = () => /* @__PURE__ */ t.createElement(xt, null);
|
|
568
568
|
export {
|
|
569
|
-
|
|
569
|
+
Ot as FileUploadRAC
|
|
570
570
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as _ } from "react";
|
|
2
|
+
import { RicosViewer as A } from "@wix/ricos/viewer";
|
|
3
3
|
import u from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import { f as c, a as
|
|
4
|
+
import { by as C, bq as P, bv as I, U as S, P as x, G as N } from "./form-CCQN_rPn.js";
|
|
5
|
+
import { f as c, a as R } from "./find-child-C60k4CxG.js";
|
|
6
6
|
import { f as O } from "./format-currency-BwShJ9vM.js";
|
|
7
|
-
import { D as v, E as M } from "./field-error-headless-
|
|
8
|
-
import { L as g } from "./field-label-headless-
|
|
9
|
-
import { s as
|
|
7
|
+
import { D as v, E as M } from "./field-error-headless-CX95bMbk.js";
|
|
8
|
+
import { L as g } from "./field-label-headless-niuFY6Mw.js";
|
|
9
|
+
import { s as y } from "./field-rac.module-ts2t4WUO.js";
|
|
10
10
|
const e = ({ children: r }) => {
|
|
11
11
|
var p;
|
|
12
|
-
const { id: a, validation: n, FieldLayout: l } = C(), { currency: o, regionalFormat: m } =
|
|
12
|
+
const { id: a, validation: n, FieldLayout: l } = C(), { currency: o, regionalFormat: m } = P(), s = _(() => {
|
|
13
13
|
var d, E, f;
|
|
14
14
|
return (f = (E = (d = n == null ? void 0 : n.predefined) == null ? void 0 : d.paymentOptions) == null ? void 0 : E.products) == null ? void 0 : f[0];
|
|
15
15
|
}, [
|
|
16
16
|
n
|
|
17
|
-
]), i = (p = s == null ? void 0 : s.fixedPriceOptions) == null ? void 0 : p.price,
|
|
17
|
+
]), i = (p = s == null ? void 0 : s.fixedPriceOptions) == null ? void 0 : p.price, F = c(r, e.Label), L = c(r, e.Amount), b = c(r, e.Description), D = c(r, e.Error);
|
|
18
18
|
return /* @__PURE__ */ t.createElement(l, {
|
|
19
19
|
fieldId: a,
|
|
20
|
-
renderLabel: () =>
|
|
21
|
-
renderInput: () =>
|
|
20
|
+
renderLabel: () => F,
|
|
21
|
+
renderInput: () => R(L, {
|
|
22
22
|
price: i,
|
|
23
23
|
currencyCode: o == null ? void 0 : o.code,
|
|
24
24
|
locale: m
|
|
@@ -26,7 +26,7 @@ const e = ({ children: r }) => {
|
|
|
26
26
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, b)
|
|
27
27
|
});
|
|
28
28
|
}, T = ({ className: r, ...a }) => {
|
|
29
|
-
const { price: n, currencyCode: l, locale: o } = a, { inputId: m, ariaDescribedBy: s } =
|
|
29
|
+
const { price: n, currencyCode: l, locale: o } = a, { inputId: m, ariaDescribedBy: s } = I(), i = O({
|
|
30
30
|
amount: n,
|
|
31
31
|
currency: l,
|
|
32
32
|
locale: o
|
|
@@ -46,16 +46,16 @@ e.Description = v;
|
|
|
46
46
|
e.Error = M;
|
|
47
47
|
const B = "_value_c7203_1", k = {
|
|
48
48
|
value: B
|
|
49
|
-
},
|
|
49
|
+
}, q = ({ content: r, locale: a }) => /* @__PURE__ */ t.createElement(A, {
|
|
50
50
|
content: r,
|
|
51
51
|
locale: a
|
|
52
|
-
}),
|
|
53
|
-
className: u(
|
|
52
|
+
}), w = () => /* @__PURE__ */ t.createElement(e, null, /* @__PURE__ */ t.createElement(e.Label, {
|
|
53
|
+
className: u(S, y.label)
|
|
54
54
|
}), /* @__PURE__ */ t.createElement(e.Amount, {
|
|
55
|
-
className: u(
|
|
55
|
+
className: u(x, k.value)
|
|
56
56
|
}), /* @__PURE__ */ t.createElement(e.Description, {
|
|
57
|
-
className: u(
|
|
58
|
-
},
|
|
57
|
+
className: u(N, y.description)
|
|
58
|
+
}, q)), K = () => /* @__PURE__ */ t.createElement(w, null);
|
|
59
59
|
export {
|
|
60
60
|
K as FixedPaymentRAC
|
|
61
61
|
};
|