@wix/form-elements 1.94.0 → 1.96.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-CNIizm60.js → appointment-rac-BKgRKq3j.js} +309 -310
- package/dist/component/{bookings-address-rac-C7ukrF1D.js → bookings-address-rac-C87x19gw.js} +1 -1
- package/dist/component/{bookings-email-rac-DnzbLEmf.js → bookings-email-rac-f4nuC_pb.js} +1 -1
- package/dist/component/{bookings-first-name-rac-8Krm-3QK.js → bookings-first-name-rac-BGmuAmbu.js} +1 -1
- package/dist/component/{bookings-header-rac-WRILbKeE.js → bookings-header-rac-CoyxHljp.js} +1 -1
- package/dist/component/{bookings-last-name-rac-C0-yWBLa.js → bookings-last-name-rac-D2mBYwcR.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Bc9u_rn_.js → bookings-login-bar-rac-BH2Mi6TR.js} +4 -4
- package/dist/component/{bookings-phone-rac-BaBlg7f7.js → bookings-phone-rac-Dz78ybFV.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DR-Ngu_b.js → bookings-rich-text-rac-8_h0cOoy.js} +1 -1
- package/dist/component/{get-first-day-of-the-week-DvnsxYhQ.js → calendar.module-DnhTT4QT.js} +23 -18
- package/dist/component/{checkbox-field-rac-Cqr57TgJ.js → checkbox-field-rac-CJnegjvL.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-Bgcvavr3.js → checkbox-group-field-headless-CrA7Gx2Y.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-Bcsowjwp.js → checkbox-group-field-rac-DMg75l5Q.js} +12 -12
- package/dist/component/{checkbox-group-rac-38j0b8_U.js → checkbox-group-rac-C9XWlO5D.js} +1 -1
- package/dist/component/{checkbox-rac-Bb5ZxZo7.js → checkbox-rac-CrqhH4z9.js} +1 -1
- package/dist/component/{contacts-address-rac-gaOhfztb.js → contacts-address-rac-C2mqTiPg.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DAIPR64p.js → contacts-birthdate-rac-i7_RMona.js} +1 -1
- package/dist/component/{contacts-company-rac-DVPQrcfN.js → contacts-company-rac-7sdIosaG.js} +1 -1
- package/dist/component/{contacts-email-rac-qMyFjz_2.js → contacts-email-rac-CrsksJ9G.js} +1 -1
- package/dist/component/{contacts-first-name-rac-OVPtHcde.js → contacts-first-name-rac-I5xIYxgD.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BmLQrJ2D.js → contacts-last-name-rac-DnzJYJh7.js} +1 -1
- package/dist/component/{contacts-phone-rac-D7waZc1q.js → contacts-phone-rac-Cx1jpYmv.js} +1 -1
- package/dist/component/{contacts-position-rac-DnI3o3Am.js → contacts-position-rac-CxddG_cE.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-P8zn8_GS.js → contacts-subscribe-rac-C1nTAhnd.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-9CBr2KkR.js → contacts-tax-id-rac-B1lzfrj_.js} +1 -1
- package/dist/component/{date-availability--ntpBDiI.js → date-availability-LN33GU7O.js} +1 -1
- package/dist/component/{date-input-field-rac-Don2tz5U.js → date-input-field-rac-zTcw6Mxx.js} +57 -56
- package/dist/component/{date-input-rac-Du3e8Hcu.js → date-input-rac-NfVbrcoO.js} +1 -1
- package/dist/component/date-picker-field-rac-Cc9hJloJ.js +317 -0
- package/dist/component/{date-picker-rac-BsCMkfHV.js → date-picker-rac-C5iXyKdf.js} +1 -1
- package/dist/component/{date-time-input-field-rac-LLF1UdUD.js → date-time-input-field-rac-Cp34u7cC.js} +53 -52
- package/dist/component/{date-time-input-rac-KYqrNgbb.js → date-time-input-rac-CfFd56Xf.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DaOY9Cb6.js → dext-checkbox-group-rac-BVx7XXwR.js} +2 -2
- package/dist/component/{dext-checkbox-rac-Ceu5q9xf.js → dext-checkbox-rac-CmUOLx_w.js} +1 -1
- package/dist/component/{dext-date-picker-rac-iop0XEpQ.js → dext-date-picker-rac-XDrLGVTQ.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DJB_fMiN.js → dext-date-time-input-rac-ZLCq_taK.js} +1 -1
- package/dist/component/{dext-dropdown-rac-Dhp4CUZ5.js → dext-dropdown-rac-C74zBq3M.js} +1 -1
- package/dist/component/{dext-email-rac-BIr9RxhQ.js → dext-email-rac-CqS9HcdY.js} +1 -1
- package/dist/component/{dext-number-input-rac-Q8p3NeKN.js → dext-number-input-rac-DszjJDT-.js} +1 -1
- package/dist/component/{dext-phone-rac-DRdRLIvr.js → dext-phone-rac-wt7T8hpM.js} +1 -1
- package/dist/component/{dext-radio-group-rac-D1N_wBhO.js → dext-radio-group-rac-BvRnaWP0.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BQIMl7oQ.js → dext-rating-input-rac-D1Lt9M3c.js} +1 -1
- package/dist/component/{dext-tags-rac-C52jiu1I.js → dext-tags-rac-70YO5CJH.js} +2 -2
- package/dist/component/{dext-text-area-rac-BWmSs4mb.js → dext-text-area-rac-CC5RCvWh.js} +1 -1
- package/dist/component/{dext-text-input-rac-BnAJ-7Hs.js → dext-text-input-rac-s487DzPW.js} +1 -1
- package/dist/component/{dext-url-input-rac-CvGn3KHo.js → dext-url-input-rac-DEKwUh2a.js} +1 -1
- package/dist/component/{donation-rac-DsFRs16V.js → donation-rac-C2bCFVHP.js} +30 -30
- package/dist/component/{dropdown-field-headless-K0AM4AAs.js → dropdown-field-headless-BMWwkydq.js} +4 -4
- package/dist/component/{dropdown-field-rac-CMEB8ZQN.js → dropdown-field-rac-Cw5Cbpg0.js} +5 -5
- package/dist/component/{dropdown-rac-BakYShkm.js → dropdown-rac-CEmlDY3w.js} +1 -1
- package/dist/component/{ecom-address-rac-A_Aj5CX0.js → ecom-address-rac-Dv6asnf_.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Ddol0N03.js → ecom-subscription-checkbox-rac-DOwH-Ebd.js} +3 -3
- package/dist/component/{email-input-field-rac-B7yOMDWB.js → email-input-field-rac-CeFXPibq.js} +41 -41
- package/dist/component/events-repeater-rac-BUk5Qc8n.js +267 -0
- package/dist/component/{events-rsvp-rac-DfjqTM7C.js → events-rsvp-rac-CtFkVzUy.js} +20 -20
- package/dist/component/{field-error-headless-CONyKitA.js → field-error-headless-B6x_cVEi.js} +1 -1
- package/dist/component/{field-label-headless-tf9QXhMi.js → field-label-headless-BibCD8xx.js} +1 -1
- package/dist/component/{file-upload-rac-Bng5Yew9.js → file-upload-rac-BUcktluW.js} +43 -43
- package/dist/component/{fixed-payment-rac-CXIv7_Oj.js → fixed-payment-rac-BMSBSo5c.js} +10 -10
- package/dist/component/{form-Lv-a47BN.js → form-9WmwgGNc.js} +1120 -1108
- package/dist/component/{form-element-classes-CLZXu-91.js → form-element-classes-BtKlobUX.js} +60 -59
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BZdYszfP.js → header-field-rac-CxUuHOic.js} +3 -3
- package/dist/component/{header-rac-BNeqoDyT.js → header-rac-DejI69X7.js} +1 -1
- package/dist/component/{image-choice-rac-aSKDRo51.js → image-choice-rac-BjI5a_co.js} +15 -15
- package/dist/component/{index-DnNA6zNR.js → index-Csso-2QH.js} +2 -2
- package/dist/component/{index-CWZfskEy.js → index-Dz2hV2_S.js} +4 -4
- package/dist/component/{isObjectLike-C9ogbjhq.js → isObjectLike-BN_BZMhy.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CHE1mE_b.js → multiline-address-field-rac-CYfphmfr.js} +86 -85
- package/dist/component/{multiline-address-rac-wxJunvdU.js → multiline-address-rac-Ccujt2bd.js} +1 -1
- package/dist/component/{number-input-field-rac-ore1oi9q.js → number-input-field-rac-CfnRCRar.js} +18 -18
- package/dist/component/{number-input-rac-DU-rCrjJ.js → number-input-rac-DnTO9d8P.js} +1 -1
- package/dist/component/{password-rac-Dkqv0AIm.js → password-rac-Be_YSb-Q.js} +37 -37
- package/dist/component/{payment-input-rac-CsTcFhQ5.js → payment-input-rac-DXUf5iYb.js} +22 -22
- package/dist/component/{phone-input-field-rac-lIVKt7ge.js → phone-input-field-rac-DYAwLuvJ.js} +32 -31
- package/dist/component/{phone-rac-CZlsXHRM.js → phone-rac-BlsvDmER.js} +1 -1
- package/dist/component/{product-list-rac-UebyHfhC.js → product-list-rac-DdXwRSc2.js} +15 -15
- package/dist/component/{quiz-radio-group-rac-ORLTYxdR.js → quiz-radio-group-rac-B0yiKdbu.js} +2 -2
- package/dist/component/{radio-button-module-classes-CEQr0hKB.js → radio-button-module-classes-t1jsWYpT.js} +3 -3
- package/dist/component/{radio-group-field-rac-t_Dj1_4p.js → radio-group-field-rac-Cug1TtSq.js} +4 -4
- package/dist/component/{radio-group-rac-CC_35nq4.js → radio-group-rac-_O5T0Pt8.js} +1 -1
- package/dist/component/{rating-input-field-rac-BU66cRhy.js → rating-input-field-rac-BSKzQ3fq.js} +31 -31
- package/dist/component/{rating-input-rac-KgNbgchh.js → rating-input-rac-B71q44YO.js} +1 -1
- package/dist/component/{rich-content-rac.module-oGcFL-hl.js → rich-content-rac.module-BJuoKIOt.js} +1 -1
- package/dist/component/{rich-text-field-rac-CiwMiMv7.js → rich-text-field-rac-CiSR82Fw.js} +3 -3
- package/dist/component/{rich-text-rac-Dmp0xxpi.js → rich-text-rac-Bo6UBwOg.js} +1 -1
- package/dist/component/{service-dropdown-rac-_QBi8_AO.js → service-dropdown-rac-BJ7V-g8M.js} +35 -35
- package/dist/component/{services-multi-choice-rac-C2e3xL9O.js → services-multi-choice-rac-CtBcc9WH.js} +12 -12
- package/dist/component/{signature-rac-Dj3aYMvJ.js → signature-rac-yvrHr1he.js} +102 -102
- package/dist/component/{submit-button-rac-C-BVXga7.js → submit-button-rac-s-JdZgq7.js} +2 -2
- package/dist/component/{tags-field-rac-CcOUcsCd.js → tags-field-rac-g_W0RMod.js} +66 -66
- package/dist/component/{tags-rac-p68DA4Mq.js → tags-rac-DmvIH6HU.js} +1 -1
- package/dist/component/{text-area-field-rac-DubIcKTn.js → text-area-field-rac-Duja5xOA.js} +27 -27
- package/dist/component/{text-area-rac-CygfUB6z.js → text-area-rac-DzRxgG6u.js} +1 -1
- package/dist/component/{text-input-field-rac-C7JZRcCX.js → text-input-field-rac-C2eXeoBC.js} +7 -7
- package/dist/component/{text-input-headless-D1xcxxNE.js → text-input-headless-d1WK0nqR.js} +3 -3
- package/dist/component/{text-input-rac-C5lfqJCN.js → text-input-rac-DM9MnoQs.js} +1 -1
- package/dist/component/{time-input-rac-BNxceC-R.js → time-input-rac-CxVZ3USX.js} +25 -25
- package/dist/component/{url-input-field-rac-DH_STwmd.js → url-input-field-rac-4oVJMr1a.js} +19 -19
- package/dist/component/{url-input-rac-C2VOzCis.js → url-input-rac--T-FnskQ.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BFHRYpVL.js +21 -0
- package/dist/component/{use-element-state-class-name-CITSBXT8.js → use-element-state-class-name-De5YnxMK.js} +1 -1
- package/dist/component/use-is-forced-open-dropdown-CWvcd9Ex.js +41 -0
- package/dist/component/{use-service-options-base-DVBmOiRh.js → use-service-options-base-CD1EVWRE.js} +1 -1
- package/dist/component/{use-text-input-class-name-COw61iUf.js → use-text-input-class-name-BYwXccvO.js} +3 -3
- package/package.json +4 -3
- package/dist/component/date-picker-field-rac-Wxmz-O7r.js +0 -304
- package/dist/component/events-repeater-rac-bp8gFHXQ.js +0 -256
- package/dist/component/use-dropdown-option-class-name-CKRu4ERM.js +0 -57
package/dist/component/{number-input-field-rac-ore1oi9q.js → number-input-field-rac-CfnRCRar.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import r, { useState as
|
|
3
|
+
import r, { useState as j, useCallback as Q, useEffect as U, useRef as $ } from "react";
|
|
4
4
|
import { NumberField as z, Input as G } from "react-aria-components";
|
|
5
|
-
import { ak as _, ah as S, au as H, am as J } from "./form-
|
|
5
|
+
import { ak as _, ah as S, au as H, am as J } from "./form-9WmwgGNc.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as K, E as W } from "./field-error-headless-
|
|
8
|
-
import { L as X } from "./field-label-headless-
|
|
7
|
+
import { D as K, E as W } from "./field-error-headless-B6x_cVEi.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-BibCD8xx.js";
|
|
9
9
|
import { g as Y, c as Z } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as w } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ee } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as p } from "./field-rac.module-DobpyqOd.js";
|
|
13
|
-
import {
|
|
14
|
-
import { u as se } from "./use-text-input-class-name-
|
|
13
|
+
import { C as re, S as te, r as ae, j as ne } from "./form-element-classes-BtKlobUX.js";
|
|
14
|
+
import { u as se } from "./use-text-input-class-name-BYwXccvO.js";
|
|
15
15
|
const e = ({ children: t }) => {
|
|
16
|
-
var F,
|
|
17
|
-
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1, A = (
|
|
16
|
+
var F, L, R;
|
|
17
|
+
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1, A = (L = a == null ? void 0 : a.number) == null ? void 0 : L.maximum, g = (R = a == null ? void 0 : a.number) == null ? void 0 : R.minimum, h = O(s), [x, I] = j(h), T = w(b), V = c(t, e.Label), k = c(t, e.Input), q = c(t, e.Description), M = c(t, e.Error), B = Q((N) => {
|
|
18
18
|
if (N === void 0 || Number.isNaN(N)) {
|
|
19
19
|
l(""), I(NaN);
|
|
20
20
|
return;
|
|
@@ -25,33 +25,33 @@ const e = ({ children: t }) => {
|
|
|
25
25
|
D,
|
|
26
26
|
l
|
|
27
27
|
]);
|
|
28
|
-
return
|
|
28
|
+
return U(() => {
|
|
29
29
|
I(O(s));
|
|
30
30
|
}, [
|
|
31
31
|
s
|
|
32
32
|
]), /* @__PURE__ */ r.createElement(m, {
|
|
33
33
|
fieldId: n,
|
|
34
|
-
renderLabel: () =>
|
|
34
|
+
renderLabel: () => V,
|
|
35
35
|
renderInput: () => /* @__PURE__ */ r.createElement(z, {
|
|
36
36
|
"aria-labelledby": y,
|
|
37
|
-
value:
|
|
38
|
-
onChange:
|
|
37
|
+
value: x,
|
|
38
|
+
onChange: B,
|
|
39
39
|
isDisabled: d,
|
|
40
40
|
isRequired: E,
|
|
41
41
|
isReadOnly: o,
|
|
42
42
|
isInvalid: u,
|
|
43
|
-
onBlur:
|
|
43
|
+
onBlur: T,
|
|
44
44
|
onFocus: f,
|
|
45
45
|
minValue: g ?? void 0,
|
|
46
46
|
maxValue: A ?? void 0
|
|
47
|
-
},
|
|
48
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null,
|
|
47
|
+
}, k),
|
|
48
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, M, q)
|
|
49
49
|
});
|
|
50
50
|
}, le = ({ className: t }) => {
|
|
51
51
|
var u;
|
|
52
52
|
const { t: n } = H(), { inputId: s, ariaDescribedBy: l } = S(), { id: d, placeholder: E, validation: o, label: b, required: f } = _();
|
|
53
53
|
(u = o == null ? void 0 : o.number) != null && u.multipleOf;
|
|
54
|
-
const m =
|
|
54
|
+
const m = $(null);
|
|
55
55
|
return J(() => {
|
|
56
56
|
var a;
|
|
57
57
|
(a = m.current) == null || a.focus();
|
|
@@ -74,7 +74,7 @@ e.Error = W;
|
|
|
74
74
|
const O = (t) => Z(t) ?? NaN, oe = ({ content: t, locale: n }) => /* @__PURE__ */ r.createElement(P, {
|
|
75
75
|
content: t,
|
|
76
76
|
locale: n
|
|
77
|
-
}),
|
|
77
|
+
}), Re = () => {
|
|
78
78
|
const t = se();
|
|
79
79
|
return /* @__PURE__ */ r.createElement(e, null, /* @__PURE__ */ r.createElement(e.Label, {
|
|
80
80
|
className: i(re, p.label)
|
|
@@ -89,5 +89,5 @@ const O = (t) => Z(t) ?? NaN, oe = ({ content: t, locale: n }) => /* @__PURE__ *
|
|
|
89
89
|
}, oe));
|
|
90
90
|
};
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
Re as N
|
|
93
93
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as S, useRef as N } from "react";
|
|
2
2
|
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import { ak as E, ah as I, am as O, au as
|
|
5
|
-
import { TextField as
|
|
4
|
+
import { ak as E, ah as I, am as O, au as A } from "./form-9WmwgGNc.js";
|
|
5
|
+
import { TextField as B, Group as V, Input as v, Button as P } from "react-aria-components";
|
|
6
6
|
import { f as u, a as g } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as M, E as k } from "./field-error-headless-
|
|
8
|
-
import { L as q } from "./field-label-headless-
|
|
9
|
-
import { E as
|
|
10
|
-
import { H as
|
|
7
|
+
import { D as M, E as k } from "./field-error-headless-B6x_cVEi.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-BibCD8xx.js";
|
|
9
|
+
import { E as j } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { H as U } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-DobpyqOd.js";
|
|
12
|
-
import {
|
|
13
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
14
|
-
const t = ({ children:
|
|
15
|
-
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] =
|
|
12
|
+
import { C as H, S as W, r as Z, j as G } from "./form-element-classes-BtKlobUX.js";
|
|
13
|
+
import { u as Q } from "./use-text-input-class-name-BYwXccvO.js";
|
|
14
|
+
const t = ({ children: r, className: o }) => {
|
|
15
|
+
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] = S(!1), F = u(r, t.Label), L = u(r, t.Control), T = u(r, t.Description), h = u(r, t.Error);
|
|
16
16
|
return /* @__PURE__ */ e.createElement(_, {
|
|
17
17
|
fieldId: l,
|
|
18
18
|
renderLabel: () => F,
|
|
19
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
19
|
+
renderInput: () => /* @__PURE__ */ e.createElement(B, {
|
|
20
20
|
"aria-labelledby": y,
|
|
21
21
|
value: s ?? "",
|
|
22
22
|
onChange: c,
|
|
@@ -26,17 +26,17 @@ const t = ({ children: o, className: r }) => {
|
|
|
26
26
|
isInvalid: i,
|
|
27
27
|
onBlur: f,
|
|
28
28
|
onFocus: C,
|
|
29
|
-
className:
|
|
29
|
+
className: o
|
|
30
30
|
}, g(L, {
|
|
31
31
|
isVisible: R,
|
|
32
32
|
onToggleVisibility: () => D((w) => !w)
|
|
33
33
|
})),
|
|
34
34
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, T, h)
|
|
35
35
|
});
|
|
36
|
-
}, $ = ({ children:
|
|
37
|
-
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(
|
|
36
|
+
}, $ = ({ children: r, className: o, ...l }) => {
|
|
37
|
+
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(r, t.Input), i = u(r, t.Toggle);
|
|
38
38
|
return /* @__PURE__ */ e.createElement(V, {
|
|
39
|
-
className:
|
|
39
|
+
className: o,
|
|
40
40
|
isDisabled: n,
|
|
41
41
|
isInvalid: m
|
|
42
42
|
}, g(a, {
|
|
@@ -45,8 +45,8 @@ const t = ({ children: o, className: r }) => {
|
|
|
45
45
|
isVisible: s,
|
|
46
46
|
onToggleVisibility: c
|
|
47
47
|
}));
|
|
48
|
-
}, z = ({ className:
|
|
49
|
-
const { isVisible: l } =
|
|
48
|
+
}, z = ({ className: r, ...o }) => {
|
|
49
|
+
const { isVisible: l } = o, { id: s, placeholder: c } = E(), { inputId: n, ariaDescribedBy: m } = I(), a = N(null);
|
|
50
50
|
return O(() => {
|
|
51
51
|
var i;
|
|
52
52
|
(i = a.current) == null || i.focus();
|
|
@@ -55,18 +55,18 @@ const t = ({ children: o, className: r }) => {
|
|
|
55
55
|
id: n,
|
|
56
56
|
type: l ? "text" : "password",
|
|
57
57
|
"aria-describedby": m,
|
|
58
|
-
className:
|
|
58
|
+
className: r,
|
|
59
59
|
placeholder: c
|
|
60
60
|
});
|
|
61
|
-
}, J = ({ className:
|
|
62
|
-
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l :
|
|
61
|
+
}, J = ({ className: r, showPasswordTooltipText: o, hidePasswordTooltipText: l, children: s, ...c }) => {
|
|
62
|
+
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l : o;
|
|
63
63
|
return /* @__PURE__ */ e.createElement(P, {
|
|
64
64
|
type: "button",
|
|
65
65
|
isDisabled: a,
|
|
66
66
|
onPress: m,
|
|
67
67
|
"aria-label": i,
|
|
68
68
|
"aria-pressed": n,
|
|
69
|
-
className:
|
|
69
|
+
className: r
|
|
70
70
|
}, s == null ? void 0 : s({
|
|
71
71
|
isVisible: n
|
|
72
72
|
}));
|
|
@@ -77,7 +77,7 @@ t.Input = z;
|
|
|
77
77
|
t.Toggle = J;
|
|
78
78
|
t.Description = M;
|
|
79
79
|
t.Error = k;
|
|
80
|
-
const K = (
|
|
80
|
+
const K = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
81
81
|
viewBox: "0 0 24 24",
|
|
82
82
|
width: "20",
|
|
83
83
|
height: "20",
|
|
@@ -85,14 +85,14 @@ const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
85
85
|
stroke: "currentColor",
|
|
86
86
|
strokeWidth: "1.5",
|
|
87
87
|
"aria-hidden": "true",
|
|
88
|
-
...
|
|
88
|
+
...r
|
|
89
89
|
}, /* @__PURE__ */ e.createElement("path", {
|
|
90
90
|
d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"
|
|
91
91
|
}), /* @__PURE__ */ e.createElement("circle", {
|
|
92
92
|
cx: "12",
|
|
93
93
|
cy: "12",
|
|
94
94
|
r: "3"
|
|
95
|
-
})), X = (
|
|
95
|
+
})), X = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
96
96
|
viewBox: "0 0 24 24",
|
|
97
97
|
width: "20",
|
|
98
98
|
height: "20",
|
|
@@ -100,7 +100,7 @@ const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
100
100
|
stroke: "currentColor",
|
|
101
101
|
strokeWidth: "1.5",
|
|
102
102
|
"aria-hidden": "true",
|
|
103
|
-
...
|
|
103
|
+
...r
|
|
104
104
|
}, /* @__PURE__ */ e.createElement("path", {
|
|
105
105
|
d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"
|
|
106
106
|
}), /* @__PURE__ */ e.createElement("circle", {
|
|
@@ -115,29 +115,29 @@ const K = (o) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
115
115
|
})), Y = "_control_1malj_1", ee = "_toggleButton_1malj_15", b = {
|
|
116
116
|
control: Y,
|
|
117
117
|
toggleButton: ee
|
|
118
|
-
}, te = ({ content:
|
|
119
|
-
content:
|
|
120
|
-
locale:
|
|
121
|
-
}),
|
|
122
|
-
const { t:
|
|
118
|
+
}, te = ({ content: r, locale: o }) => /* @__PURE__ */ e.createElement(x, {
|
|
119
|
+
content: r,
|
|
120
|
+
locale: o
|
|
121
|
+
}), re = () => {
|
|
122
|
+
const { t: r } = A(), o = Q(b.control);
|
|
123
123
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
124
124
|
className: d(H, p.label)
|
|
125
125
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
126
126
|
className: d(W, p.requiredMark)
|
|
127
127
|
})), /* @__PURE__ */ e.createElement(t.Control, {
|
|
128
|
-
className:
|
|
128
|
+
className: o
|
|
129
129
|
}, /* @__PURE__ */ e.createElement(t.Input, {
|
|
130
|
-
className: d(p.innerInput,
|
|
130
|
+
className: d(p.innerInput, U)
|
|
131
131
|
}), /* @__PURE__ */ e.createElement(t.Toggle, {
|
|
132
132
|
className: b.toggleButton,
|
|
133
|
-
showPasswordTooltipText:
|
|
134
|
-
hidePasswordTooltipText:
|
|
133
|
+
showPasswordTooltipText: r("forms.widget.modals.show-password-tooltip"),
|
|
134
|
+
hidePasswordTooltipText: r("forms.widget.modals.hide-password-tooltip")
|
|
135
135
|
}, ({ isVisible: l }) => l ? /* @__PURE__ */ e.createElement(X, null) : /* @__PURE__ */ e.createElement(K, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
136
136
|
className: d(Z, p.error)
|
|
137
|
-
}, /* @__PURE__ */ e.createElement(
|
|
137
|
+
}, /* @__PURE__ */ e.createElement(j, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
138
138
|
className: d(G, p.description)
|
|
139
139
|
}, te));
|
|
140
|
-
}, be = () => /* @__PURE__ */ e.createElement(
|
|
140
|
+
}, be = () => /* @__PURE__ */ e.createElement(re, null);
|
|
141
141
|
export {
|
|
142
142
|
be as PasswordRAC
|
|
143
143
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import r, { useCallback as P, useRef as
|
|
1
|
+
import r, { useCallback as P, useRef as Q } from "react";
|
|
2
2
|
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
4
|
import { TextField as z, Group as J, Input as K } from "react-aria-components";
|
|
5
|
-
import { ak as
|
|
5
|
+
import { ak as R, ah as D, ac as T, au as W, am as X } from "./form-9WmwgGNc.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as Y, E as Z } from "./field-error-headless-
|
|
8
|
-
import { L as ee } from "./field-label-headless-
|
|
9
|
-
import { f as
|
|
7
|
+
import { D as Y, E as Z } from "./field-error-headless-B6x_cVEi.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-BibCD8xx.js";
|
|
9
|
+
import { f as N, g as re } from "./payment-field-utils-DobiK5Xh.js";
|
|
10
10
|
import { u as te } from "./use-synced-display-value-DcAxdn3M.js";
|
|
11
11
|
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { H as ae } from "./custom-focus-class-_483Pkwp.js";
|
|
13
13
|
import { s as d } from "./field-rac.module-DobpyqOd.js";
|
|
14
|
-
import {
|
|
15
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
14
|
+
import { C as se, S as oe, r as le, j as ce } from "./form-element-classes-BtKlobUX.js";
|
|
15
|
+
import { u as ie } from "./use-text-input-class-name-BYwXccvO.js";
|
|
16
16
|
function ue(e, t) {
|
|
17
17
|
return {
|
|
18
18
|
productId: e.id,
|
|
@@ -28,28 +28,28 @@ function h(e) {
|
|
|
28
28
|
}
|
|
29
29
|
const n = ({ children: e }) => {
|
|
30
30
|
var O, g, A, V;
|
|
31
|
-
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: y, hasError: b, onBlur: o, onFocus: E, FieldLayout:
|
|
31
|
+
const { id: t, value: a, onChange: s, disabled: u, readOnly: m, required: y, hasError: b, onBlur: o, onFocus: E, FieldLayout: M, validation: C } = R(), { labelId: q, prefixId: G } = D(), { regionalFormat: c } = T(), S = (A = (g = (O = C == null ? void 0 : C.predefined) == null ? void 0 : O.paymentOptions) == null ? void 0 : g.products) == null ? void 0 : A[0], _ = (V = a == null ? void 0 : a.at(0)) == null ? void 0 : V.price, [F, I] = te({
|
|
32
32
|
sourceValue: _,
|
|
33
|
-
format: (l) =>
|
|
33
|
+
format: (l) => N(String(l ?? ""), c),
|
|
34
34
|
regionalFormat: c
|
|
35
35
|
}), $ = P(() => {
|
|
36
|
-
const l =
|
|
36
|
+
const l = N(F, c);
|
|
37
37
|
I(l || ""), o == null || o();
|
|
38
38
|
}, [
|
|
39
39
|
F,
|
|
40
40
|
c,
|
|
41
41
|
o,
|
|
42
42
|
I
|
|
43
|
-
]),
|
|
43
|
+
]), k = P((l) => {
|
|
44
44
|
I(l);
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
if (
|
|
45
|
+
const L = h(N(l, c)), j = h(_);
|
|
46
|
+
if (L !== j) {
|
|
47
|
+
if (L === void 0) {
|
|
48
48
|
s(null);
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
s([
|
|
52
|
-
ue(S,
|
|
52
|
+
ue(S, L)
|
|
53
53
|
]);
|
|
54
54
|
}
|
|
55
55
|
}, [
|
|
@@ -58,14 +58,14 @@ const n = ({ children: e }) => {
|
|
|
58
58
|
c,
|
|
59
59
|
_,
|
|
60
60
|
I
|
|
61
|
-
]),
|
|
62
|
-
return /* @__PURE__ */ r.createElement(
|
|
61
|
+
]), B = i(e, n.Label), U = i(e, n.Input), v = i(e, n.Description), H = i(e, n.Error);
|
|
62
|
+
return /* @__PURE__ */ r.createElement(M, {
|
|
63
63
|
fieldId: t,
|
|
64
|
-
renderLabel: () =>
|
|
64
|
+
renderLabel: () => B,
|
|
65
65
|
renderInput: () => /* @__PURE__ */ r.createElement(z, {
|
|
66
|
-
"aria-labelledby": `${
|
|
66
|
+
"aria-labelledby": `${q} ${G}`,
|
|
67
67
|
value: a ? F : "",
|
|
68
|
-
onChange:
|
|
68
|
+
onChange: k,
|
|
69
69
|
isDisabled: u,
|
|
70
70
|
isReadOnly: m,
|
|
71
71
|
isRequired: y,
|
|
@@ -76,7 +76,7 @@ const n = ({ children: e }) => {
|
|
|
76
76
|
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, v)
|
|
77
77
|
});
|
|
78
78
|
}, f = ({ children: e, className: t }) => {
|
|
79
|
-
const { disabled: a, hasError: s } =
|
|
79
|
+
const { disabled: a, hasError: s } = R(), u = i(e, f.Currency), m = i(e, f.Value);
|
|
80
80
|
return /* @__PURE__ */ r.createElement(J, {
|
|
81
81
|
className: t,
|
|
82
82
|
isDisabled: a,
|
|
@@ -91,7 +91,7 @@ const n = ({ children: e }) => {
|
|
|
91
91
|
className: e
|
|
92
92
|
}, t.sign || t.code) : null;
|
|
93
93
|
}, pe = ({ className: e }) => {
|
|
94
|
-
const { id: t, placeholder: a, label: s } =
|
|
94
|
+
const { id: t, placeholder: a, label: s } = R(), { inputId: u, labelId: m, prefixId: y, ariaDescribedBy: b } = D(), o = Q(null);
|
|
95
95
|
return X(() => {
|
|
96
96
|
var E;
|
|
97
97
|
(E = o.current) == null || E.focus();
|
package/dist/component/{phone-input-field-rac-lIVKt7ge.js → phone-input-field-rac-DYAwLuvJ.js}
RENAMED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { RicosViewer as Oe } from "@wix/ricos/viewer";
|
|
2
2
|
import O from "classnames";
|
|
3
|
-
import t, { useMemo as x, useState as B, useRef as P, useEffect as U, useCallback as oe, createContext as le, useContext as
|
|
4
|
-
import { a3 as _e, au as v, ac as ue, at as Ne, ak as M, ah as ie, am as Se } from "./form-
|
|
3
|
+
import t, { useMemo as x, useState as B, useRef as P, useEffect as U, useCallback as oe, createContext as le, useContext as Y } from "react";
|
|
4
|
+
import { a3 as _e, au as v, ac as ue, at as Ne, ak as M, ah as ie, am as Se } from "./form-9WmwgGNc.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as Le } from "react-aria";
|
|
6
6
|
import { Dialog as me, OverlayTriggerStateContext as Ie, ModalOverlay as Fe, Modal as Pe, SearchField as ve, Group as G, ListBoxItem as De, DialogTrigger as Re, Select as xe, Input as Ce, ListBox as Be, Autocomplete as Me } from "react-aria-components";
|
|
7
|
-
import { f as h, a as
|
|
8
|
-
import { D as qe, E as Ae } from "./field-error-headless-
|
|
9
|
-
import { L as Te } from "./field-label-headless-
|
|
7
|
+
import { f as h, a as H } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { D as qe, E as Ae } from "./field-error-headless-B6x_cVEi.js";
|
|
9
|
+
import { L as Te } from "./field-label-headless-BibCD8xx.js";
|
|
10
10
|
import { N as $e, S as je } from "./non-modal-popover-DtIMXHbe.js";
|
|
11
11
|
import { u as we } from "./use-invoke-callback-UH73A_J3.js";
|
|
12
|
-
import {
|
|
13
|
-
import de, { AsYouType as
|
|
12
|
+
import { u as Ue } from "./use-is-forced-open-dropdown-CWvcd9Ex.js";
|
|
13
|
+
import de, { AsYouType as ke, isValidPhoneNumber as Ve, isSupportedCountry as Ge } from "libphonenumber-js";
|
|
14
14
|
import "libphonenumber-js/metadata.min.json";
|
|
15
15
|
import { C as re } from "./calling-country-codes-PyWuOTmF.js";
|
|
16
16
|
import { C as He } from "./chevron-down-icon-CcpVm6B-.js";
|
|
17
17
|
import { E as Ye } from "./error-icon-hZxQ6DEy.js";
|
|
18
18
|
import { H as ae } from "./custom-focus-class-_483Pkwp.js";
|
|
19
19
|
import { s as b } from "./field-rac.module-DobpyqOd.js";
|
|
20
|
-
import {
|
|
21
|
-
import { u as
|
|
20
|
+
import { C as ze, S as Ke, n as We, B as Ze, E as Qe, r as Je, j as Xe } from "./form-element-classes-BtKlobUX.js";
|
|
21
|
+
import { u as et } from "./use-dropdown-option-class-name-BFHRYpVL.js";
|
|
22
|
+
import { u as tt } from "./use-text-input-class-name-BYwXccvO.js";
|
|
22
23
|
function se(e) {
|
|
23
24
|
const n = e ? de(e) : void 0, r = n == null ? void 0 : n.country;
|
|
24
25
|
if (r)
|
|
25
26
|
return r;
|
|
26
|
-
const o = new
|
|
27
|
+
const o = new ke();
|
|
27
28
|
return e && o.input(e), o.getCountry();
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function z(e) {
|
|
30
31
|
var n;
|
|
31
32
|
return e && ((n = _e.getCountryByKey(e)) == null ? void 0 : n.dialCode);
|
|
32
33
|
}
|
|
@@ -37,7 +38,7 @@ function ce(e, n) {
|
|
|
37
38
|
if (e && n)
|
|
38
39
|
try {
|
|
39
40
|
const r = de(e, n), o = r == null ? void 0 : r.formatInternational();
|
|
40
|
-
if (o &&
|
|
41
|
+
if (o && Ve(o))
|
|
41
42
|
return o.replace(/\s+/g, "");
|
|
42
43
|
} catch {
|
|
43
44
|
}
|
|
@@ -46,8 +47,8 @@ function ce(e, n) {
|
|
|
46
47
|
function nt() {
|
|
47
48
|
const { t: e } = v(), { language: n } = ue();
|
|
48
49
|
return x(() => Object.keys(re).reduce((o, a) => {
|
|
49
|
-
const l = re[a], s =
|
|
50
|
-
return s &&
|
|
50
|
+
const l = re[a], s = z(l), i = e(`locale-dataset.countries.${l.toUpperCase()}`);
|
|
51
|
+
return s && Ge(a) && o.push({
|
|
51
52
|
countryName: i,
|
|
52
53
|
longCountryCode: l,
|
|
53
54
|
shortCountryCode: a,
|
|
@@ -121,12 +122,12 @@ function at({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange:
|
|
|
121
122
|
};
|
|
122
123
|
}
|
|
123
124
|
const pe = /* @__PURE__ */ le(null), _ = () => {
|
|
124
|
-
const e =
|
|
125
|
+
const e = Y(pe);
|
|
125
126
|
if (!e)
|
|
126
127
|
throw new Error("Phone input components must be used within PhoneInput component");
|
|
127
128
|
return e;
|
|
128
129
|
}, ye = /* @__PURE__ */ le(null), K = () => {
|
|
129
|
-
const e =
|
|
130
|
+
const e = Y(ye);
|
|
130
131
|
if (!e)
|
|
131
132
|
throw new Error("Option sub-components must be used within Option component");
|
|
132
133
|
return e;
|
|
@@ -179,7 +180,7 @@ const pe = /* @__PURE__ */ le(null), _ = () => {
|
|
|
179
180
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, $, L)
|
|
180
181
|
}));
|
|
181
182
|
}, Z = ({ children: e, className: n }) => {
|
|
182
|
-
const { inputId: r, labelId: o } = ie(), { hasError: a, disabled: l, readOnly: s } = M(), { t: i } = v(), { selectedCountryCode: u, countries: m } = _(), p = `${r}-country`, C = u ? m.find((N) => N.shortCountryCode === u) : void 0, d = C &&
|
|
183
|
+
const { inputId: r, labelId: o } = ie(), { hasError: a, disabled: l, readOnly: s } = M(), { t: i } = v(), { selectedCountryCode: u, countries: m } = _(), p = `${r}-country`, C = u ? m.find((N) => N.shortCountryCode === u) : void 0, d = C && z(C.longCountryCode) || "", E = i("field.phone.country-code.aria-label"), y = C ? `${E}, ${C.countryName}, ${d}` : E;
|
|
183
184
|
return /* @__PURE__ */ t.createElement(je, {
|
|
184
185
|
isDisabled: l || s,
|
|
185
186
|
id: p,
|
|
@@ -219,7 +220,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
219
220
|
"aria-label": r
|
|
220
221
|
}, C) : C));
|
|
221
222
|
}, lt = ({ children: e, className: n, overlayClassName: r, "aria-label": o, portalContainer: a = t.Fragment, ...l }) => {
|
|
222
|
-
const { optionsRef: s } = l, { selectedCountryCode: i, handleCountryCodeChange: u } = _(), m =
|
|
223
|
+
const { optionsRef: s } = l, { selectedCountryCode: i, handleCountryCodeChange: u } = _(), m = Y(Ie);
|
|
223
224
|
return /* @__PURE__ */ t.createElement(Fe, {
|
|
224
225
|
className: r,
|
|
225
226
|
isDismissable: !0
|
|
@@ -245,8 +246,8 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
245
246
|
...n,
|
|
246
247
|
renderEmptyState: s ? () => s : void 0
|
|
247
248
|
}, o.map((u) => {
|
|
248
|
-
const m =
|
|
249
|
-
return
|
|
249
|
+
const m = z(u.longCountryCode) || "";
|
|
250
|
+
return H(a, {
|
|
250
251
|
key: u.shortCountryCode,
|
|
251
252
|
countryCode: u.shortCountryCode,
|
|
252
253
|
dialingCode: m,
|
|
@@ -259,7 +260,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
259
260
|
const C = o.find((d) => d.shortCountryCode === p.key);
|
|
260
261
|
return !!C && rt(C, m);
|
|
261
262
|
}
|
|
262
|
-
}, r ?
|
|
263
|
+
}, r ? H(l, {
|
|
263
264
|
autoFocus: !1
|
|
264
265
|
}) : l, i) : i;
|
|
265
266
|
};
|
|
@@ -363,7 +364,7 @@ const mt = ({ className: e }) => {
|
|
|
363
364
|
}, p && /* @__PURE__ */ t.createElement(W, {
|
|
364
365
|
longCountryCode: L[0].longCountryCode
|
|
365
366
|
}), F);
|
|
366
|
-
const X = /* @__PURE__ */ t.createElement(t.Fragment, null, $,
|
|
367
|
+
const X = /* @__PURE__ */ t.createElement(t.Fragment, null, $, H(D, {
|
|
367
368
|
triggerRef: r,
|
|
368
369
|
optionsRef: o,
|
|
369
370
|
isForcedOpen: j
|
|
@@ -434,8 +435,8 @@ const dt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
434
435
|
}), Dt = () => /* @__PURE__ */ t.createElement("span", {
|
|
435
436
|
className: f.chevron,
|
|
436
437
|
"aria-hidden": "true"
|
|
437
|
-
}, /* @__PURE__ */ t.createElement(He, null)),
|
|
438
|
-
const e =
|
|
438
|
+
}, /* @__PURE__ */ t.createElement(He, null)), Xt = () => {
|
|
439
|
+
const e = et(b.selectOptionWithoutFocusRing, f.option, ae), n = tt(f.countrySearch), { t: r } = v(), { isMobile: o, PortalContainer: a } = ue(), l = /* @__PURE__ */ t.createElement(c.CountryOptions.Search, {
|
|
439
440
|
className: n,
|
|
440
441
|
"aria-label": r("field.phone.country-search-input.aria-label")
|
|
441
442
|
}, /* @__PURE__ */ t.createElement(pt, {
|
|
@@ -453,11 +454,11 @@ const dt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
453
454
|
className: f.code
|
|
454
455
|
}));
|
|
455
456
|
return /* @__PURE__ */ t.createElement(c, null, /* @__PURE__ */ t.createElement(c.Label, {
|
|
456
|
-
className: O(
|
|
457
|
+
className: O(ze, b.label)
|
|
457
458
|
}, /* @__PURE__ */ t.createElement(c.Label.Required, {
|
|
458
|
-
className: O(
|
|
459
|
+
className: O(Ke, b.requiredMark)
|
|
459
460
|
})), /* @__PURE__ */ t.createElement(c.Control, {
|
|
460
|
-
className: ({ hasCountryOptions: u }) => O(u ?
|
|
461
|
+
className: ({ hasCountryOptions: u }) => O(u ? We : Ze, b.input, f.control)
|
|
461
462
|
}, /* @__PURE__ */ t.createElement(c.CountryButton, {
|
|
462
463
|
className: f.countryButton
|
|
463
464
|
}, /* @__PURE__ */ t.createElement(c.CountryButton.Flag, {
|
|
@@ -472,16 +473,16 @@ const dt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
472
473
|
portalContainer: a,
|
|
473
474
|
"aria-label": r("field.phone.country-code.aria-label")
|
|
474
475
|
}, l, s, i) : /* @__PURE__ */ t.createElement(c.CountryOptions.Popover, {
|
|
475
|
-
className: O(
|
|
476
|
+
className: O(Qe, b.selectPopover, f.countryOptions),
|
|
476
477
|
placement: "bottom start",
|
|
477
478
|
offset: 0,
|
|
478
479
|
"aria-label": r("field.phone.country-code.aria-label")
|
|
479
480
|
}, l, s, i)), /* @__PURE__ */ t.createElement(c.Error, {
|
|
480
|
-
className: O(
|
|
481
|
+
className: O(Je, b.error)
|
|
481
482
|
}, /* @__PURE__ */ t.createElement(Ye, null), /* @__PURE__ */ t.createElement(c.Error.Text, null)), /* @__PURE__ */ t.createElement(c.Description, {
|
|
482
|
-
className: O(
|
|
483
|
+
className: O(Xe, b.description)
|
|
483
484
|
}, vt));
|
|
484
485
|
};
|
|
485
486
|
export {
|
|
486
|
-
|
|
487
|
+
Xt as P
|
|
487
488
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as K, useCallback as x, useRef as B } from "react";
|
|
2
|
+
import { RicosViewer as $ } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
|
-
import { CheckboxField as
|
|
5
|
-
import { ak as k, ah as Y, ac as w, au as Z, am as ee } from "./form-
|
|
4
|
+
import { CheckboxField as z, CheckboxButton as j, NumberField as J, Group as X, Button as U, Input as W } from "react-aria-components";
|
|
5
|
+
import { ak as k, ah as Y, ac as w, au as Z, am as ee } from "./form-9WmwgGNc.js";
|
|
6
6
|
import { f as O, a as I } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { L as te, g as ne } from "./field-label-headless-
|
|
7
|
+
import { L as te, g as ne } from "./field-label-headless-BibCD8xx.js";
|
|
8
8
|
import { f as ae } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as oe, E as re } from "./field-error-headless-
|
|
9
|
+
import { D as oe, E as re } from "./field-error-headless-B6x_cVEi.js";
|
|
10
10
|
import { F as le } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as ie } from "./selection-indicator-XQ8MYHUQ.js";
|
|
13
13
|
import { E as ce } from "./error-icon-hZxQ6DEy.js";
|
|
14
14
|
import { C as ue } from "./checkbox-indicator-module-classes-DhbNznSB.js";
|
|
15
15
|
import { s as T } from "./field-rac.module-DobpyqOd.js";
|
|
16
|
-
import {
|
|
16
|
+
import { C as me, S as pe, G as de, J as Ee, I as ye, B as fe, r as _e, j as Ie, H as Oe } from "./form-element-classes-BtKlobUX.js";
|
|
17
17
|
import { o as Q } from "./options-rac.module-KM-VT_KY.js";
|
|
18
|
-
import { u as be } from "./use-element-state-class-name-
|
|
18
|
+
import { u as be } from "./use-element-state-class-name-De5YnxMK.js";
|
|
19
19
|
var Le = /* @__PURE__ */ (function(e) {
|
|
20
20
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
21
21
|
})({}), M = /* @__PURE__ */ (function(e) {
|
|
@@ -29,10 +29,10 @@ function Ce({ maxItems: e, products: a } = {}) {
|
|
|
29
29
|
}
|
|
30
30
|
const o = ({ children: e }) => {
|
|
31
31
|
var D;
|
|
32
|
-
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur: b, onFocus: s, hasError: u, validation: m, FieldLayout: p } = k(), { inputId: q, labelId: N, ariaDescribedBy: h } = Y(), f = O(e, o.Label), g = O(e, o.Options), v = O(e, o.Description), L = O(e, o.Error), i =
|
|
32
|
+
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur: b, onFocus: s, hasError: u, validation: m, FieldLayout: p } = k(), { inputId: q, labelId: N, ariaDescribedBy: h } = Y(), f = O(e, o.Label), g = O(e, o.Options), v = O(e, o.Description), L = O(e, o.Error), i = K(() => l || [], [
|
|
33
33
|
l
|
|
34
34
|
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === M.many, F = x((S, R) => {
|
|
35
|
-
const d = i.filter((
|
|
35
|
+
const d = i.filter((G) => G.productId !== S.productId), H = R ? [
|
|
36
36
|
...d,
|
|
37
37
|
S
|
|
38
38
|
] : d;
|
|
@@ -131,14 +131,14 @@ const o = ({ children: e }) => {
|
|
|
131
131
|
hasError: p,
|
|
132
132
|
ariaLabel: R,
|
|
133
133
|
inputRef: h ? v : void 0
|
|
134
|
-
}) : null) : /* @__PURE__ */ t.createElement(
|
|
134
|
+
}) : null) : /* @__PURE__ */ t.createElement(z, {
|
|
135
135
|
isSelected: y,
|
|
136
136
|
onChange: D,
|
|
137
137
|
isDisabled: u,
|
|
138
138
|
isReadOnly: m,
|
|
139
139
|
isInvalid: p,
|
|
140
140
|
"aria-label": R
|
|
141
|
-
}, /* @__PURE__ */ t.createElement(
|
|
141
|
+
}, /* @__PURE__ */ t.createElement(j, {
|
|
142
142
|
ref: g,
|
|
143
143
|
className: a,
|
|
144
144
|
"data-hook": "product"
|
|
@@ -195,7 +195,7 @@ const o = ({ children: e }) => {
|
|
|
195
195
|
}, [
|
|
196
196
|
u
|
|
197
197
|
]);
|
|
198
|
-
return /* @__PURE__ */ t.createElement(
|
|
198
|
+
return /* @__PURE__ */ t.createElement(J, {
|
|
199
199
|
value: l,
|
|
200
200
|
onChange: u,
|
|
201
201
|
minValue: 0,
|
|
@@ -206,7 +206,7 @@ const o = ({ children: e }) => {
|
|
|
206
206
|
"aria-label": b,
|
|
207
207
|
className: e,
|
|
208
208
|
"data-hook": "product-quantity"
|
|
209
|
-
}, /* @__PURE__ */ t.createElement(
|
|
209
|
+
}, /* @__PURE__ */ t.createElement(X, {
|
|
210
210
|
onKeyDown: m
|
|
211
211
|
}, /* @__PURE__ */ t.createElement(U, {
|
|
212
212
|
slot: "decrement"
|
|
@@ -235,7 +235,7 @@ const Se = "_options_11x4v_1", Pe = "_option_11x4v_1", Ne = "_optionInput_11x4v_
|
|
|
235
235
|
optionLabel: ve,
|
|
236
236
|
optionPrice: Ae,
|
|
237
237
|
quantity: Te
|
|
238
|
-
}, qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(
|
|
238
|
+
}, qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement($, {
|
|
239
239
|
content: e,
|
|
240
240
|
locale: a
|
|
241
241
|
}), xe = () => {
|
package/dist/component/{quiz-radio-group-rac-ORLTYxdR.js → quiz-radio-group-rac-B0yiKdbu.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _ from "react";
|
|
2
|
-
import { R } from "./radio-group-field-rac-
|
|
3
|
-
import {
|
|
2
|
+
import { R } from "./radio-group-field-rac-Cug1TtSq.js";
|
|
3
|
+
import { M as o, L as r, K as O } from "./form-element-classes-BtKlobUX.js";
|
|
4
4
|
const I = () => /* @__PURE__ */ _.createElement(R, {
|
|
5
5
|
classes: {
|
|
6
6
|
container: O,
|