@wix/form-elements 1.160.0 → 1.161.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-BmHu56e5.js → appointment-rac-BubC8I9X.js} +395 -388
- package/dist/component/{bookings-address-rac-DY9l2g0h.js → bookings-address-rac-BbwvVs86.js} +1 -1
- package/dist/component/{bookings-email-rac-B5vNSOsS.js → bookings-email-rac-C2HCkcfa.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CJiefCNz.js → bookings-first-name-rac-Uy7c5EBs.js} +1 -1
- package/dist/component/{bookings-header-rac-BFu7Ko5w.js → bookings-header-rac-nmwsWRjS.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DegMM13h.js → bookings-last-name-rac-BAioQLCg.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrA-5tBH.js → bookings-login-bar-rac-CO6vOBjG.js} +7 -7
- package/dist/component/{bookings-phone-rac-DsaeqxCI.js → bookings-phone-rac-Cr16h-_R.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-jRHiwqi8.js → bookings-rich-text-rac-CHLH3jd7.js} +1 -1
- package/dist/component/{checkbox-field-rac-CyoBb6Yf.js → checkbox-field-rac-CMwmwFMD.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-Bv1gU3oL.js → checkbox-group-field-headless-BNs_S-nT.js} +24 -24
- package/dist/component/{checkbox-group-field-rac-DasArcdV.js → checkbox-group-field-rac-BA60EPAN.js} +12 -12
- package/dist/component/{checkbox-group-rac-CzmufV1U.js → checkbox-group-rac-BJZ4Oer9.js} +1 -1
- package/dist/component/{checkbox-rac-6C7XoUoZ.js → checkbox-rac-KsVlI6_V.js} +1 -1
- package/dist/component/{contacts-address-rac-BZobbFtz.js → contacts-address-rac-CRYkz87z.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DIzf41DS.js → contacts-birthdate-rac-BIz-1-ZX.js} +1 -1
- package/dist/component/{contacts-company-rac-BiBDO28r.js → contacts-company-rac-B8G__j6I.js} +1 -1
- package/dist/component/{contacts-email-rac-5mqokCSD.js → contacts-email-rac-Dztkvp5i.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BXe3_Nz5.js → contacts-first-name-rac-CVSEWpLU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cfqgh7u1.js → contacts-last-name-rac-Blz4M5bk.js} +1 -1
- package/dist/component/{contacts-phone-rac-cmLUWnAc.js → contacts-phone-rac-CPCE5soY.js} +1 -1
- package/dist/component/{contacts-position-rac-DTyvklfN.js → contacts-position-rac-Dd_kBjqG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-D-ZEX1A3.js → contacts-subscribe-rac-C6AlsP10.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B4NYJwWt.js → contacts-tax-id-rac-CQ1n29zI.js} +1 -1
- package/dist/component/{date-availability-Dach9aRC.js → date-availability-DDj1j0z5.js} +1 -1
- package/dist/component/{date-input-field-rac-B72mHcya.js → date-input-field-rac-D5r1n_ah.js} +59 -59
- package/dist/component/{date-input-rac-CYix11gT.js → date-input-rac-Cyi5mU_P.js} +1 -1
- package/dist/component/{date-picker-field-rac-B8pvtPir.js → date-picker-field-rac-CeG391Zo.js} +34 -34
- package/dist/component/{date-picker-rac-D6cR0zH9.js → date-picker-rac-Ci9aHgav.js} +1 -1
- package/dist/component/{date-time-input-field-rac-B7Y3Yf5l.js → date-time-input-field-rac-CrbYEbJJ.js} +89 -89
- package/dist/component/{date-time-input-rac-DMN-noQX.js → date-time-input-rac-DDJLkqs0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Kq0GnteP.js → dext-checkbox-group-rac-C3ftVHBA.js} +4 -4
- package/dist/component/{dext-checkbox-rac-BY9GZ4n1.js → dext-checkbox-rac-BGLYWn68.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CXArIddp.js → dext-date-picker-rac-Cy9RlDlt.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-B39TtxGq.js → dext-date-time-input-rac-88ZoTd5e.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3y0G8cS.js → dext-dropdown-rac-CPxDUuk9.js} +1 -1
- package/dist/component/{dext-email-rac-BIg3cq7Q.js → dext-email-rac-BAvQwDPA.js} +1 -1
- package/dist/component/{dext-number-input-rac-27sHJ7yN.js → dext-number-input-rac-D7HYQVKq.js} +1 -1
- package/dist/component/{dext-phone-rac-CcohoFQp.js → dext-phone-rac--FhcplSI.js} +1 -1
- package/dist/component/{dext-radio-group-rac-eead3Gve.js → dext-radio-group-rac-DBz8iCKW.js} +2 -2
- package/dist/component/{dext-rating-input-rac-B_E6OcBr.js → dext-rating-input-rac-Cv7nThfe.js} +1 -1
- package/dist/component/{dext-tags-rac-Yd9aAtnF.js → dext-tags-rac-CRUUc5dr.js} +2 -2
- package/dist/component/{dext-text-area-rac-CMACri2C.js → dext-text-area-rac-DQBQXV1L.js} +1 -1
- package/dist/component/{dext-text-input-rac-sNjSCfQ-.js → dext-text-input-rac-4CpM581y.js} +1 -1
- package/dist/component/{dext-url-input-rac-DwhbzJty.js → dext-url-input-rac-0C1jTEr9.js} +1 -1
- package/dist/component/{donation-rac-BVAN3kMk.js → donation-rac-Cgt0ZE50.js} +68 -68
- package/dist/component/{dropdown-field-rac-DdoGigWx.js → dropdown-field-rac-DlGKR7pZ.js} +3 -3
- package/dist/component/{dropdown-rac-CRkt5w47.js → dropdown-rac-CYFW_3x_.js} +1 -1
- package/dist/component/{ecom-address-rac-C36hFHW0.js → ecom-address-rac-CQfQHpXC.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BKfQ348w.js → ecom-subscription-checkbox-rac-D2v2Upvz.js} +2 -2
- package/dist/component/{email-input-field-rac-MOaISYxa.js → email-input-field-rac-CVw25yRo.js} +45 -45
- package/dist/component/{events-repeater-rac-D6p-NgE8.js → events-repeater-rac-BCVUcmFj.js} +22 -22
- package/dist/component/{events-rsvp-rac-DVpgN8gm.js → events-rsvp-rac-DwbqEr8z.js} +3 -3
- package/dist/component/{field-error-headless-XNWmDH3E.js → field-error-headless-XnVcMmsL.js} +3 -3
- package/dist/component/{field-label-headless-CORRAJGt.js → field-label-headless-BRTLT2Yt.js} +14 -14
- package/dist/component/{file-upload-rac-DRMr7E4b.js → file-upload-rac-Dkwg9Jk4.js} +115 -115
- package/dist/component/{fixed-payment-rac-BUXzNex9.js → fixed-payment-rac-ST98xAa2.js} +20 -20
- package/dist/component/{form-DSpx-AO8.js → form-BUqSKOvc.js} +235 -234
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CiDXlNsa.js → header-field-rac-CzNTGYWq.js} +5 -5
- package/dist/component/{header-rac-B5Rg-h8u.js → header-rac-DUt6AIAE.js} +1 -1
- package/dist/component/{image-choice-rac-CtoA_KDp.js → image-choice-rac-DuBgrSt2.js} +21 -21
- package/dist/component/{index-Bz7ZhQsF.js → index-CDO22hht.js} +106 -106
- package/dist/component/{index-CwruESwc.js → index-cZZeAuuu.js} +5 -5
- package/dist/component/{isObjectLike-C5dHxHP0.js → isObjectLike-cs4bARpC.js} +3 -3
- package/dist/component/{multiline-address-field-rac-Z-qF366L.js → multiline-address-field-rac-vcEWhUCV.js} +73 -73
- package/dist/component/{multiline-address-rac-CJIHTMw5.js → multiline-address-rac-WQaI2eUX.js} +1 -1
- package/dist/component/{number-input-field-rac-D4vf6I6N.js → number-input-field-rac-CBUMqATk.js} +26 -26
- package/dist/component/{number-input-rac-B2jW6JUQ.js → number-input-rac-B4j5hyzS.js} +1 -1
- package/dist/component/{password-rac-DGRZ17Jl.js → password-rac-DwLyf45N.js} +28 -28
- package/dist/component/{payment-input-rac-BtD-tAKv.js → payment-input-rac-D0Od---y.js} +28 -28
- package/dist/component/{phone-input-field-rac-KD4-APhr.js → phone-input-field-rac-COlu9IeC.js} +64 -64
- package/dist/component/{phone-rac-Cw2yccgg.js → phone-rac-Dh4RacOF.js} +1 -1
- package/dist/component/{product-list-rac-XbzTDdbp.js → product-list-rac-D7zHDE2D.js} +47 -47
- package/dist/component/{quiz-radio-group-rac-BDw_mAw5.js → quiz-radio-group-rac-1AaKphJt.js} +1 -1
- package/dist/component/{radio-button-module-classes-CFGf0Hzh.js → radio-button-module-classes-VqaP6vpA.js} +29 -29
- package/dist/component/{radio-group-field-rac-CXN7tyVu.js → radio-group-field-rac-Cp3LRN3C.js} +6 -6
- package/dist/component/{radio-group-rac-COHzqjBh.js → radio-group-rac-KhmhzYGf.js} +1 -1
- package/dist/component/{rating-input-field-rac-DCXNZgf1.js → rating-input-field-rac-10n6ciCr.js} +22 -22
- package/dist/component/{rating-input-rac-DwQt9ML7.js → rating-input-rac-XZjjY2Gp.js} +1 -1
- package/dist/component/{rich-content-rac.module-B7rPwNns.js → rich-content-rac.module-kMwDoLBa.js} +1 -1
- package/dist/component/{rich-text-field-rac-DlER7NRD.js → rich-text-field-rac-H5bd8fAt.js} +6 -6
- package/dist/component/{rich-text-rac-CjicsHA7.js → rich-text-rac-88GSQR62.js} +1 -1
- package/dist/component/{service-dropdown-rac-B81LC_6_.js → service-dropdown-rac-B1_Xr_X3.js} +31 -31
- package/dist/component/{services-multi-choice-rac-BR6gZeHk.js → services-multi-choice-rac-DWp_Llbi.js} +17 -17
- package/dist/component/{signature-rac-XFj7Ddtp.js → signature-rac-zN_6KRDp.js} +44 -44
- package/dist/component/{submit-button-rac-Bz7zs_3W.js → submit-button-rac-Dv6UarYX.js} +2 -2
- package/dist/component/{tags-field-rac-DWWkNKqc.js → tags-field-rac-sVN6MHfJ.js} +38 -38
- package/dist/component/{tags-rac-BXyiQ9i1.js → tags-rac-DhTHs_XN.js} +1 -1
- package/dist/component/{text-area-field-rac-DsIRYi0d.js → text-area-field-rac-DrWkww7W.js} +21 -21
- package/dist/component/{text-area-rac-CF9pDP9d.js → text-area-rac-CXXh-ZdY.js} +1 -1
- package/dist/component/{text-input-field-rac-BwIDZACz.js → text-input-field-rac-C2YiMr-g.js} +3 -3
- package/dist/component/{text-input-headless-5kQs2_Xu.js → text-input-headless-BJMNbsMY.js} +12 -12
- package/dist/component/{text-input-rac-CRmSuw1k.js → text-input-rac-CpsPh7FH.js} +1 -1
- package/dist/component/{time-input-rac-BRMNpe51.js → time-input-rac-DG_1KxS4.js} +23 -23
- package/dist/component/{url-input-field-rac-CKLS3QDk.js → url-input-field-rac-twxRREnl.js} +26 -26
- package/dist/component/{url-input-rac-Dv-kp50D.js → url-input-rac-BTStO0NP.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BQi_qE_-.js → use-dropdown-option-class-name-DbMMg1ws.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-bAK8aHiG.js → use-dropdown-trigger-class-name-Yes4kC_0.js} +17 -17
- package/dist/component/{use-element-state-class-name-rXM_lHug.js → use-element-state-class-name-DlncY4hk.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-BnV_uerV.js → use-hoverable-input-class-name-C__zqP5j.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-DnK_MQRO.js +53 -0
- package/dist/component/{use-service-options-base-CLeE9-Tx.js → use-service-options-base-DKJe52Vk.js} +6 -6
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +6 -0
- package/dist/form.d.ts +3 -0
- package/package.json +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +0 -53
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +0 -6
|
@@ -3,11 +3,11 @@ import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
|
3
3
|
import v 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 { aQ as W, bA as T, bx as P, bK as ie, bs as H, bC as ue, W as me, ac as pe, H as de, M as Ie, G as Ce, I as Ee } from "./form-BUqSKOvc.js";
|
|
7
7
|
import { f as O, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { a as
|
|
9
|
-
import { D as fe, E as Oe } from "./field-error-headless-
|
|
10
|
-
import { L as be } from "./field-label-headless-
|
|
8
|
+
import { a as Y } from "./format-currency-BwShJ9vM.js";
|
|
9
|
+
import { D as fe, E as Oe } from "./field-error-headless-XnVcMmsL.js";
|
|
10
|
+
import { L as be } from "./field-label-headless-BRTLT2Yt.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
13
|
import { g as Ne } from "./payment-field-utils-DobiK5Xh.js";
|
|
@@ -15,88 +15,88 @@ import { u as ge } from "./use-synced-display-value-DcAxdn3M.js";
|
|
|
15
15
|
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
16
16
|
import { s as L } from "./field-rac.module-DP0lkkEv.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 ve } from "./use-text-input-class-name-
|
|
18
|
+
import { u as Se } from "./use-element-state-class-name-DlncY4hk.js";
|
|
19
|
+
import { u as ve } from "./use-text-input-class-name-D9tJTR-b.js";
|
|
20
20
|
function Le(e, t) {
|
|
21
21
|
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Ae(e) {
|
|
24
24
|
return Le(e, "id");
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
26
|
+
const Re = 0.01;
|
|
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 === W.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 === W.DYNAMIC_PRICE);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
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: g, regionalFormat: _ } = H(), b = o == null ? void 0 : o[0], D = x(() => {
|
|
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 = x(() => Ae(D), [
|
|
52
52
|
D
|
|
53
|
-
]), a = x(() => E ?
|
|
53
|
+
]), a = x(() => E ? Pe(D) : void 0, [
|
|
54
54
|
D,
|
|
55
55
|
E
|
|
56
|
-
]),
|
|
57
|
-
sourceValue:
|
|
56
|
+
]), w = Me(b, a), [V, B] = ge({
|
|
57
|
+
sourceValue: w,
|
|
58
58
|
format: (I) => he(String(I ?? ""), _),
|
|
59
59
|
regionalFormat: _
|
|
60
60
|
}), q = S((I) => {
|
|
61
|
-
const h = I === void 0 ? void 0 :
|
|
61
|
+
const h = I === void 0 ? void 0 : M[I];
|
|
62
62
|
r(h ? [
|
|
63
|
-
|
|
64
|
-
] : []),
|
|
63
|
+
Q(h, Te(h))
|
|
64
|
+
] : []), B("");
|
|
65
65
|
}, [
|
|
66
66
|
r,
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
M,
|
|
68
|
+
B
|
|
69
69
|
]), k = S((I) => {
|
|
70
70
|
a && r(typeof I == "number" ? [
|
|
71
|
-
|
|
71
|
+
Q(a, String(I))
|
|
72
72
|
] : []);
|
|
73
73
|
}, [
|
|
74
74
|
r,
|
|
75
75
|
a
|
|
76
76
|
]), G = x(() => ce(k, 500), [
|
|
77
77
|
k
|
|
78
|
-
]),
|
|
78
|
+
]), j = S((I) => {
|
|
79
79
|
(b == null ? void 0 : b.productId) !== (a == null ? void 0 : a.id) && r(void 0);
|
|
80
|
-
const { validInput: h, validNumber: ee } = _e(I.target.value,
|
|
81
|
-
|
|
80
|
+
const { validInput: h, validNumber: ee } = _e(I.target.value, Re, V, _);
|
|
81
|
+
B(h), G(ee);
|
|
82
82
|
}, [
|
|
83
83
|
_,
|
|
84
84
|
r,
|
|
85
85
|
b,
|
|
86
86
|
a,
|
|
87
|
-
|
|
87
|
+
V,
|
|
88
88
|
G,
|
|
89
|
-
|
|
90
|
-
]), U = (b == null ? void 0 : b.productId) || null,
|
|
89
|
+
B
|
|
90
|
+
]), U = (b == null ? void 0 : b.productId) || null, z = S(() => {
|
|
91
91
|
a != null && a.id && U !== a.id && q(a.id);
|
|
92
92
|
}, [
|
|
93
93
|
a == null ? void 0 : a.id,
|
|
94
94
|
U,
|
|
95
95
|
q
|
|
96
|
-
]),
|
|
96
|
+
]), J = O(e, s.Label), K = O(e, s.Control), X = O(e, s.Description), Z = O(e, s.Error);
|
|
97
97
|
return /* @__PURE__ */ n.createElement(f, {
|
|
98
98
|
fieldId: t,
|
|
99
|
-
renderLabel: () =>
|
|
99
|
+
renderLabel: () => J,
|
|
100
100
|
renderInput: () => /* @__PURE__ */ n.createElement(ye, {
|
|
101
101
|
id: c,
|
|
102
102
|
ariaLabelledBy: d,
|
|
@@ -104,23 +104,23 @@ const s = ({ children: e }) => {
|
|
|
104
104
|
required: l,
|
|
105
105
|
onBlur: i,
|
|
106
106
|
onFocus: C
|
|
107
|
-
},
|
|
108
|
-
productsById:
|
|
107
|
+
}, K ? F(K, {
|
|
108
|
+
productsById: M,
|
|
109
109
|
selectedValue: U,
|
|
110
110
|
onSelectProduct: q,
|
|
111
111
|
addOther: E,
|
|
112
|
-
customAmount:
|
|
113
|
-
onCustomAmountInputChange:
|
|
112
|
+
customAmount: V,
|
|
113
|
+
onCustomAmountInputChange: j,
|
|
114
114
|
currency: g,
|
|
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
|
-
onFocusCustomInput:
|
|
118
|
+
onFocusCustomInput: z
|
|
119
119
|
}) : null),
|
|
120
120
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, Z, X)
|
|
121
121
|
});
|
|
122
|
-
},
|
|
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 } =
|
|
122
|
+
}, Be = ({ 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 } = T(), g = O(e, s.Options), _ = O(e, s.OtherInput);
|
|
124
124
|
return /* @__PURE__ */ n.createElement("div", {
|
|
125
125
|
className: t,
|
|
126
126
|
"data-invalid": m
|
|
@@ -138,7 +138,7 @@ const s = ({ children: e }) => {
|
|
|
138
138
|
onFocusCustomInput: y
|
|
139
139
|
}) : null);
|
|
140
140
|
}, $ = ({ 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, $.Option);
|
|
142
142
|
return /* @__PURE__ */ n.createElement(oe, {
|
|
143
143
|
className: t,
|
|
144
144
|
"data-columns": u,
|
|
@@ -160,8 +160,8 @@ const s = ({ children: e }) => {
|
|
|
160
160
|
price: y || "0"
|
|
161
161
|
});
|
|
162
162
|
}));
|
|
163
|
-
},
|
|
164
|
-
const { value: r, price: l } = o, { id: i, hasError: C } =
|
|
163
|
+
}, A = ({ children: e, className: t, ...o }) => {
|
|
164
|
+
const { value: r, price: l } = o, { id: i, hasError: C } = T(), { currency: u, regionalFormat: E } = H(), p = O(e, A.Value), f = O(e, A.Currency), { isCurrencyPrefixed: c } = Y({
|
|
165
165
|
amount: l,
|
|
166
166
|
currency: u == null ? void 0 : u.code,
|
|
167
167
|
locale: E
|
|
@@ -182,7 +182,7 @@ const s = ({ children: e }) => {
|
|
|
182
182
|
"data-invalid": C || void 0
|
|
183
183
|
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && f, y, !c && f));
|
|
184
184
|
}, xe = ({ className: e, ...t }) => {
|
|
185
|
-
const { price: o } = t, { currency: r, regionalFormat: l } =
|
|
185
|
+
const { price: o } = t, { currency: r, regionalFormat: l } = H(), { value: i } = Y({
|
|
186
186
|
amount: o,
|
|
187
187
|
currency: r == null ? void 0 : r.code,
|
|
188
188
|
locale: l
|
|
@@ -190,16 +190,16 @@ const s = ({ children: e }) => {
|
|
|
190
190
|
return /* @__PURE__ */ n.createElement("span", {
|
|
191
191
|
className: e
|
|
192
192
|
}, i);
|
|
193
|
-
},
|
|
194
|
-
const { currency: t } =
|
|
193
|
+
}, He = ({ className: e }) => {
|
|
194
|
+
const { currency: t } = H();
|
|
195
195
|
return /* @__PURE__ */ n.createElement("span", {
|
|
196
196
|
className: e
|
|
197
197
|
}, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
|
|
198
198
|
};
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
const
|
|
202
|
-
const { customAmount: r, onCustomAmountInputChange: l, currency: i, t: C, placeholder: u, customAmountProductId: E, onFocusCustomInput: p } = o, { disabled: f, hasError: c } =
|
|
199
|
+
A.Value = xe;
|
|
200
|
+
A.Currency = He;
|
|
201
|
+
const R = ({ 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 } = T(), { labelId: d, prefixId: y } = P(), m = O(e, R.Currency), g = O(e, R.Value), _ = S((D) => {
|
|
203
203
|
l({
|
|
204
204
|
target: {
|
|
205
205
|
value: D
|
|
@@ -230,8 +230,8 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
230
230
|
placeholder: u,
|
|
231
231
|
customAmountProductId: E
|
|
232
232
|
}) : null));
|
|
233
|
-
},
|
|
234
|
-
const { currency: o, t: r } = t, { prefixId: l } =
|
|
233
|
+
}, Ve = ({ className: e, ...t }) => {
|
|
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,
|
|
@@ -239,7 +239,7 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
239
239
|
className: e
|
|
240
240
|
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
241
241
|
}, qe = ({ 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}`,
|
|
@@ -250,34 +250,34 @@ const A = ({ children: e, className: t, ...o }) => {
|
|
|
250
250
|
className: e
|
|
251
251
|
});
|
|
252
252
|
};
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
$.Option =
|
|
253
|
+
R.Currency = Ve;
|
|
254
|
+
R.Value = qe;
|
|
255
|
+
$.Option = A;
|
|
256
256
|
s.Label = be;
|
|
257
|
-
s.Control =
|
|
257
|
+
s.Control = Be;
|
|
258
258
|
s.Options = $;
|
|
259
|
-
s.OtherInput =
|
|
259
|
+
s.OtherInput = R;
|
|
260
260
|
s.Description = fe;
|
|
261
261
|
s.Error = Oe;
|
|
262
|
-
const Ue = "_control_lovol_1", $e = "_option_lovol_7", ke = "_optionHover_lovol_39", Ge = "_optionSelected_lovol_39",
|
|
262
|
+
const Ue = "_control_lovol_1", $e = "_option_lovol_7", ke = "_optionHover_lovol_39", Ge = "_optionSelected_lovol_39", Ke = "_optionCurrency_lovol_92", Qe = "_otherInput_lovol_96", We = "_otherInputCurrency_lovol_118", N = {
|
|
263
263
|
control: Ue,
|
|
264
264
|
option: $e,
|
|
265
265
|
optionHover: ke,
|
|
266
266
|
optionSelected: Ge,
|
|
267
|
-
optionCurrency:
|
|
268
|
-
otherInput:
|
|
269
|
-
otherInputCurrency:
|
|
270
|
-
},
|
|
267
|
+
optionCurrency: Ke,
|
|
268
|
+
otherInput: Qe,
|
|
269
|
+
otherInputCurrency: We
|
|
270
|
+
}, Ye = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(ne, {
|
|
271
271
|
content: e,
|
|
272
272
|
locale: t
|
|
273
|
-
}),
|
|
273
|
+
}), we = {
|
|
274
274
|
base: N.option,
|
|
275
275
|
selected: N.optionSelected,
|
|
276
276
|
hover: N.optionHover
|
|
277
|
-
},
|
|
277
|
+
}, je = () => {
|
|
278
278
|
const e = ve(N.otherInput), t = Se({
|
|
279
279
|
globalClasses: Ee,
|
|
280
|
-
moduleClasses:
|
|
280
|
+
moduleClasses: we
|
|
281
281
|
});
|
|
282
282
|
return /* @__PURE__ */ n.createElement(s, null, /* @__PURE__ */ n.createElement(s.Label, {
|
|
283
283
|
className: v(me, L.label)
|
|
@@ -301,8 +301,8 @@ const Ue = "_control_lovol_1", $e = "_option_lovol_7", ke = "_optionHover_lovol_
|
|
|
301
301
|
className: v(Ie, L.error)
|
|
302
302
|
}, /* @__PURE__ */ n.createElement(Fe, null), /* @__PURE__ */ n.createElement(s.Error.Text, null)), /* @__PURE__ */ n.createElement(s.Description, {
|
|
303
303
|
className: v(Ce, L.description)
|
|
304
|
-
},
|
|
305
|
-
}, Ct = () => /* @__PURE__ */ n.createElement(
|
|
304
|
+
}, Ye));
|
|
305
|
+
}, Ct = () => /* @__PURE__ */ n.createElement(je, null);
|
|
306
306
|
export {
|
|
307
307
|
Ct as DonationRAC
|
|
308
308
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { u as n, D as r } from "./use-dropdown-trigger-class-name-
|
|
4
|
+
import { u as n, D as r } from "./use-dropdown-trigger-class-name-Yes4kC_0.js";
|
|
5
5
|
import { C as l } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
6
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
7
7
|
import { H as i } from "./custom-focus-class-_483Pkwp.js";
|
|
8
8
|
import { s as o } from "./field-rac.module-DP0lkkEv.js";
|
|
9
|
-
import {
|
|
10
|
-
import { u as R } from "./use-dropdown-option-class-name-
|
|
9
|
+
import { W as p, ac as E, J as D, M as _, G as O } from "./form-BUqSKOvc.js";
|
|
10
|
+
import { u as R } from "./use-dropdown-option-class-name-DbMMg1ws.js";
|
|
11
11
|
const C = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: t,
|
|
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 { bA as a, bK as c, aC as i } from "./form-BUqSKOvc.js";
|
|
3
|
+
import { C as l } from "./checkbox-field-rac-CMwmwFMD.js";
|
|
4
4
|
const p = (e) => ({
|
|
5
5
|
nodes: [
|
|
6
6
|
{
|
package/dist/component/{email-input-field-rac-MOaISYxa.js → email-input-field-rac-CVw25yRo.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
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 { bx as fe, bK as ge, bv as ve, d as ye, bA as Ee, bE as de, by as be, aA as Se, W as Oe, ac as he, M as Ie, G as Ne, al as Ae } from "./form-BUqSKOvc.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";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import Fe from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
import ke from "html-parse-stringify";
|
|
11
11
|
import xe from "@babel/runtime/helpers/classCallCheck";
|
|
12
12
|
import Te from "@babel/runtime/helpers/createClass";
|
|
13
|
-
import { T as U } from "./text-input-headless-
|
|
13
|
+
import { T as U } from "./text-input-headless-BJMNbsMY.js";
|
|
14
14
|
import { E as De } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { s as H } from "./field-rac.module-DP0lkkEv.js";
|
|
16
|
-
import { u as je } from "./use-text-input-class-name-
|
|
16
|
+
import { u as je } from "./use-text-input-class-name-D9tJTR-b.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,7 +48,7 @@ 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, He =
|
|
51
|
+
}, we, He = z();
|
|
52
52
|
function Re() {
|
|
53
53
|
return _e;
|
|
54
54
|
}
|
|
@@ -88,7 +88,7 @@ function Be() {
|
|
|
88
88
|
typeof t[0] == "string" && J[t[0]] || (typeof t[0] == "string" && (J[t[0]] = /* @__PURE__ */ new Date()), K.apply(void 0, t));
|
|
89
89
|
}
|
|
90
90
|
var Ue = ["format"], Ve = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
91
|
-
function
|
|
91
|
+
function Q(e, t) {
|
|
92
92
|
var a = Object.keys(e);
|
|
93
93
|
if (Object.getOwnPropertySymbols) {
|
|
94
94
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -101,20 +101,20 @@ function X(e, t) {
|
|
|
101
101
|
function p(e) {
|
|
102
102
|
for (var t = 1; t < arguments.length; t++) {
|
|
103
103
|
var a = arguments[t] != null ? arguments[t] : {};
|
|
104
|
-
t % 2 ?
|
|
105
|
-
|
|
106
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) :
|
|
104
|
+
t % 2 ? Q(Object(a), !0).forEach(function(o) {
|
|
105
|
+
Fe(e, o, a[o]);
|
|
106
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : Q(Object(a)).forEach(function(o) {
|
|
107
107
|
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(a, o));
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
return e;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function G(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;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Y(e) {
|
|
118
118
|
return e ? e.props ? e.props.children : e.children : [];
|
|
119
119
|
}
|
|
120
120
|
function qe(e) {
|
|
@@ -125,7 +125,7 @@ function qe(e) {
|
|
|
125
125
|
function M(e) {
|
|
126
126
|
return Array.isArray(e) ? e : [e];
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Ge(e, t) {
|
|
129
129
|
var a = p({}, t);
|
|
130
130
|
return a.props = Object.assign(e.props, t.props), a;
|
|
131
131
|
}
|
|
@@ -152,7 +152,7 @@ function te(e, t) {
|
|
|
152
152
|
} else if (r === null)
|
|
153
153
|
K("Trans: the passed in value is invalid - seems you passed in a null child.");
|
|
154
154
|
else if (L(r) === "object") {
|
|
155
|
-
var O = r.format,
|
|
155
|
+
var O = r.format, F = ee(r, Ue), A = Object.keys(F);
|
|
156
156
|
if (A.length === 1) {
|
|
157
157
|
var S = O ? "".concat(A[0], ", ").concat(O) : A[0];
|
|
158
158
|
a += "{{".concat(S, "}}");
|
|
@@ -162,7 +162,7 @@ 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 Ye(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];
|
|
@@ -170,13 +170,13 @@ 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" && (G(s) ? b(Y(s)) : L(s) === "object" && !B(s) && Object.assign(d, s));
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
b(e);
|
|
177
|
-
var x =
|
|
178
|
-
function
|
|
179
|
-
var i =
|
|
177
|
+
var x = ke.parse("<0>".concat(t, "</0>")), O = p(p({}, d), c);
|
|
178
|
+
function F(y, h, s) {
|
|
179
|
+
var i = Y(y), I = S(i, h.children, s);
|
|
180
180
|
return qe(i) && I.length === 0 ? i : I;
|
|
181
181
|
}
|
|
182
182
|
function A(y, h, s, i, I) {
|
|
@@ -187,18 +187,18 @@ function Ge(e, t, a, o, c, r) {
|
|
|
187
187
|
function S(y, h, s) {
|
|
188
188
|
var i = M(y), I = M(h);
|
|
189
189
|
return I.reduce(function(l, n, E) {
|
|
190
|
-
var
|
|
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") {
|
|
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 ? Ge({
|
|
195
195
|
props: n.attrs
|
|
196
|
-
}, N) : N, T = B(m), V = T &&
|
|
196
|
+
}, N) : N, T = B(m), V = T && G(n, !0) && !n.voidElement, P = v && L(m) === "object" && m.dummy && !T, _ = L(e) === "object" && e !== null && Object.hasOwnProperty.call(e, n.name);
|
|
197
197
|
if (typeof m == "string") {
|
|
198
198
|
var q = a.services.interpolator.interpolate(m, O, a.language);
|
|
199
199
|
l.push(q);
|
|
200
|
-
} else if (
|
|
201
|
-
var ne =
|
|
200
|
+
} else if (G(m) || V) {
|
|
201
|
+
var ne = F(m, n, s);
|
|
202
202
|
A(m, ne, l, E);
|
|
203
203
|
} else if (P) {
|
|
204
204
|
var oe = S(i, n.children, s);
|
|
@@ -207,7 +207,7 @@ function Ge(e, t, a, o, c, r) {
|
|
|
207
207
|
}), oe));
|
|
208
208
|
} else if (Number.isNaN(parseFloat(n.name)))
|
|
209
209
|
if (_) {
|
|
210
|
-
var re =
|
|
210
|
+
var re = F(m, n, s);
|
|
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)
|
|
@@ -227,18 +227,18 @@ function Ge(e, t, a, o, c, r) {
|
|
|
227
227
|
l.push("<".concat(n.name, ">").concat(ce, "</").concat(n.name, ">"));
|
|
228
228
|
}
|
|
229
229
|
else if (L(m) === "object" && !T) {
|
|
230
|
-
var $ = n.children[0] ?
|
|
230
|
+
var $ = n.children[0] ? k : null;
|
|
231
231
|
$ && l.push($);
|
|
232
|
-
} else n.children.length === 1 &&
|
|
232
|
+
} else n.children.length === 1 && k ? l.push(w(m, p(p({}, m.props), {}, {
|
|
233
233
|
key: E
|
|
234
|
-
}),
|
|
234
|
+
}), k)) : l.push(w(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, X = 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(R(W, {
|
|
240
240
|
key: "".concat(n.name, "-").concat(E)
|
|
241
|
-
},
|
|
241
|
+
}, X)) : l.push(X);
|
|
242
242
|
}
|
|
243
243
|
return l;
|
|
244
244
|
}, []);
|
|
@@ -247,10 +247,10 @@ function Ge(e, t, a, o, c, r) {
|
|
|
247
247
|
dummy: !0,
|
|
248
248
|
children: e || []
|
|
249
249
|
}], x, M(e || []));
|
|
250
|
-
return
|
|
250
|
+
return Y(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, x = e.components, O = e.ns,
|
|
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, x = 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
256
|
var I = A || i.t.bind(i) || function(q) {
|
|
@@ -259,7 +259,7 @@ function $e(e) {
|
|
|
259
259
|
r && (v.context = r);
|
|
260
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
|
-
var E = b || te(t, l) || l.transEmptyNodeValue || c,
|
|
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), {}, {
|
|
264
264
|
prefix: "#$?",
|
|
265
265
|
suffix: "?$#"
|
|
@@ -269,22 +269,22 @@ function $e(e) {
|
|
|
269
269
|
}, d), m), {}, {
|
|
270
270
|
defaultValue: E,
|
|
271
271
|
ns: n
|
|
272
|
-
}), V = N ? I(N, T) : E, P =
|
|
272
|
+
}), V = N ? I(N, T) : E, P = Ye(x || t, V, i, l, T, S), _ = o !== void 0 ? o : l.defaultTransParent;
|
|
273
273
|
return _ ? R(_, D, P) : P;
|
|
274
274
|
}
|
|
275
|
-
const We = "email-mistype-suggestion",
|
|
275
|
+
const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */ z(void 0);
|
|
276
276
|
function Je() {
|
|
277
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;
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__PURE__ */ u.createElement(ae.Provider, {
|
|
283
283
|
value: {
|
|
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,
|
|
@@ -302,7 +302,7 @@ const Xe = ({ 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": Xe,
|
|
306
306
|
"aria-label": c("input.email.mistype-check.fix-aria-label", {
|
|
307
307
|
email: a
|
|
308
308
|
}),
|
|
@@ -449,20 +449,20 @@ const Xe = ({ 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: x, description: O, FieldLayout:
|
|
452
|
+
const { id: t, value: a, onChange: o, disabled: c, readOnly: r, required: g, hasError: v, onBlur: d, onFocus: b, error: x, description: O, FieldLayout: F } = Ee(), { isMistyped: A, suggestedEmail: S, validate: D } = 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, x, O, s), I = () => {
|
|
456
456
|
o(s), y(t);
|
|
457
457
|
}, l = () => {
|
|
458
458
|
D(), d == null || d();
|
|
459
|
-
}, n = C(e, f.Label), E = C(e, f.Input),
|
|
459
|
+
}, n = C(e, f.Label), E = C(e, f.Input), k = C(e, f.Description), N = C(e, f.Error), m = C(e, f.Suggestion);
|
|
460
460
|
return /* @__PURE__ */ u.createElement(Se.Provider, {
|
|
461
461
|
value: i
|
|
462
|
-
}, /* @__PURE__ */ u.createElement(
|
|
462
|
+
}, /* @__PURE__ */ u.createElement(Qe, {
|
|
463
463
|
activeSuggestion: s,
|
|
464
464
|
applySuggestion: I
|
|
465
|
-
}, /* @__PURE__ */ u.createElement(
|
|
465
|
+
}, /* @__PURE__ */ u.createElement(F, {
|
|
466
466
|
fieldId: t,
|
|
467
467
|
renderLabel: () => n,
|
|
468
468
|
renderInput: () => /* @__PURE__ */ u.createElement(pe, {
|
|
@@ -478,14 +478,14 @@ const Xe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
478
478
|
onBlur: l,
|
|
479
479
|
onFocus: b
|
|
480
480
|
}, E),
|
|
481
|
-
renderDescription: () => /* @__PURE__ */ u.createElement(u.Fragment, null, N, m,
|
|
481
|
+
renderDescription: () => /* @__PURE__ */ u.createElement(u.Fragment, null, N, m, k)
|
|
482
482
|
})));
|
|
483
483
|
};
|
|
484
484
|
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, {
|