@wix/form-elements 1.83.0 → 1.85.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-ky2cE6hE.js → appointment-rac-CCaJ6P5r.js} +78 -78
- package/dist/component/{bookings-address-rac-Bxc6H9Pb.js → bookings-address-rac-DEt9SGPG.js} +1 -1
- package/dist/component/{bookings-email-rac-Dw1Xttdx.js → bookings-email-rac-BydOvOUZ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-dgHOrJaJ.js → bookings-first-name-rac-BoQki0Pb.js} +1 -1
- package/dist/component/{bookings-header-rac-Bl9RYGWo.js → bookings-header-rac-DK-EcXrk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BeqYpbZq.js → bookings-last-name-rac-BuGIyd43.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C1k6o0A5.js → bookings-login-bar-rac-Cr500ehb.js} +6 -6
- package/dist/component/{bookings-phone-rac-ByhaJrwE.js → bookings-phone-rac-Bq2zdMxo.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Mw5-ZiIn.js → bookings-rich-text-rac-DRmfusX9.js} +1 -1
- package/dist/component/{checkbox-field-rac-CMEI5t4Y.js → checkbox-field-rac-b9mcZlMP.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-CP21R7_s.js → checkbox-group-field-headless-BSNhdCfs.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DGOZjSIY.js → checkbox-group-field-rac-BObfui8r.js} +6 -6
- package/dist/component/{checkbox-group-rac-CEGtshrl.js → checkbox-group-rac-CBNMgBHU.js} +1 -1
- package/dist/component/{checkbox-rac-DCnRh1WF.js → checkbox-rac-DXh-i6Ot.js} +1 -1
- package/dist/component/{contacts-address-rac-CZb_5N5o.js → contacts-address-rac-BDQLFakc.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DZlwSyp5.js → contacts-birthdate-rac-BUMVVVfb.js} +1 -1
- package/dist/component/{contacts-company-rac-BNEF6LjB.js → contacts-company-rac-CidGcaA3.js} +1 -1
- package/dist/component/{contacts-email-rac-CAgk_zfN.js → contacts-email-rac-GePAhKDQ.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DyTVcmrX.js → contacts-first-name-rac-kw5sIBEE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DrFcDcGr.js → contacts-last-name-rac-DzoZKs1n.js} +1 -1
- package/dist/component/{contacts-phone-rac-UAPALlFx.js → contacts-phone-rac-CxVW4Zp0.js} +1 -1
- package/dist/component/{contacts-position-rac-CJ1M4kJJ.js → contacts-position-rac-CXFxlSty.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-1cEd5s1l.js → contacts-subscribe-rac-kpRGeELB.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-CqnO__fd.js → contacts-tax-id-rac-B5qw-rtP.js} +1 -1
- package/dist/component/{date-availability-COM2EaRy.js → date-availability-BCDMem-_.js} +1 -1
- package/dist/component/{date-input-field-rac-CuuWbw42.js → date-input-field-rac-BLDZ4_Mw.js} +43 -43
- package/dist/component/{date-input-rac-DfVmj9Gc.js → date-input-rac-B1WGYKOp.js} +1 -1
- package/dist/component/{date-picker-field-rac-BFCZik9T.js → date-picker-field-rac-BNd8aZ0c.js} +20 -20
- package/dist/component/{date-picker-rac-C2vajJpb.js → date-picker-rac-ItWxSngw.js} +1 -1
- package/dist/component/date-time-input-field-rac-Ch8z0NRT.js +423 -0
- package/dist/component/{date-time-input-rac-D4FEieQz.js → date-time-input-rac-FebIovNN.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BDBBTNNo.js → dext-checkbox-group-rac-BXYHMQ3R.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DAAhNboR.js → dext-checkbox-rac-C78ScIGY.js} +1 -1
- package/dist/component/{dext-date-picker-rac-me7XbR5z.js → dext-date-picker-rac-BptT4fhe.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DLsUl2Eg.js → dext-date-time-input-rac-RWJ51IjA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3vVIRir.js → dext-dropdown-rac-DZDOtSIG.js} +1 -1
- package/dist/component/{dext-email-rac-a8qXYTLP.js → dext-email-rac-CJceqZsw.js} +1 -1
- package/dist/component/{dext-number-input-rac-DdDnL_fX.js → dext-number-input-rac-buSXk49E.js} +1 -1
- package/dist/component/{dext-phone-rac-ByaxbHpO.js → dext-phone-rac-CeHUOWck.js} +1 -1
- package/dist/component/{dext-radio-group-rac-Bzubt7Uy.js → dext-radio-group-rac-CNyNSfeP.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BZ1EvOkG.js → dext-rating-input-rac-mmdh9tYT.js} +1 -1
- package/dist/component/{dext-tags-rac-C_R89noV.js → dext-tags-rac-CqJ4iv-V.js} +2 -2
- package/dist/component/{dext-text-area-rac-DRpYeQ-K.js → dext-text-area-rac-P1EzLNDE.js} +1 -1
- package/dist/component/{dext-text-input-rac-D_RtbQQ-.js → dext-text-input-rac-Dtz4ZLj7.js} +1 -1
- package/dist/component/{dext-url-input-rac-BSSjSbIo.js → dext-url-input-rac-DUVbW2yl.js} +1 -1
- package/dist/component/{donation-rac-De0KyyGR.js → donation-rac-Nn7z8_to.js} +43 -43
- package/dist/component/{dropdown-field-headless-DNhnTDlD.js → dropdown-field-headless-CT4uSCPR.js} +11 -11
- package/dist/component/{dropdown-field-rac-Bq_FNv9a.js → dropdown-field-rac-CUiyFJi_.js} +5 -5
- package/dist/component/{dropdown-rac-0UIyqF15.js → dropdown-rac-Bs_PVy1q.js} +1 -1
- package/dist/component/{ecom-address-rac-7IVbvs3J.js → ecom-address-rac-BTXwDlMM.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DilgIpiG.js → ecom-subscription-checkbox-rac-CGI84A37.js} +3 -3
- package/dist/component/{email-input-field-rac-CHJ6RSGy.js → email-input-field-rac-DKD7FsQX.js} +54 -54
- package/dist/component/{events-repeater-rac-v18FFLC7.js → events-repeater-rac-B7yIRlyt.js} +30 -30
- package/dist/component/{events-rsvp-rac-BpGLrxsf.js → events-rsvp-rac-C7FOuFmH.js} +3 -3
- package/dist/component/{field-error-headless-DAy-1oAQ.js → field-error-headless-BHTkMu35.js} +1 -1
- package/dist/component/{field-label-headless-BWxHmO0c.js → field-label-headless-D3DwX65k.js} +7 -7
- package/dist/component/{file-upload-rac-BfWN27JT.js → file-upload-rac-B3n_LYYK.js} +85 -85
- package/dist/component/{fixed-payment-rac-Bha61SB4.js → fixed-payment-rac-C6jsiS4-.js} +12 -12
- package/dist/component/{form-D0eeH0lX.js → form-BkmOXzqo.js} +2510 -2487
- package/dist/component/{form-element-classes-Ct1UaxuQ.js → form-element-classes-BsXkFtp2.js} +90 -57
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-uNzfDMbv.js → header-field-rac-FG9EP9--.js} +5 -5
- package/dist/component/{header-rac-B91q4fHl.js → header-rac-DZZgqFjW.js} +1 -1
- package/dist/component/{image-choice-rac-BKcnNGPp.js → image-choice-rac-CXgE6z_f.js} +42 -42
- package/dist/component/{index-BWHymomM.js → index-CSwTHDCX.js} +2 -2
- package/dist/component/{index-BvzLLTKc.js → index-DKV2sNhD.js} +4 -4
- package/dist/component/{isObjectLike-D7Mkqoju.js → isObjectLike-DYfHbEQ3.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Avd9Vlv1.js → multiline-address-field-rac-DnCOKW8F.js} +128 -128
- package/dist/component/{multiline-address-rac-BwQOoejw.js → multiline-address-rac-BZRlzLZq.js} +1 -1
- package/dist/component/{number-input-field-rac-CRqPXDl0.js → number-input-field-rac-BOJNJ50c.js} +30 -30
- package/dist/component/{number-input-rac-0Y8K4e6K.js → number-input-rac-D8ZcIPwq.js} +1 -1
- package/dist/component/{password-rac-C7F6sEB3.js → password-rac-T9PR5j2v.js} +19 -19
- package/dist/component/{payment-input-rac-CTJr4QTK.js → payment-input-rac-C9N3LZOZ.js} +17 -17
- package/dist/component/{phone-input-field-rac-jjSmYCI1.js → phone-input-field-rac-BxUiCV5Z.js} +40 -40
- package/dist/component/{phone-rac-BwSnmgYF.js → phone-rac-BjKFrr86.js} +1 -1
- package/dist/component/{product-list-rac-CTN2wvHE.js → product-list-rac-BG-VK_Hz.js} +41 -41
- package/dist/component/{quiz-radio-group-rac-CZHEDJxr.js → quiz-radio-group-rac-B1x7Yatu.js} +2 -2
- package/dist/component/{radio-button-module-classes-DCz6XS1X.js → radio-button-module-classes-BXWANbga.js} +7 -7
- package/dist/component/{radio-group-field-rac-60MF_9DO.js → radio-group-field-rac-DmEOydAr.js} +4 -4
- package/dist/component/{radio-group-rac-Dqo-Earp.js → radio-group-rac-DAcU_lkj.js} +1 -1
- package/dist/component/{rating-input-field-rac-CzWTwWT8.js → rating-input-field-rac-Cazqeqzw.js} +16 -16
- package/dist/component/{rating-input-rac-Nq4tll2Z.js → rating-input-rac-KJ8FnJTj.js} +1 -1
- package/dist/component/{rich-content-rac.module-sUUSbcSy.js → rich-content-rac.module-PZgMV2M7.js} +1 -1
- package/dist/component/{rich-text-field-rac-BvLfS4I5.js → rich-text-field-rac-DNEeY_m8.js} +3 -3
- package/dist/component/{rich-text-rac-BWkTbWk3.js → rich-text-rac-g9upYD25.js} +1 -1
- package/dist/component/{service-dropdown-rac-DZ3USe7_.js → service-dropdown-rac-CmmWetDa.js} +20 -20
- package/dist/component/{services-multi-choice-rac-D-og7fMo.js → services-multi-choice-rac-D0PJNlq2.js} +7 -7
- package/dist/component/{signature-rac-D3c4fnvN.js → signature-rac-Q4G3uEhw.js} +41 -41
- package/dist/component/submit-button-rac-DdLPGJ6v.js +141 -0
- package/dist/component/{tags-field-rac-DXmZBcpO.js → tags-field-rac-PZ8Vfmsn.js} +72 -72
- package/dist/component/{tags-rac-CoXWx42D.js → tags-rac-DLjeR5G1.js} +1 -1
- package/dist/component/{text-area-field-rac-Cy0Mr29Z.js → text-area-field-rac-BNVK0R0Z.js} +25 -25
- package/dist/component/{text-area-rac-C3Mjmgpa.js → text-area-rac-CNOLe3Vx.js} +1 -1
- package/dist/component/{text-input-field-rac-D1TB9B_M.js → text-input-field-rac-DjdW6TCf.js} +3 -3
- package/dist/component/{text-input-headless-BUa59Rgn.js → text-input-headless-DFWQwZAN.js} +10 -10
- package/dist/component/{text-input-rac-BQ3Z9ws4.js → text-input-rac-GXPtQEjT.js} +1 -1
- package/dist/component/time-input-rac-B_g-erqu.js +159 -0
- package/dist/component/{url-input-field-rac-DINXfZdf.js → url-input-field-rac-CXWYeQLf.js} +19 -19
- package/dist/component/{url-input-rac-Ch9eTIF_.js → url-input-rac-DX-vjyXj.js} +1 -1
- package/dist/component/use-element-state-class-name-lZnP6sE6.js +22 -0
- package/dist/component/{use-service-options-base-BJZhzDyO.js → use-service-options-base-BJE86Rzo.js} +5 -5
- package/dist/component/{use-text-input-class-name-8gMUWeCb.js → use-text-input-class-name-B-GYaltW.js} +5 -5
- package/dist/form.d.ts +58 -2
- package/package.json +5 -3
- package/dist/component/date-time-input-field-rac-B7ne2emo.js +0 -423
- package/dist/component/submit-button-rac-Dn_BGt1n.js +0 -116
- package/dist/component/time-input-rac-Wi0oD5YF.js +0 -155
- package/dist/component/use-element-state-class-name-j8W1zbdG.js +0 -20
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as $, useMemo as v, useCallback as V, useRef as x } from "react";
|
|
2
2
|
import T from "classnames";
|
|
3
3
|
import { NumberField as z, Input as J, CheckboxField as Q, CheckboxButton as W, Button as w } from "react-aria-components";
|
|
4
|
-
import {
|
|
4
|
+
import { ap as U, aq as P, af as H, ak as K, u as Y, aj as D, ag as X, al as j, j as Z } from "./form-BkmOXzqo.js";
|
|
5
5
|
import { f as b, a as L } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { L as ee } from "./field-label-headless-
|
|
6
|
+
import { L as ee } from "./field-label-headless-D3DwX65k.js";
|
|
7
7
|
import { S as te } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
8
|
import { u as se } from "./use-invoke-callback-UH73A_J3.js";
|
|
9
9
|
import { C as k } from "./chevron-down-icon-CcpVm6B-.js";
|
|
10
10
|
import { C as ne } from "./checkbox-indicator-module-classes-Bb3xB1ve.js";
|
|
11
11
|
import { s as B } from "./field-rac.module-D06m9T9x.js";
|
|
12
|
-
import { y as oe, x as re, p as ae, r as le, q as ce } from "./form-element-classes-
|
|
13
|
-
import { u as ue } from "./use-element-state-class-name-
|
|
12
|
+
import { y as oe, x as re, p as ae, r as le, q as ce } from "./form-element-classes-BsXkFtp2.js";
|
|
13
|
+
import { u as ue } from "./use-element-state-class-name-lZnP6sE6.js";
|
|
14
14
|
const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, errors: m = me, validation: c }) => {
|
|
15
|
-
const [i, E] =
|
|
15
|
+
const [i, E] = $((r == null ? void 0 : r.length) || 0), a = v(() => r ?? [], [
|
|
16
16
|
r
|
|
17
|
-
]), C = U(),
|
|
17
|
+
]), C = U(), f = P(), d = H(), { validateFields: u } = K(), F = c.predefined.objectArrayOptions.maxItems, _ = v(() => Y({
|
|
18
18
|
form: {
|
|
19
19
|
fields: n,
|
|
20
20
|
steps: [
|
|
@@ -37,7 +37,7 @@ const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, error
|
|
|
37
37
|
}), p;
|
|
38
38
|
}, []), [
|
|
39
39
|
m
|
|
40
|
-
]),
|
|
40
|
+
]), g = V((p) => {
|
|
41
41
|
const I = Number.isNaN(p) ? 0 : Math.min(Math.max(p, 0), F);
|
|
42
42
|
E(I), s == null || s(Array.from({
|
|
43
43
|
length: I
|
|
@@ -49,7 +49,7 @@ const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, error
|
|
|
49
49
|
]), S = V((p) => (I, A) => {
|
|
50
50
|
const N = Array.from({
|
|
51
51
|
length: i
|
|
52
|
-
}, (h,
|
|
52
|
+
}, (h, q) => a[q] ?? {});
|
|
53
53
|
N[p] = {
|
|
54
54
|
...N[p],
|
|
55
55
|
[I]: A
|
|
@@ -66,14 +66,14 @@ const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, error
|
|
|
66
66
|
errorsByIndex: G,
|
|
67
67
|
formView: _,
|
|
68
68
|
formSchema: C,
|
|
69
|
-
formFields:
|
|
69
|
+
formFields: f,
|
|
70
70
|
fieldActions: d,
|
|
71
71
|
validateFields: u,
|
|
72
|
-
changeGuestCount:
|
|
72
|
+
changeGuestCount: g,
|
|
73
73
|
changeGuestField: S
|
|
74
74
|
};
|
|
75
75
|
}, de = [], pe = {}, o = ({ children: t, className: n }) => {
|
|
76
|
-
const l = D(), { id: r, FieldLayout: s } = l, { guestLimit: m, guestCount: c, guests: i, errorsByIndex: E, formView: a, changeGuestCount: C, changeGuestField:
|
|
76
|
+
const l = D(), { id: r, FieldLayout: s } = l, { guestLimit: m, guestCount: c, guests: i, errorsByIndex: E, formView: a, changeGuestCount: C, changeGuestField: f } = ie(l), d = b(t, o.Label), u = b(t, o.GuestCount), F = b(t, o.GuestToggle), _ = b(t, o.Guests), G = m > 1;
|
|
77
77
|
return /* @__PURE__ */ e.createElement(s, {
|
|
78
78
|
fieldId: r,
|
|
79
79
|
renderLabel: () => G ? d : null,
|
|
@@ -91,19 +91,19 @@ const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, error
|
|
|
91
91
|
guests: i,
|
|
92
92
|
errorsByIndex: E,
|
|
93
93
|
formView: a,
|
|
94
|
-
onGuestFieldChange:
|
|
94
|
+
onGuestFieldChange: f
|
|
95
95
|
})),
|
|
96
96
|
renderDescription: () => null
|
|
97
97
|
});
|
|
98
98
|
}, Ee = ({ className: t }) => /* @__PURE__ */ e.createElement(ee, {
|
|
99
99
|
className: t
|
|
100
100
|
}, null), O = ({ children: t, className: n, groupClassName: l, ...r }) => {
|
|
101
|
-
const { guestLimit: s, guestCount: m, onGuestCountChange: c } = r, { id: i, label: E, disabled: a, readOnly: C, onBlur:
|
|
101
|
+
const { guestLimit: s, guestCount: m, onGuestCountChange: c } = r, { id: i, label: E, disabled: a, readOnly: C, onBlur: f, onFocus: d } = D(), { inputId: u, ariaDescribedBy: F } = X(), _ = se(f), G = x(null);
|
|
102
102
|
j(() => {
|
|
103
103
|
var p;
|
|
104
104
|
(p = G.current) == null || p.focus();
|
|
105
105
|
}, i);
|
|
106
|
-
const
|
|
106
|
+
const g = b(t, O.Decrement), S = b(t, O.Increment);
|
|
107
107
|
return /* @__PURE__ */ e.createElement(z, {
|
|
108
108
|
className: l,
|
|
109
109
|
"aria-label": E,
|
|
@@ -122,27 +122,27 @@ const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, error
|
|
|
122
122
|
"aria-describedby": F,
|
|
123
123
|
className: n,
|
|
124
124
|
inputMode: "numeric"
|
|
125
|
-
}), S,
|
|
125
|
+
}), S, g);
|
|
126
126
|
}, Ce = ({ children: t, className: n }) => /* @__PURE__ */ e.createElement(w, {
|
|
127
127
|
slot: "decrement",
|
|
128
128
|
className: n
|
|
129
|
-
}, t),
|
|
129
|
+
}, t), ge = ({ children: t, className: n }) => /* @__PURE__ */ e.createElement(w, {
|
|
130
130
|
slot: "increment",
|
|
131
131
|
className: n
|
|
132
132
|
}, t), R = ({ children: t, className: n, ...l }) => {
|
|
133
|
-
const { guestCount: r, onGuestCountChange: s } = l, { id: m, label: c, disabled: i, readOnly: E, onBlur: a, onFocus: C } = D(), { inputId:
|
|
133
|
+
const { guestCount: r, onGuestCountChange: s } = l, { id: m, label: c, disabled: i, readOnly: E, onBlur: a, onFocus: C } = D(), { inputId: f, ariaDescribedBy: d } = X(), u = x(null);
|
|
134
134
|
j(() => {
|
|
135
|
-
var
|
|
136
|
-
(
|
|
135
|
+
var g;
|
|
136
|
+
(g = u.current) == null || g.focus();
|
|
137
137
|
}, m);
|
|
138
|
-
const F = b(t, R.Input), _ = b(t, R.Label), G = V((
|
|
139
|
-
s(
|
|
138
|
+
const F = b(t, R.Input), _ = b(t, R.Label), G = V((g) => {
|
|
139
|
+
s(g ? 1 : 0);
|
|
140
140
|
}, [
|
|
141
141
|
s
|
|
142
142
|
]);
|
|
143
143
|
return /* @__PURE__ */ e.createElement(Q, {
|
|
144
144
|
inputRef: u,
|
|
145
|
-
id:
|
|
145
|
+
id: f,
|
|
146
146
|
"aria-describedby": d,
|
|
147
147
|
isSelected: r > 0,
|
|
148
148
|
onChange: G,
|
|
@@ -152,13 +152,13 @@ const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, error
|
|
|
152
152
|
onFocus: C
|
|
153
153
|
}, /* @__PURE__ */ e.createElement(W, {
|
|
154
154
|
className: n
|
|
155
|
-
}, ({ isSelected:
|
|
156
|
-
isSelected:
|
|
155
|
+
}, ({ isSelected: g, isHovered: S }) => /* @__PURE__ */ e.createElement(e.Fragment, null, L(F, {
|
|
156
|
+
isSelected: g,
|
|
157
157
|
isHovered: S
|
|
158
158
|
}), L(_, {
|
|
159
159
|
label: c
|
|
160
160
|
}))));
|
|
161
|
-
},
|
|
161
|
+
}, fe = ({ className: t, ...n }) => {
|
|
162
162
|
const { label: l } = n;
|
|
163
163
|
return /* @__PURE__ */ e.createElement("span", {
|
|
164
164
|
className: t
|
|
@@ -178,12 +178,12 @@ const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, error
|
|
|
178
178
|
c,
|
|
179
179
|
E,
|
|
180
180
|
a
|
|
181
|
-
]),
|
|
181
|
+
]), f = b(t, M.Guest);
|
|
182
182
|
return r ? /* @__PURE__ */ e.createElement("div", {
|
|
183
183
|
className: n
|
|
184
184
|
}, Array.from({
|
|
185
185
|
length: r
|
|
186
|
-
}, (d, u) => L(
|
|
186
|
+
}, (d, u) => L(f, {
|
|
187
187
|
key: u,
|
|
188
188
|
index: u,
|
|
189
189
|
formView: C,
|
|
@@ -208,9 +208,9 @@ const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, error
|
|
|
208
208
|
}));
|
|
209
209
|
};
|
|
210
210
|
O.Decrement = Ce;
|
|
211
|
-
O.Increment =
|
|
211
|
+
O.Increment = ge;
|
|
212
212
|
R.Input = te;
|
|
213
|
-
R.Label =
|
|
213
|
+
R.Label = fe;
|
|
214
214
|
M.Guest = Fe;
|
|
215
215
|
o.Label = Ee;
|
|
216
216
|
o.GuestCount = O;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
3
3
|
import s from "classnames";
|
|
4
|
-
import { a, s as o, R as c } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s as o, R as c } from "./radio-button-module-classes-BXWANbga.js";
|
|
5
5
|
import { E } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as l } from "./field-rac.module-D06m9T9x.js";
|
|
7
|
-
import { y as i,
|
|
8
|
-
import { u } from "./use-element-state-class-name-
|
|
7
|
+
import { y as i, P as p, Q as R, R as _, o as O, i as L, S } from "./form-element-classes-BsXkFtp2.js";
|
|
8
|
+
import { u } from "./use-element-state-class-name-lZnP6sE6.js";
|
|
9
9
|
const e = ({ children: r }) => /* @__PURE__ */ t.createElement(a, null, r);
|
|
10
10
|
e.Label = a.Label;
|
|
11
11
|
e.Options = a.Options;
|
package/dist/component/{field-error-headless-DAy-1oAQ.js → field-error-headless-BHTkMu35.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import t, { createContext as m, useContext as M } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { aj as c, ag as i, ab as f, T as x, U as h } from "./form-BkmOXzqo.js";
|
|
3
3
|
const b = ({ className: r, children: e }) => {
|
|
4
4
|
const { description: s, target: o } = c(), { descriptionId: a } = i(), { language: n } = f();
|
|
5
5
|
return s ? /* @__PURE__ */ t.createElement("div", {
|
package/dist/component/{field-label-headless-BWxHmO0c.js → field-label-headless-D3DwX65k.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aj as m, R as d, q as p, ag as D, at as B } from "./form-BkmOXzqo.js";
|
|
2
2
|
import l from "react";
|
|
3
|
-
import { f as
|
|
4
|
-
import { sdk as
|
|
3
|
+
import { f as g } from "./find-child-C60k4CxG.js";
|
|
4
|
+
import { sdk as L } from "@wix/image-kit";
|
|
5
5
|
function N({ id: e, width: t, height: n }, a, r, o = "fill") {
|
|
6
|
-
return (o === "fit" ?
|
|
6
|
+
return (o === "fit" ? L.getScaleToFitImageURL : L.getScaleToFillImageURL)(e, t, n, typeof a == "number" ? a : parseInt(a, 10), typeof r == "number" ? r : parseInt(r, 10));
|
|
7
7
|
}
|
|
8
8
|
var u = /* @__PURE__ */ (function(e) {
|
|
9
9
|
return e.TOP = "top", e.BOTTOM = "bottom", e;
|
|
@@ -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: T, required:
|
|
18
|
+
const { as: a = "label", requiredIndicatorHidden: r = !1, label: o } = n, { label: T, required: R = !1, hideLabel: q = !1, requiredIndicatorType: F = d.ASTERISK, requiredIndicatorPlacement: O = p.AFTER_FIELD_TITLE, media: y, mediaSettings: s } = m(), { labelId: A, inputId: P } = D(), _ = a, E = R && !r ? g(e, i.Required) : null, c = y ? g(e, i.Image) : null, f = (s == null ? void 0 : s.imagePosition) ?? u.TOP, h = F === d.ASTERISK && O === p.BEFORE_FIELD_TITLE, I = (o ?? T) || U, b = /* @__PURE__ */ l.createElement(_, {
|
|
19
19
|
id: A,
|
|
20
20
|
htmlFor: a === "label" ? P : void 0,
|
|
21
21
|
className: t,
|
|
22
22
|
style: q ? S : void 0
|
|
23
|
-
}, h ? /* @__PURE__ */ l.createElement(l.Fragment, null,
|
|
24
|
-
return c ? /* @__PURE__ */ l.createElement("div", null,
|
|
23
|
+
}, h ? /* @__PURE__ */ l.createElement(l.Fragment, null, E, I) : /* @__PURE__ */ l.createElement(l.Fragment, null, I, E));
|
|
24
|
+
return c ? /* @__PURE__ */ l.createElement("div", null, f === u.TOP ? c : null, b, f === u.BOTTOM ? c : null) : b;
|
|
25
25
|
}, v = ({ className: e }) => {
|
|
26
26
|
const { t } = B(), { requiredIndicatorType: n } = m();
|
|
27
27
|
return n === d.TEXT ? /* @__PURE__ */ l.createElement("span", {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import t, { useState as Q, useRef as V, useMemo as oe, useEffect as se, useCallback as P, createContext as pe, useContext as fe } from "react";
|
|
2
2
|
import { RicosViewer as Ee } from "@wix/ricos/viewer";
|
|
3
3
|
import B from "classnames";
|
|
4
|
-
import {
|
|
4
|
+
import { af as Fe, at as ie, ao as ge, i as he, ar as xe, e as re, as as be, ag as ce, aj as j, al as Ce } from "./form-BkmOXzqo.js";
|
|
5
5
|
import { E as Le } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as I } from "./field-rac.module-D06m9T9x.js";
|
|
7
|
-
import { y as ne,
|
|
7
|
+
import { y as ne, P as De, a3 as Ne, i as le, o as ae } from "./form-element-classes-BsXkFtp2.js";
|
|
8
8
|
import { f as h, a as z } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { b as ye, a as ve, D as _e, E as Te } from "./field-error-headless-
|
|
10
|
-
import { L as Be } from "./field-label-headless-
|
|
9
|
+
import { b as ye, a as ve, D as _e, E as Te } from "./field-error-headless-BHTkMu35.js";
|
|
10
|
+
import { L as Be } from "./field-label-headless-D3DwX65k.js";
|
|
11
11
|
import { DropZone as Re, Text as Se, FileTrigger as Me, Button as de, ProgressBar as Ie } from "react-aria-components";
|
|
12
12
|
const we = {
|
|
13
13
|
Video: "video/*",
|
|
@@ -21,32 +21,32 @@ const we = {
|
|
|
21
21
|
return async (o, i, d) => {
|
|
22
22
|
if (!(r != null && r.uploadFile) || !o.length)
|
|
23
23
|
return r != null && r.uploadFile || console.error("No uploadFile action"), o.length || console.error("No files to upload"), [];
|
|
24
|
-
const x = o.map(({ file:
|
|
25
|
-
file:
|
|
24
|
+
const x = o.map(({ file: l }) => r.uploadFile({
|
|
25
|
+
file: l,
|
|
26
26
|
formId: n,
|
|
27
27
|
uploadTarget: e
|
|
28
28
|
}).then((s) => {
|
|
29
29
|
const { id: b, displayName: m, url: c, isPrivate: N } = s, y = {
|
|
30
30
|
fileId: b,
|
|
31
|
-
displayName: m ||
|
|
31
|
+
displayName: m || l.name,
|
|
32
32
|
url: N ? void 0 : c,
|
|
33
|
-
fileType:
|
|
33
|
+
fileType: l.type || "application/octet-stream"
|
|
34
34
|
};
|
|
35
35
|
return i({
|
|
36
|
-
file:
|
|
36
|
+
file: l,
|
|
37
37
|
uploadedFile: y
|
|
38
38
|
}), y;
|
|
39
39
|
}).catch((s) => {
|
|
40
|
-
d(s,
|
|
40
|
+
d(s, l);
|
|
41
41
|
}));
|
|
42
|
-
return (await Promise.all(x)).filter((
|
|
42
|
+
return (await Promise.all(x)).filter((l) => l !== void 0);
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onChange: i, uploadFileFormats: d, onBlur: x, onFilesCleared: D }) {
|
|
46
|
-
const [
|
|
46
|
+
const [l, s] = Q(Ue(r)), [b, m] = Q(r || []), [c, N] = Q(), y = Ae(o), { t: E } = ie(), U = ge().includes(he.BUTTONS_HOVER), { setFormStatus: v } = xe(), S = V(!1), _ = V(i);
|
|
47
47
|
_.current = i;
|
|
48
|
-
const C = oe(() =>
|
|
49
|
-
|
|
48
|
+
const C = oe(() => l.some((u) => u.state === "uploading"), [
|
|
49
|
+
l
|
|
50
50
|
]);
|
|
51
51
|
se(() => {
|
|
52
52
|
S.current !== C && (S.current = C, v(o, C ? re.BUSY : re.READY));
|
|
@@ -55,21 +55,21 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
|
|
|
55
55
|
v,
|
|
56
56
|
o
|
|
57
57
|
]);
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
58
|
+
const k = P(() => {
|
|
59
|
+
if (!l.length)
|
|
60
60
|
return n;
|
|
61
|
-
const F =
|
|
61
|
+
const F = l.filter((u) => u.state === "uploading").length;
|
|
62
62
|
if (F) {
|
|
63
|
-
const u =
|
|
63
|
+
const u = l.filter((p) => p.state === "uploaded" && p.file.size > 0).length, g = u / (u + F);
|
|
64
64
|
return E("form.file-upload.uploading", {
|
|
65
65
|
count: Math.round(g * 100)
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
return n || E("form.file-upload.explanation-text", {
|
|
69
|
-
count:
|
|
69
|
+
count: l.length
|
|
70
70
|
});
|
|
71
71
|
}, [
|
|
72
|
-
|
|
72
|
+
l,
|
|
73
73
|
n,
|
|
74
74
|
E
|
|
75
75
|
]), M = P(async (F) => {
|
|
@@ -96,30 +96,30 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
|
|
|
96
96
|
E
|
|
97
97
|
]), O = async (F) => {
|
|
98
98
|
if (c && N(void 0), F) {
|
|
99
|
-
if (
|
|
99
|
+
if (l.length + F.length > e) {
|
|
100
100
|
N(E("form.file-upload.error.upload-limit", {
|
|
101
101
|
limit: e
|
|
102
102
|
}));
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
const p = Array.from(F).reduce((f, L) => (
|
|
105
|
+
const p = Array.from(F).reduce((f, L) => (l.some((Y) => Y.file.name === L.name) || f.push({
|
|
106
106
|
file: L,
|
|
107
107
|
state: "uploading"
|
|
108
108
|
}), f), []);
|
|
109
109
|
s([
|
|
110
|
-
...
|
|
110
|
+
...l,
|
|
111
111
|
...p
|
|
112
112
|
]), await M(p);
|
|
113
113
|
}
|
|
114
|
-
},
|
|
115
|
-
const u =
|
|
114
|
+
}, q = (F) => {
|
|
115
|
+
const u = l[F];
|
|
116
116
|
if (b && i && u.state !== "error") {
|
|
117
117
|
const g = b.filter((f) => f.displayName !== u.file.name);
|
|
118
118
|
i(g), m(g);
|
|
119
|
-
const p =
|
|
119
|
+
const p = l.filter((f) => f.file.name !== u.file.name);
|
|
120
120
|
s(p), p.length === 0 && D();
|
|
121
121
|
} else {
|
|
122
|
-
const g =
|
|
122
|
+
const g = l.filter((p) => p !== u);
|
|
123
123
|
s(g), g.length === 0 && D();
|
|
124
124
|
}
|
|
125
125
|
}, $ = () => {
|
|
@@ -128,17 +128,17 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
|
|
|
128
128
|
s([]), m([]);
|
|
129
129
|
}, []);
|
|
130
130
|
return be(W), {
|
|
131
|
-
files:
|
|
131
|
+
files: l,
|
|
132
132
|
limitError: c,
|
|
133
|
-
hover:
|
|
134
|
-
getExplanationText:
|
|
133
|
+
hover: U,
|
|
134
|
+
getExplanationText: k,
|
|
135
135
|
handleChange: O,
|
|
136
|
-
handleDelete:
|
|
136
|
+
handleDelete: q,
|
|
137
137
|
accept: K,
|
|
138
138
|
handleBlur: $
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Ue(e = []) {
|
|
142
142
|
const r = e || [];
|
|
143
143
|
try {
|
|
144
144
|
return r.map((n) => ({
|
|
@@ -162,7 +162,7 @@ function Z() {
|
|
|
162
162
|
return e;
|
|
163
163
|
}
|
|
164
164
|
const A = ({ children: e, className: r }) => {
|
|
165
|
-
const { ariaDescribedBy: n } = ce(), { disabled: o, hasError: i } =
|
|
165
|
+
const { ariaDescribedBy: n } = ce(), { disabled: o, hasError: i } = j(), { handleFileChange: d } = Z(), x = h(e, A.Title), D = h(e, A.Subtitle), l = h(e, A.Button);
|
|
166
166
|
return /* @__PURE__ */ t.createElement(Re, {
|
|
167
167
|
"aria-describedby": n,
|
|
168
168
|
className: r,
|
|
@@ -182,8 +182,8 @@ const A = ({ children: e, className: r }) => {
|
|
|
182
182
|
}
|
|
183
183
|
}, /* @__PURE__ */ t.createElement(Se, {
|
|
184
184
|
slot: "label"
|
|
185
|
-
}, x, D),
|
|
186
|
-
},
|
|
185
|
+
}, x, D), l);
|
|
186
|
+
}, ke = ({ className: e, children: r }) => {
|
|
187
187
|
const { limitReached: n } = Z();
|
|
188
188
|
return /* @__PURE__ */ t.createElement("p", {
|
|
189
189
|
className: e
|
|
@@ -198,14 +198,14 @@ const A = ({ children: e, className: r }) => {
|
|
|
198
198
|
limitReached: n
|
|
199
199
|
}));
|
|
200
200
|
}, J = ({ className: e, children: r, "aria-roledescription": n }) => {
|
|
201
|
-
const { ariaDescribedBy: o, inputId: i, labelId: d, errorId: x } = ce(), { disabled: D, required:
|
|
201
|
+
const { ariaDescribedBy: o, inputId: i, labelId: d, errorId: x } = ce(), { disabled: D, required: l, onFocus: s, hasError: b, errorMessage: m } = j(), { handleFileChange: c, accept: N, multiple: y, buttonRef: E, handleBlur: R, limitError: U, files: v } = Z(), S = (v == null ? void 0 : v.some((C) => C.errorMessage)) ?? !1, _ = !!(b || m || U || S);
|
|
202
202
|
return /* @__PURE__ */ t.createElement(Me, {
|
|
203
203
|
acceptedFileTypes: N ? N.split(",") : void 0,
|
|
204
204
|
allowsMultiple: y,
|
|
205
205
|
onSelect: (C) => {
|
|
206
206
|
if (C) {
|
|
207
|
-
const
|
|
208
|
-
|
|
207
|
+
const k = Array.from(C), M = new DataTransfer();
|
|
208
|
+
k.forEach((O) => M.items.add(O)), c(M.files);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}, /* @__PURE__ */ t.createElement(de, {
|
|
@@ -220,7 +220,7 @@ const A = ({ children: e, className: r }) => {
|
|
|
220
220
|
...C,
|
|
221
221
|
"aria-roledescription": n,
|
|
222
222
|
"aria-invalid": _ || void 0,
|
|
223
|
-
"aria-required":
|
|
223
|
+
"aria-required": l
|
|
224
224
|
}),
|
|
225
225
|
isDisabled: D,
|
|
226
226
|
className: e,
|
|
@@ -228,22 +228,22 @@ const A = ({ children: e, className: r }) => {
|
|
|
228
228
|
onBlur: R
|
|
229
229
|
}, r));
|
|
230
230
|
}, Pe = ({ className: e }) => {
|
|
231
|
-
const { buttonText: r } =
|
|
231
|
+
const { buttonText: r } = j();
|
|
232
232
|
return /* @__PURE__ */ t.createElement("span", {
|
|
233
233
|
className: e
|
|
234
234
|
}, r);
|
|
235
235
|
};
|
|
236
236
|
J.Text = Pe;
|
|
237
|
-
A.Title =
|
|
237
|
+
A.Title = ke;
|
|
238
238
|
A.Subtitle = Oe;
|
|
239
239
|
A.Button = J;
|
|
240
240
|
const T = ({ children: e, className: r, ...n }) => {
|
|
241
|
-
const { file: o, index: i } = n, d = o.file.name, x = h(e, T.Name), D = h(e, T.Remove),
|
|
241
|
+
const { file: o, index: i } = n, d = o.file.name, x = h(e, T.Name), D = h(e, T.Remove), l = h(e, T.Spinner), s = h(e, T.Error);
|
|
242
242
|
return /* @__PURE__ */ t.createElement("div", {
|
|
243
243
|
className: r
|
|
244
244
|
}, z(x, {
|
|
245
245
|
fileName: d
|
|
246
|
-
}), o.state === "uploading" ?
|
|
246
|
+
}), o.state === "uploading" ? l : z(D, {
|
|
247
247
|
index: i,
|
|
248
248
|
fileName: d
|
|
249
249
|
}), o.errorMessage && z(s, {
|
|
@@ -255,15 +255,15 @@ const T = ({ children: e, className: r, ...n }) => {
|
|
|
255
255
|
className: e
|
|
256
256
|
}, n);
|
|
257
257
|
}, Ve = ({ className: e, "aria-label": r, children: n, ...o }) => {
|
|
258
|
-
const { fileName: i, index: d } = o, { disabled: x } =
|
|
258
|
+
const { fileName: i, index: d } = o, { disabled: x } = j(), { handleDelete: D, fileRemoveButtonRefs: l } = Z(), s = V(null);
|
|
259
259
|
se(() => {
|
|
260
|
-
const m =
|
|
260
|
+
const m = l.current, c = i;
|
|
261
261
|
return m[c] = s, () => {
|
|
262
262
|
m[c] === s && (m[c] = void 0);
|
|
263
263
|
};
|
|
264
264
|
}, [
|
|
265
265
|
i,
|
|
266
|
-
|
|
266
|
+
l
|
|
267
267
|
]);
|
|
268
268
|
const b = () => {
|
|
269
269
|
D(d);
|
|
@@ -285,14 +285,14 @@ const T = ({ children: e, className: r, ...n }) => {
|
|
|
285
285
|
className: e,
|
|
286
286
|
role: "alert"
|
|
287
287
|
}, r)) : null;
|
|
288
|
-
},
|
|
288
|
+
}, je = ({ className: e, "aria-label": r, children: n }) => /* @__PURE__ */ t.createElement(Ie, {
|
|
289
289
|
"aria-label": r,
|
|
290
290
|
className: e,
|
|
291
291
|
isIndeterminate: !0
|
|
292
292
|
}, n);
|
|
293
293
|
T.Name = ze;
|
|
294
294
|
T.Remove = Ve;
|
|
295
|
-
T.Spinner =
|
|
295
|
+
T.Spinner = je;
|
|
296
296
|
T.Error = ue;
|
|
297
297
|
ue.Text = ye;
|
|
298
298
|
const X = ({ children: e, className: r }) => {
|
|
@@ -306,18 +306,18 @@ const X = ({ children: e, className: r }) => {
|
|
|
306
306
|
})));
|
|
307
307
|
};
|
|
308
308
|
X.File = T;
|
|
309
|
-
const G = (e) => e.file.name,
|
|
310
|
-
const { id: r, value: n, onChange: o, uploadFileFormats: i, valueSliderLimit: d, target: x, explanationText: D, onBlur:
|
|
309
|
+
const G = (e) => e.file.name, a = ({ children: e }) => {
|
|
310
|
+
const { id: r, value: n, onChange: o, uploadFileFormats: i, valueSliderLimit: d, target: x, explanationText: D, onBlur: l, hasError: s, errorMessage: b, FieldLayout: m } = j(), c = V(null), N = V({}), y = P(() => {
|
|
311
311
|
var L;
|
|
312
312
|
(L = c.current) == null || L.focus();
|
|
313
|
-
}, []), { files: E, limitError: R, hover:
|
|
313
|
+
}, []), { files: E, limitError: R, hover: U, getExplanationText: v, handleBlur: S, handleChange: _, handleDelete: C, accept: k } = Ze({
|
|
314
314
|
valueSliderLimit: d,
|
|
315
315
|
value: n,
|
|
316
316
|
explanationText: D,
|
|
317
317
|
target: x,
|
|
318
318
|
onChange: o,
|
|
319
319
|
uploadFileFormats: i,
|
|
320
|
-
onBlur:
|
|
320
|
+
onBlur: l,
|
|
321
321
|
onFilesCleared: y
|
|
322
322
|
}), M = P((L) => {
|
|
323
323
|
var te;
|
|
@@ -326,16 +326,16 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
326
326
|
}, [
|
|
327
327
|
C,
|
|
328
328
|
E
|
|
329
|
-
]), O = d > 1,
|
|
329
|
+
]), O = d > 1, q = E.length >= d, $ = oe(() => ({
|
|
330
330
|
handleFileChange: _,
|
|
331
331
|
handleBlur: S,
|
|
332
332
|
handleDelete: M,
|
|
333
333
|
files: E,
|
|
334
|
-
accept:
|
|
335
|
-
limitReached:
|
|
334
|
+
accept: k,
|
|
335
|
+
limitReached: q,
|
|
336
336
|
multiple: O,
|
|
337
337
|
getExplanationText: v,
|
|
338
|
-
hover:
|
|
338
|
+
hover: U,
|
|
339
339
|
limitError: R,
|
|
340
340
|
buttonRef: c,
|
|
341
341
|
fileRemoveButtonRefs: N
|
|
@@ -344,13 +344,13 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
344
344
|
S,
|
|
345
345
|
M,
|
|
346
346
|
E,
|
|
347
|
-
|
|
348
|
-
|
|
347
|
+
k,
|
|
348
|
+
q,
|
|
349
349
|
O,
|
|
350
350
|
v,
|
|
351
|
-
|
|
351
|
+
U,
|
|
352
352
|
R
|
|
353
|
-
]), K = h(e,
|
|
353
|
+
]), K = h(e, a.Label), W = h(e, a.DropZone), F = h(e, a.Button), u = h(e, a.Explanation), g = h(e, a.Files), p = h(e, a.Description), f = h(e, a.Error);
|
|
354
354
|
return Ce(() => {
|
|
355
355
|
var L;
|
|
356
356
|
(L = c.current) == null || L.focus();
|
|
@@ -365,19 +365,19 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
365
365
|
errorMessage: R ?? b
|
|
366
366
|
}), p, u, g)
|
|
367
367
|
}));
|
|
368
|
-
},
|
|
368
|
+
}, qe = ({ className: e }) => {
|
|
369
369
|
const { getExplanationText: r } = Z(), n = r();
|
|
370
370
|
return n ? /* @__PURE__ */ t.createElement("p", {
|
|
371
371
|
className: e
|
|
372
372
|
}, n) : null;
|
|
373
373
|
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
374
|
+
a.Label = Be;
|
|
375
|
+
a.DropZone = A;
|
|
376
|
+
a.Button = J;
|
|
377
|
+
a.Explanation = qe;
|
|
378
|
+
a.Files = X;
|
|
379
|
+
a.Description = _e;
|
|
380
|
+
a.Error = Te;
|
|
381
381
|
const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
382
382
|
viewBox: "0 0 24 24",
|
|
383
383
|
width: 24,
|
|
@@ -450,34 +450,34 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
450
450
|
locale: r
|
|
451
451
|
}), nt = () => {
|
|
452
452
|
const { t: e } = ie();
|
|
453
|
-
return /* @__PURE__ */ t.createElement(
|
|
453
|
+
return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
|
|
454
454
|
className: B(ne, I.label)
|
|
455
|
-
}, /* @__PURE__ */ t.createElement(
|
|
455
|
+
}, /* @__PURE__ */ t.createElement(a.Label.Required, {
|
|
456
456
|
className: B(De, I.requiredMark)
|
|
457
|
-
})), /* @__PURE__ */ t.createElement(
|
|
457
|
+
})), /* @__PURE__ */ t.createElement(a.Button, {
|
|
458
458
|
className: B(Ne, I.uploadButton),
|
|
459
459
|
"aria-roledescription": e("file-upload.aria-roledescription")
|
|
460
|
-
}, /* @__PURE__ */ t.createElement($e, null), /* @__PURE__ */ t.createElement(
|
|
461
|
-
className: B(
|
|
462
|
-
}), /* @__PURE__ */ t.createElement(
|
|
460
|
+
}, /* @__PURE__ */ t.createElement($e, null), /* @__PURE__ */ t.createElement(a.Button.Text, null)), /* @__PURE__ */ t.createElement(a.Explanation, {
|
|
461
|
+
className: B(le, I.description, w.explanation)
|
|
462
|
+
}), /* @__PURE__ */ t.createElement(a.Files, {
|
|
463
463
|
className: B(ne, w.files)
|
|
464
|
-
}, /* @__PURE__ */ t.createElement(
|
|
464
|
+
}, /* @__PURE__ */ t.createElement(a.Files.File, {
|
|
465
465
|
className: w.file
|
|
466
|
-
}, /* @__PURE__ */ t.createElement(
|
|
466
|
+
}, /* @__PURE__ */ t.createElement(a.Files.File.Name, {
|
|
467
467
|
className: w.fileName
|
|
468
|
-
}), /* @__PURE__ */ t.createElement(
|
|
468
|
+
}), /* @__PURE__ */ t.createElement(a.Files.File.Spinner, {
|
|
469
469
|
className: w.spinner,
|
|
470
470
|
"aria-label": e("file-upload.file.uploading-spinner.aria-label")
|
|
471
|
-
}, /* @__PURE__ */ t.createElement(Ye, null)), /* @__PURE__ */ t.createElement(
|
|
471
|
+
}, /* @__PURE__ */ t.createElement(Ye, null)), /* @__PURE__ */ t.createElement(a.Files.File.Remove, {
|
|
472
472
|
className: w.removeButton,
|
|
473
473
|
"aria-label": e("file-upload.delete-file.aria-label")
|
|
474
|
-
}, /* @__PURE__ */ t.createElement(We, null)), /* @__PURE__ */ t.createElement(
|
|
475
|
-
className: B(
|
|
476
|
-
}, /* @__PURE__ */ t.createElement(Ke, null), /* @__PURE__ */ t.createElement(
|
|
477
|
-
className: B(
|
|
478
|
-
}, rt), /* @__PURE__ */ t.createElement(
|
|
479
|
-
className: B(
|
|
480
|
-
}, /* @__PURE__ */ t.createElement(Le, null), /* @__PURE__ */ t.createElement(
|
|
474
|
+
}, /* @__PURE__ */ t.createElement(We, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
|
|
475
|
+
className: B(ae, I.error, w.fileError)
|
|
476
|
+
}, /* @__PURE__ */ t.createElement(Ke, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
|
|
477
|
+
className: B(le, I.description)
|
|
478
|
+
}, rt), /* @__PURE__ */ t.createElement(a.Error, {
|
|
479
|
+
className: B(ae, I.error)
|
|
480
|
+
}, /* @__PURE__ */ t.createElement(Le, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
|
|
481
481
|
}, Ft = () => /* @__PURE__ */ t.createElement(nt, null);
|
|
482
482
|
export {
|
|
483
483
|
Ft as FileUploadRAC
|