@wix/form-elements 1.101.0 → 1.103.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-Bz666XRl.js → appointment-rac-DW5YPIgy.js} +4 -4
- package/dist/component/{bookings-address-rac-BeOnUsml.js → bookings-address-rac-7ODYuuSG.js} +1 -1
- package/dist/component/{bookings-email-rac-DG28agAj.js → bookings-email-rac-BCnhC0YX.js} +1 -1
- package/dist/component/{bookings-first-name-rac-gR3z4-ab.js → bookings-first-name-rac-DvpfHse1.js} +1 -1
- package/dist/component/{bookings-header-rac-Z8uH4Ld4.js → bookings-header-rac-Dohy9hCz.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BQIL81Rd.js → bookings-last-name-rac-CVDRbwd7.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DLDBFIUw.js → bookings-login-bar-rac-DavjHZGh.js} +1 -1
- package/dist/component/{bookings-phone-rac-DZBdi31-.js → bookings-phone-rac-Cj6Dz0vX.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-uJfFKnlR.js → bookings-rich-text-rac-DjmnegM6.js} +1 -1
- package/dist/component/{checkbox-field-rac-CESygdpa.js → checkbox-field-rac-DbJQI0lK.js} +4 -4
- package/dist/component/checkbox-group-field-headless-BWCsolHw.js +205 -0
- package/dist/component/{checkbox-group-field-rac-B4xHxrnm.js → checkbox-group-field-rac-Cmc2pwQi.js} +7 -5
- package/dist/component/{checkbox-group-rac-Cj1QP0mi.js → checkbox-group-rac-q3wI6hQH.js} +1 -1
- package/dist/component/{checkbox-rac-CwDeLVTg.js → checkbox-rac-BsutELL1.js} +1 -1
- package/dist/component/{contacts-address-rac-CR0VgQjc.js → contacts-address-rac-BUCtejza.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BKP3MEUH.js → contacts-birthdate-rac-1E453ZgP.js} +1 -1
- package/dist/component/{contacts-company-rac-2KfK3HUv.js → contacts-company-rac-DrK20x29.js} +1 -1
- package/dist/component/{contacts-email-rac-C-StCCdk.js → contacts-email-rac-CMiWMV_P.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DluPdJrM.js → contacts-first-name-rac-DPwXc8-1.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BPFDtu0m.js → contacts-last-name-rac-CeuRsbGC.js} +1 -1
- package/dist/component/{contacts-phone-rac-DCjYThvu.js → contacts-phone-rac-Cwjc5too.js} +1 -1
- package/dist/component/{contacts-position-rac-70Y5K0-2.js → contacts-position-rac-C8w3NNCn.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CkpV9O6Z.js → contacts-subscribe-rac-CFejp0de.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-Cc7RlBvQ.js → contacts-tax-id-rac-xNks1IAv.js} +1 -1
- package/dist/component/{date-availability-BNMZIIVi.js → date-availability-xTIFwK6x.js} +1 -1
- package/dist/component/{date-input-field-rac-B7U8YKrm.js → date-input-field-rac-DcoJJUZc.js} +6 -6
- package/dist/component/{date-input-rac-CYooWhMb.js → date-input-rac-CnZAuOkP.js} +1 -1
- package/dist/component/{date-picker-field-rac-FmHlyJdB.js → date-picker-field-rac-D__137lA.js} +5 -5
- package/dist/component/{date-picker-rac-DLwn7AKn.js → date-picker-rac-DQ42fhVP.js} +1 -1
- package/dist/component/{date-time-input-field-rac-eGxHBFDW.js → date-time-input-field-rac-BHBAMq3g.js} +6 -6
- package/dist/component/{date-time-input-rac-2E-AZjJU.js → date-time-input-rac-DbIAF6nq.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-1yuZvgHa.js → dext-checkbox-group-rac-Ds2w4V3q.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DM0XXP68.js → dext-checkbox-rac-DSidRTEl.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CMzKfaWk.js → dext-date-picker-rac-Derm4Q3d.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CFq1kbpd.js → dext-date-time-input-rac-BcyPuijC.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BdhFCJOG.js → dext-dropdown-rac-kDuk--KF.js} +1 -1
- package/dist/component/{dext-email-rac-B7pSx32V.js → dext-email-rac-xys-YMg2.js} +1 -1
- package/dist/component/{dext-number-input-rac-BySDR8wu.js → dext-number-input-rac-BZpAijhk.js} +1 -1
- package/dist/component/{dext-phone-rac-BG5s3WRz.js → dext-phone-rac-CMPboOsF.js} +1 -1
- package/dist/component/{dext-radio-group-rac-rLbHat4_.js → dext-radio-group-rac-5h9c9bW2.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Q6sOA59G.js → dext-rating-input-rac-BobDzEXB.js} +1 -1
- package/dist/component/{dext-tags-rac-ChmYbfhb.js → dext-tags-rac-DoJWzkrn.js} +2 -2
- package/dist/component/{dext-text-area-rac-D3sAPT-i.js → dext-text-area-rac-BIRCFM2F.js} +1 -1
- package/dist/component/{dext-text-input-rac-Pt4j-NHE.js → dext-text-input-rac-Bzx5hcyp.js} +1 -1
- package/dist/component/{dext-url-input-rac-jVL0Hmzh.js → dext-url-input-rac-C9hlh97b.js} +1 -1
- package/dist/component/donation-rac-CpEduCy1.js +318 -0
- package/dist/component/{dropdown-field-headless-CppwKBfX.js → dropdown-field-headless-Dcbu807N.js} +4 -4
- package/dist/component/{dropdown-field-rac-CgBmIDaT.js → dropdown-field-rac-mJwCTpQA.js} +2 -2
- package/dist/component/{dropdown-rac-BMweA5uI.js → dropdown-rac-N5I5XU3B.js} +1 -1
- package/dist/component/{ecom-address-rac-O0_CQxUW.js → ecom-address-rac-_0TO5pFZ.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Cmu1KuGg.js → ecom-subscription-checkbox-rac-DNdz6UCu.js} +2 -2
- package/dist/component/{email-input-field-rac-D_5MccPr.js → email-input-field-rac-VDJC1JLs.js} +3 -3
- package/dist/component/{events-repeater-rac-8Y4pq7V2.js → events-repeater-rac-CzBVzG00.js} +4 -4
- package/dist/component/{events-rsvp-rac-BYydUMNS.js → events-rsvp-rac--ADJlIQz.js} +24 -20
- package/dist/component/{field-error-headless-gUwzDWOe.js → field-error-headless-_ADCIvnx.js} +1 -1
- package/dist/component/{field-label-headless-Co6yOqfY.js → field-label-headless-DiDxuhCI.js} +1 -1
- package/dist/component/{file-upload-rac-DCPcAuy6.js → file-upload-rac-CiYo9UQA.js} +3 -3
- package/dist/component/{fixed-payment-rac-BYxHFMz7.js → fixed-payment-rac-DgNVdELB.js} +3 -3
- package/dist/component/{form-xpXT6sSe.js → form-DPmF8iaT.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-D6Ooi7Mr.js → header-field-rac-BuJTUp5S.js} +2 -2
- package/dist/component/{header-rac-DnGs8ZQz.js → header-rac-BphcUkmo.js} +1 -1
- package/dist/component/image-choice-rac-CZSMzLY2.js +162 -0
- package/dist/component/{index-DDN9WMAP.js → index-B0DLHSXg.js} +4 -4
- package/dist/component/{index-BycimQIL.js → index-BEIxTlpO.js} +2 -2
- package/dist/component/{isObjectLike-CO5vOu2v.js → isObjectLike-DuXP52EV.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Ceqa3t-S.js → multiline-address-field-rac-CNJyTqJt.js} +7 -7
- package/dist/component/{multiline-address-rac-DUEzLbEj.js → multiline-address-rac-DG7xjt6A.js} +1 -1
- package/dist/component/{number-input-field-rac-bpQgiO2z.js → number-input-field-rac-Bj2AK7Oj.js} +4 -4
- package/dist/component/{number-input-rac-igcMPISW.js → number-input-rac-JPgr87Xh.js} +1 -1
- package/dist/component/options-rac.module-CTDdATiz.js +8 -0
- package/dist/component/{password-rac-BT1z4LAW.js → password-rac-J0ySzA6j.js} +4 -4
- package/dist/component/{payment-input-rac-COxjqEMn.js → payment-input-rac-B1VmJQeD.js} +4 -4
- package/dist/component/{phone-input-field-rac-CDeMaVl7.js → phone-input-field-rac-SWP8Xkh-.js} +6 -6
- package/dist/component/{phone-rac-BCL0hoBl.js → phone-rac-BU33sXKk.js} +1 -1
- package/dist/component/{product-list-rac-BI9J6Cv5.js → product-list-rac-dk3gFLyb.js} +5 -5
- package/dist/component/{quiz-radio-group-rac-oevpys_A.js → quiz-radio-group-rac-BFlVZj9U.js} +1 -1
- package/dist/component/radio-button-module-classes-DgiY7sw3.js +133 -0
- package/dist/component/{radio-group-field-rac-2y5gEEt7.js → radio-group-field-rac-qD-GQu2A.js} +23 -21
- package/dist/component/{radio-group-rac-DF769GN5.js → radio-group-rac-CIY9Gj99.js} +1 -1
- package/dist/component/{rating-input-field-rac-DzuWl96q.js → rating-input-field-rac-BVWuvhkf.js} +4 -4
- package/dist/component/{rating-input-rac-DOwiqhty.js → rating-input-rac-C3HFmqHX.js} +1 -1
- package/dist/component/{rich-content-rac.module-B0CKQkBJ.js → rich-content-rac.module-QBgwAjEA.js} +1 -1
- package/dist/component/{rich-text-field-rac-CHfUVOQg.js → rich-text-field-rac-BohVUJm1.js} +2 -2
- package/dist/component/{rich-text-rac-CyfDUzdG.js → rich-text-rac-BST0y6Gq.js} +1 -1
- package/dist/component/{service-dropdown-rac-DSOEw_Pz.js → service-dropdown-rac-DZSY9T2v.js} +4 -4
- package/dist/component/services-multi-choice-rac-hD8TI7n7.js +89 -0
- package/dist/component/{signature-rac-CQgKDpSA.js → signature-rac-D9G6D7Pa.js} +3 -3
- package/dist/component/{submit-button-rac-CkcToyXk.js → submit-button-rac-D4vOTaQ9.js} +1 -1
- package/dist/component/tags-field-rac-CoNoLUAV.js +220 -0
- package/dist/component/{tags-rac-De-oJJeH.js → tags-rac-BGT8KWvN.js} +1 -1
- package/dist/component/{text-area-field-rac-Abh_6vvi.js → text-area-field-rac-x-LWaPSL.js} +4 -4
- package/dist/component/{text-area-rac-CPtigptv.js → text-area-rac-B0KN3TR1.js} +1 -1
- package/dist/component/{text-input-field-rac-mmA4MWmn.js → text-input-field-rac-DH5j0Tvv.js} +2 -2
- package/dist/component/{text-input-headless-_LKXMy0W.js → text-input-headless-Slo-xa7H.js} +3 -3
- package/dist/component/{text-input-rac-Dwc5DpDr.js → text-input-rac-_VrGU08X.js} +1 -1
- package/dist/component/{time-input-rac-DXaTD0kX.js → time-input-rac-DS5uFTDp.js} +4 -4
- package/dist/component/{url-input-field-rac-DmFkKHcU.js → url-input-field-rac-yCewMKD-.js} +4 -4
- package/dist/component/{url-input-rac-B0_9AJIF.js → url-input-rac-D7cuZG08.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DXfUR3FK.js → use-dropdown-option-class-name-DbjgH9K1.js} +1 -1
- package/dist/component/{use-element-state-class-name-DnTajLN7.js → use-element-state-class-name-C2_dMWlH.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-aQ729ktc.js → use-is-forced-open-dropdown-VcOCKx-3.js} +1 -1
- package/dist/component/{use-service-options-base-DY2mUh8f.js → use-service-options-base-Cu9nE-aZ.js} +1 -1
- package/dist/component/{use-text-input-class-name-ZQJA7JHr.js → use-text-input-class-name-DMokiXwB.js} +2 -2
- package/package.json +2 -2
- package/dist/component/checkbox-group-field-headless-Bz_FnjxO.js +0 -205
- package/dist/component/donation-rac-D_ljVWm9.js +0 -319
- package/dist/component/image-choice-rac-B9t4gM5n.js +0 -158
- package/dist/component/options-layout-constants-DEfIEJWD.js +0 -6
- package/dist/component/options-rac.module-KM-VT_KY.js +0 -7
- package/dist/component/radio-button-module-classes-CJ00fK3C.js +0 -132
- package/dist/component/services-multi-choice-rac-Bw3adRvE.js +0 -85
- package/dist/component/tags-field-rac-BEuOFlHS.js +0 -218
package/dist/component/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import m from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { ak as u, Y as i, X as C, _ as R, L as T } from "./form-
|
|
4
|
-
import { u as d, R as g, s as p, T as S } from "./rich-content-rac.module-
|
|
3
|
+
import { ak as u, Y as i, X as C, _ as R, L as T } from "./form-DPmF8iaT.js";
|
|
4
|
+
import { u as d, R as g, s as p, T as S } from "./rich-content-rac.module-QBgwAjEA.js";
|
|
5
5
|
import { a6 as h } from "./form-element-classes-BtKlobUX.js";
|
|
6
6
|
const P = ({ truncate: t = !0 } = {}) => {
|
|
7
7
|
const { content: a, maxShownParagraphs: s } = u(), o = e.useMemo(() => ({
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import e, { useMemo as H, useCallback as T, useRef as k } from "react";
|
|
2
|
+
import { RicosViewer as G } from "@wix/ricos/viewer";
|
|
3
|
+
import I from "classnames";
|
|
4
|
+
import { ak as b, ah as x, am as P, ad as B } from "./form-DPmF8iaT.js";
|
|
5
|
+
import { CheckboxGroup as q, CheckboxField as U, CheckboxButton as w } from "react-aria-components";
|
|
6
|
+
import { f as p, a as F } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { L as V, g as j } from "./field-label-headless-DiDxuhCI.js";
|
|
8
|
+
import { D as z, E as K } from "./field-error-headless-_ADCIvnx.js";
|
|
9
|
+
import { F as Q } from "./fieldset-headless-CD3fds9J.js";
|
|
10
|
+
import { E as Y } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
+
import { s as O } from "./field-rac.module-DobpyqOd.js";
|
|
12
|
+
import { C as $, S as J, v as W, x as X, r as Z, j as ee, w as te, F as f } from "./form-element-classes-BtKlobUX.js";
|
|
13
|
+
import { u as oe } from "./use-element-state-class-name-C2_dMWlH.js";
|
|
14
|
+
const o = ({ children: t, className: s }) => {
|
|
15
|
+
const { id: n, value: a, onChange: i, disabled: l, readOnly: r, required: c, onBlur: u, onFocus: E, hasError: C, FieldLayout: g } = b(), { inputId: L, labelId: _, ariaDescribedBy: R } = x(), v = p(t, o.Label), S = p(t, o.Options), A = p(t, o.Description), D = p(t, o.Error), h = H(() => a || [], [
|
|
16
|
+
a
|
|
17
|
+
]), M = T((y) => {
|
|
18
|
+
i == null || i(y);
|
|
19
|
+
}, [
|
|
20
|
+
i
|
|
21
|
+
]);
|
|
22
|
+
return /* @__PURE__ */ e.createElement(g, {
|
|
23
|
+
fieldId: n,
|
|
24
|
+
renderLabel: () => v,
|
|
25
|
+
renderInput: () => /* @__PURE__ */ e.createElement(Q, {
|
|
26
|
+
id: L,
|
|
27
|
+
ariaLabelledBy: _,
|
|
28
|
+
ariaDescribedBy: R,
|
|
29
|
+
required: c,
|
|
30
|
+
onBlur: u,
|
|
31
|
+
onFocus: E
|
|
32
|
+
}, /* @__PURE__ */ e.createElement(q, {
|
|
33
|
+
className: s,
|
|
34
|
+
"aria-labelledby": _,
|
|
35
|
+
value: h,
|
|
36
|
+
onChange: M,
|
|
37
|
+
isDisabled: l,
|
|
38
|
+
isReadOnly: r,
|
|
39
|
+
isRequired: c,
|
|
40
|
+
isInvalid: C
|
|
41
|
+
}, S)),
|
|
42
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, D, A)
|
|
43
|
+
});
|
|
44
|
+
}, N = ({ children: t, className: s }) => {
|
|
45
|
+
const { id: n, options: a, numberOfColumns: i } = b(), l = p(t, N.Option);
|
|
46
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
47
|
+
className: s,
|
|
48
|
+
"data-columns": i
|
|
49
|
+
}, a == null ? void 0 : a.map((r, c) => F(l, {
|
|
50
|
+
key: r.id || r.label,
|
|
51
|
+
option: r,
|
|
52
|
+
isFirst: c === 0,
|
|
53
|
+
fieldId: n
|
|
54
|
+
})));
|
|
55
|
+
}, ae = ({ className: t }) => /* @__PURE__ */ e.createElement("div", {
|
|
56
|
+
"aria-hidden": "true",
|
|
57
|
+
className: t
|
|
58
|
+
}), ne = ({ className: t, ...s }) => {
|
|
59
|
+
var u, E;
|
|
60
|
+
const { option: n } = s, { choiceImageResize: a, choiceImageAlignment: i } = b(), l = (u = n.media) == null ? void 0 : u.image, r = l && j(l, l.width, l.height);
|
|
61
|
+
if (!l || !r)
|
|
62
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
63
|
+
className: t,
|
|
64
|
+
"data-placeholder": !0,
|
|
65
|
+
"data-hook": "image-choice-option-image"
|
|
66
|
+
});
|
|
67
|
+
const c = ((E = n.media) == null ? void 0 : E.altText) || n.altText || l.altText || "";
|
|
68
|
+
return /* @__PURE__ */ e.createElement("img", {
|
|
69
|
+
className: t,
|
|
70
|
+
src: r,
|
|
71
|
+
alt: c,
|
|
72
|
+
"data-fit": a,
|
|
73
|
+
"data-alignment": i,
|
|
74
|
+
"data-hook": "image-choice-option-image"
|
|
75
|
+
});
|
|
76
|
+
}, se = ({ className: t, ...s }) => {
|
|
77
|
+
const { option: n } = s;
|
|
78
|
+
return !n.label || n.isLabelHidden ? null : /* @__PURE__ */ e.createElement("span", {
|
|
79
|
+
className: t
|
|
80
|
+
}, n.label);
|
|
81
|
+
}, d = ({ children: t, className: s, ...n }) => {
|
|
82
|
+
const { option: a, isFirst: i = !1, fieldId: l } = n, { disabled: r, readOnly: c, hasError: u } = b(), E = k(null);
|
|
83
|
+
P(() => {
|
|
84
|
+
var _;
|
|
85
|
+
i && ((_ = E.current) == null || _.focus({
|
|
86
|
+
preventScroll: !0
|
|
87
|
+
}));
|
|
88
|
+
}, l);
|
|
89
|
+
const C = p(t, d.Input), g = p(t, d.Image), L = p(t, d.Label);
|
|
90
|
+
return /* @__PURE__ */ e.createElement(U, {
|
|
91
|
+
value: a.label,
|
|
92
|
+
isDisabled: r,
|
|
93
|
+
isReadOnly: c,
|
|
94
|
+
isInvalid: u
|
|
95
|
+
}, /* @__PURE__ */ e.createElement(w, {
|
|
96
|
+
ref: E,
|
|
97
|
+
"aria-label": a.isLabelHidden ? a.label : void 0,
|
|
98
|
+
className: s,
|
|
99
|
+
"data-hook": `image-choice-${a.label}`
|
|
100
|
+
}, C, F(g, {
|
|
101
|
+
option: a
|
|
102
|
+
}), F(L, {
|
|
103
|
+
option: a
|
|
104
|
+
})));
|
|
105
|
+
};
|
|
106
|
+
d.Input = ae;
|
|
107
|
+
d.Image = ne;
|
|
108
|
+
d.Label = se;
|
|
109
|
+
o.Label = V;
|
|
110
|
+
o.Options = N;
|
|
111
|
+
N.Option = d;
|
|
112
|
+
o.Description = z;
|
|
113
|
+
o.Error = K;
|
|
114
|
+
const le = "_group_1vbnn_1", ie = "_options_1vbnn_5", re = "_optionInput_1vbnn_36", ce = "_option_1vbnn_5", me = "_optionHover_1vbnn_72", pe = "_optionSelected_1vbnn_72", Ee = "_optionLabel_1vbnn_112", de = "_optionImage_1vbnn_143", m = {
|
|
115
|
+
group: le,
|
|
116
|
+
options: ie,
|
|
117
|
+
optionInput: re,
|
|
118
|
+
option: ce,
|
|
119
|
+
optionHover: me,
|
|
120
|
+
optionSelected: pe,
|
|
121
|
+
optionLabel: Ee,
|
|
122
|
+
optionImage: de
|
|
123
|
+
}, ue = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(G, {
|
|
124
|
+
content: t,
|
|
125
|
+
locale: s
|
|
126
|
+
}), Ie = {
|
|
127
|
+
base: m.option,
|
|
128
|
+
selected: m.optionSelected,
|
|
129
|
+
hover: m.optionHover
|
|
130
|
+
}, _e = () => {
|
|
131
|
+
const t = oe({
|
|
132
|
+
globalClasses: te,
|
|
133
|
+
moduleClasses: Ie
|
|
134
|
+
}), s = B(f.IMAGE_CHOICE, f.IMAGE_CHOICE_OPTION, f.IMAGE_CHOICE_OPTION_IMAGE);
|
|
135
|
+
return /* @__PURE__ */ e.createElement(o, {
|
|
136
|
+
className: m.group
|
|
137
|
+
}, /* @__PURE__ */ e.createElement(o.Label, {
|
|
138
|
+
className: I($, O.label)
|
|
139
|
+
}, /* @__PURE__ */ e.createElement(o.Label.Required, {
|
|
140
|
+
className: I(J, O.requiredMark)
|
|
141
|
+
})), /* @__PURE__ */ e.createElement(o.Options, {
|
|
142
|
+
className: I(W, m.options)
|
|
143
|
+
}, /* @__PURE__ */ e.createElement(o.Options.Option, {
|
|
144
|
+
className: ({ isSelected: n, isHovered: a }) => t({
|
|
145
|
+
isSelected: n,
|
|
146
|
+
isHovered: a
|
|
147
|
+
})
|
|
148
|
+
}, /* @__PURE__ */ e.createElement(o.Options.Option.Input, {
|
|
149
|
+
className: m.optionInput
|
|
150
|
+
}), /* @__PURE__ */ e.createElement(o.Options.Option.Image, {
|
|
151
|
+
className: I(X, m.optionImage, s)
|
|
152
|
+
}), /* @__PURE__ */ e.createElement(o.Options.Option.Label, {
|
|
153
|
+
className: m.optionLabel
|
|
154
|
+
}))), /* @__PURE__ */ e.createElement(o.Error, {
|
|
155
|
+
className: I(Z, O.error)
|
|
156
|
+
}, /* @__PURE__ */ e.createElement(Y, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
|
|
157
|
+
className: I(ee, O.description)
|
|
158
|
+
}, ue));
|
|
159
|
+
}, he = () => /* @__PURE__ */ e.createElement(_e, null);
|
|
160
|
+
export {
|
|
161
|
+
he as ImageChoiceRAC
|
|
162
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as R, V as _, T as de, t as O, g as Ge, B as Be, N as qe, I as He, m as A, P as Ee, w as re, S as Fe, b as B, n as M, a4 as Te, p as je, o as he, q } from "./form-
|
|
2
|
-
import { $ as Mn } from "./form-
|
|
1
|
+
import { d as R, V as _, T as de, t as O, g as Ge, B as Be, N as qe, I as He, m as A, P as Ee, w as re, S as Fe, b as B, n as M, a4 as Te, p as je, o as he, q } from "./form-DPmF8iaT.js";
|
|
2
|
+
import { $ as Mn } from "./form-DPmF8iaT.js";
|
|
3
3
|
import Xe from "ajv";
|
|
4
4
|
import ke from "ajv-errors";
|
|
5
5
|
import We from "ajv-formats";
|
|
6
6
|
import Ke from "fast-deep-equal";
|
|
7
7
|
import { parsePhoneNumber as ze, parsePhoneNumberWithError as Ve, ParseError as Ze } from "libphonenumber-js/max";
|
|
8
8
|
import Je from "libphonenumber-js/metadata.max.json";
|
|
9
|
-
import { p as Qe, i as et } from "./date-availability-
|
|
10
|
-
import { a as Sn } from "./date-availability-
|
|
9
|
+
import { p as Qe, i as et } from "./date-availability-xTIFwK6x.js";
|
|
10
|
+
import { a as Sn } from "./date-availability-xTIFwK6x.js";
|
|
11
11
|
import { C as tt } from "./calling-country-codes-PyWuOTmF.js";
|
|
12
12
|
function rt(e) {
|
|
13
13
|
var t, r;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a3 as n } from "./form-
|
|
2
|
-
import { A as S, a as p, C as N, M as g, H as q, J as D, a5 as L } from "./form-
|
|
1
|
+
import { a3 as n } from "./form-DPmF8iaT.js";
|
|
2
|
+
import { A as S, a as p, C as N, M as g, H as q, J as D, a5 as L } from "./form-DPmF8iaT.js";
|
|
3
3
|
const l = (e = !1) => ({
|
|
4
4
|
country: {
|
|
5
5
|
required: e
|
|
@@ -2,22 +2,22 @@ import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import r, { useMemo as w, createContext as Ue, useContext as Ce, useState as be, useRef as x, useCallback as R, useEffect as Pe } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as Pt } from "react-aria";
|
|
5
|
-
import { af as yt, c as Ct, aa as Tt, ac as It, H as Mt, J as qt, v as wt, G as V, F as K, au as Te, a3 as lt, ak as P, ah as T, am as ae, ag as Lt, T as xt, C as ve, a1 as Bt, a5 as kt, ar as $t, al as Wt, aq as Ut, a8 as Vt, Z as Kt, a7 as Yt, an as Ht, j as jt } from "./form-
|
|
5
|
+
import { af as yt, c as Ct, aa as Tt, ac as It, H as Mt, J as qt, v as wt, G as V, F as K, au as Te, a3 as lt, ak as P, ah as T, am as ae, ag as Lt, T as xt, C as ve, a1 as Bt, a5 as kt, ar as $t, al as Wt, aq as Ut, a8 as Vt, Z as Kt, a7 as Yt, an as Ht, j as jt } from "./form-DPmF8iaT.js";
|
|
6
6
|
import { f as E, a as F } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as Jt, V as Gt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { u as Xt } from "./use-is-forced-open-dropdown-
|
|
8
|
+
import { u as Xt } from "./use-is-forced-open-dropdown-VcOCKx-3.js";
|
|
9
9
|
import { TextField as fe, Input as le, ComboBoxStateContext as Ve, ComboBox as Se, Popover as De, ListBox as Re, ListBoxItem as Ae, Group as Nt, Button as gt } from "react-aria-components";
|
|
10
|
-
import { D as ie, E as ce } from "./field-error-headless-
|
|
11
|
-
import { L as de } from "./field-label-headless-
|
|
12
|
-
import { e as zt, c as Qt, a as Zt, r as Ot } from "./isObjectLike-
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-_ADCIvnx.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-DiDxuhCI.js";
|
|
12
|
+
import { e as zt, c as Qt, a as Zt, r as Ot } from "./isObjectLike-DuXP52EV.js";
|
|
13
13
|
import { u as en } from "./use-invoke-callback-UH73A_J3.js";
|
|
14
14
|
import { C as it } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
15
|
import { E as z } from "./error-icon-hZxQ6DEy.js";
|
|
16
16
|
import { H as Me } from "./custom-focus-class-_483Pkwp.js";
|
|
17
17
|
import { s as C } from "./field-rac.module-DobpyqOd.js";
|
|
18
18
|
import { C as Q, S as Z, n as ct, E as ge, r as ee, j as te } from "./form-element-classes-BtKlobUX.js";
|
|
19
|
-
import { u as tn } from "./use-dropdown-option-class-name-
|
|
20
|
-
import { u as nn } from "./use-text-input-class-name-
|
|
19
|
+
import { u as tn } from "./use-dropdown-option-class-name-DbjgH9K1.js";
|
|
20
|
+
import { u as nn } from "./use-text-input-class-name-DMokiXwB.js";
|
|
21
21
|
const rn = (e, t, o) => {
|
|
22
22
|
var l, a, i, s;
|
|
23
23
|
const n = (l = e.steps) == null ? void 0 : l.map((d) => {
|
package/dist/component/{number-input-field-rac-bpQgiO2z.js → number-input-field-rac-Bj2AK7Oj.js}
RENAMED
|
@@ -2,16 +2,16 @@ import { RicosViewer as P } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useState as j, useCallback as Q, useEffect as U, useRef as $ } from "react";
|
|
4
4
|
import { NumberField as z, Input as G } from "react-aria-components";
|
|
5
|
-
import { ak as _, ah as S, au as H, am as J } from "./form-
|
|
5
|
+
import { ak as _, ah as S, au as H, am as J } from "./form-DPmF8iaT.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as K, E as W } from "./field-error-headless-
|
|
8
|
-
import { L as X } from "./field-label-headless-
|
|
7
|
+
import { D as K, E as W } from "./field-error-headless-_ADCIvnx.js";
|
|
8
|
+
import { L as X } from "./field-label-headless-DiDxuhCI.js";
|
|
9
9
|
import { g as Y, c as Z } from "./numeric-input-utils-CuBMi4-a.js";
|
|
10
10
|
import { u as w } from "./use-invoke-callback-UH73A_J3.js";
|
|
11
11
|
import { E as ee } from "./error-icon-hZxQ6DEy.js";
|
|
12
12
|
import { s as p } from "./field-rac.module-DobpyqOd.js";
|
|
13
13
|
import { C as re, S as te, r as ae, j as ne } from "./form-element-classes-BtKlobUX.js";
|
|
14
|
-
import { u as se } from "./use-text-input-class-name-
|
|
14
|
+
import { u as se } from "./use-text-input-class-name-DMokiXwB.js";
|
|
15
15
|
const e = ({ children: t }) => {
|
|
16
16
|
var F, L, R;
|
|
17
17
|
const { id: n, value: s, onChange: l, disabled: d, required: E, readOnly: o, onBlur: b, onFocus: f, FieldLayout: m, hasError: u, validation: a } = _(), { labelId: y } = S(), D = ((F = a == null ? void 0 : a.number) == null ? void 0 : F.multipleOf) || 1, A = (L = a == null ? void 0 : a.number) == null ? void 0 : L.maximum, g = (R = a == null ? void 0 : a.number) == null ? void 0 : R.minimum, h = O(s), [x, I] = j(h), T = w(b), V = c(t, e.Label), k = c(t, e.Input), q = c(t, e.Description), M = c(t, e.Error), B = Q((N) => {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import e, { useState as S, useRef as N } from "react";
|
|
2
2
|
import { RicosViewer as x } from "@wix/ricos/viewer";
|
|
3
3
|
import d from "classnames";
|
|
4
|
-
import { ak as E, ah as I, am as O, au as A } from "./form-
|
|
4
|
+
import { ak as E, ah as I, am as O, au as A } from "./form-DPmF8iaT.js";
|
|
5
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-_ADCIvnx.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-DiDxuhCI.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-DobpyqOd.js";
|
|
12
12
|
import { C as H, S as W, r as Z, j as G } from "./form-element-classes-BtKlobUX.js";
|
|
13
|
-
import { u as Q } from "./use-text-input-class-name-
|
|
13
|
+
import { u as Q } from "./use-text-input-class-name-DMokiXwB.js";
|
|
14
14
|
const t = ({ children: r, className: o }) => {
|
|
15
15
|
const { id: l, value: s, onChange: c, disabled: n, readOnly: m, required: a, hasError: i, onBlur: f, onFocus: C, FieldLayout: _ } = E(), { labelId: y } = I(), [R, D] = S(!1), F = u(r, t.Label), L = u(r, t.Control), T = u(r, t.Description), h = u(r, t.Error);
|
|
16
16
|
return /* @__PURE__ */ e.createElement(_, {
|
|
@@ -2,17 +2,17 @@ import r, { useCallback as P, useRef as Q } from "react";
|
|
|
2
2
|
import { RicosViewer as w } from "@wix/ricos/viewer";
|
|
3
3
|
import p from "classnames";
|
|
4
4
|
import { TextField as z, Group as J, Input as K } from "react-aria-components";
|
|
5
|
-
import { ak as R, ah as D, ac as T, au as W, am as X } from "./form-
|
|
5
|
+
import { ak as R, ah as D, ac as T, au as W, am as X } from "./form-DPmF8iaT.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-_ADCIvnx.js";
|
|
8
|
+
import { L as ee } from "./field-label-headless-DiDxuhCI.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-DobpyqOd.js";
|
|
14
14
|
import { C as se, S as oe, r as le, j as ce } from "./form-element-classes-BtKlobUX.js";
|
|
15
|
-
import { u as ie } from "./use-text-input-class-name-
|
|
15
|
+
import { u as ie } from "./use-text-input-class-name-DMokiXwB.js";
|
|
16
16
|
function ue(e, t) {
|
|
17
17
|
return {
|
|
18
18
|
productId: e.id,
|
package/dist/component/{phone-input-field-rac-CDeMaVl7.js → phone-input-field-rac-SWP8Xkh-.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { RicosViewer as Oe } from "@wix/ricos/viewer";
|
|
2
2
|
import O from "classnames";
|
|
3
3
|
import t, { useMemo as x, useState as B, useRef as P, useEffect as U, useCallback as oe, createContext as le, useContext as Y } from "react";
|
|
4
|
-
import { a3 as _e, au as v, ac as ue, at as Ne, ak as M, ah as ie, am as Se } from "./form-
|
|
4
|
+
import { a3 as _e, au as v, ac as ue, at as Ne, ak as M, ah as ie, am as Se } from "./form-DPmF8iaT.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as Le } from "react-aria";
|
|
6
6
|
import { Dialog as me, OverlayTriggerStateContext as Ie, ModalOverlay as Fe, Modal as Pe, SearchField as ve, Group as G, ListBoxItem as De, DialogTrigger as Re, Select as xe, Input as Ce, ListBox as Be, Autocomplete as Me } from "react-aria-components";
|
|
7
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-_ADCIvnx.js";
|
|
9
|
+
import { L as Te } from "./field-label-headless-DiDxuhCI.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-VcOCKx-3.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";
|
|
@@ -18,8 +18,8 @@ import { E as Ye } from "./error-icon-hZxQ6DEy.js";
|
|
|
18
18
|
import { H as ae } from "./custom-focus-class-_483Pkwp.js";
|
|
19
19
|
import { s as b } from "./field-rac.module-DobpyqOd.js";
|
|
20
20
|
import { C as ze, S as Ke, n as We, B as Ze, E as Qe, r as Je, j as Xe } from "./form-element-classes-BtKlobUX.js";
|
|
21
|
-
import { u as et } from "./use-dropdown-option-class-name-
|
|
22
|
-
import { u as tt } from "./use-text-input-class-name-
|
|
21
|
+
import { u as et } from "./use-dropdown-option-class-name-DbjgH9K1.js";
|
|
22
|
+
import { u as tt } from "./use-text-input-class-name-DMokiXwB.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)
|
|
@@ -2,11 +2,11 @@ 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
4
|
import { CheckboxField as z, CheckboxButton as j, NumberField as J, Group as X, Button as U, Input as W } from "react-aria-components";
|
|
5
|
-
import { ak as k, ah as Y, ac as w, au as Z, am as ee } from "./form-
|
|
5
|
+
import { ak as k, ah as Y, ac as w, au as Z, am as ee } from "./form-DPmF8iaT.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-DiDxuhCI.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-_ADCIvnx.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";
|
|
@@ -14,8 +14,8 @@ import { E as ce } from "./error-icon-hZxQ6DEy.js";
|
|
|
14
14
|
import { C as ue } from "./checkbox-indicator-module-classes-DhbNznSB.js";
|
|
15
15
|
import { s as T } from "./field-rac.module-DobpyqOd.js";
|
|
16
16
|
import { C as me, S as pe, G as de, J as Ee, I as ye, B as fe, r as _e, j as Ie, H as Oe } from "./form-element-classes-BtKlobUX.js";
|
|
17
|
-
import { o as Q } from "./options-rac.module-
|
|
18
|
-
import { u as be } from "./use-element-state-class-name-
|
|
17
|
+
import { o as Q } from "./options-rac.module-CTDdATiz.js";
|
|
18
|
+
import { u as be } from "./use-element-state-class-name-C2_dMWlH.js";
|
|
19
19
|
var Le = /* @__PURE__ */ (function(e) {
|
|
20
20
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
21
21
|
})({}), M = /* @__PURE__ */ (function(e) {
|
package/dist/component/{quiz-radio-group-rac-oevpys_A.js → quiz-radio-group-rac-BFlVZj9U.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "react";
|
|
2
|
-
import { R } from "./radio-group-field-rac-
|
|
2
|
+
import { R } from "./radio-group-field-rac-qD-GQu2A.js";
|
|
3
3
|
import { M as o, L as r, K as O } from "./form-element-classes-BtKlobUX.js";
|
|
4
4
|
const I = () => /* @__PURE__ */ _.createElement(R, {
|
|
5
5
|
classes: {
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import l, { useRef as S, useState as T, useEffect as B, useCallback as H } from "react";
|
|
2
|
+
import { RadioGroup as k, RadioField as A, RadioButton as G, TextField as P, Input as $ } from "react-aria-components";
|
|
3
|
+
import { ak as v, ah as q, au as F, am as x } from "./form-DPmF8iaT.js";
|
|
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-_ADCIvnx.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-DiDxuhCI.js";
|
|
7
|
+
import { S as w } from "./selection-indicator-XQ8MYHUQ.js";
|
|
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
|
+
const a = t ? t.length + 2 : 0;
|
|
10
|
+
return e.slice(a);
|
|
11
|
+
}, i = ({ children: e, className: t }) => {
|
|
12
|
+
const { id: n, value: a, onChange: O, disabled: d, readOnly: _, required: b, onBlur: f, onFocus: m, hasError: r, FieldLayout: c, options: o } = v(), { inputId: h, labelId: C, ariaDescribedBy: I } = q(), s = u(e, i.Label), E = u(e, i.Options), D = u(e, i.Description), N = u(e, i.Error), V = y(o, a) ? L : a || null;
|
|
13
|
+
return /* @__PURE__ */ l.createElement(c, {
|
|
14
|
+
fieldId: n,
|
|
15
|
+
renderLabel: () => g(s, {
|
|
16
|
+
as: "div"
|
|
17
|
+
}),
|
|
18
|
+
renderInput: () => /* @__PURE__ */ l.createElement(k, {
|
|
19
|
+
id: h,
|
|
20
|
+
className: t,
|
|
21
|
+
"aria-labelledby": C,
|
|
22
|
+
"aria-describedby": I,
|
|
23
|
+
value: V,
|
|
24
|
+
onChange: O,
|
|
25
|
+
isDisabled: d,
|
|
26
|
+
isReadOnly: _,
|
|
27
|
+
isRequired: b,
|
|
28
|
+
isInvalid: r,
|
|
29
|
+
onBlur: f,
|
|
30
|
+
onFocus: m
|
|
31
|
+
}, E),
|
|
32
|
+
renderDescription: () => /* @__PURE__ */ l.createElement(l.Fragment, null, N, D)
|
|
33
|
+
});
|
|
34
|
+
}, K = ({ children: e, className: t }) => {
|
|
35
|
+
const { options: n, addOther: a, addOtherLabel: O, id: d, numberOfColumns: _, hasError: b } = v(), { t: f } = F(), m = u(e, i.Option), r = S(null), c = O || f("add-other.default-other-option-label") || L;
|
|
36
|
+
return x(() => {
|
|
37
|
+
var o;
|
|
38
|
+
(o = r.current) == null || o.focus();
|
|
39
|
+
}, d), /* @__PURE__ */ l.createElement("div", {
|
|
40
|
+
className: t,
|
|
41
|
+
"data-columns": _,
|
|
42
|
+
"data-invalid": b
|
|
43
|
+
}, n.map((o, h) => g(m, {
|
|
44
|
+
key: o.value ?? o.label,
|
|
45
|
+
value: o.value ?? o.label,
|
|
46
|
+
label: o.label,
|
|
47
|
+
index: h,
|
|
48
|
+
radioRef: h === 0 ? r : void 0
|
|
49
|
+
})), a && g(m, {
|
|
50
|
+
key: L,
|
|
51
|
+
value: L,
|
|
52
|
+
label: c,
|
|
53
|
+
isOther: !0
|
|
54
|
+
}));
|
|
55
|
+
}, p = ({ children: e, className: t, ...n }) => {
|
|
56
|
+
var I;
|
|
57
|
+
const { value: a, label: O, isOther: d = !1, radioRef: _ } = n, { value: b, options: f } = v(), m = u(e, p.Label), r = u(e, p.Input), c = u(e, p.Control), o = u(e, p.OtherInput), h = d ? y(f, b) : b === a, C = (I = r == null ? void 0 : r.props) == null ? void 0 : I.className;
|
|
58
|
+
return /* @__PURE__ */ l.createElement("div", {
|
|
59
|
+
className: t
|
|
60
|
+
}, /* @__PURE__ */ l.createElement(A, {
|
|
61
|
+
value: a
|
|
62
|
+
}, /* @__PURE__ */ l.createElement(G, {
|
|
63
|
+
ref: _,
|
|
64
|
+
className: C
|
|
65
|
+
}, ({ isSelected: s, isHovered: E }) => /* @__PURE__ */ l.createElement(l.Fragment, null, g(c, {
|
|
66
|
+
isSelected: s,
|
|
67
|
+
isHovered: E
|
|
68
|
+
}), g(m, {
|
|
69
|
+
label: O
|
|
70
|
+
})))), d && h && o);
|
|
71
|
+
}, Q = ({ className: e, ...t }) => {
|
|
72
|
+
const { label: n } = t;
|
|
73
|
+
return /* @__PURE__ */ l.createElement("span", {
|
|
74
|
+
className: e
|
|
75
|
+
}, n);
|
|
76
|
+
}, W = (e) => null, X = ({ className: e }) => {
|
|
77
|
+
const { value: t, onChange: n, addOtherLabel: a, addOtherPlaceholder: O, otherInputCharacterLimit: d, disabled: _, readOnly: b, options: f } = v(), { t: m } = F(), r = S(null), c = y(f, t), o = a || m("add-other.default-other-option-label") || L, [h, C] = T(c && t ? J(t, a) : "");
|
|
78
|
+
B(() => {
|
|
79
|
+
var s;
|
|
80
|
+
c && r.current && ((s = r.current) == null || s.focus());
|
|
81
|
+
}, [
|
|
82
|
+
c
|
|
83
|
+
]);
|
|
84
|
+
const I = H((s) => {
|
|
85
|
+
let E;
|
|
86
|
+
s ? E = `${a}: ${s}` : E = o, n(E), C(s);
|
|
87
|
+
}, [
|
|
88
|
+
n,
|
|
89
|
+
a,
|
|
90
|
+
o
|
|
91
|
+
]);
|
|
92
|
+
return /* @__PURE__ */ l.createElement(P, {
|
|
93
|
+
"aria-label": o,
|
|
94
|
+
value: h,
|
|
95
|
+
onChange: I,
|
|
96
|
+
isDisabled: _,
|
|
97
|
+
isReadOnly: b
|
|
98
|
+
}, /* @__PURE__ */ l.createElement($, {
|
|
99
|
+
ref: r,
|
|
100
|
+
className: e,
|
|
101
|
+
placeholder: O,
|
|
102
|
+
maxLength: d
|
|
103
|
+
}));
|
|
104
|
+
};
|
|
105
|
+
p.Label = Q;
|
|
106
|
+
p.Input = W;
|
|
107
|
+
p.Control = w;
|
|
108
|
+
p.OtherInput = X;
|
|
109
|
+
i.Label = j;
|
|
110
|
+
i.Options = K;
|
|
111
|
+
i.Option = p;
|
|
112
|
+
i.Description = U;
|
|
113
|
+
i.Error = M;
|
|
114
|
+
const Y = "_labelImage_5198b_1", Z = "_group_5198b_26", ee = "_options_5198b_30", te = "_option_5198b_30", oe = "_optionInput_5198b_57", ne = "_optionControl_5198b_75", ae = "_optionControlHover_5198b_97", le = "_optionControlSelected_5198b_115", re = "_optionLabel_5198b_150", R = {
|
|
115
|
+
labelImage: Y,
|
|
116
|
+
group: Z,
|
|
117
|
+
options: ee,
|
|
118
|
+
option: te,
|
|
119
|
+
optionInput: oe,
|
|
120
|
+
optionControl: ne,
|
|
121
|
+
optionControlHover: ae,
|
|
122
|
+
optionControlSelected: le,
|
|
123
|
+
optionLabel: re
|
|
124
|
+
}, me = {
|
|
125
|
+
base: R.optionControl,
|
|
126
|
+
selected: R.optionControlSelected,
|
|
127
|
+
hover: R.optionControlHover
|
|
128
|
+
};
|
|
129
|
+
export {
|
|
130
|
+
me as R,
|
|
131
|
+
i as a,
|
|
132
|
+
R as s
|
|
133
|
+
};
|
package/dist/component/{radio-group-field-rac-2y5gEEt7.js → radio-group-field-rac-qD-GQu2A.js}
RENAMED
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as n } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { a, s, R as c } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s as r, R as c } from "./radio-button-module-classes-DgiY7sw3.js";
|
|
5
5
|
import { E as i } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as o } from "./field-rac.module-DobpyqOd.js";
|
|
7
|
-
import { P as E, O, N as
|
|
8
|
-
import { u } from "./use-element-state-class-name-
|
|
9
|
-
import { u
|
|
10
|
-
const D = ({ content:
|
|
11
|
-
content:
|
|
7
|
+
import { P as E, O, N as p, C as R, S as _, r as I, j as L } from "./form-element-classes-BtKlobUX.js";
|
|
8
|
+
import { u as N } from "./use-element-state-class-name-C2_dMWlH.js";
|
|
9
|
+
import { u } from "./use-text-input-class-name-DMokiXwB.js";
|
|
10
|
+
const D = ({ content: s, locale: l }) => /* @__PURE__ */ e.createElement(n, {
|
|
11
|
+
content: s,
|
|
12
12
|
locale: l
|
|
13
|
-
}), B = ({ classes:
|
|
14
|
-
container:
|
|
13
|
+
}), B = ({ classes: s = {
|
|
14
|
+
container: p,
|
|
15
15
|
label: O,
|
|
16
16
|
radioButton: E
|
|
17
17
|
} }) => {
|
|
18
|
-
const l =
|
|
19
|
-
globalClasses:
|
|
18
|
+
const l = N({
|
|
19
|
+
globalClasses: s.radioButton,
|
|
20
20
|
moduleClasses: c
|
|
21
|
-
}),
|
|
22
|
-
return /* @__PURE__ */ e.createElement(a,
|
|
23
|
-
className:
|
|
21
|
+
}), m = u();
|
|
22
|
+
return /* @__PURE__ */ e.createElement(a, {
|
|
23
|
+
className: r.group
|
|
24
|
+
}, /* @__PURE__ */ e.createElement(a.Label, {
|
|
25
|
+
className: t(R, o.label)
|
|
24
26
|
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
25
|
-
className: t(
|
|
27
|
+
className: t(_, o.requiredMark)
|
|
26
28
|
}), /* @__PURE__ */ e.createElement(a.Label.Image, {
|
|
27
|
-
className:
|
|
29
|
+
className: r.labelImage
|
|
28
30
|
})), /* @__PURE__ */ e.createElement(a.Options, {
|
|
29
|
-
className: t(
|
|
31
|
+
className: t(s.container, r.options)
|
|
30
32
|
}, /* @__PURE__ */ e.createElement(a.Option, {
|
|
31
|
-
className:
|
|
33
|
+
className: r.option
|
|
32
34
|
}, /* @__PURE__ */ e.createElement(a.Option.Input, {
|
|
33
|
-
className:
|
|
35
|
+
className: r.optionInput
|
|
34
36
|
}), /* @__PURE__ */ e.createElement(a.Option.Control, {
|
|
35
37
|
className: l
|
|
36
38
|
}), /* @__PURE__ */ e.createElement(a.Option.Label, {
|
|
37
|
-
className: t(
|
|
39
|
+
className: t(s.label, r.optionLabel)
|
|
38
40
|
}), /* @__PURE__ */ e.createElement(a.Option.OtherInput, {
|
|
39
|
-
className:
|
|
41
|
+
className: m
|
|
40
42
|
}))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
41
43
|
className: t(I, o.error)
|
|
42
44
|
}, /* @__PURE__ */ e.createElement(i, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|