@wix/form-elements 1.63.0 → 1.64.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-B1VVk_Ui.js → appointment-rac-DojiZqx9.js} +35 -35
- package/dist/component/{bookings-address-rac-IQeHFdHT.js → bookings-address-rac-Bm_lQchD.js} +1 -1
- package/dist/component/{bookings-email-rac-z26A790r.js → bookings-email-rac-vwuy0kW8.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Djf0GPP4.js → bookings-first-name-rac-BbWuLoeg.js} +1 -1
- package/dist/component/{bookings-header-rac-CXOzAOpz.js → bookings-header-rac-DVknNH29.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CbB8alM9.js → bookings-last-name-rac-BnT3Cq0b.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CXrLx7Pn.js → bookings-login-bar-rac-DKi-VAXc.js} +5 -5
- package/dist/component/{bookings-phone-rac-DGYx7h5g.js → bookings-phone-rac-Bfy8rheB.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-viJG57XF.js → bookings-rich-text-rac-DGiBDcXw.js} +1 -1
- package/dist/component/{checkbox-field-rac-e-RAmupX.js → checkbox-field-rac-CYADRY54.js} +5 -5
- package/dist/component/checkbox-group-field-headless-BDAFpX5F.js +210 -0
- package/dist/component/checkbox-group-field-rac-2YUsOmDI.js +40 -0
- package/dist/component/{checkbox-group-rac-CDfDTWqz.js → checkbox-group-rac-CQf1C9H5.js} +1 -1
- package/dist/component/{checkbox-rac-BRBKYD_5.js → checkbox-rac-Bjv8jZjs.js} +1 -1
- package/dist/component/{contacts-address-rac-BtWWQi77.js → contacts-address-rac-BBTiEec9.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DaEUXJTf.js → contacts-birthdate-rac-XReeFHVW.js} +1 -1
- package/dist/component/{contacts-company-rac-IgRyjtcM.js → contacts-company-rac-B-fUQszu.js} +1 -1
- package/dist/component/{contacts-email-rac-BS1MDrMk.js → contacts-email-rac-DBtcCcsV.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BAvXypDF.js → contacts-first-name-rac-mkwU3706.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C289RYPl.js → contacts-last-name-rac-DY5N-AZx.js} +1 -1
- package/dist/component/{contacts-phone-rac-DIpyskam.js → contacts-phone-rac-Ce1rMz_z.js} +1 -1
- package/dist/component/{contacts-position-rac-nPeh3lKU.js → contacts-position-rac-B65H8PDu.js} +1 -1
- package/dist/component/contacts-subscribe-rac-BxO8rIyL.js +13 -0
- package/dist/component/{contacts-tax-id-rac-C4WB-SR0.js → contacts-tax-id-rac-Jtt0ySK2.js} +1 -1
- package/dist/component/{date-availability-HHjPx4Uv.js → date-availability-B8UwvTJa.js} +1 -1
- package/dist/component/{date-input-field-rac-GFgFcpX2.js → date-input-field-rac-RL2a0xoD.js} +33 -33
- package/dist/component/{date-input-rac-B9BUEIA-.js → date-input-rac-ak3G7V07.js} +1 -1
- package/dist/component/{date-picker-field-rac-BfjYIIuY.js → date-picker-field-rac-SL_Roltf.js} +31 -31
- package/dist/component/{date-picker-rac-Bd2UN0ZF.js → date-picker-rac-ByrM0YIX.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CAXnxLQP.js → date-time-input-field-rac-DOE7xcKi.js} +36 -36
- package/dist/component/{date-time-input-rac-BuJ3Awlh.js → date-time-input-rac-BA-GyrAc.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DKp4cBVa.js → dext-checkbox-group-rac-EwUnBO80.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BMu_k06A.js → dext-checkbox-rac-CIRKi4B5.js} +1 -1
- package/dist/component/{dext-date-picker-rac-L3sdldhT.js → dext-date-picker-rac-BYO_Q1zM.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-UmabFzDN.js → dext-date-time-input-rac-BOahPeaH.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DbjgYaG-.js → dext-dropdown-rac-sTD_r-0H.js} +1 -1
- package/dist/component/{dext-email-rac-rNudrOOK.js → dext-email-rac-e-2_h3he.js} +1 -1
- package/dist/component/{dext-number-input-rac-hw1FTrJL.js → dext-number-input-rac-D6LACzWl.js} +1 -1
- package/dist/component/{dext-phone-rac-DrZ_Vwv2.js → dext-phone-rac-kUycy5Od.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DAt2ax-I.js → dext-radio-group-rac-DPD2UkrV.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BW2Ike11.js → dext-rating-input-rac-DUsnrl9W.js} +1 -1
- package/dist/component/{dext-tags-rac-DDzwlKrR.js → dext-tags-rac-D6z69HuO.js} +2 -2
- package/dist/component/{dext-text-area-rac-D0xf4z3z.js → dext-text-area-rac-C-DVtFJ1.js} +1 -1
- package/dist/component/{dext-text-input-rac-Da04OLmq.js → dext-text-input-rac-CIa2MdC6.js} +1 -1
- package/dist/component/{dext-url-input-rac-B-g4xTqh.js → dext-url-input-rac-8rVVW5us.js} +1 -1
- package/dist/component/{donation-rac-gKeq72jg.js → donation-rac-BjmSBabc.js} +60 -60
- package/dist/component/{dropdown-field-headless-Js5TxdU4.js → dropdown-field-headless-DReo519l.js} +16 -16
- package/dist/component/{dropdown-field-rac-BDxcvX00.js → dropdown-field-rac-DzrjA2O6.js} +7 -7
- package/dist/component/{dropdown-rac-B5UHNzV-.js → dropdown-rac-CS7oLTp_.js} +1 -1
- package/dist/component/{ecom-address-rac-0zm4bX37.js → ecom-address-rac-EIb88J_6.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DCXoI33l.js → ecom-subscription-checkbox-rac-CE0Ks6qS.js} +5 -5
- package/dist/component/{email-input-field-rac-svf6hUHF.js → email-input-field-rac-BScZxYHw.js} +47 -47
- package/dist/component/{events-repeater-rac-DMIqzuVK.js → events-repeater-rac-Y0rH2Jli.js} +45 -45
- package/dist/component/{events-rsvp-rac-B_YD4ckO.js → events-rsvp-rac-BiAYVv_b.js} +12 -12
- package/dist/component/{field-error-headless-DTKnr5Zx.js → field-error-headless-DrnFrGun.js} +3 -3
- package/dist/component/{field-label-headless-DV4aNd5Y.js → field-label-headless-BIYf1BIh.js} +4 -4
- package/dist/component/field-rac.module-CWkwwhq4.js +21 -0
- package/dist/component/{file-upload-rac-lGKJjG3m.js → file-upload-rac-br--tZLp.js} +73 -73
- package/dist/component/{fixed-payment-rac-BVS6glii.js → fixed-payment-rac-XEtrsaMy.js} +11 -11
- package/dist/component/{form-DzjdnO7t.js → form-9yjqDnxY.js} +1563 -1556
- package/dist/component/form-element-classes-KRzHUNLu.js +57 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-tzBH-8Yh.js → header-field-rac-CLELgzqY.js} +7 -7
- package/dist/component/{header-rac-6thQAvVF.js → header-rac-D8KGkVVp.js} +1 -1
- package/dist/component/{image-choice-rac-Dx1b-saW.js → image-choice-rac-Cl09CLP4.js} +14 -14
- package/dist/component/{index-DIP7KB8P.js → index-C4y71e1i.js} +2 -2
- package/dist/component/{index-Lnx0829a.js → index-PHkE0Ru4.js} +4 -4
- package/dist/component/{isObjectLike-B_1KizZV.js → isObjectLike-srCDplej.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BY2SUp2d.js → multiline-address-field-rac-CsBLI9y-.js} +80 -80
- package/dist/component/{multiline-address-rac-BL8Yp4F0.js → multiline-address-rac-DFDPFfXh.js} +1 -1
- package/dist/component/{number-input-field-rac-x0yFmXbe.js → number-input-field-rac-DZRR7gdt.js} +16 -16
- package/dist/component/{number-input-rac-pJXc2YsD.js → number-input-rac-BCS5lkff.js} +1 -1
- package/dist/component/{password-rac-B4XCP64b.js → password-rac-ClDGgR3E.js} +16 -16
- package/dist/component/{payment-input-rac-CZdOAjK4.js → payment-input-rac-COydWmUE.js} +28 -28
- package/dist/component/{phone-input-field-rac-DO_V5Z_T.js → phone-input-field-rac-DYCibqe1.js} +42 -42
- package/dist/component/{phone-rac-D16nLDjP.js → phone-rac-BS-dmWkJ.js} +1 -1
- package/dist/component/{product-list-rac-DER8gVqy.js → product-list-rac-hxOhaA-r.js} +75 -75
- package/dist/component/quiz-radio-group-rac-BT-YZO2Q.js +13 -0
- package/dist/component/{radio-group-field-rac-Dt2pU0VV.js → radio-group-field-rac-DKqWnMBJ.js} +3 -3
- package/dist/component/{radio-group-field-rac.module--sO0VqCA.js → radio-group-field-rac.module-BwUynK_5.js} +7 -7
- package/dist/component/{radio-group-rac-CqCmtkNQ.js → radio-group-rac-DHURQZKK.js} +1 -1
- package/dist/component/{rating-input-field-rac-xDrHHcL2.js → rating-input-field-rac-CZRdSVrf.js} +30 -30
- package/dist/component/{rating-input-rac-Bo5E9N87.js → rating-input-rac-BaH52DYm.js} +1 -1
- package/dist/component/{rich-content-rac.module-CJXbNca9.js → rich-content-rac.module-ILBfxEmN.js} +1 -1
- package/dist/component/{rich-text-field-rac-CkV0Z9F-.js → rich-text-field-rac-B58q8Is7.js} +5 -5
- package/dist/component/{rich-text-rac-59DbKpXz.js → rich-text-rac-DGbZh1eX.js} +1 -1
- package/dist/component/{service-dropdown-rac-BLnflnUr.js → service-dropdown-rac-DUiNIbdv.js} +45 -45
- package/dist/component/services-multi-choice-rac-B7y9s2l8.js +76 -0
- package/dist/component/{signature-rac-Bb5IaS28.js → signature-rac-CydpvQJZ.js} +25 -25
- package/dist/component/{submit-button-rac-Bjyi8sUA.js → submit-button-rac-OO53h4H8.js} +6 -6
- package/dist/component/{tags-field-rac-C_VO3_69.js → tags-field-rac-eX3d3JEH.js} +44 -44
- package/dist/component/{tags-rac-CKiutCWe.js → tags-rac-CdIB_48Z.js} +1 -1
- package/dist/component/{text-area-field-rac-Cg-vIhFe.js → text-area-field-rac-Bir5Q7gz.js} +17 -17
- package/dist/component/{text-area-rac-tMFx38UD.js → text-area-rac-Ct1UNU04.js} +1 -1
- package/dist/component/{text-input-field-rac-CgN_2hOD.js → text-input-field-rac-onGUXC9J.js} +6 -6
- package/dist/component/{text-input-headless-CkhvKrFp.js → text-input-headless-Bs9m7QFg.js} +11 -11
- package/dist/component/{text-input-rac-BsyBgd3b.js → text-input-rac-DK4nEw4D.js} +1 -1
- package/dist/component/{time-input-rac-BxRVJtHE.js → time-input-rac-BCG9ktFa.js} +35 -35
- package/dist/component/{url-input-field-rac-B_1yVniS.js → url-input-field-rac-mUkrVTcL.js} +24 -24
- package/dist/component/{url-input-rac-D8VrKYVe.js → url-input-rac-Cl7LFYlr.js} +1 -1
- package/dist/component/{use-service-options-base-Ci9gIluo.js → use-service-options-base-BYVuKRj2.js} +6 -6
- package/dist/form.d.ts +3 -1
- package/package.json +2 -2
- package/dist/component/checkbox-group-field-headless-Cvia4lL6.js +0 -204
- package/dist/component/checkbox-group-field-rac-BXxk90dk.js +0 -33
- package/dist/component/contacts-subscribe-rac-Ci5OLk68.js +0 -13
- package/dist/component/field-rac.module-DtugsLiL.js +0 -21
- package/dist/component/form-element-classes-Bi-nNM8q.js +0 -55
- package/dist/component/quiz-radio-group-rac-BgTmHHi4.js +0 -13
- package/dist/component/services-multi-choice-rac-C-bFjwx8.js +0 -76
package/dist/component/{service-dropdown-rac-BLnflnUr.js → service-dropdown-rac-DUiNIbdv.js}
RENAMED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import t, { useRef as P, useMemo as g, useCallback as
|
|
2
|
-
import { RicosViewer as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
6
|
-
import { D as
|
|
7
|
-
import { C as
|
|
8
|
-
import { E as
|
|
9
|
-
import { H as
|
|
10
|
-
import { s as n } from "./field-rac.module-
|
|
11
|
-
import {
|
|
12
|
-
const
|
|
13
|
-
const { actions: r } =
|
|
1
|
+
import t, { useRef as P, useMemo as g, useCallback as h, useEffect as T } from "react";
|
|
2
|
+
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
|
+
import m from "classnames";
|
|
4
|
+
import { ae as A, as as b, F as M, ai as y, ab as U, h as V } from "./form-9yjqDnxY.js";
|
|
5
|
+
import { u as x } from "./use-service-options-base-BYVuKRj2.js";
|
|
6
|
+
import { D as d } from "./dropdown-field-headless-DReo519l.js";
|
|
7
|
+
import { C as H } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
|
+
import { E as k } from "./error-icon-hZxQ6DEy.js";
|
|
9
|
+
import { H as q } from "./custom-focus-class-_483Pkwp.js";
|
|
10
|
+
import { s as n } from "./field-rac.module-CWkwwhq4.js";
|
|
11
|
+
import { t as B, J as W, s as j, w as J, n as Q, j as Y } from "./form-element-classes-KRzHUNLu.js";
|
|
12
|
+
const z = "00000000-0000-0000-0000-000000000000", G = (e) => {
|
|
13
|
+
const { actions: r } = A(), { t: C } = b(), { addOther: i, addOtherLabel: p } = e, c = p || C("add-other.default-other-option-label"), a = P(!0), E = g(() => {
|
|
14
14
|
var s;
|
|
15
|
-
return ((s = e.options) == null ? void 0 : s.map((
|
|
15
|
+
return ((s = e.options) == null ? void 0 : s.map((u) => u.id ?? "")) ?? [];
|
|
16
16
|
}, [
|
|
17
17
|
e.options
|
|
18
|
-
]), O =
|
|
18
|
+
]), O = h((s) => i ? [
|
|
19
19
|
...s,
|
|
20
20
|
{
|
|
21
21
|
value: c,
|
|
22
22
|
label: c,
|
|
23
|
-
id:
|
|
23
|
+
id: z
|
|
24
24
|
}
|
|
25
25
|
] : s, [
|
|
26
26
|
i,
|
|
27
27
|
c
|
|
28
|
-
]), { isLoading: f, options: l, isEmpty: D, shouldRender: I, setIsLoading: F, setOptions: L, setIsEmpty:
|
|
28
|
+
]), { isLoading: f, options: l, isEmpty: D, shouldRender: I, setIsLoading: F, setOptions: L, setIsEmpty: S, processOptions: _ } = x({
|
|
29
29
|
fieldType: M.SERVICES_DROPDOWN,
|
|
30
30
|
isEditor: e.isEditor,
|
|
31
31
|
postProcessOptions: O
|
|
32
|
-
}), R =
|
|
32
|
+
}), R = h(async () => {
|
|
33
33
|
if (a.current && (r != null && r.fetchServices) && E.length > 0) {
|
|
34
34
|
a.current = !1, F(!0);
|
|
35
35
|
let s;
|
|
@@ -37,12 +37,12 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
37
37
|
s = await r.fetchServices({
|
|
38
38
|
serviceIds: E
|
|
39
39
|
});
|
|
40
|
-
} catch (
|
|
41
|
-
console.error(
|
|
40
|
+
} catch (u) {
|
|
41
|
+
console.error(u);
|
|
42
42
|
}
|
|
43
43
|
if (s) {
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
const u = _(s);
|
|
45
|
+
S(!i && u.length === 0), L(u);
|
|
46
46
|
} else
|
|
47
47
|
a.current = !0;
|
|
48
48
|
F(!1);
|
|
@@ -54,25 +54,25 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
54
54
|
i,
|
|
55
55
|
F,
|
|
56
56
|
L,
|
|
57
|
-
|
|
57
|
+
S
|
|
58
58
|
]);
|
|
59
59
|
T(() => {
|
|
60
60
|
if (!e.isEditor && l.length > 0) {
|
|
61
61
|
const s = i ? l.length - 1 : l.length;
|
|
62
|
-
|
|
62
|
+
S(s === 0);
|
|
63
63
|
}
|
|
64
64
|
}, [
|
|
65
65
|
l,
|
|
66
66
|
i,
|
|
67
|
-
|
|
67
|
+
S,
|
|
68
68
|
e.isEditor
|
|
69
69
|
]);
|
|
70
|
-
const v =
|
|
70
|
+
const v = h(() => {
|
|
71
71
|
e.onFocus && e.onFocus(), a.current && R();
|
|
72
72
|
}, [
|
|
73
73
|
R,
|
|
74
74
|
e.onFocus
|
|
75
|
-
]), N =
|
|
75
|
+
]), N = h(
|
|
76
76
|
(s) => {
|
|
77
77
|
e.onChange && e.onChange(s), a.current = !0;
|
|
78
78
|
},
|
|
@@ -90,7 +90,7 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
90
90
|
shouldRender: I
|
|
91
91
|
};
|
|
92
92
|
}, o = ({ children: e }) => {
|
|
93
|
-
const r = y(), { addOther: C } = r, i =
|
|
93
|
+
const r = y(), { addOther: C } = r, i = U(), p = r.isEditor || i.isEditor || i.isComposer, { isLoading: c, options: a, isEmpty: E, onFocus: O, onChange: f, shouldRender: l } = G({
|
|
94
94
|
...r,
|
|
95
95
|
isEditor: p
|
|
96
96
|
}), D = g(() => ({
|
|
@@ -106,36 +106,36 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
106
106
|
O,
|
|
107
107
|
f
|
|
108
108
|
]);
|
|
109
|
-
return !p && E && !C || !l ? null : /* @__PURE__ */ t.createElement(
|
|
109
|
+
return !p && E && !C || !l ? null : /* @__PURE__ */ t.createElement(V.Provider, {
|
|
110
110
|
value: {
|
|
111
111
|
v2: D
|
|
112
112
|
}
|
|
113
|
-
}, /* @__PURE__ */ t.createElement(
|
|
113
|
+
}, /* @__PURE__ */ t.createElement(d, null, e));
|
|
114
114
|
};
|
|
115
|
-
o.Label =
|
|
116
|
-
o.Trigger =
|
|
117
|
-
o.Options =
|
|
118
|
-
o.Description =
|
|
119
|
-
o.Error =
|
|
120
|
-
const K = ({ content: e, locale: r }) => /* @__PURE__ */ t.createElement(
|
|
115
|
+
o.Label = d.Label;
|
|
116
|
+
o.Trigger = d.Trigger;
|
|
117
|
+
o.Options = d.Options;
|
|
118
|
+
o.Description = d.Description;
|
|
119
|
+
o.Error = d.Error;
|
|
120
|
+
const K = ({ content: e, locale: r }) => /* @__PURE__ */ t.createElement(w, {
|
|
121
121
|
content: e,
|
|
122
122
|
locale: r
|
|
123
123
|
}), X = () => /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
124
|
-
className:
|
|
124
|
+
className: m(B, n.label)
|
|
125
125
|
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
126
|
-
className:
|
|
126
|
+
className: m(W, n.requiredMark)
|
|
127
127
|
})), /* @__PURE__ */ t.createElement(o.Trigger, {
|
|
128
|
-
className:
|
|
129
|
-
}, /* @__PURE__ */ t.createElement(
|
|
128
|
+
className: m(j, n.input, n.dropdownTrigger)
|
|
129
|
+
}, /* @__PURE__ */ t.createElement(H, {
|
|
130
130
|
className: n.dropdownIcon
|
|
131
131
|
})), /* @__PURE__ */ t.createElement(o.Options, {
|
|
132
|
-
className:
|
|
132
|
+
className: m(J, n.selectPopover, n.dropdownPopover)
|
|
133
133
|
}, /* @__PURE__ */ t.createElement(o.Options.Option, {
|
|
134
|
-
className:
|
|
134
|
+
className: m(n.selectOption, q)
|
|
135
135
|
})), /* @__PURE__ */ t.createElement(o.Error, {
|
|
136
|
-
className:
|
|
137
|
-
}, /* @__PURE__ */ t.createElement(
|
|
138
|
-
className:
|
|
136
|
+
className: m(Q, n.error)
|
|
137
|
+
}, /* @__PURE__ */ t.createElement(k, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
138
|
+
className: m(Y, n.description)
|
|
139
139
|
}, K)), le = () => /* @__PURE__ */ t.createElement(X, null);
|
|
140
140
|
export {
|
|
141
141
|
le as ServiceDropdownRAC
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import e, { useEffect as C, useMemo as I } from "react";
|
|
2
|
+
import { RicosViewer as L } from "@wix/ricos/viewer";
|
|
3
|
+
import r from "classnames";
|
|
4
|
+
import { F as R, ai as F, h as d } from "./form-9yjqDnxY.js";
|
|
5
|
+
import { u as D } from "./use-service-options-base-BYVuKRj2.js";
|
|
6
|
+
import { C as i } from "./checkbox-group-field-headless-BDAFpX5F.js";
|
|
7
|
+
import { E as h } from "./error-icon-hZxQ6DEy.js";
|
|
8
|
+
import { s as n } from "./field-rac.module-CWkwwhq4.js";
|
|
9
|
+
import { t as f, J as N, N as b, O as M, P as A, s as v, n as x, j as P } from "./form-element-classes-KRzHUNLu.js";
|
|
10
|
+
import { o as _ } from "./options-rac.module-KM-VT_KY.js";
|
|
11
|
+
const T = (o) => {
|
|
12
|
+
var S;
|
|
13
|
+
const { isLoading: s, options: a, isEmpty: c, shouldRender: E, setOptions: l, setIsEmpty: m, setHasInitialDataLoaded: p } = D({
|
|
14
|
+
fieldType: R.SERVICES_MULTI_CHOICE,
|
|
15
|
+
isEditor: o.isEditor
|
|
16
|
+
}), u = (S = o.options) == null ? void 0 : S.every((O) => O.label && O.id);
|
|
17
|
+
return C(() => {
|
|
18
|
+
if (u && o.options) {
|
|
19
|
+
l(o.options), m(o.options.length === 0), p(!0);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
}, [
|
|
23
|
+
u,
|
|
24
|
+
o.options,
|
|
25
|
+
l,
|
|
26
|
+
m,
|
|
27
|
+
p
|
|
28
|
+
]), {
|
|
29
|
+
isLoading: s,
|
|
30
|
+
options: a,
|
|
31
|
+
isEmpty: c,
|
|
32
|
+
shouldRender: E
|
|
33
|
+
};
|
|
34
|
+
}, t = ({ children: o }) => {
|
|
35
|
+
const s = F(), { options: a, isEmpty: c, shouldRender: E } = T(s), l = I(() => ({
|
|
36
|
+
...s,
|
|
37
|
+
options: a
|
|
38
|
+
}), [
|
|
39
|
+
s,
|
|
40
|
+
a
|
|
41
|
+
]);
|
|
42
|
+
return !s.isEditor && c || !E ? null : /* @__PURE__ */ e.createElement(d.Provider, {
|
|
43
|
+
value: {
|
|
44
|
+
v2: l
|
|
45
|
+
}
|
|
46
|
+
}, /* @__PURE__ */ e.createElement(i, null, o));
|
|
47
|
+
};
|
|
48
|
+
t.Label = i.Label;
|
|
49
|
+
t.Options = i.Options;
|
|
50
|
+
t.Description = i.Description;
|
|
51
|
+
t.Error = i.Error;
|
|
52
|
+
const k = ({ content: o, locale: s }) => /* @__PURE__ */ e.createElement(L, {
|
|
53
|
+
content: o,
|
|
54
|
+
locale: s
|
|
55
|
+
}), y = () => /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
56
|
+
className: r(f, n.label)
|
|
57
|
+
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
58
|
+
className: r(N, n.requiredMark)
|
|
59
|
+
})), /* @__PURE__ */ e.createElement(t.Options, {
|
|
60
|
+
className: r(b, _.options)
|
|
61
|
+
}, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
|
|
62
|
+
className: n.checkbox
|
|
63
|
+
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
|
64
|
+
className: r(M, n.checkboxInput)
|
|
65
|
+
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
66
|
+
className: r(A, _.optionLabel)
|
|
67
|
+
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
68
|
+
inputClassName: r(v, n.input)
|
|
69
|
+
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
70
|
+
className: r(x, n.error)
|
|
71
|
+
}, /* @__PURE__ */ e.createElement(h, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
72
|
+
className: r(P, n.description)
|
|
73
|
+
}, k)), Q = () => /* @__PURE__ */ e.createElement(y, null);
|
|
74
|
+
export {
|
|
75
|
+
Q as ServicesMultiChoiceRAC
|
|
76
|
+
};
|
|
@@ -4,14 +4,14 @@ import v from "classnames";
|
|
|
4
4
|
import { useHover as ve, useFocusRing as xe, mergeProps as Se } from "react-aria";
|
|
5
5
|
import { RadioGroup as Fe, Button as fe, TextField as Ae, Input as _e, RadioField as Pe, RadioButton as Ne } from "react-aria-components";
|
|
6
6
|
import he from "signature_pad";
|
|
7
|
-
import { z as Ue,
|
|
7
|
+
import { z as Ue, ae as Oe, ab as Be, aq as ge, E as ce, e as G, ai as A, af as H, ak as Ee, as as Me } from "./form-9yjqDnxY.js";
|
|
8
8
|
import { f as T, a as F } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { D as We, E as He } from "./field-error-headless-
|
|
10
|
-
import { L as Ye } from "./field-label-headless-
|
|
9
|
+
import { D as We, E as He } from "./field-error-headless-DrnFrGun.js";
|
|
10
|
+
import { L as Ye } from "./field-label-headless-BIYf1BIh.js";
|
|
11
11
|
import { D as ke } from "./data-hooks-Dkw1pbRj.js";
|
|
12
12
|
import { E as $e } from "./error-icon-hZxQ6DEy.js";
|
|
13
|
-
import { s as
|
|
14
|
-
import {
|
|
13
|
+
import { s as z } from "./field-rac.module-CWkwwhq4.js";
|
|
14
|
+
import { t as ue, J as ze, s as B, X as Ve, n as Xe, j as Ze } from "./form-element-classes-KRzHUNLu.js";
|
|
15
15
|
const Ge = typeof s.useId == "function" ? s.useId : () => W(Ue()).current;
|
|
16
16
|
var w = /* @__PURE__ */ (function(e) {
|
|
17
17
|
return e.TEXT = "text/plain", e.POINTS = "points/json", e;
|
|
@@ -43,7 +43,7 @@ const qe = (e) => {
|
|
|
43
43
|
]);
|
|
44
44
|
};
|
|
45
45
|
function je(e) {
|
|
46
|
-
const a =
|
|
46
|
+
const a = V(1, 1).getContext("2d");
|
|
47
47
|
a.fillStyle = e, a.fillRect(0, 0, 1, 1);
|
|
48
48
|
const n = a.getImageData(0, 0, 1, 1);
|
|
49
49
|
return n.data[0] * 65536 + n.data[1] * 256 + n.data[2];
|
|
@@ -72,7 +72,7 @@ function J(e, t) {
|
|
|
72
72
|
const p = a.getImageData(l, d, h, E), L = document.createElement("canvas"), y = L.getContext("2d");
|
|
73
73
|
return L.width = h, L.height = E, t ? (y.fillStyle = t, y.fillRect(0, 0, h, E)) : y.clearRect(0, 0, h, E), y.putImageData(p, 0, 0), L;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function V(e, t, a) {
|
|
76
76
|
const n = document.createElement("canvas");
|
|
77
77
|
if (n.width = e, n.height = t, a) {
|
|
78
78
|
const r = n.getContext("2d", {
|
|
@@ -86,7 +86,7 @@ function Qe(e, t) {
|
|
|
86
86
|
return new Promise((a, n) => {
|
|
87
87
|
const r = new Image();
|
|
88
88
|
r.onload = () => {
|
|
89
|
-
const o =
|
|
89
|
+
const o = V(r.width, r.height), i = o.getContext("2d", {
|
|
90
90
|
willReadFrequently: !0
|
|
91
91
|
});
|
|
92
92
|
i == null || i.drawImage(r, 0, 0), a(o);
|
|
@@ -94,7 +94,7 @@ function Qe(e, t) {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
function de(e, t, a, n) {
|
|
97
|
-
const r = e.width, o = e.height, i = 1, l = a / o, c = Math.min(l, i), d = r * c, u = o * c, f =
|
|
97
|
+
const r = e.width, o = e.height, i = 1, l = a / o, c = Math.min(l, i), d = r * c, u = o * c, f = V(d, u), m = f.getContext("2d");
|
|
98
98
|
return n && m && (m.fillStyle = n, m.fillRect(0, 0, d, u)), m == null || m.drawImage(e, 0, 0, r, o, 0, 0, d, u), f;
|
|
99
99
|
}
|
|
100
100
|
function me(e, t) {
|
|
@@ -187,7 +187,7 @@ async function ot(e, t) {
|
|
|
187
187
|
return e;
|
|
188
188
|
const n = a.mimeType;
|
|
189
189
|
if (n === w.TEXT) {
|
|
190
|
-
const r =
|
|
190
|
+
const r = V(M * 20, M, 1);
|
|
191
191
|
nt(r, a.data, "black", t, "white");
|
|
192
192
|
const o = J(r, "white");
|
|
193
193
|
return (o == null ? void 0 : o.toDataURL("image/jpeg", 0.7)) ?? null;
|
|
@@ -199,7 +199,7 @@ async function ot(e, t) {
|
|
|
199
199
|
const o = r.map((u) => ({
|
|
200
200
|
...u,
|
|
201
201
|
penColor: "black"
|
|
202
|
-
})), i =
|
|
202
|
+
})), i = V(M * 20, M, Math.max(window.devicePixelRatio || 1, 1));
|
|
203
203
|
new he(i).fromData(o);
|
|
204
204
|
const c = J(i);
|
|
205
205
|
return c ? de(c, void 0, M, "white").toDataURL("image/jpeg", 0.7) : null;
|
|
@@ -348,12 +348,12 @@ const dt = (e) => {
|
|
|
348
348
|
renderInput: () => r,
|
|
349
349
|
renderDescription: () => /* @__PURE__ */ s.createElement(s.Fragment, null, i, o)
|
|
350
350
|
});
|
|
351
|
-
},
|
|
351
|
+
}, X = ({ children: e }) => {
|
|
352
352
|
const { value: t, onChange: a, target: n, readOnly: r } = A(), { signatureMode: o, setSignatureMode: i, handleClear: l, clearable: c, signatureView: d, signatureValueForView: u, handleChange: f, handleBeforeChange: m } = lt({
|
|
353
353
|
target: n,
|
|
354
354
|
value: t,
|
|
355
355
|
onChange: a
|
|
356
|
-
}), h = T(e,
|
|
356
|
+
}), h = T(e, X.Header), E = T(e, X.Value), p = {
|
|
357
357
|
signatureMode: o,
|
|
358
358
|
setSignatureMode: i,
|
|
359
359
|
handleClear: l,
|
|
@@ -364,8 +364,8 @@ const dt = (e) => {
|
|
|
364
364
|
handleBeforeChange: m
|
|
365
365
|
};
|
|
366
366
|
return /* @__PURE__ */ s.createElement(s.Fragment, null, !r && F(h, p), F(E, p));
|
|
367
|
-
},
|
|
368
|
-
const { signatureMode: n, setSignatureMode: r, clearable: o, handleClear: i } = a, { uploadEnabled: l } = A(), c = T(e,
|
|
367
|
+
}, Z = ({ children: e, className: t, ...a }) => {
|
|
368
|
+
const { signatureMode: n, setSignatureMode: r, clearable: o, handleClear: i } = a, { uploadEnabled: l } = A(), c = T(e, Z.Tabs), d = T(e, Z.Clear);
|
|
369
369
|
return /* @__PURE__ */ s.createElement("div", {
|
|
370
370
|
className: t
|
|
371
371
|
}, F(c, {
|
|
@@ -653,13 +653,13 @@ const dt = (e) => {
|
|
|
653
653
|
}, e));
|
|
654
654
|
};
|
|
655
655
|
g.Label = Ye;
|
|
656
|
-
g.Input =
|
|
656
|
+
g.Input = X;
|
|
657
657
|
g.Description = We;
|
|
658
658
|
g.Error = He;
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
659
|
+
X.Header = Z;
|
|
660
|
+
X.Value = P;
|
|
661
|
+
Z.Tabs = _;
|
|
662
|
+
Z.Clear = gt;
|
|
663
663
|
_.Draw = pt;
|
|
664
664
|
_.Type = ft;
|
|
665
665
|
_.Upload = ht;
|
|
@@ -740,9 +740,9 @@ const Tt = () => {
|
|
|
740
740
|
}), Ot = () => {
|
|
741
741
|
const e = Tt();
|
|
742
742
|
return /* @__PURE__ */ s.createElement(g, null, /* @__PURE__ */ s.createElement(g.Label, {
|
|
743
|
-
className: v(ue,
|
|
743
|
+
className: v(ue, z.label)
|
|
744
744
|
}, /* @__PURE__ */ s.createElement(g.Label.Required, {
|
|
745
|
-
className: v(
|
|
745
|
+
className: v(ze, z.requiredMark)
|
|
746
746
|
})), /* @__PURE__ */ s.createElement(g.Input, null, /* @__PURE__ */ s.createElement(g.Input.Header, {
|
|
747
747
|
className: C.header
|
|
748
748
|
}, /* @__PURE__ */ s.createElement(g.Input.Header.Tabs, {
|
|
@@ -783,11 +783,11 @@ const Tt = () => {
|
|
|
783
783
|
className: v(B, C.uploadBox),
|
|
784
784
|
imageAlt: e.imageAlt
|
|
785
785
|
}, /* @__PURE__ */ s.createElement(g.Input.Value.Upload.Button, {
|
|
786
|
-
className: v(
|
|
786
|
+
className: v(Ve, z.uploadButton)
|
|
787
787
|
}, e.uploadLabel)))), /* @__PURE__ */ s.createElement(g.Error, {
|
|
788
|
-
className: v(
|
|
788
|
+
className: v(Xe, z.error)
|
|
789
789
|
}, /* @__PURE__ */ s.createElement($e, null), /* @__PURE__ */ s.createElement(g.Error.Text, null)), /* @__PURE__ */ s.createElement(g.Description, {
|
|
790
|
-
className: v(
|
|
790
|
+
className: v(Ze, z.description)
|
|
791
791
|
}, Ut));
|
|
792
792
|
}, Jt = () => /* @__PURE__ */ s.createElement(Ot, null);
|
|
793
793
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import l from "classnames";
|
|
3
|
-
import {
|
|
3
|
+
import { ai as c } from "./form-9yjqDnxY.js";
|
|
4
4
|
import { ProgressBar as N, Button as S } from "react-aria-components";
|
|
5
5
|
import { f as i } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Z as d, Y as g, $ as f } from "./form-element-classes-KRzHUNLu.js";
|
|
7
7
|
function x(e) {
|
|
8
8
|
const s = "calc(50% - 2px)";
|
|
9
9
|
return /* @__PURE__ */ t.createElement(N, {
|
|
@@ -72,16 +72,16 @@ const u = ({ children: e }) => {
|
|
|
72
72
|
isDisabled: v || p,
|
|
73
73
|
"data-in-progress": p
|
|
74
74
|
}, p && _ ? _ : a);
|
|
75
|
-
},
|
|
75
|
+
}, C = ({ className: e }) => /* @__PURE__ */ t.createElement("span", {
|
|
76
76
|
className: e
|
|
77
77
|
}, /* @__PURE__ */ t.createElement(x, null));
|
|
78
|
-
B.Loader =
|
|
78
|
+
B.Loader = C;
|
|
79
79
|
m.PreviousButton = b;
|
|
80
80
|
m.NextButton = E;
|
|
81
81
|
m.SubmitButton = B;
|
|
82
82
|
u.SubmitButton = m;
|
|
83
|
-
const
|
|
84
|
-
navigationContainer:
|
|
83
|
+
const h = "_navigationContainer_1yuje_1", y = "_rowSpacing_1yuje_6", P = "_navigationButton_1yuje_10", T = "_nextButton_1yuje_24", L = "_previousButton_1yuje_47", w = "_button_1yuje_90", j = "_buttonNoSteps_1yuje_122", k = "_buttonWithSteps_1yuje_126", F = "_progress_1yuje_153", r = {
|
|
84
|
+
navigationContainer: h,
|
|
85
85
|
rowSpacing: y,
|
|
86
86
|
navigationButton: P,
|
|
87
87
|
nextButton: T,
|
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
import { RicosViewer as j } from "@wix/ricos/viewer";
|
|
2
2
|
import _ from "classnames";
|
|
3
|
-
import e, { useMemo as F, useState as
|
|
4
|
-
import { CheckboxGroup as
|
|
5
|
-
import {
|
|
3
|
+
import e, { useMemo as F, useState as J, useRef as M, useLayoutEffect as Q, useCallback as k } from "react";
|
|
4
|
+
import { CheckboxGroup as w, TextField as z, Input as K, CheckboxField as X, CheckboxButton as Y } from "react-aria-components";
|
|
5
|
+
import { ai as y, af as Z, as as v, ab as ee, ak as te } from "./form-9yjqDnxY.js";
|
|
6
6
|
import { f, a as q } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { E as x, D as B } from "./field-error-headless-
|
|
8
|
-
import { L as P } from "./field-label-headless-
|
|
7
|
+
import { E as x, D as B } from "./field-error-headless-DrnFrGun.js";
|
|
8
|
+
import { L as P } from "./field-label-headless-BIYf1BIh.js";
|
|
9
9
|
import { F as ae } from "./fieldset-headless-CD3fds9J.js";
|
|
10
10
|
import { N as D } from "./options-layout-constants-DEfIEJWD.js";
|
|
11
11
|
import { E as ne } from "./error-icon-hZxQ6DEy.js";
|
|
12
|
-
import { s as S } from "./field-rac.module-
|
|
13
|
-
import {
|
|
12
|
+
import { s as S } from "./field-rac.module-CWkwwhq4.js";
|
|
13
|
+
import { t as oe, J as re, U as se, V as le, W as ie, s as ce, n as ue, j as de } from "./form-element-classes-KRzHUNLu.js";
|
|
14
14
|
import { o as me } from "./options-rac.module-KM-VT_KY.js";
|
|
15
15
|
const g = "Other", pe = (t, a) => {
|
|
16
16
|
const c = a.length + 2;
|
|
17
|
-
return (t.find((
|
|
18
|
-
}, he = (t) => t.map((a) => a.value ?? a.label),
|
|
17
|
+
return (t.find((o) => o.startsWith(`${a}: `)) || "").slice(c);
|
|
18
|
+
}, he = (t) => t.map((a) => a.value ?? a.label), W = ({ className: t, ...a }) => {
|
|
19
19
|
const { label: l } = a;
|
|
20
20
|
return /* @__PURE__ */ e.createElement("span", {
|
|
21
21
|
className: t
|
|
22
22
|
}, l);
|
|
23
|
-
},
|
|
24
|
-
const { value: a, onChange: l, addOtherLabel: c, addOtherPlaceholder: i, otherInputCharacterLimit:
|
|
23
|
+
}, $ = ({ className: t }) => {
|
|
24
|
+
const { value: a, onChange: l, addOtherLabel: c, addOtherPlaceholder: i, otherInputCharacterLimit: o, disabled: u, readOnly: b, hasError: d } = y(), { t: m } = v(), r = c || m("add-other.default-other-option-label") || g, p = F(() => pe(a || [], r), [
|
|
25
25
|
a,
|
|
26
|
-
|
|
27
|
-
]), [n, L] =
|
|
28
|
-
|
|
26
|
+
r
|
|
27
|
+
]), [n, L] = J(p), h = M(l);
|
|
28
|
+
Q(() => {
|
|
29
29
|
h.current = l;
|
|
30
30
|
});
|
|
31
31
|
const I = k((E) => {
|
|
32
32
|
L(E);
|
|
33
|
-
const C = (a || []).filter((O) => !O.startsWith(`${
|
|
33
|
+
const C = (a || []).filter((O) => !O.startsWith(`${r}:`) && O !== r), R = E ? `${r}: ${E}` : r;
|
|
34
34
|
h.current([
|
|
35
35
|
...C,
|
|
36
36
|
R
|
|
37
37
|
]);
|
|
38
38
|
}, [
|
|
39
39
|
a,
|
|
40
|
-
|
|
40
|
+
r
|
|
41
41
|
]);
|
|
42
|
-
return /* @__PURE__ */ e.createElement(
|
|
42
|
+
return /* @__PURE__ */ e.createElement(z, {
|
|
43
43
|
value: n,
|
|
44
44
|
onChange: I,
|
|
45
45
|
isDisabled: u,
|
|
46
46
|
isReadOnly: b,
|
|
47
47
|
isInvalid: d,
|
|
48
|
-
"aria-label":
|
|
48
|
+
"aria-label": r
|
|
49
49
|
}, /* @__PURE__ */ e.createElement(K, {
|
|
50
50
|
"data-hook": "tags-other-input",
|
|
51
51
|
"data-filled": n ? !0 : void 0,
|
|
52
52
|
placeholder: i,
|
|
53
|
-
maxLength:
|
|
53
|
+
maxLength: o,
|
|
54
54
|
className: t
|
|
55
55
|
}));
|
|
56
|
-
},
|
|
57
|
-
const { value: c, label: i, isOther:
|
|
56
|
+
}, T = ({ children: t, className: a, ...l }) => {
|
|
57
|
+
const { value: c, label: i, isOther: o, isFirstOption: u } = l, { id: b, value: d, onChange: m, options: r, disabled: p, readOnly: n, hasError: L } = y(), h = M(null);
|
|
58
58
|
te(() => {
|
|
59
59
|
var O;
|
|
60
60
|
u && ((O = h.current) == null || O.focus({
|
|
61
61
|
preventScroll: !0
|
|
62
62
|
}));
|
|
63
63
|
}, b);
|
|
64
|
-
const I = f(t,
|
|
64
|
+
const I = f(t, W), E = F(() => d || [], [
|
|
65
65
|
d
|
|
66
|
-
]), C = F(() =>
|
|
67
|
-
|
|
66
|
+
]), C = F(() => o ? E.find((O) => O === i || O.startsWith(`${i}: `)) || i : c, [
|
|
67
|
+
o,
|
|
68
68
|
E,
|
|
69
69
|
i,
|
|
70
70
|
c
|
|
71
71
|
]), R = k((O) => {
|
|
72
|
-
const G = he(
|
|
72
|
+
const G = he(r || []), V = E.filter((H) => G.includes(H));
|
|
73
73
|
m(O ? [
|
|
74
74
|
...V,
|
|
75
75
|
i
|
|
@@ -77,27 +77,27 @@ const g = "Other", pe = (t, a) => {
|
|
|
77
77
|
}, [
|
|
78
78
|
i,
|
|
79
79
|
m,
|
|
80
|
-
|
|
80
|
+
r,
|
|
81
81
|
E
|
|
82
82
|
]);
|
|
83
83
|
return /* @__PURE__ */ e.createElement(X, {
|
|
84
84
|
inputRef: h,
|
|
85
85
|
value: C,
|
|
86
|
-
onChange:
|
|
86
|
+
onChange: o ? R : void 0,
|
|
87
87
|
isDisabled: p,
|
|
88
88
|
isReadOnly: n,
|
|
89
89
|
isInvalid: L
|
|
90
90
|
}, /* @__PURE__ */ e.createElement(Y, {
|
|
91
91
|
className: a,
|
|
92
|
-
"data-hook": `tags-${
|
|
92
|
+
"data-hook": `tags-${o ? g : c}`
|
|
93
93
|
}, q(I, {
|
|
94
94
|
value: c,
|
|
95
95
|
label: i,
|
|
96
|
-
isOther:
|
|
96
|
+
isOther: o,
|
|
97
97
|
isFirstOption: u
|
|
98
98
|
})));
|
|
99
99
|
}, A = ({ children: t, className: a }) => {
|
|
100
|
-
const { options: l, addOther: c, addOtherLabel: i, numberOfColumns:
|
|
100
|
+
const { options: l, addOther: c, addOtherLabel: i, numberOfColumns: o = D.FREE_FLOW } = y(), { isMobile: u } = ee(), { t: b } = v(), d = u && o !== D.FREE_FLOW ? D.ONE : o, m = i || b("add-other.default-other-option-label") || g, r = f(t, T), p = F(() => {
|
|
101
101
|
const n = l || [];
|
|
102
102
|
return c ? [
|
|
103
103
|
...n,
|
|
@@ -117,7 +117,7 @@ const g = "Other", pe = (t, a) => {
|
|
|
117
117
|
"data-columns": d
|
|
118
118
|
}, p.map((n, L) => {
|
|
119
119
|
const h = n.value ?? n.label;
|
|
120
|
-
return q(
|
|
120
|
+
return q(r, {
|
|
121
121
|
key: n.isOther ? g : h,
|
|
122
122
|
value: h,
|
|
123
123
|
label: n.label,
|
|
@@ -126,7 +126,7 @@ const g = "Other", pe = (t, a) => {
|
|
|
126
126
|
});
|
|
127
127
|
}));
|
|
128
128
|
}, U = ({ children: t, className: a }) => {
|
|
129
|
-
const { addOther: l, addOtherLabel: c, hasError: i, readOnly:
|
|
129
|
+
const { addOther: l, addOtherLabel: c, hasError: i, readOnly: o, value: u } = y(), { t: b } = v(), d = c || b("add-other.default-other-option-label") || g, m = f(t, A), r = f(t, $), p = F(() => !l || !u ? !1 : u.some((n) => n === d || n.startsWith(`${d}:`)), [
|
|
130
130
|
l,
|
|
131
131
|
u,
|
|
132
132
|
d
|
|
@@ -134,10 +134,10 @@ const g = "Other", pe = (t, a) => {
|
|
|
134
134
|
return /* @__PURE__ */ e.createElement("div", {
|
|
135
135
|
className: a,
|
|
136
136
|
"data-invalid": i,
|
|
137
|
-
"data-readonly":
|
|
138
|
-
}, m, p &&
|
|
137
|
+
"data-readonly": o
|
|
138
|
+
}, m, p && r);
|
|
139
139
|
}, s = ({ children: t }) => {
|
|
140
|
-
const { id: a, value: l, onChange: c, FieldLayout: i, required:
|
|
140
|
+
const { id: a, value: l, onChange: c, FieldLayout: i, required: o, disabled: u, readOnly: b, hasError: d, onBlur: m, onFocus: r } = y(), { inputId: p, labelId: n, ariaDescribedBy: L } = Z(), h = F(() => l || [], [
|
|
141
141
|
l
|
|
142
142
|
]), I = f(t, P), E = f(t, U), C = f(t, B), R = f(t, x);
|
|
143
143
|
return /* @__PURE__ */ e.createElement(i, {
|
|
@@ -147,27 +147,27 @@ const g = "Other", pe = (t, a) => {
|
|
|
147
147
|
id: p,
|
|
148
148
|
ariaLabelledBy: n,
|
|
149
149
|
ariaDescribedBy: L,
|
|
150
|
-
required:
|
|
150
|
+
required: o,
|
|
151
151
|
onBlur: m,
|
|
152
|
-
onFocus:
|
|
153
|
-
}, /* @__PURE__ */ e.createElement(
|
|
152
|
+
onFocus: r
|
|
153
|
+
}, /* @__PURE__ */ e.createElement(w, {
|
|
154
154
|
"aria-labelledby": n,
|
|
155
155
|
value: h,
|
|
156
156
|
onChange: c,
|
|
157
157
|
isDisabled: u,
|
|
158
158
|
isReadOnly: b,
|
|
159
|
-
isRequired:
|
|
159
|
+
isRequired: o,
|
|
160
160
|
isInvalid: d
|
|
161
161
|
}, E)),
|
|
162
162
|
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, R, C)
|
|
163
163
|
});
|
|
164
164
|
};
|
|
165
|
-
A.Option =
|
|
166
|
-
|
|
165
|
+
A.Option = T;
|
|
166
|
+
T.Label = W;
|
|
167
167
|
s.Label = P;
|
|
168
168
|
s.Control = U;
|
|
169
169
|
s.Options = A;
|
|
170
|
-
s.OtherInput =
|
|
170
|
+
s.OtherInput = $;
|
|
171
171
|
s.Description = B;
|
|
172
172
|
s.Error = x;
|
|
173
173
|
const Ee = "_control_lyoqm_1", Oe = "_options_lyoqm_7", be = "_option_lyoqm_7", N = {
|
|
@@ -178,9 +178,9 @@ const Ee = "_control_lyoqm_1", Oe = "_options_lyoqm_7", be = "_option_lyoqm_7",
|
|
|
178
178
|
content: t,
|
|
179
179
|
locale: a
|
|
180
180
|
}), Ve = () => /* @__PURE__ */ e.createElement(s, null, /* @__PURE__ */ e.createElement(s.Label, {
|
|
181
|
-
className: _(
|
|
181
|
+
className: _(oe, S.label)
|
|
182
182
|
}, /* @__PURE__ */ e.createElement(s.Label.Required, {
|
|
183
|
-
className: _(
|
|
183
|
+
className: _(re, S.requiredMark)
|
|
184
184
|
})), /* @__PURE__ */ e.createElement(s.Control, {
|
|
185
185
|
className: N.control
|
|
186
186
|
}, /* @__PURE__ */ e.createElement(s.Options, {
|