@wix/form-elements 1.93.0 → 1.95.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-bw0pvoxP.js → appointment-rac-mhQIjy3A.js} +310 -311
- package/dist/component/{bookings-address-rac-DECq7eWR.js → bookings-address-rac-pcZeAN2d.js} +1 -1
- package/dist/component/{bookings-email-rac-DTLjh6Zw.js → bookings-email-rac-BHdvWhcv.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DObRe-Gq.js → bookings-first-name-rac-mPNuMBGo.js} +1 -1
- package/dist/component/{bookings-header-rac-DjpmYRJG.js → bookings-header-rac-CUzR91gM.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Ds3o0ABM.js → bookings-last-name-rac-q2bsOPke.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DPUL2jWj.js → bookings-login-bar-rac-BpwVjQwz.js} +4 -4
- package/dist/component/{bookings-phone-rac-DIIHPxEP.js → bookings-phone-rac-DWdDpi-n.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BrcQO9xx.js → bookings-rich-text-rac-CZnGLPwv.js} +1 -1
- package/dist/component/{get-first-day-of-the-week-DvnsxYhQ.js → calendar.module-DnhTT4QT.js} +23 -18
- package/dist/component/{checkbox-field-rac-CD1MP1LT.js → checkbox-field-rac-DRVjITJ_.js} +7 -7
- package/dist/component/{checkbox-group-field-headless-C0V6zq0u.js → checkbox-group-field-headless-CKXgbUdv.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-B-MYpz53.js → checkbox-group-field-rac-Dt3yWmua.js} +14 -14
- package/dist/component/{checkbox-group-rac-BejQjiO2.js → checkbox-group-rac-BTFoDjxn.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-mJ7hl_8K.js → checkbox-indicator-module-classes-DhbNznSB.js} +1 -1
- package/dist/component/{checkbox-rac-B0YgCj29.js → checkbox-rac-Crn5HP7E.js} +1 -1
- package/dist/component/{contacts-address-rac-B1QNl3Lb.js → contacts-address-rac-c1zfBJgx.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-Cp-gh3P-.js → contacts-birthdate-rac-BaaSPZgO.js} +1 -1
- package/dist/component/{contacts-company-rac-CSCU7JGm.js → contacts-company-rac-CzuRjr1D.js} +1 -1
- package/dist/component/{contacts-email-rac-B1Oov6-3.js → contacts-email-rac-hL98o3x4.js} +1 -1
- package/dist/component/{contacts-first-name-rac-rsHIOcjr.js → contacts-first-name-rac-BXTnd1aU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Csgq53Wm.js → contacts-last-name-rac-DYjmWO4_.js} +1 -1
- package/dist/component/{contacts-phone-rac-r9SwjDZ4.js → contacts-phone-rac-KMnorQhu.js} +1 -1
- package/dist/component/{contacts-position-rac-D7VcCM7v.js → contacts-position-rac-ylzvuGhD.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-8Nu9ncZW.js → contacts-subscribe-rac-Bi3ZazuW.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-CL_JSl_W.js → contacts-tax-id-rac-C01LkO1D.js} +1 -1
- package/dist/component/{date-availability-DLOKY9C4.js → date-availability-BXwnYCBt.js} +1 -1
- package/dist/component/{date-input-field-rac-D23Al-Mr.js → date-input-field-rac-BMdPQoFk.js} +58 -57
- package/dist/component/{date-input-rac-B6zgkw-L.js → date-input-rac-D2mDdJ_4.js} +1 -1
- package/dist/component/date-picker-field-rac-7gyRMkPp.js +317 -0
- package/dist/component/{date-picker-rac-C7g6aceb.js → date-picker-rac-FyNcNbTc.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BENzf6gc.js → date-time-input-field-rac-BTjqn_g-.js} +54 -53
- package/dist/component/{date-time-input-rac-CVpK3mgw.js → date-time-input-rac-C81cN7rJ.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CbEFDD3H.js → dext-checkbox-group-rac-DAjQPdi_.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BdtZvn6I.js → dext-checkbox-rac-DVt9mAXM.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BAhFvUEx.js → dext-date-picker-rac-BnaExh1i.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-iXMKMwQY.js → dext-date-time-input-rac-DPAW4eBA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D-NPziZS.js → dext-dropdown-rac-P9T1vh24.js} +1 -1
- package/dist/component/{dext-email-rac-DYSwyB80.js → dext-email-rac-BfEuFGaV.js} +1 -1
- package/dist/component/{dext-number-input-rac-DXx8hgFg.js → dext-number-input-rac-B5eN2rLP.js} +1 -1
- package/dist/component/{dext-phone-rac-BtuLROzm.js → dext-phone-rac-DA-h_tpZ.js} +1 -1
- package/dist/component/{dext-radio-group-rac-MdKNiJ2i.js → dext-radio-group-rac-BjpkApRr.js} +2 -2
- package/dist/component/{dext-rating-input-rac-d998xond.js → dext-rating-input-rac-DUMRW9uI.js} +1 -1
- package/dist/component/{dext-tags-rac-DnSpOM9T.js → dext-tags-rac-s0WchM4X.js} +2 -2
- package/dist/component/{dext-text-area-rac-KqjeDDWe.js → dext-text-area-rac-BRMsiGEH.js} +1 -1
- package/dist/component/{dext-text-input-rac-CtCnClfX.js → dext-text-input-rac-BBZi3D8V.js} +1 -1
- package/dist/component/{dext-url-input-rac-DSJQcLLr.js → dext-url-input-rac-jKMWbCGB.js} +1 -1
- package/dist/component/{donation-rac-B_KGkBgo.js → donation-rac-DyeKbodo.js} +30 -30
- package/dist/component/{dropdown-field-headless-BUilB8wZ.js → dropdown-field-headless-BK8BN3u4.js} +4 -4
- package/dist/component/{dropdown-field-rac-COupYC1a.js → dropdown-field-rac-B6yzL_R0.js} +6 -6
- package/dist/component/{dropdown-rac-Dj0UZrE0.js → dropdown-rac-CQaMpex2.js} +1 -1
- package/dist/component/{ecom-address-rac-C0xnn86e.js → ecom-address-rac-DQr3-QeV.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D-ekxwUE.js → ecom-subscription-checkbox-rac-CZ-pj21A.js} +3 -3
- package/dist/component/{email-input-field-rac-DVj1qz_R.js → email-input-field-rac-Vp0YfQOe.js} +41 -41
- package/dist/component/{events-repeater-rac-U0aq9Z4Q.js → events-repeater-rac-BPE4Hn_G.js} +6 -6
- package/dist/component/{events-rsvp-rac-C7J58_5q.js → events-rsvp-rac-u_BDmDJ2.js} +21 -21
- package/dist/component/{field-error-headless-2nYJ2792.js → field-error-headless-BOlFtckJ.js} +1 -1
- package/dist/component/{field-label-headless-D97ACnmc.js → field-label-headless-Dx3VrM-U.js} +1 -1
- package/dist/component/field-rac.module-DobpyqOd.js +26 -0
- package/dist/component/{file-upload-rac-BR7QpuPW.js → file-upload-rac-DaFuvO-g.js} +44 -44
- package/dist/component/{fixed-payment-rac-COl18wW1.js → fixed-payment-rac-DpBwOtOf.js} +11 -11
- package/dist/component/{form-DKKTSAj1.js → form-Wsx4lguO.js} +69 -69
- package/dist/component/{form-element-classes-CLZXu-91.js → form-element-classes-BtKlobUX.js} +60 -59
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-B6DyMG3U.js → header-field-rac-C8FlksmH.js} +3 -3
- package/dist/component/{header-rac-x4H2qMky.js → header-rac-C2J-pLq-.js} +1 -1
- package/dist/component/{image-choice-rac-BVgmKTKk.js → image-choice-rac-i4C_OXyb.js} +16 -16
- package/dist/component/{index-C47UMGhd.js → index-C34urqyX.js} +4 -4
- package/dist/component/{index-DnpqBcg5.js → index-CRI82pG6.js} +2 -2
- package/dist/component/{isObjectLike-BrrFBP4f.js → isObjectLike-D-9JnXmU.js} +1 -1
- package/dist/component/{multiline-address-field-rac-B6ka-2Wy.js → multiline-address-field-rac-Dkfso46f.js} +87 -86
- package/dist/component/{multiline-address-rac-Bh58qUEe.js → multiline-address-rac-BjrwDwOk.js} +1 -1
- package/dist/component/{number-input-field-rac-pAmxvk3A.js → number-input-field-rac-CgHi83Q1.js} +19 -19
- package/dist/component/{number-input-rac-mKA2njIU.js → number-input-rac-BinBxOCS.js} +1 -1
- package/dist/component/{password-rac-BbD7PQXO.js → password-rac-CDGqIRW5.js} +38 -38
- package/dist/component/{payment-input-rac-UdkwC1ek.js → payment-input-rac-f4uuGeJF.js} +23 -23
- package/dist/component/{phone-input-field-rac-BVLVVDTq.js → phone-input-field-rac-IdBqjM9Q.js} +33 -32
- package/dist/component/{phone-rac-LixcB9WV.js → phone-rac-VHPMrSpw.js} +1 -1
- package/dist/component/{product-list-rac-B_dL1Ov-.js → product-list-rac-Bk8q5y5L.js} +17 -17
- package/dist/component/{quiz-radio-group-rac-Bj5XfqNf.js → quiz-radio-group-rac-kTWqvAoW.js} +2 -2
- package/dist/component/{radio-button-module-classes-y_PtsZPP.js → radio-button-module-classes-D77Nc48M.js} +3 -3
- package/dist/component/{radio-group-field-rac-C8OElNAQ.js → radio-group-field-rac-DC-AYSOH.js} +5 -5
- package/dist/component/{radio-group-rac-BqJFboHE.js → radio-group-rac-BkswH1Py.js} +1 -1
- package/dist/component/{rating-input-field-rac-C9_ITvEh.js → rating-input-field-rac-Cqgw6PjV.js} +32 -32
- package/dist/component/{rating-input-rac-CvTpEUoU.js → rating-input-rac-CbZhlK3h.js} +1 -1
- package/dist/component/{rich-content-rac.module-D4pEN-TY.js → rich-content-rac.module-j_9YbXMI.js} +1 -1
- package/dist/component/{rich-text-field-rac-B8cqCmaf.js → rich-text-field-rac-Da1EIb3b.js} +3 -3
- package/dist/component/{rich-text-rac-C1o-tfXG.js → rich-text-rac-BarNBtgP.js} +1 -1
- package/dist/component/{service-dropdown-rac-BOXqB2aq.js → service-dropdown-rac-DLIC_csj.js} +36 -36
- package/dist/component/{services-multi-choice-rac-Dk4rz-fw.js → services-multi-choice-rac-vyxtwSM2.js} +14 -14
- package/dist/component/{signature-rac-h9GWVdez.js → signature-rac-DIM2Uwsg.js} +102 -102
- package/dist/component/{submit-button-rac-qNaTyCxd.js → submit-button-rac-DgxjomCu.js} +2 -2
- package/dist/component/{tags-field-rac-NMRn0YnW.js → tags-field-rac-BFlkxifd.js} +67 -67
- package/dist/component/{tags-rac-DGx4KxEn.js → tags-rac-D4TwrAWc.js} +1 -1
- package/dist/component/{text-area-field-rac-C7u0D4l3.js → text-area-field-rac-Dcz7VUQ5.js} +28 -28
- package/dist/component/{text-area-rac-Yo-RIyLm.js → text-area-rac-DhloXdO2.js} +1 -1
- package/dist/component/{text-input-field-rac-CvU-1clq.js → text-input-field-rac-C8e3TMxI.js} +8 -8
- package/dist/component/{text-input-headless-DLRwVmwf.js → text-input-headless-fl7qoZzR.js} +3 -3
- package/dist/component/{text-input-rac-CWh5xjZA.js → text-input-rac-CBn6bHtP.js} +1 -1
- package/dist/component/{time-input-rac-BZlso9qK.js → time-input-rac-Dsm7_vrf.js} +26 -26
- package/dist/component/{url-input-field-rac-Bax0TB4Q.js → url-input-field-rac-9Hfx1xzO.js} +20 -20
- package/dist/component/{url-input-rac-Bw2nfybR.js → url-input-rac-CVlE4pcg.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-Dsxto42_.js +21 -0
- package/dist/component/{use-element-state-class-name-C0zLrsDR.js → use-element-state-class-name-BIqDbVvI.js} +1 -1
- package/dist/component/use-is-forced-open-dropdown-BMPqRDVW.js +41 -0
- package/dist/component/{use-service-options-base-Bkj6BSQL.js → use-service-options-base-07_rqXcG.js} +1 -1
- package/dist/component/{use-text-input-class-name-Biu89Ma7.js → use-text-input-class-name-DqFt59gd.js} +4 -4
- package/package.json +2 -2
- package/dist/component/date-picker-field-rac-BqdzPPzK.js +0 -304
- package/dist/component/field-rac.module-BUvPquav.js +0 -26
- package/dist/component/use-dropdown-option-class-name-vKSagp3b.js +0 -57
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o, { useMemo as a } from "react";
|
|
2
|
-
import { ak as n, au as c, h as i } from "./form-
|
|
3
|
-
import { C } from "./checkbox-field-rac-
|
|
4
|
-
import {
|
|
2
|
+
import { ak as n, au as c, h as i } from "./form-Wsx4lguO.js";
|
|
3
|
+
import { C } from "./checkbox-field-rac-DRVjITJ_.js";
|
|
4
|
+
import { p, q as l, o as m } from "./form-element-classes-BtKlobUX.js";
|
|
5
5
|
const _ = (e) => ({
|
|
6
6
|
nodes: [
|
|
7
7
|
{
|
package/dist/component/{email-input-field-rac-DVj1qz_R.js → email-input-field-rac-Vp0YfQOe.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RicosViewer as ie } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import u, { createContext as
|
|
2
|
+
import D from "classnames";
|
|
3
|
+
import u, { createContext as z, useContext as Z, createElement as R, isValidElement as B, cloneElement as w, useState as le, useCallback as me, useEffect as ue } from "react";
|
|
4
4
|
import { TextField as pe } from "react-aria-components";
|
|
5
|
-
import { ah as fe, au as ge, af as ve, c as ye, ak as Ee, ao as de, ai as be, f as Se } from "./form-
|
|
5
|
+
import { ah as fe, au as ge, af as ve, c as ye, ak as Ee, ao as de, ai as be, f as Se } from "./form-Wsx4lguO.js";
|
|
6
6
|
import { f as C } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import ee from "@babel/runtime/helpers/objectWithoutProperties";
|
|
8
8
|
import L from "@babel/runtime/helpers/typeof";
|
|
@@ -10,11 +10,11 @@ import Oe from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
import he from "html-parse-stringify";
|
|
11
11
|
import Ie from "@babel/runtime/helpers/classCallCheck";
|
|
12
12
|
import Ne from "@babel/runtime/helpers/createClass";
|
|
13
|
-
import { T as U } from "./text-input-headless-
|
|
13
|
+
import { T as U } from "./text-input-headless-fl7qoZzR.js";
|
|
14
14
|
import { E as Ae } from "./error-icon-hZxQ6DEy.js";
|
|
15
|
-
import { s as
|
|
16
|
-
import {
|
|
17
|
-
import { u as
|
|
15
|
+
import { s as H } from "./field-rac.module-DobpyqOd.js";
|
|
16
|
+
import { C as ke, S as Fe, r as Te, j as xe, _ as je } from "./form-element-classes-BtKlobUX.js";
|
|
17
|
+
import { u as De } from "./use-text-input-class-name-DqFt59gd.js";
|
|
18
18
|
var Ce = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Le = {
|
|
19
19
|
"&": "&",
|
|
20
20
|
"&": "&",
|
|
@@ -49,8 +49,8 @@ var Ce = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
49
49
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
50
50
|
useSuspense: !0,
|
|
51
51
|
unescape: Pe
|
|
52
|
-
}, we,
|
|
53
|
-
function
|
|
52
|
+
}, we, He = z();
|
|
53
|
+
function Re() {
|
|
54
54
|
return _e;
|
|
55
55
|
}
|
|
56
56
|
(function() {
|
|
@@ -88,7 +88,7 @@ function Be() {
|
|
|
88
88
|
t[a] = arguments[a];
|
|
89
89
|
typeof t[0] == "string" && J[t[0]] || (typeof t[0] == "string" && (J[t[0]] = /* @__PURE__ */ new Date()), K.apply(void 0, t));
|
|
90
90
|
}
|
|
91
|
-
var Ue = ["format"],
|
|
91
|
+
var Ue = ["format"], Ve = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
92
92
|
function Q(e, t) {
|
|
93
93
|
var a = Object.keys(e);
|
|
94
94
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -118,7 +118,7 @@ function Y(e, t) {
|
|
|
118
118
|
function G(e) {
|
|
119
119
|
return e ? e.props ? e.props.children : e.children : [];
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function qe(e) {
|
|
122
122
|
return Object.prototype.toString.call(e) !== "[object Array]" ? !1 : e.every(function(t) {
|
|
123
123
|
return B(t);
|
|
124
124
|
});
|
|
@@ -178,7 +178,7 @@ function Ge(e, t, a, o, c, r) {
|
|
|
178
178
|
var T = he.parse("<0>".concat(t, "</0>")), O = p(p({}, d), c);
|
|
179
179
|
function k(y, h, s) {
|
|
180
180
|
var i = G(y), I = S(i, h.children, s);
|
|
181
|
-
return
|
|
181
|
+
return qe(i) && I.length === 0 ? i : I;
|
|
182
182
|
}
|
|
183
183
|
function A(y, h, s, i, I) {
|
|
184
184
|
y.dummy && (y.children = h), s.push(w(y, p(p({}, y.props), {}, {
|
|
@@ -194,11 +194,11 @@ function Ge(e, t, a, o, c, r) {
|
|
|
194
194
|
!N && s.length === 1 && s[0][n.name] && (N = s[0][n.name]), N || (N = {});
|
|
195
195
|
var m = Object.keys(n.attrs).length !== 0 ? Ye({
|
|
196
196
|
props: n.attrs
|
|
197
|
-
}, N) : N, x = B(m),
|
|
197
|
+
}, N) : N, x = B(m), V = x && Y(n, !0) && !n.voidElement, P = v && L(m) === "object" && m.dummy && !x, _ = L(e) === "object" && e !== null && Object.hasOwnProperty.call(e, n.name);
|
|
198
198
|
if (typeof m == "string") {
|
|
199
|
-
var
|
|
200
|
-
l.push(
|
|
201
|
-
} else if (Y(m) ||
|
|
199
|
+
var q = a.services.interpolator.interpolate(m, O, a.language);
|
|
200
|
+
l.push(q);
|
|
201
|
+
} else if (Y(m) || V) {
|
|
202
202
|
var ne = k(m, n, s);
|
|
203
203
|
A(m, ne, l, E);
|
|
204
204
|
} else if (P) {
|
|
@@ -212,12 +212,12 @@ function Ge(e, t, a, o, c, r) {
|
|
|
212
212
|
A(m, re, l, E, n.voidElement);
|
|
213
213
|
} else if (o.transSupportBasicHtmlNodes && g.indexOf(n.name) > -1)
|
|
214
214
|
if (n.voidElement)
|
|
215
|
-
l.push(
|
|
215
|
+
l.push(R(n.name, {
|
|
216
216
|
key: "".concat(n.name, "-").concat(E)
|
|
217
217
|
}));
|
|
218
218
|
else {
|
|
219
219
|
var se = S(i, n.children, s);
|
|
220
|
-
l.push(
|
|
220
|
+
l.push(R(n.name, {
|
|
221
221
|
key: "".concat(n.name, "-").concat(E)
|
|
222
222
|
}, se));
|
|
223
223
|
}
|
|
@@ -237,28 +237,28 @@ function Ge(e, t, a, o, c, r) {
|
|
|
237
237
|
})));
|
|
238
238
|
} else if (n.type === "text") {
|
|
239
239
|
var W = o.transWrapTextNodes, X = r ? o.unescape(a.services.interpolator.interpolate(n.content, O, a.language)) : a.services.interpolator.interpolate(n.content, O, a.language);
|
|
240
|
-
W ? l.push(
|
|
240
|
+
W ? l.push(R(W, {
|
|
241
241
|
key: "".concat(n.name, "-").concat(E)
|
|
242
242
|
}, X)) : l.push(X);
|
|
243
243
|
}
|
|
244
244
|
return l;
|
|
245
245
|
}, []);
|
|
246
246
|
}
|
|
247
|
-
var
|
|
247
|
+
var j = S([{
|
|
248
248
|
dummy: !0,
|
|
249
249
|
children: e || []
|
|
250
250
|
}], T, M(e || []));
|
|
251
|
-
return G(
|
|
251
|
+
return G(j[0]);
|
|
252
252
|
}
|
|
253
253
|
function $e(e) {
|
|
254
|
-
var t = e.children, a = e.count, o = e.parent, c = e.i18nKey, r = e.context, g = e.tOptions, v = g === void 0 ? {} : g, d = e.values, b = e.defaults, T = e.components, O = e.ns, k = e.i18n, A = e.t, S = e.shouldUnescape,
|
|
254
|
+
var t = e.children, a = e.count, o = e.parent, c = e.i18nKey, r = e.context, g = e.tOptions, v = g === void 0 ? {} : g, d = e.values, b = e.defaults, T = e.components, O = e.ns, k = e.i18n, A = e.t, S = e.shouldUnescape, j = ee(e, Ve), y = Z(He) || {}, h = y.i18n, s = y.defaultNS, i = k || h || Ke();
|
|
255
255
|
if (!i)
|
|
256
256
|
return Be("You will need to pass in an i18next instance by using i18nextReactModule"), t;
|
|
257
|
-
var I = A || i.t.bind(i) || function(
|
|
258
|
-
return
|
|
257
|
+
var I = A || i.t.bind(i) || function(q) {
|
|
258
|
+
return q;
|
|
259
259
|
};
|
|
260
260
|
r && (v.context = r);
|
|
261
|
-
var l = p(p({},
|
|
261
|
+
var l = p(p({}, Re()), i.options && i.options.react), n = O || I.ns || s || i.options && i.options.defaultNS;
|
|
262
262
|
n = typeof n == "string" ? [n] : n || ["translation"];
|
|
263
263
|
var E = b || te(t, l) || l.transEmptyNodeValue || c, F = l.hashTransKey, N = c || (F ? F(E) : E), m = d ? v.interpolation : {
|
|
264
264
|
interpolation: p(p({}, v.interpolation), {}, {
|
|
@@ -270,12 +270,12 @@ function $e(e) {
|
|
|
270
270
|
}, d), m), {}, {
|
|
271
271
|
defaultValue: E,
|
|
272
272
|
ns: n
|
|
273
|
-
}),
|
|
274
|
-
return _ ?
|
|
273
|
+
}), V = N ? I(N, x) : E, P = Ge(T || t, V, i, l, x, S), _ = o !== void 0 ? o : l.defaultTransParent;
|
|
274
|
+
return _ ? R(_, j, P) : P;
|
|
275
275
|
}
|
|
276
|
-
const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */
|
|
276
|
+
const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */ z(void 0);
|
|
277
277
|
function Je() {
|
|
278
|
-
const e =
|
|
278
|
+
const e = Z(ae);
|
|
279
279
|
if (e === void 0)
|
|
280
280
|
throw new Error("useEmailSuggestion must be used inside <EmailInput>");
|
|
281
281
|
return e;
|
|
@@ -285,7 +285,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
285
285
|
activeSuggestion: e,
|
|
286
286
|
applySuggestion: t
|
|
287
287
|
}
|
|
288
|
-
}, a),
|
|
288
|
+
}, a), ze = ({ className: e }) => {
|
|
289
289
|
const { suggestionId: t } = fe(), { activeSuggestion: a, applySuggestion: o } = Je(), { t: c, i18n: r } = ge();
|
|
290
290
|
return /* @__PURE__ */ u.createElement("div", {
|
|
291
291
|
id: t,
|
|
@@ -311,7 +311,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
311
311
|
})
|
|
312
312
|
]
|
|
313
313
|
}) : null);
|
|
314
|
-
},
|
|
314
|
+
}, Ze = {
|
|
315
315
|
"aol.com": [
|
|
316
316
|
"aaol.com",
|
|
317
317
|
"aol.con",
|
|
@@ -422,7 +422,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
422
422
|
"comcast.nrt",
|
|
423
423
|
"comcast.net.net"
|
|
424
424
|
]
|
|
425
|
-
}, et = new Map(Object.entries(
|
|
425
|
+
}, et = new Map(Object.entries(Ze).flatMap(([e, t]) => t.map((a) => [
|
|
426
426
|
a,
|
|
427
427
|
e
|
|
428
428
|
]))), tt = (e) => {
|
|
@@ -450,13 +450,13 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
450
450
|
validate: v
|
|
451
451
|
};
|
|
452
452
|
}, f = ({ children: e }) => {
|
|
453
|
-
const { id: t, value: a, onChange: o, disabled: c, readOnly: r, required: g, hasError: v, onBlur: d, onFocus: b, error: T, description: O, FieldLayout: k } = Ee(), { isMistyped: A, suggestedEmail: S, validate:
|
|
453
|
+
const { id: t, value: a, onChange: o, disabled: c, readOnly: r, required: g, hasError: v, onBlur: d, onFocus: b, error: T, description: O, FieldLayout: k } = Ee(), { isMistyped: A, suggestedEmail: S, validate: j } = at({
|
|
454
454
|
email: a,
|
|
455
455
|
hasError: v
|
|
456
456
|
}), { setFocusedFieldId: y } = de(), s = A && (!r && !c) && S ? S : void 0, i = be(t, T, O, s), I = () => {
|
|
457
457
|
o(s), y(t);
|
|
458
458
|
}, l = () => {
|
|
459
|
-
|
|
459
|
+
j(), d == null || d();
|
|
460
460
|
}, n = C(e, f.Label), E = C(e, f.Input), F = C(e, f.Description), N = C(e, f.Error), m = C(e, f.Suggestion);
|
|
461
461
|
return /* @__PURE__ */ u.createElement(Se.Provider, {
|
|
462
462
|
value: i
|
|
@@ -484,26 +484,26 @@ f.Label = U.Label;
|
|
|
484
484
|
f.Input = U.Input;
|
|
485
485
|
f.Description = U.Description;
|
|
486
486
|
f.Error = U.Error;
|
|
487
|
-
f.Suggestion =
|
|
487
|
+
f.Suggestion = ze;
|
|
488
488
|
const nt = "_suggestion_di65n_1", ot = {
|
|
489
489
|
suggestion: nt
|
|
490
490
|
}, rt = ({ content: e, locale: t }) => /* @__PURE__ */ u.createElement(ie, {
|
|
491
491
|
content: e,
|
|
492
492
|
locale: t
|
|
493
493
|
}), It = () => {
|
|
494
|
-
const e =
|
|
494
|
+
const e = De();
|
|
495
495
|
return /* @__PURE__ */ u.createElement(f, null, /* @__PURE__ */ u.createElement(f.Label, {
|
|
496
|
-
className:
|
|
496
|
+
className: D(ke, H.label)
|
|
497
497
|
}, /* @__PURE__ */ u.createElement(f.Label.Required, {
|
|
498
|
-
className:
|
|
498
|
+
className: D(Fe, H.requiredMark)
|
|
499
499
|
})), /* @__PURE__ */ u.createElement(f.Input, {
|
|
500
500
|
className: e
|
|
501
501
|
}), /* @__PURE__ */ u.createElement(f.Error, {
|
|
502
|
-
className:
|
|
502
|
+
className: D(Te, H.error)
|
|
503
503
|
}, /* @__PURE__ */ u.createElement(Ae, null), /* @__PURE__ */ u.createElement(f.Error.Text, null)), /* @__PURE__ */ u.createElement(f.Description, {
|
|
504
|
-
className:
|
|
504
|
+
className: D(xe, H.description)
|
|
505
505
|
}, rt), /* @__PURE__ */ u.createElement(f.Suggestion, {
|
|
506
|
-
className:
|
|
506
|
+
className: D(je, ot.suggestion)
|
|
507
507
|
}));
|
|
508
508
|
};
|
|
509
509
|
export {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import e, { useState as q, useMemo as v, useCallback as V, useRef as w } 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 x } from "react-aria-components";
|
|
4
|
-
import { aq as U, ar as P, ag as H, al as K, v as Y, ak as D, ah as X, am as j, j as Z } from "./form-
|
|
4
|
+
import { aq as U, ar as P, ag as H, al as K, v as Y, ak as D, ah as X, am as j, j as Z } from "./form-Wsx4lguO.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-Dx3VrM-U.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
|
-
import { C as ne } from "./checkbox-indicator-module-classes-
|
|
11
|
-
import { s as B } from "./field-rac.module-
|
|
12
|
-
import {
|
|
13
|
-
import { u as ue } from "./use-element-state-class-name-
|
|
10
|
+
import { C as ne } from "./checkbox-indicator-module-classes-DhbNznSB.js";
|
|
11
|
+
import { s as B } from "./field-rac.module-DobpyqOd.js";
|
|
12
|
+
import { C as oe, B as re, s as ae, u as le, t as ce } from "./form-element-classes-BtKlobUX.js";
|
|
13
|
+
import { u as ue } from "./use-element-state-class-name-BIqDbVvI.js";
|
|
14
14
|
const me = [], ie = ({ id: t, fields: n, layout: l, value: r, onChange: s, errors: m = me, validation: c }) => {
|
|
15
15
|
const [i, E] = q((r == null ? void 0 : r.length) || 0), a = v(() => r ?? [], [
|
|
16
16
|
r
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
3
|
-
import
|
|
4
|
-
import { a, s as o, R as c } from "./radio-button-module-classes-
|
|
3
|
+
import r from "classnames";
|
|
4
|
+
import { a as s, s as o, R as c } from "./radio-button-module-classes-D77Nc48M.js";
|
|
5
5
|
import { E } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as l } from "./field-rac.module-
|
|
7
|
-
import {
|
|
8
|
-
import { u } from "./use-element-state-class-name-
|
|
9
|
-
const e = ({ children:
|
|
10
|
-
e.Label =
|
|
11
|
-
e.Options =
|
|
12
|
-
e.Option =
|
|
13
|
-
e.Description =
|
|
14
|
-
e.Error =
|
|
15
|
-
const D = ({ content:
|
|
16
|
-
content:
|
|
6
|
+
import { s as l } from "./field-rac.module-DobpyqOd.js";
|
|
7
|
+
import { C as i, S as p, T as R, U as _, r as O, j as L, V as S } from "./form-element-classes-BtKlobUX.js";
|
|
8
|
+
import { u } from "./use-element-state-class-name-BIqDbVvI.js";
|
|
9
|
+
const e = ({ children: a }) => /* @__PURE__ */ t.createElement(s, null, a);
|
|
10
|
+
e.Label = s.Label;
|
|
11
|
+
e.Options = s.Options;
|
|
12
|
+
e.Option = s.Option;
|
|
13
|
+
e.Description = s.Description;
|
|
14
|
+
e.Error = s.Error;
|
|
15
|
+
const D = ({ content: a, locale: n }) => /* @__PURE__ */ t.createElement(m, {
|
|
16
|
+
content: a,
|
|
17
17
|
locale: n
|
|
18
18
|
}), I = () => {
|
|
19
|
-
const
|
|
19
|
+
const a = u({
|
|
20
20
|
globalClasses: S,
|
|
21
21
|
moduleClasses: c
|
|
22
22
|
});
|
|
23
23
|
return /* @__PURE__ */ t.createElement(e, null, /* @__PURE__ */ t.createElement(e.Label, {
|
|
24
|
-
className:
|
|
24
|
+
className: r(i, l.label)
|
|
25
25
|
}, /* @__PURE__ */ t.createElement(e.Label.Required, {
|
|
26
|
-
className:
|
|
26
|
+
className: r(p, l.requiredMark)
|
|
27
27
|
})), /* @__PURE__ */ t.createElement(e.Options, {
|
|
28
|
-
className:
|
|
28
|
+
className: r(R, o.options)
|
|
29
29
|
}, /* @__PURE__ */ t.createElement(e.Option, {
|
|
30
30
|
className: o.option
|
|
31
31
|
}, /* @__PURE__ */ t.createElement(e.Option.Input, {
|
|
32
32
|
className: o.optionInput
|
|
33
33
|
}), /* @__PURE__ */ t.createElement(e.Option.Control, {
|
|
34
|
-
className:
|
|
34
|
+
className: a
|
|
35
35
|
}), /* @__PURE__ */ t.createElement(e.Option.Label, {
|
|
36
|
-
className:
|
|
36
|
+
className: r(_, o.optionLabel)
|
|
37
37
|
}))), /* @__PURE__ */ t.createElement(e.Error, {
|
|
38
|
-
className:
|
|
38
|
+
className: r(O, l.error)
|
|
39
39
|
}, /* @__PURE__ */ t.createElement(E, null), /* @__PURE__ */ t.createElement(e.Error.Text, null)), /* @__PURE__ */ t.createElement(e.Description, {
|
|
40
|
-
className:
|
|
40
|
+
className: r(L, l.description)
|
|
41
41
|
}, D));
|
|
42
42
|
}, b = () => /* @__PURE__ */ t.createElement(I, null);
|
|
43
43
|
export {
|
package/dist/component/{field-error-headless-2nYJ2792.js → field-error-headless-BOlFtckJ.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import t, { createContext as m, useContext as M } from "react";
|
|
2
|
-
import { ak as c, ah as i, ac as f, U as h, W as x } from "./form-
|
|
2
|
+
import { ak as c, ah as i, ac as f, U as h, W as x } from "./form-Wsx4lguO.js";
|
|
3
3
|
const N = ({ 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-D97ACnmc.js → field-label-headless-Dx3VrM-U.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ak as m, R as d, r as p, ah as D, au as B } from "./form-
|
|
1
|
+
import { ak as m, R as d, r as p, ah as D, au as B } from "./form-Wsx4lguO.js";
|
|
2
2
|
import l from "react";
|
|
3
3
|
import { f as L } from "./find-child-C60k4CxG.js";
|
|
4
4
|
import { sdk as R } from "@wix/image-kit";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const o = "_label_spoe9_1", e = "_requiredMark_spoe9_11", t = "_input_spoe9_16", n = "_inputGroup_spoe9_17", p = "_inputHover_spoe9_71", c = "_innerInput_spoe9_132", s = "_dropdownTrigger_spoe9_182", _ = "_dropdownIcon_spoe9_192", r = "_dropdownPopover_spoe9_211", i = "_selectPopover_spoe9_217", u = "_selectOption_spoe9_244", d = "_selectOptionHover_spoe9_267", l = "_selectOptionSelected_spoe9_271", h = "_selectOptionWithoutFocusRing_spoe9_275", b = "_description_spoe9_281", k = "_error_spoe9_297", v = "_checkbox_spoe9_316", I = "_checkboxInput_spoe9_339", x = "_checkboxInputSelected_spoe9_378", O = "_checkboxInputHover_spoe9_382", a = "_uploadButton_spoe9_429", g = {
|
|
2
|
+
label: o,
|
|
3
|
+
requiredMark: e,
|
|
4
|
+
input: t,
|
|
5
|
+
inputGroup: n,
|
|
6
|
+
inputHover: p,
|
|
7
|
+
innerInput: c,
|
|
8
|
+
dropdownTrigger: s,
|
|
9
|
+
dropdownIcon: _,
|
|
10
|
+
dropdownPopover: r,
|
|
11
|
+
selectPopover: i,
|
|
12
|
+
selectOption: u,
|
|
13
|
+
selectOptionHover: d,
|
|
14
|
+
selectOptionSelected: l,
|
|
15
|
+
selectOptionWithoutFocusRing: h,
|
|
16
|
+
description: b,
|
|
17
|
+
error: k,
|
|
18
|
+
checkbox: v,
|
|
19
|
+
checkboxInput: I,
|
|
20
|
+
checkboxInputSelected: x,
|
|
21
|
+
checkboxInputHover: O,
|
|
22
|
+
uploadButton: a
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
g as s
|
|
26
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
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
|
-
import
|
|
4
|
-
import { ag as Fe, au as ie, ap as ge, i as he, as as xe, e as re, at as be, ah as ce, ak as
|
|
3
|
+
import B from "classnames";
|
|
4
|
+
import { ag as Fe, au as ie, ap as ge, i as he, as as xe, e as re, at as be, ah as ce, ak as j, am as Ce } from "./form-Wsx4lguO.js";
|
|
5
5
|
import { E as Le } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as I } from "./field-rac.module-
|
|
7
|
-
import {
|
|
6
|
+
import { s as I } from "./field-rac.module-DobpyqOd.js";
|
|
7
|
+
import { C as ne, S as De, a3 as Ne, j as ae, r as le } from "./form-element-classes-BtKlobUX.js";
|
|
8
8
|
import { f as h, a as z } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { b as ve, a as ye, D as _e, E as
|
|
10
|
-
import { L as
|
|
11
|
-
import { DropZone as
|
|
9
|
+
import { b as ve, a as ye, D as _e, E as Te } from "./field-error-headless-BOlFtckJ.js";
|
|
10
|
+
import { L as Be } from "./field-label-headless-Dx3VrM-U.js";
|
|
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/*",
|
|
14
14
|
Image: "image/*",
|
|
@@ -111,7 +111,7 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
|
|
|
111
111
|
...p
|
|
112
112
|
]), await M(p);
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, q = (F) => {
|
|
115
115
|
const u = a[F];
|
|
116
116
|
if (b && i && u.state !== "error") {
|
|
117
117
|
const g = b.filter((f) => f.displayName !== u.file.name);
|
|
@@ -133,7 +133,7 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
|
|
|
133
133
|
hover: k,
|
|
134
134
|
getExplanationText: U,
|
|
135
135
|
handleChange: O,
|
|
136
|
-
handleDelete:
|
|
136
|
+
handleDelete: q,
|
|
137
137
|
accept: K,
|
|
138
138
|
handleBlur: $
|
|
139
139
|
};
|
|
@@ -162,8 +162,8 @@ 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 } =
|
|
166
|
-
return /* @__PURE__ */ t.createElement(
|
|
165
|
+
const { ariaDescribedBy: n } = ce(), { disabled: o, hasError: i } = j(), { handleFileChange: d } = Z(), x = h(e, A.Title), D = h(e, A.Subtitle), a = h(e, A.Button);
|
|
166
|
+
return /* @__PURE__ */ t.createElement(Re, {
|
|
167
167
|
"aria-describedby": n,
|
|
168
168
|
className: r,
|
|
169
169
|
"data-invalid": i,
|
|
@@ -198,7 +198,7 @@ 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: a, onFocus: s, hasError: b, errorMessage: m } =
|
|
201
|
+
const { ariaDescribedBy: o, inputId: i, labelId: d, errorId: x } = ce(), { disabled: D, required: a, onFocus: s, hasError: b, errorMessage: m } = j(), { handleFileChange: c, accept: N, multiple: v, buttonRef: E, handleBlur: R, limitError: k, files: y } = Z(), S = (y == null ? void 0 : y.some((C) => C.errorMessage)) ?? !1, _ = !!(b || m || k || S);
|
|
202
202
|
return /* @__PURE__ */ t.createElement(Me, {
|
|
203
203
|
acceptedFileTypes: N ? N.split(",") : void 0,
|
|
204
204
|
allowsMultiple: v,
|
|
@@ -225,10 +225,10 @@ const A = ({ children: e, className: r }) => {
|
|
|
225
225
|
isDisabled: D,
|
|
226
226
|
className: e,
|
|
227
227
|
onFocus: s,
|
|
228
|
-
onBlur:
|
|
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);
|
|
@@ -237,8 +237,8 @@ J.Text = Pe;
|
|
|
237
237
|
A.Title = Ue;
|
|
238
238
|
A.Subtitle = Oe;
|
|
239
239
|
A.Button = J;
|
|
240
|
-
const
|
|
241
|
-
const { file: o, index: i } = n, d = o.file.name, x = h(e,
|
|
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), a = h(e, T.Spinner), s = h(e, T.Error);
|
|
242
242
|
return /* @__PURE__ */ t.createElement("div", {
|
|
243
243
|
className: r
|
|
244
244
|
}, z(x, {
|
|
@@ -255,7 +255,7 @@ const B = ({ 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: a } = Z(), s = V(null);
|
|
259
259
|
se(() => {
|
|
260
260
|
const m = a.current, c = i;
|
|
261
261
|
return m[c] = s, () => {
|
|
@@ -285,15 +285,15 @@ const B = ({ 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
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
293
|
+
T.Name = ze;
|
|
294
|
+
T.Remove = Ve;
|
|
295
|
+
T.Spinner = je;
|
|
296
|
+
T.Error = ue;
|
|
297
297
|
ue.Text = ve;
|
|
298
298
|
const X = ({ children: e, className: r }) => {
|
|
299
299
|
const { files: n } = Z(), o = h(e, X.File);
|
|
@@ -305,12 +305,12 @@ const X = ({ children: e, className: r }) => {
|
|
|
305
305
|
index: d
|
|
306
306
|
})));
|
|
307
307
|
};
|
|
308
|
-
X.File =
|
|
308
|
+
X.File = T;
|
|
309
309
|
const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
310
|
-
const { id: r, value: n, onChange: o, uploadFileFormats: i, valueSliderLimit: d, target: x, explanationText: D, onBlur: a, hasError: s, errorMessage: b, FieldLayout: m } =
|
|
310
|
+
const { id: r, value: n, onChange: o, uploadFileFormats: i, valueSliderLimit: d, target: x, explanationText: D, onBlur: a, hasError: s, errorMessage: b, FieldLayout: m } = j(), c = V(null), N = V({}), v = P(() => {
|
|
311
311
|
var L;
|
|
312
312
|
(L = c.current) == null || L.focus();
|
|
313
|
-
}, []), { files: E, limitError:
|
|
313
|
+
}, []), { files: E, limitError: R, hover: k, getExplanationText: y, handleBlur: S, handleChange: _, handleDelete: C, accept: U } = Ze({
|
|
314
314
|
valueSliderLimit: d,
|
|
315
315
|
value: n,
|
|
316
316
|
explanationText: D,
|
|
@@ -326,17 +326,17 @@ 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
334
|
accept: U,
|
|
335
|
-
limitReached:
|
|
335
|
+
limitReached: q,
|
|
336
336
|
multiple: O,
|
|
337
337
|
getExplanationText: y,
|
|
338
338
|
hover: k,
|
|
339
|
-
limitError:
|
|
339
|
+
limitError: R,
|
|
340
340
|
buttonRef: c,
|
|
341
341
|
fileRemoveButtonRefs: N
|
|
342
342
|
}), [
|
|
@@ -345,11 +345,11 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
345
345
|
M,
|
|
346
346
|
E,
|
|
347
347
|
U,
|
|
348
|
-
|
|
348
|
+
q,
|
|
349
349
|
O,
|
|
350
350
|
y,
|
|
351
351
|
k,
|
|
352
|
-
|
|
352
|
+
R
|
|
353
353
|
]), K = h(e, l.Label), W = h(e, l.DropZone), F = h(e, l.Button), u = h(e, l.Explanation), g = h(e, l.Files), p = h(e, l.Description), f = h(e, l.Error);
|
|
354
354
|
return Ce(() => {
|
|
355
355
|
var L;
|
|
@@ -361,23 +361,23 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
|
|
|
361
361
|
renderLabel: () => K,
|
|
362
362
|
renderInput: () => W ?? F,
|
|
363
363
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, z(f, {
|
|
364
|
-
hasError: !!(s ||
|
|
365
|
-
errorMessage:
|
|
364
|
+
hasError: !!(s || R),
|
|
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
|
-
l.Label =
|
|
374
|
+
l.Label = Be;
|
|
375
375
|
l.DropZone = A;
|
|
376
376
|
l.Button = J;
|
|
377
|
-
l.Explanation =
|
|
377
|
+
l.Explanation = qe;
|
|
378
378
|
l.Files = X;
|
|
379
379
|
l.Description = _e;
|
|
380
|
-
l.Error =
|
|
380
|
+
l.Error = Te;
|
|
381
381
|
const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
382
382
|
viewBox: "0 0 24 24",
|
|
383
383
|
width: 24,
|
|
@@ -451,16 +451,16 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
451
451
|
}), nt = () => {
|
|
452
452
|
const { t: e } = ie();
|
|
453
453
|
return /* @__PURE__ */ t.createElement(l, null, /* @__PURE__ */ t.createElement(l.Label, {
|
|
454
|
-
className:
|
|
454
|
+
className: B(ne, I.label)
|
|
455
455
|
}, /* @__PURE__ */ t.createElement(l.Label.Required, {
|
|
456
|
-
className:
|
|
456
|
+
className: B(De, I.requiredMark)
|
|
457
457
|
})), /* @__PURE__ */ t.createElement(l.Button, {
|
|
458
|
-
className:
|
|
458
|
+
className: B(Ne, I.uploadButton),
|
|
459
459
|
"aria-roledescription": e("file-upload.aria-roledescription")
|
|
460
460
|
}, /* @__PURE__ */ t.createElement($e, null), /* @__PURE__ */ t.createElement(l.Button.Text, null)), /* @__PURE__ */ t.createElement(l.Explanation, {
|
|
461
|
-
className:
|
|
461
|
+
className: B(ae, I.description, w.explanation)
|
|
462
462
|
}), /* @__PURE__ */ t.createElement(l.Files, {
|
|
463
|
-
className:
|
|
463
|
+
className: B(ne, w.files)
|
|
464
464
|
}, /* @__PURE__ */ t.createElement(l.Files.File, {
|
|
465
465
|
className: w.file
|
|
466
466
|
}, /* @__PURE__ */ t.createElement(l.Files.File.Name, {
|
|
@@ -472,11 +472,11 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
472
472
|
className: w.removeButton,
|
|
473
473
|
"aria-label": e("file-upload.delete-file.aria-label")
|
|
474
474
|
}, /* @__PURE__ */ t.createElement(We, null)), /* @__PURE__ */ t.createElement(l.Files.File.Error, {
|
|
475
|
-
className:
|
|
475
|
+
className: B(le, I.error, w.fileError)
|
|
476
476
|
}, /* @__PURE__ */ t.createElement(Ke, null), /* @__PURE__ */ t.createElement(l.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(l.Description, {
|
|
477
|
-
className:
|
|
477
|
+
className: B(ae, I.description)
|
|
478
478
|
}, rt), /* @__PURE__ */ t.createElement(l.Error, {
|
|
479
|
-
className:
|
|
479
|
+
className: B(le, I.error)
|
|
480
480
|
}, /* @__PURE__ */ t.createElement(Le, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)));
|
|
481
481
|
}, Ft = () => /* @__PURE__ */ t.createElement(nt, null);
|
|
482
482
|
export {
|