@wix/form-elements 1.126.0 → 1.127.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-CYB_k6uF.js → appointment-rac-BrC7gcpn.js} +5 -5
- package/dist/component/{bookings-address-rac-yJjV3u5m.js → bookings-address-rac-D-UmBxjD.js} +1 -1
- package/dist/component/{bookings-email-rac-WkFgaEv5.js → bookings-email-rac-CjHDzU0Q.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CJ1cBR5Z.js → bookings-first-name-rac-ChBkkkWm.js} +1 -1
- package/dist/component/{bookings-header-rac-DiC19ttR.js → bookings-header-rac-ERfGeYyw.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Dx0Nt5Z_.js → bookings-last-name-rac-CuTJ7Y8w.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CcW2nUYQ.js → bookings-login-bar-rac-pudlQ67l.js} +6 -6
- package/dist/component/{bookings-phone-rac-BMLrrTf6.js → bookings-phone-rac-nLPnLRfS.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DIbRjzxZ.js → bookings-rich-text-rac-DOmGQlyG.js} +1 -1
- package/dist/component/{checkbox-field-rac-3a6NYcNf.js → checkbox-field-rac-DLazY-iO.js} +45 -45
- package/dist/component/{checkbox-group-field-headless-CM-2wLJv.js → checkbox-group-field-headless-CPyWmFBH.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CNWwJ_No.js → checkbox-group-field-rac-Bir3gaI9.js} +6 -6
- package/dist/component/{checkbox-group-rac-F08XYJSA.js → checkbox-group-rac-BGXUl-sJ.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-DOAYUQ_Q.js → checkbox-indicator-module-classes-Bqo0QILF.js} +1 -1
- package/dist/component/{checkbox-rac-z98USBLu.js → checkbox-rac-D_wZVUFV.js} +1 -1
- package/dist/component/{contacts-address-rac-DuodyS7l.js → contacts-address-rac-CNldSQbf.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BY7L9nWm.js → contacts-birthdate-rac-AVyldaRF.js} +1 -1
- package/dist/component/{contacts-company-rac-iPNPKhx2.js → contacts-company-rac-CiP1Ctpa.js} +1 -1
- package/dist/component/{contacts-email-rac-C7kBUzQH.js → contacts-email-rac-CzjMVEJZ.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DvDNRs2q.js → contacts-first-name-rac-G0kE0HmA.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cls5_7W0.js → contacts-last-name-rac-cnTTtnMZ.js} +1 -1
- package/dist/component/{contacts-phone-rac-DMy2lBJl.js → contacts-phone-rac-DJ9oxox4.js} +1 -1
- package/dist/component/{contacts-position-rac-Bn21lF_i.js → contacts-position-rac-e0uQ-eqL.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-QSC_n_T_.js → contacts-subscribe-rac-D4J2x78f.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BvqoePCN.js → contacts-tax-id-rac-DwJuNH-C.js} +1 -1
- package/dist/component/{date-availability-SErYnVtm.js → date-availability-D2BSwZ_r.js} +1 -1
- package/dist/component/{date-input-field-rac-H81WktJT.js → date-input-field-rac-ztJ02C60.js} +42 -42
- package/dist/component/{date-input-rac-C6ZeK0zQ.js → date-input-rac-D-SFsC6P.js} +1 -1
- package/dist/component/{date-picker-field-rac-BwSKny80.js → date-picker-field-rac-DaNwsa8z.js} +15 -15
- package/dist/component/{date-picker-rac-BB5zswk4.js → date-picker-rac-Bn0sA6P1.js} +1 -1
- package/dist/component/{date-time-input-field-rac-C4srGo4X.js → date-time-input-field-rac-D-ArMpcJ.js} +64 -64
- package/dist/component/{date-time-input-rac-6PXunNeR.js → date-time-input-rac-qYLa3IDx.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B1GOhxW8.js → dext-checkbox-group-rac-Dir6tyvo.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DVels76t.js → dext-checkbox-rac-ByiMc3BH.js} +1 -1
- package/dist/component/{dext-date-picker-rac-kKH7Nu_c.js → dext-date-picker-rac-BwOozu5y.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C2xk0pv1.js → dext-date-time-input-rac-CaJEzZa4.js} +1 -1
- package/dist/component/{dext-dropdown-rac-bd3XpA-l.js → dext-dropdown-rac-DJnMjggU.js} +1 -1
- package/dist/component/{dext-email-rac-BtEeJsrT.js → dext-email-rac-CF4SQ86l.js} +1 -1
- package/dist/component/{dext-number-input-rac-BLPAbm2q.js → dext-number-input-rac--3goVI8C.js} +1 -1
- package/dist/component/{dext-phone-rac-ByEP8XRg.js → dext-phone-rac-MYJYG040.js} +1 -1
- package/dist/component/{dext-radio-group-rac-AY271KFi.js → dext-radio-group-rac-Q2J5Hk5W.js} +4 -4
- package/dist/component/{dext-rating-input-rac-Dp9N8OWT.js → dext-rating-input-rac-CAWhD-lI.js} +1 -1
- package/dist/component/{dext-tags-rac-PgZGGDwj.js → dext-tags-rac-DyxI5ooy.js} +4 -4
- package/dist/component/{dext-text-area-rac-BN99TM9O.js → dext-text-area-rac-CZpM-r49.js} +1 -1
- package/dist/component/{dext-text-input-rac-C5TaQVi8.js → dext-text-input-rac-Bv5Mhyw6.js} +1 -1
- package/dist/component/{dext-url-input-rac-BvMh_jc6.js → dext-url-input-rac-BkbTjbAI.js} +1 -1
- package/dist/component/{donation-rac-BSCyAZPx.js → donation-rac-DZjFeJFy.js} +36 -36
- package/dist/component/{dropdown-field-headless-DzDE-6ha.js → dropdown-field-headless-C7l2TQYy.js} +16 -16
- package/dist/component/{dropdown-field-rac-mbYavQtS.js → dropdown-field-rac-DOAlecw8.js} +5 -5
- package/dist/component/{dropdown-rac-BUJag5ow.js → dropdown-rac-D8HtaeBe.js} +1 -1
- package/dist/component/{ecom-address-rac-B7_RYjoj.js → ecom-address-rac-B25o-GVv.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BCDyH7x-.js → ecom-subscription-checkbox-rac-NvdWnD0v.js} +2 -2
- package/dist/component/{email-input-field-rac-CUi08-gD.js → email-input-field-rac-rWyojsu0.js} +19 -19
- package/dist/component/{events-repeater-rac-CkHq7ADr.js → events-repeater-rac-D2HvNt0y.js} +11 -11
- package/dist/component/{events-rsvp-rac-DBwLvDeR.js → events-rsvp-rac-D4WLn0Bx.js} +4 -4
- package/dist/component/{field-error-headless-Ct41F8cQ.js → field-error-headless-DU0YsEXR.js} +6 -6
- package/dist/component/{field-label-headless-DUqBV42_.js → field-label-headless-CvdTZi6i.js} +1 -1
- package/dist/component/field-rac.module-BIBNQEOK.js +25 -0
- package/dist/component/{file-upload-rac-CkbjhtAl.js → file-upload-rac-CMelyfA8.js} +68 -68
- package/dist/component/{fixed-payment-rac-Dgnhsx3e.js → fixed-payment-rac-CewsqE-k.js} +9 -9
- package/dist/component/{form-Dx1bK3Fi.js → form-D9IxiDXP.js} +668 -617
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/{header-field-rac-BuUxOZO1.js → header-field-rac-CYBfb_5D.js} +6 -6
- package/dist/component/{header-rac-CIvWVvYs.js → header-rac-BIq3DmbL.js} +1 -1
- package/dist/component/{image-choice-rac-BBo0PiW4.js → image-choice-rac-aOObRIMi.js} +12 -12
- package/dist/component/{index-BDSs3l4d.js → index-BXqA4oNj.js} +15 -15
- package/dist/component/{index-BmMiwDw9.js → index-D-g3wQ-z.js} +43 -43
- package/dist/component/{isObjectLike-xZCFQW_t.js → isObjectLike-BNDXzCto.js} +7 -7
- package/dist/component/{multiline-address-field-rac-C6mRorOw.js → multiline-address-field-rac-BcTa7Von.js} +8 -8
- package/dist/component/{multiline-address-rac-BOjsVo4R.js → multiline-address-rac-Cd_BFreP.js} +1 -1
- package/dist/component/{number-input-field-rac-C89M-zOh.js → number-input-field-rac-_JlH34_3.js} +9 -9
- package/dist/component/{number-input-rac-DttY0Ll3.js → number-input-rac-CiM20ScT.js} +1 -1
- package/dist/component/{password-rac-C2KTrH40.js → password-rac-DrpXSY74.js} +32 -32
- package/dist/component/{payment-input-rac-BhyBxeu1.js → payment-input-rac-RnMeVWDc.js} +15 -15
- package/dist/component/{phone-input-field-rac-BT-Fe6WZ.js → phone-input-field-rac-nNp7D7gK.js} +39 -39
- package/dist/component/{phone-rac-B26qwlDN.js → phone-rac-B2JjPT2w.js} +1 -1
- package/dist/component/{product-list-rac-CF4gkfTK.js → product-list-rac-Cv_fjFn3.js} +28 -28
- package/dist/component/{quiz-radio-group-rac-Bf2HeDDw.js → quiz-radio-group-rac-CNqF6Tq3.js} +1 -1
- package/dist/component/{radio-button-module-classes-DtmmP89u.js → radio-button-module-classes-vqR4TN-z.js} +3 -3
- package/dist/component/{radio-group-field-rac-BY2OIFFr.js → radio-group-field-rac-Bpyr40q-.js} +5 -5
- package/dist/component/{radio-group-rac-BuxVel2l.js → radio-group-rac-DBLPP0YC.js} +1 -1
- package/dist/component/{rating-input-field-rac-CbLzvwyk.js → rating-input-field-rac-BOi0G37L.js} +10 -10
- package/dist/component/{rating-input-rac-B8QxNYHU.js → rating-input-rac-CxpmV0Pa.js} +1 -1
- package/dist/component/{rich-content-rac.module-wu4JPlkg.js → rich-content-rac.module-Dmm9GyQq.js} +1 -1
- package/dist/component/{rich-text-field-rac-CTrEe0SQ.js → rich-text-field-rac-C466OrTf.js} +9 -9
- package/dist/component/{rich-text-rac-kmzPTMKb.js → rich-text-rac-BvVxD7oJ.js} +1 -1
- package/dist/component/{service-dropdown-rac-C8nTy49F.js → service-dropdown-rac-pmUKH0sP.js} +14 -14
- package/dist/component/{services-multi-choice-rac-rDkpN2fs.js → services-multi-choice-rac-B65i6q2D.js} +7 -7
- package/dist/component/signature-rac-BRyM06Vz.js +918 -0
- package/dist/component/{submit-button-rac-BFywt2Fn.js → submit-button-rac-DaCRjZlQ.js} +15 -15
- package/dist/component/{tags-field-rac-rpzvIn_0.js → tags-field-rac-CEdfh-EQ.js} +17 -17
- package/dist/component/{tags-rac-DVLGSSvh.js → tags-rac-CGSTQ0qK.js} +1 -1
- package/dist/component/{text-area-field-rac-BfVrtvl8.js → text-area-field-rac-C-EHPWwQ.js} +15 -15
- package/dist/component/{text-area-rac-VP-yXdJ6.js → text-area-rac-Df1nSb2q.js} +1 -1
- package/dist/component/{text-input-field-rac-BlaXiXoF.js → text-input-field-rac-DmCZtBi_.js} +4 -4
- package/dist/component/{text-input-headless-ChCTtqUX.js → text-input-headless-DAxEZP1P.js} +8 -8
- package/dist/component/{text-input-rac-CG-Oo3nZ.js → text-input-rac-DgpO17dl.js} +1 -1
- package/dist/component/{time-input-rac-CzUGIr2X.js → time-input-rac-Dld_tLub.js} +10 -10
- package/dist/component/{url-input-field-rac-BHF6gZlT.js → url-input-field-rac-DHZ6bpxZ.js} +10 -10
- package/dist/component/{url-input-rac-DouQt3DF.js → url-input-rac-CZlWy5RB.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-AklIMCCI.js → use-dropdown-option-class-name-opBd-YJA.js} +3 -3
- package/dist/component/{use-dropdown-trigger-class-name-COJhxT4T.js → use-dropdown-trigger-class-name-BGQH0WCO.js} +10 -10
- package/dist/component/use-element-state-class-name-B2ecLjwN.js +20 -0
- package/dist/component/{use-hoverable-input-class-name-CtHJHqiV.js → use-hoverable-input-class-name-B42rAp82.js} +3 -3
- package/dist/component/{use-service-options-base-2u1I6l-t.js → use-service-options-base-D60-jNUT.js} +4 -4
- package/dist/component/use-text-input-class-name-DGpCdZ_e.js +6 -0
- package/dist/form.d.ts +10 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DQxyEwK7.js +0 -26
- package/dist/component/signature-rac-6r_gWBD2.js +0 -794
- package/dist/component/use-element-state-class-name-CCe7Cvsu.js +0 -22
- package/dist/component/use-text-input-class-name-Bnfv7ZsJ.js +0 -6
|
@@ -2,14 +2,14 @@ import t, { useState as J, useRef as H, useMemo as fe, useEffect as ne, useCallb
|
|
|
2
2
|
import _e from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import { RicosViewer as Ce } from "@wix/ricos/viewer";
|
|
4
4
|
import R from "classnames";
|
|
5
|
-
import {
|
|
5
|
+
import { bd as Le, br as re, bm as Ne, ak as ve, bp as De, ad as ie, bq as Te, be as Ee, bh as k, bj as Se, bb as Be, ba as ye, I as Ze, U as Re, b as Ae, a8 as Me, a9 as ce, p as de, u as ue, v as me, a7 as Ie, f as te } from "./form-D9IxiDXP.js";
|
|
6
6
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
-
import { s as K } from "./field-rac.module-
|
|
8
|
-
import { u as pe } from "./use-element-state-class-name-
|
|
7
|
+
import { s as K } from "./field-rac.module-BIBNQEOK.js";
|
|
8
|
+
import { u as pe } from "./use-element-state-class-name-B2ecLjwN.js";
|
|
9
9
|
import { DropZone as we, Text as Ue, FileTrigger as Pe, Button as be, ProgressBar as He, VisuallyHidden as je } from "react-aria-components";
|
|
10
10
|
import { f as C, a as $ } from "./find-child-C60k4CxG.js";
|
|
11
|
-
import { b as ke, a as ze, D as Ve, E as qe } from "./field-error-headless-
|
|
12
|
-
import { L as Ke } from "./field-label-headless-
|
|
11
|
+
import { b as ke, a as ze, D as Ve, E as qe } from "./field-error-headless-DU0YsEXR.js";
|
|
12
|
+
import { L as Ke } from "./field-label-headless-CvdTZi6i.js";
|
|
13
13
|
const $e = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
@@ -19,10 +19,10 @@ const $e = {
|
|
|
19
19
|
Model3D: ".gltf, .glb"
|
|
20
20
|
}, Ye = (e) => {
|
|
21
21
|
const { actions: n, formId: r } = Le();
|
|
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 (a, s, u) => {
|
|
23
|
+
if (!(n != null && n.uploadFile) || !a.length)
|
|
24
|
+
return n != null && n.uploadFile || console.error("No uploadFile action"), a.length || console.error("No files to upload"), [];
|
|
25
|
+
const E = a.map(({ file: o }) => n.uploadFile({
|
|
26
26
|
file: o,
|
|
27
27
|
formId: r,
|
|
28
28
|
uploadTarget: e
|
|
@@ -43,18 +43,18 @@ const $e = {
|
|
|
43
43
|
return (await Promise.all(E)).filter((o) => o !== void 0);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
function We({ valueSliderLimit: e, value: n, explanationText: r, target:
|
|
47
|
-
const [o, i] = J(Qe(n)), [N, m] = J(n || []), [p, d] = J(), v = Ye(
|
|
46
|
+
function We({ valueSliderLimit: e, value: n, explanationText: r, target: a, onChange: s, uploadFileFormats: u, onBlur: E, onFilesCleared: L }) {
|
|
47
|
+
const [o, i] = J(Qe(n)), [N, m] = J(n || []), [p, d] = J(), v = Ye(a), { t: h } = re(), F = Ne().includes(ve.BUTTONS_HOVER), { setFormStatus: T } = De(), y = H(!1), c = H(s);
|
|
48
48
|
c.current = s;
|
|
49
49
|
const S = fe(() => o.some((f) => f.state === "uploading"), [
|
|
50
50
|
o
|
|
51
51
|
]);
|
|
52
52
|
ne(() => {
|
|
53
|
-
y.current !== S && (y.current = S, T(
|
|
53
|
+
y.current !== S && (y.current = S, T(a, S ? ie.BUSY : ie.READY));
|
|
54
54
|
}, [
|
|
55
55
|
S,
|
|
56
56
|
T,
|
|
57
|
-
|
|
57
|
+
a
|
|
58
58
|
]);
|
|
59
59
|
const Z = M(() => {
|
|
60
60
|
if (!o.length)
|
|
@@ -167,7 +167,7 @@ function z() {
|
|
|
167
167
|
return e;
|
|
168
168
|
}
|
|
169
169
|
const j = ({ children: e, className: n }) => {
|
|
170
|
-
const { ariaDescribedBy: r } = Ee(), { disabled:
|
|
170
|
+
const { ariaDescribedBy: r } = Ee(), { disabled: a, hasError: s } = k(), { handleFileChange: u, limitReached: E } = z();
|
|
171
171
|
if (E)
|
|
172
172
|
return null;
|
|
173
173
|
const L = C(e, j.Title), o = C(e, j.Subtitle), i = C(e, j.Button);
|
|
@@ -175,7 +175,7 @@ const j = ({ children: e, className: n }) => {
|
|
|
175
175
|
"aria-describedby": r,
|
|
176
176
|
className: n,
|
|
177
177
|
"data-invalid": s,
|
|
178
|
-
isDisabled:
|
|
178
|
+
isDisabled: a,
|
|
179
179
|
onDrop: async (N) => {
|
|
180
180
|
const m = [];
|
|
181
181
|
for (const p of N.items)
|
|
@@ -199,13 +199,13 @@ const j = ({ children: e, className: n }) => {
|
|
|
199
199
|
limitReached: r
|
|
200
200
|
}));
|
|
201
201
|
}, Je = ({ className: e, children: n }) => {
|
|
202
|
-
const { limitReached: r } = z(), { explanationText:
|
|
202
|
+
const { limitReached: r } = z(), { explanationText: a } = k();
|
|
203
203
|
return /* @__PURE__ */ t.createElement("p", {
|
|
204
204
|
className: e
|
|
205
|
-
},
|
|
205
|
+
}, a || n({
|
|
206
206
|
limitReached: r
|
|
207
207
|
}));
|
|
208
|
-
}, oe = ({ className: e, children: n, "aria-roledescription": r, onHoverStart:
|
|
208
|
+
}, oe = ({ className: e, children: n, "aria-roledescription": r, onHoverStart: a, onHoverEnd: s }) => {
|
|
209
209
|
const { ariaDescribedBy: u, inputId: E, labelId: L, errorId: o } = Ee(), { disabled: i, required: N, onFocus: m, hasError: p, errorMessage: d } = k(), { handleFileChange: v, accept: h, multiple: I, buttonRef: F, handleBlur: T, limitError: y, files: c } = z(), S = (c == null ? void 0 : c.some((B) => B.errorMessage)) ?? !1, Z = !!(p || d || y || S);
|
|
210
210
|
return /* @__PURE__ */ t.createElement(Pe, {
|
|
211
211
|
acceptedFileTypes: h ? h.split(",") : void 0,
|
|
@@ -234,7 +234,7 @@ const j = ({ children: e, className: n }) => {
|
|
|
234
234
|
className: e,
|
|
235
235
|
onFocus: m,
|
|
236
236
|
onBlur: T,
|
|
237
|
-
onHoverStart:
|
|
237
|
+
onHoverStart: a,
|
|
238
238
|
onHoverEnd: s
|
|
239
239
|
}, n));
|
|
240
240
|
}, Xe = ({ className: e }) => {
|
|
@@ -248,24 +248,24 @@ j.Title = Ge;
|
|
|
248
248
|
j.Subtitle = Je;
|
|
249
249
|
j.Button = oe;
|
|
250
250
|
const A = ({ children: e, className: n, ...r }) => {
|
|
251
|
-
const { file:
|
|
251
|
+
const { file: a, index: s } = r, u = a.file.name, E = C(e, A.Name), L = C(e, A.Remove), o = C(e, A.Spinner), i = C(e, A.Error);
|
|
252
252
|
return /* @__PURE__ */ t.createElement("div", {
|
|
253
253
|
className: n
|
|
254
254
|
}, $(E, {
|
|
255
255
|
fileName: u
|
|
256
|
-
}),
|
|
256
|
+
}), a.state === "uploading" ? o : $(L, {
|
|
257
257
|
index: s,
|
|
258
258
|
fileName: u
|
|
259
|
-
}),
|
|
260
|
-
errorMessage:
|
|
259
|
+
}), a.errorMessage && $(i, {
|
|
260
|
+
errorMessage: a.errorMessage
|
|
261
261
|
}));
|
|
262
262
|
}, et = ({ className: e, ...n }) => {
|
|
263
263
|
const { fileName: r } = n;
|
|
264
264
|
return /* @__PURE__ */ t.createElement("span", {
|
|
265
265
|
className: e
|
|
266
266
|
}, r);
|
|
267
|
-
}, tt = ({ className: e, "aria-label": n, children: r, ...
|
|
268
|
-
const { fileName: s, index: u } =
|
|
267
|
+
}, tt = ({ className: e, "aria-label": n, children: r, ...a }) => {
|
|
268
|
+
const { fileName: s, index: u } = a, { disabled: E } = k(), { handleDelete: L, fileRemoveButtonRefs: o } = z(), i = H(null);
|
|
269
269
|
ne(() => {
|
|
270
270
|
const m = o.current, p = s;
|
|
271
271
|
return m[p] = i, () => {
|
|
@@ -288,9 +288,9 @@ const A = ({ children: e, className: n, ...r }) => {
|
|
|
288
288
|
isDisabled: E
|
|
289
289
|
}, r);
|
|
290
290
|
}, ge = ({ className: e, children: n, ...r }) => {
|
|
291
|
-
const { errorMessage:
|
|
292
|
-
return
|
|
293
|
-
value:
|
|
291
|
+
const { errorMessage: a } = r;
|
|
292
|
+
return a ? /* @__PURE__ */ t.createElement(ze, {
|
|
293
|
+
value: a
|
|
294
294
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
295
295
|
className: e,
|
|
296
296
|
role: "alert"
|
|
@@ -305,23 +305,23 @@ A.Remove = tt;
|
|
|
305
305
|
A.Spinner = nt;
|
|
306
306
|
A.Error = ge;
|
|
307
307
|
ge.Text = ke;
|
|
308
|
-
const
|
|
309
|
-
const { files: r } = z(),
|
|
308
|
+
const ae = ({ children: e, className: n }) => {
|
|
309
|
+
const { files: r } = z(), a = C(e, ae.File);
|
|
310
310
|
return !r || r.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
311
311
|
className: n
|
|
312
|
-
}, r.map((s, u) => $(
|
|
312
|
+
}, r.map((s, u) => $(a, {
|
|
313
313
|
key: s.file.name || u,
|
|
314
314
|
file: s,
|
|
315
315
|
index: u
|
|
316
316
|
})));
|
|
317
317
|
};
|
|
318
|
-
|
|
319
|
-
const G = (e) => e.file.name,
|
|
320
|
-
const { t: n } = re(), { id: r, value:
|
|
318
|
+
ae.File = A;
|
|
319
|
+
const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
320
|
+
const { t: n } = re(), { id: r, value: a, onChange: s, uploadFileFormats: u, valueSliderLimit: E, target: L, explanationText: o, onBlur: i, hasError: N, errorMessage: m, FieldLayout: p } = k(), d = H(null), v = H({}), h = H(!1), I = M(() => {
|
|
321
321
|
d.current ? d.current.focus() : h.current = !0;
|
|
322
322
|
}, []), { files: F, limitError: T, hover: y, getExplanationText: c, getStatusText: S, handleBlur: Z, handleChange: B, handleDelete: V, accept: O } = We({
|
|
323
323
|
valueSliderLimit: E,
|
|
324
|
-
value:
|
|
324
|
+
value: a,
|
|
325
325
|
explanationText: o,
|
|
326
326
|
target: L,
|
|
327
327
|
onChange: s,
|
|
@@ -367,7 +367,7 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
367
367
|
S,
|
|
368
368
|
y,
|
|
369
369
|
T
|
|
370
|
-
]), x = C(e,
|
|
370
|
+
]), x = C(e, l.Label), f = C(e, l.DropZone), _ = C(e, l.Button), b = C(e, l.Explanation), g = C(e, l.Files), w = C(e, l.Description), le = C(e, l.Error);
|
|
371
371
|
return Se(() => {
|
|
372
372
|
var U, Q;
|
|
373
373
|
if (d.current) {
|
|
@@ -381,7 +381,7 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
381
381
|
fieldId: r,
|
|
382
382
|
renderLabel: () => x,
|
|
383
383
|
renderInput: () => f ?? _,
|
|
384
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, $(
|
|
384
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, $(le, {
|
|
385
385
|
hasError: !!(N || T),
|
|
386
386
|
errorMessage: T ?? m
|
|
387
387
|
}), /* @__PURE__ */ t.createElement(je, {
|
|
@@ -393,18 +393,18 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
393
393
|
})), b, g, w)
|
|
394
394
|
}));
|
|
395
395
|
}, rt = ({ className: e, showUploadStatusOnly: n }) => {
|
|
396
|
-
const { files: r, getExplanationText:
|
|
396
|
+
const { files: r, getExplanationText: a, getStatusText: s } = z(), u = n ? s() : a();
|
|
397
397
|
return r.length === 1 || !u ? null : /* @__PURE__ */ t.createElement("p", {
|
|
398
398
|
className: e
|
|
399
399
|
}, u);
|
|
400
400
|
};
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
401
|
+
l.Label = Ke;
|
|
402
|
+
l.DropZone = j;
|
|
403
|
+
l.Button = oe;
|
|
404
|
+
l.Explanation = rt;
|
|
405
|
+
l.Files = ae;
|
|
406
|
+
l.Description = Ve;
|
|
407
|
+
l.Error = qe;
|
|
408
408
|
const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
409
409
|
viewBox: "0 0 24 24",
|
|
410
410
|
width: 24,
|
|
@@ -414,7 +414,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
414
414
|
...e
|
|
415
415
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
416
416
|
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"
|
|
417
|
-
})),
|
|
417
|
+
})), at = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
418
418
|
viewBox: "0 0 24 24",
|
|
419
419
|
width: 24,
|
|
420
420
|
height: 24,
|
|
@@ -423,7 +423,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
423
423
|
...e
|
|
424
424
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
425
425
|
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"
|
|
426
|
-
})),
|
|
426
|
+
})), lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
427
427
|
viewBox: "0 0 24 24",
|
|
428
428
|
width: 24,
|
|
429
429
|
height: 24,
|
|
@@ -483,7 +483,7 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
483
483
|
locale: n
|
|
484
484
|
}), Ct = () => {
|
|
485
485
|
var I, F, T, y;
|
|
486
|
-
const { t: e } = re(), { disabled: n, readOnly: r } = k(),
|
|
486
|
+
const { t: e } = re(), { disabled: n, readOnly: r } = k(), a = !n && !r, s = pe({
|
|
487
487
|
globalClasses: ue,
|
|
488
488
|
moduleClasses: {
|
|
489
489
|
base: D.dropZone,
|
|
@@ -502,25 +502,25 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
502
502
|
var c;
|
|
503
503
|
d(!1), (c = m.current) == null || c.runAnimationBackward();
|
|
504
504
|
}, []);
|
|
505
|
-
return /* @__PURE__ */ t.createElement(
|
|
505
|
+
return /* @__PURE__ */ t.createElement(l, null, /* @__PURE__ */ t.createElement(l.Label, {
|
|
506
506
|
className: R(Ze, K.label)
|
|
507
|
-
}, /* @__PURE__ */ t.createElement(
|
|
507
|
+
}, /* @__PURE__ */ t.createElement(l.Label.Required, {
|
|
508
508
|
className: R(Re, K.requiredMark)
|
|
509
|
-
})), /* @__PURE__ */ t.createElement(
|
|
509
|
+
})), /* @__PURE__ */ t.createElement(l.DropZone, {
|
|
510
510
|
className: ({ isHovered: c, isDropTarget: S }) => s({
|
|
511
511
|
isSelected: !1,
|
|
512
512
|
isHovered: c || S,
|
|
513
|
-
isInteractive:
|
|
513
|
+
isInteractive: a
|
|
514
514
|
})
|
|
515
|
-
}, /* @__PURE__ */ t.createElement(
|
|
515
|
+
}, /* @__PURE__ */ t.createElement(l.DropZone.Title, {
|
|
516
516
|
className: D.dropZoneTitle
|
|
517
|
-
}, ({ limitReached: c }) => e(c ? "file-upload.dropzone.limit-reached.title" : "file-upload.dropzone.title")), /* @__PURE__ */ t.createElement(
|
|
517
|
+
}, ({ limitReached: c }) => e(c ? "file-upload.dropzone.limit-reached.title" : "file-upload.dropzone.title")), /* @__PURE__ */ t.createElement(l.DropZone.Subtitle, {
|
|
518
518
|
className: D.dropZoneSubtitle
|
|
519
|
-
}, ({ limitReached: c }) => e(c ? "file-upload.dropzone.limit-reached.subtitle" : "file-upload.dropzone.subtitle")), /* @__PURE__ */ t.createElement(
|
|
519
|
+
}, ({ limitReached: c }) => e(c ? "file-upload.dropzone.limit-reached.subtitle" : "file-upload.dropzone.subtitle")), /* @__PURE__ */ t.createElement(l.DropZone.Button, {
|
|
520
520
|
className: ({ isHovered: c }) => u({
|
|
521
521
|
isSelected: !1,
|
|
522
522
|
isHovered: c,
|
|
523
|
-
isInteractive:
|
|
523
|
+
isInteractive: a
|
|
524
524
|
}),
|
|
525
525
|
"aria-roledescription": e("file-upload.aria-roledescription"),
|
|
526
526
|
onHoverStart: v,
|
|
@@ -529,32 +529,32 @@ const ot = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
529
529
|
...i,
|
|
530
530
|
ref: m,
|
|
531
531
|
className: R(Ae, Me, o)
|
|
532
|
-
}) : E ? null : /* @__PURE__ */ t.createElement(ot, null), /* @__PURE__ */ t.createElement(
|
|
532
|
+
}) : E ? null : /* @__PURE__ */ t.createElement(ot, null), /* @__PURE__ */ t.createElement(l.DropZone.Button.Text, {
|
|
533
533
|
className: R(ce.base, N, {
|
|
534
|
-
[ce.hover]:
|
|
534
|
+
[ce.hover]: a && p
|
|
535
535
|
})
|
|
536
|
-
}))), /* @__PURE__ */ t.createElement(
|
|
536
|
+
}))), /* @__PURE__ */ t.createElement(l.Explanation, {
|
|
537
537
|
className: R(de, K.description, D.explanation),
|
|
538
538
|
showUploadStatusOnly: !0
|
|
539
|
-
}), /* @__PURE__ */ t.createElement(
|
|
539
|
+
}), /* @__PURE__ */ t.createElement(l.Files, {
|
|
540
540
|
className: D.files
|
|
541
|
-
}, /* @__PURE__ */ t.createElement(
|
|
541
|
+
}, /* @__PURE__ */ t.createElement(l.Files.File, {
|
|
542
542
|
className: R(ue.base, D.file)
|
|
543
|
-
}, /* @__PURE__ */ t.createElement(
|
|
543
|
+
}, /* @__PURE__ */ t.createElement(l.Files.File.Name, {
|
|
544
544
|
className: D.fileName
|
|
545
|
-
}), /* @__PURE__ */ t.createElement(
|
|
545
|
+
}), /* @__PURE__ */ t.createElement(l.Files.File.Spinner, {
|
|
546
546
|
className: D.spinner,
|
|
547
547
|
"aria-label": e("file-upload.file.uploading-spinner.aria-label")
|
|
548
|
-
}, /* @__PURE__ */ t.createElement(st, null)), /* @__PURE__ */ t.createElement(
|
|
548
|
+
}, /* @__PURE__ */ t.createElement(st, null)), /* @__PURE__ */ t.createElement(l.Files.File.Remove, {
|
|
549
549
|
className: D.removeButton,
|
|
550
550
|
"aria-label": e("file-upload.delete-file.aria-label")
|
|
551
|
-
}, /* @__PURE__ */ t.createElement(
|
|
551
|
+
}, /* @__PURE__ */ t.createElement(lt, null)), /* @__PURE__ */ t.createElement(l.Files.File.Error, {
|
|
552
552
|
className: R(me, K.error, D.fileError)
|
|
553
|
-
}, /* @__PURE__ */ t.createElement(
|
|
553
|
+
}, /* @__PURE__ */ t.createElement(at, null), /* @__PURE__ */ t.createElement(l.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(l.Description, {
|
|
554
554
|
className: R(de, K.description)
|
|
555
|
-
}, _t), /* @__PURE__ */ t.createElement(
|
|
555
|
+
}, _t), /* @__PURE__ */ t.createElement(l.Error, {
|
|
556
556
|
className: R(me, K.error)
|
|
557
|
-
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(
|
|
557
|
+
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)));
|
|
558
558
|
}, Ot = () => /* @__PURE__ */ t.createElement(Ct, null);
|
|
559
559
|
export {
|
|
560
560
|
Ot as FileUploadRAC
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import t, { useMemo as _ } from "react";
|
|
2
2
|
import { RicosViewer as A } from "@wix/ricos/viewer";
|
|
3
3
|
import u from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { bh as C, b9 as I, be as P, I as O, J as S, p as x } from "./form-D9IxiDXP.js";
|
|
5
5
|
import { f as c, a as N } from "./find-child-C60k4CxG.js";
|
|
6
6
|
import { f as R } 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 L } from "./field-rac.module-
|
|
7
|
+
import { D as v, E as M } from "./field-error-headless-DU0YsEXR.js";
|
|
8
|
+
import { L as g } from "./field-label-headless-CvdTZi6i.js";
|
|
9
|
+
import { s as L } from "./field-rac.module-BIBNQEOK.js";
|
|
10
10
|
const e = ({ children: r }) => {
|
|
11
11
|
var p;
|
|
12
12
|
const { id: a, validation: n, FieldLayout: l } = C(), { currency: o, regionalFormat: m } = I(), s = _(() => {
|
|
@@ -44,18 +44,18 @@ e.Label = T;
|
|
|
44
44
|
e.Amount = B;
|
|
45
45
|
e.Description = v;
|
|
46
46
|
e.Error = M;
|
|
47
|
-
const V = "_value_c7203_1",
|
|
47
|
+
const V = "_value_c7203_1", h = {
|
|
48
48
|
value: V
|
|
49
|
-
},
|
|
49
|
+
}, k = ({ content: r, locale: a }) => /* @__PURE__ */ t.createElement(A, {
|
|
50
50
|
content: r,
|
|
51
51
|
locale: a
|
|
52
|
-
}),
|
|
52
|
+
}), w = () => /* @__PURE__ */ t.createElement(e, null, /* @__PURE__ */ t.createElement(e.Label, {
|
|
53
53
|
className: u(O, L.label)
|
|
54
54
|
}), /* @__PURE__ */ t.createElement(e.Amount, {
|
|
55
|
-
className: u(S,
|
|
55
|
+
className: u(S, h.value)
|
|
56
56
|
}), /* @__PURE__ */ t.createElement(e.Description, {
|
|
57
57
|
className: u(x, L.description)
|
|
58
|
-
},
|
|
58
|
+
}, k)), W = () => /* @__PURE__ */ t.createElement(w, null);
|
|
59
59
|
export {
|
|
60
60
|
W as FixedPaymentRAC
|
|
61
61
|
};
|