@wix/form-elements 1.105.0 → 1.106.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-DaBg4fM3.js → appointment-rac-D2F4vgf1.js} +5 -5
- package/dist/component/{bookings-address-rac-CkCIr0yY.js → bookings-address-rac-_5S8J8_i.js} +1 -1
- package/dist/component/{bookings-email-rac--o2G6bDi.js → bookings-email-rac-6vmDR9nS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-KilnnzGd.js → bookings-first-name-rac-DtTJ4T2K.js} +1 -1
- package/dist/component/{bookings-header-rac-D9PwyQVM.js → bookings-header-rac-B3dsEwzR.js} +1 -1
- package/dist/component/{bookings-last-name-rac-qWHHoFsL.js → bookings-last-name-rac-B3idkbi8.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CA9lwDip.js → bookings-login-bar-rac-CrRBcQwT.js} +4 -4
- package/dist/component/{bookings-phone-rac-CJwbY3yf.js → bookings-phone-rac-BE0yWNnj.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-B-7cedEB.js → bookings-rich-text-rac-CYo1l0-6.js} +1 -1
- package/dist/component/{checkbox-field-rac-D5YjimAI.js → checkbox-field-rac-boTtXVEt.js} +16 -20
- package/dist/component/{checkbox-group-field-headless-BJl8C2Lz.js → checkbox-group-field-headless-DnkUvDm8.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CLDKYOsh.js → checkbox-group-field-rac-DrDTgHMg.js} +11 -11
- package/dist/component/{checkbox-group-rac-DfOsQWr7.js → checkbox-group-rac-v3ozUBpo.js} +1 -1
- package/dist/component/{checkbox-rac-DMDIZxxN.js → checkbox-rac-YSLE-RnG.js} +1 -1
- package/dist/component/{contacts-address-rac-CrpSPX3x.js → contacts-address-rac-C653yaHZ.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-B3vrz3B5.js → contacts-birthdate-rac-BeAQ6shx.js} +1 -1
- package/dist/component/{contacts-company-rac-Nd4-07pv.js → contacts-company-rac-BglKOoTG.js} +1 -1
- package/dist/component/{contacts-email-rac-DlKJXGue.js → contacts-email-rac-D6m7ynfc.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CgfaCG0O.js → contacts-first-name-rac-Dgxn0tUJ.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DmSqTPzC.js → contacts-last-name-rac-1UyIuRKH.js} +1 -1
- package/dist/component/{contacts-phone-rac-C9X_5axq.js → contacts-phone-rac-BQ77BlW4.js} +1 -1
- package/dist/component/{contacts-position-rac-DeJrqxtm.js → contacts-position-rac-BUDUv7lv.js} +1 -1
- package/dist/component/contacts-subscribe-rac-DdtA0qKW.js +6 -0
- package/dist/component/{contacts-tax-id-rac-6pMwtJyC.js → contacts-tax-id-rac-WUaKcNl0.js} +1 -1
- package/dist/component/{date-availability-DfL_xDci.js → date-availability-XjBFq8jt.js} +1 -1
- package/dist/component/{date-input-field-rac-DvlY0Ffu.js → date-input-field-rac-aY2zuuKs.js} +13 -13
- package/dist/component/{date-input-rac-Dr_MtbFO.js → date-input-rac-DRiP2_97.js} +1 -1
- package/dist/component/{date-picker-field-rac-D42hJF0j.js → date-picker-field-rac-Bzl-d3Uj.js} +27 -27
- package/dist/component/{date-picker-rac-CtoqWMPa.js → date-picker-rac-DHHUh8vn.js} +1 -1
- package/dist/component/{date-time-input-field-rac-C1rf0_aD.js → date-time-input-field-rac-DP_StuLr.js} +26 -26
- package/dist/component/{date-time-input-rac-gFwBZVcJ.js → date-time-input-rac-B11KIxsf.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-B0dh55yz.js → dext-checkbox-group-rac-BHZBqyWv.js} +2 -2
- package/dist/component/{dext-checkbox-rac-RQ7hpkFn.js → dext-checkbox-rac-BIlAqEvV.js} +1 -1
- package/dist/component/{dext-date-picker-rac-sJEfD5E6.js → dext-date-picker-rac-CHBXNrZi.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BxPE1oVN.js → dext-date-time-input-rac-BYtliKry.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BimIan_Z.js → dext-dropdown-rac-C2VPSFV5.js} +1 -1
- package/dist/component/{dext-email-rac-CjrC85Va.js → dext-email-rac-Fnb0Ggcs.js} +1 -1
- package/dist/component/{dext-number-input-rac-CkMRmcJQ.js → dext-number-input-rac-DopfSyFi.js} +1 -1
- package/dist/component/{dext-phone-rac-DO3qV3WL.js → dext-phone-rac-Rn4i_2rc.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CUaqRQSf.js → dext-radio-group-rac-bNaskJpK.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CIRU2af7.js → dext-rating-input-rac-DL6ZZd7d.js} +1 -1
- package/dist/component/{dext-tags-rac-DHqXtqOo.js → dext-tags-rac-TsUPoImO.js} +2 -2
- package/dist/component/{dext-text-area-rac-yBONPzSt.js → dext-text-area-rac-BIuY7LTd.js} +1 -1
- package/dist/component/{dext-text-input-rac-CdhAUC2i.js → dext-text-input-rac-CSYPW0Qi.js} +1 -1
- package/dist/component/{dext-url-input-rac-B4IQEsp2.js → dext-url-input-rac-_g0lqGfW.js} +1 -1
- package/dist/component/{donation-rac-D-rWK7OY.js → donation-rac-BYKFtsyR.js} +55 -55
- package/dist/component/{dropdown-field-headless-CeDAK-PU.js → dropdown-field-headless-CBaqlNZi.js} +4 -4
- package/dist/component/{dropdown-field-rac-BzqUmKJ1.js → dropdown-field-rac-CCAGSMm3.js} +5 -5
- package/dist/component/{dropdown-rac-CHO-8WoH.js → dropdown-rac-C_EqUsZ1.js} +1 -1
- package/dist/component/{ecom-address-rac-BZVqOncl.js → ecom-address-rac-Bw9eH0iF.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BpILYYtb.js → ecom-subscription-checkbox-rac-B5PVOO2a.js} +10 -17
- package/dist/component/{email-input-field-rac-Cb6ECUnT.js → email-input-field-rac-B2kqQ6yo.js} +12 -12
- package/dist/component/{events-repeater-rac-BaYgjHjJ.js → events-repeater-rac--4OnUxWE.js} +53 -53
- package/dist/component/{events-rsvp-rac-CK0hpQKD.js → events-rsvp-rac-CczCoo3T.js} +12 -12
- package/dist/component/{field-error-headless-CN2-F78X.js → field-error-headless-D3-1L5sf.js} +1 -1
- package/dist/component/{field-label-headless-Ca6NcX2l.js → field-label-headless-Du4ckIVy.js} +1 -1
- package/dist/component/{file-upload-rac-C0DqDLp2.js → file-upload-rac-DbdkUbWM.js} +79 -79
- package/dist/component/{fixed-payment-rac-C5qNAT_7.js → fixed-payment-rac-f9-01iDN.js} +7 -7
- package/dist/component/{form-D1xJH87b.js → form-DQauhsho.js} +69 -69
- package/dist/component/form-element-classes-bLFmhsKw.js +137 -0
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BN-Ib7VY.js → header-field-rac-DamDk5BR.js} +3 -3
- package/dist/component/{header-rac-CE0NjfoF.js → header-rac-CR9T3Pnu.js} +1 -1
- package/dist/component/{image-choice-rac-D6dIXR_x.js → image-choice-rac-DJ_8v467.js} +12 -12
- package/dist/component/{index-CcsZgBFf.js → index-BB7d_9Dv.js} +4 -4
- package/dist/component/{index-DOd4eW8z.js → index-CcUTIUWM.js} +2 -2
- package/dist/component/{isObjectLike-DfUDKPeo.js → isObjectLike-xvPa_08X.js} +1 -1
- package/dist/component/{multiline-address-field-rac-jJ5HMakk.js → multiline-address-field-rac-CyaFOloE.js} +79 -79
- package/dist/component/{multiline-address-rac-GQF9HaNq.js → multiline-address-rac-CaHGUN_f.js} +1 -1
- package/dist/component/{number-input-field-rac-DRgq3Ll0.js → number-input-field-rac-BuYUzDWV.js} +14 -14
- package/dist/component/{number-input-rac-C2VoBZeq.js → number-input-rac-DMKX6nhk.js} +1 -1
- package/dist/component/{password-rac-DP8d_92z.js → password-rac-0RUXPAn6.js} +37 -37
- package/dist/component/{payment-input-rac-BycHF-zC.js → payment-input-rac-CHSZ3-Lt.js} +16 -16
- package/dist/component/{phone-input-field-rac-C3_-Dc35.js → phone-input-field-rac-JmIFcP1e.js} +28 -28
- package/dist/component/{phone-rac-DAxScWRl.js → phone-rac-BLRnAPXP.js} +1 -1
- package/dist/component/{product-list-rac-Bxdu4NFP.js → product-list-rac-BkF5tDwt.js} +9 -9
- package/dist/component/quiz-radio-group-rac-32cCMTUS.js +6 -0
- package/dist/component/{radio-button-module-classes-D71u96Y9.js → radio-button-module-classes-IOulhuSH.js} +3 -3
- package/dist/component/radio-group-field-rac-CJwku6e0.js +46 -0
- package/dist/component/{radio-group-rac-DqdjCYmd.js → radio-group-rac-BiW-9Abj.js} +1 -1
- package/dist/component/{rating-input-field-rac-C4Ztlh1u.js → rating-input-field-rac-B9cwaROK.js} +29 -29
- package/dist/component/{rating-input-rac-B4lF_LX7.js → rating-input-rac-BpwlNvzQ.js} +1 -1
- package/dist/component/{rich-content-rac.module-CmW7FwmQ.js → rich-content-rac.module-B1uyPmtK.js} +1 -1
- package/dist/component/{rich-text-field-rac-MwKpKbvj.js → rich-text-field-rac-C_qE7Ykg.js} +3 -3
- package/dist/component/{rich-text-rac-DcMBqEFb.js → rich-text-rac-VfeZxS27.js} +1 -1
- package/dist/component/{service-dropdown-rac-CZWVFnR8.js → service-dropdown-rac-BCfs8IhW.js} +17 -17
- package/dist/component/{services-multi-choice-rac-DvHcWQHS.js → services-multi-choice-rac-CCqdF_7P.js} +6 -6
- package/dist/component/{signature-rac-CMTAWkaY.js → signature-rac-DOyMo3u0.js} +72 -72
- package/dist/component/{submit-button-rac-HnfWQ8wg.js → submit-button-rac-C2uA5DeE.js} +11 -11
- package/dist/component/{tags-field-rac-BuqOeG7-.js → tags-field-rac-C_uIw2by.js} +35 -35
- package/dist/component/{tags-rac-FbHwPPKs.js → tags-rac-1pQ-fpe_.js} +1 -1
- package/dist/component/{text-area-field-rac-Bq224M1o.js → text-area-field-rac-DqlOkm7e.js} +22 -22
- package/dist/component/{text-area-rac-COcGlAYk.js → text-area-rac-DPdkrFcH.js} +1 -1
- package/dist/component/{text-input-field-rac-CTS4jFhC.js → text-input-field-rac-CmXm6r1w.js} +5 -5
- package/dist/component/{text-input-headless-QVLKSgJE.js → text-input-headless-DD__2DFf.js} +3 -3
- package/dist/component/{text-input-rac-BCCkVVG9.js → text-input-rac-DRHyQEH7.js} +1 -1
- package/dist/component/{time-input-rac-7n8d5ppJ.js → time-input-rac-BJPIymQY.js} +21 -21
- package/dist/component/{url-input-field-rac-ChPfhq6I.js → url-input-field-rac-CFDYkZ6I.js} +14 -14
- package/dist/component/{url-input-rac-cFZ8HC3U.js → url-input-rac-C0ChQUzq.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-Cf2B9xAE.js → use-dropdown-option-class-name-3L5ZmNLK.js} +2 -2
- package/dist/component/{use-element-state-class-name-DF2VZawA.js → use-element-state-class-name-BatTc2bw.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-B_knxuKJ.js → use-is-forced-open-dropdown-B0jiPTmS.js} +1 -1
- package/dist/component/{use-service-options-base-Clx3S0du.js → use-service-options-base-oeE7xszw.js} +1 -1
- package/dist/component/{use-text-input-class-name-MbmOF6tH.js → use-text-input-class-name-LQ5S-NLh.js} +3 -3
- package/package.json +2 -2
- package/dist/component/contacts-subscribe-rac-Dv-QNZZc.js +0 -13
- package/dist/component/form-element-classes-BtKlobUX.js +0 -192
- package/dist/component/quiz-radio-group-rac-mAn0MuPW.js +0 -13
- package/dist/component/radio-group-field-rac-eij4o0_R.js +0 -50
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as N, useRef as S } 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 A } from "./form-
|
|
5
|
-
import { TextField as B, Group as
|
|
4
|
+
import { ak as E, ah as I, am as O, au as A } from "./form-DQauhsho.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-
|
|
7
|
+
import { D as M, E as k } from "./field-error-headless-D3-1L5sf.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-Du4ckIVy.js";
|
|
9
9
|
import { E as j } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { H as U } from "./custom-focus-class-_483Pkwp.js";
|
|
11
11
|
import { s as p } from "./field-rac.module-B4l_0KRU.js";
|
|
12
|
-
import {
|
|
13
|
-
import { u as
|
|
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 { v as H, J as W, o as Z, j as G } from "./form-element-classes-bLFmhsKw.js";
|
|
13
|
+
import { u as J } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
14
|
+
const t = ({ children: o, className: r }) => {
|
|
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] = N(!1), F = u(o, t.Label), L = u(o, t.Control), T = u(o, t.Description), h = u(o, t.Error);
|
|
16
16
|
return /* @__PURE__ */ e.createElement(_, {
|
|
17
17
|
fieldId: l,
|
|
18
18
|
renderLabel: () => F,
|
|
@@ -26,17 +26,17 @@ const t = ({ children: r, className: o }) => {
|
|
|
26
26
|
isInvalid: i,
|
|
27
27
|
onBlur: f,
|
|
28
28
|
onFocus: C,
|
|
29
|
-
className:
|
|
29
|
+
className: r
|
|
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
|
-
},
|
|
37
|
-
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(
|
|
38
|
-
return /* @__PURE__ */ e.createElement(
|
|
39
|
-
className:
|
|
36
|
+
}, Q = ({ children: o, className: r, ...l }) => {
|
|
37
|
+
const { isVisible: s, onToggleVisibility: c } = l, { disabled: n, hasError: m } = E(), a = u(o, t.Input), i = u(o, t.Toggle);
|
|
38
|
+
return /* @__PURE__ */ e.createElement(v, {
|
|
39
|
+
className: r,
|
|
40
40
|
isDisabled: n,
|
|
41
41
|
isInvalid: m
|
|
42
42
|
}, g(a, {
|
|
@@ -45,39 +45,39 @@ const t = ({ children: r, className: o }) => {
|
|
|
45
45
|
isVisible: s,
|
|
46
46
|
onToggleVisibility: c
|
|
47
47
|
}));
|
|
48
|
-
},
|
|
49
|
-
const { isVisible: l } =
|
|
48
|
+
}, $ = ({ className: o, ...r }) => {
|
|
49
|
+
const { isVisible: l } = r, { id: s, placeholder: c } = E(), { inputId: n, ariaDescribedBy: m } = I(), a = S(null);
|
|
50
50
|
return O(() => {
|
|
51
51
|
var i;
|
|
52
52
|
(i = a.current) == null || i.focus();
|
|
53
|
-
}, s), /* @__PURE__ */ e.createElement(
|
|
53
|
+
}, s), /* @__PURE__ */ e.createElement(V, {
|
|
54
54
|
ref: a,
|
|
55
55
|
id: n,
|
|
56
56
|
type: l ? "text" : "password",
|
|
57
57
|
"aria-describedby": m,
|
|
58
|
-
className:
|
|
58
|
+
className: o,
|
|
59
59
|
placeholder: c
|
|
60
60
|
});
|
|
61
|
-
},
|
|
62
|
-
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l :
|
|
61
|
+
}, z = ({ className: o, showPasswordTooltipText: r, hidePasswordTooltipText: l, children: s, ...c }) => {
|
|
62
|
+
const { isVisible: n, onToggleVisibility: m } = c, { disabled: a } = E(), i = n ? l : r;
|
|
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: o
|
|
70
70
|
}, s == null ? void 0 : s({
|
|
71
71
|
isVisible: n
|
|
72
72
|
}));
|
|
73
73
|
};
|
|
74
74
|
t.Label = q;
|
|
75
|
-
t.Control =
|
|
76
|
-
t.Input =
|
|
77
|
-
t.Toggle =
|
|
75
|
+
t.Control = Q;
|
|
76
|
+
t.Input = $;
|
|
77
|
+
t.Toggle = z;
|
|
78
78
|
t.Description = M;
|
|
79
79
|
t.Error = k;
|
|
80
|
-
const K = (
|
|
80
|
+
const K = (o) => /* @__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 = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
85
85
|
stroke: "currentColor",
|
|
86
86
|
strokeWidth: "1.5",
|
|
87
87
|
"aria-hidden": "true",
|
|
88
|
-
...
|
|
88
|
+
...o
|
|
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 = (o) => /* @__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 = (r) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
100
100
|
stroke: "currentColor",
|
|
101
101
|
strokeWidth: "1.5",
|
|
102
102
|
"aria-hidden": "true",
|
|
103
|
-
...
|
|
103
|
+
...o
|
|
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 = (r) => /* @__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: o, locale: r }) => /* @__PURE__ */ e.createElement(x, {
|
|
119
|
+
content: o,
|
|
120
|
+
locale: r
|
|
121
|
+
}), oe = () => {
|
|
122
|
+
const { t: o } = A(), r = J(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: r
|
|
129
129
|
}, /* @__PURE__ */ e.createElement(t.Input, {
|
|
130
130
|
className: d(p.innerInput, U)
|
|
131
131
|
}), /* @__PURE__ */ e.createElement(t.Toggle, {
|
|
132
132
|
className: b.toggleButton,
|
|
133
|
-
showPasswordTooltipText:
|
|
134
|
-
hidePasswordTooltipText:
|
|
133
|
+
showPasswordTooltipText: o("forms.widget.modals.show-password-tooltip"),
|
|
134
|
+
hidePasswordTooltipText: o("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
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(oe, null);
|
|
141
141
|
export {
|
|
142
142
|
be as PasswordRAC
|
|
143
143
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import r, { useCallback as P, useRef as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import r, { useCallback as P, useRef as J } from "react";
|
|
2
|
+
import { RicosViewer as Q } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
|
-
import { TextField as
|
|
5
|
-
import { ak as R, ah as D, ac as T, au as W, am as X } from "./form-
|
|
4
|
+
import { TextField as w, Group as z, Input as K } from "react-aria-components";
|
|
5
|
+
import { ak as R, ah as D, ac as T, au as W, am as X } from "./form-DQauhsho.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-
|
|
7
|
+
import { D as Y, E as Z } from "./field-error-headless-D3-1L5sf.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-Du4ckIVy.js";
|
|
9
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-B4l_0KRU.js";
|
|
14
|
-
import {
|
|
15
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
14
|
+
import { v as se, J as oe, o as le, j as ce } from "./form-element-classes-bLFmhsKw.js";
|
|
15
|
+
import { u as ie } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
16
16
|
function ue(e, t) {
|
|
17
17
|
return {
|
|
18
18
|
productId: e.id,
|
|
@@ -58,11 +58,11 @@ const n = ({ children: e }) => {
|
|
|
58
58
|
c,
|
|
59
59
|
_,
|
|
60
60
|
I
|
|
61
|
-
]),
|
|
61
|
+
]), v = i(e, n.Label), B = i(e, n.Input), U = i(e, n.Description), H = i(e, n.Error);
|
|
62
62
|
return /* @__PURE__ */ r.createElement(M, {
|
|
63
63
|
fieldId: t,
|
|
64
|
-
renderLabel: () =>
|
|
65
|
-
renderInput: () => /* @__PURE__ */ r.createElement(
|
|
64
|
+
renderLabel: () => v,
|
|
65
|
+
renderInput: () => /* @__PURE__ */ r.createElement(w, {
|
|
66
66
|
"aria-labelledby": `${q} ${G}`,
|
|
67
67
|
value: a ? F : "",
|
|
68
68
|
onChange: k,
|
|
@@ -72,12 +72,12 @@ const n = ({ children: e }) => {
|
|
|
72
72
|
isInvalid: b,
|
|
73
73
|
onBlur: $,
|
|
74
74
|
onFocus: E
|
|
75
|
-
},
|
|
76
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H,
|
|
75
|
+
}, B),
|
|
76
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, H, U)
|
|
77
77
|
});
|
|
78
78
|
}, f = ({ children: e, className: t }) => {
|
|
79
79
|
const { disabled: a, hasError: s } = R(), u = i(e, f.Currency), m = i(e, f.Value);
|
|
80
|
-
return /* @__PURE__ */ r.createElement(
|
|
80
|
+
return /* @__PURE__ */ r.createElement(z, {
|
|
81
81
|
className: t,
|
|
82
82
|
isDisabled: a,
|
|
83
83
|
isInvalid: s
|
|
@@ -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 } = R(), { inputId: u, labelId: m, prefixId: y, ariaDescribedBy: b } = D(), o =
|
|
94
|
+
const { id: t, placeholder: a, label: s } = R(), { inputId: u, labelId: m, prefixId: y, ariaDescribedBy: b } = D(), o = J(null);
|
|
95
95
|
return X(() => {
|
|
96
96
|
var E;
|
|
97
97
|
(E = o.current) == null || E.focus();
|
|
@@ -115,7 +115,7 @@ n.Error = Z;
|
|
|
115
115
|
const de = "_inputGroup_vuy4u_1", fe = "_currency_vuy4u_14", x = {
|
|
116
116
|
inputGroup: de,
|
|
117
117
|
currency: fe
|
|
118
|
-
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(
|
|
118
|
+
}, Ee = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(Q, {
|
|
119
119
|
content: e,
|
|
120
120
|
locale: t
|
|
121
121
|
}), Ie = () => {
|
package/dist/component/{phone-input-field-rac-C3_-Dc35.js → phone-input-field-rac-JmIFcP1e.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
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
|
|
4
|
-
import { a3 as _e, au as
|
|
3
|
+
import t, { useMemo as x, useState as B, useRef as v, useEffect as U, useCallback as oe, createContext as le, useContext as Y } from "react";
|
|
4
|
+
import { a3 as _e, au as P, ac as ue, at as Ne, ak as M, ah as ie, am as Se } from "./form-DQauhsho.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as Le } from "react-aria";
|
|
6
|
-
import { Dialog as me, OverlayTriggerStateContext as Ie, ModalOverlay as Fe, Modal as
|
|
6
|
+
import { Dialog as me, OverlayTriggerStateContext as Ie, ModalOverlay as Fe, Modal as ve, SearchField as Pe, 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
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-
|
|
9
|
-
import { L as Te } from "./field-label-headless-
|
|
8
|
+
import { D as qe, E as Ae } from "./field-error-headless-D3-1L5sf.js";
|
|
9
|
+
import { L as Te } from "./field-label-headless-Du4ckIVy.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 { u as Ue } from "./use-is-forced-open-dropdown-
|
|
12
|
+
import { u as Ue } from "./use-is-forced-open-dropdown-B0jiPTmS.js";
|
|
13
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";
|
|
@@ -17,9 +17,9 @@ 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-B4l_0KRU.js";
|
|
20
|
-
import {
|
|
21
|
-
import { u as et } from "./use-dropdown-option-class-name-
|
|
22
|
-
import { u as tt } from "./use-text-input-class-name-
|
|
20
|
+
import { v as ze, J as Ke, n as We, u as Ze, x as Je, o as Qe, j as Xe } from "./form-element-classes-bLFmhsKw.js";
|
|
21
|
+
import { u as et } from "./use-dropdown-option-class-name-3L5ZmNLK.js";
|
|
22
|
+
import { u as tt } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
23
23
|
function se(e) {
|
|
24
24
|
const n = e ? de(e) : void 0, r = n == null ? void 0 : n.country;
|
|
25
25
|
if (r)
|
|
@@ -45,7 +45,7 @@ function ce(e, n) {
|
|
|
45
45
|
return e;
|
|
46
46
|
}
|
|
47
47
|
function nt() {
|
|
48
|
-
const { t: e } =
|
|
48
|
+
const { t: e } = P(), { language: n } = ue();
|
|
49
49
|
return x(() => Object.keys(re).reduce((o, a) => {
|
|
50
50
|
const l = re[a], s = z(l), i = e(`locale-dataset.countries.${l.toUpperCase()}`);
|
|
51
51
|
return s && Ge(a) && o.push({
|
|
@@ -70,7 +70,7 @@ function V(e, n) {
|
|
|
70
70
|
return e.toLowerCase().includes(n.toLowerCase());
|
|
71
71
|
}
|
|
72
72
|
function at({ value: e, defaultCountryCode: n, allowedCountryCodes: r, onChange: o }) {
|
|
73
|
-
const [a, l] = B(e || ""), s =
|
|
73
|
+
const [a, l] = B(e || ""), s = v(k(e ?? null) ?? ""), [i, u] = B(n);
|
|
74
74
|
Ne(() => {
|
|
75
75
|
l(""), s.current = "", u(n), o("");
|
|
76
76
|
});
|
|
@@ -180,7 +180,7 @@ const pe = /* @__PURE__ */ le(null), _ = () => {
|
|
|
180
180
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, $, L)
|
|
181
181
|
}));
|
|
182
182
|
}, Z = ({ children: e, className: n }) => {
|
|
183
|
-
const { inputId: r, labelId: o } = ie(), { hasError: a, disabled: l, readOnly: s } = M(), { t: i } =
|
|
183
|
+
const { inputId: r, labelId: o } = ie(), { hasError: a, disabled: l, readOnly: s } = M(), { t: i } = P(), { 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;
|
|
184
184
|
return /* @__PURE__ */ t.createElement(je, {
|
|
185
185
|
isDisabled: l || s,
|
|
186
186
|
id: p,
|
|
@@ -224,7 +224,7 @@ const g = ({ children: e, className: n, "aria-label": r, placement: o, offset: a
|
|
|
224
224
|
return /* @__PURE__ */ t.createElement(Fe, {
|
|
225
225
|
className: r,
|
|
226
226
|
isDismissable: !0
|
|
227
|
-
}, /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(
|
|
227
|
+
}, /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(ve, {
|
|
228
228
|
ref: s,
|
|
229
229
|
className: n
|
|
230
230
|
}, /* @__PURE__ */ t.createElement(me, {
|
|
@@ -268,7 +268,7 @@ g.Popover = g;
|
|
|
268
268
|
g.Modal = lt;
|
|
269
269
|
const fe = ({ className: e, children: n, "aria-label": r, ...o }) => {
|
|
270
270
|
const { autoFocus: a = !0 } = o;
|
|
271
|
-
return /* @__PURE__ */ t.createElement(
|
|
271
|
+
return /* @__PURE__ */ t.createElement(Pe, {
|
|
272
272
|
"aria-label": r,
|
|
273
273
|
autoFocus: a
|
|
274
274
|
}, /* @__PURE__ */ t.createElement(G, {
|
|
@@ -320,7 +320,7 @@ q.Name = ge;
|
|
|
320
320
|
q.Code = be;
|
|
321
321
|
g.Option = q;
|
|
322
322
|
const mt = ({ className: e }) => {
|
|
323
|
-
const { t: n } =
|
|
323
|
+
const { t: n } = P(), { inputId: r, ariaDescribedBy: o } = ie(), { id: a, placeholder: l, disabled: s, readOnly: i, required: u, label: m, hasError: p } = M(), { currentValue: C, handlePhoneChange: d } = _(), E = v(null);
|
|
324
324
|
return Se(() => {
|
|
325
325
|
var y;
|
|
326
326
|
(y = E.current) == null || y.focus({
|
|
@@ -342,9 +342,9 @@ const mt = ({ className: e }) => {
|
|
|
342
342
|
className: e
|
|
343
343
|
});
|
|
344
344
|
}, Ct = ({ children: e, className: n }) => {
|
|
345
|
-
const r =
|
|
345
|
+
const r = v(null), o = v(null), a = v(!1), { id: l, disabled: s, readOnly: i, required: u, hasError: m, showFlag: p, onFocus: C, onBlur: d } = M(), [E, y] = B(!1), N = we(d), { t: S } = P(), { selectedCountryCode: A, handleCountryCodeChange: T, countries: L } = _(), $ = h(e, c.CountryButton), I = h(e, c.CountryOptions.Modal), D = I ?? h(e, c.CountryOptions.Popover), F = h(e, c.PhoneNumber), R = L.length > 1, j = Ue(l) && !I && R, J = typeof n == "function" ? n({
|
|
346
346
|
hasCountryOptions: R
|
|
347
|
-
}) : n,
|
|
347
|
+
}) : n, Q = {
|
|
348
348
|
onFocus: () => {
|
|
349
349
|
a.current || (a.current = !0, C == null || C());
|
|
350
350
|
},
|
|
@@ -357,10 +357,10 @@ const mt = ({ className: e }) => {
|
|
|
357
357
|
if (L.length === 1)
|
|
358
358
|
return /* @__PURE__ */ t.createElement(G, {
|
|
359
359
|
ref: r,
|
|
360
|
-
className:
|
|
360
|
+
className: J,
|
|
361
361
|
isDisabled: s,
|
|
362
362
|
isInvalid: m,
|
|
363
|
-
...
|
|
363
|
+
...Q
|
|
364
364
|
}, p && /* @__PURE__ */ t.createElement(W, {
|
|
365
365
|
longCountryCode: L[0].longCountryCode
|
|
366
366
|
}), F);
|
|
@@ -371,10 +371,10 @@ const mt = ({ className: e }) => {
|
|
|
371
371
|
}));
|
|
372
372
|
return /* @__PURE__ */ t.createElement(G, {
|
|
373
373
|
ref: r,
|
|
374
|
-
className:
|
|
374
|
+
className: J,
|
|
375
375
|
isDisabled: s,
|
|
376
376
|
isInvalid: m,
|
|
377
|
-
...
|
|
377
|
+
...Q
|
|
378
378
|
}, I ? /* @__PURE__ */ t.createElement(Re, null, X) : /* @__PURE__ */ t.createElement(xe, {
|
|
379
379
|
"aria-label": S("field.phone.country-code.aria-label"),
|
|
380
380
|
value: A ?? null,
|
|
@@ -414,7 +414,7 @@ const dt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
414
414
|
}, /* @__PURE__ */ t.createElement("path", {
|
|
415
415
|
fillRule: "evenodd",
|
|
416
416
|
d: "M6.6108,14.3887 C5.5718,13.3497 4.9998,11.9687 4.9998,10.4997 C4.9998,9.0317 5.5718,7.6507 6.6108,6.6117 C7.6498,5.5727 9.0308,4.9997 10.4998,4.9997 C11.9688,4.9997 13.3498,5.5727 14.3888,6.6117 C15.4278,7.6507 15.9998,9.0317 15.9998,10.4997 C15.9998,11.9687 15.4278,13.3497 14.3888,14.3887 C13.3498,15.4277 11.9688,15.9997 10.4998,15.9997 C9.0308,15.9997 7.6498,15.4277 6.6108,14.3887 L6.6108,14.3887 Z M20.0028,19.2957 L15.4328,14.7247 C16.4438,13.5477 16.9998,12.0687 16.9998,10.4997 C16.9998,8.7637 16.3238,7.1317 15.0958,5.9047 C13.8688,4.6767 12.2358,3.9997 10.4998,3.9997 C8.7638,3.9997 7.1318,4.6767 5.9038,5.9047 C4.6758,7.1317 3.9998,8.7637 3.9998,10.4997 C3.9998,12.2367 4.6758,13.8677 5.9038,15.0957 C7.1318,16.3237 8.7638,16.9997 10.4998,16.9997 C12.0688,16.9997 13.5478,16.4437 14.7258,15.4317 L19.2958,20.0027 L20.0028,19.2957 Z"
|
|
417
|
-
})), yt = "_control_124jq_1", Et = "_countryButton_124jq_9", ft = "_chevron_124jq_25", ht = "_globeIcon_124jq_34", gt = "_searchIcon_124jq_35", bt = "_flag_124jq_44", Ot = "_phoneNumber_124jq_59", _t = "_countryOptions_124jq_85", Nt = "_option_124jq_93", St = "_countrySearch_124jq_102", Lt = "_mobileDrawer_124jq_110", It = "_name_124jq_119", Ft = "_code_124jq_123",
|
|
417
|
+
})), yt = "_control_124jq_1", Et = "_countryButton_124jq_9", ft = "_chevron_124jq_25", ht = "_globeIcon_124jq_34", gt = "_searchIcon_124jq_35", bt = "_flag_124jq_44", Ot = "_phoneNumber_124jq_59", _t = "_countryOptions_124jq_85", Nt = "_option_124jq_93", St = "_countrySearch_124jq_102", Lt = "_mobileDrawer_124jq_110", It = "_name_124jq_119", Ft = "_code_124jq_123", vt = "_mobileOverlay_124jq_140", f = {
|
|
418
418
|
control: yt,
|
|
419
419
|
countryButton: Et,
|
|
420
420
|
chevron: ft,
|
|
@@ -428,15 +428,15 @@ const dt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
428
428
|
mobileDrawer: Lt,
|
|
429
429
|
name: It,
|
|
430
430
|
code: Ft,
|
|
431
|
-
mobileOverlay:
|
|
432
|
-
},
|
|
431
|
+
mobileOverlay: vt
|
|
432
|
+
}, Pt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(Oe, {
|
|
433
433
|
content: e,
|
|
434
434
|
locale: n
|
|
435
435
|
}), Dt = () => /* @__PURE__ */ t.createElement("span", {
|
|
436
436
|
className: f.chevron,
|
|
437
437
|
"aria-hidden": "true"
|
|
438
438
|
}, /* @__PURE__ */ t.createElement(He, null)), Xt = () => {
|
|
439
|
-
const e = et(b.selectOptionWithoutFocusRing, f.option, ae), n = tt(f.countrySearch), { t: r } =
|
|
439
|
+
const e = et(b.selectOptionWithoutFocusRing, f.option, ae), n = tt(f.countrySearch), { t: r } = P(), { isMobile: o, PortalContainer: a } = ue(), l = /* @__PURE__ */ t.createElement(c.CountryOptions.Search, {
|
|
440
440
|
className: n,
|
|
441
441
|
"aria-label": r("field.phone.country-search-input.aria-label")
|
|
442
442
|
}, /* @__PURE__ */ t.createElement(pt, {
|
|
@@ -473,15 +473,15 @@ const dt = (e) => /* @__PURE__ */ t.createElement("svg", {
|
|
|
473
473
|
portalContainer: a,
|
|
474
474
|
"aria-label": r("field.phone.country-code.aria-label")
|
|
475
475
|
}, l, s, i) : /* @__PURE__ */ t.createElement(c.CountryOptions.Popover, {
|
|
476
|
-
className: O(
|
|
476
|
+
className: O(Je, b.selectPopover, f.countryOptions),
|
|
477
477
|
placement: "bottom start",
|
|
478
478
|
offset: 0,
|
|
479
479
|
"aria-label": r("field.phone.country-code.aria-label")
|
|
480
480
|
}, l, s, i)), /* @__PURE__ */ t.createElement(c.Error, {
|
|
481
|
-
className: O(
|
|
481
|
+
className: O(Qe, b.error)
|
|
482
482
|
}, /* @__PURE__ */ t.createElement(Ye, null), /* @__PURE__ */ t.createElement(c.Error.Text, null)), /* @__PURE__ */ t.createElement(c.Description, {
|
|
483
483
|
className: O(Xe, b.description)
|
|
484
|
-
},
|
|
484
|
+
}, Pt));
|
|
485
485
|
};
|
|
486
486
|
export {
|
|
487
487
|
Xt as P
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import t, { useMemo as K, useCallback as x, useRef as B } from "react";
|
|
2
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 G, 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-DQauhsho.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-Du4ckIVy.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-D3-1L5sf.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-BpeSpGsW.js";
|
|
15
15
|
import { s as T } from "./field-rac.module-B4l_0KRU.js";
|
|
16
|
-
import {
|
|
16
|
+
import { v as me, J as pe, y as de, C as Ee, B as ye, u as fe, o as _e, j as Ie, z as Oe } from "./form-element-classes-bLFmhsKw.js";
|
|
17
17
|
import { o as Q } from "./options-rac.module-CTDdATiz.js";
|
|
18
|
-
import { u as be } from "./use-element-state-class-name-
|
|
18
|
+
import { u as be } from "./use-element-state-class-name-BatTc2bw.js";
|
|
19
19
|
var Le = /* @__PURE__ */ (function(e) {
|
|
20
20
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
21
21
|
})({}), M = /* @__PURE__ */ (function(e) {
|
|
@@ -32,11 +32,11 @@ const o = ({ children: e }) => {
|
|
|
32
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((H) => H.productId !== S.productId), z = R ? [
|
|
36
36
|
...d,
|
|
37
37
|
S
|
|
38
38
|
] : d;
|
|
39
|
-
n == null || n(
|
|
39
|
+
n == null || n(z);
|
|
40
40
|
}, [
|
|
41
41
|
i,
|
|
42
42
|
n
|
|
@@ -131,7 +131,7 @@ 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(G, {
|
|
135
135
|
isSelected: y,
|
|
136
136
|
onChange: D,
|
|
137
137
|
isDisabled: u,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import l, { useRef as S, useState as V, useEffect as T, useCallback as B } from "react";
|
|
2
2
|
import { RadioGroup as H, RadioField as k, RadioButton as A, TextField as G, Input as P } from "react-aria-components";
|
|
3
|
-
import { ak as v, ah as $, au as F, am as x } from "./form-
|
|
3
|
+
import { ak as v, ah as $, au as F, am as x } from "./form-DQauhsho.js";
|
|
4
4
|
import { f as u, a as g } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as M } from "./field-error-headless-
|
|
6
|
-
import { L as j } from "./field-label-headless-
|
|
5
|
+
import { D as U, E as M } from "./field-error-headless-D3-1L5sf.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-Du4ckIVy.js";
|
|
7
7
|
import { S as w } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
8
|
const L = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), y = (e, t) => !!t && !z(e, t), J = (e, t) => {
|
|
9
9
|
const a = t ? t.length + 2 : 0;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import e from "react";
|
|
4
|
+
import { a, s, R as n } from "./radio-button-module-classes-IOulhuSH.js";
|
|
5
|
+
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
+
import { s as r } from "./field-rac.module-B4l_0KRU.js";
|
|
7
|
+
import { v as E, J as i, D as p, E as O, o as R, j as _, G as I } from "./form-element-classes-bLFmhsKw.js";
|
|
8
|
+
import { u as L } from "./use-element-state-class-name-BatTc2bw.js";
|
|
9
|
+
import { u as N } from "./use-text-input-class-name-LQ5S-NLh.js";
|
|
10
|
+
const u = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
11
|
+
content: o,
|
|
12
|
+
locale: l
|
|
13
|
+
}), b = () => {
|
|
14
|
+
const o = L({
|
|
15
|
+
globalClasses: I,
|
|
16
|
+
moduleClasses: n
|
|
17
|
+
}), l = N();
|
|
18
|
+
return /* @__PURE__ */ e.createElement(a, {
|
|
19
|
+
className: s.group
|
|
20
|
+
}, /* @__PURE__ */ e.createElement(a.Label, {
|
|
21
|
+
className: t(E, r.label)
|
|
22
|
+
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
23
|
+
className: t(i, r.requiredMark)
|
|
24
|
+
}), /* @__PURE__ */ e.createElement(a.Label.Image, {
|
|
25
|
+
className: s.labelImage
|
|
26
|
+
})), /* @__PURE__ */ e.createElement(a.Options, {
|
|
27
|
+
className: t(p, s.options)
|
|
28
|
+
}, /* @__PURE__ */ e.createElement(a.Option, {
|
|
29
|
+
className: s.option
|
|
30
|
+
}, /* @__PURE__ */ e.createElement(a.Option.Input, {
|
|
31
|
+
className: s.optionInput
|
|
32
|
+
}), /* @__PURE__ */ e.createElement(a.Option.Control, {
|
|
33
|
+
className: o
|
|
34
|
+
}), /* @__PURE__ */ e.createElement(a.Option.Label, {
|
|
35
|
+
className: t(O, s.optionLabel)
|
|
36
|
+
}), /* @__PURE__ */ e.createElement(a.Option.OtherInput, {
|
|
37
|
+
className: l
|
|
38
|
+
}))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
39
|
+
className: t(R, r.error)
|
|
40
|
+
}, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
41
|
+
className: t(_, r.description)
|
|
42
|
+
}, u));
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
b as R
|
|
46
|
+
};
|