@wix/form-elements 1.186.0 → 1.188.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-B_kU3lTx.js → appointment-rac-Biwj0bKe.js} +78 -78
- package/dist/component/{bookings-address-rac-BZR-Loac.js → bookings-address-rac-B_o25LOI.js} +1 -1
- package/dist/component/{bookings-email-rac-CCvIRZYM.js → bookings-email-rac-BBcusxbS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-B5AEOOre.js → bookings-first-name-rac-CNTGannm.js} +1 -1
- package/dist/component/{bookings-header-rac-BcvixPiY.js → bookings-header-rac-BTvG2vnk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-JiEUxaqi.js → bookings-last-name-rac-BQumGsz9.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-zPJ3u2Kn.js → bookings-login-bar-rac-Cl_rwWhO.js} +8 -8
- package/dist/component/{bookings-phone-rac-CNNlCp66.js → bookings-phone-rac-B_gXe9Fa.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Rl9b7r3g.js → bookings-rich-text-rac-CbMuPVCB.js} +1 -1
- package/dist/component/{checkbox-field-rac-DP6HkB2N.js → checkbox-field-rac-QwFSqEgs.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-DOFTwxeh.js → checkbox-group-field-headless-CTDMO0TM.js} +38 -38
- package/dist/component/{checkbox-group-field-rac-DhcC_N8m.js → checkbox-group-field-rac-DFUST9Th.js} +4 -4
- package/dist/component/{checkbox-group-rac-Gec8xcgN.js → checkbox-group-rac-CBAE-o1Q.js} +1 -1
- package/dist/component/{checkbox-rac-CAuZNb4B.js → checkbox-rac-DkYPhGTU.js} +1 -1
- package/dist/component/{contacts-address-rac-2WX8POCZ.js → contacts-address-rac-DKf42iJk.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-36zloipl.js → contacts-birthdate-rac-ffPSb2YW.js} +1 -1
- package/dist/component/{contacts-company-rac-skt6F4i0.js → contacts-company-rac-DLVdNbYz.js} +1 -1
- package/dist/component/{contacts-email-rac-BAftc4kl.js → contacts-email-rac-CW8SdcYX.js} +1 -1
- package/dist/component/{contacts-first-name-rac-u6Wiuwxe.js → contacts-first-name-rac-CGdzgpkw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DCh0xW6C.js → contacts-last-name-rac-DNQj7UcW.js} +1 -1
- package/dist/component/{contacts-phone-rac-lhdYji46.js → contacts-phone-rac-zAMIceti.js} +1 -1
- package/dist/component/{contacts-position-rac-jOQ8Zayq.js → contacts-position-rac-DLwn9B2T.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-q4sRxs2n.js → contacts-subscribe-rac-Cy5rxTkC.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-DpzneATH.js → contacts-tax-id-rac-CEfU6N6C.js} +1 -1
- package/dist/component/{date-availability-CKFxphlT.js → date-availability-C9EOQUiy.js} +1 -1
- package/dist/component/{date-input-field-rac-DgwRr6tR.js → date-input-field-rac-F4QQeEtO.js} +57 -57
- package/dist/component/{date-input-rac-CONL_9I5.js → date-input-rac-CJeOgyF5.js} +1 -1
- package/dist/component/{date-picker-field-rac-C1ckFkSh.js → date-picker-field-rac-33ARKAxQ.js} +35 -35
- package/dist/component/{date-picker-rac-CTms7Rxx.js → date-picker-rac-Beaqh84V.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BkjASrCJ.js → date-time-input-field-rac-CB8FfYUM.js} +44 -44
- package/dist/component/{date-time-input-rac-Bc3gu8--.js → date-time-input-rac-DQ9P6IVp.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BYEHlsBv.js → dext-checkbox-group-rac-Cho-hueW.js} +2 -2
- package/dist/component/{dext-checkbox-rac-C6nce0nR.js → dext-checkbox-rac-BIwIwy-y.js} +1 -1
- package/dist/component/{dext-date-picker-rac-COIoyTuy.js → dext-date-picker-rac-C03HJdvX.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DFuslGXT.js → dext-date-time-input-rac-Bo4XfnRA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-GecDU_NU.js → dext-dropdown-rac-CadT1tMH.js} +1 -1
- package/dist/component/{dext-email-rac-C9qXogI5.js → dext-email-rac-DbiEws8H.js} +1 -1
- package/dist/component/{dext-number-input-rac-BO_MqKpQ.js → dext-number-input-rac-XoW8CLvX.js} +1 -1
- package/dist/component/{dext-phone-rac-CZZBLRSj.js → dext-phone-rac-9rFyUD8e.js} +1 -1
- package/dist/component/{dext-radio-group-rac-baaOfskN.js → dext-radio-group-rac-U6BNL7IT.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cyz7F31J.js → dext-rating-input-rac-BDGUv8jU.js} +1 -1
- package/dist/component/{dext-tags-rac-DiWEHPna.js → dext-tags-rac-CAFGVcIi.js} +2 -2
- package/dist/component/{dext-text-area-rac-BpZnhr2z.js → dext-text-area-rac-DXyzm9oe.js} +1 -1
- package/dist/component/{dext-text-input-rac-CZWOoFkx.js → dext-text-input-rac-C27gdfyG.js} +1 -1
- package/dist/component/{dext-url-input-rac-l98Wixh2.js → dext-url-input-rac-DovYH3_G.js} +1 -1
- package/dist/component/{donation-rac-BcdtetWT.js → donation-rac-DV2aRsDt.js} +60 -60
- package/dist/component/{dropdown-field-rac-Bgjtp3L4.js → dropdown-field-rac-D58C7YZG.js} +3 -3
- package/dist/component/{dropdown-rac-D3x_39ML.js → dropdown-rac-57yZf_yZ.js} +1 -1
- package/dist/component/{ecom-address-rac-Bdk-Q07X.js → ecom-address-rac-Co3WhA7m.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BoAls9a3.js → ecom-subscription-checkbox-rac-CYjsuRA9.js} +2 -2
- package/dist/component/{email-input-field-rac-77Oc4dDD.js → email-input-field-rac-C5G3pVkR.js} +14 -14
- package/dist/component/{events-repeater-rac-GfDVt3z5.js → events-repeater-rac-D5PXSDIH.js} +72 -70
- package/dist/component/{events-rsvp-rac-CsCMAtdq.js → events-rsvp-rac-BfyQNZh6.js} +3 -3
- package/dist/component/{field-error-headless-GKAj6Pxj.js → field-error-headless-RTyrenpC.js} +8 -8
- package/dist/component/{field-label-headless-PD3fGcax.js → field-label-headless-Bd00Hl2z.js} +4 -4
- package/dist/component/{file-upload-rac-CUxGzs3a.js → file-upload-rac-D5pTnsHO.js} +61 -61
- package/dist/component/{fixed-payment-rac-o5xHi-ra.js → fixed-payment-rac-ByxSjPu5.js} +9 -9
- package/dist/component/{form-RdPwfrvb.js → form-BG5UjjLA.js} +3547 -3403
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C9xA5iqV.js → header-field-rac-Bql6VoAi.js} +2 -2
- package/dist/component/{header-rac-CF1VP6hb.js → header-rac-DWAIn4eY.js} +1 -1
- package/dist/component/{image-choice-rac-BEYEQpY1.js → image-choice-rac-D5dSQ4Xd.js} +11 -11
- package/dist/component/{index-S0Acbl6c.js → index-37eV-JEp.js} +5 -5
- package/dist/component/{index-RuCFDOGc.js → index-DlcCtz4h.js} +4 -4
- package/dist/component/{isObjectLike-Ber_X_Dh.js → isObjectLike-ClPDcTiq.js} +1 -1
- package/dist/component/{multiline-address-field-rac-B2TgOTXA.js → multiline-address-field-rac-CpvwzmpC.js} +345 -345
- package/dist/component/{multiline-address-rac-CmWUcCpu.js → multiline-address-rac-ENim2Bn6.js} +1 -1
- package/dist/component/{number-input-field-rac-Objw_lY1.js → number-input-field-rac-DTRnmRDk.js} +21 -21
- package/dist/component/{number-input-rac-DZSYFSGa.js → number-input-rac-QROlEpkx.js} +1 -1
- package/dist/component/{password-rac-CHJ-pfD8.js → password-rac-jMoyzIP2.js} +47 -47
- package/dist/component/{payment-input-rac-Z_KAjeub.js → payment-input-rac-DOOV4P4b.js} +31 -31
- package/dist/component/{phone-input-field-rac-CyEuc3c9.js → phone-input-field-rac-BA_mTcND.js} +47 -47
- package/dist/component/{phone-rac-DLvx-8X_.js → phone-rac-DXcbIqHK.js} +1 -1
- package/dist/component/{product-list-rac-D17el6c9.js → product-list-rac-CsxR7Ut6.js} +63 -63
- package/dist/component/{quiz-radio-group-rac-Ci8TptOw.js → quiz-radio-group-rac-IQgqvqjs.js} +1 -1
- package/dist/component/{radio-button-module-classes-FofhK-mq.js → radio-button-module-classes-DIFYfYiH.js} +36 -36
- package/dist/component/{radio-group-field-rac-BkSMEX4O.js → radio-group-field-rac-Ca2RlxOl.js} +4 -4
- package/dist/component/{radio-group-rac-BTn-Cxxa.js → radio-group-rac-DDervEEb.js} +1 -1
- package/dist/component/{rating-input-field-rac-CocnyJZF.js → rating-input-field-rac-0kyPo9cU.js} +12 -12
- package/dist/component/{rating-input-rac-BvBiBfeB.js → rating-input-rac-DqPsqUKR.js} +1 -1
- package/dist/component/{rich-content-rac.module-QspdFAOQ.js → rich-content-rac.module-2T_-7jvb.js} +5 -5
- package/dist/component/{rich-text-field-rac-Bhx9hioT.js → rich-text-field-rac-W-eKzhuC.js} +4 -4
- package/dist/component/{rich-text-rac-BQh8FwwS.js → rich-text-rac-CzJfbAyx.js} +1 -1
- package/dist/component/{service-dropdown-rac-BIXPgFFy.js → service-dropdown-rac-BMJy2pZ5.js} +25 -25
- package/dist/component/{services-multi-choice-rac-COQ1PA73.js → services-multi-choice-rac-BBAWlI7U.js} +7 -7
- package/dist/component/{signature-rac-Dg-moI_C.js → signature-rac-Y1GLswrp.js} +22 -22
- package/dist/component/{submit-button-rac-DeDYBkOM.js → submit-button-rac-CSKbrgQ3.js} +17 -17
- package/dist/component/{tags-field-rac-Ddd5j-Rm.js → tags-field-rac-D3zOYcC5.js} +19 -19
- package/dist/component/{tags-rac-CSN4Qj7H.js → tags-rac-Cs77Abgs.js} +1 -1
- package/dist/component/text-area-field-rac-DZZW7rAX.js +74 -0
- package/dist/component/{text-area-rac-CqdvWp7s.js → text-area-rac-BRPp0HnX.js} +1 -1
- package/dist/component/{text-input-field-rac-3fkKXrfo.js → text-input-field-rac-tPDZmLdU.js} +3 -3
- package/dist/component/text-input-headless-tkwEZWs7.js +47 -0
- package/dist/component/{text-input-rac-DAMMZiaZ.js → text-input-rac-DnHt4vkM.js} +1 -1
- package/dist/component/{time-input-rac-CsF1NYzf.js → time-input-rac-Dbg4Nqb5.js} +18 -18
- package/dist/component/url-input-field-rac-3ODFXFRP.js +77 -0
- package/dist/component/{url-input-rac-xe-Fv62_.js → url-input-rac-CPb5o8Of.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-D2bfB7mX.js → use-dropdown-option-class-name-Dd4ncVaY.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-C70Rbjnj.js → use-dropdown-trigger-class-name-zVniRqM7.js} +29 -29
- package/dist/component/{use-element-state-class-name-BxTnecG_.js → use-element-state-class-name-C8jFeDrq.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-CjyA3fHd.js → use-hoverable-input-class-name-B9diy0Mr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-CzLh9VIQ.js → use-is-forced-open-dropdown-BR1U1l5w.js} +6 -6
- package/dist/component/{use-service-options-base-DcTiL5qj.js → use-service-options-base-yM4rJlq1.js} +3 -3
- package/dist/component/use-text-input-class-name-D6AnBbJx.js +6 -0
- package/package.json +4 -2
- package/dist/component/text-area-field-rac-VYumrKBq.js +0 -74
- package/dist/component/text-input-headless-DMWwlrhh.js +0 -47
- package/dist/component/url-input-field-rac-Cs2W0Y3s.js +0 -77
- package/dist/component/use-text-input-class-name-B-OzR1SQ.js +0 -6
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import t, { useState as
|
|
2
|
-
import
|
|
3
|
-
import { NumberField as
|
|
4
|
-
import {
|
|
1
|
+
import t, { useState as q, useMemo as T, useCallback as B, useRef as P } from "react";
|
|
2
|
+
import D from "classnames";
|
|
3
|
+
import { NumberField as z, CheckboxField as Q, CheckboxButton as W, Group as Y, Input as Z, Button as k } from "react-aria-components";
|
|
4
|
+
import { bS as j, bT as w, bI as U, bN as $, b8 as ee, bM as O, bJ as H, bO as J, a$ as te, aP as se, ah as ne, aj as oe, al as re, ai as ae, ak as le } from "./form-BG5UjjLA.js";
|
|
5
5
|
import { f as C, a as R } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { L as
|
|
7
|
-
import { S as
|
|
8
|
-
import { u as
|
|
6
|
+
import { L as ce } from "./field-label-headless-Bd00Hl2z.js";
|
|
7
|
+
import { S as ue } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
|
+
import { u as me } from "./use-invoke-callback-UH73A_J3.js";
|
|
9
9
|
import { C as M } from "./chevron-down-icon-CcpVm6B-.js";
|
|
10
|
-
import { C as
|
|
11
|
-
import { s as
|
|
12
|
-
import { u as
|
|
13
|
-
import { u as
|
|
14
|
-
const
|
|
15
|
-
const [i, E] =
|
|
10
|
+
import { C as ie } from "./checkbox-indicator-module-classes-DOxE4UQg.js";
|
|
11
|
+
import { s as x } from "./field-rac.module-DcyJyi2B.js";
|
|
12
|
+
import { u as de } from "./use-element-state-class-name-C8jFeDrq.js";
|
|
13
|
+
import { u as Ee } from "./use-hoverable-input-class-name-B9diy0Mr.js";
|
|
14
|
+
const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, errors: l = pe, validation: c }) => {
|
|
15
|
+
const [i, E] = q((o == null ? void 0 : o.length) || 0), u = T(() => o ?? [], [
|
|
16
16
|
o
|
|
17
|
-
]), p = j(), G = w(), d = U(), { validateFields: m } =
|
|
17
|
+
]), p = j(), G = w(), d = U(), { validateFields: m } = $(), F = c.predefined.objectArrayOptions.maxItems, y = T(() => ee({
|
|
18
18
|
form: {
|
|
19
19
|
fields: s,
|
|
20
20
|
steps: [
|
|
@@ -37,7 +37,7 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
37
37
|
}), b;
|
|
38
38
|
}, []), [
|
|
39
39
|
l
|
|
40
|
-
]), _ =
|
|
40
|
+
]), _ = B((b) => {
|
|
41
41
|
const L = Number.isNaN(b) ? 0 : Math.min(Math.max(b, 0), F);
|
|
42
42
|
E(L), n == null || n(Array.from({
|
|
43
43
|
length: L
|
|
@@ -46,10 +46,10 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
46
46
|
F,
|
|
47
47
|
u,
|
|
48
48
|
n
|
|
49
|
-
]),
|
|
49
|
+
]), v = B((b) => (L, A) => {
|
|
50
50
|
const N = Array.from({
|
|
51
51
|
length: i
|
|
52
|
-
}, (h,
|
|
52
|
+
}, (h, X) => u[X] ?? {});
|
|
53
53
|
N[b] = {
|
|
54
54
|
...N[b],
|
|
55
55
|
[L]: A
|
|
@@ -70,10 +70,10 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
70
70
|
fieldActions: d,
|
|
71
71
|
validateFields: m,
|
|
72
72
|
changeGuestCount: _,
|
|
73
|
-
changeGuestField:
|
|
73
|
+
changeGuestField: v
|
|
74
74
|
};
|
|
75
|
-
},
|
|
76
|
-
const a = O(), { id: o, FieldLayout: n } = a, { guestLimit: l, guestCount: c, guests: i, errorsByIndex: E, formView: u, changeGuestCount: p, changeGuestField: G } =
|
|
75
|
+
}, Ce = [], ge = {}, r = ({ children: e, className: s }) => {
|
|
76
|
+
const a = O(), { id: o, FieldLayout: n } = a, { guestLimit: l, guestCount: c, guests: i, errorsByIndex: E, formView: u, changeGuestCount: p, changeGuestField: G } = be(a), d = C(e, r.Label), m = C(e, r.GuestCount), F = C(e, r.GuestToggle), y = C(e, r.Guests), I = l > 1;
|
|
77
77
|
return /* @__PURE__ */ t.createElement(n, {
|
|
78
78
|
fieldId: o,
|
|
79
79
|
renderLabel: () => I ? d : null,
|
|
@@ -95,11 +95,11 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
95
95
|
})),
|
|
96
96
|
renderDescription: () => null
|
|
97
97
|
});
|
|
98
|
-
},
|
|
98
|
+
}, K = ({ className: e }) => /* @__PURE__ */ t.createElement(ce, {
|
|
99
99
|
className: e
|
|
100
100
|
}, null), g = ({ children: e, className: s, ...a }) => {
|
|
101
|
-
const { guestLimit: o, guestCount: n, onGuestCountChange: l } = a, { label: c, disabled: i, readOnly: E, onBlur: u, onFocus: p } = O(), G =
|
|
102
|
-
return /* @__PURE__ */ t.createElement(
|
|
101
|
+
const { guestLimit: o, guestCount: n, onGuestCountChange: l } = a, { label: c, disabled: i, readOnly: E, onBlur: u, onFocus: p } = O(), G = me(u), d = C(e, g.Label), m = C(e, g.Control);
|
|
102
|
+
return /* @__PURE__ */ t.createElement(z, {
|
|
103
103
|
className: s,
|
|
104
104
|
"aria-label": c,
|
|
105
105
|
value: n,
|
|
@@ -112,16 +112,16 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
112
112
|
onBlur: G,
|
|
113
113
|
onFocus: p
|
|
114
114
|
}, d, m);
|
|
115
|
-
},
|
|
115
|
+
}, Ge = ({ children: e, className: s }) => {
|
|
116
116
|
const { disabled: a, readOnly: o } = O(), n = C(e, g.Input), l = C(e, g.Decrement), c = C(e, g.Increment);
|
|
117
117
|
return /* @__PURE__ */ t.createElement(Y, {
|
|
118
118
|
className: s,
|
|
119
119
|
isDisabled: a,
|
|
120
120
|
isReadOnly: o
|
|
121
121
|
}, n, c, l);
|
|
122
|
-
},
|
|
123
|
-
const { id: s } = O(), { inputId: a, ariaDescribedBy: o } =
|
|
124
|
-
return
|
|
122
|
+
}, _e = ({ className: e }) => {
|
|
123
|
+
const { id: s } = O(), { inputId: a, ariaDescribedBy: o } = H(), n = P(null);
|
|
124
|
+
return J(() => {
|
|
125
125
|
var l;
|
|
126
126
|
(l = n.current) == null || l.focus({
|
|
127
127
|
preventScroll: !0
|
|
@@ -133,21 +133,21 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
133
133
|
className: e,
|
|
134
134
|
inputMode: "numeric"
|
|
135
135
|
});
|
|
136
|
-
},
|
|
136
|
+
}, fe = ({ children: e, className: s }) => /* @__PURE__ */ t.createElement(k, {
|
|
137
137
|
slot: "decrement",
|
|
138
138
|
className: s
|
|
139
|
-
}, e),
|
|
139
|
+
}, e), Fe = ({ children: e, className: s }) => /* @__PURE__ */ t.createElement(k, {
|
|
140
140
|
slot: "increment",
|
|
141
141
|
className: s
|
|
142
142
|
}, e), S = ({ children: e, className: s, ...a }) => {
|
|
143
|
-
const { guestCount: o, onGuestCountChange: n } = a, { id: l, label: c, disabled: i, readOnly: E, onBlur: u, onFocus: p } = O(), { inputId: G, ariaDescribedBy: d } =
|
|
144
|
-
|
|
143
|
+
const { guestCount: o, onGuestCountChange: n } = a, { id: l, label: c, disabled: i, readOnly: E, onBlur: u, onFocus: p } = O(), { inputId: G, ariaDescribedBy: d } = H(), m = P(null);
|
|
144
|
+
J(() => {
|
|
145
145
|
var _;
|
|
146
146
|
(_ = m.current) == null || _.focus({
|
|
147
147
|
preventScroll: !0
|
|
148
148
|
});
|
|
149
149
|
}, l);
|
|
150
|
-
const F = C(e, S.Input), y = C(e, S.Label), I =
|
|
150
|
+
const F = C(e, S.Input), y = C(e, S.Label), I = B((_) => {
|
|
151
151
|
n(_ ? 1 : 0);
|
|
152
152
|
}, [
|
|
153
153
|
n
|
|
@@ -164,14 +164,14 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
164
164
|
onFocus: p
|
|
165
165
|
}, /* @__PURE__ */ t.createElement(W, {
|
|
166
166
|
className: s
|
|
167
|
-
}, ({ isSelected: _, isHovered:
|
|
167
|
+
}, ({ isSelected: _, isHovered: v, isFocused: b }) => /* @__PURE__ */ t.createElement(t.Fragment, null, R(F, {
|
|
168
168
|
isSelected: _,
|
|
169
|
-
isHovered:
|
|
169
|
+
isHovered: v,
|
|
170
170
|
isFocused: b
|
|
171
171
|
}), R(y, {
|
|
172
172
|
label: c
|
|
173
173
|
}))));
|
|
174
|
-
},
|
|
174
|
+
}, Le = ({ className: e, ...s }) => {
|
|
175
175
|
const { label: a } = s;
|
|
176
176
|
return /* @__PURE__ */ t.createElement("span", {
|
|
177
177
|
className: e
|
|
@@ -200,16 +200,18 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
200
200
|
key: m,
|
|
201
201
|
index: m,
|
|
202
202
|
formView: p,
|
|
203
|
-
values: n[m] ??
|
|
204
|
-
errors: l[m] ??
|
|
203
|
+
values: n[m] ?? ge,
|
|
204
|
+
errors: l[m] ?? Ce,
|
|
205
205
|
onFieldChange: i(m)
|
|
206
206
|
}))) : null;
|
|
207
|
-
},
|
|
208
|
-
const { index: a, formView: o, values: n, errors: l, onFieldChange: c } = s, i = j(), E = w(), u = U(), { validateFields: p } =
|
|
207
|
+
}, Ne = ({ className: e, ...s }) => {
|
|
208
|
+
const { index: a, formView: o, values: n, errors: l, onFieldChange: c } = s, i = j(), E = w(), u = U(), { validateFields: p } = $();
|
|
209
209
|
return /* @__PURE__ */ t.createElement("div", {
|
|
210
210
|
className: e,
|
|
211
211
|
"data-hook": `guest-${a}`
|
|
212
|
-
}, /* @__PURE__ */ t.createElement(te, {
|
|
212
|
+
}, /* @__PURE__ */ t.createElement(te.Provider, {
|
|
213
|
+
value: void 0
|
|
214
|
+
}, /* @__PURE__ */ t.createElement(se, {
|
|
213
215
|
form: o,
|
|
214
216
|
formSchema: i,
|
|
215
217
|
values: n,
|
|
@@ -218,45 +220,45 @@ const Ee = [], pe = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
218
220
|
onFieldChange: c,
|
|
219
221
|
fields: E,
|
|
220
222
|
fieldActions: u
|
|
221
|
-
}));
|
|
223
|
+
})));
|
|
222
224
|
};
|
|
223
|
-
g.Label =
|
|
224
|
-
g.Control =
|
|
225
|
-
g.Input =
|
|
226
|
-
g.Decrement =
|
|
227
|
-
g.Increment =
|
|
228
|
-
S.Input =
|
|
229
|
-
S.Label =
|
|
230
|
-
V.Guest =
|
|
231
|
-
r.Label =
|
|
225
|
+
g.Label = K;
|
|
226
|
+
g.Control = Ge;
|
|
227
|
+
g.Input = _e;
|
|
228
|
+
g.Decrement = fe;
|
|
229
|
+
g.Increment = Fe;
|
|
230
|
+
S.Input = ue;
|
|
231
|
+
S.Label = Le;
|
|
232
|
+
V.Guest = Ne;
|
|
233
|
+
r.Label = K;
|
|
232
234
|
r.GuestCount = g;
|
|
233
235
|
r.GuestToggle = S;
|
|
234
236
|
r.Guests = V;
|
|
235
|
-
const
|
|
236
|
-
container:
|
|
237
|
-
count:
|
|
238
|
-
toggle:
|
|
239
|
-
countLabel:
|
|
240
|
-
countGroup:
|
|
241
|
-
increment:
|
|
242
|
-
decrement:
|
|
243
|
-
},
|
|
244
|
-
const e =
|
|
237
|
+
const Ie = "_container_xcjm5_1", Re = "_count_xcjm5_8", Oe = "_toggle_xcjm5_14", ye = "_countLabel_xcjm5_18", Se = "_countGroup_xcjm5_22", Ae = "_increment_xcjm5_32", he = "_decrement_xcjm5_33", f = {
|
|
238
|
+
container: Ie,
|
|
239
|
+
count: Re,
|
|
240
|
+
toggle: Oe,
|
|
241
|
+
countLabel: ye,
|
|
242
|
+
countGroup: Se,
|
|
243
|
+
increment: Ae,
|
|
244
|
+
decrement: he
|
|
245
|
+
}, Te = () => {
|
|
246
|
+
const e = Ee(ae, [
|
|
245
247
|
f.countGroup
|
|
246
|
-
]), s =
|
|
247
|
-
globalClasses:
|
|
248
|
-
moduleClasses:
|
|
248
|
+
]), s = de({
|
|
249
|
+
globalClasses: le,
|
|
250
|
+
moduleClasses: ie
|
|
249
251
|
});
|
|
250
252
|
return /* @__PURE__ */ t.createElement(r, {
|
|
251
|
-
className:
|
|
253
|
+
className: D(ne, f.container)
|
|
252
254
|
}, /* @__PURE__ */ t.createElement(r.GuestCount, {
|
|
253
255
|
className: f.count
|
|
254
256
|
}, /* @__PURE__ */ t.createElement(r.GuestCount.Label, {
|
|
255
|
-
className:
|
|
257
|
+
className: D(oe, x.label, f.countLabel)
|
|
256
258
|
}), /* @__PURE__ */ t.createElement(r.GuestCount.Control, {
|
|
257
259
|
className: e
|
|
258
260
|
}, /* @__PURE__ */ t.createElement(r.GuestCount.Input, {
|
|
259
|
-
className:
|
|
261
|
+
className: x.innerInput
|
|
260
262
|
}), /* @__PURE__ */ t.createElement(r.GuestCount.Increment, {
|
|
261
263
|
className: f.increment
|
|
262
264
|
}, /* @__PURE__ */ t.createElement(M, {
|
|
@@ -266,15 +268,15 @@ const Ne = "_container_xcjm5_1", Ie = "_count_xcjm5_8", Re = "_toggle_xcjm5_14",
|
|
|
266
268
|
})), /* @__PURE__ */ t.createElement(r.GuestCount.Decrement, {
|
|
267
269
|
className: f.decrement
|
|
268
270
|
}, /* @__PURE__ */ t.createElement(M, null)))), /* @__PURE__ */ t.createElement(r.GuestToggle, {
|
|
269
|
-
className:
|
|
271
|
+
className: D(x.checkbox, f.toggle)
|
|
270
272
|
}, /* @__PURE__ */ t.createElement(r.GuestToggle.Input, {
|
|
271
273
|
className: s
|
|
272
274
|
}), /* @__PURE__ */ t.createElement(r.GuestToggle.Label, {
|
|
273
|
-
className:
|
|
275
|
+
className: re
|
|
274
276
|
})), /* @__PURE__ */ t.createElement(r.Guests, {
|
|
275
277
|
className: f.container
|
|
276
278
|
}, /* @__PURE__ */ t.createElement(r.Guests.Guest, null)));
|
|
277
|
-
},
|
|
279
|
+
}, Je = () => /* @__PURE__ */ t.createElement(Te, null);
|
|
278
280
|
export {
|
|
279
|
-
|
|
281
|
+
Je as EventsRepeaterRAC
|
|
280
282
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
3
3
|
import a from "classnames";
|
|
4
|
-
import { a as s, s as n, R as c } from "./radio-button-module-classes-
|
|
4
|
+
import { a as s, s as n, R as c } from "./radio-button-module-classes-DIFYfYiH.js";
|
|
5
5
|
import { E as i } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as o } from "./field-rac.module-DcyJyi2B.js";
|
|
7
|
-
import { X as E, am as p, ac as R, ad as O, M as _, I as L, ae as I } from "./form-
|
|
7
|
+
import { X as E, am as p, ac as R, ad as O, M as _, I as L, ae as I } from "./form-BG5UjjLA.js";
|
|
8
8
|
import { o as D } from "./options-rac.module-_THNq6Qq.js";
|
|
9
|
-
import { u as S } from "./use-element-state-class-name-
|
|
9
|
+
import { u as S } from "./use-element-state-class-name-C8jFeDrq.js";
|
|
10
10
|
const e = ({ children: r, className: l }) => /* @__PURE__ */ t.createElement(s, {
|
|
11
11
|
className: l
|
|
12
12
|
}, r);
|
package/dist/component/{field-error-headless-GKAj6Pxj.js → field-error-headless-RTyrenpC.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import t, { createContext as m, useContext as M } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { bM as c, bJ as i, bE as b, bl as f, bm as x } from "./form-BG5UjjLA.js";
|
|
3
3
|
const H = ({ className: r, children: e }) => {
|
|
4
4
|
const { description: s, target: o } = c(), { descriptionId: a } = i(), { language: n } = b();
|
|
5
5
|
return s ? /* @__PURE__ */ t.createElement("div", {
|
|
@@ -10,14 +10,14 @@ const H = ({ className: r, children: e }) => {
|
|
|
10
10
|
content: s,
|
|
11
11
|
locale: n
|
|
12
12
|
})) : null;
|
|
13
|
-
}, l = /* @__PURE__ */ m(void 0),
|
|
13
|
+
}, l = /* @__PURE__ */ m(void 0), h = l.Provider, v = ({ className: r }) => {
|
|
14
14
|
const e = M(l);
|
|
15
15
|
return /* @__PURE__ */ t.createElement("span", {
|
|
16
16
|
className: r
|
|
17
17
|
}, e ?? "");
|
|
18
|
-
},
|
|
18
|
+
}, D = ({ className: r, children: e, ...s }) => {
|
|
19
19
|
const { hasError: o, errorMessage: a } = s, { target: n, hasError: E, errorMessage: d } = c(), { errorId: g } = i(), u = o ?? E, p = a ?? d;
|
|
20
|
-
return u ? /* @__PURE__ */ t.createElement(
|
|
20
|
+
return u ? /* @__PURE__ */ t.createElement(h, {
|
|
21
21
|
value: p
|
|
22
22
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
23
23
|
id: g,
|
|
@@ -25,10 +25,10 @@ const H = ({ className: r, children: e }) => {
|
|
|
25
25
|
className: r
|
|
26
26
|
}, e)) : null;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
D.Text = v;
|
|
29
29
|
export {
|
|
30
30
|
H as D,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
D as E,
|
|
32
|
+
h as a,
|
|
33
|
+
v as b
|
|
34
34
|
};
|
package/dist/component/{field-label-headless-PD3fGcax.js → field-label-headless-Bd00Hl2z.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bM as m, b1 as d, b2 as p, bJ as D, bX as B } from "./form-BG5UjjLA.js";
|
|
2
2
|
import l from "react";
|
|
3
3
|
import { f as L } from "./find-child-C60k4CxG.js";
|
|
4
4
|
import { sdk as g } from "@wix/image-kit";
|
|
@@ -15,13 +15,13 @@ const S = {
|
|
|
15
15
|
margin: 0,
|
|
16
16
|
padding: 0
|
|
17
17
|
}, U = "", i = ({ children: e, className: t, ...n }) => {
|
|
18
|
-
const { as: a = "label", requiredIndicatorHidden: r = !1, label: o } = n, { label: b, required: R = !1, hideLabel: F = !1, requiredIndicatorType: q = d.ASTERISK, requiredIndicatorPlacement: O = p.AFTER_FIELD_TITLE, media: y, mediaSettings: s } = m(), { labelId: A, inputId: P } = D(), _ = a, T = R && !r ? L(e, i.Required) : null, c = y ? L(e, i.Image) : null, E = (s == null ? void 0 : s.imagePosition) ?? u.TOP, h = q === d.ASTERISK && O === p.BEFORE_FIELD_TITLE,
|
|
18
|
+
const { as: a = "label", requiredIndicatorHidden: r = !1, label: o } = n, { label: b, required: R = !1, hideLabel: F = !1, requiredIndicatorType: q = d.ASTERISK, requiredIndicatorPlacement: O = p.AFTER_FIELD_TITLE, media: y, mediaSettings: s } = m(), { labelId: A, inputId: P } = D(), _ = a, T = R && !r ? L(e, i.Required) : null, c = y ? L(e, i.Image) : null, E = (s == null ? void 0 : s.imagePosition) ?? u.TOP, h = q === d.ASTERISK && O === p.BEFORE_FIELD_TITLE, f = (o ?? b) || U, I = /* @__PURE__ */ l.createElement(_, {
|
|
19
19
|
id: A,
|
|
20
20
|
htmlFor: a === "label" ? P : void 0,
|
|
21
21
|
className: t,
|
|
22
22
|
style: F ? S : void 0
|
|
23
|
-
}, h ? /* @__PURE__ */ l.createElement(l.Fragment, null, T,
|
|
24
|
-
return c ? /* @__PURE__ */ l.createElement("div", null, E === u.TOP ? c : null,
|
|
23
|
+
}, h ? /* @__PURE__ */ l.createElement(l.Fragment, null, T, f) : /* @__PURE__ */ l.createElement(l.Fragment, null, f, T));
|
|
24
|
+
return c ? /* @__PURE__ */ l.createElement("div", null, E === u.TOP ? c : null, I, E === u.BOTTOM ? c : null) : I;
|
|
25
25
|
}, v = ({ className: e }) => {
|
|
26
26
|
const { t } = B(), { requiredIndicatorType: n } = m();
|
|
27
27
|
return n === d.TEXT ? /* @__PURE__ */ l.createElement("span", {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import t, { useState as
|
|
1
|
+
import t, { useState as W, useRef as H, useMemo as pe, useEffect as ne, useCallback as M, createContext as ge, useContext as _e } from "react";
|
|
2
2
|
import Le from "@wix/editor-react-components/AnimatedIcon";
|
|
3
3
|
import { RicosViewer as he } from "@wix/ricos/viewer";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import R from "classnames";
|
|
5
|
+
import { bI as Ce, bX as re, bR as xe, aO as ve, bU as Ne, aH as ie, bW as De, bJ as fe, bM as V, bO as ye, bG as Se, bF as Te, X as Be, am as Ie, b as we, P as Re, Q as ce, R as Ae, N as ue, M as de, I as Me, O as Ze, f as te } from "./form-BG5UjjLA.js";
|
|
6
6
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { s as $ } from "./field-rac.module-DcyJyi2B.js";
|
|
8
|
-
import { u as me } from "./use-element-state-class-name-
|
|
8
|
+
import { u as me } from "./use-element-state-class-name-C8jFeDrq.js";
|
|
9
9
|
import { DropZone as Ue, Text as ke, FileTrigger as Pe, Button as Ee, ProgressBar as He, VisuallyHidden as ze } from "react-aria-components";
|
|
10
10
|
import { f as h, a as Y } from "./find-child-C60k4CxG.js";
|
|
11
|
-
import { b as Ve, a as je, D as qe, E as Ke } from "./field-error-headless-
|
|
12
|
-
import { L as $e } from "./field-label-headless-
|
|
13
|
-
const
|
|
11
|
+
import { b as Ve, a as je, D as qe, E as Ke } from "./field-error-headless-RTyrenpC.js";
|
|
12
|
+
import { L as $e } from "./field-label-headless-Bd00Hl2z.js";
|
|
13
|
+
const We = {
|
|
14
14
|
Video: "video/*",
|
|
15
15
|
Image: "image/*",
|
|
16
16
|
Audio: "audio/*",
|
|
@@ -43,40 +43,40 @@ const Qe = {
|
|
|
43
43
|
return (await Promise.all(E)).filter((o) => o !== void 0);
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
function
|
|
47
|
-
const [o, i] =
|
|
46
|
+
function Qe({ valueSliderLimit: e, value: n, explanationText: r, target: l, onChange: s, uploadFileFormats: d, onBlur: E, onFilesCleared: C }) {
|
|
47
|
+
const [o, i] = W(Xe(n)), [x, m] = W(n || []), [p, c] = W(), y = Ye(l), { t: v } = re(), g = xe().includes(ve.BUTTONS_HOVER), { setFormStatus: T } = Ne(), I = H(!1), B = H(s);
|
|
48
48
|
B.current = s;
|
|
49
|
-
const
|
|
49
|
+
const N = pe(() => o.some((f) => f.state === "uploading"), [
|
|
50
50
|
o
|
|
51
51
|
]);
|
|
52
52
|
ne(() => {
|
|
53
|
-
I.current !==
|
|
53
|
+
I.current !== N && (I.current = N, T(l, N ? ie.BUSY : ie.READY));
|
|
54
54
|
}, [
|
|
55
|
-
|
|
55
|
+
N,
|
|
56
56
|
T,
|
|
57
57
|
l
|
|
58
58
|
]);
|
|
59
|
-
const u =
|
|
59
|
+
const u = M(() => {
|
|
60
60
|
if (!o.length)
|
|
61
61
|
return;
|
|
62
62
|
const _ = o.filter((f) => f.state === "uploading").length;
|
|
63
63
|
if (_) {
|
|
64
64
|
const f = o.filter((F) => F.state === "uploaded" && F.file.size > 0).length, L = f / (f + _);
|
|
65
|
-
return
|
|
65
|
+
return v("form.file-upload.uploading", {
|
|
66
66
|
count: Math.round(L * 100)
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return v("form.file-upload.explanation-text", {
|
|
70
70
|
count: o.length
|
|
71
71
|
});
|
|
72
72
|
}, [
|
|
73
73
|
o,
|
|
74
|
-
|
|
75
|
-
]), w =
|
|
74
|
+
v
|
|
75
|
+
]), w = M(() => o.length ? o.some((f) => f.state === "uploading") ? u() : r || u() : r, [
|
|
76
76
|
o,
|
|
77
77
|
r,
|
|
78
78
|
u
|
|
79
|
-
]), S =
|
|
79
|
+
]), S = M(async (_) => {
|
|
80
80
|
await y(_, ({ file: f, uploadedFile: L }) => {
|
|
81
81
|
i((F) => F.map((b) => b.file === f ? {
|
|
82
82
|
file: f,
|
|
@@ -92,16 +92,16 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
92
92
|
i((F) => F.map((b) => b.file === L ? {
|
|
93
93
|
file: L,
|
|
94
94
|
state: "error",
|
|
95
|
-
errorMessage:
|
|
95
|
+
errorMessage: v("form.file-upload.error.upload-failed")
|
|
96
96
|
} : b));
|
|
97
97
|
});
|
|
98
98
|
}, [
|
|
99
99
|
y,
|
|
100
|
-
|
|
100
|
+
v
|
|
101
101
|
]), q = async (_) => {
|
|
102
102
|
if (p && c(void 0), _) {
|
|
103
103
|
if (o.length + _.length > e) {
|
|
104
|
-
c(
|
|
104
|
+
c(v("form.file-upload.error.upload-limit", {
|
|
105
105
|
limit: e
|
|
106
106
|
}));
|
|
107
107
|
return;
|
|
@@ -128,7 +128,7 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
128
128
|
}
|
|
129
129
|
}, K = () => {
|
|
130
130
|
p && c(void 0), E();
|
|
131
|
-
},
|
|
131
|
+
}, Q = d.map((_) => We[_]).join(), J = M(() => {
|
|
132
132
|
i([]), m([]);
|
|
133
133
|
}, []);
|
|
134
134
|
return De(J), {
|
|
@@ -139,7 +139,7 @@ function We({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
|
|
|
139
139
|
getStatusText: u,
|
|
140
140
|
handleChange: q,
|
|
141
141
|
handleDelete: O,
|
|
142
|
-
accept:
|
|
142
|
+
accept: Q,
|
|
143
143
|
handleBlur: K
|
|
144
144
|
};
|
|
145
145
|
}
|
|
@@ -206,14 +206,14 @@ const z = ({ children: e, className: n }) => {
|
|
|
206
206
|
limitReached: r
|
|
207
207
|
}));
|
|
208
208
|
}, oe = ({ className: e, children: n, "aria-roledescription": r, onHoverStart: l, onHoverEnd: s, onFocusChange: d }) => {
|
|
209
|
-
const { ariaDescribedBy: E, inputId: C, labelId: o, errorId: i } = fe(), { disabled: x, required: m, onFocus: p, hasError: c, errorMessage: y } = V(), { handleFileChange:
|
|
209
|
+
const { ariaDescribedBy: E, inputId: C, labelId: o, errorId: i } = fe(), { disabled: x, required: m, onFocus: p, hasError: c, errorMessage: y } = V(), { handleFileChange: v, accept: Z, multiple: g, buttonRef: T, handleBlur: I, limitError: B, files: N } = j(), u = (N == null ? void 0 : N.some((S) => S.errorMessage)) ?? !1, w = !!(c || y || B || u);
|
|
210
210
|
return /* @__PURE__ */ t.createElement(Pe, {
|
|
211
|
-
acceptedFileTypes:
|
|
211
|
+
acceptedFileTypes: Z ? Z.split(",") : void 0,
|
|
212
212
|
allowsMultiple: g,
|
|
213
213
|
onSelect: (S) => {
|
|
214
214
|
if (S) {
|
|
215
215
|
const q = Array.from(S), O = new DataTransfer();
|
|
216
|
-
q.forEach((K) => O.items.add(K)),
|
|
216
|
+
q.forEach((K) => O.items.add(K)), v(O.files);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}, /* @__PURE__ */ t.createElement(Ee, {
|
|
@@ -248,8 +248,8 @@ oe.Text = et;
|
|
|
248
248
|
z.Title = Ge;
|
|
249
249
|
z.Subtitle = Je;
|
|
250
250
|
z.Button = oe;
|
|
251
|
-
const
|
|
252
|
-
const { file: l, index: s } = r, d = l.file.name, E = h(e,
|
|
251
|
+
const A = ({ children: e, className: n, ...r }) => {
|
|
252
|
+
const { file: l, index: s } = r, d = l.file.name, E = h(e, A.Name), C = h(e, A.Remove), o = h(e, A.Spinner), i = h(e, A.Error);
|
|
253
253
|
return /* @__PURE__ */ t.createElement("div", {
|
|
254
254
|
className: n
|
|
255
255
|
}, Y(E, {
|
|
@@ -301,10 +301,10 @@ const R = ({ children: e, className: n, ...r }) => {
|
|
|
301
301
|
className: e,
|
|
302
302
|
isIndeterminate: !0
|
|
303
303
|
}, r);
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
304
|
+
A.Name = tt;
|
|
305
|
+
A.Remove = nt;
|
|
306
|
+
A.Spinner = rt;
|
|
307
|
+
A.Error = be;
|
|
308
308
|
be.Text = Ve;
|
|
309
309
|
const le = ({ children: e, className: n }) => {
|
|
310
310
|
const { files: r } = j(), l = h(e, le.File);
|
|
@@ -316,11 +316,11 @@ const le = ({ children: e, className: n }) => {
|
|
|
316
316
|
index: d
|
|
317
317
|
})));
|
|
318
318
|
};
|
|
319
|
-
le.File =
|
|
319
|
+
le.File = A;
|
|
320
320
|
const G = (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: m, FieldLayout: p } = V(), c = H(null), y = H({}),
|
|
322
|
-
c.current ? c.current.focus() :
|
|
323
|
-
}, []), { files: g, limitError: T, hover: I, getExplanationText: B, getStatusText:
|
|
321
|
+
const { t: n } = re(), { id: r, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target: C, explanationText: o, onBlur: i, hasError: x, errorMessage: m, FieldLayout: p } = V(), c = H(null), y = H({}), v = H(!1), Z = M(() => {
|
|
322
|
+
c.current ? c.current.focus() : v.current = !0;
|
|
323
|
+
}, []), { files: g, limitError: T, hover: I, getExplanationText: B, getStatusText: N, handleBlur: u, handleChange: w, handleDelete: S, accept: q } = Qe({
|
|
324
324
|
valueSliderLimit: E,
|
|
325
325
|
value: l,
|
|
326
326
|
explanationText: o,
|
|
@@ -328,8 +328,8 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
328
328
|
onChange: s,
|
|
329
329
|
uploadFileFormats: d,
|
|
330
330
|
onBlur: i,
|
|
331
|
-
onFilesCleared:
|
|
332
|
-
}), O =
|
|
331
|
+
onFilesCleared: Z
|
|
332
|
+
}), O = M((k) => {
|
|
333
333
|
var se;
|
|
334
334
|
const X = g[k], P = G(X);
|
|
335
335
|
g.length > 1 && ((se = (g.filter((ee) => G(ee) !== P).map((ee) => y.current[G(ee)]).find(Boolean) ?? c).current) == null || se.focus()), S(k);
|
|
@@ -338,20 +338,20 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
338
338
|
g
|
|
339
339
|
]);
|
|
340
340
|
ne(() => {
|
|
341
|
-
|
|
341
|
+
v.current && c.current && (v.current = !1, c.current.focus());
|
|
342
342
|
}, [
|
|
343
343
|
g
|
|
344
344
|
]);
|
|
345
|
-
const K = E > 1,
|
|
345
|
+
const K = E > 1, Q = g.length >= E, J = pe(() => ({
|
|
346
346
|
handleFileChange: w,
|
|
347
347
|
handleBlur: u,
|
|
348
348
|
handleDelete: O,
|
|
349
349
|
files: g,
|
|
350
350
|
accept: q,
|
|
351
|
-
limitReached:
|
|
351
|
+
limitReached: Q,
|
|
352
352
|
multiple: K,
|
|
353
353
|
getExplanationText: B,
|
|
354
|
-
getStatusText:
|
|
354
|
+
getStatusText: N,
|
|
355
355
|
hover: I,
|
|
356
356
|
limitError: T,
|
|
357
357
|
buttonRef: c,
|
|
@@ -362,10 +362,10 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
|
362
362
|
O,
|
|
363
363
|
g,
|
|
364
364
|
q,
|
|
365
|
-
|
|
365
|
+
Q,
|
|
366
366
|
K,
|
|
367
367
|
B,
|
|
368
|
-
|
|
368
|
+
N,
|
|
369
369
|
I,
|
|
370
370
|
T
|
|
371
371
|
]), _ = h(e, a.Label), f = h(e, a.DropZone), L = h(e, a.Button), F = h(e, a.Explanation), b = h(e, a.Files), U = h(e, a.Description), ae = h(e, a.Error);
|
|
@@ -487,8 +487,8 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
487
487
|
}, xt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(he, {
|
|
488
488
|
content: e,
|
|
489
489
|
locale: n
|
|
490
|
-
}),
|
|
491
|
-
var T, I, B,
|
|
490
|
+
}), vt = () => {
|
|
491
|
+
var T, I, B, N;
|
|
492
492
|
const { t: e } = re(), { disabled: n, readOnly: r } = V(), l = !n && !r, s = me({
|
|
493
493
|
globalClasses: ue,
|
|
494
494
|
moduleClasses: {
|
|
@@ -496,22 +496,22 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
496
496
|
hover: D.dropZoneHover
|
|
497
497
|
}
|
|
498
498
|
}), d = me({
|
|
499
|
-
globalClasses:
|
|
499
|
+
globalClasses: Ze,
|
|
500
500
|
moduleClasses: {
|
|
501
501
|
base: D.button,
|
|
502
502
|
hover: D.buttonHover
|
|
503
503
|
}
|
|
504
|
-
}), E = (
|
|
504
|
+
}), E = (N = (B = (I = (T = Se().fileUpload) == null ? void 0 : T.elementProps) == null ? void 0 : I.uploadButton) == null ? void 0 : B.elementProps) == null ? void 0 : N.icon, { wix: C, className: o, ...i } = E ?? {}, x = Te(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), m = H(null), [p, c] = W(!1), [y, v] = W(!1), Z = M(() => {
|
|
505
505
|
var u;
|
|
506
506
|
c(!0), (u = m.current) == null || u.runAnimationForward();
|
|
507
|
-
}, []), g =
|
|
507
|
+
}, []), g = M(() => {
|
|
508
508
|
var u;
|
|
509
509
|
c(!1), (u = m.current) == null || u.runAnimationBackward();
|
|
510
510
|
}, []);
|
|
511
511
|
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
512
|
-
className:
|
|
512
|
+
className: R(Be, $.label)
|
|
513
513
|
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
514
|
-
className:
|
|
514
|
+
className: R(Ie, $.requiredMark)
|
|
515
515
|
})), /* @__PURE__ */ t.createElement(a.DropZone, {
|
|
516
516
|
className: ({ isHovered: u, isFocused: w, isDropTarget: S }) => s({
|
|
517
517
|
isSelected: !1,
|
|
@@ -531,24 +531,24 @@ const lt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
531
531
|
isInteractive: l
|
|
532
532
|
}),
|
|
533
533
|
"aria-roledescription": e("file-upload.aria-roledescription"),
|
|
534
|
-
onHoverStart:
|
|
534
|
+
onHoverStart: Z,
|
|
535
535
|
onHoverEnd: g,
|
|
536
|
-
onFocusChange:
|
|
536
|
+
onFocusChange: v
|
|
537
537
|
}, i.svg ? /* @__PURE__ */ t.createElement(Le, {
|
|
538
538
|
...i,
|
|
539
539
|
ref: m,
|
|
540
|
-
className:
|
|
540
|
+
className: R(we, Re, o)
|
|
541
541
|
}) : E ? null : /* @__PURE__ */ t.createElement(lt, null), /* @__PURE__ */ t.createElement(a.DropZone.Button.Text, {
|
|
542
|
-
className:
|
|
542
|
+
className: R(ce.base, D.buttonLabel, x, {
|
|
543
543
|
[ce.hover]: l && (p || y)
|
|
544
544
|
})
|
|
545
545
|
}))), /* @__PURE__ */ t.createElement(a.Explanation, {
|
|
546
|
-
className:
|
|
546
|
+
className: R(Ae, $.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(ue.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 lt = (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(st, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
|
|
561
|
-
className:
|
|
561
|
+
className: R(de, $.error, D.fileError)
|
|
562
562
|
}, /* @__PURE__ */ t.createElement(at, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
|
|
563
|
-
className:
|
|
563
|
+
className: R(Me, $.description)
|
|
564
564
|
}, xt), /* @__PURE__ */ t.createElement(a.Error, {
|
|
565
|
-
className:
|
|
565
|
+
className: R(de, $.error)
|
|
566
566
|
}, /* @__PURE__ */ t.createElement(Oe, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
|
|
567
|
-
}, Ut = () => /* @__PURE__ */ t.createElement(
|
|
567
|
+
}, Ut = () => /* @__PURE__ */ t.createElement(vt, null);
|
|
568
568
|
export {
|
|
569
569
|
Ut as FileUploadRAC
|
|
570
570
|
};
|