@wix/form-elements 1.146.0 → 1.147.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-scUix9QX.js → appointment-rac-BG5-bIZU.js} +98 -98
- package/dist/component/{bookings-address-rac-CKemkJOO.js → bookings-address-rac-8e8PqKsp.js} +1 -1
- package/dist/component/{bookings-email-rac-CDqdhPAB.js → bookings-email-rac-CtlnU8ws.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DEy_7Hjb.js → bookings-first-name-rac-CrivNlXM.js} +1 -1
- package/dist/component/{bookings-header-rac-Bl4xy9lB.js → bookings-header-rac-DWDAjfqq.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CsL9xQ1W.js → bookings-last-name-rac-qAthWem2.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DkHYQ4No.js → bookings-login-bar-rac-BNyUDqlM.js} +6 -6
- package/dist/component/{bookings-phone-rac-BoBiFwbV.js → bookings-phone-rac-Tc39XLr7.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DZZnPKWA.js → bookings-rich-text-rac-CPNaPtFK.js} +1 -1
- package/dist/component/{checkbox-field-rac-UgLmJxB-.js → checkbox-field-rac-DEa78Tpf.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-C809nB0Q.js → checkbox-group-field-headless-BxBaMg29.js} +68 -68
- package/dist/component/{checkbox-group-field-rac-u4i4wG21.js → checkbox-group-field-rac-CRRP03Qk.js} +7 -7
- package/dist/component/{checkbox-group-rac-DBAQhSo3.js → checkbox-group-rac-TOofMGl3.js} +1 -1
- package/dist/component/{checkbox-rac-FDQVsI5-.js → checkbox-rac-CHMHr8Ry.js} +1 -1
- package/dist/component/{contacts-address-rac-DnArylPa.js → contacts-address-rac-Bc5yDvTL.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C19jhGEO.js → contacts-birthdate-rac-Ubtg5ncv.js} +1 -1
- package/dist/component/{contacts-company-rac-Dxs0hs_i.js → contacts-company-rac-BksH9IoV.js} +1 -1
- package/dist/component/{contacts-email-rac-D-H43L8r.js → contacts-email-rac-DDPEtMAm.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DwV5NESk.js → contacts-first-name-rac-DUlCvEdx.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C5v2xurf.js → contacts-last-name-rac-BikqNgUr.js} +1 -1
- package/dist/component/{contacts-phone-rac-D9a5x-xl.js → contacts-phone-rac-B4OEgM_8.js} +1 -1
- package/dist/component/{contacts-position-rac-DfsgOv-k.js → contacts-position-rac-BfybzySV.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-B-Hho0Kb.js → contacts-subscribe-rac-CMHb33v1.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-q6TQkB4b.js → contacts-tax-id-rac-C-qEqwO5.js} +1 -1
- package/dist/component/{date-availability-CMDvf5VU.js → date-availability-DZ3J3LLm.js} +1 -1
- package/dist/component/{date-input-field-rac-C1WLUct3.js → date-input-field-rac-DeL5vuE7.js} +39 -39
- package/dist/component/{date-input-rac-cNQ-nr4D.js → date-input-rac-Di6TQvFf.js} +1 -1
- package/dist/component/{date-picker-field-rac-mx11z-MO.js → date-picker-field-rac-BcdpTkjV.js} +107 -103
- package/dist/component/{date-picker-rac-DeTz17zC.js → date-picker-rac-Brne65gr.js} +1 -1
- package/dist/component/{date-time-input-field-rac-feQ2E1eU.js → date-time-input-field-rac-BtQfAxRp.js} +49 -49
- package/dist/component/{date-time-input-rac-G0s0xP4v.js → date-time-input-rac-DM_HXiqV.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BcTN1nJb.js → dext-checkbox-group-rac-WTVwhGG0.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DX0TOrCO.js → dext-checkbox-rac-BR5YwmLQ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CpDp11oa.js → dext-date-picker-rac-DvDuRGYi.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BRvO8izU.js → dext-date-time-input-rac-C6RgbaVv.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DGZ4Yi_X.js → dext-dropdown-rac-CWjSdcZx.js} +1 -1
- package/dist/component/{dext-email-rac-B9YCFHB4.js → dext-email-rac-D-C1gVTq.js} +1 -1
- package/dist/component/{dext-number-input-rac-D890dBZf.js → dext-number-input-rac-YKzZS2ZG.js} +1 -1
- package/dist/component/{dext-phone-rac-BAQftbXo.js → dext-phone-rac-CFZlEH2a.js} +1 -1
- package/dist/component/dext-radio-group-rac-DiH0wIIl.js +18 -0
- package/dist/component/{dext-rating-input-rac-BqQKVaHo.js → dext-rating-input-rac-D0s-i0qO.js} +1 -1
- package/dist/component/{dext-tags-rac-zxxKcNUe.js → dext-tags-rac-Br48OQQ5.js} +2 -2
- package/dist/component/{dext-text-area-rac-Ctp9SwPg.js → dext-text-area-rac-6jG8gJ7i.js} +1 -1
- package/dist/component/{dext-text-input-rac-c_QMlyjr.js → dext-text-input-rac-FAJTCXuf.js} +1 -1
- package/dist/component/{dext-url-input-rac-96pv15aC.js → dext-url-input-rac-BoMP8sQB.js} +1 -1
- package/dist/component/{donation-rac-GEWKSLJY.js → donation-rac-DNi4p-v5.js} +69 -69
- package/dist/component/{dropdown-field-headless-C3OxMhLE.js → dropdown-field-headless-7SCC-xOC.js} +27 -27
- package/dist/component/{dropdown-field-rac-CCXfBmSc.js → dropdown-field-rac-CMzZh6J6.js} +8 -9
- package/dist/component/{dropdown-rac-CR7hswXE.js → dropdown-rac-qeugpHXY.js} +1 -1
- package/dist/component/{ecom-address-rac-khMuxEFD.js → ecom-address-rac-D8b_L5md.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CAi_AHpb.js → ecom-subscription-checkbox-rac-BnAuR9La.js} +5 -5
- package/dist/component/{email-input-field-rac-B83mY2lg.js → email-input-field-rac-CunXRyc5.js} +62 -62
- package/dist/component/{events-repeater-rac-ClEwXgmb.js → events-repeater-rac-DMjyIOkB.js} +17 -17
- package/dist/component/{events-rsvp-rac-BJ5q2SVR.js → events-rsvp-rac-BsuDPq2K.js} +8 -8
- package/dist/component/{field-error-headless-CsYQCsiT.js → field-error-headless-E8WjFr_n.js} +6 -6
- package/dist/component/{field-label-headless-Yg_1PMSg.js → field-label-headless-BakLOu5E.js} +15 -15
- package/dist/component/{file-upload-rac-DJsuI_lR.js → file-upload-rac-Clu_c--0.js} +43 -43
- package/dist/component/{fixed-payment-rac-BMFe9wxU.js → fixed-payment-rac-CzAXxsb-.js} +12 -12
- package/dist/component/{form-Bed4Kfz8.js → form-DHAKwnLt.js} +311 -305
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +2 -2
- package/dist/component/{header-field-rac-DPQTrOSZ.js → header-field-rac-CwmVpz3r.js} +4 -4
- package/dist/component/{header-rac-CzXsuLmE.js → header-rac-ahkGRjSy.js} +1 -1
- package/dist/component/{image-choice-rac-R_4pbOSr.js → image-choice-rac-BwxkkdUu.js} +17 -17
- package/dist/component/{index-qSZCe_WC.js → index-BFi_n6B7.js} +2 -2
- package/dist/component/{index-DZxHlvzt.js → index-BQf23zZi.js} +91 -91
- package/dist/component/{isObjectLike-B-a5uaU-.js → isObjectLike-DHcMRYYH.js} +15 -15
- package/dist/component/{multiline-address-field-rac-rv4IZZy_.js → multiline-address-field-rac-C6xaqNOk.js} +60 -60
- package/dist/component/{multiline-address-rac-DZ7cYtgn.js → multiline-address-rac-DF4TFuDx.js} +1 -1
- package/dist/component/{number-input-field-rac-CL9iXKIf.js → number-input-field-rac-uVJ3SBv2.js} +27 -27
- package/dist/component/{number-input-rac-BeGn6qJR.js → number-input-rac-D6ERhrSM.js} +1 -1
- package/dist/component/{password-rac-DfvhdsKG.js → password-rac-CAiC0ZKl.js} +23 -23
- package/dist/component/{payment-input-rac-BmMfi5rf.js → payment-input-rac-Bu25xvby.js} +26 -26
- package/dist/component/{phone-input-field-rac-DW0a1pXs.js → phone-input-field-rac-32qUvCsC.js} +45 -45
- package/dist/component/{phone-rac-quZjJ08H.js → phone-rac-mNrpj30q.js} +1 -1
- package/dist/component/{product-list-rac-Ci0KB7sN.js → product-list-rac-zHdM9rHw.js} +53 -53
- package/dist/component/{quiz-radio-group-rac--UUtGx2t.js → quiz-radio-group-rac-BaSlT8w3.js} +1 -1
- package/dist/component/{radio-button-module-classes-CqdBGknT.js → radio-button-module-classes-BdWjkBlX.js} +9 -9
- package/dist/component/{radio-group-field-rac-w8fHpFKJ.js → radio-group-field-rac-DI0UgTBr.js} +12 -12
- package/dist/component/{radio-group-rac-jO8aghii.js → radio-group-rac-D2ESG8J4.js} +1 -1
- package/dist/component/{rating-input-field-rac-BRc2PtqE.js → rating-input-field-rac-BYT2XqOK.js} +26 -26
- package/dist/component/{rating-input-rac-D9zs06xR.js → rating-input-rac-D-5CmVAX.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv3ZmD00.js → rich-content-rac.module-Dp9Advo9.js} +8 -8
- package/dist/component/{rich-text-field-rac-BmWuIfA8.js → rich-text-field-rac-COEUwoXQ.js} +4 -4
- package/dist/component/{rich-text-rac-BnqnrvB1.js → rich-text-rac-CQZLjBQ0.js} +1 -1
- package/dist/component/{service-dropdown-rac-Cl81KfJU.js → service-dropdown-rac-BTtJVFv8.js} +44 -45
- package/dist/component/{services-multi-choice-rac-sQ1NF9hY.js → services-multi-choice-rac-hbY3g0Kb.js} +11 -11
- package/dist/component/{signature-rac-Huairu7V.js → signature-rac-CTCNclwL.js} +67 -67
- package/dist/component/{submit-button-rac-Dpg7N0TG.js → submit-button-rac-kKGeVgsG.js} +25 -25
- package/dist/component/{tags-field-rac-BQ8TEqXH.js → tags-field-rac-CVf7oQr_.js} +35 -35
- package/dist/component/{tags-rac-CFOmyCCc.js → tags-rac-DiX1_nTT.js} +1 -1
- package/dist/component/{text-area-field-rac-DNiMa7d3.js → text-area-field-rac-IhBNXiDl.js} +22 -22
- package/dist/component/{text-area-rac-kLFe-KbZ.js → text-area-rac-DHevCtFF.js} +1 -1
- package/dist/component/{text-input-field-rac-CqENSUUX.js → text-input-field-rac-Da3_wTdh.js} +5 -5
- package/dist/component/{text-input-headless-BdPkEeK2.js → text-input-headless-DcZRRXCp.js} +9 -9
- package/dist/component/{text-input-rac-uYQEfOtE.js → text-input-rac-564LIZ1_.js} +1 -1
- package/dist/component/{time-input-rac-BYoojlJ9.js → time-input-rac-p-Nnsxp_.js} +54 -54
- package/dist/component/{url-input-field-rac-BioH7kuz.js → url-input-field-rac-DjrcpRtm.js} +25 -25
- package/dist/component/{url-input-rac-D2VSSyqW.js → url-input-rac-B3brpyop.js} +1 -1
- package/dist/component/use-dropdown-trigger-class-name-BWTT7ltv.js +117 -0
- package/dist/component/{use-element-state-class-name-oiKCauK-.js → use-element-state-class-name-CUZuhFvZ.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BW3nCyhG.js → use-hoverable-input-class-name-ugX8-g4E.js} +6 -6
- package/dist/component/use-is-forced-open-dropdown-DUZMvWpk.js +48 -0
- package/dist/component/{use-service-options-base-DXG60hA5.js → use-service-options-base-hqO9Ev38.js} +6 -6
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +6 -0
- package/dist/form.d.ts +5 -0
- package/package.json +2 -2
- package/dist/component/dext-radio-group-rac-CtEjnu_X.js +0 -18
- package/dist/component/use-dropdown-option-class-name-BEmvU-Gg.js +0 -115
- package/dist/component/use-dropdown-trigger-class-name-qj9skLWZ.js +0 -40
- package/dist/component/use-text-input-class-name-BhQFcXYH.js +0 -6
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import t, { useState as Y, useRef as
|
|
1
|
+
import t, { useState as Y, 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
3
|
import { RicosViewer as xe } from "@wix/ricos/viewer";
|
|
4
4
|
import Z from "classnames";
|
|
5
|
-
import {
|
|
5
|
+
import { bk as Ce, by as oe, bt as ve, ar as Ne, bw as De, ak as ie, bx as Te, bl as Ee, bo as z, bq as Se, bi as Be, bh as ye, S as Ie, a0 as Re, b as Ze, K as Ae, L as ce, v as ue, I as de, H as me, J as Me, f as te } from "./form-DHAKwnLt.js";
|
|
6
6
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { s as $ } from "./field-rac.module-DfEb7pBp.js";
|
|
8
|
-
import { u as pe } from "./use-element-state-class-name-
|
|
9
|
-
import { DropZone as Ue, Text as we, FileTrigger as He, Button as Fe, ProgressBar as Pe, VisuallyHidden as
|
|
8
|
+
import { u as pe } from "./use-element-state-class-name-CUZuhFvZ.js";
|
|
9
|
+
import { DropZone as Ue, Text as we, FileTrigger as He, Button as Fe, ProgressBar as Pe, VisuallyHidden as ke } from "react-aria-components";
|
|
10
10
|
import { f as L, a as W } from "./find-child-C60k4CxG.js";
|
|
11
|
-
import { b as
|
|
12
|
-
import { L as
|
|
11
|
+
import { b as qe, a as ze, D as Ve, E as Ke } from "./field-error-headless-E8WjFr_n.js";
|
|
12
|
+
import { L as je } from "./field-label-headless-BakLOu5E.js";
|
|
13
13
|
const $e = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
@@ -44,7 +44,7 @@ const $e = {
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
function We({ valueSliderLimit: e, value: n, explanationText: o, target: l, onChange: s, uploadFileFormats: d, onBlur: E, onFilesCleared: x }) {
|
|
47
|
-
const [r, i] = Y(
|
|
47
|
+
const [r, i] = Y(Je(n)), [C, m] = Y(n || []), [p, c] = Y(), T = Ye(l), { t: v } = oe(), 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(() => r.some((f) => f.state === "uploading"), [
|
|
50
50
|
r
|
|
@@ -98,7 +98,7 @@ function We({ valueSliderLimit: e, value: n, explanationText: o, target: l, onCh
|
|
|
98
98
|
}, [
|
|
99
99
|
T,
|
|
100
100
|
v
|
|
101
|
-
]),
|
|
101
|
+
]), K = async (h) => {
|
|
102
102
|
if (p && c(void 0), h) {
|
|
103
103
|
if (r.length + h.length > e) {
|
|
104
104
|
c(v("form.file-upload.error.upload-limit", {
|
|
@@ -126,9 +126,9 @@ function We({ valueSliderLimit: e, value: n, explanationText: o, target: l, onCh
|
|
|
126
126
|
const _ = r.filter((F) => F !== f);
|
|
127
127
|
i(_), _.length === 0 && x();
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, j = () => {
|
|
130
130
|
p && c(void 0), E();
|
|
131
|
-
},
|
|
131
|
+
}, J = d.map((h) => $e[h]).join(), X = M(() => {
|
|
132
132
|
i([]), m([]);
|
|
133
133
|
}, []);
|
|
134
134
|
return Te(X), {
|
|
@@ -137,13 +137,13 @@ function We({ valueSliderLimit: e, value: n, explanationText: o, target: l, onCh
|
|
|
137
137
|
hover: g,
|
|
138
138
|
getExplanationText: R,
|
|
139
139
|
getStatusText: u,
|
|
140
|
-
handleChange:
|
|
140
|
+
handleChange: K,
|
|
141
141
|
handleDelete: U,
|
|
142
|
-
accept:
|
|
143
|
-
handleBlur:
|
|
142
|
+
accept: J,
|
|
143
|
+
handleBlur: j
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Je(e = []) {
|
|
147
147
|
const n = e || [];
|
|
148
148
|
try {
|
|
149
149
|
return n.map((o) => ({
|
|
@@ -166,11 +166,11 @@ function V() {
|
|
|
166
166
|
throw new Error("FileUpload components must be used within FileUpload");
|
|
167
167
|
return e;
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const q = ({ children: e, className: n }) => {
|
|
170
170
|
const { ariaDescribedBy: o } = Ee(), { disabled: l, hasError: s } = z(), { handleFileChange: d, limitReached: E } = V();
|
|
171
171
|
if (E)
|
|
172
172
|
return null;
|
|
173
|
-
const x = L(e,
|
|
173
|
+
const x = L(e, q.Title), r = L(e, q.Subtitle), i = L(e, q.Button);
|
|
174
174
|
return /* @__PURE__ */ t.createElement(Ue, {
|
|
175
175
|
"aria-describedby": o,
|
|
176
176
|
className: n,
|
|
@@ -191,14 +191,14 @@ const k = ({ children: e, className: n }) => {
|
|
|
191
191
|
}, /* @__PURE__ */ t.createElement(we, {
|
|
192
192
|
slot: "label"
|
|
193
193
|
}, x, r), i);
|
|
194
|
-
},
|
|
194
|
+
}, Qe = ({ className: e, children: n }) => {
|
|
195
195
|
const { limitReached: o } = V();
|
|
196
196
|
return /* @__PURE__ */ t.createElement("p", {
|
|
197
197
|
className: e
|
|
198
198
|
}, n({
|
|
199
199
|
limitReached: o
|
|
200
200
|
}));
|
|
201
|
-
},
|
|
201
|
+
}, Ge = ({ className: e, children: n }) => {
|
|
202
202
|
const { limitReached: o } = V(), { explanationText: l } = z();
|
|
203
203
|
return /* @__PURE__ */ t.createElement("p", {
|
|
204
204
|
className: e
|
|
@@ -212,8 +212,8 @@ const k = ({ children: e, className: n }) => {
|
|
|
212
212
|
allowsMultiple: g,
|
|
213
213
|
onSelect: (S) => {
|
|
214
214
|
if (S) {
|
|
215
|
-
const
|
|
216
|
-
|
|
215
|
+
const K = Array.from(S), U = new DataTransfer();
|
|
216
|
+
K.forEach((j) => U.items.add(j)), v(U.files);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}, /* @__PURE__ */ t.createElement(Fe, {
|
|
@@ -245,9 +245,9 @@ const k = ({ children: e, className: n }) => {
|
|
|
245
245
|
}, n);
|
|
246
246
|
};
|
|
247
247
|
re.Text = Xe;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
q.Title = Qe;
|
|
249
|
+
q.Subtitle = Ge;
|
|
250
|
+
q.Button = re;
|
|
251
251
|
const A = ({ children: e, className: n, ...o }) => {
|
|
252
252
|
const { file: l, index: s } = o, d = l.file.name, E = L(e, A.Name), x = L(e, A.Remove), r = L(e, A.Spinner), i = L(e, A.Error);
|
|
253
253
|
return /* @__PURE__ */ t.createElement("div", {
|
|
@@ -266,7 +266,7 @@ const A = ({ children: e, className: n, ...o }) => {
|
|
|
266
266
|
className: e
|
|
267
267
|
}, o);
|
|
268
268
|
}, tt = ({ className: e, "aria-label": n, children: o, ...l }) => {
|
|
269
|
-
const { fileName: s, index: d } = l, { disabled: E } = z(), { handleDelete: x, fileRemoveButtonRefs: r } = V(), i =
|
|
269
|
+
const { fileName: s, index: d } = l, { disabled: E } = z(), { handleDelete: x, fileRemoveButtonRefs: r } = V(), i = k(null);
|
|
270
270
|
ne(() => {
|
|
271
271
|
const m = r.current, p = s;
|
|
272
272
|
return m[p] = i, () => {
|
|
@@ -305,7 +305,7 @@ A.Name = et;
|
|
|
305
305
|
A.Remove = tt;
|
|
306
306
|
A.Spinner = nt;
|
|
307
307
|
A.Error = ge;
|
|
308
|
-
ge.Text =
|
|
308
|
+
ge.Text = qe;
|
|
309
309
|
const le = ({ children: e, className: n }) => {
|
|
310
310
|
const { files: o } = V(), l = L(e, le.File);
|
|
311
311
|
return !o || o.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
|
|
@@ -317,10 +317,10 @@ const le = ({ children: e, className: n }) => {
|
|
|
317
317
|
})));
|
|
318
318
|
};
|
|
319
319
|
le.File = A;
|
|
320
|
-
const
|
|
321
|
-
const { t: n } = oe(), { id: o, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target: x, explanationText: r, onBlur: i, hasError: C, errorMessage: m, FieldLayout: p } = z(), c =
|
|
320
|
+
const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
321
|
+
const { t: n } = oe(), { id: o, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target: x, explanationText: r, onBlur: i, hasError: C, errorMessage: m, FieldLayout: p } = z(), 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: R, handleDelete: S, accept:
|
|
323
|
+
}, []), { files: g, limitError: B, hover: I, getExplanationText: y, getStatusText: N, handleBlur: u, handleChange: R, handleDelete: S, accept: K } = We({
|
|
324
324
|
valueSliderLimit: E,
|
|
325
325
|
value: l,
|
|
326
326
|
explanationText: r,
|
|
@@ -331,8 +331,8 @@ const Q = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
331
331
|
onFilesCleared: O
|
|
332
332
|
}), U = M((H) => {
|
|
333
333
|
var se;
|
|
334
|
-
const
|
|
335
|
-
g.length > 1 && ((se = (g.filter((ee) =>
|
|
334
|
+
const Q = g[H], P = G(Q);
|
|
335
|
+
g.length > 1 && ((se = (g.filter((ee) => G(ee) !== P).map((ee) => T.current[G(ee)]).find(Boolean) ?? c).current) == null || se.focus()), S(H);
|
|
336
336
|
}, [
|
|
337
337
|
S,
|
|
338
338
|
g
|
|
@@ -342,14 +342,14 @@ const Q = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
342
342
|
}, [
|
|
343
343
|
g
|
|
344
344
|
]);
|
|
345
|
-
const
|
|
345
|
+
const j = E > 1, J = g.length >= E, X = fe(() => ({
|
|
346
346
|
handleFileChange: R,
|
|
347
347
|
handleBlur: u,
|
|
348
348
|
handleDelete: U,
|
|
349
349
|
files: g,
|
|
350
|
-
accept:
|
|
351
|
-
limitReached:
|
|
352
|
-
multiple:
|
|
350
|
+
accept: K,
|
|
351
|
+
limitReached: J,
|
|
352
|
+
multiple: j,
|
|
353
353
|
getExplanationText: y,
|
|
354
354
|
getStatusText: N,
|
|
355
355
|
hover: I,
|
|
@@ -361,21 +361,21 @@ const Q = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
361
361
|
u,
|
|
362
362
|
U,
|
|
363
363
|
g,
|
|
364
|
-
j,
|
|
365
|
-
G,
|
|
366
364
|
K,
|
|
365
|
+
J,
|
|
366
|
+
j,
|
|
367
367
|
y,
|
|
368
368
|
N,
|
|
369
369
|
I,
|
|
370
370
|
B
|
|
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), w = L(e, a.Description), ae = L(e, a.Error);
|
|
372
372
|
return Se(() => {
|
|
373
|
-
var H,
|
|
373
|
+
var H, Q;
|
|
374
374
|
if (c.current) {
|
|
375
375
|
c.current.focus();
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
|
-
(
|
|
378
|
+
(Q = (H = g.map((P) => T.current[G(P)]).find((P) => P == null ? void 0 : P.current)) == null ? void 0 : H.current) == null || Q.focus();
|
|
379
379
|
}, o), /* @__PURE__ */ t.createElement(be.Provider, {
|
|
380
380
|
value: X
|
|
381
381
|
}, /* @__PURE__ */ t.createElement(p, {
|
|
@@ -385,7 +385,7 @@ const Q = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
385
385
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, W(ae, {
|
|
386
386
|
hasError: !!(C || B),
|
|
387
387
|
errorMessage: B ?? m
|
|
388
|
-
}), /* @__PURE__ */ t.createElement(
|
|
388
|
+
}), /* @__PURE__ */ t.createElement(ke, {
|
|
389
389
|
role: "status",
|
|
390
390
|
"aria-live": "polite",
|
|
391
391
|
"aria-atomic": "true"
|
|
@@ -399,13 +399,13 @@ const Q = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
399
399
|
className: e
|
|
400
400
|
}, d);
|
|
401
401
|
};
|
|
402
|
-
a.Label =
|
|
403
|
-
a.DropZone =
|
|
402
|
+
a.Label = je;
|
|
403
|
+
a.DropZone = q;
|
|
404
404
|
a.Button = re;
|
|
405
405
|
a.Explanation = ot;
|
|
406
406
|
a.Files = le;
|
|
407
407
|
a.Description = Ve;
|
|
408
|
-
a.Error =
|
|
408
|
+
a.Error = Ke;
|
|
409
409
|
const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
410
410
|
viewBox: "0 0 24 24",
|
|
411
411
|
width: 24,
|
|
@@ -497,7 +497,7 @@ const rt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
497
497
|
base: D.button,
|
|
498
498
|
hover: D.buttonHover
|
|
499
499
|
}
|
|
500
|
-
}), 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: x, className: r, ...i } = E ?? {}, C = ye(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), m =
|
|
500
|
+
}), 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: x, className: r, ...i } = E ?? {}, C = ye(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), m = k(null), [p, c] = Y(!1), [T, v] = Y(!1), O = M(() => {
|
|
501
501
|
var u;
|
|
502
502
|
c(!0), (u = m.current) == null || u.runAnimationForward();
|
|
503
503
|
}, []), g = M(() => {
|
|
@@ -1,11 +1,11 @@
|
|
|
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 {
|
|
5
|
-
import { f as c, a as
|
|
4
|
+
import { bo as C, bg as I, bl as P, S, M as x, v as N } from "./form-DHAKwnLt.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-
|
|
7
|
+
import { D as v, E as M } from "./field-error-headless-E8WjFr_n.js";
|
|
8
|
+
import { L as g } from "./field-label-headless-BakLOu5E.js";
|
|
9
9
|
import { s as F } from "./field-rac.module-DfEb7pBp.js";
|
|
10
10
|
const e = ({ children: r }) => {
|
|
11
11
|
var p;
|
|
@@ -14,11 +14,11 @@ const e = ({ children: r }) => {
|
|
|
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, y = 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: () => y,
|
|
21
|
+
renderInput: () => R(L, {
|
|
22
22
|
price: i,
|
|
23
23
|
currencyCode: o == null ? void 0 : o.code,
|
|
24
24
|
locale: m
|
|
@@ -44,17 +44,17 @@ e.Label = V;
|
|
|
44
44
|
e.Amount = T;
|
|
45
45
|
e.Description = v;
|
|
46
46
|
e.Error = M;
|
|
47
|
-
const
|
|
48
|
-
value:
|
|
47
|
+
const B = "_value_c7203_1", k = {
|
|
48
|
+
value: B
|
|
49
49
|
}, w = ({ content: r, locale: a }) => /* @__PURE__ */ t.createElement(A, {
|
|
50
50
|
content: r,
|
|
51
51
|
locale: a
|
|
52
52
|
}), X = () => /* @__PURE__ */ t.createElement(e, null, /* @__PURE__ */ t.createElement(e.Label, {
|
|
53
|
-
className: u(
|
|
53
|
+
className: u(S, F.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(
|
|
57
|
+
className: u(N, F.description)
|
|
58
58
|
}, w)), Q = () => /* @__PURE__ */ t.createElement(X, null);
|
|
59
59
|
export {
|
|
60
60
|
Q as FixedPaymentRAC
|