@wix/form-elements 1.83.0 → 1.85.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-ky2cE6hE.js → appointment-rac-CCaJ6P5r.js} +78 -78
- package/dist/component/{bookings-address-rac-Bxc6H9Pb.js → bookings-address-rac-DEt9SGPG.js} +1 -1
- package/dist/component/{bookings-email-rac-Dw1Xttdx.js → bookings-email-rac-BydOvOUZ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-dgHOrJaJ.js → bookings-first-name-rac-BoQki0Pb.js} +1 -1
- package/dist/component/{bookings-header-rac-Bl9RYGWo.js → bookings-header-rac-DK-EcXrk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BeqYpbZq.js → bookings-last-name-rac-BuGIyd43.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C1k6o0A5.js → bookings-login-bar-rac-Cr500ehb.js} +6 -6
- package/dist/component/{bookings-phone-rac-ByhaJrwE.js → bookings-phone-rac-Bq2zdMxo.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Mw5-ZiIn.js → bookings-rich-text-rac-DRmfusX9.js} +1 -1
- package/dist/component/{checkbox-field-rac-CMEI5t4Y.js → checkbox-field-rac-b9mcZlMP.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-CP21R7_s.js → checkbox-group-field-headless-BSNhdCfs.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DGOZjSIY.js → checkbox-group-field-rac-BObfui8r.js} +6 -6
- package/dist/component/{checkbox-group-rac-CEGtshrl.js → checkbox-group-rac-CBNMgBHU.js} +1 -1
- package/dist/component/{checkbox-rac-DCnRh1WF.js → checkbox-rac-DXh-i6Ot.js} +1 -1
- package/dist/component/{contacts-address-rac-CZb_5N5o.js → contacts-address-rac-BDQLFakc.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DZlwSyp5.js → contacts-birthdate-rac-BUMVVVfb.js} +1 -1
- package/dist/component/{contacts-company-rac-BNEF6LjB.js → contacts-company-rac-CidGcaA3.js} +1 -1
- package/dist/component/{contacts-email-rac-CAgk_zfN.js → contacts-email-rac-GePAhKDQ.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DyTVcmrX.js → contacts-first-name-rac-kw5sIBEE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DrFcDcGr.js → contacts-last-name-rac-DzoZKs1n.js} +1 -1
- package/dist/component/{contacts-phone-rac-UAPALlFx.js → contacts-phone-rac-CxVW4Zp0.js} +1 -1
- package/dist/component/{contacts-position-rac-CJ1M4kJJ.js → contacts-position-rac-CXFxlSty.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-1cEd5s1l.js → contacts-subscribe-rac-kpRGeELB.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-CqnO__fd.js → contacts-tax-id-rac-B5qw-rtP.js} +1 -1
- package/dist/component/{date-availability-COM2EaRy.js → date-availability-BCDMem-_.js} +1 -1
- package/dist/component/{date-input-field-rac-CuuWbw42.js → date-input-field-rac-BLDZ4_Mw.js} +43 -43
- package/dist/component/{date-input-rac-DfVmj9Gc.js → date-input-rac-B1WGYKOp.js} +1 -1
- package/dist/component/{date-picker-field-rac-BFCZik9T.js → date-picker-field-rac-BNd8aZ0c.js} +20 -20
- package/dist/component/{date-picker-rac-C2vajJpb.js → date-picker-rac-ItWxSngw.js} +1 -1
- package/dist/component/date-time-input-field-rac-Ch8z0NRT.js +423 -0
- package/dist/component/{date-time-input-rac-D4FEieQz.js → date-time-input-rac-FebIovNN.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BDBBTNNo.js → dext-checkbox-group-rac-BXYHMQ3R.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DAAhNboR.js → dext-checkbox-rac-C78ScIGY.js} +1 -1
- package/dist/component/{dext-date-picker-rac-me7XbR5z.js → dext-date-picker-rac-BptT4fhe.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DLsUl2Eg.js → dext-date-time-input-rac-RWJ51IjA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3vVIRir.js → dext-dropdown-rac-DZDOtSIG.js} +1 -1
- package/dist/component/{dext-email-rac-a8qXYTLP.js → dext-email-rac-CJceqZsw.js} +1 -1
- package/dist/component/{dext-number-input-rac-DdDnL_fX.js → dext-number-input-rac-buSXk49E.js} +1 -1
- package/dist/component/{dext-phone-rac-ByaxbHpO.js → dext-phone-rac-CeHUOWck.js} +1 -1
- package/dist/component/{dext-radio-group-rac-Bzubt7Uy.js → dext-radio-group-rac-CNyNSfeP.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BZ1EvOkG.js → dext-rating-input-rac-mmdh9tYT.js} +1 -1
- package/dist/component/{dext-tags-rac-C_R89noV.js → dext-tags-rac-CqJ4iv-V.js} +2 -2
- package/dist/component/{dext-text-area-rac-DRpYeQ-K.js → dext-text-area-rac-P1EzLNDE.js} +1 -1
- package/dist/component/{dext-text-input-rac-D_RtbQQ-.js → dext-text-input-rac-Dtz4ZLj7.js} +1 -1
- package/dist/component/{dext-url-input-rac-BSSjSbIo.js → dext-url-input-rac-DUVbW2yl.js} +1 -1
- package/dist/component/{donation-rac-De0KyyGR.js → donation-rac-Nn7z8_to.js} +43 -43
- package/dist/component/{dropdown-field-headless-DNhnTDlD.js → dropdown-field-headless-CT4uSCPR.js} +11 -11
- package/dist/component/{dropdown-field-rac-Bq_FNv9a.js → dropdown-field-rac-CUiyFJi_.js} +5 -5
- package/dist/component/{dropdown-rac-0UIyqF15.js → dropdown-rac-Bs_PVy1q.js} +1 -1
- package/dist/component/{ecom-address-rac-7IVbvs3J.js → ecom-address-rac-BTXwDlMM.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DilgIpiG.js → ecom-subscription-checkbox-rac-CGI84A37.js} +3 -3
- package/dist/component/{email-input-field-rac-CHJ6RSGy.js → email-input-field-rac-DKD7FsQX.js} +54 -54
- package/dist/component/{events-repeater-rac-v18FFLC7.js → events-repeater-rac-B7yIRlyt.js} +30 -30
- package/dist/component/{events-rsvp-rac-BpGLrxsf.js → events-rsvp-rac-C7FOuFmH.js} +3 -3
- package/dist/component/{field-error-headless-DAy-1oAQ.js → field-error-headless-BHTkMu35.js} +1 -1
- package/dist/component/{field-label-headless-BWxHmO0c.js → field-label-headless-D3DwX65k.js} +7 -7
- package/dist/component/{file-upload-rac-BfWN27JT.js → file-upload-rac-B3n_LYYK.js} +85 -85
- package/dist/component/{fixed-payment-rac-Bha61SB4.js → fixed-payment-rac-C6jsiS4-.js} +12 -12
- package/dist/component/{form-D0eeH0lX.js → form-BkmOXzqo.js} +2510 -2487
- package/dist/component/{form-element-classes-Ct1UaxuQ.js → form-element-classes-BsXkFtp2.js} +90 -57
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-uNzfDMbv.js → header-field-rac-FG9EP9--.js} +5 -5
- package/dist/component/{header-rac-B91q4fHl.js → header-rac-DZZgqFjW.js} +1 -1
- package/dist/component/{image-choice-rac-BKcnNGPp.js → image-choice-rac-CXgE6z_f.js} +42 -42
- package/dist/component/{index-BWHymomM.js → index-CSwTHDCX.js} +2 -2
- package/dist/component/{index-BvzLLTKc.js → index-DKV2sNhD.js} +4 -4
- package/dist/component/{isObjectLike-D7Mkqoju.js → isObjectLike-DYfHbEQ3.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Avd9Vlv1.js → multiline-address-field-rac-DnCOKW8F.js} +128 -128
- package/dist/component/{multiline-address-rac-BwQOoejw.js → multiline-address-rac-BZRlzLZq.js} +1 -1
- package/dist/component/{number-input-field-rac-CRqPXDl0.js → number-input-field-rac-BOJNJ50c.js} +30 -30
- package/dist/component/{number-input-rac-0Y8K4e6K.js → number-input-rac-D8ZcIPwq.js} +1 -1
- package/dist/component/{password-rac-C7F6sEB3.js → password-rac-T9PR5j2v.js} +19 -19
- package/dist/component/{payment-input-rac-CTJr4QTK.js → payment-input-rac-C9N3LZOZ.js} +17 -17
- package/dist/component/{phone-input-field-rac-jjSmYCI1.js → phone-input-field-rac-BxUiCV5Z.js} +40 -40
- package/dist/component/{phone-rac-BwSnmgYF.js → phone-rac-BjKFrr86.js} +1 -1
- package/dist/component/{product-list-rac-CTN2wvHE.js → product-list-rac-BG-VK_Hz.js} +41 -41
- package/dist/component/{quiz-radio-group-rac-CZHEDJxr.js → quiz-radio-group-rac-B1x7Yatu.js} +2 -2
- package/dist/component/{radio-button-module-classes-DCz6XS1X.js → radio-button-module-classes-BXWANbga.js} +7 -7
- package/dist/component/{radio-group-field-rac-60MF_9DO.js → radio-group-field-rac-DmEOydAr.js} +4 -4
- package/dist/component/{radio-group-rac-Dqo-Earp.js → radio-group-rac-DAcU_lkj.js} +1 -1
- package/dist/component/{rating-input-field-rac-CzWTwWT8.js → rating-input-field-rac-Cazqeqzw.js} +16 -16
- package/dist/component/{rating-input-rac-Nq4tll2Z.js → rating-input-rac-KJ8FnJTj.js} +1 -1
- package/dist/component/{rich-content-rac.module-sUUSbcSy.js → rich-content-rac.module-PZgMV2M7.js} +1 -1
- package/dist/component/{rich-text-field-rac-BvLfS4I5.js → rich-text-field-rac-DNEeY_m8.js} +3 -3
- package/dist/component/{rich-text-rac-BWkTbWk3.js → rich-text-rac-g9upYD25.js} +1 -1
- package/dist/component/{service-dropdown-rac-DZ3USe7_.js → service-dropdown-rac-CmmWetDa.js} +20 -20
- package/dist/component/{services-multi-choice-rac-D-og7fMo.js → services-multi-choice-rac-D0PJNlq2.js} +7 -7
- package/dist/component/{signature-rac-D3c4fnvN.js → signature-rac-Q4G3uEhw.js} +41 -41
- package/dist/component/submit-button-rac-DdLPGJ6v.js +141 -0
- package/dist/component/{tags-field-rac-DXmZBcpO.js → tags-field-rac-PZ8Vfmsn.js} +72 -72
- package/dist/component/{tags-rac-CoXWx42D.js → tags-rac-DLjeR5G1.js} +1 -1
- package/dist/component/{text-area-field-rac-Cy0Mr29Z.js → text-area-field-rac-BNVK0R0Z.js} +25 -25
- package/dist/component/{text-area-rac-C3Mjmgpa.js → text-area-rac-CNOLe3Vx.js} +1 -1
- package/dist/component/{text-input-field-rac-D1TB9B_M.js → text-input-field-rac-DjdW6TCf.js} +3 -3
- package/dist/component/{text-input-headless-BUa59Rgn.js → text-input-headless-DFWQwZAN.js} +10 -10
- package/dist/component/{text-input-rac-BQ3Z9ws4.js → text-input-rac-GXPtQEjT.js} +1 -1
- package/dist/component/time-input-rac-B_g-erqu.js +159 -0
- package/dist/component/{url-input-field-rac-DINXfZdf.js → url-input-field-rac-CXWYeQLf.js} +19 -19
- package/dist/component/{url-input-rac-Ch9eTIF_.js → url-input-rac-DX-vjyXj.js} +1 -1
- package/dist/component/use-element-state-class-name-lZnP6sE6.js +22 -0
- package/dist/component/{use-service-options-base-BJZhzDyO.js → use-service-options-base-BJE86Rzo.js} +5 -5
- package/dist/component/{use-text-input-class-name-8gMUWeCb.js → use-text-input-class-name-B-GYaltW.js} +5 -5
- package/dist/form.d.ts +58 -2
- package/package.json +5 -3
- package/dist/component/date-time-input-field-rac-B7ne2emo.js +0 -423
- package/dist/component/submit-button-rac-Dn_BGt1n.js +0 -116
- package/dist/component/time-input-rac-Wi0oD5YF.js +0 -155
- package/dist/component/use-element-state-class-name-j8W1zbdG.js +0 -20
|
@@ -3,21 +3,21 @@ import { RicosViewer as re } from "@wix/ricos/viewer";
|
|
|
3
3
|
import D from "classnames";
|
|
4
4
|
import { RadioGroup as se, RadioField as G, RadioButton as Y, TextField as ae, Group as le, Input as ie } from "react-aria-components";
|
|
5
5
|
import { debounce as ce } from "ts-debounce";
|
|
6
|
-
import { P as Q,
|
|
6
|
+
import { P as Q, aj as L, ag as B, at as ue, ab as A, al as me } from "./form-BkmOXzqo.js";
|
|
7
7
|
import { f, a as y } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { a as W } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as pe, E as de } from "./field-error-headless-
|
|
10
|
-
import { L as Ce } from "./field-label-headless-
|
|
9
|
+
import { D as pe, E as de } from "./field-error-headless-BHTkMu35.js";
|
|
10
|
+
import { L as Ce } from "./field-label-headless-D3DwX65k.js";
|
|
11
11
|
import { N as Ie } from "./options-layout-constants-DEfIEJWD.js";
|
|
12
12
|
import { a as Ee, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
|
|
13
13
|
import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
|
|
14
14
|
import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
|
|
15
15
|
import { E as _e } from "./error-icon-hZxQ6DEy.js";
|
|
16
16
|
import { s as S } from "./field-rac.module-D06m9T9x.js";
|
|
17
|
-
import { y as be,
|
|
17
|
+
import { y as be, P as ye, j as Ne, o as ge, i as Fe, k as De } from "./form-element-classes-BsXkFtp2.js";
|
|
18
18
|
import { o as Se } from "./options-rac.module-KM-VT_KY.js";
|
|
19
|
-
import { u as Re } from "./use-element-state-class-name-
|
|
20
|
-
import { u as ve } from "./use-text-input-class-name-
|
|
19
|
+
import { u as Re } from "./use-element-state-class-name-lZnP6sE6.js";
|
|
20
|
+
import { u as ve } from "./use-text-input-class-name-B-GYaltW.js";
|
|
21
21
|
function Le(e, t) {
|
|
22
22
|
return e.reduce((o, r) => (o[r[t]] = r, o), {});
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ function Ae(e) {
|
|
|
25
25
|
return Le(e, "id");
|
|
26
26
|
}
|
|
27
27
|
const je = 0.01;
|
|
28
|
-
function
|
|
28
|
+
function Pe(e) {
|
|
29
29
|
var t;
|
|
30
30
|
return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
|
|
31
31
|
}
|
|
@@ -37,40 +37,40 @@ function z(e, t) {
|
|
|
37
37
|
quantity: 1
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Te(e) {
|
|
41
41
|
return e.find((t) => t.priceType === Q.DYNAMIC_PRICE);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Me(e, t) {
|
|
44
44
|
return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
|
|
45
45
|
}
|
|
46
46
|
function xe(e, t, o) {
|
|
47
47
|
const r = (t == null ? void 0 : t.productId) === e ? void 0 : e, a = r ? o[r] : void 0;
|
|
48
48
|
return a ? [
|
|
49
|
-
z(a,
|
|
49
|
+
z(a, Pe(a))
|
|
50
50
|
] : [];
|
|
51
51
|
}
|
|
52
52
|
const s = ({ children: e }) => {
|
|
53
53
|
const { id: t, value: o, onChange: r, disabled: a, required: m, onBlur: p, onFocus: h, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: C, hasError: O } = L(), { labelId: _ } = B(), { t: I } = ue(), { currency: j, regionalFormat: N } = A(), d = o == null ? void 0 : o[0], g = x(() => {
|
|
54
|
-
var E,
|
|
55
|
-
return ((
|
|
54
|
+
var E, M;
|
|
55
|
+
return ((M = (E = c == null ? void 0 : c.predefined) == null ? void 0 : E.paymentOptions) == null ? void 0 : M.products) || [];
|
|
56
56
|
}, [
|
|
57
57
|
c
|
|
58
|
-
]),
|
|
58
|
+
]), P = x(() => Ae(g), [
|
|
59
59
|
g
|
|
60
|
-
]), l = x(() => u ?
|
|
60
|
+
]), l = x(() => u ? Te(g) : void 0, [
|
|
61
61
|
g,
|
|
62
62
|
u
|
|
63
|
-
]), J =
|
|
63
|
+
]), J = Me(d, l), [q, T] = he({
|
|
64
64
|
sourceValue: J,
|
|
65
65
|
format: (E) => fe(String(E ?? ""), N),
|
|
66
66
|
regionalFormat: N
|
|
67
|
-
}),
|
|
68
|
-
r(xe(E, d,
|
|
67
|
+
}), w = F((E) => {
|
|
68
|
+
r(xe(E, d, P)), T("");
|
|
69
69
|
}, [
|
|
70
70
|
r,
|
|
71
|
-
|
|
71
|
+
P,
|
|
72
72
|
d,
|
|
73
|
-
|
|
73
|
+
T
|
|
74
74
|
]), H = F((E) => {
|
|
75
75
|
l && r(typeof E == "number" ? [
|
|
76
76
|
z(l, String(E))
|
|
@@ -82,39 +82,39 @@ const s = ({ children: e }) => {
|
|
|
82
82
|
H
|
|
83
83
|
]), K = F((E) => {
|
|
84
84
|
(d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
|
|
85
|
-
const { validInput:
|
|
86
|
-
M
|
|
85
|
+
const { validInput: M, validNumber: ne } = Ee(E.target.value, je, q, N);
|
|
86
|
+
T(M), $(ne);
|
|
87
87
|
}, [
|
|
88
88
|
N,
|
|
89
89
|
r,
|
|
90
90
|
d,
|
|
91
91
|
l,
|
|
92
|
-
|
|
92
|
+
q,
|
|
93
93
|
$,
|
|
94
|
-
|
|
95
|
-
]),
|
|
96
|
-
l != null && l.id &&
|
|
94
|
+
T
|
|
95
|
+
]), U = (d == null ? void 0 : d.productId) || null, X = F(() => {
|
|
96
|
+
l != null && l.id && U !== l.id && w(l.id);
|
|
97
97
|
}, [
|
|
98
98
|
l == null ? void 0 : l.id,
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
U,
|
|
100
|
+
w
|
|
101
101
|
]), Z = f(e, s.Label), V = f(e, s.Control), ee = f(e, s.Description), te = f(e, s.Error);
|
|
102
102
|
return /* @__PURE__ */ n.createElement(C, {
|
|
103
103
|
fieldId: t,
|
|
104
104
|
renderLabel: () => Z,
|
|
105
105
|
renderInput: () => /* @__PURE__ */ n.createElement(se, {
|
|
106
106
|
"aria-labelledby": _,
|
|
107
|
-
value:
|
|
108
|
-
onChange:
|
|
107
|
+
value: U,
|
|
108
|
+
onChange: w,
|
|
109
109
|
isDisabled: a,
|
|
110
110
|
isInvalid: O,
|
|
111
111
|
isRequired: m,
|
|
112
112
|
onBlur: p,
|
|
113
113
|
onFocus: h
|
|
114
114
|
}, V ? y(V, {
|
|
115
|
-
productsById:
|
|
115
|
+
productsById: P,
|
|
116
116
|
addOther: u,
|
|
117
|
-
customAmount:
|
|
117
|
+
customAmount: q,
|
|
118
118
|
onCustomAmountInputChange: K,
|
|
119
119
|
currency: j,
|
|
120
120
|
t: I,
|
|
@@ -155,8 +155,8 @@ const s = ({ children: e }) => {
|
|
|
155
155
|
customAmountProductId: i,
|
|
156
156
|
onFocusCustomInput: C
|
|
157
157
|
}) : null);
|
|
158
|
-
},
|
|
159
|
-
const { productsById: r } = o, { options: a, numberOfColumns: m } = L(), { isMobile: p } = A(), h = f(e,
|
|
158
|
+
}, k = ({ children: e, className: t, ...o }) => {
|
|
159
|
+
const { productsById: r } = o, { options: a, numberOfColumns: m } = L(), { isMobile: p } = A(), h = f(e, k.Option), c = p ? Ie.ONE : m;
|
|
160
160
|
return /* @__PURE__ */ n.createElement("div", {
|
|
161
161
|
className: t,
|
|
162
162
|
"data-columns": c
|
|
@@ -188,7 +188,7 @@ const s = ({ children: e }) => {
|
|
|
188
188
|
className: t,
|
|
189
189
|
ref: C
|
|
190
190
|
}, /* @__PURE__ */ n.createElement(n.Fragment, null, i && u, O, !i && u)));
|
|
191
|
-
},
|
|
191
|
+
}, qe = ({ className: e, ...t }) => {
|
|
192
192
|
const { price: o } = t, { currency: r, regionalFormat: a } = A(), { value: m } = W({
|
|
193
193
|
amount: o,
|
|
194
194
|
currency: r == null ? void 0 : r.code,
|
|
@@ -197,14 +197,14 @@ const s = ({ children: e }) => {
|
|
|
197
197
|
return /* @__PURE__ */ n.createElement("span", {
|
|
198
198
|
className: e
|
|
199
199
|
}, m);
|
|
200
|
-
},
|
|
200
|
+
}, we = ({ className: e }) => {
|
|
201
201
|
const { currency: t } = A();
|
|
202
202
|
return /* @__PURE__ */ n.createElement("span", {
|
|
203
203
|
className: e
|
|
204
204
|
}, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
|
|
205
205
|
};
|
|
206
|
-
R.Value =
|
|
207
|
-
R.Currency =
|
|
206
|
+
R.Value = qe;
|
|
207
|
+
R.Currency = we;
|
|
208
208
|
const v = ({ children: e, className: t, ...o }) => {
|
|
209
209
|
const { customAmount: r, onCustomAmountInputChange: a, currency: m, t: p, placeholder: h, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: C } = L(), { labelId: O, prefixId: _ } = B(), I = f(e, v.Currency), j = f(e, v.Value), N = F((g) => {
|
|
210
210
|
a({
|
|
@@ -237,7 +237,7 @@ const v = ({ children: e, className: t, ...o }) => {
|
|
|
237
237
|
placeholder: h,
|
|
238
238
|
customAmountProductId: c
|
|
239
239
|
}) : null));
|
|
240
|
-
},
|
|
240
|
+
}, Ue = ({ className: e, ...t }) => {
|
|
241
241
|
const { currency: o, t: r } = t, { prefixId: a } = B();
|
|
242
242
|
return /* @__PURE__ */ n.createElement("span", {
|
|
243
243
|
id: a,
|
|
@@ -245,7 +245,7 @@ const v = ({ children: e, className: t, ...o }) => {
|
|
|
245
245
|
"aria-label": Oe(r, o),
|
|
246
246
|
className: e
|
|
247
247
|
}, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
|
|
248
|
-
},
|
|
248
|
+
}, ke = ({ className: e, ...t }) => {
|
|
249
249
|
const { placeholder: o, customAmountProductId: r } = t, { ariaDescribedBy: a, labelId: m, prefixId: p } = B();
|
|
250
250
|
return /* @__PURE__ */ n.createElement(ie, {
|
|
251
251
|
id: r,
|
|
@@ -257,12 +257,12 @@ const v = ({ children: e, className: t, ...o }) => {
|
|
|
257
257
|
className: e
|
|
258
258
|
});
|
|
259
259
|
};
|
|
260
|
-
v.Currency =
|
|
261
|
-
v.Value =
|
|
262
|
-
|
|
260
|
+
v.Currency = Ue;
|
|
261
|
+
v.Value = ke;
|
|
262
|
+
k.Option = R;
|
|
263
263
|
s.Label = Ce;
|
|
264
264
|
s.Control = Be;
|
|
265
|
-
s.Options =
|
|
265
|
+
s.Options = k;
|
|
266
266
|
s.OtherInput = v;
|
|
267
267
|
s.Description = pe;
|
|
268
268
|
s.Error = de;
|
package/dist/component/{dropdown-field-headless-DNhnTDlD.js → dropdown-field-headless-CT4uSCPR.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
|
-
import { Select as
|
|
4
|
-
import {
|
|
3
|
+
import { Select as j, SelectValue as w, ListBox as M, ListBoxItem as U } from "react-aria-components";
|
|
4
|
+
import { aj as p, ag as b, al as _ } from "./form-BkmOXzqo.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-BHTkMu35.js";
|
|
7
|
+
import { L as J } from "./field-label-headless-D3DwX65k.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) => {
|
|
@@ -15,7 +15,7 @@ const n = ({ children: t }) => {
|
|
|
15
15
|
]), S = g((c) => L(c && !i && !s), [
|
|
16
16
|
i,
|
|
17
17
|
s
|
|
18
|
-
]), T = d(t, n.Label), x = d(t, n.Trigger), V = d(t, n.Options),
|
|
18
|
+
]), T = d(t, n.Label), x = d(t, n.Trigger), V = d(t, n.Options), R = d(t, n.Description), k = d(t, n.Error);
|
|
19
19
|
return /* @__PURE__ */ e.createElement(F, {
|
|
20
20
|
fieldId: o,
|
|
21
21
|
renderLabel: () => T,
|
|
@@ -26,7 +26,7 @@ const n = ({ children: t }) => {
|
|
|
26
26
|
}
|
|
27
27
|
}), /* @__PURE__ */ e.createElement(A, {
|
|
28
28
|
getContainer: () => h
|
|
29
|
-
}, /* @__PURE__ */ e.createElement(
|
|
29
|
+
}, /* @__PURE__ */ e.createElement(j, {
|
|
30
30
|
"aria-labelledby": N,
|
|
31
31
|
value: B,
|
|
32
32
|
isOpen: D && !i && !s,
|
|
@@ -39,11 +39,11 @@ const n = ({ children: t }) => {
|
|
|
39
39
|
onBlur: O,
|
|
40
40
|
onFocus: y
|
|
41
41
|
}, x, V))),
|
|
42
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
42
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, k, R)
|
|
43
43
|
});
|
|
44
44
|
}, W = ({ children: t, className: o }) => {
|
|
45
45
|
const { inputId: r, ariaDescribedBy: l } = b(), { id: a, hasError: s, isLoading: u } = p(), m = q(null);
|
|
46
|
-
return
|
|
46
|
+
return _(() => {
|
|
47
47
|
var i;
|
|
48
48
|
(i = m.current) == null || i.focus();
|
|
49
49
|
}, a), /* @__PURE__ */ e.createElement(K, {
|
|
@@ -53,21 +53,21 @@ const n = ({ children: t }) => {
|
|
|
53
53
|
className: o,
|
|
54
54
|
"data-invalid": s || void 0,
|
|
55
55
|
"data-loading": u || void 0
|
|
56
|
-
}, /* @__PURE__ */ e.createElement(
|
|
56
|
+
}, /* @__PURE__ */ e.createElement(w, null), t);
|
|
57
57
|
}, f = ({ children: t, className: o }) => {
|
|
58
58
|
const { options: r = [] } = p(), l = d(t, f.Option);
|
|
59
59
|
return /* @__PURE__ */ e.createElement(Q, {
|
|
60
60
|
className: o,
|
|
61
61
|
containerPadding: 0,
|
|
62
62
|
offset: 0
|
|
63
|
-
}, /* @__PURE__ */ e.createElement(
|
|
63
|
+
}, /* @__PURE__ */ e.createElement(M, null, r.map((a) => z(l, {
|
|
64
64
|
key: a.value ?? a.label,
|
|
65
65
|
value: a.value ?? a.label,
|
|
66
66
|
label: a.label
|
|
67
67
|
}))));
|
|
68
68
|
}, X = ({ className: t, ...o }) => {
|
|
69
69
|
const { value: r, label: l } = o;
|
|
70
|
-
return /* @__PURE__ */ e.createElement(
|
|
70
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
71
71
|
className: t,
|
|
72
72
|
id: r,
|
|
73
73
|
textValue: l
|
|
@@ -1,13 +1,13 @@
|
|
|
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-CT4uSCPR.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 r } from "./field-rac.module-D06m9T9x.js";
|
|
9
|
-
import { y as i,
|
|
10
|
-
const
|
|
9
|
+
import { y as i, P as E, x as p, B as _, o as S, i as R } from "./form-element-classes-BsXkFtp2.js";
|
|
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, {
|
|
@@ -25,8 +25,8 @@ const R = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
25
25
|
})), /* @__PURE__ */ e.createElement(o.Error, {
|
|
26
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(
|
|
29
|
-
},
|
|
28
|
+
className: t(R, r.description)
|
|
29
|
+
}, D));
|
|
30
30
|
export {
|
|
31
31
|
u as D
|
|
32
32
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o, { useMemo as a } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { C } from "./checkbox-field-rac-
|
|
4
|
-
import { m as l, n as m, l as p } from "./form-element-classes-
|
|
2
|
+
import { aj as n, at as c, h as i } from "./form-BkmOXzqo.js";
|
|
3
|
+
import { C } from "./checkbox-field-rac-b9mcZlMP.js";
|
|
4
|
+
import { m as l, n as m, l as p } from "./form-element-classes-BsXkFtp2.js";
|
|
5
5
|
const _ = (e) => ({
|
|
6
6
|
nodes: [
|
|
7
7
|
{
|
package/dist/component/{email-input-field-rac-CHJ6RSGy.js → email-input-field-rac-DKD7FsQX.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
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 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 { ag as fe, at as ge, ae as ve, c as ye, aj as Ee, an as de, ah as be, f as Se } from "./form-BkmOXzqo.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
|
|
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 U } from "./text-input-headless-
|
|
13
|
+
import { T as U } from "./text-input-headless-DFWQwZAN.js";
|
|
14
14
|
import { E as Ae } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { s as H } from "./field-rac.module-D06m9T9x.js";
|
|
16
|
-
import { y as Fe,
|
|
17
|
-
import { u as
|
|
16
|
+
import { y as Fe, P as ke, o as Te, i as xe, _ as je } from "./form-element-classes-BsXkFtp2.js";
|
|
17
|
+
import { u as De } from "./use-text-input-class-name-B-GYaltW.js";
|
|
18
18
|
var Ce = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Le = {
|
|
19
19
|
"&": "&",
|
|
20
20
|
"&": "&",
|
|
@@ -36,10 +36,10 @@ var Ce = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
36
36
|
"…": "…",
|
|
37
37
|
"/": "/",
|
|
38
38
|
"/": "/"
|
|
39
|
-
}, Me = function(t) {
|
|
40
|
-
return Le[t];
|
|
41
39
|
}, Pe = function(t) {
|
|
42
|
-
return t
|
|
40
|
+
return Le[t];
|
|
41
|
+
}, Me = function(t) {
|
|
42
|
+
return t.replace(Ce, Pe);
|
|
43
43
|
}, _e = {
|
|
44
44
|
bindI18n: "languageChanged",
|
|
45
45
|
bindI18nStore: "",
|
|
@@ -48,8 +48,8 @@ var Ce = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
48
48
|
transWrapTextNodes: "",
|
|
49
49
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
50
50
|
useSuspense: !0,
|
|
51
|
-
unescape:
|
|
52
|
-
}, we, He =
|
|
51
|
+
unescape: Me
|
|
52
|
+
}, we, He = z();
|
|
53
53
|
function Re() {
|
|
54
54
|
return _e;
|
|
55
55
|
}
|
|
@@ -103,7 +103,7 @@ function p(e) {
|
|
|
103
103
|
for (var t = 1; t < arguments.length; t++) {
|
|
104
104
|
var a = arguments[t] != null ? arguments[t] : {};
|
|
105
105
|
t % 2 ? Q(Object(a), !0).forEach(function(o) {
|
|
106
|
-
|
|
106
|
+
Oe(e, o, a[o]);
|
|
107
107
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : Q(Object(a)).forEach(function(o) {
|
|
108
108
|
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(a, o));
|
|
109
109
|
});
|
|
@@ -123,7 +123,7 @@ function qe(e) {
|
|
|
123
123
|
return B(t);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function P(e) {
|
|
127
127
|
return Array.isArray(e) ? e : [e];
|
|
128
128
|
}
|
|
129
129
|
function Ye(e, t) {
|
|
@@ -132,7 +132,7 @@ function Ye(e, t) {
|
|
|
132
132
|
}
|
|
133
133
|
function te(e, t) {
|
|
134
134
|
if (!e) return "";
|
|
135
|
-
var a = "", o =
|
|
135
|
+
var a = "", o = P(e), c = t.transSupportBasicHtmlNodes && t.transKeepBasicHtmlNodesFor ? t.transKeepBasicHtmlNodesFor : [];
|
|
136
136
|
return o.forEach(function(r, g) {
|
|
137
137
|
if (typeof r == "string")
|
|
138
138
|
a += "".concat(r);
|
|
@@ -153,10 +153,10 @@ function te(e, t) {
|
|
|
153
153
|
} else if (r === null)
|
|
154
154
|
K("Trans: the passed in value is invalid - seems you passed in a null child.");
|
|
155
155
|
else if (L(r) === "object") {
|
|
156
|
-
var
|
|
156
|
+
var O = r.format, F = ee(r, Ue), A = Object.keys(F);
|
|
157
157
|
if (A.length === 1) {
|
|
158
|
-
var
|
|
159
|
-
a += "{{".concat(
|
|
158
|
+
var S = O ? "".concat(A[0], ", ").concat(O) : A[0];
|
|
159
|
+
a += "{{".concat(S, "}}");
|
|
160
160
|
} else
|
|
161
161
|
K("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.", r);
|
|
162
162
|
} else
|
|
@@ -169,15 +169,15 @@ function Ge(e, t, a, o, c, r) {
|
|
|
169
169
|
if (!e && !v) return [t];
|
|
170
170
|
var d = {};
|
|
171
171
|
function b(y) {
|
|
172
|
-
var h =
|
|
172
|
+
var h = P(y);
|
|
173
173
|
h.forEach(function(s) {
|
|
174
174
|
typeof s != "string" && (Y(s) ? b(G(s)) : L(s) === "object" && !B(s) && Object.assign(d, s));
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
b(e);
|
|
178
|
-
var T = he.parse("<0>".concat(t, "</0>")),
|
|
178
|
+
var T = he.parse("<0>".concat(t, "</0>")), O = p(p({}, d), c);
|
|
179
179
|
function F(y, h, s) {
|
|
180
|
-
var i = G(y), I =
|
|
180
|
+
var i = G(y), I = S(i, h.children, s);
|
|
181
181
|
return qe(i) && I.length === 0 ? i : I;
|
|
182
182
|
}
|
|
183
183
|
function A(y, h, s, i, I) {
|
|
@@ -185,24 +185,24 @@ function Ge(e, t, a, o, c, r) {
|
|
|
185
185
|
key: i
|
|
186
186
|
}), I ? void 0 : h));
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
var i =
|
|
188
|
+
function S(y, h, s) {
|
|
189
|
+
var i = P(y), I = P(h);
|
|
190
190
|
return I.reduce(function(l, n, E) {
|
|
191
|
-
var k = n.children && n.children[0] && n.children[0].content && a.services.interpolator.interpolate(n.children[0].content,
|
|
191
|
+
var k = n.children && n.children[0] && n.children[0].content && a.services.interpolator.interpolate(n.children[0].content, O, a.language);
|
|
192
192
|
if (n.type === "tag") {
|
|
193
193
|
var N = i[parseInt(n.name, 10)];
|
|
194
194
|
!N && s.length === 1 && s[0][n.name] && (N = s[0][n.name]), N || (N = {});
|
|
195
195
|
var m = Object.keys(n.attrs).length !== 0 ? Ye({
|
|
196
196
|
props: n.attrs
|
|
197
|
-
}, N) : N, x = B(m), V = x && Y(n, !0) && !n.voidElement,
|
|
197
|
+
}, N) : N, x = B(m), V = x && Y(n, !0) && !n.voidElement, M = v && L(m) === "object" && m.dummy && !x, _ = L(e) === "object" && e !== null && Object.hasOwnProperty.call(e, n.name);
|
|
198
198
|
if (typeof m == "string") {
|
|
199
|
-
var q = a.services.interpolator.interpolate(m,
|
|
199
|
+
var q = a.services.interpolator.interpolate(m, O, a.language);
|
|
200
200
|
l.push(q);
|
|
201
201
|
} else if (Y(m) || V) {
|
|
202
202
|
var ne = F(m, n, s);
|
|
203
203
|
A(m, ne, l, E);
|
|
204
|
-
} else if (
|
|
205
|
-
var oe =
|
|
204
|
+
} else if (M) {
|
|
205
|
+
var oe = S(i, n.children, s);
|
|
206
206
|
l.push(w(m, p(p({}, m.props), {}, {
|
|
207
207
|
key: E
|
|
208
208
|
}), oe));
|
|
@@ -216,7 +216,7 @@ function Ge(e, t, a, o, c, r) {
|
|
|
216
216
|
key: "".concat(n.name, "-").concat(E)
|
|
217
217
|
}));
|
|
218
218
|
else {
|
|
219
|
-
var se =
|
|
219
|
+
var se = S(i, n.children, s);
|
|
220
220
|
l.push(R(n.name, {
|
|
221
221
|
key: "".concat(n.name, "-").concat(E)
|
|
222
222
|
}, se));
|
|
@@ -224,7 +224,7 @@ function Ge(e, t, a, o, c, r) {
|
|
|
224
224
|
else if (n.voidElement)
|
|
225
225
|
l.push("<".concat(n.name, " />"));
|
|
226
226
|
else {
|
|
227
|
-
var ce =
|
|
227
|
+
var ce = S(i, n.children, s);
|
|
228
228
|
l.push("<".concat(n.name, ">").concat(ce, "</").concat(n.name, ">"));
|
|
229
229
|
}
|
|
230
230
|
else if (L(m) === "object" && !x) {
|
|
@@ -236,7 +236,7 @@ function Ge(e, t, a, o, c, r) {
|
|
|
236
236
|
key: E
|
|
237
237
|
})));
|
|
238
238
|
} else if (n.type === "text") {
|
|
239
|
-
var W = o.transWrapTextNodes, X = r ? o.unescape(a.services.interpolator.interpolate(n.content,
|
|
239
|
+
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);
|
|
240
240
|
W ? l.push(R(W, {
|
|
241
241
|
key: "".concat(n.name, "-").concat(E)
|
|
242
242
|
}, X)) : l.push(X);
|
|
@@ -244,21 +244,21 @@ function Ge(e, t, a, o, c, r) {
|
|
|
244
244
|
return l;
|
|
245
245
|
}, []);
|
|
246
246
|
}
|
|
247
|
-
var
|
|
247
|
+
var j = S([{
|
|
248
248
|
dummy: !0,
|
|
249
249
|
children: e || []
|
|
250
|
-
}], T,
|
|
251
|
-
return G(
|
|
250
|
+
}], T, P(e || []));
|
|
251
|
+
return G(j[0]);
|
|
252
252
|
}
|
|
253
253
|
function $e(e) {
|
|
254
|
-
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,
|
|
254
|
+
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(He) || {}, h = y.i18n, s = y.defaultNS, i = F || h || Ke();
|
|
255
255
|
if (!i)
|
|
256
256
|
return Be("You will need to pass in an i18next instance by using i18nextReactModule"), t;
|
|
257
257
|
var I = A || i.t.bind(i) || function(q) {
|
|
258
258
|
return q;
|
|
259
259
|
};
|
|
260
260
|
r && (v.context = r);
|
|
261
|
-
var l = p(p({}, Re()), i.options && i.options.react), n =
|
|
261
|
+
var l = p(p({}, Re()), i.options && i.options.react), n = O || I.ns || s || i.options && i.options.defaultNS;
|
|
262
262
|
n = typeof n == "string" ? [n] : n || ["translation"];
|
|
263
263
|
var E = b || te(t, l) || l.transEmptyNodeValue || c, k = l.hashTransKey, N = c || (k ? k(E) : E), m = d ? v.interpolation : {
|
|
264
264
|
interpolation: p(p({}, v.interpolation), {}, {
|
|
@@ -270,12 +270,12 @@ function $e(e) {
|
|
|
270
270
|
}, d), m), {}, {
|
|
271
271
|
defaultValue: E,
|
|
272
272
|
ns: n
|
|
273
|
-
}), V = N ? I(N, x) : E,
|
|
274
|
-
return _ ? R(_,
|
|
273
|
+
}), V = N ? I(N, x) : E, M = Ge(T || t, V, i, l, x, S), _ = o !== void 0 ? o : l.defaultTransParent;
|
|
274
|
+
return _ ? R(_, j, M) : M;
|
|
275
275
|
}
|
|
276
|
-
const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */
|
|
276
|
+
const We = "email-mistype-suggestion", Xe = "email-mistype-suggestion-link", ae = /* @__PURE__ */ z(void 0);
|
|
277
277
|
function Je() {
|
|
278
|
-
const e =
|
|
278
|
+
const e = Z(ae);
|
|
279
279
|
if (e === void 0)
|
|
280
280
|
throw new Error("useEmailSuggestion must be used inside <EmailInput>");
|
|
281
281
|
return e;
|
|
@@ -285,7 +285,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
285
285
|
activeSuggestion: e,
|
|
286
286
|
applySuggestion: t
|
|
287
287
|
}
|
|
288
|
-
}, a),
|
|
288
|
+
}, a), ze = ({ className: e }) => {
|
|
289
289
|
const { suggestionId: t } = fe(), { activeSuggestion: a, applySuggestion: o } = Je(), { t: c, i18n: r } = ge();
|
|
290
290
|
return /* @__PURE__ */ u.createElement("div", {
|
|
291
291
|
id: t,
|
|
@@ -311,7 +311,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
311
311
|
})
|
|
312
312
|
]
|
|
313
313
|
}) : null);
|
|
314
|
-
},
|
|
314
|
+
}, Ze = {
|
|
315
315
|
"aol.com": [
|
|
316
316
|
"aaol.com",
|
|
317
317
|
"aol.con",
|
|
@@ -422,7 +422,7 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
422
422
|
"comcast.nrt",
|
|
423
423
|
"comcast.net.net"
|
|
424
424
|
]
|
|
425
|
-
}, et = new Map(Object.entries(
|
|
425
|
+
}, et = new Map(Object.entries(Ze).flatMap(([e, t]) => t.map((a) => [
|
|
426
426
|
a,
|
|
427
427
|
e
|
|
428
428
|
]))), tt = (e) => {
|
|
@@ -450,15 +450,15 @@ const Qe = ({ activeSuggestion: e, applySuggestion: t, children: a }) => /* @__P
|
|
|
450
450
|
validate: v
|
|
451
451
|
};
|
|
452
452
|
}, f = ({ children: e }) => {
|
|
453
|
-
const { id: t, value: a, onChange: o, disabled: c, readOnly: r, required: g, hasError: v, onBlur: d, onFocus: b, error: T, description:
|
|
453
|
+
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({
|
|
454
454
|
email: a,
|
|
455
455
|
hasError: v
|
|
456
|
-
}), { setFocusedFieldId: y } = de(), s = A && (!r && !c) &&
|
|
456
|
+
}), { setFocusedFieldId: y } = de(), s = A && (!r && !c) && S ? S : void 0, i = be(t, T, O, s), I = () => {
|
|
457
457
|
o(s), y(t);
|
|
458
458
|
}, l = () => {
|
|
459
|
-
|
|
459
|
+
j(), d == null || d();
|
|
460
460
|
}, 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);
|
|
461
|
-
return /* @__PURE__ */ u.createElement(
|
|
461
|
+
return /* @__PURE__ */ u.createElement(Se.Provider, {
|
|
462
462
|
value: i
|
|
463
463
|
}, /* @__PURE__ */ u.createElement(Qe, {
|
|
464
464
|
activeSuggestion: s,
|
|
@@ -484,26 +484,26 @@ f.Label = U.Label;
|
|
|
484
484
|
f.Input = U.Input;
|
|
485
485
|
f.Description = U.Description;
|
|
486
486
|
f.Error = U.Error;
|
|
487
|
-
f.Suggestion =
|
|
487
|
+
f.Suggestion = ze;
|
|
488
488
|
const nt = "_suggestion_di65n_1", ot = {
|
|
489
489
|
suggestion: nt
|
|
490
490
|
}, rt = ({ content: e, locale: t }) => /* @__PURE__ */ u.createElement(ie, {
|
|
491
491
|
content: e,
|
|
492
492
|
locale: t
|
|
493
493
|
}), It = () => {
|
|
494
|
-
const e =
|
|
494
|
+
const e = De();
|
|
495
495
|
return /* @__PURE__ */ u.createElement(f, null, /* @__PURE__ */ u.createElement(f.Label, {
|
|
496
|
-
className:
|
|
496
|
+
className: D(Fe, H.label)
|
|
497
497
|
}, /* @__PURE__ */ u.createElement(f.Label.Required, {
|
|
498
|
-
className:
|
|
498
|
+
className: D(ke, H.requiredMark)
|
|
499
499
|
})), /* @__PURE__ */ u.createElement(f.Input, {
|
|
500
500
|
className: e
|
|
501
501
|
}), /* @__PURE__ */ u.createElement(f.Error, {
|
|
502
|
-
className:
|
|
502
|
+
className: D(Te, H.error)
|
|
503
503
|
}, /* @__PURE__ */ u.createElement(Ae, null), /* @__PURE__ */ u.createElement(f.Error.Text, null)), /* @__PURE__ */ u.createElement(f.Description, {
|
|
504
|
-
className:
|
|
504
|
+
className: D(xe, H.description)
|
|
505
505
|
}, rt), /* @__PURE__ */ u.createElement(f.Suggestion, {
|
|
506
|
-
className:
|
|
506
|
+
className: D(je, ot.suggestion)
|
|
507
507
|
}));
|
|
508
508
|
};
|
|
509
509
|
export {
|