@wix/form-elements 1.74.0 → 1.75.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-Bze1s2XD.js → appointment-rac-7xVKSm2N.js} +27 -27
- package/dist/component/{bookings-address-rac-BcrkXf63.js → bookings-address-rac-VXnUSx8U.js} +1 -1
- package/dist/component/{bookings-email-rac-DYq5RxOP.js → bookings-email-rac-B2_ad7Y2.js} +1 -1
- package/dist/component/{bookings-first-name-rac-ZJ_sQ-01.js → bookings-first-name-rac-9BAY5vLx.js} +1 -1
- package/dist/component/{bookings-header-rac-Cv8kl01f.js → bookings-header-rac-B6IgiMOA.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BmnulSZ6.js → bookings-last-name-rac-DoXEDO8K.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Bdi4xs9y.js → bookings-login-bar-rac-DprQIFyj.js} +2 -2
- package/dist/component/{bookings-phone-rac-C8DjSzUY.js → bookings-phone-rac-VMoXtejZ.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DYu011oy.js → bookings-rich-text-rac-DSzD2jBy.js} +1 -1
- package/dist/component/{checkbox-field-rac-BH3yEE5j.js → checkbox-field-rac-BLihwz3C.js} +327 -320
- package/dist/component/checkbox-group-field-headless-BItyo_iD.js +205 -0
- package/dist/component/checkbox-group-field-rac-Bov3yFC6.js +40 -0
- package/dist/component/{checkbox-group-rac-CgW0DnhX.js → checkbox-group-rac-Fit-qssk.js} +1 -1
- package/dist/component/{checkbox-rac-DOAYMMsi.js → checkbox-rac-CSsY83Nx.js} +1 -1
- package/dist/component/{contacts-address-rac-DXJa4J_k.js → contacts-address-rac-iJuzUQe4.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CVsuRq3B.js → contacts-birthdate-rac-0g2e8cQP.js} +1 -1
- package/dist/component/{contacts-company-rac-b2bwHSNC.js → contacts-company-rac-BC0tK4WQ.js} +1 -1
- package/dist/component/{contacts-email-rac-DMPcpQ1c.js → contacts-email-rac-dkuclkiH.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CL2BsHuJ.js → contacts-first-name-rac-BSUkCuht.js} +1 -1
- package/dist/component/{contacts-last-name-rac-hdBsWaqb.js → contacts-last-name-rac-08bjVdN2.js} +1 -1
- package/dist/component/{contacts-phone-rac-DQF6aV9B.js → contacts-phone-rac-DVb0Z_0M.js} +1 -1
- package/dist/component/{contacts-position-rac-CVX-WCfx.js → contacts-position-rac-AGUDkv7U.js} +1 -1
- package/dist/component/contacts-subscribe-rac-6jAQHibT.js +13 -0
- package/dist/component/{contacts-tax-id-rac-0KTXvF81.js → contacts-tax-id-rac-C7moEz5b.js} +1 -1
- package/dist/component/{date-availability-DBljhBgO.js → date-availability-DagbE0C8.js} +1 -1
- package/dist/component/{date-input-field-rac-CfflD2Ar.js → date-input-field-rac-BWHKsJGy.js} +30 -30
- package/dist/component/{date-input-rac-fQclCKoa.js → date-input-rac-BlZlmf-s.js} +1 -1
- package/dist/component/{date-picker-field-rac-BSmFOaH-.js → date-picker-field-rac-BSNbYirD.js} +36 -36
- package/dist/component/{date-picker-rac-D7I3ramu.js → date-picker-rac-D3IWMst5.js} +1 -1
- package/dist/component/{date-time-input-field-rac-vjZDQ_Fp.js → date-time-input-field-rac-YKTwuIUs.js} +25 -25
- package/dist/component/{date-time-input-rac-CDbS0VZR.js → date-time-input-rac-CZRsKm1P.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BBiPt6_a.js → dext-checkbox-group-rac-BE7ILz-f.js} +2 -2
- package/dist/component/{dext-checkbox-rac-Cqp--0SO.js → dext-checkbox-rac-B6-94A1N.js} +1 -1
- package/dist/component/{dext-date-picker-rac-5Wft0w9m.js → dext-date-picker-rac-Bx2hUFNm.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Bbs7bgtn.js → dext-date-time-input-rac-DPKD6quz.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CSvhtqbc.js → dext-dropdown-rac-WrSfNRa5.js} +1 -1
- package/dist/component/{dext-email-rac-BoLeXqyI.js → dext-email-rac-8PSMKNYG.js} +1 -1
- package/dist/component/{dext-number-input-rac-DzaJYTSz.js → dext-number-input-rac-b9YSzEkN.js} +1 -1
- package/dist/component/{dext-phone-rac-BagPg_CT.js → dext-phone-rac-CkapN3c1.js} +1 -1
- package/dist/component/{dext-radio-group-rac-B5HSQt7a.js → dext-radio-group-rac-CfNMkwUa.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DrtaAf-E.js → dext-rating-input-rac-Cun_t7HQ.js} +1 -1
- package/dist/component/{dext-tags-rac-Cg4jJ4jr.js → dext-tags-rac-DLZ91c3w.js} +2 -2
- package/dist/component/{dext-text-area-rac-C_t-W7lk.js → dext-text-area-rac-N9A7QfYw.js} +1 -1
- package/dist/component/{dext-text-input-rac-ChvV21Jf.js → dext-text-input-rac-XbVzAPHH.js} +1 -1
- package/dist/component/{dext-url-input-rac-DclbSYTr.js → dext-url-input-rac-BiaWZ49r.js} +1 -1
- package/dist/component/{donation-rac-FYQIMm5m.js → donation-rac-BEIBjLHK.js} +46 -47
- package/dist/component/{dropdown-field-headless-CTZ-zGqZ.js → dropdown-field-headless-CQfZ3zPD.js} +3 -3
- package/dist/component/{dropdown-field-rac-C1KVtxwv.js → dropdown-field-rac-ubZN_Abg.js} +7 -7
- package/dist/component/{dropdown-rac-CkkDEDje.js → dropdown-rac-CHYFrEjY.js} +1 -1
- package/dist/component/{ecom-address-rac-BOuugSxX.js → ecom-address-rac-C7qJlrsv.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-IZeMlljb.js → ecom-subscription-checkbox-rac-CONIZsTy.js} +6 -6
- package/dist/component/{email-input-field-rac-CNzmm1j7.js → email-input-field-rac-Dg0p6WZe.js} +63 -63
- package/dist/component/events-repeater-rac-BoxNl7gn.js +254 -0
- package/dist/component/{events-rsvp-rac-BmjboAco.js → events-rsvp-rac-BU5d2n4k.js} +3 -3
- package/dist/component/{field-error-headless-DQZ5XAdn.js → field-error-headless-uQOcm2Ak.js} +1 -1
- package/dist/component/{field-label-headless-DoxfHHaj.js → field-label-headless-Bzh7f2Ji.js} +1 -1
- package/dist/component/field-rac.module-DjmaTYkc.js +23 -0
- package/dist/component/{file-upload-rac-YEQ7uXhm.js → file-upload-rac-BTt-rJE5.js} +74 -74
- package/dist/component/{fixed-payment-rac-DDufIQBT.js → fixed-payment-rac-1NOx3D-U.js} +17 -17
- package/dist/component/{form-C6WwBcGP.js → form-DCmjj8mZ.js} +69 -69
- package/dist/component/form-element-classes-Dn33C01k.js +111 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DGfjrjQC.js → header-field-rac-lyvjy6h2.js} +3 -3
- package/dist/component/{header-rac-C_JE2cTg.js → header-rac-B4iPEbNj.js} +1 -1
- package/dist/component/{image-choice-rac-LDLPQwrN.js → image-choice-rac-CmEG-waj.js} +29 -30
- package/dist/component/{index-C2srcuHD.js → index-D-CKLZBh.js} +4 -4
- package/dist/component/{index-CIOoaQ8Z.js → index-UZsDOe8e.js} +2 -2
- package/dist/component/{isObjectLike-E5QfEa1u.js → isObjectLike-BSGOU4jF.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Biyj2tIN.js → multiline-address-field-rac-Dz0NEjSO.js} +125 -125
- package/dist/component/{multiline-address-rac-BCqCvG7a.js → multiline-address-rac-D_MAanxb.js} +1 -1
- package/dist/component/{number-input-field-rac-CwUoIbM8.js → number-input-field-rac-CvjeAm-W.js} +13 -13
- package/dist/component/{number-input-rac-CdYdTDem.js → number-input-rac-oKo2Wx_c.js} +1 -1
- package/dist/component/{password-rac-D62npVHY.js → password-rac-CrnkKtfp.js} +21 -21
- package/dist/component/{payment-input-rac-D4u-3vcW.js → payment-input-rac-BoVdGyvV.js} +18 -18
- package/dist/component/{phone-input-field-rac-uHxR3ozd.js → phone-input-field-rac-DksXoAnr.js} +54 -54
- package/dist/component/{phone-rac-Bf99_BGi.js → phone-rac-BR0iX5TL.js} +1 -1
- package/dist/component/product-list-rac-C4rvv5k-.js +270 -0
- package/dist/component/{quiz-radio-group-rac-CPGS0LEb.js → quiz-radio-group-rac-BxKmUUf8.js} +2 -2
- package/dist/component/{radio-group-field-rac-BWpTNAbO.js → radio-group-field-rac-Dj4rkkKF.js} +3 -3
- package/dist/component/{radio-group-field-rac.module-WxU5zxvM.js → radio-group-field-rac.module-CeBLm9QF.js} +3 -3
- package/dist/component/{radio-group-rac-dA4WZ1Vj.js → radio-group-rac-BpnfptSZ.js} +1 -1
- package/dist/component/{rating-input-field-rac-CJnFsBvH.js → rating-input-field-rac-BP0928qI.js} +30 -31
- package/dist/component/{rating-input-rac-DXVYozFV.js → rating-input-rac-DaEgvjIS.js} +1 -1
- package/dist/component/{rich-content-rac.module-DkKwzJS7.js → rich-content-rac.module-zvvH-tWq.js} +1 -1
- package/dist/component/{rich-text-field-rac-8FWCRrpb.js → rich-text-field-rac-CFCRiMl_.js} +3 -3
- package/dist/component/{rich-text-rac-OeM_mPRy.js → rich-text-rac-BRuLnyN4.js} +1 -1
- package/dist/component/{service-dropdown-rac-mvUMpcS_.js → service-dropdown-rac-C82l5y0C.js} +21 -21
- package/dist/component/services-multi-choice-rac-BAHBSgAT.js +83 -0
- package/dist/component/{signature-rac-D44U9Uyp.js → signature-rac-CIkm3SCW.js} +56 -56
- package/dist/component/{submit-button-rac-BqtcgVAn.js → submit-button-rac-Bz-X9Tbo.js} +2 -2
- package/dist/component/{tags-field-rac-CemsTKWz.js → tags-field-rac-Dn8VyPzT.js} +29 -30
- package/dist/component/{tags-rac-fVjCf6qo.js → tags-rac-BJpVdunR.js} +1 -1
- package/dist/component/{text-area-field-rac-BPciZlZb.js → text-area-field-rac-Pp9HnCS5.js} +18 -18
- package/dist/component/{text-area-rac-CRTORdZM.js → text-area-rac-DbwAFdel.js} +1 -1
- package/dist/component/{text-input-field-rac-CvFoWlRN.js → text-input-field-rac-x4ByKmBv.js} +6 -6
- package/dist/component/{text-input-headless-BQ3TWU9G.js → text-input-headless-fbiKci5q.js} +3 -3
- package/dist/component/{text-input-rac-DSFkEmob.js → text-input-rac-jyCKxyCt.js} +1 -1
- package/dist/component/{time-input-rac-CGgs7ncp.js → time-input-rac-C5Cvmxtt.js} +17 -17
- package/dist/component/{url-input-field-rac-CqvgTc-F.js → url-input-field-rac-CGpCEn2A.js} +20 -20
- package/dist/component/{url-input-rac-C45KOwnr.js → url-input-rac-DhFL8fGq.js} +1 -1
- package/dist/component/use-element-state-class-name-Bnw7sY9P.js +29 -0
- package/dist/component/{use-service-options-base-D4Zl-iGW.js → use-service-options-base-CgT1IKB3.js} +1 -1
- package/package.json +2 -2
- package/dist/component/checkbox-group-field-headless-D_GG5LHM.js +0 -210
- package/dist/component/checkbox-group-field-rac-Cj7Erubs.js +0 -41
- package/dist/component/contacts-subscribe-rac-Dl1ot9qw.js +0 -13
- package/dist/component/events-repeater-rac-CMV0Lmwz.js +0 -247
- package/dist/component/field-rac.module-Cac83bU5.js +0 -21
- package/dist/component/form-element-classes-DDKCTFQj.js +0 -65
- package/dist/component/form-element-keys-D0sEdpFo.js +0 -8
- package/dist/component/product-list-rac-iRf6Ra7i.js +0 -263
- package/dist/component/services-multi-choice-rac-DrgUrn_N.js +0 -76
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import t, { useMemo as B, useCallback as L, useRef as oe } from "react";
|
|
2
2
|
import { RicosViewer as re } from "@wix/ricos/viewer";
|
|
3
3
|
import y from "classnames";
|
|
4
|
-
import { P as G, ai as A, af as j, as as se, ab as v, ak as ae, ac as le } from "./form-
|
|
5
|
-
import { RadioGroup as ie, RadioField as
|
|
4
|
+
import { P as G, ai as A, af as j, as as se, ab as v, ak as ae, ac as le } from "./form-DCmjj8mZ.js";
|
|
5
|
+
import { RadioGroup as ie, RadioField as Q, RadioButton as H, TextField as ce, Group as ue, Input as me } from "react-aria-components";
|
|
6
6
|
import { debounce as pe } from "ts-debounce";
|
|
7
|
-
import { f, a as N } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { f as O, a as N } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { a as K } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as de, E as Ee } from "./field-error-headless-
|
|
10
|
-
import { L as Ie } from "./field-label-headless-
|
|
9
|
+
import { D as de, E as Ee } from "./field-error-headless-uQOcm2Ak.js";
|
|
10
|
+
import { L as Ie } from "./field-label-headless-Bzh7f2Ji.js";
|
|
11
11
|
import { N as Ce } from "./options-layout-constants-DEfIEJWD.js";
|
|
12
|
-
import { a as
|
|
12
|
+
import { a as Oe, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
13
|
import { g as _e } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
14
|
import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
15
|
import { E as ye } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { s as D } from "./field-rac.module-
|
|
17
|
-
import {
|
|
18
|
-
import { D as Ae } from "./form-element-keys-D0sEdpFo.js";
|
|
16
|
+
import { s as D } from "./field-rac.module-DjmaTYkc.js";
|
|
17
|
+
import { y as Ne, Q as be, j as Fe, k as De, l as ge, x as Le, p as Re, i as Se, F as Ae } from "./form-element-classes-Dn33C01k.js";
|
|
19
18
|
import { o as ve } from "./options-rac.module-KM-VT_KY.js";
|
|
20
19
|
function Te(e, n) {
|
|
21
20
|
return e.reduce((o, r) => (o[r[n]] = r, o), {});
|
|
@@ -28,7 +27,7 @@ function xe(e) {
|
|
|
28
27
|
var n;
|
|
29
28
|
return ((n = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : n.price) || "0";
|
|
30
29
|
}
|
|
31
|
-
function
|
|
30
|
+
function W(e, n) {
|
|
32
31
|
const o = Number(n || "0");
|
|
33
32
|
return {
|
|
34
33
|
productId: e.id,
|
|
@@ -42,14 +41,14 @@ function Be(e) {
|
|
|
42
41
|
function je(e, n) {
|
|
43
42
|
return (e == null ? void 0 : e.productId) === (n == null ? void 0 : n.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
44
43
|
}
|
|
45
|
-
function
|
|
44
|
+
function ke(e, n, o) {
|
|
46
45
|
const r = (n == null ? void 0 : n.productId) === e ? void 0 : e, a = r ? o[r] : void 0;
|
|
47
46
|
return a ? [
|
|
48
|
-
|
|
47
|
+
W(a, xe(a))
|
|
49
48
|
] : [];
|
|
50
49
|
}
|
|
51
50
|
const s = ({ children: e }) => {
|
|
52
|
-
const { id: n, value: o, onChange: r, disabled: a, required: m, onBlur: p, onFocus: _, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: E, hasError:
|
|
51
|
+
const { id: n, value: o, onChange: r, disabled: a, required: m, onBlur: p, onFocus: _, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: E, hasError: f } = A(), { labelId: h } = j(), { t: I } = se(), { currency: T, regionalFormat: b } = v(), d = o == null ? void 0 : o[0], F = B(() => {
|
|
53
52
|
var C, x;
|
|
54
53
|
return ((x = (C = c == null ? void 0 : c.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : x.products) || [];
|
|
55
54
|
}, [
|
|
@@ -59,12 +58,12 @@ const s = ({ children: e }) => {
|
|
|
59
58
|
]), l = B(() => u ? Be(F) : void 0, [
|
|
60
59
|
F,
|
|
61
60
|
u
|
|
62
|
-
]),
|
|
63
|
-
sourceValue:
|
|
64
|
-
format: (C) =>
|
|
61
|
+
]), z = je(d, l), [k, P] = he({
|
|
62
|
+
sourceValue: z,
|
|
63
|
+
format: (C) => fe(String(C ?? ""), b),
|
|
65
64
|
regionalFormat: b
|
|
66
|
-
}),
|
|
67
|
-
r(
|
|
65
|
+
}), q = L((C) => {
|
|
66
|
+
r(ke(C, d, M)), P("");
|
|
68
67
|
}, [
|
|
69
68
|
r,
|
|
70
69
|
M,
|
|
@@ -72,7 +71,7 @@ const s = ({ children: e }) => {
|
|
|
72
71
|
P
|
|
73
72
|
]), $ = L((C) => {
|
|
74
73
|
l && r(typeof C == "number" ? [
|
|
75
|
-
|
|
74
|
+
W(l, String(C))
|
|
76
75
|
] : []);
|
|
77
76
|
}, [
|
|
78
77
|
r,
|
|
@@ -81,39 +80,39 @@ const s = ({ children: e }) => {
|
|
|
81
80
|
$
|
|
82
81
|
]), J = L((C) => {
|
|
83
82
|
(d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
|
|
84
|
-
const { validInput: x, validNumber: te } =
|
|
83
|
+
const { validInput: x, validNumber: te } = Oe(C.target.value, Pe, k, b);
|
|
85
84
|
P(x), V(te);
|
|
86
85
|
}, [
|
|
87
86
|
b,
|
|
88
87
|
r,
|
|
89
88
|
d,
|
|
90
89
|
l,
|
|
91
|
-
|
|
90
|
+
k,
|
|
92
91
|
V,
|
|
93
92
|
P
|
|
94
93
|
]), w = (d == null ? void 0 : d.productId) || null, X = L(() => {
|
|
95
|
-
l != null && l.id && w !== l.id &&
|
|
94
|
+
l != null && l.id && w !== l.id && q(l.id);
|
|
96
95
|
}, [
|
|
97
96
|
l == null ? void 0 : l.id,
|
|
98
97
|
w,
|
|
99
|
-
|
|
100
|
-
]), Z =
|
|
98
|
+
q
|
|
99
|
+
]), Z = O(e, s.Label), Y = O(e, s.Control), ee = O(e, s.Description), ne = O(e, s.Error);
|
|
101
100
|
return /* @__PURE__ */ t.createElement(E, {
|
|
102
101
|
fieldId: n,
|
|
103
102
|
renderLabel: () => Z,
|
|
104
103
|
renderInput: () => /* @__PURE__ */ t.createElement(ie, {
|
|
105
104
|
"aria-labelledby": h,
|
|
106
105
|
value: w,
|
|
107
|
-
onChange:
|
|
106
|
+
onChange: q,
|
|
108
107
|
isDisabled: a,
|
|
109
|
-
isInvalid:
|
|
108
|
+
isInvalid: f,
|
|
110
109
|
isRequired: m,
|
|
111
110
|
onBlur: p,
|
|
112
111
|
onFocus: _
|
|
113
112
|
}, Y ? N(Y, {
|
|
114
113
|
productsById: M,
|
|
115
114
|
addOther: u,
|
|
116
|
-
customAmount:
|
|
115
|
+
customAmount: k,
|
|
117
116
|
onCustomAmountInputChange: J,
|
|
118
117
|
currency: T,
|
|
119
118
|
t: I,
|
|
@@ -123,14 +122,14 @@ const s = ({ children: e }) => {
|
|
|
123
122
|
}) : null),
|
|
124
123
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, ne, ee)
|
|
125
124
|
});
|
|
126
|
-
},
|
|
127
|
-
const { productsById: r, addOther: a, customAmount: m, onCustomAmountInputChange: p, currency: _, t: c, placeholder: u, customAmountProductId: i, onFocusCustomInput: E } = o, { hasError:
|
|
125
|
+
}, qe = ({ children: e, className: n, ...o }) => {
|
|
126
|
+
const { productsById: r, addOther: a, customAmount: m, onCustomAmountInputChange: p, currency: _, t: c, placeholder: u, customAmountProductId: i, onFocusCustomInput: E } = o, { hasError: f } = A(), h = O(e, s.Options), I = O(e, s.OtherInput);
|
|
128
127
|
return /* @__PURE__ */ t.createElement("div", {
|
|
129
128
|
className: n,
|
|
130
|
-
"data-invalid":
|
|
129
|
+
"data-invalid": f
|
|
131
130
|
}, h ? N(h, {
|
|
132
131
|
productsById: r
|
|
133
|
-
}) : null, a && i && /* @__PURE__ */ t.createElement(
|
|
132
|
+
}) : null, a && i && /* @__PURE__ */ t.createElement(Q, {
|
|
134
133
|
value: i,
|
|
135
134
|
style: {
|
|
136
135
|
position: "absolute",
|
|
@@ -155,13 +154,13 @@ const s = ({ children: e }) => {
|
|
|
155
154
|
onFocusCustomInput: E
|
|
156
155
|
}) : null);
|
|
157
156
|
}, U = ({ children: e, className: n, ...o }) => {
|
|
158
|
-
const { productsById: r } = o, { options: a, numberOfColumns: m } = A(), { isMobile: p } = v(), _ =
|
|
157
|
+
const { productsById: r } = o, { options: a, numberOfColumns: m } = A(), { isMobile: p } = v(), _ = O(e, U.Option), c = p ? Ce.ONE : m;
|
|
159
158
|
return /* @__PURE__ */ t.createElement("div", {
|
|
160
159
|
className: n,
|
|
161
160
|
"data-columns": c
|
|
162
161
|
}, a.map((u) => {
|
|
163
|
-
var
|
|
164
|
-
const i = r[u.value], E = (
|
|
162
|
+
var f;
|
|
163
|
+
const i = r[u.value], E = (f = i == null ? void 0 : i.fixedPriceOptions) == null ? void 0 : f.price;
|
|
165
164
|
return N(_, {
|
|
166
165
|
key: u.value,
|
|
167
166
|
value: u.value,
|
|
@@ -169,7 +168,7 @@ const s = ({ children: e }) => {
|
|
|
169
168
|
});
|
|
170
169
|
}));
|
|
171
170
|
}, R = ({ children: e, className: n, ...o }) => {
|
|
172
|
-
const { value: r, price: a } = o, { id: m } = A(), { currency: p, regionalFormat: _ } = v(), c =
|
|
171
|
+
const { value: r, price: a } = o, { id: m } = A(), { currency: p, regionalFormat: _ } = v(), c = O(e, R.Value), u = O(e, R.Currency), { isCurrencyPrefixed: i } = K({
|
|
173
172
|
amount: a,
|
|
174
173
|
currency: p == null ? void 0 : p.code,
|
|
175
174
|
locale: _
|
|
@@ -178,15 +177,15 @@ const s = ({ children: e }) => {
|
|
|
178
177
|
var h, I;
|
|
179
178
|
(I = (h = E.current) == null ? void 0 : h.querySelector("input")) == null || I.focus();
|
|
180
179
|
}, m);
|
|
181
|
-
const
|
|
180
|
+
const f = c ? N(c, {
|
|
182
181
|
price: a
|
|
183
182
|
}) : null;
|
|
184
|
-
return /* @__PURE__ */ t.createElement(
|
|
183
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
185
184
|
value: r
|
|
186
185
|
}, /* @__PURE__ */ t.createElement(H, {
|
|
187
186
|
className: n,
|
|
188
187
|
ref: E
|
|
189
|
-
}, /* @__PURE__ */ t.createElement(t.Fragment, null, i && u,
|
|
188
|
+
}, /* @__PURE__ */ t.createElement(t.Fragment, null, i && u, f, !i && u)));
|
|
190
189
|
}, we = ({ className: e, ...n }) => {
|
|
191
190
|
const { price: o } = n, { currency: r, regionalFormat: a } = v(), { value: m } = K({
|
|
192
191
|
amount: o,
|
|
@@ -205,7 +204,7 @@ const s = ({ children: e }) => {
|
|
|
205
204
|
R.Value = we;
|
|
206
205
|
R.Currency = Ue;
|
|
207
206
|
const S = ({ children: e, className: n, ...o }) => {
|
|
208
|
-
const { customAmount: r, onCustomAmountInputChange: a, currency: m, t: p, placeholder: _, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: E } = A(), { labelId:
|
|
207
|
+
const { customAmount: r, onCustomAmountInputChange: a, currency: m, t: p, placeholder: _, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: E } = A(), { labelId: f, prefixId: h } = j(), I = O(e, S.Currency), T = O(e, S.Value), b = L((F) => {
|
|
209
208
|
a({
|
|
210
209
|
target: {
|
|
211
210
|
value: F
|
|
@@ -219,7 +218,7 @@ const S = ({ children: e, className: n, ...o }) => {
|
|
|
219
218
|
u
|
|
220
219
|
]);
|
|
221
220
|
return /* @__PURE__ */ t.createElement(ce, {
|
|
222
|
-
"aria-labelledby": `${
|
|
221
|
+
"aria-labelledby": `${f} ${h}`,
|
|
223
222
|
value: r,
|
|
224
223
|
onChange: b,
|
|
225
224
|
onFocus: d,
|
|
@@ -260,23 +259,23 @@ S.Currency = $e;
|
|
|
260
259
|
S.Value = Ve;
|
|
261
260
|
U.Option = R;
|
|
262
261
|
s.Label = Ie;
|
|
263
|
-
s.Control =
|
|
262
|
+
s.Control = qe;
|
|
264
263
|
s.Options = U;
|
|
265
264
|
s.OtherInput = S;
|
|
266
265
|
s.Description = de;
|
|
267
266
|
s.Error = Ee;
|
|
268
|
-
const Ye = "_control_141js_1", Ge = "_options_141js_7",
|
|
267
|
+
const Ye = "_control_141js_1", Ge = "_options_141js_7", Qe = "_option_141js_7", He = "_optionCurrency_141js_89", Ke = "_otherInput_141js_93", We = "_otherInputCurrency_141js_112", g = {
|
|
269
268
|
control: Ye,
|
|
270
269
|
options: Ge,
|
|
271
|
-
option:
|
|
270
|
+
option: Qe,
|
|
272
271
|
optionCurrency: He,
|
|
273
272
|
otherInput: Ke,
|
|
274
|
-
otherInputCurrency:
|
|
275
|
-
},
|
|
273
|
+
otherInputCurrency: We
|
|
274
|
+
}, ze = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(re, {
|
|
276
275
|
content: e,
|
|
277
276
|
locale: n
|
|
278
277
|
}), Je = () => {
|
|
279
|
-
const e = le(Ae);
|
|
278
|
+
const e = le(Ae.DONATION_OPTION);
|
|
280
279
|
return /* @__PURE__ */ t.createElement(s, null, /* @__PURE__ */ t.createElement(s.Label, {
|
|
281
280
|
className: y(Ne, D.label)
|
|
282
281
|
}, /* @__PURE__ */ t.createElement(s.Label.Required, {
|
|
@@ -301,7 +300,7 @@ const Ye = "_control_141js_1", Ge = "_options_141js_7", ze = "_option_141js_7",
|
|
|
301
300
|
className: y(Re, D.error)
|
|
302
301
|
}, /* @__PURE__ */ t.createElement(ye, null), /* @__PURE__ */ t.createElement(s.Error.Text, null)), /* @__PURE__ */ t.createElement(s.Description, {
|
|
303
302
|
className: y(Se, D.description)
|
|
304
|
-
},
|
|
303
|
+
}, ze));
|
|
305
304
|
}, On = () => /* @__PURE__ */ t.createElement(Je, null);
|
|
306
305
|
export {
|
|
307
306
|
On as DonationRAC
|
package/dist/component/{dropdown-field-headless-CTZ-zGqZ.js → dropdown-field-headless-CQfZ3zPD.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import e, { useState as E, useCallback as g, useRef as q } from "react";
|
|
2
2
|
import { UNSAFE_PortalProvider as A } from "react-aria";
|
|
3
3
|
import { Select as w, SelectValue as M, ListBox as U, ListBoxItem as _ } from "react-aria-components";
|
|
4
|
-
import { ai as p, af as b, ak as j } from "./form-
|
|
4
|
+
import { ai as p, af as b, ak as j } from "./form-DCmjj8mZ.js";
|
|
5
5
|
import { f as d, a as z } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as G, E as H } from "./field-error-headless-
|
|
7
|
-
import { L as J } from "./field-label-headless-
|
|
6
|
+
import { D as G, E as H } from "./field-error-headless-uQOcm2Ak.js";
|
|
7
|
+
import { L as J } from "./field-label-headless-Bzh7f2Ji.js";
|
|
8
8
|
import { S as K, N as Q } from "./non-modal-popover-DtIMXHbe.js";
|
|
9
9
|
const n = ({ children: t }) => {
|
|
10
10
|
const { id: o, value: r, defaultValue: l, options: a = [], readOnly: s, onChange: u, placeholder: m, disabled: i, required: v, onBlur: O, onFocus: y, FieldLayout: F, hasError: C } = p(), [D, L] = E(!1), [h, I] = E(null), B = r && a.some((c) => (c.value ?? c.label) === r) ? r : l || null, { labelId: N } = b(), P = g((c) => {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { D as o } from "./dropdown-field-headless-
|
|
4
|
+
import { D as o } from "./dropdown-field-headless-CQfZ3zPD.js";
|
|
5
5
|
import { C as n } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
6
|
import { E as l } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { H as c } from "./custom-focus-class-_483Pkwp.js";
|
|
8
|
-
import { s as r } from "./field-rac.module-
|
|
9
|
-
import {
|
|
8
|
+
import { s as r } from "./field-rac.module-DjmaTYkc.js";
|
|
9
|
+
import { y as i, Q as E, x as p, B as _, p as S, i as R } from "./form-element-classes-Dn33C01k.js";
|
|
10
10
|
const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
11
11
|
content: a,
|
|
12
12
|
locale: s
|
|
13
13
|
}), u = () => /* @__PURE__ */ e.createElement(o, null, /* @__PURE__ */ e.createElement(o.Label, {
|
|
14
|
-
className: t(
|
|
14
|
+
className: t(i, r.label)
|
|
15
15
|
}, /* @__PURE__ */ e.createElement(o.Label.Required, {
|
|
16
|
-
className: t(
|
|
16
|
+
className: t(E, r.requiredMark)
|
|
17
17
|
})), /* @__PURE__ */ e.createElement(o.Trigger, {
|
|
18
18
|
className: t(p, r.input, r.dropdownTrigger)
|
|
19
19
|
}, /* @__PURE__ */ e.createElement(n, {
|
|
@@ -23,9 +23,9 @@ const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
23
23
|
}, /* @__PURE__ */ e.createElement(o.Options.Option, {
|
|
24
24
|
className: t(r.selectOption, c)
|
|
25
25
|
})), /* @__PURE__ */ e.createElement(o.Error, {
|
|
26
|
-
className: t(
|
|
26
|
+
className: t(S, r.error)
|
|
27
27
|
}, /* @__PURE__ */ e.createElement(l, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
|
|
28
|
-
className: t(
|
|
28
|
+
className: t(R, r.description)
|
|
29
29
|
}, D));
|
|
30
30
|
export {
|
|
31
31
|
u as D
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o, { useMemo as a } from "react";
|
|
2
|
-
import { ai as n, as as c, h as i } from "./form-
|
|
3
|
-
import { C } from "./checkbox-field-rac-
|
|
4
|
-
import {
|
|
2
|
+
import { ai as n, as as c, h as i } from "./form-DCmjj8mZ.js";
|
|
3
|
+
import { C } from "./checkbox-field-rac-BLihwz3C.js";
|
|
4
|
+
import { n as l, o as m, m as p } from "./form-element-classes-Dn33C01k.js";
|
|
5
5
|
const _ = (e) => ({
|
|
6
6
|
nodes: [
|
|
7
7
|
{
|
|
@@ -38,9 +38,9 @@ const _ = (e) => ({
|
|
|
38
38
|
}
|
|
39
39
|
}, /* @__PURE__ */ o.createElement(C, {
|
|
40
40
|
classes: {
|
|
41
|
-
container:
|
|
42
|
-
label:
|
|
43
|
-
|
|
41
|
+
container: p,
|
|
42
|
+
label: m,
|
|
43
|
+
indicator: l
|
|
44
44
|
}
|
|
45
45
|
}));
|
|
46
46
|
};
|
package/dist/component/{email-input-field-rac-CNzmm1j7.js → email-input-field-rac-Dg0p6WZe.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as ie } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import u, { createContext as
|
|
2
|
+
import D from "classnames";
|
|
3
|
+
import u, { createContext as z, useContext as Z, createElement as H, isValidElement as U, cloneElement as R, useState as le, useCallback as me, useEffect as ue } from "react";
|
|
4
4
|
import { TextField as pe } from "react-aria-components";
|
|
5
|
-
import { af as fe, as as ge, ad as ve, c as ye, ai as Ee, am as de, ag as be, f as Se } from "./form-
|
|
5
|
+
import { af as fe, as as ge, ad as ve, c as ye, ai as Ee, am as de, ag as be, f as Se } from "./form-DCmjj8mZ.js";
|
|
6
6
|
import { f as L } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import ee from "@babel/runtime/helpers/objectWithoutProperties";
|
|
8
|
-
import
|
|
8
|
+
import _ from "@babel/runtime/helpers/typeof";
|
|
9
9
|
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 B } from "./text-input-headless-
|
|
13
|
+
import { T as B } from "./text-input-headless-fbiKci5q.js";
|
|
14
14
|
import { E as Ae } from "./error-icon-hZxQ6DEy.js";
|
|
15
|
-
import { s as C } from "./field-rac.module-
|
|
16
|
-
import {
|
|
15
|
+
import { s as C } from "./field-rac.module-DjmaTYkc.js";
|
|
16
|
+
import { y as Fe, Q as ke, x as Te, p as xe, i as De, _ as je } from "./form-element-classes-Dn33C01k.js";
|
|
17
17
|
var Le = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Ce = {
|
|
18
18
|
"&": "&",
|
|
19
19
|
"&": "&",
|
|
@@ -35,11 +35,11 @@ var Le = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
35
35
|
"…": "…",
|
|
36
36
|
"/": "/",
|
|
37
37
|
"/": "/"
|
|
38
|
-
},
|
|
38
|
+
}, _e = function(t) {
|
|
39
39
|
return Ce[t];
|
|
40
|
-
},
|
|
41
|
-
return t.replace(Le,
|
|
42
|
-
},
|
|
40
|
+
}, Me = function(t) {
|
|
41
|
+
return t.replace(Le, _e);
|
|
42
|
+
}, Pe = {
|
|
43
43
|
bindI18n: "languageChanged",
|
|
44
44
|
bindI18nStore: "",
|
|
45
45
|
transEmptyNodeValue: "",
|
|
@@ -47,10 +47,10 @@ var Le = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
47
47
|
transWrapTextNodes: "",
|
|
48
48
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
49
49
|
useSuspense: !0,
|
|
50
|
-
unescape:
|
|
51
|
-
}, we, Re =
|
|
50
|
+
unescape: Me
|
|
51
|
+
}, we, Re = z();
|
|
52
52
|
function He() {
|
|
53
|
-
return
|
|
53
|
+
return Pe;
|
|
54
54
|
}
|
|
55
55
|
(function() {
|
|
56
56
|
function e() {
|
|
@@ -81,13 +81,13 @@ function K() {
|
|
|
81
81
|
typeof a[0] == "string" && (a[0] = "react-i18next:: ".concat(a[0])), (e = console).warn.apply(e, a);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
var
|
|
84
|
+
var X = {};
|
|
85
85
|
function Ue() {
|
|
86
86
|
for (var e = arguments.length, t = new Array(e), a = 0; a < e; a++)
|
|
87
87
|
t[a] = arguments[a];
|
|
88
|
-
typeof t[0] == "string" &&
|
|
88
|
+
typeof t[0] == "string" && X[t[0]] || (typeof t[0] == "string" && (X[t[0]] = /* @__PURE__ */ new Date()), K.apply(void 0, t));
|
|
89
89
|
}
|
|
90
|
-
var Be = ["format"],
|
|
90
|
+
var Be = ["format"], Ve = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
91
91
|
function J(e, t) {
|
|
92
92
|
var a = Object.keys(e);
|
|
93
93
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -114,15 +114,15 @@ function Y(e, t) {
|
|
|
114
114
|
var a = e.props ? e.props.children : e.children;
|
|
115
115
|
return t ? a.length > 0 : !!a;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
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 U(t);
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function M(e) {
|
|
126
126
|
return Array.isArray(e) ? e : [e];
|
|
127
127
|
}
|
|
128
128
|
function Ye(e, t) {
|
|
@@ -131,7 +131,7 @@ function Ye(e, t) {
|
|
|
131
131
|
}
|
|
132
132
|
function te(e, t) {
|
|
133
133
|
if (!e) return "";
|
|
134
|
-
var a = "", o =
|
|
134
|
+
var a = "", o = M(e), c = t.transSupportBasicHtmlNodes && t.transKeepBasicHtmlNodesFor ? t.transKeepBasicHtmlNodesFor : [];
|
|
135
135
|
return o.forEach(function(r, g) {
|
|
136
136
|
if (typeof r == "string")
|
|
137
137
|
a += "".concat(r);
|
|
@@ -151,7 +151,7 @@ function te(e, t) {
|
|
|
151
151
|
}
|
|
152
152
|
} else if (r === null)
|
|
153
153
|
K("Trans: the passed in value is invalid - seems you passed in a null child.");
|
|
154
|
-
else if (
|
|
154
|
+
else if (_(r) === "object") {
|
|
155
155
|
var O = r.format, F = ee(r, Be), A = Object.keys(F);
|
|
156
156
|
if (A.length === 1) {
|
|
157
157
|
var S = O ? "".concat(A[0], ", ").concat(O) : A[0];
|
|
@@ -162,22 +162,22 @@ function te(e, t) {
|
|
|
162
162
|
K("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.", r);
|
|
163
163
|
}), a;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Ge(e, t, a, o, c, r) {
|
|
166
166
|
if (t === "") return [];
|
|
167
167
|
var g = o.transKeepBasicHtmlNodesFor || [], v = t && new RegExp(g.join("|")).test(t);
|
|
168
168
|
if (!e && !v) return [t];
|
|
169
169
|
var d = {};
|
|
170
170
|
function b(y) {
|
|
171
|
-
var h =
|
|
171
|
+
var h = M(y);
|
|
172
172
|
h.forEach(function(s) {
|
|
173
|
-
typeof s != "string" && (Y(s) ? b(
|
|
173
|
+
typeof s != "string" && (Y(s) ? b(G(s)) : _(s) === "object" && !U(s) && Object.assign(d, s));
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
b(e);
|
|
177
177
|
var T = he.parse("<0>".concat(t, "</0>")), O = p(p({}, d), c);
|
|
178
178
|
function F(y, h, s) {
|
|
179
|
-
var i =
|
|
180
|
-
return
|
|
179
|
+
var i = G(y), I = S(i, h.children, s);
|
|
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(R(y, p(p({}, y.props), {}, {
|
|
@@ -185,7 +185,7 @@ function $e(e, t, a, o, c, r) {
|
|
|
185
185
|
}), I ? void 0 : h));
|
|
186
186
|
}
|
|
187
187
|
function S(y, h, s) {
|
|
188
|
-
var i =
|
|
188
|
+
var i = M(y), I = M(h);
|
|
189
189
|
return I.reduce(function(l, n, E) {
|
|
190
190
|
var k = n.children && n.children[0] && n.children[0].content && a.services.interpolator.interpolate(n.children[0].content, O, a.language);
|
|
191
191
|
if (n.type === "tag") {
|
|
@@ -193,14 +193,14 @@ function $e(e, t, a, o, c, r) {
|
|
|
193
193
|
!N && s.length === 1 && s[0][n.name] && (N = s[0][n.name]), N || (N = {});
|
|
194
194
|
var m = Object.keys(n.attrs).length !== 0 ? Ye({
|
|
195
195
|
props: n.attrs
|
|
196
|
-
}, N) : N,
|
|
196
|
+
}, N) : N, x = U(m), V = x && Y(n, !0) && !n.voidElement, P = v && _(m) === "object" && m.dummy && !x, w = _(e) === "object" && e !== null && Object.hasOwnProperty.call(e, n.name);
|
|
197
197
|
if (typeof m == "string") {
|
|
198
|
-
var
|
|
199
|
-
l.push(
|
|
200
|
-
} else if (Y(m) ||
|
|
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
|
-
} else if (
|
|
203
|
+
} else if (P) {
|
|
204
204
|
var oe = S(i, n.children, s);
|
|
205
205
|
l.push(R(m, p(p({}, m.props), {}, {
|
|
206
206
|
key: E
|
|
@@ -226,35 +226,35 @@ function $e(e, t, a, o, c, r) {
|
|
|
226
226
|
var ce = S(i, n.children, s);
|
|
227
227
|
l.push("<".concat(n.name, ">").concat(ce, "</").concat(n.name, ">"));
|
|
228
228
|
}
|
|
229
|
-
else if (
|
|
230
|
-
var
|
|
231
|
-
|
|
229
|
+
else if (_(m) === "object" && !x) {
|
|
230
|
+
var $ = n.children[0] ? k : null;
|
|
231
|
+
$ && l.push($);
|
|
232
232
|
} else n.children.length === 1 && k ? l.push(R(m, p(p({}, m.props), {}, {
|
|
233
233
|
key: E
|
|
234
234
|
}), k)) : l.push(R(m, p(p({}, m.props), {}, {
|
|
235
235
|
key: E
|
|
236
236
|
})));
|
|
237
237
|
} else if (n.type === "text") {
|
|
238
|
-
var W = o.transWrapTextNodes,
|
|
238
|
+
var W = o.transWrapTextNodes, Q = r ? o.unescape(a.services.interpolator.interpolate(n.content, O, a.language)) : a.services.interpolator.interpolate(n.content, O, a.language);
|
|
239
239
|
W ? l.push(H(W, {
|
|
240
240
|
key: "".concat(n.name, "-").concat(E)
|
|
241
|
-
},
|
|
241
|
+
}, Q)) : l.push(Q);
|
|
242
242
|
}
|
|
243
243
|
return l;
|
|
244
244
|
}, []);
|
|
245
245
|
}
|
|
246
|
-
var
|
|
246
|
+
var j = S([{
|
|
247
247
|
dummy: !0,
|
|
248
248
|
children: e || []
|
|
249
|
-
}], T,
|
|
250
|
-
return
|
|
249
|
+
}], T, M(e || []));
|
|
250
|
+
return G(j[0]);
|
|
251
251
|
}
|
|
252
|
-
function
|
|
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,
|
|
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, j = ee(e, Ve), y = Z(Re) || {}, h = y.i18n, s = y.defaultNS, i = F || h || Ke();
|
|
254
254
|
if (!i)
|
|
255
255
|
return Ue("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
260
|
var l = p(p({}, He()), i.options && i.options.react), n = O || I.ns || s || i.options && i.options.defaultNS;
|
|
@@ -264,16 +264,16 @@ function Ge(e) {
|
|
|
264
264
|
prefix: "#$?",
|
|
265
265
|
suffix: "?$#"
|
|
266
266
|
})
|
|
267
|
-
},
|
|
267
|
+
}, x = p(p(p(p({}, v), {}, {
|
|
268
268
|
count: a
|
|
269
269
|
}, d), m), {}, {
|
|
270
270
|
defaultValue: E,
|
|
271
271
|
ns: n
|
|
272
|
-
}),
|
|
273
|
-
return w ? H(w,
|
|
272
|
+
}), V = N ? I(N, x) : E, P = Ge(T || t, V, i, l, x, S), w = o !== void 0 ? o : l.defaultTransParent;
|
|
273
|
+
return w ? H(w, j, P) : P;
|
|
274
274
|
}
|
|
275
|
-
const We = "email-mistype-suggestion",
|
|
276
|
-
function
|
|
275
|
+
const We = "email-mistype-suggestion", Qe = "email-mistype-suggestion-link", ae = /* @__PURE__ */ z(void 0);
|
|
276
|
+
function Xe() {
|
|
277
277
|
const e = Z(ae);
|
|
278
278
|
if (e === void 0)
|
|
279
279
|
throw new Error("useEmailSuggestion must be used inside <EmailInput>");
|
|
@@ -284,14 +284,14 @@ const Je = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
284
284
|
activeSuggestion: e,
|
|
285
285
|
applySuggestion: t
|
|
286
286
|
}
|
|
287
|
-
}, a),
|
|
288
|
-
const { suggestionId: t } = fe(), { activeSuggestion: a, applySuggestion: o } =
|
|
287
|
+
}, a), ze = ({ className: e }) => {
|
|
288
|
+
const { suggestionId: t } = fe(), { activeSuggestion: a, applySuggestion: o } = Xe(), { t: c, i18n: r } = ge();
|
|
289
289
|
return /* @__PURE__ */ u.createElement("div", {
|
|
290
290
|
id: t,
|
|
291
291
|
"data-hook": We,
|
|
292
292
|
"aria-live": "polite",
|
|
293
293
|
className: e
|
|
294
|
-
}, a ? /* @__PURE__ */ u.createElement(
|
|
294
|
+
}, a ? /* @__PURE__ */ u.createElement($e, {
|
|
295
295
|
i18n: r,
|
|
296
296
|
t: c,
|
|
297
297
|
i18nKey: "input.email.mistype-check.suggestion",
|
|
@@ -302,7 +302,7 @@ const Je = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
302
302
|
/* @__PURE__ */ u.createElement("button", {
|
|
303
303
|
key: "0",
|
|
304
304
|
type: "button",
|
|
305
|
-
"data-hook":
|
|
305
|
+
"data-hook": Qe,
|
|
306
306
|
"aria-label": c("input.email.mistype-check.fix-aria-label", {
|
|
307
307
|
email: a
|
|
308
308
|
}),
|
|
@@ -449,13 +449,13 @@ const Je = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
449
449
|
validate: v
|
|
450
450
|
};
|
|
451
451
|
}, f = ({ children: e }) => {
|
|
452
|
-
const { id: t, value: a, onChange: o, disabled: c, readOnly: r, required: g, hasError: v, onBlur: d, onFocus: b, error: T, description: O, FieldLayout: F } = Ee(), { isMistyped: A, suggestedEmail: S, validate:
|
|
452
|
+
const { id: t, value: a, onChange: o, disabled: c, readOnly: r, required: g, hasError: v, onBlur: d, onFocus: b, error: T, description: O, FieldLayout: F } = Ee(), { isMistyped: A, suggestedEmail: S, validate: j } = at({
|
|
453
453
|
email: a,
|
|
454
454
|
hasError: v
|
|
455
455
|
}), { setFocusedFieldId: y } = de(), s = A && (!r && !c) && S ? S : void 0, i = be(t, T, O, s), I = () => {
|
|
456
456
|
o(s), y(t);
|
|
457
457
|
}, l = () => {
|
|
458
|
-
|
|
458
|
+
j(), d == null || d();
|
|
459
459
|
}, n = L(e, f.Label), E = L(e, f.Input), k = L(e, f.Description), N = L(e, f.Error), m = L(e, f.Suggestion);
|
|
460
460
|
return /* @__PURE__ */ u.createElement(Se.Provider, {
|
|
461
461
|
value: i
|
|
@@ -483,24 +483,24 @@ f.Label = B.Label;
|
|
|
483
483
|
f.Input = B.Input;
|
|
484
484
|
f.Description = B.Description;
|
|
485
485
|
f.Error = B.Error;
|
|
486
|
-
f.Suggestion =
|
|
486
|
+
f.Suggestion = ze;
|
|
487
487
|
const nt = "_suggestion_di65n_1", ot = {
|
|
488
488
|
suggestion: nt
|
|
489
489
|
}, rt = ({ content: e, locale: t }) => /* @__PURE__ */ u.createElement(ie, {
|
|
490
490
|
content: e,
|
|
491
491
|
locale: t
|
|
492
492
|
}), ht = () => /* @__PURE__ */ u.createElement(f, null, /* @__PURE__ */ u.createElement(f.Label, {
|
|
493
|
-
className:
|
|
493
|
+
className: D(Fe, C.label)
|
|
494
494
|
}, /* @__PURE__ */ u.createElement(f.Label.Required, {
|
|
495
|
-
className:
|
|
495
|
+
className: D(ke, C.requiredMark)
|
|
496
496
|
})), /* @__PURE__ */ u.createElement(f.Input, {
|
|
497
|
-
className:
|
|
497
|
+
className: D(Te, C.input)
|
|
498
498
|
}), /* @__PURE__ */ u.createElement(f.Error, {
|
|
499
|
-
className:
|
|
499
|
+
className: D(xe, C.error)
|
|
500
500
|
}, /* @__PURE__ */ u.createElement(Ae, null), /* @__PURE__ */ u.createElement(f.Error.Text, null)), /* @__PURE__ */ u.createElement(f.Description, {
|
|
501
|
-
className:
|
|
501
|
+
className: D(De, C.description)
|
|
502
502
|
}, rt), /* @__PURE__ */ u.createElement(f.Suggestion, {
|
|
503
|
-
className:
|
|
503
|
+
className: D(je, ot.suggestion)
|
|
504
504
|
}));
|
|
505
505
|
export {
|
|
506
506
|
ht as E
|