@wix/form-elements 1.95.0 → 1.97.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/README.md +7 -3
- package/dist/component/{appointment-rac-mhQIjy3A.js → appointment-rac-BKgRKq3j.js} +4 -4
- package/dist/component/{bookings-address-rac-pcZeAN2d.js → bookings-address-rac-C87x19gw.js} +1 -1
- package/dist/component/{bookings-email-rac-BHdvWhcv.js → bookings-email-rac-f4nuC_pb.js} +1 -1
- package/dist/component/{bookings-first-name-rac-mPNuMBGo.js → bookings-first-name-rac-BGmuAmbu.js} +1 -1
- package/dist/component/{bookings-header-rac-CUzR91gM.js → bookings-header-rac-CoyxHljp.js} +1 -1
- package/dist/component/{bookings-last-name-rac-q2bsOPke.js → bookings-last-name-rac-D2mBYwcR.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BpwVjQwz.js → bookings-login-bar-rac-BH2Mi6TR.js} +1 -1
- package/dist/component/{bookings-phone-rac-DWdDpi-n.js → bookings-phone-rac-Dz78ybFV.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CZnGLPwv.js → bookings-rich-text-rac-8_h0cOoy.js} +1 -1
- package/dist/component/{checkbox-field-rac-DRVjITJ_.js → checkbox-field-rac-CJnegjvL.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-CKXgbUdv.js → checkbox-group-field-headless-CrA7Gx2Y.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-Dt3yWmua.js → checkbox-group-field-rac-DMg75l5Q.js} +3 -3
- package/dist/component/{checkbox-group-rac-BTFoDjxn.js → checkbox-group-rac-C9XWlO5D.js} +1 -1
- package/dist/component/{checkbox-rac-Crn5HP7E.js → checkbox-rac-CrqhH4z9.js} +1 -1
- package/dist/component/{contacts-address-rac-c1zfBJgx.js → contacts-address-rac-C2mqTiPg.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BaaSPZgO.js → contacts-birthdate-rac-i7_RMona.js} +1 -1
- package/dist/component/{contacts-company-rac-CzuRjr1D.js → contacts-company-rac-7sdIosaG.js} +1 -1
- package/dist/component/{contacts-email-rac-hL98o3x4.js → contacts-email-rac-CrsksJ9G.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BXTnd1aU.js → contacts-first-name-rac-I5xIYxgD.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DYjmWO4_.js → contacts-last-name-rac-DnzJYJh7.js} +1 -1
- package/dist/component/{contacts-phone-rac-KMnorQhu.js → contacts-phone-rac-Cx1jpYmv.js} +1 -1
- package/dist/component/{contacts-position-rac-ylzvuGhD.js → contacts-position-rac-CxddG_cE.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Bi3ZazuW.js → contacts-subscribe-rac-C1nTAhnd.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-C01LkO1D.js → contacts-tax-id-rac-B1lzfrj_.js} +1 -1
- package/dist/component/{date-availability-BXwnYCBt.js → date-availability-LN33GU7O.js} +1 -1
- package/dist/component/{date-input-field-rac-BMdPQoFk.js → date-input-field-rac-zTcw6Mxx.js} +6 -6
- package/dist/component/{date-input-rac-D2mDdJ_4.js → date-input-rac-NfVbrcoO.js} +1 -1
- package/dist/component/{date-picker-field-rac-7gyRMkPp.js → date-picker-field-rac-Cc9hJloJ.js} +5 -5
- package/dist/component/{date-picker-rac-FyNcNbTc.js → date-picker-rac-C5iXyKdf.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BTjqn_g-.js → date-time-input-field-rac-Cp34u7cC.js} +6 -6
- package/dist/component/{date-time-input-rac-C81cN7rJ.js → date-time-input-rac-CfFd56Xf.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DAjQPdi_.js → dext-checkbox-group-rac-BVx7XXwR.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DVt9mAXM.js → dext-checkbox-rac-CmUOLx_w.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BnaExh1i.js → dext-date-picker-rac-XDrLGVTQ.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DPAW4eBA.js → dext-date-time-input-rac-ZLCq_taK.js} +1 -1
- package/dist/component/{dext-dropdown-rac-P9T1vh24.js → dext-dropdown-rac-C74zBq3M.js} +1 -1
- package/dist/component/{dext-email-rac-BfEuFGaV.js → dext-email-rac-CqS9HcdY.js} +1 -1
- package/dist/component/{dext-number-input-rac-B5eN2rLP.js → dext-number-input-rac-DszjJDT-.js} +1 -1
- package/dist/component/{dext-phone-rac-DA-h_tpZ.js → dext-phone-rac-wt7T8hpM.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BjpkApRr.js → dext-radio-group-rac-BvRnaWP0.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DUMRW9uI.js → dext-rating-input-rac-D1Lt9M3c.js} +1 -1
- package/dist/component/{dext-tags-rac-s0WchM4X.js → dext-tags-rac-70YO5CJH.js} +2 -2
- package/dist/component/{dext-text-area-rac-BRMsiGEH.js → dext-text-area-rac-CC5RCvWh.js} +1 -1
- package/dist/component/{dext-text-input-rac-BBZi3D8V.js → dext-text-input-rac-s487DzPW.js} +1 -1
- package/dist/component/{dext-url-input-rac-jKMWbCGB.js → dext-url-input-rac-DEKwUh2a.js} +1 -1
- package/dist/component/{donation-rac-DyeKbodo.js → donation-rac-C2bCFVHP.js} +5 -5
- package/dist/component/{dropdown-field-headless-BK8BN3u4.js → dropdown-field-headless-BMWwkydq.js} +4 -4
- package/dist/component/{dropdown-field-rac-B6yzL_R0.js → dropdown-field-rac-Cw5Cbpg0.js} +2 -2
- package/dist/component/{dropdown-rac-CQaMpex2.js → dropdown-rac-CEmlDY3w.js} +1 -1
- package/dist/component/{ecom-address-rac-DQr3-QeV.js → ecom-address-rac-Dv6asnf_.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CZ-pj21A.js → ecom-subscription-checkbox-rac-DOwH-Ebd.js} +2 -2
- package/dist/component/{email-input-field-rac-Vp0YfQOe.js → email-input-field-rac-CeFXPibq.js} +3 -3
- package/dist/component/events-repeater-rac-BUk5Qc8n.js +267 -0
- package/dist/component/{events-rsvp-rac-u_BDmDJ2.js → events-rsvp-rac-CtFkVzUy.js} +2 -2
- package/dist/component/{field-error-headless-BOlFtckJ.js → field-error-headless-B6x_cVEi.js} +1 -1
- package/dist/component/{field-label-headless-Dx3VrM-U.js → field-label-headless-BibCD8xx.js} +1 -1
- package/dist/component/{file-upload-rac-DaFuvO-g.js → file-upload-rac-BUcktluW.js} +3 -3
- package/dist/component/{fixed-payment-rac-DpBwOtOf.js → fixed-payment-rac-BMSBSo5c.js} +3 -3
- package/dist/component/{form-Wsx4lguO.js → form-9WmwgGNc.js} +1120 -1108
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C8FlksmH.js → header-field-rac-CxUuHOic.js} +2 -2
- package/dist/component/{header-rac-C2J-pLq-.js → header-rac-DejI69X7.js} +1 -1
- package/dist/component/{image-choice-rac-i4C_OXyb.js → image-choice-rac-BjI5a_co.js} +4 -4
- package/dist/component/{index-CRI82pG6.js → index-Csso-2QH.js} +2 -2
- package/dist/component/{index-C34urqyX.js → index-Dz2hV2_S.js} +4 -4
- package/dist/component/{isObjectLike-D-9JnXmU.js → isObjectLike-BN_BZMhy.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Dkfso46f.js → multiline-address-field-rac-CYfphmfr.js} +7 -7
- package/dist/component/{multiline-address-rac-BjrwDwOk.js → multiline-address-rac-Ccujt2bd.js} +1 -1
- package/dist/component/{number-input-field-rac-CgHi83Q1.js → number-input-field-rac-CfnRCRar.js} +4 -4
- package/dist/component/{number-input-rac-BinBxOCS.js → number-input-rac-DnTO9d8P.js} +1 -1
- package/dist/component/{password-rac-CDGqIRW5.js → password-rac-Be_YSb-Q.js} +4 -4
- package/dist/component/{payment-input-rac-f4uuGeJF.js → payment-input-rac-DXUf5iYb.js} +4 -4
- package/dist/component/{phone-input-field-rac-IdBqjM9Q.js → phone-input-field-rac-DYAwLuvJ.js} +6 -6
- package/dist/component/{phone-rac-VHPMrSpw.js → phone-rac-BlsvDmER.js} +1 -1
- package/dist/component/{product-list-rac-Bk8q5y5L.js → product-list-rac-DdXwRSc2.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-kTWqvAoW.js → quiz-radio-group-rac-B0yiKdbu.js} +1 -1
- package/dist/component/{radio-button-module-classes-D77Nc48M.js → radio-button-module-classes-t1jsWYpT.js} +3 -3
- package/dist/component/{radio-group-field-rac-DC-AYSOH.js → radio-group-field-rac-Cug1TtSq.js} +3 -3
- package/dist/component/{radio-group-rac-BkswH1Py.js → radio-group-rac-_O5T0Pt8.js} +1 -1
- package/dist/component/{rating-input-field-rac-Cqgw6PjV.js → rating-input-field-rac-BSKzQ3fq.js} +4 -4
- package/dist/component/{rating-input-rac-CbZhlK3h.js → rating-input-rac-B71q44YO.js} +1 -1
- package/dist/component/{rich-content-rac.module-j_9YbXMI.js → rich-content-rac.module-BJuoKIOt.js} +1 -1
- package/dist/component/{rich-text-field-rac-Da1EIb3b.js → rich-text-field-rac-CiSR82Fw.js} +2 -2
- package/dist/component/{rich-text-rac-BarNBtgP.js → rich-text-rac-Bo6UBwOg.js} +1 -1
- package/dist/component/{service-dropdown-rac-DLIC_csj.js → service-dropdown-rac-BJ7V-g8M.js} +4 -4
- package/dist/component/{services-multi-choice-rac-vyxtwSM2.js → services-multi-choice-rac-CtBcc9WH.js} +5 -5
- package/dist/component/{signature-rac-DIM2Uwsg.js → signature-rac-yvrHr1he.js} +3 -3
- package/dist/component/{submit-button-rac-DgxjomCu.js → submit-button-rac-s-JdZgq7.js} +1 -1
- package/dist/component/{tags-field-rac-BFlkxifd.js → tags-field-rac-g_W0RMod.js} +5 -5
- package/dist/component/{tags-rac-D4TwrAWc.js → tags-rac-DmvIH6HU.js} +1 -1
- package/dist/component/{text-area-field-rac-Dcz7VUQ5.js → text-area-field-rac-Duja5xOA.js} +4 -4
- package/dist/component/{text-area-rac-DhloXdO2.js → text-area-rac-DzRxgG6u.js} +1 -1
- package/dist/component/{text-input-field-rac-C8e3TMxI.js → text-input-field-rac-C2eXeoBC.js} +2 -2
- package/dist/component/{text-input-headless-fl7qoZzR.js → text-input-headless-d1WK0nqR.js} +3 -3
- package/dist/component/{text-input-rac-CBn6bHtP.js → text-input-rac-DM9MnoQs.js} +1 -1
- package/dist/component/{time-input-rac-Dsm7_vrf.js → time-input-rac-CxVZ3USX.js} +4 -4
- package/dist/component/{url-input-field-rac-9Hfx1xzO.js → url-input-field-rac-4oVJMr1a.js} +4 -4
- package/dist/component/{url-input-rac-CVlE4pcg.js → url-input-rac--T-FnskQ.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-Dsxto42_.js → use-dropdown-option-class-name-BFHRYpVL.js} +1 -1
- package/dist/component/{use-element-state-class-name-BIqDbVvI.js → use-element-state-class-name-De5YnxMK.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-BMPqRDVW.js → use-is-forced-open-dropdown-CWvcd9Ex.js} +1 -1
- package/dist/component/{use-service-options-base-07_rqXcG.js → use-service-options-base-CD1EVWRE.js} +1 -1
- package/dist/component/{use-text-input-class-name-DqFt59gd.js → use-text-input-class-name-BYwXccvO.js} +2 -2
- package/package.json +4 -3
- package/dist/component/events-repeater-rac-BPE4Hn_G.js +0 -256
package/dist/component/{email-input-field-rac-Vp0YfQOe.js → email-input-field-rac-CeFXPibq.js}
RENAMED
|
@@ -2,7 +2,7 @@ import { RicosViewer as ie } from "@wix/ricos/viewer";
|
|
|
2
2
|
import D from "classnames";
|
|
3
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-9WmwgGNc.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-d1WK0nqR.js";
|
|
14
14
|
import { E as Ae } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { s as H } from "./field-rac.module-DobpyqOd.js";
|
|
16
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-
|
|
17
|
+
import { u as De } from "./use-text-input-class-name-BYwXccvO.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
|
"&": "&",
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import t, { useState as $, useMemo as B, useCallback as T, useRef as M } from "react";
|
|
2
|
+
import k from "classnames";
|
|
3
|
+
import { NumberField as q, CheckboxField as J, CheckboxButton as Q, Group as W, Input as Y, Button as w } from "react-aria-components";
|
|
4
|
+
import { aq as U, ar as z, ag as H, al as K, v as Z, ak as L, ah as P, am as X, j as ee } from "./form-9WmwgGNc.js";
|
|
5
|
+
import { f as C, a as y } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { L as te } from "./field-label-headless-BibCD8xx.js";
|
|
7
|
+
import { S as se } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
|
+
import { u as ne } from "./use-invoke-callback-UH73A_J3.js";
|
|
9
|
+
import { C as x } from "./chevron-down-icon-CcpVm6B-.js";
|
|
10
|
+
import { C as oe } from "./checkbox-indicator-module-classes-DhbNznSB.js";
|
|
11
|
+
import { s as v } from "./field-rac.module-DobpyqOd.js";
|
|
12
|
+
import { C 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-De5YnxMK.js";
|
|
14
|
+
import { u as me } from "./use-text-input-class-name-BYwXccvO.js";
|
|
15
|
+
const ie = [], de = ({ id: e, fields: s, layout: a, value: o, onChange: n, errors: l = ie, validation: c }) => {
|
|
16
|
+
const [m, i] = $((o == null ? void 0 : o.length) || 0), u = B(() => o ?? [], [
|
|
17
|
+
o
|
|
18
|
+
]), d = U(), G = z(), E = H(), { validateFields: p } = K(), F = c.predefined.objectArrayOptions.maxItems, O = B(() => Z({
|
|
19
|
+
form: {
|
|
20
|
+
fields: s,
|
|
21
|
+
steps: [
|
|
22
|
+
{
|
|
23
|
+
layout: a
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
parentId: e,
|
|
28
|
+
recursive: !1
|
|
29
|
+
}), [
|
|
30
|
+
s,
|
|
31
|
+
a,
|
|
32
|
+
e
|
|
33
|
+
]), N = B(() => l.reduce((g, I) => {
|
|
34
|
+
const [h, _] = I.errorPath.split("/"), A = parseInt(h, 10);
|
|
35
|
+
return g[A] || (g[A] = []), g[A].push({
|
|
36
|
+
...I,
|
|
37
|
+
errorPath: _
|
|
38
|
+
}), g;
|
|
39
|
+
}, []), [
|
|
40
|
+
l
|
|
41
|
+
]), b = T((g) => {
|
|
42
|
+
const I = Number.isNaN(g) ? 0 : Math.min(Math.max(g, 0), F);
|
|
43
|
+
i(I), n == null || n(Array.from({
|
|
44
|
+
length: I
|
|
45
|
+
}, (h, _) => u[_] ?? {}));
|
|
46
|
+
}, [
|
|
47
|
+
F,
|
|
48
|
+
u,
|
|
49
|
+
n
|
|
50
|
+
]), D = T((g) => (I, h) => {
|
|
51
|
+
const _ = Array.from({
|
|
52
|
+
length: m
|
|
53
|
+
}, (A, j) => u[j] ?? {});
|
|
54
|
+
_[g] = {
|
|
55
|
+
..._[g],
|
|
56
|
+
[I]: h
|
|
57
|
+
}, n == null || n(_);
|
|
58
|
+
}, [
|
|
59
|
+
m,
|
|
60
|
+
u,
|
|
61
|
+
n
|
|
62
|
+
]);
|
|
63
|
+
return {
|
|
64
|
+
guestLimit: F,
|
|
65
|
+
guestCount: m,
|
|
66
|
+
guests: u,
|
|
67
|
+
errorsByIndex: N,
|
|
68
|
+
formView: O,
|
|
69
|
+
formSchema: d,
|
|
70
|
+
formFields: G,
|
|
71
|
+
fieldActions: E,
|
|
72
|
+
validateFields: p,
|
|
73
|
+
changeGuestCount: b,
|
|
74
|
+
changeGuestField: D
|
|
75
|
+
};
|
|
76
|
+
}, pe = [], Ee = {}, r = ({ children: e, className: s }) => {
|
|
77
|
+
const a = L(), { id: o, FieldLayout: n } = a, { guestLimit: l, guestCount: c, guests: m, errorsByIndex: i, formView: u, changeGuestCount: d, changeGuestField: G } = de(a), E = C(e, r.Label), p = C(e, r.GuestCount), F = C(e, r.GuestToggle), O = C(e, r.Guests), N = l > 1;
|
|
78
|
+
return /* @__PURE__ */ t.createElement(n, {
|
|
79
|
+
fieldId: o,
|
|
80
|
+
renderLabel: () => N ? E : null,
|
|
81
|
+
renderInput: () => /* @__PURE__ */ t.createElement("div", {
|
|
82
|
+
className: s
|
|
83
|
+
}, N ? y(p, {
|
|
84
|
+
guestLimit: l,
|
|
85
|
+
guestCount: c,
|
|
86
|
+
onGuestCountChange: d
|
|
87
|
+
}) : y(F, {
|
|
88
|
+
guestCount: c,
|
|
89
|
+
onGuestCountChange: d
|
|
90
|
+
}), y(O, {
|
|
91
|
+
guestCount: c,
|
|
92
|
+
guests: m,
|
|
93
|
+
errorsByIndex: i,
|
|
94
|
+
formView: u,
|
|
95
|
+
onGuestFieldChange: G
|
|
96
|
+
})),
|
|
97
|
+
renderDescription: () => null
|
|
98
|
+
});
|
|
99
|
+
}, Ce = ({ className: e }) => /* @__PURE__ */ t.createElement(te, {
|
|
100
|
+
className: e
|
|
101
|
+
}, null), f = ({ children: e, ...s }) => {
|
|
102
|
+
const { guestLimit: a, guestCount: o, onGuestCountChange: n } = s, { label: l, disabled: c, readOnly: m, onBlur: i, onFocus: u } = L(), d = ne(i), G = C(e, f.Control);
|
|
103
|
+
return /* @__PURE__ */ t.createElement(q, {
|
|
104
|
+
"aria-label": l,
|
|
105
|
+
value: o,
|
|
106
|
+
onChange: n,
|
|
107
|
+
minValue: 0,
|
|
108
|
+
maxValue: a,
|
|
109
|
+
step: 1,
|
|
110
|
+
isDisabled: c,
|
|
111
|
+
isReadOnly: m,
|
|
112
|
+
onBlur: d,
|
|
113
|
+
onFocus: u
|
|
114
|
+
}, G);
|
|
115
|
+
}, ge = ({ children: e, className: s }) => {
|
|
116
|
+
const { disabled: a, readOnly: o } = L(), n = C(e, f.Input), l = C(e, f.Decrement), c = C(e, f.Increment);
|
|
117
|
+
return /* @__PURE__ */ t.createElement(W, {
|
|
118
|
+
className: s,
|
|
119
|
+
isDisabled: a,
|
|
120
|
+
isReadOnly: o
|
|
121
|
+
}, n, c, l);
|
|
122
|
+
}, Ge = ({ className: e }) => {
|
|
123
|
+
const { id: s } = L(), { inputId: a, ariaDescribedBy: o } = P(), n = M(null);
|
|
124
|
+
return X(() => {
|
|
125
|
+
var l;
|
|
126
|
+
(l = n.current) == null || l.focus();
|
|
127
|
+
}, s), /* @__PURE__ */ t.createElement(Y, {
|
|
128
|
+
ref: n,
|
|
129
|
+
id: a,
|
|
130
|
+
"aria-describedby": o,
|
|
131
|
+
className: e,
|
|
132
|
+
inputMode: "numeric"
|
|
133
|
+
});
|
|
134
|
+
}, fe = ({ children: e, className: s }) => /* @__PURE__ */ t.createElement(w, {
|
|
135
|
+
slot: "decrement",
|
|
136
|
+
className: s
|
|
137
|
+
}, e), be = ({ children: e, className: s }) => /* @__PURE__ */ t.createElement(w, {
|
|
138
|
+
slot: "increment",
|
|
139
|
+
className: s
|
|
140
|
+
}, e), S = ({ children: e, className: s, ...a }) => {
|
|
141
|
+
const { guestCount: o, onGuestCountChange: n } = a, { id: l, label: c, disabled: m, readOnly: i, onBlur: u, onFocus: d } = L(), { inputId: G, ariaDescribedBy: E } = P(), p = M(null);
|
|
142
|
+
X(() => {
|
|
143
|
+
var b;
|
|
144
|
+
(b = p.current) == null || b.focus();
|
|
145
|
+
}, l);
|
|
146
|
+
const F = C(e, S.Input), O = C(e, S.Label), N = T((b) => {
|
|
147
|
+
n(b ? 1 : 0);
|
|
148
|
+
}, [
|
|
149
|
+
n
|
|
150
|
+
]);
|
|
151
|
+
return /* @__PURE__ */ t.createElement(J, {
|
|
152
|
+
inputRef: p,
|
|
153
|
+
id: G,
|
|
154
|
+
"aria-describedby": E,
|
|
155
|
+
isSelected: o > 0,
|
|
156
|
+
onChange: N,
|
|
157
|
+
isDisabled: m,
|
|
158
|
+
isReadOnly: i,
|
|
159
|
+
onBlur: u,
|
|
160
|
+
onFocus: d
|
|
161
|
+
}, /* @__PURE__ */ t.createElement(Q, {
|
|
162
|
+
className: s
|
|
163
|
+
}, ({ isSelected: b, isHovered: D }) => /* @__PURE__ */ t.createElement(t.Fragment, null, y(F, {
|
|
164
|
+
isSelected: b,
|
|
165
|
+
isHovered: D
|
|
166
|
+
}), y(O, {
|
|
167
|
+
label: c
|
|
168
|
+
}))));
|
|
169
|
+
}, Fe = ({ className: e, ...s }) => {
|
|
170
|
+
const { label: a } = s;
|
|
171
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
172
|
+
className: e
|
|
173
|
+
}, a);
|
|
174
|
+
}, V = ({ children: e, className: s, ...a }) => {
|
|
175
|
+
const { guestCount: o, guests: n, errorsByIndex: l, formView: c, onGuestFieldChange: m } = a, { disabled: i, readOnly: u } = L(), d = B(() => ({
|
|
176
|
+
...c,
|
|
177
|
+
fields: c.fields.map((E) => ({
|
|
178
|
+
...E,
|
|
179
|
+
properties: {
|
|
180
|
+
...E.properties,
|
|
181
|
+
disabled: !!(i || E.properties.disabled),
|
|
182
|
+
readOnly: !!(u || E.properties.readOnly)
|
|
183
|
+
}
|
|
184
|
+
}))
|
|
185
|
+
}), [
|
|
186
|
+
c,
|
|
187
|
+
i,
|
|
188
|
+
u
|
|
189
|
+
]), G = C(e, V.Guest);
|
|
190
|
+
return o ? /* @__PURE__ */ t.createElement("div", {
|
|
191
|
+
className: s
|
|
192
|
+
}, Array.from({
|
|
193
|
+
length: o
|
|
194
|
+
}, (E, p) => y(G, {
|
|
195
|
+
key: p,
|
|
196
|
+
index: p,
|
|
197
|
+
formView: d,
|
|
198
|
+
values: n[p] ?? Ee,
|
|
199
|
+
errors: l[p] ?? pe,
|
|
200
|
+
onFieldChange: m(p)
|
|
201
|
+
}))) : null;
|
|
202
|
+
}, Ie = ({ className: e, ...s }) => {
|
|
203
|
+
const { index: a, formView: o, values: n, errors: l, onFieldChange: c } = s, m = U(), i = z(), u = H(), { validateFields: d } = K();
|
|
204
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
205
|
+
className: e,
|
|
206
|
+
"data-hook": `guest-${a}`
|
|
207
|
+
}, /* @__PURE__ */ t.createElement(ee, {
|
|
208
|
+
form: o,
|
|
209
|
+
formSchema: m,
|
|
210
|
+
values: n,
|
|
211
|
+
errors: l,
|
|
212
|
+
validateFields: d,
|
|
213
|
+
onFieldChange: c,
|
|
214
|
+
fields: i,
|
|
215
|
+
fieldActions: u
|
|
216
|
+
}));
|
|
217
|
+
};
|
|
218
|
+
f.Control = ge;
|
|
219
|
+
f.Input = Ge;
|
|
220
|
+
f.Decrement = fe;
|
|
221
|
+
f.Increment = be;
|
|
222
|
+
S.Input = se;
|
|
223
|
+
S.Label = Fe;
|
|
224
|
+
V.Guest = Ie;
|
|
225
|
+
r.Label = Ce;
|
|
226
|
+
r.GuestCount = f;
|
|
227
|
+
r.GuestToggle = S;
|
|
228
|
+
r.Guests = V;
|
|
229
|
+
const _e = "_container_z48oy_1", Ne = "_countGroup_z48oy_8", ye = "_increment_z48oy_18", Le = "_decrement_z48oy_19", R = {
|
|
230
|
+
container: _e,
|
|
231
|
+
countGroup: Ne,
|
|
232
|
+
increment: ye,
|
|
233
|
+
decrement: Le
|
|
234
|
+
}, Oe = () => {
|
|
235
|
+
const e = me(R.countGroup), s = ue({
|
|
236
|
+
globalClasses: ce,
|
|
237
|
+
moduleClasses: oe
|
|
238
|
+
});
|
|
239
|
+
return /* @__PURE__ */ t.createElement(r, {
|
|
240
|
+
className: R.container
|
|
241
|
+
}, /* @__PURE__ */ t.createElement(r.Label, {
|
|
242
|
+
className: k(re, v.label)
|
|
243
|
+
}), /* @__PURE__ */ t.createElement(r.GuestCount, null, /* @__PURE__ */ t.createElement(r.GuestCount.Control, {
|
|
244
|
+
className: e
|
|
245
|
+
}, /* @__PURE__ */ t.createElement(r.GuestCount.Input, {
|
|
246
|
+
className: v.innerInput
|
|
247
|
+
}), /* @__PURE__ */ t.createElement(r.GuestCount.Increment, {
|
|
248
|
+
className: R.increment
|
|
249
|
+
}, /* @__PURE__ */ t.createElement(x, {
|
|
250
|
+
style: {
|
|
251
|
+
transform: "rotate(180deg)"
|
|
252
|
+
}
|
|
253
|
+
})), /* @__PURE__ */ t.createElement(r.GuestCount.Decrement, {
|
|
254
|
+
className: R.decrement
|
|
255
|
+
}, /* @__PURE__ */ t.createElement(x, null)))), /* @__PURE__ */ t.createElement(r.GuestToggle, {
|
|
256
|
+
className: k(ae, v.checkbox)
|
|
257
|
+
}, /* @__PURE__ */ t.createElement(r.GuestToggle.Input, {
|
|
258
|
+
className: s
|
|
259
|
+
}), /* @__PURE__ */ t.createElement(r.GuestToggle.Label, {
|
|
260
|
+
className: le
|
|
261
|
+
})), /* @__PURE__ */ t.createElement(r.Guests, {
|
|
262
|
+
className: R.container
|
|
263
|
+
}, /* @__PURE__ */ t.createElement(r.Guests.Guest, null)));
|
|
264
|
+
}, ze = () => /* @__PURE__ */ t.createElement(Oe, null);
|
|
265
|
+
export {
|
|
266
|
+
ze as EventsRepeaterRAC
|
|
267
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
3
3
|
import r from "classnames";
|
|
4
|
-
import { a as s, s as o, R as c } from "./radio-button-module-classes-
|
|
4
|
+
import { a as s, s as o, R as c } from "./radio-button-module-classes-t1jsWYpT.js";
|
|
5
5
|
import { E } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as l } from "./field-rac.module-DobpyqOd.js";
|
|
7
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-
|
|
8
|
+
import { u } from "./use-element-state-class-name-De5YnxMK.js";
|
|
9
9
|
const e = ({ children: a }) => /* @__PURE__ */ t.createElement(s, null, a);
|
|
10
10
|
e.Label = s.Label;
|
|
11
11
|
e.Options = s.Options;
|
package/dist/component/{field-error-headless-BOlFtckJ.js → field-error-headless-B6x_cVEi.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-9WmwgGNc.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-Dx3VrM-U.js → field-label-headless-BibCD8xx.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-9WmwgGNc.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";
|
|
@@ -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 { 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-
|
|
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-9WmwgGNc.js";
|
|
5
5
|
import { E as Le } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as I } from "./field-rac.module-DobpyqOd.js";
|
|
7
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 Te } from "./field-error-headless-
|
|
10
|
-
import { L as Be } from "./field-label-headless-
|
|
9
|
+
import { b as ve, a as ye, D as _e, E as Te } from "./field-error-headless-B6x_cVEi.js";
|
|
10
|
+
import { L as Be } from "./field-label-headless-BibCD8xx.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/*",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import t, { useMemo as b } from "react";
|
|
2
2
|
import { RicosViewer as A } from "@wix/ricos/viewer";
|
|
3
3
|
import u from "classnames";
|
|
4
|
-
import { ak as C, ac as I, ah as P } from "./form-
|
|
4
|
+
import { ak as C, ac as I, ah as P } from "./form-9WmwgGNc.js";
|
|
5
5
|
import { f as c, a as O } from "./find-child-C60k4CxG.js";
|
|
6
6
|
import { f as S } from "./format-currency-BwShJ9vM.js";
|
|
7
|
-
import { D as x, E as N } from "./field-error-headless-
|
|
8
|
-
import { L as R } from "./field-label-headless-
|
|
7
|
+
import { D as x, E as N } from "./field-error-headless-B6x_cVEi.js";
|
|
8
|
+
import { L as R } from "./field-label-headless-BibCD8xx.js";
|
|
9
9
|
import { s as L } from "./field-rac.module-DobpyqOd.js";
|
|
10
10
|
import { C as v, D as M, j as g } from "./form-element-classes-BtKlobUX.js";
|
|
11
11
|
const e = ({ children: r }) => {
|