@wix/form-elements 1.135.0 → 1.137.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-DETLNlLb.js +1010 -0
- package/dist/component/{bookings-address-rac-BK-sU26E.js → bookings-address-rac-ZLK-g-4b.js} +1 -1
- package/dist/component/{bookings-email-rac-DZ3HVkyn.js → bookings-email-rac-C-406Pj1.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Ci4PHqOr.js → bookings-first-name-rac-ClxJPAU2.js} +1 -1
- package/dist/component/{bookings-header-rac-C_MYNrDA.js → bookings-header-rac-B_xKyowA.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CdNlwyjm.js → bookings-last-name-rac-DcExtGsO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CP2JcaVr.js → bookings-login-bar-rac-B5Gpk-kG.js} +6 -6
- package/dist/component/{bookings-phone-rac-BV8sqxil.js → bookings-phone-rac-DJSSDoRL.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DQtcYRsh.js → bookings-rich-text-rac-D-v6z1Fs.js} +1 -1
- package/dist/component/{checkbox-field-rac-DPNqHTNc.js → checkbox-field-rac-DJmjpsmU.js} +121 -121
- package/dist/component/{checkbox-group-field-headless-DhhynlgN.js → checkbox-group-field-headless-C4A_Kv1U.js} +19 -19
- package/dist/component/{checkbox-group-field-rac-B3zOW7qr.js → checkbox-group-field-rac-M1l5h3ii.js} +4 -4
- package/dist/component/{checkbox-group-rac-Qy03hO31.js → checkbox-group-rac-DRdzHVfR.js} +1 -1
- package/dist/component/{checkbox-rac-DYr3RaHj.js → checkbox-rac-Cyhg2Wvd.js} +1 -1
- package/dist/component/{contacts-address-rac-Bi-etpfX.js → contacts-address-rac-BQvrTPCI.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-D2LLjX9P.js → contacts-birthdate-rac-DIMg-UlR.js} +1 -1
- package/dist/component/{contacts-company-rac-C9ImoG_i.js → contacts-company-rac-OgWSVsmZ.js} +1 -1
- package/dist/component/{contacts-email-rac-DeGblC9V.js → contacts-email-rac-39IQYxTe.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Xk3m57jK.js → contacts-first-name-rac-CjwVQGS7.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BKE-1IYB.js → contacts-last-name-rac-C6ftvjMG.js} +1 -1
- package/dist/component/{contacts-phone-rac-CHmtTutD.js → contacts-phone-rac-ldsxrFQH.js} +1 -1
- package/dist/component/{contacts-position-rac-BS3TySLG.js → contacts-position-rac-3RzQeh2P.js} +1 -1
- package/dist/component/{contacts-subscribe-rac--fpczJiB.js → contacts-subscribe-rac-CfuH705u.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-CHkn8vkL.js → contacts-tax-id-rac-D85Dm5Pa.js} +1 -1
- package/dist/component/{date-availability-70Vb-dlb.js → date-availability-DcYOAszO.js} +1 -1
- package/dist/component/{date-input-field-rac-BlkYEYM_.js → date-input-field-rac-D4cr7NGI.js} +52 -52
- package/dist/component/{date-input-rac-JdNFk07Q.js → date-input-rac-BwJwmoZr.js} +1 -1
- package/dist/component/{date-picker-field-rac-DHu11mY1.js → date-picker-field-rac-C-IM7SHk.js} +5 -5
- package/dist/component/{date-picker-rac-CZtWhFzM.js → date-picker-rac-BkAp8Bgb.js} +1 -1
- package/dist/component/{date-time-input-field-rac-cHAALqS5.js → date-time-input-field-rac-DGCd-WUh.js} +58 -58
- package/dist/component/{date-time-input-rac-Dz7GfoJO.js → date-time-input-rac-ClLzxACj.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-ZNKzyWda.js → dext-checkbox-group-rac-DI26D3eR.js} +4 -4
- package/dist/component/{dext-checkbox-rac-DfPFXrKu.js → dext-checkbox-rac-CRJq1RxN.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BPbl65qK.js → dext-date-picker-rac-CvzQs_Te.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-D5ywbLtW.js → dext-date-time-input-rac-Dtysjtim.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BuVsPZOU.js → dext-dropdown-rac-DHGo26Az.js} +1 -1
- package/dist/component/{dext-email-rac-DRjt3lqT.js → dext-email-rac-BpnNEdVF.js} +1 -1
- package/dist/component/{dext-number-input-rac-Bzrl87fo.js → dext-number-input-rac-C5iW_ei6.js} +1 -1
- package/dist/component/{dext-phone-rac-LibvQb8h.js → dext-phone-rac-KCTWlcaK.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BTWnIvwW.js → dext-radio-group-rac-ad6j8I4s.js} +4 -4
- package/dist/component/{dext-rating-input-rac-DTlnOcC8.js → dext-rating-input-rac-B4AvCMi0.js} +1 -1
- package/dist/component/{dext-tags-rac-YdeijviH.js → dext-tags-rac-BMathc_H.js} +4 -4
- package/dist/component/{dext-text-area-rac-CdCzQYey.js → dext-text-area-rac-Xb-pGhSZ.js} +1 -1
- package/dist/component/{dext-text-input-rac-B28RTezm.js → dext-text-input-rac-CSE8qfGF.js} +1 -1
- package/dist/component/{dext-url-input-rac-B0ZBPbAb.js → dext-url-input-rac-Bq4iz5z9.js} +1 -1
- package/dist/component/donation-rac-DRUbysCr.js +306 -0
- package/dist/component/{dropdown-field-headless-DVZnbZAM.js → dropdown-field-headless-DO592qOP.js} +8 -8
- package/dist/component/{dropdown-field-rac-DWCj_Grt.js → dropdown-field-rac-C2yjQI-C.js} +7 -7
- package/dist/component/{dropdown-rac-Bpo-F5sc.js → dropdown-rac-DlrGt2kE.js} +1 -1
- package/dist/component/{ecom-address-rac-vJ0ku_Ld.js → ecom-address-rac-D_StW_li.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DgVReM6c.js → ecom-subscription-checkbox-rac-CrdttyUU.js} +2 -2
- package/dist/component/{email-input-field-rac-BXJGOBg-.js → email-input-field-rac-DqXazwV3.js} +46 -46
- package/dist/component/{events-repeater-rac-CrXE_ppd.js → events-repeater-rac-DDpRs7rY.js} +23 -23
- package/dist/component/{events-rsvp-rac-BGg3P1CQ.js → events-rsvp-rac-BN9axMYX.js} +10 -10
- package/dist/component/{field-error-headless-C3eOy1_l.js → field-error-headless-JU1yiTVE.js} +6 -6
- package/dist/component/{field-label-headless-BMmR_IeF.js → field-label-headless-CD4_8Ros.js} +7 -7
- package/dist/component/{file-upload-rac-Umix6wXx.js → file-upload-rac-CQTx6hEf.js} +50 -50
- package/dist/component/{fixed-payment-rac-CfIJCBjb.js → fixed-payment-rac-B5cRBcxY.js} +12 -12
- package/dist/component/{form-CYPNOMwk.js → form-Mla9_phC.js} +831 -823
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-oxHUTKYV.js → header-field-rac-B_F66ChH.js} +4 -4
- package/dist/component/{header-rac-DTGV923r.js → header-rac-BX6Df8ej.js} +1 -1
- package/dist/component/{image-choice-rac-B9JGl_h7.js → image-choice-rac-Ce01EhFJ.js} +32 -32
- package/dist/component/{index-C_ktc-yO.js → index-Ch7II1GU.js} +5 -5
- package/dist/component/{index-BOKSOnDK.js → index-DoIW9Cb6.js} +107 -107
- package/dist/component/{isObjectLike-Di8V7txC.js → isObjectLike-C1TnJWn6.js} +7 -7
- package/dist/component/{multiline-address-field-rac-zgmTbXlg.js → multiline-address-field-rac-DVDEcHtq.js} +115 -115
- package/dist/component/{multiline-address-rac-Cyb3dvBf.js → multiline-address-rac-BJ8ln_G5.js} +1 -1
- package/dist/component/{number-input-field-rac-DquqqRy_.js → number-input-field-rac-DTfx9YgL.js} +24 -24
- package/dist/component/{number-input-rac-G2DdTbk2.js → number-input-rac-pg7cmYpS.js} +1 -1
- package/dist/component/{password-rac-DJCU0F38.js → password-rac-D8BKTB_H.js} +50 -50
- package/dist/component/{payment-input-rac-DlIYza6N.js → payment-input-rac-HBquclKy.js} +38 -38
- package/dist/component/{phone-input-field-rac-B10TInMa.js → phone-input-field-rac-Fgfg5HwA.js} +56 -56
- package/dist/component/{phone-rac-BuyttJpM.js → phone-rac-pivMTIyc.js} +1 -1
- package/dist/component/{product-list-rac-WrSJwQ_g.js → product-list-rac-DauIxK2R.js} +61 -61
- package/dist/component/{quiz-radio-group-rac-CHxZ_pK_.js → quiz-radio-group-rac-B0OtjxKf.js} +1 -1
- package/dist/component/{radio-button-module-classes-DjJU-8ZB.js → radio-button-module-classes-Cu3KM625.js} +3 -3
- package/dist/component/{radio-group-field-rac-BImiqcKa.js → radio-group-field-rac-0dJHtf3G.js} +10 -10
- package/dist/component/{radio-group-rac-CDkJeGpN.js → radio-group-rac-CqtO1JqM.js} +1 -1
- package/dist/component/{rating-input-field-rac-Dsr_S5qN.js → rating-input-field-rac-CMny6OSF.js} +28 -28
- package/dist/component/{rating-input-rac-BJUW8U93.js → rating-input-rac-DA4iU_-m.js} +1 -1
- package/dist/component/{rich-content-rac.module-BfQJqA-x.js → rich-content-rac.module-CZX0cZst.js} +3 -3
- package/dist/component/{rich-text-field-rac-DIuZbu_u.js → rich-text-field-rac-Dtm6xFcj.js} +7 -7
- package/dist/component/{rich-text-rac-C39fpEiP.js → rich-text-rac-ClqIW5ds.js} +1 -1
- package/dist/component/service-dropdown-rac-_4T1OZGq.js +146 -0
- package/dist/component/{services-multi-choice-rac-GVb4qA7g.js → services-multi-choice-rac-BVim-jnM.js} +7 -7
- package/dist/component/{signature-rac-nC5pr6nB.js → signature-rac-D7w8WTLO.js} +73 -73
- package/dist/component/{submit-button-rac-eUjgrx9Q.js → submit-button-rac-BkUDj1dU.js} +12 -12
- package/dist/component/{tags-field-rac-zv30chSd.js → tags-field-rac-Di1aK4E2.js} +27 -27
- package/dist/component/{tags-rac-PnS2SxVP.js → tags-rac-CJ5f4Doi.js} +1 -1
- package/dist/component/{text-area-field-rac-DLeOMD4g.js → text-area-field-rac-DFjrT9fs.js} +16 -16
- package/dist/component/{text-area-rac-jZ_mh45C.js → text-area-rac-DBANidv_.js} +1 -1
- package/dist/component/{text-input-field-rac-DifV7Erd.js → text-input-field-rac-DJDzqR6d.js} +5 -5
- package/dist/component/{text-input-headless-DhVEjorY.js → text-input-headless-CG4wbxMG.js} +6 -6
- package/dist/component/{text-input-rac-Ce4qKN9M.js → text-input-rac-V0tK1Gj2.js} +1 -1
- package/dist/component/{time-input-rac-1kW3aDIo.js → time-input-rac-LSoyg8Ao.js} +46 -46
- package/dist/component/{url-input-field-rac-D9xXAQCq.js → url-input-field-rac-DI0SdDI0.js} +23 -23
- package/dist/component/{url-input-rac-SaAybDdN.js → url-input-rac-obx2Uf2F.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-C_MO_0JS.js → use-dropdown-option-class-name-BM-NiVtO.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-D7EMiD-M.js → use-dropdown-trigger-class-name-BHwQ-wZa.js} +4 -4
- package/dist/component/{use-element-state-class-name-DZFi3Z42.js → use-element-state-class-name-DAYz5X_i.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-JAZ1mif0.js → use-hoverable-input-class-name-DZ-4NGpv.js} +2 -2
- package/dist/component/{use-service-options-base-ZX4iaxzr.js → use-service-options-base-BOjt2sg9.js} +4 -4
- package/dist/component/use-text-input-class-name-Bqj4OoIw.js +6 -0
- package/package.json +2 -2
- package/dist/component/appointment-rac-CYCddSl9.js +0 -1010
- package/dist/component/donation-rac-_0cwsIAq.js +0 -314
- package/dist/component/service-dropdown-rac-Bc9hEpx3.js +0 -146
- package/dist/component/use-text-input-class-name-XFjQX8q1.js +0 -6
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import n, { useMemo as q, useCallback as S, useRef as te } from "react";
|
|
2
|
+
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
3
|
+
import L from "classnames";
|
|
4
|
+
import { ToggleButtonGroup as oe, TextField as re, Group as se, ToggleButton as ae, Input as le } from "react-aria-components";
|
|
5
|
+
import { debounce as ce } from "ts-debounce";
|
|
6
|
+
import { az as j, bj as T, bg as P, bt as ie, bb as x, bl as ue, M as me, Y as pe, v as de, G as Ie, u as Ce, w as Ee } from "./form-Mla9_phC.js";
|
|
7
|
+
import { f as O, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { a as z } from "./format-currency-BwShJ9vM.js";
|
|
9
|
+
import { D as fe, E as Oe } from "./field-error-headless-JU1yiTVE.js";
|
|
10
|
+
import { L as be } from "./field-label-headless-CD4_8Ros.js";
|
|
11
|
+
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
+
import { a as _e, b as he } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
|
+
import { g as Ne } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
|
+
import { u as ge } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
|
+
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
+
import { s as v } from "./field-rac.module-DfEb7pBp.js";
|
|
17
|
+
import { o as De } from "./options-rac.module-_THNq6Qq.js";
|
|
18
|
+
import { u as Se } from "./use-element-state-class-name-DAYz5X_i.js";
|
|
19
|
+
import { u as Le } from "./use-text-input-class-name-Bqj4OoIw.js";
|
|
20
|
+
function ve(e, t) {
|
|
21
|
+
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
22
|
+
}
|
|
23
|
+
function Re(e) {
|
|
24
|
+
return ve(e, "id");
|
|
25
|
+
}
|
|
26
|
+
const Ae = 0.01;
|
|
27
|
+
function Te(e) {
|
|
28
|
+
var t;
|
|
29
|
+
return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
|
|
30
|
+
}
|
|
31
|
+
function w(e, t) {
|
|
32
|
+
const o = Number(t || "0");
|
|
33
|
+
return {
|
|
34
|
+
productId: e.id,
|
|
35
|
+
price: e.priceType === j.DYNAMIC_PRICE ? o : String(o),
|
|
36
|
+
quantity: 1
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function Pe(e) {
|
|
40
|
+
return e.find((t) => t.priceType === j.DYNAMIC_PRICE);
|
|
41
|
+
}
|
|
42
|
+
function Me(e, t) {
|
|
43
|
+
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
44
|
+
}
|
|
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 } = T(), { inputId: c, labelId: d, ariaDescribedBy: y } = P(), { t: m } = ie(), { currency: g, regionalFormat: _ } = x(), b = o == null ? void 0 : o[0], D = q(() => {
|
|
47
|
+
var I, h;
|
|
48
|
+
return ((h = (I = u == null ? void 0 : u.predefined) == null ? void 0 : I.paymentOptions) == null ? void 0 : h.products) || [];
|
|
49
|
+
}, [
|
|
50
|
+
u
|
|
51
|
+
]), M = q(() => Re(D), [
|
|
52
|
+
D
|
|
53
|
+
]), a = q(() => E ? Pe(D) : void 0, [
|
|
54
|
+
D,
|
|
55
|
+
E
|
|
56
|
+
]), K = Me(b, a), [V, B] = ge({
|
|
57
|
+
sourceValue: K,
|
|
58
|
+
format: (I) => he(String(I ?? ""), _),
|
|
59
|
+
regionalFormat: _
|
|
60
|
+
}), H = S((I) => {
|
|
61
|
+
const h = I === void 0 ? void 0 : M[I];
|
|
62
|
+
r(h ? [
|
|
63
|
+
w(h, Te(h))
|
|
64
|
+
] : []), B("");
|
|
65
|
+
}, [
|
|
66
|
+
r,
|
|
67
|
+
M,
|
|
68
|
+
B
|
|
69
|
+
]), k = S((I) => {
|
|
70
|
+
a && r(typeof I == "number" ? [
|
|
71
|
+
w(a, String(I))
|
|
72
|
+
] : []);
|
|
73
|
+
}, [
|
|
74
|
+
r,
|
|
75
|
+
a
|
|
76
|
+
]), G = q(() => ce(k, 500), [
|
|
77
|
+
k
|
|
78
|
+
]), Q = S((I) => {
|
|
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, Ae, V, _);
|
|
81
|
+
B(h), G(ee);
|
|
82
|
+
}, [
|
|
83
|
+
_,
|
|
84
|
+
r,
|
|
85
|
+
b,
|
|
86
|
+
a,
|
|
87
|
+
V,
|
|
88
|
+
G,
|
|
89
|
+
B
|
|
90
|
+
]), U = (b == null ? void 0 : b.productId) || null, W = S(() => {
|
|
91
|
+
a != null && a.id && U !== a.id && H(a.id);
|
|
92
|
+
}, [
|
|
93
|
+
a == null ? void 0 : a.id,
|
|
94
|
+
U,
|
|
95
|
+
H
|
|
96
|
+
]), J = O(e, s.Label), Y = O(e, s.Control), X = O(e, s.Description), Z = O(e, s.Error);
|
|
97
|
+
return /* @__PURE__ */ n.createElement(f, {
|
|
98
|
+
fieldId: t,
|
|
99
|
+
renderLabel: () => J,
|
|
100
|
+
renderInput: () => /* @__PURE__ */ n.createElement(ye, {
|
|
101
|
+
id: c,
|
|
102
|
+
ariaLabelledBy: d,
|
|
103
|
+
ariaDescribedBy: y,
|
|
104
|
+
required: l,
|
|
105
|
+
onBlur: i,
|
|
106
|
+
onFocus: C
|
|
107
|
+
}, Y ? F(Y, {
|
|
108
|
+
productsById: M,
|
|
109
|
+
selectedValue: U,
|
|
110
|
+
onSelectProduct: H,
|
|
111
|
+
addOther: E,
|
|
112
|
+
customAmount: V,
|
|
113
|
+
onCustomAmountInputChange: Q,
|
|
114
|
+
currency: g,
|
|
115
|
+
t: m,
|
|
116
|
+
placeholder: p === void 0 ? m("donation.other-option.placeholder") : p,
|
|
117
|
+
customAmountProductId: a == null ? void 0 : a.id,
|
|
118
|
+
onFocusCustomInput: W
|
|
119
|
+
}) : null),
|
|
120
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, Z, X)
|
|
121
|
+
});
|
|
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
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
125
|
+
className: t,
|
|
126
|
+
"data-invalid": m
|
|
127
|
+
}, g ? F(g, {
|
|
128
|
+
productsById: r,
|
|
129
|
+
selectedValue: l,
|
|
130
|
+
onSelectProduct: i
|
|
131
|
+
}) : null, _ && C ? F(_, {
|
|
132
|
+
customAmount: u,
|
|
133
|
+
onCustomAmountInputChange: E,
|
|
134
|
+
currency: p,
|
|
135
|
+
t: f,
|
|
136
|
+
placeholder: c,
|
|
137
|
+
customAmountProductId: d,
|
|
138
|
+
onFocusCustomInput: y
|
|
139
|
+
}) : null);
|
|
140
|
+
}, $ = ({ children: e, className: t, ...o }) => {
|
|
141
|
+
const { productsById: r, selectedValue: l, onSelectProduct: i } = o, { options: C, numberOfColumns: u, disabled: E } = T(), { labelId: p } = P(), f = O(e, $.Option);
|
|
142
|
+
return /* @__PURE__ */ n.createElement(oe, {
|
|
143
|
+
className: t,
|
|
144
|
+
"data-columns": u,
|
|
145
|
+
"aria-labelledby": p,
|
|
146
|
+
selectionMode: "single",
|
|
147
|
+
selectedKeys: l ? [
|
|
148
|
+
l
|
|
149
|
+
] : [],
|
|
150
|
+
onSelectionChange: (c) => i([
|
|
151
|
+
...c
|
|
152
|
+
][0]),
|
|
153
|
+
isDisabled: E
|
|
154
|
+
}, C.map((c) => {
|
|
155
|
+
var m;
|
|
156
|
+
const d = r[c.value], y = (m = d == null ? void 0 : d.fixedPriceOptions) == null ? void 0 : m.price;
|
|
157
|
+
return F(f, {
|
|
158
|
+
key: c.value,
|
|
159
|
+
value: c.value,
|
|
160
|
+
price: y || "0"
|
|
161
|
+
});
|
|
162
|
+
}));
|
|
163
|
+
}, R = ({ children: e, className: t, ...o }) => {
|
|
164
|
+
const { value: r, price: l } = o, { id: i, hasError: C } = T(), { currency: u, regionalFormat: E } = x(), p = O(e, R.Value), f = O(e, R.Currency), { isCurrencyPrefixed: c } = z({
|
|
165
|
+
amount: l,
|
|
166
|
+
currency: u == null ? void 0 : u.code,
|
|
167
|
+
locale: E
|
|
168
|
+
}), d = te(null);
|
|
169
|
+
ue(() => {
|
|
170
|
+
var m;
|
|
171
|
+
(m = d.current) == null || m.focus();
|
|
172
|
+
}, i);
|
|
173
|
+
const y = p ? F(p, {
|
|
174
|
+
price: l
|
|
175
|
+
}) : null;
|
|
176
|
+
return /* @__PURE__ */ n.createElement(ae, {
|
|
177
|
+
id: r,
|
|
178
|
+
className: t,
|
|
179
|
+
ref: d,
|
|
180
|
+
"data-invalid": C || void 0
|
|
181
|
+
}, /* @__PURE__ */ n.createElement(n.Fragment, null, c && f, y, !c && f));
|
|
182
|
+
}, qe = ({ className: e, ...t }) => {
|
|
183
|
+
const { price: o } = t, { currency: r, regionalFormat: l } = x(), { value: i } = z({
|
|
184
|
+
amount: o,
|
|
185
|
+
currency: r == null ? void 0 : r.code,
|
|
186
|
+
locale: l
|
|
187
|
+
});
|
|
188
|
+
return /* @__PURE__ */ n.createElement("span", {
|
|
189
|
+
className: e
|
|
190
|
+
}, i);
|
|
191
|
+
}, xe = ({ className: e }) => {
|
|
192
|
+
const { currency: t } = x();
|
|
193
|
+
return /* @__PURE__ */ n.createElement("span", {
|
|
194
|
+
className: e
|
|
195
|
+
}, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
|
|
196
|
+
};
|
|
197
|
+
R.Value = qe;
|
|
198
|
+
R.Currency = xe;
|
|
199
|
+
const A = ({ children: e, className: t, ...o }) => {
|
|
200
|
+
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), g = O(e, A.Value), _ = S((D) => {
|
|
201
|
+
l({
|
|
202
|
+
target: {
|
|
203
|
+
value: D
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}, [
|
|
207
|
+
l
|
|
208
|
+
]), b = S(() => {
|
|
209
|
+
p();
|
|
210
|
+
}, [
|
|
211
|
+
p
|
|
212
|
+
]);
|
|
213
|
+
return /* @__PURE__ */ n.createElement(re, {
|
|
214
|
+
"aria-labelledby": `${d} ${y}`,
|
|
215
|
+
value: r,
|
|
216
|
+
onChange: _,
|
|
217
|
+
onFocus: b,
|
|
218
|
+
isDisabled: f,
|
|
219
|
+
isInvalid: c
|
|
220
|
+
}, /* @__PURE__ */ n.createElement(se, {
|
|
221
|
+
className: t,
|
|
222
|
+
isDisabled: f,
|
|
223
|
+
isInvalid: c
|
|
224
|
+
}, r && i && m ? F(m, {
|
|
225
|
+
currency: i,
|
|
226
|
+
t: C
|
|
227
|
+
}) : null, g ? F(g, {
|
|
228
|
+
placeholder: u,
|
|
229
|
+
customAmountProductId: E
|
|
230
|
+
}) : null));
|
|
231
|
+
}, Ve = ({ className: e, ...t }) => {
|
|
232
|
+
const { currency: o, t: r } = t, { prefixId: l } = P();
|
|
233
|
+
return /* @__PURE__ */ n.createElement("span", {
|
|
234
|
+
id: l,
|
|
235
|
+
"aria-hidden": !1,
|
|
236
|
+
"aria-label": Ne(r, o),
|
|
237
|
+
className: e
|
|
238
|
+
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
239
|
+
}, He = ({ className: e, ...t }) => {
|
|
240
|
+
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: l, labelId: i, prefixId: C } = P();
|
|
241
|
+
return /* @__PURE__ */ n.createElement(le, {
|
|
242
|
+
id: r,
|
|
243
|
+
"aria-labelledby": `${i} ${C}`,
|
|
244
|
+
"aria-describedby": l,
|
|
245
|
+
placeholder: o,
|
|
246
|
+
inputMode: "decimal",
|
|
247
|
+
autoComplete: "off",
|
|
248
|
+
className: e
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
A.Currency = Ve;
|
|
252
|
+
A.Value = He;
|
|
253
|
+
$.Option = R;
|
|
254
|
+
s.Label = be;
|
|
255
|
+
s.Control = Be;
|
|
256
|
+
s.Options = $;
|
|
257
|
+
s.OtherInput = A;
|
|
258
|
+
s.Description = fe;
|
|
259
|
+
s.Error = Oe;
|
|
260
|
+
const Ue = "_control_n5tqu_1", $e = "_option_n5tqu_7", ke = "_optionHover_n5tqu_37", Ge = "_optionSelected_n5tqu_37", Ye = "_optionCurrency_n5tqu_87", we = "_otherInput_n5tqu_91", je = "_otherInputCurrency_n5tqu_110", N = {
|
|
261
|
+
control: Ue,
|
|
262
|
+
option: $e,
|
|
263
|
+
optionHover: ke,
|
|
264
|
+
optionSelected: Ge,
|
|
265
|
+
optionCurrency: Ye,
|
|
266
|
+
otherInput: we,
|
|
267
|
+
otherInputCurrency: je
|
|
268
|
+
}, ze = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(ne, {
|
|
269
|
+
content: e,
|
|
270
|
+
locale: t
|
|
271
|
+
}), Ke = {
|
|
272
|
+
base: N.option,
|
|
273
|
+
selected: N.optionSelected,
|
|
274
|
+
hover: N.optionHover
|
|
275
|
+
}, Qe = () => {
|
|
276
|
+
const e = Le(N.otherInput), t = Se({
|
|
277
|
+
globalClasses: Ee,
|
|
278
|
+
moduleClasses: Ke
|
|
279
|
+
});
|
|
280
|
+
return /* @__PURE__ */ n.createElement(s, null, /* @__PURE__ */ n.createElement(s.Label, {
|
|
281
|
+
className: L(me, v.label)
|
|
282
|
+
}, /* @__PURE__ */ n.createElement(s.Label.Required, {
|
|
283
|
+
className: L(pe, v.requiredMark)
|
|
284
|
+
})), /* @__PURE__ */ n.createElement(s.Control, {
|
|
285
|
+
className: N.control
|
|
286
|
+
}, /* @__PURE__ */ n.createElement(s.Options, {
|
|
287
|
+
className: L(de, De.options, N.options)
|
|
288
|
+
}, /* @__PURE__ */ n.createElement(s.Options.Option, {
|
|
289
|
+
className: t
|
|
290
|
+
}, /* @__PURE__ */ n.createElement(s.Options.Option.Value, null), /* @__PURE__ */ n.createElement(s.Options.Option.Currency, {
|
|
291
|
+
className: N.optionCurrency
|
|
292
|
+
}))), /* @__PURE__ */ n.createElement(s.OtherInput, {
|
|
293
|
+
className: e
|
|
294
|
+
}, /* @__PURE__ */ n.createElement(s.OtherInput.Currency, {
|
|
295
|
+
className: N.otherInputCurrency
|
|
296
|
+
}), /* @__PURE__ */ n.createElement(s.OtherInput.Value, {
|
|
297
|
+
className: v.innerInput
|
|
298
|
+
}))), /* @__PURE__ */ n.createElement(s.Error, {
|
|
299
|
+
className: L(Ie, v.error)
|
|
300
|
+
}, /* @__PURE__ */ n.createElement(Fe, null), /* @__PURE__ */ n.createElement(s.Error.Text, null)), /* @__PURE__ */ n.createElement(s.Description, {
|
|
301
|
+
className: L(Ce, v.description)
|
|
302
|
+
}, ze));
|
|
303
|
+
}, Ct = () => /* @__PURE__ */ n.createElement(Qe, null);
|
|
304
|
+
export {
|
|
305
|
+
Ct as DonationRAC
|
|
306
|
+
};
|
package/dist/component/{dropdown-field-headless-DVZnbZAM.js → dropdown-field-headless-DO592qOP.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import e, { useState as b, useCallback as g, useRef as k } from "react";
|
|
2
2
|
import { UNSAFE_PortalProvider as q } from "react-aria";
|
|
3
3
|
import { Select as M, SelectValue as j, ListBoxItem as H } from "react-aria-components";
|
|
4
|
-
import {
|
|
4
|
+
import { bj as E, bg as O, bl as U } from "./form-Mla9_phC.js";
|
|
5
5
|
import { f as d, a as F } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as Y, E as z } from "./field-error-headless-
|
|
7
|
-
import { L as G } from "./field-label-headless-
|
|
6
|
+
import { D as Y, E as z } from "./field-error-headless-JU1yiTVE.js";
|
|
7
|
+
import { L as G } from "./field-label-headless-CD4_8Ros.js";
|
|
8
8
|
import { E as J, S as K, N as Q } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
-
import { a as W } from "./use-dropdown-trigger-class-name-
|
|
10
|
-
import { V as X } from "./use-dropdown-option-class-name-
|
|
9
|
+
import { a as W } from "./use-dropdown-trigger-class-name-BHwQ-wZa.js";
|
|
10
|
+
import { V as X } from "./use-dropdown-option-class-name-BM-NiVtO.js";
|
|
11
11
|
const r = ({ children: n }) => {
|
|
12
|
-
const { id: l, value: a, defaultValue: o, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: L, onFocus: y, FieldLayout: C, hasError: D } = E(), [
|
|
12
|
+
const { id: l, value: a, defaultValue: o, options: u = [], readOnly: s, onChange: t, placeholder: m, disabled: i, required: v, onBlur: L, onFocus: y, FieldLayout: C, hasError: D } = E(), [I, h] = b(!1), p = W(l), [P, S] = b(null), T = a && u.some((c) => (c.value ?? c.label) === a) ? a : o || null, { labelId: B } = O(), N = g((c) => {
|
|
13
13
|
s || t(typeof c == "string" ? c : null);
|
|
14
14
|
}, [
|
|
15
15
|
t,
|
|
16
16
|
s
|
|
17
|
-
]), V = g((c) =>
|
|
17
|
+
]), V = g((c) => h(c && !i && !s), [
|
|
18
18
|
i,
|
|
19
19
|
s
|
|
20
20
|
]), R = d(n, r.Label), x = d(n, r.Trigger), w = d(n, r.Options), A = d(n, r.Description), _ = d(n, r.Error);
|
|
@@ -31,7 +31,7 @@ const r = ({ children: n }) => {
|
|
|
31
31
|
}, /* @__PURE__ */ e.createElement(M, {
|
|
32
32
|
"aria-labelledby": B,
|
|
33
33
|
value: T,
|
|
34
|
-
isOpen: p ||
|
|
34
|
+
isOpen: p || I && !i && !s,
|
|
35
35
|
onOpenChange: p ? void 0 : V,
|
|
36
36
|
onChange: N,
|
|
37
37
|
isDisabled: i,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { D as r } from "./dropdown-field-headless-
|
|
4
|
+
import { D as r } from "./dropdown-field-headless-DO592qOP.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
8
|
import { s as o } from "./field-rac.module-DfEb7pBp.js";
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
9
|
+
import { M as i, Y as p, O as E, G as _, u as D } from "./form-Mla9_phC.js";
|
|
10
|
+
import { u as O } from "./use-dropdown-option-class-name-BM-NiVtO.js";
|
|
11
|
+
import { u as C } from "./use-dropdown-trigger-class-name-BHwQ-wZa.js";
|
|
12
12
|
const R = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
13
13
|
content: t,
|
|
14
14
|
locale: s
|
|
15
|
-
}),
|
|
16
|
-
const t =
|
|
15
|
+
}), M = () => {
|
|
16
|
+
const t = C(o.dropdownTrigger), s = O(c);
|
|
17
17
|
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
18
18
|
className: a(i, o.label)
|
|
19
19
|
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
@@ -33,5 +33,5 @@ const R = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
33
33
|
}, R));
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
M as D
|
|
37
37
|
};
|
|
@@ -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 { bj as a, bt as c, al as i } from "./form-Mla9_phC.js";
|
|
3
|
+
import { C as l } from "./checkbox-field-rac-DJmjpsmU.js";
|
|
4
4
|
const p = (e) => ({
|
|
5
5
|
nodes: [
|
|
6
6
|
{
|
package/dist/component/{email-input-field-rac-BXJGOBg-.js → email-input-field-rac-DqXazwV3.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { RicosViewer as ie } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import u, { createContext as z, useContext as Z, createElement as R, isValidElement as
|
|
2
|
+
import D from "classnames";
|
|
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 { bg as fe, bt as ge, be as ve, d as ye, bj as Ee, bn as de, bh as be, aj as Se, M as Oe, Y as he, G as Ie, u as Ne, a5 as Ae } from "./form-Mla9_phC.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
9
|
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
|
-
import
|
|
13
|
-
import { T as
|
|
14
|
-
import { E as
|
|
12
|
+
import je from "@babel/runtime/helpers/createClass";
|
|
13
|
+
import { T as U } from "./text-input-headless-CG4wbxMG.js";
|
|
14
|
+
import { E as xe } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { s as H } from "./field-rac.module-DfEb7pBp.js";
|
|
16
|
-
import { u as
|
|
16
|
+
import { u as De } from "./use-text-input-class-name-Bqj4OoIw.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
|
"&": "&",
|
|
@@ -56,7 +56,7 @@ function Re() {
|
|
|
56
56
|
function e() {
|
|
57
57
|
Te(this, e), this.usedNamespaces = {};
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return je(e, [{
|
|
60
60
|
key: "addUsedNamespaces",
|
|
61
61
|
value: function(a) {
|
|
62
62
|
var o = this;
|
|
@@ -82,12 +82,12 @@ function K() {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
var J = {};
|
|
85
|
-
function
|
|
85
|
+
function Be() {
|
|
86
86
|
for (var e = arguments.length, t = new Array(e), a = 0; a < e; a++)
|
|
87
87
|
t[a] = arguments[a];
|
|
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
|
-
var
|
|
90
|
+
var Ue = ["format"], Ve = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];
|
|
91
91
|
function Q(e, t) {
|
|
92
92
|
var a = Object.keys(e);
|
|
93
93
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -109,7 +109,7 @@ function p(e) {
|
|
|
109
109
|
}
|
|
110
110
|
return e;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function q(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,15 +117,15 @@ function Y(e, t) {
|
|
|
117
117
|
function G(e) {
|
|
118
118
|
return e ? e.props ? e.props.children : e.children : [];
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Ye(e) {
|
|
121
121
|
return Object.prototype.toString.call(e) !== "[object Array]" ? !1 : e.every(function(t) {
|
|
122
|
-
return
|
|
122
|
+
return B(t);
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
function M(e) {
|
|
126
126
|
return Array.isArray(e) ? e : [e];
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function qe(e, t) {
|
|
129
129
|
var a = p({}, t);
|
|
130
130
|
return a.props = Object.assign(e.props, t.props), a;
|
|
131
131
|
}
|
|
@@ -135,7 +135,7 @@ function te(e, t) {
|
|
|
135
135
|
return o.forEach(function(r, g) {
|
|
136
136
|
if (typeof r == "string")
|
|
137
137
|
a += "".concat(r);
|
|
138
|
-
else if (
|
|
138
|
+
else if (B(r)) {
|
|
139
139
|
var v = Object.keys(r.props).length, d = c.indexOf(r.type) > -1, b = r.props.children;
|
|
140
140
|
if (!b && d && v === 0)
|
|
141
141
|
a += "<".concat(r.type, "/>");
|
|
@@ -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, F = ee(r,
|
|
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, "}}");
|
|
@@ -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" && (q(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 Ye(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 ? qe({
|
|
195
195
|
props: n.attrs
|
|
196
|
-
}, N) : N,
|
|
196
|
+
}, N) : N, j = B(m), V = j && q(n, !0) && !n.voidElement, P = v && L(m) === "object" && m.dummy && !j, _ = 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 Y = a.services.interpolator.interpolate(m, O, a.language);
|
|
199
|
+
l.push(Y);
|
|
200
|
+
} else if (q(m) || V) {
|
|
201
201
|
var ne = F(m, n, s);
|
|
202
202
|
A(m, ne, l, E);
|
|
203
203
|
} else if (P) {
|
|
@@ -226,7 +226,7 @@ function Ge(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 (L(m) === "object" && !
|
|
229
|
+
else if (L(m) === "object" && !j) {
|
|
230
230
|
var $ = n.children[0] ? k : null;
|
|
231
231
|
$ && l.push($);
|
|
232
232
|
} else n.children.length === 1 && k ? l.push(w(m, p(p({}, m.props), {}, {
|
|
@@ -243,18 +243,18 @@ function Ge(e, t, a, o, c, r) {
|
|
|
243
243
|
return l;
|
|
244
244
|
}, []);
|
|
245
245
|
}
|
|
246
|
-
var
|
|
246
|
+
var x = S([{
|
|
247
247
|
dummy: !0,
|
|
248
248
|
children: e || []
|
|
249
249
|
}], T, M(e || []));
|
|
250
|
-
return G(
|
|
250
|
+
return G(x[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,
|
|
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, x = ee(e, Ve), y = Z(He) || {}, h = y.i18n, s = y.defaultNS, i = F || h || Ke();
|
|
254
254
|
if (!i)
|
|
255
|
-
return
|
|
256
|
-
var I = A || i.t.bind(i) || function(
|
|
257
|
-
return
|
|
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(Y) {
|
|
257
|
+
return Y;
|
|
258
258
|
};
|
|
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;
|
|
@@ -264,13 +264,13 @@ function $e(e) {
|
|
|
264
264
|
prefix: "#$?",
|
|
265
265
|
suffix: "?$#"
|
|
266
266
|
})
|
|
267
|
-
},
|
|
267
|
+
}, j = p(p(p(p({}, v), {}, {
|
|
268
268
|
count: a
|
|
269
269
|
}, d), m), {}, {
|
|
270
270
|
defaultValue: E,
|
|
271
271
|
ns: n
|
|
272
|
-
}), V = N ? I(N,
|
|
273
|
-
return _ ? R(_,
|
|
272
|
+
}), V = N ? I(N, j) : E, P = Ge(T || t, V, i, l, j, S), _ = o !== void 0 ? o : l.defaultTransParent;
|
|
273
|
+
return _ ? R(_, x, P) : P;
|
|
274
274
|
}
|
|
275
275
|
const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */ z(void 0);
|
|
276
276
|
function Je() {
|
|
@@ -449,13 +449,13 @@ const Qe = ({ 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: x } = 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
|
+
x(), d == null || d();
|
|
459
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
|
|
@@ -479,10 +479,10 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
479
479
|
renderDescription: () => /* @__PURE__ */ u.createElement(u.Fragment, null, N, m, k)
|
|
480
480
|
})));
|
|
481
481
|
};
|
|
482
|
-
f.Label =
|
|
483
|
-
f.Input =
|
|
484
|
-
f.Description =
|
|
485
|
-
f.Error =
|
|
482
|
+
f.Label = U.Label;
|
|
483
|
+
f.Input = U.Input;
|
|
484
|
+
f.Description = U.Description;
|
|
485
|
+
f.Error = U.Error;
|
|
486
486
|
f.Suggestion = ze;
|
|
487
487
|
const nt = "_suggestion_lysve_1", ot = {
|
|
488
488
|
suggestion: nt
|
|
@@ -490,19 +490,19 @@ const nt = "_suggestion_lysve_1", ot = {
|
|
|
490
490
|
content: e,
|
|
491
491
|
locale: t
|
|
492
492
|
}), ht = () => {
|
|
493
|
-
const e =
|
|
493
|
+
const e = De();
|
|
494
494
|
return /* @__PURE__ */ u.createElement(f, null, /* @__PURE__ */ u.createElement(f.Label, {
|
|
495
|
-
className:
|
|
495
|
+
className: D(Oe, H.label)
|
|
496
496
|
}, /* @__PURE__ */ u.createElement(f.Label.Required, {
|
|
497
|
-
className:
|
|
497
|
+
className: D(he, H.requiredMark)
|
|
498
498
|
})), /* @__PURE__ */ u.createElement(f.Input, {
|
|
499
499
|
className: e
|
|
500
500
|
}), /* @__PURE__ */ u.createElement(f.Error, {
|
|
501
|
-
className:
|
|
502
|
-
}, /* @__PURE__ */ u.createElement(
|
|
503
|
-
className:
|
|
501
|
+
className: D(Ie, H.error)
|
|
502
|
+
}, /* @__PURE__ */ u.createElement(xe, null), /* @__PURE__ */ u.createElement(f.Error.Text, null)), /* @__PURE__ */ u.createElement(f.Description, {
|
|
503
|
+
className: D(Ne, H.description)
|
|
504
504
|
}, rt), /* @__PURE__ */ u.createElement(f.Suggestion, {
|
|
505
|
-
className:
|
|
505
|
+
className: D(Ae, ot.suggestion)
|
|
506
506
|
}));
|
|
507
507
|
};
|
|
508
508
|
export {
|