@wix/form-elements 1.166.0 → 1.167.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-BXpWILhi.js → appointment-rac-BbXyKTd7.js} +72 -72
- package/dist/component/{bookings-address-rac-Cf--TgsR.js → bookings-address-rac-VJkR_U9L.js} +1 -1
- package/dist/component/{bookings-email-rac-BtB8owOl.js → bookings-email-rac-_EupwXpQ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CBFDjB_k.js → bookings-first-name-rac-DTZixHYj.js} +1 -1
- package/dist/component/{bookings-header-rac-CrJORcuL.js → bookings-header-rac-BKbKTv5g.js} +1 -1
- package/dist/component/{bookings-last-name-rac-erG4ldFt.js → bookings-last-name-rac-BDy860-C.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Di4qLQUH.js → bookings-login-bar-rac-DgNP-YNZ.js} +5 -5
- package/dist/component/{bookings-phone-rac-DdM48Obh.js → bookings-phone-rac-B_I6n96b.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Cl8zOiU1.js → bookings-rich-text-rac-prYPbIiz.js} +1 -1
- package/dist/component/{checkbox-field-rac-CzIDF6aj.js → checkbox-field-rac-C-4PXuxG.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-B8tsQCwV.js → checkbox-group-field-headless-D16bAcaq.js} +35 -35
- package/dist/component/{checkbox-group-field-rac-h02K8CPA.js → checkbox-group-field-rac-GUQ5dO_s.js} +4 -4
- package/dist/component/{checkbox-group-rac-GfebLnuS.js → checkbox-group-rac-Bl6xL5-H.js} +1 -1
- package/dist/component/{checkbox-rac-Dn24U4oG.js → checkbox-rac-Blg0KVyP.js} +1 -1
- package/dist/component/{contacts-address-rac-CtVtIwOV.js → contacts-address-rac-BfOhCAj8.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CK2odpbJ.js → contacts-birthdate-rac-DYBvDh62.js} +1 -1
- package/dist/component/{contacts-company-rac-ue8vAn9A.js → contacts-company-rac-DIJr7zjA.js} +1 -1
- package/dist/component/{contacts-email-rac-lleErjYl.js → contacts-email-rac-DjmqELhC.js} +1 -1
- package/dist/component/{contacts-first-name-rac-D5wtz4Z1.js → contacts-first-name-rac-DGNll7gw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cj9GKWBY.js → contacts-last-name-rac-BJ8AZYQN.js} +1 -1
- package/dist/component/{contacts-phone-rac-BP6unckw.js → contacts-phone-rac-BC-QtpEN.js} +1 -1
- package/dist/component/{contacts-position-rac-XjUdZglr.js → contacts-position-rac-BQia__74.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Dnpbgw5C.js → contacts-subscribe-rac-CTFptz01.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-pNFMOZl6.js → contacts-tax-id-rac-Cy72Jouc.js} +1 -1
- package/dist/component/{date-availability-BRA7k6ep.js → date-availability-BC6updcS.js} +1 -1
- package/dist/component/{date-input-field-rac-B15XH-D_.js → date-input-field-rac-b_T1yf8D.js} +38 -38
- package/dist/component/{date-input-rac-B7XvsFeB.js → date-input-rac-KkRyWRP_.js} +1 -1
- package/dist/component/{date-picker-field-rac-BNgKcgVi.js → date-picker-field-rac-BLWVJbTJ.js} +6 -6
- package/dist/component/{date-picker-rac-P54cHP86.js → date-picker-rac-DKCQza7v.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Dt-jUznP.js → date-time-input-field-rac-CZxZW6fz.js} +45 -45
- package/dist/component/{date-time-input-rac-DHmOLCvg.js → date-time-input-rac-DQ-iBwmr.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Bo2ZRcJc.js → dext-checkbox-group-rac-kp1Jbwt-.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BdA2i9PR.js → dext-checkbox-rac-CBm9cRUz.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BME9ZDFy.js → dext-date-picker-rac-DsVKWsRy.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-owEU8r5-.js → dext-date-time-input-rac-CO26-8Qo.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BAeN43fo.js → dext-dropdown-rac-eRzu2C-y.js} +1 -1
- package/dist/component/{dext-email-rac-D7HBfCis.js → dext-email-rac-DDrZzE_G.js} +1 -1
- package/dist/component/{dext-number-input-rac-DEB2ji5S.js → dext-number-input-rac-Dj7sInLk.js} +1 -1
- package/dist/component/{dext-phone-rac-TOfFCmhD.js → dext-phone-rac-g8M77F7m.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DGsQLres.js → dext-radio-group-rac-BjhygC0R.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CFcRQeE7.js → dext-rating-input-rac-BraNjvyA.js} +1 -1
- package/dist/component/{dext-tags-rac-CGsaKVfb.js → dext-tags-rac-B5mAIuDi.js} +2 -2
- package/dist/component/{dext-text-area-rac-BqbLXOdt.js → dext-text-area-rac-D_YBnaWi.js} +1 -1
- package/dist/component/{dext-text-input-rac-CpXfQV53.js → dext-text-input-rac-BzeWH1jv.js} +1 -1
- package/dist/component/{dext-url-input-rac-Bbm3_OG9.js → dext-url-input-rac-Cn0h_vx3.js} +1 -1
- package/dist/component/{donation-rac-DvBAOz6H.js → donation-rac-CQRdHxWh.js} +46 -46
- package/dist/component/{dropdown-field-rac-BW0UDoBO.js → dropdown-field-rac-C7LL0W5Z.js} +3 -3
- package/dist/component/{dropdown-rac-B6ZD6Qgb.js → dropdown-rac-Nb2VyJ0x.js} +1 -1
- package/dist/component/{ecom-address-rac-Dnv9Yswd.js → ecom-address-rac-_c2YIIwg.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BVqvUwn4.js → ecom-subscription-checkbox-rac-Bma7TAVj.js} +2 -2
- package/dist/component/{email-input-field-rac-CuaMcfZR.js → email-input-field-rac-2E2tEaS5.js} +47 -47
- package/dist/component/events-repeater-rac-COWHYBFD.js +280 -0
- package/dist/component/{events-rsvp-rac-D4hSrIsE.js → events-rsvp-rac-CXp8j19Y.js} +3 -3
- package/dist/component/{field-error-headless-NGaTm3dF.js → field-error-headless-S-ugOQQX.js} +7 -7
- package/dist/component/{field-label-headless-Bx1UjEcp.js → field-label-headless-_n4I0_tX.js} +14 -14
- package/dist/component/{file-upload-rac-oOnemmUg.js → file-upload-rac-DCH_iwDg.js} +79 -79
- package/dist/component/{fixed-payment-rac-C9YkIvQO.js → fixed-payment-rac-CYkKJUfM.js} +14 -14
- package/dist/component/{form-sH9m0ReT.js → form-jK8ezTss.js} +1110 -1109
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-N5Oclne_.js → header-field-rac-DnbjI6W5.js} +6 -6
- package/dist/component/{header-rac-CTmSJdoY.js → header-rac-DKUICrni.js} +1 -1
- package/dist/component/{image-choice-rac-BYZ61yof.js → image-choice-rac-B_9ponST.js} +4 -4
- package/dist/component/{index-B56GTN_5.js → index-BxdMzOvN.js} +68 -68
- package/dist/component/{index-SHZx7XzS.js → index-ZYnsxY-a.js} +2 -2
- package/dist/component/{isObjectLike-BFpR7Q-o.js → isObjectLike-BW-9QEQl.js} +9 -9
- package/dist/component/{multiline-address-field-rac-DvMyN2gF.js → multiline-address-field-rac-k-P0ijWG.js} +40 -40
- package/dist/component/{multiline-address-rac-Cfv0QzzV.js → multiline-address-rac-Bbn9mNDa.js} +1 -1
- package/dist/component/{number-input-field-rac-CWQw7p2k.js → number-input-field-rac--lom-B_X.js} +7 -7
- package/dist/component/{number-input-rac-DJ2Nh9Vm.js → number-input-rac-Bhbd6T9S.js} +1 -1
- package/dist/component/{password-rac-ayoa5FQV.js → password-rac-BV_uTHb3.js} +14 -14
- package/dist/component/{payment-input-rac-CBjP_xjz.js → payment-input-rac-cawyGN_t.js} +28 -28
- package/dist/component/{phone-input-field-rac-BWOEiUK7.js → phone-input-field-rac-CsElHRto.js} +67 -67
- package/dist/component/{phone-rac-Dp7FouV3.js → phone-rac-XrHN5Nko.js} +1 -1
- package/dist/component/{product-list-rac-D_EoPXl-.js → product-list-rac-cxv_xz7K.js} +30 -30
- package/dist/component/{quiz-radio-group-rac-RWM0riuU.js → quiz-radio-group-rac-DGaxOPE1.js} +1 -1
- package/dist/component/{radio-button-module-classes-nK-xhmxh.js → radio-button-module-classes-Xv2Jn01x.js} +21 -21
- package/dist/component/{radio-group-field-rac-Cc-pvwZn.js → radio-group-field-rac-DgGqgTql.js} +4 -4
- package/dist/component/{radio-group-rac-xvesuLSn.js → radio-group-rac-Bh0E-oe1.js} +1 -1
- package/dist/component/{rating-input-field-rac-BgMRUXQy.js → rating-input-field-rac-C3YLV971.js} +10 -10
- package/dist/component/{rating-input-rac-CeZtJR2S.js → rating-input-rac-CfcC5EUh.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv7PIbmM.js → rich-content-rac.module-DUjzLGtX.js} +5 -5
- package/dist/component/{rich-text-field-rac-CmbNBe2u.js → rich-text-field-rac-BmguoJhk.js} +5 -5
- package/dist/component/{rich-text-rac-9hwPCQXl.js → rich-text-rac-BWhHcq25.js} +1 -1
- package/dist/component/{service-dropdown-rac-2Wjgmo75.js → service-dropdown-rac-C5oX-ql7.js} +30 -30
- package/dist/component/{services-multi-choice-rac-cZ7elBhc.js → services-multi-choice-rac-C1fem9NB.js} +12 -12
- package/dist/component/{signature-rac-BfE2328G.js → signature-rac-BtHqiWj1.js} +62 -62
- package/dist/component/{submit-button-rac-oYO7pska.js → submit-button-rac-OYeKJFF8.js} +39 -39
- package/dist/component/{tags-field-rac-B-_LzCFU.js → tags-field-rac-kA2RSijL.js} +37 -37
- package/dist/component/{tags-rac-D5bRM462.js → tags-rac-B_2qCZGu.js} +1 -1
- package/dist/component/{text-area-field-rac-fwtICvjX.js → text-area-field-rac-DeO609Mv.js} +17 -17
- package/dist/component/{text-area-rac-C4EkhfB5.js → text-area-rac-BAQFBOZd.js} +1 -1
- package/dist/component/{text-input-field-rac-CxZYUtxX.js → text-input-field-rac-CCcKwuLZ.js} +3 -3
- package/dist/component/{text-input-headless-DK5wBGBb.js → text-input-headless-D8-jkaYm.js} +8 -8
- package/dist/component/{text-input-rac-FS49SxCK.js → text-input-rac-BVcgjj8g.js} +1 -1
- package/dist/component/{time-input-rac-CDUVS7kp.js → time-input-rac-BYctyHgU.js} +11 -11
- package/dist/component/{url-input-field-rac-B2ypvh7T.js → url-input-field-rac-COC9qgcs.js} +23 -23
- package/dist/component/{url-input-rac-DbJx2T1R.js → url-input-rac-BZXLh0Ej.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-0ZlT4g7h.js → use-dropdown-option-class-name-BTltqRl1.js} +2 -2
- package/dist/component/use-dropdown-trigger-class-name-BjJZfl3i.js +98 -0
- package/dist/component/{use-element-state-class-name-DCAoZgWT.js → use-element-state-class-name-CkT6Ga8t.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BvP8fzTQ.js → use-hoverable-input-class-name-BkoSr6tr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-B-eR29aQ.js → use-is-forced-open-dropdown-fo_NCnSk.js} +1 -1
- package/dist/component/{use-service-options-base-BF_peAsS.js → use-service-options-base-Wp8RZ4Z8.js} +1 -1
- package/dist/component/use-text-input-class-name-DS7i03Gk.js +6 -0
- package/package.json +2 -2
- package/dist/component/events-repeater-rac-CNsh8NRh.js +0 -271
- package/dist/component/use-dropdown-trigger-class-name-PItHRYWo.js +0 -96
- package/dist/component/use-text-input-class-name-CQf8yep5.js +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.167.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
-
"falconPackageHash": "
|
|
159
|
+
"falconPackageHash": "e5a76a27c757d1408b48cf651e5fddb2bbaaacc2a334b2b263b49f78"
|
|
160
160
|
}
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import t, { useState as j, useMemo as h, useCallback as V, useRef as k } from "react";
|
|
2
|
-
import x from "classnames";
|
|
3
|
-
import { NumberField as z, CheckboxField as W, CheckboxButton as J, Group as Q, Input as Y, Button as w } from "react-aria-components";
|
|
4
|
-
import { bE as q, bF as H, bu as K, bz as P, aW as Z, by as y, bv as X, bA as U, aC as ee, U as te, o as se, t as ne, s as oe } from "./form-sH9m0ReT.js";
|
|
5
|
-
import { f as b, a as L } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { L as re } from "./field-label-headless-Bx1UjEcp.js";
|
|
7
|
-
import { S as ae } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
|
-
import { u as le } from "./use-invoke-callback-UH73A_J3.js";
|
|
9
|
-
import { C as M } from "./chevron-down-icon-CcpVm6B-.js";
|
|
10
|
-
import { C as ce } from "./checkbox-indicator-module-classes-DUTR4mcg.js";
|
|
11
|
-
import { s as v } from "./field-rac.module-ts2t4WUO.js";
|
|
12
|
-
import { u as ue } from "./use-element-state-class-name-DCAoZgWT.js";
|
|
13
|
-
import { u as me } from "./use-text-input-class-name-CQf8yep5.js";
|
|
14
|
-
const ie = [], de = ({ id: e, fields: s, layout: a, value: o, onChange: n, errors: l = ie, validation: c }) => {
|
|
15
|
-
const [m, i] = j((o == null ? void 0 : o.length) || 0), u = h(() => o ?? [], [
|
|
16
|
-
o
|
|
17
|
-
]), d = q(), g = H(), C = K(), { validateFields: p } = P(), F = c.predefined.objectArrayOptions.maxItems, O = h(() => Z({
|
|
18
|
-
form: {
|
|
19
|
-
fields: s,
|
|
20
|
-
steps: [
|
|
21
|
-
{
|
|
22
|
-
layout: a
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
parentId: e,
|
|
27
|
-
recursive: !1
|
|
28
|
-
}), [
|
|
29
|
-
s,
|
|
30
|
-
a,
|
|
31
|
-
e
|
|
32
|
-
]), _ = h(() => l.reduce((E, I) => {
|
|
33
|
-
const [A, N] = I.errorPath.split("/"), B = parseInt(A, 10);
|
|
34
|
-
return E[B] || (E[B] = []), E[B].push({
|
|
35
|
-
...I,
|
|
36
|
-
errorPath: N
|
|
37
|
-
}), E;
|
|
38
|
-
}, []), [
|
|
39
|
-
l
|
|
40
|
-
]), G = V((E) => {
|
|
41
|
-
const I = Number.isNaN(E) ? 0 : Math.min(Math.max(E, 0), F);
|
|
42
|
-
i(I), n == null || n(Array.from({
|
|
43
|
-
length: I
|
|
44
|
-
}, (A, N) => u[N] ?? {}));
|
|
45
|
-
}, [
|
|
46
|
-
F,
|
|
47
|
-
u,
|
|
48
|
-
n
|
|
49
|
-
]), D = V((E) => (I, A) => {
|
|
50
|
-
const N = Array.from({
|
|
51
|
-
length: m
|
|
52
|
-
}, (B, $) => u[$] ?? {});
|
|
53
|
-
N[E] = {
|
|
54
|
-
...N[E],
|
|
55
|
-
[I]: A
|
|
56
|
-
}, n == null || n(N);
|
|
57
|
-
}, [
|
|
58
|
-
m,
|
|
59
|
-
u,
|
|
60
|
-
n
|
|
61
|
-
]);
|
|
62
|
-
return {
|
|
63
|
-
guestLimit: F,
|
|
64
|
-
guestCount: m,
|
|
65
|
-
guests: u,
|
|
66
|
-
errorsByIndex: _,
|
|
67
|
-
formView: O,
|
|
68
|
-
formSchema: d,
|
|
69
|
-
formFields: g,
|
|
70
|
-
fieldActions: C,
|
|
71
|
-
validateFields: p,
|
|
72
|
-
changeGuestCount: G,
|
|
73
|
-
changeGuestField: D
|
|
74
|
-
};
|
|
75
|
-
}, pe = [], Ee = {}, r = ({ children: e, className: s }) => {
|
|
76
|
-
const a = y(), { id: o, FieldLayout: n } = a, { guestLimit: l, guestCount: c, guests: m, errorsByIndex: i, formView: u, changeGuestCount: d, changeGuestField: g } = de(a), C = b(e, r.Label), p = b(e, r.GuestCount), F = b(e, r.GuestToggle), O = b(e, r.Guests), _ = l > 1;
|
|
77
|
-
return /* @__PURE__ */ t.createElement(n, {
|
|
78
|
-
fieldId: o,
|
|
79
|
-
renderLabel: () => _ ? C : null,
|
|
80
|
-
renderInput: () => /* @__PURE__ */ t.createElement("div", {
|
|
81
|
-
className: s
|
|
82
|
-
}, _ ? L(p, {
|
|
83
|
-
guestLimit: l,
|
|
84
|
-
guestCount: c,
|
|
85
|
-
onGuestCountChange: d
|
|
86
|
-
}) : L(F, {
|
|
87
|
-
guestCount: c,
|
|
88
|
-
onGuestCountChange: d
|
|
89
|
-
}), L(O, {
|
|
90
|
-
guestCount: c,
|
|
91
|
-
guests: m,
|
|
92
|
-
errorsByIndex: i,
|
|
93
|
-
formView: u,
|
|
94
|
-
onGuestFieldChange: g
|
|
95
|
-
})),
|
|
96
|
-
renderDescription: () => null
|
|
97
|
-
});
|
|
98
|
-
}, Ce = ({ className: e }) => /* @__PURE__ */ t.createElement(re, {
|
|
99
|
-
className: e
|
|
100
|
-
}, null), f = ({ children: e, ...s }) => {
|
|
101
|
-
const { guestLimit: a, guestCount: o, onGuestCountChange: n } = s, { label: l, disabled: c, readOnly: m, onBlur: i, onFocus: u } = y(), d = le(i), g = b(e, f.Control);
|
|
102
|
-
return /* @__PURE__ */ t.createElement(z, {
|
|
103
|
-
"aria-label": l,
|
|
104
|
-
value: o,
|
|
105
|
-
onChange: n,
|
|
106
|
-
minValue: 0,
|
|
107
|
-
maxValue: a,
|
|
108
|
-
step: 1,
|
|
109
|
-
isDisabled: c,
|
|
110
|
-
isReadOnly: m,
|
|
111
|
-
onBlur: d,
|
|
112
|
-
onFocus: u
|
|
113
|
-
}, g);
|
|
114
|
-
}, be = ({ children: e, className: s }) => {
|
|
115
|
-
const { disabled: a, readOnly: o } = y(), n = b(e, f.Input), l = b(e, f.Decrement), c = b(e, f.Increment);
|
|
116
|
-
return /* @__PURE__ */ t.createElement(Q, {
|
|
117
|
-
className: s,
|
|
118
|
-
isDisabled: a,
|
|
119
|
-
isReadOnly: o
|
|
120
|
-
}, n, c, l);
|
|
121
|
-
}, ge = ({ className: e }) => {
|
|
122
|
-
const { id: s } = y(), { inputId: a, ariaDescribedBy: o } = X(), n = k(null);
|
|
123
|
-
return U(() => {
|
|
124
|
-
var l;
|
|
125
|
-
(l = n.current) == null || l.focus({
|
|
126
|
-
preventScroll: !0
|
|
127
|
-
});
|
|
128
|
-
}, s), /* @__PURE__ */ t.createElement(Y, {
|
|
129
|
-
ref: n,
|
|
130
|
-
id: a,
|
|
131
|
-
"aria-describedby": o,
|
|
132
|
-
className: e,
|
|
133
|
-
inputMode: "numeric"
|
|
134
|
-
});
|
|
135
|
-
}, fe = ({ children: e, className: s }) => /* @__PURE__ */ t.createElement(w, {
|
|
136
|
-
slot: "decrement",
|
|
137
|
-
className: s
|
|
138
|
-
}, e), Ge = ({ children: e, className: s }) => /* @__PURE__ */ t.createElement(w, {
|
|
139
|
-
slot: "increment",
|
|
140
|
-
className: s
|
|
141
|
-
}, e), S = ({ children: e, className: s, ...a }) => {
|
|
142
|
-
const { guestCount: o, onGuestCountChange: n } = a, { id: l, label: c, disabled: m, readOnly: i, onBlur: u, onFocus: d } = y(), { inputId: g, ariaDescribedBy: C } = X(), p = k(null);
|
|
143
|
-
U(() => {
|
|
144
|
-
var G;
|
|
145
|
-
(G = p.current) == null || G.focus({
|
|
146
|
-
preventScroll: !0
|
|
147
|
-
});
|
|
148
|
-
}, l);
|
|
149
|
-
const F = b(e, S.Input), O = b(e, S.Label), _ = V((G) => {
|
|
150
|
-
n(G ? 1 : 0);
|
|
151
|
-
}, [
|
|
152
|
-
n
|
|
153
|
-
]);
|
|
154
|
-
return /* @__PURE__ */ t.createElement(W, {
|
|
155
|
-
inputRef: p,
|
|
156
|
-
id: g,
|
|
157
|
-
"aria-describedby": C,
|
|
158
|
-
isSelected: o > 0,
|
|
159
|
-
onChange: _,
|
|
160
|
-
isDisabled: m,
|
|
161
|
-
isReadOnly: i,
|
|
162
|
-
onBlur: u,
|
|
163
|
-
onFocus: d
|
|
164
|
-
}, /* @__PURE__ */ t.createElement(J, {
|
|
165
|
-
className: s
|
|
166
|
-
}, ({ isSelected: G, isHovered: D, isFocused: E }) => /* @__PURE__ */ t.createElement(t.Fragment, null, L(F, {
|
|
167
|
-
isSelected: G,
|
|
168
|
-
isHovered: D,
|
|
169
|
-
isFocused: E
|
|
170
|
-
}), L(O, {
|
|
171
|
-
label: c
|
|
172
|
-
}))));
|
|
173
|
-
}, Fe = ({ className: e, ...s }) => {
|
|
174
|
-
const { label: a } = s;
|
|
175
|
-
return /* @__PURE__ */ t.createElement("span", {
|
|
176
|
-
className: e
|
|
177
|
-
}, a);
|
|
178
|
-
}, T = ({ children: e, className: s, ...a }) => {
|
|
179
|
-
const { guestCount: o, guests: n, errorsByIndex: l, formView: c, onGuestFieldChange: m } = a, { disabled: i, readOnly: u } = y(), d = h(() => ({
|
|
180
|
-
...c,
|
|
181
|
-
fields: c.fields.map((C) => ({
|
|
182
|
-
...C,
|
|
183
|
-
properties: {
|
|
184
|
-
...C.properties,
|
|
185
|
-
disabled: !!(i || C.properties.disabled),
|
|
186
|
-
readOnly: !!(u || C.properties.readOnly)
|
|
187
|
-
}
|
|
188
|
-
}))
|
|
189
|
-
}), [
|
|
190
|
-
c,
|
|
191
|
-
i,
|
|
192
|
-
u
|
|
193
|
-
]), g = b(e, T.Guest);
|
|
194
|
-
return o ? /* @__PURE__ */ t.createElement("div", {
|
|
195
|
-
className: s
|
|
196
|
-
}, Array.from({
|
|
197
|
-
length: o
|
|
198
|
-
}, (C, p) => L(g, {
|
|
199
|
-
key: p,
|
|
200
|
-
index: p,
|
|
201
|
-
formView: d,
|
|
202
|
-
values: n[p] ?? Ee,
|
|
203
|
-
errors: l[p] ?? pe,
|
|
204
|
-
onFieldChange: m(p)
|
|
205
|
-
}))) : null;
|
|
206
|
-
}, Ie = ({ className: e, ...s }) => {
|
|
207
|
-
const { index: a, formView: o, values: n, errors: l, onFieldChange: c } = s, m = q(), i = H(), u = K(), { validateFields: d } = P();
|
|
208
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
209
|
-
className: e,
|
|
210
|
-
"data-hook": `guest-${a}`
|
|
211
|
-
}, /* @__PURE__ */ t.createElement(ee, {
|
|
212
|
-
form: o,
|
|
213
|
-
formSchema: m,
|
|
214
|
-
values: n,
|
|
215
|
-
errors: l,
|
|
216
|
-
validateFields: d,
|
|
217
|
-
onFieldChange: c,
|
|
218
|
-
fields: i,
|
|
219
|
-
fieldActions: u
|
|
220
|
-
}));
|
|
221
|
-
};
|
|
222
|
-
f.Control = be;
|
|
223
|
-
f.Input = ge;
|
|
224
|
-
f.Decrement = fe;
|
|
225
|
-
f.Increment = Ge;
|
|
226
|
-
S.Input = ae;
|
|
227
|
-
S.Label = Fe;
|
|
228
|
-
T.Guest = Ie;
|
|
229
|
-
r.Label = Ce;
|
|
230
|
-
r.GuestCount = f;
|
|
231
|
-
r.GuestToggle = S;
|
|
232
|
-
r.Guests = T;
|
|
233
|
-
const Ne = "_container_p2psq_1", _e = "_countGroup_p2psq_8", Le = "_increment_p2psq_18", ye = "_decrement_p2psq_19", R = {
|
|
234
|
-
container: Ne,
|
|
235
|
-
countGroup: _e,
|
|
236
|
-
increment: Le,
|
|
237
|
-
decrement: ye
|
|
238
|
-
}, Oe = () => {
|
|
239
|
-
const e = me(R.countGroup), s = ue({
|
|
240
|
-
globalClasses: oe,
|
|
241
|
-
moduleClasses: ce
|
|
242
|
-
});
|
|
243
|
-
return /* @__PURE__ */ t.createElement(r, {
|
|
244
|
-
className: R.container
|
|
245
|
-
}, /* @__PURE__ */ t.createElement(r.Label, {
|
|
246
|
-
className: x(te, v.label)
|
|
247
|
-
}), /* @__PURE__ */ t.createElement(r.GuestCount, null, /* @__PURE__ */ t.createElement(r.GuestCount.Control, {
|
|
248
|
-
className: e
|
|
249
|
-
}, /* @__PURE__ */ t.createElement(r.GuestCount.Input, {
|
|
250
|
-
className: v.innerInput
|
|
251
|
-
}), /* @__PURE__ */ t.createElement(r.GuestCount.Increment, {
|
|
252
|
-
className: R.increment
|
|
253
|
-
}, /* @__PURE__ */ t.createElement(M, {
|
|
254
|
-
style: {
|
|
255
|
-
transform: "rotate(180deg)"
|
|
256
|
-
}
|
|
257
|
-
})), /* @__PURE__ */ t.createElement(r.GuestCount.Decrement, {
|
|
258
|
-
className: R.decrement
|
|
259
|
-
}, /* @__PURE__ */ t.createElement(M, null)))), /* @__PURE__ */ t.createElement(r.GuestToggle, {
|
|
260
|
-
className: x(se, v.checkbox)
|
|
261
|
-
}, /* @__PURE__ */ t.createElement(r.GuestToggle.Input, {
|
|
262
|
-
className: s
|
|
263
|
-
}), /* @__PURE__ */ t.createElement(r.GuestToggle.Label, {
|
|
264
|
-
className: ne
|
|
265
|
-
})), /* @__PURE__ */ t.createElement(r.Guests, {
|
|
266
|
-
className: R.container
|
|
267
|
-
}, /* @__PURE__ */ t.createElement(r.Guests.Guest, null)));
|
|
268
|
-
}, qe = () => /* @__PURE__ */ t.createElement(Oe, null);
|
|
269
|
-
export {
|
|
270
|
-
qe as EventsRepeaterRAC
|
|
271
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import n, { useState as b, useCallback as g, useRef as M } from "react";
|
|
2
|
-
import { UNSAFE_PortalProvider as k } from "react-aria";
|
|
3
|
-
import { Select as q, SelectValue as G, ListBoxItem as H } from "react-aria-components";
|
|
4
|
-
import { by as E, bv as O, bA as J, J as U } from "./form-sH9m0ReT.js";
|
|
5
|
-
import { f as d, a as F } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as W, E as Y } from "./field-error-headless-NGaTm3dF.js";
|
|
7
|
-
import { L as j } from "./field-label-headless-Bx1UjEcp.js";
|
|
8
|
-
import { E as z, S as K, N as Q } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
-
import { a as X } from "./use-is-forced-open-dropdown-B-eR29aQ.js";
|
|
10
|
-
import { V as Z } from "./use-dropdown-option-class-name-0ZlT4g7h.js";
|
|
11
|
-
import { u as $ } from "./use-hoverable-input-class-name-BvP8fzTQ.js";
|
|
12
|
-
const r = ({ children: e }) => {
|
|
13
|
-
const { id: l, value: a, defaultValue: o, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: D, onFocus: C, FieldLayout: L, hasError: y } = E(), [I, N] = b(!1), p = X(l), [P, R] = b(null), T = a && u.some((c) => (c.value ?? c.label) === a) ? a : o || null, { labelId: h } = O(), S = g((c) => {
|
|
14
|
-
s || t(typeof c == "string" ? c : null);
|
|
15
|
-
}, [
|
|
16
|
-
t,
|
|
17
|
-
s
|
|
18
|
-
]), B = g((c) => N(c && !i && !s), [
|
|
19
|
-
i,
|
|
20
|
-
s
|
|
21
|
-
]), V = d(e, r.Label), _ = d(e, r.Trigger), w = d(e, r.Options), x = d(e, r.Description), A = d(e, r.Error);
|
|
22
|
-
return /* @__PURE__ */ n.createElement(L, {
|
|
23
|
-
fieldId: l,
|
|
24
|
-
renderLabel: () => V,
|
|
25
|
-
renderInput: () => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("div", {
|
|
26
|
-
ref: R,
|
|
27
|
-
style: {
|
|
28
|
-
display: "contents"
|
|
29
|
-
}
|
|
30
|
-
}), /* @__PURE__ */ n.createElement(k, {
|
|
31
|
-
getContainer: () => P
|
|
32
|
-
}, /* @__PURE__ */ n.createElement(q, {
|
|
33
|
-
"aria-labelledby": h,
|
|
34
|
-
value: T,
|
|
35
|
-
isOpen: p || I && !i && !s,
|
|
36
|
-
onOpenChange: p ? void 0 : B,
|
|
37
|
-
onChange: S,
|
|
38
|
-
isDisabled: i,
|
|
39
|
-
isInvalid: y,
|
|
40
|
-
isRequired: v,
|
|
41
|
-
placeholder: m || z,
|
|
42
|
-
onBlur: D,
|
|
43
|
-
onFocus: C
|
|
44
|
-
}, _, F(w, {
|
|
45
|
-
isForcedOpen: p
|
|
46
|
-
})))),
|
|
47
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, A, x)
|
|
48
|
-
});
|
|
49
|
-
}, ee = ({ children: e, className: l }) => {
|
|
50
|
-
const { inputId: a, ariaDescribedBy: o } = O(), { id: u, hasError: s, isLoading: t } = E(), m = M(null);
|
|
51
|
-
return J(() => {
|
|
52
|
-
var i;
|
|
53
|
-
(i = m.current) == null || i.focus({
|
|
54
|
-
preventScroll: !0
|
|
55
|
-
});
|
|
56
|
-
}, u), /* @__PURE__ */ n.createElement(K, {
|
|
57
|
-
ref: m,
|
|
58
|
-
id: a,
|
|
59
|
-
"aria-describedby": o,
|
|
60
|
-
className: l,
|
|
61
|
-
"data-invalid": s || void 0,
|
|
62
|
-
"data-loading": t || void 0
|
|
63
|
-
}, /* @__PURE__ */ n.createElement(G, null), e);
|
|
64
|
-
}, f = ({ children: e, className: l, ...a }) => {
|
|
65
|
-
const { isForcedOpen: o } = a, { options: u = [] } = E(), s = d(e, f.Option);
|
|
66
|
-
return /* @__PURE__ */ n.createElement(Q, {
|
|
67
|
-
className: l,
|
|
68
|
-
containerPadding: 0,
|
|
69
|
-
offset: 0
|
|
70
|
-
}, /* @__PURE__ */ n.createElement(Z, {
|
|
71
|
-
isForcedOpen: o,
|
|
72
|
-
autoFocus: o ? !1 : void 0
|
|
73
|
-
}, u.map((t) => F(s, {
|
|
74
|
-
key: t.value ?? t.label,
|
|
75
|
-
value: t.value ?? t.label,
|
|
76
|
-
label: t.label
|
|
77
|
-
}))));
|
|
78
|
-
}, ne = ({ className: e, ...l }) => {
|
|
79
|
-
const { value: a, label: o } = l;
|
|
80
|
-
return /* @__PURE__ */ n.createElement(H, {
|
|
81
|
-
className: e,
|
|
82
|
-
id: a,
|
|
83
|
-
textValue: o
|
|
84
|
-
}, o);
|
|
85
|
-
};
|
|
86
|
-
f.Option = ne;
|
|
87
|
-
r.Label = j;
|
|
88
|
-
r.Trigger = ee;
|
|
89
|
-
r.Options = f;
|
|
90
|
-
r.Description = W;
|
|
91
|
-
r.Error = Y;
|
|
92
|
-
const pe = (...e) => $(U, e);
|
|
93
|
-
export {
|
|
94
|
-
r as D,
|
|
95
|
-
pe as u
|
|
96
|
-
};
|