@wix/form-elements 1.87.0 → 1.88.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-DiPF4326.js → appointment-rac-DG8GUJpn.js} +5 -5
- package/dist/component/{bookings-address-rac-DuqMUPYH.js → bookings-address-rac-cNBSx-Pr.js} +1 -1
- package/dist/component/{bookings-email-rac-C4uKdWr-.js → bookings-email-rac-CYdSoVWP.js} +1 -1
- package/dist/component/{bookings-first-name-rac-D8Iu-SNH.js → bookings-first-name-rac-CQB2o8ww.js} +1 -1
- package/dist/component/{bookings-header-rac-Df7inEbP.js → bookings-header-rac-CzKvQond.js} +1 -1
- package/dist/component/{bookings-last-name-rac-3GrFylkJ.js → bookings-last-name-rac-oK1BC5Am.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Cmm93hGY.js → bookings-login-bar-rac-CZNEy748.js} +2 -2
- package/dist/component/{bookings-phone-rac-CfdQ5qR1.js → bookings-phone-rac-D_4WfolC.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CAFLGrDr.js → bookings-rich-text-rac-CrEfeL4P.js} +1 -1
- package/dist/component/{checkbox-field-rac-D4TSHtYp.js → checkbox-field-rac-CGqshW45.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-BtorRj0k.js → checkbox-group-field-headless-C3_5IR-E.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CSZjtiTd.js → checkbox-group-field-rac-DIzdgyAw.js} +4 -4
- package/dist/component/{checkbox-group-rac-DVa2KhXh.js → checkbox-group-rac-EvWVfusV.js} +1 -1
- package/dist/component/{checkbox-rac-BEAyFkKn.js → checkbox-rac-CT_69Jei.js} +1 -1
- package/dist/component/{contacts-address-rac-DRiJ7oWN.js → contacts-address-rac-M8MZd777.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-pFthm4vI.js → contacts-birthdate-rac-BS-8HeRD.js} +1 -1
- package/dist/component/{contacts-company-rac-Bkf19ZXI.js → contacts-company-rac-gmgKLvic.js} +1 -1
- package/dist/component/{contacts-email-rac-eG6dMktK.js → contacts-email-rac-QQ6E9VzX.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BGM8vurp.js → contacts-first-name-rac-DR7XheRo.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CB3YwF_-.js → contacts-last-name-rac-CBJgTkj5.js} +1 -1
- package/dist/component/{contacts-phone-rac-C-k6Np0j.js → contacts-phone-rac-CTl25HdK.js} +1 -1
- package/dist/component/{contacts-position-rac-DbBwVhvF.js → contacts-position-rac-DBDOW7QR.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DPFEKv8D.js → contacts-subscribe-rac-C0-uJ7fU.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-DUe69xy2.js → contacts-tax-id-rac-BtXc0V1S.js} +1 -1
- package/dist/component/{date-availability-LsRBBF2w.js → date-availability-IQtwk-aX.js} +1 -1
- package/dist/component/{date-input-field-rac-8tT_tvxK.js → date-input-field-rac-2rbZiSgo.js} +5 -5
- package/dist/component/{date-input-rac-XNgfU9bx.js → date-input-rac-j4--xZ8s.js} +1 -1
- package/dist/component/{date-picker-field-rac-BrVIS9sI.js → date-picker-field-rac-Cl7ueVVn.js} +5 -5
- package/dist/component/{date-picker-rac-ldp-6ccS.js → date-picker-rac-BrObkuYv.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CoHc9hOG.js → date-time-input-field-rac-mqea6CtW.js} +5 -5
- package/dist/component/{date-time-input-rac-BaCayitG.js → date-time-input-rac-BShquR72.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Zhmol3mv.js → dext-checkbox-group-rac-DNXYnHDM.js} +2 -2
- package/dist/component/{dext-checkbox-rac-ByYJS2iR.js → dext-checkbox-rac-RBMWmgyT.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DsKWfvPj.js → dext-date-picker-rac-Dph_kV11.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BEinQWMz.js → dext-date-time-input-rac-C3_gQkBT.js} +1 -1
- package/dist/component/{dext-dropdown-rac-FuoCb4hK.js → dext-dropdown-rac-D34vhtST.js} +1 -1
- package/dist/component/{dext-email-rac-CfTAbFH5.js → dext-email-rac-Yzf4-vSg.js} +1 -1
- package/dist/component/{dext-number-input-rac-CwGC_pv7.js → dext-number-input-rac-D0jZXKaI.js} +1 -1
- package/dist/component/{dext-phone-rac-CgMCLDYK.js → dext-phone-rac-bqTpmTa0.js} +1 -1
- package/dist/component/{dext-radio-group-rac-XB40HDWO.js → dext-radio-group-rac-AYPAzpqZ.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BeoGv6No.js → dext-rating-input-rac-DOSq-xVQ.js} +1 -1
- package/dist/component/{dext-tags-rac-DJ0DWl1v.js → dext-tags-rac-BXtFTlL0.js} +2 -2
- package/dist/component/{dext-text-area-rac-3X-i3Lf_.js → dext-text-area-rac-46wwBQg_.js} +1 -1
- package/dist/component/{dext-text-input-rac-DJa5OTo5.js → dext-text-input-rac-DVj6V1VG.js} +1 -1
- package/dist/component/{dext-url-input-rac-DgsZYkzF.js → dext-url-input-rac-B5zu9R5K.js} +1 -1
- package/dist/component/{donation-rac-DvklUsO9.js → donation-rac-DeBMssGg.js} +6 -6
- package/dist/component/{dropdown-field-headless-CMvvmkUR.js → dropdown-field-headless-ShcoDfPa.js} +3 -3
- package/dist/component/{dropdown-field-rac-Dogcbl1j.js → dropdown-field-rac-DruF_YdZ.js} +2 -2
- package/dist/component/{dropdown-rac-CMCVoUmd.js → dropdown-rac-bUNYh49x.js} +1 -1
- package/dist/component/{ecom-address-rac-B-x688-1.js → ecom-address-rac-CtrERV3f.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-2SO8p_Mh.js → ecom-subscription-checkbox-rac-BrpwOSYM.js} +3 -3
- package/dist/component/{email-input-field-rac-CWVqDqUg.js → email-input-field-rac-4yYxYc1a.js} +4 -4
- package/dist/component/{events-repeater-rac-Br-ida6_.js → events-repeater-rac-B308C1JK.js} +4 -4
- package/dist/component/{events-rsvp-rac-BwABDdyN.js → events-rsvp-rac-C4_LJ3Wz.js} +3 -3
- package/dist/component/{field-error-headless-D4iJBghM.js → field-error-headless-PMBWtb3Z.js} +1 -1
- package/dist/component/{field-label-headless-CzJhv-wS.js → field-label-headless-0racVfdo.js} +1 -1
- package/dist/component/{file-upload-rac-DU6INU4J.js → file-upload-rac-CZIHV2OL.js} +4 -4
- package/dist/component/{fixed-payment-rac-DEn6L3zu.js → fixed-payment-rac-COhRKeun.js} +4 -4
- package/dist/component/{form-Dt3W_RUv.js → form-UCnayEKT.js} +69 -69
- package/dist/component/{form-element-classes-BhFk9Jrj.js → form-element-classes--p2vz_Bm.js} +65 -76
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-D0K0BqUG.js → header-field-rac-CpXa-NlC.js} +3 -3
- package/dist/component/{header-rac-DyIg-Ltz.js → header-rac-CCsguMlZ.js} +1 -1
- package/dist/component/{image-choice-rac-DMjIkxUy.js → image-choice-rac-j2UH4Q4I.js} +5 -5
- package/dist/component/{index-BovDughA.js → index-Bxa3IDHm.js} +4 -4
- package/dist/component/{index-DiFa7GGa.js → index-jg8dn8po.js} +2 -2
- package/dist/component/{isObjectLike-CUZBx88n.js → isObjectLike-Zw6J9g91.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CK5u9I0i.js → multiline-address-field-rac-BeFAYL7V.js} +6 -6
- package/dist/component/{multiline-address-rac-w0tpyTzt.js → multiline-address-rac-BYr5_DQd.js} +1 -1
- package/dist/component/{number-input-field-rac-CVOSoBnw.js → number-input-field-rac-BNdJecUL.js} +5 -5
- package/dist/component/{number-input-rac-DXEMqaqN.js → number-input-rac-Cqkj4JAF.js} +1 -1
- package/dist/component/{password-rac-9pZro4oK.js → password-rac-D4iSs1ds.js} +5 -5
- package/dist/component/{payment-input-rac-D9oGt1IQ.js → payment-input-rac-BvBP47HP.js} +5 -5
- package/dist/component/{phone-input-field-rac-B_MnDM0g.js → phone-input-field-rac-Cggx8IlY.js} +4 -4
- package/dist/component/{phone-rac-BqoY5RbY.js → phone-rac-BISmYt_n.js} +1 -1
- package/dist/component/{product-list-rac-B_ZzTsCB.js → product-list-rac-C1bm-U2G.js} +5 -5
- package/dist/component/{quiz-radio-group-rac-Ct2fFqIn.js → quiz-radio-group-rac-BhNhoOSI.js} +2 -2
- package/dist/component/{radio-button-module-classes-PHiNEQN2.js → radio-button-module-classes-blfiatlc.js} +3 -3
- package/dist/component/{radio-group-field-rac-Dfs4JSH_.js → radio-group-field-rac-BiiPUxbQ.js} +4 -4
- package/dist/component/{radio-group-rac-D9SSPWcI.js → radio-group-rac-Bn_W-3xz.js} +1 -1
- package/dist/component/{rating-input-field-rac-BFdsvsk2.js → rating-input-field-rac-CjXIoNMc.js} +5 -5
- package/dist/component/{rating-input-rac-hG1mVqe-.js → rating-input-rac-Ci4uPo22.js} +1 -1
- package/dist/component/{rich-content-rac.module-BnJHWZW_.js → rich-content-rac.module-CDZniyrZ.js} +1 -1
- package/dist/component/{rich-text-field-rac-CYRioe4F.js → rich-text-field-rac-BBRE9_Kr.js} +3 -3
- package/dist/component/{rich-text-rac-BVFGMc9w.js → rich-text-rac-C3MfJK-H.js} +1 -1
- package/dist/component/{service-dropdown-rac-BDrEc7Zb.js → service-dropdown-rac-DQkk3SlS.js} +4 -4
- package/dist/component/services-multi-choice-rac-FDHRjDLS.js +85 -0
- package/dist/component/{signature-rac-eZQzl11r.js → signature-rac-DfGPV0Mw.js} +4 -4
- package/dist/component/{submit-button-rac-DeGY6ugG.js → submit-button-rac-DRsqyJcl.js} +2 -2
- package/dist/component/{tags-field-rac-CZ5TvoyT.js → tags-field-rac-CZ4FBGG9.js} +50 -50
- package/dist/component/{tags-rac-DXznht8H.js → tags-rac-CMHMsiwv.js} +1 -1
- package/dist/component/{text-area-field-rac-B5qohjUV.js → text-area-field-rac-BnRuG5y8.js} +5 -5
- package/dist/component/{text-area-rac-B1KlbayF.js → text-area-rac-BKGDa4E3.js} +1 -1
- package/dist/component/{text-input-field-rac-CHQcR47F.js → text-input-field-rac-CU8eBRM4.js} +3 -3
- package/dist/component/{text-input-headless-CRm8bo7P.js → text-input-headless-C1eFy2gl.js} +3 -3
- package/dist/component/{text-input-rac-BfQViUSp.js → text-input-rac-DO0eI3ty.js} +1 -1
- package/dist/component/{time-input-rac-BhhojlSG.js → time-input-rac-BJ0AL2Be.js} +5 -5
- package/dist/component/{url-input-field-rac-cvzCBb8W.js → url-input-field-rac-BtpAuKfp.js} +5 -5
- package/dist/component/{url-input-rac-C_sH1Z5C.js → url-input-rac-CjnPbcHt.js} +1 -1
- package/dist/component/{use-element-state-class-name-CeL6xkSj.js → use-element-state-class-name-X08kIFhd.js} +1 -1
- package/dist/component/{use-service-options-base-_vksQyAH.js → use-service-options-base-DfHhMveM.js} +1 -1
- package/dist/component/{use-text-input-class-name-DLHJl2sm.js → use-text-input-class-name-BAuokapo.js} +3 -3
- package/package.json +2 -2
- package/dist/component/services-multi-choice-rac-RauhMlXM.js +0 -84
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { RicosViewer as j } from "@wix/ricos/viewer";
|
|
2
2
|
import S from "classnames";
|
|
3
|
-
import e, { useMemo as _, useState as Q, useRef as M, useLayoutEffect as
|
|
4
|
-
import { CheckboxGroup as
|
|
5
|
-
import { aj as N, ag as
|
|
3
|
+
import e, { useMemo as _, useState as Q, useRef as M, useLayoutEffect as Y, useCallback as k } from "react";
|
|
4
|
+
import { CheckboxGroup as Z, TextField as w, Input as z, CheckboxField as J, CheckboxButton as K } from "react-aria-components";
|
|
5
|
+
import { aj as N, ag as X, at as v, ab as ee, al as te } from "./form-UCnayEKT.js";
|
|
6
6
|
import { f, a as x } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { E as B, D as
|
|
8
|
-
import { L as
|
|
7
|
+
import { E as B, D as P } from "./field-error-headless-PMBWtb3Z.js";
|
|
8
|
+
import { L as $ } from "./field-label-headless-0racVfdo.js";
|
|
9
9
|
import { F as oe } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { N as D } from "./options-layout-constants-DEfIEJWD.js";
|
|
11
|
-
import { E as
|
|
11
|
+
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as y } from "./field-rac.module-D06m9T9x.js";
|
|
13
|
-
import { y as
|
|
13
|
+
import { y as ae, P as se, Y as re, o as le, i as ie, Z as ce } from "./form-element-classes--p2vz_Bm.js";
|
|
14
14
|
import { o as ue } from "./options-rac.module-KM-VT_KY.js";
|
|
15
|
-
import { u as de } from "./use-element-state-class-name-
|
|
16
|
-
import { u as me } from "./use-text-input-class-name-
|
|
15
|
+
import { u as de } from "./use-element-state-class-name-X08kIFhd.js";
|
|
16
|
+
import { u as me } from "./use-text-input-class-name-BAuokapo.js";
|
|
17
17
|
const R = "Other", pe = (o, t) => {
|
|
18
18
|
const s = t.length + 2;
|
|
19
19
|
return (o.find((r) => r.startsWith(`${t}: `)) || "").slice(s);
|
|
20
20
|
}, he = (o) => o.map((t) => t.value ?? t.label), H = ({ className: o, ...t }) => {
|
|
21
|
-
const { label:
|
|
21
|
+
const { label: a } = t;
|
|
22
22
|
return /* @__PURE__ */ e.createElement("span", {
|
|
23
23
|
className: o
|
|
24
|
-
},
|
|
24
|
+
}, a);
|
|
25
25
|
}, W = ({ className: o }) => {
|
|
26
|
-
const { value: t, onChange:
|
|
26
|
+
const { value: t, onChange: a, addOtherLabel: s, addOtherPlaceholder: c, otherInputCharacterLimit: r, disabled: u, readOnly: b, hasError: d } = N(), { t: m } = v(), l = s || m("add-other.default-other-option-label") || R, p = _(() => pe(t || [], l), [
|
|
27
27
|
t,
|
|
28
28
|
l
|
|
29
|
-
]), [
|
|
30
|
-
|
|
31
|
-
h.current =
|
|
29
|
+
]), [n, L] = Q(p), h = M(a);
|
|
30
|
+
Y(() => {
|
|
31
|
+
h.current = a;
|
|
32
32
|
});
|
|
33
33
|
const C = k((E) => {
|
|
34
34
|
L(E);
|
|
@@ -41,22 +41,22 @@ const R = "Other", pe = (o, t) => {
|
|
|
41
41
|
t,
|
|
42
42
|
l
|
|
43
43
|
]);
|
|
44
|
-
return /* @__PURE__ */ e.createElement(
|
|
45
|
-
value:
|
|
44
|
+
return /* @__PURE__ */ e.createElement(w, {
|
|
45
|
+
value: n,
|
|
46
46
|
onChange: C,
|
|
47
47
|
isDisabled: u,
|
|
48
48
|
isReadOnly: b,
|
|
49
49
|
isInvalid: d,
|
|
50
50
|
"aria-label": l
|
|
51
|
-
}, /* @__PURE__ */ e.createElement(
|
|
51
|
+
}, /* @__PURE__ */ e.createElement(z, {
|
|
52
52
|
"data-hook": "tags-other-input",
|
|
53
|
-
"data-filled":
|
|
53
|
+
"data-filled": n ? !0 : void 0,
|
|
54
54
|
placeholder: c,
|
|
55
55
|
maxLength: r,
|
|
56
56
|
className: o
|
|
57
57
|
}));
|
|
58
|
-
}, T = ({ children: o, className: t, ...
|
|
59
|
-
const { value: s, label: c, isOther: r, isFirstOption: u } =
|
|
58
|
+
}, T = ({ children: o, className: t, ...a }) => {
|
|
59
|
+
const { value: s, label: c, isOther: r, isFirstOption: u } = a, { id: b, value: d, onChange: m, options: l, disabled: p, readOnly: n, hasError: L } = N(), h = M(null);
|
|
60
60
|
te(() => {
|
|
61
61
|
var O;
|
|
62
62
|
u && ((O = h.current) == null || O.focus({
|
|
@@ -82,14 +82,14 @@ const R = "Other", pe = (o, t) => {
|
|
|
82
82
|
l,
|
|
83
83
|
E
|
|
84
84
|
]);
|
|
85
|
-
return /* @__PURE__ */ e.createElement(
|
|
85
|
+
return /* @__PURE__ */ e.createElement(J, {
|
|
86
86
|
inputRef: h,
|
|
87
87
|
value: I,
|
|
88
88
|
onChange: r ? F : void 0,
|
|
89
89
|
isDisabled: p,
|
|
90
|
-
isReadOnly:
|
|
90
|
+
isReadOnly: n,
|
|
91
91
|
isInvalid: L
|
|
92
|
-
}, /* @__PURE__ */ e.createElement(
|
|
92
|
+
}, /* @__PURE__ */ e.createElement(K, {
|
|
93
93
|
className: t,
|
|
94
94
|
"data-hook": `tags-${r ? R : s}`
|
|
95
95
|
}, x(C, {
|
|
@@ -99,37 +99,37 @@ const R = "Other", pe = (o, t) => {
|
|
|
99
99
|
isFirstOption: u
|
|
100
100
|
})));
|
|
101
101
|
}, V = ({ children: o, className: t }) => {
|
|
102
|
-
const { options:
|
|
103
|
-
const
|
|
102
|
+
const { options: a, addOther: s, addOtherLabel: c, numberOfColumns: r = D.FREE_FLOW } = N(), { isMobile: u } = ee(), { t: b } = v(), d = u && r !== D.FREE_FLOW ? D.ONE : r, m = c || b("add-other.default-other-option-label") || R, l = f(o, T), p = _(() => {
|
|
103
|
+
const n = a || [];
|
|
104
104
|
return s ? [
|
|
105
|
-
...
|
|
105
|
+
...n,
|
|
106
106
|
{
|
|
107
107
|
label: m,
|
|
108
108
|
value: m,
|
|
109
109
|
isOther: !0
|
|
110
110
|
}
|
|
111
|
-
] :
|
|
111
|
+
] : n;
|
|
112
112
|
}, [
|
|
113
|
-
|
|
113
|
+
a,
|
|
114
114
|
s,
|
|
115
115
|
m
|
|
116
116
|
]);
|
|
117
117
|
return p.length === 0 ? null : /* @__PURE__ */ e.createElement("div", {
|
|
118
118
|
className: t,
|
|
119
119
|
"data-columns": d
|
|
120
|
-
}, p.map((
|
|
121
|
-
const h =
|
|
120
|
+
}, p.map((n, L) => {
|
|
121
|
+
const h = n.value ?? n.label;
|
|
122
122
|
return x(l, {
|
|
123
|
-
key:
|
|
123
|
+
key: n.isOther ? R : h,
|
|
124
124
|
value: h,
|
|
125
|
-
label:
|
|
126
|
-
isOther:
|
|
125
|
+
label: n.label,
|
|
126
|
+
isOther: n.isOther,
|
|
127
127
|
isFirstOption: L === 0
|
|
128
128
|
});
|
|
129
129
|
}));
|
|
130
130
|
}, q = ({ children: o, className: t }) => {
|
|
131
|
-
const { addOther:
|
|
132
|
-
|
|
131
|
+
const { addOther: a, addOtherLabel: s, hasError: c, readOnly: r, value: u } = N(), { t: b } = v(), d = s || b("add-other.default-other-option-label") || R, m = f(o, V), l = f(o, W), p = _(() => !a || !u ? !1 : u.some((n) => n === d || n.startsWith(`${d}:`)), [
|
|
132
|
+
a,
|
|
133
133
|
u,
|
|
134
134
|
d
|
|
135
135
|
]);
|
|
@@ -139,21 +139,21 @@ const R = "Other", pe = (o, t) => {
|
|
|
139
139
|
"data-readonly": r
|
|
140
140
|
}, m, p && l);
|
|
141
141
|
}, i = ({ children: o }) => {
|
|
142
|
-
const { id: t, value:
|
|
143
|
-
|
|
144
|
-
]), C = f(o,
|
|
142
|
+
const { id: t, value: a, onChange: s, FieldLayout: c, required: r, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: l } = N(), { inputId: p, labelId: n, ariaDescribedBy: L } = X(), h = _(() => a || [], [
|
|
143
|
+
a
|
|
144
|
+
]), C = f(o, $), E = f(o, q), I = f(o, P), F = f(o, B);
|
|
145
145
|
return /* @__PURE__ */ e.createElement(c, {
|
|
146
146
|
fieldId: t,
|
|
147
147
|
renderLabel: () => C,
|
|
148
148
|
renderInput: () => /* @__PURE__ */ e.createElement(oe, {
|
|
149
149
|
id: p,
|
|
150
|
-
ariaLabelledBy:
|
|
150
|
+
ariaLabelledBy: n,
|
|
151
151
|
ariaDescribedBy: L,
|
|
152
152
|
required: r,
|
|
153
153
|
onBlur: m,
|
|
154
154
|
onFocus: l
|
|
155
|
-
}, /* @__PURE__ */ e.createElement(
|
|
156
|
-
"aria-labelledby":
|
|
155
|
+
}, /* @__PURE__ */ e.createElement(Z, {
|
|
156
|
+
"aria-labelledby": n,
|
|
157
157
|
value: h,
|
|
158
158
|
onChange: s,
|
|
159
159
|
isDisabled: u,
|
|
@@ -166,11 +166,11 @@ const R = "Other", pe = (o, t) => {
|
|
|
166
166
|
};
|
|
167
167
|
V.Option = T;
|
|
168
168
|
T.Label = H;
|
|
169
|
-
i.Label =
|
|
169
|
+
i.Label = $;
|
|
170
170
|
i.Control = q;
|
|
171
171
|
i.Options = V;
|
|
172
172
|
i.OtherInput = W;
|
|
173
|
-
i.Description =
|
|
173
|
+
i.Description = P;
|
|
174
174
|
i.Error = B;
|
|
175
175
|
const Ee = "_control_7oh59_1", Oe = "_options_7oh59_7", be = "_option_7oh59_7", fe = "_optionHover_7oh59_72", Le = "_optionSelected_7oh59_72", g = {
|
|
176
176
|
control: Ee,
|
|
@@ -185,13 +185,13 @@ const Ee = "_control_7oh59_1", Oe = "_options_7oh59_7", be = "_option_7oh59_7",
|
|
|
185
185
|
base: g.option,
|
|
186
186
|
selected: g.optionSelected,
|
|
187
187
|
hover: g.optionHover
|
|
188
|
-
},
|
|
188
|
+
}, Pe = () => {
|
|
189
189
|
const o = de({
|
|
190
190
|
globalClasses: ce,
|
|
191
191
|
moduleClasses: Ce
|
|
192
192
|
}), t = me();
|
|
193
193
|
return /* @__PURE__ */ e.createElement(i, null, /* @__PURE__ */ e.createElement(i.Label, {
|
|
194
|
-
className: S(
|
|
194
|
+
className: S(ae, y.label)
|
|
195
195
|
}, /* @__PURE__ */ e.createElement(i.Label.Required, {
|
|
196
196
|
className: S(se, y.requiredMark)
|
|
197
197
|
})), /* @__PURE__ */ e.createElement(i.Control, {
|
|
@@ -199,8 +199,8 @@ const Ee = "_control_7oh59_1", Oe = "_options_7oh59_7", be = "_option_7oh59_7",
|
|
|
199
199
|
}, /* @__PURE__ */ e.createElement(i.Options, {
|
|
200
200
|
className: S(re, g.options)
|
|
201
201
|
}, /* @__PURE__ */ e.createElement(i.Options.Option, {
|
|
202
|
-
className: ({ isSelected:
|
|
203
|
-
isSelected:
|
|
202
|
+
className: ({ isSelected: a, isHovered: s }) => o({
|
|
203
|
+
isSelected: a,
|
|
204
204
|
isHovered: s
|
|
205
205
|
})
|
|
206
206
|
}, /* @__PURE__ */ e.createElement(i.Options.Option.Label, {
|
|
@@ -209,10 +209,10 @@ const Ee = "_control_7oh59_1", Oe = "_options_7oh59_7", be = "_option_7oh59_7",
|
|
|
209
209
|
className: t
|
|
210
210
|
})), /* @__PURE__ */ e.createElement(i.Error, {
|
|
211
211
|
className: S(le, y.error)
|
|
212
|
-
}, /* @__PURE__ */ e.createElement(
|
|
212
|
+
}, /* @__PURE__ */ e.createElement(ne, null), /* @__PURE__ */ e.createElement(i.Error.Text, null)), /* @__PURE__ */ e.createElement(i.Description, {
|
|
213
213
|
className: S(ie, y.description)
|
|
214
214
|
}, _e));
|
|
215
215
|
};
|
|
216
216
|
export {
|
|
217
|
-
|
|
217
|
+
Pe as T
|
|
218
218
|
};
|
|
@@ -2,14 +2,14 @@ import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
|
2
2
|
import o from "classnames";
|
|
3
3
|
import r, { useCallback as T, useRef as y } from "react";
|
|
4
4
|
import { TextField as O, TextArea as S } from "react-aria-components";
|
|
5
|
-
import { aj as p, ag as d, al as x } from "./form-
|
|
5
|
+
import { aj as p, ag as d, al as x } from "./form-UCnayEKT.js";
|
|
6
6
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as g, E as h } from "./field-error-headless-
|
|
8
|
-
import { L as v } from "./field-label-headless-
|
|
7
|
+
import { D as g, E as h } from "./field-error-headless-PMBWtb3Z.js";
|
|
8
|
+
import { L as v } from "./field-label-headless-0racVfdo.js";
|
|
9
9
|
import { E as M } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as c } from "./field-rac.module-D06m9T9x.js";
|
|
11
|
-
import { y as q, P as B, o as P, i as k } from "./form-element-classes
|
|
12
|
-
import { u as V } from "./use-text-input-class-name-
|
|
11
|
+
import { y as q, P as B, o as P, i as k } from "./form-element-classes--p2vz_Bm.js";
|
|
12
|
+
import { u as V } from "./use-text-input-class-name-BAuokapo.js";
|
|
13
13
|
const e = ({ children: t }) => {
|
|
14
14
|
const { id: a, value: m, onChange: s, disabled: u, required: n, readOnly: l, onBlur: E, onFocus: f, FieldLayout: I, hasError: b } = p(), { labelId: F } = d(), L = T((A) => {
|
|
15
15
|
s(A);
|
package/dist/component/{text-input-field-rac-CHQcR47F.js → text-input-field-rac-CU8eBRM4.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RicosViewer as l } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { T as r } from "./text-input-headless-
|
|
4
|
+
import { T as r } from "./text-input-headless-C1eFy2gl.js";
|
|
5
5
|
import { E as o } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as a } from "./field-rac.module-D06m9T9x.js";
|
|
7
|
-
import { y as n, P as c, o as E, i } from "./form-element-classes
|
|
8
|
-
import { u as p } from "./use-text-input-class-name-
|
|
7
|
+
import { y as n, P as c, o as E, i } from "./form-element-classes--p2vz_Bm.js";
|
|
8
|
+
import { u as p } from "./use-text-input-class-name-BAuokapo.js";
|
|
9
9
|
const I = ({ content: s, locale: m }) => /* @__PURE__ */ e.createElement(l, {
|
|
10
10
|
content: s,
|
|
11
11
|
locale: m
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import t, { useRef as L } from "react";
|
|
2
2
|
import { TextField as R, Input as g } from "react-aria-components";
|
|
3
|
-
import { aj as d, ag as c, al as v } from "./form-
|
|
3
|
+
import { aj as d, ag as c, al as v } from "./form-UCnayEKT.js";
|
|
4
4
|
import { f as a } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as T, E as h } from "./field-error-headless-
|
|
6
|
-
import { L as x } from "./field-label-headless-
|
|
5
|
+
import { D as T, E as h } from "./field-error-headless-PMBWtb3Z.js";
|
|
6
|
+
import { L as x } from "./field-label-headless-0racVfdo.js";
|
|
7
7
|
const e = ({ children: r }) => {
|
|
8
8
|
const { id: s, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, FieldLayout: f } = d(), { labelId: E } = c(), I = a(r, e.Label), F = a(r, e.Input), y = a(r, e.Description), D = a(r, e.Error);
|
|
9
9
|
return /* @__PURE__ */ t.createElement(f, {
|
|
@@ -3,15 +3,15 @@ import { RicosViewer as v } from "@wix/ricos/viewer";
|
|
|
3
3
|
import c from "classnames";
|
|
4
4
|
import { parseTime as B } from "@internationalized/date";
|
|
5
5
|
import { TimeField as k, DateInput as U, DateSegment as _, TimeFieldStateContext as j } from "react-aria-components";
|
|
6
|
-
import { aj as p, ag as w, at as S, al as Q } from "./form-
|
|
6
|
+
import { aj as p, ag as w, at as S, al as Q } from "./form-UCnayEKT.js";
|
|
7
7
|
import { f as m, a as F } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { D as z, E as G } from "./field-error-headless-
|
|
9
|
-
import { L as J } from "./field-label-headless-
|
|
8
|
+
import { D as z, E as G } from "./field-error-headless-PMBWtb3Z.js";
|
|
9
|
+
import { L as J } from "./field-label-headless-0racVfdo.js";
|
|
10
10
|
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { H as T } from "./custom-focus-class-_483Pkwp.js";
|
|
12
12
|
import { s as f } from "./field-rac.module-D06m9T9x.js";
|
|
13
|
-
import { y as W, P as X, o as Y, i as Z } from "./form-element-classes
|
|
14
|
-
import { u as $ } from "./use-text-input-class-name-
|
|
13
|
+
import { y as W, P as X, o as Y, i as Z } from "./form-element-classes--p2vz_Bm.js";
|
|
14
|
+
import { u as $ } from "./use-text-input-class-name-BAuokapo.js";
|
|
15
15
|
const r = ({ children: t }) => {
|
|
16
16
|
const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: E, use24HourFormat: g, FieldLayout: C, hasError: I } = p(), { inputId: D, ariaDescribedBy: L, labelId: R } = w(), b = V((M) => {
|
|
17
17
|
const H = ae(M);
|
|
@@ -2,15 +2,15 @@ import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useCallback as h, useRef as y } from "react";
|
|
4
4
|
import { TextField as O, Input as A } from "react-aria-components";
|
|
5
|
-
import { aj as d, ag as E, al as g } from "./form-
|
|
5
|
+
import { aj as d, ag as E, al as g } from "./form-UCnayEKT.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as B, E as P } from "./field-error-headless-
|
|
8
|
-
import { L as T } from "./field-label-headless-
|
|
7
|
+
import { D as B, E as P } from "./field-error-headless-PMBWtb3Z.js";
|
|
8
|
+
import { L as T } from "./field-label-headless-0racVfdo.js";
|
|
9
9
|
import { u as k } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
10
|
import { E as v } from "./error-icon-hZxQ6DEy.js";
|
|
11
11
|
import { s as u } from "./field-rac.module-D06m9T9x.js";
|
|
12
|
-
import { y as M, P as q, o as x, i as U } from "./form-element-classes
|
|
13
|
-
import { u as w } from "./use-text-input-class-name-
|
|
12
|
+
import { y as M, P as q, o as x, i as U } from "./form-element-classes--p2vz_Bm.js";
|
|
13
|
+
import { u as w } from "./use-text-input-class-name-BAuokapo.js";
|
|
14
14
|
const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
15
15
|
const { id: o, value: a, onChange: s, disabled: m, readOnly: n, required: l, hasError: I, onBlur: f, onFocus: b, FieldLayout: R } = d(), { labelId: F } = E(), p = k(f), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
|
|
16
16
|
s(V(a)), p();
|
package/dist/component/{use-service-options-base-_vksQyAH.js → use-service-options-base-DfHhMveM.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
|
|
2
|
-
import { ai as v } from "./form-
|
|
2
|
+
import { ai as v } from "./form-UCnayEKT.js";
|
|
3
3
|
const k = (I) => {
|
|
4
4
|
const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = D((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { aj as l } from "./form-
|
|
1
|
+
import { aj as l } from "./form-UCnayEKT.js";
|
|
2
2
|
import { s } from "./field-rac.module-D06m9T9x.js";
|
|
3
|
-
import {
|
|
4
|
-
import { u as i } from "./use-element-state-class-name-
|
|
3
|
+
import { _ as m } from "./form-element-classes--p2vz_Bm.js";
|
|
4
|
+
import { u as i } from "./use-element-state-class-name-X08kIFhd.js";
|
|
5
5
|
const c = (...e) => {
|
|
6
6
|
const { disabled: a, readOnly: t } = l(), o = i({
|
|
7
7
|
globalClasses: m,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.88.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -154,5 +154,5 @@
|
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
|
-
"falconPackageHash": "
|
|
157
|
+
"falconPackageHash": "f042722120cba843a71b20de04b5cc540fe12ba957cb739ba58c56d6"
|
|
158
158
|
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import e, { useEffect as _, useMemo as I } from "react";
|
|
2
|
-
import { RicosViewer as L } from "@wix/ricos/viewer";
|
|
3
|
-
import r from "classnames";
|
|
4
|
-
import { F as R, aj as d, h as D } from "./form-Dt3W_RUv.js";
|
|
5
|
-
import { u as F } from "./use-service-options-base-_vksQyAH.js";
|
|
6
|
-
import { C as a } from "./checkbox-group-field-headless-BtorRj0k.js";
|
|
7
|
-
import { E as f } from "./error-icon-hZxQ6DEy.js";
|
|
8
|
-
import { C as N } from "./checkbox-indicator-module-classes-Bb3xB1ve.js";
|
|
9
|
-
import { s as i } from "./field-rac.module-D06m9T9x.js";
|
|
10
|
-
import { y as h, P as M, T as b, V as A, x as T, o as v, i as x, U as P } from "./form-element-classes-BhFk9Jrj.js";
|
|
11
|
-
import { o as O } from "./options-rac.module-KM-VT_KY.js";
|
|
12
|
-
import { u as y } from "./use-element-state-class-name-CeL6xkSj.js";
|
|
13
|
-
const k = (s) => {
|
|
14
|
-
var C;
|
|
15
|
-
const { isLoading: o, options: n, isEmpty: c, shouldRender: m, setOptions: l, setIsEmpty: E, setHasInitialDataLoaded: p } = F({
|
|
16
|
-
fieldType: R.SERVICES_MULTI_CHOICE,
|
|
17
|
-
isEditor: s.isEditor
|
|
18
|
-
}), u = (C = s.options) == null ? void 0 : C.every((S) => S.label && S.id);
|
|
19
|
-
return _(() => {
|
|
20
|
-
if (u && s.options) {
|
|
21
|
-
l(s.options), E(s.options.length === 0), p(!0);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
}, [
|
|
25
|
-
u,
|
|
26
|
-
s.options,
|
|
27
|
-
l,
|
|
28
|
-
E,
|
|
29
|
-
p
|
|
30
|
-
]), {
|
|
31
|
-
isLoading: o,
|
|
32
|
-
options: n,
|
|
33
|
-
isEmpty: c,
|
|
34
|
-
shouldRender: m
|
|
35
|
-
};
|
|
36
|
-
}, t = ({ children: s }) => {
|
|
37
|
-
const o = d(), { options: n, isEmpty: c, shouldRender: m } = k(o), l = I(() => ({
|
|
38
|
-
...o,
|
|
39
|
-
options: n
|
|
40
|
-
}), [
|
|
41
|
-
o,
|
|
42
|
-
n
|
|
43
|
-
]);
|
|
44
|
-
return !o.isEditor && c || !m ? null : /* @__PURE__ */ e.createElement(D.Provider, {
|
|
45
|
-
value: {
|
|
46
|
-
v2: l
|
|
47
|
-
}
|
|
48
|
-
}, /* @__PURE__ */ e.createElement(a, null, s));
|
|
49
|
-
};
|
|
50
|
-
t.Label = a.Label;
|
|
51
|
-
t.Options = a.Options;
|
|
52
|
-
t.Description = a.Description;
|
|
53
|
-
t.Error = a.Error;
|
|
54
|
-
const V = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(L, {
|
|
55
|
-
content: s,
|
|
56
|
-
locale: o
|
|
57
|
-
}), U = () => {
|
|
58
|
-
const s = y({
|
|
59
|
-
globalClasses: P,
|
|
60
|
-
moduleClasses: N
|
|
61
|
-
});
|
|
62
|
-
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
63
|
-
className: r(h, i.label)
|
|
64
|
-
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
65
|
-
className: r(M, i.requiredMark)
|
|
66
|
-
})), /* @__PURE__ */ e.createElement(t.Options, {
|
|
67
|
-
className: r(b, O.options)
|
|
68
|
-
}, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
|
|
69
|
-
className: i.checkbox
|
|
70
|
-
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
|
71
|
-
className: s
|
|
72
|
-
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
73
|
-
className: r(A, O.optionLabel)
|
|
74
|
-
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
75
|
-
inputClassName: r(T, i.input)
|
|
76
|
-
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
77
|
-
className: r(v, i.error)
|
|
78
|
-
}, /* @__PURE__ */ e.createElement(f, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
79
|
-
className: r(x, i.description)
|
|
80
|
-
}, V));
|
|
81
|
-
}, J = () => /* @__PURE__ */ e.createElement(U, null);
|
|
82
|
-
export {
|
|
83
|
-
J as ServicesMultiChoiceRAC
|
|
84
|
-
};
|