@wix/form-elements 1.241.0 → 1.243.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-CHG0WqmP.js → appointment-rac-D-dMrhRb.js} +43 -43
- package/dist/component/{bookings-address-rac-0gam8j7s.js → bookings-address-rac-B6aQ4P5I.js} +1 -1
- package/dist/component/{bookings-email-rac-DZlulUCa.js → bookings-email-rac-Bh849hrc.js} +1 -1
- package/dist/component/{bookings-first-name-rac-U4MHsWd1.js → bookings-first-name-rac-C69Ind1o.js} +1 -1
- package/dist/component/{bookings-header-rac-CDJfljEO.js → bookings-header-rac-DGUzMGRj.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DLInE8pT.js → bookings-last-name-rac-Ch9Bm-sr.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-K3m0pn4a.js → bookings-login-bar-rac-CUhHuZm-.js} +1 -1
- package/dist/component/{bookings-phone-rac-CI8wi6GY.js → bookings-phone-rac-BI4PoSu3.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Bwta9py6.js → bookings-rich-text-rac-B4D2ZCJs.js} +1 -1
- package/dist/component/{checkbox-field-rac-Bs_vJ_oq.js → checkbox-field-rac-zE0dzJYu.js} +81 -81
- package/dist/component/{checkbox-group-field-headless-CwyrCRLc.js → checkbox-group-field-headless-C2x-la-e.js} +44 -44
- package/dist/component/{checkbox-group-field-rac-31RRmAz_.js → checkbox-group-field-rac-iJkQGTiJ.js} +4 -4
- package/dist/component/{checkbox-group-rac-Bz98tGbx.js → checkbox-group-rac-DoK5e4c8.js} +1 -1
- package/dist/component/{checkbox-rac-DFdDAv50.js → checkbox-rac-8i-6GMze.js} +1 -1
- package/dist/component/{contacts-address-rac-Ct5QNUdV.js → contacts-address-rac-CHcRQBjy.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BUHd4cCk.js → contacts-birthdate-rac-CkSsvQ6R.js} +1 -1
- package/dist/component/{contacts-company-rac-CI_d3IHw.js → contacts-company-rac-CIsmil8s.js} +1 -1
- package/dist/component/{contacts-email-rac-CCbpBKs9.js → contacts-email-rac-AEvRJfWd.js} +1 -1
- package/dist/component/{contacts-first-name-rac-FBUDLP8v.js → contacts-first-name-rac-CLSJ2cna.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BSNrn4eb.js → contacts-last-name-rac-o59dmvVn.js} +1 -1
- package/dist/component/{contacts-phone-rac-CsrFVsq6.js → contacts-phone-rac-jh-YSD-N.js} +1 -1
- package/dist/component/{contacts-position-rac-2gwTiIIo.js → contacts-position-rac-Ak4X2gV_.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DucA9CDH.js → contacts-subscribe-rac-By9Bk1YL.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-LcMf98te.js → contacts-tax-id-rac-B1enZgKk.js} +1 -1
- package/dist/component/{date-availability-Bt56LTk9.js → date-availability--3J2b6Ur.js} +1 -1
- package/dist/component/{date-input-field-rac-DhJqiwKI.js → date-input-field-rac-BFt0DKA9.js} +66 -66
- package/dist/component/{date-input-rac-BISvPvDp.js → date-input-rac-D8BA8S1A.js} +1 -1
- package/dist/component/{date-picker-field-rac-C4I7QrcQ.js → date-picker-field-rac-cwYdVf60.js} +40 -40
- package/dist/component/{date-picker-rac-C3nny4Tu.js → date-picker-rac-B7uR5ZnA.js} +1 -1
- package/dist/component/{date-time-input-field-rac-njri5kye.js → date-time-input-field-rac-PaKyrMb9.js} +98 -98
- package/dist/component/{date-time-input-rac-D9kJRPD-.js → date-time-input-rac-Ck8Edatx.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D8cqL9dJ.js → dext-checkbox-group-rac-Cru3Lq4c.js} +2 -2
- package/dist/component/{dext-checkbox-rac-Dd1SbiE4.js → dext-checkbox-rac-wtMsRxly.js} +1 -1
- package/dist/component/{dext-date-picker-rac-C2r-njE7.js → dext-date-picker-rac-B34DtxLN.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CAqXDbbj.js → dext-date-time-input-rac-BsdfLty5.js} +1 -1
- package/dist/component/{dext-dropdown-rac-B2VPep8Y.js → dext-dropdown-rac-DeZYnwo7.js} +1 -1
- package/dist/component/{dext-email-rac-24Jk1Mrj.js → dext-email-rac-B4GTK5H8.js} +1 -1
- package/dist/component/{dext-number-input-rac-y4ohRhoE.js → dext-number-input-rac-BIyJJ9h0.js} +1 -1
- package/dist/component/{dext-phone-rac-CIKnuUWR.js → dext-phone-rac-lf64Ywlp.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BVcTXiaB.js → dext-radio-group-rac-CGt1_jue.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CZVnCJ70.js → dext-rating-input-rac-CbaW1lxS.js} +1 -1
- package/dist/component/{dext-tags-rac-CnlzoLOp.js → dext-tags-rac-DnHDnzD_.js} +2 -2
- package/dist/component/{dext-text-area-rac-Bx5soEnf.js → dext-text-area-rac-C8DVKWKo.js} +1 -1
- package/dist/component/{dext-text-input-rac-jm659H89.js → dext-text-input-rac-DVl-1SDY.js} +1 -1
- package/dist/component/{dext-url-input-rac-DvdPiREA.js → dext-url-input-rac-CkpAMLF9.js} +1 -1
- package/dist/component/{dismiss-icon-CBZq_OBa.js → dismiss-icon-CwZIlL7w.js} +6 -6
- package/dist/component/{donation-rac-CE4WS0Lx.js → donation-rac-DCNG5ByO.js} +44 -44
- package/dist/component/{dropdown-field-rac-Bhp-OH4C.js → dropdown-field-rac-CVbM-0KX.js} +3 -3
- package/dist/component/{dropdown-rac-s7sa3er0.js → dropdown-rac-CE9IjTvE.js} +1 -1
- package/dist/component/{ecom-address-rac-CSrBFi_H.js → ecom-address-rac-BD_okFDt.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BAbbwlHW.js → ecom-subscription-checkbox-rac-C7zdxqra.js} +2 -2
- package/dist/component/{email-input-field-rac-3G3Ozglm.js → email-input-field-rac-CY4wE0eP.js} +35 -35
- package/dist/component/{events-repeater-rac-BUy91Kxs.js → events-repeater-rac-Bh-TBEQG.js} +26 -26
- package/dist/component/{events-rsvp-rac-Gisnded3.js → events-rsvp-rac-BPhzKqUb.js} +3 -3
- package/dist/component/{field-error-headless-piKY_H3-.js → field-error-headless-D3lVhOaC.js} +1 -1
- package/dist/component/{field-label-headless-BueDpCx1.js → field-label-headless-CrZoTwxs.js} +5 -5
- package/dist/component/{file-upload-rac-CSsl-aS9.js → file-upload-rac-DYP83swC.js} +187 -186
- package/dist/component/{fixed-payment-rac-ChzdCJU5.js → fixed-payment-rac-DY7hXK7g.js} +11 -11
- package/dist/component/{form-DcxKWiG2.js → form-DpFQ9uO1.js} +3059 -2934
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-Cs75yckQ.js → header-field-rac-9wOBV_rW.js} +2 -2
- package/dist/component/{header-rac-CtYKxrpl.js → header-rac-gzKNBkq_.js} +1 -1
- package/dist/component/{image-choice-rac-Dmgx9mHc.js → image-choice-rac-B6dvv6Jc.js} +25 -25
- package/dist/component/{index-B6EvjVlP.js → index-CbCZUvYt.js} +2 -2
- package/dist/component/{index-BflhPqlx.js → index-DCl2274b.js} +4 -4
- package/dist/component/{isObjectLike-CgoQvRJK.js → isObjectLike-DDBjMXgH.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Dp0Zf4Kf.js → multiline-address-field-rac-CPkSpMMb.js} +210 -210
- package/dist/component/{multiline-address-rac-C_mO6tFy.js → multiline-address-rac-DCnk-LvE.js} +1 -1
- package/dist/component/{number-input-field-rac-BqtaqBSU.js → number-input-field-rac-Dt0hM2jA.js} +19 -19
- package/dist/component/{number-input-rac-Cuwz2ZQV.js → number-input-rac-pjmjC2-7.js} +1 -1
- package/dist/component/{password-rac-_1CzsKwh.js → password-rac-D9Gmp1yw.js} +32 -32
- package/dist/component/{payment-input-rac-Im0lWoko.js → payment-input-rac-CI78trIl.js} +33 -33
- package/dist/component/{phone-input-field-rac-DWgYXcrE.js → phone-input-field-rac-BCPj6vEP.js} +39 -39
- package/dist/component/{phone-rac-B5Qf61W1.js → phone-rac-FAGNDAR-.js} +1 -1
- package/dist/component/{product-list-rac-C5EK2laJ.js → product-list-rac-D7n9P2wQ.js} +14 -14
- package/dist/component/{quiz-radio-group-rac-CP9zzyH6.js → quiz-radio-group-rac-BO55azn2.js} +1 -1
- package/dist/component/{radio-button-module-classes-CkGrAGkr.js → radio-button-module-classes-BIraDyOu.js} +35 -35
- package/dist/component/{radio-group-field-rac-C_42Fcne.js → radio-group-field-rac-BvUZ-DmS.js} +4 -4
- package/dist/component/{radio-group-rac-CXdbk24Q.js → radio-group-rac-qc0JijX9.js} +1 -1
- package/dist/component/{rating-input-field-rac-DCkEh6Aj.js → rating-input-field-rac-D3u_T_la.js} +18 -18
- package/dist/component/{rating-input-rac-B9A843l0.js → rating-input-rac-CqlPfSQQ.js} +1 -1
- package/dist/component/{rich-content-rac.module-CNC4XD5d.js → rich-content-rac.module-B4TapWZL.js} +9 -9
- package/dist/component/{rich-text-field-rac-5rrd72dQ.js → rich-text-field-rac-LgoEQuKS.js} +4 -4
- package/dist/component/{rich-text-rac-YrwQXZNA.js → rich-text-rac-1IcHKfEb.js} +1 -1
- package/dist/component/{service-dropdown-rac-CQCQPJXB.js → service-dropdown-rac-CMkRaLmg.js} +22 -22
- package/dist/component/{services-multi-choice-rac-CUzXOutN.js → services-multi-choice-rac-DzwHkD-j.js} +7 -7
- package/dist/component/{signature-rac-CCaJeBKX.js → signature-rac-D3X5-ScB.js} +71 -71
- package/dist/component/{submit-button-rac-DGWGdzRU.js → submit-button-rac-BWL76gny.js} +15 -15
- package/dist/component/{tags-field-rac-B_YaA_EP.js → tags-field-rac-BwGeFDfH.js} +24 -24
- package/dist/component/{tags-rac-CF-h7_KF.js → tags-rac-DU7-Kl1T.js} +1 -1
- package/dist/component/{text-area-field-rac-BQ5WJhWG.js → text-area-field-rac-BO_9zG3x.js} +19 -19
- package/dist/component/{text-area-rac-BFWz2X0C.js → text-area-rac-CG7vi5-F.js} +1 -1
- package/dist/component/{text-input-field-rac-Bxv2pGmX.js → text-input-field-rac-FWkVzsiY.js} +3 -3
- package/dist/component/{text-input-headless-B4aiikZS.js → text-input-headless-COFlfx6N.js} +9 -9
- package/dist/component/{text-input-rac-DeQ9w2CC.js → text-input-rac-D_7yUDzw.js} +1 -1
- package/dist/component/{time-input-rac-tu0cnsa5.js → time-input-rac-0Ggsm6qE.js} +24 -24
- package/dist/component/{url-input-field-rac-Cc6cm4so.js → url-input-field-rac-CH7kG_Qf.js} +25 -25
- package/dist/component/{url-input-rac-DeKtkN8j.js → url-input-rac-CjBn6ZWh.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CkOKrSdx.js → use-dropdown-option-class-name-Cy_iJyiA.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-BPkfvqu4.js → use-dropdown-trigger-class-name-Ddu4_w_z.js} +26 -26
- package/dist/component/{use-element-state-class-name-Cvpi3dBc.js → use-element-state-class-name-DNjpnp27.js} +2 -2
- package/dist/component/{use-hoverable-input-class-name-rCSXDYsL.js → use-hoverable-input-class-name-Wy3Ujp2_.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-CX5XR5lo.js → use-is-forced-open-dropdown-Vu0JjNY7.js} +4 -4
- package/dist/component/{use-native-mobile-input-CVBv_Asv.js → use-native-mobile-input-l8hf9N2p.js} +3 -3
- package/dist/component/{use-service-options-base-BnjbDbkj.js → use-service-options-base-Di4c__b_.js} +3 -3
- package/dist/component/use-text-input-class-name-BBZXre-_.js +6 -0
- package/package.json +2 -2
- package/dist/component/use-text-input-class-name-wxGkp-sq.js +0 -6
|
@@ -3,20 +3,20 @@ import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
|
3
3
|
import L from "classnames";
|
|
4
4
|
import { ToggleButtonGroup as oe, TextField as re, Group as se, ToggleButton as ae, Input as le } from "react-aria-components";
|
|
5
5
|
import { debounce as ce } from "ts-debounce";
|
|
6
|
-
import {
|
|
6
|
+
import { b1 as Y, bO as T, bL as P, bZ as ie, bG as q, bQ as ue, X as me, am as pe, ax as de, M as Ie, I as Ce, ay as Ee } from "./form-DpFQ9uO1.js";
|
|
7
7
|
import { f as O, a as N } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { a as w } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as fe, E as Oe } from "./field-error-headless-
|
|
10
|
-
import { L as be } from "./field-label-headless-
|
|
9
|
+
import { D as fe, E as Oe } from "./field-error-headless-D3lVhOaC.js";
|
|
10
|
+
import { L as be } from "./field-label-headless-CrZoTwxs.js";
|
|
11
11
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { a as _e, b as he } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
|
-
import { g as
|
|
14
|
-
import { u as
|
|
13
|
+
import { g as ge } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
|
+
import { u as Fe } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
15
|
import { E as Ne } from "./error-icon-hZxQ6DEy.js";
|
|
16
16
|
import { s as v } from "./field-rac.module-D0QzJXUv.js";
|
|
17
17
|
import { o as De } from "./options-rac.module-_THNq6Qq.js";
|
|
18
|
-
import { u as Se } from "./use-element-state-class-name-
|
|
19
|
-
import { u as Le } from "./use-text-input-class-name-
|
|
18
|
+
import { u as Se } from "./use-element-state-class-name-DNjpnp27.js";
|
|
19
|
+
import { u as Le } from "./use-text-input-class-name-BBZXre-_.js";
|
|
20
20
|
function ve(e, t) {
|
|
21
21
|
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
22
22
|
}
|
|
@@ -24,43 +24,43 @@ function Re(e) {
|
|
|
24
24
|
return ve(e, "id");
|
|
25
25
|
}
|
|
26
26
|
const Ae = 0.01;
|
|
27
|
-
function
|
|
27
|
+
function Te(e) {
|
|
28
28
|
var t;
|
|
29
29
|
return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Q(e, t) {
|
|
32
32
|
const o = Number(t || "0");
|
|
33
33
|
return {
|
|
34
34
|
productId: e.id,
|
|
35
|
-
price: e.priceType ===
|
|
35
|
+
price: e.priceType === Y.DYNAMIC_PRICE ? o : String(o),
|
|
36
36
|
quantity: 1
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return e.find((t) => t.priceType ===
|
|
39
|
+
function Pe(e) {
|
|
40
|
+
return e.find((t) => t.priceType === Y.DYNAMIC_PRICE);
|
|
41
41
|
}
|
|
42
42
|
function Me(e, t) {
|
|
43
43
|
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
44
44
|
}
|
|
45
45
|
const s = ({ children: e }) => {
|
|
46
|
-
const { id: t, value: o, onChange: r, required: l, onBlur: i, onFocus: C, validation: u, addOther: E, addOtherPlaceholder: p, FieldLayout: f } =
|
|
46
|
+
const { id: t, value: o, onChange: r, required: l, onBlur: i, onFocus: C, validation: u, addOther: E, addOtherPlaceholder: p, FieldLayout: f } = T(), { inputId: c, labelId: d, ariaDescribedBy: y } = P(), { t: m } = ie(), { currency: F, regionalFormat: _ } = q(), b = o == null ? void 0 : o[0], D = B(() => {
|
|
47
47
|
var I, h;
|
|
48
48
|
return ((h = (I = u == null ? void 0 : u.predefined) == null ? void 0 : I.paymentOptions) == null ? void 0 : h.products) || [];
|
|
49
49
|
}, [
|
|
50
50
|
u
|
|
51
51
|
]), M = B(() => Re(D), [
|
|
52
52
|
D
|
|
53
|
-
]), a = B(() => E ?
|
|
53
|
+
]), a = B(() => E ? Pe(D) : void 0, [
|
|
54
54
|
D,
|
|
55
55
|
E
|
|
56
|
-
]),
|
|
57
|
-
sourceValue:
|
|
56
|
+
]), K = Me(b, a), [x, z] = Fe({
|
|
57
|
+
sourceValue: K,
|
|
58
58
|
format: (I) => he(String(I ?? ""), _),
|
|
59
59
|
regionalFormat: _
|
|
60
60
|
}), V = S((I) => {
|
|
61
61
|
const h = I === void 0 ? void 0 : M[I];
|
|
62
62
|
r(h ? [
|
|
63
|
-
|
|
63
|
+
Q(h, Te(h))
|
|
64
64
|
] : []), z("");
|
|
65
65
|
}, [
|
|
66
66
|
r,
|
|
@@ -68,7 +68,7 @@ const s = ({ children: e }) => {
|
|
|
68
68
|
z
|
|
69
69
|
]), U = S((I) => {
|
|
70
70
|
a && r(typeof I == "number" ? [
|
|
71
|
-
|
|
71
|
+
Q(a, String(I))
|
|
72
72
|
] : []);
|
|
73
73
|
}, [
|
|
74
74
|
r,
|
|
@@ -93,10 +93,10 @@ const s = ({ children: e }) => {
|
|
|
93
93
|
a == null ? void 0 : a.id,
|
|
94
94
|
H,
|
|
95
95
|
V
|
|
96
|
-
]),
|
|
96
|
+
]), Z = O(e, s.Label), k = O(e, s.Control), j = O(e, s.Description), J = O(e, s.Error);
|
|
97
97
|
return /* @__PURE__ */ n.createElement(f, {
|
|
98
98
|
fieldId: t,
|
|
99
|
-
renderLabel: () =>
|
|
99
|
+
renderLabel: () => Z,
|
|
100
100
|
renderInput: () => /* @__PURE__ */ n.createElement(ye, {
|
|
101
101
|
id: c,
|
|
102
102
|
ariaLabelledBy: d,
|
|
@@ -111,20 +111,20 @@ const s = ({ children: e }) => {
|
|
|
111
111
|
addOther: E,
|
|
112
112
|
customAmount: x,
|
|
113
113
|
onCustomAmountInputChange: W,
|
|
114
|
-
currency:
|
|
114
|
+
currency: F,
|
|
115
115
|
t: m,
|
|
116
116
|
placeholder: p === void 0 ? m("donation.other-option.placeholder") : p,
|
|
117
117
|
customAmountProductId: a == null ? void 0 : a.id,
|
|
118
118
|
onFocusCustomInput: X
|
|
119
119
|
}) : null),
|
|
120
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
120
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, J, j)
|
|
121
121
|
});
|
|
122
122
|
}, ze = ({ children: e, className: t, ...o }) => {
|
|
123
|
-
const { productsById: r, selectedValue: l, onSelectProduct: i, addOther: C, customAmount: u, onCustomAmountInputChange: E, currency: p, t: f, placeholder: c, customAmountProductId: d, onFocusCustomInput: y } = o, { hasError: m } =
|
|
123
|
+
const { productsById: r, selectedValue: l, onSelectProduct: i, addOther: C, customAmount: u, onCustomAmountInputChange: E, currency: p, t: f, placeholder: c, customAmountProductId: d, onFocusCustomInput: y } = o, { hasError: m } = T(), F = O(e, s.Options), _ = O(e, s.OtherInput);
|
|
124
124
|
return /* @__PURE__ */ n.createElement("div", {
|
|
125
125
|
className: t,
|
|
126
126
|
"data-invalid": m
|
|
127
|
-
},
|
|
127
|
+
}, F ? N(F, {
|
|
128
128
|
productsById: r,
|
|
129
129
|
selectedValue: l,
|
|
130
130
|
onSelectProduct: i
|
|
@@ -138,7 +138,7 @@ const s = ({ children: e }) => {
|
|
|
138
138
|
onFocusCustomInput: y
|
|
139
139
|
}) : null);
|
|
140
140
|
}, G = ({ children: e, className: t, ...o }) => {
|
|
141
|
-
const { productsById: r, selectedValue: l, onSelectProduct: i } = o, { options: C, numberOfColumns: u, disabled: E } =
|
|
141
|
+
const { productsById: r, selectedValue: l, onSelectProduct: i } = o, { options: C, numberOfColumns: u, disabled: E } = T(), { labelId: p } = P(), f = O(e, G.Option);
|
|
142
142
|
return /* @__PURE__ */ n.createElement(oe, {
|
|
143
143
|
className: t,
|
|
144
144
|
"data-columns": u,
|
|
@@ -161,7 +161,7 @@ const s = ({ children: e }) => {
|
|
|
161
161
|
});
|
|
162
162
|
}));
|
|
163
163
|
}, R = ({ children: e, className: t, ...o }) => {
|
|
164
|
-
const { value: r, price: l } = o, { id: i, hasError: C } =
|
|
164
|
+
const { value: r, price: l } = o, { id: i, hasError: C } = T(), { currency: u, regionalFormat: E } = q(), p = O(e, R.Value), f = O(e, R.Currency), { isCurrencyPrefixed: c } = w({
|
|
165
165
|
amount: l,
|
|
166
166
|
currency: u == null ? void 0 : u.code,
|
|
167
167
|
locale: E
|
|
@@ -199,7 +199,7 @@ const s = ({ children: e }) => {
|
|
|
199
199
|
R.Value = Be;
|
|
200
200
|
R.Currency = qe;
|
|
201
201
|
const A = ({ children: e, className: t, ...o }) => {
|
|
202
|
-
const { customAmount: r, onCustomAmountInputChange: l, currency: i, t: C, placeholder: u, customAmountProductId: E, onFocusCustomInput: p } = o, { disabled: f, hasError: c } =
|
|
202
|
+
const { customAmount: r, onCustomAmountInputChange: l, currency: i, t: C, placeholder: u, customAmountProductId: E, onFocusCustomInput: p } = o, { disabled: f, hasError: c } = T(), { labelId: d, prefixId: y } = P(), m = O(e, A.Currency), F = O(e, A.Value), _ = S((D) => {
|
|
203
203
|
l({
|
|
204
204
|
target: {
|
|
205
205
|
value: D
|
|
@@ -226,20 +226,20 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
226
226
|
}, r && i && m ? N(m, {
|
|
227
227
|
currency: i,
|
|
228
228
|
t: C
|
|
229
|
-
}) : null,
|
|
229
|
+
}) : null, F ? N(F, {
|
|
230
230
|
placeholder: u,
|
|
231
231
|
customAmountProductId: E
|
|
232
232
|
}) : null));
|
|
233
233
|
}, xe = ({ className: e, ...t }) => {
|
|
234
|
-
const { currency: o, t: r } = t, { prefixId: l } =
|
|
234
|
+
const { currency: o, t: r } = t, { prefixId: l } = P();
|
|
235
235
|
return /* @__PURE__ */ n.createElement("span", {
|
|
236
236
|
id: l,
|
|
237
237
|
"aria-hidden": !1,
|
|
238
|
-
"aria-label":
|
|
238
|
+
"aria-label": ge(r, o),
|
|
239
239
|
className: e
|
|
240
240
|
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
241
241
|
}, Ve = ({ className: e, ...t }) => {
|
|
242
|
-
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: l, labelId: i, prefixId: C } =
|
|
242
|
+
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: l, labelId: i, prefixId: C } = P();
|
|
243
243
|
return /* @__PURE__ */ n.createElement(le, {
|
|
244
244
|
id: r,
|
|
245
245
|
"aria-labelledby": `${i} ${C}`,
|
|
@@ -259,42 +259,42 @@ s.Options = G;
|
|
|
259
259
|
s.OtherInput = A;
|
|
260
260
|
s.Description = fe;
|
|
261
261
|
s.Error = Oe;
|
|
262
|
-
const He = "_control_ztzql_1", Ge = "_option_ztzql_7", Ue = "_optionHover_ztzql_36", $e = "_optionSelected_ztzql_36", ke = "_optionCurrency_ztzql_89",
|
|
262
|
+
const He = "_control_ztzql_1", Ge = "_option_ztzql_7", Ue = "_optionHover_ztzql_36", $e = "_optionSelected_ztzql_36", ke = "_optionCurrency_ztzql_89", Qe = "_otherInput_ztzql_93", Ye = "_otherInputCurrency_ztzql_115", g = {
|
|
263
263
|
control: He,
|
|
264
264
|
option: Ge,
|
|
265
265
|
optionHover: Ue,
|
|
266
266
|
optionSelected: $e,
|
|
267
267
|
optionCurrency: ke,
|
|
268
|
-
otherInput:
|
|
269
|
-
otherInputCurrency:
|
|
268
|
+
otherInput: Qe,
|
|
269
|
+
otherInputCurrency: Ye
|
|
270
270
|
}, we = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(ne, {
|
|
271
271
|
content: e,
|
|
272
272
|
locale: t
|
|
273
|
-
}),
|
|
274
|
-
base:
|
|
275
|
-
selected:
|
|
276
|
-
hover:
|
|
273
|
+
}), Ke = {
|
|
274
|
+
base: g.option,
|
|
275
|
+
selected: g.optionSelected,
|
|
276
|
+
hover: g.optionHover
|
|
277
277
|
}, We = () => {
|
|
278
|
-
const e = Le(
|
|
278
|
+
const e = Le(g.otherInput), t = Se({
|
|
279
279
|
globalClasses: Ee,
|
|
280
|
-
moduleClasses:
|
|
280
|
+
moduleClasses: Ke
|
|
281
281
|
});
|
|
282
282
|
return /* @__PURE__ */ n.createElement(s, null, /* @__PURE__ */ n.createElement(s.Label, {
|
|
283
283
|
className: L(me, v.label)
|
|
284
284
|
}, /* @__PURE__ */ n.createElement(s.Label.Required, {
|
|
285
285
|
className: L(pe, v.requiredMark)
|
|
286
286
|
})), /* @__PURE__ */ n.createElement(s.Control, {
|
|
287
|
-
className:
|
|
287
|
+
className: g.control
|
|
288
288
|
}, /* @__PURE__ */ n.createElement(s.Options, {
|
|
289
|
-
className: L(de, De.options,
|
|
289
|
+
className: L(de, De.options, g.options)
|
|
290
290
|
}, /* @__PURE__ */ n.createElement(s.Options.Option, {
|
|
291
291
|
className: t
|
|
292
292
|
}, /* @__PURE__ */ n.createElement(s.Options.Option.Value, null), /* @__PURE__ */ n.createElement(s.Options.Option.Currency, {
|
|
293
|
-
className:
|
|
293
|
+
className: g.optionCurrency
|
|
294
294
|
}))), /* @__PURE__ */ n.createElement(s.OtherInput, {
|
|
295
295
|
className: e
|
|
296
296
|
}, /* @__PURE__ */ n.createElement(s.OtherInput.Currency, {
|
|
297
|
-
className:
|
|
297
|
+
className: g.otherInputCurrency
|
|
298
298
|
}), /* @__PURE__ */ n.createElement(s.OtherInput.Value, {
|
|
299
299
|
className: v.innerInput
|
|
300
300
|
}))), /* @__PURE__ */ n.createElement(s.Error, {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { RicosViewer as c } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { u as n, D as a } from "./use-dropdown-trigger-class-name-
|
|
4
|
+
import { u as n, D as a } from "./use-dropdown-trigger-class-name-Ddu4_w_z.js";
|
|
5
5
|
import { C as m } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
6
|
import { E as i } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { H as p } from "./custom-focus-class-_483Pkwp.js";
|
|
8
8
|
import { s as r } from "./field-rac.module-D0QzJXUv.js";
|
|
9
|
-
import { X as E, am as D, J as N, M as S, I as _ } from "./form-
|
|
10
|
-
import { u as O } from "./use-dropdown-option-class-name-
|
|
9
|
+
import { X as E, am as D, J as N, M as S, I as _ } from "./form-DpFQ9uO1.js";
|
|
10
|
+
import { u as O } from "./use-dropdown-option-class-name-Cy_iJyiA.js";
|
|
11
11
|
const d = ({ content: o, locale: s }) => /* @__PURE__ */ e.createElement(c, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: s
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o, { useMemo as n } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { C as l } from "./checkbox-field-rac-
|
|
2
|
+
import { bO as a, bZ as c, aN as i } from "./form-DpFQ9uO1.js";
|
|
3
|
+
import { C as l } from "./checkbox-field-rac-zE0dzJYu.js";
|
|
4
4
|
const p = (e) => ({
|
|
5
5
|
nodes: [
|
|
6
6
|
{
|
package/dist/component/{email-input-field-rac-3G3Ozglm.js → email-input-field-rac-CY4wE0eP.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RicosViewer as ie } from "@wix/ricos/viewer";
|
|
2
2
|
import j from "classnames";
|
|
3
|
-
import u, { createContext as
|
|
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 {
|
|
5
|
+
import { bL as fe, bZ as ge, bJ as ve, d as ye, bO as Ee, bS as de, bM as be, aL as Se, X as Oe, am as he, M as Ie, I as Ne, aw as Ae } from "./form-DpFQ9uO1.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,10 +10,10 @@ import Fe from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
import ke from "html-parse-stringify";
|
|
11
11
|
import Te from "@babel/runtime/helpers/classCallCheck";
|
|
12
12
|
import xe from "@babel/runtime/helpers/createClass";
|
|
13
|
-
import { T as U } from "./text-input-headless-
|
|
13
|
+
import { T as U } from "./text-input-headless-COFlfx6N.js";
|
|
14
14
|
import { E as De } from "./error-icon-hZxQ6DEy.js";
|
|
15
|
-
import { s as
|
|
16
|
-
import { u as je } from "./use-text-input-class-name-
|
|
15
|
+
import { s as H } from "./field-rac.module-D0QzJXUv.js";
|
|
16
|
+
import { u as je } from "./use-text-input-class-name-BBZXre-_.js";
|
|
17
17
|
var Ce = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Le = {
|
|
18
18
|
"&": "&",
|
|
19
19
|
"&": "&",
|
|
@@ -48,8 +48,8 @@ var Ce = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
48
48
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
49
49
|
useSuspense: !0,
|
|
50
50
|
unescape: Pe
|
|
51
|
-
}, we,
|
|
52
|
-
function
|
|
51
|
+
}, we, He = Z();
|
|
52
|
+
function Re() {
|
|
53
53
|
return _e;
|
|
54
54
|
}
|
|
55
55
|
(function() {
|
|
@@ -109,7 +109,7 @@ function p(e) {
|
|
|
109
109
|
}
|
|
110
110
|
return e;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Y(e, t) {
|
|
113
113
|
if (!e) return !1;
|
|
114
114
|
var a = e.props ? e.props.children : e.children;
|
|
115
115
|
return t ? a.length > 0 : !!a;
|
|
@@ -117,7 +117,7 @@ function q(e, t) {
|
|
|
117
117
|
function G(e) {
|
|
118
118
|
return e ? e.props ? e.props.children : e.children : [];
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function qe(e) {
|
|
121
121
|
return Object.prototype.toString.call(e) !== "[object Array]" ? !1 : e.every(function(t) {
|
|
122
122
|
return B(t);
|
|
123
123
|
});
|
|
@@ -125,7 +125,7 @@ function Ye(e) {
|
|
|
125
125
|
function M(e) {
|
|
126
126
|
return Array.isArray(e) ? e : [e];
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Ye(e, t) {
|
|
129
129
|
var a = p({}, t);
|
|
130
130
|
return a.props = Object.assign(e.props, t.props), a;
|
|
131
131
|
}
|
|
@@ -170,14 +170,14 @@ function Ge(e, t, a, o, c, r) {
|
|
|
170
170
|
function b(y) {
|
|
171
171
|
var h = M(y);
|
|
172
172
|
h.forEach(function(s) {
|
|
173
|
-
typeof s != "string" && (
|
|
173
|
+
typeof s != "string" && (Y(s) ? b(G(s)) : L(s) === "object" && !B(s) && Object.assign(d, s));
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
b(e);
|
|
177
177
|
var T = ke.parse("<0>".concat(t, "</0>")), O = p(p({}, d), c);
|
|
178
178
|
function F(y, h, s) {
|
|
179
179
|
var i = G(y), I = S(i, h.children, s);
|
|
180
|
-
return
|
|
180
|
+
return qe(i) && I.length === 0 ? i : I;
|
|
181
181
|
}
|
|
182
182
|
function A(y, h, s, i, I) {
|
|
183
183
|
y.dummy && (y.children = h), s.push(w(y, p(p({}, y.props), {}, {
|
|
@@ -191,13 +191,13 @@ function Ge(e, t, a, o, c, r) {
|
|
|
191
191
|
if (n.type === "tag") {
|
|
192
192
|
var N = i[parseInt(n.name, 10)];
|
|
193
193
|
!N && s.length === 1 && s[0][n.name] && (N = s[0][n.name]), N || (N = {});
|
|
194
|
-
var m = Object.keys(n.attrs).length !== 0 ?
|
|
194
|
+
var m = Object.keys(n.attrs).length !== 0 ? Ye({
|
|
195
195
|
props: n.attrs
|
|
196
|
-
}, N) : N, x = B(m), V = x &&
|
|
196
|
+
}, 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);
|
|
197
197
|
if (typeof m == "string") {
|
|
198
|
-
var
|
|
199
|
-
l.push(
|
|
200
|
-
} else if (
|
|
198
|
+
var q = a.services.interpolator.interpolate(m, O, a.language);
|
|
199
|
+
l.push(q);
|
|
200
|
+
} else if (Y(m) || V) {
|
|
201
201
|
var ne = F(m, n, s);
|
|
202
202
|
A(m, ne, l, E);
|
|
203
203
|
} else if (P) {
|
|
@@ -211,12 +211,12 @@ function Ge(e, t, a, o, c, r) {
|
|
|
211
211
|
A(m, re, l, E, n.voidElement);
|
|
212
212
|
} else if (o.transSupportBasicHtmlNodes && g.indexOf(n.name) > -1)
|
|
213
213
|
if (n.voidElement)
|
|
214
|
-
l.push(
|
|
214
|
+
l.push(R(n.name, {
|
|
215
215
|
key: "".concat(n.name, "-").concat(E)
|
|
216
216
|
}));
|
|
217
217
|
else {
|
|
218
218
|
var se = S(i, n.children, s);
|
|
219
|
-
l.push(
|
|
219
|
+
l.push(R(n.name, {
|
|
220
220
|
key: "".concat(n.name, "-").concat(E)
|
|
221
221
|
}, se));
|
|
222
222
|
}
|
|
@@ -236,7 +236,7 @@ function Ge(e, t, a, o, c, r) {
|
|
|
236
236
|
})));
|
|
237
237
|
} else if (n.type === "text") {
|
|
238
238
|
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);
|
|
239
|
-
W ? l.push(
|
|
239
|
+
W ? l.push(R(W, {
|
|
240
240
|
key: "".concat(n.name, "-").concat(E)
|
|
241
241
|
}, X)) : l.push(X);
|
|
242
242
|
}
|
|
@@ -250,14 +250,14 @@ function Ge(e, t, a, o, c, r) {
|
|
|
250
250
|
return G(D[0]);
|
|
251
251
|
}
|
|
252
252
|
function $e(e) {
|
|
253
|
-
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, F = e.i18n, A = e.t, S = e.shouldUnescape, D = ee(e, Ve), y =
|
|
253
|
+
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, F = e.i18n, A = e.t, S = e.shouldUnescape, D = ee(e, Ve), y = z(He) || {}, h = y.i18n, s = y.defaultNS, i = F || h || Ke();
|
|
254
254
|
if (!i)
|
|
255
255
|
return Be("You will need to pass in an i18next instance by using i18nextReactModule"), t;
|
|
256
|
-
var I = A || i.t.bind(i) || function(
|
|
257
|
-
return
|
|
256
|
+
var I = A || i.t.bind(i) || function(q) {
|
|
257
|
+
return q;
|
|
258
258
|
};
|
|
259
259
|
r && (v.context = r);
|
|
260
|
-
var l = p(p({},
|
|
260
|
+
var l = p(p({}, Re()), i.options && i.options.react), n = O || I.ns || s || i.options && i.options.defaultNS;
|
|
261
261
|
n = typeof n == "string" ? [n] : n || ["translation"];
|
|
262
262
|
var E = b || te(t, l) || l.transEmptyNodeValue || c, k = l.hashTransKey, N = c || (k ? k(E) : E), m = d ? v.interpolation : {
|
|
263
263
|
interpolation: p(p({}, v.interpolation), {}, {
|
|
@@ -270,11 +270,11 @@ function $e(e) {
|
|
|
270
270
|
defaultValue: E,
|
|
271
271
|
ns: n
|
|
272
272
|
}), V = N ? I(N, x) : E, P = Ge(T || t, V, i, l, x, S), _ = o !== void 0 ? o : l.defaultTransParent;
|
|
273
|
-
return _ ?
|
|
273
|
+
return _ ? R(_, D, P) : P;
|
|
274
274
|
}
|
|
275
|
-
const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */
|
|
275
|
+
const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */ Z(void 0);
|
|
276
276
|
function Je() {
|
|
277
|
-
const e =
|
|
277
|
+
const e = z(ae);
|
|
278
278
|
if (e === void 0)
|
|
279
279
|
throw new Error("useEmailSuggestion must be used inside <EmailInput>");
|
|
280
280
|
return e;
|
|
@@ -284,7 +284,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
284
284
|
activeSuggestion: e,
|
|
285
285
|
applySuggestion: t
|
|
286
286
|
}
|
|
287
|
-
}, a),
|
|
287
|
+
}, a), Ze = ({ className: e }) => {
|
|
288
288
|
const { suggestionId: t } = fe(), { activeSuggestion: a, applySuggestion: o } = Je(), { t: c, i18n: r } = ge();
|
|
289
289
|
return /* @__PURE__ */ u.createElement("div", {
|
|
290
290
|
id: t,
|
|
@@ -310,7 +310,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
310
310
|
})
|
|
311
311
|
]
|
|
312
312
|
}) : null);
|
|
313
|
-
},
|
|
313
|
+
}, ze = {
|
|
314
314
|
"aol.com": [
|
|
315
315
|
"aaol.com",
|
|
316
316
|
"aol.con",
|
|
@@ -421,7 +421,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
421
421
|
"comcast.nrt",
|
|
422
422
|
"comcast.net.net"
|
|
423
423
|
]
|
|
424
|
-
}, et = new Map(Object.entries(
|
|
424
|
+
}, et = new Map(Object.entries(ze).flatMap(([e, t]) => t.map((a) => [
|
|
425
425
|
a,
|
|
426
426
|
e
|
|
427
427
|
]))), tt = (e) => {
|
|
@@ -485,7 +485,7 @@ f.Label = U.Label;
|
|
|
485
485
|
f.Input = U.Input;
|
|
486
486
|
f.Description = U.Description;
|
|
487
487
|
f.Error = U.Error;
|
|
488
|
-
f.Suggestion =
|
|
488
|
+
f.Suggestion = Ze;
|
|
489
489
|
const nt = "_suggestion_lysve_1", ot = {
|
|
490
490
|
suggestion: nt
|
|
491
491
|
}, rt = ({ content: e, locale: t }) => /* @__PURE__ */ u.createElement(ie, {
|
|
@@ -494,15 +494,15 @@ const nt = "_suggestion_lysve_1", ot = {
|
|
|
494
494
|
}), ht = () => {
|
|
495
495
|
const e = je();
|
|
496
496
|
return /* @__PURE__ */ u.createElement(f, null, /* @__PURE__ */ u.createElement(f.Label, {
|
|
497
|
-
className: j(Oe,
|
|
497
|
+
className: j(Oe, H.label)
|
|
498
498
|
}, /* @__PURE__ */ u.createElement(f.Label.Required, {
|
|
499
|
-
className: j(he,
|
|
499
|
+
className: j(he, H.requiredMark)
|
|
500
500
|
})), /* @__PURE__ */ u.createElement(f.Input, {
|
|
501
501
|
className: e
|
|
502
502
|
}), /* @__PURE__ */ u.createElement(f.Error, {
|
|
503
|
-
className: j(Ie,
|
|
503
|
+
className: j(Ie, H.error)
|
|
504
504
|
}, /* @__PURE__ */ u.createElement(De, null), /* @__PURE__ */ u.createElement(f.Error.Text, null)), /* @__PURE__ */ u.createElement(f.Description, {
|
|
505
|
-
className: j(Ne,
|
|
505
|
+
className: j(Ne, H.description)
|
|
506
506
|
}, rt), /* @__PURE__ */ u.createElement(f.Suggestion, {
|
|
507
507
|
className: j(Ae, ot.suggestion)
|
|
508
508
|
}));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import t, { useState as q, useMemo as
|
|
1
|
+
import t, { useState as q, useMemo as v, useCallback as B, useRef as M } from "react";
|
|
2
2
|
import D from "classnames";
|
|
3
|
-
import { NumberField as z, CheckboxField as
|
|
4
|
-
import {
|
|
3
|
+
import { NumberField as z, CheckboxField as J, CheckboxButton as W, Group as Y, Input as Z, Button as k } from "react-aria-components";
|
|
4
|
+
import { bU as j, bV as w, bK as U, bP as H, b9 as ee, bO as O, bL as K, bQ as $, b0 as te, aP as se, ah as ne, aj as oe, al as re, ai as ae, ak as le } from "./form-DpFQ9uO1.js";
|
|
5
5
|
import { f as C, a as R } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { L as ce } from "./field-label-headless-
|
|
6
|
+
import { L as ce } from "./field-label-headless-CrZoTwxs.js";
|
|
7
7
|
import { S as ue } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
8
|
import { u as me } from "./use-invoke-callback-UH73A_J3.js";
|
|
9
9
|
import { C as P } from "./chevron-down-icon-CcpVm6B-.js";
|
|
10
10
|
import { C as ie } from "./checkbox-indicator-module-classes-Cozvs_kk.js";
|
|
11
11
|
import { s as x } from "./field-rac.module-D0QzJXUv.js";
|
|
12
|
-
import { u as de } from "./use-element-state-class-name-
|
|
13
|
-
import { u as Ee } from "./use-hoverable-input-class-name-
|
|
12
|
+
import { u as de } from "./use-element-state-class-name-DNjpnp27.js";
|
|
13
|
+
import { u as Ee } from "./use-hoverable-input-class-name-Wy3Ujp2_.js";
|
|
14
14
|
const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, errors: l = pe, validation: c }) => {
|
|
15
|
-
const [i, E] = q((o == null ? void 0 : o.length) || 0), u =
|
|
15
|
+
const [i, E] = q((o == null ? void 0 : o.length) || 0), u = v(() => o ?? [], [
|
|
16
16
|
o
|
|
17
|
-
]), p = j(), G = w(), d = U(), { validateFields: m } =
|
|
17
|
+
]), p = j(), G = w(), d = U(), { validateFields: m } = H(), F = c.predefined.objectArrayOptions.maxItems, y = v(() => ee({
|
|
18
18
|
form: {
|
|
19
19
|
fields: s,
|
|
20
20
|
steps: [
|
|
@@ -29,7 +29,7 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
29
29
|
s,
|
|
30
30
|
a,
|
|
31
31
|
e
|
|
32
|
-
]), I =
|
|
32
|
+
]), I = v(() => l.reduce((b, L) => {
|
|
33
33
|
const [S, N] = L.errorPath.split("/"), h = parseInt(S, 10);
|
|
34
34
|
return b[h] || (b[h] = []), b[h].push({
|
|
35
35
|
...L,
|
|
@@ -46,7 +46,7 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
46
46
|
F,
|
|
47
47
|
u,
|
|
48
48
|
n
|
|
49
|
-
]),
|
|
49
|
+
]), T = B((b) => (L, S) => {
|
|
50
50
|
const N = Array.from({
|
|
51
51
|
length: i
|
|
52
52
|
}, (h, X) => u[X] ?? {});
|
|
@@ -70,7 +70,7 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
70
70
|
fieldActions: d,
|
|
71
71
|
validateFields: m,
|
|
72
72
|
changeGuestCount: _,
|
|
73
|
-
changeGuestField:
|
|
73
|
+
changeGuestField: T
|
|
74
74
|
};
|
|
75
75
|
}, Ce = [], ge = {}, r = ({ children: e, className: s }) => {
|
|
76
76
|
const a = O(), { id: o, FieldLayout: n } = a, { guestLimit: l, guestCount: c, guests: i, errorsByIndex: E, formView: u, changeGuestCount: p, changeGuestField: G } = be(a), d = C(e, r.Label), m = C(e, r.GuestCount), F = C(e, r.GuestToggle), y = C(e, r.Guests), I = l > 1;
|
|
@@ -95,7 +95,7 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
95
95
|
})),
|
|
96
96
|
renderDescription: () => null
|
|
97
97
|
});
|
|
98
|
-
},
|
|
98
|
+
}, Q = ({ className: e }) => /* @__PURE__ */ t.createElement(ce, {
|
|
99
99
|
className: e
|
|
100
100
|
}, null), g = ({ children: e, className: s, ...a }) => {
|
|
101
101
|
const { guestLimit: o, guestCount: n, onGuestCountChange: l } = a, { label: c, disabled: i, readOnly: E, onBlur: u, onFocus: p } = O(), G = me(u), d = C(e, g.Label), m = C(e, g.Control);
|
|
@@ -120,8 +120,8 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
120
120
|
isReadOnly: o
|
|
121
121
|
}, n, c, l);
|
|
122
122
|
}, _e = ({ className: e }) => {
|
|
123
|
-
const { id: s } = O(), { inputId: a, ariaDescribedBy: o } =
|
|
124
|
-
return
|
|
123
|
+
const { id: s } = O(), { inputId: a, ariaDescribedBy: o } = K(), n = M(null);
|
|
124
|
+
return $(() => {
|
|
125
125
|
var l;
|
|
126
126
|
(l = n.current) == null || l.focus({
|
|
127
127
|
preventScroll: !0
|
|
@@ -140,8 +140,8 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
140
140
|
slot: "increment",
|
|
141
141
|
className: s
|
|
142
142
|
}, e), A = ({ children: e, className: s, ...a }) => {
|
|
143
|
-
const { guestCount: o, onGuestCountChange: n } = a, { id: l, label: c, disabled: i, readOnly: E, onBlur: u, onFocus: p } = O(), { inputId: G, ariaDescribedBy: d } =
|
|
144
|
-
|
|
143
|
+
const { guestCount: o, onGuestCountChange: n } = a, { id: l, label: c, disabled: i, readOnly: E, onBlur: u, onFocus: p } = O(), { inputId: G, ariaDescribedBy: d } = K(), m = M(null);
|
|
144
|
+
$(() => {
|
|
145
145
|
var _;
|
|
146
146
|
(_ = m.current) == null || _.focus({
|
|
147
147
|
preventScroll: !0
|
|
@@ -152,7 +152,7 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
152
152
|
}, [
|
|
153
153
|
n
|
|
154
154
|
]);
|
|
155
|
-
return /* @__PURE__ */ t.createElement(
|
|
155
|
+
return /* @__PURE__ */ t.createElement(J, {
|
|
156
156
|
inputRef: m,
|
|
157
157
|
id: G,
|
|
158
158
|
"aria-describedby": d,
|
|
@@ -164,9 +164,9 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
164
164
|
onFocus: p
|
|
165
165
|
}, /* @__PURE__ */ t.createElement(W, {
|
|
166
166
|
className: s
|
|
167
|
-
}, ({ isSelected: _, isHovered:
|
|
167
|
+
}, ({ isSelected: _, isHovered: T, isFocused: b }) => /* @__PURE__ */ t.createElement(t.Fragment, null, R(F, {
|
|
168
168
|
isSelected: _,
|
|
169
|
-
isHovered:
|
|
169
|
+
isHovered: T,
|
|
170
170
|
isFocused: b
|
|
171
171
|
}), R(y, {
|
|
172
172
|
label: c
|
|
@@ -177,7 +177,7 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
177
177
|
className: e
|
|
178
178
|
}, a);
|
|
179
179
|
}, V = ({ children: e, className: s, ...a }) => {
|
|
180
|
-
const { guestCount: o, guests: n, errorsByIndex: l, formView: c, onGuestFieldChange: i } = a, { disabled: E, readOnly: u } = O(), p =
|
|
180
|
+
const { guestCount: o, guests: n, errorsByIndex: l, formView: c, onGuestFieldChange: i } = a, { disabled: E, readOnly: u } = O(), p = v(() => ({
|
|
181
181
|
...c,
|
|
182
182
|
fields: c.fields.map((d) => ({
|
|
183
183
|
...d,
|
|
@@ -205,7 +205,7 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
205
205
|
onFieldChange: i(m)
|
|
206
206
|
}))) : null;
|
|
207
207
|
}, Ne = ({ className: e, ...s }) => {
|
|
208
|
-
const { index: a, formView: o, values: n, errors: l, onFieldChange: c } = s, i = j(), E = w(), u = U(), { validateFields: p } =
|
|
208
|
+
const { index: a, formView: o, values: n, errors: l, onFieldChange: c } = s, i = j(), E = w(), u = U(), { validateFields: p } = H();
|
|
209
209
|
return /* @__PURE__ */ t.createElement("div", {
|
|
210
210
|
className: e,
|
|
211
211
|
"data-hook": `guest-${a}`
|
|
@@ -222,7 +222,7 @@ const pe = [], be = ({ id: e, fields: s, layout: a, value: o, onChange: n, error
|
|
|
222
222
|
fieldActions: u
|
|
223
223
|
})));
|
|
224
224
|
};
|
|
225
|
-
g.Label =
|
|
225
|
+
g.Label = Q;
|
|
226
226
|
g.Control = Ge;
|
|
227
227
|
g.Input = _e;
|
|
228
228
|
g.Decrement = fe;
|
|
@@ -230,7 +230,7 @@ g.Increment = Fe;
|
|
|
230
230
|
A.Input = ue;
|
|
231
231
|
A.Label = Le;
|
|
232
232
|
V.Guest = Ne;
|
|
233
|
-
r.Label =
|
|
233
|
+
r.Label = Q;
|
|
234
234
|
r.GuestCount = g;
|
|
235
235
|
r.GuestToggle = A;
|
|
236
236
|
r.Guests = V;
|
|
@@ -242,7 +242,7 @@ const Ie = "_container_xcjm5_1", Re = "_count_xcjm5_8", Oe = "_toggle_xcjm5_14",
|
|
|
242
242
|
countGroup: Ae,
|
|
243
243
|
increment: Se,
|
|
244
244
|
decrement: he
|
|
245
|
-
},
|
|
245
|
+
}, ve = () => {
|
|
246
246
|
const e = Ee(ae, [
|
|
247
247
|
f.countGroup
|
|
248
248
|
]), s = de({
|
|
@@ -276,7 +276,7 @@ const Ie = "_container_xcjm5_1", Re = "_count_xcjm5_8", Oe = "_toggle_xcjm5_14",
|
|
|
276
276
|
})), /* @__PURE__ */ t.createElement(r.Guests, {
|
|
277
277
|
className: f.container
|
|
278
278
|
}, /* @__PURE__ */ t.createElement(r.Guests.Guest, null)));
|
|
279
|
-
},
|
|
279
|
+
}, $e = () => /* @__PURE__ */ t.createElement(ve, null);
|
|
280
280
|
export {
|
|
281
|
-
|
|
281
|
+
$e as EventsRepeaterRAC
|
|
282
282
|
};
|