@wix/form-elements 1.159.0 → 1.161.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-CpiyUOXo.js → appointment-rac-BubC8I9X.js} +388 -381
- package/dist/component/{bookings-address-rac-BBEUV1t7.js → bookings-address-rac-BbwvVs86.js} +1 -1
- package/dist/component/{bookings-email-rac-DdfoeLFV.js → bookings-email-rac-C2HCkcfa.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DH39yvQ-.js → bookings-first-name-rac-Uy7c5EBs.js} +1 -1
- package/dist/component/{bookings-header-rac-StLm7b4I.js → bookings-header-rac-nmwsWRjS.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DHZMPMOO.js → bookings-last-name-rac-BAioQLCg.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrHp1ojM.js → bookings-login-bar-rac-CO6vOBjG.js} +5 -5
- package/dist/component/{bookings-phone-rac-6aGjbavK.js → bookings-phone-rac-Cr16h-_R.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DBlGZUM5.js → bookings-rich-text-rac-CHLH3jd7.js} +1 -1
- package/dist/component/{checkbox-field-rac-Cna1Va1X.js → checkbox-field-rac-CMwmwFMD.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-m_-10Mdx.js → checkbox-group-field-headless-BNs_S-nT.js} +50 -50
- package/dist/component/{checkbox-group-field-rac-BSCi5hmx.js → checkbox-group-field-rac-BA60EPAN.js} +12 -12
- package/dist/component/{checkbox-group-rac-BWYQZmAI.js → checkbox-group-rac-BJZ4Oer9.js} +1 -1
- package/dist/component/{checkbox-rac-BsUTfSUf.js → checkbox-rac-KsVlI6_V.js} +1 -1
- package/dist/component/{contacts-address-rac-DwCLW8rV.js → contacts-address-rac-CRYkz87z.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DnNgxbKb.js → contacts-birthdate-rac-BIz-1-ZX.js} +1 -1
- package/dist/component/{contacts-company-rac-BQqXzpNl.js → contacts-company-rac-B8G__j6I.js} +1 -1
- package/dist/component/{contacts-email-rac-BINnZzxp.js → contacts-email-rac-Dztkvp5i.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DBWKFkIU.js → contacts-first-name-rac-CVSEWpLU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-D_-qrF7I.js → contacts-last-name-rac-Blz4M5bk.js} +1 -1
- package/dist/component/{contacts-phone-rac-7n7JkSDr.js → contacts-phone-rac-CPCE5soY.js} +1 -1
- package/dist/component/{contacts-position-rac-DvXP8nvT.js → contacts-position-rac-Dd_kBjqG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DnLnV5Gm.js → contacts-subscribe-rac-C6AlsP10.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BJVWhvYW.js → contacts-tax-id-rac-CQ1n29zI.js} +1 -1
- package/dist/component/{date-availability-Df807-eN.js → date-availability-DDj1j0z5.js} +1 -1
- package/dist/component/date-input-field-rac-D5r1n_ah.js +309 -0
- package/dist/component/{date-input-rac-CSB3MWHW.js → date-input-rac-Cyi5mU_P.js} +1 -1
- package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-CeG391Zo.js} +79 -79
- package/dist/component/{date-picker-rac-Fp8_pxtf.js → date-picker-rac-Ci9aHgav.js} +1 -1
- package/dist/component/date-time-input-field-rac-CrbYEbJJ.js +441 -0
- package/dist/component/{date-time-input-rac-wctMR4uM.js → date-time-input-rac-DDJLkqs0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-erMPfwFL.js → dext-checkbox-group-rac-C3ftVHBA.js} +4 -4
- package/dist/component/{dext-checkbox-rac-DQSq9Lqd.js → dext-checkbox-rac-BGLYWn68.js} +1 -1
- package/dist/component/{dext-date-picker-rac-RCLcd1VV.js → dext-date-picker-rac-Cy9RlDlt.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DMolWzvy.js → dext-date-time-input-rac-88ZoTd5e.js} +1 -1
- package/dist/component/{dext-dropdown-rac-wQ2GJL4V.js → dext-dropdown-rac-CPxDUuk9.js} +1 -1
- package/dist/component/{dext-email-rac-BtymBVTW.js → dext-email-rac-BAvQwDPA.js} +1 -1
- package/dist/component/{dext-number-input-rac-DHPiK0Z3.js → dext-number-input-rac-D7HYQVKq.js} +1 -1
- package/dist/component/{dext-phone-rac-C58vHEEe.js → dext-phone-rac--FhcplSI.js} +1 -1
- package/dist/component/dext-radio-group-rac-DBz8iCKW.js +18 -0
- package/dist/component/{dext-rating-input-rac-DI0k3tVa.js → dext-rating-input-rac-Cv7nThfe.js} +1 -1
- package/dist/component/{dext-tags-rac-DmF6ctvQ.js → dext-tags-rac-CRUUc5dr.js} +2 -2
- package/dist/component/{dext-text-area-rac-Bv6ridbR.js → dext-text-area-rac-DQBQXV1L.js} +1 -1
- package/dist/component/{dext-text-input-rac-DoTAdUgU.js → dext-text-input-rac-4CpM581y.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuoMS6g2.js → dext-url-input-rac-0C1jTEr9.js} +1 -1
- package/dist/component/{donation-rac-CjZalSgn.js → donation-rac-Cgt0ZE50.js} +79 -79
- package/dist/component/{dropdown-field-rac-By_fpqhx.js → dropdown-field-rac-DlGKR7pZ.js} +14 -14
- package/dist/component/{dropdown-rac-BnIEC4RX.js → dropdown-rac-CYFW_3x_.js} +1 -1
- package/dist/component/{ecom-address-rac-B6Usk1Ty.js → ecom-address-rac-CQfQHpXC.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B4B0wzlC.js → ecom-subscription-checkbox-rac-D2v2Upvz.js} +2 -2
- package/dist/component/{email-input-field-rac-Df3KI3_v.js → email-input-field-rac-CVw25yRo.js} +39 -39
- package/dist/component/{events-repeater-rac-B2iBk8lV.js → events-repeater-rac-BCVUcmFj.js} +25 -25
- package/dist/component/{events-rsvp-rac-xl_qCIh3.js → events-rsvp-rac-DwbqEr8z.js} +18 -18
- package/dist/component/{field-error-headless-DWc76YmY.js → field-error-headless-XnVcMmsL.js} +3 -3
- package/dist/component/{field-label-headless-DKBKqI2X.js → field-label-headless-BRTLT2Yt.js} +16 -16
- package/dist/component/{file-upload-rac-BVj4cRqe.js → file-upload-rac-Dkwg9Jk4.js} +118 -118
- package/dist/component/{fixed-payment-rac-BS1Hb4hg.js → fixed-payment-rac-ST98xAa2.js} +13 -13
- package/dist/component/{form-BTUoOcqB.js → form-BUqSKOvc.js} +785 -727
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DTJ_Us6u.js → header-field-rac-CzNTGYWq.js} +6 -6
- package/dist/component/{header-rac-CvYp0Jjo.js → header-rac-DUt6AIAE.js} +1 -1
- package/dist/component/{image-choice-rac--qrYqKJl.js → image-choice-rac-DuBgrSt2.js} +23 -23
- package/dist/component/{index-DIl9BH2M.js → index-CDO22hht.js} +66 -66
- package/dist/component/{index-CoEV4QEy.js → index-cZZeAuuu.js} +2 -2
- package/dist/component/{isObjectLike-CLN09X5V.js → isObjectLike-cs4bARpC.js} +11 -11
- package/dist/component/multiline-address-field-rac-vcEWhUCV.js +1664 -0
- package/dist/component/{multiline-address-rac-DtaAJjbR.js → multiline-address-rac-WQaI2eUX.js} +1 -1
- package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-CBUMqATk.js} +23 -23
- package/dist/component/{number-input-rac-BlciEPLN.js → number-input-rac-B4j5hyzS.js} +1 -1
- package/dist/component/{password-rac-BvvQgafk.js → password-rac-DwLyf45N.js} +27 -27
- package/dist/component/{payment-input-rac-CSRyOPPr.js → payment-input-rac-D0Od---y.js} +31 -31
- package/dist/component/phone-input-field-rac-COlu9IeC.js +512 -0
- package/dist/component/{phone-rac-DMP1MoRs.js → phone-rac-Dh4RacOF.js} +1 -1
- package/dist/component/{product-list-rac-WQ9Qhzum.js → product-list-rac-D7zHDE2D.js} +39 -39
- package/dist/component/{quiz-radio-group-rac-DzrL3-gZ.js → quiz-radio-group-rac-1AaKphJt.js} +1 -1
- package/dist/component/{radio-button-module-classes-CJk18LzO.js → radio-button-module-classes-VqaP6vpA.js} +30 -30
- package/dist/component/{radio-group-field-rac-DGoMoSgo.js → radio-group-field-rac-Cp3LRN3C.js} +8 -8
- package/dist/component/{radio-group-rac-DhAELVNV.js → radio-group-rac-KhmhzYGf.js} +1 -1
- package/dist/component/{rating-input-field-rac-CFoesqmC.js → rating-input-field-rac-10n6ciCr.js} +39 -39
- package/dist/component/{rating-input-rac-CFMIxche.js → rating-input-rac-XZjjY2Gp.js} +1 -1
- package/dist/component/{rich-content-rac.module-xJ03MegT.js → rich-content-rac.module-kMwDoLBa.js} +8 -8
- package/dist/component/{rich-text-field-rac-CBMY4JOB.js → rich-text-field-rac-H5bd8fAt.js} +4 -4
- package/dist/component/{rich-text-rac-CvZ7s1Ct.js → rich-text-rac-88GSQR62.js} +1 -1
- package/dist/component/service-dropdown-rac-B1_Xr_X3.js +145 -0
- package/dist/component/{services-multi-choice-rac-fXOov4K7.js → services-multi-choice-rac-DWp_Llbi.js} +11 -11
- package/dist/component/{signature-rac-CG_Q9Oxr.js → signature-rac-zN_6KRDp.js} +82 -82
- package/dist/component/{submit-button-rac-DAsovEp2.js → submit-button-rac-Dv6UarYX.js} +12 -12
- package/dist/component/{tags-field-rac-9mpOMPLm.js → tags-field-rac-sVN6MHfJ.js} +43 -43
- package/dist/component/{tags-rac-CNBJ08wS.js → tags-rac-DhTHs_XN.js} +1 -1
- package/dist/component/{text-area-field-rac-D4aTm7CM.js → text-area-field-rac-DrWkww7W.js} +19 -19
- package/dist/component/{text-area-rac-DoKiH_Kv.js → text-area-rac-CXXh-ZdY.js} +1 -1
- package/dist/component/{text-input-field-rac-BbvPB26b.js → text-input-field-rac-C2YiMr-g.js} +5 -5
- package/dist/component/text-input-headless-BJMNbsMY.js +47 -0
- package/dist/component/{text-input-rac-1ac1EKad.js → text-input-rac-CpsPh7FH.js} +1 -1
- package/dist/component/{time-input-rac-BS0rR-89.js → time-input-rac-DG_1KxS4.js} +20 -20
- package/dist/component/{url-input-field-rac-DbO6ATng.js → url-input-field-rac-twxRREnl.js} +19 -19
- package/dist/component/{url-input-rac-DHuny3d-.js → url-input-rac-BTStO0NP.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-DbMMg1ws.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-Yes4kC_0.js +96 -0
- package/dist/component/{use-element-state-class-name-BUsFQfoW.js → use-element-state-class-name-DlncY4hk.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C2l3G8gb.js → use-hoverable-input-class-name-C__zqP5j.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-DnK_MQRO.js +53 -0
- package/dist/component/{use-service-options-base-D_enm38a.js → use-service-options-base-DKJe52Vk.js} +6 -6
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +6 -0
- package/dist/form.d.ts +11 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-CEuPElMH.js +0 -303
- package/dist/component/date-time-input-field-rac-DG5KSBHe.js +0 -433
- package/dist/component/dext-radio-group-rac-Cp-I94HW.js +0 -18
- package/dist/component/dropdown-field-headless-BYEjiIUf.js +0 -93
- package/dist/component/multiline-address-field-rac-BjWzx-LH.js +0 -1659
- package/dist/component/phone-input-field-rac-BVWzH_TY.js +0 -508
- package/dist/component/service-dropdown-rac-B627AgPG.js +0 -145
- package/dist/component/text-input-headless-BGaBRrP1.js +0 -47
- package/dist/component/use-dropdown-trigger-class-name-rcGBzxI1.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-CoOk4W4i.js +0 -48
- package/dist/component/use-text-input-class-name-BLtPQoYE.js +0 -6
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import t, { useState as
|
|
1
|
+
import t, { useState as W, useRef as k, 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
|
-
import { RicosViewer as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
3
|
+
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
4
|
+
import R from "classnames";
|
|
5
|
+
import { bw as xe, bK as re, bF as ve, aD as Ne, bI as De, aw as ie, bJ as Te, bx as Ee, bA as V, bC as Se, bu as Be, bt as ye, W as Ie, ac as Ae, b as Re, P as Ze, Q as ce, G as ue, N as de, M as pe, O as Me, f as te } from "./form-BUqSKOvc.js";
|
|
6
6
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { s as $ } from "./field-rac.module-DP0lkkEv.js";
|
|
8
|
-
import { u as me } from "./use-element-state-class-name-
|
|
9
|
-
import { DropZone as
|
|
10
|
-
import { f as L, a as
|
|
11
|
-
import { b as ze, a as Ve, D as
|
|
12
|
-
import { L as
|
|
8
|
+
import { u as me } from "./use-element-state-class-name-DlncY4hk.js";
|
|
9
|
+
import { DropZone as we, Text as Ue, FileTrigger as Pe, Button as Fe, ProgressBar as He, VisuallyHidden as ke } from "react-aria-components";
|
|
10
|
+
import { f as L, a as Y } from "./find-child-C60k4CxG.js";
|
|
11
|
+
import { b as ze, a as Ve, D as Ke, E as je } from "./field-error-headless-XnVcMmsL.js";
|
|
12
|
+
import { L as qe } from "./field-label-headless-BRTLT2Yt.js";
|
|
13
13
|
const $e = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
@@ -17,8 +17,8 @@ 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
|
-
},
|
|
21
|
-
const { actions: n, formId: r } =
|
|
20
|
+
}, We = (e) => {
|
|
21
|
+
const { actions: n, formId: r } = xe();
|
|
22
22
|
return async (l, s, d) => {
|
|
23
23
|
if (!(n != null && n.uploadFile) || !l.length)
|
|
24
24
|
return n != null && n.uploadFile || console.error("No uploadFile action"), l.length || console.error("No files to upload"), [];
|
|
@@ -27,8 +27,8 @@ const $e = {
|
|
|
27
27
|
formId: r,
|
|
28
28
|
uploadTarget: e
|
|
29
29
|
}).then((i) => {
|
|
30
|
-
const { id:
|
|
31
|
-
fileId:
|
|
30
|
+
const { id: x, displayName: p, url: m, isPrivate: c } = i, T = {
|
|
31
|
+
fileId: x,
|
|
32
32
|
displayName: p || o.name,
|
|
33
33
|
url: c ? void 0 : m,
|
|
34
34
|
fileType: o.type || "application/octet-stream"
|
|
@@ -43,8 +43,8 @@ const $e = {
|
|
|
43
43
|
return (await Promise.all(E)).filter((o) => o !== void 0);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
function
|
|
47
|
-
const [o, i] =
|
|
46
|
+
function Ye({ valueSliderLimit: e, value: n, explanationText: r, target: l, onChange: s, uploadFileFormats: d, onBlur: E, onFilesCleared: C }) {
|
|
47
|
+
const [o, i] = W(Qe(n)), [x, p] = W(n || []), [m, c] = W(), T = We(l), { t: v } = re(), g = ve().includes(Ne.BUTTONS_HOVER), { setFormStatus: B } = De(), I = k(!1), y = k(s);
|
|
48
48
|
y.current = s;
|
|
49
49
|
const N = fe(() => o.some((f) => f.state === "uploading"), [
|
|
50
50
|
o
|
|
@@ -72,7 +72,7 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
72
72
|
}, [
|
|
73
73
|
o,
|
|
74
74
|
v
|
|
75
|
-
]),
|
|
75
|
+
]), A = M(() => o.length ? o.some((f) => f.state === "uploading") ? u() : r || u() : r, [
|
|
76
76
|
o,
|
|
77
77
|
r,
|
|
78
78
|
u
|
|
@@ -82,11 +82,11 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
82
82
|
file: f,
|
|
83
83
|
state: "uploaded"
|
|
84
84
|
} : b)), p((F) => {
|
|
85
|
-
var
|
|
85
|
+
var U;
|
|
86
86
|
const b = [
|
|
87
87
|
...F
|
|
88
88
|
].concat(_);
|
|
89
|
-
return (
|
|
89
|
+
return (U = y.current) == null || U.call(y, b), b;
|
|
90
90
|
});
|
|
91
91
|
}, (f, _) => {
|
|
92
92
|
i((F) => F.map((b) => b.file === _ ? {
|
|
@@ -98,7 +98,7 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
98
98
|
}, [
|
|
99
99
|
T,
|
|
100
100
|
v
|
|
101
|
-
]),
|
|
101
|
+
]), j = async (h) => {
|
|
102
102
|
if (m && c(void 0), h) {
|
|
103
103
|
if (o.length + h.length > e) {
|
|
104
104
|
c(v("form.file-upload.error.upload-limit", {
|
|
@@ -106,8 +106,8 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
106
106
|
}));
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
const F = Array.from(h).reduce((b,
|
|
110
|
-
file:
|
|
109
|
+
const F = Array.from(h).reduce((b, U) => (o.some((P) => P.file.name === U.name) || b.push({
|
|
110
|
+
file: U,
|
|
111
111
|
state: "uploading"
|
|
112
112
|
}), b), []);
|
|
113
113
|
i([
|
|
@@ -115,35 +115,35 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
115
115
|
...F
|
|
116
116
|
]), await S(F);
|
|
117
117
|
}
|
|
118
|
-
},
|
|
118
|
+
}, w = (h) => {
|
|
119
119
|
const f = o[h];
|
|
120
|
-
if (
|
|
121
|
-
const _ =
|
|
120
|
+
if (x && s && f.state !== "error") {
|
|
121
|
+
const _ = x.filter((b) => b.displayName !== f.file.name);
|
|
122
122
|
s(_), p(_);
|
|
123
123
|
const F = o.filter((b) => b.file.name !== f.file.name);
|
|
124
|
-
i(F), F.length === 0 &&
|
|
124
|
+
i(F), F.length === 0 && C();
|
|
125
125
|
} else {
|
|
126
126
|
const _ = o.filter((F) => F !== f);
|
|
127
|
-
i(_), _.length === 0 &&
|
|
127
|
+
i(_), _.length === 0 && C();
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, q = () => {
|
|
130
130
|
m && c(void 0), E();
|
|
131
|
-
},
|
|
131
|
+
}, Q = d.map((h) => $e[h]).join(), X = M(() => {
|
|
132
132
|
i([]), p([]);
|
|
133
133
|
}, []);
|
|
134
134
|
return Te(X), {
|
|
135
135
|
files: o,
|
|
136
136
|
limitError: m,
|
|
137
137
|
hover: g,
|
|
138
|
-
getExplanationText:
|
|
138
|
+
getExplanationText: A,
|
|
139
139
|
getStatusText: u,
|
|
140
|
-
handleChange:
|
|
141
|
-
handleDelete:
|
|
142
|
-
accept:
|
|
143
|
-
handleBlur:
|
|
140
|
+
handleChange: j,
|
|
141
|
+
handleDelete: w,
|
|
142
|
+
accept: Q,
|
|
143
|
+
handleBlur: q
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Qe(e = []) {
|
|
147
147
|
const n = e || [];
|
|
148
148
|
try {
|
|
149
149
|
return n.map((r) => ({
|
|
@@ -160,25 +160,25 @@ function Je(e = []) {
|
|
|
160
160
|
return [];
|
|
161
161
|
}
|
|
162
162
|
const be = /* @__PURE__ */ he(void 0);
|
|
163
|
-
function
|
|
163
|
+
function K() {
|
|
164
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 z = ({ children: e, className: n }) => {
|
|
170
|
-
const { ariaDescribedBy: r } = Ee(), { disabled: l, hasError: s } = V(), { handleFileChange: d, limitReached: E } =
|
|
170
|
+
const { ariaDescribedBy: r } = Ee(), { disabled: l, hasError: s } = V(), { handleFileChange: d, limitReached: E } = K();
|
|
171
171
|
if (E)
|
|
172
172
|
return null;
|
|
173
|
-
const
|
|
174
|
-
return /* @__PURE__ */ t.createElement(
|
|
173
|
+
const C = L(e, z.Title), o = L(e, z.Subtitle), i = L(e, z.Button);
|
|
174
|
+
return /* @__PURE__ */ t.createElement(we, {
|
|
175
175
|
"aria-describedby": r,
|
|
176
176
|
className: n,
|
|
177
177
|
"data-invalid": s,
|
|
178
178
|
isDisabled: l,
|
|
179
|
-
onDrop: async (
|
|
179
|
+
onDrop: async (x) => {
|
|
180
180
|
const p = [];
|
|
181
|
-
for (const m of
|
|
181
|
+
for (const m of x.items)
|
|
182
182
|
if (m.kind === "file") {
|
|
183
183
|
const c = await m.getFile();
|
|
184
184
|
c && p.push(c);
|
|
@@ -188,37 +188,37 @@ const z = ({ children: e, className: n }) => {
|
|
|
188
188
|
p.forEach((c) => m.items.add(c)), d(m.files);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
}, /* @__PURE__ */ t.createElement(
|
|
191
|
+
}, /* @__PURE__ */ t.createElement(Ue, {
|
|
192
192
|
slot: "label"
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
const { limitReached: r } =
|
|
193
|
+
}, C, o), i);
|
|
194
|
+
}, Ge = ({ className: e, children: n }) => {
|
|
195
|
+
const { limitReached: r } = K();
|
|
196
196
|
return /* @__PURE__ */ t.createElement("p", {
|
|
197
197
|
className: e
|
|
198
198
|
}, n({
|
|
199
199
|
limitReached: r
|
|
200
200
|
}));
|
|
201
|
-
},
|
|
202
|
-
const { limitReached: r } =
|
|
201
|
+
}, Je = ({ className: e, children: n }) => {
|
|
202
|
+
const { limitReached: r } = K(), { explanationText: l } = V();
|
|
203
203
|
return /* @__PURE__ */ t.createElement("p", {
|
|
204
204
|
className: e
|
|
205
205
|
}, l || 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:
|
|
210
|
-
return /* @__PURE__ */ t.createElement(
|
|
209
|
+
const { ariaDescribedBy: E, inputId: C, labelId: o, errorId: i } = Ee(), { disabled: x, required: p, onFocus: m, hasError: c, errorMessage: T } = V(), { handleFileChange: v, accept: O, multiple: g, buttonRef: B, handleBlur: I, limitError: y, files: N } = K(), u = (N == null ? void 0 : N.some((S) => S.errorMessage)) ?? !1, A = !!(c || T || y || u);
|
|
210
|
+
return /* @__PURE__ */ t.createElement(Pe, {
|
|
211
211
|
acceptedFileTypes: O ? O.split(",") : void 0,
|
|
212
212
|
allowsMultiple: g,
|
|
213
213
|
onSelect: (S) => {
|
|
214
214
|
if (S) {
|
|
215
|
-
const
|
|
216
|
-
|
|
215
|
+
const j = Array.from(S), w = new DataTransfer();
|
|
216
|
+
j.forEach((q) => w.items.add(q)), v(w.files);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}, /* @__PURE__ */ t.createElement(Fe, {
|
|
220
220
|
ref: B,
|
|
221
|
-
id:
|
|
221
|
+
id: C,
|
|
222
222
|
"aria-labelledby": o,
|
|
223
223
|
"aria-describedby": [
|
|
224
224
|
E,
|
|
@@ -227,10 +227,10 @@ const z = ({ children: e, className: n }) => {
|
|
|
227
227
|
render: (S) => /* @__PURE__ */ t.createElement("button", {
|
|
228
228
|
...S,
|
|
229
229
|
"aria-roledescription": r,
|
|
230
|
-
"aria-invalid":
|
|
230
|
+
"aria-invalid": A || void 0,
|
|
231
231
|
"aria-required": p
|
|
232
232
|
}),
|
|
233
|
-
isDisabled:
|
|
233
|
+
isDisabled: x,
|
|
234
234
|
className: e,
|
|
235
235
|
onFocus: m,
|
|
236
236
|
onBlur: I,
|
|
@@ -245,19 +245,19 @@ const z = ({ children: e, className: n }) => {
|
|
|
245
245
|
}, n);
|
|
246
246
|
};
|
|
247
247
|
oe.Text = Xe;
|
|
248
|
-
z.Title =
|
|
249
|
-
z.Subtitle =
|
|
248
|
+
z.Title = Ge;
|
|
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 Z = ({ children: e, className: n, ...r }) => {
|
|
252
|
+
const { file: l, index: s } = r, d = l.file.name, E = L(e, Z.Name), C = L(e, Z.Remove), o = L(e, Z.Spinner), i = L(e, Z.Error);
|
|
253
253
|
return /* @__PURE__ */ t.createElement("div", {
|
|
254
254
|
className: n
|
|
255
|
-
},
|
|
255
|
+
}, Y(E, {
|
|
256
256
|
fileName: d
|
|
257
|
-
}), l.state === "uploading" ? o :
|
|
257
|
+
}), l.state === "uploading" ? o : Y(C, {
|
|
258
258
|
index: s,
|
|
259
259
|
fileName: d
|
|
260
|
-
}), l.errorMessage &&
|
|
260
|
+
}), l.errorMessage && Y(i, {
|
|
261
261
|
errorMessage: l.errorMessage
|
|
262
262
|
}));
|
|
263
263
|
}, et = ({ className: e, ...n }) => {
|
|
@@ -266,7 +266,7 @@ const A = ({ 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:
|
|
269
|
+
const { fileName: s, index: d } = l, { disabled: E } = V(), { handleDelete: C, fileRemoveButtonRefs: o } = K(), i = k(null);
|
|
270
270
|
ne(() => {
|
|
271
271
|
const p = o.current, m = s;
|
|
272
272
|
return p[m] = i, () => {
|
|
@@ -276,15 +276,15 @@ const A = ({ children: e, className: n, ...r }) => {
|
|
|
276
276
|
s,
|
|
277
277
|
o
|
|
278
278
|
]);
|
|
279
|
-
const
|
|
280
|
-
|
|
279
|
+
const x = () => {
|
|
280
|
+
C(d);
|
|
281
281
|
};
|
|
282
282
|
return /* @__PURE__ */ t.createElement(Fe, {
|
|
283
283
|
ref: i,
|
|
284
284
|
"aria-disabled": E,
|
|
285
285
|
"aria-label": n,
|
|
286
286
|
"aria-description": s,
|
|
287
|
-
onClick:
|
|
287
|
+
onClick: x,
|
|
288
288
|
className: e,
|
|
289
289
|
isDisabled: E
|
|
290
290
|
}, r);
|
|
@@ -296,43 +296,43 @@ const A = ({ children: e, className: n, ...r }) => {
|
|
|
296
296
|
className: e,
|
|
297
297
|
role: "alert"
|
|
298
298
|
}, n)) : null;
|
|
299
|
-
}, nt = ({ className: e, "aria-label": n, children: r }) => /* @__PURE__ */ t.createElement(
|
|
299
|
+
}, nt = ({ className: e, "aria-label": n, children: r }) => /* @__PURE__ */ t.createElement(He, {
|
|
300
300
|
"aria-label": n,
|
|
301
301
|
className: e,
|
|
302
302
|
isIndeterminate: !0
|
|
303
303
|
}, r);
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
304
|
+
Z.Name = et;
|
|
305
|
+
Z.Remove = tt;
|
|
306
|
+
Z.Spinner = nt;
|
|
307
|
+
Z.Error = ge;
|
|
308
308
|
ge.Text = ze;
|
|
309
309
|
const le = ({ children: e, className: n }) => {
|
|
310
|
-
const { files: r } =
|
|
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) => Y(l, {
|
|
314
314
|
key: s.file.name || d,
|
|
315
315
|
file: s,
|
|
316
316
|
index: d
|
|
317
317
|
})));
|
|
318
318
|
};
|
|
319
|
-
le.File =
|
|
320
|
-
const
|
|
321
|
-
const { t: n } = re(), { id: r, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target:
|
|
319
|
+
le.File = Z;
|
|
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: p, FieldLayout: m } = V(), c = k(null), T = k({}), v = k(!1), O = M(() => {
|
|
322
322
|
c.current ? c.current.focus() : v.current = !0;
|
|
323
|
-
}, []), { files: g, limitError: B, hover: I, getExplanationText: y, getStatusText: N, handleBlur: u, handleChange:
|
|
323
|
+
}, []), { files: g, limitError: B, hover: I, getExplanationText: y, getStatusText: N, handleBlur: u, handleChange: A, handleDelete: S, accept: j } = Ye({
|
|
324
324
|
valueSliderLimit: E,
|
|
325
325
|
value: l,
|
|
326
326
|
explanationText: o,
|
|
327
|
-
target:
|
|
327
|
+
target: C,
|
|
328
328
|
onChange: s,
|
|
329
329
|
uploadFileFormats: d,
|
|
330
330
|
onBlur: i,
|
|
331
331
|
onFilesCleared: O
|
|
332
|
-
}),
|
|
332
|
+
}), w = M((P) => {
|
|
333
333
|
var se;
|
|
334
|
-
const
|
|
335
|
-
g.length > 1 && ((se = (g.filter((ee) =>
|
|
334
|
+
const G = g[P], H = J(G);
|
|
335
|
+
g.length > 1 && ((se = (g.filter((ee) => J(ee) !== H).map((ee) => T.current[J(ee)]).find(Boolean) ?? c).current) == null || se.focus()), S(P);
|
|
336
336
|
}, [
|
|
337
337
|
S,
|
|
338
338
|
g
|
|
@@ -342,14 +342,14 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
342
342
|
}, [
|
|
343
343
|
g
|
|
344
344
|
]);
|
|
345
|
-
const
|
|
346
|
-
handleFileChange:
|
|
345
|
+
const q = E > 1, Q = g.length >= E, X = fe(() => ({
|
|
346
|
+
handleFileChange: A,
|
|
347
347
|
handleBlur: u,
|
|
348
|
-
handleDelete:
|
|
348
|
+
handleDelete: w,
|
|
349
349
|
files: g,
|
|
350
|
-
accept:
|
|
351
|
-
limitReached:
|
|
352
|
-
multiple:
|
|
350
|
+
accept: j,
|
|
351
|
+
limitReached: Q,
|
|
352
|
+
multiple: q,
|
|
353
353
|
getExplanationText: y,
|
|
354
354
|
getStatusText: N,
|
|
355
355
|
hover: I,
|
|
@@ -357,27 +357,27 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
357
357
|
buttonRef: c,
|
|
358
358
|
fileRemoveButtonRefs: T
|
|
359
359
|
}), [
|
|
360
|
-
|
|
360
|
+
A,
|
|
361
361
|
u,
|
|
362
|
-
|
|
362
|
+
w,
|
|
363
363
|
g,
|
|
364
|
-
K,
|
|
365
|
-
J,
|
|
366
364
|
j,
|
|
365
|
+
Q,
|
|
366
|
+
q,
|
|
367
367
|
y,
|
|
368
368
|
N,
|
|
369
369
|
I,
|
|
370
370
|
B
|
|
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),
|
|
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
372
|
return Se(() => {
|
|
373
|
-
var
|
|
373
|
+
var P, G;
|
|
374
374
|
if (c.current) {
|
|
375
375
|
c.current.focus({
|
|
376
376
|
preventScroll: !0
|
|
377
377
|
});
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
(
|
|
380
|
+
(G = (P = g.map((H) => T.current[J(H)]).find((H) => H == null ? void 0 : H.current)) == null ? void 0 : P.current) == null || G.focus({
|
|
381
381
|
preventScroll: !0
|
|
382
382
|
});
|
|
383
383
|
}, r), /* @__PURE__ */ t.createElement(be.Provider, {
|
|
@@ -386,8 +386,8 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
386
386
|
fieldId: r,
|
|
387
387
|
renderLabel: () => h,
|
|
388
388
|
renderInput: () => f ?? _,
|
|
389
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
390
|
-
hasError: !!(
|
|
389
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, Y(ae, {
|
|
390
|
+
hasError: !!(x || B),
|
|
391
391
|
errorMessage: B ?? p
|
|
392
392
|
}), /* @__PURE__ */ t.createElement(ke, {
|
|
393
393
|
role: "status",
|
|
@@ -395,21 +395,21 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
395
395
|
"aria-atomic": "true"
|
|
396
396
|
}, n("form.file-upload.explanation-text", {
|
|
397
397
|
count: g.length
|
|
398
|
-
})), F, b,
|
|
398
|
+
})), F, b, U)
|
|
399
399
|
}));
|
|
400
400
|
}, rt = ({ className: e, showUploadStatusOnly: n }) => {
|
|
401
|
-
const { files: r, getExplanationText: l, getStatusText: s } =
|
|
401
|
+
const { files: r, getExplanationText: l, getStatusText: s } = K(), d = n ? s() : l();
|
|
402
402
|
return r.length === 1 || !d ? null : /* @__PURE__ */ t.createElement("p", {
|
|
403
403
|
className: e
|
|
404
404
|
}, d);
|
|
405
405
|
};
|
|
406
|
-
a.Label =
|
|
406
|
+
a.Label = qe;
|
|
407
407
|
a.DropZone = z;
|
|
408
408
|
a.Button = oe;
|
|
409
409
|
a.Explanation = rt;
|
|
410
410
|
a.Files = le;
|
|
411
|
-
a.Description =
|
|
412
|
-
a.Error =
|
|
411
|
+
a.Description = Ke;
|
|
412
|
+
a.Error = je;
|
|
413
413
|
const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
414
414
|
viewBox: "0 0 24 24",
|
|
415
415
|
width: 24,
|
|
@@ -484,10 +484,10 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
484
484
|
removeButton: ht,
|
|
485
485
|
spinner: _t,
|
|
486
486
|
fileError: Lt
|
|
487
|
-
},
|
|
487
|
+
}, Ct = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(Ce, {
|
|
488
488
|
content: e,
|
|
489
489
|
locale: n
|
|
490
|
-
}),
|
|
490
|
+
}), xt = () => {
|
|
491
491
|
var B, I, y, N;
|
|
492
492
|
const { t: e } = re(), { disabled: n, readOnly: r } = V(), l = !n && !r, s = me({
|
|
493
493
|
globalClasses: de,
|
|
@@ -501,7 +501,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
501
501
|
base: D.button,
|
|
502
502
|
hover: D.buttonHover
|
|
503
503
|
}
|
|
504
|
-
}), E = (N = (y = (I = (B = Be().fileUpload) == null ? void 0 : B.elementProps) == null ? void 0 : I.uploadButton) == null ? void 0 : y.elementProps) == null ? void 0 : N.icon, { wix:
|
|
504
|
+
}), E = (N = (y = (I = (B = Be().fileUpload) == null ? void 0 : B.elementProps) == null ? void 0 : I.uploadButton) == null ? void 0 : y.elementProps) == null ? void 0 : N.icon, { wix: C, className: o, ...i } = E ?? {}, x = ye(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), p = k(null), [m, c] = W(!1), [T, v] = W(!1), O = M(() => {
|
|
505
505
|
var u;
|
|
506
506
|
c(!0), (u = p.current) == null || u.runAnimationForward();
|
|
507
507
|
}, []), g = M(() => {
|
|
@@ -509,14 +509,14 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
509
509
|
c(!1), (u = p.current) == null || u.runAnimationBackward();
|
|
510
510
|
}, []);
|
|
511
511
|
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
512
|
-
className:
|
|
512
|
+
className: R(Ie, $.label)
|
|
513
513
|
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
514
|
-
className:
|
|
514
|
+
className: R(Ae, $.requiredMark)
|
|
515
515
|
})), /* @__PURE__ */ t.createElement(a.DropZone, {
|
|
516
|
-
className: ({ isHovered: u, isFocused:
|
|
516
|
+
className: ({ isHovered: u, isFocused: A, isDropTarget: S }) => s({
|
|
517
517
|
isSelected: !1,
|
|
518
518
|
isHovered: u || S,
|
|
519
|
-
isFocused:
|
|
519
|
+
isFocused: A,
|
|
520
520
|
isInteractive: l
|
|
521
521
|
})
|
|
522
522
|
}, /* @__PURE__ */ t.createElement(a.DropZone.Title, {
|
|
@@ -524,10 +524,10 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
524
524
|
}, ({ limitReached: u }) => e(u ? "file-upload.dropzone.limit-reached.title" : "file-upload.dropzone.title")), /* @__PURE__ */ t.createElement(a.DropZone.Subtitle, {
|
|
525
525
|
className: D.dropZoneSubtitle
|
|
526
526
|
}, ({ limitReached: u }) => e(u ? "file-upload.dropzone.limit-reached.subtitle" : "file-upload.dropzone.subtitle")), /* @__PURE__ */ t.createElement(a.DropZone.Button, {
|
|
527
|
-
className: ({ isHovered: u, isFocused:
|
|
527
|
+
className: ({ isHovered: u, isFocused: A }) => d({
|
|
528
528
|
isSelected: !1,
|
|
529
529
|
isHovered: u,
|
|
530
|
-
isFocused:
|
|
530
|
+
isFocused: A,
|
|
531
531
|
isInteractive: l
|
|
532
532
|
}),
|
|
533
533
|
"aria-roledescription": e("file-upload.aria-roledescription"),
|
|
@@ -537,18 +537,18 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
537
537
|
}, i.svg ? /* @__PURE__ */ t.createElement(Le, {
|
|
538
538
|
...i,
|
|
539
539
|
ref: p,
|
|
540
|
-
className:
|
|
540
|
+
className: R(Re, Ze, o)
|
|
541
541
|
}) : E ? null : /* @__PURE__ */ t.createElement(ot, null), /* @__PURE__ */ t.createElement(a.DropZone.Button.Text, {
|
|
542
|
-
className:
|
|
542
|
+
className: R(ce.base, D.buttonLabel, x, {
|
|
543
543
|
[ce.hover]: l && (m || T)
|
|
544
544
|
})
|
|
545
545
|
}))), /* @__PURE__ */ t.createElement(a.Explanation, {
|
|
546
|
-
className:
|
|
546
|
+
className: R(ue, $.description, D.explanation),
|
|
547
547
|
showUploadStatusOnly: !0
|
|
548
548
|
}), /* @__PURE__ */ t.createElement(a.Files, {
|
|
549
549
|
className: D.files
|
|
550
550
|
}, /* @__PURE__ */ t.createElement(a.Files.File, {
|
|
551
|
-
className:
|
|
551
|
+
className: R(de.base, D.file)
|
|
552
552
|
}, /* @__PURE__ */ t.createElement(a.Files.File.Name, {
|
|
553
553
|
className: D.fileName
|
|
554
554
|
}), /* @__PURE__ */ t.createElement(a.Files.File.Spinner, {
|
|
@@ -558,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: R(pe, $.error, D.fileError)
|
|
562
562
|
}, /* @__PURE__ */ t.createElement(lt, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
|
|
563
|
-
className:
|
|
564
|
-
},
|
|
565
|
-
className:
|
|
563
|
+
className: R(ue, $.description)
|
|
564
|
+
}, Ct), /* @__PURE__ */ t.createElement(a.Error, {
|
|
565
|
+
className: R(pe, $.error)
|
|
566
566
|
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
|
|
567
|
-
},
|
|
567
|
+
}, wt = () => /* @__PURE__ */ t.createElement(xt, null);
|
|
568
568
|
export {
|
|
569
|
-
|
|
569
|
+
wt as FileUploadRAC
|
|
570
570
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as A } from "react";
|
|
2
|
+
import { RicosViewer as _ } from "@wix/ricos/viewer";
|
|
3
3
|
import u from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { bA as C, bs as I, bx as P, W as x, R, G as S } from "./form-BUqSKOvc.js";
|
|
5
5
|
import { f as c, a as N } 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-
|
|
7
|
+
import { D as v, E as M } from "./field-error-headless-XnVcMmsL.js";
|
|
8
|
+
import { L as g } from "./field-label-headless-BRTLT2Yt.js";
|
|
9
9
|
import { s as F } from "./field-rac.module-DP0lkkEv.js";
|
|
10
10
|
const e = ({ children: r }) => {
|
|
11
11
|
var p;
|
|
12
|
-
const { id: a, validation: n, FieldLayout: l } = C(), { currency: o, regionalFormat: m } = I(), s =
|
|
12
|
+
const { id: a, validation: n, FieldLayout: l } = C(), { currency: o, regionalFormat: m } = I(), s = A(() => {
|
|
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
|
}, [
|
|
@@ -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
|
-
}, w = ({ content: r, locale: a }) => /* @__PURE__ */ t.createElement(
|
|
49
|
+
}, w = ({ content: r, locale: a }) => /* @__PURE__ */ t.createElement(_, {
|
|
50
50
|
content: r,
|
|
51
51
|
locale: a
|
|
52
|
-
}),
|
|
53
|
-
className: u(
|
|
52
|
+
}), G = () => /* @__PURE__ */ t.createElement(e, null, /* @__PURE__ */ t.createElement(e.Label, {
|
|
53
|
+
className: u(x, F.label)
|
|
54
54
|
}), /* @__PURE__ */ t.createElement(e.Amount, {
|
|
55
|
-
className: u(
|
|
55
|
+
className: u(R, k.value)
|
|
56
56
|
}), /* @__PURE__ */ t.createElement(e.Description, {
|
|
57
|
-
className: u(
|
|
58
|
-
}, w)),
|
|
57
|
+
className: u(S, F.description)
|
|
58
|
+
}, w)), K = () => /* @__PURE__ */ t.createElement(G, null);
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
K as FixedPaymentRAC
|
|
61
61
|
};
|